JP2000261799A - Variable rate moving image encoding device - Google Patents

Variable rate moving image encoding device

Info

Publication number
JP2000261799A
JP2000261799A JP6356599A JP6356599A JP2000261799A JP 2000261799 A JP2000261799 A JP 2000261799A JP 6356599 A JP6356599 A JP 6356599A JP 6356599 A JP6356599 A JP 6356599A JP 2000261799 A JP2000261799 A JP 2000261799A
Authority
JP
Japan
Prior art keywords
section
target
code amount
rate
coding
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.)
Withdrawn
Application number
JP6356599A
Other languages
Japanese (ja)
Inventor
Koji Yamada
幸二 山田
Kiyoshi Sakai
潔 酒井
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP6356599A priority Critical patent/JP2000261799A/en
Publication of JP2000261799A publication Critical patent/JP2000261799A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To encode a moving image in a variable rate at once by encoding an image in the latest GOP section to obtain the value of image complexity of the latest GOP section for the image in the just preceding GOP section and the value of an average coding rate many sections, thereby obtaining the target coding rate, and the target coding quantity of the next GOP section, and encoding in the next GOP section. SOLUTION: An MPEG encoder part the moving image is a basic part performing MPEG coding processing. A target coding quantity allocating part allocates target coding quantity to a GOP unit and an image frame unit and performs sequential coding processing while changing the quantization scale of the MPEG encoder part in performing encoding processing in an image frame. Then, it performs feedback control so that actual generation coding quantity can be constricted to the target coding quantity. A target coding quantity calculating part decides a target coding rate, target coding quantity, the target coding quantity in every I, P and B image frame and the value of a quantization scale in each macroblock in an image frame for the next GOP section.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、DVD(Digital
Versatile Disk)やデジタルビデオカメラ等のデジタル
蓄積媒体に、動画像をMPEG(Moving Picture Expert
s Group)方式によるデジタル画像圧縮方式で符号化して
蓄積する時に用いる、デジタル蓄積媒体用の可変符号化
速度(以下可変レート)動画像符号化装置に係り、とく
に、可変レートの値を、蓄積媒体の蓄積容量と所定の記
録時間から定まる目標平均符号化レートを中心に、あら
かじめ定めた最大変化幅の範囲内で、GOP(Group Of
Pictures) 区間毎に目標符号化レートとして定め、所定
のアルゴリズムに従って変化させるように制御すること
を特徴とする、動画像を可変レートで1回で符号化し、
蓄積媒体への蓄積を可能とする、可変レート動画像符号
化装置に関する。
The present invention relates to a DVD (Digital)
Moving images are stored on a digital storage medium such as a Versatile Disk (Digital Video Camera) or a digital video camera.
The present invention relates to a variable encoding rate (hereinafter referred to as a variable rate) moving image encoding apparatus for a digital storage medium, which is used when encoding and accumulating digital image data by a digital image compression method based on a grouping method. GOP (Group Of) within a predetermined maximum change range around a target average coding rate determined from the storage capacity of the
(Pictures) A moving image is encoded at a variable rate once by defining a target encoding rate for each section and performing control so as to change according to a predetermined algorithm.
The present invention relates to a variable-rate video encoding device capable of storing data in a storage medium.

【0002】尚、本発明は、とくに蓄積媒体への応用を
中心に、説明を行っているが、その応用分野は、蓄積媒
体への記録の応用に限らず、例えば、遠隔地からのテレ
ビの実況放送用等の分野で、伝送コスト等の制約から伝
送帯域が制約された場合に適用しても、固定レート符号
化方式、従来の2パス符号化方式による可変レート符号
化方式に比べて、リアルタイムで、高い品質の動画像を
安価な伝送コストで伝送することができ、その応用分野
は広い。
Although the present invention has been described with a particular emphasis on application to storage media, the field of application is not limited to application to recording on storage media. Even in the field of live broadcasting, etc., even when the transmission band is restricted due to the restriction of transmission cost and the like, compared to the fixed rate coding method and the variable rate coding method by the conventional two-pass coding method, A high-quality moving image can be transmitted in real time at low transmission cost, and its application field is wide.

【0003】[0003]

【従来の技術】動画像をテジタル符号化して、デジタル
蓄積媒体に蓄積する方法として、現在動き補償とDCT
(Discrete Cosine Transform)変換技術を基本とするM
PEG方式が用いられている。
2. Description of the Related Art As a method of digitally encoding a moving image and storing the moving image in a digital storage medium, current motion compensation and DCT are used.
(Discrete Cosine Transform) M based on conversion technology
The PEG method is used.

【0004】MPEG方式は、蓄積動画像固有の性質と
人間の視覚特性を利用して、動画像の冗長度を除去する
画像圧縮方式であり、符号化レートを無圧縮の原画像の
符号化レートに比し、数十分の1以下のオーダに圧縮す
る事が可能となる。
[0004] The MPEG system is an image compression system that removes the redundancy of a moving image by utilizing the properties inherent in a stored moving image and human visual characteristics. , It is possible to compress the data to the order of several tenths or less.

【0005】図12のMPEG方式の処理機能に、MP
EG方式で使用している主な処理機能と、処理の主目的
を要約した説明図をしめす。図12で、右側に示す処理
の主目的を果たす為に、各々、左側に示す固有の処理機
能が使われている。
The processing function of the MPEG system shown in FIG.
An explanatory diagram summarizing the main processing functions used in the EG method and the main purpose of the processing is shown. In FIG. 12, each of the unique processing functions shown on the left is used to fulfill the main purpose of the processing shown on the right.

【0006】すなわち、MPEG方式では、 .画像の2次元空間周波数スペクトル成分が低域に集
中し易い性質を有すること。
That is, in the MPEG system,. The two-dimensional spatial frequency spectrum component of the image must be easily concentrated in the low band.

【0007】.通常のゆっくりと変化する動画像が時
間軸方向に強い相関を有すること。
[0007] An ordinary slowly changing moving image has a strong correlation in the time axis direction.

【0008】.アプリケーション上の要請として蓄積
動画像に対してランダムアクセス要件が課せられている
こと。
[0008] Random access requirements must be imposed on stored moving images as a requirement on the application.

【0009】.人間の目の空間周波数に対する分解能
感度特性が2〜数Hz/度を中心に帯域通過型の特性を有
し、さらに、輝度成分に対する分解能感度特性が色差成
分に対して2〜3倍の分解能感度特性を有すること。
[0009] The resolution sensitivity characteristic with respect to the spatial frequency of the human eye has a band-pass characteristic centered on 2 to several Hz / degree, and the resolution sensitivity characteristic with respect to the luminance component is 2 to 3 times the resolution sensitivity with respect to the color difference component. Have characteristics.

【0010】.動きの激しい画像に対しては、人間の
視覚が応答速度の制約の為、振幅軸方向と空間周波数分
解性能ともに急激に識別感度が劣化すること。
[0010] For images with a lot of movement, the sensitivity of human vision limits the response speed, so that the discrimination sensitivity rapidly deteriorates in both the amplitude axis direction and the spatial frequency resolution performance.

【0011】などの固有の性質を利用して、以下の技術
を導入し、動画像の冗長度圧縮処理を行っている。
Utilizing the inherent properties such as described above, the following technology is introduced to perform redundancy compression processing of a moving image.

【0012】.隣接画像フレーム間での動き検出と動
き補償による予測画像の生成と、相関の強い画像フレー
ム間での時間軸差分処理による振幅方向の冗長度除去処
理。
[0012] Generation of a predicted image by motion detection and motion compensation between adjacent image frames, and processing for removing redundancy in the amplitude direction by time-axis difference processing between image frames with strong correlation.

【0013】.直交変換の性質を利用したDCT変換
による2次元空間周波数スペクトル成分の抽出と高域成
分に対する粗い量子化重み付けを行う量子化マトリック
スによる冗長度除去処理。
[0013] Extraction of two-dimensional spatial frequency spectrum components by DCT transform using the property of orthogonal transform and redundancy elimination processing by a quantization matrix that performs coarse quantization weighting on high-frequency components.

【0014】.に加えて振幅軸方向の量子化ステッ
プサイズ( 以下量子化スケール) を可変にすることによ
って、動きの激しい画像や複雑な画像に対する粗い量子
化スケール割当による冗長度除去処理。
[0014] In addition to the above, by making the quantization step size (hereinafter referred to as quantization scale) in the amplitude axis variable, redundancy removal processing is performed by assigning a coarse quantization scale to a rapidly moving image or a complex image.

【0015】.画素の色差成分に対するサブサンプリ
ング符号化による冗長度除去処理。
[0015] Redundancy removal processing by subsampling encoding for the color difference components of pixels.

【0016】.量子化処理後のスペクトル成分を低域
成分から高域成分に順番に並べた時に、高域側に0の連
続が多数発生する統計的偏りの性質を利用した可変長符
号化による冗長度除去処理。
[0016] Redundancy removal processing by variable-length coding using the property of statistical bias in which many consecutive 0s occur on the high frequency side when the quantized spectral components are arranged in order from low frequency components to high frequency components .

【0017】. 画像フレームを一定数の複数枚集めて
形成されたGOP区間を、I、P、Bの3種類の画像フ
レームに分け、フレーム内予測符号化、前方予測符号
化、前後両方向予測符号化の組み合わせによる冗長度除
去処理。
A GOP section formed by collecting a predetermined number of a plurality of image frames is divided into three types of image frames, I, P, and B. Intra-frame predictive coding, forward predictive coding, forward and backward bidirectional predictive codes Redundancy removal processing using a combination of optimization.

【0018】このように、MPEG方式は、動画像の冗
長度除去処理を階層的処理構造を持ちながら行ってお
り、図13の、MPEG方式の予測処理構造と符号シー
ケンスの図に、MPEG方式で最終的に得られる符号化
シーケンスと合わせてMPEG方式の全体像を示す。
As described above, in the MPEG system, the redundancy removal processing of a moving image is performed while having a hierarchical processing structure. The MPEG system prediction processing structure and code sequence shown in FIG. An overall picture of the MPEG system is shown together with the finally obtained encoded sequence.

【0019】図13でピクチャは、順次走査方式の画面
を示すフレームと飛び越し走査に対する画面を示すフィ
ールドの総称として使われるが、以下の説明では、画面
を指して画像フレームという用語で統一して説明する。
In FIG. 13, a picture is used as a general term for a frame indicating a screen of a progressive scanning system and a field indicating a screen for interlaced scanning. In the following description, the term "image frame" is used to refer to a screen. I do.

【0020】図13(a)のGOP内の画像フレーム間
の予測処理、に示す如く、MPEG方式では、ランダム
アクセスの要件を満たす為に、ランダムアクセスの最小
時間単位であるGOPの単位で必ず面内予測符号化を行
うIフレームが挿入され、このIフレームを利用して、
前方向予測を行うPフレーム、さらに、両方向予測を行
うBフレームの予測画像フレームを作ることができる。
As shown in FIG. 13 (a), a prediction process between image frames in a GOP, in the MPEG system, in order to satisfy the requirements of random access, an area must always be expressed in units of a GOP which is the minimum time unit of random access. An I frame for performing intra prediction encoding is inserted, and using this I frame,
It is possible to create a predicted image frame of a P frame for performing forward prediction and a B frame for performing bidirectional prediction.

【0021】また、対象とする動画像は、テレビのコマ
ーシャル等の変化の激しい画像も対象とする事が多いこ
とから、P、B画像フレームに対しても、発生符号量を
比較して、面間予測差分符号化と面内予測符号化の切替
選択が可能となっている。
In addition, since a moving image to be processed often includes a rapidly changing image such as a commercial on a television, the generated code amount is also compared for the P and B image frames, and Switching between inter prediction coding and intra prediction coding can be selected.

【0022】MPEG方式では、上記の説明と図2に示
す如く、動画像符号化のレートを定める冗長度除去を制
御するパラメータとして、 .画素の振幅方向の符号量割当の粗さをきめる量子化
スケール、.画素の2次元空間周波数スペクトル成分
に対する視覚特性を利用した重み付け量子化割当を行う
量子化マトリックス、.発生符号の統計的偏りを利用
した可変長符号化を行う際に使う符号化コードブック、
があるが、回路実現上の容易さと適用効果の点から、
の量子化スケールを可変にする方法が一般的に使われて
いる。
In the MPEG system, as shown in FIG. 2 and described above, parameters for controlling redundancy elimination that determine the rate of moving picture coding include: A quantization scale that determines the coarseness of the code amount allocation in the pixel amplitude direction,. A quantization matrix for performing weighted quantization allocation using visual characteristics for two-dimensional spatial frequency spectrum components of pixels; An encoding codebook used when performing variable length encoding using the statistical bias of generated codes,
However, from the viewpoint of the easiness in realizing the circuit and the application effect,
In general, a method of making the quantization scale variable is used.

【0023】尚、図13(b)のMPEG方式の符号シ
ーケンスに示すヘッダ構成からも明らかな如く、この量
子化スケールは、隣接した8×8の画素の集合である画
素の単位ブロックが4個集まって形成される16×16
画素の集合であるマクロブロック毎に可変にすることが
できる。
As is clear from the header configuration shown in the MPEG code sequence of FIG. 13B, this quantization scale is composed of four unit blocks of pixels which are a set of adjacent 8 × 8 pixels. 16 × 16 formed together
It can be made variable for each macroblock that is a set of pixels.

【0024】実際には、量子化スケールに対応する量子
化スケールコードをマクロブロック毎のヘッダ部分で指
定することによって、量子化スケールを指定しており、
図14の量子化スケールと量子化スケールコードの説明
図に、この関係をしめす。
In practice, the quantization scale is designated by designating the quantization scale code corresponding to the quantization scale in the header part of each macroblock.
This relationship is shown in the explanatory diagram of the quantization scale and the quantization scale code in FIG.

【0025】MPEG2では、コマーシャル等の動きが
激しい動画に対する冗長度除去の対応範囲を広げる為、
MPEG1の線形特性のタイプ0に加え、非線型特性の
タイプ1も選択が可能となっている。量子化スケールコ
ードQC と量子化スケールQとは1対1に対応してお
り、量子化スケールコードを指定して、符号化と復号化
が行われている。
In MPEG2, in order to extend the range of redundancy removal for a moving image such as a commercial which has a lot of movement,
In addition to the linear characteristic type 0 of MPEG1, the nonlinear characteristic type 1 can be selected. The quantization scale code QC and the quantization scale Q have a one-to-one correspondence, and coding and decoding are performed by specifying a quantization scale code.

【0026】すなわち、動きが激しく時間軸方向に沿っ
て画像の変化情報の発生が多い場合には、量子化スケー
ルQを大きくして、DCT係数の表示精度を荒くし、動
きが緩やかになり、視覚の追随性がよくなるにつれて、
量子化スケールを小さくして、DCT係数の表示精度を
あげる。これは、画像が複雑な絵になり、2次元空間周
波数成分が増えた場合にも同様で、視覚の高域成分の識
別感度が劣化する特性を利用して同様に、量子化スケー
ルを粗くして、振幅軸方向の発生符号量を抑えた量子化
による符号量割当操作が可能となる。
That is, when the movement is severe and the change information of the image is generated frequently along the time axis direction, the quantization scale Q is increased, the display accuracy of the DCT coefficient is reduced, and the movement becomes gentle. As your vision follows better,
The quantization scale is reduced to increase the display accuracy of DCT coefficients. This is also the case when the image becomes a complicated picture and the two-dimensional spatial frequency component increases. Similarly, the quantization scale is coarsened using the characteristic that the discrimination sensitivity of the high-frequency component of vision deteriorates. Thus, it is possible to perform a code amount assignment operation by quantization while suppressing the generated code amount in the amplitude axis direction.

【0027】これによって、動きの激しく画面フレーム
間の時間相関が少なく、発生符号量が多い動画像、複雑
な画面に対しても人間の視覚特性を利用した冗長度除去
が可能となる。
As a result, it is possible to remove redundancy using a human visual characteristic even for a moving image or a complex screen having a large amount of code and a small amount of time correlation between screen frames having a strong motion.

【0028】次に、動画像をMPEG方式を使ってテジ
タル符号化して、デジタル蓄積媒体に蓄積する方法とし
ては、現在、デジタルビデオ等に於ける固定レートの符
号化方式と、DVD等に対する可変レート符号化方式が
使い分けられている。
Next, a method of digitally encoding a moving image using the MPEG method and storing the moving image in a digital storage medium includes a coding method of a fixed rate in digital video and the like and a variable rate coding method for a DVD and the like at present. Different coding methods are used.

【0029】固定レート符号化は、動画像の時々刻々の
特性、例えば、動きの激しい画像や静止に近い動きの緩
やかな画像、複雑な画像や簡単な画像などには無関係
に、一定レートで、動画像の符号化を行う方式である。
The fixed-rate coding is performed at a constant rate regardless of the momentary characteristics of a moving image, for example, a rapidly moving image, a slowly moving image close to stillness, a complicated image, a simple image, and the like. This is a method for encoding moving images.

【0030】デジタル蓄積媒体の割当メモリ容量をMビ
ットとすると、所定の時間長T秒に対応する固定レート
R0 bps は、 R0 =M/T (1) から求まる。デジタルビデオカメラは、MPEG符号器
の可変長符号化部からの出力を、出力バッファメモリへ
書込み、このようにして定めた一定のレートで、出力バ
ッファメモリからデータを読出しながら、過去のデータ
を基に予測し、バッファメモリの量がオーバフローある
いはアンダーフローしないように、符号器の量子化スケ
ールQの値を、マクロブロック単位で変え、発生符号量
の制御を行っている。
Assuming that the allocated memory capacity of the digital storage medium is M bits, a fixed rate R0 bps corresponding to a predetermined time length T seconds is obtained from R0 = M / T (1). The digital video camera writes the output from the variable-length encoding unit of the MPEG encoder to the output buffer memory, and reads out the data from the output buffer memory at a constant rate determined in this way, based on the past data. In order to prevent the amount of buffer memory from overflowing or underflowing, the value of the quantization scale Q of the encoder is changed in macroblock units to control the amount of generated code.

【0031】このようにして、固定レート符号化方式で
は、動画像の符号化レートの制御を行い、所定時間長の
動画像を割り当てられたデジタルメモリ容量に1回の符
号化で同時に蓄積も行っている。
As described above, in the fixed-rate coding system, the coding rate of a moving image is controlled, and a moving image having a predetermined time length is simultaneously stored in the assigned digital memory capacity by one coding. ing.

【0032】固定レート符号化方式は、デジタル動画の
記録時間長と蓄積媒体の割当容量との対応付けが容易で
あり、取り扱いも容易である。
The fixed-rate encoding system can easily associate the recording time length of the digital moving image with the allocated capacity of the storage medium, and is easy to handle.

【0033】しかし、画像の性質を無視して一定の符号
化レートで符号化を行っている為、動きが激しかった
り、きめ細かな映像の登場など、単位時間あたりの符号
量の発生が多い場合でも、無理に一定速度で符号化を行
う為に、必要以上に冗長度の圧縮が行われる可能性があ
り、記録された動画像の画質は、同じ割当容量の蓄積媒
体を使って符号化した場合、可変レート符号化によるデ
ジタル動画像と比べると劣ってくる。
However, since encoding is performed at a constant encoding rate ignoring the nature of the image, even when the amount of code per unit time is large, such as when the movement is intense or a fine video appears, In order to forcibly perform encoding at a constant speed, there is a possibility that compression of redundancy may be performed more than necessary, and the quality of recorded moving images may be reduced when encoding using a storage medium with the same allocated capacity. However, it is inferior to digital moving pictures obtained by variable rate coding.

【0034】このため、画質劣化を抑えるために、可変
レート符号化に較べて数倍以上の符号化速度で符号化を
行っている。この結果、媒体容量も可変レート符号化方
式に比べて数倍以上の規模が要求され、コスト高の要因
となっている。
Therefore, in order to suppress the image quality deterioration, encoding is performed at an encoding speed several times or more as compared with the variable rate encoding. As a result, the medium capacity is required to be several times as large as that of the variable rate coding system, which is a factor of high cost.

【0035】そこで、高画質で長時間動画の記録が要求
されるDVD方式では、可変レート符号化方式が使われ
ている。
Therefore, in the DVD system which requires recording of a moving image with high image quality for a long time, a variable rate encoding system is used.

【0036】図15の従来の可変レート符号化方式によ
る符号器の構成図に、従来の可変レート符号器の構成
を、図16の可変レート符号化方式による2パス符号化
に、第1回目と第2回目の発生符号量の関係を示す図
を、図17の従来の可変レート符号化方式の処理フロー
に、処理の流れを示す。
FIG. 15 is a diagram showing the configuration of a conventional variable-rate coding system encoder, and FIG. 15 is a diagram showing the configuration of the conventional variable-rate coding system in the two-pass coding according to the variable-rate coding system shown in FIG. A diagram showing the relationship between the amount of generated codes in the second time is shown in the processing flow of the conventional variable rate coding method in FIG.

【0037】従来の可変レート符号化装置では、蓄積媒
体の容量に合わせて発生符号量を制御する為に、1回目
の符号化において、入力画像全てを適当な一定値の量子
化スケールによってMPEG符号化を行う。
In the conventional variable rate coding apparatus, in order to control the amount of generated codes in accordance with the capacity of the storage medium, in the first coding, all the input images are MPEG-coded by using an appropriate constant quantization scale. Perform the conversion.

【0038】図15の構成図で、1は直交変換の性質を
利用して2次元空間周波数スペクトル成分を求める処理
を行うDCT変換部、2は量子化スケール、量子化マト
リクスに従って振幅方向の粗さに応じた符号量割当を行
うことによって冗長度除去を行う量子化部、3は量子化
部の出力から元の信号を再生する逆量子化部、4は2次
元空間周波数スペクトル成分を表すDCT係数を基に画
像の再生を行う逆DCT変換部、5は画像フレーム単位
で予測処理に必要なピクチャ枚数分の予測再生画像情報
を蓄積しているフレームメモリ、6は前後の画像フレー
ム間で差分をとる前に、差分を極力小さくする為に、比
較対象の入力画像が比較基準画像に対して、どの方向に
どれだけ動いたかを知る為の動きベクトル検出をマクロ
ブロック単位で行う動き検出部、7は動き検出部からの
動きベクトルの指示に従って比較用の画像フレームをフ
レームメモリから読みだす操作を行う動き補償部、8は
画像フレーム間での差分処理の為の減算器、9は、予測
誤差となる差分値を予測画像に加算して入力画像を再生
する為の加算器、10は量子化部の出力を基に画素ブロ
ック単位での可変長符号化処理を行う可変長符号化部、
11は量子化スケールをマクロブロック単位で制御する
量子化制御部、12は、可変長符号化部からの符号化出
力を外部の蓄積媒体に一定速度で読出を行うための出力
バッファ、13はP、B画像フレームの符号化時に、画
像の動きの激しさの度合に応じて、差分処理が画像その
ものよりも振幅情報を拡大する場合にはIフレームと同
様に画像フレーム内符号化を行い、差分処理をおこなっ
た方が振幅情報が減る場合は画像フレーム間の差分符号
化を行う、その選択切替を行う切替スイッチ、14は、
第1回目の符号化では発生符号量測定部側に倒し発生符
号量の測定等を行い、第2回目の符号化時にバッファメ
モリ側に接続切替を行う切替スイッチ、15は、発生符
号量の測定を行う発生符号量測定部、16は、この発生
符号量測定結果を記憶する符号量用メモリ、17は、第
1回目の符号量測定結果に基づいて、第2回目の符号量
を計算し、量子化制御部に伝える目標符号量計算部を示
す。
In the configuration diagram of FIG. 15, reference numeral 1 denotes a DCT transform unit for performing processing for obtaining a two-dimensional spatial frequency spectrum component using the property of orthogonal transform, and 2 denotes roughness in the amplitude direction according to a quantization scale and a quantization matrix. , A quantizing unit for removing redundancy by allocating a code amount according to the following equation, 3 an inverse quantizing unit for reproducing an original signal from an output of the quantizing unit, and 4 a DCT coefficient representing a two-dimensional spatial frequency spectrum component. An inverse DCT converter for reproducing an image based on the image data, 5 is a frame memory storing the predicted reproduction image information for the number of pictures required for the prediction processing in image frame units, and 6 is a difference memory between the previous and next image frames. Before taking the difference, the motion vector detection is performed in macroblock units to know in which direction and how much the input image to be compared has moved with respect to the comparison reference image in order to minimize the difference. A motion compensating unit for performing an operation of reading an image frame for comparison from a frame memory in accordance with a motion vector instruction from the motion detecting unit; 8, a subtractor for performing difference processing between image frames; Is an adder for adding a difference value serving as a prediction error to a prediction image to reproduce an input image, and 10 is a variable length code for performing a variable length coding process in pixel block units based on an output of the quantization unit. Kabe,
Reference numeral 11 denotes a quantization control unit that controls the quantization scale in units of macroblocks. Reference numeral 12 denotes an output buffer for reading an encoded output from the variable length encoding unit to an external storage medium at a constant speed. , When encoding the B image frame, if the difference processing expands the amplitude information more than the image itself according to the degree of the intensity of the motion of the image, the intra-frame encoding is performed similarly to the I frame, When the amplitude information is reduced by performing the processing, a difference switch between image frames is performed.
In the first encoding, the switch is switched to the buffer memory side during the second encoding by measuring the generated code amount by tilting the generated code amount to the side of the generated code amount measurement unit. Reference numeral 15 denotes the measurement of the generated code amount. The generated code amount measurement unit 16 performs a code amount memory that stores the generated code amount measurement result, and the code amount memory 17 calculates a second code amount based on the first code amount measurement result. 5 shows a target code amount calculation unit to be transmitted to a quantization control unit.

【0039】また、量子化制御部の制御端子の入力CO
NTは、1回目の符号量測定期間中に一定の量子化スケ
ールで量子化制御部を動作させ、2回目の符号化時に、
符号量割当結果に基づいて量子化スケールを制御するよ
うに量子化制御部を動作させる為の切替指示を行う直流
制御信号である。
The input CO of the control terminal of the quantization controller is
NT operates the quantization control unit at a fixed quantization scale during the first code amount measurement period, and performs the following at the time of the second encoding.
This is a DC control signal for performing a switching instruction for operating the quantization control unit so as to control the quantization scale based on the code amount allocation result.

【0040】回路要素1から13によって構成されるブ
ロック100が、通常のMPEG符号器の基本構成部で
ある。但し、切替スイッチ14は出力バッファ側とな
る。
A block 100 constituted by the circuit elements 1 to 13 is a basic component of an ordinary MPEG encoder. However, the changeover switch 14 is on the output buffer side.

【0041】上記の回路構成で、図17の従来の可変レ
ート符号化方式の処理フローに示す如く、先ず、第1回
目の符号化処理は、量子化スケールを一定の値に保った
ままで行われる。MPEG符号器部100の動作は、通
常のMPEG符号器と全く同じく、GOPを符号化のグ
ループ単位として、I、P、B画像フレーム間での動き
検出、動き補償、差分予測処理、DCT符号変換、量子
化、可変長符号化、ヘッダ付加処理などの一連の処理が
行われる。
With the above circuit configuration, as shown in the processing flow of the conventional variable rate coding system in FIG. 17, first, the first coding process is performed while the quantization scale is kept at a constant value. . The operation of the MPEG encoder unit 100 is exactly the same as that of a normal MPEG encoder, using GOP as a group unit for encoding, detecting motion between I, P, and B image frames, motion compensation, difference prediction processing, and DCT code conversion. , Quantization, variable-length coding, header addition processing, and the like.

【0042】第一回目の符号化による発生符号は、可変
長符号化部10からバイト単位で出力され、発生した各
画像フレーム毎の発生符号量を、発生符号量測定部15
で測定し、フレーム毎の符号量と累積符号発生量を記録
する符号量用メモリ16に一旦記録する。
The generated code by the first encoding is output from the variable length coding unit 10 in byte units, and the generated code amount for each generated image frame is measured by the generated code amount measuring unit 15.
And once recorded in the code amount memory 16 for recording the code amount for each frame and the accumulated code generation amount.

【0043】尚、この間、量子化部の量子化スケール
は、所定の一定値をとるように量子化制御部11の制御
端子には、外部制御入力CONTが印加される。
During this time, the external control input CONT is applied to the control terminal of the quantization control unit 11 so that the quantization scale of the quantization unit takes a predetermined constant value.

【0044】全入力画像信号を1回目の符号化終了後
に、図16の従来の可変レート符号化方式における2パ
ス符号化の図に示す如く、蓄積媒体の割当容量Mと蓄積
された実測総符号量McTとの比率を知り、各画像フレー
ムあたりの発生符号量mciから、2回目に符号化する際
に各画像フレームに割り当てるべき目標符号量mci' を
次の式で求める。
After the first encoding of all the input image signals is completed, as shown in the two-pass encoding in the conventional variable rate encoding method of FIG. 16, the allocated capacity M of the storage medium and the measured total code stored are stored. Knowing the ratio to the amount McT, the target code amount mci 'to be assigned to each image frame at the time of the second encoding is calculated from the generated code amount mci for each image frame by the following equation.

【0045】 mci'=mci×M/Σmci=mci×M/McT (2) M/McTは、通常、1より小さい値になるように、最初
の固定量子化スケールの値は小さな値に選ばれている。
Mci ′ = mci × M / Σmci = mci × M / McT (2) The value of the first fixed quantization scale is selected to be a small value so that M / McT is usually smaller than 1. ing.

【0046】第2回目の符号化では、スイッチ14を出
力バッファ12側に倒し、量子化制御部11が自動制御
モードとなるように、制御端子へのCONTの制御入力
を切替え、画像フレーム単位の新たな割当符号量からマ
クロブロック単位の割当符号量を知り、量子化制御部1
1の制御により、マクロブロック単位毎に、量子化スケ
ールを変化させ、発生符号量が割当符号量となるように
符号化を行う。
In the second encoding, the switch 14 is set to the output buffer 12 side, and the control input of CONT to the control terminal is switched so that the quantization control unit 11 is set to the automatic control mode. From the new allocated code amount, the allocated code amount per macroblock is known, and the quantization control unit 1
Under the control of 1, the quantization scale is changed for each macroblock, and coding is performed so that the generated code amount becomes the allocated code amount.

【0047】量子化制御部11は、2回目の実際の発生
符号量と目標符号量との誤差分を補正しながら逐次符号
処理を行う。
The quantization control unit 11 performs the sequential code processing while correcting the error between the actually generated code amount of the second time and the target code amount.

【0048】出力バッファ12は、蓄積媒体との待ち合
わせ制御や、平均符号化レートに等しい一定速度で読み
出しを行う為の読出速度調整用のバッファメモリであ
る。
The output buffer 12 is a buffer memory for controlling the queuing with the storage medium and adjusting the reading speed for performing reading at a constant speed equal to the average coding rate.

【0049】可変レート符号化による発生符号量の変動
が大き過ぎるなどしてバッファメモリにオーバーフロー
又はアンダーフローが発生しそうな場合に、その傾向を
見て、量子化制御部11に指示して、量子化スケールを
制御して、バッファメモリのオーバーフロー、アンダー
フローを防止する。
When an overflow or an underflow is likely to occur in the buffer memory due to an excessively large change in the amount of generated code due to the variable rate coding, the tendency is checked, and the quantization control unit 11 is instructed. Control over the buffer scale to prevent overflow and underflow of the buffer memory.

【0050】[0050]

【発明が解決しようとする課題】上記に説明した如く、
入力画像信号を蓄積媒体の割当容量に合わせて可変レー
ト符号化を行うためには、2回符号化を行う必要があっ
た。このため、テレビの実況中継などのリアルタイムの
用途には対応できず、手間も掛かっていた。
SUMMARY OF THE INVENTION As explained above,
In order to perform variable rate encoding of an input image signal in accordance with the allocated capacity of a storage medium, it was necessary to perform encoding twice. For this reason, it was not possible to cope with real-time applications such as live broadcast of television, and it was troublesome.

【0051】また、デジタルビデオカメラなどの如く、
その場で即時に記録が要求される用途に対して、可変レ
ートで1回で符号化を提供する手段が存在せずに、やむ
を得ず、可変レート符号化の数倍の速度による固定レー
ト符号化が使われていた。
Also, like a digital video camera,
For applications where immediate recording is required on the spot, there is no means for providing encoding at one time at a variable rate, and there is no choice but to use fixed rate encoding at a speed several times faster than variable rate encoding. Was used.

【0052】このため、長時間録画が難しく、媒体コス
トも大きかった。
For this reason, recording for a long time was difficult, and the medium cost was high.

【0053】そこで、本発明の目的は、動画像を可変レ
ートで1回で符号化し、蓄積媒体への蓄積を可能とする
デジタル蓄積媒体用可変レート動画像符号化装置を提供
することである。
It is therefore an object of the present invention to provide a variable-rate moving picture encoding apparatus for digital storage media, which encodes a moving picture at a variable rate at one time and allows the picture to be stored in a storage medium.

【0054】[0054]

【課題を解決するための手段】MPEG方式では、量子
化スケールの制御によって、符号発生量の制御が行える
が、量子化スケールをどのようなアルゴリズムに従って
制御してやれば、所定の蓄積割当容量に所定の時間の動
画像を、可変レート符号化方式によって1回でリアルタ
イムに適切に符号化できるかが問題となる。
In the MPEG system, the amount of code generation can be controlled by controlling the quantization scale. However, if the quantization scale is controlled according to any algorithm, a predetermined storage allocation capacity can be controlled to a predetermined storage allocation capacity. It is important to be able to appropriately encode a moving image at a time in real time by a variable rate encoding method at one time.

【0055】本発明では、最新のGOP区間に対する符
号化を行い、量子化スケールの変化値から直前のGOP
区間の画像に対する最新のGOP区間の画像複雑度の値
や多区間平均符号化レートの値を知り、これによって、
目標平均符号化レートを中心とした、次のGOP区間の
目標符号化レートと目標符号量を求め、さらに次のGO
P区間の符号化を行う。このようにGOP区間毎に目標
符号化レートを定め、定速度符号化を繰り返す事によっ
て、可変レート符号化を実現している。以下に詳細な説
明を行う。
According to the present invention, encoding is performed for the latest GOP section, and the GOP section immediately preceding the GOP
Know the value of the image complexity of the latest GOP section and the value of the multi-section average coding rate for the image of the section,
A target coding rate and a target code amount of the next GOP section around the target average coding rate are obtained, and the next GO
Encode the P section. As described above, variable rate coding is realized by determining the target coding rate for each GOP section and repeating the constant rate coding. The details will be described below.

【0056】図1の本発明の原理説明図に、本発明の基
本的なアルゴリズムを、図2の本発明の基本処理フロー
に、本発明の基本処理の手順を、図3の画像複雑度のグ
ラフに、本発明の実施例で使っている画像複雑度の平均
量子化スケール、発生符号量との関連を示す例示図を、
図4の本発明による可変レート符号化の時間推移説明図
に、本発明を適用した時の、符号化レートの時間的推移
例を示す。
The basic algorithm of the present invention is shown in the principle explanatory diagram of the present invention in FIG. 1, the basic processing procedure of the present invention is shown in the basic processing flow of the present invention in FIG. 2, and the image complexity is shown in FIG. In the graph, the average quantization scale of the image complexity used in the embodiment of the present invention, an exemplary diagram showing the relationship between the amount of generated code,
FIG. 4 is an explanatory diagram of the time transition of variable rate coding according to the present invention, showing an example of the temporal transition of the coding rate when the present invention is applied.

【0057】図1の本発明の原理説明図において、MP
EG符号器部はMPEG符号化処理を行う基本部分で、
発生符号量測定部、符号化データメモリ部、平均値計算
部、目標符号量計算部からなる目標符号量割当部は、G
OP単位、画像フレーム単位に、目標符号量を割当て、
画像フレーム内の符号化処理に際しては、MPEG符号
器部の量子化制御部をマクロブロック単位で制御し、量
子化スケールを変えながら逐次符号化処理を行い、実際
の発生符号量が目標符号量に収斂するようにフィードバ
ック制御を行う。
In the principle explanatory diagram of the present invention shown in FIG.
The EG encoder section is a basic part for performing MPEG encoding processing.
The target code amount allocating unit including the generated code amount measuring unit, the encoded data memory unit, the average value calculating unit, and the target code amount calculating unit is represented by G
A target code amount is assigned to each OP and each image frame,
At the time of the encoding process in the image frame, the quantization control unit of the MPEG encoder unit is controlled on a macroblock basis, the encoding process is sequentially performed while changing the quantization scale, and the actual generated code amount becomes the target code amount. Feedback control is performed so as to converge.

【0058】発生符号量測定部は、GOP単位、I、
P、Bフレーム毎、マクロブロック毎の発生符号量の測
定を行う。
The generated code amount measuring unit calculates the GOP unit, I,
The amount of generated code is measured for each P and B frame and each macro block.

【0059】又、符号化データメモリ部は、これらのデ
ータと目標符号量計算部からの量子化スケール値を所要
期間分蓄積する。
The coded data memory unit stores these data and the quantization scale value from the target code amount calculation unit for a required period.

【0060】平均値計算部は、これらの統計データから
直前のGOPの区間画像複雑度、I、P、Bフレーム毎
の画像複雑度、多区間画像複雑度、多区間平均符号化レ
ートを計算する。
The average calculator calculates the section image complexity of the immediately preceding GOP, the image complexity of each I, P, and B frame, the multi-section image complexity, and the multi-section average coding rate from these statistical data. .

【0061】目標符号量計算部は、(3)式を基に、次
のGOP区間に対して、目標符号化レート、目標符号
量、I、P、B画像フレーム毎の目標符号量と画像フレ
ーム内のマクロブロック毎の量子化スケールの値を目標
符号量と発生符号量を比較しながら決定する。
The target code amount calculation unit calculates a target coding rate, a target code amount, a target code amount for each of I, P, and B image frames and an image frame for the next GOP section based on the equation (3). Are determined by comparing the target code amount and the generated code amount.

【0062】図2の本発明の基本処理フローに示す如
く、本発明では、現在迄のGOP区間毎の画像から得ら
れる統計データを使って、次のGOP区間の目標符号化
レート、GOP単位、画像単位の目標符号量を定める。
As shown in the basic processing flow of the present invention in FIG. 2, in the present invention, the target coding rate of the next GOP section, the GOP unit, A target code amount for each image is determined.

【0063】この目標データに従って、次の区間の符号
化を行い、新たな統計データを得、さらに、次のGOP
区間に対する目標符号化レート等の目標値を定める。以
上を繰り返して、全媒体容量分の符号化を行う。
According to the target data, the next section is coded, new statistical data is obtained, and the next GOP
A target value such as a target coding rate for the section is determined. By repeating the above, encoding for the entire medium capacity is performed.

【0064】統計データとしては、マクロブロック毎、
画像フレーム毎、GOP単位の発生符号量、量子化スケ
ール、実際の符号化レートの平均化区間数分の過去から
現在迄の値が使われる。
As the statistical data, for each macro block,
The values from the past to the present for the number of averaging sections of the generated code amount, quantization scale, and actual coding rate for each GOP unit for each image frame are used.

【0065】また、GOP区間毎の目標符号化レートR
を定める計算式として、(3)式を使う。
Further, the target coding rate R for each GOP section
Equation (3) is used as a calculation equation for determining.

【0066】R=R0+Cr×Cc×R0' (3) (3)式で、R0は、(1)で求まる蓄積媒体の容量をビ
ット数で表現した値を秒数で表した記録時間で除して得
られる目標平均符号化レートである。
R = R0 + Cr.times.Cc.times.R0 '(3) In the equation (3), R0 is a value obtained by dividing the value of the capacity of the storage medium obtained in (1) by the number of bits by the recording time expressed in seconds. This is the target average coding rate obtained by

【0067】目標平均符号化レートR0は、蓄積媒体に対
してはこのようにして定まるが、テレビの実況放送等の
場合は、可変レート符号化の結果を、バッファメモリか
ら、一定速度で読みだす場合の伝送速度の近似値として
も使える。
The target average coding rate R0 is determined in this way for the storage medium, but in the case of a live broadcast of television or the like, the result of the variable rate coding is read from the buffer memory at a constant speed. It can also be used as an approximation of the transmission speed in that case.

【0068】また、(3)式において、第2番目の項
は、GOP区間毎の目標符号化レートR を、目標平均符
号化レートR0からどれだけ可変にできるかを示す可変レ
ート補正項である。
In the equation (3), the second term is a variable rate correction term indicating how much the target coding rate R for each GOP section can be changed from the target average coding rate R0. .

【0069】該可変レート補正項は、平均符号化レート
補正係数Cr、画像複雑度変化指数Cc、修正目標平均符号
化レートR0' の積の形で与えられる。
The variable rate correction term is given in the form of a product of an average coding rate correction coefficient Cr, an image complexity change index Cc, and a corrected target average coding rate R0 '.

【0070】平均符号化レート補正係数Crは、目標平均
符号化レート、最新の符号化区間迄の一定の区間数に対
する過去の符号化レートの実績値を平均化した多区間平
均符号化レート、多区間平均符号化レートの目標平均符
号化レートからの許容変動幅の3つの変数から定め、多
区間平均符号化レートが目標符号化レートの値と等しい
時には1の値を有し、多区間平均符号化レートが、目標
平均符号化レートから大きくずれると値が0に漸近し、
該可変レート補正項を0に漸近させる働きを持つように
定義する。
The average coding rate correction coefficient Cr is a multi-section average coding rate obtained by averaging the actual values of past coding rates with respect to a target average coding rate and a fixed number of sections up to the latest coding section. It is determined from three variables of the allowable variation width of the section average coding rate from the target average coding rate, and has a value of 1 when the multi-section average coding rate is equal to the value of the target coding rate. When the coding rate greatly deviates from the target average coding rate, the value gradually approaches 0,
The variable rate correction term is defined to have a function of asymptotically approaching zero.

【0071】また、画像複雑度変化指数Ccは、最新の符
号化区間に対する画像の複雑度を定義する区間画像複雑
度、最新の符号化区間迄の一定の区間数に対する該区間
画像複雑度の実績値を平均化した多区間平均画像複雑度
から定め、区間画像複雑度の多区間平均複雑度に対する
変化割合の値をとり、区間画像複雑度が多区間平均複雑
度に対して同じ偏差値の状態が続くと、値が0に漸近し
該可変レート補正項を0に漸近させるように定義する。
The image complexity change index Cc is a section image complexity that defines the complexity of an image with respect to the latest coding section, and a result of the section image complexity for a fixed number of sections up to the latest coding section. Determined from the averaged multi-segment average image complexity, take the value of the rate of change of the inter-segment image complexity with respect to the multi-segment average complexity. Is defined, the value asymptotically approaches 0 and the variable rate correction term asymptotically approaches 0.

【0072】修正目標平均符号化レートR0' は、目標平
均符号化レートR0の近傍の値を有し、目標符号化レート
ROと1対1の対応関係を有し、目標符号化レートR0の変
化に対して正の微係数を有する補正係数に、目標平均符
号化レートを乗算した値を有し、とくに、画像品質に対
する主観評価がシビアに要求される低ビットレートの目
標平均符号レート時に、目標符号化レートが低くなり過
ぎないように可変レート補正項の下限値の絶対値を小さ
めの値に調整する役目を持つ。
The modified target average coding rate R0 'has a value near the target average coding rate R0,
It has a one-to-one correspondence with RO, and has a value obtained by multiplying a correction coefficient having a positive differential coefficient with respect to a change in the target coding rate R0 by a target average coding rate. When the subjective evaluation is severely required at the target average code rate of a low bit rate, it has a role of adjusting the absolute value of the lower limit of the variable rate correction term to a smaller value so that the target coding rate does not become too low.

【0073】(3)式における可変レート補正項の、平
均符号化レート補正係数Cr、画像複雑度変化指数Cc、修
正目標平均符号化レートR0' を上記の如く、定義するこ
とによって、符号化レートの平均値を予め定めた目標平
均符号化レートに保ちながら、かつ、画像の急激な変化
に対しても、常に、高い品質の符号化を実現することが
可能となる。
By defining the average coding rate correction coefficient Cr, the image complexity change index Cc, and the corrected target average coding rate R0 'of the variable rate correction term in the equation (3) as described above, the coding rate is calculated. Is maintained at a predetermined target average coding rate, and high-quality coding can be realized at all times even in the event of a sudden change in the image.

【0074】尚、平均符号化レート補正係数Cr、画像複
雑度変化指数Ccの具体的な関数形の事例については、実
施例でのべる。
Examples of specific functional forms of the average coding rate correction coefficient Cr and the image complexity change index Cc will be described in the embodiments.

【0075】ここで、画像の複雑度をきめる画像複雑度
は、図3の画像複雑度のグラフに示す如く、画像の種類
が定まると、画像あたりのマクロブロック毎の量子化ス
ケールの平均値として求まる平均量子化スケール値と画
像フレーム毎の発生符号量の積として(4)式の如く定
まる。
Here, as shown in the image complexity graph of FIG. 3, the image complexity which determines the complexity of the image is determined as the average value of the quantization scale for each macro block per image when the type of image is determined. The product of the obtained average quantization scale value and the generated code amount for each image frame is determined as in equation (4).

【0076】 画像複雑度≒平均量子化スケール×符号発生符号量 (4) (4)式の定義による画像複雑度の意味は、画像が決ま
ると平均量子化スケールを大きくして振幅軸方向の符号
量割当を減らすと、画像フレームあたりの発生符号量も
減り、逆に、平均量子化スケールを小さくして、振幅軸
方向の符号量割当を増やすと、発生符号量が増えること
を定式化したものであり、このようにして、定義した画
像複雑度が画像そのものによってほぼ一義的に定まるこ
とを意味している。
Image complexity ≒ Average quantization scale × Code generation code amount (4) The meaning of the image complexity defined by the expression (4) is that when the image is determined, the average quantization scale is increased and the code in the amplitude axis direction is increased. A formula that decreases the amount of generated code per image frame, and conversely, decreases the average quantization scale and increases the amount of generated code when the amount of code in the amplitude axis direction is increased. In this way, it means that the defined image complexity is almost uniquely determined by the image itself.

【0077】従って、画像が(4)式の性質を持つこと
を利用して、予測によって画像フレームあたりに割り当
てた目標符号量と、実際の画像フレームのマクロブロッ
ク毎の発生符号量との差分値から、逐次、量子化スケー
ル値を制御して、画像フレームあたりの発生符号量が目
標符号量に収斂するように符号化処理を行うことが出来
る。
Therefore, utilizing the fact that an image has the property of equation (4), the difference value between the target code amount assigned per image frame by prediction and the generated code amount for each macroblock of the actual image frame is calculated. Thus, the encoding process can be performed so that the quantization scale value is sequentially controlled so that the generated code amount per image frame converges to the target code amount.

【0078】但し、(4)式は、数学的な厳密性を持つ
式ではない為、現実の画像に適用して、実際の符号化の
結果をみながらフィードバック制御を行うことになる。
However, since the expression (4) is not an expression having mathematical rigor, it is applied to an actual image and feedback control is performed while observing the result of the actual encoding.

【0079】このようにして、次のGOP区間に対する
実際の画像の符号化を行った結果、量子化スケールの実
測値が得られ、これによって、画像の複雑度の変化の方
向が分かり、(3)式を利用して、さらに次のGOP区
間に対する画像の目標符号化レートを予測することが可
能となる。
As described above, as a result of encoding the actual image for the next GOP section, an actual measurement value of the quantization scale is obtained, whereby the direction of the change in the complexity of the image can be obtained. ), It is possible to predict the target coding rate of the image for the next GOP section.

【0080】区間画像複雑度は、画像フレームあたりに
定義される画像複雑度を、対象とするGOP区間の画像
フレーム全てについて総計したものであり、対象区間に
対する画像複雑度の平均値に比例した値をとる。
The section image complexity is the sum of the image complexity defined for each image frame for all the image frames in the target GOP section, and is a value proportional to the average value of the image complexity for the target section. Take.

【0081】尚、画像複雑度の表現形式としては、ブロ
ック毎の画素値の分散値を基にした定義式もあり、やは
り、画像の複雑さを表現するパラメータとして使われる
が、符号化量と量子化スケールとの関係の1 対1対応付
けが容易な(4)式の定義式の性質を本発明における
(3)式では利用している。
As an expression format of the image complexity, there is also a definition formula based on the variance of the pixel value for each block, which is also used as a parameter expressing the complexity of the image. The property of the definition equation of equation (4), which facilitates one-to-one correspondence with the quantization scale, is used in equation (3) of the present invention.

【0082】(3)式に従って、符号化対象とするGO
Pの区間の目標符号化レートが定まれば、目標符号化レ
ートにGOP区間の時間長を掛けて、GOP区間に対す
る目標符号量が定まり、この目標符号量を、I、P、B
各画像フレーム毎の画像複雑度、発生符号量、マクロブ
ロック毎の発生符号量の実測値から、実施例に示す割当
式を使って、次のGOP区間におけるI、P、B各画像
フレームに対して、目標符号量を割り当てる。
According to equation (3), GO to be encoded
When the target coding rate in the section P is determined, the target coding rate is multiplied by the time length of the GOP section to determine the target code amount for the GOP section.
From the measured values of the image complexity, generated code amount, and generated code amount for each macroblock for each image frame, using the assignment formula shown in the embodiment, for each of the I, P, and B image frames in the next GOP section, And assign a target code amount.

【0083】この目標値を基に、各画像フレーム毎、マ
クロブロック単位で符号化を行う。
On the basis of this target value, encoding is performed for each image frame and for each macroblock.

【0084】実際の画像は、時々刻々変化する為に、直
前のGOP区間迄の符号化結果を基に予測を行って、次
のGOP区間の目標符号量を割り当てた場合でも、動き
の激しい画像に突然切り替わると、目標符号量と実際の
発生符号量との間に大きな差異が発生する。
Since the actual image changes every moment, prediction is performed based on the coding result up to the immediately preceding GOP section, and even if the target code amount of the next GOP section is allocated, the image having a sharp motion Suddenly, a large difference occurs between the target code amount and the actual generated code amount.

【0085】この差異を補正して、発生符号量を目標符
号量に抑えながら、画像複雑度を切り替わった新たな画
像の画像複雑度と等しくする為に、画像フレーム毎に、
マクロブロック単位で、量子化スケールの値を逐次制御
し、最終的には、画像フレームあたりの発生符号量が割
り当てられた目標符号量となるように逐次符号化処理を
行う。
In order to correct this difference and suppress the generated code amount to the target code amount and make the image complexity equal to the image complexity of the new image whose image complexity has been switched, for each image frame,
The value of the quantization scale is sequentially controlled in macroblock units, and finally, the sequential encoding process is performed so that the generated code amount per image frame becomes the allocated target code amount.

【0086】このようにして、GOPの全画像フレーム
について符号化を行う。
In this manner, encoding is performed on all image frames of the GOP.

【0087】以下、上記のサイクルをGOP区間毎に繰
り返す事によって、目標平均符号化レートを中心とし
て、可変符号化レートで、1回で、符号化を達成するこ
とが出来る。
By repeating the above-described cycle for each GOP section, it is possible to achieve encoding once with a variable encoding rate centering on the target average encoding rate.

【0088】図4の本発明による符号化レートの時間推
移説明図に、本発明を適用して、各GOP区間毎に、目
標平均符号化レートR0を中心に、可変レート符号化を行
う様子を示す。
FIG. 4 is a diagram illustrating the time transition of the coding rate according to the present invention, showing how the present invention is applied to perform variable rate coding centering on the target average coding rate R0 for each GOP section. Show.

【0089】次に、実施例について、さらに詳細に具体
的な説明を行う。
Next, the embodiments will be described more specifically.

【0090】[0090]

【発明の実施の形態】前項で説明した(3)式におけ
る、平均レート補正係数Cr、画像複雑度変化指数Ccの具
体的な定義式の一例として、(5)、(6)式を示す。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Equations (5) and (6) are shown as examples of specific definition equations of the average rate correction coefficient Cr and the image complexity change index Cc in the equation (3) described in the previous section.

【0091】 ここで、RLは、多区間平均符号化レートの許容変動幅、
GCM (Global Complexity Measure) は、(7)式で定義
され、直前のGOP区間にわたり符号化した結果得られ
る区間画像複雑度であり、マクロブロックに対する量子
化スケールQの画像フレーム毎の平均値qjと画像フレー
ム毎の符号発生量Pjの積のGOP区間の画像フレームに
対する総計値を用いるものとする。
[0091] Here, RL is an allowable variation width of the multi-section average coding rate,
GCM (Global Complexity Measure) is defined by Expression (7), is a section image complexity obtained as a result of encoding over the immediately preceding GOP section, and includes an average value qj of a quantization scale Q for a macroblock for each image frame, and The total value of the product of the code generation amount Pj for each image frame is used for the image frame in the GOP section.

【0092】 GCM =〔Σ(qj×Pj )〕(j=1〜n) (7) n = GOP時間内での画像フレーム数の総計多区間平均
画像複雑度GCMav 、多区間平均符号化レートRav は、そ
れぞれ区間画像複雑度GCM 、区間毎の目標符号化レート
R の近似値となる実測符号化レートR'を直前のGOP迄
の所定のGOP区間数mにわたって平均した値で、
(8)、(9)式から求まる。
GCM = [Σ (qj × Pj)] (j = 1 to n) (7) n = total multi-section average image complexity GCMav of the number of image frames within the GOP time, multi-section average coding rate Rav Are the section image complexity GCM and the target coding rate for each section, respectively.
A value obtained by averaging the actually measured coding rate R ', which is an approximate value of R, over a predetermined number of GOP sections m up to the immediately preceding GOP,
It is obtained from equations (8) and (9).

【0093】 GCMav =avg(GCM ) (8) Rav=avg(R') (9) 但し、平均化対象とする直前迄のGOPの区間数mとし
て数百が使われる。
GCMav = avg (GCM) (8) Rav = avg (R ′) (9) However, several hundreds are used as the number m of the sections of the GOP immediately before the averaging target.

【0094】次のGOPに対する目標符号化レートR が
定まると、GOPの時間長TgからGOPの期間長に割当
られるべき目標符号量CDが(10)式で求まる。
When the target coding rate R for the next GOP is determined, the target code amount CD to be allocated to the GOP period length is obtained from the time length Tg of the GOP by equation (10).

【0095】CD=R ×Tg (10) ここで、時間長Tgは、画像を再生する時の画像フレーム
レートf と、GOPの画像フレーム枚数nから(11)
式で求まる。
CD = R × Tg (10) Here, the time length Tg is obtained from the image frame rate f at the time of reproducing the image and the number n of the image frames of the GOP from (11)
It is obtained by the formula.

【0096】Tg=n/f (11) 平均符号化レート補正係数Crは、目標平均符号化レート
R0、多区間平均符号化レートRav 、多区間平均符号化レ
ートの目標平均符号化レートからの許容変動幅RLの3つ
の変数から定まり、多区間平均符号化レートRav が、平
均目標符号化レートの場合1となり、目標平均符号化レ
ートR0から大きくずれ許容変動幅RLに近づくと値が0に
漸近し、該可変レート補正項を0に漸近させる働きを持
つことが分かる。
Tg = n / f (11) The average coding rate correction coefficient Cr is equal to the target average coding rate.
R0, the multi-section average coding rate Rav, and the allowable variation width RL from the target average coding rate of the multi-section average coding rate are determined from three variables, and the multi-section average coding rate Rav is the average target coding rate. In this case, the value becomes 1 and the value gradually approaches 0 when the deviation from the target average coding rate R0 approaches the allowable variation range RL, indicating that the variable rate correction term has a function of approaching 0.

【0097】また、画像複雑度変化指数Ccは、区間画像
複雑度GCM の多区間平均画像複雑度GCMav に対する変化
割合値を有し、区間画像複雑度の突然の変化に対して、
変化の割合に応じた即応値をとり、区間画像複雑度が多
区間平均画像複雑度に対して同じ偏差値の状態が続くと
値が0に漸近し該可変レート補正項を0に漸近させる働
きを持つ。
The image complexity change index Cc has a change ratio value of the section image complexity GCM with respect to the multi-section average image complexity GCMav.
Takes a responsive value according to the rate of change, and when the state of the section image complexity continues to be the same deviation value from the multi-section average image complexity, the value gradually approaches 0, and the variable rate correction term gradually approaches 0. have.

【0098】この結果、動画像が突然複雑な画像に変化
した場合には、即座に符号化レートを上げ、逆に、単純
な画像に変化した場合には、符号化レートを下げ、ま
た、符号化レートが目標平均符号化レートからずれた状
態が一定期間以上続く場合には、自動的に、目標平均符
号化レートに戻してやることが可能となる。
As a result, if the moving image suddenly changes to a complex image, the coding rate is immediately increased. Conversely, if the moving image is changed to a simple image, the coding rate is reduced. When the state in which the coding rate deviates from the target average coding rate continues for a certain period or more, it is possible to automatically return to the target average coding rate.

【0099】これによって、符号化レートの平均値を予
め定めた目標平均符号化レートに保ちながら、かつ、画
像の急激な変化に対しても、常に、高い品質の動画像符
号化を実現することが可能となる。
Thus, while maintaining the average value of the coding rate at a predetermined target average coding rate, it is possible to always realize high-quality moving picture coding even with a sudden change in the picture. Becomes possible.

【0100】次に符号化対象のGOPの中で、I、P、
Bの各画像フレームに対する符号量CDI 、CDP 、CDB
は、(12)式に従って求める。*1 *1:総合マルチメディア選書「MPEG」テレビジョン
学会編 ここで、Np、Nbは、GOP区間の未符号化のPピクチ
ャ、Bピクチャ枚数、Xi、Xp、XbはI、P、Bピクチャ
の画像複雑度を、Kp、Kbは、Iピクチャの平均量子化ス
ケールに対するP、Bピクチャの平均量子化スケールの
比率である。
Next, among GOPs to be encoded, I, P,
Code amount CDI, CDP, CDB for each image frame of B
Is calculated according to the equation (12). * 1 * 1: Comprehensive Multimedia Selection “MPEG” edited by the Institute of Television Engineers, where Np and Nb are uncoded P pictures and B pictures in the GOP section, and Xi, Xp and Xb are images of I, P and B pictures. As for the complexity, Kp and Kb are the ratios of the average quantization scale of the P and B pictures to the average quantization scale of the I picture.

【0101】また、CD' は、Iピクチャに対して、符号
量を割り振って符号化実施後の残りの符号量をP,Bピ
クチャに割り振って、各画像フレーム毎に符号化を行う
都度に、符号化済の符号量を差し引いた残りの符号量を
さす。
Each time CD ′ is assigned a code amount to an I picture and the remaining code amount after encoding is assigned to P and B pictures, encoding is performed for each image frame. The remaining code amount after subtracting the encoded code amount.

【0102】(12)式は、(10)式から求まる次の
GOP区間に対する目標符号量CDを直前のGOP区間に
おける画像フレーム毎の発生符号量に比例して、各画像
フレームに割り当てを実際の符号化発生量の誤差分を逐
次残りの画面の符号化で補正しながら符号化を行うこと
を意味する。
Equation (12) indicates that the target code amount CD for the next GOP section obtained from equation (10) is allocated to each image frame in proportion to the generated code amount for each image frame in the immediately preceding GOP section. This means that encoding is performed while sequentially correcting the error of the encoding generation amount by encoding the remaining screen.

【0103】各画像フレーム当たりの目標符号量の割当
が決まれば、画面内の各マクロブロック毎の量子化スケ
ールコードqc(j )を(13)〜(16)式に従って、
逐次制御しながら画像フレーム毎の符号化を行う。*1
まず、I、P、B画像フレーム内のj 番目のマクロブロ
ックの符号化に先立ち、各画像フレームに対するj 番目
の仮想バッファの占有量 di(j )、 dp(j )、db(j )
の値を(13)式によって求める。
When the allocation of the target code amount for each image frame is determined, the quantization scale code qc (j) for each macroblock in the screen is calculated according to the equations (13) to (16).
Encoding for each image frame is performed while performing sequential control. * 1
First, prior to coding of the j-th macroblock in the I, P, and B image frames, the occupancy of the j-th virtual buffer for each image frame di (j), dp (j), db (j)
Is determined by equation (13).

【0104】 ここで、 B(j) は、画像フレームの先頭からj 番目のマ
クロブロック迄の実際の符号発生ビット量、Mbは、画像
フレーム内のマクロブロック数をさす。
[0104] Here, B (j) is the actual code generation bit amount from the beginning of the image frame to the j-th macroblock, and Mb is the number of macroblocks in the image frame.

【0105】また、画像フレーム毎の先頭(j=1)の
マクロブロックに対する符号化時の仮想バッファの初期
値として、 但し、r=2 ×R /f (15) を使う。
Also, as an initial value of the virtual buffer at the time of encoding for the first (j = 1) macroblock for each image frame, However, r = 2 × R / f (15) is used.

【0106】この時、j 番目のマクロブロックに対する
量子化スケールコードqc(j) を(16)式で求める。
At this time, the quantization scale code qc (j) for the j-th macroblock is obtained by equation (16).

【0107】qc(j) = dx(j )×31/r (16) dx(j )=( di(j )、 dp(j )、 db(j )) (13)、(16)式は、画像フレームあたりの目標符
号量に、実際の符号化を行って発生した符号量が一致す
るように、直前迄のマクロブロックの符号化結果を見な
がら、各マクロブロックを量子化スケールコードqc(j)
を逐次フィードバック制御して符号化を行うことを意味
する。
Qc (j) = dx (j) × 31 / r (16) dx (j) = (di (j), dp (j), db (j)) (13) and (16) Each macroblock is quantized by a quantization scale code qc (j, while observing the encoding results of the macroblock up to immediately before, so that the target code amount per image frame matches the code amount generated by performing actual encoding. )
To perform coding by successively performing feedback control.

【0108】(13)式から明らかな如く、マクロブロ
ックの番号順に比例して配分した累計目標符号量と実際
の累計発生符号量との差分値が大きく変化した場合は、
画像が、その変化の方向に向かって画像複雑度を変化さ
せていることを意味する為、(16)式によって、量子
化スケールコード(従って量子化スケール)を変化さ
せ、累計発生符号量を累計目標符号量に近づけるように
制御する。
As is apparent from equation (13), when the difference between the cumulative target code amount distributed in proportion to the macroblock number and the actual cumulative code amount changes greatly,
Since it means that the image changes the image complexity in the direction of the change, the quantization scale code (accordingly, the quantization scale) is changed by the equation (16), and the accumulated code amount is accumulated. Control is performed so as to approach the target code amount.

【0109】(13)式から明らかなごとく、累計発生
符号量と累計目標符号量との誤差は、次のマクロブロッ
クの符号化の時に反映されて、量子化スケールコードの
値を誤差を縮小させる方向にフィードバック制御する作
用を持つ。
As is apparent from the equation (13), the error between the accumulated code amount and the accumulated target code amount is reflected at the time of encoding the next macroblock, and the error of the quantized scale code is reduced. Has the effect of feedback control in the direction.

【0110】また、(15)式のr は、リアクションパ
ラメータと呼ばれており、この値が大き過ぎると仮想バ
ッファの値が大きくなり過ぎ、画像の複雑度の変化に対
する対応速度が遅くなり目標符号量と発生符号量の差が
開きすぎ、また、小さ過ぎると画像の複雑度の変化に対
する対応速度は早くなるが、過剰反応を生起し、必要以
上に符号量を減らし過ぎて画質の劣化を引き起こす。
Further, r in equation (15) is called a reaction parameter. If this value is too large, the value of the virtual buffer becomes too large, and the speed of responding to changes in the complexity of the image becomes slow, and the target code If the difference between the amount and the generated code amount is too wide, and if it is too small, the speed of responding to changes in the complexity of the image will be fast, but excessive reaction will occur, and the code amount will be reduced too much, causing deterioration in image quality .

【0111】この為、リアクションパラメータr の値に
は、適当な値が存在し、経験的に(15)式が最適値と
して求まる。(15)式の右辺はGOP区間の目標符号
量をGOPの画像フレームに平均的に割り振った平均符
号量の2倍の値を意味する。
Therefore, an appropriate value exists for the value of the reaction parameter r, and the equation (15) is empirically determined as an optimum value. The right side of the expression (15) means a value twice as large as the average code amount obtained by allocating the target code amount in the GOP section to the image frames of the GOP on average.

【0112】また、(14)式の初期値も経験式であ
る。この初期値が大き過ぎたり、小さ過ぎると、(1
6)式から決まる最初のマクロブロックに対する量子化
スケールコードの値が大き過ぎたり、小さくなり過ぎ
て、マクロブロックの最初の方で目標符号量との差異が
おおきくなる。
The initial value of the equation (14) is also an empirical equation. If this initial value is too large or too small, (1
6) The value of the quantization scale code for the first macroblock determined from the expression is too large or too small, and the difference from the target code amount becomes large at the beginning of the macroblock.

【0113】Iフレームを例にとると、(14)式の仮
想バッファの初期値を(16)の量子化スケールコード
の式に代入すれば明らかな如く、Iフレームの最初のマ
クロブロックの符号化を量子化スケールコード10に設
定して符号化を開始することを意味している。
Taking the I-frame as an example, as is clear from substituting the initial value of the virtual buffer in the expression (14) into the expression of the quantization scale code in the expression (16), the coding of the first macroblock of the I-frame is performed. Is set to the quantization scale code 10 and encoding is started.

【0114】このように、(3)〜(10 )式によっ
て、GOP区間に対する目標符号量が定まれば、(1
2)〜(16)式によって、各画像フレーム毎の符号化
を実施して目標符号量と発生符号量を一致させるよう
に、量子化スケールをマクロブロック毎に制御する事が
可能となる。
As described above, if the target code amount for the GOP section is determined by the equations (3) to (10), (1)
According to the expressions (2) to (16), it is possible to control the quantization scale for each macroblock so that the encoding is performed for each image frame and the target code amount and the generated code amount are made to match.

【0115】図5の目標符号化レート決定手順の図解説
明に、これらの式を使って、目標符号化レートR を求め
る手順を図解的に示す。
In the illustrative explanation of the target coding rate determination procedure in FIG. 5, a procedure for obtaining the target coding rate R using these equations is schematically shown.

【0116】図5で、例えば、平均符号化レートR0で継
続して符号化動作を行っている場合は一定のサイクルを
繰り返して符号化が行われている。
In FIG. 5, for example, when the encoding operation is continuously performed at the average encoding rate R0, the encoding is performed by repeating a certain cycle.

【0117】この状態で、次のGOPのサイクルで複雑
度が平均複雑度GCMav の1.5 倍の画像に切り替わった場
合には、新たなサイクルで符号化が行われる。
In this state, if the complexity is switched to an image 1.5 times the average complexity GCMav in the next GOP cycle, encoding is performed in a new cycle.

【0118】図5から明らかな如く、多区間平均符号化
レートは、必ず、平均目標符号化レートR0に対して、許
容変動幅RLの範囲内に抑えられ、通常、画像の複雑度は
平均複雑度GCMav を中心に、長時間平均が対称な確率密
度分布を有することから、可変レートは、目標平均符号
化レートR0に対して対称な確率密度分布もって符号化さ
れる。
As is clear from FIG. 5, the multi-section average coding rate is always kept within the range of the allowable variation range RL with respect to the average target coding rate R0. Since the long-term average has a symmetric probability density distribution around the degree GCMav, the variable rate is encoded with a symmetric probability density distribution with respect to the target average coding rate R0.

【0119】従って、可変レートで、所定の蓄積容量の
蓄積媒体に対して、所定の時間長に近似的に等しい動画
像を高品質で符号化・蓄積することが可能となる。
Therefore, it is possible to encode and accumulate a moving image of approximately equal to a predetermined time length with high quality at a variable rate in a storage medium of a predetermined storage capacity.

【0120】図5に示す如く、発生符号量、量子化スケ
ールの実測データから式(3)に従って、次のGOP区
間に対する目標符号化レートが定まり、目標符号化レー
トに応じた、実際符号化処理によって新たな発生符号
量、量子化スケールの値が定まるというサイクルを繰り
返す。
As shown in FIG. 5, the target coding rate for the next GOP section is determined from the generated code amount and the measured data of the quantization scale according to equation (3), and the actual coding processing according to the target coding rate is performed. A cycle in which a new generated code amount and a value of the quantization scale are determined by the above is repeated.

【0121】この辺の手順をさらに詳細に、図6の目標
符号量割当の手順、図7の本発明の可変レート符号化処
理方式の詳細処理フロー図、図8の画像フレーム面内画
像符号化の手順に従って説明する。
The procedure of this side will be described in further detail. The procedure of target code amount allocation in FIG. 6, the detailed processing flow chart of the variable rate encoding processing method of the present invention in FIG. 7, and the image encoding in the image frame plane in FIG. It will be described according to the procedure.

【0122】図6、図7は、(3)〜(9)式から目標
符号化レートR を求め、(10)式から目標符号量CDを
きめ、(12)式からGOP内の各画像フレームへ符号
量を割当て、(13)〜(16)式を用いて画像フレー
ム内のマクロブロック単位に符号化を行って、逐次GO
P内、全時間分の符号化を行う全処理手順を示す。
FIGS. 6 and 7 show that the target encoding rate R is obtained from the equations (3) to (9), the target code amount CD is determined from the equation (10), and each image frame in the GOP is obtained from the equation (12). , The coding is performed in units of macroblocks within the image frame using the equations (13) to (16), and the
The entire processing procedure for performing encoding for all time in P is shown.

【0123】また、図8は、画像フレーム毎に、マクロ
ブロック単位で、目標符号量と発生符号量の実測結果の
比較結果を元に、(13)〜(16)式に従って、画面
フレーム内符号化を行う手順を示す。
FIG. 8 is a diagram showing a comparison between the target code amount and the actually measured result of the generated code amount for each image frame based on the comparison result of the actual code amount and the generated code amount, according to the equations (13) to (16). The procedure for performing the conversion is shown below.

【0124】さらに、図9の目標符号化レートと関連パ
ラメータの過渡応答推移例に、GOP区間毎の目標符号
化レートR 、(4)式の可変レート補正係数Cr、(5)
式の画像複雑度変化指数CcのGOPの区間数mをパラメ
ータとした計算例を示す。
Further, in the example of transition of the transient response of the target coding rate and related parameters in FIG. 9, the target coding rate R for each GOP section, the variable rate correction coefficient Cr of the equation (4), and (5)
A calculation example using the number m of sections of the GOP of the image complexity change index Cc in the equation as a parameter is shown.

【0125】図9は、平均的な画像が続いていた状態か
ら、急に、区間画像複雑度GCM の値が直前までの画像の
1.8 倍の画像に変化し、その状態が長期間続いた場合の
目標符号化レートR 、可変レート補正係数Cr、画像複雑
度変化指数Ccの過渡応答の時間推移状況を示す。平均的
な画像複雑度から大きくずれた画像複雑度の動画像が長
時間続くと、可変レート補正係数Cr、画像複雑度変化指
数Ccともに、0 に収斂しようとする性質を持っており、
この可変速度補正係数Cr、複雑度変化指数Ccの2つの項
の相乗効果により、画像の複雑度が長期間に渡って画像
の平均複雑度からずれて、平均目標符号化レートR0から
ずれることを抑止する。
FIG. 9 shows a state in which the average image continues, and the value of the section image complexity GCM suddenly changes to the immediately preceding image.
This shows the temporal transition of the transient response of the target coding rate R, the variable rate correction coefficient Cr, and the image complexity change index Cc when the image changes to a 1.8-fold image and the state continues for a long time. When a moving image with an image complexity greatly deviated from the average image complexity continues for a long time, both the variable rate correction coefficient Cr and the image complexity change index Cc tend to converge to 0,
Due to the synergistic effect of the two terms of the variable speed correction coefficient Cr and the complexity change index Cc, the image complexity deviates from the average complexity of the image over a long period of time and deviates from the average target coding rate R0. Deter.

【0126】複雑な画像が続く場合に、どの程度の時定
数でこの抑止効果を働かせるかは、過去のGOPの平均
をとる区間数mに依存して変わり、mが小さい場合に
は、R0への収斂速度が早くなり、mが大きい場合には、
R0への収斂速度が遅くなる。
In the case where a complicated image continues, the time constant at which the deterrent effect works depends on the number m of sections in which the average of past GOPs is averaged. Converges faster and if m is larger,
The convergence speed to R0 becomes slow.

【0127】通常、類似の画像を長時間録画する場合に
は、多区間平均複雑度GCMav に対して、平均複雑度GCM
の値は、ほぼ対称な生起確率密度分布を有するという一
般則が成立する。
Normally, when a similar image is recorded for a long time, the average complexity GCMav is multiplied by the average complexity GCMav.
Has a general rule that the value of has a substantially symmetric occurrence probability density distribution.

【0128】本発明では、上記の一般則を利用して、
(3)式によって、多区間平均符号化レートを目標平均
符号化レートR0に対して許容変化幅RLの範囲内に抑え、
GOPの区間毎に、可変レートで、定速度符号化を繰り
返すことによって、媒体容量と記録時間長からきまる平
均目標符号化レートに対して、許容可変幅の範囲内で、
符号化を行い、例外的に、複雑な画像や単純な画像が続
いて、平均目標符号化レートR0から外れようとすると、
可変レート補正項の引き戻し効果が働き、目標符号化レ
ートを平均目標符号化レートR0に引き戻すことによっ
て、蓄積媒体の割当容量に対して、目標記録時間の誤差
を極小に抑えて、1 回の符号化で可変レート符号化と蓄
積を可能としている。
In the present invention, utilizing the above general rules,
According to the equation (3), the multi-section average coding rate is suppressed within a range of an allowable change width RL with respect to the target average coding rate R0,
By repeating constant-rate encoding at a variable rate for each section of the GOP, an average target encoding rate determined by the medium capacity and the recording time length is within an allowable variable range.
Performing the encoding, exceptionally, if a complex image or a simple image subsequently tries to deviate from the average target encoding rate R0,
The effect of pulling back the variable rate correction term works to return the target coding rate to the average target coding rate R0. Enables variable rate coding and storage.

【0129】尚、実際の符号化結果と割当容量との間の
累積誤差が許容誤差範囲を超えて拡大する場合は、平均
目標符号化レートR0の値を途中で適宜修正するか、残り
予測記録時間Trを割当蓄積容量Mとそれまでの符号量
累積値ΣCDiから Tr=(M−ΣCDi)/R0 (17) で求めて表示する等の方法によって、蓄積時間の微少誤
差発生の影響を軽減することができる。
When the accumulated error between the actual coding result and the allocated capacity is increased beyond the allowable error range, the value of the average target coding rate R0 is appropriately corrected in the middle or the remaining prediction recording is performed. The influence of the occurrence of minute errors in the accumulation time is reduced by a method such as calculating and displaying the time Tr from the allocated accumulation capacity M and the accumulated code amount ΣCDi up to that time by Tr = (M−ΣCDi) / R0 (17). be able to.

【0130】図10の本発明の可変レート符号化方式に
よる符号器構成の実施例1に、本発明の原理にもとずく
回路構成例1を示す。
FIG. 10 shows a first example of a circuit configuration based on the principle of the present invention in Example 1 of the encoder configuration using the variable rate coding method of the present invention.

【0131】図10で、MPEG符号器部100は、図
15の従来の可変レート符号化方式による符号器の構成
図と同じ構成である。
In FIG. 10, the MPEG encoder section 100 has the same configuration as the configuration diagram of the conventional variable rate encoding encoder shown in FIG.

【0132】また、ブロック部200は、目標符号量割
当部である。
The block section 200 is a target code amount allocating section.

【0133】15’は、マクロブロック、画像フレー
ム、GOP単位での発生符号量、を測定する発生符号量
測定部、16’は、これらの発生符号量データとマクロ
ブロック単位で量子化制御部11から得られる量子化ス
ケールの値を蓄積する符号化データ用メモリ、18は、
符号化データ用メモリに蓄積されている過去の発生符号
量のデータを基に、(6)、(7)、(8)式により最
新のGOPの区間画像複雑度GCM 、一定期間長分の多区
間平均複雑度GCMav 、多区間平均符号化レートRav を計
算する平均値計算部、17’は符号化データメモリ1
6’に蓄積された発生符号量と、平均値計算部18から
得られる最新のGOPにおける多区間平均符号化レート
Rav と区間画像複雑度GCM 、多区間平均画像複雑度GCMa
v から次のGOPとGOP内のI、P、Bの各画像フレ
ームに対する目標割当符号量の計算を(3)〜(11)
式を用いて行う目標符号量計算部である。
Reference numeral 15 'denotes a generated code amount measuring unit for measuring the generated code amount in units of macroblocks, image frames, and GOPs. Reference numeral 16' denotes the generated code amount data and the quantization control unit 11 in units of macroblocks. A coded data memory 18 for storing the value of the quantization scale obtained from
Based on the past generated code amount data stored in the coded data memory, the latest GOP section image complexity GCM is calculated by the formulas (6), (7), and (8). An average value calculator for calculating the section average complexity GCMav and the multi-section average coding rate Rav, and 17 ′ is a coded data memory 1
6 ′ and the multi-section average coding rate in the latest GOP obtained from the average value calculation unit 18
Rav and section image complexity GCM, multi-section average image complexity GCMa
From (v), the calculation of the target allocation code amount for the next GOP and each of the I, P, and B image frames in the GOP is (3) to (11).
This is a target code amount calculation unit that uses an expression.

【0134】図10の構成で、最新のGOPまでの符号
化を行った結果が、可変長符号化部10の出力として得
られ、発生符号量測定部15' で測定され、符号化デー
タメモリ16' に蓄積されている。また、符号化データ
メモリ16' には、前のGOP区間の各画像フレーム毎
にマクロブロック単位で量子化スケールの値qiが蓄積さ
れている。
In the configuration shown in FIG. 10, the result of encoding up to the latest GOP is obtained as an output of the variable length encoding unit 10 and is measured by the generated code amount measuring unit 15 '. 'Is stored in In the coded data memory 16 ', the quantization scale value qi is stored in macroblock units for each image frame in the previous GOP section.

【0135】平均値計算部18は、符号化データ用メモ
リの値をもとに、(7)式から最新GOPに対する区間
画像複雑度GCM を(8)式から多区間平均画像複雑度GC
Mavを、(9)式から、多区間平均符号化レートRav を
求める。
The average value calculator 18 calculates the section image complexity GCM for the latest GOP from the equation (7) based on the value of the coded data memory, and calculates the multi-section average image complexity GC from the equation (8).
For Mav, a multi-segment average coding rate Rav is obtained from equation (9).

【0136】目標符号量計算部17’は、(3)〜(1
1)式から次のGOP区間に対する目標符号量CDを得、
目標符号量をさらに、各画像フレームに対する実測の発
生符号量に応じて、(12)式を使って当該GOPの
I、P、B各画像フレームに対する目標符号量を配分す
る。
The target code amount calculation unit 17 ′ calculates (3) to (1)
The target code amount CD for the next GOP section is obtained from the equation 1),
The target code amount is further allocated to each of the I, P, and B image frames of the GOP by using Expression (12) in accordance with the actually measured generated code amount for each image frame.

【0137】この画像フレーム毎の符号量配分結果に対
して、各画像フレーム内のマクロブロック毎に、11の
量子化制御部が量子化スケールを(13)〜(16)式
を使って逐次制御しながら、入力画像信号に対して10
0のMPEG符号器部の符号化動作を行わせる。
In response to the code amount distribution result for each image frame, eleven quantization control units sequentially control the quantization scale for each macroblock in each image frame by using equations (13) to (16). While the input image signal
The encoding operation of the MPEG encoder unit of 0 is performed.

【0138】実際には、GOP単位、画像フレーム、マ
クロブロック、ブロック毎の符号量割当は、図13
(b)のMPEG方式の符号シーケンスに示したヘッダ
分の符号量を予め減算した符号量を割り振ることにな
る。
In practice, the code amount allocation for each GOP, image frame, macroblock, and block is shown in FIG.
The code amount obtained by subtracting the code amount of the header shown in the code sequence of the MPEG system in (b) in advance is allocated.

【0139】このようにして、全画面にわたって符号化
処理を行った結果、新たな量子化スケールGCM の値が、
次のGOP区間に対して得られる。
As a result of performing the encoding process over the entire screen, the value of the new quantization scale GCM becomes
It is obtained for the next GOP section.

【0140】この量子化スケールの値と、実際に得られ
た発生符号量をもとに、平均値計算部18、目標符号量
計算部17’で(3)〜(10)式を元に所定の計算が
行われ、さらに当該GOPに対する符号化レートR の値
が決定される。
On the basis of the value of the quantization scale and the actually generated code amount, the average value calculating unit 18 and the target code amount calculating unit 17 'determine a predetermined value based on the equations (3) to (10). Is calculated, and the value of the coding rate R for the GOP is determined.

【0141】図11の本発明の可変レート符号化方式に
よる符号器構成の実施例2に本発明の第2の実施例に示
す。本構成では、符号量割当部の構成として、固定量子
化スケールでMPEG符号化を行うMPEG符号器から
の発生符号量を実測する構成とし、実測結果を用いて、
この符号量割当部の処理時間と同じ1GOP分だけ遅ら
せた入力画像信号に対して、改めて、目標符号量割当に
従って符号化を行う。
A second embodiment of the present invention is shown in the second embodiment of the encoder configuration according to the variable rate coding system of the present invention shown in FIG. In this configuration, the configuration of the code amount allocating unit is configured to measure the generated code amount from an MPEG encoder that performs MPEG encoding at a fixed quantization scale.
The input image signal delayed by one GOP, which is the same as the processing time of the code amount allocating unit, is encoded again according to the target code amount allocation.

【0142】MPEG符号器部が1ケ余分に必要になる
が、前のGOP区間で得た符号結果から次のGOP区間
を予測し、予測誤差を修正しながら符号化を行う実施例
1の構成に比べると、目標符号量割当の精度を上げられ
る。
Although an extra MPEG encoder unit is required, the structure of the first embodiment in which the next GOP section is predicted from the code result obtained in the previous GOP section and coding is performed while correcting the prediction error , The accuracy of target code amount allocation can be improved.

【0143】図11で、100のMPEG符号器部は、
図10のMPEG符号器部100と、基本的には同じ構
成と機能を有する。
In FIG. 11, the MPEG encoder section of 100
It has basically the same configuration and function as the MPEG encoder unit 100 of FIG.

【0144】100’のMPEG符号器部は、100の
MPEGの基本符号器部から、量子化制御部をのぞい
た、固定量子化スケールでMPEG符号化を行う部分で
ある。
The MPEG encoder section 100 'is a section for performing MPEG encoding at a fixed quantization scale, excluding the quantization control section from the basic MPEG encoder section of 100.

【0145】ブロック200’は、図10のブロック2
00と類似のレート制御機能を有する目標符号量割当部
である。20は、1GOP分の容量を持つ画像フレーム
メモリ部分であり、100のMPEG符号器部が20
0’の目標符号量割当部の予測符号化の結果を使って、
当該GOPに対する符号化処理を行う為の遅延線の役目
を果たしている。
Block 200 'corresponds to block 2 in FIG.
A target code amount allocating unit having a rate control function similar to 00. Reference numeral 20 denotes an image frame memory portion having a capacity of 1 GOP, and 100 MPEG encoder portions
Using the result of the predictive coding of the target code amount allocating unit of 0 ',
It serves as a delay line for performing encoding processing on the GOP.

【0146】図11で、入力画像信号に対して、10
0’のMPEG符号器部は、量子化スケールを一定にし
たままで入力された符号化対象のGOP区間に対して符
号化処理を行い、発生した符号量を基に、画像複雑度や
区間複雑度、多区間平均画像複雑度、多区間平均符号化
レートを計算し、この値をもとに、1GOP分遅れて、
100のMPEG符号器に入力される入力画像信号に対
して、(3)〜(10)式から当該GOPに対する目標
符号量を求める。
Referring to FIG. 11, 10
The MPEG encoder unit of 0 'performs an encoding process on the GOP section to be encoded while keeping the quantization scale constant, and based on the generated code amount, the image complexity and the section complexity are calculated. Degree, multi-section average image complexity, and multi-section average coding rate, and based on these values, delay by 1 GOP,
For the input image signal input to the 100 MPEG encoders, a target code amount for the GOP is obtained from equations (3) to (10).

【0147】また、この目標符号量を、実測の画像フレ
ーム毎の発生符号量を基に比例配分を行う。
The target code amount is proportionally distributed based on the actually measured code amount for each image frame.

【0148】次に、この結果を使って、フレームメモリ
20によって、1GOP分遅れて来た、符号化対象とす
べき、100’のMPEG符号器部で既に符号化処理を
行って、各種情報を得ている当該GOPに対して、量子
化制御部を制御しながらMPEG符号化を行う。
Next, using the result, the frame memory 20 has already performed the encoding process in the 100 'MPEG encoder unit which is delayed by one GOP and is to be encoded, and MPEG encoding is performed on the obtained GOP while controlling the quantization control unit.

【0149】すなわち、この目標符号量割当結果に基づ
いて、(13)〜(16)式を基に11の量子化制御部
を制御し、量子化スケールを変えながら、1GOP分遅
延して入力された入力画像信号に対して、実施例1と同
様にして、100のMPEG符号器部の符号化処理を行
う。
That is, based on the target code amount allocation result, the eleven quantization controllers are controlled based on the equations (13) to (16), and are input with a delay of one GOP while changing the quantization scale. In the same manner as in the first embodiment, the input image signal is subjected to encoding processing of 100 MPEG encoder units.

【0150】実施例2を実施例1と比べた場合、実施例
1では、前のGOPの符号化結果で得られた複雑度を基
に、次のGOPでも、同じ傾向の画像が続くと仮定して
次のGOPに対する符号量割当を行っている。従って、
急激な画像の変化があった場合に可変レートを変化させ
る時に追随遅れが生ずる。
When the second embodiment is compared with the first embodiment, in the first embodiment, it is assumed that the image having the same tendency continues in the next GOP based on the complexity obtained by the encoding result of the previous GOP. Then, the code amount is allocated to the next GOP. Therefore,
When the variable rate is changed when there is a sudden change in the image, a tracking delay occurs.

【0151】これに対して、実施例2では、符号化対象
となるGOP期間の複雑度を測定し、この複雑度をもと
に、再度、当該GOP期間の目標レートと目標符号量を
きめている為、予測の精度は大幅に向上し、画像の複雑
度に応じて可変レートの制御をより適切に行うことが出
来る。
On the other hand, in the second embodiment, the complexity of the GOP period to be encoded is measured, and the target rate and the target code amount of the GOP period are determined again based on the complexity. Therefore, the accuracy of the prediction is greatly improved, and the control of the variable rate can be more appropriately performed according to the complexity of the image.

【0152】但し、目標符号量割当部の構成において、
事前予測符号化処理用の新たなMPEG符号器部、1G
OP分の画像フレームメモリが余分に必要となる。
However, in the configuration of the target code amount allocating section,
New MPEG encoder for pre-prediction encoding, 1G
An extra image frame memory for OP is required.

【0153】[0153]

【発明の効果】本発明により、動画像を可変レートで1
回で符号化し、蓄積媒体への蓄積を可能とするデジタル
蓄積媒体用可変レート動画像符号化装置の実現が可能と
なり、必要な蓄積媒体容量の低減による低コスト化、ま
た、テレビの実況中継などのリアルタイムの用途に用い
ても伝送コストの低減などその適用効果は高い。
According to the present invention, moving images can be recorded at a variable rate.
It is possible to realize a variable-rate video encoding device for digital storage media that can be encoded in one time and stored in a storage medium, reducing costs by reducing the required storage medium capacity, and broadcasting live TV. Even if it is used for real-time applications, its application effects such as reduction of transmission cost are high.

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

【図1】 本発明の原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】 本発明の可変レート符号化方式の基本処理フ
ローである。
FIG. 2 is a basic processing flow of the variable rate encoding system of the present invention.

【図3】 画像複雑度のグラフである。FIG. 3 is a graph of image complexity.

【図4】 本発明による可変レート符号化の時間推移説
明図である。
FIG. 4 is an explanatory diagram of a time transition of variable rate coding according to the present invention.

【図5】 目標符号化レートの決定手順の図解説明であ
る。
FIG. 5 is an illustrative description of a procedure for determining a target coding rate.

【図6】 目標符号量割当の手順である。FIG. 6 shows a procedure of target code amount allocation.

【図7】 本発明の可変レート符号化方式の詳細処理フ
ロー図である。
FIG. 7 is a detailed processing flow chart of the variable rate coding method of the present invention.

【図8】 画像フレーム面内画像符号化の手順である。FIG. 8 shows a procedure of image coding in an image frame.

【図9】 目標符号化レートと関連パラメータの過渡応
答推移例である。
FIG. 9 is an example of transient response transition of a target coding rate and related parameters.

【図10】 本発明の可変レート符号化方式による符号
器構成の実施例1である。
FIG. 10 is a first embodiment of an encoder configuration according to the variable rate encoding method of the present invention.

【図11】 本発明の可変レート符号化方式による符号
器構成の実施例2である。
FIG. 11 is a second embodiment of the encoder configuration according to the variable rate encoding method of the present invention.

【図12】 MPEG方式の処理機能である。FIG. 12 shows a processing function of the MPEG system.

【図13】 MPEG方式の予測処理構造と符号シーケ
ンスである。
FIG. 13 shows a prediction processing structure and a code sequence of the MPEG system.

【図14】 量子化スケールと量子化スケールコードで
ある。
FIG. 14 shows a quantization scale and a quantization scale code.

【図15】 従来の可変レート符号化方式による符号器
の構成図である。
FIG. 15 is a configuration diagram of an encoder using a conventional variable rate coding scheme.

【図16】 従来の可変レート符号化方式による2パス
符号化である。
FIG. 16 shows two-pass encoding using a conventional variable rate encoding method.

【図17】 従来の可変レート符号化方式の処理フロー
である。
FIG. 17 is a processing flow of a conventional variable rate coding method.

【符号の説明】 1、1’ DCT変換部 2、2’ 量子化部 3、3’ 逆量子化部 4、4’ 逆DCT変換部 5、5’20 フレームメモリ 6、6’ 動き検出部 7、7’ 動き補償部 8、8’ 減算器 9、9’ 加算器 10、10’ 可変長符号化部 11、11’ 量子化制御部 12、12’ 出力バッファ 13、13’,14 切替スイッチ 15、15’、15” 発生符号量測定部 16 符号量用メモリ 16’、16” 符号化データメモリ 17、17’ 目標符号量計算部 18,18’ 平均値計算部 100、100‘ MPEG符号器部 200、200’ 目標符号量割当部[Description of Signs] 1, 1 ′ DCT Transformer 2, 2 ′ Quantizer 3, 3 ′ Inverse Quantizer 4, 4 ′ Inverse DCT Transformer 5, 5′20 Frame Memory 6, 6 ′ Motion Estimator 7 , 7 'Motion compensation unit 8, 8' Subtractor 9, 9 'Adder 10, 10' Variable length coding unit 11, 11 'Quantization control unit 12, 12' Output buffer 13, 13 ', 14 Changeover switch 15 , 15 ′, 15 ″ Generated code amount measurement unit 16 Code amount memory 16 ′, 16 ″ Encoded data memory 17, 17 ′ Target code amount calculation unit 18, 18 ′ Average value calculation unit 100, 100 ′ MPEG encoder unit 200, 200 'target code amount allocating unit

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5C057 AA01 AA09 BA19 CA01 CB05 CC04 CE04 EF05 EG06 EH07 EK03 EL01 EM04 EM09 EM13 EM16 GE08 GF03 GF04 GG05 GH05 GJ05 5C059 KK26 KK33 MA00 MA05 MA14 MA23 MC15 MC38 ME01 PP04 RC28 SS13 SS14 TA53 TA57 TB03 TC19 TC38 TD16 UA02 ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 5C057 AA01 AA09 BA19 CA01 CB05 CC04 CE04 EF05 EG06 EH07 EK03 EL01 EM04 EM09 EM13 EM16 GE08 GF03 GF04 GG05 GH05 GJ05 5C059 KK26 KK33 MA00 MA05 MA14 SS23 MC53 TA57 TB03 TC19 TC38 TD16 UA02

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】量子化スケールを可変にすることにより発
生符号量の制御を行う動画像符号器、 目標平均符号化レートと、該動画像符号器からの一定枚
数の画像フレームからなる最新の符号化区間に対する発
生符号量、量子化スケールの実測データをもとに、所定
の計算式に従って、次の符号化区間に対する目標符号化
レート及び、目標符号化レートと該符号化区間の時間長
の積として定まる目標符号量の計算と目標符号量の各画
像フレームへの割当を行う目標符号量割当部、からな
り、 該符号化区間毎に、各々割り当てた目標符号化レートで
符号化を繰り返すことにより、動画像を、前記目標平均
符号化レートを中心に可変レートで1回で符号化するこ
とを特徴とする、可変レート動画像符号化装置。
A moving picture encoder for controlling a generated code amount by making a quantization scale variable, a target average coding rate, and a latest code composed of a fixed number of image frames from the moving picture encoder. The target coding rate for the next coding section and the product of the target coding rate and the time length of the coding section in accordance with a predetermined formula based on the generated code amount for the coding section and the measured data of the quantization scale. A target code amount allocating unit for calculating a target code amount and allocating the target code amount to each image frame, defined by the following. By repeating coding at the allocated target coding rate for each coding section, A variable-rate video encoding apparatus, which encodes a video once at a variable rate around the target average encoding rate.
【請求項2】請求項1に記載の所定の計算式は、 前記目標平均符号化レートと、前記符号化区間毎の目標
符号化レートの目標平均符号化レートからの偏差を表す
可変レート補正項の和で定義され、 該可変レート補正項は、 目標平均符号化レート、最新の符号化区間迄の一定の区
間数に対する過去の符号化レートの実績値を平均化した
多区間平均符号化レート、多区間平均符号化レートの目
標平均符号化レートからの許容変動幅の3つの変数から
定め、多区間平均符号化レートが、目標平均符号化レー
トと等しい場合に1の値を取り、目標平均符号化レート
から許容変動幅にむかって大きくずれると値が0に漸近
し、該可変レート補正項を0に漸近させる働きを持つ、
平均符号化レート補正係数、 画像フレーム毎の画像の複雑度を定義する画像複雑度を
前記符号化区間にわたって総計した区間画像複雑度、最
新の符号化区間迄の一定の区間数に対する該区間画像複
雑度を平均化した多区間平均画像複雑度から定め、区間
画像複雑度の多区間平均複雑度に対する変化割合を値に
とり、区間画像複雑度が多区間平均複雑度に対して同じ
偏差値状態が続くと、値が0に漸近し該可変レート補正
項を0に漸近させる働きを持つ、画像複雑度変化指数、 目標平均符号化レートの近傍の値を有し、目標平均符号
化レートから1対1に定まる修正目標平均符号化レー
ト、の3つのパラメータの積として定義される事を特徴
とする、請求項1に記載の可変レート動画像符号化装
置。
2. A variable rate correction term representing a deviation of the target average coding rate and a target coding rate for each coding section from the target average coding rate. The variable rate correction term is defined as a target average coding rate, a multi-section average coding rate obtained by averaging the actual values of past coding rates for a certain number of sections up to the latest coding section, The multi-section average coding rate is determined from three variables of the allowable variation width from the target average coding rate, and takes a value of 1 when the multi-section average coding rate is equal to the target average coding rate. When the value deviates greatly from the conversion rate toward the permissible variation range, the value gradually approaches 0, and the variable rate correction term has a function of approaching 0.
Average coding rate correction coefficient, section image complexity totaling image complexity defining the image complexity for each image frame over the coding section, section image complexity for a fixed number of sections up to the latest coding section Determined from the multi-segment average image complexity obtained by averaging the degrees, the change rate of the section image complexity with respect to the multi-segment average complexity is taken as a value, and the section image complexity has the same deviation value state as the multi-segment average complexity And an image complexity change index whose value asymptotically approaches 0 and ascends the variable rate correction term to 0, having a value near the target average coding rate, and one-to-one from the target average coding rate. The variable rate video encoding apparatus according to claim 1, wherein the variable rate video encoding apparatus is defined as a product of three parameters of a modified target average encoding rate determined by the following equation.
【請求項3】請求項2に記載の、前記画像複雑度は、画
像フレーム内のマクロブロック毎に定まる量子化スケー
ルの画面内平均値と、該画像フレームに対する発生符号
量の積の値として定めたことを特徴とする、請求項1に
記載の可変レート動画像符号化装置。
3. The image complexity according to claim 2, wherein the image complexity is determined as a value of a product of an in-screen average value of a quantization scale determined for each macroblock in the image frame and a generated code amount for the image frame. The variable-rate video encoding device according to claim 1, wherein:
【請求項4】請求項1に記載の可変レート動画像符号化
装置において、 該目標符号量割当部は、 前記動画像符号器としてMPEG符号器を用い、その可
変長符号化部出力からの、マクロブロック、画像フレー
ム、前記符号化区間毎の発生符号量を測定する発生符号
量測定部、 該発生符号量測定部からの発生符号量データ、及び該M
PEG符号器の量子化制御部からマクロブロック毎に得
られる量子化スケール値を蓄積する符号化データメモ
リ、 該符号化データメモリに蓄積した該量子化スケール値、
発生符号量から、請求項2に記載の前記区間画像複雑
度、前記多区間平均画像複雑度、前記多区間平均符号化
レートを算出する平均値計算部、 該符号化データメモリの蓄積データ及び前記平均値計算
部の計算データから、次の符号化区間に対する目標符号
化レートを、請求項2における前記所定の計算式を用い
て算出し、最新の符号化区間に対する各画像フレームへ
目標符号量の割当計算、各画像フレーム内のマクロブロ
ック毎の量子化スケール値の決定を行う目標符号量計算
部、からなり、 画像フレームあたりの発生符号量を画像フレームあたり
の目標符号量とする符号化処理を逐次行うことを特徴と
する、可変レート動画像符号化装置。
4. The variable-rate video coding apparatus according to claim 1, wherein the target code amount allocating unit uses an MPEG coder as the video coder, and outputs an output from the variable length coding unit. A generated code amount measuring unit for measuring the generated code amount for each of the macroblock, the image frame, and the coding section; generated code amount data from the generated code amount measuring unit;
A coded data memory for storing a quantized scale value obtained for each macroblock from a quantization control unit of the PEG encoder; a quantized scale value stored in the coded data memory;
An average value calculation unit that calculates the section image complexity, the multi-section average image complexity, and the multi-section average coding rate according to claim 2 from a generated code amount. From the calculation data of the average value calculation unit, a target coding rate for the next coding section is calculated using the predetermined calculation formula in claim 2, and the target coding rate is calculated for each image frame for the latest coding section. A target code amount calculation unit that performs allocation calculation and determines a quantization scale value for each macroblock in each image frame, and performs an encoding process in which a generated code amount per image frame is set as a target code amount per image frame. A variable-rate video encoding device, which performs the encoding sequentially.
【請求項5】請求項1に記載の可変レート動画像符号化
装置において、 該目標符号量割当部は、 固定量子化スケールでMPEG符号化処理を行うMPE
G符号器、 該MPEG符号器の可変長符合化部出力からの、前記最
新の符号化区間に対するマクロブロック、画像フレー
ム、符号化区間の発生符号量を測定する発生符号量測定
部、 該発生符号量測定部からの発生符号量データ、目標符号
量計算部からの目標符号化レート値を蓄積する符号化デ
ータメモリ、 該符号化データメモリに蓄積した発生符号量と過去の符
号化区間毎の符号化レート実績値から、該符号化区間の
区間画像複雑度、該区間迄の一定の区間数に対する前記
多区間平均画像複雑度、多区間平均符号化レートを算出
する平均値計算部、 該符号化データメモリの蓄積データ及び前記平均値計算
部の計算データから、該区間に対する目標符号化レー
ト、目標符号量を請求項1に記載の所定の計算式を用い
て算出し、該区間の各画像フレームに対する目標符号量
の計算、画像フレーム内のマクロブロック毎の量子化ス
ケール値の決定を行う目標符号量計算部、からなり、 請求項1に記載の前記MPEG符号器への入力は、1符
号化区間分の遅延回路により入力画像信号を1符号化区
間分遅延して入力させる構成とし、 画像フレームあたりの発生符号量を画像フレームあたり
の目標符号量とする符号化処理を行うことを特徴とす
る、請求項1に記載の可変レート動画像符号化装置。
5. The variable-rate video encoding apparatus according to claim 1, wherein the target code amount allocating unit performs an MPEG encoding process on a fixed quantization scale.
A G encoder; a generated code amount measuring unit for measuring a generated code amount of a macro block, an image frame, and an encoded section for the latest encoding section from an output of a variable length encoding unit of the MPEG encoder; Coded data memory for storing the generated code amount data from the amount measuring unit, the target coding rate value from the target code amount calculation unit, the generated code amount stored in the coded data memory and the code for each past coding section An average value calculator for calculating the section image complexity of the coding section, the multi-section average image complexity for a fixed number of sections up to the section, and a multi-section average coding rate from the actualization rate actual value; A target coding rate and a target code amount for the section are calculated from the accumulated data of the data memory and the calculation data of the average value calculation unit using a predetermined calculation formula according to claim 1, and each image of the section is calculated. 2. A target code amount calculator for calculating a target code amount for a frame and determining a quantization scale value for each macroblock in an image frame, wherein the input to the MPEG encoder according to claim 1 is one code. A delay circuit for an encoding section to input an input image signal delayed by one encoding section, and performs an encoding process with a generated code amount per image frame as a target code amount per image frame. The variable-rate video encoding device according to claim 1, wherein
JP6356599A 1999-03-10 1999-03-10 Variable rate moving image encoding device Withdrawn JP2000261799A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6356599A JP2000261799A (en) 1999-03-10 1999-03-10 Variable rate moving image encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6356599A JP2000261799A (en) 1999-03-10 1999-03-10 Variable rate moving image encoding device

Publications (1)

Publication Number Publication Date
JP2000261799A true JP2000261799A (en) 2000-09-22

Family

ID=13232901

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6356599A Withdrawn JP2000261799A (en) 1999-03-10 1999-03-10 Variable rate moving image encoding device

Country Status (1)

Country Link
JP (1) JP2000261799A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007267020A (en) * 2006-03-28 2007-10-11 Casio Hitachi Mobile Communications Co Ltd Mobile communication terminal and program
JP2008187574A (en) * 2007-01-31 2008-08-14 Sony Corp Information processing device and method, program, and recording medium
WO2008111454A1 (en) * 2007-03-14 2008-09-18 Nippon Telegraph And Telephone Corporation Quantization control method, device, program, and recording medium containing the program
US8265142B2 (en) 2007-03-14 2012-09-11 Nippon Telegraph And Telephone Corporation Encoding bit-rate control method and apparatus, program therefor, and storage medium which stores the program
US8396130B2 (en) 2007-03-14 2013-03-12 Nippon Telegraph And Telephone Corporation Motion vector search method and apparatus, program therefor, and storage medium which stores the program
WO2014030485A1 (en) * 2012-08-24 2014-02-27 富士フイルム株式会社 Image compression device, operation control method therefor, and operation program therefor
US9455739B2 (en) 2007-03-14 2016-09-27 Nippon Telegraph And Telephone Corporation Code amount estimating method and apparatus, and program and storage medium therefor
CN111279697A (en) * 2019-01-25 2020-06-12 深圳市大疆创新科技有限公司 Code rate allocation method and device

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007267020A (en) * 2006-03-28 2007-10-11 Casio Hitachi Mobile Communications Co Ltd Mobile communication terminal and program
JP2008187574A (en) * 2007-01-31 2008-08-14 Sony Corp Information processing device and method, program, and recording medium
US8396130B2 (en) 2007-03-14 2013-03-12 Nippon Telegraph And Telephone Corporation Motion vector search method and apparatus, program therefor, and storage medium which stores the program
CN101637025A (en) * 2007-03-14 2010-01-27 日本电信电话株式会社 Quantization control method, device, program, and recording medium containing the program
JPWO2008111454A1 (en) * 2007-03-14 2010-06-24 日本電信電話株式会社 Quantization control method and apparatus, program thereof, and recording medium recording program
US8265142B2 (en) 2007-03-14 2012-09-11 Nippon Telegraph And Telephone Corporation Encoding bit-rate control method and apparatus, program therefor, and storage medium which stores the program
WO2008111454A1 (en) * 2007-03-14 2008-09-18 Nippon Telegraph And Telephone Corporation Quantization control method, device, program, and recording medium containing the program
JP5197574B2 (en) * 2007-03-14 2013-05-15 日本電信電話株式会社 Quantization control method and apparatus, program thereof, and recording medium recording program
US9161042B2 (en) 2007-03-14 2015-10-13 Nippon Telegraph And Telephone Corporation Quantization control method and apparatus, program therefor, and storage medium which stores the program
US9455739B2 (en) 2007-03-14 2016-09-27 Nippon Telegraph And Telephone Corporation Code amount estimating method and apparatus, and program and storage medium therefor
WO2014030485A1 (en) * 2012-08-24 2014-02-27 富士フイルム株式会社 Image compression device, operation control method therefor, and operation program therefor
JP5947384B2 (en) * 2012-08-24 2016-07-06 富士フイルム株式会社 Image compression apparatus, operation control method thereof, and operation program thereof
CN111279697A (en) * 2019-01-25 2020-06-12 深圳市大疆创新科技有限公司 Code rate allocation method and device

Similar Documents

Publication Publication Date Title
KR100756596B1 (en) Video data encoder and video data encoding method
KR100343352B1 (en) Two-pass encoding method of digital motion video sequences for constant-or variable bit rate
KR960007264B1 (en) Motion video compression system
US6834080B1 (en) Video encoding method and video encoding apparatus
JP2005065291A (en) Method of controlling encoding rate of video encoder, method of transmitting video data, encoding rate controller for video encoder, and video data transmission system
JPH10302396A (en) Signal coding method, signal coding device, signal recording medium, and signal transmitting method
JP2003018603A (en) Method and device for encoding moving image
JP2001008215A (en) Dynamic image encoder and method therefor
KR20000023504A (en) Variable bit rate coding apparatus
JP2000261799A (en) Variable rate moving image encoding device
JP4081727B2 (en) Image encoding apparatus, image encoding method, recording apparatus, and recording method
JP3815665B2 (en) Variable bit rate video encoding apparatus and recording medium
JP4362794B2 (en) Video encoding apparatus and method
JPH11275577A (en) Video signal coding method and system
JP4362793B2 (en) Video encoding apparatus and method
JP4364350B2 (en) Variable rate video encoding device
JP3888533B2 (en) Image coding apparatus according to image characteristics
JP3152148B2 (en) Image coding device
JP2000261809A (en) Image coder coping with feature of picture
JP3149673B2 (en) Video encoding device, video encoding method, video reproducing device, and optical disc
JPH11346365A (en) Encoding/compression method and device
JP4399794B2 (en) Image coding apparatus and image coding method
JP2000115786A (en) Coder, recorder and coding method
JPH10108197A (en) Image coder, image coding control method, and medium storing image coding control program
JP3767007B2 (en) Encoding apparatus and encoding method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060606