JPH06165152A - Image compressing and coding device - Google Patents

Image compressing and coding device

Info

Publication number
JPH06165152A
JPH06165152A JP31482692A JP31482692A JPH06165152A JP H06165152 A JPH06165152 A JP H06165152A JP 31482692 A JP31482692 A JP 31482692A JP 31482692 A JP31482692 A JP 31482692A JP H06165152 A JPH06165152 A JP H06165152A
Authority
JP
Japan
Prior art keywords
code amount
output
block
scale factor
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP31482692A
Other languages
Japanese (ja)
Other versions
JP2897563B2 (en
Inventor
Hideaki Mita
英明 三田
Tatsuji Sakauchi
達司 坂内
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP31482692A priority Critical patent/JP2897563B2/en
Priority to US08/150,526 priority patent/US5543844A/en
Priority to DE69319855T priority patent/DE69319855T2/en
Priority to EP93118921A priority patent/EP0599288B1/en
Publication of JPH06165152A publication Critical patent/JPH06165152A/en
Application granted granted Critical
Publication of JP2897563B2 publication Critical patent/JP2897563B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Image Processing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

PURPOSE:To accurately control the quantity of coding in respect of the control of coding quantity for a VTR or the like at the time of compressing and coding digitized image data for record by controlling and recording the image data so that the coding quantity of compressed/coded data is equal to or less than a prescribed coding quantity. CONSTITUTION:When prescanning is executed by the 2nd quantizer 9 and a block coding quantity calculating circuit 10, an initial scale factor calculating circuit 11 calculates an initial scale factor. In addition, the coding quantity at the time of quantizing data based upon the initial scale factor in each group unit divided by the order of coded outputs is forecasted and the feedback control of the scale factor is executed based upon an error from the coding quantity of data practically coded by a Huffman encoder 6.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はディジタル化した画像デ
ータを圧縮符号化して記録する際に圧縮符号化後の符号
量が所定の符号量以下になるように制御して記録するV
TR等の符号量制御を行なう画像圧縮符号化装置に関す
るものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention controls the recording so that the code amount after compression encoding becomes less than a predetermined code amount when the digitized image data is compression encoded and recorded.
The present invention relates to an image compression encoding device that controls a code amount such as TR.

【0002】[0002]

【従来の技術】自然画像に対する高能率な圧縮符号化技
術として、直交変換に可変長符号化を組み合わせた方式
が有効とされ、カラー自然画像符号化方式の国際標準に
もこの方式が採用されることが決定している(テレビジ
ョン学会誌:VOL.46 NO.8 PP1021〜1024)。
2. Description of the Related Art As a highly efficient compression coding technique for natural images, a system combining orthogonal transformation and variable length coding is effective, and this system is also adopted as an international standard for color natural image coding systems. It has been decided (Journal of the Television Society: VOL.46 NO.8 PP1021 to 1024).

【0003】この方式では可変長符号化のため画像ごと
に符号量が変化する。しかし、VTR等のシステムで
は、一定のレートで記録する必要があるため、画像ごと
に符号量の制御を行う必要があり、符号量制御の方式が
提案されている(例えば1992年テレビジョン学会年
次大会16−15「JPEG−DCT符号化における符
号量制御」)。
In this method, the amount of code changes for each image because of variable-length coding. However, in a system such as a VTR, since it is necessary to record at a constant rate, it is necessary to control the code amount for each image, and a code amount control method has been proposed (for example, 1992 Television Engineering Society of Japan). Next Meeting 16-15 "Code amount control in JPEG-DCT encoding").

【0004】図7は従来例の画像圧縮符号化装置のブロ
ック図、図2はDCTのジグザグスキャンの順を示す
図、図3はDCTの各係数の量子化ステップを示す図、
図5はスケールファクタと符号量から目標のスケールフ
ァクタを算出するグラフ、図8はブロックとスケールフ
ァクタの関係を示す図である。
FIG. 7 is a block diagram of a conventional image compression coding apparatus, FIG. 2 is a diagram showing a zigzag scan order of DCT, and FIG. 3 is a diagram showing a quantization step of each coefficient of DCT.
FIG. 5 is a graph for calculating a target scale factor from the scale factor and the code amount, and FIG. 8 is a diagram showing the relationship between the block and the scale factor.

【0005】図7において、1は画像データを入力する
入力端子、2は画像データを8×8のブロックに分割す
るブロック化回路、3は8×8のブロック毎に離散コサ
イン変換(DCT)を行うDCT変換回路、4はDCT
係数を1フィールド時間遅延するフィールドメモリ、5
はDCT係数を量子化する第一の量子化器、6は第一の
量子化器5の出力を2次元ハフマン符号化するハフマン
符号化回路、7は符号化されたデータを所定のレートに
なるようにバッファリングするバッファメモリ、8は出
力端子、9はDCT係数を量子化する第二の量子化器、
10は第二の量子化器9の出力を2次元ハフマン符号化
したブロック当りの符号量を算出するブロック符号量算
出回路、15は第一の量子化器5のスケールファクタを
決定して符号量制御を行う符号量制御回路である。
In FIG. 7, 1 is an input terminal for inputting image data, 2 is a blocking circuit for dividing the image data into 8 × 8 blocks, and 3 is a discrete cosine transform (DCT) for each 8 × 8 block. DCT conversion circuit to perform, 4 DCT
Field memory for delaying the coefficient by one field time, 5
Is a first quantizer for quantizing DCT coefficients, 6 is a Huffman coding circuit for two-dimensional Huffman coding the output of the first quantizer 5, and 7 is a predetermined rate for the coded data. Buffer memory for buffering as described above, 8 as an output terminal, 9 as a second quantizer for quantizing DCT coefficients,
Reference numeral 10 is a block code amount calculation circuit for calculating the code amount per block obtained by two-dimensionally Huffman coding the output of the second quantizer 9, and 15 is the code amount by determining the scale factor of the first quantizer 5. It is a code amount control circuit for controlling.

【0006】以上のように構成された画像圧縮符号化装
置の動作について説明すると、まず、入力端子1から入
力されたデータはブロック化回路2によって8×8のD
CTブロックに分割される。データはDCT変換回路3
で各ブロック毎に64個のDCT係数に変換され図2に
示すジグザグスキャンの順に出力され、フィールドメモ
リ4で1フィールド遅延される。遅延されたDCT係数
は第一の量子化器5にて、図3に示す各係数毎に異なる
量子化ステップと符号量制御回路15にて決定されるス
ケールファクタαiを掛けた量子化値により線形量子化
され、ハフマン符号化回路にて2次元ハフマン符号化さ
れた可変長のデータが出力される。符号化された可変長
のデータはバッファメモリ7にて所定のレートに変換さ
れたのちスケールファクタαtと共に出力される。
The operation of the image compression coding apparatus configured as described above will be described. First, the data inputted from the input terminal 1 is converted into 8 × 8 D data by the blocking circuit 2.
It is divided into CT blocks. Data is DCT conversion circuit 3
Is converted into 64 DCT coefficients for each block and output in the zigzag scan order shown in FIG. 2 and delayed by one field in the field memory 4. The delayed DCT coefficient is linearized by the first quantizer 5 by a quantization value obtained by multiplying the quantization step different for each coefficient shown in FIG. 3 and the scale factor αi determined by the code amount control circuit 15. Variable-length data that is quantized and two-dimensionally Huffman coded by the Huffman coding circuit is output. The encoded variable-length data is converted into a predetermined rate in the buffer memory 7 and then output together with the scale factor αt.

【0007】スケールファクタαtの算出は上記遅延時
間の間に以下に示すプリスキャンにより行う。
The calculation of the scale factor αt is performed by the following prescan during the delay time.

【0008】1フィールドの全ブロックを、図8に示す
様にブロック毎に異なるM通りのスケールファクタα1
〜αM(α1<α2<・・・<αM)と図3に示す量子
化ステップを掛けた量子化値により線形量子化し、ブロ
ック符号量算出回路10にて2次元ハフマン符号化され
たときの可変長データの、ブロック当りの符号量を算出
する。ここで、符号量制御回路15では各スケールファ
クタ毎のM通りの符号量の積算値N1〜NMを計算す
る。スケールファクタα1〜αMと符号量N1〜NMの
関係は図5に示すようなグラフになる。ここで1フィー
ルドあたりの目標符号量をNtとすると図5に示すよう
に最適なスケールファクタαtを予測することが出来
る。
For all blocks of one field, as shown in FIG. 8, there are M different scale factors α1 for each block.
.. .alpha.M (.alpha.1 <.alpha.2 <... <.alpha.M) and a quantization value obtained by multiplying the quantization step shown in FIG. 3 to perform linear quantization and variable when the block code amount calculation circuit 10 performs two-dimensional Huffman coding. The code amount of long data per block is calculated. Here, the code amount control circuit 15 calculates integrated values N1 to NM of the M code amounts for each scale factor. The relationship between the scale factors α1 to αM and the code amounts N1 to NM becomes a graph as shown in FIG. Here, if the target code amount per field is Nt, the optimum scale factor αt can be predicted as shown in FIG.

【0009】[0009]

【発明が解決しようとする課題】しかしながら上記の従
来の構成ではスケールファクタαtの予測は1フィール
ドあたり1回であり、予測の誤差が大きい場合には所定
の符号量をオーバーフローする可能性があり、その場合
例えばVTRでは最後の画像データが記録出来ないとい
った問題点を有していた。
However, in the above-described conventional configuration, the scale factor αt is predicted once per field, and if the prediction error is large, a predetermined code amount may overflow. In that case, for example, the VTR has a problem that the last image data cannot be recorded.

【0010】またスケールファクタαtの予測の際に計
算値より少し大きい値としオーバーフローの確率を低く
するといった事も考えられるが、この場合必要以上に符
号量が小さくなるため、圧縮による画質劣化が大きくな
るといった問題も考えられる。
It is also possible to reduce the overflow probability by setting the scale factor αt to a value slightly larger than the calculated value at the time of prediction, but in this case, the code amount becomes smaller than necessary, so that the image quality deterioration due to compression is large. There is also a possible problem.

【0011】本発明は上記従来の問題点を解決するもの
で符号量制御の精度を向上させる画像圧縮符号化装置を
提供することを目的とする。
An object of the present invention is to solve the above-mentioned conventional problems and to provide an image compression coding apparatus which improves the accuracy of code amount control.

【0012】[0012]

【課題を解決するための手段】この目的を達成するため
に本発明の画像圧縮符号化装置は、入力画像データをブ
ロック毎に直交変換する直交変換器と、前記直交変換器
の出力データを遅延させるメモリと、前記メモリの出力
データを量子化する第一の量子化器と、前記第一の量子
化器の出力を可変長符号化する符号化器と、前記符号化
器の出力データを書き込んだ後に一定のレートで出力す
るバッファメモリと、前記符号化器の出力データの符号
量を積算する符号量積算器と、前記直交変換器の出力デ
ータをあらかじめ決められたルールに従って前記符号化
器の出力順に対応するK個のグループの分類とM通りの
量子化係数の一つを割り当て前記量子化係数で量子化す
る第二の量子化器と、前記第二の量子化器の出力を可変
長符号化した時のブロック当りの符号量を算出する符号
量算出器と、前記符号量算出器から出力されるブロック
符号量より一画面を前記M通りの量子化係数で量子化し
た場合のM通りの符号量を予測し、一画面を所定の符号
量とするための量子化係数(初期量子化係数)を決定す
る初期量子化係数検出器と、前記M通りの量子化係数と
符号量の関係から各グループ毎に前記初期量子化係数で
量子化した場合の目標符号量を予測するグループ符号量
算出器と、前記符号化器から各グループのデータが出力
される毎に前記符号量積算器により積算された実際の符
号量と前記目標符号量との予測誤差で前記初期量子化係
数を補正することにより前記第一の量子化器の量子化係
数を決定する符号量制御器を備える構成を有している。
In order to achieve this object, an image compression coding apparatus of the present invention delays the output data of the orthogonal transformer and the orthogonal transformer that orthogonally transforms the input image data block by block. Memory, a first quantizer for quantizing the output data of the memory, an encoder for variable-length encoding the output of the first quantizer, and the output data of the encoder After that, a buffer memory that outputs at a constant rate, a code amount integrator that integrates the code amount of the output data of the encoder, and output data of the orthogonal transformer of the encoder according to a predetermined rule. A second quantizer that classifies K groups corresponding to the output order and allocates one of M quantized coefficients and quantizes with the quantized coefficient, and an output of the second quantized variable When encoded A code amount calculator that calculates the code amount per lock, and predicts M code amounts when one screen is quantized by the M quantization coefficients from the block code amount output from the code amount calculator Then, an initial quantization coefficient detector that determines a quantization coefficient (initial quantization coefficient) for making one screen have a predetermined code amount, and for each group from the relationship between the M number of quantization coefficients and the code amount. A group code amount calculator that predicts a target code amount when quantized by the initial quantization coefficient, and an actual number accumulated by the code amount integrator each time data of each group is output from the encoder. The configuration includes a code amount controller that determines the quantization coefficient of the first quantizer by correcting the initial quantization coefficient with a prediction error between the code amount and the target code amount.

【0013】[0013]

【作用】この構成によって、符号量予測をデータ出力の
順に分割したグループ毎に行い、実際の符号量とのフィ
ードバック制御を行うことが出来るため、符号量制御の
精度が向上し、データのオーバーフロー、画質劣化とい
った問題点を改善することが出来る。
With this configuration, the code amount prediction can be performed for each group divided in the order of data output, and the feedback control with the actual code amount can be performed. Therefore, the precision of the code amount control is improved, and the data overflow, Problems such as image quality deterioration can be improved.

【0014】[0014]

【実施例】以下本発明の一実施例について図面を参照し
ながら説明する。図1は本発明の一実施例における画像
圧縮符号化装置のブロック図、図4は画面上のブロック
とスケールファクタを表す図、図5は1フィールドでの
スケールファクタと符号量を表わすグラフ、図6は出力
符号量の積算値と目標符号量を示すグラフ、図9は各グ
ループでのスケールファクタと符号量を表わすグラフで
ある。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram of an image compression encoding apparatus according to an embodiment of the present invention, FIG. 4 is a diagram showing blocks on the screen and scale factors, and FIG. 5 is a graph showing scale factors and code amounts in one field. 6 is a graph showing the integrated value of the output code amount and the target code amount, and FIG. 9 is a graph showing the scale factor and the code amount in each group.

【0015】図1において、1は画像データを入力する
入力端子、2は画像データを8×8のブロックに分割す
るブロック化回路、3は8×8のブロック毎に直交変換
の一例である離散コサイン変換(DCT)を行うDCT
変換回路、4はDCT係数を1フィールド時間遅延する
フィールドメモリ、5はDCT係数を量子化する第一の
量子化器、6は第一の量子化器5の出力を2次元ハフマ
ン符号化するハフマン符号化回路、7は符号化されたデ
ータを所定のレートになるようにバッファリングするバ
ッファメモリ、8は出力端子である。
In FIG. 1, 1 is an input terminal for inputting image data, 2 is a blocking circuit for dividing the image data into 8 × 8 blocks, and 3 is an example of orthogonal transformation for each 8 × 8 block. DCT for cosine transform (DCT)
A transform circuit, 4 is a field memory for delaying the DCT coefficient by one field time, 5 is a first quantizer for quantizing the DCT coefficient, and 6 is a Huffman for two-dimensional Huffman coding the output of the first quantizer 5. An encoding circuit, 7 is a buffer memory for buffering encoded data at a predetermined rate, and 8 is an output terminal.

【0016】9はDCT係数を量子化する第二の量子化
器、10は第二の量子化器9の出力を2次元ハフマン符
号化したブロック当りの符号量を算出するブロック符号
量算出回路、11はブロック符号量から初期スケールフ
ァクタを算出する初期スケールファクタ算出回路、12
はグループ毎の目標符号量を予測する目標符号量算出回
路、13は第一の量子化器5のスケールファクタを決定
して符号量制御を行う符号量制御回路、14はハフマン
符号化されたデータの符号量を積算していく符号量積算
回路である。
Reference numeral 9 is a second quantizer for quantizing the DCT coefficient, and 10 is a block code amount calculating circuit for calculating the code amount per block obtained by two-dimensionally Huffman coding the output of the second quantizer 9. Reference numeral 11 is an initial scale factor calculation circuit for calculating an initial scale factor from the block code amount, 12
Is a target code amount calculation circuit that predicts the target code amount for each group, 13 is a code amount control circuit that determines the scale factor of the first quantizer 5 and controls the code amount, and 14 is Huffman-coded data Is a code amount integrating circuit for integrating the code amount of.

【0017】以上のように構成された画像圧縮符号化装
置について、以下その動作を説明する。まず、入力端子
1から入力されたデータはブロック化回路2によって8
×8のDCTブロックに分割される。データはDCT変
換回路3で各ブロック毎に64個のDCT係数に変換さ
れ図2に示すジグザグスキャンの順に出力され、フィー
ルドメモリ4で1フィールド遅延される。遅延されたD
CT係数は第一の量子化器5にて、図3に示す各係数毎
に異なる量子化ステップと符号量制御回路13にて決定
されるスケールファクタαtを掛けた量子化値により線
形量子化され、ハフマン符号化回路6にて2次元ハフマ
ン符号化された可変長のデータが出力される。符号化さ
れた可変長のデータはバッファメモリ7にて所定のレー
トに変換されたのちスケールファクタαtと共に出力さ
れる。
The operation of the image compression coding apparatus configured as described above will be described below. First, the data input from the input terminal 1 is converted into 8 by the blocking circuit 2.
It is divided into × 8 DCT blocks. The data is converted into 64 DCT coefficients for each block by the DCT conversion circuit 3 and output in the zigzag scan order shown in FIG. 2, and is delayed by one field in the field memory 4. Delayed D
The CT coefficient is linearly quantized by the first quantizer 5 by a quantized value obtained by multiplying a different quantization step for each coefficient shown in FIG. 3 and a scale factor αt determined by the code amount control circuit 13. The Huffman encoding circuit 6 outputs two-dimensional Huffman-encoded variable-length data. The encoded variable-length data is converted into a predetermined rate in the buffer memory 7 and then output together with the scale factor αt.

【0018】次にスケールファクタαtの算出を以下に
示す。まず、DCT変換回路3で出力したブロック毎の
DCT係数は、第2の量子化器9に入力し、1フィール
ドの各ブロックは、図4に示すようにあらかじめ決めら
れたルールに従って、符号化データの出力順に対応する
K個のグループの分類とM通りのスケールファクタα1
〜αM(α1<α2<・・・<αM)のうちの一つが割
り当てられ、各ブロックのDCT係数は前記割り当てら
れたスケールファクタと図3に示す量子化ステップを掛
けた量子化値により線形量子化される。ブロック符号量
算出回路10ではこのM通りのスケールファクタを用い
て量子化されたDCT係数が2次元ハフマン符号化され
たときの可変長データの、ブロック当りの符号量を算出
する。この符号量の算出は、0ランと非0係数との組合
せから、その符号量をROM等を用いて出力し、ブロッ
ク毎にその値を積算して求める。
Next, the calculation of the scale factor αt is shown below. First, the DCT coefficient for each block output from the DCT conversion circuit 3 is input to the second quantizer 9, and each block of one field is encoded data according to a predetermined rule as shown in FIG. Of K groups corresponding to the output order of M and scale factors α1 of M ways
~ ΑM (α1 <α2 <... <αM) is assigned, and the DCT coefficient of each block is linearly quantized by the assigned scale factor and a quantization value obtained by multiplying the quantization step shown in FIG. Be converted. The block code amount calculation circuit 10 calculates the code amount per block of the variable length data when the quantized DCT coefficient is two-dimensionally Huffman-coded using the M scale factors. The code amount is calculated by outputting the code amount from a combination of 0 run and non-zero coefficient using a ROM or the like and integrating the value for each block.

【0019】初期スケールファクタ算出回路11には、
順次ブロック毎の符号量が入力し、あらかじめ割り当て
られたグループ分類毎にM通りのスケールファクタに対
する符号量の積算値を計算する。次にグループ毎のスケ
ールファクタと符号量の関係から1フィールドのスケー
ルファクタと符号量の関係を導出する。グループjにお
けるスケールファクタαiでの符号量の総和をN(i,
j)とすると、1フィールドのデータをスケールファク
タαiで量子化した場合の符号量Niは、各グループ毎
のスケールファクタαiで量子化した符号量の総和にス
ケールファクタの種類に対応する数Mを掛けた以下に示
す(数1)として予測される。
The initial scale factor calculation circuit 11 includes
The code amount for each block is sequentially input, and the integrated value of the code amount for M different scale factors is calculated for each group classification assigned in advance. Next, the relationship between the scale factor and the code amount for one field is derived from the relationship between the scale factor and the code amount for each group. The sum of the code amounts of the scale factor αi in the group j is N (i,
j), the code amount Ni when the data of one field is quantized by the scale factor αi is the sum of the code amounts quantized by the scale factor αi for each group, and the number M corresponding to the type of scale factor. It is predicted as the following (Equation 1).

【0020】[0020]

【数1】 [Equation 1]

【0021】スケールファクタαiと符号量Niの関係
はαiが増加するにつれてNiが減少する図5に示すよ
うなグラフとなる。そして1フィールドの符号量を所定
の目標符号量に符号化するための初期スケールファクタ
αinitを算出する。1フィールドの目標符号量をNtと
すると、図5に示すように例えば目標符号量Ntが予測
符号量N2とN3の間にあるとすると、直線(α2,N
2)−(α3,N3)の補間により(数2)に示すよう
に1フィールドの符号量をNtとするための初期スケー
ルファクタαinitを算出することが出来る。
The relationship between the scale factor αi and the code amount Ni becomes a graph as shown in FIG. 5 in which Ni decreases as αi increases. Then, an initial scale factor α init for encoding the code amount of one field into a predetermined target code amount is calculated. Assuming that the target code amount of one field is Nt and the target code amount Nt is between the predicted code amounts N2 and N3 as shown in FIG. 5, a straight line (α2, N
2)-(α3, N3) can be interpolated to calculate the initial scale factor αinit for setting the code amount of one field to Nt as shown in (Equation 2).

【0022】[0022]

【数2】 [Equation 2]

【0023】グループ目標符号量算出回路12には、前
記各グループでのスケールファクタαiでの符号量の総
和N(i,j)と、初期スケールファクタαinitが入力
し、K個のグループ毎に初期スケールファクタαinitで
量子化を行ったときの符号量の積算値を算出する。グル
ープjにおいて、スケールファクタαiとした場合の符
号量の総和は、M・N(i,j)で予測されるので、ス
ケールファクタαiとグループjでの符号量の総和の関
係は、図9に示すようなグラフに導出される。図9に示
すように、スケールファクタをαinitとした場合のグル
ープjでの予測符号量Njは、前記αinitの算出と同様
の直線補間により(数3)に示すように予測される。
The group target code amount calculation circuit 12 is supplied with the sum N (i, j) of the code amounts of the scale factors αi in each group and the initial scale factor αinit, and is initialized for each of the K groups. The integrated value of the code amount when quantization is performed with the scale factor αinit is calculated. In the group j, the sum of the code amounts when the scale factor αi is predicted is M · N (i, j). Therefore, the relationship between the scale factor αi and the sum of the code amounts in the group j is shown in FIG. It is derived in the graph as shown. As shown in FIG. 9, the predicted code amount Nj in the group j when the scale factor is α init is predicted by the linear interpolation similar to the calculation of α init as shown in (Equation 3).

【0024】[0024]

【数3】 [Equation 3]

【0025】符号量制御回路13には、グループ目標符
号量算出回路12にて算出した各グループ毎の予測符号
量Njが入力され、予測符号量Njを積算した各グルー
プ毎の目標符号量積算値が求められた後に、実際にハフ
マン符号化回路6にて符号化されたデータ量は符号量積
算回路14において積算され、符号量積算値として入力
される。目標符号量積算値と符号量積算値の関係を図6
のグラフに示す。目標符号量積算値と符号量積算値の差
を予測誤差Δとし、各グループのデータ出力が終了する
毎に、前記予測誤差Δにより次グループのスケールファ
クタαtの制御をおこなう。例えばグループ(j−1)
の符号化が終了し、グループ(j−1)での予測符号量
積算値と、実際の符号量積算値との予測誤差をΔ(j−
1)とすると、グループjでの目標符号量をNj−Δ
(j−1)とするためのスケールファクタαtを第一の
量子化器5に出力しハフマン符号化回路6で符号化する
ことにより、予測誤差Δ(j−1)が相殺され、次グル
ープ符号化終了時の符号量積算値を目標符号量積算値近
傍に補正することが出来る。
The predictive code amount Nj for each group calculated by the group target code amount calculating circuit 12 is input to the code amount control circuit 13, and the target code amount integrated value for each group obtained by integrating the predictive code amount Nj is input. After being calculated, the data amount actually encoded by the Huffman encoding circuit 6 is integrated by the code amount integrating circuit 14 and input as a code amount integrated value. FIG. 6 shows the relationship between the target code amount integrated value and the code amount integrated value.
Is shown in the graph. The difference between the target code amount integrated value and the code amount integrated value is used as the prediction error Δ, and each time the data output of each group is completed, the scale factor αt of the next group is controlled by the prediction error Δ. For example, group (j-1)
Is completed, and the prediction error between the predicted code amount integrated value and the actual code amount integrated value in the group (j-1) is Δ (j-
1), the target code amount in group j is Nj−Δ
By outputting the scale factor .alpha.t for setting (j-1) to the first quantizer 5 and encoding by the Huffman encoding circuit 6, the prediction error .DELTA. (J-1) is canceled and the next group code is obtained. The code amount integrated value at the end of conversion can be corrected to a value near the target code amount integrated value.

【0026】αtの算出は、前記ブロック毎のスケール
ファクタと符号量の関係(図9)より、グループの符号
量の総和をNj−Δ(j−1)とするためのスケールフ
ァクタαtを(数4)に示す直線補間により算出する。
From the relationship between the scale factor and the code amount for each block (FIG. 9), αt is calculated by calculating the scale factor αt (numerical expression) for making the sum of the code amounts of the groups Nj-Δ (j-1). It is calculated by linear interpolation shown in 4).

【0027】[0027]

【数4】 [Equation 4]

【0028】また、予測誤差Δが0の場合、またはフィ
ールドの最初のグループ1ではαt=αinitとして量子
化を行う。
When the prediction error Δ is 0, or in the first group 1 of the field, αt = α init is used for quantization.

【0029】以上のように本実施例によれば、1フィー
ルドのDCTブロックをK個のグループに分類し、M種
類の異なるスケールファクタで量子化したブロック符号
量から、初期スケールファクタ算出回路10にて1フィ
ールドの目標符号量に量子化するための初期スケールフ
ァクタαinitを求めると共に、初期スケールファクタα
initにより量子化した場合の符号化出力順のグループ毎
の符号量を前記ブロック符号量とスケールファクタの関
係から予測することにより、グループ目標符号量算出回
路12で算出するため、初期スケールファクタとグルー
プ毎の符号量予測の精度が向上する。
As described above, according to the present embodiment, the DCT blocks of one field are classified into K groups, and the initial scale factor calculation circuit 10 is calculated from the block code amount quantized with M different scale factors. The initial scale factor α init for quantizing to the target code amount of 1 field by
Since the group target code amount calculating circuit 12 calculates the code amount for each group in the coding output order when quantized by init from the relationship between the block code amount and the scale factor, the initial scale factor and the group The accuracy of code amount prediction for each is improved.

【0030】さらに、グループ毎に符号量積算回路14
にて積算される実際の符号量と前記目標符号量の誤差よ
り符号量制御回路13で符号量制御を行うため、1フィ
ールド期間中にM回のきめ細かい符号量制御を行うこと
が出来る。
Further, the code amount integrating circuit 14 is provided for each group.
Since the code amount control circuit 13 controls the code amount on the basis of the difference between the actual code amount and the target code amount accumulated in step S1, it is possible to perform fine code amount control M times during one field period.

【0031】なお、本実施例ではフィールド単位での圧
縮を示しているが、フレーム単位、或は複数のブロック
からなるマクロブロック単位での圧縮についても同様の
効果があることは明かである。
In the present embodiment, the compression is performed in field units, but it is clear that the same effect can be obtained in compression in frame units or in macroblock units composed of a plurality of blocks.

【0032】また、本実施例ではプリスキャンによる符
号量の予測を全てのブロックにおいて行っているが、一
部のブロックをサンプリングして演算する場合も同様の
効果が得られる。
Further, in this embodiment, the prediction of the code amount by the prescan is performed in all the blocks, but the same effect can be obtained when the sampling is performed in a part of the blocks.

【0033】さらに、本実施例ではDCT変換による直
交変換を示したが、LOT、アダマール変換等いかなる
直交変換においても同様の効果があることは明らかであ
る。
Further, although the orthogonal transform by the DCT transform is shown in this embodiment, it is obvious that the same effect can be obtained in any orthogonal transform such as LOT and Hadamard transform.

【0034】[0034]

【発明の効果】以上説明したように本発明によれば、1
回のプリスキャンのみで初期量子化係数と1画面のデー
タをK個のグループに分割したそれぞれのグループ毎の
符号量の積算値を正確に予測することが出来るため、実
際の符号量積算値との比較により初期スケールファクタ
を補正することにより符号量制御の精度が向上し、予測
演算に要する時間を増加させる事なく、データのオーバ
ーフローを防ぎ、圧縮画像の画質を向上させる画像圧縮
符号化装置を実現できる。
As described above, according to the present invention, 1
Since the initial quantized coefficient and the integrated value of the code amount for each group obtained by dividing the data of one screen into K groups can be accurately predicted only by performing the pre-scan once, By compensating the initial scale factor by comparing the above, the accuracy of the code amount control is improved, and the image compression encoding device that prevents the data overflow and improves the image quality of the compressed image without increasing the time required for the prediction calculation is provided. realizable.

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

【図1】本発明の一実施例の画像圧縮符号化装置の構成
を示すブロック図
FIG. 1 is a block diagram showing a configuration of an image compression encoding apparatus according to an embodiment of the present invention.

【図2】DCT係数のジグザグスキャンを表す図FIG. 2 is a diagram showing a zigzag scan of DCT coefficients.

【図3】DCT係数の量子化ステップを表す図FIG. 3 is a diagram showing quantization steps of DCT coefficients.

【図4】本発明の一実施例の画面上のブロックを表す図FIG. 4 is a diagram showing blocks on a screen according to an embodiment of the present invention.

【図5】1フィールドでのスケールファクタと符号量の
関係を示す図
FIG. 5 is a diagram showing a relationship between a scale factor and a code amount in one field.

【図6】符号量積算値の時間履歴を示すグラフFIG. 6 is a graph showing a time history of code amount integrated values.

【図7】従来例の画像圧縮符号化装置の構成を示すブロ
ック図
FIG. 7 is a block diagram showing a configuration of a conventional image compression encoding device.

【図8】従来例の画面上のブロックを表す図FIG. 8 is a diagram showing blocks on a screen of a conventional example.

【図9】1グループでのスケールファクタと符号量の関
係を示す図
FIG. 9 is a diagram showing a relationship between a scale factor and a code amount in one group.

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

2 ブロック化回路 3 DCT変換回路 4 フィールドメモリ 5 第一の量子化器 6 ハフマン符号化器 7 バッファメモリ 9 第二の量子化器 10 ブロック符号量算出回路 11 初期スケールファクタ算出回路 12 グループ目標符号量算出回路 13 符号量制御回路 14 符号量積算回路 2 block forming circuit 3 DCT converting circuit 4 field memory 5 first quantizer 6 Huffman encoder 7 buffer memory 9 second quantizer 10 block code amount calculating circuit 11 initial scale factor calculating circuit 12 group target code amount Calculation circuit 13 Code amount control circuit 14 Code amount integration circuit

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.5 識別記号 庁内整理番号 FI 技術表示箇所 H04N 5/92 H 4227−5C ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 5 Identification code Office reference number FI technical display location H04N 5/92 H 4227-5C

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】入力画像データを、1ブロックp×p画素
の複数ブロックに分割し、この分割した各ブロックに直
交変換と可変長符号化とを組み合わせた符号化によって
所定の符号量に圧縮する装置であって、前記入力画像デ
ータをブロック毎に直交変換する直交変換器と、前記直
交変換器の出力データを遅延させるメモリと、前記メモ
リの出力データを量子化する第一の量子化器と、前記第
一の量子化器の出力を可変長符号化する符号化器と、前
記符号化器の出力データを書き込んだ後に一定のレート
で出力するバッファメモリと、前記符号化器の出力デー
タの符号量を積算する符号量積算器と、前記直交変換器
の出力データをあらかじめ決められたルールに従って前
記符号化器の出力順に対応するK個のグループの分類と
M通りの量子化係数の一つを割り当て前記量子化係数で
量子化する第二の量子化器と、前記第二の量子化器の出
力を可変長符号化した時のブロック当りの符号量を算出
する符号量算出器と、前記符号量算出器から出力される
ブロック符号量より一画面を前記M通りの量子化係数で
量子化した場合のM通りの符号量を予測し、一画面を所
定の符号量とするための量子化係数(初期量子化係数)
を決定する初期量子化係数検出器と、前記M通りの量子
化係数と符号量の関係から各グループ毎に前記初期量子
化係数で量子化した場合の目標符号量を予測するグルー
プ符号量算出器と、前記符号化器から各グループのデー
タが出力される毎に前記符号量積算器により積算された
実際の符号量と前記目標符号量との予測誤差で前記初期
量子化係数を補正することにより前記第一の量子化器の
量子化係数を決定する符号量制御器を備えることを特徴
とする画像圧縮符号化装置。
1. Input image data is divided into a plurality of blocks of 1 block p.times.p pixels, and each divided block is compressed to a predetermined code amount by a combination of orthogonal transformation and variable length coding. An apparatus, which is an orthogonal transformer for orthogonally transforming the input image data block by block, a memory for delaying output data of the orthogonal transformer, and a first quantizer for quantizing output data of the memory. An encoder for variable-length encoding the output of the first quantizer, a buffer memory for outputting the output data of the encoder at a constant rate after writing the output data of the encoder, and an output data of the encoder A code amount accumulator for accumulating the code amount, classification of K groups corresponding to the output order of the encoder according to a predetermined rule for the output data of the orthogonal transformer, and M number of quantizers Second quantizer for quantizing one of the two and quantizing with the quantized coefficient, and a code amount calculator for calculating the code amount per block when the output of the second quantizer is variable-length coded And to predict M code amounts when one screen is quantized by the M quantization coefficients from the block code amount output from the code amount calculator, and set one screen to a predetermined code amount. Quantized coefficient (initial quantized coefficient)
And a group code amount calculator that predicts a target code amount when quantized by the initial quantization coefficient for each group from the relationship between the M kinds of quantization coefficients and the code amount. And by correcting the initial quantization coefficient with a prediction error between the actual code amount integrated by the code amount integrator and the target code amount each time data of each group is output from the encoder. An image compression coding apparatus comprising a code amount controller for determining a quantization coefficient of the first quantizer.
【請求項2】符号量制御器は、K個のグループ毎に符号
量積算器により積算された実際の符号量と目標符号量と
の予測誤差を、次グループの目標符号量から引いた符号
量を次グループの目標符号量として次グループの量子化
係数を決定することを特徴とする請求項1記載の画像圧
縮符号化装置。
2. The code amount controller subtracts the prediction error between the actual code amount and the target code amount accumulated by the code amount integrator for each of the K groups from the target code amount of the next group. The image compression coding apparatus according to claim 1, wherein the quantization coefficient of the next group is determined by using as a target code amount of the next group.
JP31482692A 1992-11-25 1992-11-25 Image compression coding device Expired - Fee Related JP2897563B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP31482692A JP2897563B2 (en) 1992-11-25 1992-11-25 Image compression coding device
US08/150,526 US5543844A (en) 1992-11-25 1993-11-09 Method and apparatus for coding image data
DE69319855T DE69319855T2 (en) 1992-11-25 1993-11-24 Method and device for coding image data
EP93118921A EP0599288B1 (en) 1992-11-25 1993-11-24 Method and apparatus for coding image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31482692A JP2897563B2 (en) 1992-11-25 1992-11-25 Image compression coding device

Publications (2)

Publication Number Publication Date
JPH06165152A true JPH06165152A (en) 1994-06-10
JP2897563B2 JP2897563B2 (en) 1999-05-31

Family

ID=18058068

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31482692A Expired - Fee Related JP2897563B2 (en) 1992-11-25 1992-11-25 Image compression coding device

Country Status (1)

Country Link
JP (1) JP2897563B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014082772A (en) * 2013-12-05 2014-05-08 Mega Chips Corp Image encoder
JP2014179709A (en) * 2013-03-13 2014-09-25 Ricoh Co Ltd Image processing apparatus, method and program

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1271926B1 (en) 2001-06-18 2015-08-12 Canon Kabushiki Kaisha Image processing method, apparatus and computer program for compression-encoding
EP1292153B1 (en) 2001-08-29 2015-08-19 Canon Kabushiki Kaisha Image processing method and apparatus, computer program, and storage medium
US7106909B2 (en) 2001-12-25 2006-09-12 Canon Kabushiki Kaisha Method and apparatus for encoding image data in accordance with a target data size
JP4047183B2 (en) 2002-03-07 2008-02-13 キヤノン株式会社 Image compression encoding apparatus and control method thereof
JP2003304404A (en) 2002-04-09 2003-10-24 Canon Inc Image encoder

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014179709A (en) * 2013-03-13 2014-09-25 Ricoh Co Ltd Image processing apparatus, method and program
JP2014082772A (en) * 2013-12-05 2014-05-08 Mega Chips Corp Image encoder

Also Published As

Publication number Publication date
JP2897563B2 (en) 1999-05-31

Similar Documents

Publication Publication Date Title
JP3115199B2 (en) Image compression coding device
KR100756596B1 (en) Video data encoder and video data encoding method
US7136531B2 (en) Image encoder, image encoding method, image encoding computer program, and storage medium
EP0763925A2 (en) Image processing apparatus
JPH04323961A (en) Picture coding method and device
US20050175094A1 (en) Video signal quantizing apparatus and method thereof
JPH0595536A (en) High efficiency coded signal processor
JP2921358B2 (en) Image coding device
JPH10191343A (en) Device and method for compressing video data
JP2897563B2 (en) Image compression coding device
JP3265696B2 (en) Image compression coding device
JP2734905B2 (en) Image coding device
JPH11275577A (en) Video signal coding method and system
JPH07203430A (en) Image coding device
JPH1066077A (en) Code amount control method for image data and its device
JP3149672B2 (en) Video coding device
US7257159B1 (en) Method for coding video pictures by determining a sub-target value for the number of bits per sub-series of coefficients
JPH06284401A (en) Picture coder
JP3200082B2 (en) Image processing method
JP2856974B2 (en) Image coding device
JP3014547B2 (en) Video encoding device
JP4110345B2 (en) Image compression apparatus and method, and program storage medium
JPH0898175A (en) Picture encoding device
KR100231591B1 (en) The quantizing number decision method and device of the digital video signal
JPH09331531A (en) Image coder

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees