JPH10191342A - Device and method for compressing video data - Google Patents

Device and method for compressing video data

Info

Publication number
JPH10191342A
JPH10191342A JP34366596A JP34366596A JPH10191342A JP H10191342 A JPH10191342 A JP H10191342A JP 34366596 A JP34366596 A JP 34366596A JP 34366596 A JP34366596 A JP 34366596A JP H10191342 A JPH10191342 A JP H10191342A
Authority
JP
Japan
Prior art keywords
video data
compression
data amount
pictures
quantization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP34366596A
Other languages
Japanese (ja)
Inventor
Takuya Kitamura
卓也 北村
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 JP34366596A priority Critical patent/JPH10191342A/en
Publication of JPH10191342A publication Critical patent/JPH10191342A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To efficiently use the recording capacity of a recording medium and also to compress and encode video data so that the quality of video may be highly maintained. SOLUTION: An encoder 20 performs odd number compression and encoding by using a fixed quantization value Q that is set by a controlling computer 14, and outputs data quantity of compressed video data. The computer 14 calculates target data quantity TB that is used for the next compression and encoding based on the data quantity. The encoder 20 undergoes even number compression and encoding by using the quantity TB that is calculated by the computer 14, and calculates the value Q that is used for the next compression and encoding. The quantity TB is optimized by repeating the odd number and even number compression and encoding, and final compression and encoding is performed by using the optimized quantity TB.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、MPEG方式等に
より映像データを圧縮符号化し、伝送路の伝送レートに
適合した圧縮映像データを生成する映像データ圧縮装置
およびその方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a video data compression apparatus and method for compressing and encoding video data according to the MPEG system or the like and generating compressed video data suitable for a transmission rate of a transmission path.

【0002】[0002]

【従来の技術および発明が解決しようとする課題】近
年、映像データに対して動き補償処理(MC)、離散余
弦変換(DCT)処理、量子化処理および可変長符号化
処理等を行って、映像データを圧縮符号化するMPEG
方式等のMC−DCT方式が用いられている。
2. Description of the Related Art Recently, video data is subjected to motion compensation processing (MC), discrete cosine transform (DCT) processing, quantization processing, variable-length coding processing, and the like. MPEG to compress and encode data
An MC-DCT method such as a method is used.

【0003】このような圧縮符号化処理においては、圧
縮率を低くし、圧縮映像データのデータ量を増やすと一
般に映像の品質が向上し、圧縮率を高くし、圧縮映像デ
ータのデータ量を減らすと一般に映像の品質が低下する
ので、映像の品質を高く保つためには、圧縮率を低くす
ることが望ましい。一方、圧縮映像データをMOディス
ク等の記録媒体に記録したり、通信回線を介して伝送す
る場合には、圧縮映像データのデータ量(データレー
ト)を、一定値以下に抑える必要がある。
In such a compression encoding process, if the compression rate is reduced and the data amount of the compressed video data is increased, the quality of the video is generally improved, the compression rate is increased, and the data amount of the compressed video data is reduced. In general, the quality of an image is reduced. Therefore, in order to keep the image quality high, it is desirable to lower the compression ratio. On the other hand, when the compressed video data is recorded on a recording medium such as an MO disk or transmitted via a communication line, the data amount (data rate) of the compressed video data needs to be suppressed to a certain value or less.

【0004】従って、映像の品質を高く保ちつつ、記録
媒体あるいは通信回線に適合した圧縮映像データを生成
するためには、量子化処理に用いる量子化値(量子化イ
ンデックス)を適切に調節し、圧縮映像データのデータ
量(データレート)を、記録媒体の記録容量あるいは通
信回線の伝送レート以下であって、これらとほぼ同じと
なるようにすることが重要である。
Therefore, in order to generate compressed video data suitable for a recording medium or a communication line while maintaining high video quality, a quantization value (quantization index) used for a quantization process is appropriately adjusted. It is important that the data amount (data rate) of the compressed video data be equal to or less than the recording capacity of the recording medium or the transmission rate of the communication line.

【0005】本発明は、以上の述べた観点からなされた
ものであり、映像データを圧縮符号化し、記録媒体の記
録容量あるいは通信回線の伝送容量を有効利用し、しか
も、映像の品質を高く保ちうるデータ量(データ量)の
圧縮映像データを生成することができる映像データ圧縮
装置およびその方法を提供することを目的とする。ま
た、本発明は、量子化値を適切に制御することにより、
記録媒体の記録容量あるいは通信回線の伝送容量を有効
利用し、しかも、映像の品質を高く保ちうる映像データ
圧縮装置およびその方法を提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made from the above-mentioned viewpoints, and compresses and encodes video data, effectively uses the recording capacity of a recording medium or the transmission capacity of a communication line, and maintains video quality at a high level. It is an object of the present invention to provide a video data compression device and a video data compression method capable of generating compressed video data of a possible data amount (data amount). Also, the present invention, by appropriately controlling the quantization value,
It is an object of the present invention to provide a video data compression apparatus and a video data compression method capable of effectively utilizing the recording capacity of a recording medium or the transmission capacity of a communication line and maintaining high video quality.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
に、本発明に係る映像データ圧縮装置は、少なくとも、
所定の処理が施された映像データを、外部から設定され
る量子化値により量子化する量子化手段、圧縮後の映像
データのデータ量を計数するデータ量計数手段、およ
び、第k回目の圧縮処理において、圧縮後の映像データ
のデータ量を、外部から設定される目標データ量が示す
値と同じとなるように前記量子化値を生成し、前記量子
化手段に設定する第1の量子化値生成手段を具備し、入
力される映像データを圧縮処理する映像データ圧縮手段
と、第(k−1)回目の圧縮処理において計数した圧縮
後の映像データのデータ量に基づいて、第k回目の圧縮
処理における前記目標データ量を生成し、前記量子化値
生成手段に設定する目標データ量生成手段と、第k回目
の圧縮処理において生成した前記量子化値に基づいて、
第(k+1)回目の圧縮処理における固定の量子化値を
生成し、前記量子化手段に設定する第2の量子化値生成
手段とを有する。
In order to achieve the above object, a video data compression apparatus according to the present invention comprises at least:
A quantizing means for quantizing the video data subjected to the predetermined processing by a quantization value set from the outside, a data quantity counting means for counting a data quantity of the compressed video data, and a k-th compression In the processing, the quantization value is generated so that the data amount of the compressed video data becomes the same as the value indicated by the target data amount set from the outside, and the first quantization is set to the quantization means. A video data compression means for compressing the input video data, the video data compression means comprising a value generation means; Generating the target data amount in the compression processing of the target data amount generation means to be set in the quantization value generation means, based on the quantization value generated in the k-th compression processing,
A second quantization value generation unit configured to generate a fixed quantization value in the (k + 1) -th compression process and to set the fixed quantization value in the quantization unit.

【0007】好適には、前記映像データ圧縮手段は、入
力される映像データを複数の種類のピクチャーに圧縮
し、前記量子化手段は、前記映像データのピクチャーそ
れぞれを、圧縮後のピクチャーの種類それぞれの量子化
値により量子化し、データ量計数手段は、前記複数の種
類のピクチャーそれぞれのデータ量を計数し、第1の量
子化値生成手段は、前記複数の種類のピクチャーそれぞ
れのデータ量が、圧縮後のピクチャーの種類それぞれの
前記目標データ量が示す値と同じになるように、圧縮後
のピクチャーの種類それぞれに対応する量子化値を生成
し、前記目標データ量生成手段は、計数した前記複数の
種類のピクチャーそれぞれのデータ量に基づいて、第k
回目の圧縮処理における前記複数の種類のピクチャーそ
れぞれの目標データ量を生成し、前記第2の量子化値生
成手段は、生成した前記複数の種類のピクチャーそれぞ
れの量子化値に基づいて、複数の種類のピクチャーそれ
ぞれの固定の量子化値を生成する。
Preferably, the video data compression means compresses the input video data into a plurality of types of pictures, and the quantization means converts each of the video data pictures into a compressed picture type. The data amount counting unit counts the data amount of each of the plurality of types of pictures, and the first quantization value generation unit determines that the data amount of each of the plurality of types of pictures is A quantized value corresponding to each type of the compressed picture is generated so that the value of the target data amount of each type of the compressed picture becomes the same as the value indicated by the target data amount. Based on the data amount of each of the plurality of types of pictures, the k-th picture
A target data amount of each of the plurality of types of pictures in the first compression process is generated, and the second quantization value generation unit generates a plurality of types of pictures based on the generated quantization values of the plurality of types of pictures. A fixed quantization value is generated for each type of picture.

【0008】本発明に係る映像データ圧縮装置は、例え
ば、入力映像データに対して、動き補償処理、DCT処
理、量子化処理および可変長符号化処理等を行って、記
録媒体の記録容量あるいは通信回線の伝送容量以下のデ
ータ量(データレート)であって、ほぼ、これらと等し
いデータ量(データレート)の圧縮映像データを生成す
る。
The video data compression apparatus according to the present invention performs, for example, motion compensation processing, DCT processing, quantization processing, and variable-length coding processing on input video data, and performs recording capacity of a recording medium or communication. Compressed video data having a data amount (data rate) equal to or less than the transmission capacity of the line and substantially equal to the data amount (data rate) is generated.

【0009】本発明に係る映像データ圧縮装置におい
て、映像データ圧縮手段は、例えば、MPEG方式によ
り入力映像データを圧縮符号化して圧縮映像データを生
成する。映像データ圧縮手段において、 量子化手段
は、例えば、外部から圧縮後のピクチャー(Iピクチャ
ー、PピクチャーおよびBピクチャー)の種類(ピクチ
ャータイプ)ごとに設定される量子化値を用いて、入力
映像データに対する動き補償処理およびDCT処理によ
り生成されたDCT係数を量子化し、量子化データを生
成する。つまり、量子化手段は、圧縮後にIピクチャー
となるDCT係数をIピクチャー用の量子化値で量子化
し、圧縮後にPピクチャーとなるDCT係数をPピクチ
ャー用の量子化値で量子化し、圧縮後にBピクチャーと
なるDCT係数をBピクチャー用の量子化値で量子化す
る。
In the video data compression apparatus according to the present invention, the video data compression means generates compressed video data by compressing and encoding input video data according to, for example, the MPEG system. In the video data compression means, the quantization means uses, for example, a quantization value set for each type (picture type) of a picture (I picture, P picture and B picture) after compression from the outside, and , And quantizes the DCT coefficients generated by the motion compensation processing and the DCT processing to generate quantized data. That is, the quantization means quantizes the DCT coefficient which becomes an I-picture after compression with the quantization value for the I-picture, quantizes the DCT coefficient which becomes a P-picture after compression with the quantization value for the P-picture, and B2 after the compression. A DCT coefficient to be a picture is quantized by a quantization value for a B picture.

【0010】データ量係数手段は、生成された量子化デ
ータをさらに可変長符号化処理して得られる圧縮映像デ
ータのピクチャータイプそれぞれのデータ量を、所定の
単位期間ごとに計数し、各圧縮処理において生成された
Iピクチャー、BピクチャーおよびPピクチャーの単位
期間ごとのデータ量を求める。
The data amount coefficient means counts the data amount of each picture type of the compressed video data obtained by further performing variable length coding processing on the generated quantized data for each predetermined unit period. The data amounts of the I picture, B picture, and P picture generated for each unit period are obtained.

【0011】ある(第k回目の)圧縮処理において、第
1の量子化値生成手段は、各単位期間の圧縮映像データ
のデータ量を、前回の圧縮処理における各ピクチャータ
イプのデータ量に基づいて目標データ量生成手段がピク
チャータイプごとに生成した各単位期間の目標データ量
以下であって、目標データ量にほぼ等しくするような量
子化値をピクチャータイプごとに生成し、量子化手段に
順次、設定する。
In a certain (k-th) compression process, the first quantization value generating means calculates the data amount of the compressed video data in each unit period based on the data amount of each picture type in the previous compression process. The target data amount generation unit generates a quantization value for each picture type that is equal to or less than the target data amount of each unit period generated for each picture type and is substantially equal to the target data amount, and sequentially to the quantization unit, Set.

【0012】目標データ量生成手段は、前回(第k−1
回目の)圧縮処理において、データ量計数手段が計数
し、各ピクチャータイプのデータ量に基づいて、ある
(第k回目の)圧縮処理における各ピクチャータイプの
各単位期間ごとの目標データ量を算出し、量子化値生成
手段に設定する。第2の量子化値生成手段は、例えば、
ある(第k回目)の圧縮符号化において用いられた各ピ
クチャータイプの量子化値の平均値をも求めることによ
り、次(第k+1回目)の圧縮符号化において用いられ
る固定値の量子化値を算出し、量子化手段に設定する。
[0012] The target data amount generating means is provided in the previous (k-1)
In the (second) compression process, the data amount counting means counts and calculates a target data amount for each unit period of each picture type in a certain (k-th) compression process based on the data amount of each picture type. , In the quantization value generation means. The second quantization value generation means includes, for example,
By also calculating the average value of the quantization values of each picture type used in a certain (k-th) compression encoding, the fixed-value quantization value used in the next (k + 1) -th compression encoding is calculated. Calculate and set to quantization means.

【0013】つまり、映像データ生成手段は、例えば、
奇数(第k−1)回目の圧縮符号化においては、第2の
量子化値生成手段が設定した固定の量子化値を用いて圧
縮符号化を行い、各ピクチャータイプのデータ量を単位
期間ごとに計数し、目標データ量生成手段が、各ピクチ
ャータイプのデータ量の計数値に基づいて、次(第k回
目;偶数回目)の圧縮符号化において、各ピクチャータ
イプのデータ量の各単位期間ごとの目標値(目標データ
量)を算出する。
That is, the video data generating means includes, for example,
In the odd (k-1) th compression encoding, compression encoding is performed using the fixed quantization value set by the second quantization value generation means, and the data amount of each picture type is reduced for each unit period. In the next (k-th, even-numbered) compression encoding, the target data amount generation means performs the following for each unit period of the data amount of each picture type based on the counted value of the data amount of each picture type. Is calculated (target data amount).

【0014】例えば、第2の量子化値生成手段は、例え
ば、偶数(第k)回目の圧縮符号化において、映像デー
タ生成手段の第1の量子化値生成手段が生成した各ピク
チャータイプの量子化値の平均値を算出し、次(第k+
1回目;奇数回目)の圧縮符号化において、映像データ
生成手段において用いられる各ピクチャータイプの量子
化値として量子化手段に設定する。このように、量子化
値および目標データ量は圧縮符号化ごとに最適化され、
充分に最適化された固定値の量子化値により予測された
目標データ量を用いた最後の圧縮符号化により圧縮符号
化された映像データが、最終的に出力される。
[0014] For example, the second quantized value generating means, for example, in each of the even (k) -th compression encodings, generates a quantized value of each picture type generated by the first quantized value generating means of the video data generating means. Calculate the average value of the
In the first (odd number) compression encoding, the quantization value is set as a quantization value of each picture type used in the video data generation means. Thus, the quantization value and the target data amount are optimized for each compression encoding,
Video data compressed and encoded by the final compression encoding using the target data amount predicted by the sufficiently optimized fixed value quantization value is finally output.

【0015】また、本発明に係る映像データ圧縮方法
は、所定の処理が施された映像データを、少なくとも、
外部から設定される量子化値により量子化して圧縮処理
し、圧縮後の映像データのデータ量を計数し、第k回目
の圧縮処理において、圧縮後の映像データのデータ量
を、外部から設定される目標データ量が示す値と同じと
なるように前記量子化値を生成し、第(k−1)回目の
圧縮処理において計数した圧縮後の映像データのデータ
量に基づいて、第k回目の圧縮処理における前記目標デ
ータ量を生成し、第k回目の圧縮処理において生成した
前記量子化値に基づいて、第(k+1)回目の圧縮処理
における固定の量子化値を生成する。
[0015] In the video data compression method according to the present invention, the video data which has been subjected to the predetermined processing is converted into at least
The data is quantized and compressed by an externally set quantization value, the data amount of the compressed video data is counted, and in the k-th compression process, the data amount of the compressed video data is set from the outside. The quantization value is generated so as to be the same as the value indicated by the target data amount, and based on the data amount of the compressed video data counted in the (k-1) th compression processing, the k-th quantization process is performed. The target data amount in the compression processing is generated, and a fixed quantization value in the (k + 1) th compression processing is generated based on the quantization value generated in the kth compression processing.

【0016】好適には、入力される映像データを複数の
種類のピクチャーに圧縮し、前記映像データのピクチャ
ーそれぞれを、圧縮後のピクチャーの種類それぞれの量
子化値により量子化し、前記複数の種類のピクチャーそ
れぞれのデータ量を計数し、前記複数の種類のピクチャ
ーそれぞれのデータ量が、圧縮後のピクチャーの種類そ
れぞれの前記目標データ量が示す値と同じになるよう
に、圧縮後のピクチャーの種類それぞれに対応する量子
化値を生成し、計数した前記複数の種類のピクチャーそ
れぞれのデータ量に基づいて、第k回目の圧縮処理にお
ける前記複数の種類のピクチャーそれぞれの目標データ
量を生成し、生成した前記複数の種類のピクチャーそれ
ぞれの量子化値に基づいて、複数の種類のピクチャーそ
れぞれの固定の量子化値を生成する。
Preferably, the input video data is compressed into a plurality of types of pictures, each picture of the video data is quantized by a quantization value of each type of the compressed picture, and the plurality of types of pictures are compressed. The data amount of each picture is counted, and each of the plurality of types of pictures is compressed so that the data amount of each of the plurality of types of pictures becomes the same as the value indicated by the target data amount of each of the types of compressed pictures. And generating a target data amount of each of the plurality of types of pictures in the k-th compression process based on the counted data amounts of the plurality of types of pictures. Based on the quantization value of each of the plurality of types of pictures, a fixed quantum To generate a value.

【0017】[0017]

【発明の実施の形態】第1実施形態 以下、本発明の第1の実施形態を説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment Hereinafter, a first embodiment of the present invention will be described.

【0018】映像データ圧縮装置1 図1は、本発明に係る映像データ圧縮装置1の構成を示
す図である。図1に示すように、本発明に係る映像デー
タ圧縮装置1は、ディジタルビデオテープレコーダ(V
TR)等の再生装置10、記録装置12、制御用コンピ
ュータ14およびエンコーダ20から構成される。
The video data compression apparatus 1 Figure 1 is a diagram showing the configuration of a video data compression apparatus 1 according to the present invention. As shown in FIG. 1, a video data compression device 1 according to the present invention includes a digital video tape recorder (V
TR) or the like, a recording device 12, a control computer 14, and an encoder 20.

【0019】映像データ圧縮装置1は、これらの構成部
分により、いわゆる2パスエンコードを行う。つまり、
映像データ圧縮装置1は、第1回目の圧縮符号化処理
(1パス目)において、固定の量子化値Qを用いて非圧
縮の映像データを圧縮符号化し、所定の単位期間(例え
ばGOP)ごとの圧縮映像データのデータ量(発生符号
量GB;GB)を求める。
The video data compression apparatus 1 performs so-called two-pass encoding using these components. That is,
In the first compression encoding process (first pass), the video data compression device 1 compresses and encodes non-compressed video data using a fixed quantization value Q, and performs a predetermined unit period (for example, GOP) Of the compressed video data (generated code amount GB; GB).

【0020】さらに、映像データ圧縮装置1は、、第2
回目の圧縮符号化処理(2パス目)において、1パス目
において求めた単位期間ごとの発生符号量GBに基づい
て、単位期間ごとの目標データ量TBを算出し、各単位
期間ごとの発生符号量GBがほぼ、目標データ量TBと
等しくなるように非圧縮の映像データを再度、圧縮符号
化し、最終的な圧縮映像データを生成する。
Further, the video data compression device 1 includes:
In the second compression encoding process (second pass), a target data amount TB for each unit period is calculated based on the generated code amount GB for each unit period obtained in the first pass, and the generated code amount for each unit period is calculated. The non-compressed video data is compression-encoded again so that the amount GB becomes substantially equal to the target data amount TB, thereby generating final compressed video data.

【0021】制御用コンピュータ14 制御用コンピュータ14は、映像データ圧縮装置1の各
構成部分の動作を制御する。また、制御用コンピュータ
14は、1パス目の圧縮符号化時の単位期間ごとの圧縮
映像データの発生符号量GBに基づいて、2パス目の圧
縮符号化時に、発生符号量GBの総和が、例えば、記録
装置12に用いられる記録媒体(VTRテープ)の記録
容量以下であって、この記録容量とほぼ同じになり、し
かも、圧縮映像データVOUTの品質を全体として高く
保つことができる目標データ量TBを単位期間ごとに算
出し、エンコーダ20に設定する。
Control Computer 14 The control computer 14 controls the operation of each component of the video data compression device 1. Further, the control computer 14 calculates the total sum of the generated code amounts GB during the second pass compression encoding based on the generated code amount GB of the compressed video data for each unit period during the first pass compression encoding. For example, a target data amount that is less than or equal to the recording capacity of a recording medium (VTR tape) used in the recording device 12 and is substantially the same as this recording capacity, and that can maintain the quality of the compressed video data VOUT as a whole high. TB is calculated for each unit period and set in the encoder 20.

【0022】再生装置10 再生装置10は、1パス目および2パス目の圧縮符号化
時に、非圧縮時映像データVINを再生し、エンコーダ
20による圧縮符号化に対して出力する。記録装置12 記録装置12は、2パス目の圧縮符号化により得られた
圧縮映像データVOUTを記録する。
The reproducing apparatus 10 reproduces the non-compressed video data VIN at the time of compression encoding in the first pass and the second pass, and outputs it for the compression encoding by the encoder 20. Recording device 12 The recording device 12 records the compressed video data VOUT obtained by the second pass compression encoding.

【0023】エンコーダ20 図2は、第1の実施形態におけるエンコーダ20(図
1)の構成および処理内容を示す図であって、(A)は
第1の実施形態におけるエンコーダ20の第1回目(1
パス目)の処理内容を示し、(B)は第1の実施形態に
おけるエンコーダ20の第2回目(2パス目)の処理内
容を示す。
Encoder 20 FIG. 2 is a diagram showing the configuration and processing contents of the encoder 20 (FIG. 1) in the first embodiment. FIG. 2A shows the first time of the encoder 20 in the first embodiment (FIG. 1). 1
(B) shows the processing contents of the second pass (second pass) of the encoder 20 in the first embodiment.

【0024】図2(A),(B)に示すように、図1に
示したエンコーダ20は、ピクチャー並べ替え部20
0、走査変換ブロック化部202、動き検出部204、
減算回路206、DCT部208、量子化部210、可
変長符号化部(VLC)212、逆量子化部214、逆
DCT(IDCT)部216、加算回路218、動き補
償部222,バッファ(buffer)224および符
号量制御部24から構成される。
As shown in FIGS. 2A and 2B, the encoder 20 shown in FIG.
0, a scan conversion blocker 202, a motion detector 204,
Subtraction circuit 206, DCT section 208, quantization section 210, variable length coding section (VLC) 212, inverse quantization section 214, inverse DCT (IDCT) section 216, addition circuit 218, motion compensation section 222, buffer (buffer) 224 and a code amount control unit 24.

【0025】エンコーダ20は、これらの構成部分によ
り、制御用コンピュータ14の制御に従って、一般的な
MPEG方式のエンコーダと同様に、動き補償処理、D
CT処理および可変長符号化処理を行って、入力映像デ
ータのピクチャーをIピクチャー、Pピクチャーおよび
Bピクチャーの組み合わせから構成されるGOP(group
of picture)単位に圧縮符号化する。
The encoder 20 operates in accordance with the control of the control computer 14 by these components in the same manner as a general MPEG encoder.
By performing a CT process and a variable-length encoding process, a picture of input video data is converted into a GOP (group) composed of a combination of an I picture, a P picture, and a B picture.
of picture).

【0026】なお、図2(A),(B)に示すように、
エンコーダ20の1パス目の動作と2パス目の動作とは
異なっており、第1回目の圧縮符号化においては、図2
(A)に示すように、再生装置10から入力される非圧
縮の映像データVINに対して、制御用コンピュータ1
4から設定される固定の量子化値Qを用いた圧縮符号化
を行い、圧縮符号化処理の結果として得られた圧縮映像
データの単位期間ごとの発生符号量GBを計数して制御
用コンピュータ14に対して出力する動作を行う。
As shown in FIGS. 2A and 2B,
The operation in the first pass and the operation in the second pass of the encoder 20 are different, and in the first compression encoding, the operation shown in FIG.
As shown in FIG. 1A, the control computer 1 applies uncompressed video data VIN input from the playback device 10.
The compression encoding is performed using the fixed quantization value Q set from step No. 4, the generated code amount GB per unit period of the compressed video data obtained as a result of the compression encoding processing is counted, and the control computer 14 The operation to output to is performed.

【0027】さらに、エンコーダ20は、第2回目の圧
縮符号化においては、図2(B)に示すように、単位期
間ごとの発生符号量GBが、制御用コンピュータ14か
ら単位期間ごとに設定される目標データ量TBとほぼ同
じになるように映像データを圧縮符号化し、記録装置1
2に対して出力する。
Further, in the second compression encoding, as shown in FIG. 2B, the encoder 20 sets the generated code amount GB per unit period from the control computer 14 for each unit period. The video data is compression-encoded to be substantially the same as the target data amount TB,
2 is output.

【0028】エンコーダ20の構成部分 エンコーダ20において、ピクチャー並べ替え部200
は、ピクチャータイプ制御部250の制御に従って、圧
縮符号化後にいずれのピクチャータイプとなるかに応じ
て、再生装置10から入力される非圧縮映像データVI
Nのピクチャーを圧縮符号化に適した順番に並び替え
て、走査変換ブロック化部202に対して出力する。
The picture rearranging section 200 is a component of the encoder 20.
Is the uncompressed video data VI input from the playback device 10 according to the picture type after the compression and encoding under the control of the picture type control unit 250.
The N pictures are rearranged in an order suitable for compression encoding and output to the scan conversion blocking unit 202.

【0029】走査変換ブロック化部202は、ピクチャ
ー並べ替え部200から入力された映像データをフィー
ルド/フレーム変換し、さらにマクロブロック化して動
き検出部204および減算回路206に対して出力す
る。動き検出部204は、走査変換ブロック化部202
から入力される映像データをマクロブロック単位に処理
してその動きを検出し、映像の動きを示す動きベクトル
を生成して動き検出部204に対して出力する。
The scan conversion blocking unit 202 performs field / frame conversion on the video data input from the picture rearranging unit 200, further converts the video data into macroblocks, and outputs the macroblocks to the motion detection unit 204 and the subtraction circuit 206. The motion detection unit 204 includes a scan conversion blocking unit 202.
Then, the video data input from is processed in units of macroblocks to detect the motion, a motion vector indicating the motion of the video is generated, and output to the motion detection unit 204.

【0030】減算回路206は、走査変換ブロック化部
202から入力される映像データに含まれるピクチャー
の内、圧縮符号化後にIピクチャーとなるピクチャーの
映像データをそのままDCT部208に対して出力す
る。また、減算回路206は、走査変換ブロック化部2
02から入力される映像データに含まれるピクチャーの
内、圧縮符号化後にPピクチャーまたはBピクチャーと
なるピクチャーの映像データから動き補償部222の出
力映像データを減算し、予測誤差データを生成してDC
T部208に対して出力する。
The subtraction circuit 206 outputs, to the DCT unit 208, the video data of a picture that becomes an I-picture after compression encoding among the pictures included in the video data input from the scan conversion blocking unit 202. Further, the subtraction circuit 206 includes the scan conversion blocking unit 2.
02, the output video data of the motion compensator 222 is subtracted from the video data of a picture that becomes a P picture or a B picture after compression encoding among the pictures included in the video data input from
Output to T section 208.

【0031】DCT部208は、減算回路206から入
力される圧縮符号化後にIピクチャーとなる映像デー
タ、および、圧縮符号化後にPピクチャーまたはBピク
チャーとなる映像データの予測誤差データをDCT処理
し、DCT処理の結果として得られたDCT係数を量子
化部210に対して出力する。
The DCT unit 208 performs DCT processing on video data that becomes an I-picture after compression encoding and prediction error data of a P-picture or a B-picture after compression encoding that are input from the subtraction circuit 206. The DCT coefficient obtained as a result of the DCT processing is output to quantization section 210.

【0032】量子化部210は、1パス目の圧縮符号化
時には、制御用コンピュータ14により設定される固定
の量子化値Qにより、2パス目の圧縮符号化時には、符
号量制御部24により単位期間ごとに設定される量子化
値Qにより、DCT部208から入力されたDCT係数
を量子化し、量子化データとして可変長符号化部212
および逆量子化部214に対して出力する。
The quantizing section 210 uses a fixed quantization value Q set by the control computer 14 at the time of compression encoding in the first pass, and the code amount control section 24 at the time of compression encoding in the second pass. The DCT coefficient input from the DCT unit 208 is quantized by the quantization value Q set for each period, and the variable length encoding unit 212 is quantized as quantized data.
And output to the inverse quantization unit 214.

【0033】可変長符号化部212は、量子化部210
から入力される量子化データを、例えばランレングス符
号化方式により可変長符号化して圧縮映像データを生成
し、バッファ224に対して出力する。逆量子化部21
4は、入力される量子化データに対して、量子化部21
0と逆の処理を行ってDCT係数を再生し、逆DCT部
216に対して出力する。
The variable length coding unit 212 includes a quantization unit 210
The variable-length encoding is performed on the quantized data input from for example by a run-length encoding method to generate compressed video data, and the compressed video data is output to the buffer 224. Inverse quantization unit 21
4 is a quantization unit 21 for the input quantized data.
The DCT coefficient is reproduced by performing processing opposite to 0, and is output to the inverse DCT section 216.

【0034】逆DCT部216は、入力されるDCT係
数に対してDCT部208と逆の処理を行って映像デー
タを再生し、加算回路218に対して出力する。加算回
路218は、逆DCT部216から入力される映像デー
タと、動き補償部222から入力される映像データとを
加算して映像データを再生し、動き補償部222に対し
て出力する。
The inverse DCT section 216 performs the reverse process of the DCT section 208 on the input DCT coefficients to reproduce video data, and outputs the video data to the addition circuit 218. The addition circuit 218 adds up the video data input from the inverse DCT unit 216 and the video data input from the motion compensation unit 222 to reproduce the video data, and outputs the video data to the motion compensation unit 222.

【0035】バッファ224は、1パス目の圧縮符号化
時には、可変長符号化部212から入力される圧縮映像
データの発生符号量GBを単位期間ごとに計数して制御
用コンピュータ14に対して出力し、2パス目の圧縮符
号化時には、可変長符号化部212から入力される圧縮
映像データVOUTをバッファリングして記録装置12
に対して出力するとともに、単位期間ごとに発生符号量
GBを順次、計数し、符号量制御部24に対して出力す
る。
The buffer 224 counts the generated code amount GB of the compressed video data input from the variable length coding unit 212 for each unit period and outputs it to the control computer 14 during the first pass compression coding. During the second pass compression encoding, the compressed video data VOUT input from the variable length encoding unit 212 is buffered and stored in the recording device 12.
And the generated code amount GB is sequentially counted for each unit period and output to the code amount control unit 24.

【0036】動き補償部222は、加算回路218から
入力される映像データに対して、動き検出部204から
入力される動きベクトルを用いた動き補償処理を行い、
減算回路206およびDCT部208に対して出力す
る。
The motion compensating unit 222 performs a motion compensating process on the video data input from the adding circuit 218 using the motion vector input from the motion detecting unit 204.
Output to subtraction circuit 206 and DCT section 208.

【0037】符号量制御部24 符号量制御部24は、2パス目の圧縮符号化時に、制御
用コンピュータ14から単位期間ごとに設定される目標
データ量TB、および、バッファ224から順次、入力
される発生符号量GBに基づいて、単位期間ごとの圧縮
映像データの発生符号量GBが、目標データ量TBと等
しくなるように量子化値Qの値を調節し、量子化部21
0に設定する。
Code amount control unit 24 The code amount control unit 24 sequentially receives the target data amount TB set for each unit period from the control computer 14 and the buffer 224 at the time of compression encoding in the second pass. Based on the generated code amount GB, the quantization value Q is adjusted so that the generated code amount GB of the compressed video data for each unit period becomes equal to the target data amount TB.
Set to 0.

【0038】映像データ圧縮装置1の動作 以下、第1の実施形態における映像データ圧縮装置1の
動作を説明する。
The operation of the video data compression device 1 according to the first embodiment will be described below.

【0039】1パス目の圧縮符号化 制御用コンピュータ14の制御に従って、再生装置10
は、VTRテープ等から非圧縮映像データVINを再生
し、エンコーダ20に対して出力する。エンコーダ20
の各構成部分は、制御用コンピュータ14の制御に従っ
て、図2(A)に示した1パス目の圧縮符号化処理を行
う。
According to the control of the computer 14 for the first pass , the reproducing apparatus 10
Reproduces the uncompressed video data VIN from a VTR tape or the like, and outputs it to the encoder 20. Encoder 20
2 performs the first-pass compression encoding process shown in FIG. 2A under the control of the control computer 14.

【0040】つまり、エンコーダ20の量子化部210
には、制御用コンピュータ14により固定の量子化値Q
が設定され、量子化部210は、ピクチャー並べ替え部
200〜DCT部208、および、逆量子化部214〜
動き補償部222が生成したDCT係数を、固定の量子
化値Qにより量子化し、量子化データを可変長符号化部
212に対して出力する。
That is, the quantization unit 210 of the encoder 20
, The fixed quantization value Q
Is set, and the quantization unit 210 includes the picture rearrangement unit 200 to the DCT unit 208 and the inverse quantization unit 214 to
The DCT coefficient generated by the motion compensation unit 222 is quantized by a fixed quantization value Q, and the quantized data is output to the variable length coding unit 212.

【0041】可変長符号化部212は、量子化部210
から入力される量子化データを可変長符号化し、圧縮映
像データをバッファ224に対して出力する。バッファ
224は、可変長符号化部212から入力される圧縮映
像データの発生符号量GBを計数し、単位期間ごとに制
御用コンピュータ14に対して出力する。
The variable length coding unit 212 includes a quantization unit 210
, Performs variable-length encoding on the quantized data input from, and outputs the compressed video data to the buffer 224. The buffer 224 counts the generated code amount GB of the compressed video data input from the variable length coding unit 212, and outputs it to the control computer 14 for each unit period.

【0042】制御用コンピュータ14は、エンコーダ2
0のバッファ224から入力される単位期間ごとの発生
符号量GBに基づいて、単位期間ごとの目標データ量T
Bを算出する。
The control computer 14 includes the encoder 2
0 based on the generated code amount GB per unit period inputted from the buffer 224 of 0.
Calculate B.

【0043】2パス目の圧縮符号化 制御用コンピュータ14の制御に従って、再生装置10
は、VTRテープ等から1パス目の圧縮符号化時と同じ
非圧縮映像データVINを再生し、エンコーダ20に対
して出力する。エンコーダ20の各構成部分は、制御用
コンピュータ14の制御に従って、図2(B)に示した
2パス目の圧縮符号化処理を行う。
According to the control of the second-pass compression / coding control computer 14, the playback device 10
Reproduces the same uncompressed video data VIN from the VTR tape or the like as in the first pass compression encoding, and outputs the same to the encoder 20. Each component of the encoder 20 performs the second-pass compression encoding process shown in FIG. 2B under the control of the control computer 14.

【0044】つまり、エンコーダ20の符号量制御部2
4には、制御用コンピュータ14により、上述のように
算出された目標データTBが単位期間ごとに設定され、
符号量制御部24は、設定された目標データ量TBに基
づいて、各単位期間ごとの圧縮映像データの発生符号量
GBを目標データ量TBとほぼ等しくする量子化値Qを
順次、生成し、量子化部210に設定する。
That is, the code amount control unit 2 of the encoder 20
In 4, the target data TB calculated as described above is set for each unit period by the control computer 14,
The code amount control unit 24 sequentially generates, based on the set target data amount TB, a quantization value Q that makes the generated code amount GB of the compressed video data for each unit period substantially equal to the target data amount TB, This is set in the quantization unit 210.

【0045】量子化部210は、ピクチャー並べ替え部
200〜DCT部208、および、逆量子化部214〜
動き補償部222が生成したDCT係数を、符号量制御
部24から単位期間ごとに順次、設定される量子化値Q
により量子化し、量子化データを可変長符号化部212
に対して出力する。
The quantization section 210 includes a picture rearrangement section 200 to a DCT section 208 and an inverse quantization section 214 to
The DCT coefficients generated by the motion compensation unit 222 are sequentially converted from the code amount control unit 24 for each unit period by the quantized value Q
, And the quantized data is encoded by the variable-length encoding unit 212.
Output to

【0046】可変長符号化部212は、量子化部210
から入力される量子化データを可変長符号化し、圧縮映
像データVOUTを生成し、バッファ224を介して記
録装置12に対して出力する。記録装置12は、バッフ
ァ224を介して入力される圧縮映像データを、VTR
テープ等の記録媒体に記録する。
The variable length coding unit 212 includes a quantization unit 210
The variable-length coding is performed on the quantized data input from, and compressed video data VOUT is generated and output to the recording device 12 via the buffer 224. The recording device 12 converts the compressed video data input via the buffer 224 into a VTR
Record on a recording medium such as a tape.

【0047】図3は、図2(A)に示した映像データ圧
縮装置1による1パス目の圧縮符号化により得られる圧
縮映像データの発生符号量GBを例示する図表である。
図4は、図2(B)に示した映像データ圧縮装置1によ
る2パス目の圧縮符号化により得られる圧縮映像データ
の発生符号量GBを例示する図表である。なお、図3お
よび図4においては、単位期間が、15枚のピクチャー
を圧縮符号化するのに要する時間である場合について例
示してある。
FIG. 3 is a table exemplifying the generated code amount GB of the compressed video data obtained by the first pass compression encoding by the video data compression apparatus 1 shown in FIG.
FIG. 4 is a chart illustrating the generated code amount GB of the compressed video data obtained by the second pass compression encoding by the video data compression device 1 shown in FIG. Note that FIGS. 3 and 4 illustrate a case where the unit period is a time required for compression-coding 15 pictures.

【0048】単位期間が15枚のピクチャーを圧縮符号
化する時間であり、圧縮映像データVOUTのデータレ
ートが6Mbpsである場合には、単位期間ごとに割り
当てられるデータ量は3Mビットである。ここで、図2
(A)に示した1パス目の圧縮符号化により、ある単位
期間の圧縮映像データの発生符号量GBの総和が、図3
に示す通り、1744380ビットである場合には、制
御用コンピュータ14は、図2(B)に示した2パス目
の圧縮符号化において、対応する単位期間の圧縮映像デ
ータVOUTの発生符号量GBが、1パス目の3000
000/1744380倍になるように目標データ量T
Bを算出し、符号量制御部24に設定すればよい。この
ようにして、2パス目の圧縮符号化により得られる圧縮
映像データVOUTの発生符号量GBは、例えば、図4
に示す通りとなる。
When the unit period is the time for compressing and encoding 15 pictures, and the data rate of the compressed video data VOUT is 6 Mbps, the data amount allocated per unit period is 3 Mbits. Here, FIG.
By the first pass compression encoding shown in (A), the total sum of the generated code amounts GB of the compressed video data in a certain unit period becomes as shown in FIG.
In the case of 1744380 bits, the control computer 14 sets the generated code amount GB of the compressed video data VOUT in the corresponding unit period in the second-pass compression encoding shown in FIG. 3,000 for the first pass
Target data amount T so as to be 000/1744380 times
B may be calculated and set in the code amount control unit 24. In this way, the generated code amount GB of the compressed video data VOUT obtained by the second pass compression encoding is, for example, as shown in FIG.
It is as shown in.

【0049】以上説明したように、映像データ圧縮装置
1による2パスエンコードによれば、記録媒体の記録容
量を有効利用し、しかも、映像の品質を高く保って映像
データを圧縮符号化することができる。特に、2パスエ
ンコードの処理には、少なくとも2回、非圧縮映像デー
タを再生する時間が必要となるので、通信回線を介して
圧縮映像データを伝送する場合等、実時間性(リアルタ
イム性)を要求される用途には、必ずしも向いていない
が、記録媒体に記録する圧縮映像データを生成する場合
等、実時間性(リアルタイム性)を要求されない用途に
は好適である。
As described above, according to the two-pass encoding by the video data compression device 1, it is possible to effectively use the recording capacity of the recording medium and to compress and encode the video data while keeping the video quality high. it can. In particular, since the two-pass encoding process requires at least two times for reproducing the non-compressed video data, real-time performance (real-time performance) is required when transmitting the compressed video data via a communication line. Although it is not necessarily suitable for applications that require it, it is suitable for applications that do not require real-time properties (real-time properties), such as when generating compressed video data to be recorded on a recording medium.

【0050】第2実施形態 以下、本発明の第2の実施形態を説明する。 Second Embodiment Hereinafter, a second embodiment of the present invention will be described.

【0051】第2の実施形態の背景 まず、第2の実施形態の背景を説明する。図2(A),
(B)に示した2パスエンコードによれば、図3および
図4に例示したように、2パス目の圧縮符号化において
は、記録媒体の記録容量を、1パス目の圧縮符号化にお
いてよりも有効に利用することができる。
Background of the Second Embodiment First, the background of the second embodiment will be described. FIG. 2 (A),
According to the two-pass encoding shown in (B), as illustrated in FIGS. 3 and 4, in the second-pass compression encoding, the recording capacity of the recording medium is more increased in the first-pass compression encoding. Can also be used effectively.

【0052】しかしながら、1パス目の圧縮符号化で用
いる量子化値Qは、映像データVINの絵柄の複雑さ、
あるいは、動きの速さ(難度)にかかわらず一定であ
り、固定の量子化値Qと2パス目の圧縮符号化時に用い
られる量子化値Qとの間の差が大きく、1パス目の圧縮
符号化により得られた発生符号量GBからは、目標デー
タ量TBを近似的にしか算出できないことがある。従っ
て、2パス目で用いられる目標データ量TBは、必ずし
も最適値ではなく、映像データVINの絵柄の内容によ
っては、記録媒体の記録容量と実際の圧縮映像データV
OUTの発生符号量GBとの誤差が非常に大きくなって
しまう。
However, the quantization value Q used in the first-pass compression encoding is determined by the complexity of the picture data VIN,
Alternatively, the difference between the fixed quantized value Q and the quantized value Q used in the second pass compression encoding is large regardless of the speed (difficulty) of the motion, and the first pass compression is large. In some cases, the target data amount TB can be calculated only approximately from the generated code amount GB obtained by encoding. Therefore, the target data amount TB used in the second pass is not always an optimum value, and depending on the contents of the picture data VIN, the recording capacity of the recording medium and the actual compressed video data V
The error between OUT and the generated code amount GB becomes very large.

【0053】本発明の第2の実施形態は、このような観
点からなされたものであり、映像データ圧縮装置1(図
1)のエンコーダ20(図1,図2)の動作を変更し、
さらに多くの回数、圧縮符号化を行い、固定の量子化値
Qを用いて奇数回目の圧縮符号化を行って偶数回目の圧
縮符号化において用いられる目標データ量TBを算出
し、算出した目標データ量TBを用いて偶数回目の圧縮
符号化を行って、奇数回目の圧縮符号化において用いら
れる固定の量子化値Qを算出するという処理を繰り返す
ことにより、目標データ量TBの最適値を算出し、この
最適化した目標データ量TBを用いて、最終的な圧縮符
号化を行うことにより、記録媒体の記録容量をより有効
に利用し、映像の品質をより向上させるように構成され
ている。
The second embodiment of the present invention has been made from such a viewpoint, and changes the operation of the encoder 20 (FIGS. 1 and 2) of the video data compression device 1 (FIG. 1).
The target data amount TB used in the even-numbered compression encoding is calculated by performing the odd-numbered compression-encoding using the fixed quantized value Q by performing the compression-encoding more times, and calculating the calculated target data. The optimum value of the target data amount TB is calculated by repeating the process of performing the even-numbered compression encoding using the amount TB and calculating the fixed quantization value Q used in the odd-numbered compression encoding. By performing final compression encoding using the optimized target data amount TB, the recording capacity of the recording medium is more effectively used, and the quality of the video is further improved.

【0054】映像データ圧縮装置1の構成部分以下、図
5および図6をさらに参照して、映像データ圧縮装置1
の構成部分の 内、第1の実施形態においてと異なる動作を行うものを
説明する。
Components of the Video Data Compressor 1 The video data compressor 1 will be described with reference to FIGS.
Among the constituent parts of the first embodiment, those that perform operations different from those in the first embodiment will be described.

【0055】図5は、第2の実施形態におけるエンコー
ダ20(図1)の動作を示す図であって、(A)はエン
コーダ20の奇数回〔2i−1パス(1≦i≦m;2≦
m)〕目の圧縮符号化における動作を示し、(B)はエ
ンコーダ20の偶数回(2iパス)目の圧縮符号化にお
ける動作を示す。図6は、制御用コンピュータ14が、
偶数回目の圧縮符号化において求められた量子化値Qの
平均値を算出する処理を示すフローチャート図である。
FIG. 5 is a diagram showing the operation of the encoder 20 (FIG. 1) in the second embodiment. FIG. 5 (A) shows an odd number of times of the encoder 20 [2i-1 passes (1 ≦ i ≦ m; 2 ≤
m)] shows the operation in the compression encoding of the first time, and FIG. 8B shows the operation of the encoder 20 in the compression encoding of the even number of times (2i pass). FIG. 6 shows that the control computer 14
It is a flowchart figure which shows the process which calculates the average value of the quantization value Q calculated | required in the even-numbered compression encoding.

【0056】なお、特に記さない限り、映像データ圧縮
装置1(図1)の構成部分の動作は第1の実施形態にお
いてと同様であり、および、図5(A),(B)に示し
たエンコーダ20の構成部分の機能および動作は、図2
に同一符号を付して示したエンコーダ20の構成部分と
同じである。
Unless otherwise specified, the operation of the components of the video data compression device 1 (FIG. 1) is the same as in the first embodiment, and is shown in FIGS. 5 (A) and 5 (B). The functions and operations of the components of the encoder 20 are shown in FIG.
Are the same as the components of the encoder 20 indicated by the same reference numerals.

【0057】制御用コンピュータ14 制御用コンピュータ14は、第1回目の圧縮符号化にお
いては、第1の実施形態においてと同様に、エンコーダ
20の量子化部210に固定の量子化値Qの初期値を設
定し、その後の奇数(3,5,…)回目の圧縮符号化に
おいては、図5(A)に示すように、例えば、直前の偶
数(2,4,…)回目の圧縮符号化で用いられた量子化
値Qの平均値求めて固定の量子化値Qを最適化し、エン
コーダ20に設定する。
In the first compression encoding, the control computer 14 controls the initial value of the fixed quantization value Q in the quantization unit 210 of the encoder 20 in the same manner as in the first embodiment. In the subsequent odd-numbered (3, 5,...) Compression encoding, for example, as shown in FIG. The fixed quantization value Q is optimized by obtaining the average value of the used quantization values Q and set to the encoder 20.

【0058】制御用コンピュータ14は、直前の奇数
(1,3,5,…)回目の圧縮符号化において生成され
た単位期間ごとの圧縮映像データの発生符号量GBに基
づいて、図5(B)に示すように、偶数回目の圧縮符号
化に用いる単位期間ごとの目標符号量TBを算出するこ
とにより最適化し、エンコーダ20の符号量制御部24
に設定する。
The control computer 14 calculates the code amount GB of the compressed video data for each unit period generated in the immediately preceding odd (1, 3, 5,...) Compression encoding, as shown in FIG. ), The target code amount TB for each unit period used for the even-numbered compression encoding is optimized by calculation, and the code amount control unit 24 of the encoder 20 is optimized.
Set to.

【0059】図6を参照して、制御用コンピュータ14
が量子化値Qを算出する処理をさらに説明する。図6に
示すように、ステップ100(S100)において、制
御用コンピュータ14は、量子化値Qの平均値の算出に
用いる変数i,sumを初期化(値を0に)する。ステ
ップ102(S102)において、制御用コンピュータ
14は、変数iが数値m(第2の実施形態における偶数
回目の圧縮符号化処理の数)と等しいか否かを判断し、
等しい場合にはS108の処理に進み、変数iが数値m
未満である場合にはS104の処理に進む。
Referring to FIG. 6, control computer 14
Will further describe the process of calculating the quantization value Q. As shown in FIG. 6, in step 100 (S100), the control computer 14 initializes the variables i and sum used for calculating the average value of the quantization values Q (values are set to 0). In step 102 (S102), the control computer 14 determines whether or not the variable i is equal to a numerical value m (the number of even-numbered compression encoding processes in the second embodiment).
If they are equal, the process proceeds to S108, where the variable i is a numerical value m
If it is less than the value, the process proceeds to S104.

【0060】ステップ104(S104)において、制
御用コンピュータ14は、符号量制御部24から入力さ
れた量子化値Qを累加算する(sum←sum+Q)。
ステップ106(S106)において、制御用コンピュ
ータ14は、変数iをインクリメント(i←i+1)す
る。ステップ108(S108)において、制御用コン
ピュータ14は、量子化値Qの累加算値を数値mで除算
し、量子化値Qの平均値Qaveを算出する(Qave
←sum/m)。
In step 104 (S104), the control computer 14 accumulates the quantized value Q input from the code amount control unit 24 (sum ← sum + Q).
In step 106 (S106), the control computer 14 increments the variable i (i ← i + 1). In step 108 (S108), the control computer 14 calculates the average value Qave of the quantized values Q by dividing the cumulative sum of the quantized values Q by the numerical value m (Qave).
← sum / m).

【0061】エンコーダ20 エンコーダ20は、上述のように、さらに多くの回数、
映像データVINを圧縮符号化する。つまり、エンコー
ダ20は、図5(A)に示すように、制御用コンピュー
タ14から設定される固定の量子化値Qを用いて奇数回
目の圧縮符号化を行い、圧縮符号化の結果として得られ
た圧縮映像データの発生符号量GBを制御用コンピュー
タ14に対して出力する。
[0061] Encoder 20 The encoder 20, as described above, even more times,
The video data VIN is compression-encoded. That is, as shown in FIG. 5A, the encoder 20 performs odd-numbered compression encoding using the fixed quantization value Q set from the control computer 14, and obtains the result of the compression encoding. The generated code amount GB of the compressed video data is output to the control computer 14.

【0062】また、図5(B)に示すように、エンコー
ダ20は、制御用コンピュータ14から単位期間ごとに
設定される目標データ量TBを用いて偶数回目の圧縮符
号化を行い、偶数回目の圧縮符号化において用いた量子
化値Qの値を制御用コンピュータ14に対して出力す
る。また、エンコーダ20は、最後の偶数回目の圧縮符
号化において、制御用コンピュータ14により最適化さ
れた目標データ量TBを用いて生成した圧縮映像データ
VOUTをバッファ224を介して記録装置12に対し
て出力する。
As shown in FIG. 5B, the encoder 20 performs even-numbered compression encoding using the target data amount TB set for each unit period by the control computer 14, and performs even-numbered compression encoding. The value of the quantization value Q used in the compression encoding is output to the control computer 14. In addition, the encoder 20 transmits the compressed video data VOUT generated using the target data amount TB optimized by the control computer 14 to the recording device 12 via the buffer 224 in the final even-numbered compression encoding. Output.

【0063】エンコーダ20の構成部分 符号量制御部24 符号量制御部24は、図5(B)に示すように、第1の
実施形態においてと同様に、偶数回目の圧縮符号化にお
いて、制御用コンピュータ14から設定される目標デー
タ量TBに基づいて量子化値Qを生成し、量子化部21
0に設定することにより、圧縮映像データの発生符号量
GBを制御する。また、符号量制御部24は、図5
(B)に示すように、偶数回目の圧縮符号化において生
成した量子化値Qを制御用コンピュータ14に対して出
力する。
[0063] component code amount control unit 24, the code amount control unit 24 of the encoder 20, as shown in FIG. 5 (B), as well as in the first embodiment, the even-numbered compression coding, control A quantization value Q is generated based on a target data amount TB set from the computer 14,
By setting to 0, the generated code amount GB of the compressed video data is controlled. In addition, the code amount control unit 24 is configured as shown in FIG.
As shown in (B), the quantization value Q generated in the even-numbered compression encoding is output to the control computer 14.

【0064】バッファ224 バッファ224は、図5(A)に示すように、奇数回目
の圧縮符号化において生成された圧縮映像データの単位
期間ごとの発生符号量GBを制御用コンピュータ14に
対して出力する。また、バッファ224は、図5(B)
に示すように、最後の偶数(2m)回目の圧縮符号化に
おいて、制御用コンピュータ14により最適化された目
標データ量TBを用いて生成された圧縮映像データVO
UTを記録装置12に対して出力する。
As shown in FIG. 5A, the buffer 224 outputs the generated code amount GB per unit period of the compressed video data generated in the odd-numbered compression encoding to the control computer 14. I do. Further, the buffer 224 is provided as shown in FIG.
As shown in the figure, the compressed video data VO generated using the target data amount TB optimized by the control computer 14 in the final even (2m) -th compression encoding.
The UT is output to the recording device 12.

【0065】映像データ圧縮装置1の動作 以下、図7をさらに参照して、第2の実施形態における
映像データ圧縮装置1の動作を説明する。図7は、第2
の実施形態における映像データ圧縮装置1の動作を示す
フローチャート図である。
Operation of Video Data Compression Device 1 The operation of the video data compression device 1 according to the second embodiment will be described below with further reference to FIG. FIG.
It is a flowchart figure which shows operation | movement of the video data compression apparatus 1 in embodiment.

【0066】図7に示すように、ステップ200(S2
00)において、制御用コンピュータ14は、変数iを
初期化する(i←1)。ステップ201(S201)に
おいて、制御用コンピュータ14は、エンコーダ20の
量子化部210に、固定の量子化値Qの初期値を設定
し、再生装置10を制御して非圧縮映像データVINを
再生させる。
As shown in FIG. 7, step 200 (S2
In (00), the control computer 14 initializes a variable i (i ← 1). In step 201 (S201), the control computer 14 sets the initial value of the fixed quantization value Q in the quantization unit 210 of the encoder 20, and controls the playback device 10 to play back the uncompressed video data VIN. .

【0067】ステップ202(S202)において、エ
ンコーダ20は、再生装置10から入力された映像デー
タVINを、制御用コンピュータ14が符号量制御部2
4に設定した固定の量子化値Qを用いて圧縮符号化する
〔(2i−1)パス符号化〕。制御用コンピュータ14
は、エンコーダ20のバッファ224が出力する圧縮映
像データの単位期間ごとの発生符号量GBを取り込む。
In step 202 (S202), the encoder 20 converts the video data VIN input from the playback device 10 into the code amount control unit 2 by the control computer 14.
Compression encoding is performed using the fixed quantization value Q set to 4 [(2i-1) pass encoding]. Control computer 14
Captures the generated code amount GB per unit period of the compressed video data output from the buffer 224 of the encoder 20.

【0068】ステップ204(S204)において、制
御用コンピュータ14は、S202の処理において取り
込んだ発生符号量GBに基づいて、例えば、第1の実施
形態においてと同様に、単位期間ごとの目標データ量T
Bを計算し、エンコーダ20の符号量制御部24に設定
する。
In step 204 (S204), the control computer 14 sets the target data amount T per unit period based on the generated code amount GB fetched in the process of S202, for example, as in the first embodiment.
B is calculated and set in the code amount control unit 24 of the encoder 20.

【0069】ステップ206(S206)において、制
御用コンピュータ14は、再生装置10を制御して同じ
映像データVINを再生させる。エンコーダ20は、圧
縮符号化後の発生符号量GBが、符号量制御部24に設
定された目標データ量TBが示す値と同じになるよう
に、映像データVINを圧縮符号化する〔2iパス符号
化〕。なお、最後の圧縮符号化においては、制御用コン
ピュータ14は、記録装置12を制御して、エンコーダ
20が生成した圧縮映像データVOUTを記録させる。
In step 206 (S206), the control computer 14 controls the reproducing apparatus 10 to reproduce the same video data VIN. The encoder 20 compression-encodes the video data VIN so that the generated code amount GB after the compression encoding becomes equal to the value indicated by the target data amount TB set in the code amount control unit 24 [2i-pass code] ). In the last compression encoding, the control computer 14 controls the recording device 12 to record the compressed video data VOUT generated by the encoder 20.

【0070】ステップ208(S208)において、制
御用コンピュータ14は、変数iを2倍した値と数値m
とを比較し、i×2=mの場合は処理を終了し、i×2
<mの場合はS210の処理に進む。ステップ210
(S210)において、制御用コンピュータ14は、変
数iをインクリメント(i←i+1)する。
In step 208 (S208), the control computer 14 sets a value obtained by doubling the variable i and a numerical value m
And if i × 2 = m, the processing is terminated and i × 2 = m
If <m, the process proceeds to S210. Step 210
In (S210), the control computer 14 increments the variable i (i ← i + 1).

【0071】ステップ212(S212)において、制
御用コンピュータ14は、S206における圧縮符号化
時に符号量制御部24が生成した量子化値Qを取り込
む。ステップ214(S214)において、制御用コン
ピュータ14は、例えば、図6に示した処理を行い、S
206における圧縮符号化時に符号量制御部24が生成
した量子化値Qの平均値を求めることにより、次の圧縮
符号化における固定の量子化値Qを算出し、符号量制御
部24に設定する。
In step 212 (S212), the control computer 14 takes in the quantized value Q generated by the code amount control unit 24 at the time of compression encoding in S206. In step 214 (S214), the control computer 14 performs, for example, the processing shown in FIG.
The fixed quantization value Q in the next compression encoding is calculated by calculating the average of the quantization values Q generated by the code amount control unit 24 at the time of the compression encoding in 206, and is set in the code amount control unit 24. .

【0072】変形例1 以下、図8を参照して、第2の実施形態の第1の変形例
を説明する。図8は、本発明の第2の実施形態の第1の
変形例の処理を示すフローチャートである。
Modification 1 Hereinafter, a first modification of the second embodiment will be described with reference to FIG. FIG. 8 is a flowchart illustrating a process according to a first modification of the second embodiment of the present invention.

【0073】MPEG方式は、映像データをIピクチャ
ー、PピクチャーおよびBピクチャーの組み合わせに圧
縮符号化する。これらのピクチャーの性質に応じて、そ
れぞれ異なった量子化値Qを用いて量子化を行うと、圧
縮映像データの品質をさらに向上させ、しかも、記録媒
体の記録容量をさらに有効利用することができる。以下
に示す第1の変形例は、かかる観点から、Iピクチャ
ー、PピクチャーおよびBピクチャーそれぞれの量子化
値Qを算出するように、図6および図7のS214に示
した量子化値Qの算出処理を改良したものである。
The MPEG system compresses and encodes video data into a combination of an I picture, a P picture, and a B picture. If quantization is performed using different quantization values Q according to the properties of these pictures, the quality of the compressed video data can be further improved and the recording capacity of the recording medium can be more effectively used. . From the above viewpoint, the first modification example calculates the quantization value Q shown in S214 of FIGS. 6 and 7 so as to calculate the quantization value Q of each of the I picture, the P picture, and the B picture. The processing is improved.

【0074】図8に示すように、ステップ300(S3
00)において、制御用コンピュータ14は、各変数
(i,Ni ,Np ,Nb ,sumi ,sump ,sum
b )をゼロクリアする。ステップ302(S302)に
おいて、制御用コンピュータ14は、変数iと数値mと
を比較し、i=mの場合はS320の処理に進み、i<
mの場合はS304の処理に進む。
As shown in FIG. 8, step 300 (S3
00), the control computer 14 sets each of the variables (i, N i , N p , N b , sum i , sum p , sum
b ) is cleared to zero. In step 302 (S302), the control computer 14 compares the variable i with the numerical value m, and if i = m, proceeds to the process of S320, where i <
In the case of m, the process proceeds to S304.

【0075】ステップ304(S304)において、制
御用コンピュータ14は、エンコーダ20の符号量制御
部24から取り込んだ量子化値Qが、Iピクチャー、P
ピクチャーおよびBピクチャーのいずれのピクチャータ
イプの生成に用いられたかを検出し、量子化値Qが、B
ピクチャーの生成に用いられたものである場合にはS3
06の処理に進み、量子化値Qが、Pピクチャーの生成
に用いられたものである場合にはS310の処理に進
み、量子化値Qが、Iピクチャーの生成に用いられたも
のである場合にはS314の処理に進む。
In step 304 (S 304), the control computer 14 sets the quantized value Q fetched from the code amount control unit 24 of the encoder 20 to the I picture, P
Which of the picture type and the B picture is used to generate the picture type is detected.
If it is used for generating a picture, S3
Proceeding to step 06, if the quantized value Q is used for generating a P picture, proceed to step S310, and if the quantized value Q is used for generating an I picture , The process proceeds to S314.

【0076】ステップ306(S306)において、制
御用コンピュータ14は、符号量制御部24から取り込
んだ量子化値Qの内、Bピクチャーに対して用いられた
量子化値Qを累加算する(sumb ←sumb +Q)。
ステップ308(S308)において、制御用コンピュ
ータ14は、変数Nbをインクリメントする。
In step 306 (S306), the control computer 14 cumulatively adds the quantization value Q used for the B picture among the quantization values Q fetched from the code amount control unit 24 (sum b ← sum b + Q).
In step 308 (S308), the control computer 14 increments the variable N b.

【0077】ステップ310(S310)において、制
御用コンピュータ14は、符号量制御部24から取り込
んだ量子化値Qの内、Pピクチャーに対して用いられた
量子化値Qを累加算する(sump ←sump +Q)。
ステップ312(S308)において、制御用コンピュ
ータ14は、変数Npをインクリメントする。
In step 310 (S310), the control computer 14 cumulatively adds the quantized value Q used for the P picture among the quantized values Q fetched from the code amount control unit 24 (sum p ← sum p + Q).
In step 312 (S308), the control computer 14 increments the variable N p.

【0078】ステップ314(S310)において、制
御用コンピュータ14は、符号量制御部24から取り込
んだ量子化値Qの内、Iピクチャーに対して用いられた
量子化値Qを累加算する(sumi ←sumi +Q)。
ステップ316(S308)において、制御用コンピュ
ータ14は、変数Niをインクリメントする。ステップ
318(S318)において、制御用コンピュータ14
は、変数iをインクリメントする。
In step 314 (S310), the control computer 14 cumulatively adds the quantized value Q used for the I picture among the quantized values Q fetched from the code amount control unit 24 (sum i ← sum i + Q).
In step 316 (S308), the control computer 14 increments the variable N i. In step 318 (S318), the control computer 14
Increments the variable i.

【0079】ステップ320(S320)においで、制
御用コンピュータ14は、S306の処理において算出
したBピクチャーに対して用いられた量子化値Qの累加
算値を変数Nb で除算し、S310の処理において算出
したPピクチャーに対して用いられた量子化値Qの累加
算値を変数Np で除算し、S314の処理において算出
したIピクチャーに対して用いられた量子化値Qの累加
算値を変数Ni で除算し、Bピクチャー、Pピクチャー
およびIピクチャーそれぞれの生成に用いられた量子化
値Qの平均値Qaveb ,Qavep ,Qavei を算
出する。
[0079] In Step 320 (S320) odor control computer 14 divides the accumulated sum of the quantization value Q which is used for B-picture calculated in the processing in S306 the variable N b, the processing of S310 Is divided by the variable N p , and the cumulative addition value of the quantization value Q used for the I picture calculated in the process of S314 is calculated by dividing the cumulative addition value of the quantization value Q used for the P picture calculated in divided by the variable N i, calculated B-picture, the average value Qave b quantized value Q used to generate the respective P picture and I picture, Qave p, the Qave i.

【0080】S320の処理において算出された各ピク
チャータイプの生成に用いられた量子化値Qの平均値Q
aveb ,Qavep ,Qavei は、エンコーダ20
の符号量制御部24に設定され、符号量制御部24は、
圧縮符号化後にそれぞれBピクチャー、Pピクチャーお
よびIピクチャーになるピクチャーのDCT係数を、平
均値Qaveb ,Qavep ,Qavei それぞれで量
子化し、量子化データを生成し、逆量子化部214およ
び可変長符号化部212に対して出力する。
The average value Q of the quantized values Q used for generating each picture type calculated in the process of S320
ave b , Qave p , Qave i are the encoder 20
Is set in the code amount control unit 24, and the code amount control unit 24
DCT coefficients of pictures that become B pictures, P pictures, and I pictures after compression encoding are respectively quantized by average values Qave b , Qave p , and Qave i to generate quantized data. Output to long encoding section 212.

【0081】変形例2 以下、図9を参照して、第2の実施形態の第2の変形例
を説明する。図9は、第2の実施形態の第2の変形例、
映像データ圧縮装置2の構成を示す図である。なお、図
9に示した映像データ圧縮装置2の構成部分のうち、図
1に示した映像データ圧縮装置1の構成部分と同じもの
には、同一の符号を付して示してある。
Modification 2 Hereinafter, a second modification of the second embodiment will be described with reference to FIG. FIG. 9 shows a second modification of the second embodiment,
FIG. 2 is a diagram illustrating a configuration of a video data compression device 2. Note that among the components of the video data compression device 2 shown in FIG. 9, the same components as those of the video data compression device 1 shown in FIG. 1 are denoted by the same reference numerals.

【0082】図9に示すように、映像データ圧縮装置2
は、再生装置10、記録装置12、制御用コンピュータ
14および2m個のエンコーダ201 〜202mから構成
されており、奇数番目のエンコーダ202i-1が、図7に
示したS202の圧縮符号化処理〔(2i−1)パス符
号化〕を行い、偶数番目のエンコーダ202iが、図7に
示したS202の圧縮符号化処理〔2iパス符号化〕を
行う。
As shown in FIG. 9, the video data compression device 2
The playback device 10, recording device 12 is constituted by a control computer 14 and the 2m encoder 20 1 to 20 2m, the encoder 20 2i-1 of the odd-numbered is compression-encoded in S202 shown in FIG. 7 The process [(2i-1) pass encoding] is performed, and the even-numbered encoder 202i performs the compression encoding process [2i pass encoding] in S202 shown in FIG.

【0083】制御用コンピュータ14は、奇数番目のエ
ンコーダ202i-1が生成した圧縮映像データの発生符号
量GBに基づいて、奇数番目のエンコーダ202iに設定
する目標データ量TBを生成し、最適化する。エンコー
ダ202mは、最適化された目標データ量TBを用いて、
最終的に映像データVINを圧縮符号化し、圧縮映像デ
ータVOUTを生成して記録装置12に対して出力す
る。
The control computer 14 generates a target data amount TB to be set in the odd-numbered encoder 202i based on the generated code amount GB of the compressed video data generated by the odd-numbered encoder 202i-1. Become The encoder 202m uses the optimized target data amount TB,
Finally, the video data VIN is compression-encoded to generate compressed video data VOUT and output it to the recording device 12.

【0084】なお、映像データ圧縮装置1およびエンコ
ーダ20の各構成部分は、同等の機能および性能を実現
可能であるかぎり、ソフトウェアにより構成されるか、
ハードウェアにより構成されるかを問わず、また、同等
の機能および性能を有する他の手段に置換することがで
きる。また、第2の実施形態およびその2つの変形例と
して示した圧縮符号化方法は、互いに矛盾しないかぎ
り、組み合わせて用いることができる。
Each component of the video data compression apparatus 1 and the encoder 20 is configured by software as long as equivalent functions and performance can be realized.
Regardless of whether it is constituted by hardware, it can be replaced with another means having the same function and performance. Also, the compression encoding methods shown as the second embodiment and the two modifications thereof can be used in combination as long as they do not conflict with each other.

【0085】以上説明したように、本発明の第2の実施
形態によれば、固定の量子化値Qを用いて奇数回目の圧
縮符号化を行い、偶数回目の圧縮符号化において用いら
れる目標データ量TBを算出し、算出した目標データ量
TBを用いて偶数回目の圧縮符号化を行い、奇数回目の
圧縮符号化において用いられる固定の量子化値Qを算出
するという処理を繰り返すことにより、目標データ量T
Bを最適化することができる。従って、この最適化した
目標データ量TBを用いて、最終的な圧縮符号化を行う
ことにより、記録媒体の記録容量をより有効に利用で
き、映像の品質をより向上させることができる。
As described above, according to the second embodiment of the present invention, the odd-numbered compression encoding is performed using the fixed quantization value Q, and the target data used in the even-numbered compression encoding is used. The amount TB is calculated, the even-numbered compression encoding is performed using the calculated target data amount TB, and the process of calculating the fixed quantization value Q used in the odd-numbered compression encoding is repeated. Data amount T
B can be optimized. Therefore, by performing the final compression encoding using the optimized target data amount TB, the recording capacity of the recording medium can be more effectively used, and the quality of the video can be further improved.

【0086】[0086]

【発明の効果】以上述べたように、本発明に係る映像デ
ータ圧縮装置およびその方法によれば、映像データを圧
縮符号化し、記録媒体の記録容量あるいは通信回線の伝
送容量を有効利用し、しかも、映像の品質を高く保ちう
るデータ量(データ量)の圧縮映像データを生成するこ
とができる。また、本発明に係る映像データ圧縮装置お
よびその方法によれば、量子化値を適切に制御すること
により、記録媒体の記録容量あるいは通信回線の伝送容
量を有効利用し、しかも、映像の品質を高く保ちうる。
As described above, according to the video data compression apparatus and method according to the present invention, video data is compression-encoded, and the recording capacity of a recording medium or the transmission capacity of a communication line is effectively used. Thus, it is possible to generate compressed video data of a data amount (data amount) capable of maintaining high video quality. Further, according to the video data compression apparatus and method according to the present invention, by appropriately controlling the quantization value, the recording capacity of the recording medium or the transmission capacity of the communication line can be effectively used, and the quality of the video can be reduced. Can be kept high.

【図面の簡単な説明】[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の実施形態におけるエンコーダ(図1)の
構成および処理内容を示す図であって、(A)は第1の
実施形態におけるエンコーダの第1回目(1パス目)の
処理内容を示し、(B)は第1の実施形態におけるエン
コーダの第2回目(2パス目)の処理内容を示す。
FIGS. 2A and 2B are diagrams showing a configuration and processing contents of an encoder (FIG. 1) in the first embodiment, wherein FIG. 2A shows processing contents of a first (first pass) processing of the encoder in the first embodiment; (B) shows the processing content of the second (second pass) of the encoder in the first embodiment.

【図3】図2(A)に示した映像データ圧縮装置による
1パス目の圧縮符号化により得られる圧縮映像データの
発生符号量GBを例示する図表である。
3 is a table illustrating a generated code amount GB of compressed video data obtained by a first-pass compression encoding performed by the video data compression device illustrated in FIG. 2A.

【図4】図2(B)に示した映像データ圧縮装置による
2パス目の圧縮符号化により得られる圧縮映像データの
発生符号量GBを例示する図表である。
FIG. 4 is a table illustrating an example of a generated code amount GB of compressed video data obtained by a second-pass compression encoding performed by the video data compression device illustrated in FIG.

【図5】図5は、第2の実施形態におけるエンコーダ
(図1)の動作を示す図であって、(A)はエンコーダ
の奇数回〔2i−1パス(1≦i≦m;2≦m)〕目の
圧縮符号化における動作を示し、(B)はエンコーダの
偶数回(2iパス)目の圧縮符号化における動作を示
す。
FIG. 5 is a diagram showing the operation of the encoder (FIG. 1) in the second embodiment, where (A) is an odd number of [2i−1 passes (1 ≦ i ≦ m; 2 ≦ m)] shows the operation in the compression encoding, and (B) shows the operation in the even-number (2i pass) compression encoding of the encoder.

【図6】図6は、制御用コンピュータが、偶数回目の圧
縮符号化において求められた量子化値Qの平均値を算出
する処理を示すフローチャート図である。
FIG. 6 is a flowchart illustrating a process in which the control computer calculates an average value of the quantized values Q obtained in the even-numbered compression encoding.

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

【図8】本発明の第2の実施形態の第1の変形例の処理
を示すフローチャートである。
FIG. 8 is a flowchart illustrating a process according to a first modification of the second embodiment of the present invention.

【図9】第2の実施形態の第2の変形例を示す図であ
る。
FIG. 9 is a diagram illustrating a second modification of the second embodiment.

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

1,2…映像データ圧縮装置、10…再生装置、12…
記録装置、14…制御用コンピュータ、20,201
202m…エンコーダ、200…ピクチャー並べ替え部、
202…走査変換ブロック化部、204…動き検出部、
206…減算回路、208…DCT部、210…量子化
部、212…可変長符号化部、214…逆量子化部、2
16…逆DCT部216、218…加算器、222…動
き補償部、224…バッファ、24…符号量制御部。
1, 2, ... video data compression device, 10 ... reproduction device, 12 ...
Recording device, 14 ... control computer, 20, 20 1 ~
20 2m ... Encoder, 200 ... Picture rearranging part,
202: scan conversion blocker, 204: motion detector,
206: subtraction circuit, 208: DCT unit, 210: quantization unit, 212: variable length coding unit, 214: inverse quantization unit, 2
16 ... Inverse DCT sections 216, 218 ... Adder, 222 ... Motion compensation section, 224 ... Buffer, 24 ... Code amount control section.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】少なくとも、 所定の処理が施された映像データを、外部から設定され
る量子化値により量子化する量子化手段、 圧縮後の映像データのデータ量を計数するデータ量計数
手段、および、 第k回目の圧縮処理において、圧縮後の映像データのデ
ータ量を、外部から設定される目標データ量が示す値と
同じとなるように前記量子化値を生成し、前記量子化手
段に設定する第1の量子化値生成手段を具備し、 入力される映像データを圧縮処理する映像データ圧縮手
段と、 第(k−1)回目の圧縮処理において計数した圧縮後の
映像データのデータ量に基づいて、第k回目の圧縮処理
における前記目標データ量を生成し、前記量子化値生成
手段に設定する目標データ量生成手段と、 第k回目の圧縮処理において生成した前記量子化値に基
づいて、第(k+1)回目の圧縮処理における固定の量
子化値を生成し、前記量子化手段に設定する第2の量子
化値生成手段とを有する映像データ圧縮装置。
At least a quantizing means for quantizing video data which has been subjected to predetermined processing by a quantization value set from the outside, a data amount counting means for counting a data amount of compressed video data, And in the k-th compression processing, the quantization unit generates the quantization value so that the data amount of the compressed video data is equal to a value indicated by a target data amount set from the outside. A video data compression means for compressing input video data, comprising: first quantization value generation means for setting; and a data amount of compressed video data counted in the (k-1) th compression processing The target data amount in the k-th compression processing is generated based on the target data amount generation means to be set in the quantization value generation means, and the quantization value generated in the k-th compression processing is Zui, the first (k + 1) -th fixed generates quantized values in the compression process, the image data compression device having a second quantization value generating means for setting the quantization means.
【請求項2】前記映像データ圧縮手段は、入力される映
像データを複数の種類のピクチャーに圧縮し、 前記量子化手段は、前記映像データのピクチャーそれぞ
れを、圧縮後のピクチャーの種類それぞれの量子化値に
より量子化し、 データ量計数手段は、前記複数の種類のピクチャーそれ
ぞれのデータ量を計数し、 第1の量子化値生成手段は、前記複数の種類のピクチャ
ーそれぞれのデータ量が、圧縮後のピクチャーの種類そ
れぞれの前記目標データ量が示す値と同じになるよう
に、圧縮後のピクチャーの種類それぞれに対応する量子
化値を生成し、 前記目標データ量生成手段は、計数した前記複数の種類
のピクチャーそれぞれのデータ量に基づいて、第k回目
の圧縮処理における前記複数の種類のピクチャーそれぞ
れの目標データ量を生成し、 前記第2の量子化値生成手段は、生成した前記複数の種
類のピクチャーそれぞれの量子化値に基づいて、複数の
種類のピクチャーそれぞれの固定の量子化値を生成する
請求項1に記載の映像データ圧縮装置。
2. The video data compression means compresses input video data into a plurality of types of pictures, and the quantization means converts each of the pictures of the video data into a quantized picture of each of the compressed picture types. The data amount counting means counts the data amount of each of the plurality of types of pictures, and the first quantization value generation means calculates the data amount of each of the plurality of types of pictures after compression. Generating a quantized value corresponding to each of the compressed picture types so that the target data amount of each of the picture types is the same as the value indicated by the target data amount. Generating a target data amount for each of the plurality of types of pictures in the k-th compression process based on a data amount of each of the types of pictures 2. The method according to claim 1, wherein the second quantization value generation unit generates fixed quantization values for each of the plurality of types of pictures based on the generated quantization values for each of the plurality of types of pictures. Video data compression device.
【請求項3】所定の処理が施された映像データを、少な
くとも、外部から設定される量子化値により量子化して
圧縮処理し、 圧縮後の映像データのデータ量を計数し、 第k回目の圧縮処理において、圧縮後の映像データのデ
ータ量を、外部から設定される目標データ量が示す値と
同じとなるように前記量子化値を生成し、 第(k−1)回目の圧縮処理において計数した圧縮後の
映像データのデータ量に基づいて、第k回目の圧縮処理
における前記目標データ量を生成し、 第k回目の圧縮処理において生成した前記量子化値に基
づいて、第(k+1)回目の圧縮処理における固定の量
子化値を生成する映像データ圧縮方法。
3. The video data that has been subjected to a predetermined process is quantized by at least a quantization value set from the outside and subjected to compression processing, and the data amount of the video data after compression is counted. In the compression processing, the quantization value is generated so that the data amount of the compressed video data becomes the same as the value indicated by the target data amount set from the outside. In the (k-1) th compression processing, The target data amount in the k-th compression processing is generated based on the counted data amount of the compressed video data, and the (k + 1) -th (k + 1) -th data is generated based on the quantization value generated in the k-th compression processing. A video data compression method for generating a fixed quantization value in the second compression process.
【請求項4】入力される映像データを複数の種類のピク
チャーに圧縮し、 前記映像データのピクチャーそれぞれを、圧縮後のピク
チャーの種類それぞれの量子化値により量子化し、 前記複数の種類のピクチャーそれぞれのデータ量を計数
し、 前記複数の種類のピクチャーそれぞれのデータ量が、圧
縮後のピクチャーの種類それぞれの前記目標データ量が
示す値と同じになるように、圧縮後のピクチャーの種類
それぞれに対応する量子化値を生成し、 計数した前記複数の種類のピクチャーそれぞれのデータ
量に基づいて、第k回目の圧縮処理における前記複数の
種類のピクチャーそれぞれの目標データ量を生成し、 生成した前記複数の種類のピクチャーそれぞれの量子化
値に基づいて、複数の種類のピクチャーそれぞれの固定
の量子化値を生成する請求項3に記載の映像データ圧縮
方法。
4. Compressing input video data into a plurality of types of pictures, quantizing each of the pictures of the video data by a quantization value of each of the types of compressed pictures, Corresponding to each of the types of compressed pictures so that the data amount of each of the plurality of types of pictures is the same as the value indicated by the target data amount of each of the types of compressed pictures. And generating a target data amount of each of the plurality of types of pictures in the k-th compression process based on the counted data amount of each of the plurality of types of pictures. The fixed quantization value for each of multiple types of pictures is calculated based on the quantization value for each of the Video data compression method of claim 3 formed.
【請求項5】所定の処理が施された映像データを、少な
くとも、外部から設定される量子化値により量子化して
圧縮処理し、 圧縮後の映像データのデータ量を計数し、 第k回目の圧縮処理において、圧縮後の映像データのデ
ータ量を、外部から設定される目標データ量が示す値と
同じとなるように前記量子化値を生成し、 第(k−1)回目の圧縮処理において計数した圧縮後の
映像データのデータ量に基づいて、第k回目の圧縮処理
における前記目標データ量を生成し、 第k回目の圧縮処理において生成した前記量子化値に基
づいて、第(k+1)回目の圧縮処理における固定の量
子化値を生成するプログラムを記録した記録媒体。
5. The video data that has been subjected to a predetermined process is quantized by at least a quantization value set from the outside and subjected to a compression process, and the data amount of the video data after compression is counted. In the compression processing, the quantization value is generated so that the data amount of the compressed video data becomes the same as the value indicated by the target data amount set from the outside. In the (k-1) th compression processing, The target data amount in the k-th compression processing is generated based on the counted data amount of the compressed video data, and the (k + 1) -th (k + 1) -th data is generated based on the quantization value generated in the k-th compression processing. A recording medium on which a program for generating a fixed quantization value in the second compression processing is recorded.
JP34366596A 1996-12-24 1996-12-24 Device and method for compressing video data Pending JPH10191342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34366596A JPH10191342A (en) 1996-12-24 1996-12-24 Device and method for compressing video data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34366596A JPH10191342A (en) 1996-12-24 1996-12-24 Device and method for compressing video data

Publications (1)

Publication Number Publication Date
JPH10191342A true JPH10191342A (en) 1998-07-21

Family

ID=18363301

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34366596A Pending JPH10191342A (en) 1996-12-24 1996-12-24 Device and method for compressing video data

Country Status (1)

Country Link
JP (1) JPH10191342A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2401739A (en) * 2003-04-17 2004-11-17 Sony Uk Ltd Data compression

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2401739A (en) * 2003-04-17 2004-11-17 Sony Uk Ltd Data compression

Similar Documents

Publication Publication Date Title
US6072835A (en) Variable transfer rate control coding apparatus
US5661523A (en) Moving picture coding method and an apparatus therefor
KR100335707B1 (en) Coding method, coding apparatus, decoding method and decoding apparatus of image signal
US5657416A (en) Apparatus for further compressing and recording encoded digital video data streams
KR100756596B1 (en) Video data encoder and video data encoding method
KR100273906B1 (en) Moving picture variable bit rate coding apparatus, moving picture variable bit rate coding method, and recording medium for moving picture variable bit rate coding program
JP2963416B2 (en) Video encoding method and apparatus for controlling bit generation amount using quantization activity
JPH0879704A (en) Method and apparatus for coding fixed bit rate and tracking method for high speed search using them
JPH09191448A (en) Video signal coder and its method
JP3911035B2 (en) Moving picture coding method and moving picture coding apparatus
WO2000065842A1 (en) Image encoder and its method
JPH10191343A (en) Device and method for compressing video data
JP4114210B2 (en) Video data compression apparatus and method
JP3089941B2 (en) Inter prediction coding device
JP4032446B2 (en) Video data compression apparatus and method
JPH10191342A (en) Device and method for compressing video data
JP3689437B2 (en) Image signal encoding method and apparatus
JP3852209B2 (en) Video signal encoding device
JPH09294263A (en) Image information compressor
JP3307367B2 (en) Variable transfer rate coding device
KR0145044B1 (en) Code bit fixing method and apparatus thereof
JP3765129B2 (en) Encoding apparatus and encoding method
JP3934772B2 (en) Variable transfer rate encoding method and apparatus
JPH1066092A (en) Video data compressor and its method
JP3922581B2 (en) Variable transfer rate encoding method and apparatus