JPH03292081A - Coding and decoding device - Google Patents

Coding and decoding device

Info

Publication number
JPH03292081A
JPH03292081A JP2095757A JP9575790A JPH03292081A JP H03292081 A JPH03292081 A JP H03292081A JP 2095757 A JP2095757 A JP 2095757A JP 9575790 A JP9575790 A JP 9575790A JP H03292081 A JPH03292081 A JP H03292081A
Authority
JP
Japan
Prior art keywords
data
pixel data
zero
encoded
processing
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
JP2095757A
Other languages
Japanese (ja)
Inventor
Takumi Hasebe
巧 長谷部
Yasuhiko Yamane
靖彦 山根
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2095757A priority Critical patent/JPH03292081A/en
Publication of JPH03292081A publication Critical patent/JPH03292081A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PURPOSE:To make the entire processing efficient by not scanning a coefficient data at the coding and not reproducing the data at the decoding side but terminating processing when a consecutive zero coefficient data at the end of zigzag scanning is in existence in a block to be coded or decoded. CONSTITUTION:For example, a coder 22 generates a Huffman code data from a data from a buffer 7 by using combination between a run length value of consecutive zero data and its succeeding non-zero data and outputs the result as a coding data 23. Then a count 18 of a counter 14 and a count 16 of a count register 6 are compared, when they are coincident, a count coincidence signal 17 is informed to the coder 22. Thus, in the code processing after one- dimensional array conversion, when the final data in a block is zero, the coding processing is attained without scanning the data. Thus, the processing efficiency of final consecutive zero data in zigzag scanning in a block is improved.

Description

【発明の詳細な説明】 産業上の利用分野 本発明はカラー画像を含む自然画像の圧縮装置に関する
ものであな 従来の技術 返電 自然画像の圧縮方式については画素間の相関を利
用した直交変換方式が主流となっていも中でも離散コサ
イン変換(Discrete Co51ne Tran
sform:略してD CT、  以下DCTと呼ぶ)
方式が一般的であん この方式は画像データをNxM 
(N、  Mは同一の値で8または16が一般的であも
〉のブロックに分割LDCT、  さらに量子化を施し
 その量子化後のデータを一次元配列に変換し 符号化
処理を施していも 第3図に分割されたブロック内の画
素データの走査方法 第4図に実際の符号化処理と符号
データと本発明での非零係数の再生位置情報 第5図に
従来例のブロック飄 第6図に符号化処理の基本構成ブ
ロック図を示す。符号化処理の基本構成を第6図を用い
て説明すも 図において、61は画像デー久 62はD
CT処理を行うDCT縄 63はDCTの係数デー久6
4はDCT後の係数に量子化処理を施す量子化a65は
量子化後の係数デー九 〇〇はハフマン符号化訊67は
符号デー久 68はハフマン復号化敵69は逆量子化処
理する量子化−1想 70は逆DCT処理を行うDCT
−1部であん 画像データ61はブロック分割され そ
のブロックデータはDCT部62によりDCT処理が施
され 係数データ63に変換されも その係数データ量
子化部63により、量子化処理が施され 量子化後の係
数データ65となり、ハフマン符号部66により符号化
され 符号データ67となム ハフマン符号部66にお
いて、量子化後の係数データに対して;上 第3図(1
)に示すようなジグザク走査を行〜\ DCT処理後の
係数の内DC成分(ブロックの左上の係数値〉はその値
をハフマン符号化り、、DC成分を除<AC成分の係数
(その他の係数データ)の量子化後の係数が零であるデ
ータが何個続くかというランレングス値と非零のデータ
値をハフマン符号化するのであもそして、ブロックの最
後が零のランで終了する場合はその例のランレングス値
を符号化せずに E○B (End Of Block
)符号を接続し そのブロックの符号化処理を終了する
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to a compression device for natural images including color images. Although the mainstream is the discrete cosine transform (Discrete Co51ne Tran
sform: abbreviated as DCT, hereinafter referred to as DCT)
This method is common, but this method uses NxM image data.
(N and M are the same value, 8 or 16 are common) Blocks are divided by LDCT, then quantized, the quantized data is converted into a one-dimensional array, and then encoded. Fig. 3 shows a method of scanning pixel data in a divided block. The basic configuration block diagram of the encoding process is shown in the figure.The basic configuration of the encoding process will be explained using FIG.
DCT rope that performs CT processing 63 is DCT coefficient database 6
4 is quantization processing performed on the coefficients after DCT. 65 is coefficient data 9 after quantization. 〇〇 is Huffman encoding. 67 is code data 68 is Huffman decoding. 69 is quantization that performs inverse quantization processing. -1 thought 70 is a DCT that performs inverse DCT processing
The image data 61 is divided into blocks, and the block data is subjected to DCT processing by a DCT unit 62 and converted to coefficient data 63.The coefficient data quantization unit 63 performs quantization processing.After quantization, the image data 61 is divided into blocks. The coefficient data becomes 65, which is encoded by the Huffman coding section 66 to become coded data 67. In the Huffman coding section 66, the coefficient data after quantization;
) Perform a zigzag scan as shown in ~\ Of the coefficients after DCT processing, the DC component (coefficient value at the top left of the block) is Huffman-encoded, and the DC component is removed <the AC component coefficient (other Huffman encoding is performed on the run length value, which is the number of consecutive data whose coefficient is zero after quantization (coefficient data), and the non-zero data value.And if the end of the block ends with a run of zero. is E○B (End Of Block) without encoding the run length value of the example.
) codes and completes the encoding process for that block.

また 復号化処理(よ 符号データ67がハフマン復号
部68で量子化後の係数データに復号され されに量子
化−1部69で逆量子化処理を施さ11.  DCTの
係数になム その係数データをD CT −1部70で
逆DCT処理をして面像データにするのであもそのハフ
マン復号化部68の処理において、ジグザグ走査に沿っ
て係数データが復号さhE○B符号が検出された板 そ
の時までの復号に加えて、ブロックの最後まで復号する
のであも (参考文献: 静止画像圧縮標準化方式資料
rシ’z4・ビー・イー・シ0− テクニカル スベシ
フイケイシ麿ン、 トウ9イシコン 5」 アイ・ニス
・オー/アイ・イー・シー シゝエイ・デイ−・シー/
ニス・シー・2/タ97#リス−・シ0−8゜シー・シ
ー・アイ・ティー・ティー ニス・シ9−■ (”JP
EG  Technical  5pecificat
ion、Revision  5  ”  ISO/I
ECTTCI/SC2/WG8.CCITT   SG
■) 実際の符号化データの例を第4図に示す。この図では 
AC成分の符号化処理のみ示していも図において、1)
はブロック内のデータの走査を示し 図中のブロック外
の数値はX、Yの座標値を示し ブロワ′り内ではジグ
ザグ走査して符号化処理を施している事をしめモ2)は
そのAc1分の符号データを示り、、  C(X、Y)
は零のラン数とそれに続く係数値の組み合わせを符号化
したデータであり、Xは零のラン数であり、Yは量子化
係数データ値を示も 上記のような符号化方式の場念 まf、  DCT処理
は通常マトリック演算で行うのでs3図(2)、第3図
(3)に示すように 横方向あるいは縦方向に走査して
処理する場合が多L1  それに連なる量子化処理も全
ての係数データに対して行われるの玄 同様な走査で行
われる事が多(〜 そのた電算13図(1)に示すよう
なハフマン符号化処理時のジグザグ走査にするに沫 ハ
フマン符号処理前あるいは復号処理後のデータを一旦バ
ッファに格納する必要があも その構成例を第5図に示
す。第5図において、51は量子化後の係数デー久 5
2はその係数データの転送タイミング等を示す転送制御
信Ji!P% 53はバッファにあたえるアドレスを生
成するアドレス発生敵54は係数データを一旦格納する
バッファ、55はバッファ54に与えるアドレス56は
ハフマン符号・復号器57はバッファへ与えるアトレア
、、58はバッファと符号・復号器間を行き交う係数デ
ー久 59は符号データであも このブロック図での符
号化処理について説明すも 量子化後の係数データ51
は走査変換のためのバッファ54に一旦入力されも そ
の時アドレス発生部53は転送制御信号52により得ら
れるデータ入力タイミングからバッファ54に格納する
ためのアドレスを生成し バッファ54に与えも その
時にアドレスは第3図(2)あるいは第3図(3)に示
すような走査順に発生されも そして、バッファ54に
はハフマン符号化処理時のジグザグ走査で読みだすため
のアドレスを符号・復号器56から与えらtN、1次元
に変換されたデータ58をバッファ54から得て符号化
処理を行い符号データ59を得るのであもこのような符
号化処理において&上 プロプ2内のジグザグ走査はブ
ロック内の最後の係数まで必ず行わなければならな八 
しかしなが転 ブロック内が零で終了する場合、その零
の連続データは符号データに変換されず その最後の連
続する零のデータの前の係数データまでの符号データと
E○B符号で構成される事になも 節板 最後の連続す
るデータを走査しなくても符号データを生成しようとす
ればできるのであも しかし この従来の方法では零が
最後まで連続するかどうかを確認しなければならな鶏 
まt−、DCTを用いる符号化方式の場色 ジグザグ走
査の後半の方は零になる確率が高いた吹 零のランで終
了すム 即ち最後の零〇ランは符号化せfS EOB符
号を接続して終了する場合が多(〜 このように符号処
理において、実際の符号データに反映されない画素も走
査するというような効率の悪い面があも次に第5図での
復号化処理について説明すも符号データ59は符号・復
号器56に入力され その復号されたデータ58はバッ
ファ54に入力されもその際のアドレス57は符号・復
号器56から出力され 第3図(1)に示すジグザグ走
査に対応するアドレスであも その昧 復号すべき符号
データがEOB符号で終了する場合、EOB検出前の再
生データに続くブロック内のデータを最後まで零に設定
する必要があも なぜな板 バッファには前ブロックの
データが残っている可能性があるからであん このよう
な復号処理においてL 符号処理同機 実際の符号デー
タに反映されない画素も走査するというような効率の悪
い面があも発明が解決しようとする課題 上記従来例において、符号化あるいは復号化しようとす
るブロック致 ジグザグ走査の最後で連続する零の係数
データを有する場合の符号・復号化処理の効率が十分で
はないという課題があも本発明はかかる点に鑑水 この
ようなデータに対して処理効率の高い符号化装置および
複合化装置を提供することを目的とすム 課題を解決するための手段 本発明の符号化装置1よ 画像データをN×M (N、
  Mは自然数)のブロックに分割し そのブロツクに
対して直交変換 量子化処理を行い、 そのデータを1
次元配列のデータに変換し 符号化処理する装置におい
て、入力画素データに対して処理を行う画素データ処理
手段と符号化処理すべき画素データを一時記憶する手段
と符号化処理すべき画素データが零かどうか判定する手
段と、すくなくとも1つ以上の零でない符号化処理すべ
き画素データの数を計数する手段とその計数値を一時記
憶する手段と符号化処理すべき画素データを一時格納手
段から1次元配列に読みだす手段と計数値を比較する手
段と符号化処理すべき画素データを符号化処理する手段
を有し 符号化処理すべき画素データの一時格納手段へ
の格納時に入力画素データから前記画素データ処理手段
により符号化処理すべき画素データとその画素データが
非零である事の情報を得て、計数し その計数値を一時
記憶し 、一時格納した符号化処理すべき画素データを
1次元配列に変換して読みだす時に再びそのデータの非
零の数を計数し 、一時記憶した非零の計数値に到達し
たら、 符号化の終了処理を行うものであ、も また本発明の複合化装置Cヨ  画像データをN0M(
N、Mは自然数)のブロックに分割し そのブロックに
対して直交変換 量子化処理を行い、そのデータを1次
元配列のデータに変換し 符号化処理する装置において
、符号データを一次元配列の画素データに復号する手段
と復号された画素データを一時格納する手段とその格納
時にブロック内での非零の画素データ位置の情報を得る
手段とその非零のデータ位置の情報を一時記憶する手段
と前記画素データの一時格納手段から画素データを読み
だす手段とその読みだした画素データに対して出力制御
を施す手段を有し 復号された画素データの前記、一時
格納手段への格納時に非零の画素データの位置の情報を
得て、、一時格納し 前記、一時格納した画素データを
読みだす隊 記憶した非零の画素データの位置の情報に
より、出力する画素データを制御するものであも作  
 用 上記方法において、符号化あるいは復号化しようとする
ブロックで、ジグザグ走査の最後で連続する零の係数デ
ータを有する場合、符号化では前記ブロックの最後の連
続する零の係数データを走査せずに処理を終了する事が
可能であり、復号化においても前記ブロックの最後の連
続する零の係数データを再生せずに処理を終了する事が
できも このような作用により、符号化あるいは復号化
しようとするブロックで、 ジグザグ走査の最後で連続
する零の係数データを有する場合の符号化および復号化
処理における処理の削減を行へ 全体の処理の効率化を
図ることができも 実施例 以下に本発明の一実施例における符号化装置を示も 入力画素データに対して処理を行う画素データ処理手段
と符号化処理すべき画素データを一時記憶する手段と符
号化処理すべき画素データが零力Qどうか判定する手段
と、すくなくとも1つ以上の零でない符号化処理すべき
画素データの数を計数する手段とその計数値を一時記憶
する手段と符号化処理すべき画素データを一時格納手段
から1次元配列に読みだす手段と計数値を比較する手段
と符号化処理すべき画素データを符号化処理する手段と
から構成すも 以下、図を用いて説明すも it図に本発明の符号化処理に関する一実施例のブロッ
ク図を示も 第6図に示す符号化装置の基本ブロックに
おいて、第1図は符号・復号器66の符号化処理に相当
すも 第1図(1)は係数データの走査を変換するため
のバッファに量子化処理後のデータを格納するまでのは
 第1図(2)はそのバッファから読みだし符号化処理
するブロック図であり、 1はDCT処理後の係数デー
タあるいは量子化後の係数デー久 2は係数データの転
送制御信Jii!P、3はバッファメモリへのアドレス
発生a 4は入力された係数データを制御する入力デー
タ制@5はカラン久 6はカウンタ値を一時格納するカ
ウントレジス久 7は係数データを一旦格納するバッフ
ァ、8は非零データ検出信号9はレジスタからのカウン
タ&  10はバッファメモリへのアドレス 11はブ
ロック終了信号12は符号化処理する係数デー久 13
はカウント比較機14はカウンタ、15はデータ比較器
16はカウントレジスタ6からのカウント値17はカウ
ント一致信号18はカウンタからのカウント&  19
は非零のデータ検出信!  20バツフアからの係数デ
ー久21バッファへのアドレス22は符号像23は符号
データであも 係数データ1が入力データ制御4に入力されその係数デ
ータがDCT処理後のデータであれ(戴量子化処理を行
った結果のデータに 量子化処理後のデータであれば 
そのままのデータがバッファ7に入力され さらに そ
のデータの内DC成分の係数(ブロック内の左上の係数
データ)を除くデータに対して、そのデータが”零”か
どうか判断され その結果”零でない”とすると非零デ
ータ検出信号8をだも その信号によりブロック内の非
零の数がカウンタ5で計数されも 転送制御信号2によ
り、入力する係数データの入力タイミングを得て、アド
レス発生3ではバッファ7に与えるアドレスを制御すも
 そのアドレスは第3図(2〉、(3)の横方向あるい
は縦方向へ走査するアドレスである場合が多1.%  
1ブロック分の係数データ1が転送されると、その時点
でのカウンタ5の計数値をカウントレジスタ6に格納I
−1ブロック分のバッファ入が、終了すん バッファ7
に入力されたデータは符号器22から出力される第3図
(1)にしめしたようなジグザグ走査に対応するアドレ
スによって、データを1次元配列に変換され符号化され
も その啄 ジグザグ走査に読みだされたDC成分の係
数を除くデータはデータ比較15により、′零”である
かどうか判断され その結果は”零でない”とされたら
非零データ検出信号18を出力し その回数をカウンタ
14が計数すも 符号器22ではバッファ7からのデー
タを零のデータのランレングス値とそれに続く非零のデ
ータ値とを組み合わせてハフマン符号データを生威し 
符号データ23として出力していも そして、カウンタ
14のカウント値18とカウントレジスタ6のカウント
値16とをカウント比較13が比較し一致したら、 符
号器22ヘ力ウント一致信号17を通知すも 符号器2
2はその情報により、符号処理を停止し その時点でブ
ロック内の処理が全て終了していなけれl;UEOB符
号を付は加丸 ブロック内の処理が全て終了していれば
 そのまま終了すもこのような符号化処理にすると、 
1次元配列変換後の符号処理において、ブロック内の最
後のデータが”零”である場合、そのデータを走査する
ことなく符号化処理ができも 本発明の一実施例を第4
図において説明すると、DC成分を除く非零の係数デー
タは(X、  Y)の座標で表し 第3図3)の横方向
の走査の順に示すと、(1,0)、(5,0)、(0,
1)、(5,2)、(0,3)の合計5個であん この
AC成分の係数データのみをジグザク走査で符号化処理
を施すと、(1,0)の係数までの符号データC(0,
1)、(0,1)までの符号データC(0,2)、(0
,1)までの符号データC(6,1)、(5,0)まで
の符号データC(5,1)、(5,2)までの符号デー
タC(14,1)となり、この符号化処理の時点で非零
の係数データは5個検出されたのでEOB符号を接続し
て符号化処理を終了すも 実際にその処理の後の走査し
なかった係数データをみると全て零の値であり、得られ
た符号データは正しい事がわかん このように従来の例
と比較して、ブロック内のジグザグ走査の最後の連続す
る零のデータの処理に対して、効率がよい事がわかも 
また 本発明において(よ11U1図(1)、(2)の
カウントレジスタ6およびバッファ7を複数持板 それ
らを交互に使用する事で、1)と2)に示している処理
をパイプライン的に行う事ができ、さらに効率を向上す
る事もできる。
In addition, during decoding processing (the coded data 67 is decoded into quantized coefficient data in a Huffman decoding section 68, and then inverse quantization processing is performed in a quantization-1 section 69). The DCT-1 unit 70 performs inverse DCT processing on the data to produce surface image data.In the process of the Huffman decoding unit 68, the coefficient data is decoded along the zigzag scan and the hE○B code is detected. In addition to decoding up to that point, it is also possible to decode up to the end of the block. I Niss O/I E C C C D C/
Niss C 2/Ta 97# Squirrel C 0-8°C C I T Niss C 9-■ ("JP
EG Technical 5specificat
ion, Revision 5” ISO/I
ECTTCI/SC2/WG8. CCITT SG
(2) An example of actual encoded data is shown in FIG. In this diagram
In the figure, even if only the encoding process of the AC component is shown, 1)
indicates the scanning of data within the block.The numbers outside the block in the figure indicate the X and Y coordinate values.More 2) indicates that the encoding process is performed by zigzag scanning within the blower. Indicates the code data for the minute, C(X, Y)
is the data that encodes the combination of the number of zero runs and the coefficient value that follows, X is the number of zero runs, and Y represents the quantized coefficient data value. f, DCT processing is usually performed using matrix calculations, so as shown in Figures 3 (2) and 3 (3), there are many cases where processing is performed by scanning in the horizontal or vertical direction. A scan similar to that performed on coefficient data is often used (~ In addition, zigzag scanning during Huffman encoding processing, as shown in Figure 13 (1), is performed before Huffman encoding processing or during decoding. It is necessary to temporarily store the processed data in a buffer. An example of its configuration is shown in Figure 5. In Figure 5, 51 is the coefficient data block after quantization.
2 is a transfer control signal Ji! indicating the transfer timing of the coefficient data, etc. P% 53 is an address generator that generates an address to be given to the buffer. 54 is a buffer that temporarily stores coefficient data. 55 is an address given to the buffer 54. Address 56 is a Huffman code. Decoder 57 is an atrea given to the buffer. 58 is a buffer. The coefficient data 59 that goes back and forth between the encoder and decoder is code data.The encoding process in this block diagram will be explained below.Coefficient data 51 after quantization
is once input to the buffer 54 for scan conversion.At that time, the address generator 53 generates an address to be stored in the buffer 54 from the data input timing obtained by the transfer control signal 52, and gives it to the buffer 54.At that time, the address is Even if the data is generated in the scanning order as shown in FIG. 3 (2) or FIG. tN, one-dimensional converted data 58 is obtained from the buffer 54 and encoded to obtain coded data 59. In this encoding process, the zigzag scan in prop 2 is performed at the end of the block. It must be done up to the coefficient of 8.
However, if the block ends with zero, that continuous zero data is not converted to code data, but is composed of code data up to the coefficient data before the last continuous zero data and E○B code. It is possible to generate encoded data without scanning the last consecutive data, but with this conventional method, it is necessary to check whether the zeros continue to the end. chicken
The field color of the encoding method using Mat-, DCT The second half of the zigzag scan has a high probability of becoming zero. It ends with a run of zero. In other words, the last zero run is not encoded and the fS EOB code is connected. In many cases, the decoding process ends in the following way (Fig. The encoded data 59 is input to the encoder/decoder 56, and the decoded data 58 is inputted to the buffer 54, and the address 57 at that time is output from the encoder/decoder 56 to perform the zigzag scan shown in FIG. 3(1). If the coded data to be decoded ends with an EOB code, it is necessary to set the data in the block following the reproduced data before EOB detection to zero until the end. This is because there is a possibility that data from the previous block remains.In this kind of decoding process, the L code processing machine also scans pixels that are not reflected in the actual code data, which is an inefficient problem solved by the invention. In the conventional example described above, there is a problem that the efficiency of the encoding/decoding process is not sufficient when there is continuous zero coefficient data at the end of the block zigzag scan to be encoded or decoded. The present invention takes account of this point and aims to provide an encoding device and a decoding device with high processing efficiency for such data. Image data is N×M (N,
Divide into blocks (M is a natural number), perform orthogonal transformation and quantization processing on the blocks, and convert the data into 1
A device that converts data into a dimensional array and performs encoding processing includes a pixel data processing means for processing input pixel data, a means for temporarily storing pixel data to be encoded, and a means for temporarily storing pixel data to be encoded. means for counting at least one or more non-zero pixel data to be encoded, means for temporarily storing the counted value, and storing the pixel data to be encoded from the temporary storage means. It has a means for reading into a dimensional array, a means for comparing count values, and a means for encoding the pixel data to be encoded. The pixel data processing means obtains the pixel data to be encoded and information that the pixel data is non-zero, counts it, temporarily stores the counted value, and stores the temporarily stored pixel data to be encoded as 1. When converting to a dimensional array and reading it out, the number of non-zeros in the data is counted again, and when the temporarily stored non-zero count value is reached, the encoding is terminated. converter Cyo converts image data to N0M (
(N, M are natural numbers) blocks, orthogonal transformation and quantization are performed on the blocks, the data is converted to one-dimensional array data, and an encoding device converts the encoded data into one-dimensional array of pixels. means for decoding the decoded pixel data into data, means for temporarily storing the decoded pixel data, means for obtaining information on the position of non-zero pixel data within the block at the time of storage, and means for temporarily storing the information on the position of the non-zero data. The pixel data is read out from the pixel data temporary storage means and the read pixel data is output-controlled; A device that obtains information on the position of pixel data, temporarily stores it, and reads out the temporarily stored pixel data.
In the above method, if the block to be encoded or decoded has consecutive zero coefficient data at the end of zigzag scanning, the encoding is performed without scanning the last consecutive zero coefficient data of the block. It is possible to end the processing, and even in decoding, it is possible to end the processing without reproducing the last continuous zero coefficient data of the block. If the block has continuous zero coefficient data at the end of the zigzag scan, the processing in the encoding and decoding processes can be reduced to improve the efficiency of the overall processing. An encoding device according to an embodiment of the invention is shown, including pixel data processing means for processing input pixel data, means for temporarily storing pixel data to be encoded, and pixel data to be encoded with zero power Q. a means for counting at least one or more non-zero number of pixel data to be encoded; a means for temporarily storing the counted value; and a means for temporarily storing the pixel data to be encoded. It consists of a means for reading into an array, a means for comparing count values, and a means for encoding pixel data to be encoded. A block diagram of one embodiment is shown. In the basic block of the encoding device shown in FIG. 6, FIG. 1 corresponds to the encoding process of the encoder/decoder 66. FIG. 1 (1) shows the scanning of coefficient data. Figure 1 (2) is a block diagram for reading data from the buffer and encoding it. 1 is the coefficient data or quantum data after DCT processing. The coefficient data after conversion 2 is the coefficient data transfer control signal Jii! P, 3 is an address generation a to the buffer memory; 4 is an input data system that controls input coefficient data; 5 is a call register; 6 is a count register that temporarily stores the counter value; 7 is a buffer that temporarily stores the coefficient data; 8 is a non-zero data detection signal 9 is the counter from the register & 10 is the address to the buffer memory 11 is the block end signal 12 is the coefficient data to be encoded 13
The count comparator 14 is the counter, the data comparator 16 is the count value 17 from the count register 6, and the count match signal 18 is the count from the counter &19
is a non-zero data detection signal! Coefficient data from buffer 20 Address 22 to buffer 21 indicates code image 23 is code data, coefficient data 1 is input to input data control 4, and the coefficient data is data after DCT processing (dai quantization processing) If the data is the result of quantization processing, then
The data as it is is input to the buffer 7, and then it is determined whether or not the data is "zero" except for the DC component coefficient (coefficient data at the top left in the block), and as a result, it is determined that it is "not zero". Then, if the non-zero data detection signal 8 is used, the number of non-zeros in the block is counted by the counter 5.The input timing of the input coefficient data is obtained by the transfer control signal 2, and the buffer is In many cases, the address given to 7 is an address that scans in the horizontal or vertical direction as shown in Figure 3 (2>, (3)).
When one block of coefficient data 1 is transferred, the count value of the counter 5 at that time is stored in the count register 6.
-1 block of buffer input is completed Buffer 7
The input data is converted into a one-dimensional array and encoded by the address corresponding to the zigzag scan as shown in Fig. 3 (1) output from the encoder 22. The output data excluding the coefficient of the DC component is judged by a data comparison 15 to determine whether it is 'zero' or not. If the result is determined to be 'not zero', a non-zero data detection signal 18 is output and the counter 14 counts the number of times. The encoder 22 combines the data from the buffer 7 with the run length value of zero data and the following non-zero data value to generate Huffman encoded data.
Even if it is output as code data 23, the count comparison 13 compares the count value 18 of the counter 14 and the count value 16 of the count register 6, and if they match, it notifies the encoder 22 of the count match signal 17. 2
2 stops the code processing based on that information.If all the processing in the block has not been completed at that point, add the UEOB code.If all the processing in the block has been completed, it will end as is. If we use the encoding process,
In the encoding process after one-dimensional array conversion, if the last data in the block is "zero", the encoding process can be performed without scanning that data.
To explain this in the figure, non-zero coefficient data excluding the DC component is represented by (X, Y) coordinates. When shown in the horizontal scanning order of Figure 3), (1, 0), (5, 0) , (0,
1), (5, 2), and (0, 3). If only the coefficient data of this AC component is encoded by zigzag scanning, the encoded data up to the coefficient of (1, 0) C (0,
1), code data up to (0,1) C(0,2), (0
, 1), code data C (5, 1) up to (5, 0), code data C (14, 1) up to (5, 2), and this encoding At the time of processing, five pieces of non-zero coefficient data were detected, so we connected the EOB code and finished the encoding process, but when we actually looked at the coefficient data that was not scanned after that process, all of them had a value of zero. However, it is not clear that the obtained encoded data is correct.In this way, compared to the conventional example, it can be seen that the processing of consecutive zero data at the end of zigzag scanning within a block is more efficient.
In addition, in the present invention, by using a plurality of count registers 6 and buffers 7 in Figs. It can be done and the efficiency can be further improved.

次に本発明の一実施例における復号化装置を示す。Next, a decoding device according to an embodiment of the present invention will be described.

符号データを一次元配列の画素データに復号する手段と
復号された画素データを一時格納する手段とその格納時
にブロック内での非零の画素データ位置の情報を得る手
段とその非零のデータ位置の情報を一時記憶する手段と
前記画素データの一時格納手段から画素データを読みだ
す手段とその読みだした画素データに対して出力制御を
施す手段とから構成すも 以下、図を用いて説明すも 第2図に本発明の一実施例
のブロック図を示も 第2図(1)は復号したデータの
走査を変換するためのバッファに格納するまでのは 第
2図(2)はそのバッファから読みだし量子化処理に転
送するブロック図であり、31は符号デー久 32は復
号器33は復号された係数データの比較a  34はブ
ロック内の係数の再生位置を記憶する再生位置レジス久
 35は再生位置レジスタに情報を一時格納する係数位
置レジス久36は係数データを一時格納するバッファ、
37は復号された係数デー久 38はバッファに与える
アドレス 39はブロック内のデータ処理終了信号40
は非零デー・夕検出信号41はブロックの非零データ再
生位置デー久 42は係数データの出力の制御をする出
力データ制孤43はバッファにア・ドレスを与えるアド
レス発生訊44は各係数データに対応する非零検出デー
久 45はバッファからの係数デー久 46はアドレス
発生部からのアドレス47は出力データの出力タイミン
グ等を制御する転送制御信号48は出力される係数デー
タであも図において、31の符号データを32の復号器
で1次元配列のデータに復号され バッファ36に転送
されも その際にバッファに対して、第3図(1〉のよ
うなジグザグ走査に対応するアドレス38が復号された
データと同期して与えられも 復号された係数データの
DC威分の係数を除くデータは同時に比較器33に入力
され 零であるかどうか判断される非零であれ(L 非
零データ検出信号40を出力し 係数データ37および
非零検出信号40に同期するアドレス38を再生位置レ
ジスタ34に入力し非零データの位置を記憶すん その
fi  DC戒分の位置(ブロックの左上の位置)は常
に非零のデータ位置とすも 復号器32において、ブロ
ックの終了を検出したら、 ブロック内のデータ処理終
了信号39を出力し 再生位置レジスタ34ではブロッ
クの非零データ再生位置データ41を出力し そのデー
タを係数位置レジスタ35では一時格納すムそれと同時
に再生位置レジスタ34内の少なくともAC成分の位置
するデータをクリアすも 次にバッファ36からアドレ
ス発生部43から出力されるアドレス46により第3図
(2)あるいは(3)に示すような走査でよみだされも
 アドレス発生部43は転送制御信号47によって、出
力タイミングを得て、バッファへのアドレス46を制御
すも そのアドレス46は同時に係数位置レジスタ35
にも入力され係数データと同期して各係数データに対応
する非零検出データ44を出力すも それらのデータ(
係数データ45.非零検出データ44)を出力データ制
御42に入力し 各係数毎に非零データの時は その後
の処理が逆量子化処理でれば そのまま係数データ45
を、逆DCT処理であれば逆量子化処理を施したデータ
を出力し 非零データでなけれ番戴係数データをマスク
して零として出力すも このような処理にする事におい
て、符号データがE○B符号で終了する場合はEOB符
号検出時点でそのブロックの復号処理は終了し さらに
係数データの出力制御を施す事で、前ブロックの再生デ
ータがいかなるデータでもブロックの最後の連続する零
データは再生する事ができも 本発明の一実施例の処理を第4図の実際の符号化処理の
例で説明すも 第4図(2)の符号データを復号処理す
るとデータの走査は第4図(1)で示されているブロッ
ク内の実線で走査している部分だけであり、破線で走査
している係数データ分についてはバッファに書き込んで
いな1+〜 そのため前ブロックでその部分に書き込み
がなされていれICE、  走査されなっか分のバッフ
ァ内のデータは零であるとは限らな鶏 しかしなか板 
係数位置レジスタの内容は第4図(3〉に示されている
ように実際に走査した係数分でのしかも非零データの係
数位置を示していも 実際に外に出力されるの(よ第4
図(3)の係数位置レジスタが1”のデータである係数
データのみなので、結果として第4図(1)の破線部分
の走査の係数データは零として出力されるのであも 節
水 本発明の一実施例で(よ符号データがEOB符号で
終了する場叡 最後の連続する零の係数データ部分を走
査する事なく、正しい復号データを得る事ができるので
あん このように従来の例と比較して、ブロック内のジ
グザグ走査の最後の連続する零のデータの処理に対して
、効率がよい事がわか為 また 本発明においてG! 
 第2図(IL  (2)の係数位置レジスタ35およ
びバッファ36を複数持板 それらを交互に使用する事
態 第2図(1)と(2〉に示している処理をパイプラ
イン的に行う事かで東 さらに効率を向上する事もでき
も 発明の効果 本発明の符号化装置で:友 ブロック内の最後の少なく
とも1つ以上の連続する零の係数データを符号化処理す
る場色 その連続する零の係数データを走査する事なく
符号化処理を終了する事ができるの致 処理の効率化を
図る事ができもまた本発明の復号化処理で:↓ EOB
符号が接続する符号データを復号処理する場合、ブロッ
ク内の最後の少なくとも1つ以上の連続する零の係数デ
ータを走査する事なく復号化処理ができるの玄 処理の
効率化を図る事ができも
Means for decoding encoded data into pixel data in a one-dimensional array, means for temporarily storing the decoded pixel data, means for obtaining information on the position of non-zero pixel data within a block at the time of storage, and the position of the non-zero data. The system is comprised of means for temporarily storing information, means for reading out pixel data from the temporary storage means for pixel data, and means for performing output control on the read out pixel data. Figure 2 shows a block diagram of an embodiment of the present invention. Figure 2 (1) shows the scanning of decoded data until it is stored in a buffer for conversion. Figure 2 (2) shows the buffer. 31 is a code data register 32 is a decoder 33 that compares decoded coefficient data; 34 is a reproduction position register 35 that stores the reproduction position of a coefficient within a block; is a coefficient position register for temporarily storing information in a playback position register; 36 is a buffer for temporarily storing coefficient data;
37 is the decoded coefficient data 38 is the address given to the buffer 39 is the data processing end signal 40 in the block
A non-zero data/event detection signal 41 is a non-zero data playback position data of the block. 42 is a control for outputting coefficient data. An output data control 43 is an address generator for giving an address to the buffer. An address generator 44 is a data generator for each coefficient data. 45 is the coefficient data from the buffer. 46 is the address from the address generator. 47 is the transfer control signal that controls the output timing of the output data. The transfer control signal 48 is the coefficient data to be output. , 31 is decoded into one-dimensional array data by the decoder 32 and transferred to the buffer 36. At that time, the address 38 corresponding to the zigzag scan as shown in Fig. 3 (1) is assigned to the buffer. Even if the data is given in synchronization with the decoded data, the decoded coefficient data excluding the DC power coefficient is simultaneously input to the comparator 33, and it is determined whether it is zero or not (L non-zero data). Output the detection signal 40, input the coefficient data 37 and the address 38 synchronized with the non-zero detection signal 40 to the playback position register 34, and store the position of the non-zero data. is always a non-zero data position. When the decoder 32 detects the end of a block, it outputs a data processing end signal 39 in the block, and the reproduction position register 34 outputs non-zero data reproduction position data 41 of the block. The data is temporarily stored in the coefficient position register 35, and at the same time, the data in which at least the AC component is located in the reproduction position register 34 is cleared. (2) or (3), the address generator 43 obtains the output timing using the transfer control signal 47 and controls the address 46 to the buffer. register 35
These data (
Coefficient data 45. Non-zero detection data 44) is input to the output data control 42, and if each coefficient is non-zero data, if the subsequent processing is inverse quantization processing, the coefficient data 45 is input as is.
If it is inverse DCT processing, it will output data that has undergone inverse quantization processing, and if it is not non-zero data, it will mask the numbered coefficient data and output it as zero. ○If the block ends with a B code, the decoding process for that block ends when the EOB code is detected, and by controlling the output of coefficient data, the last continuous zero data of the block is However, the processing of one embodiment of the present invention will be explained using the example of actual encoding processing shown in FIG. 4. However, when the encoded data shown in FIG. Only the part scanned by the solid line in the block shown in (1) is written to the buffer, and the coefficient data part scanned by the broken line is not written to the buffer.1+~ Therefore, the previous block does not write to that part. If you are using ICE, the data in the buffer that has not been scanned is not necessarily zero.
As shown in Figure 4 (3), the contents of the coefficient position register indicate the coefficient position of the actually scanned coefficients and non-zero data.
Since the coefficient position register in Figure (3) is only the coefficient data with data of 1'', as a result, the coefficient data of the scan in the broken line area in Figure 4 (1) is output as zero. In this example, if the code data ends with an EOB code, correct decoded data can be obtained without scanning the last continuous zero coefficient data part. , G!
Figure 2 (IL (2)) Situation where multiple coefficient position registers 35 and buffers 36 are used alternately Is it possible to perform the processing shown in Figure 2 (1) and (2> in a pipeline manner? The efficiency can be further improved with the encoding device of the present invention: When the coefficient data of at least one or more consecutive zeros at the end of a block is encoded, the consecutive zeros are processed. The decoding process of the present invention also makes it possible to finish the encoding process without scanning the coefficient data of ↓ EOB.
When decoding code data connected by codes, it is possible to perform the decoding process without scanning the last continuous zero coefficient data in the block.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例における符号化装置のブロッ
クは 第2図は本発明の一実施例における復号化装置の
ブロック@ 第3図はブロック内データの走査例を示す
阻 第4図は実際の符号化処理例を示す飄 第5は 第
6図は従来の符号化装置および複合化装置を示すブロッ
ク図であも1・・・入力係数デー久 2・・・転送制御
倍像 3・・・アドレス発生器 4・・・人力データ制
狐 5・・・カラン久 6・・・カウントレジスタ 7
・・・バッファ、8・・・非零データ検出倍像 9・・
・カウンタt  10・・・バッファへのアドレス 1
1・・・ブロック終了信q  12・・・符号化処理す
べき係数デー久 13・・・カウント比較 14・・・
カラン久 15・・・データ比較1&16・・・カウン
トレジスタからのカウント鑑17・・・カウント−致信
Jfi!P、18・・・カウンタからのカウント鑑19
・・・非零のデータ検出信号20・・・バッファからの
係数デー久 21・・・バッファへのアドレ入22・・
・符号器23・・・符号デー久 3工・・・符号デー久
 32・・・復号法33・・・係数データ比較核34・
・・再生位置レジス久35・・・係数位置レジス久 3
6・・・バッファ、37・・・復号された係数デー久 
38・・・バッファに与えるアトレアー、39°・・ブ
ロック内のデータ処理終了信号40・・・非零データ検
出信号41・・・ブロックの非零データ再生位置デー久
 42・・・出力データ制御  43・・・アドレス発
生器44・・・非零検出デー久 45・・・バッファか
らの係数デー久 46・・・アドレス発生部からのアト
レアS47・・・転送制御信号48・・・出力される係
数データ。
Fig. 1 shows a block of an encoding device in an embodiment of the present invention; Fig. 2 shows a block of a decoding device in an embodiment of the invention; Fig. 3 shows an example of scanning data within a block; Figure 5 shows an example of actual encoding processing. Figure 6 is a block diagram showing a conventional encoding device and decoding device. 1... Input coefficient data 2... Transfer control double image 3 ...Address generator 4...Manual data control 5...Karan Hisashi 6...Count register 7
...Buffer, 8...Non-zero data detection magnification 9...
・Counter t 10...Address to buffer 1
1...Block end signal q 12...Coefficient data to be encoded 13...Count comparison 14...
Karan Hisashi 15... Data comparison 1 & 16... Count summary from the count register 17... Count - Shinshin Jfi! P, 18... Count 19 from the counter
. . . Non-zero data detection signal 20 . . . Coefficient data from the buffer 21 . . Address input to the buffer 22 . .
・Encoder 23... Code data 3 engineering... Code data 32... Decoding method 33... Coefficient data comparison kernel 34.
...Playback position Regis ku 35...Coefficient position Regis ku 3
6...Buffer, 37...Decoded coefficient data
38...Atrear given to buffer, 39°...Data processing end signal in block 40...Non-zero data detection signal 41...Non-zero data reproduction position data of block 42...Output data control 43 ...Address generator 44...Non-zero detection data 45...Coefficient data from the buffer 46...Atrea S47 from address generator 47...Transfer control signal 48...Coefficients to be output data.

Claims (6)

【特許請求の範囲】[Claims] (1)画像データをN×M(N、Mは自然数)のブロッ
クに分割し、そのブロックに対して直交変換、量子化処
理を行い、そのデータを1次元配列のデータに変換し、
符号化処理する装置において、入力画素データに対して
処理を行う画素データ処理手段と符号化処理すべき画素
データを一時記憶する手段と符号化処理すべき画素デー
タが零かどうか判定する手段と、すくなくとも1つ以上
の零でない符号化処理すべき画素データの数を計数する
手段とその計数値を一時記憶する手段と符号化処理すべ
き画素データを一時格納手段から1次元配列に読みだす
手段と計数値を比較する手段と符号化処理すべき画素デ
ータを符号化処理する手段を有し、符号化処理すべき画
素データの一時格納手段への格納時に入力画素データか
ら前記画素データ処理手段により符号化処理すべき画素
データとその画素データが非零である事の情報を得て、
計数し、その計数値を一時記憶し、一時格納した符号化
処理すべき画素データを1次元配列に変換して読みだす
時に再びそのデータの非零の数を計数し、一時記憶した
非零の計数値に到達したら、符号化の終了処理を行う事
を特徴とした符号化装置。
(1) Divide the image data into N×M blocks (N and M are natural numbers), perform orthogonal transformation and quantization processing on the blocks, and convert the data into one-dimensional array data,
In the encoding processing device, pixel data processing means for processing input pixel data, means for temporarily storing pixel data to be encoded, means for determining whether or not the pixel data to be encoded is zero; means for counting the number of at least one or more non-zero pixel data to be encoded, means for temporarily storing the counted value, and means for reading out the pixel data to be encoded from the temporary storage means into a one-dimensional array; It has a means for comparing count values and a means for encoding pixel data to be encoded, and when the pixel data to be encoded is stored in the temporary storage means, the input pixel data is encoded by the pixel data processing means. Obtain the pixel data to be processed and the information that the pixel data is non-zero,
The counted value is temporarily stored, and when the temporarily stored pixel data to be encoded is converted into a one-dimensional array and read out, the number of non-zeros in that data is counted again, and the temporarily stored non-zero number is An encoding device characterized by performing encoding termination processing when a count value is reached.
(2)画素データ処理手段において、符号化すべき画素
データが入力画素データであることを特徴とした請求項
1記載の符号化装置。
(2) The encoding device according to claim 1, wherein the pixel data to be encoded in the pixel data processing means is input pixel data.
(3)画素データ処理手段において、入力画素データに
対して、量子化の演算処理を施し、その演算結果を前記
符号化処理すべき画素データとする事を特徴とした請求
項1記載の符号化装置。
(3) The encoding according to claim 1, wherein the pixel data processing means performs a quantization operation on the input pixel data, and uses the operation result as the pixel data to be encoded. Device.
(4)画像データをN×M(N、Mは自然数)のブロッ
クに分割し、そのブロックに対して直交変換、量子化処
理を行い、そのデータを1次元配列のデータに変換し、
符号化処理する装置において、符号データを一次元配列
の画素データに復号する手段と復号された画素データを
一時格納する手段とその格納時にブロック内での非零の
画素データ位置の情報を得る手段とその非零のデータ位
置の情報を一時記憶する手段と前記画素データの一時格
納手段から画素データを読みだす手段とその読みだした
画素データに対して出力制御を施す手段を有し、復号さ
れた画素データの前記一時格納手段への格納時に非零の
画素データの位置の情報を得て、一時格納し、前記一時
格納した画素データを読みだす時、記憶した非零の画素
データの位置の情報により、出力する画素データを制御
する事を特徴とした復号化装置。
(4) Divide the image data into N×M blocks (N and M are natural numbers), perform orthogonal transformation and quantization processing on the blocks, and convert the data into one-dimensional array data,
In an encoding processing device, means for decoding encoded data into pixel data in a one-dimensional array, means for temporarily storing the decoded pixel data, and means for obtaining information on the position of non-zero pixel data within a block at the time of storing the decoded pixel data. and means for temporarily storing information on the position of the non-zero data, means for reading pixel data from the temporary storage means for pixel data, and means for applying output control to the read pixel data, and the pixel data is decoded. When the stored pixel data is stored in the temporary storage means, information on the position of the non-zero pixel data is obtained and temporarily stored, and when the temporarily stored pixel data is read out, the position of the stored non-zero pixel data is obtained. A decoding device characterized by controlling output pixel data based on information.
(5)画素データに対して出力制御を施す手段が、非零
の画素データの位置の情報により、非零であれば、その
まま出力し、そうでなければ、零として画素データを出
力する事を特徴とする請求項4記載の復号化装置。
(5) The means for controlling the output of pixel data uses the information of the position of non-zero pixel data to output the pixel data as is if it is non-zero, and to output the pixel data as zero otherwise. The decoding device according to claim 4, characterized in that:
(6)画素データに対して出力制御を施す手段が、非零
の画素データの位置の情報により、非零であれば、逆量
子化処理を施し、そうでなければ、零として画素データ
を出力する事を特徴とする請求項4記載の復号化装置。
(6) The means for applying output control to pixel data uses information on the position of non-zero pixel data, and if it is non-zero, performs inverse quantization processing, otherwise outputs pixel data as zero. 5. The decoding device according to claim 4, characterized in that:
JP2095757A 1990-04-10 1990-04-10 Coding and decoding device Pending JPH03292081A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2095757A JPH03292081A (en) 1990-04-10 1990-04-10 Coding and decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2095757A JPH03292081A (en) 1990-04-10 1990-04-10 Coding and decoding device

Publications (1)

Publication Number Publication Date
JPH03292081A true JPH03292081A (en) 1991-12-24

Family

ID=14146366

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2095757A Pending JPH03292081A (en) 1990-04-10 1990-04-10 Coding and decoding device

Country Status (1)

Country Link
JP (1) JPH03292081A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09278284A (en) * 1996-04-19 1997-10-28 Teijin Ltd Abnormality warning device for thread line automatically peeling-off device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09278284A (en) * 1996-04-19 1997-10-28 Teijin Ltd Abnormality warning device for thread line automatically peeling-off device

Similar Documents

Publication Publication Date Title
JP3108479B2 (en) Encoding / decoding method and apparatus therefor
TW398147B (en) Image information encoding/decoding apparatus assuring a minimum compressing ratio and limiting a transfer rate
JPH0622143A (en) Transmission of image signal and encoding system for enhancement of reduction efficiency of data in storage
JPH03292081A (en) Coding and decoding device
JPS6338152B2 (en)
JPH08116268A (en) Information processing unit
JPH10108011A (en) Data-processing unit
JPH05227519A (en) Encoder and decoder for picture data
JP3859325B2 (en) Image iterative transform decoding apparatus and method, and recording medium
JPH0879763A (en) Moving image coder and moving image decoder
JP2812064B2 (en) Image processing device
JPS6118387B2 (en)
JP2615215B2 (en) Image data compression method
JP3090640B2 (en) Huffman encoding device and Huffman decoding device
JPH01216674A (en) Encoding system for picture signal and its apparatus
JP2512195B2 (en) Encoding device and decoding device
JP2708253B2 (en) Image data compression method
JPH0799579A (en) Picture processing device
JP2937455B2 (en) Image data compression device and image data decompression device
JPH0311883A (en) Decoding system for variable length code, and facsimile equipment and still picture transmission system
JPH06113142A (en) Method and device for processing picture
JPH0358572A (en) Data compressing system
JP2001196935A (en) Data quantizer
JPH06350856A (en) Picture encoding device
JPH07177512A (en) Method and device for recording still picture