JP3313911B2 - Quantizer - Google Patents

Quantizer

Info

Publication number
JP3313911B2
JP3313911B2 JP27748294A JP27748294A JP3313911B2 JP 3313911 B2 JP3313911 B2 JP 3313911B2 JP 27748294 A JP27748294 A JP 27748294A JP 27748294 A JP27748294 A JP 27748294A JP 3313911 B2 JP3313911 B2 JP 3313911B2
Authority
JP
Japan
Prior art keywords
dividend
divisor
division
output
quantization
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.)
Expired - Fee Related
Application number
JP27748294A
Other languages
Japanese (ja)
Other versions
JPH08137671A (en
Inventor
勉 安藤
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP27748294A priority Critical patent/JP3313911B2/en
Publication of JPH08137671A publication Critical patent/JPH08137671A/en
Application granted granted Critical
Publication of JP3313911B2 publication Critical patent/JP3313911B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Facsimile Image Signal Circuits (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、画像信号や音声信号の
符号化などに使用される量子化装置に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a quantization device used for coding an image signal or a sound signal.

【0002】[0002]

【従来の技術】多値画像の符号化を行うための従来の符
号化装置の構成例を図8に示す。同図において、801
は前処理部であり、入力される画像データに対して色空
間変換やサブサンプリングなどの前処理を行う。802
は変換部であり、上記前処理部801により前処理が施
された画像データに対して2次元DCT(離散コサイン
変換)などの周波数軸への変換処理を行い、その変換係
数であるDCT係数を出力する。変換部802はまた、
2次元データから1次元データへのデータ列変換も行っ
ている。
2. Description of the Related Art FIG. 8 shows a configuration example of a conventional encoding device for encoding a multi-valued image. Referring to FIG.
Is a preprocessing unit that performs preprocessing such as color space conversion and subsampling on input image data. 802
Denotes a transform unit that performs a transform process on the frequency axis such as two-dimensional DCT (discrete cosine transform) on the image data pre-processed by the pre-process unit 801, Output. The conversion unit 802 also
Data string conversion from two-dimensional data to one-dimensional data is also performed.

【0003】803は量子化部であり、上記変換部80
2から出力されるDCT係数を所定の量子化パラメータ
を用いて量子化する。すなわち、量子化部803は、D
CT係数を量子化パラメータで除算することにより量子
化データを求める。804はエントロピー符号化部であ
り、上記量子化部803から出力される量子化データを
エントロピー符号化し、符号データを出力する。エント
ロピー符号化を実現する手段として、例えばランレング
スハフマン符号化や算術符号化等が用いられる。805
は制御部であり、全体の動作タイミングやデータフロー
を制御する。以上に述べた従来例は、国際標準規格であ
るISO/IEC 10918-1 (JPEG)などに一般的に採用されてい
る。
[0003] Reference numeral 803 denotes a quantization unit.
2 are quantized using a predetermined quantization parameter. That is, the quantization unit 803 calculates D
Quantized data is obtained by dividing the CT coefficient by the quantization parameter. Reference numeral 804 denotes an entropy encoding unit that entropy-encodes the quantized data output from the quantization unit 803 and outputs coded data. As means for implementing entropy coding, for example, run-length Huffman coding, arithmetic coding, or the like is used. 805
Is a control unit, which controls the overall operation timing and data flow. The conventional example described above is generally adopted in the international standard ISO / IEC 10918-1 (JPEG) and the like.

【0004】以下、本発明の着眼点である量子化部80
3における量子化処理について説明を加える。DCTを
用いた符号化方式においては、量子化部803では、D
CT係数(被除数)と量子化パラメータ(除数)とを用
いて、整数演算を主体とした除算動作が行われる。な
お、DCT係数および量子化パラメータは、それぞれ有
効ビット長を有している。
[0004] A quantization unit 80 which is the focus of the present invention will be described below.
3 will be described. In the coding method using DCT, the quantization unit 803 uses D
Using the CT coefficient (dividend) and the quantization parameter (divisor), a division operation mainly based on integer operation is performed. Note that the DCT coefficient and the quantization parameter each have an effective bit length.

【0005】通常、DCTでは、8×8画素のブロック
サイズが一般に使用されるので、64回の除算演算が一
度に実行される。図9に、その除算演算の実行例を示
す。この例では、パイプライン処理によって64回の除
算演算が順次行われることが示されている。図9におい
て、横方向は処理の経過時間を示し、縦方向は64回の
除算演算のそれぞれの処理を示している。この図から明
らかなように、1回の除算演算にかかる時間を最大有効
ビット長に対して最大nサイクルとすると、64回の除
算演算を全て終了するまでに(n+64)サイクルが必
要であることが分かる。
[0005] In DCT, since a block size of 8x8 pixels is generally used, 64 division operations are performed at once. FIG. 9 shows an execution example of the division operation. In this example, 64 division operations are sequentially performed by pipeline processing. In FIG. 9, the horizontal direction indicates the elapsed time of the process, and the vertical direction indicates each process of the 64 division operations. As is apparent from this figure, if the time required for one division operation is n cycles at the maximum with respect to the maximum effective bit length, (n + 64) cycles are required until all 64 division operations are completed. I understand.

【0006】図10は、除算演算のその他の実行例を示
す図である。この例では、除数および被除数の有効ビッ
ト長によって除算にかかる時間(実線で表記した部分)
が異なるため、これによって生じるパイプラインの乱れ
を防止するために点線で表記したアイドル時間が挿入さ
れている。したがって、この場合でも64回の除算演算
を実行するのに実際に必要な時間は、図9に示した場合
と同様に(n+64)サイクルである。なお、実際の運
用では、1つ以上のブロック(8×8画素)が存在する
ため、以上のような処理が更にブロック単位で連続して
行われることになる。
FIG. 10 is a diagram showing another example of execution of the division operation. In this example, the time required for the division by the effective bit length of the divisor and the dividend (the part indicated by the solid line)
Therefore, an idle time indicated by a dotted line is inserted in order to prevent the pipeline from being disturbed due to this. Therefore, in this case, the time actually required to execute the 64 division operations is (n + 64) cycles as in the case shown in FIG. In an actual operation, since one or more blocks (8 × 8 pixels) exist, the above-described processing is further continuously performed in block units.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、上記従
来例では、以下のような問題があった。すなわち、量子
化で行われる除算処理には多くのサイクル数を必要とす
るため、全体の処理時間が長くなってしまう。上述のよ
うなパイプライン処理によって高速化することも考えら
れているが、パイプラインの乱れを生じさせないために
アイドル時間が挿入されるので、除数や被除数がいかな
る値であっても、最大処理時間と同じ時間がかかってし
まうという問題があった。
However, the above conventional example has the following problems. In other words, since the division process performed by quantization requires a large number of cycles, the entire processing time becomes long. Although it is considered that the speed is increased by the pipeline processing as described above, the idle time is inserted in order to prevent the pipeline from being disturbed, so that even if the divisor or the dividend is any value, the maximum processing time There is a problem that it takes the same time.

【0008】本発明は、このような問題を解決するため
に成されたものであり、量子化処理を高速に行うことが
できるようにすることを目的としている。
The present invention has been made to solve such a problem, and has as its object to enable high-speed quantization processing.

【0009】[0009]

【課題を解決するための手段】本発明の量子化装置は、
連続的に入力される除数と被除数との大小を比較する比
較手段と、上記比較手段による比較の結果、連続的に上
記除数が被除数よりも大きくなった回数をカウントする
カウンタと、上記比較手段の比較結果に応じて上記除数
と被除数とを用いた除算演算を行う除算手段と、上記カ
ウンタの出力と上記除算手段の出力との何れか一方を選
択して出力する選択手段とを設けたものである。
According to the present invention, there is provided a quantization apparatus comprising:
A comparing means for comparing the magnitudes of the divisor and the dividend to be continuously input; a counter for counting the number of times the divisor is continuously larger than the dividend as a result of the comparison by the comparing means; A division unit for performing a division operation using the divisor and the dividend according to the comparison result; and a selection unit for selecting and outputting one of the output of the counter and the output of the division unit. is there.

【0010】また、上記カウンタの出力と上記除算手段
の出力とを識別し、その識別信号を出力する識別手段を
更に設けたものである。
[0010] Further, an identification means for identifying the output of the counter and the output of the division means and outputting the identification signal is further provided.

【0011】また、上記連続的に入力される除数および
被除数はそれぞれ有効ビット長を有し、その有効ビット
長に基づいて上記除算手段における除算演算時間を算出
する算出手段と、上記算出手段で算出された上記除算演
算時間の最大値を保持する保持手段とを更に設けたもの
である。
The divisor and the dividend, which are successively input, each have an effective bit length, and a calculating means for calculating a division operation time in the dividing means based on the effective bit length; Holding means for holding the maximum value of the division operation time obtained.

【0012】また、上記除数が所定の量子化パラメータ
であり、上記被除数がデータを離散コサイン変換して得
られたDCT係数であることを特徴とするものである。
Further, the divisor is a predetermined quantization parameter, and the dividend is a DCT coefficient obtained by performing discrete cosine transform of data.

【0013】また、上記除算手段が上記連続的に入力さ
れる除数および被除数を用いてパイプライン処理を行う
ことを特徴とするものである。
[0013] Further, the invention is characterized in that the dividing means performs pipeline processing using the divisor and the dividend which are continuously input.

【0014】[0014]

【作用】上記のように構成した本発明によれば、入力さ
れる除数が被除数よりも小さいときには除算手段におけ
る除算結果が選択手段により選択されて出力されるが、
入力される除数が被除数より大きいときには、その除算
結果は0になると予測されるので、その除算演算は省略
され、連続的に除数>被除数となった回数、すなわち予
測された除算結果の続いた回数を示すカウント値が選択
手段により選択されて出力される。これにより、全体と
しての演算速度を向上させることが可能となる。
According to the present invention constructed as described above, when the input divisor is smaller than the dividend, the division result in the division means is selected by the selection means and output.
If the input divisor is larger than the dividend, the result of the division is expected to be 0, so the division operation is omitted, and the number of times that the divisor> the dividend is continuously obtained, that is, the number of times the predicted division result continues Is selected by the selection means and output. This makes it possible to improve the calculation speed as a whole.

【0015】本発明の他の特徴によれば、除算手段の除
算結果とカウンタのカウント値との区別を示す識別信号
が出力されるので、量子化処理の後段の処理において、
処理対象となるデータが上述の除算結果とカウント値と
の何れであるかを確実に認識することが可能となる。
According to another feature of the present invention, an identification signal indicating the distinction between the result of the division by the dividing means and the count value of the counter is output.
It is possible to reliably recognize whether the data to be processed is the above-described division result or the count value.

【0016】本発明のその他の特徴によれば、保持手段
に保持されている有効な除算演算時間にまでアイドル時
間を挿入するだけで除算演算におけるパイプラインの乱
れを防止することが可能となる。
According to another feature of the present invention, it is possible to prevent the pipeline from being disturbed in the division operation only by inserting the idle time into the effective division operation time held in the holding means.

【0017】[0017]

【実施例】図1は、本発明の第1の実施例による量子化
装置を示すブロック図である。同図において、101は
連続的に入力される被除数(DCT係数)を遅延するた
めのシフトレジスタ、102は連続的に入力される除数
(量子化パラメータ)を遅延するためのシフトレジスタ
である。
FIG. 1 is a block diagram showing a quantization apparatus according to a first embodiment of the present invention. In the figure, reference numeral 101 denotes a shift register for delaying a continuously input dividend (DCT coefficient), and reference numeral 102 denotes a shift register for delaying a continuously input divisor (quantization parameter).

【0018】103は比較制御器であり、連続的に入力
される被除数と除数の大小を比較する比較手段としての
コンパレータ、およびそのコンパレータの出力に応じて
シフトレジスタ101、102のロード/シフト動作を
制御するコントローラを含んでいる。104はリセット
動作が可能なアップカウンタであり、連続的に除数が被
除数よりも大きくなった回数をカウントし、被除数が除
数よりも大きくなった時点でそのカウント値をリセット
する。
Reference numeral 103 denotes a comparison controller, which is a comparator as comparison means for comparing the dividend and the divisor, which are continuously input, and performs load / shift operations of the shift registers 101 and 102 according to the output of the comparator. Includes a controller to control. Reference numeral 104 denotes an up counter capable of performing a reset operation, continuously counts the number of times the divisor becomes larger than the dividend, and resets the count value when the dividend becomes larger than the divisor.

【0019】105は除算器であり、シフトレジスタ1
01、102から入力される被除数と除数とを用いてパ
イプライン処理によって除算処理を行う。なお、ここで
は、除算器105内部の構成方法自体については言及し
ない。106は選択手段としてのマルチプレクサであ
り、除算器105の除算結果か、カウンタ104のカウ
ント値かを切り替え選択し、量子化データとして次段
(例えばハフマン符号器)に出力する。なお、上記比較
制御器103内のコントローラ、シフトレジスタ10
1、102、除算器105により除算手段が構成されて
いる。
Reference numeral 105 denotes a divider, which is a shift register 1
The division process is performed by pipeline processing using the dividend and the divisor input from 01 and 102. Here, the configuration method itself inside the divider 105 will not be described. Reference numeral 106 denotes a multiplexer as selection means, which switches and selects the division result of the divider 105 or the count value of the counter 104, and outputs it as quantized data to the next stage (for example, a Huffman encoder). The controller in the comparison controller 103, the shift register 10
1, 102 and the divider 105 constitute a dividing means.

【0020】以下に、本実施例の動作を説明する。図示
しないDCT変換器から連続的に与えられる被除数(D
CT係数)および図示しない量子化テーブルから連続的
に与えられる除数(量子化パラメータ)は、それぞれシ
フトレジスタ101、102に順次入力される。ここで
所定の遅延がかけられた被除数および除数の両データ
は、除算器105に順次入力され、あるクロックサイク
ル数による演算時間経過後に順次出力される。
The operation of this embodiment will be described below. A dividend (D) continuously given from a DCT converter (not shown)
CT coefficients) and a divisor (quantization parameter) continuously given from a quantization table (not shown) are sequentially input to the shift registers 101 and 102, respectively. Here, both the dividend data and the divisor data with the predetermined delay are sequentially input to the divider 105, and are sequentially output after the elapse of the operation time by a certain number of clock cycles.

【0021】除算器105では、整数精度で除算処理を
行えばよいので、被除数をA、除数をBとすれば、A<
Bの場合には除算結果は0になることが予測できる。本
実施例はこの点に着目し、被除数Aと除数Bとの大小比
較を行い、A<Bとなる場合にはその除算処理を行わな
いようにすることにより、演算量の削減を図っている。
特に、被除数がDCT係数の場合は、低周波にパワーが
集中することが多いので、A<Bとなる場合が多くな
り、演算量の削減効果は顕著なものとなる。
In the divider 105, it is sufficient to perform the division processing with integer precision. Therefore, if the dividend is A and the divisor is B, A <A
In the case of B, the result of the division can be predicted to be 0. The present embodiment focuses on this point, and compares the dividend A and the divisor B, and does not perform the division process when A <B, thereby reducing the amount of calculation. .
In particular, when the dividend is a DCT coefficient, power often concentrates on low frequencies, so that A <B often occurs, and the effect of reducing the amount of calculation becomes remarkable.

【0022】すなわち、被除数Aおよび除数Bの両デー
タは、比較制御器103に順次入力され、ここで上記コ
ンパレータによる大小比較が行われる。そして、A<B
となる場合には、上述したように除算結果は0となるの
で、上記比較制御器103内のコントローラは、シフト
レジスタ101、102への入力をスキップさせるよう
に制御するとともに、除算器105を動作させないよう
に制御するための制御信号を出力する。
That is, both the data of the dividend A and the data of the divisor B are sequentially input to the comparison controller 103, where the comparator compares the magnitudes. And A <B
In this case, since the division result becomes 0 as described above, the controller in the comparison controller 103 controls the input to the shift registers 101 and 102 to be skipped and operates the divider 105. A control signal for controlling not to cause it to be output is output.

【0023】また、カウンタ104は、上記比較制御器
103内のコンパレータの出力が連続してA<B(A/
Bが0と同値)となる回数をカウントすることにより、
除算処理を行わない区間のランレングスを求める。A>
Bとなった時には、そのときのカウント値をマルチプレ
クサ106に出力するとともに、カウンタ104をクリ
アする。マルチプレクサ106は、除算器105の除算
結果とカウンタ104のカウント値とを切り替えて次段
に出力する。
The counter 104 outputs a signal A <B (A /
By counting the number of times B becomes equal to 0),
The run length of the section where the division process is not performed is obtained. A>
When the value becomes B, the count value at that time is output to the multiplexer 106 and the counter 104 is cleared. The multiplexer 106 switches between the division result of the divider 105 and the count value of the counter 104 and outputs the result to the next stage.

【0024】本実施例では以上のように動作することに
より、1つのDCTブロックにおける除算処理は、例え
ば図5に示すようなタイミングで行われることになる。
すなわち、比較制御器103の出力がA>Bであるとき
は、図9と同じように通常のパイプライン処理が行われ
るが(図5に示すaの状態)、比較制御器103の出力
がA<Bであるときは、A/Bの値は0であるので、除
算演算が省略されている(図5に示すbの状態)。
In the present embodiment, by performing the above operation, the division process in one DCT block is performed at the timing shown in FIG. 5, for example.
That is, when the output of the comparison controller 103 satisfies A> B, the normal pipeline processing is performed as in FIG. 9 (state a in FIG. 5), but the output of the comparison controller 103 is A When <B, the value of A / B is 0, and the division operation is omitted (state b in FIG. 5).

【0025】実際には、除算器105において0をカウ
ントするのにもそれぞれ1クロックづつ必要であるが、
全体のクロック数が除算器105のパイプライン段数よ
りも少ない数であれば、無視できる。このときは、カウ
ンタ104のカウント値が出力され、その出力後にカウ
ンタ104はクリアされる。
Actually, one clock is required for counting 0 in the divider 105, however,
If the total number of clocks is smaller than the number of pipeline stages of the divider 105, it can be ignored. At this time, the count value of the counter 104 is output, and after the output, the counter 104 is cleared.

【0026】以上のような構成をとることにより、除算
結果が0となる場合の除算処理を省略することができ、
処理を高速化することができるようになる。なお、例え
ばカウンタ104が16までしかカウントできない場合
には、図6の状態cに示すように、カウント値を16と
残りのqとの2回以上に分けて出力することも可能であ
る。
With the above configuration, the division processing when the division result becomes 0 can be omitted.
Processing can be sped up. For example, when the counter 104 can only count up to 16, the count value can be output in two or more times of 16 and the remaining q as shown in a state c of FIG.

【0027】次に、本発明の第2の実施例による量子化
装置を図2に示す。図1に示した第1の実施例では、除
算器105の除算結果か、あるいは除算結果0の続いた
回数(ランレングス)を表すカウンタ104のカウント
値の何れかをマルチプレクサ106で選択して出力して
いた。しかし、このままの構成では、量子化の後の処理
(ハフマン符号化など)において、除算結果であるか0
ランレングスであるかの区別がつかなくなってしまう可
能性がある。
Next, FIG. 2 shows a quantization apparatus according to a second embodiment of the present invention. In the first embodiment shown in FIG. 1, the multiplexer 106 selects and outputs either the division result of the divider 105 or the count value of the counter 104 indicating the number of times (run length) the division result 0 has continued. Was. However, in the configuration as it is, in a process after quantization (Huffman coding or the like), the result of division is 0
There is a possibility that it is impossible to distinguish between run lengths.

【0028】そこで、この第2の実施例では、図2に示
したように、識別手段としてのフラグ出力部201を設
け、カウンタ104の出力に基づいて除算結果/0ラン
レングスの識別を行い、その識別信号としての識別フラ
グを量子化データに同期させて出力するようにしてい
る。後段のハフマン符号器では、この識別フラグを参照
することによって、除算結果と0ランレングスとの区別
を確実に行うことができる。なお、本実施例におけるそ
の他の構成は、図1に示したものと同じであるので、対
応する部分に同一の符号を付して詳細な説明を省略す
る。
Therefore, in the second embodiment, as shown in FIG. 2, a flag output unit 201 is provided as identification means, and the division result / 0 run length is identified based on the output of the counter 104. The identification flag as the identification signal is output in synchronization with the quantized data. By referring to this identification flag, the subsequent Huffman encoder can reliably distinguish the division result from the 0 run length. The other configuration in the present embodiment is the same as that shown in FIG. 1, and the corresponding portions are denoted by the same reference numerals and detailed description thereof will be omitted.

【0029】次に、本発明の第3の実施例による量子化
装置を図3に示す。本実施例では、比較制御器103に
よって被除数Aと除数Bとの比較演算(A>Bであるか
どうか)を実行する他に、算出手段としてのデコーダ3
01を設け、被除数Aおよび除数Bの値の関係(有効ビ
ット数)から除算動作に必要なクロックサイクル数を算
出するようにしている。これにより、除算器105で除
算演算を行う前に、その除算に必要なクロックサイクル
数を除算演算時間として予測しておくことが可能とな
る。
Next, FIG. 3 shows a quantization apparatus according to a third embodiment of the present invention. In this embodiment, the comparison controller 103 executes a comparison operation between the dividend A and the divisor B (whether A> B), and also executes a decoder 3 as a calculation unit.
01 is provided, and the number of clock cycles required for the division operation is calculated from the relationship between the values of the dividend A and the divisor B (the number of effective bits). Thus, before the division operation is performed by the divider 105, it is possible to predict the number of clock cycles required for the division as the division operation time.

【0030】除算演算にかかる時間は、被除数Aおよび
除数Bの有効ビット長によって異なってくる。すなわ
ち、被除数Aの有効ビット長をNa、除数Bの有効ビッ
ト長をNbとすれば、最大で(Na−Nb+1)サイク
ルに相当する演算時間が必要である。したがって、除算
動作に必要なクロックサイクル数を求めるためのデコー
ダ301は、引算器と加算器によって簡単に構成するこ
とができる。また、被除数Aおよび除数Bの有効ビット
長は、プライオリティエンコーダで検出することができ
る。
The time required for the division operation depends on the effective bit length of the dividend A and the divisor B. That is, if the effective bit length of the dividend A is Na and the effective bit length of the divisor B is Nb, a calculation time corresponding to (Na-Nb + 1) cycles is required at the maximum. Therefore, the decoder 301 for determining the number of clock cycles required for the division operation can be easily constituted by the subtracter and the adder. The effective bit lengths of the dividend A and the divisor B can be detected by a priority encoder.

【0031】ここで、上記デコーダ301の構成例を図
4に示す。同図において、被除数Aおよび除数Bは、そ
れぞれプライオリティエンコーダ401、402に入力
され、ここでそれぞれの有効ビット長Na、Nbが検出
される。次に、引算器403で(Na−Nb)の減算処
理が行われた後、加算器404でその減算結果に1が加
えられる。このようにして除算動作に必要なクロックサ
イクル数が求められる。
FIG. 4 shows an example of the configuration of the decoder 301. In the figure, a dividend A and a divisor B are input to priority encoders 401 and 402, respectively, where the effective bit lengths Na and Nb are detected. Next, after the subtractor 403 performs a subtraction process of (Na−Nb), the adder 404 adds 1 to the subtraction result. Thus, the number of clock cycles required for the division operation is obtained.

【0032】また、本実施例では、上記デコーダ301
の後段に保持手段としてのピークホールド回路302を
設け、デコーダ301によって求められるクロックサイ
クル数の最大値を保持するようにしている。以下、図7
を参照しながら本実施例の動作を説明する。
In this embodiment, the decoder 301
A peak hold circuit 302 as a holding means is provided at the subsequent stage to hold the maximum value of the number of clock cycles obtained by the decoder 301. Hereinafter, FIG.
The operation of this embodiment will be described with reference to FIG.

【0033】本実施例では、デコーダ301で求めたク
ロックサイクル数の最大値をピークホールド回路302
に保持する。ピークホールド回路302は、現在保持し
ている最大値よりも大きいクロックサイクル数が次に与
えられたときは、クロックサイクル数の最大値を更新し
て保持する。
In this embodiment, the maximum value of the number of clock cycles obtained by the decoder 301 is used as the peak hold circuit 302.
To hold. When a clock cycle number larger than the currently held maximum value is given next, the peak hold circuit 302 updates and holds the maximum value of the clock cycle number.

【0034】そして、その最大値保持後の除算演算が1
回終了するたびに、その時点でのクロックサイクル数の
最大値に達するまで適宜アイドル時間(図7中の点線で
表記)を挿入するようにする。このようにすることによ
り、パイプラインを乱すことなく、除算演算の総合速度
を向上させることができる。
Then, the division operation after holding the maximum value is 1
Each time the process is completed, an idle time (indicated by a dotted line in FIG. 7) is appropriately inserted until the maximum number of clock cycles at that time is reached. This makes it possible to improve the overall speed of the division operation without disturbing the pipeline.

【0035】もちろん、図7のdの状態に示すように、
上述したカウンタ104による0ランレングス演算との
併用も可能である。この場合には、ピークホールド回路
302は、被除数A<除数Bとなった時点で現在保持し
ているクロックサイクル数の最大値をクリアし、次に被
除数A≧除数Bとなった時点で最大値の保持を再び開始
する。
Of course, as shown in the state of FIG.
It is also possible to use the counter 104 together with the zero run length calculation. In this case, the peak hold circuit 302 clears the maximum value of the number of clock cycles currently held when the dividend A <divisor B, and then the maximum value when the dividend A ≧ divisor B holds. Start holding again.

【0036】[0036]

【発明の効果】以上説明したように本発明によれば、除
数と被除数とを比較し、除数が被除数より大きいときの
回数をカウントするとともに、上記比較結果に応じて除
算演算を行い、除算結果とカウント値との何れか一方を
出力するように構成したことにより、除数が被除数より
も大きくなるときの除算演算を省略することが可能とな
るので、例えば画像信号の符号化を行う際の量子化処理
を高速に行うことができ、総合的な符号化速度の向上を
図ることができる効果がある。
As described above, according to the present invention, the divisor is compared with the dividend, the number of times when the divisor is greater than the dividend is counted, and the division operation is performed in accordance with the comparison result. By outputting either the count value or the count value, it is possible to omit the division operation when the divisor is larger than the dividend. Thus, there is an effect that the encoding process can be performed at high speed, and the overall encoding speed can be improved.

【0037】また、識別手段を設けた場合は、量子化後
の処理において量子化データが除算結果であるかカウン
ト値であるかを確実に識別することができる効果があ
る。
When the identification means is provided, there is an effect that it is possible to reliably identify whether the quantized data is a division result or a count value in the processing after quantization.

【0038】また、算出手段および保持手段を設けた場
合は、除算演算に必要な演算時間に達するまでアイドル
時間を挿入することにより、除算処理でのパイプライン
の乱れを防止することができ、パイプライン処理のスル
ープットを向上させて、処理を更に高速化することがで
きる効果がある。
When the calculation means and the holding means are provided, the idle time is inserted until the operation time required for the division operation is reached, whereby the disturbance of the pipeline in the division processing can be prevented. There is an effect that the throughput of the line processing can be improved and the processing can be further speeded up.

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

【図1】本発明の第1の実施例による量子化装置を示す
ブロック図である。
FIG. 1 is a block diagram illustrating a quantization device according to a first embodiment of the present invention.

【図2】本発明の第2の実施例による量子化装置を示す
ブロック図である。
FIG. 2 is a block diagram showing a quantization device according to a second embodiment of the present invention.

【図3】本発明の第3の実施例による量子化装置を示す
ブロック図である。
FIG. 3 is a block diagram illustrating a quantization device according to a third embodiment of the present invention.

【図4】図3に示したデコーダの内部構成を示すブロッ
ク図である。
FIG. 4 is a block diagram showing an internal configuration of the decoder shown in FIG.

【図5】第1、第2の実施例における除算演算のパイプ
ライン処理の一例を表すタイミング図である。
FIG. 5 is a timing chart illustrating an example of pipeline processing of a division operation in the first and second embodiments.

【図6】第1、第2の実施例における除算演算のパイプ
ライン処理の他の例を表すタイミング図である。
FIG. 6 is a timing chart illustrating another example of the pipeline processing of the division operation in the first and second embodiments.

【図7】第3の実施例における除算演算のパイプライン
処理の一例を表すタイミング図である。
FIG. 7 is a timing chart illustrating an example of pipeline processing of a division operation in the third embodiment.

【図8】多値画像の符号化を行うための従来の符号化装
置の構成例を示すブロック図である。
FIG. 8 is a block diagram illustrating a configuration example of a conventional encoding device for encoding a multilevel image.

【図9】除算演算のパイプライン処理の従来例を表すタ
イミング図である。
FIG. 9 is a timing chart illustrating a conventional example of pipeline processing of a division operation.

【図10】除算演算のパイプライン処理の他の従来例を
表すタイミング図である。
FIG. 10 is a timing chart showing another conventional example of pipeline processing of a division operation.

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

101、102 シフトレジスタ 103 比較制御器 104 カウンタ 105 除算器 106 マルチプレクサ 201 フラグ出力部 301 デコーダ 302 ピークホールド回路 401、402 プライオリティエンコーダ 403 引算器 404 加算器 101, 102 shift register 103 comparison controller 104 counter 105 divider 106 multiplexer 201 flag output unit 301 decoder 302 peak hold circuit 401, 402 priority encoder 403 subtractor 404 adder

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 連続的に入力される除数と被除数との大
小を比較する比較手段と、 上記比較手段による比較の結果、連続的に上記除数が被
除数よりも大きくなった回数をカウントするカウンタ
と、 上記比較手段の比較結果に応じて上記除数と被除数とを
用いた除算演算を行う除算手段と、 上記カウンタの出力と上記除算手段の出力との何れか一
方を選択して出力する選択手段とを設けたことを特徴と
する量子化装置。
1. A comparing means for comparing the magnitudes of a continuously input divisor and a dividend, and a counter for counting the number of times the divisor is continuously larger than the dividend as a result of the comparison by the comparing means. A dividing means for performing a division operation using the divisor and the dividend according to a comparison result of the comparing means; and a selecting means for selecting and outputting one of the output of the counter and the output of the dividing means. A quantization device, comprising:
【請求項2】 上記カウンタの出力と上記除算手段の出
力とを識別し、その識別信号を出力する識別手段を更に
設けたことを特徴とする請求項1記載の量子化装置。
2. The quantization apparatus according to claim 1, further comprising an identification unit that identifies an output of said counter and an output of said division unit and outputs an identification signal.
【請求項3】 上記連続的に入力される除数および被除
数はそれぞれ有効ビット長を有し、その有効ビット長に
基づいて上記除算手段における除算演算時間を算出する
算出手段と、 上記算出手段で算出された上記除算演算時間の最大値を
保持する保持手段とを更に設けたことを特徴とする請求
項1または2記載の量子化装置。
3. The continuously inputted divisor and dividend each have an effective bit length, and a calculating means for calculating a division operation time in the dividing means based on the effective bit length; 3. The quantizing device according to claim 1, further comprising a holding unit for holding the maximum value of the divided operation time.
【請求項4】 上記除数は所定の量子化パラメータであ
り、上記被除数はデータを離散コサイン変換して得られ
たDCT係数であることを特徴とする請求項1記載の量
子化装置。
4. The quantization apparatus according to claim 1, wherein said divisor is a predetermined quantization parameter, and said dividend is a DCT coefficient obtained by performing discrete cosine transform of data.
【請求項5】 上記除算手段は、上記連続的に入力され
る除数および被除数を用いてパイプライン処理を行うこ
とを特徴とする請求項1記載の量子化装置。
5. The quantization apparatus according to claim 1, wherein said dividing means performs a pipeline process using said continuously input divisor and dividend.
JP27748294A 1994-11-11 1994-11-11 Quantizer Expired - Fee Related JP3313911B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27748294A JP3313911B2 (en) 1994-11-11 1994-11-11 Quantizer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27748294A JP3313911B2 (en) 1994-11-11 1994-11-11 Quantizer

Publications (2)

Publication Number Publication Date
JPH08137671A JPH08137671A (en) 1996-05-31
JP3313911B2 true JP3313911B2 (en) 2002-08-12

Family

ID=17584215

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27748294A Expired - Fee Related JP3313911B2 (en) 1994-11-11 1994-11-11 Quantizer

Country Status (1)

Country Link
JP (1) JP3313911B2 (en)

Also Published As

Publication number Publication date
JPH08137671A (en) 1996-05-31

Similar Documents

Publication Publication Date Title
KR100924907B1 (en) Improved variable length decoder
KR100624432B1 (en) Context adaptive binary arithmetic decoder method and apparatus
US6603413B2 (en) Variable-length decoding apparatus and method
US7356699B2 (en) Electronic watermark detection device and electronic watermark detection method
JPH07262175A (en) Function transformation arithmetic unit
US6055272A (en) Run length encoder
CN101502122B (en) Encoding device and encoding method
JP2004056758A (en) Variable length coding apparatus and coding method therefor
EP0677968B1 (en) Quantization estimating method and circuit for data compressing
JP3313911B2 (en) Quantizer
JP3173257B2 (en) Encoding method and encoding device
US9154158B2 (en) Macro-block encoding of skipped video frames
US6859562B2 (en) Coded data length detection apparatus, method of the same, and image coding apparatus
KR0178746B1 (en) Half pixel processing unit of macroblock
US6339614B1 (en) Method and apparatus for quantizing and run length encoding transform coefficients in a video coder
US20070192393A1 (en) Method and system for hardware and software shareable DCT/IDCT control interface
JP3024386B2 (en) Encoding device
WO1996036178A1 (en) Multiple sequence mpeg decoder and process for controlling same
KR930004265B1 (en) Quantumized pulse width control circuit
JP3434904B2 (en) Image data encoding device
JPH1022832A (en) Multistage variable length code decoder
JP3011960B2 (en) Run-length encoding circuit
CN118301258A (en) Decoding method, system and decoder for Golomb coding
JP2002354486A (en) Motion vector detector, moving picture encoder, motion vector detecting method and motion vector detecting program
KR100245331B1 (en) Run length decoder

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090531

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090531

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100531

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100531

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110531

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120531

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120531

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130531

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140531

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees