JPH0686251A - Variable length encoder - Google Patents

Variable length encoder

Info

Publication number
JPH0686251A
JPH0686251A JP26071092A JP26071092A JPH0686251A JP H0686251 A JPH0686251 A JP H0686251A JP 26071092 A JP26071092 A JP 26071092A JP 26071092 A JP26071092 A JP 26071092A JP H0686251 A JPH0686251 A JP H0686251A
Authority
JP
Japan
Prior art keywords
data
length
mask
flag
latch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP26071092A
Other languages
Japanese (ja)
Inventor
Tadashi Tamura
匡 田村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP26071092A priority Critical patent/JPH0686251A/en
Publication of JPH0686251A publication Critical patent/JPH0686251A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Image Processing (AREA)

Abstract

PURPOSE:To obtain a variable length encoder in which the capacity of a transmission buffer can be made small, and the necessary capacity of the transmission buffer can easily be set. CONSTITUTION:Fixed length data 3 outputted from a variable length encoder 2 are shifted by a barrel shift circuit 19 according to shift amounts, valid data length 4 is converted into mask data by a data length/mask converter 18, and shifted by a barrel shift circuit 24. The data shifted by the both barrel shift circuits 19 and 24 are written in latch B 22 and 26 by mask circuits 20 and 25, and the flag of a stuff insertion position is added to the data of the latch B 22 by a latch or buffer 23 when the stuff insertion position flag is valid, and the data are outputted to a transmission buffer 50. Then, mask data indicating the valid data position of the data at which the flag of the stuff insertion position is risen are added to the data of the latch B 26 by a latch or buffer 28, and the data are outputted to the transmission buffer 50.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、画像符号化伝送装置の
可変長符号化器において、送信バッファの構成をパラレ
ルデータとし、入出力レートを下げ、かつ開路の空き状
態を防ぐためのスタッフ符号の入る位置を明確にするフ
ラグとデータの送信バッファのどのピットまで有効かを
示すマスクを入れるようにした可変符号化装置に関する
ものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a variable length coder of an image coding and transmitting apparatus, in which a stuff code for constructing a transmission buffer as parallel data, lowering an input / output rate, and preventing an open circuit empty state. The present invention relates to a variable encoding device in which a flag for clarifying a position where a flag is inserted and a mask indicating which pit in a data transmission buffer is valid are inserted.

【0002】[0002]

【従来の技術】ディジタル1次群速度を使用するテレビ
(以下、TVという)会議などに適用される画像符号化
伝送装置は、TVカメラ等から取り込まれた映像信号を
ディジタル網のクロックとは非同期な水平走査周波数の
整数倍で標本化し、ディジタルフレームメモリに格納す
る。このディジタルフレームメモリに格納されたデータ
と有効な1フレーム前のデータとの間で情報源符号器が
動き検出による動き補償を行った後に、時間軸方向の冗
長度を利用するフレーム間予測のための前フレームの差
分を、予測誤差の空間的な冗長度を減らすために直交変
換するとともに量子化することにより、データを圧縮す
る。ただしこのとき、入力値をそのまま直交変換した方
がデータがより圧縮される場合には、差分ではなく入力
値をそのまま量子化する。
2. Description of the Related Art An image coding and transmitting apparatus applied to a television (hereinafter, referred to as TV) conference using a digital primary group velocity is a video signal transmitted from a TV camera or the like and asynchronous with a clock of a digital network. It is sampled at an integer multiple of the horizontal scanning frequency and stored in the digital frame memory. For inter-frame prediction using the redundancy in the time axis direction after the information source encoder performs motion compensation by motion detection between the data stored in the digital frame memory and the valid one-frame previous data. The data is compressed by orthogonally transforming and quantizing the difference of the preceding frame in order to reduce the spatial redundancy of the prediction error. However, at this time, when the data is compressed more by orthogonally transforming the input value, the input value is directly quantized instead of the difference.

【0003】さらに、このデータをビデオ信号多重部
(可変長符号化器)で、ハフマン符号およびランレング
ス符号により圧縮し(可変長符号化)、誤り訂正符号を
付加して次段の回路に送出する。このビデオ信号多重部
である可変長符号化器が送信バッファを制御する方法と
しては、従来より次の二つの方法がある。
Further, this data is compressed by a video signal multiplexer (variable length coder) by Huffman code and run length code (variable length coding), and an error correction code is added and sent to a circuit in the next stage. To do. Conventionally, there are the following two methods for controlling the transmission buffer by the variable length encoder which is the video signal multiplexing unit.

【0004】図6はその第1の方法を説明するためのブ
ロック図であり、この図6において、1は上記情報源符
号器で発生した量子化後のデータや、そのデータの属性
を示すヘッダ情報である。このヘッダ情報1は可変長符
号化器2に入力され、可変長符号化器2ではCCITT
標準勧告にしたがって、1ビットから20ビットまでの
可変長符号を発生する。
FIG. 6 is a block diagram for explaining the first method. In FIG. 6, 1 is a header indicating the quantized data generated by the information source encoder and the attribute of the data. Information. This header information 1 is input to the variable length encoder 2, and the variable length encoder 2 uses CCITT.
A variable length code of 1 to 20 bits is generated according to the standard recommendation.

【0005】ただし、ここでは以降の処理のため、MS
B(あるいはLSB)から詰めた20ビットの固定長化
データ3を出力する。このとき、可変長符号の有効な長
さを示す有効データ長4も発生する。さらにディジタル
回線網を利用する場合に、このディジタル回線網に無用
な空き状態が生じるのを回避するために、スタッフ(S
taff)符号と呼ばれる特別なデータを挿入してい
る。ただし、このスタッフ符号は挿入可能な位置が決め
られているため、スタッフ符号の挿入可能な位置を示す
スタッフ位置データ5をスタッフ符号に付加して可変長
符号化器2から出力している。
However, because of the subsequent processing, the MS
20-bit fixed length data 3 packed from B (or LSB) is output. At this time, the effective data length 4 indicating the effective length of the variable length code is also generated. Further, when the digital line network is used, the staff (S
Tuff) code is inserted as special data. However, since the position at which this stuff code can be inserted is determined, the stuff position data 5 indicating the position at which the stuff code can be inserted is added to the stuff code and output from the variable length encoder 2.

【0006】このように可変長符号化器2からは、固定
長化データ3と、有効データ長4と、スタッフ位置デー
タ5とが出力されて小容量の中間バッファ6に送られ、
そこで一時的に蓄えられる。この中間バッファ6に蓄え
られたデータのうち固定長化データ7と有効データ長8
が高速p/s(パラレル/シリアル)変換器10に送ら
れ、そこで可変長のパラレルデータが可変長のシリアル
データ11に変換され、送信バッファ12に転送され
る。送信バッファ12は高速で大容量(2ビット×n段
の容量)のもので、このシリアルデータ11を蓄えると
ともに、上記中間バッファ6に一時的に蓄えられたスタ
ッフ位置データ9もこの送信バッファ12に蓄えられ
る。
As described above, the variable length encoder 2 outputs the fixed length data 3, the effective data length 4, and the stuff position data 5 and sends them to the small capacity intermediate buffer 6.
It is temporarily stored there. Of the data stored in this intermediate buffer 6, fixed length data 7 and effective data length 8
Is sent to a high-speed p / s (parallel / serial) converter 10, where variable-length parallel data is converted into variable-length serial data 11 and transferred to a transmission buffer 12. The transmission buffer 12 has a high speed and a large capacity (capacity of 2 bits × n stages), and stores the serial data 11 as well as the stuff position data 9 temporarily stored in the intermediate buffer 6 in the transmission buffer 12. It can be stored.

【0007】送信バッファ12に蓄えられたシリアルデ
ータ11は回線データ出力部14に送られ、この回線デ
ータ出力部14において、ディジタル回線網の送信クロ
ックに同期して、シリアルデータ15としてディジタル
回線網に送信される。送信バッファ12に蓄えられたシ
リアルデータの残りが少なくなった状態(ディジタル回
線網が空く可能性があるとき)で、回線データ出力部1
4がスタッフ挿入位置を検出した場合には、回線データ
出力部14はスタッフ符号13をシリアルデータ15と
してディジタル回線網に送出する。
The serial data 11 stored in the transmission buffer 12 is sent to the line data output unit 14, and the line data output unit 14 synchronizes with the transmission clock of the digital line network and outputs it as serial data 15 to the digital line network. Sent. When the remaining serial data stored in the transmission buffer 12 is low (when the digital circuit network may be empty), the circuit data output unit 1
When 4 detects the stuff insertion position, the line data output unit 14 sends the stuff code 13 as serial data 15 to the digital line network.

【0008】また、可変長符号化器が送信バッファを制
御する第2の方法は図7に示すように行われる。この第
2の方法では上記第1の方法と同様に、情報源符号器が
発生した量子化データやそのデータの属性を示すヘッダ
情報1から、可変長符号化器2で固定長化データ3と、
有効データ長4と、スタッフ位置データ5を発生する。
A second method of controlling the transmission buffer by the variable length encoder is performed as shown in FIG. In the second method, similarly to the first method described above, the quantized data generated by the information source encoder and the header information 1 indicating the attribute of the data are converted into the fixed length data 3 by the variable length encoder 2. ,
The effective data length 4 and the staff position data 5 are generated.

【0009】これらの固定長化データ3と有効データ長
4と、スタッフ位置データ5はそのまま大容量の送信バ
ッフ16に蓄えられる。この送信がバッファ16に蓄え
られた固定長化データ7と有効データ長8がp/s変換
器17でシリアルデータに変換され、このシリアルデー
タは回線データ出力部14からディジタル回線網の送信
クロックに同期してディジタル回線網に送信される。
The fixed length data 3, the effective data length 4, and the stuff position data 5 are stored in the large-capacity transmission buffer 16 as they are. The fixed length data 7 and effective data length 8 stored in the buffer 16 are converted into serial data by the p / s converter 17, and this serial data is converted from the line data output unit 14 into a transmission clock of the digital line network. It is transmitted synchronously to the digital circuit network.

【0010】また、上記第1の方法と同様にして、送信
バッファ16に蓄えられたシリアルデータの残りが少な
くなった状態で、回線データ出力部14がスタッフ挿入
位置を検出した場合、回線データ出力部14はスタッフ
符号13をシリアルデータ15としてディジタル回線網
に送出する。
Similarly to the first method, when the line data output unit 14 detects the stuff insertion position with the remaining serial data stored in the transmission buffer 16 reduced, the line data output is performed. The section 14 sends the stuff code 13 as serial data 15 to the digital line network.

【0011】[0011]

【発明が解決しようとする課題】このような従来の、可
変長符号化器が送信バッファを制御する第1の方法で
は、標本化の周期で発生する量子化データ等のヘッダ情
報1を最大標本化周期の20倍の速度でp/s変換する
ために、この速度に合わせて動作する高速なp/s変換
器10と、このp/s変換器10で発生したシリアルデ
ータ11を蓄える高速な大容量の送信バッファ12が必
要となり、高価になる。加えてこの送信バッファ12に
は、データ1ビットに対して1ビットのスタッフ挿入位
置データが付加されて蓄えられるため、無駄な容量が必
要となる。
According to the first method in which the variable length encoder controls the transmission buffer, the header information 1 such as the quantized data generated in the sampling cycle is sampled at maximum by the conventional method. In order to perform p / s conversion at a speed 20 times the conversion cycle, a high-speed p / s converter 10 that operates at this speed and a high-speed p-s converter 10 that stores the serial data 11 generated by this p / s converter 10 are stored. A large-capacity transmission buffer 12 is required, which is expensive. In addition, since 1 bit of stuff insertion position data is added to 1 bit of data and stored in the transmission buffer 12, a wasteful capacity is required.

【0012】また、第2の方法では、p/sの変換器1
7によるp/s変換はディジタル回路網の送信クロック
の速度でよいが、送信バッファ16では、1ビットのデ
ータでも20ビットのデータも共通して1ワードを使用
するため、データのビット数が少ないほど無駄な領域が
大量に発生する。
In the second method, the p / s converter 1 is used.
Although the p / s conversion by 7 may be performed at the transmission clock speed of the digital circuit network, the transmission buffer 16 uses one word in common for both 1-bit data and 20-bit data, so the number of data bits is small. A lot of wasted area occurs.

【0013】本発明は、上述の問題に鑑みなされたもの
であり、送信バッファの小容量化が可能で、送信バッフ
ァの必要量の設定が容易になる可変長符号化装置を提供
することにある。
The present invention has been made in view of the above problems, and it is an object of the present invention to provide a variable-length coding apparatus capable of reducing the capacity of a transmission buffer and facilitating setting of a required amount of the transmission buffer. .

【0014】[0014]

【課題を解決するための手段】上記目的を達成するため
に本発明は、量子化された可変長あるいは固定長の画像
データを固定長のパラレルデータに変換して回線に送出
する固定長化変換器と、上記固定長化変換器から回線に
送出すべきパラレルデータが無くなった場合に、該可変
長符号化器から入力される、上記回線にスタッフするデ
ータの挿入位置を示すスタッフ挿入位置データに基づい
て、上記パラレルデータにスタッフ挿入位置のフラグを
挿入するフラグ挿入器と、上記フラグ挿入器で挿入され
た上記フラグが上記固定長パラレルデータのどの位置で
有効になるかを示すマスクを上記パラレルデータに挿入
するマスク挿入器とを設けたことを特徴とする。
In order to achieve the above object, the present invention provides a fixed-length conversion for converting quantized variable-length or fixed-length image data into fixed-length parallel data and transmitting it to a line. And the stuff insertion position data indicating the insertion position of the data to be stuffed to the line, which is input from the variable length encoder when there is no parallel data to be sent to the line from the fixed length converter. Based on the parallel data, a flag inserter that inserts a flag of the stuff insertion position into the parallel data, and a mask that indicates at which position in the fixed-length parallel data the flag inserted by the flag inserter becomes valid. A mask inserter for inserting data is provided.

【0015】[0015]

【作用】本発明によれば、画像符号化伝送装置の可変長
符号化手段に量子化データ等が入力されると、例えばC
CITT標準勧告にしたがって、可変長符号あるいは固
定長符号に無関係に固定長パラレルデータに変換されて
回線に送出され、回線に送出すべきデータがなくなる
と、フラグ挿入手段により回線にスタッフするデータの
挿入位置を示すフラグが挿入され、また、マスク挿入手
段により、挿入されたフラグが固定長パラレルデータの
どの位置で有効かを示すマスクが挿入される。これによ
り、バッファの本当の使用量と段数とがほぼ一致し、メ
モリの必要量の設定が容易になる。
According to the present invention, when the quantized data or the like is input to the variable length coding means of the image coding and transmitting apparatus, for example, C
According to the CITT standard recommendation, regardless of the variable length code or fixed length code, it is converted into fixed length parallel data and transmitted to the line, and when there is no data to be transmitted to the line, the flag inserting means inserts the data to be stuffed into the line. A flag indicating a position is inserted, and the mask inserting means inserts a mask indicating at which position in the fixed-length parallel data the inserted flag is valid. As a result, the actual usage amount of the buffer and the number of stages substantially match, and it becomes easy to set the required amount of memory.

【0016】[0016]

【実施例】以下、本発明の実施例を図面に基づき説明す
る。図1は本発明の一実施例による可変長符号化装置の
構成を示すブロック図であるが、本発明の理解を容易に
するために、まず、本発明が適用される画像符号化伝送
装置の概略について図2により説明する。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a variable-length coding apparatus according to an embodiment of the present invention. In order to facilitate understanding of the present invention, first, an image coding transmission apparatus to which the present invention is applied is described. The outline will be described with reference to FIG.

【0017】この図2において、45はビデオ符号器で
あり、情報源符号器40、可変長符号化器であるビデオ
信号多重化符号器42、送信バッファ43、これらを制
御する符号化制御回路41、伝送符号器44から構成さ
れている。上記情報源符号器40には、TVカメラ等か
ら取り込まれた映像信号をディジタル回線網のクロック
とは非同期な水平走査周波数の整数倍で標本化されてデ
ィジタルフレームメモリ(図示せず)に格納されたデー
タが入力される。このデータの冗長部分を取り除いてデ
ータを圧縮するために情報源符号器40では、画像符号
化のCCITT標準勧告H.261に基づく処理をす
る。
In FIG. 2, reference numeral 45 is a video encoder, which is an information source encoder 40, a video signal multiplex encoder 42 which is a variable length encoder, a transmission buffer 43, and an encoding control circuit 41 for controlling these. , A transmission encoder 44. In the information source encoder 40, a video signal taken in from a TV camera or the like is sampled at an integer multiple of the horizontal scanning frequency asynchronous with the clock of the digital line network and stored in a digital frame memory (not shown). Data is input. In order to remove the redundant part of this data and compress the data, the source encoder 40 uses the CCITT standard recommendation H.264 for image coding. Processing based on H.261.

【0018】この情報源符号化器40で得られた量子化
後のデータやそのデータの属性を示すヘッダ情報等は、
ビデオ信号多重化符号器42に送られる。ビデオ信号多
重化符号器42は、量子化後のデータやヘッダ情報をC
CITT標準勧告にしたがって1ビットから20ビット
までの可変長符号に変換し、MSB(あるいはLSB)
から詰めた20ビットの固定長化データと、その有効部
分を示すデータ長と、スタッフ挿入位置データを出力し
て、送信バッファ43に送出する。
The quantized data obtained by the information source encoder 40, header information indicating the attributes of the data, and the like are
It is sent to the video signal multiplexing encoder 42. The video signal multiplexing encoder 42 stores the quantized data and header information in C
Converts to a variable length code of 1 to 20 bits according to the CITT standard recommendation, and MSB (or LSB)
The fixed length data of 20 bits, the data length indicating the effective part thereof, and the stuff insertion position data are output and sent to the transmission buffer 43.

【0019】本発明の一実施例による可変長符号化装置
は、図1のブロック図に示すように構成されている。こ
の図1において、従来の技術の説明で参照した図6及び
図7に示された要素と同一の要素には、これらの図で付
したものと同一の引用符号を付すものとする。さて、図
1において2は可変長符号化器であり、図2で述べたビ
デオ信号多重化符号器42に対応している。
A variable length coding apparatus according to an embodiment of the present invention is configured as shown in the block diagram of FIG. In FIG. 1, the same elements as those shown in FIGS. 6 and 7 referred to in the description of the prior art are designated by the same reference numerals as those given in these figures. Now, in FIG. 1, reference numeral 2 denotes a variable length encoder, which corresponds to the video signal multiplex encoder 42 described in FIG.

【0020】この可変長符号化器2は図2でも述べたよ
うに、図2の情報源符号化器40で発生した量子化後の
データや、そのデータの属性を示すヘッダ情報を標準勧
告(CCITT勧告H.261)にしたがって、1ビッ
トから20ビットまでの可変長符号に変換し、MSB
(あるいはLSB)から詰めた20ビットの固定長化デ
ータ3と、この固定長化データ3の有効部分を示す有効
データ長4と、このとき生成したデータの直後にスタッ
フを挿入してもよい位置の場合に、その位置を示すスタ
ッフ挿入位置データ5を出力する。
As described with reference to FIG. 2, the variable length encoder 2 standardizes the quantized data generated in the information source encoder 40 of FIG. 2 and the header information indicating the attribute of the data ( According to CCITT Recommendation H.261), it is converted into a variable length code of 1 bit to 20 bits, and MSB is converted.
20-bit fixed length data 3 packed from (or LSB), valid data length 4 indicating the effective portion of this fixed length data 3, and position at which stuff may be inserted immediately after the data generated at this time In this case, the staff insertion position data 5 indicating the position is output.

【0021】これらのうち、有効データ長4はデータ長
〜マスク変換器18に送出されるようになっている。デ
ータ長〜マスク変換器18は、この有効データ長4の値
に対応する数だけ、MSB(あるいはLSB)から詰め
て有効を示すフラグを立てて、マスクデータ39を生成
する。
Of these, the effective data length 4 is sent to the data length to mask converter 18. The data length-to-mask converter 18 generates mask data 39 by setting a flag indicating validity by packing from MSB (or LSB) by the number corresponding to the value of the valid data length 4.

【0022】このマスクデータ39は、たとえば、デー
タ長〜マスク変換器18に入力された有効データ長4が
「7」であり、MSBから詰めて出力する場合、MSB
側から表記すると、「111111100000000
00000」となる。同様にして、有効データ長4が
「18」の場合、MSB側から詰めて、出力する場合、
MSB側から表記すると、「111111111111
11111100」となる。
In this mask data 39, for example, when the effective data length 4 inputted to the mask converter 18 is "7" and the MSB is packed and outputted from the MSB, the MSB is outputted.
From the side, "111111100000000"
Will be 00000 ". Similarly, when the effective data length 4 is "18", the data is packed from the MSB side and output,
When written from the MSB side, "111111111111"
11111100 ".

【0023】コントロール回路36では、ラッチB2
6、ラッチA27の出力からシフト量30が算出され、
このシフト量30の値の分だけ固定長化データ3がバレ
ルシフト回路19に入力されてシフトされる。そして、
コントロール回路36からのシフト量30の値によっ
て、データ長〜マスク変換器18から出力されるマスク
データ39がバレルシフト回路24に入力されてシフト
される。これらのバレルシフト回路19,24はそれぞ
れ同一構成をなしており、上記シフト量30の値によっ
て、0〜ラッチB22,26のデータ幅以上のシフトが
行える。バレルシフト回路19でシフトされたデータは
バス32,33と、それに対応する各バスに出力され
る。
In the control circuit 36, the latch B2
6, the shift amount 30 is calculated from the output of the latch A27,
The fixed length data 3 is input to the barrel shift circuit 19 and shifted by the value of the shift amount 30. And
Depending on the value of the shift amount 30 from the control circuit 36, the data length-mask data 39 output from the mask converter 18 is input to the barrel shift circuit 24 and shifted. The barrel shift circuits 19 and 24 have the same configuration, and depending on the value of the shift amount 30 described above, a shift of 0 to the data width of the latches 22 and 26 or more can be performed. The data shifted by the barrel shift circuit 19 is output to the buses 32 and 33 and the corresponding buses.

【0024】いま、たとえば、バレルシフト回路19の
入力に、「1010011010001111000
0」が与えられ、シフト量30として「5」がえられた
場合、バレルシフト回路19からバス32に「1010
0」が出力され、また、バス33には「1101000
11110000」が出力される。そこで、コントロー
ル回路36はラッチB26の出力とラッチA27の出力
から既ラッチ量を算出し、この既ラッチ量31により、
ラッチB22に書き込まれていないビットにバス32の
データを書き込んでマスク回路20に書き込ませるよう
にしている。
Now, for example, "1010011010001111000" is input to the input of the barrel shift circuit 19.
When "0" is given and "5" is obtained as the shift amount 30, "1010" is input from the barrel shift circuit 19 to the bus 32.
"0" is output, and "1101000" is output to the bus 33.
111111 "is output. Therefore, the control circuit 36 calculates the already latched amount from the output of the latch B26 and the output of the latch A27.
The data of the bus 32 is written in the bit not written in the latch B22 so that the mask circuit 20 can write the data.

【0025】同様にして、バレルシフト回路24でシフ
トされたデータは各バスに出力され、コントロール回路
36で算出された上記既ラッチ量31に基づきラッチB
26にまだ書き込まれていないビットにデータを書き込
みマスク回路25により書かせるようにしている。
Similarly, the data shifted by the barrel shift circuit 24 is output to each bus, and the latch B is calculated based on the already latched amount 31 calculated by the control circuit 36.
The write mask circuit 25 allows data to be written in the bits that have not been written in the data 26.

【0026】また、ラッチA21には、バレルシフト回
路19でシフトされてバス32に出力されてさらに書き
込みマスク回路20によりラッチB22に取り込んだ残
りのデータが、バス33を通して入力されて保持され
る。全く同様にして、ラッチA27には、バレルシフト
回路24でシフトされて書き込みマスク回路25により
ラッチB26に取り込んだ残りのデータが入力されて保
持される。
Further, the latch A21 receives the remaining data which is shifted by the barrel shift circuit 19 and output to the bus 32, and is further fetched by the write mask circuit 20 to the latch B22, is inputted and held through the bus 33. In exactly the same manner, the remaining data that has been shifted by the barrel shift circuit 24 and taken into the latch B 26 by the write mask circuit 25 is input and held in the latch A 27.

【0027】さらに、上記ラッチB22は、送信バッフ
ァ50(図2の送信バッファ43と同じ)のデータ幅か
らスタッフ挿入位置データ5のフラグの分を引いたビッ
ト幅をもち、全ビットにデータが満たされた場合に、ラ
ッチA21にデータが無くなった時点で、ラッチまたは
バッファ23にデータを転送する。一方、ラッチB26
はスタッフ挿入位置フラグが有効になった場合、ラッチ
A27にデータがなくなった時点で、ラッチまたはバッ
ファ28にデータを転送する。この場合、ラッチB2
2,ラッチB26へのデータの書き込みは、MSB(ま
たはLSB)から順に詰めて行われる。
Further, the latch B22 has a bit width obtained by subtracting the flag of the stuff insertion position data 5 from the data width of the transmission buffer 50 (same as the transmission buffer 43 of FIG. 2), and all the bits are filled with data. In this case, when there is no more data in the latch A21, the data is transferred to the latch or buffer 23. On the other hand, the latch B26
Transfers the data to the latch or buffer 28 when there is no more data in the latch A27 when the stuff insertion position flag becomes valid. In this case, latch B2
2. Writing of data to the latch B26 is performed sequentially from the MSB (or LSB).

【0028】ラッチまたはバッファ23は、ラッチB2
2で生成されたデータにスタッフ挿入位置のフラグを付
加したデータ37を切換器29に出力する。一方、ラッ
チまたはバッファ28は、スタッフ挿入位置のフラグが
立ったデータの有効なデータ位置を示すマスクデータ3
8を切換器29に出力する。このマスクデータ38のス
タッフ挿入位置のフラグは、ここでは、処理を簡略化す
るために、立てないものとする。フラグを立てた場合に
は、そのフラグを無視させる回路を追加すればよい。
The latch or buffer 23 is connected to the latch B2.
The data 37 generated by adding the stuff insertion position flag to the data generated in 2 is output to the switch 29. On the other hand, the latch or buffer 28 uses the mask data 3 indicating the effective data position of the data flagged for the stuff insertion position.
8 is output to the switch 29. The flag of the stuff insertion position of the mask data 38 is not set here in order to simplify the processing. When the flag is set, a circuit for ignoring the flag may be added.

【0029】例を挙げると、ラッチB22にまだ3ビッ
トのデータ(ここでは、「101」とする)しか書かれ
ていないが、スタッフ挿入位置フラグが立った場合、マ
スクデータ38に「1110000」が生成されている
ので、このマスクデータ38を3ビットしか書かれてい
ないデータとともに、送信バッファ50に書き込む。こ
のときに書かれるデータは、MSBからのデータ「11
011111」とマスクデータ「01110000」と
になる。ただしこれは、スタッフ挿入位置フラグをMS
Bとした場合である。
For example, only 3-bit data (here, "101") is written in the latch B22, but when the stuff insertion position flag is set, "1110,000" is written in the mask data 38. Since it is generated, the mask data 38 is written in the transmission buffer 50 together with the data in which only 3 bits are written. The data written at this time is the data "11
011111 "and mask data" 01110000 ". However, this is MS staff position flag
This is the case where B is set.

【0030】上記切換器29は、ラッチまたはバッファ
23からのデータ37を送信バッファ50に送出し、あ
るいは、コントロール回路36からのスタッフ時にマス
ク割込み制御信号により切り換わって、ラッチまたはバ
ッファ28からのマスクデータ38を、スタッフ挿入位
置のフラグが立ったデータの直後(または直前)に送信
バッファ50に出力する。
The switch 29 sends the data 37 from the latch or buffer 23 to the transmission buffer 50, or switches by the mask interrupt control signal at the stuffing time from the control circuit 36 to mask the data from the latch or buffer 28. The data 38 is output to the transmission buffer 50 immediately after (or just before) the data in which the stuff insertion position flag is set.

【0031】かくして、バレルシフト回路19により、
可変長符号、固定長符号にかかわらず固定長パラレルデ
ータに変換する固定長化変換手段となし、書き込みマス
ク回路20,ラッチA21,ラッチB22,ラッチまた
はバッファ23,コントロール回路36により、ディジ
タル回線網に送信すべきデータが無くなった場合にはこ
のディジタル回線網にスタッフするデータを挿入すべき
位置を示すフラグの挿入を行うフラグ挿入手段を構成し
ている。また、データ長〜マスク変換器18,バレルシ
フト回路24、書き込みマスク回路25,ラッチA2
7,ラッチB26,ラッチまたはバッファ28,コント
ロール回路36により、フラグが固定長パラレルデータ
のどの位置で有効になるかを示すマスクを挿入するマス
ク挿入手段を構成している。
Thus, by the barrel shift circuit 19,
Fixed length conversion means for converting to fixed length parallel data regardless of variable length code or fixed length code, and write mask circuit 20, latch A21, latch B22, latch or buffer 23, and control circuit 36 for digital line network. When there is no more data to be transmitted, the flag inserting means is configured to insert a flag indicating the position where the data to be stuffed into this digital line network should be inserted. Further, the data length to mask converter 18, barrel shift circuit 24, write mask circuit 25, latch A2
7, the latch B 26, the latch or buffer 28, and the control circuit 36 constitute mask inserting means for inserting a mask indicating at which position of the fixed-length parallel data the flag is valid.

【0032】図3〜図5は可変長符号器2からのデータ
が送信バッファ50に書き込まれる様子を示しており、
ここでは、送信バッファ50の1ワードを8ビット、そ
の内の1ビットをスタッフ挿入位置のフラグ用としてい
る。図3では、固定長化データ43を20ビットで、
「00000000000000010000」とし、
有効データ長4も20ビットで、「010101111
11111111111」とし、スタッフ挿入位置デー
タ5を20ビットで、「01101111111111
111111」とし、6ビットのデータの一部が変換さ
れ、送信バッファ50内の4ワードに書き込まれてい
る。
FIGS. 3 to 5 show how the data from the variable length encoder 2 is written in the transmission buffer 50.
Here, 1 word of the transmission buffer 50 is used for 8 bits, and 1 bit thereof is used for a stuff insertion position flag. In FIG. 3, the fixed length data 43 is 20 bits,
"00000000000000000010000",
The effective data length 4 is also 20 bits, and “010101111
11111111111 ", and the stuff insertion position data 5 is" 01101111111111 "with 20 bits.
111111 ”, part of the 6-bit data is converted and written in 4 words in the transmission buffer 50.

【0033】また、図4では、5ワードのデータと、固
定長化データ「000111111111111111
11」及び有効データ長「4」のデータの一部とが7ワ
ードに変換され、送信バッファ50に書き込まれてい
る。このとき、変換中のデータの後に、スタッフを挿入
してもよいというスタッフ挿入位置のフラグが立ってい
る。
In FIG. 4, the 5-word data and the fixed-length data "000111111111111111111" are used.
11 "and a part of the data having the effective data length" 4 "are converted into 7 words and written in the transmission buffer 50. At this time, a staff insertion position flag indicating that a staff may be inserted is set after the data being converted.

【0034】図5では、最後の長さ4ビットのデータの
後に有効なデータを詰めずに、スタッフ挿入位置のフラ
グとともに送信バッファ50に書き込んでいる。このと
き、詰めるデータが無かった部分には、「1」または
「0」を入れる。ここでは、「1」を入れた場合を示し
ている。その後に、直前のデータの有効部分を示すデー
タを書き込み、次のデータを待つ状態となる。
In FIG. 5, valid data is not packed after the last 4-bit length data, but is written in the transmission buffer 50 together with the stuff insertion position flag. At this time, "1" or "0" is put in a portion where there is no data to be packed. Here, the case where "1" is entered is shown. After that, the data indicating the effective portion of the immediately preceding data is written, and the next data is waited for.

【0035】このように本実施例では、可変長符号化器
2が発生した固定長化データ3を、その有効長さを示す
有効データ長4を使って、送信バッファ50のサイズに
合わせた連続したシリアルデータに変換し、特別な固定
長化データ3の直後にスタッフデータを詰めることがで
きるがシリアルデータ化された後では、どの位置にスタ
ッフデータを挿入してよいかわからなくなるので、スタ
ッフ挿入位置を示すフラグとマスクデータを生成し、一
緒に送信バッファ50に書き込み、この送信バッファ5
0の構成を複数ビットで1ワードのデータに1ビットの
スタッフ挿入位置フラグを付加するようにした。
As described above, in this embodiment, the fixed-length data 3 generated by the variable-length encoder 2 is continuously matched to the size of the transmission buffer 50 by using the effective data length 4 indicating the effective length thereof. The stuff data can be packed immediately after the special fixed-length data 3 by converting it to serial data, but after the serial data is created, it is not known at which position the stuff data should be inserted. A flag indicating the position and mask data are generated and written together in the transmission buffer 50.
In the configuration of 0, a 1-bit stuff insertion position flag is added to the data of 1 word by a plurality of bits.

【0036】このため、送信バッファ50に書かれたデ
ータをディジタル回線網のクロックに同期して、パラレ
ル/シリアルに変換する場合、スタッフを挿入する位置
を示すフラグが立っていない状態で、かつ直前のスタッ
フ挿入位置を示すフラグも立っていなければ、データ部
分のパラレルデータをP/S変換するだけでよく、シリ
アルデータからパラレルデータへの変換を高速に行うこ
とができる。
Therefore, when the data written in the transmission buffer 50 is converted into parallel / serial in synchronization with the clock of the digital line network, the flag indicating the position to insert the stuff is not set, and immediately before. If the flag indicating the stuff insertion position is not set, only the parallel data in the data portion need be P / S converted, and the conversion from serial data to parallel data can be performed at high speed.

【0037】また、スタッフ挿入位置を示すフラグが立
ったデータの場合、直後の1ワードを読み込んでどのビ
ットが有効かを判断し、もし、この有効なビットをディ
ジタル回線網に送出した後、送出すべきデータが送信バ
ッファ50内に用意されていない場合にはスタッフ符号
をディジタル回線網に送出するので、ディジタル回線網
にデータがない状態を回避することができる。
In the case of data in which a flag indicating the stuff insertion position is set, the immediately following word is read to determine which bit is valid, and if this valid bit is sent to the digital line network, then it is sent. When the data to be output is not prepared in the transmission buffer 50, the stuff code is sent to the digital line network, so that the state where there is no data in the digital line network can be avoided.

【0038】なお、送信バッファ50内での有効データ
を示すマスクデータの形式として、上記実施例では、有
効なビットに対応するビット部分に「1」または「0」
を与えたが、有効なビット数を示す値を書いてもよい。
また、有効データ長の処理について、図1では、有効デ
ータ長4をマスクのビット列に変換し、固定長化データ
の各ビットに対応させる方法を採っているが、ビット列
に変換せずバレルシフト回路24、書き込みマスク回路
25,ラッチB26,ラッチA27を演算器(特に引き
算器)やカウンタを使って実現できる。
As the format of the mask data indicating the valid data in the transmission buffer 50, "1" or "0" is added to the bit portion corresponding to the valid bit in the above embodiment.
However, you may write a value that indicates the number of valid bits.
Further, regarding the processing of the effective data length, in FIG. 1, the method of converting the effective data length 4 into the bit string of the mask and making it correspond to each bit of the fixed length data is adopted. 24, the write mask circuit 25, the latch B26, and the latch A27 can be realized by using an arithmetic unit (particularly a subtractor) or a counter.

【0039】[0039]

【発明の効果】以上説明したように、本発明によれば、
可変長符号、固定長符号に無関係に固定長パラレルデー
タに変換し、送信すべきデータがディジタル回線網に無
くなる場合に、ディジタル回線網にスタッフするデータ
を挿入すべき位置を示すフラグの挿入を行うとともに、
このフラグを固定長パラレルデータのどの位置に挿入す
るのが有効かを示すマスクを挿入するようにしたので、
可変長データとその有効データ長とから高速にシリアル
のデータ列に変換でき、しかも、低速でも送信バッファ
にデータの書き込みができ、かつシリアルデータにした
場合判断しにくいスタッフの挿入位置が容易に判断可能
となる。また、数ビット以上に1ビットスタッフ挿入位
置があるだけであるから、メモリの必要容量の見積が容
易になり、容量も節約できる。
As described above, according to the present invention,
Converts to fixed-length parallel data regardless of variable-length code or fixed-length code, and when the data to be transmitted runs out in the digital line network, inserts a flag indicating the position where the data to be stuffed in the digital line network should be inserted. With
Since a mask indicating which position of fixed length parallel data is effective for inserting this flag is inserted,
Variable-length data and its effective data length can be converted into a serial data string at high speed, data can be written in the transmission buffer even at low speed, and the insertion position of the staff, which is difficult to determine when using serial data, can be easily determined. It will be possible. Further, since there is only a 1-bit stuff insertion position for several bits or more, it is possible to easily estimate the required memory capacity and save the capacity.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の一実施例による可変長符号化装置の構
成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a variable length coding device according to an embodiment of the present invention.

【図2】本発明の可変長符号化装置が適用される画像符
号化伝送装置の送信系のブロック図である。
FIG. 2 is a block diagram of a transmission system of an image coding transmission device to which the variable length coding device of the present invention is applied.

【図3】同上実施例における固定長化データと、有効デ
ータ長と、スタッフ挿入位置データが送信バッファ内の
4ワードに書き込まれる状態を示す説明図である。
FIG. 3 is an explanatory diagram showing a state in which fixed length data, effective data length, and stuff insertion position data are written in 4 words in a transmission buffer in the embodiment.

【図4】同上実施例における5ワードのデータと固定長
化データと、有効データ長のデータの一部が7ワードに
変換されて、送信バッファに書き込まれる状態を示す説
明図である。
FIG. 4 is an explanatory diagram showing a state in which data of 5 words, fixed length data, and part of data of effective data length are converted into 7 words and written in a transmission buffer in the embodiment.

【図5】同上実施例における送信バッファに最後の長さ
4ビットのデータの後に有効なデータを詰めずにスタッ
フ挿入位置のフラグとともに書き込む状態を示す説明図
である。
FIG. 5 is an explanatory diagram showing a state in which valid data is not filled after the last 4-bit data in the transmission buffer and is written together with a stuff insertion position flag in the embodiment.

【図6】従来の画像符号化伝送装置における送信バッフ
ァ制御方法を説明するためのビデオ信号多重化符号器の
ブロック図である。
FIG. 6 is a block diagram of a video signal multiplexing encoder for explaining a transmission buffer control method in a conventional image encoding and transmitting apparatus.

【図7】従来の画像符号化伝送装置における異なる送信
バッファ制御方法を説明するためのビデオ信号多重化符
号器のブロック図である。
FIG. 7 is a block diagram of a video signal multiplexing encoder for explaining a different transmission buffer control method in a conventional image encoding transmission device.

【符号の説明】[Explanation of symbols]

18 データ長〜マスク変換器(マスク挿入手段) 19 バレルシフト回路(固定長化変換手段) 20 書き込みマスク回路(フラグ挿入手段) 21 ラッチA(フラグ挿入手段) 22 ラッチB(フラグ挿入手段) 23 ラッチまたはバッファ(フラグ挿入手段) 24 バレルシフト回路(マスク挿入手段) 25 書き込みマスク回路(マスク挿入手段) 26 ラッチB(マスク挿入手段) 27 ラッチA(マスク挿入手段) 28 ラッチまたはバッファ(マスク挿入手段) 36 コントロール回路(フラグ挿入手段、マスク挿入
手段)
18 Data Length to Mask Converter (Mask Inserting Means) 19 Barrel Shift Circuit (Fixed Length Converting Means) 20 Write Mask Circuit (Flag Inserting Means) 21 Latch A (Flag Inserting Means) 22 Latch B (Flag Inserting Means) 23 Latches Or buffer (flag inserting means) 24 barrel shift circuit (mask inserting means) 25 write mask circuit (mask inserting means) 26 latch B (mask inserting means) 27 latch A (mask inserting means) 28 latch or buffer (mask inserting means) 36 control circuit (flag inserting means, mask inserting means)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 量子化された可変長あるいは固定長の画
像データを固定長のパラレルデータに変換して回線に送
出する固定長化変換手段と、 上記固定長化変換器から回線に送出すべきパラレルデー
タが無くなった場合に、該可変長符号化器から入力され
る、上記回線にスタッフするデータの挿入位置を示すス
タッフ挿入位置データに基づいて、上記パラレルデータ
にスタッフ挿入位置のフラグを挿入するフラグ挿入手段
と、 上記フラグ挿入器で挿入された上記フラグが上記固定長
パラレルデータのどの位置で有効になるかを示すマスク
を上記パラレルデータに挿入するマスク挿入手段と、 を設けたことを特徴とする可変長符号化装置。
1. Fixed-length conversion means for converting quantized variable-length or fixed-length image data into fixed-length parallel data and sending it to a line, and the fixed-length converter to send to the line. When there is no parallel data, a stuff insertion position flag is inserted into the parallel data based on the stuff insertion position data input from the variable length encoder and indicating the insertion position of the data to be stuffed into the line. Flag inserting means and mask inserting means for inserting into the parallel data a mask indicating at which position of the fixed-length parallel data the flag inserted by the flag inserting device becomes valid. And a variable length coding device.
JP26071092A 1992-09-02 1992-09-02 Variable length encoder Pending JPH0686251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26071092A JPH0686251A (en) 1992-09-02 1992-09-02 Variable length encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26071092A JPH0686251A (en) 1992-09-02 1992-09-02 Variable length encoder

Publications (1)

Publication Number Publication Date
JPH0686251A true JPH0686251A (en) 1994-03-25

Family

ID=17351691

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26071092A Pending JPH0686251A (en) 1992-09-02 1992-09-02 Variable length encoder

Country Status (1)

Country Link
JP (1) JPH0686251A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998010591A1 (en) * 1996-09-02 1998-03-12 Kabushiki Kaisha Toshiba Information transmitting method, encoder/decoder of information transmitting system using the method, and encoding multiplexer/decoding inverse multiplexer

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998010591A1 (en) * 1996-09-02 1998-03-12 Kabushiki Kaisha Toshiba Information transmitting method, encoder/decoder of information transmitting system using the method, and encoding multiplexer/decoding inverse multiplexer
US6876676B2 (en) 1996-09-02 2005-04-05 Kabushiki Kaisha Toshiba Information transmission method and encoding/decoding apparatus and encoding-multiplexing/decoding-demultiplexing apparatus in information transmission system to which information transmission method is applied
US6952432B2 (en) 1996-09-02 2005-10-04 Kabushiki Kaisha Toshiba Information transmission method and encoding/decoding apparatus and encoding- multiplexing/decoding- demultiplexing apparatus in information transmission system to which information transmission method is applied
US6959018B2 (en) 1996-09-02 2005-10-25 Kabushiki Kaisha Toshiba Information transmission method and encoding/decoding apparatus and encoding-multiplexing/decoding-demultiplexing apparatus in information transmission system to which information transmission method is applied
US6961354B2 (en) 1996-09-02 2005-11-01 Kabushiki Kaisha Toshiba Information transmission method and encoding/decoding apparatus and encoding-multiplexing/decoding-demultiplexing apparatus in information transmission system in which information transmission method is applied
US7002999B2 (en) 1996-09-02 2006-02-21 Kabushiki Kaisha Toshiba Information transmission method and encoding/decoding apparatus and encoding-multiplexing/decoding-demultiplexing apparatus in information transmission system to which information transmission method is applied
US7010003B2 (en) 1996-09-02 2006-03-07 Kabushiki Kaisha Toshiba Information transmission method and encoding/decoding apparatus and encoding-multiplexing/decoding-demultiplexing apparatus in information transmission system to which information transmission method is applied
US7269170B2 (en) 1996-09-02 2007-09-11 Kabushiki Kaisha Toshiba Information transmission method and encoding/decoding apparatus and encoding-multiplexing/decoding-demultiplexing apparatus in information transmission system to which information transmission method is applied

Similar Documents

Publication Publication Date Title
JP2661738B2 (en) Video coder
JP4038996B2 (en) Signal processing apparatus and signal processing method
EP0040025A1 (en) Real time data compression/decompression scheme for facsimile transmission system
US20020163965A1 (en) Video frame compression/decompression hardware system
JPS6014540A (en) Bit compression multiplexing system
JP2000216687A (en) Variable length code word decoder
JP2819174B2 (en) Digital sample coding apparatus and coding method, and video signal processing system
EP0587324B1 (en) Data formatting apparatus
JP3517179B2 (en) Bitstream decoding device
JP3507498B2 (en) Real-time voice packet layer encoder
JP2808156B2 (en) System for decoding statistically encoded digital data
US6094151A (en) Apparatus and method for finite state machine coding of information selecting most probable state subintervals
EP1158807B1 (en) Data stream conversion apparatus and method, variable length coded data stream generation apparatus and method, and camera system
JP2613339B2 (en) Multi-channel data compressor
US5668547A (en) Runlength coding method and apparatus for use in a video signal encoding system
JPH1188364A (en) Communication device
JPH0686251A (en) Variable length encoder
US5889560A (en) MPEG video decoder
JPS60157393A (en) Television composite signal transmitter
JP3863652B2 (en) Variable length code alignment device
JPS6352812B2 (en)
JPH0237738B2 (en)
JP3480735B2 (en) Data stream alignment indicator in transport data packet assembly system
KR0157464B1 (en) Variable bit allocation decoding method and device
JPH0229255B2 (en) SHINGODENSOHOSHIKI