JPH09107293A - Code amount control method and apparatus thereof - Google Patents
Code amount control method and apparatus thereofInfo
- Publication number
- JPH09107293A JPH09107293A JP26436795A JP26436795A JPH09107293A JP H09107293 A JPH09107293 A JP H09107293A JP 26436795 A JP26436795 A JP 26436795A JP 26436795 A JP26436795 A JP 26436795A JP H09107293 A JPH09107293 A JP H09107293A
- Authority
- JP
- Japan
- Prior art keywords
- code amount
- processing unit
- data
- quantization
- processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
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)
Abstract
(57)【要約】
【課題】 発生符号量の変動を抑え、再現される画像の
品質を常に維持する。
【解決手段】 符号量算出器201は、バッファメモリ
106の残量、及び処理単位毎の実際の発生符号量か
ら、次に符号化する処理単位の目標符号量を算出する。
QP予測器202は、予め複数用意されている量子化テ
ーブルの発生符号量特性から、符号量算出器201が算
出した処理単位の目標符号量が得られると予想するイン
デックス値QPを算出する。テーブル作成器203は、
QP予測器202から送られたインデックス値QPに対
応する量子化テーブルを作成する。この作成された量子
化テーブルは、メモリ204、QP予測器202を介し
て量子化器に送られる。量子化器は、符号量制御部10
7のQP予測器202から送られた量子化テーブルを用
いて、次の処理単位の符号化を行う。
(57) [Abstract] [PROBLEMS] To suppress variations in the amount of generated codes and always maintain the quality of reproduced images. A code amount calculator 201 calculates a target code amount of a processing unit to be encoded next from a remaining amount of a buffer memory 106 and an actual generated code amount of each processing unit.
The QP predictor 202 calculates an index value QP that is expected to obtain the target code amount of the processing unit calculated by the code amount calculator 201 from the generated code amount characteristics of a plurality of prepared quantization tables. The table creator 203
A quantization table corresponding to the index value QP sent from the QP predictor 202 is created. The created quantization table is sent to the quantizer via the memory 204 and the QP predictor 202. The quantizer has a code amount control unit 10
The next processing unit is encoded by using the quantization table sent from the QP predictor 202 of No. 7.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、データを圧縮した
後の圧縮(符号化)データ量を制御する技術に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique for controlling the amount of compressed (encoded) data after compressing the data.
【0002】[0002]
【従来の技術】近年、データ符号化(圧縮)技術は、デ
ータの通信、蓄積(記憶)などにおいて既に広く採用さ
れており、また、国際的にも標準化が進められている。
特に画像データは、そのデータ量が大きいことから、圧
縮(符号化)の対象として重要視されている。2. Description of the Related Art In recent years, data coding (compression) technology has already been widely adopted in data communication, storage (storage), etc., and is being standardized internationally.
In particular, image data is regarded as an important object for compression (encoding) because of its large data amount.
【0003】データの符号化方式としては、高い圧縮率
を実現できるDCT(Discrete Cosine Transform )方
式が広く採用されている。このDCT方式では、画像デ
ータを予め定められたブロックサイズに分割して、それ
ぞれのブロック毎にDCTを行い、DCT係数に変換さ
れたブロック内の各要素を、量子化テーブルを用いて量
子化し、量子化したDCT係数にエントロピー符号化を
施すことにより、画像データの圧縮を行うことを基本と
している。As a data coding method, a DCT (Discrete Cosine Transform) method which can realize a high compression rate is widely adopted. In this DCT method, image data is divided into a predetermined block size, DCT is performed for each block, each element in the block converted into a DCT coefficient is quantized using a quantization table, Basically, image data is compressed by performing entropy coding on the quantized DCT coefficient.
【0004】DCT方式による画像圧縮では、画像の空
間周波数の高域成分の割合といった特性の違いにより、
圧縮後のデータ量(発生符号量)は変動する。データの
圧縮においては、高い圧縮率を実現するだけでなく、圧
縮後のデータ量の制御を行わなければならない場合が多
く発生する。これは、画像の伝送を予め定められている
規格に合わせるといったソフト的な理由の他に、例え
ば、データ圧縮装置に一般的に備えられている、データ
を伝送路に安定的に送出するために符号化データを一時
格納するバッファメモリの記憶容量といったハード面で
の理由もある。In the image compression by the DCT method, due to the difference in characteristics such as the ratio of high frequency components of the spatial frequency of the image,
The amount of data (the amount of generated code) after compression varies. In data compression, there are many cases where not only a high compression rate must be realized, but also the amount of data after compression must be controlled. This is because, in addition to the software reason that the image transmission conforms to a predetermined standard, for example, in order to stably send the data to the transmission path, which is generally provided in the data compression device. There is also a hardware reason such as a storage capacity of a buffer memory for temporarily storing encoded data.
【0005】例えば1画像(フレーム)分の符号化デー
タがバッファメモリ全体の記憶容量(以降、この全体の
記憶容量をフルバッファと記す)を超えたような場合、
画像データの圧縮を一時ストップさせなければならなく
なり、画像データの伝送等が適正に行えなくなる。1画
像分の符号化データをバッファメモリに格納できた場合
であっても、規格によっては、例えば、その符号化デー
タ量(発生符号量)が伝送ビットレート、画像の転送レ
ート等から見て少なければ、伝送する符号化データにダ
ミーデータ(フィルビット)を付加しなければならな
い。復号側(受信側)において再現される画像の品質の
劣化を抑えるためには、発生符号量を必要以上に抑える
ことは望ましくない。このようなことから、ハード面に
おける制約を考慮した発生符号量の制御も行われてい
る。For example, when the encoded data for one image (frame) exceeds the storage capacity of the entire buffer memory (hereinafter, this total storage capacity is referred to as a full buffer),
It becomes necessary to temporarily stop the compression of the image data, and the image data cannot be properly transmitted. Even if the encoded data for one image can be stored in the buffer memory, depending on the standard, for example, the encoded data amount (generated code amount) may be small in view of the transmission bit rate, the image transfer rate, and the like. For example, dummy data (fill bit) must be added to the encoded data to be transmitted. In order to suppress the deterioration of the quality of the image reproduced on the decoding side (reception side), it is not desirable to suppress the generated code amount more than necessary. For this reason, the generated code amount is also controlled in consideration of the restrictions on the hardware.
【0006】図7は、バッファメモリの記憶容量に応じ
て行う発生符号量の制御方法の概念図である。この図7
は、符号化データがバッファメモリ701に一旦格納さ
れた後、伝送路に送出されていく様子を表している。FIG. 7 is a conceptual diagram of a method of controlling the amount of generated codes which is performed according to the storage capacity of the buffer memory. This FIG.
Indicates that the encoded data is temporarily stored in the buffer memory 701 and then transmitted to the transmission path.
【0007】バッファメモリの記憶容量の制約により行
われる発生符号量の制御は、例えばバッファメモリ70
1の記憶容量を32等分し、バッファメモリ701の全
体の記憶容量と現在の占有量(使用している記憶容量)
から使用可能な記憶容量(残量)を算出し、次の画像デ
ータを圧縮した際に生成される符号化データを全てバッ
ファメモリ701に格納できるように、DCT係数の量
子化に用いる量子化テーブルを変更することで行われて
いた。The control of the generated code amount, which is performed by the restriction of the storage capacity of the buffer memory, is performed by, for example, the buffer memory
The storage capacity of 1 is divided into 32 equal parts, and the total storage capacity of the buffer memory 701 and the current occupancy (the used storage capacity)
Quantization table used for quantization of DCT coefficients so that the usable storage capacity (remaining amount) is calculated from, and all encoded data generated when the next image data is compressed can be stored in the buffer memory 701. Was done by changing.
【0008】量子化テーブルの変更によって発生符号量
の制御が行えるのは、以下の理由による。DCT係数の
符号化方式としてハフマン符号化方式が採用されていた
場合、DCT係数は零係数(無効係数)のランとそれに
続く非零係数の値(レベル)を組み合わせた事象が符号
化される。このため、零係数のランレングスを長くさせ
ることで、発生符号量は低くなる。The reason why the generated code amount can be controlled by changing the quantization table is as follows. When the Huffman coding method is adopted as the coding method of the DCT coefficient, the DCT coefficient is coded as an event in which a run of zero coefficients (ineffective coefficient) and a value (level) of the following non-zero coefficient are combined. Therefore, by increasing the run length of the zero coefficient, the generated code amount becomes low.
【0009】DCT方式におけるDCT係数の量子化
は、DCTを行ったブロックサイズに対応させて用意さ
れている量子化テーブルを用いて行われる。この量子化
テーブルにより、各DCT係数はそのブロック内の位置
に割り当てられたステップサイズで線形量子化される。
このステップサイズを大きくする程、同じ値に量子化さ
れるDCT係数が増えるとともに、DC係数と一致する
AC係数、即ち零係数も多くなる。このため、量子化テ
ーブル(ステップサイズ)を変更することにより発生符
号量の制御を行うことができる。Quantization of DCT coefficients in the DCT method is performed using a quantization table prepared corresponding to the block size for which DCT has been performed. With this quantization table, each DCT coefficient is linearly quantized with the step size assigned to the position in the block.
As the step size increases, the number of DCT coefficients quantized to the same value increases, and the number of AC coefficients that match the DC coefficient, that is, zero coefficient also increases. Therefore, the amount of generated code can be controlled by changing the quantization table (step size).
【0010】図8は、画像データの階層構造を示す図で
ある。動画等の圧縮では、画像データはフレーム、GO
B(Group Of Block)、マクロブロック、ブロックのよ
うな階層で区分される。図8における各枠は、それぞれ
GOBを表しており、1フレームの画像データが5つの
GOBで構成されていることを示している。FIG. 8 is a diagram showing a hierarchical structure of image data. In compression of moving images, image data is frame, GO
It is divided into layers such as B (Group Of Block), macroblock, and block. Each frame in FIG. 8 represents a GOB, indicating that one frame of image data is composed of five GOBs.
【0011】画像データを図8のような階層構造とした
場合には、各GOB毎に異なる量子化テーブルを使用す
ることが可能である。この場合、各GOB毎に、それの
圧縮を行う時点でのバッファメモリの残量から、DCT
係数の量子化に使用する量子化テーブルを決定してい
た。When the image data has a hierarchical structure as shown in FIG. 8, it is possible to use different quantization tables for each GOB. In this case, for each GOB, the DCT is calculated from the remaining amount of the buffer memory at the time of compression.
The quantization table used to quantize the coefficients was determined.
【0012】[0012]
【発明が解決しようとする課題】上述したように、バッ
ファメモリの記憶容量の制約から発生符号量の制御が行
われている。この従来の制御においては、バッファメモ
リの残量が大きい場合には目標符号量を大きく、また、
残量が小さい場合には目標符号量を小さくするように、
バッファメモリの残量に応じて画像データ(フレーム)
毎、或いはGOB毎にその目標符号量を決定していた。
当然のことではあるが、発生符号量の若干の変動は避け
られない。従来の制御では、例えば隣り合う画像データ
間の発生符号量にある程度の差が発生すると、バッファ
メモリの残量に応じて目標符号量を決定していることか
ら、画像データ(フレーム)毎に発生符号量の増減を繰
り返すようなことも多く発生しており、発生符号量の変
動を収束させるのに長い時間を要するという問題点があ
った。また、発生符号量の変動状態によっては、発生符
号量に更に大きな変動を生じさせてしまうという問題点
もあった。このように、従来の制御には、発生符号量を
安定させ難いという問題点があった。この問題点によ
り、特に動きが速い動画といった発生符号量が大きく異
なるような画像に対しては、発生符号量の制御を行うこ
とは実質的に不可能となっていた。As described above, the generated code amount is controlled due to the restriction of the storage capacity of the buffer memory. In this conventional control, when the remaining amount of the buffer memory is large, the target code amount is large, and
If the remaining amount is small, reduce the target code amount,
Image data (frame) according to the remaining amount of buffer memory
The target code amount is determined for each GOB.
As a matter of course, a slight variation in the generated code amount cannot be avoided. In the conventional control, for example, when a certain amount of difference occurs in the generated code amount between adjacent image data, the target code amount is determined according to the remaining amount of the buffer memory. Therefore, it is generated for each image data (frame). There are many cases in which the code amount is repeatedly increased and decreased, and it takes a long time to converge the fluctuation of the generated code amount. There is also a problem that the generated code amount may be further changed depending on the changed state of the generated code amount. As described above, the conventional control has a problem that it is difficult to stabilize the generated code amount. Due to this problem, it is practically impossible to control the generated code amount for an image in which the generated code amount is greatly different, such as a moving image that moves rapidly.
【0013】上述したように、再現される画像の品質
は、発生符号量に大きく依存する。固定の転送レートで
画像を転送する場合、発生符号量が大きく変動すると、
再現される連続する画像全体の品質を大きく低下させた
り、画像品質を改善するのに要する時間が長くなったり
する。転送レートを固定させていない場合には、画像の
更新間隔が発生符号量に応じて変動し、例えば動きの速
いところで画像の更新間隔が長くなったりするので、大
きな違和感を人に与える画像となる。これらのことか
ら、発生符号量の変動を抑えられるようにすることが望
まれていた。As described above, the quality of the reproduced image largely depends on the generated code amount. When transferring images at a fixed transfer rate, if the generated code amount fluctuates greatly,
The quality of the entire reproduced continuous image is greatly deteriorated, and the time required to improve the image quality is increased. If the transfer rate is not fixed, the image update interval varies according to the generated code amount, and for example, the image update interval becomes longer in a fast moving state, resulting in an image that gives a great discomfort to people. . For these reasons, it has been desired to suppress the fluctuation of the generated code amount.
【0014】本発明の課題は、発生符号量の変動を抑
え、再現される画像の品質を常に維持することにある。An object of the present invention is to suppress fluctuations in the generated code amount and always maintain the quality of reproduced images.
【0015】[0015]
【課題を解決するための手段】本発明の第1の態様の符
号量制御方法は、指定した量子化ステップサイズを用い
て圧縮処理されるデータの符号量が、予め設定した目標
符号量となるように制御するための方法であって、デー
タを予め定めた処理単位で複数に分割し、処理単位毎
に、目標符号量、及び符号化が終了した他の処理単位の
符号量に基づいて量子化ステップサイズを決定し、決定
した量子化ステップサイズを用いて、処理単位毎に圧縮
処理を行わせる。In the code amount control method according to the first aspect of the present invention, the code amount of data compressed by using a specified quantization step size becomes a preset target code amount. The method is to divide the data into a plurality of predetermined processing units, and for each processing unit, quantize based on the target code amount and the code amount of another processing unit for which encoding has been completed. The quantization step size is determined, and compression processing is performed for each processing unit using the determined quantization step size.
【0016】第2の態様の符号量制御方法は、予め複数
用意されている量子化テーブルのなかから一つを選択
し、該選択した量子化テーブルを用いて圧縮処理される
データの符号量が、圧縮処理後の符号化データが一時記
憶される記憶手段の記憶容量に基づいて予め設定した目
標符号量となるように制御するための方法であって、デ
ータを予め定めた処理単位で複数に分割し、処理単位毎
に、目標符号量、及び圧縮処理が終了した他の処理単位
の符号量に基づいて、複数用意されている量子化テーブ
ルのなかから一つを選択し、選択した量子化テーブルを
用いて、処理単位毎に圧縮処理を行わせる。In the code amount control method of the second aspect, one is selected from a plurality of quantization tables prepared in advance, and the code amount of the data compressed by using the selected quantization table is determined. A method for controlling the coded data after the compression process to have a target code amount set in advance based on the storage capacity of a storage unit in which the data is temporarily stored, and the data is divided into a plurality of units in a predetermined processing unit. Based on the target code amount for each processing unit and the code amount of another processing unit for which compression processing has been completed, one is selected from a plurality of prepared quantization tables, and the selected quantization is performed. The table is used to perform compression processing for each processing unit.
【0017】本発明の符号量制御装置は、予め複数用意
されている量子化テーブルのなかから一つを選択してデ
ータの圧縮処理を行い、圧縮処理後の符号化データを一
時記憶させる記憶手段を備えたデータ圧縮装置に適用さ
れることを前提とし、圧縮処理されるデータの符号量
が、記憶手段の記憶容量に基づいて予め設定した目標符
号量となるように制御するために、データを予め定めた
処理単位で複数に分割する分割手段と、処理単位毎に、
目標符号量、及び符号化が終了した他の処理単位の符号
量に基づいて、複数用意されている量子化テーブルのな
かから一つを選択し、該選択した量子化テーブルを用い
て、処理単位毎に圧縮処理を行わせる制御手段と、を具
備する。The code amount control device of the present invention selects one from a plurality of quantization tables prepared in advance, compresses the data, and temporarily stores the coded data after the compression process. In order to control the code amount of the data to be compressed to be a target code amount set in advance based on the storage capacity of the storage means, it is assumed that the data will be applied to a data compression device including A dividing unit that divides a plurality of predetermined processing units, and each processing unit,
Based on the target code amount and the code amount of another processing unit for which encoding has been completed, one is selected from a plurality of prepared quantization tables, and the processing unit is selected using the selected quantization table. And a control means for performing compression processing for each.
【0018】上記したように、データを複数の処理単位
に分割し、圧縮処理が終了した処理単位の実際の発生符
号量を考慮して、圧縮処理が済んでいない処理単位に用
いる量子化ステップサイズ(量子化テーブル)を決定し
ていくことで、圧縮処理が済んでいない処理単位の発生
符号量を調節し、圧縮処理が終了した処理単位における
処理単位毎の目標符号量と実際の発生符号量との誤差を
吸収させることが可能となる。この結果、データ全体で
の実際の発生符号量の高精度な制御が可能となり、デー
タ全体における実際の発生符号量と目標符号量との間の
誤差を常に小さな範囲内に収めることが可能となる。As described above, the data is divided into a plurality of processing units, and in consideration of the actual generated code amount of the processing unit after the compression processing, the quantization step size used for the processing unit that has not been compressed. By determining the (quantization table), the generated code amount of the processing unit that has not been compressed is adjusted, and the target code amount and the actual generated code amount of each processing unit in the processing unit that has completed the compression process. It is possible to absorb the error between and. As a result, it is possible to control the actual amount of generated code in the entire data with high precision, and it is possible to always keep the error between the actual amount of generated code and the target code amount in the entire data within a small range. .
【0019】[0019]
【発明の実施の形態】以下、本発明の実施の形態につい
て、図面を参照しながら詳細に説明する。図1は、本実
施の形態が適用されたデータ圧縮装置100の構成を示
すブロック図である。同図を参照して、その構成、及び
動作を説明する。BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a data compression device 100 to which this embodiment is applied. The configuration and operation will be described with reference to FIG.
【0020】データ圧縮装置100には、特には図示し
ない画像入力装置が接続されており、該画像入力装置か
ら画像データが送られる。この画像入力装置から送られ
た画像データ(入力画像データ)は、減算器101、及
びスイッチ部102に入力される。なお、画像入力装置
から送られる入力画像データの色成分により、各部の動
作は多少異なるが、ここでは説明を簡単にするため、色
成分は一つ(モノクロ画像)と想定して説明を行うこと
にする。An image input device (not shown) is connected to the data compression device 100, and image data is sent from the image input device. The image data (input image data) sent from the image input device is input to the subtractor 101 and the switch unit 102. Note that the operation of each unit is slightly different depending on the color component of the input image data sent from the image input device, but here, for the sake of simplicity of description, it is assumed that there is one color component (monochrome image). To
【0021】減算器101は、上記入力画像データと、
予測器111から出力された、動き補償を施した前フレ
ームの画像データとの差分値(予測誤差)を算出し、算
出した差分値(予測誤差)をスイッチ部102に出力す
る。スイッチ部102は、符号量制御部107からの制
御信号により、入力画像データ、減算器101出力の一
方を選択して変換器103に出力する。符号量制御部1
07は、シーンチェンジが発生した場合、リフレッシュ
を行う場合にのみ、スイッチ部102に入力画像データ
を選択させる(フレーム内モード)。The subtractor 101 receives the input image data and
The difference value (prediction error) from the motion-compensated previous frame image data output from the predictor 111 is calculated, and the calculated difference value (prediction error) is output to the switch unit 102. The switch unit 102 selects one of the input image data and the output of the subtractor 101 according to the control signal from the code amount control unit 107, and outputs it to the converter 103. Code amount control unit 1
07 causes the switch unit 102 to select the input image data only when a scene change occurs and refresh is performed (intra-frame mode).
【0022】変換器103は、スイッチ部102を介し
て入力した入力画像データ、或いは予測誤差を、例えば
8×8画素のブロックに分割してDCT演算を行い、D
CT係数に変換する。このDCT係数は、量子化器10
4に出力される。The converter 103 divides the input image data or the prediction error input through the switch unit 102 into blocks of, for example, 8 × 8 pixels, performs DCT calculation, and D
Convert to CT coefficient. This DCT coefficient is the quantizer 10
4 is output.
【0023】量子化器104は、符号量制御部107か
ら入力した量子化テーブルを用いて、変換器103から
入力したDCT係数を量子化する。また、このDCT係
数の量子化を行った後、DCT係数をDC成分とAC成
分とにグループ分けして、ハフマン符号化を行う。この
ハフマン符号化は、例えば予め用意したハフマン符号化
テーブルを用いて行われる。ハフマン符号化が施された
DCT係数は、符号化(圧縮)データとして多重化器1
05、及び逆量子化器108に出力される。なお、ハフ
マン符号化の換わりとして、例えば算術符号化を用いて
もよい。The quantizer 104 quantizes the DCT coefficient input from the converter 103 using the quantization table input from the code amount control unit 107. After the DCT coefficient is quantized, the DCT coefficient is divided into a DC component and an AC component, and Huffman coding is performed. This Huffman coding is performed using, for example, a Huffman coding table prepared in advance. The Huffman-encoded DCT coefficient is encoded (compressed) data by the multiplexer 1.
05 and the inverse quantizer 108. As an alternative to Huffman coding, for example, arithmetic coding may be used.
【0024】多重化器105には、量子化器104が出
力した符号化データの他に、符号量制御部107からフ
レーム内モードでの符号化であるか否かを示すフレーム
間/フレーム内の識別フラグf1、符号化データの伝送
タイミングを示す伝送/非伝送識別フラグf2、及びD
CT係数の量子化に使用した量子化テーブルのインデッ
クス値QP、予測器111からは動きベクトル量mvが
出力される。多重化器105は、これら各部から入力し
たデータを、予め定められた形式に並べて、バッファメ
モリ106に出力する。以降、多重化器105からバッ
ファメモリ106に出力されたデータを他と区別するた
めに発生符号と呼ぶことにする。In the multiplexer 105, in addition to the encoded data output from the quantizer 104, an interframe / intraframe indicating whether or not the encoding is performed in the intraframe mode by the code amount control unit 107. Identification flag f1, transmission / non-transmission identification flag f2 indicating the transmission timing of encoded data, and D
The index value QP of the quantization table used for the quantization of the CT coefficient and the motion vector amount mv are output from the predictor 111. The multiplexer 105 arranges the data input from each of these units in a predetermined format and outputs the data to the buffer memory 106. Hereinafter, the data output from the multiplexer 105 to the buffer memory 106 will be referred to as a generated code to distinguish it from other data.
【0025】バッファメモリ106は、多重化器105
から出力された発生符号を一時格納する。バッファメモ
リ106に一旦格納された発生符号は、その後、順次伝
送路に出力される。The buffer memory 106 is a multiplexer 105.
The generated code output from is temporarily stored. The generated code once stored in the buffer memory 106 is then sequentially output to the transmission path.
【0026】符号量制御部107は、バッファメモリ1
06の残量、及び多重化器105からバッファメモリ1
06に出力された発生符号に基づき、後述するようにし
て、量子化器104が使用する量子化テーブルを決定
し、この決定に従って作成した量子化テーブルを量子化
器104に出力する。また、データ圧縮装置100の全
体的な制御も行う。The code amount control unit 107 includes a buffer memory 1
06, and the buffer memory 1 from the multiplexer 105
Based on the generated code output to 06, the quantization table used by the quantizer 104 is determined as described later, and the quantization table created according to this determination is output to the quantizer 104. It also controls the data compression apparatus 100 as a whole.
【0027】逆量子化器108は、量子化器104が有
するハフマン符号化テーブルと同じテーブルを有し、量
子化器104が出力した符号化データを、そのハフマン
符号化テーブルからDCT係数に復元する。その後、そ
れら復元したDCT係数の量子化に使用された量子化テ
ーブルを用いて、それら量子化前の値を算出する。この
とき算出されたDCT係数の値には、量子化時の誤差が
含まれる。The inverse quantizer 108 has the same table as the Huffman coding table of the quantizer 104, and restores the coded data output by the quantizer 104 from the Huffman coding table to DCT coefficients. . After that, the values before quantization are calculated using the quantization table used for quantization of the restored DCT coefficients. The value of the DCT coefficient calculated at this time includes an error at the time of quantization.
【0028】逆変換器109は、逆量子化器108から
入力したDCT係数に対して逆DCT演算を行い、各D
CT係数の変換前の画素データ(予測誤差)を算出す
る。このとき算出された画素データ(予測誤差)の値
が、符号化データを受信する受信(復号)側で復元され
ると予想される値である。The inverse transformer 109 performs an inverse DCT operation on the DCT coefficient input from the inverse quantizer 108 to obtain each D
Pixel data (prediction error) before conversion of CT coefficients is calculated. The value of the pixel data (prediction error) calculated at this time is a value expected to be restored on the receiving (decoding) side that receives the encoded data.
【0029】加算器110は、この逆変換器109から
出力された画素データ(予測誤差)を、スイッチ部11
2からの出力と加算し、その加算した値を予測器111
に出力する。The adder 110 converts the pixel data (prediction error) output from the inverse converter 109 into the switch unit 11
The output from 2 is added, and the added value is calculated by the predictor 111.
Output to
【0030】予測器111は、前フレームの画像データ
を格納しており、フレーム間モード時において、この画
像データに対して動き補償を行い、動き補償を施した後
の画像データを減算器101、及びスイッチ部112に
出力する。逆変換器110から加算器110に出力され
ている予測誤差は、予測器111が減算器101に出力
している動き補償を施した画像データと入力画像データ
の間の予測誤差(差分値)である。加算器110は、前
フレームの動き補償を施した画像データと、その画像デ
ータと入力画像データの予測誤差とを加算することで、
現フレームの画像データを出力する。The predictor 111 stores the image data of the previous frame, performs motion compensation on this image data in the inter-frame mode, and subtracts the image data after the motion compensation, And to the switch unit 112. The prediction error output from the inverse converter 110 to the adder 110 is a prediction error (difference value) between the image data subjected to motion compensation output to the subtractor 101 by the predictor 111 and the input image data. is there. The adder 110 adds the motion-compensated image data of the previous frame and the prediction error of the image data and the input image data,
Outputs the image data of the current frame.
【0031】予測器111は、上記動き補償を、例えば
マクロブロック毎に±15画素の範囲でそれを順次移動
させ、その移動させた範囲内で最も誤差の累算値が小さ
い位置を検出することで行う。元の位置からその検出し
た誤差の累算値が最小となる位置へのベクトルが動きベ
クトル量mvである。この動きベクトル量mvは、予測
器111から多重化器105に出力される。The predictor 111 sequentially moves the motion compensation within a range of ± 15 pixels for each macroblock, and detects a position having the smallest accumulated error value within the moved range. Done in. The vector from the original position to the position where the accumulated value of the detected errors is the minimum is the motion vector amount mv. This motion vector amount mv is output from the predictor 111 to the multiplexer 105.
【0032】図2は、符号量制御部107のブロック図
である。図2に示すように、多重化器105から入力し
た発生符号、及びバッファメモリ106の残量から、予
め定められている処理単位毎の目標発生符号量を算出す
る符号量算出器201と、この符号量算出器201が算
出した目標発生符号量を実現する量子化テーブルのイン
デックス値QPを予測するQP予測器202と、このQ
P予測器202が予測したインデックス値QPに対応す
る量子化テーブルを作成するテーブル作成器203と、
このテーブル作成器203が作成した量子化テーブルを
格納するメモリ204とを備えて構成されている。FIG. 2 is a block diagram of the code amount control unit 107. As shown in FIG. 2, a code amount calculator 201 that calculates a target generated code amount for each predetermined processing unit from the generated code input from the multiplexer 105 and the remaining amount of the buffer memory 106; A QP predictor 202 that predicts an index value QP of a quantization table that realizes the target generated code amount calculated by the code amount calculator 201;
A table creator 203 for creating a quantization table corresponding to the index value QP predicted by the P predictor 202;
The memory 204 stores a quantization table created by the table creator 203.
【0033】上記構成の符号制御部107の動作につい
て、図3〜図5を参照して説明する。図3は、画像デー
タを処理単位で分割した様子を示す説明図である。図3
において、各枠はそれぞれ処理単位を表しており、各処
理単位は上方から下方に向かって、画像(画面)の左側
の数字が示す順序で符号化される。The operation of the code control unit 107 having the above configuration will be described with reference to FIGS. FIG. 3 is an explanatory diagram showing how image data is divided in processing units. FIG.
In, each frame represents a processing unit, and each processing unit is encoded from the upper side to the lower side in the order indicated by the numbers on the left side of the image (screen).
【0034】図3に示すように、本実施の形態では、1
フレームの画像データを、それぞれ面積が等しい第1〜
第6処理単位の6つに分割している。本実施の形態にお
ける各処理単位は、それぞれ1つのGOBに対応してい
る。なお、処理単位の設定はこれに限定するものではな
い。複数のGOBで1つの処理単位を構成させても良
く、画像の背景部分等を考慮して任意の形状、大きさの
処理単位を設定しても良い。As shown in FIG. 3, in the present embodiment, 1
The image data of the frame is divided into areas 1 to 1 having the same area.
It is divided into six sixth processing units. Each processing unit in this embodiment corresponds to one GOB. The setting of the processing unit is not limited to this. A plurality of GOBs may constitute one processing unit, or a processing unit having an arbitrary shape and size may be set in consideration of the background portion of the image.
【0035】図4は、量子化テーブルのインデックス値
QPと発生符号量の関係(以降、これを発生符号量特性
と記す)を示す説明図である。本実施の形態では、サン
プルの画像データを処理単位(GOB)に分割して、あ
るインデックス値QPの量子化テーブルを用いてその符
号化を行い、そのときのインデックス値QP、発生符号
量を基にして各インデックス値QPの量子化テーブルを
決定している。FIG. 4 is an explanatory diagram showing the relationship between the index value QP of the quantization table and the generated code amount (hereinafter, this will be referred to as the generated code amount characteristic). In the present embodiment, the sample image data is divided into processing units (GOB), the encoding is performed using a quantization table of a certain index value QP, and the index value QP and the generated code amount at that time are used as the basis. Then, the quantization table for each index value QP is determined.
【0036】具体的には、例えば上記基となるインデッ
クス値QPの値をi、そのときの発生符号量をcode
(ビット)、インデックス値QPは1≦QP≦M(Mは
最大値(用意した量子化テーブル数))とすると、イン
デックス値QPがi≦QP≦Mのときには、TblQP=
TblQP-1/2(Tblは発生符号量、添字はインデッ
クス値)の関係を満たすように、インデックス値QPが
1≦QP≦iのときには、TblQP=TblQP-1×2の
関係を満たすように、量子化テーブルの各要素のステッ
プサイズを変更し、サンプルの画像データに対する符号
化を実際に繰り返すことで決定する。Specifically, for example, the value of the index value QP which is the base is i, and the generated code amount at that time is code.
(Bit), the index value QP is 1 ≦ QP ≦ M (M is the maximum value (the number of prepared quantization tables)), and when the index value QP is i ≦ QP ≦ M, Tbl QP =
When the index value QP is 1 ≦ QP ≦ i, the relationship of Tbl QP = Tbl QP-1 × 2 is satisfied so that the relationship of Tbl QP-1 / 2 (Tbl is the generated code amount, the subscript is an index value) is satisfied. As described above, the step size of each element of the quantization table is changed, and the coding is performed by actually repeating the coding of the sample image data.
【0037】このようにして決定した各インデックス値
QPの量子化テーブルは、それを作成するための作成情
報がテーブル作成器203に格納される。テーブル作成
器203は、この作成情報に基づき、QP予測器202
が指定したインデックス値QPの量子化テーブルを作成
する。他方のQP予測器202は、図4に示す発生符号
量特性を参照して、符号量算出器201から送られた処
理単位毎の目標符号量に対応するインデックス値QPを
算出する。In the quantization table of each index value QP determined in this way, creation information for creating it is stored in the table creator 203. The table creator 203 uses the created information to generate the QP predictor 202.
Creates a quantization table for the index value QP specified by. The other QP predictor 202 calculates the index value QP corresponding to the target code amount for each processing unit sent from the code amount calculator 201 with reference to the generated code amount characteristic shown in FIG.
【0038】このとき、例えば符号量算出器201から
処理単位の目標符号量として250ビットが送られた場
合、QP予測器202は、図4の発生符号量特性から、
インデックス値QPとして15を算出する。At this time, for example, when 250 bits are sent from the code amount calculator 201 as the target code amount of the processing unit, the QP predictor 202 determines from the generated code amount characteristics of FIG.
15 is calculated as the index value QP.
【0039】図5は、バッファメモリ106のバッファ
占有量の時間変化例を示す説明図である。図5におい
て、t-1、t0 、t1 はそれぞれ画像データの符号化を
行った時刻である。d-1、d0 は画像データの符号化を
行った時刻の間隔であり、これはフレーム間隔に一致す
る。図5は、各時刻で多重化器105が出力した1フレ
ーム分の符号化データ(ここでは動きベクトル量mv等
のサイド情報を含む)を格納し、格納した符号化データ
を伝送路の伝送ビットレートで順次出力するバッファメ
モリ106の占有量が推移する様子を表している。な
お、理想残量は、アンダーフローを防止するために理想
とする残量のことである。FIG. 5 is an explanatory diagram showing an example of a temporal change in the buffer occupation amount of the buffer memory 106. In FIG. 5, t -1 , t 0 , and t 1 are the times when the image data was encoded. d -1 and d 0 are time intervals at which the image data is coded, which coincides with the frame intervals. FIG. 5 shows that one frame of encoded data (including side information such as the motion vector amount mv in this case) output from the multiplexer 105 at each time is stored, and the stored encoded data is stored in the transmission bit of the transmission path. It shows how the occupancy of the buffer memory 106 that sequentially outputs at a rate changes. The ideal remaining amount is an ideal remaining amount to prevent underflow.
【0040】本実施の形態では、画像の転送レート(単
位時間当たりのフレーム数)、即ちフレーム間隔を可変
させて画像の転送を行っている。伝送路の伝送ビットレ
ートは固定であり、フレーム間隔は発生符号量に応じて
拡がる。入力画像データをそのままDCT演算するフレ
ーム内モードにおいては、発生符号量が大きくなるた
め、フレーム間隔は他のフレーム間隔と比較して広くな
る。本実施の形態では、転送レートをできるだけ低下さ
せず、且つバッファメモリ106をオーバーフローさせ
ないように、フレーム間隔を決定する。1フレーム分の
目標符号量は、フレーム間隔の決定に伴って決定する。
このときに決定(算出)される目標符号量は、その決定
されたフレーム間隔で1フレーム分の発生符号の伝送が
全て完了する値である。In the present embodiment, the image transfer is performed by changing the image transfer rate (the number of frames per unit time), that is, the frame interval. The transmission bit rate of the transmission line is fixed, and the frame interval expands according to the generated code amount. In the intra-frame mode in which the DCT calculation is performed on the input image data as it is, the generated code amount is large, and thus the frame interval is wider than other frame intervals. In the present embodiment, the frame interval is determined so that the transfer rate is not lowered as much as possible and the buffer memory 106 is not overflowed. The target code amount for one frame is determined along with the determination of the frame interval.
The target code amount determined (calculated) at this time is a value at which transmission of the generated code for one frame is completely completed at the determined frame interval.
【0041】符号量算出器201は、フレーム毎の発生
符号量、及びバッファメモリ106の占有量を監視し、
それらの監視結果を基に、次フレームのフレーム間隔、
及び目標符号量を算出する。図5の例においては、時刻
t0 とt1 の間のフレーム間隔d0 とともに、目標符号
量C0 を決定する。The code amount calculator 201 monitors the generated code amount for each frame and the occupied amount of the buffer memory 106,
Based on those monitoring results, the frame interval of the next frame,
And the target code amount is calculated. In the example of FIG. 5, the target code amount C 0 is determined together with the frame interval d 0 between times t 0 and t 1 .
【0042】本実施の形態では、図3に示すように、1
フレームを6つの処理単位に分割して符号化を行ってい
る。符号量算出器201は、上記目標符号量C0 を算出
した後、この目標符号量C0 、符号化が終了した各処理
単位の発生符号量に基づき、次に符号化する処理単位の
目標符号量を算出し、それをQP予測器202に出力す
る。In the present embodiment, as shown in FIG.
The frame is divided into six processing units for encoding. After calculating the target code amount C 0 , the code amount calculator 201 calculates the target code amount C 0 , and then based on the target code amount C 0 and the generated code amount of each processing unit for which encoding has been completed, the target code of the next processing unit to be encoded. The quantity is calculated and output to the QP predictor 202.
【0043】QP予測器202は、符号量算出器201
から処理単位毎の目標符号量を入力すると、図4に示す
発生符号量特性を参照して、その目標符号量が得られる
と予想されるインデックス値QPを算出する。この算出
したインデックス値QPはテーブル作成器203に送ら
れ、テーブル作成器203がその値QPに対応する量子
化テーブルを作成する。テーブル作成器203が作成し
た量子化テーブルは、メモリ204、QP予測器202
を介して量子化器104に出力される。これにより、次
に符号化される処理単位は、テーブル作成器203が作
成した量子化テーブルを用いて、DCT演算後のDCT
係数が量子化される。The QP predictor 202 is a code amount calculator 201.
When the target code amount for each processing unit is input from, the index value QP expected to obtain the target code amount is calculated with reference to the generated code amount characteristic shown in FIG. The calculated index value QP is sent to the table creator 203, and the table creator 203 creates a quantization table corresponding to the value QP. The quantization table created by the table creator 203 is stored in the memory 204 and the QP predictor 202.
Is output to the quantizer 104 via. As a result, the processing unit to be encoded next is the DCT after the DCT operation using the quantization table created by the table creator 203.
The coefficients are quantized.
【0044】図6は、上記符号量制御部107が実行す
る圧縮処理の動作フローチャートである。この図6は、
1フレームの画像データの符号化において、その発生符
号量を制御するための図2に示す符号量制御部107の
動作をフロー化して表現したものである。図6を参照し
て、その圧縮処理の一連の処理動作について詳細に説明
する。FIG. 6 is an operation flowchart of the compression process executed by the code amount control unit 107. This FIG.
3 is a flow representation of the operation of the code amount control unit 107 shown in FIG. 2 for controlling the generated code amount in encoding one frame of image data. A series of processing operations of the compression processing will be described in detail with reference to FIG.
【0045】先ず、ステップ601では、次に符号化さ
れるフレーム全体での目標符号量を決定する。この目標
符号量の決定は、上述したように、画像の転送レート、
伝送路の伝送ビットレート、バッファメモリ106の占
有量(残量)を基にして、符号量算出器201が決定す
る。例えば、現在の時刻が図5における時刻t0 と想定
すると、目標符号量としてC0 を決定する。First, in step 601, a target code amount for the entire frame to be encoded next is determined. This target code amount is determined by the image transfer rate, as described above.
The code amount calculator 201 determines based on the transmission bit rate of the transmission path and the occupied amount (remaining amount) of the buffer memory 106. For example, assuming that the current time is time t 0 in FIG. 5, C 0 is determined as the target code amount.
【0046】フレーム全体での目標符号量を決定する
と、次にステップ602において、その目標符号量に対
応するインデックス値QPを求める処理を行う。この処
理は、符号量算出器201が、ステップ601で決定し
た目標符号量を6等分(本実施の形態では、1フレーム
を6処理単位に分割)してその値をQP予測器202に
出力し、QP予測器202に、その値に対応するインデ
ックス値QPを算出させることで実現する。QP予測器
202は、図4に示す発生符号量特性を参照して、符号
量算出器201から送られた値に対応するインデックス
値を算出する。このとき、符号量算出器201から送ら
れた値がAであれば、その値Aに対応するインデックス
値QPが算出されることになる(図4参照)。When the target code amount for the entire frame is determined, next, at step 602, a process for obtaining the index value QP corresponding to the target code amount is performed. In this process, the code amount calculator 201 divides the target code amount determined in step 601 into six equal parts (in this embodiment, one frame is divided into six processing units) and outputs the value to the QP predictor 202. Then, it is realized by causing the QP predictor 202 to calculate the index value QP corresponding to the value. The QP predictor 202 calculates the index value corresponding to the value sent from the code amount calculator 201 with reference to the generated code amount characteristic shown in FIG. At this time, if the value sent from the code amount calculator 201 is A, the index value QP corresponding to the value A will be calculated (see FIG. 4).
【0047】ステップ602が終了すると、次にステッ
プ603では、第1処理単位の符号化を行わせる。ステ
ップ602で求められたインデックス値QPは、QP予
測器202からテーブル作成器203に送られる。上記
ステップ603の処理は、テーブル作成器203が作成
した量子化テーブルを、メモリ204、QP予測器20
2を介して量子化器104に送出して行われる。Upon completion of step 602, in step 603, the first processing unit is encoded. The index value QP obtained in step 602 is sent from the QP predictor 202 to the table creator 203. In the processing of step 603, the quantization table created by the table creator 203 is stored in the memory 204 and the QP predictor 20.
It is sent to the quantizer 104 via 2 and performed.
【0048】ステップ603に続くステップ604で
は、変数iに2を代入する。この変数iは、第1処理単
位に続けて順次符号化される他の処理単位において、現
在符号化の対象としている処理単位を符号量算出器20
1が把握するための変数であり、符号量算出器201に
保持される。ステップ604以降の処理においては、変
数iの値が示す処理単位を対象として、その符号化が行
われる。In step 604 following step 603, 2 is assigned to the variable i. This variable i is a code amount calculator 20 that indicates the processing unit currently being encoded in another processing unit that is sequentially encoded after the first processing unit.
1 is a variable for grasping and is held in the code amount calculator 201. In the processing after step 604, the encoding is performed for the processing unit indicated by the value of the variable i.
【0049】ステップ604に続くステップ605で
は、これまでに符号化された処理単位の発生符号量、及
びステップ601で決定した目標符号量から、第i処理
単位用のインデックス値QPを求める処理を行う。In step 605 following step 604, a process of obtaining the index value QP for the i-th processing unit is performed from the generated code amount of the processing unit coded so far and the target code amount determined in step 601. .
【0050】この処理は、例えば変数iの値が2、即ち
第2処理単位を符号化の対象としている場合、符号量算
出器201が、目標符号量から第1処理単位を符号化し
た際の実際の発生符号量を減算し、減算した後の値を5
(符号化が済んでいない処理単位数)等分した値をQP
予測器202に送出することで実現される。符号量算出
器201は、実際の発生符号量を、多重化器105から
出力された発生符号を入力し、そのデータ量をカウント
することで把握する。In this processing, for example, when the value of the variable i is 2, that is, the second processing unit is the object of encoding, the code amount calculator 201 encodes the first processing unit from the target code amount. The actual generated code amount is subtracted, and the value after subtraction is 5
(Number of processing units that have not been encoded yet) QP
It is realized by sending it to the predictor 202. The code amount calculator 201 grasps the actual generated code amount by inputting the generated code output from the multiplexer 105 and counting the data amount.
【0051】ステップ605に続くステップ606で
は、ステップ605で求めたインデックス値QPの量子
化テーブルを用いた第i処理単位の符号化を行わせる。
この符号化が終了すると、ステップ607の処理に移行
する。In step 606 following step 605, the i-th processing unit is encoded using the quantization table of the index value QP obtained in step 605.
When this encoding is completed, the process proceeds to step 607.
【0052】ステップ607では、変数iの値が1フレ
ームの画像データを処理単位で分割した数N(=6)に
等しいか否か判定する。1フレームの画像データの符号
化が全て終了した場合、その判定はYESとなり、ここ
で一連の処理を終了する。そうでない場合、その判定は
NOとなり、ステップ608で変数iをインクリメント
した後、ステップ605の処理に戻る。In step 607, it is determined whether or not the value of the variable i is equal to the number N (= 6) obtained by dividing the image data of one frame by the processing unit. When the encoding of the image data of one frame is completed, the determination is YES, and the series of processes is terminated here. Otherwise, the determination is no, the variable i is incremented in step 608, and the process returns to step 605.
【0053】ステップ605の処理に戻ると、新たに符
号化された処理単位の実際の発生符号量を考慮してイン
デックス値QPが求められ、その求めたインデックス値
QPの量子化テーブルを用いて、次の処理単位の符号化
が行われる。ステップ607の判定がYESとなるま
で、ステップ605〜608の処理を繰り返すことによ
り、全ての処理単位の符号化が完了する。Returning to the processing of step 605, the index value QP is obtained in consideration of the actual generated code amount of the newly encoded processing unit, and the quantization table of the obtained index value QP is used to The next processing unit is encoded. By repeating the processes of steps 605 to 608 until the determination of step 607 becomes YES, the encoding of all the processing units is completed.
【0054】このように、本実施の形態では、それまで
に符号化された処理単位の実際の発生符号量に応じて、
それ以降に符号化される処理単位の目標符号量を調節す
る。このため、1フレーム毎の実際の発生符号量と目標
符号量(ステップ601で決定される)との誤差を小さ
い範囲内に常に収めることができる。これにより、動き
が速いといった各フレーム毎に発生符号量が大きく変動
するような画像に対しても、実際の発生符号量の変動を
小さな範囲内に抑えることができ、発生符号量の変動に
伴う受信(復号)側の画像品質の劣化等を常に回避する
ことが可能となる。また、不要なフレーム間隔(画像の
更新間隔)の変動を抑えることができることから、受信
(復号)側において、再現される一連の画像の動きが不
自然になるのを回避することができる。As described above, in the present embodiment, according to the actual generated code amount of the processing unit coded up to that time,
The target code amount of the processing unit coded thereafter is adjusted. Therefore, the error between the actual generated code amount and the target code amount (determined in step 601) for each frame can always be kept within a small range. This makes it possible to suppress the fluctuation of the actual generated code amount within a small range even for an image in which the generated code amount greatly changes for each frame, such as a fast movement, and to accompany the fluctuation of the generated code amount. It is possible to always avoid deterioration of image quality on the receiving (decoding) side. Further, since it is possible to suppress unnecessary fluctuations in frame intervals (image update intervals), it is possible to avoid unnatural movement of a series of reproduced images on the receiving (decoding) side.
【0055】なお、本実施の形態では、1フレームの目
標符号量を決定すると、基本的に、1フレームを分割し
ている処理単位数でその目標符号量を除算した値を処理
単位の目標符号量としている。しかし、特に動き補償フ
レーム間予測を行うと、処理単位の画像上の位置によ
り、実際の発生符号量にバラツキが生じることが予想さ
れる。例えば、第1処理単位のように、画像の端に位置
する処理単位においては背景部分が占める割合が高いと
予想でき、少ない符号量でも鮮明な画質を得られると考
えられる。このことから、全ての処理単位において同じ
ような画質が得られるように、処理単位毎に重みを設定
し、目標符号量を各処理単位の重みに応じて割り当てる
ことが望ましい。これは、符号化を開始し、幾つかの処
理単位の符号化が終了した後において、フレーム全体の
目標符号量の残りを、符号化が済んでいない他の処理単
位に割り当てる場合も同様である。このように、処理単
位毎に重みを設定する場合、画像の動きが大きいと予想
される部分とそうでない部分、良好な画質で再現させた
い部分とそうでない部分(例えば背景)といった視点を
考慮して、各処理単位の形状、及びその位置を設定する
ことが望ましい。In this embodiment, when the target code amount of one frame is determined, basically, a value obtained by dividing the target code amount by the number of processing units dividing one frame is a target code of the processing unit. The amount is. However, especially when motion-compensated inter-frame prediction is performed, it is expected that the actual generated code amount will vary depending on the position of the processing unit on the image. For example, it can be expected that a background unit occupies a high ratio in a processing unit located at the edge of an image, such as the first processing unit, and clear image quality can be obtained with a small code amount. From this, it is desirable to set the weight for each processing unit and allocate the target code amount according to the weight of each processing unit so that the same image quality can be obtained in all the processing units. This is also the case when the remaining amount of the target code amount of the entire frame is assigned to another unprocessed processing unit after the coding is started and the coding of some processing units is completed. . In this way, when setting the weight for each processing unit, consider the viewpoints such as the part where the motion of the image is expected to be large and the part that is not large, the part to be reproduced with good image quality and the part that is not (eg background). It is desirable to set the shape of each processing unit and its position.
【0056】また、本実施の形態では、画像データの符
号化をDCT方式に基づいて行っているが、本発明が適
用できる符号化方式はこれに限定されるものではない。
各処理単位毎に量子化ステップサイズを設定すること
で、ランレングス符号化方式等のその他の符号化方式に
も本発明を適用することができる。元のデータ値を量子
化ステップサイズにより量子化する符号化方式であれ
ば、符号化の対象とするデータの種類に関わらず、本発
明は広く適用することが可能である。Further, in the present embodiment, the image data is encoded based on the DCT method, but the encoding method to which the present invention is applicable is not limited to this.
By setting the quantization step size for each processing unit, the present invention can be applied to other coding methods such as the run length coding method. The present invention can be widely applied to any encoding method that quantizes an original data value with a quantization step size, regardless of the type of data to be encoded.
【0057】[0057]
【発明の効果】以上、説明したように本発明は、データ
を複数の処理単位に分割し、圧縮処理が終了した処理単
位の実際の発生符号量に基づいて、圧縮処理が済んでい
ない処理単位に用いる量子化テーブル(量子化ステップ
サイズ)を決定するため、圧縮処理が終了した処理単位
における処理単位毎の目標符号量と実際の発生符号量と
の誤差を、圧縮処理が済んでいない他の処理単位の発生
符号量を調節することで吸収することができる。この結
果、高精度の発生符号量の制御を行うことが可能とな
り、データ全体における実際の発生符号量と目標符号量
との間の誤差を常に小さな範囲内に収めることができ
る。これにより、発生符号量の変動を回避することがで
き、発生符号量の変動により発生する画質の劣化等を回
避することができる。As described above, the present invention divides data into a plurality of processing units, and based on the actual generated code amount of the processing unit for which the compression processing has been completed, the processing unit which has not been compressed yet. In order to determine the quantization table (quantization step size) used for, the error between the target code amount and the actual generated code amount for each processing unit in the processing unit for which the compression processing has been completed, It can be absorbed by adjusting the generated code amount of the processing unit. As a result, it is possible to control the generated code amount with high accuracy, and it is possible to always keep the error between the actual generated code amount and the target code amount in the entire data within a small range. As a result, it is possible to avoid fluctuations in the generated code amount, and avoid deterioration in image quality and the like caused by fluctuations in the generated code amount.
【図1】本実施の形態が適用されたデータ圧縮装置の構
成のブロック図である。FIG. 1 is a block diagram of a configuration of a data compression apparatus to which this embodiment is applied.
【図2】符号量制御部のブロック図である。FIG. 2 is a block diagram of a code amount control unit.
【図3】画像データを処理単位で分割した様子を示す説
明図である。FIG. 3 is an explanatory diagram showing how image data is divided in processing units.
【図4】インデックス値QPと発生符号量の関係を示す
説明図である。FIG. 4 is an explanatory diagram showing a relationship between an index value QP and a generated code amount.
【図5】バッファ占有量の時間変化例を示す説明図であ
る。FIG. 5 is an explanatory diagram showing an example of a temporal change in buffer occupancy.
【図6】圧縮処理の動作フローチャートである。FIG. 6 is an operation flowchart of compression processing.
【図7】発生符号量の制御方法の概念図である。FIG. 7 is a conceptual diagram of a method of controlling a generated code amount.
【図8】画像データの階層構造を示す図である。FIG. 8 is a diagram showing a hierarchical structure of image data.
100 データ圧縮装置 103 変換器 104 量子化器 106 バッファメモリ 107 符号量制御部 201 符号量算出器 202 QP予測器 203 テーブル作成器 100 data compression device 103 converter 104 quantizer 106 buffer memory 107 code amount control unit 201 code amount calculator 202 QP predictor 203 table creator
Claims (3)
圧縮処理されるデータの符号量が、予め設定した目標符
号量となるように制御するための方法であって、 前記データを予め定めた処理単位で複数に分割し、 前記処理単位毎に、前記目標符号量、及び前記符号化が
終了した他の処理単位の符号量に基づいて前記量子化ス
テップサイズを決定し、 前記決定した量子化ステップサイズを用いて、前記処理
単位毎に圧縮処理を行わせる、 ことを特徴とする符号量制御方法。1. A method for controlling a code amount of data to be compressed using a specified quantization step size so as to be a preset target code amount, wherein the data is predetermined processing. Divide into a plurality of units, for each of the processing units, the target code amount, and determine the quantization step size based on the code amount of the other processing unit for which the encoding is completed, the determined quantization step A code amount control method, wherein a compression process is performed for each processing unit by using a size.
のなかから一つを選択し、該選択した量子化テーブルを
用いて圧縮処理されるデータの符号量が、前記圧縮処理
後の符号化データが一時記憶される記憶手段の記憶容量
に基づいて予め設定した目標符号量となるように制御す
るための方法であって、 前記データを予め定めた処理単位で複数に分割し、 前記処理単位毎に、前記目標符号量、及び前記圧縮処理
が終了した他の処理単位の符号量に基づいて、前記複数
用意されている量子化テーブルのなかから一つを選択
し、 前記選択した量子化テーブルを用いて、前記処理単位毎
に圧縮処理を行わせる、 ことを特徴とする符号量制御方法。2. One of a plurality of quantization tables prepared in advance is selected, and the code amount of data compressed by using the selected quantization table is the coded data after the compression process. Is a method for controlling so that the target code amount is preset based on the storage capacity of the storage means that is temporarily stored, wherein the data is divided into a plurality of predetermined processing units, and each of the processing units is On the basis of the target code amount and the code amount of the other processing unit for which the compression processing has been completed, one is selected from the plurality of prepared quantization tables, and the selected quantization table is A code amount control method, wherein a compression process is performed for each processing unit by using the code amount control method.
のなかから一つを選択してデータの圧縮処理を行い、前
記圧縮処理後の符号化データを一時記憶させる記憶手段
を備えたデータ圧縮装置に適用され、前記圧縮処理され
るデータの符号量が、前記記憶手段の記憶容量に基づい
て予め設定した目標符号量となるように制御する装置で
あって、 前記データを予め定めた処理単位で複数に分割する分割
手段と、 前記処理単位毎に、前記目標符号量、及び前記符号化が
終了した他の処理単位の符号量に基づいて、前記複数用
意されている量子化テーブルのなかから一つを選択し、
該選択した量子化テーブルを用いて、前記処理単位毎に
圧縮処理を行わせる制御手段と、 を具備したことを特徴とする符号量制御装置。3. A data compression apparatus comprising a storage means for selecting one of a plurality of quantization tables prepared in advance to perform data compression processing and temporarily storing the encoded data after the compression processing. Is a device for controlling so that the code amount of the data to be compressed is a target code amount that is preset based on the storage capacity of the storage means, and the data is processed in a predetermined processing unit. A dividing unit that divides into a plurality of units, one of the plurality of prepared quantization tables based on the target code amount and the code amount of another processing unit for which the encoding has been completed for each of the processing units. Choose one,
A code amount control apparatus comprising: a control unit that performs compression processing for each processing unit using the selected quantization table.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP26436795A JPH09107293A (en) | 1995-10-12 | 1995-10-12 | Code amount control method and apparatus thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP26436795A JPH09107293A (en) | 1995-10-12 | 1995-10-12 | Code amount control method and apparatus thereof |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH09107293A true JPH09107293A (en) | 1997-04-22 |
Family
ID=17402177
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP26436795A Pending JPH09107293A (en) | 1995-10-12 | 1995-10-12 | Code amount control method and apparatus thereof |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH09107293A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO1998054904A1 (en) * | 1997-05-28 | 1998-12-03 | Sony Corporation | Coding method and coding equipment using the same |
| JP2007281758A (en) * | 2006-04-05 | 2007-10-25 | Seiko Epson Corp | Movie display system, movie data output device, display device, and program |
| US7801222B2 (en) | 2004-06-30 | 2010-09-21 | Lg Electronics Inc. | Coding image signal |
| US7805014B2 (en) | 2004-10-21 | 2010-09-28 | Samsung Electronics Co., Ltd. | Image-encoding controlling apparatus for using a table reflecting statistical frequency of quantization parameter selection and method thereof |
-
1995
- 1995-10-12 JP JP26436795A patent/JPH09107293A/en active Pending
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO1998054904A1 (en) * | 1997-05-28 | 1998-12-03 | Sony Corporation | Coding method and coding equipment using the same |
| US6023297A (en) * | 1997-05-28 | 2000-02-08 | Sony Corporation | Encoding method and encoder using it |
| US7801222B2 (en) | 2004-06-30 | 2010-09-21 | Lg Electronics Inc. | Coding image signal |
| US7805014B2 (en) | 2004-10-21 | 2010-09-28 | Samsung Electronics Co., Ltd. | Image-encoding controlling apparatus for using a table reflecting statistical frequency of quantization parameter selection and method thereof |
| JP2007281758A (en) * | 2006-04-05 | 2007-10-25 | Seiko Epson Corp | Movie display system, movie data output device, display device, and program |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100604702B1 (en) | Apparatus for Encoding Image Sequences and Methods for Generating Quantization Scale to Quantize Image Signals | |
| Ribas-Corbera et al. | Rate control in DCT video coding for low-delay communications | |
| JP2963416B2 (en) | Video encoding method and apparatus for controlling bit generation amount using quantization activity | |
| KR100950743B1 (en) | Image information encoding apparatus and method, and image information decoding apparatus and method | |
| US5461422A (en) | Quantizer with automatic pre-threshold | |
| US5848195A (en) | Selection of huffman tables for signal encoding | |
| JP2001145113A (en) | Image information conversion apparatus and method | |
| KR100961760B1 (en) | Motion estimation method and apparatus referencing discrete cosine transform coefficients | |
| CN1949877B (en) | Adaptive quantization controller and method thereof | |
| US20080049837A1 (en) | Image Processing Apparatus, Program for Same, and Method of Same | |
| US5432555A (en) | Image signal encoding apparatus using adaptive 1D/2D DCT compression technique | |
| JP3872849B2 (en) | Video encoding device | |
| KR100713400B1 (en) | H.263 / MFP Video Encoder Using Average Histogram Error Method and Its Control Method | |
| JPWO2002080567A1 (en) | Image signal quantization apparatus and method | |
| JPH09294267A (en) | Image compression coding device | |
| JP2002010260A (en) | Motion vector detection method and moving picture coding apparatus | |
| JPH09107293A (en) | Code amount control method and apparatus thereof | |
| KR100566290B1 (en) | Image Scanning Method Using Scan Table and Discrete Cosine Converter | |
| KR19990067016A (en) | Method and apparatus for selecting a coding mode in a block-based coding system | |
| KR100708182B1 (en) | Apparatus and method for controlling bit rate of video encoder | |
| JP3800965B2 (en) | Data rate converter | |
| JP3779066B2 (en) | Video encoding device | |
| JP2900927B2 (en) | Encoding method and encoding device | |
| JP2004165894A (en) | Bit rate control method for encoder | |
| KR100207419B1 (en) | Method and apparatus for controlling generation of bit rate in video encoding |