JP2004179906A - Device and method for motion vector detection - Google Patents

Device and method for motion vector detection Download PDF

Info

Publication number
JP2004179906A
JP2004179906A JP2002342846A JP2002342846A JP2004179906A JP 2004179906 A JP2004179906 A JP 2004179906A JP 2002342846 A JP2002342846 A JP 2002342846A JP 2002342846 A JP2002342846 A JP 2002342846A JP 2004179906 A JP2004179906 A JP 2004179906A
Authority
JP
Japan
Prior art keywords
motion vector
reduced
block
area
composite block
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.)
Withdrawn
Application number
JP2002342846A
Other languages
Japanese (ja)
Inventor
Kazuo Saigo
賀津雄 西郷
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 Holdings Corp
Original Assignee
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2002342846A priority Critical patent/JP2004179906A/en
Publication of JP2004179906A publication Critical patent/JP2004179906A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a motion vector detecting device with high detection precision of a motion vector. <P>SOLUTION: The motion vector detecting device is equipped with a reduced motion vector detecting means for detecting the reduced motion vector of reduced composite block and a motion vector detecting means for detecting motion vectors of respective encoded blocks according to the reduced motion vector. The reduced motion vector detecting means detects the reduced motion vector according to an evaluation value obtained by summing up difference values between pixel data arranged in the reduced composite vector and pixel data arranged in a reduced composite reference block provided in a reduced reference area, and the difference values are calculated by weighting pixel data arranged in a specified area of the reduced composite block and pixel data arranged in the area of the reduced composite reference block which corresponds to the specified area. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、動きベクトルを階層的に検出する動きベクトル検出装置および動きベクトル検出方法に関する。
【0002】
【従来の技術】
これまでに、動画像の動きベクトルを検出する際に、動きベクトルの検出(探索)範囲の拡大と動きベクトルを検出するための演算量削減とを両立させることを目的として様々な動きベクトル検出方法が提案されてきた。
【0003】
このような動きベクトル検出方法の一つとして階層的動きベクトル検出方法がある。この階層的動きベクトル検出方法は、まず、1段目の動きベクトル検出として現在のフレームと参照フレームとのそれぞれにおいて縮小画像を生成し、この両縮小画像に基づいて縮小動きベクトルを検出する。その後、原画像(縮小前の通常画面同士)による2段目の動きベクトル検出として、前記1段目の縮小動きベクトルを拡大したベクトルの終点を中心として動きベクトルを探索する方法である。
【0004】
図12は、従来の動きベクトル検出装置の動作を説明するための模式図である。縮小化フレーム17Bは、720画素×480ラインの符号化フレーム3B(マクロブロックMB)を水平方向および垂直方向に4分の1に縮小したものであり、180画素×120ラインによって構成されている。符号化フレーム3Bは、動きベクトルを求める対象となる符号化ブロック4Bを有している。符号化ブロック4Bは、16画素×16画素によって構成されている。縮小化フレーム17Bは、符号化ブロック4Bを水平方向および垂直方向に4分の1に縮小した縮小符号化ブロック6Bを有している。縮小符号化ブロック6Bは、4画素×4画素によって構成されている。
【0005】
縮小参照フレーム16Bは、720画素×480ラインの参照フレーム7Bを水平方向および垂直方向に沿って4分の1に縮小したものであり、180画素×120ラインによって構成されている。参照フレーム7Bは、動きベクトルを探索するための参照領域8Bを有している。縮小参照フレーム16Bは、縮小動きベクトルを探索するための縮小参照領域9Bを有している。
【0006】
縮小前の符号化フレーム3Bおよび参照フレーム7Bによって階層L0が構成されており、縮小後の縮小化フレーム17Bおよび縮小参照フレーム16Bによって階層L1が構成されている。
【0007】
図13は、従来の動きベクトル検出装置における縮小画像を生成する方法を説明するための模式図である。縮小前の階層L0における2行×2列の4個の画素A、画素B、画素Cおよび画素Dは、水平方向および垂直方向に沿って2分の1に縮小された結果、階層L1において1個の画素aとなる。階層L1における画素aの値は、下記の式に示すように、階層L0における画素A、画素B、画素Cおよび画素Dの値の平均値になる。
【0008】
a=(A+B+C+D)/4
まず、縮小符号化ブロック6Bに配置された画素の画素値と縮小参照領域9Bにおける縮小参照ブロックに配置された画素の画素値と間の差分絶対値を算出し、それらの差分絶対値の和(sad)が最小になる縮小参照ブロックを終点とし、縮小符号化ブロック6Bを始点とする縮小動きベクトルmv=(dh、dv)を求める。
【0009】
そして、求められた縮小動きベクトルmv=(dh、dv)を水平成分および垂直成分を4倍した初期動きベクトルMV=(dh×4、dv×4)に補正する。次に、初期動きベクトルMVの終点を、動きベクトルを探索するための中心とし、その周辺について符号化ブロック4Bとブロックマッチングを行う。
【0010】
このときの差分絶対値和(SAD)が最小になる参照領域8Bにおける位置を終点とし初期動きベクトルMVの始点を始点とするベクトルを符号化ブロック4Bの動きベクトルとして検出する。
【0011】
ブロックマッチングとは、これから動きベクトルを求めようとしている現フレームの対象ブロックについて、そのブロック内画像の輝度信号のパターンと最も類似している画像部分(同サイズのブロック領域)を参照フレームから探索し、探索された参照フレームの画像部分と現在のフレームの対象ブロックとの位置のオフセット量(中心間の変位量)を動きベクトルするものである。
【0012】
具体的には、符号化フレーム3Bを縮小した縮小符号化フレーム6Bにおける縮小符号化ブロックをmbとし、探索する縮小参照フレーム16Bにおける縮小参照領域をrefとすると、縮小符号化ブロックmbに属する全ての画素値とそれに呼応する縮小参照領域refの画素値との間の差分の絶対値和などの評価量SAD(mbc,ref)を求め、この評価量が最小となる点を縮小動きベクトルmvとして検出する(縮小画像間のSADは小文字のsadで記述しあるが算出式は同じ)。
【0013】
【数1】

Figure 2004179906
【0014】
なお、動きベクトルとして整数精度と実数精度があり、実数精度の動きベクトル求めるにはその探索画素が存在しないので、周囲の画素から補間によって参照画素を生成してブロックマッチングする。実数精度の動きベクトルとしては1/2画素精度の動きベクトルが用いられることが多く、整数精度の動きベクトルを探索した後、1/2画素精度の動きベクトルを演算し動きベクトルの検出精度を上げることができる。
【0015】
このような階層的動きベクトル検出方法の特長は、2段目の処理(階層L0)のみでブロックマッチングによって動きベクトルを探索するフルサーチと呼ばれる方法と比較すると、縮小画面において大まかな動きベクトルを縮小動きベクトルとして検出するため、階層L0における動きベクトルの検索範囲を大きく狭めることができる。したがって、階層L0だけで同じ検出範囲を処理した場合(1階層フルサーチ)の演算量と比べると格段に演算量は減少する。また、動きベクトル検索時に呼び込む画像データのメモリ容量も少なくすることができ、データ読み出しのアクセス回数が軽減されるため消費電力が抑えられる。
【0016】
しかしながら、このような階層的動きベクトル検出方法にあっては、1段目の動きベクトル検出において用いる縮小画面の縮小比率が大きくなるに従って探索に用いるブロック内の画素数も急激に減少する。このため、動きベクトルが少ない数のブロック内画素に基づいて検出されるので検出精度の劣化(誤検出)が生じるという問題点があった。
【0017】
図14は、従来の動きベクトル検出装置の他の動作を説明するための模式図である。縮小符号化フレーム17Cは、720画素×480ラインの符号化フレーム3Cを水平方向および垂直方向に4分の1に縮小したものであり、180画素×120ラインによって構成されている。
【0018】
符号化フレーム3Cは、動きベクトルを求める対象となる4個の符号化ブロック4Cを有している。符号化ブロック4Cは、2行×2列に構成されており、複合ブロック5Cが構成されている。各符号化ブロック4Cは、16画素×16画素によって構成されている。
【0019】
縮小符号化フレーム17Cは、複合ブロック5Cを水平方向および垂直方向に4分の1に縮小した縮小複合ブロック6Cを有している。縮小複合ブロック6Cは、8画素×8画素によって構成されている。
【0020】
縮小参照フレーム6Cは、720画素×480ラインの参照フレーム7Cを水平方向および垂直方向に沿って4分の1に縮小したものであり、180画素×120ラインによって構成されている。参照フレーム7Cは、動きベクトルを探索するための参照領域8Cを有している。縮小参照フレーム6Cは、縮小動きベクトルを探索するための縮小参照領域16Cを有している。
【0021】
縮小前の符号化フレーム3Cおよび参照フレーム7Cによって階層L0が構成されており、縮小後の縮小符号化フレーム17Cおよび縮小参照フレーム6Cによって階層L1が構成されている。
【0022】
まず、縮小複合ブロック6Cに配置された画素の画素値と縮小参照領域9Cにおける縮小参照ブロックに配置された画素の画素値と間の差分絶対値を算出し、それらの差分絶対値の和(sad)が最小になる縮小参照ブロックを終点とし、縮小複合ブロック6Cを始点とする縮小動きベクトルmv=(dh、dv)を求める。
【0023】
そして、求められた縮小動きベクトルmv=(dh、dv)を水平成分および垂直成分を4倍した初期動きベクトルMV=(dh×4、dv×4)に補正する。次に、初期動きベクトルMVの終点を、動きベクトルを探索するための中心とし、その周辺について複合ブロック5Cを構成する4個の符号化ブロック4Cとそれぞれブロックマッチングを行う。
【0024】
このときの差分絶対値和SADがそれぞれ最小になる参照領域8Cにおける位置を終点とし初期動きベクトルMVの始点を始点とするベクトルをそれぞれ4個の符号化ブロック4Cの動きベクトルとして検出する。
【0025】
このように階層L0において複数の符号化ブロック4C(ここでは4ブロック)を複合ブロック5Cとして1つの対象ブロックとしてまとめ、それを階層L1で縮小化した場合、縮小複合ブロック6Cの画面サイズが、図12を参照して前述した縮小符号化ブロック6Bの画面サイズよりも大きくなり検索に用いる画素数も増える。
【0026】
この場合、階層L1において得られた縮小動きベクトルは、階層L0における複合ブロック5Cを構成する4つの符号化ブロック4Cのすべてに同じ動きベクトルMV(初期動きベクトル)を充てることになる。従って、複合ブロック5C内の符号化ブロックが同じような動きベクトルを有している場合はブロックマッチングの回数も削減され、縮小ブロックの縮小化も抑えられ動きベクトルの検出精度も上がるという特長がある。
【0027】
【特許文献1】
特開平9−182080号公報(第6頁〜第7頁、第42図)
【0028】
【特許文献2】
特開平11−262015号公報(第3頁〜第4頁、第6図)
【0029】
【発明が解決しようとする課題】
しかしながら、前述したような複合ブロックによる縮小化においても、複合ブロックを構成する4個の符号化ブロックのうち、例えば一個の符号化ブロックが特異なブロックであるために、他の符号化ブロックの動きベクトルと大きく異なる特異な動きベクトルを有している場合には、他の符号化ブロックの動きベクトルを検出しようとするときに、この特異な動きベクトルに影響された結果、誤った動きベクトルを検出するおそれがあるという問題がある。
【0030】
本発明は、係る問題を解決するためになされたものであり、その目的は、動きベクトルの検出精度が高い動きベクトル検出装置および動きベクトル検出方法を提供することにある。
【0031】
【課題を解決するための手段】
本発明に係る動きベクトル検出装置は、参照フレームに設けられた参照領域を縮小した縮小参照領域に配置された画素データに基づいて、符号化フレームに設けられた複数の符号化ブロックを含む複合ブロックを縮小した縮小複合ブロックの縮小動きベクトルを検出する縮小動きベクトル検出手段と、前記縮小動きベクトル検出手段によって検出された前記縮小動きベクトルに基づいて、前記複合ブロックに含まれる各符号化ブロックの動きベクトルをそれぞれ検出する動きベクトル検出手段とを具備しており、前記縮小動きベクトル検出手段は、前記縮小複合ブロックに配置された画素データと前記縮小参照領域に設けられた縮小複合参照ブロックに配置された画素データとの間の差分値を加算した評価値に基づいて前記縮小動きベクトルを検出し、前記差分値は、前記縮小複合ブロックにおける所定の領域に配置された画素データと前記縮小複合参照ブロックにおいて前記所定の領域に対応する領域に配置された画素データとにそれぞれ重み付けをして算出されることを特徴とする。
【0032】
本発明に係る他の動きベクトル検出装置は、参照フレームに設けられた参照領域を縮小した縮小参照領域に配置された画素データに基づいて、符号化フレームに設けられた複数の符号化ブロックを含む複合ブロックを縮小した縮小複合ブロックの動きベクトルを表す縮小メイン動きベクトルと、前記符号化フレームにそれぞれ設けられた各符号化ブロックと対応するように前記縮小複合ブロックにそれぞれ配置された縮小サブブロックの動きベクトルを表す縮小サブ動きベクトルとをそれぞれ検出する縮小動きベクトル検出手段と、前記縮小動きベクトル検出手段によってそれぞれ検出された前記縮小メイン動きベクトルと前記縮小サブ動きベクトルとに基づいて、前記複合ブロックに含まれる各符号化ブロックの動きベクトルをそれぞれ検出する動きベクトル検出手段とを具備することを特徴とする。
【0033】
本発明に係る動きベクトル検出方法は、参照フレームに設けられた参照領域を縮小した縮小参照領域に配置された画素データに基づいて、符号化フレームに設けられた複数の符号化ブロックを含む複合ブロックを縮小した縮小複合ブロックの縮小動きベクトルを検出する縮小動きベクトル検出工程と、前記縮小動きベクトル検出工程によって検出された前記縮小動きベクトルに基づいて、前記複合ブロックに含まれる各符号化ブロックの動きベクトルをそれぞれ検出する動きベクトル検出工程とを包含しており、前記縮小動きベクトル検出工程は、前記縮小複合ブロックに配置された画素データと前記縮小参照領域に設けられた縮小複合参照ブロックに配置された画素データとの間の差分値を加算した評価値に基づいて前記縮小動きベクトルを検出し、前記差分値は、前記縮小複合ブロックにおける所定の領域に配置された画素データと前記縮小複合参照ブロックにおいて前記所定の領域に対応する領域に配置された画素データとにそれぞれ重み付けをして算出されることを特徴とする。
【0034】
本発明に係る他の動きベクトル検出方法は、参照フレームに設けられた参照領域を縮小した縮小参照領域に配置された画素データに基づいて、符号化フレームに設けられた複数の符号化ブロックを含む複合ブロックを縮小した縮小複合ブロックの動きベクトルを表す縮小メイン動きベクトルと、前記符号化フレームにそれぞれ設けられた各符号化ブロックと対応するように前記縮小複合ブロックにそれぞれ配置された縮小サブブロックの動きベクトルを表す縮小サブ動きベクトルとをそれぞれ検出する縮小動きベクトル検出工程と、前記縮小動きベクトル検出工程によってそれぞれ検出された前記縮小メイン動きベクトルと前記縮小サブ動きベクトルとに基づいて、前記複合ブロックに含まれる各符号化ブロックの動きベクトルをそれぞれ検出する動きベクトル検出工程とを包含することを特徴とする。
【0035】
【発明の実施の形態】
本実施の形態に係る動きベクトル検出装置においては、縮小複合ブロックに配置された画素データと縮小参照領域に設けられた縮小複合参照ブロックに配置された画素データとの間の差分値を加算した評価値に基づいて縮小動きベクトルが検出され、差分値は、縮小複合ブロックにおける所定の領域に配置された画素データと縮小複合参照ブロックにおいて所定の領域に対応する領域に配置された画素データとにそれぞれ重み付けをして算出される。
【0036】
このため、縮小複合ブロックに配置された画素データの一部が特異な画素データであっても、特異な画素データの影響を排除するように重み付けをする所定の領域を設定することができる。その結果、動きベクトルの検出精度を向上させることができる。
【0037】
前記縮小複合ブロックには、前記評価値を算出するための画素データに重み付けをする重み付け領域と、前記評価値を算出するための画素データに重み付けをしない非重み付け領域とが設けられており、前記重み付け領域は、前記縮小複合ブロックの中央に配置されており、前記非重み付け領域は、前記重み付け領域を囲むように前記縮小複合ブロックの周縁に配置されていることが好ましい。
【0038】
前記複合ブロックは、4行×4行の符号化ブロックによって構成されており、前記縮小複合ブロックに設けられた前記重み付け領域は、前記複合ブロックの中央に配置された2行×2列の符号化ブロックに対応する位置に配置されており、前記非重み付け領域は、前記複合ブロックの周縁に配置された符号化ブロックに対応する位置に配置されていることが好ましい。
【0039】
前記複合ブロックは、マトリックス状に配置された複数の符号化ブロックによって構成されていることが好ましい。
【0040】
前記動きベクトル検出手段は、前記縮小動きベクトル検出手段によって検出された前記縮小動きベクトルに応じて各符号化ブロックごとに前記参照領域にそれぞれ設けられる探索領域に配置された画素データに基づいて各符号化ブロックの動きベクトルをそれぞれ検出し、前記非重み付け領域に対応する符号化ブロックの動きベクトルを検出するための探索領域は、前記重み付け領域に対応する符号化ブロックの動きベクトルを検出するための探索領域よりも広くなっていることが好ましい。
【0041】
前記縮小動きベクトル検出手段は、前記評価値が最小となる前記縮小複合参照ブロックに基づいて前記縮小動きベクトルを検出することが好ましい。
【0042】
本実施の形態に係る他の動きベクトル検出装置においては、参照フレームに設けられた参照領域を縮小した縮小参照領域に配置された画素データに基づいて、符号化フレームに設けられた複数の符号化ブロックを含む複合ブロックを縮小した縮小複合ブロックの動きベクトルを表す縮小メイン動きベクトルと、符号化フレームにそれぞれ設けられた各符号化ブロックと対応するように縮小複合ブロックにそれぞれ配置された縮小サブブロックの動きベクトルを表す縮小サブ動きベクトルとがそれぞれ検出され、それぞれ検出された縮小メイン動きベクトルと縮小サブ動きベクトルとに基づいて、複合ブロックに含まれる各符号化ブロックの動きベクトルがそれぞれ検出される。
【0043】
このため、縮小複合ブロックに配置された縮小サブブロックの動きベクトルの一部が縮小メイン動きベクトルと比べ特異な動きベクトルであっても、特異な動きベクトルとして個別にその縮小サブブロックの動きベクトルを設定することができる。その結果、動きベクトルの検出精度を向上させることができる。
【0044】
前記動きベクトル検出手段は、各縮小サブ動きベクトルと前記縮小メイン動きベクトルとの間の差に応じて、各縮小サブ動きベクトルに対応する符号化ブロックの動きベクトルを検出することが好ましい。
【0045】
前記動きベクトル検出手段は、前記縮小サブ動きベクトルと前記縮小メイン動きベクトルとの間の前記差が所定の値よりも大きいときは、前記縮小サブ動きベクトルに基づいて、前記縮小サブ動きベクトルに対応する符号化ブロックの動きベクトルを検出し、前記縮小サブ動きベクトルと前記縮小メイン動きベクトルとの間の前記差が所定の値以下であるときは、前記縮小メイン動きベクトルに基づいて、前記縮小サブ動きベクトルに対応する符号化ブロックの動きベクトルを検出することが好ましい。
【0046】
以下、図面を参照して本発明の実施の形態を説明する。
【0047】
図1は実施の形態に係る動きベクトル検出装置100の構成を示すブロック図であり、図2は動きベクトル検出装置100に設けられた縮小動きベクトル検出器1の構成を説明するためのブロック図であり、図3は動きベクトル検出装置100が動きベクトルを検出するための符号化フレーム3および参照フレーム7を説明するための模式図である。
【0048】
動きベクトル検出装置100は、メモリユニット40を備えている。メモリユニット40には、動きベクトル検出装置100が動きベクトルを検出するための符号化フレーム3および参照フレーム7が格納されている。メモリユニット40は、大容量であって高速アクセスが可能なメモリによって構成されている。
【0049】
符号化フレーム3は、例えば720画素×480ラインによって構成されており、複合ブロック5を有している。複合ブロック5は、動きベクトルを求める対象となる複数の符号化ブロック4を有している。符号化ブロック4は、例えば4行×4列のマトリックス状に配置されている。各符号化ブロック4は、例えば16行×16列の画素によって構成されている。参照フレーム7は、例えば720画素×480ラインによって構成されており、動きベクトルを検出するための参照領域8を有している。
【0050】
動きベクトル検出装置100には、縮小器41が設けられている。縮小器41は、メモリユニット40に格納された符号化フレーム3を縮小した縮小符号化フレーム17を生成して、生成した縮小符号化フレーム17をメモリユニット40に格納する。
【0051】
縮小符号化フレーム17は、符号化フレーム3を水平方向および垂直方向に沿って4分の1に縮小したものであり、例えば180画素×120ラインによって構成されている。縮小符号化フレーム17は、複合ブロック5を水平方向および垂直方向に沿って4分の1に縮小した縮小複合ブロック6を有している。縮小複合ブロック6は、例えば4行×4列のマトリックス状に配置された縮小符号化ブロックによって構成されている。各縮小符号化ブロックは、例えば4行×4列のマトリックス状に配置された画素によって構成されている。
【0052】
縮小複合ブロック6には、縮小複合ブロック6に配置された画素データと縮小参照領域9に設けられた縮小複合参照ブロックに配置された画素データとの間の差分値を加算した評価値を算出するための画素データに重み付けをする重み付け領域と、評価値を算出するための画素データに重み付けをしない非重み付け領域とが設けられている。重み付け領域は、縮小複合ブロック6の中央に配置された2行×2列の縮小符号化ブロックに設定されている。非重み付け領域は、縮小複合ブロック6の周縁に配置された12個の縮小符号化ブロックに設定されている。
【0053】
縮小器41はまた、メモリユニット40に格納された参照フレーム7を縮小した縮小参照フレーム16を生成して、生成した縮小参照フレーム16をメモリユニット40に格納する。
【0054】
縮小参照フレーム16は、参照フレーム7を水平方向および垂直方向に沿って4分の1に縮小したものであり、例えば180画素×120ラインによって構成されている。縮小参照フレーム16は、参照領域8を水平方向および垂直方向に沿って4分の1に縮小した縮小参照領域9を有している。
【0055】
動きベクトル検出装置100は、現フレームバッファ42を備えている。現フレームバッファ42は、メモリユニット40に格納された符号化フレーム3と縮小符号化フレーム17とを読み出して一時的に保持する。
【0056】
動きベクトル検出装置100には、参照フレームバッファ43が設けられている。参照フレームバッファ43は、メモリユニット40に格納された参照フレーム7と縮小参照フレーム16とを読み出して一時的に保持する。
【0057】
動きベクトル検出装置100は、縮小動きベクトル検出器1を備えている。縮小動きベクトル検出器1は、参照フレームバッファ43に保持された縮小参照フレーム16における縮小参照領域9に配置された画素データに基づいて、現フレームバッファ42に保持された縮小符号化フレーム17に設けられた縮小複合ブロック6の縮小動きベクトルを検出する。
【0058】
動きベクトル検出装置100は、動きベクトル検出器2を備えている。動きベクトル検出器2は、縮小動きベクトル検出器1によって検出された縮小動きベクトルに基づいて、複合ブロック5に含まれる各符号化ブロック4の動きベクトルをそれぞれ求めて符号化器45へ供給する。
【0059】
符号化器45は、動きベクトル検出器2から供給された各符号化ブロック4の動きベクトルに基づいて、メモリユニット40に格納された符号化フレーム3に設けられた複合ブロック5を構成する各符号化ブロック4を符号化して符号化ビットストリームとして出力する。
【0060】
図2を参照すると、縮小動きベクトル検出器1は、コントローラ55を有している。コントローラ55は、縮小参照フレーム16における縮小参照領域9に配置された画素データをメモリユニット40から参照フレームバッファ43へ読み出すためのアドレスと縮小符号化フレーム17における縮小複合ブロック6に配置された画素データをメモリユニット40から現フレームバッファ42へ読み出すためのアドレスとをアドレス移動器50へ供給する。
【0061】
アドレス移動器50は、コントローラ55から供給された各アドレスに基づいて、縮小参照領域9に配置された画素データをメモリユニット40から読み出して参照フレームバッファ43へ格納し、縮小複合ブロック6に配置された画素データをメモリユニット40から読み出して現フレームバッファ42へ格納する。
【0062】
縮小動きベクトル検出器1は、差分演算器51を有している。差分演算器51は、縮小参照領域9に配置された画素データと縮小複合ブロック6に配置された画素データとの間の差分値を算出して絶対値算出器52へ供給する。
【0063】
絶対値算出器52は、差分演算器51によって算出された差分値を絶対値に変換した差分絶対値を生成して加算器53へ供給する。加算器53は、コントローラ55からの指示に応じて、縮小参照領域9に配置されたすべての画素データについての差分絶対値を合計した差分絶対値和SADを算出して判定器54へ供給する。
【0064】
判定器54は、探索範囲内において最小になる差分絶対値和SADおよび差分絶対値和SADが最小になる縮小参照領域のアドレスをコントローラ55へ供給する。
【0065】
コントローラ55は、判定器54から供給された差分絶対値和SADおよび縮小参照領域のアドレスに基づいて縮小動きベクトルを検出して動きベクトル検出器2へ供給する。メモリ56は、判定器54から供給された差分絶対値和SADおよびコントローラ55によって検出された縮小動きベクトルを一時的に保持する。
【0066】
このように構成された動きベクトル検出装置の動作を説明する。図4および図5は、実施の形態に係る動きベクトル検出装置100の動作を示すフローチャートである。図4に示すステップS1〜ステップS201は、符号化フレーム3に設けられた複合ブロック5を縮小した縮小複合ブロック6の縮小動きベクトルを検出する手順を示している。図5に示すステップS8〜ステップS20は、符号化フレーム3に設けられた複合ブロック5に含まれる各符号化ブロック4の動きベクトルを縮小動きベクトルに基づいて検出する手順を示している。
【0067】
まず、階層L0の符号化フレーム3に設けられた複合ブロック5について動きベクトルの検出が開始される(ステップS1)。そして、複合ブロック5を縮小した縮小複合ブロック6に配置された画素データが現フレームバッファ42から縮小動きベクトル検出器1へ読み出される(ステップS2)。次に、縮小動きベクトルを探索するための縮小参照領域9における探索開始位置h=−H1、v=−V1が設定される(ステップS3)。
【0068】
その後、探索開始位置のアドレスから探索終了位置のアドレスまで、縮小参照領域9に配置された画素データが参照フレームバッファ43から順次読み出される(ステップS4)。そして、ステップS2において読み出された縮小複合ブロック6に配置された画素データが重み付け領域に属するか否かが判断される(ステップS101)。
【0069】
縮小複合ブロック6に配置された画素データが重み付け領域に属すると判断されたときは(ステップS101においてYES)、縮小動きベクトル1は、縮小複合ブロック6に配置された画素データと縮小参照領域9に設けられた縮小複合参照ブロックに配置された画素データとの間の絶対差分値を算出し、算出した絶対差分値に所定の重み付け係数を乗算した差分絶対値和sadwを求める(ステップS102)。
【0070】
縮小複合ブロック6に配置された画素データが重み付け領域に属さないと判断されたときは(ステップS101においてNO)、縮小動きベクトル検出器1は、縮小複合ブロック6に配置された画素データと縮小参照領域9に設けられた縮小複合参照ブロックに配置された画素データとの間の絶対差分値を算出し、算出した絶対差分値を非重み付け領域における差分絶対値和sadwoとする(ステップS103)。
【0071】
差分絶対値和sadwが求められたとき(ステップS102)または差分絶対値和sadwoが求められたとき(ステップS103)は、縮小動きベクトル検出器1は、差分絶対値和sadwと差分絶対値和sadwoとを加算した縮小複合ブロック6の差分絶対値和sadを算出する(ステップS104)。
【0072】
そして、ステップS104において算出された縮小複合ブロック6の差分絶対値和sadが、これまでに算出された差分絶対値和sadよりも小さいか否かが判断される(ステップS105)。縮小複合ブロック6の差分絶対値和sadが、これまでに算出された差分絶対値和sadよりも小さいと判断されたときは(ステップS105においてYES)、これまでに算出された差分絶対値和sadよりも小さいと判断された縮小複合ブロック6の差分絶対値和sadを算出したときの縮小参照領域9に配置された画素データの位置と、縮小複合ブロック6の中心位置との間の変位量(dh、dv)を縮小複合ブロック6の縮小動きベクトルmvとして更新する(ステップS106)。
【0073】
縮小複合ブロック6の差分絶対値和sadが、これまでに算出された差分絶対値和sadよりも小さくないと判断されたとき(ステップS105においてNO)または縮小複合ブロック6の中心位置との間の変位量(dh、dv)を縮小複合ブロック6の縮小動きベクトルmvとして更新したとき(ステップS106)は、縮小参照領域9のアドレスをインクリメントする(ステップS6)。
【0074】
そして、インクリメントされた縮小参照領域9のアドレスが探索範囲外であり探索範囲が終了したか否かが判断される(ステップS7)。探索範囲が終了していないと判断されたときは(ステップS7においてNO)、ステップS4へ戻る。インクリメントされた縮小参照領域9のアドレスの画素データが読み込まれ、ステップS4からステップS6までの一連のプロセスが繰り返される。
【0075】
探索範囲が終了したと判断されたときは(ステップS7においてYES)、縮小複合ブロック6の縮小動きベクトルmvに縮小率4分の1の逆数を乗算して縮小動きベクトルmvを補正し、階層L0における動きベクトル検出のための初期動きベクトル(動きベクトルを探索するための中心位置)とする。
【0076】
そして、階層L0における複合ブロック5を構成する符号化ブロック4のナンバーn=0として先頭の符号化ブロック4を指定する(ステップS8)。次に、ナンバーnによって示される符号化ブロック4に配置された画素データが現フレームバッファ42から動きベクトル検出器2へ読み出される(ステップS9)。その後、ナンバーnによって示される符号化ブロック4が縮小複合ブロック6に設定された重み付け領域に対応する符号化ブロックであるか否かが判断される(ステップS301)。
【0077】
ナンバーnによって示される符号化ブロック4が縮小複合ブロック6に設定された重み付け領域に対応する符号化ブロックであると判断されたときは(ステップS301においてYES)、動きベクトルの探索を開始するための動きベクトル探索開始位置をh=−H0、v=−V0(H0およびV0はゼロ以上)に設定する(ステップS10)。ナンバーnによって示される符号化ブロック4が縮小複合ブロック6に設定された重み付け領域に対応する符号化ブロックでないと判断されたときは(ステップS301においてNO)、動きベクトルの探索を開始するための動きベクトル探索開始位置をh=−H0−p、v=−V0−q(p>0、q>0)に設定する(ステップS302)。
【0078】
次に、ナンバーnによって示される符号化ブロック4とのブロックマッチングのために、参照領域8に配置された画素データが参照フレームバッファ43から読み出される(ステップS11)。読み出される参照領域8に配置された画素データの先頭アドレス(フレーム内座標)は、ナンバーnによって示される符号化ブロック4の中心座標に前述した初期動きベクトルと探索範囲の開始位置とが加算されたものである。
【0079】
その後、動きベクトル検出器2は、ナンバーnによって示される符号化ブロック4に配置された画素データと参照領域8に配置された画素データとの差分絶対値SADを算出する(ステップS12)。そして、動きベクトル検出器2は、算出した差分絶対値SADが最小であるか否かを判断する(ステップS13)。
【0080】
算出した差分絶対値SADが最小であると判断したときは(ステップS13においてYES)、差分絶対値SADが最小であるときの動きベクトルMVn=(dh、dv)を求めるべき動きベクトルとして更新する(ステップS14)。
【0081】
算出した差分絶対値SADが最小でないと判断したとき(ステップS13においてNO)または動きベクトルMVn=(dh、dv)を求めるべき動きベクトルとして更新したとき(ステップS14)は、参照領域8における検索開始位置を水平方向および垂直方向にインクリメントする(ステップS15)。
【0082】
そして、ナンバーnによって示される符号化ブロック4が重み付け領域に対応する符号化ブロックであるか否かが判断される(ステップS401)。ナンバーnによって示される符号化ブロック4が重み付け領域に対応する符号化ブロックであると判断されたときは(ステップS401においてYES)、検索範囲(h=H0、v=V0)が終了したか否かを判断する(ステップS16)。検索範囲(h=H0、v=V0)が終了していないと判断されたときは(ステップS16においてNO)、ステップS11へ戻り、次の参照領域データを読み出す。
【0083】
ナンバーnによって示される符号化ブロック4が重み付け領域に対応する符号化ブロックでないと判断されたときは(ステップS401においてNO)、検索範囲(h=H0+p、v=V0+q)が終了したか否かを判断する(ステップS402)。検索範囲(h=H0+p、v=V0+q)が終了していないと判断されたときは(ステップS402においてNO)、ステップS11へ戻る。
【0084】
検索範囲(h=H0、v=V0)が終了したと判断されたとき(ステップS16においてYES)または検索範囲(h=H0+p、v=V0+q)が終了したと判断されたとき(ステップS402においてYES)は、ステップS14において求めた動きベクトルに検索を開始したときの初期動きベクトルを加算してナンバーnによって示される符号化ブロック4の動きベクトルを算出する(ステップS17)。
【0085】
そして、ナンバーnをインクリメントして複合ブロック5における次の符号化ブロック4を指定する(ステップS18)。次に、複合ブロック5におけるすべての符号化ブロック4の動きベクトルの検出が終了したか否かが判断される(ステップS19)。複合ブロック5におけるすべての符号化ブロック4の動きベクトルの検出が終了していないと判断されたときは(ステップS19においてNO)、ステップS9へ戻る。複合ブロック5におけるすべての符号化ブロック4の動きベクトルの検出が終了したと判断されたときは(ステップS19においてYES)、動きベクトルの検出処理を終了する(ステップS20)。
【0086】
本実施の形態に係る階層的動きベクトル検出の特徴は、1段目(階層L1)の動きベクトル検出において縮小複合ブロック6に重み付け/非重み付けの領域分けを導入したことである。また、これらの領域に対応した2段目(階層L0)の符号化ブロック4の動きベクトル検出において、これら2つの重み付け/非重み付け領域間で動きベクトル探索の範囲を変えることである。
【0087】
階層L0における複数の符号化ブロック4によって構成される複合ブロック5を階層L1において一つの縮小複合ブロック6として扱う。これにより縮小複合ブロックのサイズが拡大するため対象ブロック内データ数も増える。このため、動きベクトル検出の精度劣化を抑えることができる。
【0088】
しかし一方で、複数の符号化ブロック4を一つの縮小複合ブロック6にすることで広い画像範囲を対象とすることになり、他と異なる動きを有するブロックも含まれるおそれも増大する。このため、縮小複合ブロック6の中央と周辺とで重み付けを変え、中央領域は重み付けし、その周辺領域は重み付けをせず、中央領域の動きが優位に選択されるように設定する。なお、非重み付けの周辺領域については非優位な選択を補うため、2段目の階層L0で前記周辺領域と空間的に対応するブロックについて動きベクトルの探索範囲を広げることを特徴としている。
【0089】
具体的には、階層L0における複合ブロック5を構成する符号化ブロック4に対応するように階層L1の縮小複合ブロック6を分けた場合、複合ブロックの中央ブロックに対応する縮小複合ブロック6の中央領域(例えば、図3の縮小複合ブロック6の斜線領域)を重み付けし、残った周辺領域を重み付けしない。
【0090】
重み付け領域についてはブロックマッチングの際、差分絶対値に所定の重み付け値を乗算し非重み付け領域の差分絶対値よりも大きくする。これによって、縮小複合ブロック6の重み付けされた中央領域のSAD値に縮小複合ブロック6全体のSADが偏るため、そのときの動きベクトルが検出されやすくなる。
【0091】
また、階層L0において縮小複合ブロック6の重み付け領域に対応する符号化ブロックと非重み付け領域に対応する符号化ブロックとで動きベクトルの探索範囲を変える。すなわち、非重み付け領域に対応する符号化ブロックの動きベクトルの探索範囲を重み付け領域に対応する符号化ブロックの探索範囲よりも広げている。
【0092】
以上のように本実施の形態によれば、縮小複合ブロック6に配置された画素データと縮小参照領域9に設けられた縮小複合参照ブロックに配置された画素データとの間の差分値を加算した評価値に基づいて縮小動きベクトルが検出され、差分値は、縮小複合ブロック6における所定の領域に配置された画素データと縮小複合参照ブロックにおいて所定の領域に対応する領域に配置された画素データとにそれぞれ重み付けをして算出される。
【0093】
このため、縮小複合ブロック6に配置された画素データの一部が特異な画素データであっても、特異な画素データの影響を排除するように重み付けをする所定の領域を設定することができる。その結果、動きベクトルの検出精度を向上させることができる。
【0094】
本実施の形態においては、縮小画像による1段目の動きベクトル検出において、縮小複合ブロック6の中央と周辺とで重み付けを変えて縮小動きベクトルを検出し、その縮小動きベクトルに基づいて、縮小前の原画像による2段目の動きベクトル検出において、縮小複合ブロック6における中央と周辺とに対応する符号化ブロックについて動きベクトルの探索範囲を変えることで、階層的動きベクトルの検出精度の劣化を抑えることできる。
【0095】
なお、本実施の形態では複合ブロック5が16個の符号化ブロック4によって構成される例を説明したが、本発明はこれに限定されない。複数の符号化ブロックであれば複合ブロック5を任意に構成してもよい。
【0096】
また、本実施の形態においては、中央と周辺と2段に分けて重み付け/非重み付け領域を分けたが、さらに細かく複数に分けて重み付けを変えてもよい。
【0097】
図6および図7は、実施の形態に係る動きベクトル検出装置の他の動作を示すフローチャートである。図4および図5を参照して前述した動きベクトル検出装置の動作を示すフローチャートの構成要素と同一の構成要素には同一の参照符号を付している。従って、これらの構成要素の詳細な説明は省略する。
【0098】
図6および図7に示すフローチャートにおいては、図4および図5を参照して前述した手順と異なり、1段目(階層L1)の動きベクトル検出において縮小複合ブロック6における重み付け領域の差分絶対値和の最小値sadw_minを算出する。そして、この最小値sadw_minと縮小複合ブロック6全体の最小値(min(sad))とを比較する。そこでこれら2つの最小値間の差が小さい場合は、縮小ブロックは全体として一様な動きのブロックであると判定する。従って、一様な動きのブロックと判定された場合、階層L0での重み付け領域/非重み付け領域間での動きベクトル探索範囲の変更を実施しなくてもよい。このため、2段目の動きベクトル探索の演算が軽減される。
【0099】
図6および図7を参照すると、ステップS1〜ステップS4は、図4を参照して前述したステップS1〜ステップS4と同一である。
【0100】
そして、ステップS2において読み出された縮小複合ブロック6に配置された画素データが重み付け領域に属するか否かが判断される(ステップS101)。
【0101】
縮小複合ブロック6に配置された画素データが重み付け領域に属すると判断されたときは(ステップS101においてYES)、縮小動きベクトル検出器1は、縮小複合ブロック6に配置された画素データと縮小参照領域9に設けられた縮小複合参照ブロックに配置された画素データとの間の絶対差分値を算出し、算出した絶対差分値に所定の重み付け係数を乗算した差分絶対値和sadwを求める(ステップS102)。
【0102】
そして、ステップS102において求められた差分絶対値和sadwが、これまでに求められた差分絶対値和sadwよりも小さいか否かが判断される(ステップS107)。差分絶対値和sadwが、これまでに求められた差分絶対値和sadwよりも小さいと判断されたときは(ステップS107においてYES)、ステップS102において求められた差分絶対値和sadwを最小差分絶対値和sadw_minとして更新する(ステップS108)。
【0103】
縮小複合ブロック6に配置された画素データが重み付け領域に属さないと判断されたときは(ステップS101においてNO)、縮小動きベクトル検出器1は、縮小複合ブロック6に配置された画素データと縮小参照領域9に設けられた縮小複合参照ブロックに配置された画素データとの間の絶対差分値を算出し、算出した絶対差分値を非重み付け領域における差分絶対値和sadwoとする(ステップS103)。
【0104】
差分絶対値和sadwが、これまでに求められた差分絶対値和sadwよりも小さくないと判断されたとき(ステップS107においてNO)、または差分絶対値和sadwを最小差分絶対値和sadw_minとして更新したとき(ステップS108)、または差分絶対値和sadwoが求められたとき(ステップS103)は、縮小動きベクトル検出器1は、差分絶対値和sadwと差分絶対値和sadwoとを加算した縮小複合ブロック6の差分絶対値和sadを算出する(ステップS104)。
【0105】
そして、ステップS104において算出された縮小複合ブロック6の差分絶対値和sadが、これまでに算出された差分絶対値和sadよりも小さいか否かが判断される(ステップS105)。縮小複合ブロック6の差分絶対値和sadが、これまでに算出された差分絶対値和sadよりも小さいと判断されたときは(ステップS105においてYES)、これまでに算出された差分絶対値和sadよりも小さいと判断された縮小複合ブロック6の差分絶対値和sadを算出したときの縮小参照領域9に配置された画素データの位置と、縮小複合ブロック6の中心位置との間の変位量(dh、dv)を縮小複合ブロック6の縮小動きベクトルmvとして更新する(ステップS106)。
【0106】
縮小複合ブロック6の差分絶対値和sadが、これまでに算出された差分絶対値和sadよりも小さくないと判断されたとき(ステップS105においてNO)または縮小複合ブロック6の中心位置との間の変位量(dh、dv)を縮小複合ブロック6の縮小動きベクトルmvとして更新したとき(ステップS106)は、縮小参照領域9のアドレスをインクリメントする(ステップS6)。
【0107】
そして、インクリメントされた縮小参照領域9のアドレスが探索範囲外であり探索範囲が終了したか否かが判断される(ステップS7)。探索範囲が終了していないと判断されたときは(ステップS7においてNO)、ステップS4へ戻る。インクリメントされた縮小参照領域9のアドレスの画素データが読み込まれ、ステップS4からステップS6までの一連のプロセスが繰り返される。
【0108】
探索範囲が終了したと判断されたときは(ステップS7においてYES)、縮小複合ブロック6の縮小動きベクトルmvに縮小率4分の1の逆数を乗算して縮小動きベクトルmvを補正し、階層L0における動きベクトル検出のための初期動きベクトル(動きベクトルを探索するための中心位置)とする。
【0109】
そして、階層L0における複合ブロック5を構成する符号化ブロック4のナンバーn=0として先頭の符号化ブロック4を指定する(ステップS8)。次に、ナンバーnによって示される符号化ブロック4に配置された画素データが現フレームバッファ42から動きベクトル検出器2へ読み出される(ステップS9)。
【0110】
その後、ナンバーnによって示される符号化ブロック4が縮小複合ブロック6に設定された重み付け領域に対応する符号化ブロックであるか、または、ステップS108において更新された縮小複合ブロック6の重み付け領域における最小差分絶対値和sadw_minとステップS105における縮小複合ブロック6の差分絶対値和min(sad)との間の差分絶対値が所定の値th1よりも小さいかが判断される(ステップS301A)。
【0111】
ナンバーnによって示される符号化ブロック4が縮小複合ブロック6に設定された重み付け領域に対応する符号化ブロックであるか、または、ステップS108において更新された縮小複合ブロック6の重み付け領域における最小差分絶対値和sadw_minとステップS105における縮小複合ブロック6の差分絶対値和min(sad)との間の差分絶対値が所定の値th1よりも小さいと判断されたときは(ステップS301AにおいてYES)、動きベクトルの探索を開始するための動きベクトル探索開始位置をh=−H0、v=−V0(H0およびV0はゼロ以上)に設定する(ステップS10)。
【0112】
ナンバーnによって示される符号化ブロック4が縮小複合ブロック6に設定された重み付け領域に対応する符号化ブロックでなく、且つ、ステップS108において更新された縮小複合ブロック6の重み付け領域における最小差分絶対値和sadw_minとステップS105における縮小複合ブロック6の差分絶対値和min(sad)との間の差分絶対値が所定の値th1よりも小さくないと判断されたときは(ステップS301AにおいてNO)、動きベクトルの探索を開始するための動きベクトル探索開始位置をh=−H0−p、v=−V0−q(p>0、q>0)に設定する(ステップS302)。
【0113】
ステップS11からステップS15までは、図5を参照して前述したステップS11〜ステップS15と同一である。
【0114】
そして、ナンバーnによって示される符号化ブロック4が重み付け領域に対応する符号化ブロックであるか、または、ステップS108において更新された縮小複合ブロック6の重み付け領域における最小差分絶対値和sadw_minとステップS105における縮小複合ブロック6の差分絶対値和min(sad)との間の差分絶対値が所定の値th1よりも小さいかが判断される(ステップS411)。
【0115】
ナンバーnによって示される符号化ブロック4が縮小複合ブロック6に設定された重み付け領域に対応する符号化ブロックであるか、または、ステップS108において更新された縮小複合ブロック6の重み付け領域における最小差分絶対値和sadw_minとステップS105における縮小複合ブロック6の差分絶対値和min(sad)との間の差分絶対値が所定の値th1よりも小さいと判断されたときは(ステップS411においてYES)、検索範囲(h=H0、v=V0)が終了したか否かを判断する(ステップS16)。検索範囲(h=H0、v=V0)が終了していないと判断されたときは(ステップS16においてNO)、ステップS11へ戻り、次の参照領域データを読み出す。
【0116】
ナンバーnによって示される符号化ブロック4が縮小複合ブロック6に設定された重み付け領域に対応する符号化ブロックでなく、且つ、ステップS108において更新された縮小複合ブロック6の重み付け領域における最小差分絶対値和sadw_minとステップS105における縮小複合ブロック6の差分絶対値和min(sad)との間の差分絶対値が所定の値th1よりも小さくないと判断されたときは(ステップS411においてNO)、検索範囲(h=H0+p、v=V0+q)が終了したか否かを判断する(ステップS402)。検索範囲(h=H0+p、v=V0+q)が終了していないと判断されたときは(ステップS402においてNO)、ステップS11へ戻る。
【0117】
ステップS17からステップS20までは、図5を参照して前述したステップS17〜ステップS20と同一である。
【0118】
このように、1段目の縮小複合ブロック6に設けられた重み付け領域における最小SADを算出し、それを縮小複合ブロック6全体の最小SADと比較することで、その差が所定の値以下で小さければ縮小複合ブロック6は全体として一様な動きのブロックとみなし、階層L0において重み付け領域/非重み付け領域間での動きベクトル探索範囲を変更しなくてもよい。このため、動きベクトル探索範囲を削減することができる。
【0119】
なお、本実施の形態では縮小複合ブロック6に設けられた重み付け領域の最小値SADを算出し、それを階層L0において条件判断で用いたが、重み付け領域の最小値SADの動きベクトルを算出し、縮小複合ブロック6全体の動きベクトルと比較する条件を用いてもよい。その場合、動きベクトルの値が所定の範囲内であれば、全体として一様な動きのブロックとみなせばよい。
【0120】
図8は、実施の形態に係る動きベクトル検出装置のさらに他の動作を説明するための模式図である。図3を参照して前述した構成要素と同一の構成要素には同一の参照符号を付している。従って、これらの構成要素の詳細な説明は省略する。
【0121】
符号化フレーム3Aは、720画素×480ラインによって構成されており、複合ブロック5Aを有している。複合ブロック5Aは、動きベクトルを求める対象となる複数の符号化ブロック4Aを有している。符号化ブロック4Aは、2行×2列のマトリックス状に配置されている。各符号化ブロック4Aは、16行×16列の画素によって構成されている。参照フレーム7Aは、720画素×480ラインによって構成されており、動きベクトルを検出するための参照領域8Aを有している。
【0122】
縮小符号化フレーム17Aは、符号化フレーム3Aを水平方向および垂直方向に沿って4分の1に縮小したものであり、180画素×120ラインによって構成されている。縮小符号化フレーム17Aは、複合ブロック5Aを水平方向および垂直方向に沿って4分の1に縮小した縮小複合ブロック6Aを有している。縮小複合ブロック6Aは、2行×2列のマトリックス状に配置された縮小符号化ブロックによって構成されている。各縮小符号化ブロックは、4行×4列のマトリックス状に配置された画素によって構成されている。
【0123】
縮小参照フレーム16Aは、参照フレーム7Aを水平方向および垂直方向に沿って4分の1に縮小したものであり、180画素×120ラインによって構成されている。縮小参照フレーム16Aは、参照領域8Aを水平方向および垂直方向に沿って4分の1に縮小した縮小参照領域9Aを有している。
【0124】
本実施の形態においては、1段目(階層L1)の動きベクトル検出において、縮小複合ブロック6A全体の縮小メイン動きベクトルを検出すると同時に、縮小複合ブロック6A(mb)のサブブロック(mbn)の縮小サブ動きベクトルを求める。このとき、サブブロックの縮小サブ動きベクトル(mvn)は縮小複合ブロック6Aの縮小メイン動きベクトル(mv)の探索範囲内において同時に探索される。また、サブブロックは2段目(階層L0)の複合ブロック5Aを構成する符号化ブロック4Aにそれぞれ空間的に対応する。
【0125】
このことによって、縮小複合ブロック6Aの動きと大きく異なる動きがサブブロックに存在した場合、サブブロックの縮小サブ動きベクトルを階層L0における2段目の動きベクトルとして用いることで、動きベクトル検出精度の劣化を抑えることができる。
【0126】
サブブロックの縮小サブ動きベクトル検出については、サブブロックそれぞれのSAD(sadn)を算出し、それらsadnの最小時の動きベクトルを検出する。縮小複合ブロック6A全体の縮小メイン動きベクトルは、サブブロックのsadnを総和したsadが最小となるときの動きベクトルを検出する。
【0127】
なお、2段目(階層L0)における動きベクトル検出では、サブブロックの縮小サブ動きベクトルと縮小複合ブロック6A全体の縮小メイン動きベクトルとの間の差が所定の値以内であれば、縮小複合ブロック6A全体の縮小メイン動きベクトルを2段目(階層L0)における動きベクトルとする。もしサブブロックの縮小サブ動きベクトルと縮小複合ブロック6A全体の縮小メイン動きベクトルとが、所定の値を超えて異なれば、サブブロックの縮小サブ動きベクトルに基づいて、符号化ブロックの動きベクトルを検出する。
【0128】
図9および図10は、実施の形態に係る動きベクトル検出装置のさらに他の動作を示すフローチャートである。図4および図5を参照して前述したフローチャートの構成要素と同一の構成要素には同一の参照符号を付している。従って、これらの構成要素の詳細な説明は省略する。
【0129】
ステップS1〜ステップS4は、図4を参照して前述したステップS1〜ステップS4と同一である。
【0130】
そして、縮小サブブロックmbn のデータと縮小参照領域9Aの対応データとの差分絶対値和であるsadnを算出する(ステップS111)。この場合nは0、1、2、3である。
【0131】
次に、算出されたsad0、sad1、sad2、sad3が、動きベクトル検索範囲内でこれまでのそれらよりも小さな値か否かが判定される(ステップS112)。もし小さな値であれば(ステップS112においてYES)、そのときの動きベクトル値(縮小サブブロックmbnの中心からそれに対応する縮小参照領域(サブ縮小参照領域)の中心までの空間的変位量mvn=(dh、dv))が更新される(ステップS113)。
【0132】
算出されたsad0、sad1、sad2、sad3が、動きベクトル検索範囲内でこれまでのそれらよりも小さな値でないとき(ステップS112においてNO)、またはmvn=(dh、dv))が更新されたとき(ステップS113)は、縮小サブブロックmbnのsad0、sad1、sad2、sad3を互いに加算して縮小複合ブロック6A全体の差分絶対値和sadを算出する(ステップS114)。
【0133】
そして、縮小複合ブロック6A全体の差分絶対値和sadがこれまでのsad値よりも小さいか否かが判定される(ステップS115)。もし、小さければ(ステップS115においてYES)、そのときの動きベクトル(縮小複合ブロックmbの中心から探索縮小参照領域の中心までの空間的変位量mv=(dh、dv))が算出される(ステップS116)。
【0134】
縮小複合ブロック6A全体の差分絶対値和sadがこれまでのsad値よりも小さくないと判定されたとき(ステップS115においてNO)、または、空間的変位量mv=(dh、dv))が算出されたとき(ステップS116)は、次の探索範囲の縮小参照領域に配置された画素データを読み出すために、水平hあるいは垂直vのカウントがインクリメントされる(ステップS6)。
【0135】
そして、検索範囲が終了したか否かが判断される(ステップS7)。検索範囲が終了していないと判断されたときは(ステップS7においてNO)、ステップS4へ戻る。検索範囲が終了したと判断されたときは(ステップS7においてYES)、階層L0における複合ブロック5Aを構成する符号化ブロック4Aのナンバーn=0として先頭の符号化ブロック4Aを指定する(ステップS8)。
【0136】
次に、現フレームバッファ42から符号化ブロックMBn(開始時n=0)に配置された画素データが読み出される(ステップS9)。その後、符号化ブロックMBnに空間的に対応する縮小サブブロックmbnの縮小サブ動きベクトル(mvn)と縮小複合ブロックmbの縮小メイン動きベクトル(mvn)とが比較され、その差分が所定の値th2未満であるか否かが判断される(ステップS321)。
【0137】
符号化ブロックMBnに空間的に対応する縮小サブブロックmbnの縮小サブ動きベクトル(mvn)と縮小複合ブロックmbの縮小メイン動きベクトル(mvn)との間の差分が所定の値th2未満であると判断されたときは(ステップS321においてYES)、対象符号化ブロックMBnの初期の動きベクトルは縮小複合ブロック6A全体の縮小メイン動きベクトルを補正(縮小の逆比を乗算)した値が設定される(ステップS322)。
【0138】
符号化ブロックMBnに空間的に対応する縮小サブブロックmbnの縮小サブ動きベクトル(mvn)と縮小複合ブロックmbの縮小メイン動きベクトル(mvn)との間の差分が所定の値th2未満でないと判断されたときは(ステップS321においてNO)、符号化ブロックMBnの初期動きベクトルは縮小サブブロックの縮小サブ動きベクトルを補正した値(縮小の逆比を乗算)に設定される(ステップS323)。
【0139】
縮小サブブロックの縮小サブ動きベクトルと縮小複合ブロックmbの縮小メイン動きベクトルとの比較は、例えば、両動きベクトル間における水平方向に沿った動きベクトル成分dhの差分絶対値と垂直方向に沿った動きベクトル成分dvの差分絶対値とを加えたものが用いられる。
【0140】
この後のプロセスは、上記どちらかの初期動きベクトル値を探索の中心にして、符号化ブロックMBnとそれに対応する参照領域データとの間でブロックマッチングされる。その結果、最小のSADが算出された参照領域の中心と符号化ブロックのMBnの中心との空間的変位が動きベクトル値として算出される。
【0141】
以上のように本実施の形態によれば、参照フレーム7Aに設けられた参照領域8Aを縮小した縮小参照領域9Aに配置された画素データに基づいて、符号化フレーム3Aに設けられた複数の符号化ブロック4Aを含む複合ブロック5Aを縮小した縮小複合ブロック6Aの動きベクトルを表す縮小メイン動きベクトルと、符号化フレーム3Aにそれぞれ設けられた各符号化ブロック4Aと対応するように縮小複合ブロック6Aにそれぞれ配置された縮小サブブロックの動きベクトルを表す縮小サブ動きベクトルとがそれぞれ検出され、それぞれ検出された縮小メイン動きベクトルと縮小サブ動きベクトルとに基づいて、複合ブロック5Aに含まれる各符号化ブロック4Aの動きベクトルがそれぞれ検出される。
【0142】
このため、縮小複合ブロック6Aに配置された画素データの一部が特異な画素データであっても、動きベクトルの検出精度を向上させることができる。
【0143】
このように、1段目の動きベクトル検出において縮小ブロック全体の動きベクトル検出と同時に縮小ブロックのサブブロック(2段目の複合ブロックを構成する個々のブロックに空間的に対応)の動きベクトルを求めることで、縮小ブロック全体と大きく異なる動きがサブブロックに存在する場合、1段目のサブブロックの動きベクトルを2段目に用いることで動きベクトルの検出精度の劣化を抑えることができる。
【0144】
図11は、実施の形態に係る動きベクトル検出装置のさらに他の動作を示すフローチャートである。動きベクトル検出装置のさらに他の動作について、前述した図9および図10に示すフローチャートに追加変更を加えた図11に示すフローチャートを用いて説明する。なお、本実施例の説明図としては図8の説明図を用いる。前述した図9および図10に示すフローチャートの構成要素と同一の構成要素には、同一の参照符号を付している。従って、これらの構成要素の詳細な説明は省略する。
【0145】
本実施例では、階層L0における複数の符号化ブロック4A(16画素×16ラインからなる4個のブロック)によって構成された複合ブロック5Aが、階層L1において一つの縮小化された縮小複合ブロック6Aとして縮小動きベクトルが検出される。階層L1は、水平1/4、垂直1/4に縮小化された場合とする。
【0146】
本実施例と前述した図9および図10に示すフローチャートの実施例との違いは、2段目(階層L0)の動きベクトル検出における初期動きベクトルの設定に関して、1段目(階層L1)で検出された縮小複合ブロック6Aの縮小メイン動きベクトルと縮小サブブロックの縮小サブ動きベクトルとを比較判定する方法に関する部分である。
【0147】
前述した図9および図10に示すフローチャートの実施例においては、縮小複合ブロック6A全体の縮小メイン動きベクトルに対して縮小サブブロックの縮小サブ動きベクトルが大きく異なる場合は、すべて縮小サブブロックの縮小サブ動きベクトルを2段目の初期動きベクトルとして設定した。これに対して本実施例においては、上記縮小複合ブロック6A全体の縮小メイン動きベクトルに対して縮小サブブロックの縮小サブ動きベクトルが大きく異なる場合についても、縮小サブブロックの最小sadnが小さく、且つその最小sadnの4倍と縮小複合ブロック6A全体の最小sadとの差分が小さい場合には、その縮小サブブロックの縮小サブ動きベクトルは縮小複合ブロック6A全体の縮小メイン動きベクトルと同じにするという条件が加わる。
【0148】
このことは、一部の縮小サブブロックの縮小サブ動きベクトル検出において、できるだけ小さなsadの縮小参照領域とのマッチングが優先され、その結果本来の動きベクトルと大きくかけ離れたベクトルが選択されてしまう場合を抑制させるためである。このようなケースとして、最小sadnが小さく他のサブブロックのsadnも差が小さく、動きベクトルだけが大きい場合がある。
【0149】
本実施例では、階層L0の複合ブロック5Aを縮小化した1段目(階層L1)のある縮小ブロックについて動きベクトルを検出し、それを初期動きベクトル値(前記動きベクトルは縮小比率の逆比で補正された値)として2段目(階層L0)の符号化ブロック4Aの動きベクトルを検出するそのプロセスの一部を示したものである。
【0150】
階層L1において縮小複合ブロック6Aの縮小メイン動きベクトルおよびそのサブブロックの縮小サブ動きベクトルを検出するステップは、前述した図9および図10に示すフローチャートの実施例と同一である。
【0151】
初期動きベクトルを検出した後、階層L0において符号化ブロックMBnの動きベクトルを検出する。この場合、n=0、1、2、3である。
【0152】
そして、現フレームバッファ42から符号化ブロックMBn(開始時n=0)に配置された画素データが読み出される(ステップS9)。次に、符号化ブロックMBnに対応する縮小サブブロックmbnの縮小サブ動きベクトル(mvn)と縮小複合ブロックmbの縮小メイン動きベクトル(mvn)とが比較され、その差分が所定の値(th2)未満であるか否かが判断される(ステップS321)。
【0153】
符号化ブロックMBnに対応する縮小サブブロックmbnの縮小サブ動きベクトル(mvn)と縮小複合ブロックmbの縮小メイン動きベクトル(mvn)との間の差分が所定の値(th2)未満でないと判断されたときは(ステップS321においてNO)、符号化ブロックMBnに対応する縮小サブブロックの最小sadnが所定の値(th3)未満であって、且つその最小値を4倍した値と縮小複合ブロックの最小sadと間の差分絶対値が所定の値(th4)未満であるか否かが判断される(ステップS331)。
【0154】
符号化ブロックMBnに対応する縮小サブブロックmbnの縮小サブ動きベクトル(mvn)と縮小複合ブロックmbの縮小メイン動きベクトル(mvn)との間の差分が所定の値(th2)未満であると判断されたときは(ステップS321においてYES)、または、符号化ブロックMBnに対応する縮小サブブロックの最小sadnが所定の値(th3)未満であって、且つその最小値を4倍した値と縮小複合ブロックの最小sadと間の差分絶対値が所定の値(th4)未満であると判断されたとき(ステップS331においてYES)は、符号化ブロックMBnの初期の動きベクトルを、縮小複合ブロック6A全体の縮小メイン動きベクトルを補正した値に設定する(ステップS322)。
【0155】
符号化ブロックMBnに対応する縮小サブブロックの最小sadnが所定の値(th3)未満でないか、または、その最小値を4倍した値と縮小複合ブロックの最小sadと間の差分絶対値が所定の値(th4)未満でないと判断されたとき(ステップS331においてNO)は、符号化ブロックMBnの初期の動きベクトルを、縮小サブブロックの縮小サブ動きベクトルに設定する(ステップS323)。
【0156】
この後のプロセスは、前述した図9および図10に示すフローチャートの実施例と同一であり、上記どちらかの初期動きベクトル値を探索の中心にして、符号化ブロックMBnとそれに対応する参照領域データとでブロックマッチングし、最小のSADの参照領域の中心と符号化ブロックMBnの中心との間の空間的変位量を動きベクトルとする。
【0157】
以上のように本実施の形態によれば、1段目の動きベクトル検出において、一部の縮小サブブロックが誤ってより小さなsadの縮小参照領域のデータとマッチングされてしまい、その結果2段目の動きベクトル探索において大きく異なる初期動きベクトルが設定されてしまうという問題を避けることができる。
【0158】
【発明の効果】
以上のように本発明によれば、動きベクトルの検出精度が高い動きベクトル検出装置および動きベクトル検出方法を提供することができる。
【図面の簡単な説明】
【図1】実施の形態に係る動きベクトル検出装置の構成を示すブロック図
【図2】実施の形態に係る動きベクトル検出装置に設けられた縮小動きベクトル検出器の構成を説明するためのブロック図
【図3】実施の形態に係る動きベクトル検出装置の動作を説明するための模式図
【図4】実施の形態に係る動きベクトル検出装置の動作を示すフローチャート
【図5】実施の形態に係る動きベクトル検出装置の動作を示すフローチャート
【図6】実施の形態に係る動きベクトル検出装置の他の動作を示すフローチャート
【図7】実施の形態に係る動きベクトル検出装置の他の動作を示すフローチャート
【図8】実施の形態に係る動きベクトル検出装置のさらに他の動作を説明するための模式図
【図9】実施の形態に係る動きベクトル検出装置のさらに他の動作を示すフローチャート
【図10】実施の形態に係る動きベクトル検出装置のさらに他の動作を示すフローチャート
【図11】実施の形態に係る動きベクトル検出装置のさらに他の動作を示すフローチャート
【図12】従来の動きベクトル検出装置の動作を説明するための模式図
【図13】従来の動きベクトル検出装置における縮小画像を生成する方法を説明するための模式図
【図14】従来の動きベクトル検出装置の他の動作を説明するための模式図
【符号の説明】
1 縮小動きベクトル検出器
2 動きベクトル検出器
3、3A、3B、3C 符号化フレーム
4、4A、4B、4C 符号化ブロック
5、5A、5C 複合ブロック
6 6A、6C 縮小複合ブロック
6B 縮小ブロック
7、7A、7B、7C 参照フレーム
8、8A、8B、8C 参照領域
9、9A、9B、9C 縮小参照領域
16、16A、16B、16C 縮小参照フレーム
17、17A、17B、17C 縮小符号化フレーム
40 メモリユニット
41 縮小器
42 現フレームバッファ
43 参照フレームバッファ
45 符号化器
50 アドレス移動器
51 差分演算器
52 絶対値算出器
53 加算器
54 判定器
55 コントローラ
56 メモリ
100 動きベクトル検出装置[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a motion vector detecting device and a motion vector detecting method for hierarchically detecting a motion vector.
[0002]
[Prior art]
Heretofore, when detecting a motion vector of a moving image, various motion vector detection methods have been proposed for the purpose of achieving both expansion of the motion vector detection (search) range and reduction in the amount of calculation for detecting the motion vector. Has been proposed.
[0003]
One of such motion vector detection methods is a hierarchical motion vector detection method. In this hierarchical motion vector detection method, first, a reduced image is generated in each of a current frame and a reference frame as first-stage motion vector detection, and a reduced motion vector is detected based on both reduced images. Then, as a second-stage motion vector detection based on the original image (normal screens before reduction), a method of searching for a motion vector centering on an end point of a vector obtained by enlarging the first-stage reduced motion vector is used.
[0004]
FIG. 12 is a schematic diagram for explaining the operation of the conventional motion vector detection device. The reduced frame 17B is obtained by reducing the encoded frame 3B (macroblock MB) of 720 pixels × 480 lines by a quarter in the horizontal direction and the vertical direction, and includes 180 pixels × 120 lines. The encoded frame 3B has an encoded block 4B for which a motion vector is to be obtained. The coding block 4B is configured by 16 pixels × 16 pixels. The reduced frame 17B has a reduced encoded block 6B obtained by reducing the encoded block 4B by a factor of 4 in the horizontal and vertical directions. The reduction coding block 6B is configured by 4 pixels × 4 pixels.
[0005]
The reduced reference frame 16B is obtained by reducing the reference frame 7B of 720 pixels × 480 lines by one-fourth in the horizontal and vertical directions, and includes 180 pixels × 120 lines. The reference frame 7B has a reference area 8B for searching for a motion vector. The reduced reference frame 16B has a reduced reference area 9B for searching for a reduced motion vector.
[0006]
The layer L0 is composed of the encoded frame 3B and the reference frame 7B before the reduction, and the layer L1 is composed of the reduced frame 17B and the reduced reference frame 16B after the reduction.
[0007]
FIG. 13 is a schematic diagram for explaining a method of generating a reduced image in a conventional motion vector detection device. The four pixels A, B, C, and D of 2 rows × 2 columns in the hierarchy L0 before reduction are reduced by half in the horizontal direction and the vertical direction, and as a result, 1 pixel in the hierarchy L1. Pixels a. The value of the pixel a in the hierarchy L1 is an average value of the values of the pixels A, B, C, and D in the hierarchy L0 as shown in the following equation.
[0008]
a = (A + B + C + D) / 4
First, the difference absolute value between the pixel value of the pixel arranged in the reduced encoding block 6B and the pixel value of the pixel arranged in the reduced reference block in the reduced reference area 9B is calculated, and the sum of the difference absolute values ( A reduced motion vector mv = (dh, dv) starting from the reduced reference block having the minimum value of (sad) and starting from the reduced encoded block 6B is obtained.
[0009]
Then, the obtained reduced motion vector mv = (dh, dv) is corrected to an initial motion vector MV = (dh × 4, dv × 4) obtained by quadrupling the horizontal component and the vertical component. Next, the end point of the initial motion vector MV is set as the center for searching for a motion vector, and block matching with the coding block 4B is performed around the center.
[0010]
At this time, a vector in which the position in the reference area 8B where the sum of absolute differences (SAD) becomes the minimum and the starting point of the initial motion vector MV as the starting point is detected as the motion vector of the coding block 4B.
[0011]
Block matching means that, for a target block of the current frame for which a motion vector is to be obtained, an image portion (a block area of the same size) that is most similar to the pattern of the luminance signal of the image in the block is searched from the reference frame. The motion vector is used to determine the offset amount (displacement between centers) between the searched image portion of the reference frame and the target block of the current frame.
[0012]
Specifically, assuming that the reduced encoded block in the reduced encoded frame 6B obtained by reducing the encoded frame 3B is mb and the reduced reference area in the reduced reference frame 16B to be searched is ref, all of the reduced encoded blocks belonging to the reduced encoded block mb are referred to as ref. An evaluation value SAD (mbc, ref) such as a sum of absolute values of a difference between a pixel value and a corresponding pixel value of the reduced reference area ref is obtained, and a point at which this evaluation amount is minimum is detected as a reduced motion vector mv. (The SAD between the reduced images is described in lower case sad, but the calculation formula is the same).
[0013]
(Equation 1)
Figure 2004179906
[0014]
Note that there are integer precision and real precision as motion vectors, and since a search pixel does not exist for obtaining a real precision motion vector, reference pixels are generated by interpolation from surrounding pixels to perform block matching. A half-pixel precision motion vector is often used as a real-number precision motion vector. After searching for an integer-precision motion vector, a half-pixel precision motion vector is calculated to increase the motion vector detection precision. be able to.
[0015]
The feature of such a hierarchical motion vector detection method is that, when compared with a method called full search in which a motion vector is searched by block matching only in the second stage processing (layer L0), a rough motion vector is reduced on a reduced screen. Since the motion vector is detected as the motion vector, the search range of the motion vector in the hierarchy L0 can be greatly narrowed. Therefore, the amount of calculation is significantly reduced as compared with the amount of calculation when the same detection range is processed only in the layer L0 (one-layer full search). In addition, the memory capacity of the image data called at the time of motion vector search can be reduced, and the number of accesses for data reading is reduced, so that power consumption is suppressed.
[0016]
However, in such a hierarchical motion vector detection method, as the reduction ratio of the reduced screen used in the first-stage motion vector detection increases, the number of pixels in the block used in the search also rapidly decreases. For this reason, since the motion vector is detected based on a small number of pixels in the block, there is a problem that the detection accuracy is deteriorated (erroneous detection).
[0017]
FIG. 14 is a schematic diagram for explaining another operation of the conventional motion vector detecting device. The reduced coded frame 17C is obtained by reducing the coded frame 3C of 720 pixels × 480 lines by a quarter in the horizontal and vertical directions, and is constituted by 180 pixels × 120 lines.
[0018]
The coded frame 3C has four coded blocks 4C whose motion vectors are to be obtained. The coding block 4C is configured in 2 rows × 2 columns, and a composite block 5C is configured. Each coding block 4C is composed of 16 pixels × 16 pixels.
[0019]
The reduced coded frame 17C has a reduced composite block 6C obtained by reducing the composite block 5C by a factor of 4 in the horizontal and vertical directions. The reduced composite block 6C is composed of 8 pixels × 8 pixels.
[0020]
The reduced reference frame 6C is obtained by reducing the reference frame 7C of 720 pixels × 480 lines by one-fourth in the horizontal and vertical directions, and includes 180 pixels × 120 lines. The reference frame 7C has a reference area 8C for searching for a motion vector. The reduced reference frame 6C has a reduced reference area 16C for searching for a reduced motion vector.
[0021]
The layer L0 is composed of the encoded frame 3C and the reference frame 7C before the reduction, and the layer L1 is composed of the reduced encoded frame 17C and the reduced reference frame 6C after the reduction.
[0022]
First, the absolute value of the difference between the pixel value of the pixel arranged in the reduced composite block 6C and the pixel value of the pixel arranged in the reduced reference block in the reduced reference area 9C is calculated, and the sum (sad) of the difference absolute values is calculated. ) Is determined as the end point, and the reduced motion vector mv = (dh, dv) starting from the reduced composite block 6C is obtained.
[0023]
Then, the obtained reduced motion vector mv = (dh, dv) is corrected to an initial motion vector MV = (dh × 4, dv × 4) obtained by quadrupling the horizontal component and the vertical component. Next, the end point of the initial motion vector MV is set as the center for searching for the motion vector, and block matching is performed on the periphery of the end point of the initial motion vector MV with the four encoded blocks 4C constituting the composite block 5C.
[0024]
At this time, the vector in which the position in the reference area 8C where the sum of absolute differences SAD becomes the minimum and the start point of the initial motion vector MV as the start point are detected as the motion vectors of the four encoded blocks 4C.
[0025]
As described above, in the layer L0, a plurality of coded blocks 4C (here, four blocks) are combined as a composite block 5C into one target block, and when the block is reduced in the layer L1, the screen size of the reduced composite block 6C is 12, the screen size becomes larger than the screen size of the reduced coding block 6B described above, and the number of pixels used for the search also increases.
[0026]
In this case, the reduced motion vector obtained in the layer L1 allocates the same motion vector MV (initial motion vector) to all of the four encoded blocks 4C constituting the composite block 5C in the layer L0. Therefore, when the encoded blocks in the composite block 5C have the same motion vector, the number of times of block matching is reduced, the reduction of the reduced block is suppressed, and the accuracy of detecting the motion vector is increased. .
[0027]
[Patent Document 1]
JP-A-9-182080 (pages 6 to 7, FIG. 42)
[0028]
[Patent Document 2]
JP-A-11-262015 (pages 3 to 4, FIG. 6)
[0029]
[Problems to be solved by the invention]
However, even in the above-described reduction by the composite block, since one of the four encoded blocks constituting the composite block is a peculiar block, for example, the motion of the other encoded block is If there is a unique motion vector greatly different from the vector, when trying to detect the motion vector of another coded block, an incorrect motion vector is detected as a result of being affected by this unique motion vector. There is a problem that there is a possibility of doing.
[0030]
The present invention has been made to solve such a problem, and an object of the present invention is to provide a motion vector detection device and a motion vector detection method with high motion vector detection accuracy.
[0031]
[Means for Solving the Problems]
A motion vector detection device according to the present invention is a composite block including a plurality of encoded blocks provided in an encoded frame, based on pixel data arranged in a reduced reference area obtained by reducing a reference area provided in a reference frame. A reduced motion vector detecting means for detecting a reduced motion vector of a reduced composite block obtained by reducing the motion of each encoded block included in the composite block based on the reduced motion vector detected by the reduced motion vector detecting means. Motion vector detecting means for detecting each of the vectors, wherein the reduced motion vector detecting means is arranged in the pixel data arranged in the reduced composite block and in the reduced composite reference block provided in the reduced reference area. The reduced motion vector based on the evaluation value obtained by adding the difference value between the reduced motion vector The difference value is detected by weighting pixel data arranged in a predetermined area in the reduced composite block and pixel data arranged in an area corresponding to the predetermined area in the reduced composite reference block. It is characterized by being calculated.
[0032]
Another motion vector detection device according to the present invention includes a plurality of encoded blocks provided in an encoded frame based on pixel data arranged in a reduced reference area obtained by reducing a reference area provided in a reference frame. A reduced main motion vector representing a motion vector of the reduced composite block obtained by reducing the composite block, and a reduced sub-block arranged in the reduced composite block so as to correspond to each encoded block provided in the encoded frame. A reduced motion vector detecting means for detecting a reduced sub motion vector representing a motion vector, and the composite block based on the reduced main motion vector and the reduced sub motion vector respectively detected by the reduced motion vector detecting means. The motion vector of each coded block included in Characterized by comprising a motion vector detecting means for.
[0033]
A motion vector detecting method according to the present invention is a composite block including a plurality of encoded blocks provided in an encoded frame, based on pixel data arranged in a reduced reference area obtained by reducing a reference area provided in a reference frame. A reduced motion vector detecting step of detecting a reduced motion vector of a reduced composite block obtained by reducing the motion of each of the encoded blocks included in the composite block based on the reduced motion vector detected by the reduced motion vector detecting step. A motion vector detecting step of detecting each of the vectors.The reduced motion vector detecting step includes a step of detecting the reduced motion vector, wherein the reduced motion vector detecting step includes the pixel data arranged in the reduced composite block and the reduced composite reference block provided in the reduced reference area. The reduced motion vector based on the evaluation value obtained by adding the difference value between the reduced motion vector The difference value is detected by weighting pixel data arranged in a predetermined area in the reduced composite block and pixel data arranged in an area corresponding to the predetermined area in the reduced composite reference block. It is characterized by being calculated.
[0034]
Another motion vector detection method according to the present invention includes a plurality of encoded blocks provided in an encoded frame based on pixel data arranged in a reduced reference area obtained by reducing a reference area provided in a reference frame. A reduced main motion vector representing a motion vector of the reduced composite block obtained by reducing the composite block, and a reduced sub-block arranged in the reduced composite block so as to correspond to each encoded block provided in the encoded frame. A reduced motion vector detecting step of detecting a reduced sub-motion vector representing a motion vector, and the composite block based on the reduced main motion vector and the reduced sub-motion vector respectively detected by the reduced motion vector detecting step. The motion vector of each coded block included in Characterized in that it comprises a motion vector detection step of.
[0035]
BEST MODE FOR CARRYING OUT THE INVENTION
In the motion vector detecting device according to the present embodiment, the evaluation is performed by adding the difference value between the pixel data arranged in the reduced composite block and the pixel data arranged in the reduced composite reference block provided in the reduced reference area. A reduced motion vector is detected based on the value, and the difference value is calculated based on pixel data arranged in a predetermined area in the reduced composite block and pixel data arranged in an area corresponding to the predetermined area in the reduced composite reference block. It is calculated by weighting.
[0036]
For this reason, even if a part of the pixel data arranged in the reduced composite block is peculiar pixel data, it is possible to set a predetermined area to be weighted so as to eliminate the influence of the peculiar pixel data. As a result, the motion vector detection accuracy can be improved.
[0037]
The reduced composite block is provided with a weighted area that weights the pixel data for calculating the evaluation value, and a non-weighted area that does not weight the pixel data for calculating the evaluation value, It is preferable that the weighted area is disposed at the center of the reduced composite block, and the non-weighted area is disposed on the periphery of the reduced composite block so as to surround the weighted area.
[0038]
The composite block is composed of a 4-row by 4-row coding block, and the weighting area provided in the reduced composite block is a 2-row by 2-column coding block arranged at the center of the composite block. It is preferable that the non-weighted area is arranged at a position corresponding to a block, and the unweighted area is arranged at a position corresponding to an encoded block arranged at a periphery of the composite block.
[0039]
It is preferable that the composite block includes a plurality of coding blocks arranged in a matrix.
[0040]
The motion vector detection unit is configured to generate each code based on pixel data arranged in a search area provided in the reference area for each coding block according to the reduced motion vector detected by the reduced motion vector detection means. The search area for detecting the motion vector of the coding block corresponding to the non-weighted area is a search area for detecting the motion vector of the coding block corresponding to the weighting area. Preferably, it is wider than the area.
[0041]
It is preferable that the reduced motion vector detecting means detects the reduced motion vector based on the reduced composite reference block having the smallest evaluation value.
[0042]
In another motion vector detection device according to the present embodiment, a plurality of encodings provided in an encoded frame are performed based on pixel data arranged in a reduced reference area obtained by reducing a reference area provided in a reference frame. A reduced main motion vector representing a motion vector of a reduced composite block obtained by reducing a composite block including a block, and reduced sub-blocks respectively arranged in the reduced composite block so as to correspond to each encoded block provided in each encoded frame. Are respectively detected, and the motion vector of each encoded block included in the composite block is detected based on the detected reduced main motion vector and reduced sub motion vector, respectively. .
[0043]
For this reason, even if a part of the motion vector of the reduced sub-block arranged in the reduced composite block is a unique motion vector compared to the reduced main motion vector, the motion vector of the reduced sub-block is individually determined as a unique motion vector. Can be set. As a result, the motion vector detection accuracy can be improved.
[0044]
It is preferable that the motion vector detecting means detects a motion vector of an encoded block corresponding to each reduced sub-motion vector according to a difference between each reduced sub-motion vector and the reduced main motion vector.
[0045]
When the difference between the reduced sub-motion vector and the reduced main motion vector is larger than a predetermined value, the motion vector detecting unit may correspond to the reduced sub-motion vector based on the reduced sub-motion vector. A motion vector of the encoded block to be encoded, and when the difference between the reduced sub motion vector and the reduced main motion vector is equal to or less than a predetermined value, the reduced sub motion vector is determined based on the reduced main motion vector. It is preferable to detect a motion vector of a coded block corresponding to the motion vector.
[0046]
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0047]
FIG. 1 is a block diagram illustrating a configuration of a motion vector detection device 100 according to an embodiment. FIG. 2 is a block diagram illustrating a configuration of a reduced motion vector detector 1 provided in the motion vector detection device 100. FIG. 3 is a schematic diagram for explaining an encoded frame 3 and a reference frame 7 for the motion vector detection device 100 to detect a motion vector.
[0048]
The motion vector detection device 100 includes a memory unit 40. The memory unit 40 stores an encoded frame 3 and a reference frame 7 for the motion vector detection device 100 to detect a motion vector. The memory unit 40 is composed of a large-capacity memory that can be accessed at high speed.
[0049]
The encoded frame 3 is composed of, for example, 720 pixels × 480 lines, and has a composite block 5. The composite block 5 has a plurality of encoded blocks 4 whose motion vectors are to be obtained. The coding blocks 4 are arranged, for example, in a matrix of 4 rows × 4 columns. Each encoding block 4 is composed of, for example, 16 rows × 16 columns of pixels. The reference frame 7 is composed of, for example, 720 pixels × 480 lines, and has a reference area 8 for detecting a motion vector.
[0050]
The motion vector detecting device 100 is provided with a reducer 41. The reducer 41 generates a reduced coded frame 17 obtained by reducing the coded frame 3 stored in the memory unit 40, and stores the generated reduced coded frame 17 in the memory unit 40.
[0051]
The reduced coded frame 17 is obtained by reducing the coded frame 3 to one-fourth in the horizontal and vertical directions, and is composed of, for example, 180 pixels × 120 lines. The reduced coded frame 17 has a reduced composite block 6 obtained by reducing the composite block 5 by a factor of 4 along the horizontal and vertical directions. The reduced composite block 6 is composed of reduced encoded blocks arranged in a matrix of, for example, 4 rows × 4 columns. Each reduced coding block is composed of, for example, pixels arranged in a matrix of 4 rows × 4 columns.
[0052]
For the reduced composite block 6, an evaluation value is calculated by adding a difference value between the pixel data arranged in the reduced composite block 6 and the pixel data arranged in the reduced composite reference block provided in the reduced reference area 9. And a non-weighted area that does not weight the pixel data for calculating the evaluation value. The weighting area is set in a reduced-encoding block of 2 rows × 2 columns arranged at the center of the reduced composite block 6. The non-weighted area is set to twelve reduced coding blocks arranged on the periphery of the reduced composite block 6.
[0053]
The reducer 41 also generates a reduced reference frame 16 obtained by reducing the reference frame 7 stored in the memory unit 40, and stores the generated reduced reference frame 16 in the memory unit 40.
[0054]
The reduced reference frame 16 is obtained by reducing the reference frame 7 by a factor of 4 along the horizontal and vertical directions, and is composed of, for example, 180 pixels × 120 lines. The reduced reference frame 16 has a reduced reference area 9 obtained by reducing the reference area 8 by a factor of 4 along the horizontal and vertical directions.
[0055]
The motion vector detection device 100 includes a current frame buffer 42. The current frame buffer 42 reads the coded frame 3 and the reduced coded frame 17 stored in the memory unit 40 and temporarily stores them.
[0056]
The motion vector detecting device 100 is provided with a reference frame buffer 43. The reference frame buffer 43 reads out the reference frame 7 and the reduced reference frame 16 stored in the memory unit 40 and temporarily holds them.
[0057]
The motion vector detection device 100 includes a reduced motion vector detector 1. The reduced motion vector detector 1 is provided in the reduced coded frame 17 held in the current frame buffer 42 based on the pixel data arranged in the reduced reference area 9 in the reduced reference frame 16 held in the reference frame buffer 43. The reduced motion vector of the reduced reduced composite block 6 is detected.
[0058]
The motion vector detection device 100 includes a motion vector detector 2. The motion vector detector 2 obtains a motion vector of each of the encoded blocks 4 included in the composite block 5 based on the reduced motion vector detected by the reduced motion vector detector 1 and supplies the motion vector to the encoder 45.
[0059]
Based on the motion vector of each coded block 4 supplied from the motion vector detector 2, the coder 45 generates each code constituting the composite block 5 provided in the coded frame 3 stored in the memory unit 40. The encoded block 4 is encoded and output as an encoded bit stream.
[0060]
Referring to FIG. 2, the reduced motion vector detector 1 has a controller 55. The controller 55 includes an address for reading the pixel data arranged in the reduced reference area 9 in the reduced reference frame 16 from the memory unit 40 to the reference frame buffer 43 and the pixel data arranged in the reduced composite block 6 in the reduced encoding frame 17. Is supplied to the address mover 50 from the memory unit 40 to the current frame buffer 42.
[0061]
The address mover 50 reads the pixel data arranged in the reduced reference area 9 from the memory unit 40 based on each address supplied from the controller 55, stores the read pixel data in the reference frame buffer 43, and is arranged in the reduced composite block 6. The read pixel data is read from the memory unit 40 and stored in the current frame buffer 42.
[0062]
The reduced motion vector detector 1 has a difference calculator 51. The difference calculator 51 calculates a difference value between the pixel data arranged in the reduced reference area 9 and the pixel data arranged in the reduced composite block 6, and supplies the difference value to the absolute value calculator 52.
[0063]
The absolute value calculator 52 generates a difference absolute value obtained by converting the difference value calculated by the difference calculator 51 into an absolute value, and supplies the difference absolute value to the adder 53. In accordance with an instruction from the controller 55, the adder 53 calculates a difference absolute value sum SAD obtained by summing the difference absolute values of all the pixel data arranged in the reduced reference area 9, and supplies the sum SAD to the determiner.
[0064]
The determiner 54 supplies to the controller 55 the sum of the absolute difference value SAD that becomes the minimum in the search range and the address of the reduced reference area where the sum of the absolute difference value SAD becomes the minimum.
[0065]
The controller 55 detects the reduced motion vector based on the sum of absolute difference SAD supplied from the determiner 54 and the address of the reduced reference area, and supplies the reduced motion vector to the motion vector detector 2. The memory 56 temporarily stores the sum of absolute differences SAD supplied from the determiner 54 and the reduced motion vector detected by the controller 55.
[0066]
The operation of the motion vector detecting device thus configured will be described. 4 and 5 are flowcharts showing the operation of the motion vector detection device 100 according to the embodiment. Steps S1 to S201 shown in FIG. 4 show a procedure for detecting a reduced motion vector of a reduced composite block 6 obtained by reducing the composite block 5 provided in the encoded frame 3. Steps S8 to S20 shown in FIG. 5 show a procedure for detecting a motion vector of each encoded block 4 included in the composite block 5 provided in the encoded frame 3 based on the reduced motion vector.
[0067]
First, detection of a motion vector is started for the composite block 5 provided in the encoded frame 3 of the hierarchy L0 (step S1). Then, the pixel data arranged in the reduced composite block 6 obtained by reducing the composite block 5 is read from the current frame buffer 42 to the reduced motion vector detector 1 (step S2). Next, a search start position h = -H1, v = -V1 in the reduced reference area 9 for searching for a reduced motion vector is set (step S3).
[0068]
Thereafter, the pixel data arranged in the reduced reference area 9 is sequentially read from the reference frame buffer 43 from the address of the search start position to the address of the search end position (step S4). Then, it is determined whether or not the pixel data arranged in the reduced composite block 6 read in step S2 belongs to the weighted area (step S101).
[0069]
When it is determined that the pixel data arranged in the reduced composite block 6 belongs to the weighted area (YES in step S101), the reduced motion vector 1 is stored in the pixel data arranged in the reduced composite block 6 and the reduced reference area 9. An absolute difference value between pixel data arranged in the provided reduced composite reference block is calculated, and a difference absolute value sum sadw obtained by multiplying the calculated absolute difference value by a predetermined weighting coefficient is obtained (step S102).
[0070]
When it is determined that the pixel data arranged in the reduced composite block 6 does not belong to the weighted area (NO in step S101), the reduced motion vector detector 1 determines whether the pixel data arranged in the reduced composite block 6 An absolute difference value between pixel data arranged in the reduced composite reference block provided in the area 9 is calculated, and the calculated absolute difference value is used as a sum of absolute difference values sadwo in the non-weighted area (step S103).
[0071]
When the difference absolute value sum sadw is obtained (step S102) or when the difference absolute value sum sadwo is obtained (step S103), the reduced motion vector detector 1 sets the difference absolute value sum sadw and the difference absolute value sum sadwo. Is calculated to calculate the sum of absolute differences sad of the reduced composite block 6 (step S104).
[0072]
Then, it is determined whether or not the sum of absolute differences sad of the reduced composite block 6 calculated in step S104 is smaller than the sum of absolute differences sad calculated so far (step S105). When it is determined that the difference absolute value sum sad of the reduced composite block 6 is smaller than the difference absolute value sum sad calculated so far (YES in step S105), the difference absolute value sum sad calculated so far is determined. The displacement amount between the position of the pixel data arranged in the reduced reference area 9 and the center position of the reduced composite block 6 when calculating the sum of absolute differences sad of the reduced composite block 6 determined to be smaller than ( dh, dv) is updated as the reduced motion vector mv of the reduced composite block 6 (step S106).
[0073]
When it is determined that the difference absolute value sum sad of the reduced composite block 6 is not smaller than the difference absolute value sum sad calculated so far (NO in step S105), When the displacement amount (dh, dv) is updated as the reduced motion vector mv of the reduced composite block 6 (step S106), the address of the reduced reference area 9 is incremented (step S6).
[0074]
Then, it is determined whether the incremented address of the reduced reference area 9 is outside the search range and the search range has ended (step S7). If it is determined that the search range has not ended (NO in step S7), the process returns to step S4. The pixel data at the address of the reduced reference area 9 that has been incremented is read, and a series of processes from step S4 to step S6 are repeated.
[0075]
If it is determined that the search range has ended (YES in step S7), the reduced motion vector mv of the reduced composite block 6 is multiplied by the reciprocal of the reduction rate of 1/4 to correct the reduced motion vector mv, and the hierarchy L0 Is an initial motion vector (a center position for searching for a motion vector) for detecting a motion vector.
[0076]
Then, the first coded block 4 is designated as the number n = 0 of the coded blocks 4 constituting the composite block 5 in the hierarchy L0 (step S8). Next, the pixel data arranged in the encoding block 4 indicated by the number n is read from the current frame buffer 42 to the motion vector detector 2 (Step S9). Thereafter, it is determined whether or not the coding block 4 indicated by the number n is a coding block corresponding to the weighting area set in the reduced composite block 6 (step S301).
[0077]
When it is determined that the coded block 4 indicated by the number n is a coded block corresponding to the weighting area set in the reduced composite block 6 (YES in step S301), a search for a motion vector is started. The motion vector search start position is set to h = -H0, v = -V0 (H0 and V0 are zero or more) (step S10). When it is determined that the coded block 4 indicated by the number n is not a coded block corresponding to the weighting area set in the reduced composite block 6 (NO in step S301), a motion for starting a motion vector search is performed. The vector search start position is set to h = -H0-p, v = -V0-q (p> 0, q> 0) (step S302).
[0078]
Next, the pixel data arranged in the reference area 8 is read from the reference frame buffer 43 for block matching with the coding block 4 indicated by the number n (step S11). The start address (in-frame coordinates) of the pixel data arranged in the reference area 8 to be read is obtained by adding the above-described initial motion vector and the start position of the search range to the center coordinates of the encoding block 4 indicated by the number n. Things.
[0079]
Thereafter, the motion vector detector 2 calculates a difference absolute value SAD between the pixel data arranged in the coding block 4 indicated by the number n and the pixel data arranged in the reference area 8 (Step S12). Then, the motion vector detector 2 determines whether the calculated absolute difference value SAD is the minimum (Step S13).
[0080]
If it is determined that the calculated difference absolute value SAD is the minimum (YES in step S13), the motion vector MVn = (dh, dv) when the difference absolute value SAD is the minimum is updated as the motion vector to be obtained ( Step S14).
[0081]
When it is determined that the calculated difference absolute value SAD is not the minimum (NO in step S13) or when the motion vector MVn = (dh, dv) is updated as a motion vector to be obtained (step S14), the search in the reference area 8 is started. The position is incremented in the horizontal and vertical directions (step S15).
[0082]
Then, it is determined whether or not the coding block 4 indicated by the number n is a coding block corresponding to the weighting area (step S401). When it is determined that the coding block 4 indicated by the number n is a coding block corresponding to the weighting area (YES in step S401), whether the search range (h = H0, v = V0) has been completed or not Is determined (step S16). If it is determined that the search range (h = H0, v = V0) is not completed (NO in step S16), the process returns to step S11, and reads the next reference area data.
[0083]
If it is determined that the coding block 4 indicated by the number n is not a coding block corresponding to the weighting area (NO in step S401), it is determined whether the search range (h = H0 + p, v = V0 + q) has been completed. A determination is made (step S402). When it is determined that the search range (h = H0 + p, v = V0 + q) is not completed (NO in step S402), the process returns to step S11.
[0084]
When it is determined that the search range (h = H0, v = V0) has ended (YES in step S16) or when it is determined that the search range (h = H0 + p, v = V0 + q) has ended (YES in step S402). ) Calculates the motion vector of the coding block 4 indicated by the number n by adding the initial motion vector at the time of starting the search to the motion vector obtained in step S14 (step S17).
[0085]
Then, the number n is incremented to designate the next encoded block 4 in the composite block 5 (step S18). Next, it is determined whether the detection of the motion vectors of all the encoded blocks 4 in the composite block 5 has been completed (step S19). When it is determined that the detection of the motion vectors of all the encoded blocks 4 in the composite block 5 has not been completed (NO in step S19), the process returns to step S9. If it is determined that the detection of the motion vectors of all the encoded blocks 4 in the composite block 5 has been completed (YES in step S19), the motion vector detection processing ends (step S20).
[0086]
The feature of the hierarchical motion vector detection according to the present embodiment is that weighted / unweighted region division is introduced into the reduced composite block 6 in the first-stage (layer L1) motion vector detection. Further, in detecting the motion vector of the second-level (layer L0) coding block 4 corresponding to these areas, the range of motion vector search is changed between these two weighted / non-weighted areas.
[0087]
A composite block 5 composed of a plurality of encoded blocks 4 in the hierarchy L0 is treated as one reduced composite block 6 in the hierarchy L1. As a result, the size of the reduced composite block is increased, so that the number of data in the target block is also increased. For this reason, it is possible to suppress deterioration in the accuracy of motion vector detection.
[0088]
However, on the other hand, by making the plurality of encoded blocks 4 into one reduced composite block 6, a wide image range is targeted, and the possibility that blocks having different motions from other blocks are also included is increased. For this reason, the weighting is changed between the center and the periphery of the reduced composite block 6, the central region is weighted, and the peripheral region is not weighted so that the motion of the central region is selected to be superior. In addition, in order to compensate for the non-dominant selection of the non-weighted peripheral region, the search range of the motion vector is broadened for the block spatially corresponding to the peripheral region in the second layer L0.
[0089]
Specifically, when the reduced composite block 6 of the layer L1 is divided so as to correspond to the coding block 4 constituting the composite block 5 of the layer L0, the central area of the reduced composite block 6 corresponding to the central block of the composite block (For example, the shaded area of the reduced composite block 6 in FIG. 3) is weighted, and the remaining peripheral area is not weighted.
[0090]
For the weighted area, the difference absolute value is multiplied by a predetermined weight value at the time of block matching to make the difference absolute value larger than the difference absolute value of the non-weighted area. As a result, the SAD of the entire reduced composite block 6 is biased toward the SAD value of the weighted central area of the reduced composite block 6, so that the motion vector at that time is easily detected.
[0091]
Further, the search range of the motion vector is changed between the coded block corresponding to the weighted area of the reduced composite block 6 and the coded block corresponding to the non-weighted area in the hierarchy L0. That is, the search range of the motion vector of the coding block corresponding to the non-weighted area is wider than the search range of the coding block corresponding to the weighted area.
[0092]
As described above, according to the present embodiment, the difference value between the pixel data arranged in the reduced composite block 6 and the pixel data arranged in the reduced composite reference block provided in the reduced reference area 9 is added. A reduced motion vector is detected based on the evaluation value, and the difference value is calculated based on pixel data arranged in a predetermined area in the reduced composite block 6 and pixel data arranged in an area corresponding to the predetermined area in the reduced composite reference block. Is calculated by weighting each of them.
[0093]
Therefore, even if a part of the pixel data arranged in the reduced composite block 6 is peculiar pixel data, it is possible to set a predetermined area to be weighted so as to eliminate the influence of the peculiar pixel data. As a result, the motion vector detection accuracy can be improved.
[0094]
In the present embodiment, in the first-stage motion vector detection based on the reduced image, a reduced motion vector is detected by changing the weight between the center and the periphery of the reduced composite block 6, and the reduced motion vector is determined based on the reduced motion vector. In the second-stage motion vector detection based on the original image, the search range of the motion vector is changed for the encoded blocks corresponding to the center and the periphery in the reduced composite block 6, thereby suppressing the deterioration of the detection accuracy of the hierarchical motion vector. I can do it.
[0095]
Note that, in the present embodiment, an example has been described in which the composite block 5 is constituted by 16 encoded blocks 4, but the present invention is not limited to this. The composite block 5 may be arbitrarily configured as long as it is a plurality of encoded blocks.
[0096]
Further, in the present embodiment, the weighting / non-weighting area is divided into two stages, that is, the center and the periphery, but the weighting may be divided more finely and divided.
[0097]
6 and 7 are flowcharts illustrating another operation of the motion vector detection device according to the embodiment. The same components as those in the flowchart showing the operation of the motion vector detecting device described above with reference to FIGS. 4 and 5 are denoted by the same reference numerals. Therefore, a detailed description of these components will be omitted.
[0098]
In the flowcharts shown in FIGS. 6 and 7, unlike the procedure described above with reference to FIGS. 4 and 5, in the motion vector detection of the first stage (layer L1), the sum of the absolute differences Is calculated as the minimum value sadw_min. Then, the minimum value sadw_min is compared with the minimum value (min (sad)) of the entire reduced composite block 6. Therefore, when the difference between these two minimum values is small, it is determined that the reduced block is a block having uniform motion as a whole. Therefore, when it is determined that the block has a uniform motion, it is not necessary to change the motion vector search range between the weighted area and the non-weighted area in the hierarchy L0. Therefore, the calculation of the second-stage motion vector search is reduced.
[0099]
6 and 7, steps S1 to S4 are the same as steps S1 to S4 described above with reference to FIG.
[0100]
Then, it is determined whether or not the pixel data arranged in the reduced composite block 6 read in step S2 belongs to the weighted area (step S101).
[0101]
When it is determined that the pixel data arranged in the reduced composite block 6 belongs to the weighted area (YES in step S101), the reduced motion vector detector 1 sets the pixel data arranged in the reduced composite block 6 and the reduced reference area. 9, and calculates the absolute difference value saddw obtained by multiplying the calculated absolute difference value by a predetermined weighting coefficient (step S102). .
[0102]
Then, it is determined whether or not the difference absolute value sum sadw obtained in step S102 is smaller than the difference absolute value sum sadw obtained so far (step S107). When it is determined that the difference absolute value sum sadw is smaller than the difference absolute value sum sadw determined so far (YES in step S107), the difference absolute value sum sadw determined in step S102 is changed to the minimum difference absolute value. The sum is updated as sadw_min (step S108).
[0103]
When it is determined that the pixel data arranged in the reduced composite block 6 does not belong to the weighted area (NO in step S101), the reduced motion vector detector 1 determines whether the pixel data arranged in the reduced composite block 6 An absolute difference value between pixel data arranged in the reduced composite reference block provided in the area 9 is calculated, and the calculated absolute difference value is used as a sum of absolute difference values sadwo in the non-weighted area (step S103).
[0104]
When it is determined that the difference absolute value sum sadw is not smaller than the difference absolute value sum sadw obtained so far (NO in step S107), or the difference absolute value sum sadw is updated as the minimum difference absolute value sum sadw_min. At this time (step S108) or when the sum of absolute differences sadwo is obtained (step S103), the reduced motion vector detector 1 uses the reduced composite block 6 obtained by adding the sum of absolute differences sadw and the sum of absolute differences sadwo. Is calculated (step S104).
[0105]
Then, it is determined whether or not the sum of absolute differences sad of the reduced composite block 6 calculated in step S104 is smaller than the sum of absolute differences sad calculated so far (step S105). When it is determined that the difference absolute value sum sad of the reduced composite block 6 is smaller than the difference absolute value sum sad calculated so far (YES in step S105), the difference absolute value sum sad calculated so far is determined. The displacement amount between the position of the pixel data arranged in the reduced reference area 9 and the center position of the reduced composite block 6 when calculating the sum of absolute differences sad of the reduced composite block 6 determined to be smaller than ( dh, dv) is updated as the reduced motion vector mv of the reduced composite block 6 (step S106).
[0106]
When it is determined that the difference absolute value sum sad of the reduced composite block 6 is not smaller than the difference absolute value sum sad calculated so far (NO in step S105), When the displacement amount (dh, dv) is updated as the reduced motion vector mv of the reduced composite block 6 (step S106), the address of the reduced reference area 9 is incremented (step S6).
[0107]
Then, it is determined whether the incremented address of the reduced reference area 9 is outside the search range and the search range has ended (step S7). If it is determined that the search range has not ended (NO in step S7), the process returns to step S4. The pixel data at the address of the reduced reference area 9 that has been incremented is read, and a series of processes from step S4 to step S6 are repeated.
[0108]
If it is determined that the search range has ended (YES in step S7), the reduced motion vector mv of the reduced composite block 6 is multiplied by the reciprocal of the reduction rate of 1/4 to correct the reduced motion vector mv, and the hierarchy L0 Is an initial motion vector (a center position for searching for a motion vector) for detecting a motion vector.
[0109]
Then, the first coded block 4 is designated as the number n = 0 of the coded blocks 4 constituting the composite block 5 in the hierarchy L0 (step S8). Next, the pixel data arranged in the encoding block 4 indicated by the number n is read from the current frame buffer 42 to the motion vector detector 2 (Step S9).
[0110]
Thereafter, the coded block 4 indicated by the number n is a coded block corresponding to the weighted area set in the reduced composite block 6, or the minimum difference in the weighted area of the reduced composite block 6 updated in step S108 It is determined whether or not the difference absolute value between the sum of absolute values sadw_min and the sum of absolute differences min (sad) of the reduced composite block 6 in step S105 is smaller than a predetermined value th1 (step S301A).
[0111]
Either the coding block 4 indicated by the number n is a coding block corresponding to the weighted area set in the reduced composite block 6, or the minimum difference absolute value in the weighted area of the reduced composite block 6 updated in step S108 When it is determined that the difference absolute value between the sum sadw_min and the sum of difference absolute values min (sad) of the reduced composite block 6 in step S105 is smaller than a predetermined value th1 (YES in step S301A), the motion vector The motion vector search start position for starting the search is set to h = -H0, v = -V0 (H0 and V0 are zero or more) (step S10).
[0112]
The coded block 4 indicated by the number n is not the coded block corresponding to the weighted area set in the reduced composite block 6, and the sum of the minimum difference absolute values in the weighted area of the reduced composite block 6 updated in step S108 When it is determined that the difference absolute value between sadw_min and the sum of absolute differences min (sad) of the reduced composite block 6 in step S105 is not smaller than a predetermined value th1 (NO in step S301A), the motion vector The motion vector search start position for starting the search is set to h = -H0-p, v = -V0-q (p> 0, q> 0) (step S302).
[0113]
Steps S11 to S15 are the same as steps S11 to S15 described above with reference to FIG.
[0114]
Then, the coding block 4 indicated by the number n is a coding block corresponding to the weighting area, or the minimum difference absolute value sum sadw_min in the weighting area of the reduced composite block 6 updated in step S108 and the coding block 4 in step S105 It is determined whether the difference absolute value between the reduced composite block 6 and the sum of absolute differences min (sad) is smaller than a predetermined value th1 (step S411).
[0115]
Either the coding block 4 indicated by the number n is a coding block corresponding to the weighted area set in the reduced composite block 6, or the minimum difference absolute value in the weighted area of the reduced composite block 6 updated in step S108 If it is determined that the difference absolute value between the sum sadw_min and the sum of difference absolute values min (sad) of the reduced composite block 6 in step S105 is smaller than a predetermined value th1 (YES in step S411), the search range ( h = H0, v = V0) is determined (step S16). If it is determined that the search range (h = H0, v = V0) is not completed (NO in step S16), the process returns to step S11, and reads the next reference area data.
[0116]
The coded block 4 indicated by the number n is not the coded block corresponding to the weighted area set in the reduced composite block 6, and the sum of the minimum difference absolute values in the weighted area of the reduced composite block 6 updated in step S108 If it is determined that the difference absolute value between sadw_min and the sum of difference absolute values min (sad) of the reduced composite block 6 in step S105 is not smaller than the predetermined value th1 (NO in step S411), the search range ( It is determined whether or not (h = H0 + p, v = V0 + q) has been completed (step S402). When it is determined that the search range (h = H0 + p, v = V0 + q) is not completed (NO in step S402), the process returns to step S11.
[0117]
Steps S17 to S20 are the same as steps S17 to S20 described above with reference to FIG.
[0118]
As described above, by calculating the minimum SAD in the weighted area provided in the first-stage reduced composite block 6 and comparing it with the minimum SAD of the entire reduced composite block 6, the difference is smaller than a predetermined value and smaller. For example, the reduced composite block 6 is regarded as a block having a uniform motion as a whole, and it is not necessary to change the motion vector search range between the weighted area and the non-weighted area in the hierarchy L0. For this reason, the motion vector search range can be reduced.
[0119]
In the present embodiment, the minimum value SAD of the weighted area provided in the reduced composite block 6 is calculated and used in the condition determination in the hierarchy L0, but the motion vector of the minimum value SAD of the weighted area is calculated, A condition for comparison with the motion vector of the entire reduced composite block 6 may be used. In this case, if the value of the motion vector is within a predetermined range, the block may be regarded as a block having a uniform motion as a whole.
[0120]
FIG. 8 is a schematic diagram for explaining still another operation of the motion vector detection device according to the embodiment. The same components as those described above with reference to FIG. 3 are denoted by the same reference numerals. Therefore, a detailed description of these components will be omitted.
[0121]
The encoded frame 3A is composed of 720 pixels × 480 lines, and has a composite block 5A. The composite block 5A has a plurality of encoded blocks 4A whose motion vectors are to be obtained. The coding blocks 4A are arranged in a matrix of 2 rows × 2 columns. Each encoding block 4A is configured by 16 rows × 16 columns of pixels. The reference frame 7A is composed of 720 pixels × 480 lines, and has a reference area 8A for detecting a motion vector.
[0122]
The reduced coded frame 17A is obtained by reducing the coded frame 3A by a factor of four along the horizontal and vertical directions, and is composed of 180 pixels × 120 lines. The reduced coded frame 17A has a reduced composite block 6A obtained by reducing the composite block 5A by a factor of 4 along the horizontal and vertical directions. The reduced composite block 6A is composed of reduced encoded blocks arranged in a matrix of 2 rows × 2 columns. Each reduced coding block is composed of pixels arranged in a matrix of 4 rows × 4 columns.
[0123]
The reduced reference frame 16A is obtained by reducing the reference frame 7A to one-fourth in the horizontal and vertical directions, and includes 180 pixels × 120 lines. The reduced reference frame 16A has a reduced reference area 9A obtained by reducing the reference area 8A by a factor of 4 along the horizontal and vertical directions.
[0124]
In the present embodiment, in the first-stage (layer L1) motion vector detection, the reduced main motion vector of the entire reduced composite block 6A is detected, and at the same time, the reduction of the sub-block (mbn) of the reduced composite block 6A (mb) is performed. Find the sub motion vector. At this time, the reduced sub-motion vector (mvn) of the sub-block is simultaneously searched within the search range of the reduced main motion vector (mv) of the reduced composite block 6A. Further, the sub-blocks spatially correspond to the coding blocks 4A forming the second-stage (layer L0) composite block 5A.
[0125]
As a result, when a motion that is significantly different from the motion of the reduced composite block 6A is present in the sub-block, the reduced sub-motion vector of the sub-block is used as the second-stage motion vector in the hierarchy L0, thereby deteriorating the motion vector detection accuracy. Can be suppressed.
[0126]
As for the detection of the reduced sub-motion vector of the sub-block, the SAD (sadn) of each sub-block is calculated, and the motion vector at the minimum of the sadn is detected. As the reduced main motion vector of the entire reduced composite block 6A, a motion vector when the sum of the sums of the sub-blocks of sadn is minimum is detected.
[0127]
In the motion vector detection in the second stage (layer L0), if the difference between the reduced sub-motion vector of the sub-block and the reduced main motion vector of the entire reduced composite block 6A is within a predetermined value, the reduced composite block The reduced main motion vector of the entire 6A is set as the motion vector in the second stage (layer L0). If the reduced sub-motion vector of the sub-block differs from the reduced main motion vector of the entire reduced composite block 6A by more than a predetermined value, the motion vector of the encoded block is detected based on the reduced sub-motion vector of the sub-block. I do.
[0128]
9 and 10 are flowcharts illustrating still another operation of the motion vector detection device according to the embodiment. The same components as those in the flowchart described above with reference to FIGS. 4 and 5 are denoted by the same reference numerals. Therefore, a detailed description of these components will be omitted.
[0129]
Steps S1 to S4 are the same as steps S1 to S4 described above with reference to FIG.
[0130]
Then, sadn, which is the sum of absolute differences between the data of the reduced sub-block mbn and the corresponding data of the reduced reference area 9A, is calculated (step S111). In this case, n is 0, 1, 2, 3.
[0131]
Next, it is determined whether or not the calculated sad0, sad1, sad2, and sad3 are smaller values than those in the motion vector search range (step S112). If the value is small (YES in step S112), the motion vector value at that time (the spatial displacement amount mvn from the center of the reduced sub-block mbn to the center of the corresponding reduced reference area (sub-reduced reference area) = ( dh, dv)) is updated (step S113).
[0132]
When the calculated sad0, sad1, sad2, and sad3 are not smaller than the previous values in the motion vector search range (NO in step S112), or when mvn = (dh, dv) is updated ( In step S113), sad0, sad1, sad2, and sad3 of the reduced sub-block mbn are added to each other to calculate the sum of absolute differences sad of the entire reduced composite block 6A (step S114).
[0133]
Then, it is determined whether or not the sum of absolute differences sad of the entire reduced composite block 6A is smaller than the previous sad value (step S115). If it is smaller (YES in step S115), the motion vector at that time (spatial displacement mv = (dh, dv) from the center of the reduced composite block mb to the center of the search reduced reference area) is calculated (step S115). S116).
[0134]
When it is determined that the sum of absolute differences sad of the entire reduced composite block 6A is not smaller than the previous sad value (NO in step S115), or the spatial displacement amount mv = (dh, dv)) is calculated. (Step S116), the horizontal h or vertical v count is incremented to read the pixel data arranged in the reduced reference area of the next search range (step S6).
[0135]
Then, it is determined whether or not the search range has ended (step S7). If it is determined that the search range has not been completed (NO in step S7), the process returns to step S4. When it is determined that the search range has ended (YES in step S7), the first encoded block 4A is designated as the number n = 0 of the encoded block 4A constituting the composite block 5A in the hierarchy L0 (step S8). .
[0136]
Next, the pixel data arranged in the coding block MBn (n = 0 at the start) is read from the current frame buffer 42 (step S9). Thereafter, the reduced sub-motion vector (mvn) of the reduced sub-block mbn spatially corresponding to the encoded block MBn and the reduced main motion vector (mvn) of the reduced composite block mb are compared, and the difference is less than a predetermined value th2. Is determined (step S321).
[0137]
It is determined that the difference between the reduced sub-motion vector (mvn) of the reduced sub-block mbn spatially corresponding to the encoded block MBn and the reduced main motion vector (mvn) of the reduced composite block mb is less than a predetermined value th2. (Step S321: YES), the initial motion vector of the target coded block MBn is set to a value obtained by correcting the reduced main motion vector of the entire reduced composite block 6A (by multiplying by the inverse ratio of the reduction) (Step S321). S322).
[0138]
It is determined that the difference between the reduced sub-motion vector (mvn) of the reduced sub-block mbn spatially corresponding to the encoded block MBn and the reduced main motion vector (mvn) of the reduced composite block mb is not less than a predetermined value th2. If (NO in step S321), the initial motion vector of the encoded block MBn is set to a value obtained by correcting the reduced sub-motion vector of the reduced sub-block (multiplying by the inverse ratio of reduction) (step S323).
[0139]
The comparison between the reduced sub-motion vector of the reduced sub-block and the reduced main motion vector of the reduced composite block mb is performed, for example, by comparing the difference absolute value of the motion vector component dh along the horizontal direction between the two motion vectors and the motion along the vertical direction. A value obtained by adding the difference absolute value of the vector component dv is used.
[0140]
In the subsequent process, block matching is performed between the coded block MBn and the corresponding reference area data with one of the initial motion vector values as the center of the search. As a result, the spatial displacement between the center of the reference area for which the minimum SAD has been calculated and the center of MBn of the coding block is calculated as a motion vector value.
[0141]
As described above, according to the present embodiment, a plurality of codes provided in the encoded frame 3A are based on the pixel data arranged in the reduced reference area 9A obtained by reducing the reference area 8A provided in the reference frame 7A. The reduced main motion vector representing the motion vector of the reduced composite block 6A obtained by reducing the composite block 5A including the encoded block 4A, and the reduced composite block 6A corresponding to each of the encoded blocks 4A provided in the encoded frame 3A, respectively. Each of the reduced sub-motion vectors representing the motion vector of each of the arranged reduced sub-blocks is detected, and based on the detected reduced main motion vector and reduced sub-motion vector, each of the encoded blocks included in the composite block 5A is detected. 4A motion vectors are respectively detected.
[0142]
For this reason, even if a part of the pixel data arranged in the reduced composite block 6A is peculiar pixel data, it is possible to improve the detection accuracy of the motion vector.
[0143]
In this way, in the first-stage motion vector detection, the motion vectors of the sub-blocks of the reduced block (spatially corresponding to the individual blocks forming the second-stage composite block) are obtained simultaneously with the detection of the motion vector of the entire reduced block. Thus, when a motion that is significantly different from the entire reduced block exists in the sub-block, the use of the motion vector of the first-stage sub-block in the second stage makes it possible to suppress deterioration in the detection accuracy of the motion vector.
[0144]
FIG. 11 is a flowchart illustrating still another operation of the motion vector detection device according to the embodiment. Still another operation of the motion vector detecting device will be described with reference to the flowchart shown in FIG. 11 in which the flowcharts shown in FIGS. 9 and 10 are additionally modified. 8 is used as an explanatory diagram of this embodiment. The same components as those in the flowcharts shown in FIGS. 9 and 10 are denoted by the same reference numerals. Therefore, a detailed description of these components will be omitted.
[0145]
In the present embodiment, a composite block 5A constituted by a plurality of encoded blocks 4A (four blocks composed of 16 pixels × 16 lines) in the hierarchy L0 becomes one reduced composite block 6A in the hierarchy L1. A reduced motion vector is detected. It is assumed that the layer L1 is reduced to a horizontal 水平 and a vertical 4.
[0146]
The difference between this embodiment and the embodiments of the flowcharts shown in FIGS. 9 and 10 described above is that the initial stage motion vector detection in the second stage (layer L0) motion vector detection is performed at the first stage (layer L1). This is a part relating to a method for comparing and determining the reduced main motion vector of the reduced composite block 6A and the reduced sub-motion vector of the reduced sub-block.
[0147]
In the embodiments of the flowcharts shown in FIGS. 9 and 10 described above, if the reduced sub-motion vector of the reduced sub-block is significantly different from the reduced main motion vector of the entire reduced composite block 6A, The motion vector was set as a second stage initial motion vector. On the other hand, in the present embodiment, even when the reduced sub-motion vector of the reduced sub-block is largely different from the reduced main motion vector of the entire reduced composite block 6A, the minimum sadn of the reduced sub-block is small, and If the difference between four times the minimum sadn and the minimum sad of the entire reduced composite block 6A is small, the condition is that the reduced sub-motion vector of the reduced sub-block is the same as the reduced main motion vector of the entire reduced composite block 6A. Join.
[0148]
This means that in the detection of reduced sub-motion vectors of some reduced sub-blocks, matching with the reduced reference area of sad as much as possible is prioritized, and as a result, a vector that is significantly different from the original motion vector is selected. This is to suppress it. As such a case, there is a case where the minimum sadn is small and the difference of the sadn of other sub-blocks is small, and only the motion vector is large.
[0149]
In the present embodiment, a motion vector is detected for a reduced block having a first stage (layer L1) obtained by reducing the composite block 5A of the layer L0, and the motion vector is detected as an initial motion vector value (the motion vector is calculated by the inverse ratio of the reduction ratio). This shows a part of the process of detecting the motion vector of the encoded block 4A of the second stage (layer L0) as the (corrected value).
[0150]
The steps of detecting the reduced main motion vector of the reduced composite block 6A and the reduced sub-motion vector of its sub-block in the hierarchy L1 are the same as those in the above-described embodiment of the flowchart shown in FIGS.
[0151]
After detecting the initial motion vector, the motion vector of the coded block MBn is detected in the layer L0. In this case, n = 0, 1, 2, 3.
[0152]
Then, the pixel data arranged in the encoded block MBn (n = 0 at the start) is read from the current frame buffer 42 (step S9). Next, the reduced sub-motion vector (mvn) of the reduced sub-block mbn corresponding to the encoded block MBn is compared with the reduced main motion vector (mvn) of the reduced composite block mb, and the difference is less than a predetermined value (th2). Is determined (step S321).
[0153]
It is determined that the difference between the reduced sub-motion vector (mvn) of the reduced sub-block mbn corresponding to the encoded block MBn and the reduced main motion vector (mvn) of the reduced composite block mb is not less than a predetermined value (th2). At this time (NO in step S321), the minimum sadn of the reduced sub-block corresponding to the coded block MBn is less than the predetermined value (th3), and a value obtained by quadrupling the minimum value, and the minimum sad of the reduced composite block. It is determined whether or not the absolute value of the difference between is smaller than a predetermined value (th4) (step S331).
[0154]
It is determined that the difference between the reduced sub-motion vector (mvn) of the reduced sub-block mbn corresponding to the encoded block MBn and the reduced main motion vector (mvn) of the reduced composite block mb is less than a predetermined value (th2). (YES in step S321), or a value obtained by reducing the minimum sadn of the reduced sub-block corresponding to the coded block MBn to a value smaller than the predetermined value (th3) by four times the minimum value, and a reduced composite block. Is determined to be smaller than the predetermined value (th4) (YES in step S331), the initial motion vector of the encoded block MBn is reduced by reducing the entire reduced composite block 6A. The main motion vector is set to a corrected value (step S322).
[0155]
The minimum sadn of the reduced sub-block corresponding to the coded block MBn is not less than a predetermined value (th3), or the absolute value of the difference between the value obtained by quadrupling the minimum value and the minimum sad of the reduced composite block is a predetermined value. If it is determined that the value is not less than the value (th4) (NO in step S331), the initial motion vector of the encoded block MBn is set as the reduced sub-motion vector of the reduced sub-block (step S323).
[0156]
Subsequent processes are the same as those of the embodiment of the flowcharts shown in FIGS. 9 and 10 described above. With one of the initial motion vector values as the center of the search, the coded block MBn and the corresponding reference area data are set. , And the amount of spatial displacement between the center of the minimum SAD reference area and the center of the coded block MBn is defined as a motion vector.
[0157]
As described above, according to the present embodiment, in the first-stage motion vector detection, some of the reduced sub-blocks are erroneously matched with the data of the smaller reduced reference area of sad, and as a result, Can be avoided that a significantly different initial motion vector is set in the motion vector search.
[0158]
【The invention's effect】
As described above, according to the present invention, it is possible to provide a motion vector detection device and a motion vector detection method with high motion vector detection accuracy.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a motion vector detection device according to an embodiment.
FIG. 2 is a block diagram for explaining a configuration of a reduced motion vector detector provided in the motion vector detection device according to the embodiment;
FIG. 3 is a schematic diagram for explaining the operation of the motion vector detection device according to the embodiment;
FIG. 4 is a flowchart showing an operation of the motion vector detection device according to the embodiment;
FIG. 5 is a flowchart showing the operation of the motion vector detection device according to the embodiment;
FIG. 6 is a flowchart illustrating another operation of the motion vector detection device according to the embodiment;
FIG. 7 is a flowchart showing another operation of the motion vector detection device according to the embodiment;
FIG. 8 is a schematic diagram for explaining still another operation of the motion vector detection device according to the embodiment.
FIG. 9 is a flowchart illustrating still another operation of the motion vector detection device according to the embodiment;
FIG. 10 is a flowchart illustrating still another operation of the motion vector detection device according to the embodiment;
FIG. 11 is a flowchart showing still another operation of the motion vector detection device according to the embodiment;
FIG. 12 is a schematic diagram for explaining the operation of a conventional motion vector detection device.
FIG. 13 is a schematic diagram for explaining a method of generating a reduced image in a conventional motion vector detection device.
FIG. 14 is a schematic diagram for explaining another operation of the conventional motion vector detecting device.
[Explanation of symbols]
1 Reduced motion vector detector
2 Motion vector detector
3, 3A, 3B, 3C encoded frame
4, 4A, 4B, 4C coding block
5,5A, 5C composite block
66A, 6C reduced composite block
6B reduced block
7, 7A, 7B, 7C Reference frame
8, 8A, 8B, 8C Reference area
9, 9A, 9B, 9C Reduced reference area
16, 16A, 16B, 16C Reduced reference frame
17, 17A, 17B, 17C Reduced encoded frame
40 memory units
41 Reducer
42 Current frame buffer
43 Reference frame buffer
45 encoder
50 address mover
51 Difference calculator
52 Absolute value calculator
53 adder
54 Judge
55 controller
56 memories
100 motion vector detection device

Claims (11)

参照フレームに設けられた参照領域を縮小した縮小参照領域に配置された画素データに基づいて、符号化フレームに設けられた複数の符号化ブロックを含む複合ブロックを縮小した縮小複合ブロックの縮小動きベクトルを検出する縮小動きベクトル検出手段と、
前記縮小動きベクトル検出手段によって検出された前記縮小動きベクトルに基づいて、前記複合ブロックに含まれる各符号化ブロックの動きベクトルをそれぞれ検出する動きベクトル検出手段とを具備しており、
前記縮小動きベクトル検出手段は、前記縮小複合ブロックに配置された画素データと前記縮小参照領域に設けられた縮小複合参照ブロックに配置された画素データとの間の差分値を加算した評価値に基づいて前記縮小動きベクトルを検出し、
前記差分値は、前記縮小複合ブロックにおける所定の領域に配置された画素データと前記縮小複合参照ブロックにおいて前記所定の領域に対応する領域に配置された画素データとにそれぞれ重み付けをして算出されることを特徴とする動きベクトル検出装置。
A reduced motion vector of a reduced composite block obtained by reducing a composite block including a plurality of encoded blocks provided in an encoded frame based on pixel data arranged in a reduced reference area obtained by reducing a reference area provided in a reference frame. A reduced motion vector detecting means for detecting
Based on the reduced motion vector detected by the reduced motion vector detection means, comprising a motion vector detection means for respectively detecting a motion vector of each encoded block included in the composite block,
The reduced motion vector detecting unit is configured to calculate a reduced motion vector based on an evaluation value obtained by adding a difference value between pixel data arranged in the reduced composite block and pixel data arranged in a reduced composite reference block provided in the reduced reference area. To detect the reduced motion vector,
The difference value is calculated by weighting pixel data arranged in a predetermined area in the reduced composite block and pixel data arranged in an area corresponding to the predetermined area in the reduced composite reference block. A motion vector detecting device, characterized in that:
前記縮小複合ブロックには、前記評価値を算出するための画素データに重み付けをする重み付け領域と、前記評価値を算出するための画素データに重み付けをしない非重み付け領域とが設けられており、
前記重み付け領域は、前記縮小複合ブロックの中央に配置されており、
前記非重み付け領域は、前記重み付け領域を囲むように前記縮小複合ブロックの周縁に配置されている、請求項1記載の動きベクトル検出装置。
The reduced composite block is provided with a weighted area that weights the pixel data for calculating the evaluation value, and a non-weighted area that does not weight the pixel data for calculating the evaluation value,
The weighting area is located at the center of the reduced composite block,
The motion vector detection device according to claim 1, wherein the non-weighted area is arranged on a periphery of the reduced composite block so as to surround the weighted area.
前記複合ブロックは、4行×4行の符号化ブロックによって構成されており、
前記縮小複合ブロックに設けられた前記重み付け領域は、前記複合ブロックの中央に配置された2行×2列の符号化ブロックに対応する位置に配置されており、
前記非重み付け領域は、前記複合ブロックの周縁に配置された符号化ブロックに対応する位置に配置されている、請求項2記載の動きベクトル検出装置。
The composite block is configured by a 4 row × 4 row coding block,
The weighting area provided in the reduced composite block is disposed at a position corresponding to a 2 row × 2 column coded block disposed at the center of the composite block,
The motion vector detection device according to claim 2, wherein the non-weighted area is arranged at a position corresponding to an encoded block arranged on a periphery of the composite block.
前記複合ブロックは、マトリックス状に配置された複数の符号化ブロックによって構成されている、請求項1記載の動きベクトル検出装置。The motion vector detection device according to claim 1, wherein the composite block includes a plurality of encoded blocks arranged in a matrix. 前記動きベクトル検出手段は、前記縮小動きベクトル検出手段によって検出された前記縮小動きベクトルに応じて各符号化ブロックごとに前記参照領域にそれぞれ設けられる探索領域に配置された画素データに基づいて各符号化ブロックの動きベクトルをそれぞれ検出し、
前記非重み付け領域に対応する符号化ブロックの動きベクトルを検出するための探索領域は、前記重み付け領域に対応する符号化ブロックの動きベクトルを検出するための探索領域よりも広くなっている、請求項2記載の動きベクトル検出装置。
The motion vector detection unit is configured to generate each code based on pixel data arranged in a search area provided in the reference area for each coding block according to the reduced motion vector detected by the reduced motion vector detection means. The motion vectors of the transformed blocks,
The search area for detecting the motion vector of the coded block corresponding to the non-weighted area is wider than the search area for detecting the motion vector of the coded block corresponding to the weighted area. 3. The motion vector detection device according to 2.
前記縮小動きベクトル検出手段は、前記評価値が最小となる前記縮小複合参照ブロックに基づいて前記縮小動きベクトルを検出する、請求項1記載の動きベクトル検出装置。The motion vector detecting device according to claim 1, wherein the reduced motion vector detecting unit detects the reduced motion vector based on the reduced composite reference block having the smallest evaluation value. 参照フレームに設けられた参照領域を縮小した縮小参照領域に配置された画素データに基づいて、符号化フレームに設けられた複数の符号化ブロックを含む複合ブロックを縮小した縮小複合ブロックの動きベクトルを表す縮小メイン動きベクトルと、前記符号化フレームにそれぞれ設けられた各符号化ブロックと対応するように前記縮小複合ブロックにそれぞれ配置された縮小サブブロックの動きベクトルを表す縮小サブ動きベクトルとをそれぞれ検出する縮小動きベクトル検出手段と、
前記縮小動きベクトル検出手段によってそれぞれ検出された前記縮小メイン動きベクトルと前記縮小サブ動きベクトルとに基づいて、前記複合ブロックに含まれる各符号化ブロックの動きベクトルをそれぞれ検出する動きベクトル検出手段とを具備することを特徴とする動きベクトル検出装置。
Based on the pixel data arranged in the reduced reference area obtained by reducing the reference area provided in the reference frame, the motion vector of the reduced composite block obtained by reducing the composite block including the plurality of encoded blocks provided in the encoded frame is calculated. A reduced main motion vector representing the reduced main motion vector, and a reduced sub motion vector representing a motion vector of a reduced sub block arranged in the reduced composite block so as to correspond to each encoded block provided in the encoded frame. A reduced motion vector detecting means,
A motion vector detecting unit that detects a motion vector of each of the encoded blocks included in the composite block based on the reduced main motion vector and the reduced sub motion vector respectively detected by the reduced motion vector detecting unit. A motion vector detecting device, comprising:
前記動きベクトル検出手段は、各縮小サブ動きベクトルと前記縮小メイン動きベクトルとの間の差に応じて、各縮小サブ動きベクトルに対応する符号化ブロックの動きベクトルを検出する、請求項7記載の動きベクトル検出装置。8. The motion vector detecting unit according to claim 7, wherein the motion vector detecting unit detects a motion vector of an encoded block corresponding to each reduced sub motion vector according to a difference between each reduced sub motion vector and the reduced main motion vector. Motion vector detection device. 前記動きベクトル検出手段は、前記縮小サブ動きベクトルと前記縮小メイン動きベクトルとの間の前記差が所定の値よりも大きいときは、前記縮小サブ動きベクトルに基づいて、前記縮小サブ動きベクトルに対応する符号化ブロックの動きベクトルを検出し、
前記縮小サブ動きベクトルと前記縮小メイン動きベクトルとの間の前記差が所定の値以下であるときは、前記縮小メイン動きベクトルに基づいて、前記縮小サブ動きベクトルに対応する符号化ブロックの動きベクトルを検出する、請求項8記載の動きベクトル検出装置。
When the difference between the reduced sub-motion vector and the reduced main motion vector is greater than a predetermined value, the motion vector detecting unit may correspond to the reduced sub-motion vector based on the reduced sub-motion vector. The motion vector of the coded block to be
When the difference between the reduced sub-motion vector and the reduced main motion vector is equal to or less than a predetermined value, the motion vector of the encoded block corresponding to the reduced sub-motion vector is determined based on the reduced main motion vector. The motion vector detecting device according to claim 8, wherein the motion vector detecting device detects
参照フレームに設けられた参照領域を縮小した縮小参照領域に配置された画素データに基づいて、符号化フレームに設けられた複数の符号化ブロックを含む複合ブロックを縮小した縮小複合ブロックの縮小動きベクトルを検出する縮小動きベクトル検出工程と、
前記縮小動きベクトル検出工程によって検出された前記縮小動きベクトルに基づいて、前記複合ブロックに含まれる各符号化ブロックの動きベクトルをそれぞれ検出する動きベクトル検出工程とを包含しており、
前記縮小動きベクトル検出工程は、前記縮小複合ブロックに配置された画素データと前記縮小参照領域に設けられた縮小複合参照ブロックに配置された画素データとの間の差分値を加算した評価値に基づいて前記縮小動きベクトルを検出し、
前記差分値は、前記縮小複合ブロックにおける所定の領域に配置された画素データと前記縮小複合参照ブロックにおいて前記所定の領域に対応する領域に配置された画素データとにそれぞれ重み付けをして算出されることを特徴とする動きベクトル検出方法。
A reduced motion vector of a reduced composite block obtained by reducing a composite block including a plurality of encoded blocks provided in an encoded frame based on pixel data arranged in a reduced reference area obtained by reducing a reference area provided in a reference frame. A reduced motion vector detecting step of detecting
A motion vector detecting step of detecting a motion vector of each of the encoded blocks included in the composite block based on the reduced motion vector detected by the reduced motion vector detecting step.
The reduced motion vector detection step is based on an evaluation value obtained by adding a difference value between pixel data arranged in the reduced composite block and pixel data arranged in the reduced composite reference block provided in the reduced reference area. To detect the reduced motion vector,
The difference value is calculated by weighting pixel data arranged in a predetermined area in the reduced composite block and pixel data arranged in an area corresponding to the predetermined area in the reduced composite reference block. A motion vector detecting method, characterized in that:
参照フレームに設けられた参照領域を縮小した縮小参照領域に配置された画素データに基づいて、符号化フレームに設けられた複数の符号化ブロックを含む複合ブロックを縮小した縮小複合ブロックの動きベクトルを表す縮小メイン動きベクトルと、前記符号化フレームにそれぞれ設けられた各符号化ブロックと対応するように前記縮小複合ブロックにそれぞれ配置された縮小サブブロックの動きベクトルを表す縮小サブ動きベクトルとをそれぞれ検出する縮小動きベクトル検出工程と、
前記縮小動きベクトル検出工程によってそれぞれ検出された前記縮小メイン動きベクトルと前記縮小サブ動きベクトルとに基づいて、前記複合ブロックに含まれる各符号化ブロックの動きベクトルをそれぞれ検出する動きベクトル検出工程とを包含することを特徴とする動きベクトル検出方法。
Based on the pixel data arranged in the reduced reference area obtained by reducing the reference area provided in the reference frame, the motion vector of the reduced composite block obtained by reducing the composite block including the plurality of encoded blocks provided in the encoded frame is calculated. A reduced main motion vector representing the reduced main motion vector, and a reduced sub motion vector representing a motion vector of a reduced sub block arranged in the reduced composite block so as to correspond to each encoded block provided in the encoded frame. A reduced motion vector detecting step
A motion vector detecting step of detecting a motion vector of each of the encoded blocks included in the composite block based on the reduced main motion vector and the reduced sub motion vector respectively detected by the reduced motion vector detecting step. A motion vector detection method comprising:
JP2002342846A 2002-11-26 2002-11-26 Device and method for motion vector detection Withdrawn JP2004179906A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002342846A JP2004179906A (en) 2002-11-26 2002-11-26 Device and method for motion vector detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002342846A JP2004179906A (en) 2002-11-26 2002-11-26 Device and method for motion vector detection

Publications (1)

Publication Number Publication Date
JP2004179906A true JP2004179906A (en) 2004-06-24

Family

ID=32704785

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002342846A Withdrawn JP2004179906A (en) 2002-11-26 2002-11-26 Device and method for motion vector detection

Country Status (1)

Country Link
JP (1) JP2004179906A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011082703A (en) * 2009-10-05 2011-04-21 Nippon Hoso Kyokai <Nhk> Predictive vector correcting device and program
JP2012065176A (en) * 2010-09-16 2012-03-29 Fujitsu Ltd Moving image encoder
JP2014093602A (en) * 2012-11-01 2014-05-19 Toshiba Corp Image processing device, image processing method, image processing program, and stereoscopic image display device
JP2016063358A (en) * 2014-09-17 2016-04-25 株式会社ソシオネクスト Encoding circuit and encoding method
JP7049499B1 (en) 2021-03-04 2022-04-06 株式会社Cygames Content video playback program, content video playback device, content video playback method, content video data generation program, and content video data generation device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011082703A (en) * 2009-10-05 2011-04-21 Nippon Hoso Kyokai <Nhk> Predictive vector correcting device and program
JP2012065176A (en) * 2010-09-16 2012-03-29 Fujitsu Ltd Moving image encoder
JP2014093602A (en) * 2012-11-01 2014-05-19 Toshiba Corp Image processing device, image processing method, image processing program, and stereoscopic image display device
JP2016063358A (en) * 2014-09-17 2016-04-25 株式会社ソシオネクスト Encoding circuit and encoding method
US10104396B2 (en) 2014-09-17 2018-10-16 Socionext Inc. Encoder circuit and encoding method
JP7049499B1 (en) 2021-03-04 2022-04-06 株式会社Cygames Content video playback program, content video playback device, content video playback method, content video data generation program, and content video data generation device
WO2022186235A1 (en) * 2021-03-04 2022-09-09 株式会社Cygames Content video playback program, content video playback device, content video playback method, content video data generating program, and video data generating device
JP2022134845A (en) * 2021-03-04 2022-09-15 株式会社Cygames Content video playback program, content video playback device, content video playback method, content video data generation program, and content video data generation device

Similar Documents

Publication Publication Date Title
US7133453B2 (en) Motion vector detection apparatus for performing checker-pattern subsampling with respect to pixel arrays
JP4471039B2 (en) Moving vector detection device
US8649436B2 (en) Methods for efficient implementation of skip/direct modes in digital video compression algorithms
KR101217627B1 (en) Method and apparatus for estimating motion vector based on block
JP5471449B2 (en) Moving area detector
JP2004179906A (en) Device and method for motion vector detection
JP3175914B2 (en) Image encoding method and image encoding device
JP6390275B2 (en) Encoding circuit and encoding method
US9497482B2 (en) Methods for comparing a target block to a reference window for motion estimation during video encoding
JP2007110409A (en) Image processing device and program for making computer perform image processing method
US7627140B2 (en) Flatted hexagon search method for fast block motion estimation
JP2004229150A (en) Motion vector searching method and device
JP2005253015A (en) Apparatus and method for detecting motion vector, and program
CN115529459B (en) Center point searching method, center point searching device, computer equipment and storage medium
JP3968161B2 (en) Motion vector detection device and recording medium
JPH1013842A (en) Markov model image coder
JPH05176314A (en) Image movement detector
JP4205636B2 (en) Image predictive encoding method, image predictive decode method, image encoding device, image decoding device, image encoding program, image decoding program, and computer-readable recording medium recording these programs
JPH07288817A (en) Motion vector detector
JP2007151169A (en) Motion vector detection apparatus and recording medium
JPH0795585A (en) Moving vector detector
JP2937134B2 (en) Motion vector search method
JPH0993581A (en) Motion detector for moving image coder
CN115396671A (en) Optimal block vector matching method and device based on screen content coding
JP4144316B2 (en) Image data processing apparatus and method, recording medium, and program

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060207