JP3866624B2 - Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus - Google Patents

Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus Download PDF

Info

Publication number
JP3866624B2
JP3866624B2 JP2002185661A JP2002185661A JP3866624B2 JP 3866624 B2 JP3866624 B2 JP 3866624B2 JP 2002185661 A JP2002185661 A JP 2002185661A JP 2002185661 A JP2002185661 A JP 2002185661A JP 3866624 B2 JP3866624 B2 JP 3866624B2
Authority
JP
Japan
Prior art keywords
prediction mode
inter
prediction
frame
image
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 - Lifetime
Application number
JP2002185661A
Other languages
Japanese (ja)
Other versions
JP2004032355A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2002185661A priority Critical patent/JP3866624B2/en
Publication of JP2004032355A publication Critical patent/JP2004032355A/en
Application granted granted Critical
Publication of JP3866624B2 publication Critical patent/JP3866624B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は,両方向フレーム間予測符号化方式を使った動画像符号化,復号化に関する技術であり,特にBピクチャのskipマクロブロックのフレーム間予測方法を適応的に変更させることにより,符号化効率を向上させることを可能とした動画像符号化方法,動画像復号方法,動画像符号化装置および動画像復号装置に関する。
【0002】
【従来の技術】
一般的に動画像符号化では,時間方向の相関を使って高い符号化効率を実現するため,フレーム間予測符号化を用いている。フレームの符号化モードには,フレーム間の相関を使わずに符号化するIフレームと,過去に符号化した1フレームから予測するPフレームと,過去に符号化した2フレームから予測することができるBフレームがある。特に,映像符号化方式H.263では,参照画像メモリに複数フレーム分の復号画像を蓄積しておき,そのメモリから参照画像を選択して予測することができる。
【0003】
また,Pフレームは過去に符号化したフレームから予測するが,Bフレームでは,過去に符号化した2フレームから予測することができる。参照フレームとして使用する2フレームのうち,より過去のフレームから予測する方法を前方向予測と呼び,より未来のフレームから予測する方法を後方向予測と呼ぶ。後方向フレーム間予測における参照フレームの表示時刻は,現フレームより未来であってもよい。この場合には,現フレームを表示した後に後方向フレーム予測の参照フレームを出力することになる。Bフレームで2フレームから予測する場合(両方向フレーム間予測)には,2フレームからの画像情報を補間して,1フレーム分の画像情報を作成して予測画像を作成する。
【0004】
図8(A1)に,後方向フレーム間予測における参照フレームの表示時刻が未来の場合の,動画像の予測関係の例を示す。第1フレームから第7フレームの符号化モードをIBBPBBPの順序で符号化する場合には,図8(A1)に示す予測関係があるため,実際に符号化する場合には,図8(A2)に示すように,▲1▼▲4▼▲2▼▲3▼▲7▼▲5▼▲6▼の順序でフレームを符号化する。
【0005】
図8(B1)に,後方向フレーム間予測における参照フレームの表示時刻が過去の場合の,動画像の予測関係の例を示す。第1フレームから第7フレームの符号化モードをIPBBPBBの順序で符号化する場合には,図8(B1)に示す予測関係があるため,実際に符号化する場合には,図8(B2)に示すように,▲1▼▲2▼▲4▼▲3▼▲5▼▲7▼▲6▼の順序でフレームを符号化する。
【0006】
さらに画像を分割した,例えばマクロブロックのような領域毎に,これらの符号化モードを指定することができる。映像符号化方式H.263では,Iフレーム内では,フレーム内画像情報のみを使って符号化するIマクロブロックのみある。Pフレーム内では,Iマクロブロックの他に過去に符号化した1フレームから予測するPマクロブロックがある。マクロブロック毎に参照する画像を変更することも可能である。Bフレーム内では,IマクロブロックとPマクロブロックの他にBマクロブロックがある。Bマクロブロックでは,Pマクロブロックと同様に過去に符号化した1フレームから予測する前方向予測モードまたは後方向予測モードと,2フレームから予測する両方向予測モードがある。
【0007】
両方向予測モードには,各フレーム内の参照位置を示す動きベクトルを符号化するbi−predictiveモードと符号化しないdirectモードがある。directモードでは,参照する未来のフレームにおける同一位置のマクロブロックの動きベクトルから前方向の動きベクトルと後方向の動きベクトルを算出する。
【0008】
図9に,後方向フレーム間予測における参照フレームの表示時刻が未来の場合の,directモードにおける動きベクトルの関係図を示す。図9において,P1とP2が既に符号化されたフレームであり,Pcが符号化対象フレームであるとする。PcとP1,P2間のマクロブロックの動きベクトルを,それぞれMVf ,MVb とした場合の動きベクトル算出式を式(1)に示す。MVs は,P1とP2間のマクロブロックの動きベクトルである。一般的に,N1にはフレームP1とPcの時間間隔を適用し,N2にはフレームPcとP2の時間間隔を適用し,DにはフレームP1とP2の時間間隔を適用する。
【0009】
MVf =MVs ×N1/D (1−1)
MVb =MVs ×N2/D (1−2)
この式(1)に従って動きベクトルを算出するため,directモードでは動きベクトルを符号化しない。
【0010】
また,マクロブロックの動きベクトルを符号化する際には,周囲のマクロブロックの動きベクトルからの差分を符号化する方法がある。例えば映像符号化方式H.263では,左と上と右上のマクロブロックの動きベクトル(MV1,MV2,MV3)から,式(2)によって予測動きベクトルPMVを作成し,PMVとの差分を符号化する。なお,Median(a,b,c)は,値a,b,cのうちで中間となる値を求める。
【0011】
PMV=Median(MV1,MV2,MV3) (2)
この方法によれば,周囲のマクロブロックの動きベクトルからの変化が少ない場合に,より符号化効率良く動きベクトルを符号化することができる。
【0012】
また,符号化データがないマクロブロックをskipマクロブロックと呼ぶ。映像符号化方式H.263では,Pフレーム内のskipマクロブロックは,動きベクトルが0であり予測誤差を持たない。したがって,参照フレームの同一位置の画像を復号画像とする。
【0013】
Bフレーム内のskipマクロブロックは,動きベクトルをdirectモードと同じ方法で求め予測誤差を持たない。したがって,式(1)によって計算される動きベクトル位置の画像情報を補間して求めた画像を復号画像とする。
【0014】
一般的にマクロブロック毎にskipマクロブロックかどうか,イントラ符号化するかどうかの情報やフレーム間予測方法を示す符号化モード情報を符号化する。H.263ではskipマクロブロックかどうかを示す1ビットのCOD符号化モード情報を符号化し,skipでない場合には,さらにイントラ符号化するかどうかやフレーム間予測方法等を示すMCBPC符号化モード情報を符号化する。したがって,skipマクロブロックの場合には,フレーム間予測方法を示す情報と動きベクトルと予測誤差を符号化しない。映像符号化方式H.264ではskipマクロブロックはCOD符号化モード情報を符号化するのではなく,連続するskipマクロブロックの数をランレングス符号化する。
【0015】
【発明が解決しようとする課題】
Bフレームのdirectモードは,図9に示すように後のPフレームの動きベクトルから求めるため,3フレーム間で一定速度の動きがある場合に有効である。すなわち,カメラが一定速度で平行移動して撮影した動画像の場合には,directモードによる動きベクトルで予測誤差を大きく低減することができる。予測誤差がない場合には,skipマクロブロックとして符号化することができる。skipマクロブロックはCOD情報で符号化したり,ランレングス符号化されるため,Bフレーム全体として符号化効率を向上することができる。
【0016】
しかし,3フレーム間で動きが一定しない場合には,directモードによる動きベクトルでは予測誤差を低減することができない。そのためskipマクロブロックも発生せず,符号化効率を低減することができない。
【0017】
本発明は,上記の点に鑑み,3フレーム間で動きが一定しないためdirectモードによる動きベクトルでは予測誤差を低減することができない場合にも,ある特定の条件のもとにskipマクロブロック(またはブロック)を発生させ,skipマクロブロックのフレーム間予測モードをdirect以外に設定することを可能とし,隣接領域同士で画像内容に相関があることを利用して,符号化効率を向上させることを目的とする。
【0018】
【課題を解決するための手段】
上記の課題を解決するため,本発明は以下の方法を用いる。
【0019】
発明は,入力画像を領域に分割し,両方向フレーム間予測符号化方式または前方向フレーム間予測符号化方式または後方向フレーム間予測符号化方式を使って画像情報を符号化する動画像符号化方法において,現領域をフレーム間予測モード符号化データと動きベクトル符号化データと予測誤差符号化データを持たないスキップ領域として符号化する場合に,隣接領域のフレーム間予測モードとして前方向予測モードを使っている領域と後方向フレーム間予測方式を使っている領域とがある場合には,現領域のフレーム間予測モードを両方向予測モードに設定し,隣接領域のフレーム間予測モードとして後方向予測モードを使っている領域がない場合には,現領域のフレーム間予測モードを前方向予測モードに設定し,隣接領域のフレーム間予測モードとして前方向予測モードを使っている領域がない場合には,現領域のフレーム間予測モードを後方向予測モードに設定し,前記設定された現領域のフレーム間予測モードに基づいて決定された参照画像から予測画像を求めて現領域の画像を符号化した場合の符号化コストの評価値を算出し,その評価値によって現領域をスキップ領域として符号化するか否かを決定することを特徴とする。
【0021】
発明によれば,skipマクロブロックのようにフレーム間予測モードを符号化しない場合であっても,隣接する領域のフレーム間予測モードが予め設定した条件に従って,現領域のフレーム間予測モードを変更することができる。例えば次の2種類の条件が挙げられる。これらを組み合わせても良い。
[条件a]左,左上,上,右上の4隣接領域のフレーム間予測モードのうち,最も多いモードを現領域にも適用する。
[条件b]左,左上,上,右上の4隣接に特定のフレーム間予測モードの領域がある場合には,それと同じモードを現領域にも適用する。
【0022】
さらに,前方向予測と後方向予測と両方向予測において,周囲のマクロブロックの動きベクトルからの差分を符号化する方法が適用される場合には,skipマクロブロックの動きベクトルとして,0ベクトルと適用することも可能であり,あるいは式(2)から計算されるPMVを適用することも可能である。
【0023】
隣接領域同士で画像内容に相関がある場合には,同じフレーム間予測モードで符号化効率が高くなる傾向がある。したがって従来,Bピクチャをはさむ3フレーム間で動きが一定しない場合には,directモードによる動きベクトルでは予測誤差を低減することができない場合においても,skipマクロブロックのフレーム間予測モードをdirect以外に設定することが可能となり,符号化効率を向上することができる。
【0024】
また,上記発明において,両方向フレーム間予測符号化時に,動きベクトルを符号化しないdirectモードと,前方向と後方向の動きベクトルを符号化するbi−predictiveモードとを区別して,現領域のフレーム間予測方法を決定するようにしてもよい。
【0025】
このようにすれば,skipマクロブロックのようにフレーム間予測モードを符号化しない場合において,そのフレーム間予測モードを隣接領域のフレーム間予測モードから求める際に,両方向予測として,directモードとbi−predictiveモードのいずれかをさらに区別することができる。directモードの場合には,動きベクトルを式(1)に従って求め,bi−predictiveモードの場合には,式(2)に従って求めるPMVかあるいは0ベクトルを適用することができる。
【0026】
これにより,両方向予測モードの場合にさらに細かなフレーム間予測モードの変更を行うことができる。
【0027】
また,上記発明において,現領域をフレーム間予測モード符号化データと動きベクトル符号化データと予測誤差符号化データを持たない領域として符号化する場合に,現領域をさらに分割した再分割領域毎に,隣接した再分割領域のフレーム間予測方法が予め設定した条件を満たすかどうかに従って,現領域の再分割領域のフレーム間予測方法を変更するような実施も可能である。
【0028】
このようにすれば,skipマクロブロックのようにフレーム間予測モードと動きベクトルと予測誤差を符号化しない場合において,ブロック等のさらに小さく分割した単位毎に,フレーム間予測モードを変更することができる。これにより,マクロブロックよりもさらに細かな単位でフレーム間予測モードの変更を行うことできる。
【0029】
また,本発明による画像復号方法は,画像を分割した領域毎に,両方向フレーム間予測符号化方式または前方向フレーム間予測符号化方式または後方向フレーム間予測符号化方式を使って画像情報を復号する動画像復号方法において,現領域をフレーム間予測モード符号化データと動きベクトル符号化データと予測誤差符号化データを持たないスキップ領域として復号する場合に,隣接領域のフレーム間予測モードとして前方向予測モードを使っている領域と後方向フレーム間予測方式を使っている領域とがある場合には,現領域のフレーム間予測モードを両方向予測モードに設定し,隣接領域のフレーム間予測モードとして後方向予測モードを使っている領域がない場合には,現領域のフレーム間予測モードを前方向予測モードに設定し,隣接領域のフレーム間予測モードとして前方向予測モードを使っている領域がない場合には,現領域のフレーム間予測モードを後方向予測モードに設定し,前記設定された現領域のフレーム間予測モードに基づいて参照画像を決定し,その参照画像から予測画像を求めて現領域の画像を復号することを特徴とする。
【0031】
また,上記発明において,両方向フレーム間予測復号時に,動きベクトルを復号しないdirectモードと,前方向と後方向の動きベクトルを復号するbi−predictiveモードとを区別して,現領域のフレーム間予測方法を決定するようにしてもよい
【0032】
さらに,上記発明において,現領域をフレーム間予測モード符号化データと動きベクトル符号化データと予測誤差符号化データを持たない領域として復号する場合に,現領域をさらに分割した再分割領域毎に,隣接した再分割領域のフレーム間予測方法が予め設定した条件を満たすかどうかに従って,現領域の再分割領域のフレーム間予測方法を変更するような実施も可能である
【0033】
【発明の実施の形態】
図面を用いて,本発明の実施の形態を説明する。
【0034】
第1の実施の形態では,Bピクチャについてマクロブロック単位に両方向予測と前方向予測と後方向予測とを切り替えて符号化するものとする。ここで両方向予測とは,directモードを指すものとする。
【0035】
まず,符号化装置の説明を行う。図1に,第1の実施の形態に係る画像符号化装置の概要を示す。この画像符号化装置は,画像入力部101,動き探索/符号化モード判定部102,Skip予測モード判定部103,予測モード蓄積部104,動きベクトル蓄積部105,参照画像メモリ106,DirectMC部107,ForwardMC部108,BackwardMC部109,予測誤差符号化/量子化部110,復号部111,スイッチ部112〜114を備える。
【0036】
ForwardMC部108では,前方向予測を行って予測画像を求め,BackwardMC部109では,後方向予測を行って予測画像を求め,DirectMC部107では,両方向予測を行って予測画像を求めるものとする。DirectMC部107にてdirectモードに使用する動きベクトルは,動きベクトル蓄積部105に蓄積されているものとする。
【0037】
Skip予測モード判定部103では,予測モード蓄積部104に蓄積された左,左上,上,右上のマクロブロックの予測モードから,動き探索/符号化モード判定部102において,現在のマクロブロックをskipマクロブロックとするときの予測モードを決定する。決定するフローを図2に示す。
【0038】
まず,現在のマクロブロックの左,左上,上,右上のいずれかにdirectマクロブロックがあるかどうかを判定する(ステップS1)。directマクロブロックがあれば,skipマクロブロックの予測モードをdirectモードと決定する(ステップS2)。
【0039】
左,左上,上,右上にdirectマクロブロックがない場合,左,左上,上,右上における前方向予測マクロブロック数Nf と,後方向予測マクロブロック数Nb とをカウントし(ステップS3),前方向予測マクロブロック数Nf と,後方向予測マクロブロック数Nb との大小を比較する(ステップS4)。
【0040】
マクロブロック数Nf とNb とが等しい場合,skipマクロブロックの予測モードをdirectモードと決定する(ステップS2)。
【0041】
マクロブロック数Nf がNb より大きい場合,skipマクロブロックの予測モードを前方向予測モードと決定する(ステップS5)。
【0042】
マクロブロック数Nf がNb より小さい場合,skipマクロブロックの予測モードを後方向予測モードと決定する(ステップS6)。
【0043】
図3に,本実施の形態に係る動き探索/符号化モード判定部102の動作フローを示す。動き探索/符号化モード判定部102では,前方向予測のための動き探索(ステップS10)と後方向予測のための動き探索(ステップS11)を行う。動き探索では,予測誤差と動きベクトルの符号量を式(3)を使って評価し,最も値が小さくなる位置を,その予測方法における動きベクトルとして決定するものとする。動きベクトルは式(2)を使って求められる差分を符号化するものとする。
【0044】
さらに,directモードと前方向予測と後方向予測に関する式(3)の評価値Dmbを比較し,値が最も小さい場合を使用する予測モードPMとして決定する(ステップS12)。決定された予測モードPMが,Skip予測モード判定部103でskipマクロブロックに適用すると決定された予測モードと同じである場合には,式(3)で得られる評価値が式(4)を満たすかどうかをチェックし(ステップS13),満たす場合には,現マクロブロックをskipとし(ステップS14),満たさない場合には,skipに設定しない(ステップS15)。
【0045】
なお,式(3)におけるAとBは量子化スケールに依存して変化する値であり,pは画素を示し,e[p]は画素pにおける予測誤差を示し,b(MV)は動きベクトルMVの符号量を示す。動きベクトルMVは,前方向予測の動きベクトルまたは後方向予測の動きベクトルを示す。式(4)におけるTHskipは予め設定した定数である。
【0046】
Dmb=A*Σ|e[p]|+B*|b(MV)| (3)
(ただし,Σはマクロブロック内の全画素pについての和を示す)
Dmb≦THskip (4)
予測モードの符号化方法は,次の通りとする。まず,skipかどうかを示すCOD情報(1ビット)があり,skipの場合には1に設定し,それのみとする。skipでない場合には0に設定し,続いて前方向予測か後方向予測か両方向予測かを示す情報(2ビット)を符号化する。01の場合には前方向予測を示し,10の場合には後方向予測を示し,11の場合には両方向予測を示すものとする。
【0047】
このような前提で現マクロブロックは,次のように符号化される。まず,Skip予測モード判定部103でskipマクロブロックの予測モードを決定する。続いて動き探索/符号化モード判定部102で予測モードを決定する。同時に前方向予測と後方向予測の場合には,動きベクトルも求める。また,決定された予測モードがskipマクロブロックの予測モードである場合には,そのマクロブロックをskipとするかどうかを決定する。決定した予測モードは予測モード蓄積部104に蓄積する。
【0048】
続いてスイッチ部112,113を切り替え,前方向予測と判定された場合にはForwardMC部108にて予測画像を求め,後方向予測と判定された場合にはBackwardMC部109にて予測画像を求め,directモードと判定された場合にはDirectMC部107にて予測画像を求める。ここでskipの場合には,式(2)で差分を0とした場合の動きベクトルを使用する。
【0049】
続いてskipではない場合には,スイッチ部113を通して予測画像を予測誤差符号化/量子化部110へ送り,予測誤差符号化/量子化部110で現画像と予測画像との間で予測誤差を求めて符号化し量子化する。
【0050】
復号部111では,skipではない場合には,予測誤差を逆量子化して復号し,ForwardMC部108またはBackwardMC部109またはDirectMC部107にて得られた予測画像を使って復号画像を求める。skipの場合には,ForwardMC部108またはBackwardMC部109またはDirectMC部107にて得られた予測画像を復号画像とする。復号画像を参照画像メモリ106に蓄積する。前方向予測と後方向予測の場合には,動きベクトルを動きベクトル蓄積部105に蓄積する。
【0051】
以上の手順をすべてのマクロブロックに対して繰り返し処理する。
【0052】
次に復号装置の説明を行う。図4に,第1の実施の形態に係る画像復号装置の概要を示す。図1に示す画像符号化装置の実施の形態で得られた符号化データを復号する手順を説明する。
【0053】
画像復号装置は,符号化データ入力部201,予測モード復号部202,Skip予測モード判定部203,予測モード蓄積部204,動きベクトル蓄積部205,参照画像メモリ206,DirectMC部207,ForwardMC部208,BackwardMC部209,予測誤差逆量子化/復号部210,スイッチ部212〜214を備える。
【0054】
ForwardMC部208では,前方向予測を行って予測画像を求め,BackwardMC部209では,後方向予測を行って予測画像を求め,DirectMC部207では,両方向予測を行って予測画像を求めるものとする。DirectMC部207にてdirectモードに使用する動きベクトルは,動きベクトル蓄積部205に蓄積されているものとする。
【0055】
Skip予測モード判定部203では,予測モード蓄積部204に蓄積された左,左上,上,右上のマクロブロックの予測モードから,図2のフローに従ってskipマクロブロックの予測モードを決定する。
【0056】
このような前提で,現マクロブロックは次のように復号される。まず,Skip予測モード判定部203でskipマクロブロックの予測モードを決定する。続いて予測モード復号部202で予測モードを復号する。まず,COD情報を復号する。CODが1であった場合にはskipであり,0であった場合にはskipではない。CODが0の場合にはさらに2ビット復号する。01の場合には前方向予測であり,10の場合には後方向予測であり,11の場合には両方向予測となる。CODが1の場合には,Skip予測モード判定部203で決定した予測モードとなる。
【0057】
続いて予測モードが前方向予測の場合には,ForwardMC部208にて予測画像を求め,後方向予測の場合には,BackwardMC部209にて予測画像を求め,directモードの場合には,DirectMC部207にて予測画像を求める。ここでskipの場合には,式(2)で差分を0とした場合の動きベクトルを使用する。
【0058】
続いてskipではない場合には,予測誤差逆量子化/復号部210で予測誤差を逆量子化し復号し,予測誤差を使って復号画像を作成する。skipの場合には予測画像がそのまま復号画像となる。復号画像を参照画像メモリ206に蓄積する。前方向予測と後方向予測の場合には復号した動きベクトルを動きベクトル蓄積部205に蓄積する。復号した予測モードは予測モード蓄積部204に蓄積する。
【0059】
以上の手順をすべてのマクロブロックに対して繰り返し処理する。
【0060】
次に,第2の実施の形態について説明する。第2の実施の形態では,Bピクチャについてブロック単位に前方向予測と後方向予測とdirectモードとbi−predictiveモードとを切り替えて符号化するものとする。
【0061】
まず,符号化装置の説明を行う。図5に,第2の実施の形態に係る画像符号化装置の概要を示す。第2の実施の形態の画像符号化装置は,画像入力部301,再分割動き探索/符号化モード判定部302,Skip予測モード判定部303,予測モード蓄積部304,領域予測モード判定部315,動きベクトル蓄積部305,参照画像メモリ306,DirectMC部307,Bi−predictiveMC部316,ForwardMC部308,BackwardMC部309,予測誤差符号化/量子化部310,復号部311,スイッチ部312〜314を備える。
【0062】
ForwardMC部308では,前方向予測を行って予測画像を求め,BackwardMC部309では,後方向予測を行って予測画像を求め,DirectMC部307では,directモード予測を行って予測画像を求め,Bi−predictiveMC部316では,bi−predictiveモード予測を行って予測画像を求めるものとする。DirectMC部307にてdirectモードに使用する動きベクトルは,動きベクトル蓄積部305に蓄積されているものとする。
【0063】
Skip予測モード判定部303では,予測モード蓄積部304に蓄積された左,左上,上,右上のブロックの予測モードから,skipマクロブロック内の全てのブロックの予測モードを決定する。決定するフローを図6に示す。
【0064】
まず,現在のブロックの左,左上,上,右上のいずれかにdirectブロックがあるかどうかを判定する(ステップS20)。directブロックがあれば,skipマクロブロック内のブロックの予測モードをdirectモードと決定する(ステップS25)。
【0065】
左,左上,上,右上にdirectブロックがない場合,左,左上,上,右上における前方向予測ブロック数Nf と,後方向予測ブロック数Nb とをカウントし(ステップS21),前方向予測ブロック数Nf と後方向予測ブロック数Nb とが,共に0であるかを判定する(ステップS22)。Nf =0かつNb =0であれば,skipマクロブロック内のブロックの予測モードをdirectモードと決定する(ステップS25)。
【0066】
Nf =0かつNb =0でなければ,Nf >0かつNb >0であるかどうかを判定する(ステップS23)。Nf >0かつNb >0であるあ場合,skipマクロブロック内のブロックの予測モードをbi−predictiveモードと決定する(ステップS25)。
【0067】
次に,Nf >0かつNb =0であるかどうかを判定し(ステップS24),Nf >0かつNb =0である場合には,skipマクロブロック内のブロックの予測モードを前方向予測モードと決定する(ステップS27)。
【0068】
Nf >0かつNb =0でない場合,Nf =0かつNb >0である。この場合,skipマクロブロック内のブロックの予測モードを後方向予測モードと決定する(ステップS28)。
【0069】
再分割動き探索/符号化モード判定部302では,ブロック毎に,前方向予測のための動き探索と後方向予測のための動き探索を行う。動き探索では予測誤差と動きベクトルの符号量を,後述する式(5)を使って評価し,最も値が小さくなる位置を,その予測方法における動きベクトルとして決定するものとする。bi−predictiveモードでは,前方向予測と後方向予測の動き探索で求められた動きベクトルを使い,予測誤差を求めて式(6)によって評価値を求める。以上の処理をマクロブロック内の全てのブロックに対して行う。
【0070】
領域予測モード判定部315では,各ブロックに対して,再分割動き探索/符号化モード判定部302で求められた,bi−predictiveモードとdirectモードと前方向予測と後方向予測の評価値を比較し,値が最も小さい場合の予測モードを求める。この時のマクロブロックで合計した評価値をM1とする。さらにSkip予測モード判定部303で決定された予測モードについても式(5)または式(6)によって評価値を求める。この時のマクロブロックで合計した評価値をM2とする。
【0071】
評価値M1と評価値M2が式(7)を満たすかどうかをチェックし,満たす場合には,現マクロブロックをskipとし,満たさない場合にはskipに設定しない。なお,式(5)と式(6)におけるAとBとCは,量子化スケールに依存して変化する値であり,pは画素を示し,e[p]は画素pにおける予測誤差を示し,b(MV)は動きベクトルMVの符号量を示す。動きベクトルMVf は前方向予測の動きベクトルを示し,動きベクトルMVb は後方向予測の動きベクトルを示し,動きベクトルMVは前方向予測の動きベクトルまたは後方向予測の動きベクトルを示す。式(7)におけるTHskipは予め設定した定数である。Σはブロック内の全画素pの和を表す。
【0072】

Figure 0003866624
予測モードの符号化方法は次の通りとする。まずskipかどうかを示すCOD情報(1ビット)があり,skipの場合には1に設定し,それのみとする。skipでない場合には0に設定し,続いて各ブロックの前方向予測か後方向予測か両方向予測かを示す情報(可変長4ビット)を符号化する。1の場合にはdirectモードを示し,01の場合には前方向予測を示し,001の場合には後方向予測を示し,0001の場合にはbi−predictiveモードを示すものとする。これを4ブロック分連続して符号化する。
【0073】
このような前提で現マクロブロックは次のように符号化される。まず,Skip予測モード判定部303でskipマクロブロック内の各ブロックの予測モードを決定する。続いて再分割動き探索/符号化モード判定部302で各予測モードにおける評価値を求める。同時に前方向予測と後方向予測の場合には動きベクトルも求める。領域予測モード判定部315は,マクロブロック内の各ブロックの予測モードを決定し,さらにブロックがskipかどうかを決定する。決定した予測モードは,予測モード蓄積部304に蓄積する。
【0074】
続いて前方向予測と判定された場合には,ForwardMC部308にて予測画像を求め,後方向予測と判定された場合には,BackwardMC部309にて予測画像を求め,directモードと判定された場合には,DirectMC部307にて予測画像を求め,bi−predictiveモードと判定された場合には,Bi−predictiveMC部316にて予測画像を求める。ここでskipの場合には,式(2)で差分を0とした場合の動きベクトルを使用する。続いてskipではない場合には,予測誤差符号化/量子化部310で現画像と予測画像との間で予測誤差を求めて符号化し量子化する。
【0075】
復号部311では,skipではない場合には,予測誤差を逆量子化して復号し,ForwardMC部308またはBackwardMC部309またはDirectMC部307またはBi−predictiveMC部316にて得られた予測画像を使って復号画像を求める。skipの場合には,ForwardMC部308またはBackwardMC部309またはDirectMC部307またはBi−predictiveMC部316にて得られた予測画像を復号画像とする。復号画像を参照画像メモリ306に蓄積する。前方向予測と後方向予測とbi−predictiveモードの場合には,動きベクトルを動きベクトル蓄積部305に蓄積する。
【0076】
以上の手順をすべてのマクロブロックに対して繰り返し処理する。
【0077】
次に復号装置の説明を行う。図7に,第2の実施の形態に係る画像復号装置の概要を示す。以下,図5に示す第2の実施の形態の画像符号化装置で得られた符号化データを復号する手順を説明する。
【0078】
第2の実施の形態の画像復号装置は,符号化データ入力部401,予測モード復号部402,Skip予測モード判定部403,予測モード蓄積部404,動きベクトル蓄積部405,参照画像メモリ406,DirectMC部407,ForwardMC部408,BackwardMC部409,Bi−predictiveMC部416,予測誤差逆量子化/復号部410,スイッチ部412〜414を備える。
【0079】
ForwardMC部408では,前方向予測を行って予測画像を求め,BackwardMC部409では,後方向予測を行って予測画像を求め,DirectMC部407では,directモード予測を行って予測画像を求め,Bi−predictiveMC部416では,bi−predictiveモード予測を行って予測画像を求めるものとする。DirectMC部407にてdirectモードに使用する動きベクトルは,動きベクトル蓄積部405に蓄積されているものとする。
【0080】
Skip予測モード判定部403では,予測モード蓄積部404に蓄積された左,左上,上,右上のマクロブロックの予測モードから,図6のフローに従ってskipマクロブロック内の全てのブロックの予測モードを決定する。
【0081】
このような前提で現マクロブロックは次のように符号化される。まずSkip予測モード判定部403でskipマクロブロック内のブロックの予測モードを決定する。続いて予測モード復号部402で予測モードを復号する。まずCOD情報を復号する。1であった場合にはskipであり,0であった場合にはskipではない。CODが0の場合に各ブロックにさらに最大4ビットの予測モード情報を復号する。1の場合にはdirectモードであり,01の場合には前方向予測であり,001の場合には後方向予測であり,0001の場合にはbi−predictive予測となる。CODが1の場合には,Skip予測モード判定部403で決定した予測モードとなる。これを4ブロック分連続して復号する。
【0082】
続いて予測モードが前方向予測の場合には,ForwardMC部408にて予測画像を求め,後方向予測の場合には,BackwardMC部409にて予測画像を求め,directモードの場合には,DirectMC部407にて予測画像を求め,bi−predictiveモードの場合には,Bi−predictiveMC部416にて予測画像を求める。続いてskipではない場合には,予測誤差逆量子化/復号部410で予測誤差を逆量子化し復号し,予測誤差を使って復号画像を作成する。skipの場合には,予測画像がそのまま復号画像となる。復号画像を参照画像メモリ406に蓄積する。前方向予測と後方向予測とbi−predictiveモードの場合には復号した動きベクトルを動きベクトル蓄積部405に蓄積する。復号した予測モードは予測モード蓄積部404に蓄積する。
【0083】
以上の手順をすべてのマクロブロックに対して繰り返し処理する。
【0084】
なお,以上の第1および第2の実施の形態では,Skip予測モード判定部103,303等で,図2または図6のフローに従ってskip予測モードを求めたが,決定フローはこれに限るものではない。
【0085】
さらに,画面内の位置によってSkip予測モード判定部103,303等の決定フローを変更してもよい。例えば,画面外周のマクロブロックまたはブロックの場合には,Skip予測モード判定部103,303等で,図2または図6のフローに従わず,directモードで予測することも好適である。
【0086】
さらにまた,後方向予測における参照フレームの表示時刻が,現フレームよりも未来であるか過去であるかによって,Skip予測モード判定部103,303等の決定フローを変更してもよい。例えば後方向予測における参照フレームの表示時刻が現フレームよりも未来である場合には,図2または図6の決定フローに従い,後方向予測における参照フレームの表示時刻が現フレームよりも過去である場合には,常にdirectモードにすることも好適である。
【0087】
また,本実施の形態ではマクロブロックまたはブロック毎に予測誤差を符号化したが,複数フレーム分の画像情報をまとめて符号化しても良い。例えば,文献「石川ら,“マルチパラメータ動き補償を用いた動画像の3D/2Dハイブリッド符号化,”信学技報IE2001-76 ,pp.15-22,2001」のように複数フレーム分の画像情報をDCTしたり,文献「J.-R.Ohm,“Three-dimentional subband coding with motion compensation ,”IEEE Trans. ,Image Process.,vol.3 ,pp.559-571,1994」のように複数フレーム分の画像情報をWavelet変換しても良い。
【0088】
このように本実施の形態によれは,Bピクチャのskipマクロブロックのフレーム間予測方法を,隣接するマクロブロックまたはブロックの予測方法から適応的に変更することができる。
【0089】
【発明の効果】
本発明によれば,Bピクチャのskipマクロブロックのフレーム間予測方法を,隣接するマクロブロックまたはブロックの予測方法から適応的に変更することができる。これにより,従来Bピクチャをはさむ3フレーム間で動きが一定しない場合に,directモードによる動きベクトルでは予測誤差を低減することができない場合においても,skipマクロブロックのフレーム間予測モードをdirect以外に設定することが可能となり,隣接領域同士で画像内容に相関があることを利用して,符号化効率を向上することができる。
【図面の簡単な説明】
【図1】第1の実施の形態の画像符号化装置の例を示す図である。
【図2】第1の実施の形態のskip予測モード決定フローの例を示す図である。
【図3】第1の実施の形態の動き探索/符号化モード判定部の動作フローの例を示す図である。
【図4】第1の実施の形態の画像復号装置の例を示す図である。
【図5】第2の実施の形態の画像符号化装置の例を示す図である。
【図6】第2の実施の形態のskip予測モード決定フローの例を示す図である。
【図7】第2の実施の形態の画像復号装置の例を示す図である。
【図8】予測関係の例を説明するための図である。
【図9】directモードにおける動きベクトルの関係を説明するための図である。
【符号の説明】
101,301 画像入力部
102 動き探索/符号化モード判定部
202,402 予測モード復号部
302 再分割動き探索/符号化モード判定部
103,203,303,403 Skip予測モード判定部
104,204,304,404 予測モード蓄積部
105,205,305,405 動きベクトル蓄積部
106,206,306,406 参照画像メモリ
107,207,307,407 DirectMC部
108,208,308,408 ForwardMC部
109,209,309,409 BackwardMC部
110,310 予測誤差符号化/量子化部
210,410 予測誤差逆量子化/復号部
111,311 復号部
112〜114,212〜214,312〜314,412〜414 スイッチ部
315 領域予測モード判定部
316,416 Bi−predictiveMC部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a moving picture coding and decoding technique using a bi-directional inter-frame predictive coding method, and in particular, by adaptively changing the inter-frame prediction method of a skip macroblock of a B picture, The present invention relates to a moving picture coding method, a moving picture decoding method, a moving picture coding apparatus, and a moving picture decoding apparatus that can improve the above.
[0002]
[Prior art]
In general, in moving picture coding, inter-frame prediction coding is used in order to achieve high coding efficiency using temporal correlation. The frame encoding mode can be predicted from an I frame that is encoded without using correlation between frames, a P frame that is predicted from one previously encoded frame, and two previously encoded frames. There are B frames. In particular, the video encoding method H.264. In 263, decoded images for a plurality of frames can be stored in the reference image memory, and the reference image can be selected and predicted from the memory.
[0003]
The P frame is predicted from a previously encoded frame, while the B frame can be predicted from two previously encoded frames. Of the two frames used as reference frames, a method of predicting from a past frame is referred to as forward prediction, and a method of predicting from a future frame is referred to as backward prediction. The display time of the reference frame in the backward inter-frame prediction may be later than the current frame. In this case, after displaying the current frame, a reference frame for backward frame prediction is output. When prediction is performed from two frames in B frame (bidirectional inter-frame prediction), image information from two frames is interpolated to generate image information for one frame to generate a predicted image.
[0004]
FIG. 8A1 shows an example of the prediction relationship of moving images when the reference frame display time in the backward inter-frame prediction is in the future. When the encoding modes of the first frame to the seventh frame are encoded in the order of IBBPBBP, since there is a prediction relationship shown in FIG. 8 (A1), when encoding is actually performed, FIG. 8 (A2) As shown in FIG. 4, the frames are encoded in the order of (1) (4) (2) (3) (7) (5) (6).
[0005]
FIG. 8B1 shows an example of the prediction relationship of moving images when the reference frame display time in the backward inter-frame prediction is in the past. When the encoding modes of the first frame to the seventh frame are encoded in the order of IPBBPBB, since there is a prediction relationship shown in FIG. 8 (B1), when encoding is actually performed, FIG. 8 (B2) As shown in FIG. 4, the frames are encoded in the order of (1) (2) (4) (3) (5) (7) (6).
[0006]
Furthermore, these encoding modes can be designated for each area obtained by dividing the image, such as a macro block. Video coding method In H.263, there are only I macroblocks to be encoded using only intra-frame image information in the I frame. Within the P frame, there is a P macroblock predicted from one frame encoded in the past in addition to the I macroblock. It is also possible to change the image to be referenced for each macroblock. Within the B frame, there are B macroblocks in addition to I macroblocks and P macroblocks. As with the P macroblock, the B macroblock has a forward prediction mode or backward prediction mode in which prediction is performed from one frame encoded in the past, and a bidirectional prediction mode in which prediction is performed from two frames.
[0007]
The bidirectional prediction mode includes a bi-predictive mode that encodes a motion vector indicating a reference position in each frame and a direct mode that does not encode. In the direct mode, a forward motion vector and a backward motion vector are calculated from the motion vector of the macroblock at the same position in the future frame to be referred to.
[0008]
FIG. 9 shows a relationship diagram of motion vectors in the direct mode when the reference frame display time in the backward inter-frame prediction is in the future. In FIG. 9, P1 and P2 are already encoded frames, and Pc is an encoding target frame. Equation (1) shows a motion vector calculation formula when the motion vectors of the macroblocks between Pc, P1, and P2 are MVf and MVb, respectively. MVs is a motion vector of a macroblock between P1 and P2. In general, a time interval between frames P1 and Pc is applied to N1, a time interval between frames Pc and P2 is applied to N2, and a time interval between frames P1 and P2 is applied to D.
[0009]
MVf = MVs × N1 / D (1-1)
MVb = MVs.times.N2 / D (1-2)
In order to calculate the motion vector according to this equation (1), the motion vector is not encoded in the direct mode.
[0010]
In addition, when encoding a motion vector of a macroblock, there is a method of encoding a difference from the motion vectors of surrounding macroblocks. For example, the video encoding method H.264. In H.263, a motion vector predictor PMV is created from the motion vectors (MV1, MV2, MV3) of the left, upper, and upper right macroblocks using Equation (2), and the difference from the PMV is encoded. Note that Median (a, b, c) is an intermediate value among the values a, b, c.
[0011]
PMV = Median (MV1, MV2, MV3) (2)
According to this method, when there is little change from the motion vector of the surrounding macroblock, the motion vector can be encoded with higher encoding efficiency.
[0012]
A macroblock without encoded data is called a skip macroblock. Video coding method In H.263, the skip macroblock in the P frame has a motion vector of 0 and has no prediction error. Therefore, an image at the same position in the reference frame is set as a decoded image.
[0013]
The skip macroblock in the B frame obtains a motion vector by the same method as in the direct mode and has no prediction error. Therefore, an image obtained by interpolating the image information of the motion vector position calculated by the equation (1) is set as a decoded image.
[0014]
In general, for each macroblock, whether or not it is a skip macroblock, whether to perform intra coding, and coding mode information indicating an inter-frame prediction method are coded. H. In H.263, 1-bit COD encoding mode information indicating whether or not a skip macroblock is encoded. If not skip, MCBPC encoding mode information indicating whether to perform intra encoding or an inter-frame prediction method is encoded. To do. Therefore, in the case of a skip macroblock, information indicating an interframe prediction method, a motion vector, and a prediction error are not encoded. Video coding method In H.264, skip macroblocks do not encode COD coding mode information, but run-length encode the number of consecutive skip macroblocks.
[0015]
[Problems to be solved by the invention]
Since the direct mode of the B frame is obtained from the motion vector of the subsequent P frame as shown in FIG. 9, it is effective when there is a constant speed motion between three frames. That is, in the case of a moving image captured by the camera moving parallel at a constant speed, the prediction error can be greatly reduced by the motion vector in the direct mode. If there is no prediction error, it can be encoded as a skip macroblock. Since the skip macroblock is encoded with COD information or run-length encoded, the encoding efficiency of the entire B frame can be improved.
[0016]
However, when the motion is not constant between the three frames, the prediction error cannot be reduced with the motion vector in the direct mode. Therefore, skip macroblocks are not generated, and the encoding efficiency cannot be reduced.
[0017]
In view of the above points, the present invention has a skip macroblock (or a specific condition) even when the motion error in the direct mode cannot reduce the prediction error because the motion is not constant between the three frames. It is possible to set the skip macroblock inter-frame prediction mode to other than direct, and to improve the coding efficiency by utilizing the fact that there is a correlation in image contents between adjacent regions. And
[0018]
[Means for Solving the Problems]
In order to solve the above problems, the present invention uses the following method.
[0019]
  BookThe invention divides an input image into regions and performs bi-directional interframe predictive coding.OrForward interframe predictive coding schemeOr backward interframe predictive codingIn the moving picture coding method for coding picture information by using a frame, the current region is encoded with inter-frame prediction mode coded data, motion vector coded data, and prediction error coded data.WhenDo not haveskipInter-frame prediction of adjacent areas when coding as areasIf there are areas using the forward prediction mode and areas using the backward inter-frame prediction mode as modes, set the inter-frame prediction mode of the current area to bi-directional prediction mode and When there is no region that uses the backward prediction mode as the prediction mode, the interframe prediction mode of the current region is set to the forward prediction mode, and the forward prediction mode is used as the interframe prediction mode of the adjacent region. If there is no region, the inter-frame prediction mode of the current region is set to the backward prediction mode, and a prediction image is obtained from the reference image determined based on the set inter-frame prediction mode of the current region. Calculates the evaluation value of the encoding cost when the image is encoded, and determines whether to encode the current region as a skip region based on the evaluation valueIt is characterized by that.
[0021]
  BookAccording to the invention, even when the inter-frame prediction mode is not encoded as in the skip macroblock, the inter-frame prediction mode of the current region is changed according to a preset condition. be able to. For example, there are the following two conditions. These may be combined.
[Condition a] The most frequent mode among the inter-frame prediction modes in the four adjacent regions on the left, upper left, upper, and upper right is also applied to the current region.
[Condition b] When there are specific inter-frame prediction mode areas in the four adjacent areas on the left, upper left, upper, and upper right, the same mode is applied to the current area.
[0022]
Further, in the forward prediction, backward prediction, and bi-directional prediction, when a method of encoding a difference from the motion vector of the surrounding macroblock is applied, the 0 vector is applied as the motion vector of the skip macroblock. It is also possible to apply PMV calculated from equation (2).
[0023]
When there is a correlation in image content between adjacent regions, the encoding efficiency tends to be high in the same inter-frame prediction mode. Therefore, conventionally, when the motion is not constant between the three frames sandwiching the B picture, the inter-frame prediction mode of the skip macroblock is set to other than direct even when the prediction vector cannot reduce the prediction error. Thus, encoding efficiency can be improved.
[0024]
  Also, the aboveIn the present invention, during bi-directional inter-frame predictive encoding, a direct mode that does not encode a motion vector and a bi-predictive mode that encodes forward and backward motion vectors are distinguished, and an inter-frame prediction method for the current region is performed. decideYou may do it.
[0025]
  thisIf you doWhen the inter-frame prediction mode is not coded as in the skip macroblock, when the inter-frame prediction mode is obtained from the inter-frame prediction mode of the adjacent region, either the direct mode or the bi-predictive mode is used as the bidirectional prediction. Can be further distinguished. In the case of the direct mode, the motion vector can be obtained according to Expression (1), and in the case of the bi-predictive mode, the PMV obtained according to Expression (2) or the 0 vector can be applied.
[0026]
As a result, the inter-frame prediction mode can be changed more finely in the bidirectional prediction mode.
[0027]
  Also, the aboveIn the present invention, when encoding the current region as a region having no inter-frame prediction mode encoded data, motion vector encoded data, and prediction error encoded data, the current region is adjacent to each subdivision region further divided. Change the interframe prediction method for the current subdivision area according to whether the interframe prediction method for the subdivision area satisfies a preset condition.Such an implementation is also possible.
[0028]
  thisIf you doWhen the inter-frame prediction mode, the motion vector, and the prediction error are not encoded as in the skip macroblock, the inter-frame prediction mode can be changed for each further divided unit such as a block. As a result, the inter-frame prediction mode can be changed in finer units than the macroblock.
[0029]
  The image decoding method according to the present invention includes:Bidirectional interframe predictive coding or forward interframe predictive coding for each segmented imageOr backward interframe predictive codingIn the moving picture decoding method for decoding picture information by using the image, the current region is encoded with inter-frame prediction mode encoded data, motion vector encoded data, and prediction error encoded data.WhenDo not haveskipWhen decoding as an area, inter-frame prediction of adjacent areasIf there are areas using the forward prediction mode and areas using the backward inter-frame prediction mode as modes, set the inter-frame prediction mode of the current area to bi-directional prediction mode and When there is no region that uses the backward prediction mode as the prediction mode, the interframe prediction mode of the current region is set to the forward prediction mode, and the forward prediction mode is used as the interframe prediction mode of the adjacent region. If there is no region, the inter-frame prediction mode of the current region is set to the backward prediction mode, a reference image is determined based on the set inter-frame prediction mode of the current region, and the prediction image is determined from the reference image. Find and decode the current region imageIt is characterized by that.
[0031]
  Also, the aboveIn the present invention, at the time of bi-directional inter-frame prediction decoding, a direct mode in which a motion vector is not decoded and a bi-predictive mode in which a forward motion vector and a backward motion vector are decoded are distinguished, and an inter-frame prediction method for the current region is determined.You may do.
[0032]
  In addition, the aboveIn the present invention, when the current area is decoded as an area having no inter-frame prediction mode encoded data, motion vector encoded data, and prediction error encoded data, an adjacent re-division area is further divided for each re-divided area. Change the inter-frame prediction method for the sub-region of the current region according to whether the inter-frame prediction method for the sub-region satisfies the preset conditionImplementation is also possible.
[0033]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described with reference to the drawings.
[0034]
In the first embodiment, B pictures are encoded by switching bi-directional prediction, forward prediction, and backward prediction for each macroblock. Here, the bi-directional prediction refers to the direct mode.
[0035]
First, the encoding device will be described. FIG. 1 shows an overview of an image coding apparatus according to the first embodiment. This image encoding apparatus includes an image input unit 101, a motion search / coding mode determination unit 102, a Skip prediction mode determination unit 103, a prediction mode storage unit 104, a motion vector storage unit 105, a reference image memory 106, a DirectMC unit 107, A ForwardMC unit 108, a BackwardMC unit 109, a prediction error encoding / quantization unit 110, a decoding unit 111, and switch units 112 to 114 are provided.
[0036]
The ForwardMC unit 108 performs forward prediction to obtain a prediction image, the BackwardMC unit 109 performs backward prediction to obtain a prediction image, and the DirectMC unit 107 performs bidirectional prediction to obtain a prediction image. It is assumed that motion vectors used for the direct mode in the DirectMC unit 107 are stored in the motion vector storage unit 105.
[0037]
In the skip prediction mode determination unit 103, the motion search / coding mode determination unit 102 converts the current macroblock from the prediction mode of the left, upper left, upper, and upper right macroblocks stored in the prediction mode storage unit 104 to the skip macro. Determine the prediction mode for block. The flow to determine is shown in FIG.
[0038]
First, it is determined whether there is a direct macroblock in any of the left, upper left, upper, and upper right of the current macroblock (step S1). If there is a direct macroblock, the skip macroblock prediction mode is determined to be the direct mode (step S2).
[0039]
If there are no direct macroblocks on the left, upper left, upper, and upper right, the number of forward prediction macroblocks Nf and the number of backward prediction macroblocks Nb in the left, upper left, upper, and upper right are counted (step S3). The number of predicted macroblocks Nf is compared with the number of backward predicted macroblocks Nb (step S4).
[0040]
If the number of macroblocks Nf and Nb are equal, the skip macroblock prediction mode is determined to be the direct mode (step S2).
[0041]
If the number of macroblocks Nf is greater than Nb, the skip macroblock prediction mode is determined to be the forward prediction mode (step S5).
[0042]
If the number of macroblocks Nf is smaller than Nb, the skip macroblock prediction mode is determined to be the backward prediction mode (step S6).
[0043]
FIG. 3 shows an operation flow of the motion search / coding mode determination unit 102 according to the present embodiment. The motion search / encoding mode determination unit 102 performs a motion search for forward prediction (step S10) and a motion search for backward prediction (step S11). In motion search, the prediction error and the code amount of the motion vector are evaluated using Equation (3), and the position with the smallest value is determined as the motion vector in the prediction method. It is assumed that the motion vector encodes the difference obtained using the equation (2).
[0044]
Further, the evaluation value Dmb of Expression (3) relating to the direct mode, the forward prediction, and the backward prediction is compared, and the prediction mode PM to be used when the value is the smallest is determined (step S12). When the determined prediction mode PM is the same as the prediction mode determined to be applied to the skip macroblock by the Skip prediction mode determination unit 103, the evaluation value obtained by Expression (3) satisfies Expression (4). (Step S13), if satisfied, the current macroblock is set to skip (step S14), otherwise, it is not set to skip (step S15).
[0045]
In Equation (3), A and B are values that vary depending on the quantization scale, p indicates a pixel, e [p] indicates a prediction error in the pixel p, and b (MV) indicates a motion vector. The code amount of MV is shown. The motion vector MV indicates a motion vector for forward prediction or a motion vector for backward prediction. THskip in equation (4) is a preset constant.
[0046]
Dmb = A * Σ | e [p] | + B * | b (MV) | (3)
(Where Σ is the sum for all pixels p in the macroblock)
Dmb ≦ THskip (4)
The encoding method for the prediction mode is as follows. First, there is COD information (1 bit) indicating whether it is a skip or not. If it is not skip, it is set to 0, and then information (2 bits) indicating forward prediction, backward prediction or bidirectional prediction is encoded. 01 indicates forward prediction, 10 indicates backward prediction, and 11 indicates bidirectional prediction.
[0047]
Under this assumption, the current macroblock is encoded as follows. First, the skip prediction mode determination unit 103 determines the prediction mode of the skip macroblock. Subsequently, the motion search / coding mode determination unit 102 determines the prediction mode. At the same time, in the case of forward prediction and backward prediction, a motion vector is also obtained. If the determined prediction mode is a skip macroblock prediction mode, it is determined whether or not the macroblock is to be skip. The determined prediction mode is stored in the prediction mode storage unit 104.
[0048]
Subsequently, the switch units 112 and 113 are switched. When it is determined that the forward prediction is performed, the ForwardMC unit 108 obtains a prediction image. When the backward prediction is determined, the BackwardMC unit 109 obtains a prediction image. If the direct mode is determined, the direct MC unit 107 obtains a predicted image. Here, in the case of skip, the motion vector when the difference is set to 0 in the equation (2) is used.
[0049]
Subsequently, when it is not skip, the prediction image is sent to the prediction error encoding / quantization unit 110 through the switch unit 113, and the prediction error encoding / quantization unit 110 sets the prediction error between the current image and the prediction image. Find and encode and quantize.
[0050]
If it is not skip, the decoding unit 111 dequantizes and decodes the prediction error, and obtains a decoded image using the prediction image obtained by the ForwardMC unit 108, BackwardMC unit 109, or DirectMC unit 107. In the case of skip, a predicted image obtained by the ForwardMC unit 108, the BackwardMC unit 109, or the DirectMC unit 107 is used as a decoded image. The decoded image is stored in the reference image memory 106. In the case of forward prediction and backward prediction, the motion vector is stored in the motion vector storage unit 105.
[0051]
The above procedure is repeated for all macroblocks.
[0052]
Next, the decoding device will be described. FIG. 4 shows an outline of the image decoding apparatus according to the first embodiment. A procedure for decoding the encoded data obtained in the embodiment of the image encoding device shown in FIG. 1 will be described.
[0053]
The image decoding apparatus includes an encoded data input unit 201, a prediction mode decoding unit 202, a Skip prediction mode determination unit 203, a prediction mode accumulation unit 204, a motion vector accumulation unit 205, a reference image memory 206, a DirectMC unit 207, a ForwardMC unit 208, A Backward MC unit 209, a prediction error inverse quantization / decoding unit 210, and switch units 212 to 214 are provided.
[0054]
The ForwardMC unit 208 performs forward prediction to obtain a prediction image, the BackwardMC unit 209 performs backward prediction to obtain a prediction image, and the DirectMC unit 207 performs bidirectional prediction to obtain a prediction image. It is assumed that the motion vector used in the direct mode in the DirectMC unit 207 is stored in the motion vector storage unit 205.
[0055]
The skip prediction mode determination unit 203 determines the prediction mode of the skip macroblock from the prediction modes of the left, upper left, upper, and upper right macroblocks accumulated in the prediction mode accumulation unit 204 according to the flow of FIG.
[0056]
Under this assumption, the current macroblock is decoded as follows. First, the skip prediction mode determination unit 203 determines the prediction mode of the skip macroblock. Subsequently, the prediction mode decoding unit 202 decodes the prediction mode. First, the COD information is decoded. When COD is 1, it is skip, and when it is 0, it is not skip. When COD is 0, 2 bits are further decoded. 01 is forward prediction, 10 is backward prediction, and 11 is bidirectional prediction. When COD is 1, the prediction mode determined by the Skip prediction mode determination unit 203 is set.
[0057]
Subsequently, when the prediction mode is forward prediction, a predicted image is obtained by the ForwardMC unit 208. When backward prediction is performed, a prediction image is obtained by the BackwardMC unit 209. When the prediction mode is direct mode, the DirectMC unit is obtained. In 207, a predicted image is obtained. Here, in the case of skip, the motion vector when the difference is set to 0 in the equation (2) is used.
[0058]
Subsequently, if it is not skip, the prediction error inverse quantization / decoding unit 210 dequantizes and decodes the prediction error, and creates a decoded image using the prediction error. In the case of skip, a predicted image becomes a decoded image as it is. The decoded image is stored in the reference image memory 206. In the case of forward prediction and backward prediction, the decoded motion vector is stored in the motion vector storage unit 205. The decoded prediction mode is stored in the prediction mode storage unit 204.
[0059]
The above procedure is repeated for all macroblocks.
[0060]
Next, a second embodiment will be described. In the second embodiment, B picture is encoded by switching forward prediction, backward prediction, direct mode, and bi-predictive mode for each block.
[0061]
First, the encoding device will be described. FIG. 5 shows an outline of an image coding apparatus according to the second embodiment. The image coding apparatus according to the second embodiment includes an image input unit 301, a subdivision motion search / coding mode determination unit 302, a Skip prediction mode determination unit 303, a prediction mode accumulation unit 304, and a region prediction mode determination unit 315. A motion vector storage unit 305, a reference image memory 306, a DirectMC unit 307, a Bi-predictive MC unit 316, a ForwardMC unit 308, a BackwardMC unit 309, a prediction error encoding / quantization unit 310, a decoding unit 311, and switch units 312 to 314 are provided. .
[0062]
The ForwardMC unit 308 performs forward prediction to obtain a prediction image, the BackwardMC unit 309 performs backward prediction to obtain a prediction image, and the DirectMC unit 307 performs direct mode prediction to obtain a prediction image, and Bi− The predictive MC unit 316 performs bi-predictive mode prediction to obtain a predicted image. It is assumed that the motion vector used for the direct mode in the DirectMC unit 307 is stored in the motion vector storage unit 305.
[0063]
The skip prediction mode determination unit 303 determines the prediction modes of all blocks in the skip macroblock from the prediction modes of the left, upper left, upper, and upper right blocks accumulated in the prediction mode accumulation unit 304. The flow to be determined is shown in FIG.
[0064]
First, it is determined whether there is a direct block in any of the left, upper left, upper, and upper right of the current block (step S20). If there is a direct block, the prediction mode of the block in the skip macroblock is determined to be the direct mode (step S25).
[0065]
When there are no direct blocks on the left, upper left, upper, and upper right, the number of forward prediction blocks Nf and the number of backward prediction blocks Nb in the left, upper left, upper, and upper right are counted (step S21), and the number of forward prediction blocks It is determined whether Nf and the backward prediction block number Nb are both 0 (step S22). If Nf = 0 and Nb = 0, the prediction mode of the block in the skip macroblock is determined as the direct mode (step S25).
[0066]
Unless Nf = 0 and Nb = 0, it is determined whether Nf> 0 and Nb> 0 (step S23). If Nf> 0 and Nb> 0, the prediction mode of the block in the skip macroblock is determined as the bi-predictive mode (step S25).
[0067]
Next, it is determined whether Nf> 0 and Nb = 0 (step S24). If Nf> 0 and Nb = 0, the prediction mode of the block in the skip macroblock is changed to the forward prediction mode. Determine (step S27).
[0068]
If Nf> 0 and Nb = 0, Nf = 0 and Nb> 0. In this case, the prediction mode of the block in the skip macroblock is determined as the backward prediction mode (step S28).
[0069]
The subdivision motion search / coding mode determination unit 302 performs a motion search for forward prediction and a motion search for backward prediction for each block. In motion search, the prediction error and the amount of code of the motion vector are evaluated by using Equation (5) described later, and the position where the value is the smallest is determined as the motion vector in the prediction method. In the bi-predictive mode, a prediction error is obtained using a motion vector obtained by motion search for forward prediction and backward prediction, and an evaluation value is obtained by Expression (6). The above processing is performed for all the blocks in the macro block.
[0070]
The region prediction mode determination unit 315 compares the evaluation values of the bi-predictive mode, the direct mode, the forward prediction, and the backward prediction obtained by the subdivision motion search / encoding mode determination unit 302 for each block. The prediction mode for the smallest value is obtained. The total evaluation value of the macroblock at this time is M1. Further, the evaluation value is also obtained by the equation (5) or the equation (6) for the prediction mode determined by the Skip prediction mode determination unit 303. The total evaluation value of the macroblocks at this time is M2.
[0071]
It is checked whether or not the evaluation value M1 and the evaluation value M2 satisfy the expression (7). If the evaluation value M1 and the evaluation value M2 satisfy the expression (7), the current macroblock is set to skip. In Equations (5) and (6), A, B, and C are values that change depending on the quantization scale, p indicates a pixel, and e [p] indicates a prediction error in the pixel p. , B (MV) indicate the code amount of the motion vector MV. The motion vector MVf indicates a forward prediction motion vector, the motion vector MVb indicates a backward prediction motion vector, and the motion vector MV indicates a forward prediction motion vector or a backward prediction motion vector. THskip in equation (7) is a preset constant. Σ represents the sum of all pixels p in the block.
[0072]
Figure 0003866624
The prediction mode encoding method is as follows. First, there is COD information (1 bit) indicating whether it is a skip. In the case of a skip, it is set to 1 and only it. If it is not skip, it is set to 0, and then information (variable length 4 bits) indicating whether each block is forward prediction, backward prediction or bidirectional prediction is encoded. 1 indicates direct mode, 01 indicates forward prediction, 001 indicates backward prediction, and 0001 indicates bi-predictive mode. This is encoded continuously for 4 blocks.
[0073]
Under this assumption, the current macroblock is encoded as follows. First, the skip prediction mode determination unit 303 determines the prediction mode of each block in the skip macroblock. Subsequently, the re-division motion search / encoding mode determination unit 302 obtains an evaluation value in each prediction mode. At the same time, in the case of forward prediction and backward prediction, a motion vector is also obtained. The region prediction mode determination unit 315 determines the prediction mode of each block in the macroblock, and further determines whether the block is skip. The determined prediction mode is stored in the prediction mode storage unit 304.
[0074]
Subsequently, when the forward prediction is determined, the predicted MC unit 308 obtains a prediction image. When the backward prediction is determined, the Backward MC unit 309 obtains the prediction image, and the direct mode is determined. In this case, the DirectMC unit 307 obtains a predicted image, and when it is determined that the bi-predictive mode is selected, the Bi-predictive MC unit 316 obtains a predicted image. Here, in the case of skip, the motion vector when the difference is set to 0 in the equation (2) is used. Subsequently, if it is not skip, the prediction error encoding / quantization unit 310 obtains a prediction error between the current image and the prediction image, and encodes and quantizes the prediction error.
[0075]
In the decoding unit 311, if not skip, the prediction error is inversely quantized and decoded, and decoding is performed using the prediction image obtained by the ForwardMC unit 308, BackwardMC unit 309, DirectMC unit 307, or Bi-predictiveMC unit 316. Ask for an image. In the case of skip, a predicted image obtained by the ForwardMC unit 308, the BackwardMC unit 309, the DirectMC unit 307, or the Bi-predictiveMC unit 316 is used as a decoded image. The decoded image is stored in the reference image memory 306. In the case of forward prediction, backward prediction, and bi-predictive mode, motion vectors are stored in the motion vector storage unit 305.
[0076]
The above procedure is repeated for all macroblocks.
[0077]
Next, the decoding device will be described. FIG. 7 shows an outline of an image decoding apparatus according to the second embodiment. The procedure for decoding the encoded data obtained by the image encoding apparatus according to the second embodiment shown in FIG. 5 will be described below.
[0078]
The image decoding apparatus according to the second embodiment includes an encoded data input unit 401, a prediction mode decoding unit 402, a Skip prediction mode determination unit 403, a prediction mode storage unit 404, a motion vector storage unit 405, a reference image memory 406, and DirectMC. 407, ForwardMC unit 408, BackwardMC unit 409, Bi-predictiveMC unit 416, prediction error inverse quantization / decoding unit 410, and switch units 412 to 414.
[0079]
The ForwardMC unit 408 performs forward prediction to obtain a prediction image, the BackwardMC unit 409 performs backward prediction to obtain a prediction image, and the DirectMC unit 407 performs direct mode prediction to obtain a prediction image. The predictive MC unit 416 performs bi-predictive mode prediction to obtain a predicted image. It is assumed that motion vectors used in the direct mode in the DirectMC unit 407 are stored in the motion vector storage unit 405.
[0080]
The skip prediction mode determination unit 403 determines prediction modes of all blocks in the skip macroblock from the prediction modes of the left, upper left, upper, and upper right macroblocks accumulated in the prediction mode accumulation unit 404 according to the flow of FIG. To do.
[0081]
Under this assumption, the current macroblock is encoded as follows. First, the skip prediction mode determination unit 403 determines the prediction mode of blocks in the skip macroblock. Subsequently, the prediction mode decoding unit 402 decodes the prediction mode. First, the COD information is decoded. If it is 1, it is skip; if it is 0, it is not skip. When COD is 0, prediction mode information of a maximum of 4 bits is further decoded in each block. In case of 1, it is direct mode, in case of 01 it is forward prediction, in case of 001 it is backward prediction, and in case of 0001 it is bi-predictive prediction. When the COD is 1, the prediction mode determined by the Skip prediction mode determination unit 403 is used. This is decoded continuously for 4 blocks.
[0082]
Subsequently, when the prediction mode is forward prediction, a prediction image is obtained by the ForwardMC unit 408. When backward prediction is performed, a prediction image is obtained by the BackwardMC unit 409. When the prediction mode is direct mode, the DirectMC unit is obtained. A predicted image is obtained at 407, and in the case of the bi-predictive mode, a predicted image is obtained by the Bi-predictive MC unit 416. Subsequently, if it is not skip, the prediction error inverse quantization / decoding unit 410 dequantizes and decodes the prediction error, and creates a decoded image using the prediction error. In the case of skip, the predicted image becomes a decoded image as it is. The decoded image is stored in the reference image memory 406. In the case of forward prediction, backward prediction, and bi-predictive mode, the decoded motion vector is stored in the motion vector storage unit 405. The decoded prediction mode is stored in the prediction mode storage unit 404.
[0083]
The above procedure is repeated for all macroblocks.
[0084]
In the first and second embodiments described above, the skip prediction mode is determined by the skip prediction mode determination units 103 and 303 according to the flow of FIG. 2 or FIG. 6, but the determination flow is not limited to this. Absent.
[0085]
Furthermore, the determination flow of the skip prediction mode determination units 103 and 303 may be changed according to the position in the screen. For example, in the case of a macro block or a block on the outer periphery of the screen, it is also preferable to perform prediction in the direct mode without skipping the flow of FIG. 2 or FIG.
[0086]
Furthermore, the determination flow of the skip prediction mode determination units 103 and 303 may be changed depending on whether the display time of the reference frame in the backward prediction is in the future or in the past than the current frame. For example, when the display time of the reference frame in the backward prediction is later than the current frame, the display time of the reference frame in the backward prediction is earlier than the current frame according to the determination flow of FIG. 2 or FIG. It is also preferable to always set the direct mode.
[0087]
In this embodiment, the prediction error is encoded for each macroblock or block, but image information for a plurality of frames may be encoded together. For example, as in the document “Ishikawa et al.,“ 3D / 2D hybrid encoding of moving images using multi-parameter motion compensation, ”IEICE Technical Report IE2001-76, pp.15-22, 2001” Information can be DCTed, and multiple documents such as “J.-R.Ohm,“ Three-dimentional subband coding with motion compensation ”, IEEE Trans., Image Process., Vol.3, pp.559-571, 1994”. Image information for frames may be wavelet transformed.
[0088]
As described above, according to the present embodiment, the inter-frame prediction method for a skip macroblock of a B picture can be adaptively changed from the prediction method for an adjacent macroblock or block.
[0089]
【The invention's effect】
According to the present invention, the inter-frame prediction method for a skip macroblock of a B picture can be adaptively changed from the prediction method for an adjacent macroblock or block. As a result, when the motion is not constant between the three frames sandwiching the conventional B picture, even when the motion vector in the direct mode cannot reduce the prediction error, the interframe prediction mode of the skip macroblock is set to other than direct. Coding efficiency can be improved by using the fact that there is a correlation in image contents between adjacent regions.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating an example of an image encoding device according to a first embodiment.
FIG. 2 is a diagram illustrating an example of a skip prediction mode determination flow according to the first embodiment;
FIG. 3 is a diagram illustrating an example of an operation flow of a motion search / coding mode determination unit according to the first embodiment;
FIG. 4 is a diagram illustrating an example of an image decoding device according to the first embodiment.
FIG. 5 is a diagram illustrating an example of an image encoding device according to a second embodiment;
FIG. 6 is a diagram illustrating an example of a skip prediction mode determination flow according to the second embodiment;
FIG. 7 is a diagram illustrating an example of an image decoding device according to a second embodiment.
FIG. 8 is a diagram for explaining an example of a prediction relationship.
FIG. 9 is a diagram for explaining the relationship of motion vectors in the direct mode.
[Explanation of symbols]
101, 301 Image input unit
102 Motion search / coding mode determination unit
202, 402 Prediction mode decoding unit
302 Subdivision motion search / coding mode determination unit
103, 203, 303, 403 Skip prediction mode determination unit
104, 204, 304, 404 Prediction mode storage unit
105, 205, 305, 405 Motion vector storage unit
106, 206, 306, 406 Reference image memory
107, 207, 307, 407 DirectMC part
108, 208, 308, 408 ForwardMC part
109, 209, 309, 409 BackwardMC part
110, 310 Prediction error encoding / quantization unit
210, 410 Prediction error inverse quantization / decoding unit
111,311 decoding unit
112-114, 212-214, 312-314, 412-414 Switch part
315 Region prediction mode determination unit
316, 416 Bi-predictive MC part

Claims (4)

入力画像を領域に分割し,両方向フレーム間予測符号化方式または前方向フレーム間予測符号化方式または後方向フレーム間予測符号化方式を使って画像情報を符号化する動画像符号化方法において,
現領域をフレーム間予測モード符号化データと動きベクトル符号化データと予測誤差符号化データを持たないスキップ領域として符号化する場合に,
隣接領域のフレーム間予測モードとして前方向予測モードを使っている領域と後方向フレーム間予測方式を使っている領域とがある場合には,現領域のフレーム間予測モードを両方向予測モードに設定し,
隣接領域のフレーム間予測モードとして後方向予測モードを使っている領域がない場合には,現領域のフレーム間予測モードを前方向予測モードに設定し,
隣接領域のフレーム間予測モードとして前方向予測モードを使っている領域がない場合には,現領域のフレーム間予測モードを後方向予測モードに設定し,
前記設定された現領域のフレーム間予測モードに基づいて決定された参照画像から予測画像を求めて現領域の画像を符号化した場合の符号化コストの評価値を算出し,その評価値によって現領域をスキップ領域として符号化するか否かを決定する
ことを特徴とする動画像符号化方法。
In a moving image coding method for dividing an input image into regions and coding image information using a bidirectional inter-frame predictive coding method, a forward inter-frame predictive coding method, or a backward inter-frame predictive coding method,
When coding the current area as the skip area having no inter-frame prediction mode encoded data and the motion vector coding data and the prediction error coded data,
If there is an area that uses the forward prediction mode and an area that uses the backward interframe prediction method as the interframe prediction mode of the adjacent area, the interframe prediction mode of the current area is set to the bidirectional prediction mode. ,
If there is no region that uses the backward prediction mode as the inter-frame prediction mode of the adjacent region, set the inter-frame prediction mode of the current region to the forward prediction mode,
If there is no region that uses the forward prediction mode as the inter-frame prediction mode of the adjacent region, set the inter-frame prediction mode of the current region to the backward prediction mode,
An evaluation value of a coding cost when a prediction image is obtained from a reference image determined based on the set inter-frame prediction mode of the set current area and an image of the current area is encoded is calculated. A moving picture coding method characterized by determining whether or not to code a region as a skip region .
画像を分割した領域毎に,両方向フレーム間予測符号化方式または前方向フレーム間予測符号化方式または後方向フレーム間予測符号化方式を使って画像情報を復号する動画像復号方法において,
現領域をフレーム間予測モード符号化データと動きベクトル符号化データと予測誤差符号化データを持たないスキップ領域として復号する場合に,
隣接領域のフレーム間予測モードとして前方向予測モードを使っている領域と後方向フレーム間予測方式を使っている領域とがある場合には,現領域のフレーム間予測モードを両方向予測モードに設定し,
隣接領域のフレーム間予測モードとして後方向予測モードを使っている領域がない場合には,現領域のフレーム間予測モードを前方向予測モードに設定し,
隣接領域のフレーム間予測モードとして前方向予測モードを使っている領域がない場合には,現領域のフレーム間予測モードを後方向予測モードに設定し,
前記設定された現領域のフレーム間予測モードに基づいて参照画像を決定し,その参照画像から予測画像を求めて現領域の画像を復号する
ことを特徴とする動画像復号方法。
In a moving picture decoding method for decoding image information using a bidirectional inter-frame predictive encoding scheme, a forward inter-frame predictive encoding scheme, or a backward inter-frame predictive encoding scheme for each region obtained by dividing an image,
When decoding the current area as the skip area having no inter-frame prediction mode encoded data and the motion vector coding data and the prediction error coded data,
If there is an area that uses the forward prediction mode and an area that uses the backward interframe prediction method as the interframe prediction mode of the adjacent area, the interframe prediction mode of the current area is set to the bidirectional prediction mode. ,
If there is no region that uses the backward prediction mode as the inter-frame prediction mode of the adjacent region, set the inter-frame prediction mode of the current region to the forward prediction mode,
If there is no region that uses the forward prediction mode as the inter-frame prediction mode of the adjacent region, set the inter-frame prediction mode of the current region to the backward prediction mode,
A moving picture decoding method comprising: determining a reference picture based on the set inter-frame prediction mode of the current area, obtaining a predicted picture from the reference picture, and decoding the picture of the current area .
入力画像を領域に分割し,両方向フレーム間予測符号化方式または前方向フレーム間予測符号化方式または後方向フレーム間予測符号化方式を使って画像情報を符号化する動画像符号化装置において,
領域毎の画像を入力する画像入力部と,
既に符号化した領域のフレーム間予測モードを蓄積する予測モード蓄積部と,
領域をフレーム間予測モード符号化データと動きベクトル符号化データと予測誤差符号化データを持たないスキップ領域として符号化する場合に,前記予測モード蓄積部に蓄積した予測モードを参照し,隣接領域のフレーム間予測モードとして前方向予測モードを使っている領域と後方向予測モードを使っている領域とがある場合には,現領域のフレーム間予測モードを両方向予測モードに設定し,隣接領域のフレーム間予測モードとして後方向予測モードを使っている領域がない場合には,現領域のフレーム間予測モードを前方向予測モードに設定し,隣接領域のフレーム間予測モードとして前方向予測モードを使っている領域がない場合には,現領域のフレーム間予測モードを後方向予測モードに設定するスキップ予測モード判定部と,
入力画像と参照画像との間で動き探索を行い,前方向予測モードまたは後方向予測モードまたは両方向予測モードにおける予測誤差を求め,予測誤差を使っていずれの予測モードで符号化するのかを判定し,判定した予測モードに従って符号化する動きベクトルを決定し,さらに前記スキップ予測モード判定部で設定されたフレーム間予測モードに関しては,そのフレーム間予測モードに基づいて決定された参照画像から予測画像を求めて現領域の画像を符号化した場合の符号化コストの評価値をもとに現領域を前記スキップ領域として符号化するかどうかを決定する動き探索/符号化モード判定部と,
前方向予測モードで動き補償に用いる予測画像を作成する前方向動き補償部と,
後方向予測モードで動き補償に用いる予測画像を作成する後方向動き補償部と,
両方向予測モードで動き補償に用いる予測画像を作成する両方向動き補償部と,
予測誤差を求めて符号化して量子化する予測誤差符号化/量子化部と,
量子化された符号化データを復号して復号画像を作成する復号部と,
復号画像を蓄積する参照画像メモリと,
動きベクトルを蓄積する動きベクトル蓄積部と,
を備えることを特徴とする動画像符号化装置。
In a video encoding apparatus that divides an input image into regions and encodes image information using a bidirectional inter-frame predictive encoding scheme, a forward inter-frame predictive encoding scheme, or a backward inter-frame predictive encoding scheme,
An image input unit for inputting an image for each area;
A prediction mode storage unit for storing the inter-frame prediction mode of the already encoded region;
When coding the current area as the skip area with no inter-frame prediction mode encoded data and the motion vector coding data and the prediction error coding data, with reference to the prediction mode stored in the prediction mode storage unit, adjacent If there are an area using the forward prediction mode and an area using the backward prediction mode as the inter-frame prediction mode of the area, the inter-frame prediction mode of the current area is set to the bidirectional prediction mode, and the adjacent area If there is no region that uses the backward prediction mode as the inter-frame prediction mode of the current region, the inter-frame prediction mode of the current region is set to the forward prediction mode, and the forward prediction mode is set as the inter-frame prediction mode of the adjacent region. If there is no region in which use is skip prediction mode determining unit for setting the inter-frame prediction mode for the current region in the backward prediction mode ,
A motion search is performed between the input image and the reference image, the prediction error in the forward prediction mode, the backward prediction mode, or the bidirectional prediction mode is obtained, and the prediction error is used to determine which prediction mode is used for encoding. , Determining a motion vector to be encoded according to the determined prediction mode, and regarding the inter-frame prediction mode set by the skip prediction mode determination unit, a prediction image is determined from a reference image determined based on the inter-frame prediction mode. A motion search / encoding mode determination unit that determines whether to encode the current region as the skip region based on an evaluation value of the encoding cost when the current region image is encoded
A forward motion compensation unit for creating a prediction image used for motion compensation in the forward prediction mode;
A backward motion compensation unit for creating a prediction image used for motion compensation in the backward prediction mode;
A bidirectional motion compensator for creating a prediction image used for motion compensation in the bidirectional prediction mode;
A prediction error encoding / quantization unit that obtains a prediction error, encodes it, and quantizes it;
A decoding unit that decodes the quantized encoded data to create a decoded image;
A reference image memory for storing decoded images;
A motion vector storage unit for storing motion vectors;
A moving picture encoding apparatus comprising:
画像を分割した領域毎に,両方向フレーム間予測符号化方式または前方向フレーム間予測符号化方式または後方向フレーム間予測符号化方式を使って画像情報を復号する動画像復号装置において,
現領域をフレーム間予測モード符号化データと動きベクトル符号化データと予測誤差符号化データとを持たないスキップ領域として符号化しているか否かを示す情報と,現領域が前記スキップ領域でない場合にフレーム間予測モードを復号する予測モード復号部と,
既に復号した領域のフレーム間予測モードを蓄積する予測モード蓄積部と,
現領域が前記スキップ領域である場合に,前記予測モード蓄積部に蓄積したフレーム間予測モードを参照し,隣接領域のフレーム間予測モードとして前方向予測モードを使っている領域と後方向予測モードを使っている領域とがある場合には,現領域のフレーム間予測モードを両方向予測モードに設定し,隣接領域のフレーム間予測モードとして後方向予モードを使っている領域がない場合には,現領域のフレーム間予測モードを前方向予測ードに設定し,隣接領域のフレーム間予測モードとして前方向予測モードを使っている領域がない場合には,現領域のフレーム間予測モードを後方向予測モードに設定するスキップ予測モード判定部と,
前記予測モード復号部が復号したフレーム間予測モードまたは前記スキップ予測モード判定部が設定したフレーム間予測モードが前方向予測モードである場合に,前方向予測モードで動き補償に用いる予測画像を作成する前方向動き補償部と,
前記予測モード復号部が復号したフレーム間予測モードまたは前記スキップ予測モード判定部が設定したフレーム間予測モードが後方向予測モードである場合に,後方向予測モードで動き補償に用いる予測画像を作成する後方向動き補償部と,
前記予測モード復号部が復号したフレーム間予測モードまたは前記スキップ予測モード判定部が設定したフレーム間予測モードが両方向予測モードである場合に,両方向予測モードで動き補償に用いる予測画像を作成する両方向動き補償部と,
予測誤差を逆量子化して復号する予測誤差逆量子化/復号部と,
復号画像を蓄積する参照画像メモリと,
動きベクトルを蓄積する動きベクトル蓄積部と,
を備えることを特徴とする動画像復号装置。
In a video decoding device that decodes image information using a bidirectional inter-frame predictive coding method, a forward inter-frame predictive coding method, or a backward inter-frame predictive coding method for each region obtained by dividing an image,
Information indicating whether or not the current area is encoded as a skip area having no inter-frame prediction mode encoded data, motion vector encoded data, and prediction error encoded data, and a frame when the current area is not the skip area and prediction mode decoding unit that decodes the between prediction mode,
A prediction mode storage unit for storing the inter-frame prediction mode of the already decoded area;
When the current region is the skip region, the inter-frame prediction mode stored in the prediction mode storage unit is referred to, and the region using the forward prediction mode and the backward prediction mode are used as the inter-frame prediction mode of the adjacent region. If there are and a region in which use is to set the inter-frame prediction mode of the current area in the bidirectional prediction mode, if there is no area that uses the backward prediction mode as the inter-frame prediction modes of the adjacent region, set the inter-frame prediction mode for the current region in the forward prediction mode, if there is no area that uses a forward prediction mode as the inter-frame prediction modes of the adjacent regions after the inter-frame prediction mode of the current region A skip prediction mode determination unit for setting the direction prediction mode ;
When the inter-frame prediction mode decoded by the prediction mode decoding unit or the inter-frame prediction mode set by the skip prediction mode determination unit is the forward prediction mode, a prediction image used for motion compensation is generated in the forward prediction mode A forward motion compensation unit;
When the inter-frame prediction mode decoded by the prediction mode decoding unit or the inter-frame prediction mode set by the skip prediction mode determination unit is the backward prediction mode, a prediction image used for motion compensation is generated in the backward prediction mode A backward motion compensation unit;
Bidirectional motion for creating a prediction image used for motion compensation in bidirectional prediction mode when the interframe prediction mode decoded by the prediction mode decoding unit or the interframe prediction mode set by the skip prediction mode determination unit is a bidirectional prediction mode A compensation section;
A prediction error dequantization / decoding unit for dequantizing and decoding the prediction error;
A reference image memory for storing decoded images;
A motion vector storage unit for storing motion vectors;
A moving picture decoding apparatus comprising:
JP2002185661A 2002-06-26 2002-06-26 Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus Expired - Lifetime JP3866624B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002185661A JP3866624B2 (en) 2002-06-26 2002-06-26 Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002185661A JP3866624B2 (en) 2002-06-26 2002-06-26 Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus

Publications (2)

Publication Number Publication Date
JP2004032355A JP2004032355A (en) 2004-01-29
JP3866624B2 true JP3866624B2 (en) 2007-01-10

Family

ID=31181221

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002185661A Expired - Lifetime JP3866624B2 (en) 2002-06-26 2002-06-26 Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus

Country Status (1)

Country Link
JP (1) JP3866624B2 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005348093A (en) * 2004-06-03 2005-12-15 Sony Corp Image processor, program and method thereof
US8861601B2 (en) 2004-08-18 2014-10-14 Qualcomm Incorporated Encoder-assisted adaptive video frame interpolation
JP2008244566A (en) * 2007-03-26 2008-10-09 Nec Corp Moving image quality improving method in decoding in macro block skip mode
KR101366241B1 (en) * 2007-03-28 2014-02-21 삼성전자주식회사 Method and apparatus for video encoding and decoding
JP4977094B2 (en) * 2008-06-25 2012-07-18 株式会社東芝 Image coding method
JP5222958B2 (en) * 2008-12-16 2013-06-26 株式会社日立製作所 Moving picture coding apparatus, moving picture coding method, moving picture decoding apparatus, and moving picture decoding method
JP5184447B2 (en) * 2009-06-22 2013-04-17 株式会社Kddi研究所 Video encoding apparatus and decoding apparatus
WO2012081225A1 (en) * 2010-12-14 2012-06-21 パナソニック株式会社 Image encoding method and image decoding method
US10778969B2 (en) 2010-12-17 2020-09-15 Sun Patent Trust Image coding method and image decoding method
WO2012090478A1 (en) * 2010-12-28 2012-07-05 パナソニック株式会社 Moving image coding method and moving image decoding method
WO2012098866A1 (en) * 2011-01-18 2012-07-26 パナソニック株式会社 Video encoding method and video decoding method
TW201246943A (en) * 2011-01-26 2012-11-16 Panasonic Corp Video image encoding method, video image encoding device, video image decoding method, video image decoding device, and video image encoding and decoding device
JP5197864B2 (en) * 2012-04-12 2013-05-15 株式会社東芝 Image decoding method and apparatus
CN103634606B (en) * 2012-08-21 2015-04-08 腾讯科技(深圳)有限公司 Video encoding method and apparatus
JP6514307B2 (en) * 2017-12-05 2019-05-15 株式会社東芝 Video coding apparatus and method

Also Published As

Publication number Publication date
JP2004032355A (en) 2004-01-29

Similar Documents

Publication Publication Date Title
JP4193406B2 (en) Video data conversion apparatus and video data conversion method
KR100774296B1 (en) Method and apparatus for encoding and decoding motion vectors
JP4724351B2 (en) Image encoding apparatus, image encoding method, image decoding apparatus, image decoding method, and communication apparatus
US8559515B2 (en) Apparatus and method for encoding and decoding multi-view video
JP5061179B2 (en) Illumination change compensation motion prediction encoding and decoding method and apparatus
JP4752631B2 (en) Image coding apparatus and image coding method
US7426308B2 (en) Intraframe and interframe interlace coding and decoding
EP1927249B1 (en) Apparatus and method for encoding and decoding multi-view video
JP3866624B2 (en) Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus
JP2004336369A (en) Moving image encoder, moving image decoder, moving image encoding method, moving image decoding method, moving image encoding program and moving image decoding program
KR20070011225A (en) Method and apparatus for minimizing number of reference pictures used for inter-coding
US20100020881A1 (en) Motion vector detecting device, motion vector detecting method, image encoding device, and program
JPH07162869A (en) Moving image encoder
US20100014765A1 (en) Motion vector detecting device, motion vector detecting method, image encoding device, and program
WO2012098845A1 (en) Image encoding method, image encoding device, image decoding method, and image decoding device
JP3940657B2 (en) Moving picture encoding method and apparatus and moving picture decoding method and apparatus
US20070133689A1 (en) Low-cost motion estimation apparatus and method thereof
JP2013115583A (en) Moving image encoder, control method of the same, and program
JP2006100871A (en) Coder, coding method, program of coding method, and recording medium with the program recorded thereon
US10148954B2 (en) Method and system for determining intra mode decision in H.264 video coding
WO2011099242A1 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
KR100774297B1 (en) Method and apparatus for decoding motion vectors
JP5946980B1 (en) Image decoding method
JP6181242B2 (en) Image decoding method
JP5951915B2 (en) Image decoding method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060606

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060807

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060807

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: 20061003

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061005

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3866624

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: R3D02

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

Free format text: PAYMENT UNTIL: 20101013

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101013

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111013

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111013

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121013

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20121013

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131013

Year of fee payment: 7

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term