[go: up one dir, main page]

JP3265696B2 - Image compression coding device - Google Patents

Image compression coding device

Info

Publication number
JP3265696B2
JP3265696B2 JP7547293A JP7547293A JP3265696B2 JP 3265696 B2 JP3265696 B2 JP 3265696B2 JP 7547293 A JP7547293 A JP 7547293A JP 7547293 A JP7547293 A JP 7547293A JP 3265696 B2 JP3265696 B2 JP 3265696B2
Authority
JP
Japan
Prior art keywords
code amount
block
output
group
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.)
Expired - Fee Related
Application number
JP7547293A
Other languages
Japanese (ja)
Other versions
JPH06292180A (en
Inventor
英明 三田
達司 坂内
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP7547293A priority Critical patent/JP3265696B2/en
Priority to US08/150,526 priority patent/US5543844A/en
Priority to EP93118921A priority patent/EP0599288B1/en
Priority to DE69319855T priority patent/DE69319855T2/en
Publication of JPH06292180A publication Critical patent/JPH06292180A/en
Application granted granted Critical
Publication of JP3265696B2 publication Critical patent/JP3265696B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Image Processing (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明はディジタル化した画像デ
ータを圧縮符号化して記録する際に圧縮符号化後の符号
量が所定の符号量以下になるように制御して記録するV
TR等に用いられる画像圧縮符号化装置に関するもので
ある。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for compressing and recording digitized image data and recording the image data by controlling the code amount after the compression and encoding to be equal to or less than a predetermined code amount.
The present invention relates to an image compression encoding device used for a TR or the like.

【0002】[0002]

【従来の技術】自然画像に対する高能率な圧縮符号化技
術として、直交変換に可変長符号化を組み合わせた方式
が有効とされ、カラー自然画像符号化方式の国際標準に
もこの方式が採用されることが決定している(文献:
「テレビジョン学会誌」Vol.46No.8 PP1021〜1024)。
2. Description of the Related Art As a high-efficiency compression coding technique for natural images, a method in which orthogonal transform is combined with variable-length coding is effective, and this method is also adopted as an international standard for color natural image coding. Has been determined (literature:
"The Journal of the Institute of Television Engineers of Japan" Vol.46 No.8 PP1021-1024).

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

【0004】図7は従来の画像圧縮符号化装置のブロッ
ク図、図2はDCTのジグザグスキャンの順を示す図、
図3はDCTの各係数の量子化ステップを示す図、図5
はスケールファクタと符号量から目標のスケールファク
タを算出するための特性図、図8はブロックとスケール
ファクタの関係を示す図である。
FIG. 7 is a block diagram of a conventional image compression encoding apparatus, FIG. 2 is a diagram showing the order of zigzag scanning of DCT,
FIG. 3 shows a quantization step of each coefficient of DCT.
FIG. 8 is a characteristic diagram for calculating a target scale factor from the scale factor and the code amount, and FIG. 8 is a diagram showing a 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次元ハフ
マン符号化したブロック当りの符号量を算出するブロッ
ク符号量算出回路、13は第一の量子化器5のスケール
ファクタを決定して符号量制御を行う符号量制御回路で
ある。
In FIG. 7, 1 is an input terminal for inputting image data, 2 is a block circuit for dividing the image data into 8 × 8 blocks, and 3 is a discrete cosine transform (hereinafter referred to as DCT) for each 8 × 8 block. DCT conversion circuit that performs
4 is a field memory for delaying the DCT coefficient by one field time, 5 is a first quantizer for quantizing the DCT coefficient,
Reference numeral 6 denotes a Huffman encoding circuit that performs two-dimensional Huffman encoding on the output of the first quantizer 5, reference numeral 7 denotes a buffer memory that buffers encoded data at a predetermined rate, reference numeral 8 denotes an output terminal, and reference numeral 9 denotes an output terminal. Is a second quantizer for quantizing DCT coefficients, 10 is a block code amount calculation circuit for calculating the code amount per block obtained by two-dimensional Huffman coding of the output of the second quantizer 9, and 13 is a first code amount calculation circuit. Is a code amount control circuit that determines the scale factor of the quantizer 5 and controls the code amount.

【0006】以上のように構成された従来の画像圧縮符
号化装置について、以下その動作を説明すると、まず、
入力端子1から入力されたデータはブロック化回路2に
よって8×8のDCTブロックに分割される。データは
DCT変換回路3で各ブロック毎に64個のDCT係数
に変換され、図2に示すジグザグスキャンの順に出力さ
れ、フィールドメモリ4で1フィールド遅延される。
The operation of the conventional image compression / encoding device configured as described above will be described below.
The data input from the input terminal 1 is divided by the blocking circuit 2 into 8 × 8 DCT blocks. The data is converted by the DCT conversion circuit 3 into 64 DCT coefficients for each block, output in the order of zigzag scan shown in FIG. 2, and delayed by one field in the field memory 4.

【0007】遅延されたDCT係数は第一の量子化器5
にて、図3に示す各係数毎に異なる量子化ステップと符
号量制御回路13にて決定されるスケールファクタαi
を掛けた量子化値により線形量子化され、ハフマン符号
化回路6にて2次元ハフマン符号化された可変長のデー
タが出力される。符号化された可変長のデータはバッフ
ァメモリ7にて所定のレートに変換されたのちスケール
ファクタαtと共に出力される。スケールファクタαt
の算出は上記遅延時間の間に以下に示すプリスキャンに
より行う。
[0007] The delayed DCT coefficient is supplied to the first quantizer 5.
, A different quantization step for each coefficient shown in FIG. 3 and a scale factor αi determined by the code amount control circuit 13.
The variable-length data is linearly quantized by the quantized value multiplied by .times. And subjected to two-dimensional Huffman encoding by the Huffman encoding circuit 6. 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. Scale factor αt
Is calculated by the following pre-scan during the delay time.

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

【0009】[0009]

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

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

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

【0012】[0012]

【課題を解決するための手段】この目的を達成するため
に本発明の画像圧縮符号化装置は、入力画像データをブ
ロック毎に直交変換する直交変換器と、前記直交変換器
の出力データ書き込みあらかじめ決められた順番で読み
出すメモリと、前記メモリの出力データを量子化する第
一の量子化器と、前記第一の量子化器の出力を可変長符
号化する符号化器と、前記符号化器の出力データを書き
込んだ後に一定のレートで出力するバッファメモリと、
前記符号化器の出力データの符号量を積算する符号量積
算器と、前記直交変換器の出力データを、前記メモリの
出力順に対応してK個のグループに分類し、各グループ
に含まれるブロックに対してM通りの量子化係数の一つ
を割り当て前記量子化係数で量子化する第二の量子化器
と、前記第二の量子化器の出力を可変長符号化した時の
ブロック当りの符号量を算出する符号量算出器と、前記
符号量算出器から出力されるブロック符号量より一画面
を前記M通りの量子化係数で量子化した場合のM通りの
符号量を予測し一画面を所定の符号量とするための量子
化係数(初期量子化係数)を決定する初期量子化係数検
出器と、前記符号量算出器から出力されるブロック符号
量のK個の各グループ毎の総和を求め、その比より初期
量子化係数にて符号化した場合のグループ毎の目標符号
量を予測するグループ符号量算出器と、前記符号化器か
ら各グループのデータが出力される毎に前記符号量積算
器により積算された実際の符号量と前記目標符号量との
予測誤差で前記初期量子化係数を補正することにより前
記第一の量子化器の量子化係数を補正する量子化係数補
正器を備えた構成を有している。
In order to achieve this object, an image compression encoding apparatus according to the present invention comprises: an orthogonal transformer for orthogonally transforming input image data for each block; A memory for reading in a determined order, a first quantizer for quantizing output data of the memory, an encoder for variable-length encoding the output of the first quantizer, and the encoder A buffer memory that outputs at a constant rate after writing the output data of
A code amount integrator for integrating the code amount of the output data of the encoder, and the output data of the orthogonal transformer are classified into K groups corresponding to the output order of the memory, and blocks included in each group. A second quantizer for allocating one of M quantized coefficients to the quantized coefficients, and a block per block when the output of the second quantizer is subjected to variable-length encoding. A code amount calculator for calculating the code amount, and predicting M kinds of code amounts when one screen is quantized with the M kinds of quantization coefficients from the block code amount outputted from the code amount calculator, and And an initial quantization coefficient detector for determining a quantization coefficient (initial quantization coefficient) for obtaining a predetermined code amount, and a total sum of the block code amounts output from the code amount calculator for each of K groups From the ratio and use the initial quantization coefficient A group code amount calculator that predicts a target code amount for each group when the coding is performed, and an actual code amount integrated by the code amount integrator each time data of each group is output from the encoder. It has a configuration including a quantization coefficient corrector that corrects the quantization coefficient of the first quantizer by correcting the initial quantization coefficient with a prediction error from a target code amount.

【0013】[0013]

【作用】本発明は上記構成によって、符号量予測をデー
タ出力の順に分割したグループ毎に行い、実際の符号量
とのフィードバック制御を行うことが出来るため、符号
量制御の精度が向上し、データのオーバーフロー、画質
劣化といった問題点を改善することが出来る。
According to the present invention, since the code amount prediction is performed for each group divided in the order of data output and the feedback control with the actual code amount can be performed by the above configuration, the accuracy of the code amount control is improved and the data amount is improved. Can be improved.

【0014】[0014]

【実施例】以下本発明の第1の実施例について図面を参
照しながら説明する。図1は本発明の画像圧縮符号化装
置のブロック図、図4は画面上のブロックとスケールフ
ァクタを表す図、図5は1フィールドでのスケールファ
クタと符号量を表わす特性図、図6は出力符号量の積算
値と目標符号量を示す特性図、図9は各グループ以降で
のスケールファクタと符号量を表わす特性図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A first 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 the present invention, FIG. 4 is a diagram showing blocks on a screen and a scale factor, FIG. 5 is a characteristic diagram showing a scale factor and a code amount in one field, and FIG. FIG. 9 is a characteristic diagram showing the integrated value of the code amount and the target code amount, and FIG. 9 is a characteristic diagram showing the scale factor and the code amount for each group and thereafter.

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

【0016】9はDCT係数を量子化する第二の量子化
器、10は第二の量子化器の出力を2次元ハフマン符号
化したブロック当りの符号量を算出するブロック符号量
算出回路、11はブロック符号量から初期スケールファ
クタを算出する初期スケールファクタ算出回路、12は
グループ毎の目標符号量を予測するグループ目標符号量
算出回路、13は初期スケールファクタと実際の符号量
から第一の量子化器のスケールファクタを決定するスケ
ールファクタ補正回路、14はハフマン符号化されたデ
ータの符号量を積算していく符号量積算回路である。
9 is a second quantizer for quantizing DCT coefficients, 10 is a block code amount calculation circuit for calculating the code amount per block obtained by two-dimensional Huffman coding the output of the second quantizer, 11 Is an initial scale factor calculation circuit for calculating an initial scale factor from the block code amount, 12 is a group target code amount calculation circuit for predicting a target code amount for each group, and 13 is a first quantum factor based on the initial scale factor and the actual code amount. A scale factor correction circuit 14 for determining the scale factor of the converter is a code amount integrating circuit for integrating the code amount of the Huffman encoded data.

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

【0018】スケールファクタαtの算出を以下に示
す。まずDCT変換回路3で出力したブロック毎のDC
T係数は、第二の量子化器9に入力し、1フィールドの
各ブロックは、図4に示すように、符号化データの出力
順に対応するK個のグループの分類とM通りのスケール
ファクタα1〜αM(α1<α2<・・・<αM)のう
ちの一つが、1フィールドのブロック数がM×Kの倍数
になり、各グループのスケールファクタの割当のブロッ
ク数が同一となるように割り当てられる。また、図4で
は順番にスケールファクタを割り当てたが、ランダムに
なる様に割り当てても良い。各ブロックのDCT係数は
前記割り当てられたスケールファクタと図3に示す量子
化ステップを掛けた量子化値により線形量子化される。
The calculation of the scale factor αt will be described below. First, the DC for each block output by the DCT conversion circuit 3
The T coefficient is input to the second quantizer 9, and each block of one field is divided into K groups corresponding to the output order of encoded data and M scale factors α1 as shown in FIG. To αM (α1 <α2 <... <ΑM), so that the number of blocks in one field is a multiple of M × K, and the number of blocks of the scale factor of each group is the same. Can be In FIG. 4, the scale factors are assigned in order, but they may be assigned in a random manner. 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.

【0019】ブロック符号量算出回路10ではこのM通
りのスケールファクタを用いて量子化されたDCT係数
が2次元ハフマン符号化されたときの可変長データの、
ブロック当りの符号量を算出する。この符号量の算出は
0ランと非0係数との組合せからその符号量をROM等
を用いて出力し、ブロック毎にその値を積算して求め
る。
In the block code amount calculation circuit 10, the DCT coefficients quantized by using the M kinds of scale factors are converted into two-dimensional Huffman codes.
Calculate the code amount per block. 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.

【0020】初期スケールファクタ算出回路11には、
順次ブロック毎の符号量が入力し、あらかじめ割り当て
られたグループ分類毎にM通りのスケールファクタに対
する符号量の積算値を計算する。次に、グループ毎のス
ケールファクタと符号量の関係から1フィールドのスケ
ールファクタと符号量の関係を導出する。グループj
(1≦j≦K)におけるスケールファクタαi(1≦i
≦M)での符号量の総和を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 scale factors is calculated for each of the group classifications assigned in advance. Next, the relationship between the scale factor and the code amount of one field is derived from the relationship between the scale factor and the code amount for each group. Group j
The scale factor αi (1 ≦ i) in (1 ≦ j ≦ K)
Assuming that the total sum of the code amounts under .ltoreq.M) is N (i, j), the code amount Ni when one-field data is quantized by the scale factor αi is the code quantized by the scale factor αi for each group. The sum of the quantities is multiplied by the number M corresponding to the type of the scale factor, and is predicted as (Equation 1).

【0021】[0021]

【数1】 (Equation 1)

【0022】スケールファクタα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 has a characteristic as shown in FIG. 5 in which Ni decreases as αi increases. And an initial scale factor α for encoding the code amount of one field to a predetermined target code amount.
Calculate init. Assuming that the target code amount of one field is Nt, as shown in FIG. 5, for example, if the target code amount Nt is between the predicted code amounts N2 and N3, a straight line (α2, N
2) By the interpolation of-(α3, N3), the initial scale factor αinit for setting the code amount of one field to Nt can be calculated as shown in (Equation 2).

【0023】[0023]

【数2】 (Equation 2)

【0024】グループ目標符号量算出回路12には、前
記各グループでのスケールファクタαiでの符号量の総
和N(i,j)が入力し、K個のグループ毎に初期スケ
ールファクタαinitで量子化を行ったときの符号量の積
算値を予測する。
The total target code amount N (i, j) at the scale factor αi in each group is input to the group target code amount calculation circuit 12, and quantization is performed at the initial scale factor αinit for each of the K groups. Of the code amount at the time of is performed.

【0025】ここで、各グループにおいてスケールファ
クタに割り当てられたブロック数は同一なので、M通り
の異なるスケールファクタにて量子化された符号量の総
和の比と、同一のスケールファクタにおける符号量の比
は同一であるといえる。
Here, since the number of blocks assigned to the scale factors in each group is the same, the ratio of the sum of the code amounts quantized at M different scale factors to the ratio of the code amounts at the same scale factor Are the same.

【0026】従って、グループjにおいてスケールファ
クタαinitとした場合の符号量の総和Njは、1フィー
ルドの目標符号量Ntを各グループの符号量の和の比で
分割したものとして、(数3)に示すように予測され
る。
Accordingly, the total code amount Nj when the scale factor αinit is set in the group j is expressed by (Equation 3) assuming that the target code amount Nt of one field is divided by the ratio of the code amount sum of each group. Predicted as shown.

【0027】[0027]

【数3】 (Equation 3)

【0028】スケールファクタ補正回路13には、グル
ープ目標符号量算出回路12にて算出した各グループ毎
の予測符号量Njが入力され、予測符号量Njを積算し
た各グループ毎の目標符号量積算値が求められた後に、
実際にハフマン符号化回路6にて符号化されたデータ量
は符号量積算回路14において積算され、符号量積算値
として入力される。目標符号量積算値と符号量積算値の
関係を図6の特性図に示す。目標符号量積算値と符号量
積算値の差を予測誤差Δとし、各グループのデータ出力
が終了する毎に、前記予測誤差Δにより次グループのス
ケールファクタαtの補正をおこなう。
The predicted code amount Nj for each group calculated by the group target code amount calculation circuit 12 is input to the scale factor correction circuit 13, and the target code amount integrated value for each group obtained by integrating the predicted code amount Nj is calculated. After being asked,
The data amount actually encoded by the Huffman encoding circuit 6 is integrated in the code amount integrating circuit 14 and input as a code amount integrated value. The relationship between the target code amount integrated value and the code amount integrated value is shown in the characteristic diagram of FIG. The difference between the target code amount integrated value and the code amount integrated value is set as a prediction error Δ, and each time the data output of each group is completed, the scale factor αt of the next group is corrected using the prediction error Δ.

【0029】例えばグループ(j−1)の符号化が終了
し、グループ(j−1)での予測符号量積算値と、実際
の符号量積算値との予測誤差をΔ(j−1)とすると、
グループjから1フィールド符号化終了時点までの目標
符号量を(数4)とするためのスケールファクタαtを
第一の量子化器5に出力し、ハフマン符号化回路6で符
号化することにより、予測誤差Δ(j−1)が相殺さ
れ、次グループ符号化終了時の符号量積算値を目標符号
量積算値近傍に補正することが出来る。
For example, the encoding of the group (j-1) is completed, and the prediction error between the predicted code amount integrated value in the group (j-1) and the actual code amount integrated value is represented by Δ (j-1). Then
By outputting the scale factor αt for setting the target code amount from the group j to the end of one-field encoding to (Equation 4) to the first quantizer 5 and encoding the scale factor αt by the Huffman encoding circuit 6, The prediction error Δ (j−1) is canceled, and the code amount integrated value at the end of the next group coding can be corrected to a value near the target code amount integrated value.

【0030】[0030]

【数4】 (Equation 4)

【0031】αtの算出は前記各ブロック以降のスケー
ルファクタと符号量の関係(図9)よりグループj以降
の符号量の総和を(数4)とするためのスケールファク
タαtを(数5)に示す直線補間により算出する。
The calculation of αt is based on the relationship between the scale factor and the code amount after each block (FIG. 9), and the scale factor αt for making the sum of the code amounts after group j into (Equation 4) is expressed by (Equation 5). It is calculated by the linear interpolation shown.

【0032】[0032]

【数5】 (Equation 5)

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

【0034】なお、予測誤差からスケールファクタαt
を算出するには、αinitの算出に用いた特性図図5を利
用して行うことも可能であり、αtは(数6)に示す直
線補間により算出する。この場合、回路規模の削減が可
能になる。
Note that the scale factor αt is calculated from the prediction error.
Can be calculated using the characteristic diagram FIG. 5 used for calculating αinit, and αt is calculated by linear interpolation shown in (Equation 6). In this case, the circuit scale can be reduced.

【0035】[0035]

【数6】 (Equation 6)

【0036】以上のように本実施例によれば、1フィー
ルドのDCTブロックをK個のグループに分類し、M種
類の異なるスケールファクタで量子化したブロック符号
量から、初期スケールファクタ算出回路10にて1フィ
ールドの目標符号量に量子化するための初期スケールフ
ァクタαinitを求めると共に、初期スケールファクタα
initにより量子化した場合の符号化出力順のグループ毎
の符号量を予測することにより、グループ目標符号量算
出回路12で算出するため、初期スケールファクタとグ
ループ毎の符号量予測の精度が向上する。そして、グル
ープ毎に符号量積算回路14にて積算される実際の符号
量と前記目標符号量の誤差よりスケールファクタ補正回
路13で符号量制御を行うため、1フィールド期間中に
M回のきめ細かい符号量制御を行うことが出来る。
As described above, according to this embodiment, the DCT blocks of one field are classified into K groups, and the initial scale factor calculating circuit 10 uses the block code amounts quantized with M different scale factors. To obtain an initial scale factor αinit for quantizing to a target code amount of one field,
By predicting the code amount for each group in the encoding output order when quantized by init, and calculating by the group target code amount calculation circuit 12, the accuracy of the initial scale factor and the code amount prediction for each group is improved. . Then, since the code amount control is performed by the scale factor correction circuit 13 based on the error between the actual code amount integrated by the code amount integration circuit 14 and the target code amount for each group, M fine codes are performed in one field period. Volume control can be performed.

【0037】次に本発明の第2の実施例について図10
を参照しながら説明する。なお、図1〜図6に示した構
成については、同じ構成であるのでその詳細な説明は省
略する。本実施例では前述の第1の実施例とはスケール
ファクタ補正回路13でのαtの算出が異なるので、こ
の点について図10の特性図を参照しながら詳しく説明
する。
Next, a second embodiment of the present invention will be described with reference to FIG.
This will be described with reference to FIG. Note that the configurations shown in FIGS. 1 to 6 have the same configuration, and a detailed description thereof will be omitted. In this embodiment, the calculation of αt in the scale factor correction circuit 13 is different from that of the first embodiment described above. This will be described in detail with reference to the characteristic diagram of FIG.

【0038】例えばグループ(j−1)の符号化が終了
し、グループ(j−1)での予測符号量積算値と、実際
の符号量積算値との予測誤差をΔ(j−1)とすると、
1フィールド終了時点での誤差(全符号化誤差ΔK)は
(数7)のように予測される。
For example, the encoding of the group (j-1) is completed, and the prediction error between the predicted code amount integrated value in the group (j-1) and the actual code amount integrated value is Δ (j-1). Then
The error at the end of one field (the total coding error ΔK) is predicted as in (Equation 7).

【0039】[0039]

【数7】 (Equation 7)

【0040】そこで、1フィールド符号化終了時点での
誤差を0とするためのスケールファクタαtを第一の量
子化器5に出力し、ハフマン符号化回路6で符号化する
ことにより、予測誤差ΔKが相殺され、1フィールド符
号化終了時の符号量積算値を目標符号量積算値近傍に補
正することが出来る。αtの算出は前記各ブロック以降
のスケールファクタと符号量の関係(図10)よりグル
ープj以降の符号量よりΔKを打ち消すためのスケール
ファクタαtを(数8)に示す直線補間により算出す
る。
Therefore, the scale factor αt for setting the error at the end of one-field encoding to 0 is output to the first quantizer 5 and encoded by the Huffman encoding circuit 6 to obtain the prediction error ΔK Are canceled, and the code amount integrated value at the end of the one-field encoding can be corrected to be close to the target code amount integrated value. In calculating αt, the scale factor αt for canceling ΔK from the code amount after group j is calculated by linear interpolation shown in (Equation 8) from the relationship between the scale factor and the code amount after each block (FIG. 10).

【0041】[0041]

【数8】 (Equation 8)

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

【0043】なお、予測誤差からスケールファクタαt
を算出するには、αinitの算出に用いた図5の特性を利
用して行うことも可能であり、αtは(数9)に示す直
線補間により算出する。この場合、回路規模の削減が可
能になる。
Note that the scale factor αt is calculated from the prediction error.
Can be calculated using the characteristic of FIG. 5 used for calculating αinit, and αt is calculated by linear interpolation shown in (Equation 9). In this case, the circuit scale can be reduced.

【0044】[0044]

【数9】 (Equation 9)

【0045】以上のように本実施例によれば、現在の符
号量積算値の予測誤差より符号化終了時点で所定の符号
量以内に収束するように正確にスケールファクタの補正
を行うことが出来る。
As described above, according to the present embodiment, it is possible to accurately correct the scale factor so as to converge within a predetermined code amount at the end of coding from the prediction error of the current code amount integrated value. .

【0046】次に本発明の第3の実施例について図面を
参照しながら説明する。なお、図2〜図6および図10
に示した構成については同じ構成であるのでその詳細な
説明は省略する。本実施例では前述の第1の実施例にハ
フマン符号化回路6に符号量の制限を追加したもので、
この点について図面を参照しながら詳しく説明する。
Next, a third embodiment of the present invention will be described with reference to the drawings. 2 to 6 and FIG.
Are the same as those described above, and therefore detailed description thereof is omitted. In this embodiment, a code amount restriction is added to the Huffman encoding circuit 6 in the first embodiment.
This point will be described in detail with reference to the drawings.

【0047】図11は本実施例の画像圧縮符号化装置の
構成を示すブロック図、図12は未符号化ブロック数と
制御符号量の関係を表す特性図、図13はブロック符号
量割り当てを示す図である。
FIG. 11 is a block diagram showing the configuration of the image compression encoding apparatus of this embodiment, FIG. 12 is a characteristic diagram showing the relationship between the number of uncoded blocks and the control code amount, and FIG. 13 shows the block code amount allocation. FIG.

【0048】図11において、1〜14までは第一の実
施例と同一の構成である。16は未符号化ブロック数に
対応して第一の制御符号量を設定する第一の制御符号量
設定回路、17は未符号化ブロック数に対応して第二の
制御符号量を設定する第二の制御符号量設定回路、18
は符号量積算回路14にて積算された符号量と第一の制
御符号量とを比較する第一の比較回路、19は符号量積
算回路14にて積算された符号量と第二の制御符号量と
を比較する第二の比較回路、20はこれらの比較結果よ
りブロック当りの符号量を制限する符号量制限回路、2
1はDCT係数からブロック毎の電力和を求めるブロッ
ク電力算出回路である。
In FIG. 11, 1 to 14 have the same configuration as the first embodiment. 16 is a first control code amount setting circuit for setting a first control code amount according to the number of uncoded blocks, and 17 is a first control code amount setting circuit for setting a second control code amount according to the number of uncoded blocks. Second control code amount setting circuit, 18
Is a first comparison circuit for comparing the code amount integrated by the code amount integration circuit 14 with the first control code amount, and 19 is a code amount integrated by the code amount integration circuit 14 and the second control code. A second comparing circuit 20 for comparing the amount with the code amount limiting circuit 20 for limiting the amount of code per block based on these comparison results.
Reference numeral 1 denotes a block power calculation circuit for calculating the power sum for each block from the DCT coefficient.

【0049】第一の制御符号量設定回路17と第二の制
御符号量設定回路18ではK番目の最終グループになる
と、未符号化ブロック数に対応した制御符号量を図12
の特性のように設定される。ここで、各制御符号量は、
1フィールド終了時点で所定量となるためにブロック当
り一定量とした符号量の予測を示しており、第一の制御
符号量はDCT係数の内、DCのみを符号化した場合
(ブロック当り符号量L1)、第二の制御符号量はブロ
ック当り符号量L2(L1<L2)で符号化した場合を
表している。
When the first control code amount setting circuit 17 and the second control code amount setting circuit 18 are in the K-th final group, the control code amount corresponding to the number of uncoded blocks is changed as shown in FIG.
It is set like the characteristic of Here, each control code amount is
This shows prediction of a code amount that is a fixed amount per block so as to become a predetermined amount at the end of one field, and the first control code amount is a case where only DC of DCT coefficients is coded (code amount per block). L1), the second control code amount indicates a case where encoding is performed with a code amount L2 per block (L1 <L2).

【0050】ブロック電力算出回路21ではDCT係数
から各ブロック毎の電力和を算出する。1ブロック8×
8のDCT変換の場合、DCT係数は64個であり、D
CT係数をD(i)(i=0〜63)とすると、その電力和
PWは(数10)により求められる。
The block power calculation circuit 21 calculates the power sum for each block from the DCT coefficients. 8 × per block
8, the number of DCT coefficients is 64, and
Assuming that the CT coefficient is D (i) (i = 0 to 63), the power sum PW is obtained by (Equation 10).

【0051】[0051]

【数10】 (Equation 10)

【0052】符号量制限回路20では第一の比較回路1
8にて積算符号量が第一の制御符号量を上回った場合に
はDCのみを符号化するように、第二の比較回路19に
て積算符号量が第二の制御符号量を上回った場合にはブ
ロック電力算出回路21にて算出されたブロック電力に
基づいて各ブロックに対して符号量を割り当ててハフマ
ン符号化回路6を制御する。
In the code amount limiting circuit 20, the first comparing circuit 1
8, when the integrated code amount exceeds the second control code amount in the second comparison circuit 19 so that only DC is encoded when the integrated code amount exceeds the first control code amount. The Huffman encoding circuit 6 is controlled by assigning a code amount to each block based on the block power calculated by the block power calculation circuit 21.

【0053】次に、各ブロックに割り当てる符号量につ
いて説明する。1フィールドあたりの全ブロック数をB
とし、n番目のブロックにおけるブロック電力をPW
(n)とすると符号量の割り当てLG(n)はブロック電力に
比例した符号量として(数11)により求められる。
Next, the amount of code allocated to each block will be described. B is the total number of blocks per field
And the block power in the n-th block is PW
Assuming that (n), the code amount allocation LG (n) is obtained by (Equation 11) as a code amount proportional to the block power.

【0054】[0054]

【数11】 [Equation 11]

【0055】従って各ブロックには図13に示すよう
に、それぞれのブロック電力に対応した符号量が割り当
てられる。尚、LG(n)はブロック電力PW(n)に比例す
るので、(数12)のように近似して求めることも出来
る。
Therefore, as shown in FIG. 13, a code amount corresponding to each block power is allocated to each block. Since LG (n) is proportional to the block power PW (n), it can be obtained by approximation as shown in (Equation 12).

【0056】[0056]

【数12】 (Equation 12)

【0057】ここで、K(α)はスケールファクタαのと
きのブロック電力と符号量の比例定数であり、統計的に
求めることが可能である。
Here, K (α) is a proportional constant between the block power and the code amount when the scale factor is α, and can be statistically obtained.

【0058】以上のように本実施例によれば、ブロック
あたりの平均符号量は所定量としながらも各ブロックの
電力に応じてそのブロックに与える符号量の制限をきめ
細かく行うことにより、画像の局所的特徴に適合し、画
質劣化を軽減して、所定の符号量に制御することがで
き、また符号化の終盤のみに符号量制限を行うことによ
り画質の劣化を最小に抑えることが可能である。
As described above, according to this embodiment, while the average code amount per block is a predetermined amount, the code amount given to each block is finely limited in accordance with the power of each block, so that the local amount of the image can be reduced. It is possible to control the code amount to a predetermined amount by reducing the deterioration of the image quality, and to limit the code amount only at the end of the encoding, thereby minimizing the deterioration of the image quality. .

【0059】なお、画面の端部を最後に符号化すること
により、符号量制限の劣化を視覚上目立たなくすること
も可能である。さらに、本実施例としては、平均符号量
をL1、L2の2種類で行ったがさらに多くの符号量を
設定してもよく、また、符号量を制限する単位を複数の
ブロック単位としてもよい。
By coding the end of the screen last, it is possible to make the degradation of the code amount limit visually inconspicuous. Further, in this embodiment, the average code amount is set to two types of L1 and L2, but a larger code amount may be set, and the unit for limiting the code amount may be a plurality of block units. .

【0060】次に本発明の第4の実施例について図14
のブロック図を参照しながら説明する。なお、図2〜図
6および図9に示した構成については同じ構成であるの
でその詳細な説明は省略する。本実施例では前述の第3
の実施例とは、符号量制限回路20での符号量の割り当
てが異なるもので、この点について図面を参照しながら
詳しく説明する。
Next, a fourth embodiment of the present invention will be described with reference to FIG.
This will be described with reference to the block diagram of FIG. Since the configurations shown in FIGS. 2 to 6 and 9 are the same, detailed description thereof will be omitted. In the present embodiment, the third
This embodiment differs from the embodiment in that the code amount is assigned by the code amount limiting circuit 20. This will be described in detail with reference to the drawings.

【0061】図14において、1〜14までは第一の実
施例と同一の構成であり、また16〜20までは第3の
実施例と同一の構成である。22はブロック符号量算出
回路10から出力されるプリスキャン時のブロック毎の
符号量から符号量割り当てを決定する符号量割り当て回
路である。
In FIG. 14, 1 to 14 have the same configuration as in the first embodiment, and 16 to 20 have the same configuration as in the third embodiment. A code amount assignment circuit 22 determines the code amount assignment from the code amount for each block at the time of prescan output from the block code amount calculation circuit 10.

【0062】符号量制限回路20では第一の比較回路1
8にて積算符号量が第一の制御符号量を上回った場合に
はDCのみを符号化するように、第二の比較回路19に
て積算符号量が第二の制御符号量を上回った場合には符
号量割り当て回路22にて算出された符号量を割り当て
てハフマン符号化回路6を制御する。
In the code amount limiting circuit 20, the first comparing circuit 1
8, when the integrated code amount exceeds the second control code amount in the second comparison circuit 19 so that only DC is encoded when the integrated code amount exceeds the first control code amount. The Huffman coding circuit 6 is controlled by allocating the code amount calculated by the code amount allocation circuit 22 to.

【0063】符号量割り当て回路22には、ブロック符
号量算出回路10にて算出されたM個のうち一つのスケ
ールファクタが選ばれて量子化された、ブロック当りの
符号量と、初期スケールファクタ算出回路11にて予測
された、スケールファクタと符号量の関係が入力され、
現在のスケールファクタでの各ブロック単位の符号量が
予測される。
In the code amount allocating circuit 22, one of the M scale factors calculated by the block code amount calculating circuit 10 is selected and quantized, and the code amount per block and the initial scale factor calculation are calculated. The relationship between the scale factor and the code amount predicted by the circuit 11 is input,
The code amount for each block in the current scale factor is predicted.

【0064】例えば、あるブロックが第二の量子化器9
にてスケールファクタα1が割り当てられ、ブロック符
号量算出回路10で出力される符号量がsの時、現在の
スケールファクタがαinitであるとすると、図9のスケ
ールファクタと符号量の特性図より符号量TGは(数1
3)のように予測される。
For example, if a certain block is the second quantizer 9
When the code amount output from the block code amount calculation circuit 10 is s and the current scale factor is αinit, the code is obtained from the characteristic diagram of the scale factor and the code amount in FIG. The quantity TG is (Equation 1)
Predicted as in 3).

【0065】[0065]

【数13】 (Equation 13)

【0066】ここで、ブロックnにおける符号量予測を
TG(n)とすると符号量の割り当てLG(n)は(数14)
により求められる。
Here, assuming that the code amount prediction in block n is TG (n), the code amount allocation LG (n) is (Equation 14)
Required by

【0067】[0067]

【数14】 [Equation 14]

【0068】なお、LG(n)は予測符号量TG(n)に比例
するので、(数15)のように近似して求めることも出
来る。
Since LG (n) is proportional to the predicted code amount TG (n), it can be obtained by approximation as shown in (Equation 15).

【0069】[0069]

【数15】 (Equation 15)

【0070】ここで、L(α)はスケールファクタαのと
きのブロック電力と符号量の比例定数であり、統計的に
求めることが可能である。
Here, L (α) is a proportional constant between the block power and the code amount when the scale factor is α, and can be statistically obtained.

【0071】以上のように本実施例によれば、ブロック
単位で符号量の制限をきめ細かく行う上に、初期スケー
ルファクタの算出に用いたパラメータを使って予測符号
量の算出が行えるため、回路規模の増大なく、符号量制
御の精度が向上するものである。
As described above, according to the present embodiment, the code amount can be finely limited in block units, and the prediction code amount can be calculated using the parameters used for calculating the initial scale factor. The accuracy of the code amount control is improved without increasing.

【0072】なお、第3の実施例と同様、画面の端部を
最後に符号化することにより、符号量制限の劣化を視覚
上目立たなくすることも可能である。
As in the third embodiment, by encoding the end of the screen last, it is possible to make the deterioration of the code amount limit visually inconspicuous.

【0073】次に本発明の第5の実施例について図面を
参照しながら説明する。なお、図2〜図6および図9に
示した構成については同じ構成であるのでその詳細な説
明は省略する。
Next, a fifth embodiment of the present invention will be described with reference to the drawings. Since the configurations shown in FIGS. 2 to 6 and 9 are the same, detailed description thereof will be omitted.

【0074】本実施例ではマルチチャンネルでの符号量
制御方式を示したものである。図15は本実施例の画像
圧縮装置のブロック図、図16はチャンネル分割を表す
図である。
This embodiment shows a code amount control method in a multi-channel. FIG. 15 is a block diagram of the image compression device of the present embodiment, and FIG. 16 is a diagram showing channel division.

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

【0076】38はDCT係数を量子化するAch第二
の量子化器、39は第二の量子化器の出力を2次元ハフ
マン符号化したブロック当りの符号量を算出するAch
ブロック符号量算出回路、40はグループ毎の目標符号
量を予測するAch目標符号量算出回路、41は初期ス
ケールファクタと実際の符号量から第一の量子化器のス
ケールファクタを決定するAchスケールファクタ補正
回路、42はハフマン符号化されたデータの符号量を積
算していくAch符号量積算回路である。
Reference numeral 38 denotes an Ach second quantizer for quantizing DCT coefficients, and reference numeral 39 denotes an Ach for calculating a code amount per block obtained by two-dimensional Huffman encoding the output of the second quantizer.
A block code amount calculation circuit; 40, an Ach target code amount calculation circuit for predicting a target code amount for each group; 41, an Ach scale factor for determining a scale factor of a first quantizer from an initial scale factor and an actual code amount The correction circuit 42 is an Ach code amount integrating circuit that integrates the code amount of the Huffman encoded data.

【0077】51〜62はAchの31〜42に対応す
るBchの各処理回路、70はブロック符号量から初期
スケールファクタを算出する初期スケールファクタ算出
回路である。
Reference numerals 51 to 62 denote processing circuits of Bch corresponding to 31 to 42 of Ach, and reference numeral 70 denotes an initial scale factor calculating circuit for calculating an initial scale factor from the block code amount.

【0078】以上のように構成された画像圧縮符号化装
置について、以下その動作を説明する。まず、入力端子
1から入力されたデータはチャンネル分割回路30によ
って図15に示すようにA,Bの2チャンネルに分割さ
れる。分割されたデータはそれぞれブロック化回路31
および51によって8×8のDCTブロックに分割され
る。データはDCT変換回路32および52で各ブロッ
ク毎に64個のDCT係数に変換され、図2に示すジグ
ザグスキャンの順に出力され、フィールドメモリ33お
よび53で1フィールド遅延される。
The operation of the image compression / encoding device configured as described above will be described below. First, the data inputted from the input terminal 1 is divided into two channels A and B by the channel dividing circuit 30 as shown in FIG. Each of the divided data is divided into block circuits 31.
And 51 split into 8 × 8 DCT blocks. The data is converted into 64 DCT coefficients for each block by DCT conversion circuits 32 and 52, output in zigzag scan order shown in FIG. 2, and delayed by one field in field memories 33 and 53.

【0079】遅延されたDCT係数は第一の量子化器3
4および54にて、図3に示す各係数毎に異なる量子化
ステップとスケールファクタ補正回路41および61に
て決定されるスケールファクタαtを掛けた量子化値に
より線形量子化され、ハフマン符号化回路35および5
5にて2次元ハフマン符号化された可変長のデータが出
力される。符号化された可変長のデータはバッファメモ
リ36および56にて所定のレートに変換されたのちス
ケールファクタαtと共に出力される。
The delayed DCT coefficient is supplied to the first quantizer 3
At 4 and 54, a Huffman encoding circuit is linearly quantized by a quantization value obtained by multiplying a different quantization step for each coefficient shown in FIG. 3 and a scale factor αt determined by the scale factor correction circuits 41 and 61. 35 and 5
In step 5, variable-length data subjected to two-dimensional Huffman encoding is output. The encoded variable-length data is converted into a predetermined rate by the buffer memories 36 and 56, and then output together with the scale factor αt.

【0080】グループ目標符号量の予測、及びスケール
ファクタαtの補正方法の詳細については第1の実施例
と同様であり、チャンネル分割に関する点のみを以下に
示す。
The details of the method of predicting the group target code amount and the method of correcting the scale factor αt are the same as in the first embodiment, and only points relating to channel division will be described below.

【0081】まず、DCT変換回路32および52で出
力したブロック毎のDCT係数は、第2の量子化器38
および58に入力し、1フィールドの各ブロックは、図
4に示すように、符号化データの出力順に対応するK個
のグループの分類とM通りのスケールファクタα1〜α
M(α1<α2<・・・<αM)のうちの一つが、割り
当てられる。各ブロックのDCT係数は前記割り当てら
れたスケールファクタと図3に示す量子化ステップを掛
けた量子化値により線形量子化される。
First, the DCT coefficients for each block output from the DCT transform circuits 32 and 52 are converted by the second quantizer 38.
And 58, and each block of one field is divided into K groups corresponding to the output order of the encoded data and M scale factors α1 to α as shown in FIG.
One of M (α1 <α2 <... <ΑM) is assigned. 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.

【0082】ブロック符号量算出回路39及び59では
このM通りのスケールファクタを用いて量子化されたD
CT係数が2次元ハフマン符号化されたときのブロック
当りの符号量を算出する。
The block code amount calculation circuits 39 and 59 use the M scale factors to quantize D
The code amount per block when the CT coefficient is subjected to the two-dimensional Huffman coding is calculated.

【0083】初期スケールファクタ算出回路70には、
2チャンネル分のブロック毎の符号量が入力し、2チャ
ンネル分の符号量から1種類の初期スケールファクタα
initが求められる。
The initial scale factor calculation circuit 70 includes:
The code amount for each block for two channels is input, and one type of initial scale factor α is calculated from the code amount for two channels.
init is required.

【0084】グループ目標符号量算出回路40および6
0では、2チャンネル独立して、K個のグループ毎に初
期スケールファクタαinitで量子化を行ったときの符号
量の積算値を算出する。
Group target code amount calculation circuits 40 and 6
At 0, the integrated value of the code amount when quantization is performed with the initial scale factor αinit for each of the K groups independently for two channels is calculated.

【0085】スケールファクタ補正回路41および61
には、グループ目標符号量算出回路40および60にて
算出した各グループ毎の予測符号量と、実際にハフマン
符号化された符号量が入力され、予測誤差Δにより次グ
ループのスケールファクタαtの補正がチャンネル毎に
行われる。
Scale factor correction circuits 41 and 61
Is input with the predicted code amount for each group calculated by the group target code amount calculation circuits 40 and 60 and the code amount actually Huffman-coded, and corrects the scale factor αt of the next group by the prediction error Δ. Is performed for each channel.

【0086】以上のように本実施例によれば、1フィー
ルドの画像データを2チャンネルに分割しそれぞれのチ
ャンネルを所定の符号量以内で符号化する際に、初期ス
ケールファクタ算出回路では2チャンネル分の符号量と
スケールファクタの関係を用いて初期スケールファクタ
αinitを求めることが出来るため初期スケールファクタ
の予測精度を向上させることができ、さらにチャンネル
毎にスケールファクタの補正を行いきめ細かい符号量制
御が可能である。
As described above, according to this embodiment, when one field of image data is divided into two channels and each channel is encoded within a predetermined code amount, the initial scale factor calculating circuit uses two channels. The initial scale factor αinit can be obtained by using the relationship between the code amount and the scale factor, so that the prediction accuracy of the initial scale factor can be improved, and the scale factor can be corrected for each channel to enable fine code amount control. It is.

【0087】なお、本実施例においては2チャンネルの
符号化を示したが、いかなるチャンネル数においても同
様の効果があることは明かである。また、チャンネル分
割する際、画面上で一つのチャンネルが集中しない様に
シャフリングを行った方がチャンネル間の符号量の差が
少なくなり符号量制御の精度が向上するのは明かであ
る。
In this embodiment, two-channel encoding is described, but it is clear that the same effect can be obtained with any number of channels. In addition, when channel division is performed, it is apparent that shuffling such that one channel is not concentrated on the screen reduces the difference in code amount between channels and improves the accuracy of code amount control.

【0088】なお、全ての実施例において、フィールド
単位での圧縮を示しているが、フレーム単位、或は複数
のブロックからなるマクロブロック単位での圧縮につい
ても同様の効果があることは明かである。
In all the embodiments, the compression is shown in units of fields. However, it is apparent that the same effect can be obtained in the case of compression in units of frames or in units of macroblocks composed of a plurality of blocks. .

【0089】また、全ての実施例において、プリスキャ
ンによる符号量の予測を全てのブロックにおいて行って
いるが、一部のブロックをサンプリングして演算する場
合も同様の効果が得られる。
In all the embodiments, the prediction of the code amount by the pre-scan is performed for all the blocks. However, the same effect can be obtained when a part of the blocks is sampled and operated.

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

【0091】[0091]

【発明の効果】以上説明したように本発明によれば、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 of each group obtained by dividing the data of one screen into K groups can be accurately predicted only by the prescanning times, the actual integrated code amount and the actual code amount integrated value can be predicted. The accuracy of the code amount control is improved by correcting the initial scale factor by comparing.

【0092】さらにブロック単位で符号量の制限を設け
ることによりデータのオーバーフローを防ぎきめ細かい
符号量制御が可能であり、また多チャンネルの符号化に
も、圧縮画像の画質を向上させる画像圧縮符号化装置を
実現できる。
Further, by setting a code amount restriction on a block basis, it is possible to prevent data overflow and to perform fine code amount control, and to improve the image quality of a compressed image even in multi-channel coding. Can be realized.

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

【図1】本発明の第1の実施例の画像圧縮符号化装置の
構成を示すブロック図
FIG. 1 is a block diagram illustrating a configuration of an image compression encoding apparatus according to a first 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 a quantization step of DCT coefficients;

【図4】本発明の第1の実施例の画面上のブロックを表
す図
FIG. 4 is a diagram showing blocks on a screen according to the first 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】本発明の第1の実施例の符号量積算値の時間履
歴を示す特性図
FIG. 6 is a characteristic diagram showing a time history of a code amount integrated value according to the first embodiment of the present invention.

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

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

【図9】本発明の第1の実施例のjグループ以降のスケ
ールファクタと符号量の関係を示す図
FIG. 9 is a diagram illustrating a relationship between a scale factor and a code amount after j group in the first embodiment of the present invention.

【図10】本発明の第2の実施例の符号量積算値の時間
履歴を示す特性図
FIG. 10 is a characteristic diagram showing a time history of a code amount integrated value according to the second embodiment of the present invention.

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

【図12】符号化時間と制御符号量の関係を示す特性図FIG. 12 is a characteristic diagram showing a relationship between an encoding time and a control code amount.

【図13】ブロックに対する符号量割り当てを表す図FIG. 13 is a diagram showing code amount allocation to blocks.

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

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

【図16】本発明の第5の実施例の画面上のチャンネル
分割を示す図
FIG. 16 is a diagram showing channel division on a screen according to a fifth embodiment of the present invention.

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

2 ブロック化回路 3 DCT変換回路 4 フィールドメモリ 5 第一の量子化器 6 ハフマン符号化器 7 バッファメモリ 9 第二の量子化器 10 ブロック符号量算出回路 11 初期スケールファクタ算出回路 12 グループ目標符号量算出回路 13 スケールファクタ補正回路 14 符号量積算回路 2 Blocking circuit 3 DCT transformation circuit 4 Field memory 5 First quantizer 6 Huffman encoder 7 Buffer memory 9 Second quantizer 10 Block code amount calculation circuit 11 Initial scale factor calculation circuit 12 Group target code amount Calculation circuit 13 Scale factor correction circuit 14 Code amount integration circuit

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04N 7/24 - 7/68 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) H04N 7/ 24-7/68

Claims (7)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】入力画像データを、複数のブロックに分割
し、この分割した各ブロックに直交変換と可変長符号化
とを組み合わせた符号化方式によって所定の符号量に圧
縮する装置であって、前記入力画像データをブロック毎
に直交変換する直交変換器と、前記直交変換器の出力デ
ータを書き込み、あらかじめ決められた順番で読み出す
メモリと、前記メモリの出力データを量子化する第一の
量子化器と、前記第一の量子化器の出力を可変長符号化
する符号化器と、前記符号化器の出力データを書き込ん
だ後に一定のレートで出力するバッファメモリと、前記
符号化器の出力データの符号量を積算する符号量積算器
と、前記直交変換器の出力データを、前記メモリの出力
順に対応してK個のグループに分類し、各グループに含
まれるブロックに対してM通りの量子化係数の一つを割
り当て前記量子化係数で量子化する第二の量子化器と、
前記第二の量子化器の出力を可変長符号化した時のブロ
ック当りの符号量を算出する符号量算出器と、前記符号
量算出器から出力されるブロック符号量より一画面を前
記M通りの量子化係数で量子化した場合のM通りの符号
量を予測し一画面を所定の符号量とするための量子化係
数(初期量子化係数)を決定する初期量子化係数検出器
と、前記符号量算出器から出力されるブロック符号量の
K個の各グループ毎の総和を求め、その比より初期量子
化係数にて符号化した場合のグループ毎の目標符号量を
予測するグループ符号量算出器と、前記符号化器から各
グループのデータが出力される毎に前記符号量積算器に
より積算された実際の符号量と前記目標符号量との予測
誤差で前記初期量子化係数を補正することにより前記第
一の量子化器の量子化係数を補正する量子化係数補正器
を備えたことを特徴とする画像圧縮符号化装置。
1. An apparatus for dividing input image data into a plurality of blocks, and compressing each of the divided blocks to a predetermined code amount by a coding method combining orthogonal transform and variable length coding, An orthogonal transformer for orthogonally transforming the input image data for each block, a memory for writing output data of the orthogonal transformer and reading in a predetermined order, and a first quantization for quantizing output data of the memory Encoder, an encoder for performing variable length encoding on the output of the first quantizer, a buffer memory for writing the output data of the encoder, and outputting the data at a constant rate, and an output of the encoder. A code amount integrator for integrating the code amount of data, and the output data of the orthogonal transformer are classified into K groups corresponding to the output order of the memory, and the blocks included in each group are divided into K groups. A second quantizer for quantizing the assignment the quantization coefficient of one of the quantized coefficients are M and,
A code amount calculator for calculating the code amount per block when the output of the second quantizer is subjected to variable length coding; and M screens of one screen from the block code amount output from the code amount calculator. An initial quantized coefficient detector for predicting M kinds of code amounts when quantized with the quantized coefficients and determining a quantized coefficient (initial quantized coefficient) for setting one screen to a predetermined code amount; Group code amount calculation for obtaining the total sum of the block code amount output from the code amount calculator for each of the K groups and predicting the target code amount for each group when encoding is performed using the initial quantization coefficient from the ratio. And correcting the initial quantization coefficient by a prediction error between an 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. By the quantity of the first quantizer Image compression encoding apparatus characterized by having a quantization coefficient corrector that corrects the coefficient.
【請求項2】一画面のブロック数がM×Kの倍数となる
ようにMおよびKを定め、各グループの各スケールファ
クタに対応するブロック数が同一となるように割り当て
ることを特徴とする請求項1記載の画像圧縮符号化装
置。
2. The method according to claim 1, wherein M and K are determined so that the number of blocks in one screen is a multiple of M × K, and the blocks are allocated so that the number of blocks corresponding to each scale factor of each group is the same. Item 3. An image compression encoding apparatus according to Item 1.
【請求項3】量子化係数補正器は、符号化器から各グル
ープのデータが出力される毎に符号量積算器により積算
された実際の符号量と目標符号量との予測誤差を算出
し、次グループ以降の目標符号量の総和から前記予測誤
差を引いた符号量を次グループ以降の目標符号量として
次グループの量子化係数を決定することを特徴とする請
求項1記載の画像圧縮符号化装置。
3. A quantizing coefficient corrector calculates a prediction error between an actual code amount integrated by a code amount integrator and a target code amount each time data of each group is output from the encoder, 2. The image compression coding according to claim 1, wherein a code amount obtained by subtracting the prediction error from a total sum of target code amounts of the next and subsequent groups is used as a target code amount of the next and subsequent groups to determine a quantization coefficient of the next group. apparatus.
【請求項4】量子化係数補正器は、符号化器から各グル
ープのデータが出力される毎に符号量積算器により積算
された実際の符号量と目標符号量との予測誤差を算出
し、前記予測誤差と、既符号化データ符号量と未符号化
データ符号量予測の比より現在の量子化係数にて一画面
全て符号化した場合の誤差(全符号化誤差)を予測し、
次グループ以降の目標符号量の総和から全符号化誤差を
引いた符号量を次グループ以降の目標符号量として次グ
ループの量子化係数を決定することを特徴とする請求項
1記載の画像圧縮符号化装置。
4. A quantization coefficient corrector calculates a prediction error between an actual code amount integrated by a code amount integrator and a target code amount each time data of each group is output from the encoder, The prediction error and the error (all coding errors) when the entire screen is coded by the current quantization coefficient is predicted from the ratio between the already coded data code amount and the uncoded data code amount prediction,
2. The image compression code according to claim 1, wherein a code amount obtained by subtracting all coding errors from a total sum of target code amounts of the next and subsequent groups is determined as a target code amount of the next and subsequent groups, and a quantized coefficient of the next group is determined. Device.
【請求項5】1ブロック毎に、1フィールドの符号量を
所定量とするための未符号化ブロックをブロック当り固
定長で符号化を行った場合の符号量(制御符号量)を設
定する符号量設定器と、符号量積算器にて積算された符
号量が前記制御符号量を越えた時に1ブロック毎に符号
量を制御する符号量制御器を備えたことを特徴とする請
求項1記載の画像圧縮符号化装置。
5. A code for setting a code amount (control code amount) in a case where an uncoded block is coded at a fixed length per block for setting a code amount of one field to a predetermined amount for each block. 2. The apparatus according to claim 1, further comprising an amount setting device, and a code amount controller for controlling the code amount for each block when the code amount integrated by the code amount integrator exceeds the control code amount. Image compression encoding apparatus.
【請求項6】直交変換器の出力データより各ブロック毎
の電力和を求めるブロック電力算出器を備え、符号量制
御器は未符号化ブロックの前記ブロック電力和に比例し
た符号量を各ブロック毎に定め符号化器を制御すること
を特徴とする請求項5記載の画像圧縮符号化装置。
6. A block power calculator for calculating a power sum for each block from output data of an orthogonal transformer, wherein a code amount controller calculates a code amount proportional to the block power sum of an uncoded block for each block. 6. An image compression encoding apparatus according to claim 5, wherein the encoder is controlled according to the following.
【請求項7】符号量算出器にて算出される第二の量子化
器にて符号化された各ブロック毎の割り当てられた量子
化係数と符号量、および、初期量子化係数算出器にて予
測される量子化係数と符号量の関係から、初期量子化係
数にて量子化を行った場合の各ブロック当りの符号量を
予測するブロック符号量予測器を備え、符号量制御器は
前記ブロック当りの予測符号量に比例した符号量を各ブ
ロック毎に定め符号化器を制御することを特徴とする請
求項5記載の画像圧縮符号化装置。
7. An assigned quantization coefficient and code amount for each block encoded by a second quantizer calculated by a code amount calculator and an initial quantization coefficient calculator. From the relationship between the predicted quantization coefficient and the code amount, a block code amount predictor for predicting the code amount for each block when quantization is performed with the initial quantization coefficient, and the code amount controller 6. The image compression encoding apparatus according to claim 5, wherein a code amount proportional to a predicted code amount per block is determined for each block and the encoder is controlled.
JP7547293A 1992-11-25 1993-04-01 Image compression coding device Expired - Fee Related JP3265696B2 (en)

Priority Applications (4)

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

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7547293A JP3265696B2 (en) 1993-04-01 1993-04-01 Image compression coding device

Publications (2)

Publication Number Publication Date
JPH06292180A JPH06292180A (en) 1994-10-18
JP3265696B2 true JP3265696B2 (en) 2002-03-11

Family

ID=13577288

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7547293A Expired - Fee Related JP3265696B2 (en) 1992-11-25 1993-04-01 Image compression coding device

Country Status (1)

Country Link
JP (1) JP3265696B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5491936B2 (en) * 2010-03-31 2014-05-14 株式会社メガチップス Image processing device
JP5451487B2 (en) * 2010-03-31 2014-03-26 株式会社メガチップス Image encoding device
JP5635673B2 (en) * 2013-12-05 2014-12-03 株式会社メガチップス Image encoding device
CN107078852B (en) * 2017-01-18 2019-03-08 深圳市大疆创新科技有限公司 Transmit method, apparatus, computer system and the mobile device of coded data

Also Published As

Publication number Publication date
JPH06292180A (en) 1994-10-18

Similar Documents

Publication Publication Date Title
JP3115199B2 (en) Image compression coding device
US5543844A (en) Method and apparatus for coding image data
KR100756596B1 (en) Video data encoder and video data encoding method
US6587508B1 (en) Apparatus, method and computer program product for transcoding a coded moving picture sequence
EP0825782A2 (en) Video data compression apparatus and method
JPH0595536A (en) High efficiency coded signal processor
JPH0563994A (en) Image data compressing encoder and method therefor
JP2921358B2 (en) Image coding device
JP2003032677A (en) Video compression encoding device
US6865225B2 (en) Image signal quantizing device and its method
JPH10191343A (en) Device and method for compressing video data
JP2897563B2 (en) Image compression coding device
JP3265696B2 (en) Image compression coding device
JP3173369B2 (en) Image compression coding device
JP3681828B2 (en) Code amount control method and apparatus for image data
JP4171934B2 (en) Image processing apparatus and method, and recording medium
JPH07203430A (en) Image coding device
US7391916B2 (en) Quantization matrix adjusting method for quality improvement
JPH08340531A (en) Variable rate coder
EP0758513B1 (en) Device and method for coding video pictures
JP2629409B2 (en) Motion compensated prediction interframe coding device
US20050069215A1 (en) Image encoding apparatus and quantization control method
JP2874003B2 (en) High efficiency coding apparatus and coding method
JPH07212757A (en) Image compression coding device
JPH05300379A (en) Code quantity distribution circuit

Legal Events

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