JPH05153569A - Picture coder - Google Patents

Picture coder

Info

Publication number
JPH05153569A
JPH05153569A JP30907491A JP30907491A JPH05153569A JP H05153569 A JPH05153569 A JP H05153569A JP 30907491 A JP30907491 A JP 30907491A JP 30907491 A JP30907491 A JP 30907491A JP H05153569 A JPH05153569 A JP H05153569A
Authority
JP
Japan
Prior art keywords
picture
image
virtual buffer
code amount
occupancy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP30907491A
Other languages
Japanese (ja)
Other versions
JP3038066B2 (en
Inventor
Hiroshi Sasaki
佐々木  寛
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.)
Olympus Corp
Original Assignee
Olympus Optical 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 Olympus Optical Co Ltd filed Critical Olympus Optical Co Ltd
Priority to JP30907491A priority Critical patent/JP3038066B2/en
Publication of JPH05153569A publication Critical patent/JPH05153569A/en
Application granted granted Critical
Publication of JP3038066B2 publication Critical patent/JP3038066B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/005Statistical coding, e.g. Huffman, run length coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Image Processing (AREA)

Abstract

PURPOSE:To control a code quantity through the provision of a virtual buffer used to change a quantity step width to obtain the code quantity allocated to each picture in order to keep the picture quality for in-frame coding only and the picture quality for the selection of in-frame or inter-frame coding constant. CONSTITUTION:Any of I, P, B pictures is selected by a switch 29 in a code quantity control section 23 from a code quantity quantized by a quantizer 16 while being divided in the unit of macro blocks and outputted by a coder 17 and the selected picture is inputted to an allocation code quantity calculation section 24. The allocation code quantity calculation section 24 calculates the code quantity of each picture and calculates an allocation code quantity of each coded picture. The quantization step width is changed from the data so as to obtain a code quantity allocated to each picture and the resulting data are stored in virtual buffer sections 25, 26, 27 for I, P, B picture controlled independently for each picture.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は画像データを高能率符
号化圧縮する画像符号化装置に関し、特に蓄積メディア
に該圧縮データを記録するための符号量制御を行う画像
符号化装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image coding apparatus for highly efficiently coding and compressing image data, and more particularly to an image coding apparatus for controlling a code amount for recording the compressed data on a storage medium. ..

【0002】[0002]

【従来の技術】従来、動画像を、フレーム内符号化のみ
を行うIピクチャ(I-picture )と称される画像、及び
フレーム内符号化とフレーム間符号化をマクロブロック
単位に選択するPピクチャ及びBピクチャ(P-picture
及びB-picture )と称される画像に分け、これらの画像
を図8(a)に示されるように、周期的に配列すること
で、蓄積メディアに記録する上で、必要となるランダム
アクセス、逆転再生を可能にしながら、高能率の符号化
圧縮を達成するという動画像符号化方式が、国際標準化
案として提案されている。
2. Description of the Related Art Conventionally, a moving picture is referred to as an I picture (I-picture) for intraframe coding only, and a P picture for selecting intraframe coding and interframe coding in macroblock units. And B picture (P-picture
And B-picture), and by randomly arranging these images as shown in FIG. 8A, random access required for recording on the storage medium, A moving image coding method that achieves high-efficiency coding compression while enabling reverse playback has been proposed as an international standardization proposal.

【0003】尚、上記Pピクチャ及びBピクチャは、そ
れぞれ前方予測符号化画像及び両方向予測符号化画像を
意味している。更に、上記マクロブロックとは、複数の
画素をひとまとめにしたブロック(8×8画素)を、複
数個集めたものである。
The P picture and B picture mean a forward predictive coded image and a bidirectional predictive coded image, respectively. Further, the macroblock is a group of a plurality of blocks (8 × 8 pixels) in which a plurality of pixels are grouped together.

【0004】上記国際標準化案は、一定の転送レートの
蓄積メディアに圧縮された符号化データを記録するため
のものであり、一定転送レートとするために符号化デー
タを蓄えるバッファメモリのオーバーフロー、アンダー
フローが発生しないための条件、すなわち1フレームあ
たりの発生符号量の上限、下限が規定されている。
The above-mentioned international standardization proposal is for recording compressed encoded data in a storage medium having a constant transfer rate, and overflows or underflows of a buffer memory for storing the encoded data in order to obtain a constant transfer rate. The condition for no flow to occur, that is, the upper limit and the lower limit of the generated code amount per frame are defined.

【0005】この1フレームあたりの発生符号量の制御
が、幾つか提案されている。例えば、特開平2−305
083号では、フレーム内符号化画像と、フレーム間符
号化画像に対する割当て符号量が、伝送バッファメモリ
に残っているデータ量に基いて画質が均一になるように
決定され、この割当て符号量となるように、伝送バッフ
ァメモリに残っているデータに基いて、量子化スケール
が制御されている。
Several methods of controlling the amount of generated codes per frame have been proposed. For example, JP-A-2-305
In No. 083, the allocated code amount for the intra-frame coded image and the inter-frame coded image is determined so that the image quality becomes uniform based on the amount of data remaining in the transmission buffer memory, and becomes this assigned code amount. Thus, the quantization scale is controlled based on the data remaining in the transmission buffer memory.

【0006】 量子化スケールSTEP=[(MR /MT )×α]+β ここで、MT は伝送バッファメモリ容量、MR は伝送バ
ッファメモリ残量、αは量子化スケールSTEPが取り
得るステップ数、βは調整値を表す。
Quantization scale STEP = [(M R / M T ) × α] + β where M T is the transmission buffer memory capacity, M R is the transmission buffer memory remaining amount, and α is a step that the quantization scale STEP can take. The numbers and β represent adjustment values.

【0007】また、国際標準化案のシュミレーションモ
デルとして提案されているものでは、以下のように制御
されている。すなわち、各ピクチャ(I、P、Bピクチ
ャ)の最も新しい発生符号量の比率から、各ピクチャの
割当て符号量が決定される。そして、図9(a)に示さ
れるように、1フレームの画素内を、スライスと称され
る数マクロブロックをライン方向に集めた領域を単位に
発生された符号量と、該領域に予め与えられた割当て符
号量との誤差が、仮想バッファに蓄積される。この仮想
バッファの占有量と比例関係にある量子化スケールが、
次に符号化が行われるスライスの量子化スケールとされ
る。これにより、1フレーム内の発生符号量が制御され
る。
In addition, the simulation model proposed in the international standardization proposal is controlled as follows. That is, the allocated code amount of each picture is determined from the ratio of the newest generated code amount of each picture (I, P, B picture). Then, as shown in FIG. 9A, the amount of code generated in units of a region where several macroblocks called slices are gathered in the line direction in a pixel of one frame, and is given to the region in advance. An error from the assigned code amount is accumulated in the virtual buffer. The quantization scale, which is proportional to the occupancy of this virtual buffer,
The quantization scale of the slice to be coded next is used. As a result, the amount of generated codes in one frame is controlled.

【0008】尚、仮想バッファは1つであり、図9
(b)に示されるように、次に符号化されるPピクチャ
の先頭のスライスに使用される量子化スケールは、Iピ
クチャの最後のスライスの符号化終了直後の仮想バッフ
ァ占有量に対応する量子化スケールが使用される。ここ
で、各ピクチャの符号化は、図8(b)に示されるよう
な順序で行われる。
It should be noted that there is only one virtual buffer, as shown in FIG.
As shown in (b), the quantization scale used for the first slice of the P picture to be encoded next is the quantum scale corresponding to the virtual buffer occupancy immediately after the end of encoding of the last slice of the I picture. A digitization scale is used. Here, the coding of each picture is performed in the order as shown in FIG.

【0009】[0009]

【発明が解決しようとする課題】上述したように、伝送
バッファ及び仮想バッファが1つ使用されて符号量が制
御されると、上記各ピクチャの画質が均一になるように
作用される。
As described above, when one transmission buffer and one virtual buffer are used to control the code amount, the picture quality of each picture is made uniform.

【0010】また、上記国際標準化案に於いては、Iピ
クチャの復号データから予測されるPピクチャ、Iまた
はPピクチャから予測されるBピクチャという依存関係
により、Iピクチャで発生された符号化ノイズがPピク
チャに、そしてIまたはPピクチャで発生された符号化
歪がBピクチャに影響を与え、視覚的に目立った劣化が
各ピクチャに残ってしまう。
Further, in the above international standardization proposal, the coding noise generated in the I picture is caused by the dependency relationship of the P picture predicted from the decoded data of the I picture and the B picture predicted from the I or P picture. Affects the P picture, and the coding distortion generated in the I or P picture affects the B picture, and a visually noticeable deterioration remains in each picture.

【0011】特に、決定された伝送レート内で各ピクチ
ャの画質を均一にする(すなわち、各ピクチャの平均量
子化スケールが同一になる)場合、Iピクチャの画質は
次のようになる。つまり、Iピクチャの画質は、各ピク
チャに対して画質に重み付ける(各ピクチャの平均量子
化スケールを同一にしない)場合、具体的にはIピクチ
ャ、Pピクチャ、Bピクチャの順に画質を落としていく
場合に比べ、符号化歪が増加する。この符号化歪の多い
Iピクチャの復号画像から予測が行われるPピクチャで
は、この符号化歪を引きずってしまう。このことは、B
ピクチャについても同様である。
In particular, when the picture quality of each picture is made uniform within the determined transmission rate (that is, the average quantization scale of each picture is the same), the picture quality of the I picture is as follows. That is, when the picture quality of I pictures is weighted for each picture (the average quantization scale of each picture is not the same), specifically, the picture quality is lowered in the order of I picture, P picture, and B picture. Coding distortion increases as compared with the case of going forward. In a P picture in which prediction is performed from a decoded image of an I picture having a large amount of coding distortion, this coding distortion is dragged. This is B
The same applies to pictures.

【0012】更に、各ピクチャの画質が均一になるまで
の収束段階では、各ピクチャ内の量子化スケールの変動
が大きくなる。このことは、ピクチャ内の画質の変動が
大きいことを意味し、視覚上あまり重要でない部分の画
質を良好にし、重要な部分の画質を低下させるといった
現象が発生するので、これでは符号化効率が良いとはい
えないものである。
Further, in the convergence stage until the picture quality of each picture becomes uniform, the fluctuation of the quantization scale in each picture becomes large. This means that there is a large variation in the image quality within the picture, and the phenomenon that the image quality of the visually insignificant part is improved and the image quality of the important part is degraded occurs, so that the coding efficiency is improved. It's not good.

【0013】この発明は、上記課題に鑑みてなされたも
ので、全てのピクチャの画質を均一にすることなく、I
ピクチャ、Pピクチャ、Bピクチャの各画質に重み付け
た状態を維持し、且つ各ピクチャ内の画質の変動を低減
すると共に各ピクチャ内の視覚上の重要部分の画質を向
上することのできる画像符号化装置を提供することを目
的とする。
The present invention has been made in view of the above-mentioned problems, and it is possible to realize I picture without making the picture quality of all pictures uniform.
Image coding capable of maintaining the weighted state of the picture quality of each of the picture, P picture, and B picture, reducing the fluctuation of the picture quality within each picture, and improving the picture quality of a visually important portion within each picture. The purpose is to provide a device.

【0014】[0014]

【課題を解決するための手段】すなわちこの発明は、デ
ジタル画像信号をフレーム内符号化のみを行う第1の画
像と、フレーム内及びフレーム間符号化を選択して符号
化を行う第2の画像で構成され、一定の符号量となるよ
うに上記第1及び第2の各画像に符号量を割当て、高能
率符号化圧縮を行う画像符号化装置に於いて、上記各画
像に割当てられた符号量となるように量子化ステップ幅
を変化させる複数の仮想バッファ部を具備し、上記複数
の仮想バッファ部は上記各画像毎に独立して制御される
ことを特徴とする。
That is, according to the present invention, there is provided a first image for performing only intraframe encoding of a digital image signal and a second image for selecting intraframe and interframe encoding. In the image coding apparatus for assigning a code amount to each of the first and second images so as to have a constant code amount and performing high-efficiency coding compression, the code assigned to each image It is characterized in that a plurality of virtual buffer units for changing the quantization step width so as to become a quantity are provided, and the plurality of virtual buffer units are independently controlled for each of the images.

【0015】[0015]

【作用】この発明にあっては、デジタル画像信号をフレ
ーム内符号化のみを行う画像、及びフレーム内、フレー
ム間符号化を選択して符号化を行う画像とで構成し、全
体の発生符号量が一定となるように高能率符号化圧縮を
行う装置に於いて、上記フレーム内符号化のみを行う画
像の画質と、フレーム内、フレーム間符号化を選択して
符号化を行う画像の画質をそれぞれ一定とするために、
上記各画像に割当てられた符号量となるように量子化ス
テップ幅を変化させるために使用する仮想バッファ部
を、各画像毎に別々に設けて独立に制御するようにす
る。これにより、上記各画像の画質を別々に均一にする
ことができ、また画像内の量子化ステップ幅の変動を抑
制することができる。
According to the present invention, the digital image signal is composed of an image for which only intra-frame coding is performed and an image for which intra-frame and inter-frame coding is selected for coding. In an apparatus that performs high-efficiency coding and compression so that the image quality becomes constant, the image quality of an image that is only intra-frame coded and the image quality of an image that is coded by selecting intra-frame or inter-frame coding. In order to keep each constant,
A virtual buffer unit used for changing the quantization step width so as to have the code amount assigned to each image is separately provided for each image and independently controlled. As a result, the image quality of each image can be made uniform separately, and the fluctuation of the quantization step width in the image can be suppressed.

【0016】更に、各画像毎の符号か終了時点での仮想
バッファ占有量と平均仮想バッファ占有量とを比較し、
大きいほうの占有量を用いて次に符号化を使用する初期
量子化ステップ幅の算出を行い、平均仮想バッファ占有
量が選択された場合のみ、平均仮想バッファ占有量から
符号化終了時点での仮想バッファ占有量を差引いた差分
量を、次の符号化画像の割当て符号量に付加するように
する。特に、画像内の視覚上重要な部分に重点的に上記
差分量を分配するようにしている。
Further, the code for each image or the virtual buffer occupancy at the end time is compared with the average virtual buffer occupancy,
The initial quantized step size is calculated using the larger occupancy next time, and only when the average virtual buffer occupancy is selected, the virtual occupancy at the end of encoding is calculated from the average virtual buffer occupancy. The difference amount obtained by subtracting the buffer occupancy amount is added to the assigned code amount of the next encoded image. In particular, the difference amount is distributed mainly to the visually important portion in the image.

【0017】[0017]

【実施例】以下図面を参照して、この発明の実施例を説
明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0018】図1は、この発明に係る画像符号化装置の
一実施例を示すブロック図であり、図2はデジタル化さ
れた画像データをマクロブロックに分割した例を示す図
である。尚、以下、動画像データに対して、上述したI
ピクチャ、Pピクチャ、Bピクチャの構成を取った場合
について説明する。
FIG. 1 is a block diagram showing an embodiment of an image coding apparatus according to the present invention, and FIG. 2 is a diagram showing an example in which digitized image data is divided into macroblocks. It should be noted that, in the following, I
A case where the picture, P picture, and B picture are configured will be described.

【0019】図1に於いて、マクロブロック単位に分割
された画像データは、減算器11、スイッチ12及び予測器
13に入力される。この予測器13からは、上記減算器11及
びスイッチ14に出力される。スイッチ12の出力は、DC
T15を経て量子化器16で変換係数に量子化され、符号化
器17を介して伝送バッファ18へ送られて蓄積される。ま
た、上記量子化器16からの出力は、逆量子化器19、逆D
CT20、加算器21を介して予測器13に送られる。尚、22
は予測モード判定器である。
In FIG. 1, the image data divided into macroblock units includes a subtractor 11, a switch 12 and a predictor.
Entered in 13. The predictor 13 outputs the subtractor 11 and the switch 14. The output of the switch 12 is DC
After passing through T15, the quantizer 16 quantizes the transform coefficient and sends it to the transmission buffer 18 via the encoder 17 for storage. The output from the quantizer 16 is the inverse quantizer 19, inverse D
It is sent to the predictor 13 via the CT 20 and the adder 21. 22
Is a prediction mode determiner.

【0020】符号量制御部23には、符号化器17から発生
された符号量が入力されると共に、指定された伝送レー
トの値が入力される。この符号量制御部23は、割当て符
号量算出部24、Iピクチャ用仮想バッファ部25、Pピク
チャ用仮想バッファ部26、Bピクチャ用仮想バッファ部
27、量子化スケール算出器28、及びスイッチ29、30で構
成されている。尚、この符号量制御部23の詳細は後述す
る。次に、同実施例の動作について説明する。
The code amount control section 23 receives the code amount generated from the encoder 17 and the specified transmission rate value. The code amount control unit 23 includes an assigned code amount calculation unit 24, an I picture virtual buffer unit 25, a P picture virtual buffer unit 26, and a B picture virtual buffer unit.
27, a quantization scale calculator 28, and switches 29 and 30. The details of the code amount control unit 23 will be described later. Next, the operation of the embodiment will be described.

【0021】図2に示されるように、マクロブロック単
位に分割された画像データは、減算器11、スイッチ12ま
たは予測器13に入力される。この予測器13に入力された
マクロブロックデータと、動き補償予測された予測マク
ロブロックは、減算器11に出力される。減算器11では、
入力マクロブロックデータと、上記予測マクロブロック
データが減算され、予測誤差マクロブロックデータが生
成される。そして、この生成されたデータがスイッチ12
に出力される。
As shown in FIG. 2, the image data divided into macroblock units is input to the subtractor 11, the switch 12 or the predictor 13. The macroblock data input to the predictor 13 and the motion-compensated prediction macroblock are output to the subtractor 11. In the subtractor 11,
The prediction macroblock data is subtracted from the input macroblock data to generate prediction error macroblock data. Then, this generated data is sent to the switch 12
Is output to.

【0022】スイッチ12では、予測モード判定器22から
の判定信号により、上記予測誤差マクロブロックデータ
及び入力マクロブロックデータが選択され、その結果が
DCT15に出力される。ここで、符号化画像がIピクチ
ャの場合は、強制的に入力マクロブロックデータが選択
される。
In the switch 12, the prediction error macroblock data and the input macroblock data are selected by the judgment signal from the prediction mode judging device 22, and the result is output to the DCT 15. Here, when the encoded image is an I picture, the input macroblock data is forcibly selected.

【0023】上記DCT15に入力されたマクロブロック
データは、ここで図2に示される「1〜6」のブロック
に分割され、これらのブロック単位(8×8画素)で離
散コサイン変換が行われ、変換係数が生成される。この
変換係数は、量子化器16にて線形量子化される。そし
て、この量子化のステップ幅は、各変換係数に対して別
々の大きさのものが使用される。一般には、低周波成分
に対応するステップ幅は小さく、高周波成分にゆくに連
れてステップ幅を大きくしている。
The macroblock data input to the DCT 15 is divided into "1 to 6" blocks shown in FIG. 2, and the discrete cosine transform is performed for each block (8 × 8 pixels). Transform coefficients are generated. This transform coefficient is linearly quantized by the quantizer 16. The quantization step size used for each transform coefficient is different. Generally, the step width corresponding to the low frequency component is small, and the step width is increased as it goes to the high frequency component.

【0024】具体的には、図3に示されるように、各変
換係数に対応する量子化ステップ幅の重みq00を、変換
係数と同じマトリクス状に配列した量子化マトリクス
に、量子化スケールQS を乗算することによって、各変
換係数の量子化ステップ幅が決定される。
Specifically, as shown in FIG. 3, the quantization step width weight q 00 corresponding to each transform coefficient is arranged in the same quantization matrix as the transform coefficient in the quantization matrix Q. By multiplying S , the quantization step size of each transform coefficient is determined.

【0025】ここで、量子化マトリクスは、スイッチ12
によって選択されたデータ(入力マクロブロックと予測
誤差マクロブロック)により、予め設定された2つのマ
トリクスを切換える。上記量子化スケールQS は符号量
制御を行うのに使用され、図2に示されているスライス
単位でQS の値を変更する。
Here, the quantization matrix is the switch 12
The two preset matrices are switched according to the data (input macroblock and prediction error macroblock) selected by. The quantization scale Q S is used to control the code amount, and the value of Q S is changed in units of slices shown in FIG.

【0026】量子化された変換係数は、図4に示される
ように、低周波成分から順にジクザグスキャンが行わ
れ、1次元のデータとして符号化器17に出力される。こ
の符号化器17に於いて、量子化値が「0」の連続する数
と、その直後の「0」でない値を対として可変長符号が
割当てられて符号化が行われる。ここで符号化されたデ
ータは、伝送バッファ18に蓄積される。
As shown in FIG. 4, the quantized transform coefficient undergoes zigzag scanning in order from the low frequency component and is output to the encoder 17 as one-dimensional data. In the encoder 17, a variable length code is assigned as a pair with a continuous number having a quantized value of "0" and a value immediately after that, which is not "0", to perform encoding. The data encoded here is accumulated in the transmission buffer 18.

【0027】また、上記量子化器16からの量子化された
変換係数は、逆量子化器19で逆量子化され、更にこのデ
ータが逆DCT20にて逆離散コサイン変換される。この
逆DCT20からのデータと、予測器13からの出力データ
である動き補償予測マクロブロックが、予測モード判定
器22により出力された判定信号によって選択されるか否
かが、スイッチ14で決定される。
The quantized transform coefficient from the quantizer 16 is inversely quantized by the inverse quantizer 19, and this data is inverse discrete cosine transformed by the inverse DCT 20. The switch 14 determines whether or not the data from the inverse DCT 20 and the motion-compensated prediction macroblock which is the output data from the predictor 13 are selected by the determination signal output by the prediction mode determiner 22. ..

【0028】上記予測マクロブロック、或いは入力なし
のデータは、加算器21にて加算されて復号画像が生成さ
れる。この復号された画像は、Iピクチャ及びPピクチ
ャの場合にのみ、予測器13内の図示されないフレームメ
モリに格納される。この格納されたデータが、次に動き
補償予測する画像のリファレンスとなる。
The predictive macroblock or data without input is added by the adder 21 to generate a decoded image. This decoded image is stored in a frame memory (not shown) in the predictor 13 only in the case of I picture and P picture. This stored data serves as a reference for the image to be motion-compensated and predicted next.

【0029】上記符号量制御部23には、上述したよう
に、符号化器17から発生された符号量が入力されると共
に、指定された伝送レートの値が入力される。そして、
この符号量制御部23の出力は、量子化スケールQSであ
り、この値QS が量子化器16に出力されて量子化ステッ
プ幅の変更が行われる。ここで、符号量制御部23の動作
を具体的に説明する。
As described above, the code amount controller 23 receives the code amount generated from the encoder 17 and the specified transmission rate value. And
The output of the code amount control unit 23 is a quantization scale Q S , and this value Q S is output to the quantizer 16 to change the quantization step width. Here, the operation of the code amount control unit 23 will be specifically described.

【0030】上記符号化器17から出力された符号量は、
スイッチ29によりIピクチャ、Pピクチャ、Bピクチャ
の何れかが選択され、割当て符号量算出部24へ入力され
る。この割当て符号量算出部24では、各ピクチャの符号
量の算出が行われ、これらの値と伝送レートとから、次
に符号化される各ピクチャの割当て符号量が算出され
る。これらのデータは、Iピクチャ用仮想バッファ部2
5、Pピクチャ用仮想バッファ部26、Bピクチャ用仮想
バッファ部27に入力される。各仮想バッファ部25、26、
27では、スライス単位に割当て符号量Acが分配され
る。また、符号化器17から出力された符号量は、スイッ
チ29によってIピクチャ、Pピクチャ、Bピクチャ毎に
選択される。
The code amount output from the encoder 17 is
Any one of an I picture, a P picture and a B picture is selected by the switch 29 and input to the allocation code amount calculation unit 24. The allocated code amount calculation unit 24 calculates the code amount of each picture, and calculates the allocated code amount of each picture to be encoded next from these values and the transmission rate. These data are stored in the I-picture virtual buffer unit 2
5, input to the P picture virtual buffer unit 26 and the B picture virtual buffer unit 27. Each virtual buffer unit 25, 26,
In 27, the assigned code amount Ac is distributed in slice units. The code amount output from the encoder 17 is selected by the switch 29 for each of I picture, P picture, and B picture.

【0031】各ピクチャ用の仮想バッファ部25、26、27
内で、上記スライス分の発生符号量Gcが求められ、上
記割当て符号量Acとの誤差、Ec=Gc−Acが、そ
れぞれのピクチャ毎に仮想バッファ部に蓄積される。こ
の蓄積直後の仮想バッファ部の占有量が、上記各ピクチ
ャ用仮想バッファ部よりスイッチ30へ出力される。そし
て、これらのデータは、スイッチ30により、現在符号化
されているピクチャのものが選択され、量子化スケール
算出部28へ出力される。
Virtual buffer units 25, 26, 27 for each picture
Then, the generated code amount Gc for the slice is obtained, and an error from the assigned code amount Ac, Ec = Gc-Ac, is accumulated in the virtual buffer unit for each picture. The occupied amount of the virtual buffer unit immediately after the storage is output to the switch 30 from each of the picture virtual buffer units. Then, the data of the currently encoded picture is selected by the switch 30 from these data, and is output to the quantization scale calculation unit 28.

【0032】量子化スケール算出部28では、図5に示さ
れたような仮想バッファ占有量と量子化スケールとの比
例関係に基いて入力された仮想バッファ占有量に対応す
る量子化スケールが、量子化器16へ出力される。この量
子化器16では、上記量子化スケールと量子化マトリクス
によって、各変換係数の量子化ステップ幅が決定され、
量子化が行われる。
In the quantization scale calculator 28, the quantization scale corresponding to the virtual buffer occupancy input based on the proportional relationship between the virtual buffer occupancy and the quantization scale as shown in FIG. It is output to the digitizer 16. In the quantizer 16, the quantization step width of each transform coefficient is determined by the quantization scale and the quantization matrix,
Quantization is performed.

【0033】図6(a)〜(c)は、各ピクチャの仮想
バッファ部の例を示したものである。各ピクチャの仮想
バッファ部の初期占有量は、予め設定しておくか、また
Iピクチャのみ初期占有量を設定し、Pピクチャ、Bピ
クチャの初期占有量は、それぞれ時間的に1つ前に符号
化されたピクチャの最後のスライスが符号化された時点
での仮想バッファ部の占有量が使用されてもよい。すな
わち、各ピクチャの仮想バッファ部として動作される。
例えば、Pピクチャの初期占有量はIピクチャ用仮想バ
ッファ部25の占有量が使用され、またBピクチャの初期
占有量はPピクチャ用仮想バッファ部26の占有量が使用
される。
FIGS. 6A to 6C show examples of the virtual buffer section of each picture. The initial occupancy of the virtual buffer unit of each picture is set in advance, or the initial occupancy of only the I picture is set, and the initial occupancy of the P picture and the B picture are respectively coded one time earlier. The occupancy of the virtual buffer unit at the time when the last slice of the encoded picture is encoded may be used. That is, it operates as a virtual buffer unit for each picture.
For example, the occupancy of the I-picture virtual buffer unit 25 is used as the initial occupancy of the P picture, and the occupancy of the P-picture virtual buffer unit 26 is used as the initial occupancy of the B picture.

【0034】これによって、各ピクチャ毎の割当て符号
量になるように発生符号量が制御され、各ピクチャ間の
発生符号量の違いに量子化スケールが影響されないた
め、この量子化スケールの各ピクチャ内での変動は小さ
く抑えられる。また、各ピクチャ毎の平均量子化スケー
ルを、略一定に保持することができる(シーンチェンジ
がないとして)。これにより、Iピクチャの画質が常に
良好にされ、符号化歪を減少させることでPピクチャ、
BピクチャへのIピクチャの符号化歪の影響を減少させ
ることができ、画質向上が図られる。
As a result, the generated code amount is controlled so as to be the allocated code amount for each picture, and the quantization scale is not affected by the difference in the generated code amount between each picture. Fluctuations in are small. Also, the average quantization scale for each picture can be held substantially constant (assuming that there is no scene change). As a result, the image quality of the I picture is always improved, and the P picture is reduced by reducing the coding distortion.
The influence of the coding distortion of the I picture on the B picture can be reduced, and the image quality can be improved.

【0035】また、各ピクチャ用仮想バッファ部では、
1つ前に符号化された同種ピクチャのスライス毎の仮想
バッファ占有量の平均値が求められる。この平均仮想バ
ッファ占有量Ao と、最後のスライスの符号化直後の仮
想バッファ占有量Bo とが比較される。ここで、Ao >
Bo の場合は次に符号化される各ピクチャの最初のスラ
イスの量子化スケールが、Ao を用いて算出される。一
方、Ao ≦Bo の場合はBo を用いて量子化スケールが
算出される。
Further, in each picture virtual buffer section,
The average value of the virtual buffer occupancy amount for each slice of the picture of the same type encoded immediately before is obtained. This average virtual buffer occupation amount Ao is compared with the virtual buffer occupation amount Bo immediately after encoding the last slice. Where Ao>
In the case of Bo, the quantization scale of the first slice of each picture to be coded next is calculated using Ao. On the other hand, when Ao ≤ Bo, the quantization scale is calculated using Bo.

【0036】Ao >Bo の場合、Ao が用いられて量子
化スケールが算出されると同時に、仮想バッファ部の占
有量がBo からAoに変更される。このときの占有量の
余り分Ao −Bo は、次に符号化する各ピクチャの重要
な部分のスライス(例えば画面の中央部分)の割当て符
号量に分配される。
When Ao> Bo, Ao is used to calculate the quantization scale, and at the same time, the occupied amount of the virtual buffer section is changed from Bo to Ao. The remainder Ao-Bo of the occupied amount at this time is distributed to the allocated code amount of the slice (for example, the central portion of the screen) of the important portion of each picture to be encoded next.

【0037】これにより、Ao >Bo の場合に発生され
るピクチャ中央部分で、量子化スケールが大きくなると
いう欠点、すなわち中央部分の画質低下が、低減され得
る。逆に、Ao ≦Bo の場合は、中央部分での量子化ス
ケールがピクチャ内で大きくなっていない場合であり、
この場合は上述した欠点は発生されない。
As a result, the defect that the quantization scale becomes large in the central portion of the picture generated when Ao> Bo, that is, the image quality deterioration in the central portion can be reduced. On the contrary, when Ao ≤ Bo, the quantization scale in the central portion is not large in the picture,
In this case, the above-mentioned drawbacks do not occur.

【0038】この処理は、具体的には図7に示されてい
る。図7は、図1の符号量制御部23の要部を示したブロ
ック図である。スライス発生符号量算出部31から出力さ
れた符号量Gcと、スライス割当て符号量算出部32の出
力である符号量Acとが、減算器33にて減算される。こ
の減算(Gc−Ac)の割当て誤差値が、仮想バッファ
34の占有量と加算され、新たな仮想バッファ占有量とさ
れる。この仮想バッファ占有量が、スライスの平均仮想
バッファ占有量算出部35に入力され、1つのピクチャ内
の平均仮想バッファ占有量が算出される。
This process is specifically shown in FIG. FIG. 7 is a block diagram showing a main part of the code amount control unit 23 of FIG. The code amount Gc output from the slice generation code amount calculation unit 31 and the code amount Ac output from the slice allocation code amount calculation unit 32 are subtracted by the subtractor 33. The allocation error value of this subtraction (Gc-Ac) is the virtual buffer
It is added to the occupancy of 34 to make a new virtual buffer occupancy. This virtual buffer occupancy is input to the slice average virtual buffer occupancy calculation unit 35, and the average virtual buffer occupancy within one picture is calculated.

【0039】1つのピクチャの符号化が終了された時点
での仮想バッファ34の占有量Bo 、及び上記平均仮想バ
ッファ占有量Ao が、セレクタ36に入力される。このセ
レクタ36にて、両者の値のうち大きい方が選択され、量
子化スケール算出部28(図1参照)へ出力される。ま
た、Ao >Bo の場合には、Ao −Bo の差分量がスラ
イス割当て符号量算出部32へ出力される。このスライス
割当て符号量算出部32では、上記Ao −Bo の差分量
が、次に符号化される同種のピクチャの重要部分(例え
ば画像の中央部分)に分配される。以上の処理が行われ
ることにより、画像中央部分での画質劣化を防止するこ
とができる。
The occupancy amount Bo of the virtual buffer 34 at the time when the encoding of one picture is completed and the average virtual buffer occupancy amount Ao are input to the selector 36. The selector 36 selects the larger one of the two values and outputs it to the quantization scale calculator 28 (see FIG. 1). When Ao> Bo, the difference amount of Ao-Bo is output to the slice allocation code amount calculation unit 32. In the slice allocation code amount calculation unit 32, the difference amount of Ao-Bo is distributed to the important part (for example, the central part of the image) of the same type of picture to be encoded next. By performing the above processing, it is possible to prevent image quality deterioration in the central portion of the image.

【0040】[0040]

【発明の効果】以上のようにこの発明によれば、フレー
ム内符号化画像とフレーム間符号化画像の画質の比率が
一定になるように発生符号量が制御され、各画像内の画
質の変動を減少させることにより、全てのピクチャの画
質を均一にすることなく、Iピクチャ、Pピクチャ、B
ピクチャの各画質に重み付けた状態を維持し、且つ各ピ
クチャ内の画質の変動を低減すると共に各ピクチャ内の
視覚上の重要部分の画質を向上することのできる画像符
号化装置を提供することができる。
As described above, according to the present invention, the generated code amount is controlled so that the ratio of the image quality of the intra-frame coded image and the inter-frame coded image becomes constant, and the variation of the image quality within each image. To reduce I picture, P picture, B picture without making the picture quality of all pictures uniform.
(EN) Provided is an image encoding device capable of maintaining the weighted state of each image quality of a picture, reducing the fluctuation of the image quality within each picture, and improving the image quality of a visually important portion within each picture. it can.

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

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

【図2】デジタル化された画像データをマクロブロック
に分割した例を示す図である。
FIG. 2 is a diagram showing an example in which digitized image data is divided into macroblocks.

【図3】各変換係数の量子化ステップ幅の決定を説明す
る図である。
FIG. 3 is a diagram illustrating determination of a quantization step width of each transform coefficient.

【図4】量子化された変換係数の低周波成分から高周波
成分に順にジクザグスキャンされる状態を示した図であ
る。
FIG. 4 is a diagram showing a state in which a quantized transform coefficient is sequentially subjected to zigzag scanning from a low frequency component to a high frequency component.

【図5】仮想バッファ占有量と量子化スケールとの比例
関係を示した図である。
FIG. 5 is a diagram showing a proportional relationship between a virtual buffer occupation amount and a quantization scale.

【図6】(a)〜(c)は、それぞれIピクチャ、Pピ
クチャ及びBピクチャの仮想バッファ部の例を示した図
である。
6A to 6C are diagrams showing examples of virtual buffer units for I-pictures, P-pictures, and B-pictures, respectively.

【図7】図1の符号量制御部23の要部を示したブロック
図である。
7 is a block diagram showing a main part of a code amount control unit 23 of FIG.

【図8】(a)及び(b)は従来技術でIピクチャ、P
ピクチャ及びBピクチャを周期的に配列した例を示した
図であり、(b)は(a)のように配列されたピクチャ
の符号化する順番を示した図である。
8A and 8B are I-pictures and P-pictures in the related art.
It is the figure which showed the example which arranged the picture and the B picture periodically, (b) is the figure which showed the encoding order of the picture arranged like (a).

【図9】(a)及び(b)は従来技術で各ピクチャを仮
想バッファに蓄積する例を示した図である。
9A and 9B are diagrams showing an example of accumulating each picture in a virtual buffer according to a conventional technique.

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

11…減算器、12、14、29、30…スイッチ、13…予測器、
15…DCT、16…量子化器、17…符号化器、18…伝送バ
ッファ、19…逆量子化器、20…逆DCT、21…加算器、
22…予測モード判定器、23…符号量制御部、24…割当て
符号料算出部、25…Iピクチャ用仮想バッファ部、26…
Pピクチャ用仮想バッファ部、27…Bピクチャ用仮想バ
ッファ部、28…量子化スケール算出部。
11 ... Subtractor, 12, 14, 29, 30 ... Switch, 13 ... Predictor,
15 ... DCT, 16 ... Quantizer, 17 ... Encoder, 18 ... Transmission buffer, 19 ... Inverse quantizer, 20 ... Inverse DCT, 21 ... Adder,
22 ... Prediction mode determiner, 23 ... Code amount control unit, 24 ... Allocated code charge calculation unit, 25 ... Virtual buffer for I-picture, 26 ...
P picture virtual buffer unit, 27 ... B picture virtual buffer unit, 28 ... Quantization scale calculation unit.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 デジタル画像信号をフレーム内符号化の
みを行う第1の画像と、フレーム内及びフレーム間符号
化を選択して符号化を行う第2の画像で構成され、一定
の符号量となるように上記第1及び第2の各画像に符号
量を割当て、高能率符号化圧縮を行う画像符号化装置に
於いて、 上記各画像に割当てられた符号量となるように量子化ス
テップ幅を変化させる複数の仮想バッファ部を具備し、 上記複数の仮想バッファ部は上記各画像毎に独立して制
御されることを特徴とする画像符号化装置。
1. A first image for performing only intra-frame encoding of a digital image signal, and a second image for performing intra-frame and inter-frame encoding by selecting encoding, and having a constant code amount. In the image coding apparatus for allocating a code amount to each of the first and second images so as to perform high-efficiency coding compression, the quantization step width is set so that the code amount is allocated to each image. An image coding apparatus, comprising: a plurality of virtual buffer units for changing the above, wherein the plurality of virtual buffer units are independently controlled for each of the images.
【請求項2】 上記仮想バッファ部の量子化ステップ幅
の制御は、上記第1の画像及び第2の画像毎に、発生符
号量と割当て符号量との誤差が蓄積されて、上記各画像
毎のその占有量により別々に行われる請求項1に記載の
画像符号化装置。
2. The control of the quantization step width of the virtual buffer unit is performed for each image by accumulating an error between a generated code amount and an assigned code amount for each of the first image and the second image. The image encoding device according to claim 1, wherein the image encoding device is performed separately according to its occupation amount.
【請求項3】 上記仮想バッファ部は、上記各画像毎の
符号化終了時点での仮想バッファ占有量と、上記各画像
毎の平均仮想バッファ占有量とを比較して、大きい方の
占有量を使用して次の符号化画像の初期量子化ステップ
幅の算出を行い、平均仮想バッファ占有量が選択された
場合のみ、平均仮想バッファ占有量から符号化終了時点
での仮想バッファ占有量を差引いた差分量を、次の符号
化画像の割当て符号量に付加する請求項2に記載の画像
符号化装置。
3. The virtual buffer unit compares the virtual buffer occupancy at the end of encoding for each image with the average virtual buffer occupancy for each image, and determines the larger occupancy. The initial quantization step size of the next encoded image is calculated by using it, and only when the average virtual buffer occupancy is selected, the virtual buffer occupancy at the end of encoding is subtracted from the average virtual buffer occupancy. The image coding apparatus according to claim 2, wherein the difference amount is added to the assigned code amount of the next coded image.
【請求項4】 上記仮想バッファ部は、上記差分量の割
当て符号量を、画像内の視覚上重要な部分に重点的に分
配して付加する請求項3に記載の画像符号化装置。
4. The image coding apparatus according to claim 3, wherein the virtual buffer unit adds the allocated code amount of the difference amount by predominantly distributing it to a visually important portion in the image.
JP30907491A 1991-11-25 1991-11-25 Image coding device Expired - Fee Related JP3038066B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30907491A JP3038066B2 (en) 1991-11-25 1991-11-25 Image coding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30907491A JP3038066B2 (en) 1991-11-25 1991-11-25 Image coding device

Publications (2)

Publication Number Publication Date
JPH05153569A true JPH05153569A (en) 1993-06-18
JP3038066B2 JP3038066B2 (en) 2000-05-08

Family

ID=17988571

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30907491A Expired - Fee Related JP3038066B2 (en) 1991-11-25 1991-11-25 Image coding device

Country Status (1)

Country Link
JP (1) JP3038066B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0670663A1 (en) * 1994-03-02 1995-09-06 Laboratoires D'electronique Philips S.A.S. Method of and apparatus for coding digital signals representing a sequence of images
JP2009246513A (en) * 2008-03-28 2009-10-22 Canon Inc Moving image encoder, control method thereof, and computer program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0670663A1 (en) * 1994-03-02 1995-09-06 Laboratoires D'electronique Philips S.A.S. Method of and apparatus for coding digital signals representing a sequence of images
JP2009246513A (en) * 2008-03-28 2009-10-22 Canon Inc Moving image encoder, control method thereof, and computer program

Also Published As

Publication number Publication date
JP3038066B2 (en) 2000-05-08

Similar Documents

Publication Publication Date Title
JP3954656B2 (en) Image coding apparatus and method
JP3688730B2 (en) Quantizer
JP4373609B2 (en) Method and apparatus for adaptive encoding of video data stream
US7388995B2 (en) Quantization matrix adjusting method for avoiding underflow of data
JPH07184196A (en) Picture coder
JPH0898185A (en) Picture encoding device
US5717464A (en) Rate control for a video encoder
JP3259702B2 (en) Moving picture variable bit rate coding apparatus and method
JP3187097B2 (en) Code amount distribution method in moving picture coding and moving picture coding method and apparatus using the same
EP1032212A2 (en) Transcoder, transcoding system, and recording medium
JP3872849B2 (en) Video encoding device
JP2004274236A (en) Encoding apparatus, encoding method, program, and recording medium
KR20060103545A (en) Moving image encoding method and apparatus
JP3508916B2 (en) Moving image variable bit rate encoding method and apparatus
JP3818819B2 (en) Image coding method conversion apparatus, image coding method conversion method, and recording medium
JP3480067B2 (en) Image coding apparatus and method
JPH08130746A (en) Coefficient quantization processing method
JPH07203430A (en) Image coding device
JP3038066B2 (en) Image coding device
JP3902948B2 (en) Video encoding device
JP3734286B2 (en) Video encoding device and video transmission device
US7391916B2 (en) Quantization matrix adjusting method for quality improvement
JP2919990B2 (en) Image data compression method
JP3779066B2 (en) Video encoding device
JPH07131793A (en) Video signal high efficiency coding device

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20000125

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090225

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090225

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100225

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees