JP2735001B2 - Image coding device - Google Patents

Image coding device

Info

Publication number
JP2735001B2
JP2735001B2 JP22640294A JP22640294A JP2735001B2 JP 2735001 B2 JP2735001 B2 JP 2735001B2 JP 22640294 A JP22640294 A JP 22640294A JP 22640294 A JP22640294 A JP 22640294A JP 2735001 B2 JP2735001 B2 JP 2735001B2
Authority
JP
Japan
Prior art keywords
value
quantization step
code amount
quantization
circuit
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 - Lifetime
Application number
JP22640294A
Other languages
Japanese (ja)
Other versions
JPH0898175A (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.)
NEC Corp
Original Assignee
Nippon Electric 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP22640294A priority Critical patent/JP2735001B2/en
Publication of JPH0898175A publication Critical patent/JPH0898175A/en
Application granted granted Critical
Publication of JP2735001B2 publication Critical patent/JP2735001B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は画像符号装置に関し、特
に入力画像信号に直交変換を施し、目標符号量以下で可
変長符号化する画像符号化装置における符号量制御回路
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image coding apparatus, and more particularly to a code amount control circuit in an image coding apparatus for performing orthogonal transformation on an input image signal and performing variable length coding at a target code amount or less.

【0002】[0002]

【従来の技術】一般に、直交変換と可変長符号化とを用
いた画像符号化装置では、入力画像信号に直交変換を施
すことで変換係数値に偏りをもたせ、発生確率の高い係
数値に短い符号語を、低い係数値に長い符号語を割り当
てることで、全体として符号量を圧縮し、高能率に符号
化を行う。
2. Description of the Related Art Generally, in an image coding apparatus using orthogonal transform and variable length coding, an orthogonal transform is applied to an input image signal so that a transform coefficient value is biased, and a coefficient value having a high occurrence probability is shortened. By assigning a long codeword to a low coefficient value as a codeword, the code amount is compressed as a whole, and encoding is performed with high efficiency.

【0003】このような画像符号化装置では、目標符号
量以下に符号量制御を行う手段として量子化ステップ値
を変化させて制御することが一般的である。これは、量
子化ステップ値を大きくすると無効係数値の出現確率が
高くなるため符号量を減らすことが出来、逆に小さくす
ると符号量が増えるという特性を利用したものである。
In such an image coding apparatus, as a means for controlling the code amount to be equal to or less than the target code amount, control is generally performed by changing a quantization step value. This utilizes the characteristic that when the quantization step value is increased, the appearance probability of the invalid coefficient value is increased, so that the code amount can be reduced, and conversely, when the quantization step value is decreased, the code amount increases.

【0004】しかし可変長符号では、量子化ステップ値
の変化に対し発生符号量は線形に変化しないため発生符
号量を推定することが難しく、また入力画像の種類によ
って大きく特性が異なるため、実際に可変長符号化を行
わないと発生符号量が分からないという問題があり、目
標符号量以下で符号化を行うことの出来る量子化ステッ
プ値を推定することは一般的に困難である。
However, in a variable-length code, it is difficult to estimate the generated code amount because the generated code amount does not change linearly with a change in the quantization step value. In addition, since the characteristics are greatly different depending on the type of input image, the variable length code is actually used. There is a problem that the generated code amount cannot be known unless variable length coding is performed, and it is generally difficult to estimate a quantization step value at which coding can be performed with a target code amount or less.

【0005】従来の画像符号化装置について図面を参照
して説明する。図4は従来の画像符号化装置の一例を示
すブロック図、図5は従来の符号量制御モデルの第1の
特性を示す図、図6は従来の符号量制御モデルの第2の
特性を示す図である。
[0005] A conventional image coding apparatus will be described with reference to the drawings. FIG. 4 is a block diagram showing an example of a conventional image coding apparatus, FIG. 5 is a diagram showing a first characteristic of a conventional code amount control model, and FIG. 6 is a diagram showing a second characteristic of a conventional code amount control model. FIG.

【0006】従来の画像符号化装置では、ビデオ機器な
ど一定時間内で符号化をする必要がある場合は、図4に
示すように複数個の初期量子化ステップ値を用いて並列
に量子化回路211〜218、発生符号量測定回路22
1〜228を駆動し、最も目標符号量に近い2点あるい
は複数点を選択し、一次関数やスプライン関数といった
近似関数を用いてモデル化を行い、符号化に用いる最適
量子化ステップ値を算出するといった構成が取られてい
る。初期量子化ステップ値と発生符号量の関係をモデル
化した例を図5に示す。ここでは目標符号量近傍の2点
を選択し、一次関数で近似を行い、目標符号量以下とな
る最適量子化ステップ値を求めている。
In a conventional image coding apparatus, when it is necessary to perform coding within a certain period of time such as video equipment, a quantization circuit is used in parallel by using a plurality of initial quantization step values as shown in FIG. 211 to 218, generated code amount measuring circuit 22
1 to 228, two or more points closest to the target code amount are selected, modeling is performed using an approximate function such as a linear function or a spline function, and an optimal quantization step value used for encoding is calculated. Such a configuration is taken. FIG. 5 shows an example in which the relationship between the initial quantization step value and the generated code amount is modeled. Here, two points near the target code amount are selected, approximated by a linear function, and an optimal quantization step value that is equal to or smaller than the target code amount is obtained.

【0007】この方式の一例は、文献1:江成正彦、樫
田素一、’60〜140Mbps対応の「HDTVコー
ディック」”、映像情報1992年1月号、51〜58
項に詳しく記載されている。
An example of this method is described in Document 1: Masahiko Enari and Soichi Kashida, "HDTV Codec" for 60 to 140 Mbps, January 1992, Video Information, 51-58.
It is described in detail in the section.

【0008】[0008]

【発明が解決しようとする課題】このように従来の画像
符号化装置では、一定時間内で符号化を行う場合、統計
的特性の異なる多様な入力画像に対して安定した符号量
で符号化が行えるようにするために、例えば前記文献1
では図4に示すように8種程度の初期量子化ステップ値
を用いて量子化を行い、それぞれの発生符号量を測定す
ることが必要となる。量子化回路211〜218や発生
符号量測定回路221〜228はいずれも複雑な演算や
処理を行うため、これらの回路を複数個用いることは、
符号化装置全体が大型で高価になるという問題点を有し
ている。
As described above, in the conventional image encoding apparatus, when encoding is performed within a predetermined time, encoding is performed with a stable code amount for various input images having different statistical characteristics. In order to enable this, for example,
In this case, as shown in FIG. 4, it is necessary to perform quantization using about eight types of initial quantization step values and measure the amount of generated codes. Since each of the quantization circuits 211 to 218 and the generated code amount measurement circuits 221 to 228 performs complicated calculations and processes, it is difficult to use a plurality of these circuits.
There is a problem that the entire encoding device is large and expensive.

【0009】さらに、このような従来の画像符号化装置
では、初期量子化ステップ値の設定値が入力画像の特性
に合わない場合、図6に示すように、符号量制御回路で
求まった最適量子化ステップ値を用いて実際に可変長符
号化処理を行うと、目標符号量を超えてしまい画面全体
が符号化されなかったり、著しい画質劣化を起こすとい
う問題点がある。特に入力画像が既に符号化・復号化処
理を行ったデータを場合、精度良く符号量制御すること
は困難であることが知られている。
Further, in such a conventional image coding apparatus, when the set value of the initial quantization step value does not match the characteristics of the input image, as shown in FIG. If the variable length coding process is actually performed using the coding step value, there is a problem that the target code amount is exceeded and the entire screen is not coded or the image quality is significantly deteriorated. It is known that it is difficult to control the code amount with high accuracy especially when the input image is data that has already been subjected to the encoding / decoding processing.

【0010】本発明は、符号化に用いる最適量子化ステ
ップ値を求めるときに用いる符号量特性関数を対数近似
をすることで正確にモデル化し、一定時間内に、より少
ない処理装置で精度良く符号量を制御を行い、高品質な
画像信号の符号化装置を提供することを目的とする。
According to the present invention, a code amount characteristic function used for obtaining an optimum quantization step value used for encoding is accurately modeled by performing logarithmic approximation, and a code is accurately obtained with a smaller number of processing devices within a certain time. An object of the present invention is to provide an encoding device for a high-quality image signal by controlling the amount.

【0011】[0011]

【課題を解決するための手段】本発明の画像符号化装置
は、入力画像信号を複数の画素からなる小面積のブロッ
クに分割し、このブロック単位に直交変換を施し、その
出力結果である変換係数値を量子化し、量子化係数値に
対応する可変長符号語を出力する画像符号化装置におい
て、予め設定した2種の初期量子化ステップ値と前フレ
ームの量子化に用いた量子化ステップ値との合計3種の
量子化ステップ値を用いて前記変換係数値をそれぞれ量
子化する量子化手段と、前記量子化手段の出力値を可変
長符号化した際の符号量の累積を測定する発生符号量測
定手段と、前記3種の量子化ステップ値による3種の発
生符号量と予め設定された目標符号量との比較値を求め
比較値の絶対値が最も小さい2種の前記発生符号量とそ
のときの量子化ステップ値とを選択する適応選択手段
と、前記選択手段で選択された前記2種の発生符号量の
対数値と前記量子化ステップ値の対数値とを求める対数
値算出手段と、前記対数値算出手段から出力される量子
化ステップ値の対数値とその時の発生符号量の対数値と
から前記最適量子化ステップ値を求める量子化ステップ
算出手段とを有する符号量制御手段を備えている。
An image coding apparatus according to the present invention divides an input image signal into blocks each having a small area composed of a plurality of pixels, performs an orthogonal transformation on a block basis, and obtains a transformation result as an output result. In an image encoding device that quantizes a coefficient value and outputs a variable-length codeword corresponding to the quantized coefficient value, two types of preset initial quantization step values and a quantization step value used for quantization of a previous frame are provided. And quantizing means for quantizing each of the transform coefficient values using a total of three types of quantization step values, and measuring the cumulative amount of code when the output value of the quantizing means is subjected to variable-length coding. Code amount measuring means for calculating a comparison value between three types of generated code amounts based on the three types of quantization step values and a preset target code amount;
Adaptive selection means for selecting the two kinds of generated code amounts having the smallest absolute value of the comparison value and the quantization step value at that time; and a logarithmic value of the two kinds of generated code amounts selected by the selection means. Logarithmic value calculating means for calculating the logarithmic value of the quantization step value; and the optimal quantization step value from the logarithmic value of the quantization step value output from the logarithmic value calculating means and the logarithmic value of the generated code amount at that time. Code amount control means having a quantization step calculation means for obtaining

【0012】本発明の画像符号化装置は、入力画像信号
を複数の画素からなる小面積のブロックに分割し、この
ブロック単位に直交変換を施し、その出力結果である変
換係数値を量子化し、量子化係数値に対応する可変長符
号語を出力する画像符号化装置において、最適量子化ス
テップ値を1フレーム遅延させるフレーム遅延回路と、
前記変換係数値を予め設定された第1の初期量子化ス
テップ値で量子化を行う第1の量子化回路と、前記変換
係数値を予め設定された第2の初期量子化ステップ値で
量子化を行う第2の量子化回路と、前記変換係数値を前
記フレーム遅延回路の出力の量子化ステップ値で量子化
を行う第3の量子化回路と、前記第1,第2及び第3の
量子化回路のそれぞれの出力の3種類の量子化係数値を
可変長データに符号化したときの3種類の符号量の累積
を測定し3種類の符号量累積値を出力する第1,第2及
び第3の発生符号量測定回路と、前記3種類の符号量累
積値と予め設定された目標符号量との差分値の絶対値を
求め最も絶対値の小さい符号量累積値とそのときの量子
化ステップ値と2番目に絶対値の小さい符号量累積値と
そのときの量子化ステップ値とを出力する適応選択回路
と、この適応選択回路の前記4種類の出力信号の対数値
を算出する対数値算出回路と、この対数値算出回路の4
種類の出力を用いて符号量特性のモデル化を行い前記目
標符号量以下で符号化を行う前記最適量子化ステップ値
を算出する量子化ステップ算出回路と、を有する符号量
制御回路であって、前記フレーム遅延回路が、前記量子
化ステップ算出回路で算出された前記最適量子化ステッ
プ値を1フレーム遅延させる回路であり、この符号量制
御回路を備えている。
An image coding apparatus according to the present invention divides an input image signal into blocks each having a small area made up of a plurality of pixels, performs orthogonal transform on a block basis, and quantizes a transform coefficient value as an output result. In an image encoding device that outputs a variable-length codeword corresponding to a quantization coefficient value, an optimal quantization
A frame delay circuit for delaying the step value by one frame;
A first quantization circuit for quantizing the transform coefficient value with a preset first initial quantization step value, and quantizing the transform coefficient value with a preset second initial quantization step value A third quantization circuit that quantizes the transform coefficient value with a quantization step value of an output of the frame delay circuit; and a first quantization circuit that quantizes the transform coefficient value. The first, second, and third units measure the accumulation of three types of code amounts when the three types of quantization coefficient values of the outputs of the respective encoding circuits are encoded into variable-length data, and output three types of accumulated code amount values. A third generated code amount measuring circuit for obtaining an absolute value of a difference value between the three types of code amount accumulated values and a preset target code amount, and a code amount accumulated value having the smallest absolute value and quantization at that time step value and the quantization scan at that time a small code amount accumulated value of the second absolute value An adaptive selection circuit for outputting a-up value, the logarithm calculation circuit for calculating a logarithm of the four kinds of output signal of the adaptive selection circuit, 4 of the logarithm calculation circuit
Code amount with a quantization step calculation circuit for calculating the optimum quantization step value encoding is performed by using a type of output performs modeling code amount characteristic the following target code amount, the
A control circuit, wherein the frame delay circuit is configured to
The optimal quantization step calculated by the quantization step calculation circuit.
This is a circuit for delaying the loop value by one frame, and includes this code amount control circuit.

【0013】[0013]

【実施例】次に、本発明について図面を参照して説明す
る。
Next, the present invention will be described with reference to the drawings.

【0014】図1は本発明の画像符号化装置の一実施例
を示すブロック図、図2は本実施例における符号量制御
回路の一例を示すブロック図、図3は本実施例における
符号量制御モデルの特性を示す図である。
FIG. 1 is a block diagram showing an embodiment of an image coding apparatus according to the present invention, FIG. 2 is a block diagram showing an example of a code amount control circuit in the present embodiment, and FIG. 3 is a code amount control circuit in the present embodiment. FIG. 6 is a diagram illustrating characteristics of a model.

【0015】図1において、本実施例は入力画像信号1
60を予め設定された複数の画素からなるブロックに分
割するブロック分割回路71と、各ブロックデータ16
1に対し直交変換を施し変換係数値162を算出する直
交変換回路72と、変換係数値162を基に予め設定し
た目標符号量以下で符号化出来る最適量子化ステップ値
163を決定する符号量制御回路73と、最適量子化ス
テップ値163が算出される期間変換係数値162を遅
延させて遅延変換係数値164を出力する遅延回路74
と、最適量子化ステップ値163を用いて遅延変換係数
値164を量子化して量子化計数値165を出力する量
子化回路75と、量子化係数値165をハフマン符号を
利用して可変長データに変換し可変長符号語166を出
力する可変長符号化回路76とを有して構成している。
In FIG. 1, the present embodiment uses an input image signal 1
A block dividing circuit 71 that divides the block data 60 into blocks each including a plurality of predetermined pixels;
An orthogonal transform circuit 72 for performing an orthogonal transform on 1 and calculating a transform coefficient value 162, and a code amount control for determining an optimal quantization step value 163 that can be encoded with a target code amount or less based on the transform coefficient value 162. A circuit 73 and a delay circuit 74 for delaying the period conversion coefficient value 162 for which the optimum quantization step value 163 is calculated and outputting a delay conversion coefficient value 164
A quantization circuit 75 that quantizes the delayed transform coefficient value 164 using the optimal quantization step value 163 and outputs a quantized count value 165, and converts the quantized coefficient value 165 into variable-length data using a Huffman code. And a variable length coding circuit 76 for converting and outputting a variable length code word 166.

【0016】次に、本実施例の動作について、図1を参
照して説明する。
Next, the operation of this embodiment will be described with reference to FIG.

【0017】まず、入力画像信号160はデジタル化さ
れた画像データであり、多値の白黒画像、RGB原色信
号や輝度および2種類の色差信号などで構成され、複数
の画素からなる小面積のブロックデータ161にブロッ
ク分割回路71で分割される。直交変換回路72では、
ブロックデータ161に対し直交変換を施し変換係数値
162を出力する。直交変換手段としてはDCT(離散
コサイン変換)が一般的であるが他の変換手段を用いて
も良い。
First, an input image signal 160 is digitized image data, and is composed of a multi-valued black-and-white image, an RGB primary color signal, luminance and two kinds of color difference signals, etc., and has a small area block composed of a plurality of pixels. The data is divided into data 161 by the block dividing circuit 71. In the orthogonal transformation circuit 72,
The orthogonal transform is performed on the block data 161 to output a transform coefficient value 162. DCT (discrete cosine transform) is generally used as the orthogonal transform means, but other transform means may be used.

【0018】変換係数値162は符号量制御回路73
で、目標符号化量以下で符号化出来る最適量子化ステッ
プ値163を決定し、量子化回路75に出力する。
The conversion coefficient value 162 is calculated by the code amount control circuit 73.
Then, the optimal quantization step value 163 that can be encoded with the target encoding amount or less is determined and output to the quantization circuit 75.

【0019】遅延回路74は符号量制御回路73で最適
量子化スチップ値163を求める間変換係数値162を
遅延させ、遅延変換係数値164を量子化回路75に出
力する。
The delay circuit 74 delays the transform coefficient value 162 while obtaining the optimum quantized schip value 163 in the code amount control circuit 73, and outputs a delayed transform coefficient value 164 to the quantization circuit 75.

【0020】量子化回路75では符号量制御回路73で
算出した最適量子化ステップ値163を用いて、遅延変
換係数値164の量子化を行い、量子化係数値165を
可変長符号化回路76に出力する。可変長符号化回路7
6では、量子化係数値165をハフマン符号を利用して
可変長データに変換し、量子化係数値165に対応する
可変長符号語166を出力する。
The quantization circuit 75 quantizes the delay conversion coefficient value 164 using the optimal quantization step value 163 calculated by the code amount control circuit 73, and sends the quantization coefficient value 165 to the variable length coding circuit 76. Output. Variable length coding circuit 7
In step 6, the quantization coefficient value 165 is converted into variable length data using Huffman coding, and a variable length code word 166 corresponding to the quantization coefficient value 165 is output.

【0021】次に、本実施例における符号量制御回路に
ついて図2を参照して説明する。
Next, a code amount control circuit according to this embodiment will be described with reference to FIG.

【0022】図2において、本実施例における符号量制
御回路73は、最適量子化ステップ値163を1フレー
ム遅延させるフレーム遅延回路17と、変換係数値16
2をレジスタ20に記憶されている予め設定された初期
量子化ステップ値100で量子化を行う量子化回路10
と、変換係数値162をレジスタ20に記憶されている
予め設定されさ初期量子化ステップ値101で量子化を
行う量子化回路11と、変換係数値162をフレーム遅
延回路17の出力の量子化ステップ値102で量子化を
行う量子化回路12と、量子化回路10,11,12の
それぞれの出力の量子化係数値103,104,105
を可変長データに符号化したときの符号量の累積を測定
し符号量累積値106,107,108を出力する発生
符号量測定回路13,14,15と、符号量累積値10
6,107,108とレジスタ21に予め記憶された目
標符号量との差分値の絶対値を求め最も絶対値の小さい
符号量累積値109とそのときの量子化ステップ値11
0と2番目に絶対値の小さい符号累積値111とそのと
きの量子化ステップ値112とを出力する適応選択回路
16と、適応選択回路16の前記4種類の出力信号の対
数値を算出する対数値算出回路18と、対数値算出回路
18の4種類の出力を用いて符号量特性のモデル化を行
い目標符号量以下で符号化を行う最適量子化ステップ値
163を算出する量子化ステップ算出回路19とを有し
て構成している。
In FIG. 2, the code amount control circuit 73 in this embodiment includes a frame delay circuit 17 for delaying the optimal quantization step value 163 by one frame, and a transform coefficient value 16.
2 is a quantization circuit 10 for performing quantization with a preset initial quantization step value 100 stored in a register 20.
And a quantization circuit 11 for quantizing the transform coefficient value 162 with a preset initial quantization step value 101 stored in the register 20, and a quantization step for converting the transform coefficient value 162 to the output of the frame delay circuit 17. A quantization circuit 12 for performing quantization with a value 102, and quantization coefficient values 103, 104, and 105 of outputs of the quantization circuits 10, 11, and 12, respectively.
The generated code amount measuring circuits 13, 14, and 15, which measure the accumulated code amount when encoding is encoded into variable length data and output the accumulated code amount values 106, 107, and 108;
6, 107, 108 and the absolute value of the difference value between the target code amount previously stored in the register 21 and the code amount cumulative value 109 having the smallest absolute value and the quantization step value 11 at that time.
An adaptive selection circuit 16 that outputs a code accumulation value 111 having the second smallest absolute value and a quantization step value 112 at that time, and a pair for calculating logarithmic values of the four types of output signals of the adaptive selection circuit 16. A numerical value calculating circuit 18 and a quantization step calculating circuit for modeling the code amount characteristic using the four types of outputs of the logarithmic value calculating circuit 18 and calculating an optimal quantization step value 163 for performing coding at a target code amount or less. 19.

【0023】次に、本実施例における符号量制御回路7
3の動作について、図1,図2を参照して説明する。
Next, the code amount control circuit 7 in the present embodiment
The operation of No. 3 will be described with reference to FIGS.

【0024】変換係数値162は、あらかじめ設定した
2種の初期量子化ステップ値100、101と、前フレ
ームの符号化に用いた量子化ステップ値163をフレー
ム遅延回路17で1フレーム遅延させた量子化ステップ
値102を用いて量子化回路10,11,12で変換係
数値162の量子化を用い量子化係数値103,10
4,105として発生符号量測定回路13,14,15
に出力する。
The transform coefficient value 162 is obtained by delaying the two types of preset initial quantization step values 100 and 101 and the quantization step value 163 used for encoding the previous frame by one frame with the frame delay circuit 17. Using the quantization step value 102, the quantization circuits 10, 11, 12 quantize the transform coefficient value 162 using the quantization coefficient values 103, 10
Generated code amount measuring circuits 13, 14, 15 as 4, 105
Output to

【0025】発生符号量測定回路13,14,15はそ
れぞれ量子化係数値103,104,105を可変長デ
ータに符号化したときの符号量の累積を測定し、符号量
累積値106,107,108として適応選択回路16
に出力する。
The generated code amount measuring circuits 13, 14, and 15 measure the accumulated code amounts when the quantized coefficient values 103, 104, and 105 are encoded into variable-length data, respectively. The adaptive selection circuit 16 as 108
Output to

【0026】適応選択回路16では符号量累積値10
6,107,108と目標符号量167の差分値の絶対
値を求め、最も絶対値の小さい符号量累積値106とそ
のときの量子化ステップ値110と2番目に絶対値の小
さい符号累積値111とそのとき量子化ステップ値11
2を選択し対数値算出回路18に出力する。対数値算出
回路18は例えばROM(Read Only Mem
ory)等を利用いて構成し、符号量累積値109,1
11の対数値と量子化ステップ値110,112の対数
値とを算出し量子化ステップ算出回路19に出力され
る。対数値の底としては2,10等どんな値を用いても
良い。
In the adaptive selection circuit 16, the code amount accumulated value 10
6, 107, 108 and the target code amount 167, the absolute value of the difference value is obtained, the code amount accumulated value 106 having the smallest absolute value, the quantization step value 110 at that time, and the code accumulated value 111 having the second smallest absolute value. And then the quantization step value 11
2 is selected and output to the logarithmic value calculation circuit 18. The logarithmic value calculation circuit 18 is, for example, a ROM (Read Only Mem).
ory) or the like, and the accumulated code amount 109, 1
The logarithmic value of 11 and the logarithmic value of the quantization step values 110 and 112 are calculated and output to the quantization step calculation circuit 19. Any value such as 2, 10 may be used as the base of the logarithmic value.

【0027】量子化ステップ算出回路19では符号量累
積値の対数値113,115と量子化ステップ値の対数
値114,116を用いて符号量特性のモデル化を行
い、目標符号量以下で符号化を行う最適量子化ステップ
値163を計算し、量子化回路75に出力する。
The quantization step calculation circuit 19 models the code amount characteristics using the logarithmic values 113 and 115 of the code amount accumulated value and the logarithmic values 114 and 116 of the quantization step value. Is calculated and output to the quantization circuit 75.

【0028】図3は符号量特性関数のモデルについて説
明したものである。量子化ステップ値と発生符号量の関
係は図5、図6に示したように、割り当てられた可変長
符号語によって異なるが、全体としては指数的な関係が
ある。そこで量子化ステップ値の対数値をx軸、発生符
号量の対数値y軸に取り、対数算出回路18の出力値の
2点を通る一次関数の傾きと切片を算出し、前記一次関
数のy軸が目標符号量167の対数値を超えない最小の
量子化ステップ値を算出する。前記最小の量子化ステッ
プ値を符号化に用いる最適量子化ステップ値163とす
ることで、目標符号量167を超えない符号量制御を行
う。
FIG. 3 illustrates a model of the code amount characteristic function. As shown in FIGS. 5 and 6, the relationship between the quantization step value and the generated code amount differs depending on the assigned variable-length codeword, but has an exponential relationship as a whole. Therefore, the logarithmic value of the quantization step value is set on the x-axis and the logarithmic value of the generated code amount is set on the y-axis, and the slope and intercept of a linear function passing through two points of the output value of the logarithmic calculation circuit 18 are calculated. The minimum quantization step value whose axis does not exceed the logarithmic value of the target code amount 167 is calculated. By setting the minimum quantization step value to the optimum quantization step value 163 used for encoding, code amount control not exceeding the target code amount 167 is performed.

【0029】本実施例の符号量制御回路73では量子化
ステップ値に2種の初期量子化ステップ値100,10
1に加え、前フレームの符号化処理に用いた量子化ステ
ップ値102を用いることで、入力画像が動画像である
場合、目標符号量近傍の特性を求めることで制度精度が
高めることが可能である
In the code amount control circuit 73 of this embodiment, two initial quantization step values 100 and 10 are used as the quantization step values.
By using the quantization step value 102 used in the encoding process of the previous frame in addition to 1, when the input image is a moving image, the accuracy in the vicinity of the target code amount can be obtained to improve accuracy. There is .

【0030】[0030]

【発明の効果】以上説明したように本発明は、入力画像
信号を複数の画素からなる小面積のブロックに分割し、
このブロック単位に直交変換を施し、その出力結果であ
る変換係数値を量子化し、量子化係数値に対応する可変
長符号語を出力する画像符号化装置において、予め設定
した2種の初期量子化ステップ値と前フレームの量子化
に用いた量子化ステップ値との合計3種の量子化ステッ
プ値を用いて前記変換係数値をそれぞれ量子化する量子
化手段と、量子化手段と出力値を可変長符号化した際の
符号量の累積を測定する発生符号量測定手段と、3種の
量子化ステップ値による3種の発生符号量と予め設定さ
れた目標符号量との比較値を求め比較値の最も小さい2
種の発生符号量とそのときの量子化ステップ値とを選択
する適応選択手段と、選択手段で選択された2種の発生
符号量の対数値と量子化ステップ値の対数値とを求める
対数値算出手段と、対数値算出手段から出力される量子
化ステップ値の対数値とその時の発生符号量の対数値と
から最適量子化ステップ値を求める量子化ステップ算出
手段とを有する最適量子化ステップ値を算出する符号量
制御手段を備えることにより、入力画像信号を3種の量
子化ステップ値を用いて分析を行い、対数値を利用して
符号量特性関数をモデル化することで目標符号量を超え
ない符号量制御を一定時間内に行うことができる効果が
ある。
As described above, the present invention divides an input image signal into blocks each having a small area composed of a plurality of pixels.
In an image coding apparatus that performs orthogonal transform on a block basis, quantizes a transform coefficient value as an output result, and outputs a variable-length codeword corresponding to the quantized coefficient value, two types of preset initial quantization are provided. Quantizing means for quantizing each of the transform coefficient values using a total of three types of quantization step values of a step value and a quantization step value used for quantization of the previous frame; Generated code amount measuring means for measuring the accumulation of the code amount at the time of long coding, and a comparison value between the three generated code amounts based on the three quantization step values and a preset target code amount. The smallest of 2
Adaptive selection means for selecting a kind of generated code amount and a quantization step value at that time, and a logarithmic value for calculating a logarithmic value of the two kinds of generated code amounts and a logarithmic value of the quantization step value selected by the selection means An optimum quantization step value having a calculation means and a quantization step calculation means for obtaining an optimum quantization step value from a logarithmic value of a quantization step value output from the logarithmic value calculation means and a logarithmic value of a generated code amount at that time. Is provided, the input image signal is analyzed using three types of quantization step values, and the code amount characteristic function is modeled using a logarithmic value to set the target code amount. There is an effect that code amount control not exceeding can be performed within a certain time.

【0031】また、従来8種程度必要であった量子化回
路、発生符号量測定回路を3種に減らすことにより、装
置を小型軽量化することができて安価に提供することが
できる効果がある。
By reducing the number of quantization circuits and generated code amount measurement circuits required to be about eight in the past to three, it is possible to reduce the size and weight of the apparatus and to provide the apparatus at low cost. .

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

【図1】本発明の画像符号化装置の一実施例を示すブロ
ック図である。
FIG. 1 is a block diagram illustrating an embodiment of an image encoding device according to the present invention.

【図2】本実施例の画像符号化装置のうち符号量制御回
路の一例を示すブロック図である。
FIG. 2 is a block diagram illustrating an example of a code amount control circuit in the image encoding device according to the present embodiment.

【図3】本実施例における符号量制御モデルの特性を示
す図である。
FIG. 3 is a diagram illustrating characteristics of a code amount control model in the present embodiment.

【図4】従来例を示すブロック図である。FIG. 4 is a block diagram showing a conventional example.

【図5】従来例における符号量制御モデルの第1の特性
を示す図である。
FIG. 5 is a diagram showing a first characteristic of a code amount control model in a conventional example.

【図6】従来例における符号量制御モデルの第2の特性
を示す図である。
FIG. 6 is a diagram showing a second characteristic of the code amount control model in the conventional example.

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

10,11,12,75 量子化回路 13,14,15 符号量算出回路 16 適応選択回路 17 フレーム遅延回路 18 対数値算出回路 19 量子化ステップ算出回路 20,21 レジスタ 71 ブロック分割回路 72 直交変換回路 73 符号量制御回路 74 遅延回路 76 可変長符号化回路 101,102 初期量子化ステップ値 102 1フレーム遅延した量子化ステップ値 103,104,105,164 量子化係数値 106,107,108 符号量累積値 109,111 選択された符号量累積値 110,112 選択された量子化ステップ値 113,115 符号量累積値の対数値 114,116 量子化ステップ値の対数値 160 入力画像信号 161 ブロックデータ 162 変換係数値 163 最適量子化ステップ値 164 遅延変換係数値 165 量子化係数値 166 可変長符号語 167 目標符号量 10, 11, 12, 75 Quantization circuit 13, 14, 15 Code amount calculation circuit 16 Adaptive selection circuit 17 Frame delay circuit 18 Logarithmic value calculation circuit 19 Quantization step calculation circuit 20, 21 Register 71 Block division circuit 72 Orthogonal transformation circuit 73 code amount control circuit 74 delay circuit 76 variable length coding circuit 101, 102 initial quantization step value 102 quantization step value delayed by one frame 103, 104, 105, 164 quantization coefficient value 106, 107, 108 code amount accumulation Value 109,111 Selected code amount cumulative value 110,112 Selected quantization step value 113,115 Log value of code amount cumulative value 114,116 Logarithmic value of quantization step value 160 Input image signal 161 Block data 162 Conversion Coefficient value 163 Optimal quantization step value 164 Delay Conversion coefficient value 165 Quantization coefficient value 166 Variable length codeword 167 Target code amount

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 FI H04N 1/41 G06F 15/66 330H ──────────────────────────────────────────────────の Continued on front page (51) Int.Cl. 6 Identification code FI H04N 1/41 G06F 15/66 330H

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】入力画像信号を複数の画素からなる小面積
のブロックに分割し、このブロック単位に直交変換を施
し、その出力結果である変換係数値を量子化し、量子化
係数値に対応する可変長符号語を出力する画像符号化装
置において、予め設定した2種の初期量子化ステップ値
と前フレームの量子化に用いた量子化ステップ値との合
計3種の量子化ステップ値を用いて前記変換係数値をそ
れぞれ量子化する量子化手段と、前記量子化手段の出力
値を可変長符号化した際の符号量の累積を測定する発生
符号量測定手段と、前記3種の量子化ステップ値による
3種の発生符号量と予め設定された目標符号量との比較
値を求め比較値の絶対値が最も小さい2種の前記発生符
号量とそのときの量子化ステップ値とを選択する適応選
択手段と、前記選択手段で選択された前記2種の発生符
号量の対数値と前記量子化ステップ値の対数値とを求め
る対数値算出手段と、前記対数値算出手段から出力され
る量子化ステップ値の対数値とその時の発生符号量の対
数値とから前記最適量子化ステップ値を求める量子化ス
テップ算出手段とを有する符号量制御手段を備えること
を特徴とする画像符号化装置。
An input image signal is divided into blocks each having a small area made up of a plurality of pixels, an orthogonal transformation is performed for each block, and a transform coefficient value as an output result is quantized to correspond to the quantized coefficient value. In an image encoding device that outputs a variable-length code word, a total of three types of quantization step values, that is, two types of preset initial quantization step values and a quantization step value used for quantization of a previous frame, are used. Quantizing means for quantizing each of the transform coefficient values, generated code amount measuring means for measuring the accumulated code amount when the output value of the quantizing means is subjected to variable length coding, and the three types of quantization steps An adaptive method for determining a comparison value between three types of generated code amounts according to values and a preset target code amount and selecting the two generated code amounts having the smallest absolute value of the comparison value and a quantization step value at that time. Selecting means; Means for calculating a logarithmic value of the two types of generated code amounts selected by the means and a logarithmic value of the quantization step value; and a logarithmic value of a quantization step value output from the logarithmic value calculation means. An image coding apparatus, comprising: a code amount control unit having a quantization step calculation unit for obtaining the optimum quantization step value from a logarithmic value of a generated code amount at that time.
【請求項2】入力画像信号を複数の画素からなる小面積
のブロックに分割し、このブロック単位に直交変換を施
し、その出力結果である変換係数値を量子化し、量子化
係数値に対応する可変長符号語を出力する画像符号化装
置において、最適量子化ステップ値を1フレーム遅延さ
せるフレーム遅延回路と、 前記変換係数値を予め設定
された第1の初期量子化ステップ値で量子化を行う第1
の量子化回路と、前記変換係数値を予め設定された第2
の初期量子化ステップ値で量子化を行う第2の量子化回
路と、前記変換係数値を前記フレーム遅延回路の出力の
量子化ステップ値で量子化を行う第3の量子化回路と、
前記第1,第2及び第3の量子化回路のそれぞれの出力
の3種類の量子化係数値を可変長データに符号化したと
きの3種類の符号量の累積を測定し3種類の符号量累積
値を出力する第1,第2及び第3の発生符号量測定回路
と、前記3種類の符号量累積値と予め設定された目標符
号量との差分値の絶対値を求め最も絶対値の小さい符号
量累積値とそのときの量子化ステップ値と2番目に絶対
値の小さい符号量累積値とそのときの量子化ステップ値
とを出力する適応選択回路と、この適応選択回路の前記
4種類の出力信号の対数値を算出する対数値算出回路
と、この対数値算出回路の4種類の出力を用いて符号量
特性のモデル化を行い前記目標符号量以下で符号化を行
う前記最適量子化ステップ値を算出する量子化ステップ
算出回路と、を有する符号量制御回路であって、前記フ
レーム遅延回路が、前記量子化ステップ算出回路で算出
された前記最適量子化ステップ値を1フレーム遅延させ
る回路であり、この符号量制御回路を備えることを特徴
とする画像符号化装置。
2. An input image signal is divided into blocks each having a small area composed of a plurality of pixels, an orthogonal transform is performed on a block basis, and a transform coefficient value as an output result is quantized to correspond to the quantized coefficient value. In an image encoding device that outputs a variable-length code word, a frame delay circuit that delays an optimal quantization step value by one frame, and quantizes the transform coefficient value with a first initial quantization step value set in advance. First
, And a second predetermined conversion coefficient value.
A second quantization circuit that performs quantization using an initial quantization step value, and a third quantization circuit that performs quantization on the transform coefficient value using a quantization step value of an output of the frame delay circuit.
The accumulation of three types of code amounts when the three types of quantization coefficient values output from the first, second, and third quantization circuits are encoded into variable length data is measured, and the three types of code amounts are measured. A first, second, and third generated code amount measuring circuit that outputs a cumulative value; and an absolute value of a difference value between the three types of code amount cumulative values and a preset target code amount. An adaptive selection circuit for outputting a small code amount accumulated value, a quantization step value at that time, a code amount accumulated value having the second smallest absolute value, and a quantization step value at that time, and the adaptive selection circuit A logarithmic value calculation circuit for calculating the logarithmic value of the four types of output signals, and a code amount characteristic is modeled using the four types of outputs of the logarithmic value calculation circuit, and coding is performed at the target code amount or less. a quantization step calculation circuit for calculating the optimum quantization step value, the A code amount control circuit, the full
A frame delay circuit is calculated by the quantization step calculation circuit.
Delaying the optimum quantization step value by one frame
That a circuit, the image encoding device characterized by comprising the code amount control circuit.
JP22640294A 1994-09-21 1994-09-21 Image coding device Expired - Lifetime JP2735001B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22640294A JP2735001B2 (en) 1994-09-21 1994-09-21 Image coding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22640294A JP2735001B2 (en) 1994-09-21 1994-09-21 Image coding device

Publications (2)

Publication Number Publication Date
JPH0898175A JPH0898175A (en) 1996-04-12
JP2735001B2 true JP2735001B2 (en) 1998-04-02

Family

ID=16844563

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22640294A Expired - Lifetime JP2735001B2 (en) 1994-09-21 1994-09-21 Image coding device

Country Status (1)

Country Link
JP (1) JP2735001B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6366614B1 (en) * 1996-10-11 2002-04-02 Qualcomm Inc. Adaptive rate control for digital video compression
JP5244479B2 (en) * 2008-07-09 2013-07-24 パナソニック株式会社 Image coding apparatus and image coding method
JP5257215B2 (en) * 2009-04-16 2013-08-07 ソニー株式会社 Image coding apparatus and image coding method
JP5493761B2 (en) * 2009-11-20 2014-05-14 株式会社ニコン Image compression apparatus and electronic camera

Also Published As

Publication number Publication date
JPH0898175A (en) 1996-04-12

Similar Documents

Publication Publication Date Title
EP0763925A2 (en) Image processing apparatus
JPH05316360A (en) Coding/decoding device for picture signal
US6697529B2 (en) Data compression method and recording medium with data compression program recorded therein
JP2003018599A (en) Method and apparatus for encoding image
JPH10108184A (en) Image data processing unit and its method
JP2968666B2 (en) Image coding method and apparatus
JP2735001B2 (en) Image coding device
JP2830855B2 (en) Adaptive quantization controller
US6859562B2 (en) Coded data length detection apparatus, method of the same, and image coding apparatus
JP2523953B2 (en) Encoder
JP2934342B2 (en) Image compression coding device
JPH04220081A (en) Method and device for picture data decoding
JP3143487B2 (en) Image processing device
JP3024386B2 (en) Encoding device
JPH06165149A (en) Method for controlling image coding
JP3235761B2 (en) High efficiency coding device
JPH0670175A (en) Method and device for encoding picture data
JP3017334B2 (en) Image data encoding method and apparatus
JP2872149B2 (en) Image coding device
JPH03291081A (en) Picture data compression device
JP2950559B2 (en) Image processing method and apparatus
JPH03192878A (en) Picture data compressor
JPH02305272A (en) Picture encoding method
JPH0974561A (en) Adaptive area division image encoding system
JPH08511138A (en) Digital image compression using tile segmentation

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19971202