JP2007053788A - Video data compression apparatus and method thereof - Google Patents
Video data compression apparatus and method thereof Download PDFInfo
- 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
Links
Images
Abstract
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
As shown in FIG. 1, the video
With these components, the video
映像データ圧縮装置1において、ホストコンピュータ20は、映像データ圧縮装置1の各構成部分の動作を制御する。また、ホストコンピュータ20は、簡易2パス処理部16のエンコーダ162が非圧縮映像データVINを予備的に圧縮符号化して生成した圧縮映像データのデータ量、DCT処理後の映像データの直流成分(DC成分)の値および直流成分(AC成分)の電力値を制御信号C16を介して受け、受けたこれらの値に基づいて圧縮映像データの絵柄の難度を算出する。さらに、ホストコンピュータ20は、算出した難度に基づいて、エンコーダ18が生成する圧縮映像データの目標データ量Tj を制御信号C18を介してピクチャーごとに割り当て、エンコーダ18の量子化回路166(図3)に設定し、エンコーダ18の圧縮率をピクチャー単位に適応的に制御する。
In the video
エンコーダ制御部12は、非圧縮映像データVINのピクチャーの有無をホストコンピュータ20に通知し、さらに、非圧縮映像データVINのピクチャーごとに圧縮符号化のための前処理を行う。つまり、エンコーダ制御部12は、入力された非圧縮映像データを符号化順に並べ替え、ピクチャー・フィールド変換を行い、非圧縮映像データVINが映画の映像データである場合に3:2プルダウン処理(映画の24フレーム/秒の映像データを、30フレーム/秒の映像データに変換し、冗長性を圧縮符号化前に取り除く処理)等を行い、映像データS12として簡易2パス処理部16のFIFOメモリ160およびエンコーダ162に対して出力する。
動き検出器14は、非圧縮映像データの動きベクトルの検出を行い、エンコーダ制御部12およびエンコーダ162,18に対して出力する。
The
The
簡易2パス処理部16において、FIFOメモリ160は、エンコーダ制御部12から入力された映像データS12を、例えば、非圧縮映像データVINが、L(Lは整数)ピクチャー入力される時間だけ遅延し、遅延映像データS16としてエンコーダ18に対して出力する。
In the simple 2-
図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
For example, as shown in FIG. 2, the
加算回路164は、加算回路176の出力データを映像データS12から減算し、DCT回路166に対して出力する。
DCT回路166は、加算回路164から入力される映像データを、例えば、16画素×16画素のマクロブロック単位に離散コサイン変換(DCT)処理し、時間領域のデータから周波数領域のデータに変換して量子化回路168に対して出力する。また、DCT回路166は、DCT後の映像データのDC成分の値およびAC成分の電力値をホストコンピュータ20に対して出力する。
The
The
量子化回路168は、DCT回路166から入力された周波数領域のデータを、固定の量子化値Qで量子化し、量子化データとして可変長符号化回路170および逆量子化回路172に対して出力する。
可変長符号化回路170は、量子化回路168から入力された量子化データを可変長符号化し、可変長符号化の結果として得られた圧縮映像データのデータ量を、制御信号C16を介してホストコンピュータ20に対して出力する。
逆量子化回路172は、可変長符号化回路168から入力された量子化データを逆量子化し、逆量子化データとして逆DCT回路174に対して出力する。
The
The variable-
The
逆DCT回路174は、逆量子化回路172から入力される逆量子化データに対して逆DCT処理を行い、加算回路176に対して出力する。
加算回路176は、動き補償回路178の出力データおよび逆DCT回路174の出力データを加算し、加算回路164および動き補償回路178に対して出力する。
動き補償回路178は、加算回路176の出力データに対して、動き検出器14から入力される動きベクトルに基づいて動き補償処理を行い、加算回路176に対して出力する。
The
The
The
図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
As shown in FIG. 3, the
エンコーダ18において、量子化制御回路180は、可変長量子化回路170が出力する圧縮映像データVOUTのデータ量を順次、監視し、遅延映像データS16の第j番目のピクチャーから最終的に生成される圧縮映像データのデータ量が、ホストコンピュータ20から設定された目標データ量Tj に近づくように、順次、量子化回路168に設定する量子化値Qj を調節する。
また、可変長量子化回路170は、圧縮映像データVOUTを外部に出力する他に、遅延映像データS16を圧縮符号化して得られた圧縮映像データVOUTの実際のデータ量Sj を制御信号C18を介してホストコンピュータ20に対して出力する。
In the
In addition to outputting the compressed video data VOUT to the outside, the variable
以下、第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
4A to 4C are diagrams illustrating a simple two-pass encoding operation of the video
The
It should be noted that the picture order rearrangement by the
FIFOメモリ160は、入力された映像データS12の各ピクチャーをLピクチャー分だけ遅延し、エンコーダ18に対して出力する。
エンコーダ162は、入力された映像データS12のピクチャーを予備的に順次、圧縮符号化し、第j(jは整数)番目のピクチャーを圧縮符号化して得られた圧縮符号化データのデータ量、DCT処理後の映像データのDC成分の値、および、AC成分の電力値をホストコンピュータ20に対して出力する。
The
The
例えば、エンコーダ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
ホストコンピュータ20は、下に示す式1により、エンコーダ18が遅延映像データS16の第j番目のピクチャーを圧縮符号化して得られる圧縮映像データに割り当てる目標データ量Tj を算出し、算出した目標データ量Tj を量子化制御回路180に設定する。
The
但し、式1において、Dj は映像データS12の第j番目のピクチャーの実難度データであり、R’j は、映像データS12,S16の第j番目〜第(j+L−1)番目のピクチャーに割り当てることができる目標データ量の平均であり、R’j の初期値(R’1 )は、圧縮映像データの各ピクチャーに平均して割り当て可能な目標データ量であり、下に示す式2で表され、エンコーダ18が圧縮映像データを1ピクチャー分生成する度に、式3に示すように更新される。
In
なお、式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
The
The
The variable
同様に、図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
Has already been calculated by the
ホストコンピュータ20は、式1により、エンコーダ18が遅延映像データS16の第(j+1)番目のピクチャーを圧縮符号化して得られる圧縮映像データに割り当てる目標データ量Tj+1 を算出し、エンコーダ18の量子化制御回路180に設定する。
The
エンコーダ18は、ホストコンピュータ20から量子化制御回路180に設定された目量データ量Tj に基づいて第(j+1)番目のピクチャーを圧縮符号化し、目標データ量Tj+1 に近いデータ量の圧縮映像データVOUTを生成して出力する。
さらに以下、同様に、映像データ圧縮装置1は、遅延映像データS16の第k番目のピクチャーを、量子化値Qk (k=j+2,j+3,…)をピクチャーごとに変更して順次、圧縮符号化し、圧縮映像データVOUTとして出力する。
The
Similarly, the video
以上説明したように、第1の実施形態に示した映像データ圧縮装置1によれば、短時間で非圧縮映像データVINの絵柄の難度を算出し、算出した難度に応じた圧縮率で適応的に非圧縮映像データVINを圧縮符号化することができる。つまり、第1の実施形態に示した映像データ圧縮装置1によれば、2パスエンコード方式と異なり、ほぼ実時間的に、非圧縮映像データVINの絵柄の難度に基づいて適応的に非圧縮映像データVINを圧縮符号化をすることができ、実況放送といった実時間性を要求される用途に応用可能である。
なお、第1の実施形態に示した他、本発明に係るデータ多重化装置1は、エンコーダ162が圧縮符号化した圧縮映像データのデータ量を、そのまま難度データとして用い、ホストコンピュータ20の処理の簡略化を図る等、種々の構成を採ることができる。
As described above, according to the video
In addition to the one shown in the first embodiment, the
第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
FIG. 6 is a diagram showing a detailed configuration of the
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
図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
As shown in FIG. 6, the
エンコーダ制御部22は、エンコーダ制御部12と同様に、非圧縮映像データVINのピクチャーの有無をホストコンピュータ20に通知し、さらに、非圧縮映像データVINのピクチャーごとに圧縮符号化のための前処理を行う。
エンコーダ制御部22において、映像並び替え回路220は、入力された非圧縮映像データを符号化順に並べ替える。
Similar to the
In the
走査変換・マクロブロック化回路222は、ピクチャー・フィールド変換を行い、非圧縮映像データVINが映画の映像データである場合に3:2プルダウン処理等を行う。
統計量算出回路224は、映像並び替え回路220および走査変換・マクロブロック化回路222により処理され、Iピクチャーに圧縮符号化されるピクチャーからフラットネス(flatness)およびイントラAC(intra AC)等の統計量を算出する。
The scan conversion /
The
映像データ圧縮装置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
In the video
なお、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
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
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
以下、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
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
図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
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
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
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.
図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
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.
さらに、第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
以下、実難度データDj をME残差、フラットネスおよびイントラACで近似し、簡易2パスエンコード方式により非圧縮映像データを圧縮符号化する場合を例に、映像データ圧縮装置2の動作を説明する。
エンコーダ制御部22において、映像並び替え回路220は、非圧縮映像データVINを符号化順にピクチャーを並べ替え、走査変換・マクロブロック化回路222は、ピクチャー・フィールド変換等を行い、統計量算出回路224は、Iピクチャーに圧縮符号化されるピクチャーに対して、図9および式4に示した演算処理を行い、フラットネスおよびイントラAC等の統計量を算出する。
Hereinafter, the operation of the video
In the
動き検出器14は、PピクチャーおよびBピクチャーに圧縮符号化されるピクチャーについて動きベクトルを生成し、さらに、ME残差を算出する。
FIFOメモリ160は、入力された映像データをLピクチャー分だけ遅延する。
The
The
ホストコンピュータ20は、動き検出器14が生成したME残差に対して式5および式6に示した演算処理を行って実難度データDj を近似し、式5および式6と同様な演算処理を行って、フラットネスおよびイントラACにより実難度データDj を近似する。
さらに、ホストコンピュータ20は、近似した実難度データDj を式1に代入し、目標データ量Tj を算出し、算出した目標データ量Tj をエンコーダ18の量子化制御回路180に設定する。
The
Further, the
エンコーダ18のDCT回路166は、遅延した映像データの第j番目のピクチャーをDCT処理する。
量子化回路168は、DCT回路166から入力された第j番目のピクチャーの周波数領域のデータを、量子化制御回路180が目標データ量Tj に基づいて調節する量子化値Qj により量子化する。
可変長符号化回路170は、量子化回路168から入力された第j番目のピクチャーの量子化データを可変長符号化して、ほぼ、目標データ量Tj に近いデータ量の圧縮映像データVOUTを生成して、バッファメモリ182を介して外部に出力する。
The
The
The variable
なお、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
また、以上、第1の実施形態に示した簡易2パスエンコードを行う場合を例に、映像データ圧縮装置2の動作を説明したが、映像データ圧縮装置2は、予測簡易2パスエンコードを行いうることはいうまでもない。
また、第2の実施形態に示した映像データ圧縮装置2に対しても、第1の実施形態示した映像データ圧縮装置1に対してと同様の変形が可能である。
In the above, the operation of the video
Further, the video
第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
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
In FIG. 13, the same components as those of the
エンコーダ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
エンコーダ26は、これらの構成部分により、1つのエンコーダのみにより圧縮映像データのデータ量により量子化回路168の量子化処理に対するフィードバック制御を行い、非圧縮映像データの部分ごとに絵柄に応じたデータ量を割り当てて圧縮映像データを生成し、圧縮映像データの品質を向上させる。
The
エンコーダ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
Operation of the
なお、グローバルコンプレクシティ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
目標データ量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
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
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
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
このように、映像データ圧縮装置1,2において、パラメータRの値が極端に小さくなったり負数になってしまうことがあるのは、ホストコンピュータ20(図1,図5)が、レート制御の制御単位であるGOPそれぞれのデータ量を一定に保つように、GOPの前半のピクチャーに対して多く割り当てすぎたデータ量を、GOPの後半のピクチャーに対してデータ量を少なく割り当てることにより補償するようにデータ量を割り当てるからである。ホストコンピュータ20において、パラメータRは、このように、GOPといった比較的短い期間におけるデータ量の補償処理に用いられる。
As described above, in the video
一方、エンコーダ26の目標データ量算出回路264においては、このような短い制御単位でデータ量を一定にするためのパラメータRのみでレート制御を行うのではなく、VBVバッファの制約条件の範囲内で、長期間におけるデータ量が一定になるように、残りのデータ量を均等に割り当てるパラメータRj ’を制御する。
On the other hand, the target data amount
つまり、目標データ量算出回路264はパラメータRj ’を制御し、非圧縮映像データのある期間に含まれるピクチャーに対して過剰に割り当てデータ量を、データ量を少なく割り当てると圧縮映像データの品質が劣化しそうな期間では補償せず、絵柄が簡単で、少ないデータ量を割り当てても圧縮映像データの品質の劣化が少ない期間で補償するように目標データ量Tj を調節する。
さらに、目標データ量算出回路264は、エンコーダ26が1枚のピクチャーを圧縮符号化するたびに、式3と同様の処理を行ってパラメータRj ’の値を更新する。
That is, the target data amount
Furthermore, the target data amount
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
なお、以上説明したVBVバッファの占有量Bn を考慮したレート制御を実現するために、目標データ量算出回路264は、以下に説明する処理をさらに行う。
つまり、目標データ量算出回路264は、映像データの映像が複雑な部分に多く割り当てるデータ量を、エンコーダ26が出力する圧縮映像データのデータレートではなく、VBVバッファがアンダーフローするまでのデータ量に基づいて求める。
Note that the target data amount
In other words, the target data amount
また、目標データ量算出回路264は、映像データの映像が複雑な部分に、所定のデータレートよりも多く割り当てるデータ量の合計値(借金額)をパラメータsum-supplement(初期値0)として記憶し、所定数のピクチャーの実難度データDj の値の合計が小さくなった際にパラメータsum-supplementの値を減ずるようにレート制御を行い、非圧縮映像データの圧縮符号化が終了した時点でのパラメータsum-supplementの値が0にごく近い負値になるようにレート制御を行う。ただし、目標データ量算出回路264は、VBVバッファの占有量Bn が少ない場合には、実難度データDj の値にかかわらず、映像データの各ピクチャーの目標データ量Tj の値が小さくなるようにレート制御を行い、アンダーフローの発生を防ぐ。
In addition, the target data amount
目標データ量算出回路264の処理内容のまとめ
以下、さらに、図14および数式を参照して、目標データ量算出回路264による目標データ量Tj を詳細に説明する。
図14は、図13に示した目標データ量算出回路264の処理を示すフローチャート図である。
図14に示すように、ステップ500(S500)において、目標データ量算出回路264は、VBVバッファの占有量Bn をチェックし、VBVバッファに十分な量の圧縮映像データがバッファリングされており、アンダーフローが生じない余裕があるか否かを判断し、余裕がある場合にはS502の処理に進み、余裕がない場合にはS512の処理に進む。
Summary of processing contents of target data amount
FIG. 14 is a flowchart showing processing of the target data amount
As shown in FIG. 14, in step 500 (S500), the target data amount
なお、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.
なお、式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
また、目標データ量算出回路264は、S500の処理におけるVBVバッファの占有量Bn の判断を、エンコーダ26がピクチャを圧縮符号化するごとに行う必要は必ずしもなく、例えば、エンコーダ26がPピクチャーを生成した直後にのみ行ってもよい。
Further, the target data amount
これは、以下の理由による。つまり、エンコーダ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
ステップ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
ステップ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
ステップ506(S506)において、目標データ量算出回路264は、例えば、下の式10−1により、パラメータRj ’に加算(補給)するデータ量(補給データ量)supplementを算出する。なお、式10−1中のパラメータβ(0<β<1)は、式10−2に示すように定義され、VBVバッファがアンダーフローを生じるまでのデータ量を判断するためのパラメータであり、パラメータβの値が大きく、VBVバッファのアンダーフローに対する余裕が大きければ大きいほどほど、補給データ量supplementの値は大きくなる。
In step 506 (S506), the target data amount
また、式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.
ステップ508(S508)において、目標データ量算出回路264は、パラメータsum-supplementが正値であり、映像データの絵柄が複雑な部分に補給した補給データ量supplementが、完全には補償されていない(借金がある)状態にあるか否かを判断する。借金がある場合にはS510の処理に進み、借金がない場合にはS512の処理に進む。
In step 508 (S508), the target data amount
ステップ510(S510)において、目標データ量算出回路264は、映像データの絵柄が複雑な部分に補給した補給データ量supplementを補償するために、式10−1のパラメータβの値を1とし、下の式12に示す負値の補給データ量supplementを算出する。負値の補給データ量supplementをパラメータRj ’に加算する(S514)ことにより、圧縮映像データのデータ量が減少してパラメータsum-supplementを0に近づけること(借金の返済)ができる。
In step 510 (S510), the target data amount
ステップ512(S512)において、目標データ量算出回路264は、VBVバッファにアンダーフローが生じる可能性があると判断し、下の式13により負値の補給データ量supplementを算出する。負値の補給データ量supplementをパラメータRj ’に加算する(S514)ことにより、圧縮映像データのデータ量が減少し、VBVバッファのアンダーフローが防止される。
In step 512 (S512), the target data amount
ステップ514(S514)において、目標データ量算出回路264は、下の式14,式15によりパラメータRj ’,sum-supplementを更新する。
In step 514 (S514), the target data amount
ステップ516(S516)において、目標データ量算出回路264は、下式16に示すように目標データ量Tj を算出し、量子化インデックス生成回路266に対して出力する。
In step 516 (S516), the target data amount
ただし、式16において、NI ,Np ,NB はそれぞれ、1GOP中に現れるIピクチャー、PピクチャーおよびBピクチャーの数を示し、1GOPの構成がN=1,M=3である場合には、NI =1,Np =4,NB =10である。
In
ステップ518(S518)において、量子化インデックス生成回路266は、目標データ量算出回路264が生成した目標データ量Tj に基づいて量子化インデックスQINDを生成し、量子化回路168に対して出力する。
In step 518 (S518), the quantization
ステップ520(S520)において、エンコーダ26の量子化制御部260以外の構成部分は、量子化インデックス生成回路266が生成した量子化インデックスQINDに基づいて非圧縮映像データを圧縮符号化する。
ステップ522(S522)において、目標データ量算出回路264は、変数jをインクリメントする。
In step 520 (S520), the components other than the
In step 522 (S522), the target data amount
量子化インデックス生成回路266の動作
以下、再び図13を参照して、量子化インデックス生成回路266の動作(処理)を説明する。
量子化インデックス生成回路266は、例えば、MPEG方式のTM5の第2段階および第3段階(ステップ2,ステップ3)と同様に、目標データ量算出回路264から入力された目標データ量Tj 、および、GC算出回路262から入力されたグローバルコンプレクシティXI ,Xp ,XB から量子化インデックスQINDを生成し、量子化回路168に対して出力する。
Operation of Quantization
The quantization
なお、量子化インデックスは、量子化回路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
以下、エンコーダ26(図13)の動作を説明する。
動き検出器14は、第1の実施形態においてと同様に、動きベクトルの生成等の処理を行う。
エンコーダ制御部22は、第1の実施形態と同様に、ピクチャーの並び替え処理等を行う。
Hereinafter, the operation of the encoder 26 (FIG. 13) will be described.
The
The
エンコーダ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
The target data amount
量子化インデックス生成回路266は、算出された目標データ量Tj およびグローバルコンプレクシティXI ,Xp ,XB に基づいて、量子化インデックスを算出し、エンコーダ26の量子化回路168に設定する。
DCT回路166は、第1の実施形態および第2の実施形態においてと同様に、次のピクチャーに対してDCT処理を行う。
The quantization
The
量子化回路168は、DCT処理された映像データを、設定された量子化インデックスを量子化値Qj に変換し、得られた量子化値Qj により量子化処理を行う。
可変長符号化回路170は、第1の実施形態および第2の実施形態においてと同様に、変長符号化を行い、ほぼ、目標データ量Tj に近いデータ量の圧縮映像データを生成し、バッファメモリ182を介して出力する。
The
The variable-
なお、第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
Further, even if the target data amount
また、エンコーダ26において量子化制御部260が行った処理を、映像データ圧縮装置1,2(図1〜図3,図5,図6)においてホストコンピュータ20が行うことも可能である。
また、第3の実施形態に示した各パラメータを定義する式は例示であり、エンコーダ26の構成・用途に合わせて、各式を変更することができる。
また、第3の実施形態に示したエンコーダ26に対しては、第1の実施形態および第2の実施形態に示した変形が可能である。
In addition, the processing performed by the
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
Further, the
図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
15 changes in a large range as shown in FIG. 15, compared with the case where the video
Also, according to the
第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
18 is a diagram illustrating a configuration of the
16 to 18, the configuration of the video
図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
Also, as shown in FIG. 17, the
量子化制御部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
映像データ圧縮装置4は、これらの構成部分により、1つのエンコーダのみにより圧縮映像データのデータ量により量子化回路168の量子化処理に対するフィードフォワード制御を行い、非圧縮映像データの部分ごとに絵柄に応じたデータ量を割り当てて圧縮映像データを生成し、圧縮映像データの品質を向上させる。
The video data compression apparatus 4 performs feedforward control for the quantization processing of the
映像データ圧縮装置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,
Actual difficulty level
目標データ量算出回路284の動作
目標データ量算出回路284は、エンコーダ26(図13)の目標データ量算出回路264と同様に、第1の実施形態において式1に示した処理を行い、実難度データ算出回路282から入力された実難度データDj 、および、パラメータ算出回路286から入力されるパラメータRj ’に基づいて、各ピクチャータイプのピクチャーそれぞれの目標データ量Tj を算出してレート制御を行う。
Operation of Target Data
パラメータ算出回路286の動作
パラメータ算出回路286は、エンコーダ26の目標データ量算出回路264(図13)と同様に、式8〜式15および図14に示した処理を行ってパラメータRj ’を調節し、更新する。ただし、パラメータ算出回路286は、図14に示したS516の処理において、式16の代わりに式1により、目標データ量Tj を算出し、量子化インデックス生成回路288に対して出力する。
Operation of
量子化インデックス生成回路288の動作
量子化インデックス生成回路288は、エンコーダ26の量子化インデックス生成回路266(図13)と同様に、目標データ量算出回路284から入力された目標データ量Tj に基づいて量子化インデックスQINDを生成し、量子化回路168に対して出力する。
Operation of Quantization
以下、映像データ圧縮装置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
パラメータ算出回路286は、式8〜式15に示したように、VBVバッファの占有量および映像データの絵柄の複雑さに応じてパラメータRj ’を調節し、レート制御を行う。
目標データ量算出回路284は、パラメータ算出回路286が調節したパラメータRj ’を、式1に代入し、目標データ量Tj を算出する。
As shown in Expressions 8 to 15, the
The target data amount
量子化インデックス生成回路288は、算出された目標データ量Tj から量子化インデックスQINDを算出する。
エンコーダ28の量子化制御部280以外の部分は、パラメータ算出回路286が算出した量子化インデックスQINDを用いて非圧縮映像データを圧縮符号化する。
The quantization
The parts other than the
なお、第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
Further, the processing performed by the
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
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 ′ (
例えば、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
本発明の第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
第5の実施形態において、エンコーダ26は、第3の実施形態においてと同様に、VBVバッファの占有量Bn およびグローバルコンプレクシティXI ,Xp
,XB に基づいて目標データ量Tj をフィードバック制御し、さらに、パラメータRj ’が所定の下限値以下になることを制限することにより、第3の実施形態におけるレート制御と同様な効果を得るとともに、圧縮映像データの品質の著しい低下を防ぐ。
In the fifth embodiment, as in the third embodiment, the
, 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
As in the third embodiment, the target data amount
レート制御方法
目標データ量算出回路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
However, unlike in the third embodiment, in the fifth embodiment, the target data amount
第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
また、目標データ量算出回路264は、第3の実施形態においてと同様に、映像データの映像が複雑な部分に多く割り当てるデータ量の合計値(借金額)をパラメータsum-supplementとして記憶する。従って、パラメータRj ’の値を上述のように下限値Rmin に制限しない場合には、式15に示したようにパラメータsum-supplementの更新を行い、パラメータRj ’の値を下限値Rmin に制限した場合には、下式18に示すように補給データ量supplementを累加算してパラメータsum-supplementの更新を行う。
Further, the target data amount
目標データ量算出回路264の処理内容のまとめ
以下、さらに、図19を参照して、第5の実施形態における目標データ量算出回路264によるレート制御処理を詳細に説明する。
図19は、第5の実施形態における目標データ量算出回路264の処理を示すフローチャート図である。
図19に示すように、目標データ量算出回路264は、第3の実施形態において図14に示した各処理と同様の処理を行う。
Summary of Processing Content of Target Data
FIG. 19 is a flowchart showing the processing of the target data amount
As illustrated in FIG. 19, the target data amount
ステップ600(S600)において、目標データ量算出回路264は、VBVバッファの占有量Bn に応じてS602またはS612の処理に進む。なお、目標データ量算出回路264は、S600の処理におけるVBVバッファの占有量Bn の判断を、エンコーダ26がPピクチャーを生成した直後にのみ行ってもよい。
In step 600 (S600), the target data amount
ステップ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
In step 604 (S604), the target data amount
ステップ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
In step 608 (S608), the target data amount
In step 610 (S610), the target data amount
ステップ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
In step 614 (S614), the target data amount
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
In step 618 (S618), the
In step 620 (S620), the target data amount
ステップ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
In step 624 (S624), the target data amount
ステップ626(S626)において、目標データ量算出回路264は、式18によりパラメータsum-supplementを更新する。
ステップ628(S628)において、目標データ量算出回路264は、変数jをインクリメントする。
In step 626 (S626), the target data amount
In step 628 (S628), the target data amount
以下、第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
The
The
エンコーダ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
The target data amount
量子化インデックス生成回路266は、算出された目標データ量Tj およびグローバルコンプレクシティXI ,Xp ,XB に基づいて、量子化インデックスを算出し、エンコーダ26の量子化回路168に設定する。
DCT回路166は、第1の実施形態等においてと同様に、次のピクチャーに対してDCT処理を行う。
The quantization
The
量子化回路168は、DCT処理された映像データを、設定された量子化インデックスを量子化値Qj に変換し、得られた量子化値Qj により量子化処理を行う。
可変長符号化回路170は、第1の実施形態等においてと同様に、変長符号化を行い、ほぼ、目標データ量Tj に近いデータ量の圧縮映像データを生成し、バッファメモリ182を介して出力する。
The
The variable
変形例
以下、第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
以下、図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
ステップ700(S700)において、映像データ圧縮装置1のホストコンピュータ20は、式1により目標データ量Tj を算出する。
ステップ702(S702)において、エンコーダ18は、量子化インデックスQINDを用いて圧縮符号化処理を行う。
ステップ704(S704)において、ホストコンピュータ20は、式3により、次のパラメータRj+1 ’を算出し、更新する。
In step 700 (S700), the
In step 702 (S702), the
In step 704 (S704), the
ステップ706(S706)において、ホストコンピュータ20は、次のパラメータRj+1 ’が下限値Rmin より大きいか否かを判断し、判断結果に応じてS712またはS608の処理に進む。
ステップ708(S708)において、ホストコンピュータ20は、次のパラメータRj+1 ’を下限値Rmin に制限する。
In step 706 (S706), the
In step 708 (S708), the
ステップ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
In step 712 (S712), the
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
また、図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
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
以上説明したように、第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
Operation of Target Data
パラメータ算出回路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
However, the
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
また、パラメータ算出回路286は、借金額をパラメータsum-supplementとして記憶する。従って、パラメータRj ’の値を上述のように下限値Rmin に制限しない場合には、式15に示したようにパラメータsum-supplementの更新を行い、パラメータRj ’の値を下限値Rmin に制限した場合には、式18に示したように補給データ量supplementを累加算してパラメータsum-supplementの更新を行う。
The
パラメータ算出回路286の処理内容のまとめ
以下、再び図19を参照して、第6の実施形態におけるパラメータ算出回路286によるレート制御処理および関連部分の処理の内容を詳細に説明する。
ステップ600(S600)において、パラメータ算出回路286は、VBVバッファの占有量Bn に応じてS602またはS612の処理に進む。なお、パラメータ算出回路286は、S600の処理におけるVBVバッファの占有量Bn の判断を、エンコーダ28がPピクチャーを生成した直後にのみ行ってもよい。
Summary of Processing Contents of
In step 600 (S600), the
ステップ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
In step 604 (S604), the
ステップ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
In step 608 (S608), the
In step 610 (S610), the
ステップ612(S612)において、パラメータ算出回路286は、式13により負値の補給データ量supplementを算出し、VBVバッファのアンダーフローを防止する。
ステップ614(S614)において、パラメータ算出回路286は、式14,式15によりパラメータRj ’,sum-supplementを算出し、パラメータRj ’が下限値Rmin 以下になる場合には、パラメータRj ’を下限値Rmin に制限する。
In step 612 (S612), the
In step 614 (S614), the
ステップ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
In step 618 (S618), the
In step 620 (S620), the
ステップ622(S622)において、パラメータ算出回路286は、次のパラメータRj+1 ’が下限値Rmin より大きいか否かを判断する。次のパラメータRj+1 ’が下限値Rmin より大きい場合にはS628の処理に進み、大きくない場合にはS624の処理に進む。
ステップ624(S624)において、パラメータ算出回路286は、次のパラメータRj+1 ’を下限値Rmin に制限する。
In step 622 (S622), the
In step 624 (S624), the
ステップ626(S626)において、パラメータ算出回路286は、式18によりパラメータsum-supplementを更新する。
ステップ628(S628)において、パラメータ算出回路286は、変数jをインクリメントする。
In step 626 (S626), the
In step 628 (S628), the
以下、第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
The
The
エンコーダ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
The
量子化インデックス生成回路288は、算出された目標データ量Tj に基づいて、量子化インデックスを算出し、エンコーダ28の量子化回路168に設定する。
DCT回路166は、第1の実施形態等においてと同様に、次のピクチャーに対してDCT処理を行う。
The quantization
The
量子化回路168は、DCT処理された映像データを、設定された量子化インデックスを量子化値Qj に変換し、得られた量子化値Qj により量子化処理を行う。
可変長符号化回路170は、第1の実施形態等においてと同様に、変長符号化を行い、ほぼ、目標データ量Tj に近いデータ量の圧縮映像データを生成し、バッファメモリ182を介して出力する。
The
The variable
変形例
以下、再び図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
ステップ700(S700)において、映像データ圧縮装置1のホストコンピュータ20は、式1により目標データ量Tj を算出する。
ステップ702(S702)において、エンコーダ18は、量子化インデックスQINDを用いて圧縮符号化処理を行う。
ステップ704(S704)において、ホストコンピュータ20は、式3により、次のパラメータRj+1 ’を算出し、更新する。
In step 700 (S700), the
In step 702 (S702), the
In step 704 (S704), the
ステップ706(S706)において、ホストコンピュータ20は、次のパラメータRj+1 ’が下限値Rmin より大きいか否かを判断し、判断結果に応じてS712またはS608の処理に進む。
ステップ708(S708)において、ホストコンピュータ20は、次のパラメータRj+1 ’を下限値Rmin に制限する。
In step 706 (S706), the
In step 708 (S708), the
ステップ710(S710)において、ホストコンピュータ20は、式18によりパラメータsum-supplementを更新する。
ステップ712(S712)において、ホストコンピュータ20は、変数jをインクリメントする。
In step 710 (S710), the
In step 712 (S712), the
また、図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.
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バッファにバッファリングされている前記圧縮映像データのデータ量(占有データ量)、および、算出した前記難度データに基づいて、所定数の非圧縮映像データのピクチャーに圧縮後のデータ量(割当データ量)を割り当てるデータ量割当手段と、
算出した前記難度データおよび前記割当データ量に基づいて、前記非圧縮映像データの圧縮後のデータ量の目標値をピクチャーごとに算出する目標値算出手段と、
前記非圧縮映像データを所定の圧縮方法により、圧縮後のデータ量が算出した前記目標値になるように圧縮する圧縮手段と
を有する映像データ圧縮装置。 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.
前記目標値算出手段は、前記非圧縮映像データの映像が複雑であればあるほど前記目標値の値を大きくし、前記非圧縮映像データの映像が簡単であればあるほど前記目標値の値を小さくする
請求項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.
請求項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.
請求項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.
請求項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.
請求項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.
請求項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バッファがアンダーフローを生じるまでのデータ量、および、前記非圧縮映像データのピクチャーの映像の複雑さに基づいて、所定数の前記非圧縮映像データのピクチャーに圧縮後のデータ量(割当データ量)を割り当て、
前記非圧縮映像データのピクチャーの映像の複雑さ、および、算出した前記割当データ量に基づいて、前記非圧縮映像データの圧縮後のデータ量の目標値をピクチャーごとに算出し、
前記非圧縮映像データを所定の圧縮方法により、圧縮後のデータ量が算出した前記目標値になるように圧縮する
映像データ圧縮方法。 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.
前記非圧縮映像データの映像が複雑であればあるほど前記目標値の値を大きくし、前記非圧縮映像データの映像が簡単であればあるほど前記目標値の値を小さくする
請求項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.
請求項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.
請求項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.
請求項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.
請求項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.
請求項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.
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)
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 |
-
2006
- 2006-10-02 JP JP2006270958A patent/JP2007053788A/en active Pending
Cited By (4)
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 |