JP2002016929A - Encoder and encoding method - Google Patents

Encoder and encoding method

Info

Publication number
JP2002016929A
JP2002016929A JP2001076059A JP2001076059A JP2002016929A JP 2002016929 A JP2002016929 A JP 2002016929A JP 2001076059 A JP2001076059 A JP 2001076059A JP 2001076059 A JP2001076059 A JP 2001076059A JP 2002016929 A JP2002016929 A JP 2002016929A
Authority
JP
Japan
Prior art keywords
code
output
unit image
encoding
code amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2001076059A
Other languages
Japanese (ja)
Other versions
JP2002016929A5 (en
JP3669281B2 (en
Inventor
Yoshiko Hatano
喜子 幡野
Takashi Nakao
貴史 中尾
Junko Kishima
淳子 貴島
Mamoru Inamura
守 稲村
Kazuhiro Sugiyama
和宏 杉山
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2001076059A priority Critical patent/JP3669281B2/en
Publication of JP2002016929A publication Critical patent/JP2002016929A/en
Publication of JP2002016929A5 publication Critical patent/JP2002016929A5/ja
Application granted granted Critical
Publication of JP3669281B2 publication Critical patent/JP3669281B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an encoder which can prevent overflow of a buffer and can realize encoding of VOP within the predetermined period even if the processing time required for the encoding each macro-block is not constant. SOLUTION: The maximum amount of code Tmax is set for every VOP, and an output of an encoding means and an output of a fixed code output means are switched to provide an output in order to prevent that amount of code Sc of VOP does not exceed the maximum amount of code Tmax.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、リアルタイムで
映像信号を符号化する、例えば携帯電話やTV電話シス
テム等に関わる符号化装置および符号化方法に関するも
のである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an encoding apparatus and an encoding method for encoding a video signal in real time, for example, for a portable telephone, a TV telephone system, and the like.

【0002】[0002]

【従来の技術】図15は、例えば「MPEG−4のすべ
て」(工業調査会)p.39〜p.40に示された従来
の符号化装置のブロック図であり、図16は、この従来
の符号化装置の入力信号を示した説明図、図17はビッ
トストリームの構成を示した説明図、図18はビデオパ
ケットの画面(表示された状態)上の位置(配置)を示
した説明図である。
2. Description of the Related Art FIG. 15 shows, for example, "All about MPEG-4" (Industry Research Council) p. 39 to p. FIG. 16 is a block diagram of the conventional encoding device shown in FIG. 40, FIG. 16 is an explanatory diagram showing an input signal of the conventional encoding device, FIG. 17 is an explanatory diagram showing a configuration of a bit stream, and FIG. FIG. 4 is an explanatory diagram showing a position (arrangement) of a video packet on a screen (displayed state).

【0003】図15において、1は外部から入力される
外部入力信号(図中の例では、輝度信号、色差信号)を
第一の入力とする減算器であり、減算器1の出力はDC
T(離散コサイン変換。Discrete Cosin
e Transform)手段2、量子化器3を通し
て、直流(DC)成分、交流(AC)成分の量子化値を
予測するためのDC/AC予測器4と逆量子化器6に入
力される。DC/AC予測器4の出力は可変長符号化手
段5の第一の入力に与えられ、可変長符号化手段5はビ
ットストリームを出力する。
[0005] In FIG. 15, reference numeral 1 denotes a subtractor having an external input signal (a luminance signal and a chrominance signal in the example shown in FIG. 1) as a first input, and the output of the subtracter 1 is a DC signal.
T (Discrete Cosine Transform. Discrete Cosine)
e Transform) means 2 and a quantizer 3, which are input to a DC / AC predictor 4 and an inverse quantizer 6 for predicting a quantized value of a direct current (DC) component and an alternating current (AC) component. The output of the DC / AC predictor 4 is provided to a first input of a variable length coding unit 5, and the variable length coding unit 5 outputs a bit stream.

【0004】一方、量子化器3の出力が入力される逆量
子化器6の出力は、逆DCT手段7を通して、加算器8
の第一の入力に与えられる。加算器8の出力はメモリ9
に与えられ、メモリ9の出力は予測画像作成手段10の
第一の入力と動き検出手段11の第一の入力に与えられ
る。
On the other hand, the output of the inverse quantizer 6 to which the output of the quantizer 3 is input is passed through an inverse DCT means 7 to an adder 8.
Is given to the first input. The output of the adder 8 is a memory 9
, And the output of the memory 9 is provided to a first input of the predicted image creating means 10 and a first input of the motion detecting means 11.

【0005】動き検出手段11の第二の入力には外部入
力信号が与えられ、動き検出手段11の出力は予測画像
作成手段10の第二の入力と動きベクトル予測器12に
与えられる。
An external input signal is supplied to a second input of the motion detecting means 11, and an output of the motion detecting means 11 is supplied to a second input of the predicted image creating means 10 and a motion vector predictor 12.

【0006】動きベクトル予測器12の出力は可変長符
号化手段5の第二の入力に与えられる。また、予測画像
作成手段10の出力は減算器1の第二の入力と加算器8
の第二の入力に与えられる。
[0006] The output of the motion vector predictor 12 is provided to a second input of the variable length coding means 5. Further, the output of the predicted image creation means 10 is the second input of the subtractor 1 and the adder 8
Is given to the second input.

【0007】次に動作について説明する。まず、映像信
号は図16に示すように基本処理単位であるマクロブロ
ックに分割され、外部入力信号として入力される(ここ
における外部入力信号は基本的にマクロブロックとして
入力されるのであり、直接にマクロブロックが入力され
ても、前段にマクロブロック生成のための手段が備えら
れてマクロブロックへの変換がなされるように構成され
ていてもよい)。
Next, the operation will be described. First, the video signal is divided into macroblocks, which are basic processing units, as shown in FIG. 16, and is input as an external input signal (the external input signal here is basically input as a macroblock, Even if a macroblock is input, a means for generating a macroblock may be provided at a preceding stage to convert the macroblock into a macroblock.)

【0008】入力される映像信号が4:2:0の場合、
輝度信号(Y)の16画素×16ラインが、2つの色差
信号(Cb、Cr)の8画素×8ラインと画面上で同じ
大きさとなる。従って、8画素×8ラインのブロックが
6つ(輝度信号に対するブロックが4、色差信号に対す
るブロックが2の合わせて6のブロック)で、1つのマ
クロブロックが構成される。
When the input video signal is 4: 2: 0,
The 16 pixels × 16 lines of the luminance signal (Y) have the same size on the screen as the 8 pixels × 8 lines of the two color difference signals (Cb, Cr). Accordingly, one macroblock is composed of six blocks of 8 pixels × 8 lines (4 blocks for luminance signals and 2 blocks for color difference signals, that is, 6 blocks).

【0009】なお、ここでは、外部入力として入力され
るVideo Object Plane(VOP。単
位画像。)は矩形形状で、フレームと同一であることを
前提とする。
[0009] Here, it is assumed that a video object plane (VOP; unit image) input as an external input has a rectangular shape and is the same as a frame.

【0010】各ブロックは離散コサイン変換(DCT)
を施してから量子化手段3において量子化する。量子化
されたDCT係数はDC/AC予測器4においてDC、
AC各成分の係数の予測を行った後、量子化パラメータ
などの付加情報とともに可変長符号化する。
Each block is a discrete cosine transform (DCT)
And then quantized by the quantization means 3. The quantized DCT coefficient is converted to DC,
After predicting the coefficient of each AC component, variable-length coding is performed together with additional information such as a quantization parameter.

【0011】これがイントラ符号化(フレーム内符号化
と称する場合もある)である。すべてのマクロブロック
に対してイントラ符号化を適用するVOPをI−VOP
(Intra−VOP)と呼ぶ。
This is intra coding (sometimes referred to as intra-frame coding). A VOP to which intra coding is applied to all macroblocks is an I-VOP
(Intra-VOP).

【0012】一方、量子化されたDCT係数は、逆量子
化手段6において逆量子化、逆DCT手段7において逆
DCTを行って復号され、復号画像はメモリ9に記憶さ
れる。このメモリ9に記憶された復号画像はインター符
号化(フレーム間符号化と称する場合もある)を行うと
きに使用される。
On the other hand, the quantized DCT coefficient is subjected to inverse quantization by the inverse quantization means 6 and inverse DCT by the inverse DCT means 7 to be decoded, and the decoded image is stored in the memory 9. The decoded image stored in the memory 9 is used when performing inter-coding (sometimes referred to as inter-frame coding).

【0013】インター符号化の場合は、動き検出手段1
1において、外部入力信号として入力されたマクロブロ
ックの動きを示す動きベクトルを検出する。この動きベ
クトルとは、メモリ9に記憶された復号画像の中で、入
力されたマクロブロックとの誤差が最も小さくなるよう
な位置を示すものである。
In the case of inter coding, the motion detecting means 1
In step 1, a motion vector indicating the motion of a macroblock input as an external input signal is detected. The motion vector indicates a position in the decoded image stored in the memory 9 where the error from the input macroblock is minimized.

【0014】予測画像作成手段10は動き検出手段11
において検出された動きベクトルに基づいて、予測画像
を作成する。
The predicted image creating means 10 includes a motion detecting means 11
A predicted image is created based on the motion vector detected in.

【0015】続いて、入力されたマクロブロックと予測
画像作成手段10において作成された予測画像との差分
信号を求め、その差分信号に対してDCT手段2におい
てDCTを施し、量子化手段3において量子化を行う。
Subsequently, a difference signal between the input macroblock and the predicted image created by the predicted image creation means 10 is obtained, DCT is applied to the difference signal by the DCT means 2, and quantization is performed by the quantization means 3. Perform the conversion.

【0016】量子化されたDCT係数は、予測符号化さ
れた動きベクトルおよび量子化パラメータなどの付加情
報とともに可変長符号化される。また、量子化されたD
CT係数は、逆量子化手段6において逆量子化、逆DC
T手段7において逆DCTを行った後、加算器8によっ
て予測画像と加算されて、メモリ9に記憶される。
The quantized DCT coefficients are subjected to variable-length coding together with predictive-coded motion vectors and additional information such as quantization parameters. Also, the quantized D
The CT coefficient is inversely quantized by the inverse quantization means 6 and the inverse DC
After performing the inverse DCT in the T means 7, the result is added to the predicted image by the adder 8 and stored in the memory 9.

【0017】インター符号化には、画像の表示順で時間
的に前にあるVOPだけから予測する片方向予測と、時
間的に前のVOPと後ろのVOPの両方から予測する両
方向予測とがある。片方向予測で符号化するVOPをP
−VOP(Predictive VOP)と呼び、両
方向予測で符号化されたVOPをB−VOP(Bidi
rectionally Predictive VO
P)と呼ぶ。
The inter coding includes unidirectional prediction in which prediction is performed only from a VOP that is temporally earlier in the display order of images, and bidirectional prediction in which prediction is performed from both a VOP that is temporally earlier and a VOP that is later. . VOP encoded by unidirectional prediction is P
-VOP (Predictive VOP), and a VOP encoded by bidirectional prediction is called a B-VOP (Bidi
reactionally Predictive VO
P).

【0018】次に、図17を参照しながら可変長符号化
手段5から出力されるビットストリームの構成について
説明する。1VOPのビットストリームは図17(a)
のように、一つ以上のビデオパケットから構成される。
Next, the configuration of the bit stream output from the variable length coding means 5 will be described with reference to FIG. The bit stream of one VOP is shown in FIG.
And one or more video packets.

【0019】ここで、1つのビデオパケットは1つ以上
のマクロブロックの符号化データから成り立っており、
VOPの最初のビデオパケットについては、先頭にVO
Pヘッダが付され、最後にはバイトアラインのためのス
タッフビットが付される(図17(b))。
Here, one video packet is composed of encoded data of one or more macroblocks,
For the first video packet of a VOP, the VO
A P header is added, and finally, a stuff bit for byte alignment is added (FIG. 17B).

【0020】2つ目以降のビデオパケットの場合は、先
頭にビデオパケットの先頭を検出するためのResyn
c Markerとビデオパケットヘッダが付され、最
後にはスタッフビットが付される(図17(c))。
In the case of the second and subsequent video packets, Resyn for detecting the head of the video packet is provided at the head.
A cMarker and a video packet header are added, and finally a stuff bit is added (FIG. 17C).

【0021】ここにおけるスタッフビットとは、ビデオ
パケットの最後につけるバイトアラインの調整のため
に、1〜8ビット単位でビデオパケットの終端(切れ
目)まで付加されるものであり、以下に述べるスタッフ
ィングとその意味が区別される。
The stuff bit is added to the end (break) of the video packet in units of 1 to 8 bits in order to adjust byte alignment at the end of the video packet. The meaning is distinguished.

【0022】また、図17(d)のようにビデオパケッ
トの中に任意の数のスタッフィングを入れることもでき
る。例えば、MPEG4 Videoの場合、このスタ
ッフィングはスタッフィング・マクロブロックと呼ば
れ、マクロブロックと同じ扱いで任意のビデオパケット
にいれることができる。このスタッフィングは復号装置
側において、廃棄される(実質利用されない)。
Also, an arbitrary number of stuffings can be included in a video packet as shown in FIG. For example, in the case of MPEG4 Video, this stuffing is called a stuffing macroblock, and can be included in an arbitrary video packet in the same manner as a macroblock. This stuffing is discarded (not substantially used) on the decoding device side.

【0023】ここにおけるスタッフィングとは、符号量
を増加させるための9ビットや10ビットというような
ワードとして用いられるものであり、バイトアラインメ
ント(例えば、ビデオパケットの終端を調整すること)
とは無関係に用いられ、マクロブロックの間に挿入され
て用いられるものであり、上述のスタッフビットとその
意味が区別される。
The stuffing here is used as a word such as 9 bits or 10 bits for increasing the code amount, and is byte alignment (for example, adjusting the end of a video packet).
The stuff bit is used irrespective of the stuff bit and is inserted between macro blocks.

【0024】1つのビデオパケットに入れることのでき
るマクロブロックの数は任意であるが、エラー伝播を考
慮した場合、一般に各ビデオパケットの符号量がほぼ一
定になるように構成するのがよいとされている。このよ
うにビデオパケットの符号量がほぼ一定とされる場合、
各ビデオパケットの1VOP内において占める面積は図
18のように一定でなくなる。
The number of macroblocks that can be included in one video packet is arbitrary. However, in consideration of error propagation, it is generally preferable that the configuration is such that the code amount of each video packet is substantially constant. ing. When the code amount of the video packet is almost constant as described above,
The area occupied by one video packet in one VOP is not constant as shown in FIG.

【0025】次に、図19を参照しながら、DC/AC
予測器4の動作の詳細を説明する(ここでは、マクロブ
ロックのY成分について説明する)。上述したように、
DC/AC予測器4は、イントラ符号化の場合に量子化
器3から出力される量子化されたDCT係数のDC成
分、AC成分の係数の予測を行う。インター符号化の場
合は、DC成分、AC成分の予測を行わず、量子化器3
から出力される量子化されたDCT係数をそのまま可変
長符号化手段5へ出力する。なお、この場合、輝度信号
Yと色差信号Cとについて別々にDC/AC予測を行
う。
Next, referring to FIG.
The details of the operation of the predictor 4 will be described (here, the Y component of the macroblock will be described). As mentioned above,
The DC / AC predictor 4 predicts the DC and AC component coefficients of the quantized DCT coefficients output from the quantizer 3 in the case of intra coding. In the case of the inter coding, the DC component and the AC component are not predicted, and the quantizer 3
And outputs the quantized DCT coefficient output from the variable length encoding means 5 as it is. In this case, DC / AC prediction is separately performed on the luminance signal Y and the color difference signal C.

【0026】以下ではイントラ符号化の場合のDC成
分、AC成分の予測について説明する。現在符号化して
いるブロックの量子化されたDCT係数をFx(i,
j)(0≦i≦7、0≦j≦7)、このブロックの左隣
のブロックの量子化されたDCT係数をFa(i,j)
(0≦i≦7、0≦j≦7)、上隣のブロックの量子化
されたDCT係数をFc(i,j)(0≦i≦7、0≦
j≦7)、左上のブロックの量子化されたDCT係数を
Fb(i,j)(0≦i≦7、0≦j≦7)とすると、
まず、左上のブロックの量子化されたDCT係数のDC
成分Fb(0,0)と左隣のブロックの量子化されたD
CT係数のDC成分Fa(0,0)と上隣のブロックの
量子化されたDCT係数のDC成分Fc(0,0)とか
ら、予測方向を決定する。
In the following, prediction of DC and AC components in the case of intra coding will be described. The quantized DCT coefficients of the block currently being encoded are represented by Fx (i,
j) (0 ≦ i ≦ 7, 0 ≦ j ≦ 7), and quantized DCT coefficients of the block on the left of this block are Fa (i, j).
(0 ≦ i ≦ 7, 0 ≦ j ≦ 7) and the quantized DCT coefficients of the upper adjacent block are represented by Fc (i, j) (0 ≦ i ≦ 7, 0 ≦
j ≦ 7) and the quantized DCT coefficient of the upper left block is Fb (i, j) (0 ≦ i ≦ 7, 0 ≦ j ≦ 7),
First, the DC of the quantized DCT coefficient of the upper left block
The component Fb (0,0) and the quantized D of the block on the left
The prediction direction is determined from the DC component Fa (0,0) of the CT coefficient and the DC component Fc (0,0) of the quantized DCT coefficient of the upper adjacent block.

【0027】例えば、左隣のブロックのDC成分の量子
化ステップ幅をQda、左上のブロックのDC成分の量
子化ステップ幅をQdb、上隣のブロックのDC成分の
量子化ステップ幅をQdcとすると、 fa(0,0)=Fa(0,0)×Qda fb(0,0)=Fb(0,0)×Qdb fc(0,0)=Fc(0,0)×Qdc により、逆量子化後のDC成分fa(0,0)、fb
(0,0)、fc(0,0)をそれぞれ求め、 |fa(0,0)−fb(0,0)|<|fb(0,
0)−fc(0,0)| なる関係が成り立てば上下方向の相関が強いと考えられ
るので上隣のブロックの逆量子化後のDC成分fc
(0,0)から予測を行い、上記の関係が成り立たない
場合には左右方向の相関が強いと考えられるので左隣の
ブロックの逆量子化後のDC成分fa(0,0)から予
測を行う。
For example, if the quantization step width of the DC component of the block on the left is Qda, the quantization step width of the DC component of the upper left block is Qdb, and the quantization step width of the DC component of the upper left block is Qdc. , Fa (0,0) = Fa (0,0) × Qda fb (0,0) = Fb (0,0) × Qdb fc (0,0) = Fc (0,0) × Qdc DC components fa (0,0), fb
(0,0) and fc (0,0), respectively, and | fa (0,0) -fb (0,0) | <| fb (0,
If the relationship 0) −fc (0,0) | is established, it is considered that the correlation in the vertical direction is strong, so the DC component fc of the upper adjacent block after inverse quantization is obtained.
Prediction is performed from (0,0), and if the above relationship does not hold, it is considered that the correlation in the left-right direction is strong. Therefore, prediction is performed from the DC component fa (0,0) of the block on the left after dequantization. Do.

【0028】上隣のブロックからDC成分の予測を行う
場合は、 Px(0,0)=Fx(0,0)−fc(0,0)/Q
dx とし、左隣のブロックからDC成分の予測を行う場合
は、 Px(0,0)=Fx(0,0)−fa(0,0)/Q
dx として、予測後のDC成分Px(0,0)を求める。た
だし、Qdxは現在のブロックのDC成分の量子化ステ
ップ幅であり、上記の割り算は、例えば、四捨五入で計
算する。
When predicting the DC component from the upper adjacent block, Px (0,0) = Fx (0,0) -fc (0,0) / Q
dx, and when predicting the DC component from the block on the left, Px (0,0) = Fx (0,0) -fa (0,0) / Q
The predicted DC component Px (0,0) is obtained as dx. Here, Qdx is the quantization step width of the DC component of the current block, and the above division is calculated by, for example, rounding off.

【0029】続いて、上記のDC成分の予測方向を用い
て、AC成分の予測を行う。すなわち、左隣のブロック
の量子化パラメータをQpa、上隣のブロックの量子化
パラメータをQpc、現在のブロックの量子化パラメー
タをQpxとすると、上隣のブロックからDC成分の予
測を行った場合は、AC成分の予測を、 Px(i,0)=Fx(i,0)−(Fc(i,0)×
Qpc)/Qpx(i=1、…、7) に基づいて行う。
Subsequently, the AC component is predicted using the above-described DC component prediction direction. That is, assuming that the quantization parameter of the block on the left is Qpa, the quantization parameter of the block on the upper side is Qpc, and the quantization parameter of the current block is Qpx, when the DC component is predicted from the block on the upper side, , AC component prediction, Px (i, 0) = Fx (i, 0) − (Fc (i, 0) ×
Qpc) / Qpx (i = 1,..., 7).

【0030】また、左隣のブロックからDC成分の予測
を行った場合は、AC成分の予測を、 Px(0,j)=Fx(0,j)−(Fa(0,j)×
Qpa)/Qpx(j=1、…、7) に基づいて行い、予測後のAC成分Px(i,0)また
はPx(0,j)を求める。ただし、上記の割り算は、
例えば、四捨五入で計算するものとする。
When the DC component is predicted from the block on the left, the AC component is predicted by Px (0, j) = Fx (0, j)-(Fa (0, j) ×
Qpa) / Qpx (j = 1,..., 7) to determine the predicted AC component Px (i, 0) or Px (0, j). However, the above division is
For example, it is assumed that the calculation is performed by rounding.

【0031】1マクロブロックを構成する6つのブロッ
クに対して、上記のAC成分の予測を独立に行った後、
AC成分の予測を行うかどうかを、以下に述べるように
マクロブロック単位で決定する(いずれのブロックとの
関係で予測を行ったかによりマクロブロック毎に決定す
る)。
After independently predicting the AC component for the six blocks constituting one macroblock,
Whether or not to predict the AC component is determined for each macroblock as described below (determined for each macroblock depending on which block the prediction is performed on).

【0032】ここで、元の映像信号のまま(AC成分の
予測を行わない)が良いのか、予測を施した方が良いの
かの判断を行うことを示す指標として、ブロックのAC
予測判断指標SBを以下のように求める。例えば、1マ
クロブロックを構成する6つのブロックの各ブロックに
対して、そのブロック(AC予測判断指標SBを求める
対象となるブロック)が上隣のブロックから予測を行っ
た場合は、
Here, as an index indicating whether it is better to keep the original video signal as it is (no prediction of the AC component is performed) or to perform the prediction, the AC of the block is used as an index.
The prediction judgment index SB is obtained as follows. For example, for each of the six blocks constituting one macroblock, when that block (the block for which the AC prediction determination index SB is to be obtained) is predicted from the block on the upper side,

【0033】[0033]

【数1】 (Equation 1)

【0034】によりAC予測判断指標SBを求め、その
ブロックが左隣のブロックから予測を行った場合は、
When the AC prediction judgment index SB is obtained from the block, and the block is predicted from the block on the left side,

【0035】[0035]

【数2】 (Equation 2)

【0036】によりAC予測判断指標SBを求め、1マ
クロブロックを構成する6つのブロックのAC予測判断
指標SBの和SBS(各ブロックについて求められたA
C予測判断指標の和)が、 SBS≧0 の場合にはAC成分の予測を行い、そうでなければ、A
C成分の予測を行わない。
The AC prediction decision index SB is obtained by the above operation, and the sum SBS of the AC prediction decision indexes SB of the six blocks constituting one macroblock (A obtained for each block)
C sum), if SBS ≧ 0, the AC component is predicted. Otherwise, A
Do not predict the C component.

【0037】なお、AC成分の予測を行う場合はac_
pred_flag=1、AC成分の予測を行わない場
合はac_pred_flag=0として、このac_
pred_flagをマクロブロック毎に付加情報とし
て付加した後、各マクロブロックを可変長符号化手段5
によって符号化する。
When predicting the AC component, ac_
When pred_flag = 1, and when the AC component is not predicted, ac_pred_flag = 0,
After the pred_flag is added as additional information for each macroblock, each macroblock is
By encoding.

【0038】ac_pred_flag=1のマクロブ
ロックに属するブロックについては、そのブロックが上
隣のブロックから予測した場合は、
For a block belonging to a macroblock of ac_pred_flag = 1, if that block is predicted from the upper neighboring block,

【0039】[0039]

【数3】 (Equation 3)

【0040】により、Ox(i,j)を求め、そのブロ
ックが左隣のブロックから予測した場合は、
As a result, when Ox (i, j) is obtained and the block is predicted from the block on the left,

【0041】[0041]

【数4】 (Equation 4)

【0042】により、Ox(i,j)を求める。また、
ac_pred_flag=0のマクロブロックに属す
るブロックについては、
Thus, Ox (i, j) is obtained. Also,
For a block belonging to a macroblock of ac_pred_flag = 0,

【0043】[0043]

【数5】 (Equation 5)

【0044】により、Ox(i,j)を求め、このOx
(i,j)をDC/AC予測器4の出力として、可変長
符号化手段5へ出力する。
As a result, Ox (i, j) is obtained,
(I, j) is output to the variable length encoding means 5 as an output of the DC / AC predictor 4.

【0045】なお、上記予測において、現在のブロック
が単位画像の左端(単位画像が1画面である場合には、
この1画面の左端)のブロックである場合、現在のブロ
ックの左隣のブロックおよび左上のブロックが存在しな
いので、上記予測で用いる逆量子化後のDC成分fa
(0,0)およびfb(0,0)の値を予め定めた定数
βとする。また、この場合、上記予測で用いるAC成分
Fa(i,j)、Fb(i,j)((i,j)≠(0,
0))を0とする。
In the above prediction, the current block is located at the left end of the unit image (when the unit image is one screen,
In the case of the block at the left end of this one screen), the block adjacent to the left of the current block and the upper left block do not exist, and thus the DC component fa after inverse quantization used in the above prediction
Let the values of (0,0) and fb (0,0) be a predetermined constant β. Further, in this case, AC components Fa (i, j) and Fb (i, j) ((i, j) ≠ (0,
0)) is set to 0.

【0046】ここで予め定めた定数βは、例えば、DC
T手段2から出力されるDCT係数のうち、DC成分の
値の範囲の中間値とする。すなわち、DCT手段2から
出力されるDC成分が11bitで0から2047の値
を取り得る場合、β=1024とする。
Here, the predetermined constant β is, for example, DC
The DCT coefficient output from the T means 2 is set to an intermediate value in the range of the value of the DC component. That is, when the DC component output from the DCT means 2 can take a value from 0 to 2047 in 11 bits, β = 1024.

【0047】同様に、上記予測において、現在のブロッ
クが単位画像の上端(単位画像が1画面である場合に
は、この1画面の上端)のブロックである場合、現在の
ブロックの上隣のブロックおよび左上のブロックが存在
しないので、上記予測で用いる逆量子化後のDC成分f
c(0,0)およびfb(0,0)の値を上記の定数β
とし、AC成分Fc(i,j)、Fb(i,j)
((i,j)≠(0,0))を0とする。
Similarly, in the above prediction, if the current block is the block at the upper end of the unit image (the upper end of this one screen when the unit image is one screen), the block immediately above the current block And the upper left block does not exist, the DC component f after inverse quantization used in the above prediction
The values of c (0,0) and fb (0,0) are converted to the above constant β
And AC components Fc (i, j), Fb (i, j)
((I, j) ≠ (0, 0)) is set to 0.

【0048】さらに、上記予測において、現在のブロッ
クの左隣のブロックが、現在のブロックとは異なるビデ
オパケットに属する場合、上記予測で用いる逆量子化後
のDC成分fa(0,0)を上記の定数βとし、AC成
分Fa(i,j)((i,j)≠(0,0))を0とす
る。
Further, in the above-mentioned prediction, when the block on the left of the current block belongs to a video packet different from the current block, the DC component fa (0,0) after dequantization used in the above-mentioned prediction is converted to the above-mentioned block. And the AC component Fa (i, j) ((i, j) ≠ (0,0)) is set to 0.

【0049】同様に、上記予測において、現在のブロッ
クの上隣のブロックが、現在のブロックとは異なるビデ
オパケットに属する場合、上記予測で用いる逆量子化後
のDC成分fc(0,0)を上記の定数βとし、AC成
分Fc(i,j)((i,j)≠(0,0))を0とす
る。
Similarly, in the above-described prediction, if the block immediately above the current block belongs to a video packet different from the current block, the DC component fc (0,0) after the inverse quantization used in the prediction is used. The AC component Fc (i, j) ((i, j) ≠ (0,0)) is set to 0 with the above constant β.

【0050】また、上記予測において、現在のブロック
の左上のブロックが、現在のブロックとは異なるビデオ
パケットに属する場合、上記予測で用いる逆量子化後の
DC成分fb(0,0)を上記の定数βとし、AC成分
Fb(i,j)((i,j)≠(0,0))を0とす
る。
In the above-mentioned prediction, when the upper left block of the current block belongs to a video packet different from the current block, the DC component fb (0,0) after dequantization used in the prediction is converted to the above-mentioned block. A constant β is set, and an AC component Fb (i, j) ((i, j) ≠ (0, 0)) is set to 0.

【0051】このように、DC/AC予測器4において
は、異なるビデオパケットに属するブロック間ではDC
成分、AC成分の係数を参照しないようにすることで、
送信したビットストリームにエラーが混入した場合に
も、DC/AC予測によるエラーの伝播がビデオパケッ
ト内で収まるように構成されている。
As described above, in the DC / AC predictor 4, the DC / AC predictor 4
By not referring to the coefficients of the component and AC component,
Even when an error is mixed in the transmitted bit stream, the error propagation based on the DC / AC prediction is configured to be contained in the video packet.

【0052】[0052]

【発明が解決しようとする課題】上記のような従来の符
号化装置においては、送信バッファのオーバーフロー
や、受信側の仮想バッファであるVBVバッファのアン
ダーフローを回避するための処理が十分に考慮されてい
る訳ではなかった。
In the conventional encoding apparatus as described above, processing for avoiding overflow of the transmission buffer and underflow of the VBV buffer which is a virtual buffer on the receiving side is sufficiently considered. It was not.

【0053】また、通常は、量子化器3で用いる量子化
パラメータを調節して符号量を増減するが、量子化パラ
メータを最大(最も粗い量子化を行うようにして発生す
る符号量を抑える)にしても、送信バッファのオーバー
フローが起こるような場合についての処理が考慮されて
いなかった。
Normally, the quantization parameter used in the quantizer 3 is adjusted to increase or decrease the code amount. However, the quantization parameter is maximized (the code amount generated by performing the coarsest quantization is suppressed). However, no consideration has been given to the processing in the case where the transmission buffer overflows.

【0054】また、入力されるVOPのレートがF(1
/sec)である場合、1VOPを構成する全てのマク
ロブロックを1/F(sec)か、それよりも短い時間
で符号化することが要求される。
When the rate of the input VOP is F (1
/ Sec), it is required to encode all macroblocks constituting one VOP in 1 / F (sec) or in a shorter time.

【0055】しかしながら、例えば、動き検出手段11
がVOP内のオブジェクトの動きに応じて適応的に動き
ベクトルの探索範囲を変えるよう構成されている場合、
動き検出手段11が各マクロブロックの動きベクトルを
検出するのに要する時間は、マクロブロック毎に変化
し、そのため、1VOPの処理時間は一定でなくなる。
このような場合における、1VOPを構成する全てのマ
クロブロックを所定の時間内に符号化するための制御
が、従来は考慮されていなかった。
However, for example, the motion detecting means 11
Is configured to adaptively change the search range of the motion vector according to the motion of the object in the VOP,
The time required for the motion detection means 11 to detect the motion vector of each macroblock changes for each macroblock, and therefore, the processing time of one VOP is not constant.
In such a case, control for encoding all macroblocks constituting one VOP within a predetermined time has not been considered in the related art.

【0056】この発明は、上述のような課題を解消する
ためになされたもので、送信バッファのオーバーフロー
およびVBVバッファのアンダーフローを効果的に回避
できる符号化装置および符号化方法を提案するものであ
る。
The present invention has been made to solve the above problems, and proposes an encoding apparatus and an encoding method capable of effectively avoiding overflow of a transmission buffer and underflow of a VBV buffer. is there.

【0057】また、この発明は、1マクロブロックの符
号化に要する時間が一定でない場合にも、所定の時間内
で1VOP分の符号化を終了できる符号化装置および符
号化方法を提示するものである。
The present invention also provides an encoding apparatus and an encoding method capable of terminating encoding of one VOP within a predetermined time even when the time required for encoding one macroblock is not constant. is there.

【0058】[0058]

【課題を解決するための手段】この発明に係る符号化装
置は、マクロブロック単位の外部入力信号を符号化し
て、当該外部入力信号に対応する符号を出力する符号化
手段と、単位画像の符号化タイプ毎に予め定めた固定符
号を出力する固定符号出力手段と、前記符号化手段から
出力される前記符号または前記固定符号出力手段から出
力される前記固定符号を蓄積する蓄積手段と、前記符号
化手段によって符号化された前記符号の符号量に応じて
前記符号または前記固定符号のいずれかを前記蓄積手段
に蓄積するように制御する符号量制御手段とを備えるこ
とを特徴とする。
An encoding apparatus according to the present invention encodes an external input signal in units of macroblocks and outputs a code corresponding to the external input signal, and a code for a unit image. Fixed code output means for outputting a fixed code predetermined for each encoding type; storage means for accumulating the code output from the encoding means or the fixed code output from the fixed code output means; Code amount control means for controlling either the code or the fixed code to be stored in the storage means in accordance with the code amount of the code coded by the conversion means.

【0059】また、この発明に係る符号化装置における
符号量制御手段は、単位画像の符号化で発生させること
のできる最大符号量を当該単位画像毎に求め、当該最大
符号量に基づいて前記単位画像を構成するマクロブロッ
ク毎に、符号化手段から出力される符号または固定符号
出力手段から出力される固定符号のいずれかを蓄積手段
に蓄積するように制御することを特徴とする。
Further, the code amount control means in the encoding apparatus according to the present invention obtains the maximum code amount that can be generated by encoding the unit image for each unit image, and based on the maximum code amount, For each macro block constituting an image, control is performed such that either the code output from the encoding means or the fixed code output from the fixed code output means is stored in the storage means.

【0060】また、この発明に係る符号化装置における
符号量制御手段は、最大符号量Tmaxを以下の式に基
づいて求めることを特徴とする。 Tmax≦Bs−B ただし、Tmaxは最大符号量、Bsは蓄積手段の容量
(蓄積手段において許容される容量)およびBは前記蓄
積手段における占有量である。
Further, the code amount control means in the encoding apparatus according to the present invention is characterized in that the maximum code amount Tmax is obtained based on the following equation. Tmax ≦ Bs−B where Tmax is the maximum code amount, Bs is the capacity of the storage unit (capacity allowed in the storage unit), and B is the occupation amount in the storage unit.

【0061】また、この発明に係る符号化装置における
符号量制御手段は、最大符号量Tmaxを以下の式に基
づいて求めることを特徴とする。 Tmax≦vbv_bits+Rp ここに、Rp=R/F ただし、Tmaxは最大符号量、Rpは単位画像におけ
る蓄積手段から読み出されるビット数、Rは前記蓄積手
段から読み出されるビットレート、Fは符号化する単位
画像のレート、vbv_bitsは直前の単位画像にお
けるVBVバッファの占有量である。
Further, the code amount control means in the coding apparatus according to the present invention is characterized in that the maximum code amount Tmax is obtained based on the following equation. Tmax ≦ vbv_bits + Rp where Rp = R / F, where Tmax is the maximum code amount, Rp is the number of bits read from the storage unit in the unit image, R is the bit rate read from the storage unit, and F is the unit image to be coded. , Vbv_bits is the occupation amount of the VBV buffer in the immediately preceding unit image.

【0062】また、この発明に係る符号化装置における
符号量制御手段は、以下の式、あるいはそれと同等の結
果となる値に基づいて最大符号量Tmaxを求めること
を特徴とする。 Tmax≦min(vbv_bits+Rp,Bs−
B) ここに、Rp=R/F ただし、Tmaxは最大符号量、Rpは単位画像におけ
る蓄積手段から読み出されるビット数、Rは前記蓄積手
段から読み出されるビットレート、Fは符号化する単位
画像のレート、vbv_bitsは直前の単位画像にお
けるVBVバッファの占有量、Bsは前記蓄積手段の容
量(蓄積手段において許容される容量)およびBは前記
蓄積手段における占有量である。
Further, the code amount control means in the encoding apparatus according to the present invention is characterized in that the maximum code amount Tmax is obtained based on the following equation or a value that gives a result equivalent thereto. Tmax ≦ min (vbv_bits + Rp, Bs−
B) where Rp = R / F, where Tmax is the maximum code amount, Rp is the number of bits read from the storage unit in the unit image, R is the bit rate read from the storage unit, and F is the unit image to be coded. The rate, vbv_bits are the occupancy of the VBV buffer in the immediately preceding unit image, Bs is the capacity of the storage means (capacity allowed in the storage means), and B is the occupancy of the storage means.

【0063】また、この発明に係る符号化装置における
蓄積手段から読み出されるビットレートRが可変である
ことを特徴とする。
Further, the encoding apparatus according to the present invention is characterized in that the bit rate R read from the storage means is variable.

【0064】また、この発明に係る符号化装置における
符号量制御手段は、現在のマクロブロックに対して符号
化手段が出力する符号の符号量mb_bit、前記単位
画像を構成する現在のマクロブロックの一つ前のマクロ
ブロックまでの符号量Sc、前記単位画像の最大符号量
Tmax、前記単位画像を構成する現在のマクロブロッ
クに続いて符号化されるべきマクロブロック数M、前記
単位画像に対して固定符号出力手段が出力する固定符号
の符号長L、前記単位画像を構成するビデオパケット単
位で発生する付加的な符号の符号量αの間の関係が、 Sc+mb_bit+M×L+α>Tmax (ただし、α≧0)である場合に、現在のマクロブロッ
クに対して、前記固定符号出力手段が出力する前記固定
符号を蓄積手段に蓄積するよう制御することを特徴とす
る。
Further, the code amount control means in the coding apparatus according to the present invention includes a code amount mb_bit of a code outputted from the coding means for the current macroblock, and a code amount of one of the current macroblocks constituting the unit image. The code amount Sc up to the previous macroblock, the maximum code amount Tmax of the unit image, the number of macroblocks M to be coded following the current macroblock constituting the unit image, fixed for the unit image The relationship between the code length L of the fixed code output from the code output means and the code amount α of an additional code generated in video packet units constituting the unit image is Sc + mb_bit + M × L + α> Tmax (where α ≧ 0) ), The fixed code output from the fixed code output means is stored in the storage means for the current macroblock. It is characterized by controlling.

【0065】また、この発明に係る符号化装置における
符号量制御手段は、現在のマクロブロックに対して符号
化手段が出力する符号の符号量mb_bit、単位画像
を構成する前記現在のマクロブロックの一つ前のマクロ
ブロックまでの符号量Sc、前記単位画像の最大符号量
Tmax、前記単位画像を構成する前記現在のマクロブ
ロックに続いて符号化されるべきマクロブロック数M、
前記単位画像に対して固定符号出力手段が出力する固定
符号の符号長L、前記単位画像を構成するビデオパケッ
ト単位で発生する付加的な符号の符号量αの間の関係
が、 Sc+mb_bit+M×L+α>Tmax (ただし、α≧0)である場合に、前記現在のマクロブ
ロックに対して、前記固定符号出力手段が出力する前記
固定符号を蓄積手段に蓄積するよう制御するとともに、
前記単位画像を構成する前記現在のマクロブロックに続
いて符号化されるべきM個のマクロブロックに対して
も、前記固定符号出力手段が出力する前記固定符号を前
記蓄積手段に蓄積するよう制御することを特徴とする。
Further, the code amount control means in the encoding apparatus according to the present invention comprises: a code amount mb_bit of a code output from the encoding means for the current macroblock; The code amount Sc up to the previous macroblock, the maximum code amount Tmax of the unit image, the number M of macroblocks to be coded following the current macroblock constituting the unit image,
The relationship between the code length L of the fixed code output from the fixed code output means for the unit image and the code amount α of the additional code generated in video packet units constituting the unit image is Sc + mb_bit + M × L + α> When Tmax (where α ≧ 0), control is performed such that the fixed code output from the fixed code output means is stored in storage means for the current macroblock,
For the M macroblocks to be coded following the current macroblock constituting the unit image, control is performed so that the fixed code output from the fixed code output unit is stored in the storage unit. It is characterized by the following.

【0066】また、この発明に係る符号化装置における
符号量制御手段は、前記 Sc+mb_bit+M×L+α>Tmax なる関係がなりたち、かつ、単位画像の符号化タイプが
イントラである場合に、現在のマクロブロックから新し
いビデオパケットを構成することを特徴とする。
Further, the code amount control means in the coding apparatus according to the present invention is arranged such that when the relation of Sc + mb_bit + M × L + α> Tmax is satisfied and the coding type of the unit image is intra, the current macroblock From a new video packet.

【0067】また、この発明に係る符号化装置における
固定符号出力手段は、単位画像の符号化タイプにおいて
その符号量が最小となるマクロブロックに対応する符号
を出力することを特徴とする。
Further, the fixed code output means in the coding apparatus according to the present invention is characterized in that it outputs a code corresponding to a macroblock having the minimum code amount in the coding type of a unit image.

【0068】この発明に係る符号化装置は、マクロブロ
ック単位の外部入力信号を符号化して、当該外部入力信
号に対応する符号を出力する符号化手段と、単位画像の
符号化タイプ毎に予め定めた固定符号を出力する固定符
号出力手段と、前記符号化手段から出力される前記符号
または前記固定符号出力手段から出力される前記固定符
号を蓄積する蓄積手段と、単位画像を構成する先頭のマ
クロブロックが入力されてからの経過時間に基づいて前
記符号または前記固定符号のいずれかを前記蓄積手段に
蓄積するように制御する符号量制御手段とを備えること
を特徴とする。
An encoding device according to the present invention encodes an external input signal in units of macroblocks, and outputs a code corresponding to the external input signal, and a predetermined coding unit for each coding type of a unit image. Fixed code output means for outputting the fixed code, storage means for storing the code output from the coding means or the fixed code output from the fixed code output means, and a first macro constituting a unit image And a code amount control means for controlling either the code or the fixed code to be stored in the storage means based on an elapsed time from the input of the block.

【0069】この発明に係る符号化装置は、マクロブロ
ック単位の外部入力信号を符号化して、当該外部入力信
号に対応する符号を出力する符号化手段と、単位画像の
符号化タイプ毎に予め定めた固定符号を出力する固定符
号出力手段と、前記符号化手段から出力される前記符号
または前記固定符号出力手段から出力される前記固定符
号を蓄積する蓄積手段と、前記符号化手段によって符号
化された前記符号の符号量および単位画像を構成する先
頭のマクロブロックが入力されてからの経過時間に基づ
いて前記符号または前記固定符号のいずれかを前記蓄積
手段に蓄積するように制御する符号量制御手段とを備え
ることを特徴とする。
An encoding apparatus according to the present invention encodes an external input signal in units of macroblocks, and outputs a code corresponding to the external input signal, and a predetermined unit for each encoding type of a unit image. Fixed code output means for outputting the fixed code, storage means for storing the code output from the coding means or the fixed code output from the fixed code output means, Code amount control for storing either the code or the fixed code in the storage means based on the code amount of the code and the elapsed time since the leading macroblock constituting the unit image is input. Means.

【0070】この発明に係る符号化方法は、マクロブロ
ック単位の外部入力信号を符号化して、当該外部入力信
号に対応する符号を出力する符号化工程と、単位画像の
符号化タイプ毎に予め定めた固定符号を与える固定符号
出力工程と、前記符号化工程により得られる前記符号ま
たは前記固定符号出力工程から与えられる前記固定符号
を蓄積する蓄積工程と、前記符号化工程によって符号化
された前記符号の符号量に応じて前記符号または前記固
定符号のいずれかを前記蓄積工程で蓄積するように制御
する符号量制御工程とを含むことを特徴とする。
The encoding method according to the present invention encodes an external input signal in units of macroblocks, and outputs a code corresponding to the external input signal, and determines in advance for each encoding type of a unit image. A fixed code output step of providing the fixed code, a storage step of storing the code obtained in the coding step or the fixed code given from the fixed code output step, and the code coded by the coding step. And a code amount control step of controlling either the code or the fixed code to be stored in the storage step in accordance with the code amount.

【0071】また、この発明に係る符号化方法における
符号量制御工程は、単位画像の符号化で発生させること
のできる最大符号量を当該単位画像毎に求め、当該最大
符号量に基づいて前記単位画像を構成するマクロブロッ
ク毎に、符号化工程から与えられる符号または固定符号
出力工程から与えられる固定符号のいずれかを蓄積工程
で蓄積するように制御することを特徴とする。
In the code amount control step in the encoding method according to the present invention, the maximum code amount that can be generated by encoding the unit image is obtained for each unit image, and the unit code is calculated based on the maximum code amount. It is characterized in that, for each macroblock constituting an image, control is performed such that either the code given from the encoding step or the fixed code given from the fixed code output step is stored in the storage step.

【0072】また、この発明に係る符号化方法における
符号量制御工程は、最大符号量Tmaxを以下の式に基
づいて求めることを特徴とする。 Tmax≦Bs−B ただし、Tmaxは最大符号量、Bsは蓄積工程におい
て許容される容量およびBは前記蓄積工程における占有
量である。
The code amount control step in the encoding method according to the present invention is characterized in that the maximum code amount Tmax is obtained based on the following equation. Tmax ≦ Bs−B where Tmax is the maximum code amount, Bs is the capacity allowed in the accumulation step, and B is the occupation amount in the accumulation step.

【0073】また、この発明に係る符号化方法における
符号量制御工程は、最大符号量Tmaxを以下の式に基
づいて求めることを特徴とする。 Tmax≦vbv_bits+Rp ここに、Rp=R/F ただし、Tmaxは最大符号量、Rpは単位画像におけ
る蓄積工程における読み出しのビット数、Rは前記蓄積
工程における読み出しのビットレート、Fは符号化する
単位画像のレート、vbv_bitsは直前の単位画像
におけるVBVバッファの占有量である。
The code amount control step in the encoding method according to the present invention is characterized in that the maximum code amount Tmax is obtained based on the following equation. Tmax ≦ vbv_bits + Rp where Rp = R / F, where Tmax is the maximum code amount, Rp is the number of bits read in the storage step in the unit image, R is the bit rate of the read in the storage step, and F is the unit image to be coded. , Vbv_bits is the occupation amount of the VBV buffer in the immediately preceding unit image.

【0074】また、この発明に係る符号化方法における
符号量制御工程は、以下の式、あるいはそれと同等の結
果となる値に基づいて最大符号量Tmaxを求めること
を特徴とする。 Tmax≦min(vbv_bits+Rp,Bs−
B) ここに、Rp=R/F ただし、Tmaxは最大符号量、Rpは単位画像におけ
る蓄積工程における読み出しのビット数、Rは蓄積工程
における読み出しのビットレート、Fは符号化する単位
画像のレート、vbv_bitsは直前の単位画像にお
けるVBVバッファの占有量、Bsは前記蓄積工程にお
いて許容される容量およびBは前記蓄積工程における占
有量である。
Further, the code amount control step in the encoding method according to the present invention is characterized in that the maximum code amount Tmax is obtained based on the following equation or a value having a result equivalent thereto. Tmax ≦ min (vbv_bits + Rp, Bs−
B) where Rp = R / F, where Tmax is the maximum code amount, Rp is the number of bits read in the storage process in the unit image, R is the bit rate of read in the storage process, and F is the rate of the unit image to be coded. , Vbv_bits are the occupancy of the VBV buffer in the immediately preceding unit image, Bs is the capacity allowed in the accumulation step, and B is the occupancy in the accumulation step.

【0075】また、この発明に係る符号化方法における
蓄積工程における読み出しのビットレートRが可変であ
ることを特徴とする。
Further, in the encoding method according to the present invention, the read bit rate R in the storage step is variable.

【0076】また、この発明に係る符号化方法における
符号量制御工程は、現在のマクロブロックに対して符号
化工程から与えられる符号の符号量mb_bit、単位
画像を構成する現在のマクロブロックの一つ前のマクロ
ブロックまでの符号量Sc、前記単位画像の最大符号量
Tmax、前記単位画像を構成する現在のマクロブロッ
クに続いて符号化されるべきマクロブロック数M、前記
単位画像に対して固定符号出力工程が出力する符号の符
号長L、前記単位画像を構成するビデオパケット単位で
発生する付加的な符号の符号量αの間の関係が、 Sc+mb_bit+M×L+α>Tmax (ただし、α≧0)である場合に、現在のマクロブロッ
クに対して、固定符号出力工程から与えられる前記固定
符号を蓄積工程で蓄積するよう制御することを特徴とす
る。
The code amount control step in the coding method according to the present invention includes the code amount mb_bit of the code given from the coding step for the current macroblock, and one of the current macroblocks constituting the unit image. The code amount Sc up to the previous macroblock, the maximum code amount Tmax of the unit image, the number M of macroblocks to be coded following the current macroblock constituting the unit image, a fixed code for the unit image The relationship between the code length L of the code output by the output step and the code amount α of the additional code generated in video packet units constituting the unit image is Sc + mb_bit + M × L + α> Tmax (where α ≧ 0). In some cases, for the current macroblock, control is performed so that the fixed code given from the fixed code output step is accumulated in the accumulation step. It is characterized by that.

【0077】また、この発明に係る符号化方法における
符号量制御工程は、現在のマクロブロックに対して符号
化工程から与えられる符号の符号量mb_bit、単位
画像を構成する前記現在のマクロブロックの一つ前のマ
クロブロックまでの符号量Sc、前記単位画像の最大符
号量Tmax、前記単位画像を構成する前記現在のマク
ロブロックに続いて符号化されるべきマクロブロック数
M、前記単位画像に対して固定符号出力工程から与えら
れる固定符号の符号長L、前記単位画像を構成するビデ
オパケット単位で発生する付加的な符号の符号量αの間
の関係が、 Sc+mb_bit+M×L+α>Tmax (ただし、α≧0)である場合に、前記現在のマクロブ
ロックに対して、前記固定符号出力工程から与えられる
前記固定符号を蓄積工程で蓄積するよう制御するととも
に、前記単位画像を構成する前記現在のマクロブロック
に続いて符号化されるべきM個のマクロブロックに対し
ても、前記固定符号出力工程から与えられる前記固定符
号を前記蓄積工程で蓄積するよう制御することを特徴と
する。
Further, the code amount control step in the encoding method according to the present invention includes the code amount mb_bit of the code given from the encoding step for the current macroblock, one of the current macroblocks constituting the unit image. The code amount Sc up to the previous macroblock, the maximum code amount Tmax of the unit image, the number M of macroblocks to be coded following the current macroblock constituting the unit image, The relationship between the code length L of the fixed code given from the fixed code output step and the code amount α of the additional code generated in video packet units constituting the unit image is Sc + mb_bit + M × L + α> Tmax (where α ≧ 0), the fixed code provided from the fixed code output step is stored for the current macroblock. Control to accumulate in the step, and also for the M macroblocks to be encoded following the current macroblock constituting the unit image, the fixed code given from the fixed code output step It is characterized in that accumulation is controlled in the accumulation step.

【0078】また、この発明に係る符号化方法における
符号量制御工程は、前記 Sc+mb_bit+M×L+α>Tmax なる関係がなりたち、かつ、単位画像の符号化タイプが
イントラである場合に、現在のマクロブロックから新し
いビデオパケットを構成することを特徴とする。
In the code amount control step in the coding method according to the present invention, when the relationship of Sc + mb_bit + M × L + α> Tmax is satisfied and the coding type of the unit image is intra, the current macro block From a new video packet.

【0079】また、この発明に係る符号化方法における
固定符号出力工程は、単位画像の符号化タイプにおいて
その符号量が最小となるマクロブロックに対応する符号
を出力することを特徴とする。
Further, the fixed code output step in the coding method according to the present invention is characterized in that a code corresponding to a macroblock having a minimum code amount in a unit image coding type is output.

【0080】この発明に係る符号化方法は、マクロブロ
ック単位の外部入力信号を符号化して、当該外部入力信
号に対応する符号を出力する符号化工程と、単位画像の
符号化タイプ毎に予め定めた固定符号を与える固定符号
出力工程と、前記符号化工程から与えられる前記符号ま
たは前記固定符号出力工程から与えられる前記固定符号
を蓄積する蓄積工程と、前記単位画像を構成する先頭の
マクロブロックが入力されてからの経過時間に基づいて
前記符号または前記固定符号のいずれかを前記蓄積工程
で蓄積するように制御する符号量制御工程とを含むこと
を特徴とする。
The encoding method according to the present invention encodes an external input signal in units of macroblocks and outputs a code corresponding to the external input signal, and determines in advance for each encoding type of a unit image. A fixed code output step of providing the fixed code, an accumulation step of accumulating the code given from the encoding step or the fixed code given from the fixed code output step, and a top macroblock constituting the unit image. A code amount control step of controlling either the code or the fixed code to be stored in the storage step based on an elapsed time from the input.

【0081】この発明に係る符号化方法は、マクロブロ
ック単位の外部入力信号を符号化して、当該外部入力信
号に対応する符号を出力する符号化工程と、単位画像の
符号化タイプ毎に予め定めた固定符号を出力する固定符
号出力工程と、前記符号化工程から与えられる前記符号
または前記固定符号出力工程から与えられる前記固定符
号を蓄積する蓄積工程と、前記符号化工程によって符号
化された前記符号の符号量および前記単位画像を構成す
る先頭のマクロブロックが入力されてからの経過時間に
基づいて前記符号または前記固定符号のいずれかを前記
蓄積工程で蓄積するように制御する符号量制御工程とを
含むことを特徴とする。
The encoding method according to the present invention encodes an external input signal in units of macroblocks and outputs a code corresponding to the external input signal, and determines in advance for each encoding type of a unit image. A fixed code output step of outputting the fixed code, a storage step of storing the code given from the encoding step or the fixed code given from the fixed code output step, and the encoding step performed by the encoding step. A code amount control step of controlling either the code or the fixed code to be stored in the storage step based on a code amount of a code and an elapsed time since a leading macroblock constituting the unit image is input; And characterized in that:

【0082】[0082]

【発明の実施の形態】以下、この発明をその実施の形態
を示す図面に基づいて具体的に説明する。 実施の形態1.図1はこの発明の実施の形態1である符
号化装置を示すものである。同図において、1は外部入
力信号を第一の入力とする減算器であり、減算器1の出
力はDCT手段2、量子化器3を通して、DC/AC予
測器4と逆量子化器6に入力される。DC/AC予測器
4の出力は可変長符号化手段5aの第一の入力に与えら
れる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be specifically described with reference to the drawings showing the embodiments. Embodiment 1 FIG. FIG. 1 shows an encoding apparatus according to Embodiment 1 of the present invention. In the figure, reference numeral 1 denotes a subtractor having an external input signal as a first input. The output of the subtracter 1 is passed through a DCT means 2 and a quantizer 3 to a DC / AC predictor 4 and an inverse quantizer 6. Is entered. The output of the DC / AC predictor 4 is provided to a first input of the variable length coding means 5a.

【0083】一方、逆量子化器6の出力は、逆DCT手
段7を通して、加算器8の第一の入力に与えられる。加
算器8の出力はメモリ9の第一の入力に与えられ、メモ
リ9の出力は予測画像作成手段10の第一の入力と動き
検出手段11の第一の入力に与えられる。
On the other hand, the output of the inverse quantizer 6 is supplied to the first input of the adder 8 through the inverse DCT means 7. The output of the adder 8 is provided to a first input of a memory 9, and the output of the memory 9 is provided to a first input of a predicted image creating means 10 and a first input of a motion detecting means 11.

【0084】動き検出手段11の第二の入力には外部入
力信号が与えられ、動き検出手段11の出力は予測画像
作成手段10の第二の入力と動きベクトル予測器12に
与えられる。予測画像作成手段10の出力は減算器1の
第二の入力と加算器8の第二の入力に与えられる。
An external input signal is supplied to a second input of the motion detecting means 11, and an output of the motion detecting means 11 is supplied to a second input of the predicted image creating means 10 and a motion vector predictor 12. The output of the predicted image creating means 10 is provided to a second input of the subtractor 1 and a second input of the adder 8.

【0085】また、動きベクトル予測器12の出力は可
変長符号化手段5aの第二の入力に与えられる。なお、
符号化手段は、上述の外部入力信号が入力される減算器
1から、この外部入力信号に対応する可変長符号が出力
される可変長符号化手段5aまでを含んで構成される
(もちろん、ここに示された構成は一例にしか過ぎず、
外部入力信号に対応する符号化を行うことができる既知
の構成を用いることができる。)。
The output of the motion vector predictor 12 is given to the second input of the variable length coding means 5a. In addition,
The encoding means includes the above-described subtractor 1 to which the external input signal is input, and the variable-length encoding means 5a to which the variable-length code corresponding to the external input signal is output (of course, here). The configuration shown in is only an example,
A known configuration that can perform encoding corresponding to an external input signal can be used. ).

【0086】可変長符号化手段5aの第一の出力は一時
バッファ101の第一の入力に与えられ、可変長符号化
手段5aの第二の出力は符号量制御手段102の入力に
与えられる。
The first output of the variable length coding means 5a is provided to a first input of a temporary buffer 101, and the second output of the variable length coding means 5a is provided to an input of a code amount control means 102.

【0087】一時バッファ101の第二の入力には固定
符号出力手段104の出力が与えられ、一時バッファ1
01の第三の入力には符号量制御手段102の第一の出
力が与えられる。一時バッファ101の出力は送信バッ
ファ103の第一の入力に与えられる(ここでは、一時
バッファ101または送信バッファ103が蓄積手段に
相当する)。
The output of the fixed code output means 104 is given to the second input of the temporary buffer 101,
A first output of the code amount control means 102 is given to a third input of 01. The output of the temporary buffer 101 is provided to a first input of the transmission buffer 103 (here, the temporary buffer 101 or the transmission buffer 103 corresponds to a storage unit).

【0088】符号量制御手段102の第二の出力はメモ
リ9の第二の入力に与えられ、符号量制御手段102の
第三の出力は送信バッファ103の第二の入力に与えら
れる。送信バッファ103の出力はビットストリームと
して出力(送信)される。
The second output of the code amount control means 102 is provided to a second input of the memory 9, and the third output of the code amount control means 102 is provided to a second input of the transmission buffer 103. The output of the transmission buffer 103 is output (transmitted) as a bit stream.

【0089】この出力(送信)されたビットストリーム
は、復号装置側において受信され復号処理が施される。
The output (transmitted) bit stream is received and decoded on the decoding device side.

【0090】次に動作について説明する。まず、映像信
号は図16に示したように基本処理単位であるマクロブ
ロックに分割され、減算器1および動き検出手段11に
入力マクロブロックとして入力される。例えば、入力さ
れる映像信号が4:2:0の場合、輝度信号(Y)の1
6画素×16ラインが、2つの色差信号(Cb、Cr)
の8画素×8ラインと画面上で同じ大きさとなるので、
8画素×8ラインのブロックが6つで、1つのマクロブ
ロックが構成される。
Next, the operation will be described. First, the video signal is divided into macroblocks, which are basic processing units, as shown in FIG. 16, and input to the subtractor 1 and the motion detecting means 11 as input macroblocks. For example, when the input video signal is 4: 2: 0, the luminance signal (Y) 1
6 pixels x 16 lines are two color difference signals (Cb, Cr)
8 pixels x 8 lines of the same size on the screen
Six blocks of 8 pixels × 8 lines constitute one macro block.

【0091】イントラ符号化を行う場合、各ブロックは
DCTを施してから量子化する。量子化されたDCT係
数はDC/AC予測器4において係数の予測を行った
後、量子化パラメータなどの付加情報とともに可変長符
号化手段5aにより可変長符号化する。量子化されたD
CT係数は、逆量子化器6によって逆量子化され、逆D
CT手段7によって逆DCTを行って復号され、この逆
DCT手段7の出力である復号画像はメモリ9に記憶さ
れる。
When performing intra coding, each block is quantized after DCT. The quantized DCT coefficients are subjected to coefficient prediction in a DC / AC predictor 4 and then variable-length encoded by variable-length encoding means 5a together with additional information such as quantization parameters. Quantized D
The CT coefficient is inversely quantized by the inverse quantizer 6, and the inverse D
The inverse DCT is performed by the CT means 7 and decoded. The decoded image output from the inverse DCT means 7 is stored in the memory 9.

【0092】インター符号化の場合は、動き検出手段1
1において、入力されたマクロブロックの動きを示す動
きベクトルを検出する。動きベクトルは、メモリ9に記
憶された復号画像の中で、入力マクロブロックとの誤差
が最も小さくなるような位置を示すものである。
In the case of inter coding, the motion detecting means 1
In step 1, a motion vector indicating the motion of the input macroblock is detected. The motion vector indicates a position in the decoded image stored in the memory 9 where the error from the input macroblock is minimized.

【0093】予測画像作成手段10は、動き検出手段1
1によって検出された動きベクトルに基づいて予測画像
を作成する。次に、入力マクロブロックとこの予測画像
の差分を求め、その差分信号に対してDCT手段2によ
りDCTを施し、量子化器3により量子化を行う。
The predicted image creating means 10 includes the motion detecting means 1
A predicted image is created based on the motion vector detected by step (1). Next, a difference between the input macroblock and the predicted image is obtained, DCT is performed on the difference signal by the DCT unit 2, and quantization is performed by the quantizer 3.

【0094】量子化器3の出力である量子化されたDC
T係数は、DC/AC予測器4において予測された係
数、動きベクトル予測器12により予測符号化された動
きベクトルおよび量子化パラメータなどの付加情報とと
もに可変長符号化手段5aにより可変長符号化される。
また、量子化されたDCT係数は、逆量子化器6によっ
て逆量子化、逆DCT手段7によって逆DCTを行った
後、予測画像作成手段10より出力される予測画像と加
算されて、メモリ9に記憶される。
The quantized DC output from the quantizer 3
The T coefficient is variable-length coded by the variable-length coding unit 5a together with the coefficient predicted by the DC / AC predictor 4, the motion vector predictively coded by the motion vector predictor 12, and additional information such as a quantization parameter. You.
The quantized DCT coefficient is subjected to inverse quantization by the inverse quantizer 6 and inverse DCT by the inverse DCT means 7, and is then added to the predicted image output from the predicted image creation means 10, and is stored in the memory 9. Is stored.

【0095】次に可変長符号化手段5aの動作を詳しく
説明する。可変長符号化手段5aは、マクロブロック毎
に、量子化されたDCT係数と付加情報を符号化して
(符号化工程)一時バッファ101に書き込み、その符
号量を符号量制御手段102に出力する。
Next, the operation of the variable length coding means 5a will be described in detail. The variable-length encoding unit 5a encodes the quantized DCT coefficient and additional information for each macroblock (encoding process), writes the encoded information into the temporary buffer 101, and outputs the code amount to the code amount control unit 102.

【0096】例えば、MPEG4のI−VOPの場合、
まず、DC/AC予測器4から出力される各ブロックの
DCT係数のAC成分をジグザグスキャン等の方法で1
次元スキャンし、0の個数と非零の係数の組み合わせを
符号化するランレングス符号化を行う。このランレング
ス符号化された各ブロックのAC成分データは一時バッ
ファ101に書き込まれる。
For example, in the case of an I-VOP of MPEG4,
First, the AC component of the DCT coefficient of each block output from the DC / AC predictor 4 is converted into one by a method such as zigzag scanning.
A dimension scan is performed, and run-length encoding is performed to encode a combination of the number of 0s and non-zero coefficients. The run-length coded AC component data of each block is written to the temporary buffer 101.

【0097】図2(a)に示すように、各ブロックの係
数データの後には、イントラ/インター等を示すマクロ
ブロックタイプ(MTYPE)と色差の各ブロックに非
零のAC係数があったかどうかを示すcbpcをまとめ
て符号化したmcbpc、量子化パラメータを示すdq
uant、各ブロックのDCT係数のDC成分、AC予
測を行ったかどうかを示すac_pred_flag、
Yの各ブロックに非零のAC係数があったかどうかを示
すcbpyが順に符号化されて一時バッファ101に書
き込まれる。
As shown in FIG. 2A, the coefficient data of each block is followed by a macroblock type (MTYPE) indicating intra / inter, etc., and whether or not each block of color difference has a non-zero AC coefficient. mcbpc that collectively encodes cbpc, dq indicating a quantization parameter
ant, the DC component of the DCT coefficient of each block, ac_pred_flag indicating whether AC prediction has been performed,
Cbpy indicating whether there is a non-zero AC coefficient in each block of Y is sequentially encoded and written into the temporary buffer 101.

【0098】なお、マクロブロック毎にこれらの符号量
の合計が符号量制御手段102に出力される。
Note that the total of these code amounts is output to the code amount control means 102 for each macroblock.

【0099】同様に、MPEG4のP−VOPの場合は
図3(a)のような順で符号化したデータが一時バッフ
ァ101に書き込まれる。
Similarly, in the case of the MPEG-4 P-VOP, the data encoded in the order shown in FIG.

【0100】符号量制御手段102は、可変長符号化手
段5aから出力される各マクロブロックの符号量に基づ
いて、各ビデオパケットの長さが予め定められた値以下
になるようにマクロブロックをまとめ、一時バッファ1
01から送信バッファへと転送する。
The code amount control means 102 converts the macroblocks based on the code amount of each macroblock output from the variable length coding means 5a such that the length of each video packet becomes equal to or less than a predetermined value. Summary, temporary buffer 1
01 to the transmission buffer.

【0101】例えば、MPEG4の場合、図2(b)、
図3(b)に示したように、ビデオパケットの先頭には
ヘッダを付加し、規定されたビットストリームの順に並
べ替えて転送する。
For example, in the case of MPEG4, FIG.
As shown in FIG. 3B, a header is added to the head of the video packet, and the video packet is rearranged in the specified bit stream and transferred.

【0102】また、符号量制御手段102は、送信バッ
ファ103がオーバーフローを起こさないように、ある
いは、VBV(Video Buffering Ve
rifier)バッファ(受信側におけるビットストリ
ーム受信に要する仮想的なバッファ(必要とされる容量
は、例えば、送信ビットストリーム中のヘッダに記述さ
れる)。通常、最低I−VOP分の容量が設定され
る。)がアンダーフローを起こさないように、VOP毎
に最大符号量Tmaxを設定し、当該VOPの符号量が
Tmaxより多くならないように、可変長符号化手段5
aの出力または固定符号出力手段104の出力のうち、
一時バッファ101に書きこむ固定符号を選択する。
The code amount control means 102 controls the transmission buffer 103 so as not to cause overflow or to prevent VBV (Video Buffering VeV) from occurring.
(a virtual buffer required for receiving a bit stream on the receiving side (the required capacity is described in, for example, a header in a transmission bit stream). Usually, a capacity for at least the I-VOP is set. The maximum code amount Tmax is set for each VOP so that the underflow does not occur, and the variable-length coding unit 5 sets the maximum code amount Tmax so that the code amount of the VOP does not exceed Tmax.
a or the output of the fixed code output unit 104
A fixed code to be written in the temporary buffer 101 is selected.

【0103】なお、ここにおける最大符号量Tmaxと
は、送信バッファ103がオーバーフローを起こさず、
VBVバッファがアンダーフローしないための符号量の
上限値といえる。
The maximum code amount Tmax here means that the transmission buffer 103 does not cause overflow,
This can be said to be the upper limit value of the code amount for preventing the VBV buffer from underflowing.

【0104】以下、動作の詳細について述べる。符号量
制御手段102は、各VOPの符号化を始める前に、当
該VOPの最大符号量Tmaxを求める。例えば、送信
バッファ103の容量がBs(bits)、送信バッフ
ァ103の現在の残量(すなわち、送信バッファやVB
Vバッファ等の記憶手段に蓄積され、当該送信バッファ
やVBVバッファ等の記憶手段より読み出されていない
(送信バッファやVBVバッファ等の記憶手段に残留し
ている(保存されている))データの量(残容量)であ
り、このようなデータの量のことを一般的にはバッファ
占有量、あるいは占有量(occupancy)と表現
する。以下、単に占有量と称す。)がB(bits)と
すると、送信バッファ103がオーバーフローを起こさ
ないためには、当該VOPの符号量をBs−B以下とす
れば十分である。従って、最大符号量TmaxをTma
x≦Bs−Bと設定すればよい。
The details of the operation will be described below. Before starting coding of each VOP, the code amount control means 102 obtains the maximum code amount Tmax of the VOP. For example, the capacity of the transmission buffer 103 is Bs (bits), and the current remaining amount of the transmission buffer 103 (that is, the transmission buffer or the VB
Of data that is stored in a storage unit such as a V buffer and is not read out from the storage unit such as the transmission buffer or the VBV buffer (remains (is stored) in a storage unit such as a transmission buffer or a VBV buffer). This is the amount (remaining capacity), and such an amount of data is generally expressed as a buffer occupancy or an occupancy. Hereinafter, it is simply referred to as an occupancy. ) Is B (bits), it is sufficient to set the code amount of the VOP to Bs−B or less in order to prevent the transmission buffer 103 from overflowing. Therefore, the maximum code amount Tmax is set to Tma
x ≦ Bs−B may be set.

【0105】また、VBVバッファの管理をする場合、
送信バッファ103の読み出しビットレートがR(bi
ts/sec)、符号化するVOPのレートがF(1/
sec)とすると、1VOP期間に送信バッファ103
から読み出されるビット数Rpは、 Rp=R/F となり、1VOP期間にVBVバッファが受信するビッ
ト数もRpとなる。
When managing the VBV buffer,
When the read bit rate of the transmission buffer 103 is R (bi
ts / sec), and the rate of the VOP to be encoded is F (1 /
sec), the transmission buffer 103 during one VOP period
Is Rp = R / F, and the number of bits received by the VBV buffer during one VOP period is also Rp.

【0106】そこで、現在のVOPの1つ前のVOPの
デコード時間におけるVBVバッファの占有量をvbv
_bits(bits)とすると、VBVバッファがア
ンダーフローしないためには、当該VOPの符号量をv
bv_bits+Rp以下とすればよい。すなわち、最
大符号量Tmaxを Tmax≦vbv_bits+Rp と設定すればよい。
Therefore, the occupancy of the VBV buffer in the decoding time of the VOP immediately before the current VOP is represented by vbv
_Bits (bits), in order to prevent the VBV buffer from underflowing, set the code amount of the VOP to v
bv_bits + Rp or less. That is, the maximum code amount Tmax may be set as Tmax ≦ vbv_bits + Rp.

【0107】従って、符号量制御手段102は、各VO
Pの符号化を始める前に、当該VOPの最大符号量Tm
axを Tmax=min(vbv_bits+Rp,Bs−
B) と設定する。(min(a,b)は、aまたはbのいず
れか小さい方をその値とすることを示す)。
Therefore, the code amount control means 102 sets each VO
Before starting encoding of P, the maximum code amount Tm of the VOP
ax is defined as Tmax = min (vbv_bits + Rp, Bs−
B) Set as (Min (a, b) indicates that the smaller of a and b is used as its value).

【0108】なお、VBVバッファの占有量vbv_b
itsは、受信側における占有量を推定するものである
が、受信側でアンダーフローが起きた場合はデコード時
間を遅らせるなどの対処を行う場合は、VBVバッファ
のアンダーフローを管理する必要がない。このようにV
BVバッファのアンダフローを管理する必要がない場合
は、 Tmax=Bs−B と設定すればよい。
The occupation amount vbv_b of the VBV buffer
The “its” is for estimating the amount of occupancy on the receiving side. However, when an underflow occurs on the receiving side, it is not necessary to manage the underflow of the VBV buffer when taking measures such as delaying the decoding time. Thus V
When it is not necessary to manage the underflow of the BV buffer, it is sufficient to set Tmax = Bs-B.

【0109】送信バッファ103の占有量Bは時間的に
変化するため、最大符号量Tmaxの値も時間的に変化
するものとなるが、この最大符号量TmaxはVOP毎
に計算されるものである。
Since the occupation amount B of the transmission buffer 103 changes over time, the value of the maximum code amount Tmax also changes over time, but this maximum code amount Tmax is calculated for each VOP. .

【0110】次に、符号量制御手段102は、マクロブ
ロック毎に現在のVOPの符号量を求め、図4および図
5に示すフローチャートに従って、当該マクロブロック
に対して、可変長符号化手段5aから出力される符号ま
たは固定符号出力手段104から出力される固定符号の
うち、一時バッファ101に蓄積する符号または固定符
号のいずれかを選択して(選択して蓄積するように制御
する。符号量制御工程。)、一時バッファ101に符号
または固定符号のいずれかを蓄積する(蓄積工程。一時
バッファ101から送信バッファ103への送信を含め
て蓄積工程としてもよい)。
Next, the code amount control means 102 obtains the code amount of the current VOP for each macroblock, and, according to the flowcharts shown in FIGS. From the output code or the fixed code output from the fixed code output means 104, either the code to be stored in the temporary buffer 101 or the fixed code is selected (the code is controlled so as to be selected and stored). Step), either the code or the fixed code is accumulated in the temporary buffer 101 (accumulation step. The accumulation step may include transmission from the temporary buffer 101 to the transmission buffer 103).

【0111】なお、図4は現在のVOPがP−VOP
(符号化タイプがインター)の場合のフローチャートを
示しており、図5は現在のVOPがI−VOP(符号化
タイプがイントラ)の場合のフローチャートを示してい
る。
FIG. 4 shows that the current VOP is P-VOP.
FIG. 5 shows a flowchart in the case where the encoding type is inter, and FIG. 5 shows a flowchart in the case where the current VOP is an I-VOP (the encoding type is intra).

【0112】(P−VOPの場合の符号量制御につい
て)まず、P−VOPの場合の符号量制御102の動作
を説明する。P−VOPの場合、可変長符号化手段5a
は図3(a)に示したように各ブロックの係数データ、
not_coded、mcbpc、動きベクトル、cb
py、dquantを各マクロブロックに対して出力す
るが、これらの符号は必ずしも全てが存在するわけでは
なく、例えば、各ブロックの係数データが全て0であ
り、かつ、動きベクトルが(0,0)である場合は、n
ot_coded=1の1bitのみが存在する。これ
が、P−VOPのマクロブロックで最小符号量となる符
号である。
(Regarding code amount control in case of P-VOP) First, the operation of the code amount control 102 in the case of P-VOP will be described. In the case of a P-VOP, the variable length coding means 5a
Is coefficient data of each block as shown in FIG.
not_coded, mcbpc, motion vector, cb
Although py and dquant are output for each macroblock, these codes do not always exist. For example, the coefficient data of each block is all 0, and the motion vector is (0, 0). If n
There is only one bit of ot_coded = 1. This is the code having the minimum code amount in the P-VOP macroblock.

【0113】そこで、P−VOPの場合、固定符号出力
手段104は、固定符号としてnot_coded=1
の1bitのみを出力する(固定符号出力工程。なお、
後述するようにI−VOPに対しても固定符号を出力す
る場合も固定符号出力工程と称する)。つまり、固定符
号出力手段104は、現在のVOPの符号化タイプに対
して、最小符号量となるマクロブロックの固定符号を出
力する。
Therefore, in the case of the P-VOP, the fixed code output means 104 uses not_coded = 1 as the fixed code.
Is output (fixed code output step.
A case where a fixed code is output also for an I-VOP as described later is also referred to as a fixed code output step.) That is, the fixed code output unit 104 outputs the fixed code of the macroblock having the minimum code amount for the current VOP coding type.

【0114】例えば、各ブロックの係数データが全て0
であり、かつ、動きベクトルが(0,0)である場合
は、not_coded=1の1bitのみが存在する
ので、P−VOPの場合、固定符号出力手段104が出
力する固定符号の符号長LはL=1となる。
For example, if the coefficient data of each block is all 0
And when the motion vector is (0, 0), only one bit of not_coded = 1 exists. In the case of P-VOP, the code length L of the fixed code output from the fixed code output unit 104 is L = 1.

【0115】符号量制御手段102は、マクロブロック
毎に現在のVOPの符号量を求め、残りのマクロブロッ
クすべてに対して固定符号出力手段104から出力され
る固定符号を選択したとしても、VOPを構成するすべ
てのマクロブロックの符号量が当該VOPの最大符号量
Tmaxを越える場合に、現在のマクロブロックの符号
を固定符号出力手段104から出力される固定符号に置
き換える。
The code amount control means 102 obtains the code amount of the current VOP for each macroblock, and even if the fixed code output from the fixed code output means 104 is selected for all the remaining macroblocks, If the code amount of all the constituent macroblocks exceeds the maximum code amount Tmax of the VOP, the code of the current macroblock is replaced with the fixed code output from the fixed code output unit 104.

【0116】すなわち、VOPを構成するマクロブロッ
クの総数をAとし、現在のマクロブロックのマクロブロ
ック番号をK(ただし、0≦K≦A−1)とすると、こ
れに続く符号化されるべきマクロブロック数M(残りの
マクロブロック数M)は M=A−K−1 と表される。
That is, assuming that the total number of macroblocks constituting a VOP is A and the macroblock number of the current macroblock is K (where 0 ≦ K ≦ A−1), the macro to be coded next The number M of blocks (the number M of remaining macroblocks) is expressed as M = A−K−1.

【0117】現在のVOPを構成するマクロブロック番
号0のマクロブロックから、マクロブロック番号K−1
のマクロブロックまでの符号量をScとし、現在のマク
ロブロック(マクロブロック番号K)に対して可変長符
号化手段5aが出力する符号の符号量をmb_bitと
すると、残りのM個のマクロブロックに対して固定符号
出力手段104の固定符号(符号長がL)を選択した場
合のVOP全体の符号量は、 Sc+mb_bit+M×L+α となる。ここでαは、マクロブロック番号K以降のマク
ロブロックで発生し得るResync Marker、
ビデオパケットヘッダ、スタッフビット、motion
_marker等のビデオパケット単位で発生する付加
的な符号の符号量(ここでは、付加符号量と称す)であ
り、α≧0である。
From the macroblock of macroblock number 0 constituting the current VOP, the macroblock number K-1
Let the code amount up to the macroblock of Sc be Sc, and let the code amount of the code output by the variable length coding means 5a for the current macroblock (macroblock number K) be mb_bit, the remaining M macroblocks On the other hand, when the fixed code (the code length is L) of the fixed code output unit 104 is selected, the code amount of the entire VOP is Sc + mb_bit + M × L + α. Here, α is a Resync Marker that can occur in a macroblock after the macroblock number K,
Video packet header, stuff bit, motion
_Marker is the code amount of an additional code generated in video packet units such as _marker (herein referred to as additional code amount), and α ≧ 0.

【0118】そこで、 Sc+mb_bit+M×L+α>Tmax となる場合は、現在のマクロブロック(マクロブロック
番号K)に対して、固定符号出力手段104が出力する
固定符号を一時バッファ101に書きこみ、そうでない
場合は可変長符号化手段5aが出力する符号を一時バッ
ファ101に書きこむよう制御する(図4)。
Therefore, if Sc + mb_bit + M × L + α> Tmax, the fixed code output from the fixed code output means 104 is written into the temporary buffer 101 for the current macroblock (macroblock number K). Controls to write the code output from the variable length coding means 5a into the temporary buffer 101 (FIG. 4).

【0119】なお、付加符号量αの値としては、例え
ば、P−VOPにおけるResyncMarker、ビ
デオパケットヘッダ、スタッフビット、motion_
markerの符号量の合計が最大でCp(bit)、
予め定められたビデオパケットの長さがVPlen(b
it)とすると、現在のマクロブロック(マクロブロッ
ク番号K)以降のマクロブロックで発生する符号量は、
少なくとも (M+1)×L であり、 (M+1)×L/VPlen+1 個のビデオパケットが発生し得るので、付加符号量α
は、 α=((M+1)×L/VPlen+1)×Cp とすればよい。
As the value of the additional code amount α, for example, ResyncMarker in P-VOP, video packet header, stuff bit, motion_
Marker has a maximum code amount of Cp (bit),
The length of the predetermined video packet is VPlen (b
it), the amount of code generated in macroblocks subsequent to the current macroblock (macroblock number K) is
Since at least (M + 1) × L and (M + 1) × L / VPlen + 1 video packets can be generated, the additional code amount α
May be α = ((M + 1) × L / VPlen + 1) × Cp.

【0120】また、VOPを構成するマクロブロックの
総数Aを用いれば、 M+1≦A であることから、演算を簡略化するために、付加符号量
αは、 α=(A×L/VPlen+1)×Cp として、P−VOPに固定の値としてもよい。
If the total number A of the macroblocks constituting the VOP is used, then M + 1 ≦ A. Therefore, to simplify the operation, the additional code amount α is given by α = (A × L / VPlen + 1) × Cp may be a value fixed to P-VOP.

【0121】なお、P−VOPについて、固定符号出力
手段104から出力される固定符号を一時バッファ10
1に記憶した場合は、強制的にnot_coded(符
号化されていない)扱いとするためにメモリ9に記憶さ
れた現在のマクロブロックの復号画像を、メモリ9に記
憶された一つ前のVOPの同一位置のマクロブロックの
復号画像に置き換えておく。
For the P-VOP, the fixed code output from the fixed code output means 104 is stored in the temporary buffer 10.
1, the decoded image of the current macroblock stored in the memory 9 in order to forcibly treat it as not_coded (not coded) is stored in the previous VOP stored in the memory 9. The decoded image of the macroblock at the same position is replaced.

【0122】すなわち、メモリ9内で、一つ前のVOP
のマクロブロック番号Kのマクロブロックの復号画像
を、現在のVOPのマクロブロック番号Kのマクロブロ
ックの復号画像エリアにコピーする。P−VOPの場合
は、固定符号出力手段104が出力する固定符号がno
t_coded=1であるので、このように一つ前のV
OPの復号画像をコピーすることにより、固定符号出力
手段104から出力される固定符号に応じた復号画像が
得られる。
That is, in the memory 9, the immediately preceding VOP
Is copied to the decoded image area of the macroblock with the macroblock number K of the current VOP. In the case of P-VOP, the fixed code output from the fixed code output unit 104 is no.
Since t_coded = 1, the immediately preceding V
By copying the decoded image of the OP, a decoded image corresponding to the fixed code output from the fixed code output unit 104 is obtained.

【0123】(I−VOPの場合の符号量制御につい
て)次に、I−VOPの場合の符号量制御手段102の
動作を説明する。I−VOPの場合、可変長符号化手段
5aは図2(a)に示したように各ブロックのAC成分
データ、mcbpc、dquant、DC成分、ac_
pred_flag、cbpyを各マクロブロックに対
して出力するが、これらの符号は必ずしも全てが存在す
るわけではなく、例えば、mcbpcが示すcbpcの
値とcbpyの値が共に0である場合は、各ブロックの
係数データは存在しない。また、mcbpcが示すマク
ロブロックタイプがdquantを持たないことを表し
ている場合は、dquantも存在しない。
(Regarding control of code amount in case of I-VOP) Next, the operation of the code amount control means 102 in the case of I-VOP will be described. In the case of an I-VOP, the variable-length coding unit 5a uses the AC component data, mcbpc, dquant, DC component, ac_data of each block as shown in FIG.
pred_flag and cbpy are output to each macroblock. However, not all of these codes are necessarily present. For example, when the values of cbpc and cbpy indicated by mcbpc are both 0, No coefficient data exists. Also, when the macroblock type indicated by mcbpc indicates that it does not have dquant, dquant does not exist.

【0124】そこで、I−VOPの場合、固定符号出力
手段104は、各ブロックのDC成分およびAC成分が
すべて0で、かつ、dquant=0、ac_pred
_flag=0であるようなマクロブロックに対する符
号を、固定符号として出力する。なお、MPEG2、M
PEG4など既存のほとんどの符号化方式においては、
このような符号が、I−VOPのマクロブロックの最小
符号量となる。
Therefore, in the case of an I-VOP, the fixed code output means 104 determines that the DC and AC components of each block are all 0, dquant = 0, and ac_pred.
A code for a macroblock in which _flag = 0 is output as a fixed code. Note that MPEG2, M
In most existing encoding methods such as PEG4,
Such a code becomes the minimum code amount of the macroblock of the I-VOP.

【0125】P−VOPの場合と同様に、符号量制御手
段102は、マクロブロック毎に現在のVOPの符号量
を求め、残りのマクロブロックすべてに対して固定符号
出力手段104から出力される固定符号を選択したとし
ても、VOPを構成するすべてのマクロブロックの符号
量が当該VOPの最大符号量Tmaxを越える場合に、
現在のマクロブロックの符号を、固定符号出力手段10
4から出力される固定符号に置き換える。
As in the case of the P-VOP, the code amount control means 102 calculates the code amount of the current VOP for each macroblock, and outputs the fixed code output means 104 for the remaining macroblocks. Even if a code is selected, if the code amount of all the macroblocks constituting the VOP exceeds the maximum code amount Tmax of the VOP,
The code of the current macroblock is output to the fixed code output unit 10.
4 is replaced with the fixed code output from

【0126】ここでは、VOPを構成するビデオパケッ
トをくずさない(ビデオパケットを構成するマクロブロ
ックがすべて含まれる)ことが求められるので、残りの
マクロブロックに対応する符号化されたデータを生成す
る必要があるが、VOPを構成するすべてのマクロブロ
ックの符号量が最大符号量Tmaxを越える場合には、
上述のように固定符号への置き換えを行うことになるた
め、この固定符号分の裕度を見込んでおく必要がある。
Here, since it is required that the video packets forming the VOP are not broken down (all the macroblocks forming the video packet are included), it is necessary to generate encoded data corresponding to the remaining macroblocks. However, when the code amount of all the macroblocks constituting the VOP exceeds the maximum code amount Tmax,
Since the replacement with the fixed code is performed as described above, it is necessary to allow for the allowance for the fixed code.

【0127】すなわち、現在のマクロブロック(マクロ
ブロック番号K)に対して可変長符号化手段5aが出力
する符号の符号量をmb_bit、固定符号出力手段1
04が出力する固定符号の符号長をL、現在のVOPを
構成するマクロブロック番号0のマクロブロックからマ
クロブロック番号K−1のマクロブロックまでの符号量
をScとすると、図5に示すように、 Sc+mb_bit+M×L+α>Tmax (M=A−K−1)となる場合は、現在のマクロブロッ
ク(マクロブロック番号K)に対して、固定符号出力手
段104が出力する固定符号を一時バッファ101に書
きこみ、そうでない場合は可変長符号化手段5aが出力
する符号を一時バッファ101に書きこむよう制御す
る。
That is, for the current macroblock (macroblock number K), the code amount of the code output from the variable length coding unit 5a is mb_bit, the fixed code output unit 1
Assuming that the code length of the fixed code output from the macroblock 04 is L and the code amount from the macroblock having the macroblock number 0 to the macroblock having the macroblock number K-1 constituting the current VOP is Sc, as shown in FIG. If Sc + mb_bit + M × L + α> Tmax (M = A−K−1), the fixed code output from the fixed code output unit 104 is written to the temporary buffer 101 for the current macroblock (macroblock number K). If not, control is performed so that the code output from the variable length coding means 5a is written into the temporary buffer 101.

【0128】ここでαは、マクロブロック番号K以降の
マクロブロックで発生し得るResync Marke
r、ビデオパケットヘッダ、スタッフビット、dc_m
arker等のビデオパケット単位で発生する符号の符
号量(付加符号量)であり、α≧0である。
Here, α is a Resync Marke which may occur in a macroblock after the macroblock number K.
r, video packet header, stuff bit, dc_m
The code amount (additional code amount) of a code generated in video packet units such as arcer, and α ≧ 0.

【0129】なお、付加符号量αの値としては、例え
ば、I−VOPにおけるResyncMarker、ビ
デオパケットヘッダ、スタッフビット、dc_mark
erの符号量の合計が最大でCi(bit)、予め定め
られたビデオパケットの長さがVPlen(bit)と
すると、現在のマクロブロック(マクロブロック番号
K)以降のマクロブロックで発生する符号量は、少なく
とも (M+1)×L であり、(M+1)×L/VPlen+1 個のビデオパケットが発生し得るので、 α=((M+1)×L/VPlen+1)×Ci とすればよい。
As the value of the additional code amount α, for example, ResyncMarker in I-VOP, video packet header, stuff bit, dc_mark
Assuming that the total code amount of er is Ci (bit) at the maximum and the length of a predetermined video packet is VPlen (bit), the code amount generated in a macroblock after the current macroblock (macroblock number K) Is at least (M + 1) × L, and (M + 1) × L / VPlen + 1 video packets can be generated. Therefore, α = ((M + 1) × L / VPlen + 1) × Ci.

【0130】また、VOPを構成するマクロブロックの
総数Aを用いれば、M+1≦Aであることから、演算を
簡略化するために、 α=(A×L/VPlen+1)×Ci として、I−VOPに固定の値としてもよい。
If the total number A of the macroblocks constituting the VOP is used, then M + 1 ≦ A. To simplify the operation, α = (A × L / VPlen + 1) × Ci and I-VOP May be fixed.

【0131】なお、I−VOPの場合、現在のマクロブ
ロック(マクロブロック番号K)に対して固定符号出力
手段104から出力される固定符号を一時バッファ10
1に記憶した場合で、かつ、一つ前のマクロブロック
(マクロブロック番号K−1)に対しては固定符号出力
手段104の出力(固定符号)を選択しなかった場合
(可変長符号化手段5aの出力を選択した場合)は、図
5に示すように、現在のマクロブロックから新しいビデ
オパケットを構成する。
In the case of an I-VOP, the fixed code output from the fixed code output means 104 for the current macroblock (macroblock number K) is stored in the temporary buffer 10.
1 and the output (fixed code) of the fixed code output means 104 is not selected for the immediately preceding macroblock (macroblock number K-1) (variable length coding means 5a), a new video packet is constructed from the current macroblock, as shown in FIG.

【0132】I−VOPの場合、ac_pred_fl
ag=0であってもDC予測を行うので、一時バッファ
101に記憶されたDC成分が0の場合、これはDC/
AC予測器4の出力する予測後のDC成分Ox(0,
0)が0であることを示すものであり、量子化器3が出
力するDC成分Fx(0,0)が0であることを示すも
のではない。
For an I-VOP, ac_pred_fl
Since the DC prediction is performed even when ag = 0, when the DC component stored in the temporary buffer 101 is 0, this corresponds to DC /
The predicted DC component Ox (0, 0,
0) is 0, and does not indicate that the DC component Fx (0,0) output from the quantizer 3 is 0.

【0133】このため、固定符号出力手段104が各ブ
ロックのDC成分およびAC成分がすべて0でかつ、d
quant=0、ac_pred_flag=0である
ようなマクロブロックに対する固定符号を出力する場
合、この固定符号を復号して得られる画像は一般には一
定ではない(すなわち、固定符号自体は固定のものであ
っても画像表現に関わる値は固定の値ではなく任意の値
をとり得る)。
Therefore, the fixed code output means 104 determines that the DC component and the AC component of each block are all 0 and d
When a fixed code for a macroblock in which quant = 0 and ac_pred_flag = 0 is output, an image obtained by decoding the fixed code is generally not constant (that is, the fixed code itself is fixed. Also, the value related to the image expression can take an arbitrary value instead of a fixed value.)

【0134】しかしながら、DC/AC予測器4におい
ては、異なるビデオパケットに属するブロック間ではD
C成分の係数の参照を行わず、DC成分の値の範囲の中
間値である定数βを参照値とするので、上述のように、
固定符号出力手段104から出力される固定符号を一時
バッファ101に記憶するよう選択した場合、当該マク
ロブロックから新しいビデオパケットを構成するように
制御すれば、前記固定符号出力手段104から出力され
る固定符号が表す各ブロックの逆量子化後のDC成分f
x(0,0)は fx(0,0)=β となる。
However, in the DC / AC predictor 4, D / D is not used between blocks belonging to different video packets.
Since the coefficient β of the C component is not referred to and the constant β which is an intermediate value in the range of the value of the DC component is used as the reference value,
When the fixed code output from the fixed code output unit 104 is selected to be stored in the temporary buffer 101, if the control is performed so that a new video packet is formed from the macroblock, the fixed code output from the fixed code output unit 104 is output. DC component f after inverse quantization of each block represented by the code
x (0,0) becomes fx (0,0) = β.

【0135】従って、I−VOPの場合、固定符号出力
手段104から出力される固定符号を復号すると、マク
ロブロックの全ての画素が定数γであるような画像(画
面全体が同じ色等の、いわゆる、ベタ画像)が得られ
る。ここで定数γは、入力されるマクロブロックの画素
値の範囲の中間値である。例えば、入力されるマクロブ
ロックが8ビットで0から255の値を取り得る場合、
γ=128である。
Therefore, in the case of an I-VOP, when the fixed code output from the fixed code output means 104 is decoded, an image in which all the pixels of the macroblock have a constant γ (a so-called image of the same color or the like on the entire screen). , A solid image). Here, the constant γ is an intermediate value in the range of pixel values of the input macroblock. For example, when an input macroblock can take a value of 0 to 255 with 8 bits,
γ = 128.

【0136】なお、固定符号出力手段104から出力さ
れる固定符号を一時バッファ101に記憶するよう選択
した場合、上述のように、当該マクロブロック(マクロ
ブロック番号K)の各ブロックの逆量子化後のDC成分
は定数βに等しくなるので、当該マクロブロックの次の
マクロブロック(マクロブロック番号K+1)で固定符
号出力手段104の出力(固定符号)を選択する場合
は、新しいビデオパケットを構成しなくても、逆量子化
後のDC成分が定数βとなり、復号画像は画素値がすべ
て定数γの画像(ベタ画像)となる。
When the fixed code output from the fixed code output means 104 is selected to be stored in the temporary buffer 101, as described above, each of the blocks of the macro block (macro block number K) is dequantized. Becomes equal to the constant β, when selecting the output (fixed code) of the fixed code output means 104 in the next macroblock (macroblock number K + 1) of the macroblock, a new video packet is not formed. However, the DC component after the inverse quantization becomes a constant β, and the decoded image becomes an image (solid image) whose pixel values are all constant γ.

【0137】従って、図5に示すように、固定符号出力
手段104から出力される固定符号を一時バッファ10
1に記憶した場合で、かつ、一つ前のマクロブロックに
対しては固定符号出力手段104の出力(固定符号)を
選択しなかった場合に、現在のマクロブロックから新し
いビデオパケットを構成するよう制御すればよい。
Therefore, as shown in FIG. 5, the fixed code output from the fixed code
In the case where the value is stored in 1 and the output (fixed code) of the fixed code output unit 104 is not selected for the previous macroblock, a new video packet is formed from the current macroblock. What is necessary is to control.

【0138】なお、固定符号出力手段104から出力さ
れる固定符号を一時バッファ101に記憶した場合は、
メモリ9に記憶された現在のマクロブロックの復号画像
を、画素値がすべて定数γの画像に置き換えておく。す
なわち、メモリ9の現在のVOPの現在のマクロブロッ
クの復号画像エリアに定数γを書きこむ。
When the fixed code output from the fixed code output means 104 is stored in the temporary buffer 101,
The decoded image of the current macroblock stored in the memory 9 is replaced with an image whose pixel values are all constant γ. That is, the constant γ is written in the decoded image area of the current macroblock of the current VOP in the memory 9.

【0139】このように図4および図5のフローチャー
トに基づいて、可変長符号化手段5aから出力される符
号または固定符号出力手段104から出力される固定符
号のうち、一時バッファ101に記憶する符号を選択す
ることにより、各VOPの符号量が最大符号量Tmax
を超えないように制御することができる。
As described above, based on the flowcharts of FIGS. 4 and 5, of the codes output from the variable-length coding means 5a or the fixed codes output from the fixed code output means 104, the code stored in the temporary buffer 101 Is selected, the code amount of each VOP becomes the maximum code amount Tmax.
Can be controlled so as not to exceed.

【0140】また、図5のフローチャートに基づいて、
現在のマクロブロックから新しいビデオパケットを構成
するか否かを決定することにより、I−VOPの場合
も、固定符号出力手段104から出力される固定符号に
対応する復号画像を、新たな演算を行うことなく、メモ
リ9に書きこむので、少ない演算量で単位画像の符号量
が必ず最大符号量Tmax以下となるように制御でき
る。
Also, based on the flowchart of FIG.
By determining whether to construct a new video packet from the current macroblock, a new operation is performed on the decoded image corresponding to the fixed code output from the fixed code output unit 104 even in the case of I-VOP. Without writing to the memory 9, the code amount of the unit image can always be controlled to be equal to or less than the maximum code amount Tmax with a small amount of calculation.

【0141】実施の形態2.上記実施の形態1において
は、符号量制御手段102が図4および図5のフローチ
ャートに基づいて可変長符号化手段5aまたは固定符号
出力手段104の出力(固定符号)を選択するよう制御
するとしたが、符号量制御手段102は、図6および図
7に示すフローチャートに基づいて、可変長符号化手段
5aまたは固定符号出力手段104の出力(固定符号)
を選択するよう構成してもよい。
Embodiment 2 In the first embodiment, the code amount control means 102 controls to select the output (fixed code) of the variable length coding means 5a or the fixed code output means 104 based on the flowcharts of FIGS. 4 and 5. The code amount control means 102 outputs the output (fixed code) of the variable length coding means 5a or the fixed code output means 104 based on the flowcharts shown in FIGS.
May be configured to be selected.

【0142】なお、図6は現在のVOPがP−VOP
(符号化タイプがインター)の場合のフローチャートを
示しており、図7は現在のVOPがI−VOP(符号化
タイプがイントラ)の場合のフローチャートを示してい
る。
FIG. 6 shows that the current VOP is P-VOP.
FIG. 7 shows a flowchart when the current VOP is an I-VOP (the encoding type is intra), and FIG. 7 shows a flowchart when the current VOP is an I-VOP (the encoding type is intra).

【0143】(P−VOPの場合の符号量制御につい
て)まず、P−VOPの場合を図6に従って説明する。
符号量制御手段102は、実施の形態1の場合と同様
に、現在のマクロブロック(マクロブロック番号K)に
対して可変長符号化手段5aが出力する符号の符号量を
mb_bit、固定符号出力手段104が出力する固定
符号の符号長をL、現在のVOPを構成するマクロブロ
ック番号0のマクロブロックからマクロブロック番号K
−1のマクロブロックまでの符号量をSc、現在のVO
Pを構成するマクロブロックK+1以降のマクロブロッ
クの数をMとすると、 Sc+mb_bit+M×L+α>Tmax (1) となる場合、現在のマクロブロック(マクロブロック番
号K)に対して、固定符号出力手段104が出力する固
定符号を一時バッファ101に書きこむよう制御する。
(Regarding control of code amount in case of P-VOP) First, the case of P-VOP will be described with reference to FIG.
As in the first embodiment, the code amount control unit 102 sets the code amount of the code output from the variable length coding unit 5a for the current macroblock (macroblock number K) to mb_bit, the fixed code output unit L is the code length of the fixed code output from the macroblock 104 and the macroblock number K is from the macroblock of macroblock number 0 constituting the current VOP.
The code amount up to the -1 macroblock is Sc, and the current VO
Assuming that the number of macroblocks after macroblock K + 1 constituting P is M, Sc + mb_bit + M × L + α> Tmax (1) When the following expression is satisfied, the fixed code output unit 104 outputs the current macroblock (macroblock number K). Control is performed so that the fixed code to be output is written in the temporary buffer 101.

【0144】ここでαは、マクロブロック番号K以降の
マクロブロックで発生し得るResync Marke
r、ビデオパケットヘッダ、スタッフビット、moti
on_marker等のビデオパケット単位で発生する
符号の符号量(付加符号量)であり、α≧0である。実
施の形態1で説明したように、αはマクロブロック毎に
演算しても、VOPの符号化タイプ毎に固定値としても
よい。
Here, α is a Resync Marke which may occur in a macroblock subsequent to the macroblock number K.
r, video packet header, stuff bit, moti
A code amount (additional code amount) of a code generated in video packet units such as on_marker, and α ≧ 0. As described in the first embodiment, α may be calculated for each macroblock, or may be a fixed value for each VOP coding type.

【0145】ところで、現在のマクロブロックに対して
上記(1)式が成り立つ場合、符号量としては累積され
ていくものであるから、次のマクロブロックに対しても
(1)式が成り立つ可能性が非常に高い。
By the way, when the above equation (1) holds for the current macroblock, the code amount is accumulated, so that the equation (1) may hold for the next macroblock. Is very high.

【0146】例えば、マクロブロック番号Kに対して
(1)式が成り立つとすると、マクロブロック番号0か
らマクロブロック番号Kまでのマクロブロックの符号量
Sc’は、マクロブロック番号K−1のマクロブロック
までの符号量Scに固定符号出力手段104が出力する
固定符号の符号長Lを加算した、Sc’=Sc+Lとな
る。ここで、マクロブロック番号Kのマクロブロックに
対して可変長符号化手段5aが出力する符号の符号量m
b_bitと、マクロブロック番号K+1のマクロブロ
ックに対して可変長符号化手段5aが出力する符号の符
号量mb_bit’が等しく、かつ、上記αの値が両マ
クロブロックに対して同じであれば、 Sc’+mb_bit’+(M−1)×L+α=Sc+
mb_bit+M×L+α>Tmax となり、マクロブロック番号K+1に対しても(1)式
が成り立つ。
For example, if the equation (1) holds for the macroblock number K, the code amount Sc ′ of the macroblocks from the macroblock number 0 to the macroblock number K becomes the macroblock number of the macroblock number K−1. By adding the code length L of the fixed code output from the fixed code output unit 104 to the code amount Sc up to, Sc ′ = Sc + L. Here, the code amount m of the code output by the variable length coding means 5a for the macroblock of the macroblock number K
If b_bit is equal to the code amount mb_bit 'of the code output from the variable-length coding means 5a for the macroblock of macroblock number K + 1, and the value of α is the same for both macroblocks, Sc '+ Mb_bit' + (M-1) × L + α = Sc +
mb_bit + M × L + α> Tmax, and the equation (1) holds for the macroblock number K + 1.

【0147】そこで、マクロブロック番号Kに対して
(1)式が成立した場合は、マクロブロック番号K以降
のマクロブロックに対しても(1)式が成立するものと
して、演算を省略することができる。
Therefore, if equation (1) holds for the macroblock number K, it is assumed that equation (1) holds for the macroblocks after the macroblock number K, and the calculation is omitted. it can.

【0148】すなわち、図6に示すように、まず現在の
マクロブロック(マクロブロック番号K)の一つ前のマ
クロブロック(マクロブロック番号K−1)に対して、
固定符号出力手段104の出力(固定符号)を選択した
かどうかを判断し、一つ前のマクロブロックで固定符号
出力手段104の出力(固定符号)を選択した場合は、
現在のマクロブロックに対しても固定符号出力手段10
4の出力(固定符号)を一時バッファ101に記憶す
る。
That is, as shown in FIG. 6, first, a macro block (macro block number K-1) immediately before the current macro block (macro block number K) is set.
It is determined whether or not the output (fixed code) of the fixed code output unit 104 has been selected. If the output (fixed code) of the fixed code output unit 104 has been selected in the immediately preceding macroblock,
Fixed code output means 10 for the current macroblock
4 (fixed code) is stored in the temporary buffer 101.

【0149】一方、一つ前のマクロブロックで固定符号
出力手段104の出力(固定符号)を選択しなかった場
合は、上記(1)式を判断し、(1)式が成り立つ場合
は固定符号出力手段104の出力(固定符号)を、成り
立たない場合は可変長符号化手段5aの出力を一時バッ
ファ101に記憶する。
On the other hand, if the output (fixed code) of the fixed code output means 104 is not selected in the immediately preceding macroblock, the above equation (1) is determined. If the equation (1) holds, the fixed code is used. The output (fixed code) of the output unit 104 is stored in the temporary buffer 101 if the output does not hold.

【0150】(I−VOPの場合の符号量制御につい
て)I−VOPの場合も同様で、図7に示すように、ま
ず現在のマクロブロック(マクロブロック番号K)の一
つ前のマクロブロック(マクロブロック番号K−1)に
対して、固定符号出力手段104の出力(固定符号)を
選択したかどうかを判断し、一つ前のマクロブロックで
固定符号出力手段104の出力(固定符号)を選択した
場合は、現在のマクロブロックに対しても固定符号出力
手段104の出力(固定符号)を一時バッファ101に
記憶する。この場合、実施の形態1で説明したように、
現在のマクロブロックから新しいビデオパケットを構成
する必要はない。
(Regarding code amount control in case of I-VOP) The same applies to the case of I-VOP. As shown in FIG. 7, first, the macroblock (macroblock number K) immediately before the current macroblock (macroblock number K) is used. It is determined whether or not the output (fixed code) of the fixed code output means 104 has been selected for the macro block number K-1), and the output (fixed code) of the fixed code output means 104 is determined for the immediately preceding macroblock. If selected, the output (fixed code) of the fixed code output unit 104 is stored in the temporary buffer 101 even for the current macroblock. In this case, as described in Embodiment 1,
There is no need to construct a new video packet from the current macroblock.

【0151】一方、一つ前のマクロブロックで固定符号
出力手段104の出力(固定符号)を選択しなかった場
合は、上記(1)式を判断し、(1)式が成り立つ場合
は固定符号出力手段104の出力(固定符号)を、成り
立たない場合は可変長符号化手段5aの出力を一時バッ
ファ101に記憶する。また、上記(1)式が成り立つ
場合は、現在のマクロブロックから新しいビデオパケッ
トを構成する。
On the other hand, when the output (fixed code) of the fixed code output means 104 is not selected in the immediately preceding macroblock, the above equation (1) is judged. The output (fixed code) of the output unit 104 is stored in the temporary buffer 101 if the output does not hold. When the above equation (1) holds, a new video packet is formed from the current macroblock.

【0152】なお、実施の形態2においては、1VOP
の中のあるマクロブロックに対して(1)式が成立する
と、そのVOPを構成する当該マクロブロック以降のす
べてのマクロブロックに対して、固定符号出力手段10
4の出力(固定符号)を一時バッファ101に書きこむ
よう制御するので、当該マクロブロックに続いて符号化
されるマクロブロックにおいては、減算器1、DCT手
段2、量子化器3、DC/AC予測器4、可変長符号化
手段5a、逆量子化器6、逆DCT手段7、加算器8、
予測画像作成手段10、動き検出手段11および動きベ
クトル予測手段12からなる符号化手段は動作する必要
がない。
In the second embodiment, one VOP
When Expression (1) is satisfied for a certain macroblock in the set, the fixed code output means 10 is applied to all the macroblocks after that macroblock constituting the VOP.
4 (fixed code) is written to the temporary buffer 101, so in a macroblock to be coded following the macroblock, the subtracter 1, the DCT means 2, the quantizer 3, the DC / AC Predictor 4, variable length coding means 5a, inverse quantizer 6, inverse DCT means 7, adder 8,
The encoding means including the predicted image creation means 10, the motion detection means 11, and the motion vector prediction means 12 does not need to operate.

【0153】従って、1VOPの中のあるマクロブロッ
クに対して(1)式が成立する場合は、そのVOPを構
成する当該マクロブロックに続いて符号化されるマクロ
ブロックにおいては、減算器1、DCT手段2、量子化
器3、DC/AC予測器4、可変長符号化手段5a、逆
量子化器6、逆DCT手段7、加算器8、予測画像作成
手段10、動き検出手段11および動きベクトル予測手
段12は動作を止める(符号化されたマクロブロックよ
り後のマクロブロックからVOPの最後迄演算を停止す
る)ことにより、演算量の減少、消費電力の削減を図る
ことができる。
Therefore, when the expression (1) is satisfied for a certain macroblock in one VOP, the subtractor 1 and the DCT for the macroblock coded following the macroblock constituting the VOP. Means 2, quantizer 3, DC / AC predictor 4, variable length coding means 5a, inverse quantizer 6, inverse DCT means 7, adder 8, predicted image creating means 10, motion detecting means 11, and motion vector By stopping the operation of the prediction unit 12 (stopping the operation from the macroblock after the encoded macroblock to the end of the VOP), the amount of calculation and the power consumption can be reduced.

【0154】実施の形態3.実施の形態3においては、
符号量制御手段102は、図8に示すフローチャートに
基づいて、可変長符号化手段5aまたは固定符号出力手
段104の出力(固定符号)を選択するよう制御する。
なお、図8はP−VOP(符号化タイプがインター)の
場合のフローチャートを示している。
Embodiment 3 In the third embodiment,
The code amount control means 102 controls to select the output (fixed code) of the variable length coding means 5a or the fixed code output means 104 based on the flowchart shown in FIG.
FIG. 8 shows a flowchart in the case of P-VOP (coding type is inter).

【0155】(P−VOPの場合の符号量制御につい
て)例えば、動き検出手段11がVOP内のオブジェク
トの動きに応じて適応的に動きベクトルの探索範囲を変
えるよう構成されている場合、動き検出手段11が各マ
クロブロックの動きベクトルを検出するのに要する時間
は、マクロブロック毎に変化し、そのため、1VOPの
処理時間は一定でなくなる。
(Regarding code amount control in case of P-VOP) For example, when the motion detecting means 11 is configured to adaptively change the search range of a motion vector according to the motion of an object in the VOP, The time required for the means 11 to detect the motion vector of each macroblock changes for each macroblock, so that the processing time of one VOP is not constant.

【0156】このような場合に、1VOPを構成する全
てのマクロブロックを所定の時間内に符号化するため
に、処理時間が少なくなった場合は、減算器1、DCT
手段2、量子化器3、DC/AC予測器4、可変長符号
化手段5a、逆量子化器6、逆DCT手段7、加算器
8、予測画像作成手段10、動き検出手段11および動
きベクトル予測手段12の演算を行わず、固定符号出力
手段104の出力(固定符号)を一時バッファ101に
記憶する。
In such a case, in order to encode all the macroblocks constituting one VOP within a predetermined time, if the processing time is reduced, the subtracter 1 and the DCT
Means 2, quantizer 3, DC / AC predictor 4, variable length coding means 5a, inverse quantizer 6, inverse DCT means 7, adder 8, predicted image creating means 10, motion detecting means 11, and motion vector The output (fixed code) of the fixed code output unit 104 is stored in the temporary buffer 101 without performing the calculation of the prediction unit 12.

【0157】従って、符号量制御手段102は、図8に
示すように、現在のVOPを構成する先頭のマクロブロ
ック(マクロブロック番号0)が入力されてからの経過
時間を計測し、この経過時間があらかじめ定められた処
理時間Tpを越えた場合は、常に固定符号出力手段10
4の出力(固定符号)を一時バッファ101に記憶する
よう制御し、そうでない場合は前記(1)式に基づい
て、固定符号出力手段104の出力(固定符号)と可変
長符号化手段5aの出力を選択して一時バッファ101
に記憶する。
Accordingly, as shown in FIG. 8, the code amount control means 102 measures the elapsed time from the input of the first macroblock (macroblock number 0) constituting the current VOP, and Exceeds the predetermined processing time Tp, the fixed code output means 10
4 (fixed code) is stored in the temporary buffer 101. Otherwise, the output (fixed code) of the fixed code output unit 104 and the output (fixed code) of the variable length coding unit 5a are determined based on the above equation (1). Select output and temporary buffer 101
To memorize.

【0158】なお、この場合のあらかじめ定められた処
理時間Tpは、最大1VOP期間に設定される(1VO
P分の処理は1VOP期間に処理しなければならないた
め)が、この1VOP期間に他の処理を含めるような場
合には、(1VOP期間−他の処理に要する期間)が処
理時間Tpに与えられる最大値となる。
The predetermined processing time Tp in this case is set to a maximum of 1 VOP period (1 VO
(Because the processing for P must be performed in one VOP period), when other processing is included in this one VOP period, (1 VOP period-period required for other processing) is given to the processing time Tp. It is the maximum value.

【0159】(I−VOPの場合の符号制御について)
なお、現在のVOPがI−VOPである場合は、実施の
形態1または実施の形態2と同様に、図5または図7の
フローチャートに従って、符号量制御手段102は一時
バッファ101に記憶する符号を選択する。
(Regarding Code Control for I-VOP)
When the current VOP is an I-VOP, the code amount control means 102 stores the code stored in the temporary buffer 101 according to the flowchart of FIG. 5 or FIG. 7 as in the first or second embodiment. select.

【0160】実施の形態4.実施の形態4においては、
符号量制御手段102は、図9に示すフローチャートに
基づいて、可変長符号化手段5aまたは固定符号出力手
段104の出力(固定符号)を選択するよう制御する。
なお、図9はP−VOP(符号化タイプがインター)の
場合のフローチャートを示している。
Embodiment 4 In the fourth embodiment,
The code amount control means 102 controls to select the output (fixed code) of the variable length coding means 5a or the fixed code output means 104 based on the flowchart shown in FIG.
FIG. 9 shows a flowchart in the case of P-VOP (coding type is inter).

【0161】(P−VOPの場合の符号量制御につい
て)すなわち、符号量制御手段102は、実施の形態2
で説明したように、まず現在のマクロブロック(マクロ
ブロック番号K)の一つ前のマクロブロック(マクロブ
ロック番号K−1)に対して、固定符号出力手段104
の出力(固定符号)を選択したかどうかを判断し、一つ
前のマクロブロックで固定符号出力手段104の出力
(固定符号)を選択した場合は、現在のマクロブロック
に対しても固定符号出力手段104の出力(固定符号)
を一時バッファ101に記憶する。
(Regarding code amount control in case of P-VOP) That is, the code amount control means 102
As described above, first, the fixed-code output unit 104 outputs the macroblock (macroblock number K-1) immediately before the current macroblock (macroblock number K).
It is determined whether or not the output (fixed code) has been selected, and if the output (fixed code) of the fixed code output unit 104 is selected in the immediately preceding macroblock, the fixed code output is also performed for the current macroblock. Output of means 104 (fixed code)
Is stored in the temporary buffer 101.

【0162】次に、実施の形態3で説明したように、現
在のVOPを構成する先頭のマクロブロック(マクロブ
ロック番号0)が入力されてからの経過時間を計測し、
この経過時間があらかじめ定められた処理時間Tpを越
えた場合は、固定符号出力手段104の出力(固定符
号)を一時バッファ101に記憶するよう制御し、そう
でない場合は前記(1)式に基づいて、固定符号出力手
段104の出力(固定符号)と可変長符号化手段5aの
出力を選択して一時バッファ101に記憶する。
Next, as described in the third embodiment, the elapsed time from the input of the first macroblock (macroblock number 0) constituting the current VOP is measured.
If the elapsed time exceeds a predetermined processing time Tp, the output (fixed code) of the fixed code output means 104 is controlled to be stored in the temporary buffer 101; Then, the output (fixed code) of the fixed code output unit 104 and the output of the variable length coding unit 5a are selected and stored in the temporary buffer 101.

【0163】(I−VOPの場合の符号量制御につい
て)なお、現在のVOPがI−VOPである場合は、実
施の形態1または実施の形態2と同様に、図5または図
7のフローチャートに従って、符号量制御手段102は
一時バッファ101に記憶する符号を選択する。
(Regarding code amount control in case of I-VOP) When the current VOP is an I-VOP, similarly to the first or second embodiment, according to the flowchart of FIG. 5 or FIG. , The code amount control means 102 selects a code to be stored in the temporary buffer 101.

【0164】実施の形態5.実施の形態1においては、
固定符号出力手段104が独立して存在するようなブロ
ック図を示したが、例えば、ソフトウェアによってそれ
ぞれの手段を構成する場合には、固定符号出力手段10
4および可変長符号化手段5aのそれぞれの動作を行わ
せるためのROMテーブルを共有するように構成するこ
ともできる。
Embodiment 5 In the first embodiment,
Although the block diagram in which the fixed code output means 104 exists independently is shown, for example, when each means is configured by software, the fixed code output means 10
4 and the variable length coding means 5a may be configured to share a ROM table for performing the respective operations.

【0165】すなわち、実施の形態1で説明したよう
に、固定符号出力手段104が出力する固定符号は、I
−VOP、P−VOPそれぞれのマクロブロックの符号
のうちの1パターンとなっているので、固定符号出力手
段104および可変長符号化手段5aを一体のものとす
ることにより、ROMテーブルを共有化することができ
る。
That is, as described in the first embodiment, the fixed code output from fixed code output means 104 is I
Since the VOP and P-VOP have one pattern of the macroblock codes, the ROM table is shared by integrating the fixed code output unit 104 and the variable length coding unit 5a. be able to.

【0166】図10はこの発明の実施の形態5である符
号化装置を示すものである。同図において、1は外部入
力信号を第一の入力とする減算器であり、減算器1の出
力はDCT手段2、量子化器3を通して、DC/AC予
測器4と逆量子化器6に入力される。DC/AC予測器
4の出力は可変長符号化手段5bの第一の入力に与えら
れる。
FIG. 10 shows an encoding apparatus according to Embodiment 5 of the present invention. In the figure, reference numeral 1 denotes a subtractor having an external input signal as a first input. The output of the subtracter 1 is passed through a DCT means 2 and a quantizer 3 to a DC / AC predictor 4 and an inverse quantizer 6. Is entered. The output of the DC / AC predictor 4 is provided to a first input of the variable length coding means 5b.

【0167】一方、逆量子化器6の出力は、逆DCT手
段7を通して、加算器8の第一の入力に与えられる。加
算器8の出力はメモリ9の第一の入力に与えられ、メモ
リ9の出力は予測画像作成手段10の第一の入力と動き
検出手段11の第一の入力に与えられる。
On the other hand, the output of the inverse quantizer 6 is supplied to the first input of the adder 8 through the inverse DCT means 7. The output of the adder 8 is provided to a first input of a memory 9, and the output of the memory 9 is provided to a first input of a predicted image creating means 10 and a first input of a motion detecting means 11.

【0168】動き検出手段11の第二の入力には外部入
力信号が与えられ、動き検出手段11の出力は予測画像
作成手段10の第二の入力と動きベクトル予測器12に
与えられる。予測画像作成手段10の出力は減算器1の
第二の入力と加算器8の第二の入力に与えられる。
An external input signal is supplied to a second input of the motion detecting means 11, and an output of the motion detecting means 11 is supplied to a second input of the predicted image creating means 10 and a motion vector predictor 12. The output of the predicted image creating means 10 is provided to a second input of the subtractor 1 and a second input of the adder 8.

【0169】また、動きベクトル予測器12の出力は可
変長符号化手段5bの第二の入力に与えられる。
The output of the motion vector predictor 12 is given to the second input of the variable length coding means 5b.

【0170】可変長符号化手段5bの第一の出力は一時
バッファ101の第一の入力に与えられ、可変長符号化
手段5bの第二の出力は符号量制御手段102の入力に
与えられる。
The first output of the variable length coding means 5b is provided to a first input of a temporary buffer 101, and the second output of the variable length coding means 5b is provided to an input of a code amount control means 102.

【0171】一時バッファ101の第二の入力には符号
量制御手段102の第一の出力が与えられる。一時バッ
ファ101の出力は送信バッファ103の第一の入力に
与えられる。
A first output of the code amount control means 102 is given to a second input of the temporary buffer 101. The output of the temporary buffer 101 is provided to a first input of the transmission buffer 103.

【0172】符号量制御手段102の第二の出力はメモ
リ9の第二の入力と可変長符号化手段5bの第三の入力
に与えられ、符号量制御手段102の第三の出力は送信
バッファ103の第二の入力に与えられる。送信バッフ
ァ103の出力はビットストリームとして出力(送信)
される。
A second output of the code amount control means 102 is given to a second input of the memory 9 and a third input of the variable length coding means 5b, and a third output of the code amount control means 102 is a transmission buffer. 103 is provided to a second input. The output of the transmission buffer 103 is output (transmitted) as a bit stream
Is done.

【0173】この出力(送信)されたビットストリーム
は、復号装置側において受信され復号処理が施される。
The output (transmitted) bit stream is received and decoded on the decoding device side.

【0174】次に動作について説明する。実施の形態5
は、可変長符号化手段5bおよび一時バッファ101の
動作が実施の形態1と異なる。他の部分については実施
の形態1と同様であるので説明を省略する。
Next, the operation will be described. Embodiment 5
The operation of the variable-length coding unit 5b and the temporary buffer 101 is different from that of the first embodiment. The other parts are the same as in the first embodiment, and a description thereof will be omitted.

【0175】可変長符号化手段5bは、まず、実施の形
態1と同様に各マクロブロックのデータを符号化して、
図11(a)のように一時バッファ101に符号を書き
こむ。ここで、現在のマクロブロック(マクロブロック
番号K)に対して書きこんだ符号の先頭アドレスAkを
記憶しておく。また、このとき発生した符号の符号量m
b_bitを符号量制御手段102に出力する。
The variable length coding means 5b first codes the data of each macroblock as in the first embodiment,
The code is written into the temporary buffer 101 as shown in FIG. Here, the head address Ak of the code written for the current macroblock (macroblock number K) is stored. Also, the code amount m of the code generated at this time
b_bit is output to the code amount control means 102.

【0176】次に、符号量制御手段102は、前記
(1)式を判断し、(1)式が成り立つ場合は一時バッ
ファ101の書きこみアドレスをAkに戻し、固定符号
を選択することを示す信号をメモリ9と可変長符号化手
段5bに出力する。
Next, the code amount control means 102 judges the expression (1), and if the expression (1) is satisfied, returns the write address of the temporary buffer 101 to Ak, and indicates that the fixed code is selected. The signal is output to the memory 9 and the variable length coding means 5b.

【0177】可変長符号化手段5bは、固定符号を選択
することを示す信号を受け取ると、予めVOPの符号化
タイプ毎に定められた固定符号を一時バッファ101に
出力する。このとき、一時バッファ101の書きこみア
ドレスはAkに戻されているので、マクロブロック番号
Kの符号を固定符号で上書きすることになる。従って、
図11(b)に示す一時バッファのデータ構成のよう
に、マクロブロック番号K−1の符号の次に、固定符号
が書き込まれる。
Upon receiving a signal indicating that a fixed code is to be selected, the variable-length coding means 5b outputs a fixed code predetermined for each VOP coding type to the temporary buffer 101. At this time, since the write address of the temporary buffer 101 has been returned to Ak, the code of the macroblock number K is overwritten with a fixed code. Therefore,
As in the data structure of the temporary buffer shown in FIG. 11B, a fixed code is written after the code of the macroblock number K-1.

【0178】また、メモリ9は、固定符号を選択するこ
とを示すフラグを受け取ると、実施の形態1で説明した
ように、I−VOPの場合はマクロブロック番号Kの復
号画像エリアに定数γを書きこみ、P−VOPの場合は
マクロブロック番号Kの復号画像エリアに、当該VOP
の一つ前のVOPのマクロブロック番号Kのマクロブロ
ックの復号画像をコピーする。
When the memory 9 receives the flag indicating that the fixed code is selected, the constant γ is set in the decoded image area of the macroblock number K in the case of I-VOP as described in the first embodiment. In the case of writing or P-VOP, the VOP is stored in the decoded image area of the macroblock number K.
The decoded image of the macroblock having the macroblock number K of the immediately preceding VOP is copied.

【0179】以上のように構成することにより、実施の
形態5では、可変長符号化手段5bに、各マクロブロッ
クを符号化する手段とVOPの符号化タイプ毎に用意し
た固定符号を出力する手段の両者の機能を持たせ、回路
の縮小化を図ることができる。
With the above arrangement, in the fifth embodiment, means for coding each macroblock and means for outputting a fixed code prepared for each VOP coding type are provided to the variable length coding means 5b. , And the circuit can be reduced in size.

【0180】実施の形態6.図12はこの発明の実施の
形態6である符号化装置を示すものである。同図におい
て、1は外部入力信号を第一の入力とする減算器であ
り、減算器1の出力はDCT手段2、量子化器3を通し
て、可変長符号化手段5cの第一の入力と逆量子化器6
に与えられる。
Embodiment 6 FIG. FIG. 12 shows an encoding apparatus according to Embodiment 6 of the present invention. In the figure, reference numeral 1 denotes a subtractor having an external input signal as a first input, and an output of the subtracter 1 passes through a DCT unit 2 and a quantizer 3 and is inversed to a first input of a variable length encoding unit 5c. Quantizer 6
Given to.

【0181】逆量子化器6の出力は、逆DCT手段7を
通して、加算器8の第一の入力に与えられる。加算器8
の出力はメモリ9の第一の入力に与えられ、メモリ9の
出力は予測画像作成手段10の第一の入力と動き検出手
段11の第一の入力に与えられる。
The output of the inverse quantizer 6 is supplied to the first input of the adder 8 through the inverse DCT means 7. Adder 8
Is provided to a first input of a memory 9, and an output of the memory 9 is provided to a first input of a predicted image creating means 10 and a first input of a motion detecting means 11.

【0182】動き検出手段11の第二の入力には外部入
力信号が与えられ、動き検出手段11の出力は予測画像
作成手段10の第二の入力と動きベクトル予測器12に
与えられる。予測画像作成手段10の出力は減算器1の
第二の入力と加算器8の第二の入力に与えられる。
An external input signal is supplied to a second input of the motion detecting means 11, and an output of the motion detecting means 11 is supplied to a second input of the predicted image creating means 10 and a motion vector predictor 12. The output of the predicted image creating means 10 is provided to a second input of the subtractor 1 and a second input of the adder 8.

【0183】また、動きベクトル予測器12の出力は可
変長符号化手段5cの第二の入力に与えられる。なお、
符号化手段は、上述の外部入力信号が入力される減算器
1から、この外部入力信号に対応する可変長符号が出力
される可変長符号化手段5cまでを含んで構成される
(もちろん、ここに示された構成は一例にしか過ぎず、
外部入力信号に対応する符号化を行うことができる既知
の構成を用いることができる)。
The output of the motion vector predictor 12 is given to the second input of the variable length coding means 5c. In addition,
The encoding means is configured to include the above-described subtractor 1 to which the external input signal is input, to the variable-length encoding means 5c to which the variable-length code corresponding to the external input signal is output (of course, here). The configuration shown in is only an example,
A known configuration that can perform encoding corresponding to the external input signal can be used).

【0184】可変長符号化手段5cの第一の出力は一時
バッファ101の第一の入力に与えられ、可変長符号化
手段5cの第二の出力は符号量制御手段102の入力に
与えられる。
The first output of the variable length coding means 5c is provided to a first input of a temporary buffer 101, and the second output of the variable length coding means 5c is provided to an input of a code amount control means 102.

【0185】一時バッファ101の第二の入力には固定
符号出力手段104の出力(固定符号)が与えられ、一
時バッファ101の第三の入力には符号量制御手段10
2の第一の出力が与えられる。一時バッファ101の出
力は送信バッファ103の第一の入力に与えられる。
The output (fixed code) of the fixed code output means 104 is given to the second input of the temporary buffer 101, and the code amount control means 10 is given to the third input of the temporary buffer 101.
Two first outputs are provided. The output of the temporary buffer 101 is provided to a first input of the transmission buffer 103.

【0186】符号量制御手段102の第二の出力はメモ
リ9の第二の入力に与えられ、符号量制御手段102の
第三の出力は送信バッファ103の第二の入力に与えら
れる。送信バッファ103の出力はビットストリームと
して出力(送信)される。
The second output of the code amount control means 102 is given to a second input of the memory 9, and the third output of the code amount control means 102 is given to a second input of the transmission buffer 103. The output of the transmission buffer 103 is output (transmitted) as a bit stream.

【0187】この出力(送信)されたビットストリーム
は、復号装置側において受信され復号処理が施される。
The output (transmitted) bit stream is received and decoded on the decoding device side.

【0188】次に動作について説明する。実施の形態6
は、符号化タイプがイントラの場合もDC/AC予測を
行わない点が実施の形態1と異なる。すなわち、可変長
符号化手段5cは量子化器3から出力されるDCT係数
を用いて符号化を行う。例えば、H.263に準拠した
符号化装置の場合、I−VOPの場合はDC成分を常に
8ビットで符号化する。
Next, the operation will be described. Embodiment 6
Differs from the first embodiment in that DC / AC prediction is not performed even when the coding type is intra. That is, the variable length coding unit 5c performs coding using the DCT coefficient output from the quantizer 3. For example, H. In the case of an encoding device conforming to H.263, the DC component is always encoded with 8 bits in the case of an I-VOP.

【0189】そこで、固定符号出力手段104は、I−
VOPに対して各ブロックのDC成分が128、AC成
分がすべて0、dquant=0であるようなマクロブ
ロックの固定符号を出力する。
Therefore, fixed code output means 104 outputs I-
For the VOP, the fixed code of the macro block in which the DC component of each block is 128, the AC components are all 0, and dquant = 0 is output.

【0190】この場合、DC予測がないので、固定符号
出力手段104の出力(固定符号)を選択した場合も、
現在のマクロブロックから新しいビデオパケットを構成
する必要はない。そこで、符号量制御手段102は、I
−VOPの場合も、図4、図6、図8、あるいは、図9
のフローチャートに従って、固定符号出力手段104の
出力(固定符号)または可変長符号化手段5cの出力を
選択して、一時バッファ101に記憶する。
In this case, since there is no DC prediction, when the output (fixed code) of the fixed code output means 104 is selected,
There is no need to construct a new video packet from the current macroblock. Therefore, the code amount control means 102
4, 6, 8, or 9 in the case of −VOP.
The output (fixed code) of the fixed code output unit 104 or the output of the variable-length coding unit 5c is selected according to the flowchart of FIG.

【0191】なお、P−VOPの場合は、実施の形態1
ないし実施の形態4と同様に、図4、図6、図8、ある
いは、図9のフローチャートに従って、固定符号出力手
段104の出力(固定符号)または可変長符号化手段5
cの出力を選択して、一時バッファ101に記憶する。
In the case of P-VOP, the first embodiment
Similarly to the fourth embodiment, the output (fixed code) of the fixed code output unit 104 or the variable length coding unit 5 according to the flowchart of FIG. 4, FIG. 6, FIG. 8, or FIG.
The output of c is selected and stored in the temporary buffer 101.

【0192】実施の形態7.上記実施の形態6において
は、可変長符号化手段5cの出力または固定符号出力手
段104の出力(固定符号)を一時バッファ101に記
憶し、一時バッファ101から送信バッファ103に転
送する構成としたが、例えば、データ構造がデータパー
ティションとなっていない場合やデータの再配列を行う
必要がない場合には、可変長符号化手段5cの出力また
は固定符号出力手段104の出力(固定符号)を直接、
送信バッファ103に入力する構成としてもよく、一時
バッファ101を省略することができる(この場合、蓄
積手段は送信バッファ103に相当する)。
Embodiment 7 FIG. In the sixth embodiment, the output of the variable length coding unit 5c or the output (fixed code) of the fixed code output unit 104 is stored in the temporary buffer 101, and is transferred from the temporary buffer 101 to the transmission buffer 103. For example, when the data structure is not a data partition or when it is not necessary to rearrange the data, the output of the variable-length coding unit 5c or the output (fixed code) of the fixed code output unit 104 is directly output.
The input to the transmission buffer 103 may be adopted, and the temporary buffer 101 can be omitted (in this case, the storage means corresponds to the transmission buffer 103).

【0193】例えば、H.263に準拠した符号化装置
の場合(データパーティションを行わない場合)、送信
バッファ103から出力するビットストリームの構成は
図13のようになっている。従って、MPEG4のデー
タパーティションの場合(図2(b)、図3(b))の
ように、各マクロブロックの符号を例えば、各マクロブ
ロックに関してmcbpc、dquantおよびDC
成分、ac_pred_flagおよびcbpy、
各ブロックの係数データのような、〜のカテゴリー
に分割し、複数のマクロブロックの符号をカテゴリー毎
にまとめて構成するようなことを行わないので、マクロ
ブロック毎に発生した符号を並び替える必要がない。
For example, H. In the case of an encoding device conforming to H.263 (when data partitioning is not performed), the configuration of a bit stream output from the transmission buffer 103 is as shown in FIG. Therefore, as in the case of an MPEG4 data partition (FIGS. 2 (b) and 3 (b)), the code of each macroblock is, for example, mcbppc, dquant and DC for each macroblock.
The components ac_pred_flag and cbpy,
It is not necessary to divide the codes generated for each macroblock into a category, such as coefficient data of each block, since the codes of a plurality of macroblocks are not grouped together for each category. Absent.

【0194】すなわち、可変長符号化手段5cが図13
に示したようなフォーマットに従って、マクロブロック
の符号を出力すれば、並び替えのための一時バッファ1
01は不要となる。
That is, the variable length coding means 5c
If the code of the macroblock is output in accordance with the format shown in FIG.
01 becomes unnecessary.

【0195】図14はこのような実施の形態7である符
号化装置を示すものである。同図において、1は外部入
力信号を第一の入力とする減算器であり、減算器1の出
力はDCT手段2、量子化器3を通して、可変長符号化
手段5cの第一の入力と逆量子化器6に与えられる。
FIG. 14 shows an encoding apparatus according to the seventh embodiment. In the figure, reference numeral 1 denotes a subtractor having an external input signal as a first input, and an output of the subtracter 1 passes through a DCT unit 2 and a quantizer 3 and is inversed to a first input of a variable length encoding unit 5c. It is provided to the quantizer 6.

【0196】逆量子化器6の出力は、逆DCT手段7を
通して、加算器8の第一の入力に与えられる。加算器8
の出力はメモリ9の第一の入力に与えられ、メモリ9の
出力は予測画像作成手段10の第一の入力と動き検出手
段11の第一の入力に与えられる。
The output of the inverse quantizer 6 is supplied to the first input of the adder 8 through the inverse DCT means 7. Adder 8
Is provided to a first input of a memory 9, and an output of the memory 9 is provided to a first input of a predicted image creating means 10 and a first input of a motion detecting means 11.

【0197】動き検出手段11の第二の入力には外部入
力信号が与えられ、動き検出手段11の出力は予測画像
作成手段10の第二の入力と動きベクトル予測器12に
与えられる。予測画像作成手段10の出力は減算器1の
第二の入力と加算器8の第二の入力に与えられる。
An external input signal is supplied to a second input of the motion detecting means 11, and an output of the motion detecting means 11 is supplied to a second input of the predicted image creating means 10 and a motion vector predictor 12. The output of the predicted image creating means 10 is provided to a second input of the subtractor 1 and a second input of the adder 8.

【0198】また、動きベクトル予測器12の出力は可
変長符号化手段5cの第二の入力に与えられる。
The output of the motion vector predictor 12 is given to the second input of the variable length coding means 5c.

【0199】可変長符号化手段5cの第一の出力は送信
バッファ103の第一の入力に与えられ、可変長符号化
手段5cの第二の出力は符号量制御手段102の入力に
与えられる。
The first output of the variable length coding means 5c is provided to a first input of the transmission buffer 103, and the second output of the variable length coding means 5c is provided to an input of the code amount control means 102.

【0200】送信バッファ103の第二の入力には固定
符号出力手段104の出力(固定符号)が与えられ、送
信バッファ103の第三の入力には符号量制御手段10
2の第一の出力が与えられる。また、符号量制御手段1
02の第二の出力はメモリ9の第二の入力に与えられ
る。
The output (fixed code) of the fixed code output means 104 is given to the second input of the transmission buffer 103, and the code amount control means 10 is input to the third input of the transmission buffer 103.
Two first outputs are provided. Code amount control means 1
The second output of 02 is provided to a second input of the memory 9.

【0201】送信バッファ103の出力はビットストリ
ームとして出力(送信)される。この出力(送信)され
たビットストリームは、復号装置側において受信され復
号処理が施される。
The output of the transmission buffer 103 is output (transmitted) as a bit stream. The output (transmitted) bit stream is received and decoded on the decoding device side.

【0202】次に動作について説明する。実施の形態7
は、可変長符号化手段5cおよび固定符号出力手段10
4が送信バッファ103に固定符号を出力する点が実施
の形態6と異なる。すなわち、符号量制御手段102
は、実施の形態6と同様に、可変長符号化手段5cから
出力される符号の符号量に基づいて、可変長符号化手段
5cの出力または固定符号出力手段104の出力(固定
符号)のうち、どちらを選択するかをマクロブロック毎
に判断し、選択した方が送信バッファ103に蓄積され
るよう制御を行う。
Next, the operation will be described. Embodiment 7
Is a variable length encoding means 5c and a fixed code output means 10
4 is different from the sixth embodiment in that a fixed code is output to the transmission buffer 103. That is, the code amount control means 102
Is the output of the variable length coding unit 5c or the output (fixed code) of the fixed code output unit 104 based on the code amount of the code output from the variable length coding unit 5c, as in the sixth embodiment. Is determined for each macroblock, and control is performed such that the selected one is stored in the transmission buffer 103.

【0203】なお、上記実施の形態1ないし7において
は、VOP毎の最大符号量Tmaxの設定において、送
信バッファ103の読み出しレートがRであるとした
が、読み出しレートが固定レートでなく、レートが可変
である場合であっても、同様にして、送信バッファ10
3のオーバーフローあるいはVBVバッファのアンダー
フローが起こらないようにTmaxを設定することが可
能である。
In the first to seventh embodiments, the read rate of the transmission buffer 103 is assumed to be R in the setting of the maximum code amount Tmax for each VOP. Even if it is variable, the transmission buffer 10
Tmax can be set so as not to cause an overflow of 3 or an underflow of the VBV buffer.

【0204】上述の送信バッファ103の読み出しレー
トが可変である場合とは、例えば、送信する最大のレー
トが決められており、その最大のレートの中で送信する
べき情報の種類(例えば、映像と音声のような種類)に
よって送信レートが割り振られているような場合に相当
する。
When the read rate of the transmission buffer 103 is variable, for example, the maximum rate for transmission is determined, and the type of information to be transmitted (for example, video and This corresponds to the case where the transmission rate is allocated according to the type of voice.

【0205】この場合も、図4ないし図9のフローチャ
ートに基づいて、各マクロブロックを符号化する符号化
手段の出力と、VOPの符号化タイプ毎に定められた固
定符号とを選択して蓄積することにより、各VOPの符
号量が最大符号量Tmax以下になるように制御するこ
とができる。
Also in this case, based on the flowcharts of FIGS. 4 to 9, the output of the coding means for coding each macroblock and the fixed code determined for each VOP coding type are selected and stored. By doing so, it is possible to control so that the code amount of each VOP is equal to or less than the maximum code amount Tmax.

【0206】また、上記実施の形態1ないし7において
は、MPEG4のデータパーティションの場合および
H.263の場合を例にとって説明したが、データパー
ティションでない場合や、MPEG2の場合などにおい
ても、上述と同様の構成で、符号量制御を行うことがで
きる。
In the first to seventh embodiments, the case of the data partition of MPEG4 and Although the case of H.263 has been described as an example, the code amount can be controlled with the same configuration as described above even in the case of a non-data partition or MPEG2.

【0207】さらに、入力信号が4:2:0でない場合
や、VOP(単位画像)が矩形でない場合(例えば、画
面中におけるオブジェクトが取り得る任意の形状)にも
適用できることは言うまでもない。
Further, it is needless to say that the present invention can be applied to the case where the input signal is not 4: 2: 0 or the case where the VOP (unit image) is not rectangular (for example, any shape that the object on the screen can take).

【0208】[0208]

【発明の効果】この発明は、以上説明したように構成さ
れているので、以下に示すような効果を奏する。
Since the present invention is configured as described above, it has the following effects.

【0209】この発明に係る符号化装置は、マクロブロ
ック単位の外部入力信号を符号化して、当該外部入力信
号に対応する符号を出力する符号化手段と、単位画像の
符号化タイプ毎に予め定めた固定符号を出力する固定符
号出力手段と、前記符号化手段から出力される前記符号
または前記固定符号出力手段から出力される前記固定符
号を蓄積する蓄積手段と、前記符号化手段によって符号
化された前記符号の符号量に応じて前記符号または前記
固定符号のいずれかを前記蓄積手段に蓄積するように制
御する符号量制御手段とを備えることを特徴とするの
で、マクロブロック毎の発生符号量を制限することでき
る。
An encoding apparatus according to the present invention encodes an external input signal in units of macroblocks, and outputs a code corresponding to the external input signal, and determines in advance for each encoding type of a unit image. Fixed code output means for outputting the fixed code, storage means for storing the code output from the coding means or the fixed code output from the fixed code output means, Code amount control means for controlling either the code or the fixed code to be stored in the storage means in accordance with the code amount of the code. Can be restricted.

【0210】また、この発明に係る符号化装置における
符号量制御手段は、単位画像の符号化で発生させること
のできる最大符号量を当該単位画像毎に求め、当該最大
符号量に基づいて前記単位画像を構成するマクロブロッ
ク毎に、符号化手段から出力される符号または固定符号
出力手段から出力される固定符号のいずれかを蓄積手段
に蓄積するように制御することを特徴とするので、各単
位画像の発生符号量を簡単に制限することができる。
[0210] The code amount control means in the encoding apparatus according to the present invention obtains the maximum code amount that can be generated by encoding the unit image for each unit image, and based on the maximum code amount, determines the unit code amount. Each macroblock constituting an image is controlled so that either the code output from the encoding unit or the fixed code output from the fixed code output unit is stored in the storage unit. The generated code amount of an image can be easily limited.

【0211】また、この発明に係る符号化装置における
符号量制御手段は、最大符号量Tmaxを以下の式に基
づいて求めることを特徴とするので、蓄積手段のオーバ
ーフローを防ぐことができる。 Tmax≦Bs−B ただし、Tmaxは最大符号量、Bsは蓄積手段の容量
およびBは前記蓄積手段における占有量である。
Further, the code amount control means in the encoding apparatus according to the present invention is characterized in that the maximum code amount Tmax is obtained based on the following equation, so that overflow of the storage means can be prevented. Tmax ≦ Bs−B where Tmax is the maximum code amount, Bs is the capacity of the storage means, and B is the occupation amount in the storage means.

【0212】また、この発明に係る符号化装置における
符号量制御手段は、最大符号量Tmaxを以下の式に基
づいて求めることを特徴とするので、VBVバッファの
アンダーフローを防ぐことができる。 Tmax≦vbv_bits+Rp ここに、Rp=R/F ただし、Tmaxは最大符号量、Rpは単位画像におけ
る蓄積手段から読み出されるビット数、Rは前記蓄積手
段から読み出されるビットレート、Fは符号化する単位
画像のレート、vbv_bitsは直前の単位画像にお
けるVBVバッファの占有量である。
Further, the code amount control means in the encoding apparatus according to the present invention is characterized in that the maximum code amount Tmax is obtained based on the following equation, so that underflow of the VBV buffer can be prevented. Tmax ≦ vbv_bits + Rp where Rp = R / F, where Tmax is the maximum code amount, Rp is the number of bits read from the storage unit in the unit image, R is the bit rate read from the storage unit, and F is the unit image to be coded. , Vbv_bits is the occupation amount of the VBV buffer in the immediately preceding unit image.

【0213】また、この発明に係る符号化装置における
符号量制御手段は、以下の式、あるいはそれと同等の結
果となる値に基づいて最大符号量Tmaxを求めること
を特徴とするので、蓄積手段のオーバーフローおよびV
BVバッファのアンダフローを共に回避することができ
る。 Tmax≦min(vbv_bits+Rp,Bs−
B) ここに、Rp=R/F ただし、Tmaxは最大符号量、Rpは単位画像におけ
る蓄積手段から読み出されるビット数、Rは前記蓄積手
段から読み出されるビットレート、Fは符号化する単位
画像のレート、vbv_bitsは直前の単位画像にお
けるVBVバッファの占有量、Bsは前記蓄積手段の容
量およびBは前記蓄積手段における占有量である。
Further, the code amount control means in the coding apparatus according to the present invention is characterized in that the maximum code amount Tmax is obtained based on the following equation or a value equivalent to the following equation. Overflow and V
Both underflow of the BV buffer can be avoided. Tmax ≦ min (vbv_bits + Rp, Bs−
B) where Rp = R / F, where Tmax is the maximum code amount, Rp is the number of bits read from the storage unit in the unit image, R is the bit rate read from the storage unit, and F is the unit image to be coded. The rate, vbv_bits, is the occupancy of the VBV buffer in the immediately preceding unit image, Bs is the capacity of the storage means, and B is the occupancy of the storage means.

【0214】また、この発明に係る符号化装置における
蓄積手段から読み出されるビットレートRが可変である
ことを特徴とするので、蓄積手段のオーバーフローある
いはVBVバッファのアンダフローを効果的に回避する
ことができる。
Further, since the bit rate R read from the storage means in the encoding apparatus according to the present invention is variable, it is possible to effectively avoid overflow of the storage means or underflow of the VBV buffer. it can.

【0215】また、この発明に係る符号化装置における
符号量制御手段は、現在のマクロブロックに対して符号
化手段が出力する符号の符号量mb_bit、前記単位
画像を構成する現在のマクロブロックの一つ前のマクロ
ブロックまでの符号量Sc、前記単位画像の最大符号量
Tmax、前記単位画像を構成する現在のマクロブロッ
クに続いて符号化されるべきマクロブロック数M、前記
単位画像に対して固定符号出力手段が出力する固定符号
の符号長L、前記単位画像を構成するビデオパケット単
位で発生する付加的な符号の符号量αの間の関係が、 Sc+mb_bit+M×L+α>Tmax (ただし、α≧0)である場合に、現在のマクロブロッ
クに対して、前記固定符号出力手段が出力する前記固定
符号を蓄積手段に蓄積するよう制御することを特徴とす
るので、単位画像の符号量が必ず最大符号量Tmax以
下となるように制御できる。
The code amount control means in the coding apparatus according to the present invention includes a code amount mb_bit of a code output from the coding means for the current macroblock, a code amount of one of the current macroblocks constituting the unit image. The code amount Sc up to the previous macroblock, the maximum code amount Tmax of the unit image, the number of macroblocks M to be coded following the current macroblock constituting the unit image, fixed for the unit image The relationship between the code length L of the fixed code output from the code output means and the code amount α of an additional code generated in video packet units constituting the unit image is Sc + mb_bit + M × L + α> Tmax (where α ≧ 0) ), The fixed code output from the fixed code output means is stored in the storage means for the current macroblock. Therefore, control can be performed such that the code amount of the unit image is always equal to or less than the maximum code amount Tmax.

【0216】また、この発明に係る符号化装置における
符号量制御手段は、現在のマクロブロックに対して符号
化手段が出力する符号の符号量mb_bit、単位画像
を構成する前記現在のマクロブロックの一つ前のマクロ
ブロックまでの符号量Sc、前記単位画像の最大符号量
Tmax、前記単位画像を構成する前記現在のマクロブ
ロックに続いて符号化されるべきマクロブロック数M、
前記単位画像に対して固定符号出力手段が出力する固定
符号の符号長L、前記単位画像を構成するビデオパケッ
ト単位で発生する付加的な符号の符号量αの間の関係
が、 Sc+mb_bit+M×L+α>Tmax (ただし、α≧0)である場合に、前記現在のマクロブ
ロックに対して、前記固定符号出力手段が出力する前記
固定符号を蓄積手段に蓄積するよう制御するとともに、
前記単位画像を構成する前記現在のマクロブロックに続
いて符号化されるべきM個のマクロブロックに対して
も、前記固定符号出力手段が出力する前記固定符号を前
記蓄積手段に蓄積するよう制御することを特徴とするの
で、少ない演算量で単位画像の符号量が必ず最大符号量
Tmax以下となるよう制御できる。
Further, the code amount control means in the coding apparatus according to the present invention includes a code amount mb_bit of a code output from the coding means for the current macroblock, and one of the current macroblocks constituting the unit image. The code amount Sc up to the previous macroblock, the maximum code amount Tmax of the unit image, the number M of macroblocks to be coded following the current macroblock constituting the unit image,
The relationship between the code length L of the fixed code output from the fixed code output means for the unit image and the code amount α of the additional code generated in video packet units constituting the unit image is Sc + mb_bit + M × L + α> When Tmax (where α ≧ 0), control is performed such that the fixed code output from the fixed code output means is stored in storage means for the current macroblock,
For the M macroblocks to be coded following the current macroblock constituting the unit image, control is performed so that the fixed code output from the fixed code output unit is stored in the storage unit. Therefore, control can be performed such that the code amount of the unit image is always equal to or less than the maximum code amount Tmax with a small amount of calculation.

【0217】また、この発明に係る符号化装置における
符号量制御手段は、前記 Sc+mb_bit+M×L+α>Tmax なる関係がなりたち、かつ、単位画像の符号化タイプが
イントラである場合に、現在のマクロブロックから新し
いビデオパケットを構成することを特徴とするので、固
定符号出力手段が出力する符号に対応した復号画像を簡
単に得ることができる。
Further, the code amount control means in the coding apparatus according to the present invention is arranged such that when the relationship of Sc + mb_bit + M × L + α> Tmax is satisfied and the coding type of the unit image is intra, the current macro block Since a new video packet is constructed from the above, a decoded image corresponding to the code output from the fixed code output means can be easily obtained.

【0218】また、この発明に係る符号化装置における
固定符号出力手段は、単位画像の符号化タイプにおいて
その符号量が最小となるマクロブロックに対応する符号
を出力することを特徴とするので、固定符号出力手段の
出力を選択するマクロブロックを最低限に抑えることが
でき、復号画質の劣化を極力防ぐことができる。
Further, the fixed code output means in the coding apparatus according to the present invention is characterized in that it outputs a code corresponding to a macroblock having the minimum code amount in the coding type of a unit image. It is possible to minimize the number of macroblocks from which the output of the code output unit is selected, and to minimize the deterioration of the decoded image quality.

【0219】この発明に係る符号化装置は、マクロブロ
ック単位の外部入力信号を符号化して、当該外部入力信
号に対応する符号を出力する符号化手段と、単位画像の
符号化タイプ毎に予め定めた固定符号を出力する固定符
号出力手段と、前記符号化手段から出力される前記符号
または前記固定符号出力手段から出力される前記固定符
号を蓄積する蓄積手段と、単位画像を構成する先頭のマ
クロブロックが入力されてからの経過時間に基づいて前
記符号または前記固定符号のいずれかを前記蓄積手段に
蓄積するように制御する符号量制御手段とを備えること
を特徴とするので、符号化手段が各マクロブロックを符
号化するのに必要な処理時間が一定でない場合も、単位
画像を構成する全てのマクロブロックを所定の時間内に
符号化することできる。
An encoding apparatus according to the present invention encodes an external input signal in units of macroblocks, and outputs a code corresponding to the external input signal, and a predetermined coding unit for each coding type of the unit image. Fixed code output means for outputting the fixed code, storage means for storing the code output from the coding means or the fixed code output from the fixed code output means, and a first macro constituting a unit image Code amount control means for controlling either the code or the fixed code to be stored in the storage means based on the elapsed time since the block was input. Even if the processing time required to encode each macroblock is not constant, all macroblocks constituting the unit image can be encoded within a predetermined time. That.

【0220】この発明に係る符号化装置は、マクロブロ
ック単位の外部入力信号を符号化して、当該外部入力信
号に対応する符号を出力する符号化手段と、単位画像の
符号化タイプ毎に予め定めた固定符号を出力する固定符
号出力手段と、前記符号化手段から出力される前記符号
または前記固定符号出力手段から出力される前記固定符
号を蓄積する蓄積手段と、前記符号化手段によって符号
化された前記符号の符号量および単位画像を構成する先
頭のマクロブロックが入力されてからの経過時間に基づ
いて前記符号または前記固定符号のいずれかを前記蓄積
手段に蓄積するように制御する符号量制御手段とを備え
ることを特徴とするので、蓄積手段のオーバーフローあ
るいはVBVバッファのアンダーフローを回避すると共
に、単位画像を構成する全てのマクロブロックを所定の
時間内に符号化することができる。
An encoding apparatus according to the present invention encodes an external input signal in units of macroblocks, and outputs a code corresponding to the external input signal, and a predetermined unit for each encoding type of a unit image. Fixed code output means for outputting the fixed code, storage means for storing the code output from the coding means or the fixed code output from the fixed code output means, Code amount control for storing either the code or the fixed code in the storage means based on the code amount of the code and the elapsed time since the leading macroblock constituting the unit image is input. Means for avoiding overflow of the storage means or underflow of the VBV buffer, and composes a unit image. All macroblocks can be encoded within a predetermined time.

【0221】この発明に係る符号化方法は、マクロブロ
ック単位の外部入力信号を符号化して、当該外部入力信
号に対応する符号を出力する符号化工程と、単位画像の
符号化タイプ毎に予め定めた固定符号を与える固定符号
出力工程と、前記符号化工程により得られる前記符号ま
たは前記固定符号出力工程から与えられる前記固定符号
を蓄積する蓄積工程と、前記符号化工程によって符号化
された前記符号の符号量に応じて前記符号または前記固
定符号のいずれかを前記蓄積工程で蓄積するように制御
する符号量制御工程とを含むことを特徴とするので、マ
クロブロック毎の発生符号量を制限することできる。
The encoding method according to the present invention encodes an external input signal in units of macroblocks, and outputs a code corresponding to the external input signal, and determines in advance for each encoding type of a unit image. A fixed code output step of providing the fixed code, a storage step of storing the code obtained in the coding step or the fixed code given from the fixed code output step, and the code coded by the coding step. And a code amount control step of controlling either the code or the fixed code to be stored in the storage step according to the code amount of the macro block. I can do it.

【0222】また、この発明に係る符号化方法における
符号量制御工程は、単位画像の符号化で発生させること
のできる最大符号量を当該単位画像毎に求め、当該最大
符号量に基づいて前記単位画像を構成するマクロブロッ
ク毎に、符号化工程から与えられる符号または固定符号
出力工程から与えられる固定符号のいずれかを蓄積工程
で蓄積するように制御することを特徴とするので、各単
位画像の発生符号量を簡単に制限することができる。
In the code amount control step in the encoding method according to the present invention, the maximum code amount that can be generated by encoding the unit image is obtained for each unit image, and the unit code is calculated based on the maximum code amount. For each macroblock constituting the image, control is performed such that either the code given from the encoding step or the fixed code given from the fixed code output step is stored in the storage step. The generated code amount can be easily limited.

【0223】また、この発明に係る符号化方法における
符号量制御工程は、最大符号量Tmaxを以下の式に基
づいて求めることを特徴とするので、蓄積工程のオーバ
ーフローを防ぐことができる。 Tmax≦Bs−B ただし、Tmaxは最大符号量、Bsは蓄積工程におい
て許容される容量およびBは前記蓄積工程における占有
量である。
Further, since the code amount control step in the encoding method according to the present invention is characterized in that the maximum code amount Tmax is obtained based on the following equation, overflow of the accumulation step can be prevented. Tmax ≦ Bs−B where Tmax is the maximum code amount, Bs is the capacity allowed in the accumulation step, and B is the occupation amount in the accumulation step.

【0224】また、この発明に係る符号化方法における
符号量制御工程は、最大符号量Tmaxを以下の式に基
づいて求めることを特徴とするので、VBVバッファの
アンダーフローを防ぐことができる。 Tmax≦vbv_bits+Rp ここに、Rp=R/F ただし、Tmaxは最大符号量、Rpは単位画像におけ
る蓄積工程における読み出しのビット数、Rは前記蓄積
工程における読み出しのビットレート、Fは符号化する
単位画像のレート、vbv_bitsは直前の単位画像
におけるVBVバッファの占有量である。
Further, the code amount control step in the encoding method according to the present invention is characterized in that the maximum code amount Tmax is obtained based on the following equation, so that underflow of the VBV buffer can be prevented. Tmax ≦ vbv_bits + Rp where Rp = R / F, where Tmax is the maximum code amount, Rp is the number of bits read in the storage step in the unit image, R is the bit rate of the read in the storage step, and F is the unit image to be coded. , Vbv_bits is the occupation amount of the VBV buffer in the immediately preceding unit image.

【0225】また、この発明に係る符号化方法における
符号量制御工程は、以下の式、あるいはそれと同等の結
果となる値に基づいて最大符号量Tmaxを求めること
を特徴とするので、蓄積工程のオーバーフローおよびV
BVバッファのアンダーフローを共に回避することがで
きる。 Tmax≦min(vbv_bits+Rp,Bs−
B) ここに、Rp=R/F ただし、Tmaxは最大符号量、Rpは単位画像におけ
る蓄積工程における読み出しのビット数、Rは蓄積工程
における読み出しのビットレート、Fは符号化する単位
画像のレート、vbv_bitsは直前の単位画像にお
けるVBVバッファの占有量、Bsは前記蓄積工程にお
いて許容される容量およびBは前記蓄積工程における占
有量である。
Further, the code amount control step in the encoding method according to the present invention is characterized in that the maximum code amount Tmax is obtained based on the following equation or a value equivalent to the following equation. Overflow and V
Both underflow of the BV buffer can be avoided. Tmax ≦ min (vbv_bits + Rp, Bs−
B) where Rp = R / F, where Tmax is the maximum code amount, Rp is the number of bits read in the storage process in the unit image, R is the bit rate of read in the storage process, and F is the rate of the unit image to be coded. , Vbv_bits are the occupancy of the VBV buffer in the immediately preceding unit image, Bs is the capacity allowed in the accumulation step, and B is the occupancy in the accumulation step.

【0226】また、この発明に係る符号化方法における
蓄積工程における読み出しのビットレートRが可変であ
ることを特徴とするので、蓄積工程のオーバーフローあ
るいはVBVバッファのアンダーフローを効果的に回避
することができる。
In the encoding method according to the present invention, the read bit rate R in the storage step is variable, so that it is possible to effectively avoid overflow of the storage step or underflow of the VBV buffer. it can.

【0227】また、この発明に係る符号化方法における
符号量制御工程は、現在のマクロブロックに対して符号
化工程から与えられる符号の符号量mb_bit、単位
画像を構成する現在のマクロブロックの一つ前のマクロ
ブロックまでの符号量Sc、前記単位画像の最大符号量
Tmax、前記単位画像を構成する現在のマクロブロッ
クに続いて符号化されるべきマクロブロック数M、前記
単位画像に対して固定符号出力工程が出力する符号の符
号長L、前記単位画像を構成するビデオパケット単位で
発生する付加的な符号の符号量αの間の関係が、 Sc+mb_bit+M×L+α>Tmax (ただし、α≧0)である場合に、現在のマクロブロッ
クに対して、固定符号出力工程から与えられる前記固定
符号を蓄積工程で蓄積するよう制御することを特徴とす
るので、単位画像の符号量が必ず最大符号量Tmax以
下となるように制御できる。
In the coding amount control step in the coding method according to the present invention, the code amount mb_bit of the code given from the coding step for the current macroblock, one of the current macroblocks constituting the unit image, The code amount Sc up to the previous macroblock, the maximum code amount Tmax of the unit image, the number M of macroblocks to be coded following the current macroblock constituting the unit image, a fixed code for the unit image The relationship between the code length L of the code output by the output step and the code amount α of the additional code generated in video packet units constituting the unit image is Sc + mb_bit + M × L + α> Tmax (where α ≧ 0). In some cases, for the current macroblock, control is performed so that the fixed code given from the fixed code output step is accumulated in the accumulation step. Therefore, control can be performed such that the code amount of the unit image is always equal to or less than the maximum code amount Tmax.

【0228】また、この発明に係る符号化方法における
符号量制御工程は、現在のマクロブロックに対して符号
化工程から与えられる符号の符号量mb_bit、単位
画像を構成する前記現在のマクロブロックの一つ前のマ
クロブロックまでの符号量Sc、前記単位画像の最大符
号量Tmax、前記単位画像を構成する前記現在のマク
ロブロックに続いて符号化されるべきマクロブロック数
M、前記単位画像に対して固定符号出力工程から与えら
れる固定符号の符号長L、前記単位画像を構成するビデ
オパケット単位で発生する付加的な符号の符号量αの間
の関係が、 Sc+mb_bit+M×L+α>Tmax (ただし、α≧0)である場合に、前記現在のマクロブ
ロックに対して、前記固定符号出力工程から与えられる
前記固定符号を蓄積工程で蓄積するよう制御するととも
に、前記単位画像を構成する前記現在のマクロブロック
に続いて符号化されるべきM個のマクロブロックに対し
ても、前記固定符号出力工程から与えられる前記固定符
号を前記蓄積工程で蓄積するよう制御することを特徴と
するので、少ない演算量で単位画像の符号量が必ず最大
符号量Tmax以下となるよう制御できる。
Further, the code amount control step in the encoding method according to the present invention includes the code amount mb_bit of the code given from the encoding step for the current macroblock, and one of the current macroblocks constituting the unit image. The code amount Sc up to the previous macroblock, the maximum code amount Tmax of the unit image, the number M of macroblocks to be coded following the current macroblock constituting the unit image, The relationship between the code length L of the fixed code given from the fixed code output step and the code amount α of the additional code generated in video packet units constituting the unit image is Sc + mb_bit + M × L + α> Tmax (where α ≧ 0), the fixed code provided from the fixed code output step is stored for the current macroblock. Control to accumulate in the step, and also for the M macroblocks to be encoded following the current macroblock constituting the unit image, the fixed code given from the fixed code output step Since the control is performed so as to accumulate in the accumulation step, it is possible to control the code amount of the unit image to be always equal to or less than the maximum code amount Tmax with a small amount of calculation.

【0229】また、この発明に係る符号化方法における
符号量制御工程は、前記 Sc+mb_bit+M×L+α>Tmax なる関係がなりたち、かつ、単位画像の符号化タイプが
イントラである場合に、現在のマクロブロックから新し
いビデオパケットを構成することを特徴とするので、固
定符号出力手段が出力する符号に対応した復号画像を簡
単に得ることができる。
In the coding amount control step in the coding method according to the present invention, when the relation of Sc + mb_bit + M × L + α> Tmax is satisfied and the coding type of the unit image is intra, the current macroblock Since a new video packet is constructed from the above, a decoded image corresponding to the code output from the fixed code output means can be easily obtained.

【0230】また、この発明に係る符号化方法における
固定符号出力工程は、単位画像の符号化タイプにおいて
その符号量が最小となるマクロブロックに対応する符号
を出力することを特徴とするので、固定符号出力手段の
出力を選択するマクロブロックを最低限に抑えることが
でき、復号画質の劣化を極力防ぐことができる。
Further, the fixed code output step in the coding method according to the present invention is characterized by outputting a code corresponding to a macroblock having the minimum code amount in the coding type of a unit image. It is possible to minimize the number of macroblocks from which the output of the code output unit is selected, and to minimize the deterioration of the decoded image quality.

【0231】この発明に係る符号化方法は、マクロブロ
ック単位の外部入力信号を符号化して、当該外部入力信
号に対応する符号を出力する符号化工程と、単位画像の
符号化タイプ毎に予め定めた固定符号を与える固定符号
出力工程と、前記符号化工程から与えられる前記符号ま
たは前記固定符号出力工程から与えられる前記固定符号
を蓄積する蓄積工程と、前記単位画像を構成する先頭の
マクロブロックが入力されてからの経過時間に基づいて
前記符号または前記固定符号のいずれかを前記蓄積工程
で蓄積するように制御する符号量制御工程とを含むこと
を特徴とするので、符号化工程が各マクロブロックを符
号化するのに必要な処理時間が一定でない場合も、単位
画像を構成する全てのマクロブロックを所定の時間内に
符号化することできる。
The encoding method according to the present invention encodes an external input signal in units of macroblocks, and outputs a code corresponding to the external input signal. A fixed code output step of providing the fixed code, an accumulation step of accumulating the code given from the encoding step or the fixed code given from the fixed code output step, and a top macroblock constituting the unit image. A code amount control step of controlling either the code or the fixed code to be stored in the storage step based on the elapsed time from the input. Even if the processing time required to encode a block is not constant, all macroblocks constituting a unit image can be encoded within a predetermined time. That.

【0232】この発明に係る符号化方法は、マクロブロ
ック単位の外部入力信号を符号化して、当該外部入力信
号に対応する符号を出力する符号化工程と、単位画像の
符号化タイプ毎に予め定めた固定符号を出力する固定符
号出力工程と、前記符号化工程から与えられる前記符号
または前記固定符号出力工程から与えられる前記固定符
号を蓄積する蓄積工程と、前記符号化工程によって符号
化された前記符号の符号量および前記単位画像を構成す
る先頭のマクロブロックが入力されてからの経過時間に
基づいて前記符号または前記固定符号のいずれかを前記
蓄積工程で蓄積するように制御する符号量制御工程とを
含むことを特徴とするので、蓄積手段のオーバーフロー
あるいはVBVバッファのアンダーフローを回避すると
共に、単位画像を構成する全てのマクロブロックを所定
の時間内に符号化することができる。
The encoding method according to the present invention encodes an external input signal in units of macroblocks, and outputs a code corresponding to the external input signal. A fixed code output step of outputting the fixed code, a storage step of storing the code given from the encoding step or the fixed code given from the fixed code output step, and the encoding step performed by the encoding step. A code amount control step of controlling either the code or the fixed code to be stored in the storage step based on a code amount of a code and an elapsed time since a leading macroblock constituting the unit image is input; In order to avoid the overflow of the storage means or the underflow of the VBV buffer, All macroblocks formed can be encoded within a predetermined time.

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

【図1】 この発明の実施の形態1を示すブロック図で
ある。
FIG. 1 is a block diagram showing a first embodiment of the present invention.

【図2】 この発明の実施の形態1における一時バッフ
ァと送信バッファの状態(I−VOPの場合)を示す説
明図である。
FIG. 2 is an explanatory diagram showing states of a temporary buffer and a transmission buffer (in the case of an I-VOP) according to Embodiment 1 of the present invention;

【図3】 この発明の実施の形態1における一時バッフ
ァと送信バッファの状態(P−VOPの場合)を示す説
明図である。
FIG. 3 is an explanatory diagram showing states of a temporary buffer and a transmission buffer (in the case of P-VOP) according to Embodiment 1 of the present invention;

【図4】 この発明の実施の形態1を示すフローチャー
ト(P−VOPの場合)である。
FIG. 4 is a flowchart (for P-VOP) showing Embodiment 1 of the present invention.

【図5】 この発明の実施の形態1を示すフローチャー
ト(I−VOPの場合)である。
FIG. 5 is a flowchart (in the case of an I-VOP) showing the first embodiment of the present invention;

【図6】 この発明の実施の形態2を示すフローチャー
ト(P−VOPの場合)である。
FIG. 6 is a flowchart (for P-VOP) showing Embodiment 2 of the present invention.

【図7】 この発明の実施の形態2を示すフローチャー
ト(I−VOPの場合)である。
FIG. 7 is a flowchart (in the case of an I-VOP) showing Embodiment 2 of the present invention.

【図8】 この発明の実施の形態3を示すフローチャー
トである。
FIG. 8 is a flowchart showing a third embodiment of the present invention.

【図9】 この発明の実施の形態4を示すフローチャー
トである。
FIG. 9 is a flowchart showing a fourth embodiment of the present invention.

【図10】 この発明の実施の形態5を示すブロック図
である。
FIG. 10 is a block diagram showing a fifth embodiment of the present invention.

【図11】 この発明の実施の形態5における一時バッ
ファの状態を示す説明図である。
FIG. 11 is an explanatory diagram showing a state of a temporary buffer according to Embodiment 5 of the present invention.

【図12】 この発明の実施の形態6を示すブロック図
である。
FIG. 12 is a block diagram showing a sixth embodiment of the present invention.

【図13】 この発明の実施の形態7における送信バッ
ファの状態を示す説明図である。
FIG. 13 is an explanatory diagram showing a state of a transmission buffer according to Embodiment 7 of the present invention.

【図14】 この発明の実施の形態7を示すブロック図
である。
FIG. 14 is a block diagram showing a seventh embodiment of the present invention.

【図15】 従来の符号化装置を示すブロック図であ
る。
FIG. 15 is a block diagram showing a conventional encoding device.

【図16】 従来の符号化装置への入力信号を示す説明
図である。
FIG. 16 is an explanatory diagram showing an input signal to a conventional encoding device.

【図17】 従来の符号化装置におけるビットストリー
ムの構成を示す説明図である。
FIG. 17 is an explanatory diagram showing a configuration of a bit stream in a conventional encoding device.

【図18】 従来の符号化装置におけるビデオパケット
の画面上の位置を示す説明図である。
FIG. 18 is an explanatory diagram showing a position on a screen of a video packet in a conventional encoding device.

【図19】 従来の符号化装置におけるDC/AC予測
を示す説明図である。
FIG. 19 is an explanatory diagram showing DC / AC prediction in a conventional encoding device.

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

5a、5b、5c 可変長符号化手段、101 一時バ
ッファ、102 符号量制御手段、103 送信バッフ
ァ、104 固定符号出力手段。
5a, 5b, 5c Variable length coding means, 101 temporary buffer, 102 code amount control means, 103 transmission buffer, 104 fixed code output means.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 貴島 淳子 東京都千代田区丸の内二丁目2番3号 三 菱電機株式会社内 (72)発明者 稲村 守 東京都千代田区丸の内二丁目2番3号 三 菱電機株式会社内 (72)発明者 杉山 和宏 東京都千代田区丸の内二丁目2番3号 三 菱電機株式会社内 Fターム(参考) 5C059 KK35 LA10 MA00 MA04 MA05 MA23 MC11 MC33 MC35 ME05 NN01 PP16 RB02 RB09 RC09 RC12 RC16 SS07 SS10 TA17 TB07 TC20 TC36 UA02 UA32 5J064 BA01 BA09 BA16 BB03 BB12 BB13 BC01 BC16 BD02  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Junko Kijima 2-3-2 Marunouchi, Chiyoda-ku, Tokyo Inside Mitsubishi Electric Corporation (72) Inventor Mamoru Inamura 2-3-2 Marunouchi, Chiyoda-ku, Tokyo Within Rishi Electric Co., Ltd. (72) Inventor Kazuhiro Sugiyama 2-3-2 Marunouchi, Chiyoda-ku, Tokyo F-term (reference) 5C059 KK35 LA10 MA00 MA04 MA05 MA23 MC11 MC33 MC35 ME05 NN01 PP16 RB02 RB09 RC09 RC12 RC16 SS07 SS10 TA17 TB07 TC20 TC36 UA02 UA32 5J064 BA01 BA09 BA16 BB03 BB12 BB13 BC01 BC16 BD02

Claims (24)

【特許請求の範囲】[Claims] 【請求項1】 マクロブロック単位の外部入力信号を符
号化して、当該外部入力信号に対応する符号を出力する
符号化手段と、 単位画像の符号化タイプ毎に予め定めた固定符号を出力
する固定符号出力手段と、 前記符号化手段から出力される前記符号または前記固定
符号出力手段から出力される前記固定符号を蓄積する蓄
積手段と、 前記符号化手段によって符号化された前記符号の符号量
に応じて前記符号または前記固定符号のいずれかを前記
蓄積手段に蓄積するように制御する符号量制御手段とを
備えることを特徴とする符号化装置。
An encoding means for encoding an external input signal on a macroblock basis and outputting a code corresponding to the external input signal, and a fixed output for outputting a fixed code predetermined for each encoding type of a unit image. Code output means, storage means for storing the code output from the coding means or the fixed code output from the fixed code output means, and a code amount of the code coded by the coding means. A coding amount control unit that controls to store either the code or the fixed code in the storage unit in response to the code amount.
【請求項2】 符号量制御手段は、単位画像の符号化で
発生させることのできる最大符号量を当該単位画像毎に
求め、当該最大符号量に基づいて前記単位画像を構成す
るマクロブロック毎に、符号化手段から出力される符号
または固定符号出力手段から出力される固定符号のいず
れかを蓄積手段に蓄積するように制御することを特徴と
する請求項1に記載の符号化装置。
2. The code amount control means calculates a maximum code amount that can be generated by encoding a unit image for each of the unit images, and for each macro block configuring the unit image based on the maximum code amount. 2. The encoding apparatus according to claim 1, wherein control is performed such that either the code output from the encoding means or the fixed code output from the fixed code output means is stored in the storage means.
【請求項3】 符号量制御手段は、最大符号量Tmax
を以下の式に基づいて求めることを特徴とする請求項2
に記載の符号化装置。 Tmax≦Bs−B ただし、Tmaxは最大符号量、Bsは蓄積手段の容量
およびBは前記蓄積手段における占有量である。
3. The code amount control means includes a maximum code amount Tmax.
Is calculated based on the following equation:
An encoding device according to claim 1. Tmax ≦ Bs−B where Tmax is the maximum code amount, Bs is the capacity of the storage means, and B is the occupation amount in the storage means.
【請求項4】 符号量制御手段は、最大符号量Tmax
を以下の式に基づいて求めることを特徴とする請求項2
に記載の符号化装置。 Tmax≦vbv_bits+Rp ここに、Rp=R/F ただし、Tmaxは最大符号量、Rpは単位画像におけ
る蓄積手段から読み出されるビット数、Rは前記蓄積手
段から読み出されるビットレート、Fは符号化する単位
画像のレート、vbv_bitsは直前の単位画像にお
けるVBVバッファの占有量である。
4. The code amount control means includes a maximum code amount Tmax.
Is calculated based on the following equation:
An encoding device according to claim 1. Tmax ≦ vbv_bits + Rp where Rp = R / F, where Tmax is the maximum code amount, Rp is the number of bits read from the storage unit in the unit image, R is the bit rate read from the storage unit, and F is the unit image to be coded. , Vbv_bits is the occupation amount of the VBV buffer in the immediately preceding unit image.
【請求項5】 符号量制御手段は、以下の式、あるいは
それと同等の結果となる値に基づいて最大符号量Tma
xを求めることを特徴とする請求項2に記載の符号化装
置。 Tmax≦min(vbv_bits+Rp,Bs−
B) ここに、Rp=R/F ただし、Tmaxは最大符号量、Rpは単位画像におけ
る蓄積手段から読み出されるビット数、Rは前記蓄積手
段から読み出されるビットレート、Fは符号化する単位
画像のレート、vbv_bitsは直前の単位画像にお
けるVBVバッファの占有量、Bsは前記蓄積手段の容
量およびBは前記蓄積手段における占有量である。
5. The code amount control means calculates the maximum code amount Tma based on the following equation or a value equivalent to the following equation:
3. The encoding apparatus according to claim 2, wherein x is obtained. Tmax ≦ min (vbv_bits + Rp, Bs−
B) where Rp = R / F, where Tmax is the maximum code amount, Rp is the number of bits read from the storage unit in the unit image, R is the bit rate read from the storage unit, and F is the unit image to be coded. The rate, vbv_bits, is the occupancy of the VBV buffer in the immediately preceding unit image, Bs is the capacity of the storage means, and B is the occupancy of the storage means.
【請求項6】 蓄積手段から読み出されるビットレート
Rが可変であることを特徴とする請求項4または5に記
載の符号化装置。
6. The encoding device according to claim 4, wherein the bit rate R read from the storage means is variable.
【請求項7】 符号量制御手段は、現在のマクロブロッ
クに対して符号化手段が出力する符号の符号量mb_b
it、前記単位画像を構成する現在のマクロブロックの
一つ前のマクロブロックまでの符号量Sc、前記単位画
像の最大符号量Tmax、前記単位画像を構成する現在
のマクロブロックに続いて符号化されるべきマクロブロ
ック数M、前記単位画像に対して固定符号出力手段が出
力する固定符号の符号長L、前記単位画像を構成するビ
デオパケット単位で発生する付加的な符号の符号量αの
間の関係が、 Sc+mb_bit+M×L+α>Tmax (ただし、α≧0)である場合に、現在のマクロブロッ
クに対して、前記固定符号出力手段が出力する前記固定
符号を蓄積手段に蓄積するよう制御することを特徴とす
る請求項2に記載の符号化装置。
7. The code amount control means includes a code amount mb_b of a code output from the coding means for a current macroblock.
it, the code amount Sc up to the macroblock immediately before the current macroblock constituting the unit image, the maximum code amount Tmax of the unit image, the code amount which is encoded following the current macroblock constituting the unit image. Between the number M of macroblocks to be processed, the code length L of the fixed code output from the fixed code output means for the unit image, and the code amount α of the additional code generated in video packet units constituting the unit image. When the relation is Sc + mb_bit + M × L + α> Tmax (where α ≧ 0), control is performed such that the fixed code output from the fixed code output means is stored in the storage means for the current macroblock. 3. The encoding device according to claim 2, wherein:
【請求項8】 符号量制御手段は、現在のマクロブロッ
クに対して符号化手段が出力する符号の符号量mb_b
it、単位画像を構成する前記現在のマクロブロックの
一つ前のマクロブロックまでの符号量Sc、前記単位画
像の最大符号量Tmax、前記単位画像を構成する前記
現在のマクロブロックに続いて符号化されるべきマクロ
ブロック数M、前記単位画像に対して固定符号出力手段
が出力する固定符号の符号長L、前記単位画像を構成す
るビデオパケット単位で発生する付加的な符号の符号量
αの間の関係が、 Sc+mb_bit+M×L+α>Tmax (ただし、α≧0)である場合に、前記現在のマクロブ
ロックに対して、前記固定符号出力手段が出力する前記
固定符号を蓄積手段に蓄積するよう制御するとともに、
前記単位画像を構成する前記現在のマクロブロックに続
いて符号化されるべきM個のマクロブロックに対して
も、前記固定符号出力手段が出力する前記固定符号を前
記蓄積手段に蓄積するよう制御することを特徴とする請
求項2に記載の符号化装置。
8. The code amount control means includes a code amount mb_b of a code output from the coding means for the current macroblock.
it, the code amount Sc up to the macroblock immediately before the current macroblock constituting the unit image, the maximum code amount Tmax of the unit image, encoding following the current macroblock constituting the unit image Between the number M of macroblocks to be performed, the code length L of the fixed code output from the fixed code output means for the unit image, and the code amount α of an additional code generated in video packet units constituting the unit image If the relationship of Sc + mb_bit + M × L + α> Tmax (where α ≧ 0), control is performed such that the fixed code output from the fixed code output means is stored in storage means for the current macroblock. With
For the M macroblocks to be coded following the current macroblock constituting the unit image, control is performed so that the fixed code output from the fixed code output unit is stored in the storage unit. The encoding device according to claim 2, wherein:
【請求項9】 符号量制御手段は、前記 Sc+mb_bit+M×L+α>Tmax なる関係がなりたち、かつ、単位画像の符号化タイプが
イントラである場合に、現在のマクロブロックから新し
いビデオパケットを構成することを特徴とする請求項8
に記載の符号化装置。
9. The code amount control means, when the relation of Sc + mb_bit + M × L + α> Tmax is satisfied and the coding type of the unit image is intra, configures a new video packet from the current macroblock. 9. The method according to claim 8, wherein
An encoding device according to claim 1.
【請求項10】 固定符号出力手段は、単位画像の符号
化タイプにおいてその符号量が最小となるマクロブロッ
クに対応する符号を出力することを特徴とする請求項2
に記載の符号化装置。
10. The fixed code output means outputs a code corresponding to a macroblock having a minimum code amount in a coding type of a unit image.
An encoding device according to claim 1.
【請求項11】 マクロブロック単位の外部入力信号を
符号化して、当該外部入力信号に対応する符号を出力す
る符号化手段と、単位画像の符号化タイプ毎に予め定め
た固定符号を出力する固定符号出力手段と、前記符号化
手段から出力される前記符号または前記固定符号出力手
段から出力される前記固定符号を蓄積する蓄積手段と、
単位画像を構成する先頭のマクロブロックが入力されて
からの経過時間に基づいて前記符号または前記固定符号
のいずれかを前記蓄積手段に蓄積するように制御する符
号量制御手段とを備えることを特徴とする符号化装置。
11. An encoding means for encoding an external input signal in units of macroblocks and outputting a code corresponding to the external input signal, and a fixed means for outputting a fixed code predetermined for each coding type of the unit image. Code output means, storage means for storing the fixed code output from the code or the fixed code output means output from the encoding means,
Code amount control means for controlling to store either the code or the fixed code in the storage means based on the elapsed time since the leading macroblock constituting the unit image is input. Encoding device.
【請求項12】 マクロブロック単位の外部入力信号を
符号化して、当該外部入力信号に対応する符号を出力す
る符号化手段と、単位画像の符号化タイプ毎に予め定め
た固定符号を出力する固定符号出力手段と、 前記符号化手段から出力される前記符号または前記固定
符号出力手段から出力される前記固定符号を蓄積する蓄
積手段と、 前記符号化手段によって符号化された前記符号の符号量
および単位画像を構成する先頭のマクロブロックが入力
されてからの経過時間に基づいて前記符号または前記固
定符号のいずれかを前記蓄積手段に蓄積するように制御
する符号量制御手段とを備えることを特徴とする符号化
装置。
12. An encoding means for encoding an external input signal in macroblock units and outputting a code corresponding to the external input signal, and a fixed means for outputting a fixed code predetermined for each coding type of the unit image. Code output means; storage means for storing the code output from the coding means or the fixed code output from the fixed code output means; and the code amount of the code coded by the coding means and Code amount control means for controlling to store either the code or the fixed code in the storage means based on the elapsed time since the leading macroblock constituting the unit image is input. Encoding device.
【請求項13】 マクロブロック単位の外部入力信号を
符号化して、当該外部入力信号に対応する符号を出力す
る符号化工程と、 単位画像の符号化タイプ毎に予め定めた固定符号を与え
る固定符号出力工程と、 前記符号化工程により得られる前記符号または前記固定
符号出力工程から与えられる前記固定符号を蓄積する蓄
積工程と、 前記符号化工程によって符号化された前記符号の符号量
に応じて前記符号または前記固定符号のいずれかを前記
蓄積工程で蓄積するように制御する符号量制御工程とを
含むことを特徴とする符号化方法。
13. An encoding step of encoding an external input signal in units of macroblocks and outputting a code corresponding to the external input signal, and a fixed code for providing a predetermined fixed code for each coding type of the unit image. An output step, an accumulation step of accumulating the fixed code obtained from the code or the fixed code output step obtained by the encoding step, and a code amount of the code encoded by the encoding step. A code amount control step of controlling either the code or the fixed code to be stored in the storage step.
【請求項14】 符号量制御工程は、単位画像の符号化
で発生させることのできる最大符号量を当該単位画像毎
に求め、当該最大符号量に基づいて前記単位画像を構成
するマクロブロック毎に、符号化工程から与えられる符
号または固定符号出力工程から与えられる固定符号のい
ずれかを蓄積工程で蓄積するように制御することを特徴
とする請求項13に記載の符号化方法。
14. The code amount control step is for obtaining a maximum code amount that can be generated by encoding a unit image for each unit image, and for each macro block constituting the unit image based on the maximum code amount. 14. The encoding method according to claim 13, wherein one of a code given from the encoding step and a fixed code given from the fixed code output step is controlled to be accumulated in the accumulation step.
【請求項15】 符号量制御工程は、最大符号量Tma
xを以下の式に基づいて求めることを特徴とする請求項
14に記載の符号化方法。 Tmax≦Bs−B ただし、Tmaxは最大符号量、Bsは蓄積工程におい
て許容される容量およびBは前記蓄積工程における占有
量である。
15. The code amount control step includes: a maximum code amount Tma.
15. The encoding method according to claim 14, wherein x is obtained based on the following equation. Tmax ≦ Bs−B where Tmax is the maximum code amount, Bs is the capacity allowed in the accumulation step, and B is the occupation amount in the accumulation step.
【請求項16】 符号量制御工程は、最大符号量Tma
xを以下の式に基づいて求めることを特徴とする請求項
14に記載の符号化方法。 Tmax≦vbv_bits+Rp ここに、Rp=R/F ただし、Tmaxは最大符号量、Rpは単位画像におけ
る蓄積工程における読み出しのビット数、Rは前記蓄積
工程における読み出しのビットレート、Fは符号化する
単位画像のレート、vbv_bitsは直前の単位画像
におけるVBVバッファの占有量である。
16. The code amount control step includes the step of:
15. The encoding method according to claim 14, wherein x is obtained based on the following equation. Tmax ≦ vbv_bits + Rp where Rp = R / F, where Tmax is the maximum code amount, Rp is the number of bits read in the storage step in the unit image, R is the bit rate of the read in the storage step, and F is the unit image to be coded. , Vbv_bits is the occupation amount of the VBV buffer in the immediately preceding unit image.
【請求項17】 符号量制御工程は、以下の式、あるい
はそれと同等の結果となる値に基づいて最大符号量Tm
axを求めることを特徴とする請求項14に記載の符号
化方法。 Tmax≦min(vbv_bits+Rp,Bs−
B) ここに、Rp=R/F ただし、Tmaxは最大符号量、Rpは単位画像におけ
る蓄積工程における読み出しのビット数、Rは蓄積工程
における読み出しのビットレート、Fは符号化する単位
画像のレート、vbv_bitsは直前の単位画像にお
けるVBVバッファの占有量、Bsは前記蓄積工程にお
いて許容される容量およびBは前記蓄積工程における占
有量である。
17. The code amount control step includes calculating a maximum code amount Tm based on the following expression or a value equivalent to the following expression.
The encoding method according to claim 14, wherein ax is obtained. Tmax ≦ min (vbv_bits + Rp, Bs−
B) where Rp = R / F, where Tmax is the maximum code amount, Rp is the number of bits read in the storage process in the unit image, R is the bit rate of read in the storage process, and F is the rate of the unit image to be coded. , Vbv_bits are the occupancy of the VBV buffer in the immediately preceding unit image, Bs is the capacity allowed in the accumulation step, and B is the occupancy in the accumulation step.
【請求項18】 蓄積工程における読み出しのビットレ
ートRが可変であることを特徴とする請求項16または
17に記載の符号化方法。
18. The encoding method according to claim 16, wherein the read bit rate R in the accumulation step is variable.
【請求項19】 符号量制御工程は、現在のマクロブロ
ックに対して符号化工程から与えられる符号の符号量m
b_bit、単位画像を構成する現在のマクロブロック
の一つ前のマクロブロックまでの符号量Sc、前記単位
画像の最大符号量Tmax、前記単位画像を構成する現
在のマクロブロックに続いて符号化されるべきマクロブ
ロック数M、前記単位画像に対して固定符号出力工程が
出力する符号の符号長L、前記単位画像を構成するビデ
オパケット単位で発生する付加的な符号の符号量αの間
の関係が、 Sc+mb_bit+M×L+α>Tmax (ただし、α≧0)である場合に、現在のマクロブロッ
クに対して、固定符号出力工程から与えられる前記固定
符号を蓄積工程で蓄積するよう制御することを特徴とす
る請求項14に記載の符号化方法。
19. The code amount controlling step includes the step of controlling the code amount m of the code given from the encoding step for the current macroblock.
b_bit, the code amount Sc up to the macroblock immediately before the current macroblock forming the unit image, the maximum code amount Tmax of the unit image, and the current macroblock forming the unit image is coded following the current macroblock. The relationship between the number of macroblocks M to be expended, the code length L of the code output by the fixed code output step for the unit image, and the code amount α of the additional code generated in video packet units constituting the unit image is as follows. , Sc + mb_bit + M × L + α> Tmax (where α ≧ 0), control is performed such that the fixed code given from the fixed code output step is accumulated in the accumulation step for the current macroblock. The encoding method according to claim 14.
【請求項20】 符号量制御工程は、現在のマクロブロ
ックに対して符号化工程から与えられる符号の符号量m
b_bit、単位画像を構成する前記現在のマクロブロ
ックの一つ前のマクロブロックまでの符号量Sc、前記
単位画像の最大符号量Tmax、前記単位画像を構成す
る前記現在のマクロブロックに続いて符号化されるべき
マクロブロック数M、前記単位画像に対して固定符号出
力工程から与えられる固定符号の符号長L、前記単位画
像を構成するビデオパケット単位で発生する付加的な符
号の符号量αの間の関係が、 Sc+mb_bit+M×L+α>Tmax (ただし、α≧0)である場合に、前記現在のマクロブ
ロックに対して、前記固定符号出力工程から与えられる
前記固定符号を蓄積工程で蓄積するよう制御するととも
に、前記単位画像を構成する前記現在のマクロブロック
に続いて符号化されるべきM個のマクロブロックに対し
ても、前記固定符号出力工程から与えられる前記固定符
号を前記蓄積工程で蓄積するよう制御することを特徴と
する請求項14に記載の符号化方法。
20. The code amount control step includes a code amount m of a code given from the encoding step for the current macroblock.
b_bit, the code amount Sc up to the macroblock immediately before the current macroblock constituting the unit image, the maximum code amount Tmax of the unit image, encoding following the current macroblock constituting the unit image Between the number M of macroblocks to be performed, the code length L of a fixed code given from the fixed code output step for the unit image, and the code amount α of an additional code generated in video packet units constituting the unit image When the relationship of Sc + mb_bit + M × L + α> Tmax (where α ≧ 0) is satisfied, the current macroblock is controlled so that the fixed code given from the fixed code output step is accumulated in the accumulation step. And M macroblocks to be encoded following the current macroblock constituting the unit image 15. The encoding method according to claim 14, further comprising controlling the fixed code provided from the fixed code output step to be stored in the storage step.
【請求項21】 符号量制御工程は、前記 Sc+mb_bit+M×L+α>Tmax なる関係がなりたち、かつ、単位画像の符号化タイプが
イントラである場合に、現在のマクロブロックから新し
いビデオパケットを構成することを特徴とする請求項2
0に記載の符号化方法。
21. A code amount control step, when the relation of Sc + mb_bit + M × L + α> Tmax is satisfied and the coding type of the unit image is intra, configures a new video packet from the current macroblock. 3. The method according to claim 2, wherein
0. The encoding method according to 0.
【請求項22】 固定符号出力工程は、単位画像の符号
化タイプにおいてその符号量が最小となるマクロブロッ
クに対応する符号を出力することを特徴とする請求項1
4に記載の符号化方法。
22. The fixed code output step, wherein a code corresponding to a macroblock having the minimum code amount in a coding type of a unit image is output.
5. The encoding method according to 4.
【請求項23】 マクロブロック単位の外部入力信号を
符号化して、当該外部入力信号に対応する符号を出力す
る符号化工程と、 単位画像の符号化タイプ毎に予め定めた固定符号を与え
る固定符号出力工程と、 前記符号化工程から与えられる前記符号または前記固定
符号出力工程から与えられる前記固定符号を蓄積する蓄
積工程と、 前記単位画像を構成する先頭のマクロブロックが入力さ
れてからの経過時間に基づいて前記符号または前記固定
符号のいずれかを前記蓄積工程で蓄積するように制御す
る符号量制御工程とを含むことを特徴とする符号化方
法。
23. An encoding step of encoding an external input signal in units of macroblocks and outputting a code corresponding to the external input signal, and a fixed code for providing a predetermined fixed code for each coding type of the unit image. An output step; an accumulating step of accumulating the code given from the encoding step or the fixed code given from the fixed code output step; and an elapsed time since a leading macroblock constituting the unit image is input. A code amount control step of controlling either the code or the fixed code to be stored in the storage step based on the following.
【請求項24】 マクロブロック単位の外部入力信号を
符号化して、当該外部入力信号に対応する符号を出力す
る符号化工程と、 単位画像の符号化タイプ毎に予め定めた固定符号を出力
する固定符号出力工程と、 前記符号化工程から与えられる前記符号または前記固定
符号出力工程から与えられる前記固定符号を蓄積する蓄
積工程と、 前記符号化工程によって符号化された前記符号の符号量
および前記単位画像を構成する先頭のマクロブロックが
入力されてからの経過時間に基づいて前記符号または前
記固定符号のいずれかを前記蓄積工程で蓄積するように
制御する符号量制御工程とを含むことを特徴とする符号
化方法。
24. An encoding step of encoding an external input signal in units of macroblocks and outputting a code corresponding to the external input signal, and outputting a fixed code predetermined for each encoding type of the unit image. A code output step; an accumulation step of accumulating the code given from the encoding step or the fixed code given from the fixed code output step; a code amount of the code encoded by the encoding step and the unit And a code amount control step of controlling to store either the code or the fixed code in the storage step based on the elapsed time since the leading macroblock constituting the image is input. Encoding method to be used.
JP2001076059A 2000-04-27 2001-03-16 Encoding apparatus and encoding method Expired - Fee Related JP3669281B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001076059A JP3669281B2 (en) 2000-04-27 2001-03-16 Encoding apparatus and encoding method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2000-127291 2000-04-27
JP2000127291 2000-04-27
JP2001076059A JP3669281B2 (en) 2000-04-27 2001-03-16 Encoding apparatus and encoding method

Publications (3)

Publication Number Publication Date
JP2002016929A true JP2002016929A (en) 2002-01-18
JP2002016929A5 JP2002016929A5 (en) 2005-04-14
JP3669281B2 JP3669281B2 (en) 2005-07-06

Family

ID=26590945

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001076059A Expired - Fee Related JP3669281B2 (en) 2000-04-27 2001-03-16 Encoding apparatus and encoding method

Country Status (1)

Country Link
JP (1) JP3669281B2 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009514448A (en) * 2005-10-27 2009-04-02 クゥアルコム・インコーポレイテッド Video source rate control for videophones
JP2011139547A (en) * 2003-09-07 2011-07-14 Microsoft Corp Bitplane coding and decoding for ac prediction status information
US8102878B2 (en) 2005-09-29 2012-01-24 Qualcomm Incorporated Video packet shaping for video telephony
US8406309B2 (en) 2005-10-21 2013-03-26 Qualcomm Incorporated Video rate adaptation to reverse link conditions
US8428374B2 (en) 2001-12-17 2013-04-23 Microsoft Corporation Skip macroblock coding
US8514711B2 (en) 2005-10-21 2013-08-20 Qualcomm Incorporated Reverse link lower layer assisted video error control
US8537197B2 (en) 2007-01-10 2013-09-17 Qualcomm Incorporated Content- and link-dependent coding adaptation for multimedia telephony
US8797850B2 (en) 2008-01-10 2014-08-05 Qualcomm Incorporated System and method to adapt to network congestion
US8842555B2 (en) 2005-10-21 2014-09-23 Qualcomm Incorporated Methods and systems for adaptive encoding of real-time information in packet-switched wireless communication systems
US8963747B2 (en) 2012-12-11 2015-02-24 Kabushiki Kaisha Toshiba Decoding apparatus, encoding apparatus, decoding method, and encoding method
CN110832781A (en) * 2017-06-28 2020-02-21 Ati科技无限责任公司 GPU parallel Huffman decoding

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8781240B2 (en) 2001-12-17 2014-07-15 Microsoft Corporation Skip macroblock coding
US10368065B2 (en) 2001-12-17 2019-07-30 Microsoft Technology Licensing, Llc Skip macroblock coding
US9774852B2 (en) 2001-12-17 2017-09-26 Microsoft Technology Licensing, Llc Skip macroblock coding
US8428374B2 (en) 2001-12-17 2013-04-23 Microsoft Corporation Skip macroblock coding
US9538189B2 (en) 2001-12-17 2017-01-03 Microsoft Technology Licensing, Llc Skip macroblock coding
US9088785B2 (en) 2001-12-17 2015-07-21 Microsoft Technology Licensing, Llc Skip macroblock coding
JP2011139547A (en) * 2003-09-07 2011-07-14 Microsoft Corp Bitplane coding and decoding for ac prediction status information
US8102878B2 (en) 2005-09-29 2012-01-24 Qualcomm Incorporated Video packet shaping for video telephony
US8406309B2 (en) 2005-10-21 2013-03-26 Qualcomm Incorporated Video rate adaptation to reverse link conditions
US8514711B2 (en) 2005-10-21 2013-08-20 Qualcomm Incorporated Reverse link lower layer assisted video error control
US8842555B2 (en) 2005-10-21 2014-09-23 Qualcomm Incorporated Methods and systems for adaptive encoding of real-time information in packet-switched wireless communication systems
US8548048B2 (en) 2005-10-27 2013-10-01 Qualcomm Incorporated Video source rate control for video telephony
JP2009514448A (en) * 2005-10-27 2009-04-02 クゥアルコム・インコーポレイテッド Video source rate control for videophones
US8537197B2 (en) 2007-01-10 2013-09-17 Qualcomm Incorporated Content- and link-dependent coding adaptation for multimedia telephony
US8797850B2 (en) 2008-01-10 2014-08-05 Qualcomm Incorporated System and method to adapt to network congestion
US8963747B2 (en) 2012-12-11 2015-02-24 Kabushiki Kaisha Toshiba Decoding apparatus, encoding apparatus, decoding method, and encoding method
CN110832781B (en) * 2017-06-28 2023-09-22 Ati科技无限责任公司 GPU parallel Huffman decoding
CN110832781A (en) * 2017-06-28 2020-02-21 Ati科技无限责任公司 GPU parallel Huffman decoding

Also Published As

Publication number Publication date
JP3669281B2 (en) 2005-07-06

Similar Documents

Publication Publication Date Title
EP1150514B1 (en) Encoding system and encoding method
JP3662171B2 (en) Encoding apparatus and encoding method
US7321622B2 (en) Method and apparatus for transforming moving picture coding system
KR100495716B1 (en) Apparatus and method for encoding images and medium in which image encoding program has been recorded
US7298913B2 (en) Video encoding method and apparatus employing motion compensated prediction interframe encoding, and corresponding video decoding method and apparatus
US20160057443A1 (en) Video encoding device, video decoding device, video encoding method, video decoding method, and program
JPH09121358A (en) Picture coding/decoding device and its method
JPWO2005076629A1 (en) Image coding apparatus and imaging apparatus
JPH10290463A (en) Method for predictively encoding and decoding moving image, recording medium recording predictive moving image encoding or decoding program and recording medium recording predictive moving image encoding data
JP2002016929A (en) Encoder and encoding method
US8964836B2 (en) Method and apparatus for spatial predictive encoding and/or decoding of video data
JP3852366B2 (en) Encoding apparatus and method, decoding apparatus and method, and program
JPH06225279A (en) Coding/decoding methods and coding/decoding devices
JP3599942B2 (en) Moving picture coding method and moving picture coding apparatus
JP2000312363A (en) Conversion method for moving image encoding system and device therefor
US6931069B2 (en) Coding device and coding method
WO2005004487A1 (en) Image encoding device and image encoding method
JP2000312362A (en) Image encoding system conversion device and its method and recording medium
JP2006262159A (en) Moving picture encoding device, control method thereof, computer program and storage medium
US6922490B2 (en) Image compression of selected regions based on transmission bit rate, motion, and/or region information, and bit selection before compression based on transmission bit rate
JP2002199408A (en) Moving image coding method and moving image coder
JP3669277B2 (en) Encoding apparatus and encoding method
JPH1023432A (en) Picture compression-encoding device
JPH0993537A (en) Digital video signal recording and reproducing device and digital video signal coding method
JP6874844B2 (en) Moving image coding device, moving image coding method, and moving image coding program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040602

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040602

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20040602

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20040622

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20040707

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040727

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040927

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050322

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050404

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

Free format text: PAYMENT UNTIL: 20080422

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090422

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100422

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100422

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110422

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120422

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120422

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130422

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130422

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20140422

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees