JPH1066068A - Video data compressor and its method - Google Patents

Video data compressor and its method

Info

Publication number
JPH1066068A
JPH1066068A JP21470896A JP21470896A JPH1066068A JP H1066068 A JPH1066068 A JP H1066068A JP 21470896 A JP21470896 A JP 21470896A JP 21470896 A JP21470896 A JP 21470896A JP H1066068 A JPH1066068 A JP H1066068A
Authority
JP
Japan
Prior art keywords
picture
data
video data
compression
calculated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP21470896A
Other languages
Japanese (ja)
Other versions
JP3765130B2 (en
Inventor
Kanji Mihara
寛司 三原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP21470896A priority Critical patent/JP3765130B2/en
Publication of JPH1066068A publication Critical patent/JPH1066068A/en
Application granted granted Critical
Publication of JP3765130B2 publication Critical patent/JP3765130B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To obtain a video image with high quality by applying compression coding to video data nearly in real time. SOLUTION: An encoder control section 22 calculates a statistic variable such as intra-AC denoting complicatedness of a pattern of a video image, and a motion detector 14 calculates a motion predict error (ME residual error) respectively. A host computer 20 indicates a complicated pattern based on the statistic variable and the ME residual error, approximates real difficulty data Dj corresponding to the data amount after compression coding and calculates object data amount Tj denoting a data amount after compression. A quantization circuit 168 quantizes a j-th picture based on a quantization value Qj adjusted by a quantization control circuit 180 based on the object data amount Tj and calculates its mean value. The host computer 20 calculates a global complexity of a TM 5 of the MPEG based on the mean value of the quantization value Qj and a data amount of the j-th picture after the compression to update proportional coefficients εI, ε<p> , εB used for approximating the real difficulty data Dj .

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、非圧縮映像データ
を圧縮符号化する映像データ圧縮装置およびその方法に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a video data compression apparatus for compressing and encoding non-compressed video data and a method thereof.

【0002】[0002]

【従来の技術および発明が解決しようとする課題】非圧
縮のディジタル映像データをMPEG(moving picture
experts group)等の方法により、Iピクチャー(intra c
oded picture) 、Bピクチャー(bi-directionaly coded
picture) およびPピクチャー(predictive coded pict
ure)から構成されるGOP(group of pictures) 単位に
圧縮符号化して光磁気ディスク(MOディスク;magnet
o-optical disc)等の記録媒体に記録する際には、圧縮
符号化後の圧縮映像データのデータ量(ビット量)を、
伸長復号後の映像の品質を高く保ちつつ記録媒体の記録
容量以下、あるいは、通信回線の伝送容量以下にする必
要がある。
2. Description of the Related Art Uncompressed digital video data is stored in a moving picture (MPEG) format.
I-picture (intra c
oded picture), B picture (bi-directionaly coded
picture) and P-picture (predictive coded pict
ure), compression encoded in GOP (group of pictures) units, and a magneto-optical disk (MO disk;
When recording on a recording medium such as an o-optical disc, the data amount (bit amount) of the compressed video data after compression encoding is
It is necessary to keep the quality of the video after decompression decoding high, while keeping it below the recording capacity of the recording medium or below the transmission capacity of the communication line.

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

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

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

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
に、本発明に係る映像データ圧縮装置は、動画の非圧縮
映像データの複雑さをピクチャーごとに指標する指標デ
ータを算出する指標データ算出手段と、算出した前記指
標データに所定の係数を乗算する所定の演算処理を行
い、圧縮後のデータ量に対応する難度データを算出する
難度データ算出手段と、算出した前記難度データに基づ
いて、前記非圧縮映像データの圧縮後のデータ量の目標
値をピクチャーごとに算出する目標値算出手段と、前記
非圧縮映像データのピクチャーそれぞれを、所定の圧縮
方法により、圧縮後のデータ量が算出した前記目標値に
なるように圧縮して圧縮映像データを生成する圧縮手段
と、生成した圧縮映像データのデータ量に基づいて、前
記所定の係数を更新する係数更新手段とを有する。
In order to achieve the above object, a video data compression apparatus according to the present invention calculates index data for calculating the complexity of uncompressed video data of a moving picture for each picture. Means, performing a predetermined calculation process of multiplying the calculated index data by a predetermined coefficient, difficulty data calculation means for calculating difficulty data corresponding to the data amount after compression, based on the calculated difficulty data, A target value calculating means for calculating a target value of a data amount of the uncompressed video data after compression for each picture; and a picture data of the uncompressed video data, the compressed data amount is calculated by a predetermined compression method. A compression unit configured to generate compressed video data by compressing to the target value, and updating the predetermined coefficient based on a data amount of the generated compressed video data. And a that coefficient update means.

【0007】好適には、前記圧縮手段は、前記非圧縮映
像データを、複数の種類のピクチャー(Iピクチャー、
PピクチャーおよびBピクチャーまたはこれらの組み合
わせ)を所定の順番で含むピクチャータイプシーケンス
に圧縮し、前記指標データ算出手段は、Pピクチャーお
よびBピクチャーに圧縮されるピクチャーの前記指標デ
ータとしてME残差を算出し、Iピクチャーに圧縮され
るピクチャーの前記指標データとしてフラットネス、イ
ントラACデータおよびアクティビティまたはこれらの
組み合わせを算出する。
Preferably, the compression means converts the uncompressed video data into a plurality of types of pictures (I picture,
P picture and B picture or a combination thereof) in a predetermined order, and the index data calculating means calculates an ME residual as the index data of the picture compressed into the P picture and the B picture. Then, flatness, intra AC data, activity, or a combination thereof is calculated as the index data of the picture compressed into the I picture.

【0008】好適には、前記圧縮手段は、前記非圧縮映
像データに対して所定の圧縮処理を行う圧縮処理手段
と、前記所定の圧縮処理を行った映像データを、外部か
ら設定される量子化値で量子化し、前記圧縮映像データ
を生成する量子化手段と、算出した前記目標値に基づい
て、前記量子化値を順次、調節し、前記量子化手段に設
定する量子化値調節・設定手段とを有し、前記係数更新
手段は、前記圧縮手段の前記量子化手段に設定される前
記量子化値の平均値と、生成した前記圧縮映像データの
データ量と、算出した前記指標データとに基づいて、前
記所定の係数を更新する。
Preferably, the compression means includes a compression processing means for performing a predetermined compression processing on the uncompressed video data, and a video data which has been subjected to the predetermined compression processing, and A quantizing means for quantizing with a value to generate the compressed video data; and a quantizing value adjusting / setting means for sequentially adjusting the quantized value based on the calculated target value and setting the quantized value in the quantizing means. The coefficient update unit has an average value of the quantization values set in the quantization unit of the compression unit, a data amount of the generated compressed video data, and the calculated index data. The predetermined coefficient is updated based on the predetermined coefficient.

【0009】好適には、前記係数更新手段は、前記圧縮
手段の前記量子化手段に設定される前記量子化値の平均
値と、生成した前記圧縮映像データのデータ量とに基づ
いてグローバルコンプレクシティを算出するグローバル
コンプレクシティ算出手段と、算出した前記グローバル
コンプレクシティと前記指標データとに基づいて、前記
所定の係数を算出する係数算出手段とを有する。
[0009] Preferably, the coefficient updating means includes a global complexity based on an average value of the quantization values set in the quantization means of the compression means and a data amount of the generated compressed video data. And a coefficient calculating means for calculating the predetermined coefficient based on the calculated global complexity and the index data.

【0010】好適には、前記係数算出手段は、圧縮後に
Iピクチャーとなるピクチャーのグローバルコンプレク
シティを、生成した前記フラットネス、イントラACま
たはアクティビティで除算して、Iピクチャー用の前記
所定の係数を算出し、圧縮後にPピクチャーまたはBピ
クチャーとなるピクチャーのグローバルコンプレクシテ
ィを、生成した前記ME残差で除算して、Pピクチャー
用の前記所定の係数およびBピクチャー用の前記所定の
係数を算出する。
Preferably, the coefficient calculating means divides the global complexity of a picture which becomes an I picture after compression by the generated flatness, intra AC or activity to obtain the predetermined coefficient for the I picture. The predetermined coefficient for the P picture and the predetermined coefficient for the B picture are calculated by dividing the global complexity of a picture that becomes a P picture or a B picture after compression by the generated ME residual. .

【0011】好適には、前記係数算出手段は、前記グロ
ーバルコンプレクシティに対して、所定のオフセット値
を加算または減算して、生成した前記フラットネス、イ
ントラACまたはアクティビティで除算して、Iピクチ
ャー用の前記所定の係数を算出し、圧縮後にPピクチャ
ーまたはBピクチャーとなるピクチャーのグローバルコ
ンプレクシティを、生成した前記ME残差で除算して、
Pピクチャー用の前記所定の係数およびBピクチャー用
の前記所定の係数を算出する。
Preferably, the coefficient calculating means adds or subtracts a predetermined offset value to or from the global complexity, and divides the result by the generated flatness, intra AC or activity to obtain an I picture picture. Is calculated, and the global complexity of a picture that becomes a P picture or a B picture after compression is divided by the generated ME residual,
The predetermined coefficient for the P picture and the predetermined coefficient for the B picture are calculated.

【0012】本発明に係る映像データ圧縮装置は、非圧
縮映像データを圧縮符号化して、記録媒体の記憶容量あ
るいは伝送路の伝送容量に適合するデータ量の圧縮映像
データを生成する。
A video data compression device according to the present invention compresses and encodes non-compressed video data to generate compressed video data having a data amount suitable for the storage capacity of a recording medium or the transmission capacity of a transmission path.

【0013】本発明に係る映像データ圧縮装置におい
て、指標データ算出手段は、映像データのピクチャーそ
れぞれの絵柄の複雑(難しさ)さを示す指標データ(統
計量)を生成する。圧縮後にIピクチャーとなるピクチ
ャーの指標データとしては、例えば、絵柄の平坦さを示
す値として新たに定義したフラットネス(flatness)、D
CT処理の処理単位となるDCTブロックごとの映像デ
ータとの分散値の総和として新たに定義したイントラA
C、および、MPEG方式の圧縮アルゴリズムとして知
られているTM5[test model 5; ISO/IEC JTC/SC29/WG
11/NO400 (Apr. 1993)] 等において、マクロブロックの
量子化値(MQUANT)の算出のためのアクティビティ(activ
ity)が用いられる。また、圧縮後にPピクチャーまたは
Bピクチャーとなるピクチャーの指標データとしては、
動き予測の予測誤差量(ME残差)が用いられる。
In the video data compression device according to the present invention, the index data calculation means generates index data (statistical quantity) indicating the complexity (difficulty) of each picture of the video data. As index data of a picture which becomes an I picture after compression, for example, flatness (flatness) newly defined as a value indicating the flatness of a picture, D
Intra A newly defined as the sum of the variances with the video data for each DCT block as the processing unit of the CT processing
C and TM5 [test model 5; known as a compression algorithm of the MPEG system; ISO / IEC JTC / SC29 / WG
11 / NO400 (Apr. 1993)], an activity for calculating a quantization value (MQUANT) of a macroblock.
ity) is used. As index data of a picture that becomes a P picture or a B picture after compression,
The prediction error amount of motion prediction (ME residual) is used.

【0014】難度データ算出手段は、算出した指標デー
タが難度データに強い相関関係を有することを利用し
て、指標データに所定の係数を乗算して重み付けして所
定の演算処理、例えば、一次関数による近似を行って、
絵柄の複雑さ(難しさ)を示す難度データを算出する。
この難度データは、従来、例えば、非圧縮映像データを
予備的に圧縮符号化して実際に圧縮映像データを生成
し、この圧縮映像データのデータ量を計数することによ
り求められていたが、指標データで難度データを近似す
ることにより、難度データ算出のためのエンコーダが不
要になり、しかも、予備的な圧縮符号化に要する処理時
間が不要になる。
The difficulty data calculating means uses a calculated coefficient data having a strong correlation with the difficulty data to multiply the index data by a predetermined coefficient and weight the index data to perform a predetermined arithmetic processing, for example, a linear function. Approximation by
Difficulty data indicating the complexity (difficulty) of the picture is calculated.
Conventionally, this difficulty data has been obtained by, for example, preliminary compressing and encoding uncompressed video data to actually generate compressed video data and counting the data amount of the compressed video data. By approximating the difficulty data, the encoder for calculating the difficulty data becomes unnecessary, and the processing time required for the preliminary compression encoding becomes unnecessary.

【0015】目標値算出手段は、算出した難度データに
基づいて、絵柄が複雑なピクチャーに多くのデータ量を
割り当て、絵柄が平坦なピクチャーに少ないデータ量を
割り当てるように、ピクチャーそれぞれの圧縮後のデー
タ量の目標値を算出する。このように目標値を算出する
ことにより、圧縮後の映像の品質を高く保ちつつ、圧縮
後のデータ量を記録媒体の記録容量等に適合させる。
The target value calculating means allocates a large amount of data to a picture having a complicated pattern and a small amount of data to a picture having a flat pattern based on the calculated difficulty data so as to allocate a small amount of data to the picture having a flat pattern. Calculate the target value of the data amount. By calculating the target value in this way, the data amount after compression is adapted to the recording capacity of the recording medium while keeping the quality of the compressed video high.

【0016】圧縮手段は、例えばMPEG方式により、
圧縮後に、複数の種類のピクチャー(Iピクチャーと、
PピクチャーおよびBピクチャーの組み合わせと)を所
定の順番で含むピクチャータイプシーケンスに圧縮す
る。圧縮処理手段は、非圧縮映像データに対して所定の
圧縮処理、例えば、非圧縮映像データのピクチャーを符
号化に適した順番に並び替える処理、および、離散的コ
サイン変換(DCT)処理を行う。
The compression means is, for example, an MPEG system.
After compression, multiple types of pictures (I picture,
(Combination of P picture and B picture) in a predetermined order. The compression processing means performs a predetermined compression process on the non-compressed video data, for example, a process of rearranging pictures of the non-compressed video data into an order suitable for encoding, and a discrete cosine transform (DCT) process.

【0017】量子化手段は、DCT等の処理がなされた
映像データを、外部から設定される量子化値で量子化
し、圧縮映像データを生成する。なお、MPEG方式に
おいては、量子化後の映像データは、さらに、可変長符
号化され、圧縮映像データとされる。量子化調節・設定
手段は、算出された目標値に基づいて、量子化値を刻一
刻と調節し、量子化手段に設定する。このように、量子
化値を調節して量子化手段に設定し、設定された量子化
値により量子化手段が量子化処理を行うことにより、圧
縮映像データのデータ量は、目標値にほぼ等しくなる。
The quantization means quantizes the video data which has been subjected to DCT or the like with a quantization value set from the outside to generate compressed video data. In the MPEG system, the quantized video data is further subjected to variable-length coding to be compressed video data. The quantization adjustment / setting unit adjusts the quantization value every moment based on the calculated target value, and sets the quantization value in the quantization unit. As described above, the quantization value is adjusted and set to the quantization means, and the quantization means performs the quantization process based on the set quantization value, so that the data amount of the compressed video data is substantially equal to the target value. Become.

【0018】係数更新手段は、例えば、圧縮手段が、1
つのピクチャーを圧縮するたびに、圧縮手段の量子化調
節・設定手段が量子化手段に設定する量子化値の平均値
と、圧縮映像データのデータ量とを乗算し、MPEG方
式のTM5においてグローバルコンプレクシティと呼ば
れる数値を算出し、このグローバルコンプレクシティ
を、指標データ算出手段が算出した指標データ(フラッ
トネス、イントラAC、アクティビティおよびME残
差)で除算して、難度データの近似に用いられる重み付
け係数を算出し、演算処理に用いられる重み付け係数を
更新する。この重み付け係数の更新により、常に、映像
データの絵柄に最適な重み付け係数を用いることがで
き、指標データにより難度データを高い精度で近似する
ことが可能になる。
The coefficient updating means is, for example, the compression means is 1
Each time one picture is compressed, the quantization adjustment / setting means of the compression means multiplies the average value of the quantization values set in the quantization means by the data amount of the compressed video data. A numerical value called “city” is calculated, and this global complexity is divided by index data (flatness, intra AC, activity and ME residual) calculated by the index data calculating means, and a weighting coefficient used for approximation of difficulty data Is calculated, and the weighting coefficient used for the arithmetic processing is updated. By updating the weighting coefficient, it is possible to always use the optimum weighting coefficient for the picture of the video data, and it is possible to approximate the difficulty data with high accuracy using the index data.

【0019】また、本発明に係る映像データ圧縮方法
は、動画の非圧縮映像データの複雑さをピクチャーごと
に指標する指標データを算出し、算出した前記指標デー
タに所定の係数を乗算する所定の演算処理を行い、圧縮
後のデータ量に対応する難度データを算出し、算出した
前記難度データに基づいて、前記非圧縮映像データの圧
縮後のデータ量の目標値をピクチャーごとに算出し、前
記非圧縮映像データのピクチャーそれぞれを、所定の圧
縮方法により、圧縮後のデータ量が算出した前記目標値
になるように圧縮して圧縮映像データを生成し、生成し
た圧縮映像データのデータ量に基づいて、前記所定の係
数を更新する。
The video data compression method according to the present invention calculates index data indicating the complexity of uncompressed video data of a moving image for each picture, and multiplies the calculated index data by a predetermined coefficient. Performing arithmetic processing, calculating difficulty data corresponding to the data amount after compression, based on the calculated difficulty data, calculating a target value of the data amount of the uncompressed video data after compression for each picture, Each picture of the uncompressed video data is compressed by a predetermined compression method so that the data amount after compression becomes the calculated target value to generate compressed video data, and based on the data amount of the generated compressed video data. Then, the predetermined coefficient is updated.

【0020】[0020]

【発明の実施の形態】第1実施形態 以下、本発明の第1の実施形態を説明する。MPEG方
式といった映像データの圧縮符号化方式により、高い周
波数成分が多い絵柄、あるいは、動きが多い絵柄といっ
た難度(difficulty)が高い映像データを圧縮符号化する
と、一般的に圧縮に伴う歪みが生じやすくなる。このた
め、難度が高い映像データは低い圧縮率で圧縮符号化す
る必要があり、難度が高いデータを圧縮符号化して得ら
れる圧縮映像データに対しては、難度が低い絵柄の映像
データの圧縮映像データに比べて、多くの目標データ量
を配分する必要がある。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment Hereinafter, a first embodiment of the present invention will be described. By compression encoding video data such as the MPEG method, when compression encoding video data with a high degree of difficulty, such as a pattern with many high frequency components or a pattern with a lot of motion, distortion due to compression is likely to occur. Become. For this reason, it is necessary to compress and encode video data having a high degree of difficulty at a low compression ratio. For compressed video data obtained by compressing and encoding data having a high degree of difficulty, a compressed image of video data having a pattern having a low level of difficulty is obtained. It is necessary to allocate a larger amount of target data than data.

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

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

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

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

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

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

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

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

【0029】逆DCT回路174は、逆量子化回路17
2から入力される逆量子化データに対して逆DCT処理
を行い、加算回路176に対して出力する。加算回路1
76は、動き補償回路178の出力データおよび逆DC
T回路174の出力データを加算し、加算回路164お
よび動き補償回路178に対して出力する。動き補償回
路178は、加算回路176の出力データに対して、動
き検出器14から入力される動きベクトルに基づいて動
き補償処理を行い、加算回路176に対して出力する。
The inverse DCT circuit 174 includes the inverse quantization circuit 17
Inverse DCT processing is performed on the inversely quantized data input from 2 and output to the adding circuit 176. Addition circuit 1
76 is the output data of the motion compensation circuit 178 and the inverse DC
The output data of the T circuit 174 is added and output to the addition circuit 164 and the motion compensation circuit 178. The motion compensation circuit 178 performs a motion compensation process on the output data of the addition circuit 176 based on the motion vector input from the motion detector 14, and outputs the result to the addition circuit 176.

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

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

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

【0033】FIFOメモリ160は、入力された映像
データS12の各ピクチャーをLピクチャー分だけ遅延
し、エンコーダ18に対して出力する。エンコーダ16
2は、入力された映像データS12のピクチャーを予備
的に順次、圧縮符号化し、第j(jは整数)番目のピク
チャーを圧縮符号化して得られた圧縮符号化データのデ
ータ量、DCT処理後の映像データのDC成分の値、お
よび、AC成分の電力値をホストコンピュータ20に対
して出力する。
The FIFO memory 160 delays each picture of the input video data S12 by L pictures and outputs the delayed picture to the encoder 18. Encoder 16
Reference numeral 2 denotes a data amount of compression-encoded data obtained by compression-encoding a picture of the input video data S12 in a preliminary and sequential manner, and compression-encoding a j-th (j is an integer) picture; And outputs the DC component value and AC component power value of the video data to the host computer 20.

【0034】例えば、エンコーダ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 ,D j+1 ,Dj+2
…,Dj+L-1 は、ホストコンピュータ20により既に算
出されている。
For example, the delay input to the encoder 18
The video data S16 is stored in the L memory by the FIFO memory 160.
As shown in FIG. 4 (B),
As described above, the encoder 18 determines the j-th
(J is an integer) picture (picture of FIG. 4B)
-A), the encoder 162
Are L-pins from the j-th picture of the video data S12.
The (j + L) -th picture ahead of the kuture (FIG. 4
This means that picture b) of (B) is compression-encoded.
You. Therefore, the encoder 18 transmits the delayed video data S16.
When starting the compression encoding of the j-th picture,
The encoder 162 is configured to j-th to
(J + L-1) -th picture (range of FIG. 4B)
c) the compression encoding has been completed and these pictures
Difficulty data D after compression encodingj, D j + 1, Dj + 2,
…, Dj + L-1Is already calculated by the host computer 20.
Has been issued.

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

【0036】[0036]

【数1】 (Equation 1)

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

【0038】[0038]

【数2】 (Equation 2)

【0039】[0039]

【数3】 (Equation 3)

【0040】なお、式3中の数値ビットレート(Bit rat
e)は、通信回線の伝送容量や、記録媒体の記録容量に基
づいて決められる1秒当たりのデータ量(ビット量)を
示し、ピクチャーレート(Picture rate)は、映像データ
に含まれる1秒当たりのピクチャーの数(30枚/秒
(NTSC),25枚/秒(PAL))を示し、数値F
j+L は、ピクチャータイプに応じて定められるピクチャ
ー当たりの平均データ量を示す。エンコーダ18のDC
T回路166は、入力される遅延映像データS16の第
j番目のピクチャーをDCT処理し、量子化回路168
に対して出力する。量子化回路168は、DCT回路1
66から入力された第j番目のピクチャーの周波数領域
のデータを、量子化制御回路180が目標データ量Tj
に基づいて調節する量子化値Qj により量子化し、量子
化データとして可変長符号化回路170に対して出力す
る。可変長符号化回路170は、量子化回路168から
入力された第j番目のピクチャーの量子化データを可変
長符号化して、ほぼ、目標データ量Tj に近いデータ量
の圧縮映像データVOUTを生成して出力する。
It should be noted that the numerical bit rate (Bit rat
e) is based on the transmission capacity of the communication line and the recording capacity of the recording medium.
Data amount per second (bit amount)
The picture rate (Picture rate) is
Number of pictures per second (30 pictures / sec.
(NTSC), 25 sheets / second (PAL))
j + LIs a picture determined according to the picture type
Shows the average amount of data per group. DC of encoder 18
The T circuit 166 is configured to output the delayed video data S16
DCT processing is performed on the j-th picture, and a quantization circuit 168
Output to The quantization circuit 168 is a DCT circuit 1
Frequency domain of the j-th picture input from
Of the target data amount T by the quantization control circuit 180.j
Quantized value Q adjusted based onjQuantized by
Output to the variable length coding circuit 170 as encoded data.
You. The variable length coding circuit 170
Variable quantized data of the input j-th picture
After long encoding, the target data amount TjData volume close to
And outputs the compressed video data VOUT.

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

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

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

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

【0045】第2実施形態 第1の実施形態に示した簡易2パスエンコード方式によ
れば、実時間かつ、絵柄の難度に応じた適応的な非圧縮
映像データに対する圧縮符号化処理が可能である。しか
しながら、第1の実施形態に示した簡易2パスエンコー
ド方式を用いた場合、実時間性が厳しく要求される場合
には、FIFOメモリ160の遅延時間を大きくするこ
とができず、真に適切な目標データ量Tj の算出が難し
く、圧縮映像データVOUTを伸長復号して得られる映
像の品質が低下してしまう可能性がある。
Second Embodiment According to the simple two-pass encoding method shown in the first embodiment, it is possible to perform compression encoding processing on non-compressed video data adaptively in real time according to the difficulty of a picture. . However, when the simple two-pass encoding method shown in the first embodiment is used, when strict real-time performance is required, the delay time of the FIFO memory 160 cannot be increased, and a truly appropriate calculation is difficult for the target data amount T j, the quality of the image obtained compressed video data VOUT to expansion decoding is likely to decrease.

【0046】第2の実施形態においては、第1の実施形
態に示した映像データ圧縮装置1(図1)を用い、ホス
トコンピュータ20の処理内容を変更して、FIFOメ
モリ160の遅延時間を長くしなくても適切な目標デー
タ量Tj の値を得ることができるように、非圧縮映像デ
ータをLピクチャー分、予備的に圧縮符号化して得られ
た圧縮映像データの第j番目のピクチャー〜第(j+L
−1)番目のピクチャーの実難度データDj 〜Dj+L-1
から、圧縮映像データの第(j+L)番目のピクチャー
〜第(j+L+B)番目のピクチャー(Bは整数)の難
度データ(予測難度データ)Dj+L 〜Dj+L+B を算出
し、実際に得られた難度データDj 〜Dj+ L-1 (実難度
データ)および予測によって得られた難度データD’
j+L 〜D’j+ L+B に基づいて、第1の実施形態に示した
簡易2パスエンコード方式よりも適切な目標データ量T
j の値を得ることができる圧縮符号化方式(予測簡易2
パスエンコード方式)を説明する。
In the second embodiment, the processing content of the host computer 20 is changed by using the video data compression apparatus 1 (FIG. 1) shown in the first embodiment, and the delay time of the FIFO memory 160 is increased. In order to obtain an appropriate value of the target data amount Tj without performing the above processing, the j-th picture to the L-th picture of the uncompressed video data and the j-th picture of the compressed video data obtained by preliminary compression encoding are used. (J + L
-1) Actual difficulty data D j to D j + L-1 of the first picture
From the (j + L) -th picture to the (j + L + B) -th picture (B is an integer) of the compressed video data, the difficulty data (prediction difficulty data) D j + L to D j + L + B are calculated. Difficulty data D j to D j + L-1 (actual difficulty data) and difficulty data D ′ obtained by prediction
Based on j + L to D ′ j + L + B , the target data amount T is more appropriate than the simple two-pass encoding method shown in the first embodiment.
The compression encoding method (simple prediction 2
The path encoding method will be described.

【0047】まず、第2の実施形態で説明する予測簡易
2パスエンコード方式を概念的に説明する。予測簡易2
パスエンコード方式は、徐々に絵柄が難しくなってゆ
く、つまり、徐々に圧縮符号化時のDCT処理後の高い
周波数成分が多くなり、動きが速くなってゆく非圧縮映
像データの絵柄は、さらに難しくなってゆき、逆に、徐
々に絵柄が難しくなくなって(簡単になって)ゆく非圧
縮映像データの絵柄は、さらに簡単になってゆくであろ
うと予測可能であることを前提する。
First, the simplified predictive two-pass encoding method described in the second embodiment will be conceptually described. Simple prediction 2
In the path encoding method, the picture becomes gradually more difficult, that is, the picture of the non-compressed video data, in which the high frequency components after the DCT processing in the compression encoding gradually increase and the movement becomes faster, becomes more difficult. On the contrary, it is assumed that the pattern of the uncompressed video data, in which the pattern gradually becomes difficult (simplifies), can be predicted to be further simplified.

【0048】つまり、予測簡易2パスエンコード方式
は、ホストコンピュータ20が、この前提に基づいて、
さらに絵柄が難しくなってゆくと予測される場合には、
さらに絵柄が難しいピクチャーに備えて、その時点で圧
縮符号化しているピクチャーに割り当てる目標データ量
を節約し、逆に、さらに絵柄が簡単になってゆくと予測
される場合には、その時点で圧縮符号化しているピクチ
ャーに割り当てる目標データ量を増やすようにエンコー
ダ18に対する圧縮率の制御を行う。
That is, in the predictive simple two-pass encoding method, the host computer 20 uses the
If the picture is expected to become more difficult,
In preparation for a picture with a more difficult picture, the target data amount to be allocated to the picture currently being compression-encoded is saved, and conversely, if the picture is expected to become simpler, the compression will be performed at that point. The compression rate of the encoder 18 is controlled so as to increase the target data amount allocated to the picture being coded.

【0049】さらに、予測簡易2パスエンコード方式の
概念的な説明を続ける。映像データは、一般的に、時間
方向および空間方向について相関性が高く、映像データ
の圧縮符号化は、これらの相関性に着目し、冗長性を除
くことにより行われる。時間方向について相関性が高い
ということは、現時点の非圧縮映像データのピクチャー
の難度とそれ以降の非圧縮映像データのピクチャーの難
度とが近いということを意味する。また、難度の増減の
傾向も、現時点までの難度の増減の傾向がそれ以降も続
くことが多い。
Further, a conceptual description of the simple predictive two-pass encoding method will be continued. Video data generally has high correlation in the time direction and the spatial direction, and compression coding of video data is performed by focusing on these correlations and removing redundancy. The high correlation in the time direction means that the difficulty level of the picture of the current uncompressed video data is close to the difficulty level of the picture of the subsequent uncompressed video data. In addition, the tendency of the increase and decrease of the difficulty level up to the present time often continues thereafter.

【0050】具体例を挙げると、カメラが静止状態から
ゆっくりとカメラを水平方向に回し初め、最後に一定の
回転速度で回転しながら、静止している物体を撮影する
場合の非圧縮映像データの絵柄を考える。最初はカメラ
が停止状態であるため、静止映像が撮影され、絵柄の難
度は低くなる。次に、カメラを回し始めて1〜2秒後に
一定の回転速度になると仮定すると、カメラを回し始め
て1〜2秒間は絵柄の難度は高くなる傾向を示す。この
状態を、映像データ圧縮装置1側から見ると、数GOP
分の圧縮映像データを生成する間、入力される非圧縮映
像データの絵柄の難度が高くなる傾向が続くことにな
る。
As a specific example, the non-compressed video data of the case where the camera starts rotating slowly in the horizontal direction from the stationary state and finally rotates at a constant rotation speed while photographing a stationary object. Think about the design. At first, since the camera is in a stopped state, a still image is captured, and the difficulty of the picture is reduced. Next, assuming that the rotation speed becomes constant after one to two seconds from starting to rotate the camera, the difficulty of the picture tends to increase from one to two seconds after starting to rotate the camera. When this state is viewed from the video data compression device 1 side, several GOPs
During the generation of the compressed video data, the pattern of the input non-compressed video data tends to be more difficult.

【0051】従って、この具体例に示したような場合に
は、非圧縮映像データの絵柄の難度が増大傾向を示した
場合に、それ以降の絵柄の難度が増大傾向を示すと予測
するのは妥当である。以下に説明する予測簡易2パスエ
ンコード方式は、このような難度および難度の増減傾向
の時間的相関性を積極的に利用して、圧縮映像データの
各ピクチャーに対して、第1の実施形態に示した簡易2
パスエンコード方式においてよりも適切な目標データ量
の割り当てを行おうとするものである。
Therefore, in the case shown in this specific example, when the difficulty of the pattern of the non-compressed video data shows a tendency to increase, it is predicted that the difficulty of the pattern after that shows a tendency to increase. Reasonable. The simple predictive two-pass encoding method described below positively utilizes the temporal correlation of the difficulty and the increasing / decreasing tendency of the difficulty to apply the first embodiment to each picture of the compressed video data. Simple 2 shown
It is intended to allocate a more appropriate target data amount than in the path encoding method.

【0052】以下、第2の実施形態における映像データ
圧縮装置1の予測簡易2パスエンコードの動作を説明す
る。図5(A)〜(C)は、第2の実施形態における映
像データ圧縮装置1の予測簡易2パスエンコードの動作
を示す図である。エンコーダ制御部12は、第1の実施
形態においてと同様に、映像データ圧縮装置1に入力さ
れた非圧縮映像データVINに対して、エンコーダ制御
部12により符号化順にピクチャーを並べ替える等の前
処理を行い、図5(A)に示すように映像データS12
としてFIFOメモリ160およびエンコーダ162に
対して出力する。
The operation of predictive simple two-pass encoding of the video data compression device 1 according to the second embodiment will be described below. FIGS. 5A to 5C are diagrams illustrating the operation of the predictive simple two-pass encoding of the video data compression device 1 according to the second embodiment. As in the first embodiment, the encoder control unit 12 performs pre-processing such as rearranging pictures in the encoding order by the encoder control unit 12 on the uncompressed video data VIN input to the video data compression device 1. And the video data S12 as shown in FIG.
Is output to the FIFO memory 160 and the encoder 162.

【0053】FIFOメモリ160は、第1の実施形態
においてと同様に、入力された映像データS12の各ピ
クチャーをLピクチャー分だけ遅延し、エンコーダ18
に対して出力する。エンコーダ162は、第1の実施形
態においてと同様に、入力された映像データS12のピ
クチャーを予備的に順次、圧縮符号化し、第j(jは整
数)番目のピクチャーを圧縮符号化して得られた圧縮符
号化データのデータ量、DCT処理後の映像データのD
C成分の値およびAC成分の電力値をホストコンピュー
タ20に対して出力する。ホストコンピュータ20は、
エンコーダ162から入力されたこれらの値に基づい
て、実難度データDj を順次、算出する。
As in the first embodiment, the FIFO memory 160 delays each picture of the input video data S12 by L pictures, and
Output to As in the first embodiment, the encoder 162 preliminary compresses and encodes the picture of the input video data S12 sequentially, and compresses and encodes the j-th (j is an integer) picture. Data amount of compression encoded data, D of video data after DCT processing
The value of the C component and the power value of the AC component are output to the host computer 20. The host computer 20
Based on these values input from the encoder 162, sequentially, to calculate the real difficulty data D j.

【0054】例えば、エンコーダ18に入力される遅延
映像データS16は、FIFOメモリ160によりLピ
クチャーだけ遅延されているので、図5(B)に示すよ
うに、エンコーダ18が、遅延映像データS16の第j
番目のピクチャー(図5(B)のピクチャーa)を圧縮
符号化している際には、エンコーダ162は、第1の実
施形態においてと同様に、映像データS12の第j番目
のピクチャーからLピクチャー分先の第(j+L)番目
のピクチャー(図5(B)のピクチャーb)を圧縮符号
化していることになる。
For example, since the delayed video data S16 input to the encoder 18 is delayed by L pictures by the FIFO memory 160, as shown in FIG. j
When the third picture (picture a in FIG. 5B) is compression-encoded, the encoder 162 performs L-pictures from the j-th picture of the video data S12 in the same manner as in the first embodiment. This means that the preceding (j + L) -th picture (picture b in FIG. 5B) has been compression-encoded.

【0055】従って、エンコーダ18が遅延映像データ
S16の第j番目のピクチャーの圧縮符号化を開始する
際には、エンコーダ162は映像データS12の第(j
−A)番目〜第(j+L−1)番目のピクチャー(図5
(B)の範囲c、但し、図5はA=0の場合を示す)の
圧縮符号化を完了し、これらのピクチャーの圧縮符号化
後のデータ量、および、DCT処理後の映像データのD
C成分の値およびAC成分の電力値をホストコンピュー
タ20に対して出力している。ホストコンピュータ20
は、エンコーダ162から入力されたこれらの値に基づ
いて、難度データ(実難度データ、図5(B)の範囲
d)Dj-A ,Dj-A+1 ,…,Dj ,Dj+1,Dj+2
…,Dj+L-1 の算出を既に終了している。なお、Aは整
数であり、正負を問わない。
Therefore, when the encoder 18 starts compression encoding of the j-th picture of the delayed video data S16, the encoder 162 sets the (j) -th picture of the video data S12.
-A) -th to (j + L-1) -th pictures (FIG. 5)
(B), where FIG. 5 shows the case where A = 0), completes the compression encoding, the data amount of these pictures after compression encoding, and the D of the video data after DCT processing.
The value of the C component and the power value of the AC component are output to the host computer 20. Host computer 20
Are based on these values input from the encoder 162, based on the difficulty data (actual difficulty data, range d in FIG. 5B) D jA , D j-A + 1 ,..., D j , D j + 1 , D j + 2 ,
.., D j + L−1 has already been calculated. Note that A is an integer, and may be either positive or negative.

【0056】ホストコンピュータ20は、実難度データ
j-A ,Dj-a+1 ,…,Dj ,Dj+ 1 ,Dj+2 ,…,D
j+L-1 に基づいて、映像データS12の第(j+L)番
目〜第(j+L+B)番目のピクチャーの圧縮符号化後
の難度データ(予測難度データ、図5(B)の範囲e)
D’j+L ,D’j+L+1 ,D’j+L+2 ,…,D’j+L+B
予測し、下に示す式4により、遅延映像データS16の
第j番目のピクチャーの圧縮符号化後の目標データ量T
j を算出する。従って、遅延映像データS16の第j番
目のピクチャーの圧縮符号化後の目標データ量Tj を算
出するために、実難度データと予測難度データとを含め
て、図5(B)の範囲cの(A+L+B+1)ピクチャ
ー分の難度データを用いることになる。なお、予測難度
データD j ’は、例えば、実難度データDj を直線近似
し、近似により得られた直線を外挿する等の方法により
算出されうる。
The host computer 20 stores actual difficulty data
DjA, Dj-a + 1, ..., Dj, Dj + 1, Dj + 2, ..., D
j + L-1(J + L) -th video data S12 based on
After compression coding of the (j + L + B) -th picture
Difficulty data (predicted difficulty data, range e in FIG. 5B)
D 'j + L, D 'j + L + 1, D 'j + L + 2, ..., D 'j + L + BTo
And predicts the delayed video data S16 according to Equation 4 shown below.
Target data amount T after compression encoding of the j-th picture
jIs calculated. Accordingly, the j-th delay video data S16
Target data amount T after compression coding of eye picturejIs calculated
To include actual difficulty data and predicted difficulty data
(A + L + B + 1) picture in the range c in FIG.
-Difficulty data will be used. The forecast difficulty
Data D j’Is, for example, actual difficulty data DjBy linear approximation
And extrapolating the straight line obtained by approximation
It can be calculated.

【0057】[0057]

【数4】 (Equation 4)

【0058】なお、式4の各記号は、式1の各記号に同
じである。エンコーダ18は、第1の実施形態と同様
に、ホストコンピュータ20により量子化制御回路18
0に設定された目標データ量Tj に基づいて、目標デー
タ量Tj に近いデータ量の圧縮映像データVOUTを生
成して出力する。さらに、ホストコンピュータ20は、
図5(B)に示した動作と同様に、遅延映像データS1
6の第(j+1)番目のピクチャー(図5(C)のピク
チャーa’)に対しても、映像データS12の第(j+
L+1)番目のピクチャー(図5(C)のピクチャー
b’)以前の図5(C)の範囲d’の実難度データD
j-A+1,Dj-A+2 ,…,Dj ,Dj+1 ,Dj+2 ,…,D
j+L 、および、図5(C)の範囲e’に示す予測難度デ
ータ、D’j+L+1 ,D’j+L+2 ,D’j+L+3 ,…,D’
j+L+B+1 、つまり、図5(C)の範囲c’に示す実難度
データと予測難度データとに基づいて、遅延映像データ
S16の第(j+1)番目のピクチャーの圧縮符号化後
の目標データ量Tj+1 を算出する。エンコーダ18は、
ホストコンピュータ20が算出した目量データ量Tj+1
に基づいて、遅延映像データS16の第(j+1)番目
のピクチャーを圧縮符号化し、目標データ量Tj+1 に近
いデータ量の圧縮符号化データVOUTを生成する。な
お、以上の映像データ圧縮装置1の予測簡易2パスエン
コード動作は、遅延映像データS16の第(j+1)番
目のピクチャーに対しても同様である。
Note that each symbol in Equation 4 is the same as each symbol in Equation 1.
The same. Encoder 18 is the same as in the first embodiment.
And the quantization control circuit 18 by the host computer 20.
Target data amount T set to 0jBased on the goal date
Volume TjProduces compressed video data VOUT with a data amount close to
And output. Further, the host computer 20
As in the operation shown in FIG. 5B, the delayed video data S1
6 (j + 1) -th picture (picture in FIG. 5C)
(Char + '), the (j +
L + 1) th picture (picture in FIG. 5C)
b ') The actual difficulty data D in the range d' in FIG.
j-A + 1, Dj-A + 2, ..., Dj, Dj + 1, Dj + 2, ..., D
j + L, And the prediction difficulty data shown in a range e ′ in FIG.
Data, D 'j + L + 1, D 'j + L + 2, D 'j + L + 3, ..., D '
j + L + B + 1In other words, the actual difficulty shown in the range c 'in FIG.
Delay video data based on the
After compression encoding of the (j + 1) th picture in S16
Target data amount Tj + 1Is calculated. The encoder 18
Scale data amount T calculated by the host computer 20j + 1
(J + 1) -th of the delayed video data S16 based on
Is compressed and coded, and the target data amount Tj + 1Close to
A large amount of compressed encoded data VOUT is generated. What
Note that the prediction simple 2-pass engine of the above video data compression apparatus 1
The code operation is the (j + 1) th of the delayed video data S16.
The same applies to eye pictures.

【0059】以下、図6を参照して、第2の実施形態に
おける映像データ圧縮装置1の動作を整理して説明す
る。図6は、第2の実施形態における映像データ圧縮装
置1(図1)の動作を示すフローチャートである。図6
に示すように、ステップ102(S102)において、
ホストコンピュータ20は、式1等に用いられる数値
j,R’1 を、j=−(L−1),R’1 =(Bit rate
×(L+B))/Picture rate として初期化する。
Hereinafter, the operation of the video data compression apparatus 1 according to the second embodiment will be described with reference to FIG. FIG. 6 is a flowchart showing the operation of the video data compression device 1 (FIG. 1) in the second embodiment. FIG.
As shown in step 102, in step 102 (S102),
The host computer 20 converts the numerical values j and R ′ 1 used in Expression 1 and the like into j = − (L−1), R ′ 1 = (Bit rate
× (L + B)) / Picture rate

【0060】ステップ104(S104)において、ホ
ストコンピュータ20は、数値jが0より大きいか否か
を判断する。数値jが0より大きい場合にはS106の
処理に進み、小さい場合にはS110の処理に進む。ス
テップ106(S106)において、エンコーダ162
は、映像データS12の第(j+L)番目のピクチャー
を圧縮符号化し、実難度データDj+L を生成する。
In step 104 (S104), the host computer 20 determines whether or not the numerical value j is larger than 0. If the value j is larger than 0, the process proceeds to S106, and if it is smaller, the process proceeds to S110. In step 106 (S106), the encoder 162
Compresses and encodes the (j + L) -th picture of the video data S12 to generate actual difficulty data D j + L.

【0061】ステップ108(S108)において、ホ
ストコンピュータ20は数値jをインクリメントする
(j=j+1)。ステップ110(S110)におい
て、ホストコンピュータ20は、遅延映像データS16
に第j番目のピクチャーが存在するか否かを判断する。
第j番目のピクチャーが存在する場合にはS112の処
理に進み、存在しない場合には圧縮符号化処理を終了す
る。
In step 108 (S108), the host computer 20 increments the numerical value j (j = j + 1). In step 110 (S110), the host computer 20 transmits the delayed video data S16
It is determined whether the j-th picture exists.
If the j-th picture exists, the process proceeds to S112; otherwise, the compression encoding process ends.

【0062】ステップ112(S112)において、ホ
ストコンピュータ20は、数値jが数値Aよりも大きい
か否かを判断する。数値jが数値Aよりも大きい場合に
はS114の処理に進み、小さい場合にはS116の処
理に進む。ステップ114(S114)において、ホス
トコンピュータ20は、実難度データDj-A 〜Dj+L-1
に基づいて、予測難度データD’j+L 〜D’j+L+B を算
出する。ステップ116(S116)において、ホスト
コンピュータ20は実難度データD1 〜Dj+L-1 から、
予測難度データD’j+L 〜D’j+L+B を算出する。
In step 112 (S112), the host computer 20 determines whether or not the numerical value j is larger than the numerical value A. When the numerical value j is larger than the numerical value A, the process proceeds to S114, and when the numerical value j is smaller, the process proceeds to S116. In step 114 (S114), the host computer 20 executes the actual difficulty data D jA to D j + L-1.
, The predicted difficulty level data D ′ j + L to D ′ j + L + B are calculated. At step 116 (S116), the host computer 20 is the real difficulty data D 1 ~D j + L-1 ,
The prediction difficulty data D ′ j + L to D ′ j + L + B are calculated.

【0063】ステップ118(S118)において、ホ
ストコンピュータ20は、式4を用いて目標データ量T
j を算出し、エンコーダ18の量子化制御回路180に
設定する。さらに、エンコーダ18は、量子化制御回路
180に設定された目標データ量Tj に基づいて遅延映
像データS16の第j番目のピクチャーを圧縮符号化
し、第j番目のピクチャーから実際に得られた圧縮映像
データのデータ量Sj をホストコンピュータ20に対し
て出力する。ステップ120(S120)において、ホ
ストコンピュータ20は、エンコーダ18からのデータ
量Sj を記憶し、さらに、映像データS12の第(j+
L)番目のピクチャーの実難度データDj+L を出力す
る。
In step 118 (S118), the host computer 20 calculates the target data amount T
j is calculated and set in the quantization control circuit 180 of the encoder 18. Further, the encoder 18 compression-encodes the j-th picture of the delayed video data S16 based on the target data amount T j set in the quantization control circuit 180, and compresses the compressed picture actually obtained from the j-th picture. The data amount Sj of the video data is output to the host computer 20. In step 120 (S120), the host computer 20 stores the data amount Sj from the encoder 18, and further stores the data amount Sj of the video data S12.
L) Output the actual difficulty data D j + L of the picture.

【0064】ステップ122(S122)において、エ
ンコーダ18は、遅延映像データS16の第j番目を圧
縮符号化して得られた圧縮映像データVOUTを外部に
出力する。ステップ124(S124)において、ホス
トコンピュータ20は、ピクチャータイプに応じて、式
3中に用いられる数値Fj+L を算出する。ステップ12
6(S126)において、ホストコンピュータ20は、
式3に示した演算(R’j+1 =R’j −Sj +Fj+L
を行う。
In step 122 (S122), the encoder 18 outputs the compressed video data VOUT obtained by compression-coding the j-th of the delayed video data S16 to the outside. In step 124 (S124), the host computer 20 calculates the numerical value F j + L used in Expression 3 according to the picture type. Step 12
6 (S126), the host computer 20
The operation shown in Equation 3 (R ′ j + 1 = R ′ j −S j + F j + L )
I do.

【0065】以上説明したように、第2の実施形態に示
した映像データ圧縮装置1による予測簡易2パスエンコ
ードによれば、短時間で非圧縮映像データVINの絵柄
の難度を算出し、算出した難度に基づいて予測した難度
をさらに用いて適応的に非圧縮映像データVINを圧縮
符号化することができ、簡易2パスエンコード方式に比
べて、より適切な目標データ量を圧縮映像データの各ピ
クチャーに割り当てることが可能である。従って、予測
簡易2パスエンコード方式による圧縮映像データを伸長
復号した場合、簡易2パスエンコード方式による圧縮映
像データを伸長復号した場合に比べて、より高品質な映
像を得ることができる。
As described above, according to the predictive simple two-pass encoding by the video data compression apparatus 1 shown in the second embodiment, the degree of difficulty of the pattern of the uncompressed video data VIN is calculated in a short time. The uncompressed video data VIN can be adaptively compression-encoded by further using the degree of difficulty predicted based on the degree of difficulty, and a more appropriate target data amount can be set for each picture of the compressed image data as compared with the simple two-pass encoding method. Can be assigned to Therefore, when the compressed video data is expanded and decoded by the predictive simple two-pass encoding method, a higher quality video can be obtained as compared with the case where the compressed video data is expanded and decoded by the simple two-pass encoding method.

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

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

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

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

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

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

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

【0073】映像データ圧縮装置2は、これらの構成部
分により、非圧縮映像データの統計量(フラットネス,
イントラAC)および動き予測の予測誤差量(ME残
差)を非圧縮映像データVINの絵柄の難度の代わりに
用いて、映像データ圧縮装置1(図1,図2)と同様に
適応的に目標データ量Tj を算出して、高精度なフィー
ドフォワード制御を行うことにより、非圧縮映像データ
VINを適切なデータ量の圧縮映像データに圧縮符号化
する。なお、映像データ圧縮装置2においては、動き検
出器14およびエンコーダ制御部22の統計量算出回路
224により、予め検出された指標データに基づいて目
標データ量Tj が定めるられることから、以下、映像デ
ータ圧縮装置2における圧縮符号化方式を、フィード・
フォワード・レート・コントロール(FFRC; feed f
oward rate control)方式と呼ぶことにする。
The video data compression apparatus 2 uses these components to calculate the statistics (flatness, flatness, etc.) of the uncompressed video data.
Intra-AC) and the prediction error amount of motion prediction (ME residual) are used instead of the difficulty of the picture of the uncompressed video data VIN, and adaptively set the target similarly to the video data compression device 1 (FIGS. 1 and 2). By calculating the data amount Tj and performing high-precision feedforward control, the non-compressed video data VIN is compression-encoded into compressed video data having an appropriate data amount. In the video data compression device 2, the target data amount Tj is determined by the motion detector 14 and the statistic calculation circuit 224 of the encoder control unit 22 based on the index data detected in advance. The compression coding method in the data compression device 2 is
Forward rate control (FFRC; feed f
oward rate control).

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

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

【0076】以下、ME残差、フラットネスおよびイン
トラACについて説明する。第1の実施形態および第2
の実施形態において説明した簡易2パスエンコード方式
および予測簡易2パスエンコード方式において、実難度
データDj は映像の絵柄の難しさを示し、目標データ量
j は実難度データDj に基づいて算出される。
Hereinafter, the ME residual, flatness, and intra AC will be described. First embodiment and second embodiment
In simplified two pass encoding scheme and prediction simplified two pass encoding system explained in the embodiment, the real difficulty data D j indicates the difficulty of the pattern of the image, the target amount of data T j is calculated based on the real difficulty data D j Is done.

【0077】また、エンコーダ18が生成する圧縮映像
データのデータ量を、目標データ量Tj が示す値に近づ
けるために、量子化回路168(図2,図8)において
量子化値Qj の制御が行われる。従って、映像データを
圧縮符号化せずに得られ、実難度データDj と同様に映
像データの絵柄の複雑さ(難しさ)を適切に示すパラメ
ータを、エンコーダ18の量子化回路168における量
子化処理以前に得ることができれば、エンコーダ162
(図1)を省略し、処理遅延時間の短縮するという目的
を達成することができる。ME残差、フラットネスおよ
びイントラACは、実難度データDj と強い相関を有す
るので、このような目的を達成するために適切である。
[0077] In addition, the data quantity of the compressed video data encoder 18 generates, in order to approach the value indicated by the target amount of data T j, control of the quantization value Q j in the quantization circuit 168 (FIG. 2, FIG. 8) Is performed. Thus, obtained without compression encoding video data, the real difficulty data D j similarly to the picture of the video data complexity parameters appropriate indicating the (difficulty), quantization in the quantization circuit 168 of the encoder 18 If it can be obtained before the processing, the encoder 162
(FIG. 1) can be omitted, and the object of shortening the processing delay time can be achieved. ME residual, flatness and intra AC is because it has a strong correlation with the real difficulty data D j, it is suitable to achieve this purpose.

【0078】ME残差と実難度データDj との関係 他のピクチャーを参照して圧縮符号化処理し、Pピクチ
ャーおよびBピクチャーを生成する際には、動き検出器
14は、圧縮対象となるピクチャー(入力ピクチャー)
の注目マクロブロックと、参照されるピクチャー(参照
ピクチャー)との間の差分値の絶対値和あるいは自乗値
和が最小となるようなマクロブロックを探し、動きベク
トルを求める。ME残差は、このように、動きベクトル
を求める際に、最小になった各マクロブロックの差分値
の絶対和または自乗和を、ピクチャー全体について総和
した値として定義される。
[0078] treated compression coding with reference to the relationship between another picture of the ME residual and the real difficulty data D j, when generating a P picture and B-picture, the motion detector 14 becomes compressed Picture (input picture)
Is searched for a macroblock in which the sum of absolute values or the sum of squares of the difference value between the macroblock of interest and the referenced picture (reference picture) is minimized, and a motion vector is obtained. As described above, the ME residual is defined as a value obtained by summing the absolute sum or the square sum of the minimum difference value of each macroblock when calculating a motion vector for the entire picture.

【0079】図9は、映像データ圧縮装置1,2によ
り、Pピクチャーを生成する際のME残差と実難度デー
タDj との相関関係を示す図である。図10は、映像デ
ータ圧縮装置1,2により、Bピクチャーを生成する際
のME残差と実難度データDj との相関関係を示す図で
ある。なお、図9および図10においては、実難度デー
タDj として、エンコーダ18が固定の量子化値を用い
て圧縮符号化して得られた圧縮映像データのデータ量を
用いており(以下、図12,図13において同じ)、図
9および図10は、CCIRにより規格化された標準画
像[cheer (cheer leaders), mobile (mobile and calen
der), tennis (table tennis), diva(diva with nois
e)] およびその他の画像(resort)を実際にMPEG2方
式により圧縮符号化した場合に得られるME残差と実難
度データDj との関係を示すグラフであり、図9および
図10において、グラフの縦軸(difficulty)が実難度デ
ータDj を示し、横軸(me resid)がME残差を示す。図
9および図10を参照して分かるように、ME残差は実
難度データDj と非常に強い相関関係を有する。従っ
て、圧縮後にPピクチャーまたはBピクチャーとなるピ
クチャーの実難度データDj の代わりに、ME残差は、
目標データ量T j の生成に用いられ得る。
FIG. 9 shows the video data compression devices 1 and 2
ME residual and actual difficulty data when generating P-pictures
TA DjIt is a figure which shows the correlation with. FIG.
When generating B pictures by the data compression devices 1 and 2
ME residual and actual difficulty data DjFigure showing the correlation with
is there. 9 and 10, the actual difficulty data
TA DjThe encoder 18 uses a fixed quantization value
The amount of compressed video data obtained by compression encoding
(Hereinafter the same in FIGS. 12 and 13)
9 and 10 show the standard images standardized by CCIR.
Statue [cheer (cheer leaders), mobile (mobile and calen
der), tennis (table tennis), diva (diva with nois
e)] and other images (resort) in MPEG2
ME residual obtained by compression encoding using the formula and actual difficulties
Degree data Dj10 is a graph showing the relationship with FIG.
In FIG. 10, the vertical axis (difficulty) of the graph is the actual difficulty level.
Data Dj, And the horizontal axis (me resid) indicates the ME residual. Figure
As can be seen with reference to FIG. 9 and FIG.
Difficulty data DjHas a very strong correlation with Follow
The picture that becomes a P picture or B picture after compression.
Kucha's actual difficulty data DjInstead, the ME residual is
Target data amount T jCan be used to generate

【0080】フラットネスと実難度データDj との関係 図11は、フラットネスの計算方法を示す図である。フ
ラットネスは、まず、図11に示すように、MPEG方
式においてDCT処理の単位となるDCTブロックそれ
ぞれを、2画素×2画素の小ブロックに分割し、次に、
これらの小ブロック内の対角の画素のデータ(画素値)
の差分値を算出し、差分値を所定の閾値と比較し、さら
に、差分値が閾値よりも小さくなる小ブロック総数をピ
クチャーごとに求めることにより算出される。なお、フ
ラットネスの値は、映像の絵柄が空間的に複雑であるほ
ど小さくなり、平坦であれば大きくなる。
[0080] Flatness and relationship diagram 11 of the real difficulty data D j is a diagram showing a calculation method of flatness. As shown in FIG. 11, 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.
Data (pixel value) of diagonal pixels in these small blocks
, The difference value is compared with a predetermined threshold value, and the total number of small blocks in which the difference value is smaller than the threshold value is calculated for each picture. Note that the value of the flatness becomes smaller as the picture pattern of the video is more spatially complicated, and becomes larger when the picture is flat.

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

【0082】イントラACと実難度データDj との関係 イントラACは、DCTブロックごとに、DCTブロッ
ク内の画素それぞれの画素値と、DCTブロック内の画
素値の平均値との差分の絶対値の総和として算出され
る。つまり、イントラACは、下の式5により求めるこ
とができる。
[0082] Relationship intra AC between intra AC and the real difficulty data D j, for each DCT block, and each pixel value pixels in a DCT block, the absolute value of the difference between the average value of pixel values in the DCT block It is calculated as a sum. That is, the intra AC can be obtained by the following Expression 5.

【0083】[0083]

【数5】 (Equation 5)

【0084】図13は、映像データ圧縮装置1,2によ
り、Iピクチャーを生成する際のイントラACと実難度
データDj との相関関係を示す図である。なお、図13
は、図9および図10と同様に、CCIRにより規格化
された標準画像およびその他の画像を実際にMPEG2
方式により圧縮符号化した場合に得られるイントラAC
と実難度データDj との関係を示すグラフであり、図1
3において、グラフの縦軸(difficulty)が実難度データ
j を示し、横軸(intra AC)がフラットネスを示す。図
13に示すように、イントラACと実難度データDj
は、強い正の相関関係があり、実難度データDj は、イ
ントラACを一次関数に代入する等の方法により近似可
能であることがわかる。
[0084] Figure 13 is a video data compression apparatus 1 is a diagram showing the correlation between the intra AC and the real difficulty data D j when generating an I picture. Note that FIG.
9A and 9B actually convert the standard image standardized by CCIR and other images into MPEG2
Intra AC obtained when compression encoding is performed by the system
Is a graph showing the relationship between the real difficulty data D j, 1
In 3, the vertical axis of the graph (DIFFICULTY) indicates the real difficulty data D j, the horizontal axis (intra AC) indicates the flatness. As shown in FIG. 13, there is a strong positive correlation between the intra AC and the actual difficulty data D j , and the actual difficulty data D j can be approximated by a method such as substituting the intra AC into a linear function. I understand.

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

【0086】Pピクチャーについては下に示す式6によ
り、Bピクチャーについては下に示す式7により、実難
度データDj はME残差により近似される。また、Iピ
クチャーについては、式6,7と同様の近似式により実
難度データDj は、フラットネスおよびイントラACま
たはこれらのいずかにより近似される。
The actual difficulty data D j is approximated by the ME residual by the following equation 6 for the P picture and by the following equation 7 for the B picture. As for the I-picture, the real difficulty data D j by the same approximate expression to Equation 6 can be approximated by determining flatness and intra AC or Izu thereof.

【0087】[0087]

【数6】 (Equation 6)

【0088】[0088]

【数7】 (Equation 7)

【0089】さらに、第1の実施形態に示した簡易2パ
スエンコード方式においては、これらの近似により得ら
れた実難度データDj を、式1に代入することにより目
標データ量Tj が算出される。あるいは、第2の実施形
態に示した予測簡易2パスエンコード方式においては、
これらの近似により得られた実難度データDj から予測
難度データDj ’が算出され、実難度データDj および
予測難度データDj ’を式4に代入することにより目標
データ量Tj が算出される。
Further, in the simplified two-pass encoding method shown in the first embodiment, the target data amount T j is calculated by substituting the actual difficulty data D j obtained by these approximations into the equation (1). You. Alternatively, in the prediction simple two-pass encoding method shown in the second embodiment,
Predicted difficulty data D j ′ is calculated from the actual difficulty data D j obtained by these approximations, and the target data amount T j is calculated by substituting the actual difficulty data D j and the predicted difficulty data D j ′ into Equation 4. Is done.

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

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

【0092】ホストコンピュータ20は、動き検出器1
4が生成したME残差に対して式6および式7に示した
演算処理を行って実難度データDj を近似し、式6およ
び式7と同様な演算処理を行って、フラットネスおよび
イントラACにより実難度データDj を近似する。さら
に、ホストコンピュータ20は、近似した実難度データ
j を式1に代入し、目標データ量Tj を算出し、算出
した目標データ量Tj をエンコーダ18の量子化制御回
路180に設定する。
The host computer 20 includes the motion detector 1
4 is applied to the ME residual generated by Equation 4 to approximate the actual difficulty data D j , and the same arithmetic processing as Equations 6 and 7 is performed to obtain the flatness and intra to approximate the real difficulty data D j by the AC. Further, the host computer 20, the real difficulty data D j approximated into equation 1 to calculate the target amount of data T j, set the target amount of data T j calculated for the quantization control circuit 180 of the encoder 18.

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

【0094】なお、MPEGの圧縮アルゴリズムとして
知られるTM5方式等においては、マクロブロックの量
子化値(MQUANT)を算出するために、下の式8に示すアク
ティビティ(activity)という統計量が用いられる。アク
ティビティは、フラットネスおよびイントラACと同様
に、実難度データDj と強い相関関係を有するので、こ
れらパラメータの代わりにアクティビティを用いて、実
難度データDj を近似し、圧縮符号化を行うように映像
データ圧縮装置2を構成してもよい。
In the TM5 method or the like known as an MPEG compression algorithm, a statistic called activity shown in Expression 8 below is used to calculate a quantization value (MQUANT) of a macroblock. Activity, as well as the flatness and intra AC, because it has a strong correlation with the real difficulty data D j, using the activity instead of these parameters, approximating the real difficulty data D j, to perform compression coding The video data compression device 2 may be configured as follows.

【0095】[0095]

【数8】 (Equation 8)

【0096】また、以上、第1の実施形態に示した簡易
2パスエンコードを行う場合を例に、映像データ圧縮装
置2の動作を説明したが、映像データ圧縮装置2は、予
測簡易2パスエンコードを行いうることはいうまでもな
い。また、第3の実施形態に示した映像データ圧縮装置
2に対しても、第1の実施形態および第2の実施形態に
示した映像データ圧縮装置1に対してと同様の変形が可
能である。
The operation of the video data compression apparatus 2 has been described above by taking the simple two-pass encoding shown in the first embodiment as an example. It goes without saying that it can be performed. Further, the same modification as that of the video data compression apparatus 1 shown in the first and second embodiments can be made to the video data compression apparatus 2 shown in the third embodiment. .

【0097】第4実施形態 以下、本発明の第4の実施形態を説明する。第3の実施
形態に示したFFRC方式においては、統計的に求めら
れた指標データ(統計量)、つまり、ME残差、フラッ
トネス、イントラACおよびアクティビティを、式6お
よび式7等の一次関数に代入して実難度データDj を近
似する。これらの指標データと難度データDj とは、図
9、図10、図12および図13に示したように、強い
相関関係を有するが、映像データの絵柄によっては、上
記一次関数から若干の誤差が生じる。
Fourth Embodiment Hereinafter, a fourth embodiment of the present invention will be described. In the FFRC method shown in the third embodiment, statistically obtained index data (statistics), that is, ME residual, flatness, intra AC, and activity are represented by linear functions such as Equations 6 and 7. by substituting in approximating the real difficulty data D j. To these index data and the difficulty data D j, 9, 10, as shown in FIGS. 12 and 13, has a strong correlation, depending picture of the video data, a slight error from the linear function Occurs.

【0098】第4の実施形態における映像データ圧縮装
置2の処理は、かかる問題点を解決するためになされた
ものであり、映像データの絵柄等に応じて、式6および
式7等に示した重み付け係数ap ,aB 等を、適応的に
刻一刻と調節して、第3の実施形態においてより高い精
度で実難度データDj を指標データで近似することがで
き、より高い品質の圧縮映像データを生成することがで
きるように改良されている。
The processing of the video data compression device 2 in the fourth embodiment is performed to solve such a problem, and is shown in Expressions 6 and 7 according to the picture data of the video data. The weighting coefficients a p , a B, etc. are adaptively adjusted every moment, so that the actual difficulty data D j can be approximated with the index data with higher accuracy in the third embodiment, and higher quality compression can be achieved. It has been improved to be able to generate video data.

【0099】以下、第4の実施形態における映像データ
圧縮装置2の処理の概要を説明する。映像データ圧縮装
置2(図8)のエンコーダ18が、1ピクチャー分の圧
縮符号化を終了するたびに、ホストコンピュータ20に
は、生成した圧縮映像データの1ピクチャー分のデータ
量が判明し、さらに、圧縮符号化時の量子化値Qj の平
均値、および、以下に説明するグローバルコンプレクシ
ティ(global complexity) を算出することができる。グ
ローバルコンプレクシティは、MPEGのTM5におい
て、圧縮映像データのデータ量と量子化値Qj とを乗算
した値として、下の式9−1〜式9−3に示すように定
義され、映像の絵柄の複雑さを示す。
Hereinafter, an outline of the processing of the video data compression apparatus 2 in the fourth embodiment will be described. Each time the encoder 18 of the video data compression device 2 (FIG. 8) completes the compression encoding for one picture, the host computer 20 knows the data amount of the generated compressed video data for one picture, and , The average value of the quantized values Q j during the compression encoding, and the global complexity described below. Global complexity, in TM5 of MPEG, as the data amount and a value obtained by multiplying the quantization value Q j of the compressed video data is defined as shown in Equation 9-1 to Equation 9-3 below, the pattern of the image Show the complexity of.

【0100】[0100]

【数9】 (Equation 9)

【0101】なお、式9−1〜式9−3において、
i ,Sb ,Sp は、それぞれIピクチャー、Bピクチ
ャーおよびPピクチャーのデータ量を示し、Qi
b ,Qp は、それぞれIピクチャー、Bピクチャーお
よびPピクチャーを生成する際の量子化値Qj の平均値
を示し、Xi ,Xb ,Xp は、それぞれIピクチャー、
BピクチャーおよびPピクチャーのグローバルコンプレ
クシティを示す。式9−1〜9−3に示したグローバル
コンプレクシティは、実難度データDjとは必ずしも一
致しないが、量子化値Qj の平均値が極端に大きかった
り小さかったりしない限り、実難度データDj とほぼ一
致する。
In the formulas 9-1 to 9-3,
S i, S b, S p are each an amount of data of I picture, B picture and P picture, Q i,
Q b, Q p is I-picture, respectively, represents the average value of the quantization value Q j in generating the B-picture and P-picture, X i, X b, X p are each I picture,
The global complexity of B picture and P picture is shown. The global complexity shown in Expressions 9-1 to 9-3 does not always match the actual difficulty data D j , but unless the average value of the quantized values Q j is extremely large or small, the actual complexity data D j is used. It almost matches j .

【0102】ここで、Iピクチャー、Pピクチャーおよ
びBピクチャーの指標データ、例えばイントラAC(他
のパラメータでも可)およびME残差と、グローバルコ
ンプレクシティとが比例関係にあるとすると、これらの
指標データとグローバルコンプレクシティとの比例係数
εI ,εP ,εB は、下の式10−1〜式10−3によ
り算出できる。
Here, assuming that index data of I picture, P picture and B picture, for example, intra AC (other parameters are possible) and ME residual are in a proportional relationship with global complexity, these index data And the global complexity, ε I , ε P , and ε B can be calculated by the following equations 10-1 to 10-3.

【0103】[0103]

【数10】 (Equation 10)

【0104】各ピクチャータイプの実難度データD
j は、式10−1〜式10−3により算出した比例係数
εI ,εP ,εB を用いて、下の式11−1〜式11−
3に示すように算出される。
The actual difficulty data D for each picture type
j is calculated by using the proportional coefficients ε I , ε P , and ε B calculated by Equations 10-1 to 10-3.
It is calculated as shown in FIG.

【0105】[0105]

【数11】 [Equation 11]

【0106】ホストコンピュータ20が、数10−1〜
数10−3に示したように、比例係数εI ,εP ,εB
を、エンコーダ18がピクチャーを1枚圧縮符号化する
たびに算出して最適化し、式11−1〜式11−3によ
り各ピクチャータイプの実難度データDj の値を求める
ことにより、映像データの絵柄に関わらず、指標データ
により実難度データDj を、常に最適に近似することが
できる。
When the host computer 20 determines that
As shown in Equation 10-3, the proportional coefficients ε I , ε P , ε B
The encoder 18 is optimized by calculating each time the one compressed coded pictures, by determining the value of the real difficulty data D j of each picture type by Equation 11-1 Equation 11-3, the video data regardless of pattern, it is possible to the real difficulty data D j by the index data, always optimally approximated.

【0107】ホストコンピュータ20は、式10および
式11に示したように近似された実難度データDj に対
して、式1に示した演算処理を行って目標データ量Tj
を算出する。なお、MPEGのTM5におけるように、
実難度データDj に基づいて定める値に対して、意図的
に、実際に算出する目標データ量Tj の値を一定の比率
で変更する場合には、下の式12−1〜式12−3によ
り、目標データ量Tj を算出することができる。
The host computer 20 performs the arithmetic processing shown in Expression 1 on the actual difficulty data D j approximated as shown in Expressions 10 and 11, and obtains the target data amount T j
Is calculated. It should be noted that, as in MPEG TM5,
For values determined based on the real difficulty data D j, intentionally, when changing the value of the target amount of data T j to be actually calculated at a fixed ratio, the equation below 12-1 formula 12- 3, the target data amount Tj can be calculated.

【0108】[0108]

【数12】 (Equation 12)

【0109】なお、式12−1〜式12−3全ての分母
において、DI,P,B は、エンコーダ18に入力される前
のFIFOメモリ160にバッファリングされているL
ピクチャー分の非圧縮映像データから生成された指標デ
ータにより近似された実難度データDj を示し、R
j は、第j番目のピクチャー以降のL枚のピクチャーに
割り当てることができるデータ量の平均値を示す。
In all the denominators of the equations (12-1) to (12-3), DI , P, and B are the Ls buffered in the FIFO memory 160 before being input to the encoder 18.
The actual difficulty data D j approximated by the index data generated from the uncompressed video data for the picture,
j indicates the average value of the amount of data that can be allocated to the L pictures after the j-th picture.

【0110】以下、図14を参照して、第4の実施形態
における映像データ圧縮装置2の動作を説明する。図1
4は、第4の実施形態における映像データ圧縮装置2
(図8)の圧縮符号化動作を示す図である。エンコーダ
制御部22は、第3の実施形態においてと同様に、非圧
縮映像データVINを符号化順にピクチャーを並べ替
え、ピクチャー・フィールド変換等を行い、Iピクチャ
ーに圧縮符号化される第j+L番目のピクチャーからフ
ラットネスおよびイントラAC等の統計量を算出する
(図14a)。
The operation of the video data compression device 2 according to the fourth embodiment will be described below with reference to FIG. FIG.
4 is a video data compression device 2 according to the fourth embodiment.
FIG. 9 is a diagram showing the compression encoding operation of FIG. As in the third embodiment, the encoder control unit 22 rearranges the pictures in the encoding order of the uncompressed video data VIN, performs picture / field conversion and the like, and performs the (j + L) -th compression compression encoding on the I picture. Statistics such as flatness and intra AC are calculated from the picture (FIG. 14A).

【0111】動き検出器14は、第1の実施形態〜第3
の実施形態においてと同様に、PピクチャーおよびBピ
クチャーに圧縮符号化される第j+L番目のピクチャー
について動きベクトルを生成し、さらに、ME残差を算
出する(図14a)。FIFOメモリ160は、第1の
実施形態〜第3の実施形態においてと同様に、入力され
た映像データをLピクチャー分だけ遅延する。ホストコ
ンピュータ20は、動き検出器14が生成したME残差
に対して式11−1,11−2に示した演算処理を行っ
て実難度データDj を近似し、式11−3に示した演算
処理を行って、イントラAC等により実難度データDj
を近似する(図14b)。さらに、ホストコンピュータ
20は、近似した実難度データDj を式1あるいは式1
2−1〜12−3に代入し、目標データ量Tj を算出し
て、エンコーダ18の量子化制御回路180に設定する
(図14c)。
The motion detector 14 includes the first to third embodiments.
As in the embodiment, a motion vector is generated for the (j + L) th picture to be compression-encoded into a P picture and a B picture, and an ME residual is calculated (FIG. 14A). The FIFO memory 160 delays the input video data by L pictures, as in the first to third embodiments. The host computer 20 performs the computation processing shown in Equation 11-1 and 11-2 approximates the real difficulty data D j with respect to the ME residual by the motion detector 14 generates, as shown in Equation 11-3 After performing the arithmetic processing, the actual difficulty data D j
(FIG. 14b). Further, the host computer 20 calculates the approximate actual difficulty data D j by the formula 1 or the formula 1
Substituted into 2-1~12-3 calculates the target amount of data T j, set to the quantization control circuit 180 of the encoder 18 (FIG. 14c).

【0112】エンコーダ18のDCT回路166は、第
1の実施形態〜第3の実施形態においてと同様に、遅延
した映像データの第j番目のピクチャーをDCT処理す
る。量子化回路168は、DCT回路166から入力さ
れた第j番目のピクチャーの周波数領域のデータを、量
子化制御回路180が目標データ量Tj に基づいて調節
する量子化値Qj により量子化するとともに、第j番目
のピクチャーの圧縮符号化に用いた量子化値Qj の平均
値を算出し、ホストコンピュータ20に対して出力す
る。可変長符号化回路170は、第1の実施形態〜第3
の実施形態においてと同様に、量子化回路168から入
力された第j番目のピクチャーの量子化データを可変長
符号化して、ほぼ、目標データ量Tj に近いデータ量の
圧縮映像データVOUTを生成し、バッファメモリ18
2を介して出力する。
The DCT circuit 166 of the encoder 18 performs DCT processing on the j-th picture of the delayed video data, as in the first to third embodiments. Quantization circuit 168, the data of the j-th picture of the frequency domain inputted from the DCT circuit 166 is quantized by the quantization value Q j of the quantization control circuit 180 is adjusted based on the target amount of data T j together, the average value of the quantization values Q j used for compression coding of the j-th picture, and outputs to the host computer 20. The variable length encoding circuit 170 includes the first to third embodiments.
As in the embodiment, the variable-length coding the j-th picture of the quantized data inputted from the quantization circuit 168, substantially, generates the compressed video data VOUT of the data amount close to the target amount of data T j And the buffer memory 18
Output via 2.

【0113】エンコーダ18が、第j番目のピクチャー
の圧縮符号化を終了すると、ホストコンピュータ20
は、量子化制御回路180から入力される第j番目のピ
クチャーに対する量子化値Qj の平均値と、圧縮符号化
された第j番目のピクチャーのデータ量とに基づいて、
式9−1〜式9−3に示したようにグローバルコンプレ
クシティを算出する(図14d)。さらに、ホストコン
ピュータ20は、算出したグローバルコンプレクシティ
により、式10−1〜式10−3に示したように比例係
数εI ,εP ,εB を更新する(図14e)。更新され
た比例係数εI ,εP ,εB は、次のピクチャーの圧縮
符号化の際の変換式(式11−1〜式11−3)に反映
される。
When the encoder 18 completes the compression encoding of the j-th picture, the host computer 20
Is based on the average value of the quantization value Q j for the j-th picture input from the quantization control circuit 180 and the data amount of the j-th picture compressed and coded.
The global complexity is calculated as shown in Expressions 9-1 to 9-3 (FIG. 14D). Further, the host computer 20 updates the proportional coefficients ε I , ε P , and ε B based on the calculated global complexity as shown in Equations 10-1 to 10-3 (FIG. 14E). The updated proportional coefficients [epsilon] I , [epsilon] P , and [epsilon] B are reflected in the conversion equations (Equation 11-1 to Equation 11-3) in the compression encoding of the next picture.

【0114】図15を参照して、第4の実施形態におけ
るホストコンピュータ20の処理内容をさらに説明す
る。図15は、第4の実施形態における映像データ圧縮
装置2のホストコンピュータ20(図8)の処理内容を
示す図である。図15に示すように、ステップ300
(S300)において、ホストコンピュータ20は、第
j+L番目のME残差あるいはイントラAC等の指標デ
ータ(統計量)をエンコーダ制御部22または動き検出
器14から取り込む。
Referring to FIG. 15, the processing contents of host computer 20 in the fourth embodiment will be further described. FIG. 15 is a diagram showing the processing contents of the host computer 20 (FIG. 8) of the video data compression device 2 in the fourth embodiment. As shown in FIG.
In (S300), the host computer 20 takes in index data (statistics) such as the (j + L) th ME residual or intra AC from the encoder control unit 22 or the motion detector 14.

【0115】ステップ302(S302)において、ホ
ストコンピュータ20は、第j+1番目のピクチャーが
いずれのピクチャータイプに圧縮符号化されるかを判断
する。第j+1番目のピクチャーがIピクチャーに圧縮
符号化される場合にはS304の処理に進み、Pピクチ
ャーに圧縮符号化される場合にはS306の処理に進
み、Bピクチャーに圧縮符号化される場合にはS308
の処理に進む。
In step 302 (S302), the host computer 20 determines to which picture type the (j + 1) th picture is compression-encoded. If the (j + 1) th picture is compression-coded into an I picture, the process proceeds to S304. If the j + 1th picture is compression-coded into a P picture, the process proceeds to S306. Is S308
Proceed to processing.

【0116】ステップ304(S304)、ステップ3
06(S306)およびステップ308(S308)そ
れぞれにおいて、ホストコンピュータ20は、式11−
1〜式11−3により実難度データDj を近似する。ス
テップ310(S310)において、ホストコンピュー
タ20は、近似した実難度データDj を用いて、式1あ
るいは式12−1〜式12−3により、目標データ量T
j を算出する。ステップ312(S312)において、
エンコーダ18は、第j番目のピクチャーを圧縮符号化
する。
Step 304 (S304), Step 3
06 (S306) and step 308 (S308), the host computer 20 determines the expression 11-
By 1 expression 11-3 approximates the real difficulty data D j. In step 310 (S310), the host computer 20 using real difficulty data D j approximated by the equation 1 or equation 12-1 formula 12-3, the target data amount T
Calculate j . In step 312 (S312),
The encoder 18 compression-codes the j-th picture.

【0117】ステップ314(S314)において、ホ
ストコンピュータ20は、エンコーダ18が圧縮した第
j番目のピクチャーのデータ量、および、量子化制御回
路180が量子化回路168に設定する量子化値Qj
平均値から、グローバルコンプレクシティXi ,Xb
p 〔X(I,B,P)〕を算出する。
In step 314 (S 314), the host computer 20 determines the data amount of the j-th picture compressed by the encoder 18 and the quantization value Q j set in the quantization circuit 168 by the quantization control circuit 180. From the average value, the global complexity X i , X b ,
X p [X (I, B, P)] is calculated.

【0118】ステップ316(S316)において、ホ
ストコンピュータ20は、第j+1番目のピクチャーが
いずれのピクチャータイプに圧縮符号化されるかを判断
する。第j+1番目のピクチャーがIピクチャーに圧縮
符号化される場合にはS318の処理に進み、Pピクチ
ャーに圧縮符号化される場合にはS320の処理に進
み、Bピクチャーに圧縮符号化される場合にはS320
の処理に進む。ステップ318(S318)、ステップ
320(S320)およびステップ322(S322)
それぞれにおいて、ホストコンピュータ20は、式10
−1〜式10−3により比例係数εI ,εP ,εB を更
新する。ステップ324(S324)において、ホスト
コンピュータ20は、数値jをインクリメントする。
In step 316 (S316), the host computer 20 determines which picture type the (j + 1) th picture is compression-coded. If the (j + 1) th picture is compression-coded into an I-picture, the process proceeds to S318; if it is compressed into a P-picture, the process proceeds to S320; if it is compressed into a B-picture, Is S320
Proceed to processing. Step 318 (S318), Step 320 (S320) and Step 322 (S322)
In each case, the host computer 20 has the formula
The proportional coefficients ε I , ε P , and ε B are updated by −1 to Equation 10-3. In step 324 (S324), the host computer 20 increments the numerical value j.

【0119】なお、第3の実施形態に述べたように、例
えば、下の式13に示すように、実難度データDj と、
比例係数εI ,εP ,εB と指標データとの乗算値との
間にオフセット(δP )が存在する場合がある。このよ
うな場合には、下の式14に示すように、グローバルコ
ンプレクシティXi ,Xb ,Xp からオフセット値
δ I ,δB ,δP を減算した値を指標データで除算する
ことにより、比例係数εI,εP ,εB を算出すること
ができる。また、第4の実施形態に示した映像データ圧
縮装置2の動作についても、第3の実施形態等に示した
ものと同様な変形が可能である。
Note that, as described in the third embodiment, an example
For example, as shown in Expression 13 below, the actual difficulty data DjWhen,
Proportional coefficient εI, ΕP, ΕBAnd the product of index data
Offset between (δP) May be present. This
In such a case, as shown in Equation 14 below,
Complexity Xi, Xb, XpOffset value from
δ I, ΔB, ΔPDivide the value obtained by subtracting by the index data
The proportional coefficient εI, ΕP, ΕBCalculating
Can be. Also, the video data pressure shown in the fourth embodiment
The operation of the compression device 2 is also described in the third embodiment and the like.
Modifications similar to those are possible.

【0120】以上述べたように、第4の実施形態におけ
る映像データ圧縮装置2の動作によれば、第3の実施形
態に示した映像データ圧縮装置2の動作と同じ効果を得
られる他、第3の実施形態におけるよりもさらに正確な
目標データ量Tj が算出でき、この結果、圧縮映像デー
タの品質を向上させることができる。
As described above, according to the operation of the video data compression device 2 in the fourth embodiment, the same effect as the operation of the video data compression device 2 shown in the third embodiment can be obtained. also it can be calculated more accurately target amount of data T j than in the third embodiment, as a result, it is possible to improve the quality of the compressed video data.

【0121】[0121]

【発明の効果】以上説明したように、本発明に係る映像
データ圧縮装置およびその方法によれば、2パスエンコ
ードによらずに、所定のデータ量以下に音声・映像デー
タを圧縮符号化することができる。また、本発明に係る
映像データ圧縮装置およびその方法によれば、ほぼ実時
間的に映像データを圧縮符号化することができ、しか
も、伸長復号後に高品質な映像を得ることができる。ま
た、本発明に係る映像データ圧縮装置およびその方法に
よれば、2パスエンコードによらずに、圧縮符号化後の
データ量を見積もって圧縮率を調節し、圧縮符号化処理
を行うことができる。
As described above, according to the video data compression apparatus and method according to the present invention, audio / video data is compression-coded to a predetermined data amount or less without using two-pass encoding. Can be. Further, according to the video data compression apparatus and method thereof 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 the method thereof according to the present invention, the compression rate can be adjusted by estimating the data amount after compression and encoding, and the compression and encoding processing can be performed without using two-pass encoding. .

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

【図1】本発明に係る映像データ圧縮装置の構成を示す
図である。
FIG. 1 is a diagram showing a configuration of a video data compression device according to the present invention.

【図2】図1に示した簡易2パス処理部のエンコーダの
構成を示す図である。
FIG. 2 is a diagram illustrating a configuration of an encoder of a simple two-pass processing unit illustrated in FIG. 1;

【図3】図1に示したエンコーダの構成を示す図であ
る。
FIG. 3 is a diagram illustrating a configuration of an encoder illustrated in FIG. 1;

【図4】(A)〜(C)は、第1の実施形態における映
像データ圧縮装置の簡易2パスエンコードの動作を示す
図である。
FIGS. 4A to 4C are diagrams illustrating an operation of a simple two-pass encoding of the video data compression device according to the first embodiment.

【図5】(A)〜(C)は、第2の実施形態における映
像データ圧縮装置の予測簡易2パスエンコードの動作を
示す図である。
FIGS. 5A to 5C are diagrams illustrating an operation of a predictive simple two-pass encoding of the video data compression device according to the second embodiment.

【図6】第2の実施形態における映像データ圧縮装置
(図1)の動作を示すフローチャートである。
FIG. 6 is a flowchart showing the operation of the video data compression device (FIG. 1) in the second embodiment.

【図7】第3の実施形態における本発明に係る映像デー
タ圧縮装置の構成の概要を示す図である。
FIG. 7 is a diagram illustrating an outline of a configuration of a video data compression device according to the present invention in a third embodiment.

【図8】図7に示した映像データ圧縮装置の圧縮符号化
部の詳細な構成を示す図である。
8 is a diagram illustrating a detailed configuration of a compression encoding unit of the video data compression device illustrated in FIG. 7;

【図9】図1および図7に示した映像データ圧縮装置に
より、Pピクチャーを生成する際のME残差と実難度デ
ータDj との相関関係を示す図である。
The video data compression apparatus shown in FIG. 9 1 and 7, is a diagram showing the correlation between the ME residual and the real difficulty data D j when generating a P picture.

【図10】図1および図7に示した映像データ圧縮装置
により、Bピクチャーを生成する際のME残差と実難度
データDj との相関関係を示す図である。
The video data compression apparatus shown in FIG. 10 to FIG. 1 and FIG. 7 is a diagram showing the correlation between the ME residual and the real difficulty data D j when generating a B picture.

【図11】フラットネスの計算方法を示す図である。FIG. 11 is a diagram illustrating a method of calculating flatness.

【図12】図1および図7に示した映像データ圧縮装置
により、Iピクチャーを生成する際のフラットネスと実
難度データDj との相関関係を示す図である。
The video data compression apparatus shown in FIG. 12 to FIG. 1 and FIG. 7 is a diagram showing the correlation between the flatness and the real difficulty data D j when generating an I picture.

【図13】図1および図7に映像データ圧縮装置によ
り、Iピクチャーを生成する際のフラットネスと実難度
データDj との相関関係を示す図である。
The video data compression apparatus in FIG. 13 FIG. 1 and FIG. 7 is a diagram showing the correlation between the flatness and the real difficulty data D j when generating an I picture.

【図14】第4の実施形態における映像データ圧縮装置
(図8)の圧縮符号化動作を示す図である。
FIG. 14 is a diagram illustrating a compression encoding operation of the video data compression device (FIG. 8) according to the fourth embodiment.

【図15】第4の実施形態における映像データ圧縮装置
2のホストコンピュータ(図8)の処理内容を示す図で
ある。
FIG. 15 is a diagram illustrating processing contents of a host computer (FIG. 8) of the video data compression device 2 according to the fourth embodiment.

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

1,2…映像データ圧縮装置、10…圧縮符号化部、1
2,22…エンコーダ制御部、14…動き検出器、16
…簡易2パス処理部、160…FIFOメモリ、16
2,18…エンコーダ、164…加算回路、166…D
CT回路、168…量子化回路、170…可変長符号化
回路、172…逆量子化回路、174…逆DCT回路、
176…加算回路、178…動き補償回路、180…量
子化制御回路、182…バッファメモリ、20…ホスト
コンピュータ。
1, 2, ... video data compression device, 10 ... compression encoder, 1
2, 22 ... encoder control unit, 14 ... motion detector, 16
... Simple two-pass processing unit, 160 ... FIFO memory, 16
2, 18 encoder, 164 addition circuit, 166 D
CT circuit, 168 quantization circuit, 170 variable length encoding circuit, 172 inverse quantization circuit, 174 inverse DCT circuit,
176: an addition circuit, 178: a motion compensation circuit, 180: a quantization control circuit, 182: a buffer memory, 20: a host computer.

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】動画の非圧縮映像データの複雑さをピクチ
ャーごとに指標する指標データを算出する指標データ算
出手段と、 算出した前記指標データに所定の係数を乗算する所定の
演算処理を行い、圧縮後のデータ量に対応する難度デー
タを算出する難度データ算出手段と、 算出した前記難度データに基づいて、前記非圧縮映像デ
ータの圧縮後のデータ量の目標値をピクチャーごとに算
出する目標値算出手段と、 前記非圧縮映像データのピクチャーそれぞれを、所定の
圧縮方法により、圧縮後のデータ量が算出した前記目標
値になるように圧縮して圧縮映像データを生成する圧縮
手段と、 生成した圧縮映像データのデータ量に基づいて、前記所
定の係数を更新する係数更新手段とを有する映像データ
圧縮装置。
1. An index data calculating means for calculating index data for indicating the complexity of uncompressed video data of a moving picture for each picture; and performing a predetermined arithmetic processing for multiplying the calculated index data by a predetermined coefficient; Difficulty data calculation means for calculating difficulty data corresponding to the data amount after compression; and a target value for calculating a target value of the data amount of the uncompressed video data after compression based on the calculated difficulty data for each picture. Calculating means; and compressing means for compressing each of the pictures of the uncompressed video data by a predetermined compression method so that the data amount after compression becomes the calculated target value, thereby generating compressed video data. A video data compression device comprising: a coefficient updating unit that updates the predetermined coefficient based on a data amount of the compressed video data.
【請求項2】前記圧縮手段は、前記非圧縮映像データ
を、複数の種類のピクチャー(Iピクチャー、Pピクチ
ャーおよびBピクチャーまたはこれらの組み合わせ)を
所定の順番で含むピクチャータイプシーケンスに圧縮
し、 前記指標データ算出手段は、PピクチャーおよびBピク
チャーに圧縮されるピクチャーの前記指標データとして
ME残差を算出し、Iピクチャーに圧縮されるピクチャ
ーの前記指標データとしてフラットネス、イントラAC
データおよびアクティビティまたはこれらの組み合わせ
を算出する請求項1に記載の映像データ圧縮装置。
2. The compression means compresses the uncompressed video data into a picture type sequence including a plurality of types of pictures (I picture, P picture, B picture or a combination thereof) in a predetermined order, The index data calculating means calculates an ME residual as the index data of the picture compressed into the P picture and the B picture, and calculates flatness, intra AC as the index data of the picture compressed into the I picture.
The video data compression device according to claim 1, wherein the video data compression device calculates data and activity or a combination thereof.
【請求項3】前記圧縮手段は、 前記非圧縮映像データに対して所定の圧縮処理を行う圧
縮処理手段と、 前記所定の圧縮処理を行った映像データを、外部から設
定される量子化値で量子化し、前記圧縮映像データを生
成する量子化手段と、 算出した前記目標値に基づいて、前記量子化値を順次、
調節し、前記量子化手段に設定する量子化値調節・設定
手段とを有し、 前記係数更新手段は、前記圧縮手段の前記量子化手段に
設定される前記量子化値の平均値と、生成した前記圧縮
映像データのデータ量と、算出した前記指標データとに
基づいて、前記所定の係数を更新する請求項2に記載の
映像データ圧縮装置。
3. The compression means comprises: a compression processing means for performing a predetermined compression processing on the uncompressed video data; Quantizing means for quantizing to generate the compressed video data; and, based on the calculated target value,
And a quantization value adjustment / setting means for adjusting and setting the quantization value in the quantization means. The coefficient updating means includes: an average value of the quantization values set in the quantization means of the compression means; The video data compression device according to claim 2, wherein the predetermined coefficient is updated based on the data amount of the compressed video data and the calculated index data.
【請求項4】前記係数更新手段は、 前記圧縮手段の前記量子化手段に設定される前記量子化
値の平均値と、生成した前記圧縮映像データのデータ量
とに基づいてグローバルコンプレクシティを算出するグ
ローバルコンプレクシティ算出手段と、 算出した前記グローバルコンプレクシティと前記指標デ
ータとに基づいて、前記所定の係数を算出する係数算出
手段とを有する請求項3に記載の映像データ圧縮装置。
4. The coefficient updating means calculates global complexity based on an average value of the quantization values set in the quantization means of the compression means and a data amount of the generated compressed video data. The video data compression device according to claim 3, further comprising: a global complexity calculating unit that performs the calculation; and a coefficient calculating unit that calculates the predetermined coefficient based on the calculated global complexity and the index data.
【請求項5】前記係数算出手段は、圧縮後にIピクチャ
ーとなるピクチャーのグローバルコンプレクシティを、
生成した前記フラットネス、イントラACまたはアクテ
ィビティで除算して、Iピクチャー用の前記所定の係数
を算出し、圧縮後にPピクチャーまたはBピクチャーと
なるピクチャーのグローバルコンプレクシティを、生成
した前記ME残差で除算して、Pピクチャー用の前記所
定の係数およびBピクチャー用の前記所定の係数を算出
する請求項4に記載の映像データ圧縮装置。
5. The coefficient calculating means calculates a global complexity of a picture which becomes an I picture after compression,
The predetermined coefficient for the I picture is calculated by dividing by the generated flatness, intra AC or activity, and the global complexity of a picture that becomes a P picture or a B picture after compression is calculated by the generated ME residual. The video data compression device according to claim 4, wherein the predetermined coefficient for a P picture and the predetermined coefficient for a B picture are calculated by dividing.
【請求項6】前記係数算出手段は、前記グローバルコン
プレクシティに対して、所定のオフセット値を加算また
は減算して、生成した前記フラットネス、イントラAC
またはアクティビティで除算して、Iピクチャー用の前
記所定の係数を算出し、圧縮後にPピクチャーまたはB
ピクチャーとなるピクチャーのグローバルコンプレクシ
ティを、生成した前記ME残差で除算して、Pピクチャ
ー用の前記所定の係数およびBピクチャー用の前記所定
の係数を算出する請求項5に記載の映像データ圧縮装
置。
6. The flatness and intra AC generated by adding or subtracting a predetermined offset value to or from the global complexity.
Alternatively, the predetermined coefficient for the I picture is calculated by dividing by an activity, and after the compression, the P picture or the B picture is calculated.
6. The video data compression according to claim 5, wherein the predetermined coefficient for a P picture and the predetermined coefficient for a B picture are calculated by dividing a global complexity of a picture to be a picture by the generated ME residual. apparatus.
【請求項7】動画の非圧縮映像データの複雑さをピクチ
ャーごとに指標する指標データを算出し、 算出した前記指標データに所定の係数を乗算する所定の
演算処理を行い、圧縮後のデータ量に対応する難度デー
タを算出し、 算出した前記難度データに基づいて、前記非圧縮映像デ
ータの圧縮後のデータ量の目標値をピクチャーごとに算
出し、 前記非圧縮映像データのピクチャーそれぞれを、所定の
圧縮方法により、圧縮後のデータ量が算出した前記目標
値になるように圧縮して圧縮映像データを生成し、 生成した圧縮映像データのデータ量に基づいて、前記所
定の係数を更新する映像データ圧縮方法。
7. A method for calculating index data for indicating the complexity of uncompressed video data of a moving picture for each picture, performing a predetermined calculation process for multiplying the calculated index data by a predetermined coefficient, and compressing the data amount. Calculating the target data amount of the uncompressed video data after compression based on the calculated difficulty data, for each picture. A compression method for generating compressed video data by compressing the data amount after compression to the calculated target value according to the compression method, and updating the predetermined coefficient based on the data amount of the generated compressed video data. Data compression method.
【請求項8】前記非圧縮映像データを、複数の種類のピ
クチャー(Iピクチャー、PピクチャーおよびBピクチ
ャーまたはこれらの組み合わせ)を所定の順番で含むピ
クチャータイプシーケンスに圧縮し、 PピクチャーおよびBピクチャーに圧縮されるピクチャ
ーの前記指標データとしてME残差を算出し、Iピクチ
ャーに圧縮されるピクチャーの前記指標データとしてフ
ラットネス、イントラACデータおよびアクティビティ
またはこれらの組み合わせを算出する請求項7に記載の
映像データ圧縮方法。
8. A method of compressing 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, 8. The video according to claim 7, wherein an ME residual is calculated as the index data of the picture to be compressed, and flatness, intra AC data and activity or a combination thereof are calculated as the index data of the picture to be compressed into an I picture. Data compression method.
【請求項9】前記非圧縮映像データに対して所定の圧縮
処理を行い、 前記所定の圧縮処理を行った映像データを、外部から設
定される量子化値で量子化し、前記圧縮映像データを生
成し、 算出した前記目標値に基づいて、前記量子化値を順次、
調節して設定し、 調節・設定する前記量子化値の平均値と、生成した前記
圧縮映像データのデータ量と、算出した前記指標データ
とに基づいて、前記所定の係数を更新する請求項8に記
載の映像データ圧縮方法。
9. A predetermined compression process is performed on the uncompressed video data, and the video data that has been subjected to the predetermined compression process is quantized by a quantization value set from outside to generate the compressed video data And, based on the calculated target value, the quantized value is sequentially
9. The predetermined coefficient is updated based on an average value of the quantized values to be adjusted and set, a data amount of the generated compressed video data, and the calculated index data. 2. The video data compression method according to 1.
【請求項10】調節・設定する前記量子化値の平均値
と、生成した前記圧縮映像データのデータ量とに基づい
てグローバルコンプレクシティを算出し、 算出した前記グローバルコンプレクシティと前記指標デ
ータとに基づいて、前記所定の係数を算出する請求項9
に記載の映像データ圧縮方法。
10. A global complexity is calculated based on an average value of the quantization values to be adjusted and set, and a data amount of the generated compressed video data, and the calculated global complexity and the index data are calculated. 10. The predetermined coefficient is calculated based on the predetermined coefficient.
2. The video data compression method according to 1.
【請求項11】圧縮後にIピクチャーとなるピクチャー
のグローバルコンプレクシティを、生成した前記フラッ
トネス、イントラACまたはアクティビティで除算し
て、Iピクチャー用の前記所定の係数を算出し、圧縮後
にPピクチャーまたはBピクチャーとなるピクチャーの
グローバルコンプレクシティを、生成した前記ME残差
で除算して、Pピクチャー用の前記所定の係数およびB
ピクチャー用の前記所定の係数を算出する請求項10に
記載の映像データ圧縮方法。
11. The predetermined complexity for an I picture is calculated by dividing the global complexity of a picture that becomes an I picture after compression by the generated flatness, intra AC or activity, and calculates a P picture or a compressed picture after compression. The global complexity of a picture that becomes a B picture is divided by the generated ME residual to obtain the predetermined coefficient for the P picture and B
The video data compression method according to claim 10, wherein the predetermined coefficient for a picture is calculated.
【請求項12】前記グローバルコンプレクシティに、所
定のオフセット値を加算または減算し、生成した前記フ
ラットネス、イントラACまたはアクティビティで除算
して、Iピクチャー用の前記所定の係数を算出し、圧縮
後にPピクチャーまたはBピクチャーとなるピクチャー
のグローバルコンプレクシティを、生成した前記ME残
差で除算して、Pピクチャー用の前記所定の係数および
Bピクチャー用の前記所定の係数を算出する請求項11
に記載の映像データ圧縮方法。
12. A predetermined offset value is added to or subtracted from the global complexity, divided by the generated flatness, intra AC or activity to calculate the predetermined coefficient for an I picture, and after compression, 12. The predetermined coefficient for a P picture and the predetermined coefficient for a B picture are calculated by dividing a global complexity of a picture to be a P picture or a B picture by the generated ME residual.
2. The video data compression method according to 1.
JP21470896A 1996-08-14 1996-08-14 Encoding apparatus and encoding method Expired - Fee Related JP3765130B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21470896A JP3765130B2 (en) 1996-08-14 1996-08-14 Encoding apparatus and encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21470896A JP3765130B2 (en) 1996-08-14 1996-08-14 Encoding apparatus and encoding method

Publications (2)

Publication Number Publication Date
JPH1066068A true JPH1066068A (en) 1998-03-06
JP3765130B2 JP3765130B2 (en) 2006-04-12

Family

ID=16660305

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21470896A Expired - Fee Related JP3765130B2 (en) 1996-08-14 1996-08-14 Encoding apparatus and encoding method

Country Status (1)

Country Link
JP (1) JP3765130B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010104059A (en) * 2000-05-12 2001-11-24 박종섭 Fault detecter in MPEG encoder

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010104059A (en) * 2000-05-12 2001-11-24 박종섭 Fault detecter in MPEG encoder

Also Published As

Publication number Publication date
JP3765130B2 (en) 2006-04-12

Similar Documents

Publication Publication Date Title
JP3864461B2 (en) Video data compression apparatus and method
KR100512389B1 (en) Image data compression device and method
KR100756596B1 (en) Video data encoder and video data encoding method
EP0677969B1 (en) Moving picture coding method and an apparatus therefor
US20080025401A1 (en) Method for measuring real-time image complexity
KR100394014B1 (en) Apparatus for transcoding video
JP3765129B2 (en) Encoding apparatus and encoding method
JP3765130B2 (en) Encoding apparatus and encoding method
JP3879134B2 (en) Encoding apparatus and method thereof
JP3918208B2 (en) Video data compression apparatus and method
JP3937248B2 (en) Video signal encoding method and video signal encoding apparatus
JPH10108197A (en) Image coder, image coding control method, and medium storing image coding control program
JPH1066092A (en) Video data compressor and its method
JP2007053788A (en) Video data compression apparatus and method thereof
JP3934772B2 (en) Variable transfer rate encoding method and apparatus
JPH1075444A (en) Video data compressor and its method
JP2006136010A (en) Video data compressing apparatus and method therefor
JP3922581B2 (en) Variable transfer rate encoding method and apparatus
JPH1066082A (en) Video data compressor and its method
JPH1075452A (en) Device and method for compressing video data
JPH09284772A (en) Device and method for compressing video data
JP2006148953A (en) Video data compression device and its method
JPH09261634A (en) Video data compression device and method therefor
JPH1066084A (en) Video data compressing device and its method
JP2004140854A (en) Variable transfer rate encoding method and apparatus

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050118

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050322

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051004

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051205

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060104

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060117

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

Free format text: PAYMENT UNTIL: 20100203

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100203

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110203

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120203

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130203

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees