JPH0766982A - Code quantity controller - Google Patents

Code quantity controller

Info

Publication number
JPH0766982A
JPH0766982A JP21185393A JP21185393A JPH0766982A JP H0766982 A JPH0766982 A JP H0766982A JP 21185393 A JP21185393 A JP 21185393A JP 21185393 A JP21185393 A JP 21185393A JP H0766982 A JPH0766982 A JP H0766982A
Authority
JP
Japan
Prior art keywords
code amount
quantization
amount
data
excess
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.)
Withdrawn
Application number
JP21185393A
Other languages
Japanese (ja)
Inventor
Yukinori Yamamoto
行則 山本
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 JP21185393A priority Critical patent/JPH0766982A/en
Priority to DE69434989T priority patent/DE69434989T2/en
Priority to DE69424591T priority patent/DE69424591T2/en
Priority to EP99203834A priority patent/EP1006731B1/en
Priority to US08/218,632 priority patent/US5861921A/en
Priority to EP94302203A priority patent/EP0618733B1/en
Priority to KR1019940006310A priority patent/KR0184905B1/en
Publication of JPH0766982A publication Critical patent/JPH0766982A/en
Priority to US09/190,091 priority patent/US6438167B1/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

PURPOSE:To improve the coding efficiency by using a deficient code quantity by a quantization device when the quantizer satisfying an object code quantity is selected and using an excess code quantity by a quantization device whose quantization width is smaller by one step so as to approach the code quantity to an object code quantity. CONSTITUTION:A calculation section 32 executes calculation of a code quantity by an input quantization number 26 and the result revises deficient/excess data 28, 30, and the result is outputted to a next stage as deficient/excess data 36, 38. The operation is repeated by four stages to obtain final deficient/excess data 54, 56. That is, let a quantization number 52 decided finally be Qn, a caption 54 indicates deficient data quantity in the case of coding by the Qn and a caption 56 indicates a data quantity in excess when coded by a number Qn-1, A quantization parameter operation section 58 uses deficient/excess data to control a quantization parameter 50 to command the use of a quantization device shifted from the Qn in the unit of small blocks for the selected Qn to attain fine-adjustment of the code quantity.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、符号化装置における符
号量制御装置に関し、より具体的には可変長符号を用い
る符号化装置における符号量制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a code amount control device in a coding device, and more particularly to a code amount control device in a coding device using a variable length code.

【0002】[0002]

【従来の技術】図4に従来の高能率符号化装置の概略構
成ブロック図を示す。図4において、210は大ブロッ
ク化部、212は小ブロック化部、214は直交変換
部、216は量子化器 218は符号量計算部、220
は量子化器選択部、222は可変長符号化部である。
2. Description of the Related Art FIG. 4 shows a schematic block diagram of a conventional high efficiency coding apparatus. In FIG. 4, 210 is a large block conversion unit, 212 is a small block conversion unit, 214 is an orthogonal transformation unit, 216 is a quantizer 218 is a code amount calculation unit, 220
Is a quantizer selection unit and 222 is a variable length coding unit.

【0003】画像データは先ず、大ブロック化部210
に入力し、ここでいくつかの大ブロックに分割される。
この大ブロックは、後述する小ブロックをいくつか集め
たものであり、大ブロック単位で符号量が一定になるよ
うに符号化が制御される。従って、原画像の情報量を平
均化するように、予め画面上でシャッフルされた小ブロ
ックを集めて大ブロックとすることが多い。
First, the image data is converted into a large block 210.
Type in, where it is divided into several large blocks.
This large block is a collection of some small blocks to be described later, and the encoding is controlled so that the code amount is constant in units of large blocks. Therefore, it is often the case that small blocks shuffled in advance on the screen are collected into large blocks so as to average the information amount of the original image.

【0004】小ブロック化部212は、各大ブロックを
いくつかの小ブロックに分割する。この小ブロックは、
後述する直交変換の単位となり、縦8画素、横8画素が
よく使用される。
The small block formation section 212 divides each large block into several small blocks. This small block is
It becomes a unit of orthogonal transformation to be described later, and 8 vertical pixels and 8 horizontal pixels are often used.

【0005】直交変換部214は各小ブロックを直交変
換し、その結果(変換係数と呼ぶ。)を出力する。直交
変換は例えば、離散コサイン変換(DCT)である。
The orthogonal transform unit 214 performs an orthogonal transform on each small block and outputs the result (called a transform coefficient). The orthogonal transform is, for example, the discrete cosine transform (DCT).

【0006】変換係数は、量子化部216により量子化
されるが、その前に、符号量計算部218が、大ブロッ
ク単位での最終的な符号量を計算し、その結果に応じ
て、量子化器選択部220が、所定の符号量を達成でき
る、即ち目標符号量を越えない量子化器(又は量子化テ
ーブル)を選択する。符号量計算部218の詳細は後述
する。
The transform coefficient is quantized by the quantizing unit 216, but before that, the code amount calculating unit 218 calculates the final code amount in units of large blocks, and according to the result, the quantization is performed. The quantizer selection unit 220 selects a quantizer (or a quantization table) that can achieve a predetermined code amount, that is, does not exceed the target code amount. Details of the code amount calculation unit 218 will be described later.

【0007】量子化部216により量子化された変換係
数は、可変長符号化部222により可変長符号化され
る。具体的には、各小ブロック内の変換係数を低域側か
らジグザグ走査し、ランレングス符号化したあと、ハフ
マン符号化する。これらの一連の処理を含めて、本明細
書では可変長符号化と呼ぶことにする。
The transform coefficient quantized by the quantizer 216 is variable-length coded by the variable-length coding unit 222. Specifically, the transform coefficient in each small block is zigzag-scanned from the low frequency side, run-length encoded, and then Huffman encoded. In this specification, a series of these processes will be referred to as variable length coding.

【0008】符号量計算部218の動作を説明する。N
個の量子化器がある場合、予め量子化幅の小さい量子化
器から順に1からNの番号をつけ、Qn(n=1〜N)
で各量子化器を特定することにする。符号量から見る
と、nが小さいほど符号量が多くなる。前述したよう
に、大ブロック単位で目標の符号量に抑えるために、大
ブロック毎に1つのQnを選択するのがここでの課題で
ある。
The operation of the code amount calculator 218 will be described. N
When there are a plurality of quantizers, numbers from 1 to N are assigned in order from a quantizer having a small quantization width in advance, and Q n (n = 1 to N)
Will identify each quantizer. From the viewpoint of the code amount, the smaller n is, the larger the code amount is. As described above, the problem here is to select one Q n for each large block in order to suppress the target code amount in units of large blocks.

【0009】適切な量子化器を決定するのに、例えば2
分探索法を使用する。即ち、具体的には、中央の量子化
器QN/2を選択し、実際に量子化及び可変長符号化を実
行して符号量を計算する。その符号量が目標符号量より
も小さい場合、目的の量子化器はQ1からQN/2の間にあ
るので、その中間の量子化器QN/4で同様の計算を繰り
返す。逆に符号量が目標符号量よりも大きい場合、量子
化器Q3N/4で同様の計算を繰り返す。このようにして、
N個の量子化器がある場合、log2N回で目的の量子
化器を決定できる。N=16の場合の量子化器の選択過
程を図7に示す。図7で、310は符号量が目標符号量
よりも小さい場合の選択方向、312は符号量が目標符
号量より大きい場合の選択方向をそれぞれ示し、314
はQ6が選択される場合の選択経路を示す。
To determine the appropriate quantizer, for example, 2
Use the min search method. That is, specifically, the central quantizer Q N / 2 is selected, and quantization and variable length coding are actually executed to calculate the code amount. When the code amount is smaller than the target code amount, the target quantizer is between Q 1 and Q N / 2 , and the intermediate quantizer Q N / 4 repeats the same calculation. On the contrary, when the code amount is larger than the target code amount, the quantizer Q 3N / 4 repeats the same calculation. In this way
When there are N quantizers, the target quantizer can be determined by log 2 N times. The process of selecting the quantizer when N = 16 is shown in FIG. In FIG. 7, 310 indicates a selection direction when the code amount is smaller than the target code amount, 312 indicates a selection direction when the code amount is larger than the target code amount, and 314.
Indicates a selection route when Q 6 is selected.

【0010】符号量計算部218の具体的な回路ブロッ
ク図を図5に示す。230は入力データ、232は量子
化パラメータ判定部、234は量子化パラメータ、23
6,242,246,250は量子化番号Qn、238
は目標符号量、240,244,248,252は計算
部である。
A concrete circuit block diagram of the code amount calculation unit 218 is shown in FIG. Reference numeral 230 is input data, 232 is a quantization parameter determination unit, 234 is a quantization parameter, 23
6, 242, 246, and 250 are quantization numbers Q n and 238.
Is a target code amount, and 240, 244, 248 and 252 are calculation units.

【0011】説明上、1つの大ブロックに含まれる小ブ
ロック数をkとすると、入力データ230は、k個の小
ブロックに対する変換係数を具備する。量子化パラメー
タ判定部232は、k個の小ブロックのそれぞれに対し
てブロックの特徴を表わすパラメータを与え、量子化パ
ラメータ234として出力する。この量子化パラメータ
234は、1つの大ブロックに対して、ある量子化器Q
nが選択されたとき、その大ブロックに含まれるk個の
小ブロック全てを同じ量子化器Qnで量子化しないで、
相対的に少しだけQnからシフトした量子化器(例え
ば、Qn+2、Qn+1、Qn-1、Qn-2など)を各小ブロック
に適用するように制御する。
For the sake of explanation, assuming that the number of small blocks included in one large block is k, the input data 230 has transform coefficients for k small blocks. The quantization parameter determination unit 232 gives a parameter representing the feature of the block to each of the k small blocks, and outputs it as a quantization parameter 234. This quantization parameter 234 is a quantizer Q for one large block.
When n is selected, all k small blocks included in the large block are not quantized by the same quantizer Qn,
Relatively quantizer shifted from slightly Q n (e.g., Q n + 2, Q n + 1, Q n-1, such as Q n-2) is controlled so as to apply to the respective small blocks.

【0012】計算部240,244,248,252
は、前述の1回分の計算を行なう回路であり、計算部2
40には、入力データ230、量子化パラメータ23
4、量子化番号236及び目標符号量238が入力す
る。計算部240,244,248,252は、1つの
大ブロック(k個の小ブロック)分の符号量を計算し、
次段で計算すべき量子化器番号242,246,25
0,254を出力する。
Calculation units 240, 244, 248, 252
Is a circuit for performing the above-described one-time calculation, and the calculation unit 2
40 includes input data 230 and a quantization parameter 23.
4, the quantization number 236 and the target code amount 238 are input. The calculation units 240, 244, 248, 252 calculate the code amount for one large block (k small blocks),
Quantizer numbers 242, 246, 25 to be calculated in the next stage
It outputs 0,254.

【0013】計算部240,244,248,252の
計算を何回か繰り返すことにより、この大ブロックに対
する最終の量子化器番号Qnが得られる。図5はN=1
6の場合の例であり、2分探索であるので、初段の量子
化器番号236はn=8であり、4回の計算、即ち4つ
の計算部240,244,248,252により、適切
な量子化器を決定できる。
The final quantizer number Q n for this large block is obtained by repeating the calculations of the calculation units 240, 244, 248 and 252 several times. In FIG. 5, N = 1
Since it is an example of the case of 6 and it is a binary search, the quantizer number 236 of the first stage is n = 8, and four calculations, that is, four calculation units 240, 244, 248, 252, You can determine the quantizer.

【0014】図6は計算部510の詳細なブロック図を
示す。262は入力データ、264は量子化パラメー
タ、266は入力量子化番号、268は量子化部、27
0は量子化器選択部、272は可変長符号化部、274
は符号量積算部、276は実際の符号量、278は目標
符号量、280は減算器、282は符号量差分、284
は符号判定部、286は符号判定結果、294は量子化
番号選択部、296は出力量子化番号である。
FIG. 6 shows a detailed block diagram of the calculation unit 510. 262 is input data, 264 is a quantization parameter, 266 is an input quantization number, 268 is a quantizer, 27
0 is a quantizer selection unit, 272 is a variable length coding unit, 274
Is a code amount integrating unit, 276 is an actual code amount, 278 is a target code amount, 280 is a subtractor, 282 is a code amount difference, 284
Is a code determination unit, 286 is a code determination result, 294 is a quantization number selection unit, and 296 is an output quantization number.

【0015】先ず、量子化器選択部270は、入力量子
化番号264と量子化パラメータ266に従い、1つの
量子化器又は量子化テーブルを選択し、量子化部268
が、選択された量子化器又は量子化テーブルで入力デー
タ262を量子化する。入力データ262は1つの大ブ
ロック分、即ちk個の小ブロックの変換係数であり、量
子化パラメータ266は小ブロック単位で変更されるの
で、量子化器選択部270は、それに応じて、選択する
量子化器又は量子化テーブルをシフトする。
First, the quantizer selection unit 270 selects one quantizer or quantization table according to the input quantization number 264 and the quantization parameter 266, and the quantization unit 268.
Quantizes the input data 262 with the selected quantizer or quantization table. The input data 262 is the transformation coefficient of one large block, that is, k small blocks, and the quantization parameter 266 is changed in small block units, so the quantizer selection unit 270 selects accordingly. Shift the quantizer or quantization table.

【0016】可変長符号化部272は、量子化されたデ
ータを可変長符号化し、その符号長を符号量積算部27
4に出力する。符号量積算部274は、入力する符号長
をk個の小ブロックについて積算し、入力量子化番号2
64に対する大ブロックの実際の符号量を減算器280
に出力する。減算器280は、符号量積算部274の出
力276から目標符号量278を減算し、符号量差分2
82を出力する。この符号量差分282は、プラスのと
き、現在の量子化番号では符号量が多すぎることを示
し、逆にマイナスのとき、符号量が少ないことを示して
いる。
The variable length coding unit 272 performs variable length coding on the quantized data, and the code length is calculated by the code amount integrating unit 27.
Output to 4. The code amount integrating unit 274 integrates the input code length for k small blocks, and calculates the input quantization number 2
Subtractor 280 calculates the actual code amount of the large block for 64.
Output to. The subtractor 280 subtracts the target code amount 278 from the output 276 of the code amount integrating unit 274 to obtain the code amount difference 2
82 is output. When the code amount difference 282 is plus, the code amount is too large with the current quantization number, and when it is minus, the code amount is small.

【0017】そこで、符号判定部284は、符号量差分
282の極性(即ち、プラス又はマイナス)を判定し、
量子化番号選択部294は、符号判定部284の判定結
果286に応じて、入力量子化番号266を変換して出
力量子化番号296とする。入力量子化番号をnとする
と、符号量オーバーのときにはn+(N/2m+1)、符
号量アンダーのときにはn−(N/2m+1)を選択す
る。Nは量子化器数、mは計算部のm段目を示してお
り、図5に示す例では、N=16、m=1〜4である。
また、最終段の計算部では、出力量子化番号が小数点以
下となるが、四捨五入により、符号量オーバー時にはn
+1、符号量アンダー時にはnとなる。これらは、2分
探索法で周知の処理である。
Therefore, the code determination unit 284 determines the polarity (that is, plus or minus) of the code amount difference 282,
The quantization number selection unit 294 converts the input quantization number 266 into an output quantization number 296 according to the determination result 286 of the code determination unit 284. When the input quantization number is n, when the code amount over n + (N / 2 m + 1), when the code amount under selects n- (N / 2 m + 1 ). N is the number of quantizers, and m is the mth stage of the calculation unit. In the example shown in FIG. 5, N = 16 and m = 1 to 4.
Also, in the final stage calculation unit, the output quantization number is below the decimal point, but due to rounding, when the code amount exceeds n
+1 and n when the code amount is under. These are well-known processes in the binary search method.

【0018】[0018]

【発明が解決しようとする課題】図8及び図9を用い
て、従来例の問題点を説明する。これらの図は何れも、
最終的に選択された量子化器Qnによる符号量及び1つ
だけ小さい量子化器Qn-1による符号量と、目標符号量
との大小関係を示しており、図中、a,bはそれぞれQ
n,Qn-1の符号量と目標符号量との差を示す。即ち、Q
nで量子化した場合、目標符号量よりaだけ符号量が少
なく、Qn-1で量子化した場合、bだけ符号量がオーバ
ーすることを示している。図8のような場合、aの値が
小さく符号化効率が良い。しかし、図9のような場合に
は、aがかなり大きくなり、符号化効率が悪く、できれ
ば量子化器Qn-1を選択したいところだが、わずかにb
だけの符号量オーバーが生じるのでやむを得ず量子化器
Qnを選択している。
Problems of the conventional example will be described with reference to FIGS. 8 and 9. All of these figures
The relationship between the code amount by the finally selected quantizer Q n and the code amount by the quantizer Q n-1 which is smaller by one and the target code amount is shown. Q respectively
The difference between the code amount of n and Q n-1 and the target code amount is shown. That is, Q
When quantized with n , the code amount is smaller than the target code amount by a, and when quantized with Q n-1 , the code amount exceeds b. In the case of FIG. 8, the value of a is small and the coding efficiency is good. However, in the case as shown in FIG. 9, a becomes considerably large, the coding efficiency is poor, and it is desirable to select the quantizer Q n-1 if possible, but slightly b
Therefore, the quantizer Qn is unavoidably selected because the code amount is excessive.

【0019】本発明は、このような問題点を解決する符
号量制御装置を提示することを目的とする。
An object of the present invention is to provide a code amount control device which solves such a problem.

【0020】[0020]

【課題を解決するための手段】本発明に係る符号量制御
装置は、複数の小ブロックからなる大ブロック単位に符
号量を一定にする符号量制御装置であって、符号化量を
計算する複数段の符号量計算手段と、各段における目標
符号量に対する不足/超過符号量を後段に伝達する伝達
手段と、当該符号量計算手段の計算結果により、伝達さ
れた不足符号量及び超過符号量の何れか一方を更新する
更新手段とを具備し、当該符号量計算手段の最終段で得
られる当該不足/超過符号量に従い、上記各小ブロック
符号化する際の量子化パラメータを操作し、もって発生
符号量を当該目標符号量に近付けることを特徴とする。
A code amount control device according to the present invention is a code amount control device for making a code amount constant in a large block unit composed of a plurality of small blocks, and a plurality of code amount control devices for calculating an encoding amount. The code amount calculating means of each stage, the transmitting means for transmitting the insufficient / excessive code amount with respect to the target code amount in each stage to the subsequent stage, and the calculated insufficient amount and excess code amount of the transmitted amount according to the calculation result of the code amount calculating means. Update means for updating either one, and operates according to the insufficient / excessive code amount obtained at the final stage of the code amount calculation means, operates the quantization parameter for each small block encoding, and generates It is characterized in that the code amount is brought close to the target code amount.

【0021】[0021]

【作用】上記手段により、従来例と同様に決定した量子
化手段を用いた場合の超過符号量の他に、これより1段
だけ量子化幅の小さい量子化手段を用いた場合の超過符
号量を得るようにした。そして、得られた不足符号量と
超過符号量から、各小ブロック毎の量子化パラメータを
制御して、全体として目標符号量に近付ける。
By the above means, in addition to the excess code amount in the case of using the quantizing means determined similarly to the conventional example, the excess code amount in the case of using the quantizing means having a quantization width smaller by one stage than that. To get. Then, based on the obtained insufficient code amount and excess code amount, the quantization parameter for each small block is controlled so as to approach the target code amount as a whole.

【0022】[0022]

【実施例】以下、図面を参照して本発明の実施例を詳細
に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0023】図1は、本発明の一実施例である符号量制
御装置の概略構成ブロック図を示す。10は入力デー
タ、12は量子化パラメータ判定部、14は量子化パラ
メータ、16,26,34,42,52は量子化番号Q
n、18は初期不足データ量、20は初期超過データ
量、22は目標符号量、24,32,40,48は計算
部、28,36,44,54は不足データ量、30,3
8,46,56は超過データ量、50は操作前の量子化
パラメータ、58は量子化パラメータ操作部、60は操
作後の量子化パラメータである。
FIG. 1 is a block diagram showing the schematic arrangement of a code amount control apparatus which is an embodiment of the present invention. 10 is input data, 12 is a quantization parameter determination unit, 14 is a quantization parameter, 16, 26, 34, 42 and 52 are quantization numbers Q.
n and 18 are initial insufficient data amount, 20 is initial excess data amount, 22 is target code amount, 24, 32, 40 and 48 are calculation units, 28, 36, 44 and 54 are insufficient data amount, and 30, 3
8, 46 and 56 are excess data amounts, 50 is a quantization parameter before operation, 58 is a quantization parameter operation unit, and 60 is a quantization parameter after operation.

【0024】計算部24,32,40,48における動
作の大部分は、図5に示した従来例と全く同じなので、
説明を省略し、本実施例との特徴的動作を詳細に説明す
る。
Most of the operations in the calculation units 24, 32, 40 and 48 are exactly the same as those in the conventional example shown in FIG.
The description will be omitted, and the characteristic operation of this embodiment will be described in detail.

【0025】各計算部24,32,40,48には2つ
の入力と2つの出力が追加されており、2段目の計算部
32を例にとると、先ず、入力量子化番号26による符
号量計算が行なわれ、その結果によって前段から入力さ
れる不足データ量28又は超過データ量30のいずれか
が更新されて、それぞれ不足データ量36又は超過デー
タ量38として次段に出力される。ここで、不足/超過
データ量とは、現在の量子化番号による符号量と目標符
号量との差分を表わす。
Each of the calculation units 24, 32, 40, and 48 has two inputs and two outputs. Taking the calculation unit 32 of the second stage as an example, first, the code by the input quantization number 26 is used. The amount calculation is performed, and either the insufficient data amount 28 or the excess data amount 30 input from the previous stage is updated according to the result, and is output to the next stage as the insufficient data amount 36 or the excess data amount 38, respectively. Here, the insufficient / excessive data amount represents the difference between the code amount based on the current quantization number and the target code amount.

【0026】以上の動作を4段繰り返し、最終的な不足
/超過データ量54,56が得られる。正確には、最終
的に決定された量子化番号52をQnとすると、符号5
4は、Qnで符号化した場合に目標符号量に不足するデ
ータ量を示し、符号56はQn-1で符号化した場合に目
標符号量から超過するデータ量を示す。それぞれ、図8
及び図9のa,bに相当する。
The above operation is repeated four times to obtain the final insufficient / excessive data amounts 54 and 56. To be precise, when the quantization number 52 finally determined is Q n , the code 5
Reference numeral 4 indicates the amount of data that is insufficient for the target code amount when encoded by Q n , and reference numeral 56 indicates the amount of data that exceeds the target code amount when encoded by Q n-1 . Figure 8
And correspond to a and b in FIG.

【0027】量子化パラメータ操作部58は、この不足
/超過データ量を用いて、量子化パラメータ50(量子
化パラメータ14と同じ内容だが、遅延している。)を
操作し、新たな量子化パラメータ60を出力する。量子
化パラメータ60は、従来例でも述べたように、大ブロ
ック単位に選択されたQnに対して、小ブロック単位に
そのQnから相対的にシフトした量子化器を用いるよう
に指示するパラメータであり、k個のうちのいくつかを
操作することで符号量の微調整が可能になる。
The quantization parameter operating unit 58 operates the quantization parameter 50 (which has the same content as the quantization parameter 14 but is delayed) by using this insufficient / excessive data amount, and a new quantization parameter is added. 60 is output. As described in the conventional example, the quantization parameter 60 is a parameter for instructing to use a quantizer that is relatively shifted from Q n in small block units with respect to Q n selected in large block units. Therefore, it is possible to finely adjust the code amount by operating some of k.

【0028】次に、計算部24,32,40,48の詳
細な回路構成を図2に示す。図2において、62は入力
データ、64は量子化パラメータ、66は入力量子化番
号、68は量子化部、70は量子化器選択部、72は可
変長符号化部、74は符号量積算部、76は実際の符号
量、78は目標符号量、80は減算器、82は符号量差
分、84は符号判定部、86は符号判定結果、88は不
足データ量入力、90は超過データ量入力、92は切換
えスイッチ、94は量子化番号選択部、96は出力量子
化番号、98は不足データ量出力、100は超過データ
量出力である。
Next, FIG. 2 shows a detailed circuit configuration of the calculation units 24, 32, 40 and 48. In FIG. 2, 62 is input data, 64 is a quantization parameter, 66 is an input quantization number, 68 is a quantizer, 70 is a quantizer selection unit, 72 is a variable length coding unit, and 74 is a code amount integrating unit. , 76 is an actual code amount, 78 is a target code amount, 80 is a subtractor, 82 is a code amount difference, 84 is a code determination unit, 86 is a code determination result, 88 is an insufficient data amount input, and 90 is an excess data amount input. , 92 is a changeover switch, 94 is a quantization number selection unit, 96 is an output quantization number, 98 is an insufficient data amount output, and 100 is an excess data amount output.

【0029】図2で、従来例の図6と同じ部分は同じに
動作するので、図2で追加した部分を詳細に説明する。
In FIG. 2, the same parts as those of FIG. 6 of the conventional example operate in the same manner, so the parts added in FIG. 2 will be described in detail.

【0030】符号量積算部74は、図6で説明したよう
に、入力量子化番号66に対する実際の符号量を出力線
76上に出力する。減算器80は実際の符号量76から
目標符号量78を減算し、符号量差分82を出力する。
符号判定結果86は、符号量差分82の符号、即ち極性
を示す。
The code amount integrating unit 74 outputs the actual code amount for the input quantization number 66 on the output line 76, as described with reference to FIG. The subtractor 80 subtracts the target code amount 78 from the actual code amount 76 and outputs a code amount difference 82.
The code determination result 86 indicates the code of the code amount difference 82, that is, the polarity.

【0031】スイッチ92は符号判定結果86により、
入力した不足データ量88及び超過データ量90のいず
れか一方を符号量差分82で更新して、出力線98,1
00に出力する。更新されないデータ量は、そのまま出
力される。例えば、符号量がオーバーした場合、図にあ
るように不足データ量88はそのまま出力され、超過デ
ータ量90はこの計算部でオーバーしたデータ量82の
値で置換されて出力される。
The switch 92 uses the code determination result 86 to
Either the input insufficient data amount 88 or the excess data amount 90 is updated with the code amount difference 82, and the output lines 98, 1
Output to 00. The amount of data that is not updated is output as it is. For example, when the code amount exceeds, as shown in the figure, the insufficient data amount 88 is output as it is, and the excess data amount 90 is replaced with the value of the overwritten data amount 82 and output.

【0032】この構成により、図1において4段の計算
部を経由すると、信号線54,56上に目的の不足/超
過データ量が得られる。これを図7を用いて説明する。
図7において、314は量子化器Q6が選択される過程
を示している。矢印を逆にたどると、Q6とQ5の符号量
計算が4段目及び3段目でなされており、目的のデータ
量が得られることがわかる。
With this configuration, the target amount of insufficient / excessive data can be obtained on the signal lines 54 and 56 via the four-stage calculating section in FIG. This will be described with reference to FIG.
In FIG. 7, reference numeral 314 indicates a process in which the quantizer Q 6 is selected. By tracing the arrows in the opposite direction, it is understood that the code amount calculation of Q 6 and Q 5 is performed in the fourth and third stages, and the target data amount can be obtained.

【0033】もう一つのQ9の場合を考えると、4段目
でQ9の不足データ量が得られ、1段目はQ8の超過デー
タ量が得られる。特に、1段目の超過データ量は、2〜
4段目で符号量がオーバーしないので途中で書き換えら
れずに最後まで伝送される。他のQnも同様にして不足
/超過データのいずれか一方が1回も計算されないの
で、正しい結果が得られない。
[0033] Considering the case of another Q 9, missing data of Q 9 are obtained in the fourth stage, the first stage excess data amount Q 8 is obtained. In particular, the amount of excess data in the first stage is 2 to
Since the code amount does not exceed in the fourth stage, it is transmitted to the end without being rewritten in the middle. Similarly, for the other Q n , either one of the missing / excessive data is not calculated even once, so that the correct result cannot be obtained.

【0034】図1の量子化パラメータ操作部58の詳細
な回路ブロック図を図3に示す。110は量子化パラメ
ータ入力、112は選択された量子化番号Qn、114
は不足データ量、116は超過データ量、118は除算
器、122は乗算器、126は加算器、130は比較
器、132は切換えスイッチ、134は量子化パラメー
タ出力である。
FIG. 3 shows a detailed circuit block diagram of the quantization parameter operating unit 58 shown in FIG. 110 is a quantization parameter input, 112 is a selected quantization number Q n , 114
Is an insufficient data amount, 116 is an excess data amount, 118 is a divider, 122 is a multiplier, 126 is an adder, 130 is a comparator, 132 is a changeover switch, and 134 is a quantization parameter output.

【0035】先ず、入力された不足/超過データ量11
0,112を図8及び図9に対応してそれぞれa,b
(a≧0、b≧0)とすると、除算器118はa/(a
+b)を計算し、量子化番号を1つ小さくした場合に増
加する符号量に対する現在の不足データ量の割合120
を出力する。1つ量子化番号を小さくすることは、量子
化番号を変えないで、k個の量子化パラメータ全部を操
作して、各小ブロックの量子化番号を1だけ小さい方に
シフトするのと等価であるから、この割合120を乗算
器122でk倍することで、k個のパラメータの内、何
個を操作すれば良いかがわかる。
First, the input lack / excess data amount 11
0 and 112 correspond to FIG. 8 and FIG.
If (a ≧ 0, b ≧ 0), the divider 118 uses a / (a
+ B) is calculated, and the ratio of the current insufficient data amount to the code amount that increases when the quantization number is decreased by 1 is 120
Is output. Decreasing the quantization number by one is equivalent to manipulating all k quantization parameters without changing the quantization number and shifting the quantization number of each small block by one. Therefore, by multiplying this ratio 120 by the multiplier 122 by k, it is possible to know how many of the k parameters should be operated.

【0036】加算器126は、量子化パラメータを操作
する。具体的には、ここでは、パラメータを1だけ増加
すれば、1つ小さい量子化器にシフトされると仮定して
いる。入力されたk個の量子化パラメータ110のう
ち、乗算器122の出力124で指定される個数のパラ
メータが、加算器126で1だけパラメータ値を増加さ
れ、新たなパラメータとして出力128に出力される。
The adder 126 operates on the quantization parameter. Specifically, it is assumed here that if the parameter is increased by 1, the quantizer is shifted by one smaller. Of the k quantization parameters 110 that have been input, the number of parameters specified by the output 124 of the multiplier 122 is incremented by 1 in the adder 126 and output as a new parameter at the output 128. .

【0037】比較器130は量子化番号112が1又は
16でないか否かを判定し、1又は16のときには前述
の問題があるのでスイッチ132により操作前のパラメ
ータ110を出力するようにする。なお、ここでは乗算
器122の出力124で指定されるパラメータ数を割合
120としたが、実際には符号量オーバーの可能性があ
るので、多少少なめにするのがよい。
The comparator 130 determines whether or not the quantization number 112 is 1 or 16, and when the quantization number 112 is 1 or 16, there is the above-mentioned problem, so that the switch 132 outputs the parameter 110 before the operation. Although the number of parameters specified by the output 124 of the multiplier 122 is set to the ratio 120 here, it may actually exceed the code amount.

【0038】また、加算器126で量子化パラメータ値
を増加する際、どの小ブロックから行なうかについて
は、例えばY信号と色差信号のブロックがある場合はY
信号のブロックから順に、あるいは既に量子化パラメー
タ値が大きいものは後回しにして、パラメータ値の小さ
いものから順に、といった方法が考えられる。
When the quantization parameter value is increased by the adder 126, which small block is to be used is selected, for example, when there is a Y signal and a color difference signal block, Y
A method is conceivable in which the signal blocks are sequentially arranged, or those having a large quantization parameter value are postponed, and those having a small parameter value are sequentially arranged.

【0039】本発明の一実施例を説明したが、ここで、
本発明の基本的な考え方を改めて説明する。各小ブロッ
クの量子化パラメータk個全てを1つ小さい量子化器を
選ぶように操作することは、量子化パラメータを全く操
作しないで大ブロック全体の量子化番号Qnの代わりに
n-1を用いることと同等であり、従って、0〜k個の
量子化パラメータを操作すれば、等価的に量子化器Qn
〜Qn-1が得られることになる。
Having described one embodiment of the present invention, here:
The basic idea of the present invention will be explained again. Manipulating all k quantisation parameters of each small block to select a quantizer that is one smaller means that Q n−1 instead of the quantizing number Q n of the large block without manipulating the quantizing parameters at all. Is equivalent to the use of a quantizer Q n.
~ Q n-1 will be obtained.

【0040】[0040]

【発明の効果】以上の説明により容易に理解できるよう
に、本発明によれば、目標符号量を満たす量子化器Qn
が選択されたとき、Qnによる不足符号量とQn-1による
超過符号量を用いることで、更に目標符号量近付けるこ
とができ、符号化効率が改善される。
As can be easily understood from the above description, according to the present invention, the quantizer Q n satisfying the target code amount is
There when selected, by using an excess code amount due to insufficient amount of code and Q n-1 by Q n, it is possible to approach further the target code amount, the coding efficiency is improved.

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

【図1】 本発明の一実施例である符号量制御装置の概
略構成ブロック図である。
FIG. 1 is a schematic block diagram of a code amount control device according to an embodiment of the present invention.

【図2】 計算部24,32,40,48の詳細な回路
構成ブロック図である。
FIG. 2 is a detailed circuit configuration block diagram of calculation units 24, 32, 40, and 48.

【図3】 量子化パラメータ操作部58の詳細な回路ブ
ロック図である。
FIG. 3 is a detailed circuit block diagram of a quantization parameter operation unit 58.

【図4】 従来の高能率符号化装置の概略構成ブロック
図である。
FIG. 4 is a schematic configuration block diagram of a conventional high efficiency encoding device.

【図5】 符号量計算部218の概略回路ブロック図で
ある。
5 is a schematic circuit block diagram of a code amount calculation unit 218. FIG.

【図6】 計算部240,244,248,252の詳
細なブロック図である。
FIG. 6 is a detailed block diagram of calculation units 240, 244, 248 and 252.

【図7】 量子化器の選択過程の一例である。FIG. 7 is an example of a quantizer selection process.

【図8】 量子化器Qn,Qn-1の符号量と目標符号量の
関係の説明図である。
FIG. 8 is an explanatory diagram of a relationship between a code amount of the quantizers Q n and Q n-1 and a target code amount.

【図9】 量子化器Qn,Qn-1の符号量と目標符号量の
関係の説明図である。
FIG. 9 is an explanatory diagram of the relationship between the code amount of the quantizers Q n and Q n-1 and the target code amount.

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

10:入力データ 12:量子化パラメータ判定部 14:量子化パラメータ 16,26,34,42,52:量子化番号Qn 18:初期不足データ量 20:初期超過データ量 22:目標符号量 24,32,40,48:計算部 28,36,44,54:不足データ量 30,38,46,56:超過データ量 50:操作前の量子化パラメータ 58:量子化パラメータ操作部 60:操作後の量子化パラメータ 62:入力データ 64:量子化パラメータ 66:入力量子化番号 68:量子化部 70:量子化器選択部 72:可変長符号化部 74:符号量積算部 76:実際の符号量 78:目標符号量 80:減算器 82:符号量差分 84:符号判定部 86:符号判定結果 88:不足データ量入力 90:超過データ量入力 92:切換えスイッチ 94:量子化番号選択部 96:出力量子化番号 98:不足データ量出力 100:超過データ量出力 110:量子化パラメータ入力 112:選択された量子化番号Qn 114:不足データ量 116:超過データ量 118:除算器 122:乗算器 126:加算器 130:比較器 132:切換えスイッチ 134:量子化パラメータ出力 210:大ブロック化部 212:小ブロック化部 214:直交変換部 216:量子化器 218:符号量計算部 220:量子化器選択部 222:可変長符号化部 230:入力データ 232:量子化パラメータ判定部 234:量子化パラメータ 236,242,246,250,254:量子化番号
n 238:目標符号量 240,244,248,252:計算部 262:入力データ 264:量子化パラメータ 266:入力量子化番号 268:量子化部 270:量子化器選択部 272:可変長符号化部 274:符号量積算部 276:実際の符号量 278:目標符号量 280:減算器 282:符号量差分 284:符号判定部 286:符号判定結果 294:量子化番号選択部 296:出力量子化番号 310:符号量が目標符号量よりも小さい場合の選択方
向 312:符号量が目標符号量より大きい場合の選択方向 314:Q6が選択される場合の選択経路
10: Input data 12: Quantization parameter determination unit 14: Quantization parameter 16, 26, 34, 42, 52: Quantization number Q n 18: Initial insufficient data amount 20: Initial excess data amount 22: Target code amount 24, 32, 40, 48: Calculation unit 28, 36, 44, 54: Insufficient data amount 30, 38, 46, 56: Excess data amount 50: Quantization parameter before operation 58: Quantization parameter operation unit 60: After operation Quantization parameter 62: Input data 64: Quantization parameter 66: Input quantization number 68: Quantization unit 70: Quantizer selection unit 72: Variable length coding unit 74: Code amount integration unit 76: Actual code amount 78 : Target code amount 80: Subtractor 82: Code amount difference 84: Code determination unit 86: Code determination result 88: Insufficient data amount input 90: Excessive data amount input 92: Switching switch 94: quantizer number selection unit 96: Output quantization number 98: missing data amount output 100: excess data amount output 110: quantization parameter input 112: selected quantization number Q n 114: insufficient data amount 116: Excess Data Quantity 118: Divider 122: Multiplier 126: Adder 130: Comparator 132: Changeover switch 134: Quantization parameter output 210: Large blocking unit 212: Small blocking unit 214: Orthogonal transformation unit 216: Quantizer 218 : Code amount calculation unit 220: quantizer selection unit 222: variable length coding unit 230: input data 232: quantization parameter determination unit 234: quantization parameter 236, 242, 246, 250, 254: quantization number Q n 238: Target code amount 240, 244, 248, 252: Calculation unit 262: Input data 264: Amount Parameterization 266: Input quantization number 268: Quantization unit 270: Quantizer selection unit 272: Variable length coding unit 274: Code amount integration unit 276: Actual code amount 278: Target code amount 280: Subtractor 282: Code amount difference 284: Code determination unit 286: Code determination result 294: Quantization number selection unit 296: Output quantization number 310: Selection direction when code amount is smaller than target code amount 312: Code amount is more than target code amount Selection direction when larger 314: Selection path when Q 6 is selected

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数の小ブロックからなる大ブロック単
位に符号量を一定にする符号量制御装置であって、符号
化量を計算する複数段の符号量計算手段と、各段におけ
る目標符号量に対する不足/超過符号量を後段に伝達す
る伝達手段と、当該符号量計算手段の計算結果により、
伝達された不足符号量及び超過符号量の何れか一方を更
新する更新手段とを具備し、当該符号量計算手段の最終
段で得られる当該不足/超過符号量に従い、上記各小ブ
ロック符号化する際の量子化パラメータを操作し、もっ
て発生符号量を当該目標符号量に近付けることを特徴と
する符号量制御装置。
1. A code amount control device for making a code amount constant in a large block unit made up of a plurality of small blocks, the code amount calculating means having a plurality of stages for calculating an encoding amount, and a target code amount at each stage. According to the calculation result of the transmission amount means and the transmission means for transmitting the insufficiency / excess code amount to
Update means for updating one of the transmitted insufficient code amount and excess code amount, and each small block is encoded according to the insufficient / excess code amount obtained at the final stage of the code amount calculating means. A code amount control device, characterized in that the generated code amount is brought closer to the target code amount by operating a quantization parameter at that time.
JP21185393A 1993-03-29 1993-08-26 Code quantity controller Withdrawn JPH0766982A (en)

Priority Applications (8)

Application Number Priority Date Filing Date Title
JP21185393A JPH0766982A (en) 1993-08-26 1993-08-26 Code quantity controller
DE69434989T DE69434989T2 (en) 1993-03-29 1994-03-28 Method for controlling the amount of data and encoder for carrying out the same
DE69424591T DE69424591T2 (en) 1993-03-29 1994-03-28 Method of controlling the amount of data and encoder for performing the same.
EP99203834A EP1006731B1 (en) 1993-03-29 1994-03-28 Code amount control method and encoding apparatus for carrying it out
US08/218,632 US5861921A (en) 1993-03-29 1994-03-28 Controlling quantization parameters based on code amount
EP94302203A EP0618733B1 (en) 1993-03-29 1994-03-28 Code amount control method and encoding apparatus for carrying it out.
KR1019940006310A KR0184905B1 (en) 1993-03-29 1994-03-29 Code amount control device and encoding apparatus using the same
US09/190,091 US6438167B1 (en) 1993-03-29 1998-11-12 Code amount control device and encoding apparatus using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21185393A JPH0766982A (en) 1993-08-26 1993-08-26 Code quantity controller

Publications (1)

Publication Number Publication Date
JPH0766982A true JPH0766982A (en) 1995-03-10

Family

ID=16612686

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21185393A Withdrawn JPH0766982A (en) 1993-03-29 1993-08-26 Code quantity controller

Country Status (1)

Country Link
JP (1) JPH0766982A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007525063A (en) * 2003-06-26 2007-08-30 トムソン ライセンシング How to control multipath video rate to match sliding window channel limit
US7541948B2 (en) 2001-11-22 2009-06-02 Panasonic Corporation Variable length coding method and variable length decoding method
JP2010529748A (en) * 2007-05-31 2010-08-26 クゥアルコム・インコーポレイテッド Bit rate reduction technology for image transcoding
KR20160082965A (en) * 2013-10-31 2016-07-11 하마마츠 포토닉스 가부시키가이샤 Light-detecting device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7541948B2 (en) 2001-11-22 2009-06-02 Panasonic Corporation Variable length coding method and variable length decoding method
US7714752B2 (en) 2001-11-22 2010-05-11 Panasonic Corporation Variable length coding method and variable length decoding method
US7956774B2 (en) 2001-11-22 2011-06-07 Panasonic Corporation Variable length coding method and variable length decoding method
US8604947B2 (en) 2001-11-22 2013-12-10 Panasonic Corporation Variable length coding method and variable length decoding method
US8941514B2 (en) 2001-11-22 2015-01-27 Panasonic Intellectual Property Corporation Of America Image coding and decoding system using variable length coding and variable length decoding
JP2007525063A (en) * 2003-06-26 2007-08-30 トムソン ライセンシング How to control multipath video rate to match sliding window channel limit
US8542733B2 (en) 2003-06-26 2013-09-24 Thomson Licensing Multipass video rate control to match sliding window channel constraints
JP2010529748A (en) * 2007-05-31 2010-08-26 クゥアルコム・インコーポレイテッド Bit rate reduction technology for image transcoding
US8213498B2 (en) 2007-05-31 2012-07-03 Qualcomm Incorporated Bitrate reduction techniques for image transcoding
KR20160082965A (en) * 2013-10-31 2016-07-11 하마마츠 포토닉스 가부시키가이샤 Light-detecting device

Similar Documents

Publication Publication Date Title
RU2217880C2 (en) Adaptive speed control system and method for digital video signal compression
USRE36380E (en) Orthogonal transform coding apparatus
EP0510929B1 (en) Image processing apparatus and method
US7206448B2 (en) System and method for using pattern vectors for video and image coding and decoding
US5953460A (en) Image encoding method and an image encoder wherein a one-dimensional signal having the fastest energy conversion rate is selected and outputted as a coded signal
JP2549013B2 (en) Data compression device
JPWO2008065814A1 (en) Encoder
JP2911682B2 (en) Motion compensation using the minimum number of bits per motion block as a criterion for block matching
JPH0766982A (en) Code quantity controller
JP3491001B1 (en) Signal encoding method, signal decoding method, signal encoding device, signal decoding device, signal encoding program, and signal decoding program
JP2734905B2 (en) Image coding device
JPH1066077A (en) Code amount control method for image data and its device
US5940131A (en) Method and apparatus for coding moving pictures
JP3359086B2 (en) Code amount control apparatus and method
JP3256298B2 (en) Image data encoding method and apparatus
KR0165405B1 (en) Bit control device of variable length code using nerve circuit
JPH0465975A (en) Encoder
KR950004121B1 (en) Image signal coder
JP2762712B2 (en) Encoding device and decoding device
JPH04100390A (en) High efficient encoding system
JPH06112836A (en) Quantizer
JPH0310486A (en) Moving picture encoder
JPH03252284A (en) Data compressor
KR0160631B1 (en) Digital image data compressor
JPH11215499A (en) Image coder

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20001031