JPH1028266A - Image encoding device - Google Patents

Image encoding device

Info

Publication number
JPH1028266A
JPH1028266A JP9088384A JP8838497A JPH1028266A JP H1028266 A JPH1028266 A JP H1028266A JP 9088384 A JP9088384 A JP 9088384A JP 8838497 A JP8838497 A JP 8838497A JP H1028266 A JPH1028266 A JP H1028266A
Authority
JP
Japan
Prior art keywords
code amount
quantization
circuit
coefficient value
quantization step
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP9088384A
Other languages
Japanese (ja)
Inventor
Naoto 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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP9088384A priority Critical patent/JPH1028266A/en
Publication of JPH1028266A publication Critical patent/JPH1028266A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To attain encoding by encoding amounts less than set encoding amounts at the time of operating encoding, using variable length encoding in an image encoding device. SOLUTION: Weighting is operated by quantizing circuits 41 and 43 by using two kinds of initial quantization steps, generated encoding amounts at the time of variable length encoding are measured by encoding amount measuring circuits 42 and 44, a semi-optimal function coefficient value is calculated by an encoding amount characteristic function calculating circuit 47, and a quasi-optimal quantization step is calculated by a quantization step calculating circuit 48. Then, quantization is operated by a quantizing circuit 45 by using the quasi-optimal quantization step, the generated encoding amounts are measured by an encoding amount measuring circuit 46, and the generated encoding amounts closest to target encoding amounts 117 and two kinds of the quantization steps at that time are selected by a selecting circuit 49. An optimal function coefficient value is calculated by an encoding amount characteristic function calculating circuit 50, the quasi-optimal function coefficient value, and the optimal function coefficient value are adaptively selected by a characteristic function selecting circuit 51, the target encoding amounts are corrected, and the quantization step at the time of encoding is calculated by a quantization step calculating circuit 52.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、入力画像信号を一
定符号量以下に圧縮符号化するための画像符号化装置に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image encoding apparatus for compressing and encoding an input image signal to a predetermined code amount or less.

【0002】[0002]

【従来の技術】可変長符号化を用いた画像符号化装置で
は、目標符号量以下で画像信号符号化することができ、
かつ安定した画質が得られることが必要である。
2. Description of the Related Art An image coding apparatus using variable length coding can perform image signal coding with a target code amount or less.
It is necessary that stable image quality be obtained.

【0003】一般的に符号化時の発生符号量を制御する
ためには、量子化ステップを用いて制御する方式が用い
られている。これは、量子化ステップ値を大きくすると
無効係数値の出現確率が高くなるため符号量を減らすこ
とができ、逆に小さくすると符号量が増えるという特性
を利用したものである。
In general, in order to control the generated code amount at the time of encoding, a method of controlling using a quantization step is used. 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. Conversely, when the quantization step value is reduced, the code amount increases.

【0004】しかし、可変長符号化では、量子化ステッ
プに対し発生符号量は線形に変化しないため、発生符号
量を推定することが難しく、実際に可変長符号化を行わ
ないと発生符号量が分からないという問題がある。
However, in the variable length coding, since the generated code amount does not change linearly with respect to the quantization step, it is difficult to estimate the generated code amount. If the variable length coding is not actually performed, the generated code amount is reduced. There is a problem of not knowing.

【0005】よって符号量制御は、可変長符号化を用い
て画像符号化を行う場合に最も重要な技術となるが、発
生符号量を制御する量子化ステップと発生符号量の関係
は、入力画像の統計的特性によって変化するため、目標
符号量以下で符号化を行うことのできる量子化ステップ
を推定することは困難である。
Therefore, code amount control is the most important technique when performing image coding using variable length coding. However, the relationship between the quantization step for controlling the generated code amount and the generated code amount is as follows. Therefore, it is difficult to estimate a quantization step capable of performing encoding at a target code amount or less.

【0006】従来の符号量制御方式では、符号化遅延を
考慮しない蓄積メディアなどの場合は、フィードバック
ループを構成し量子化ステップを変化させながら目標符
号量以下となる量子化ステップを算出することで構成
し、ビデオ機器など一定時間内で符号化をする必要があ
る場合、複数個の初期量子化ステップを用いて並列に量
子化回路,符号化測定回路を駆動し、最も目標符号量に
近い2点あるいは複数点を選択し、一次関数やスプライ
ン関数といった近似関数を用いてモデル化を行い、符号
量特性関数を算出し、符号化に用いる量子化ステップを
算出するということで構成されている。
[0006] In the conventional code amount control method, in the case of a storage medium or the like that does not consider the encoding delay, a feedback loop is formed and the quantization step is calculated by changing the quantization step to obtain the target code amount or less. When it is necessary to perform encoding within a certain period of time such as video equipment, the quantization circuit and the encoding measurement circuit are driven in parallel using a plurality of initial quantization steps, and the number of encoded signals is set to a value closest to the target code amount. A point or a plurality of points are selected, modeling is performed using an approximate function such as a linear function or a spline function, a code amount characteristic function is calculated, and a quantization step used for coding is calculated.

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

【0008】[0008]

【発明が解決しようとする課題】このように従来の符号
量制御方式では、一定時間内で符号化を行う場合、統計
的特性の異なる多様な入力画像に対して安定した符号量
で符号化が行えるようにするために、8種程度の初期量
子化ステップを用いて量子化を行い、それぞれの発生符
号量を測定することが必要となる。量子化回路や符号量
測定回路はいずれも複雑な演算や処理を行うため、これ
らの回路を複数個用いることは、符号化装置全体が大型
で高価になる。
As described above, in the conventional code amount control method, when encoding is performed within a fixed time, encoding is performed with a stable code amount for various input images having different statistical characteristics. In order to be able to perform the quantization, it is necessary to perform quantization using about eight types of initial quantization steps and measure the generated code amount of each. Since both the quantization circuit and the code amount measurement circuit perform complicated calculations and processes, the use of a plurality of these circuits makes the entire encoding device large and expensive.

【0009】さらに、このような符号量制御方式では、
初期量子化ステップの設定値によって、符号量特性関数
が入力画像の特性を十分に近似できないため、符号化に
用いる量子化ステップを推定し符号化を行った場合、発
生符号量が目標符号量以上となる可能性があったり、既
に符号化・復号化を行った画像データを再度符号化を行
う場合、量子化ステップに対する発生符号量の変動が通
常の画像データと比較して複雑になるため、精度良く符
号量制御を行うことができない。
Furthermore, in such a code amount control system,
Because the code amount characteristic function cannot sufficiently approximate the characteristics of the input image due to the setting value of the initial quantization step, when the quantization step used for coding is estimated and coding is performed, the generated code amount is equal to or larger than the target code amount. Or when re-encoding already encoded / decoded image data, the variation of the generated code amount with respect to the quantization step becomes more complicated than normal image data, Code amount control cannot be performed with high accuracy.

【0010】また、量子化は乗除算を行うため、演算精
度を確保するために係数値を数ビット分シフトすること
があるが、この処理は入力画像の持つ情報量に偏りが大
きい場合、この偏りを考慮せずに推定した量子化ステッ
プを用いて量子化を行うと、発生符号量は目標符号量を
下回るにも関わらず係数値のオーバーフローが発生し、
画質劣化が発生する、等の問題がある。
[0010] In addition, since the quantization performs multiplication and division, the coefficient value may be shifted by several bits in order to secure the operation accuracy. This process is performed when the amount of information of the input image is large. When quantization is performed using the quantization step estimated without considering the bias, the overflow of the coefficient value occurs even though the generated code amount is lower than the target code amount,
There are problems such as deterioration of image quality.

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

【0012】[0012]

【課題を解決するための手段】このような高品質な画像
信号の符号化装置として 入力画像を複数の画素からな
る小面積のブロックに分割するブロック分割回路と、前
記ブロック分割回路にてブロック分割されたブロックデ
ータを直交変換を施し周波数データである変換係数値に
変換する直交変換回路と、前記変換係数値を目標符号量
以下で符号化されるような量子化ステップを求める符号
量制御回路と、前記量子化ステップを用いて前記変換係
数値の量子化を行い量子化係数値を出力する量子化回路
と、前記量子化係数値を可変長符号語に符号化する可変
長符号化回路と、前記量子化ステップと前記可変長符号
語に同期信号、誤り訂正符号等を付加し伝送路、記録再
生装置に変調データを送出する変調回路から構成される
画像符号化装置において、前記符号量制御回路は、あら
かじめ定められた2種の初期量子化ステップを用いて変
換係数値の重み付けを行い量子化係数値を出力する量子
化回路と、前記2種の初期量子化ステップを用いて計算
した前記量子化係数値を可変長符号化を行った際の符号
量の累積を発生符号量として測定する符号量測定回路
と、前記2種の初期量子化ステップの対数値と前記2種
の初期量子化ステップを用いて測定した発生符号量の対
数値とから、目標符号量近傍での符号量特性関数を求め
関数係数値を出力する符号量特性関数算出回路と、前記
関数係数値と目標符号量の対数値から、目標符号量以下
で符号化を行うことのできる最適量子化ステップを求め
る量子化ステップ算出回路とから構成される画像符号化
装置が考えられる。
A block dividing circuit for dividing an input image into blocks each having a small area composed of a plurality of pixels, and a block dividing circuit for dividing the input image into blocks having a plurality of pixels. An orthogonal transformation circuit that performs orthogonal transformation on the block data that has been converted to transform coefficient values that are frequency data, and a code amount control circuit that calculates a quantization step such that the transform coefficient value is encoded at a target code amount or less. A quantization circuit that quantizes the transform coefficient value using the quantization step and outputs a quantized coefficient value, and a variable length encoding circuit that encodes the quantized coefficient value into a variable length codeword. An image coding apparatus comprising a modulation circuit for adding a synchronization signal, an error correction code, and the like to the quantization step and the variable-length codeword and transmitting modulated data to a transmission path and a recording / reproducing apparatus. The code amount control circuit weights a transform coefficient value using two types of predetermined initial quantization steps and outputs a quantized coefficient value; and the two types of initial quantization steps A code amount measuring circuit that measures the accumulated code amount as a generated code amount when performing the variable length coding on the quantized coefficient value calculated by using the logarithmic values of the two types of initial quantization steps and A code amount characteristic function calculating circuit for obtaining a code amount characteristic function near the target code amount from the logarithmic value of the generated code amount measured using the two types of initial quantization steps and outputting a function coefficient value; An image coding apparatus including a quantization step calculation circuit for obtaining an optimum quantization step capable of performing coding at a target code amount or less from a logarithmic value of a numerical value and a target code amount is conceivable.

【0013】また、高品質な画像の符号装置として、入
力画像を複数の画素からなる小面積のブロックに分割す
るブロック分割回路と、前記ブロック分割回路にてブロ
ック分割されたブロックデータを直交変換を施し周波数
データである変換係数値に変換する直交変換回路と、前
記変換係数値を目標符号量以下で符号化されるような量
子化ステップを求める符号量制御回路と、前記量子化ス
テップを用いて前記変換係数値の量子化を行い量子化係
数値を出力する量子化回路と、前記量子化係数値を可変
長符号語に符号化する可変長符号化回路と、前記量子化
ステップと前記可変長符号語に同期信号、誤り訂正符号
等を付加し伝送路、記録再生装置に変調データを送出す
る変調回路から構成される画像符号化装置において、前
記符号量制御回路は、あらかじめ定められた2種の初期
量子化ステップを用いて前記変換係数値の重み付けを行
い量子化係数値を出力する量子化回路と、前記初期量子
化ステップを用いて計算した前記量子化係数値を可変長
符号化した際の発生符号量を測定する符号量測定回路
と、前記2種の初期量子化ステップの対数値と前記2種
の初期量子化ステップを用いて測定した発生符号量の対
数値とから、目標符号量近傍の量子化ステップを検索す
るための符号量特性関数を求め準最適関数係数値を出力
する符号量特性関数算出回路と、前記準最適関数係数値
と、目標符号量の対数値から準最適量子化ステップを求
める量子化ステップ算出回路と、前記準最適量子化ステ
ップを用いて前記変換係数値の量子化を行い量子化係数
値を出力する量子化回路と、前記準最適量子化ステップ
により計算された量子化係数値を可変長符号化した際の
発生符号量を測定する符号量測定回路と、前記2種の初
期量子化ステップを用いて測定された発生符号量と前記
準最適量子化ステップを用いて計測された発生符号量か
ら、目標符号量に最も近い2種の発生符号量と目標符号
量に最も近い2種の発生符号量算出に用いた量子化ステ
ップを選択する選択回路と、前記選択回路の出力である
2種の選択された量子化ステップの対数値と前記2種の
選択された量子化ステップを用いて測定した発生符号量
の対数値とから、目標符号量近傍における符号量特性関
数の最適関数係数値を求める符号量特性関数算出回路
と、目標符号量の対数値と前記最適関数係数値から、目
標符号量以下で符号化を行うことのできる最適量子化ス
テップを求める量子化ステップ算出回路とから構成され
る画像符号化装置が考えられる。
As a high-quality image encoding apparatus, a block dividing circuit for dividing an input image into small-area blocks composed of a plurality of pixels, and an orthogonal transform of the block data divided by the block dividing circuit are performed. An orthogonal transform circuit that converts the transform coefficient value into a transform coefficient value that is the applied frequency data, a code amount control circuit that calculates a quantization step such that the transform coefficient value is encoded at a target code amount or less, and using the quantization step A quantization circuit that quantizes the transform coefficient value and outputs a quantized coefficient value; a variable length coding circuit that encodes the quantized coefficient value into a variable length codeword; the quantization step and the variable length In an image coding apparatus comprising a modulation circuit for adding a synchronization signal, an error correction code and the like to a code word and transmitting modulation data to a transmission path and a recording / reproducing apparatus, the code amount control circuit A quantization circuit that weights the transform coefficient value using two types of predetermined initial quantization steps and outputs a quantized coefficient value, and the quantized coefficient value calculated using the initial quantization step A code amount measuring circuit for measuring a generated code amount when variable length coding is performed, and a pair of a logarithmic value of the two types of initial quantization steps and a generated code amount measured using the two types of initial quantization steps. A code amount characteristic function calculating circuit for determining a code amount characteristic function for searching for a quantization step near the target code amount from the numerical value and outputting a sub-optimal function coefficient value; A quantization step calculation circuit that obtains a quasi-optimal quantization step from a logarithmic value of; a quantization circuit that quantizes the transform coefficient value using the quasi-optimal quantization step and outputs a quantized coefficient value; Most A code amount measuring circuit for measuring a generated code amount when the quantized coefficient value calculated by the quantization step is subjected to variable length coding; and a generated code amount measured by using the two types of initial quantization steps. From the generated code amounts measured using the sub-optimal quantization step, two types of generated code amounts closest to the target code amount and a quantization step used for calculation of the two types of generated code amounts closest to the target code amount are selected. From the logarithmic value of the two selected quantization steps, which are the outputs of the selection circuit, and the logarithmic value of the generated code amount measured using the two selected quantization steps. A code amount characteristic function calculating circuit for obtaining an optimal function coefficient value of the code amount characteristic function in the vicinity of the code amount; and an optimal code amount capable of performing encoding at a target code amount or less from the logarithmic value of the target code amount and the optimal function coefficient value. Quantization step An image coding apparatus including a quantization step calculating circuit for obtaining a loop is conceivable.

【0014】ここで、本発明の第1の発明である画像符
号化装置は、入力画像を複数の画素からなる小面積のブ
ロックに分割するブロック分割回路と、前記ブロック分
割回路にてブロック分割されたブロックデータを直交変
換を施し周波数データである変換係数値に変換する直交
変換回路と、前記変換係数値を目標符号量以下で符号化
されるような量子化ステップを求める符号量制御回路
と、前記量子化ステップを用いて前記変換係数値の量子
化を行い量子化係数値を出力する量子化回路と、前記量
子化係数値を可変長符号語に符号化する可変長符号化回
路と、前記量子化ステップと前記可変長符号語に同期信
号、誤り訂正符号等を付加し伝送路、記録再生装置に変
調データを送出する変調回路から構成される画像符号化
装置において、前記符号量制御回路は、あらかじめ定め
られた2種の初期量子化ステップを用いて前記変換係数
値の重み付けを行い量子化係数値を出力する量子化回路
と、前記2種の初期量子化ステップを用いて計算した前
記量子化係数値を可変長符号化を行った際の符号量の累
積を発生符号量として測定する符号量測定回路と、前記
2種の初期量子化ステップの対数値と前記2種の初期量
子化ステップを用いて測定した発生符号量の対数値とか
ら、目標符号量近傍の量子化ステップを検索するための
符号量特性関数を求め準最適関数係数値を出力する符号
量特性関数算出回路と、前記準最適関数係数値と目標符
号量の対数値から準最適量子化ステップを求める量子化
ステップ算出回路と、前記準最適量子化ステップを用い
て前記変換係数値の量子化を行い量子化係数値を出力す
る量子化回路と、前記準最適量子化ステップを用いて求
められた前記量子化係数値を可変長符号化した際の発生
符号量を符号量測定回路で測定し、前記2種の初期量子
化ステップを用いて計測された発生符号量と前記準最適
量子化ステップを用いて計測された発生符号量から、目
標符号量に最も近い2種の発生符号量を選択発生符号量
として選択し前記2種の選択符号量算出に用いた量子化
ステップを2種の選択量子化ステップとして選択する選
択回路と、前記2種の選択量子化ステップの対数値と前
記2種の選択発生符号量の対数値とから、目標符号量近
傍における符号量特性関数の最適関数係数値を求める符
号量特性関数算出回路と、前記最適関数係数値から、量
子化ステップの変化に対する発生符号量の変化がしきい
値より大きい場合は、最適関数係数値を選択関数係数値
として選択し、目標符号量を修正せずに選択目標符号量
として出力し、量子化ステップの変化に対する発生符号
量の変化がしきい値より小さい場合は、前記準最適関数
係数値を選択関数係数値として選択し、前記準最適量子
化ステップを用いて計測された発生符号量を用いて、目
標符号量の修正を行い選択目標符号量として出力する特
性関数選択回路と、前記選択目標符号量関数の対数値と
前記選択関数係数値とから、目標符号量以下で符号化を
行うことのできる量子化ステップを最適量子化ステップ
として計算する量子化ステップ算出回路とから構成され
ることを特徴とする。
Here, an image encoding apparatus according to a first aspect of the present invention includes a block dividing circuit for dividing an input image into small-area blocks each including a plurality of pixels, and a block dividing circuit for dividing the input image into blocks. An orthogonal transformation circuit that performs orthogonal transformation on the block data that has been converted to a transformation coefficient value that is frequency data, and a code amount control circuit that calculates a quantization step such that the transformation coefficient value is encoded at a target code amount or less. A quantization circuit that quantizes the transform coefficient value using the quantization step and outputs a quantized coefficient value, a variable length coding circuit that encodes the quantized coefficient value into a variable length codeword, An image coding apparatus comprising a quantization step and a modulation circuit for adding a synchronization signal, an error correction code, and the like to the variable-length codeword and transmitting modulation data to a recording / reproducing apparatus. The signal amount control circuit uses a predetermined two types of initial quantization steps to weight the transform coefficient value and outputs a quantized coefficient value, and the two types of initial quantization steps. A code amount measuring circuit for measuring, as a generated code amount, the accumulation of the code amount when the quantized coefficient value calculated by the variable length coding is performed, a logarithmic value of the two types of initial quantization steps, and A code amount characteristic function for obtaining a code amount characteristic function for searching for a quantization step near the target code amount from the logarithmic value of the generated code amount measured using the initial quantization step, and outputting a sub-optimal function coefficient value A calculating circuit, a quantization step calculating circuit for obtaining a sub-optimal quantization step from the logarithmic value of the sub-optimal function coefficient value and a target code amount, and performing the quantization of the transform coefficient value using the sub-optimal quantization step. quantum A quantization circuit that outputs a coefficient value; and a code amount measurement circuit that measures a generated code amount when the quantized coefficient value obtained by using the sub-optimal quantization step is subjected to variable length coding. From the generated code amount measured using the initial quantization step and the generated code amount measured using the sub-optimal quantization step, the two generated code amounts closest to the target code amount are selected as the generated code amounts. A selection circuit for selecting the quantization step used for calculating the two types of selection code amounts as two types of selection quantization steps, a logarithmic value of the two types of selection quantization steps, and the two types of selection generation codes A code amount characteristic function calculating circuit for obtaining an optimal function coefficient value of the code amount characteristic function in the vicinity of the target code amount from the logarithmic value of the amount; Threshold If it is larger, the optimum function coefficient value is selected as the selection function coefficient value, and the selected code amount is output as the selected target code amount without correcting the target code amount. If smaller, the sub-optimal function coefficient value is selected as a selection function coefficient value, and using the generated code amount measured using the sub-optimal quantization step, the target code amount is corrected and the selected target code amount is set. A quantization function that calculates a quantization step capable of performing encoding at a target code amount or less as an optimum quantization step from a characteristic function selection circuit to be output, and a logarithmic value of the selected target code amount function and the selection function coefficient value. And a conversion step calculation circuit.

【0015】また、本発明の第2の発明は、第1の発明
の画像符号化装置であって、前記符号量制御回路におい
て、あらかじめ設定した2種の初期量子化ステップを用
いて量子化された前記量子化係数値のいずれか一方を用
いて、前記量子化係数値の最大値を測定し最大量子化係
数値を求める量子化係数測定回路と、前記最大量子化係
数値を計算するときに用いた量子化ステップと前記最大
量子化係数値とから、変換係数値がオーバーフローせず
に量子化を行うことができる際の量子化ステップである
最小量子化ステップを算出する最小量子化ステップ算出
回路と、前記最小量子化ステップと前記符号量制御回路
で求めた最適量子化ステップのステップ値を比較し、ス
テップ値の大きい量子化ステップを選択し、目標符号量
以下で符号化でき、量子化係数値のオーバーフローの起
こらない量子化ステップを選択する量子化ステップ選択
回路とをさらに備えることを特徴とする。
According to a second aspect of the present invention, there is provided the image encoding apparatus according to the first aspect of the present invention, wherein the code amount control circuit performs quantization using two kinds of preset initial quantization steps. A quantization coefficient measuring circuit for measuring a maximum value of the quantization coefficient value to obtain a maximum quantization coefficient value by using any one of the quantization coefficient values, and calculating the maximum quantization coefficient value. A minimum quantization step calculation circuit for calculating a minimum quantization step which is a quantization step when the transform coefficient value can be quantized without overflowing from the used quantization step and the maximum quantization coefficient value. And the minimum quantization step and the step value of the optimum quantization step obtained by the code amount control circuit are compared, and a quantization step having a large step value is selected, and encoding can be performed with a target code amount or less. And further comprising a quantization step selection circuit for selecting the quantization step does not occur the overflow of the quantized coefficient values.

【0016】[0016]

【発明の実施の形態】本発明の実施例について図を用い
て説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described with reference to the drawings.

【0017】図5は、本発明の符号量制御方式を用いた
画像符号化装置の概要を示すブロック図である。
FIG. 5 is a block diagram showing an outline of an image coding apparatus using the code amount control system of the present invention.

【0018】まず、入力画像信号160はデジタル化さ
れた画像データであり、多値の白黒画像、RGB原色信
号や輝度および2種類の色差信号などで構成され、複数
の画素からなる小面積のブロックデータ161にブロッ
ク分割回路71で分割される。直交変換回路72では、
ブロックデータ161に対し直交変換を施し変換係数値
162を出力する。
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 is 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.

【0019】変換係数値162は符号量制御回路73
で、目標符号量以下で符号化できる量子化ステップ16
3を決定し、量子化回路74、変調回路76に出力す
る。
The conversion coefficient value 162 is calculated by the code amount control circuit 73.
Quantization step 16 that can be encoded with a target code amount or less
3 is output to the quantization circuit 74 and the modulation circuit 76.

【0020】量子化回路74では符号量制御回路73で
推定した量子化ステップ163を用いて変換係数値16
2の量子化を行い、量子化係数値164を可変長符号化
回路75に出力する。可変長符号化回路75では、量子
化係数値164を可変長データに変換し、量子化係数値
164に対応する可変長符号語165を変調回路に出力
する。
The quantization circuit 74 uses the quantization step 163 estimated by the code amount control circuit 73 to convert the transform coefficient value 16
2 and outputs a quantized coefficient value 164 to the variable length coding circuit 75. The variable length coding circuit 75 converts the quantization coefficient value 164 into variable length data, and outputs a variable length code word 165 corresponding to the quantization coefficient value 164 to the modulation circuit.

【0021】変調回路76では、量子化ステップ163
と可変長符号語165に、同期信号,誤り訂正符号など
を加え伝送路、記録再生装置などに出力データ166と
して出力する。
In the modulation circuit 76, the quantization step 163
Then, a synchronization signal, an error correction code, and the like are added to the variable-length codeword 165 and output as output data 166 to a transmission path, a recording / reproducing device, or the like.

【0022】図1は、符号量制御回路73の第1の例を
示すブロック図である。この符号量制御回路では、変換
係数値162は、あらかじめ設定した2種の初期量子化
ステップ101,102を用いて量子化回路1,3で変
換係数値162の重み付けを行い量子化係数値103,
104として符号量測定回路2,4に出力する。符号量
測定回路2,4ではそれぞれ、量子化係数値103,1
04を可変長データに符号化するのに必要な符号量の累
積を測定し、発生符号量105,106として符号量特
性関数算出回路5に出力する。符号量特性関数算出回路
5では、2種の初期量子化ステップ101,102の対
数値と発生符号量105,106の対数値を求め、量子
化ステップと発生符号量の関係を簡単にモデル化するこ
とができるので、一次関数を用いて関数の係数値を求
め、量子化ステップ算出回路6に関数係数値108を出
力する。量子化ステップ算出回路6では、目標符号量1
07の対数値と関数係数値108から目標符号量以下で
符号化を行える最適量子化ステップ163を計算し、図
5の量子化回路74と変調回路76に出力する。
FIG. 1 is a block diagram showing a first example of the code amount control circuit 73. In this code amount control circuit, the transform coefficient value 162 is weighted by the quantizing circuits 1 and 3 using the two types of preset initial quantization steps 101 and 102, and the quantized coefficient value 103,
As 104, it is output to the code amount measuring circuits 2 and 4. In the code amount measuring circuits 2 and 4, quantization coefficient values 103 and 1 are respectively provided.
It measures the accumulation of the code amount necessary to encode the code 04 into variable-length data, and outputs it to the code amount characteristic function calculation circuit 5 as the generated code amounts 105 and 106. The code amount characteristic function calculation circuit 5 obtains logarithmic values of the two types of initial quantization steps 101 and 102 and logarithmic values of the generated code amounts 105 and 106, and easily models the relationship between the quantization step and the generated code amount. Therefore, the coefficient value of the function is obtained using a linear function, and the function coefficient value 108 is output to the quantization step calculation circuit 6. In the quantization step calculation circuit 6, the target code amount 1
An optimum quantization step 163 capable of performing encoding at a target code amount or less is calculated from the logarithmic value of 07 and the function coefficient value 108, and is output to the quantization circuit 74 and the modulation circuit 76 in FIG.

【0023】符号量特性関数について、図6,図7を用
いて説明する。図6は量子化ステップに対する、発生符
号量の関係を図示したものである。一般的な入力画像で
はこのような関係となることが多く、複雑な近似関係を
求めることは、演算処理量が増えることから用いられ
ず、複数の初期量子化ステップを用いて変換係数値の量
子化を行い可変長符号化を行ったときの発生符号量を測
定し、目標符号量に最も近い2種の発生符号量と発生符
号量算出に用いた量子化ステップを用いて直線近似を行
い、目標符号量以下で符号化を行うことができる量子化
ステップを推定する。しかし、量子化ステップ、発生符
号量についてそれぞれ対数値を求め、量子化ステップと
発生符号量の関係を求めると図7のように、ほぼ1次の
直線で近似を行うことができるため、初期量子化ステッ
プを用いて変換係数値の量子化を行い、可変長符号化を
行ったときの発生符号量を調べるといった複雑な回路を
大幅に減らすことができ、より正確に目標符号量以下で
符号化を行う量子化ステップを求めることが可能とな
る。
The code amount characteristic function will be described with reference to FIGS. FIG. 6 illustrates the relationship between the amount of generated code and the quantization step. Such a relationship often occurs in a general input image, and finding a complicated approximate relationship is not used because of an increase in the amount of arithmetic processing, and the quantization of the transform coefficient value is performed using a plurality of initial quantization steps. , Measure the generated code amount when performing variable length coding, and perform linear approximation using the two types of generated code amounts closest to the target code amount and the quantization step used for calculating the generated code amount, A quantization step that can perform encoding with a target code amount or less is estimated. However, when a logarithmic value is obtained for each of the quantization step and the generated code amount, and the relationship between the quantization step and the generated code amount is obtained, approximation can be performed with a substantially linear line as shown in FIG. Quantization of the transform coefficient value using the conversion step, and the complexity of checking the amount of code generated when performing variable-length coding can be greatly reduced. Can be obtained.

【0024】図2は、符号量制御回路73の第2の例を
示すブロック図である。この符号量制御回路では、変換
係数値162は、あらかじめ設定した2種の初期量子化
ステップ111,112を用いて量子化回路21,23
で変換係数値162の重み付けを行い量子化係数値11
3,114として符号量測定回路22,24に出力す
る。符号量測定回路22,24ではそれぞれ、量子化係
数値113,114を可変長データに符号化したときに
必要な符号量を測定し、発生符号量115,116とし
て符号量特性関数算出回路27に出力する。符号量特性
関数算出回路27では、2種の初期量子化ステップ11
1,112の対数値と発生符号量115,116の対数
値を求め、一次関数を用いて関数係数値118を求め、
量子化ステップ算出回路28に出力する。
FIG. 2 is a block diagram showing a second example of the code amount control circuit 73. In this code amount control circuit, the transform coefficient value 162 is obtained by using two types of initial quantization steps 111 and 112 set in advance.
Weights the transform coefficient value 162 to calculate the quantized coefficient value 11
3, 114 are output to the code amount measuring circuits 22 and 24. The code amount measurement circuits 22 and 24 measure the code amount required when the quantization coefficient values 113 and 114 are encoded into variable length data, and generate the generated code amounts 115 and 116 to the code amount characteristic function calculation circuit 27. Output. In the code amount characteristic function calculation circuit 27, two types of initial quantization steps 11
The logarithmic value of 1,112 and the logarithmic value of the generated code amount 115,116 are obtained, and a function coefficient value 118 is obtained using a linear function,
Output to the quantization step calculation circuit 28.

【0025】量子化ステップ算出回路28では、目標符
号量117の対数値と関数係数値118から目標符号量
近傍の量子化ステップである準最適量子化ステップ11
9を算出し、量子化回路25,選択回路29に出力す
る。
In the quantization step calculation circuit 28, the semi-optimal quantization step 11 which is a quantization step near the target code amount is determined from the logarithmic value of the target code amount 117 and the function coefficient value 118.
9 is output to the quantization circuit 25 and the selection circuit 29.

【0026】量子化回路25では、準最適量子化ステッ
プ119を用いて変換係数値162の量子化を行い、量
子化係数値120を符号量測定回路26に出力する。
The quantization circuit 25 quantizes the transform coefficient value 162 using the sub-optimal quantization step 119, and outputs the quantization coefficient value 120 to the code amount measurement circuit 26.

【0027】符号量測定回路26では、量子化係数値1
20の可変長符号化を行うのに必要な符号量を測定し、
選択回路29に発生符号量121を出力する。
In the code amount measuring circuit 26, the quantization coefficient value 1
Measure the code amount required to perform 20 variable length codings,
The generated code amount 121 is output to the selection circuit 29.

【0028】選択回路29では、目標符号量117に最
も近い2種の発生符号量を発生符号量115,116,
121から選択し、選択された発生符号量の量子化係数
値の算出に用いた量子化ステップを量子化ステップ11
1,112,119から選択し選択量子化ステップ12
2,124、選択発生符号量123,125として出力
する。
In the selection circuit 29, the two kinds of generated code amounts closest to the target code amount 117 are generated code amounts 115, 116,
121, and the quantization step used to calculate the quantization coefficient value of the selected generated code amount is the quantization step 11
1, 12 and 119, and selected quantization step 12
2, 124, and output 123 and 125, respectively.

【0029】符号量特性関数算出回路30では、選択量
子化ステップ122,124の対数値と選択発生符号量
123,125の対数値を用いて求められ関数係数値1
26として出力する。
The code amount characteristic function calculation circuit 30 uses the logarithmic values of the selective quantization steps 122 and 124 and the logarithmic values of the selected generated code amounts 123 and 125 to obtain a function coefficient value 1
26 is output.

【0030】量子化ステップ算出回路31では、目標符
号量117の対数値と、関数係数値126から目標符号
量以下で符号化を行える最適量子化ステップ163を算
出し、図5の量子化回路74と変調回路76に出力す
る。
The quantization step calculation circuit 31 calculates an optimum quantization step 163 capable of performing coding at a target code amount or less from the logarithmic value of the target code amount 117 and the function coefficient value 126, and calculates the quantization circuit 74 in FIG. Is output to the modulation circuit 76.

【0031】図3は、本願発明の第1の発明である符号
量制御回路73の例を示すブロック図である。この符号
量制御回路では、変換係数値162は、あらかじめ設定
された2種の初期量子化ステップ131,132を用い
て量子化回路41,43で変換係数値162の重み付け
を行い量子化係数値133,134として符号量測定回
路42,44に出力する。符号量測定回路42,44で
はそれぞれ、量子化係数値133,134を可変長デー
タに符号化したときに必要な符号量を測定し、発生符号
量135,136として符号量特性関数算出回路47に
出力する。符号量特性関数算出回路47では、2種の初
期量子化ステップ131,132の対数値と発生符号量
135,136の対数値を求め、一次関数を用いて関数
係数値138を求め、量子化ステップ算出回路48に出
力する。
FIG. 3 is a block diagram showing an example of the code amount control circuit 73 according to the first embodiment of the present invention. In this code amount control circuit, the transform coefficient value 162 is weighted by the quantizing circuits 41 and 43 using two kinds of preset initial quantization steps 131 and 132, and the quantized coefficient value 133 is obtained. , 134 to the code amount measuring circuits 42 and 44. The code amount measurement circuits 42 and 44 measure the code amounts required when the quantization coefficient values 133 and 134 are encoded into variable length data, and the generated code amounts 135 and 136 are transmitted to the code amount characteristic function calculation circuit 47. Output. The code amount characteristic function calculation circuit 47 obtains logarithmic values of the two types of initial quantization steps 131 and 132 and logarithms of generated code amounts 135 and 136, obtains a function coefficient value 138 using a linear function, and performs a quantization step. Output to the calculation circuit 48.

【0032】量子化ステップ算出回路48では、目標符
号量137の対数値と関数係数値138から目標符号量
となるような準最適量子化ステップ139を算出し、量
子化回路45および選択回路49に出力する。
The quantization step calculation circuit 48 calculates a sub-optimal quantization step 139 for obtaining the target code amount from the logarithmic value of the target code amount 137 and the function coefficient value 138, and sends it to the quantization circuit 45 and the selection circuit 49. Output.

【0033】量子化回路45では、準最適量子化ステッ
プ139を用いて変換係数値162の量子化を行い、量
子化係数値140を出力する。
The quantization circuit 45 quantizes the transform coefficient value 162 using the sub-optimal quantization step 139, and outputs a quantized coefficient value 140.

【0034】符号量測定回路46では、量子化係数値1
40の可変長符号化を行ったときの符号量を測定し、選
択回路49と特性関数選択回路51に発生符号量141
を出力する。
In the code amount measuring circuit 46, the quantization coefficient value 1
The code amount when the variable-length coding of 40 is performed is measured, and the generated code amount 141 is supplied to the selection circuit 49 and the characteristic function selection circuit 51.
Is output.

【0035】選択回路49では、目標符号量117に最
も近い2種の発生符号量を発生符号量135,136,
141から選択し、そのときの量子化ステップを量子化
ステップ131,132,139から選択し選択量子化
ステップ142,144、選択発生符号量143,14
5として出力する。
In the selection circuit 49, the two types of generated code amounts closest to the target code amount 117 are generated code amounts 135, 136,
141, the quantization step at that time is selected from the quantization steps 131, 132, and 139, and the selected quantization steps 142 and 144, and the selected generated code amounts 143 and 14 are selected.
Output as 5.

【0036】符号量特性関数算出回路50では、選択量
子化ステップ142,144の対数値と選択発生符号量
143,145の対数値を求め、符号量特性関数の関数
係数値146を求める。
The code amount characteristic function calculation circuit 50 obtains logarithmic values of the selective quantization steps 142 and 144 and logarithms of the selected generated code amounts 143 and 145, and obtains a function coefficient value 146 of the code amount characteristic function.

【0037】特性関数選択回路51では、初期分析から
得られた関数係数値146と、目標符号量付近の符号量
特性を表す関数係数値146を、関数係数値146とし
きい値を比較して適応的に切り替え、選択された関数係
数値148を出力する。
In the characteristic function selection circuit 51, the function coefficient value 146 obtained from the initial analysis and the function coefficient value 146 representing the code amount characteristic near the target code amount are adapted by comparing the function coefficient value 146 with the threshold value. And the selected function coefficient value 148 is output.

【0038】また、特性関数選択回路51ではさらに、
準最適量子化ステップ139を用いて測定した発生符号
量141が目標符号量137より大きい場合、目標符号
量の修正を行い修正した目標符号量147を出力する。
The characteristic function selection circuit 51 further includes:
If the generated code amount 141 measured using the sub-optimal quantization step 139 is larger than the target code amount 137, the target code amount is corrected and the corrected target code amount 147 is output.

【0039】これは、入力画像に既に符号化・復号化処
理を行った画像を用いる場合、量子化ステップの変化に
対する発生符号量の変化が、小区間で見ると関数係数値
の変動が大きくなるという問題を有するため、正確なモ
デル化が行えないため発生し、より大区間での関数係数
値を用いて符号化に用いる量子化ステップを求めること
で、小区間での関数係数値の変動を吸収することがで
き、安定した符号化が行えるからである。
This is because, when an image that has already been subjected to encoding and decoding processing is used as an input image, the change in the generated code amount with respect to the change in the quantization step shows a large variation in the function coefficient value when viewed in a small section. The problem arises because accurate modeling cannot be performed, and by calculating the quantization step used for encoding using the function coefficient value in a larger section, the variation of the function coefficient value in a small section is calculated. This is because absorption can be performed and stable encoding can be performed.

【0040】量子化ステップ算出回路52では、修正さ
れた目標符号量147の対数値と、選択された関数係数
値148から目標符号量以下で符号化を行える最適量子
化ステップ163を算出し、図5の量子化回路74と変
調回路76に出力する。
The quantization step calculation circuit 52 calculates an optimum quantization step 163 capable of performing coding with a target code amount or less from the logarithmic value of the corrected target code amount 147 and the selected function coefficient value 148. 5 to the quantization circuit 74 and the modulation circuit 76.

【0041】図4は、本発明の第2の発明である符号量
制御回路73の例を示すブロック図である。この符号量
制御回路では、変換係数値162は、量子化回路60で
あらかじめ設定された量子化ステップ150を用いて量
子化され、量子化係数値151として出力される。ここ
で、量子化回路60は図1,図2,あるいは図3の初期
量子化ステップを用いて量子化を行う量子化回路と共有
することができる。
FIG. 4 is a block diagram showing an example of the code amount control circuit 73 according to the second embodiment of the present invention. In this code amount control circuit, the transform coefficient value 162 is quantized using a quantization step 150 set in advance by the quantization circuit 60, and is output as a quantized coefficient value 151. Here, the quantization circuit 60 can be shared with a quantization circuit that performs quantization using the initial quantization step of FIG. 1, FIG. 2, or FIG.

【0042】量子化係数測定回路61では、量子化係数
値151の最大値を測定し、最大量子化係数値152を
出力する。最小量子化ステップ算出回路62では、量子
化係数値が量子化によってオーバーフローしない最小の
量子化ステップを求め、量子化ステップ選択回路63に
出力する。
The quantization coefficient measuring circuit 61 measures the maximum value of the quantization coefficient value 151 and outputs the maximum quantization coefficient value 152. The minimum quantization step calculation circuit 62 obtains the minimum quantization step at which the quantization coefficient value does not overflow due to the quantization, and outputs the minimum quantization step to the quantization step selection circuit 63.

【0043】例えば、量子化ステップQ1を用いて量子
化係数値151の最大値を測定したところ、721とい
う係数値が得られたとし、量子化を行うことのできる最
大係数値を2047とすると、最小量子化ステップQM
は次式を用いて算出することができる。
For example, when the maximum value of the quantized coefficient value 151 is measured using the quantization step Q1, a coefficient value of 721 is obtained, and the maximum coefficient value at which quantization can be performed is 2047. Minimum quantization step QM
Can be calculated using the following equation.

【0044】QM=721×Q1/2047量子化ステ
ップ選択回路63では、最小量子化ステップ153と、
図1,図2,図3の符号良制御回路で求まった量子化ス
テップ154を比較し、ステップ値の大きなものを選択
し、符号化時の量子化ステップとして出力することで、
目標符号量以下であっても、量子化係数値のオーバーフ
ローによる画質劣化を防ぐことができる。
In the quantization step selection circuit 63, QM = 721 × Q1 / 2047, a minimum quantization step 153,
By comparing the quantization step 154 obtained by the code good control circuit of FIGS. 1, 2 and 3, and selecting the one with the larger step value and outputting it as the quantization step at the time of encoding,
Even if the code amount is equal to or less than the target code amount, it is possible to prevent image quality deterioration due to overflow of the quantization coefficient value.

【0045】[0045]

【発明の効果】以上説明したように、図1の符号量制御
回路によれば、符号量特性関数を求める際に対数値を取
ることで符号量特性関数を効率よくモデル化することが
できるため、入力画像信号をあらかじめ設定された2種
のみの初期量子化ステップを用いて前記入力画像信号の
分析を行い、可変長符号化を行うことができ、一定時間
内での符号化が可能となるだけでなく、量子化回路,符
号量測定回路を減らすことができるため装置を小型軽量
化することができ、安価に提供することが可能となる。
As described above, according to the code amount control circuit of FIG. 1, the code amount characteristic function can be efficiently modeled by taking a logarithmic value when obtaining the code amount characteristic function. The input image signal is analyzed using only two types of initial quantization steps set in advance, and the input image signal can be subjected to variable-length encoding, thereby enabling encoding within a fixed time. In addition, since the number of quantization circuits and code amount measurement circuits can be reduced, the device can be reduced in size and weight, and can be provided at low cost.

【0046】また、図2の符号量制御回路によれば、仮
に1段目の分析から得られた準最適量子化ステップを用
いて測定した発生符号量が目標符号量を超えたとして
も、目標符号量付近での符号量特性関数を用いて量子化
ステップを求めることで、より正確な符号量特性関数の
モデル化を行うことができるのに加え、符号化時に目標
符号量を越えることがなくなるため、余剰バッファを減
らすことができ、目標符号量以下で極めて目標符号量に
近い符号量で符号化を行え、高品質な画像が得られる符
号化装置を構成できる。
According to the code amount control circuit of FIG. 2, even if the generated code amount measured by using the sub-optimal quantization step obtained from the first-stage analysis exceeds the target code amount, By calculating the quantization step using the code amount characteristic function near the code amount, the code amount characteristic function can be modeled more accurately, and the target code amount does not exceed the target at the time of encoding. Therefore, a surplus buffer can be reduced, coding can be performed with a code amount very close to the target code amount below the target code amount, and a coding apparatus capable of obtaining a high-quality image can be configured.

【0047】本発明の第1の発明によれば、既に符号化
・復号化を行った画像信号に対しても、安定して目標符
号量で符号化が行えるため、ダビングによる急激な画質
劣化を防ぐことができるという効果がある。
According to the first aspect of the present invention, even for an image signal that has already been encoded and decoded, encoding can be stably performed with the target code amount. The effect is that it can be prevented.

【0048】さらに、本発明の第2の発明によれば、入
力画像信号の持つ情報量が小さくかつ偏りが大きい場合
であっても、量子化係数値のオーバーフローによる画質
劣化を防ぐことが可能となるため、高画質な符号化画像
が得られるという効果がある。
Further, according to the second aspect of the present invention, it is possible to prevent the image quality from being degraded due to the overflow of the quantization coefficient value even when the information amount of the input image signal is small and the bias is large. Therefore, there is an effect that a high-quality encoded image can be obtained.

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

【図1】本発明を説明するためのブロック図である。FIG. 1 is a block diagram for explaining the present invention.

【図2】本発明を説明するためのブロック図である。FIG. 2 is a block diagram for explaining the present invention.

【図3】本発明の第1の発明の符号量制御回路の構成の
一実施例を示すブロック図である。
FIG. 3 is a block diagram showing an embodiment of a configuration of a code amount control circuit according to the first invention of the present invention.

【図4】本発明の第2の発明の符号量制御回路の構成の
一実施例を示すブロック図である。
FIG. 4 is a block diagram showing one embodiment of a configuration of a code amount control circuit according to a second invention of the present invention.

【図5】本発明の符号量制御方式を用いた画像符号化装
置のブロック図である。
FIG. 5 is a block diagram of an image encoding device using the code amount control method of the present invention.

【図6】量子化ステップに対する発生符号量の関係を示
した図である。
FIG. 6 is a diagram illustrating a relationship between a generated code amount and a quantization step.

【図7】量子化ステップに対する発生符号量の関係を示
した図である。
FIG. 7 is a diagram illustrating a relationship between a generated code amount and a quantization step.

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

1,3,21,23,25,41,43,45,60,
74 量子化回路 2,4,22,24,26,42,44,46 符号量
測定回路 5,27,30,47,50 符号量特性関数算出回路 6,28,31,48,52 量子化ステップ算出回路 29,49 選択回路 51 特性関数選択回路 61 量子化係数測定回路 62 最小量子化ステップ算出回路 63 量子化ステップ選択回路 71 ブロック分割回路 72 直交変換回路 73 符号量制御回路 75 可変長符号化回路 76 変調回路 101,102,111,112,131,132,1
50 初期量子化ステップ 103,104,113,114,120,133,1
34,140,151,164 量子化係数値 105,106,115,116,121,135,1
36,141 発生符号量 107,117,137 目標符号量 108,118,126,138,146 関数係数値 119,139 準最適量子化ステップ 122,124,142,144 選択された量子化ス
テップ 123,125,143,145 選択された発生符号
量 147 修正された目標符号量 148 選択された関数係数値 152 最大量子化係数値 153 最小量子化ステップ 154 最適量子化ステップ 160 入力画像 161 ブロックデータ 162 変換係数値 163 量子化ステップ 165 可変長符号語 166 変調データ
1,3,21,23,25,41,43,45,60,
74 quantization circuit 2,4,22,24,26,42,44,46 code amount measurement circuit 5,27,30,47,50 code amount characteristic function calculation circuit 6,28,31,48,52 quantization step Calculation circuits 29, 49 Selection circuit 51 Characteristic function selection circuit 61 Quantization coefficient measurement circuit 62 Minimum quantization step calculation circuit 63 Quantization step selection circuit 71 Block division circuit 72 Orthogonal transformation circuit 73 Code amount control circuit 75 Variable length coding circuit 76 Modulation circuit 101, 102, 111, 112, 131, 132, 1
50 Initial quantization step 103, 104, 113, 114, 120, 133, 1
34, 140, 151, 164 Quantized coefficient values 105, 106, 115, 116, 121, 135, 1
36, 141 Generated code amount 107, 117, 137 Target code amount 108, 118, 126, 138, 146 Function coefficient value 119, 139 Sub-optimal quantization step 122, 124, 142, 144 Selected quantization step 123, 125 , 143, 145 Selected generated code amount 147 Modified target code amount 148 Selected function coefficient value 152 Maximum quantization coefficient value 153 Minimum quantization step 154 Optimal quantization step 160 Input image 161 Block data 162 Transformation coefficient value 163 quantization step 165 variable-length codeword 166 modulated data

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】入力画像を複数の画素からなる小面積のブ
ロックに分割するブロック分割回路と、前記ブロック分
割回路にてブロック分割されたブロックデータを直交変
換を施し周波数データである変換係数値に変換する直交
変換回路と、前記変換係数値を目標符号量以下で符号化
されるような量子化ステップを求める符号量制御回路
と、前記量子化ステップを用いて前記変換係数値の量子
化を行い量子化係数値を出力する量子化回路と、前記量
子化係数値を可変長符号語に符号化する可変長符号化回
路と、前記量子化ステップと前記可変長符号語に同期信
号、誤り訂正符号等を付加し伝送路、記録再生装置に変
調データを送出する変調回路から構成される画像符号化
装置において、 前記符号量制御回路は、 あらかじめ定められた2種の初期量子化ステップを用い
て前記変換係数値の重み付けを行い量子化係数値を出力
する量子化回路と、 前記2種の初期量子化ステップを用いて計算した前記量
子化係数値を可変長符号化を行った際の符号量の累積を
発生符号量として測定する符号量測定回路と、 前記2種の初期量子化ステップの対数値と前記2種の初
期量子化ステップを用いて測定した発生符号量の対数値
とから、目標符号量近傍の量子化ステップを検索するた
めの符号量特性関数を求め準最適関数係数値を出力する
符号量特性関数算出回路と、 前記準最適関数係数値と目標符号量の対数値から準最適
量子化ステップを求める量子化ステップ算出回路と、 前記準最適量子化ステップを用いて前記変換係数値の量
子化を行い量子化係数値を出力する量子化回路と、 前記準最適量子化ステップを用いて求められた前記量子
化係数値を可変長符号化した際の発生符号量を符号量測
定回路で測定し、前記2種の初期量子化ステップを用い
て計測された発生符号量と前記準最適量子化ステップを
用いて計測された発生符号量から、目標符号量に最も近
い2種の発生符号量を選択発生符号量として選択し前記
2種の選択符号量算出に用いた量子化ステップを2種の
選択量子化ステップとして選択する選択回路と、 前記2種の選択量子化ステップの対数値と前記2種の選
択発生符号量の対数値とから、目標符号量近傍における
符号量特性関数の最適関数係数値を求める符号量特性関
数算出回路と、 前記最適関数係数値から、量子化ステップの変化に対す
る発生符号量の変化がしきい値より大きい場合は、最適
関数係数値を選択関数係数値として選択し、目標符号量
を修正せずに選択目標符号量として出力し、量子化ステ
ップの変化に対する発生符号量の変化がしきい値より小
さい場合は、前記準最適関数係数値を選択関数係数値と
して選択し、前記準最適量子化ステップを用いて計測さ
れた発生符号量を用いて、目標符号量の修正を行い選択
目標符号量として出力する特性関数選択回路と、 前記選択目標符号量関数の対数値と前記選択関数係数値
とから、目標符号量以下で符号化を行うことのできる量
子化ステップを最適量子化ステップとして計算する量子
化ステップ算出回路とから構成されることを特徴とする
画像符号化装置。
1. A block dividing circuit for dividing an input image into blocks each having a small area composed of a plurality of pixels, and performing orthogonal transformation on the block data divided by the block dividing circuit to transform coefficient values which are frequency data. An orthogonal transform circuit for transforming, a code amount control circuit for obtaining a quantization step such that the transform coefficient value is encoded at a target code amount or less, and performing quantization of the transform coefficient value using the quantization step. A quantization circuit that outputs a quantization coefficient value; a variable length encoding circuit that encodes the quantization coefficient value into a variable length codeword; a synchronization signal, an error correction code for the quantization step and the variable length codeword; And a modulation circuit for transmitting modulation data to a transmission path and a recording / reproducing apparatus by adding the above-mentioned information. A quantization circuit that weights the transform coefficient value using a quantization step and outputs a quantization coefficient value; and performs variable-length encoding on the quantization coefficient value calculated using the two types of initial quantization steps. A code amount measurement circuit for measuring the accumulated code amount as a generated code amount, a logarithmic value of the two types of initial quantization steps, and a generated code amount measured using the two types of initial quantization steps. A code amount characteristic function calculation circuit for obtaining a code amount characteristic function for searching for a quantization step near the target code amount from the logarithmic value and outputting a sub-optimal function coefficient value; and the sub-optimal function coefficient value and a target code amount A quantization step calculation circuit that obtains a sub-optimal quantization step from a logarithmic value of: a quantization circuit that quantizes the transform coefficient value using the sub-optimal quantization step and outputs a quantization coefficient value; Optimal quantum The amount of generated code at the time of performing variable length coding on the quantized coefficient value obtained using the step is measured by a code amount measuring circuit, and the generated code amount measured using the two types of initial quantization steps is From the generated code amounts measured using the sub-optimal quantization step, two types of generated code amounts closest to the target code amount are selected as selected generated code amounts, and quantization used for calculating the two selected code amounts is performed. A selection circuit that selects a step as two types of selective quantization steps; and a code amount characteristic near a target code amount from a logarithmic value of the two types of selective quantization steps and a logarithmic value of the two types of selectively generated code amounts. A code amount characteristic function calculating circuit for obtaining an optimum function coefficient value of the function; and, if a change in the generated code amount with respect to a change in the quantization step is larger than a threshold value, the optimum function coefficient value is selected from the optimum function coefficient value. Person in charge Select as a numerical value and output it as a selected target code amount without modifying the target code amount. If the change in the generated code amount with respect to the change in the quantization step is smaller than a threshold value, the suboptimal function coefficient value is selected as a selection function. A characteristic function selecting circuit for selecting as a coefficient value, correcting the target code amount using the generated code amount measured by using the sub-optimal quantization step, and outputting the corrected target code amount, A logarithmic value of a function and the selection function coefficient value, and a quantization step calculation circuit that calculates a quantization step capable of performing encoding at a target code amount or less as an optimal quantization step. Image encoding device.
【請求項2】請求項1に記載の画像符号化装置であっ
て、 前記符号量制御回路において、あらかじめ設定した2種
の初期量子化ステップを用いて量子化された前記量子化
係数値のいずれか一方を用いて、前記量子化係数値の最
大値を測定し最大量子化係数値を求める量子化係数測定
回路と、 前記最大量子化係数値を計算するときに用いた量子化ス
テップと前記最大量子化係数値とから、変換係数値がオ
ーバーフローせずに量子化を行うことができる際の量子
化ステップである最小量子化ステップを算出する最小量
子化ステップ算出回路と、 前記最小量子化ステップと前記符号量制御回路で求めた
最適量子化ステップのステップ値を比較し、ステップ値
の大きい量子化ステップを選択し、目標符号量以下で符
号化でき、量子化係数値のオーバーフローの起こらない
量子化ステップを選択する量子化ステップ選択回路とを
さらに備えることを特徴とする画像符号化装置。
2. The image coding apparatus according to claim 1, wherein said code amount control circuit includes one of said quantized coefficient values quantized using two types of preset initial quantization steps. A quantizing coefficient measuring circuit for measuring a maximum value of the quantizing coefficient value to obtain a maximum quantizing coefficient value, a quantization step used when calculating the maximum quantizing coefficient value, and From the quantization coefficient value, a minimum quantization step calculation circuit that calculates a minimum quantization step that is a quantization step when the transform coefficient value can perform quantization without overflow, and the minimum quantization step The step value of the optimal quantization step obtained by the code amount control circuit is compared, a quantization step having a larger step value is selected, and encoding can be performed with a target code amount or less. Image encoding apparatus further comprising a quantization step selection circuit for selecting the quantization step does not occur with flow.
JP9088384A 1997-04-07 1997-04-07 Image encoding device Pending JPH1028266A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9088384A JPH1028266A (en) 1997-04-07 1997-04-07 Image encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9088384A JPH1028266A (en) 1997-04-07 1997-04-07 Image encoding device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP13806493A Division JP2968666B2 (en) 1993-06-10 1993-06-10 Image coding method and apparatus

Publications (1)

Publication Number Publication Date
JPH1028266A true JPH1028266A (en) 1998-01-27

Family

ID=13941307

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9088384A Pending JPH1028266A (en) 1997-04-07 1997-04-07 Image encoding device

Country Status (1)

Country Link
JP (1) JPH1028266A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010021741A (en) * 2008-07-09 2010-01-28 Panasonic Corp Image encoder, and image encoding method
JP2011109573A (en) * 2009-11-20 2011-06-02 Nikon Corp Image compression device, and electronic camera

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010021741A (en) * 2008-07-09 2010-01-28 Panasonic Corp Image encoder, and image encoding method
JP2011109573A (en) * 2009-11-20 2011-06-02 Nikon Corp Image compression device, and electronic camera

Similar Documents

Publication Publication Date Title
US6687294B2 (en) Distortion quantizer model for video encoding
US7068718B2 (en) Advanced method for rate control and apparatus thereof
US6266370B1 (en) Brightness-variation compensation method and coding/decoding apparatus for moving pictures
JP4771288B2 (en) Data processing apparatus and program
EP0768008B1 (en) Device and method for coding video pictures
JPH1098726A (en) Method and device for video encoding that control bit geneation quantity by using quantization activity
JP2006222555A (en) Coding apparatus and coding method
JP2968666B2 (en) Image coding method and apparatus
JPWO2009011279A1 (en) Video encoding apparatus and method, video encoding program, and recording medium recording the program
US7778468B2 (en) Decoding apparatus, dequantizing method, and program thereof
US7714751B2 (en) Transcoder controlling generated codes of an output stream to a target bit rate
CN111050169B (en) Method and device for generating quantization parameter in image coding and terminal
US6317063B1 (en) Inverse quantization using table with reduced size
JP2005151391A (en) Method and apparatus for coding moving image, and program
JP3887043B2 (en) Outline coding method and outline coding apparatus
JPH1028266A (en) Image encoding device
US20110110424A1 (en) Video Encoder and Data Processing Method
JP2735001B2 (en) Image coding device
US5737021A (en) Transform coefficient selection method and apparatus for a transform coding system
JPH03140074A (en) Moving picture coding device
JPH06112836A (en) Quantizer
WO2022130477A1 (en) Encoding device, decoding device, encoding method, decoding method, and program
JP2001054137A (en) Color image coder, its method, color image decoder and its method
JP3480644B2 (en) Image encoding device and image decoding device
JP2004064126A (en) Image coding apparatus and image coding method, and computer program

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20020806