JP2004200984A - Motion vector detecting apparatus - Google Patents

Motion vector detecting apparatus Download PDF

Info

Publication number
JP2004200984A
JP2004200984A JP2002366506A JP2002366506A JP2004200984A JP 2004200984 A JP2004200984 A JP 2004200984A JP 2002366506 A JP2002366506 A JP 2002366506A JP 2002366506 A JP2002366506 A JP 2002366506A JP 2004200984 A JP2004200984 A JP 2004200984A
Authority
JP
Japan
Prior art keywords
pixels
template
evaluation value
pixel
motion vector
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.)
Pending
Application number
JP2002366506A
Other languages
Japanese (ja)
Inventor
Toshihiro Minami
俊宏 南
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2002366506A priority Critical patent/JP2004200984A/en
Publication of JP2004200984A publication Critical patent/JP2004200984A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a motion vector detecting apparatus for detecting a motion vector corresponding to templates having a variety of sizes with relatively small amount of hardware and at a low cost. <P>SOLUTION: The apparatus evaluates a difference of values among pixels at positions corresponding to one another between a pixel block to be coded corresponding to one template included in a template group with a variety of sizes and a pixel block with the same size as the template included a pixel block cut out from a retrieval area, and detects the position of the pixel block having a minimum evaluation value as the motion vector for all templates included in the template groups. The apparatus has an evaluation value calculating circuit 102 corresponding to each of a plurality of minimum size templates included in the template groups, and a prescribed number of adder circuit 103 for calculating the evaluation values of all templates having bigger sizes than the minimum size templates by adding outputs from the calculating circuit 102. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は,動画像符号化処理において,画像間における動きを検出するために用いられる動きベクトル検出装置に関するものであり,特に,16画素×16ラインや8画素×8ライン等,複数種類の大きさの画素ブロックの動きを検出する動きベクトル検出装置に関するものである。
【0002】
【従来の技術】
動画像には,時間的に連続した複数の画像が存在する。動きベクトル検出装置とは,動画像において,ある画像中の画素ブロックが他の画像中のどの位置から動いてきたかを検出する装置である。
【0003】
図16は,動き検出の対象となる画素ブロック(以下,テンプレートと呼ぶ)1と探索領域2の例を示す。ここで,テンプレート1は,ある画像中の画素ブロック,探索領域2は,他の画像中の画素ブロックである。テンプレート1と探索領域2の両方とも任意の大きさの矩形領域が考えられるが,以下では,テンプレート1が4画素×4ライン,探索領域2は11画素×11ラインの場合について説明する。この場合,探索領域2の中心の4画素×4ラインの領域を動きベクトル(0,0)と設定すると,探索範囲は,水平方向,垂直方向とも−3〜+4となる。a0,0 〜a3,3 はテンプレート1中の画素を表し,x0,0 〜xa,a (添え字は16進数で表す)は探索領域2中の画素を表す。なお,本明細書では,水平方向の画素数の単位を画素,垂直方向の画素数の単位をラインと呼ぶ。
【0004】
図17は,全探索法による動き検出の方法を説明するための図である。探索領域2から取り得る全ての4画素×4ラインの領域を切り出し,その4画素×4ラインの領域中の画素とテンプレート1中の対応する位置にある画素との値の違いを差分絶対値の総和または差分自乗値の総和等で評価する。1画素または1ラインずれた4画素×4ラインの領域全部,すなわち8×8=64個の領域についてこの総和を計算し,この総和が最も小さい領域からテンプレート1が動いてきたものとする。
【0005】
なお,評価式として何を用いるかは本発明の本質ではないので,以下では,差分絶対値の総和を用いる場合について説明する。また,本発明による動きベクトル検出装置は,同期式回路で実現される場合が多いが,同期式回路は通常クロック(以下,CKと記す)に同期して動作する。そこで,以下では動作の単位をCKと呼ぶ。
【0006】
図18は,第1の従来例の動きベクトル検出装置における差分絶対値和計算回路(例えば,特許文献1の段落[0006]〜[0008]および図6,または非特許文献1の916ページ,917ページおよび図7参照)の構成を示す図である。符号3で示すPi,j (i=0〜3,j=0〜3)は,テンプレート1と探索領域2の対応する画素の間で差分絶対値を計算する回路であり,テンプレート1中の画素と1対1に対応しており,そのテンプレート1中の画素ai,j を保持し,各行ごとに放送(供給)される探索領域2中の画素をCKごとに取り込み,差分絶対値を計算する。4はレジスタ,5は加算器,6は総和回路である。
【0007】
図19は,図18の差分絶対値和計算回路において,探索領域2の左上の角から切り出された4画素×4ラインの領域とテンプレート1中の画素間で差分絶対値和S0,0 を計算するときのタイミングを表した図である。図示したように,0CK目,1CK目,2CK目,3CK目に,それぞれ1列目,2列目,3列目,4列目の差分絶対値和が計算され,4CK目に各行の部分和Si の総和が計算され,5CKで1行目から4行目までの各行の部分和Si の和S0,0 が出力される。
【0008】
図20は,第2の従来例の動きベクトル検出装置における差分絶対値和計算回路(例えば,特許文献1の段落[0010]〜[0012]および図9,または非特許文献1の919ページ,920ページおよび図14参照)の構成を示す図である。Pi,j 3,レジスタ4,加算器5の機能は,上述した第1の従来例と同一である。
【0009】
図21は,図20の差分絶対値和計算回路において,探索領域2の左上の角から切り出された4画素×4ラインの領域とテンプレート1中の画素間で差分絶対値和S0,0 を計算するときのタイミングを表した図である。図中のS0:j は1行目から(j+1)行目までの各行の部分和Si の和を意味する。上記図20に示した差分絶対値和計算回路では,探索領域2中の画素の入力を各行ごとに1CKずつ遅らせることにより,各行の部分和Si が出力されるタイミングを各行ごとに1CKずつ遅らせ,CKごとに各行の部分和Si を加算する。
【0010】
図22は,第3の従来例の動きベクトル検出装置における差分絶対値和計算回路(例えば,特許文献1の段落[0019]〜[0021]および図1,または非特許文献1の920ページ,921ページおよび図15参照)の構成を示す図である。Pi,j 3,レジスタ4,加算器5の機能は,上述した第1,第2の従来例と同一である。個々のPi,j 3の出力は,加算器5によって前段の加算器5から送られてくる計算結果と加算され,次段の加算器5に送られる。この次段への送りは,レジスタ4を介してCKごとに行なわれる。
【0011】
図23は,図22の差分絶対値和計算回路において,探索領域2の左上の角から切り出された4画素×4ラインの領域とテンプレート1中の画素間で差分絶対値和S0,0 を計算するときのタイミングを説明するための図である。本従来例の差分絶対値和計算回路では,探索領域2中の画素の入力を各行ごとに4CKずつ遅らせることにより,各行の部分和Si が得られるタイミングを行ごとに4CKずつ遅らせる。この場合,各行の部分和Si が得られる次のCKで,その一つ下の行の計算が始まることになる。したがって,本従来例では,各行の部分和Si を次の行の先頭の差分絶対値と加算することができるので,行間を連続させた1次元アレイ構造とすることができる。
【0012】
ここで,上述した第1〜第3の従来例の差分絶対値和計算回路では,計算対象である探索領域2から切り出された4画素×4ラインの領域が探索領域の右端から左端に移るとき無効サイクルが生じる。図24は,無効サイクルが生じる場合の探索領域2からの画素読み出し例を示す。探索領域2の左上の角から切り出された4画素×4ラインの領域とテンプレート1中の画素間の差分絶対値和をS0,0 ,右横に1画素ずれた領域とテンプレート1中の画素間の差分絶対値和をS0,1 ,以下順次S0,2 ,S0,3 とし,探索領域2の左上の角の4画素×4ラインの領域から1ライン下にずれた領域とテンプレート1中の画素間の差分絶対値和をS1,0 とすると,差分絶対値和S0,0 からS0,7 までは連続して計算される。しかし,S0,7 の計算に必要な画素x0,a ,x1,a ,x2,a ,x3,a の供給が終わらなければ,S1,0 の計算に使われるx1,0 ,x2,0 ,x3,0 ,x4,0 は供給できない。そのため,S1,0 の計算を開始するまでに3(テンプレートの横方向の画素数−1)CK無効サイクルが生じる。なお,探索領域から切り出された4画素×4ラインの領域が探索領域の下端から上端に移るときには,同様の理由で15CKの無効サイクルが生じる。
【0013】
図25は,第4の従来例の動きベクトル検出装置における差分絶対値和計算回路(例えば,非特許文献1の922ページおよび図16参照)の構成を示す図である。外部から入力される2画素からいずれか1画素を選択するためのセレクタ7が付加された以外は,第3の従来例と同一の構成である。本従来例においては,x0,8 ,x1,8 ,x2,8 ,x3,8 等の探索領域右端の画素と同時にx1,0 ,x2,0 ,x3,0 ,x4,0 等の探索領域左端の画素が供給され,セレクタ7により選択される。このため,S0,7 に続いて連続してS1,0 の計算を開始でき,上記無効サイクルを削除できる。
【0014】
図26は,第5の従来例の動きベクトル検出装置における差分絶対値和計算回路(例えば,特許文献2の段落[0041]〜[0043]および図2〜図4,または非特許文献1の922ページおよび図17参照)の構成を示す図である。また,図27は,本従来例における探索領域からの画素読み出し例を示す図である。Pi,j 3,レジスタ4,加算器5,セレクタ7の機能は,上述した第1〜第4の従来例と同一である。ここで,後述する実施例での説明の都合上,セレクタ7を除き,Pi,j 3,レジスタ4および加算器5からなる部分を演算器と呼び,該演算器で構成される評価値計算回路をPEアレイ8と呼ぶ。
【0015】
本従来例では,探索する水平方向の動きベクトル数をテンプレートの水平方向の画素数と一致させる。この構成において,x0,4 ,x1,4 ,x2,4 ,x3,4 等の探索領域右端の画素と同時にx1,0 ,x2,0 ,x3,0 ,x4,0 等の探索領域左端の画素を供給することにより無効サイクルを削除でき,さらに同一の列に属するPi,j (i=0〜3)に供給する探索領域中の画素が同一となるという効果が得られる。
【0016】
図28は,本従来例において図16に示した探索領域2中の動きベクトルを検出する場合の例を示す。水平方向の動きベクトルを−3〜0と1〜4の2回に分けて探索することにより探索領域2中の動きベクトルを全て検出できる。
【0017】
【特許文献1】
特許第3127980号公報
【特許文献2】
特許第2838817号公報
【非特許文献1】
南俊宏,近藤利夫,村主一仁,笠井良太,“1次元シストリックアレー型全探索動きベクトル検出器の提案”,信学論(D−I),vol.J78−D−I,no.12,pp.913−925,Dec.1995.
【0018】
【発明が解決しようとする課題】
ところが,最近の動画像符号化の国際標準規格では,テンプレートとして複数の大きさの画素ブロックを用いるものがある。例えば,H.263では,テンプレートとして16画素×16ラインと8画素×8ラインの2種類の画素ブロックを用いる。また,H.26Lでは,4画素×4ライン,4画素×8ライン,8画素×4ライン,8画素×8ライン,8画素×16ライン,16画素×8ラインおよび16画素×16ラインの7種類の画素ブロックを用いる。これら各大きさのテンプレートごとに動きベクトル検出装置を別々に設けると,ハード量およびコストが増大するという問題がある。
【0019】
本発明は上述した点に鑑みてなされたもので,その目的は,複数の大きさのテンプレートに対応した動きベクトルを検出できる動きベクトル検出装置を,最小のテンプレートの動きベクトルを検出する動きベクトル検出装置と同程度のハード量およびコストで提供することである。
【0020】
【課題を解決するための手段】
このために本発明における動きベクトル検出装置は,動画像符号化の対象である動画像から選択した第1の画像中の所定の大きさの画素ブロックを分割して得られるテンプレート群に含まれる一つのテンプレートと,前記動画像符号化の対象である動画像から選択した第2の画像中における探索領域内から切り出した画素ブロック群に含まれる前記一つのテンプレートと同じ大きさの画素ブロックとの間で,対応する位置にある画素間の値の違いを評価し,評価値が最小となる画素ブロックの位置を動きベクトルとして検出することを,前記テンプレート群に含まれる全てのテンプレートについて行う動きベクトル検出装置において,前記テンプレート群に含まれる複数の最小のテンプレートの各々に対応した評価値計算回路と,前記評価値計算回路の出力を加算して,前記最小のテンプレートより大きな全てのテンプレートの評価値を計算する所定の数の加算回路とを含むことを特徴とする。
【0021】
さらに,本発明における動きベクトル検出装置は,前記評価値計算回路において,水平方向について,水平方向がa画素,垂直方向がbラインであるテンプレートの画素数と同じa個の画素ブロックの評価を行うことを繰り返すことにより,探索範囲に含まれる水平方向がa画素,垂直方向がbラインである全ての画素ブロックの評価を行うか,または前記評価値計算回路において,垂直方向について,水平方向がa画素,垂直方向がbラインであるテンプレートのライン数と同じb個の画素ブロックの評価を行うことを繰り返すことにより,探索範囲に含まれる水平方向がa画素,垂直方向がbラインである全ての画素ブロックの評価を行うことを特徴とする。
【0022】
図1は,本発明の構成例を説明するためのブロック図である。図1において,参照画像メモリ100は,動画像符号化の際に参照される画像データが格納されているメモリである。探索領域読み出し回路101は,参照画像メモリ100に格納された動画像の探索領域内から画素ブロック群を読み出し,各評価値計算回路102に供給する回路である。
【0023】
各評価値計算回路102は,複数の大きさのテンプレート群に含まれる最小のテンプレートの大きさに対応する動画像符号化の対象の画素ブロックと,探索領域読み出し回路101から供給される探索領域内から切り出した画素ブロック群に含まれる最小のテンプレートと同じ大きさの画素ブロックとの間で,対応する位置にある画素間の値の違いを評価する回路である。
【0024】
例えば水平方向がa画素,垂直方向がbラインであるテンプレートから,水平方向が(m×a)画素,垂直方向が(n×b)ラインの大きさのテンプレートまでの複数種類の大きさのテンプレートによる動きベクトルの検出を行う場合,それぞれの評価値計算回路102は,水平方向がa画素,垂直方向がbラインの大きさの動画像符号化の対象である画素ブロックと,参照画像中の探索領域内から切り出した同じ大きさの画素ブロックとの間で,対応する位置にある画素間の値の違いを評価する回路であり,m×n個(m,nは整数で,m×n≧2)設けられる。
【0025】
加算回路103は,評価値計算回路102の出力を加算して,最小のテンプレートより大きな全てのテンプレートの評価値を計算する回路である。
【0026】
m×n個の個々の評価値計算回路102としては,従来例として説明した図18,図20,図22,図25または図26の差分絶対値和計算回路と同様な構成の回路を用いることができる。
【0027】
本発明は以上のように構成されるので,複数の大きさのテンプレートに対応した動きベクトルを検出できる動きベクトル検出装置を,最小のテンプレートの動きベクトルを検出する動きベクトル検出装置と同程度のハード量およびコストで実現することができる。
【0028】
【発明の実施の形態】
本実施形態では,テンプレートの大きさが4画素×4ライン,4画素×8ライン,8画素×4ライン,8画素×8ラインの4種類の場合について説明する。
【0029】
図2は,隣接した4画素×4ラインのテンプレート4個と探索領域の対応を示す。8画素×8ラインのテンプレートは,4画素×4ラインのテンプレート10,11,12および13の4個に分割される。図2中の左上,右上,左下,右下のテンプレート10,11,12,13の探索領域は,それぞれ20,21,22,23である。
【0030】
ここで,探索領域20の左上の角から切り出された4画素×4ラインの領域とテンプレート10中の画素間の差分絶対値和をS0,0 (4×4左上),右横に1画素ずれた領域とテンプレート10中の画素間の差分絶対値和をS0,1 (4×4左上),以下順次S0,2 (4×4左上),S0,3 (4×4左上)とし,探索領域20の左上の角の4画素×4ラインの領域から1ライン下にずれた領域とテンプレート10中の画素間の差分絶対値和をS1,0 (4×4左上)とする。
【0031】
同様に,探索領域21,22,23の左上の角からそれぞれ切り出された4画素×4ラインの領域とテンプレート11,12,13中の画素間の差分絶対値和を,それぞれS0,0 (4×4右上),S0,0 (4×4左下),S0,0 (4×4右下)とする。このとき,S0,4 (4×4左上)とS0,0 (4×4右上)を計算するための探索領域中の画素は一致する。同様に,S4,0 (4×4左上)とS0,0 (4×4左下)を計算するための探索領域中の画素も一致する。また,S4,4 (4×4左上),S0,4 (4×4左下),S4,0 (4×4右上)およびS0,0 (4×4右下)を計算するための探索領域中の画素は一致する。
【0032】
図3は,テンプレートの大きさが8画素×4ラインのときのテンプレートと探索領域の対応を示す。8画素×8ラインのテンプレートは,8画素×4ラインのテンプレート14と15の2個に分割される。上,下のテンプレート14と15の探索領域はそれぞれ24と25である。探索領域24の左上の角から切り出された8画素×4ラインの領域とテンプレート14中の画素間の差分絶対値和をS0,0 (8×4上),右横に1画素ずれた領域とテンプレート14中の画素間の差分絶対値和をS0,1 (8×4上),以下順次S0,2 (8×4上),S0,3 (8×4上)とし,探索領域24の左上の角の8画素×4ラインの領域から1ライン下にずれた領域とテンプレート14中の画素間の差分絶対値和をS1,0 (8×4上)とする。同様に,探索領域25の左上の角から切り出された8画素×4ラインの領域とテンプレート15中の画素間の差分絶対値和をS0,0 (8×4下)とする。
【0033】
図2と図3とを比較すると分かるように,S0,0 (8×4上)は,上記S0,0 (4×4左上)およびS0,0 (4×4右上)との間に以下の関係がある。
【0034】
0,0 (8×4上)=S0,0 (4×4左上)+S0,0 (4×4右上)
同様に,S0,0 (8×4下)は,上記S0,0 (4×4左下)およびS0,0 (4×4右下)との間に以下の関係がある。
【0035】
0,0 (8×4下)=S0,0 (4×4左下)+S0,0 (4×4右下)
一般化すると,次式の関係がある。
【0036】
i,j (8×4上)=Si,j (4×4左上)+Si,j (4×4右上)……(1)
i,j (8×4下)=Si,j (4×4左下)+Si,j (4×4右下)……(2)
図4は,テンプレートの大きさが4画素×8ラインのときのテンプレートと探索領域の対応を示す。8画素×8ラインの画素ブロックは,4画素×8ラインのテンプレート16と17の2個に分割される。左と右のテンプレート16と17の探索領域は,それぞれ26と27である。探索領域26の左上の角から切り出された4画素×8ラインの領域とテンプレート16中の画素間の差分絶対値和をS0,0 (4×8左),右横に1画素ずれた領域とテンプレート16中の画素間の差分絶対値和をS0,1 (4×8左),以下順次S0,2 (4×8左),S0,3 (4×8左)とし,探索領域26の左上の角の4画素×8ラインの領域から1ライン下にずれた領域とテンプレート16中の画素間の差分絶対値和をS1,0 (4×8左)とする。同様に,探索領域27の左上の角から切り出された4画素×8ラインの領域とテンプレート17中の画素間の差分絶対値和をS0,0 (4×8右)とする。
【0037】
図2と図4とを比較すると分かるように,S0,0 (4×8左)は,上記S0,0 (4×4左上)およびS0,0 (4×4左下)との間に以下の関係がある。
【0038】
0,0 (4×8左)=S0,0 (4×4左上)+S0,0 (4×4左下)
同様に,S0,0 (4×8右)は,上記S0,0 (4×4右上)およびS0,0 (4×4右下)との間に以下の関係がある。
【0039】
0,0 (4×8右)=S0,0 (4×4右上)+S0,0 (4×4右下)
一般化すると,次式の関係がある。
【0040】
i,j (4×8左)=Si,j (4×4左上)+Si,j (4×4左下)……(3)
i,j (4×8右)=Si,j (4×4右上)+Si,j (4×4右下)……(4)
図5は,テンプレートの大きさが8画素×8ラインのときのテンプレート18と探索領域28の対応を示す。探索領域28の左上の角から切り出された8画素×8ラインの領域とテンプレート18中の画素間の差分絶対値和をS0,0 (8×8),右横に1画素ずれた領域とテンプレート18中の画素間の差分絶対値和をS0,1 (8×8),以下順次S0,2 (8×8),S0,3 (8×8)とし,探索領域28の左上の角の8画素×8ラインの領域から1ライン下にずれた領域とテンプレート18中の画素間の差分絶対値和をS1,0 (8×8)とする。
【0041】
図2〜図5を比較すると分かるように,S0,0 (8×8)は,上記S0,0 (4×4左上),S0,0 (4×4右上),S0,0 (4×4左下),S0,0 (4×4右下),S0,0 (8×4上),S0,0 (8×4下),S0,0 (4×8左)およびS0,0 (4×8右)との間に以下の関係がある。
【0042】
0,0 (8×8)=S0,0 (4×4左上)+S0,0 (4×4右上)+S0,0 (4×4左下)+S0。0 (4×4右下)
=S0,0 (8×4上)+S0,0 (8×4下)
=S0,0 (4×8左)+S0,0 (4×8右)
一般化すると,次式の関係がある。
【0043】
i,j (8×8)=Si,j (4×4左上)+Si,j (4×4右上)
+Si,j (4×4左下)+Si,j (4×4右下)
=Si,j (8×4上)+Si,j (8×4下)
=Si,j (4×8左)+Si,j (4×8右)……(5)
上記(1)式〜(5)式より,4画素×4ラインのテンプレート10〜13についての差分絶対値和を計算し,それらを加算することにより,8画素×4ライン,4画素×8ラインおよび8画素×8ラインのテンプレート14,15,16,17および18についての差分絶対値和を算出できることが分かる。本発明では,4画素×4ラインの4個のテンプレート10〜13に,PEアレイを個別に割り当てて差分絶対値和を計算し,その結果から他の大きさのテンプレートの差分絶対値和を算出する。
【0044】
図6は,本発明の第1の実施形態の動きベクトル検出装置における差分絶対値和計算回路の構成を示す。図7は,図6に示す差分絶対値和計算回路へ入力する画素のタイミングを表した図である。PEアレイi,j 8の構成を図8に示す。
【0045】
第1の実施形態のPEアレイi,j 8は,第5の従来例におけるPEアレイ8と同一構造であり,第5の従来例と同様に水平方向の動きベクトルを−3〜0と1〜4の2回に分けて探索する。この点は後述する第2および第3の実施形態も同様であるが,第1の実施形態では,PEアレイ0,0 ,PEアレイ1,0 ,PEアレイ0,1 ,PEアレイ1,1 に対し,図7に示すように,探索領域中の画素を別々に供給する点が第2および第3の実施形態と異なる。
【0046】
この構成により,4個のPEアレイi,j 8を並列に動作させ,PEアレイ0,0 でSi,j (4×4左上),PEアレイ1,0 でSi,j (4×4左下),PEアレイ0,1 でSi,j (4×4右上),PEアレイ1,1 でSi,j (4×4右下)を同時に計算し,これらを加算器5で加算することにより,Si,j (8×4上),Si,j (8×4下),Si,j (4×8左),Si,j (4×8右),Si,j (8×8)を計算する。
【0047】
図9は,本発明の第2の実施形態の動きベクトル検出装置における差分絶対値和計算回路の構成を示す。図10は,図9に示す差分絶対値和計算回路へ入力する画素のタイミングを表した図である。遅延回路A30は,入力した画素を16CK遅延させて出力する回路である。
【0048】
図2で説明したように,左上のテンプレート10の探索領域20を下方に4ラインずらすと左下のテンプレート12の探索領域22となるため,S4,0 (4×4左上)を計算するための探索領域中の画素とS0,0 (4×4左下)を計算するための探索領域中の画素は一致する。一般化すると,Si,j (4×4左上)を計算するための探索領域中の画素とSi-4,j (4×4左下)を計算するための探索領域中の画素は一致する。
【0049】
本実施形態では,この点に着目し,PEアレイ0,0 とPEアレイ1,0 に同一の探索領域中の画素を入力して,Si,j (4×4左上)とSi-4,j (4×4左下)を同時に計算する。ただし,iは0以上11以下の整数であり,i<4のとき,Si-4,j (4×4左下)は計算されず,また,i>7のとき,Si,j (4×4左上)は計算されないものとする。なお,jは0以上7以下の整数である。
【0050】
本実施形態において,Si,j (4×4左下)は,Si,j (4×4左上)がPEアレイ0,0 から出力された後,16CK遅れてPEアレイ1,0 から出力される。このため,遅延回路A30によりSi,j (4×4左上)を16CK遅延させて,加算器5によりSi,j (4×4左下)と加算することにより,Si,j (4×8左)を算出できる。
【0051】
同様に,PEアレイ0,1 とPEアレイ1,1 にも同一の探索領域中の画素を入力して,Si,j (4×4右上)とSi-4,j (4×4右下)を同時に計算する。ただし,iは0以上11以下の整数であり,i<4のとき,Si-4,j (4×4右下)は計算されず,また,i>7のとき,Si,j (4×4右上)は計算されないものとする。なお,jは0以上7以下の整数である。本実施形態においては,Si,j (4×4右上)がPEアレイ0,1 から出力された後,16CK遅れてSi,j (4×4右下)がPEアレイ1,1 から出力される。このため,遅延回路A30によりSi,j (4×4右上)を16CK遅延させて,Si,j (4×4右下)と加算することにより,Si,j (4×8右)を算出できる。
【0052】
図11は,本発明の第3の実施形態の動きベクトル検出装置における差分絶対値和計算回路の構成を示す。図12は,図11に示す差分絶対値和計算回路へ入力する画素のタイミングを表した図である。遅延回路A30,遅延回路B31および遅延回路C32は,それぞれ入力した画素を16CK,48CKおよび64CK遅延させて出力する回路である。
【0053】
図2で説明したように,S4,4 (4×4左上),S0,4 (4×4左下),S4,0 (4×4右上)およびS0,0 (4×4右下)を計算するための探索領域中の画素は一致する。すなわち,Si,j (4×4左上),Si-4,j (4×4左下),Si,j-4 (4×4右上)およびSi-4,j-4 (4×4右下)を計算するための探索領域中の画素は一致する。ただし,iは0以上11以下の整数であり,i<4のとき,Si-4,j (4×4左下)とSi-4,j-4 (4×4右下)は計算されず,i>7のとき,Si,j (4×4左上)とSi,j-4 (4×4右上)は計算されないものとする。同様に,jは0以上11以下の整数であり,j<4のとき,Si,j-4 (4×4右上)とSi-4,j-4 (4×4右下)は計算されず,j>7のとき,Si,j (4×4左上)とSi-4,j (4×4左下)は計算されないものとする。
【0054】
図13は,各テンプレート10〜13の1回目と2回目の探索範囲を示す図である。図中の50はテンプレート10の1回目の探索範囲,51はテンプレート10の2回目の探索範囲とテンプレート11の1回目の探索範囲,52はテンプレート11の2回目の探索範囲,53はテンプレート12の1回目の探索範囲,54はテンプレート12の2回目の探索範囲とテンプレート13の1回目の探索範囲,55はテンプレート13の2回目の探索範囲を表している。
【0055】
本実施形態では,最初にPEアレイ0,0 とPEアレイ1,0 のみ動作させてテンプレート10の1回目の探索範囲とテンプレート12の1回目の探索範囲を探索し,次にPEアレイ0,0 ,PEアレイ1,0 ,PEアレイ0,1 およびPEアレイ1,1 を全て動作させてテンプレート10の2回目の探索範囲とテンプレート11の1回目の探索範囲,およびテンプレート12の2回目の探索範囲とテンプレート13の1回目の探索範囲を探索し,最後にPEアレイ0,1 とPEアレイ1,1 のみ動作させてテンプレート11の2回目の探索範囲とテンプレート13の2回目の探索範囲を探索する。
【0056】
この構成により,PEアレイ0,0 ,PEアレイ1,0 ,PEアレイ0,1 およびPEアレイ1,1 に同一の画素を入力して,Si,j (4×4左上),Si-4,j (4×4左下),Si,j-4 (4×4右上)およびSi-4,j-4 (4×4右下)を同時に計算することができる。
【0057】
ただし,Si,j (4×4左下)は,Si,j (4×4左上)がPEアレイ0,0 から出力された後,16CK遅れてPEアレイ1,0 から出力される。また,第1〜第3の従来例の動きベクトル検出装置同様,探索領域から切り出された4画素×4ラインの領域が探索領域の下端から上端に移るとき15CKの無効サイクルが生じるため,Si,j (4×4右上)とSi,j (4×4右下)は,Si,j (4×4左上)がPEアレイ0,0 から出力された後,それぞれ48CKと64CK遅れでPEアレイ0,1 とPEアレイ1,1 から出力される。
【0058】
そこで,本実施形態においては,遅延回路C32によりSi,j (4×4左上)を64CK遅延させ,遅延回路B31によりSi,j (4×4左下)を48CK遅延させ,遅延回路A30によりSi,j (4×4右上)を16CK遅延させた後,Si,j (4×4左上),Si,j (4×4左下),Si,j (4×4右上)およびSi,j (4×4右下)を加算することにより,Si,j (8×4上),Si,j (8×4下),Si,j (4×8左),Si,j (4×8右),Si,j (8×8)を算出する。
【0059】
上記第3の実施形態では,探索領域から切り出された4画素×4ラインの領域が探索領域の下端から上端に移るときの無効サイクルを無視すると,水平方向の探索範囲が−3〜+4の場合,PEアレイ0,0 ,PEアレイ1,0 ,PEアレイ0,1 およびPEアレイ1,1 が全て動作するのは全体のCK数の1/3である。しかし,探索範囲が広くなれば,PEアレイ0,0 ,PEアレイ1,0 ,PEアレイ0,1 およびPEアレイ1,1 が全て動作する割合は増加する。例えば,水平方向の探索範囲が−7〜+8の場合,全体のCK数の3/5,水平方向の探索範囲が−11〜+12の場合,全体のCK数の5/7だけ,PEアレイ0,0 ,PEアレイ1,0 ,PEアレイ0,1 およびPEアレイ1,1 が全て動作する。
【0060】
なお,上記第1〜第3の実施形態においては,テンプレートの大きさが4画素×4ライン,4画素×8ライン,8画素×4ライン,8画素×8ラインの4種類の場合についてのみ示したが,本発明は,いろいろな大きさのテンプレートの組み合わせに対して適用できる。例えば,本発明は,4画素×4ライン,4画素×8ライン,8画素×4ライン,8画素×8ライン,8画素×16ライン,16画素×8ラインおよび16画素×16ラインの大きさのテンプレートの組み合わせに対しても適用できる。
【0061】
図14は,これらのテンプレートの組み合わせに適用した場合における本発明の第2の実施形態の差分絶対値和計算回路の構成を示す図である。ここで,遅延回路A30,遅延回路D33および遅延回路B31は,それぞれ入力した画素を16CK,32CKおよび48CK遅延させて出力する回路である。ただし,図14では,最小のテンプレートの評価値であるPEアレイi,j の出力を加算して,より大きなテンプレートの評価値を算出するための加算器は,図示を省略している。
【0062】
また,図15は,4画素×4ライン,4画素×8ライン,8画素×4ライン,8画素×8ライン,8画素×16ライン,16画素×8ラインおよび16画素×16ラインの大きさのテンプレートの組み合わせに適用した場合における本発明の第3の実施形態の差分絶対値和計算回路の構成を示す図である。ここで,遅延回路A30,遅延回路D33および遅延回路B31は,それぞれ入力した画素を16CK,32CKおよび48CK遅延させて出力する回路であり,遅延回路E34,遅延回路F35,遅延回路G36および遅延回路H37は,それぞれ入力した画素を80CK,96CK,112CKおよび128CK遅延させて出力する回路である。同様に,遅延回路I38〜遅延回路P45は,入力した画素を160CK〜288CK遅延させて出力する回路である。ただし,図15でも,最小のテンプレートの評価値であるPEアレイi,j の出力を加算して,より大きなテンプレートの評価値を算出するための加算器は,図示を省略している。
【0063】
また,上記第1〜第3の実施形態においては,水平方向について最小のテンプレートの画素数と同じ個数の動きベクトルの評価を行うことを繰り返すことにより探索範囲内の全動きベクトルを検出する構成のみを示したが,垂直方向について最小のテンプレートのライン数と同じ個数の動きベクトルの評価を行うことを繰り返すことにより探索範囲内の全動きベクトルを検出する構成とすることもできる。
【0064】
さらに,第2および第3の実施形態で用いた遅延回路A〜Pはレジスタを直列に接続することにより実現しても良いし,ファースト・イン・ファースト・アウト・メモリによって実現しても良く,入力画素を所定のCKだけ遅延して出力するものであれば,実現手段は問わない。
【0065】
【発明の効果】
以上説明したように,本発明によれば,複数の大きさのテンプレートに対応した動きベクトルを検出できる動きベクトル検出装置を,最小のテンプレートの動きベクトルを検出する動きベクトル検出装置と同程度のハード量およびコストで実現することができる効果がある。
【図面の簡単な説明】
【図1】本発明の構成例を説明するためのブロック図である。
【図2】隣接した4画素×4ラインのテンプレート4個と探索領域の対応を示す図である。
【図3】テンプレートの大きさが8画素×4ラインのときのテンプレートと探索領域の対応を示す図である。
【図4】テンプレートの大きさが4画素×8ラインのときのテンプレートと探索領域の対応を示す図である。
【図5】テンプレートの大きさが8画素×8ラインのときのテンプレートと探索領域の対応を示す図である。
【図6】第1の実施形態の動きベクトル検出装置における差分絶対値和計算回路の構成を示す図である。
【図7】第1の実施形態の差分絶対値和計算回路へ入力する画素のタイミングを表した図である。
【図8】第1の実施形態の差分絶対値和計算回路の中のPEアレイi,j の構成を示す図である。
【図9】第2の実施形態の動きベクトル検出装置における差分絶対値和計算回路の構成を示す図である。
【図10】第2の実施形態の差分絶対値和計算回路へ入力する画素のタイミングを表した図である。
【図11】第3の実施形態の動きベクトル検出装置における差分絶対値和計算回路の構成を示す図である。
【図12】第3の実施形態の差分絶対値和計算回路へ入力する画素のタイミングを表した図である。
【図13】第3の実施形態における各テンプレートの1回目と2回目の探索範囲を示す図である。
【図14】4画素×4ライン,4画素×8ライン,8画素×4ライン,8画素×8ライン,8画素×16ライン,16画素×8ラインおよび16画素×16ラインの大きさのテンプレートの組み合わせに適用した場合における本発明の第2の実施形態の差分絶対値和計算回路の構成を示す図である。
【図15】4画素×4ライン,4画素×8ライン,8画素×4ライン,8画素×8ライン,8画素×16ライン,16画素×8ラインおよび16画素×16ラインの大きさのテンプレートの組み合わせに適用した場合における本発明の第3の実施形態の差分絶対値和計算回路の構成を示す図である。
【図16】動き検出の対象となるテンプレートと探索領域の例を示す図である。
【図17】全探索法による動き検出の方法を説明するための図である。
【図18】第1の従来例の動きベクトル検出装置における差分絶対値和計算回路の構成を示す図である。
【図19】第1の従来例の差分絶対値和計算回路において,探索領域の左上の角から切り出された4画素×4ラインの領域とテンプレート中の画素間で差分絶対値和を計算するときのタイミングを表した図である。
【図20】第2の従来例の動きベクトル検出装置における差分絶対値和計算回路の構成を示す図である。
【図21】第2の従来例の差分絶対値和計算回路において,探索領域の左上の角から切り出された4画素×4ラインの領域とテンプレート中の画素間で差分絶対値和を計算するときのタイミングを表した図である。
【図22】第3の従来例の動きベクトル検出装置における差分絶対値和計算回路の構成を示す図である。
【図23】第3の従来例の差分絶対値和計算回路において,探索領域の左上の角から切り出された4画素×4ラインの領域とテンプレート中の画素間で差分絶対値和を計算するときのタイミングを説明するための図である。
【図24】無効サイクルが生じる場合の探索領域からの画素読み出し例を示す図である。
【図25】第4の従来例の動きベクトル検出装置における差分絶対値和計算回路の構成を示す図である。
【図26】第5の従来例の動きベクトル検出装置における差分絶対値和計算回路の構成を示す図である。
【図27】第5の従来例における探索領域からの画素読み出し例を示す図である。
【図28】第5の従来例において図16に示した探索領域中の動きベクトルを検出する場合の例を示す図である。
【符号の説明】
1,10,11,…,18 テンプレート
2,20,21,…,28 探索領域
3 差分絶対値を計算する回路
4 レジスタ
5 加算器
6 総和回路
7 セレクタ
8 PEアレイ
30,31,…,45 遅延回路
100 参照画像メモリ
101 探索領域読み出し回路
102 評価値計算回路
103 加算回路
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a motion vector detecting device used for detecting motion between images in a moving image encoding process, and in particular, to a plurality of types of large-size images such as 16 pixels × 16 lines and 8 pixels × 8 lines. The present invention relates to a motion vector detecting device for detecting the motion of a pixel block of a motion vector.
[0002]
[Prior art]
A moving image includes a plurality of temporally continuous images. The motion vector detection device is a device that detects, from a moving image, a position in a certain image at which a pixel block in a certain image has moved.
[0003]
FIG. 16 shows an example of a pixel block (hereinafter, referred to as a template) 1 to be subjected to motion detection and a search area 2. Here, the template 1 is a pixel block in a certain image, and the search area 2 is a pixel block in another image. Both the template 1 and the search area 2 may be rectangular areas of an arbitrary size. Hereinafter, the case where the template 1 has 4 pixels × 4 lines and the search area 2 has 11 pixels × 11 lines will be described. In this case, if the area of 4 pixels × 4 lines at the center of the search area 2 is set as the motion vector (0, 0), the search range becomes −3 to +4 in both the horizontal and vertical directions. a 0,0 ~ A 3,3 Represents a pixel in template 1 and x 0,0 ~ X a, a (Subscripts are represented by hexadecimal numbers) represent pixels in the search area 2. In this specification, the unit of the number of pixels in the horizontal direction is called a pixel, and the unit of the number of pixels in the vertical direction is called a line.
[0004]
FIG. 17 is a diagram for explaining a method of motion detection by the full search method. The entire area of 4 pixels × 4 lines that can be taken from the search area 2 is cut out, and the difference between the value of the pixel in the area of 4 pixels × 4 lines and the pixel at the corresponding position in the template 1 is calculated as the difference absolute value. The evaluation is made based on the sum or the sum of the squared differences. It is assumed that the sum is calculated for the entire area of 4 pixels × 4 lines shifted by one pixel or one line, that is, 8 × 8 = 64 areas, and that the template 1 moves from the area having the smallest sum.
[0005]
Since what is used as the evaluation formula is not the essence of the present invention, a case where the sum of absolute difference values is used will be described below. The motion vector detecting device according to the present invention is often realized by a synchronous circuit, but the synchronous circuit operates in synchronization with a normal clock (hereinafter, referred to as CK). Therefore, the unit of operation is hereinafter referred to as CK.
[0006]
FIG. 18 is a diagram illustrating a sum of absolute difference value calculation circuit (for example, paragraphs [0006] to [0008] of Patent Document 1 and FIG. 6, or pages 916 and 917 of Non-Patent Document 1) in the motion vector detecting device of the first conventional example. FIG. 8 is a diagram showing the configuration of a page and FIG. 7). P indicated by reference numeral 3 i, j (I = 0-3, j = 0-3) is a circuit for calculating the absolute value of the difference between the corresponding pixels in the template 1 and the search area 2, and has a one-to-one correspondence with the pixels in the template 1. Pixel a in the template 1 i, j , And the pixels in the search area 2 broadcasted (supplied) for each row are fetched for each CK, and the absolute difference value is calculated. 4 is a register, 5 is an adder, and 6 is a summing circuit.
[0007]
FIG. 19 shows a difference absolute value sum S between a pixel of 4 pixels × 4 lines cut out from the upper left corner of the search area 2 and the pixels in the template 1 in the difference absolute value sum calculation circuit of FIG. 0,0 FIG. 9 is a diagram showing timings when calculating the following. As shown in the figure, the difference absolute value sums of the first column, the second column, the third column, and the fourth column are calculated at the 0CK, the 1CK, the 2CK, and the 3CK, respectively, and the partial sum of each row is calculated at the 4CK. S i Is calculated, and the partial sum S of each row from the first row to the fourth row is calculated by 5CK. i Sum S 0,0 Is output.
[0008]
FIG. 20 shows a sum of absolute difference value calculating circuit (for example, paragraphs [0010] to [0012] of Patent Document 1 and FIG. 9 or Non-Patent Document 1, pages 919 and 920) in a second conventional motion vector detecting device. 15 is a diagram showing the configuration of a page and FIG. 14). P i, j The functions of the register 3, the register 4, and the adder 5 are the same as those of the first conventional example.
[0009]
FIG. 21 shows a difference absolute value sum S between the pixel of the template 1 and the area of 4 pixels × 4 lines cut out from the upper left corner of the search area 2 in the difference absolute value sum calculation circuit of FIG. 0,0 FIG. 9 is a diagram showing timings when calculating the following. S in the figure 0: j Is the partial sum S of each row from the first row to the (j + 1) th row i Means the sum of In the absolute difference sum calculating circuit shown in FIG. 20, the input of the pixels in the search area 2 is delayed by 1 CK for each row, thereby obtaining the partial sum S of each row. i Is delayed by 1 CK for each row, and the partial sum S of each row is delayed for each CK. i Is added.
[0010]
FIG. 22 shows a sum of absolute difference calculating circuit (for example, paragraphs [0019] to [0021] of Patent Document 1 and FIG. 1 or Non-Patent Document 1, page 920, 921) in the motion vector detecting device of the third conventional example. FIG. 16 is a diagram showing the configuration of a page and FIG. 15). P i, j The functions of the register 3, the register 4, and the adder 5 are the same as those of the first and second conventional examples. Individual P i, j The output of 3 is added by the adder 5 to the calculation result sent from the previous adder 5 and sent to the next adder 5. The transmission to the next stage is performed for each CK via the register 4.
[0011]
FIG. 23 shows the difference absolute value sum S between the pixel of the template 1 and the area of 4 pixels × 4 lines cut out from the upper left corner of the search area 2 in the difference absolute value sum calculation circuit of FIG. 0,0 FIG. 9 is a diagram for explaining timing when calculating the value of. In the circuit for calculating the sum of absolute differences in the conventional example, the input of the pixels in the search area 2 is delayed by 4CK for each row, thereby obtaining the partial sum S of each row. i Is delayed by 4CK for each row. In this case, the partial sum S of each line i , The calculation of the next lower row starts. Therefore, in this conventional example, the partial sum S i Can be added to the difference absolute value at the head of the next row, so that a one-dimensional array structure having continuous rows can be obtained.
[0012]
Here, in the above-described first to third conventional sum-of-absolute-difference calculating circuits, when the area of 4 pixels × 4 lines cut out from the search area 2 to be calculated moves from the right end to the left end of the search area Invalid cycles occur. FIG. 24 shows an example of pixel reading from the search area 2 when an invalid cycle occurs. The sum of absolute differences between the region of 4 pixels × 4 lines cut out from the upper left corner of the search region 2 and the pixels in the template 1 is represented by S 0,0 , The sum of the absolute differences between the pixel shifted in the template 1 0,1 , Then S 0,2 , S 0,3 The sum of absolute differences between an area shifted one line below the area of 4 pixels × 4 lines at the upper left corner of the search area 2 and the pixels in the template 1 is represented by S 1,0 Then, the sum of absolute differences S 0,0 To S 0,7 Until is calculated continuously. However, S 0,7 Pixel x required to calculate 0, a , X 1, a , X 2, a , X 3, a If the supply of 1,0 X used to calculate 1,0 , X 2,0 , X 3,0 , X 4,0 Cannot be supplied. Therefore, S 1,0 3 (the number of pixels in the horizontal direction of the template −1) CK invalid cycle occurs before the calculation of (1) starts. When the area of 4 pixels × 4 lines cut out from the search area moves from the lower end to the upper end of the search area, an invalid cycle of 15CK occurs for the same reason.
[0013]
FIG. 25 is a diagram showing a configuration of a sum-of-absolute-difference value calculation circuit (see, for example, page 922 of Non-Patent Document 1 and FIG. 16) in the fourth conventional motion vector detecting device. The configuration is the same as that of the third conventional example except that a selector 7 for selecting any one pixel from two pixels input from the outside is added. In this conventional example, x 0,8 , X 1,8 , X 2,8 , X 3,8 X at the same time as the rightmost pixel of the search area 1,0 , X 2,0 , X 3,0 , X 4,0 Are supplied to the search area and are selected by the selector 7. Therefore, S 0,7 Followed by S 1,0 Can be started, and the invalid cycle can be deleted.
[0014]
FIG. 26 is a diagram showing a sum of absolute difference value calculation circuit (for example, paragraphs [0041] to [0043] of Patent Document 2 and FIGS. 2 to 4 or 922 of Non-Patent Document 1) in a fifth conventional motion vector detecting device. FIG. 18 is a diagram showing the configuration of a page and FIG. 17). FIG. 27 is a diagram showing an example of reading pixels from a search area in the conventional example. P i, j The functions of the register 3, the register 4, the adder 5, and the selector 7 are the same as those of the above-described first to fourth conventional examples. Here, for convenience of description in the embodiment described later, except for the selector 7, P i, j 3, a register 4 and an adder 5 are referred to as a computing unit, and an evaluation value calculation circuit constituted by the computing unit is referred to as a PE array 8.
[0015]
In this conventional example, the number of horizontal motion vectors to be searched is matched with the number of horizontal pixels of the template. In this configuration, x 0,4 , X 1,4 , X 2,4 , X 3,4 X at the same time as the rightmost pixel of the search area 1,0 , X 2,0 , X 3,0 , X 4,0 The invalid cycle can be eliminated by supplying the pixel at the left end of the search area such as i, j The effect is obtained that the pixels in the search area supplied to (i = 0 to 3) become the same.
[0016]
FIG. 28 shows an example in which a motion vector in the search area 2 shown in FIG. 16 is detected in the conventional example. All the motion vectors in the search area 2 can be detected by searching for the horizontal motion vector separately in two times of -3 to 0 and 1 to 4.
[0017]
[Patent Document 1]
Japanese Patent No. 3127980
[Patent Document 2]
Japanese Patent No. 2838817
[Non-patent document 1]
Toshihiro Minami, Toshio Kondo, Kazuhito Murashimi, Ryota Kasai, "Proposal of One-Dimensional Systolic Array Type Full-Search Motion Vector Detector", IEICE (D-I), vol. J78-DI, no. 12, pp. 913-925, Dec. 1995.
[0018]
[Problems to be solved by the invention]
However, in recent international standards for video coding, there are some which use pixel blocks of a plurality of sizes as templates. For example, H. In H.263, two types of pixel blocks of 16 pixels × 16 lines and 8 pixels × 8 lines are used as templates. Also, H. In 26L, seven types of pixel blocks of 4 pixels × 4 lines, 4 pixels × 8 lines, 8 pixels × 4 lines, 8 pixels × 8 lines, 8 pixels × 16 lines, 16 pixels × 8 lines, and 16 pixels × 16 lines Is used. If a motion vector detection device is separately provided for each template of each size, there is a problem that the amount of hardware and cost increase.
[0019]
SUMMARY OF THE INVENTION The present invention has been made in view of the above points, and an object of the present invention is to provide a motion vector detection device capable of detecting a motion vector corresponding to a plurality of sizes of templates. It is to provide the same amount of hardware and cost as the device.
[0020]
[Means for Solving the Problems]
For this reason, the motion vector detecting device according to the present invention includes a template group obtained by dividing a pixel block of a predetermined size in a first image selected from a moving image to be encoded. Between one template and a pixel block of the same size as the one template included in a pixel block group cut out from the search area in the second image selected from the moving image to be encoded with the moving image A motion vector detecting unit that evaluates a difference between values of pixels at corresponding positions and detects a position of a pixel block having a minimum evaluation value as a motion vector for all templates included in the template group. An evaluation value calculation circuit corresponding to each of a plurality of minimum templates included in the template group; By adding the outputs of the calculation circuit, characterized in that it comprises a summing circuit having a predetermined number of calculating an evaluation value of the smallest template big all templates from.
[0021]
Further, in the motion vector detecting device according to the present invention, the evaluation value calculation circuit evaluates a pixel blocks in the horizontal direction that are the same as the number of pixels of the template having a pixel in the horizontal direction and b lines in the vertical direction. By repeating this, all the pixel blocks included in the search range and whose horizontal direction is a pixels and whose vertical direction is b lines are evaluated, or in the evaluation value calculation circuit, the horizontal direction is a in the vertical direction. By repeating the evaluation of b pixel blocks having the same number of pixels and the number of lines of the template whose vertical direction is b lines, all pixels whose horizontal direction is a pixel and whose vertical direction is b lines are included in the search range. It is characterized in that a pixel block is evaluated.
[0022]
FIG. 1 is a block diagram for explaining a configuration example of the present invention. In FIG. 1, a reference image memory 100 is a memory in which image data to be referred to at the time of moving image encoding is stored. The search area readout circuit 101 is a circuit that reads out a pixel block group from the search area of the moving image stored in the reference image memory 100 and supplies the pixel block group to each evaluation value calculation circuit 102.
[0023]
Each of the evaluation value calculation circuits 102 includes a pixel block to be subjected to video coding corresponding to the minimum template size included in the template group having a plurality of sizes, and a search area supplied from the search area readout circuit 101. This is a circuit for evaluating the difference in the value between the pixels at the corresponding positions between the smallest template included in the pixel block group extracted from and the pixel block of the same size.
[0024]
For example, templates of a plurality of sizes ranging from a template having a pixel in the horizontal direction and b lines in the vertical direction to a template having a size of (m × a) pixels in the horizontal direction and (n × b) lines in the vertical direction In the case of detecting a motion vector based on a motion vector, each evaluation value calculation circuit 102 searches for a pixel block to be subjected to video coding with a pixel size in the horizontal direction and a b line size in the vertical direction, and a search in the reference image. A circuit for evaluating a difference in value between pixels at corresponding positions between a pixel block of the same size cut out from the area, and m × n (m and n are integers and m × n ≧ m) 2) Provided.
[0025]
The addition circuit 103 is a circuit that adds the outputs of the evaluation value calculation circuit 102 and calculates the evaluation values of all templates larger than the minimum template.
[0026]
As the m × n individual evaluation value calculation circuits 102, a circuit having the same configuration as that of the difference absolute value sum calculation circuit of FIG. 18, FIG. 20, FIG. 22, FIG. 25, or FIG. Can be.
[0027]
Since the present invention is configured as described above, a motion vector detecting device capable of detecting a motion vector corresponding to a template of a plurality of sizes is required to be as hard as a motion vector detecting device detecting a motion vector of a minimum template. It can be realized in quantity and cost.
[0028]
BEST MODE FOR CARRYING OUT THE INVENTION
In the present embodiment, four types of template sizes of 4 pixels × 4 lines, 4 pixels × 8 lines, 8 pixels × 4 lines, and 8 pixels × 8 lines will be described.
[0029]
FIG. 2 shows the correspondence between four adjacent 4 pixel × 4 line templates and the search area. The template of 8 pixels × 8 lines is divided into four templates 10, 11, 12 and 13 of 4 pixels × 4 lines. The search areas of the upper left, upper right, lower left, and lower right templates 10, 11, 12, and 13 in FIG. 2 are 20, 21, 22, and 23, respectively.
[0030]
Here, the sum of absolute differences between the area of 4 pixels × 4 lines cut out from the upper left corner of the search area 20 and the pixels in the template 10 is represented by S 0,0 (4 × 4 upper left), the sum of the absolute differences between the region shifted by one pixel to the right and the pixels in the template 10 is represented by S 0,1 (4 × 4 upper left), then S 0,2 (4 × 4 upper left), S 0,3 (4 × 4 upper left), and the sum of absolute differences between the pixel shifted from the area of 4 pixels × 4 lines at the upper left corner of the search area 20 and one line below is S 1,0 (4 × 4 upper left).
[0031]
Similarly, the sum of absolute differences between the areas of 4 pixels × 4 lines cut out from the upper left corners of the search areas 21, 22, 23 and the pixels in the templates 11, 12, and 13 is represented by S, respectively. 0,0 (4 × 4 upper right), S 0,0 (4 × 4 lower left), S 0,0 (4 × 4 lower right). At this time, S 0,4 (4x4 upper left) and S 0,0 Pixels in the search area for calculating (4 × 4 upper right) match. Similarly, S 4,0 (4x4 upper left) and S 0,0 Pixels in the search area for calculating (4 × 4 lower left) also match. Also, S 4,4 (4 × 4 upper left), S 0,4 (4 × 4 lower left), S 4,0 (4x4 upper right) and S 0,0 Pixels in the search area for calculating (4 × 4 lower right) match.
[0032]
FIG. 3 shows the correspondence between the template and the search area when the size of the template is 8 pixels × 4 lines. The template of 8 pixels × 8 lines is divided into two templates 14 and 15 of 8 pixels × 4 lines. The search areas of the upper and lower templates 14 and 15 are 24 and 25, respectively. The sum of absolute differences between the area of 8 pixels × 4 lines cut out from the upper left corner of the search area 24 and the pixels in the template 14 is represented by S 0,0 (8 × 4 above), the sum of absolute differences between the area shifted by one pixel to the right and the pixels in the template 14 is represented by S 0,1 (8 × 4 above), then S 0,2 (8 × 4 above), S 0,3 (8 × 4 above), and the sum of absolute differences between an area shifted one line below the area of 8 pixels × 4 lines at the upper left corner of the search area 24 and the pixels in the template 14 is represented by S 1,0 (8 × 4 above). Similarly, the sum of absolute differences between an area of 8 pixels × 4 lines cut out from the upper left corner of the search area 25 and the pixels in the template 15 is represented by S 0,0 (8 × 4 below).
[0033]
As can be seen by comparing FIG. 2 and FIG. 0,0 (8 × 4 above) is the S 0,0 (4x4 upper left) and S 0,0 (4 × 4 upper right) has the following relationship.
[0034]
S 0,0 (8 × 4 above) = S 0,0 (4 × 4 upper left) + S 0,0 (4x4 upper right)
Similarly, S 0,0 (8 × 4 bottom) is the above S 0,0 (4x4 lower left) and S 0,0 (4 × 4 lower right) has the following relationship.
[0035]
S 0,0 (8 × 4 bottom) = S 0,0 (4 × 4 lower left) + S 0,0 (4x4 lower right)
In general, there is the following relationship.
[0036]
S i, j (8 × 4 above) = S i, j (4 × 4 upper left) + S i, j (4x4 upper right) ... (1)
S i, j (8 × 4 bottom) = S i, j (4 × 4 lower left) + S i, j (4x4 lower right) ... (2)
FIG. 4 shows the correspondence between the template and the search area when the size of the template is 4 pixels × 8 lines. The pixel block of 8 pixels × 8 lines is divided into two templates 16 and 17 of 4 pixels × 8 lines. The search areas of the left and right templates 16 and 17 are 26 and 27, respectively. The sum of absolute differences between the area of 4 pixels × 8 lines cut out from the upper left corner of the search area 26 and the pixels in the template 16 is represented by S 0,0 (4 × 8 left), the sum of absolute differences between the area shifted by one pixel to the right and the pixels in the template 16 is represented by S 0,1 (4 × 8 left), then S 0,2 (4 × 8 left), S 0,3 (4 × 8 left), and the sum of the absolute differences between the region shifted by one line from the region of 4 pixels × 8 lines at the upper left corner of the search region 26 and the pixels in the template 16 is represented by S 1,0 (4 × 8 left). Similarly, the sum of absolute differences between the area of 4 pixels × 8 lines cut out from the upper left corner of the search area 27 and the pixels in the template 17 is represented by S 0,0 (4 × 8 right).
[0037]
As can be seen by comparing FIG. 2 and FIG. 0,0 (4 × 8 left) is the above S 0,0 (4x4 upper left) and S 0,0 (4 × 4 lower left) has the following relationship.
[0038]
S 0,0 (4 × 8 left) = S 0,0 (4 × 4 upper left) + S 0,0 (4x4 lower left)
Similarly, S 0,0 (4x8 right) is the above S 0,0 (4x4 upper right) and S 0,0 (4 × 4 lower right) has the following relationship.
[0039]
S 0,0 (4 × 8 right) = S 0,0 (4 × 4 upper right) + S 0,0 (4x4 lower right)
In general, there is the following relationship.
[0040]
S i, j (4 × 8 left) = S i, j (4 × 4 upper left) + S i, j (4x4 lower left) ... (3)
S i, j (4 × 8 right) = S i, j (4 × 4 upper right) + S i, j (4x4 lower right) ... (4)
FIG. 5 shows the correspondence between the template 18 and the search area 28 when the size of the template is 8 pixels × 8 lines. The sum of absolute differences between the 8 pixel × 8 line area cut out from the upper left corner of the search area 28 and the pixels in the template 18 is represented by S 0,0 (8 × 8), the sum of the absolute differences between the region shifted by one pixel to the right and the pixels in the template 18 is represented by S 0,1 (8 × 8), then S 0,2 (8 × 8), S 0,3 (8 × 8), and the sum of absolute differences between an area shifted one line below the area of 8 pixels × 8 lines at the upper left corner of the search area 28 and the pixels in the template 18 is represented by S 1,0 (8 × 8).
[0041]
As can be seen by comparing FIGS. 0,0 (8 × 8) is the above S 0,0 (4 × 4 upper left), S 0,0 (4 × 4 upper right), S 0,0 (4 × 4 lower left), S 0,0 (4x4 lower right), S 0,0 (8 × 4 above), S 0,0 (8 × 4 below), S 0,0 (4 × 8 left) and S 0,0 (4 × 8 right) has the following relationship.
[0042]
S 0,0 (8 × 8) = S 0,0 (4 × 4 upper left) + S 0,0 (4 × 4 upper right) + S 0,0 (4 × 4 lower left) + S0. 0 (4x4 lower right)
= S 0,0 (8 × 4 above) + S 0,0 (8x4 bottom)
= S 0,0 (4 × 8 left) + S 0,0 (4x8 right)
In general, there is the following relationship.
[0043]
S i, j (8 × 8) = S i, j (4 × 4 upper left) + S i, j (4x4 upper right)
+ S i, j (4 × 4 lower left) + S i, j (4x4 lower right)
= S i, j (8 × 4 above) + S i, j (8x4 bottom)
= S i, j (4 × 8 left) + S i, j (4x8 right) ... (5)
From the above equations (1) to (5), the sum of absolute differences of the templates 10 to 13 of 4 pixels × 4 lines is calculated, and these are added to obtain 8 pixels × 4 lines and 4 pixels × 8 lines. It can be seen that the sum of absolute differences can be calculated for the templates 14, 15, 16, 17 and 18 of 8 pixels × 8 lines. In the present invention, a PE array is individually allocated to four templates 10 to 13 of 4 pixels × 4 lines, and the sum of absolute differences is calculated. From the result, the sum of absolute differences of templates of other sizes is calculated. I do.
[0044]
FIG. 6 shows a configuration of a difference absolute value sum calculation circuit in the motion vector detection device according to the first embodiment of the present invention. FIG. 7 is a diagram illustrating timings of pixels input to the sum of absolute difference calculating circuit illustrated in FIG. 6. PE array i, j 8 is shown in FIG.
[0045]
PE array according to first embodiment i, j Reference numeral 8 has the same structure as that of the PE array 8 in the fifth conventional example, and the horizontal motion vector is searched for twice in the order of -3 to 0 and 1 to 4 similarly to the fifth conventional example. This point is the same in the second and third embodiments described later, but in the first embodiment, the PE array 0,0 , PE array 1,0 , PE array 0,1 , PE array 1,1 On the other hand, as shown in FIG. 7, the point that the pixels in the search area are separately supplied is different from the second and third embodiments.
[0046]
With this configuration, four PE arrays i, j 8 are operated in parallel and the PE array 0,0 In S i, j (4 × 4 upper left), PE array 1,0 In S i, j (4x4 lower left), PE array 0,1 In S i, j (4 × 4 upper right), PE array 1,1 In S i, j (4 × 4 lower right) are simultaneously calculated, and these are added by the adder 5, so that S i, j (8 × 4 above), S i, j (8 × 4 below), S i, j (4 × 8 left), S i, j (4 × 8 right), S i, j Calculate (8 × 8).
[0047]
FIG. 9 shows a configuration of a difference absolute value sum calculation circuit in the motion vector detection device according to the second embodiment of the present invention. FIG. 10 is a diagram showing the timing of the pixel input to the absolute difference sum calculating circuit shown in FIG. The delay circuit A30 is a circuit that delays an input pixel by 16CK and outputs it.
[0048]
As described with reference to FIG. 2, if the search area 20 of the upper left template 10 is shifted downward by four lines, the search area 22 of the lower left template 12 becomes the search area 22. 4,0 Pixels in the search area for calculating (4 × 4 upper left) and S 0,0 Pixels in the search area for calculating (4 × 4 lower left) match. Generalized, S i, j Pixels in the search area for calculating (4 × 4 upper left) and S i-4, j Pixels in the search area for calculating (4 × 4 lower left) match.
[0049]
In the present embodiment, focusing on this point, the PE array 0,0 And PE arrays 1,0 Input the pixels in the same search area to i, j (4x4 upper left) and S i-4, j (4 × 4 lower left) is calculated simultaneously. Here, i is an integer from 0 to 11, and when i <4, S i-4, j (4 × 4 lower left) is not calculated, and when i> 7, S i, j (4 × 4 upper left) shall not be calculated. Here, j is an integer of 0 or more and 7 or less.
[0050]
In the present embodiment, S i, j (4x4 lower left) is S i, j (4x4 upper left) is PE array 0,0 16 CK delay after being output from PE array 1,0 Output from For this reason, S i, j (4 × 4 upper left) is delayed by 16 CK, and S i, j (4 × 4 lower left) to add S i, j (4 × 8 left) can be calculated.
[0051]
Similarly, PE array 0,1 And PE arrays 1,1 Also, input the pixels in the same search area to i, j (4x4 upper right) and S i-4, j (4 × 4 lower right) is calculated simultaneously. Here, i is an integer from 0 to 11, and when i <4, S i-4, j (4 × 4 lower right) is not calculated, and when i> 7, S i, j (4 × 4 upper right) is not calculated. Here, j is an integer of 0 or more and 7 or less. In the present embodiment, S i, j (4x4 upper right) is PE array 0,1 Is delayed by 16CK after output from i, j (4x4 lower right) is PE array 1,1 Output from For this reason, S i, j (4 × 4 upper right) is delayed by 16CK and S i, j (4 × 4 lower right) to add S i, j (4 × 8 right) can be calculated.
[0052]
FIG. 11 shows a configuration of a difference absolute value sum calculation circuit in the motion vector detection device according to the third embodiment of the present invention. FIG. 12 is a diagram illustrating timings of pixels input to the sum of absolute difference value calculation circuit illustrated in FIG. 11. The delay circuit A30, the delay circuit B31, and the delay circuit C32 are circuits that delay input pixels by 16CK, 48CK, and 64CK, respectively, and output the delayed pixels.
[0053]
As described with reference to FIG. 4,4 (4 × 4 upper left), S 0,4 (4 × 4 lower left), S 4,0 (4x4 upper right) and S 0,0 Pixels in the search area for calculating (4 × 4 lower right) match. That is, S i, j (4 × 4 upper left), S i-4, j (4 × 4 lower left), S i, j-4 (4x4 upper right) and S i-4, j-4 Pixels in the search area for calculating (4 × 4 lower right) match. Here, i is an integer from 0 to 11, and when i <4, S i-4, j (4x4 lower left) and S i-4, j-4 (4 × 4 lower right) is not calculated, and when i> 7, S i, j (4x4 upper left) and S i, j-4 (4 × 4 upper right) is not calculated. Similarly, j is an integer from 0 to 11, and when j <4, S i, j-4 (4x4 upper right) and S i-4, j-4 (4 × 4 lower right) is not calculated, and when j> 7, S i, j (4x4 upper left) and S i-4, j (4 × 4 lower left) shall not be calculated.
[0054]
FIG. 13 is a diagram showing the first and second search ranges of the templates 10 to 13. In the drawing, 50 is the first search range of the template 10, 51 is the second search range of the template 10 and the first search range of the template 11, 52 is the second search range of the template 11, and 53 is the search range of the template 12. The first search range, 54 represents the second search range of the template 12 and the first search range of the template 13, and 55 represents the second search range of the template 13.
[0055]
In this embodiment, first, the PE array 0,0 And PE arrays 1,0 Only the first search range of the template 10 and the first search range of the template 12 are searched by operating only 0,0 , PE array 1,0 , PE array 0,1 And PE arrays 1,1 Are operated to search the second search range of the template 10 and the first search range of the template 11, and the second search range of the template 12 and the first search range of the template 13, and finally the PE array 0,1 And PE arrays 1,1 Only the second search range of the template 11 and the second search range of the template 13 are searched by operating only.
[0056]
With this configuration, the PE array 0,0 , PE array 1,0 , PE array 0,1 And PE arrays 1,1 Input the same pixel to i, j (4 × 4 upper left), S i-4, j (4 × 4 lower left), S i, j-4 (4x4 upper right) and S i-4, j-4 (4 × 4 lower right) can be calculated simultaneously.
[0057]
Where S i, j (4x4 lower left) is S i, j (4x4 upper left) is PE array 0,0 16 CK delay after being output from PE array 1,0 Output from Similarly to the first to third conventional motion vector detecting devices, when a region of 4 pixels × 4 lines cut out from the search area moves from the lower end to the upper end of the search area, an invalid cycle of 15CK occurs. i, j (4x4 upper right) and S i, j (4x4 lower right) is S i, j (4x4 upper left) is PE array 0,0 PE array with 48CK and 64CK delay after output from 0,1 And PE arrays 1,1 Output from
[0058]
Therefore, in the present embodiment, S i, j (4 × 4 upper left) is delayed by 64CK, and S is delayed by the delay circuit B31. i, j (4 × 4 lower left) is delayed by 48CK, and S is delayed by delay circuit A30. i, j (4 × 4 upper right) after 16CK delay, S i, j (4 × 4 upper left), S i, j (4 × 4 lower left), S i, j (4x4 upper right) and S i, j By adding (4 × 4 lower right), S i, j (8 × 4 above), S i, j (8 × 4 below), S i, j (4 × 8 left), S i, j (4 × 8 right), S i, j (8 × 8) is calculated.
[0059]
In the third embodiment, when the invalid cycle when the area of 4 pixels × 4 lines cut out from the search area shifts from the lower end to the upper end of the search area is ignored, the horizontal search range is −3 to +4. , PE array 0,0 , PE array 1,0 , PE array 0,1 And PE arrays 1,1 Operate only for 1/3 of the total number of CKs. However, if the search range becomes wider, the PE array 0,0 , PE array 1,0 , PE array 0,1 And PE arrays 1,1 Are all activated. For example, if the search range in the horizontal direction is -7 to +8, 3/5 of the total number of CKs, and if the search range in the horizontal direction is -11 to +12, 5/5 of the total number of CKs, the PE array 0,0 , PE array 1,0 , PE array 0,1 And PE arrays 1,1 All work.
[0060]
In the first to third embodiments, only four types of template sizes of 4 pixels × 4 lines, 4 pixels × 8 lines, 8 pixels × 4 lines, and 8 pixels × 8 lines are shown. However, the present invention can be applied to combinations of templates of various sizes. For example, according to the present invention, the size of 4 pixels × 4 lines, 4 pixels × 8 lines, 8 pixels × 4 lines, 8 pixels × 8 lines, 8 pixels × 16 lines, 16 pixels × 8 lines, and 16 pixels × 16 lines It can also be applied to combinations of templates.
[0061]
FIG. 14 is a diagram showing a configuration of a difference absolute value sum calculation circuit according to the second embodiment of the present invention when applied to a combination of these templates. Here, the delay circuit A30, the delay circuit D33, and the delay circuit B31 are circuits that delay the input pixels by 16CK, 32CK, and 48CK, respectively, and output the delayed pixels. However, in FIG. 14, the PE array which is the evaluation value of the minimum template is used. i, j The adder for calculating the evaluation value of the larger template by adding the outputs of (1) and (2) is not shown.
[0062]
FIG. 15 shows the sizes of 4 pixels × 4 lines, 4 pixels × 8 lines, 8 pixels × 4 lines, 8 pixels × 8 lines, 8 pixels × 16 lines, 16 pixels × 8 lines, and 16 pixels × 16 lines. FIG. 11 is a diagram illustrating a configuration of a sum of absolute difference value calculation circuit according to a third embodiment of the present invention when applied to the combination of the templates. Here, the delay circuit A30, the delay circuit D33, and the delay circuit B31 are circuits that delay the input pixels by 16CK, 32CK, and 48CK, respectively, and output the delayed pixels. The delay circuits E34, F35, G36, and H37 Is a circuit for delaying the input pixels by 80CK, 96CK, 112CK and 128CK, respectively, and outputting them. Similarly, the delay circuits I38 to P45 are circuits that delay input pixels by 160CK to 288CK and output the delayed signals. However, also in FIG. 15, the PE array which is the evaluation value of the minimum template is used. i, j The adder for calculating the evaluation value of the larger template by adding the outputs of (1) and (2) is not shown.
[0063]
In the first to third embodiments, only the configuration for detecting all the motion vectors within the search range by repeating the evaluation of the same number of motion vectors as the number of pixels of the minimum template in the horizontal direction. However, it is possible to detect all the motion vectors in the search range by repeating the evaluation of the same number of motion vectors as the minimum number of template lines in the vertical direction.
[0064]
Further, the delay circuits A to P used in the second and third embodiments may be realized by connecting registers in series, or may be realized by a first-in first-out memory. As long as the input pixel is output after being delayed by a predetermined CK, any means can be used.
[0065]
【The invention's effect】
As described above, according to the present invention, a motion vector detecting device capable of detecting a motion vector corresponding to a template of a plurality of sizes is as hard as a motion vector detecting device detecting a motion vector of the smallest template. There is an effect that can be realized in quantity and cost.
[Brief description of the drawings]
FIG. 1 is a block diagram for explaining a configuration example of the present invention.
FIG. 2 is a diagram illustrating a correspondence between four templates of adjacent 4 pixels × 4 lines and a search area;
FIG. 3 is a diagram showing a correspondence between a template and a search area when the size of the template is 8 pixels × 4 lines.
FIG. 4 is a diagram showing a correspondence between a template and a search area when the size of the template is 4 pixels × 8 lines.
FIG. 5 is a diagram showing a correspondence between a template and a search area when the size of the template is 8 pixels × 8 lines.
FIG. 6 is a diagram illustrating a configuration of a difference absolute value sum calculation circuit in the motion vector detection device according to the first embodiment.
FIG. 7 is a diagram illustrating timings of pixels input to a sum of absolute difference value calculating circuit according to the first embodiment.
FIG. 8 is a diagram showing a PE array in the sum of absolute difference calculating circuit according to the first embodiment; i, j FIG. 3 is a diagram showing the configuration of FIG.
FIG. 9 is a diagram illustrating a configuration of a sum-of-absolute-difference calculation circuit in the motion vector detection device according to the second embodiment.
FIG. 10 is a diagram illustrating timings of pixels input to a difference absolute value sum calculation circuit according to the second embodiment.
FIG. 11 is a diagram illustrating a configuration of a difference absolute value sum calculation circuit in a motion vector detection device according to a third embodiment.
FIG. 12 is a diagram illustrating timings of pixels input to a sum-of-absolute-difference calculating circuit according to the third embodiment.
FIG. 13 is a diagram illustrating first and second search ranges of each template according to the third embodiment.
FIG. 14 shows a template having a size of 4 pixels × 4 lines, 4 pixels × 8 lines, 8 pixels × 4 lines, 8 pixels × 8 lines, 8 pixels × 16 lines, 16 pixels × 8 lines, and 16 pixels × 16 lines. FIG. 9 is a diagram illustrating a configuration of a sum of absolute difference value calculation circuit according to a second embodiment of the present invention when applied to a combination of.
FIG. 15 shows a template having a size of 4 pixels × 4 lines, 4 pixels × 8 lines, 8 pixels × 4 lines, 8 pixels × 8 lines, 8 pixels × 16 lines, 16 pixels × 8 lines, and 16 pixels × 16 lines. FIG. 14 is a diagram illustrating a configuration of a sum of absolute difference value calculation circuit according to a third embodiment of the present invention when applied to a combination of.
FIG. 16 is a diagram illustrating an example of a template to be subjected to motion detection and a search area.
FIG. 17 is a diagram for explaining a method of motion detection by a full search method.
FIG. 18 is a diagram showing a configuration of a sum-of-absolute-difference value calculating circuit in the motion vector detecting device of the first conventional example.
FIG. 19: When calculating the sum of absolute differences between the area of 4 pixels × 4 lines cut out from the upper left corner of the search area and the pixels in the template in the first sum of absolute differences calculation circuit of the first conventional example FIG.
FIG. 20 is a diagram showing a configuration of a difference absolute value sum calculation circuit in a motion vector detection device of a second conventional example.
FIG. 21 illustrates a case where the sum of absolute differences is calculated between a pixel of 4 × 4 lines cut out from the upper left corner of the search area and a pixel in the template in the second sum of absolute difference calculation circuit of the conventional example. FIG.
FIG. 22 is a diagram showing a configuration of a sum-of-absolute-difference value calculation circuit in a motion vector detecting device of a third conventional example.
FIG. 23 shows a case where the sum of absolute differences is calculated between a region of 4 pixels × 4 lines cut out from the upper left corner of the search area and a pixel in the template in the third sum of absolute differences calculation circuit of the third conventional example. FIG. 4 is a diagram for explaining the timing of FIG.
FIG. 24 is a diagram illustrating an example of pixel reading from a search area when an invalid cycle occurs.
FIG. 25 is a diagram showing a configuration of a sum-of-absolute-difference calculating circuit in a motion vector detecting device of a fourth conventional example.
FIG. 26 is a diagram showing a configuration of a difference absolute value sum calculation circuit in a fifth conventional motion vector detection device.
FIG. 27 is a diagram showing an example of reading pixels from a search area in a fifth conventional example.
FIG. 28 is a diagram showing an example of detecting a motion vector in the search area shown in FIG. 16 in the fifth conventional example.
[Explanation of symbols]
1, 10, 11, ..., 18 templates
2,20,21, ..., 28 Search area
3 Circuit to calculate absolute difference
4 registers
5 Adder
6. Summation circuit
7 Selector
8 PE array
30, 31, ..., 45 delay circuits
100 Reference image memory
101 Search area readout circuit
102 Evaluation value calculation circuit
103 Addition circuit

Claims (8)

動画像符号化の対象である動画像から選択した第1の画像中の所定の大きさの画素ブロックを分割して得られるテンプレート群に含まれる一つのテンプレートと,前記動画像符号化の対象である動画像から選択した第2の画像中における探索領域内から切り出した画素ブロック群に含まれる前記一つのテンプレートと同じ大きさの画素ブロックとの間で,対応する位置にある画素間の値の違いを評価し,評価値が最小となる画素ブロックの位置を動きベクトルとして検出することを,前記テンプレート群に含まれる全てのテンプレートについて行う動きベクトル検出装置において,
前記テンプレート群に含まれる複数の最小のテンプレートの各々に対応した評価値計算回路と,
前記評価値計算回路の出力を加算して,前記最小のテンプレートより大きな全てのテンプレートの評価値を計算する所定の数の加算回路とを含む
ことを特徴とする動きベクトル検出装置。
One template included in a template group obtained by dividing a pixel block of a predetermined size in a first image selected from a moving image to be encoded with a moving image, A value of a value between pixels at corresponding positions between the one template and a pixel block of the same size included in a pixel block group cut out from a search area in a second image selected from a certain moving image. In a motion vector detecting apparatus that evaluates a difference and detects a position of a pixel block having a minimum evaluation value as a motion vector for all templates included in the template group,
An evaluation value calculation circuit corresponding to each of a plurality of minimum templates included in the template group;
A predetermined number of addition circuits for adding outputs of the evaluation value calculation circuit and calculating evaluation values of all templates larger than the minimum template.
動画像符号化の対象である動画像から選択した第1の画像中の水平方向が(m×a)画素,垂直方向が(n×b)ラインである画素ブロックを分割して得られるテンプレート群に含まれるテンプレートであって,水平方向がa画素,垂直方向がbラインであるテンプレートから,水平方向が(m×a)画素,垂直方向が(n×b)ラインの大きさのテンプレートまでの複数種類の大きさのテンプレートの中の一つと,前記動画像符号化の対象である動画像から選択した第2の画像中における探索領域内から切り出した画素ブロック群に含まれる前記一つのテンプレートと同じ大きさの画素ブロックとの間で,対応する位置にある画素間の値の違いを評価し,評価値が最小となる画素ブロックの位置を動きベクトルとして検出することを,前記テンプレート群に含まれる全てのテンプレートについて行う動きベクトル検出装置において,
水平方向がa画素,垂直方向がbラインであるテンプレート群に含まれる個々のテンプレートに対応したm×n個の評価値計算回路と,
前記m×n個の評価値計算回路の出力を加算して,水平方向がa画素,垂直方向がbラインであるテンプレートより大きなテンプレートの評価値を計算する所定の数の加算回路とを含む
ことを特徴とする動きベクトル検出装置。
A template group obtained by dividing a pixel block in which a horizontal direction is (m × a) pixels and a vertical direction is (n × b) lines in a first image selected from a moving image to be encoded. From a template having a pixel in the horizontal direction and b lines in the vertical direction to a template having a size of (m × a) pixels in the horizontal direction and (n × b) lines in the vertical direction. One of templates of a plurality of sizes, and the one template included in a pixel block group cut out from a search area in a second image selected from the moving image to be encoded with the moving image. The above-described technique is to evaluate the difference in value between pixels at corresponding positions between pixel blocks of the same size and to detect the position of a pixel block having the smallest evaluation value as a motion vector. In the motion vector detection apparatus which performs all of the templates included in the plate group,
M × n evaluation value calculation circuits corresponding to individual templates included in a template group having a pixel in the horizontal direction and b lines in the vertical direction;
A predetermined number of adder circuits for adding outputs of the m × n evaluation value calculation circuits and calculating an evaluation value of a template larger than a template having a pixel in the horizontal direction and b lines in the vertical direction. A motion vector detecting device characterized by the following.
請求項2記載の動きベクトル検出装置であって,
前記評価値計算回路において,水平方向について,水平方向がa画素,垂直方向がbラインであるテンプレートの画素数と同じa個の画素ブロックの評価を行うことを繰り返すことにより,探索範囲に含まれる水平方向がa画素,垂直方向がbラインである全ての画素ブロックの評価を行う
ことを特徴とする動きベクトル検出装置。
The motion vector detecting device according to claim 2,
The evaluation value calculation circuit repeats the evaluation of a pixel blocks in the horizontal direction, which is the same as the number of pixels of the template whose horizontal direction is a pixel and whose vertical direction is b line, is included in the search range. A motion vector detection device for evaluating all pixel blocks in which a pixel is in a horizontal direction and b lines is in a vertical direction.
請求項3記載の動きベクトル検出装置であって,
前記評価値計算回路は,水平方向がa画素,垂直方向がbラインであるテンプレートの評価値を評価するために,同一構成のa個の演算器からなるb個の演算器群で構成され,探索領域内から切り出した画素ブロック中の2画素のうちいずれか1画素を選択することにより構成されるa個の画素を外部より入力し,同一の列に属するb個の演算器全てに同一の画素を供給する画素供給手段を有し,
前記演算器は,水平方向がa画素,垂直方向がbラインであるテンプレート内の画素であって,対応した位置に存在する画素をそれぞれ保持する手段と,前記画素供給手段によって供給される探索領域内から切り出した画素ブロック中の画素と前記演算器に保持されているテンプレート中の画素との間における値の違いを評価値として計算する手段と,前段の演算器から入力される評価値の和に当該演算器自体の評価値を加算する手段と,当該加算結果を1単位時間後に次段の演算器に送る手段とを有する
ことを特徴とする動きベクトル検出装置。
The motion vector detecting device according to claim 3,
The evaluation value calculation circuit is composed of a group of b arithmetic units composed of a arithmetic units of the same configuration in order to evaluate an evaluation value of a template having a pixel in the horizontal direction and b lines in the vertical direction, The a pixels formed by selecting any one of the two pixels in the pixel block cut out from the search area are input from the outside, and the same is applied to all the b arithmetic units belonging to the same column. Pixel supply means for supplying pixels;
The computing unit comprises: a unit for holding pixels in a template having a pixel in the horizontal direction and a b line in the vertical direction, the pixels being present at corresponding positions; and a search area supplied by the pixel supply unit. Means for calculating, as an evaluation value, a difference in value between a pixel in a pixel block cut out from the inside and a pixel in a template held in the arithmetic unit, and a sum of evaluation values input from an arithmetic unit in a preceding stage A means for adding the evaluation value of the arithmetic unit itself to the arithmetic unit, and means for sending the result of the addition to the next arithmetic unit after one unit time.
請求項4記載の動きベクトル検出装置であって,
前記m×n個の評価値計算回路に対し,探索領域内から切り出した画素ブロック中の画素をそれぞれ2画素ずつ,合計2×m×n画素供給する手段と,
個々の評価値計算回路ごとに,該2画素のうちいずれか1画素を選択することにより構成されるa個の画素を,評価値計算回路中の前記演算器に供給する手段とを有する
ことを特徴とする動きベクトル検出装置。
The motion vector detecting device according to claim 4, wherein
Means for supplying 2 × m × n pixels to the m × n evaluation value calculation circuits, two pixels in each of the pixel blocks cut out from the search area,
Means for supplying, for each evaluation value calculation circuit, a number of pixels formed by selecting any one of the two pixels to the arithmetic unit in the evaluation value calculation circuit. Characteristic motion vector detection device.
請求項4記載の動きベクトル検出装置であって,
垂直方向のn個の前記評価値計算回路をひとまとまりとして,探索領域内から切り出した画素ブロック中の画素をそれぞれ2画素ずつ,合計2×m画素供給する手段と,
垂直方向のn個の前記評価値計算回路ごとに,該2画素のうちいずれか1画素を選択することにより構成されるa個の画素を,評価値計算回路中の前記演算器に供給する手段と,
垂直方向にj番目(j=1,2,…,n)の前記評価値計算回路の出力を,(a×b)×y単位時間(y=n−1,n−2,…,2,1,0)遅延させる所定の数の遅延手段とを有し,
垂直方向にj番目の前記評価値計算回路を,垂直方向における最初の前記評価値計算回路(j=1)が動作を開始してから(a×b)×(j−1)単位時間後に動作を開始させる
ことを特徴とする動きベクトル検出装置。
The motion vector detecting device according to claim 4, wherein
Means for supplying a total of 2.times.m pixels, each of which is composed of n evaluation value calculation circuits in the vertical direction, each of which is two pixels in a pixel block cut out from the search area,
Means for supplying, to each of the n evaluation value calculation circuits in the vertical direction, a pixels formed by selecting one of the two pixels to the arithmetic unit in the evaluation value calculation circuit When,
The output of the j-th (j = 1, 2,..., N) evaluation value calculation circuit in the vertical direction is calculated as (a × b) × y unit time (y = n−1, n−2,. 1,0) a predetermined number of delay means for delaying,
Operate the j-th evaluation value calculation circuit in the vertical direction and (a × b) × (j−1) unit time after the first evaluation value calculation circuit (j = 1) in the vertical direction starts operating. A motion vector detecting device for starting the motion vector detection.
請求項4記載の動きベクトル検出装置であって,
前記m×n個の評価値計算回路全体に対し,探索領域内から切り出した画素ブロック中の画素を2画素のみ供給する手段と,
前記m×n個の評価値計算回路全体に共通の手段であって,該2画素のうちいずれか1画素を選択することにより構成されるa個の画素を,評価値計算回路中の前記演算器に供給する手段と,
水平方向にi番目,垂直方向にj番目(i=1,2,…,m;j=1,2,…,n)の前記評価値計算回路の出力を,(a×b)×(m+1)×(x−1)+(a×b)×y単位時間(x=m−1,m−2,…,2,1,0;y=n−1,n−2,…,2,1,0)遅延させる所定の数の遅延手段とを有し,
水平方向にi番目,垂直方向にj番目の前記評価値計算回路を最初の前記評価値計算回路(i=1,j=1)が動作を開始してから(a×b)×(m+1)×(i−1)+(a×b)×(j−1)単位時間後に動作を開始させる
ことを特徴とする動きベクトル検出装置。
The motion vector detecting device according to claim 4, wherein
Means for supplying only two pixels in the pixel block cut out from the search area to the entirety of the m × n evaluation value calculation circuits;
A means common to the entirety of the m × n evaluation value calculation circuits, wherein a number of pixels formed by selecting any one of the two pixels are calculated by the operation in the evaluation value calculation circuit. Means for supplying to the vessel;
The output of the evaluation value calculation circuit at the i-th position in the horizontal direction and the j-th position (i = 1, 2,..., M; j = 1, 2,..., N) in the vertical direction is represented by (a × b) × (m + 1) ) × (x−1) + (a × b) × y unit time (x = m−1, m−2,..., 2, 1, 0; y = n−1, n−2,. 1,0) a predetermined number of delay means for delaying,
(A × b) × (m + 1) after the first evaluation value calculation circuit (i = 1, j = 1) starts operating the i-th evaluation value calculation circuit in the horizontal direction and the j-th evaluation value calculation circuit in the vertical direction A motion vector detection device characterized in that the operation is started after × (i−1) + (a × b) × (j−1) unit time.
請求項2記載の動きベクトル検出装置であって,
前記評価値計算回路において,垂直方向について,水平方向がa画素,垂直方向がbラインであるテンプレートのライン数と同じb個の画素ブロックの評価を行うことを繰り返すことにより,探索範囲に含まれる水平方向がa画素,垂直方向がbラインである全ての画素ブロックの評価を行う
ことを特徴とする動きベクトル検出装置。
The motion vector detecting device according to claim 2,
The evaluation value calculation circuit repeats the evaluation of b pixel blocks in the vertical direction, which are the same as the number of lines of the template in which the horizontal direction is a pixels and the vertical direction is b lines, thereby being included in the search range. A motion vector detection device for evaluating all pixel blocks in which a pixel is in a horizontal direction and b lines is in a vertical direction.
JP2002366506A 2002-12-18 2002-12-18 Motion vector detecting apparatus Pending JP2004200984A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002366506A JP2004200984A (en) 2002-12-18 2002-12-18 Motion vector detecting apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002366506A JP2004200984A (en) 2002-12-18 2002-12-18 Motion vector detecting apparatus

Publications (1)

Publication Number Publication Date
JP2004200984A true JP2004200984A (en) 2004-07-15

Family

ID=32763688

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002366506A Pending JP2004200984A (en) 2002-12-18 2002-12-18 Motion vector detecting apparatus

Country Status (1)

Country Link
JP (1) JP2004200984A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006115312A (en) * 2004-10-15 2006-04-27 Mie Tlo Co Ltd Motion detector and motion detecting method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006115312A (en) * 2004-10-15 2006-04-27 Mie Tlo Co Ltd Motion detector and motion detecting method

Similar Documents

Publication Publication Date Title
Lai et al. A data-interlacing architecture with two-dimensional data-reuse for full-search block-matching algorithm
JP2834640B2 (en) Motion estimation apparatus and method
JP3009674B2 (en) Motion detector
US6516031B1 (en) Motion vector detecting device
JPH04294469A (en) Correlative device
US5793443A (en) Motion vector detection circuit
EP0613293B1 (en) Multiple module block matching architecture
KR101091054B1 (en) Device for motion search in dynamic image encoding
JPS61201581A (en) Method and apparatus for detecting dynamic vector
JPH08315151A (en) Method and circuit arrangement for undersampling in case of movement evaluation
JP2004200984A (en) Motion vector detecting apparatus
JPH0595486A (en) Two-dimension shift array for picture compression
KR100359091B1 (en) Motion estimation device
JP4101645B2 (en) Motion vector detection device, motion vector detection method, program, and recording medium
JP2838817B2 (en) Motion compensation arithmetic unit
KR0178302B1 (en) Motion estimation processor based on the bidirectional parallel pipe line structure
JP2006520152A (en) Method and system for generating a simultaneous multidimensional data stream from a one-dimensional data stream
JP2866321B2 (en) Motion vector search method and apparatus
JP3698501B2 (en) Motion vector detection device
JP3004685B2 (en) Motion vector detection circuit
JP2868457B2 (en) Motion vector search device
JP3652909B2 (en) Pseudo multi-port memory device
JP2861969B2 (en) Motion vector detection circuit
JP2866325B2 (en) Motion vector search device
JP2866326B2 (en) Motion vector search device