JP2003299080A - Coder, coding method, program and recording medium - Google Patents

Coder, coding method, program and recording medium

Info

Publication number
JP2003299080A
JP2003299080A JP2002104314A JP2002104314A JP2003299080A JP 2003299080 A JP2003299080 A JP 2003299080A JP 2002104314 A JP2002104314 A JP 2002104314A JP 2002104314 A JP2002104314 A JP 2002104314A JP 2003299080 A JP2003299080 A JP 2003299080A
Authority
JP
Japan
Prior art keywords
encoding
bit
bit amount
calculated
uncompressed data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002104314A
Other languages
Japanese (ja)
Other versions
JP4273385B2 (en
Inventor
Hiromichi Ueno
弘道 上野
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.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to JP2002104314A priority Critical patent/JP4273385B2/en
Publication of JP2003299080A publication Critical patent/JP2003299080A/en
Application granted granted Critical
Publication of JP4273385B2 publication Critical patent/JP4273385B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To perform bit supply rate control for feedback rate control by a difficulty average avgD in a former GOP (group of picture). <P>SOLUTION: When a picture under currently processing is judged to be the head of the GOP, the difficulty average avgD in the former GOP is obtained, and a value of max<SB>-</SB>sum<SB>-</SB>sup being the upper limit value of the sum of value sum<SB>-</SB>sup of values of supplement is obtained. In the case of avgD>;Ox2,000 and sum<SB>-</SB>sup<;max<SB>-</SB>sum<SB>-</SB>sup, supplement having a positive value is provided to a usable bit rate R. When it is judged to be not avgD>;Ox2,000 and sum<SB>-</SB>sup<;max<SB>-</SB>sum<SB>-</SB>sup and avgD;Ox1,000 and sum<SB>-</SB>sup>;min<SB>-</SB>sum<SB>-</SB>sup, the supplement having a negative value is added to the usable bit rate quantity R, otherwise the supplement=0. <P>COPYRIGHT: (C)2004,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、符号化装置および
符号化方法、プログラム、並びに記録媒体に関し、特
に、フィードバック型レート制御において、ビット補給
レート制御を行う場合に用いて好適な、符号化装置およ
び符号化方法、プログラム、並びに記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a coding device, a coding method, a program, and a recording medium, and particularly to a coding device suitable for use in a bit rate control in feedback rate control. And an encoding method, a program, and a recording medium.

【0002】[0002]

【従来の技術】近年、映像データおよび音声データを圧
縮して情報量を減らす方法として、種々の圧縮符号化方
法が提案されており、その代表的なものにMPEG2
(MovingPicture Experts Group Phase 2)がある。
2. Description of the Related Art In recent years, various compression coding methods have been proposed as a method of compressing video data and audio data to reduce the amount of information, of which MPEG2 is a typical one.
(MovingPicture Experts Group Phase 2) is available.

【0003】このような画像圧縮方式において、良好な
エンコード画質を得る方法として、TM5(Test Model
5)がある。TM5のステップ1においては、ピクチャ
単位に与えるターゲットビットの算出を行う。ターゲッ
トビットの算出においては、ピクチャタイプ別のGC
(Global Complexity)のそれぞれの比率に応じて、そ
のGOP(Group of Picture)内の残りのピクチャに割
り当てることができるビット量Rを比例配分して、各ピ
クチャに割り当てるビット量を算出する。
In such an image compression method, TM5 (Test Model
There is 5). In step 1 of TM5, the target bit to be given for each picture is calculated. When calculating the target bit, the GC for each picture type is used.
The bit amount R that can be assigned to the remaining pictures in the GOP (Group of Pictures) is proportionally distributed according to each ratio of (Global Complexity), and the bit amount to be assigned to each picture is calculated.

【0004】TM5は、GOPあたりの発生ビット量を
ほぼ一定にするために優れた方法であるが、固定レート
符号化を行う場合には、必ずしも、GOPの発生ビット
量を一定にする必要はない。固定レート符号化において
は、VBV(Video Buffering Verifier)バッファの占
有量が、規定値をオーバーフロー、あるいはアンダーフ
ローしないようにしなければならない。
TM4 is an excellent method for making the amount of generated bits per GOP almost constant, but when performing fixed rate coding, it is not always necessary to make the amount of generated bits of GOP constant. . In fixed-rate encoding, it is necessary to prevent the occupied amount of a VBV (Video Buffering Verifier) buffer from overflowing or underflowing a specified value.

【0005】TM5においては、GOPあたりの発生ビ
ット量がほぼ一定であるから、VBVバッファがオーバ
ーフローあるいはアンダーフローすることはない。しか
しながら、TM5においては、低いビットレートで符号
化した場合に、バッファ容量を有効利用することができ
ない。例えば、MPEGのMP@PLにおいて、TM5
を適用した場合、VBVバッファ容量は約1.8Mbi
tであるのに対して、バッファから引き抜かれる1枚あ
たりのピクチャのビット量が少ないため、約1.8Mb
itを有効に利用することができない。
In TM5, since the amount of generated bits per GOP is almost constant, the VBV buffer does not overflow or underflow. However, in TM5, the buffer capacity cannot be effectively used when encoding is performed at a low bit rate. For example, TM5 in MP @ PL of MPEG
, The VBV buffer capacity is about 1.8 Mbi.
However, since the number of bits per picture that is pulled out from the buffer is small, it is about 1.8 Mb.
It cannot be used effectively.

【0006】このように、入力される絵柄に関わらず、
一定量のビット量を割り当ててしまうことにより、符号
化難易度が高い絵柄については、符号化歪みが顕著に発
生してしまい、一方、符号化難易度が低い絵柄は、符号
化歪みが少ないため、全体として、むらの多い不安定な
画像になってしまう。
As described above, regardless of the input pattern,
By assigning a certain amount of bits, coding distortion will occur remarkably for pictures with high coding difficulty, while pictures with low coding difficulty will have less coding distortion. , As a whole, it becomes an unstable image with a lot of unevenness.

【0007】このような問題を解決するために、符号化
難易度が高い絵柄には、バッファがアンダーフローしな
い範囲で、より多くのビット量を配分し、一方、符号化
難易度が低い絵柄には、バッファがオーバーフローしな
い範囲で、絵柄に適した少ないビット量を配分する必要
がある。
In order to solve such a problem, a larger amount of bits is allocated to a picture having a high degree of coding difficulty in a range where the buffer does not underflow, while a picture having a low degree of coding difficulty is distributed. Needs to allocate a small amount of bits suitable for the picture within the range where the buffer does not overflow.

【0008】そこで、本出願人は、特開平10−754
43において、映像データの部分毎の絵柄の複雑さに応
じて発生ビット量を調節し、全体として、圧縮後の映像
の品質を向上させることができるようにした、映像デー
タ圧縮装置およびその方法について開示している。
Therefore, the applicant of the present invention has filed Japanese Patent Application Laid-Open No. 10-754.
43, a video data compression apparatus and method for adjusting the generated bit amount according to the complexity of a picture for each part of the video data so as to improve the quality of the video after compression as a whole. Disclosure.

【0009】TM5において、GOPの残りのピクチャ
に割り当てることができる使用可能ビット量Rは、レー
トコントロールで重要なパラメータである。例えば、G
OPの前半において、複雑な絵柄の画像が続いたため
に、たくさんのビット量を割り当ててしまうと、GOP
の後半で、ビット量Rが、極端に少なくなってしまった
り、あるいは、負の数になってしまう。
In TM5, the available bit amount R that can be assigned to the remaining pictures of the GOP is an important parameter in rate control. For example, G
In the first half of the OP, images with complicated patterns continued, so if a large amount of bits were allocated, GOP
In the latter half of the above, the bit amount R becomes extremely small or becomes a negative number.

【0010】これに対して、本出願人が特開平10−7
5443において開示したビット補給レート制御とは、
これからエンコードしようとする複数枚のピクチャに対
して割り当てられている使用可能ビット量Rに、そのエ
ンコード対象の画像難易度やVBVバッファ占有量に応
じて、ビット量を加える、あるいは減じる(以下、加え
られる、あるいは減じられるビットをsupplementと称す
る)ことを特徴とするレート制御方式である。
On the other hand, the applicant of the present invention has disclosed in Japanese Patent Laid-Open No. 10-7.
The bit replenishment rate control disclosed in 5443 is
A bit amount is added to or subtracted from the usable bit amount R allocated to a plurality of pictures to be encoded, depending on the image difficulty level of the encoding target and the VBV buffer occupancy amount (hereinafter, added Bits that can be or are subtracted are called supplements).

【0011】[0011]

【発明が解決しようとする課題】以前提案されたビット
補給レート制御は、これからエンコードしようとする複
数枚のピクチャ画像難易度等の情報が全て既知である場
合、すなわちエンコード情報を先読みしたフィードフォ
ワード(Feed Forward)型レート制御に適用されていた
もので、例えば、GOPの15枚のデータを蓄積した
後、その画像符号化難易度を判断していたので、その情
報蓄積に一定の遅延を生じてしまうものである。しかし
ながら、エンコーダシステムに対する昨今の低遅延要求
により、そのような遅延を生じないレート制御が要求さ
れているため、先読み情報を得ることができないフィー
ドバック(Feed Back)型レート制御にビット補給レー
ト制御を適用する必要が出てきた。
The bit replenishment rate control that has been proposed in the past has been proposed in the case where information such as the difficulty levels of a plurality of picture images to be encoded is already known, that is, the feedforward (prefetching the encoding information). This is applied to feed forward type rate control. For example, after the data of 15 GOP data is accumulated, the image encoding difficulty level is judged, so that a certain delay occurs in the information accumulation. It is something that ends up. However, due to recent low-delay requirements for encoder systems, rate control that does not cause such a delay is required. Therefore, bit replenishment rate control is applied to feedback (Feed Back) type rate control where prefetch information cannot be obtained. I have to do it.

【0012】本発明はこのような状況に鑑みてなされた
ものであり、フィードバック型レート制御において、ビ
ット補給レート制御を行うことができるようにするもの
である。
The present invention has been made in view of such a situation, and it is possible to perform the bit replenishment rate control in the feedback type rate control.

【0013】[0013]

【課題を解決するための手段】本発明の符号化装置は、
非圧縮データの複雑さを検出する第1の検出手段と、非
圧縮データを圧縮符号化する符号化手段と、第1の検出
手段により検出された、符号化手段により過去に符号化
された非圧縮データの複雑さを基に、これから符号化さ
れる非圧縮データに対して割り当てられるVBVバッフ
ァのバッファ容量のうち、使用可能である第1のビット
量に加えられる第2のビット量を算出する第1の算出手
段と、第1の算出手段により算出された第2のビット量
を、第1のビット量に加えた値を基に、ターゲットビッ
トを算出する第2の算出手段と、第2の算出手段により
算出されたターゲットビットを基に、符号化手段による
符号化の量子化インデックスを決定する決定手段とを備
えることを特徴とする。
The encoding device of the present invention is
First detecting means for detecting the complexity of the uncompressed data, encoding means for compression-encoding the uncompressed data, and non-encoding detected in the past by the encoding means detected by the first detecting means. Based on the complexity of the compressed data, the second bit amount added to the usable first bit amount of the buffer capacity of the VBV buffer allocated to the uncompressed data to be encoded is calculated. A first calculating unit; a second calculating unit that calculates a target bit based on a value obtained by adding the second bit amount calculated by the first calculating unit to the first bit amount; Determining means for determining the quantization index for encoding by the encoding means based on the target bit calculated by the calculating means.

【0014】第1の算出手段により算出された第2のビ
ット量の合計を算出する第3の算出手段を更に備えさせ
るようにすることができ、第1の算出手段には、第3の
算出手段により算出される第2のビット量の合計が、所
定の基準値より大きくならないような、第2のビット量
を算出させるようにすることができる。
A third calculating means for calculating the sum of the second bit amounts calculated by the first calculating means may be further provided, and the first calculating means may include the third calculating means. It is possible to calculate the second bit amount such that the total of the second bit amounts calculated by the means does not become larger than the predetermined reference value.

【0015】第1の検出手段には、非圧縮データの複雑
さを示す指標を算出させて非圧縮データの複雑さを検出
させるようにすることができ、第1の算出手段には、第
1の閾値と指標の大きさを比較させ、指標の方が大きい
場合、正の値の第2のビット量を算出させるようにする
ことができ、第1の閾値よりも小さな第2の閾値と指標
とを比較させ、指標の方が小さい場合、負の値の第2の
ビット量を算出させるようにすることができ、指標が、
第1の閾値と第2の閾値との間の数値である場合、第2
のビット量を0とさせるようにすることができる。
The first detecting means may be made to calculate an index indicating the complexity of the non-compressed data to detect the complexity of the non-compressed data. It is possible to compare the threshold value and the size of the index, and if the index is larger, to calculate the second bit amount of a positive value, and to calculate the second threshold value and the index smaller than the first threshold value. And the index is smaller, the second bit amount having a negative value can be calculated, and the index is
If the numerical value is between the first threshold and the second threshold, the second
The bit amount of can be set to 0.

【0016】非圧縮データは、複数のGOPにより構成
されているものとすることができ、第1の検出手段が算
出する指標は、符号化手段により過去に符号化された1
GOPの平均の難易度を示す指標であるものとすること
ができる。
The uncompressed data may be composed of a plurality of GOPs, and the index calculated by the first detecting means is 1 previously encoded by the encoding means.
It can be used as an index showing the average difficulty level of GOP.

【0017】シーンチェンジの発生を検出する第2の検
出手段と、シーンチェンジの前後の、同一のピクチャタ
イプの画像難易度を検出する第3の検出手段とを更に備
えさせるようにすることができ、第1の算出手段には、
第2の検出手段によりシーンチェンジが検出されなかっ
た場合、第1の検出手段により検出された、符号化手段
により過去に符号化された非圧縮データの複雑さを基
に、第2のビット量を算出させ、第2の検出手段により
シーンチェンジが検出された場合、第3の検出手段によ
る検出結果を基に、第2のビット量を算出させるように
することができる。
A second detecting means for detecting the occurrence of the scene change and a third detecting means for detecting the image difficulty levels of the same picture type before and after the scene change can be further provided. , The first calculation means,
When the scene change is not detected by the second detecting means, the second bit amount is determined based on the complexity of the uncompressed data previously encoded by the encoding means, which is detected by the first detecting means. When the scene change is detected by the second detecting means, the second bit amount can be calculated based on the detection result by the third detecting means.

【0018】第1の算出手段には、第2の検出手段によ
りシーンチェンジが検出され、かつ、シーンチェンジの
前よりシーンチェンジの後のほうが画像難易度が高い場
合、正の値の第2のビット量を算出させ、それ以外のと
き、第2のビット量を0とさせるようにすることができ
る。
In the first calculating means, when the scene change is detected by the second detecting means and the image difficulty level after the scene change is higher than that before the scene change, the second value having a positive value is used. It is possible to calculate the bit amount and to set the second bit amount to 0 at other times.

【0019】非圧縮データは、複数のGOPにより構成
されているものとすることができ、第1の算出手段に
は、GOPの符号化処理のうちの所定のタイミングで第
2のビット量を算出させるようにすることができ、第2
の算出手段には、第1の算出手段により算出された一番
新しい第2のビット量が負の値であり、かつ、GOP内
で画像難易度が所定の値以上変化した場合、第1の算出
手段により算出された一番新しい負の値の第2のビット
量を0として、ターゲットビットを算出させるようにす
ることができる。
The uncompressed data may be composed of a plurality of GOPs, and the first calculating means calculates the second bit amount at a predetermined timing in the GOP encoding process. You can let the second
If the newest second bit amount calculated by the first calculating unit is a negative value and the image difficulty level in the GOP has changed by a predetermined value or more, The target bit can be calculated by setting the second bit amount of the newest negative value calculated by the calculating means to 0.

【0020】本発明の符号化方法は、非圧縮データの複
雑さを検出する検出ステップと、非圧縮データを圧縮符
号化する符号化ステップと、検出ステップの処理により
検出された、符号化ステップの処理により過去に符号化
された非圧縮データの複雑さを基に、これから符号化さ
れる非圧縮データに対して割り当てられるVBVバッフ
ァのうち、使用可能である第1のビット量に加えられる
第2のビット量を算出する第1の算出ステップと、第1
の算出ステップの処理により算出された第2のビット量
を、第1のビット量に加えた値を基に、ターゲットビッ
トを算出する第2の算出ステップと、第2の算出ステッ
プの処理により算出されたターゲットビットを基に、符
号化ステップの処理による符号化の量子化インデックス
を決定する決定ステップとを含むことを特徴とする。
The encoding method of the present invention comprises a detection step of detecting the complexity of uncompressed data, an encoding step of compressing and encoding uncompressed data, and an encoding step detected by the processing of the detection step. Based on the complexity of the uncompressed data encoded in the past by the processing, the second bit added to the usable first bit amount of the VBV buffer allocated to the uncompressed data to be encoded. A first calculation step for calculating the bit amount of
Calculated by the process of the second calculation step, which calculates the target bit based on the value obtained by adding the second bit amount calculated by the process of And a determining step of determining a quantization index for encoding by the processing of the encoding step based on the generated target bits.

【0021】本発明の記録媒体に記録されているプログ
ラムは、非圧縮データの複雑さを検出する検出ステップ
と、非圧縮データを圧縮符号化する符号化ステップと、
検出ステップの処理により検出された、符号化ステップ
の処理により過去に符号化された非圧縮データの複雑さ
を基に、これから符号化される非圧縮データに対して割
り当てられるVBVバッファのうち、使用可能である第
1のビット量に加えられる第2のビット量を算出する第
1の算出ステップと、第1の算出ステップの処理により
算出された第2のビット量を、第1のビット量に加えた
値を基に、ターゲットビットを算出する第2の算出ステ
ップと、第2の算出ステップの処理により算出されたタ
ーゲットビットを基に、符号化ステップの処理による符
号化の量子化インデックスを決定する決定ステップとを
含むことを特徴とする。
The program recorded on the recording medium of the present invention comprises a detection step of detecting the complexity of uncompressed data, an encoding step of compressing and encoding the uncompressed data,
Based on the complexity of the uncompressed data previously encoded by the processing of the encoding step, which is detected by the processing of the detection step, of the VBV buffers allocated to the uncompressed data to be encoded A first calculation step of calculating a second bit amount added to the possible first bit amount and a second bit amount calculated by the process of the first calculation step are set as a first bit amount. A second calculation step of calculating a target bit based on the added value, and a quantization index for encoding by the processing of the encoding step is determined based on the target bit calculated by the processing of the second calculation step. And a determining step to perform.

【0022】本発明のプログラムは、非圧縮データの複
雑さを検出する検出ステップと、非圧縮データを圧縮符
号化する符号化ステップと、検出ステップの処理により
検出された、符号化ステップの処理により過去に符号化
された非圧縮データの複雑さを基に、これから符号化さ
れる非圧縮データに対して割り当てられるVBVバッフ
ァのうち、使用可能である第1のビット量に加えられる
第2のビット量を算出する第1の算出ステップと、第1
の算出ステップの処理により算出された第2のビット量
を、第1のビット量に加えた値を基に、ターゲットビッ
トを算出する第2の算出ステップと、第2の算出ステッ
プの処理により算出されたターゲットビットを基に、符
号化ステップの処理による符号化の量子化インデックス
を決定する決定ステップとを含むことを特徴とする。
The program of the present invention comprises a detection step of detecting the complexity of non-compressed data, an encoding step of compressing and encoding the non-compressed data, and a processing of the encoding step detected by the processing of the detection step. A second bit added to the available first bit amount of the VBV buffer allocated to the uncompressed data to be encoded, based on the complexity of the previously encoded uncompressed data. A first calculation step for calculating the quantity;
Calculated by the process of the second calculation step, which calculates the target bit based on the value obtained by adding the second bit amount calculated by the process of And a determining step of determining a quantization index for encoding by the processing of the encoding step based on the generated target bits.

【0023】本発明の符号化装置および符号化方法、並
びにプログラムにおいては、非圧縮データの複雑さが検
出され、非圧縮データが圧縮符号化され、過去に符号化
された非圧縮データの複雑さを基に、これから符号化さ
れる非圧縮データに対して割り当てられるVBVバッフ
ァのうち、使用可能である第1のビット量に加えられる
第2のビット量が算出され、算出された第2のビット量
を、第1のビット量に加えた値を基に、ターゲットビッ
トが算出され、算出されたターゲットビットを基に、量
子化インデックスが決定される。
In the encoding device, the encoding method, and the program of the present invention, the complexity of non-compressed data is detected, the non-compressed data is compression-encoded, and the complexity of non-compressed data encoded in the past is detected. Of the VBV buffers allocated to the uncompressed data to be encoded, a second bit amount added to the usable first bit amount is calculated, and the calculated second bit is calculated. The target bit is calculated based on the value obtained by adding the amount to the first bit amount, and the quantization index is determined based on the calculated target bit.

【0024】[0024]

【発明の実施の形態】以下、図を参照して、本発明の実
施の形態について説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings.

【0025】図1は、本発明を適応したエンコーダ1の
構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of an encoder 1 to which the present invention is applied.

【0026】画像並び替え部12は、入力された非圧縮
映像データを符号化順に並べ替える。走査変換・マクロ
ブロック化部13は、ピクチャ・フィールド変換を行
い、例えば、非圧縮映像データが映画の映像データであ
る場合、3:2プルダウン処理等を行う。イントラAC
算出部14は、画像並び替え部12および走査変換・マ
クロブロック化部13により処理され、Iピクチャに圧
縮符号化されるピクチャから、イントラAC(intra A
C)を算出する。
The image rearrangement unit 12 rearranges the input uncompressed video data in the order of encoding. The scan conversion / macroblocking unit 13 performs picture / field conversion, and performs, for example, 3: 2 pulldown processing when the uncompressed video data is video data of a movie. Intra AC
The calculation unit 14 is processed by the image rearrangement unit 12 and the scan conversion / macroblocking unit 13, and is compressed from an I-picture to an intra AC (intra A) picture.
Calculate C).

【0027】Iピクチャについては、他のピクチャの参
照なしに圧縮符号化されるため、後述するME残差を求
めることができない。従って、Iピクチャの符号化難易
度を求めるために、ME残差に代わるパラメータとし
て、イントラACが用いられる。イントラACは、MP
EG方式におけるDCT処理単位のDCTブロックごと
の映像データとの分散値の総和として定義されるパラメ
ータであって、映像の複雑さを指標し、映像の絵柄の難
しさおよび圧縮後のデータ量と相関性を有する。すなわ
ち、イントラACとは、DCTブロック単位で、それぞ
れの画素の画素値から、ブロック毎の画素値の平均値を
引いたものの絶対値和の、画面内における総和である。
イントラACは、次の式(1)で示される。
Since the I picture is compression-encoded without reference to other pictures, the ME residual, which will be described later, cannot be obtained. Therefore, the intra AC is used as a parameter instead of the ME residual in order to obtain the coding difficulty of the I picture. Intra AC is MP
It is a parameter defined as a sum of variance values of video data for each DCT block in the DCT processing unit in the EG method, which indicates the complexity of the video and correlates with the difficulty of the picture pattern of the video and the amount of data after compression. Have sex. That is, the intra AC is the total sum of absolute values in the screen obtained by subtracting the average value of the pixel values of each block from the pixel value of each pixel in DCT block units.
The intra AC is represented by the following equation (1).

【0028】[0028]

【数1】 ・・・(1)[Equation 1] ... (1)

【0029】また、式(1)において、式(2)が成り
立つ。
Further, in the equation (1), the equation (2) is established.

【数2】 ・・・・(2)[Equation 2] ... (2)

【0030】イントラAC算出部14は、算出されたイ
ントラACの値を、レートコントロール部15の難易度
算出部32に出力する。
The intra AC calculator 14 outputs the calculated intra AC value to the difficulty calculator 32 of the rate controller 15.

【0031】演算処理部16は、動き補償部25から供
給される動き補償情報を基に、供給された映像データに
対して動き補償を行い、DCT部18に対して出力す
る。DCT部18は、演算処理部16から入力された映
像データに対して、例えば、16画素×16画素のマク
ロブロック単位に離散コサイン変換(DCT)処理を施
し、時間領域のデータから周波数領域のデータに変換し
て、量子化部19に対して出力する。
The arithmetic processing unit 16 performs motion compensation on the supplied video data based on the motion compensation information supplied from the motion compensating unit 25, and outputs it to the DCT unit 18. The DCT unit 18 performs, for example, discrete cosine transform (DCT) processing on the video data input from the arithmetic processing unit 16 in units of macroblocks of 16 pixels × 16 pixels, and converts the time domain data to the frequency domain data. And outputs to the quantizer 19.

【0032】量子化部19は、DCT部18から入力さ
れた周波数領域のデータを、レートコントロール部15
の量子化インデックス決定部35から供給される量子化
インデックスQで量子化し、量子化データとしてVLC
(Variable Length Code;可変長符号化)部20および
逆量子化部22に対して出力する。
The quantizing unit 19 converts the frequency domain data input from the DCT unit 18 into the rate control unit 15.
Quantized by the quantization index Q supplied from the quantization index determination unit 35 of
It outputs to (Variable Length Code) unit 20 and inverse quantization unit 22.

【0033】VLC部20は、量子化部19から入力さ
れた量子化データに対し、所定の変換テーブルに基づく
可変長符号化処理を行い、その結果得られる可変長符号
化データをバッファ21に出力する。
The VLC section 20 performs variable length coding processing on the quantized data input from the quantizing section 19 based on a predetermined conversion table, and outputs the resulting variable length coded data to the buffer 21. To do.

【0034】バッファ21は、入力された符号化データ
をバッファリングし、符号化ビットストリームとして、
順次、出力する。
The buffer 21 buffers the input coded data to form a coded bit stream.
Output sequentially.

【0035】逆量子化部22は、量子化部19から入力
された量子化データを、量子化部19が実行した量子化
の量子化ステップで逆量子化し、逆量子化データとして
逆DCT部23に対して出力する。
The inverse quantization unit 22 inversely quantizes the quantized data input from the quantization unit 19 in the quantization step of the quantization executed by the quantization unit 19, and the inverse DCT unit 23 as the inverse quantized data. Output to.

【0036】逆DCT部23は、逆量子化部22から入
力される逆量子化データに対して逆DCT処理を行い、
演算処理部24に対して出力する。
The inverse DCT unit 23 performs inverse DCT processing on the inverse quantized data input from the inverse quantization unit 22,
It is output to the arithmetic processing unit 24.

【0037】演算処理部24は、動き補償部25の出力
データ、および逆DCT部23の出力データを加算し、
動き補償部25に対して出力する。動き検出部17は、
圧縮対象となるピクチャ(入力ピクチャ)の注目マクロ
ブロックと、参照されるピクチャ(参照ピクチャ)との
間の差分値の絶対値和あるいは自乗値和が最小となるよ
うなマクロブロックを探し、動きベクトルを求めて、動
き補償部25に出力する。動き補償部25は、演算処理
部24の出力データに対して、動き検出部17から入力
される動きベクトルに基づいて動き補償処理を行い、演
算処理部24、および演算処理部16に対して出力す
る。
The arithmetic processing unit 24 adds the output data of the motion compensation unit 25 and the output data of the inverse DCT unit 23,
It is output to the motion compensation unit 25. The motion detector 17
The motion vector is searched for a macroblock that minimizes the sum of absolute values or the sum of squared differences between the target macroblock of the picture to be compressed (input picture) and the referenced picture (reference picture). Is calculated and output to the motion compensation unit 25. The motion compensation unit 25 performs motion compensation processing on the output data of the arithmetic processing unit 24 based on the motion vector input from the motion detection unit 17, and outputs the data to the arithmetic processing units 24 and 16. To do.

【0038】レートコントロール部15は、ME残差算
出部31、難易度算出部32、genbit検出部33、ター
ゲットビット決定部34、および量子化インデックス決
定部35で構成され、ターゲットビットおよび量子化イ
ンデックスを決定する。
The rate control unit 15 is composed of an ME residual calculation unit 31, a difficulty calculation unit 32, a genbit detection unit 33, a target bit determination unit 34, and a quantization index determination unit 35, and the target bit and the quantization index. To decide.

【0039】ME残差算出部31は、画像の符号化難易
度と強い相関があるパラメータであるME残差を算出す
る。動き予測によって、参照フレームから入力フレーム
への差分値の絶対値和などが少なくなるような動きベク
トルを求めることができるが、その場合における差分値
の絶対値和、あるいは自乗和などで求められる誤差成分
のパワーがME残差である。Pピクチャ、およびBピク
チャにおいては、ME残差と画像の符号化難易度とは、
ほぼ単純な比例関係を有している。
The ME residual calculation unit 31 calculates the ME residual, which is a parameter having a strong correlation with the image coding difficulty. By motion estimation, it is possible to obtain a motion vector that reduces the sum of absolute difference values from the reference frame to the input frame, but in that case, the error obtained by the sum of absolute difference values or the sum of squares. The power of the component is the ME residual. In the P picture and the B picture, the ME residual and the image coding difficulty are
It has an almost simple proportional relationship.

【0040】難易度算出部32は、ME残差算出部31
から入力されるME残差による近似により、式(3)、
および、式(4)を用いて、PピクチャおよびBピクチ
ャの符号化難易度Djを算出する。
The difficulty level calculation unit 32 uses the ME residual calculation unit 31.
By the approximation with the ME residual input from Equation (3),
Also, the coding difficulty Dj of the P picture and the B picture is calculated using the equation (4).

【数3】 ・・・(3)[Equation 3] ... (3)

【数4】 ・・・(4)[Equation 4] ... (4)

【0041】ここで、MEjは、j番目のピクチャにお
けるME残差であり、aP、aB、b P、bBは、それぞ
れ、1次式で近似した場合の傾きと補正値である。
Here, MEj is the j-th picture.
KE ME residual, aP, AB, B P, BBIs that
Is a slope and a correction value when approximated by a linear expression.

【0042】また、難易度算出部32はイントラAC算
出部14から入力されるイントラACによる近似によ
り、同様にIピクチャの符号化難易度Djを算出し、タ
ーゲットビット決定部34に出力する。
Further, the difficulty calculation section 32 similarly calculates the coding difficulty Dj of the I picture by approximation by the intra AC input from the intra AC calculation section 14, and outputs it to the target bit determination section 34.

【0043】そして、難易度算出部32は、それそれの
ピクチャで算出された符号化難易度Djから、GOP毎
の難易度平均avgDを算出する。
Then, the difficulty level calculator 32 calculates the average difficulty level avgD for each GOP from the coding difficulty level Dj calculated for each picture.

【0044】genbit検出部33は、バッファ21にバッ
ファリングされている符号化データから、直近に符号化
されたIピクチャの発生ビット量genbitを検出し、その
値を、ターゲットビット決定部34に出力する。
The genbit detection unit 33 detects the generated bit amount genbit of the most recently encoded I picture from the encoded data buffered in the buffer 21, and outputs the value to the target bit determination unit 34. To do.

【0045】ターゲットビット決定部34は、難易度算
出部32から入力された符号化難易度Dj、および、gen
bit検出部33から入力されたIピクチャの発生ビット
量genbitに基づいて、各ピクチャタイプのピクチャそれ
ぞれのターゲットビットを算出して、レート制御を行
う。
The target bit determination unit 34 receives the coding difficulty Dj and gen input from the difficulty calculation unit 32.
Based on the generated bit amount genbit of the I picture input from the bit detection unit 33, the target bit of each picture of each picture type is calculated and the rate control is performed.

【0046】すなわち、ターゲットビット決定部34
は、後述する処理により、エンコードを終了した過去の
画像における難易度などを基に、これからエンコードし
ようとする複数枚のピクチャに対して割り当てられてい
る使用可能ビット量Rに加えられるsupplementの値(su
pplementは、正の値である場合、負の値である場合、0
である場合がある)を決定する。
That is, the target bit determining section 34
Is the value of the supplement added to the usable bit amount R assigned to the plurality of pictures to be encoded, based on the difficulty of the past image that has been encoded by the process described later ( su
pplement is 0 for positive and negative values
May be).

【0047】ビット補給量supplementは、正負どちらの
値も取り得るので、supplementの積算値sum_supplement
(以下、sum_supと称する)の最大値と最小値を、使用
するVBVバッファサイズに応じて決定しておくこと
で、VBV制約の範囲内でのsupplement調整を行うこと
ができる。ターゲットビット決定部34は、この使用可
能ビット量R+supplementを基に、ターゲットビットの
値を求め、量子化インデックス決定部35に出力する。
Since the bit replenishment amount supplement can take both positive and negative values, the integrated value sum_supplement of the supplement
By determining the maximum value and the minimum value of (hereinafter referred to as sum_sup) according to the VBV buffer size to be used, it is possible to adjust the supplement within the range of the VBV constraint. The target bit determination unit 34 determines the value of the target bit based on the usable bit amount R + supplement and outputs it to the quantization index determination unit 35.

【0048】量子化インデックス決定部35は、ターゲ
ットビット決定部34から入力されたターゲットビット
の値に基づいて、量子化インデックスQを生成し、量子
化部19に対して出力する。
The quantization index determination unit 35 generates a quantization index Q based on the value of the target bit input from the target bit determination unit 34, and outputs it to the quantization unit 19.

【0049】次に、図2のフローチャートを参照して、
エンコードを終了した過去の画像における難易度を基
に、Rに加えるsupplementを決定する、ビット補給レー
ト制御処理1について説明する。
Next, referring to the flowchart of FIG.
The bit replenishment rate control processing 1 for determining the supplement to be added to R based on the difficulty of the past image after the encoding will be described.

【0050】ステップS1において、ターゲットビット
決定部34は、現在処理中のピクチャは、GOPの先頭
であるか否かを判断する。ステップS1において、GO
Pの先頭ではないと判断された場合、GOPの先頭であ
ると判断されるまで、ステップS1の処理が繰り返され
る。
In step S1, the target bit determining section 34 determines whether or not the picture currently being processed is the head of the GOP. In step S1, GO
When it is determined that it is not the head of P, the process of step S1 is repeated until it is determined that it is the head of GOP.

【0051】ステップS1において、GOPの先頭であ
ると判断された場合、ステップS2において、ターゲッ
トビット決定部34は、難易度算出部32より、前のG
OPにおける難易度平均avgDを取得する。
When it is determined in step S1 that the GOP is at the beginning, in step S2, the target bit determination unit 34 determines that the previous G from the difficulty level calculation unit 32 is determined.
Get the average difficulty level avgD in OP.

【0052】ステップS3において、ターゲットビット
決定部34は、使用可能ビット量Rに対して加えられた
supplementの値の合計であるsum_supの上限値であるmax
_sum_supの値を取得する。
In step S3, the target bit determination unit 34 adds the available bit amount R.
max, which is the upper limit of sum_sup, which is the sum of supplement values
Get the value of _sum_sup.

【0053】ステップS4において、ターゲットビット
決定部34は、avgD > 0x2000かつsum_sup < max_sum_s
upであるか否かを判断する。ここで、難易度平均avgDと
比較されている0x2000は、予め定められた閾値であり、
画質を検討しながら要求される画質を得るために設定可
能な値である。
In step S4, the target bit determining section 34 determines that avgD> 0x2000 and sum_sup <max_sum_s.
It is determined whether it is up. Here, 0x2000 which is compared with the average difficulty level avgD is a predetermined threshold value,
It is a value that can be set to obtain the required image quality while considering the image quality.

【0054】ステップS4において、avgD > 0x2000か
つsum_sup < max_sum_supであると判断された場合、ス
テップS5において、ターゲットビット決定部34は、
使用可能ビット量Rに対して、正の値のsupplementを加
える。すなわち、ターゲットビット決定部34は、前の
GOPは、ある一定以上の難易度を有していたため、こ
れからエンコードするGOPの難易度を、前のGOPと
同程度であると予測して、使用可能ビット量Rに対し
て、正の値のsupplementを加える。
When it is determined in step S4 that avgD> 0x2000 and sum_sup <max_sum_sup, the target bit determining unit 34 determines in step S5.
A positive value supplement is added to the usable bit amount R. That is, since the previous GOP has a certain degree of difficulty or more, the target bit determination unit 34 predicts that the degree of difficulty of the GOP to be encoded is similar to that of the previous GOP, and can use the target bit. A positive value supplement is added to the bit amount R.

【0055】ステップS4において、avgD > 0x2000か
つsum_sup < max_sum_supではないと判断された場合、
ステップS6において、ターゲットビット決定部34
は、avgD< 0x1000、かつsum_sup > min_sum_supである
か否かを判断する。ここで、難易度平均avgDと比較され
ている0x1000は、予め定められた閾値であり、上述し
た0x2000より小さな値(画像難易度が低いことを示す
値)であり、画質を検討しながら要求される画質を得る
ために設定可能な値である。
When it is determined in step S4 that avgD> 0x2000 and sum_sup <max_sum_sup are not satisfied,
In step S6, the target bit determination unit 34
Determines whether avgD <0x1000 and sum_sup> min_sum_sup. Here, 0x1000 compared with the average difficulty level avgD is a predetermined threshold value, which is a value smaller than 0x2000 described above (a value indicating that the image difficulty level is low), and is requested while considering the image quality. It is a value that can be set in order to obtain high image quality.

【0056】ステップS6において、avgD < 0x1000、
かつsum_sup > min_sum_supであると判断された場合、
ステップS7において、ターゲットビット決定部34
は、使用可能ビット量Rに対して、負の値のsupplement
を加える。すなわち、ターゲットビット決定部34は、
前のGOPは、ある一定以下の難易度であった(すなわ
ち、簡単な画像であった)ため、これからエンコードす
るGOPの難易度を、前のGOPと同程度であると予測
して、使用可能ビット量Rに対して、負の値のsuppleme
ntを加える。
In step S6, avgD <0x1000,
And if it is determined that sum_sup> min_sum_sup,
In step S7, the target bit determination unit 34
Is a negative value for the available bit amount R
Add. That is, the target bit determination unit 34
Since the previous GOP had a certain level of difficulty or less (that is, a simple image), the difficulty of the GOP to be encoded is predicted to be the same as that of the previous GOP and can be used. Negative value of suppleme for bit amount R
add nt.

【0057】ステップS6において、avgD < 0x1000、
かつsum_sup > min_sum_supではなかったと判断された
場合、ステップS8において、ターゲットビット決定部
34は、supplement = 0とする。すなわち、ターゲット
ビット決定部34は、使用可能ビット量Rに対して、su
pplementの増減を行わない。
In step S6, avgD <0x1000,
When it is determined that sum_sup> min_sum_sup is not satisfied, the target bit determination unit 34 sets supplement = 0 in step S8. That is, the target bit determination unit 34 sets su to the usable bit amount R.
Do not increase or decrease pplement.

【0058】ステップS5、ステップS7、もしくはス
テップS8の処理の終了後、ステップS9において、タ
ーゲットビット決定部34は、ステップS5、ステップ
S7、もしくはステップS8の処理において用いられた
supplementの値を用いて、sum_sup = sum_sup + supple
mentとし、処理は、ステップS1に戻り、それ以降の処
理が繰り返される。
After the processing of step S5, step S7, or step S8 is completed, the target bit determination unit 34 is used in the processing of step S5, step S7, or step S8 in step S9.
Using the value of supplement, sum_sup = sum_sup + supple
ment, the process returns to step S1 and the subsequent processes are repeated.

【0059】図2を用いて説明した処理により、エンコ
ードを終了した過去の画像における難易度を基に、使用
可能ビット量Rに加える、あるいは、減少されるsupple
mentの値が決定される。例えば、GOP単位で、R+su
pplemet(supplementは、正の値であるか、負の値であ
るか、もしくは0である)が決定される場合、前のGO
Pの画像難易度(イントラAC、あるいは、ME残差
等)の平均値を基に、これからエンコードするGOPの
難易度が前のGOPの難易度と同程度であると予測し
て、使用可能ビット量Rに対して、その難易度に応じた
supplementが加えられる。これにより、フィードバック
型レート制御にビット補給レート制御を適用することが
できる。
By the process described with reference to FIG. 2, the usable bit amount R is added or reduced based on the difficulty level of the past image which has been encoded.
The value of ment is determined. For example, in GOP units, R + su
The previous GO if pplemet (supplement is a positive value, a negative value, or 0) is determined
Based on the average value of the image difficulty level of P (intra AC, ME residual, etc.), it is predicted that the difficulty level of the GOP to be encoded will be the same as the difficulty level of the previous GOP, and the usable bit Depending on the amount R, depending on the difficulty
supplement is added. Thereby, the bit supplement rate control can be applied to the feedback type rate control.

【0060】ここでは、画像難易度をイントラAC、あ
るいは、ME残差を用いて算出するものとして説明した
が、画像難易度は、それ以外のパラメータを用いて算出
するようにしても良い。
Although the image difficulty has been described as being calculated using the intra AC or the ME residual, the image difficulty may be calculated using other parameters.

【0061】また、supplementの具体的な値の算出方法
は、例えば、特開平10−75443に開示されている
方法でも良いし、それ以外の方法で、要求される画質を
得ることができるsupplementの値を用いるようにしても
良い。
The method of calculating the specific value of the supplement may be, for example, the method disclosed in Japanese Patent Laid-Open No. 10-75443, or a method other than that may obtain the required image quality. You may make it use a value.

【0062】また、ここでは、前の1GOPにおける難
易度平均avgDを用いるものとして説明したが、難易度
算出部32は、1GOPにおける難易度平均avgDに代
わって、例えば、複数のGOP、もしくは、GOPの一
部における難易度平均を求めるようにしても良いし、更
に、単純な難易度平均ではなく、必要に応じて、重み付
け和や重み付け平均を算出するようにしても良い。
Also, here, the description is made assuming that the average difficulty level avgD in the previous 1 GOP is used, but the difficulty level calculation section 32 replaces the average difficulty level avgD in 1 GOP with, for example, a plurality of GOPs or GOPs. The average of the degree of difficulty may be calculated for a part of the above, or, instead of the simple average of the degree of difficulty, a weighted sum or a weighted average may be calculated as necessary.

【0063】しかしながら、図2を用いて説明したビッ
ト補給レート制御処理1では、シーンチェンジなどによ
り画像難易度の傾向が急激に変化した場合に、かえって
画質に悪影響を与えてしまうことがある。例えば、GO
P単位で、R+supplementを決定している場合、簡単な
画像から難しい画像にシーンチェンジが起きたときに、
前のGOPの画像難易度が低いために、supplementは負
の値となってしまい、難しい画像のGOPに対して少な
い使用可能ビット量Rでエンコードしてしまうことにな
る。
However, in the bit replenishment rate control processing 1 described with reference to FIG. 2, when the tendency of the image difficulty changes abruptly due to a scene change or the like, the image quality may be adversely affected. For example, GO
When R + supplement is determined in P units, when a scene change occurs from a simple image to a difficult image,
Since the image difficulty level of the previous GOP is low, the supplement has a negative value, and the GOP of the difficult image is encoded with a small usable bit amount R.

【0064】そこでシーンチェンジが起きたGOPをエ
ンコードする際には、その先頭のIピクチャと、一つ前
のGOPのIピクチャとの画像難易度の比較によりsupp
lementを決定するようにしても良い。これにより、シー
ンチェンジが起きたときに、難しい画像のGOPに少な
いビット量を割り当てるようなことがなくなり、画質を
向上させることができる。
Therefore, when encoding a GOP in which a scene change has occurred, by comparing the picture difficulty levels of the I picture at the beginning of the GOP and the I picture of the immediately preceding GOP, the supp
You may make it decide lement. As a result, when a scene change occurs, it is not necessary to allocate a small bit amount to the GOP of a difficult image, and the image quality can be improved.

【0065】次に、図3のフローチャートを参照して、
シーンチェンジにおいては、過去の同ピクチャタイプの
画像難易度と、シーンチェンジの起きた現ピクチャの画
像難易度の比較によって、使用可能ビット量Rに加えら
れるsupplementの値を決定する、ビット補給レート制御
処理2について説明する。
Next, referring to the flowchart of FIG.
In a scene change, the bit replenishment rate control that determines the value of the supplement added to the usable bit amount R by comparing the image difficulty of the same picture type in the past with the image difficulty of the current picture in which the scene change has occurred The process 2 will be described.

【0066】ステップS21において、ターゲットビッ
ト決定部34は、現在処理中のピクチャは、GOPの先
頭であるか否かを判断する。ステップS21において、
GOPの先頭ではないと判断された場合、GOPの先頭
であると判断されるまで、ステップS21の処理が繰り
返される。
In step S21, the target bit determining section 34 determines whether or not the picture currently being processed is the head of the GOP. In step S21,
When it is determined that it is not the head of the GOP, the process of step S21 is repeated until it is determined that the head of the GOP is reached.

【0067】ステップS21において、GOPの先頭で
あると判断された場合、ターゲットビット決定部34
は、ステップS22において、難易度算出部32より、
Iピクチャの画像符号化難易度Diを取得し、ステップS
23において、使用可能ビット量Rに対して加えられた
supplementの値の合計であるsum_supの上限値であるmax
_sum_supの値を取得する。
If it is determined in step S21 that the GOP is at the beginning, the target bit determining section 34
In step S22, the difficulty level calculation unit 32
The image coding difficulty Di of the I picture is acquired, and step S
23, added to the available bit amount R
max, which is the upper limit of sum_sup, which is the sum of supplement values
Get the value of _sum_sup.

【0068】ステップS24において、ターゲットビッ
ト決定部34は、シーンチェンジであるか否かを判断す
る。シーンチェンジであるか否かの判断は、例えば、M
E残差算出部31により算出されるME残差の値を基に
して判断するようにしても良いし、それ以外のいかなる
方法によって判断するようにしても良い。
In step S24, the target bit determining section 34 determines whether or not there is a scene change. The determination as to whether or not there is a scene change is made by, for example, M
The determination may be made based on the ME residual value calculated by the E residual calculation unit 31, or may be made by any other method.

【0069】ステップS24において、シーンチェンジ
であると判断された場合、ステップS25において、タ
ーゲットビット決定部34は、Iピクチャの画像符号化
難易度Diと、一つ前のGOPのIピクチャの画像符号化
難易度prevDiを比較し、更に、現在のsum_sup の値と、
ステップS23において取得したmax_sum_supの値を比
較して、Di > prevDiかつsum_sup < max_sum_supである
か否かを判断する。
If it is determined in step S24 that there is a scene change, the target bit determining section 34 determines in step S25 the image coding difficulty Di of the I picture and the image code of the I picture of the immediately preceding GOP. Compare the difficulty level prevDi, and further compare it with the current value of sum_sup,
The values of max_sum_sup acquired in step S23 are compared to determine whether Di> prevDi and sum_sup <max_sum_sup.

【0070】ステップS25において、Di > prevDiか
つsum_sup < max_sum_supであると判断された場合、ス
テップS26において、ターゲットビット決定部34
は、使用可能ビット量Rに対して、正の値のsupplement
を加える。すなわち、ターゲットビット決定部34は、
シーンチェンジ前の画像より、シーンチェンジ後の画像
のほうが難易度が高いものであることを検出するので、
使用可能ビット量Rに対して、正の値のsupplementを加
える。
When it is determined in step S25 that Di> prevDi and sum_sup <max_sum_sup, the target bit determining unit 34 is determined in step S26.
Is a positive value for the available bit amount R
Add. That is, the target bit determination unit 34
Since it detects that the image after the scene change is more difficult than the image before the scene change,
A positive value supplement is added to the usable bit amount R.

【0071】ステップS25において、Di > prevDiか
つsum_sup < max_sum_supではないと判断された場合、
ステップS27において、ターゲットビット決定部34
は、supplement = 0とする。すなわち、ターゲットビッ
ト決定部34は、使用可能ビット量Rに対して、supple
mentの増減を行わない。
If it is determined in step S25 that Di> prevDi and sum_sup <max_sum_sup are not satisfied,
In step S27, the target bit determination unit 34
Sets supplement = 0. That is, the target bit determination unit 34 uses the available bit amount R as a supplement.
Do not increase or decrease ment.

【0072】ステップS24において、シーンチェンジ
ではないと判断された場合、ステップS28において、
ターゲットビット決定部34は、難易度算出部32よ
り、前のGOPにおける難易度平均avgDを取得する。
If it is determined in step S24 that it is not a scene change, in step S28
The target bit determination unit 34 acquires the average difficulty level avgD in the previous GOP from the difficulty level calculation unit 32.

【0073】そして、ターゲットビット決定部34は、
ステップS29乃至ステップS33において、図2のス
テップS4乃至ステップS8において実行した処理と同
様の処理を実行する。
Then, the target bit determining section 34
In steps S29 to S33, the same processing as the processing executed in steps S4 to S8 of FIG. 2 is executed.

【0074】すなわち、ターゲットビット決定部34
は、ステップS29において、avgD >0x2000かつsum_su
p < max_sum_supであるか否かを判断し、avgD > 0x2000
かつsum_sup < max_sum_supであると判断された場合、
ステップS30において、使用可能ビット量Rに対し
て、正の値のsupplementを加える。
That is, the target bit determining unit 34
At step S29, avgD> 0x2000 and sum_su
Determine if p <max_sum_sup, avgD> 0x2000
And it is determined that sum_sup <max_sum_sup,
In step S30, a positive value supplement is added to the usable bit amount R.

【0075】ステップS29において、avgD > 0x2000
かつsum_sup < max_sum_supではないと判断された場
合、ターゲットビット決定部34は、ステップS31に
おいて、avgD < 0x1000、かつsum_sup > min_sum_supで
あるか否かを判断し、avgD < 0x1000、かつsum_sup > m
in_sum_supであると判断された場合、ステップS32に
おいて、使用可能ビット量Rに対して、負の値のsupplem
entを加え、avgD < 0x1000、かつsum_sup > min_sum_su
pではなかったと判断された場合、ステップS33にお
いて、supplement = 0とする。
In step S29, avgD> 0x2000
When it is determined that sum_sup <max_sum_sup is not satisfied, the target bit determination unit 34 determines in step S31 whether avgD <0x1000 and sum_sup> min_sum_sup, and avgD <0x1000 and sum_sup> m.
If it is determined to be in_sum_sup, in step S32, a negative value supplem for the available bit amount R.
Add ent, avgD <0x1000, and sum_sup> min_sum_su
When it is determined that it is not p, the supplement = 0 is set in step S33.

【0076】ステップS26、ステップS27、ステッ
プS30、ステップS32、もしくはステップS33の
処理の終了後、ステップS34において、ターゲットビ
ット決定部34は、ステップS22において取得したI
ピクチャの画像符号化難易度Diを、次のGOPの処理に
用いるために、prevDi = Diとする。
After the processing of step S26, step S27, step S30, step S32, or step S33 is completed, in step S34, the target bit determination section 34 acquires I obtained in step S22.
The picture coding difficulty level Di of a picture is set to prevDi = Di in order to be used for the processing of the next GOP.

【0077】ステップS35において、ターゲットビッ
ト決定部34は、ステップS26、ステップS27、ス
テップS30、ステップS32、もしくはステップS3
3の処理において用いられたsupplementの値を用いて、
sum_sup = sum_sup + supplementとし、処理は、ステ
ップS21に戻り、それ以降の処理が繰り返される。
At step S35, the target bit determining section 34 performs step S26, step S27, step S30, step S32, or step S3.
Using the value of supplement used in the process of 3,
Sum_sup = sum_sup + supplement, the process returns to step S21, and the subsequent processes are repeated.

【0078】図3を用いて説明した処理により、シーン
チェンジにおいては、過去の同ピクチャタイプ(ここで
はIピクチャ)の難易度と、シーンチェンジの起きた現
ピクチャ(ここではIピクチャ)の難易度の比較によっ
てsupplementを決定するようにすることができる。
By the processing described with reference to FIG. 3, in the scene change, the degree of difficulty of the same picture type in the past (I picture here) and the degree of difficulty of the current picture in which the scene change occurred (I picture here) The supplement can be determined by comparing.

【0079】これにより、例えば、GOP単位にR+su
pplementを決定している場合、簡単な画像から難しい画
像にシーンチェンジが起きたとしても、難しい画像のG
OPに対して少ないRでエンコードしてしまう、すなわ
ち、難しい画像のGOPに少ないビット量を割り当てる
ようなことがなくなり、画質を向上させることができ
る。
As a result, for example, R + su is set for each GOP.
When pplement is decided, even if a scene change occurs from a simple image to a difficult image, G of the difficult image
It is possible to improve the image quality by avoiding encoding with a small R for OP, that is, assigning a small bit amount to a GOP of a difficult image.

【0080】しかしながら、図2および図3を用いて説
明したビット補給レート制御処理1およびビット補給レ
ート制御処理2においては、一度決定したR+suppleme
ntの値を、エンコード途中で見直すことを行わないため
に、エンコード中の複数画像の難易度傾向がゆっくりと
変化していくような場合において、画質に悪影響を与え
てしまうことがある。
However, in the bit replenishment rate control processing 1 and the bit replenishment rate control processing 2 described with reference to FIGS. 2 and 3, R + suppleme once determined.
Since the value of nt is not reviewed during encoding, the image quality may be adversely affected in the case where the difficulty tendency of a plurality of images being encoded changes slowly.

【0081】図2および図3を用いて説明したビット補
給レート制御処理1およびビット補給レート制御処理2
においては、GOP単位でR+supplementを決定してい
るので、例えば、前のGOPが簡単な画像で、かつシー
ンチェンジが起きていないときには、使用可能ビット量
Rに対して加えられるsupplementが負の値となり、使用
可能ビット量が小さくなる。その状態でエンコードを開
始したGOPが、オーバーラップ画像のようにゆっくり
と難しくなると、GOPの最後でビット量が足りなくな
り、画質が悪くなってしまう。
Bit replenishment rate control processing 1 and bit replenishment rate control processing 2 described with reference to FIGS. 2 and 3.
In the above, since R + supplement is determined for each GOP, for example, when the previous GOP is a simple image and no scene change has occurred, the supplement added to the usable bit amount R becomes a negative value. , The usable bit amount becomes smaller. If the GOP that started encoding in that state becomes slowly and difficult like an overlapped image, the bit amount becomes insufficient at the end of the GOP, and the image quality deteriorates.

【0082】このような問題を解決するために、使用可
能ビット量Rに対して加えられるsupplementが負の値で
ある場合には、エンコード対象ピクチャの画像難易度
と、直前の同ピクチャタイプの画像難易度とを比較し
て、その差がある程度大きい場合には、残りのRに対し
て加えられた負の値のsupplementに対応する分を元に戻
す処理、換言すれば、差し引かれたsupplementに対応す
る分を元に戻す処理を導入する。
In order to solve such a problem, when the supplement added to the usable bit amount R is a negative value, the image difficulty of the picture to be encoded and the immediately preceding picture of the same picture type. Compared with the difficulty level, if the difference is large to some extent, the process of restoring the amount corresponding to the supplement of the negative value added to the remaining R, in other words, to the subtracted supplement Introduce a process to restore the corresponding amount.

【0083】図4のフローチャートを参照して、図2を
用いて説明したビット補給レート制御処理1にエンコー
ド途中でsupplementを見直す機構を導入したビット補給
レート制御処理3について説明する。
With reference to the flow chart of FIG. 4, the bit replenishment rate control processing 3 in which a mechanism for revising the supplement during the encoding is introduced to the bit replenishment rate control processing 1 described with reference to FIG. 2 will be described.

【0084】ステップS51において、ターゲットビッ
ト決定部34は、現在処理中のピクチャは、GOPの先
頭であるか否かを判断する。ステップS51において、
GOPの先頭ではないと判断された場合、ステップS5
2において、図5を用いて後述するビット量見直し処理
が実行され、処理は、ステップS51に戻り、それ以降
の処理が繰り返される。
In step S51, the target bit determining section 34 determines whether or not the picture currently being processed is the head of the GOP. In step S51,
If it is determined that it is not the head of the GOP, step S5
In 2, the bit amount reviewing process described later with reference to FIG. 5 is executed, the process returns to step S51, and the subsequent processes are repeated.

【0085】ステップS51において、GOPの先頭で
あると判断された場合、ステップS53乃至ステップS
60において、図2のステップS2乃至ステップS9と
同様の処理が実行される。
If it is determined in step S51 that the GOP is at the beginning, steps S53 to S53
At 60, processing similar to that at steps S2 to S9 of FIG. 2 is executed.

【0086】そして、ステップS60の処理の終了後、
処理は、ステップS51に戻り、それ以降の処理が繰り
返される。
Then, after the processing of step S60 is completed,
The process returns to step S51, and the subsequent processes are repeated.

【0087】次に、図5のフローチャートを参照して、
図4のステップS52において実行されるビット量見直
し処理について説明する。
Next, referring to the flowchart of FIG.
The bit amount review process executed in step S52 of FIG. 4 will be described.

【0088】ステップS81において、ターゲットビッ
ト決定部34は、一つ前の処理のsupplementの値である
prev_sup、並びに、今のピクチャ(Bピクチャ、もしく
はPピクチャ)の難易度の値D(B,P)、および、同
一ピクチャタイプの一つ前のピクチャの難易度の値prev
_D(B,P)を取得し、prev_sup < 0、かつ、D
(B,P)>4×prev_D(B,P)であるか否かを判断
する。
In step S81, the target bit determination unit 34 is the value of the supplement of the previous process.
prev_sup, the difficulty value D (B, P) of the current picture (B picture or P picture), and the difficulty value prev of the previous picture of the same picture type
_D (B, P) is acquired, prev_sup <0, and D
It is determined whether or not (B, P)> 4 × prev_D (B, P).

【0089】ステップS81において、prev_sup < 0、
かつ、D(B,P)>4×prev_D(B,P)ではないと
判断された場合、一つ前の処理のsupplementの値が負で
はないか、あるいは、エンコード対象ピクチャの画像難
易度と、直前の同ピクチャタイプの画像難易度との差が
それほど大きくないので、処理は、図4のステップS5
1に戻る。
In step S81, prev_sup <0,
When it is determined that D (B, P)> 4 × prev_D (B, P) is not satisfied, the value of the supplement of the immediately preceding process is not negative, or the image difficulty level of the encoding target picture is , The difference from the immediately preceding image difficulty level of the same picture type is not so large, the process proceeds to step S5 of FIG.
Return to 1.

【0090】なお、ここでは、難易度の値D(B,P)
と、難易度の値prev_D(B,P)の4倍とを比較して
いるが、ここでprev_D(B,P)に乗算される係数
は、画質を検討しながら設定される性質の値であること
は言うまでもない。
Here, the difficulty level value D (B, P)
Is compared with 4 times the difficulty value prev_D (B, P). Here, the coefficient by which prev_D (B, P) is multiplied is a value of a property set while considering the image quality. Needless to say.

【0091】ステップS81において、prev_sup < 0、
かつ、D(B,P)>4×prev_D(B,P)であると判
断された場合、一つ前の処理のsupplementの値が負であ
り、かつ、エンコード対象ピクチャの画像難易度と、直
前の同ピクチャタイプの画像難易度との差がある程度大
きいので、ステップS82において、ターゲットビット
決定部34は、R = R−prev_supとする。すなわち、こ
の処理は、一つ前の処理で算出されたsupplementの値を
0として、それ以降の処理を実行するのと同義であり、
ここでは、prev_sup < 0なので、実際には、Rの値は増
加する。
In step S81, prev_sup <0,
Further, when it is determined that D (B, P)> 4 × prev_D (B, P), the value of the supplement of the immediately preceding process is negative, and the image difficulty level of the encoding target picture, Since the difference from the image difficulty level of the immediately preceding picture type is large to some extent, the target bit determination unit 34 sets R = R-prev_sup in step S82. That is, this processing is synonymous with setting the value of the supplement calculated in the previous processing to 0 and executing the subsequent processing,
Since prev_sup <0 here, the value of R actually increases.

【0092】そして、ステップS82において、ターゲ
ットビット決定部34は、ステップS83において、su
m_sup = sum_sup−prev_supとし、ステップS83にお
いて、prev_sup = 0として、処理は、図4のステップS
51に戻る。ステップS83でも、同様に、prev_sup <
0であるから、sum_sup の値は増加する。
Then, in step S82, the target bit determining unit 34 determines in step S83 that su
m_sup = sum_sup-prev_sup, prev_sup = 0 in step S83, and the process is performed in step S of FIG.
Return to 51. Similarly in step S83, prev_sup <
Since it is 0, the value of sum_sup increases.

【0093】図4および図5のフローチャートを用いて
説明した処理により、一度決定したR+supplementをエ
ンコード途中で見直すため、例えば、エンコード中の複
数画像の難易度傾向がゆっくりと変化していくような場
合において、画質に悪影響を与えてしまうようなことを
未然に防ぐことができる。
By the processing described with reference to the flow charts of FIGS. 4 and 5, the R + supplement once determined is reviewed in the middle of encoding. Therefore, for example, when the difficulty tendency of a plurality of images being encoded changes slowly. In the above, it is possible to prevent the image quality from being adversely affected.

【0094】また、図3を用いて説明したビット補給レ
ート制御処理2にも、同様にして、エンコード途中でsu
pplementを見直す処理を導入することができる。
Similarly, the bit replenishment rate control process 2 described with reference to FIG.
A process to review the pplement can be introduced.

【0095】図6のフローチャートを参照して、図3を
用いて説明したビット補給レート制御処理2にエンコー
ド途中でsupplementを見直す機構を導入したビット補給
レート制御処理4について説明する。
With reference to the flowchart of FIG. 6, the bit replenishment rate control processing 4 in which a mechanism for revising the supplement during the encoding is introduced to the bit replenishment rate control processing 2 described with reference to FIG. 3 will be described.

【0096】ステップS101において、ターゲットビ
ット決定部34は、現在処理中のピクチャは、GOPの
先頭であるか否かを判断する。ステップS101におい
て、GOPの先頭ではないと判断された場合、ステップ
S102において、図5を用いて説明したビット量見直
し処理が実行され、処理は、ステップS101に戻り、
それ以降の処理が繰り返される。
In step S101, the target bit determining section 34 determines whether or not the currently processed picture is the head of the GOP. When it is determined in step S101 that it is not the head of the GOP, the bit amount reviewing process described with reference to FIG. 5 is executed in step S102, and the process returns to step S101.
The subsequent processing is repeated.

【0097】ステップS101において、GOPの先頭
であると判断された場合、ステップS103乃至ステッ
プS116において、図3のステップS22乃至ステッ
プS35と同様の処理が実行される。
If it is determined in step S101 that it is the head of the GOP, the same processing as steps S22 to S35 in FIG. 3 is executed in steps S103 to S116.

【0098】そして、ステップS116の処理の終了
後、処理は、ステップS101に戻り、それ以降の処理
が繰り返される。
After the processing of step S116 ends, the processing returns to step S101, and the subsequent processing is repeated.

【0099】図6を用いて説明した処理により、図3を
用いて説明したビット補給レート制御処理2にも、同様
にして、エンコード途中でsupplementを見直す機構を導
入することができるので、例えば、エンコード中の複数
画像の難易度傾向がゆっくりと変化していくような場合
において、画質に悪影響を与えてしまうようなことを未
然に防ぐことができる。
By the processing described with reference to FIG. 6, it is possible to similarly introduce a mechanism for reconsidering the supplement during the encoding into the bit supply rate control processing 2 described with reference to FIG. It is possible to prevent the image quality from being adversely affected when the difficulty tendency of a plurality of images being encoded changes slowly.

【0100】上述した一連の処理は、ハードウエアによ
り実行させることもできるが、ソフトウエアにより実行
させることもできる。この場合、例えば、エンコーダ1
は、図7に示されるようなパーソナルコンピュータ10
1により構成される。
The series of processes described above can be executed by hardware, but can also be executed by software. In this case, for example, the encoder 1
Is a personal computer 10 as shown in FIG.
It is composed of 1.

【0101】図7において、CPU111は、ROM112に
記憶されているプログラム、または記憶部118からRA
M113にロードされたプログラムに従って、各種の処
理を実行する。RAM113にはまた、CPU111が各種の
処理を実行する上において必要なデータなども適宜記憶
される。
In FIG. 7, the CPU 111 uses the program stored in the ROM 112 or RA from the storage unit 118.
Various processes are executed according to the program loaded in M113. The RAM 113 also appropriately stores data necessary for the CPU 111 to execute various processes.

【0102】CPU111、ROM112、およびRAM113
は、バス114を介して相互に接続されている。このバ
ス114にはまた、入出力インタフェース115も接続
されている。
CPU 111, ROM 112, and RAM 113
Are mutually connected via a bus 114. An input / output interface 115 is also connected to the bus 114.

【0103】入出力インタフェース115には、キーボ
ード、マウスなどよりなる入力部116、ディスプレイ
やスピーカなどよりなる出力部117、ハードディスク
などより構成される記憶部118、モデム、ターミナル
アダプタなどより構成される通信部119が接続されて
いる。通信部119は、インターネットを含むネットワ
ークを介しての通信処理を行う。
The input / output interface 115 includes an input unit 116 including a keyboard and a mouse, an output unit 117 including a display and a speaker, a storage unit 118 including a hard disk, a communication including a modem and a terminal adapter. The section 119 is connected. The communication unit 119 performs communication processing via a network including the Internet.

【0104】入出力インタフェース115にはまた、必
要に応じてドライブ120が接続され、磁気ディスク1
31、光ディスク132、光磁気ディスク133、ある
いは、半導体メモリ134などが適宜装着され、それら
から読み出されたコンピュータプログラムが、必要に応
じて記憶部118にインストールされる。
A drive 120 is also connected to the input / output interface 115 if necessary, and the magnetic disk 1
31, the optical disk 132, the magneto-optical disk 133, the semiconductor memory 134, or the like is appropriately mounted, and the computer program read from them is installed in the storage unit 118 as necessary.

【0105】一連の処理をソフトウエアにより実行させ
る場合には、そのソフトウエアを構成するプログラム
が、専用のハードウエアに組み込まれているコンピュー
タ、または、各種のプログラムをインストールすること
で、各種の機能を実行することが可能な、例えば汎用の
パーソナルコンピュータなどに、ネットワークや記録媒
体からインストールされる。
When a series of processes is executed by software, a program that constitutes the software is installed in a computer in which dedicated hardware is installed, or various programs are installed to perform various functions. Is installed from a network or a recording medium into a general-purpose personal computer or the like capable of executing.

【0106】この記録媒体は、図7に示されるように、
装置本体とは別に、ユーザにプログラムを供給するため
に配布される、プログラムが記憶されている磁気ディス
ク131(フロッピディスクを含む)、光ディスク13
2(CD-ROM(Compact Disk-Read Only Memory),
DVD(Digital Versatile Disk)を含む)、光磁気デ
ィスク133(MD(Mini-Disk)(商標)を含む)、
もしくは半導体メモリ134などよりなるパッケージメ
ディアにより構成されるだけでなく、装置本体に予め組
み込まれた状態でユーザに供給される、プログラムが記
憶されているROM112や、記憶部118に含まれるハ
ードディスクなどで構成される。
This recording medium, as shown in FIG.
A magnetic disk 131 (including a floppy disk) in which a program is stored, which is distributed in order to supply the program to a user separately from the apparatus body, and an optical disk 13.
2 (CD-ROM (Compact Disk-Read Only Memory),
DVD (including Digital Versatile Disk), magneto-optical disk 133 (including MD (Mini-Disk) (trademark),
Alternatively, in addition to being configured by a package medium including a semiconductor memory 134, a ROM 112 in which a program is stored and a hard disk included in a storage unit 118, which is supplied to a user in a state of being incorporated in the apparatus body in advance, is used. Composed.

【0107】なお、本明細書において、記録媒体に記憶
されるプログラムを記述するステップは、含む順序に沿
って時系列的に行われる処理はもちろん、必ずしも時系
列的に処理されなくとも、並列的あるいは個別に実行さ
れる処理をも含むものである。
In the present specification, the steps for writing the program stored in the recording medium are not limited to the processing performed in time series in the order of inclusion, but may be performed in parallel even if they are not necessarily performed in time series. Alternatively, it also includes processes that are individually executed.

【0108】[0108]

【発明の効果】本発明によれば、画像データをエンコー
ドすることができる。また、本発明によれば、エンコー
ドを終了した過去の画像における難易度を基に使用可能
ビット量Rに加えるsupplementを決定することができる
ので、フィードバック型レート制御にビット補給レート
制御を適用することができる。
According to the present invention, image data can be encoded. Further, according to the present invention, it is possible to determine the supplement to be added to the usable bit amount R based on the degree of difficulty in the past image that has been encoded. Therefore, it is possible to apply the bit replenishment rate control to the feedback rate control. You can

【0109】また、シーンチェンジが起きたGOPをエ
ンコードする際には、シーンチェンジ前後の同一のピク
チャタイプの画像難易度の比較により、使用可能ビット
量Rに加えるsupplementを決定するようにしたので、こ
れにより難しい画像のGOPに少ないビット量を割り当
てるようなことがなくなり、画質を向上させることが可
能となる。更に、一度決定したR+supplementをエンコ
ード途中で見直すことができるようにしたので、エンコ
ード中の複数画像の難易度傾向がゆっくりと変化してい
くような場合において、画質に悪影響を与えてしまうの
を防ぐことができる。
Further, when encoding a GOP in which a scene change has occurred, the supplement added to the usable bit amount R is determined by comparing the image difficulty levels of the same picture type before and after the scene change. As a result, it is possible to improve the image quality without assigning a small bit amount to the GOP of a difficult image. Furthermore, since R + supplement once determined can be reviewed during encoding, it prevents the image quality from being adversely affected when the difficulty tendency of multiple images during encoding changes slowly. be able to.

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

【図1】本発明を適用したエンコーダの構成を示すブロ
ック図である。
FIG. 1 is a block diagram showing a configuration of an encoder to which the present invention has been applied.

【図2】ビット補給レート制御処理1について説明する
フローチャートである。
FIG. 2 is a flowchart illustrating a bit replenishment rate control process 1.

【図3】ビット補給レート制御処理2について説明する
フローチャートである。
FIG. 3 is a flowchart illustrating a bit replenishment rate control process 2.

【図4】ビット補給レート制御処理3について説明する
フローチャートである。
FIG. 4 is a flowchart illustrating a bit supply rate control process 3;

【図5】ビット見直し処理について説明するフローチャ
ートである。
FIG. 5 is a flowchart illustrating a bit review process.

【図6】ビット補給レート制御処理4について説明する
フローチャートである。
FIG. 6 is a flowchart illustrating a bit replenishment rate control process 4.

【図7】パーソナルコンピュータの構成について説明す
る図である。
FIG. 7 is a diagram illustrating a configuration of a personal computer.

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

1 エンコーダ, 12 画像並び替え部, 13 走
査変換・マクロブロック化部, 14 イントラAC算
出部, 15 レートコントロール部, 16演算処理
部, 17 動き検出部, 18 DCT部, 19
量子化部,20 VLC部, 21 バッファ, 22
逆量子化部, 23 逆DCT部, 24 演算処理
部, 25 動き補償部, 31 ME残差算出部,
32難易度算出部, 33 genbit検出部, 34 タ
ーゲットビット決定部,35 量子化インデックス決定
1 encoder, 12 image rearranging unit, 13 scanning conversion / macroblocking unit, 14 intra AC calculation unit, 15 rate control unit, 16 arithmetic processing unit, 17 motion detection unit, 18 DCT unit, 19
Quantization unit, 20 VLC unit, 21 buffer, 22
Inverse quantization section, 23 inverse DCT section, 24 arithmetic processing section, 25 motion compensation section, 31 ME residual calculation section,
32 difficulty calculation part, 33 genbit detection part, 34 target bit determination part, 35 quantization index determination part

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5C059 KK35 MA00 MA05 MA14 MA23 MC11 MC38 ME01 NN01 PP05 PP06 PP07 PP11 SS20 TA46 TA60 TB03 TB04 TC02 TC03 TC10 TC14 TC15 TC27 TC41 TC42 TD02 TD03 TD04 TD06 TD12 TD16 UA02 UA32    ─────────────────────────────────────────────────── ─── Continued front page    F term (reference) 5C059 KK35 MA00 MA05 MA14 MA23                       MC11 MC38 ME01 NN01 PP05                       PP06 PP07 PP11 SS20 TA46                       TA60 TB03 TB04 TC02 TC03                       TC10 TC14 TC15 TC27 TC41                       TC42 TD02 TD03 TD04 TD06                       TD12 TD16 UA02 UA32

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 非圧縮データの符号化を行う符号化装置
において、 前記非圧縮データの複雑さを検出する第1の検出手段
と、 前記非圧縮データを圧縮符号化する符号化手段と、 前記第1の検出手段により検出された、前記符号化手段
により過去に符号化された前記非圧縮データの複雑さを
基に、これから符号化される前記非圧縮データに対して
割り当てられるVBVバッファのバッファ容量のうち、
使用可能である第1のビット量に加えられる第2のビッ
ト量を算出する第1の算出手段と、 前記第1の算出手段により算出された前記第2のビット
量を、前記第1のビット量に加えた値を基に、ターゲッ
トビットを算出する第2の算出手段と、 前記第2の算出手段により算出された前記ターゲットビ
ットを基に、前記符号化手段による符号化の量子化イン
デックスを決定する決定手段とを備えることを特徴とす
る符号化装置。
1. An encoding device for encoding uncompressed data, comprising: first detecting means for detecting complexity of the uncompressed data; encoding means for compressing and encoding the uncompressed data; A buffer of a VBV buffer allocated to the uncompressed data that is to be encoded, based on the complexity of the uncompressed data that was previously encoded by the encoding unit and that was detected by the first detecting unit. Out of capacity
First calculating means for calculating a second bit amount added to the usable first bit amount; and the second bit amount calculated by the first calculating means for the first bit Second calculating means for calculating a target bit based on the value added to the quantity, and a quantization index for encoding by the encoding means based on the target bit calculated by the second calculating means. An encoding device comprising: determining means for determining.
【請求項2】 前記第1の算出手段により算出された前
記第2のビット量の合計を算出する第3の算出手段を更
に備え、 前記第1の算出手段は、前記第3の算出手段により算出
される前記第2のビット量の合計が、所定の基準値より
大きくならないような、前記第2のビット量を算出する
ことを特徴とする請求項1に記載の符号化装置。
2. A third calculating means for calculating the sum of the second bit amounts calculated by the first calculating means, wherein the first calculating means is provided by the third calculating means. The encoding device according to claim 1, wherein the second bit amount is calculated such that the sum of the calculated second bit amounts does not become larger than a predetermined reference value.
【請求項3】 前記第1の検出手段は、前記非圧縮デー
タの複雑さを示す指標を算出して前記非圧縮データの複
雑さを検出し、 前記第1の算出手段は、第1の閾値と前記指標の大きさ
を比較し、前記指標の方が大きい場合、正の値の前記第
2のビット量を算出し、前記第1の閾値よりも小さな第
2の閾値と前記指標とを比較し、前記指標の方が小さい
場合、負の値の前記第2のビット量を算出し、前記指標
が、前記第1の閾値と前記第2の閾値との間の数値であ
る場合、前記第2のビット量を0とすることを特徴とす
る請求項1に記載の符号化装置。
3. The first detecting means detects the complexity of the uncompressed data by calculating an index indicating the complexity of the uncompressed data, and the first calculating means comprises a first threshold value. And the size of the index are compared, and when the index is larger, the second bit amount having a positive value is calculated, and the second threshold smaller than the first threshold is compared with the index. If the index is smaller, the second bit amount having a negative value is calculated, and if the index is a numerical value between the first threshold and the second threshold, the second bit amount is calculated. The encoding device according to claim 1, wherein the bit amount of 2 is set to 0.
【請求項4】 前記非圧縮データは、複数のGOPによ
り構成され、 前記第1の検出手段が算出する前記指標は、前記符号化
手段により過去に符号化された1GOPの平均の難易度
を示す指標であることを特徴とする請求項3に記載の符
号化装置。
4. The uncompressed data is composed of a plurality of GOPs, and the index calculated by the first detecting means indicates an average difficulty level of 1GOP encoded in the past by the encoding means. The encoding device according to claim 3, wherein the encoding device is an index.
【請求項5】 シーンチェンジの発生を検出する第2の
検出手段と、 前記シーンチェンジの前後の、同一のピクチャタイプの
画像難易度を検出する第3の検出手段とを更に備え、 前記第1の算出手段は、前記第2の検出手段により前記
シーンチェンジが検出されなかった場合、前記第1の検
出手段により検出された、前記符号化手段により過去に
符号化された前記非圧縮データの複雑さを基に、前記第
2のビット量を算出し、前記第2の検出手段により前記
シーンチェンジが検出された場合、前記第3の検出手段
による検出結果を基に、前記第2のビット量を算出する
ことを特徴とする請求項1に記載の符号化装置。
5. A second detection means for detecting the occurrence of a scene change, and a third detection means for detecting the image difficulty level of the same picture type before and after the scene change, the first detection means. When the scene change is not detected by the second detecting means, the calculating means of the complex of the uncompressed data previously encoded by the encoding means, detected by the first detecting means. Based on this, the second bit amount is calculated, and when the scene change is detected by the second detecting means, the second bit amount is calculated based on the detection result by the third detecting means. The encoding device according to claim 1, wherein
【請求項6】 前記第1の算出手段は、前記第2の検出
手段により前記シーンチェンジが検出され、かつ、前記
シーンチェンジの前より前記シーンチェンジの後のほう
が画像難易度が高い場合、正の値の前記第2のビット量
を算出し、それ以外のとき、前記第2のビット量を0と
することを特徴とする請求項5に記載の符号化装置。
6. The first calculating means is positive if the scene change is detected by the second detecting means and the image difficulty level is higher after the scene change than before the scene change. 6. The encoding apparatus according to claim 5, wherein the second bit amount of the value is calculated, and the second bit amount is set to 0 in other cases.
【請求項7】 前記非圧縮データは、複数のGOPによ
り構成され、 前記第1の算出手段は、前記GOPの符号化処理のうち
の所定のタイミングで前記第2のビット量を算出し、 前記第2の算出手段は、前記第1の算出手段により算出
された一番新しい前記第2のビット量が負の値であり、
かつ、前記GOP内で画像難易度が所定の値以上変化し
た場合、前記第1の算出手段により算出された一番新し
い前記負の値の第2のビット量を0として、ターゲット
ビットを算出することを特徴とする請求項1に記載の符
号化装置。
7. The uncompressed data is composed of a plurality of GOPs, and the first calculating means calculates the second bit amount at a predetermined timing in the encoding process of the GOPs, The second calculation means is such that the newest second bit amount calculated by the first calculation means is a negative value,
Further, when the image difficulty level changes in the GOP by a predetermined value or more, the target bit is calculated by setting the second bit amount of the latest negative value calculated by the first calculating unit to 0. The encoding device according to claim 1, wherein
【請求項8】 非圧縮データの符号化を行う符号化装置
の符号化方法において、 前記非圧縮データの複雑さを検出する検出ステップと、 前記非圧縮データを圧縮符号化する符号化ステップと、 前記検出ステップの処理により検出された、前記符号化
ステップの処理により過去に符号化された前記非圧縮デ
ータの複雑さを基に、これから符号化される前記非圧縮
データに対して割り当てられる前記VBVバッファのう
ち、使用可能である第1のビット量に加えられる第2の
ビット量を算出する第1の算出ステップと、 前記第1の算出ステップの処理により算出された前記第
2のビット量を、前記第1のビット量に加えた値を基
に、ターゲットビットを算出する第2の算出ステップ
と、 前記第2の算出ステップの処理により算出された前記タ
ーゲットビットを基に、前記符号化ステップの処理によ
る符号化の量子化インデックスを決定する決定ステップ
とを含むことを特徴とする符号化方法。
8. A coding method of a coding device for coding uncompressed data, comprising a detecting step of detecting complexity of the uncompressed data, and an encoding step of compressing and coding the uncompressed data. The VBV assigned to the uncompressed data to be encoded based on the complexity of the uncompressed data previously encoded by the encoding step, detected by the detecting step. A first calculation step of calculating a second bit amount to be added to the usable first bit amount of the buffer, and the second bit amount calculated by the process of the first calculation step. , A second calculation step of calculating a target bit based on a value added to the first bit amount, and the target calculated by the processing of the second calculation step. Ttobitto based on the encoding method characterized by including a determination step of determining a quantization index encoding in the process at the encoding step.
【請求項9】 非圧縮データの符号化を行う符号化装置
用のプログラムであって、 前記非圧縮データの複雑さを検出する検出ステップと、 前記非圧縮データを圧縮符号化する符号化ステップと、 前記検出ステップの処理により検出された、前記符号化
ステップの処理により過去に符号化された前記非圧縮デ
ータの複雑さを基に、これから符号化される前記非圧縮
データに対して割り当てられる前記VBVバッファのう
ち、使用可能である第1のビット量に加えられる第2の
ビット量を算出する第1の算出ステップと、 前記第1の算出ステップの処理により算出された前記第
2のビット量を、前記第1のビット量に加えた値を基
に、ターゲットビットを算出する第2の算出ステップ
と、 前記第2の算出ステップの処理により算出された前記タ
ーゲットビットを基に、前記符号化ステップの処理によ
る符号化の量子化インデックスを決定する決定ステップ
とを含むことを特徴とするコンピュータが読み取り可能
なプログラムが記録されている記録媒体。
9. A program for an encoding device that encodes uncompressed data, the detecting step of detecting complexity of the uncompressed data, and the encoding step of compressing and encoding the uncompressed data. Based on the complexity of the uncompressed data previously encoded by the process of the encoding step, detected by the process of the detecting step, and assigned to the uncompressed data to be encoded from now on. A first calculation step of calculating a second bit amount to be added to the usable first bit amount of the VBV buffer, and the second bit amount calculated by the processing of the first calculation step. Based on a value added to the first bit amount, a second calculation step of calculating a target bit, and the target calculated by the processing of the second calculation step. Based on target bit, a recording medium from which a computer readable program is recorded, characterized in that it comprises a determining step of determining a quantization index encoding in the process at the encoding step.
【請求項10】 非圧縮データの符号化を行う符号化装
置を制御するコンピュータが実行可能なプログラムであ
って、 前記非圧縮データの複雑さを検出する検出ステップと、 前記非圧縮データを圧縮符号化する符号化ステップと、 前記検出ステップの処理により検出された、前記符号化
ステップの処理により過去に符号化された前記非圧縮デ
ータの複雑さを基に、これから符号化される前記非圧縮
データに対して割り当てられる前記VBVバッファのう
ち、使用可能である第1のビット量に加えられる第2の
ビット量を算出する第1の算出ステップと、 前記第1の算出ステップの処理により算出された前記第
2のビット量を、前記第1のビット量に加えた値を基
に、ターゲットビットを算出する第2の算出ステップ
と、 前記第2の算出ステップの処理により算出された前記タ
ーゲットビットを基に、前記符号化ステップの処理によ
る符号化の量子化インデックスを決定する決定ステップ
とを含むことを特徴とするプログラム。
10. A program executable by a computer that controls an encoding device that encodes uncompressed data, the detecting step of detecting the complexity of the uncompressed data, and the compression code of the uncompressed data. An encoding step to be encoded, and the uncompressed data to be encoded from now on the basis of the complexity of the uncompressed data previously encoded by the processing of the encoding step, which is detected by the processing of the detecting step. Of the VBV buffers allocated to the first bit amount that is added to the usable first bit amount; A second calculation step of calculating a target bit based on a value obtained by adding the second bit amount to the first bit amount; and the second calculation step. Based on the target bit calculated by the processing of flops, program characterized by comprising a determination step of determining a quantization index encoding in the process at the encoding step.
JP2002104314A 2002-04-05 2002-04-05 Encoding apparatus, encoding method, program, and recording medium Expired - Fee Related JP4273385B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002104314A JP4273385B2 (en) 2002-04-05 2002-04-05 Encoding apparatus, encoding method, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002104314A JP4273385B2 (en) 2002-04-05 2002-04-05 Encoding apparatus, encoding method, program, and recording medium

Publications (2)

Publication Number Publication Date
JP2003299080A true JP2003299080A (en) 2003-10-17
JP4273385B2 JP4273385B2 (en) 2009-06-03

Family

ID=29389638

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002104314A Expired - Fee Related JP4273385B2 (en) 2002-04-05 2002-04-05 Encoding apparatus, encoding method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP4273385B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021520160A (en) * 2018-10-31 2021-08-12 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Video coding methods, equipment, computer programs and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021520160A (en) * 2018-10-31 2021-08-12 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Video coding methods, equipment, computer programs and computer equipment
JP7123470B2 (en) 2018-10-31 2022-08-23 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Video encoding method, apparatus, computer program and computer equipment

Also Published As

Publication number Publication date
JP4273385B2 (en) 2009-06-03

Similar Documents

Publication Publication Date Title
US6654417B1 (en) One-pass variable bit rate moving pictures encoding
JP4256574B2 (en) Image signal encoding method and image signal encoding apparatus
KR100756596B1 (en) Video data encoder and video data encoding method
JP4221655B2 (en) Encoding apparatus, encoding method, program, and recording medium
JP2004511976A (en) Video bit rate control method and apparatus for digital video recording
US20120002724A1 (en) Encoding device and method and multimedia apparatus including the encoding device
KR20040076034A (en) Method and apparatus for encoding video signal with variable bit rate
JP2000197049A (en) Dynamic image variable bit rate encoding device and method therefor
JP2006295535A (en) Dynamic image coding apparatus, and method
US8081679B2 (en) Image processing apparatus
JP2004166128A (en) Method, device and program for coding image information
JP4179917B2 (en) Video encoding apparatus and method
JP2001028753A (en) Dynamic image coder and its method
JP2004040811A (en) Method and apparatus for controlling amount of dct computation performed to encode motion image
JP4586340B2 (en) Encoding apparatus, encoding method, and program
JP4273385B2 (en) Encoding apparatus, encoding method, program, and recording medium
JP2005045736A (en) Method and device for encoding image signal, encoding controller, and program
JP3889552B2 (en) Code amount allocation apparatus and method
JP4273386B2 (en) Encoding apparatus, encoding method, program, and recording medium
JP3149673B2 (en) Video encoding device, video encoding method, video reproducing device, and optical disc
JP3918208B2 (en) Video data compression apparatus and method
JP4239734B2 (en) Encoding apparatus, encoding method, and program
JP2004072143A (en) Encoder and encoding method, program, and recording medium
JP2007053788A (en) Video data compression apparatus and method thereof
US7327892B2 (en) JPEG2000 encoder

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050307

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070320

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070720

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070918

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080902

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081027

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081118

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090114

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090205

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090218

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

Free format text: PAYMENT UNTIL: 20120313

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees