JP2007053788A - Video data compression apparatus and method thereof - Google Patents

Video data compression apparatus and method thereof Download PDF

Info

Publication number
JP2007053788A
JP2007053788A JP2006270958A JP2006270958A JP2007053788A JP 2007053788 A JP2007053788 A JP 2007053788A JP 2006270958 A JP2006270958 A JP 2006270958A JP 2006270958 A JP2006270958 A JP 2006270958A JP 2007053788 A JP2007053788 A JP 2007053788A
Authority
JP
Japan
Prior art keywords
data
video data
picture
amount
compression
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006270958A
Other languages
Japanese (ja)
Inventor
Kanji Mihara
寛司 三原
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 JP2006270958A priority Critical patent/JP2007053788A/en
Publication of JP2007053788A publication Critical patent/JP2007053788A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a video data compression apparatus and a method thereof for adjusting a produced bit amount in response to the complicatedness of a pattern of each part of video data, so as to improve the quality of the video image after compression as a whole. <P>SOLUTION: A real difficulty data calculation circuit 282 calculates real difficulty data Dj corresponding to a data amount after the compression on the basis of index data (ME residual, flatness, intra AC, and activity) indicating the complicatedness of a pattern of a video image. A parameter calculation circuit 286 adjusts a parameter Rj' in response to an occupancy factor or the like of a VBV buffer. A target data amount calculation circuit 284 multiplies a multiplier calculated on the basis of the real difficulty data Dj with the parameter Rj' adjusted by the parameter calculation circuit 286 to calculate a target data amount Tj indicating a target value of the data amount of the video image after the compression. Rate control is achieved by calculating a quantization index QIND from the target data amount Tj and using it for compression coding processing. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、非圧縮映像データを圧縮符号化する映像データ圧縮装置およびその方法に関する。   The present invention relates to a video data compression apparatus and method for compressing and encoding uncompressed video data.

非圧縮のディジタル映像データをMPEG(moving picture experts group)等の方法により、Iピクチャー(intra coded picture) 、Bピクチャー(bi-directionally predictive coded picture)およびPピクチャー(predictive coded picture)から構成されるGOP(group of pictures) 単位に圧縮符号化して光磁気ディスク(MOディスク;magneto-optical disc)等の記録媒体に記録する際には、圧縮符号化後の圧縮映像データのデータ量(ビット量)を、伸長復号後の映像の品質を高く保ちつつ記録媒体の記録容量以下、あるいは、通信回線の伝送容量以下にする必要がある。   GOP composed of I picture (intra coded picture), B picture (bi-directionally predictive coded picture) and P picture (predictive coded picture) by uncompressed digital video data by a method such as MPEG (moving picture experts group) When recording on a recording medium such as a magneto-optical disc (MO disc) by compressing and encoding in units of groups, the amount of compressed video data (bit amount) after compression encoding is set. It is necessary to keep the recording quality of the recording medium or less than the transmission capacity of the communication line while keeping the quality of the video after decompression decoding high.

このために、まず、非圧縮映像データを予備的に圧縮符号化して圧縮符号化後のデータ量を見積もり(1パス目)、次に、見積もったデータ量に基づいて圧縮率を調節し、圧縮符号化後のデータ量が記録媒体の記録容量以下になるように圧縮符号化する(2パス目)方法が採られる(以下、このような圧縮符号化方法を「2パスエンコード」とも記す)。   For this purpose, first, uncompressed video data is preliminarily compressed and encoded, and the amount of data after compression encoding is estimated (first pass). Next, the compression rate is adjusted based on the estimated amount of data and compressed. A compression encoding method (second pass) is adopted so that the amount of data after encoding is equal to or less than the recording capacity of the recording medium (hereinafter, such compression encoding method is also referred to as “two-pass encoding”).

しかしながら、2パスエンコードにより圧縮符号化を行うと、同じ非圧縮映像データに対して同様な圧縮符号化処理を2回施す必要があり、時間がかかってしまう。また、1回の圧縮符号化処理で最終的な圧縮映像データを算出することができないために、撮影した映像データをそのまま実時間的(リアルタイム)に圧縮符号化し、記録することができない。   However, if compression encoding is performed by two-pass encoding, it is necessary to perform similar compression encoding processing twice on the same uncompressed video data, which takes time. In addition, since the final compressed video data cannot be calculated by a single compression encoding process, the captured video data cannot be directly compressed and recorded in real time (real time).

本発明は上述した従来技術の問題点に鑑みてなされたものであり、2パスエンコードによらずに、所定のデータ量以下に音声・映像データを圧縮符号化することができる映像データ圧縮装置およびその方法を提供することを目的とする。
また、本発明は、ほぼ実時間的に映像データを圧縮符号化することができ、しかも、伸長復号後に高品質な映像を得ることができる映像データ圧縮装置およびその方法を提供することを目的とする。
また、本発明は、2パスエンコードによらずに、圧縮符号化後のデータ量を見積もって圧縮率を調節し、圧縮符号化処理を行うことができる映像データ圧縮装置およびその方法を提供することを目的とする。
The present invention has been made in view of the above-described problems of the prior art, and a video data compression apparatus capable of compressing and encoding audio / video data below a predetermined amount of data without using two-pass encoding, and An object is to provide such a method.
Another object of the present invention is to provide a video data compression apparatus and method capable of compressing and encoding video data substantially in real time and obtaining a high-quality video after decompression decoding. To do.
The present invention also provides a video data compression apparatus and method capable of performing compression coding processing by estimating the amount of data after compression coding and adjusting the compression rate without using two-pass encoding. With the goal.

上記目的を達成するために、本発明に係る映像データ圧縮装置は、動画の非圧縮映像データを、圧縮後の映像データ(圧縮映像データ)をバッファリングするVBVバッファに基づいて定まる条件を満たすデータレートに圧縮する映像データ圧縮装置であって、前記非圧縮映像データの映像の複雑さを示す難度データを算出する難度データ算出手段と、前記VBVバッファにバッファリングされている前記圧縮映像データのデータ量(占有データ量)、および、算出した前記難度データに基づいて、所定数の非圧縮映像データのピクチャーに圧縮後のデータ量(割当データ量)を割り当てるデータ量割当手段と、算出した前記難度データおよび前記割当データ量に基づいて、前記非圧縮映像データの圧縮後のデータ量の目標値をピクチャーごとに算出する目標値算出手段と、前記非圧縮映像データを所定の圧縮方法により、圧縮後のデータ量が算出した前記目標値になるように圧縮する圧縮手段とを有する。   In order to achieve the above object, a video data compression apparatus according to the present invention is a data that satisfies a condition that is determined based on a VBV buffer that buffers uncompressed video data of a moving image and video data after compression (compressed video data) A video data compression apparatus for compressing to a rate, difficulty level data calculating means for calculating difficulty level data indicating the complexity of the video of the uncompressed video data, and data of the compressed video data buffered in the VBV buffer A data amount allocating means for allocating a compressed data amount (allocated data amount) to a predetermined number of pictures of uncompressed video data based on the amount (occupied data amount) and the calculated difficulty data, and the calculated difficulty level Based on the data and the allocated data volume, the target value of the compressed data volume of the uncompressed video data Has a target value calculating means for calculating, said by the method prescribed compression uncompressed video data, and compression means the amount of compressed data is compressed so that the target value calculated in.

好適には、前記難度データ算出手段は、前記難度データとして、前記非圧縮映像データの圧縮後のデータ量を算出する。   Preferably, the difficulty level data calculating means calculates a data amount after compression of the uncompressed video data as the difficulty level data.

好適には、前記データ量割当手段は、前記VBVバッファの占有データ量が所定の閾値以上である場合に、算出した前記難度データに基づいて、前記非圧縮映像データの映像が複雑であればあるほど前記割当データ量の値を大さくし、前記目標値算出手段は、前記非圧縮映像データの映像が複雑であればあるほど前記目標値の値を大きくし、前記非圧縮映像データの映像が簡単であればあるほど前記目標値の値を小さくする。   Preferably, the data amount allocating means is configured such that the video of the uncompressed video data is complex based on the calculated difficulty data when the occupied data amount of the VBV buffer is equal to or greater than a predetermined threshold. The value of the allocated data amount is increased, and the target value calculation unit increases the target value as the video of the uncompressed video data is more complex, and the video of the uncompressed video data is simpler. The more the value is, the smaller the target value is.

好適には、前記データ量割当手段は、前記圧縮映像データに与えられる全てのデータ量を全てのピクチャーに均等に配分した基準値を、生成した前記圧縮映像データのピクチャーのデータ量から減算して差分値を算出し、前記非圧縮映像データの圧縮が終了した場合に、算出した差分値の総和が負値の0に近い値になるように前記割当データ量を算出する。   Preferably, the data amount allocating unit subtracts a reference value obtained by evenly distributing all the data amount given to the compressed video data to all the pictures from the data amount of the generated compressed video data picture. A difference value is calculated, and when the compression of the uncompressed video data is completed, the allocated data amount is calculated so that the sum of the calculated difference values becomes a value close to a negative value of zero.

好適には、前記目標量算出手段は、最新のピクチャーの難度データを所定数のピクチャーの難度データの総和を除算した値に、算出した前記割当データ量を乗算して前記目標値を算出する。   Preferably, the target amount calculating means calculates the target value by multiplying the calculated amount of assigned data by a value obtained by dividing the difficulty data of the latest picture by the sum of the difficulty data of a predetermined number of pictures.

好適には、前記圧縮手段は、前記非圧縮映像データを、複数の種類のピクチャー(Iピクチャー、PピクチャーおよびBピクチャーまたはこれらの組み合わせ)を所定の順番で含むピクチャータイプシーケンスに圧縮する。   Preferably, the compression means compresses the uncompressed video data into a picture type sequence including a plurality of types of pictures (I picture, P picture and B picture or a combination thereof) in a predetermined order.

好適には、前記難度データ算出手段は、前記難度データとして、PピクチャーまたはBピクチャーに圧縮されるピクチャーのME残差、および、Iピクチャーに圧縮されるピクチャーのフラットネス、イントラACデータおよびアクティビティまたはこれらの組み合わせを算出する。   Preferably, the difficulty level data calculating means includes, as the difficulty level data, an ME residual of a picture compressed into a P picture or a B picture, and a flatness, intra AC data and activity of a picture compressed into an I picture, or These combinations are calculated.

好適には、前記データ量割当手段は、前記VBVバッファの占有データ量の前記所定の閾値として、最新のIピクチャーのデータ量に、生成した前記圧縮映像データのデータレートに応じた加算値、または、固定の加算値を加算した数値を用いる。   Preferably, the data amount allocating unit adds, as the predetermined threshold value of the occupied data amount of the VBV buffer, an addition value corresponding to the data rate of the generated compressed video data to the latest I picture data amount, or A numerical value obtained by adding a fixed addition value is used.

好適には、前記データ量割当手段は、前記VBVバッファの占有データ量が所定の閾値以上であるか否かの判断を、前記圧縮手段が、前記非圧縮映像データをPピクチャーに圧縮した直後に行う。   Preferably, the data amount allocating means determines whether or not the occupied data amount of the VBV buffer is equal to or greater than a predetermined threshold immediately after the compression means compresses the uncompressed video data into a P picture. Do.

本発明に係る映像データ圧縮装置は、動画の非圧縮映像データを、例えば、MPEG方式により複数の種類のピクチャー(Iピクチャー、PピクチャーおよびBピクチャー)を所定の組み合わせおよび順番で含むピクチャータイプシーケンスに圧縮符号化し、圧縮符号化後の映像データ(圧縮映像データ)のデータ量を記録媒体等の記録容量以下に抑え、MPEGのVBV(video buffering verifier) バッファの占有量に対する拘束条件を満たし、しかも、伸長復号後の映像の品質が高い圧縮映像データを生成する。   The video data compression apparatus according to the present invention converts uncompressed video data of a moving image into a picture type sequence including a plurality of types of pictures (I picture, P picture, and B picture) in a predetermined combination and order by, for example, MPEG. Compression-encoded, the amount of video data after compression-encoding (compressed video data) is kept below the recording capacity of the recording medium, etc., and satisfies the constraint on the VBV (video buffering verifier) buffer occupancy, Generate compressed video data with high quality video after decompression decoding.

本発明に係る映像データ圧縮装置において、難度データ算出手段は、非圧縮映像データの映像の複雑さ(簡単さ)を示す難度データを生成する。難度データ算出手段が生成する難度データとしては、例えば、ME残差、非圧縮映像データを予備的に圧縮符号化した圧縮映像データのデータ量に対応する実難度データDj、あるいは、映像の平坦さを指標するために新たに定義したフラットネス(flatness)、イントラAC(intra-AC)、TM5においてマクロブロックの量子化値(MQUANT)を算出するために用いられるアクティビティ(activity)、および、グローバルコンプレクシティ(global complexity) が用いられる。   In the video data compression apparatus according to the present invention, the difficulty level data calculation means generates difficulty level data indicating the complexity (simpleness) of the video of the uncompressed video data. The difficulty data generated by the difficulty data calculation means includes, for example, ME residual, actual difficulty data Dj corresponding to the data amount of compressed video data obtained by pre-compressing non-compressed video data, or video flatness Newly defined flatness for indexing, flat AC, intra-AC, activity used to calculate the quantized value of macroblock (MQUANT) in TM5, and global compression Global complexity is used.

データ量割当手段は、圧縮映像データをバッファリングするVBVバッファにアンダーフローが生じないように、VBVバッファに所定の閾値以上、例えば、最新のIピクチャーのデータ量に所定のマージンを見込んだデータ量以上の圧縮映像データがバッファリングされている場合にのみ、非圧縮映像データの圧縮後のピクチャーに割り当て可能なデータ量を示す割当データ量の調節を行う。なお、VBVバッファにバッファリングされている圧縮映像データのデータ量の判断は、圧縮手段が、圧縮映像データのピクチャーを生成する度に行う必要はなく、VBVバッファ内のデータ量が、この判断にとって最適な値になる圧縮手段がPピクチャーを生成した直後に行うのが好適である。   The data amount allocating means is a data amount that allows a predetermined margin in the data amount of the latest I picture that is equal to or greater than a predetermined threshold in the VBV buffer so that an underflow does not occur in the VBV buffer that buffers the compressed video data. Only when the above compressed video data is buffered, the allocation data amount indicating the data amount that can be allocated to the compressed picture of the uncompressed video data is adjusted. Note that the determination of the data amount of the compressed video data buffered in the VBV buffer does not need to be performed every time the compression unit generates a picture of the compressed video data, and the data amount in the VBV buffer is used for this determination. It is preferable that the compression means that achieves the optimum value is performed immediately after the P picture is generated.

データ量割当手段による割当データ量の調節は、例えば、圧縮映像データに全体として許される最大のデータ量(最大データ量;例えば、記録媒体の記録容量)を、各ピクチャーに均等に割り当てた基準値を中心として行われ、VBVバッファの占有量が一定以上である場合(アンダーフローが生じないであろう場合)に、映像が複雑な所定数(L枚)のピクチャーには基準値よりも多くの割当データを割り当て、映像が簡単なピクチャーには基準値よりも少ない割当データを割り当て、最終的に、圧縮映像データのデータ量が最大データ量を超えず、しかも、圧縮映像データのデータ量がほぼ最大データ量となるようにする。   The adjustment of the allocated data amount by the data amount allocating means is, for example, a reference value in which the maximum data amount (maximum data amount; for example, recording capacity of the recording medium) allowed as a whole for the compressed video data is evenly allocated to each picture. If the VBV buffer occupancy is more than a certain value (when underflow will not occur), the predetermined number (L) of pictures with a complicated video will be more than the reference value. Allocation data is allocated and allocation data smaller than the reference value is allocated to pictures with simple video. Finally, the amount of compressed video data does not exceed the maximum data amount, and the amount of compressed video data is almost the same. Make the maximum amount of data.

なお、データ量割当手段による割当データ量の調節を行う際に、VBVバッファのアンダーフローに対する条件のみを設けるのではなく、当然に、圧縮映像データのデータレートは、VBVバッファにオーバーフローを生じさせないという条件を満たす必要がある。   It should be noted that when adjusting the amount of allocated data by the data amount allocating means, not only a condition for the underflow of the VBV buffer is provided, but naturally the data rate of the compressed video data does not cause an overflow in the VBV buffer. It is necessary to satisfy the conditions.

目標量算出手段は、例えば、最新のピクチャーの難度データを、L枚のピクチャーの難度データの総和値により除算した値に、データ量割当手段が算出した割当データを乗算して、非圧縮映像データのピクチャーそれぞれに対する圧縮後のデータ量の目標値を算出する。
このように、データ量割当手段および目標量算出手段により、最大データ量を有効に利用可能となり、多くのデータ量を必要とする複雑な映像のピクチャーから多いデータ量の圧縮映像データが生成され、少ないデータ量で済む簡単な映像のピクチャーから少ないデータ量の圧縮映像データが生成され、圧縮映像データの映像の品質が全体として向上する。
The target amount calculation means, for example, multiplies the assignment data calculated by the data amount assignment means by multiplying the value obtained by dividing the difficulty data of the latest picture by the total value of the difficulty data of the L pictures into the uncompressed video data. The target value of the data amount after compression for each of the pictures is calculated.
In this way, the maximum data amount can be effectively used by the data amount allocating unit and the target amount calculating unit, and compressed video data with a large amount of data is generated from a complex video picture that requires a large amount of data, A small amount of compressed video data is generated from a simple video picture that requires a small amount of data, and the quality of the compressed video data as a whole improves.

圧縮手段は、例えば、MPEG方式により、非圧縮映像データを、所定のピクチャータイプシーケンスで、圧縮符号化後のデータ量がほぼ、目標量算出手段が算出した目標値になるように圧縮符号化する。   The compression means compresses and encodes the non-compressed video data by, for example, the MPEG method so that the data amount after compression encoding is substantially the target value calculated by the target amount calculation means in a predetermined picture type sequence. .

また、本発明に係る映像データ圧縮方法は、動画の非圧縮映像データを、圧縮後の映像データ(圧縮映像データ)をバッファリングするVBVバッファに基づいて定まる条件を満たすデータレートに圧縮する映像データ圧縮方法であって、前記VBVバッファがアンダーフローを生じるまでのデータ量、および、前記非圧縮映像データのピクチャーの映像の複雑さに基づいて、所定数の前記非圧縮映像データのピクチャーに圧縮後のデータ量(割当データ量)を割り当て、前記非圧縮映像データのピクチャーの映像の複雑さ、および、算出した前記割当データ量に基づいて、前記非圧縮映像データの圧縮後のデータ量の目標値をピクチャーごとに算出し、前記非圧縮映像データを所定の圧縮方法により、圧縮後のデータ量が算出した前記目標値になるように圧縮する。   The video data compression method according to the present invention compresses uncompressed video data of a moving image to a data rate that satisfies a condition determined based on a VBV buffer that buffers the compressed video data (compressed video data). A compression method, after compressing a predetermined number of pictures of uncompressed video data based on the amount of data until the VBV buffer underflows and the complexity of the pictures of the pictures of the uncompressed video data A target amount of data after compression of the uncompressed video data based on the complexity of the picture of the picture of the uncompressed video data and the calculated allocated data amount Is calculated for each picture, and the uncompressed video data is calculated according to a predetermined compression method, and the amount of data after compression is calculated. To compress so as to.

本発明に係る映像データ圧縮装置およびその方法によれば、2パスエンコードによらずに、所定のデータ量以下に音声・映像データを圧縮符号化することができる。
また、本発明に係る映像データ圧縮装置およびその方法によれば、ほぼ実時間的に映像データを圧縮符号化することができ、しかも、伸長復号後に高品質な映像を得ることができる。
また、本発明に係る映像データ圧縮装置およびその方法によれば、2パスエンコードによらずに、圧縮符号化後のデータ量を見積もって圧縮率を調節し、圧縮符号化処理を行うことができる。
The video data compression apparatus and method according to the present invention can compress and encode audio / video data below a predetermined data amount without using two-pass encoding.
Also, according to the video data compression apparatus and method according to the present invention, video data can be compression-encoded substantially in real time, and high-quality video can be obtained after decompression decoding.
Further, according to the video data compression apparatus and method according to the present invention, it is possible to perform compression coding processing by adjusting the compression rate by estimating the data amount after compression coding without using two-pass encoding. .

第1実施形態
以下、本発明の第1の実施形態を説明する。
MPEG方式といった映像データの圧縮符号化方式により、高い周波数成分が多い絵柄、あるいは、動きが多い絵柄といった難度(difficulty)が高い映像データを圧縮符号化すると、一般的に圧縮に伴う歪みが生じやすくなる。このため、難度が高い映像データは低い圧縮率で圧縮符号化する必要があり、難度が高いデータを圧縮符号化して得られる圧縮映像データに対しては、難度が低い絵柄の映像データの圧縮映像データに比べて、多くの目標データ量を配分する必要がある。
First Embodiment Hereinafter, a first embodiment of the present invention will be described.
When compression coding of video data such as MPEG, images with many high frequency components or graphics with high difficulty, such as graphics with a lot of movement, are generally susceptible to distortion caused by compression. Become. For this reason, video data with a high degree of difficulty must be compression-encoded at a low compression rate. For compressed video data obtained by compression-encoding data with a high degree of difficulty, compressed video of video data with a low degree of difficulty is used. It is necessary to allocate a larger amount of target data than data.

このように、映像データの難度に対して適応的に目標データ量を配分するためには、従来技術として示した2パスエンコード方式が有効である。しかしながら、2パスエンコード方式は、実時間的な圧縮符号化に不向きである。
第1の実施形態として示す簡易2パスエンコード方式は、かかる2パスエンコード方式の問題点を解決するためになされたものであり、非圧縮映像データを予備的に圧縮符号化して得られる圧縮映像データの難度データから非圧縮映像データの難度を算出し、予備的な圧縮符号化により算出した難度に基づいて、FIFOメモリ等により所定の時間だけ遅延した非圧縮映像データの圧縮率を適応的に制御することができる。
Thus, in order to adaptively allocate the target data amount to the difficulty level of the video data, the two-pass encoding method shown as the prior art is effective. However, the two-pass encoding method is not suitable for real-time compression encoding.
The simple two-pass encoding method shown as the first embodiment is made to solve the problems of the two-pass encoding method, and is compressed video data obtained by preliminarily compressing and encoding uncompressed video data. The difficulty level of the uncompressed video data is calculated from the difficulty level data, and the compression rate of the uncompressed video data delayed by a predetermined time by the FIFO memory is adaptively controlled based on the difficulty level calculated by the preliminary compression encoding. can do.

図1は、本発明に係る映像データ圧縮装置1の構成を示す図である。
図1に示すように、映像データ圧縮装置1は、圧縮符号化部10およびホストコンピュータ20から構成され、圧縮符号化部10は、エンコーダ制御部12、動き検出器(motion estimator)14、簡易2パス処理部16、第2のエンコーダ(encoder) 18から構成され、簡易2パス処理部16は、FIFOメモリ160および第1のエンコーダ162から構成される。
映像データ圧縮装置1は、これらの構成部分により、編集装置およびビデオテープレコーダ装置等の外部機器(図示せず)から入力される非圧縮映像データVINに対して、上述した簡易2パスエンコードを実現する。
FIG. 1 is a diagram showing a configuration of a video data compression apparatus 1 according to the present invention.
As shown in FIG. 1, the video data compression apparatus 1 includes a compression encoding unit 10 and a host computer 20. The compression encoding unit 10 includes an encoder control unit 12, a motion estimator 14, a simple 2 The path processing unit 16 and the second encoder 18 are included, and the simple two-pass processing unit 16 includes a FIFO memory 160 and a first encoder 162.
With these components, the video data compression apparatus 1 realizes the above-described simple two-pass encoding for uncompressed video data VIN input from an external device (not shown) such as an editing device and a video tape recorder device. To do.

映像データ圧縮装置1において、ホストコンピュータ20は、映像データ圧縮装置1の各構成部分の動作を制御する。また、ホストコンピュータ20は、簡易2パス処理部16のエンコーダ162が非圧縮映像データVINを予備的に圧縮符号化して生成した圧縮映像データのデータ量、DCT処理後の映像データの直流成分(DC成分)の値および直流成分(AC成分)の電力値を制御信号C16を介して受け、受けたこれらの値に基づいて圧縮映像データの絵柄の難度を算出する。さらに、ホストコンピュータ20は、算出した難度に基づいて、エンコーダ18が生成する圧縮映像データの目標データ量Tj を制御信号C18を介してピクチャーごとに割り当て、エンコーダ18の量子化回路166(図3)に設定し、エンコーダ18の圧縮率をピクチャー単位に適応的に制御する。   In the video data compression apparatus 1, the host computer 20 controls the operation of each component of the video data compression apparatus 1. In addition, the host computer 20 determines the amount of compressed video data generated by pre-compressing the uncompressed video data VIN by the encoder 162 of the simple two-pass processing unit 16 and the direct current component (DC) of the video data after DCT processing. The component value and the DC component (AC component) power value are received via the control signal C16, and based on the received values, the degree of difficulty of the pattern of the compressed video data is calculated. Further, the host computer 20 assigns a target data amount Tj of the compressed video data generated by the encoder 18 for each picture based on the calculated difficulty level, and a quantization circuit 166 of the encoder 18 (FIG. 3). And the compression rate of the encoder 18 is adaptively controlled for each picture.

エンコーダ制御部12は、非圧縮映像データVINのピクチャーの有無をホストコンピュータ20に通知し、さらに、非圧縮映像データVINのピクチャーごとに圧縮符号化のための前処理を行う。つまり、エンコーダ制御部12は、入力された非圧縮映像データを符号化順に並べ替え、ピクチャー・フィールド変換を行い、非圧縮映像データVINが映画の映像データである場合に3:2プルダウン処理(映画の24フレーム/秒の映像データを、30フレーム/秒の映像データに変換し、冗長性を圧縮符号化前に取り除く処理)等を行い、映像データS12として簡易2パス処理部16のFIFOメモリ160およびエンコーダ162に対して出力する。
動き検出器14は、非圧縮映像データの動きベクトルの検出を行い、エンコーダ制御部12およびエンコーダ162,18に対して出力する。
The encoder control unit 12 notifies the host computer 20 of the presence or absence of a picture of the uncompressed video data VIN, and further performs preprocessing for compression encoding for each picture of the uncompressed video data VIN. That is, the encoder control unit 12 rearranges the input uncompressed video data in the order of encoding, performs picture field conversion, and performs 3: 2 pull-down processing (movie) when the uncompressed video data VIN is movie video data. The video data of 24 frames / second is converted into video data of 30 frames / second and the redundancy is removed before compression encoding), and the like, and the FIFO memory 160 of the simple two-pass processing unit 16 is used as the video data S12. And output to the encoder 162.
The motion detector 14 detects a motion vector of the uncompressed video data and outputs it to the encoder control unit 12 and the encoders 162 and 18.

簡易2パス処理部16において、FIFOメモリ160は、エンコーダ制御部12から入力された映像データS12を、例えば、非圧縮映像データVINが、L(Lは整数)ピクチャー入力される時間だけ遅延し、遅延映像データS16としてエンコーダ18に対して出力する。   In the simple 2-pass processing unit 16, the FIFO memory 160 delays the video data S12 input from the encoder control unit 12 by, for example, a time during which L (L is an integer) picture input of the uncompressed video data VIN, The delayed video data S16 is output to the encoder 18.

図2は、図1に示した簡易2パス処理部16のエンコーダ162の構成を示す図である。
エンコーダ162は、例えば、図2に示すように、加算回路164、DCT回路166、量子化回路(Q)168、可変長符号化回路(VLC)170、逆量子化回路(IQ)172、逆DCT(IDCT)回路174、加算回路176および動き補償回路178から構成される一般的な映像データ用圧縮符号化器であって、入力される映像データS12をMPEG方式等により圧縮符号化し、圧縮映像データのピクチャーごとのデータ量等をホストコンピュータ20に対して出力する。
FIG. 2 is a diagram illustrating a configuration of the encoder 162 of the simple two-pass processing unit 16 illustrated in FIG.
For example, as shown in FIG. 2, the encoder 162 includes an adder circuit 164, a DCT circuit 166, a quantization circuit (Q) 168, a variable length coding circuit (VLC) 170, an inverse quantization circuit (IQ) 172, and an inverse DCT. (IDCT) A general video data compression encoder composed of an (IDCT) circuit 174, an adder circuit 176, and a motion compensation circuit 178, wherein the input video data S12 is compressed and encoded by the MPEG method, etc. The amount of data for each picture is output to the host computer 20.

加算回路164は、加算回路176の出力データを映像データS12から減算し、DCT回路166に対して出力する。
DCT回路166は、加算回路164から入力される映像データを、例えば、16画素×16画素のマクロブロック単位に離散コサイン変換(DCT)処理し、時間領域のデータから周波数領域のデータに変換して量子化回路168に対して出力する。また、DCT回路166は、DCT後の映像データのDC成分の値およびAC成分の電力値をホストコンピュータ20に対して出力する。
The adder circuit 164 subtracts the output data of the adder circuit 176 from the video data S12 and outputs it to the DCT circuit 166.
The DCT circuit 166 performs discrete cosine transform (DCT) processing on the video data input from the adder circuit 164, for example, in units of macroblocks of 16 pixels × 16 pixels, and converts from time domain data to frequency domain data. It outputs to the quantization circuit 168. Further, the DCT circuit 166 outputs the DC component value and the AC component power value of the video data after DCT to the host computer 20.

量子化回路168は、DCT回路166から入力された周波数領域のデータを、固定の量子化値Qで量子化し、量子化データとして可変長符号化回路170および逆量子化回路172に対して出力する。
可変長符号化回路170は、量子化回路168から入力された量子化データを可変長符号化し、可変長符号化の結果として得られた圧縮映像データのデータ量を、制御信号C16を介してホストコンピュータ20に対して出力する。
逆量子化回路172は、可変長符号化回路168から入力された量子化データを逆量子化し、逆量子化データとして逆DCT回路174に対して出力する。
The quantization circuit 168 quantizes the frequency domain data input from the DCT circuit 166 with a fixed quantization value Q, and outputs the quantized data to the variable length encoding circuit 170 and the inverse quantization circuit 172. .
The variable-length coding circuit 170 performs variable-length coding on the quantized data input from the quantization circuit 168, and the amount of compressed video data obtained as a result of the variable-length coding is hosted via the control signal C16. Output to the computer 20.
The inverse quantization circuit 172 inversely quantizes the quantized data input from the variable length encoding circuit 168 and outputs the inverse quantized data to the inverse DCT circuit 174.

逆DCT回路174は、逆量子化回路172から入力される逆量子化データに対して逆DCT処理を行い、加算回路176に対して出力する。
加算回路176は、動き補償回路178の出力データおよび逆DCT回路174の出力データを加算し、加算回路164および動き補償回路178に対して出力する。
動き補償回路178は、加算回路176の出力データに対して、動き検出器14から入力される動きベクトルに基づいて動き補償処理を行い、加算回路176に対して出力する。
The inverse DCT circuit 174 performs inverse DCT processing on the inversely quantized data input from the inverse quantization circuit 172 and outputs the result to the adder circuit 176.
The adder circuit 176 adds the output data of the motion compensation circuit 178 and the output data of the inverse DCT circuit 174 and outputs the result to the adder circuit 164 and the motion compensation circuit 178.
The motion compensation circuit 178 performs motion compensation processing on the output data of the addition circuit 176 based on the motion vector input from the motion detector 14 and outputs the result to the addition circuit 176.

図3は、図1に示したエンコーダ18の構成を示す図である。
図3に示すように、エンコーダ18は、図2に示したエンコーダ162に、量子化制御回路180を加えた構成になっている。エンコーダ18は、これらの構成部分により、ホストコンピュータ20から設定される目標データ量Tj に基づいて、FIFOメモリ160によりLピクチャー分遅延された遅延映像データS16に対して動き補償処理、DCT処理、量子化処理および可変長符号化処理を施して、MPEG方式等の圧縮映像データVOUTを生成し、外部機器(図示せず)に出力する。
FIG. 3 is a diagram showing a configuration of the encoder 18 shown in FIG.
As shown in FIG. 3, the encoder 18 has a configuration in which a quantization control circuit 180 is added to the encoder 162 shown in FIG. Based on the target data amount Tj set from the host computer 20, the encoder 18 performs motion compensation processing, DCT processing, quantum processing on the delayed video data S16 delayed by L pictures by the FIFO memory 160 based on the target data amount Tj set by the host computer 20. Compressed video data VOUT such as MPEG format is generated and output to an external device (not shown).

エンコーダ18において、量子化制御回路180は、可変長量子化回路170が出力する圧縮映像データVOUTのデータ量を順次、監視し、遅延映像データS16の第j番目のピクチャーから最終的に生成される圧縮映像データのデータ量が、ホストコンピュータ20から設定された目標データ量Tj に近づくように、順次、量子化回路168に設定する量子化値Qj を調節する。
また、可変長量子化回路170は、圧縮映像データVOUTを外部に出力する他に、遅延映像データS16を圧縮符号化して得られた圧縮映像データVOUTの実際のデータ量Sj を制御信号C18を介してホストコンピュータ20に対して出力する。
In the encoder 18, the quantization control circuit 180 sequentially monitors the data amount of the compressed video data VOUT output from the variable length quantization circuit 170, and is finally generated from the j-th picture of the delayed video data S16. The quantization value Qj set in the quantization circuit 168 is sequentially adjusted so that the data amount of the compressed video data approaches the target data amount Tj set from the host computer 20.
In addition to outputting the compressed video data VOUT to the outside, the variable length quantization circuit 170 outputs the actual data amount Sj of the compressed video data VOUT obtained by compressing and encoding the delayed video data S16 via the control signal C18. To the host computer 20.

以下、第1の実施形態における映像データ圧縮装置1の簡易2パスエンコード動作を説明する。
図4(A)〜(C)は、第1の実施形態における映像データ圧縮装置1の簡易2パスエンコードの動作を示す図である。
エンコーダ制御部12は、映像データ圧縮装置1に入力された非圧縮映像データVINに対して、エンコーダ制御部12により符号化順にピクチャーを並べ替える等の前処理を行い、図4(A)に示すように映像データS12としてFIFOメモリ160およびエンコーダ162に対して出力する。
なお、エンコーダ制御部12によるピクチャーの順番並べ替えにより、図4等に示すピクチャーの符号化の順番と伸長復号後の表示の順番とは異なる。
Hereinafter, a simple two-pass encoding operation of the video data compression apparatus 1 in the first embodiment will be described.
4A to 4C are diagrams illustrating a simple two-pass encoding operation of the video data compression apparatus 1 according to the first embodiment.
The encoder control unit 12 performs pre-processing such as rearranging pictures in the encoding order by the encoder control unit 12 with respect to the uncompressed video data VIN input to the video data compression device 1, and is shown in FIG. As described above, the video data S12 is output to the FIFO memory 160 and the encoder 162.
It should be noted that the picture order rearrangement by the encoder control unit 12 causes the picture coding order shown in FIG. 4 and the like to be different from the display order after decompression decoding.

FIFOメモリ160は、入力された映像データS12の各ピクチャーをLピクチャー分だけ遅延し、エンコーダ18に対して出力する。
エンコーダ162は、入力された映像データS12のピクチャーを予備的に順次、圧縮符号化し、第j(jは整数)番目のピクチャーを圧縮符号化して得られた圧縮符号化データのデータ量、DCT処理後の映像データのDC成分の値、および、AC成分の電力値をホストコンピュータ20に対して出力する。
The FIFO memory 160 delays each picture of the input video data S12 by L pictures and outputs it to the encoder 18.
The encoder 162 preliminarily sequentially compresses and encodes the pictures of the input video data S12, and compresses and encodes the jth (j is an integer) picture, and the DCT process The DC component value and AC component power value of the subsequent video data are output to the host computer 20.

例えば、エンコーダ18に入力される遅延映像データS16は、FIFOメモリ160によりLピクチャーだけ遅延されているので、図4(B)に示すように、エンコーダ18が、遅延映像データS16の第j(jは整数)番目のピクチャー(図4(B)のピクチャーa)を圧縮符号化している際には、エンコーダ162は、映像データS12の第j番目のピクチャーからLピクチャー分先の第(j+L)番目のピクチャー(図4(B)のピクチャーb)を圧縮符号化していることになる。従って、エンコーダ18が遅延映像データS16の第j番目のピクチャーの圧縮符号化を開始する際には、エンコーダ162は映像データS12の第j番目〜第(j+L−1)番目のピクチャー(図4(B)の範囲c)の圧縮符号化を完了しており、これらのピクチャーの圧縮符号化後の実難度データDj ,Dj+1 ,Dj+2 ,…,Dj+L-1 は、ホストコンピュータ20により既に算出されている。   For example, since the delayed video data S16 input to the encoder 18 is delayed by L pictures by the FIFO memory 160, as shown in FIG. 4B, the encoder 18 performs the j-th (j) of the delayed video data S16. Is an integer) -th picture (picture a in FIG. 4B), the encoder 162 encodes the (j + L) -th picture ahead of the j-th picture in the video data S12. The picture (picture b in FIG. 4B) is compression-encoded. Therefore, when the encoder 18 starts compression encoding of the jth picture of the delayed video data S16, the encoder 162 uses the jth to (j + L-1) th pictures (FIG. 4 (FIG. 4)). The compression encoding in the range c) of B) has been completed, and the actual difficulty data Dj, Dj + 1, Dj + 2,..., Dj + L-1 after compression encoding of these pictures are stored in the host computer 20. Has already been calculated.

ホストコンピュータ20は、下に示す式1により、エンコーダ18が遅延映像データS16の第j番目のピクチャーを圧縮符号化して得られる圧縮映像データに割り当てる目標データ量Tj を算出し、算出した目標データ量Tj を量子化制御回路180に設定する。   The host computer 20 calculates the target data amount Tj to be allocated to the compressed video data obtained by the encoder 18 compressing and encoding the jth picture of the delayed video data S16 according to the following equation 1, and the calculated target data amount Tj is set in the quantization control circuit 180.

Figure 2007053788
Figure 2007053788

但し、式1において、Dj は映像データS12の第j番目のピクチャーの実難度データであり、R’j は、映像データS12,S16の第j番目〜第(j+L−1)番目のピクチャーに割り当てることができる目標データ量の平均であり、R’j の初期値(R’1 )は、圧縮映像データの各ピクチャーに平均して割り当て可能な目標データ量であり、下に示す式2で表され、エンコーダ18が圧縮映像データを1ピクチャー分生成する度に、式3に示すように更新される。   In Equation 1, Dj is the actual difficulty level data of the jth picture of the video data S12, and R'j is assigned to the jth to (j + L-1) th pictures of the video data S12 and S16. The initial value (R′1) of R′j is the target data amount that can be averaged and assigned to each picture of the compressed video data. Each time the encoder 18 generates one picture of compressed video data, the encoder 18 is updated as shown in Expression 3.

Figure 2007053788
Figure 2007053788

Figure 2007053788
Figure 2007053788

なお、式3中の数値ビットレート(Bit rate)は、通信回線の伝送容量や、記録媒体の記録容量に基づいて決められる1秒当たりのデータ量(ビット量)を示し、ピクチャーレート(Picture rate)は、映像データに含まれる1秒当たりのピクチャーの数(30枚/秒(NTSC),25枚/秒(PAL))を示し、数値Fj+L は、ピクチャータイプに応じて定められるピクチャー当たりの平均データ量を示す。
エンコーダ18のDCT回路166は、入力される遅延映像データS16の第j番目のピクチャーをDCT処理し、量子化回路168に対して出力する。
量子化回路168は、DCT回路166から入力された第j番目のピクチャーの周波数領域のデータを、量子化制御回路180が目標データ量Tj に基づいて調節する量子化値Qj により量子化し、量子化データとして可変長符号化回路170に対して出力する。
可変長符号化回路170は、量子化回路168から入力された第j番目のピクチャーの量子化データを可変長符号化して、ほぼ、目標データ量Tj に近いデータ量の圧縮映像データVOUTを生成して出力する。
The numerical bit rate in Equation 3 indicates the data amount (bit amount) per second determined based on the transmission capacity of the communication line and the recording capacity of the recording medium. ) Indicates the number of pictures per second (30 pictures / second (NTSC), 25 pictures / second (PAL)) included in the video data, and the numerical value Fj + L is per picture determined according to the picture type. The average amount of data is shown.
The DCT circuit 166 of the encoder 18 performs DCT processing on the j-th picture of the input delayed video data S16 and outputs it to the quantization circuit 168.
The quantization circuit 168 quantizes the frequency domain data of the j-th picture input from the DCT circuit 166 with a quantization value Qj that the quantization control circuit 180 adjusts based on the target data amount Tj, and performs quantization. The data is output to the variable length coding circuit 170.
The variable length coding circuit 170 performs variable length coding on the quantized data of the j-th picture input from the quantization circuit 168, and generates compressed video data VOUT having a data amount substantially close to the target data amount Tj. Output.

同様に、図4(B)に示すように、エンコーダ18が、遅延映像データS16の第(j+1)番目のピクチャー(図4(C)のピクチャーa’)を圧縮符号化している際には、エンコーダ162は、映像データS12の第(j+1)番目〜第(j+L)番目のピクチャー(図4(C)の範囲c’)の圧縮符号化を完了し、これらのピクチャーの実難度データDj+1 ,Dj+2 ,Dj+3 ,・・・,Dj+L
は、ホストコンピュータ20により既に算出されている。
Similarly, as shown in FIG. 4B, when the encoder 18 compresses and encodes the (j + 1) -th picture (picture a ′ in FIG. 4C) of the delayed video data S16, The encoder 162 completes the compression encoding of the (j + 1) th to (j + L) th pictures (the range c ′ in FIG. 4C) of the video data S12, and the actual difficulty data Dj + 1 of these pictures. , Dj + 2, Dj + 3, ..., Dj + L
Has already been calculated by the host computer 20.

ホストコンピュータ20は、式1により、エンコーダ18が遅延映像データS16の第(j+1)番目のピクチャーを圧縮符号化して得られる圧縮映像データに割り当てる目標データ量Tj+1 を算出し、エンコーダ18の量子化制御回路180に設定する。   The host computer 20 calculates the target data amount Tj + 1 to be allocated to the compressed video data obtained by the encoder 18 compressing and encoding the (j + 1) th picture of the delayed video data S16 according to the equation (1). Is set in the control circuit 180.

エンコーダ18は、ホストコンピュータ20から量子化制御回路180に設定された目量データ量Tj に基づいて第(j+1)番目のピクチャーを圧縮符号化し、目標データ量Tj+1 に近いデータ量の圧縮映像データVOUTを生成して出力する。
さらに以下、同様に、映像データ圧縮装置1は、遅延映像データS16の第k番目のピクチャーを、量子化値Qk (k=j+2,j+3,…)をピクチャーごとに変更して順次、圧縮符号化し、圧縮映像データVOUTとして出力する。
The encoder 18 compresses and encodes the (j + 1) th picture based on the scale data amount Tj set by the host computer 20 in the quantization control circuit 180, and a compressed video having a data amount close to the target data amount Tj + 1. Data VOUT is generated and output.
Similarly, the video data compression apparatus 1 sequentially compresses and encodes the kth picture of the delayed video data S16 by changing the quantization value Qk (k = j + 2, j + 3,...) For each picture. , And output as compressed video data VOUT.

以上説明したように、第1の実施形態に示した映像データ圧縮装置1によれば、短時間で非圧縮映像データVINの絵柄の難度を算出し、算出した難度に応じた圧縮率で適応的に非圧縮映像データVINを圧縮符号化することができる。つまり、第1の実施形態に示した映像データ圧縮装置1によれば、2パスエンコード方式と異なり、ほぼ実時間的に、非圧縮映像データVINの絵柄の難度に基づいて適応的に非圧縮映像データVINを圧縮符号化をすることができ、実況放送といった実時間性を要求される用途に応用可能である。
なお、第1の実施形態に示した他、本発明に係るデータ多重化装置1は、エンコーダ162が圧縮符号化した圧縮映像データのデータ量を、そのまま難度データとして用い、ホストコンピュータ20の処理の簡略化を図る等、種々の構成を採ることができる。
As described above, according to the video data compression apparatus 1 shown in the first embodiment, the difficulty level of the pattern of the uncompressed video data VIN is calculated in a short time, and adaptively at a compression rate corresponding to the calculated difficulty level. The uncompressed video data VIN can be compressed and encoded. That is, according to the video data compression apparatus 1 shown in the first embodiment, unlike the two-pass encoding method, the non-compressed video is adaptively based on the difficulty of the pattern of the non-compressed video data VIN almost in real time. The data VIN can be compressed and encoded, and can be applied to applications requiring real-time performance such as live broadcasting.
In addition to the one shown in the first embodiment, the data multiplexing apparatus 1 according to the present invention uses the amount of compressed video data compression-encoded by the encoder 162 as difficulty data as it is, and performs processing of the host computer 20. Various configurations such as simplification can be adopted.

第2実施形態
以下、本発明の第2の実施形態を説明する。
第1の実施形態に示した簡易2パスエンコード方式は、入力される非圧縮映像データに、ほぼ1GOP分(例えば、0.5秒)程度の遅延を与えるだけで圧縮符号化し、適切なデータ量の圧縮映像データを生成することができる優れた方式である。
Second Embodiment Hereinafter, a second embodiment of the present invention will be described.
The simple two-pass encoding method shown in the first embodiment compresses and encodes input non-compressed video data only by giving a delay of about 1 GOP (for example, 0.5 seconds), and an appropriate data amount. This is an excellent method that can generate compressed video data.

しかしながら、これらの方式は、エンコーダーを2つ必要とする。一般に、映像データを圧縮符号化するエンコーダーは大規模のハードウェアを必要とし、集積回路化しても非常に高価であり、しかも、サイズが大きい。従って、これらの方式がエンコーダーを2つ必要とすることは、これらの方式を実現する装置の低コスト化、小型化および省電力化を妨げる。また、圧縮符号化に要する時間遅延は、短ければ短いほど望ましいが、実難度データDj および予測難度データDj
’の算出処理および予備的な圧縮符号化処理そのものが数ピクチャー分の処理時間を要するので、これらの処理自体が、時間遅延の短縮化を妨げる原因となる。
However, these schemes require two encoders. In general, an encoder that compresses and encodes video data requires large-scale hardware, is very expensive even when integrated, and is large in size. Therefore, the need for two encoders in these methods hinders cost reduction, size reduction, and power saving of a device that realizes these methods. Further, it is desirable that the time delay required for the compression encoding is as short as possible, but the actual difficulty level data Dj and the prediction difficulty level data Dj.
Since the calculation process of 'and the preliminary compression encoding process itself require processing time for several pictures, these processes themselves cause a reduction in time delay.

第2の実施形態は、かかる問題点を解決するためになされたものであって、1つのエンコーダを用いるのみで、簡易2パスエンコード方式および予測簡易2パスエンコード方式と同等に適切なデータ量の圧縮映像データを生成することができ、しかも、処理に要する時間遅延がより短い映像データ圧縮方式を提供することを目的とする。   The second embodiment has been made to solve such a problem, and uses only one encoder and has an appropriate data amount equivalent to the simple 2-pass encoding method and the predictive simple 2-pass encoding method. An object of the present invention is to provide a video data compression method capable of generating compressed video data and having a shorter time delay required for processing.

図5は、第2の実施形態における本発明に係る映像データ圧縮装置2の構成の概要を示す図である。
図6は、図5に示した映像データ圧縮装置2の圧縮符号化部24の詳細な構成を示す図である。
なお、図5および図6において、映像データ圧縮装置2の構成部分のうち、第1の実施形態において説明した映像データ圧縮装置1(図1〜図3)の構成部分と同一のものには同一の符号を付して示してある。
FIG. 5 is a diagram showing an outline of the configuration of the video data compression apparatus 2 according to the present invention in the second embodiment.
FIG. 6 is a diagram showing a detailed configuration of the compression encoding unit 24 of the video data compression apparatus 2 shown in FIG.
5 and 6, the same components as those of the video data compression device 1 (FIGS. 1 to 3) described in the first embodiment are the same among the components of the video data compression device 2. It is shown with a reference numeral.

図5に示すように、映像データ圧縮装置2は、映像データ圧縮装置1(図1〜図3)の圧縮符号化部10を、圧縮符号化部10からエンコーダ162を除いた圧縮符号化部24で置換し、エンコーダ制御部12をエンコーダ制御部22で置換し、バッファメモリ(buffer)182を付加した構成を採る。
図6に示すように、圧縮符号化部24は、映像並び替え回路220、走査変換・マクロブロック化回路222および統計量算出回路224から構成され、圧縮符号化部24の他の構成部分は、圧縮符号化部10と同一の構成を採る。
As shown in FIG. 5, the video data compression device 2 includes a compression coding unit 10 of the video data compression device 1 (FIGS. 1 to 3) and a compression coding unit 24 in which the encoder 162 is removed from the compression coding unit 10. The encoder control unit 12 is replaced with the encoder control unit 22, and a buffer memory (buffer) 182 is added.
As shown in FIG. 6, the compression encoding unit 24 includes a video rearrangement circuit 220, a scan conversion / macroblocking circuit 222, and a statistic calculation circuit 224. The other components of the compression encoding unit 24 are as follows: The same configuration as that of the compression encoding unit 10 is adopted.

エンコーダ制御部22は、エンコーダ制御部12と同様に、非圧縮映像データVINのピクチャーの有無をホストコンピュータ20に通知し、さらに、非圧縮映像データVINのピクチャーごとに圧縮符号化のための前処理を行う。
エンコーダ制御部22において、映像並び替え回路220は、入力された非圧縮映像データを符号化順に並べ替える。
Similar to the encoder control unit 12, the encoder control unit 22 notifies the host computer 20 of the presence or absence of a picture of the uncompressed video data VIN, and further performs preprocessing for compression coding for each picture of the uncompressed video data VIN. I do.
In the encoder control unit 22, the video rearrangement circuit 220 rearranges the input uncompressed video data in the encoding order.

走査変換・マクロブロック化回路222は、ピクチャー・フィールド変換を行い、非圧縮映像データVINが映画の映像データである場合に3:2プルダウン処理等を行う。
統計量算出回路224は、映像並び替え回路220および走査変換・マクロブロック化回路222により処理され、Iピクチャーに圧縮符号化されるピクチャーからフラットネス(flatness)およびイントラAC(intra AC)等の統計量を算出する。
The scan conversion / macroblocking circuit 222 performs picture / field conversion, and performs 3: 2 pull-down processing when the uncompressed video data VIN is video data of a movie.
The statistic calculation circuit 224 is processed by the video rearrangement circuit 220 and the scan conversion / macroblocking circuit 222, and the statistics such as flatness and intra AC from the picture compressed and encoded into the I picture. Calculate the amount.

映像データ圧縮装置2は、これらの構成部分により、非圧縮映像データの統計量(フラットネス,イントラAC)および動き予測の予測誤差量(ME残差)を非圧縮映像データVINの絵柄の難度の代わりに用いて、映像データ圧縮装置1(図1,図2)と同様に適応的に目標データ量Tj を算出して、高精度なフィードフォワード制御を行うことにより、非圧縮映像データVINを適切なデータ量の圧縮映像データに圧縮符号化する。
なお、映像データ圧縮装置2においては、動き検出器14およびエンコーダ制御部22の統計量算出回路224により、予め検出された指標データに基づいて目標データ量Tj が定めるられることから、以下、映像データ圧縮装置2における圧縮符号化方式を、フィード・フォワード・レート・コントロール(FFRC; feed foward rate control)方式と呼ぶことにする。
With these components, the video data compression apparatus 2 uses the statistical amount (flatness, intra AC) of the uncompressed video data and the prediction error amount (ME residual) of the motion prediction of the degree of difficulty of the pattern of the uncompressed video data VIN. Instead, the target data amount Tj is adaptively calculated in the same manner as the video data compression apparatus 1 (FIGS. 1 and 2), and high-precision feedforward control is performed, so that the uncompressed video data VIN is appropriately It compresses and encodes into compressed video data of a proper data amount.
In the video data compression apparatus 2, the target data amount Tj is determined based on the index data detected in advance by the motion detector 14 and the statistic calculation circuit 224 of the encoder control unit 22. The compression encoding method in the compression device 2 will be referred to as a feed forward rate control (FFRC) method.

なお、ME残差は、圧縮されるピクチャーと、参照ピクチャーの映像データとの差分値の絶対値和あるいは自乗値和として定義され、動き検出器14により、圧縮後にPピクチャーおよびBピクチャーとなるピクチャーから算出され、映像の動きの速さおよび絵柄の複雑さを表し、フラットネスと同様に、難度および圧縮後のデータ量と相関性を有する。   The ME residual is defined as a sum of absolute values or a sum of square values of difference values between a picture to be compressed and video data of a reference picture, and is a picture that becomes a P picture and a B picture after compression by the motion detector 14. It represents the speed of motion of the video and the complexity of the picture, and has a correlation with the degree of difficulty and the amount of data after compression, as with flatness.

Iピクチャーについては、他のピクチャーの参照なしに圧縮符号化されるため、ME残差を求めることができず、ME残差に代わるパラメータとして、フラットネスおよびイントラACを用いる。
また、フラットネスは、映像データ圧縮装置2を実現するために、映像の空間的な平坦さを表す指標として新たに定義されたパラメータであって、映像の複雑さを指標し、映像の絵柄の難しさ(難度)および圧縮後のデータ量と相関性を有する。
また、イントラACは、映像データ圧縮装置2を実現するために、MPEG方式におけるDCT処理単位のDCTブロックごとの映像データとの分散値の総和として新たに定義したパラメータであって、フラットネスと同様に、映像の複雑さを指標し、映像の絵柄の難しさおよび圧縮後のデータ量と相関性を有する。
Since the I picture is compression-encoded without referring to other pictures, the ME residual cannot be obtained, and flatness and intra AC are used as parameters in place of the ME residual.
Further, flatness is a parameter newly defined as an index representing the spatial flatness of the video in order to realize the video data compression apparatus 2, and indicates the complexity of the video. Correlation with difficulty (degree of difficulty) and data amount after compression.
Intra AC is a parameter newly defined as the sum of variance values of video data for each DCT block in the DCT processing unit in the MPEG system in order to realize the video data compression apparatus 2, and is similar to flatness. In addition, the complexity of the video is indexed, and there is a correlation with the difficulty of the video pattern and the amount of data after compression.

以下、ME残差、フラットネスおよびイントラACについて説明する。
第1の実施形態において説明した簡易2パスエンコード方式および予測簡易2パスエンコード方式において、実難度データDj は映像の絵柄の難しさを示し、目標データ量Tj は実難度データDj に基づいて算出される。
Hereinafter, the ME residual, flatness, and intra AC will be described.
In the simple two-pass encoding method and the predictive simple two-pass encoding method described in the first embodiment, the actual difficulty data Dj indicates the difficulty of the picture pattern, and the target data amount Tj is calculated based on the actual difficulty data Dj. The

また、エンコーダ18が生成する圧縮映像データのデータ量を、目標データ量Tj が示す値に近づけるために、量子化回路168(図2,図6)において量子化値Qj の制御が行われる。従って、映像データを圧縮符号化せずに得られ、実難度データDj と同様に映像データの絵柄の複雑さ(難しさ)を適切に示すパラメータを、エンコーダ18の量子化回路168における量子化処理以前に得ることができれば、エンコーダ162(図1,図2)を省略し、処理遅延時間の短縮するという目的を達成することができる。ME残差、フラットネスおよびイントラACは、実難度データDj と強い相関を有するので、このような目的を達成するために適切である。   Further, in order to bring the data amount of the compressed video data generated by the encoder 18 close to the value indicated by the target data amount Tj, the quantization value Qj is controlled in the quantization circuit 168 (FIGS. 2 and 6). Accordingly, the quantization process is performed in the quantization circuit 168 of the encoder 18 by using the parameters that can be obtained without compressing and encoding the video data and appropriately indicating the complexity (difficulty) of the picture of the video data as in the case of the actual difficulty data Dj. If previously obtained, the encoder 162 (FIGS. 1 and 2) can be omitted and the object of shortening the processing delay time can be achieved. The ME residual, flatness, and intra AC have a strong correlation with the actual difficulty data Dj, and thus are suitable for achieving such an object.

ME残差と実難度データDj との関係
他のピクチャーを参照して圧縮符号化処理し、PピクチャーおよびBピクチャーを生成する際には、動き検出器14は、圧縮対象となるピクチャー(入力ピクチャー)の注目マクロブロックと、参照されるピクチャー(参照ピクチャー)との間の差分値の絶対値和あるいは自乗値和が最小となるようなマクロブロックを探し、動きベクトルを求める。ME残差は、このように、動きベクトルを求める際に、最小になった各マクロブロックの差分値の絶対和または自乗和を、ピクチャー全体について総和した値として定義される。
Relationship between ME Residue and Actual Difficulty Data Dj When generating a P picture and a B picture by performing compression encoding processing with reference to other pictures, the motion detector 14 selects a picture (input picture) to be compressed. ) And a macro block that minimizes the sum of absolute values or sums of square values of difference values between the target macro block and the referenced picture (reference picture), and obtains a motion vector. As described above, the ME residual is defined as a value obtained by summing the absolute sum or the square sum of the difference values of the respective macroblocks that are minimized when obtaining the motion vector.

図7は、映像データ圧縮装置1,2により、Pピクチャーを生成する際のME残差と実難度データDj との相関関係を示す図である。
図8は、映像データ圧縮装置1,2により、Bピクチャーを生成する際のME残差と実難度データDj との相関関係を示す図である。
なお、図7および図8においては、実難度データDj として、エンコーダ18が固定の量子化値を用いて圧縮符号化して得られた圧縮映像データのデータ量を用いており(以下、図10,図11において同じ)、図7および図8は、CCIRにより規格化された標準画像[cheer (cheer leaders), mobile (mobile and calender), tennis (table tennis), diva(diva with noise)] およびその他の画像(resort)を実際にMPEG2方式により圧縮符号化した場合に得られるME残差と実難度データDj との関係を示すグラフであり、図7および図8において、グラフの縦軸(difficulty)が実難度データDj を示し、横軸(me resid)がME残差を示す。
図7および図8を参照して分かるように、ME残差は実難度データDj と非常に強い相関関係を有する。従って、圧縮後にPピクチャーまたはBピクチャーとなるピクチャーの実難度データDj の代わりに、ME残差は、目標データ量Tj
の生成に用いられ得る。
FIG. 7 is a diagram showing the correlation between the ME residual and the actual difficulty data Dj when the P picture is generated by the video data compression apparatuses 1 and 2.
FIG. 8 is a diagram showing a correlation between the ME residual and the actual difficulty data Dj when the B picture is generated by the video data compression apparatuses 1 and 2.
7 and 8, the actual difficulty data Dj uses the data amount of compressed video data obtained by compression encoding using a fixed quantization value by the encoder 18 (hereinafter, FIG. 10, FIG. 10). 7 and 8 are standard images standardized by CCIR [cheer (cheer leaders), mobile (mobile and calender), tennis (table tennis), diva (diva with noise)] and others. 9 is a graph showing the relationship between the ME residual obtained by actually compressing and coding the image (resort) by the MPEG2 method and the actual difficulty data Dj. In FIGS. 7 and 8, the vertical axis of the graph (difficulty) Indicates the actual difficulty data Dj, and the horizontal axis (me resid) indicates the ME residual.
As can be seen with reference to FIGS. 7 and 8, the ME residual has a very strong correlation with the actual difficulty data Dj. Therefore, instead of the actual difficulty data Dj of a picture that becomes a P picture or a B picture after compression, the ME residual is equal to the target data amount Tj.
Can be used to generate

フラットネスと実難度データDj との関係
図9は、フラットネスの計算方法を示す図である。
フラットネスは、まず、図9に示すように、MPEG方式においてDCT処理の単位となるDCTブロックそれぞれを、2画素×2画素の小ブロックに分割し、次に、これらの小ブロック内の対角の画素のデータ(画素値)の差分値を算出し、差分値を所定の閾値と比較し、さらに、差分値が閾値よりも小さくなる小ブロック総数をピクチャーごとに求めることにより算出される。なお、フラットネスの値は、映像の絵柄が空間的に複雑であるほど小さくなり、平坦であれば大きくなる。
Relationship between Flatness and Actual Difficulty Data Dj FIG. 9 is a diagram illustrating a flatness calculation method.
As shown in FIG. 9, the flatness first divides each DCT block, which is a unit of DCT processing in the MPEG system, into small blocks of 2 pixels × 2 pixels, and then diagonals within these small blocks. The difference value of the pixel data (pixel value) is calculated, the difference value is compared with a predetermined threshold value, and the total number of small blocks whose difference value is smaller than the threshold value is obtained for each picture. Note that the flatness value decreases as the picture pattern is spatially complex, and increases as the image pattern is flat.

図10は、映像データ圧縮装置1,2により、Iピクチャーを生成する際のフラットネスと実難度データDj との相関関係を示す図である。
なお、図10は、図7および図8と同様に、CCIRにより規格化された標準画像およびその他の画像を実際にMPEG2方式により圧縮符号化した場合に得られるフラットネスと実難度データDj との関係を示すグラフであり、図10において、グラフの縦軸(difficulty)が実難度データDj を示し、横軸(flatness)がフラットネスを示す。
図10に示すように、フラットネスと実難度データDj には、強い負の相関関係があり、実難度データDj は、フラットネスを一次関数に代入する等の方法により近似可能であることがわかる。
FIG. 10 is a diagram showing the correlation between flatness and actual difficulty data Dj when an I picture is generated by the video data compression apparatuses 1 and 2.
FIG. 10 shows the flatness obtained when the standard image standardized by CCIR and other images are actually compression-encoded by the MPEG2 system and the actual difficulty level data Dj, as in FIGS. FIG. 10 is a graph showing the relationship, and in FIG. 10, the vertical axis (difficulty) of the graph indicates actual difficulty data Dj, and the horizontal axis (flatness) indicates flatness.
As shown in FIG. 10, there is a strong negative correlation between the flatness and the actual difficulty data Dj, and the actual difficulty data Dj can be approximated by a method such as substituting the flatness into a linear function. .

イントラACと実難度データDj との関係
イントラACは、DCTブロックごとに、DCTブロック内の画素それぞれの画素値と、DCTブロック内の画素値の平均値との差分の絶対値の総和として算出される。つまり、イントラACは、下の式4により求めることができる。
Relationship between Intra AC and Actual Difficulty Data Dj Intra AC is calculated for each DCT block as the sum of absolute values of differences between the pixel values of each pixel in the DCT block and the average value of the pixel values in the DCT block. The That is, the intra AC can be obtained by the following expression 4.

Figure 2007053788
Figure 2007053788

図11は、映像データ圧縮装置1,2により、Iピクチャーを生成する際のイントラACと実難度データDj との相関関係を示す図である。
なお、図11は、図7および図8と同様に、CCIRにより規格化された標準画像およびその他の画像を実際にMPEG2方式により圧縮符号化した場合に得られるイントラACと実難度データDj との関係を示すグラフであり、図11において、グラフの縦軸(difficulty)が実難度データDj を示し、横軸(intra AC)がイントラACを示す。
図11に示すように、イントラACと実難度データDj には、強い正の相関関係があり、実難度データDj は、イントラACを一次関数に代入する等の方法により近似可能であることがわかる。
FIG. 11 is a diagram showing the correlation between the intra AC and the actual difficulty data Dj when the I picture is generated by the video data compression apparatuses 1 and 2.
As in FIGS. 7 and 8, FIG. 11 shows the relationship between the intra AC and the actual difficulty data Dj obtained when the standard image standardized by CCIR and other images are actually compression-encoded by the MPEG2 system. FIG. 11 is a graph showing the relationship, and in FIG. 11, the vertical axis (difficulty) of the graph shows actual difficulty data Dj, and the horizontal axis (intra AC) shows intra AC.
As shown in FIG. 11, the intra AC and the actual difficulty data Dj have a strong positive correlation, and the actual difficulty data Dj can be approximated by a method such as substituting the intra AC into a linear function. .

ここまでに説明したように、各指標データ(統計量)により実難度データDj
を一次関数等により近似可能であることが分かる。従って、各ピクチャータイプの実難度データDj は、以下に示すように算出可能である。
As described so far, the actual difficulty data Dj is obtained from each index data (statistic).
Can be approximated by a linear function or the like. Therefore, the actual difficulty data Dj for each picture type can be calculated as shown below.

Pピクチャーについては下に示す式5により、Bピクチャーについては下に示す式6により、実難度データDj はME残差により近似される。また、Iピクチャーについては、式5,6と同様の近似式により実難度データDj は、フラットネスおよびイントラACまたはこれらのいずかにより近似される。   The actual difficulty data Dj is approximated by the ME residual according to Equation 5 shown below for the P picture and Equation 6 shown below for the B picture. For the I picture, the actual difficulty level data Dj is approximated by flatness and intra AC or any one of them by an approximate expression similar to Expressions 5 and 6.

Figure 2007053788
Figure 2007053788

Figure 2007053788
Figure 2007053788

さらに、第1の実施形態に示した簡易2パスエンコード方式においては、これらの近似により得られた実難度データDj を、式1に代入することにより目標データ量Tj が算出される。   Furthermore, in the simple two-pass encoding method shown in the first embodiment, the target data amount Tj is calculated by substituting the actual difficulty data Dj obtained by these approximations into Equation 1.

以下、実難度データDj をME残差、フラットネスおよびイントラACで近似し、簡易2パスエンコード方式により非圧縮映像データを圧縮符号化する場合を例に、映像データ圧縮装置2の動作を説明する。
エンコーダ制御部22において、映像並び替え回路220は、非圧縮映像データVINを符号化順にピクチャーを並べ替え、走査変換・マクロブロック化回路222は、ピクチャー・フィールド変換等を行い、統計量算出回路224は、Iピクチャーに圧縮符号化されるピクチャーに対して、図9および式4に示した演算処理を行い、フラットネスおよびイントラAC等の統計量を算出する。
Hereinafter, the operation of the video data compression apparatus 2 will be described by taking as an example the case where the actual difficulty data Dj is approximated by ME residual, flatness and intra AC, and the uncompressed video data is compression-encoded by the simple two-pass encoding method. .
In the encoder control unit 22, the video rearrangement circuit 220 rearranges the pictures in the encoding order of the uncompressed video data VIN, the scan conversion / macroblocking circuit 222 performs picture / field conversion and the like, and the statistic calculation circuit 224. Performs calculation processing shown in FIG. 9 and Expression 4 on a picture that is compression-encoded into an I picture, and calculates statistics such as flatness and intra AC.

動き検出器14は、PピクチャーおよびBピクチャーに圧縮符号化されるピクチャーについて動きベクトルを生成し、さらに、ME残差を算出する。
FIFOメモリ160は、入力された映像データをLピクチャー分だけ遅延する。
The motion detector 14 generates a motion vector for a picture that is compression-encoded into a P picture and a B picture, and further calculates an ME residual.
The FIFO memory 160 delays the input video data by L pictures.

ホストコンピュータ20は、動き検出器14が生成したME残差に対して式5および式6に示した演算処理を行って実難度データDj を近似し、式5および式6と同様な演算処理を行って、フラットネスおよびイントラACにより実難度データDj を近似する。
さらに、ホストコンピュータ20は、近似した実難度データDj を式1に代入し、目標データ量Tj を算出し、算出した目標データ量Tj をエンコーダ18の量子化制御回路180に設定する。
The host computer 20 approximates the actual difficulty data Dj by performing the arithmetic processing shown in Expression 5 and Expression 6 on the ME residual generated by the motion detector 14, and performs the same arithmetic processing as Expression 5 and Expression 6. The actual difficulty data Dj is approximated by flatness and intra AC.
Further, the host computer 20 substitutes the approximate actual difficulty data Dj into Equation 1, calculates the target data amount Tj, and sets the calculated target data amount Tj in the quantization control circuit 180 of the encoder 18.

エンコーダ18のDCT回路166は、遅延した映像データの第j番目のピクチャーをDCT処理する。
量子化回路168は、DCT回路166から入力された第j番目のピクチャーの周波数領域のデータを、量子化制御回路180が目標データ量Tj に基づいて調節する量子化値Qj により量子化する。
可変長符号化回路170は、量子化回路168から入力された第j番目のピクチャーの量子化データを可変長符号化して、ほぼ、目標データ量Tj に近いデータ量の圧縮映像データVOUTを生成して、バッファメモリ182を介して外部に出力する。
The DCT circuit 166 of the encoder 18 performs DCT processing on the jth picture of the delayed video data.
The quantization circuit 168 quantizes the frequency domain data of the j-th picture input from the DCT circuit 166 with a quantization value Qj that the quantization control circuit 180 adjusts based on the target data amount Tj.
The variable length coding circuit 170 performs variable length coding on the quantized data of the j-th picture input from the quantization circuit 168, and generates compressed video data VOUT having a data amount substantially close to the target data amount Tj. And output to the outside via the buffer memory 182.

なお、TM5方式等においては、マクロブロックの量子化値(MQUANT)を算出するために、下の式7に示すアクティビティ(activity)という統計量が用いられる。アクティビティは、フラットネスおよびイントラACと同様に、実難度データDj と強い相関関係を有するので、これらパラメータの代わりにアクティビティを用いて、実難度データDj を近似し、圧縮符号化を行うように映像データ圧縮装置2を構成してもよい。   In the TM5 method or the like, a statistic called activity shown in the following equation 7 is used to calculate the quantization value (MQUANT) of the macroblock. Since the activity has a strong correlation with the actual difficulty data Dj as in flatness and intra AC, the activity is used in place of these parameters to approximate the actual difficulty data Dj and perform compression encoding. The data compression device 2 may be configured.

Figure 2007053788
Figure 2007053788

また、以上、第1の実施形態に示した簡易2パスエンコードを行う場合を例に、映像データ圧縮装置2の動作を説明したが、映像データ圧縮装置2は、予測簡易2パスエンコードを行いうることはいうまでもない。
また、第2の実施形態に示した映像データ圧縮装置2に対しても、第1の実施形態示した映像データ圧縮装置1に対してと同様の変形が可能である。
In the above, the operation of the video data compression apparatus 2 has been described by taking the simple two-pass encoding shown in the first embodiment as an example. However, the video data compression apparatus 2 can perform the predictive simple two-pass encoding. Needless to say.
Further, the video data compression apparatus 2 shown in the second embodiment can be modified in the same manner as the video data compression apparatus 1 shown in the first embodiment.

第3実施形態
本発明の第3の実施形態の説明に先立ち、図12を参照して、第3の実施形態における本発明に係る映像データ圧縮装置の背景および目的等を説明する。
図12は、MPEGのMP@ML方式によりTM5に示された圧縮アルゴリズムを用いて、映像データ圧縮装置1,2(図1〜図3,図5,図6)が、圧縮映像データのGOPのデータ量(発生ビット量)をほぼ一定に保って固定長符号化を行った場合のVBVバッファの占有量Bn の経時的な変化の評価結果を示す図である。なお、図12においては、縦軸はVBVバッファにバッファリングされている圧縮映像データのデータ量を示し、横軸は時間経過を示す。
Third Embodiment Prior to the description of the third embodiment of the present invention, the background and purpose of the video data compression apparatus according to the present invention in the third embodiment will be described with reference to FIG.
FIG. 12 shows that the video data compression apparatuses 1 and 2 (FIGS. 1 to 3, 5, and 6) use the compression algorithm shown in TM5 by the MPEG MP @ ML method, It is a figure which shows the evaluation result of the time-dependent change of the occupation amount Bn of a VBV buffer at the time of performing fixed length encoding, keeping data amount (generated bit amount) substantially constant. In FIG. 12, the vertical axis indicates the amount of compressed video data buffered in the VBV buffer, and the horizontal axis indicates the passage of time.

TM5に示された圧縮アルゴリズムは、圧縮映像データのGOP当たりのデータ量を、ほぼ一定にすることができる点で優れている。しかしながら、圧縮映像データのデータレートを固定値にするMPEGの固定レート符号化方式においては、必ずしもGOP単位にデータ量を一定にする必要はない。   The compression algorithm shown in TM5 is excellent in that the amount of data per GOP of compressed video data can be made substantially constant. However, in the MPEG fixed rate encoding method in which the data rate of the compressed video data is a fixed value, it is not always necessary to make the data amount constant for each GOP.

この固定レート符号化方式は、圧縮符号化後の映像データをバッファリングする仮想的なVBVバッファ(video buffering verifier buffer) が要求する制約条件を満たすこと、つまり、VBVバッファにバッファリングされている圧縮映像データのデータ量(占有量Bn )が規定値を上回ったり(オーバーフローを生じたり)、逆に、規定値以下になったり(アンダーフローを生じたり)しないことのみを圧縮映像データに要求する。   This fixed-rate encoding method satisfies the constraint conditions required by a virtual VBV buffer (video buffering verifier buffer) that buffers video data after compression encoding, that is, the compression buffered in the VBV buffer. The compressed video data is requested only that the amount of video data (occupied amount Bn) does not exceed a prescribed value (causes overflow), and conversely does not fall below the prescribed value (causes underflow).

MP@ML方式により、TM5に示される圧縮アルゴリズムを用いて圧縮符号化を行うと、バッファリング容量1.8MbitのVBVバッファにおける圧縮映像データの占有量Bn を評価すると、例えば、図12に示すように、占有量Bn は高い値で推移し、VBVバッファを必ずしも有効に利用できないことが分かる。   When compression encoding is performed using the compression algorithm shown in TM5 by the MP @ ML method, the occupied amount Bn of the compressed video data in the VBV buffer having a buffering capacity of 1.8 Mbit is evaluated. For example, as shown in FIG. In addition, the occupation amount Bn changes at a high value, and it can be seen that the VBV buffer cannot always be used effectively.

VBVバッファを有効利用しえないのは、VBVバッファにおける占有量Bn
が高い値で推移するのは、VBVバッファのバッファリング容量が約1.8Mbitと大きいにもかかわらず、VBVバッファの入出力の単位となる圧縮映像データのピクチャーのデータ量が少ないためである。
このように、低いデータレートの圧縮映像データを生成する際に、非圧縮映像データの映像の複雑さのいかんにかかわらず、所定の枚数のピクチャー(GOP)のデータ量をほぼ一定にすると、複雑な絵柄の部分の非圧縮映像データを圧縮符号化して得られる圧縮映像データを伸長復号して得られる映像の品質が極端に劣化し、逆に、簡単な絵柄の部分から得られる圧縮映像データの品質が比較的よくなる。従って、全体として見た場合には、圧縮映像データに多くのむらが生じ、しかも、絵柄が不安定になり、品質が悪くなる。
The reason why the VBV buffer cannot be used effectively is that the occupied amount Bn in the VBV buffer
The reason for the high value is that although the buffering capacity of the VBV buffer is as large as about 1.8 Mbit, the amount of compressed video data pictures serving as a unit of input / output of the VBV buffer is small.
As described above, when generating compressed video data with a low data rate, the complexity of the data amount of a predetermined number of pictures (GOP) is almost constant regardless of the complexity of the video of the uncompressed video data. The quality of the video obtained by decompressing and decoding the compressed video data obtained by compressing and encoding the uncompressed video data of the simple design part is extremely deteriorated. Conversely, the compressed video data obtained from the simple design part Quality is relatively good. Accordingly, when viewed as a whole, a lot of unevenness occurs in the compressed video data, and the picture becomes unstable and the quality deteriorates.

第3の実施形態に示すフィードバックレート制御方式は、かかる問題点に鑑みてなされたものであり、VBVバッファが要求する制約条件の範囲内でVBVバッファのバッファリング容量を有効に利用し、非圧縮映像データの部分ごとに、絵柄に応じたデータ量を割り当てることにより、圧縮映像データの品質を全体として向上させることを目的とする。   The feedback rate control method shown in the third embodiment has been made in view of such problems, and effectively uses the buffering capacity of the VBV buffer within the range of the constraints required by the VBV buffer, and is not compressed. It is an object to improve the quality of compressed video data as a whole by assigning a data amount corresponding to a design to each video data portion.

図13は、第3の実施形態における本発明に係るエンコーダ26の構成を示す図である。
なお、図13においては、エンコーダ26の構成部分の内、図1〜図3および図5,図6に示したエンコーダ18の構成部分と同一のものには同一の符号を付してある。
FIG. 13 is a diagram showing the configuration of the encoder 26 according to the present invention in the third embodiment.
In FIG. 13, the same components as those of the encoder 18 shown in FIGS. 1 to 3, FIG. 5, and FIG.

エンコーダ26は、映像データ圧縮装置2(図5,図6)のエンコーダ18の代わりに用いられる装置であって、図13に示すように、エンコーダ26は、量子化制御回路180の代わりに、グローバルコンプレクシティ算出回路(GC算出回路)262、目標データ量算出(Tj 算出)回路264および量子化インデックス生成回路266を含む量子化制御部260を有し、ホストコンピュータ20によらずに、VBVバッファにおける圧縮映像データの占有量Bn 、および、実難度データDj またはグローバルコンプレクシティXI ,Xp ,XB に基づいて目標データ量Tj および量子化値Qj (量子化インデックスQIND)を算出可能に構成されている。   The encoder 26 is an apparatus used in place of the encoder 18 of the video data compression apparatus 2 (FIGS. 5 and 6). As shown in FIG. 13, the encoder 26 is a global instead of the quantization control circuit 180. The VBV buffer has a quantization control unit 260 including a complexity calculation circuit (GC calculation circuit) 262, a target data amount calculation (Tj calculation) circuit 264, and a quantization index generation circuit 266. The target data amount Tj and the quantized value Qj (quantized index QIND) can be calculated based on the occupied amount Bn of the compressed video data and the actual difficulty data Dj or the global complexity XI, Xp, XB.

エンコーダ26は、これらの構成部分により、1つのエンコーダのみにより圧縮映像データのデータ量により量子化回路168の量子化処理に対するフィードバック制御を行い、非圧縮映像データの部分ごとに絵柄に応じたデータ量を割り当てて圧縮映像データを生成し、圧縮映像データの品質を向上させる。   The encoder 26 performs feedback control with respect to the quantization processing of the quantization circuit 168 based on the data amount of the compressed video data by only one encoder, and the data amount corresponding to the pattern for each portion of the uncompressed video data. Is assigned to generate compressed video data to improve the quality of the compressed video data.

エンコーダ26の各構成部分の動作
以下、エンコーダ26の各構成部分の内、映像データ圧縮装置1,2(図1〜図3,図5,図6)のエンコーダ18と異なる部分(量子化制御部260)の動作を説明する。
GC算出回路262の動作
GC算出回路262は、可変長符号化回路170から出力される圧縮映像データのデータ量SI ,Sp ,SB と、量子化回路168が量子化に用いた量子化値の平均値QI ,Qp ,QB とに基づいて、各ピクチャータイプのグローバルコンプレクシティXI ,Xp ,XB を算出し、目標データ量算出回路264、量子化インデックス生成回路266、および、必要に応じてホストコンピュータ20に対して出力する。
Operation of Each Component Part of Encoder 26 Hereinafter, a part (quantization control unit) of each component part of encoder 26 that is different from encoder 18 of video data compression apparatuses 1 and 2 (FIGS. 1 to 3, 5 and 6). 260) will be described.
Operation of the GC calculation circuit 262 The GC calculation circuit 262 is an average of the data amounts SI, Sp, and SB of the compressed video data output from the variable length coding circuit 170 and the quantization value used by the quantization circuit 168 for quantization. Based on the values QI, Qp, and QB, global complexity XI, Xp, and XB of each picture type is calculated, a target data amount calculation circuit 264, a quantization index generation circuit 266, and, if necessary, the host computer 20 Output for.

なお、グローバルコンプレクシティXI ,Xp ,XB は、MPEGのTM5方式の第1段階(ステップ1)においてピクチャータイプごとに算出され、〔X(I,P,B);XI =SI QI ,Xp =Sp Qp ,XB =SB QB と定義され、グローバルコンプレクシティXI ,Xp ,XB は、それぞれIピクチャー、PピクチャーおよびBピクチャーの実難度データDI ,Dp ,DB とほぼ同値(XI
,Xp ,XB ≒DI ,Dp ,DB )になる。
The global complexity XI, Xp, XB is calculated for each picture type in the first stage (step 1) of the MPEG TM5 system, and [X (I, P, B); XI = SI QI, Xp = Sp Qp, XB = SB QB, and the global complexity XI, Xp, XB is almost equivalent to the actual difficulty data DI, Dp, DB of I picture, P picture, and B picture, respectively (XI
, Xp, XB≈DI, Dp, DB).

目標データ量算出回路264の動作
動作(処理)の概要
目標データ量算出回路264は、GC算出回路262から入力されたグローバルコンプレクシティXI ,Xp ,XB 各ピクチャータイプの実難度データDj を近似し、さらに、VBVバッファの占有量Bn に基づいて各ピクチャータイプのピクチャーそれぞれの目標データ量Tj を算出してレート制御を行う。なお、目標データ量算出回路264が算出した目標データ量Tj は、量子化インデックス生成回路266に対して出力される。
Operation of Target Data Amount Calculation Circuit 264 Overview of Operation (Processing) The target data amount calculation circuit 264 approximates the real difficulty data Dj of each of the global complexity XI, Xp, XB input from the GC calculation circuit 262, and Further, the target data amount Tj of each picture type picture is calculated based on the occupation amount Bn of the VBV buffer to perform rate control. The target data amount Tj calculated by the target data amount calculation circuit 264 is output to the quantization index generation circuit 266.

目標データ量Tj の算出方法
まず、目標データ量算出回路264における目標データ量Tj の基本的な算出方法を説明する。
上述のように、各ピクチャータイプの実難度データDj はそれぞれ、グローバルコンプレクシティXI ,Xp ,XB とほぼ同値である。従って、目標データ量算出回路264は、グローバルコンプレクシティXI ,Xp ,XB から各ピクチャータイプの目標データ量Tj を算出することができる。
なお、上記各関係式において、重み付け係数Kp ,KB は、ピクチャータイプごとに目標データ量Tj に異なった重み付けを行うために導入された係数であり、重み付け係数Kp ,KB の値をそれぞれ大きくすればするほど、Iピクチャーの目標データ量Tj と比較して、PピクチャおよびBピクチャーの目標データ量Tj が少なくなる。例えば、MPEG方式のTM5方式においては、重み付け係数Kp ,KB は固定値であり、それぞれ1.0,1.4(Kp =1.0,KB =1.4、デフォルト値)である。
Calculation Method of Target Data Amount Tj First, a basic calculation method of the target data amount Tj in the target data amount calculation circuit 264 will be described.
As described above, the actual difficulty data Dj of each picture type is almost the same as the global complexity XI, Xp, XB. Therefore, the target data amount calculation circuit 264 can calculate the target data amount Tj for each picture type from the global complexity XI, Xp, XB.
In each of the above relational expressions, the weighting coefficients Kp and KB are coefficients introduced to perform different weighting on the target data amount Tj for each picture type. If the values of the weighting coefficients Kp and KB are increased, respectively. The smaller the target data amount Tj for the I picture, the smaller the target data amount Tj for the P picture and B picture. For example, in the MPEG TM5 system, the weighting coefficients Kp and KB are fixed values, which are 1.0 and 1.4 (Kp = 1.0, KB = 1.4, default values), respectively.

このように、MPEG方式のTM5方式においては、Pピクチャーには、IピクチャーのグローバルコンプレクシティXI に対するPピクチャーのグローバルコンプレクシティXp の比率の通りの目標データ量Tj が与えられ、Bピクチャーには、IピクチャーのグローバルコンプレクシティXI に対するBピクチャーのグローバルコンプレクシティXB の比率よりも意図的に小さい目標データ量Tj が与えられる。   Thus, in the MPEG TM5 system, the P picture is given a target data amount Tj according to the ratio of the global complexity Xp of the P picture to the global complexity XI of the I picture, A target data amount Tj that is intentionally smaller than the ratio of the global complexity XB of the B picture to the global complexity XI of the I picture is given.

レート制御方法
次に、目標データ量算出回路264におけるレート制御方法を説明する。
MPEGのTM5方式のレート制御において、重要な役割を果たすパラメータとしてパラメータRがある。このパラメータRは、MPEG方式において、レート制御の制御単位(例えばGOP)の残りのピクチャーに割り当てることができるデータ量を示す。
Rate Control Method Next, a rate control method in the target data amount calculation circuit 264 will be described.
A parameter R is a parameter that plays an important role in the rate control of the MPEG TM5 system. This parameter R indicates the amount of data that can be allocated to the remaining pictures in a control unit (eg, GOP) for rate control in the MPEG system.

ここで、映像データ圧縮装置1,2(図1〜図3,図5,図6)においては、例えば、GOPの前半のピクチャーの映像が複雑である(実難度データDj およびグローバルコンプレクシティXI ,Xp ,XB 等の値が大きい)場合等に、GOPの前半のピクチャーに多くのデータ量を割り当てると、GOPの後半のピクチャーに対するパラメータRが極端に少ない値になったり、さらには、負数となったりして、GOPの後半のピクチャーに割り当てるべきデータ量が不足してしまうことがある。   Here, in the video data compression apparatuses 1 and 2 (FIGS. 1 to 3, FIG. 5 and FIG. 6), for example, the video of the first half of the GOP is complicated (actual difficulty data Dj and global complexity XI, If a large amount of data is allocated to the first half of the GOP when the values of Xp, XB, etc. are large), the parameter R for the second half of the GOP becomes an extremely small value or becomes a negative number. In some cases, the amount of data to be allocated to the second half of the GOP is insufficient.

このように、映像データ圧縮装置1,2において、パラメータRの値が極端に小さくなったり負数になってしまうことがあるのは、ホストコンピュータ20(図1,図5)が、レート制御の制御単位であるGOPそれぞれのデータ量を一定に保つように、GOPの前半のピクチャーに対して多く割り当てすぎたデータ量を、GOPの後半のピクチャーに対してデータ量を少なく割り当てることにより補償するようにデータ量を割り当てるからである。ホストコンピュータ20において、パラメータRは、このように、GOPといった比較的短い期間におけるデータ量の補償処理に用いられる。   As described above, in the video data compression apparatuses 1 and 2, the value of the parameter R may become extremely small or become a negative number when the host computer 20 (FIGS. 1 and 5) controls the rate control. In order to keep the data amount of each unit GOP constant, the data amount that is excessively allocated to the first half picture of the GOP is compensated by assigning a small data amount to the second half picture of the GOP. This is because the amount of data is allocated. In the host computer 20, the parameter R is thus used for data amount compensation processing in a relatively short period such as GOP.

一方、エンコーダ26の目標データ量算出回路264においては、このような短い制御単位でデータ量を一定にするためのパラメータRのみでレート制御を行うのではなく、VBVバッファの制約条件の範囲内で、長期間におけるデータ量が一定になるように、残りのデータ量を均等に割り当てるパラメータRj ’を制御する。   On the other hand, the target data amount calculation circuit 264 of the encoder 26 does not perform rate control only with the parameter R for making the data amount constant in such a short control unit, but within the range of the constraint condition of the VBV buffer. The parameter Rj ′ for evenly allocating the remaining data amount is controlled so that the data amount in the long term becomes constant.

つまり、目標データ量算出回路264はパラメータRj ’を制御し、非圧縮映像データのある期間に含まれるピクチャーに対して過剰に割り当てデータ量を、データ量を少なく割り当てると圧縮映像データの品質が劣化しそうな期間では補償せず、絵柄が簡単で、少ないデータ量を割り当てても圧縮映像データの品質の劣化が少ない期間で補償するように目標データ量Tj を調節する。
さらに、目標データ量算出回路264は、エンコーダ26が1枚のピクチャーを圧縮符号化するたびに、式3と同様の処理を行ってパラメータRj ’の値を更新する。
That is, the target data amount calculation circuit 264 controls the parameter Rj ′, and the quality of the compressed video data deteriorates when an excessively allocated data amount is allocated to a picture included in a certain period of uncompressed video data and a small data amount is allocated. The target data amount Tj is adjusted so that compensation is made in a period in which the quality of the compressed video data is small even if a small amount of data is allocated, without compensation in such a period.
Furthermore, the target data amount calculation circuit 264 updates the value of the parameter Rj ′ by performing the same processing as in Equation 3 every time the encoder 26 compresses and encodes one picture.

VBVバッファに対する考慮
しかしながら、パラメータRj ’を圧縮映像データのデータ量が多く(データレートが高く)なるように調節する場合、圧縮映像データのデータ量の増加量を予測することが難しく、VBVバッファにアンダーフローが生じる可能性がある。従って、圧縮映像データのデータ量を多くするようにレート制御を行う場合には、未来のVBVバッファの占有量Bn を考慮して、目標データ量算出回路264は、VBVバッファの占有量Bn (圧縮映像データの残りデータ量)が多い場合にのみ、パラメータRj ’の調節を行う。
However, when the parameter Rj ′ is adjusted so that the amount of compressed video data is large (the data rate is high), it is difficult to predict the amount of increase in the amount of compressed video data. Underflow can occur. Therefore, when performing rate control so as to increase the data amount of the compressed video data, the target data amount calculation circuit 264 takes into account the VBV buffer occupation amount Bn (compression) in consideration of the future VBV buffer occupation amount Bn. The parameter Rj ′ is adjusted only when the remaining amount of video data is large.

なお、以上説明したVBVバッファの占有量Bn を考慮したレート制御を実現するために、目標データ量算出回路264は、以下に説明する処理をさらに行う。
つまり、目標データ量算出回路264は、映像データの映像が複雑な部分に多く割り当てるデータ量を、エンコーダ26が出力する圧縮映像データのデータレートではなく、VBVバッファがアンダーフローするまでのデータ量に基づいて求める。
Note that the target data amount calculation circuit 264 further performs the processing described below in order to realize rate control in consideration of the VBV buffer occupation amount Bn described above.
In other words, the target data amount calculation circuit 264 assigns the amount of data allocated to the complex portion of the video data to the data amount until the VBV buffer underflows, not the data rate of the compressed video data output by the encoder 26. Ask based.

また、目標データ量算出回路264は、映像データの映像が複雑な部分に、所定のデータレートよりも多く割り当てるデータ量の合計値(借金額)をパラメータsum-supplement(初期値0)として記憶し、所定数のピクチャーの実難度データDj の値の合計が小さくなった際にパラメータsum-supplementの値を減ずるようにレート制御を行い、非圧縮映像データの圧縮符号化が終了した時点でのパラメータsum-supplementの値が0にごく近い負値になるようにレート制御を行う。ただし、目標データ量算出回路264は、VBVバッファの占有量Bn が少ない場合には、実難度データDj の値にかかわらず、映像データの各ピクチャーの目標データ量Tj の値が小さくなるようにレート制御を行い、アンダーフローの発生を防ぐ。   In addition, the target data amount calculation circuit 264 stores the total value (debt amount) of the data amount allocated to the complicated portion of the video data as the parameter sum-supplement (initial value 0). When the sum of the values of the actual difficulty data Dj of the predetermined number of pictures becomes small, the rate control is performed so that the value of the parameter sum-supplement is decreased, and the parameters at the time when the compression encoding of the uncompressed video data is completed. Rate control is performed so that the sum-supplement value becomes a negative value very close to zero. However, when the VBV buffer occupancy Bn is small, the target data amount calculation circuit 264 performs the rate so that the value of the target data amount Tj of each picture of the video data becomes small regardless of the value of the actual difficulty data Dj. Control and prevent underflow.

目標データ量算出回路264の処理内容のまとめ
以下、さらに、図14および数式を参照して、目標データ量算出回路264による目標データ量Tj を詳細に説明する。
図14は、図13に示した目標データ量算出回路264の処理を示すフローチャート図である。
図14に示すように、ステップ500(S500)において、目標データ量算出回路264は、VBVバッファの占有量Bn をチェックし、VBVバッファに十分な量の圧縮映像データがバッファリングされており、アンダーフローが生じない余裕があるか否かを判断し、余裕がある場合にはS502の処理に進み、余裕がない場合にはS512の処理に進む。
Summary of processing contents of target data amount calculation circuit 264 Hereinafter, the target data amount Tj by the target data amount calculation circuit 264 will be described in detail with reference to FIG. 14 and mathematical expressions.
FIG. 14 is a flowchart showing processing of the target data amount calculation circuit 264 shown in FIG.
As shown in FIG. 14, in step 500 (S500), the target data amount calculation circuit 264 checks the occupation amount Bn of the VBV buffer, and a sufficient amount of compressed video data is buffered in the VBV buffer. It is determined whether there is room for no flow. If there is room, the process proceeds to S502. If there is no room, the process proceeds to S512.

なお、VBVバッファの占有量Bn の判断には、下の式8に示す閾値VBV-R'j-Marginが用いられる。   Note that the threshold VBV-R'j-Margin shown in Equation 8 below is used to determine the occupation amount Bn of the VBV buffer.

Figure 2007053788
Figure 2007053788

なお、式8において、last-I-genbit は、最新のIピクチャーのデータ量であり、VBV-Marginは、目標データ量Tj の計算の際のアンダーフロー対策のための定数であり、frame-bit は1ピクチャー当たりのデータ量である。式8に示したように、閾値VBV-R'j-Marginの算出に最近のIピクチャーのデータ量last-I-genbit を用いることにより、エンコーダ26が次に、データ量が多いIピクチャーの圧縮映像データを生成する場合にも、アンダーフローの発生を、ほぼ、完全に防止することができる。目標データ量算出回路264は、VBVバッファの占有量Bn と閾値VBV-R'j-Marginとを比較することにより、S500の処理においてVBVバッファに余裕があるか否かの判断を行う。   In Equation 8, last-I-genbit is the data amount of the latest I picture, and VBV-Margin is a constant for countermeasures against underflow in calculating the target data amount Tj. Is the amount of data per picture. As shown in Equation 8, by using the latest I-picture data amount last-I-genbit for calculation of the threshold value VBV-R'j-Margin, the encoder 26 then compresses the I-picture with the largest data amount. Even when video data is generated, the occurrence of underflow can be almost completely prevented. The target data amount calculation circuit 264 compares the occupation amount Bn of the VBV buffer with the threshold value VBV-R'j-Margin to determine whether the VBV buffer has a margin in the processing of S500.

また、目標データ量算出回路264は、S500の処理におけるVBVバッファの占有量Bn の判断を、エンコーダ26がピクチャを圧縮符号化するごとに行う必要は必ずしもなく、例えば、エンコーダ26がPピクチャーを生成した直後にのみ行ってもよい。   Further, the target data amount calculation circuit 264 does not necessarily need to determine the VBV buffer occupation amount Bn in the processing of S500 every time the encoder 26 compresses and encodes a picture. For example, the encoder 26 generates a P picture. It may be done only immediately after.

これは、以下の理由による。つまり、エンコーダ26がIピクチャーを生成した直後はVBVバッファの占有量が低くなるが、次にIピクチャーを生成するまでに、通常、占有量が回復するので、エンコーダ26がIピクチャーを生成した直後には、目標データ量算出回路264はS500の処理における判断を行う必要がなく、逆に、エンコーダ26がデータ量が少ないBピクチャーを生成した直後に、目標データ量算出回路264がS500の処理における判断を行うと、VBVバッファがアンダーフローを生じるまでに十分な余裕があると誤って判断し、却ってVBVバッファにアンダーフローを生じさせてしまう可能性が生じるからである。   This is due to the following reason. That is, the occupancy of the VBV buffer decreases immediately after the encoder 26 generates the I picture, but the occupancy usually recovers until the next generation of the I picture. Therefore, immediately after the encoder 26 generates the I picture. Therefore, the target data amount calculation circuit 264 does not need to make a determination in the processing of S500. Conversely, immediately after the encoder 26 generates a B picture with a small amount of data, the target data amount calculation circuit 264 performs the processing in the processing of S500. This is because, when the determination is made, it is erroneously determined that there is enough room for the VBV buffer to underflow, and there is a possibility that the VBV buffer will underflow.

ステップ502(S502)において、目標データ量算出回路264は、下の式9−1に示すN枚のピクチャーのグローバルコンプレクシティXI ,Xp ,XB の総和の値が閾値Th1より大きいか否かを判断する。総和sum-difficultyの値が閾値Th1より大きい場合にはS504の処理に進み、閾値Th1以下である場合にはS508の処理に進む。なお、閾値Th1は、パラメータRj ’の値を大きくして圧縮映像データのデータ量を増やすか、あるいは逆に、パラメータRj ’の値を小さくして圧縮映像データのデータ量を減らすかを定めるために重要である。   In step 502 (S502), the target data amount calculation circuit 264 determines whether or not the total sum of global complexity XI, Xp, XB of the N pictures shown in the following equation 9-1 is larger than the threshold value Th1. To do. If the sum sum-difficulty value is greater than the threshold value Th1, the process proceeds to S504, and if it is equal to or less than the threshold value Th1, the process proceeds to S508. The threshold value Th1 determines whether to increase the data amount of the compressed video data by increasing the value of the parameter Rj ′, or conversely, to decrease the data amount of the compressed video data by decreasing the value of the parameter Rj ′. Is important to.

ステップ504(S504)において、目標データ量算出回路264は、下の式9−2に示すように、パラメータRj ’が閾値(G+Th2)よりも多いか否かを判断する。パラメータRj ’の値が閾値(G+Th2)よりも大きい場合にはS506の処理に進み、閾値(G+Th2)よりも小さい場合にはS516の処理に進む(G= N x bit-rate / picture-rate)。   In step 504 (S504), the target data amount calculation circuit 264 determines whether or not the parameter Rj 'is larger than the threshold value (G + Th2) as shown in the following equation 9-2. When the value of the parameter Rj ′ is larger than the threshold (G + Th2), the process proceeds to S506, and when it is smaller than the threshold (G + Th2), the process proceeds to S516 (G = N × bit-rate / picture-rate). .

Figure 2007053788
Figure 2007053788

ステップ506(S506)において、目標データ量算出回路264は、例えば、下の式10−1により、パラメータRj ’に加算(補給)するデータ量(補給データ量)supplementを算出する。なお、式10−1中のパラメータβ(0<β<1)は、式10−2に示すように定義され、VBVバッファがアンダーフローを生じるまでのデータ量を判断するためのパラメータであり、パラメータβの値が大きく、VBVバッファのアンダーフローに対する余裕が大きければ大きいほどほど、補給データ量supplementの値は大きくなる。   In step 506 (S506), the target data amount calculation circuit 264 calculates a data amount (supplemented data amount) supplement to be added (supplemented) to the parameter Rj 'by the following equation 10-1. The parameter β (0 <β <1) in Expression 10-1 is defined as shown in Expression 10-2, and is a parameter for determining the amount of data until the VBV buffer underflows. The larger the value of the parameter β and the larger the margin for underflow of the VBV buffer, the larger the value of the supplemental data amount supplement.

Figure 2007053788
Figure 2007053788

また、式10−1中の閾値Th3は、補給データ量supplementの値を決定するための定数であり、MAX-supplementは、補給データ量supplementを制限するための制限値である。   In addition, the threshold value Th3 in Expression 10-1 is a constant for determining the value of the supplemental data amount supplement, and MAX-supplement is a limit value for limiting the supplemental data amount supplement.

総和sum-difficultyの値が(Th1+Th3)よりも大きくなると、式10−1の右辺の分数項の値が1より大きくなってしまうので、下の式11に示すように、補給データ量supplementの値を補正する。   When the sum sum-difficulty value becomes larger than (Th1 + Th3), the value of the fractional term on the right side of Equation 10-1 becomes larger than 1, so the value of the supplemental data amount supplement as shown in Equation 11 below. Correct.

Figure 2007053788
Figure 2007053788

ステップ508(S508)において、目標データ量算出回路264は、パラメータsum-supplementが正値であり、映像データの絵柄が複雑な部分に補給した補給データ量supplementが、完全には補償されていない(借金がある)状態にあるか否かを判断する。借金がある場合にはS510の処理に進み、借金がない場合にはS512の処理に進む。   In step 508 (S508), the target data amount calculation circuit 264 has a parameter sum-supplement having a positive value, and the replenishment data amount supplement that has been replenished to a complex part of the image of the video data is not completely compensated ( Determine if you have debt. If there is a debt, the process proceeds to S510, and if there is no debt, the process proceeds to S512.

ステップ510(S510)において、目標データ量算出回路264は、映像データの絵柄が複雑な部分に補給した補給データ量supplementを補償するために、式10−1のパラメータβの値を1とし、下の式12に示す負値の補給データ量supplementを算出する。負値の補給データ量supplementをパラメータRj ’に加算する(S514)ことにより、圧縮映像データのデータ量が減少してパラメータsum-supplementを0に近づけること(借金の返済)ができる。   In step 510 (S510), the target data amount calculation circuit 264 sets the value of the parameter β in the equation 10-1 to 1 in order to compensate for the supplement data amount supplement supplied to the complex part of the picture of the video data. The negative supply data amount supplement shown in Equation 12 is calculated. By adding the negative supply data amount supplement to the parameter Rj '(S514), the data amount of the compressed video data is reduced, and the parameter sum-supplement can be brought close to 0 (repayment of debt).

Figure 2007053788
Figure 2007053788

ステップ512(S512)において、目標データ量算出回路264は、VBVバッファにアンダーフローが生じる可能性があると判断し、下の式13により負値の補給データ量supplementを算出する。負値の補給データ量supplementをパラメータRj ’に加算する(S514)ことにより、圧縮映像データのデータ量が減少し、VBVバッファのアンダーフローが防止される。   In step 512 (S512), the target data amount calculation circuit 264 determines that there is a possibility of underflow in the VBV buffer, and calculates a negative supply data amount supplement according to Equation 13 below. By adding the negative supplemental data amount supplement to the parameter Rj '(S514), the data amount of the compressed video data is reduced and underflow of the VBV buffer is prevented.

Figure 2007053788
Figure 2007053788

ステップ514(S514)において、目標データ量算出回路264は、下の式14,式15によりパラメータRj ’,sum-supplementを更新する。   In step 514 (S514), the target data amount calculation circuit 264 updates the parameters Rj ′ and sum-supplement according to the following equations 14 and 15.

Figure 2007053788
Figure 2007053788

Figure 2007053788
Figure 2007053788

ステップ516(S516)において、目標データ量算出回路264は、下式16に示すように目標データ量Tj を算出し、量子化インデックス生成回路266に対して出力する。   In step 516 (S516), the target data amount calculation circuit 264 calculates the target data amount Tj as shown in the following equation 16 and outputs the target data amount Tj to the quantization index generation circuit 266.

Figure 2007053788
Figure 2007053788

ただし、式16において、NI ,Np ,NB はそれぞれ、1GOP中に現れるIピクチャー、PピクチャーおよびBピクチャーの数を示し、1GOPの構成がN=1,M=3である場合には、NI =1,Np =4,NB =10である。   In Equation 16, NI, Np, and NB indicate the number of I-pictures, P-pictures, and B-pictures that appear in one GOP, respectively. When the configuration of 1GOP is N = 1 and M = 3, NI = 1, Np = 4, NB = 10.

ステップ518(S518)において、量子化インデックス生成回路266は、目標データ量算出回路264が生成した目標データ量Tj に基づいて量子化インデックスQINDを生成し、量子化回路168に対して出力する。   In step 518 (S518), the quantization index generation circuit 266 generates a quantization index QIND based on the target data amount Tj generated by the target data amount calculation circuit 264, and outputs it to the quantization circuit 168.

ステップ520(S520)において、エンコーダ26の量子化制御部260以外の構成部分は、量子化インデックス生成回路266が生成した量子化インデックスQINDに基づいて非圧縮映像データを圧縮符号化する。
ステップ522(S522)において、目標データ量算出回路264は、変数jをインクリメントする。
In step 520 (S520), the components other than the quantization control unit 260 of the encoder 26 compress and encode the uncompressed video data based on the quantization index QIND generated by the quantization index generation circuit 266.
In step 522 (S522), the target data amount calculation circuit 264 increments the variable j.

量子化インデックス生成回路266の動作
以下、再び図13を参照して、量子化インデックス生成回路266の動作(処理)を説明する。
量子化インデックス生成回路266は、例えば、MPEG方式のTM5の第2段階および第3段階(ステップ2,ステップ3)と同様に、目標データ量算出回路264から入力された目標データ量Tj 、および、GC算出回路262から入力されたグローバルコンプレクシティXI ,Xp ,XB から量子化インデックスQINDを生成し、量子化回路168に対して出力する。
Operation of Quantization Index Generation Circuit 266 Hereinafter, the operation (processing) of the quantization index generation circuit 266 will be described with reference to FIG. 13 again.
The quantization index generation circuit 266, for example, similarly to the second stage and the third stage (step 2 and step 3) of MPEG TM5, the target data amount Tj input from the target data amount calculation circuit 264, and A quantization index QIND is generated from the global complexity XI, Xp, XB input from the GC calculation circuit 262 and output to the quantization circuit 168.

なお、量子化インデックスは、量子化回路168において、量子化処理の単位となるマクロブロックごとに変化する量子化値Qj の組み合わせを示すインデックスとして用いられるデータであって、量子化値Qj と等価である。つまり、量子化インデックス生成回路266から量子化インデックスを受けた量子化回路168は、受けた量子化インデックスが示す量子化値Qj の組み合わせに変換し、DCT回路166から入力される映像データを量子化する。   The quantization index is data used as an index indicating a combination of quantization values Qj that change for each macroblock that is a unit of quantization processing in the quantization circuit 168, and is equivalent to the quantization value Qj. is there. That is, the quantization circuit 168 that receives the quantization index from the quantization index generation circuit 266 converts the quantization index Qj indicated by the received quantization index into a combination, and quantizes the video data input from the DCT circuit 166. To do.

以下、エンコーダ26(図13)の動作を説明する。
動き検出器14は、第1の実施形態においてと同様に、動きベクトルの生成等の処理を行う。
エンコーダ制御部22は、第1の実施形態と同様に、ピクチャーの並び替え処理等を行う。
Hereinafter, the operation of the encoder 26 (FIG. 13) will be described.
The motion detector 14 performs processing such as generation of a motion vector, as in the first embodiment.
The encoder control unit 22 performs a picture rearrangement process and the like as in the first embodiment.

エンコーダ26(図13)が、1ピクチャー分の圧縮符号化を終了するたびに、量子化制御部260のGC算出回路262は、量子化インデックス生成回路266の量子化インデックスから量子化値Qj の平均値を算出し、量子化値Qj の平均値および圧縮映像データのデータ量Sj からグローバルコンプレクシティXI ,Xp ,XB を算出する。
目標データ量算出回路264は、圧縮映像データの目標データ量算出回路264は、図14を参照して説明したように、最も新しく生成された各ピクチャータイプの目標データ量Tj を算出する。
Each time the encoder 26 (FIG. 13) finishes compression encoding for one picture, the GC calculation circuit 262 of the quantization control unit 260 calculates the average of the quantization values Qj from the quantization index of the quantization index generation circuit 266. A value is calculated, and global complexity XI, Xp, XB is calculated from the average value of the quantized value Qj and the data amount Sj of the compressed video data.
The target data amount calculation circuit 264 calculates the target data amount Tj of each picture type generated most recently, as described with reference to FIG. 14.

量子化インデックス生成回路266は、算出された目標データ量Tj およびグローバルコンプレクシティXI ,Xp ,XB に基づいて、量子化インデックスを算出し、エンコーダ26の量子化回路168に設定する。
DCT回路166は、第1の実施形態および第2の実施形態においてと同様に、次のピクチャーに対してDCT処理を行う。
The quantization index generation circuit 266 calculates a quantization index based on the calculated target data amount Tj and global complexity XI, Xp, XB, and sets the quantization index in the quantization circuit 168 of the encoder 26.
The DCT circuit 166 performs DCT processing on the next picture in the same manner as in the first and second embodiments.

量子化回路168は、DCT処理された映像データを、設定された量子化インデックスを量子化値Qj に変換し、得られた量子化値Qj により量子化処理を行う。
可変長符号化回路170は、第1の実施形態および第2の実施形態においてと同様に、変長符号化を行い、ほぼ、目標データ量Tj に近いデータ量の圧縮映像データを生成し、バッファメモリ182を介して出力する。
The quantization circuit 168 converts the set quantization index into a quantized value Qj for the DCT-processed video data, and performs a quantization process using the obtained quantized value Qj.
The variable-length encoding circuit 170 performs variable-length encoding in the same manner as in the first and second embodiments, generates compressed video data having a data amount that is substantially close to the target data amount Tj, and a buffer. The data is output via the memory 182.

なお、第3の実施形態として示したエンコーダ26の処理の内容は、第1の実施形態および第2の実施形態に示した映像データ圧縮装置1,2(図1〜図3,図5,図6)にも応用可能である。
また、エンコーダ26の目標データ量算出回路264は、実難度データDj を用いて目標データ量Tj を算出するように構成しても、グローバルコンプレクシティXI ,Xp ,XB を用いて目標データ量Tj を算出してもよい。
The contents of the processing of the encoder 26 shown as the third embodiment are the same as the video data compression apparatuses 1 and 2 shown in the first embodiment and the second embodiment (FIGS. 1 to 3, FIG. 5, FIG. It is also applicable to 6).
Further, even if the target data amount calculation circuit 264 of the encoder 26 is configured to calculate the target data amount Tj using the actual difficulty data Dj, the target data amount Tj is calculated using the global complexity XI, Xp, XB. It may be calculated.

また、エンコーダ26において量子化制御部260が行った処理を、映像データ圧縮装置1,2(図1〜図3,図5,図6)においてホストコンピュータ20が行うことも可能である。
また、第3の実施形態に示した各パラメータを定義する式は例示であり、エンコーダ26の構成・用途に合わせて、各式を変更することができる。
また、第3の実施形態に示したエンコーダ26に対しては、第1の実施形態および第2の実施形態に示した変形が可能である。
In addition, the processing performed by the quantization control unit 260 in the encoder 26 can be performed by the host computer 20 in the video data compression apparatuses 1 and 2 (FIGS. 1 to 3, 5 and 6).
The formulas defining the parameters shown in the third embodiment are examples, and the formulas can be changed according to the configuration and application of the encoder 26.
Further, the encoder 26 shown in the third embodiment can be modified as shown in the first embodiment and the second embodiment.

図15は、MPEGのMP@ML方式により、エンコーダ26(図13)が、圧縮映像データのGOPのデータ量をほぼ一定に保って固定長符号化を行った場合のVBVバッファの占有量Bn の経時的な変化の評価結果を示す図である。なお、図15においては、縦軸はVBVバッファにバッファリングされている圧縮映像データのデータ量を示し、横軸は時間経過を示す。   FIG. 15 shows the occupancy amount Bn of the VBV buffer when the encoder 26 (FIG. 13) performs fixed-length encoding with the GOP data amount of the compressed video data kept substantially constant according to the MPEG MP @ ML method. It is a figure which shows the evaluation result of a time-dependent change. In FIG. 15, the vertical axis indicates the amount of compressed video data buffered in the VBV buffer, and the horizontal axis indicates time.

以上説明したエンコーダ26により圧縮映像データのGOPのデータ量をほぼ一定に保って固定長符号化を行うと、VBVバッファの占有量Bn の占有量Bn
は、図15に示すように大きな範囲で変化し、図12に示した映像データ圧縮装置1,2(図1〜図3,図5,図6)を圧縮映像データを生成した場合に比べて、VBVバッファが要求する制約条件の範囲内でVBVバッファを有効に利用していることが分かる。
また、エンコーダ26によれば、非圧縮映像データの部分ごとに、絵柄に応じたデータ量を割り当てることにより、圧縮映像データの品質を全体として向上させることができる。
When the encoder 26 described above performs fixed-length encoding while keeping the GOP data amount of the compressed video data substantially constant, the occupation amount Bn of the VBV buffer occupation amount Bn is obtained.
15 changes in a large range as shown in FIG. 15, compared with the case where the video data compression apparatuses 1 and 2 (FIGS. 1 to 3, 3, 5 and 6) shown in FIG. 12 generate compressed video data. It can be seen that the VBV buffer is effectively used within the range of the constraints required by the VBV buffer.
Also, according to the encoder 26, the quality of the compressed video data can be improved as a whole by allocating a data amount corresponding to the pattern for each portion of the uncompressed video data.

第4実施形態
以下、本発明の第4の実施形態として、フィードフォワードレート制御方式を説明する。フィードフォワードレート制御方式は、VBVバッファが要求する制約条件の範囲内でVBVバッファのバッファリング容量を有効に利用し、非圧縮映像データの部分ごとに、絵柄に応じたデータ量を割り当てることにより、圧縮映像データの品質を全体として向上させることを目的とする。
Fourth Embodiment Hereinafter, a feedforward rate control system will be described as a fourth embodiment of the present invention. The feed-forward rate control method effectively uses the buffering capacity of the VBV buffer within the range of constraints required by the VBV buffer, and assigns a data amount corresponding to the design for each portion of the uncompressed video data, The object is to improve the quality of compressed video data as a whole.

図16は、第4の実施形態における本発明に係る映像データ圧縮装置4の構成を示す図である。
図17は、図16に示したエンコーダ28の構成を示す図である。
図18は、図17に示した量子化制御部280の構成を示す図である。
なお、図16〜図18においては、映像データ圧縮装置4の構成部分の内、図1〜図3,図5,図6,図13に示した映像データ圧縮装置1〜2およびエンコーダ26の構成部分と同一のものには同一の符号を付してある。
FIG. 16 is a diagram showing the configuration of the video data compression apparatus 4 according to the present invention in the fourth embodiment.
FIG. 17 is a diagram showing a configuration of the encoder 28 shown in FIG.
18 is a diagram illustrating a configuration of the quantization control unit 280 illustrated in FIG.
16 to 18, the configuration of the video data compression apparatuses 1 and 2 and the encoder 26 shown in FIGS. 1 to 3, 5, 6, and 13 among the components of the video data compression apparatus 4. The same reference numerals are given to the same parts.

図16に示すように、映像データ圧縮装置4は、映像データ圧縮装置2,3(図5,図6,図13)のエンコーダ18を、エンコーダ28で置換した構成を採る。
また、図17に示すように、エンコーダ28は、量子化制御回路180を量子化制御部280で置換した構成を採り、図18に示すように、量子化制御部280は、実難度データ(Dj )算出回路282、目標データ量(Tj )算出回路284、パラメータ(Rj ’)算出回路286および量子化インデックス生成回路288から構成される。
As shown in FIG. 16, the video data compression apparatus 4 employs a configuration in which the encoder 18 of the video data compression apparatuses 2 and 3 (FIGS. 5, 6, and 13) is replaced with an encoder 28.
Also, as shown in FIG. 17, the encoder 28 employs a configuration in which the quantization control circuit 180 is replaced with a quantization control unit 280. As shown in FIG. 18, the quantization control unit 280 receives the actual difficulty data (Dj ) A calculation circuit 282, a target data amount (Tj) calculation circuit 284, a parameter (Rj ') calculation circuit 286, and a quantization index generation circuit 288.

量子化制御部280は、エンコーダ26(図13)においてと同様に、ホストコンピュータ20によらずに、指標データ〔統計量;第2の実施形態において説明したフラットネス(図9,図10)、イントラAC(図11)、アクティビティ(式7)およびME残差(図7,図8)〕、および、VBVバッファにおける圧縮映像データの占有量Bn に基づいて目標データ量Tj および量子化値Qj (量子化インデックスQIND)を算出可能に構成されている。   As in the encoder 26 (FIG. 13), the quantization control unit 280 does not depend on the host computer 20, and the index data [statistics; flatness described in the second embodiment (FIGS. 9 and 10), Intra AC (FIG. 11), activity (formula 7) and ME residual (FIGS. 7 and 8)], and the compressed video data occupation amount Bn in the VBV buffer, the target data amount Tj and the quantized value Qj ( The quantization index QIND) can be calculated.

映像データ圧縮装置4は、これらの構成部分により、1つのエンコーダのみにより圧縮映像データのデータ量により量子化回路168の量子化処理に対するフィードフォワード制御を行い、非圧縮映像データの部分ごとに絵柄に応じたデータ量を割り当てて圧縮映像データを生成し、圧縮映像データの品質を向上させる。   The video data compression apparatus 4 performs feedforward control for the quantization processing of the quantization circuit 168 based on the data amount of the compressed video data by only one encoder by using these components, and the image data is compressed for each portion of the uncompressed video data. Corresponding data amount is allocated to generate compressed video data to improve the quality of the compressed video data.

映像データ圧縮装置4の各構成部分の動作
以下、映像データ圧縮装置4の各構成部分の内、映像データ圧縮装置1,2,3(図1〜図3,図5,図6,図13)と異なる部分(量子化制御部280)の動作を説明する。
実難度データ算出回路282算出回路
実難度データ算出回路282は、動き検出器14から入力される指標データ(ME残差による近似により、式5,式6に示したように、PピクチャーおよびBピクチャーの実難度データDj を算出し、また、エンコーダ制御部22の統計量算出回路224から入力される指標データ(フラットネス、イントラACおよびアクティビティ)による近似により、式5,式6と同様にIピクチャーの実難度データDj を算出し、パラメータ算出回路286およびパラメータ算出回路286に対して出力する。
Operation of Each Component of Video Data Compressor 4 In the following, video data compressor 1, 2, 3 (FIGS. 1 to 3, 5, 5, 6 and 13) of each component of video data compressor 4 The operation of the different part (quantization control unit 280) will be described.
Actual difficulty level data calculation circuit 282 calculation circuit The actual difficulty level data calculation circuit 282 is an index data input from the motion detector 14 (by approximation by ME residual, as shown in Equations 5 and 6, P picture and B picture The actual difficulty level data Dj is calculated and approximated by the index data (flatness, intra AC, and activity) input from the statistic calculation circuit 224 of the encoder control unit 22 to obtain the I picture as in Expressions 5 and 6. The actual difficulty level data Dj is calculated and output to the parameter calculation circuit 286 and the parameter calculation circuit 286.

目標データ量算出回路284の動作
目標データ量算出回路284は、エンコーダ26(図13)の目標データ量算出回路264と同様に、第1の実施形態において式1に示した処理を行い、実難度データ算出回路282から入力された実難度データDj 、および、パラメータ算出回路286から入力されるパラメータRj ’に基づいて、各ピクチャータイプのピクチャーそれぞれの目標データ量Tj を算出してレート制御を行う。
Operation of Target Data Amount Calculation Circuit 284 The target data amount calculation circuit 284 performs the processing shown in Expression 1 in the first embodiment, as with the target data amount calculation circuit 264 of the encoder 26 (FIG. 13), and the actual difficulty level. Based on the actual difficulty data Dj input from the data calculation circuit 282 and the parameter Rj ′ input from the parameter calculation circuit 286, the target data amount Tj of each picture of each picture type is calculated to perform rate control.

パラメータ算出回路286の動作
パラメータ算出回路286は、エンコーダ26の目標データ量算出回路264(図13)と同様に、式8〜式15および図14に示した処理を行ってパラメータRj ’を調節し、更新する。ただし、パラメータ算出回路286は、図14に示したS516の処理において、式16の代わりに式1により、目標データ量Tj を算出し、量子化インデックス生成回路288に対して出力する。
Operation of Parameter Calculation Circuit 286 The parameter calculation circuit 286 adjusts the parameter Rj ′ by performing the processing shown in Expressions 8 to 15 and FIG. 14 in the same manner as the target data amount calculation circuit 264 (FIG. 13) of the encoder 26. ,Update. However, the parameter calculation circuit 286 calculates the target data amount Tj according to Equation 1 instead of Equation 16 in the processing of S516 shown in FIG. 14 and outputs it to the quantization index generation circuit 288.

量子化インデックス生成回路288の動作
量子化インデックス生成回路288は、エンコーダ26の量子化インデックス生成回路266(図13)と同様に、目標データ量算出回路284から入力された目標データ量Tj に基づいて量子化インデックスQINDを生成し、量子化回路168に対して出力する。
Operation of Quantization Index Generation Circuit 288 The quantization index generation circuit 288 is based on the target data amount Tj input from the target data amount calculation circuit 284, similarly to the quantization index generation circuit 266 (FIG. 13) of the encoder 26. A quantization index QIND is generated and output to the quantization circuit 168.

以下、映像データ圧縮装置4の動作を説明する。
量子化制御部280の実難度データ算出回路282は、動き検出器14およびエンコーダ制御部22から入力される指標データ(ME残差、フラットネス、イントラACおよびアクティビティ)から、式5,式6に示したように、実難度データDj を算出する。
Hereinafter, the operation of the video data compression apparatus 4 will be described.
The actual difficulty level data calculation circuit 282 of the quantization control unit 280 uses the index data (ME residual, flatness, intra AC, and activity) input from the motion detector 14 and the encoder control unit 22 to formulas 5 and 6. As shown, the actual difficulty data Dj is calculated.

パラメータ算出回路286は、式8〜式15に示したように、VBVバッファの占有量および映像データの絵柄の複雑さに応じてパラメータRj ’を調節し、レート制御を行う。
目標データ量算出回路284は、パラメータ算出回路286が調節したパラメータRj ’を、式1に代入し、目標データ量Tj を算出する。
As shown in Expressions 8 to 15, the parameter calculation circuit 286 adjusts the parameter Rj ′ in accordance with the occupation amount of the VBV buffer and the complexity of the picture of the video data, and performs rate control.
The target data amount calculation circuit 284 calculates the target data amount Tj by substituting the parameter Rj ′ adjusted by the parameter calculation circuit 286 into Equation 1.

量子化インデックス生成回路288は、算出された目標データ量Tj から量子化インデックスQINDを算出する。
エンコーダ28の量子化制御部280以外の部分は、パラメータ算出回路286が算出した量子化インデックスQINDを用いて非圧縮映像データを圧縮符号化する。
The quantization index generation circuit 288 calculates a quantization index QIND from the calculated target data amount Tj.
The parts other than the quantization control unit 280 of the encoder 28 compress and encode the uncompressed video data using the quantization index QIND calculated by the parameter calculation circuit 286.

なお、第4の実施形態として示した映像データ圧縮装置4の処理の内容は、第1の実施形態〜第3の実施形態に示した映像データ圧縮装置1,2(図1〜図3,図5,図6)にも応用可能である。
また、映像データ圧縮装置4において量子化制御部280が行った処理を、映像データ圧縮装置1,2(図1〜図3,図5,図6)においてホストコンピュータ20が行うことも可能である。
また、第4の実施形態に示した映像データ圧縮装置4に対しても、第1の実施形態〜第3の実施形態に示した変形が可能である。
The contents of the processing of the video data compression device 4 shown as the fourth embodiment are the same as those of the video data compression devices 1 and 2 shown in the first to third embodiments (FIGS. 1 to 3 and FIG. 3). 5 and FIG. 6).
Further, the processing performed by the quantization control unit 280 in the video data compression apparatus 4 can be performed by the host computer 20 in the video data compression apparatuses 1 and 2 (FIGS. 1 to 3, 5 and 6). .
Also, the video data compression apparatus 4 shown in the fourth embodiment can be modified as shown in the first to third embodiments.

第5実施形態
以下、本発明の第5の実施形態として、第3の実施形態に示したエンコーダ26の動作の変形例を説明する。
ここまで、第1の実施形態において簡易2パスエンコード方式、第2の実施形態においてFFRC方式を説明し、さらに、第3の実施形態および第4の実施形態において、VBVバッファの占有量に応じて圧縮映像データのデータ量を調節するフィードバックレート制御方式およびフィードフォワードレート制御方式を説明した。
Fifth Embodiment Hereinafter, a modified example of the operation of the encoder 26 shown in the third embodiment will be described as a fifth embodiment of the present invention.
Up to this point, the simple two-pass encoding method is described in the first embodiment, and the FFRC method is described in the second embodiment. Furthermore, in the third and fourth embodiments, the VBV buffer occupancy is increased. A feedback rate control method and a feed forward rate control method for adjusting the data amount of compressed video data have been described.

MPEG方式のTM5はパラメータRを、第1の実施形態〜第4の実施形態に示した各方式はパラメータRj ’(式1等)を用いて目標データ量Tj を算出する。これらの各方式により、非圧縮映像データの非常に映像の絵柄が難しい(符号化難度が高い)部分を、低いデータレートの圧縮映像データに圧縮符号化しようとする場合、いかに量子化値Qj (量子化インデックスQIND)の値を大きくして圧縮率を上げ、データ量を少なくしようとしても、実際に生成した圧縮映像データのデータ量が目標データ量Tj を上回り、パラメータR,Rj ’の値が急速に減少し、レート制御の単位(例えばGOP)の最後の方のピクチャーでは、パラメータR,Rj ’の値が0以下になってしまうことがある。   The TM 5 of the MPEG method calculates the target data amount Tj using the parameter R, and each method shown in the first to fourth embodiments uses the parameter Rj ′ (Equation 1 or the like). When each of these methods compresses and encodes a portion of uncompressed video data that has a very difficult picture pattern (high coding difficulty) into compressed video data having a low data rate, the quantization value Qj ( Even if an attempt is made to increase the compression ratio by increasing the value of the quantization index QIND) and reduce the data amount, the data amount of the actually generated compressed video data exceeds the target data amount Tj, and the values of the parameters R and Rj ′ are The value decreases rapidly, and the values of the parameters R and Rj ′ may become 0 or less in the last picture of the rate control unit (for example, GOP).

例えば、MPEGのTM5においては、パラメータRの値が0以下になると、各ピクチャーには最低のデータ量(frame-bit/8 ;但し、frame-bit は圧縮映像データの所望の1ピクチャー当たりのデータレート)が割り当てられることになる。このように、最低のデータ量が割り当てられたピクチャーを、所望のデータレートの1/8という低いデータレートの圧縮映像データに圧縮符号化すると、かかる部分から得られる圧縮映像データの品質は顕著に低下してしまう。   For example, in the TM5 of MPEG, when the value of the parameter R becomes 0 or less, each picture has the minimum amount of data (frame-bit / 8; where frame-bit is the data per desired picture of compressed video data. Rate) will be assigned. As described above, when a picture to which the minimum amount of data is allocated is compressed and encoded into compressed video data having a data rate as low as 1/8 of a desired data rate, the quality of the compressed video data obtained from such a portion becomes remarkable. It will decline.

また、例えば、映像の絵柄が難しい非圧縮映像データの圧縮符号化処理を長い間、続けると、パラメータR,Rj ’の値が非常に小さくなり、非圧縮映像データの映像の絵柄が簡単になった後も、しばらくの間、パラメータR,Rj ’の値がある程度大きな正値に回復せず、パラメータR,Rj ’の値が回復するまでの間ずっと、最低データ量が各GOPに割り当てられてしまい、圧縮映像データの歪みが多くなってしまう。
一方、パラメータRj ’は、本来、FIFOメモリ160の遅延時間に対応するL枚のピクチャーに割り当てるデータ量の平均値であるため、その値は、(frame-bit ×L)から大きく外れることはない。
In addition, for example, if the compression encoding process of uncompressed video data, which is difficult to picture, is continued for a long time, the values of the parameters R and Rj ′ become very small, and the picture of uncompressed video data becomes simple. After that, the values of the parameters R and Rj ′ do not recover to a large positive value for a while, and the minimum amount of data is allocated to each GOP until the values of the parameters R and Rj ′ recover. As a result, the distortion of the compressed video data increases.
On the other hand, the parameter Rj ′ is originally an average value of the data amount allocated to the L pictures corresponding to the delay time of the FIFO memory 160, and therefore the value does not deviate greatly from (frame-bit × L). .

本発明の第5の実施形態は、上述した問題点に鑑みてなされたものであり、非圧縮映像データの映像の絵柄が複雑で(実難度データDj の値が大きく)、目標データ量Tj に対して、実際に生成される圧縮映像データのデータ量Sj の値が多い場合であっても、圧縮映像データの品質を高く保つことができ、しかも、映像が複雑な絵柄から簡単な絵柄に変化した場合のパラメータRj ’の値が速やかに回復可能であることを目的とし、第3の実施形態に示したエンコーダ26の量子化制御部260の目標データ量算出回路264(図13)の処理内容を変更したものである。   The fifth embodiment of the present invention has been made in view of the above-described problems. The image pattern of uncompressed video data is complicated (the value of the actual difficulty data Dj is large), and the target data amount Tj is set. On the other hand, even if the amount of compressed video data Sj actually generated is large, the quality of the compressed video data can be kept high, and the video changes from a complex picture to a simple picture. The processing contents of the target data amount calculation circuit 264 (FIG. 13) of the quantization control unit 260 of the encoder 26 shown in the third embodiment for the purpose of promptly recovering the value of the parameter Rj ′ Is a change.

第5の実施形態において、エンコーダ26は、第3の実施形態においてと同様に、VBVバッファの占有量Bn およびグローバルコンプレクシティXI ,Xp
,XB に基づいて目標データ量Tj をフィードバック制御し、さらに、パラメータRj ’が所定の下限値以下になることを制限することにより、第3の実施形態におけるレート制御と同様な効果を得るとともに、圧縮映像データの品質の著しい低下を防ぐ。
In the fifth embodiment, as in the third embodiment, the encoder 26 uses the VBV buffer occupancy Bn and the global complexity XI, Xp.
, XB based on feedback control of the target data amount Tj, and further limiting the parameter Rj ′ to be equal to or lower than a predetermined lower limit value, thereby obtaining the same effect as the rate control in the third embodiment, Prevents significant degradation of compressed video data quality.

目標データ量算出回路264の動作
以下、エンコーダ26の各構成部分の内、映像データ圧縮装置1,2およびエンコーダ26(図1〜図3,図5,図6,図13)と処理内容が異なる目標データ量算出回路264の動作(処理内容)を説明する。
目標データ量算出回路264は、第3の実施形態においてと同様に、GC算出回路262から入力されたグローバルコンプレクシティXI ,Xp ,XB 各ピクチャータイプの実難度データDj を近似し、さらに、VBVバッファの占有量Bn に基づいて各ピクチャータイプのピクチャーそれぞれの目標データ量Tj を算出してレート制御を行う。
Operation of Target Data Amount Calculation Circuit 264 The processing contents are different from those of the video data compression apparatuses 1 and 2 and the encoder 26 (FIGS. 1 to 3, 5, 6, and 13) among the components of the encoder 26. The operation (processing contents) of the target data amount calculation circuit 264 will be described.
As in the third embodiment, the target data amount calculation circuit 264 approximates the global difficulty data Dj of each of the global complexity XI, Xp, and XB input from the GC calculation circuit 262, and further, a VBV buffer. Based on the occupation amount Bn, the target data amount Tj of each picture of each picture type is calculated to perform rate control.

レート制御方法
目標データ量算出回路264は、第3の実施形態においてと同様に、VBVバッファの占有量を考慮してパラメータRj ’を調節し、パラメータRj ’に、グローバルコンプレクシティXI ,Xp ,XB 等から算出される乗数を乗算して目標データ量Tj を調節する。
但し、第3の実施形態においてと異なり、第5の実施形態においては、目標データ量算出回路264は、パラメータRj ’に対して下限値Rmin を設定し、第3の実施形態においてと同様に算出したパラメータRj ’が、下限値Rmin 以下〔Rj ’<Rmin 〕になった場合に〔Rj ’=Rmin 〕とし、パラメータRj ’が下限値Rmin 以下にならないように制限する。下限値Rmin としては、例えば、〔Rmin =frame-bit ×L×3/4〕あるいは〔Rmin =frame-bit ×L×1/4〕といった値が用いられる。
Rate Control Method The target data amount calculation circuit 264 adjusts the parameter Rj ′ in consideration of the VBV buffer occupancy as in the third embodiment, and sets the global complexity XI, Xp, XB to the parameter Rj ′. The target data amount Tj is adjusted by multiplying the multiplier calculated from the above.
However, unlike in the third embodiment, in the fifth embodiment, the target data amount calculation circuit 264 sets a lower limit value Rmin for the parameter Rj ′ and calculates in the same manner as in the third embodiment. When the measured parameter Rj ′ is lower than the lower limit value Rmin [Rj ′ <Rmin], [Rj ′ = Rmin] is set, and the parameter Rj ′ is restricted so as not to be lower than the lower limit value Rmin. As the lower limit value Rmin, for example, [Rmin = frame-bit × L × 3/4] or [Rmin = frame-bit × L × 1/4] is used.

第1の実施形態において式3に示したように、第j番目のピクチャーのデータ量がSj であり、第j+L番目のピクチャーのデータ量がSj+L であり、ピクチャータイプに応じてパラメータRj ’に加算されるデータ量がFj+L である場合には、次のパラメータRj+1 ’の値は、(Rj ’−Sj +Fj+L )〔Rj+1 ’=Rj ’−Sj +Fj+L 〕となる。しかしながら、次のパラメータRj+1 ’(=Rj ’−Sj +Fj+L )もまた下限値Rmin 以下〔Rj+1 ’<Rmin 〕となる可能性がある。この場合には、次のパラメータRj+1 ’を、下式17に示すように下限値Rmin に制限する。   As shown in Expression 3 in the first embodiment, the data amount of the j-th picture is Sj, the data amount of the j + L-th picture is Sj + L, and the parameter Rj ′ depends on the picture type. Is Fj + L, the value of the next parameter Rj + 1 'is (Rj'-Sj + Fj + L) [Rj + 1' = Rj'-Sj + Fj + L] It becomes. However, the next parameter Rj + 1 '(= Rj'-Sj + Fj + L) may also be less than the lower limit value Rmin [Rj + 1' <Rmin]. In this case, the next parameter Rj + 1 'is limited to the lower limit value Rmin as shown in the following equation 17.

Figure 2007053788
Figure 2007053788

また、目標データ量算出回路264は、第3の実施形態においてと同様に、映像データの映像が複雑な部分に多く割り当てるデータ量の合計値(借金額)をパラメータsum-supplementとして記憶する。従って、パラメータRj ’の値を上述のように下限値Rmin に制限しない場合には、式15に示したようにパラメータsum-supplementの更新を行い、パラメータRj ’の値を下限値Rmin に制限した場合には、下式18に示すように補給データ量supplementを累加算してパラメータsum-supplementの更新を行う。   Further, the target data amount calculation circuit 264 stores, as the parameter sum-supplement, the total value (debt amount) of the data amount that is largely allocated to the portion where the video of the video data is complex, as in the third embodiment. Accordingly, when the value of the parameter Rj ′ is not limited to the lower limit value Rmin as described above, the parameter sum-supplement is updated as shown in Equation 15 to limit the value of the parameter Rj ′ to the lower limit value Rmin. In this case, the parameter sum-supplement is updated by accumulating the supplementary data amount supplement as shown in the following equation (18).

Figure 2007053788
Figure 2007053788

目標データ量算出回路264の処理内容のまとめ
以下、さらに、図19を参照して、第5の実施形態における目標データ量算出回路264によるレート制御処理を詳細に説明する。
図19は、第5の実施形態における目標データ量算出回路264の処理を示すフローチャート図である。
図19に示すように、目標データ量算出回路264は、第3の実施形態において図14に示した各処理と同様の処理を行う。
Summary of Processing Content of Target Data Amount Calculation Circuit 264 Hereinafter, the rate control processing by the target data amount calculation circuit 264 in the fifth embodiment will be described in detail with reference to FIG.
FIG. 19 is a flowchart showing the processing of the target data amount calculation circuit 264 in the fifth embodiment.
As illustrated in FIG. 19, the target data amount calculation circuit 264 performs the same processes as the processes illustrated in FIG. 14 in the third embodiment.

ステップ600(S600)において、目標データ量算出回路264は、VBVバッファの占有量Bn に応じてS602またはS612の処理に進む。なお、目標データ量算出回路264は、S600の処理におけるVBVバッファの占有量Bn の判断を、エンコーダ26がPピクチャーを生成した直後にのみ行ってもよい。   In step 600 (S600), the target data amount calculation circuit 264 proceeds to the processing of S602 or S612 according to the occupation amount Bn of the VBV buffer. Note that the target data amount calculation circuit 264 may determine the VBV buffer occupation amount Bn in the processing of S600 only immediately after the encoder 26 generates the P picture.

ステップ602(S602)において、目標データ量算出回路264は、式9−1によりN枚のピクチャーの実難度データDj の総和sum-difficultyの値が閾値Th1より大きいか否かを判断し、判断結果に応じてS604またはS608の処理に進む。
ステップ604(S604)において、目標データ量算出回路264は、式9−2によりパラメータRj ’が閾値(G+Th2)よりも多いか否かを判断し、判断結果に応じてS606またはS616の処理に進む。
In step 602 (S602), the target data amount calculation circuit 264 determines whether or not the sum sum-difficulty value of the actual difficulty data Dj of the N pictures is greater than the threshold value Th1 using Expression 9-1. Accordingly, the process proceeds to S604 or S608.
In step 604 (S604), the target data amount calculation circuit 264 determines whether or not the parameter Rj ′ is larger than the threshold value (G + Th2) using Expression 9-2, and proceeds to the processing of S606 or S616 depending on the determination result. .

ステップ606(S606)において、目標データ量算出回路264は、例えば式10−1、式10−2および式11により補給データ量supplementを算出する。
ステップ608(S608)において、目標データ量算出回路264は、補給データ量supplementが補償されているか否かを判断し、判断結果に応じてS610またはS612の処理に進む。
ステップ610(S610)において、目標データ量算出回路264は、補給データ量supplementの補償のために、式12により負値の補給データ量supplementを算出する。
In step 606 (S606), the target data amount calculation circuit 264 calculates the supplemental data amount supplement by, for example, Expression 10-1, Expression 10-2, and Expression 11.
In step 608 (S608), the target data amount calculation circuit 264 determines whether or not the replenishment data amount supplement is compensated, and proceeds to the processing of S610 or S612 depending on the determination result.
In step 610 (S610), the target data amount calculation circuit 264 calculates a negative supply data amount supplement using Equation 12 to compensate for the supply data amount supplement.

ステップ612(S612)において、目標データ量算出回路264は、式13により負値の補給データ量supplementを算出し、VBVバッファのアンダーフローを防止する。
ステップ614(S614)において、目標データ量算出回路264は、式14,式15によりパラメータRj ’,sum-supplementを算出し、パラメータRj
’が下限値Rmin 以下になる場合には、パラメータRj ’を下限値Rmin に制限する。
In step 612 (S612), the target data amount calculation circuit 264 calculates a negative supplementary data amount supplement according to Equation 13, and prevents underflow of the VBV buffer.
In step 614 (S614), the target data amount calculation circuit 264 calculates the parameters Rj ′ and sum-supplement using the equations 14 and 15, and the parameter Rj.
If 'is below the lower limit value Rmin, the parameter Rj' is limited to the lower limit value Rmin.

ステップ616(S616)において、目標データ量算出回路264は、式16に示したように目標データ量Tj を算出する。
ステップ618(S618)において、エンコーダ26は、量子化インデックスQINDを用いて圧縮符号化処理を行う。
ステップ620(S620)において、目標データ量算出回路264は、式3により、次のパラメータRj+1 ’を算出し、更新する。
In step 616 (S616), the target data amount calculation circuit 264 calculates the target data amount Tj as shown in Expression 16.
In step 618 (S618), the encoder 26 performs compression encoding processing using the quantization index QIND.
In step 620 (S620), the target data amount calculation circuit 264 calculates and updates the next parameter Rj + 1 ′ by Expression 3.

ステップ622(S622)において、目標データ量算出回路264は、次のパラメータRj+1 ’が下限値Rmin より大きいか否かを判断する。次のパラメータRj+1 ’が下限値Rmin より大きい場合にはS628の処理に進み、大きくない場合にはS624の処理に進む。
ステップ624(S624)において、目標データ量算出回路264は、次のパラメータRj+1 ’を下限値Rmin に制限する。
In step 622 (S622), the target data amount calculation circuit 264 determines whether or not the next parameter Rj + 1 ′ is larger than the lower limit value Rmin. If the next parameter Rj + 1 'is larger than the lower limit value Rmin, the process proceeds to S628. If not, the process proceeds to S624.
In step 624 (S624), the target data amount calculation circuit 264 limits the next parameter Rj + 1 'to the lower limit value Rmin.

ステップ626(S626)において、目標データ量算出回路264は、式18によりパラメータsum-supplementを更新する。
ステップ628(S628)において、目標データ量算出回路264は、変数jをインクリメントする。
In step 626 (S626), the target data amount calculation circuit 264 updates the parameter sum-supplement by Expression 18.
In step 628 (S628), the target data amount calculation circuit 264 increments the variable j.

以下、第5の実施形態におけるエンコーダ26(図13)の動作を説明する。
動き検出器14は、第1の実施形態および第3の実施形態においてと同様に、動きベクトルの生成等の処理を行う。
エンコーダ制御部22は、第1の実施形態等においてと同様に、ピクチャーの並び替え処理等を行う。
FIFOメモリ160は、第1の実施形態等においてと同様に、入力された映像データをLピクチャー分だけ遅延する。
Hereinafter, the operation of the encoder 26 (FIG. 13) in the fifth embodiment will be described.
The motion detector 14 performs processing such as generation of a motion vector, as in the first and third embodiments.
The encoder control unit 22 performs a picture rearrangement process and the like as in the first embodiment.
The FIFO memory 160 delays the input video data by L pictures as in the first embodiment.

エンコーダ26(図13)が、1ピクチャー分の圧縮符号化を終了するたびに、量子化制御部260のGC算出回路262は、量子化インデックス生成回路266の量子化インデックスから量子化値Qj の平均値を算出し、量子化値Qj の平均値および圧縮映像データのデータ量Sj からグローバルコンプレクシティXI ,Xp ,XB を算出する。
目標データ量算出回路264は、圧縮映像データの目標データ量算出回路264は、最も新しく生成された各ピクチャータイプのグローバルコンプレクシティXI ,Xp ,XB に基づいて、図19を参照して説明したように、次のピクチャーの目標データ量Tj を算出する。
Each time the encoder 26 (FIG. 13) finishes compression encoding for one picture, the GC calculation circuit 262 of the quantization control unit 260 calculates the average of the quantization values Qj from the quantization index of the quantization index generation circuit 266. A value is calculated, and global complexity XI, Xp, XB is calculated from the average value of the quantized value Qj and the data amount Sj of the compressed video data.
The target data amount calculation circuit 264 is the same as the target data amount calculation circuit 264 for compressed video data, as described with reference to FIG. 19 based on the global complexity XI, Xp, and XB of the most recently generated picture types. Then, the target data amount Tj of the next picture is calculated.

量子化インデックス生成回路266は、算出された目標データ量Tj およびグローバルコンプレクシティXI ,Xp ,XB に基づいて、量子化インデックスを算出し、エンコーダ26の量子化回路168に設定する。
DCT回路166は、第1の実施形態等においてと同様に、次のピクチャーに対してDCT処理を行う。
The quantization index generation circuit 266 calculates a quantization index based on the calculated target data amount Tj and global complexity XI, Xp, XB, and sets the quantization index in the quantization circuit 168 of the encoder 26.
The DCT circuit 166 performs DCT processing on the next picture, as in the first embodiment.

量子化回路168は、DCT処理された映像データを、設定された量子化インデックスを量子化値Qj に変換し、得られた量子化値Qj により量子化処理を行う。
可変長符号化回路170は、第1の実施形態等においてと同様に、変長符号化を行い、ほぼ、目標データ量Tj に近いデータ量の圧縮映像データを生成し、バッファメモリ182を介して出力する。
The quantization circuit 168 converts the set quantization index into a quantized value Qj for the DCT-processed video data, and performs a quantization process using the obtained quantized value Qj.
The variable length coding circuit 170 performs variable length coding as in the first embodiment, etc., generates compressed video data with a data amount that is substantially close to the target data amount Tj, and passes through the buffer memory 182. Output.

変形例
以下、第5の実施形態の変形例を説明する。
第5の実施形態において示した改良フィードバックレート制御方式は、第1の実施形態、第2の実施形態および第4の実施形態に示した映像データ圧縮装置1,2,4(図1〜図3,図5,図6,図16〜図18)にも応用可能である。また、第5の実施形態においては、目標データ量算出回路264が、VBVバッファを考慮して目標データ量Tj を算出する場合について説明したが、VBVバッファを考慮せずに目標データ量Tj を生成するように目標データ量算出回路264の動作を変更してもよい。
Modified Examples Hereinafter, modified examples of the fifth embodiment will be described.
The improved feedback rate control method shown in the fifth embodiment is the video data compression apparatus 1, 2, 4 (FIGS. 1 to 3) shown in the first embodiment, the second embodiment, and the fourth embodiment. 5, FIG. 6 and FIGS. 16 to 18). In the fifth embodiment, the case where the target data amount calculation circuit 264 calculates the target data amount Tj in consideration of the VBV buffer has been described. However, the target data amount Tj is generated without considering the VBV buffer. Thus, the operation of the target data amount calculation circuit 264 may be changed.

以下、図20を参照して、映像データ圧縮装置1(図1〜図3)の動作を変更し、第5の実施形態に示した改良フィードバックレート制御を応用する変形例を説明する。
図20は、映像データ圧縮装置1(図1〜図3)の動作を変更し、第5の実施形態に示した改良フィードバックレート制御を行う場合の処理を示すフローチャート図である。
図20に示すように、映像データ圧縮装置1のホストコンピュータ20は、VBVバッファを考慮したレート制御を行わないので、図19に示したS600〜S614に対応する処理を行わず、S616〜628に対応する処理のみを行う。
Hereinafter, a modification in which the operation of the video data compression apparatus 1 (FIGS. 1 to 3) is changed and the improved feedback rate control shown in the fifth embodiment is applied will be described with reference to FIG.
FIG. 20 is a flowchart showing processing when the operation of the video data compression apparatus 1 (FIGS. 1 to 3) is changed and the improved feedback rate control shown in the fifth embodiment is performed.
As shown in FIG. 20, the host computer 20 of the video data compression apparatus 1 does not perform rate control in consideration of the VBV buffer, so the processing corresponding to S600 to S614 shown in FIG. 19 is not performed, and S616 to 628 are performed. Only the corresponding process is performed.

ステップ700(S700)において、映像データ圧縮装置1のホストコンピュータ20は、式1により目標データ量Tj を算出する。
ステップ702(S702)において、エンコーダ18は、量子化インデックスQINDを用いて圧縮符号化処理を行う。
ステップ704(S704)において、ホストコンピュータ20は、式3により、次のパラメータRj+1 ’を算出し、更新する。
In step 700 (S700), the host computer 20 of the video data compression apparatus 1 calculates the target data amount Tj according to Equation 1.
In step 702 (S702), the encoder 18 performs compression encoding processing using the quantization index QIND.
In step 704 (S704), the host computer 20 calculates and updates the next parameter Rj + 1 ′ according to Equation 3.

ステップ706(S706)において、ホストコンピュータ20は、次のパラメータRj+1 ’が下限値Rmin より大きいか否かを判断し、判断結果に応じてS712またはS608の処理に進む。
ステップ708(S708)において、ホストコンピュータ20は、次のパラメータRj+1 ’を下限値Rmin に制限する。
In step 706 (S706), the host computer 20 determines whether or not the next parameter Rj + 1 'is greater than the lower limit value Rmin, and proceeds to the processing of S712 or S608 depending on the determination result.
In step 708 (S708), the host computer 20 limits the next parameter Rj + 1 'to the lower limit value Rmin.

ステップ710(S710)において、ホストコンピュータ20は、式18によりパラメータsum-supplementを更新する。
ステップ712(S712)において、ホストコンピュータ20は、変数jをインクリメントする。
なお、映像データ圧縮装置4(図16〜図18)において、第4の実施形態に示したフィードフォーワードレート制御を改良し、第5の実施形態に示した改良フィードフォーワードレート制御と同等の効果を得るためには、映像データ圧縮装置4のパラメータ算出回路286の動作を変更し、図14に示した各処理を実行すればよい。但し、この場合、S616の処理において、式16の代わりに式1により目標データ量Tj を算出する必要がある。
In step 710 (S710), the host computer 20 updates the parameter sum-supplement according to Equation 18.
In step 712 (S712), the host computer 20 increments the variable j.
In the video data compression apparatus 4 (FIGS. 16 to 18), the feed forward rate control shown in the fourth embodiment is improved and is equivalent to the improved feed forward rate control shown in the fifth embodiment. In order to obtain the effect, the operation of the parameter calculation circuit 286 of the video data compression device 4 may be changed and each process shown in FIG. 14 may be executed. However, in this case, in the process of S616, it is necessary to calculate the target data amount Tj using Equation 1 instead of Equation 16.

また、図20に示した処理において、パラメータRj ’を、MPEGのTM5におけるパラメータRに置換することにより、改良フィードバックレート制御方式を、MPEGのTM5自体に応用することも可能である。
しかしながら、MPEGのTM5におけるパラメータRは、GOPの最初の部分のピクチャーに対しては大きな値をとるが、GOPの終わりの部分に対しては殆ど0に近い値になる。このような性質を有するパラメータRに、負値の固定の下限値Rmin 〔例えば、Rmin =−2×frame-bit 〕を設定することも可能であるが、効果が薄い。
In the processing shown in FIG. 20, the improved feedback rate control method can be applied to the MPEG TM5 itself by replacing the parameter Rj ′ with the parameter R in the MPEG TM5.
However, the parameter R in MPEG TM5 takes a large value for the picture of the first part of the GOP, but is almost close to 0 for the end part of the GOP. Although it is possible to set a fixed negative lower limit value Rmin [for example, Rmin = −2 × frame-bit] to the parameter R having such properties, the effect is weak.

そこで、改良フィードバックレート制御方式を、MPEGのTM5自体に応用する場合には、図21に示すように、下限値Rmin を定める関数を導入することにより、第5の実施例においてと同様の効果を得ることができる。   Therefore, when the improved feedback rate control method is applied to MPEG TM5 itself, as shown in FIG. 21, by introducing a function for determining the lower limit value Rmin, the same effect as in the fifth embodiment can be obtained. Obtainable.

つまり、MPEGのTM5においては、GOPの最初の部分のピクチャーに対してパラメータRが大きくなるように、終わりの部分のピクチャーに対してパラメータRの値が0に近づくので、図21において点線で例示するように、GOPの最初で下限値Rmin の値が(N/2×frame-bit)となり、GOPの最後で下限値Rmin の値が(-N/2 ×frame-bit)となるような直線を引き、パラメータRがこの直線を下回る場合に、第5の実施形態に示した改良フィードバックレート制御方式と同様に、パラメータRを直線上の下限値Rmin に制限し、差分値を別パラメータとして記憶しておけばよい。   That is, in MPEG TM5, the value of parameter R approaches 0 for the picture of the end part so that the parameter R becomes larger for the picture of the first part of the GOP. As shown, the lower limit value Rmin is (N / 2 × frame-bit) at the beginning of the GOP, and the lower limit value Rmin is (−N / 2 × frame-bit) at the end of the GOP. When the parameter R falls below this straight line, the parameter R is limited to the lower limit value Rmin on the straight line, and the difference value is stored as another parameter, as in the improved feedback rate control system shown in the fifth embodiment. You just have to.

また、第5の実施形態においてエンコーダ26の量子化制御部260が行った処理を、ホストコンピュータ20が行うことも可能である。
また、第5の実施形態に示した各パラメータを定義する式は例示であり、エンコーダ26の構成・用途に合わせて、各式を変更することができる。
In addition, the host computer 20 can perform the processing performed by the quantization control unit 260 of the encoder 26 in the fifth embodiment.
The formulas defining the parameters shown in the fifth embodiment are examples, and the formulas can be changed in accordance with the configuration and application of the encoder 26.

以上説明したように、第5の実施形態に示した改良フィードバックレート制御方式によれば、入力映像データの映像の絵柄が、圧縮後のデータレートに対して難しく、データ量が大きくなりすぎる場合においても、ピクチャタイプに応じたデータ量の配分を保ったレート制御が可能であり、圧縮映像データの品質を向上させることができる。
また、下限値を設けたため、難しい入力映像データの映像の絵柄が簡単になった場合にも、短い時間の内に圧縮映像データに多くのデータ量を配分するようにパラメータR,Rj ’を回復することができ、圧縮映像データの品質のムラの発生を防ぐことができる。
As described above, according to the improved feedback rate control system shown in the fifth embodiment, when the picture pattern of the input video data is difficult to the data rate after compression and the amount of data becomes too large. However, it is possible to perform rate control while maintaining the distribution of the data amount according to the picture type, and the quality of the compressed video data can be improved.
In addition, since the lower limit value is set, even when the image pattern of difficult input video data becomes simple, the parameters R and Rj 'are restored so that a large amount of data is allocated to the compressed video data within a short time. And the occurrence of uneven quality of the compressed video data can be prevented.

第6実施形態
以下、本発明の第6の実施形態として、第4の実施形態に示した映像データ圧縮装置4(図16)の動作の変形例(改良フィードフォワードレート制御方式)を説明する。
改良フィードフォワードレート制御方式は、第4の実施形態に示したフィードフォワードレート制御方式を、目標データ量Tj に対して実際に生成される圧縮映像データのデータ量Sj の値が多い場合であっても、圧縮映像データの品質を高く保つことができ、しかも、映像が複雑な絵柄から簡単な絵柄に変化した場合のパラメータRj ’の値が速やかに回復するように改良したものである。
Sixth Embodiment Hereinafter, as a sixth embodiment of the present invention, a modified example (an improved feedforward rate control system) of the operation of the video data compression apparatus 4 (FIG. 16) shown in the fourth embodiment will be described.
The improved feedforward rate control method is the same as the feedforward rate control method shown in the fourth embodiment in the case where the value of the data amount Sj of the compressed video data actually generated is larger than the target data amount Tj. In addition, the quality of the compressed video data can be kept high, and the parameter Rj ′ is improved so that the value of the parameter Rj ′ can be quickly recovered when the video changes from a complex picture to a simple picture.

第6の実施形態において、映像データ圧縮装置4は、VBVバッファの占有量Bn および指標データ(ME残差、フラットネス、イントラACおよびアクティビティ)に基づいて目標データ量Tj をフィードフォワード制御し、さらに、パラメータRj ’が所定の下限値以下になることを制限することにより、第4の実施形態におけるレート制御と同様な効果を得るとともに、圧縮映像データの品質の著しい低下を防ぐ。   In the sixth embodiment, the video data compression apparatus 4 performs feedforward control on the target data amount Tj based on the VBV buffer occupation amount Bn and the index data (ME residual, flatness, intra AC, and activity), and By restricting the parameter Rj ′ from being equal to or lower than a predetermined lower limit, the same effect as the rate control in the fourth embodiment is obtained, and a significant deterioration in the quality of the compressed video data is prevented.

各構成部分の動作
以下、映像データ圧縮装置4の各構成部分の内、映像データ圧縮装置4においてと処理内容が異なる量子化制御部280(図17)の目標データ量算出回路284およびパラメータ算出回路286(図18)の動作(処理内容)を説明する。
目標データ量算出回路284の動作
目標データ量算出回路284は、実難度データ算出回路282が指標データから算出した実難度データDj (DI ,Dp ,DB )と、パラメータ算出回路286がVBVバッファの占有量Bn および実難度データDj から算出したパラメータRj ’とに基づいて各ピクチャータイプの目標データ量Tj を算出する。
Operation of Each Component Part Hereinafter, a target data amount calculation circuit 284 and a parameter calculation circuit of the quantization control unit 280 (FIG. 17) whose processing contents are different from those in the video data compression device 4 among the respective component parts of the video data compression device 4 The operation (processing contents) of 286 (FIG. 18) will be described.
Operation of Target Data Amount Calculation Circuit 284 The target data amount calculation circuit 284 includes the actual difficulty data Dj (DI, Dp, DB) calculated from the index data by the actual difficulty data calculation circuit 282, and the parameter calculation circuit 286 occupies the VBV buffer. The target data amount Tj for each picture type is calculated based on the amount Bn and the parameter Rj ′ calculated from the actual difficulty data Dj.

パラメータ算出回路286の動作
レート制御方法
パラメータ算出回路286は、第4の実施形態においてと同様に、VBVバッファの占有量を考慮してパラメータRj ’の値を調節することによりレート制御を行う。
但し、パラメータ算出回路286は、パラメータRj ’に対して下限値Rmin
を設定し、パラメータRj ’が下限値Rmin 以下〔Rj ’<Rmin 〕になった場合に〔Rj ’=Rmin 〕とし、パラメータRj ’が下限値Rmin 以下にならないように制限する。下限値Rmin としては、例えば、〔Rmin =frame-bit ×L×3/4〕あるいは〔Rmin =frame-bit ×L×1/4〕といった値が用いられる。
Operation of Parameter Calculation Circuit 286 Rate Control Method The parameter calculation circuit 286 performs rate control by adjusting the value of the parameter Rj ′ in consideration of the occupation amount of the VBV buffer, as in the fourth embodiment.
However, the parameter calculation circuit 286 has a lower limit value Rmin for the parameter Rj ′.
Is set to [Rj ′ = Rmin] when the parameter Rj ′ is lower than the lower limit value Rmin [Rj ′ <Rmin], and the parameter Rj ′ is restricted so as not to be lower than the lower limit value Rmin. As the lower limit value Rmin, for example, [Rmin = frame-bit × L × 3/4] or [Rmin = frame-bit × L × 1/4] is used.

式3に示したように、第j番目のピクチャーのデータ量がSj であり、第j+L番目のピクチャーのデータ量がSj+L であり、ピクチャータイプに応じてパラメータRj ’に加算されるデータ量がFj+L である場合には、次のパラメータRj+1 ’の値は、〔Rj+1 ’=Rj ’−Sj +Fj+L 〕となる。しかしながら、次のパラメータRj+1 ’(=Rj ’−Sj +Fj+L )もまた下限値Rmin 以下〔Rj+1 ’<Rmin 〕となる可能性がある。この場合には、次のパラメータRj+1 ’を、式17に示したように下限値Rmin に制限する。   As shown in Equation 3, the data amount of the jth picture is Sj, the data amount of the j + Lth picture is Sj + L, and the data amount to be added to the parameter Rj ′ according to the picture type Is Fj + L, the value of the next parameter Rj + 1 ′ is [Rj + 1 ′ = Rj′−Sj + Fj + L]. However, the next parameter Rj + 1 '(= Rj'-Sj + Fj + L) may also be less than the lower limit value Rmin [Rj + 1' <Rmin]. In this case, the next parameter Rj + 1 'is limited to the lower limit value Rmin as shown in Expression 17.

また、パラメータ算出回路286は、借金額をパラメータsum-supplementとして記憶する。従って、パラメータRj ’の値を上述のように下限値Rmin に制限しない場合には、式15に示したようにパラメータsum-supplementの更新を行い、パラメータRj ’の値を下限値Rmin に制限した場合には、式18に示したように補給データ量supplementを累加算してパラメータsum-supplementの更新を行う。   The parameter calculation circuit 286 stores the borrowed amount as a parameter sum-supplement. Accordingly, when the value of the parameter Rj ′ is not limited to the lower limit value Rmin as described above, the parameter sum-supplement is updated as shown in Equation 15 to limit the value of the parameter Rj ′ to the lower limit value Rmin. In this case, the parameter sum-supplement is updated by accumulating the supplementary data amount supplement as shown in Expression 18.

パラメータ算出回路286の処理内容のまとめ
以下、再び図19を参照して、第6の実施形態におけるパラメータ算出回路286によるレート制御処理および関連部分の処理の内容を詳細に説明する。
ステップ600(S600)において、パラメータ算出回路286は、VBVバッファの占有量Bn に応じてS602またはS612の処理に進む。なお、パラメータ算出回路286は、S600の処理におけるVBVバッファの占有量Bn の判断を、エンコーダ28がPピクチャーを生成した直後にのみ行ってもよい。
Summary of Processing Contents of Parameter Calculation Circuit 286 Hereinafter, with reference to FIG. 19 again, details of rate control processing and related portion processing by the parameter calculation circuit 286 in the sixth embodiment will be described in detail.
In step 600 (S600), the parameter calculation circuit 286 proceeds to the processing of S602 or S612 according to the occupation amount Bn of the VBV buffer. Note that the parameter calculation circuit 286 may determine the VBV buffer occupation amount Bn in the processing of S600 only immediately after the encoder 28 generates the P picture.

ステップ602(S602)において、パラメータ算出回路286は、式9−1によりN枚のピクチャーの実難度データDj の総和sum-difficultyの値が閾値Th1より大きいか否かを判断し、判断結果に応じてS604またはS608の処理に進む。
ステップ604(S604)において、パラメータ算出回路286は、式9−2によりパラメータRj ’が閾値(G+Th2)よりも多いか否かを判断し、判断結果に応じてS606またはS616の処理に進む。
In step 602 (S602), the parameter calculation circuit 286 determines whether or not the sum sum-difficulty value of the actual difficulty data Dj of the N pictures is larger than the threshold value Th1 according to Expression 9-1, and according to the determination result. The process proceeds to S604 or S608.
In step 604 (S604), the parameter calculation circuit 286 determines whether or not the parameter Rj ′ is larger than the threshold value (G + Th2) using the equation 9-2, and proceeds to the processing of S606 or S616 depending on the determination result.

ステップ606(S606)において、パラメータ算出回路286は、例えば式10−1、式10−2および式11により補給データ量supplementを算出する。
ステップ608(S608)において、パラメータ算出回路286は、補給データ量supplementが補償されているか否かを判断し、判断結果に応じてS610またはS612の処理に進む。
ステップ610(S610)において、パラメータ算出回路286は、補給データ量supplementの補償のために、式12により負値の補給データ量supplementを算出する。
In step 606 (S606), the parameter calculation circuit 286 calculates the supplement data amount supplement by, for example, Expression 10-1, Expression 10-2, and Expression 11.
In step 608 (S608), the parameter calculation circuit 286 determines whether or not the supplement data amount supplement is compensated, and proceeds to the processing of S610 or S612 depending on the determination result.
In step 610 (S610), the parameter calculation circuit 286 calculates a negative supply data amount supplement using Equation 12 to compensate for the supply data amount supplement.

ステップ612(S612)において、パラメータ算出回路286は、式13により負値の補給データ量supplementを算出し、VBVバッファのアンダーフローを防止する。
ステップ614(S614)において、パラメータ算出回路286は、式14,式15によりパラメータRj ’,sum-supplementを算出し、パラメータRj ’が下限値Rmin 以下になる場合には、パラメータRj ’を下限値Rmin に制限する。
In step 612 (S612), the parameter calculation circuit 286 calculates a negative supplemental data amount supplement using Equation 13 to prevent underflow of the VBV buffer.
In step 614 (S614), the parameter calculation circuit 286 calculates the parameters Rj ′ and sum-supplement using the equations 14 and 15, and if the parameter Rj ′ is less than or equal to the lower limit value Rmin, the parameter Rj ′ is set to the lower limit value. Limited to Rmin.

ステップ616(S616)において、目標データ量算出回路284は、第5の実施形態に示したエンコーダ26の目標データ量算出回路264とは異なり、式16の代わりに式1を用いて目標データ量Tj を算出する。
ステップ618(S618)において、エンコーダ28は、量子化インデックスQINDを用いて圧縮符号化処理を行う。
ステップ620(S620)において、パラメータ算出回路286は、式3により次のパラメータRj+1 ’を算出し、更新する。
In step 616 (S616), the target data amount calculation circuit 284 is different from the target data amount calculation circuit 264 of the encoder 26 shown in the fifth embodiment, using the equation 1 instead of the equation 16, and the target data amount Tj. Is calculated.
In step 618 (S618), the encoder 28 performs compression encoding processing using the quantization index QIND.
In step 620 (S620), the parameter calculation circuit 286 calculates and updates the next parameter Rj + 1 ′ using Equation 3.

ステップ622(S622)において、パラメータ算出回路286は、次のパラメータRj+1 ’が下限値Rmin より大きいか否かを判断する。次のパラメータRj+1 ’が下限値Rmin より大きい場合にはS628の処理に進み、大きくない場合にはS624の処理に進む。
ステップ624(S624)において、パラメータ算出回路286は、次のパラメータRj+1 ’を下限値Rmin に制限する。
In step 622 (S622), the parameter calculation circuit 286 determines whether or not the next parameter Rj + 1 'is greater than the lower limit value Rmin. If the next parameter Rj + 1 'is larger than the lower limit value Rmin, the process proceeds to S628. If not, the process proceeds to S624.
In step 624 (S624), the parameter calculation circuit 286 limits the next parameter Rj + 1 'to the lower limit value Rmin.

ステップ626(S626)において、パラメータ算出回路286は、式18によりパラメータsum-supplementを更新する。
ステップ628(S628)において、パラメータ算出回路286は、変数jをインクリメントする。
In step 626 (S626), the parameter calculation circuit 286 updates the parameter sum-supplement according to Equation 18.
In step 628 (S628), the parameter calculation circuit 286 increments the variable j.

以下、第6の実施形態における映像データ圧縮装置4(図16)の動作を説明する。
動き検出器14は、動きベクトルおよびME残差の生成等の処理を行う。
エンコーダ制御部22は、ピクチャーの並び替え処理および指標データ(フラットネス、イントラACおよびアクティビティ)の生成等の処理を行う。
FIFOメモリ160は、入力された映像データをLピクチャー分だけ遅延する。
The operation of the video data compression apparatus 4 (FIG. 16) in the sixth embodiment will be described below.
The motion detector 14 performs processing such as generation of motion vectors and ME residuals.
The encoder control unit 22 performs processing such as picture rearrangement processing and generation of index data (flatness, intra AC, and activity).
The FIFO memory 160 delays the input video data by L pictures.

エンコーダ28(図16)が、1ピクチャー分の圧縮符号化を終了するたびに、量子化制御部280の実難度データ算出回路282は、実難度データDj を算出する。
パラメータ算出回路286は、図19に示したようにパラメータRj ’の算出を行い、目標データ量算出回路284は、最も新しく生成された各ピクチャータイプのピクチャーの実難度データDj (DI ,Dp ,DB )に基づいて、式1により目標データ量Tj を算出する。
Each time the encoder 28 (FIG. 16) finishes compression encoding for one picture, the actual difficulty level data calculation circuit 282 of the quantization control unit 280 calculates actual difficulty level data Dj.
The parameter calculating circuit 286 calculates the parameter Rj ′ as shown in FIG. 19, and the target data amount calculating circuit 284 is the actual difficulty data Dj (DI, Dp, DB) of the most recently generated picture of each picture type. ) To calculate the target data amount Tj according to Equation 1.

量子化インデックス生成回路288は、算出された目標データ量Tj に基づいて、量子化インデックスを算出し、エンコーダ28の量子化回路168に設定する。
DCT回路166は、第1の実施形態等においてと同様に、次のピクチャーに対してDCT処理を行う。
The quantization index generation circuit 288 calculates a quantization index based on the calculated target data amount Tj and sets the quantization index in the quantization circuit 168 of the encoder 28.
The DCT circuit 166 performs DCT processing on the next picture, as in the first embodiment.

量子化回路168は、DCT処理された映像データを、設定された量子化インデックスを量子化値Qj に変換し、得られた量子化値Qj により量子化処理を行う。
可変長符号化回路170は、第1の実施形態等においてと同様に、変長符号化を行い、ほぼ、目標データ量Tj に近いデータ量の圧縮映像データを生成し、バッファメモリ182を介して出力する。
The quantization circuit 168 converts the set quantization index into a quantized value Qj for the DCT-processed video data, and performs a quantization process using the obtained quantized value Qj.
The variable length coding circuit 170 performs variable length coding as in the first embodiment, etc., generates compressed video data with a data amount that is substantially close to the target data amount Tj, and passes through the buffer memory 182. Output.

変形例
以下、再び図20を参照して、映像データ圧縮装置1(図1〜図3)の動作を変更し、第6の実施形態に示した改良フィードフォワードレート制御を応用する変形例を説明する。
映像データ圧縮装置1のホストコンピュータ20は、VBVバッファを考慮したレート制御を行わないので、図19に示したS600〜S614に対応する処理を行わず、S616〜628に対応する処理のみを行う。
Modification Hereinafter, with reference to FIG. 20 again, a modification in which the operation of the video data compression apparatus 1 (FIGS. 1 to 3) is changed and the improved feedforward rate control shown in the sixth embodiment is applied will be described. To do.
Since the host computer 20 of the video data compression apparatus 1 does not perform rate control considering the VBV buffer, it does not perform the processing corresponding to S600 to S614 shown in FIG. 19 and performs only the processing corresponding to S616 to 628.

ステップ700(S700)において、映像データ圧縮装置1のホストコンピュータ20は、式1により目標データ量Tj を算出する。
ステップ702(S702)において、エンコーダ18は、量子化インデックスQINDを用いて圧縮符号化処理を行う。
ステップ704(S704)において、ホストコンピュータ20は、式3により、次のパラメータRj+1 ’を算出し、更新する。
In step 700 (S700), the host computer 20 of the video data compression apparatus 1 calculates the target data amount Tj according to Equation 1.
In step 702 (S702), the encoder 18 performs compression encoding processing using the quantization index QIND.
In step 704 (S704), the host computer 20 calculates and updates the next parameter Rj + 1 ′ according to Equation 3.

ステップ706(S706)において、ホストコンピュータ20は、次のパラメータRj+1 ’が下限値Rmin より大きいか否かを判断し、判断結果に応じてS712またはS608の処理に進む。
ステップ708(S708)において、ホストコンピュータ20は、次のパラメータRj+1 ’を下限値Rmin に制限する。
In step 706 (S706), the host computer 20 determines whether or not the next parameter Rj + 1 'is greater than the lower limit value Rmin, and proceeds to the processing of S712 or S608 depending on the determination result.
In step 708 (S708), the host computer 20 limits the next parameter Rj + 1 'to the lower limit value Rmin.

ステップ710(S710)において、ホストコンピュータ20は、式18によりパラメータsum-supplementを更新する。
ステップ712(S712)において、ホストコンピュータ20は、変数jをインクリメントする。
In step 710 (S710), the host computer 20 updates the parameter sum-supplement according to Equation 18.
In step 712 (S712), the host computer 20 increments the variable j.

また、図20に示した処理において、パラメータRj ’を、MPEGのTM5におけるパラメータRに置換することにより、改良フィードフォワードレート制御方式を、MPEGのTM5自体に応用することも可能である。
しかしながら、MPEGのTM5におけるパラメータRは、GOPの最初の部分のピクチャーに対しては大きな値をとるが、GOPの終わりの部分に対しては殆ど0に近い値になる。このような性質を有するパラメータRに、負値の固定の下限値Rmin 〔例えば、Rmin =−2×frame-bit 〕を設定することも可能であるが、効果が薄い。
In the processing shown in FIG. 20, the improved feedforward rate control method can be applied to the MPEG TM5 itself by replacing the parameter Rj ′ with the parameter R in the MPEG TM5.
However, the parameter R in MPEG TM5 takes a large value for the picture of the first part of the GOP, but is almost close to 0 for the end part of the GOP. Although it is possible to set a fixed negative lower limit value Rmin [for example, Rmin = −2 × frame-bit] to the parameter R having such properties, the effect is weak.

そこで、改良フィードフォワードレート制御方式を、MPEGのTM5自体に応用する場合には、図21に示したように、下限値Rmin を定める関数を導入することにより、第6の実施例においてと同様の効果を得ることができる。   Therefore, when the improved feedforward rate control method is applied to MPEG TM5 itself, as shown in FIG. 21, by introducing a function for determining the lower limit value Rmin, the same as in the sixth embodiment. An effect can be obtained.

つまり、MPEGのTM5においては、GOPの最初の部分のピクチャーに対してパラメータRが大きくなるように、終わりの部分のピクチャーに対してパラメータRの値が0に近づくので、図21に例示したように、GOPの最初で下限値Rmin の値が(N/2×frame-bit)となり、GOPの最後で下限値Rmin の値が(-N/2 ×frame-bit)となるような直線を引き、パラメータRがこの直線を下回る場合に、第6の実施形態に示した改良フィードフォワードレート制御方式と同様に、パラメータRを直線上の下限値Rmin に制限し、差分値を別パラメータとして記憶しておけばよい。
また、第6の実施形態に示した各パラメータを定義する式は例示であり、映像データ圧縮装置4の構成・用途に合わせて、各式を変更することができる。
That is, in MPEG TM5, the value of parameter R approaches 0 for the picture of the end part so that the parameter R becomes larger for the picture of the first part of the GOP. Therefore, as illustrated in FIG. In addition, a straight line is drawn so that the lower limit value Rmin is (N / 2 × frame-bit) at the beginning of the GOP and the lower limit value Rmin is (−N / 2 × frame-bit) at the end of the GOP. When the parameter R falls below this straight line, the parameter R is limited to the lower limit value Rmin on the straight line, and the difference value is stored as another parameter, as in the improved feedforward rate control system shown in the sixth embodiment. Just keep it.
Further, the formulas defining the parameters shown in the sixth embodiment are examples, and the formulas can be changed in accordance with the configuration and use of the video data compression apparatus 4.

以上説明したように、第6の実施形態に示した改良フィードフォワードレート制御方式によれば、入力映像データの映像の絵柄が、圧縮後のデータレートに対して難しく、データ量が大きくなりすぎる場合においても、ピクチャタイプに応じたデータ量の配分を保ったレート制御が可能であり、圧縮映像データの品質を向上させることができる。
また、下限値を設けたため、難しい入力映像データの映像の絵柄が簡単になった場合にも、短い時間の内に圧縮映像データに多くのデータ量を配分するようにパラメータR,Rj ’を回復することができ、圧縮映像データの品質のムラの発生を防ぐことができる。
As described above, according to the improved feedforward rate control method shown in the sixth embodiment, the picture pattern of the input video data is difficult for the data rate after compression, and the data amount becomes too large. The rate control can be performed while maintaining the distribution of the data amount according to the picture type, and the quality of the compressed video data can be improved.
In addition, since the lower limit value is set, even when the image pattern of difficult input video data becomes simple, the parameters R and Rj 'are restored so that a large amount of data is allocated to the compressed video data within a short time. And the occurrence of uneven quality of the compressed video data can be prevented.

本発明に係る映像データ圧縮装置の構成を示す図である。It is a figure which shows the structure of the video data compression apparatus which concerns on this invention. 図1に示した簡易2パス処理部のエンコーダの構成を示す図である。It is a figure which shows the structure of the encoder of the simple 2 pass process part shown in FIG. 図1に示したエンコーダの構成を示す図である。It is a figure which shows the structure of the encoder shown in FIG. (A)〜(C)は、第1の実施形態における映像データ圧縮装置の簡易2パスエンコードの動作を示す図である。(A)-(C) are figures which show the operation | movement of the simple 2 pass encoding of the video data compression apparatus in 1st Embodiment. 第2の実施形態における本発明に係る映像データ圧縮装置の構成の概要を示す図である。It is a figure which shows the outline | summary of a structure of the video data compression apparatus based on this invention in 2nd Embodiment. 図5に示した映像データ圧縮装置2の圧縮符号化部の詳細な構成を示す図である。It is a figure which shows the detailed structure of the compression encoding part of the video data compression apparatus 2 shown in FIG. 映像データ圧縮装置(図1〜図3,図5,図6)により、Pピクチャーを生成する際のME残差と実難度データDj との相関関係を示す図である。It is a figure which shows the correlation of ME residual at the time of producing | generating P picture by the video data compression apparatus (FIGS. 1-3, FIG. 5, FIG. 6) and real difficulty data Dj. 映像データ圧縮装置(図1〜図3,図5,図6)により、Bピクチャーを生成する際のME残差と実難度データDj との相関関係を示す図である。It is a figure which shows the correlation of ME residual at the time of producing | generating B picture by the video data compression apparatus (FIGS. 1-3, FIG. 5, FIG. 6) and real difficulty data Dj. フラットネスの計算方法を示す図である。It is a figure which shows the calculation method of flatness. 映像データ圧縮装置(図1〜図3,図5,図6)により、Iピクチャーを生成する際のフラットネスと実難度データDj との相関関係を示す図である。It is a figure which shows the correlation between the flatness at the time of producing | generating I picture by the video data compression apparatus (FIGS. 1-3, FIG. 5, FIG. 6) and the actual difficulty data Dj. 映像データ圧縮装置(図1〜図3,図5,図6)により、Iピクチャーを生成する際のイントラACと実難度データDj との相関関係を示す図である。It is a figure which shows the correlation of intra AC at the time of producing | generating I picture by a video data compression apparatus (FIGS. 1-3, FIG. 5, FIG. 6) and real difficulty data Dj. MPEGのMP@ML方式により、映像データ圧縮装置(図1〜図3,図5,図6)が、圧縮映像データのGOPの発生ビット量をほぼ一定に保って固定長符号化を行った場合のVBVバッファの占有量Bn の経時的な変化の評価結果を示す図である。When the video data compression apparatus (FIGS. 1 to 3, 5, and 6) performs fixed-length encoding while maintaining the amount of GOP generated in compressed video data almost constant by the MPEG MP @ ML method It is a figure which shows the evaluation result of the time-dependent change of occupation amount Bn of the VBV buffer. 図13に示したエンコーダの構成を示す図である。It is a figure which shows the structure of the encoder shown in FIG. 図13に示した目標データ量算出回路の処理を示すフローチャート図である。It is a flowchart figure which shows the process of the target data amount calculation circuit shown in FIG. MPEGのMP@ML方式により、エンコーダ(図13)が、圧縮映像データのGOPのデータ量をほぼ一定に保って固定長符号化を行った場合のVBVバッファの占有量Bn の経時的な変化の評価結果を示す図である。According to the MPEG @ ML method of MPEG, the change in the VBV buffer occupancy Bn over time when the encoder (FIG. 13) performs fixed-length encoding with the GOP data amount of the compressed video data kept substantially constant. It is a figure which shows an evaluation result. 第4の実施形態における本発明に係る映像データ圧縮装置の構成を示す図である。It is a figure which shows the structure of the video data compression apparatus based on this invention in 4th Embodiment. 図16に示したエンコーダの構成を示す図である。It is a figure which shows the structure of the encoder shown in FIG. 図17に示した量子化制御部の構成を示す図である。It is a figure which shows the structure of the quantization control part shown in FIG. 第5の実施形態における目標データ量算出回路の処理を示すフローチャート図である。It is a flowchart figure which shows the process of the target data amount calculation circuit in 5th Embodiment. 映像データ圧縮装置(図1〜図3)の動作を変更し、第5の実施形態に示した改良フィードバックレート制御を行う場合の処理を示すフローチャート図である。It is a flowchart figure which shows the process in the case of changing operation | movement of a video data compression apparatus (FIGS. 1-3) and performing the improved feedback rate control shown in 5th Embodiment. 第5の実施形態に示した改良フィードバックレート制御方式を、MPEGのTM5自体に応用する場合に用いる下限値Rmin を定める関数を示す図である。It is a figure which shows the function which determines the lower limit Rmin used when applying the improved feedback rate control system shown in 5th Embodiment to MPEGTM5 itself.

符号の説明Explanation of symbols

1,2,4…映像データ圧縮装置、10,24…圧縮符号化部、12,22…エンコーダ制御部、14…動き検出器、16…簡易2パス処理部、160…FIFOメモリ、162,18,26,28…エンコーダ、260,280…量子化制御部、262…GC算出回路、282…実難度データ算出回路、284,264…目標データ量算出回路、286…パラメータ算出回路、266,288…量子化インデックス生成回路、164…加算回路、166…DCT回路、168…量子化回路、170…可変長符号化回路、172…逆量子化回路、174…逆DCT回路、176…加算回路、178…動き補償回路、180…量子化制御回路、182…バッファメモリ、20…ホストコンピュータ   1, 2, 4 ... Video data compression device, 10, 24 ... Compression encoding unit, 12, 22 ... Encoder control unit, 14 ... Motion detector, 16 ... Simple 2-pass processing unit, 160 ... FIFO memory, 162, 18 , 26, 28 ... encoder, 260, 280 ... quantization controller, 262 ... GC calculation circuit, 282 ... actual difficulty data calculation circuit, 284, 264 ... target data amount calculation circuit, 286 ... parameter calculation circuit, 266, 288 ... Quantization index generating circuit, 164 ... adder circuit, 166 ... DCT circuit, 168 ... quantizer circuit, 170 ... variable length encoding circuit, 172 ... inverse quantization circuit, 174 ... inverse DCT circuit, 176 ... adder circuit, 178 ... Motion compensation circuit, 180 ... quantization control circuit, 182 ... buffer memory, 20 ... host computer

Claims (18)

動画の非圧縮映像データを、圧縮後の映像データ(圧縮映像データ)をバッファリングするVBVバッファに基づいて定まる条件を満たすデータレートに圧縮する映像データ圧縮装置であって、
前記非圧縮映像データの映像の複雑さを示す難度データを算出する難度データ算出手段と、
前記VBVバッファにバッファリングされている前記圧縮映像データのデータ量(占有データ量)、および、算出した前記難度データに基づいて、所定数の非圧縮映像データのピクチャーに圧縮後のデータ量(割当データ量)を割り当てるデータ量割当手段と、
算出した前記難度データおよび前記割当データ量に基づいて、前記非圧縮映像データの圧縮後のデータ量の目標値をピクチャーごとに算出する目標値算出手段と、
前記非圧縮映像データを所定の圧縮方法により、圧縮後のデータ量が算出した前記目標値になるように圧縮する圧縮手段と
を有する映像データ圧縮装置。
A video data compression device that compresses uncompressed video data of a moving image to a data rate that satisfies a condition determined based on a VBV buffer that buffers compressed video data (compressed video data),
Difficulty level data calculating means for calculating difficulty level data indicating the complexity of the video of the uncompressed video data;
Based on the data amount (occupied data amount) of the compressed video data buffered in the VBV buffer and the calculated difficulty data, the data amount (allocation) after compression to a predetermined number of pictures of uncompressed video data Data amount allocation means for allocating (data amount),
Target value calculation means for calculating a target value of the data amount after compression of the uncompressed video data based on the calculated difficulty data and the allocated data amount;
A video data compression apparatus comprising: compression means for compressing the uncompressed video data by a predetermined compression method so that the amount of data after compression becomes the calculated target value.
前記難度データ算出手段は、前記難度データとして、前記非圧縮映像データの圧縮後のデータ量を算出する
請求項1に記載の映像データ圧縮装置。
The video data compression apparatus according to claim 1, wherein the difficulty level data calculation unit calculates a data amount after compression of the uncompressed video data as the difficulty level data.
前記データ量割当手段は、前記VBVバッファの占有データ量が所定の閾値以上である場合に、算出した前記難度データに基づいて、前記非圧縮映像データの映像が複雑であればあるほど前記割当データ量の値を大さくし、
前記目標値算出手段は、前記非圧縮映像データの映像が複雑であればあるほど前記目標値の値を大きくし、前記非圧縮映像データの映像が簡単であればあるほど前記目標値の値を小さくする
請求項1に記載の映像データ圧縮装置。
The data amount allocating means determines that the more complex the video of the uncompressed video data is, the more complex the video of the uncompressed video data is based on the calculated difficulty data when the occupied data amount of the VBV buffer is equal to or greater than a predetermined threshold. Increase the quantity value,
The target value calculation means increases the value of the target value as the video of the uncompressed video data is more complex, and sets the value of the target value as the video of the uncompressed video data is simpler. The video data compression apparatus according to claim 1.
前記データ量割当手段は、前記圧縮映像データに与えられる全てのデータ量を全てのピクチャーに均等に配分した基準値を、生成した前記圧縮映像データのピクチャーのデータ量から減算して差分値を算出し、前記非圧縮映像データの圧縮が終了した場合に、算出した差分値の総和が負値の0に近い値になるように前記割当データ量を算出する
請求項3に記載の映像データ圧縮装置。
The data amount allocating unit calculates a difference value by subtracting a reference value obtained by equally allocating all the data amounts given to the compressed video data to all the pictures from the data amount of the generated compressed video data. 4. The video data compression apparatus according to claim 3, wherein, when the compression of the uncompressed video data is completed, the allocated data amount is calculated so that the sum of the calculated difference values becomes a value close to a negative value of 0. 5. .
前記目標量算出手段は、最新のピクチャーの難度データを所定数のピクチャーの難度データの総和を除算した値に、算出した前記割当データ量を乗算して前記目標値を算出する
請求項3に記載の映像データ圧縮装置。
The target amount calculation unit calculates the target value by multiplying a value obtained by dividing the difficulty data of the latest picture by the sum of the difficulty data of a predetermined number of pictures and the calculated allocation data amount. Video data compression device.
前記圧縮手段は、前記非圧縮映像データを、複数の種類のピクチャー(Iピクチャー、PピクチャーおよびBピクチャーまたはこれらの組み合わせ)を所定の順番で含むピクチャータイプシーケンスに圧縮する
請求項3に記載の映像データ圧縮装置。
The video according to claim 3, wherein the compression means compresses the uncompressed video data into a picture type sequence including a plurality of types of pictures (I picture, P picture and B picture or a combination thereof) in a predetermined order. Data compression device.
前記難度データ算出手段は、前記難度データとして、PピクチャーまたはBピクチャーに圧縮されるピクチャーのME残差、および、Iピクチャーに圧縮されるピクチャーのフラットネス、イントラACデータ、アクティビティおよびグローバルコンプレクシティまたはこれらの組み合わせを算出する
請求項6に記載の映像データ圧縮装置。
The difficulty level data calculating means includes, as the difficulty level data, an ME residual of a picture compressed into a P picture or a B picture, and flatness, intra AC data, activity and global complexity of a picture compressed into an I picture, The video data compression apparatus according to claim 6, wherein a combination of these is calculated.
前記データ量割当手段は、前記VBVバッファの占有データ量の前記所定の閾値として、最新のIピクチャーのデータ量に、生成した前記圧縮映像データのデータレートに応じた加算値、または、固定の加算値を加算した数値を用いる
請求項6に記載の映像データ圧縮装置。
The data amount allocating means adds, as the predetermined threshold value of the occupied data amount of the VBV buffer, an addition value corresponding to the data rate of the generated compressed video data or a fixed addition to the latest I picture data amount The video data compression apparatus according to claim 6, wherein a numerical value obtained by adding values is used.
前記データ量割当手段は、前記VBVバッファの占有データ量が所定の閾値以上であるか否かの判断を、前記圧縮手段が、前記非圧縮映像データをPピクチャーに圧縮した直後に行う
請求項8に記載の映像データ圧縮装置。
9. The data amount allocation unit determines whether or not the amount of data occupied by the VBV buffer is equal to or greater than a predetermined threshold immediately after the compression unit compresses the uncompressed video data into a P picture. The video data compression apparatus described in 1.
動画の非圧縮映像データを、圧縮後の映像データ(圧縮映像データ)をバッファリングするVBVバッファに基づいて定まる条件を満たすデータレートに圧縮する映像データ圧縮方法であって、
前記VBVバッファがアンダーフローを生じるまでのデータ量、および、前記非圧縮映像データのピクチャーの映像の複雑さに基づいて、所定数の前記非圧縮映像データのピクチャーに圧縮後のデータ量(割当データ量)を割り当て、
前記非圧縮映像データのピクチャーの映像の複雑さ、および、算出した前記割当データ量に基づいて、前記非圧縮映像データの圧縮後のデータ量の目標値をピクチャーごとに算出し、
前記非圧縮映像データを所定の圧縮方法により、圧縮後のデータ量が算出した前記目標値になるように圧縮する
映像データ圧縮方法。
A video data compression method for compressing uncompressed video data of a moving image to a data rate that satisfies a condition determined based on a VBV buffer that buffers compressed video data (compressed video data),
Based on the amount of data until the VBV buffer underflows and the complexity of the picture of the uncompressed video data picture, the amount of data (allocated data) after being compressed into a predetermined number of pictures of the uncompressed video data Amount)
Based on the complexity of the picture of the picture of the uncompressed video data and the calculated allocation data amount, a target value of the data amount after compression of the non-compressed video data is calculated for each picture,
A video data compression method in which the uncompressed video data is compressed by a predetermined compression method so that the amount of data after compression becomes the calculated target value.
前記非圧縮映像データのピクチャーの映像の複雑さを示すデータとして、前記非圧縮映像データの圧縮後のデータ量を用いる
請求項10に記載の映像データ圧縮方法。
The video data compression method according to claim 10, wherein a data amount after compression of the non-compressed video data is used as data indicating the complexity of a picture of the picture of the non-compressed video data.
前記VBVバッファの占有データ量が所定の閾値以上である場合に、算出した前記難度データに基づいて、前記非圧縮映像データの映像が複雑であればあるほど前記割当データ量の値を大さくし、
前記非圧縮映像データの映像が複雑であればあるほど前記目標値の値を大きくし、前記非圧縮映像データの映像が簡単であればあるほど前記目標値の値を小さくする
請求項10に記載の映像データ圧縮方法。
When the occupied data amount of the VBV buffer is equal to or greater than a predetermined threshold, based on the calculated difficulty data, the more complex the video of the uncompressed video data, the larger the value of the allocated data amount,
11. The target value is increased as the video of the uncompressed video data is more complex, and the target value is decreased as the video of the uncompressed video data is simpler. Video data compression method.
前記圧縮映像データに与えられる全てのデータ量を全てのピクチャーに均等に配分した基準値を、生成した前記圧縮映像データのピクチャーのデータ量から減算して差分値を算出し、前記非圧縮映像データの圧縮が終了した場合に、算出した差分値の総和が負値の0に近い値になるように前記割当データ量を算出する
請求項12に記載の映像データ圧縮方法。
The difference value is calculated by subtracting the reference value in which all the data amount given to the compressed video data is evenly distributed to all the pictures from the picture data amount of the generated compressed video data, and the uncompressed video data 13. The video data compression method according to claim 12, wherein when the compression of is completed, the allocated data amount is calculated so that the sum of the calculated difference values becomes a value close to a negative value of zero.
前記非圧縮映像データを、複数の種類のピクチャー(Iピクチャー、PピクチャーおよびBピクチャーまたはこれらの組み合わせ)を所定の順番で含むピクチャータイプシーケンスに圧縮する
請求項12に記載の映像データ圧縮方法。
The video data compression method according to claim 12, wherein the uncompressed video data is compressed into a picture type sequence including a plurality of types of pictures (I picture, P picture and B picture, or a combination thereof) in a predetermined order.
最新のピクチャーの難度データを所定数のピクチャーの難度データの総和を除算した値に、算出した前記割当データ量を乗算して前記目標値を算出する
請求項13に記載の映像データ圧縮方法。
The video data compression method according to claim 13, wherein the target value is calculated by multiplying the calculated amount of assigned data by a value obtained by dividing the difficulty data of the latest picture by the sum of the difficulty data of a predetermined number of pictures.
前記難度データとして、PピクチャーまたはBピクチャーに圧縮されるピクチャーのME残差、および、Iピクチャーに圧縮されるピクチャーのフラットネス、イントラACデータ、アクティビティおよびグローバルコンプレクシティまたはこれらの組み合わせを算出する
請求項13に記載の映像データ圧縮方法。
As the difficulty data, an ME residual of a picture compressed into a P picture or a B picture, and flatness, intra AC data, activity and global complexity of a picture compressed into an I picture, or a combination thereof are calculated. Item 14. The video data compression method according to Item 13.
前記VBVバッファの占有データ量の前記所定の閾値として、最新のIピクチャーのデータ量に、生成した前記圧縮映像データのデータレートに応じた加算値、または、固定の加算値を加算した数値を用いる
請求項13に記載の映像データ圧縮方法。
As the predetermined threshold value of the occupied data amount of the VBV buffer, a value obtained by adding an addition value corresponding to the data rate of the generated compressed video data or a fixed addition value to the data amount of the latest I picture is used. The video data compression method according to claim 13.
前記VBVバッファの占有データ量が所定の閾値以上であるか否かの判断は、前記非圧縮映像データをPピクチャーに圧縮した直後に行う
請求項17に記載の映像データ圧縮方法。
The video data compression method according to claim 17, wherein the determination as to whether or not the amount of data occupied by the VBV buffer is equal to or greater than a predetermined threshold is performed immediately after the uncompressed video data is compressed into a P picture.
JP2006270958A 2006-10-02 2006-10-02 Video data compression apparatus and method thereof Pending JP2007053788A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006270958A JP2007053788A (en) 2006-10-02 2006-10-02 Video data compression apparatus and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006270958A JP2007053788A (en) 2006-10-02 2006-10-02 Video data compression apparatus and method thereof

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP22964896A Division JP3918208B2 (en) 1996-08-30 1996-08-30 Video data compression apparatus and method

Publications (1)

Publication Number Publication Date
JP2007053788A true JP2007053788A (en) 2007-03-01

Family

ID=37917848

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006270958A Pending JP2007053788A (en) 2006-10-02 2006-10-02 Video data compression apparatus and method thereof

Country Status (1)

Country Link
JP (1) JP2007053788A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2129132A2 (en) 2008-05-28 2009-12-02 Fujitsu Limited Encoding/decoding device, encoding/decoding method and storage medium
JP2010541469A (en) * 2007-10-05 2010-12-24 トムソン ライセンシング Method and apparatus for rate control accuracy in video encoding and decoding

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010541469A (en) * 2007-10-05 2010-12-24 トムソン ライセンシング Method and apparatus for rate control accuracy in video encoding and decoding
US9979972B2 (en) 2007-10-05 2018-05-22 Thomson Licensing Dtv Method and apparatus for rate control accuracy in video encoding and decoding
EP2129132A2 (en) 2008-05-28 2009-12-02 Fujitsu Limited Encoding/decoding device, encoding/decoding method and storage medium
US8761246B2 (en) 2008-05-28 2014-06-24 Fujitsu Limited Encoding/decoding device, encoding/decoding method and storage medium

Similar Documents

Publication Publication Date Title
KR100756596B1 (en) Video data encoder and video data encoding method
Ribas-Corbera et al. Rate control in DCT video coding for low-delay communications
KR100512389B1 (en) Image data compression device and method
JP5180294B2 (en) Buffer-based rate control that utilizes frame complexity, buffer level, and intra-frame location in video encoding
EP1445958A1 (en) Quantization method and system, for instance for video MPEG applications, and computer program product therefor
JPH1075451A (en) Device and method for compressing video data
EP0755610A1 (en) Method and device for transcoding video signals
Xu et al. Window-level rate control for smooth picture quality and smooth buffer occupancy
WO2000018137A1 (en) Frame-level rate control for video compression
JP4221655B2 (en) Encoding apparatus, encoding method, program, and recording medium
JP2000197049A (en) Dynamic image variable bit rate encoding device and method therefor
JP2006295449A (en) Rate converting method and rate converter
Ngan et al. Improved single-video-object rate control for MPEG-4
JPH10191343A (en) Device and method for compressing video data
JP2000261800A (en) Variable bit rate moving picture encoding method and device
JP2001028753A (en) Dynamic image coder and its method
JP2004328150A (en) Moving picture coding apparatus and method
JP2007053788A (en) Video data compression apparatus and method thereof
JP3918208B2 (en) Video data compression apparatus and method
JP4186543B2 (en) Encoding apparatus, encoding method, program, and recording medium
JP3889552B2 (en) Code amount allocation apparatus and method
JPH1075444A (en) Video data compressor and its method
JP3765129B2 (en) Encoding apparatus and encoding method
JP2007116655A (en) Moving picture coding apparatus
JP3800965B2 (en) Data rate converter

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090526

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20091006