JP2002330435A - Encoding circuit and encoding method - Google Patents

Encoding circuit and encoding method

Info

Publication number
JP2002330435A
JP2002330435A JP2002057233A JP2002057233A JP2002330435A JP 2002330435 A JP2002330435 A JP 2002330435A JP 2002057233 A JP2002057233 A JP 2002057233A JP 2002057233 A JP2002057233 A JP 2002057233A JP 2002330435 A JP2002330435 A JP 2002330435A
Authority
JP
Japan
Prior art keywords
frequency component
quantized
frequency
encoding
data
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
JP2002057233A
Other languages
Japanese (ja)
Inventor
Taishi Tanaka
泰資 田中
Masayuki Taniyama
昌之 谷山
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 JP2002057233A priority Critical patent/JP2002330435A/en
Publication of JP2002330435A publication Critical patent/JP2002330435A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provides an encoding method and an encoding circuit, which consumes a reduced power at the variable length coding. SOLUTION: This encoding circuit includes an EOB detector 105 between a quantizer 101 and an encoder 104, for detecting the rearmost non-zero quantized coefficients in a processing target block and outputting the position of the detected end as a control signal 110. The encoder 104 performs a variable length coding process for the quantized coefficients up to the position indicated by the control signal, added an EOB code, and pauses the variable length coding process.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、映像信号や音声信
号をデジタル記録して再生するビデオテープレコーダや
ビデオディスクレコーダなどのデジタル信号記録再生装
置における符号化回路、及びその符号化方法に関し、特
に、可変長符号化を用いて伝送、蓄積を行うデジタル信
号記録再生装置における符号化回路、及びその符号化方
法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an encoding circuit in a digital signal recording / reproducing apparatus such as a video tape recorder or a video disk recorder for digitally recording and reproducing a video signal and an audio signal, and a method of encoding the same. The present invention relates to an encoding circuit in a digital signal recording / reproducing apparatus for performing transmission and accumulation using variable length encoding, and an encoding method thereof.

【0002】[0002]

【従来の技術】デジタル信号記録再生装置の小型化を図
るためには、該装置に入力されるデジタル映像信号の膨
大な情報量を圧縮し、記録する必要がある。そして、デ
ジタル映像信号を圧縮(エンコード)する方法として
は、動き補償予測や、直交変換、特に、離散コサイン変
換(Discrete Cosine Transform :DCT)、帯域分割による
方法等に加えて、量子化によるサンプリング、更に、ハ
フマン符号化のような可変長符号化(Variable Length C
oding :VLC)や、算術符号化等による方法があり、上記
デジタル信号記録再生装置は、以上のような圧縮方法に
よって圧縮されたデジタル映像信号を伝送、あるいは蓄
積するものである。
2. Description of the Related Art In order to reduce the size of a digital signal recording / reproducing apparatus, it is necessary to compress and record an enormous amount of information of a digital video signal input to the apparatus. As a method of compressing (encoding) a digital video signal, motion compensation prediction, orthogonal transform, particularly, discrete cosine transform (DCT), a method of band division, a sampling by quantization, Furthermore, Variable Length Coding such as Huffman coding (Variable Length C)
oding: VLC), arithmetic coding, and the like. The digital signal recording / reproducing apparatus transmits or accumulates a digital video signal compressed by the above-described compression method.

【0003】以下、図15、図13(a)、図13
(b)を用いて、従来の上記デジタル信号記録再生装置
における符号化回路について説明する。図15は、従来
における符号化回路の構成を示す図であり、図13
(a)は、ブロック単位のデータを横送り出力した場合
の出力順を示した図であり、図13(b)は、ブロック
単位のデータをジグザグスキャンした場合のスキャン順
を示した図である。
[0003] FIG. 15, FIG. 13 (a), FIG.
An encoding circuit in the conventional digital signal recording / reproducing apparatus will be described with reference to FIG. FIG. 15 is a diagram showing a configuration of a conventional encoding circuit.
FIG. 13A is a diagram illustrating an output order when block-wise data is output in a horizontal direction, and FIG. 13B is a diagram illustrating a scan order when zigzag scanning is performed on data in block units. .

【0004】図15に示すように、符号化回路は、DC
T501と、量子化器502と、メモリ503と、符号
化器504とからなり、まず、入力データがDCT50
1に入力されると、DCT501では入力データをDC
T処理して、後段の量子化器502にDCT係数を出力
する。そして、量子化器502ではDCT係数を量子化
し、図13(a)に示す出力順でメモリ503へ出力す
る。メモリ503は2バンク構成のシングルポートメモ
リになっており、その量子化係数が1ブロック分蓄積さ
れると自動的にトグルされ、蓄積した1ブロック分の量
子化係数を後段の符号化器504に出力すると同時に、
順次送られてくる次の1ブロック分の量子化係数を蓄積
するようになっている。
[0004] As shown in FIG.
T501, a quantizer 502, a memory 503, and an encoder 504. First, input data is DCT50.
1, the DCT 501 converts the input data to DC
After performing the T processing, the DCT coefficient is output to the quantizer 502 at the subsequent stage. Then, the quantizer 502 quantizes the DCT coefficients and outputs the quantized DCT coefficients to the memory 503 in the output order shown in FIG. The memory 503 is a single-port memory having a two-bank configuration. When the quantized coefficients for one block are accumulated, the memory 503 is automatically toggled. Output
The next one block of quantized coefficients sequentially transmitted is stored.

【0005】上記メモリ503から出力された1ブロッ
ク分の量子化係数は、符号化器504において、図13
(b)に示すようにブロック単位でジグザグにスキャン
されてデータの並べ替えが行われた後、先行するゼロの
量子化係数の個数(ラン)と、ゼロでない量子化係数の
値(レベル)とをまとめて2次元可変長符号化を行い、
また、そのブロックにおける最後尾のゼロでない量子化
係数には、そのブロックにおける有効データの最終であ
ることを示すEOB(End Of Block)符号を付加する。
なお、ここではメモリ503を、2バンク構成のシング
ルポートメモリであるとしたが、1バンク構成のデュア
ルポートメモリで構成することも可能である。
[0005] The quantized coefficient for one block output from the memory 503 is encoded by an encoder 504 as shown in FIG.
As shown in (b), after data is rearranged by zigzag scanning in block units, the number (runs) of leading zero quantized coefficients, the value (level) of nonzero quantized coefficients, and Are subjected to two-dimensional variable length coding,
Further, an EOB (End Of Block) code indicating the end of valid data in the block is added to the last non-zero quantized coefficient in the block.
Note that here, the memory 503 is a single-port memory having a two-bank configuration, but may be a dual-port memory having a one-bank configuration.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、上記従
来のデジタル信号記録再生装置が、図15のような構成
を有する場合、上記符号化器504において2次元可変
長符号化を行う際に、常にブロックの最後までジグザグ
スキャンを行わなければ、そのブロックにおける最後尾
のゼロでない量子化係数を判別することが出来ないた
め、消費電力の面で無駄が多かった。本発明は、かかる
課題に鑑みてなされたものであり、 可変長符号化を行
う際、あるいは量子化を行う際の消費電力を低減するこ
とのできる符号化方法、及びその符号化回路を提供する
ことを目的とする。
However, when the conventional digital signal recording / reproducing apparatus has a configuration as shown in FIG. 15, when the encoder 504 performs two-dimensional variable length coding, it always blocks. If the zigzag scan is not performed until the end of the block, the last non-zero quantization coefficient in the block cannot be determined, so that there is much waste in terms of power consumption. The present invention has been made in view of such a problem, and provides an encoding method capable of reducing power consumption when performing variable-length encoding or performing quantization, and an encoding circuit thereof. The purpose is to:

【0007】[0007]

【課題を解決するための手段】上記課題を解決するた
め、本発明(請求項1)にかかる符号化回路は、処理対
象ブロックのデータを周波数成分に周波数変換する周波
数変換手段と、該周波数成分を量子化する量子化手段
と、該量子化された周波数成分を所定のスキャン順で可
変長符号化する符号化手段と、を備えた符号化回路にお
いて、上記処理対象ブロックの最後尾の、0でない量子
化された周波数成分の上記所定のスキャン順での位置を
検出し、該位置を制御信号として上記符号化手段に出力
するEOB検出手段を備え、上記符号化手段は、上記制
御信号が示す上記所定のスキャン順での位置までにある
上記量子化された周波数成分に対して可変長符号化し
て、有効成分の最終位置であることを示すEOB符号を
付加し、可変長符号化処理を休止するものである。
In order to solve the above-mentioned problems, an encoding circuit according to the present invention (claim 1) comprises a frequency conversion means for converting data of a processing target block into a frequency component; , And encoding means for performing variable-length encoding of the quantized frequency components in a predetermined scanning order. EOB detection means for detecting the position of the quantized frequency component in the predetermined scan order, and outputting the position as a control signal to the encoding means, wherein the encoding means indicates the control signal indicated by the control signal. The quantized frequency component up to the position in the predetermined scan order is subjected to variable length coding, an EOB code indicating the final position of the effective component is added, and the variable length coding process is performed. It is intended to pause.

【0008】また、本発明(請求項2)にかかる符号化
回路は、請求項1に記載の符号化回路において、上記E
OB検出手段は、上記量子化手段からの上記処理対象ブ
ロック分の上記量子化された周波数成分を一時保持して
上記所定のスキャン順で出力するメモリと、上記符号化
手段との間に設けられており、上記メモリから入力され
る上記量子化された周波数成分の位置を検出するカウン
タと、上記量子化された周波数成分が0であるか否かを
比較する比較器と、上記量子化された周波数成分の値を
格納するバッファと、上記比較器の結果に基づいて、上
記0でない量子化された周波数成分の位置を保持するレ
ジスタとを備えるものである。
The encoding circuit according to the present invention (claim 2) is the encoding circuit according to claim 1, wherein
The OB detecting means is provided between the memory for temporarily storing the quantized frequency components of the processing target block from the quantizing means and outputting the quantized frequency components in the predetermined scanning order, and the encoding means. A counter for detecting the position of the quantized frequency component input from the memory; a comparator for comparing whether the quantized frequency component is 0; A buffer for storing a value of the frequency component; and a register for holding a position of the quantized frequency component other than 0 based on a result of the comparator.

【0009】また、本発明(請求項3)にかかる符号化
回路は、請求項1に記載の符号化回路において、上記E
OB検出手段は、上記量子化手段と、該量子化手段から
の上記処理対象ブロック分の上記量子化された周波数成
分を一時保持するメモリとの間に設けられており、上記
量子化手段より入力される上記量子化された周波数成分
の位置を検出するカウンタと、上記量子化された周波数
成分が0であるか否かを比較する第1の比較器と、上記
量子化された周波数成分の値を格納するバッファと、上
記カウンタの値を上記所定のスキャン順の値に変換する
変換テーブルと、上記第1の比較器の結果に基づいて、
上記0でない量子化された周波数成分の所定のスキャン
順での位置を保持するレジスタと、上記レジスタに保持
された位置が、上記処理対象ブロックの最後尾の0でな
い量子化された周波数成分の上記所定のスキャン順での
位置であるか否かを比較する第2の比較器とを備えるも
のである。
Further, the encoding circuit according to the present invention (claim 3) is the encoding circuit according to claim 1, wherein
The OB detecting means is provided between the quantizing means and a memory for temporarily storing the quantized frequency components of the block to be processed from the quantizing means. A counter for detecting the position of the quantized frequency component, a first comparator for comparing whether or not the quantized frequency component is 0, and a value of the quantized frequency component , A conversion table for converting the value of the counter into a value in the predetermined scanning order, and a result of the first comparator,
A register for holding a position of the non-zero quantized frequency component in a predetermined scan order, and a position held in the register being the last non-zero quantized frequency component of the processing target block. And a second comparator for comparing whether or not the position is in a predetermined scanning order.

【0010】また、本発明(請求項4)にかかる符号化
回路は、請求項1に記載の符号化回路において、上記E
OB検出手段は、上記周波数変換手段と上記量子化手段
との間に設けられており、上記周波数変換手段より入力
される周波数成分の位置を検出するカウンタと、上記周
波数成分と、上記量子化手段において該周波数成分を除
算する除数である量子化値とを比較する第1の比較器
と、上記カウンタの値を上記所定のスキャン順の値に変
換する変換テーブルと、上記第1の比較器の結果に基づ
いて、上記0でない量子化された周波数成分の所定のス
キャン順での位置を保持するレジスタと、上記レジスタ
に保持された位置が、上記処理対象ブロックの最後尾の
0でない量子化された周波数成分の上記所定のスキャン
順での位置であるか否かを比較する第2の比較器とを備
えるものである。
Further, the encoding circuit according to the present invention (claim 4) is the encoding circuit according to claim 1, wherein
The OB detection means is provided between the frequency conversion means and the quantization means, and detects a position of a frequency component inputted from the frequency conversion means, the frequency component, and the quantification means. A first comparator that compares a quantized value that is a divisor for dividing the frequency component, a conversion table that converts the value of the counter into a value in the predetermined scan order, Based on the result, a register that holds the position of the non-zero quantized frequency component in a predetermined scan order, and a position that is held in the register is the last non-zero quantized frequency component of the processing target block. And a second comparator for comparing whether or not the frequency components are located in the predetermined scanning order.

【0011】また、本発明(請求項5)にかかる符号化
回路は、処理対象ブロックのデータを周波数成分に周波
数変換する周波数変換手段と、該周波数成分を量子化す
る量子化手段と、該量子化された周波数成分を、所定の
スキャン順で可変長符号化する符号化手段と、を備えた
符号化回路において、上記処理対象ブロックの最後尾
の、0でない量子化された周波数成分の上記所定のスキ
ャン順での位置を検出し、該位置を制御信号として上記
量子化手段及び上記符号化手段に出力するEOB検出手
段を備え、上記量子化手段は、上記制御信号が示す上記
所定のスキャン順での位置までにある上記周波数成分に
対して量子化して、量子化処理を休止し、上記符号化手
段は、上記制御信号が示す上記所定のスキャン順での位
置にある上記量子化された周波数成分まで可変長符号化
して、有効成分の最終位置であることを示すEOB符号
を付加し、可変長符号化処理を休止するものである。
Further, the encoding circuit according to the present invention (claim 5) comprises a frequency conversion means for frequency-converting the data of the block to be processed into a frequency component; a quantization means for quantizing the frequency component; Encoding means for performing variable-length encoding of the converted frequency components in a predetermined scan order, wherein the predetermined non-zero quantized frequency component at the end of the processing target block is And EOB detection means for detecting the position in the scan order as a control signal and outputting the position as a control signal to the quantization means and the encoding means, wherein the quantization means comprises: , Quantizes the frequency component up to the position of, and suspends the quantization process. And variable-length coding to the frequency components, adding EOB code indicating the end position of the active ingredient is for pausing the variable length coding process.

【0012】また、本発明(請求項6)にかかる符号化
回路は、請求項5に記載の符号化回路において、上記E
OB検出手段は、上記周波数変換手段と上記量子化手段
との間に設けられており、上記周波数変換手段からの上
記処理対象ブロック分の上記周波数成分を一時保持して
上記所定のスキャン順で出力するメモリと、上記メモリ
より上記所定のスキャン順で入力される周波数成分の位
置を検出するカウンタと、上記周波数成分と、上記量子
化手段において該周波数成分を除算する除数である量子
化値とを比較する第1の比較器と、上記周波数成分の値
を格納するバッファと、上記第1の比較器の結果に基づ
いて、上記0でない量子化された周波数成分の所定のス
キャン順での位置を保持するレジスタと、を備えるもの
である。
Further, the encoding circuit according to the present invention (claim 6) is the encoding circuit according to claim 5, wherein
The OB detection means is provided between the frequency conversion means and the quantization means, and temporarily holds the frequency components of the processing target block from the frequency conversion means and outputs the frequency components in the predetermined scan order. Memory, a counter for detecting the position of the frequency component input from the memory in the predetermined scan order, A first comparator to be compared, a buffer for storing the value of the frequency component, and a position of the non-zero quantized frequency component in a predetermined scan order based on the result of the first comparator. Holding registers.

【0013】また、本発明(請求項7)にかかる符号化
方法は、処理対象ブロックのデータを周波数成分に周波
数変換する周波数変換ステップと、上記周波数成分を量
子化する量子化ステップと、上記量子化された周波数成
分がゼロであるか否かを判断して、上記処理対象ブロッ
クの最後尾の、0でない量子化された周波数成分の所定
のスキャン順での位置を検出するEOB検出ステップ
と、上記EOB検出ステップにおいて検出された上記周
波数成分の所定のスキャン順での位置までにある上記量
子化された周波数成分に対して可変長符号化して、有効
成分の最終位置であることを示すEOB符号を付加し、
可変長符号化処理を休止する符号化ステップとを有する
ものである。
The encoding method according to the present invention (claim 7) includes a frequency conversion step of frequency-converting data of a processing target block into a frequency component, a quantization step of quantizing the frequency component, and the quantization step. An EOB detection step of determining whether or not the quantized frequency component is zero, and detecting the position of the tail of the processing target block in a predetermined scan order of the non-zero quantized frequency component; An EOB code indicating that the quantized frequency component up to the position in the predetermined scanning order of the frequency component detected in the EOB detection step is variable-length coded to indicate the final position of the effective component. And add
And an encoding step for suspending the variable-length encoding process.

【0014】また、本発明(請求項8)にかかる符号化
方法は、処理対象ブロックのデータを周波数成分に周波
数変換する周波数変換ステップと、上記周波数成分と量
子化処理において該周波数成分を除算する除数である量
子化値とを比較して、上記処理対象ブロックの最後尾
の、0でない量子化された周波数成分の所定のスキャン
順での位置を検出するEOB検出ステップと、上記周波
数成分を量子化する量子化ステップと、上記EOB検出
ステップにおいて検出された上記周波数成分の所定のス
キャン順での位置までにある上記量子化された周波数成
分に対して可変長符号化して、有効成分の最終位置であ
ることを示すEOB符号を付加し、可変長符号化処理を
休止する符号化ステップとを有するものである。
Further, in the encoding method according to the present invention (claim 8), a frequency conversion step of frequency-converting the data of the processing target block into a frequency component, and dividing the frequency component in the quantization process with the frequency component. An EOB detection step of comparing a quantized value which is a divisor to detect the position of the last non-zero quantized frequency component in the predetermined scan order at the end of the processing target block; And a variable length encoding of the quantized frequency component up to a position in the predetermined scan order of the frequency component detected in the EOB detection step, and a final position of the effective component And an encoding step of suspending the variable length encoding process by adding an EOB code indicating that

【0015】また、本発明(請求項9)にかかる符号化
方法は、処理対象ブロックのデータを周波数成分に周波
数変換する周波数変換ステップと、上記周波数成分と、
量子化処理において該周波数成分を除算する除数である
量子化値とを比較して、上記処理対象ブロックの最後尾
の、0でない量子化された周波数成分の所定のスキャン
順での位置を検出するEOB検出ステップと、上記EO
B検出ステップにおいて検出された上記周波数成分の所
定のスキャン順での位置までにある上記周波数成分に対
して量子化して、量子化処理を休止する量子化ステップ
と、上記周波数成分の所定のスキャン順での位置までに
ある上記量子化された周波数成分に対して可変長符号化
して、有効成分の最終位置であることを示すEOB符号
を付加し、可変長符号化処理を休止する符号化ステップ
とを有するものである。
The encoding method according to the present invention (claim 9) includes a frequency conversion step of frequency-converting the data of the processing target block into a frequency component;
In the quantization process, the position of the last non-zero quantized frequency component in the predetermined scan order is detected by comparing with a quantized value which is a divisor for dividing the frequency component. An EOB detection step;
A quantization step of quantizing the frequency components up to a position in the predetermined scan order of the frequency components detected in the B detection step, and suspending the quantization process; and a predetermined scan order of the frequency components. An encoding step of performing variable-length encoding on the quantized frequency component up to the position of, adding an EOB code indicating the final position of the effective component, and suspending the variable-length encoding process; It has.

【0016】また、本発明(請求項10)にかかる符号
化プログラムは、コンピュータに、処理対象ブロックの
データを周波数変換して量子化し、該量子化された周波
数成分を所定のスキャン順で可変長符号化する処理を実
行させるための符号化プログラムであって、処理対象ブ
ロックのデータを周波数成分に周波数変換する周波数変
換ステップと、上記周波数成分を量子化する量子化ステ
ップと、上記量子化された周波数成分がゼロであるか否
かを判断して、上記処理対象ブロックの最後尾の、0で
ない量子化された周波数成分の上記所定のスキャン順で
の位置を検出するEOB検出ステップと、上記EOB検
出ステップにおいて検出された上記周波数成分の所定の
スキャン順での位置までにある上記量子化された周波数
成分に対して可変長符号化して、有効成分の最終位置で
あることを示すEOB符号を付加し、可変長符号化処理
を休止する符号化ステップとを含むものである。
The encoding program according to the present invention (Claim 10) allows a computer to frequency-convert and quantize data of a block to be processed and to convert the quantized frequency components into variable length data in a predetermined scanning order. An encoding program for executing a process of encoding, wherein a frequency conversion step of frequency-converting the data of the processing target block into a frequency component, a quantization step of quantizing the frequency component, and An EOB detection step of determining whether or not the frequency component is zero, and detecting a position of the last non-zero quantized frequency component in the predetermined scan order at the end of the processing target block; Variable for the quantized frequency component up to a position in the predetermined scan order of the frequency component detected in the detection step By encoding adds EOB code indicating the end position of the active ingredient, it is intended to include a coding step of pausing the variable length coding process.

【0017】また、本発明(請求項11)にかかる符号
化プログラムは、コンピュータに、処理対象ブロックの
データを周波数変換して量子化し、該量子化された周波
数成分を所定のスキャン順で可変長符号化する処理を実
行させるための符号化プログラムであって、処理対象ブ
ロックのデータを周波数成分に周波数変換する周波数変
換ステップと、上記周波数成分と、量子化処理において
該周波数成分を除算する除数である量子化値とを比較し
て、上記処理対象ブロックの最後尾の、0でない量子化
された周波数成分の上記所定のスキャン順での位置を検
出するEOB検出ステップと、上記周波数成分を量子化
する量子化ステップと、上記EOB検出ステップにおい
て検出された上記周波数成分の所定のスキャン順での位
置までにある上記量子化された周波数成分に対して可変
長符号化して、有効成分の最終位置であることを示すE
OB符号を付加し、可変長符号化処理を休止する符号化
ステップとを含むものである。
The encoding program according to the present invention (claim 11) allows a computer to frequency-convert and quantize data of a processing target block and to convert the quantized frequency components into variable-length data in a predetermined scanning order. An encoding program for executing an encoding process, comprising: a frequency conversion step of frequency-converting data of a processing target block into a frequency component; and a divisor for dividing the frequency component in the quantization process. An EOB detecting step of comparing a non-zero quantized frequency component at the end of the block to be processed in the predetermined scan order by comparing the quantized value with a certain quantized value; And a quantization step, wherein the frequency component detected in the EOB detection step is located up to a position in a predetermined scanning order. And variable length coding with respect to Coca frequency component, E indicating the end position of the active ingredient
A coding step of adding an OB code and suspending the variable-length coding process.

【0018】また、本発明(請求項12)にかかる符号
化プログラムは、コンピュータに、処理対象ブロックの
データを周波数変換して量子化し、該量子化された周波
数成分を所定のスキャン順で可変長符号化する処理を実
行させるための符号化プログラムであって、処理対象ブ
ロックのデータを周波数成分に周波数変換する周波数変
換ステップと、上記周波数成分と量子化処理において該
周波数成分を除算する除数である量子化値とを比較し
て、上記処理対象ブロックの最後尾の、0でない量子化
された周波数成分の上記所定のスキャン順での位置を検
出するEOB検出ステップと、上記EOB検出ステップ
において検出された上記周波数成分の所定のスキャン順
での位置までにある上記周波数成分に対して量子化し
て、量子化処理を休止する量子化ステップと、上記周波
数成分の所定のスキャン順での位置までにある上記量子
化された周波数成分に対して可変長符号化して、有効成
分の最終位置であることを示すEOB符号を付加し、可
変長符号化処理を休止する符号化ステップとを含むもの
である。
The encoding program according to the present invention (claim 12) allows a computer to perform frequency conversion and quantization on data of a block to be processed and to convert the quantized frequency components into variable length data in a predetermined scanning order. An encoding program for executing an encoding process, a frequency conversion step of frequency-converting data of a processing target block into a frequency component, and a divisor for dividing the frequency component and the frequency component in the quantization process. An EOB detecting step of comparing the quantized value with the quantized value to detect a position of the last non-zero quantized frequency component in the predetermined scan order, and an EOB detecting step. The frequency components up to the position of the frequency component in the predetermined scanning order are quantized, and the quantization process is paused. And a variable length encoding of the quantized frequency component up to a position in the predetermined scanning order of the frequency component, and adding an EOB code indicating the final position of the effective component. And an encoding step for pausing the variable length encoding process.

【0019】[0019]

【発明の実施の形態】本発明の実施の形態について図面
を参照しながら説明する。 (実施の形態1)以下、図を用いて、本実施の形態1に
おける符号化回路について説明する。図1は、本発明の
実施の形態1における、符号化回路の構成を示す図であ
り、図2は、図1中のEOB検出器の詳細な構成を示す
図である。
Embodiments of the present invention will be described with reference to the drawings. (Embodiment 1) An encoding circuit according to Embodiment 1 will be described below with reference to the drawings. FIG. 1 is a diagram illustrating a configuration of an encoding circuit according to Embodiment 1 of the present invention, and FIG. 2 is a diagram illustrating a detailed configuration of an EOB detector in FIG.

【0020】図1に示すように、本実施の形態1におけ
る符号化回路は、データに対してDCT処理を行うDC
T101と、該DCT101からのデータを量子化する
量子化器102と、該量子化器102からのデータを一
時保持してジグザグ順で出力するメモリ103と、処理
対象ブロックにおける最後尾のゼロでない値の位置を検
出して制御信号110として出力するEOB検出器10
5と、可変長符号化を行う符号化器104と、からなる
ものである。
As shown in FIG. 1, the encoding circuit according to the first embodiment performs a DCT process on data.
T101, a quantizer 102 for quantizing data from the DCT 101, a memory 103 for temporarily holding data from the quantizer 102 and outputting the data in a zigzag order, and a last non-zero value in the processing target block EOB detector 10 which detects the position of and outputs it as control signal 110
5 and an encoder 104 for performing variable-length encoding.

【0021】そして、本実施の形態1におけるEOB検
出器105は、図2に示すように、入力されるデータが
0か否かを比較する比較器1051と、入力されるデー
タが先頭から何個目のデータであるかをカウントするカ
ウンタ1052と、上記比較器1051における結果に
よりレジスタ1055に保持する値を選択するセレクタ
1053と、上記メモリ103から入力されるデータを
1ブロック分格納するN段シフトレジスタ1054と、
を備えるものである。
As shown in FIG. 2, the EOB detector 105 according to the first embodiment includes a comparator 1051 for comparing whether input data is 0 or not, and a number of input data from the beginning. A counter 1052 for counting whether the data is eye data, a selector 1053 for selecting a value to be held in the register 1055 based on a result of the comparator 1051, and an N-stage shift for storing data input from the memory 103 for one block. A register 1054;
It is provided with.

【0022】次に、図3、図13(a)、図13
(b)、及び図14を用いて、本実施の形態1における
符号化回路の動作について説明する。図3は、本実施の
形態1における符号化回路の一連の動作を示すフローチ
ャート図であり、図13(a)は、1ブロックのデータ
を横送り順に出力する場合の例を示す図であり、図13
(b)は、1ブロックのデータをジグザグ順にスキャン
する場合の例を示す図である。なお、ここで符号化回路
に入力されるデータは、1ブロックがNケの画素データ
からなるデジタル映像信号であるものとする。
Next, FIGS. 3, 13 (a) and 13
The operation of the encoding circuit according to the first embodiment will be described with reference to (b) and FIG. FIG. 3 is a flowchart showing a series of operations of the encoding circuit according to the first embodiment. FIG. FIG.
FIG. 2B is a diagram illustrating an example of a case where data of one block is scanned in a zigzag order. Here, the data input to the encoding circuit is a digital video signal in which one block is composed of N pixel data.

【0023】まず、符号化回路に入力されたデータは、
DCT101においてDCT係数に変換される(ステッ
プs11)。そして、図13(a)の矢印が示す横送り
順でDCT101から出力されたDCT係数は、量子化
器102において量子化された(図1中のA)後(ステ
ップs12)、メモリ103へ蓄積される(ステップs
13)。
First, the data input to the encoding circuit is:
DCT 101 converts the data into DCT coefficients (step s11). Then, the DCT coefficients output from the DCT 101 in the horizontal feed order indicated by the arrow in FIG. 13A are quantized in the quantizer 102 (A in FIG. (Step s
13).

【0024】このメモリ103は、2バンク構成のシン
グルポートメモリであり、量子化器102において量子
化された量子化係数を1ブロック分蓄積するとバンク切
り替えを行い、順次入力される次ブロックのデータの量
子化係数を切り替えたバンクに蓄積していく。そして、
それと同時に、メモリ103に蓄積されている1ブロッ
ク分の量子化係数を、図13(b)の矢印で示すジグザ
グ順で読みだし(図1中のB)、EOB検出器105に
入力する。このメモリ103におけるデータの書きこ
み、読み出しの状態は、図14に示す。
This memory 103 is a single-port memory having a two-bank configuration. When one block of the quantized coefficient quantized by the quantizer 102 is accumulated, the memory is switched, and the data of the next block data sequentially input is stored. The quantization coefficients are stored in the switched bank. And
At the same time, the quantization coefficients for one block stored in the memory 103 are read in a zigzag order indicated by an arrow in FIG. The state of writing and reading of data in the memory 103 is shown in FIG.

【0025】EOB検出器105では、まずメモリ10
3から読み出されたデータが、カウンタ1052、比較
器1051、及びN段シフトレジスタ1054に出力さ
れる。そして、カウンタ1052においては、上記読み
出されたデータが処理対象であるブロックの先頭から何
番目のデータであるかをカウントし、比較器1051に
おいては、メモリ103から1画素ずつ読み出されるデ
ータの値がゼロであるか否かを比較して(ステップs1
4)、その結果をセレクタ1053に出力し、上記N段
シフトレジスタ1054ではその読み出されたデータを
保持する。
In the EOB detector 105, first, the memory 10
3 is output to the counter 1052, the comparator 1051, and the N-stage shift register 1054. Then, the counter 1052 counts the number of the read data from the top of the block to be processed, and the comparator 1051 counts the value of the data read from the memory 103 one pixel at a time. Is compared with zero (step s1).
4) The result is output to the selector 1053, and the N-stage shift register 1054 holds the read data.

【0026】ここで、上記比較器1051において上記
読み出したデータがゼロである場合(比較器1051よ
り“0”が出力された場合)は、セレクタ1053にお
いてレジスタ1055に保持されている値を選択し、一
方、上記比較器1051において上記読み出したデータ
がゼロでない場合(比較器1051より“1”が出力さ
れた場合)は、セレクタ1053においてその時のカウ
ンタ1052の値を選択し、レジスタ1055に保持す
る(ステップs15)。
Here, when the read data is zero in the comparator 1051 (when “0” is output from the comparator 1051), the selector 1053 selects the value held in the register 1055. On the other hand, when the read data is not zero in the comparator 1051 (when “1” is output from the comparator 1051), the selector 1053 selects the value of the counter 1052 at that time and holds the value in the register 1055. (Step s15).

【0027】つまり、本実施の形態1においては、メモ
リ103から量子化係数がジグザグ順で読み出されてE
OB検出器105に入力されるため、カウンタ1052
の値をレジスタ1055に入力すれば、該カウンタ10
52の値がその読み出されたデータのブロックの先頭か
らのジグザグ順を示すこととなり、これにより、ジグザ
グ順にスキャンして可変長符号化する符号化器104に
対して、ブロックの最後尾のゼロでない量子化係数の位
置を示すことができる。
That is, in the first embodiment, the quantization coefficients are read from the memory 103 in a zigzag order and
Since it is input to the OB detector 105, the counter 1052
Is input to the register 1055, the counter 10
The value of 52 indicates the zigzag order from the beginning of the block of the read data, whereby the encoder 104 that scans in the zigzag order and performs variable-length encoding on the zigzag order has the zero at the end of the block. Can be indicated.

【0028】そして、その読み出したデータが処理対象
であるブロックの最終データかどうかを、ここでは1ブ
ロックがNケの画素データからなるものとしているた
め、上記カウンタ1052の値がNであるか否かで判断
し(ステップs16)、最終データでない場合(カウン
タ1052の値≠Nの場合)は、再度ステップs14に
戻って上述した動作を繰り返し、その読み出したデータ
がブロックの最終データである場合(カウンタ1052
の値=Nの場合)は、そのときレジスタ1055に保持
されている値を制御信号110として符号化器104に
出力する(ステップs17)。そして同時に、上記N段
シフトレジスタ1054に保持しておいた1ブロック分
の量子化係数を符号化器104に出力する(ステップs
17)。また同時に、カウンタ1052の値、及びレジ
スタ1055の値を1にし、初期化する。
Whether the read data is the last data of the block to be processed is determined here because one block is composed of N pieces of pixel data. (Step s16), and when the data is not the last data (when the value of the counter 1052 is ≠ N), the process returns to Step s14 again to repeat the above-described operation, and when the read data is the last data of the block ( Counter 1052
, The value held in the register 1055 at that time is output to the encoder 104 as the control signal 110 (step s17). At the same time, the one-block quantized coefficients held in the N-stage shift register 1054 are output to the encoder 104 (step s).
17). At the same time, the value of the counter 1052 and the value of the register 1055 are set to 1 and initialized.

【0029】符号化器104では、上記EOB検出器1
05から出力された1ブロック分の量子化係数を可変長
符号化する。その際、EOB検出器105から出力され
た制御信号110より、そのブロックにおける最後尾の
ゼロでない量子化係数の位置を検知し、その検知した位
置の量子化係数まで可変長符号化処理を行って、その最
後尾のゼロでない量子化係数の可変長符号化処理後にE
OB(End Of Block)符号を付加し、上記EOB検出器
105から次ブロックのデータが入力されるまで、符号
化器104の動作を休止させるようにする(ステップs
18)。このようにすれば、符号化器104は1ブロッ
クのすべてのデータに対して可変長符号化を行う必要が
なくなり、符号化回路の消費電力を低減することができ
る。
In the encoder 104, the EOB detector 1 is used.
The variable length coding is performed on the quantized coefficients for one block output from the block 05. At this time, the position of the last non-zero quantized coefficient in the block is detected from the control signal 110 output from the EOB detector 105, and the variable-length encoding process is performed up to the quantized coefficient at the detected position. , After variable-length encoding of the last non-zero quantized coefficient,
An OB (End Of Block) code is added, and the operation of the encoder 104 is stopped until data of the next block is input from the EOB detector 105 (step s).
18). This eliminates the need for the encoder 104 to perform variable-length encoding on all data in one block, thereby reducing power consumption of the encoding circuit.

【0030】以上のように、本実施の形態1によれば、
メモリと103と、符号化器104との間にEOB検出
器105を備え、該EOB検出器105において、処理
対象であるブロックにおける最後尾のゼロでない量子化
係数を検出し、その最後尾のゼロでない量子化係数が、
ブロックの先頭からジグザグ順で何個目のデータである
かを示す値を、制御信号110として符号化器104に
出力するようにし、上記符号化器104においては、上
記制御信号110より上記最後尾のゼロでない量子化係
数の位置を検知すると、その検知した位置までの量子化
係数に対して可変長符号化を行い、上記最後尾のゼロで
ない量子化係数にEOB符号を付加し、次ブロックの量
子化されたデータが上記EOB検出器105から入力さ
れるまで、その動作を休止するようにしたので、符号化
器104における可変長符号化を行う際の消費電力を削
減することができ、その結果、符号化回路において、画
質に悪影響を与えることなく消費電力の削減を図ること
ができる。
As described above, according to the first embodiment,
An EOB detector 105 is provided between the memory, 103, and the encoder 104. The EOB detector 105 detects the last non-zero quantized coefficient in the block to be processed, and detects the last zero. Is not a quantized coefficient,
A value indicating the number of data in the zigzag order from the head of the block is output to the encoder 104 as a control signal 110, and the encoder 104 outputs the last data from the control signal 110 based on the control signal 110. When the position of the non-zero quantized coefficient is detected, variable-length coding is performed on the quantized coefficient up to the detected position, an EOB code is added to the last non-zero quantized coefficient, and Since the operation is suspended until the quantized data is input from the EOB detector 105, it is possible to reduce power consumption when performing variable-length encoding in the encoder 104. As a result, power consumption can be reduced in the encoding circuit without adversely affecting image quality.

【0031】なお、本実施の形態1においては、メモリ
103が2バンク構成のシングルポートメモリであると
したが、メモリ103は、1バンク構成のデュアルポー
トメモリであっても、同様の効果が得られる。さらに、
本実施の形態1では、本符号化回路に入力されるデータ
を周波数変換する方法としてDCT処理を例に挙げて説
明したが、これに限るものではなく、符号化回路に入力
されたデータに対して周波数変換を行う方法であればな
んでもよい。また、本実施の形態1では、DCT処理後
のデータを量子化する際のスキャン順としてジグザグ順
に行うものを例に挙げて説明したが、どのようなスキャ
ン順であってもよく、本符号化回路に入力されるデータ
の特性に応じたスキャン順を選択すれば良い。
Although the memory 103 is a single-port memory having a two-bank configuration in the first embodiment, the same effect can be obtained even if the memory 103 is a dual-port memory having a one-bank configuration. Can be further,
In the first embodiment, DCT processing has been described as an example of a method of frequency-converting data input to the encoding circuit. However, the present invention is not limited to this. Any method may be used as long as it performs frequency conversion. Further, in the first embodiment, an example is described in which the scan order when quantizing data after DCT processing is performed in a zigzag order, but any scan order may be used. What is necessary is just to select the scan order according to the characteristics of the data input to the circuit.

【0032】(実施の形態2)以下、図を用いて、本実
施の形態2における符号化回路について説明する。上記
実施の形態1においては、EOB検出器105がメモリ
103と符号化器104との間に設けられた場合につい
て説明したが、本実施の形態2では、上記EOB検出器
が量子化器とメモリとの間に設けられた場合について説
明する。
(Embodiment 2) An encoding circuit according to Embodiment 2 will be described below with reference to the drawings. In the first embodiment, the case where the EOB detector 105 is provided between the memory 103 and the encoder 104 has been described. In the second embodiment, the EOB detector is a quantizer and a memory. A description will be given of the case provided between.

【0033】まず、図4及び図5を用いて、本実施の形
態2における符号化回路の構成について説明する。図4
は、本発明の実施の形態2における符号化回路の構成を
示す図であり、図5は、図4中のEOB検出器の詳細な
構成を示す図である。図4に示すように、本実施の形態
2における符号化回路は、入力されたデータに対してD
CT処理を行うDCT201と、該DCT201からの
データを量子化する量子化器202と、処理対象ブロッ
クにおける最後尾のゼロでない値の位置を検出して制御
信号220として出力するEOB検出器205と、上記
量子化器202からのデータを一時保持しジグザグ順で
出力するメモリ203と、可変長符号化を行う符号化器
204と、からなるものである。
First, the configuration of the encoding circuit according to the second embodiment will be described with reference to FIGS. FIG.
5 is a diagram illustrating a configuration of an encoding circuit according to Embodiment 2 of the present invention, and FIG. 5 is a diagram illustrating a detailed configuration of an EOB detector in FIG. As shown in FIG. 4, the encoding circuit according to the second embodiment performs
A DCT 201 for performing a CT process, a quantizer 202 for quantizing data from the DCT 201, an EOB detector 205 for detecting the position of the last non-zero value in the processing target block and outputting the detected position as a control signal 220; It comprises a memory 203 for temporarily storing data from the quantizer 202 and outputting the data in a zigzag order, and an encoder 204 for performing variable length coding.

【0034】そして、本実施の形態2におけるEOB検
出器205は、図5に示すように、入力されるデータが
0であるか否かを比較する第1の比較器2051と、入
力されるデータが処理対象ブロックの先頭からの何個目
のデータであるかをカウントするカウンタ2052と、
横送り出力されたデータの先頭データから読み出し順番
を先頭データからのジグザグ順で読み出された場合の順
番に変換するデータ処理順−ジグザグ順変換テーブル2
056と、入力された値のうち大きい値を選択する第2
の比較器2054と、上記第1の比較器2051におけ
る結果によりレジスタ2055に保持する値を選択する
セレクタ2053と、を備えるものである。
Then, as shown in FIG. 5, the EOB detector 205 according to the second embodiment includes a first comparator 2051 for comparing whether input data is 0 or not, and an input data A counter 2052 for counting the number of data from the beginning of the block to be processed,
A data processing order-zigzag order conversion table 2 for converting the read order from the first data of the horizontally fed output data to the order when read in the zigzag order from the first data
056 and a second value for selecting a larger value from the input values.
And a selector 2053 for selecting a value to be held in the register 2055 based on the result of the first comparator 2051.

【0035】次に、図6、及び図13(c)を用いて、
本実施の形態2における符号化回路の動作について説明
する。図6は、本実施の形態2における符号化回路の一
連の動作を示すフローチャート図であり、図13(c)
は、データ処理順と、それに対応するジグザグ順,DC
T係数,及びその際レジスタに保持されている値を示す
表である。
Next, referring to FIG. 6 and FIG.
The operation of the encoding circuit according to the second embodiment will be described. FIG. 6 is a flowchart showing a series of operations of the encoding circuit according to the second embodiment, and FIG.
Is the data processing order and the corresponding zigzag order, DC
9 is a table showing T coefficients and values held in registers at that time.

【0036】なお、ここで符号化回路に入力されるデー
タは、1ブロックがNケの画素からなるデジタル映像信
号であるものとし、データ処理順−ジグザグ順変換テー
ブル2056は、例えば図13(c)の上2段に示され
るようなもので、例えば、横送り出力では先頭から3個
目のデータを、ジグザグ順では先頭から6個目のデータ
であるというように先頭からのデータ順番を変換するも
のである。
Here, the data input to the encoding circuit is a digital video signal in which one block is composed of N pixels, and the data processing order-zigzag order conversion table 2056 is, for example, as shown in FIG. ) In the upper two rows. For example, the data order from the head is converted such that the third data from the head is the data in the horizontal feed and the sixth data from the head in the zigzag order. Is what you do.

【0037】まず、上記符号化回路に入力されたデータ
は、DCT201においてDCT係数に変換される(ス
テップs21)。そして、図13(a)の矢印が示す横
送りの出力順でDCT201より出力されたDCT係数
は、量子化器202において量子化された後(ステップ
s22)、上記DCT201から出力されるのと同様の
横送り順で、EOB検出器205及びメモリ203に出
力される(図4中のA)。このメモリ203は、2バン
ク構成のシングルポートメモリであり、量子化器202
において量子化された量子化係数を1バンクに1ブロッ
ク分蓄積し、その後バンクを切り替えて順次データを蓄
積するものである。
First, the data input to the encoding circuit is converted into DCT coefficients in the DCT 201 (step s21). Then, the DCT coefficients output from the DCT 201 in the output order of the horizontal feed indicated by the arrow in FIG. Are output to the EOB detector 205 and the memory 203 (A in FIG. 4). This memory 203 is a single-port memory having a two-bank configuration,
Is stored in one bank for one block of quantized coefficients, and then the banks are switched to sequentially store data.

【0038】EOB検出器205では、まず量子化器2
02から読み出されたデータが、カウンタ2052、第
1の比較器2051に出力される。そして、カウンタ2
052においては、上記読み出されたデータが処理対象
であるブロックの先頭から何番目のデータであるかをカ
ウントし、第1の比較器2051においては、上記量子
化器202から1画素ずつ読み出されるデータの値がゼ
ロであるか否かを比較して(ステップs23)、その結
果をセレクタ2053に出力する。
In the EOB detector 205, first, the quantizer 2
02 is output to the counter 2052 and the first comparator 2051. And counter 2
At 052, the number of the read data from the beginning of the block to be processed is counted, and the first comparator 2051 reads one pixel at a time from the quantizer 202. A comparison is made as to whether the data value is zero (step s23), and the result is output to the selector 2053.

【0039】そして、上記第1の比較器2051におい
て上記読み出したデータがゼロである場合(第1の比較
器2051より“0”が出力された場合)は、セレクタ
2053においてレジスタ2055に保持されている値
を選択し、一方、上記第1の比較器2051において上
記読み出したデータがゼロでない場合(第1の比較器2
051より“1”が出力された場合)は、その時のカウ
ンタ2052の値をデータ処理順−ジグザグ順変換テー
ブル2056を用いてジグザグ順に変換し(ステップs
24)、第2の比較器2054において上記変換された
ジグザグ順と、レジスタ2055に保持されている値と
を比較して大きいほうの値を選択し(ステップs2
5)、その時第2の比較器2054で選択した値を上記
レジスタ2055に保持する(ステップs26)。
When the read data is zero in the first comparator 2051 (when “0” is output from the first comparator 2051), the data is held in the register 2055 in the selector 2053. If the read data is not zero in the first comparator 2051 (the first comparator 2
If “1” is output from the address 051), the value of the counter 2052 at that time is converted in a zigzag order using the data processing order-zigzag order conversion table 2056 (step s).
24), the second comparator 2054 compares the converted zigzag order with the value held in the register 2055 and selects the larger value (step s2).
5) At that time, the value selected by the second comparator 2054 is held in the register 2055 (step s26).

【0040】つまり、本実施の形態2においては、量子
化器202から量子化係数が図13(a)の矢印で示す
ように横送り順で出力されるため、カウンタ2052の
値はその読み出されたデータのブロックにおける先頭か
らの横送り順番を示すことになる。一方、符号化器20
4においては、1ブロックのデータを図13(b)の矢
印で示すようにジグザグ順でスキャンして可変長符号化
が行われる。従って、上記符号化器204に対してブロ
ックにおける最後尾のゼロでない量子化係数の位置を示
すためには、上記カウンタ2052の値を対応するジグ
ザグ順に変換しなければならない。
That is, in the second embodiment, since the quantized coefficients are output from the quantizer 202 in the traverse order as shown by the arrow in FIG. This indicates the horizontal feed order from the top of the block of data that has been set. On the other hand, the encoder 20
In 4, the data of one block is scanned in zigzag order as indicated by the arrow in FIG. Therefore, in order to indicate to the encoder 204 the position of the last non-zero quantized coefficient in the block, the value of the counter 2052 must be converted in the corresponding zigzag order.

【0041】よって、上記量子化器202から読み出さ
れたデータが、第1の比較器2051においてゼロでな
い場合には、上記カウンタ2052の値を上記変換テー
ブル2056を用いてジグザグ順に変換し、さらに、ジ
グザグ順と横送り順とのブロックに対するスキャン順番
の違いにより、ジグザグ順では先に読み出される値が横
送り順では後から読み出される場合もあるので、第2の
比較器2054においてレジスタ2055に保持されて
いる値と上記変換テーブル2056により変換された値
とを比較して大きいほうの値を選択し、上記レジスタ2
055に保持するようにし、これにより、ジグザグ順に
スキャンして可変長符号化する符号化器204におい
て、ブロックの最後尾のゼロでない量子化係数の位置を
検出することができる。
Therefore, when the data read from the quantizer 202 is not zero in the first comparator 2051, the value of the counter 2052 is converted in a zigzag order by using the conversion table 2056. Because the value read first in the zigzag order may be read later in the horizontal feed order due to the difference in the scan order for the blocks in the zigzag order and the horizontal feed order, the second comparator 2054 holds the value in the register 2055. The selected value is compared with the value converted by the conversion table 2056, and the larger value is selected.
055, whereby the encoder 204 that scans in zigzag order and performs variable-length encoding can detect the position of the non-zero quantization coefficient at the end of the block.

【0042】そして、その読み出したデータが処理対象
であるブロックの最終データであるかどうかを、ここで
は1ブロックがNケの画素データからなるものであるた
め上記カウンタ2052の値がNであるか否かで判断し
(ステップs27)、最終データでない場合(レジスタ
2055の値≠Nの場合)は、再度ステップs23に戻
って上述した動作を繰り返し、その読み出したデータが
ブロックの最終データである場合(レジスタ2055の
値=Nの場合)は、そのときレジスタ2055に保持さ
れている値を制御信号210として符号化器204に出
力する(ステップs28)。また同時に、カウンタ10
52の値及びレジスタ1055の値を1にして、初期化
する。
Whether or not the read data is the final data of the block to be processed is determined by determining whether the value of the counter 2052 is N since one block is composed of N pixel data. If not (step s27), if the data is not the last data (if the value of the register 2055 is ≠ N), the process returns to step s23 again and repeats the above-described operation. If the read data is the last data of the block In the case of (the value of the register 2055 = N), the value held in the register 2055 at that time is output to the encoder 204 as the control signal 210 (step s28). At the same time, the counter 10
The value of the register 52 and the value of the register 1055 are set to 1 for initialization.

【0043】そして、量子化器202から1ブロック分
のデータが蓄積されたメモリ203では、バンク切り替
えを行って順次入力される次ブロックのデータの量子化
係数を蓄積していくと同時に、蓄積された1ブロック分
の量子化係数を、図13(b)の矢印で示すジグザグ順
で読み出し、符号化器204に出力する(図4中の
B)。このメモリ203におけるデータの書きこみ、読
み出しの状態を図14に示す。
In the memory 203 in which the data for one block is stored from the quantizer 202, the quantization coefficient of the data of the next block which is sequentially input by performing bank switching is stored, and at the same time, the stored data is stored. The quantized coefficients for one block are read out in a zigzag order indicated by an arrow in FIG. 13B and output to the encoder 204 (B in FIG. 4). FIG. 14 shows a state of writing and reading data in the memory 203.

【0044】符号化器204では、上記メモリ203か
ら出力された1ブロック分の量子化係数を可変長符号化
する。その際、上記EOB検出器205から出力された
制御信号210より、そのブロックにおける最後尾のゼ
ロでない量子化係数の位置を検知し、その位置にある量
子化係数までに対して可変長符号化を行って、その可変
長符号化を行った最後の値にEOB符号を付加し、上記
EOB検知器205から次ブロックのデータが入力され
るまで、符号化器204を休止させるようにする(ステ
ップs29)。このようにすれば、符号化器204は1
ブロック分のすべてのデータに対して可変長符号化を行
う必要がなくなり、符号化回路の消費電力を低減するこ
とができる。
In the encoder 204, the quantized coefficients for one block output from the memory 203 are variable-length coded. At this time, the position of the last non-zero quantized coefficient in the block is detected from the control signal 210 output from the EOB detector 205, and variable-length coding is performed on the quantized coefficient at that position. Then, an EOB code is added to the last value subjected to the variable length coding, and the encoder 204 is stopped until the data of the next block is input from the EOB detector 205 (step s29). ). By doing so, the encoder 204 will be 1
It is not necessary to perform variable-length encoding on all data of the block, and the power consumption of the encoding circuit can be reduced.

【0045】以上のように、本実施の形態2によれば、
量子化器202と、メモリ203との間にEOB検出器
205を備え、該EOB検出器205において、処理対
象であるブロックにおける最後尾のゼロでない量子化係
数のジグザグ順での位置を検出して、その値を制御信号
210として符号化器204に出力するようにし、上記
符号化器204においては、上記制御信号210により
上記最後尾のゼロでない量子化係数の位置を検知する
と、その検知した位置までの量子化係数に対して可変長
符号化を行い、上記最後尾のゼロでない量子化係数にE
OB符号を付加し、次ブロックの量子化されたデータが
上記量子化器202から入力されるまで、その動作を休
止させるようにしたので、符号化器204における可変
長符号化を行う際の消費電力を削減することができ、そ
の結果、符号化回路において、画質に悪影響を与えるこ
となく、消費電力の削減を図ることができる。
As described above, according to the second embodiment,
An EOB detector 205 is provided between the quantizer 202 and the memory 203. The EOB detector 205 detects the position of the last non-zero quantization coefficient in the block to be processed in the zigzag order. Is output to the encoder 204 as a control signal 210. When the encoder 204 detects the position of the last non-zero quantization coefficient by the control signal 210, the detected position Variable-length coding is performed on the quantized coefficients up to and
Since the OB code is added and the operation is suspended until the quantized data of the next block is input from the quantizer 202, the consumption at the time of performing the variable length encoding in the encoder 204 is performed. Power can be reduced, and as a result, power consumption can be reduced in the encoding circuit without adversely affecting image quality.

【0046】なお、本実施の形態2においては、メモリ
203が2バンク構成のシングルポートメモリであると
したが、メモリ203は、1バンク構成のデュアルポー
トメモリであっても、同様の効果が得られる。
In the second embodiment, the memory 203 is a single-port memory having a two-bank configuration. However, the same effect can be obtained even if the memory 203 is a dual-port memory having a one-bank configuration. Can be

【0047】さらに、本実施の形態2では、本符号化回
路に入力されるデータを周波数変換する方法としてDC
T処理を例に挙げて説明したが、これに限るものではな
く、符号化回路に入力されたデータに対して周波数変換
を行う方法であればなんでもよい。また、符号化器20
4において可変長符号化する際のスキャン順としては、
ここではジグザグ順に行うものを例に挙げて説明した
が、どのようなスキャン順であってもよく、本符号化回
路に入力されるデータの特性に応じたスキャン順を選択
すれば良い。その場合、EOB検出器205中の変換テ
ーブル2056を、カウンタ2052の値(データ処理
順)をデータ特性に応じたスキャン順に変換するテーブ
ルにする必要がある。
Further, according to the second embodiment, DC input is performed as a method of frequency-converting data input to the encoding circuit.
Although the T process has been described as an example, the present invention is not limited to this, and any method may be used as long as it performs frequency conversion on data input to the encoding circuit. Also, the encoder 20
The scan order for variable-length encoding in 4 is as follows.
Here, an example in which zigzag order is performed has been described, but any scan order may be used, and a scan order according to the characteristics of data input to the present encoding circuit may be selected. In this case, the conversion table 2056 in the EOB detector 205 needs to be a table that converts the value of the counter 2052 (data processing order) into a scan order according to data characteristics.

【0048】(実施の形態3)以下、図を用いて、本実
施の形態3における符号化回路について説明する。本実
施の形態3においては、EOB検出器をDCTと量子化
器との間に設けた場合について説明する。
(Embodiment 3) An encoding circuit according to Embodiment 3 will be described below with reference to the drawings. In the third embodiment, a case where the EOB detector is provided between the DCT and the quantizer will be described.

【0049】まず、図7及び図8を用いて、本実施の形
態3における符号化回路の構成について説明する。図7
は、実施の形態3における符号化回路の構成を示す図で
あり、図8は、図7中のEOB検出器の詳細な構成を示
す図である。
First, the configuration of the encoding circuit according to the third embodiment will be described with reference to FIGS. FIG.
FIG. 8 is a diagram illustrating a configuration of an encoding circuit according to Embodiment 3, and FIG. 8 is a diagram illustrating a detailed configuration of an EOB detector in FIG.

【0050】図7に示すように、本実施の形態3におけ
る符号化回路は、入力されたデータに対してDCT処理
を行うDCT301と、処理対象ブロックにおける最後
尾のゼロでない値の位置を制御信号310として出力す
るEOB検出器305と、上記DCT301からのデー
タを量子化する量子化器302と、上記量子化器302
からのデータを一時保持しジグザグ順で出力するメモリ
303と、可変長符号化を行う符号化器304と、から
なるものである。
As shown in FIG. 7, the encoding circuit according to the third embodiment includes a DCT 301 for performing DCT processing on input data, and a control signal indicating the position of the last non-zero value in the processing target block. An EOB detector 305 output as 310, a quantizer 302 for quantizing the data from the DCT 301, and a quantizer 302
And a coder 304 for temporarily storing data from and outputting the data in a zigzag order, and an encoder 304 for performing variable length coding.

【0051】そして、本実施の形態3におけるEOB検
出器305は、図8に示すように、DCT301から読
み出されるデータと量子化器302においてそのデータ
を量子化する際の除数である量子化値311とを比較す
る第1の比較器3051と、上記読み出されたデータが
処理対象ブロックの先頭からの何個目のデータであるか
をカウントするカウンタ3052と、横送り順で出力さ
れたデータの先頭データからの読み出し順番を先頭デー
タからのジグザグ順で読み出された場合の順番に変換す
るデータ処理順−ジグザグ順変換テーブル3056と、
入力される値のうち大きい値を選択する第2の比較器3
054と、上記第1の比較器3051における結果によ
りレジスタ3055に保持する値を選択するセレクタ3
053と、を備えるものである。
Then, as shown in FIG. 8, the EOB detector 305 according to the third embodiment includes a data read from the DCT 301 and a quantized value 311 which is a divisor when the quantizer 302 quantizes the data. , A counter 3052 for counting the number of the read data from the head of the processing target block, and a counter 3052 for counting the data output in the horizontal feed order. A data processing order-zigzag order conversion table 3056 for converting the order of reading from the first data to the order when reading is performed in the zigzag order from the first data;
Second comparator 3 for selecting a larger value from the input values
054 and a selector 3 for selecting a value to be held in the register 3055 based on the result of the first comparator 3051
053).

【0052】次に、図9を用いて、本実施の形態3にお
ける符号化回路の動作について説明する。図9は、本実
施の形態3における符号化回路の一連の動作を示すフロ
ーチャート図である。
Next, the operation of the encoding circuit according to the third embodiment will be described with reference to FIG. FIG. 9 is a flowchart showing a series of operations of the encoding circuit according to the third embodiment.

【0053】なお、ここで符号化回路に入力されるデー
タは、1ブロックがNケの画素からなるデジタル映像信
号であるものとし、データ処理順−ジグザグ順変換テー
ブル3056は、例えば図13(c)の上2段に示され
るようなもので、例えば、横送り出力では先頭から3個
目のデータを、ジグザグ順では先頭から6個目のデータ
であるというように先頭からのデータ順番を変換するも
のである。
Here, the data input to the encoding circuit is a digital video signal in which one block is composed of N pixels. ) In the upper two rows. For example, the data order from the head is converted such that the third data from the head is the data in the horizontal feed and the sixth data from the head in the zigzag order. Is what you do.

【0054】まず、上記符号化回路に入力されたデータ
は、DCT301においてDCT係数に変換される(ス
テップs31)。そして、図13(a)の矢印が示す横
送り出力順でDCT301より出力されたDCT係数
は、EOB検出器305及び量子化器302に入力され
る(図7中のA)。
First, the data input to the encoding circuit is converted into DCT coefficients in the DCT 301 (step s31). Then, the DCT coefficients output from the DCT 301 in the horizontal feed output order indicated by the arrow in FIG. 13A are input to the EOB detector 305 and the quantizer 302 (A in FIG. 7).

【0055】EOB検出器305では、まずDCT30
1から読み出されたデータが、カウンタ3052、及び
第1の比較器3051に出力される。そして、カウンタ
3052においては、上記読み出されたデータが処理対
象ブロックの先頭から何番目のデータであるかをカウン
トし、第1の比較器3051においては、上記DCT3
01から1画素ずつ読み出されるデータの値が、量子化
処理においてそのデータを割る除数である量子化値31
1以上であるか否かを比較し(ステップs32)、その
結果をセレクタ3053に出力する。
In the EOB detector 305, first, the DCT 30
The data read from 1 is output to the counter 3052 and the first comparator 3051. The counter 3052 counts the number of the read data from the top of the processing target block, and the first comparator 3051 checks the DCT3
The value of data read one pixel at a time from 01 is a quantized value 31 which is a divisor for dividing the data in the quantization process.
A comparison is made as to whether it is 1 or more (step s32), and the result is output to the selector 3053.

【0056】なお、上記第1の比較器3051におい
て、上記読み出したデータと上記量子化値311とを比
較する理由としては、上記量子化値311が上記読み出
したデータを量子化する際にそのデータを割る除数に相
当するものであるため、該量子化値311より上記読み
出したデータの値が大きければ、後段の量子化器302
において量子化されて符号化器304に入力される際、
上記読み出されたデータはゼロではないと判断できるた
めである。
The reason why the first comparator 3051 compares the read data with the quantized value 311 is that the quantized value 311 is used to quantize the read data when quantizing the read data. Since the value of the read data is greater than the quantized value 311, the quantizer 302 in the subsequent stage
When quantized at and input to the encoder 304,
This is because it can be determined that the read data is not zero.

【0057】そして、上記第1の比較器3051におい
て上記読み出したデータが上記量子化値311より小さ
い場合(第1の比較器3051より“0”が出力された
場合)は、セレクタ3053においてレジスタ3055
に保持されている値を選択し、一方、上記第1の比較器
3051において上記読み出したデータが量子化値31
1以上である場合(第1の比較器3051より“1”が
出力された場合)は、その時のカウンタ3052の値を
データ処理順−ジグザグ順変換テーブル3056を用い
てジグザグ順に変換し(ステップs33)、第2の比較
器3054において上記変換されたジグザグ順と、レジ
スタ3055に保持されている値とを比較して大きいほ
うの値を選択し(ステップs34)、そのとき第2の比
較器3054において選択された値を上記レジスタ30
55に保持する(ステップs35)。
If the data read out by the first comparator 3051 is smaller than the quantized value 311 (“0” is output from the first comparator 3051), the register 3055 is output from the selector 3053.
Is stored in the first comparator 3051. On the other hand, the data read out by the first comparator
If the value is 1 or more (when "1" is output from the first comparator 3051), the value of the counter 3052 at that time is converted in a zigzag order using the data processing order-zigzag order conversion table 3056 (step s33). ), The second comparator 3054 compares the converted zigzag order with the value held in the register 3055 and selects the larger one (step s34). At that time, the second comparator 3054 In the register 30
55 (step s35).

【0058】つまり、本実施の形態3においては、DC
T301からDCT係数が図13(a)の矢印で示すよ
うに横送り順で出力されるため、カウンタ3052の値
はその読み出されたデータのブロックにおける先頭から
の横送り順番を示すことになる。しかし、符号化器30
4においては1ブロックのデータを図13(b)の矢印
で示すようにジグザグ順でスキャンして可変長符号化が
行われるので、上記符号化器304に対してブロックに
おける最後尾のゼロでない量子化係数の位置を示すため
には、上記カウンタ3052の値を対応するジグザグ順
に変換しなければならない。このため、本実施の形態3
においては、上記読み出されたデータが第1の比較器3
051において量子化値311以上であった場合に、そ
の際のカウンタ3052の値を変換テーブル3056を
用いてジグザグ順に変換し、さらに第2の比較器305
4において、ジグザグ順と横送り順とのブロックに対す
るスキャン順番の違いにより、ジグザグ順では先に読み
出される値が横送り順では後から読み出される場合もあ
るので、レジスタ3055に保持されている値と上記変
換テーブル3056により変換された値とを比較して大
きいほうの値を選択し、上記レジスタ3055に保持す
るようにしている。
That is, in the third embodiment, DC
Since the DCT coefficient is output from T301 in the order of horizontal feed as indicated by the arrow in FIG. 13A, the value of the counter 3052 indicates the order of horizontal feed from the top of the read data block. . However, the encoder 30
In No. 4, the data of one block is scanned in a zigzag order as indicated by the arrow in FIG. 13B and variable length coding is performed. In order to indicate the position of the conversion coefficient, the value of the counter 3052 must be converted in the corresponding zigzag order. Therefore, the third embodiment
, The read data is stored in the first comparator 3
If the quantization value is equal to or more than 311 in 051, the value of the counter 3052 at that time is converted in a zigzag order using the conversion table 3056, and the second comparator 305
4, the value read first in the zigzag order may be read later in the zigzag order due to the difference in the scan order for the blocks between the zigzag order and the horizontal feed order. The larger value is selected by comparing the value converted by the conversion table 3056 and held in the register 3055.

【0059】よって、読み出されたデータが第1の比較
器3051において上記量子化値311以上であるDC
T係数を検出し、該DCT係数の処理対象ブロックにお
ける横送り順による位置をカウンタ3052で検出し、
変換テーブル3056においてその横送り順をジグザグ
順に置き換え、さらに第2の比較器3054において常
に大きい値をレジスタ3055に保持するようにするの
で、ジグザグ順にスキャンして可変長符号化する符号化
器304において、ブロックの最後尾のゼロでない量子
化係数の位置を検出することができる。
Therefore, the data read out from the first comparator 3051 is the DC value equal to or greater than the quantized value 311.
The T coefficient is detected, and the position of the DCT coefficient in the block to be processed in the horizontal feed order is detected by the counter 3052.
In the conversion table 3056, the horizontal feed order is replaced in a zigzag order, and the second comparator 3054 always holds a large value in the register 3055. , The position of the non-zero quantized coefficient at the end of the block can be detected.

【0060】そして、その読み出したデータが処理対象
であるブロックの最終データであるかどうかを、ここで
は1ブロックがNケの画素データからなるものであるた
め上記カウンタ3052の値がNであるか否かで判断し
(ステップs36)、最終データでない場合(レジスタ
3055の値≠Nの場合)は、再度ステップs32に戻
って上述した動作を繰り返し、その読み出したデータが
ブロックの最終データである場合(レジスタ3055の
値=Nの場合)は、そのときレジスタ3055に保持さ
れている値を制御信号310として符号化器304に出
力する(ステップs37)。また同時に、カウンタ30
52の値及びレジスタ3055の値を1にして、初期化
する。
Whether or not the read data is the final data of the block to be processed is determined by determining whether the value of the counter 3052 is N since one block is composed of N pixel data. If not (step s36), if the data is not the final data (if the value of the register 3055 is ≠ N), the flow returns to step s32 again to repeat the above-described operation, and the read data is the final data of the block. If (the value of the register 3055 is N), the value held in the register 3055 at that time is output to the encoder 304 as the control signal 310 (step s37). At the same time, the counter 30
The value of the register 52 and the value of the register 3055 are set to 1 for initialization.

【0061】そして、上記DCT301から出力された
DCT係数は、量子化器302に1画素づつ入力されて
量子化され、メモリ303に蓄積される。このメモリ3
03は、2バンク構成のシングルポートメモリであり、
上記量子化器302において量子化された量子化係数を
1バンクに1ブロック分蓄積した後、バンク切り替えを
行って順次入力される次ブロックのデータの量子化係数
を蓄積していくと同時に、蓄積された1ブロック分の量
子化係数を、図13(b)の矢印で示すジグザグ順で読
み出し、符号化器304に出力する(図7中のB)。こ
のメモリ303におけるデータの書きこみ、読み出しの
状態は、図14に示す。
The DCT coefficients output from the DCT 301 are input to the quantizer 302 one pixel at a time, quantized, and stored in the memory 303. This memory 3
03 is a single-port memory having a two-bank configuration,
After storing the quantized coefficients quantized by the quantizer 302 for one block in one bank, the bank is switched to accumulate the quantized coefficients of the data of the next block that is sequentially input, and at the same time, the storage is performed. The quantized coefficients for one block are read out in a zigzag order indicated by an arrow in FIG. 13B and output to the encoder 304 (B in FIG. 7). The state of writing and reading of data in the memory 303 is shown in FIG.

【0062】符号化器304では、上記メモリ303か
ら出力された1ブロック分の量子化係数を可変長符号化
する。その際に、上記EOB検出器305から出力され
た制御信号310より、そのブロックにおける最後尾の
ゼロでない量子化係数の位置を検知し、その位置にある
量子化係数までに対して可変長符号化を行って、その可
変長符号化を行った最後の値にEOB符号を付加し、上
記EOB検出器305から次ブロックのデータが入力さ
れるまで、符号化器304を休止させるようにする(ス
テップs38)。このようにすれば、符号化器304は
1ブロック分のすべてのデータに対して可変長符号化を
行う必要がなくなり、符号化回路の消費電力を低減する
ことができる。
In the encoder 304, the quantized coefficients for one block output from the memory 303 are variable-length coded. At this time, the position of the last non-zero quantized coefficient in the block is detected from the control signal 310 output from the EOB detector 305, and variable-length coding is performed on the quantized coefficient at that position. To add the EOB code to the last value subjected to the variable-length coding, and stop the encoder 304 until data of the next block is input from the EOB detector 305 (step s38). This eliminates the need for the encoder 304 to perform variable-length encoding on all data of one block, and can reduce the power consumption of the encoding circuit.

【0063】以上のように、本実施の形態3によれば、
DCT301と、量子化器302との間にEOB検出器
305を備え、該EOB検出器305において、処理対
象であるブロックにおける最後尾のゼロでない量子化係
数のジグザグ順での位置を検出して、その値を制御信号
310として符号化器304に出力するようにし、上記
符号化器304においては、上記制御信号310により
上記最後尾のゼロでない量子化係数の位置を検知する
と、その検知された位置までの量子化係数に対して可変
長符号化を行ってEOB符号を付加し、上記メモリ30
3から次ブロックのデータが入力されるまで、その動作
を休止させるようにしたので、上記符号化器304にお
ける可変長符号化を行う際の消費電力を削減することが
でき、その結果、符号化回路において、画質に悪影響を
与えることなく消費電力の削減を図ることができる。
As described above, according to the third embodiment,
An EOB detector 305 is provided between the DCT 301 and the quantizer 302. In the EOB detector 305, the position of the last non-zero quantization coefficient in the block to be processed in the zigzag order is detected. The value is output to the encoder 304 as a control signal 310. When the encoder 304 detects the position of the last non-zero quantization coefficient by the control signal 310, the detected position The variable length coding is performed on the quantization coefficients up to and an EOB code is added thereto.
Since the operation is paused until the data of the next block from 3 is input, it is possible to reduce the power consumption when performing variable-length encoding in the encoder 304, and as a result, In the circuit, power consumption can be reduced without adversely affecting image quality.

【0064】なお、本実施の形態3においては、メモリ
303が2バンク構成のシングルポートメモリであると
したが、メモリ303は、1バンク構成のデュアルポー
トメモリであっても、同様の効果が得られる。
In the third embodiment, the memory 303 is a single-port memory having a two-bank configuration. However, similar effects can be obtained even if the memory 303 is a dual-port memory having a one-bank configuration. It is.

【0065】さらに、本実施の形態3では、本符号化回
路に入力されるデータを周波数変換する方法としてDC
T処理を例に挙げて説明したが、これに限るものではな
く、符号化回路に入力されたデータに対して周波数変換
を行う方法であればなんでもよい。また、符号化器30
4において可変長符号化する際のスキャン順としては、
ここではジグザグ順に行うものを例に挙げて説明した
が、どのようなスキャン順であってもよく、本符号化回
路に入力されるデータの特性に応じたスキャン順を選択
すれば良い。その場合、EOB検出器305中の変換テ
ーブル3056を、カウンタ3052の値(データ処理
順)をデータ特性に応じたスキャン順に変換するテーブ
ルにする必要がある。
Further, in the third embodiment, as a method of frequency-converting data input to the encoding circuit, DC
Although the T process has been described as an example, the present invention is not limited to this, and any method may be used as long as it performs frequency conversion on data input to the encoding circuit. Also, the encoder 30
The scan order for variable-length encoding in 4 is as follows.
Here, an example in which zigzag order is performed has been described, but any scan order may be used, and a scan order according to the characteristics of data input to the present encoding circuit may be selected. In this case, the conversion table 3056 in the EOB detector 305 needs to be a table that converts the value of the counter 3052 (data processing order) into a scan order according to data characteristics.

【0066】(実施の形態4)以下、図を用いて、本実
施の形態4における符号化回路について説明する。本実
施の形態4においては、上記実施の形態3と同様、EO
B検出器をDCTと量子化器との間に設けた場合の別の
構成について説明する。まず、図10及び図11を用い
て、本実施の形態4における符号化回路の構成について
説明する。
(Embodiment 4) An encoding circuit according to Embodiment 4 will be described below with reference to the drawings. In the fourth embodiment, as in the third embodiment, the EO
Another configuration in the case where the B detector is provided between the DCT and the quantizer will be described. First, the configuration of the encoding circuit according to the fourth embodiment will be described with reference to FIGS.

【0067】図10は、実施の形態4における符号化回
路の構成を示す図であり、図11は、図10中のEOB
検出器の詳細な構成を示す図である。図10に示すよう
に、本実施の形態4における符号化回路は、入力された
データに対してDCT処理を行うDCT401と、処理
対象ブロックにおける最後尾のゼロでない値の位置を制
御信号410として出力するEOB検出器405と、上
記DCT401からのデータを量子化する量子化器40
2と、可変長符号化を行う符号化器404と、からなる
ものである。
FIG. 10 is a diagram showing a configuration of an encoding circuit according to the fourth embodiment, and FIG.
It is a figure showing the detailed composition of a detector. As shown in FIG. 10, the encoding circuit according to Embodiment 4 performs DCT processing on input data and outputs the position of the last non-zero value in the processing target block as control signal 410. An EOB detector 405 that performs quantization and a quantizer 40 that quantizes data from the DCT 401.
2 and an encoder 404 for performing variable-length encoding.

【0068】そして、本実施の形態4におけるEOB検
出器405は、図11に示すように、DCT401から
横送り順で出力されたデータを一時保持してジグザグ順
で出力するメモリ4054と、該メモリ4054から読
み出されるDCT係数と量子化器402においてそのデ
ータを量子化する際の除数である量子化値411とを比
較する第1の比較器4051と、上記読み出されたデー
タが処理対象ブロックの先頭からの何個目のデータであ
るかをカウントするカウンタ4052と、上記第1の比
較器4051における結果によりレジスタ4055に保
持する値を選択するセレクタ4053と、上記メモリ4
054から入力されるデータを1ブロック分格納するN
段シフトレジスタ4056と、を備えるものである。な
お、上記メモリ4054は、2バンク構成のシングルポ
ートメモリとする。
As shown in FIG. 11, the EOB detector 405 according to the fourth embodiment includes a memory 4054 for temporarily storing data output from the DCT 401 in the transverse direction and outputting the data in a zigzag order, A first comparator 4051 for comparing a DCT coefficient read from the data block 4054 with a quantized value 411 which is a divisor when quantizing the data in the quantizer 402; A counter 4052 for counting the number of data from the head, a selector 4053 for selecting a value to be held in a register 4055 based on the result of the first comparator 4051,
N for storing one block of data input from 054
And a stage shift register 4056. Note that the memory 4054 is a single-port memory having a two-bank configuration.

【0069】次に、図12を用いて、本実施の形態4に
おける符号化回路の動作について説明する。図12は、
本実施の形態4における符号化回路の一連の動作を示す
フローチャート図である。なお、ここで符号化回路に入
力されるデータは、1ブロックがNケの画素からなるデ
ジタル映像信号であるものとする。
Next, the operation of the encoding circuit according to the fourth embodiment will be described with reference to FIG. FIG.
FIG. 14 is a flowchart showing a series of operations of the encoding circuit according to the fourth embodiment. Here, it is assumed that the data input to the encoding circuit is a digital video signal in which one block includes N pixels.

【0070】まず、上記符号化回路に入力されたデータ
は、DCT401においてDCT係数に変換される(ス
テップs41)。そして、上記DCT401から出力さ
れたDCT係数は、EOB検出器405に入力される。
First, the data input to the encoding circuit is converted into DCT coefficients in the DCT 401 (step s41). Then, the DCT coefficient output from the DCT 401 is input to the EOB detector 405.

【0071】EOB検出器405では、まずメモリ40
54において、DCT401から読み出された1ブロッ
ク分のデータが図13(a)の矢印が示す横送り順で書
きこまれ(図10中のA)、該データを図13(b)の
矢印が示すジグザグ順で出力することで(図10中の
B)、データの並び替えを行う(ステップs42)。こ
のメモリ4054におけるデータの書きこみ、読み出し
の状態を図14に示す。さらに、上記メモリ4054
は、量子化係数を1バンクに1ブロック分蓄積した後、
バンク切り替えを行って順次入力される次ブロックのデ
ータの量子化係数を蓄積していく。
In the EOB detector 405, first, the memory 40
At 54, the data of one block read from the DCT 401 is written in the horizontal feed order shown by the arrow in FIG. 13A (A in FIG. 10), and By outputting in the zigzag order shown (B in FIG. 10), the data is rearranged (step s42). FIG. 14 shows the state of writing and reading of data in the memory 4054. Further, the memory 4054
Accumulates one block of quantization coefficient in one bank,
By performing bank switching, the quantization coefficients of the data of the next block sequentially input are accumulated.

【0072】次に、上記メモリ4054からジグザグ順
で読み出されたデータは、カウンタ4052、N段シフ
トレジスタ4056、及び第1の比較器4051に出力
される。そして、上記カウンタ4052においては上記
読み出されたデータが処理対象ブロックの先頭から何番
目のデータであるかをカウントし、上記N段シフトレジ
スタ4056ではその読み出されたデータを保持し、ま
た上記第1の比較器4051においては上記メモリ40
54から1画素ずつ読み出されるデータの値が、量子化
処理においてそのデータを割る除数である量子化値41
1以上であるか否かを比較し(ステップs43)、その
結果をセレクタ4053に出力する。
Next, the data read from the memory 4054 in zigzag order is output to the counter 4052, the N-stage shift register 4056, and the first comparator 4051. The counter 4052 counts the number of the read data from the top of the processing target block, and the N-stage shift register 4056 holds the read data. In the first comparator 4051, the memory 40
The value of the data read pixel by pixel from 54 is a quantized value 41 which is a divisor for dividing the data in the quantization process.
A comparison is made as to whether it is 1 or more (step s43), and the result is output to the selector 4053.

【0073】なお、上記第1の比較器4051におい
て、上記読み出したデータと上記量子化値411とを比
較する理由は、上記実施の形態3で説明した同様の理由
からである。
The reason why the first comparator 4051 compares the read data with the quantized value 411 is for the same reason as described in the third embodiment.

【0074】そして、上記第1の比較器4051におい
て、上記読み出したデータが上記量子化値411より小
さい場合(第1の比較器4051より“0”が出力され
た場合)は、セレクタ4053においてレジスタ405
5に保持されている値を選択し、一方、上記第1の比較
器4051において、上記読み出したデータが量子化値
411以上である場合(第1の比較器4051より
“1”が出力された場合)は、その時のカウンタ405
2の値を選択し、レジスタ4055に保持する(ステッ
プs44)。
In the first comparator 4051, when the read data is smaller than the quantized value 411 (when “0” is output from the first comparator 4051), the selector 4053 405
5 is selected. On the other hand, when the read data is equal to or more than the quantized value 411 in the first comparator 4051 (“1” is output from the first comparator 4051). ) Is the counter 405 at that time
The value of 2 is selected and held in the register 4055 (step s44).

【0075】つまり、本実施の形態4においては、予め
メモリ4054において、DCT401から図13
(a)の矢印で示すように横送り順で出力されるDCT
係数を図13(b)に示すジグザグ順に並べ替えて出力
しているため、カウンタ4052の値は、その読み出さ
れたデータのブロックにおける先頭からのジグザグ順番
を示すことになり、上記第1の比較器4051において
量子化値411以上であるDCT係数を検出して、その
ときの位置を上記カウンタ4052において検出し、レ
ジスタ4055に保持するので、ジグザグ順にスキャン
して可変長符号化する符号化器404に対して、ブロッ
クの最後尾のゼロでない量子化係数の位置を示すことが
できる。
That is, in the fourth embodiment, in the memory 4054, the DCT 401
DCT output in horizontal feed order as indicated by the arrow in FIG.
Since the coefficients are rearranged in the zigzag order shown in FIG. 13B and output, the value of the counter 4052 indicates the zigzag order from the top of the block of the read data, and the first The comparator 4051 detects a DCT coefficient that is equal to or more than the quantized value 411, and the position at that time is detected by the counter 4052 and stored in the register 4055. For 404, the position of the last non-zero quantized coefficient of the block can be indicated.

【0076】そして、その読み出したデータが処理対象
であるブロックの最終データであるかどうかを、ここで
は1ブロックがNケの画素データからなるものであるた
め上記カウンタ4052の値がNであるか否かで判断し
(ステップs45)、最終データでない場合(レジスタ
4055の値≠Nの場合)は、上述した動作を繰り返
し、一方その読み出したデータがブロックの最終データ
である場合(レジスタ4055の値=Nの場合)は、そ
のときレジスタ4055に保持されている値を制御信号
410として、量子化器402及び符号化器404に出
力する(ステップs46)。そしてそれと同時に、上記
N段シフトレジスタ4056に保持しておいた1ブロッ
ク分のDCT係数を量子化器402に出力するととも
に、カウンタ4052の値、及びレジスタ4055の値
を1にし、初期化する。
Whether or not the read data is the final data of the block to be processed is determined by determining whether the value of the counter 4052 is N since one block is composed of N pixel data. If it is not the final data (if the value of the register 4055 is (N), the above operation is repeated, while if the read data is the final data of the block (the value of the register 4055) (= N), the value held in the register 4055 at that time is output as the control signal 410 to the quantizer 402 and the encoder 404 (step s46). At the same time, the DCT coefficient for one block held in the N-stage shift register 4056 is output to the quantizer 402, and the value of the counter 4052 and the value of the register 4055 are set to 1 for initialization.

【0077】量子化器402では、上記N段シフトレジ
スタ4056からジグザグ順で入力されるDCT係数を
1画素ずつ量子化していく。その際、上記EOB検出器
405から出力された制御信号410より、そのブロッ
クにおける最後尾のゼロでないDCT係数の位置を検知
し、その位置にあるDCT係数までに対して量子化を行
った後、上記EOB検出器405から次ブロックのデー
タが入力されるまで、上記量子化器402を休止させる
ようにする(ステップs47)。
The quantizer 402 quantizes the DCT coefficients input from the N-stage shift register 4056 in zigzag order pixel by pixel. At that time, the position of the last non-zero DCT coefficient in the block is detected from the control signal 410 output from the EOB detector 405, and quantization is performed up to the DCT coefficient at that position. The quantizer 402 is stopped until the data of the next block is input from the EOB detector 405 (step s47).

【0078】さらに、符号化器404では、上記量子化
器402から出力された1ブロック分の量子化係数を可
変長符号化する。その際、上記EOB検出器405から
出力された制御信号410より、そのブロックにおける
最後尾のゼロでない量子化係数の位置を検知し、その位
置にある量子化係数までに対して可変長符号化を行っ
て、その可変長符号化を行った最後の値にEOB符号を
付加し、上記量子化器402から次ブロックのデータが
入力されるまで、符号化器404を休止させるようにす
る(ステップs48)。このようにすれば、量子化器4
02及び符号化器404は、処理対象ブロックのすべて
のデータに対して量子化あるいは可変長符号化を行う必
要がなくなり、符号化回路の消費電力をより低減するこ
とができる。
Further, the encoder 404 performs variable-length encoding on the quantized coefficients for one block output from the quantizer 402. At this time, the position of the last non-zero quantization coefficient in the block is detected from the control signal 410 output from the EOB detector 405, and variable-length coding is performed on the quantization coefficient at that position. Then, an EOB code is added to the last value subjected to the variable-length encoding, and the encoder 404 is stopped until the data of the next block is input from the quantizer 402 (step s48). ). By doing so, the quantizer 4
02 and the encoder 404 do not need to perform quantization or variable length encoding on all data of the processing target block, and can further reduce the power consumption of the encoding circuit.

【0079】以上のように、本実施の形態4によれば、
DCT401と、量子化器402との間にEOB検出器
405を備え、該EOB検出器405において、処理対
象であるブロックにおける最後尾のゼロでない量子化係
数のジグザグ順での位置を検出して、その値を制御信号
410として量子化器402及び符号化器404に出力
するようにし、上記量子化器402においては、上記制
御信号410により上記最後尾のゼロでない量子化係数
の位置を検知すると、その検知された位置までのDCT
係数に対して量子化を行った後その動作を休止させ、ま
た上記符号化器404においては、上記制御信号410
により上記最後尾のゼロでない量子化係数の位置を検知
すると、その検知された位置までの量子化係数に対して
可変長符号化を行ってEOB符号を付加し、上記量子化
器402から次ブロックのデータが入力されるまでその
動作を休止させるようにしたので、上記量子化器402
において量子化する際の消費電力、及び上記符号化器4
04において可変長符号化を行う際の消費電力を削減す
ることができ、その結果、符号化回路において、画質に
悪影響を与えることなく、より大きな消費電力の削減を
図ることができる。
As described above, according to the fourth embodiment,
An EOB detector 405 is provided between the DCT 401 and the quantizer 402. The EOB detector 405 detects the position of the last non-zero quantized coefficient in the block to be processed in a zigzag order, The value is output to the quantizer 402 and the encoder 404 as a control signal 410. When the quantizer 402 detects the position of the last non-zero quantized coefficient by the control signal 410, DCT to the detected position
After quantizing the coefficients, the operation is suspended, and the encoder 404 outputs the control signal 410
When the position of the last non-zero quantized coefficient is detected, the variable-length coding is performed on the quantized coefficient up to the detected position and an EOB code is added. The operation is suspended until the data of the quantizer 402 is input.
, The power consumption when quantizing, and the encoder 4
04, the power consumption when performing variable length coding can be reduced, and as a result, the coding circuit can achieve a greater reduction in power consumption without adversely affecting image quality.

【0080】なお、本実施の形態4においては、メモリ
4054が2バンク構成のシングルポートメモリである
としたが、メモリ4054は、1バンク構成のデュアル
ポートメモリであっても、同様の効果が得られる。
Although the memory 4054 is a single-port memory having a two-bank configuration in the fourth embodiment, the same effect can be obtained even if the memory 4054 is a dual-port memory having a one-bank configuration. Can be

【0081】さらに、本実施の形態4では、本符号化回
路に入力されるデータを周波数変換する方法としてDC
T処理を例に挙げて説明したが、これに限るものではな
く、符号化回路に入力されたデータに対して周波数変換
を行う方法であればなんでもよい。また、符号化器40
4において可変長符号化する際のスキャン順としては、
ここではジグザグ順に行うものを例に挙げて説明した
が、どのようなスキャン順であってもよく、本符号化回
路に入力されるデータの特性に応じたスキャン順を選択
すれば良い。
Further, in the fourth embodiment, DC input is used as a method of frequency-converting data input to the encoding circuit.
Although the T process has been described as an example, the present invention is not limited to this, and any method may be used as long as it performs frequency conversion on data input to the encoding circuit. Also, the encoder 40
The scan order for variable-length encoding in 4 is as follows.
Here, an example in which zigzag order is performed has been described, but any scan order may be used, and a scan order according to the characteristics of data input to the present encoding circuit may be selected.

【0082】[0082]

【発明の効果】以上のように、本発明の請求項1に記載
の符号化回路によれば、処理対象ブロックのデータを周
波数成分に周波数変換する周波数変換手段と、該周波数
成分を量子化する量子化手段と、該量子化された周波数
成分を所定のスキャン順で可変長符号化する符号化手段
と、を備えた符号化回路において、上記処理対象ブロッ
クの最後尾の、0でない量子化された周波数成分の上記
所定のスキャン順での位置を検出し、該位置を制御信号
として上記符号化手段に出力するEOB検出手段を備
え、上記符号化手段は、上記制御信号が示す上記所定の
スキャン順での位置までにある上記量子化された周波数
成分に対して可変長符号化して、有効成分の最終位置で
あることを示すEOB符号を付加し、可変長符号化処理
を休止するようにしたので、上記符号化手段において可
変長符号化を行う前に上記EOB符号の挿入位置を検出
して、該位置にある量子化された周波数成分から処理対
象ブロックの最終の量子化された周波数成分までの可変
長符号化処理を休止することが可能になり、その結果、
画質に悪影響を全く与えることなく、適応的な消費電力
の削減をすることができる。
As described above, according to the encoding circuit of the first aspect of the present invention, the frequency conversion means for converting the data of the block to be processed into frequency components, and quantizing the frequency components. In a coding circuit comprising a quantization means and a coding means for performing variable length coding on the quantized frequency components in a predetermined scan order, the non-zero quantized signal at the end of the block to be processed is EOB detection means for detecting a position of the frequency component in the predetermined scan order and outputting the position as a control signal to the encoding means, wherein the encoding means is configured to perform the predetermined scan indicated by the control signal. Variable-length coding is performed on the quantized frequency components up to the position in order, an EOB code indicating the final position of the effective component is added, and the variable-length coding process is stopped. Therefore, before performing the variable-length encoding in the encoding means, the insertion position of the EOB code is detected, and from the quantized frequency component at the position to the final quantized frequency component of the processing target block. Variable-length encoding process can be paused, and as a result,
Adaptive power consumption can be reduced without any adverse effect on image quality.

【0083】また、本発明の請求項2に記載の符号化回
路によれば、請求項1に記載の符号化回路において、上
記EOB検出手段は、上記量子化手段からの上記処理対
象ブロック分の上記量子化された周波数成分を一時保持
して上記所定のスキャン順で出力するメモリと、上記符
号化手段との間に設けられており、上記メモリから入力
される上記量子化された周波数成分の位置を検出するカ
ウンタと、上記量子化された周波数成分が0であるか否
かを比較する比較器と、上記量子化された周波数成分の
値を格納するバッファと、上記比較器の結果に基づい
て、上記0でない量子化された周波数成分の位置を保持
するレジスタとを備えるようにしたので、上記EOB検
出手段において、上記処理対象ブロックにおけるEOB
符号の挿入位置を検出して、上記符号化手段に示すこと
ができる。
According to a second aspect of the present invention, in the encoding circuit according to the first aspect, the EOB detecting means includes a part for the processing target block from the quantizing means. A memory that temporarily holds the quantized frequency component and outputs the quantized frequency component in the predetermined scan order, and that is provided between the encoding unit and the quantized frequency component input from the memory; A counter for detecting a position, a comparator for comparing whether or not the quantized frequency component is 0, a buffer for storing the value of the quantized frequency component, and a buffer for storing a value of the comparator. And a register for holding the position of the quantized frequency component which is not 0, so that the EOB detecting means uses the EOB in the processing target block.
The insertion position of the code can be detected and indicated to the encoding means.

【0084】また、本発明の請求項3に記載の符号化回
路によれば、請求項1に記載の符号化回路において、上
記EOB検出手段は、上記量子化手段と、該量子化手段
からの上記処理対象ブロック分の上記量子化された周波
数成分を一時保持するメモリとの間に設けられており、
上記量子化手段より入力される上記量子化された周波数
成分の位置を検出するカウンタと、上記量子化された周
波数成分が0であるか否かを比較する第1の比較器と、
上記量子化された周波数成分の値を格納するバッファ
と、上記カウンタの値を上記所定のスキャン順の値に変
換する変換テーブルと、上記第1の比較器の結果に基づ
いて、上記0でない量子化された周波数成分の所定のス
キャン順での位置を保持するレジスタと、上記レジスタ
に保持された位置が、上記処理対象ブロックの最後尾の
0でない量子化された周波数成分の上記所定のスキャン
順での位置であるか否かを比較する第2の比較器とを備
えるようにしたので、上記EOB検出手段において、上
記処理対象ブロックにおけるEOB符号の挿入位置を検
出して、上記符号化手段に示すことができる。
According to a third aspect of the present invention, in the encoding circuit according to the first aspect, the EOB detecting means includes: the quantizing means; It is provided between the processing target block and a memory that temporarily stores the quantized frequency components,
A counter for detecting the position of the quantized frequency component input from the quantizing means, and a first comparator for comparing whether the quantized frequency component is 0 or not;
A buffer for storing the value of the quantized frequency component, a conversion table for converting the value of the counter into a value in the predetermined scan order, and a non-zero quantum based on a result of the first comparator. A register for holding a position of the digitized frequency component in a predetermined scan order, and a position held in the register for storing the position of the last non-zero quantized frequency component of the processing target block in the predetermined scan order. And a second comparator for comparing whether or not the position is the position of the EOB code, so that the EOB detecting means detects the insertion position of the EOB code in the processing target block, and Can be shown.

【0085】また、本発明の請求項4に記載の符号化回
路によれば、請求項1に記載の符号化回路において、上
記EOB検出手段は、上記周波数変換手段と上記量子化
手段との間に設けられており、上記周波数変換手段より
入力される周波数成分の位置を検出するカウンタと、上
記周波数成分と、上記量子化手段において該周波数成分
を除算する除数である量子化値とを比較する第1の比較
器と、上記カウンタの値を上記所定のスキャン順の値に
変換する変換テーブルと、上記第1の比較器の結果に基
づいて、上記0でない量子化された周波数成分の所定の
スキャン順での位置を保持するレジスタと、上記レジス
タに保持された位置が、上記処理対象ブロックの最後尾
の0でない量子化された周波数成分の上記所定のスキャ
ン順での位置であるか否かを比較する第2の比較器とを
備えるようにしたので、上記EOB検出手段において、
上記処理対象ブロックにおけるEOB符号の挿入位置を
検出して、上記符号化手段に示すことができる。
According to a fourth aspect of the present invention, in the encoding circuit according to the first aspect, the EOB detecting means is provided between the frequency converting means and the quantizing means. And a counter for detecting the position of the frequency component input from the frequency conversion means, and comparing the frequency component with a quantized value which is a divisor for dividing the frequency component in the quantization means. A first comparator, a conversion table for converting the value of the counter into the value in the predetermined scan order, and a predetermined value of the non-zero quantized frequency component based on a result of the first comparator. The register holding the position in the scan order and the position held in the register are the position of the last non-zero quantized frequency component of the processing target block in the predetermined scan order. Since so and a second comparator for comparing whether, in the EOB detection unit,
The insertion position of the EOB code in the block to be processed can be detected and indicated to the encoding means.

【0086】また、本発明の請求項5に記載の符号化回
路によれば、処理対象ブロックのデータを周波数成分に
周波数変換する周波数変換手段と、該周波数成分を量子
化する量子化手段と、該量子化された周波数成分を、所
定のスキャン順で可変長符号化する符号化手段と、を備
えた符号化回路において、上記処理対象ブロックの最後
尾の、0でない量子化された周波数成分の上記所定のス
キャン順での位置を検出し、該位置を制御信号として上
記量子化手段及び上記符号化手段に出力するEOB検出
手段を備え、上記量子化手段は、上記制御信号が示す上
記所定のスキャン順での位置までにある上記周波数成分
に対して量子化して、量子化処理を休止し、上記符号化
手段は、上記制御信号が示す上記所定のスキャン順での
位置にある上記量子化された周波数成分まで可変長符号
化して、有効成分の最終位置であることを示すEOB符
号を付加し、可変長符号化処理を休止するようにしたの
で、上記量子化手段において量子化する前に、上記EO
B符号を挿入する位置を検出して、該位置にある周波数
成分から処理対象ブロックの最終の周波数成分までの量
子化処理、及び該位置にある量子化された周波数成分か
ら処理対象ブロックの最終の量子化された周波数成分ま
での可変長符号処理を休止することが可能になり、その
結果、画質に悪影響を全く与えることなく、より多くの
消費電力の削減をすることができる。
According to the encoding circuit of the fifth aspect of the present invention, a frequency converting means for converting the data of the processing target block into a frequency component, a quantizing means for quantizing the frequency component, Encoding means for performing variable-length encoding of the quantized frequency component in a predetermined scan order, wherein a non-zero quantized frequency component at the end of the processing target block is EOB detection means for detecting a position in the predetermined scan order and outputting the position as a control signal to the quantization means and the encoding means, wherein the quantization means The frequency component up to the position in the scan order is quantized, and the quantization process is paused. The encoding means performs the quantity in the position in the predetermined scan order indicated by the control signal. Variable-length coding up to the converted frequency component, an EOB code indicating the final position of the effective component is added, and the variable-length coding process is paused. The above EO
The position where the B code is inserted is detected, and quantization processing from the frequency component at the position to the final frequency component of the processing target block, and the final processing of the processing target block from the quantized frequency component at the position The variable-length code processing up to the quantized frequency component can be suspended, and as a result, more power consumption can be reduced without any adverse effect on the image quality.

【0087】また、本発明の請求項6に記載の符号化回
路によれば、請求項5に記載の符号化回路において、上
記EOB検出手段は、上記周波数変換手段と上記量子化
手段との間に設けられており、上記周波数変換手段から
の上記処理対象ブロック分の上記周波数成分を一時保持
して上記所定のスキャン順で出力するメモリと、上記メ
モリより上記所定のスキャン順で入力される周波数成分
の位置を検出するカウンタと、上記周波数成分と、上記
量子化手段において該周波数成分を除算する除数である
量子化値とを比較する第1の比較器と、上記周波数成分
の値を格納するバッファと、上記第1の比較器の結果に
基づいて、上記0でない量子化された周波数成分の所定
のスキャン順での位置を保持するレジスタとを備えるよ
うにしたので、上記EOB検出手段において、上記処理
対象ブロックにおけるEOB符号の挿入位置を検出し
て、上記量子化手段及び符号化手段に示すことができ
る。
According to the encoding circuit of the present invention, in the encoding circuit of the present invention, the EOB detecting means is provided between the frequency converting means and the quantizing means. A memory for temporarily storing the frequency components for the processing target block from the frequency conversion means and outputting the frequency components in the predetermined scan order, and a frequency input from the memory in the predetermined scan order. A counter for detecting the position of the component, a first comparator for comparing the frequency component with a quantized value which is a divisor for dividing the frequency component in the quantization means, and stores the value of the frequency component A buffer for storing the position of the non-zero quantized frequency component in a predetermined scan order based on the result of the first comparator; In EOB detection unit detects the insertion position of the EOB code in the target block, it can be shown in the quantization means and coding means.

【0088】また、本発明の請求項7に記載の符号化方
法によれば、処理対象ブロックのデータを周波数成分に
周波数変換する周波数変換ステップと、上記周波数成分
を量子化する量子化ステップと、上記量子化された周波
数成分がゼロであるか否かを判断して、上記処理対象ブ
ロックの最後尾の、0でない量子化された周波数成分の
所定のスキャン順での位置を検出するEOB検出ステッ
プと、上記EOB検出ステップにおいて検出された上記
周波数成分の所定のスキャン順での位置までにある上記
量子化された周波数成分に対して可変長符号化して、有
効成分の最終位置であることを示すEOB符号を付加
し、可変長符号化処理を休止する符号化ステップとを有
するようにしたので、可変長符号化を行う前に上記EO
B符号の挿入位置を検出して、該位置にある量子化され
た周波数成分から処理対象ブロックの最終の量子化され
た周波数成分までの可変長符号処理を休止することが可
能になり、その結果、画質に悪影響を全く与えることな
く、適応的な消費電力の削減をすることができる。
Further, according to the encoding method of the present invention, a frequency conversion step of frequency-converting the data of the block to be processed into a frequency component, a quantization step of quantizing the frequency component, An EOB detection step of determining whether the quantized frequency component is zero and detecting the position of the last non-zero quantized frequency component in the predetermined scanning order at the end of the processing target block; And the variable-length coding of the quantized frequency component up to a position in the predetermined scanning order of the frequency component detected in the EOB detection step, to indicate that this is the final position of the effective component. An EOB code is added, and an encoding step for suspending the variable length encoding process is provided.
By detecting the insertion position of the B code, it becomes possible to suspend the variable length code processing from the quantized frequency component at the position to the final quantized frequency component of the processing target block, and as a result, In addition, it is possible to adaptively reduce power consumption without adversely affecting image quality.

【0089】また、本発明の請求項8に記載の符号化方
法によれば、処理対象ブロックのデータを周波数成分に
周波数変換する周波数変換ステップと、上記周波数成分
と量子化処理において該周波数成分を除算する除数であ
る量子化値とを比較して、上記処理対象ブロックの最後
尾の、0でない量子化された周波数成分の所定のスキャ
ン順での位置を検出するEOB検出ステップと、上記周
波数成分を量子化する量子化ステップと、上記EOB検
出ステップにおいて検出された上記周波数成分の所定の
スキャン順での位置までにある上記量子化された周波数
成分に対して可変長符号化して、有効成分の最終位置で
あることを示すEOB符号を付加し、可変長符号化処理
を休止する符号化ステップとを有するようにしたので、
可変長符号化を行う前に上記EOB符号の挿入位置を検
出して、該位置にある量子化された周波数成分から処理
対象ブロックの最終の量子化された周波数成分までの可
変長符号処理を休止することが可能になり、その結果、
画質に悪影響を全く与えることなく、適応的な消費電力
の削減をすることができる。
Further, according to the encoding method of the present invention, a frequency conversion step of frequency-converting the data of the block to be processed into a frequency component; An EOB detection step of comparing a quantized value, which is a divisor to be divided, to detect the position of the last non-zero quantized frequency component in the predetermined scan order in the last block of the processing target block; And a variable-length encoding of the quantized frequency component up to a position in a predetermined scan order of the frequency component detected in the EOB detection step, and An EOB code indicating the final position is added, and an encoding step for suspending the variable length encoding process is provided.
Before performing the variable-length coding, the insertion position of the EOB code is detected, and the variable-length coding process from the quantized frequency component at the position to the final quantized frequency component of the processing target block is paused. And as a result,
Adaptive power consumption can be reduced without any adverse effect on image quality.

【0090】また、本発明の請求項9に記載の符号化方
法によれば、処理対象ブロックのデータを周波数成分に
周波数変換する周波数変換ステップと、上記周波数成分
と、量子化処理において該周波数成分を除算する除数で
ある量子化値とを比較して、上記処理対象ブロックの最
後尾の0、でない量子化された周波数成分の、所定のス
キャン順での位置を検出するEOB検出ステップと、上
記EOB検出ステップにおいて検出された上記周波数成
分の所定のスキャン順での位置までにある上記周波数成
分に対して量子化して、量子化処理を休止する量子化ス
テップと、上記周波数成分の所定のスキャン順での位置
までにある上記量子化された周波数成分に対して可変長
符号化して、有効成分の最終位置であることを示すEO
B符号を付加し、可変長符号化処理を休止する符号化ス
テップとを有するようにしたので、量子化する前に上記
EOB符号を挿入する位置を検出して、該位置にある周
波数成分から処理対象ブロックの最終の周波数成分まで
の量子化処理、及び該位置にある量子化された周波数成
分から処理対象ブロックの最終の量子化された周波数成
分までの可変長符号処理を休止することが可能になり、
その結果、画質に悪影響を全く与えることなく、より多
くの消費電力の削減をすることができる。
According to the encoding method of the ninth aspect of the present invention, the frequency conversion step of frequency-converting the data of the block to be processed into a frequency component; the frequency component; An EOB detection step of comparing a quantized value which is a divisor to divide the current block and detecting a position of a quantized frequency component other than the last 0 in the processing target block in a predetermined scanning order; A quantization step of quantizing the frequency components up to a position in the predetermined scan order of the frequency components detected in the EOB detection step, and suspending the quantization process; and a predetermined scan order of the frequency components. The variable-length coding is performed on the quantized frequency component up to the position of EO to indicate that it is the final position of the effective component.
A coding step of adding a B code and suspending the variable-length coding process. Therefore, before quantization, a position where the EOB code is inserted is detected, and processing is performed from a frequency component at the position. It is possible to suspend the quantization processing up to the final frequency component of the target block and the variable length code processing from the quantized frequency component at the position to the final quantized frequency component of the processing target block. Become
As a result, more power consumption can be reduced without adversely affecting the image quality.

【0091】また、本発明の請求項10に記載の符号化
プログラムによれば、コンピュータに、処理対象ブロッ
クのデータを周波数変換して量子化し、該量子化された
周波数成分を所定のスキャン順で可変長符号化する処理
を実行させるための符号化プログラムであって、処理対
象ブロックのデータを周波数成分に周波数変換する周波
数変換ステップと、上記周波数成分を量子化する量子化
ステップと、上記量子化された周波数成分がゼロである
か否かを判断して、上記処理対象ブロックの最後尾の、
0でない量子化された周波数成分の上記所定のスキャン
順での位置を検出するEOB検出ステップと、上記EO
B検出ステップにおいて検出された上記周波数成分の所
定のスキャン順での位置までにある上記量子化された周
波数成分に対して可変長符号化して、有効成分の最終位
置であることを示すEOB符号を付加し、可変長符号化
処理を休止する符号化ステップとを含むようにしたの
で、処理対象ブロックのデータを周波数変換して量子化
し、該量子化された周波数成分を所定のスキャン順で可
変長符号化する処理において、画質に悪影響を全く与え
ることなく、適応的な消費電力の削減が可能なプログラ
ムを提供することができる。
According to the encoding program of the present invention, the data of the block to be processed is frequency converted and quantized by the computer, and the quantized frequency components are converted in a predetermined scanning order. A coding program for executing a process of performing variable-length coding, comprising: a frequency conversion step of performing frequency conversion of data of a processing target block into a frequency component; a quantization step of quantizing the frequency component; It is determined whether the frequency component is zero or not, and at the end of the processing target block,
An EOB detecting step of detecting a position of the non-zero quantized frequency component in the predetermined scan order;
The quantized frequency component up to the position in the predetermined scan order of the frequency component detected in the B detection step is subjected to variable-length encoding to generate an EOB code indicating the final position of the effective component. And a coding step of suspending the variable-length coding process, so that the data of the processing target block is frequency-converted and quantized, and the quantized frequency components are subjected to variable-length In the encoding process, it is possible to provide a program capable of adaptively reducing power consumption without adversely affecting image quality.

【0092】また、本発明の請求項11に記載の符号化
プログラムによれば、コンピュータに、処理対象ブロッ
クのデータを周波数変換して量子化し、該量子化された
周波数成分を所定のスキャン順で可変長符号化する処理
を実行させるための符号化プログラムであって、処理対
象ブロックのデータを周波数成分に周波数変換する周波
数変換ステップと、上記周波数成分と、量子化処理にお
いて該周波数成分を除算する除数である量子化値とを比
較して、上記処理対象ブロックの最後尾の、0でない量
子化された周波数成分の上記所定のスキャン順での位置
を検出するEOB検出ステップと、上記周波数成分を量
子化する量子化ステップと、上記EOB検出ステップに
おいて検出された上記周波数成分の所定のスキャン順で
の位置までにある上記量子化された周波数成分に対して
可変長符号化して、有効成分の最終位置であることを示
すEOB符号を付加し、可変長符号化処理を休止する符
号化ステップとを含むようにしたので、処理対象ブロッ
クのデータを周波数変換して量子化し、該量子化された
周波数成分を所定のスキャン順で可変長符号化する処理
において、画質に悪影響を全く与えることなく、適応的
な消費電力の削減が可能なプログラムを提供することが
できる。
According to the encoding program of the present invention, the data of the block to be processed is frequency-converted and quantized by the computer, and the quantized frequency components are converted in a predetermined scanning order. A coding program for performing a process of performing variable length coding, the frequency converting step of performing frequency conversion of data of a processing target block into a frequency component, and dividing the frequency component in the quantization process with the frequency component. An EOB detection step of comparing a quantized value which is a divisor to detect a position of the last non-zero quantized frequency component in the predetermined scan order at the end of the block to be processed; A quantizing step for quantizing, and the frequency component detected in the EOB detecting step is located at a position in a predetermined scanning order. The variable-length coding is performed on the quantized frequency component, an EOB code indicating the final position of the effective component is added, and the coding step for stopping the variable-length coding process is included. In the process of frequency-converting and quantizing the data of the processing target block and performing variable-length coding on the quantized frequency components in a predetermined scanning order, adaptive power consumption without adversely affecting the image quality. A program that can be reduced can be provided.

【0093】また、本発明の請求項12に記載の符号化
プログラムによれば、コンピュータに、処理対象ブロッ
クのデータを周波数変換して量子化し、該量子化された
周波数成分を所定のスキャン順で可変長符号化する処理
を実行させるための符号化プログラムであって、処理対
象ブロックのデータを周波数成分に周波数変換する周波
数変換ステップと、上記周波数成分と量子化処理におい
て該周波数成分を除算する除数である量子化値とを比較
して、上記処理対象ブロックの最後尾の、0でない量子
化された周波数成分の上記所定のスキャン順での位置を
検出するEOB検出ステップと、上記EOB検出ステッ
プにおいて検出された上記周波数成分の所定のスキャン
順での位置までにある上記周波数成分に対して量子化し
て、量子化処理を休止する量子化ステップと、上記周波
数成分の所定のスキャン順での位置までにある上記量子
化された周波数成分に対して可変長符号化して、有効成
分の最終位置であることを示すEOB符号を付加し、可
変長符号化処理を休止する符号化ステップとを含むよう
にしたので、処理対象ブロックのデータを周波数変換し
て量子化し、該量子化された周波数成分を所定のスキャ
ン順で可変長符号化する処理において、画質に悪影響を
全く与えることなく、より多くの消費電力の削減が可能
なプログラムを提供することができる。
According to the encoding program of the twelfth aspect of the present invention, the data of the block to be processed is frequency-converted and quantized by the computer, and the quantized frequency components are converted in a predetermined scanning order. A frequency conversion step of performing frequency conversion of data of a processing target block into a frequency component, and a divisor for dividing the frequency component in the quantization process. And an EOB detection step of detecting the position of the last non-zero quantized frequency component in the predetermined scan order at the end of the processing target block, The detected frequency component is quantized with respect to the frequency component up to a position in a predetermined scan order, and a quantization process is performed. And a variable length encoding of the quantized frequency component up to the position of the frequency component in a predetermined scan order, and an EOB code indicating the final position of the effective component. And a coding step of suspending the variable-length coding process, so that the data of the processing target block is frequency-converted and quantized, and the quantized frequency components are subjected to variable-length coding in a predetermined scan order. In the encoding process, it is possible to provide a program capable of further reducing power consumption without adversely affecting image quality.

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

【図1】本発明の実施の形態1における、符号化回路の
構成を示す図である。
FIG. 1 is a diagram illustrating a configuration of an encoding circuit according to Embodiment 1 of the present invention.

【図2】本発明の実施の形態1の符号化回路における、
EOB検出器の詳細な構成を示す図である。
FIG. 2 is a diagram illustrating an encoding circuit according to the first embodiment of the present invention;
It is a figure showing the detailed composition of an EOB detector.

【図3】本発明の実施の形態1における、符号化回路の
一連の動作を示すフローチャート図である。
FIG. 3 is a flowchart showing a series of operations of the encoding circuit according to the first embodiment of the present invention.

【図4】本発明の実施の形態2における、符号化回路の
構成を示す図である。
FIG. 4 is a diagram illustrating a configuration of an encoding circuit according to a second embodiment of the present invention.

【図5】本発明の実施の形態2の符号化回路における、
EOB検出器の詳細な構成を示す図である。
FIG. 5 is a diagram illustrating an encoding circuit according to a second embodiment of the present invention.
It is a figure showing the detailed composition of an EOB detector.

【図6】本発明の実施の形態2における、符号化回路の
一連の動作を示すフローチャート図である。
FIG. 6 is a flowchart showing a series of operations of an encoding circuit according to Embodiment 2 of the present invention.

【図7】本発明の実施の形態3における、符号化回路の
構成を示す図である。
FIG. 7 is a diagram illustrating a configuration of an encoding circuit according to a third embodiment of the present invention.

【図8】本発明の実施の形態3の符号化回路における、
EOB検出器の詳細な構成を示す図である。
FIG. 8 is a diagram illustrating an encoding circuit according to a third embodiment of the present invention;
It is a figure showing the detailed composition of an EOB detector.

【図9】本発明の実施の形態3における、符号化回路の
一連の動作を示すフローチャート図である。
FIG. 9 is a flowchart showing a series of operations of an encoding circuit according to Embodiment 3 of the present invention.

【図10】本発明の実施の形態4における、符号化回路
の構成を示す図である。
FIG. 10 is a diagram illustrating a configuration of an encoding circuit according to a fourth embodiment of the present invention.

【図11】本発明の実施の形態4の符号化回路におけ
る、EOB検出器の詳細な構成を示す図である。
FIG. 11 is a diagram illustrating a detailed configuration of an EOB detector in an encoding circuit according to a fourth embodiment of the present invention.

【図12】本発明の実施の形態4における、符号化回路
の一連の動作を示すフローチャート図である。
FIG. 12 is a flowchart illustrating a series of operations of an encoding circuit according to Embodiment 4 of the present invention.

【図13】本発明における、ブロック単位のデータを横
送り出力した場合の出力順を示す図(図(a))、ブロック
単位のデータをジグザグスキャンした場合のスキャン順
を示す図(図(b))、並びに、データ処理順とそれに対応
するジグザグ順,DCT係数,及びその際レジスタに保
持されている値を示す表(図(c))である。
FIG. 13 is a diagram showing an output order when data in units of blocks are output horizontally (FIG. 13 (a)), and a diagram showing a scan order when zigzag scanning is performed on data in units of blocks (FIG. 13 (b)). )), And a table showing the data processing order, the corresponding zigzag order, DCT coefficients, and the values held in the registers at that time (FIG. 9C).

【図14】本発明の実施の形態において、メモリにデー
タを書きこみ、データを並べ替えて読み出しする状態を
示す図である。
FIG. 14 is a diagram showing a state in which data is written to a memory, and the data is rearranged and read in the embodiment of the present invention.

【図15】従来における符号化回路の構成を示す図であ
る。
FIG. 15 is a diagram illustrating a configuration of a conventional encoding circuit.

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

101,201,301,401,501 DCT 102,202,302,402,502 量子化器 103,203,303,503 メモリ 104,204,304,404,504 符号化器 105,205,305,405 EOB検出器 110,210,310,410 制御信号 311,411 量子化値 1051 比較器 1052,2052,3052,4052 カウンタ 1053,2053,3053,4053 セレクタ 1054,4056 N段シフトレジスタ 1055,2055,3055,4055 レジスタ 2051,3051,4051 第1の比較器 2054,3054 第2の比較器 2056,3056 データ処理順−ジグザグ順変換テ
ーブル 4054 メモリ
101, 201, 301, 401, 501 DCT 102, 202, 302, 402, 502 Quantizer 103, 203, 303, 503 Memory 104, 204, 304, 404, 504 Encoder 105, 205, 305, 405 EOB Detector 110, 210, 310, 410 Control signal 311, 411 Quantized value 1051 Comparator 1052, 2052, 3052, 4052 Counter 1053, 2053, 3053, 4053 Selector 1054, 4056 N-stage shift register 1055, 2055, 3055, 4055 Registers 2051, 3051, 4051 First comparator 2054, 3054 Second comparator 2056, 3056 Data processing order-zigzag order conversion table 4054 Memory

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5C053 FA21 FA23 GA11 GB21 GB22 GB26 GB32 KA01 5C059 KK49 MA23 MC01 MC11 MC24 ME01 SS11 UA02 UA39 5J064 AA00 BA09 BA16 BC00 BC01 BC04 BC05 BC14 BC16 BC25 BC29 BD02 BD03 BD04  ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 5C053 FA21 FA23 GA11 GB21 GB22 GB26 GB32 KA01 5C059 KK49 MA23 MC01 MC11 MC24 ME01 SS11 UA02 UA39 5J064 AA00 BA09 BA16 BC00 BC01 BC04 BC05 BC14 BC16 BC25 BC29 BD02 BD03 BD04

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 処理対象ブロックのデータを周波数成分
に周波数変換する周波数変換手段と、該周波数成分を量
子化する量子化手段と、該量子化された周波数成分を所
定のスキャン順で可変長符号化する符号化手段と、を備
えた符号化回路において、 上記処理対象ブロックの最後尾の、0でない量子化され
た周波数成分の上記所定のスキャン順での位置を検出
し、該位置を制御信号として上記符号化手段に出力する
EOB検出手段を備え、 上記符号化手段は、上記制御信号が示す上記所定のスキ
ャン順での位置までにある上記量子化された周波数成分
に対して可変長符号化して、有効成分の最終位置である
ことを示すEOB符号を付加し、可変長符号化処理を休
止する、 ことを特徴とする符号化回路。
1. A frequency conversion means for frequency-converting data of a block to be processed into a frequency component, a quantization means for quantizing the frequency component, and a variable-length code for converting the quantized frequency component in a predetermined scanning order. A position of the last of the block to be processed in the predetermined scan order of the non-zero quantized frequency component, and the position is controlled by a control signal. EOB detection means for outputting to the encoding means as above, wherein the encoding means performs variable length encoding on the quantized frequency component up to a position in the predetermined scan order indicated by the control signal. An EOB code indicating the last position of the effective component, and suspending the variable-length encoding process.
【請求項2】 請求項1に記載の符号化回路において、 上記EOB検出手段は、上記量子化手段からの上記処理
対象ブロック分の上記量子化された周波数成分を一時保
持して上記所定のスキャン順で出力するメモリと、上記
符号化手段との間に設けられており、 上記メモリから入力される上記量子化された周波数成分
の位置を検出するカウンタと、 上記量子化された周波数成分が0であるか否かを比較す
る比較器と、 上記量子化された周波数成分の値を格納するバッファ
と、 上記比較器の結果に基づいて、上記0でない量子化され
た周波数成分の位置を保持するレジスタと、を備える、 ことを特徴とする符号化回路。
2. The encoding circuit according to claim 1, wherein said EOB detecting means temporarily stores said quantized frequency components of said processing target block from said quantizing means and performs said predetermined scan. A counter for detecting the position of the quantized frequency component input from the memory; A buffer for storing the value of the quantized frequency component, and a position of the non-zero quantized frequency component based on the result of the comparator. And a register.
【請求項3】 請求項1に記載の符号化回路において、 上記EOB検出手段は、上記量子化手段と、該量子化手
段からの上記処理対象ブロック分の上記量子化された周
波数成分を一時保持するメモリとの間に設けられてお
り、 上記量子化手段より入力される上記量子化された周波数
成分の位置を検出するカウンタと、 上記量子化された周波数成分が0であるか否かを比較す
る第1の比較器と、 上記量子化された周波数成分の値を格納するバッファ
と、 上記カウンタの値を上記所定のスキャン順の値に変換す
る変換テーブルと、 上記第1の比較器の結果に基づいて、上記0でない量子
化された周波数成分の所定のスキャン順での位置を保持
するレジスタと、 上記レジスタに保持された位置が、上記処理対象ブロッ
クの最後尾の0でない量子化された周波数成分の上記所
定のスキャン順での位置であるか否かを比較する第2の
比較器と、を備える、 ことを特徴とする符号化回路。
3. The encoding circuit according to claim 1, wherein said EOB detecting means temporarily holds said quantizing means and said quantized frequency components of said processing target block from said quantizing means. A counter for detecting the position of the quantized frequency component input from the quantizing means, and comparing whether the quantized frequency component is 0 or not. A first comparator, a buffer for storing the value of the quantized frequency component, a conversion table for converting the value of the counter into a value in the predetermined scan order, and a result of the first comparator A register that holds the position of the non-zero quantized frequency component in a predetermined scan order, based on the position of the non-zero quantized frequency component. It has been provided a second comparator for comparing whether the position in the predetermined scan order frequency components, and coding circuit, characterized in that.
【請求項4】 請求項1に記載の符号化回路において、 上記EOB検出手段は、上記周波数変換手段と上記量子
化手段との間に設けられており、 上記周波数変換手段より入力される周波数成分の位置を
検出するカウンタと、 上記周波数成分と、上記量子化手段において該周波数成
分を除算する除数である量子化値とを比較する第1の比
較器と、 上記カウンタの値を上記所定のスキャン順の値に変換す
る変換テーブルと、 上記第1の比較器の結果に基づいて、上記0でない量子
化された周波数成分の所定のスキャン順での位置を保持
するレジスタと、 上記レジスタに保持された位置が、上記処理対象ブロッ
クの最後尾の0でない量子化された周波数成分の上記所
定のスキャン順での位置であるか否かを比較する第2の
比較器と、を備える、 ことを特徴とする符号化回路。
4. The encoding circuit according to claim 1, wherein said EOB detection means is provided between said frequency conversion means and said quantization means, and wherein a frequency component inputted from said frequency conversion means is provided. A first detector for comparing the frequency component with a quantized value that is a divisor for dividing the frequency component in the quantization means; and a counter for scanning the value of the counter for the predetermined scan. A conversion table for converting the value into a sequence value, a register for holding the position of the non-zero quantized frequency component in a predetermined scan order based on the result of the first comparator, A second comparator for comparing whether or not the calculated position is a position of the last non-zero quantized frequency component of the processing target block in the predetermined scanning order. Encoding circuit, wherein the door.
【請求項5】 処理対象ブロックのデータを周波数成分
に周波数変換する周波数変換手段と、該周波数成分を量
子化する量子化手段と、該量子化された周波数成分を、
所定のスキャン順で可変長符号化する符号化手段と、を
備えた符号化回路において、 上記処理対象ブロックの最後尾の、0でない量子化され
た周波数成分の所定のスキャン順での位置を検出し、該
位置を制御信号として上記量子化手段及び上記符号化手
段に出力するEOB検出手段を備え、 上記量子化手段は、上記制御信号が示す上記所定のスキ
ャン順での位置までにある上記周波数成分に対して量子
化して、量子化処理を休止し、 上記符号化手段は、上記制御信号が示す上記所定のスキ
ャン順での位置にある上記量子化された周波数成分まで
可変長符号化して、有効成分の最終位置であることを示
すEOB符号を付加し、可変長符号化処理を休止する、 ことを特徴とする符号化回路。
5. A frequency conversion means for frequency-converting data of a processing target block into a frequency component, a quantization means for quantizing the frequency component, and
Encoding means for performing variable-length encoding in a predetermined scan order, wherein a position of the last non-zero quantized frequency component in the predetermined scan order in the last scan block is detected. And an EOB detecting unit that outputs the position as a control signal to the quantization unit and the encoding unit. Quantizing the component, suspending the quantization process, the encoding means performs variable length encoding up to the quantized frequency component at a position in the predetermined scan order indicated by the control signal, An encoding circuit, comprising: adding an EOB code indicating the last position of an effective component; and suspending variable-length encoding processing.
【請求項6】 請求項5に記載の符号化回路において、 上記EOB検出手段は、上記周波数変換手段と上記量子
化手段との間に設けられており、 上記周波数変換手段からの上記処理対象ブロック分の上
記周波数成分を一時保持して上記所定のスキャン順で出
力するメモリと、 上記メモリより上記所定のスキャン順で入力される周波
数成分の位置を検出するカウンタと、 上記周波数成分と、上記量子化手段において該周波数成
分を除算する除数である量子化値とを比較する第1の比
較器と、 上記周波数成分の値を格納するバッファと、 上記第1の比較器の結果に基づいて、上記0でない量子
化された周波数成分の所定のスキャン順での位置を保持
するレジスタと、を備える、 ことを特徴とする符号化回路。
6. The encoding circuit according to claim 5, wherein said EOB detection means is provided between said frequency conversion means and said quantization means, and said block to be processed from said frequency conversion means is provided. A memory for temporarily storing the frequency components for the predetermined minutes and outputting the same in the predetermined scan order, a counter for detecting the position of the frequency components input from the memory in the predetermined scan order, the frequency component, and the quantum A first comparator for comparing a quantized value, which is a divisor for dividing the frequency component, in a converting means; a buffer for storing the value of the frequency component; A register for holding a position of a non-zero quantized frequency component in a predetermined scanning order.
【請求項7】 処理対象ブロックのデータを周波数成分
に周波数変換する周波数変換ステップと、 上記周波数成分を量子化する量子化ステップと、 上記量子化された周波数成分がゼロであるか否かを判断
して、上記処理対象ブロックの最後尾の、0でない量子
化された周波数成分の所定のスキャン順での位置を検出
するEOB検出ステップと、 上記EOB検出ステップにおいて検出された上記周波数
成分の所定のスキャン順での位置までにある上記量子化
された周波数成分に対して可変長符号化して、 有効成分の最終位置であることを示すEOB符号を付加
し、可変長符号化処理を休止する符号化ステップと、を
有する、 ことを特徴とする符号化方法。
7. A frequency conversion step of frequency-converting the data of the processing target block into a frequency component, a quantization step of quantizing the frequency component, and determining whether the quantized frequency component is zero. An EOB detection step of detecting the position of the last non-zero quantized frequency component of the processing target block in a predetermined scan order; and a predetermined EOB detection step of the frequency component. Variable length coding of the quantized frequency component up to the position in the scan order, adding an EOB code indicating the final position of the effective component, and suspending the variable length coding process And a coding method.
【請求項8】 処理対象ブロックのデータを周波数成分
に周波数変換する周波数変換ステップと、 上記周波数成分と量子化処理において該周波数成分を除
算する除数である量子化値とを比較して、上記処理対象
ブロックの最後尾の、0でない量子化された周波数成分
の所定のスキャン順での位置を検出するEOB検出ステ
ップと、 上記周波数成分を量子化する量子化ステップと、 上記EOB検出ステップにおいて検出された上記周波数
成分の所定のスキャン順での位置までにある上記量子化
された周波数成分に対して可変長符号化して、 有効成分の最終位置であることを示すEOB符号を付加
し、可変長符号化処理を休止する符号化ステップと、を
有する、 ことを特徴とする符号化方法。
8. A frequency conversion step of frequency-converting data of a processing target block into a frequency component, and comparing the frequency component with a quantized value which is a divisor for dividing the frequency component in a quantization process. An EOB detection step of detecting the position of the last non-zero quantized frequency component of the target block in a predetermined scan order; a quantization step of quantizing the frequency component; and an EOB detection step. The variable frequency coding is performed on the quantized frequency component up to the position in the predetermined scanning order of the frequency component, and an EOB code indicating the final position of the effective component is added. A coding step of suspending the coding process.
【請求項9】 処理対象ブロックのデータを周波数成分
に周波数変換する周波数変換ステップと、 上記周波数成分と、量子化処理において該周波数成分を
除算する除数である量子化値とを比較して、上記処理対
象ブロックの最後尾の、0でない量子化された周波数成
分の所定のスキャン順での位置を検出するEOB検出ス
テップと、 上記EOB検出ステップにおいて検出された上記周波数
成分の所定のスキャン順での位置までにある上記周波数
成分に対して量子化して、量子化処理を休止する量子化
ステップと、 上記周波数成分の所定のスキャン順での位置までにある
上記量子化された周波数成分に対して可変長符号化し
て、有効成分の最終位置であることを示すEOB符号を
付加し、可変長符号化処理を休止する符号化ステップ
と、を有する、 ことを特徴とする符号化方法。
9. A frequency conversion step of frequency-converting data of a processing target block into a frequency component; and comparing the frequency component with a quantization value that is a divisor for dividing the frequency component in a quantization process. An EOB detection step of detecting the position of the last non-zero quantized frequency component in the predetermined scan order of the block to be processed; and A quantization step of quantizing the frequency component up to the position and suspending the quantization process; and Coding step of performing long coding, adding an EOB code indicating the last position of the effective component, and pausing the variable length coding process. An encoding method characterized by:
【請求項10】 コンピュータに、処理対象ブロックの
データを周波数変換して量子化し、該量子化された周波
数成分を所定のスキャン順で可変長符号化する処理を実
行させるための符号化プログラムであって、 処理対象ブロックのデータを周波数成分に周波数変換す
る周波数変換ステップと、 上記周波数成分を量子化する量子化ステップと、 上記量子化された周波数成分がゼロであるか否かを判断
して、上記処理対象ブロックの最後尾の、0でない量子
化された周波数成分の上記所定のスキャン順での位置を
検出するEOB検出ステップと、 上記EOB検出ステップにおいて検出された上記周波数
成分の所定のスキャン順での位置までにある上記量子化
された周波数成分に対して可変長符号化して、有効成分
の最終位置であることを示すEOB符号を付加し、可変
長符号化処理を休止する符号化ステップと、を含む、 ことを特徴とする符号化プログラム。
10. An encoding program for causing a computer to perform a process of frequency-converting and quantizing data of a block to be processed and performing variable-length encoding of the quantized frequency components in a predetermined scan order. A frequency conversion step of frequency-converting the data of the processing target block into a frequency component, a quantization step of quantizing the frequency component, and determining whether the quantized frequency component is zero, An EOB detecting step of detecting a position of the last non-zero quantized frequency component of the processing target block in the predetermined scan order; and a predetermined scan order of the frequency component detected in the EOB detection step. Variable length coding is performed on the quantized frequency component up to the position at to indicate that the effective component is the final position. Adding OB code includes a coding step of pausing the variable length coding process, the encoding program characterized by.
【請求項11】 コンピュータに、処理対象ブロックの
データを周波数変換して量子化し、該量子化された周波
数成分を所定のスキャン順で可変長符号化する処理を実
行させるための符号化プログラムであって、 処理対象ブロックのデータを周波数成分に周波数変換す
る周波数変換ステップと、 上記周波数成分と、量子化処理において該周波数成分を
除算する除数である量子化値とを比較して、上記処理対
象ブロックの最後尾の、0でない量子化された周波数成
分の上記所定のスキャン順での位置を検出するEOB検
出ステップと、 上記周波数成分を量子化する量子化ステップと、 上記EOB検出ステップにおいて検出された上記周波数
成分の所定のスキャン順での位置までにある上記量子化
された周波数成分に対して可変長符号化して、有効成分
の最終位置であることを示すEOB符号を付加し、可変
長符号化処理を休止する符号化ステップと、を含む、 ことを特徴とする符号化プログラム。
11. An encoding program for causing a computer to perform a process of frequency-converting and quantizing data of a block to be processed and performing variable-length encoding of the quantized frequency components in a predetermined scan order. A frequency conversion step of frequency-converting the data of the processing target block into a frequency component; and comparing the frequency component with a quantized value that is a divisor for dividing the frequency component in the quantization processing. An EOB detection step of detecting the position of the last non-zero quantized frequency component in the predetermined scan order; a quantization step of quantizing the frequency component; and an EOB detection step. Variable-length encoding the quantized frequency component up to a position in the predetermined scan order of the frequency component, Adding EOB code indicating the end position of the active ingredient, comprising an encoding step of pausing the variable length coding process, the encoding program characterized by.
【請求項12】 コンピュータに、処理対象ブロックの
データを周波数変換して量子化し、該量子化された周波
数成分を所定のスキャン順で可変長符号化する処理を実
行させるための符号化プログラムであって、 処理対象ブロックのデータを周波数成分に周波数変換す
る周波数変換ステップと、 上記周波数成分と量子化処理において該周波数成分を除
算する除数である量子化値とを比較して、上記処理対象
ブロックの最後尾の、0でない量子化された周波数成分
の上記所定のスキャン順での位置を検出するEOB検出
ステップと、 上記EOB検出ステップにおいて検出された上記周波数
成分の所定のスキャン順での位置までにある上記周波数
成分に対して量子化して、量子化処理を休止する量子化
ステップと、 上記周波数成分の所定のスキャン順での位置までにある
上記量子化された周波数成分に対して可変長符号化し
て、有効成分の最終位置であることを示すEOB符号を
付加し、可変長符号化処理を休止する符号化ステップ
と、を含む、 ことを特徴とする符号化プログラム。
12. An encoding program for causing a computer to perform a process of frequency-converting and quantizing data of a processing target block and performing variable-length encoding of the quantized frequency components in a predetermined scan order. A frequency conversion step of frequency-converting the data of the processing target block into a frequency component; and comparing the frequency component with a quantized value that is a divisor for dividing the frequency component in the quantization processing. An EOB detection step for detecting the position of the last non-zero quantized frequency component in the predetermined scan order; and a position of the frequency component detected in the EOB detection step in the predetermined scan order. A quantization step of quantizing the certain frequency component and suspending the quantization process; Variable-length coding of the quantized frequency component up to the position in the order of the effective component, adding an EOB code indicating the final position of the effective component, and suspending the variable-length coding process. And an encoding program.
JP2002057233A 2001-03-02 2002-03-04 Encoding circuit and encoding method Pending JP2002330435A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002057233A JP2002330435A (en) 2001-03-02 2002-03-04 Encoding circuit and encoding method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001-57749 2001-03-02
JP2001057749 2001-03-02
JP2002057233A JP2002330435A (en) 2001-03-02 2002-03-04 Encoding circuit and encoding method

Publications (1)

Publication Number Publication Date
JP2002330435A true JP2002330435A (en) 2002-11-15

Family

ID=26610482

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002057233A Pending JP2002330435A (en) 2001-03-02 2002-03-04 Encoding circuit and encoding method

Country Status (1)

Country Link
JP (1) JP2002330435A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007088826A (en) * 2005-09-22 2007-04-05 Fuji Xerox Co Ltd Data processing method and data processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007088826A (en) * 2005-09-22 2007-04-05 Fuji Xerox Co Ltd Data processing method and data processor
JP4582413B2 (en) * 2005-09-22 2010-11-17 富士ゼロックス株式会社 Data processing method and data processing apparatus

Similar Documents

Publication Publication Date Title
US6014095A (en) Variable length encoding system
US5748249A (en) Variable transfer rate control coding apparatus
US6714686B2 (en) Image processing device
JP4825644B2 (en) Image decoding apparatus, image encoding apparatus, and system LSI
WO2006098226A1 (en) Encoding device and dynamic image recording system having the encoding device
US7054500B1 (en) Video compression and decompression system with postfilter to filter coding artifacts
JPH09191448A (en) Video signal coder and its method
JP3395892B2 (en) Video encoding device
US7092446B2 (en) Compression-encoded data decoding apparatus
US20020122483A1 (en) Encoding circuit and method
EP1083752A1 (en) Video decoder with reduced memory
WO2006000964A1 (en) Video transcoding with selection of data portions to be processed
KR100249235B1 (en) Hdtv video decoder
JP2002330435A (en) Encoding circuit and encoding method
US20010026641A1 (en) Image change detecting apparatus and image change detecting method, image encoding apparatus and information recording medium having image change detecting program recorded in computer readable manner
WO2001071650A1 (en) Method and apparatus for run-length encoding video data
US20020087933A1 (en) Quantization unit setting apparatus, quantization unit setting method, coding apparatus, coding method, and information record medium
KR100200627B1 (en) Video signal compression encoding device
CN100334885C (en) Image signal compression coding method and apparatus
JP3049265B2 (en) Image data coding circuit
US7653253B2 (en) Moving image decoder
JP4214554B2 (en) Video decoding device
JP2820718B2 (en) Image coding device
JP3139242B2 (en) Video signal processing device
JP2022548685A (en) Encoding and decoding image data

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050301

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050628