JPH03289789A - Encoder and decoder - Google Patents

Encoder and decoder

Info

Publication number
JPH03289789A
JPH03289789A JP2090823A JP9082390A JPH03289789A JP H03289789 A JPH03289789 A JP H03289789A JP 2090823 A JP2090823 A JP 2090823A JP 9082390 A JP9082390 A JP 9082390A JP H03289789 A JPH03289789 A JP H03289789A
Authority
JP
Japan
Prior art keywords
address
coefficient
zero
memory
stored
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.)
Granted
Application number
JP2090823A
Other languages
Japanese (ja)
Other versions
JP2512195B2 (en
Inventor
Yasuhiko Yamane
靖彦 山根
Takumi Hasebe
巧 長谷部
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 JP9082390A priority Critical patent/JP2512195B2/en
Publication of JPH03289789A publication Critical patent/JPH03289789A/en
Application granted granted Critical
Publication of JP2512195B2 publication Critical patent/JP2512195B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PURPOSE:To accelerate coding processing and decoding processing by completing readout when an address shows the one in which the last non-zero coefficient exists in a block and attaching an EOB(END OF BLOCK) code when a conversion coefficient in the block is coded. CONSTITUTION:When the conversion coefficient is written on memory 101, the coefficient in the block is written according to constant sequence, and also, it is decided whether the conversion coefficient to be written is zero or non-zero by a non-zero coefficient decision means 102, and when the conversion coefficient is the non-zero coefficient, the address is stored in a non-zero coefficient address storage means 104. When the conversion coefficient in the block is coded, the conversion coefficient in the block is read out from the memory 101 sequentially, and it is compared with the address stored in the non-zero coefficient address storage means 104 by an address comparison means 105, and the readout is completed when the address shows the one in which the last non-zero coefficient exists in the block, and the EOB(END OF BLOCK) code is added. In such a way, the coding processing and the decoding processing can be accelerated.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は画像データの符号装置及び復号装置に関し 特
に連続する零の個数と非零を符号化する可変長符号化方
式における符号化装置および復号化装置に関するもので
あム 従来の技術 静止画像の符号化方式として、画像内のデータに相関性
があることに着目して、画像データをN×N画素のブロ
ックに分割し、N×N画素からなるブロック内のデータ
に離散コサイン変m (DCT)等の直交変換を施し 
その変換係数を符号化して圧縮する方式があa 第12図に離散コサイン変換の変換係数の特徴を示す。
Detailed Description of the Invention Field of the Invention The present invention relates to an encoding device and a decoding device for image data, and in particular to an encoding device and a decoding device in a variable length encoding system that encodes the number of consecutive zeros and non-zeros. Conventional technologyAs a still image encoding method, focusing on the fact that data within an image has a correlation, the image data is divided into blocks of N x N pixels, and the image data is divided into blocks of N x N pixels. Performs orthogonal transformation such as discrete cosine transformation m (DCT) on the data in the block.
There is a method for encoding and compressing the transform coefficients. Figure 12 shows the characteristics of the transform coefficients of the discrete cosine transform.

第12図i;LN×Nの2次元のブロックの画素に対し
て、離散コサイン変換を施した場合の変換係数であし、
斜線の部分はその数値の大きな部分であム このような
変換係数を量子化 符号化するのである方丈 低周波成
分が多いブロックの変換係数j&  ブロックの左上に
数値の大きいものが集中すム そこでこの変換係数を一
次元に配列し その−次元に配列した変換係数に対して
、連続する零係数の個数と非零係数を符号化すa 以下
、符号化の処理について説明すも 第5図に8X8画素のブロックに直交変換を施した変換
係数を符号化する際にスキャンする方向を示す。符号化
方法ζ戴 第5図のようにスキャンして一次元に配列さ
せ、この−次元に配列した変換係数に対し 連続する零
係数の個数と非零係数値を符号化すも 第6図に示すよ
うな場合 つまり変換係数を一次元に配列した場合に☆
の部分の非零係数以降はブロックの最後まで零係数の場
合は ☆の部分の非零係数以降符号化は行わf、EOB
 (End  Of  Block)符号を付加すム 
第8図に 第6図のブロックを符号化した場合の符号デ
ータを示す。
Figure 12 i: Transform coefficients when discrete cosine transform is applied to pixels in a two-dimensional block of LN×N,
The shaded area is the part with large numbers. This is the method for quantizing and encoding such transform coefficients. Transform coefficients j of blocks with many low frequency components & Large numbers are concentrated in the upper left of the block. The transform coefficients are arranged in one dimension, and the number of consecutive zero coefficients and non-zero coefficients are encoded for the transform coefficients arranged in the - dimension.The encoding process will be explained below. Indicates the scanning direction when encoding the transform coefficients obtained by orthogonally transforming the block. Encoding method ζDai Scan and arrange the transform coefficients in one dimension as shown in Fig. 5, and encode the number of consecutive zero coefficients and non-zero coefficient values for the transform coefficients arranged in this − dimension as shown in Fig. 6. In a case like this, that is, when the conversion coefficients are arranged in one dimension ☆
If the coefficient is zero after the non-zero coefficient in the part of the block, coding is performed after the non-zero coefficient in the part with ☆, f, EOB.
(End Of Block) Add code
FIG. 8 shows encoded data when the blocks in FIG. 6 are encoded.

次に復号化処理である力(復号化処理は符号データから
連続する零係数の個数および非零係数値を得ム 零係数
の個数の場合はその個数分だけ係数メモリに零を書き込
み、 非零係数の場合はその非零係数値を書き込L  
EOB符号であれ(L ブロックの最後まで零係数を書
き込仏 発明が解決しようとする課題 しかしながら上記の静止画像の符号化方式において&上 1)高周波部分の変換係数は零である確率が高く、零係
数が連続すると考えられも このようにブロックの最後
が零係数である確率が高い係数を符号化する場合 ブロ
ック内の最後の非零係数以降の全ての零係数を読み出し
てからブロックの最後に付加するEOB符号を付加して
いたのでは 常に1ブロック分の係数を読み出さないと
ならないた数 処理の高速化が望めな1.%  また 
連続する零係数の個数がある個数以上のときには複数の
零ランに分割して符号化する力(ブロックの最後にその
ような零ランが発生すれば 複数の零ラン符号をEOB
符号に置き換える処理が生じるた数 処理時間がかかる
とともにハードウェア規模が犬きくなも 2)符号化処理時に係数メモリへのデータ書き込み、 
あるいはデータ読み出しを任意の走査方向で行おうとす
ると、バッファメモリ等が必要になり処理速度が遅くな
も 3)復号処理に際して、符号データ読み込み復号して係
数メモリに書き込む限 復号した係数データをすべてメ
モリに書き込んでいたので(表 処理の高速化は望めな
(〜 4)復号化処理時に係数メモリへのデータ書き込み、 
あるいはデータ読み出しを任意の走査方向で行おうとす
ると、バッファメモリ等が必要になり処理速度が遅くな
ム 本発明はかかる点に鑑へ 符号化処理と復号化処理を高
速に実現できる符号化装置および復号化装置を提供する
ことを目的にしていも 課題を解決するための手段 本発明は上記目的を達成するためへ 少なくともブロッ
ク内のデータを記憶するメモリと、変換係数が零係数か
非零係数かを判定する非零係数判定手段と、変換係数を
メモリに書き込む際にメモリの記憶すべきアドレスを発
生するアドレス発生手段と、非零係数を書き込むメモリ
のアドレスを記憶する非零係数アドレス記憶手段と非零
係数アドレス記憶手段の記憶するアドレスとメモリから
読み出すアドレスを比較するアドレス比較手段を備えた
符号化装置であム またそれに加えてアドレス発生手段で発生したアドレス
を変換するアドレス変換手段を備えた符号化装置であム また 少なくともブロック内のデータを記憶するメモリ
と、変換係数をメモリに書き込む際にメモリの記憶すべ
きアドレスを発生するアドレス発生手段と、非零係数を
書き込むメモリのアドレスを記憶する非零係数アドレス
記憶手段と非零係数アドレス記憶手段の記憶するアドレ
スとメモリから読み出すアドレスを比較するアドレス比
較手段と、係数データを出力する際に出力としてメモリ
の記憶内容か零かを選択するデータ選択手段とを備えた
復号化装置であも また それに加えて、アドレス発生手段で発生したアド
レスを変換するアドレス変換手段を備えた復号化装置で
あム 作用 本発明は上記した構成によし、変換係数の符号化に際し
てζよ メモリに書き込み時く ブロック内を一定の順
序にしたがって書き込み、 あわせてその書き込んでい
く変換係数が零であるか非零であるかを非零係数判定手
段で順次判定し その変換係数が非零係数であればその
アドレスを非零係数アドレス記憶手段に記憶して、その
ブロック内においてデータ読み出し方向で最後の非零係
数が存在するアドレスを株 ブロック内の変換係数を符
号化する際に(よ ブロック内の変換係数をメモリから
順次読み出し アドレス比較手段で非零係数アドレス記
憶手段に記憶されているアドレスと比較して、ブロック
内において最後の非零係数の存在するアドレスになれば
読み出しを終了し、EOB符号を付加すム また 変換係数をメモリに書き込む時と読み出す時とで
与えるアドレスをアドレス変換手段によって異ならせ、
任意の走査順で書き込み及び読み出しができるようにす
も また 本発明は 復号化時にEOB符号が検出されれば
 そのアドレス以降はデータをメモリに書き込ま哄 メ
モリへの書き込みを終了し そのアドレスをアドレス記
憶手段に記憶しておき、メモリから係数を読み出す際に
1表 アドレス比較手段で非零係数アドレス記憶手段の
記憶するアドレスと読み出すアドレスとを比較し 非零
係数アドレス記憶手段の記憶するアドレスに到達すれは
データ選択手段で出力を切り換えてそのアドレス以降は
零係数を読み出す。
Next, the decoding process (decoding process obtains the number of consecutive zero coefficients and non-zero coefficient values from the encoded data. If there are zero coefficients, write zeros for that number into the coefficient memory, and If it is a coefficient, write the non-zero coefficient value L
Even if it is an EOB code (writing zero coefficients until the end of the L block is a problem that the French invention attempts to solve), however, in the above still image encoding method & above 1) there is a high probability that the transform coefficients in the high frequency part are zero, Even though the zero coefficients are considered to be continuous, when encoding coefficients with a high probability that the last non-zero coefficient in the block is like this, read out all the zero coefficients after the last non-zero coefficient in the block, and then write them to the end of the block. If the EOB code was added, one block of coefficients would have to be read out at all times. 1. Processing speed could not be increased. % Also
When the number of consecutive zero coefficients exceeds a certain number, the power to divide the code into multiple zero runs (if such a zero run occurs at the end of the block, multiple zero run codes are EOB)
2) Writing data to coefficient memory during encoding process,
Alternatively, if you try to read data in an arbitrary scanning direction, you will need a buffer memory and the processing speed will be slow. (4) Writing data to coefficient memory during decoding processing,
Alternatively, if data is read in an arbitrary scanning direction, a buffer memory or the like is required, which slows down the processing speed. Means for solving problems even if the purpose is to provide a decoding device The present invention is directed to achieving the above objects.The present invention provides a memory for storing at least data in a block, and whether the transform coefficients are zero coefficients or non-zero coefficients. non-zero coefficient determination means for determining the conversion coefficient; address generation means for generating an address to be stored in the memory when writing the conversion coefficient into the memory; and non-zero coefficient address storage means for storing the memory address to write the non-zero coefficient. The encoding device is equipped with address comparison means for comparing the address stored in the non-zero coefficient address storage means and the address read from the memory, and in addition thereto, it is equipped with an address conversion means for converting the address generated by the address generation means. The encoding device also includes a memory for storing at least data in a block, an address generating means for generating an address to be stored in the memory when writing a transformation coefficient into the memory, and a memory address for writing a non-zero coefficient. a non-zero coefficient address storage means for comparing the address stored in the non-zero coefficient address storage means with an address read from the memory; and an address comparison means for comparing the address stored in the non-zero coefficient address storage means and the address read from the memory, and selecting whether the output is the content stored in the memory or zero when outputting the coefficient data. The present invention has the above-described structure. When encoding the transform coefficients, write them into the memory in a fixed order, and at the same time, use a non-zero coefficient determining means to sequentially determine whether the written transform coefficients are zero or non-zero. If the conversion coefficient is a non-zero coefficient, its address is stored in the non-zero coefficient address storage means, and the address where the last non-zero coefficient exists in the data read direction in the block is stored. During encoding, the transform coefficients in the block are sequentially read out from the memory, and the address comparison means compares them with the address stored in the non-zero coefficient address storage means to determine the address where the last non-zero coefficient exists in the block. When this happens, the readout is finished and the EOB code is added.Also, the address given when writing the conversion coefficient to the memory and when reading it are made different depending on the address conversion means.
The present invention also enables writing and reading in any scanning order.If an EOB code is detected during decoding, data from that address onwards is written to the memory.Writing to the memory is completed and that address is stored as an address. When reading the coefficients from the memory, the address comparing means compares the address stored in the non-zero coefficient address storage means with the address to be read, and the address stored in the non-zero coefficient address storage means is reached. The output is switched by the data selection means and zero coefficients are read from that address onward.

また 変換係数をメモリに書き込む時と読み出す時とで
与えるアドレスをアドレス変換手段によって異ならせ、
任意の走査順で書き込み及び読み出しができるようにな
ム 実施例 以下、図を用いて本発明の詳細な説明すも第1図へ 本
発明第1の実施例における符号化装置のブロック図を示
す。同図において101は読み込んだデータを決められ
たアドレスに記憶する係数メモリ、 102は読み込ん
だ係数データが零係数か非零係数かを検出する零係数検
出敷103は係数メモリ101に係数データを記憶すべ
きアドレスを発生するアドレス発生a 104は符号化
するブロックにおいて、一定の順序にしたがって読み出
しを行う際の最後の非零係数のアドレスを言己憶するレ
ジス久 105は係数メモリ101に記憶されている係
数データを符号化する際に係数メモリ101から読み出
しているアドレスとレジスタ104に記憶されているア
ドレスを比較するコンバレー久 106は零係数検出部
102の出力によし、その出力が非零係数であればアド
レス発生部103が指定しているアドレスをレジスタ1
04に記憶させるように制御するとともへコンパレータ
105の出力により係数データの符号化に際してEOB
符号を出力するタイミングを制御するタイミング制@f
E、107は係数メモリ101から読み出した係数デー
タを符号化する符号化部であム 以下、第1図の回路動
作を詳細に説明すも まず、係数データを読み込み、 
係数メモリ101に書き込a 係数データを書き込むア
ドレスはアドレス生成部103から与えも この場合の
アドレス発生順は第5図に示す順であるとすも これは
直交変換をほどこした後の低周波成分が多いブロックの
変換係数はブロックの左上に数値の大きいものが集中す
るからであム この時、零係数検出部102で、読み出
した係数が零係数である力\ 非零係数であるかを検出
し 非零係数であればその旨をタイミング制御部106
に知らせ、タイミング制御部106からの制御信号によ
し、アドレス生成部103のアドレスをレジスタ104
に記憶させも 一定の順番で順次係数データを係数メモ
リ101に記憶し 記憶する係数データが非零係数であ
れば そのアドレスをレジスタ104に新たに記憶すも
 したがって、 1ブロツクのデータ全てを係数メモリ
101に書き込んだ時点で、レジスタ104には係数メ
モリ101に記憶されている係数データのうち記憶すべ
き順序において最後の非零係数が存在する部分のアドレ
スが記憶されていも 例えば ブロック内の係数データ
が第6図に示すデータであれ(瓜 ブロック内の係数デ
ータを全て係数メモリに書き込んだ時点て レジスタ1
04は☆の部分のアドレスを有していも このようにブロック内の係数を全て係数メモリ101に
書き込めば 次に係数メモリ101からは係数を読み出
し 符号化部107で符号化すも符号化する際には係数
メモリ101から順次係数データを読み出し レジスタ
104に格納されているアドレス(☆の部分のアドレス
)と、アドレス生成部103のアドレスが一致すれば 
コンパレータ105からタイミング制御部106にその
旨が知らされ タイミング制御部106は係数メモリ1
01からの読み出しを終了し 符号化部107ではEO
B符号を付加し このEOB符号を付加した時点で1ブ
ロツクの符号化処理は終了すム 1ブロツクの符号化が
すめば 次のブロックの処理へとすすa 本実施例では
1ブロツクが8×8ドツトの画素より構成されているの
で縦640ドツト、横1024ドツトの画像を処理する
のに10240ブロツクを処理することになもこのよう
に本実施例によれば 符号化処理の暇そのブロック内の
最後の非零係数以降の零係数を係数メモリから読み込ま
ずに符号化できるのて読み込むデータ数を削減でき、符
号化処理の高速化が図れも 次に 第2図に本発明第2の実施例における復号化装置
のブロック図を示も 第2図において201は符号デー
タを復号する復号化拡 202は係数メモリ、 203
は係数メモリ202に対するアドレスを発生するアドレ
ス発生a 204は係数メモリ202から読み出した係
数と零とを選択しどちらか一方を係数データとして出力
するセレク久 205は復号化するブロックにおいて、
一定の順序にしたがって読み出しを行う際の最後の非零
係数のアドレスを記憶するレジス久 206は係数メモ
リ202に記憶されている係数データを復号化する際に
係数メモリ202から読み出しているアドレスとレジス
タ205に記憶されているアドレスを比較するコンバレ
ー久 207はタイミング制御部であム 以下、第2図
の回路動作を詳細に説明すも ここでζよ 第6図の係
数データを符号化した符号データを復号化する処理につ
いて説明すム ま哄 符号データを読み込み、 復号化
部201で復号すム 復号された係数データは係数メモ
リ202に書き込まれ4 係数メモリ202に与えるア
ドレスはアドレス生成部203で発生ず本 本実施例で
は 係数メモリ202には第5図に示す様に一定の順序
で係数データを書き込んでいく。定められた順序で書き
込みをしていき、第7図の☆の部分アドレスの非零係数
を記憶した後、EOB符号が検出されも この啄 タイ
ミング制御部207によりレジスタ205には☆の部分
のアドレスが記憶されも またこの時点で係数メモリ2
02ζよ 第7図に示す状態になっていも 第7図にお
いて×で表わしであるところは書き込みが行われていな
い部分で前に記録されたようなものがそのまま残った状
態 あるいは全熱データが記録されていない状態である
力(×の部分は復号処理には関係ないのて どの様な状
態であってもかまわな(〜 次に 完全に係数データを
復号するために係数メモリ202の係数を読み出す。こ
の際レジスタ205に格納されている☆の部分のアドレ
スと、アドレス生成部203が係数メモリ202に与え
るアドレスとが一致するまで係数メモリ202の係数デ
ータを順次読み出し一致すればコンパレータ206はそ
の旨をタイミング制御部207に知らせも タイミング
制御部207はセレクタ204に零係数を選択するよう
セレクト信号を与え ☆の部分のアドレス以降は零を読
み出すよう制御すム っまり☆の部分よりも後方(友 
すべて零のデータでうめられも このようにしてEOB
符号を零データに置き換えて1つのブロックの復号処理
は終わム 1ブロツクの復号が終われば次のブロックへ
の復号へと進へ同様の動作を繰り返す。
In addition, the addresses given when writing conversion coefficients to memory and when reading them are made different depending on the address conversion means,
Embodiment of the present invention in which writing and reading can be performed in an arbitrary scanning order Hereinafter, the present invention will be explained in detail with reference to the drawings.Go to FIG. 1. A block diagram of an encoding device in a first embodiment of the present invention is shown. . In the figure, 101 is a coefficient memory that stores read data at a predetermined address, and 102 is a zero coefficient detection block 103 that detects whether the read coefficient data is a zero coefficient or a non-zero coefficient, and stores the coefficient data in the coefficient memory 101. 104 is a register that stores the address of the last non-zero coefficient when reading out in a certain order in the block to be encoded; 105 is a register stored in the coefficient memory 101; A combiner 106 that compares the address read from the coefficient memory 101 and the address stored in the register 104 when encoding the coefficient data stored in the coefficient memory 104 is the output of the zero coefficient detector 102, and the output is a non-zero coefficient. If so, the address specified by the address generator 103 is stored in register 1.
04, and the output of the comparator 105 causes EOB to be stored in EOB when encoding the coefficient data.
Timing system @f that controls the timing of code output
E, 107 is an encoding unit that encodes the coefficient data read from the coefficient memory 101.The circuit operation of FIG. 1 will be explained in detail below.First, the coefficient data is read,
Write to the coefficient memory 101 The address for writing the coefficient data can be given from the address generation unit 103. In this case, the address generation order is the order shown in FIG. 5. This is the low frequency component after orthogonal transformation. This is because the conversion coefficients of blocks with many values are concentrated in the upper left corner of the block. At this time, the zero coefficient detection unit 102 detects whether the read coefficient is a zero coefficient or a non-zero coefficient. If the coefficient is non-zero, the timing control unit 106
The address of the address generation unit 103 is sent to the register 104 according to the control signal from the timing control unit 106.
If the coefficient data to be stored is a non-zero coefficient, the address is newly stored in the register 104. Therefore, all the data of one block is stored in the coefficient memory 101. 101, even if the register 104 stores the address of the part of the coefficient data stored in the coefficient memory 101 in which the last non-zero coefficient exists in the order in which it should be stored, for example, the coefficient data in the block Even if it is the data shown in Figure 6 (as soon as all the coefficient data in the block is written to the coefficient memory, register 1
Even though 04 has the address of the ☆ part, if all the coefficients in the block are written to the coefficient memory 101 in this way, then the coefficients are read out from the coefficient memory 101 and encoded by the encoding unit 107. reads the coefficient data sequentially from the coefficient memory 101. If the address stored in the register 104 (the address in the ☆ part) matches the address in the address generation unit 103, then
The comparator 105 informs the timing control unit 106 of this fact, and the timing control unit 106
After finishing reading from 01, the encoding unit 107 reads EO
When the B code is added and this EOB code is added, the encoding process for one block is completed. Once the encoding of one block is completed, the next block is processed. In this example, one block is 8x8. Since the image is composed of dot pixels, it is necessary to process 10,240 blocks to process an image of 640 dots vertically and 1024 dots horizontally.According to this embodiment, the encoding processing time is Since the zero coefficients after the last non-zero coefficient can be encoded without reading them from the coefficient memory, the number of data to be read can be reduced and the speed of the encoding process can be increased. 2 shows a block diagram of a decoding device in FIG.
is an address generator a that generates an address for the coefficient memory 202; 204 is a selector that selects the coefficient read from the coefficient memory 202 and zero; and outputs either one as coefficient data; 205 is a block to be decoded;
A register 206 stores the address of the last non-zero coefficient when reading out in a certain order. Reference numeral 206 indicates the address and register read from the coefficient memory 202 when decoding the coefficient data stored in the coefficient memory 202. 207 is a timing control unit that compares the addresses stored in 205.The circuit operation of FIG. 2 will be explained in detail below. The coded data is read and decoded by the decoding unit 201.The decoded coefficient data is written to the coefficient memory 202.The address given to the coefficient memory 202 is generated by the address generation unit 203. In this embodiment, coefficient data is written into the coefficient memory 202 in a fixed order as shown in FIG. After writing in the prescribed order and memorizing the non-zero coefficients of the partial addresses marked with ☆ in FIG. is stored, but at this point the coefficient memory 2
02ζ Even if the state shown in Figure 7 is reached, the areas marked with an x in Figure 7 are areas where no writing has been done and the previously recorded information remains as is, or the total heat data is recorded. The power that is in the state where the At this time, the coefficient data of the coefficient memory 202 is sequentially read out until the address of the ☆ part stored in the register 205 and the address given to the coefficient memory 202 by the address generation unit 203 match, and if they match, the comparator 206 indicates that The timing control unit 207 gives a select signal to the selector 204 to select a zero coefficient, and controls the addresses after the ☆ part to read zero.
Even if it is filled with all zero data, in this way EOB
The decoding process for one block is completed by replacing the code with zero data. When the decoding for one block is completed, the process proceeds to decoding the next block and repeats the same operation.

本実施例では復号化処理の限 復号するブロック内の最
後の非零係数以降の零係数を係数メモリに書き込まない
で復号化できるので、書き込むデータ数を削減でき、復
号化処理の高速化が図れ4次に本発明第3の実施例にお
ける符号化装置のブロック図を第3図に示も 同図にお
いて301は係数メモリ、302は読み込んだ係数デー
タが零係数か非零係数かを検出する零係数検出餓 30
3は係数メモリ301に対するアドレスを発生するアド
レス発生訊 304はアドレス生成部303で発生した
アドレスを異なるアドレスに変換するアドレス変換a 
305はアドレス生成部303で発生するアドレスとア
ドレス変換部304で変換したアドレスのどちらかを選
択するセレク久 306はアドレス変換部304で変換
されたアドレスを記憶するレジス久 307はレジスタ
306の記憶するアドレスとアドレス変換部304が指
定するアドレスとを比較するコンバレー久308はタイ
ミング制御部であム 以下、第3図の回路動作を詳細に
説明すム ま哄 係数データを読み込み係数メモリ30
1に書き込a 書き込むアドレスはアドレス生成部30
3から与えもこの場合のアドレス発生順は第9図の順で
あるとすも アドレス変換部304は前記アドレスを第
1O図のジグザグスキャンのアドレスに変換すも具体的
には 例えば第9図でのアドレスが8のものは第10図
に示す様にアドレスが2に変換されも この啄 零係数
検出部302で、今読み出した係数が零係数である力\
 非零係数であるかを検出し 非零係数であればその旨
をタイミング制御部308に知らせ、タイミング制御部
308からの制御信号によし、アドレス変換部304の
アドレスをレジスタ306に取り込a 続いて符号化す
るブロック内の係数データを係数メモリ301へ書き込
んでいき、非零係数があれば その非零係数のアドレス
をアドレス変換部304により変換したアドレスとレジ
スタ306に記憶されているアドレスとをコンパレータ
307で比較し レジスタ306が記憶しているアドレ
スよりアドレス変換部304の指定するアドレスの方が
大きければレジスタ306にその新しい非零係数のアド
レスを記憶すム 具体的にアドレスの変換についてさら
に詳しく説明すも ここではブロック内の係数が第9図
の場合の動作について説明すも まず、第9図のデータ
を同図に示す走査順で係数メモリ301に書き込んで行
く。これは直交変換された係数データの出力が一般には
第9図の様な形で出力されてくるからであも データの
書き込みに合わせて、第9図のアドレス7が非零係数で
あるので、 レジスタ306には変換後のアドレス28
が記憶されも 第9図に示す順で走査していくと次の非
零係数のアドレスは16であム この場合の変換後のア
ドレスは第10図の3であム 従って28〉3であるの
でレジスタ306は更新されず28のままであム この
アドレスの比較判断はコンパレータ307で行う。この
ようにして第9図に示す係数データを全て係数メモリ3
01に書き込んだ時点で、レジスタ306は28のアド
レスを有していも このようにブロック内の係数を全て
係数メモリ301に第9図に示す走査順序で書き込み、
レジスタ306には第10図のようにジグザグに走査し
た時へ ブロック内最後の非零係数のアドレスを得4 
次に係数メモリ301に記憶されているデータを符号化
するために係数メモリ301からは第1O図の走査方向
で係数データを読み出していく。この後の符号化におけ
る動作は第一の実施例の時と同様であるので省略すもこ
の実施例では符号化処理の肌 係数メモリへの書き込み
が水平方向にシリアルに行えるので、係数メモリへ係数
データを出力する前段の部分の出力形式にあわせて係数
データを取り込むことができ、バッファメモリ等が必要
なくなるので符号化処理の高速化が図れん な叙 本実施例では係数データを水平シリアルに書き込
みを行った力(別の方法 例えば垂直にシリアルに書き
込んでいくことも本実施例の構成をなんら変更すること
なく容易に実現できもまた 本実施例ではブロック内の
最後の非零係数のアドレスを判断するのに係数メモリ3
01からの読み出しの終了を判断するコンパレータ30
7を共用することにより行った力(別々のコンパレータ
で行なってもよ(を 次に本発明第4の実施例における復号化装置のブロック
図を第4図に示す。同図において401は符号データを
復号する復号化i  402は係数メモリ、403は係
数メモリ402に対するアドレスを発生するアドレス発
生ff1L  404はアドレス生成部403で発生し
たアドレスを異なるアドレスに変換するアドレス変換部
 405はアドレス生成部403で発生するアドレスと
アドレス変換部404で変換したアドレスとのどちらか
を選択するセレク久 406はアドレス変換部404で
変換されたアドレスを記憶するレジス久 407はレジ
スタ406の記憶するアドレスとアドレス変換部404
が指定するアドレスとを比較するコンバレー久 408
は係数メモリ402から読み出した係数か零かを選択す
るセレク久 409はタイミング制御部であム 以下、
第4図の回路動作を詳細に説明すも ここでζ戴 第1
0図の係数データを符号化した符号データを復号化する
処理について説明すも まず、符号データを読み込み、
 復号化部401で復号すも 復号された係数データは
係数メモリ402に書き込まれも 係数メモリ402に
与えるアドレスはアドレス生成部403で発生した第9
図の走査順のアドレスをアドレス変換部404で第10
図の走査順に変換したアドレスであム この服 係数メ
モリには第10図の順に書き込仏 そして第10図の2
8の非零係数を復号したi  EOB符号が検出されも
 レジスタ406にJ&  タイミング制御部409の
働きにより復号化すべきブロック内において書き込む順
序で最後の非零係数のアドレスを記憶するよう制御され
ているので、アドレス変換部404のアドレス28が記
憶されも この時の係数メモリ402<よ 第11図の
状態であム 第11図において×で表わしであるところ
は書き込みが行われていない部分で前に記録されたよう
なものがそのまま残った状態 あるいは全熱データが記
録されていない状態である力(×の部分は復号処理には
関係ないのて どの様な状態であってもかまわなt%。
In this embodiment, the decoding process is limited. Since the zero coefficients after the last non-zero coefficient in the block to be decoded can be decoded without writing them to the coefficient memory, the number of data to be written can be reduced and the speed of the decoding process can be increased. 4. Next, a block diagram of the encoding device according to the third embodiment of the present invention is shown in FIG. Coefficient detection starvation 30
3 is an address generator that generates an address for the coefficient memory 301; 304 is an address converter a that converts the address generated by the address generator 303 into a different address;
305 is a select register for selecting either the address generated by the address generation unit 303 or the address converted by the address conversion unit 304; 306 is a register register for storing the address converted by the address conversion unit 304; and 307 is a register stored in the register 306. A timing controller 308 compares the address with the address specified by the address converter 304.The circuit operation of FIG. 3 will be explained in detail below.Coefficient data is read into the coefficient memory 30
Write to 1 a The address to write is the address generator 30
Assuming that the address generation order in this case is as shown in FIG. 9, the address converter 304 converts the address into the zigzag scan address in FIG. 1O. Specifically, for example, in FIG. If the address of is 8, the address is converted to 2 as shown in FIG.
It detects whether it is a non-zero coefficient, and if it is a non-zero coefficient, it notifies the timing control unit 308 of that fact, and according to the control signal from the timing control unit 308, the address of the address conversion unit 304 is fetched into the register 306. The coefficient data in the block to be encoded is written to the coefficient memory 301, and if there is a non-zero coefficient, the address of the non-zero coefficient is converted by the address conversion unit 304 and the address stored in the register 306 is converted. The comparator 307 compares the address, and if the address specified by the address conversion unit 304 is larger than the address stored in the register 306, the address of the new non-zero coefficient is stored in the register 306.More details about address conversion Description: Here, we will explain the operation when the coefficients in a block are as shown in FIG. 9. First, the data in FIG. 9 is written into the coefficient memory 301 in the scanning order shown in the drawing. This is because the orthogonally transformed coefficient data is generally output in the form shown in Figure 9.In accordance with the data writing, address 7 in Figure 9 is a non-zero coefficient. The register 306 contains the address 28 after conversion.
is stored, but when scanning is performed in the order shown in Figure 9, the address of the next non-zero coefficient is 16. In this case, the address after conversion is 3 in Figure 10. Therefore, 28>3. Therefore, the register 306 is not updated and remains 28. Comparison and judgment of this address are performed by the comparator 307. In this way, all the coefficient data shown in FIG. 9 are stored in the coefficient memory 3.
Even though the register 306 has 28 addresses at the time of writing to 01, all the coefficients in the block are written to the coefficient memory 301 in the scanning order shown in FIG.
The register 306 contains the address of the last non-zero coefficient in the block when scanning in a zigzag manner as shown in Figure 10.
Next, in order to encode the data stored in the coefficient memory 301, the coefficient data is read out from the coefficient memory 301 in the scanning direction shown in FIG. 1O. The subsequent encoding operations are the same as those in the first embodiment, so they are omitted here. Coefficient data can be imported in accordance with the output format of the part before the data is output, and there is no need for a buffer memory, etc., which speeds up the encoding process.In this embodiment, the coefficient data is written horizontally serially. (Another method, for example, writing vertically and serially, can be easily realized without changing the configuration of this embodiment. In this embodiment, the address of the last non-zero coefficient in the block is Coefficient memory 3 for judgment
Comparator 30 that determines the end of reading from 01
Figure 4 shows a block diagram of a decoding device according to a fourth embodiment of the present invention. 402 is a coefficient memory, 403 is an address generator ff1L that generates an address for the coefficient memory 402, 404 is an address conversion unit that converts the address generated by the address generation unit 403 into a different address, and 405 is an address generation unit 403. A select register 406 selects between the generated address and the address converted by the address converter 404. A register 407 stores the address converted by the address converter 404. 407 refers to the address stored in the register 406 and the address converter 404.
Compare the address specified by 408
409 is a timing control section.
The circuit operation in Fig. 4 will be explained in detail.
We will explain the process of decoding the coded data obtained by coding the coefficient data in Figure 0. First, read the coded data,
The decoded coefficient data decoded by the decoding unit 401 is written to the coefficient memory 402. The address given to the coefficient memory 402 is the 9th address generated by the address generation unit 403.
The address converter 404 converts the address in the scanning order in the figure into the 10th address in the scanning order.
This is the address converted to the scanning order in the figure.The coefficient memory is written in the order shown in Figure 10, and 2 in Figure 10.
Even if an i EOB code is detected by decoding 8 non-zero coefficients, the register 406 is controlled to store the address of the last non-zero coefficient in the order of writing in the block to be decoded by the function of the J & timing control unit 409. Therefore, even if the address 28 of the address conversion unit 404 is stored, the coefficient memory 402 at this time is in the state shown in FIG. 11. In FIG. A state in which the recorded data remains as is, or a state in which the total heat data is not recorded.

次&へ 完全に係数データを復号するために係数メモリ
402の係数を読み出も この阪 第9図の走査順に係
数を読み出も ここで、レジスタ406に格納されてい
るアドレス28と、係数メモリ402に与えるアドレス
生成部403のアドレスをアドレス変換部404で変換
したアドレスと比較し レジスタ406の方が大きいけ
れば係数メモリ402の係数データを順次読み出し 小
さければコンパレータ407がその旨をタイミング制御
部409に知らせも タイミング制御部409はセレク
タ408に零係数を選択するようセレクト信号を与え 
零を読み出すよう制御すa これで1ブロツクの復号化
が完了し順次次のブロックへと復号化していく。
Next & Next Read the coefficients in the coefficient memory 402 in order to completely decode the coefficient data. Also read the coefficients in the scanning order shown in FIG. 9. Here, address 28 stored in the register 406 and the coefficient memory The address of the address generating unit 403 given to the register 402 is compared with the address converted by the address converting unit 404. If the register 406 is larger, the coefficient data of the coefficient memory 402 is sequentially read out. If it is smaller, the comparator 407 notifies the timing controller 409. Also, the timing control unit 409 gives a select signal to the selector 408 to select the zero coefficient.
Control is performed to read out zeros a. This completes the decoding of one block, and the next block is sequentially decoded.

この実施例で沫 復号化処理の肌 係数メモリからの読
み出しが水平方向に対しシリアルに行えるのて バッフ
ァメモリ等が必要なくなると共に復号化処理の高速化が
図れも またこれらの実施例では画像をN×N画素のブロックに
分割して符号化および復号化し ブロック単位での符号
(1,復号化の処理の繰り返しが非常に多く行われるの
で、その実用的効果は太き(℃発明の詳細 な説明したように本発明によれζL 連続する零の個数
と非零を符号化する可変長符号の符号化・復号化装置に
おいて、符号化及び復号化処理の限 そのブロック内の
最後の非零係数以降の零係数を書き込みあるいは読み込
みをおこなわないので、読み込み及び書き込みのデータ
数を削減でき、符号化処理の高速化が図れも また 復
号化処理の際L そのブロック内の最後の非零係数以降
の零係数を書き込まないので、書き込むデータ数を削減
でき、復号化処理の高速化が図れもさらに 係数メモリ
への書き込みの際に書き込みアドレスを制御できるので
係数メモリへの書き込みが任意の方向順序で行えるので
、バッファメモリ等が必要なくなるので符号化及び復号
化処理の高速化が図れも
In this embodiment, reading from the coefficient memory can be performed serially in the horizontal direction, eliminating the need for a buffer memory and speeding up the decoding process. Encoding and decoding are performed by dividing the blocks into blocks of ×N pixels. As described above, according to the present invention, in a variable-length code encoding/decoding device that encodes the number of consecutive zeros and non-zero, the limit of encoding and decoding processing is set after the last non-zero coefficient in the block. Since the zero coefficients of Since the coefficients are not written, the number of data to be written can be reduced and the decoding process can be made faster. Furthermore, since the write address can be controlled when writing to the coefficient memory, writing to the coefficient memory can be performed in any direction order. , it is possible to speed up the encoding and decoding process since there is no need for buffer memory, etc.

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

第1図は本発明第1の実施例の符号化装置の構成を示す
ブロック医 第2図は本発明第2の実施例の復号化装置
の構成を示すブロック医 第3図は本発明第3の実施例
の符号化装置の構成を示すブロック医 第4図は本発明
第4の実施例の復号化装置の構成を示すブロック医 第
5図は第1及び第2の実施例においてブロック内をスキ
ャンする方向を示す医 第6図は第1の実施例において
符号化すべきデータの内容を示すデータ構成に第7図は
第2の実施例における復号化すべきブロック内の係数デ
ータの内容を示すデータ構成医第8図は第1の実施例に
おける符号データの様子を示すデータ構成医 第9@ 
第10図は走査順におけるブロック内のアドレスを示す
医 第11図はブロック内の係数の様子を示す医 第1
2図はコサイン変換の変換係数の特徴を示す図であム1
01・・係数メモリ、 102・・零係数検出凰103
・・アドレス生成訊 104・・レジス久105・・コ
ンバレー久 106−−タイミング制御部 107・・
符号化糺 第1図 4!数ダータ
FIG. 1 is a block diagram showing the configuration of an encoding device according to a first embodiment of the present invention. FIG. 2 is a block diagram showing the configuration of a decoding device according to a second embodiment of the present invention. FIG. 3 is a block diagram showing the configuration of a decoding device according to a second embodiment of the present invention. FIG. 4 is a block diagram showing the configuration of the encoding device according to the fourth embodiment of the present invention. FIG. 5 is a block diagram showing the configuration of the decoding device according to the fourth embodiment of the present invention. Fig. 6 shows the data structure showing the content of the data to be encoded in the first embodiment, and Fig. 7 shows the data showing the content of the coefficient data in the block to be decoded in the second embodiment. Figure 8 is a data configuration diagram showing the state of code data in the first embodiment.
Figure 10 shows the addresses within the block in the scanning order. Figure 11 shows the coefficients within the block.
Figure 2 shows the characteristics of the transform coefficients of cosine transform.
01...Coefficient memory, 102...Zero coefficient detection screen 103
...Address generation unit 104... Regis Kyu 105... Combare Kyu 106 -- Timing control section 107...
Encoding paste Figure 1 4! number data

Claims (8)

【特許請求の範囲】[Claims] (1)画像をN×N画素(N:整数)のブロックに分割
し、前記ブロック内のデータに直交変換を施した後に量
子化を行い変換係数を得、前記変換係数に対し、零係数
の個数と非零係数値を符号化し、ブロックの最後が連続
する零係数で終われば、その連続する零係数にEOB符
号を割り当てる可変長符号化方式において、少なくとも
前記ブロック内のデータを記憶するメモリと、前記変換
係数が零係数か非零係数かを判定する非零係数判定手段
と、前記変換係数を前記メモリに書き込む際に前記メモ
リの記憶すべきアドレスを発生するアドレス発生手段と
、前記非零係数を書き込むメモリのアドレスを記憶する
非零係数アドレス記憶手段と、前記非零係数アドレス記
憶手段の記憶するアドレスと前記メモリから読み出すア
ドレスを比較するアドレス比較手段を具備し、前記変換
係数を前記メモリに書き込む際には、前記ブロック内を
一定の順序にしたがって書き込み、あわせてその書き込
んでいく前記変換係数が零であるか非零であるかを前記
非零係数判定手段で順次判定し、その変換係数が非零係
数であればそのアドレスを前記非零係数アドレス記憶手
段に記憶し、前記ブロック内の変換係数を符号化する際
には、前記ブロック内の変換係数を前記メモリから順次
読み出し、前記アドレス比較手段で前記非零係数アドレ
ス記憶手段に記憶されているアドレスと比較して、前記
ブロック内において最後の非零係数の存在するアドレス
になれば読み出しを終了し、EOB符号を付加すること
を特徴とする符号化装置。
(1) Divide the image into blocks of N×N pixels (N: an integer), perform orthogonal transformation on the data in the blocks, perform quantization to obtain transform coefficients, and calculate zero coefficients for the transform coefficients. In a variable-length encoding method that encodes the number of non-zero coefficients and assigns an EOB code to the consecutive zero coefficients if the end of the block ends with consecutive zero coefficients, at least a memory that stores the data in the block is used. , non-zero coefficient determining means for determining whether the conversion coefficient is a zero coefficient or a non-zero coefficient; address generating means for generating an address to be stored in the memory when writing the conversion coefficient to the memory; non-zero coefficient address storage means for storing an address of a memory in which a coefficient is written; and address comparison means for comparing an address stored in the non-zero coefficient address storage means with an address read from the memory; When writing into the block, the contents of the block are written in a certain order, and at the same time, the non-zero coefficient determining means sequentially determines whether the conversion coefficients to be written are zero or non-zero, and the conversion If the coefficient is a non-zero coefficient, its address is stored in the non-zero coefficient address storage means, and when encoding the transform coefficients in the block, the transform coefficients in the block are sequentially read from the memory, and the address is stored in the non-zero coefficient address storage means. The address comparing means compares the address with the address stored in the non-zero coefficient address storage means, and when the address in which the last non-zero coefficient exists in the block is reached, reading is finished and an EOB code is added. Characteristic encoding device.
(2)アドレス発生手段で発生したアドレスを変換する
アドレス変換手段を具備し、変換係数をメモリに書き込
む際には、メモリに与えるアドレスを変換係数が出力さ
れる出力形式にあわせて書き込むことを特徴とする請求
項1記載の符号化装置。
(2) It is characterized by comprising an address conversion means for converting the address generated by the address generation means, and when writing the conversion coefficient to the memory, the address given to the memory is written in accordance with the output format in which the conversion coefficient is output. The encoding device according to claim 1, wherein:
(3)アドレス比較手段は非零係数アドレス記憶手段の
記憶するアドレスとメモリから読み出すアドレスを比較
する第1アドレス比較手段と、アドレス変換手段により
変換されたアドレスと前記非零係数アドレス記憶手段の
記憶するアドレスとを比較する第2アドレス比較手段と
からなることを特徴とする請求項2記載の符号化装置。
(3) The address comparison means includes a first address comparison means that compares the address stored in the non-zero coefficient address storage means and the address read from the memory, and the address converted by the address conversion means and the storage of the non-zero coefficient address storage means. 3. The encoding device according to claim 2, further comprising a second address comparing means for comparing the first address with the second address.
(4)画像をN×N画素(N:整数)のブロックに分割
し、前記ブロック内のデータに直交変換を施した後に量
子化を行い変換係数を得、前記変換係数に対し、零係数
の個数と非零係数値を符号化し、ブロックの最後が連続
する零係数で終われば、その連続する零係数にEOB符
号を割り当てる可変長符号化方式において、少なくとも
前記ブロック内のデータを記憶するメモリと、前記変換
係数を前記メモリに書き込む際に前記メモリの記憶すべ
きアドレスを発生するアドレス発生手段と、非零係数を
書き込むアドレスを記憶する非零係数アドレス記憶手段
と、前記非零係数アドレス記憶手段の記憶するアドレス
と前記メモリから読み出すアドレスを比較するアドレス
比較手段と、係数データを出力する際に出力として前記
メモリの記憶内容か零かを選択するデータ選択手段を具
備し、復号化時に前記EOB符号を検出すればメモリへ
の書き込みを終了し、そのアドレスを前記アドレス記憶
手段に記憶しておき、前記メモリから係数を読み出す際
には、前記アドレス比較手段で前記非零係数アドレス記
憶手段の記憶するアドレスと読み出すアドレスとを比較
し、前記非零係数アドレス記憶手段の記憶するアドレス
に到達すれば、前記データ選択手段で出力を切り換えて
そのアドレス以降は零係数を読み出すことを特徴とする
復号化装置。
(4) Divide the image into blocks of N×N pixels (N: integer), perform orthogonal transformation on the data in the blocks, perform quantization to obtain transform coefficients, and calculate zero coefficients for the transform coefficients. In a variable-length encoding method that encodes the number of non-zero coefficients and assigns an EOB code to the consecutive zero coefficients if the end of the block ends with consecutive zero coefficients, at least a memory that stores the data in the block is used. , an address generation means for generating an address to be stored in the memory when writing the conversion coefficient into the memory, a non-zero coefficient address storage means for storing an address to write the non-zero coefficient, and the non-zero coefficient address storage means. an address comparison means for comparing an address stored in the EOB with an address read from the memory; and a data selection means for selecting the stored contents of the memory or zero as an output when outputting coefficient data; If a code is detected, writing to the memory is completed and the address is stored in the address storage means, and when reading a coefficient from the memory, the address comparison means compares the non-zero coefficient address stored in the storage means. The decoding method is characterized in that an address to be read is compared with an address to be read, and when an address stored in the non-zero coefficient address storage means is reached, the output is switched by the data selection means and zero coefficients are read from that address onwards. Device.
(5)アドレス発生手段で発生したアドレスを変換する
アドレス変換手段を具備し、変換係数をメモリに書き込
む際には、メモリに与えるアドレスを変換係数が出力さ
れる出力形式にあわせて書き込むことを特徴とする請求
項4記載の復号化装置。
(5) It is characterized by comprising an address conversion means for converting the address generated by the address generation means, and when writing the conversion coefficient to the memory, the address given to the memory is written in accordance with the output format in which the conversion coefficient is output. 5. The decoding device according to claim 4.
(6)アドレス比較手段は非零係数アドレス記憶手段の
記憶するアドレスとメモリから読み出すアドレスを比較
する第1アドレス比較手段と、アドレス変換手段により
変換されたアドレスと前記非零係数アドレス記憶手段の
記憶するアドレスとを比較する第2アドレス比較手段と
からなることを特徴とする請求項5記載の符号化装置。
(6) The address comparison means includes a first address comparison means that compares the address stored in the non-zero coefficient address storage means and the address read from the memory, and the address converted by the address conversion means and the storage of the non-zero coefficient address storage means. 6. The encoding device according to claim 5, further comprising a second address comparing means for comparing the second address with the second address.
(7)画像をN×N画素(N:整数)のブロックに分割
し、前記ブロック内のデータに直交変換を施した後に量
子化を行い変換係数を得、前記変換係数に対、零係数の
個数と非零係数値を符号化し、ブロックの最後が連続す
る零係数で終われば、その連続する零係数にEOB符号
を割り当てる可変長符号化方式において、少なくとも前
記ブロック内のデータを記憶するメモリと、前記変換係
数が零係数か非零係数かを判定する非零係数判定手段と
、前記変換係数を前記メモリに書き込む際に前記メモリ
の記憶すべきアドレスを発生するアドレス発生手段と、
前記非零係数を書き込むメモリのアドレスを記憶する非
零係数アドレス記憶手段と、前記非零係数アドレス記憶
手段の記憶するアドレスと前記メモリから読み出すアド
レスを比較するアドレス比較手段を具備し、前記変換係
数を前記メモリに書き込む際には、前記ブロック内を一
定の順序にしたがって書き込み、あわせてその書き込ん
でいく前記変換係数が零であるか非零であるかを前記非
零係数判定手段で順次判定し、その変換係数が非零係数
であればそのアドレスを前記非零係数アドレス記憶手段
に記憶し、前記ブロック内の変換係数を符号化する際に
は、前記ブロック内の変換係数を前記メモリから順次読
み出し、前記アドレス比較手段で前記非零係数アドレス
記憶手段に記憶されているアドレスと比較して、前記ブ
ロック内において最後の非零係数の存在するアドレスに
なれば読み出しを終了し、EOB符号を付加する符号化
方法。
(7) Divide the image into blocks of N×N pixels (N: an integer), perform orthogonal transformation on the data in the blocks, perform quantization to obtain transform coefficients, and apply zero coefficients to the transform coefficients. In a variable-length encoding method that encodes the number of non-zero coefficients and assigns an EOB code to the consecutive zero coefficients if the end of the block ends with consecutive zero coefficients, at least a memory that stores the data in the block is used. , non-zero coefficient determining means for determining whether the conversion coefficient is a zero coefficient or a non-zero coefficient; and address generation means for generating an address to be stored in the memory when writing the conversion coefficient to the memory;
non-zero coefficient address storage means for storing an address of a memory in which the non-zero coefficient is written; and address comparison means for comparing an address stored in the non-zero coefficient address storage means and an address read from the memory; When writing into the memory, the blocks are written in a certain order, and at the same time, the non-zero coefficient determining means sequentially determines whether the conversion coefficients to be written are zero or non-zero. , if the transform coefficient is a non-zero coefficient, its address is stored in the non-zero coefficient address storage means, and when encoding the transform coefficients in the block, the transform coefficients in the block are sequentially stored from the memory. Reading, the address comparison means compares the address with the address stored in the non-zero coefficient address storage means, and when the address becomes the address where the last non-zero coefficient exists in the block, the reading ends and an EOB code is added. encoding method.
(8)画像をN×N画素(N:整数)のブロックに分割
し、前記ブロック内のデータに直交変換を施した後に量
子化を行い変換係数を得、前記変換係数に対し、零係数
の個数と非零係数値を符号化し、ブロックの最後が連続
する零係数で終われば、その連続する零係数にEOB符
号を割り当てる可変長符号化方式において、少なくとも
前記ブロック内のデータを記憶するメモリと、前記変換
係数を前記メモリに書き込む際に前記メモリの記憶すべ
きアドレスを発生するアドレス発生手段と、非零係数を
書き込むアドレスを記憶する非零係数アドレス記憶手段
と、前記非零係数アドレス記憶手段の記憶するアドレス
と前記メモリから読み出すアドレスを比較するアドレス
比較手段と、係数データを出力する際に出力として前記
メモリの記憶内容か零かを選択するデータ選択手段を具
備し、復号化時に前記EOB符号を検出すればメモリへ
の書き込みを終了し、そのアドレスを前記アドレス記憶
手段に記憶しておき、前記メモリから係数を読み出す際
には、前記アドレス比較手段で前記非零係数アドレス記
憶手段の記憶するアドレスと読み出すアドレスとを比較
し、前記非零係数アドレス記憶手段の記憶するアドレス
に到達すれば、前記データ選択手段で出力を切り換えて
そのアドレス以降は零係数を読み出す復号化方法。
(8) Divide the image into blocks of N×N pixels (N: integer), perform orthogonal transformation on the data in the blocks, perform quantization to obtain transform coefficients, and calculate zero coefficients for the transform coefficients. In a variable-length encoding method that encodes the number of non-zero coefficients and assigns an EOB code to the consecutive zero coefficients if the end of the block ends with consecutive zero coefficients, at least a memory that stores the data in the block is used. , an address generation means for generating an address to be stored in the memory when writing the conversion coefficient into the memory, a non-zero coefficient address storage means for storing an address to write the non-zero coefficient, and the non-zero coefficient address storage means. an address comparison means for comparing an address stored in the EOB with an address read from the memory; and a data selection means for selecting the stored contents of the memory or zero as an output when outputting coefficient data; If a code is detected, writing to the memory is completed and the address is stored in the address storage means, and when reading a coefficient from the memory, the address comparison means compares the non-zero coefficient address stored in the storage means. The decoding method comprises comparing an address to be read with an address to be read, and when an address stored in the non-zero coefficient address storage means is reached, the output is switched by the data selection means and zero coefficients are read from that address onward.
JP9082390A 1990-04-05 1990-04-05 Encoding device and decoding device Expired - Lifetime JP2512195B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9082390A JP2512195B2 (en) 1990-04-05 1990-04-05 Encoding device and decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9082390A JP2512195B2 (en) 1990-04-05 1990-04-05 Encoding device and decoding device

Publications (2)

Publication Number Publication Date
JPH03289789A true JPH03289789A (en) 1991-12-19
JP2512195B2 JP2512195B2 (en) 1996-07-03

Family

ID=14009313

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9082390A Expired - Lifetime JP2512195B2 (en) 1990-04-05 1990-04-05 Encoding device and decoding device

Country Status (1)

Country Link
JP (1) JP2512195B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010095181A1 (en) * 2009-02-23 2010-08-26 パナソニック株式会社 Variable-length decoding device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010095181A1 (en) * 2009-02-23 2010-08-26 パナソニック株式会社 Variable-length decoding device

Also Published As

Publication number Publication date
JP2512195B2 (en) 1996-07-03

Similar Documents

Publication Publication Date Title
US7079698B2 (en) Image coding and decoding apparatus, method of image coding and decoding, and recording medium for recording program for image coding and decoding
US7218788B2 (en) Image coder/decoder, image coding/decoding method, and storage medium
US5956430A (en) Image information coding apparatus and method using code amount of a selected pixel block for changing coding parameter
JPH03289789A (en) Encoder and decoder
JPH08130652A (en) Compression and expansion system for two-dimension image data
JP3222633B2 (en) Information processing device
JPH10108011A (en) Data-processing unit
JP3624450B2 (en) Image data encoding method and image data encoding apparatus
JP3170312B2 (en) Image processing device
JP2812064B2 (en) Image processing device
JP3170313B2 (en) Image processing device
JPH10136363A (en) Compressed data decoder and compressed data decoding method
JP3394619B2 (en) Image compression system
TWI484829B (en) System and method for processing image
JP3269186B2 (en) Image coding device
JP2830639B2 (en) Predictive coding device
JPH0884260A (en) Compression system and expansion system for two-dimension image data
JP2615215B2 (en) Image data compression method
JPH03293865A (en) Decoding device
JP2937455B2 (en) Image data compression device and image data decompression device
JP2000138933A (en) Image coder
JPH0583564A (en) Image processor
JPH01108861A (en) Picture coder
JPS62172885A (en) Orthogonal transform coding method for picture data
CN117333559A (en) Image compression method, device, electronic equipment and storage medium