JP4034180B2 - Moving picture compression coding apparatus and motion vector detection method - Google Patents

Moving picture compression coding apparatus and motion vector detection method Download PDF

Info

Publication number
JP4034180B2
JP4034180B2 JP2002373296A JP2002373296A JP4034180B2 JP 4034180 B2 JP4034180 B2 JP 4034180B2 JP 2002373296 A JP2002373296 A JP 2002373296A JP 2002373296 A JP2002373296 A JP 2002373296A JP 4034180 B2 JP4034180 B2 JP 4034180B2
Authority
JP
Japan
Prior art keywords
motion vector
vector detection
detection range
motion
moving 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 - Fee Related
Application number
JP2002373296A
Other languages
Japanese (ja)
Other versions
JP2003259373A (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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2002373296A priority Critical patent/JP4034180B2/en
Publication of JP2003259373A publication Critical patent/JP2003259373A/en
Application granted granted Critical
Publication of JP4034180B2 publication Critical patent/JP4034180B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、動画像を圧縮符号化するための動画像圧縮符号化装置と、その動きベクトル検出方法、記録媒体、及びプログラムに関する。
【0002】
【従来の技術】
動画像圧縮符号装置において、動きベクトル検出装置は、動きベクトルの検出精度を高めようとすると、ハードウェア規模が大きくならざるを得ない。そのため動きベクトル検出は、検出範囲は狭いが検出精度は高いモード、あるいは、検出範囲は広いが検出精度は低いモードで行われている。
【0003】
従来の動きベクトル検出装置を図10に示す(例えば、特許文献1参照。)101は動画像圧縮符号化器に現在のフレーム信号である参照フレーム信号を入力する参照フレーム信号入力端子で、102は動画像圧縮符号化器に1つ前のフレーム信号である予測フレーム信号を入力する予測フレーム信号入力端子である。103は検出範囲は広いが検出精度は低いモードで動きベクトル検出を行う広域動きベクトル検出器であり、104は検出範囲は狭いが検出精度は高いモードで動きベクトル検出を行う狭域動きベクトル検出器であり、105は広域動きベクトル検出器103と狭域動きベクトル検出器104とで得られた動きベクトル検出結果を比較評価する比較器であり、106は比較器105の比較結果に基づき、広域動きベクトル検出器103、あるいは狭域動きベクトル検出器104からの動きベクトル検出の結果いずれかを出力する切換器であり、107は広域動きベクトル検出器で検出した動きベクトルを出力する出力端子である。
【0004】
以上のように構成された従来の動きベクトル検出装置について、その動作について説明する。まず、参照フレーム信号入力端子101から入力した参照フレーム信号はローパスフィルタ108及びダウンサンプリング回路109を経て広域動きベクトル検出器103に入力される。それと共に、参照フレーム信号入力端子101から入力した参照フレーム信号は、狭域動きベクトル検出器104にも入力される。同様に、予測フレーム信号入力端子102から入力した予測フレーム信号はローパスフィルタ110及びダウンサンプリング回路111を経て広域動きベクトル検出器103に入力される。それと共に、予測フレーム信号入力端子102から入力した予測フレーム信号は、狭域動きベクトル検出器104にも入力される。それぞれの動きベクトル検出器103及び104で検出された動きベクトルは、比較器105で比較評価され、評価の高い方の動きベクトルを切換器106から出力端子107に出力される。
【0005】
しかしながら図10の動きベクトル検出装置の構成では、より適正な動きベクトルを検出するため動きベクトル検出範囲の数(以下、モード数と称す)を、例えば2つにすると、モード数が1つの場合に比べてハードウェア規模が増大する。
【0006】
すなわち、動きベクトル検出範囲の数を例えば検出範囲は狭いが検出精度は高い動きベクトルの検出範囲と、検出範囲は広いが検出精度は低い動きベクトル検出範囲との2つにすると、検出範囲は狭いが検出精度は高い狭域動きベクトル検出器104と、検出範囲は広いが検出精度は低い広域動きベクトル検出器103との2種類のハードウェアが必要になる。そして、それぞれの動きベクトル検出器について、同時に動きベクトル検出を実行する必要があり、2つの動きベクトル検出器103及び104それぞれに独立した動きベクトル検出回路が必須となり、動きベクトル検出回路等のハードウェア規模が大きくなるという課題があった。
【0007】
図10で説明した従来の動きベクトル検出装置の課題を解決するために、図11に示す動画像圧縮符号化装置が知られている(例えば、特許文献2参照。)。
【0008】
すなわち、図11は、従来の動画像圧縮符号化装置のブロック図である。図11において、301はDCT回路であり、302は量子化器であり、303は逆量子化器であり、304は逆DCT回路であり、305はフレームメモリであり、306は動き補償フレーム間予測回路であり、307Aは動き検出装置であり、308はフレーム内・フレーム間切り替え信号である。また、動き検出装置307Aは、バッファメモリ201、誤差計算回路202、誤差比較回路203、アドレス発生回路204からなる。
【0009】
以上のように構成された従来の画像符号化装置について、以下その動作を説明する。符号化の最初のフレーム、すなわち第1フレームは、フレーム内・フレーム間切り替え信号308により、フレーム内符号化に切り替えられ、差分が取られることなく、フレームごとにフレーム内符号化される。すなわち、画像データは、2次元ブロック単位でDCT回路301で変換係数に変換され、量子化器302で変換係数を量子化された後、伝送路に送出される。一般的に、画像は相関が高いため、DCTを行うと、低い周波数成分に対応する変換係数にエネルギーが集中する。したがって、視覚的に目立たない高い周波数成分を粗く、重要な成分である低い周波数成分を細かく量子化を行うことで、画質劣化を最小限にとどめ、かつデータ量を減らすことが可能となる。上記伝送路に送出した量子化後の変換係数は、同時に逆量子化器303、逆DCT変換回路304を経て実時間データに戻され、フレームメモリ305に蓄えられる。
【0010】
一方、第2フレーム以降の画像は、フレーム内・フレーム間切り替え信号308により、フレーム間符号化に切り替えられ、動き補償された上で前フレームの画像との差分が取られ、フレームごとにフレーム間の画像信号の差分が符号化される。つまり、フレームメモリ305に格納した前フレームの画像データと動き検出装置307Aで検出した2次元ブロック単位の動きベクトルとに基づいて第2フレーム以降の画像の予測値が動き補償フレーム間予測回路306で生成され、第2フレーム以降の画像と動き補償フレーム間予測回路306で生成された第2フレーム以降の予測値との差分である予測誤差が、2次元ブロック単位でDCT回路301で変換係数に変換され、量子化器302で変換係数を量子化された後、伝送路に送出される。上記伝送路に送出した量子化後の変換係数は、同時に逆量子化器303、逆DCT変換回路304を経て実時間データに戻し、フレームメモリ305に蓄える。
【0011】
つぎに、動き検出装置307Aについて詳しく説明する。この動き検出装置307Aでは、例えば良く知られた、全探索方法を用いて、2次元ブロック単位にフレーム間の動きベクトルを求める構成となっている。図12は動き検出装置307Aの動作を示す説明図で、以下、図12を参照しながら動き検出動作を説明する。図12において、311は第2フレームのある1つの2次元ブロックでm画素(水平方向)×n画素(垂直方向)の矩形ブロックからなる。312A,312Bは誤差計算を行うための第1フレームの2次元ブロックであり、大きさは2次元ブロック311と同じ大きさである。313は動き検出によって求めた動きベクトルで、2次元ブロック311の中心座標と2次元ブロック312Bの中心座標を結ぶものである。
【0012】
図12における二次元ブロック311は、第2フレームにおける中心座標(x,y,2) を有する2次元ブロックであり、二次元ブロックを中心座標に対応した記号S(x,y,2)で表す。また、2次元ブロック312A,312Bは第1フレームにおける中心座標(x,y,1) ,(x+mx,y+my,1) をそれぞれ有する2次元ブロックであり、同様に二次元ブロックを中心座標に対応した記号S(x,y,2),S(x+mx,y+my,1)で表す。ただし、xはフレームの中心を原点とする水平方向の画素座標を示し、yはフレームの中心を原点とする垂直方向の画素座標を示し、x,yの後の1,2の数字はフレーム番号を示す。また、314は動きベクトルを計算する2次元ブロックを示す矩形(水平方向2h、垂直方向2v)の動きベクトル検出範囲であり、xhは動きベクトル検出範囲の中心(図では、座標(x,y,1) )を原点とする水平方向の局部画素座標を示し、yvは動きベクトル検出範囲の中心(図では、座標(x,y,1) )を原点とする垂直方向の局部画素座標を示している。
【0013】
第2フレームの画像データは、フレーム間符号化されるときに、同時にバッファメモリ201に入力する。なお、第1フレームの画像データは、既にバッファメモリ201に格納されている。今、基準を第2フレーム(現フレーム)の2次元ブロック311とし、第1フレーム(前フレーム)の2次元ブロック312Bと第2フレーム(現フレーム)の2次元ブロック311の間の動きベクトル313を検出する。バッファメモリ201に入力した第1,第2フレームの画像は、m×n画素ずつの2次元ブロック単位で読み出し、2次元ブロック単位で動きベクトルを検出する。
【0014】
以下、座標を用いて動きベクトルの検出手順について、具体的に説明する。アドレス発生回路204により、第2フレームにおける中心座標(x,y,2) を有する2次元ブロックS(x,y,2)の画像データを読み出し、この2次元ブロックS(x,y,2)を基準ブロックにとり、以下の手順でこの基準ブロックと第1フレームとの間の動きを検出する。バッファメモリ201には上述したように第1フレームの画像データも格納してあり、つぎに第1フレームにおける中心座標(x,y,1) を有する2次元ブロックS(x,y,1)の各画像データを読み出す。誤差計算回路202では、前記2つの2次元ブロックS(x,y,2),S(x,y,1)における画像データの振幅の2乗誤差の和(以下、単に誤差という)σ(x,y)(0,0)を〔数1〕で計算し、誤差比較回路203に送る。
【0015】
【数1】

Figure 0004034180
【0016】
次に、アドレス発生回路204は、第1フレームにおける水平方向1画素隣のm×nブロックすなわち中心座標(x+1,y,1) の二次元ブロックS(x+1,y,1)のアドレスを発生する。誤差計算回路202では、同様にσ(x,y)(+1,0) を計算し、誤差比較回路203に送る。誤差比較回路203では、σ(x,y)(0,0)とσ(x,y)(+1,0) を比較し、小さい方を選択する。以下同様に、−h<xh<h、−v<yv<vの範囲でアドレスを逐次変更しながら2次元ブロックの画像データを読み出し、σ(x,y)(xh,yv)を計算する。
【0017】
誤差比較回路203は、以上で計算された誤差σ(x,y)(xh,yv)から最小値をとる誤差σ(x,y)(mx,my)を選択し、同時にアドレスmx,myを出力する。したがって、2次元ブロックS(x,y,2)における動きベクトル213はmv(mx, my)となる。以下、第2フレーム内において、複数に分割された2次元ブロックの全てについて上記した動作を繰り返すことにより、第2フレーム内の全ての2次元ブロックの動きベクトルが求まる。
【0018】
動き補償フレーム間予測回路306は、第2フレームについて各2次元ブロック毎に検出した動きベクトルを用いて、第2フレームの動き補償した予測値を2次元ブロック単位で生成する。第2フレームの画像は、まず第1フレームの画像データと第2フレームの動きベクトルから上述した方法で生成した予測値との差分、すなわち予測誤差を計算する。その後、前述した予測誤差をフレーム毎に、第1フレームと同様の方法で符号化する。
【0019】
以上のような構成により、現フレームを分割した2次元ブロックの位置を中心とする前フレームの所定の動きベクトル検出範囲内で、現フレームを分割した2次元ブロックと同じ大きさの2次元ブロックの画像データを逐次位置を変更しながら抽出し、前フレームの所定の動きベクトル検出範囲内の各2次元ブロックの画像データと現フレームの分割した2次元ブロックの画像データとの誤差計算および前フレームの所定の動きベクトル検出範囲内の位置の異なる2次元ブロックについての誤差比較を行うことにより、現フレームを分割した2次元ブロックに対して画像データの誤差がもっとも最も少ない前フレームの所定の動きベクトル検出範囲内の2次元ブロックの位置を探索し、現フレームを分割した2次元ブロックの位置と現フレームを分割した2次元ブロックに対して画像データの誤差がもっとも最も少ない前フレームの所定の動きベクトル検出範囲内の2次元ブロックの位置とから現フレームを分割した2次元ブロックの前フレームからの画面上の動きを示す動きベクトルを計算することになる。
【0020】
以上の方法によれば、予測誤差を符号化することになるので、フレーム内符号化のように、画像データを直接符号化する場合に比べ、エネルギーが減少し、さらに高効率な符号化が可能となる。
【0021】
次に第3フレーム以降の動作について説明する。第3フレーム以降の各フレームの動きベクトルを計算する際に、前フレーム(第3フレームの場合には、第2フレーム)の動きベクトルを、画像の動きの大きさを示す時間的に前に検出された動きベクトル検出範囲決定用情報としてCPU205に入力し、以下に示すような演算処理を行って、アドレス発生回路204を制御することにより動きベクトル検出範囲を変更する。
【0022】
図13はCPU5の処理動作を示すフローチャートである。図13について説明すると、ステップ21で前フレーム(例えば、第2フレーム)の全2次元ブロックの動きベクトルを読み込み、ステップ22で通常時の動きベクトル検出範囲の水平方向の最大値hを示す動きベクトルの個数をカウントする。ステップ23で個数が全ブロックの50以上かどうかを判定し、個数が全ブロックの50%以上である場合には画像の動きが大きいものとして水平方向の動きベクトル検出範囲を例えば2hに拡大する。動きベクトル検出範囲を2倍に拡大するためには、ステップ24に示したように誤差計算回路2への入力を1サンプル毎に間引いて、すなわち1/2にサブサンプルして入力するようにアドレス発生回路4を制御する。このようにすることにより、各2次元ブロック当たりの計算量は1/2になるので、動きベクトル検出範囲が2倍になっても、総計算量は動きベクトル検出範囲を広げない場合と等しくなる。また、ステップ25に示すようにh/2を超える動きベクトルの個数も同時にカウントしておき、ステップ26でh/2を超える動きベクトルの個数が10%以下であるか判定し、10%以下であるときは、動きが少ないものとして動きベクトル検出範囲をh/2とする。この場合には、誤差計算回路2へは間引かずに入力する(ステップ27)。なお、hを超える動きベクトルが50%未満で、かつh/2を超える動きベクトルの個数が10%を超えている場合は、動きベクトル検出範囲の変更を行わず、サブサンプリングは行わない。
【0023】
上記動作により、画像の動きが大きいときには計算量を増加させることなく動きベクトル検出範囲を広げることが可能となる。一般的に、サブサンプルした画像から動き検出を行うと、動きの検出精度が低下するため画質劣化につながる。しかしながら動きの大きな場合は、動きが追従しないことに起因する画質劣化の方が影響が大きいため、サブサンプルした画像であっても動きベクトル検出範囲を拡大した方が画質は向上する。また、動きの少ないときはサブサンプルしない画像で動き検出を行うので、画質劣化を生ずることはなく、さらに動きベクトル検出範囲を狭めているので、探索に要する処理時間を短くできる。
【0024】
このように、画像の動きに応じて動きベクトル検出範囲を変えることができ、大きな動きに対応することができてフレーム間差分を小さくすることができ、画質を劣化させない。しかも、動きベクトルの計算のための演算量が増えないので、動きベクトル演算のためのハードウェア量が増えることはない。
【0025】
【特許文献1】
特開平9−224249号公報
【特許文献2】
特開平10−23420号公報
【0026】
【発明が解決しようとする課題】
しかしながら図11で説明した従来の動画像圧縮符号化装置では、動きの大きな画像に対しては、適正な動きベクトルを検出することが出来ず、さらに適正な動きベクトル検出範囲を設定することが困難である。
【0027】
すなわち、図11で説明した従来の動画像圧縮符号化装置では、図14に示すように動きベクトル検出範囲320に対して、動きベクトル検出範囲320の最外周に乗っている動きベクトルPの個数が全ブロック数の50%以上になった場合に動きベクトル検出範囲320を拡大していた。すなわち、動きベクトル検出範囲320の最外周上に乗っている動きベクトルPのみを検出していた。ところが、動きベクトル検出範囲320の最外周に乗っている動きベクトルPよりも適正な動きベクトルが動きベクトル検出範囲320の外部に存在する可能性がある。このような場合であっても、図11で説明した従来の動画像圧縮符号化装置では、適正な動きベクトルを検出する代わりに動きベクトルPを検出して用いていた。
【0028】
すなわち、従来の動画像圧縮符号化装置では、動きの大きな画像に対しては、適正な動きベクトルを検出することが出来ず、さらに適正な動きベクトル検出範囲を設定することは困難であるという課題がある。
【0029】
本発明は、上記課題を考慮し、動きの大きな画像であっても適正な動きベクトルを検出することが出来、また、適正な動きベクトル検出範囲を設定することが出来る動画像圧縮符号化装置、動きベクトル検出方法、記録媒体、及びプログラムを提供することを目的とするものである。
【0030】
【課題を解決するための手段】
上述した課題を解決するために、第1の本発明は、入力動画像映像を1フレームに付きN(但し、Nは2以上の自然数)個に細分化したマクロブロック動画像信号を生成するマクロブロック生成手段(2)と、
前記マクロブロック動画像信号を圧縮符号化した後に復号化して復号化動画像信号を生成する符号復号化手段(18、17、3、4、9、10、19、20、11)と、
前記復号化動画像信号と前記マクロブロック動画像信号とから第1の動きベクトル検出範囲内で動きベクトルを検出する動きベクトル検出手段(12)と、
検出された前記動きベクトルのうち、前記第1の動きベクトル検出範囲の最外線である第1の最外線と、前記第1の動きベクトル検出範囲の内側にある第2の動きベクトル検出範囲の最外線である第2の最外線との間にある動きベクトルの数を第1の動きベクトルの数としてカウントする動きベクトルカウント手段(14、15、16)と、
カウントされた前記第1の動きベクトルの数に基づいて前記第1の動きベクトル検出範囲を拡大する動きベクトル検出範囲決定手段(13)とを備えた動画像圧縮符号化装置である。
【0031】
また、第2の本発明は、前記動きベクトルカウント手段(14、15、16)は、前記第2の動きベクトル検出範囲の内側にある第3の動きベクトル検出範囲内にある動きベクトルの数を第2の動きベクトルの数としてカウントし、
前記動きベクトル検出範囲決定手段(13)は、カウントされた前記第2の動きベクトルの数に基づいて前記第1の動きベクトル検出範囲を縮小する第1の本発明の動画像圧縮符号化装置である。
【0032】
また、第3の本発明は、前記動きベクトル検出範囲決定手段(13)は、カウントされた前記第1の動きベクトルの数が所定の閾値より多い場合、前記第1の動きベクトル検出範囲を拡大し、前記所定の閾値より小さい場合、前記第1の動きベクトル検出範囲を拡大しないまたは前記第1の動きベクトル検出範囲を変更しない第1の本発明の動画像圧縮符号化装置である。
【0033】
また、第4の本発明は、前記動きベクトル検出範囲決定手段(13)は、カウントされた前記第1の動きベクトルの数が多いほど前記第1の動きベクトル検出範囲の拡大率を大きくする第1の本発明の動画像圧縮符号化装置である。
【0034】
また、第5の本発明は、前記動きベクトル検出範囲決定手段(13)は、カウントされた前記第2の動きベクトルの数が多いほど前記第1の動きベクトル検出範囲の縮小率を大きくする第2の本発明の動画像圧縮符号化装置である。
【0035】
また、第6の本発明は、前記動きベクトル検出範囲決定手段(13)は、予め複数種類の動きベクトル検出範囲を有しており、
その複数種類の動きベクトル検出範囲から、カウントされた前記第1の動きベクトルの数が多いほど大きな動きベクトル検出範囲を選択して、前記第1の動きベクトル検出範囲とする第1の本発明の動画像圧縮符号化装置である。
【0036】
また、第7の本発明は、前記動きベクトル検出範囲決定手段(13)は、予め複数種類の動きベクトル検出範囲を有しており、
その複数種類の動きベクトル検出範囲から、カウントされた前記第2の動きベクトルの数が多いほど小さな動きベクトル検出範囲を選択して、前記第1の動きベクトル検出範囲とする第2の本発明の動画像圧縮符号化装置である。
【0037】
また、第8の本発明は、前記動きベクトル検出範囲決定手段(13)は、前記第1の動きベクトル検出範囲の更新を、Pフレーム毎に行う、またはPフレームをn個(但し、n≦Nの自然数)に分割した分割単位毎に行い、
前記第1の動きベクトル検出範囲が更新される際、前記動きベクトル検出範囲決定手段は、前記Pフレームのまたは前記分割単位のカウントされた前記第1の動きベクトルの数を、前記Pフレームにまたは前記分割単位に存在するマクロブロック動画像信号の数で割った数が、所定の閾値以上になった場合に、前記第1の動きベクトル検出範囲を拡大する第1の本発明の動画像圧縮符号化装置であるまた、第9の本発明は、前記動きベクトル検出範囲決定手段(13)は、前記第1の動きベクトル検出範囲の更新を、Pフレーム毎に行う、またはPフレームをn個(但し、n≦Nの自然数)に分割した分割単位毎に行い、
前記第1の動きベクトル検出範囲が更新される際、前記動きベクトル検出範囲決定手段は、前記Pフレームのまたは前記分割単位のカウントされた前記第2の動きベクトルの数を、前記Pフレームにまたは前記分割単位に存在するマクロブロック動画像信号の数で割った数が、所定の閾値以上になった場合に、前記第1の動きベクトル検出範囲を縮小する第1の本発明の動画像圧縮符号化装置である。
【0038】
また、第10の本発明は、前記動きベクトル検出手段は、前記第1の動きベクトル検出範囲を拡大する際、前記第2の動きベクトル検出範囲をも拡大する第1、3、4、6、8の本発明のいずれかの動画像圧縮符号化装置である。
【0039】
また、第11の本発明は、前記動きベクトル検出手段は、前記第1の動きベクトル検出範囲を縮小する際、前記第3の動きベクトル検出範囲をも縮小する第2、4、7、9の本発明のいずれかの動画像圧縮符号化装置である。
【0040】
また、第12の本発明は、入力動画像映像を1フレームに付きN(但し、Nは2以上の自然数)個に細分化して生成されたマクロブロック動画像信号を圧縮符号化した後に復号化して生成された復号化動画像信号と、前記マクロブロック動画像信号とから第1の動きベクトル検出範囲内で動きベクトルを検出する動きベクトル検出ステップと、
検出された前記動きベクトルのうち、前記第1の動きベクトル検出範囲の最外線である第1の最外線と、前記第1の動きベクトル検出範囲の内側にある第2の動きベクトル検出範囲の最外線である第2の最外線との間にある動きベクトルの数を第1の動きベクトルの数としてカウントする動きベクトルカウントステップと、
前記第1の動きベクトル検出範囲の最外線である第1の最外線と、前記第1の動きベクトル検出範囲の内側にある第2の動きベクトル検出範囲の最外線である第2の最外線であって、前記第1の最外線に隣接する1本もしくは複数本の第2の最外線との上にある動きベクトルの数である第1の動きベクトルの数をカウントする動きベクトルカウントステップと、
カウントされた前記第1の動きベクトルの数に基づいて前記第1の動きベクトル検出範囲を拡大する動きベクトル検出範囲決定ステップとを備えた動きベクトル検出方法である。
【0041】
また、第13の本発明は、第12の本発明の動きベクトル検出方法の、入力動画像映像を1フレームに付きN(但し、Nは2以上の自然数)個に細分化して生成されたマクロブロック動画像信号を圧縮符号化した後に復号化して生成された復号化動画像信号と、前記マクロブロック動画像信号とから第1の動きベクトル検出範囲内で動きベクトルを検出する動きベクトル検出ステップと、
検出された前記動きベクトルのうち、前記第1の動きベクトル検出範囲の最外線である第1の最外線と、前記第1の動きベクトル検出範囲の内側にある第2の動きベクトル検出範囲の最外線である第2の最外線との間にある動きベクトルの数を第1の動きベクトルの数としてカウントする動きベクトルカウントステップと、
カウントされた前記第1の動きベクトルの数に基づいて前記第1の動きベクトル検出範囲を拡大する動きベクトル検出範囲決定ステップとをコンピュータに実行させるためのプログラムである。
【0042】
また、第14の本発明は、第13の本発明のプログラムを担持した記録媒体であって、コンピュータにより処理可能な記録媒体である。
【0043】
【発明の実施の形態】
以下に本発明の実施の形態を図面を参照して説明する。
【0044】
本発明の実施の形態によれば、例えば動きベクトル検出部(手段)で検出した動きベクトルに基づき適応的に求めた動きベクトル検出範囲を、当該動きベクトル検出部(手段)に帰還する構成を備えるため、動きベクトル検出部(手段)による動きベクトルを検出する動きベクトル検出範囲を、入力動画像映像の動きに合わせて設定することができ、より適正な動きベクトルを検出するため動きベクトル検出範囲数(すなわち、モード数)が複数存在する場合であっても回路規模を増大することなく、かつ動きベクトルの検出に際しての精度を向上することができる。
【0045】
また、本発明の実施の形態によれば、例えば入力動画像映像を細分化した単位で動きベクトル検出範囲を動きベクトル検出部に帰還する構成を備えるため、例えば1フレーム等の入力動画像映像のまとまった単位で入力動画像映像の動きに合わせた動きベクトル検出範囲を動きベクトル検出部に適切に設定でき、精度の高い動きベクトル検出範囲の設定を簡略化することができる。
【0046】
また、本発明の実施の形態によれば、例えば、適応的に求めた動きベクトル検出範囲の結果を参照し、予め複数種類備えた動きベクトル検出範囲から実際に適用する動きベクトル検出範囲を選択する構成を備えるため、動きベクトル検出部に設定する動きベクトル検出範囲の更新を入力動画像に応じて当該複数種類から自由に合わせることができ、例えば好み等の使用者の意図に合わせた動きベクトル検出が達成できる。また、動きベクトル検出部に設定する動きベクトル検出範囲を、入力動画像映像の動きに合わせた例えば使用者の意図に合わせた動きベクトル検出が達成できる。
【0047】
また、本発明の実施の形態によれば、例えば、帰還手段が動きベクトル検出範囲決定手段で決定した動きベクトル検出範囲を、動きベクトル検出手段及び切換領域生成手段に帰還する構成を備えるため、動きベクトル検出範囲の設定をより入力動画像映像の動きの速さに追従して決定でき、入力動画像映像の動きに合わせた動きベクトル検出範囲の即時性を高めることができる。
【0048】
また、本発明の実施の形態によれば、例えば、(動きベクトルが動きベクトル切換領域に存在する数)/(n個の期間に存在するマクロブロック数)が所定の閾値以上になった時、動きベクトル検出範囲を切り換え、切り換えた動きベクトル検出範囲を動きベクトル検出手段と切換領域生成手段とに帰還する構成を備えるため、入力動画像映像の符号化に際して発生符号量の削減ができ、入力動画像映像の動きに合わせた動きベクトルの検出をより高速化できる。
【0049】
(第1の実施の形態)
図1は本発明の第1の実施の形態における動画像圧縮符号化装置の構成を示すブロック図であり、MPEG(Moving Pictures Experts Group)方式の場合を示した例である。1は入力端子であり、2はフレーム並べ替え器であり、3は離散コサイン変換(以下、DCTと称す)器であり、4は量子化器であり、5は可変長符号化器であり、6はバッファメモリであり、7は出力端子であり、8はレート制御器であり、9は逆量子化器であり、10は逆DCT器であり、11はフレームメモリであり、12は予測器であり、13は検出範囲決定器であり、14は切換領域決定器であり、15は比較器であり、16はカウンタであり、17は減算器であり、18は切換スイッチであり、19は加算器であり、20はスイッチである。
【0050】
なお、本実施の形態のフレーム並べ替え器2は本発明のマクロブロック生成手段の例であり、本実施の形態の切替スイッチ18、減算器17、DCT器3、量子化器4、逆量子化器9、逆DCT器10、加算器19、スイッチ20、及びフレーム目盛り11は本発明の符号復号手段の例であり、本実施の形態の予測器12は本発明の動きベクトル検出手段の例であり、本実施の形態の切換領域決定器14、比較器15、及びカウンタ16は本発明の動きベクトルカウント手段の例であり、本実施の形態の検出範囲決定器13は本発明の動きベクトル検出範囲決定手段の例である。
【0051】
以上のように構成した各ブロックの動作を説明する。入力端子1から入力する原画信号は、映像音声信号の内予め音声信号と映像信号とに分離した映像信号である。映像信号は、フレーム並べ替え器2で一旦フレームに並べ替えた後、フレームを所定の画素数で細分化した単位(以下、マクロブロック単位と称す)の原画映像信号を、フレーム並べ替え器2で並べ替えた順番(以下、デコード順と称す)に切換スイッチ18に出力する。切換スイッチ18は、マクロブロック単位の原画映像信号(以下、マクロブロック動画像信号と称す)をそのまま出力するか、または、マクロブロック動画像信号から動き補償予測映像信号等で減算器17により減算するかを選択する。
【0052】
先ず、切換スイッチ18がマクロブロック動画像信号そのままを選択する場合について説明する。切換スイッチ18から出力するマクロブロック動画像信号がIピクチャの場合、DCT器3で離散コサイン変換したDCT信号を量子化器4に出力する。量子化器4では、レート制御器8から帰還する所定の量子化値で量子化を行うことで、情報量を削減した量子化信号を可変長符号化器5及び逆量子化器9に出力する。
【0053】
可変長符号化器5に入力した量子化信号は、可変長符号化器5で符号化を施した符号化信号としてバッファメモリ6に出力し、バッファメモリ6では出力端子7から引き抜かれるまで符号化信号を格納すると共に、発生符号量をレート制御器8に出力する。レート制御器8では、発生符号量に基づく量子化値を量子化器4に帰還する。出力端子7から引き抜かれた符号化信号は、不図示のシステムエンコーダで音声信号と多重化される。
【0054】
一方、逆量子化器9に入力した量子化信号は、所定の量子化値で逆量子化した逆量子化信号を逆DCT器10に出力する。逆DCT器10では入力した量子化信号を逆離散コサイン処理を施した逆DCT信号を出力する。Iピクチャのように、切換スイッチ18がマクロブロック動画像信号そのままを選択している場合は、切換スイッチ18に連動してスイッチ20はOFF状態となり、加算器19で逆DCT信号に加算することなく、フレームメモリ11に1フレームになるまでマクロブロック単位の参照映像信号(以下、マクロブロック参照信号と称す)を格納する。Pピクチャでは、フレームメモリ11に1フレーム分格納したフレーム単位の参照映像信号(以下、フレーム参照信号と称す)とフレーム並べ替え器2からのマクロブロック動画像信号との差分が最小となる動きベクトルを予測器12で予測し、動きベクトル検出範囲を検出すると共に、動きベクトルと動き補償予測後の映像信号(以下、予測映像信号と称す)とを出力する。
【0055】
切換スイッチ18が減算器17でマクロブロック動画像信号と予測映像信号との差分信号を選択するPピクチャまたはBピクチャの場合を説明する。Pピクチャの場合は、直前のIピクチャまたはPピクチャに基づく予測映像信号をマクロブロック動画像信号から減算した差分信号をDCT器3に出力し、DCT信号を量子化器4に出力する。量子化器4から出力する量子化信号の一方は、可変長符号化器5、バッファメモリ6を経て出力端子7から引き抜かれるまでバッファメモリ7に格納されると共に、発生符号量をレート制御器8に入力し量子化器4に量子化値を帰還する。バッファメモリ6に格納された符号化信号は、前述と同様にして出力端子7からシステムエンコーダに出力される。
【0056】
量子化信号の他方は、逆量子化器9、逆DCT器10を経て、加算器19に入力する。切換スイッチ18に連動してスイッチ20はON状態となり、減算器17で減算した直前のIピクチャまたはPピクチャを逆DCT器10から出力する逆DCT信号に加算し、マクロブロック参照信号を得る。加算器19で加算したマクロブロック参照信号を1フレームとなるまでフレームメモリ11に格納し、予測器12では、フレームメモリ11からのフレーム参照信号及びマクロブロック動画像信号から差分信号が最小となる動きベクトルを動きベクトル検出範囲内で検出し、例えば図2に示すような動きベクトルと予測映像信号とを出力する。
【0057】
なお、マクロブロック動画像信号がBピクチャの場合は、前後のIピクチャまたはPピクチャに基づく予測映像信号とマクロブロック動画像信号との差分を減算器17でとる以外はPピクチャと同様である。但し、Bピクチャも考慮すると前述したようにBピクチャは前後のピクチャを参照するため、動きベクトル検出範囲をフレーム単位等で更新するアルゴリズムが複雑化する割には精度の向上は少ないため、本実施の形態ではBピクチャであれば次のPピクチャを選択するまで無視するアルゴリズムを採用した。
【0058】
こうして得た予測器12から出力する信号の一方は、次のマクロブロック動画像信号を減算器17で減算するための予測映像信号として供し、他方は、例えば図3に示すように動きベクトルが動きベクトル検出範囲内に存在するかを比較検証するため、マクロブロック単位の動きベクトルを比較器15に出力する。図3における領域Dは動きベクトル検出範囲を狭める領域を示し、領域Uは動きベクトル検出範囲を広げる領域を示す。すなわち、図2に示した予測器12で検出したマクロブロックCijに対応する動きベクトルVijを、切換領域決定器14から出力される動きベクトル切換領域DまたはUの何れの範囲内に存在するかを比較器15で比較検証し、マクロブロック切替信号を適応的に求め、カウンタ16に出力する。
【0059】
図3に示した動きベクトル検出範囲をさらに詳細に説明する。図4は、図3に示した動きベクトル検出範囲をさらに詳細に説明した図である。図4(a)は、動きベクトル検出範囲の候補を示すものであり、本実施の形態では、5個の動きベクトル検出範囲の候補A1、A2、A3、A4、A5がある。これらの動きベクトル検出範囲の候補は、検出範囲決定器13に格納されている。そして、予測器12で動きベクトルを検出する際や、切換領域決定器14で動きベクトル切換領域を決定する際に使われる動きベクトル検出範囲は、これら5個の動きベクトル検出範囲の候補A1、A2、A3、A4、A5のうちのいずれか一つが選択して使われる。
【0060】
今、動きベクトル検出範囲の候補A1、A2、A3、A4、A5のうち、A3が動きベクトル検出範囲として実際に用いられていているとする。
【0061】
図4(b)に示すように、動きベクトル検出範囲A3の最外線である最外線l3と、動きベクトル検出範囲A3の内側にある動きベクトル検出範囲A3’の最外線である最外線l3’との間にある領域が図3で説明した領域Uに対応する。図3の領域Uは、切換領域決定器14で決定される。そして、後述するように領域Uに動きベクトルが乗っている場合が所定の条件を満たす場合には、動きベクトル検出範囲A3を拡大するよう処理される。この時、同時に動きベクトル検出範囲A3’、A3’’も拡大するよう処理される。
【0062】
同様に、図4(b)に示すように、動きベクトル検出範囲A3’の内側にある動きベクトル検出範囲A3’’の最外線である最外線l3’’の内側の領域が図3で説明した領域Dに対応する。図3の領域Dは、切換領域決定器14で決定される、そして、後述するように領域Dに動きベクトルが乗っている場合が所定の条件を満たす場合には、動きベクトル検出範囲A3を縮小するように処理される。この時、同時に動きベクトル検出範囲A3’、A3’’も縮小するように処理される。
【0063】
また、切換領域決定器14は、動きベクトル検出範囲に応じて図3の領域U及び領域Dを決定する。
【0064】
なお、本実施の形態では動きベクトル検出範囲の切換には、Pピクチャに基づく動きベクトルのみを対象としているため、比較器15はPピクチャの符号化時のみ動作するが、Bピクチャも考慮する場合にはBピクチャの符号化時も動作すること当然である。
【0065】
比較器15は、マクロブロックCijに対応する動きベクトルVijが図3の領域Uに乗っているかどうか、また、領域Dに乗っているかどうかを判定し、その判定結果をマクロブロック切換信号としてカウンタ16に出力する。
【0066】
カウンタ16は、マクロブロック切換信号が入力されると、マクロブロック切換信号がマクロブロックCijに対応する動きベクトルVijが図3の領域Uに乗っていることを示す場合には領域Uに対応するカウント値を1だけ増加させ、また、マクロブロック切換信号がマクロブロックCijに対応する動きベクトルVijが図3の領域Dに乗っていることを示す場合には、領域Dに対応するカウント値を1だけ増加させる。
【0067】
このようにしてカウンタ16は、領域Dに対応するカウント値及び領域Uに対応するカウント値を1フレーム分カウントし、カウンタ16はカウント結果をフレーム単位の切換信号(以下、フレーム切換信号と称す)として検出範囲決定器13に出力する。フレーム切換信号が入力されると、検出範囲決定器13は、動きベクトル検出範囲をフレーム単位で適応的に決定する。
【0068】
すなわち、検出範囲決定器13は、図4(a)に示す動きベクトル検出範囲の候補A1、A2、A3、A4、A5から実際に用いる動きベクトル検出範囲を選択することにより決定する。
【0069】
検出範囲決定器13は、図5(a)に示すように、動きベクトルQが領域Dに乗っている場合には、図5(b)に示すように動きベクトル検出範囲A4を選択することにより動きベクトル検出範囲を縮小する。さらに、詳細に説明すると、検出範囲決定器13は、カウンタ16から入力されたフレーム切換信号に基づいて、(動きベクトルが動きベクトル切換領域Dに存在する数)を(1フレームの期間に存在するマクロブロック数)で除した値が所定の閾値以上になったとき、動きベクトル検出範囲を動きベクトル切換領域A4に切り換える。この時、同時に動きベクトル検出範囲A3’、A3’’をそれぞれA4’、A4’’に切り換える。このように検出範囲決定器13は、各動きベクトル検出範囲を縮小する。そして、検出範囲決定器13が動きベクトル検出範囲を動きベクトル検出範囲A4に決定すると、決定した動きベクトル検出範囲を切換領域決定器14及び予測器12に帰還する。切換領域決定器14は、その決定に応じて、図5(b)に示すように動きベクトル切換領域D及びUを決定する。
【0070】
また、検出範囲決定器13は、図6(b)に示すように、動きベクトルRが領域Uに乗っている場合には、図6(b)に示すように動きベクトル検出範囲A2を選択することにより動きベクトル検出範囲を拡大する。さらに、詳細に説明すると、検出範囲決定器13は、カウンタ16から入力されたフレーム切換信号に基づいて、(動きベクトルが動きベクトル切換領域Uに存在する数)を(1フレームの期間に存在するマクロブロック数)で除した値が所定の閾値以上になったとき、動きベクトル検出範囲を動きベクトル検出範囲A2に切り換える。この時、同時に動きベクトル検出範囲A3’、A3’’をそれぞれA2’、A2’’に切り換える。このように検出範囲決定器13は、各動きベクトル検出範囲を拡大する。そして、検出範囲決定器13が動きベクトル検出範囲を動きベクトル検出範囲A2に決定すると、決定した動きベクトル検出範囲を切換領域決定器14及び予測器12に帰還する。切換領域決定器14は、その決定に応じて、図6(b)に示すように動きベクトル切換領域D及びUを決定する。
【0071】
また、検出範囲決定器13は、(動きベクトルが動きベクトル切換領域Dに存在する数)を(1フレームの期間に存在するマクロブロック数)で除した値が所定の閾値より小さく、かつ、(動きベクトルが動きベクトル切換領域Uに存在する数)を(1フレームの期間に存在するマクロブロック数)で除した値が所定の閾値より小さいときは、動きベクトル検出範囲を拡大も縮小もしない。すなわち、動きベクトル検出範囲を変更しない。
【0072】
予測器12に帰還された動きベクトル検出範囲は、フレーム単位で最適な動きベクトル検出範囲として、次のフレーム単位で予測器12において動きベクトルを予測する際に、動きベクトル検出範囲として用いられる。
【0073】
例えば、検出範囲決定器13が図5(b)に示すように動きベクトル検出範囲を動きベクトルA4に決定した場合には、次のフレーム単位で予測器12は、動きベクトルを予測する際に、動きベクトル検出範囲A4を用いる。
【0074】
同様に、検出範囲決定器13が図6(b)に示すように動きベクトル検出範囲を動きベクトルA2に決定した場合には、次のフレーム単位で予測器12は、動きベクトルを予測する際に、動きベクトル検出範囲A2を用いる。
【0075】
次のフレーム単位でも上記と同様の動作を行い、適応的に予測器12で用いられる動きベクトル検出範囲が次々と更新されていく。本実施の形態では、上記のような動作をPフレーム毎に行う。すなわち、図7に動きベクトル検出範囲更新のタイミングを示す。Pフレーム20で検出された動きベクトルは、検出範囲決定器13が次のPフレーム21の動きベクトル検出範囲を決定するのに用いられる。このように本実施の形態の動画像圧縮符号化装置は、Pフレーム毎に動きベクトル検出範囲を切り換えていくものである。
【0076】
特に大きな動きを有する入力動画像映像の場合には、図11で説明した従来の動画像圧縮符号化装置では、動きベクトル検出範囲320の最外周上に乗っている動きベクトルPのみを検出していたので、動きベクトル検出範囲320の最外周に乗っている動きベクトルPよりも適正な動きベクトルが動きベクトル検出範囲320の外部に存在してもそのような動きベクトルを検出して用いることができなかった。このような場合であっても、図11で説明した従来の動画像圧縮符号化装置では、適正な動きベクトルを検出する代わりに動きベクトルPを検出して用いていた。
【0077】
これに対して本実施の形態の動画像圧縮符号化装置では、動きベクトル検出範囲を拡大する際には、図3、図4、図5、図6などにそれぞれ示した領域Uに乗っている動きベクトルを考慮の対象とする。従って、従来の技術で動きベクトル検出範囲の外側により適正な動きベクトルが存在し、そのような適正な動きベクトルが検出出来ない場合であっても、本実施の形態のように領域Uを動きベクトルの考慮の対象とすることにより、従来の技術では検出できなかった適正な動きベクトルを検出することが出来るようになる。
【0078】
このように、本実施の形態によれば、動きの大きな入力動画像映像であっても適正な動きベクトルを検出することが出来、また、適正な動きベクトル検出範囲を設定することが出来るようになる。
【0079】
以上のように、本実施の形態の動画像圧縮符号化装置は、圧縮符号化することにより動画像信号の動きベクトルを検出する動きベクトル検出手段21の処理動作に並行して、動きベクトルを検出する動きベクトル検出範囲を最前のフレーム単位で最適化した範囲に置き換える構成であるため、動きベクトル検出手段21に供する回路等のハードウェア規模を増大することなく、動きベクトルの検出を最適化できる効果がある。また、動きの大きな画像であっても適正な動きベクトルを検出することが出来、また、適正な動きベクトル検出範囲を設定することが出来るようになる。
【0080】
なお、本実施の形態では、検出範囲決定器13が5個の動きベクトル検出範囲の候補から実際に用いる動きベクトル検出範囲を選択するとして説明したが、これに限らない。3個の動きベクトル検出範囲の候補から実際の動きベクトル検出範囲を選択してもよく、また7個の動きベクトル検出範囲の候補から実際の動きベクトル検出範囲を選択しても構わない。本実施の形態の検出範囲決定器13は、複数個の動きベクトル検出範囲の候補を格納しており、その中から実際に用いる動きベクトル検出範囲を選択することにより決定しさえすればよい。
【0081】
さらに、本実施の形態では、検出範囲決定器13が5個の動きベクトル検出範囲から実際に用いる動きベクトル検出範囲を選択するとして説明したが、これに限らない。検出範囲決定器13は、動きベクトルが動きベクトル切換領域Uに存在する数が多いほど動きベクトル検出範囲の拡大率を大きくしても構わない。
【0082】
また、この場合、検出範囲決定器13は、予め保持している動きベクトル検出範囲から動きベクトルが動きベクトル切換領域Uに存在する数が多いほど大きな動きベクトル検出範囲を選択しても構わないし、また、検出範囲決定器13が予め動きベクトル検出範囲を保持せず、動きベクトルが動きベクトル切換領域Uに存在する数が多いほど大きな動きベクトル検出範囲を生成しても構わない。
【0083】
また、検出範囲決定器13は、動きベクトルが動きベクトル切換領域Dに存在する数が多いほど動きベクトル検出範囲の縮小率を大きくしても構わない。
【0084】
また、この場合、検出範囲決定器13は、予め保持している動きベクトル検出範囲から動きベクトルが動きベクトル切換領域Dに存在する数が多いほど小さな動きベクトル検出範囲を選択しても構わないし、また、検出範囲決定器13が予め動きベクトル検出範囲を保持せず、動きベクトルが動きベクトル切換領域Dに存在する数が多いほど小さな動きベクトル検出範囲を生成しても構わない。
【0085】
なお、本実施の形態の動画像圧縮符号化装置は、図8(a)、図8(b)、図8(c)に示すように、動きベクトル検出範囲が狭い場合には画素単位に近付いた動きベクトルの検出となり、逆に広い場合には広くなった分だけ検出する動きベクトルは間引かれた検出となる。すなわち、図8(a)のように動きベクトル検出範囲A1のように検出範囲が広い場合には、黒印で示すように間引かれた画素に関する動きベクトルが検出され、逆に図8(c)のように動きベクトル検出範囲A5のように検出範囲が狭い場合には、黒印で示すように、画素単位で動きベクトルが検出される。従って、動きベクトル検出範囲が広くなってもその広さに応じて動きベクトルを求める画素が間引かれるので、動きベクトル検出のための演算量が増加することはない。
【0086】
そして、図4に示したように、動きベクトル検出範囲を複数種類備え、当該複数種類の動きベクトル検出範囲から動きベクトル検出範囲を選択する構成を備えると、動きベクトル検出範囲を入力映像の動きの大きさに応じて適宜拡大・縮小することで最適化を図れ、動きベクトル検出精度の向上及びそれによる発生符号量の削減ができ、復号化後の動画像の高画質化が達成できる。
【0087】
また、動きベクトル検出に要する記憶手段等の回路を、当該動きベクトル検出範囲の内最も狭い範囲に対応する規模とすることができ、動きベクトル検出精度向上に起因して高画質の復号画像を実現できる装置を安価にすることもできる。
【0088】
上記実施の形態における動きベクトル検出範囲13から、動きベクトル検出範囲に応じて動きベクトル検出範囲切換領域を生成する切換領域決定器14と、当該動きベクトル検出範囲切換領域と検出された動きベクトルとを比較し当該動きベクトルが動きベクトル切換領域内の存在を判定する比較器15とを備え、カウンター16が当該動きベクトル切換領域と比較器15の出力信号の判定信号とを格納し、カウンター16に格納した判定信号を基に動きベクトル検出範囲を決定する構成を備えると、動きベクトル検出手段21で検出する動きベクトルの動きベクトル検出範囲の設定を、入力動画像映像の動きに追従することができ、入力動画像映像の動きに合わせた動きベクトル検出範囲の即時性を向上できる。
【0089】
なお、本実施の形態では、検出範囲決定器13から予測器12に出力する動きベクトル検出範囲をフレーム単位で更新するとして説明したが、これに限らない。フレーム単位で動きベクトル検出範囲を適応的に決定するとして説明したが、これに限らない。
【0090】
検出範囲決定器13から予測器12に出力する動きベクトル検出範囲の更新を、n(nはn≦Nを満たす自然数)個の期間で行っても構わない。ただし、Nを1フレームに存在するマクロブロックの総数とし、1フレームを複数個に分割した場合の一つの分割単位のマクロブロックの総数をn個とする。この場合、カウンター16は、n個の期間での動きベクトルが動きベクトル切換領域中に存在する数も記憶する構成であり、(動きベクトルが動きベクトル切換領域に存在する数)を(n個の期間に存在するマクロブロック数)で除した値が所定の閾値以上になったとき、動きベクトル検出範囲を切り換え、当該切り換えた動きベクトル検出範囲を動きベクトル検出手段21と切換領域決定器14とに帰還する。
【0091】
例えば、(動きベクトルが領域Dに存在する数)を(n個の期間に存在するマクロブロック数)で除した値が所定の閾値以上になったとき、動きベクトル検出範囲を例えば図5(a)、図5(b)に示すように動きベクトル検出範囲A3から動きベクトル検出範囲A4に切り換える。すなわち、動きベクトル検出範囲を縮小するまた、例えば(動きベクトルが領域Uに存在する数)を(n個の期間に存在するマクロブロック数)で除した値が所定の閾値以上になったとき、動きベクトル検出範囲を例えば図6(a)、図6(b)に示すように動きベクトル検出範囲A3から動きベクトル検出範囲A2に切り換える。すなわち動きベクトル検出範囲を拡大する。
【0092】
このような構成を採用すると、入力動画像映像の動きに合わせた動きベクトルの検出精度の向上と発生符号量の削減とが実現出来る。
【0093】
次に、上述した一連の処理の流れを図1に示したブロック図を参照しながら、図9を用いて説明する。
【0094】
先ず、入力端子1から入力された入力動画像映像は、デコード順にフレーム並べ替え器2で並べ替えられ、ステップ31で1フレームに付きN個(ただしNは2以上の自然数)に細分化したマクロブロック動画像信号となる。
【0095】
フレーム並べ替え器2からデコード順に抜き取ったマクロブロック動画像信号は、ステップ32でIピクチャかIピクチャ以外かを切替スイッチ18で判定する。切替スイッチ18でマクロブロック動画像信号がIピクチャであると判定されると、スイッチ20をOFF状態にする。
【0096】
Iピクチャと判定されたマクロブロック動画像信号は、ステップ33でDCT器3、量子化器4、逆量子化器9、逆DCT器10、加算器19を経てフレームメモリ11にIピクチャのマクロブロック動画像の復号化信号を格納する。
【0097】
次に、ステップ34で1フレーム分のマクロブロック動画像信号の圧縮復号の終了を判断し、1フレームに達していないときはステップ32に戻る。
【0098】
並び替え器2から抽出したマクロブロック動画像信号がIピクチャかをステップ32で判断し、Iピクチャでない場合はステップ35でPピクチャかBピクチャかを切替スイッチ18にて判定する。
【0099】
マクロブロック動画像信号がPピクチャと判定されると、ステップ36で当該マクロブロック動画像信号と予測器12から出力される予測映像信号とを減算器17にて減算し差分信号を出力すると共に、スイッチ20をON状態にする。
【0100】
ステップ36で減算した差分信号は、ステップ37でDCT器3、量子化器4、逆量子化器9、逆DCT器10を経て、加算器19でPピクチャの逆DCT信号と予測器12から出力される予測映像信号(本例の場合は直前のIピクチャからの予測映像信号であるが、Pピクチャが続く場合では直前のPピクチャからの予測映像信号となる)とを加算し、マクロブロック参照信号をフレームメモリ11に1フレームとなるまで格納する。それと共に、予測器12にてフレーム参照信号とフレーム並べ替え器2からのマクロブロック動画像信号との差分が最小となる動きベクトルを用いて予測映像信号を生成する。
【0101】
ステップ37で生成した予測映像信号は、ステップ38で比較器15に入力され、比較器15で当該予測映像信号と切換領域決定器14から出力される動きベクトル切換領域とを比較することでマクロブロック切換信号をカウンタ16に出力する。カウンタ16は、1フレームになるまでマクロブロック切換信号を格納する。
【0102】
次にステップ34で、1フレーム分のマクロブロック動画像信号の圧縮復号の終了を判断し、1フレームに達していないときはステップ32に戻る。なお、上述の例ではスイッチ20をON状態にするステップをステップ36としたが、加算器19で加算を行う前であれば何れであっても良く、ステップ35またはステップ37であっても良いこと勿論である。
【0103】
並び替え器2から抽出されたマクロブロック動画像信号がIピクチャかをステップ32で判断し、Iピクチャでない場合はステップ35でPピクチャかBピクチャかを切替スイッチ18にて判定する。
【0104】
マクロブロック動画像信号がBピクチャと判定されると、ステップ39で当該マクロブロック動画像信号と比較器12から出力する予測映像信号とを減算器17にて減算し差分信号を出力する。ステップ39で減算した差分信号は、ステップ40でDCT器3及び量子化器4を経て量子化信号を生成し、ステップ34で、1フレーム分のマクロブロック動画像信号の圧縮復号の終了を判断し、1フレームに達していないときはステップ32に戻る。
【0105】
なお、ステップ34で1フレームに達していると判断した場合には、ステップ41でカウンタ16からフレーム切換信号を検出範囲決定器13に出力し、検出範囲決定器13はフレーム単位の動きベクトル検出範囲を予測器12に帰還すると共に、切換領域決定器14にも出力し、切換領域決定器14で動きベクトル切換領域を生成し、比較器15に出力する。
【0106】
ステップ41でフレーム単位の動きベクトル検出範囲を生成し予測器12に出力した後、ステップ42で動画像映像信号が終了し次のフレームの有無を判定し、次のフレームがある場合はフレーム並べ替え器2に戻り、次のフレームがない場合は処理を終了する。
【0107】
なお、上述の実施の形態では動きベクトル検出範囲の更新をフレーム単位で行う場合を説明したが、画面単位、フレーム単位、グループオブピクチャ(GOP)単位等入力動画像信号の所定のまとまり単位で行うこともできる。但し、まとまり単位に応じて、動きベクトル検出範囲決定器13及びフレームメモリ11等を変化させる必要がある。
【0108】
また、上述の実施の形態ではMPEG圧縮を例に採り説明したが、圧縮復号化方法はMPEGに限定されるものではなく、例えばH.261またはH.263等の時間方向の冗長度を削減するフレーム間予測を行う圧縮方式であれば何れでも適応できる。
【0109】
本実施の形態によれば、動きベクトル検出のための検出範囲が複数存在しても、ハードウェア規模を増大させることなく、動画像圧縮符号化を行う際に、入力映像の動きの速さに応じて、最適な動きベクトル検出範囲を選択出来るという作用を有し、その結果、高画質が実現できるという、優れた効果が得られる。また、動きの大きな画像であっても適正な動きベクトルを検出することが出来、また、適正な動きベクトル検出範囲を設定することが出来る。
【0110】
又、本発明のプログラムは、上述した本発明の動きベクトル検出方法の全部又は一部のステップ(又は、工程、動作、作用等)の動作をコンピュータにより実行させるためのプログラムであって、コンピュータと協働して動作するプログラムである。
【0111】
又、本発明の記録媒体は、上述した本発明の動きベクトル検出方法の全部又は一部のステップ(又は、工程、動作、作用等)の全部又は一部の動作をコンピュータにより実行させるためのプログラムを担持した記録媒体であり、コンピュータにより読み取り可能且つ、読み取られた前記プログラムが前記コンピュータと協動して前記動作を実行する記録媒体である。
【0112】
尚、本発明の上記「一部の手段(又は、装置、素子等)」とは、それらの複数の手段の内の、一つ又は幾つかの手段を意味し、本発明の上記「一部のステップ(又は、工程、動作、作用等)」とは、それらの複数のステップの内の、一つ又は幾つかのステップを意味する。
【0113】
又、本発明の上記「手段(又は、装置、素子等)の機能」とは、前記手段の全部又は一部の機能を意味し、本発明の上記「ステップ(又は、工程、動作、作用等)の動作」とは、前記ステップの全部又は一部の動作を意味する。
【0114】
又、本発明のプログラムの一利用形態は、コンピュータにより読み取り可能な記録媒体に記録され、コンピュータと協働して動作する態様であっても良い。
【0115】
又、本発明のプログラムの一利用形態は、伝送媒体中を伝送し、コンピュータにより読みとられ、コンピュータと協働して動作する態様であっても良い。
【0116】
又、本発明のデータ構造としては、データベース、データフォーマット、データテーブル、データリスト、データの種類などを含む。
【0117】
又、記録媒体としては、ROM等が含まれ、伝送媒体としては、インターネット等の伝送媒体、光・電波・音波等が含まれる。
【0118】
又、上述した本発明のコンピュータは、CPU等の純然たるハードウェアに限らず、ファームウェアや、OS、更に周辺機器を含むものであっても良い。
【0119】
尚、以上説明した様に、本発明の構成は、ソフトウェア的に実現しても良いし、ハードウェア的に実現しても良い。
【0120】
【発明の効果】
以上説明したところから明らかなように、本発明は、動きの大きな画像であっても適正な動きベクトルを検出することが出来、また、適正な動きベクトル検出範囲を設定することが出来る動画像圧縮符号化装置、動きベクトル検出方法、記録媒体、及びプログラムを提供することが出来る。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態における動画像圧縮符号化装置のブロック図
【図2】本発明の第1の実施の形態におけるマクロブロックの動きベクトルの一例を示す図
【図3】本発明の第1の実施の形態における動きベクトルと動きベクトル切換領域との一例を示す図
【図4】(a)本発明の第1の実施の形態における動きベクトル検出範囲の候補を示す図
(b)本発明の第1の実施の形態における動きベクトル検出範囲を示す図
【図5】(a)本発明の第1の実施の形態における現在の動きベクトル検出範囲の例を示す図
(b)本発明の第1の実施の形態における更新後の動きベクトル検出範囲の例を示す図
【図6】(a)本発明の第1の実施の形態における現在の動きベクトル検出範囲の例を示す図
(b)本発明の第1の実施の形態における更新後の動きベクトル検出範囲の例を示す図
【図7】本発明の第1の実施の形態における動きベクトル検出範囲の更新のタイミングを示す図
【図8】(a)本発明の第1の実施の形態における動きベクトル検出範囲が大きい場合の動きベクトルを検出する際の画素のサンプリングの概要を示す図
(b)本発明の第1の実施の形態における動きベクトル検出範囲が中程度の場合の動きベクトルを検出する際の画素のサンプリングの概要を示す図
(c)本発明の第1の実施の形態における動きベクトル検出範囲が小さい場合の動きベクトルを検出する際の画素のサンプリングの概要を示す図
【図9】本発明の第1の実施の形態における動きベクトル切換領域決定の流れ図
【図10】従来の動きベクトル検出装置の構成を示すブロック図
【図11】従来の動画像圧縮符号化装置の構成を示すブロック図
【図12】従来の動画像圧縮符号化装置を構成する動き検出装置307Aの動作を示す説明図
【図13】従来の動画像圧縮符号化装置を構成するCPU5の処理動作を示すフローチャート図
【図14】従来の動画像圧縮符号化装置の動きベクトル検出範囲と動きベクトルの一例を示す図
【符号の説明】
1 入力端子
2 フレーム並べ替え器
3 DCT器
4 量子化器
5 可変長符号化器
6 バッファメモリ
7 出力端子
8 レート制御器
9 逆量子化器
10 逆DCT器
11 フレームメモリ
12 予測器
13 動きベクトル検出範囲決定器
14 切換領域決定器
15 比較器
16 カウンター
17 減算器
18 切替スイッチ
19 加算器
20 スイッチ
21 動きベクトル検出手段[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a moving image compression encoding apparatus for compressing and encoding a moving image, a motion vector detection method thereof, a recording medium, and a program.
[0002]
[Prior art]
In the moving image compression coding apparatus, the motion vector detection apparatus is forced to have a large hardware scale in order to increase the detection accuracy of the motion vector. Therefore, motion vector detection is performed in a mode in which the detection range is narrow but the detection accuracy is high, or in a mode in which the detection range is wide but the detection accuracy is low.
[0003]
A conventional motion vector detection apparatus is shown in FIG. 10 (see, for example, Patent Document 1) 101 is a reference frame signal input terminal for inputting a reference frame signal which is a current frame signal to a moving image compression encoder, and 102 is a reference frame signal input terminal. This is a prediction frame signal input terminal for inputting a prediction frame signal, which is the previous frame signal, to the moving image compression encoder. 103 is a wide-area motion vector detector that performs motion vector detection in a mode with a wide detection range but low detection accuracy, and 104 is a narrow-area motion vector detector that performs motion vector detection in a mode with a narrow detection range but high detection accuracy. 105 is a comparator for comparing and evaluating the motion vector detection results obtained by the wide area motion vector detector 103 and the narrow area motion vector detector 104, and 106 is a wide area motion based on the comparison result of the comparator 105. A switch that outputs either the result of motion vector detection from the vector detector 103 or the narrow area motion vector detector 104, and 107 is an output terminal that outputs the motion vector detected by the wide area motion vector detector.
[0004]
The operation of the conventional motion vector detection apparatus configured as described above will be described. First, the reference frame signal input from the reference frame signal input terminal 101 is input to the wide area motion vector detector 103 through the low-pass filter 108 and the downsampling circuit 109. At the same time, the reference frame signal input from the reference frame signal input terminal 101 is also input to the narrow area motion vector detector 104. Similarly, the prediction frame signal input from the prediction frame signal input terminal 102 is input to the wide area motion vector detector 103 via the low-pass filter 110 and the downsampling circuit 111. At the same time, the predicted frame signal input from the predicted frame signal input terminal 102 is also input to the narrow motion vector detector 104. The motion vectors detected by the respective motion vector detectors 103 and 104 are compared and evaluated by the comparator 105, and the motion vector having the higher evaluation is output from the switch 106 to the output terminal 107.
[0005]
However, in the configuration of the motion vector detection device in FIG. 10, when the number of motion vector detection ranges (hereinafter referred to as the number of modes) is set to two, for example, in order to detect a more appropriate motion vector, the number of modes is one. Compared to the hardware scale.
[0006]
That is, if the number of motion vector detection ranges is, for example, a motion vector detection range with a narrow detection range but high detection accuracy and a motion vector detection range with a wide detection range but low detection accuracy, the detection range is narrow. However, two types of hardware are required: the narrow motion vector detector 104 with high detection accuracy and the wide motion vector detector 103 with a wide detection range but low detection accuracy. For each motion vector detector, it is necessary to execute motion vector detection at the same time, and an independent motion vector detection circuit is required for each of the two motion vector detectors 103 and 104, and hardware such as a motion vector detection circuit is required. There was a problem of increasing the scale.
[0007]
In order to solve the problem of the conventional motion vector detection device described in FIG. 10, a moving image compression encoding device shown in FIG. 11 is known (see, for example, Patent Document 2).
[0008]
That is, FIG. 11 is a block diagram of a conventional moving image compression coding apparatus. In FIG. 11, 301 is a DCT circuit, 302 is a quantizer, 303 is an inverse quantizer, 304 is an inverse DCT circuit, 305 is a frame memory, and 306 is a motion compensated interframe prediction. 307A is a motion detection device, and 308 is an intra-frame / inter-frame switching signal. The motion detection device 307A includes a buffer memory 201, an error calculation circuit 202, an error comparison circuit 203, and an address generation circuit 204.
[0009]
The operation of the conventional image encoding apparatus configured as described above will be described below. The first frame of encoding, that is, the first frame is switched to intra-frame encoding by an intra-frame / inter-frame switching signal 308, and intra-frame encoding is performed for each frame without taking a difference. That is, image data is converted into transform coefficients by the DCT circuit 301 in two-dimensional block units, quantized by the quantizer 302, and then sent to the transmission path. Generally, since an image has high correlation, when DCT is performed, energy concentrates on a transform coefficient corresponding to a low frequency component. Therefore, by coarsely quantizing the high frequency components that are not visually conspicuous and finely quantizing the low frequency components that are important components, it is possible to minimize image quality degradation and reduce the amount of data. The quantized transform coefficients sent to the transmission path are simultaneously returned to real-time data via the inverse quantizer 303 and the inverse DCT transform circuit 304, and stored in the frame memory 305.
[0010]
On the other hand, images after the second frame are switched to inter-frame coding by an intra-frame / inter-frame switching signal 308, and after motion compensation, a difference from the image of the previous frame is taken, and the inter-frame coding is performed for each frame. The difference between the image signals is encoded. That is, based on the image data of the previous frame stored in the frame memory 305 and the motion vector of the two-dimensional block unit detected by the motion detection device 307A, the predicted values of the second and subsequent frames are converted by the motion compensation inter-frame prediction circuit 306. The prediction error that is the difference between the generated image after the second frame and the prediction value after the second frame generated by the motion compensation inter-frame prediction circuit 306 is converted into a conversion coefficient by the DCT circuit 301 in units of two-dimensional blocks. Then, after the transform coefficient is quantized by the quantizer 302, it is sent to the transmission line. The quantized transform coefficients sent to the transmission line are simultaneously returned to real-time data via the inverse quantizer 303 and the inverse DCT transform circuit 304, and stored in the frame memory 305.
[0011]
Next, the motion detection device 307A will be described in detail. This motion detection device 307A is configured to obtain a motion vector between frames in units of two-dimensional blocks using, for example, a well-known full search method. FIG. 12 is an explanatory diagram showing the operation of the motion detection device 307A. Hereinafter, the motion detection operation will be described with reference to FIG. In FIG. 12, reference numeral 311 denotes a two-dimensional block having a second frame, which is a rectangular block of m pixels (horizontal direction) × n pixels (vertical direction). 312A and 312B are two-dimensional blocks of the first frame for performing error calculation, and the size is the same as that of the two-dimensional block 311. Reference numeral 313 denotes a motion vector obtained by motion detection, which connects the center coordinates of the two-dimensional block 311 and the center coordinates of the two-dimensional block 312B.
[0012]
A two-dimensional block 311 in FIG. 12 is a two-dimensional block having center coordinates (x, y, 2) in the second frame, and the two-dimensional block is represented by a symbol S (x, y, 2) corresponding to the center coordinates. . The two-dimensional blocks 312A and 312B are two-dimensional blocks having center coordinates (x, y, 1) and (x + mx, y + my, 1) in the first frame, respectively. Symbols S (x, y, 2) and S (x + mx, y + my, 1) corresponding to the coordinates are used. Here, x indicates the pixel coordinates in the horizontal direction with the center of the frame as the origin, y indicates the pixel coordinates in the vertical direction with the center of the frame as the origin, and the numbers 1 and 2 after x and y are the frame numbers. Indicates. Reference numeral 314 is a rectangular (horizontal direction 2h, vertical direction 2v) motion vector detection range indicating a two-dimensional block for calculating a motion vector, and xh is the center of the motion vector detection range (in the figure, coordinates (x, y, 1) Indicates the local pixel coordinates in the horizontal direction with) as the origin, and yv indicates the local pixel coordinates in the vertical direction with the center of the motion vector detection range (coordinates (x, y, 1) in the figure) as the origin. Yes.
[0013]
The image data of the second frame is input to the buffer memory 201 at the same time when it is inter-frame encoded. Note that the image data of the first frame is already stored in the buffer memory 201. Now, the reference is the two-dimensional block 311 of the second frame (current frame), and the motion vector 313 between the two-dimensional block 312B of the first frame (previous frame) and the two-dimensional block 311 of the second frame (current frame) is To detect. The first and second frame images input to the buffer memory 201 are read in units of two-dimensional blocks of m × n pixels, and motion vectors are detected in units of two-dimensional blocks.
[0014]
Hereinafter, a procedure for detecting a motion vector using coordinates will be specifically described. The address generation circuit 204 reads the image data of the two-dimensional block S (x, y, 2) having the center coordinates (x, y, 2) in the second frame, and this two-dimensional block S (x, y, 2). And a motion between the reference block and the first frame is detected by the following procedure. The buffer memory 201 also stores the image data of the first frame as described above, and then stores the two-dimensional block S (x, y, 1) having the center coordinates (x, y, 1) in the first frame. Read each image data. In the error calculation circuit 202, the sum of square errors of the amplitude of the image data in the two two-dimensional blocks S (x, y, 2) and S (x, y, 1) (hereinafter simply referred to as error) σ (x , y) (0, 0) is calculated by [Equation 1] and sent to the error comparison circuit 203.
[0015]
[Expression 1]
Figure 0004034180
[0016]
Next, the address generation circuit 204 generates an m × n block adjacent to one pixel in the horizontal direction in the first frame, that is, a two-dimensional block S (x + 1, y, 1) having a center coordinate (x + 1, y, 1). Generate an address. Similarly, the error calculation circuit 202 calculates σ (x, y) (+ 1,0) and sends it to the error comparison circuit 203. The error comparison circuit 203 compares σ (x, y) (0,0) and σ (x, y) (+ 1,0) and selects the smaller one. Similarly, the image data of the two-dimensional block is read while sequentially changing the address in the range of −h <xh <h and −v <yv <v, and σ (x, y) (xh, yv) is calculated.
[0017]
The error comparison circuit 203 selects the error σ (x, y) (mx, my) that takes the minimum value from the error σ (x, y) (xh, yv) calculated as described above, and simultaneously sets the addresses mx and my. Output. Therefore, the motion vector 213 in the two-dimensional block S (x, y, 2) is mv (mx, my). Thereafter, the above-described operation is repeated for all of the two-dimensional blocks divided into a plurality in the second frame, whereby the motion vectors of all the two-dimensional blocks in the second frame are obtained.
[0018]
The motion compensation inter-frame prediction circuit 306 generates a motion-compensated prediction value of the second frame in units of two-dimensional blocks using the motion vector detected for each two-dimensional block of the second frame. For the second frame image, first, a difference between the image data of the first frame and the predicted value generated by the above-described method from the motion vector of the second frame, that is, a prediction error is calculated. Thereafter, the above-described prediction error is encoded for each frame in the same manner as in the first frame.
[0019]
With the above configuration, a two-dimensional block having the same size as the two-dimensional block obtained by dividing the current frame within the predetermined motion vector detection range of the previous frame centered on the position of the two-dimensional block obtained by dividing the current frame. Image data is extracted while sequentially changing the position, error calculation between the image data of each two-dimensional block within the predetermined motion vector detection range of the previous frame and the image data of the divided two-dimensional block of the current frame, and the previous frame By performing error comparison for two-dimensional blocks with different positions within a predetermined motion vector detection range, a predetermined motion vector detection for the previous frame with the smallest image data error relative to the two-dimensional block obtained by dividing the current frame is performed. Searches the position of the 2D block within the range and divides the current frame to the position of the 2D block and the current frame. On the screen from the previous frame of the two-dimensional block obtained by dividing the current frame from the position of the two-dimensional block within the predetermined motion vector detection range of the previous frame having the smallest image data error with respect to the two-dimensional block obtained by dividing That is, a motion vector indicating the motion of is calculated.
[0020]
According to the above method, since the prediction error is encoded, the energy is reduced as compared with the case where the image data is directly encoded as in the case of intra-frame encoding, and more efficient encoding is possible. It becomes.
[0021]
Next, the operation after the third frame will be described. When calculating the motion vector of each frame after the third frame, the motion vector of the previous frame (in the case of the third frame, the second frame) is detected before in time indicating the magnitude of the motion of the image. The motion vector detection range determination information is input to the CPU 205, and the following arithmetic processing is performed to control the address generation circuit 204 to change the motion vector detection range.
[0022]
FIG. 13 is a flowchart showing the processing operation of the CPU 5. Referring to FIG. 13, in step 21, the motion vectors of all two-dimensional blocks of the previous frame (for example, the second frame) are read, and in step 22, the motion vector indicating the maximum horizontal value h in the normal motion vector detection range. Count the number of. In step 23, it is determined whether the number is 50 or more of all blocks. If the number is 50% or more of all blocks, the motion vector detection range in the horizontal direction is expanded to 2h, for example, assuming that the motion of the image is large. In order to expand the motion vector detection range by two times, as shown in step 24, the input to the error calculation circuit 2 is thinned out every sample, that is, the address is inputted so as to be subsampled to 1/2. The generation circuit 4 is controlled. By doing so, the calculation amount per each two-dimensional block is halved, so even if the motion vector detection range is doubled, the total calculation amount is equal to the case where the motion vector detection range is not expanded. . Further, as shown in step 25, the number of motion vectors exceeding h / 2 is also counted at the same time, and in step 26, it is determined whether the number of motion vectors exceeding h / 2 is 10% or less. In some cases, the motion vector detection range is assumed to be h / 2 assuming that there is little motion. In this case, the data is input to the error calculation circuit 2 without being thinned (step 27). If the number of motion vectors exceeding h is less than 50% and the number of motion vectors exceeding h / 2 exceeds 10%, the motion vector detection range is not changed and sub-sampling is not performed.
[0023]
With the above operation, when the motion of the image is large, the motion vector detection range can be expanded without increasing the amount of calculation. In general, when motion detection is performed from a subsampled image, the motion detection accuracy decreases, leading to image quality degradation. However, when the motion is large, the image quality deterioration due to the fact that the motion does not follow has a larger effect, and therefore the image quality improves when the motion vector detection range is expanded even for the subsampled image. In addition, when motion is small, motion detection is performed on an image that is not subsampled, so that image quality does not deteriorate and the motion vector detection range is further narrowed, so that the processing time required for search can be shortened.
[0024]
In this way, the motion vector detection range can be changed according to the motion of the image, the motion can be accommodated, the inter-frame difference can be reduced, and the image quality is not deteriorated. Moreover, since the amount of calculation for calculating the motion vector does not increase, the amount of hardware for calculating the motion vector does not increase.
[0025]
[Patent Document 1]
JP-A-9-224249
[Patent Document 2]
Japanese Patent Laid-Open No. 10-23420
[0026]
[Problems to be solved by the invention]
However, the conventional moving image compression coding apparatus described with reference to FIG. 11 cannot detect an appropriate motion vector for an image with a large motion, and it is difficult to set an appropriate motion vector detection range. It is.
[0027]
That is, in the conventional moving image compression encoding apparatus described in FIG. 11, the number of motion vectors P riding on the outermost periphery of the motion vector detection range 320 is smaller than the motion vector detection range 320 as shown in FIG. The motion vector detection range 320 was expanded when the number of blocks reached 50% or more. That is, only the motion vector P riding on the outermost periphery of the motion vector detection range 320 is detected. However, there is a possibility that a motion vector more appropriate than the motion vector P riding on the outermost periphery of the motion vector detection range 320 exists outside the motion vector detection range 320. Even in such a case, the conventional moving image compression encoding apparatus described with reference to FIG. 11 detects and uses the motion vector P instead of detecting an appropriate motion vector.
[0028]
That is, in the conventional moving image compression coding apparatus, it is difficult to detect an appropriate motion vector for an image with a large motion, and it is difficult to set an appropriate motion vector detection range. There is.
[0029]
In consideration of the above problems, the present invention can detect an appropriate motion vector even for an image with a large motion, and can also set an appropriate motion vector detection range. It is an object of the present invention to provide a motion vector detection method, a recording medium, and a program.
[0030]
[Means for Solving the Problems]
In order to solve the above-described problem, the first aspect of the present invention is a macro that generates a macroblock moving image signal obtained by subdividing an input moving image image into N (where N is a natural number of 2 or more) per frame. Block generation means (2);
Coding / decoding means (18, 17, 3, 4, 9, 10, 19, 20, 11) for generating a decoded moving image signal by compressing and encoding the macroblock moving image signal;
Motion vector detecting means (12) for detecting a motion vector within a first motion vector detection range from the decoded moving image signal and the macroblock moving image signal;
Among the detected motion vectors, the first outermost line that is the outermost line of the first motion vector detection range and the outermost of the second motion vector detection range that is inside the first motion vector detection range. Motion vector counting means (14, 15, 16) for counting the number of motion vectors between the outermost second outermost line as the number of first motion vectors;
It is a moving picture compression encoding apparatus provided with the motion vector detection range determination means (13) which expands the said 1st motion vector detection range based on the counted number of said 1st motion vectors.
[0031]
In the second aspect of the present invention, the motion vector counting means (14, 15, 16) calculates the number of motion vectors in a third motion vector detection range inside the second motion vector detection range. Counting as the number of second motion vectors,
The motion vector detection range determining means (13) is the moving image compression encoding apparatus according to the first aspect of the present invention, which reduces the first motion vector detection range based on the counted number of the second motion vectors. is there.
[0032]
In the third aspect of the present invention, the motion vector detection range determining means (13) expands the first motion vector detection range when the counted number of the first motion vectors is larger than a predetermined threshold. If it is smaller than the predetermined threshold value, the moving image compression coding apparatus according to the first aspect of the present invention does not expand the first motion vector detection range or does not change the first motion vector detection range.
[0033]
According to a fourth aspect of the present invention, the motion vector detection range determining means (13) increases the expansion rate of the first motion vector detection range as the number of counted first motion vectors increases. 1 is a moving image compression encoding apparatus according to the present invention.
[0034]
According to a fifth aspect of the present invention, the motion vector detection range determining means (13) increases the reduction rate of the first motion vector detection range as the number of counted second motion vectors increases. 2 is a moving picture compression encoding apparatus according to the present invention.
[0035]
According to a sixth aspect of the present invention, the motion vector detection range determining means (13) has a plurality of types of motion vector detection ranges in advance,
From the plurality of types of motion vector detection ranges, the larger the number of counted first motion vectors, the larger the motion vector detection range is selected to be the first motion vector detection range. It is a moving image compression encoding apparatus.
[0036]
In the seventh aspect of the present invention, the motion vector detection range determining means (13) has a plurality of types of motion vector detection ranges in advance,
From the plurality of types of motion vector detection ranges, a smaller motion vector detection range is selected as the number of counted second motion vectors is larger, and the first motion vector detection range is used as the first motion vector detection range. It is a moving image compression encoding apparatus.
[0037]
According to an eighth aspect of the present invention, the motion vector detection range determining means (13) updates the first motion vector detection range every P frames, or n P frames (where n ≦ N natural numbers) for each division unit
When the first motion vector detection range is updated, the motion vector detection range determination means sets the number of the first motion vectors counted in the P frame or the division unit to the P frame or The moving image compression code of the first aspect of the present invention that expands the first motion vector detection range when the number divided by the number of macroblock moving image signals existing in the division unit exceeds a predetermined threshold. Further, according to a ninth aspect of the present invention, the motion vector detection range determining means (13) updates the first motion vector detection range every P frames, or n P frames ( However, it is performed for each division unit divided into n ≦ N natural numbers)
When the first motion vector detection range is updated, the motion vector detection range determination means sets the number of the second motion vectors counted in the P frame or the division unit to the P frame or The moving image compression code of the first aspect of the present invention that reduces the first motion vector detection range when the number divided by the number of macroblock moving image signals existing in the division unit exceeds a predetermined threshold. Device.
[0038]
In the tenth aspect of the present invention, the motion vector detection means expands the second motion vector detection range when expanding the first motion vector detection range. 8 is a moving picture compression encoding apparatus according to any one of the present invention.
[0039]
In the eleventh aspect of the present invention, when the motion vector detection means reduces the first motion vector detection range, the second motion vector detection range also reduces the third motion vector detection range. 1 is a moving image compression encoding apparatus according to the present invention.
[0040]
In the twelfth aspect of the present invention, a macroblock moving image signal generated by subdividing an input moving image image into N (where N is a natural number of 2 or more) per frame is compressed and decoded. A motion vector detecting step for detecting a motion vector within a first motion vector detection range from the decoded moving image signal generated in the above and the macroblock moving image signal;
Among the detected motion vectors, the first outermost line that is the outermost line of the first motion vector detection range and the outermost of the second motion vector detection range that is inside the first motion vector detection range. A motion vector counting step for counting the number of motion vectors between the outermost second outermost line as the number of first motion vectors;
A first outermost line that is the outermost line of the first motion vector detection range, and a second outermost line that is the outermost line of the second motion vector detection range located inside the first motion vector detection range. A motion vector counting step for counting the number of first motion vectors, which is the number of motion vectors above one or more second outermost lines adjacent to the first outermost line;
A motion vector detection method comprising: a motion vector detection range determination step for expanding the first motion vector detection range based on the counted number of the first motion vectors.
[0041]
The thirteenth aspect of the present invention is the macro generated by subdividing the input moving image video into N (where N is a natural number of 2 or more) per frame in the motion vector detection method of the twelfth aspect of the present invention. A motion vector detecting step for detecting a motion vector within a first motion vector detection range from the decoded moving image signal generated by compressing and encoding the block moving image signal and decoding the macro block moving image signal; ,
Among the detected motion vectors, the first outermost line that is the outermost line of the first motion vector detection range and the outermost of the second motion vector detection range that is inside the first motion vector detection range. A motion vector counting step for counting the number of motion vectors between the outermost second outermost line as the number of first motion vectors;
A program for causing a computer to execute a motion vector detection range determination step for expanding the first motion vector detection range based on the counted number of the first motion vectors.
[0042]
The fourteenth aspect of the present invention is a recording medium carrying the program of the thirteenth aspect of the present invention, which can be processed by a computer.
[0043]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0044]
According to the embodiment of the present invention, for example, a configuration is provided in which a motion vector detection range adaptively obtained based on a motion vector detected by a motion vector detection unit (means) is fed back to the motion vector detection unit (means). Therefore, the motion vector detection range for detecting the motion vector by the motion vector detection unit (means) can be set according to the motion of the input moving image video, and the number of motion vector detection ranges for detecting a more appropriate motion vector Even when there are a plurality of modes (that is, the number of modes), the accuracy in detecting a motion vector can be improved without increasing the circuit scale.
[0045]
In addition, according to the embodiment of the present invention, for example, since the motion vector detection range is fed back to the motion vector detection unit in units obtained by subdividing the input video image, for example, the input video image of one frame or the like is provided. A motion vector detection range that matches the motion of the input moving image video in a unit can be appropriately set in the motion vector detection unit, and the setting of a highly accurate motion vector detection range can be simplified.
[0046]
Further, according to the embodiment of the present invention, for example, referring to the result of the motion vector detection range obtained adaptively, the motion vector detection range to be actually applied is selected from a plurality of motion vector detection ranges provided in advance. Since the structure is provided, the update of the motion vector detection range set in the motion vector detection unit can be freely adjusted from the plurality of types according to the input moving image, for example, motion vector detection according to the user's intention such as preference Can be achieved. In addition, the motion vector detection range set in the motion vector detection unit in accordance with the motion of the input moving image video, for example, in accordance with the user's intention can be achieved.
[0047]
Further, according to the embodiment of the present invention, for example, since the feedback unit has a configuration that feeds back the motion vector detection range determined by the motion vector detection range determination unit to the motion vector detection unit and the switching region generation unit, The setting of the vector detection range can be determined by following the speed of the motion of the input moving image video, and the immediacy of the motion vector detection range in accordance with the motion of the input moving image video can be enhanced.
[0048]
Further, according to the embodiment of the present invention, for example, when (the number of motion vectors present in the motion vector switching region) / (number of macroblocks present in n periods) is equal to or greater than a predetermined threshold value, Since it has a configuration in which the motion vector detection range is switched and the switched motion vector detection range is fed back to the motion vector detection means and the switching area generation means, the amount of generated code can be reduced when encoding the input video image. The speed of motion vector detection in accordance with the motion of the image can be increased.
[0049]
(First embodiment)
FIG. 1 is a block diagram showing the configuration of a moving picture compression coding apparatus according to the first embodiment of the present invention, and is an example showing a case of an MPEG (Moving Pictures Experts Group) system. 1 is an input terminal, 2 is a frame rearranger, 3 is a discrete cosine transform (hereinafter referred to as DCT) unit, 4 is a quantizer, and 5 is a variable length encoder. 6 is a buffer memory, 7 is an output terminal, 8 is a rate controller, 9 is an inverse quantizer, 10 is an inverse DCT device, 11 is a frame memory, and 12 is a predictor. 13 is a detection range determiner, 14 is a switching region determiner, 15 is a comparator, 16 is a counter, 17 is a subtractor, 18 is a changeover switch, and 19 is An adder, 20 is a switch.
[0050]
The frame rearranger 2 according to the present embodiment is an example of the macroblock generation unit according to the present invention. The changeover switch 18, the subtractor 17, the DCT unit 3, the quantizer 4, and the inverse quantizer according to the present embodiment. The unit 9, the inverse DCT unit 10, the adder 19, the switch 20, and the frame scale 11 are examples of the code decoding means of the present invention, and the predictor 12 of the present embodiment is an example of the motion vector detecting means of the present invention. The switching area determiner 14, the comparator 15, and the counter 16 of the present embodiment are examples of the motion vector counting means of the present invention, and the detection range determiner 13 of the present embodiment is the motion vector detection of the present invention. It is an example of a range determination means.
[0051]
The operation of each block configured as described above will be described. The original picture signal input from the input terminal 1 is a video signal that is separated into an audio signal and a video signal in advance among the video and audio signals. The video signal is rearranged into frames by the frame rearranger 2, and then the original image video signal in a unit (hereinafter referred to as a macroblock unit) obtained by subdividing the frame by a predetermined number of pixels is The data are output to the changeover switch 18 in the rearranged order (hereinafter referred to as the decoding order). The changeover switch 18 outputs an original picture video signal (hereinafter referred to as a macroblock moving picture signal) in units of macroblocks as it is, or subtracts it from the macroblock moving picture signal by a motion compensated predicted video signal or the like. Select.
[0052]
First, the case where the changeover switch 18 selects the macroblock moving image signal as it is will be described. When the macroblock moving image signal output from the changeover switch 18 is an I picture, a DCT signal obtained by discrete cosine transform by the DCT unit 3 is output to the quantizer 4. The quantizer 4 performs quantization with a predetermined quantization value fed back from the rate controller 8 to output a quantized signal with a reduced amount of information to the variable length encoder 5 and the inverse quantizer 9. .
[0053]
The quantized signal input to the variable length encoder 5 is output to the buffer memory 6 as an encoded signal that has been encoded by the variable length encoder 5, and is encoded until it is extracted from the output terminal 7 in the buffer memory 6. The signal is stored and the generated code amount is output to the rate controller 8. The rate controller 8 feeds back the quantized value based on the generated code amount to the quantizer 4. The encoded signal extracted from the output terminal 7 is multiplexed with the audio signal by a system encoder (not shown).
[0054]
On the other hand, the quantized signal input to the inverse quantizer 9 outputs an inverse quantized signal obtained by inverse quantization with a predetermined quantization value to the inverse DCT device 10. The inverse DCT unit 10 outputs an inverse DCT signal obtained by performing inverse discrete cosine processing on the input quantized signal. When the changeover switch 18 selects the macro block moving image signal as it is like an I picture, the switch 20 is turned off in conjunction with the changeover switch 18 and is not added to the inverse DCT signal by the adder 19. The frame memory 11 stores a reference video signal in units of macro blocks (hereinafter referred to as a macro block reference signal) until one frame is reached. In a P picture, a motion vector that minimizes the difference between a reference video signal in frame units (hereinafter referred to as a frame reference signal) stored in the frame memory 11 for one frame and a macroblock moving image signal from the frame rearranger 2. Is predicted by the predictor 12, and a motion vector detection range is detected, and a motion vector and a video signal after motion compensation prediction (hereinafter referred to as a predicted video signal) are output.
[0055]
The case where the changeover switch 18 is a P picture or a B picture in which the subtracter 17 selects a difference signal between the macroblock moving image signal and the predicted video signal will be described. In the case of a P picture, a difference signal obtained by subtracting a predicted video signal based on the immediately preceding I picture or P picture from the macroblock moving image signal is output to the DCT unit 3, and the DCT signal is output to the quantizer 4. One of the quantized signals output from the quantizer 4 is stored in the buffer memory 7 until it is extracted from the output terminal 7 via the variable length encoder 5 and the buffer memory 6, and the generated code amount is controlled by the rate controller 8 The quantized value is fed back to the quantizer 4. The encoded signal stored in the buffer memory 6 is output from the output terminal 7 to the system encoder in the same manner as described above.
[0056]
The other of the quantized signals is input to the adder 19 via the inverse quantizer 9 and the inverse DCT device 10. In conjunction with the changeover switch 18, the switch 20 is turned on, and the I picture or P picture immediately before being subtracted by the subtracter 17 is added to the inverse DCT signal output from the inverse DCT unit 10 to obtain a macroblock reference signal. The macroblock reference signal added by the adder 19 is stored in the frame memory 11 until one frame is obtained, and the predictor 12 performs a motion that minimizes the difference signal from the frame reference signal and the macroblock moving image signal from the frame memory 11. A vector is detected within a motion vector detection range, and for example, a motion vector and a predicted video signal as shown in FIG. 2 are output.
[0057]
When the macroblock moving picture signal is a B picture, the macroblock moving picture signal is the same as the P picture except that the subtracter 17 takes the difference between the predicted video signal based on the preceding and following I pictures or the P picture and the macroblock moving picture signal. However, considering the B picture, as described above, the B picture refers to the previous and subsequent pictures, so that the accuracy improvement is small for the complexity of the algorithm for updating the motion vector detection range in units of frames. In the embodiment, an algorithm that ignores a B picture until the next P picture is selected is adopted.
[0058]
One of the signals output from the predictor 12 obtained in this way is used as a predicted video signal for subtracting the next macroblock moving image signal by the subtractor 17, and the other is a motion vector that moves as shown in FIG. In order to compare and verify whether it exists within the vector detection range, a motion vector in units of macroblocks is output to the comparator 15. A region D in FIG. 3 indicates a region where the motion vector detection range is narrowed, and a region U indicates a region where the motion vector detection range is expanded. That is, the macroblock C detected by the predictor 12 shown in FIG. ij Motion vector V corresponding to ij Is compared in the motion vector switching region D or U output from the switching region determiner 14 by the comparator 15 to find the macroblock switching signal adaptively and output it to the counter 16 To do.
[0059]
The motion vector detection range shown in FIG. 3 will be described in more detail. FIG. 4 is a diagram illustrating the motion vector detection range shown in FIG. 3 in more detail. FIG. 4A shows motion vector detection range candidates. In this embodiment, there are five motion vector detection range candidates A1, A2, A3, A4, and A5. These motion vector detection range candidates are stored in the detection range determiner 13. The motion vector detection ranges used when the motion vector is detected by the predictor 12 or when the motion vector switching region is determined by the switching region determiner 14 are candidates for the five motion vector detection ranges A1 and A2. , A3, A4, A5 are selected and used.
[0060]
Assume that A3 is actually used as a motion vector detection range among the motion vector detection range candidates A1, A2, A3, A4, and A5.
[0061]
As shown in FIG. 4B, the outermost line l3 that is the outermost line of the motion vector detection range A3, and the outermost line l3 ′ that is the outermost line of the motion vector detection range A3 ′ that is inside the motion vector detection range A3. A region between the regions corresponds to the region U described in FIG. The region U in FIG. 3 is determined by the switching region determiner 14. Then, as will be described later, when a predetermined condition is satisfied when a motion vector is on the area U, the motion vector detection range A3 is processed to be expanded. At this time, the motion vector detection ranges A3 ′ and A3 ″ are processed to expand at the same time.
[0062]
Similarly, as shown in FIG. 4B, the region inside the outermost line l3 ″ that is the outermost line of the motion vector detection range A3 ″ inside the motion vector detection range A3 ′ has been described with reference to FIG. Corresponds to region D. The region D in FIG. 3 is determined by the switching region determiner 14, and the motion vector detection range A3 is reduced when a predetermined condition is satisfied when a motion vector is on the region D as will be described later. To be processed. At this time, the motion vector detection ranges A3 ′ and A3 ″ are processed to be reduced at the same time.
[0063]
Further, the switching area determiner 14 determines the area U and the area D in FIG. 3 according to the motion vector detection range.
[0064]
In this embodiment, since the motion vector detection range is switched only for motion vectors based on P pictures, the comparator 15 operates only when P pictures are encoded. Naturally, it operates even when encoding a B picture.
[0065]
Comparator 15 uses macroblock C ij Motion vector V corresponding to ij 3 is determined whether or not the vehicle is on the region U in FIG. 3 and whether it is on the region D, and the determination result is output to the counter 16 as a macroblock switching signal.
[0066]
When the macro block switching signal is input to the counter 16, the macro block switching signal is sent to the macro block C. ij Motion vector V corresponding to ij Indicates that the vehicle is on the area U in FIG. 3, the count value corresponding to the area U is increased by 1, and the macroblock switching signal is changed to the macroblock C. ij Motion vector V corresponding to ij Indicates that the vehicle is on the region D in FIG. 3, the count value corresponding to the region D is increased by 1.
[0067]
In this way, the counter 16 counts the count value corresponding to the region D and the count value corresponding to the region U for one frame, and the counter 16 uses the count result as a frame unit switching signal (hereinafter referred to as a frame switching signal). To the detection range determiner 13. When the frame switching signal is input, the detection range determiner 13 adaptively determines the motion vector detection range in units of frames.
[0068]
That is, the detection range determiner 13 determines the motion vector detection range actually used from the motion vector detection range candidates A1, A2, A3, A4, and A5 shown in FIG.
[0069]
As shown in FIG. 5A, the detection range determiner 13 selects the motion vector detection range A4 as shown in FIG. 5B when the motion vector Q is on the region D. Reduce the motion vector detection range. More specifically, the detection range determiner 13 calculates (the number of motion vectors existing in the motion vector switching area D) (the number of motion vectors in the period of one frame) based on the frame switching signal input from the counter 16. When the value divided by the number of macroblocks) exceeds a predetermined threshold, the motion vector detection range is switched to the motion vector switching area A4. At this time, the motion vector detection ranges A3 ′ and A3 ″ are simultaneously switched to A4 ′ and A4 ″, respectively. Thus, the detection range determiner 13 reduces each motion vector detection range. When the detection range determiner 13 determines the motion vector detection range as the motion vector detection range A4, the determined motion vector detection range is fed back to the switching region determiner 14 and the predictor 12. In response to the determination, the switching area determiner 14 determines the motion vector switching areas D and U as shown in FIG.
[0070]
Further, when the motion vector R is on the region U as shown in FIG. 6B, the detection range determiner 13 selects the motion vector detection range A2 as shown in FIG. 6B. As a result, the motion vector detection range is expanded. More specifically, based on the frame switching signal input from the counter 16, the detection range determiner 13 calculates (the number of motion vectors existing in the motion vector switching region U) (in the period of one frame). When the value divided by the number of macroblocks) exceeds a predetermined threshold, the motion vector detection range is switched to the motion vector detection range A2. At this time, the motion vector detection ranges A3 ′ and A3 ″ are switched to A2 ′ and A2 ″ respectively. In this way, the detection range determiner 13 expands each motion vector detection range. When the detection range determiner 13 determines the motion vector detection range as the motion vector detection range A2, the determined motion vector detection range is fed back to the switching region determiner 14 and the predictor 12. In response to the determination, the switching area determiner 14 determines the motion vector switching areas D and U as shown in FIG.
[0071]
Further, the detection range determiner 13 has a value obtained by dividing (the number of motion vectors existing in the motion vector switching region D) by (the number of macroblocks existing in one frame period) smaller than a predetermined threshold, and ( When the value obtained by dividing (the number of motion vectors existing in the motion vector switching region U) by (the number of macroblocks existing in one frame period) is smaller than a predetermined threshold, the motion vector detection range is neither enlarged nor reduced. That is, the motion vector detection range is not changed.
[0072]
The motion vector detection range fed back to the predictor 12 is used as a motion vector detection range when predicting a motion vector in the predictor 12 in the next frame unit as an optimal motion vector detection range in frame units.
[0073]
For example, when the detection range determiner 13 determines the motion vector detection range as the motion vector A4 as shown in FIG. 5B, the predictor 12 predicts the motion vector in units of the next frame. A motion vector detection range A4 is used.
[0074]
Similarly, when the detection range determiner 13 determines the motion vector detection range as the motion vector A2 as shown in FIG. 6B, the predictor 12 predicts the motion vector in units of the next frame. The motion vector detection range A2 is used.
[0075]
The same operation as described above is performed in the next frame unit, and the motion vector detection range used in the predictor 12 is adaptively updated one after another. In the present embodiment, the above operation is performed for each P frame. That is, FIG. 7 shows the timing for updating the motion vector detection range. The motion vector detected in the P frame 20 is used by the detection range determiner 13 to determine the motion vector detection range of the next P frame 21. As described above, the moving image compression coding apparatus according to the present embodiment switches the motion vector detection range for each P frame.
[0076]
In particular, in the case of an input video image having a large motion, the conventional video compression encoding apparatus described with reference to FIG. 11 detects only the motion vector P riding on the outermost periphery of the motion vector detection range 320. Therefore, even if a motion vector more appropriate than the motion vector P on the outermost periphery of the motion vector detection range 320 exists outside the motion vector detection range 320, such a motion vector can be detected and used. There wasn't. Even in such a case, the conventional moving image compression encoding apparatus described with reference to FIG. 11 detects and uses the motion vector P instead of detecting an appropriate motion vector.
[0077]
On the other hand, in the moving picture compression encoding apparatus of the present embodiment, when the motion vector detection range is expanded, it rides on the area U shown in FIG. 3, FIG. 4, FIG. 5, FIG. Consider motion vectors. Therefore, even when a proper motion vector exists outside the motion vector detection range in the conventional technique and such a proper motion vector cannot be detected, the region U is moved as a motion vector as in the present embodiment. This makes it possible to detect an appropriate motion vector that could not be detected by the conventional technique.
[0078]
As described above, according to the present embodiment, it is possible to detect an appropriate motion vector even for an input video image with a large motion, and to set an appropriate motion vector detection range. Become.
[0079]
As described above, the moving image compression coding apparatus according to the present embodiment detects a motion vector in parallel with the processing operation of the motion vector detection means 21 that detects a motion vector of a moving image signal by compression coding. Since the motion vector detection range to be performed is replaced with a range optimized for each frame, the effect of optimizing motion vector detection without increasing the hardware scale of a circuit or the like provided for the motion vector detection means 21 There is. In addition, an appropriate motion vector can be detected even for an image having a large motion, and an appropriate motion vector detection range can be set.
[0080]
In the present embodiment, the detection range determiner 13 selects the motion vector detection range that is actually used from the five motion vector detection range candidates. However, the present invention is not limited to this. An actual motion vector detection range may be selected from three motion vector detection range candidates, or an actual motion vector detection range may be selected from seven motion vector detection range candidates. The detection range determiner 13 of the present embodiment stores a plurality of motion vector detection range candidates, and only needs to be determined by selecting a motion vector detection range to be actually used.
[0081]
Furthermore, in the present embodiment, the detection range determiner 13 has been described as selecting a motion vector detection range that is actually used from the five motion vector detection ranges, but the present invention is not limited to this. The detection range determiner 13 may increase the expansion ratio of the motion vector detection range as the number of motion vectors existing in the motion vector switching region U increases.
[0082]
In this case, the detection range determiner 13 may select a larger motion vector detection range as the number of motion vectors existing in the motion vector switching region U increases from the motion vector detection ranges held in advance. Alternatively, the detection range determiner 13 may not generate the motion vector detection range in advance, and may generate a larger motion vector detection range as the number of motion vectors existing in the motion vector switching region U increases.
[0083]
The detection range determiner 13 may increase the reduction rate of the motion vector detection range as the number of motion vectors existing in the motion vector switching region D increases.
[0084]
Further, in this case, the detection range determiner 13 may select a smaller motion vector detection range as the number of motion vectors present in the motion vector switching region D from the previously stored motion vector detection ranges increases. Alternatively, the detection range determiner 13 may not generate the motion vector detection range in advance, and may generate a smaller motion vector detection range as the number of motion vectors existing in the motion vector switching region D increases.
[0085]
Note that the moving image compression encoding apparatus of this embodiment approaches a pixel unit when the motion vector detection range is narrow as shown in FIGS. 8A, 8B, and 8C. On the other hand, if it is wide, the motion vector to be detected by the widened portion is thinned out. That is, when the detection range is wide as in the motion vector detection range A1 as shown in FIG. 8A, the motion vector relating to the thinned pixels is detected as indicated by black marks, and conversely in FIG. ), When the detection range is narrow as in the motion vector detection range A5, the motion vector is detected in pixel units as indicated by black marks. Therefore, even if the motion vector detection range is widened, pixels for obtaining motion vectors are thinned out according to the width, so that the amount of calculation for motion vector detection does not increase.
[0086]
As shown in FIG. 4, when a plurality of types of motion vector detection ranges are provided, and a configuration for selecting a motion vector detection range from the plurality of types of motion vector detection ranges is provided, the motion vector detection range is set as the motion of the input video. Optimization can be achieved by appropriately enlarging / reducing according to the size, the motion vector detection accuracy can be improved and the amount of generated codes can be reduced, and the quality of the moving image after decoding can be improved.
[0087]
In addition, a circuit such as a storage means required for motion vector detection can be scaled to correspond to the narrowest range of the motion vector detection range, thereby realizing a high-quality decoded image due to improved motion vector detection accuracy. The device that can be made can also be made inexpensive.
[0088]
From the motion vector detection range 13 in the above embodiment, a switching region determiner 14 that generates a motion vector detection range switching region according to the motion vector detection range, and the motion vector detection range switching region and the detected motion vector And a comparator 15 for comparing the motion vector to determine whether the motion vector is present in the motion vector switching region, and the counter 16 stores the motion vector switching region and the determination signal of the output signal of the comparator 15 and stores it in the counter 16. With the configuration for determining the motion vector detection range based on the determination signal, the setting of the motion vector detection range of the motion vector detected by the motion vector detection means 21 can follow the motion of the input video image, Immediateness of the motion vector detection range according to the motion of the input video image can be improved.
[0089]
In the present embodiment, the motion vector detection range output from the detection range determiner 13 to the predictor 12 has been described as being updated in units of frames. However, the present invention is not limited to this. Although it has been described that the motion vector detection range is adaptively determined for each frame, the present invention is not limited to this.
[0090]
The motion vector detection range output from the detection range determiner 13 to the predictor 12 may be updated during n (n is a natural number satisfying n ≦ N) periods. However, N is the total number of macroblocks existing in one frame, and the total number of macroblocks in one division unit when one frame is divided into a plurality is n. In this case, the counter 16 is also configured to store the number of motion vectors in n motion vectors existing in the motion vector switching region, and (the number of motion vectors existing in the motion vector switching region) is set to (n When the value divided by the number of macroblocks existing in the period becomes equal to or greater than a predetermined threshold value, the motion vector detection range is switched, and the switched motion vector detection range is transferred to the motion vector detection means 21 and the switching region determiner 14. Return.
[0091]
For example, when a value obtained by dividing (the number of motion vectors existing in the region D) by (the number of macroblocks existing in n periods) is equal to or greater than a predetermined threshold, the motion vector detection range is set to, for example, FIG. 5), the motion vector detection range A3 is switched to the motion vector detection range A4 as shown in FIG. That is, the motion vector detection range is reduced. For example, when the value obtained by dividing (the number of motion vectors existing in the region U) by (the number of macroblocks existing in n periods) is equal to or greater than a predetermined threshold value, For example, the motion vector detection range is switched from the motion vector detection range A3 to the motion vector detection range A2 as shown in FIGS. 6 (a) and 6 (b). That is, the motion vector detection range is expanded.
[0092]
By adopting such a configuration, it is possible to improve the detection accuracy of the motion vector in accordance with the motion of the input moving image video and reduce the amount of generated code.
[0093]
Next, the flow of a series of processes described above will be described using FIG. 9 with reference to the block diagram shown in FIG.
[0094]
First, the input video image input from the input terminal 1 is rearranged by the frame rearranger 2 in the order of decoding, and is subdivided into N pieces (where N is a natural number of 2 or more) per frame in step 31. It becomes a block moving image signal.
[0095]
In step 32, the changeover switch 18 determines whether the macroblock moving image signal extracted from the frame rearranger 2 in the decoding order is an I picture or a non-I picture. If the changeover switch 18 determines that the macroblock moving image signal is an I picture, the switch 20 is turned off.
[0096]
The macroblock moving image signal determined to be an I picture is passed through a DCT unit 3, a quantizer 4, an inverse quantizer 9, an inverse DCT unit 10, and an adder 19 in step 33, and is then sent to the frame memory 11 as an I picture macroblock Stores a decoded video signal.
[0097]
Next, in step 34, the end of compression decoding of the macroblock moving image signal for one frame is determined. If one frame has not been reached, the process returns to step 32.
[0098]
In step 32, it is determined whether the macroblock moving image signal extracted from the rearranger 2 is an I picture. If it is not an I picture, it is determined in step 35 by the changeover switch 18 whether it is a P picture or a B picture.
[0099]
When the macroblock moving image signal is determined to be a P picture, the subtracter 17 subtracts the macroblock moving image signal and the predicted video signal output from the predictor 12 in step 36, and outputs a difference signal. Switch 20 is turned on.
[0100]
The difference signal subtracted in step 36 passes through the DCT unit 3, the quantizer 4, the inverse quantizer 9, and the inverse DCT unit 10 in step 37, and is output from the inverse DCT signal of the P picture and the predictor 12 in the adder 19. The predicted video signal (in this example, the predicted video signal from the immediately preceding I picture, but when the P picture continues, the predicted video signal from the immediately preceding P picture) is added, and the macro block is referenced The signal is stored in the frame memory 11 until one frame is reached. At the same time, the predictor 12 generates a predicted video signal using a motion vector that minimizes the difference between the frame reference signal and the macroblock moving image signal from the frame rearranger 2.
[0101]
The predicted video signal generated in step 37 is input to the comparator 15 in step 38, and the comparator 15 compares the predicted video signal with the motion vector switching region output from the switching region determiner 14, thereby making a macroblock. A switching signal is output to the counter 16. The counter 16 stores the macroblock switching signal until one frame is reached.
[0102]
Next, in step 34, the end of compression decoding of the macroblock moving image signal for one frame is determined. If one frame has not been reached, the process returns to step 32. In the above example, the step of turning on the switch 20 is set to step 36. However, it may be any step before addition by the adder 19, and may be step 35 or step 37. Of course.
[0103]
In step 32, it is determined whether the macroblock moving image signal extracted from the rearranger 2 is an I picture. If it is not an I picture, the switch 18 determines whether it is a P picture or a B picture in step 35.
[0104]
If the macroblock moving image signal is determined to be a B picture, the subtracter 17 subtracts the macroblock moving image signal and the predicted video signal output from the comparator 12 in step 39 to output a difference signal. The difference signal subtracted in step 39 generates a quantized signal in step 40 through the DCT unit 3 and the quantizer 4, and in step 34 determines the end of compression decoding of the macroblock moving image signal for one frame. If one frame has not been reached, the process returns to step 32.
[0105]
If it is determined in step 34 that one frame has been reached, a frame switching signal is output from the counter 16 to the detection range determiner 13 in step 41, and the detection range determiner 13 detects the motion vector detection range in units of frames. Is fed back to the predictor 12 and also output to the switching region determiner 14, and a motion vector switching region is generated by the switching region determiner 14 and output to the comparator 15.
[0106]
In step 41, a motion vector detection range in units of frames is generated and output to the predictor 12. After that, in step 42, the moving image video signal is finished and it is determined whether there is a next frame. Returning to the device 2, if there is no next frame, the process is terminated.
[0107]
In the above-described embodiment, the case where the motion vector detection range is updated in units of frames has been described. However, it is performed in units of predetermined units of input moving image signals such as screen units, frame units, and group of pictures (GOP) units. You can also. However, it is necessary to change the motion vector detection range determiner 13, the frame memory 11 and the like according to the unit.
[0108]
In the above-described embodiment, MPEG compression has been described as an example, but the compression / decoding method is not limited to MPEG. 261 or H.264. Any compression scheme that performs inter-frame prediction that reduces redundancy in the time direction, such as H.263, can be applied.
[0109]
According to the present embodiment, even when there are a plurality of detection ranges for motion vector detection, the speed of input video motion can be reduced when moving image compression encoding is performed without increasing the hardware scale. Accordingly, there is an effect that the optimum motion vector detection range can be selected, and as a result, an excellent effect that high image quality can be realized is obtained. Further, an appropriate motion vector can be detected even for an image with a large motion, and an appropriate motion vector detection range can be set.
[0110]
The program of the present invention is a program for causing a computer to execute all or some of the steps (or processes, operations, actions, etc.) of the above-described motion vector detection method of the present invention. It is a program that works in cooperation.
[0111]
The recording medium of the present invention is a program for causing a computer to execute all or a part of all or some of the steps (or processes, operations, actions, etc.) of the motion vector detection method of the present invention described above. Is a recording medium that can be read by a computer and that the read program executes the operation in cooperation with the computer.
[0112]
The “part of means (or apparatus, element, etc.)” of the present invention means one or several means out of the plurality of means. The “step (or process, operation, action, etc.)” means one or several of the plurality of steps.
[0113]
Further, the above-mentioned “means (or device, element, etc.) function” of the present invention means the function of all or a part of the above means, and the above “step (or process, operation, action, etc.) ) "Means the operation of all or part of the above steps.
[0114]
Further, one usage form of the program of the present invention may be an aspect in which the program is recorded on a computer-readable recording medium and operates in cooperation with the computer.
[0115]
Further, one usage form of the program of the present invention may be an aspect in which the program is transmitted through a transmission medium, read by a computer, and operated in cooperation with the computer.
[0116]
The data structure of the present invention includes a database, data format, data table, data list, data type, and the like.
[0117]
The recording medium includes a ROM and the like, and the transmission medium includes a transmission medium such as the Internet, light, radio waves, sound waves, and the like.
[0118]
The computer of the present invention described above is not limited to pure hardware such as a CPU, but may include firmware, an OS, and peripheral devices.
[0119]
As described above, the configuration of the present invention may be realized by software or hardware.
[0120]
【The invention's effect】
As is apparent from the above description, the present invention is capable of detecting an appropriate motion vector even for an image having a large motion, and a moving image compression capable of setting an appropriate motion vector detection range. An encoding device, a motion vector detection method, a recording medium, and a program can be provided.
[Brief description of the drawings]
FIG. 1 is a block diagram of a moving image compression coding apparatus according to a first embodiment of the present invention.
FIG. 2 is a diagram illustrating an example of a macroblock motion vector according to the first embodiment of the present invention;
FIG. 3 is a diagram showing an example of a motion vector and a motion vector switching area in the first embodiment of the present invention.
FIG. 4A is a diagram showing motion vector detection range candidates according to the first embodiment of the present invention.
(B) The figure which shows the motion vector detection range in the 1st Embodiment of this invention.
FIG. 5A is a diagram showing an example of a current motion vector detection range in the first embodiment of the present invention.
(B) The figure which shows the example of the motion vector detection range after the update in the 1st Embodiment of this invention
FIG. 6A is a diagram showing an example of a current motion vector detection range in the first embodiment of the present invention.
(B) The figure which shows the example of the motion vector detection range after the update in the 1st Embodiment of this invention
FIG. 7 is a diagram showing the update timing of the motion vector detection range in the first embodiment of the present invention.
FIG. 8A is a diagram showing an outline of pixel sampling when detecting a motion vector when a motion vector detection range is large in the first embodiment of the present invention;
(B) The figure which shows the outline | summary of the sampling of the pixel at the time of detecting the motion vector in case the motion vector detection range is medium in the 1st Embodiment of this invention
(C) The figure which shows the outline | summary of the sampling of the pixel at the time of detecting the motion vector in case the motion vector detection range in the 1st Embodiment of this invention is small
FIG. 9 is a flowchart of motion vector switching area determination in the first embodiment of the present invention.
FIG. 10 is a block diagram showing a configuration of a conventional motion vector detection device.
FIG. 11 is a block diagram showing a configuration of a conventional moving image compression encoding apparatus.
FIG. 12 is an explanatory diagram showing an operation of a motion detection device 307A constituting a conventional moving image compression encoding device.
FIG. 13 is a flowchart showing the processing operation of the CPU 5 constituting the conventional moving image compression encoding apparatus.
FIG. 14 is a diagram showing an example of a motion vector detection range and a motion vector of a conventional moving image compression encoding apparatus.
[Explanation of symbols]
1 Input terminal
2 Frame sorter
3 DCT unit
4 Quantizer
5 Variable length encoder
6 Buffer memory
7 Output terminal
8 Rate controller
9 Inverse quantizer
10 Inverse DCT device
11 frame memory
12 Predictor
13 Motion vector detection range determiner
14 Switching area determiner
15 comparator
16 counter
17 Subtractor
18 changeover switch
19 Adder
20 switches
21 Motion vector detection means

Claims (14)

入力動画像映像を1フレームに付きN(但し、Nは2以上の自然数)個に細分化したマクロブロック動画像信号を生成するマクロブロック生成手段と、
前記マクロブロック動画像信号を圧縮符号化した後に復号化して復号化動画像信号を生成する符号復号化手段と、
前記復号化動画像信号と前記マクロブロック動画像信号とから第1の動きベクトル検出範囲内で動きベクトルを検出する動きベクトル検出手段と、
検出された前記動きベクトルのうち、前記第1の動きベクトル検出範囲の最外線である第1の最外線と、前記第1の動きベクトル検出範囲の内側にある第2の動きベクトル検出範囲の最外線である第2の最外線との間にある動きベクトルの数を第1の動きベクトルの数としてカウントする動きベクトルカウント手段と、
カウントされた前記第1の動きベクトルの数に基づいて前記第1の動きベクトル検出範囲を拡大する動きベクトル検出範囲決定手段とを備えた動画像圧縮符号化装置。
Macroblock generating means for generating a macroblock moving image signal obtained by subdividing an input video image into N (where N is a natural number of 2 or more) per frame;
Coding / decoding means for generating a decoded moving image signal by compressing and encoding the macroblock moving image signal;
Motion vector detection means for detecting a motion vector within a first motion vector detection range from the decoded video signal and the macroblock video signal;
Among the detected motion vectors, the first outermost line that is the outermost line of the first motion vector detection range and the outermost of the second motion vector detection range that is inside the first motion vector detection range. Motion vector counting means for counting the number of motion vectors between the second outermost line, which is an outer line, as the number of first motion vectors;
A moving image compression encoding apparatus comprising: a motion vector detection range determining unit that expands the first motion vector detection range based on the counted number of the first motion vectors.
前記動きベクトルカウント手段は、前記第2の動きベクトル検出範囲の内側にある第3の動きベクトル検出範囲内にある動きベクトルの数を第2の動きベクトルの数としてカウントし、
前記動きベクトル検出範囲決定手段は、カウントされた前記第2の動きベクトルの数に基づいて前記第1の動きベクトル検出範囲を縮小する請求項1記載の動画像圧縮符号化装置。
The motion vector counting means counts the number of motion vectors within the third motion vector detection range inside the second motion vector detection range as the number of second motion vectors,
2. The moving image compression encoding apparatus according to claim 1, wherein the motion vector detection range determination means reduces the first motion vector detection range based on the counted number of the second motion vectors.
前記動きベクトル検出範囲決定手段は、カウントされた前記第1の動きベクトルの数が所定の閾値より多い場合、前記第1の動きベクトル検出範囲を拡大し、前記所定の閾値より小さい場合、前記第1の動きベクトル検出範囲を拡大しないまたは前記第1の動きベクトル検出範囲を変更しない請求項1記載の動画像圧縮符号化装置。The motion vector detection range determining means expands the first motion vector detection range when the counted number of the first motion vectors is larger than a predetermined threshold, and when the number of the first motion vectors is smaller than the predetermined threshold, The moving picture compression encoding apparatus according to claim 1, wherein one motion vector detection range is not expanded or the first motion vector detection range is not changed. 前記動きベクトル検出範囲決定手段は、カウントされた前記第1の動きベクトルの数が多いほど前記第1の動きベクトル検出範囲の拡大率を大きくする請求項1記載の動画像圧縮符号化装置。2. The moving image compression coding apparatus according to claim 1, wherein the motion vector detection range determination means increases the expansion rate of the first motion vector detection range as the number of counted first motion vectors increases. 前記動きベクトル検出範囲決定手段は、カウントされた前記第2の動きベクトルの数が多いほど前記第1の動きベクトル検出範囲の縮小率を大きくする請求項2記載の動画像圧縮符号化装置。3. The moving image compression encoding apparatus according to claim 2, wherein the motion vector detection range determining means increases the reduction ratio of the first motion vector detection range as the number of counted second motion vectors increases. 前記動きベクトル検出範囲決定手段は、予め複数種類の動きベクトル検出範囲を有しており、
その複数種類の動きベクトル検出範囲から、カウントされた前記第1の動きベクトルの数が多いほど大きな動きベクトル検出範囲を選択して、前記第1の動きベクトル検出範囲とする請求項1記載の動画像圧縮符号化装置。
The motion vector detection range determining means has a plurality of types of motion vector detection ranges in advance,
2. The moving image according to claim 1, wherein a larger motion vector detection range is selected from the plurality of types of motion vector detection ranges as the number of counted first motion vectors is larger, and is used as the first motion vector detection range. Image compression coding apparatus.
前記動きベクトル検出範囲決定手段は、予め複数種類の動きベクトル検出範囲を有しており、
その複数種類の動きベクトル検出範囲から、カウントされた前記第2の動きベクトルの数が多いほど小さな動きベクトル検出範囲を選択して、前記第1の動きベクトル検出範囲とする請求項2記載の動画像圧縮符号化装置。
The motion vector detection range determining means has a plurality of types of motion vector detection ranges in advance,
3. The moving image according to claim 2, wherein from the plurality of types of motion vector detection ranges, a smaller motion vector detection range is selected as the number of the counted second motion vectors is larger, and is used as the first motion vector detection range. Image compression coding apparatus.
前記動きベクトル検出範囲決定手段は、前記第1の動きベクトル検出範囲の更新を、Pフレーム毎に行う、またはPフレームをn個(但し、n≦Nの自然数)に分割した分割単位毎に行い、
前記第1の動きベクトル検出範囲が更新される際、前記動きベクトル検出範囲決定手段は、前記Pフレームのまたは前記分割単位のカウントされた前記第1の動きベクトルの数を、前記Pフレームにまたは前記分割単位に存在するマクロブロック動画像信号の数で割った数が、所定の閾値以上になった場合に、前記第1の動きベクトル検出範囲を拡大する請求項1記載の動画像圧縮符号化装置。
The motion vector detection range determination means updates the first motion vector detection range for each P frame or for each division unit obtained by dividing the P frame into n pieces (where n ≦ N is a natural number). ,
When the first motion vector detection range is updated, the motion vector detection range determination means sets the number of the first motion vectors counted in the P frame or the division unit to the P frame or The moving image compression coding according to claim 1, wherein the first motion vector detection range is expanded when the number divided by the number of macroblock moving image signals existing in the division unit is equal to or greater than a predetermined threshold. apparatus.
前記動きベクトル検出範囲決定手段は、前記第1の動きベクトル検出範囲の更新を、Pフレーム毎に行う、またはPフレームをn個(但し、n≦Nの自然数)に分割した分割単位毎に行い、
前記第1の動きベクトル検出範囲が更新される際、前記動きベクトル検出範囲決定手段は、前記Pフレームのまたは前記分割単位のカウントされた前記第2の動きベクトルの数を、前記Pフレームにまたは前記分割単位に存在するマクロブロック動画像信号の数で割った数が、所定の閾値以上になった場合に、前記第1の動きベクトル検出範囲を縮小する請求項1記載の動画像圧縮符号化装置。
The motion vector detection range determination means updates the first motion vector detection range for each P frame or for each division unit obtained by dividing the P frame into n pieces (where n ≦ N is a natural number). ,
When the first motion vector detection range is updated, the motion vector detection range determination means sets the number of the second motion vectors counted in the P frame or the division unit to the P frame or The moving image compression coding according to claim 1, wherein the first motion vector detection range is reduced when the number divided by the number of macroblock moving image signals existing in the division unit exceeds a predetermined threshold. apparatus.
前記動きベクトル検出手段は、前記第1の動きベクトル検出範囲を拡大する際、前記第2の動きベクトル検出範囲をも拡大する請求項1、3、4、6、8のいずれかに記載の動画像圧縮符号化装置。9. The moving image according to claim 1, wherein the motion vector detection means expands the second motion vector detection range when expanding the first motion vector detection range. Image compression coding apparatus. 前記動きベクトル検出手段は、前記第1の動きベクトル検出範囲を縮小する際、前記第3の動きベクトル検出範囲をも縮小する請求項2、4、7、9記載の動画像圧縮符号化装置。10. The moving image compression coding apparatus according to claim 2, 4, 7, or 9, wherein the motion vector detection means also reduces the third motion vector detection range when reducing the first motion vector detection range. 入力動画像映像を1フレームに付きN(但し、Nは2以上の自然数)個に細分化して生成されたマクロブロック動画像信号を圧縮符号化した後に復号化して生成された復号化動画像信号と、前記マクロブロック動画像信号とから第1の動きベクトル検出範囲内で動きベクトルを検出する動きベクトル検出ステップと、
検出された前記動きベクトルのうち、前記第1の動きベクトル検出範囲の最外線である第1の最外線と、前記第1の動きベクトル検出範囲の内側にある第2の動きベクトル検出範囲の最外線である第2の最外線との間にある動きベクトルの数を第1の動きベクトルの数としてカウントする動きベクトルカウントステップと、
前記第1の動きベクトル検出範囲の最外線である第1の最外線と、前記第1の動きベクトル検出範囲の内側にある第2の動きベクトル検出範囲の最外線である第2の最外線であって、前記第1の最外線に隣接する1本もしくは複数本の第2の最外線との上にある動きベクトルの数である第1の動きベクトルの数をカウントする動きベクトルカウントステップと、
カウントされた前記第1の動きベクトルの数に基づいて前記第1の動きベクトル検出範囲を拡大する動きベクトル検出範囲決定ステップとを備えた動きベクトル検出方法。
A decoded moving image signal generated by compressing and encoding a macroblock moving image signal generated by subdividing an input moving image image into N (where N is a natural number of 2 or more) per frame. A motion vector detection step for detecting a motion vector within a first motion vector detection range from the macroblock moving image signal;
Among the detected motion vectors, the first outermost line that is the outermost line of the first motion vector detection range and the outermost of the second motion vector detection range that is inside the first motion vector detection range. A motion vector counting step for counting the number of motion vectors between the outermost second outermost line as the number of first motion vectors;
A first outermost line that is the outermost line of the first motion vector detection range, and a second outermost line that is the outermost line of the second motion vector detection range located inside the first motion vector detection range. A motion vector counting step for counting the number of first motion vectors, which is the number of motion vectors above one or more second outermost lines adjacent to the first outermost line;
A motion vector detection method comprising: a motion vector detection range determination step for expanding the first motion vector detection range based on the counted number of the first motion vectors.
請求項12記載の動きベクトル検出方法の、入力動画像映像を1フレームに付きN(但し、Nは2以上の自然数)個に細分化して生成されたマクロブロック動画像信号を圧縮符号化した後に復号化して生成された復号化動画像信号と、前記マクロブロック動画像信号とから第1の動きベクトル検出範囲内で動きベクトルを検出する動きベクトル検出ステップと、
検出された前記動きベクトルのうち、前記第1の動きベクトル検出範囲の最外線である第1の最外線と、前記第1の動きベクトル検出範囲の内側にある第2の動きベクトル検出範囲の最外線である第2の最外線との間にある動きベクトルの数を第1の動きベクトルの数としてカウントする動きベクトルカウントステップと、
カウントされた前記第1の動きベクトルの数に基づいて前記第1の動きベクトル検出範囲を拡大する動きベクトル検出範囲決定ステップとをコンピュータに実行させるためのプログラム。
13. The motion vector detection method according to claim 12, after compressing and encoding a macroblock moving image signal generated by dividing an input moving image image into N (where N is a natural number of 2 or more) per frame. A motion vector detection step of detecting a motion vector within a first motion vector detection range from the decoded video signal generated by decoding and the macroblock video signal;
Among the detected motion vectors, the first outermost line that is the outermost line of the first motion vector detection range and the outermost of the second motion vector detection range that is inside the first motion vector detection range. A motion vector counting step for counting the number of motion vectors between the outermost second outermost line as the number of first motion vectors;
A program for causing a computer to execute a motion vector detection range determination step of expanding the first motion vector detection range based on the counted number of the first motion vectors.
請求項13記載のプログラムを担持した記録媒体であって、コンピュータにより処理可能な記録媒体。14. A recording medium carrying the program according to claim 13, which can be processed by a computer.
JP2002373296A 2001-12-25 2002-12-24 Moving picture compression coding apparatus and motion vector detection method Expired - Fee Related JP4034180B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002373296A JP4034180B2 (en) 2001-12-25 2002-12-24 Moving picture compression coding apparatus and motion vector detection method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001391441 2001-12-25
JP2001-391441 2001-12-25
JP2002373296A JP4034180B2 (en) 2001-12-25 2002-12-24 Moving picture compression coding apparatus and motion vector detection method

Publications (2)

Publication Number Publication Date
JP2003259373A JP2003259373A (en) 2003-09-12
JP4034180B2 true JP4034180B2 (en) 2008-01-16

Family

ID=28677055

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002373296A Expired - Fee Related JP4034180B2 (en) 2001-12-25 2002-12-24 Moving picture compression coding apparatus and motion vector detection method

Country Status (1)

Country Link
JP (1) JP4034180B2 (en)

Also Published As

Publication number Publication date
JP2003259373A (en) 2003-09-12

Similar Documents

Publication Publication Date Title
CN110809887B (en) Method and apparatus for motion vector modification for multi-reference prediction
JP4724351B2 (en) Image encoding apparatus, image encoding method, image decoding apparatus, image decoding method, and communication apparatus
KR100803611B1 (en) Method and apparatus for encoding video, method and apparatus for decoding video
US20070268964A1 (en) Unit co-location-based motion estimation
JP2015008510A (en) Dynamic selection of motion prediction search range and range of extension motion vector
JPH08307874A (en) Video signal encoding device
JP4606311B2 (en) Image coding apparatus and image coding method
JP4793424B2 (en) Image encoding apparatus, image encoding method, image decoding apparatus, image decoding method, and communication apparatus
JP2002125236A (en) Motion vector conversion method and converter
US7151799B2 (en) Transcoder for coded video
WO2005062625A1 (en) Method and device for encoding moving picture
KR100632072B1 (en) Moving picture compression/coding apparatus and motion vector detection method
JP3757088B2 (en) Moving picture coding apparatus and method
JPH10322705A (en) Motion detection and motion compensation prediction circuit
JP3674535B2 (en) Video coding method and apparatus
JPH10336672A (en) Encoding system converter and motion vector detection method therefor
JPH0846969A (en) System for encoding video signal
JPH0832969A (en) Motion vector detector
JP5598199B2 (en) Video encoding device
JP4034180B2 (en) Moving picture compression coding apparatus and motion vector detection method
KR100266161B1 (en) Method of predicting motion for digital image
KR100635009B1 (en) Mothod and apparatus for motion estimation considering total moving of image
JP4561701B2 (en) Video encoding device
JPH10210480A (en) Dynamic image coding system
KR100448700B1 (en) Frame rate conversion of cross fade interp0lation apparatous and method there of

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051209

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070912

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071024

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

Free format text: PAYMENT UNTIL: 20101102

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees