JPH10155152A - Image compression coder and its method - Google Patents

Image compression coder and its method

Info

Publication number
JPH10155152A
JPH10155152A JP25908797A JP25908797A JPH10155152A JP H10155152 A JPH10155152 A JP H10155152A JP 25908797 A JP25908797 A JP 25908797A JP 25908797 A JP25908797 A JP 25908797A JP H10155152 A JPH10155152 A JP H10155152A
Authority
JP
Japan
Prior art keywords
quantization width
bit generation
generation error
dmb
bit
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
JP25908797A
Other languages
Japanese (ja)
Other versions
JP3151173B2 (en
Inventor
Noboru Katsuta
昇 勝田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP25908797A priority Critical patent/JP3151173B2/en
Publication of JPH10155152A publication Critical patent/JPH10155152A/en
Application granted granted Critical
Publication of JP3151173B2 publication Critical patent/JP3151173B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an image coder and its method by which a picture is coded at an object bit rate while keeping image quality of a reproduced image stably. SOLUTION: A rate control section 3 obtains an actual bit production quantity Bmb per one block every time each macro block of one picture is sequentially coded, obtains an accumulated bit production error Dmb by the coding so far and a quantization width q-scale is obtained by substituting the bit error Dmb to a function f (R, Dmb). The quantization width q-scale is given to a basic coding processing section 1. The basic coding processing section 1 applies quantization to each transformation coefficient obtained by DCT transformation in response to the quantization width q-scale, the quantization data are subject to variable length coding and compression coded image data are generated and the image data are sent through an encoder transmission buffer 2.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、映像信号を圧縮符
号化するための画像圧縮符号化装置及び方法に関するも
のであり、特に符号化する際の量子化幅の制御、ビット
発生量の制御等に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image compression encoding apparatus and method for compressing and encoding a video signal, and more particularly to control of a quantization width in encoding and control of a bit generation amount. It is about.

【0002】[0002]

【従来の技術】映像信号の圧縮符号化に関する技術とし
ては、例えばISO/IEC 13818-2(通称MPEG2)にお
けるディジタル圧縮符号化データの国際標準フォーマッ
トがあり、ここに、その復号方法が示されている。ま
た、そのフォーマットに符号化する代表的な方法とし
て、ISO-IEC/JTC/SC29/WG11 N0328の"Test Model 3"に
その記述がある。
2. Description of the Related Art As a technique relating to compression encoding of a video signal, for example, there is an international standard format of digital compression encoding data in ISO / IEC 13818-2 (commonly known as MPEG2), and a decoding method thereof is shown here. I have. Further, as a typical method of encoding in the format, there is a description in "Test Model 3" of ISO-IEC / JTC / SC29 / WG11 N0328.

【0003】MPEG2の符号化において、映像信号
は、各ピクチャー間の動きの補償並びに予測と、この予
測の誤差のDCT符号化が行われる。このDCTの変換
係数を量子化する際、その量子化幅によってビット発生
量が増減する。映像信号を所望のデータ量に圧縮する場
合、符号化に費やされたビット発生量に応じて量子化幅
を制御し、データ量の調整を行う。
In MPEG2 encoding, a video signal is subjected to motion compensation and prediction between pictures, and DCT encoding of a prediction error. When quantizing the transform coefficients of the DCT, the bit generation amount increases or decreases depending on the quantization width. When a video signal is compressed to a desired data amount, the quantization width is controlled according to the amount of bits generated for encoding, and the data amount is adjusted.

【0004】ISO-IEC/JTC/SC29/WG11 N0328の"Test Mod
el 3"においては、符号化された画像データを所望の一
定のビットレートで復号化装置に入力し、映像信号を再
生できるような該映像信号の量子化幅の決定方法が示さ
れている。
[0004] ISO-IEC / JTC / SC29 / WG11 N0328 "Test Mod
In el 3 ", a method for determining the quantization width of a video signal so that the video signal can be reproduced by inputting the encoded image data at a desired constant bit rate to a decoding device is shown.

【0005】"Test Model 3"においては、複数のピクチ
ャーからなるグループオブピクチャー(以後GOP)毎
に、目標ビットレートから目標ビット数を換算して求
め、更に、目標ビット数をGOPの各ピクチャーI,
P,B(ピクチャーIはGOPの先頭のもの、ピクチャ
ーPは複数のピクチャー毎に設定されるのもの、ピクチ
ャーBはIとP間のもの)に割り当て、これらのピクチ
ャーの符号化を行う。
In "Test Model 3", a target number of bits is converted from a target bit rate for each group of pictures (hereinafter referred to as a GOP) composed of a plurality of pictures, and the target number of bits is calculated for each picture I of the GOP. ,
P and B (picture I is at the head of the GOP, picture P is set for each of a plurality of pictures, picture B is between I and P), and these pictures are coded.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、この様
な方法では、過去のGOPの各ピクチャーの符号化に費
やしたビット発生量に基づいて、現在のGOPの目標ビ
ット発生量を調整して求め、この目標ビット発生量を該
GOPの各ピクチャーに割り当てるため、シーンチェン
ジやピクチャー内での映像の動きの増加などによって、
各ピクチャーI,P,Bの情報量の割合が過去のGOP
と大きく異なる場合、各ピクチャーI,P,Bに割り当
てられるビット量が不適切となる。この様な各ピクチャ
ーI,P、Bの情報量の割合は、通常でも2倍以上変化
することが多く、シーンチェンジがあった場合には、ピ
クチャーBでもピクチャーIと同程度のビット量を割り
当てる必要があったり、更に複雑な映像のシーンになっ
た場合は、情報量事態が十倍近く増えることもあり、ピ
クチャーに割り当てられるビット量が不足し、このピク
チャーに対応する再生画像の画質が大きく劣化してしま
うと言う問題があった。
However, in such a method, the target bit generation amount of the current GOP is adjusted and obtained based on the bit generation amount used for encoding each picture of the past GOP. In order to allocate the target bit generation amount to each picture of the GOP, a scene change, an increase in video motion in the picture, etc.
The ratio of the information amount of each picture I, P, B is the past GOP
In the case where the bit amount is significantly different from the above, the bit amount allocated to each of the pictures I, P, and B becomes inappropriate. The ratio of the information amount of each of the pictures I, P, and B often changes by a factor of two or more even in a normal case, and when there is a scene change, the same bit amount as that of the picture I is assigned to the picture B. If it becomes necessary or the scene becomes more complex, the amount of information may increase by a factor of nearly ten, and the amount of bits allocated to the picture will be insufficient, and the quality of the reproduced image corresponding to this picture will increase. There was a problem that it deteriorated.

【0007】また、GOP単位でビット発生量を制御す
るため、例えば、GOPの後半付近、つまりGOPの最
後の数ピクチャーで、シーンチェンジ等が発生した場合
は、割り当てるビット量が完全に不足してしまうため、
ピクチャーの符号化の難易度が急激に上昇し、このピク
チャーに対応する再生画像の画質が極端に劣化してしま
うと言う問題があった。
Further, since the bit generation amount is controlled in GOP units, for example, when a scene change or the like occurs near the latter half of the GOP, that is, in the last few pictures of the GOP, the bit amount to be allocated is completely insufficient. Because
There is a problem that the degree of difficulty in encoding a picture sharply increases and the image quality of a reproduced image corresponding to the picture is extremely deteriorated.

【0008】一方、1つのピクチャーにおいては、ピク
チャーを構成する各マクロブロックの符号化に費やされ
る各ビット量が一定であると仮定して、目標ビット発生
量を算出し、この目標ビット発生量と実際のビット発生
量の比較に基づいて映像信号の量子化幅を制御し、1ピ
クチャーにおいて、実際のビット発生量が目標ビット発
生量となる様な調整を行っている。
On the other hand, in one picture, a target bit generation amount is calculated by assuming that each bit amount used for encoding each macroblock constituting the picture is constant. The quantization width of the video signal is controlled based on the comparison of the actual bit generation amount, and adjustment is performed so that the actual bit generation amount becomes the target bit generation amount in one picture.

【0009】しかしながら、ピクチャー内の映像とその
背景部等の位置によって、情報量が極端に異なる場合が
あり、ピクチャー内のビット割り当てがうまくできな
い。例えば、ピクチャーの各マクロブロックの後半に複
雑な絵柄等が存在する場合、前半の簡単な部分に多くの
ビットが割り当てられてしまい、後半で予想以上のビッ
ト発生量となってしまったり、逆に前半に複雑な絵柄が
ある場合には、前半でビット発生量が必要以上に抑制さ
れてしまい、後半でビット発生量が必要以上に割り当て
られてしまい、1枚のピクチャー内で本来割り当てられ
るべき部分でビットが割り当てられないと言う問題があ
った。
[0009] However, the amount of information may be extremely different depending on the position of the video in the picture and its background, and the bit allocation in the picture cannot be performed well. For example, if a complex pattern exists in the second half of each macroblock of a picture, many bits will be allocated to the simple part of the first half, and the bit generation amount will be more than expected in the second half, or conversely If there is a complicated picture in the first half, the bit generation amount is suppressed more than necessary in the first half, and the bit generation amount is allocated more than necessary in the second half, and the part that should be allocated in one picture There was a problem that bits could not be allocated.

【0010】また、実際のビット発生量を目標ビット発
生量に調整すると言う制御方法であっても、復号化装置
側で想定されるVBVバッファ(仮想バッファ)の占有
量を考慮していないため、別途、VBVバッファからの
制約条件によって、各ピクチャーに対するビット配分な
どを修正する必要があり、この場合には、さらに再生画
像の画質の劣化を招いていた。
Further, even in the control method of adjusting the actual bit generation amount to the target bit generation amount, the occupation amount of the VBV buffer (virtual buffer) assumed on the decoding device side is not taken into consideration. Separately, it is necessary to correct the bit allocation and the like for each picture according to the constraint conditions from the VBV buffer, and in this case, the image quality of the reproduced image is further deteriorated.

【0011】このような映像信号の符号化の難易度の変
化を原因として、再生画像の画質が不安定になりかつ劣
化するのを防ぐには、映像信号の量子化幅をできるだけ
均一に保つことであるが、量子化幅を一定にすると、画
像の符号化の難易度に応じてビット発生量が無秩序に増
加するため、目標ビットレートで映像信号を符号化する
ことが困難となる。
In order to prevent the image quality of a reproduced image from becoming unstable and deteriorating due to such a change in the degree of difficulty in encoding the video signal, the quantization width of the video signal should be kept as uniform as possible. However, if the quantization width is fixed, the amount of bits generated randomly increases in accordance with the degree of difficulty in encoding an image, and it becomes difficult to encode a video signal at a target bit rate.

【0012】本発明は、上記従来の問題を解決するもの
であって、シーンチェンジのときのピクチャー、あるい
は複雑なピクチャーであっても、常に適切なビット量を
割り当てることができ、また、ピクチャー内の各マクロ
ブロックに対しても、それぞれの複雑さに応じて最適な
ビットを割り当てることができ、再生画像の画質を安定
に維持しつつ、目標ビットレートでピクチャーの符号化
を行うことが可能な画像圧縮符号化装置および方法を提
供するものである。
The present invention solves the above-mentioned conventional problem. An appropriate bit amount can always be assigned to a picture at the time of a scene change or a complicated picture. The optimal bits can be assigned to each macroblock according to the complexity of each macroblock, and the picture can be encoded at the target bit rate while maintaining the image quality of the reproduced image stably. An image compression encoding apparatus and method are provided.

【0013】[0013]

【課題を解決するための手段】上記課題を解決するため
に、本発明は、映像信号を符号化するときの量子化幅を
求め、この量子化幅に基づいて該映像信号を符号化する
画像圧縮符号化装置であって、前記映像信号の符号化に
費やされた実際のビット発生量を求めると共に、目標ビ
ットレートに応じた目標ビット発生量を求め、前記実際
のビット発生量と前記目標ビット発生量の差であるビッ
ト発生誤差を求めて、このビット発生誤差に対応する量
子化幅を求めており、前記ビット発生誤差の予め定めら
れた範囲においては、ビット発生誤差の変化に対して量
子化幅が小さく変化する特性を設定し、この特性に基づ
いてビット発生誤差に対する量子化幅を求める制御手段
を備えている。
SUMMARY OF THE INVENTION In order to solve the above-mentioned problems, the present invention obtains a quantization width for encoding a video signal, and calculates an image for encoding the video signal based on the quantization width. A compression encoding apparatus, wherein an actual bit generation amount used for encoding the video signal is obtained, a target bit generation amount corresponding to a target bit rate is obtained, and the actual bit generation amount and the target bit generation amount are calculated. A bit generation error, which is a difference between the bit generation amounts, is obtained, and a quantization width corresponding to the bit generation error is obtained.In a predetermined range of the bit generation error, a change in the bit generation error is determined. There is provided control means for setting a characteristic in which the quantization width changes small, and for obtaining a quantization width for a bit generation error based on the characteristic.

【0014】1つの実施形態では、基準量子化幅が予め
定められており、制御手段は、目標ビットレートからビ
ット発生誤差に対応する値を差し引いた値と該目標ビッ
トレートの比を求めて、この比と前記基準量子化幅を積
算し、この積に基づいて映像信号を符号化するときの量
子化幅を求めている。
In one embodiment, a reference quantization width is predetermined, and the control means calculates a ratio of a value obtained by subtracting a value corresponding to a bit generation error from a target bit rate and the target bit rate. The ratio and the reference quantization width are integrated, and the quantization width when encoding the video signal is determined based on the product.

【0015】1つの実施形態では、制御手段は、目標ビ
ットレートに基づいて基準量子化幅を求め、ビット発生
誤差の予め定められた範囲においては、ビット発生誤差
の変化に対して量子化幅が前記基準量子化幅近傍で小さ
く変化する特性を設定し、この特性に基づいてビット発
生誤差に対する量子化幅を求めている。
In one embodiment, the control means obtains a reference quantization width based on the target bit rate, and in a predetermined range of the bit generation error, the control unit determines the quantization width with respect to a change in the bit generation error. A characteristic that changes slightly near the reference quantization width is set, and a quantization width for a bit generation error is determined based on this characteristic.

【0016】1つの実施形態では、ビット発生誤差の予
め定められた範囲及び該範囲の近傍においては、ビット
発生誤差の変化に対する量子化幅の変化の特性がヒステ
リシスループを描いている。
In one embodiment, in a predetermined range of the bit generation error and in the vicinity of the predetermined range, the characteristic of the change of the quantization width with respect to the change of the bit generation error draws a hysteresis loop.

【0017】1つの実施形態では、映像信号を符号化し
てなる各画像データを順次入力して、これらの画像デー
タを順次出力する仮想バッファを想定した場合は、この
仮想バッファの占有量がビット発生誤差に対応し、この
仮想バッファの占有量が0近傍になると、量子化幅が急
峻に最大値に近づき、かつビット発生誤差の変化に対し
て小さく変化する該量子化幅の特性に連なる様に、該量
子化幅が連続的に変化する。
In one embodiment, when a virtual buffer for sequentially inputting image data obtained by encoding a video signal and sequentially outputting the image data is assumed, the occupation amount of the virtual buffer is determined by the number of bits generated. In response to the error, when the occupation amount of the virtual buffer becomes close to 0, the quantization width sharply approaches the maximum value, and is connected to the characteristic of the quantization width that changes little with the change of the bit generation error. , The quantization width changes continuously.

【0018】1つの実施形態では、ビット発生誤差の複
数の範囲が予め定められ、これらの範囲毎に、ビット発
生誤差の変化に対する量子化幅の変化を示す特性が設定
され、制御手段は、前記各範囲のうちからビット発生誤
差の入る範囲を選択して、この範囲の特性に基づいて、
ビット発生誤差に対する量子化幅を求めている。
In one embodiment, a plurality of ranges of the bit generation error are predetermined, and a characteristic indicating a change in the quantization width with respect to the change in the bit generation error is set for each of these ranges. From the range, select the range in which the bit generation error falls, and based on the characteristics of this range,
The quantization width for the bit generation error is determined.

【0019】1つの実施形態では、MPEG規格に準拠
して、映像信号をマクロブロック単位で量子化幅に基づ
いて符号化しており、制御手段は、マクロブロック毎
に、ビット発生誤差に対応する量子化幅を求めている。
In one embodiment, the video signal is encoded in macroblock units based on the quantization width in accordance with the MPEG standard, and the control means controls, for each macroblock, a quantum signal corresponding to a bit generation error. Seeking the extent of change.

【0020】次に、本発明の作用を説明する。Next, the operation of the present invention will be described.

【0021】本発明によれば、実際のビット発生量と前
記目標ビット発生量の差であるビット発生誤差を求め
て、このビット発生誤差に対応する量子化幅を求めてお
り、前記ビット発生誤差の予め定められた範囲において
は、ビット発生誤差の変化に対して量子化幅が小さく変
化する特性を設定し、この特性に基づいてビット発生誤
差に対する量子化幅を求めている。このため、ビット発
生誤差の予め定められた範囲において該ビット発生誤差
が変化している状態では、量子化幅が大きく変化せず、
GOP内の各ピクチャーI,P,Bのいずれに対して
も、略同様の目標ビット発生量が割り当てられ、これら
のピクチャーに対応する各再生画像の画質が安定する。
また、1つのピクチャーにおいても、ビット発生誤差の
予め定められた範囲において該ビット発生誤差が変化し
ている限り、適切な量子化幅を設定して、ピクチャーの
符号化の難易度に応じて適切な目標ビット発生量を割り
当てることができる。
According to the present invention, a bit generation error which is a difference between an actual bit generation amount and the target bit generation amount is obtained, and a quantization width corresponding to the bit generation error is obtained. In the predetermined range, a characteristic is set in which the quantization width changes small with a change in the bit generation error, and the quantization width for the bit generation error is obtained based on this characteristic. For this reason, in a state where the bit generation error changes within a predetermined range of the bit generation error, the quantization width does not change significantly,
Approximately the same target bit generation amount is assigned to each of the pictures I, P, and B in the GOP, and the image quality of each reproduced image corresponding to these pictures is stabilized.
Also, in one picture, as long as the bit generation error changes within a predetermined range of the bit generation error, an appropriate quantization width is set, and an appropriate quantization width is set according to the difficulty of encoding the picture. It is possible to assign a desired target bit generation amount.

【0022】1つの実施形態の様に、目標ビットレート
からビット発生誤差に対応する値を差し引いた値と該目
標ビットレートの比を求めて、この比と前記基準量子化
幅を積算し、この積に基づいて、映像信号を符号化する
ときの量子化幅を求めても良い。この場合、ビット発生
誤差が増加する程、量子化幅が大きくなり、ビット発生
誤差が減少する程、量子化幅が小さくなる。
As in one embodiment, a ratio between a value obtained by subtracting a value corresponding to a bit generation error from a target bit rate and the target bit rate is obtained, and this ratio and the reference quantization width are integrated. The quantization width when encoding the video signal may be obtained based on the product. In this case, as the bit generation error increases, the quantization width increases, and as the bit generation error decreases, the quantization width decreases.

【0023】1つの実施形態の様に、ビット発生誤差の
予め定められた範囲においては、ビット発生誤差の変化
に対して量子化幅が基準量子化幅近傍で小さく変化する
特性を設定し、この特性に基づいてビット発生誤差に対
する量子化幅を求めても良い。これによって、前記範囲
において、適切な量子化幅を設定することができる。
As in one embodiment, within a predetermined range of the bit generation error, a characteristic is set in which the quantization width changes slightly near the reference quantization width with respect to the change of the bit generation error. The quantization width for the bit generation error may be obtained based on the characteristics. Thus, an appropriate quantization width can be set in the above range.

【0024】1つの実施形態の様に、ビット発生誤差の
予め定められた範囲及び該範囲の近傍においては、ビッ
ト発生誤差の変化に対する量子化幅の変化の特性がヒス
テリシスループを描いても良い。この場合は、ビット発
生誤差が前記範囲から外れるまで変化し、これに伴って
量子化幅が変化したとときには、ビット発生誤差が該範
囲に戻っても、量子化幅が同一の値まで戻らず、ビット
発生誤差の変化に対する量子化幅の変化の特性が新たに
なる。
As in one embodiment, in the predetermined range of the bit generation error and in the vicinity of the predetermined range, the characteristic of the change of the quantization width with respect to the change of the bit generation error may form a hysteresis loop. In this case, if the bit generation error changes until it goes out of the range and the quantization width changes accordingly, even if the bit generation error returns to the range, the quantization width does not return to the same value. , The characteristic of the change of the quantization width with respect to the change of the bit generation error becomes new.

【0025】1つの実施形態の様に、仮想バッファ(V
BVバッファ)の占有量がビット発生誤差に対応し、こ
の仮想バッファの占有量が0近傍になると、量子化幅が
急峻に最大値に近づき、かつビット発生誤差の変化に対
して小さく変化する該量子化幅の特性に連なる様に、該
量子化幅が連続的に変化しても良い。この場合、仮想バ
ッファの占有量が0近傍になると、量子化幅が急峻に最
大値に近づくので、仮想バッファのアンダーフローを防
止することができる。
As in one embodiment, the virtual buffer (V
(BV buffer) corresponds to the bit generation error, and when the occupation amount of this virtual buffer approaches 0, the quantization width sharply approaches the maximum value and changes little with the change of the bit generation error. The quantization width may change continuously so as to be connected to the characteristics of the quantization width. In this case, when the occupation amount of the virtual buffer is close to 0, the quantization width sharply approaches the maximum value, so that underflow of the virtual buffer can be prevented.

【0026】1つの実施形態の様に、ビット発生誤差の
各範囲のうちからビット発生誤差の入る範囲を選択し
て、この範囲の特性に基づいて、ビット発生誤差に対す
る量子化幅を求めても良い。この場合、ビット発生誤差
の大きさに応じて、適切な特性を選択し、この特性に基
づいて量子化幅を定めることができる。
As in one embodiment, a range in which a bit generation error is included is selected from each range of the bit generation error, and the quantization width for the bit generation error is obtained based on the characteristics of this range. good. In this case, an appropriate characteristic can be selected according to the magnitude of the bit generation error, and the quantization width can be determined based on this characteristic.

【0027】1つの実施形態の様に、MPEG規格に準
拠して、映像信号をマクロブロック単位で量子化幅に基
づいて符号化しても良い。この様なマクロブロック単位
の符号化であっても、先に述べた様に、ビット発生誤差
の予め定められた範囲において該ビット発生誤差が変化
している限り、適切な量子化幅を設定して、ピクチャー
の符号化の難易度に応じて適切な目標ビット発生量を割
り当てることができる。
As in one embodiment, the video signal may be encoded in macroblock units based on the quantization width in accordance with the MPEG standard. As described above, even in such a coding in units of macroblocks, an appropriate quantization width is set as long as the bit generation error changes within a predetermined range of the bit generation error. Thus, an appropriate target bit generation amount can be assigned according to the degree of difficulty in encoding a picture.

【0028】[0028]

【発明の実施の形態】以下、本発明の実施形態を添付図
面を参照して説明する。図1は、本発明の画像圧縮符号
化装置の第1実施形態を概略的に示すブロック図であ
る。この第1実施形態の符号化装置においては、映像信
号を基本符号化処理部1によって画像データに符号化
し、この画像データをエンコーダ送出バッファ2を通じ
て送出している。また、レート制御部3は、基本符号化
処理部1によって映像信号を符号化するときの量子化幅
q_scaleを制御している。
Embodiments of the present invention will be described below with reference to the accompanying drawings. FIG. 1 is a block diagram schematically showing a first embodiment of the image compression encoding apparatus of the present invention. In the encoding apparatus according to the first embodiment, a video signal is encoded into image data by a basic encoding processing unit 1, and the image data is transmitted through an encoder transmission buffer 2. Further, the rate control unit 3 controls the quantization width q_scale when encoding the video signal by the basic encoding processing unit 1.

【0029】ここで、映像信号の符号化処理の概略を図
2を参照して説明しておく。符号化される映像信号の各
ピクチャーは、複数のマクロブロックに分割されて符号
化される。1つのマクロブロックは、輝度について、1
6×16画素ブロックのデータ(更に基本符号化処理単
位である4つの8×8画素ブロックに分けられる)、色
差について、基本符号化処理単位である2つの8×8画
素ブロックのデータに分けられ、これらのブロックが符
号化される。また、1つのマクロブロックにおいて、マ
クロブロック内のブロックの符号化方法および量子化幅
等を決定する。
Here, the outline of the encoding process of the video signal will be described with reference to FIG. Each picture of the video signal to be encoded is divided into a plurality of macroblocks and encoded. One macroblock has a luminance of 1
Data of a 6 × 16 pixel block (further divided into four 8 × 8 pixel blocks, which are basic encoding processing units), and color differences are divided into data of two 8 × 8 pixel blocks, which are basic encoding processing units. , These blocks are encoded. Also, for one macroblock, the coding method and quantization width of the blocks in the macroblock are determined.

【0030】スライスは、複数のマクロブロックを含む
データ単位であって、複数のスライスから1つのピクチ
ャーが構成される。ピクチャーは、その符号化方法とし
て、ピクチャー自体がそのまま符号化されるピクチャー
(イントラピクチャー:以後ピクチャーI)、時間的に
過去のピクチャーからの動きを予測した上で、符号化さ
れるピクチャー(以後 ピクチャーP)、時間的に過去
及び未来の両方、もしくはいずれか一方のピクチャーか
らの動きを予測した上で、符号化されるピクチャー(以
後 ピクチャーB)がある。
A slice is a data unit including a plurality of macroblocks, and one picture is composed of a plurality of slices. As for the picture encoding method, a picture (intra picture: hereinafter referred to as picture I) in which the picture itself is encoded as is, and a picture to be encoded after predicting motion from a temporally past picture (hereinafter referred to as picture I) P) There is a picture (hereinafter referred to as picture B) that is coded after predicting the motion from both or either temporally past and future pictures.

【0031】図2における各ピクチャーI,P,Bの配
置は、その典型的な例であり、最初のピクチャーIを用
いて3枚先のピクチャーPを予測して符号化し、その間
に含まれる各ピクチャーBを各ピクチャーI,Pの両方
から予測して符号化している。したがって、最初にピク
チャーIを符号化し、次にピクチャーPを符号化し、更
に各ピクチャーBを符号化することになり、このために
本来の時間の進行に沿った各ピクチャーI,P,Bの順
序を変更してから、これらのピクチャーを符号化する必
要がある。
The arrangement of the pictures I, P, and B in FIG. 2 is a typical example. The picture P is predicted and encoded three pictures ahead using the first picture I, and each picture included in the picture P is predicted. Picture B is encoded by predicting it from both pictures I and P. Therefore, picture I is encoded first, picture P is encoded next, and each picture B is encoded. Therefore, the order of each picture I, P, B along the original time progression is determined. Must be changed before encoding these pictures.

【0032】さらに、ピクチャーIから始まる複数のピ
クチャーからGOP(グループオブピクチャー)を構成
し、さらに任意の数のGOPで1つのビデオシーケンス
を構成する。
Further, a GOP (group of pictures) is composed of a plurality of pictures starting from picture I, and one video sequence is composed of an arbitrary number of GOPs.

【0033】この様な符号化は、図1の装置における基
本符号化処理部1で行われる。この基本符号化処理部1
の構成を図3に示す。
Such encoding is performed by the basic encoding processing unit 1 in the apparatus shown in FIG. This basic encoding processing unit 1
3 is shown in FIG.

【0034】図3において、11は、各ピクチャーを示
す映像信号を入力し、これらのピクチャーを符号化する
順番にならび替える画像並び替え部、12は、ピクチャ
ーを符号化される単位であるマクロブロックに変換する
走査変換処理部、13は、マクロブロックとピクチャー
内の映像の動作に応じた予測データとの差を求める差分
部、14は、差分部14から出力された差を符号化する
DCT変換処理部、15は、重みづけ量子化処理部、1
6は、可変長符号化処理部、17は、逆量子化部、18
は、逆DCT処理部、19は、動き補償付き予測処理
部、20は、モード判定部、21は、動き検出処理部、
22は、加算処理部である。
In FIG. 3, reference numeral 11 denotes an image rearranging unit for inputting a video signal indicating each picture, and rearranging these pictures in an encoding order; and 12, a macroblock which is a unit for encoding the picture. A scan conversion processing unit 13 for converting the difference between the macroblock and the prediction data according to the video operation in the picture; and a DCT transform 14 for encoding the difference output from the difference unit 14 The processing unit 15 is a weighted quantization processing unit,
6 is a variable length coding processing unit, 17 is an inverse quantization unit, 18
Is an inverse DCT processing unit, 19 is a prediction processing unit with motion compensation, 20 is a mode determination unit, 21 is a motion detection processing unit,
22 is an addition processing unit.

【0035】この様な構成の符号化処理部1において、
画像並び替え部11は、映像信号によって示される各ピ
クチャーを入力し、これらのピクチャーの順序を符号化
する順番に入れ替えてから、これらのピクチャーを走査
線変換処理部12に順次出力する。
In the encoding processing unit 1 having such a configuration,
The image rearranging unit 11 inputs each picture indicated by the video signal, rearranges the order of these pictures to the order of encoding, and sequentially outputs these pictures to the scanning line conversion processing unit 12.

【0036】走査線変換処理部12は、各ピクチャーを
入力する度に、ピクチャーを複数のマクロブロックに分
割し、これらのマクロブロックを差分部13に順次出力
する。差分部13は、走査線変換処理部12からのマク
ロブロックと動き補償付き予測処理部19からの予測デ
ータとの差分を求め、この差を予測誤差として出力す
る。DCT変換処理部14は、この予測誤差を8×8画
素ブロック単位でDCT変換し、このDCT変換により
得られた各変換係数を重みづけ量子化処理部15に出力
する。重みづけ量子化処理部15は、各変換係数を量子
化し、これにより得た量子化データを可変長符号化処理
部16に出力する。可変長符号化処理部16は、量子化
データを可変長符号化して、圧縮符号化された画像デー
タを形成する。この圧縮符号化された画像データは、所
望の伝送レートで伝送するためにエンコーダ送出バッフ
ァに一旦蓄えられてから出力される。
The scanning line conversion processing section 12 divides a picture into a plurality of macroblocks each time each picture is input, and sequentially outputs these macroblocks to the difference section 13. The difference unit 13 obtains a difference between the macroblock from the scanning line conversion processing unit 12 and the prediction data from the prediction processing unit with motion compensation 19, and outputs this difference as a prediction error. The DCT transform processing unit 14 performs a DCT transform on the prediction error in units of 8 × 8 pixel blocks, and outputs each transform coefficient obtained by the DCT transform to the weighting quantization unit 15. The weighting quantization processing unit 15 quantizes each transform coefficient, and outputs the resulting quantized data to the variable-length coding processing unit 16. The variable-length encoding unit 16 performs variable-length encoding on the quantized data to form compression-encoded image data. The compression-encoded image data is temporarily stored in an encoder transmission buffer for transmission at a desired transmission rate, and then output.

【0037】一方、重みづけ量子化処理部15から出力
された量子化データは、逆量子化部17及び逆DCT処
理部18によって再生処理されてから、動き補償付き予
測部19に入力され、ここで動きを予測されたピクチャ
ーを示す予測データが形成される。この予測データは、
差分部13に入力され、ここで予測データと走査線変換
処理部12からのマクロブロックの差分が求められる。
動き検出処理部21は、各マクロブロック毎に、映像の
動きベクトルを算出し、この動きベクトルを動き補償付
き予測処理部19に入力するとともに可変長符号化処理
部16に送る。レート制御部3は、可変長符号化処理部
16から出力されたビットストリームのビット発生量と
目標ビットレートから換算した目標ビット発生量を比較
し、最終的に目標ビット発生量で符号化が完了するよう
に重みづけ量子化部15の量子化幅q_scaleを制御す
る。
On the other hand, the quantized data output from the weight quantization processing unit 15 is reproduced by an inverse quantization unit 17 and an inverse DCT processing unit 18 and then input to a motion-compensated prediction unit 19. To form prediction data indicating a picture whose motion has been predicted. This forecast data
The difference is input to the difference unit 13, where the difference between the prediction data and the macroblock from the scanning line conversion processing unit 12 is calculated.
The motion detection processing unit 21 calculates a motion vector of a video for each macroblock, inputs the motion vector to the prediction processing unit 19 with motion compensation, and sends the motion vector to the variable length coding processing unit 16. The rate control unit 3 compares the bit generation amount of the bit stream output from the variable length coding processing unit 16 with the target bit generation amount converted from the target bit rate, and finally completes the encoding with the target bit generation amount. The quantization width q_scale of the weighting quantization unit 15 is controlled so that

【0038】ただし、MPEGの規格においては、VB
Vと呼ばれる仮想復号器を想定し、このVBVの入力バ
ッファ(以下VBVバッファと称す)がオーバーフロー
したり、アンダーフローしない様に制御しなければなら
ない。このVBVバッファの入出力は規定されている。
However, in the MPEG standard, VB
Assuming a virtual decoder called V, the input buffer of this VBV (hereinafter referred to as VBV buffer) must be controlled so as not to overflow or underflow. The input / output of this VBV buffer is defined.

【0039】図4は、映像信号を固定レートで符号化す
るときのVBVバッファ中のデータ占有量を示してい
る。図4において、横軸は、時刻であり、1目盛りが1
ピクチャの入力に費やされる時間を示している。縦軸
は、VBVバッファのデータ占有量VBV_fullnessで
ある。最初は、画像データを再生せず、画像データのピ
クチャーヘッダによって示される期間VBV_delay、つ
まり1ピクチャーを符号化してなる画像データが入力さ
れる時点T1から時点T2までの期間だけ、画像データ
をVBVバッファに貯える。このときのVBVバッファ
の占有量VBV_fullnessは、画像データが一定レート
で入力されるため、傾き一定の直線で表される。次に、
ピクチャーの再生が行われる時点T3(=T2)で、1
ピクチャー分の画像データが瞬間的にVBVバッファよ
り除去される。そして、次のピクチャーの再生が行われ
る直前の時点T4までに、1ピクチャー分のビット量だ
けVBVバッファの占有量VBV_fullnessが増加し、
ピクチャーの再生の時点T5(=T4)で、瞬間的に1
ピクチャー分の画像データが除去される。以降、同様に
動作して、VBVバッファの占有量VBV_fullnessが
VBVバッファのサイズVBV_sizeから出ないよう
に、つまりアンダーフロー及びオーバーフローを招かな
い様に、符号化装置では、画像データの送出を制御する
必要がある。
FIG. 4 shows the data occupancy in the VBV buffer when encoding a video signal at a fixed rate. In FIG. 4, the horizontal axis represents time, and one scale is 1
Shows the time spent on picture input. The vertical axis is the data occupancy VBV_fullness of the VBV buffer. At first, the image data is not reproduced, and the image data is stored in the VBV buffer for a period VBV_delay indicated by the picture header of the image data, that is, a period from time T1 to time T2 when image data obtained by encoding one picture is input. To save. At this time, the occupation amount VBV_fullness of the VBV buffer is represented by a straight line with a constant slope because image data is input at a constant rate. next,
At time T3 (= T2) when the picture is reproduced, 1
Image data for a picture is instantaneously removed from the VBV buffer. By the time T4 immediately before the reproduction of the next picture is performed, the occupancy VBV_fullness of the VBV buffer is increased by the bit amount of one picture,
At time T5 (= T4) of picture reproduction, 1
Image data for the picture is removed. Thereafter, the encoder operates in a similar manner to control the transmission of image data so that the occupation amount VBV_fullness of the VBV buffer does not exceed the size VBV_size of the VBV buffer, that is, so that underflow and overflow do not occur. There is.

【0040】さて、基本符号化処理部1の可変長符号化
処理部16は、各マクロブロックの符号化が終了する度
に、MBエンドタイミング信号をレート制御部3に送出
す共に、1ピクチャーの符号化が終了する度に、ピクチ
ャー開始タイミング信号をレート制御部3へ送る。レー
ト制御部3は、MBエンドタイミング信号を入力する度
に、可変長符号化処理部16からのビットストリームに
基づいて1マクロブロック当たりの実際のビット発生量
Bmbを求め、このビット発生量Bmbに基づいて量子化幅
q_scaleを決定し、この量子化幅q_scaleを基本符号化
処理部1へ送る。
The variable-length encoding unit 16 of the basic encoding unit 1 sends an MB end timing signal to the rate control unit 3 every time the encoding of each macroblock is completed, and simultaneously transmits one picture. Each time encoding is completed, a picture start timing signal is sent to the rate control unit 3. Each time the MB end timing signal is input, the rate control unit 3 obtains the actual bit generation amount Bmb per macroblock based on the bit stream from the variable length coding processing unit 16, and the bit generation amount Bmb The quantization width q_scale is determined based on this, and the quantization width q_scale is sent to the basic encoding processing unit 1.

【0041】図5は、レート制御部3の構成を示してい
る。同図において、MBカウンタ4は、可変長符号化処
理部16からのビットストリームに基づいて各マクロブ
ロックの符号化に用いられるビット発生量を計数してい
る。制御回路5は、MBエンドタイミング信号及びピク
チャー開始タイミング信号を入力しており、MBエンド
タイミング信号の度に、MBカウンタ4による計数値に
基づいて1マクロブロック当たりの実際のビット発生量
Bmbを求める。また、制御回路5は、目標ビットレート
及びVBVバッファのサイズVBV_sizeを外部から受
け取り、実際のビット発生量Bmb、目標ビットレート及
びVBVバッファのサイズVBV_size等に基づいて、
各マクロブロック毎に、量子化幅q_scaleを求め、この
量子化幅q_scaleを基本符号化処理部1の重みづけ量子
化部処理部15に与える。更に、制御回路5は、VBV
バッファがアンダーフローの状態に近づくと、アンダー
フロー回避信号を重みづけ量子化部処理部15に出力す
る。また、制御回路5は、画像データのヘッダ情報とし
てVBV_delayの期間、目標ビットレート、VBVバッ
ファのサイズVBV_sizeを示す信号を可変符号化処理
部16に出力する。
FIG. 5 shows the configuration of the rate control unit 3. In the figure, the MB counter 4 counts the amount of bits generated used for coding each macroblock based on the bit stream from the variable length coding processing unit 16. The control circuit 5 receives the MB end timing signal and the picture start timing signal, and obtains the actual bit generation amount Bmb per macroblock based on the count value of the MB counter 4 every time the MB end timing signal is input. . Further, the control circuit 5 receives the target bit rate and the size VBV_size of the VBV buffer from outside, and based on the actual bit generation amount Bmb, the target bit rate, the size VBV_size of the VBV buffer, and the like,
A quantization width q_scale is obtained for each macroblock, and the quantization width q_scale is given to the weighting quantization unit processing unit 15 of the basic coding processing unit 1. Further, the control circuit 5 controls the VBV
When the buffer approaches an underflow state, an underflow avoidance signal is output to the weighting / quantization unit processing unit 15. Further, the control circuit 5 outputs to the variable encoding processing unit 16 a signal indicating the VBV_delay period, the target bit rate, and the VBV buffer size VBV_size as the header information of the image data.

【0042】この様な処理は、図6のフローチャートに
従って行われる。まず、レート制御部3の制御回路5
は、1マクロブロック当たりの目標ビット発生量Tmb、
1ピクチャー当たりの目標ビット発生量Tpic、目標ビ
ットレートR(bps)、基準量子化幅q_st、ビット
発生誤差Dmb、VBVバッファの占有量VBV_fullnes
s、VBVバッファのサイズVBV_size、量子化幅q_s
caleを初期化する(ステップ101)。
Such processing is performed according to the flowchart of FIG. First, the control circuit 5 of the rate control unit 3
Is the target bit generation amount Tmb per macroblock,
Target bit generation amount Tpic per picture, target bit rate R (bps), reference quantization width q_st, bit generation error Dmb, VBV buffer occupancy VBV_fullnes
s, VBV buffer size VBV_size, quantization width q_s
Initialize cale (step 101).

【0043】この初期化において、目標ビットレートを
1マクロブロック当たりのレートとして外部から受け取
るものとすると、この目標ビットレートを1マクロブロ
ック当たりの目標ビット発生量Tmbとして定める。1ピ
クチャー当たりの目標ビット発生量Tpicは、目標ビッ
ト発生量Tmbの初期値を1ピクチャー内の各マクロブロ
ックの数だけ整数倍して求められる(Tpic=Tmb×
(1ピクチャー当たりのマクロブロック数))。目標ビ
ットレートR(bps)は、1ピクチャー当たりの目標
ビット発生量Tpicにフレームレートを積算して求めら
れる(R=Tpic×(フレームレート))。
In this initialization, assuming that the target bit rate is externally received as the rate per macroblock, the target bit rate is determined as the target bit generation amount Tmb per macroblock. The target bit generation amount Tpic per picture is obtained by multiplying the initial value of the target bit generation amount Tmb by the number of macroblocks in one picture by an integer (Tpic = Tmb ×
(Number of macroblocks per picture)). The target bit rate R (bps) is obtained by multiplying the target bit generation amount Tpic per picture by the frame rate (R = Tpic × (frame rate)).

【0044】規格で定められたデフォルトの量子化マト
リクスを用いて符号化を行うことを前提に、目標ビット
レートR(bps)が略3Mbpsの場合は、基準量子
化幅q_stを6に設定し、目標ビットレートR(bp
s)が4Mbps以上の場合は、基準量子化幅q_stを
5に設定し、目標ビットレートR(bps)が6Mbp
s以上の場合は、基準量子化幅q_stを4に設定する。
この様に基準量子化幅q_stを目標ビットレートR(b
ps)に応じて決定するものの、この基準量子化幅q_s
tを適宜に変更して設定しても構わない。
Assuming that encoding is performed using a default quantization matrix defined by the standard, when the target bit rate R (bps) is approximately 3 Mbps, the reference quantization width q_st is set to 6, Target bit rate R (bp
If s) is 4 Mbps or more, the reference quantization width q_st is set to 5, and the target bit rate R (bps) is 6 Mbps.
If it is not less than s, the reference quantization width q_st is set to 4.
As described above, the reference quantization width q_st is set to the target bit rate R (b
ps), but this reference quantization width q_s
t may be appropriately changed and set.

【0045】ここでは、目標ビットレートR(bps)
を3Mbpsに設定し、基準量子化幅q_stを6に設定
する。
Here, the target bit rate R (bps)
Is set to 3 Mbps, and the reference quantization width q_st is set to 6.

【0046】ビット発生誤差Dmbの初期値は、0に設さ
れる。VBVバッファのサイズは、外部から指定され、
例えばMP@ML規格で規定されている1835008
ビットである。VBVバッファの占有量VBV_fullnes
sは、図8のグラフから明らかな様にビット発生誤差Dm
bに対応しており、この占有量VBV_fullnessの初期値
がビット発生誤差Dmbの初期値0に対応する13350
08ビットに設定される。したがって、図8のグラフの
横軸におけるビット発生誤差Dmbの初期値0の位置を変
更すると、占有量VBV_fullnessの初期値も変更され
る。量子化幅q_scaleの初期値は、基準量子化幅q_st
と同じ6に設定される。
The initial value of the bit generation error Dmb is set to 0. The size of the VBV buffer is specified externally,
For example, 1835008 specified by MP @ ML standard
Is a bit. VBV buffer occupancy VBV_fullnes
s is the bit generation error Dm as is clear from the graph of FIG.
b, and the initial value of the occupancy VBV_fullness corresponds to the initial value 0 of the bit generation error Dmb 13350
Set to 08 bits. Therefore, when the position of the initial value 0 of the bit generation error Dmb on the horizontal axis of the graph of FIG. 8 is changed, the initial value of the occupation amount VBV_fullness is also changed. The initial value of the quantization width q_scale is the reference quantization width q_st
Is set to 6, which is the same as

【0047】こうして初期化を終了すると、制御回路5
は、可変長符号化処理部16の出力に基づいて、一連の
映像信号の終了であるか否かを判定し(ステップ10
2)、引き続いてピクチャーの開始であるか否かを判定
する(ステップ103)。ここでは、映像信号の符号化
を始めたばかりであるから、一連の映像信号の終了でな
いと判定され(ステップ102,No)、ピクチャーの開
始であると判定され(ステップ103,Yes)、ステッ
プ104のスタッフィング(stuffing)処理に移る。
When the initialization is completed, the control circuit 5
Determines whether or not the end of a series of video signals is based on the output of the variable length coding processing unit 16 (step 10).
2) Subsequently, it is determined whether or not it is the start of a picture (step 103). Here, since the encoding of the video signal has just started, it is determined that the end of a series of video signals has not been completed (step 102, No), and it is determined that the picture has started (step 103, Yes). Move on to stuffing processing.

【0048】このステップ104のスタッフィング処理
は、図7に示す手順で行われる。制御回路5は、スタッ
フィングバイトを0に初期設定してから(ステップ20
1)、VBVバッファの占有量VBV_fullnessとVB
VバッファのサイズVBV_sizeから1ピクチャー当た
りの目標ビット発生量Tpicを差し引いた値を比較し
(ステップ202)、VBVバッファの占有量VBV_f
ullnessの方が大きければ(ステップ202,Yes)、こ
れから行われる1ピクチャーの符号化によって、VBV
バッファがオーバーフローするので、スタッフィングバ
イトを歩進して1に設定する。そして、このスタッフィ
ングバイトの増加に伴いVBVバッファの占有量VBV
_fullnessから8を差し引いて、この占有量VBV_full
nessを更新すると共に、ビット発生誤差Dmbに8を加算
して、このビット発生誤差Dmbを更新し(ステップ20
3)、この後にステップ202に戻る。
The stuffing process in step 104 is performed according to the procedure shown in FIG. The control circuit 5 initializes the stuffing byte to 0 (step 20).
1), VBV buffer occupancy VBV_fullness and VB
The value obtained by subtracting the target bit generation amount per picture Tpic from the V buffer size VBV_size is compared (step 202), and the VBV buffer occupation amount VBV_f is compared.
If the ullness is greater (Step 202, Yes), the VBV
Since the buffer overflows, the stuffing byte is incremented and set to 1. Then, with the increase of the stuffing bytes, the occupation amount VBV of the VBV buffer
_fullness minus 8 to get this occupancy VBV_full
In addition to updating the ness, the bit generation error Dmb is updated by adding 8 to the bit generation error Dmb (step 20).
3) Then, the process returns to step 202.

【0049】したがって、VBVバッファの占有量VB
V_fullnessの方が大きいと判定される限り(ステップ
202,Yes)、スタッフィングバイトが1ずつ増加
し、これに伴いVBVバッファの占有量VBV_fullnes
sが8ずつ減少し、ビット発生誤差Dmbが8ずつ増加す
る(ステップ203)。そして、VBVバッファの占有
量VBV_fullnessの方が小さいと判定されると(ステ
ップ202,No)、そのときのスタッフィングバイトの
値が可変長符号化処理部16に通知される。可変長符号
化処理部16は、スタッフィングバイトの値に応じて、
スタッフィング処理、つまりピクチャーを符号化してな
る画像データに引き続きバイト単位で0の符号列を送出
して、このピクチャーの画像データを見かけ上増加さ
せ、VBVバッファから除去される画像データの量を増
やし、これによってVBVバッファのオーバーフローを
回避する。
Therefore, the occupancy VB of the VBV buffer
As long as it is determined that V_fullness is larger (Step 202, Yes), the stuffing byte is increased by one, and the occupancy VBV_fullnes of the VBV buffer is accordingly increased.
s decreases by 8, and the bit generation error Dmb increases by 8 (step 203). Then, when it is determined that the occupation amount VBV_fullness of the VBV buffer is smaller (Step 202, No), the value of the stuffing byte at that time is notified to the variable length coding processing unit 16. The variable-length coding processing unit 16 determines the value of the stuffing byte
The stuffing process, that is, sending a code string of 0 in byte units subsequent to the image data obtained by encoding the picture, apparently increasing the image data of this picture, and increasing the amount of image data removed from the VBV buffer; This avoids overflow of the VBV buffer.

【0050】ただし、初期状態においては、VBVバッ
ファの占有量VBV_fullnessの方が小さいと判定され
るので(ステップ202,No)、スタッフィングバイト
の値0が可変長符号化処理部16に通知され、スタッフ
ィング処理が行われない。
However, in the initial state, the occupation amount VBV_fullness of the VBV buffer is determined to be smaller (step 202, No), so that the value 0 of the stuffing byte is notified to the variable length coding processing unit 16, and the stuffing is performed. No action is taken.

【0051】この後、制御回路5は、期間VBV_delay
を次式(1)又は(2)から算出する(ステップ10
5)。 ピクチャーB,Pの場合 VBV_delay=90000×(VBV_fullness+Tpic)/R …(1) ピクチャーIの場合 VBV_delay=90000×(VBV_fullness+Tpic−ヘッダビット数)/R …(2) ただし、Rは、1秒あたりの目標ビット発生量、ヘッダ
ビット数は、ビデオシーケンスヘッダからピクチャーヘ
ッダ直前までのビット数である。
Thereafter, the control circuit 5 controls the period VBV_delay
Is calculated from the following equation (1) or (2) (step 10).
5). For pictures B and P, VBV_delay = 90,000 × (VBV_fullness + Tpic) / R (1) For picture I, VBV_delay = 90,000 × (VBV_fullness + Tpic−number of header bits) / R (2) where R is a target per second. The bit generation amount and the number of header bits are the number of bits from the video sequence header to immediately before the picture header.

【0052】この期間VBV_delayは、ピクチャーを符
号化してなる画像データのヘッダ情報となって、復号化
装置に伝送される。この復号化装置では、初めて画像デ
ータをVBVバッファに入力するのであれば、ヘッダ情
報に含まれる期間VBV_delayだけ待機して、画像デー
タがVBVバッファに蓄積されてから、画像データの復
号化を開始する。
This period VBV_delay is transmitted to the decoding device as header information of image data obtained by encoding a picture. In this decoding device, if image data is input to the VBV buffer for the first time, the decoding of image data is started after the image data is accumulated in the VBV buffer after waiting for a period VBV_delay included in the header information. .

【0053】これまでの処理の間に、基本符号化処理部
1による1ピクチャーの符号化が開始され、レート制御
部3の制御回路5は、MBエンドタイミング信号の度
に、MBカウンタ4による計数値に基づいて1マクロブ
ロック当たりの実際のビット発生量Bmbを求める。(ス
テップ106)。制御回路5は、次式(3)に基づい
て、1マクロブロック当たりの実際のビット発生量Bmb
と目標ビット発生量Tmbの差をビット発生誤差Dmbに加
算し、このビット発生誤差Dmbを更新する(ステップ1
07)。 Dmb=Dmb+Bmb―Tmb …(3) ここで、1マクロブロック当たりの情報量が大き過ぎた
り小さ過ぎれば、実際のビット発生量Bmbが目標ビット
発生量Tmbよりも大きくなたっり小さくなり、ビット発
生誤差Dmbが発生する。また、1マクロブロック当たり
の情報量が丁度良ければ、実際のビット発生量Bmbが目
標ビット発生量Tmbに一致し、ビット発生誤差Dmbが0
となる。
During the processing so far, the encoding of one picture by the basic encoding processing unit 1 is started, and the control circuit 5 of the rate control unit 3 counts up by the MB counter 4 every time the MB end timing signal. The actual bit generation amount Bmb per macroblock is obtained based on the numerical value. (Step 106). The control circuit 5 calculates the actual bit generation amount Bmb per macroblock based on the following equation (3).
Is added to the bit generation error Dmb to update the bit generation error Dmb (step 1).
07). Dmb = Dmb + Bmb-Tmb (3) Here, if the information amount per macroblock is too large or too small, the actual bit generation amount Bmb becomes much smaller than the target bit generation amount Tmb, and the bit generation is performed. An error Dmb occurs. If the amount of information per macroblock is just right, the actual bit generation amount Bmb matches the target bit generation amount Tmb, and the bit generation error Dmb is 0.
Becomes

【0054】引き続いて、制御回路5は、ビット発生誤
差Dmbが予め定められたしきい値D4を越えいないこと
を確認してから(ステップ108,No)、次式(4),
(5),(6),(7),(8)に基づく関数f(R,
Dmb)から量子化幅q_scaleを求める(ステップ11
0)。 Dmb<D0の場合 f(R,Dmb)=1 …(4) D0≦Dmb<D1の場合 f(R,Dmb)=q_st×R/(R−K1×Dmb) …(5) D1≦Dmb<D2の場合 f(R,Dmb)=q_st×R/(R−K2×Dmb) …(6) D2≦Dmb<D3の場合 f(R,Dmb)=q_st×R/(R−K3×Dmb)−K4 …(7) Dmb≧D3の場合 f(R,Dmb)=31 …(8) ただし、上式(4),(5),(6),(7),(8)
に基づく関数f(R,Dmb)の特性を示す図8のグラフ
から明らかな様に、D0<D1<D2<D3であって、D0
=−400000、D1=0、D2=600000、D3
=1200000である。また、K1は、Dmb=D0のと
きにf(R,Dmb)=1となる様な値に設定され、K2
は、Dmb=2近辺でf(R,Dmb)=9となる様な値に
設定され、K3,K4は、Dmb=D2のときにf(R,Dm
b)=9となり、かつDmb=D3近辺でf(R,Dmb)=
31に近い値となる様な値に設定される。ここでは、K
1=37.5、K2=1.67、K3=2.0、K4=1.
0とする。これによって、f(R,Dmb)の特性曲線F
が連続的に変化するものとなる。
Subsequently, after confirming that the bit generation error Dmb does not exceed the predetermined threshold value D4 (step 108, No), the control circuit 5 determines the following equation (4).
A function f (R, R) based on (5), (6), (7), (8)
Dmb) to obtain a quantization width q_scale (step 11).
0). If Dmb <D0, f (R, Dmb) = 1 (4) If D0 ≦ Dmb <D1, f (R, Dmb) = q_st × R / (R−K1 × Dmb) (5) D1 ≦ Dmb < In the case of D2 f (R, Dmb) = q_st × R / (R−K2 × Dmb) (6) When D2 ≦ Dmb <D3 f (R, Dmb) = q_st × R / (R−K3 × Dmb) −K4 (7) When Dmb ≧ D3 f (R, Dmb) = 31 (8) where the above equations (4), (5), (6), (7), (8)
As is clear from the graph of FIG. 8 showing the characteristic of the function f (R, Dmb) based on D0 <D1 <D2 <D3,
= -400000, D1 = 0, D2 = 600000, D3
= 120000000. K1 is set to a value such that f (R, Dmb) = 1 when Dmb = D0, and K2
Is set to a value such that f (R, Dmb) = 9 around Dmb = 2, and K3 and K4 are set to f (R, Dm when Dmb = D2.
b) = 9, and f (R, Dmb) = around Dmb = D3
The value is set to a value close to 31. Here, K
1 = 37.5, K2 = 1.67, K3 = 2.0, K4 = 1.
Set to 0. Thereby, the characteristic curve F of f (R, Dmb) is obtained.
Changes continuously.

【0055】こうして量子化幅q_scale=f(R,Dm
b)を求めると、制御回路5は、量子化幅q_scaleの少
数点以下を四捨五入してから、この量子化幅q_scaleを
重みづけ量子化部処理部15に与える(ステップ11
1)。重みづけ量子化処理部15は、量子化幅q_scale
に応じてDCT変換により得られた各変換係数を量子化
し、これにより得た量子化データを可変長符号化処理部
16に出力する。可変長符号化処理部16は、量子化デ
ータを可変長符号化して、圧縮符号化された画像データ
を形成する。
Thus, the quantization width q_scale = f (R, Dm
After obtaining b), the control circuit 5 rounds off the decimal point of the quantization width q_scale and then gives the quantization width q_scale to the weighting quantization processing unit 15 (step 11).
1). The weighting quantization processing unit 15 calculates the quantization width q_scale
, And quantizes each transform coefficient obtained by the DCT transform, and outputs the quantized data thus obtained to the variable-length coding processing unit 16. The variable-length encoding unit 16 performs variable-length encoding on the quantized data to form compression-encoded image data.

【0056】以降同様に、ステップ102〜111の処
理を繰り返し、各マクロブロックが順次符号化され、そ
の度に、1マクロブロック当たりの実際のビット発生量
Bmbを求め、これまでの符号化によって累積したビット
発生誤差Dmbを求め、このビット誤差Dmbを関数f
(R,Dmb)に代入して量子化幅q_scaleを求め、この
量子化幅q_scaleに応じてDCT変換により得られた各
変換係数を量子化し、この量子化データを可変長符号化
して、圧縮符号化された画像データを形成する。
Thereafter, similarly, the processing of steps 102 to 111 is repeated, each macroblock is sequentially encoded, and each time, the actual bit generation amount Bmb per macroblock is obtained, A bit generation error Dmb is calculated, and this bit error Dmb is
(R, Dmb) to obtain a quantization width q_scale, quantize each transform coefficient obtained by DCT according to the quantization width q_scale, perform variable length coding on the quantized data, and perform compression coding. Forming the image data.

【0057】また、各ステップ102〜111の処理を
繰り返すうちに、ビット発生誤差Dmbがしきい値D4を
越えれば(ステップ108,Yes)、つまり実際のビッ
ト発生量Bmbが目標ビット発生量Tmbよりも非常に大き
く、ピクチャーを符号化するために各ビットを使い過ぎ
て不足している状態になっていれば、VBVバッファが
アンダーフローになる可能性があるので、アンダーフロ
ー回避信号を重みづけ量子化部処理部15に出力する
(ステップ109)。これに応答して、重みづけ量子化
部処理部15は、マクロブロックのDC成分のみを符号
化し、画像データの符号量を減少させる。これによっ
て、各ビットの使い過ぎが緩和され、実際のビット発生
量Bmbが目標ビット発生量Tmbに近づく。
If the bit generation error Dmb exceeds the threshold value D4 while repeating the processing of steps 102 to 111 (step 108, Yes), the actual bit generation amount Bmb is larger than the target bit generation amount Tmb. If each bit is excessively used to encode a picture and the bits are insufficient, the VBV buffer may underflow. It is output to the conversion unit processing unit 15 (step 109). In response to this, the weighting quantization unit processing unit 15 encodes only the DC component of the macroblock, and reduces the code amount of the image data. This alleviates the overuse of each bit, and the actual bit generation amount Bmb approaches the target bit generation amount Tmb.

【0058】ここで、図8のグラフから明らかな様に、
D0≦Dmb<D1の場合には、つまりビット発生誤差Dmb
がVBVバッファのサイズVBV_sizeの略1/2付近
で変化する場合には、量子化幅q_scaleの変化が小さく
なっている。例えば、量子化幅q_scaleが6付近では、
ビット発生誤差Dmbが300Kbit程度増減したとして
も、量子化幅q_scaleの変化は、1程度である。
Here, as is apparent from the graph of FIG.
When D0 ≦ Dmb <D1, that is, the bit generation error Dmb
Changes in the vicinity of approximately 1/2 of the VBV buffer size VBV_size, the change in the quantization width q_scale is small. For example, when the quantization width q_scale is around 6,
Even if the bit generation error Dmb increases or decreases by about 300 Kbit, the change of the quantization width q_scale is about 1.

【0059】したがって、ビット発生誤差Dmbがその付
近で変化する限り、量子化幅q_scaleが略一定に保た
れ、1マクロブロック当たりの実際のビット発生量Bmb
の増減は、該マクロブロックの情報量の大きさに依存す
る。このため、基準量子化幅q_st(=6)を適宜に設
定しておけば、1ピクチャーの各マクロブロックの後半
と前半で情報量が増減しても、各マクロブロックに対し
て最適のビット発生量を与えることができ、1ピクチャ
ーの符号化に費やされるビット発生量の不足や余剰を防
止することができる。
Therefore, as long as the bit generation error Dmb changes in the vicinity thereof, the quantization width q_scale is kept substantially constant, and the actual bit generation amount Bmb per macroblock is obtained.
Increase or decrease depends on the amount of information of the macroblock. For this reason, if the reference quantization width q_st (= 6) is appropriately set, even if the information amount increases or decreases in the latter half and the former half of each macroblock of one picture, the optimum bit generation for each macroblock is performed. Thus, the amount of bits generated for encoding one picture can be prevented from being insufficient or surplus.

【0060】また、1ピクチャーの符号化に費やされる
ビット発生量の増減も、該ピクチャーの情報量の大きさ
に依存するため、基準量子化幅q_st(=6)を適宜に
設定しておけば、各ピクチャーに対して最適のビット発
生量を与えることができる。
Since the amount of bit generation consumed for encoding one picture also depends on the amount of information of the picture, the reference quantization width q_st (= 6) can be set appropriately. , The optimal bit generation amount can be given to each picture.

【0061】また、量子化幅q_scaleが比較的大きな値
となる領域では、1ピクチャーの符号化に費やされるビ
ット発生量に対する量子化幅q_scaleの変化の影響が小
さくなるので、比較的複雑な映像のピクチャーを符号化
しても、目標ビットレートを保つことができる。
In a region where the quantization width q_scale is a relatively large value, the influence of the change in the quantization width q_scale on the amount of bits generated for encoding one picture is small, so that a relatively complex image can be reproduced. Even if the picture is coded, the target bit rate can be maintained.

【0062】また、ビット発生誤差Dmbに基づいて量子
化幅q_scaleを決定しているため、シーンチェンジ直後
のピクチャーを符号化するときにも、ピクチャーIを符
号化するときと略同様の量子化幅q_scaleで、この量子
化幅q_scaleを大きく変化させずに、符号化を行うこと
ができ、シーンチェンジ直後でも、再生画像の画質の劣
化が小さくなる様に、映像信号を符号化することができ
る。
Also, since the quantization width q_scale is determined based on the bit generation error Dmb, the same quantization width as that used when encoding the picture I is used when encoding the picture immediately after the scene change. With q_scale, encoding can be performed without greatly changing the quantization width q_scale. Even immediately after a scene change, a video signal can be encoded so that deterioration in the image quality of a reproduced image is reduced.

【0063】以上の説明から明らかな様に、上記実施形
態においては、各マクロブロックの符号化の度に、それ
までの符号化に費やしたビット発生量と目標ビットレー
トより換算される目標ビット発生量の差であるビット発
生誤差Dmbを算出し、このビット発生誤差Dmbに比例し
た値を目標ビットレートより減算した値と目標ビットレ
ートとの比に基づき量子化幅q_scaleを決定している。
As is apparent from the above description, in the above-described embodiment, each time a macroblock is coded, the target bit generation amount converted from the bit generation amount used for the previous coding and the target bit rate is converted. A bit generation error Dmb, which is a difference between the amounts, is calculated, and a quantization width q_scale is determined based on a ratio between a value obtained by subtracting a value proportional to the bit generation error Dmb from the target bit rate and the target bit rate.

【0064】映像を符号化する際、同じ映像について
は、量子化幅q_scaleと符号化に費やされるビット発生
量の積がほぼ一定になるといわれており、量子化幅q_s
caleを導く関数f(R,Dmb)を設定した場合には、略
同じ各映像を順次符号化するのに費やされるそれぞれの
ビット発生量は、上記積がほぼ一定となる様に量子化幅
q_scaleに対応して変動し、目標ビット発生量からビッ
ト発生誤差Dmbの定数倍したものを差し引いた値に設定
されることになる。したがって、1次のフィードバック
制御によって符号化に費やされるビット発生量を制御す
ることと同様に、符号化に費やされるビット発生量を目
標ビット発生量に制御することができる。
When encoding an image, it is said that for the same image, the product of the quantization width q_scale and the amount of bits generated for encoding becomes substantially constant, and the quantization width q_s
When the function f (R, Dmb) for deriving the cale is set, the amount of each bit generated for sequentially encoding substantially the same video is quantized width q_scale so that the above product is substantially constant. , And is set to a value obtained by subtracting a constant multiple of the bit generation error Dmb from the target bit generation amount. Therefore, the bit generation amount consumed for encoding can be controlled to the target bit generation amount in the same manner as controlling the bit generation amount consumed for encoding by the primary feedback control.

【0065】また、D0≦Dmb<D1の場合には、量子化
幅q_scaleが6〜9付近で変化する様に、係数K1を小さ
く設定しているので、この量子化幅q_scale6〜9の範
囲では、符号化に費やされるビット発生量が変動して、
ビット発生誤差Dmbが増減し易く、VBVバッファのサ
イズVBV_sizeが有効に利用される。これによって、
復号化装置側の能力が一杯に利用されるまで、シーンチ
ェンジや激しい映像の動きによる情報量の増加に応じて
符号化に費やされるビット発生量を増加させることがで
きる。
When D0 ≦ Dmb <D1, the coefficient K1 is set small so that the quantization width q_scale changes in the vicinity of 6 to 9. Therefore, in the range of this quantization width q_scale 6 to 9, , The amount of bits generated for encoding fluctuates,
The bit generation error Dmb easily increases and decreases, and the size VBV_size of the VBV buffer is effectively used. by this,
Until the capacity of the decoding apparatus is fully utilized, the amount of bits generated for encoding can be increased in accordance with an increase in the amount of information due to scene changes or severe video motion.

【0066】従来においては、各ピクチャー毎に目標ビ
ット発生量を設定し、ピクチャー内の各マクロブロック
を符号化する度に、マクロブロックの符号化に費やされ
るビット発生量が一定に近づくような制御を行っていた
ため、ピクチャー内での映像の複雑さの分布によって、
単純な絵柄の符号化直後のマクロブロックの量子化幅が
小さめとなり、複雑な絵柄の符号化直後のマクロブロッ
クの量子化幅が大きめになり、再生画像の画質が不均一
になる傾向にあった。
Conventionally, a target bit generation amount is set for each picture, and each time a macroblock in a picture is coded, control is performed such that the bit generation amount used for coding the macroblock approaches a constant value. The distribution of the complexity of the picture in the picture,
The quantization width of a macroblock immediately after coding of a simple picture became smaller, and the quantization width of a macroblock immediately after coding of a complicated picture became larger, and the image quality of the reproduced image tended to be uneven. .

【0067】これに対して、本実施形態では、ピクチャ
ーよりはるかに大きい容量を有するVBVバッファのサ
イズを有効に利用して、符号化に費やされるビット発生
量が変動する様な制御を行っているので、ピクチャー内
での映像の複雑さの分布が原因となって再生画像の画質
が不均一になることを防止することができる。
On the other hand, in the present embodiment, control is performed such that the amount of bits generated for encoding varies by effectively utilizing the size of the VBV buffer having a much larger capacity than the picture. Therefore, it is possible to prevent the image quality of the reproduced image from becoming uneven due to the distribution of the complexity of the image in the picture.

【0068】また、本実施形態においては、目標ビット
レートの制御とVBVバッファの制御をわかり易く説明
するために、ビット発生誤差DmbとVBVバッファの占
有量VBV_fullnessの両方を用いて説明したが、これ
らは、ピクチャーの符号化直後において次式(9)の関
係にあり、一方から他方を導くことができる。 VBV_fullness=(VBV_fullnessの初期値)−Dmb …(9) したがって、式(9)を用いれば、ビット発生誤差Dmb
のみによって、全ての処理、つまりオーバーフローを回
避するためのスタッフィング処理(ステップ104)、
アンダーフロー回避処理(ステップ109)等が可能で
あり、本発明は、これを含むものである。また、同様
に、VBV_fullnessのみによって、全ての処理が可能
である。
In this embodiment, the control of the target bit rate and the control of the VBV buffer are described using both the bit generation error Dmb and the occupation amount VBV_fullness of the VBV buffer. Immediately after encoding a picture, the following equation (9) holds, and one can guide the other. VBV_fullness = (initial value of VBV_fullness) −Dmb (9) Therefore, if the equation (9) is used, the bit generation error Dmb
Only by the above, all processes, that is, a stuffing process for avoiding overflow (step 104),
Underflow avoidance processing (step 109) and the like are possible, and the present invention includes this. Similarly, all processing can be performed only by VBV_fullness.

【0069】換言すれば、従来においては、目標ビット
レートの制御とVBVバッファの制御を別々に行う必要
があったが、本発明においては、ビット発生誤差Dmbと
占有量VBV_fullnessのうちの1つのパラメータのみ
よる統一的な制御を可能にしている。
In other words, conventionally, it was necessary to separately control the target bit rate and the VBV buffer. In the present invention, however, one parameter of the bit generation error Dmb and the occupancy VBV_fullness is used. It enables unified control by only

【0070】なお、本実施形態においては、VBVバッ
ファのサイズVBV_sizeをMPEG2のMP@ML規
格で規定されたものとしているが、VBVバッファのサ
イズVBV_sizeを変更してもよく、そのサイズの範囲
で、占有量VBV_fullnessが制御される様に、量子化
幅q_scaleを導出する関数を定めれば良い。
In the present embodiment, the size VBV_size of the VBV buffer is defined by the MP @ ML standard of MPEG2. However, the size VBV_size of the VBV buffer may be changed. A function for deriving the quantization width q_scale may be determined so that the occupation amount VBV_fullness is controlled.

【0071】また、目標ビットレートR(bps)を3
Mbpsに設定しているが、他のビットレートであって
も、本実施形態と同じ手法を適用することができる。
The target bit rate R (bps) is set to 3
Although Mbps is set, the same method as in the present embodiment can be applied to other bit rates.

【0072】更に、MPEG2の符号化装置を例示して
いるが、これに類する符号化装置並びに符号化方法にお
いても、本発明を適用することができる。
Further, the MPEG2 encoding apparatus is illustrated, but the present invention can be applied to an encoding apparatus and an encoding method similar to this.

【0073】また、本実施形態では、D0≦Dmb<D1の
場合には、量子化幅q_scaleが6〜9付近で変化する様
に、係数K1を小さく設定したが、予想される映像信号
の符号化の難易度が低かったり(例えば、映画などの場
合は、比較的符号化が容易であって、量子化幅q_scale
を小さめに設定することができる)、再生画像に要求さ
れる画質が低ければ、しきい値D2付近での量子化幅q_s
caleを8程度に設定してもよい。また、例えば目標ビッ
トレートが4Mbps程度である場合には、D1〜D2の
範囲での量子化幅q_scaleの変化を5〜7程度に設定し
ても良く、規格で定められたデフォルトの量子化マトリ
クス、もしくは該量子化マトリクスに近い値のものを用
いる場合は、D1〜D2の範囲で、量子化幅q_scaleを1
0を超えない程度に設定すれば良い。更に、各しきい値
D0,D1,D2,D3,D4を数百Kbit程度の範囲でずら
すことが可能である。要するに、本発明においては、上
記実施形態における量子化幅q_scaleや、各しきい値D
0,D1,D2,D3,D4に限られるものではなく、これ
らの値を適宜に変更することができる。
In the present embodiment, when D0 ≦ Dmb <D1, the coefficient K1 is set small so that the quantization width q_scale changes in the vicinity of 6 to 9, but the code of the expected video signal is set. Is difficult to quantify (for example, in the case of a movie, etc., the encoding is relatively easy, and the quantization width q_scale
Can be set smaller), and if the image quality required for the reproduced image is low, the quantization width q_s near the threshold value D2
The cale may be set to about 8. For example, when the target bit rate is about 4 Mbps, the change of the quantization width q_scale in the range of D1 to D2 may be set to about 5 to 7, and the default quantization matrix defined by the standard may be set. Alternatively, when using a value close to the quantization matrix, the quantization width q_scale is set to 1 in the range of D1 to D2.
What is necessary is just to set it so that it does not exceed 0. Further, each of the threshold values D0, D1, D2, D3 and D4 can be shifted within a range of about several hundred Kbit. In short, in the present invention, the quantization width q_scale and the threshold values D
The values are not limited to 0, D1, D2, D3, and D4, and these values can be appropriately changed.

【0074】図9は、量子化幅q_scaleを導くための他
の関数f(R,Dmb)の特性を示している。ただし、基
準量子化幅q_stを5に設定している。
FIG. 9 shows the characteristics of another function f (R, Dmb) for deriving the quantization width q_scale. However, the reference quantization width q_st is set to 5.

【0075】この図9に示す関数f(R,Dmb)の特性
は、次式(10),(11),(12),(13)によ
って表される。
The characteristics of the function f (R, Dmb) shown in FIG. 9 are represented by the following equations (10), (11), (12), and (13).

【0076】 Dmb<D0の場合 f(R,Dmb)=1 …(10) D0≦Dmb<D1の場合 f(R,Dmb)=q_st×R/(R−K1×Dmb) …(11) D1≦Dmb<D2の場合 f(R,Dmb)=q_st×R/(R−K2×Dmb) …(12) Dmb≧D2の場合 f(R,Dmb)=31 …(13) K1は、Dmb=−1000000のときにf(R,Dmb)
=1となる様な値に設定され、K2は、Dmb=6000
00のときにf(R,Dmb)=31となる様に設定され
る。
When Dmb <D0, f (R, Dmb) = 1 (10) When D0 ≦ Dmb <D1, f (R, Dmb) = q_st × R / (R−K1 × Dmb) (11) D1 ≦ Dmb <D2 f (R, Dmb) = q_st × R / (R−K2 × Dmb) (12) If Dmb ≧ D2, f (R, Dmb) = 31 (13) K1 is Dmb = F (R, Dmb) when -1,000,000
= 1, and K2 is Dmb = 6000.
At 00, f (R, Dmb) = 31 is set.

【0077】図9の特性では、おもに静止しているかあ
るいは動きの小さな映像を含む一連のピクチャーや、シ
ーンチェンジが頻繁に起こる一連のピクチャーについて
効果が高い設定になっている。
According to the characteristics shown in FIG. 9, the setting is highly effective for a series of pictures mainly including a still or small-moving image and a series of pictures in which scene changes frequently occur.

【0078】このような一連のピクチャーにおいて、従
来の符号化方法を適用すると、符号化に費やされるビッ
ト発生量がピクチャーIに極端に集中し、その外のピク
チャーではビット発生量の割り当てが少なくなって、V
BVバッファの占有量VBV_fullnessが高くなり、ス
タッフィング処理が起こりがちである。
When a conventional encoding method is applied to such a series of pictures, the amount of bits generated for encoding is extremely concentrated on picture I, and the allocation of the bits is reduced for other pictures. And V
The occupancy VBV_fullness of the BV buffer increases, and stuffing processing tends to occur.

【0079】このため、ここでは、主に、D0からD1の
範囲に対応する量子化幅q_scaleで符号化することを想
定している。したがって、静止に近い映像でピクチャー
IがD0付近に対応する量子化幅q_scaleで符号化され、
符号化に費やされるビット発生量が非常に大きくなった
としても、なお低い量子化幅q_scaleを維持することが
できる。また、GOPの途中でシーンチェンジが発生し
ても、D0からD1の範囲においては、量子化幅q_scale
の変化量が小さいので、そのピクチャーの複雑さに応じ
て各ビットが割り当てられる。
For this reason, here, it is mainly assumed that encoding is performed with a quantization width q_scale corresponding to the range from D0 to D1. Therefore, picture I is encoded with a quantization width q_scale corresponding to the vicinity of D0 in a video close to static,
Even if the amount of bits generated for encoding becomes very large, a low quantization width q_scale can be maintained. Even if a scene change occurs in the middle of a GOP, the quantization width q_scale is in the range from D0 to D1.
Is small, each bit is allocated according to the complexity of the picture.

【0080】この様に符号化されるピクチャーに傾向が
ある場合には、各しきい値D0,D1,D2、及び各係数
K1,K2を適宜に設定し、その傾向に適した関数f
(R,Dmb)の特性を求めることが有効である。
If there is a tendency in the picture to be encoded in this way, the thresholds D0, D1, D2 and the coefficients K1, K2 are appropriately set, and a function f suitable for the tendency is set.
It is effective to determine the characteristics of (R, Dmb).

【0081】また、量子化幅q_scaleの最低値を1に設
定したが、再生画像の均一性を重視する場合には、量子
化幅q_scaleの最低値を2以上にして、量子化幅q_scale
の変動を小さく設定することが有効である。
The minimum value of the quantization width q_scale is set to 1. However, when importance is placed on the uniformity of the reproduced image, the minimum value of the quantization width q_scale is set to 2 or more, and the quantization width q_scale is set.
It is effective to set the fluctuation of the small.

【0082】また、量子化幅q_scaleを導く関数f
(R,Dmb)において、多数のしきい値D0,D1,……
を設定して、各しきい値間の各範囲を細かく分けて、こ
れらの範囲毎に、各係数K1,K2,……を適宜に設定し
て、量子化幅q_scaleも導いても良い。更に、各しきい
値間の各範囲を細かく分けた場合は、各範囲毎に、量子
化幅q_scaleの特性を直線に近似させて、量子化幅q_sca
leの算出に必要な演算量を減らしても良い。また、各し
きい値の大きさについても、許容できる再生画像の画質
に応じて変更しても良い。
Also, a function f for deriving the quantization width q_scale
In (R, Dmb), a number of threshold values D0, D1,.
May be set to finely divide each range between the threshold values, and the coefficients K1, K2,... May be appropriately set for each of these ranges to derive the quantization width q_scale. Further, when each range between the threshold values is finely divided, the characteristic of the quantization width q_scale is approximated to a straight line for each range, and the quantization width q_sca
The calculation amount required for calculating le may be reduced. Also, the magnitude of each threshold may be changed according to the permissible image quality of the reproduced image.

【0083】図10は、本発明の第2実施形態における
符号化処理を示すフローチャートである。この符号化処
理は、図1、図3及び図5に示す符号化処理装置におい
て行われる。
FIG. 10 is a flowchart showing an encoding process according to the second embodiment of the present invention. This encoding process is performed in the encoding processing device shown in FIGS. 1, 3, and 5.

【0084】図10のフローチャートの処理は、図6の
フローチャートの処理における各ステップ101及び1
10を各ステップ101A,110Aに置き換えたもの
であり、他の各ステップ102〜109及び111が図
6のフローチャートの処理と共通する。
The processing of the flowchart of FIG. 10 is performed by the steps 101 and 1 in the processing of the flowchart of FIG.
10 is replaced with steps 101A and 110A, and the other steps 102 to 109 and 111 are common to the processing in the flowchart of FIG.

【0085】つまり、図10のフローチャートの処理
は、図6のフローチャートの処理と比較して、ステップ
101Aにおける各パラメータの初期化処理、及びステ
ップ110Aにおける量子化幅q_scaleの導出処理のみ
が異なる。このステップ101Aを図11のフローチャ
ートに従って次に説明する。
That is, the processing of the flowchart of FIG. 10 is different from the processing of the flowchart of FIG. 6 only in the initialization processing of each parameter in step 101A and the derivation processing of the quantization width q_scale in step 110A. This step 101A will be described next with reference to the flowchart of FIG.

【0086】まず、レート制御部3の制御回路5は、目
標ビットレートR(bps)を予め定められた値に設定
し、VBVバッファのサイズを1835008ビットに
設定し、ビット発生誤差Dmbを0に設定し、占有量VB
V_fullnessを1335008ビットに設定する(ステ
ップ301)。
First, the control circuit 5 of the rate control section 3 sets the target bit rate R (bps) to a predetermined value, sets the size of the VBV buffer to 1835008 bits, and sets the bit generation error Dmb to 0. Set and occupancy VB
The V_fullness is set to 1335008 bits (step 301).

【0087】次に、制御回路5は、目標ビットレートR
をフレームレートで割ることによって、1ピクチャー当
たりの目標ビット発生量Tpicを求めると共に、目標ビ
ットレートRをフレームレートと1ピクチャー内の各マ
クロブロックの数で割ることによって、1マクロブロッ
ク当たりの目標ビット発生量Tmbを求める(ステップ3
02)。
Next, the control circuit 5 sets the target bit rate R
Is divided by the frame rate to obtain the target bit generation amount Tpic per picture, and the target bit rate R is divided by the frame rate and the number of each macroblock in one picture to obtain the target bit rate per macroblock. Obtain the generation amount Tmb (step 3
02).

【0088】引き続いて、制御回路5は、目標ビットレ
ートRが3Mbps未満であれば(ステップ303,Ye
s)、基準量子化幅q_stを6に設定し(ステップ30
4)、目標ビットレートR(bps)が6Mbps未満
であれば(ステップ305,Yes)、基準量子化幅q_st
を5に設定し(ステップ306)、目標ビットレートR
(bps)が6Mbps以上であれば(ステップ30
5,No)、基準量子化幅q_stを4に設定する(ステッ
プ307)。
Subsequently, if the target bit rate R is less than 3 Mbps (step 303, Ye
s), and sets the reference quantization width q_st to 6 (step 30).
4), if the target bit rate R (bps) is less than 6 Mbps (Step 305, Yes), the reference quantization width q_st
Is set to 5 (step 306), and the target bit rate R
If (bps) is 6 Mbps or more (step 30)
5, No), and sets the reference quantization width q_st to 4 (step 307).

【0089】こうして目標ビットレートRに応じて基準
量子化幅q_stを設定した後に、制御回路5は、目標ビ
ットレートR及び基準量子化幅q_stを次式(14),
(15),(16),(17)に代入して、各係数K
1,K2,K3,K4を求め、更に、これらの係数K1,K
2,K3,K4、目標ビットレートR及び基準量子化幅q_
stを次式(18),(19),(20)に代入して、関
数f(R,Dmb)を設定する(ステップ308)。 K1=R×(q_st−2)/(2×500000) …(14) K2=3R/((q_st+3)×500000) …(15) K3=R×(70−q_st)/(70×800000) …(16) K4=q_st×R/(R−K3×500000) −q_st×R/(R−K2×500000) …(17) Dmb<0の場合 f(R,Dmb)=q_st×R/(R−K1×Dmb) …(18) 0≦Dmb<500000の場合 f(R,Dmb)=q_st×R/(R−K2×Dmb) …(19) Dmb>500000の場合 f(R,Dmb)=q_st×R/(R−K3×Dmb)−K4 …(20) ただし、関数f(R,Dmb)から導かれる量子化幅q_sc
aleの小数点以下を四捨五入する。また、量子化幅q_sca
leが1以下の場合は、量子化幅q_scaleを1に設定し、
量子化幅q_scaleが31以上の場合は、量子化幅q_scale
を31に設定する。
After setting the reference quantization width q_st according to the target bit rate R in this way, the control circuit 5 sets the target bit rate R and the reference quantization width q_st to the following equations (14),
Substituting into (15), (16) and (17), each coefficient K
1, K2, K3, K4 are obtained, and these coefficients K1, K
2, K3, K4, target bit rate R and reference quantization width q_
The function f (R, Dmb) is set by substituting st into the following equations (18), (19), and (20) (step 308). K1 = R × (q_st−2) / (2 × 500000) (14) K2 = 3R / ((q_st + 3) × 500000) (15) K3 = R × (70−q_st) / (70 × 800000) (16) K4 = q_st × R / (R−K3 × 500000) −q_st × R / (R−K2 × 500000) (17) When Dmb <0 f (R, Dmb) = q_st × R / (R −K1 × Dmb) (18) When 0 ≦ Dmb <500000 f (R, Dmb) = q_st × R / (R−K2 × Dmb) (19) When Dmb> 500000 f (R, Dmb) = q_st × R / (R−K3 × Dmb) −K4 (20) where the quantization width q_sc derived from the function f (R, Dmb)
Rounds ale after the decimal point. Also, the quantization width q_sca
If le is 1 or less, set the quantization width q_scale to 1,
If the quantization width q_scale is 31 or more, the quantization width q_scale
Is set to 31.

【0090】こうして上式(18),(19),(2
0)に示す関数f(R,Dmb)を設定すると、制御回路
5は、各ステップ102〜109,110A,111の
処理を繰り返し、ステップ110Aの度に、該関数f
(R,Dmb)に基づく演算を行って、量子化幅q_scale
を更新する。
Thus, the above equations (18), (19) and (2)
After setting the function f (R, Dmb) shown in (0), the control circuit 5 repeats the processing of each of steps 102 to 109, 110A, and 111.
By performing an operation based on (R, Dmb), the quantization width q_scale
To update.

【0091】この様に目標ビットレートRに応じて基準
量子化幅q_stを適宜に設定すれば、目標ビットレートR
に応じた安定した画質の再生画像を得ることができる。
例えば、目標ビットレートが3Mbps未満と低い場合
は、平均的な量子化幅が大きくなるので、この平均的な
量子化幅の近辺で、量子化幅が小さな変化率で変化する
様な関数f(R,Dmb)を設定すれば、画質が安定す
る。同様に、目標ビットレートが6Mbps未満と高い
場合は、平均的な量子化幅が小さくなるので、この平均
的な量子化幅の近辺で、量子化幅が小さな変化率で変化
する様な関数f(R,Dmb)を設定すれば、再生画像の
画質が安定する。
As described above, by appropriately setting the reference quantization width q_st according to the target bit rate R, the target bit rate R
, It is possible to obtain a reproduced image having a stable image quality according to.
For example, when the target bit rate is lower than 3 Mbps, the average quantization width is large. Therefore, a function f () in which the quantization width changes at a small rate of change near this average quantization width. R, Dmb), the image quality is stabilized. Similarly, when the target bit rate is as high as less than 6 Mbps, the average quantization width is small. Therefore, a function f such that the quantization width changes at a small rate of change around this average quantization width. If (R, Dmb) is set, the image quality of the reproduced image is stabilized.

【0092】図12は、本発明の第3実施形態における
符号化処理を示すフローチャートである。この符号化処
理は、図1、図3及び図5に示す符号化処理装置におい
て行われる。
FIG. 12 is a flowchart showing an encoding process according to the third embodiment of the present invention. This encoding process is performed in the encoding processing device shown in FIGS. 1, 3, and 5.

【0093】図12のフローチャートの処理は、図6の
フローチャートの処理における各ステップ101及び1
10を各ステップ101B,110Bに置き換え、更に
ステップ401を加えたものであり、他の各ステップ1
02〜109及び111が図6のフローチャートの処理
と共通する。
The processing of the flowchart of FIG. 12 is performed by the steps 101 and 1
10 is replaced by steps 101B and 110B, and step 401 is further added.
02 to 109 and 111 are common to the processing of the flowchart of FIG.

【0094】したがって、図12のフローチャートの処
理は、図6のフローチャートの処理と比較して、ステッ
プ101Bにおける各パラメータの初期化処理、及びス
テップ110Bにおける量子化幅q_scaleの導出処理が
異なり、更にステップ401における係数K5の更新処
理が異なる。
Therefore, the processing of the flowchart of FIG. 12 differs from the processing of the flowchart of FIG. 6 in the initialization processing of each parameter in step 101B and the derivation processing of the quantization width q_scale in step 110B. The update processing of the coefficient K5 in 401 is different.

【0095】ステップ101Bにおいて、レート制御部
3の制御回路5は、目標ビットレートR(bps)を予
め定められた値に設定し、VBVバッファのサイズを1
835008ビットに設定し、ビット発生誤差Dmbを0
に設定し、占有量VBV_fullnessを935008ビッ
トに設定する。また、目標ビットレートRをフレームレ
ートで割ることによって、1ピクチャー当たりの目標ビ
ット発生量Tpicを求めると共に、目標ビットレートR
をフレームレートと1ピクチャー内の各マクロブロック
の数で割ることによって、1マクロブロック当たりの目
標ビット発生量Tmbを求める。更に、係数K5を0に設
定し、基準量子化幅q_stを3に設定し、直前の量子化
幅last_q及び量子化幅q_scaleを基準量子化幅q_stと
同じ3に共に設定する。
In step 101B, the control circuit 5 of the rate control unit 3 sets the target bit rate R (bps) to a predetermined value and sets the size of the VBV buffer to 1
835008 bits are set, and the bit generation error Dmb is set to 0.
And the occupation amount VBV_fullness is set to 935008 bits. Further, by dividing the target bit rate R by the frame rate, the target bit generation amount Tpic per picture is obtained, and the target bit rate R
Is divided by the frame rate and the number of macroblocks in one picture, thereby obtaining a target bit generation amount Tmb per macroblock. Further, the coefficient K5 is set to 0, the reference quantization width q_st is set to 3, and the immediately preceding quantization width last_q and the quantization width q_scale are both set to 3, which is the same as the reference quantization width q_st.

【0096】このステップ101Bは、占有量VBV_f
ullnessを935008ビットに設定した点、係数K5及
び直前の量子化幅last_qと言う2つの新たなパラメー
タを付加した点、及び基準量子化幅q_stを低めの3に
設定した点で、図6のステップ101と異なる。
This step 101B determines the occupation amount VBV_f.
The step of FIG. 6 is that the ullness is set to 935008 bits, the coefficient K5 and the immediately preceding quantization width last_q are added to two new parameters, and the reference quantization width q_st is set to a lower value of 3. Differs from 101.

【0097】この後、制御回路5は、各ステップ102
〜107,401,108,109,110B,111
の処理を繰り返し、その度に、1マクロブロック当たり
の実際のビット発生量Bmbを求め(ステップ106)、
上式(3)に基づいてビット発生誤差Dmbを更新し(ス
テップ107)、係数K5及び直前の量子化幅last_qを
更新し(ステップ401)、ビット発生誤差Dmbがしき
い値D4を越えいないことを確認してから(ステップ1
08,No)、関数f(last_q,K5,Dmb)に基づく演
算を行って、量子化幅q_scaleを更新し(ステップ11
0B)、この量子化幅q_scaleに応じてDCT変換によ
り得られた各変換係数を量子化し(ステップ111)、
量子化データを可変長符号化して、圧縮符号化された画
像データを形成する。
After that, the control circuit 5 determines in each step 102
~ 107, 401, 108, 109, 110B, 111
Is repeated, and each time, the actual bit generation amount Bmb per macroblock is obtained (step 106).
The bit generation error Dmb is updated based on the above equation (3) (step 107), the coefficient K5 and the immediately preceding quantization width last_q are updated (step 401), and the bit generation error Dmb does not exceed the threshold value D4. (Step 1
08, No) and an operation based on the function f (last_q, K5, Dmb) to update the quantization width q_scale (step 11).
0B), and quantizes each transform coefficient obtained by the DCT transform according to this quantization width q_scale (step 111),
The quantized data is subjected to variable-length encoding to form compression-encoded image data.

【0098】ステップ401の処理を図13のフローチ
ャートに従って次に説明する。まず、制御回路5は、直
前の量子化幅last_qを1つ前のマクロブロックを符号
化するときに用いた量子化幅q_scaleに更新し(ステッ
プ411)、ビット発生誤差Dmb>500000である
か否かを判定する(ステップ412)。ビット発生誤差
Dmb>500000であれば(ステップ412,Ye
s)、制御回路5は、直前の量子化幅last_qが7以上1
0以下の範囲に入っていることを確認してから(ステッ
プ413,Yes)、係数K5を直前の量子化幅last_q
(7以上10以下)から6を引いた差(1以上4以下)
に更新する(ステップ414)。ただし、直前の量子化
幅last_qが7以上10以下の範囲に入っていなければ
(ステップ413,No)、ステップ414において係数
K5を更新することはない。
Next, the processing of step 401 will be described with reference to the flowchart of FIG. First, the control circuit 5 updates the immediately preceding quantization width last_q to the quantization width q_scale used when encoding the immediately preceding macroblock (step 411), and determines whether or not the bit generation error Dmb> 5000000 Is determined (step 412). If the bit generation error Dmb> 500000 (step 412, Ye
s), the control circuit 5 determines that the immediately preceding quantization width last_q is 7 or more and 1
After confirming that the coefficient is within the range of 0 or less (step 413, Yes), the coefficient K5 is set to the immediately preceding quantization width last_q.
(7 or more and 10 or less) minus 6 (1 or more and 4 or less)
(Step 414). However, if the immediately preceding quantization width last_q does not fall within the range of 7 or more and 10 or less (No in Step 413), the coefficient K5 is not updated in Step 414.

【0099】また、ビット発生誤差Dmb>500000
でなければ(ステップ412,No)、制御回路5は、0
≧ビット発生誤差Dmb>−100000かつ係数K5≧
4であるか否かを判定し(ステップ415)、この条件
を満たせば(ステップ415,Yes)、係数K5を3に更
新する(ステップ416)。また、この条件を満たさな
ければ(ステップ415,No)、次のステップ417に
移る。
Also, the bit generation error Dmb> 500000
If not (step 412, No), the control circuit 5
≧ Bit generation error Dmb> −100000 and coefficient K5 ≧
It is determined whether it is 4 (step 415), and if this condition is satisfied (step 415, Yes), the coefficient K5 is updated to 3 (step 416). If this condition is not satisfied (step 415, No), the procedure moves to the next step 417.

【0100】このステップ417において、制御回路5
は、−100000≧ビット発生誤差Dmb>−2000
00かつ係数K5≧3であるか否かを判定し、この条件
を満たせば(ステップ417,Yes)、係数K5を2に更
新する(ステップ418)。また、この条件を満たさな
ければ(ステップ417,No)、次のステップ419に
移る。
In step 417, the control circuit 5
Is −100000 ≧ bit generation error Dmb> −2000
It is determined whether 00 and the coefficient K5 ≧ 3. If this condition is satisfied (step 417, Yes), the coefficient K5 is updated to 2 (step 418). If this condition is not satisfied (step 417, No), the procedure moves to the next step 419.

【0101】このステップ419において、制御回路5
は、−200000≧ビット発生誤差Dmb>−3000
00かつ係数K5≧2であるか否かを判定し、この条件
を満たせば(ステップ419,Yes)、係数K5を1に更
新する(ステップ420)。また、この条件を満たさな
ければ(ステップ419,No)、次のステップ421に
移る。
In step 419, the control circuit 5
Is -200000 ≧ bit generation error Dmb> −3000
It is determined whether 00 and the coefficient K5 ≧ 2, and if this condition is satisfied (Step 419, Yes), the coefficient K5 is updated to 1 (Step 420). If this condition is not satisfied (step 419, No), the procedure moves to the next step 421.

【0102】このステップ421において、制御回路5
は、ビット発生誤差Dmb<−300000であるか否か
を判定し、この条件を満たせば(ステップ421,Ye
s)、係数K5を0に更新し(ステップ422)、この条
件を満たさなければ(ステップ421,No)、係数K5
を更新しない。
In this step 421, the control circuit 5
Determines whether the bit generation error Dmb <−300000, and if this condition is satisfied (step 421, Ye
s), the coefficient K5 is updated to 0 (step 422), and if this condition is not satisfied (step 421, No), the coefficient K5
Do not update

【0103】すなわち、図13のフローチャートの処理
においては、直前の量子化幅last_qを1つ前のマクロ
ブロックを符号化するときに用いた量子化幅q_scaleに
更新している。また、各ステップ412,415,41
7,419,421に示す各数値範囲のいずれにも、ビ
ット発生誤差Dmbが含まれなければ、つまり50000
0≧ビット発生誤差Dmb>0であれば、係数K5を更新
しない。更に、ビット発生誤差Dmb>500000にな
ったときには、直前の量子化幅last_qが7以上10以
下の範囲に入っていることを前提に、係数K5を直前の
量子化幅last_q(7以上10以下)から6を引いた差
(1以上4以下)に更新する。この後、ビット発生誤差
Dmbが0以下に低下したときには、その低下の程度に従
って、係数K5を段階的に0まで戻している。
That is, in the processing of the flowchart in FIG. 13, the immediately preceding quantization width last_q is updated to the quantization width q_scale used when encoding the immediately preceding macroblock. Steps 412, 415, 41
If the bit generation error Dmb is not included in any of the numerical ranges shown in FIGS.
If 0 ≧ bit generation error Dmb> 0, the coefficient K5 is not updated. Further, when the bit generation error Dmb> 500000, the coefficient K5 is set to the immediately preceding quantization width last_q (7 or more and 10 or less) on the assumption that the immediately preceding quantization width last_q is in the range of 7 or more and 10 or less. Is updated to the difference of 1 minus 4 (1 or more and 4 or less). Thereafter, when the bit generation error Dmb decreases to 0 or less, the coefficient K5 is returned to 0 stepwise according to the degree of the reduction.

【0104】こうして直前の量子化幅last_qを更新
し、かつ係数K5を設定した後に、図12のフローチャ
ートのステップ110Bにおいて、関数f(last_q,
K5,Dmb)に基づく演算を行い、量子化幅q_scaleを
更新する。
After updating the immediately preceding quantization width last_q and setting the coefficient K5 in this manner, in step 110B of the flowchart of FIG. 12, the function f (last_q,
K5, Dmb) to update the quantization width q_scale.

【0105】図14は、量子化幅q_scaleを導くための
関数f(last_q,K5,Dmb)の特性を示している。
FIG. 14 shows characteristics of a function f (last_q, K5, Dmb) for deriving the quantization width q_scale.

【0106】この図14に示す関数f(last_q,K5,
Dmb)の特性は、次式(21)〜(28)によって表さ
れる。
A function f (last_q, K5,
Dmb) are represented by the following equations (21) to (28).

【0107】 Dmb<0の場合 f(last_q,K5,Dmb)=1800000/(600000−Dmb)+K5 …(21) 0≦Dmb<500000の場合 f(last_q,K5,Dmb)=3000000/(1000000−Dmb)+K5 …(22) Dmb≧500000かつ3000000/(1000000−Dmb)<7かつK5=1の場合 f(last_q,K5,Dmb)=7 …(23) Dmb≧500000かつ3000000/(1000000−Dmb)<8かつK5=2の場合 f(last_q,K5,Dmb)=8 …(24) Dmb≧500000かつ3000000/(1000000−Dmb)<9かつK5=3の場合 f(last_q,K5,Dmb)=9 …(25) Dmb≧500000かつ3000000/(1000000−Dmb)<10かつK5=4の場合 f(last_q,K5,Dmb)=10 …(26) 上記条件以外で、900000≧Dmb≧500000の場合 f(last_q,K5,Dmb)=3000000/(1000000−Dmb) …(27) 上記条件以外で、900000>Dmbの場合 f(last_q,K5,Dmb)=31 …(28) ただし、f(last_q,K5,Dmb)から導かれる量子化
幅q_scaleの小数点以下を四捨五入する。
When Dmb <0, f (last_q, K5, Dmb) = 1800000 / (600000−Dmb) + K5 (21) When 0 ≦ Dmb <500000, f (last_q, K5, Dmb) = 300000 / (1000000−) Dmb) + K5 (22) Dmb ≧ 500,000 and 3000000 / (1000000−Dmb) <7 and K5 = 1 f (last_q, K5, Dmb) = 7 (23) Dmb ≧ 500,000 and 3,000,000 / (1000000−Dmb) ) <8 and K5 = 2 f (last_q, K5, Dmb) = 8 (24) Dmb ≧ 500000 and 300000 / (1000000−Dmb) <9 and K5 = 3 f (last_q, K5, Dmb) = 9 ... (25) Dmb ≧ 500000 and 300000 / (1000000−Dmb) <10 and K5 = 4 f (last_q, K5, Dmb) = 10 (26) Except for the above conditions, 900000 ≧ Dmb ≧ 500000 Case f (last_q, K5, Dmb) = 300000 / (1000000−Dmb) (27) Except for the above conditions, when 900000> Dmb, f (last_q, Dmb) K5, Dmb) = 31 (28) where the decimal part of the quantization width q_scale derived from f (last_q, K5, Dmb) is rounded off.

【0108】ここで、先に述べた様に係数K5を0に初
期設定した後(ステップ101B)、500000≧ビ
ット発生誤差Dmb>0である限り、この係数K5を更新
しないので(ステップ401)、量子化幅q_scaleは、
上式(22)から導出され、図14のグラフにおける特
性F1に沿って変化し、ビット発生誤差Dmb=0のとき
に、基準量子化幅q_st=3に一致する。
As described above, after the coefficient K5 is initialized to 0 (step 101B), the coefficient K5 is not updated as long as 500000 ≧ bit generation error Dmb> 0 (step 401). The quantization width q_scale is
It is derived from the above equation (22), changes along the characteristic F1 in the graph of FIG. 14, and matches the reference quantization width q_st = 3 when the bit generation error Dmb = 0.

【0109】この後に、例えばビット発生誤差Dmb>5
00000となり(ステップ412,Yes)、かつ直前
の量子化幅last_q=10となったときには(ステップ
413)、係数K5を4に更新することになる(ステッ
プ414)。
Thereafter, for example, the bit generation error Dmb> 5
When the value becomes 00000 (step 412, Yes) and the immediately preceding quantization width last_q = 10 (step 413), the coefficient K5 is updated to 4 (step 414).

【0110】次に、量子化幅q_scaleが調整されて、ビ
ット発生誤差Dmbが低下したときには、量子化幅q_scal
eは、上式(26)から導出され、図14のグラフにお
ける特性F9に沿って変化する。更に、500000≧
ビット発生誤差Dmb>0になると、量子化幅q_scale
は、上式(22)から導出されるものの、係数K5を4
に更新したことから、図14のグラフにおける特性F5
に沿って変化する。
Next, when the quantization width q_scale is adjusted and the bit generation error Dmb decreases, the quantization width q_scal
e is derived from the above equation (26) and changes along the characteristic F9 in the graph of FIG. Furthermore, 500000 ≧
When the bit generation error Dmb> 0, the quantization width q_scale
Is derived from the above equation (22), but the coefficient K5 is 4
To the characteristic F5 in the graph of FIG.
Varies along.

【0111】次に、ビット発生誤差Dmbが低下して、0
≧ビット発生誤差Dmb>−100000かつ係数K5≧
4と判定されると(ステップ415,Yes)、係数K5を
3に更新するので(ステップ416)、量子化幅q_scal
eは、上式(22)から導出され、図14のグラフにお
ける特性F4に沿って変化する。
Next, the bit generation error Dmb decreases to 0
≧ Bit generation error Dmb> −100000 and coefficient K5 ≧
If it is determined to be 4 (Step 415, Yes), the coefficient K5 is updated to 3 (Step 416), and the quantization width q_scal
e is derived from the above equation (22) and changes along the characteristic F4 in the graph of FIG.

【0112】この後、500000≧ビット発生誤差D
mb>0に戻れば、量子化幅q_scaleは、図14のグラフ
における特性F4に沿って変化する。また、ビット発生
誤差Dmbが更に低下して、ビット発生誤差Dmb<−30
0000であると判定されると(ステップ421,Ye
s)、係数K5を0に更新するので(ステップ422)、
量子化幅q_scaleは、上式(22)から導出され、図1
4のグラフにおける特性F1に沿って変化する。
Thereafter, 500000 ≧ bit generation error D
If mb> 0, the quantization width q_scale changes along the characteristic F4 in the graph of FIG. Further, the bit generation error Dmb further decreases, and the bit generation error Dmb <−30.
0000 (step 421, Ye
s) Since the coefficient K5 is updated to 0 (step 422),
The quantization width q_scale is derived from the above equation (22),
It changes along the characteristic F1 in the graph of FIG.

【0113】以降同様に、ビット発生誤差Dmb>500
000となったときには、直前の量子化幅last_qが7
以上10以下の範囲に入っていることを前提に、係数K
5が大きくなる様に更新し、この後に、500000≧
ビット発生誤差Dmb>0になると、係数K5の大きさに
応じて、各特性F2〜F5のいずれかを選択し、ビット発
生誤差Dmbが小さくなるにつれて、係数K5を段階的に
小さく更新して、特性F1に戻る。
Similarly, the bit generation error Dmb> 500
000, the previous quantization width last_q is 7
Assuming that the coefficient falls within the range of 10 or more, the coefficient K
5 is updated to be larger, and after this, 500000 ≧
When the bit generation error Dmb> 0, one of the characteristics F2 to F5 is selected according to the magnitude of the coefficient K5, and as the bit generation error Dmb becomes smaller, the coefficient K5 is updated stepwise to become smaller. Return to the characteristic F1.

【0114】すなわち、図12のフローチャートの処理
においては、量子化幅q_scaleの特性として、ヒステリ
シスループを描くものを適用している。このため、ピク
チャーの符号化の難易度が高くなって、符号化に費やさ
れるビット発生量が大きくなり、ビット発生誤差Dmbが
増大して、量子化幅q_scaleが十分に大きくなったとき
には、ヒステリシスループの上側の特性曲線に従って、
量子化幅q_scaleが変化するので、この量子化幅q_scale
を大きく維持することができ、再生画像の画質を安定さ
せることができる。
That is, in the processing of the flowchart of FIG. 12, a characteristic that draws a hysteresis loop is applied as the characteristic of the quantization width q_scale. For this reason, the degree of difficulty in coding the picture increases, the amount of bits generated for coding increases, the bit generation error Dmb increases, and when the quantization width q_scale is sufficiently large, the hysteresis loop According to the upper characteristic curve of
Since the quantization width q_scale changes, this quantization width q_scale
Can be maintained large, and the image quality of the reproduced image can be stabilized.

【0115】また、符号化の難易度が極端に高くなって
k5が大きくなった後、シーンチェンジなどによって、
符号化の難易度が比較的低くなったとき、ビット発生誤
差Dmbが急激に減少し、ビット発生誤差Dmb<0の領域
で、量子化幅q_scaleが急激に減少するものの、この後
の増加の方向では、量子化幅q_scaleの変化率が小さく
なるので、画質が向上してから、この画質が安定に維持
される。
Further, after the difficulty of encoding becomes extremely high and k5 becomes large, a scene change or the like causes
When the encoding difficulty becomes relatively low, the bit generation error Dmb rapidly decreases, and in a region where the bit generation error Dmb <0, the quantization width q_scale rapidly decreases, but the direction of increase thereafter. In this case, since the rate of change of the quantization width q_scale becomes small, the image quality is improved, and then this image quality is stably maintained.

【0116】この様に符号化の難易度が低い場合は、量
子化幅を小さく設定して、再生画像の画質を安定に保
ち、また難易度が高い場合には、量子化幅を大きくし
て、これを維持することによって、再生画像の画質を安
定させているので、目標ビットレート毎に、量子化幅を
導く関数を変更する必要がなく、符号化の難易度に応じ
て画質が安定する様な符号化が行える。
As described above, when the degree of difficulty of encoding is low, the quantization width is set to be small to keep the image quality of the reproduced image stable, and when the degree of difficulty is high, the quantization width is increased. By maintaining this, the image quality of the reproduced image is stabilized, so that it is not necessary to change the function for deriving the quantization width for each target bit rate, and the image quality is stabilized according to the difficulty of encoding. Such encoding can be performed.

【0117】なお、第3実施形態では、量子化幅を導く
関数として、上式で示したような特性曲線を導くものと
したが、量子化幅を導く特性として、ヒステリシスルー
プを描くものであれば、特性曲線を直線に近似してもよ
い。ここでは、ヒステリシス特性となる条件として、量
子化幅とビット発生誤差を用いているが、量子化幅とビ
ット発生誤差の関係に基づいて、一方から他方を導くこ
とができるので、いずれか一方のみを用いても良い。
In the third embodiment, the characteristic curve as shown in the above equation is derived as a function for deriving the quantization width. However, as a characteristic for deriving the quantization width, a hysteresis loop may be drawn. For example, the characteristic curve may be approximated to a straight line. Here, the quantization width and the bit generation error are used as conditions for the hysteresis characteristic, but one can be derived from the other based on the relationship between the quantization width and the bit generation error. May be used.

【0118】[0118]

【発明の効果】以上の説明から明らかな様に、本発明に
よれば、実際のビット発生量と前記目標ビット発生量の
差であるビット発生誤差を求めて、このビット発生誤差
に対応する量子化幅を求めており、前記ビット発生誤差
の予め定められた範囲においては、ビット発生誤差の変
化に対して量子化幅が小さく変化する特性を設定し、こ
の特性に基づいてビット発生誤差に対する量子化幅を求
めている。このため、ビット発生誤差の予め定められた
範囲において該ビット発生誤差が変化している状態で
は、量子化幅が大きく変化せず、GOP内の各ピクチャ
ーI,P,Bのいずれに対しても、それぞれの適切な目
標ビット発生量が割り当てられ、これらのピクチャーに
対応する各再生画像の画質が安定する。また、1つのピ
クチャーにおいても、ビット発生誤差の予め定められた
範囲において該ビット発生誤差が変化している限り、適
切な量子化幅を設定して、各マクロブロックの符号化の
難易度に応じて適切なそれぞれのビット発生量を該各マ
クロブロックに割り当てることができる。
As is apparent from the above description, according to the present invention, a bit generation error which is a difference between an actual bit generation amount and the target bit generation amount is obtained, and a quantum corresponding to the bit generation error is determined. In the predetermined range of the bit generation error, a characteristic in which the quantization width changes small with respect to the change in the bit generation error is set, and the quantization for the bit generation error is set based on this characteristic. Seeking the extent of change. For this reason, in a state where the bit generation error changes within a predetermined range of the bit generation error, the quantization width does not largely change, and any of the pictures I, P, and B in the GOP is not changed. , An appropriate target bit generation amount is allocated, and the image quality of each reproduced image corresponding to these pictures is stabilized. Also, in one picture, as long as the bit generation error changes within a predetermined range of the bit generation error, an appropriate quantization width is set, and the degree of difficulty in coding each macroblock is set. Thus, an appropriate bit generation amount can be allocated to each macroblock.

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

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

【図2】映像信号の符号化処理の概略を説明するために
用いた図
FIG. 2 is a diagram used for explaining an outline of a video signal encoding process;

【図3】図1の装置における基本符号化処理部を示すブ
ロック図
FIG. 3 is a block diagram showing a basic encoding processing unit in the apparatus of FIG. 1;

【図4】映像信号を固定レートで符号化するときのVB
Vバッファ中のデータ占有量を示す図
FIG. 4 shows VB when encoding a video signal at a fixed rate.
Diagram showing data occupancy in V buffer

【図5】図1の装置におけるレート制御部を示すブロッ
ク図
FIG. 5 is a block diagram showing a rate control unit in the device of FIG. 1;

【図6】図1の装置における符号化処理を示すフローチ
ャート
FIG. 6 is a flowchart showing an encoding process in the apparatus of FIG. 1;

【図7】図6の符号化処理におけるステップ104のス
タッフィング処理を示すフローチャート
FIG. 7 is a flowchart showing a stuffing process of step 104 in the encoding process of FIG. 6;

【図8】図1の装置における量子化幅q_scaleを導くた
めの関数f(R,Dmb)の特性を示すグラフ
8 is a graph showing characteristics of a function f (R, Dmb) for deriving a quantization width q_scale in the apparatus of FIG.

【図9】図1の装置における量子化幅q_scaleを導くた
めの他の関数f(R,Dmb)の特性を示すグラフ
FIG. 9 is a graph showing characteristics of another function f (R, Dmb) for deriving a quantization width q_scale in the apparatus of FIG. 1;

【図10】本発明の第2実施形態における符号化処理を
示すフローチャート
FIG. 10 is a flowchart illustrating an encoding process according to the second embodiment of the present invention.

【図11】図10の符号化処理におけるステップ101
Aの初期化処理を示すフローチャート
11 is a step 101 in the encoding processing of FIG. 10;
Flow chart showing initialization processing of A

【図12】本発明の第3実施形態における符号化処理を
示すフローチャート
FIG. 12 is a flowchart illustrating an encoding process according to a third embodiment of the present invention.

【図13】図12の符号化処理におけるステップ401
の処理を示すフローチャート
FIG. 13 is a step 401 in the encoding process of FIG. 12;
Flowchart showing the processing of

【図14】第3の実施例における量子化幅q_scaleを導
くための関数関数f(last_q,K5,Dmb)の特性を示
すグラフ
FIG. 14 is a graph showing characteristics of a function function f (last_q, K5, Dmb) for deriving a quantization width q_scale in the third embodiment.

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

1 基本符号化処理部 2 エンコーダ送出バッファ 3 レート制御部 4 MBビットカウンタ 5 制御回路 11 画像並び替え部 12 走査変換処理部 13 差分部 14 DCT変換処理部 15 重みづけ量子化処理部 16 可変長符号化処理部 17 逆量子化部 18 逆DCT処理部 19 動き補償付き予測処理部 20 モード判定部 21 動き検出処理部 22 加算処理部 DESCRIPTION OF SYMBOLS 1 Basic encoding processing part 2 Encoder sending buffer 3 Rate control part 4 MB bit counter 5 Control circuit 11 Image rearrangement part 12 Scan conversion processing part 13 Difference part 14 DCT transformation processing part 15 Weighting quantization processing part 16 Variable length code Processing section 17 inverse quantization section 18 inverse DCT processing section 19 prediction processing section with motion compensation 20 mode determination section 21 motion detection processing section 22 addition processing section

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 映像信号を符号化するときの量子化幅を
求め、この量子化幅に基づいて該映像信号を符号化する
画像圧縮符号化装置であって、 前記映像信号の符号化に費やされた実際のビット発生量
を求めると共に、目標ビットレートに応じた目標ビット
発生量を求め、前記実際のビット発生量と前記目標ビッ
ト発生量の差であるビット発生誤差を求めて、このビッ
ト発生誤差に対応する量子化幅を求めており、前記ビッ
ト発生誤差の予め定められた範囲においては、ビット発
生誤差の変化に対して量子化幅が小さく変化する特性を
設定し、この特性に基づいてビット発生誤差に対する量
子化幅を求める制御手段を備える画像圧縮符号化装置。
An image compression encoding apparatus for determining a quantization width when encoding a video signal, and encoding the video signal based on the quantization width, wherein the video compression encoding device is used for encoding the video signal. In addition to obtaining the actual bit generation amount which has been reduced, a target bit generation amount corresponding to a target bit rate is obtained, and a bit generation error which is a difference between the actual bit generation amount and the target bit generation amount is obtained. A quantization width corresponding to the generation error is obtained, and in a predetermined range of the bit generation error, a characteristic in which the quantization width changes small with respect to a change in the bit generation error is set, and based on this characteristic, An image compression encoding apparatus comprising control means for calculating a quantization width for a bit generation error by using the control means.
【請求項2】 基準量子化幅が予め定められており、 制御手段は、目標ビットレートからビット発生誤差に対
応する値を差し引いた値と該目標ビットレートの比を求
めて、この比と前記基準量子化幅を積算し、この積に基
づいて映像信号を符号化するときの量子化幅を求める請
求項1に記載の画像圧縮符号化装置。
2. A reference quantization width is predetermined, and the control means obtains a ratio of a value obtained by subtracting a value corresponding to a bit generation error from a target bit rate to the target bit rate, and calculates the ratio and the target bit rate. 2. The image compression encoding apparatus according to claim 1, wherein a reference quantization width is integrated, and a quantization width for encoding a video signal is obtained based on the product.
【請求項3】 制御手段は、目標ビットレートに基づい
て基準量子化幅を求め、ビット発生誤差の予め定められ
た範囲においては、ビット発生誤差の変化に対して量子
化幅が前記基準量子化幅近傍で小さく変化する特性を設
定し、この特性に基づいてビット発生誤差に対する量子
化幅を求める請求項1に記載の画像圧縮符号化装置。
3. The control means obtains a reference quantization width based on a target bit rate, and in a predetermined range of a bit generation error, the quantization width is changed with respect to a change in the bit generation error. 2. The image compression encoding apparatus according to claim 1, wherein a characteristic that changes slightly near the width is set, and a quantization width for a bit generation error is determined based on the characteristic.
【請求項4】 ビット発生誤差の予め定められた範囲及
び該範囲の近傍においては、ビット発生誤差の変化に対
する量子化幅の変化の特性がヒステリシスループを描く
請求項1に記載の画像圧縮符号化装置。
4. The image compression coding according to claim 1, wherein the characteristic of the change of the quantization width with respect to the change of the bit generation error draws a hysteresis loop in a predetermined range of the bit generation error and in the vicinity of the predetermined range. apparatus.
【請求項5】 映像信号を符号化してなる各画像データ
を順次入力して、これらの画像データを順次出力する仮
想バッファを想定した場合は、この仮想バッファの占有
量がビット発生誤差に対応し、この仮想バッファの占有
量が0近傍になると、量子化幅が急峻に最大値に近づ
き、かつビット発生誤差の変化に対して小さく変化する
該量子化幅の特性に連なる様に、該量子化幅が連続的に
変化する請求項1に記載の画像圧縮符号化装置。
5. A virtual buffer for sequentially inputting image data obtained by encoding video signals and sequentially outputting the image data, the occupancy of the virtual buffer corresponds to a bit generation error. When the occupation amount of the virtual buffer approaches 0, the quantization width sharply approaches the maximum value, and the quantization width is changed so as to be linked to the characteristic of the quantization width that changes small with a change in the bit generation error. The image compression encoding apparatus according to claim 1, wherein the width changes continuously.
【請求項6】 ビット発生誤差の複数の範囲が予め定め
られ、これらの範囲毎に、ビット発生誤差の変化に対す
る量子化幅の変化を示す特性が設定され、 制御手段は、前記各範囲のうちからビット発生誤差の入
る範囲を選択して、この範囲の特性に基づいて、ビット
発生誤差に対する量子化幅を求める請求項1に記載の画
像圧縮符号化装置。
6. A plurality of ranges of the bit generation error are predetermined, and a characteristic indicating a change in the quantization width with respect to the change of the bit generation error is set for each of the ranges. 2. The image compression encoding apparatus according to claim 1, wherein a range in which the bit generation error is included is selected from, and a quantization width for the bit generation error is obtained based on characteristics of the range.
【請求項7】 MPEG規格に準拠して、映像信号をマ
クロブロック単位で量子化幅に基づいて符号化してお
り、 制御手段は、マクロブロック毎に、ビット発生誤差に対
応する量子化幅を求める請求項1に記載の画像圧縮符号
化装置。
7. A video signal is encoded in macroblock units based on a quantization width in accordance with the MPEG standard, and the control means calculates a quantization width corresponding to a bit generation error for each macroblock. The image compression encoding apparatus according to claim 1.
【請求項8】 映像信号を符号化するときの量子化幅を
求め、この量子化幅に基づいて該映像信号を符号化する
画像圧縮符号化方法であって、 前記映像信号の符号化に費やされた実際のビット発生量
を求めると共に、目標ビットレートに応じた目標ビット
発生量を求め、前記実際のビット発生量と前記目標ビッ
ト発生量の差であるビット発生誤差を求めて、このビッ
ト発生誤差に対応する量子化幅を求めており、前記ビッ
ト発生誤差の予め定められた範囲においては、ビット発
生誤差の変化に対して量子化幅が小さく変化する特性を
設定し、この特性に基づいてビット発生誤差に対する量
子化幅を求める画像圧縮符号化方法。
8. An image compression encoding method for determining a quantization width when encoding a video signal and encoding the video signal based on the quantization width, the method comprising: In addition to obtaining the actual bit generation amount which has been reduced, a target bit generation amount corresponding to a target bit rate is obtained, and a bit generation error which is a difference between the actual bit generation amount and the target bit generation amount is obtained. A quantization width corresponding to the generation error is obtained, and in a predetermined range of the bit generation error, a characteristic in which the quantization width changes small with respect to a change in the bit generation error is set, and based on this characteristic, Image compression encoding method for obtaining a quantization width for a bit generation error using
【請求項9】 基準量子化幅が予め定められており、目
標ビットレートからビット発生誤差に対応する値を差し
引いた値と該目標ビットレートの比を求めて、この比と
前記基準量子化幅を積算し、この積に基づいて映像信号
を符号化するときの量子化幅を求める請求項8に記載の
画像圧縮符号化方法。
9. A reference quantization width is predetermined, and a ratio between a value obtained by subtracting a value corresponding to a bit generation error from a target bit rate and the target bit rate is determined. 9. The image compression encoding method according to claim 8, wherein a quantization width for encoding a video signal is obtained based on the product.
【請求項10】 目標ビットレートに基づいて基準量子
化幅を求め、ビット発生誤差の予め定められた範囲にお
いては、ビット発生誤差の変化に対して量子化幅が前記
基準量子化幅近傍で小さく変化する特性を設定し、この
特性に基づいてビット発生誤差に対する量子化幅を求め
る請求項8に記載の画像圧縮符号化方法。
10. A reference quantization width is determined based on a target bit rate, and in a predetermined range of a bit generation error, the quantization width is small near the reference quantization width with respect to a change in the bit generation error. 9. The image compression encoding method according to claim 8, wherein a changing characteristic is set, and a quantization width for a bit generation error is obtained based on the characteristic.
【請求項11】 ビット発生誤差の予め定められた範囲
においては、ビット発生誤差の変化に対する量子化幅の
変化の特性がヒステリシスループを描く請求項8に記載
の画像圧縮符号化方法。
11. The image compression encoding method according to claim 8, wherein within a predetermined range of the bit generation error, the characteristic of the change of the quantization width with respect to the change of the bit generation error draws a hysteresis loop.
【請求項12】 映像信号を符号化してなる各画像デー
タを順次入力して、これらの画像データを順次出力する
仮想バッファを想定した場合は、この仮想バッファの占
有量がビット発生誤差に対応し、この仮想バッファの占
有量が0近傍になると、量子化幅が急峻に最大値に近づ
き、かつビット発生誤差の変化に対して小さく変化する
該量子化幅の特性に連なる様に、該量子化幅が連続的に
変化する請求項8に記載の画像圧縮符号化方法。
12. When assuming a virtual buffer for sequentially inputting each image data obtained by encoding a video signal and sequentially outputting these image data, the occupation amount of the virtual buffer corresponds to a bit generation error. When the occupation amount of the virtual buffer approaches 0, the quantization width sharply approaches the maximum value, and the quantization width is changed so as to be linked to the characteristic of the quantization width that changes small with a change in the bit generation error. 9. The image compression encoding method according to claim 8, wherein the width changes continuously.
【請求項13】 ビット発生誤差の複数の範囲が予め定
められ、これらの範囲毎に、ビット発生誤差の変化に対
する量子化幅の変化を示す特性が設定され、前記各範囲
のうちからビット発生誤差の入る範囲を選択して、この
範囲の特性に基づいて、ビット発生誤差に対する量子化
幅を求める請求項8に記載の画像圧縮符号化方法。
13. A plurality of ranges of the bit generation error are predetermined, and a characteristic indicating a change in the quantization width with respect to the change of the bit generation error is set for each of these ranges. 9. The image compression encoding method according to claim 8, wherein a range in which is included is selected, and a quantization width for a bit generation error is obtained based on characteristics of the range.
【請求項14】 MPEG規格に準拠して、映像信号を
マクロブロック単位で量子化幅に基づいて符号化してお
り、マクロブロック毎に、ビット発生誤差に対応する量
子化幅を求める請求項8に記載の画像圧縮符号化方法。
14. A video signal is encoded in macroblock units based on a quantization width in accordance with the MPEG standard, and a quantization width corresponding to a bit generation error is obtained for each macroblock. Image compression encoding method as described in the above.
JP25908797A 1996-09-25 1997-09-24 Image compression encoding apparatus and method Expired - Fee Related JP3151173B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25908797A JP3151173B2 (en) 1996-09-25 1997-09-24 Image compression encoding apparatus and method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP25259196 1996-09-25
JP8-252591 1996-09-25
JP25908797A JP3151173B2 (en) 1996-09-25 1997-09-24 Image compression encoding apparatus and method

Publications (2)

Publication Number Publication Date
JPH10155152A true JPH10155152A (en) 1998-06-09
JP3151173B2 JP3151173B2 (en) 2001-04-03

Family

ID=26540799

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25908797A Expired - Fee Related JP3151173B2 (en) 1996-09-25 1997-09-24 Image compression encoding apparatus and method

Country Status (1)

Country Link
JP (1) JP3151173B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001063938A1 (en) * 2000-02-28 2001-08-30 Kabushiki Kaisha Toshiba Video encoding apparatus and video encoding method
US6879632B1 (en) 1998-12-24 2005-04-12 Nec Corporation Apparatus for and method of variable bit rate video coding
JP2010130548A (en) * 2008-11-28 2010-06-10 Canon Inc Encoding apparatus and method
JP2012191658A (en) * 2000-04-21 2012-10-04 Sony Corp Information processing unit, information processing method, recording medium and program
WO2017183448A1 (en) * 2016-04-19 2017-10-26 ソニー株式会社 Data processing device, data processing method, and program
CN114513664A (en) * 2022-04-18 2022-05-17 鹏城实验室 Video frame encoding method and device, intelligent terminal and computer readable storage medium

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6879632B1 (en) 1998-12-24 2005-04-12 Nec Corporation Apparatus for and method of variable bit rate video coding
WO2001063938A1 (en) * 2000-02-28 2001-08-30 Kabushiki Kaisha Toshiba Video encoding apparatus and video encoding method
EP1185108A1 (en) * 2000-02-28 2002-03-06 Kabushiki Kaisha Toshiba Video encoding apparatus and video encoding method
EP1185108A4 (en) * 2000-02-28 2004-01-02 Toshiba Kk Video encoding apparatus and video encoding method
US6819712B2 (en) 2000-02-28 2004-11-16 Kabushiki Kaisha Toshiba Video encoding apparatus and video encoding method
JP2012191658A (en) * 2000-04-21 2012-10-04 Sony Corp Information processing unit, information processing method, recording medium and program
US8634700B2 (en) 2000-04-21 2014-01-21 Sony Corporation Information processing apparatus and method, program and recorded medium with improved retrieval
JP2010130548A (en) * 2008-11-28 2010-06-10 Canon Inc Encoding apparatus and method
WO2017183448A1 (en) * 2016-04-19 2017-10-26 ソニー株式会社 Data processing device, data processing method, and program
JPWO2017183448A1 (en) * 2016-04-19 2019-02-21 ソニー株式会社 Data processing apparatus, data processing method, and program
US10812790B2 (en) 2016-04-19 2020-10-20 Sony Corporation Data processing apparatus and data processing method
CN114513664A (en) * 2022-04-18 2022-05-17 鹏城实验室 Video frame encoding method and device, intelligent terminal and computer readable storage medium

Also Published As

Publication number Publication date
JP3151173B2 (en) 2001-04-03

Similar Documents

Publication Publication Date Title
US6094455A (en) Image compression/encoding apparatus and system with quantization width control based on bit generation error
US7426309B2 (en) Method of controlling encoding rate, method of transmitting video data, encoding rate controller for video encoder, and video data transmission system using the encoding rate controller
KR100319994B1 (en) Video encoding device
KR100471956B1 (en) Moving picture encoding apparatus and method
JP4517495B2 (en) Image information conversion apparatus, image information conversion method, encoding apparatus, and encoding method
KR100610520B1 (en) Video data encoder, video data encoding method, video data transmitter, and video data recording medium
US7826530B2 (en) Use of out of order encoding to improve video quality
US20040234150A1 (en) Quantization matrix adjusting method for avoiding underflow of data
KR19990086789A (en) Method of selecting re-quantization step size in which bit rate changes rapidly and bit rate control method using the same
US5717464A (en) Rate control for a video encoder
JP3259702B2 (en) Moving picture variable bit rate coding apparatus and method
JP2004274236A (en) Encoding apparatus, encoding method, program, and recording medium
JP3151173B2 (en) Image compression encoding apparatus and method
JP3173369B2 (en) Image compression coding device
KR20000070810A (en) Encoder and encoding method
JP2001145102A (en) Method and device for converting dynamic image compressed and encoded signal and medium with converting program recorded thereon
Lee et al. A rate control algorithm for DCT-based video coding using simple rate estimation and linear source model
Kim et al. An accurate bit-rate control for real-time MPEG video encoder
JP3902948B2 (en) Video encoding device
JP4718736B2 (en) Video encoding device
JP4100317B2 (en) Image coding apparatus and quantization control method thereof
JP4186543B2 (en) Encoding apparatus, encoding method, program, and recording medium
JPH10126792A (en) Image encoding method and device
JP4228739B2 (en) Encoding apparatus, encoding method, program, and recording medium
JP4035747B2 (en) Encoding apparatus and encoding method

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: 20001228

LAPS Cancellation because of no payment of annual fees