JP3669281B2 - Encoding apparatus and encoding method - Google Patents

Encoding apparatus and encoding method Download PDF

Info

Publication number
JP3669281B2
JP3669281B2 JP2001076059A JP2001076059A JP3669281B2 JP 3669281 B2 JP3669281 B2 JP 3669281B2 JP 2001076059 A JP2001076059 A JP 2001076059A JP 2001076059 A JP2001076059 A JP 2001076059A JP 3669281 B2 JP3669281 B2 JP 3669281B2
Authority
JP
Japan
Prior art keywords
code
output
encoding
macroblock
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.)
Expired - Fee Related
Application number
JP2001076059A
Other languages
Japanese (ja)
Other versions
JP2002016929A5 (en
JP2002016929A (en
Inventor
喜子 幡野
貴史 中尾
淳子 貴島
守 稲村
和宏 杉山
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

Images

Description

【0001】
【発明の属する技術分野】
この発明は、リアルタイムで映像信号を符号化する、例えば携帯電話やTV電話システム等に関わる符号化装置および符号化方法に関するものである。
【0002】
【従来の技術】
図15は、例えば「MPEG−4のすべて」(工業調査会)p.39〜p.40に示された従来の符号化装置のブロック図であり、図16は、この従来の符号化装置の入力信号を示した説明図、図17はビットストリームの構成を示した説明図、図18はビデオパケットの画面(表示された状態)上の位置(配置)を示した説明図である。
【0003】
図15において、1は外部から入力される外部入力信号(図中の例では、輝度信号、色差信号)を第一の入力とする減算器であり、減算器1の出力はDCT(離散コサイン変換。Discrete Cosine Transform)手段2、量子化器3を通して、直流(DC)成分、交流(AC)成分の量子化値を予測するためのDC/AC予測器4と逆量子化器6に入力される。DC/AC予測器4の出力は可変長符号化手段5の第一の入力に与えられ、可変長符号化手段5はビットストリームを出力する。
【0004】
一方、量子化器3の出力が入力される逆量子化器6の出力は、逆DCT手段7を通して、加算器8の第一の入力に与えられる。加算器8の出力はメモリ9に与えられ、メモリ9の出力は予測画像作成手段10の第一の入力と動き検出手段11の第一の入力に与えられる。
【0005】
動き検出手段11の第二の入力には外部入力信号が与えられ、動き検出手段11の出力は予測画像作成手段10の第二の入力と動きベクトル予測器12に与えられる。
【0006】
動きベクトル予測器12の出力は可変長符号化手段5の第二の入力に与えられる。また、予測画像作成手段10の出力は減算器1の第二の入力と加算器8の第二の入力に与えられる。
【0007】
次に動作について説明する。まず、映像信号は図16に示すように基本処理単位であるマクロブロックに分割され、外部入力信号として入力される(ここにおける外部入力信号は基本的にマクロブロックとして入力されるのであり、直接にマクロブロックが入力されても、前段にマクロブロック生成のための手段が備えられてマクロブロックへの変換がなされるように構成されていてもよい)。
【0008】
入力される映像信号が4:2:0の場合、輝度信号(Y)の16画素×16ラインが、2つの色差信号(Cb、Cr)の8画素×8ラインと画面上で同じ大きさとなる。従って、8画素×8ラインのブロックが6つ(輝度信号に対するブロックが4、色差信号に対するブロックが2の合わせて6のブロック)で、1つのマクロブロックが構成される。
【0009】
なお、ここでは、外部入力として入力されるVideo Object Plane(VOP。単位画像。)は矩形形状で、フレームと同一であることを前提とする。
【0010】
各ブロックは離散コサイン変換(DCT)を施してから量子化手段3において量子化する。量子化されたDCT係数はDC/AC予測器4においてDC、AC各成分の係数の予測を行った後、量子化パラメータなどの付加情報とともに可変長符号化する。
【0011】
これがイントラ符号化(フレーム内符号化と称する場合もある)である。すべてのマクロブロックに対してイントラ符号化を適用するVOPをI−VOP(Intra−VOP)と呼ぶ。
【0012】
一方、量子化されたDCT係数は、逆量子化手段6において逆量子化、逆DCT手段7において逆DCTを行って復号され、復号画像はメモリ9に記憶される。このメモリ9に記憶された復号画像はインター符号化(フレーム間符号化と称する場合もある)を行うときに使用される。
【0013】
インター符号化の場合は、動き検出手段11において、外部入力信号として入力されたマクロブロックの動きを示す動きベクトルを検出する。この動きベクトルとは、メモリ9に記憶された復号画像の中で、入力されたマクロブロックとの誤差が最も小さくなるような位置を示すものである。
【0014】
予測画像作成手段10は動き検出手段11において検出された動きベクトルに基づいて、予測画像を作成する。
【0015】
続いて、入力されたマクロブロックと予測画像作成手段10において作成された予測画像との差分信号を求め、その差分信号に対してDCT手段2においてDCTを施し、量子化手段3において量子化を行う。
【0016】
量子化されたDCT係数は、予測符号化された動きベクトルおよび量子化パラメータなどの付加情報とともに可変長符号化される。また、量子化されたDCT係数は、逆量子化手段6において逆量子化、逆DCT手段7において逆DCTを行った後、加算器8によって予測画像と加算されて、メモリ9に記憶される。
【0017】
インター符号化には、画像の表示順で時間的に前にあるVOPだけから予測する片方向予測と、時間的に前のVOPと後ろのVOPの両方から予測する両方向予測とがある。片方向予測で符号化するVOPをP−VOP(Predictive VOP)と呼び、両方向予測で符号化されたVOPをB−VOP(Bidirectionally Predictive VOP)と呼ぶ。
【0018】
次に、図17を参照しながら可変長符号化手段5から出力されるビットストリームの構成について説明する。1VOPのビットストリームは図17(a)のように、一つ以上のビデオパケットから構成される。
【0019】
ここで、1つのビデオパケットは1つ以上のマクロブロックの符号化データから成り立っており、VOPの最初のビデオパケットについては、先頭にVOPヘッダが付され、最後にはバイトアラインのためのスタッフビットが付される(図17(b))。
【0020】
2つ目以降のビデオパケットの場合は、先頭にビデオパケットの先頭を検出するためのResync Markerとビデオパケットヘッダが付され、最後にはスタッフビットが付される(図17(c))。
【0021】
ここにおけるスタッフビットとは、ビデオパケットの最後につけるバイトアラインの調整のために、1〜8ビット単位でビデオパケットの終端(切れ目)まで付加されるものであり、以下に述べるスタッフィングとその意味が区別される。
【0022】
また、図17(d)のようにビデオパケットの中に任意の数のスタッフィングを入れることもできる。例えば、MPEG4 Videoの場合、このスタッフィングはスタッフィング・マクロブロックと呼ばれ、マクロブロックと同じ扱いで任意のビデオパケットにいれることができる。このスタッフィングは復号装置側において、廃棄される(実質利用されない)。
【0023】
ここにおけるスタッフィングとは、符号量を増加させるための9ビットや10ビットというようなワードとして用いられるものであり、バイトアラインメント(例えば、ビデオパケットの終端を調整すること)とは無関係に用いられ、マクロブロックの間に挿入されて用いられるものであり、上述のスタッフビットとその意味が区別される。
【0024】
1つのビデオパケットに入れることのできるマクロブロックの数は任意であるが、エラー伝播を考慮した場合、一般に各ビデオパケットの符号量がほぼ一定になるように構成するのがよいとされている。このようにビデオパケットの符号量がほぼ一定とされる場合、各ビデオパケットの1VOP内において占める面積は図18のように一定でなくなる。
【0025】
次に、図19を参照しながら、DC/AC予測器4の動作の詳細を説明する(ここでは、マクロブロックのY成分について説明する)。
上述したように、DC/AC予測器4は、イントラ符号化の場合に量子化器3から出力される量子化されたDCT係数のDC成分、AC成分の係数の予測を行う。インター符号化の場合は、DC成分、AC成分の予測を行わず、量子化器3から出力される量子化されたDCT係数をそのまま可変長符号化手段5へ出力する。なお、この場合、輝度信号Yと色差信号Cとについて別々にDC/AC予測を行う。
【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)と左隣のブロックの量子化されたDCT係数のDC成分Fa(0,0)と上隣のブロックの量子化されたDCT係数のDC成分Fc(0,0)とから、予測方向を決定する。
【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)から予測を行う。
【0028】
上隣のブロックからDC成分の予測を行う場合は、
Px(0,0)=Fx(0,0)−fc(0,0)/Qdx
とし、左隣のブロックからDC成分の予測を行う場合は、
Px(0,0)=Fx(0,0)−fa(0,0)/Qdx
として、予測後のDC成分Px(0,0)を求める。ただし、Qdxは現在のブロックのDC成分の量子化ステップ幅であり、上記の割り算は、例えば、四捨五入で計算する。
【0029】
続いて、上記のDC成分の予測方向を用いて、AC成分の予測を行う。すなわち、左隣のブロックの量子化パラメータをQpa、上隣のブロックの量子化パラメータをQpc、現在のブロックの量子化パラメータをQpxとすると、上隣のブロックからDC成分の予測を行った場合は、AC成分の予測を、
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)を求める。ただし、上記の割り算は、例えば、四捨五入で計算するものとする。
【0031】
1マクロブロックを構成する6つのブロックに対して、上記のAC成分の予測を独立に行った後、AC成分の予測を行うかどうかを、以下に述べるようにマクロブロック単位で決定する(いずれのブロックとの関係で予測を行ったかによりマクロブロック毎に決定する)。
【0032】
ここで、元の映像信号のまま(AC成分の予測を行わない)が良いのか、予測を施した方が良いのかの判断を行うことを示す指標として、ブロックのAC予測判断指標SBを以下のように求める。例えば、1マクロブロックを構成する6つのブロックの各ブロックに対して、そのブロック(AC予測判断指標SBを求める対象となるブロック)が上隣のブロックから予測を行った場合は、
【0033】
【数1】

Figure 0003669281
【0034】
によりAC予測判断指標SBを求め、そのブロックが左隣のブロックから予測を行った場合は、
【0035】
【数2】
Figure 0003669281
【0036】
によりAC予測判断指標SBを求め、1マクロブロックを構成する6つのブロックのAC予測判断指標SBの和SBS(各ブロックについて求められたAC予測判断指標の和)が、
SBS≧0
の場合にはAC成分の予測を行い、そうでなければ、AC成分の予測を行わない。
【0037】
なお、AC成分の予測を行う場合はac_pred_flag=1、AC成分の予測を行わない場合はac_pred_flag=0として、このac_pred_flagをマクロブロック毎に付加情報として付加した後、各マクロブロックを可変長符号化手段5によって符号化する。
【0038】
ac_pred_flag=1のマクロブロックに属するブロックについては、そのブロックが上隣のブロックから予測した場合は、
【0039】
【数3】
Figure 0003669281
【0040】
により、Ox(i,j)を求め、そのブロックが左隣のブロックから予測した場合は、
【0041】
【数4】
Figure 0003669281
【0042】
により、Ox(i,j)を求める。
また、ac_pred_flag=0のマクロブロックに属するブロックについては、
【0043】
【数5】
Figure 0003669281
【0044】
により、Ox(i,j)を求め、このOx(i,j)をDC/AC予測器4の出力として、可変長符号化手段5へ出力する。
【0045】
なお、上記予測において、現在のブロックが単位画像の左端(単位画像が1画面である場合には、この1画面の左端)のブロックである場合、現在のブロックの左隣のブロックおよび左上のブロックが存在しないので、上記予測で用いる逆量子化後のDC成分fa(0,0)およびfb(0,0)の値を予め定めた定数βとする。また、この場合、上記予測で用いるAC成分Fa(i,j)、Fb(i,j)((i,j)≠(0,0))を0とする。
【0046】
ここで予め定めた定数βは、例えば、DCT手段2から出力されるDCT係数のうち、DC成分の値の範囲の中間値とする。すなわち、DCT手段2から出力されるDC成分が11bitで0から2047の値を取り得る場合、β=1024とする。
【0047】
同様に、上記予測において、現在のブロックが単位画像の上端(単位画像が1画面である場合には、この1画面の上端)のブロックである場合、現在のブロックの上隣のブロックおよび左上のブロックが存在しないので、上記予測で用いる逆量子化後のDC成分fc(0,0)およびfb(0,0)の値を上記の定数βとし、AC成分Fc(i,j)、Fb(i,j)((i,j)≠(0,0))を0とする。
【0048】
さらに、上記予測において、現在のブロックの左隣のブロックが、現在のブロックとは異なるビデオパケットに属する場合、上記予測で用いる逆量子化後のDC成分fa(0,0)を上記の定数βとし、AC成分Fa(i,j)((i,j)≠(0,0))を0とする。
【0049】
同様に、上記予測において、現在のブロックの上隣のブロックが、現在のブロックとは異なるビデオパケットに属する場合、上記予測で用いる逆量子化後のDC成分fc(0,0)を上記の定数βとし、AC成分Fc(i,j)((i,j)≠(0,0))を0とする。
【0050】
また、上記予測において、現在のブロックの左上のブロックが、現在のブロックとは異なるビデオパケットに属する場合、上記予測で用いる逆量子化後のDC成分fb(0,0)を上記の定数βとし、AC成分Fb(i,j)((i,j)≠(0,0))を0とする。
【0051】
このように、DC/AC予測器4においては、異なるビデオパケットに属するブロック間ではDC成分、AC成分の係数を参照しないようにすることで、送信したビットストリームにエラーが混入した場合にも、DC/AC予測によるエラーの伝播がビデオパケット内で収まるように構成されている。
【0052】
【発明が解決しようとする課題】
上記のような従来の符号化装置においては、送信バッファのオーバーフローや、受信側の仮想バッファであるVBVバッファのアンダーフローを回避するための処理が十分に考慮されている訳ではなかった。
【0053】
また、通常は、量子化器3で用いる量子化パラメータを調節して符号量を増減するが、量子化パラメータを最大(最も粗い量子化を行うようにして発生する符号量を抑える)にしても、送信バッファのオーバーフローが起こるような場合についての処理が考慮されていなかった。
【0054】
また、入力されるVOPのレートがF(1/sec)である場合、1VOPを構成する全てのマクロブロックを1/F(sec)か、それよりも短い時間で符号化することが要求される。
【0055】
しかしながら、例えば、動き検出手段11がVOP内のオブジェクトの動きに応じて適応的に動きベクトルの探索範囲を変えるよう構成されている場合、動き検出手段11が各マクロブロックの動きベクトルを検出するのに要する時間は、マクロブロック毎に変化し、そのため、1VOPの処理時間は一定でなくなる。このような場合における、1VOPを構成する全てのマクロブロックを所定の時間内に符号化するための制御が、従来は考慮されていなかった。
【0056】
この発明は、上述のような課題を解消するためになされたもので、送信バッファのオーバーフローおよびVBVバッファのアンダーフローを効果的に回避できる符号化装置および符号化方法を提案するものである。
【0057】
また、この発明は、1マクロブロックの符号化に要する時間が一定でない場合にも、所定の時間内で1VOP分の符号化を終了できる符号化装置および符号化方法を提示するものである。
【0058】
【課題を解決するための手段】
この発明に係る符号化装置は、単位画像毎に入力される外部入力信号を複数のマクロブロックに分割し、マクロブロック単位で外部入力信号を符号化し、符号化により生成された一以上のマクロブロックの符号から構成されるビデオパケットを出力する符号化装置であって、マクロブロック単位で外部入力信号をインター符号化、又はイントラ符号化し、インター符号化、又はイントラ符号化により生成される符号を出力する符号化手段と、単位画像における符号化がインター符号化の場合、又はイントラ符号化の場合、それぞれの符号化タイプの場合に対応する固定符号を出力する固定符号出力手段と、符号化手段から出力される符号、又は固定符号手段から出力される固定符号を蓄積する蓄積手段と、符号化手段から出力される符号、又は固定符号化出力手段から出力される固定符号のいずれか一方を選択して前記蓄積手段に蓄積させる符号の符号量を制御する符号量制御手段とを備え、符号量制御手段は、現マクロブロックの符号の符号量mb_bit、単位画像の先頭のマクロブロックから現マクロブロックの一つ前のマクロブロックまでの符号の符号量Sc、蓄積手段がオーバーフローしないように、又はVBVバッファがアンダーフローしないように設定される最大符号量Tmax、単位画像において現マクロブロックに続いて処理されるべきマクロブロック数M、符号化タイプにより決まる、各マクロブロックに対して固定符号出力手段が出力する固定符号の符号長L、単位画像において現マクロブロック以降で発生する前記ビデオパケット単位の付加的な符号の総符号量αの間の関係が、
Sc+mb_bit+M×L+α>Tmax
(ただし、α≧0)
である場合に、固定符号出力手段が出力する固定符号を選択するよう制御することを特徴とする。
【0082】
【発明の実施の形態】
以下、この発明をその実施の形態を示す図面に基づいて具体的に説明する。
実施の形態1.
図1はこの発明の実施の形態1である符号化装置を示すものである。同図において、1は外部入力信号を第一の入力とする減算器であり、減算器1の出力はDCT手段2、量子化器3を通して、DC/AC予測器4と逆量子化器6に入力される。DC/AC予測器4の出力は可変長符号化手段5aの第一の入力に与えられる。
【0083】
一方、逆量子化器6の出力は、逆DCT手段7を通して、加算器8の第一の入力に与えられる。加算器8の出力はメモリ9の第一の入力に与えられ、メモリ9の出力は予測画像作成手段10の第一の入力と動き検出手段11の第一の入力に与えられる。
【0084】
動き検出手段11の第二の入力には外部入力信号が与えられ、動き検出手段11の出力は予測画像作成手段10の第二の入力と動きベクトル予測器12に与えられる。予測画像作成手段10の出力は減算器1の第二の入力と加算器8の第二の入力に与えられる。
【0085】
また、動きベクトル予測器12の出力は可変長符号化手段5aの第二の入力に与えられる。なお、符号化手段は、上述の外部入力信号が入力される減算器1から、この外部入力信号に対応する可変長符号が出力される可変長符号化手段5aまでを含んで構成される(もちろん、ここに示された構成は一例にしか過ぎず、外部入力信号に対応する符号化を行うことができる既知の構成を用いることができる。)。
【0086】
可変長符号化手段5aの第一の出力は一時バッファ101の第一の入力に与えられ、可変長符号化手段5aの第二の出力は符号量制御手段102の入力に与えられる。
【0087】
一時バッファ101の第二の入力には固定符号出力手段104の出力が与えられ、一時バッファ101の第三の入力には符号量制御手段102の第一の出力が与えられる。一時バッファ101の出力は送信バッファ103の第一の入力に与えられる(ここでは、一時バッファ101または送信バッファ103が蓄積手段に相当する)。
【0088】
符号量制御手段102の第二の出力はメモリ9の第二の入力に与えられる。送信バッファ103の出力はビットストリームとして出力(送信)される。
【0089】
この出力(送信)されたビットストリームは、復号装置側において受信され復号処理が施される。
【0090】
次に動作について説明する。
まず、映像信号は図16に示したように基本処理単位であるマクロブロックに分割され、減算器1および動き検出手段11に入力マクロブロックとして入力される。例えば、入力される映像信号が4:2:0の場合、輝度信号(Y)の16画素×16ラインが、2つの色差信号(Cb、Cr)の8画素×8ラインと画面上で同じ大きさとなるので、8画素×8ラインのブロックが6つで、1つのマクロブロックが構成される。
【0091】
イントラ符号化を行う場合、各ブロックはDCTを施してから量子化する。量子化されたDCT係数はDC/AC予測器4において係数の予測を行った後、量子化パラメータなどの付加情報とともに可変長符号化手段5aにより可変長符号化する。量子化されたDCT係数は、逆量子化器6によって逆量子化され、逆DCT手段7によって逆DCTを行って復号され、この逆DCT手段7の出力である復号画像はメモリ9に記憶される。
【0092】
インター符号化の場合は、動き検出手段11において、入力されたマクロブロックの動きを示す動きベクトルを検出する。動きベクトルは、メモリ9に記憶された復号画像の中で、入力マクロブロックとの誤差が最も小さくなるような位置を示すものである。
【0093】
予測画像作成手段10は、動き検出手段11によって検出された動きベクトルに基づいて予測画像を作成する。次に、入力マクロブロックとこの予測画像の差分を求め、その差分信号に対してDCT手段2によりDCTを施し、量子化器3により量子化を行う。
【0094】
量子化器3の出力である量子化されたDCT係数は、DC/AC予測器4において予測された係数、動きベクトル予測器12により予測符号化された動きベクトルおよび量子化パラメータなどの付加情報とともに可変長符号化手段5aにより可変長符号化される。また、量子化されたDCT係数は、逆量子化器6によって逆量子化、逆DCT手段7によって逆DCTを行った後、予測画像作成手段10より出力される予測画像と加算されて、メモリ9に記憶される。
【0095】
次に可変長符号化手段5aの動作を詳しく説明する。
可変長符号化手段5aは、マクロブロック毎に、量子化されたDCT係数と付加情報を符号化して(符号化工程)一時バッファ101に書き込み、その符号量を符号量制御手段102に出力する。
【0096】
例えば、MPEG4のI−VOPの場合、まず、DC/AC予測器4から出力される各ブロックのDCT係数のAC成分をジグザグスキャン等の方法で1次元スキャンし、0の個数と非零の係数の組み合わせを符号化するランレングス符号化を行う。このランレングス符号化された各ブロックのAC成分データは一時バッファ101に書き込まれる。
【0097】
図2(a)に示すように、各ブロックの係数データの後には、イントラ/インター等を示すマクロブロックタイプ(MTYPE)と色差の各ブロックに非零のAC係数があったかどうかを示すcbpcをまとめて符号化したmcbpc、量子化パラメータを示すdquant、各ブロックのDCT係数のDC成分、AC予測を行ったかどうかを示すac_pred_flag、Yの各ブロックに非零のAC係数があったかどうかを示すcbpyが順に符号化されて一時バッファ101に書き込まれる。
【0098】
なお、マクロブロック毎にこれらの符号量の合計が符号量制御手段102に出力される。
【0099】
同様に、MPEG4のP−VOPの場合は図3(a)のような順で符号化したデータが一時バッファ101に書き込まれる。
【0100】
符号量制御手段102は、可変長符号化手段5aから出力される各マクロブロックの符号量に基づいて、各ビデオパケットの長さが予め定められた値以下になるようにマクロブロックをまとめ、一時バッファ101から送信バッファへと転送する。
【0101】
例えば、MPEG4の場合、図2(b)、図3(b)に示したように、ビデオパケットの先頭にはヘッダを付加し、規定されたビットストリームの順に並べ替えて転送する。
【0102】
また、符号量制御手段102は、送信バッファ103がオーバーフローを起こさないように、あるいは、VBV(Video Buffering Verifier)バッファ(受信側におけるビットストリーム受信に要する仮想的なバッファ(必要とされる容量は、例えば、送信ビットストリーム中のヘッダに記述される)。通常、最低I−VOP分の容量が設定される。)がアンダーフローを起こさないように、VOP毎に最大符号量Tmaxを設定し、当該VOPの符号量がTmaxより多くならないように、可変長符号化手段5aの出力または固定符号出力手段104の出力のうち、一時バッファ101に書きこむ固定符号を選択する。
【0103】
なお、ここにおける最大符号量Tmaxとは、送信バッファ103がオーバーフローを起こさず、VBVバッファがアンダーフローしないための符号量の上限値といえる。
【0104】
以下、動作の詳細について述べる。
符号量制御手段102は、各VOPの符号化を始める前に、当該VOPの最大符号量Tmaxを求める。例えば、送信バッファ103の容量がBs(bits)、送信バッファ103の現在の残量(すなわち、送信バッファやVBVバッファ等の記憶手段に蓄積され、当該送信バッファやVBVバッファ等の記憶手段より読み出されていない(送信バッファやVBVバッファ等の記憶手段に残留している(保存されている))データの量(残容量)であり、このようなデータの量のことを一般的にはバッファ占有量、あるいは占有量(occupancy)と表現する。以下、単に占有量と称す。)がB(bits)とすると、送信バッファ103がオーバーフローを起こさないためには、当該VOPの符号量をBs−B以下とすれば十分である。従って、最大符号量Tmaxを
Tmax≦Bs−B
と設定すればよい。
【0105】
また、VBVバッファの管理をする場合、送信バッファ103の読み出しビットレートがR(bits/sec)、符号化するVOPのレートがF(1/sec)とすると、1VOP期間に送信バッファ103から読み出されるビット数Rpは、
Rp=R/F
となり、1VOP期間にVBVバッファが受信するビット数もRpとなる。
【0106】
そこで、現在のVOPの1つ前のVOPのデコード時間におけるVBVバッファの占有量をvbv_bits(bits)とすると、VBVバッファがアンダーフローしないためには、当該VOPの符号量をvbv_bits+Rp以下とすればよい。すなわち、最大符号量Tmaxを
Tmax≦vbv_bits+Rp
と設定すればよい。
【0107】
従って、符号量制御手段102は、各VOPの符号化を始める前に、当該VOPの最大符号量Tmaxを
Tmax=min(vbv_bits+Rp,Bs−B)
と設定する。(min(a,b)は、aまたはbのいずれか小さい方をその値とすることを示す)。
【0108】
なお、VBVバッファの占有量vbv_bitsは、受信側における占有量を推定するものであるが、受信側でアンダーフローが起きた場合はデコード時間を遅らせるなどの対処を行う場合は、VBVバッファのアンダーフローを管理する必要がない。このようにVBVバッファのアンダフローを管理する必要がない場合は、
Tmax=Bs−B
と設定すればよい。
【0109】
送信バッファ103の占有量Bは時間的に変化するため、最大符号量Tmaxの値も時間的に変化するものとなるが、この最大符号量TmaxはVOP毎に計算されるものである。
【0110】
次に、符号量制御手段102は、マクロブロック毎に現在のVOPの符号量を求め、図4および図5に示すフローチャートに従って、当該マクロブロックに対して、可変長符号化手段5aから出力される符号または固定符号出力手段104から出力される固定符号のうち、一時バッファ101に蓄積する符号または固定符号のいずれかを選択して(選択して蓄積するように制御する。符号量制御工程。)、一時バッファ101に符号または固定符号のいずれかを蓄積する(蓄積工程。一時バッファ101から送信バッファ103への送信を含めて蓄積工程としてもよい)。
【0111】
なお、図4は現在のVOPがP−VOP(符号化タイプがインター)の場合のフローチャートを示しており、図5は現在のVOPがI−VOP(符号化タイプがイントラ)の場合のフローチャートを示している。
【0112】
(P−VOPの場合の符号量制御について)
まず、P−VOPの場合の符号量制御102の動作を説明する。
P−VOPの場合、可変長符号化手段5aは図3(a)に示したように各ブロックの係数データ、not_coded、mcbpc、動きベクトル、cbpy、dquantを各マクロブロックに対して出力するが、これらの符号は必ずしも全てが存在するわけではなく、例えば、各ブロックの係数データが全て0であり、かつ、動きベクトルが(0,0)である場合は、not_coded=1の1bitのみが存在する。これが、P−VOPのマクロブロックで最小符号量となる符号である。
【0113】
そこで、P−VOPの場合、固定符号出力手段104は、固定符号としてnot_coded=1の1bitのみを出力する(固定符号出力工程。なお、後述するようにI−VOPに対しても固定符号を出力する場合も固定符号出力工程と称する)。つまり、固定符号出力手段104は、現在のVOPの符号化タイプに対して、最小符号量となるマクロブロックの固定符号を出力する。
【0114】
例えば、各ブロックの係数データが全て0であり、かつ、動きベクトルが(0,0)である場合は、not_coded=1の1bitのみが存在するので、P−VOPの場合、固定符号出力手段104が出力する固定符号の符号長LはL=1となる。
【0115】
符号量制御手段102は、マクロブロック毎に現在のVOPの符号量を求め、残りのマクロブロックすべてに対して固定符号出力手段104から出力される固定符号を選択したとしても、VOPを構成するすべてのマクロブロックの符号量が当該VOPの最大符号量Tmaxを越える場合に、現在のマクロブロックの符号を固定符号出力手段104から出力される固定符号に置き換える。
【0116】
すなわち、VOPを構成するマクロブロックの総数をAとし、現在のマクロブロックのマクロブロック番号をK(ただし、0≦K≦A−1)とすると、これに続く符号化されるべきマクロブロック数M(残りのマクロブロック数M)は
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である。
【0118】
そこで、
Sc+mb_bit+M×L+α>Tmax
となる場合は、現在のマクロブロック(マクロブロック番号K)に対して、固定符号出力手段104が出力する固定符号を一時バッファ101に書きこみ、そうでない場合は可変長符号化手段5aが出力する符号を一時バッファ101に書きこむよう制御する(図4)。
【0119】
なお、付加符号量αの値としては、例えば、P−VOPにおけるResyncMarker、ビデオパケットヘッダ、スタッフビット、motion_markerの符号量の合計が最大でCp(bit)、予め定められたビデオパケットの長さがVPlen(bit)とすると、現在のマクロブロック(マクロブロック番号K)以降のマクロブロックで発生する符号量は、少なくとも
(M+1)×L
であり、
(M+1)×L/VPlen+1
個のビデオパケットが発生し得るので、付加符号量αは、
α=((M+1)×L/VPlen+1)×Cp
とすればよい。
【0120】
また、VOPを構成するマクロブロックの総数Aを用いれば、
M+1≦A
であることから、演算を簡略化するために、付加符号量αは、
α=(A×L/VPlen+1)×Cp
として、P−VOPに固定の値としてもよい。
【0121】
なお、P−VOPについて、固定符号出力手段104から出力される固定符号を一時バッファ101に記憶した場合は、強制的にnot_coded(符号化されていない)扱いとするためにメモリ9に記憶された現在のマクロブロックの復号画像を、メモリ9に記憶された一つ前のVOPの同一位置のマクロブロックの復号画像に置き換えておく。
【0122】
すなわち、メモリ9内で、一つ前のVOPのマクロブロック番号Kのマクロブロックの復号画像を、現在のVOPのマクロブロック番号Kのマクロブロックの復号画像エリアにコピーする。P−VOPの場合は、固定符号出力手段104が出力する固定符号がnot_coded=1であるので、このように一つ前のVOPの復号画像をコピーすることにより、固定符号出力手段104から出力される固定符号に応じた復号画像が得られる。
【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も存在しない。
【0124】
そこで、I−VOPの場合、固定符号出力手段104は、各ブロックのDC成分およびAC成分がすべて0で、かつ、dquant=0、ac_pred_flag=0であるようなマクロブロックに対する符号を、固定符号として出力する。なお、MPEG2、MPEG4など既存のほとんどの符号化方式においては、このような符号が、I−VOPのマクロブロックの最小符号量となる。
【0125】
P−VOPの場合と同様に、符号量制御手段102は、マクロブロック毎に現在のVOPの符号量を求め、残りのマクロブロックすべてに対して固定符号出力手段104から出力される固定符号を選択したとしても、VOPを構成するすべてのマクロブロックの符号量が当該VOPの最大符号量Tmaxを越える場合に、現在のマクロブロックの符号を、固定符号出力手段104から出力される固定符号に置き換える。
【0126】
ここでは、VOPを構成するビデオパケットをくずさない(ビデオパケットを構成するマクロブロックがすべて含まれる)ことが求められるので、残りのマクロブロックに対応する符号化されたデータを生成する必要があるが、VOPを構成するすべてのマクロブロックの符号量が最大符号量Tmaxを越える場合には、上述のように固定符号への置き換えを行うことになるため、この固定符号分の裕度を見込んでおく必要がある。
【0127】
すなわち、現在のマクロブロック(マクロブロック番号K)に対して可変長符号化手段5aが出力する符号の符号量をmb_bit、固定符号出力手段104が出力する固定符号の符号長をL、現在のVOPを構成するマクロブロック番号0のマクロブロックからマクロブロック番号K−1のマクロブロックまでの符号量をScとすると、図5に示すように、
Sc+mb_bit+M×L+α>Tmax
(M=A−K−1)
となる場合は、現在のマクロブロック(マクロブロック番号K)に対して、固定符号出力手段104が出力する固定符号を一時バッファ101に書きこみ、そうでない場合は可変長符号化手段5aが出力する符号を一時バッファ101に書きこむよう制御する。
【0128】
ここでαは、マクロブロック番号K以降のマクロブロックで発生し得るResync Marker、ビデオパケットヘッダ、スタッフビット、dc_marker等のビデオパケット単位で発生する符号の符号量(付加符号量)であり、α≧0である。
【0129】
なお、付加符号量αの値としては、例えば、I−VOPにおけるResyncMarker、ビデオパケットヘッダ、スタッフビット、dc_markerの符号量の合計が最大でCi(bit)、予め定められたビデオパケットの長さがVPlen(bit)とすると、現在のマクロブロック(マクロブロック番号K)以降のマクロブロックで発生する符号量は、少なくとも
(M+1)×L
であり、
(M+1)×L/VPlen+1
個のビデオパケットが発生し得るので、
α=((M+1)×L/VPlen+1)×Ci
とすればよい。
【0130】
また、VOPを構成するマクロブロックの総数Aを用いれば、
M+1≦A
であることから、演算を簡略化するために、
α=(A×L/VPlen+1)×Ci
として、I−VOPに固定の値としてもよい。
【0131】
なお、I−VOPの場合、現在のマクロブロック(マクロブロック番号K)に対して固定符号出力手段104から出力される固定符号を一時バッファ101に記憶した場合で、かつ、一つ前のマクロブロック(マクロブロック番号K−1)に対しては固定符号出力手段104の出力(固定符号)を選択しなかった場合(可変長符号化手段5aの出力を選択した場合)は、図5に示すように、現在のマクロブロックから新しいビデオパケットを構成する。
【0132】
I−VOPの場合、ac_pred_flag=0であってもDC予測を行うので、一時バッファ101に記憶されたDC成分が0の場合、これはDC/AC予測器4の出力する予測後のDC成分Ox(0,0)が0であることを示すものであり、量子化器3が出力するDC成分Fx(0,0)が0であることを示すものではない。
【0133】
このため、固定符号出力手段104が各ブロックのDC成分およびAC成分がすべて0でかつ、dquant=0、ac_pred_flag=0であるようなマクロブロックに対する固定符号を出力する場合、この固定符号を復号して得られる画像は一般には一定ではない(すなわち、固定符号自体は固定のものであっても画像表現に関わる値は固定の値ではなく任意の値をとり得る)。
【0134】
しかしながら、DC/AC予測器4においては、異なるビデオパケットに属するブロック間ではDC成分の係数の参照を行わず、DC成分の値の範囲の中間値である定数βを参照値とするので、上述のように、固定符号出力手段104から出力される固定符号を一時バッファ101に記憶するよう選択した場合、当該マクロブロックから新しいビデオパケットを構成するように制御すれば、前記固定符号出力手段104から出力される固定符号が表す各ブロックの逆量子化後のDC成分fx(0,0)は
fx(0,0)=β
となる。
【0135】
従って、I−VOPの場合、固定符号出力手段104から出力される固定符号を復号すると、マクロブロックの全ての画素が定数γであるような画像(画面全体が同じ色等の、いわゆる、ベタ画像)が得られる。ここで定数γは、入力されるマクロブロックの画素値の範囲の中間値である。例えば、入力されるマクロブロックが8ビットで0から255の値を取り得る場合、γ=128である。
【0136】
なお、固定符号出力手段104から出力される固定符号を一時バッファ101に記憶するよう選択した場合、上述のように、当該マクロブロック(マクロブロック番号K)の各ブロックの逆量子化後のDC成分は定数βに等しくなるので、当該マクロブロックの次のマクロブロック(マクロブロック番号K+1)で固定符号出力手段104の出力(固定符号)を選択する場合は、新しいビデオパケットを構成しなくても、逆量子化後のDC成分が定数βとなり、復号画像は画素値がすべて定数γの画像(ベタ画像)となる。
【0137】
従って、図5に示すように、固定符号出力手段104から出力される固定符号を一時バッファ101に記憶した場合で、かつ、一つ前のマクロブロックに対しては固定符号出力手段104の出力(固定符号)を選択しなかった場合に、現在のマクロブロックから新しいビデオパケットを構成するよう制御すればよい。
【0138】
なお、固定符号出力手段104から出力される固定符号を一時バッファ101に記憶した場合は、メモリ9に記憶された現在のマクロブロックの復号画像を、画素値がすべて定数γの画像に置き換えておく。すなわち、メモリ9の現在のVOPの現在のマクロブロックの復号画像エリアに定数γを書きこむ。
【0139】
このように図4および図5のフローチャートに基づいて、可変長符号化手段5aから出力される符号または固定符号出力手段104から出力される固定符号のうち、一時バッファ101に記憶する符号を選択することにより、各VOPの符号量が最大符号量Tmaxを超えないように制御することができる。
【0140】
また、図5のフローチャートに基づいて、現在のマクロブロックから新しいビデオパケットを構成するか否かを決定することにより、I−VOPの場合も、固定符号出力手段104から出力される固定符号に対応する復号画像を、新たな演算を行うことなく、メモリ9に書きこむので、少ない演算量で単位画像の符号量が必ず最大符号量Tmax以下となるように制御できる。
【0141】
実施の形態2.
上記実施の形態1においては、符号量制御手段102が図4および図5のフローチャートに基づいて可変長符号化手段5aまたは固定符号出力手段104の出力(固定符号)を選択するよう制御するとしたが、符号量制御手段102は、図6および図7に示すフローチャートに基づいて、可変長符号化手段5aまたは固定符号出力手段104の出力(固定符号)を選択するよう構成してもよい。
【0142】
なお、図6は現在のVOPがP−VOP(符号化タイプがインター)の場合のフローチャートを示しており、図7は現在のVOPがI−VOP(符号化タイプがイントラ)の場合のフローチャートを示している。
【0143】
(P−VOPの場合の符号量制御について)
まず、P−VOPの場合を図6に従って説明する。
符号量制御手段102は、実施の形態1の場合と同様に、現在のマクロブロック(マクロブロック番号K)に対して可変長符号化手段5aが出力する符号の符号量をmb_bit、固定符号出力手段104が出力する固定符号の符号長をL、現在のVOPを構成するマクロブロック番号0のマクロブロックからマクロブロック番号K−1のマクロブロックまでの符号量をSc、現在のVOPを構成するマクロブロックK+1以降のマクロブロックの数をMとすると、
Sc+mb_bit+M×L+α>Tmax (1)
となる場合、現在のマクロブロック(マクロブロック番号K)に対して、固定符号出力手段104が出力する固定符号を一時バッファ101に書きこむよう制御する。
【0144】
ここでαは、マクロブロック番号K以降のマクロブロックで発生し得るResync Marker、ビデオパケットヘッダ、スタッフビット、motion_marker等のビデオパケット単位で発生する符号の符号量(付加符号量)であり、α≧0である。実施の形態1で説明したように、αはマクロブロック毎に演算しても、VOPの符号化タイプ毎に固定値としてもよい。
【0145】
ところで、現在のマクロブロックに対して上記(1)式が成り立つ場合、符号量としては累積されていくものであるから、次のマクロブロックに対しても(1)式が成り立つ可能性が非常に高い。
【0146】
例えば、マクロブロック番号Kに対して(1)式が成り立つとすると、マクロブロック番号0からマクロブロック番号Kまでのマクロブロックの符号量Sc’は、マクロブロック番号K−1のマクロブロックまでの符号量Scに固定符号出力手段104が出力する固定符号の符号長Lを加算した、
Sc’=Sc+L
となる。ここで、マクロブロック番号Kのマクロブロックに対して可変長符号化手段5aが出力する符号の符号量mb_bitと、マクロブロック番号K+1のマクロブロックに対して可変長符号化手段5aが出力する符号の符号量mb_bit’が等しく、かつ、上記αの値が両マクロブロックに対して同じであれば、
Sc’+mb_bit’+(M−1)×L+α
=Sc+mb_bit+M×L+α
>Tmax
となり、マクロブロック番号K+1に対しても(1)式が成り立つ。
【0147】
そこで、マクロブロック番号Kに対して(1)式が成立した場合は、マクロブロック番号K以降のマクロブロックに対しても(1)式が成立するものとして、演算を省略することができる。
【0148】
すなわち、図6に示すように、まず現在のマクロブロック(マクロブロック番号K)の一つ前のマクロブロック(マクロブロック番号K−1)に対して、固定符号出力手段104の出力(固定符号)を選択したかどうかを判断し、一つ前のマクロブロックで固定符号出力手段104の出力(固定符号)を選択した場合は、現在のマクロブロックに対しても固定符号出力手段104の出力(固定符号)を一時バッファ101に記憶する。
【0149】
一方、一つ前のマクロブロックで固定符号出力手段104の出力(固定符号)を選択しなかった場合は、上記(1)式を判断し、(1)式が成り立つ場合は固定符号出力手段104の出力(固定符号)を、成り立たない場合は可変長符号化手段5aの出力を一時バッファ101に記憶する。
【0150】
(I−VOPの場合の符号量制御について)
I−VOPの場合も同様で、図7に示すように、まず現在のマクロブロック(マクロブロック番号K)の一つ前のマクロブロック(マクロブロック番号K−1)に対して、固定符号出力手段104の出力(固定符号)を選択したかどうかを判断し、一つ前のマクロブロックで固定符号出力手段104の出力(固定符号)を選択した場合は、現在のマクロブロックに対しても固定符号出力手段104の出力(固定符号)を一時バッファ101に記憶する。この場合、実施の形態1で説明したように、現在のマクロブロックから新しいビデオパケットを構成する必要はない。
【0151】
一方、一つ前のマクロブロックで固定符号出力手段104の出力(固定符号)を選択しなかった場合は、上記(1)式を判断し、(1)式が成り立つ場合は固定符号出力手段104の出力(固定符号)を、成り立たない場合は可変長符号化手段5aの出力を一時バッファ101に記憶する。また、上記(1)式が成り立つ場合は、現在のマクロブロックから新しいビデオパケットを構成する。
【0152】
なお、実施の形態2においては、1VOPの中のあるマクロブロックに対して(1)式が成立すると、そのVOPを構成する当該マクロブロック以降のすべてのマクロブロックに対して、固定符号出力手段104の出力(固定符号)を一時バッファ101に書きこむよう制御するので、当該マクロブロックに続いて符号化されるマクロブロックにおいては、減算器1、DCT手段2、量子化器3、DC/AC予測器4、可変長符号化手段5a、逆量子化器6、逆DCT手段7、加算器8、予測画像作成手段10、動き検出手段11および動きベクトル予測手段12からなる符号化手段は動作する必要がない。
【0153】
従って、1VOPの中のあるマクロブロックに対して(1)式が成立する場合は、そのVOPを構成する当該マクロブロックに続いて符号化されるマクロブロックにおいては、減算器1、DCT手段2、量子化器3、DC/AC予測器4、可変長符号化手段5a、逆量子化器6、逆DCT手段7、加算器8、予測画像作成手段10、動き検出手段11および動きベクトル予測手段12は動作を止める(符号化されたマクロブロックより後のマクロブロックからVOPの最後迄演算を停止する)ことにより、演算量の減少、消費電力の削減を図ることができる。
【0154】
実施の形態3.
実施の形態3においては、符号量制御手段102は、図8に示すフローチャートに基づいて、可変長符号化手段5aまたは固定符号出力手段104の出力(固定符号)を選択するよう制御する。なお、図8はP−VOP(符号化タイプがインター)の場合のフローチャートを示している。
【0155】
(P−VOPの場合の符号量制御について)
例えば、動き検出手段11がVOP内のオブジェクトの動きに応じて適応的に動きベクトルの探索範囲を変えるよう構成されている場合、動き検出手段11が各マクロブロックの動きベクトルを検出するのに要する時間は、マクロブロック毎に変化し、そのため、1VOPの処理時間は一定でなくなる。
【0156】
このような場合に、1VOPを構成する全てのマクロブロックを所定の時間内に符号化するために、処理時間が少なくなった場合は、減算器1、DCT手段2、量子化器3、DC/AC予測器4、可変長符号化手段5a、逆量子化器6、逆DCT手段7、加算器8、予測画像作成手段10、動き検出手段11および動きベクトル予測手段12の演算を行わず、固定符号出力手段104の出力(固定符号)を一時バッファ101に記憶する。
【0157】
従って、符号量制御手段102は、図8に示すように、現在のVOPを構成する先頭のマクロブロック(マクロブロック番号0)が入力されてからの経過時間を計測し、この経過時間があらかじめ定められた処理時間Tpを越えた場合は、常に固定符号出力手段104の出力(固定符号)を一時バッファ101に記憶するよう制御し、そうでない場合は前記(1)式に基づいて、固定符号出力手段104の出力(固定符号)と可変長符号化手段5aの出力を選択して一時バッファ101に記憶する。
【0158】
なお、この場合のあらかじめ定められた処理時間Tpは、最大1VOP期間に設定される(1VOP分の処理は1VOP期間に処理しなければならないため)が、この1VOP期間に他の処理を含めるような場合には、(1VOP期間−他の処理に要する期間)が処理時間Tpに与えられる最大値となる。
【0159】
(I−VOPの場合の符号制御について)
なお、現在のVOPがI−VOPである場合は、実施の形態1または実施の形態2と同様に、図5または図7のフローチャートに従って、符号量制御手段102は一時バッファ101に記憶する符号を選択する。
【0160】
実施の形態4.
実施の形態4においては、符号量制御手段102は、図9に示すフローチャートに基づいて、可変長符号化手段5aまたは固定符号出力手段104の出力(固定符号)を選択するよう制御する。なお、図9はP−VOP(符号化タイプがインター)の場合のフローチャートを示している。
【0161】
(P−VOPの場合の符号量制御について)
すなわち、符号量制御手段102は、実施の形態2で説明したように、まず現在のマクロブロック(マクロブロック番号K)の一つ前のマクロブロック(マクロブロック番号K−1)に対して、固定符号出力手段104の出力(固定符号)を選択したかどうかを判断し、一つ前のマクロブロックで固定符号出力手段104の出力(固定符号)を選択した場合は、現在のマクロブロックに対しても固定符号出力手段104の出力(固定符号)を一時バッファ101に記憶する。
【0162】
次に、実施の形態3で説明したように、現在のVOPを構成する先頭のマクロブロック(マクロブロック番号0)が入力されてからの経過時間を計測し、この経過時間があらかじめ定められた処理時間Tpを越えた場合は、固定符号出力手段104の出力(固定符号)を一時バッファ101に記憶するよう制御し、そうでない場合は前記(1)式に基づいて、固定符号出力手段104の出力(固定符号)と可変長符号化手段5aの出力を選択して一時バッファ101に記憶する。
【0163】
(I−VOPの場合の符号量制御について)
なお、現在のVOPがI−VOPである場合は、実施の形態1または実施の形態2と同様に、図5または図7のフローチャートに従って、符号量制御手段102は一時バッファ101に記憶する符号を選択する。
【0164】
実施の形態5.
実施の形態1においては、固定符号出力手段104が独立して存在するようなブロック図を示したが、例えば、ソフトウェアによってそれぞれの手段を構成する場合には、固定符号出力手段104および可変長符号化手段5aのそれぞれの動作を行わせるためのROMテーブルを共有するように構成することもできる。
【0165】
すなわち、実施の形態1で説明したように、固定符号出力手段104が出力する固定符号は、I−VOP、P−VOPそれぞれのマクロブロックの符号のうちの1パターンとなっているので、固定符号出力手段104および可変長符号化手段5aを一体のものとすることにより、ROMテーブルを共有化することができる。
【0166】
図10はこの発明の実施の形態5である符号化装置を示すものである。同図において、1は外部入力信号を第一の入力とする減算器であり、減算器1の出力はDCT手段2、量子化器3を通して、DC/AC予測器4と逆量子化器6に入力される。DC/AC予測器4の出力は可変長符号化手段5bの第一の入力に与えられる。
【0167】
一方、逆量子化器6の出力は、逆DCT手段7を通して、加算器8の第一の入力に与えられる。加算器8の出力はメモリ9の第一の入力に与えられ、メモリ9の出力は予測画像作成手段10の第一の入力と動き検出手段11の第一の入力に与えられる。
【0168】
動き検出手段11の第二の入力には外部入力信号が与えられ、動き検出手段11の出力は予測画像作成手段10の第二の入力と動きベクトル予測器12に与えられる。予測画像作成手段10の出力は減算器1の第二の入力と加算器8の第二の入力に与えられる。
【0169】
また、動きベクトル予測器12の出力は可変長符号化手段5bの第二の入力に与えられる。
【0170】
可変長符号化手段5bの第一の出力は一時バッファ101の第一の入力に与えられ、可変長符号化手段5bの第二の出力は符号量制御手段102の入力に与えられる。
【0171】
一時バッファ101の第二の入力には符号量制御手段102の第一の出力が与えられる。一時バッファ101の出力は送信バッファ103の第一の入力に与えられる。
【0172】
符号量制御手段102の第二の出力はメモリ9の第二の入力と可変長符号化手段5bの第三の入力に与えられる。送信バッファ103の出力はビットストリームとして出力(送信)される。
【0173】
この出力(送信)されたビットストリームは、復号装置側において受信され復号処理が施される。
【0174】
次に動作について説明する。
実施の形態5は、可変長符号化手段5bおよび一時バッファ101の動作が実施の形態1と異なる。他の部分については実施の形態1と同様であるので説明を省略する。
【0175】
可変長符号化手段5bは、まず、実施の形態1と同様に各マクロブロックのデータを符号化して、図11(a)のように一時バッファ101に符号を書きこむ。ここで、現在のマクロブロック(マクロブロック番号K)に対して書きこんだ符号の先頭アドレスAkを記憶しておく。また、このとき発生した符号の符号量mb_bitを符号量制御手段102に出力する。
【0176】
次に、符号量制御手段102は、前記(1)式を判断し、(1)式が成り立つ場合は一時バッファ101の書きこみアドレスをAkに戻し、固定符号を選択することを示す信号をメモリ9と可変長符号化手段5bに出力する。
【0177】
可変長符号化手段5bは、固定符号を選択することを示す信号を受け取ると、予めVOPの符号化タイプ毎に定められた固定符号を一時バッファ101に出力する。このとき、一時バッファ101の書きこみアドレスはAkに戻されているので、マクロブロック番号Kの符号を固定符号で上書きすることになる。従って、図11(b)に示す一時バッファのデータ構成のように、マクロブロック番号K−1の符号の次に、固定符号が書き込まれる。
【0178】
また、メモリ9は、固定符号を選択することを示すフラグを受け取ると、実施の形態1で説明したように、I−VOPの場合はマクロブロック番号Kの復号画像エリアに定数γを書きこみ、P−VOPの場合はマクロブロック番号Kの復号画像エリアに、当該VOPの一つ前のVOPのマクロブロック番号Kのマクロブロックの復号画像をコピーする。
【0179】
以上のように構成することにより、実施の形態5では、可変長符号化手段5bに、各マクロブロックを符号化する手段とVOPの符号化タイプ毎に用意した固定符号を出力する手段の両者の機能を持たせ、回路の縮小化を図ることができる。
【0180】
実施の形態6.
図12はこの発明の実施の形態6である符号化装置を示すものである。同図において、1は外部入力信号を第一の入力とする減算器であり、減算器1の出力はDCT手段2、量子化器3を通して、可変長符号化手段5cの第一の入力と逆量子化器6に与えられる。
【0181】
逆量子化器6の出力は、逆DCT手段7を通して、加算器8の第一の入力に与えられる。加算器8の出力はメモリ9の第一の入力に与えられ、メモリ9の出力は予測画像作成手段10の第一の入力と動き検出手段11の第一の入力に与えられる。
【0182】
動き検出手段11の第二の入力には外部入力信号が与えられ、動き検出手段11の出力は予測画像作成手段10の第二の入力と動きベクトル予測器12に与えられる。予測画像作成手段10の出力は減算器1の第二の入力と加算器8の第二の入力に与えられる。
【0183】
また、動きベクトル予測器12の出力は可変長符号化手段5cの第二の入力に与えられる。なお、符号化手段は、上述の外部入力信号が入力される減算器1から、この外部入力信号に対応する可変長符号が出力される可変長符号化手段5cまでを含んで構成される(もちろん、ここに示された構成は一例にしか過ぎず、外部入力信号に対応する符号化を行うことができる既知の構成を用いることができる)。
【0184】
可変長符号化手段5cの第一の出力は一時バッファ101の第一の入力に与えられ、可変長符号化手段5cの第二の出力は符号量制御手段102の入力に与えられる。
【0185】
一時バッファ101の第二の入力には固定符号出力手段104の出力(固定符号)が与えられ、一時バッファ101の第三の入力には符号量制御手段102の第一の出力が与えられる。一時バッファ101の出力は送信バッファ103の第一の入力に与えられる。
【0186】
符号量制御手段102の第二の出力はメモリ9の第二の入力に与えられる。送信バッファ103の出力はビットストリームとして出力(送信)される。
【0187】
この出力(送信)されたビットストリームは、復号装置側において受信され復号処理が施される。
【0188】
次に動作について説明する。
実施の形態6は、符号化タイプがイントラの場合もDC/AC予測を行わない点が実施の形態1と異なる。すなわち、可変長符号化手段5cは量子化器3から出力されるDCT係数を用いて符号化を行う。例えば、H.263に準拠した符号化装置の場合、I−VOPの場合はDC成分を常に8ビットで符号化する。
【0189】
そこで、固定符号出力手段104は、I−VOPに対して各ブロックのDC成分が128、AC成分がすべて0、dquant=0であるようなマクロブロックの固定符号を出力する。
【0190】
この場合、DC予測がないので、固定符号出力手段104の出力(固定符号)を選択した場合も、現在のマクロブロックから新しいビデオパケットを構成する必要はない。そこで、符号量制御手段102は、I−VOPの場合も、図4、図6、図8、あるいは、図9のフローチャートに従って、固定符号出力手段104の出力(固定符号)または可変長符号化手段5cの出力を選択して、一時バッファ101に記憶する。
【0191】
なお、P−VOPの場合は、実施の形態1ないし実施の形態4と同様に、図4、図6、図8、あるいは、図9のフローチャートに従って、固定符号出力手段104の出力(固定符号)または可変長符号化手段5cの出力を選択して、一時バッファ101に記憶する。
【0192】
実施の形態7.
上記実施の形態6においては、可変長符号化手段5cの出力または固定符号出力手段104の出力(固定符号)を一時バッファ101に記憶し、一時バッファ101から送信バッファ103に転送する構成としたが、例えば、データ構造がデータパーティションとなっていない場合やデータの再配列を行う必要がない場合には、可変長符号化手段5cの出力または固定符号出力手段104の出力(固定符号)を直接、送信バッファ103に入力する構成としてもよく、一時バッファ101を省略することができる(この場合、蓄積手段は送信バッファ103に相当する)。
【0193】
例えば、H.263に準拠した符号化装置の場合(データパーティションを行わない場合)、送信バッファ103から出力するビットストリームの構成は図13のようになっている。従って、MPEG4のデータパーティションの場合(図2(b)、図3(b))のように、各マクロブロックの符号を例えば、各マクロブロックに関して▲1▼mcbpc、dquantおよびDC成分、▲2▼ac_pred_flagおよびcbpy、▲3▼各ブロックの係数データのような、▲1▼〜▲3▼のカテゴリーに分割し、複数のマクロブロックの符号をカテゴリー毎にまとめて構成するようなことを行わないので、マクロブロック毎に発生した符号を並び替える必要がない。
【0194】
すなわち、可変長符号化手段5cが図13に示したようなフォーマットに従って、マクロブロックの符号を出力すれば、並び替えのための一時バッファ101は不要となる。
【0195】
図14はこのような実施の形態7である符号化装置を示すものである。同図において、1は外部入力信号を第一の入力とする減算器であり、減算器1の出力はDCT手段2、量子化器3を通して、可変長符号化手段5cの第一の入力と逆量子化器6に与えられる。
【0196】
逆量子化器6の出力は、逆DCT手段7を通して、加算器8の第一の入力に与えられる。加算器8の出力はメモリ9の第一の入力に与えられ、メモリ9の出力は予測画像作成手段10の第一の入力と動き検出手段11の第一の入力に与えられる。
【0197】
動き検出手段11の第二の入力には外部入力信号が与えられ、動き検出手段11の出力は予測画像作成手段10の第二の入力と動きベクトル予測器12に与えられる。予測画像作成手段10の出力は減算器1の第二の入力と加算器8の第二の入力に与えられる。
【0198】
また、動きベクトル予測器12の出力は可変長符号化手段5cの第二の入力に与えられる。
【0199】
可変長符号化手段5cの第一の出力は送信バッファ103の第一の入力に与えられ、可変長符号化手段5cの第二の出力は符号量制御手段102の入力に与えられる。
【0200】
送信バッファ103の第二の入力には固定符号出力手段104の出力(固定符号)が与えられ、送信バッファ103の第三の入力には符号量制御手段102の第一の出力が与えられる。また、符号量制御手段102の第二の出力はメモリ9の第二の入力に与えられる。
【0201】
送信バッファ103の出力はビットストリームとして出力(送信)される。
この出力(送信)されたビットストリームは、復号装置側において受信され復号処理が施される。
【0202】
次に動作について説明する。
実施の形態7は、可変長符号化手段5cおよび固定符号出力手段104が送信バッファ103に固定符号を出力する点が実施の形態6と異なる。すなわち、符号量制御手段102は、実施の形態6と同様に、可変長符号化手段5cから出力される符号の符号量に基づいて、可変長符号化手段5cの出力または固定符号出力手段104の出力(固定符号)のうち、どちらを選択するかをマクロブロック毎に判断し、選択した方が送信バッファ103に蓄積されるよう制御を行う。
【0203】
なお、上記実施の形態1ないし7においては、VOP毎の最大符号量Tmaxの設定において、送信バッファ103の読み出しレートがRであるとしたが、読み出しレートが固定レートでなく、レートが可変である場合であっても、同様にして、送信バッファ103のオーバーフローあるいはVBVバッファのアンダーフローが起こらないようにTmaxを設定することが可能である。
【0204】
上述の送信バッファ103の読み出しレートが可変である場合とは、例えば、送信する最大のレートが決められており、その最大のレートの中で送信するべき情報の種類(例えば、映像と音声のような種類)によって送信レートが割り振られているような場合に相当する。
【0205】
この場合も、図4ないし図9のフローチャートに基づいて、各マクロブロックを符号化する符号化手段の出力と、VOPの符号化タイプ毎に定められた固定符号とを選択して蓄積することにより、各VOPの符号量が最大符号量Tmax以下になるように制御することができる。
【0206】
また、上記実施の形態1ないし7においては、MPEG4のデータパーティションの場合およびH.263の場合を例にとって説明したが、データパーティションでない場合や、MPEG2の場合などにおいても、上述と同様の構成で、符号量制御を行うことができる。
【0207】
さらに、入力信号が4:2:0でない場合や、VOP(単位画像)が矩形でない場合(例えば、画面中におけるオブジェクトが取り得る任意の形状)にも適用できることは言うまでもない。
【0208】
【発明の効果】
この発明は、以上説明したように構成されているので、以下に示すような効果を奏する。
【0209】
【発明の効果】
この発明に係る符号化装置は、単位画像毎に入力される外部入力信号を複数のマクロブロックに分割し、マクロブロック単位で外部入力信号を符号化し、符号化により生成された一以上のマクロブロックの符号から構成されるビデオパケットを出力する符号化装置であって、マクロブロック単位で外部入力信号をインター符号化、又はイントラ符号化し、インター符号化、又はイントラ符号化により生成される符号を出力する符号化手段と、単位画像における符号化がインター符号化の場合、又はイントラ符号化の場合、それぞれの符号化タイプの場合に対応する固定符号を出力する固定符号出力手段と、符号化手段から出力される符号、又は固定符号手段から出力される固定符号を蓄積する蓄積手段と、符号化手段から出力される符号、又は固定符号化出力手段から出力される固定符号のいずれか一方を選択して前記蓄積手段に蓄積させる符号の符号量を制御する符号量制御手段とを備え、符号量制御手段は、現マクロブロックの符号の符号量mb_bit、単位画像の先頭のマクロブロックから現マクロブロックの一つ前のマクロブロックまでの符号の符号量Sc、蓄積手段がオーバーフローしないように、又はVBVバッファがアンダーフローしないように設定される最大符号量Tmax、単位画像において現マクロブロックに続いて処理されるべきマクロブロック数M、符号化タイプにより決まる、各マクロブロックに対して固定符号出力手段が出力する固定符号の符号長L、単位画像において現マクロブロック以降で発生する前記ビデオパケット単位の付加的な符号の総符号量αの間の関係が、
Sc+mb_bit+M×L+α>Tmax
(ただし、α≧0)
である場合に、固定符号出力手段が出力する固定符号を選択するよう制御することとしたので、単位画像の符号量が最大符号量Tmax以下となるように制御できる。
【図面の簡単な説明】
【図1】 この発明の実施の形態1を示すブロック図である。
【図2】 この発明の実施の形態1における一時バッファと送信バッファの状態(I−VOPの場合)を示す説明図である。
【図3】 この発明の実施の形態1における一時バッファと送信バッファの状態(P−VOPの場合)を示す説明図である。
【図4】 この発明の実施の形態1を示すフローチャート(P−VOPの場合)である。
【図5】 この発明の実施の形態1を示すフローチャート(I−VOPの場合)である。
【図6】 この発明の実施の形態2を示すフローチャート(P−VOPの場合)である。
【図7】 この発明の実施の形態2を示すフローチャート(I−VOPの場合)である。
【図8】 この発明の実施の形態3を示すフローチャートである。
【図9】 この発明の実施の形態4を示すフローチャートである。
【図10】 この発明の実施の形態5を示すブロック図である。
【図11】 この発明の実施の形態5における一時バッファの状態を示す説明図である。
【図12】 この発明の実施の形態6を示すブロック図である。
【図13】 この発明の実施の形態7における送信バッファの状態を示す説明図である。
【図14】 この発明の実施の形態7を示すブロック図である。
【図15】 従来の符号化装置を示すブロック図である。
【図16】 従来の符号化装置への入力信号を示す説明図である。
【図17】 従来の符号化装置におけるビットストリームの構成を示す説明図である。
【図18】 従来の符号化装置におけるビデオパケットの画面上の位置を示す説明図である。
【図19】 従来の符号化装置におけるDC/AC予測を示す説明図である。
【符号の説明】
5a、5b、5c 可変長符号化手段、101 一時バッファ、102 符号量制御手段、103 送信バッファ、104 固定符号出力手段。[0001]
BACKGROUND 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, relating to a mobile phone or a TV phone system.
[0002]
[Prior art]
FIG. 15 shows, for example, “All about MPEG-4” (Industry Research Committee) p. 39-p. 40 is a block diagram of the conventional encoding device shown in FIG. 40, FIG. 16 is an explanatory diagram showing an input signal of this conventional encoding device, FIG. 17 is an explanatory diagram showing the configuration of the bit stream, and FIG. These are the explanatory views showing the position (arrangement) on the screen (displayed state) of the video packet.
[0003]
In FIG. 15, 1 is a subtractor having an external input signal (in the example shown in the figure, a luminance signal and a color difference signal) as a first input, and the output of the subtracter 1 is DCT (discrete cosine transform). (Discrete Cosine Transform) means 2 and quantizer 3 are input to DC / AC predictor 4 and inverse quantizer 6 for predicting the quantized values of direct current (DC) component and alternating current (AC) component. . The output of the DC / AC predictor 4 is given to the first input of the variable length coding means 5, and the variable length coding means 5 outputs a bit stream.
[0004]
On the other hand, the output of the inverse quantizer 6 to which the output of the quantizer 3 is inputted is given to the first input of the adder 8 through the inverse DCT means 7. The output of the adder 8 is given to the memory 9, and the output of the memory 9 is given to the first input of the predicted image creation means 10 and the first input of the motion detection means 11.
[0005]
An external input signal is given to the second input of the motion detecting means 11, and the output of the motion detecting means 11 is given to the second input of the predicted image creating means 10 and the motion vector predictor 12.
[0006]
The output of the motion vector predictor 12 is given to the second input of the variable length encoding means 5. Further, the output of the predicted image creating means 10 is given to the second input of the subtracter 1 and the second input of the adder 8.
[0007]
Next, the operation will be described. First, as shown in FIG. 16, the video signal is divided into macro blocks which are basic processing units and inputted as external input signals (the external input signals here are basically inputted as macro blocks and directly Even if a macroblock is input, a means for generating a macroblock may be provided in the preceding stage so that the macroblock is converted into a macroblock).
[0008]
When the input video signal is 4: 2: 0, 16 pixels × 16 lines of the luminance signal (Y) have the same size on the screen as 8 pixels × 8 lines of the two color difference signals (Cb, Cr). . Therefore, six blocks of 8 pixels × 8 lines (6 blocks including 4 blocks for luminance signals and 2 blocks for color difference signals) constitute one macro block.
[0009]
Here, it is assumed that the Video Object Plane (VOP, unit image) input as an external input has a rectangular shape and is the same as the frame.
[0010]
Each block is subjected to discrete cosine transform (DCT) and then quantized by the quantization means 3. The quantized DCT coefficients are subjected to variable length coding together with additional information such as quantization parameters after the coefficients of the DC and AC components are predicted by the DC / AC predictor 4.
[0011]
This is intra coding (sometimes referred to as intra-frame coding). A VOP to which intra coding is applied to all macroblocks is called an I-VOP (Intra-VOP).
[0012]
On the other hand, the quantized DCT coefficient is decoded by inverse quantization in the inverse quantization means 6 and inverse DCT in the inverse DCT means 7, 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 interframe coding).
[0013]
In the case of inter coding, the motion detector 11 detects a motion vector indicating the motion of the macroblock input as an external input signal. This motion vector indicates a position in the decoded image stored in the memory 9 at which the error from the input macroblock is minimized.
[0014]
The predicted image creating means 10 creates a predicted image based on the motion vector detected by the motion detecting means 11.
[0015]
Subsequently, a difference signal between the input macroblock and the predicted image created by the predicted image creating means 10 is obtained, the DCT means 2 performs DCT on the difference signal, and the quantizing means 3 performs quantization. .
[0016]
The quantized DCT coefficient is subjected to variable length coding together with additional information such as a motion vector subjected to predictive coding and a quantization parameter. The quantized DCT coefficients are subjected to inverse quantization in the inverse quantization means 6 and inverse DCT in the inverse DCT means 7, and then added to the predicted image by the adder 8 and stored in the memory 9.
[0017]
Inter-coding includes unidirectional prediction that predicts only from the VOP that is temporally earlier in the image display order, and bidirectional prediction that predicts from both the temporally previous VOP and the subsequent VOP. A VOP encoded by unidirectional prediction is called a P-VOP (Predictive VOP), and a VOP encoded by bidirectional prediction is called a B-VOP (Bidirectionally Predictive VOP).
[0018]
Next, the configuration of the bit stream output from the variable length encoding means 5 will be described with reference to FIG. As shown in FIG. 17A, a 1 VOP bit stream is composed of one or more video packets.
[0019]
Here, one video packet is composed of encoded data of one or more macroblocks, and the first video packet of the VOP has a VOP header at the beginning and finally a stuff bit for byte alignment. Is attached (FIG. 17B).
[0020]
In the case of the second and subsequent video packets, a Resync Marker for detecting the head of the video packet and a video packet header are attached to the head, and a stuff bit is attached to the end (FIG. 17C).
[0021]
The stuff bit here is added to the end (break) of the video packet in units of 1 to 8 bits in order to adjust the byte alignment to be added at the end of the video packet. The stuffing described below and its meaning are as follows. Differentiated.
[0022]
Further, as shown in FIG. 17D, an arbitrary number of stuffing can be put in the video packet. For example, in the case of MPEG4 Video, this stuffing is called a stuffing macroblock, and can be placed in an arbitrary video packet in the same manner as a macroblock. This stuffing is discarded (substantially not used) on the decoding device side.
[0023]
Stuffing is used as a word such as 9 bits or 10 bits for increasing the code amount, and is used regardless of byte alignment (for example, adjusting the end of the video packet). It is used by being inserted between macroblocks, and the above stuff bits are distinguished from their meanings.
[0024]
The number of macroblocks that can be included in one video packet is arbitrary. However, in consideration of error propagation, it is generally recommended that the code amount of each video packet be substantially constant. In this way, when the code amount of the video packet is substantially constant, the area occupied in one VOP of each video packet is not constant as shown in FIG.
[0025]
Next, details of the operation of the DC / AC predictor 4 will be described with reference to FIG. 19 (here, the Y component of the macroblock will be described).
As described above, the DC / AC predictor 4 performs prediction of the DC component and the AC component of the quantized DCT coefficient output from the quantizer 3 in the case of intra coding. In the case of inter coding, the DC component and the AC component are not predicted, and the quantized DCT coefficient output from the quantizer 3 is output to the variable length encoding means 5 as it is. In this case, DC / AC prediction is separately performed for the luminance signal Y and the color difference signal C.
[0026]
In the following, prediction of DC components and AC components in the case of intra coding will be described.
The quantized DCT coefficient of the currently encoded block is Fx (i, j) (0 ≦ i ≦ 7, 0 ≦ j ≦ 7), and the quantized DCT coefficient of the block on the left side of this block is Fa. (I, j) (0 ≦ i ≦ 7, 0 ≦ j ≦ 7), and the quantized DCT coefficient of the adjacent block is Fc (i, j) (0 ≦ i ≦ 7, 0 ≦ j ≦ 7) If the quantized DCT coefficient of the upper left block is Fb (i, j) (0 ≦ i ≦ 7, 0 ≦ j ≦ 7), first, the DC component Fb of the quantized DCT coefficient of the upper left block From (0, 0), the DC component Fa (0, 0) of the quantized DCT coefficient of the left adjacent block, and the DC component Fc (0, 0) of the quantized DCT coefficient of the upper adjacent block, Determine the prediction direction.
[0027]
For example, if the quantization step width of the DC component of the left adjacent block 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 adjacent block is Qdc,
fa (0,0) = Fa (0,0) × Qda
fb (0,0) = Fb (0,0) × Qdb
fc (0,0) = Fc (0,0) × Qdc
To obtain DC components fa (0, 0), fb (0, 0), and fc (0, 0) after inverse quantization,
If the relationship | fa (0,0) −fb (0,0) | <| fb (0,0) −fc (0,0) | is established, it is considered that the correlation in the vertical direction is strong. When the above relationship is not satisfied and the above relation is not established, it is considered that the correlation in the left-right direction is strong. Therefore, the DC component after the inverse quantization of the adjacent block on the left Prediction is performed from fa (0,0).
[0028]
When the DC component is predicted from the upper adjacent block,
Px (0,0) = Fx (0,0) −fc (0,0) / Qdx
When the DC component is predicted from the block on the left,
Px (0,0) = Fx (0,0) −fa (0,0) / Qdx
As a result, the predicted DC component Px (0, 0) is obtained. However, Qdx is the quantization step width of the DC component of the current block, and the above division is calculated by rounding off, for example.
[0029]
Subsequently, the AC component is predicted using the DC component prediction direction. That is, assuming that the quantization parameter of the left adjacent block is Qpa, the quantization parameter of the upper adjacent block is Qpc, and the quantization parameter of the current block is Qpx, the DC component is predicted from the upper adjacent block. , Predicting the AC component
Px (i, 0) = Fx (i, 0) − (Fc (i, 0) × Qpc) / Qpx
(I = 1, 7)
Based on.
[0030]
When the DC component is predicted from the block on the left, the AC component is predicted.
Px (0, j) = Fx (0, j) − (Fa (0, j) × Qpa) / Qpx
(J = 1, ..., 7)
To obtain a predicted AC component Px (i, 0) or Px (0, j). However, the above division is calculated by rounding off, for example.
[0031]
Whether the AC component prediction is performed after the above-described AC component prediction is independently performed on the six blocks constituting one macroblock is determined on a macroblock basis as described below (whichever It is determined for each macro block depending on whether the prediction is performed in relation to the block).
[0032]
Here, the block AC prediction determination index SB is used as an index indicating that it is determined whether the original video signal is good (AC component prediction is not performed) or whether the prediction is preferable. Asking. For example, for each block of six blocks constituting one macroblock, when that block (a block for which the AC prediction determination index SB is obtained) is predicted from the upper adjacent block,
[0033]
[Expression 1]
Figure 0003669281
[0034]
When the AC prediction determination index SB is obtained by the above and the block is predicted from the left adjacent block,
[0035]
[Expression 2]
Figure 0003669281
[0036]
The AC prediction judgment index SB is obtained from the above, the sum SBS of the AC prediction judgment indices SB of the six blocks constituting one macroblock (the sum of the AC prediction judgment indices obtained for each block),
SBS ≧ 0
In the case of (2), the AC component is predicted. Otherwise, the AC component is not predicted.
[0037]
Note that ac_pred_flag = 1 when AC component prediction is performed, and ac_pred_flag = 0 when AC component prediction is not performed. After ac_pred_flag is added as additional information for each macroblock, each macroblock is variable-length encoded. Encoding is performed by means 5.
[0038]
For a block belonging to a macroblock with ac_pred_flag = 1, if the block is predicted from the adjacent block above,
[0039]
[Equation 3]
Figure 0003669281
[0040]
If Ox (i, j) is determined and the block is predicted from the left adjacent block,
[0041]
[Expression 4]
Figure 0003669281
[0042]
To obtain Ox (i, j).
For blocks belonging to the macro block with ac_pred_flag = 0,
[0043]
[Equation 5]
Figure 0003669281
[0044]
Thus, Ox (i, j) is obtained, and this Ox (i, j) is output to the variable length encoding means 5 as the output of the DC / AC predictor 4.
[0045]
In the above prediction, if the current block is the left end block of the unit image (or the left end of the single screen if the unit image is one screen), the block next to the left and the upper left block of the current block Therefore, the values of the DC components fa (0, 0) and fb (0, 0) after inverse quantization used in the prediction are set to a predetermined constant β. In this case, the AC components Fa (i, j) and Fb (i, j) ((i, j) ≠ (0,0)) used in the prediction are set to 0.
[0046]
Here, the predetermined constant β is, for example, an intermediate value in the range of the DC component value among the DCT coefficients output from the DCT means 2. That is, if the DC component output from the DCT means 2 can take a value from 0 to 2047 with 11 bits, β = 1024.
[0047]
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 if the unit image is one screen), the block adjacent to the current block and the upper left Since there is no block, the values of the DC components fc (0,0) and fb (0,0) after inverse quantization used in the prediction are set as the constant β, and the AC components Fc (i, j) and Fb ( i, j) ((i, j) ≠ (0,0)) is set to 0.
[0048]
Further, in the 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 prediction is changed to the constant β And AC component Fa (i, j) ((i, j) ≠ (0,0)) is set to 0.
[0049]
Similarly, in the prediction, when the block immediately above the current block belongs to a video packet different from the current block, the DC component fc (0, 0) after inverse quantization used in the prediction is changed to the constant described above. Let β be AC component Fc (i, j) ((i, j) ≠ (0,0)).
[0050]
In the 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 inverse quantization used in the prediction is set as the constant β. , AC component Fb (i, j) ((i, j) ≠ (0,0)) is set to 0.
[0051]
In this way, in the DC / AC predictor 4, by not referring to the coefficients of the DC component and the AC component between blocks belonging to different video packets, even when an error is mixed in the transmitted bit stream, An error propagation by DC / AC prediction is configured to be contained in a video packet.
[0052]
[Problems to be solved by the invention]
In the conventional coding apparatus as described above, the processing for avoiding the overflow of the transmission buffer and the underflow of the VBV buffer which is the virtual buffer on the reception side is not sufficiently considered.
[0053]
Normally, the amount of code is increased or decreased by adjusting the quantization parameter used in the quantizer 3, but the quantization parameter is maximized (the amount of code generated by suppressing the coarsest quantization is reduced). The processing for the case where the overflow of the transmission buffer occurs was not considered.
[0054]
Further, when the input VOP rate is F (1 / sec), it is required to encode all macroblocks constituting one VOP in 1 / F (sec) or a shorter time. .
[0055]
However, for example, when the motion detection unit 11 is configured to adaptively change the search range of the motion vector according to the motion of the object in the VOP, the motion detection unit 11 detects the motion vector of each macroblock. The time required for the change varies for each macroblock, and therefore the processing time of 1 VOP is not constant. In such a case, control for encoding all macroblocks constituting one VOP within a predetermined time has not been considered conventionally.
[0056]
The present invention has been made to solve the above-described problems, and proposes an encoding apparatus and an encoding method capable of effectively avoiding an overflow of a transmission buffer and an underflow of a VBV buffer.
[0057]
The present invention also provides an encoding apparatus and an encoding method capable of completing encoding for 1 VOP within a predetermined time even when the time required for encoding one macroblock is not constant.
[0058]
[Means for Solving the Problems]
  The encoding device according to the present invention is:An external input signal input for each unit image is divided into a plurality of macro blocks, the external input signal is encoded in units of macro blocks, and a video packet including one or more macro block codes generated by encoding is An encoding device for output, wherein the external input signal is inter-coded or intra-coded in units of macroblocks, encoding means for outputting a code generated by inter-coding or intra-coding, and unit images When the encoding is inter-encoding or intra-encoding, fixed code output means for outputting a fixed code corresponding to each encoding type and code output from the encoding means, or fixed code means Storage means for storing the fixed code output from the code, the code output from the encoding means, or the output from the fixed encoding output means Code amount control means for controlling the code amount of the code to be stored in the storage means by selecting any one of the fixed codes to be stored, and the code amount control means includes the code amount mb_bit of the code of the current macroblock, the unit image Code amount Sc from the first macroblock of the current macroblock to the macroblock immediately before the current macroblock, maximum code amount Tmax set so that the storage means does not overflow or the VBV buffer does not underflow, unit The number M of macroblocks to be processed subsequent to the current macroblock in the image, the code length L of the fixed code output by the fixed code output means for each macroblock, determined by the coding type, and the current macroblock and the subsequent ones in the unit image The relationship between the total code amount α of the additional code in units of video packets generated in
Sc + mb_bit + M × L + α> Tmax
(However, α ≧ 0)
Control to select the fixed code output by the fixed code output meansIt is characterized by.
[0082]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present invention will be specifically described with reference to the drawings showing embodiments thereof.
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, and the output of the subtracter 1 passes through a DCT means 2 and a quantizer 3 to a DC / AC predictor 4 and an inverse quantizer 6. Entered. The output of the DC / AC predictor 4 is given to the first input of the variable length coding means 5a.
[0083]
On the other hand, the output of the inverse quantizer 6 is given to the first input of the adder 8 through the inverse DCT means 7. The output of the adder 8 is given to the first input of the memory 9, and the output of the memory 9 is given to the first input of the predicted image creation means 10 and the first input of the motion detection means 11.
[0084]
An external input signal is given to the second input of the motion detecting means 11, and the output of the motion detecting means 11 is given to the second input of the predicted image creating means 10 and the motion vector predictor 12. The output of the predicted image creating means 10 is given to the second input of the subtracter 1 and the second input of the adder 8.
[0085]
The output of the motion vector predictor 12 is given to the second input of the variable length encoding means 5a. The encoding means includes the subtractor 1 to which the above external input signal is input, and the variable length encoding means 5a from which the variable length code corresponding to the external input signal is output (of course. The configuration shown here is only an example, and a known configuration capable of performing encoding corresponding to an external input signal can be used.
[0086]
The first output of the variable length coding unit 5 a is given to the first input of the temporary buffer 101, and the second output of the variable length coding unit 5 a is given to the input of the code amount control unit 102.
[0087]
The output of the fixed code output means 104 is given to the second input of the temporary buffer 101, and the first output of the code amount control means 102 is given to the third input of the temporary buffer 101. The output of the temporary buffer 101 is given to the first input of the transmission buffer 103 (here, the temporary buffer 101 or the transmission buffer 103 corresponds to the storage means).
[0088]
  The second output of the code amount control means 102 is given to the second input of the memory 9.Be. The output of the transmission buffer 103 is output (transmitted) as a bit stream.
[0089]
The output (transmitted) bit stream is received and decoded by the decoding device.
[0090]
Next, the operation will be described.
First, as shown in FIG. 16, the video signal is divided into macro blocks which are basic processing units, and input to the subtracter 1 and the motion detection means 11 as input macro blocks. For example, when the input video signal is 4: 2: 0, 16 pixels × 16 lines of the luminance signal (Y) are the same size on the screen as 8 pixels × 8 lines of the two color difference signals (Cb, Cr). Therefore, six blocks of 8 pixels × 8 lines constitute one macro block.
[0091]
When intra coding is performed, each block is quantized after being subjected to DCT. The quantized DCT coefficient is predicted by the DC / AC predictor 4 and then variable-length encoded by the variable-length encoding means 5a together with additional information such as a quantization parameter. The quantized DCT coefficients are inversely quantized by the inverse quantizer 6 and decoded by performing inverse DCT by the inverse DCT means 7, and the decoded image that is the output of the inverse DCT means 7 is stored in the memory 9. .
[0092]
In the case of inter coding, the motion detection unit 11 detects a motion vector indicating the motion of the input macroblock. 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]
The predicted image creating unit 10 creates a predicted image based on the motion vector detected by the motion detecting unit 11. Next, the difference between the input macroblock and the predicted image is obtained, DCT is performed on the difference signal by the DCT means 2, and the quantizer 3 performs quantization.
[0094]
The quantized DCT coefficient that is the output of the quantizer 3 is added to the coefficient predicted by the DC / AC predictor 4, the motion vector predicted by the motion vector predictor 12, and additional information such as a quantization parameter. Variable length encoding is performed by the variable length encoding means 5a. Further, the quantized DCT coefficient is subjected to inverse quantization by the inverse quantizer 6 and inverse DCT by the inverse DCT means 7, and then added to the predicted image output from the predicted image creating means 10, and is added to the memory 9. Is remembered.
[0095]
Next, the operation of the variable length coding means 5a will be described in detail.
The variable length encoding unit 5 a encodes the quantized DCT coefficient and additional information for each macroblock (encoding step), writes the code into the temporary buffer 101, and outputs the code amount to the code amount control unit 102.
[0096]
For example, in the case of MPEG4 I-VOP, first, the AC component of the DCT coefficient of each block output from the DC / AC predictor 4 is one-dimensionally scanned by a method such as zigzag scanning, and the number of zeros and non-zero coefficients are calculated. Run-length encoding is performed to encode a combination of The AC component data of each block subjected to the run length coding is written in the temporary buffer 101.
[0097]
As shown in FIG. 2A, after the coefficient data of each block, a macro block type (MTYPE) indicating intra / inter and the like and cbpc indicating whether or not there is a non-zero AC coefficient in each color difference block are summarized. Encoded mcbpc, dquant indicating the quantization parameter, DC component of the DCT coefficient of each block, ac_pred_flag indicating whether AC prediction has been performed, cbpy indicating whether each block of Y has a non-zero AC coefficient It is encoded and written to the temporary buffer 101.
[0098]
Note that the total of these code amounts is output to the code amount control means 102 for each macroblock.
[0099]
Similarly, in the case of MPEG4 P-VOP, data encoded in the order as shown in FIG.
[0100]
Based on the code amount of each macroblock output from the variable length coding unit 5a, the code amount control unit 102 collects macroblocks so that the length of each video packet is equal to or less than a predetermined value. Transfer from the buffer 101 to the transmission buffer.
[0101]
For example, in the case of MPEG4, as shown in FIGS. 2 (b) and 3 (b), a header is added to the head of the video packet, and the packets are rearranged in the order of the specified bit stream and transferred.
[0102]
Also, the code amount control means 102 is configured so that the transmission buffer 103 does not overflow, or a VBV (Video Buffering Verifier) buffer (virtual buffer required for bit stream reception on the receiving side (necessary capacity is For example, the maximum code amount Tmax is set for each VOP so that an underflow does not occur). A fixed code to be written to the temporary buffer 101 is selected from the output of the variable length coding means 5a or the output of the fixed code output means 104 so that the VOP code amount does not exceed Tmax.
[0103]
Here, the maximum code amount Tmax can be said to be the upper limit value of the code amount so that the transmission buffer 103 does not overflow and the VBV buffer does not underflow.
[0104]
Details of the operation will be described below.
The code amount control means 102 obtains the maximum code amount Tmax of the VOP before starting to encode each VOP. For example, the capacity of the transmission buffer 103 is Bs (bits), the current remaining amount of the transmission buffer 103 (that is, accumulated in a storage unit such as a transmission buffer or a VBV buffer, and read from the storage unit such as the transmission buffer or the VBV buffer) This is the amount of data (remaining capacity) that has not been stored (remaining (stored) in storage means such as a transmission buffer or VBV buffer). If the transmission buffer 103 does not overflow, the code amount of the VOP is expressed as Bs−B. If the transmission buffer 103 does not overflow, it is expressed as an amount or an occupancy amount (hereinafter simply referred to as an occupancy amount). The following is sufficient. Therefore, the maximum code amount Tmax is set to
Tmax ≦ Bs−B
Should be set.
[0105]
Further, when managing the VBV buffer, if the read bit rate of the transmission buffer 103 is R (bits / sec) and the VOP rate to be encoded is F (1 / sec), the VBV buffer is read from the transmission buffer 103 in one VOP period. The number of bits Rp is
Rp = R / F
Thus, the number of bits received by the VBV buffer in one VOP period is also Rp.
[0106]
Therefore, if the VBV buffer occupancy in the decoding time of the VOP immediately before the current VOP is vbv_bits (bits), the code amount of the VOP should be less than or equal to vbv_bits + Rp so that the VBV buffer does not underflow. . That is, the maximum code amount Tmax is set to
Tmax ≦ vbv_bits + Rp
Should be set.
[0107]
Therefore, the code amount control means 102 determines the maximum code amount Tmax of the VOP before starting to encode each VOP.
Tmax = min (vbv_bits + Rp, Bs−B)
And set. (Min (a, b) indicates that the smaller one of a and b is used as the value).
[0108]
The VBV buffer occupancy vbv_bits is used to estimate the occupancy on the receiving side. If underflow occurs on the receiving side, the VBV buffer underflow may be used when taking measures such as delaying the decoding time. There is no need to manage. If there is no need to manage underflow of the VBV buffer in this way,
Tmax = Bs−B
Should be set.
[0109]
Since the occupation amount B of the transmission buffer 103 changes with time, the value of the maximum code amount Tmax also changes with time. The maximum code amount Tmax is calculated for each VOP.
[0110]
Next, the code amount control unit 102 obtains the code amount of the current VOP for each macro block, and outputs the macro block from the variable length encoding unit 5a according to the flowcharts shown in FIGS. Of the fixed codes output from the code or fixed code output means 104, either the code stored in the temporary buffer 101 or the fixed code is selected (control to select and store. Code amount control step). Then, either the code or the fixed code is accumulated in the temporary buffer 101 (accumulation step. The accumulation step may include the transmission from the temporary buffer 101 to the transmission buffer 103).
[0111]
4 shows a flowchart when the current VOP is P-VOP (encoding type is inter), and FIG. 5 is a flowchart when the current VOP is I-VOP (encoding type is intra). Show.
[0112]
(Regarding code amount control in the 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 P-VOP, the variable length encoding means 5a outputs the coefficient data of each block, not_coded, mcbpc, motion vector, cbpy, dquant to each macro block as shown in FIG. Not all of these codes exist. For example, when the coefficient data of each block is all 0 and the motion vector is (0, 0), only 1 bit of not_coded = 1 exists. . This is the code that is the minimum code amount in the P-VOP macroblock.
[0113]
Therefore, in the case of P-VOP, fixed code output means 104 outputs only 1 bit of not_coded = 1 as a fixed code (fixed code output step. Note that a fixed code is also output to I-VOP as will be described later. This is also referred to as a fixed code output step). That is, the fixed code output means 104 outputs the fixed code of the macroblock that is the minimum code amount for the current VOP encoding type.
[0114]
For example, when all the coefficient data of each block is 0 and the motion vector is (0, 0), there is only 1 bit of not_coded = 1. Therefore, in the case of P-VOP, fixed code output means 104 The code length L of the fixed code output by L is L = 1.
[0115]
The code amount control unit 102 obtains the code amount of the current VOP for each macroblock, and even if the fixed code output from the fixed code output unit 104 is selected for all the remaining macroblocks, all of the VOPs are configured. When the code amount of the macroblock 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 means 104.
[0116]
That is, if the total number of macroblocks constituting the VOP is A and the macroblock number of the current macroblock is K (where 0 ≦ K ≦ A−1), the number M of macroblocks to be encoded following this is M. (Number of remaining macroblocks M) is
M = AK-1
It is expressed.
[0117]
The code amount from the macroblock of macroblock number 0 constituting the current VOP to the macroblock of macroblock number K-1 is Sc, and variable length coding means for the current macroblock (macroblock number K) If the code amount of the code output by 5a is mb_bit, the code amount of the entire VOP when the fixed code (code length is L) of the fixed code output means 104 is selected for the remaining M macroblocks,
Sc + mb_bit + M × L + α
It becomes. Here, α is a code amount of an additional code generated in units of video packets such as a Resync Marker, a video packet header, a stuff bit, and a motion_marker that can be generated in a macro block after the macro block number K (here, an additional code amount) And α ≧ 0.
[0118]
there,
Sc + mb_bit + M × L + α> Tmax
Is written, the fixed code output from the fixed code output means 104 is written in the temporary buffer 101 for the current macroblock (macroblock number K), otherwise the variable length encoding means 5a outputs it. Control is performed to write the code in the temporary buffer 101 (FIG. 4).
[0119]
As the value of the additional code amount α, for example, the sum of the code amounts of ResyncMarker, video packet header, stuff bit, and motion_marker in P-VOP is Cp (bit) at the maximum, and the length of a predetermined video packet is Assuming that VPlen (bit), the code amount generated in the macroblocks after the current macroblock (macroblock number K) is at least
(M + 1) × L
And
(M + 1) × L / VPlen + 1
Since the number of video packets can be generated, the additional code amount α is
α = ((M + 1) × L / VPlen + 1) × Cp
And it is sufficient.
[0120]
If the total number A of macroblocks constituting the VOP is used,
M + 1 ≦ A
Therefore, in order to simplify the calculation, the additional code amount α is
α = (A × L / VPlen + 1) × Cp
Alternatively, the value may be fixed to P-VOP.
[0121]
For the P-VOP, when the fixed code output from the fixed code output unit 104 is stored in the temporary buffer 101, the P-VOP is stored in the memory 9 in order to force it to be treated as not_coded (not encoded). The decoded image of the current macroblock is replaced with the decoded image of the macroblock at the same position in the previous VOP stored in the memory 9.
[0122]
That is, in the memory 9, the decoded image of the macroblock with the macroblock number K of the previous 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 not_coded = 1. Thus, by copying the decoded image of the previous VOP in this way, the fixed code output unit 104 outputs the fixed code. A decoded image corresponding to the fixed code is obtained.
[0123]
(Regarding code amount control in the 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 I-VOP, the variable length encoding means 5a outputs the AC component data, mcbpc, dquant, DC component, ac_pred_flag, and cbpy of each block to each macro block as shown in FIG. These codes are not necessarily all present. For example, when the values of cbpc and cbpy indicated by mcbpc are both 0, there is no coefficient data for each block. If the macroblock type indicated by mcbpc indicates that it does not have dquant, there is no dquant.
[0124]
Therefore, in the case of I-VOP, the fixed code output means 104 uses, as a fixed code, a code for a macroblock in which the DC component and AC component of each block are all 0, and dquant = 0 and ac_pred_flag = 0. Output. In most existing encoding methods such as MPEG2 and MPEG4, such a code is the minimum code amount of an I-VOP macroblock.
[0125]
As in the case of P-VOP, the code amount control unit 102 obtains the code amount of the current VOP for each macroblock, and selects the fixed code output from the fixed code output unit 104 for all the remaining macroblocks. Even if the code amount of all macroblocks constituting the VOP exceeds the maximum code amount Tmax of the VOP, the code of the current macroblock is replaced with a fixed code output from the fixed code output means 104.
[0126]
Here, since it is required not to destroy the video packets constituting the VOP (all macroblocks constituting the video packet are included), it is necessary to generate encoded data corresponding to the remaining macroblocks. 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, the margin for the fixed code is expected. There is a need.
[0127]
That is, the code amount of the code output by the variable length encoding means 5a for the current macroblock (macroblock number K) is mb_bit, the code length of the fixed code output by the fixed code output means 104 is L, and the current VOP Assuming that the amount of code from the macroblock with macroblock number 0 to the macroblock with macroblock number K-1 is Sc, as shown in FIG.
Sc + mb_bit + M × L + α> Tmax
(M = AK-1)
Is written, the fixed code output from the fixed code output means 104 is written in the temporary buffer 101 for the current macroblock (macroblock number K), otherwise the variable length encoding means 5a outputs it. Control is performed to write the code in the temporary buffer 101.
[0128]
Here, α is the code amount (additional code amount) of codes generated in units of video packets such as Resync Marker, video packet header, stuff bit, dc_marker, etc. that can be generated in macroblocks after the macroblock number K. α ≧ 0.
[0129]
As the value of the additional code amount α, for example, the total of the code amount of ResyncMarker, video packet header, stuff bit, and dc_marker in I-VOP is a maximum of Ci (bit), and a predetermined video packet length is used. Assuming that VPlen (bit), the code amount generated in the macroblocks after the current macroblock (macroblock number K) is at least
(M + 1) × L
And
(M + 1) × L / VPlen + 1
Since video packets can occur,
α = ((M + 1) × L / VPlen + 1) × Ci
And it is sufficient.
[0130]
If the total number A of macroblocks constituting the VOP is used,
M + 1 ≦ A
Therefore, in order to simplify the calculation,
α = (A × L / VPlen + 1) × Ci
Alternatively, a fixed value may be used for I-VOP.
[0131]
In the case of 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 101, and the previous macroblock When the output (fixed code) of the fixed code output means 104 is not selected for (macroblock number K-1) (when the output of the variable length encoding means 5a is selected), as shown in FIG. A new video packet is constructed from the current macroblock.
[0132]
In the case of I-VOP, since DC prediction is performed even if ac_pred_flag = 0, when the DC component stored in the temporary buffer 101 is 0, this is a DC component Ox after prediction output from the DC / AC predictor 4 It indicates that (0,0) is 0, and does not indicate that the DC component Fx (0,0) output from the quantizer 3 is 0.
[0133]
Therefore, when the fixed code output means 104 outputs a fixed code for a macroblock in which the DC component and AC component of each block are all 0 and dquant = 0 and ac_pred_flag = 0, the fixed code is decoded. In general, the obtained image is not constant (that is, even if the fixed code itself is fixed, the value related to the image representation is not a fixed value but can be an arbitrary value).
[0134]
However, the DC / AC predictor 4 does not refer to the coefficient of the DC component between blocks belonging to different video packets, and uses the constant β, which is an intermediate value in the DC component value range, as a reference value. As described above, 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 as to form a new video packet from the macro block, the fixed code output unit 104 The DC component fx (0, 0) after inverse quantization of each block represented by the output fixed code is
fx (0,0) = β
It becomes.
[0135]
Therefore, in the case of I-VOP, when the fixed code output from the fixed code output unit 104 is decoded, an image in which all the pixels of the macroblock are constant γ (so-called solid image having the same color as the entire screen) ) Is obtained. Here, the constant γ is an intermediate value in the pixel value range of the input macroblock. For example, if the input macroblock can take a value from 0 to 255 with 8 bits, γ = 128.
[0136]
When the fixed code output from the fixed code output unit 104 is selected to be stored in the temporary buffer 101, as described above, the DC component after inverse quantization of each block of the macroblock (macroblock number K) is as described above. Is equal to the constant β. Therefore, when the output (fixed code) of the fixed code output means 104 is selected in the next macroblock (macroblock number K + 1) of the macroblock, even if a new video packet is not formed, The DC component after inverse quantization is a constant β, and the decoded image is an image (solid image) having all the pixel values of the constant γ.
[0137]
Therefore, as shown in FIG. 5, when the fixed code output from the fixed code output unit 104 is stored in the temporary buffer 101, and the output of the fixed code output unit 104 (for the previous macro block) If no (fixed code) is selected, control may be performed so as to construct a new video packet from the current macroblock.
[0138]
When the fixed code output from the fixed code output unit 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 having 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]
As described above, the code stored in the temporary buffer 101 is selected from the code output from the variable-length encoding means 5a or the fixed code output from the fixed code output means 104 based on the flowcharts of FIGS. Thus, control can be performed so that the code amount of each VOP does not exceed the maximum code amount Tmax.
[0140]
Further, by determining whether or not to construct a new video packet from the current macroblock based on the flowchart of FIG. 5, the I-VOP also supports the fixed code output from the fixed code output unit 104. Since the decoded image to be written is written in the memory 9 without performing a new calculation, the code amount of the unit image can be controlled to be always equal to or less than the maximum code amount Tmax with a small calculation amount.
[0141]
Embodiment 2. FIG.
In the first embodiment, the code amount control unit 102 is controlled to select the output (fixed code) of the variable length encoding unit 5a or the fixed code output unit 104 based on the flowcharts of FIGS. The code amount control means 102 may be configured to select the output (fixed code) of the variable length encoding means 5a or the fixed code output means 104 based on the flowcharts shown in FIGS.
[0142]
6 shows a flowchart when the current VOP is P-VOP (encoding type is inter), and FIG. 7 is a flowchart when the current VOP is I-VOP (encoding type is intra). Show.
[0143]
(Regarding code amount control in the case of P-VOP)
First, the case of P-VOP will be described with reference to FIG.
Similarly to the case of the first embodiment, the code amount control unit 102 uses mb_bit as the code amount of the code output by the variable length encoding unit 5a for the current macroblock (macroblock number K), and fixed code output unit. The code length of the fixed code output from 104 is L, the code amount from the macroblock of macroblock number 0 to the macroblock of macroblock number K-1 constituting the current VOP is Sc, and the macroblock constituting the current VOP If the number of macroblocks after K + 1 is M,
Sc + mb_bit + M × L + α> Tmax (1)
In such a case, control is performed so that the fixed code output from the fixed code output unit 104 is written in the temporary buffer 101 for the current macroblock (macroblock number K).
[0144]
Here, α is the code amount (additional code amount) of codes generated in units of video packets such as Resync Marker, video packet header, stuff bit, motion_marker and the like that can be generated in macroblocks after the macroblock number K. 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]
By the way, when the above formula (1) holds for the current macroblock, the code amount is accumulated, so it is highly possible that the formula (1) holds for the next macroblock. high.
[0146]
For example, if the expression (1) is established for the macroblock number K, the code amount Sc ′ of the macroblocks from the macroblock number 0 to the macroblock number K is the code up to the macroblock of the macroblock number K−1. The code length L of the fixed code output from the fixed code output means 104 is added to the amount Sc.
Sc '= Sc + L
It becomes. Here, the code amount mb_bit of the code output by the variable length encoding unit 5a for the macroblock of the macroblock number K and the code output by the variable length encoding unit 5a for the macroblock of the macroblock number K + 1. If the code amount mb_bit ′ is equal and the value of α is the same for both macroblocks,
Sc ′ + mb_bit ′ + (M−1) × L + α
= Sc + mb_bit + M × L + α
> Tmax
Thus, the expression (1) is also established for the macroblock number K + 1.
[0147]
Therefore, when the expression (1) is established for the macroblock number K, the calculation can be omitted assuming that the expression (1) is also established for the macroblocks after the macroblock number K.
[0148]
That is, as shown in FIG. 6, first, the output (fixed code) of the fixed code output means 104 for the macroblock (macroblock number K-1) immediately before the current macroblock (macroblock number K). If the output of the fixed code output means 104 (fixed code) is selected in the previous macro block, the output (fixed) of the fixed code output means 104 is also applied to the current macro block. Code) is stored in the temporary buffer 101.
[0149]
On the other hand, if the output (fixed code) of the fixed code output unit 104 is not selected in the previous macroblock, the above equation (1) is determined. If the equation (1) holds, the fixed code output unit 104 is determined. If the above output (fixed code) does not hold, the output of the variable length encoding means 5a is stored in the temporary buffer 101.
[0150]
(Regarding code amount control in the case of I-VOP)
The same applies to the case of the I-VOP. First, as shown in FIG. 7, the fixed code output means for the macroblock (macroblock number K-1) immediately before the current macroblock (macroblock number K). If it is determined whether the output (fixed code) 104 is selected and the output (fixed code) of the fixed code output means 104 is selected in the previous macroblock, the fixed code is also applied to the current macroblock. The output (fixed code) of the output means 104 is stored in the temporary buffer 101. In this case, as described in Embodiment 1, it is not necessary to construct a new video packet from the current macroblock.
[0151]
On the other hand, if the output (fixed code) of the fixed code output unit 104 is not selected in the previous macroblock, the above equation (1) is determined. If the equation (1) holds, the fixed code output unit 104 is determined. If the above output (fixed code) does not hold, the output of the variable length encoding means 5a is stored in the temporary buffer 101. If the above equation (1) holds, a new video packet is constructed from the current macroblock.
[0152]
In the second embodiment, when the expression (1) is established for a macroblock in one VOP, the fixed code output means 104 is used for all macroblocks subsequent to the macroblock constituting the VOP. Is output to the temporary buffer 101. In the macroblock to be encoded subsequent to the macroblock, the subtracter 1, the DCT means 2, the quantizer 3, and the DC / AC prediction The encoding means comprising the unit 4, the variable length encoding means 5a, the inverse quantizer 6, the inverse DCT means 7, the adder 8, the predicted image creation means 10, the motion detection means 11 and the motion vector prediction means 12 needs to operate. There is no.
[0153]
Therefore, when the expression (1) is established for a certain macroblock in one VOP, the subtractor 1, the DCT means 2, in the macroblock encoded following the macroblock constituting the VOP, Quantizer 3, DC / AC predictor 4, variable length coding means 5 a, inverse quantizer 6, inverse DCT means 7, adder 8, predicted image creation means 10, motion detection means 11, and motion vector prediction means 12 By stopping the operation (stopping the calculation from the macro block after the encoded macro block to the end of the VOP), it is possible to reduce the calculation amount and the power consumption.
[0154]
Embodiment 3 FIG.
In the third embodiment, the code amount control means 102 controls to select the output (fixed code) of the variable length encoding 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 (encoding type is inter).
[0155]
(Regarding code amount control in the case of P-VOP)
For example, when the motion detection unit 11 is configured to adaptively change the motion vector search range according to the motion of the object in the VOP, the motion detection unit 11 needs to detect the motion vector of each macroblock. The time changes for each macroblock, and therefore the processing time of 1 VOP is not constant.
[0156]
In such a case, in order to encode all the macroblocks constituting one VOP within a predetermined time, when the processing time is reduced, the subtracter 1, the DCT means 2, the quantizer 3, DC / The AC predictor 4, variable length encoding means 5 a, inverse quantizer 6, inverse DCT means 7, adder 8, predicted image creation means 10, motion detection means 11, and motion vector prediction means 12 are not calculated and fixed. The output (fixed code) of the code output means 104 is stored in the temporary buffer 101.
[0157]
Therefore, as shown in FIG. 8, the code amount control means 102 measures the elapsed time since the first macroblock (macroblock number 0) constituting the current VOP is input, and this elapsed time is determined in advance. When the specified processing time Tp is exceeded, control is performed so that the output (fixed code) of the fixed code output means 104 is always stored in the temporary buffer 101. Otherwise, the fixed code output is based on the equation (1). The output of the means 104 (fixed code) and the output of the variable length coding means 5a are selected and stored in the temporary buffer 101.
[0158]
Note that the predetermined processing time Tp in this case is set to a maximum of 1 VOP period (since processing for 1 VOP must be processed in 1 VOP period), other processing is included in this 1 VOP period. In this case, (1 VOP period−period required for other processing) is the maximum value given to the processing time Tp.
[0159]
(Regarding code control in the case of I-VOP)
If 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]
Embodiment 4 FIG.
In the fourth embodiment, the code amount control means 102 controls to select the output (fixed code) of the variable length encoding 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 (encoding type is inter).
[0161]
(Regarding code amount control in the case of P-VOP)
That is, as described in the second embodiment, the code amount control unit 102 first fixes the macroblock (macroblock number K-1) immediately before the current macroblock (macroblock number K). It is determined whether or not the output (fixed code) of the code output means 104 is selected, and when the output (fixed code) of the fixed code output means 104 is selected in the previous macroblock, the current macroblock is Also, the output (fixed code) of the fixed code output means 104 is stored in the temporary buffer 101.
[0162]
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, and this elapsed time is determined in advance. When the time Tp is exceeded, the output (fixed code) of the fixed code output means 104 is controlled to be stored in the temporary buffer 101. Otherwise, the output of the fixed code output means 104 is based on the above equation (1). The (fixed code) and the output of the variable length encoding means 5a are selected and stored in the temporary buffer 101.
[0163]
(Regarding code amount control in the case of I-VOP)
If 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.
[0164]
Embodiment 5. FIG.
In the first embodiment, the block diagram in which the fixed code output unit 104 exists independently is shown. However, for example, when each unit is configured by software, the fixed code output unit 104 and the variable length code are configured. It is also possible to share the ROM table for performing the respective operations of the converting means 5a.
[0165]
That is, as described in the first embodiment, the fixed code output by the fixed code output means 104 is one pattern of the codes of the macroblocks of I-VOP and P-VOP. The ROM table can be shared by integrating the output unit 104 and the variable length encoding unit 5a.
[0166]
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, and the output of the subtracter 1 passes through a DCT means 2 and a quantizer 3 to a DC / AC predictor 4 and an inverse quantizer 6. Entered. The output of the DC / AC predictor 4 is given to the first input of the variable length coding means 5b.
[0167]
On the other hand, the output of the inverse quantizer 6 is given to the first input of the adder 8 through the inverse DCT means 7. The output of the adder 8 is given to the first input of the memory 9, and the output of the memory 9 is given to the first input of the predicted image creation means 10 and the first input of the motion detection means 11.
[0168]
An external input signal is given to the second input of the motion detecting means 11, and the output of the motion detecting means 11 is given to the second input of the predicted image creating means 10 and the motion vector predictor 12. The output of the predicted image creating means 10 is given to the second input of the subtracter 1 and the second input of the adder 8.
[0169]
The output of the motion vector predictor 12 is given to the second input of the variable length coding means 5b.
[0170]
The first output of the variable length coding unit 5 b is given to the first input of the temporary buffer 101, and the second output of the variable length coding unit 5 b is given to the input of the code amount control unit 102.
[0171]
The first output of the code amount control means 102 is given to the second input of the temporary buffer 101. The output of the temporary buffer 101 is given to the first input of the transmission buffer 103.
[0172]
  The second output of the code amount control means 102 is given to the second input of the memory 9 and the third input of the variable length encoding means 5b.Be. The output of the transmission buffer 103 is output (transmitted) as a bit stream.
[0173]
The output (transmitted) bit stream is received and decoded by the decoding device.
[0174]
Next, the operation will be described.
The fifth embodiment is different from the first embodiment in the operations of the variable length coding means 5b and the temporary buffer 101. Since other parts are the same as those in the first embodiment, the description thereof is omitted.
[0175]
The variable length encoding means 5b first encodes the data of each macroblock as in the first embodiment, and writes the code 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 mb_bit of the code generated at this time is output to the code amount control means 102.
[0176]
Next, the code amount control means 102 judges the expression (1), and if the expression (1) holds, returns the write address of the temporary buffer 101 to Ak, and stores a signal indicating that a fixed code is selected. 9 and variable length encoding means 5b.
[0177]
When the variable length encoding means 5b receives a signal indicating that a fixed code is to be selected, the variable length encoding means 5b outputs to the temporary buffer 101 a fixed code determined in advance for each VOP encoding type. At this time, since the write address of the temporary buffer 101 is returned to Ak, the code of the macroblock number K is overwritten with a fixed code. Accordingly, as in the data configuration of the temporary buffer shown in FIG. 11B, the fixed code is written after the code of the macroblock number K-1.
[0178]
When the memory 9 receives a flag indicating that a fixed code is selected, in the case of I-VOP, the constant γ is written 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 a P-VOP, the decoded image of the macroblock of the macroblock number K of the VOP immediately preceding the VOP is copied to the decoded image area of the macroblock number K.
[0179]
With the configuration as described above, in the fifth embodiment, both the means for encoding each macroblock and the means for outputting a fixed code prepared for each VOP encoding type are provided to the variable length encoding means 5b. A function can be provided and the circuit can be reduced.
[0180]
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 the output of the subtracter 1 is reverse to the first input of the variable length encoding means 5c through the DCT means 2 and the quantizer 3. The quantizer 6 is supplied.
[0181]
The output of the inverse quantizer 6 is given to the first input of the adder 8 through the inverse DCT means 7. The output of the adder 8 is given to the first input of the memory 9, and the output of the memory 9 is given to the first input of the predicted image creation means 10 and the first input of the motion detection means 11.
[0182]
An external input signal is given to the second input of the motion detecting means 11, and the output of the motion detecting means 11 is given to the second input of the predicted image creating means 10 and the motion vector predictor 12. The output of the predicted image creating means 10 is given to the second input of the subtracter 1 and the second input of the adder 8.
[0183]
The output of the motion vector predictor 12 is given to the second input of the variable length encoding means 5c. Note that the encoding means includes the subtractor 1 to which the external input signal is input, and the variable length encoding means 5c to which a variable length code corresponding to the external input signal is output (of course, of course). The configuration shown here is only an example, and a known configuration that can perform encoding corresponding to an external input signal can be used.
[0184]
The first output of the variable length coding means 5 c is given to the first input of the temporary buffer 101, and the second output of the variable length coding means 5 c is given to the input of the code amount control means 102.
[0185]
The second input of the temporary buffer 101 is given the output of the fixed code output means 104 (fixed code), and the third input of the temporary buffer 101 is given the first output of the code amount control means 102. The output of the temporary buffer 101 is given to the first input of the transmission buffer 103.
[0186]
  The second output of the code amount control means 102 is given to the second input of the memory 9.Be. The output of the transmission buffer 103 is output (transmitted) as a bit stream.
[0187]
The output (transmitted) bit stream is received and decoded by the decoding device.
[0188]
Next, the operation will be described.
The sixth embodiment is different from the first embodiment in that DC / AC prediction is not performed even when the encoding type is intra. That is, the variable length encoding means 5c performs encoding using the DCT coefficient output from the quantizer 3. For example, H.M. In the case of an encoding device compliant with H.263, in the case of I-VOP, the DC component is always encoded with 8 bits.
[0189]
Therefore, the fixed code output means 104 outputs a fixed code of a macroblock such that the DC component of each block is 128, the AC components are all 0, and dquant = 0 with respect to the I-VOP.
[0190]
In this case, since there is no DC prediction, there is no need to construct a new video packet from the current macroblock even when the output (fixed code) of the fixed code output means 104 is selected. Therefore, even in the case of I-VOP, the code amount control means 102 outputs the fixed code output means 104 (fixed code) or variable length coding means in accordance with the flowchart of FIG. 4, FIG. 6, FIG. 8, or FIG. The output of 5c is selected and stored in the temporary buffer 101.
[0191]
In the case of the P-VOP, the output (fixed code) of the fixed code output means 104 according to the flowchart of FIG. 4, FIG. 6, FIG. 8, or FIG. 9, as in the first to fourth embodiments. Alternatively, the output of the variable length encoding means 5 c is selected and stored in the temporary buffer 101.
[0192]
Embodiment 7 FIG.
In the sixth embodiment, the output of the variable length encoding unit 5c or the output (fixed code) of the fixed code output unit 104 is stored in the temporary buffer 101 and 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 encoding means 5c or the output (fixed code) of the fixed code output means 104 is directly The configuration may be such that the data is input to the transmission buffer 103, and the temporary buffer 101 can be omitted (in this case, the storage means corresponds to the transmission buffer 103).
[0193]
For example, H.M. In the case of an encoding device compliant with H.263 (when data partitioning is not performed), the configuration of the bit stream output from the transmission buffer 103 is as shown in FIG. Therefore, as in the case of the MPEG4 data partition (FIG. 2B, FIG. 3B), the code of each macroblock is, for example, (1) mcbpc, dquant and DC components, (2) for each macroblock. Since ac_pred_flag and cbpy, and (3) the coefficient data of each block are not divided into categories (1) to (3) and the codes of a plurality of macroblocks are not organized into categories. There is no need to rearrange the codes generated for each macroblock.
[0194]
That is, if the variable length encoding means 5c outputs the code of the macroblock according to the format as shown in FIG. 13, the temporary buffer 101 for rearrangement becomes unnecessary.
[0195]
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 the output of the subtracter 1 is reverse to the first input of the variable length encoding means 5c through the DCT means 2 and the quantizer 3. The quantizer 6 is supplied.
[0196]
The output of the inverse quantizer 6 is given to the first input of the adder 8 through the inverse DCT means 7. The output of the adder 8 is given to the first input of the memory 9, and the output of the memory 9 is given to the first input of the predicted image creation means 10 and the first input of the motion detection means 11.
[0197]
An external input signal is given to the second input of the motion detecting means 11, and the output of the motion detecting means 11 is given to the second input of the predicted image creating means 10 and the motion vector predictor 12. The output of the predicted image creating means 10 is given to the second input of the subtracter 1 and the second input of the adder 8.
[0198]
The output of the motion vector predictor 12 is given to the second input of the variable length encoding means 5c.
[0199]
The first output of the variable length coding means 5 c is given to the first input of the transmission buffer 103, and the second output of the variable length coding means 5 c is given to the input of the code amount control means 102.
[0200]
The output of the fixed code output means 104 (fixed code) is given to the second input of the transmission buffer 103, and the first output of the code amount control means 102 is given to the third input of the transmission buffer 103. The second output of the code amount control means 102 is given to the second input of the memory 9.
[0201]
The output of the transmission buffer 103 is output (transmitted) as a bit stream.
The output (transmitted) bit stream is received and decoded by the decoding device.
[0202]
Next, the operation will be described.
The seventh embodiment is different from the sixth embodiment in that the variable length coding means 5c and the fixed code output means 104 output a fixed code to the transmission buffer 103. That is, the code amount control means 102, as in the sixth embodiment, outputs the variable length coding means 5c or the fixed code output means 104 based on the code amount of the code output from the variable length coding means 5c. Which one of the outputs (fixed codes) is selected is determined for each macroblock, and control is performed so that the selected one is accumulated in the transmission buffer 103.
[0203]
In the first to seventh embodiments, the read rate of the transmission buffer 103 is R when setting the maximum code amount Tmax for each VOP. However, the read rate is not a fixed rate and the rate is variable. Even in this case, it is possible to set Tmax in a similar manner so that overflow of the transmission buffer 103 or underflow of the VBV buffer does not occur.
[0204]
When the reading rate of the transmission buffer 103 is variable, for example, the maximum rate to be transmitted is determined, and the type of information to be transmitted within the maximum rate (for example, video and audio) This corresponds to the case where the transmission rate is assigned depending on the type).
[0205]
In this case as well, by selecting and storing the output of the encoding means for encoding each macroblock and the fixed code determined for each VOP encoding type based on the flowcharts of FIGS. The code amount of each VOP can be controlled to be equal to or less than the maximum code amount Tmax.
[0206]
In the first to seventh embodiments, the MPEG4 data partition and the H.264 format are used. Although the case of H.263 has been described as an example, the code amount control can be performed with the same configuration as described above even in the case of not being a data partition or in the case of MPEG2.
[0207]
Furthermore, it goes without saying that the present invention can also be applied when the input signal is not 4: 2: 0 or when the VOP (unit image) is not rectangular (for example, any shape that the object can take on the screen).
[0208]
【The invention's effect】
Since the present invention is configured as described above, the following effects can be obtained.
[0209]
【The invention's effect】
  The encoding device according to the present invention is:An external input signal input for each unit image is divided into a plurality of macro blocks, the external input signal is encoded in units of macro blocks, and a video packet including one or more macro block codes generated by encoding is An encoding device for output, wherein the external input signal is inter-coded or intra-coded in units of macroblocks, encoding means for outputting a code generated by inter-coding or intra-coding, and unit images When the encoding is inter-encoding or intra-encoding, fixed code output means for outputting a fixed code corresponding to each encoding type and code output from the encoding means, or fixed code means Storage means for storing the fixed code output from the code, the code output from the encoding means, or the output from the fixed encoding output means Code amount control means for controlling the code amount of the code to be stored in the storage means by selecting any one of the fixed codes to be stored, and the code amount control means includes the code amount mb_bit of the code of the current macroblock, the unit image Code amount Sc from the first macroblock of the current macroblock to the macroblock immediately before the current macroblock, maximum code amount Tmax set so that the storage means does not overflow or the VBV buffer does not underflow, unit The number M of macroblocks to be processed subsequent to the current macroblock in the image, the code length L of the fixed code output by the fixed code output means for each macroblock, determined by the coding type, and the current macroblock and the subsequent ones in the unit image The relationship between the total code amount α of the additional code in units of video packets generated in
Sc + mb_bit + M × L + α> Tmax
(However, α ≧ 0)
In this case, since the control is performed so as to select the fixed code output by the fixed code output unit, the code amount of the unit image can be controlled to be equal to or less than the maximum code amount Tmax.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a first embodiment of the present invention.
FIG. 2 is an explanatory diagram showing states of a temporary buffer and a transmission buffer (in the case of I-VOP) in Embodiment 1 of the present invention.
FIG. 3 is an explanatory diagram showing states of a temporary buffer and a transmission buffer (in the case of P-VOP) in Embodiment 1 of the present invention.
FIG. 4 is a flowchart (in the case of P-VOP) showing Embodiment 1 of the present invention.
FIG. 5 is a flowchart (in the case of I-VOP) showing Embodiment 1 of the present invention.
FIG. 6 is a flowchart (in the case of P-VOP) showing a second embodiment of the present invention.
FIG. 7 is a flowchart (in the case of I-VOP) showing a second embodiment of the present invention.
FIG. 8 is a flowchart showing Embodiment 3 of the present invention.
FIG. 9 is a flowchart showing Embodiment 4 of the present invention.
FIG. 10 is a block diagram showing a fifth embodiment of the present invention.
FIG. 11 is an explanatory diagram showing a state of a temporary buffer according to a fifth embodiment of the present invention.
FIG. 12 is a block diagram showing a sixth embodiment of the present invention.
FIG. 13 is an explanatory diagram showing a state of a transmission buffer according to Embodiment 7 of the present invention.
FIG. 14 is a block diagram showing Embodiment 7 of the present invention.
FIG. 15 is a block diagram showing a conventional encoding device.
FIG. 16 is an explanatory diagram showing an input signal to a conventional encoding device.
FIG. 17 is an explanatory diagram illustrating a configuration of a bit stream in a conventional encoding device.
FIG. 18 is an explanatory diagram showing a position of a video packet on a screen in a conventional encoding device.
FIG. 19 is an explanatory diagram showing DC / AC prediction in a conventional encoding device.
[Explanation of symbols]
5a, 5b, 5c Variable length encoding means, 101 Temporary buffer, 102 Code amount control means, 103 Transmission buffer, 104 Fixed code output means

Claims (18)

単位画像毎に入力される外部入力信号を複数のマクロブロックに分割し、当該マクロブロック単位で当該外部入力信号を符号化し、当該符号化により生成された一以上の前記マクロブロックの符号から構成されるビデオパケットを出力する符号化装置であって、
前記マクロブロック単位前記外部入力信号をインター符号化、又はイントラ符号化し、当該インター符号化、又はイントラ符号化により生成される符号を出力する符号化手段と、
前記単位画像における符号化がインター符号化の場合、又はイントラ符号化の場合、それぞれの符号化タイプの場合に対応する固定符号を出力する固定符号出力手段と、
前記符号化手段から出力される前記符号又は前記固定符号手段から出力される前記固定符号を蓄積する蓄積手段と、
前記符号化手段から出力される前記符号、又は前記固定符号化出力手段から出力される前記固定符号のいずれか一方を選択して前記蓄積手段に蓄積させる符号の符号量を制御する符号量制御手段と
を備え、
前記符号量制御手段は、現マクロブロックの符号の符号量mb_bit、前記単位画像の先頭のマクロブロックから現マクロブロックの一つ前のマクロブロックまでの符号の符号量Sc、前記蓄積手段がオーバーフローしないように、又はVBVバッファがアンダーフローしないように設定される最大符号量Tmax、前記単位画像において現マクロブロックに続いて処理されるべきマクロブロック数M、前記符号化タイプにより決まる、各マクロブロックに対して前記固定符号出力手段が出力する前記固定符号の符号長L、前記単位画像において前記現マクロブロック以降で発生する前記ビデオパケット単位の付加的な符号の総符号量αの間の関係が、
Sc+mb_bit+M×L+α>Tmax
(ただし、α≧0)
である場合に、前記固定符号出力手段が出力する前記固定符号を選択するよう制御すること
を特徴とする符号化装置。
The external input signal input for each unit image is divided into a plurality of macro blocks, the external input signal is encoded in units of the macro block, and is configured from one or more macro block codes generated by the encoding. An encoding device for outputting a video packet comprising:
The macro-block inter coding said external input signal in, or intra-coding, and coding means for outputting codes generated by the inter coding, or intra-
In the case where the encoding in the unit image is inter encoding or in the case of intra encoding, fixed code output means for outputting a fixed code corresponding to each encoding type;
Means for storing said fixed code output from the code, or the fixed code means output from said encoding means,
Code amount control means for controlling the code amount of the code to be selected and stored in the storage means by selecting either the code output from the encoding means or the fixed code output from the fixed encoding output means When
With
The code amount control means includes the code amount mb_bit of the code of the current macroblock, the code amount Sc of the code from the first macroblock of the unit image to the macroblock immediately before the current macroblock, and the storage means does not overflow Or the maximum code amount Tmax set so that the VBV buffer does not underflow, the number M of macroblocks to be processed subsequent to the current macroblock in the unit image, and each macroblock determined by the coding type On the other hand, the relationship between the code length L of the fixed code output by the fixed code output means, and the total code amount α of the additional code in units of video packets generated after the current macroblock in the unit image,
Sc + mb_bit + M × L + α> Tmax
(However, α ≧ 0)
Control to select the fixed code output by the fixed code output means
An encoding device characterized by the above.
符号量制御手段は、The code amount control means
現マクロブロックの一つ前のマクロブロックにおいて、In the macroblock immediately before the current macroblock,
固定符号出力手段から出力される固定符号が選択されている場合は、現マクロブロックにおいても前記固定符号出力手段から出力される前記固定符号を選択し、If the fixed code output from the fixed code output means is selected, select the fixed code output from the fixed code output means also in the current macroblock,
前記固定符号出力手段から出力される前記固定符号が選択されていない場合は、When the fixed code output from the fixed code output means is not selected,
Sc+mb_bit+M×L+α>TmaxSc + mb_bit + M × L + α> Tmax
なる関係の判定を行うよう制御することControl to determine the relationship
を特徴とする請求項1に記載の符号化装置。The encoding device according to claim 1.
符号量制御手段は、The code amount control means
現マクロブロックにおいて固定符号出力手段から出力される固定符号が選択されている場合、単位画像において前記現マクロブロックに続いて処理されるべきM個のマクロブロックに対しても、前記固定符号出力手段から出力される前記固定符号を選択するよう制御することWhen the fixed code output from the fixed code output means is selected in the current macroblock, the fixed code output means is also applied to M macroblocks to be processed following the current macroblock in the unit image. Controlling to select the fixed code output from
を特徴とする請求項1又は2に記載の符号化装置。The encoding apparatus according to claim 1 or 2, wherein
固定符号出力手段から出力される固定符号は、The fixed code output from the fixed code output means is
それぞれの符号化タイプにおいて、マクロブロックの符号の符号量として最小となる符号であることIn each encoding type, the code must be the smallest code amount of the macroblock code
を特徴とする請求項1から3のいずれか1項に記載の符号化装置。The encoding device according to any one of claims 1 to 3, wherein:
符号量制御手段は、The code amount control means
Sc+mb_bit+M×L+α>TmaxSc + mb_bit + M × L + α> Tmax
なる関係がなりたち、かつ、単位画像における符号化タイプがイントラ符号化であり、かAnd the coding type in the unit image is intra coding. つ、現マクロブロックの一つ前のマクロブロックにおいて符号化手段から出力される符号を選択している場合に、当該現マクロブロックから新しいビデオパケットを構成するよう制御することSecond, when the code output from the encoding means is selected in the macroblock immediately before the current macroblock, control is performed so as to form a new video packet from the current macroblock.
を特徴とする請求項1から4のいずれか1項に記載の符号化装置。The encoding device according to any one of claims 1 to 4, wherein:
符号量制御手段は、蓄積手段がオーバーフローしないように、以下の式を満たす最大符号量Tmaxを設定することThe code amount control means sets a maximum code amount Tmax that satisfies the following expression so that the storage means does not overflow.
を特徴とする請求項1から5のいずれか1項に記載の符号化装置。The encoding device according to any one of claims 1 to 5, wherein:
Tmax≦Bs−BTmax ≦ Bs−B
ただし、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.
符号量制御手段は、VBVバッファがアンダーフローしないように、以下の式を満たす最大符号量Tmaxを設定することThe code amount control means sets the maximum code amount Tmax satisfying the following expression so that the VBV buffer does not underflow.
を特徴とする請求項1から5のいずれか1項に記載の符号化装置。The encoding device according to any one of claims 1 to 5, wherein:
Tmax≦vbv_bits+RpTmax ≦ vbv_bits + Rp
ここに、Rp=R/FWhere Rp = R / F
ただし、Tmaxは最大符号量、Rpは単位画像における蓄積手段から読み出されるビット数、Rは前記蓄積手段から読み出されるビットレート、Fは単位画像における符号化のレート、vbv_bitsは直前の単位画像における前記VBVバッファの占有量である。Where Tmax is the maximum code amount, Rp is the number of bits read from the storage means in the unit image, R is the bit rate read from the storage means, F is the encoding rate in the unit image, and vbv_bits is the above-mentioned unit image in the previous unit image. This is the VBV buffer occupation amount.
符号量制御手段は、蓄積手段がオーバーフローしないように、かつ、VBVバッファがアンダーフローしないように、以下の式を満たす最大符号量Tmaxを設定することThe code amount control means sets a maximum code amount Tmax that satisfies the following expression so that the storage means does not overflow and the VBV buffer does not underflow.
を特徴とする請求項1から5のいずれか1項に記載の符号化装置。The encoding device according to any one of claims 1 to 5, wherein:
Tmax≦min(vbv_bits+Rp,Bs−B)Tmax ≦ min (vbv_bits + Rp, Bs−B)
ここに、Rp=R/FWhere Rp = R / F
ただし、Tmaxは最大符号量、Rpは単位画像における前記蓄積手段から読み出されるビット数、Rは前記蓄積手段から読み出されるビットレート、Fは単位画像における符号化のレート、vbv_bitsは直前の単位画像における前記VBVバッファの占有量、Bsは前記蓄積手段の容量、及びBは前記蓄積手段における占有量であり、min(a,b)は、aまたはbのいずれか小さい方をその値とすることを示す。Where Tmax is the maximum code amount, Rp is the number of bits read from the storage means in the unit image, R is the bit rate read from the storage means, F is the encoding rate in the unit image, and vbv_bits is in the previous unit image. The occupancy of the VBV buffer, Bs is the capacity of the storage means, B is the occupancy of the storage means, and min (a, b) is set to the smaller one of a and b. Show.
蓄積手段から読み出されるビットレートRが可変であることThe bit rate R read from the storage means is variable.
を特徴とする請求項7又は8に記載の符号化装置。The encoding device according to claim 7 or 8, characterized in that:
単位画像毎に入力される外部入力信号を複数のマクロブロックに分割し、当該マクロブロック単位で当該外部入力信号を符号化し、当該符号化により生成された一以上の前記マクロブロックの符号から構成されるビデオパケットを出力する符号化方法であって、The external input signal input for each unit image is divided into a plurality of macroblocks, the external input signal is encoded in units of the macroblock, and is composed of one or more macroblock codes generated by the encoding. An encoding method for outputting a video packet comprising:
前記マクロブロック単位で前記外部入力信号をインター符号化、又はイントラ符号化し、当該インター符号化、又はイントラ符号化により生成される符号を出力する符号化ステップと、An encoding step of inter-coding or intra-coding the external input signal in units of the macroblock, and outputting a code generated by the inter-coding or intra-coding;
前記単位画像における符号化がインター符号化の場合、又はイントラ符号化の場合、それぞれの符号化タイプの場合に対応する固定符号を出力する固定符号出力ステップと、When the coding in the unit image is inter coding or intra coding, a fixed code output step for outputting a fixed code corresponding to each coding type; and
前記符号化ステップから出力される前記符号、又は前記固定符号ステップから出力される前記固定符号を蓄積する蓄積ステップと、An accumulation step of accumulating the code output from the encoding step or the fixed code output from the fixed code step;
前記符号化ステップから出力される前記符号、又は前記固定符号化出力ステップから出力される前記固定符号のいずれか一方を選択して前記蓄積ステップにおいて蓄積させることにより、当該蓄積される符号から構成され、前記蓄積ステップから出力されるビデオパケットの符号量を制御する符号量制御ステップとBy selecting either the code output from the encoding step or the fixed code output from the fixed encoding output step and storing it in the storage step, the code is stored. A code amount control step for controlling the code amount of the video packet output from the storage step;
を備え、With
前記符号量制御ステップは、現マクロブロックの符号の符号量mb_bit、前記単位画像の先頭のマクロブロックから現マクロブロックの一つ前のマクロブロックまでの符号The code amount control step includes the code amount mb_bit of the code of the current macroblock, the code from the first macroblock of the unit image to the macroblock immediately before the current macroblock. の符号量Sc、前記蓄積ステップにおいてオーバーフローが発生しないように、又はVBVバッファがアンダーフローしないように設定される最大符号量Tmax、前記単位画像を構成する現マクロブロックに続いて処理されるべきマクロブロック数M、前期符号化タイプにより決まる、各マクロブロックに対して前記固定符号出力ステップが出力する前記固定符号の符号長L、前記単位画像において前記現マクロブロック以降で発生する前記ビデオパケット単位の付加的な符号の総符号量αの間の関係が、Code amount Sc, the maximum code amount Tmax set so that overflow does not occur in the accumulation step, or the VBV buffer does not underflow, and the macro to be processed following the current macroblock constituting the unit image The number M of blocks, the code length L of the fixed code output by the fixed code output step for each macroblock determined by the previous coding type, the unit of video packets generated after the current macroblock in the unit image The relationship between the total code amount α of the additional codes is
Sc+mb_bit+M×L+α>TmaxSc + mb_bit + M × L + α> Tmax
(ただし、α≧0)(However, α ≧ 0)
である場合に、前記固定符号出力ステップが出力する前記固定符号を選択するよう制御することControl to select the fixed code output by the fixed code output step
を特徴とする符号化方法。An encoding method characterized by the above.
符号量制御ステップは、The code amount control step is:
現マクロブロックの一つ前のマクロブロックにおいて、In the macroblock immediately before the current macroblock,
固定符号出力ステップから出力される固定符号が選択されている場合は、現マクロブロックにおいても前記固定符号出力ステップから出力される前記固定符号を選択し、If the fixed code output from the fixed code output step is selected, select the fixed code output from the fixed code output step also in the current macroblock,
前記固定符号出力ステップから出力される前記固定符号が選択されていない場合は、When the fixed code output from the fixed code output step is not selected,
Sc+mb_bit+M×L+α>TmaxSc + mb_bit + M × L + α> Tmax
なる関係の判定を行うよう制御することControl to determine the relationship
を特徴とする請求項10に記載の符号化方法。The encoding method according to claim 10.
符号量制御ステップは、The code amount control step is:
現マクロブロックにおいて固定符号出力ステップから出力される固定符号が選択されている場合、単位画像において前記現マクロブロックに続いて処理されるべきM個のマクロブロックに対しても、前記固定符号出力ステップから出力される前記固定符号を選択するよう制御することWhen the fixed code output from the fixed code output step is selected in the current macroblock, the fixed code output step is also performed for M macroblocks to be processed following the current macroblock in the unit image. Controlling to select the fixed code output from
を特徴とする請求項10又は11に記載の符号化方法。12. The encoding method according to claim 10 or 11, wherein:
固定符号出力ステップから出力される固定符号は、The fixed code output from the fixed code output step is
それぞれの符号化タイプにおいて、マクロブロックの符号の符号量として最小となる符号であることIn each encoding type, the code must be the smallest code amount of the macroblock code
を特徴とする請求項10から12のいずれか1項に記載の符号化方法。The encoding method according to any one of claims 10 to 12, wherein:
符号量制御ステップは、The code amount control step is:
Sc+mb_bit+M×L+α>TmaxSc + mb_bit + M × L + α> Tmax
なる関係がなりたち、かつ、単位画像における符号化タイプがイントラ符号化であり、かつ、現マクロブロックの一つ前のマクロブロックにおいて符号化ステップから出力される符号を選択している場合に、当該現マクロブロックから新しいビデオパケットを構成するよう制御することAnd when the encoding type in the unit image is intra encoding and the code output from the encoding step in the macroblock immediately before the current macroblock is selected, Control to construct a new video packet from the current macroblock
を特徴とする請求項10から13のいずれか1項に記載の符号化方法。The encoding method according to claim 10, wherein:
符号量制御ステップは、蓄積ステップにおいてオーバーフローが発生しないように、以下の式を満たす最大符号量Tmaxを設定することIn the code amount control step, a maximum code amount Tmax satisfying the following expression is set so that an overflow does not occur in the accumulation step.
を特徴とする請求項10から14のいずれか1項に記載の符号化方法。15. The encoding method according to any one of claims 10 to 14, wherein:
Tmax≦Bs−BTmax ≦ Bs−B
ただし、Tmaxは最大符号量、Bsは前記蓄積ステップの容量、及びBは前記蓄積ステップにおける占有量である。However, Tmax is the maximum code amount, Bs is the capacity of the accumulation step, and B is the occupation amount in the accumulation step.
符号量制御ステップは、VBVバッファがアンダーフローしないように、以下の式を満たす最大符号量Tmaxを設定することThe code amount control step sets a maximum code amount Tmax that satisfies the following expression so that the VBV buffer does not underflow.
を特徴とする請求項10から14のいずれか1項に記載の符号化方法。15. The encoding method according to any one of claims 10 to 14, wherein:
Tmax≦vbv_bits+RpTmax ≦ vbv_bits + Rp
ここに、Rp=R/FWhere Rp = R / F
ただし、Tmaxは最大符号量、Rpは単位画像における蓄積ステップから読み出されるビット数、Rは前記蓄積ステップから読み出されるビットレート、Fは単位画像における符号化のレート、vbv_bitsは直前の単位画像における前記VBVバッファの占Where Tmax is the maximum code amount, Rp is the number of bits read from the storage step in the unit image, R is the bit rate read from the storage step, F is the encoding rate in the unit image, and vbv_bits is the previous unit image in the unit image. VBV buffer fortune-telling 有量である。It is substantial.
符号量制御ステップは、蓄積ステップにおいてオーバーフローが発生しないように、かつ、VBVバッファがアンダーフローないように、以下の式を満たす最小符号量Tminを設定することThe code amount control step sets a minimum code amount Tmin that satisfies the following expression so that an overflow does not occur in the accumulation step and the VBV buffer does not underflow.
以下の式を満たすように最大符号量Tmaxを設定することSet the maximum code amount Tmax to satisfy the following formula
を特徴とする請求項10から14のいずれか1項に記載の符号化方法。15. The encoding method according to any one of claims 10 to 14, wherein:
Tmax≦min(vbv_bits+Rp,Bs−B)Tmax ≦ min (vbv_bits + Rp, Bs−B)
ここに、Rp=R/FWhere Rp = R / F
ただし、Tmaxは最大符号量、Rpは単位画像における前記蓄積ステップから読み出されるビット数、Rは前記蓄積ステップから読み出されるビットレート、Fは単位画像における符号化のレート、vbv_bitsは直前の単位画像における前記VBVバッファの占有量、Bsは前記蓄積手段の容量、及びBは前記蓄積手段における占有量であり、min(a,b)は、aまたはbのいずれか小さい方をその値とすることを示す。Where Tmax is the maximum code amount, Rp is the number of bits read from the storage step in the unit image, R is the bit rate read from the storage step, F is the encoding rate in the unit image, and vbv_bits is in the previous unit image. The occupancy of the VBV buffer, Bs is the capacity of the storage means, B is the occupancy of the storage means, and min (a, b) is set to the smaller one of a and b. Show.
蓄積ステップから読み出されるビットレートRが可変であることThe bit rate R read from the accumulation step is variable.
を特徴とする請求項16又は17に記載の符号化方法。The encoding method according to claim 16 or 17, wherein:
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
JP2000127291 2000-04-27
JP2000-127291 2000-04-27
JP2001076059A JP3669281B2 (en) 2000-04-27 2001-03-16 Encoding apparatus and encoding method

Publications (3)

Publication Number Publication Date
JP2002016929A JP2002016929A (en) 2002-01-18
JP2002016929A5 JP2002016929A5 (en) 2005-04-14
JP3669281B2 true 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)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7200275B2 (en) 2001-12-17 2007-04-03 Microsoft Corporation Skip macroblock coding
US7092576B2 (en) * 2003-09-07 2006-08-15 Microsoft Corporation Bitplane coding for macroblock field/frame coding type 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
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
US8514711B2 (en) 2005-10-21 2013-08-20 Qualcomm Incorporated Reverse link lower layer assisted video error control
US8548048B2 (en) 2005-10-27 2013-10-01 Qualcomm Incorporated Video source rate control for video telephony
EP2109982B1 (en) 2007-01-10 2018-08-08 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
JP2014116835A (en) 2012-12-11 2014-06-26 Toshiba Corp Decoding device, encoding device, decoding method and encoding method
US9906239B1 (en) * 2017-06-28 2018-02-27 Ati Technologies Ulc GPU parallel huffman decoding

Also Published As

Publication number Publication date
JP2002016929A (en) 2002-01-18

Similar Documents

Publication Publication Date Title
US7433408B2 (en) Encoding system and encoding method
JP3662171B2 (en) Encoding apparatus and encoding method
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
JPWO2005076629A1 (en) Image coding apparatus and imaging apparatus
JP4799547B2 (en) Encoding method and encoding apparatus for picture sequence using predictive picture and non-predictive picture each including multi-macroblock
JPH09121358A (en) Picture coding/decoding device and its method
EP1879388A1 (en) Video information recording device, video information recording method, video information recording program, and recording medium containing the video information recording program
JP3669281B2 (en) Encoding apparatus and encoding method
EP0878967A2 (en) Signal coding apparatus and method
US6859877B2 (en) Image processing apparatus and method, and computer readable memory medium storing program for executing image processing
JP2002027469A (en) Bit stream converting method and device, and program recording medium
JP4224778B2 (en) STREAM CONVERTING APPARATUS AND METHOD, ENCODING APPARATUS AND METHOD, RECORDING MEDIUM, AND PROGRAM
JP3893350B2 (en) Encoded data conversion apparatus and method
JP4120934B2 (en) Image processing apparatus, image processing method, recording medium, and program
JP2000312363A (en) Conversion method for moving image encoding system and device therefor
JP2000312362A (en) Image encoding system conversion device and its method and recording medium
US6931069B2 (en) Coding device and coding method
JP2006262159A (en) Moving picture encoding device, control method thereof, computer program and storage medium
JP2002199408A (en) Moving image coding method and moving image coder
JP4718736B2 (en) Video encoding device
JP3669277B2 (en) Encoding apparatus and encoding method
JP3690259B2 (en) High-speed moving image encoding apparatus and high-speed moving image encoding method
JP2001148852A (en) Image information converter and image information conversion method
JP4264535B2 (en) Image processing apparatus and method, recording medium, and 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 (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080422

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090422

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100422

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100422

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110422

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120422

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120422

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130422

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130422

Year of fee payment: 8

FPAY Renewal fee payment (event 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