JPH114445A - Image coder and its method - Google Patents

Image coder and its method

Info

Publication number
JPH114445A
JPH114445A JP15367197A JP15367197A JPH114445A JP H114445 A JPH114445 A JP H114445A JP 15367197 A JP15367197 A JP 15367197A JP 15367197 A JP15367197 A JP 15367197A JP H114445 A JPH114445 A JP H114445A
Authority
JP
Japan
Prior art keywords
code amount
target code
image
encoding
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP15367197A
Other languages
Japanese (ja)
Inventor
Goro Kato
吾郎 加藤
Masami Nakagawa
昌巳 中川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP15367197A priority Critical patent/JPH114445A/en
Publication of JPH114445A publication Critical patent/JPH114445A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To code image data by changing over any of plural video sources, without destroying a video buffering verify VBV buffer. SOLUTION: After coding for 1st path by an image coder 10, a host computer 1 decides an object code quantity for each image, so that a VBV buffer is not defective through the changeover of any of plural video sources, while simulating the VBV buffer and the image coder 10 conducts 2nd path coding according to the object code quantity. The image coder 10 corrects an object code quantity, so that the generated code quantity is lower than the object code quantity given by the host computer 1 and conducts coding processing according to the object code quantity after the correction.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像データを符号
化する画像符号化装置および方法に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to an image encoding apparatus and method for encoding image data.

【0002】[0002]

【従来の技術】近年、大容量のディジタルデータを記録
可能な光ディスクであるDVD(ディジタル・バーサタ
イル・ディスクまたはディジタル・ビデオ・ディスク)
が実用化されている。DVDのうち、ビデオデータ等を
記録するDVDビデオでは、MPEG(Moving Picture
Experts Group)2規格で圧縮された画像データを記録
するようになっている。
2. Description of the Related Art In recent years, a DVD (digital versatile disk or digital video disk) which is an optical disk capable of recording a large amount of digital data.
Has been put to practical use. Among DVDs, a DVD video recording video data and the like is an MPEG (Moving Picture).
Experts Group 2) is recorded.

【0003】MPEG2規格では、符号化方式として双
方向予測符号化方式が採用されている。この双方向予測
符号化方式では、フレーム内符号化、フレーム間順方向
予測符号化および双方向予測符号化の3つのタイプの符
号化が行われ、各符号化タイプによる画像は、それぞれ
Iピクチャ(intra coded picture )、Pピクチャ(pr
edictive coded picture)およびBピクチャ(bidirect
ionally predictive coded picture)と呼ばれる。ま
た、I,P,Bの各ピクチャを適切に組わあせて、ラン
ダムアクセスの単位となるGOP(Group of Picture)
が構成される。
[0003] In the MPEG2 standard, a bidirectional predictive coding method is adopted as a coding method. In this bidirectional predictive coding method, three types of coding are performed: intra-frame coding, inter-frame forward predictive coding, and bidirectional predictive coding. An image of each coding type is an I picture ( intra coded picture), P picture (pr
edictive coded picture) and B picture (bidirect
Ionally predictive coded picture). Also, a GOP (Group of Picture) serving as a unit of random access is obtained by appropriately assembling the I, P, and B pictures.
Is configured.

【0004】MPEG規格のようにピクチャ毎にビット
発生量が異なる符号化方法では、得られるビットストリ
ームを適切に伝送、復号して画像を得るためには、画像
復号化装置における入力バッファ内のデータ占有量を、
画像符号化装置側で把握していなければならない。そこ
で、MPEG規格では、画像復号化装置における入力バ
ッファに対応する仮想的なバッファであるVBV(Vi
deo Buffering Verifier)バッ
ファを想定し、画像符号化装置側では、VBVバッファ
を破綻、つまりアンダフローやオーバフローさせないよ
うに、ストリームを生成しなければならないようになっ
ている。以上のことは、圧縮符号化された放送素材を伝
送するDVB(ディジタル・ビデオ・ブロードキャス
ト)システムにおいても同様である。
In an encoding method such as the MPEG standard, in which the bit generation amount differs for each picture, in order to appropriately transmit and decode the obtained bit stream to obtain an image, data in an input buffer in an image decoding apparatus is required. Occupancy,
The information must be known on the image encoding device side. Therefore, according to the MPEG standard, VBV (Vi) is a virtual buffer corresponding to an input buffer in an image decoding device.
Assuming a video buffer (de-buffering verifier) buffer, the image encoding device must generate a stream so that the VBV buffer does not break down, that is, does not cause underflow or overflow. The same applies to a DVB (Digital Video Broadcast) system for transmitting compression-coded broadcast material.

【0005】[0005]

【発明が解決しようとする課題】ところで、DVDで
は、シームレス(継ぎ目なし)に、異なる撮影方向から
の複数の画像のいずれかを選択的に再生可能とするマル
チアングル機能が用意されている。また、DVBシステ
ムにおいては、本編の放送素材中に、コマーシャル映像
(以下、CMと記す。)を挿入して、伝送する場合があ
る。このようなマルチアングル機能やCM挿入を実現す
るには、複数の映像素材に対応する複数のストリームを
切り替える必要がある。ところが、この場合、複数のス
トリームの各々はVBVバッファを破綻させずに符号化
されていたとしても、ストリームの接続の仕方によって
は、VBVバッファを破綻させる場合があるという問題
点があった。
By the way, the DVD is provided with a multi-angle function which enables any one of a plurality of images from different photographing directions to be selectively reproduced seamlessly (without seams). In a DVB system, commercial video (hereinafter, referred to as CM) may be inserted into the main broadcast material and transmitted. In order to realize such a multi-angle function and CM insertion, it is necessary to switch a plurality of streams corresponding to a plurality of video materials. However, in this case, even if each of the plurality of streams is encoded without breaking the VBV buffer, there is a problem that the VBV buffer may break down depending on how the streams are connected.

【0006】上記問題点について、図7を参照して詳し
く説明する。図7(a)は、ある映像素材に対応するス
トリームAのVBVバッファのデータ占有量(以下、V
BVバッファ占有量と言う。)の変化の一例を表したも
のであり、図7(b)は、他の映像素材に対応するスト
リームBのVBVバッファ占有量の変化の一例を表した
ものである。このようなストリームAとストリームB
を、接続点(以下、スプライス点と言う。)SPにおい
て接続した場合には、接続後に、図7(c)に示したよ
うにVBVバッファがアンダフローしたり、逆にオーバ
フローしたりする場合がある。
The above problem will be described in detail with reference to FIG. FIG. 7A shows the data occupancy of the VBV buffer of stream A corresponding to a certain video material (hereinafter referred to as V
It is called the BV buffer occupancy. FIG. 7B illustrates an example of a change in the VBV buffer occupancy of the stream B corresponding to another video material. Such a stream A and a stream B
Is connected at a connection point (hereinafter, referred to as a splice point) SP, after connection, the VBV buffer may underflow or may overflow as shown in FIG. 7C. is there.

【0007】本発明はかかる問題点に鑑みてなされたも
ので、その目的は、復号化装置側の入力バッファに対応
する仮想的バッファを破綻させずに複数の映像素材を切
り替え可能となるように、画像データを符号化すること
ができるようにした画像符号化装置および方法を提供す
ることにある。
The present invention has been made in view of such a problem, and an object of the present invention is to make it possible to switch a plurality of video materials without breaking a virtual buffer corresponding to an input buffer on the decoding device side. It is another object of the present invention to provide an image encoding apparatus and method capable of encoding image data.

【0008】[0008]

【課題を解決するための手段】請求項1記載の画像符号
化装置は、目標符号量に応じて条件を変えて、入力画像
データを符号化する符号化手段と、画像符号化装置によ
って符号化された画像データを復号化する画像復号化装
置側の入力バッファに対応する仮想的バッファに関し
て、他の映像素材との切り替え点以後については、切り
替え点における仮想的バッファのデータ占有量を一定値
とし、切り替え点に達する際には、映像素材の切り替え
によって仮想的バッファが破綻しないように、切り替え
点における仮想的バッファのデータ占有量が一定値に対
して所定の関係を有する値となるように目標符号量が与
えられ、切り替え点に達する際に、切り替え点における
仮想的バッファのデータ占有量が一定値に対して所定の
関係を有する値となるように、符号化手段による発生符
号量に応じて、与えられた目標符号量を修正して、修正
後の目標符号量に従って、符号化手段を制御する符号化
制御手段とを備えたものである。
According to a first aspect of the present invention, there is provided an image coding apparatus, comprising: coding means for coding input image data by changing conditions according to a target code amount; With respect to the virtual buffer corresponding to the input buffer of the image decoding device that decodes the decoded image data, the data occupancy of the virtual buffer at the switching point is set to a fixed value after the switching point with another video material. When the switching point is reached, the data occupancy of the virtual buffer at the switching point is set to a value having a predetermined relationship with a constant value so that the virtual buffer does not break down due to the switching of the video material. When the code amount is given and the switching point is reached, the data occupancy of the virtual buffer at the switching point becomes a value having a predetermined relationship with a certain value. As described above, the apparatus further comprises coding control means for correcting the given target code amount in accordance with the code amount generated by the coding means and controlling the coding means in accordance with the corrected target code amount. .

【0009】請求項6記載の画像符号化方法は、符号化
された画像データを復号化する画像復号化装置側の入力
バッファに対応する仮想的バッファに関して、他の映像
素材との切り替え点以後については、切り替え点におけ
る仮想的バッファのデータ占有量を一定値とし、切り替
え点に達する際には、映像素材の切り替えによって仮想
的バッファが破綻しないように、切り替え点における仮
想的バッファのデータ占有量が一定値に対して所定の関
係を有する値となるように目標符号量が与えられ、切り
替え点に達する際に、切り替え点における仮想的バッフ
ァのデータ占有量が一定値に対して所定の関係を有する
値となるように、発生符号量に応じて、与えられた目標
符号量を修正する目標符号量修正手順と、この目標符号
量修正手順による修正後の目標符号量に応じて条件を変
えて、入力画像データを符号化する符号化手順とを含む
ものである。
According to a sixth aspect of the present invention, there is provided an image encoding method for a virtual buffer corresponding to an input buffer of an image decoding apparatus for decoding encoded image data after a switching point with another image material. Is a fixed value for the data occupancy of the virtual buffer at the switching point, and when the switching point is reached, the data occupancy of the virtual buffer at the switching point is set so that the virtual buffer does not break down due to the switching of the video material. A target code amount is given so as to be a value having a predetermined relationship with a constant value, and when reaching a switching point, the data occupancy of the virtual buffer at the switching point has a predetermined relationship with the constant value. A target code amount correction procedure for correcting a given target code amount according to the generated code amount so as to be a value, and a target code amount correction procedure. Under different conditions in accordance with the target code amount after the positive, the input image data is intended to include a coding procedure of coding.

【0010】請求項1記載の画像符号化装置では、符号
化制御手段に対して、他の映像素材との切り替え点以後
については、切り替え点における仮想的バッファのデー
タ占有量を一定値とし、切り替え点に達する際には、切
り替え点における仮想的バッファのデータ占有量が一定
値に対して所定の関係を有する値となるように目標符号
量が与えられ、この符号化制御手段によって、切り替え
点に達する際に、切り替え点における仮想的バッファの
データ占有量が一定値に対して所定の関係を有する値と
なるように、符号化手段による発生符号量に応じて、与
えられた目標符号量が修正され、修正後の目標符号量に
従って符号化手段が制御され、符号化手段によって、修
正後の目標符号量に応じて条件を変えて、入力画像デー
タが符号化される。
In the image encoding apparatus according to the first aspect, the encoding control means sets the data occupancy of the virtual buffer at the switching point to a fixed value after the switching point with another video material, and When the point is reached, a target code amount is given so that the data occupancy of the virtual buffer at the switching point has a value having a predetermined relationship with a constant value. At this time, the given target code amount is modified according to the code amount generated by the encoding means so that the data occupancy amount of the virtual buffer at the switching point has a value having a predetermined relationship with a fixed value. The encoding means is controlled in accordance with the corrected target code amount, and the encoding means encodes the input image data by changing conditions according to the corrected target code amount.

【0011】請求項6記載の画像符号化方法では、目標
符号量修正手順によって、他の映像素材との切り替え点
以後については、切り替え点における仮想的バッファの
データ占有量を一定値とし、切り替え点に達する際に
は、切り替え点における仮想的バッファのデータ占有量
が一定値に対して所定の関係を有する値となるように目
標符号量が与えられ、切り替え点に達する際に、切り替
え点における仮想的バッファのデータ占有量が一定値に
対して所定の関係を有する値となるように、発生符号量
に応じて、与えられた目標符号量が修正され、符号化手
順によって、修正後の目標符号量に応じて条件を変え
て、入力画像データが符号化される。
According to the image coding method of the present invention, the data occupancy of the virtual buffer at the switching point is set to a constant value after the switching point with another video material by the target code amount correction procedure, Is reached, the target code amount is given so that the data occupancy of the virtual buffer at the switching point has a value having a predetermined relationship to a certain value. The given target code amount is modified in accordance with the generated code amount so that the data occupancy of the dynamic buffer becomes a value having a predetermined relationship with a fixed value. The input image data is encoded by changing the conditions according to the amount.

【0012】[0012]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して詳細に説明する。図1は、本発明の一
実施の形態に係る画像符号化装置の概略の構成を示すブ
ロック図である。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of an image encoding device according to one embodiment of the present invention.

【0013】本実施の形態に係る画像符号化装置10
は、入力画像データS1 を入力し、圧縮符号化のための
前処理等を行うエンコーダ制御部11と、このエンコー
ダ制御部11の出力データを入力し、ピクチャ毎にピク
チャタイプに応じた符号化方法によって圧縮符号化し
て、圧縮画像データS2 を出力する符号化手段としての
エンコーダ13と、エンコーダ制御部11の出力データ
に基づいて動きベクトルを検出し、エンコーダ13に送
る動き検出回路14と、エンコーダ制御部11から出力
されるイントラACデータS3 と動き検出回路14から
出力されるME残差データS4 とエンコーダ13から出
力される発生ビット量データS5 とを入力し、エンコー
ダ13を制御する符号化制御手段としての符号化制御部
15とを備えている。画像符号化装置10には、ホスト
コンピュータ1が接続されるようになっている。
Image coding apparatus 10 according to the present embodiment
Receives an input image data S 1 , performs an encoder control unit 11 for performing pre-processing for compression encoding and the like, and receives an output data of the encoder control unit 11 and performs encoding according to a picture type for each picture. An encoder 13 serving as an encoding unit that outputs the compressed image data S 2 by performing compression encoding by a method; a motion detection circuit 14 that detects a motion vector based on output data of the encoder control unit 11 and sends the motion vector to the encoder 13; The encoder 13 is controlled by inputting the intra AC data S 3 output from the encoder control unit 11, the ME residual data S 4 output from the motion detection circuit 14, and the generated bit amount data S 5 output from the encoder 13. And an encoding control unit 15 as encoding control means for performing the encoding. The host computer 1 is connected to the image encoding device 10.

【0014】なお、イントラACとは、Iピクチャにお
いて、8×8画素のDCT(離散コサイン変換)ブロッ
ク内の各画素の画素値とDCTブロック内の画素値の平
均値との差分の絶対値の総和として定義され、絵柄の複
雑さを表すものと言える。イントラACデータS3 は、
このイントラACを表すデータである。また、ME残差
とは、簡単に言うと、動き予測誤差をピクチャ全体につ
いて絶対値和あるいは自乗和したものであり、ME残差
データS4 は、ME残差を求めるためのデータであり、
後で詳しく説明する。
Intra-AC refers to the absolute value of the difference between the pixel value of each pixel in an 8 × 8 pixel DCT (discrete cosine transform) block and the average value of the pixel values in the DCT block in an I picture. It is defined as a sum and can be said to represent the complexity of the picture. Intra AC data S 3
This is data representing the intra AC. The ME residual is simply the sum of the absolute value or the square of the motion prediction error for the entire picture, and the ME residual data S 4 is data for calculating the ME residual.
This will be described in detail later.

【0015】符号化制御部15は、互いにバス19を介
して接続されたCPU(中央処理装置)16,ROM
(リード・オンリ・メモリ)17およびRAM(ランダ
ム・アクセス・メモリ)18を有するコンピュータによ
って構成され、CPU16が、RAM18をワーキング
エリアとして、ROM17に格納された画像符号化制御
用プログラムを実行することによって、後述する符号化
制御部15における各機能を実現するようになってい
る。ROM17は、IC(集積回路)でもよいし、IC
カードでもよいし、ハードディスク,フロッピィディス
ク等の磁気ディスクを記録媒体とする記憶装置でもよい
し、CD(コンパクトディスク)−ROM等の光ディス
クを記録媒体とする記憶装置でもよいし、その他の種類
の記録媒体を用いる記憶装置でもよい。
An encoding control unit 15 includes a CPU (central processing unit) 16 and a ROM connected to each other via a bus 19.
(Read-only memory) 17 and a computer having a RAM (random access memory) 18. The CPU 16 executes the image encoding control program stored in the ROM 17 using the RAM 18 as a working area. The functions of the encoding control unit 15 described below are realized. The ROM 17 may be an IC (integrated circuit) or an IC
It may be a card, a storage device using a magnetic disk such as a hard disk or a floppy disk as a recording medium, a storage device using an optical disk such as a CD (compact disk) -ROM as a recording medium, or other types of recording. A storage device using a medium may be used.

【0016】ホストコンピュータ1は、符号化制御部1
5のCPU16より発生ビット量データS5 と符号化難
易度データS6 とを受け、CPU16に対して目標符号
量データS7 を送るようになっている。
The host computer 1 includes an encoding control unit 1
The CPU 16 receives the generated bit amount data S 5 and the encoding difficulty data S 6 from the CPU 16 and sends the target code amount data S 7 to the CPU 16.

【0017】図2は、図1に示した画像符号化装置10
の詳細な構成を示すブロック図である。この図に示した
ように、エンコーダ制御部11は、入力画像データS1
を入力し、符号化する順番に従ってピクチャ(Iピクチ
ャ,Pピクチャ,Bピクチャ)の順番を並べ替える画像
並べ替え回路21と、この画像並べ替え回路21の出力
データを入力し、フレーム構造かフィールド構造かを判
別し、判別結果に応じた走査変換および16×16画素
のマクロブロック化を行う走査変換・マクロブロック化
回路22と、この走査変換・マクロブロック化回路22
の出力データを入力し、IピクチャにおけるイントラA
Cを算出し、イントラACデータS3 を符号化制御部1
5に送ると共に、走査変換・マクロブロック化回路22
の出力データをエンコーダ13および動き検出回路14
に送るイントラAC演算回路23とを備えている。
FIG. 2 shows the image encoding apparatus 10 shown in FIG.
FIG. 3 is a block diagram showing a detailed configuration. As shown in this figure, the encoder controller 11 controls the input image data S 1
And an image rearranging circuit 21 for rearranging the order of pictures (I picture, P picture, and B picture) in accordance with the encoding order, and inputting output data of the image rearranging circuit 21 to input a frame structure or a field structure. A scan conversion / macroblock conversion circuit 22 for performing scan conversion and macroblock formation of 16 × 16 pixels according to the determination result;
Is input, and intra A
C is calculated, and the intra AC data S 3 is
5 and a scan conversion / macroblock conversion circuit 22
Output data from the encoder 13 and the motion detection circuit 14
And an intra AC operation circuit 23 for sending the data to the computer.

【0018】エンコーダ13は、エンコーダ制御部11
の出力データと予測画像データとの差分をとる減算回路
31と、この減算回路31の出力データに対して、DC
Tブロック単位でDCTを行い、DCT係数を出力する
DCT回路32と、このDCT回路32の出力データを
量子化する量子化回路33と、この量子化回路33の出
力データを可変長符号化する可変長符号化回路34と、
この可変長符号化回路34の出力データを一旦保持し、
ビットストリームからなる圧縮画像データS2として出
力するバッファメモリ35と、量子化回路33の出力デ
ータを逆量子化する逆量子化回路36と、この逆量子化
回路36の出力データに対して逆DCTを行う逆DCT
回路37と、この逆DCT回路37の出力データと予測
画像データとを加算して出力する加算回路38と、この
加算回路38の出力データを保持し、動き検出回路14
から送られる動きベクトルに応じて動き補償を行って予
測画像データを減算回路31および加算回路38に出力
する動き補償回路39とを備えている。バッファメモリ
35は、可変長符号化回路34より発生されるビット量
を表す発生ビット量データS5 を符号化制御部15に送
るようになっている。
The encoder 13 includes an encoder control unit 11
A subtraction circuit 31 for obtaining a difference between the output data of the subtraction circuit and the predicted image data.
A DCT circuit 32 that performs DCT in units of T blocks and outputs DCT coefficients, a quantization circuit 33 that quantizes output data of the DCT circuit 32, and a variable circuit that performs variable length encoding of output data of the quantization circuit 33. A long encoding circuit 34;
The output data of the variable length encoding circuit 34 is temporarily held,
A buffer memory 35 to output as compressed image data S 2 made from the bitstream, an inverse quantization circuit 36 for inversely quantizing the output data of the quantization circuit 33, inverse DCT on the output data of the inverse quantization circuit 36 Inverse DCT
Circuit 37, an addition circuit 38 for adding the output data of the inverse DCT circuit 37 and the prediction image data and outputting the added data, and holding the output data of the addition circuit 38,
And a motion compensation circuit 39 that performs motion compensation in accordance with the motion vector sent from the controller and outputs predicted image data to the subtraction circuit 31 and the addition circuit 38. The buffer memory 35 sends generated bit amount data S 5 representing the bit amount generated by the variable length coding circuit 34 to the coding control unit 15.

【0019】動き検出回路14は、エンコーダ制御部1
1の出力データに基づいて、圧縮符号化の対象となるピ
クチャの注目マクロブロックと、参照されるピクチャに
おいて注目マクロブロックとの間の画素値の差分の絶対
値和あるいは自乗和が最小となるマクロブロックを探し
て、動きベクトルを検出して動き補償回路39に送るよ
うになっている。また、動き検出回路14は、動きベク
トルを求める際に、最小となったマクロブロック間にお
ける画素値の差分の絶対値和あるいは自乗和を、ME残
差データS4 として符号化制御部15に送るようになっ
ている。
The motion detection circuit 14 includes the encoder control unit 1
1 is a macro that minimizes the sum of absolute values or the sum of squares of pixel value differences between the macroblock of interest of the picture to be compression-encoded and the macroblock of interest in the referenced picture based on the output data of A block is searched, a motion vector is detected, and sent to the motion compensation circuit 39. The motion detecting circuit 14 sends when obtaining the motion vector, the absolute value sum or square sum of differences of pixel values between the minimum and since macroblock, the encoding control unit 15 as the ME residual data S 4 It has become.

【0020】符号化制御部15は、動き検出回路14か
らのME残差データS4 をピクチャ全体について足し合
わせた値であるME残差を算出するME残差計算部41
と、このME残差計算部41によって算出されたME残
差とイントラAC演算回路23からのイントラACデー
タS3 とに基づいて、ピクチャの符号化の難易度を表す
符号化難易度を算出し、符号化難易度データS6 をホス
トコンピュータ1に送る符号化難易度計算部42と、バ
ッファメモリ35からの発生ビット量データS5 に基づ
いて、ホストコンピュータ1からの目標符号量データS
7 によって与えられる目標符号量を修正する目標符号量
修正部44と、エンコーダ13における発生符号量が目
標符号量修正部44によって修正された後の目標符号量
となるように量子化回路33における量子化特性値に対
応する量子化インデックスを決定し、量子化回路33に
送る量子化インデックス決定部45とを備えている。
The encoding control unit 15 calculates an ME residual value which is a value obtained by adding the ME residual data S 4 from the motion detecting circuit 14 for the entire picture.
Based on the ME residual calculated by the ME residual calculator 41 and the intra AC data S 3 from the intra AC operation circuit 23, an encoding difficulty indicating the encoding difficulty of the picture is calculated. , The encoding difficulty level calculating unit 42 that sends the encoding difficulty level data S 6 to the host computer 1, and the target bit rate data S 5 from the host computer 1 based on the generated bit rate data S 5 from the buffer memory 35.
7 , and a quantizer 33 in the quantization circuit 33 so that the generated code amount in the encoder 13 becomes the target code amount after being corrected by the target code amount corrector 44. A quantization index determination unit for determining a quantization index corresponding to the quantization characteristic value and sending the quantization index to the quantization circuit.

【0021】ここで、符号化難易度について説明する。
符号化難易度は、ピクチャの符号化の難易度を表すもの
であるが、これは、同じ画質を保つために必要なデータ
量の比率と言い換えることができる。符号化難易度を数
値化する方法は種々考えられるが、本実施の形態では、
IピクチャについてはイントラACを用いて符号化難易
度を求め、PピクチャおよびBピクチャについてはME
残差を用いて符号化難易度を求めることとしている。前
述のように、イントラACは絵柄の複雑さを表し、ME
残差は映像の動きの速さおよび絵柄の複雑さを表し、こ
れらは符号化の難易度と強い相関があることから、イン
トラACやME残差を変数とする一次関数等により、イ
ントラACやME残差から符号化難易度を算出すること
が可能である。
Here, the encoding difficulty will be described.
The encoding difficulty represents the difficulty of encoding a picture, which can be rephrased as a ratio of the amount of data required to maintain the same image quality. There are various methods for digitizing the encoding difficulty, but in the present embodiment,
For I-pictures, the coding difficulty is obtained using intra AC, and for P-pictures and B-pictures, ME
The encoding difficulty is determined using the residual. As described above, the intra AC represents the complexity of the picture, and the ME
The residual indicates the speed of movement of the video and the complexity of the picture, and since these have a strong correlation with the difficulty of encoding, the intra AC and the linear function using the ME residual as a variable, etc. It is possible to calculate the encoding difficulty from the ME residual.

【0022】次に、本実施の形態に係る画像符号化装置
の動作について説明する。なお、以下の説明は、本実施
の形態に係る画像符号化方法の説明を兼ねている。
Next, the operation of the image coding apparatus according to this embodiment will be described. The following description also serves as a description of the image encoding method according to the present embodiment.

【0023】始めに、画像符号化装置10の基本的な動
作について説明する。入力画像信号S1 は、まず、エン
コーダ制御部11の画像並べ替え回路21に入力され
る。画像並べ替え回路21は、符号化する順番に従って
ピクチャの順番を並べ替える。画像並べ替え回路21の
出力画像データは、走査変換・マクロブロック化回路2
2に入力される。走査変換・マクロブロック化回路22
は、フレーム構造かフィールド構造かを判別し、判別結
果に応じた走査変換およびマクロブロック化を行う。走
査変換・マクロブロック化回路22の出力データは、イ
ントラAC演算回路23に入力される。イントラAC演
算回路23は、Iピクチャの場合には、イントラACを
算出してイントラACデータS3 を符号化制御部15に
送る。また、走査変換・マクロブロック化回路22の出
力データは、イントラAC演算回路23を経て、エンコ
ーダ13および動き検出回路14に送られる。
First, the basic operation of the image encoding device 10 will be described. First, the input image signal S 1 is input to the image rearranging circuit 21 of the encoder control unit 11. The image rearranging circuit 21 rearranges the order of pictures according to the order of encoding. The output image data of the image rearranging circuit 21 is supplied to a scan conversion / macroblocking circuit 2
2 is input. Scan conversion / macroblock circuit 22
Discriminates between a frame structure and a field structure, and performs scan conversion and macroblock conversion according to the discrimination result. The output data of the scan conversion / macroblock conversion circuit 22 is input to the intra AC operation circuit 23. In the case of an I picture, the intra AC operation circuit 23 calculates an intra AC and sends the intra AC data S 3 to the encoding control unit 15. The output data of the scan conversion / macroblock conversion circuit 22 is sent to the encoder 13 and the motion detection circuit 14 via the intra AC operation circuit 23.

【0024】Iピクチャの場合には、エンコーダ13で
は、減算回路31において予測画像データとの差分をと
ることなく、エンコーダ制御部11の出力データをその
ままDCT回路32に入力してDCTを行い、量子化回
路33によってDCT係数を量子化し、可変長符号化回
路34によって量子化回路33の出力データを可変長符
号化し、バッファメモリ35によって可変長符号化回路
34の出力データを一旦保持し、圧縮画像データS2
して出力する。また、逆量子化回路36によって量子化
回路33の出力データを逆量子化し、逆DCT回路37
によって逆量子化回路36の出力データに対して逆DC
Tを行い、逆DCT回路37の出力画像データを加算回
路38を介して動き補償回路39に入力して保持させ
る。
In the case of an I picture, the encoder 13 directly inputs the output data of the encoder control unit 11 to the DCT circuit 32 to perform DCT without making a difference from the predicted image data in the subtraction circuit 31 to perform DCT. The DCT coefficient is quantized by the quantization circuit 33, the output data of the quantization circuit 33 is variable-length encoded by the variable length encoding circuit 34, and the output data of the variable length encoding circuit 34 is temporarily held by the buffer memory 35, and the compressed image and outputs it as the data S 2. Further, the output data of the quantization circuit 33 is inversely quantized by the inverse quantization circuit 36, and the inverse DCT circuit 37
Inverse DC with respect to the output data of the inverse quantization circuit 36
T is performed, and the output image data of the inverse DCT circuit 37 is input to the motion compensation circuit 39 via the addition circuit 38 and held.

【0025】Pピクチャの場合には、エンコーダ13で
は、動き補償回路39によって、保持している過去のI
ピクチャまたはPピクチャに対応する画像データと動き
検出回路14からの動きベクトルとに基づいて予測画像
データを生成し、予測画像データを減算回路31および
加算回路38に出力する。また、減算回路31によっ
て、エンコーダ制御部11の出力データと動き補償回路
39からの予測画像データとの差分をとり、DCT回路
32によってDCTを行い、量子化回路33によってD
CT係数を量子化し、可変長符号化回路34によって量
子化回路33の出力データを可変長符号化し、バッファ
メモリ35によって可変長符号化回路34の出力データ
を一旦保持し圧縮画像データS2 として出力する。ま
た、逆量子化回路36によって量子化回路33の出力デ
ータを逆量子化し、逆DCT回路37によって逆量子化
回路36の出力データに対して逆DCTを行い、加算回
路38によって逆DCT回路37の出力データと予測画
像データとを加算し、動き補償回路39に入力して保持
させる。
In the case of a P picture, the encoder 13 in the encoder 13 stores the past I
It generates predicted image data based on the image data corresponding to the picture or the P picture and the motion vector from the motion detection circuit, and outputs the predicted image data to the subtraction circuit 31 and the addition circuit. Further, the difference between the output data of the encoder control unit 11 and the predicted image data from the motion compensation circuit 39 is calculated by the subtraction circuit 31, DCT is performed by the DCT circuit 32, and DT is performed by the quantization circuit 33.
The CT coefficients quantizes the output data of the quantization circuit 33 by the variable-length coding circuit 34 variable-length coding, as to temporarily holds the output data of the variable length coding circuit 34 by the buffer memory 35 the compressed image data S 2 I do. Further, the output data of the quantization circuit 33 is inversely quantized by the inverse quantization circuit 36, inverse DCT is performed on the output data of the inverse quantization circuit 36 by the inverse DCT circuit 37, and the inverse DCT circuit 37 The output data and the predicted image data are added and input to the motion compensation circuit 39 to be held.

【0026】Bピクチャの場合には、エンコーダ13で
は、動き補償回路39によって、保持している過去およ
び未来のIピクチャまたはPピクチャに対応する2つの
画像データと動き検出回路14からの2つの動きベクト
ルとに基づいて予測画像データを生成し、予測画像デー
タを減算回路31および加算回路38に出力する。ま
た、減算回路31によって、エンコーダ制御部11の出
力データと動き補償回路39からの予測画像データとの
差分をとり、DCT回路32によってDCTを行い、量
子化回路33によってDCT係数を量子化し、可変長符
号化回路34によって量子化回路33の出力データを可
変長符号化し、バッファメモリ35によって可変長符号
化回路34の出力データを一旦保持し圧縮画像データS
2 として出力する。なお、Bピクチャは動き補償回路3
9に保持させない。
In the case of a B picture, the encoder 13 uses the motion compensation circuit 39 to store two pieces of image data corresponding to the past and future I pictures or P pictures and the two motions from the motion detection circuit 14. It generates predicted image data based on the vector and outputs the predicted image data to the subtraction circuit 31 and the addition circuit. Further, the difference between the output data of the encoder control unit 11 and the predicted image data from the motion compensation circuit 39 is calculated by the subtraction circuit 31, the DCT is performed by the DCT circuit 32, and the DCT coefficient is quantized by the quantization circuit 33, and The output data of the quantization circuit 33 is subjected to variable length encoding by the long encoding circuit 34, and the output data of the variable length encoding circuit 34 is temporarily held by the buffer memory 35, and the compressed image data S
Output as 2 . Note that the B picture is the motion compensation circuit 3
9 is not held.

【0027】なお、バッファメモリ35は、可変長符号
化回路34より発生されるビット量を表す発生ビット量
データS5 を符号化制御部15に送る。
The buffer memory 35 sends the generated bit amount data S 5 representing the bit amount generated by the variable length coding circuit 34 to the coding control unit 15.

【0028】符号化制御部15は、発生ビット量データ
5 をホストコンピュータ1に送ると共に、後述する1
パス目の符号化においては、符号化難易度計算部42に
よって符号化難易度を算出し、この符号化難易度を表す
符号化難易度データS6 をホストコンピュータ1に送
る。また、符号化制御部15は、後述する2パス目の符
号化においては、目標符号量修正部44によって、ホス
トコンピュータ1より目標符号量データS7 として与え
られる目標符号量を修正し、量子化インデックス決定部
45によって、エンコーダ13における発生符号量が目
標符号量修正部44によって修正された後の目標符号量
となるように量子化回路33における量子化特性値に対
応する量子化インデックスを決定し、量子化回路33に
送る。
The encoding control unit 15, and sends the generated bit amount data S 5 to the host computer 1 will be described later 1
In the coding of the pass, the coding difficulty calculator 42 calculates the coding difficulty, and sends the coding difficulty data S 6 representing the coding difficulty to the host computer 1. The encoding control unit 15, the encoding of the second pass to be described later, by the target code amount correcting unit 44 corrects the target code amount given as the target code amount data S 7 from the host computer 1, quantization The index determination unit 45 determines a quantization index corresponding to the quantization characteristic value in the quantization circuit 33 so that the generated code amount in the encoder 13 becomes the target code amount after being corrected by the target code amount correction unit 44. , To the quantization circuit 33.

【0029】本実施の形態に係る画像符号化装置10
は、固定レート方式の符号化と可変レート方式の符号化
の双方に適用可能である。DVDのような蓄積メディア
に記録するデータの符号化では、可変レート方式を採用
する。固定レート方式の符号化では、VBVバッファを
破綻、つまりアンダフローやオーバフローさせないよう
に符号化を行う。これに対し、可変レート方式の符号化
では、VBVバッファへのデータ送信を最大レートで行
い、VBVバッファが満たされている場合は送信を停止
することができる。図3は、可変レート方式の符号化に
おけるVBVバッファ占有量の変化の一例を示したもの
である。この図に示したように、可変レート方式の符号
化の場合、VBVバッファが満たされている場合は送信
を停止することができるので、固定レート方式の場合と
異なり、符号51で示したようなオーバフローは発生し
ない。しかし、発生符号量が目標符号量以上となってし
まった場合には、固定レート方式の場合と同様に、VB
Vバッファのアンダフローは発生する。
Image coding apparatus 10 according to the present embodiment
Is applicable to both fixed rate coding and variable rate coding. In encoding data to be recorded on a storage medium such as a DVD, a variable rate method is adopted. In the fixed-rate encoding, encoding is performed so that the VBV buffer does not break down, that is, does not cause underflow or overflow. In contrast, in variable rate coding, data transmission to the VBV buffer is performed at the maximum rate, and transmission can be stopped when the VBV buffer is full. FIG. 3 shows an example of a change in VBV buffer occupancy in variable rate coding. As shown in this figure, in the case of the coding of the variable rate method, the transmission can be stopped when the VBV buffer is full. No overflow occurs. However, when the generated code amount becomes equal to or larger than the target code amount, as in the case of the fixed rate method, VB
An underflow of the V buffer occurs.

【0030】本実施の形態では、DVDにおけるマルチ
アングル機能やDVBにおけるCM挿入を実現するため
に、画像符号化装置10を用いて、他の映像素材と切り
替え可能な映像素材に対応する画像データを符号化す
る。DVDにおけるマルチアングル機能では、複数のス
トリームの切り替えは、アングルポイントと呼ばれる部
分で行われる。このアングルポイントは、例えばGOP
の先頭である。このアングルポイントで、ストリームを
切り替えるときには、VBVバッファを破綻させないよ
うにしなければならない。DVBにおけるCM挿入の場
合も同様に、複数のストリームの切り替えるときには、
VBVバッファを破綻させないようにしなければならな
い。
In the present embodiment, in order to realize a multi-angle function in DVD and CM insertion in DVB, image data corresponding to a video material switchable with another video material is used by using the image encoding device 10. Encode. In the multi-angle function of the DVD, switching of a plurality of streams is performed at a portion called an angle point. This angle point is, for example, GOP
At the beginning. When switching streams at this angle point, it is necessary to prevent the VBV buffer from breaking down. Similarly, in the case of CM insertion in DVB, when switching a plurality of streams,
The VBV buffer must not be broken.

【0031】ここで、図7を参照して、ストリームの切
り替え時にVBVバッファを破綻させない条件について
説明する。ここで、図7(a),(b)に示したよう
に、ストリームA,Bをあるスプライスポイント(本発
明における切り替え点に対応する。)SPで切り替える
ものとし、スプライスポイントSPにおける各ストリー
ムA,BのVBVバッファ占有量をそれぞれ、VBV
OCA ,VBVOCB とする。また、VBVOCB から、次の
スプライスポイントSPまでにストリームBが利用する
VBVバッファの深さをDB とする。このとき、次の式
(1)を満たしている場合には、いかなる場合でも、V
BVバッファを破綻させずにストリームの切り替えが可
能となる。
Here, with reference to FIG. 7, a description will be given of conditions under which the VBV buffer is not broken when the streams are switched. Here, as shown in FIGS. 7A and 7B, the streams A and B are switched at a certain splice point (corresponding to the switching point in the present invention) SP, and each stream A at the splice point SP is switched. , And B occupy the VBV buffers, respectively.
OCA , VBV OCB . Further, the VBV OCB, the depth of the VBV buffer stream B is used for the next splice point SP and D B. At this time, if the following equation (1) is satisfied, V
Stream switching can be performed without breaking the BV buffer.

【0032】VBVOCA =VBVOCB …(1)VBV OCA = VBV OCB (1)

【0033】また、可変レート方式の符号化の場合に
は、オーバフローの心配がないので、次の式(2)を満
たすことで、VBVバッファを破綻させずにストリーム
の切り替えが可能となる。
In the case of variable rate coding, there is no fear of overflow. By satisfying the following expression (2), it is possible to switch streams without breaking the VBV buffer.

【0034】VBVOCA ≧DB …(2)VBV OCA ≧ D B (2)

【0035】なお、実際には、ストリームBが利用する
VBVバッファの深さは、実際に符号化してみなければ
分からないので、DB の値は、ストリームBが利用可能
なVBVバッファの深さとする。また、簡易的には、D
B ≒VBVOCB として、式(2)の代わりに、以下の式
(2´)を用いてもよい。
[0035] In practice, the depth of the VBV buffer stream B is utilized, so do not know if I actually coded, the value of D B, the stream B and the depth of the VBV buffers available I do. Also, simply, D
The following equation (2 ′) may be used as B式 VBV OCB instead of equation (2).

【0036】VBVOCA ≧VBVOCB …(2´)VBV OCA ≧ VBV OCB (2 ')

【0037】次に、いわゆる2パスエンコード方式によ
る符号化を行って、DVDのマルチアングル機能を実現
する場合を例にとって、本実施の形態に係る画像符号化
装置10の動作について具体的に説明する。なお、2パ
スエンコード方式とは、画像符号化装置10において、
量子化スケールを一定にして、1回目(1パス目)の符
号化を行って、ホストコンピュータ1によって、ピクチ
ャの符号化の難易度を表す符号化難易度(Difficulty)
等の情報を収集し、その情報を基に、ピクチャ毎に目標
符号量を決定して、その目標符号量に従って2回目(2
パス目)の符号化を行う方式である。この場合、本実施
の形態では、ホストコンピュータ1は、VBVバッファ
をシミュレートしながら、式(1)または式(2)を満
たすように、ピクチャ毎の目標符号量を計算する。DV
Dの場合には、可変レート方式の符号化を行うので、式
(2)を満たせばよい。
Next, the operation of the image encoding apparatus 10 according to the present embodiment will be described in detail, taking as an example a case where a multi-angle function of a DVD is realized by performing encoding by a so-called two-pass encoding method. . Note that the two-pass encoding method means that the image encoding device 10
The first (first pass) encoding is performed with the quantization scale kept constant, and the encoding difficulty (Difficulty) representing the encoding difficulty of the picture is calculated by the host computer 1.
And the like, and a target code amount is determined for each picture based on the information.
This is a method of encoding the (pass-th). In this case, in the present embodiment, the host computer 1 calculates a target code amount for each picture so as to satisfy Expression (1) or Expression (2) while simulating a VBV buffer. DV
In the case of D, variable-rate encoding is performed, so that equation (2) may be satisfied.

【0038】ホストコンピュータ1は、どのスプライス
ポイントSPでも、式(2)を満たすようにするため
に、図4にVBVバッファ占有量の変化の一例を挙げた
ように、まず、スプライスポイントSP以後について
は、スプライスポイントSPにおけるVBVバッファ占
有量を一定値VC として、以後の目標符号量を計算す
る。また、ホストコンピュータ1は、スプライスポイン
トSPに達する際には、スプライスポイントSPにおけ
るVBVバッファ占有量が一定値VC に対して所定の関
係(式(2)を満たす場合には、VBVバッファ占有量
が一定値VC を越えるような関係)を有する値となるよ
うに、目標符号量を計算する。なお、一定値VC は、例
えばVBVバッファの全容量の2/3にする等、適宜に
設定可能である。
In order to satisfy the equation (2) at any splice point SP, the host computer 1 firstly sets the splice point SP and thereafter after the splice point SP as shown in FIG. It is the VBV buffer occupancy at the splicing point SP as a constant value V C, to compute the subsequent target code amount. The host computer 1, when reaching the splicing point SP, if VBV buffer occupancy at the splicing point SP satisfies a predetermined relationship to a predetermined value V C (Equation (2) is VBV buffer occupancy as but a value having a relationship) exceeding a predetermined value V C, calculates the target code amount. Incidentally, a constant value V C, for example equal to 2/3 of the total capacity of the VBV buffer can be set appropriately.

【0039】ここで、図5を参照して、本実施の形態に
おける2パスエンコード方式の符号化処理について説明
する。この処理では、まず、ホストコンピュータ1に対
して符号化の条件を入力、設定する初期化を行い(ステ
ップS101)、次に、画像符号化装置10において、
量子化スケールを一定にして1パス目の符号化を行っ
て、符号化難易度を測定する。符号化難易度は、図2に
おける符号化難易度計算部42によって求められ、符号
化難易度データS6 として、ホストコンピュータ1に与
えられる。次に、ホストコンピュータ1は、ピクチャタ
イプの割り当てを行い(ステップS103)、更に、各
ピクチャに対するビットの配分(目標符号量の算出)を
行う(ステップS104)。次に、ホストコンピュータ
1は、目標符号量データS7 によってピクチャ毎の目標
符号量を画像符号化装置10に与え、画像符号化装置1
0によって、2パス目の符号化を行い(ステップS10
5)、得られた圧縮画像データをモニタ装置によって表
示してプレビューを行って(ステップS106)、画質
のチェックを行い(ステップS107)、画質が良けれ
ば(OK)、オーサリングに必要なデータをまとめる等
の後処理を行って(ステップS110)、画像符号化作
業を終了する。画質のチェックにおいて、画質が良くな
ければ(NG)、部分的にエンコードの条件を変更する
ことによって部分的に画質を変更するカスタマイズを行
い(ステップS108)、更に、これに応じて各ピクチ
ャに対するビットの再配分を行って(ステップS10
9)、ステップS105に戻って、再度2パス目の符号
化を行う。
Here, the encoding process of the two-pass encoding method in the present embodiment will be described with reference to FIG. In this process, first, initialization for inputting and setting encoding conditions to the host computer 1 is performed (step S101).
The encoding of the first pass is performed with the quantization scale kept constant, and the encoding difficulty is measured. Coding difficulty is determined by the coding difficulty calculating unit 42 in FIG. 2, as the encoding difficulty data S 6, is provided to the host computer 1. Next, the host computer 1 allocates a picture type (step S103), and further allocates bits to each picture (calculates a target code amount) (step S104). Next, the host computer 1 gives the target code amount for each picture in the picture coding apparatus 10 by the target code amount data S 7, the image encoding device 1
0, the second pass is encoded (step S10).
5) The obtained compressed image data is displayed on the monitor device and previewed (step S106), and the image quality is checked (step S107). If the image quality is good (OK), the data necessary for authoring is compiled. And the like (step S110), and the image encoding operation ends. In the image quality check, if the image quality is not good (NG), customization for partially changing the image quality by partially changing the encoding conditions is performed (step S108). (Step S10)
9) Returning to step S105, the second pass encoding is performed again.

【0040】ここで、ホストコンピュータ1におけるビ
ットの配分(目標符号量の算出)の処理の一例について
説明する。この処理では、符号化難易度に応じて符号化
処理の目標符号量を設定するが、始めに、事前に設定さ
れた重み付けテーブルに従って、連続して符号化処理可
能な画像データのブロック(以下、エンコードユニット
と言う。)毎に、符号化難易度に対して重み付けを行う
ことが可能である。ホストコンピュータ1は、シームレ
スなマルチアングル機能を実現するエンコードユニット
の対応するGOP間で、符号化難易度の最大値を順次検
出して配列することにより、シームレスなマルチアング
ル機能を実現するエンコードユニットに対して共通の符
号化難易度を設定する。これにより、結果的に対応する
エンコードユニット間でデータ量が等しくなる。
Here, an example of a process of allocating bits (calculating a target code amount) in the host computer 1 will be described. In this process, a target code amount of the encoding process is set according to the encoding difficulty. First, a block of image data that can be encoded continuously (hereinafter, referred to as a block) according to a weighting table set in advance. It is possible to weight the encoding difficulty for each encoding unit.) The host computer 1 sequentially detects and arranges the maximum value of the encoding difficulty between the corresponding GOPs of the encoding unit that realizes the seamless multi-angle function, thereby providing the encoding unit that realizes the seamless multi-angle function. On the other hand, a common encoding difficulty is set. As a result, the data amount becomes equal between the corresponding encoding units.

【0041】次に、ホストコンピュータ1は、各GOP
単位の符号化難易度に応じて、実際に割り当て可能な符
号量を、各GOPに配分し、更に、各GOPにおいて、
各ピクチャの符号化難易度に応じて目標符号量を各ピク
チャに配分する。このようにして、シームレスなマルチ
アングル機能においては、共通化された符号化難易度に
よって、対応するGOPに同一の目標符号量が割り当て
られた後、各GOPを構成する各ピクチャの符号化難易
度に応じて、この同一の目標符号量が順次各ピクチャに
配分される。
Next, the host computer 1 checks each GOP
The code amount that can be actually allocated is allocated to each GOP according to the coding difficulty of the unit, and further, in each GOP,
A target code amount is allocated to each picture according to the encoding difficulty of each picture. In this way, in the seamless multi-angle function, after the same target code amount is assigned to the corresponding GOP according to the standardized coding difficulty, the coding difficulty of each picture constituting each GOP is determined. , The same target code amount is sequentially allocated to each picture.

【0042】次に、ホストコンピュータ1は、VBVバ
ッファをシミュレートしながら、VBVバッファがアン
ダフローしないようにピクチャ毎の目標符号量を補正す
る。更に、ホストコンピュータ1は、例えばGOP単位
で、式(2)を満たすように、ピクチャ毎の目標符号量
を補正する。
Next, while simulating the VBV buffer, the host computer 1 corrects the target code amount for each picture so that the VBV buffer does not underflow. Further, the host computer 1 corrects the target code amount for each picture so as to satisfy Expression (2), for example, in GOP units.

【0043】2パス目の符号化時において、画像符号化
装置10では、上述のようにしてホストコンピュータ1
によって決定され、与えられるピクチャ毎の目標符号量
に従って、符号化処理を行う。しかし、実際の発生符号
量は、目標符号量に対して誤差を持ってしまうため、ホ
ストコンピュータ1のシミュレート通りのVBVバッフ
ァ占有量の軌跡を再現することはない。ここで、常に、
目標符号量よりも発生符号量が小さい場合には、式
(2)を満たすことになるため、問題はないが、逆に、
目標符号量よりも発生符号量が大きい場合には、VBV
バッファのアンダフローの原因となり得る。そこで、本
実施の形態では、画像符号化装置10は、式(2)を満
たすように、図6の流れ図に示した動作を行う。
At the time of the second pass encoding, the image encoding device 10 executes the host computer 1 as described above.
The encoding process is performed according to the target code amount for each picture determined and given. However, since the actual generated code amount has an error with respect to the target code amount, the trajectory of the VBV buffer occupancy as simulated by the host computer 1 is not reproduced. Where,
When the generated code amount is smaller than the target code amount, Equation (2) is satisfied, so there is no problem.
If the generated code amount is larger than the target code amount, VBV
This can cause buffer underflow. Therefore, in the present embodiment, the image encoding device 10 performs the operation shown in the flowchart of FIG. 6 so as to satisfy Expression (2).

【0044】この動作では、まず、符号化制御部15
が、以下の式(3)で定義される総誤差の初期値を0と
し、次のスプライスポイントまでのピクチャ数を設定す
る(ステップS201)。
In this operation, first, the encoding control unit 15
Sets the initial value of the total error defined by the following equation (3) to 0, and sets the number of pictures up to the next splice point (step S201).

【0045】 総誤差=総目標符号量−総発生符号量 …(3)Total error = Total target code amount−Total generated code amount (3)

【0046】次に、符号化制御部15の目標符号量修正
部44が、ホストコンピュータ1より目標符号量を取得
する(ステップS202)。次に、目標符号量修正部4
4は、総誤差が0以上か否かを判断する(ステップS2
03)。総誤差が0以上であれば(Y)、ステップS2
05へ進む。総誤差が0以上でなければ(N)、目標符
号量修正部44が、以下の式(4)に従って、目標符号
量を修正して(ステップS204)、ステップS205
へ進む。
Next, the target code amount correction unit 44 of the encoding control unit 15 acquires the target code amount from the host computer 1 (step S202). Next, the target code amount correction unit 4
4 judges whether the total error is 0 or more (step S2).
03). If the total error is 0 or more (Y), step S2
Go to 05. If the total error is not equal to or greater than 0 (N), the target code amount correction unit 44 corrects the target code amount according to the following equation (4) (step S204), and step S205
Proceed to.

【0047】 修正後の目標符号量=修正前の目標符号量−|総誤差|/残りのピクチャ数 …(4)Target code amount after correction = target code amount before correction− | total error | / number of remaining pictures (4)

【0048】つまり、与えられた目標符号量に対する発
生符号量の超過分を、残りのピクチャに分け、各ピクチ
ャに分けられた超過分を各ピクチャに与えられた目標符
号量より減算して、修正後の目標符号量を算出する。
That is, the excess of the generated code amount with respect to the given target code amount is divided into the remaining pictures, and the excess amount divided into each picture is subtracted from the target code amount given to each picture to correct it. A subsequent target code amount is calculated.

【0049】次に、ステップS205では、修正後の目
標符号量を、目標符号量修正部44より量子化インデッ
クス決定部45に与え、量子化インデックス決定部45
によって、エンコーダ13における発生符号量が目標符
号量修正部44によって修正された後の目標符号量とな
るように量子化回路33における量子化特性値に対応す
る量子化インデックスを決定し、量子化回路33に送っ
て、1ピクチャの符号化を行う。
Next, in step S205, the corrected target code amount is provided from the target code amount correction unit 44 to the quantization index determination unit 45, and the quantization index determination unit 45
Thus, the quantization index corresponding to the quantization characteristic value in the quantization circuit 33 is determined so that the generated code amount in the encoder 13 becomes the target code amount after being corrected by the target code amount correction unit 44. 33, and encodes one picture.

【0050】次に、目標符号量修正部44が、発生符号
量を取得し(ステップS206)、総誤差を計算し(ス
テップS207)、残りのピクチャ数を1減らす(ステ
ップS208)。次に、符号化制御部15は、残りのピ
クチャ数が0より大きいか否かを判断し(ステップS2
09)、大きい場合(Y)にはステップS202に戻
り、大きくない場合(N)には符号化処理を終了する。
Next, the target code amount correction unit 44 acquires the generated code amount (step S206), calculates the total error (step S207), and reduces the number of remaining pictures by one (step S208). Next, the encoding control unit 15 determines whether or not the number of remaining pictures is greater than 0 (step S2).
09) If it is larger (Y), the process returns to step S202; if not (N), the encoding process ends.

【0051】以上のような図6に示した処理により、総
目標符号量に対して総発生符号量が下回るように目標符
号量が修正され、結果的に、総目標符号量に対して総発
生符号量が下回って、スプライスポイントにおいて式
(2)を満たすか、あるいは、総目標符号量に対する総
発生符号量の超過分を許容誤差範囲内に収めることが可
能となる。
By the above-described processing shown in FIG. 6, the target code amount is corrected so that the total generated code amount is smaller than the total target code amount. When the code amount falls below, it is possible to satisfy Expression (2) at the splice point or to make the excess of the total generated code amount with respect to the total target code amount fall within the allowable error range.

【0052】なお、隣接するスプライスポイント間に複
数のGOPがある場合には、図6に示した動作は、スプ
ライスポイントの直前のGOPについてのみ行うように
してもよい。
When there are a plurality of GOPs between adjacent splice points, the operation shown in FIG. 6 may be performed only for the GOP immediately before the splice point.

【0053】以上説明したように、本実施の形態では、
どのスプライスポイントSPでも、式(2)を満たすよ
うにするために、まず、ホストコンピュータ1によっ
て、スプライスポイントSP以後については、スプライ
スポイントSPにおけるVBVバッファ占有量を一定値
C として、以後の目標符号量を計算し、スプライスポ
イントSPに達する際には、スプライスポイントSPに
おけるVBVバッファ占有量が一定値VC に対して所定
の関係(VBVバッファ占有量が一定値VC を越えるよ
うな関係)を有する値となるように、目標符号量を計算
し、画像符号化装置10の符号化制御部15に与える。
本実施の形態では、更に、実際の発生符号量は目標符号
量に対して誤差を持ってしまうことを考慮して、画像符
号化装置10の符号化制御部15では、スプライスポイ
ントSPにおけるVBVバッファ占有量が一定値VC
対して所定の関係(VBVバッファ占有量が一定値VC
を越えるような関係)を有する値となるように、発生符
号量に応じて、与えられた目標符号量を修正して、修正
後の目標符号量に従って、符号化を行わせる。このよう
にして、本実施の形態によれば、例えばDVDにおいて
可変レート方式の符号化によってマルチアングル機能を
実現する場合のように複数の映像素材を切り替え可能と
する場合に、VBVバッファを破綻させずに複数の映像
素材を切り替え可能となるように、画像データを符号化
することができ、画質の劣化を最小限に抑えて再生でき
るストリームを生成することができる。
As described above, in the present embodiment,
In any splicing point SP, in order to satisfy equation (2), first, the host computer 1, for splicing point SP after, the VBV buffer occupancy at the splicing point SP as a constant value V C, subsequent target the code amount is calculated and when reaching the splicing point SP, the predetermined relationship VBV buffer occupancy is for a fixed value V C at the splicing point SP (relation as VBV buffer occupancy exceeds a predetermined value V C) Is calculated and given to the encoding control unit 15 of the image encoding device 10.
In the present embodiment, further, in consideration of the fact that the actual generated code amount has an error with respect to the target code amount, the coding control unit 15 of the image coding device 10 sets the VBV buffer at the splice point SP. predetermined relationship quantity occupied for a fixed value V C (VBV buffer occupancy is constant value V C
Is corrected in accordance with the generated code amount so that encoding is performed in accordance with the corrected target code amount. As described above, according to the present embodiment, when a plurality of video materials can be switched, for example, when a multi-angle function is realized by variable-rate encoding in a DVD, the VBV buffer is broken. It is possible to encode image data so that a plurality of video materials can be switched without generating a stream that can be reproduced with minimum degradation of image quality.

【0054】また、本実施の形態によれば、与えられた
目標符号量に対する発生符号量の超過分を、少なくとも
スプライスポイントに達する前の所定数のピクチャに分
け、各ピクチャに分けられた超過分を各ピクチャに与え
られた目標符号量より減算して、修正後の目標符号量を
算出するようにしたので、特定のピクチャの画質の劣化
を防止することができる。
Further, according to the present embodiment, the excess of the generated code amount with respect to the given target code amount is divided into at least a predetermined number of pictures before reaching the splice point, and the excess Is subtracted from the target code amount given to each picture to calculate the corrected target code amount, so that it is possible to prevent the image quality of a specific picture from deteriorating.

【0055】なお、本発明は、上記実施の形態に限定さ
れず、例えば以下で説明するような種々の変更が可能で
ある。
The present invention is not limited to the above-described embodiment, but can be modified in various ways as described below.

【0056】まず、図6のステップS204における目
標符号量の修正では、与えられた目標符号量に対する発
生符号量の超過分を、残りの全てのピクチャに均等に分
けるようにしていた。しかし、MPEG規格のような予
測符号化を行う場合には、全体的に画質を保全するため
には予測される側のピクチャ(IピクチャやPピクチ
ャ)に対して多めの符号量を割り当てることが有効であ
る。そこで、各ピクチャに超過分を分ける割合をピクチ
ャタイプに応じて変えて、予測される側のピクチャに対
して多めの符号量を割り当てるようにしてもよい。ここ
で、各ピクチャに超過分を分ける割合をピクチャタイプ
に応じて変える方法の一例を挙げる。この方法では、I
ピクチャについては超過分の減算を行わない。また、P
ピクチャとBピクチャに対しては、超過分を分ける割合
に対応する係数CP ,CB を設定する。そして、図6の
ステップS204では、Pピクチャについては、以下の
式(5)に従って、修正後の目標符号量を算出する。
First, in the correction of the target code amount in step S204 in FIG. 6, the excess of the generated code amount with respect to the given target code amount is equally divided into all the remaining pictures. However, when predictive coding such as the MPEG standard is performed, it is necessary to allocate a larger code amount to a picture on the predicted side (I picture or P picture) in order to maintain the overall image quality. It is valid. Therefore, the ratio of dividing the excess into each picture may be changed according to the picture type, and a larger code amount may be assigned to the predicted picture. Here, an example of a method of changing the ratio of dividing the excess into each picture according to the picture type will be described. In this method, I
No excess subtraction is performed for pictures. Also, P
For picture and B-picture, the coefficient C P corresponding to the percentage of dividing the excess and sets C B. Then, in step S204 of FIG. 6, for the P picture, the corrected target code amount is calculated according to the following equation (5).

【0057】修正後の目標符号量=修正前の目標符号量
−CP ・|総誤差|/残りのピクチャ数 …(5)
Target code amount after correction = Target code amount before correction−C P · | Total error | / Number of remaining pictures (5)

【0058】同様に、図6のステップS204では、B
ピクチャについては、以下の式(6)に従って、修正後
の目標符号量を算出する。
Similarly, in step S204 of FIG.
For the picture, the corrected target code amount is calculated according to the following equation (6).

【0059】修正後の目標符号量=修正前の目標符号量
−CB ・|総誤差|/残りのピクチャ数 …(6)
Target code amount after correction = Target code amount before correction−C B · | Total error | / Number of remaining pictures (6)

【0060】そして、CP =1.0、CB =1.4のよ
うに、CB をCP よりも大きくすれば、予測される側の
ピクチャであるPピクチャでは、Bピクチャに比べて、
修正前の目標符号量より減算される符号量が減り、よっ
て、割り当てられる符号量が多めに保たれ、全体的に画
質の劣化を防止することができる。
[0060] Then, C P = 1.0, as C B = 1.4, if the C B greater than C P, with P-picture is a picture of the expected side, compared to the B picture ,
The code amount to be subtracted from the target code amount before the correction is reduced, and therefore, the allocated code amount is kept relatively large, so that deterioration of the image quality can be prevented as a whole.

【0061】なお、各ピクチャに超過分を分ける割合を
ピクチャタイプに応じて変えて修正後の目標符号量を算
出する方法は、式(5),(6)に限らず、種々変更可
能である。
The method of calculating the corrected target code amount by changing the ratio of dividing the excess into each picture in accordance with the picture type is not limited to the equations (5) and (6), but can be variously changed. .

【0062】また、演算の際に桁落ち等で考慮して、1
ピクチャ当たりで差し引く超過分を繰り上げることによ
って、修正後の目標符号量を控え目にし、総発生符号量
が総目標符号量を越えないようにするのが好ましい。
In consideration of a digit loss at the time of calculation, 1
It is preferable that the corrected target code amount is conservative by raising the excess amount to be subtracted per picture so that the total generated code amount does not exceed the total target code amount.

【0063】また、本実施の形態は、固定レート方式の
符号化の場合にも適用可能である。固定レート方式の符
号化の場合には、VBVバッファのオーバフローも起こ
してはならないので、スプライスポイントでは、式
(1)を満たさなければならない。この場合、ホストコ
ンピュータ1は、式(1)を満たすように目標符号量を
決定して、画像符号化装置10の符号化制御部15に与
える。符号化制御部15では、可変レート方式の場合と
同様の処理を行って、目標符号量に対して発生符号量が
下回るように目標符号量を修正し、且つ与えられた目標
符号量に対する発生符号量の不足分を補うためのダミー
データ“0”を生成し、ビットストリームに埋め込むス
タッフィングを行うことで、式(1)を満たすことが可
能となる。これにより、固定レート方式の符号化を行う
場合にも、例えばDVBにおけるCM挿入の場合のよう
に、VBVバッファを破綻させずに複数の映像素材をシ
ームレスに切り替え可能となるように画像データを符号
化することができ、画質の劣化を最小限に抑えて再生で
きるストリームを生成することができる。
The present embodiment is also applicable to the case of fixed rate coding. In the case of the fixed rate coding, since the overflow of the VBV buffer must not occur, the equation (1) must be satisfied at the splice point. In this case, the host computer 1 determines a target code amount so as to satisfy Expression (1) and supplies the target code amount to the coding control unit 15 of the image coding device 10. The encoding control unit 15 corrects the target code amount so that the generated code amount is lower than the target code amount by performing the same processing as in the case of the variable rate method, and generates the generated code for the given target code amount. Formula (1) can be satisfied by generating dummy data “0” to compensate for the shortage of the amount and performing stuffing to embed the dummy data in the bit stream. Accordingly, even when performing fixed-rate encoding, for example, as in the case of CM insertion in DVB, image data is encoded so that a plurality of video materials can be switched seamlessly without breaking the VBV buffer. It is possible to generate a stream that can be reproduced while minimizing deterioration of image quality.

【0064】[0064]

【発明の効果】以上説明したように、請求項1ないし5
のいずれかに記載の画像符号化装置または請求項6ない
し10のいずれかに記載の画像符号化方法によれば、他
の映像素材との切り替え点以後については、切り替え点
における仮想的バッファのデータ占有量を一定値とし、
切り替え点に達する際には、映像素材の切り替えによっ
て仮想的バッファが破綻しないように、切り替え点にお
ける仮想的バッファのデータ占有量が一定値に対して所
定の関係を有する値となるように目標符号量が与えら
れ、切り替え点に達する際に、切り替え点における仮想
的バッファのデータ占有量が一定値に対して所定の関係
を有する値となるように、発生符号量に応じて、与えら
れた目標符号量を修正し、修正後の目標符号量に応じて
条件を変えて、入力画像データを符号化するようにした
ので、復号化装置側の入力バッファに対応する仮想的バ
ッファを破綻させずに複数の映像素材を切り替え可能と
なるように、画像データを符号化することができるとい
う効果を奏する。
As described above, claims 1 to 5
According to the image encoding device according to any one of the above or the image encoding method according to any one of claims 6 to 10, after the switching point with another video material, the data of the virtual buffer at the switching point The occupancy is fixed,
When the switching point is reached, the target code is set so that the data occupancy of the virtual buffer at the switching point has a value having a predetermined relationship with a certain value so that the virtual buffer does not break down due to the switching of the video material. Given the amount, when the switching point is reached, the given target according to the generated code amount such that the data occupancy of the virtual buffer at the switching point has a value having a predetermined relationship with a constant value. Since the code amount is corrected and the condition is changed according to the corrected target code amount, the input image data is coded, so that the virtual buffer corresponding to the input buffer on the decoding device side is not broken. There is an effect that image data can be encoded so that a plurality of video materials can be switched.

【0065】また、請求項2または3記載の画像符号化
装置あるいは請求項7または8記載の画像符号化方法に
よれば、与えられた目標符号量に対する発生符号量の超
過分を、少なくとも切り替え点に達する前の所定数のピ
クチャに分け、各ピクチャに分けられた超過分を各ピク
チャに与えられた目標符号量より減算して、修正後の目
標符号量を算出するようにしたので、更に、特定のピク
チャの画質の劣化を防止することができるという効果を
奏する。
According to the image coding apparatus of the second or third aspect or the image coding method of the seventh or eighth aspect, the excess of the generated code amount with respect to the given target code amount is determined at least at the switching point. Is divided into a predetermined number of pictures before reaching, and the excess divided into each picture is subtracted from the target code amount given to each picture to calculate the corrected target code amount. There is an effect that deterioration of the image quality of a specific picture can be prevented.

【0066】また、請求項3記載の画像符号化装置また
は請求項8記載の画像符号化方法によれば、各ピクチャ
に超過分を分ける割合をピクチャタイプに応じて変える
ようにしたので、更に、全体的な画質の劣化を防止する
ことが可能となるという効果を奏する。
Further, according to the image encoding device of the third aspect or the image encoding method of the eighth aspect, the ratio of dividing the excess into each picture is changed according to the picture type. There is an effect that deterioration of the overall image quality can be prevented.

【0067】また、請求項4または5記載の画像符号化
装置あるいは請求項9または10記載の画像符号化方法
によれば、与えられた目標符号量に対して発生符号量が
下回るように、与えられた目標符号量を修正するように
したので、更に、より確実に仮想的バッファの破綻を防
止することができるという効果を奏する。
Further, according to the image coding apparatus of the fourth or fifth aspect or the image coding method of the ninth or tenth aspect, the generated code amount is smaller than the given target code amount. Since the obtained target code amount is corrected, there is an effect that the failure of the virtual buffer can be more reliably prevented.

【0068】また、請求項5記載の画像符号化装置また
は請求項10記載の画像符号化方法によれば、与えられ
た目標符号量に対する発生符号量の不足分を補うための
ダミーデータを生成するようにしたので、更に、固定レ
ート方式の符号化を行う場合にも、仮想的バッファを破
綻させずに複数の映像素材をシームレスに切り替え可能
となるという効果を奏する。
According to the image coding apparatus of the fifth aspect or the image coding method of the tenth aspect, the dummy data for compensating for the shortage of the generated code amount with respect to the given target code amount is generated. As a result, even in the case of performing fixed-rate encoding, there is an effect that a plurality of video materials can be switched seamlessly without breaking the virtual buffer.

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

【図1】本発明の一実施の形態に係る画像符号化装置の
概略の構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a schematic configuration of an image encoding device according to an embodiment of the present invention.

【図2】図1における画像符号化装置の詳細な構成を示
すブロック図である。
FIG. 2 is a block diagram illustrating a detailed configuration of an image encoding device in FIG. 1;

【図3】可変レート方式の符号化におけるVBVバッフ
ァ占有量の変化の一例を示す説明図である。
FIG. 3 is an explanatory diagram illustrating an example of a change in VBV buffer occupancy in variable rate coding.

【図4】本発明の一実施の形態におけるVBVバッファ
占有量の変化の一例を示す説明図である。
FIG. 4 is an explanatory diagram showing an example of a change in VBV buffer occupancy according to an embodiment of the present invention.

【図5】本発明の一実施の形態における2パスエンコー
ド方式の符号化処理を示す流れ図である。
FIG. 5 is a flowchart showing an encoding process of a two-pass encoding method according to an embodiment of the present invention.

【図6】本発明の一実施の形態における画像符号化装置
の動作を示す流れ図である。
FIG. 6 is a flowchart illustrating an operation of the image encoding device according to the embodiment of the present invention.

【図7】ストリームの接続によってVBVバッファが破
綻する場合について説明するための説明図である。
FIG. 7 is an explanatory diagram for describing a case where a VBV buffer fails due to connection of a stream.

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

1…ホストコンピュータ、10…画像符号化装置、11
…エンコーダ制御部、13…エンコーダ、14…動き検
出回路、15…符号化制御部、16…CPU、44…目
標符号量修正部、45…量子化インデックス決定部。
DESCRIPTION OF SYMBOLS 1 ... Host computer, 10 ... Image coding apparatus, 11
... Encoder control unit, 13 encoder, 14 motion detection circuit, 15 encoding control unit, 16 CPU, 44 target code amount correction unit, 45 quantization index determination unit.

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 他の映像素材と切り替え可能な映像素材
に対応する画像データを符号化する画像符号化装置であ
って、 目標符号量に応じて条件を変えて、入力画像データを符
号化する符号化手段と、 画像符号化装置によって符号化された画像データを復号
化する画像復号化装置側の入力バッファに対応する仮想
的バッファに関して、他の映像素材との切り替え点以後
については、切り替え点における仮想的バッファのデー
タ占有量を一定値とし、切り替え点に達する際には、映
像素材の切り替えによって仮想的バッファが破綻しない
ように、切り替え点における仮想的バッファのデータ占
有量が前記一定値に対して所定の関係を有する値となる
ように目標符号量が与えられ、切り替え点に達する際
に、切り替え点における仮想的バッファのデータ占有量
が前記一定値に対して所定の関係を有する値となるよう
に、前記符号化手段による発生符号量に応じて、与えら
れた目標符号量を修正して、修正後の目標符号量に従っ
て、前記符号化手段を制御する符号化制御手段とを備え
たことを特徴とする画像符号化装置。
1. An image coding apparatus for coding image data corresponding to a video material switchable with another video material, wherein the input image data is coded by changing conditions according to a target code amount. Encoding means, and a virtual buffer corresponding to the input buffer of the image decoding apparatus for decoding the image data encoded by the image encoding apparatus. The data occupancy of the virtual buffer at the switching point is set to the constant value so that the virtual buffer does not break down due to the switching of the video material when the switching point is reached. The target code amount is given to a value having a predetermined relationship with respect to the virtual buffer. The given target code amount is corrected in accordance with the code amount generated by the encoding means so that the data occupancy has a value having a predetermined relationship with the constant value. And a coding control means for controlling the coding means according to the following.
【請求項2】 前記符号化手段は、入力画像データをピ
クチャ毎にピクチャタイプに応じた符号化方法によって
符号化し、 前記符号化制御手段は、与えられた目標符号量に対する
発生符号量の超過分を、少なくとも切り替え点に達する
前の所定数のピクチャに分け、各ピクチャに分けられた
超過分を各ピクチャに与えられた目標符号量より減算し
て、修正後の目標符号量を算出することを特徴とする請
求項1記載の画像符号化装置。
2. The encoding means encodes input image data for each picture by an encoding method corresponding to a picture type, and said encoding control means calculates an excess of a generated code amount with respect to a given target code amount. Is divided into at least a predetermined number of pictures before reaching the switching point, and the excess divided into each picture is subtracted from the target code amount given to each picture to calculate a corrected target code amount. The image encoding device according to claim 1, wherein:
【請求項3】 前記符号化制御手段は、各ピクチャに超
過分を分ける割合を、ピクチャタイプに応じて変えるこ
とを特徴とする請求項2記載の画像符号化装置。
3. The image coding apparatus according to claim 2, wherein said coding control means changes a ratio of dividing an excess into each picture according to a picture type.
【請求項4】 前記符号化制御手段は、与えられた目標
符号量に対して発生符号量が下回るように、与えられた
目標符号量を修正することを特徴とする請求項1記載の
画像符号化装置。
4. The image code according to claim 1, wherein said coding control means corrects the given target code amount so that the generated code amount is lower than the given target code amount. Device.
【請求項5】 前記符号化制御手段は、与えられた目標
符号量に対する発生符号量の不足分を補うためのダミー
データを生成することを特徴とする請求項4記載の画像
符号化装置。
5. The image coding apparatus according to claim 4, wherein said coding control means generates dummy data for compensating for a deficiency of a generated code amount with respect to a given target code amount.
【請求項6】 他の映像素材と切り替え可能な映像素材
に対応する画像データを符号化する画像符号化方法であ
って、 符号化された画像データを復号化する画像復号化装置側
の入力バッファに対応する仮想的バッファに関して、他
の映像素材との切り替え点以後については、切り替え点
における仮想的バッファのデータ占有量を一定値とし、
切り替え点に達する際には、映像素材の切り替えによっ
て仮想的バッファが破綻しないように、切り替え点にお
ける仮想的バッファのデータ占有量が前記一定値に対し
て所定の関係を有する値となるように目標符号量が与え
られ、切り替え点に達する際に、切り替え点における仮
想的バッファのデータ占有量が前記一定値に対して所定
の関係を有する値となるように、発生符号量に応じて、
与えられた目標符号量を修正する目標符号量修正手順
と、 この目標符号量修正手順による修正後の目標符号量に応
じて条件を変えて、入力画像データを符号化する符号化
手順とを含むことを特徴とする画像符号化方法。
6. An image encoding method for encoding image data corresponding to an image material switchable with another image material, comprising: an input buffer on an image decoding device side for decoding the encoded image data. For the virtual buffer corresponding to, after the switching point with another video material, the data occupancy of the virtual buffer at the switching point is set to a constant value,
When the switching point is reached, the target is set so that the data occupancy of the virtual buffer at the switching point has a value having a predetermined relationship with the constant value so that the virtual buffer does not break down due to the switching of the video material. Given the code amount, when reaching the switch point, so that the data occupancy of the virtual buffer at the switch point is a value having a predetermined relationship with the constant value, according to the generated code amount,
A target code amount correction procedure for correcting a given target code amount, and an encoding procedure for encoding input image data by changing conditions according to the target code amount after the correction by the target code amount correction procedure. An image coding method characterized by the above-mentioned.
【請求項7】 前記符号化手順は、入力画像データをピ
クチャ毎にピクチャタイプに応じた符号化方法によって
符号化し、 前記目標符号量修正手順は、与えられた目標符号量に対
する発生符号量の超過分を、少なくとも切り替え点に達
する前の所定数のピクチャに分け、各ピクチャに分けら
れた超過分を各ピクチャに与えられた目標符号量より減
算して、修正後の目標符号量を算出することを特徴とす
る請求項6記載の画像符号化方法。
7. The encoding step encodes input image data for each picture by an encoding method according to a picture type, and the target code amount correcting step includes a step of exceeding a generated code amount for a given target code amount. Calculating the corrected target code amount by dividing the minute into at least a predetermined number of pictures before reaching the switching point, and subtracting the excess divided into each picture from the target code amount given to each picture. The image encoding method according to claim 6, wherein:
【請求項8】 前記目標符号量修正手順は、各ピクチャ
に超過分を分ける割合を、ピクチャタイプに応じて変え
ることを特徴とする請求項7記載の画像符号化方法。
8. The image encoding method according to claim 7, wherein said target code amount correction procedure changes a ratio of dividing an excess amount into each picture according to a picture type.
【請求項9】 前記目標符号量修正手順は、与えられた
目標符号量に対して発生符号量が下回るように、与えら
れた目標符号量を修正することを特徴とする請求項6記
載の画像符号化方法。
9. The image according to claim 6, wherein the target code amount correcting step corrects the given target code amount such that the generated code amount is lower than the given target code amount. Encoding method.
【請求項10】 与えられた目標符号量に対する発生符
号量の不足分を補うためのダミーデータを生成する手順
を含むことを特徴とする請求項9記載の画像符号化方
法。
10. The image encoding method according to claim 9, further comprising a step of generating dummy data for compensating for a shortage of a generated code amount with respect to a given target code amount.
JP15367197A 1997-06-11 1997-06-11 Image coder and its method Pending JPH114445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15367197A JPH114445A (en) 1997-06-11 1997-06-11 Image coder and its method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15367197A JPH114445A (en) 1997-06-11 1997-06-11 Image coder and its method

Publications (1)

Publication Number Publication Date
JPH114445A true JPH114445A (en) 1999-01-06

Family

ID=15567636

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15367197A Pending JPH114445A (en) 1997-06-11 1997-06-11 Image coder and its method

Country Status (1)

Country Link
JP (1) JPH114445A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4884373A (en) * 1986-09-22 1989-12-05 Toyoda-Koki Kabushiki-Kaisha Numerically controlled machine tool
JP2001128181A (en) * 1999-10-26 2001-05-11 Matsushita Electric Ind Co Ltd Method and device for inserting broadcast for advertising into digital broadcasting
WO2005041582A1 (en) * 2003-10-29 2005-05-06 Sony Corporation Video encoder and video encoding control method
JP2009260437A (en) * 2008-04-11 2009-11-05 Sony Corp Information processing system and information processing method, and program
JP2016197841A (en) * 2015-04-06 2016-11-24 日本電信電話株式会社 Code amount calculation method, code amount calculation device and code amount calculation program
JP2020127120A (en) * 2019-02-04 2020-08-20 富士通株式会社 Moving image coding apparatus, moving image coding method, and moving image coding program

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4884373A (en) * 1986-09-22 1989-12-05 Toyoda-Koki Kabushiki-Kaisha Numerically controlled machine tool
JP2001128181A (en) * 1999-10-26 2001-05-11 Matsushita Electric Ind Co Ltd Method and device for inserting broadcast for advertising into digital broadcasting
WO2005041582A1 (en) * 2003-10-29 2005-05-06 Sony Corporation Video encoder and video encoding control method
US7835436B2 (en) 2003-10-29 2010-11-16 Sony Corporation Video-encoding device and video-encoding control method
JP2009260437A (en) * 2008-04-11 2009-11-05 Sony Corp Information processing system and information processing method, and program
JP4539755B2 (en) * 2008-04-11 2010-09-08 ソニー株式会社 Information processing system, information processing method, and program
JP2016197841A (en) * 2015-04-06 2016-11-24 日本電信電話株式会社 Code amount calculation method, code amount calculation device and code amount calculation program
JP2020127120A (en) * 2019-02-04 2020-08-20 富士通株式会社 Moving image coding apparatus, moving image coding method, and moving image coding program

Similar Documents

Publication Publication Date Title
US6535556B1 (en) Apparatus and method for encoding images and medium in which image encoding program has been recorded
KR100756596B1 (en) Video data encoder and video data encoding method
US6229849B1 (en) Coding device and method
JPH09214962A (en) Moving video image compression system having vacant/ full buffer look ahead bit allocator
JP2004166183A (en) Moving picture coding apparatus and method, moving picture encoding method conversion apparatus, and method
JP2002051343A (en) Image signal coding method and image signal coding apparatus
JP2003018603A (en) Method and device for encoding moving image
US20080075164A1 (en) Motion picture encoding apparatus and method
JP4619479B2 (en) Statistical multiplexing system
KR20050020710A (en) Coding device and coding method
US6226326B1 (en) Coding device and coding method
JP3778208B2 (en) Image coding apparatus and image coding method
JP2002199392A (en) Method and device for encoding image
JPH114445A (en) Image coder and its method
JP2007028647A (en) Apparatus and method for encoding images and recording medium with image encoding program recorded thereon
JPH08251582A (en) Encoded data editing device
JP4073541B2 (en) Video re-encoding device
JP2000197010A (en) Picture data editing device
JP2002199408A (en) Moving image coding method and moving image coder
JPH114444A (en) Image coder and its method
JP2005033599A (en) Coding device and coding method, and program
JP3307367B2 (en) Variable transfer rate coding device
JP3767007B2 (en) Encoding apparatus and encoding method
JPH11234671A (en) Signal processing unit
JP3934772B2 (en) Variable transfer rate encoding method and apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040416

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060920

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061003

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061204

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071017

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071204

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080828