JPH10243404A - Motion vector detector and recording medium - Google Patents

Motion vector detector and recording medium

Info

Publication number
JPH10243404A
JPH10243404A JP32527997A JP32527997A JPH10243404A JP H10243404 A JPH10243404 A JP H10243404A JP 32527997 A JP32527997 A JP 32527997A JP 32527997 A JP32527997 A JP 32527997A JP H10243404 A JPH10243404 A JP H10243404A
Authority
JP
Japan
Prior art keywords
motion vector
block
pixel
sub
search range
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.)
Granted
Application number
JP32527997A
Other languages
Japanese (ja)
Other versions
JP3968161B2 (en
Inventor
Akira Iizuka
彰 飯塚
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 Steel Corp
Original Assignee
Nippon Steel 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 Steel Corp filed Critical Nippon Steel Corp
Priority to JP32527997A priority Critical patent/JP3968161B2/en
Publication of JPH10243404A publication Critical patent/JPH10243404A/en
Application granted granted Critical
Publication of JP3968161B2 publication Critical patent/JP3968161B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a motion vector detector by which a motion vector in the unit of macro blocks and a motion vector in the unit of sub-blocks are obtained with a simpler configuration. SOLUTION: This detector is provided with a plurality of sub-block summing circuits 102a-102d that sum difference absolute values of each picture element obtained by a difference absolute value calculation circuit 101 for each sub- block, a macro block summing circuit 103 that sums the result of sum further, a minimum value decision/motion vector generating circuit 104 to obtain a motion vector based on the calculation result by any summing means, and a control circuit 107 that controls which calculation result is to be used. The difference absolute value for each picture element calculated by the difference absolute value calculation circuit 101 is used to obtain a motion vector in the unit of macro blocks and a motion vector in the unit of sub-blocks so as to eliminate the need for providing separately the difference absolute value calculation circuit 101 to obtain both the motion vectors.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、動ベクトル検出装
置および記録媒体に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a motion vector detecting device and a recording medium.

【0002】[0002]

【従来の技術】動画像信号の符号化においては、情報量
を高能率圧縮するために、動画像信号のフレーム間の相
関性の高さに着目してフレーム間の差分を符号化する方
法(フレーム間符号化)が採用されることが多い。すな
わち、差分をとる対象フレームが存在しない最初のフレ
ームについては1画面をそのまま符号化するが、それ以
降のフレームについては、符号化した情報を更に復号し
た1つ前のフレーム(参照フレーム)との差分をとり、
その差分を符号化するという方法である。
2. Description of the Related Art In coding a moving image signal, a method of coding a difference between frames by focusing on a high correlation between frames of the moving image signal in order to efficiently compress an amount of information ( Interframe coding) is often employed. That is, one frame is encoded as it is for the first frame in which there is no target frame for which a difference is to be obtained, but for subsequent frames, the encoded information is compared with the immediately preceding frame (reference frame) obtained by further decoding the encoded information. Take the difference,
The difference is encoded.

【0003】しかし、この方法では、全てのフレームに
ついて1画面をそのまま符号化する場合に比べれば情報
量を少なくできるが、差分をとるフレーム間で画面に動
きがあった部分については、差分値が大きくなることが
あり、情報量の圧縮という点に関してはまだまだ十分と
は言えない。そこで、このような場合も考慮して更に効
率的に情報量を圧縮するために、動き補償という方法
(動き補償フレーム間符号化)が用いられる。
[0003] However, in this method, the amount of information can be reduced as compared with the case where one screen is directly encoded for all frames. However, the compression of the amount of information is still not enough. Therefore, a method called motion compensation (motion-compensated inter-frame coding) is used in order to more efficiently compress the information amount in consideration of such a case.

【0004】動き補償を用いないフレーム間符号化にお
いては、フレーム間の差分は、比較される両フレームの
空間座標が互いに同一の箇所でとられる。これに対して
動き補償を用いる場合は、両フレームの空間座標は必ず
しも同一である必要はなく、画面の動きを考慮し、フレ
ーム間の差分がより小さくなるような参照フレームの箇
所との間で差分がとられる。このときの符号化対象箇所
の座標と参照フレーム内の差分をとる箇所の座標とのず
れを表すのが動ベクトルである。これを図面を用いて説
明する。
[0004] In inter-frame coding without using motion compensation, the difference between frames is calculated at a location where spatial coordinates of both frames to be compared are the same. On the other hand, when motion compensation is used, the spatial coordinates of both frames do not necessarily have to be the same, and the motion of the screen is taken into consideration, and the space between the reference frame and the point where the difference between the frames becomes smaller is considered. The difference is taken. At this time, a motion vector represents a difference between the coordinates of the encoding target portion and the coordinates of the difference portion in the reference frame. This will be described with reference to the drawings.

【0005】図3は、動き補償フレーム間予測および動
ベクトルの説明図である。図3において、301は参照
フレーム、302は符号化対象フレームであり、白抜き
の星☆だけが動いていて背景は全く動いていない様子が
示されている。符号化対象フレーム302は、動き補償
フレーム間符号化を行うにあたって複数の小さなブロッ
クに分割され、このブロック単位で符号化が行われる。
FIG. 3 is an explanatory diagram of motion-compensated inter-frame prediction and motion vectors. In FIG. 3, reference numeral 301 denotes a reference frame, and 302 denotes a frame to be encoded, in which only the white stars move and the background does not move at all. The encoding target frame 302 is divided into a plurality of small blocks when performing motion compensation inter-frame encoding, and encoding is performed in units of these blocks.

【0006】例えば、動画像通信の符号化標準であるI
TU−T勧告H.261やH.263、動画像蓄積の符
号化標準であるMPEG1やMPEG2、MPEG4で
は、マクロブロックと呼ばれる縦横16画素の単位に分
割して符号化される。303は符号化対象フレーム30
2を複数のマクロブロックに分割した様子を示すもので
ある。
For example, I, which is an encoding standard for moving picture communication,
TU-T Recommendation H. 261 and H.E. In H.263, MPEG1, MPEG2, and MPEG4, which are encoding standards for storing moving images, encoding is performed by dividing the image into 16-pixel units called macroblocks. Reference numeral 303 denotes the encoding target frame 30
2 shows a state in which 2 is divided into a plurality of macro blocks.

【0007】今、符号化対象フレーム303の分割され
た複数のマクロブロックのうち、白抜きの星☆がある3
03aのブロックに注目する。304は301と同じ参
照フレームであるが、ここでマクロブロック303aと
同じ座標のブロックは、304aのブロックとなる。し
かし、これらのフレーム間では動きが発生しているの
で、マクロブロック303aとの差分をとるにあたって
その差分値が最も小さくなるのは304bに位置するブ
ロックである。このとき、ブロック304aの座標とブ
ロック304bの座標とのずれを表す304cが動ベク
トルとなる。
[0007] Among the plurality of divided macroblocks of the encoding target frame 303, there is a white star 3
Notice the block 03a. Reference numeral 304 denotes the same reference frame as 301, but the block having the same coordinates as the macroblock 303a is the block of 304a. However, since motion occurs between these frames, the difference in the difference from the macroblock 303a is the smallest in the block located in 304b. At this time, a motion vector is a motion vector 304c representing a difference between the coordinates of the block 304a and the coordinates of the block 304b.

【0008】情報の圧縮という点に関しては、符号化対
象フレーム内のマクロブロック303aと参照フレーム
内のブロック304aとの差分を符号化するよりも、符
号化対象フレーム内のマクロブロック303aと参照フ
レーム内のブロック304bとの差分および動ベクトル
304cを符号化した方が効率が良い。
In terms of information compression, the difference between the macroblock 303a in the encoding target frame and the block 304a in the reference frame is encoded, rather than the encoding between the macroblock 303a in the encoding target frame and the reference frame. It is more efficient to encode the difference from the block 304b and the motion vector 304c.

【0009】この動ベクトルを検出する方法として、よ
く用いられる方法の1つにブロックマッチング法があ
る。これは、符号化対象ブロックの位置を中心にして動
ベクトルを検出するための探索範囲をあらかじめ設定
し、その探索範囲内の全ての候補ベクトルに対するブロ
ックについて符号化対象ブロックの各画素との差分の絶
対値の合計を算出し、その合計値が最小となった候補ブ
ロックを参照ブロック(図3のブロック304bに相
当)として採用するという方法である。これを図面を用
いて説明する。
As a method of detecting the motion vector, there is a block matching method as one of the frequently used methods. This means that a search range for detecting a motion vector is set in advance around the position of the coding target block, and the difference between each pixel of the coding target block and each candidate vector within the search range is determined. In this method, the total of the absolute values is calculated, and the candidate block having the minimum total value is adopted as a reference block (corresponding to the block 304b in FIG. 3). This will be described with reference to the drawings.

【0010】図4は、ブロックマッチング法の説明図で
あり、簡略化のため、符号化対象ブロックは縦横2画
素、探索範囲は符号化対象ブロックを中心にして上下左
右とも+2画素の範囲としている。図4において、40
1は符号化対象フレーム内の符号化対象ブロック位置を
示し、402は1フレーム前の参照フレーム内の探索範
囲を示している。403〜427は探索範囲402内の
全ての候補ベクトルに対するブロックである。また、○
内の数字は、画素番号を示している。
FIG. 4 is an explanatory diagram of the block matching method. For simplicity, the coding target block is 2 pixels vertically and horizontally, and the search range is a range of +2 pixels in the vertical, horizontal, and horizontal directions around the coding target block. . In FIG.
1 indicates the position of the block to be coded in the frame to be coded, and 402 indicates the search range in the reference frame one frame before. 403 to 427 are blocks for all the candidate vectors in the search range 402. Also, ○
Numerals in parentheses indicate pixel numbers.

【0011】この例の場合、符号化対象ブロック401
と探索範囲402内の各候補ブロック403〜427と
の間で対応する位置の画素間の差分絶対値の合計を算出
する。左上の候補ブロック403を例にとると、|a15-
b1|+|a16-b2|+|a21-b7|+|a22-b8|を算出する
ことになる。ここで、a** は符号化対象画素の値、b**
は参照画素の値であり、**が図4の画素番号に対応して
いる。同様の演算を他の候補ブロック404〜427に
ついても行い、その結果が最小であったブロックを参照
ブロックとして採用する。
In the case of this example, the encoding target block 401
Then, the sum of absolute differences between pixels at corresponding positions between the candidate blocks 403 to 427 in the search range 402 is calculated. Taking the upper left candidate block 403 as an example, | a15-
b1 | + | a16-b2 | + | a21-b7 | + | a22-b8 | Where a ** is the value of the pixel to be coded, b **
Is the value of the reference pixel, and ** corresponds to the pixel number in FIG. The same operation is performed for the other candidate blocks 404 to 427, and the block having the minimum result is adopted as a reference block.

【0012】[0012]

【発明が解決しようとする課題】このように動ベクトル
を求める圧縮方式においては、画面内における画像の動
きが速い場合も考えられることから、動ベクトル検出の
精度を高める、すなわち符号化対象ブロックとの間で各
画素毎の差分絶対値の合計ができるだけ小さくなる参照
ブロックを検出するためには、候補ベクトルがより多く
含まれるように探索範囲を広げれば良い。しかしなが
ら、探索範囲を広げると、それだけ動き探索の演算量が
増大し、動ベクトルの検出に要する時間が増加してしま
うという問題がある。
In the compression method for obtaining a motion vector as described above, it is conceivable that the motion of an image in a screen is fast. In order to detect a reference block in which the sum of absolute differences for each pixel is as small as possible, the search range may be expanded so that more candidate vectors are included. However, if the search range is widened, the amount of calculation for motion search increases accordingly, and there is a problem that the time required for detecting a motion vector increases.

【0013】本発明はこのような問題を解決するために
成されたものであり、例えばH.261、H.263や
MPEG1、2、4等のような動ベクトル検出を伴う符
号化方式において、動き探索の演算量を増大することな
く(演算処理に要する時間を増大することなく)、動ベ
クトルの検出精度を高めることができるようにすること
を目的とする。
The present invention has been made to solve such a problem. 261, H .; In coding schemes with motion vector detection such as H.263 and MPEG1, 2, 4, etc., the accuracy of motion vector detection can be improved without increasing the amount of motion search operation (without increasing the time required for operation processing). The aim is to be able to increase.

【0014】[0014]

【課題を解決するための手段】本発明の動ベクトル検出
装置は、符号化対象ブロック内の各画素値と動ベクトル
探索範囲中で参照ブロックの候補となるブロック内の各
画素値との差分絶対値を計算し、当該計算した各画素毎
の差分絶対値を上記符号化対象ブロックを複数に分割し
た各サブブロックごとに合算するとともに、それらの合
算結果を更に合算し、上記サブブロックごとの合算結果
かそれら全ての合算結果の何れかに基づいて動ベクトル
を求めるようにしたことを特徴とする。
SUMMARY OF THE INVENTION A motion vector detecting apparatus according to the present invention provides a method for detecting a difference between each pixel value in a current block and each pixel value in a reference block candidate block in a motion vector search range. Calculating the absolute value of the difference for each pixel for each sub-block obtained by dividing the block to be encoded into a plurality of blocks, further summing up the sum of the results, and summing the sum for each of the sub-blocks. A motion vector is obtained based on either the result or the sum of all the results.

【0015】本発明の他の態様では、上記符号化対象ブ
ロック単位の動ベクトルを求めるか上記サブブロック単
位の動ベクトルを求めるかに応じて、上記参照ブロック
の候補となるブロック内の各画素値の入力に対して上記
符号化対象ブロック内の各画素毎の差分絶対値計算手段
を全て接続するか、上記符号化対象ブロック中の1つの
サブブロック内の差分絶対値計算手段だけを他と切り離
して接続するかを切り換える切り換え手段を備えたこと
を特徴とする。
In another aspect of the present invention, each pixel value in the reference block candidate block is determined according to whether the motion vector in the encoding target block unit or the motion vector in the sub block unit is obtained. Connect the difference absolute value calculation means for each pixel in the encoding target block to the input, or separate only the difference absolute value calculation means in one sub-block in the encoding target block from the others. Switching means for switching between connection and connection.

【0016】本発明のその他の態様では、上記サブブロ
ック単位の動ベクトルを求める際に所定のオフセットを
加えることにより、上記サブブロック単位の動ベクトル
を求める際の動ベクトル探索範囲を移動させるオフセッ
ト手段を更に備えたことを特徴とする。
In another aspect of the present invention, an offset means for adding a predetermined offset when obtaining the motion vector in the sub-block unit, thereby moving a motion vector search range in obtaining the motion vector in the sub-block unit. Is further provided.

【0017】本発明のその他の態様では、符号化対象ブ
ロック内の各画素値と動ベクトル探索範囲中で参照ブロ
ックの候補となるブロック内の各画素値との差分絶対値
を計算する各画素毎の差分絶対値計算手段と、上記差分
絶対値計算手段により求められた各画素毎の差分絶対値
を上記符号化対象ブロックを複数に分割した各サブブロ
ックごとに合算する複数のサブブロック合算手段と、上
記複数のサブブロック合算手段での各計算結果を合算す
るブロック合算手段と、上記サブブロック合算手段によ
る計算結果か上記ブロック合算手段による計算結果の何
れかに基づいて上記参照ブロックを決定し、動ベクトル
を求める動ベクトル発生手段と、上記動ベクトル発生手
段を所定の制御信号により制御する制御手段とを備えた
ことを特徴とする。
According to another aspect of the present invention, each pixel for calculating the absolute value of the difference between each pixel value in the current block and each pixel value in a reference block candidate block in the motion vector search range is calculated. Difference absolute value calculating means, and a plurality of sub-block summing means for summing the difference absolute value for each pixel obtained by the difference absolute value calculating means for each sub-block obtained by dividing the encoding target block into a plurality of sub-blocks A block summing means for summing the respective calculation results in the plurality of sub-block summing means, and determining the reference block based on either the calculation result by the sub-block summing means or the calculation result by the block summing means, A motion vector generating means for obtaining a motion vector; and a control means for controlling the motion vector generating means by a predetermined control signal.

【0018】本発明のその他の態様では、符号化対象ブ
ロック内の各画素値と動ベクトル探索範囲中で参照ブロ
ックの候補となるブロック内の各画素値との差分絶対値
を計算する各画素毎の差分絶対値計算手段と、上記差分
絶対値計算手段により求められた各画素毎の差分絶対値
を上記符号化対象ブロックを複数に分割した各サブブロ
ックごとに合算する複数のサブブロック合算手段と、上
記複数のサブブロック合算手段での各計算結果を合算す
るブロック合算手段と、上記参照ブロックの候補となる
ブロック内の各画素値の入力に対して上記符号化対象ブ
ロック内の全ての差分絶対値計算手段を接続するか、上
記符号化対象ブロック中の1つのサブブロック内の差分
絶対値計算手段だけを他と切り離して接続するかを切り
換える切り換え手段と、上記サブブロック合算手段によ
る計算結果か上記ブロック合算手段による計算結果の何
れかに基づいて上記参照ブロックを決定し、動ベクトル
を求める動ベクトル発生手段と、上記切り換え手段およ
び上記動ベクトル発生手段を所定の制御信号により制御
する制御手段とを備えたことを特徴とする。
In another aspect of the present invention, each pixel for calculating an absolute value of a difference between each pixel value in a current block and each pixel value in a candidate block of a reference block in a motion vector search range is calculated. Difference absolute value calculating means, and a plurality of sub-block summing means for summing the difference absolute value for each pixel obtained by the difference absolute value calculating means for each sub-block obtained by dividing the encoding target block into a plurality of sub-blocks A block summing means for summing the respective calculation results in the plurality of sub-block summing means, and an input of each pixel value in the candidate block of the reference block, the absolute value of all differences in the encoding target block. A switching means for switching whether to connect the value calculation means or to connect only the difference absolute value calculation means in one of the sub-blocks in the encoding target block separately from the other. A motion vector generating means for determining the reference block based on either the calculation result by the sub-block summing means or the calculation result by the block summing means and obtaining a motion vector; the switching means and the motion vector generating means And control means for controlling the control by a predetermined control signal.

【0019】本発明のその他の態様では、符号化対象ブ
ロック内の各画素値と動ベクトル探索範囲中で参照ブロ
ックの候補となるブロック内の各画素値との差分絶対値
を計算し、この計算結果に基づいて上記参照ブロックを
決定して動ベクトルを発生する動ベクトル検出装置であ
って、上記符号化対象ブロック位置を含む所定の矩形領
域内において上記符号化対象ブロックからの距離が遠い
領域を除外した範囲を上記動ベクトル探索範囲として計
算を行うようにしたことを特徴とする。
In another embodiment of the present invention, the absolute value of the difference between each pixel value in the current block and each pixel value in a reference block candidate block in the motion vector search range is calculated. A motion vector detection device that determines the reference block based on a result and generates a motion vector, wherein an area having a long distance from the encoding target block in a predetermined rectangular area including the encoding target block position is determined. The calculation is performed using the excluded range as the motion vector search range.

【0020】本発明のその他の態様では、ブロックマッ
チング法により動ベクトルを発生する動ベクトル検出装
置であって、複数のシフトレジスタが直列に接続され、
動ベクトル探索範囲内の各画素値を上記直列に接続され
たシフトレジスタの初段から最終段へと順次送りながら
入力していくようになされるとともに、各シフトレジス
タの出力が個別に取り出されるようになされたシフトレ
ジスタ群と、符号化対象ブロック内の所定の画素位置に
各々対応して設けられ、上記シフトレジスタ群内の所定
のシフトレジスタからの出力を複数入力してその中から
何れかを選択的に出力する複数の選択手段と、上記符号
化対象ブロック内の各画素値と、上記選択手段あるいは
上記シフトレジスタ群より供給される、上記動ベクトル
探索範囲中で参照ブロックの候補となるブロック内の各
画素値との差分絶対値を計算する各画素毎の差分絶対値
計算手段と、上記選択手段を所定の制御信号により制御
する制御手段とを備えたことを特徴とする。
According to another aspect of the present invention, there is provided a motion vector detecting device for generating a motion vector by a block matching method, wherein a plurality of shift registers are connected in series,
Each pixel value in the motion vector search range is sequentially input from the first stage to the last stage of the serially connected shift registers while being input, and the output of each shift register is individually extracted. And a plurality of outputs from the predetermined shift registers in the shift register group, and a plurality of outputs from the predetermined shift registers in the shift register group are selected and selected from among them. And a plurality of selection means for outputting each pixel value in the block to be encoded, and a reference block candidate in the motion vector search range supplied from the selection means or the shift register group. A difference absolute value calculation means for each pixel for calculating a difference absolute value with respect to each pixel value, and a control means for controlling the selection means with a predetermined control signal. And it said that there were pictures.

【0021】本発明のその他の態様では、上記シフトレ
ジスタ群に各画素値が入力される上記動ベクトル探索範
囲は、上記符号化対象ブロック位置を含む所定の矩形領
域内において上記符号化対象ブロックからの距離が遠い
領域を除外した範囲であることを特徴とする。
In another aspect of the present invention, the motion vector search range in which each pixel value is input to the shift register group is set within a predetermined rectangular area including the position of the encoding target block from the encoding target block. Is a range excluding a region where the distance is long.

【0022】また、本発明の記録媒体は、符号化対象ブ
ロック内の各画素値と動ベクトル探索範囲中で参照ブロ
ックの候補となるブロック内の各画素値との差分絶対値
を計算し、当該計算した各画素毎の差分絶対値を上記符
号化対象ブロックを複数に分割した各サブブロックごと
に合算するとともに、それらの合算結果を更に合算し、
上記サブブロックごとの合算結果かそれら全ての合算結
果の何れかに基づいて動ベクトルを求めるようになされ
た動ベクトル検出装置において、上記符号化対象ブロッ
ク単位の動ベクトルを求めるか上記サブブロック単位の
動ベクトルを求めるかに応じて、上記参照ブロックの候
補となるブロック内の各画素値の入力に対する上記符号
化対象ブロック内の各画素毎の差分絶対値計算手段の接
続状態を切り換えるとともに、上記サブブロックごとの
合算結果かそれら全ての合算結果の何れかを選択して動
ベクトルを求めるようにする機能をコンピュータに実現
させるためのプログラムを記録したことを特徴とする。
Further, the recording medium of the present invention calculates the absolute difference between each pixel value in the current block and each pixel value in a reference block candidate block in the motion vector search range. The calculated absolute value of the difference for each pixel is added to each of the sub-blocks obtained by dividing the encoding target block into a plurality, and the sum of the results is further added,
In the motion vector detection device adapted to obtain a motion vector based on either the sum result of each sub-block or the sum result of all of them, a motion vector of the encoding target block unit is obtained or the sub-block unit is obtained. Depending on whether a motion vector is obtained, the connection state of the difference absolute value calculation means for each pixel in the encoding target block with respect to the input of each pixel value in the reference block candidate block is switched, and It is characterized by recording a program for realizing a function of obtaining a motion vector by selecting either the summation result for each block or all the summation results.

【0023】本発明の他の態様では、上記サブブロック
単位の動ベクトルを求める際に画像の動きに応じて所定
のオフセットを加えることにより、上記動ベクトル探索
範囲を移動させて当該動ベクトル探索範囲内の各画素値
を読み出すようにする機能を更にコンピュータに実現さ
せるためのプログラムを記録したことを特徴とする。
In another aspect of the present invention, the motion vector search range is shifted by adding a predetermined offset according to the motion of the image when obtaining the motion vector in sub-block units. A program for causing a computer to further realize a function of reading each pixel value in the program is recorded.

【0024】本発明のその他の態様では、符号化対象ブ
ロック内の各画素値と動ベクトル探索範囲中で参照ブロ
ックの候補となるブロック内の各画素値との差分絶対値
を計算し、この計算結果に基づいて上記参照ブロックを
決定して動ベクトルを発生する動ベクトル検出装置にお
いて、上記符号化対象ブロック位置を含む所定の矩形領
域内において上記符号化対象ブロックからの距離が遠い
領域を除外した範囲を上記動ベクトル探索範囲として計
算を行うようにする機能をコンピュータに実現させるた
めのプログラムを記録したことを特徴とする。
According to another aspect of the present invention, the absolute value of the difference between each pixel value in the current block and each pixel value in a reference block candidate block within the motion vector search range is calculated. In the motion vector detection device that determines the reference block based on a result and generates a motion vector, an area that is far from the encoding target block in a predetermined rectangular area including the encoding target block position is excluded. It is characterized in that a program for causing a computer to realize a function of performing a calculation using the range as the motion vector search range is recorded.

【0025】本発明は上記技術手段より成るので、差分
絶対値計算手段により計算された各画素毎の差分絶対値
を用いて、複数のサブブロック合算手段の計算結果から
サブブロック単位の動ベクトルを求めることができると
ともに、各サブブロックでの合算結果を更に合算したブ
ロック合算手段の計算結果からマクロブロック単位の動
ベクトルを求めることができるようになり、1つの動ベ
クトル検出部でマクロブロック単位の動ベクトルとサブ
ブロック単位の動ベクトルとの両方を求めることが可能
となる。このとき、サブブロック単位の動ベクトルを求
める際に例えば画像の動きに応じてオフセットを加える
ことにより、動ベクトル探索範囲を移動させて処理する
ことが可能となる。
Since the present invention comprises the above technical means, the motion vector for each sub-block is obtained from the calculation results of the plurality of sub-block summing means by using the difference absolute value for each pixel calculated by the difference absolute value calculating means. The motion vector can be obtained, and the motion vector of each macroblock can be obtained from the calculation result of the block summing unit obtained by further summing the sum result of each sub-block. It is possible to obtain both a motion vector and a motion vector for each sub-block. At this time, when obtaining a motion vector for each sub-block, for example, by adding an offset according to the motion of an image, it is possible to move the motion vector search range and perform processing.

【0026】本発明の他の特徴によれば、符号化対象ブ
ロック内の全ての差分絶対値計算手段を接続するか、1
つのサブブロック内の差分絶対値計算手段だけを他と切
り離して接続するかを切り換える切り換え手段を設けた
ので、サブブロック単位の動ベクトルを求めるときは、
各サブブロック毎に独立して候補ブロックの各画素値を
入力することができる。これにより、例えば各サブブロ
ック毎に与えられるオフセットが互いに異なっていて
も、それぞれに適切な画素値を入力することができるよ
うになる。
According to another feature of the present invention, all difference absolute value calculation means in the current block are connected or
Since switching means for switching whether to connect only the absolute difference value calculating means in one sub-block separately from the other is provided, when obtaining a motion vector in sub-block units,
Each pixel value of the candidate block can be input independently for each sub-block. Thus, for example, even if offsets given to respective sub-blocks are different from each other, it becomes possible to input an appropriate pixel value to each.

【0027】本発明のその他の特徴によれば、符号化対
象ブロック位置を含む所定の矩形領域内において、符号
化対象ブロックからの距離が遠い領域を除外した範囲を
動ベクトル探索範囲として計算を行うようにしたので、
矩形領域の探索範囲を通常より大きく広げても、その大
きな矩形領域内で参照ブロックの候補として差分絶対値
計算の対象となるブロックの数が増大しないようにする
ことができる。
According to another feature of the present invention, in a predetermined rectangular area including the position of the block to be coded, the range excluding the area far from the block to be coded is calculated as a motion vector search range. So,
Even if the search range of the rectangular area is expanded more than usual, it is possible to prevent the number of blocks to be subjected to difference absolute value calculation as reference block candidates within the large rectangular area from increasing.

【0028】[0028]

【発明の実施の形態】以下、本発明の一実施形態を図面
に基づいて説明する。一般に、H.261、H.263
やMPEG1、2、4等の符号化方式においては、動ベ
クトル検出以降の符号化処理(例えばDCT処理を含む
もの)は、縦横16画素のマクロブロックを更に4分割
したサブブロックと呼ばれる縦横8画素の単位で行われ
る。特に、H.263やMPEG4では、マクロブロッ
ク単位の動ベクトルばかりでなく、サブブロック単位の
動ベクトルを採用することも可能であり、両方を求めて
おいて効率の良い方を選ぶことができる。このサブブロ
ック単位の動ベクトルについて図面を用いて説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. In general, 261, H .; 263
In encoding methods such as MPEG1, MPEG2, MPEG4, and the like, encoding processing after detection of a motion vector (for example, including DCT processing) is performed by dividing a macroblock of 16 pixels vertically and horizontally into 8 sub-blocks called sub-blocks. Is performed in units of In particular, H. In H.263 and MPEG4, not only a motion vector in a macroblock unit but also a motion vector in a subblock unit can be adopted, and the more efficient one can be selected by obtaining both. The motion vector in sub-block units will be described with reference to the drawings.

【0029】図5は、サブブロック単位の動ベクトルの
説明図であり、簡略化のため、符号化対象マクロブロッ
クは縦横4画素、探索範囲は符号化対象マクロブロック
を中心にして上下左右とも+2画素の範囲としている。
図5において、501は符号化対象フレーム内の符号化
対象マクロブロックを示し、502は1フレーム前の参
照フレーム内のマクロブロック単位の探索範囲を示して
いる。また、503〜506は符号化対象マクロブロッ
ク501を4分割して得られるサブブロックであり、そ
れぞれ縦横2画素で構成されている。
FIG. 5 is an explanatory diagram of a motion vector in units of sub-blocks. For simplicity, the macroblock to be coded is 4 pixels vertically and horizontally, and the search range is +2 for both the top, bottom, left and right of the macroblock to be coded. It is the range of pixels.
In FIG. 5, reference numeral 501 denotes an encoding target macroblock in the encoding target frame, and reference numeral 502 denotes a search range in units of a macroblock in a reference frame one frame before. Reference numerals 503 to 506 denote sub-blocks obtained by dividing the encoding-target macro block 501 into four, each of which is composed of two pixels vertically and horizontally.

【0030】この例の場合、サブブロック単位の動ベク
トルは、左上のサブブロック503を例にとると、その
サブブロック503について上下左右に+2画素をとっ
た探索範囲507において動ベクトル検出を行った結果
となる。この動ベクトルの検出法は図4で説明した通り
である。同様に、サブブロック504〜506の動ベク
トルは、それらのサブブロックについての探索範囲50
8〜510においてそれぞれ動ベクトル検出を行った結
果となる。
In the case of this example, as for the motion vector in the sub-block unit, when the upper left sub-block 503 is taken as an example, the motion vector is detected for the sub-block 503 in the search range 507 in which +2 pixels are taken up, down, left and right. Results. The method of detecting the motion vector is as described with reference to FIG. Similarly, the motion vectors of the sub-blocks 504 to 506 are the search ranges 50 for those sub-blocks.
8 to 510 are the results of motion vector detection.

【0031】さらに、H.263やMPEG4では、サ
ブブロック単位の動ベクトル検出のための探索範囲の中
心を、符号化対象サブブロックの位置と全く同じにせず
に、オフセットを加えて所定量だけ移動させることが可
能である。これを図面を用いて説明する。
Further, H. In H.263 and MPEG4, the center of the search range for detecting a motion vector in units of sub-blocks can be moved by a predetermined amount by adding an offset without making the center of the search target sub-block exactly the same. This will be described with reference to the drawings.

【0032】図6は、サブブロック単位の探索範囲にオ
フセットを加えた場合の動ベクトル検出の説明図であ
る。図6において、503は図5に示した左上の符号化
対象サブブロックの位置を示す。この符号化対象サブブ
ロック503の動ベクトル検出のための探索範囲の原点
を、オフセットを加えることで例えば601の位置にず
らし、サブブロック単位の探索範囲もそれに合わせて6
02の位置にずらすことがH.263やMPEG4では
可能である。
FIG. 6 is an explanatory diagram of motion vector detection when an offset is added to the search range in sub-block units. 6, reference numeral 503 denotes the position of the encoding target sub-block at the upper left shown in FIG. The origin of the search range for detecting the motion vector of the encoding target sub-block 503 is shifted to, for example, the position 601 by adding an offset, and the search range in units of sub-blocks is also adjusted to 6.
02 to the H. 02 position. H.263 and MPEG4 are possible.

【0033】なお、オフセットの値は、マクロブロック
単位の探索範囲502内に制限されることはないので、
オフセットの値によっては、サブブロック単位の探索範
囲602がマクロブロック単位の探索範囲502を外れ
ることもあり得る。これによれば、画像の動きが速くて
本来の位置の探索範囲内に符号化対象サブブロックの画
像と同じ画像がない場合でも、まわりのブロックの動き
から予想したオフセットを加えて探索範囲をずらすこと
により、符号化対象サブブロックと同じ画像が存在する
最適なブロックを参照サブブロックとして採用すること
ができる。
Note that the offset value is not limited within the search range 502 for each macroblock.
Depending on the value of the offset, the search range 602 in units of sub-blocks may deviate from the search range 502 in units of macro blocks. According to this, even when the motion of the image is fast and the same image as the image of the encoding target sub-block does not exist within the search range of the original position, the search range is shifted by adding the offset predicted from the motion of the surrounding blocks. Thus, an optimal block in which the same image as the encoding target sub-block exists can be adopted as the reference sub-block.

【0034】上記のようにサブブロック単位の動ベクト
ルも採用可能なH.263やMPEG4は、最近になっ
て標準化が成されたばかりであり、これらを応用した製
品はまだ数多く存在しないのが現状である。したがっ
て、マクロブロック単位の動ベクトルとサブブロック単
位の動ベクトルとの両方を求めて効率の良い方を選ぶよ
うにするための装置をどのように構成するかは、今後の
課題とも言える。
As described above, H.264, which can also use a motion vector in sub-block units, can be used. H.263 and MPEG4 have only recently been standardized, and at present there are not many products to which they are applied. Therefore, it can be said that how to configure a device for obtaining both the motion vector in the macroblock unit and the motion vector in the subblock unit and selecting the more efficient one will be a future subject.

【0035】そこで本発明では、オフセットを考慮した
サブブロック単位の動ベクトルを採用することも可能な
H.263やMPEG4の応用化に先駆けて、マクロブ
ロック単位の動ベクトルとサブブロック単位の動ベクト
ルとをより簡単な構成で求めることが可能な動ベクトル
検出装置を提供することを第1の目的とし、以下に述べ
る第1の実施形態を提案する。
Therefore, according to the present invention, it is possible to use a motion vector in a unit of a sub-block in consideration of an offset. Prior to the application of H.263 and MPEG4, a first object is to provide a motion vector detection device capable of obtaining a motion vector of a macroblock unit and a motion vector of a subblock unit with a simpler configuration, A first embodiment described below is proposed.

【0036】(第1の実施形態)図1は、第1の実施形
態による動ベクトル検出装置の要部構成を示すブロック
図であり、簡略化のため、図5に示したように符号化対
象マクロブロックが縦横4画素、マクロブロック単位の
探索範囲が符号化対象マクロブロックを中心にして上下
左右とも+2画素の範囲の場合を想定している。
(First Embodiment) FIG. 1 is a block diagram showing a main part of a motion vector detecting device according to a first embodiment. For simplicity, as shown in FIG. It is assumed that the macroblock is 4 pixels vertically and horizontally, and the search range in macroblock units is +2 pixels in both the upper, lower, left, and right directions with respect to the encoding target macroblock.

【0037】図1において、101は差分絶対値計算回
路、102a〜102dはサブブロック合算回路、10
3はマクロブロック合算回路、104は最小値決定/動
ベクトル発生回路、105aおよび105bはフレーム
メモリ、106aおよび106bは読み出し回路、10
7は制御回路である。
In FIG. 1, reference numeral 101 denotes a difference absolute value calculation circuit; 102a to 102d, sub-block summation circuits;
3 is a macroblock summation circuit, 104 is a minimum value determination / motion vector generation circuit, 105a and 105b are frame memories, 106a and 106b are readout circuits,
7 is a control circuit.

【0038】符号化対象フレームの画像は、第1のフレ
ームメモリ105aに格納され、その中から第1の読み
出し回路106aより出力されるアドレスに従って符号
化対象マクロブロックの各画素値(以下、符号化対象マ
クロブロックデータという)が読み出されて差分絶対値
計算回路101に供給される。また、上記符号化対象フ
レームより1フレーム前の参照フレームの画像は、第2
のフレームメモリ105bに格納され、その中から第2
の読み出し回路106bより出力されるアドレスに従っ
て探索範囲内の各画素値(以下、探索データという)が
読み出されて差分絶対値計算回路101に供給される。
The image of the encoding target frame is stored in the first frame memory 105a, and each pixel value (hereinafter referred to as encoding) of the encoding target macroblock is stored in accordance with the address output from the first reading circuit 106a. The target macroblock data is read and supplied to the absolute difference calculation circuit 101. The image of the reference frame one frame before the frame to be encoded is the second frame.
Is stored in the frame memory 105b of the
The respective pixel values within the search range (hereinafter referred to as search data) are read out according to the address output from the readout circuit 106b and supplied to the absolute difference value calculation circuit 101.

【0039】上記差分絶対値計算回路101の内部にお
いて、11a〜11pは画素毎の差分絶対値計算回路
(以下、PDCという)、12a〜12gはマルチプレ
クサ(以下、MPXという)、13a〜13cは4つの
シフトレジスタが直列に接続された4段シフトレジスタ
である。上記PDC11a〜11pの位置は、実際の画
面上の符号化対象マクロブロックの画素の位置に対応し
ている。したがって、図1中の点線で囲んだ部分14a
〜14dがマクロブロック内の各サブブロックの位置に
対応している。
In the difference absolute value calculation circuit 101, reference numerals 11a to 11p denote difference absolute value calculation circuits (hereinafter, referred to as PDC) for each pixel, reference numerals 12a to 12g denote multiplexers (hereinafter, referred to as MPX), and reference numerals 13a to 13c denote four. This is a four-stage shift register in which two shift registers are connected in series. The positions of the PDCs 11a to 11p correspond to the positions of the pixels of the encoding target macroblock on the actual screen. Therefore, the portion 14a surrounded by the dotted line in FIG.
1414d correspond to the positions of the respective sub-blocks in the macroblock.

【0040】さらに、上記PDC11a〜11pの内部
構成を図2に示す。図2において、201〜203はシ
フトレジスタ、204は計算回路である。第1のシフト
レジスタ201は、第1のフレームメモリ105aから
読み出された符号化対象マクロブロックデータの1画素
分を保持する。第3のシフトレジスタ203は、前段の
種々の回路から送られてくる探索データの1画素分を保
持する。
FIG. 2 shows the internal structure of the PDCs 11a to 11p. In FIG. 2, 201 to 203 are shift registers, and 204 is a calculation circuit. The first shift register 201 holds one pixel of the encoding target macro block data read from the first frame memory 105a. The third shift register 203 holds one pixel of search data sent from various circuits at the preceding stage.

【0041】計算回路204は、上記第1のシフトレジ
スタ201に保持された1画素分の符号化対象マクロブ
ロックデータAと、シフトレジスタ203に保持された
1画素分の探索データBとの差分絶対値|A−B|を計
算し、その計算結果を第2のシフトレジスタ202に保
持する。第2のシフトレジスタ202に保持された1画
素分の差分絶対値は、4つのサブブロック合算回路10
2a〜102dのうち対応する回路に出力され、第3の
シフトレジスタ203に保持された探索データBは、上
記差分絶対値が出力されるのと同じタイミングで次段に
出力される。
The calculation circuit 204 calculates the absolute difference between the macroblock data A for encoding for one pixel held in the first shift register 201 and the search data B for one pixel held in the shift register 203. The value | AB | is calculated, and the calculation result is stored in the second shift register 202. The absolute value of the difference for one pixel held in the second shift register 202 is calculated by the four sub-block summing circuits 10.
The search data B output to the corresponding circuit out of 2a to 102d and held in the third shift register 203 is output to the next stage at the same timing as when the absolute difference value is output.

【0042】各PDC11a〜11pが図2のように構
成されているので、差分絶対値計算回路101内の各行
では、入力された探索データが右から左へと順に送られ
ていく。上から2行目以降の一番左にあるPDC11
c,11i,11kから出力された探索データは、それ
ぞれその上の行の右端に送られる。3個の4段シフトレ
ジスタ13a〜13cは、1番下の行を除いた残り3行
の各PDCよりも入力側(右側)に夫々設けられてい
る。
Since each of the PDCs 11a to 11p is configured as shown in FIG. 2, in each row in the absolute difference calculating circuit 101, the input search data is sequentially transmitted from right to left. The leftmost PDC11 in the second and subsequent rows from the top
The search data output from c, 11i, and 11k is sent to the right end of the line above it. The three four-stage shift registers 13a to 13c are provided on the input side (right side) of each of the PDCs in the remaining three rows except the bottom row.

【0043】本実施形態では、マクロブロック単位の探
索範囲が横方向に8画素であるのに対して、探索範囲内
の各候補ブロックの大きさは横方向に4画素で探索範囲
より4画素少ないので、各行に設けた3個の4段シフト
レジスタ13a〜13cは、候補ブロック内の画素値と
して使わない各行4画素分の探索データを格納するもの
として機能する。
In the present embodiment, the search range in the macroblock unit is 8 pixels in the horizontal direction, whereas the size of each candidate block in the search range is 4 pixels in the horizontal direction and 4 pixels smaller than the search range. Therefore, the three four-stage shift registers 13a to 13c provided in each row function as storing search data for four pixels in each row that are not used as pixel values in the candidate block.

【0044】また、MPX12aは、サブブロック14
aとサブブロック14bとの間にあり、PDC11eか
らの出力と4段シフトレジスタ13aからの出力とのど
ちらかを選択出力するようになっている。MPX12b
は、サブブロック14aとサブブロック14bとの間に
あり、PDC11gからの出力と第2のフレームメモリ
105bからの出力とのどちらかを選択出力するように
なっている。
Further, the MPX 12a has a sub-block 14
a and the sub-block 14b, and selectively outputs either the output from the PDC 11e or the output from the four-stage shift register 13a. MPX12b
Is between the sub-block 14a and the sub-block 14b, and selectively outputs either the output from the PDC 11g or the output from the second frame memory 105b.

【0045】MPX12cは、4段シフトレジスタ13
aの前段に設けられ、PDC11cからの出力とPDC
11gからの出力とのどちらかを選択出力するようにな
っている。MPX12dは、PDC11hの前段に設け
られ、4段シフトレジスタ13bからの出力と第2のフ
レームメモリ105bからの出力とのどちらかを選択出
力するようになっている。
The MPX 12c is a four-stage shift register 13
The output from the PDC 11c and the PDC
11g is selectively output. The MPX 12d is provided in a stage preceding the PDC 11h, and selectively outputs either the output from the four-stage shift register 13b or the output from the second frame memory 105b.

【0046】MPX12eは、サブブロック14cとサ
ブブロック14dとの間にあり、PDC11mからの出
力と4段シフトレジスタ13cからの出力とのどちらか
を選択出力するようになっている。MPX12fは、サ
ブブロック14cとサブブロック14dとの間にあり、
PDC11oからの出力と第2のフレームメモリ105
bからの出力とのどちらかを選択出力するようになって
いる。
The MPX 12e is located between the sub-block 14c and the sub-block 14d, and selectively outputs either the output from the PDC 11m or the output from the four-stage shift register 13c. MPX12f is between sub-block 14c and sub-block 14d,
Output from PDC 11o and second frame memory 105
b is selectively output.

【0047】MPX12gは、4段シフトレジスタ13
cの前段に設けられ、PDC11kからの出力とPDC
11oからの出力とのどちらかを選択出力するようにな
っている。以上に述べた各MPX12a〜12gは、制
御回路107から与えられるコントロール信号に応じて
切り換えられるようになっており、マクロブロック単位
の動ベクトルを求めるときは全て上側の入力が選択され
る。なお、サブブロック単位の動ベクトルを求めるとき
の選択状態は後述する。
The MPX 12g is a four-stage shift register 13
c, the output from the PDC 11k and the PDC
Either the output from 11o is selectively output. Each of the MPXs 12a to 12g described above can be switched in accordance with a control signal provided from the control circuit 107. When a motion vector in a macroblock unit is obtained, the upper input is selected. The selection state when obtaining the motion vector in sub-block units will be described later.

【0048】これにより、マクロブロック単位の動ベク
トルを求めるときは、16個のPDC11a〜11pが
3個の4段シフトレジスタ13a〜13cを途中に介し
ながら直列に接続され、探索データが右下のPDC11
pから左上のPDC11aへと順に送られていくことに
なる。一方、サブブロック単位の動ベクトルを求めると
きは、各サブブロック単位で4個のPDCが直列に接続
され、各サブブロック用の探索データが各サブブロック
の右下のPDCから左上のPDCへと順に送られていく
ことになる。
Thus, when obtaining a motion vector in units of macroblocks, 16 PDCs 11a to 11p are connected in series via three 4-stage shift registers 13a to 13c, and the search data is PDC11
From p, they are sent to the PDC 11a in the upper left. On the other hand, when obtaining a motion vector for each sub-block, four PDCs are connected in series for each sub-block, and search data for each sub-block is shifted from the lower right PDC of each sub-block to the upper left PDC. It will be sent in order.

【0049】各サブブロック合算回路102a〜102
dは、それぞれ対応するサブブロック14a〜14d内
で計算された各画素毎の差分絶対値の合計を求め、その
結果をマクロブロック合算回路103および最小値決定
/動ベクトル発生回路104に供給する。マクロブロッ
ク合算回路103は、各サブブロック合算回路102a
〜102dから供給されるサブブロック毎の差分絶対値
の合計を全て合計する計算を行い、その結果を最小値決
定/動ベクトル発生回路104に供給する。
Each sub-block summing circuit 102a-102
d calculates the sum of the absolute difference values for each pixel calculated in the corresponding sub-blocks 14a to 14d, and supplies the result to the macroblock summation circuit 103 and the minimum value determination / motion vector generation circuit 104. The macro block summation circuit 103 is provided with each sub-block summation circuit 102a.
A calculation is performed to sum all the absolute values of the differences for each sub-block supplied from to 102 d, and the result is supplied to the minimum value determination / motion vector generation circuit 104.

【0050】最小値決定/動ベクトル発生回路104
は、各サブブロック合算回路102a〜102dあるい
はマクロブロック合算回路103から各候補ブロック毎
に与えられる差分絶対値の合計値の中から最小のものを
決定する。そして、その合計値が最小の候補ブロックを
参照ブロックとして採用し、動ベクトルを発生する。
Minimum value determination / motion vector generation circuit 104
Determines the minimum value among the sums of absolute difference values given for each candidate block from each of the sub-block summation circuits 102a to 102d or the macroblock summation circuit 103. Then, the candidate block having the minimum total value is adopted as a reference block, and a motion vector is generated.

【0051】ここで、マクロブロック単位の動ベクトル
を求めるときはマクロブロック合算回路103からの合
計値を用いて1個の動ベクトルを求め、サブブロック単
位の動ベクトルを求めるときは各サブブロック合算回路
102a〜102dからの合計値を用いて4個の動ベク
トルを求める。最小値決定/動ベクトル発生回路104
でどちらの合計値を用いるかは、制御回路107から与
えられるコントロール信号によって制御される。
Here, when obtaining a motion vector for each macroblock, one motion vector is obtained using the total value from the macroblock summing circuit 103, and when obtaining a motion vector for each subblock, each subblock summation is obtained. Four motion vectors are obtained using the total value from the circuits 102a to 102d. Minimum value determination / motion vector generation circuit 104
Is controlled by a control signal provided from the control circuit 107.

【0052】次に、上記のように構成した本実施形態に
よる動ベクトル検出装置の動作について説明する。ま
ず、第1のフレームメモリ105aから符号化対象マク
ロブロックデータが差分絶対値計算回路101に入力さ
れ、各画素のデータがそれぞれ対応するPDC11a〜
11p中の第1のシフトレジスタ201に保持される。
この符号化対象マクロブロックデータは、同一のマクロ
ブロックの処理期間中はそのまま第1のシフトレジスタ
201に保持される。
Next, the operation of the motion vector detecting device according to the present embodiment configured as described above will be described. First, encoding target macroblock data is input from the first frame memory 105a to the absolute difference calculation circuit 101, and the data of each pixel is stored in the corresponding PDC 11a to
It is held in the first shift register 201 in 11p.
The encoding target macroblock data is held in the first shift register 201 as it is during the processing period of the same macroblock.

【0053】なお、第1のフレームメモリ105aから
の符号化対象マクロブロックデータの入力は、以下に述
べる探索範囲のデータの入力において、最初のデータが
図1の一番左上のPDC11aに到着するまでに完了し
ていれば良い。
The input of the macroblock data to be encoded from the first frame memory 105a is performed until the first data arrives at the upper leftmost PDC 11a in FIG. It should just be completed.

【0054】次に、差分絶対値計算回路101に探索範
囲のデータを入力するが、最初に、マクロブロック単位
の動ベクトルを求める場合について説明する。この場合
は、差分絶対値計算回路101にマクロブロック単位の
探索データが入力される。ここでは、縦横4画素の符号
化対象マクロブロックに対して±2画素を探索するの
で、探索データの大きさは縦横8画素となる(図5の5
02)。
Next, a case where data of a search range is input to the difference absolute value calculation circuit 101, and a case where a motion vector is obtained for each macroblock will be described first. In this case, search data in macroblock units is input to the difference absolute value calculation circuit 101. Here, since ± 2 pixels are searched for a macroblock to be coded having 4 pixels vertically and horizontally, the size of search data is 8 pixels vertically and horizontally (5 in FIG. 5).
02).

【0055】また、図1における全てのMPX12a〜
12gでは、制御回路107からのコントロール信号に
従って上側の入力を選択する。これにより、差分絶対値
計算回路101内の4段シフトレジスタ13a〜13c
および各画素毎のPDC11a〜11pは、横の行単位
で下から上に、各行内では右から左に直列に接続され
る。
Further, all the MPXs 12a to 12x in FIG.
In 12g, the upper input is selected according to the control signal from the control circuit 107. Thereby, the four-stage shift registers 13a to 13c in the difference absolute value calculation circuit 101
The PDCs 11a to 11p for each pixel are connected in series from bottom to top on a horizontal row basis and from right to left in each row.

【0056】ここで、最終行の入力側からマクロブロッ
ク単位の探索データ(図5の探索範囲502内のデー
タ)をラスタスキャン順に入力すると、最初のデータ
(探索範囲の左上にある画素番号1のデータ)が左上の
PDC11aに到着した時点で、左上の候補ブロック
(画素番号1〜4、9〜12、17〜20、25〜28
の16画素からなるブロックで、図4で言うところの候
補ブロック403に相当)のデータが各PDC11a〜
11pに入力されたことになる。
Here, when search data in macroblock units (data within the search range 502 in FIG. 5) is input in raster scan order from the input side of the last row, the first data (pixel number 1 at the upper left of the search range) When the data arrives at the upper left PDC 11a, the upper left candidate block (pixel numbers 1-4, 9-12, 17-20, 25-28)
Is a block composed of 16 pixels, and corresponds to the candidate block 403 in FIG. 4).
11p is input.

【0057】このとき、各PDC11a〜11p内の計
算回路204で符号化対象マクロブロックデータとマク
ロブロック単位の探索データとの差分絶対値が各画素ご
とに計算され、その結果が第2のシフトレジスタ202
に保持される。これらの差分絶対値は各サブブロック1
4a〜14dごとに対応するサブブロック合算回路10
2a〜102dに入力されて合算されることにより、サ
ブブロック単位の差分絶対値の合計を得る。
At this time, the calculation circuit 204 in each of the PDCs 11a to 11p calculates the absolute value of the difference between the macroblock data to be encoded and the search data in macroblock units for each pixel, and the result is stored in the second shift register. 202
Is held. These absolute differences are calculated for each sub-block 1
Sub-block summation circuit 10 corresponding to each of 4a to 14d
The sums of the absolute values of the differences in sub-block units are obtained by being input to 2a to 102d and summed.

【0058】さらに、各サブブロック合算回路102a
〜102dで求められたサブブロック単位の差分絶対値
の合計がマクロブロック合算回路103に入力されて合
算されることにより、マクロブロック単位の差分絶対値
の合計を得る。こうして得られたマクロブロック単位の
差分絶対値の合計は、最小値決定/動ベクトル発生回路
104に入力され、図示しない内部のレジスタに保持さ
れる。
Further, each sub-block summing circuit 102a
The sum of the absolute difference values in sub-block units obtained in steps 102 to 102d is input to the macroblock summation circuit 103 and summed, thereby obtaining the sum of the absolute difference values in macroblock units. The sum of the absolute difference values in macroblock units obtained in this way is input to the minimum value determination / motion vector generation circuit 104 and held in an internal register (not shown).

【0059】次に、最終行の入力側から次の探索データ
を1画素分入力すると、各PDC11a〜11pには次
の候補ブロック(図4で言うところの候補ブロック40
4に相当)のデータが入力されたことになる。この場合
も同様にして、マクロブロック単位の差分絶対値の合計
が算出され、それが最小値決定/動ベクトル発生回路1
04に入力される。最小値決定/動ベクトル発生回路1
04では、今回入力された差分絶対値の合計と、前回図
示しない内部のレジスタに保持された差分絶対値の合計
とを大小比較し、値の小さい方を上記レジスタに保持し
直す。
Next, when the next search data for one pixel is input from the input side of the last row, the next candidate block (candidate block 40 in FIG.
4) is input. In this case as well, the sum of the difference absolute values in the macroblock unit is calculated in the same manner, and this is used as the minimum value determination / motion vector generation circuit 1.
04 is input. Minimum value determination / motion vector generation circuit 1
In step 04, the sum of the difference absolute values input this time is compared with the sum of the difference absolute values held in an internal register (not shown) last time, and the smaller value is held again in the register.

【0060】以下同様にして、最終行の入力側から探索
データを順次入力していき、マクロブロック単位の差分
絶対値の合計を求めていく。ところで、最初の候補ブロ
ックのデータが各PDC11a〜11pに入力されたと
きから数えて、5画素分の探索データを入力すると、水
平位置が同じ5個の候補ブロック(図4で言うところの
候補ブロック403〜407に相当)が各PDC11a
〜11pに順に入力される。
In the same manner, search data is sequentially input from the input side of the last row, and the sum of absolute differences in macroblock units is calculated. By the way, when search data for five pixels is input, counting from the time when the data of the first candidate block is input to each of the PDCs 11a to 11p, five candidate blocks having the same horizontal position (candidate blocks in FIG. 403 to 407) for each PDC 11a
To 11p in order.

【0061】続く3画素分の探索データを入力したとき
には差分絶対値の合計の計算には無関係になるが、更に
それに続く5画素分の探索データを順に入力すると、先
に入力された5個の候補ブロックから水平位置が1画素
下がった5個の候補ブロック(図4で言うところの候補
ブロック408〜412に相当)が各PDC11a〜1
1pに順に入力される。このように探索データを順次入
力していくことで、全ての候補ブロックの探索データが
各PDC11a〜11pに順に入力される。
When the search data for the next three pixels is input, the calculation of the sum of the absolute difference values is irrelevant. However, when the search data for the subsequent five pixels are sequentially input, the five previously input five search data are obtained. Five candidate blocks (corresponding to candidate blocks 408 to 412 in FIG. 4) whose horizontal position is one pixel lower than the candidate blocks are PDCs 11a to 1a.
1p are sequentially input. By sequentially inputting search data in this way, search data of all candidate blocks is sequentially input to each of the PDCs 11a to 11p.

【0062】このとき、最小値決定/動ベクトル発生回
路104は、上述したような大小比較およびレジスタへ
の更新記憶の処理を各候補ブロックについてマクロブロ
ック単位の差分絶対値の合計が計算されるごとに行うこ
とにより、最終的に各候補ブロックの中で最小の差分絶
対値の合計を有する候補ブロックを参照ブロックとして
決定する。そして、その決定した参照ブロックに対応す
る動ベクトルを発生して、マクロブロック単位の動ベク
トルとして外部に出力する。
At this time, the minimum value determination / motion vector generation circuit 104 performs the above-described processing of comparing the magnitude and updating and storing the data in the register every time the sum of the absolute difference values in macroblock units is calculated for each candidate block. Finally, the candidate block having the smallest sum of absolute difference values among the candidate blocks is determined as the reference block. Then, a motion vector corresponding to the determined reference block is generated and output to the outside as a motion vector in macroblock units.

【0063】なお、もしサブブロック単位の動ベクトル
を検出するための探索範囲の原点がいずれも符号化対象
サブブロックと同じ位置であったら(オフセットがなか
ったら)、最小値決定/動ベクトル発生回路104は、
各サブブロック合算回路102a〜102dで求められ
たサブブロック単位の差分絶対値の合計を用いて上述し
たマクロブロック単位の処理と同様の処理を各サブブロ
ック毎に行うことにより、4つのサブブロック単位の動
ベクトルを得ることができる。
If the origin of the search range for detecting a motion vector in sub-block units is at the same position as the sub-block to be encoded (if there is no offset), the minimum value determination / motion vector generation circuit 104 is
By performing the same processing as the above-described processing in units of macroblocks for each subblock using the sum of absolute differences in units of subblocks obtained by the respective subblock summation circuits 102a to 102d, four subblock units are obtained. Can be obtained.

【0064】このように、探索範囲に関するオフセット
がない場合には、各MPX12a〜12gでの選択を切
り換えなくても、マクロブロック単位の動ベクトルとサ
ブブロック単位の動ベクトルとの両方を求めることがで
きる。したがって、オフセットについて何ら考慮しない
簡易なシステムを構築しようとする場合には各MPX1
2a〜12gは設ける必要がない。
As described above, when there is no offset related to the search range, it is possible to obtain both the motion vector in the macro block unit and the motion vector in the sub block unit without switching the selection in each of the MPXs 12a to 12g. it can. Therefore, when trying to construct a simple system that does not consider the offset at all, each MPX1
It is not necessary to provide 2a to 12g.

【0065】また、オフセットが付いていても、各サブ
ブロック14a〜14dでオフセットが同じ場合には、
第2の読み出し回路106bの制御によりオフセットに
応じたマクロブロック単位の探索データを入力し直すこ
とで、サブブロック単位の動ベクトルを得ることが可能
である。
Even if an offset is provided, if the offset is the same in each of the sub-blocks 14a to 14d,
By re-inputting search data in units of macroblocks according to the offset under the control of the second read circuit 106b, it is possible to obtain a motion vector in units of subblocks.

【0066】次に、サブブロック単位の動ベクトルを求
める場合で、しかも各サブブロック14a〜14dでオ
フセットが互いに異なる場合の動作を説明する。この場
合は、探索データがサブブロック毎に全く異なる場合も
あるので、第2のフレームメモリ105bから差分絶対
値計算回路101にサブブロック毎に独立して探索デー
タを入力する。この探索データの入力を制御しているの
は、第2の読み出し回路106bである。
Next, a description will be given of the operation in the case where a motion vector is obtained for each sub-block and the offsets are different from each other in each of the sub-blocks 14a to 14d. In this case, since the search data may be completely different for each sub-block, the search data is input from the second frame memory 105b to the difference absolute value calculation circuit 101 independently for each sub-block. The input of the search data is controlled by the second read circuit 106b.

【0067】最初に、左上のサブブロック14aの動ベ
クトルを求める場合について説明する。この場合、MP
X12a,12bは下側の入力を選択し、MPX12c
は上側の入力を選択し、その他のMPX12d〜12g
は不問(ドントケア)とする。このようにすることで、
第2のフレームメモリ105bから読み出されたサブブ
ロック単位の探索データはPDC11dに直接入力さ
れ、PDC11cより出力された探索データはMPX1
2c、4段シフトレジスタ13a、MPX12aを介し
てPDC11bに入力される。
First, the case where the motion vector of the upper left sub-block 14a is obtained will be described. In this case, MP
X12a, 12b select the lower input, MPX12c
Selects the upper input, other MPX12d ~ 12g
Is unquestioned (don't care). By doing this,
The search data in sub-block units read from the second frame memory 105b is directly input to the PDC 11d, and the search data output from the PDC 11c is the MPX1
2c, input to the PDC 11b via the four-stage shift register 13a and the MPX 12a.

【0068】これは、先にマクロブロック単位の動ベク
トルを検出する際に構成した縦横4画素分に相当するP
DC11a〜11pの接続を、縦横2画素分に相当する
PDC11a〜11dの接続に縮小したものとなる。し
たがって、差分絶対値計算回路101にサブブロック単
位の探索データ(縦横2画素の符号化対象サブブロック
データに対して±2画素を探索するので、探索データの
大きさは縦横6画素となる。図5の探索範囲507を参
照)をラスタースキャン順に入力し、サブブロック合算
回路102aの出力についてのみ最小値決定/動ベクト
ル発生回路104で処理を行えば、サブブロック単位で
の動ベクトルを求めることができる。
This corresponds to the P and P pixels corresponding to four pixels in the vertical and horizontal directions, which were previously formed when detecting the motion vector in units of macroblocks.
The connection of DCs 11a to 11p is reduced to the connection of PDCs 11a to 11d corresponding to two pixels vertically and horizontally. Therefore, the difference absolute value calculation circuit 101 instructs the search data in sub-block units (± 2 pixels are searched for the encoding target sub-block data of 2 pixels vertically and horizontally, so the size of the search data is 6 pixels vertically and horizontally. 5 is input in a raster scan order, and only the output of the sub-block summation circuit 102a is processed by the minimum value determination / motion vector generation circuit 104, whereby a motion vector in sub-block units can be obtained. it can.

【0069】以下同様に、右上、左下、右下の各サブブ
ロック14b〜14dについてもサブブロック単位の動
ベクトルを夫々求めることができる。なお、右上のサブ
ブロック14bの動ベクトルを求める場合には、MPX
12c,12dで下側の入力を選択するとともに、その
他のMPXを不問(ドントケア)として、サブブロック
合算回路102bの出力についてのみ最小値決定/動ベ
クトル発生回路104で処理を行えば良い。
Similarly, a motion vector for each sub-block can be obtained for each of the upper right, lower left, and lower right sub-blocks 14b to 14d. When the motion vector of the upper right sub-block 14b is obtained, MPX
The input on the lower side is selected in 12c and 12d, and the other MPX is not considered (don't care), and only the output of the sub-block summation circuit 102b needs to be processed by the minimum value determination / motion vector generation circuit 104.

【0070】また、左下のサブブロック14cの動ベク
トルを求める場合には、MPX12e,12fで下側の
入力を選択し、MPX12gで上側の入力を選択すると
ともに、その他のMPXを不問(ドントケア)として、
サブブロック合算回路102cの出力についてのみ最小
値決定/動ベクトル発生回路104で処理を行えば良
い。
When the motion vector of the lower left sub-block 14c is to be obtained, the lower input is selected by the MPXs 12e and 12f, the upper input is selected by the MPX 12g, and the other MPXs are not questioned (don't care). ,
Only the output of the sub-block summation circuit 102c needs to be processed by the minimum value determination / motion vector generation circuit 104.

【0071】さらに、右下のサブブロック14dの動ベ
クトルを求める場合には、MPX12gで下側の入力を
選択するとともに、その他のMPXを不問(ドントケ
ア)として、サブブロック合算回路102dの出力につ
いてのみ最小値決定/動ベクトル発生回路104で処理
を行えば良い。以上により、全てのサブブロックについ
てサブブロック単位の動ベクトルを検出することができ
る。
Further, when the motion vector of the lower right sub-block 14d is obtained, the lower input is selected by the MPX 12g, and the other MPXs are not considered (don't care), and only the output of the sub-block summing circuit 102d is determined. The processing may be performed by the minimum value determination / motion vector generation circuit 104. As described above, it is possible to detect a motion vector in sub-block units for all sub-blocks.

【0072】以上に述べた一連の動作、すなわち、第1
のフレームメモリ105aからの符号化対象マクロブロ
ックデータの読み出し、第2のフレームメモリ105b
からの探索データの読み出し、各MPX12a〜12g
での選択切り換え動作および最小値決定/動ベクトル発
生回路104での処理は、制御回路107が制御してい
る。
A series of operations described above, that is, the first operation
Of the macroblock data to be encoded from the frame memory 105a of the second frame memory 105b
Of search data from the MPXs 12a to 12g
The selection switching operation and the processing in the minimum value determination / motion vector generation circuit 104 are controlled by the control circuit 107.

【0073】制御回路107は、ハードウェア的に構成
しても良いが、例えばCPU、ROMおよびRAMなど
から成るマイクロコンピュータにより構成することも可
能である。この場合、上述のような一連の処理を行うシ
ーケンスを記述したプログラムは上記ROMに記憶さ
れ、このROMに記憶されたプログラムに従ってCPU
が動作する。このCPUの作業プログラムを格納したR
OMは、本発明の記録媒体を構成する。
The control circuit 107 may be constituted by hardware, but may also be constituted by a microcomputer comprising, for example, a CPU, a ROM and a RAM. In this case, a program describing a sequence for performing a series of processes as described above is stored in the ROM, and a CPU is executed in accordance with the program stored in the ROM.
Works. R storing the work program of this CPU
The OM constitutes the recording medium of the present invention.

【0074】また、上記マイクロコンピュータに周辺イ
ンタフェースを介してハードディスクを接続し、このハ
ードディスクに上記CPUの作業プログラムを格納する
ようにしても良い。このハードディスクには上記作業プ
ログラムを外部から供給することが可能であり、この場
合、ハードディスクや上記作業プログラムを供給するた
めの手段、例えば上記作業プログラムを格納した記録媒
体も、本発明の記録媒体を構成する。
A hard disk may be connected to the microcomputer via a peripheral interface, and the work program of the CPU may be stored in the hard disk. The work program can be externally supplied to the hard disk. In this case, a hard disk and a means for supplying the work program, for example, a recording medium storing the work program are also recording media of the present invention. Configure.

【0075】上記作業プログラムを格納するための記録
媒体としては、ROMやハードディスクの他に、例えば
フロッピーディスク、光ディスク、光磁気ディスク、C
D−ROM、磁気テープ、不揮発性のメモリカード等を
用いることができる。
As a recording medium for storing the work program, in addition to a ROM and a hard disk, for example, a floppy disk, an optical disk, a magneto-optical disk,
A D-ROM, a magnetic tape, a nonvolatile memory card, or the like can be used.

【0076】このように、本実施形態によれば、H.2
63やMPEG4等の符号化方式において、例えば画像
の動きに応じてサブブロック毎にオフセットを加えてサ
ブブロック単位の動ベクトルを求めることにより、探索
範囲を広げて演算量を増大することなく(演算処理に要
する時間を増大することなく)、動ベクトルの検出精度
を高め、情報量をより効率的に圧縮することができる。
As described above, according to the present embodiment, the H.264 is used. 2
In an encoding method such as 63 or MPEG4, for example, a motion vector is obtained for each sub-block by adding an offset for each sub-block according to the motion of an image, so that the search range is expanded and the amount of calculation is not increased (the Without increasing the time required for processing), it is possible to increase the detection accuracy of the motion vector and more efficiently compress the information amount.

【0077】なお、以上の実施形態では、説明の簡略化
のために符号化対象マクロブロックが縦横4画素で、マ
クロブロック単位の探索範囲が符号化対象マクロブロッ
クを中心にして上下左右とも+2画素の範囲の場合につ
いて述べたが、本発明はこれに限定されない。従来例で
述べたように、H.263やMPEG4では実際には符
号化対象マクロブロックは縦横16画素で構成されるの
で、PDC、MPXおよびシフトレジスタ等をその数に
応じて構成すれば良い。
In the above embodiment, for simplicity of description, the macroblock to be coded is 4 pixels vertically and horizontally, and the search range in units of macroblock is +2 pixels in both the upper, lower, left and right directions around the macroblock to be coded. However, the present invention is not limited to this. As described in the conventional example, H.264. In H.263 and MPEG4, the macroblock to be encoded is actually composed of 16 pixels in the vertical and horizontal directions, so that the PDC, MPX, shift registers, etc. may be configured according to the number.

【0078】また、以上の実施形態では、各サブブロッ
ク合算回路102a〜102dの出力とマクロブロック
合算回路103の出力とを両方とも最小値決定/動ベク
トル発生回路104に入力し、最小値決定/動ベクトル
発生回路104でどちらの情報を使うかを制御回路10
7からのコントロール信号によって制御していたが、本
発明はこれに限定されない。例えば、制御回路107が
各サブブロック合算回路102a〜102dを制御し、
その出力先をマクロブロック合算回路103にするか最
小値決定/動ベクトル発生回路104にするかを切り換
えるように構成しても良い。
In the above embodiment, both the outputs of the sub-block summation circuits 102a to 102d and the output of the macroblock summation circuit 103 are input to the minimum value determination / motion vector generation circuit 104, and the minimum value determination / The control circuit 10 determines which information is used in the motion vector generation circuit 104.
7, but the present invention is not limited to this. For example, the control circuit 107 controls each of the sub-block summation circuits 102a to 102d,
The output destination may be switched to the macroblock summation circuit 103 or the minimum value determination / motion vector generation circuit 104.

【0079】(第2の実施形態)次に、本発明の第2の
実施形態について説明する。本発明は、上述したH.2
63やMPEG4等の符号化方式だけでなく、H.26
1やMPEG1、2等のようにサブブロック単位の動ベ
クトルを用いない他の符号化方式においても、動き探索
の演算量を増大することなく動ベクトルの検出精度を高
めることが可能な動ベクトル検出装置を提供することを
第2の目的として、以下に述べる第2の実施形態を提案
する。
(Second Embodiment) Next, a second embodiment of the present invention will be described. The present invention relates to the above H.264. 2
H.63, MPEG4, etc. 26
Motion vector detection that can increase the detection accuracy of motion vectors without increasing the amount of operation for motion search even in other encoding methods that do not use motion vectors in sub-block units, such as MPEG1, MPEG1, and MPEG2 For the second purpose of providing an apparatus, a second embodiment described below is proposed.

【0080】上述したように、動ベクトルの検出精度を
高めるために探索範囲を単純に広げると、その分だけ候
補ベクトルの数が増大し、動き探索の演算量が大きくな
ってしまう。そこで、第2の実施形態では、探索範囲を
広げる一方でその範囲内の候補ブロックを選別すること
で、候補ベクトルの数の増加を抑え、動ベクトルの検出
に要する時間の増加も抑えることができるようにしてい
る。
As described above, if the search range is simply widened in order to increase the accuracy of motion vector detection, the number of candidate vectors increases by that amount, and the amount of calculation for motion search increases. Thus, in the second embodiment, by increasing the search range and selecting candidate blocks within the range, it is possible to suppress an increase in the number of candidate vectors and an increase in the time required for detecting a motion vector. Like that.

【0081】図7は、図4の例に示した縦横6画素の探
索範囲に比べて探索範囲を縦横8画素に広げる(符号化
対象ブロックを中心にして上下左右とも+3画素の範囲
に広げる)代わりに、符号化対象ブロックからの距離が
遠いブロックを候補ブロックから外した場合の例であ
る。
FIG. 7 shows that the search range is expanded to 8 pixels vertically and horizontally as compared to the search range of 6 pixels vertically and horizontally shown in the example of FIG. Instead, this is an example in which a block far from the encoding target block is excluded from the candidate blocks.

【0082】図7において、701は符号化対象フレー
ム内の縦横2画素の符号化対象ブロック位置を示し、7
02は1フレーム前の参照フレーム内の縦横8画素の探
索範囲を示している。また、点線で囲んだ703の範囲
は、符号化対象ブロック701からの距離が遠いブロッ
クを候補ブロックから外した真の動ベクトル探索範囲で
あり、704〜728は上記動ベクトル探索範囲703
内の全ての候補ベクトルに対するブロックである。ま
た、○内の数字は、画素番号を示している。
In FIG. 7, reference numeral 701 denotes the position of an encoding target block of 2 pixels vertically and horizontally in the encoding target frame.
02 indicates a search range of 8 pixels vertically and horizontally in the reference frame one frame before. A range 703 surrounded by a dotted line is a true motion vector search range in which a block far from the coding target block 701 is excluded from the candidate blocks, and reference numerals 704 to 728 denote the motion vector search range 703.
Is a block for all the candidate vectors. The numbers in the circles indicate the pixel numbers.

【0083】また、図8は、探索範囲の横方向に重きを
おき、図4の例に比べて探索範囲を符号化対象ブロック
を中心にして左右を+4画素の範囲に広げる代わりに、
符号化対象ブロックからの距離が遠いブロックを候補ブ
ロックから外した場合の例である。この図8の例は、画
像データを得るべくカメラで撮影するときは、カメラを
横方向に動かすことが多いことや、画像の表示画面その
ものが横長の形状であることなどから、横方向に画像の
相関性が強いことに基づいている。
In FIG. 8, the search range is weighted in the horizontal direction, and instead of expanding the search range to the range of +4 pixels on the left and right with respect to the encoding target block as compared with the example of FIG.
This is an example of a case where a block far from the encoding target block is excluded from the candidate blocks. In the example of FIG. 8, when shooting with a camera to obtain image data, the camera is often moved in the horizontal direction, and the image display screen itself has a horizontally long shape. Is highly correlated.

【0084】図8において、801は符号化対象フレー
ム内の縦横2画素の符号化対象ブロック位置を示し、8
02は1フレーム前の参照フレーム内の縦6画素、横1
0画素の探索範囲を示している。また、点線で囲んだ8
03の範囲は、符号化対象ブロック801からの距離が
遠いブロックを候補ブロックから外した真の動ベクトル
探索範囲であり、804〜828は上記動ベクトル探索
範囲803内の全ての候補ベクトルに対するブロックで
ある。また、○内の数字は、画素番号を示している。
In FIG. 8, reference numeral 801 denotes the position of an encoding target block of two pixels vertically and horizontally in the encoding target frame.
02 is 6 pixels vertically and 1 horizontally in the reference frame one frame before.
The search range of 0 pixel is shown. In addition, 8 surrounded by a dotted line
A range 03 is a true motion vector search range in which a block far from the encoding target block 801 is excluded from the candidate blocks. Reference numerals 804 to 828 denote blocks for all the candidate vectors in the motion vector search range 803. is there. The numbers in the circles indicate the pixel numbers.

【0085】図7および図8の例のように、動ベクトル
を求めるための探索範囲を広げる代わりに、その範囲内
の候補ブロックを選別することにより、候補ブロックの
数を図4の例の場合と同じ25個にしている。これによ
り、動き探索の演算量を増大することなく、探索範囲を
広げて動ベクトルの検出精度を高めることができるよう
になる。
As in the examples of FIGS. 7 and 8, instead of expanding the search range for obtaining a motion vector, candidate blocks within the range are selected to reduce the number of candidate blocks in the case of FIG. It is the same as 25. As a result, the search range can be widened and the detection accuracy of the motion vector can be increased without increasing the amount of calculation in the motion search.

【0086】以下に、このような正方形または長方形で
ない動ベクトルの探索範囲にも対応可能な第2の実施形
態による動ベクトル検出装置の構成を説明する。図9
は、第2の実施形態による動ベクトル検出装置の要部構
成を示すブロック図であり、簡略化のため、図10に示
すように、符号化対象ブロックが縦横4画素、探索範囲
が符号化対象ブロックを中心にして上下左右とも+4画
素の範囲(上下左右とも+2画素としていた図5の場合
よりも広い範囲)で、符号化対象ブロックからの距離が
遠いブロックを候補から外した場合を想定している。
The configuration of the motion vector detecting device according to the second embodiment which can cope with such a search range of a non-square or rectangular motion vector will be described below. FIG.
FIG. 11 is a block diagram showing a main configuration of a motion vector detecting device according to a second embodiment. For simplification, as shown in FIG. In the range of +4 pixels in both the upper, lower, left and right directions around the block (a wider range than in FIG. 5 where the upper, lower, left, and right sides are +2 pixels), it is assumed that a block far from the encoding target block is excluded from candidates. ing.

【0087】図10において、1001は符号化対象フ
レーム内の符号化対象ブロックを示し、1002は1フ
レーム前の参照フレーム内における、符号化対象ブロッ
クを中心にして上下左右とも+4画素の広い探索範囲を
示している。また、点線で囲んだ1003の範囲は、上
述の広い探索範囲1002の中から符号化対象ブロック
1001からの距離が遠いブロックを候補から外した真
の動ベクトル探索範囲を示し、1004〜1044は上
記動ベクトル探索範囲1003内の全ての候補ベクトル
に対するブロックを示している。なお、以下の説明で単
に「探索範囲」と言うときは、距離が遠いブロックを候
補から外した真の動ベクトル探索範囲1003を言うも
のとする。
In FIG. 10, reference numeral 1001 denotes an encoding target block in the encoding target frame, and 1002 denotes a wide search range of +4 pixels in the upper, lower, left, and right directions of the encoding target block in the reference frame one frame before. Is shown. Further, a range 1003 surrounded by a dotted line indicates a true motion vector search range in which a block far from the encoding target block 1001 is excluded from the candidates from the wide search range 1002 described above. The blocks for all the candidate vectors within the motion vector search range 1003 are shown. In the following description, the term “search range” simply refers to a true motion vector search range 1003 in which blocks farther away are excluded from candidates.

【0088】図9において、901aおよび901bは
フレームメモリ、902aおよび902bは読み出し回
路、903は差分絶対値計算回路、904はシフトレジ
スタ群、905はブロック合算回路、906は最小値決
定/動ベクトル発生回路、907は制御回路である。
In FIG. 9, 901a and 901b are frame memories, 902a and 902b are read circuits, 903 is a difference absolute value calculation circuit, 904 is a shift register group, 905 is a block summation circuit, and 906 is a minimum value determination / motion vector generation. A circuit 907 is a control circuit.

【0089】符号化対象フレームの画像は、第1のフレ
ームメモリ901aに格納され、その中から第1の読み
出し回路902aより出力されるアドレスに従って符号
化対象ブロックの各画素値(以下、符号化対象ブロック
データという)が読み出されて差分絶対値計算回路90
3に供給される。また、上記符号化対象フレームより1
フレーム前の参照フレームの画像は、第2のフレームメ
モリ901bに格納され、その中から第2の読み出し回
路902bより出力されるアドレスに従って探索範囲内
の各画素値(以下、探索データという)が読み出されて
シフトレジスタ群904に供給される。
The image of the encoding target frame is stored in the first frame memory 901a, and each pixel value of the encoding target block (hereinafter referred to as encoding target) is stored in the first frame memory 901a according to the address output from the first reading circuit 902a. Block data) is read out and the absolute difference calculating circuit 90 is read out.
3 is supplied. Also, 1 from the above encoding target frame
The image of the reference frame before the frame is stored in the second frame memory 901b, from which each pixel value (hereinafter referred to as search data) within the search range is read in accordance with the address output from the second readout circuit 902b. And supplied to the shift register group 904.

【0090】上記差分絶対値計算回路903の内部構成
を図11に示す。図11において、1101a〜110
1l(エル)はマルチプレクサ(以下、MPXとい
う)、1102a〜1102pは画素毎の差分絶対値計
算回路(以下、PDCという)である。上記PDC11
02a〜1102pの位置は、実際の画面上の符号化対
象ブロックの画素の位置、すなわち図10の符号化対象
ブロック1001の位置に対応している。
FIG. 11 shows the internal configuration of the difference absolute value calculation circuit 903. In FIG. 11, 1101a to 1101
Reference numeral 11 denotes a multiplexer (hereinafter referred to as MPX), and reference numerals 1102a to 1102p denote difference absolute value calculation circuits (hereinafter referred to as PDC) for each pixel. The above PDC11
The positions 02a to 1102p correspond to the actual pixel positions of the current block on the screen, that is, the positions of the current block 1001 in FIG.

【0091】上記MPX1101a〜1101lの入力
端子には、シフトレジスタ群904からの出力信号が複
数入力され、その中から何れか1つが選択される。この
MPX1101a〜1101lの出力である各選択信号
は、各々対応して設けられたPDC1102a〜110
2l(エル)に入力される。これらのMPX1101a
〜1101lは、制御回路907から与えられるコント
ロール信号に応じて切り換えられるようになっている。
A plurality of output signals from the shift register group 904 are input to the input terminals of the MPXs 1101a to 1101l, and one of them is selected. The selection signals output from the MPXs 1101a to 1101l are provided to the corresponding PDCs 1102a to 1102a, respectively.
It is input to 2l. These MPX1101a
To 1101l are switched according to a control signal given from the control circuit 907.

【0092】16個のPDC1102a〜1102pの
うち、12個のPDC1102a〜1102lは、各々
に対応して設けられたMPX1101a〜1101lで
選択されたシフトレジスタ群904からの出力信号(探
索データ)と、第1のフレームメモリ901aから読み
出された符号化対象ブロックデータとの差分絶対値を画
素毎に計算し、その計算結果をブロック合算回路905
に供給する。
Out of the 16 PDCs 1102a to 1102p, the 12 PDCs 1102a to 1102l include the output signal (search data) from the shift register group 904 selected by the corresponding MPXs 1101a to 1101l, and The absolute value of the difference from the encoding target block data read from the first frame memory 901a is calculated for each pixel, and the calculation result is calculated by the block summation circuit 905.
To supply.

【0093】また、残り4個のPDC1102m〜11
02pの入力端子には、シフトレジスタ群904からの
出力信号(探索データ)が直接入力されるようになって
いる。これら4個のPDC1102m〜1102pは、
シフトレジスタ群904から直接入力される探索データ
と、第1のフレームメモリ901aから読み出された符
号化対象ブロックデータとの差分絶対値を画素毎に計算
し、その計算結果をブロック合算回路905に供給す
る。
The remaining four PDCs 1102m to 1102m
An output signal (search data) from the shift register group 904 is directly input to the input terminal 02p. These four PDCs 1102m to 1102p are:
The absolute value of the difference between the search data directly input from the shift register group 904 and the block data to be encoded read from the first frame memory 901a is calculated for each pixel, and the calculation result is sent to the block summation circuit 905. Supply.

【0094】さらに、上記PDC1102a〜1102
pの内部構成を図12に示す。図12において、120
1、1203はシフトレジスタ、1202は計算回路で
ある。第1のシフトレジスタ1201は、第1のフレー
ムメモリ901aから読み出された符号化対象ブロック
データの1画素分を保持する。
Further, the PDCs 1102a to 1102
FIG. 12 shows the internal structure of p. In FIG.
Reference numerals 1 and 1203 are shift registers and 1202 is a calculation circuit. The first shift register 1201 holds one pixel of the encoding target block data read from the first frame memory 901a.

【0095】計算回路1202は、上記第1のシフトレ
ジスタ1201に保持された1画素分の符号化対象ブロ
ックデータAと、MPX1101a〜1101lまたは
シフトレジスタ群904から入力された1画素分の探索
データBとの差分絶対値|A−B|を計算し、その計算
結果を第2のシフトレジスタ1203に保持する。第2
のシフトレジスタ1203に保持された1画素分の差分
絶対値は、ブロック合算回路905に出力される。
The calculation circuit 1202 calculates the one-pixel encoding target block data A held in the first shift register 1201 and the one-pixel search data B input from the MPXs 1101a to 11011 or the shift register group 904. Is calculated, and the result of the calculation is held in the second shift register 1203. Second
The absolute value of the difference for one pixel held in the shift register 1203 is output to the block summing circuit 905.

【0096】次に、シフトレジスタ群904の内部構成
を図13に示す。図13において、1301〜1340
はシフトレジスタであり、これら40個のシフトレジス
タ1301〜1340が直列に接続されている。この図
13の例では、36個のシフトレジスタ1301〜13
36が、1行内に12個(探索範囲1003の水平方向
の最大数に対応)並ぶように3ラインにより構成され、
その下のラインに残り4個のシフトレジスタ1337〜
1340が設けられている。
Next, the internal configuration of the shift register group 904 is shown in FIG. In FIG. 13, 1301 to 1340
Denotes a shift register, and these forty shift registers 1301 to 1340 are connected in series. In the example of FIG. 13, 36 shift registers 1301 to 13
36 are constituted by three lines such that 12 (corresponding to the maximum number of the search range 1003 in the horizontal direction) are arranged in one line,
The remaining four shift registers 1337 to
1340 is provided.

【0097】シフトレジスタ群904がこのように構成
されているので、各ラインでは、第2のフレームメモリ
901bより1画素毎に読み出された探索データが、右
から左へと順に送られていく。上から2番目以降の一番
左にあるシフトレジスタ1313、1325、1337
から出力された探索データは、それぞれその上のライン
の右端に送られる。これにより、入力された探索データ
は、右下のシフトレジスタ1340から左上のシフトレ
ジスタ1301へと順に送られていく。
Since the shift register group 904 is configured as described above, the search data read for each pixel from the second frame memory 901b is sequentially sent from right to left in each line. . The leftmost shift registers 1313, 1325, 1337 after the second from the top
Are sent to the right end of the line above them. As a result, the input search data is sequentially sent from the lower right shift register 1340 to the upper left shift register 1301.

【0098】さらに、探索データが順に送られていく過
程で、各シフトレジスタ1301〜1340の出力が個
別に取り出され、図11に示した差分絶対値計算回路9
03内の各MPX1101a〜1101lおよびPDC
1102m〜1102pの入力端子に供給されるように
なっている。ここで、図13中に各シフトレジスタ13
01〜1340の後段に近い方の出力から順に付した1
〜40の番号は、図11中に示した1〜40の番号に対
応しており、各シフトレジスタ1301〜1340の出
力は、MPX1101a〜1101lおよびPDC11
02m〜1102pの対応する番号の入力端子に入力さ
れる。
Further, in the process of sequentially sending the search data, the outputs of the shift registers 1301 to 1340 are individually taken out, and the difference absolute value calculating circuit 9 shown in FIG.
MPXs 1101a to 1101l and PDC
The signals are supplied to input terminals of 1102m to 1102p. Here, each shift register 13 in FIG.
01 which is assigned in order from the output closest to the latter stage of 01 to 1340
The numbers 40 to 40 correspond to the numbers 1 to 40 shown in FIG. 11, and the outputs of the shift registers 1301 to 1340 are output from the MPXs 1101a to 1101l and the PDC 11
It is input to the input terminal of the corresponding number from 02m to 1102p.

【0099】ブロック合算回路905は、各PDC11
02a〜1102pで計算された各画素毎の差分絶対値
の合計を求め、その結果を最小値決定/動ベクトル発生
回路906に供給する。最小値決定/動ベクトル発生回
路906は、ブロック合算回路905から各候補ブロッ
ク毎に与えられる差分絶対値の合計値の中から最小のも
のを決定する。そして、その合計値が最小の候補ブロッ
クを参照ブロックとして採用し、動ベクトルを発生す
る。
The block summation circuit 905 is provided for each PDC 11
The sum of the absolute difference values for each pixel calculated in 02a to 1102p is obtained, and the result is supplied to the minimum value determination / motion vector generation circuit 906. The minimum value determination / motion vector generation circuit 906 determines the minimum value from the sum of absolute difference values given from the block summation circuit 905 for each candidate block. Then, the candidate block having the minimum total value is adopted as a reference block, and a motion vector is generated.

【0100】次に、上記のように構成した本実施形態に
よる動ベクトル検出装置の動作について説明する。ま
ず、第1のフレームメモリ901aから符号化対象ブロ
ックデータが差分絶対値計算回路903に入力され、各
画素のデータがそれぞれ対応するPDC1102a〜1
102p中の第1のシフトレジスタ1201に保持され
る。この符号化対象ブロックデータは、同一のブロック
の処理期間中はそのまま第1のシフトレジスタ1201
に保持される。
Next, the operation of the motion vector detecting device according to the present embodiment configured as described above will be described. First, the encoding target block data is input from the first frame memory 901a to the difference absolute value calculation circuit 903, and the data of each pixel is stored in the corresponding PDC 1102a to
It is held in the first shift register 1201 in 102p. The block data to be encoded remains unchanged during the processing of the same block by the first shift register 1201.
Is held.

【0101】なお、第1のフレームメモリ901aから
の符号化対象ブロックデータの入力は、以下に述べる探
索データの入力において、最初の候補ブロックに対する
探索データがすべてシフトレジスタ群904に入力され
るまでに完了していれば良い。
The input of the block data to be encoded from the first frame memory 901a is performed until all the search data for the first candidate block is input to the shift register group 904 in the search data described below. It just needs to be completed.

【0102】次に、第2のフレームメモリ901bから
探索データがシフトレジスタ群904に入力される。こ
こでは、図10に示した探索範囲1003内のデータ
を、水平方向の1ライン毎に上から順番に、かつ同一ラ
インでは左から右へと1画素ずつ読み出し、シフトレジ
スタ群904に入力する。すなわち、図10に示した1
〜104の画素番号順に入力する。
Next, search data is input from the second frame memory 901b to the shift register group 904. Here, the data within the search range 1003 shown in FIG. 10 is read out from the top for each line in the horizontal direction, one pixel at a time from left to right on the same line, and input to the shift register group 904. That is, 1 shown in FIG.
104104 are input in the order of the pixel numbers.

【0103】ここで、このような探索データの入力処理
を画素番号1〜104まで続けたときのシフトレジスタ
群904の状態遷移の様子を図14に示す。図14にお
いて、四角の各枡は、図13における各シフトレジスタ
1301〜1340に対応している。枡内の斜線で区切
られた上側の数字は、各シフトレジスタの番号を示し、
同じく下側の数字は、入力された探索データの画素番号
を示している。
FIG. 14 shows the state transition of the shift register group 904 when such search data input processing is continued for pixel numbers 1 to 104. 14, each square square corresponds to each shift register 1301 to 1340 in FIG. The upper numbers separated by diagonal lines in the measure indicate the number of each shift register,
Similarly, the lower numeral indicates the pixel number of the input search data.

【0104】すなわち、図11および図13に示したよ
うに、入力段に近い4つのシフトレジスタ1337〜1
340の出力は、各々PDC1102m〜1102pに
接続されており、これらに有効な探索データ(探索範囲
1003内の候補ブロック1004〜1044として採
用可能なブロックの探索データ)が保持されたときの状
態を、図14の1401〜1409に示している。
That is, as shown in FIGS. 11 and 13, four shift registers 1337 to 1337-1 close to the input stage.
The output of 340 is connected to the PDCs 1102m to 1102p, respectively, and the state when valid search data (search data of blocks that can be adopted as candidate blocks 1004 to 1044 in the search range 1003) is held therein, This is shown at 1401 to 1409 in FIG.

【0105】これを図10との対応で説明すると、候補
ブロック1004に対する計算を行える状態が1401
の状態であり、候補ブロック1005に対する計算を行
える状態が1402の状態である。以下、各候補ブロッ
ク1008、1013、1020、1029、103
6、1041、1044に対する計算を行える状態が各
々1403、1404、1405、1406、140
7、1408、1049の状態である。
This will be described with reference to FIG. 10. A state 1401 indicates that the calculation for the candidate block 1004 can be performed.
The state 1402 indicates that the calculation for the candidate block 1005 can be performed. Hereinafter, each candidate block 1008, 1013, 1020, 1029, 103
6, 1041, 1044 can be calculated 1403, 1404, 1405, 1406, 140 respectively
7, 1408, and 1049.

【0106】また、図14において太枠で括った4つの
連続する枡内のシフトレジスタは、水平方向に連続する
4つのPDC、すなわち、PDC1102a〜1102
d,1102e〜1102h,1102i〜1102
l,1102m〜1102pに各々入力される探索デー
タを保持するシフトレジスタを示している。例えば、1
401の状態では、シフトレジスタ1316〜131
9,1321〜1324,1328〜1331,133
7〜1340から、画素番号1〜4,6〜9,13〜1
6,22〜25の探索データが各PDC1102a〜1
102pに入力されることを示している。
In FIG. 14, the shift registers in four continuous cells enclosed by a thick frame are four PDCs continuous in the horizontal direction, that is, PDCs 1102a to 1102.
d, 1102e to 1102h, 1102i to 1102
1, shift registers holding search data respectively input to 1102m to 1102p. For example, 1
In the state 401, the shift registers 1316 to 131
9,1321-1324,1328-1331,133
From 7 to 1340, pixel numbers 1 to 4, 6 to 9, 13 to 1
6, 22 to 25 search data are PDC1102a to 1
102p.

【0107】この図14から明らかなように、4つのP
DC1102m〜1102pに入力される探索データを
保持するシフトレジスタは、図13の入力段に近い4つ
のシフトレジスタ1337〜1340で固定である(そ
のためMPXは対応して設けられていない)。これに対
して、それ以外のPDC1102a〜1102lに入力
される探索データを保持するシフトレジスタは、残りの
36個のシフトレジスタ1301〜1336の中の何れ
かであり、固定ではない(そのためにMPX1101a
〜1101lが対応して設けられている)。
As is apparent from FIG. 14, four Ps
The shift registers holding the search data input to the DCs 1102m to 1102p are fixed to four shift registers 1337 to 1340 close to the input stage in FIG. 13 (for this reason, MPX is not provided correspondingly). On the other hand, the other shift registers that hold the search data input to the PDCs 1102a to 1102l are any of the remaining 36 shift registers 1301 to 1336, and are not fixed (for that reason, the MPX 1101a
1101101l are provided correspondingly).

【0108】すなわち、第2のフレームメモリ901b
から探索データを1画素毎に読み出し、それをシフトレ
ジスタ群904に順次入力していくと、画素番号1〜2
5の25個の探索データを読み出した時点で、図14の
1401の状態となる。この時点で候補ブロック100
4に対する差分絶対値の計算を行える探索データが全て
揃い、例えばPDC1102a〜1102dに入力され
る探索データを保持するシフトレジスタは、シフトレジ
スタ1316〜1319となる。
That is, the second frame memory 901b
, The search data is read out pixel by pixel, and sequentially input to the shift register group 904, the pixel numbers 1 to 2
At the time point when the 25 pieces of search data of No. 5 are read out, the state becomes 1401 in FIG. At this point, candidate block 100
For example, shift registers 1316 to 1319 are provided with all search data capable of calculating the absolute value of the difference with respect to No. 4, and hold search data input to the PDCs 1102a to 1102d, for example.

【0109】したがって、制御回路907は、MPX1
101aの出力としてシフトレジスタ1316からの出
力(番号16の出力)を選択するように、コントロール
信号を発生する。また、MPX1101b〜1101d
の出力としてシフトレジスタ1317〜1319からの
出力(番号17〜19の出力)を各々選択するように、
コントロール信号を発生する。
Therefore, the control circuit 907 controls the MPX1
A control signal is generated so as to select the output from the shift register 1316 (the output of number 16) as the output of 101a. MPX1101b to 1101d
So that outputs from the shift registers 1317 to 1319 (outputs of numbers 17 to 19) are respectively selected as outputs of
Generate a control signal.

【0110】また、この図14の1401の状態では、
PDC1102e〜1102hに入力される探索データ
を保持するシフトレジスタは、シフトレジスタ1321
〜1324となる。したがって、制御回路907は、M
PX1101e〜1101hの出力としてシフトレジス
タ1321〜1324からの出力(番号21〜24の出
力)を各々選択するように、コントロール信号を発生す
る。
In the state of 1401 in FIG. 14,
A shift register holding search data input to the PDCs 1102e to 1102h is a shift register 1321.
131324. Therefore, the control circuit 907 uses M
Control signals are generated such that outputs (outputs of numbers 21 to 24) from the shift registers 1321 to 1324 are respectively selected as outputs of the PXs 1101e to 1101h.

【0111】さらに、PDC1102i〜1102lに
入力される探索データを保持するシフトレジスタは、シ
フトレジスタ1328〜1331となる。したがって、
制御回路907は、MPX1101i〜1101lの出
力としてシフトレジスタ1328〜1331からの出力
(番号28〜31の出力)を各々選択するように、コン
トロール信号を発生する。
Further, shift registers holding search data input to PDCs 1102i to 1102l are shift registers 1328 to 1331. Therefore,
The control circuit 907 generates a control signal such that outputs from the shift registers 1328 to 1331 (outputs of numbers 28 to 31) are respectively selected as outputs of the MPXs 1101i to 1101l.

【0112】このとき、各PDC1102a〜1102
p内の計算回路1202で符号化対象ブロックデータと
探索データとの差分絶対値が各画素毎に計算され、その
結果が第2のシフトレジスタ1203に保持される。こ
れらの差分絶対値はブロック合算回路905に入力され
て合算されることにより、ブロック単位の差分絶対値の
合計を得る。こうして得られたブロック単位の差分絶対
値の合計は、最小値決定/動ベクトル発生回路906に
入力され、図示しない内部のレジスタに保持される。
At this time, each of the PDCs 1102a to 1102
The absolute value of the difference between the encoding target block data and the search data is calculated for each pixel by the calculation circuit 1202 in p, and the result is held in the second shift register 1203. These difference absolute values are input to the block summing circuit 905 and summed to obtain the sum of the difference absolute values in block units. The sum of the absolute values of the differences obtained in block units thus obtained is input to the minimum value determination / motion vector generation circuit 906, and held in an internal register (not shown).

【0113】次の9クロック間(画素番号26から9画
素分の探索データが新たに入力される間、すなわち、図
14の1401の状態から1402の状態へ遷移するま
での間)は差分絶対値の計算が行われないので、MPX
1101a〜1101lの選択状態は不問(ドントケ
ア)であるが、1402の状態になると、次の候補ブロ
ック1005に対する差分絶対値の計算を行える探索デ
ータが全て揃い、例えばPDC1102a〜1102d
に入力される探索データを保持するシフトレジスタは、
シフトレジスタ1310〜1313となる。
During the next nine clocks (while search data for nine pixels from pixel number 26 is newly input, that is, until transition from the state 1401 to the state 1402 in FIG. 14), the absolute difference value is obtained. Is not calculated, so MPX
The selection state of 1101a to 1101l is unquestioned (don't care), but in the state of 1402, all the search data for calculating the absolute difference value for the next candidate block 1005 are complete, for example, PDCs 1102a to 1102d.
The shift register that holds the search data input to
The shift registers are 1310 to 1313.

【0114】したがって、制御回路907は、MPX1
101aの出力としてシフトレジスタ1310からの出
力(番号10の出力)を選択するように、コントロール
信号を発生する。また、MPX1101b〜1101d
の出力としてシフトレジスタ1311〜1313からの
出力(番号11〜13の出力)を各々選択するように、
コントロール信号を発生する。
Therefore, the control circuit 907 controls the MPX1
A control signal is generated so as to select the output from the shift register 1310 (the output of number 10) as the output of 101a. MPX1101b to 1101d
So that outputs from the shift registers 1311 to 1313 (outputs of numbers 11 to 13) are respectively selected as outputs of
Generate a control signal.

【0115】また、この図14の1402の状態では、
PDC1102e〜1102hに入力される探索データ
を保持するシフトレジスタは、シフトレジスタ1317
〜1320となる。したがって、制御回路907は、M
PX1101e〜1101hの出力としてシフトレジス
タ1317〜1320からの出力(番号17〜20の出
力)を各々選択するように、コントロール信号を発生す
る。
In the state of 1402 in FIG. 14,
A shift register holding search data input to the PDCs 1102e to 1102h is a shift register 1317.
~ 1320. Therefore, the control circuit 907 uses M
Control signals are generated so as to select outputs (outputs of numbers 17 to 20) from shift registers 1317 to 1320 as outputs of PXs 1101e to 1101h, respectively.

【0116】さらに、PDC1102i〜1102lに
入力される探索データを保持するシフトレジスタは、シ
フトレジスタ1326〜1329となる。したがって、
制御回路907は、MPX1101i〜1101lの出
力としてシフトレジスタ1326〜1329からの出力
(番号26〜29の出力)を各々選択するように、コン
トロール信号を発生する。
Further, the shift registers holding the search data input to the PDCs 1102i to 1102l are shift registers 1326-1329. Therefore,
The control circuit 907 generates a control signal such that outputs from the shift registers 1326 to 1329 (outputs of numbers 26 to 29) are respectively selected as outputs of the MPXs 1101i to 1101l.

【0117】この場合も同様にして、各PDC1102
a〜1102p内の計算回路1202およびブロック合
算回路905によりブロック単位の差分絶対値の合計が
算出され、それが最小値決定/動ベクトル発生回路90
6に入力される。最小値決定/動ベクトル発生回路90
6では、今回入力された差分絶対値の合計と、前回図示
しない内部のレジスタに保持された差分絶対値の合計と
を大小比較し、値の小さい方を上記レジスタに保持し直
す。この処理は、以降の全ての候補ブロックに対しても
同様に行う。
Also in this case, similarly, each PDC 1102
The sum of the absolute values of the differences in block units is calculated by the calculation circuit 1202 and the block summation circuit 905 in a to
6 is input. Minimum value determination / motion vector generation circuit 90
In step 6, the sum of the difference absolute values input this time is compared with the sum of the difference absolute values held in an internal register (not shown) last time, and the smaller value is held again in the register. This process is similarly performed for all the subsequent candidate blocks.

【0118】これに続く2クロック間は、候補ブロック
1006、1007に対する差分絶対値の計算を行える
探索データが全て揃う。このとき各MPX1101a〜
1101lの選択状態はそのままでいいので、制御回路
907は、コントロール信号の状態を上記候補ブロック
1005のときと同じ状態に保つようにする。
During the subsequent two clocks, all search data for calculating the absolute difference between the candidate blocks 1006 and 1007 are prepared. At this time, each MPX 1101a ~
The control circuit 907 keeps the state of the control signal in the same state as that of the candidate block 1005 because the selection state of 1101l can be left as it is.

【0119】次の10クロック間は差分絶対値の計算が
行われないので、MPX1101a〜1101lの選択
状態は不問であるが、1403の状態になると、次の候
補ブロック1008に対する差分絶対値の計算を行える
探索データが全て揃い、例えばPDC1102a〜11
02dに入力される探索データを保持するシフトレジス
タは、シフトレジスタ1305〜1308となる。
Since the calculation of the absolute difference value is not performed during the next 10 clocks, the selection state of the MPXs 1101a to 1101l is irrelevant. All the search data that can be performed are available, for example, PDCs 1102a-11
The shift registers holding the search data input to 02d are shift registers 1305 to 1308.

【0120】したがって、制御回路907は、MPX1
101aの出力としてシフトレジスタ1305からの出
力(番号5の出力)を選択するように、コントロール信
号を発生する。また、MPX1101b〜1101dの
出力としてシフトレジスタ1306〜1308からの出
力(番号6〜8の出力)を各々選択するように、コント
ロール信号を発生する。
Therefore, the control circuit 907 controls the MPX1
A control signal is generated so as to select the output from the shift register 1305 (output of number 5) as the output of 101a. Also, control signals are generated so as to select outputs (outputs of numbers 6 to 8) from shift registers 1306 to 1308 as outputs of MPXs 1101b to 1101d, respectively.

【0121】また、この図14の1403の状態では、
PDC1102e〜1102hに入力される探索データ
を保持するシフトレジスタは、シフトレジスタ1314
〜1317となる。したがって、制御回路907は、M
PX1101e〜1101hの出力としてシフトレジス
タ1314〜1317からの出力(番号14〜17の出
力)を各々選択するように、コントロール信号を発生す
る。
In the state of 1403 in FIG. 14,
A shift register holding search data input to the PDCs 1102e to 1102h is a shift register 1314.
~ 1317. Therefore, the control circuit 907 uses M
Control signals are generated such that outputs (outputs of numbers 14 to 17) from the shift registers 1314 to 1317 are respectively selected as outputs of the PXs 1101e to 1101h.

【0122】さらに、PDC1102i〜1102lに
入力される探索データを保持するシフトレジスタは、シ
フトレジスタ1325〜1328となる。したがって、
制御回路907は、MPX1101i〜1101lの出
力としてシフトレジスタ1325〜1328からの出力
(番号25〜28の出力)を各々選択するように、コン
トロール信号を発生する。
Further, the shift registers holding search data input to PDCs 1102i to 1102l are shift registers 1325 to 1328. Therefore,
The control circuit 907 generates a control signal so as to select each of the outputs from the shift registers 1325 to 1328 (the outputs of numbers 25 to 28) as the outputs of the MPXs 1101i to 1101l.

【0123】これに続く4クロック間は、候補ブロック
1009〜1012に対する差分絶対値の計算を行える
探索データが全て揃う。このとき各MPX1101a〜
1101lの選択状態はそのままでいいので、制御回路
907は、コントロール信号の状態を上記候補ブロック
1008のときと同じ状態に保つようにする。
During the subsequent four clocks, all search data from which the absolute difference values for the candidate blocks 1009 to 1012 can be calculated are prepared. At this time, each MPX 1101a ~
The control circuit 907 keeps the state of the control signal in the same state as that of the candidate block 1008 because the selected state of 1101l can be left as it is.

【0124】次の10クロック間は差分絶対値の計算が
行われないので、MPX1101a〜1101lの選択
状態は不問であるが、1404の状態になると、次の候
補ブロック1013に対する差分絶対値の計算を行える
探索データが全て揃い、例えばPDC1102a〜11
02dに入力される探索データを保持するシフトレジス
タは、シフトレジスタ1302〜1305となる。
Since the calculation of the absolute difference value is not performed during the next 10 clocks, the selection state of the MPXs 1101a to 1101l is irrelevant, but when the state becomes 1404, the calculation of the absolute difference value for the next candidate block 1013 is stopped. All the search data that can be performed are available, for example, PDCs 1102a-11
The shift registers that hold the search data input to 02d are shift registers 1302-1305.

【0125】したがって、制御回路907は、MPX1
101aの出力としてシフトレジスタ1302からの出
力(番号2の出力)を選択するように、コントロール信
号を発生する。また、MPX1101b〜1101dの
出力としてシフトレジスタ1303〜1305からの出
力(番号3〜5の出力)を各々選択するように、コント
ロール信号を発生する。
Therefore, the control circuit 907 controls the MPX1
A control signal is generated so as to select the output from the shift register 1302 (the output of number 2) as the output of 101a. Also, control signals are generated so as to select outputs (outputs of numbers 3 to 5) from shift registers 1303 to 1305 as outputs of MPXs 1101b to 1101d, respectively.

【0126】また、この図14の1404の状態では、
PDC1102e〜1102hに入力される探索データ
を保持するシフトレジスタは、シフトレジスタ1313
〜1316となる。したがって、制御回路907は、M
PX1101e〜1101hの出力としてシフトレジス
タ1313〜1316からの出力(番号13〜16の出
力)を各々選択するように、コントロール信号を発生す
る。
In the state of 1404 in FIG. 14,
A shift register holding search data input to the PDCs 1102e to 1102h is a shift register 1313.
131316. Therefore, the control circuit 907 uses M
Control signals are generated such that outputs (outputs of numbers 13 to 16) from the shift registers 1313 to 1316 are respectively selected as outputs of the PXs 1101e to 1101h.

【0127】さらに、PDC1102i〜1102lに
入力される探索データを保持するシフトレジスタは、シ
フトレジスタ1325〜1328となる。したがって、
制御回路907は、MPX1101i〜1101lの出
力としてシフトレジスタ1325〜1328からの出力
(番号25〜28の出力)を各々選択するように、コン
トロール信号を発生する。
Further, the shift registers holding search data input to PDCs 1102i to 1102l are shift registers 1325 to 1328. Therefore,
The control circuit 907 generates a control signal so as to select each of the outputs from the shift registers 1325 to 1328 (the outputs of numbers 25 to 28) as the outputs of the MPXs 1101i to 1101l.

【0128】これに続く6クロック間は、候補ブロック
1014〜1019に対する差分絶対値の計算を行える
探索データが全て揃う。このとき各MPX1101a〜
1101lの選択状態はそのままでいいので、制御回路
907は、コントロール信号の状態を上記候補ブロック
1013のときと同じ状態に保つようにする。
During the following six clocks, all search data from which the absolute difference values for the candidate blocks 1014 to 1019 can be calculated are prepared. At this time, each MPX 1101a ~
Since the selection state of 1101l can be left as it is, the control circuit 907 keeps the state of the control signal in the same state as that of the candidate block 1013.

【0129】次の10クロック間は差分絶対値の計算が
行われないので、MPX1101a〜1101lの選択
状態は不問であるが、1405の状態になると、次の候
補ブロック1020に対する差分絶対値の計算を行える
探索データが全て揃い、例えばPDC1102a〜11
02dに入力される探索データを保持するシフトレジス
タは、シフトレジスタ1301〜1304となる。
Since the calculation of the absolute value of the difference is not performed during the next 10 clocks, the selection state of the MPXs 1101a to 1101l is irrelevant. All the search data that can be performed are available, for example, PDCs 1102a-11
The shift registers holding the search data input to 02d are shift registers 1301 to 1304.

【0130】したがって、制御回路907は、MPX1
101aの出力としてシフトレジスタ1301からの出
力(番号1の出力)を選択するように、コントロール信
号を発生する。また、MPX1101b〜1101dの
出力としてシフトレジスタ1302〜1304からの出
力(番号2〜4の出力)を各々選択するように、コント
ロール信号を発生する。
Therefore, the control circuit 907 controls the MPX1
A control signal is generated so as to select the output from the shift register 1301 (output of number 1) as the output of 101a. Also, control signals are generated so as to select outputs (outputs of numbers 2 to 4) from shift registers 1302 to 1304 as outputs of MPXs 1101b to 1101d, respectively.

【0131】また、この図14の1405の状態では、
PDC1102e〜1102hに入力される探索データ
を保持するシフトレジスタは、シフトレジスタ1313
〜1316となる。したがって、制御回路907は、M
PX1101e〜1101hの出力としてシフトレジス
タ1313〜1316からの出力(番号13〜16の出
力)を各々選択するように、コントロール信号を発生す
る。
In the state of 1405 in FIG. 14,
A shift register holding search data input to the PDCs 1102e to 1102h is a shift register 1313.
131316. Therefore, the control circuit 907 uses M
Control signals are generated such that outputs (outputs of numbers 13 to 16) from the shift registers 1313 to 1316 are respectively selected as outputs of the PXs 1101e to 1101h.

【0132】さらに、PDC1102i〜1102lに
入力される探索データを保持するシフトレジスタは、シ
フトレジスタ1325〜1328となる。したがって、
制御回路907は、MPX1101i〜1101lの出
力としてシフトレジスタ1325〜1328からの出力
(番号25〜28の出力)を各々選択するように、コン
トロール信号を発生する。
Further, the shift registers holding search data input to PDCs 1102i to 1102l are shift registers 1325 to 1328. Therefore,
The control circuit 907 generates a control signal so as to select each of the outputs from the shift registers 1325 to 1328 (the outputs of numbers 25 to 28) as the outputs of the MPXs 1101i to 1101l.

【0133】これに続く8クロック間は、候補ブロック
1021〜1028に対する差分絶対値の計算を行える
探索データが全て揃う。このとき各MPX1101a〜
1101lの選択状態はそのままでいいので、制御回路
907は、コントロール信号の状態を上記候補ブロック
1020のときと同じ状態に保つようにする。
During the subsequent eight clocks, all search data from which the absolute difference values for the candidate blocks 1021 to 1028 can be calculated are prepared. At this time, each MPX 1101a ~
Since the selection state of 1101l may be left as it is, the control circuit 907 keeps the state of the control signal in the same state as that of the candidate block 1020.

【0134】次の11クロック間は差分絶対値の計算が
行われないので、MPX1101a〜1101lの選択
状態は不問であるが、1406の状態になると、次の候
補ブロック1029に対する差分絶対値の計算を行える
探索データが全て揃い、例えばPDC1102a〜11
02dに入力される探索データを保持するシフトレジス
タは、シフトレジスタ1302〜1305となる。
Since the calculation of the absolute value of the difference is not performed during the next 11 clocks, the selection state of the MPXs 1101a to 1101l is irrelevant. All the search data that can be performed are available, for example, PDCs 1102a-11
The shift registers that hold the search data input to 02d are shift registers 1302-1305.

【0135】したがって、制御回路907は、MPX1
101aの出力としてシフトレジスタ1302からの出
力(番号2の出力)を選択するように、コントロール信
号を発生する。また、MPX1101b〜1101dの
出力としてシフトレジスタ1303〜1305からの出
力(番号3〜5の出力)を各々選択するように、コント
ロール信号を発生する。
Therefore, the control circuit 907 controls the MPX1
A control signal is generated so as to select the output from the shift register 1302 (the output of number 2) as the output of 101a. Also, control signals are generated so as to select outputs (outputs of numbers 3 to 5) from shift registers 1303 to 1305 as outputs of MPXs 1101b to 1101d, respectively.

【0136】また、この図14の1406の状態では、
PDC1102e〜1102hに入力される探索データ
を保持するシフトレジスタは、シフトレジスタ1314
〜1317となる。したがって、制御回路907は、M
PX1101e〜1101hの出力としてシフトレジス
タ1314〜1317からの出力(番号14〜17の出
力)を各々選択するように、コントロール信号を発生す
る。
Also, in the state of 1406 in FIG. 14,
A shift register holding search data input to the PDCs 1102e to 1102h is a shift register 1314.
~ 1317. Therefore, the control circuit 907 uses M
Control signals are generated such that outputs (outputs of numbers 14 to 17) from the shift registers 1314 to 1317 are respectively selected as outputs of the PXs 1101e to 1101h.

【0137】さらに、PDC1102i〜1102lに
入力される探索データを保持するシフトレジスタは、シ
フトレジスタ1326〜1329となる。したがって、
制御回路907は、MPX1101i〜1101lの出
力としてシフトレジスタ1326〜1329からの出力
(番号26〜29の出力)を各々選択するように、コン
トロール信号を発生する。
Further, shift registers holding the search data input to PDCs 1102i to 1102l are shift registers 1326-1329. Therefore,
The control circuit 907 generates a control signal such that outputs from the shift registers 1326 to 1329 (outputs of numbers 26 to 29) are respectively selected as outputs of the MPXs 1101i to 1101l.

【0138】これに続く6クロック間は、候補ブロック
1030〜1035に対する差分絶対値の計算を行える
探索データが全て揃う。このとき各MPX1101a〜
1101lの選択状態はそのままでいいので、制御回路
907は、コントロール信号の状態を上記候補ブロック
1029のときと同じ状態に保つようにする。
During the following six clocks, all search data for calculating the absolute difference value for the candidate blocks 1030 to 1035 are prepared. At this time, each MPX 1101a ~
Since the selection state of 1101l may be left as it is, the control circuit 907 keeps the state of the control signal in the same state as that of the candidate block 1029.

【0139】次の9クロック間は差分絶対値の計算が行
われないので、MPX1101a〜1101lの選択状
態は不問であるが、1407の状態になると、次の候補
ブロック1036に対する差分絶対値の計算を行える探
索データが全て揃い、例えばPDC1102a〜110
2dに入力される探索データを保持するシフトレジスタ
は、シフトレジスタ1305〜1308となる。
Since the calculation of the absolute difference value is not performed during the next nine clocks, the selection state of the MPXs 1101a to 1101l is irrelevant, but when the state becomes 1407, the calculation of the absolute difference value for the next candidate block 1036 is stopped. All search data that can be performed are available, for example, PDCs 1102a to 1102.
The shift registers that hold the search data input to 2d are shift registers 1305 to 1308.

【0140】したがって、制御回路907は、MPX1
101aの出力としてシフトレジスタ1305からの出
力(番号5の出力)を選択するように、コントロール信
号を発生する。また、MPX1101b〜1101dの
出力としてシフトレジスタ1306〜1308からの出
力(番号6〜8の出力)を各々選択するように、コント
ロール信号を発生する。
Therefore, the control circuit 907 controls the MPX1
A control signal is generated so as to select the output from the shift register 1305 (output of number 5) as the output of 101a. Also, control signals are generated so as to select outputs (outputs of numbers 6 to 8) from shift registers 1306 to 1308 as outputs of MPXs 1101b to 1101d, respectively.

【0141】また、この図14の1407の状態では、
PDC1102e〜1102hに入力される探索データ
を保持するシフトレジスタは、シフトレジスタ1317
〜1320となる。したがって、制御回路907は、M
PX1101e〜1101hの出力としてシフトレジス
タ1317〜1320からの出力(番号17〜20の出
力)を各々選択するように、コントロール信号を発生す
る。
In the state of 1407 in FIG. 14,
A shift register holding search data input to the PDCs 1102e to 1102h is a shift register 1317.
~ 1320. Therefore, the control circuit 907 uses M
Control signals are generated so as to select outputs (outputs of numbers 17 to 20) from shift registers 1317 to 1320 as outputs of PXs 1101e to 1101h, respectively.

【0142】さらに、PDC1102i〜1102lに
入力される探索データを保持するシフトレジスタは、シ
フトレジスタ1328〜1331となる。したがって、
制御回路907は、MPX1101i〜1101lの出
力としてシフトレジスタ1328〜1331からの出力
(番号28〜31の出力)を各々選択するように、コン
トロール信号を発生する。
Further, shift registers that hold search data input to PDCs 1102i to 1102l are shift registers 1328 to 1331. Therefore,
The control circuit 907 generates a control signal such that outputs from the shift registers 1328 to 1331 (outputs of numbers 28 to 31) are respectively selected as outputs of the MPXs 1101i to 1101l.

【0143】これに続く4クロック間は、候補ブロック
1037〜1040に対する差分絶対値の計算を行える
探索データが全て揃う。このとき各MPX1101a〜
1101lの選択状態はそのままでいいので、制御回路
907は、コントロール信号の状態を上記候補ブロック
1036のときと同じ状態に保つようにする。
During the subsequent four clocks, all search data from which the absolute difference values for the candidate blocks 1037 to 1040 can be calculated are prepared. At this time, each MPX 1101a ~
The control circuit 907 keeps the state of the control signal in the same state as that of the candidate block 1036 because the selected state of 11011l can be left as it is.

【0144】次の7クロック間は差分絶対値の計算が行
われないので、MPX1101a〜1101lの選択状
態は不問であるが、1408の状態になると、次の候補
ブロック1041に対する差分絶対値の計算を行える探
索データが全て揃い、例えばPDC1102a〜110
2dに入力される探索データを保持するシフトレジスタ
は、シフトレジスタ1310〜1313となる。
Since the calculation of the absolute value of the difference is not performed during the next seven clocks, the selection state of the MPXs 1101a to 1101l is irrelevant. All search data that can be performed are available, for example, PDCs 1102a to 1102.
The shift registers holding the search data input to 2d are shift registers 1310 to 1313.

【0145】したがって、制御回路907は、MPX1
101aの出力としてシフトレジスタ1310からの出
力(番号10の出力)を選択するように、コントロール
信号を発生する。また、MPX1101b〜1101d
の出力としてシフトレジスタ1311〜1313からの
出力(番号11〜13の出力)を各々選択するように、
コントロール信号を発生する。
Therefore, the control circuit 907 controls the MPX1
A control signal is generated so as to select the output from the shift register 1310 (the output of number 10) as the output of 101a. MPX1101b to 1101d
So that outputs from the shift registers 1311 to 1313 (outputs of numbers 11 to 13) are respectively selected as outputs of
Generate a control signal.

【0146】また、この図14の1408の状態では、
PDC1102e〜1102hに入力される探索データ
を保持するシフトレジスタは、シフトレジスタ1321
〜1324となる。したがって、制御回路907は、M
PX1101e〜1101hの出力としてシフトレジス
タ1321〜1324からの出力(番号21〜24の出
力)を各々選択するように、コントロール信号を発生す
る。
In the state of 1408 in FIG. 14,
A shift register holding search data input to the PDCs 1102e to 1102h is a shift register 1321.
131324. Therefore, the control circuit 907 uses M
Control signals are generated such that outputs (outputs of numbers 21 to 24) from the shift registers 1321 to 1324 are respectively selected as outputs of the PXs 1101e to 1101h.

【0147】さらに、PDC1102i〜1102lに
入力される探索データを保持するシフトレジスタは、シ
フトレジスタ1330〜1333となる。したがって、
制御回路907は、MPX1101i〜1101lの出
力としてシフトレジスタ1330〜1333からの出力
(番号30〜33の出力)を各々選択するように、コン
トロール信号を発生する。
Further, shift registers holding the search data input to the PDCs 1102i to 1102l are shift registers 1330 to 1333. Therefore,
The control circuit 907 generates a control signal such that outputs from the shift registers 1330 to 1333 (outputs of numbers 30 to 33) are respectively selected as outputs of the MPXs 1101i to 1101l.

【0148】これに続く2クロック間は、候補ブロック
1042,1043に対する差分絶対値の計算を行える
探索データが全て揃う。このとき各MPX1101a〜
1101lの選択状態はそのままでいいので、制御回路
907は、コントロール信号の状態を上記候補ブロック
1041のときと同じ状態に保つようにする。
In the subsequent two clocks, all search data for calculating the absolute difference between the candidate blocks 1042 and 1043 are prepared. At this time, each MPX 1101a ~
Since the selection state of 1101l can be left as it is, the control circuit 907 keeps the state of the control signal in the same state as that of the candidate block 1041.

【0149】次の5クロック間は差分絶対値の計算が行
われないので、MPX1101a〜1101lの選択状
態は不問であるが、1409の状態になると、次の候補
ブロック1044に対する差分絶対値の計算を行える探
索データが全て揃い、例えばPDC1102a〜110
2dに入力される探索データを保持するシフトレジスタ
は、シフトレジスタ1316〜1319となる。
Since the calculation of the absolute value of the difference is not performed during the next five clocks, the selection state of MPXs 1101a to 1101l is irrelevant. All search data that can be performed are available, for example, PDCs 1102a to 1102.
The shift registers holding the search data input to 2d are shift registers 1316 to 1319.

【0150】したがって、制御回路907は、MPX1
101aの出力としてシフトレジスタ1316からの出
力(番号16の出力)を選択するように、コントロール
信号を発生する。また、MPX1101b〜1101d
の出力としてシフトレジスタ1317〜1319からの
出力(番号17〜19の出力)を各々選択するように、
コントロール信号を発生する。
Therefore, the control circuit 907 controls the MPX1
A control signal is generated so as to select the output from the shift register 1316 (the output of number 16) as the output of 101a. MPX1101b to 1101d
So that outputs from the shift registers 1317 to 1319 (outputs of numbers 17 to 19) are respectively selected as outputs of
Generate a control signal.

【0151】また、この図14の1409の状態では、
PDC1102e〜1102hに入力される探索データ
を保持するシフトレジスタは、シフトレジスタ1325
〜1328となる。したがって、制御回路907は、M
PX1101e〜1101hの出力としてシフトレジス
タ1325〜1328からの出力(番号25〜28の出
力)を各々選択するように、コントロール信号を発生す
る。
In the state of 1409 in FIG. 14,
A shift register holding search data input to the PDCs 1102e to 1102h is a shift register 1325.
131328. Therefore, the control circuit 907 uses M
Control signals are generated so as to select outputs (outputs of numbers 25 to 28) from the shift registers 1325 to 1328 as outputs of the PXs 1101e to 1101h, respectively.

【0152】さらに、PDC1102i〜1102lに
入力される探索データを保持するシフトレジスタは、シ
フトレジスタ1332〜1335となる。したがって、
制御回路907は、MPX1101i〜1101lの出
力としてシフトレジスタ1332〜1335からの出力
(番号32〜35の出力)を各々選択するように、コン
トロール信号を発生する。
Further, the shift registers holding the search data input to the PDCs 1102i to 1102l are shift registers 1332 to 1335. Therefore,
The control circuit 907 generates a control signal such that outputs from the shift registers 1332 to 1335 (outputs of numbers 32 to 35) are respectively selected as outputs of the MPXs 1101i to 1101l.

【0153】以上により、全ての候補ブロック1004
〜1044に対する差分絶対値の計算が行われる。この
とき、最小値決定/動ベクトル発生回路906は、上述
したような大小比較およびレジスタへの更新記憶の処理
を各候補ブロックについて差分絶対値の合計が計算され
るごとに行うことにより、最終的に各候補ブロックの中
で最小の差分絶対値の合計を有する候補ブロックを参照
ブロックとして決定する。そして、その決定した参照ブ
ロックに対応する動ベクトルを発生する。
As described above, all candidate blocks 1004
The calculation of the absolute value of the difference with respect to. At this time, the minimum value determination / motion vector generation circuit 906 performs the above-described processing of magnitude comparison and update storage in the register every time the sum of the absolute difference values is calculated for each candidate block, so that the final value is obtained. The candidate block having the smallest sum of absolute difference values among the candidate blocks is determined as the reference block. Then, a motion vector corresponding to the determined reference block is generated.

【0154】なお、以上の動作においては、シフトレジ
スタ1309および1336からの出力は何れのPDC
1102a〜1102pでも利用されない。よって、こ
の場合はこれらのシフトレジスタ1309および133
6の出力を個別に取り出すように構成する必要はない。
In the above operation, the output from shift registers 1309 and 1336 is
Also not used in 1102a to 1102p. Therefore, in this case, these shift registers 1309 and 133
It is not necessary to arrange to take out the outputs of 6 individually.

【0155】以上に述べた一連の動作、すなわち、第1
のフレームメモリ901aからの符号化対象ブロックデ
ータの読み出し、第2のフレームメモリ901bからの
探索データの読み出し、各MPX1101a〜1101
lでの選択切り換え動作および最小値決定/動ベクトル
発生回路906での処理は、制御回路907が制御して
いる。
The series of operations described above, that is, the first
Of block data to be encoded from the frame memory 901a, search data from the second frame memory 901b, and MPXs 1101a to 1101
The control circuit 907 controls the selection switching operation at 1 and the processing in the minimum value determination / motion vector generation circuit 906.

【0156】制御回路907は、ハードウェア的に構成
しても良いが、例えばCPU、ROMおよびRAMなど
から成るマイクロコンピュータにより構成することも可
能である。この場合、上述のような一連の処理を行うシ
ーケンスを記述したプログラムは上記ROMに記憶さ
れ、このROMに記憶されたプログラムに従ってCPU
が動作する。このCPUの作業プログラムを格納したR
OMは、本発明の記録媒体を構成する。
The control circuit 907 may be constituted by hardware, but may also be constituted by a microcomputer comprising, for example, a CPU, a ROM and a RAM. In this case, a program describing a sequence for performing a series of processes as described above is stored in the ROM, and a CPU is executed in accordance with the program stored in the ROM.
Works. R storing the work program of this CPU
The OM constitutes the recording medium of the present invention.

【0157】また、上記マイクロコンピュータに周辺イ
ンタフェースを介してハードディスクを接続し、このハ
ードディスクに上記CPUの作業プログラムを格納する
ようにしても良い。このハードディスクには上記作業プ
ログラムを外部から供給することが可能であり、この場
合、ハードディスクや上記作業プログラムを供給するた
めの手段、例えば上記作業プログラムを格納した記録媒
体も、本発明の記録媒体を構成する。
Further, a hard disk may be connected to the microcomputer via a peripheral interface, and the work program of the CPU may be stored in the hard disk. The work program can be externally supplied to the hard disk. In this case, a hard disk and a means for supplying the work program, for example, a recording medium storing the work program are also recording media of the present invention. Configure.

【0158】上記作業プログラムを格納するための記録
媒体としては、ROMやハードディスクの他に、例えば
フロッピーディスク、光ディスク、光磁気ディスク、C
D−ROM、磁気テープ、不揮発性のメモリカード等を
用いることができる。
As a recording medium for storing the work program, in addition to a ROM and a hard disk, for example, a floppy disk, an optical disk, a magneto-optical disk,
A D-ROM, a magnetic tape, a nonvolatile memory card, or the like can be used.

【0159】このように、本実施形態によれば、H.2
61やH.263、あるいはMPEG1、2、4等の符
号化方式において、動ベクトルを求めるための探索範囲
を広げる一方で、その範囲内で差分絶対値計算に採用す
る候補ブロックを選別することにより、探索範囲を広げ
ても演算量を増大することなく(演算処理に要する時間
を増大することなく)、動ベクトルの検出精度を高め、
情報量をより効率的に圧縮することができる。
As described above, according to the present embodiment, the H.264 is used. 2
61 and H. In H.263 or MPEG1, 2, 4, etc., while expanding the search range for obtaining the motion vector, the search range is selected by selecting candidate blocks to be used for calculating the absolute difference value within the range. Even if it is expanded, without increasing the amount of calculation (without increasing the time required for calculation processing), the detection accuracy of the motion vector is improved,
The amount of information can be compressed more efficiently.

【0160】なお、以上の実施形態では、説明の簡略化
のために符号化対象ブロックおよび候補ブロックが図1
0に示す場合について述べたが、本発明はこれに限定さ
れない。H.261やH.263、MPEG1、2、4
では、実際には符号化対象ブロックは縦横16画素で構
成されるので、PDC、MPX等をその数に応じて構成
すれば良い(この場合はPDCが256個、MPXが2
40個)。また、候補ブロックを含む動ベクトル探索範
囲の形状も、図10のような菱形に限らず、任意の形状
とすることが可能である。
In the above embodiment, the coding target block and the candidate block are shown in FIG.
Although the case shown as 0 has been described, the present invention is not limited to this. H. 261 and H.E. 263, MPEG1, 2, 4
Then, since the encoding target block is actually composed of 16 pixels in the vertical and horizontal directions, PDC, MPX, etc. may be configured according to the number (in this case, 256 PDCs and 2 MPXs).
40). Further, the shape of the motion vector search range including the candidate block is not limited to the rhombus as shown in FIG. 10, but may be any shape.

【0161】また、候補ブロックの存在する範囲が大き
くなる場合には、探索データを入力する方向(上述の実
施形態では水平方向)の最大数(上述の実施形態では1
2)をn、符号化対象ブロックの探索データを入力する
方向の大きさ(上述の実施形態では4)をa、もう一方
の大きさ(上述の実施形態では4)をbとすると、n×
(b−1)+aで与えられる数のシフトレジスタから成
るシフトレジスタ群を用意すれば良い。さらに、候補ブ
ロックの選別方法が異なる場合には、MPXへの入力数
と、MPXに入力されるシフトレジスタの出力、および
MPXの制御をそれぞれに応じて構成すれば良い。
When the range in which the candidate block exists is large, the maximum number of search data input directions (horizontal direction in the above embodiment) (1 in the above embodiment).
Assuming that 2) is n, the size (4 in the above embodiment) of the search data input direction of the encoding target block is a, and the other size (4 in the above embodiment) is b, nx
A shift register group consisting of the number of shift registers given by (b-1) + a may be prepared. Further, when the candidate block selection method is different, the number of inputs to the MPX, the output of the shift register input to the MPX, and the control of the MPX may be configured in accordance with each.

【0162】[0162]

【発明の効果】本発明は上述したように、差分絶対値計
算手段により求められた各画素毎の差分絶対値を各サブ
ブロックごとに合算する複数のサブブロック合算手段
と、複数のサブブロック合算手段での各計算結果を合算
するブロック合算手段と、サブブロック合算手段による
計算結果かブロック合算手段による計算結果の何れかに
基づいて動ベクトルを求める動ベクトル発生手段と、何
れの計算結果を使用するかを制御する制御手段とを設け
たので、差分絶対値計算手段により計算された各画素毎
の差分絶対値を用いて、複数のサブブロック合算手段の
計算結果からサブブロック単位の動ベクトルを求めるこ
とができるとともに、各サブブロックでの合算結果を更
に合算したブロック合算手段の計算結果からマクロブロ
ック単位の動ベクトルを求めることができるようにな
る。これにより、マクロブロック単位の動ベクトルとサ
ブブロック単位の動ベクトルとを求めるために差分絶対
値計算手段を別々に設けなくても済み、上記2種類の動
ベクトルをより簡単な構成で求めることができる。この
とき、例えば画像の動きに応じてオフセットを加えるこ
とにより、サブブロック単位の動ベクトル探索範囲を移
動させて動ベクトルを求めることができ、探索範囲を広
げて演算時間を増大させることなく動ベクトルの検出精
度を向上させることができる。
As described above, according to the present invention, a plurality of sub-block summing means for summing the difference absolute value for each pixel obtained by the difference absolute value calculating means for each sub-block, Block summing means for summing the respective calculation results by the means, a motion vector generating means for obtaining a motion vector based on either the calculation result by the sub-block summation means or the calculation result by the block summation means, and which calculation result is used Control means for controlling whether to perform a motion vector for each sub-block from the calculation results of the plurality of sub-block summation means, using the difference absolute value for each pixel calculated by the difference absolute value calculation means. The motion vector for each macroblock can be obtained from the calculation result of the block summation unit that further sums the sum result of each sub-block. It is possible to obtain the. Accordingly, it is not necessary to separately provide a difference absolute value calculating means for obtaining a motion vector in a macroblock unit and a motion vector in a subblock unit, and the two types of motion vectors can be obtained with a simpler configuration. it can. At this time, for example, by adding an offset according to the motion of the image, the motion vector can be obtained by moving the motion vector search range in sub-block units, and the motion vector can be obtained without expanding the search range and increasing the calculation time. Detection accuracy can be improved.

【0163】本発明の他の特徴によれば、符号化対象ブ
ロック内の全ての差分絶対値計算手段を接続するか、1
つのサブブロック内の差分絶対値計算手段だけを他と切
り離して接続するかを切り換える切り換え手段を設けた
ので、サブブロック単位の動ベクトルを求めるときは、
各サブブロック毎に独立して候補ブロックの各画素値を
入力することができ、各サブブロック毎に与えられるオ
フセットが互いに異なっていてもそれぞれに適切なデー
タを入力することができるようになる。これにより、各
サブブロックの探索範囲に異なるオフセットを加えられ
るようにした符号化システムを構築する場合にも、本発
明の動ベクトル検出装置を適用してマクロブロック単位
の動ベクトルとサブブロック単位の動ベクトルとの両方
をより簡単な構成で求めることができ、演算時間を増大
させることなく動ベクトルの検出精度を向上させること
ができる。
According to another feature of the present invention, all difference absolute value calculation means in the current block are connected or
Since switching means for switching whether to connect only the absolute difference value calculating means in one sub-block separately from the other is provided, when obtaining a motion vector in sub-block units,
Each pixel value of the candidate block can be input independently for each sub-block, and appropriate data can be input to each of the sub-blocks even if the offset given to each sub-block is different from each other. Thereby, even when constructing an encoding system in which a different offset can be added to the search range of each sub-block, the motion vector detecting device of the present invention is applied to apply a motion vector in a macro block unit and a motion vector in a sub block unit. Both the motion vector and the motion vector can be obtained with a simpler configuration, and the detection accuracy of the motion vector can be improved without increasing the calculation time.

【0164】本発明のその他の特徴によれば、符号化対
象ブロック位置を含む所定の矩形領域内において、符号
化対象ブロックからの距離が遠い領域を除外した範囲を
動ベクトル探索範囲として計算を行うようにしたので、
矩形領域の探索範囲を通常より大きく広げても、その大
きな矩形領域内に含まれる動ベクトル探索範囲中で参照
ブロックの候補として差分絶対値計算の対象となるブロ
ックの数が増大しないようにすることができる。これに
より、動き探索の演算量を増大することなく、探索範囲
を広げて動ベクトルの検出精度を高めることができる。
According to another feature of the present invention, in a predetermined rectangular area including the position of the block to be coded, the calculation is performed with a range excluding a region far from the block to be coded as a motion vector search range. So,
Even if the search range of the rectangular area is expanded more than usual, the number of blocks for which the absolute difference calculation is performed as a reference block candidate in the motion vector search range included in the large rectangular area is not increased. Can be. As a result, the search range can be expanded and the detection accuracy of the motion vector can be increased without increasing the calculation amount of the motion search.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1の実施形態による動ベクトル検出
装置の要部構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a main configuration of a motion vector detection device according to a first embodiment of the present invention.

【図2】図1に示した画素毎の差分絶対値計算回路(P
DC)の構成図である。
FIG. 2 is a circuit for calculating a difference absolute value for each pixel (P shown in FIG. 1);
FIG.

【図3】動き補償フレーム間予測および動ベクトルを説
明するための図である。
FIG. 3 is a diagram for explaining motion compensation inter-frame prediction and motion vectors.

【図4】動ベクトルを検出する方法の1つであるブロッ
クマッチング法を説明するための図である。
FIG. 4 is a diagram for explaining a block matching method which is one of the methods for detecting a motion vector.

【図5】サブブロック単位の動ベクトルを説明するため
の図である。
FIG. 5 is a diagram for explaining a motion vector in sub-block units.

【図6】サブブロック単位の探索範囲にオフセットを加
えた場合の動ベクトル検出を説明するための図である。
FIG. 6 is a diagram for describing motion vector detection when an offset is added to a search range in units of sub-blocks.

【図7】本発明の第2の実施形態による動ベクトル検出
装置の特徴を説明するための図である。
FIG. 7 is a diagram for explaining features of a motion vector detection device according to a second embodiment of the present invention.

【図8】本発明の第2の実施形態による動ベクトル検出
装置の特徴を説明するための図である。
FIG. 8 is a diagram for explaining features of a motion vector detection device according to a second embodiment of the present invention.

【図9】本発明の第2の実施形態による動ベクトル検出
装置の要部構成を示すブロック図である。
FIG. 9 is a block diagram illustrating a main configuration of a motion vector detection device according to a second embodiment of the present invention.

【図10】本発明の第2の実施形態による動ベクトル検
出装置によって行われるブロックマッチング法の一例を
説明するための図である。
FIG. 10 is a diagram for explaining an example of a block matching method performed by the motion vector detection device according to the second embodiment of the present invention.

【図11】図9に示した差分絶対値計算回路の構成図で
ある。
11 is a configuration diagram of the absolute difference calculating circuit shown in FIG. 9;

【図12】図11に示した画素毎の差分絶対値計算回路
(PDC)の構成図である。
12 is a configuration diagram of a difference absolute value calculation circuit (PDC) for each pixel shown in FIG. 11;

【図13】図9に示したシフトレジスタ群の構成図であ
る。
FIG. 13 is a configuration diagram of a shift register group shown in FIG. 9;

【図14】探索データの入力処理を続けたときのシフト
レジスタ群の状態遷移の様子を示す図である。
FIG. 14 is a diagram illustrating a state transition of a shift register group when input processing of search data is continued.

【符号の説明】[Explanation of symbols]

11a〜11p PDC 12a〜12g MPX 13a〜13c 4段シフトレジスタ 14a〜14d サブブロック位置 101 差分絶対値計算回路 102a〜102d サブブロック合算回路 103 マクロブロック合算回路 104 最小値決定/動ベクトル発生回路 105a,105b フレームメモリ 106a,106b 読み出し回路 107 制御回路 201〜203 シフトレジスタ 204 計算回路 901a,901b フレームメモリ 902a,902b 読み出し回路 903 差分絶対値計算回路 904 シフトレジスタ群 905 ブロック合算回路 906 最小値決定/動ベクトル発生回路 907 制御回路 1102a〜1102p PDC 1101a〜1101l MPX 1201,1203 シフトレジスタ 1202 計算回路 1301〜1340 シフトレジスタ 11a to 11p PDC 12a to 12g MPX 13a to 13c Four-stage shift register 14a to 14d Subblock position 101 Difference absolute value calculation circuit 102a to 102d Subblock summation circuit 103 Macroblock summation circuit 104 Minimum value decision / motion vector generation circuit 105a, 105b Frame memory 106a, 106b Readout circuit 107 Control circuit 201-203 Shift register 204 Calculation circuit 901a, 901b Frame memory 902a, 902b Readout circuit 903 Difference absolute value calculation circuit 904 Shift register group 905 Block summation circuit 906 Minimum value determination / moving vector Generation circuit 907 Control circuit 1102a to 1102p PDC 1101a to 11011 MPX 1201, 1203 Shift register 1202 Calculation circuit 13 1-1340 shift register

Claims (21)

【特許請求の範囲】[Claims] 【請求項1】 符号化対象ブロック内の各画素値と動ベ
クトル探索範囲中で参照ブロックの候補となるブロック
内の各画素値との差分絶対値を計算し、当該計算した各
画素毎の差分絶対値を上記符号化対象ブロックを複数に
分割した各サブブロックごとに合算するとともに、それ
らの合算結果を更に合算し、上記サブブロックごとの合
算結果かそれら全ての合算結果の何れかに基づいて動ベ
クトルを求めるようにしたことを特徴とする動ベクトル
検出装置。
An absolute value of a difference between each pixel value in an encoding target block and each pixel value in a reference block candidate block in a motion vector search range is calculated, and the calculated difference for each pixel is calculated. The absolute value is summed for each sub-block obtained by dividing the encoding target block into a plurality, and the sum of the sums is further summed, based on either the sum of the sub-blocks or the sum of all of them. A motion vector detecting device, wherein a motion vector is obtained.
【請求項2】 上記符号化対象ブロック単位の動ベクト
ルを求めるか上記サブブロック単位の動ベクトルを求め
るかに応じて、上記参照ブロックの候補となるブロック
内の各画素値の入力に対して上記符号化対象ブロック内
の各画素毎の差分絶対値計算手段を全て接続するか、上
記符号化対象ブロック中の1つのサブブロック内の差分
絶対値計算手段だけを他と切り離して接続するかを切り
換える切り換え手段を備えたことを特徴とする請求項1
に記載の動ベクトル検出装置。
2. The method according to claim 1, wherein the input of each pixel value in a block that is a candidate for the reference block is performed according to whether a motion vector of the encoding target block is obtained or a motion vector of the sub block is obtained. Switching between connecting all the difference absolute value calculation means for each pixel in the encoding target block or connecting only the difference absolute value calculation means in one sub-block in the encoding target block separately from the others. 2. The apparatus according to claim 1, further comprising switching means.
4. A motion vector detecting device according to claim 1.
【請求項3】 上記サブブロック単位の動ベクトルを求
める際に所定のオフセットを加えることにより、上記サ
ブブロック単位の動ベクトルを求める際の動ベクトル探
索範囲を移動させるオフセット手段を更に備えたことを
特徴とする請求項2に記載の動ベクトル検出装置。
3. The method according to claim 1, further comprising: an offset unit for adding a predetermined offset when obtaining the motion vector in the sub-block unit, thereby moving a motion vector search range in obtaining the motion vector in the sub-block unit. The motion vector detection device according to claim 2, wherein
【請求項4】 符号化対象ブロック内の各画素値と動ベ
クトル探索範囲中で参照ブロックの候補となるブロック
内の各画素値との差分絶対値を計算する各画素毎の差分
絶対値計算手段と、 上記差分絶対値計算手段により求められた各画素毎の差
分絶対値を上記符号化対象ブロックを複数に分割した各
サブブロックごとに合算する複数のサブブロック合算手
段と、 上記複数のサブブロック合算手段での各計算結果を合算
するブロック合算手段と、 上記サブブロック合算手段による計算結果か上記ブロッ
ク合算手段による計算結果の何れかに基づいて上記参照
ブロックを決定し、動ベクトルを求める動ベクトル発生
手段と、 上記動ベクトル発生手段を所定の制御信号により制御す
る制御手段とを備えたことを特徴とする動ベクトル検出
装置。
4. A difference absolute value calculating means for each pixel, which calculates a difference absolute value between each pixel value in a coding target block and each pixel value in a reference block candidate block in a motion vector search range. A plurality of sub-block summing means for summing the difference absolute value of each pixel obtained by the difference absolute value calculation means for each sub-block obtained by dividing the encoding target block into a plurality of pieces; and the plurality of sub-blocks A block summation means for summing the respective calculation results in the summation means; and a motion vector for determining the reference block based on either the calculation result by the sub-block summation means or the calculation result by the block summation means, and obtaining a motion vector. A motion vector detection device comprising: a generation unit; and a control unit that controls the motion vector generation unit by a predetermined control signal.
【請求項5】 符号化対象ブロック内の各画素値と動ベ
クトル探索範囲中で参照ブロックの候補となるブロック
内の各画素値との差分絶対値を計算する各画素毎の差分
絶対値計算手段と、 上記差分絶対値計算手段により求められた各画素毎の差
分絶対値を上記符号化対象ブロックを複数に分割した各
サブブロックごとに合算する複数のサブブロック合算手
段と、 上記複数のサブブロック合算手段での各計算結果を合算
するブロック合算手段と、 上記参照ブロックの候補となるブロック内の各画素値の
入力に対して上記符号化対象ブロック内の全ての差分絶
対値計算手段を接続するか、上記符号化対象ブロック中
の1つのサブブロック内の差分絶対値計算手段だけを他
と切り離して接続するかを切り換える切り換え手段と、 上記サブブロック合算手段による計算結果か上記ブロッ
ク合算手段による計算結果の何れかに基づいて上記参照
ブロックを決定し、動ベクトルを求める動ベクトル発生
手段と、 上記切り換え手段および上記動ベクトル発生手段を所定
の制御信号により制御する制御手段とを備えたことを特
徴とする動ベクトル検出装置。
5. A difference absolute value calculating means for each pixel for calculating a difference absolute value between each pixel value in a coding target block and each pixel value in a block which is a candidate for a reference block in a motion vector search range. A plurality of sub-block summing means for summing the difference absolute value of each pixel obtained by the difference absolute value calculation means for each sub-block obtained by dividing the encoding target block into a plurality of pieces; and the plurality of sub-blocks A block summing means for summing the respective calculation results by the summing means, and all difference absolute value calculating means in the encoding target block are connected to the input of each pixel value in the reference block candidate block. Switching means for switching whether only the absolute difference value calculating means in one sub-block in the encoding target block is connected separately from the other, and A motion vector generating means for determining the reference block based on either the calculation result by the calculation means or the calculation result by the block summing means and obtaining a motion vector; And a control means for controlling the motion vector.
【請求項6】 上記各画素毎の差分絶対値計算手段を上
記符号化対象ブロック内の各画素と対応する位置に設
け、これら複数の差分絶対値計算手段を上記切り換え手
段および所定数のシフトレジスタを介して直列に接続
し、 上記各画素毎の差分絶対値計算手段の一方の入力端子に
上記符号化対象ブロック内の各画素値を入力するととも
に、上記各画素毎の差分絶対値計算手段の他方の入力端
子には、上記動ベクトル探索範囲内の各画素値を、直列
に接続された差分絶対値計算手段の初段から最終段へと
順次送りながら入力していくようにしたことを特徴とす
る請求項5に記載の動ベクトル検出装置。
6. The difference absolute value calculation means for each pixel is provided at a position corresponding to each pixel in the encoding target block, and the plurality of difference absolute value calculation means are provided by the switching means and a predetermined number of shift registers. Are connected in series via the input terminal, and while inputting each pixel value in the encoding target block to one input terminal of the absolute difference value calculating means for each pixel, the differential absolute value calculating means for each pixel The other input terminal is characterized in that each pixel value within the motion vector search range is input while being sequentially sent from the first stage to the last stage of the differential absolute value calculating means connected in series. The motion vector detection device according to claim 5, wherein
【請求項7】 上記参照ブロックの候補となるブロック
は、所定のオフセットが加えられて移動された動ベクト
ル探索範囲内にある複数のブロックであることを特徴と
する請求項5または6に記載の動ベクトル検出装置。
7. The block according to claim 5, wherein the reference block candidate block is a plurality of blocks within a motion vector search range shifted by adding a predetermined offset. Motion vector detector.
【請求項8】 上記所定のオフセットは、画像の動きに
応じて設定することを特徴とする請求項7に記載の動ベ
クトル検出装置。
8. The motion vector detecting device according to claim 7, wherein the predetermined offset is set according to the motion of the image.
【請求項9】 上記動ベクトル探索範囲内の各画素値を
含む参照フレームの画像メモリに対して、各画素毎の差
分絶対値計算手段に入力する上記動ベクトル探索範囲内
の各画素値の読み出しを制御する読み出し手段を備えた
ことを特徴とする請求項1〜8の何れか1項に記載の動
ベクトル検出装置。
9. Reading out each pixel value in the motion vector search range, which is input to a difference absolute value calculation means for each pixel, from an image memory of a reference frame including each pixel value in the motion vector search range. The motion vector detecting device according to any one of claims 1 to 8, further comprising a reading unit that controls the motion vector.
【請求項10】 符号化の方式がH.263またはMP
EG4であることを特徴とする請求項1〜9の何れか1
項に記載の動ベクトル検出装置。
10. An encoding method according to H.264. 263 or MP
EG4, characterized in that it is EG4.
A motion vector detection device according to the item.
【請求項11】 符号化対象ブロック内の各画素値と動
ベクトル探索範囲中で参照ブロックの候補となるブロッ
ク内の各画素値との差分絶対値を計算し、この計算結果
に基づいて上記参照ブロックを決定して動ベクトルを発
生する動ベクトル検出装置であって、 上記符号化対象ブロック位置を含む所定の矩形領域内に
おいて上記符号化対象ブロックからの距離が遠い領域を
除外した範囲を上記動ベクトル探索範囲として計算を行
うようにしたことを特徴とする動ベクトル検出装置。
11. An absolute difference between each pixel value in an encoding target block and each pixel value in a block that is a candidate for a reference block in a motion vector search range is calculated, and the reference value is calculated based on the calculation result. A motion vector detection device that determines a block and generates a motion vector, wherein the motion vector detection device includes a predetermined rectangular area including the position of the current block and excluding an area that is far from the current block. A motion vector detection device, wherein calculation is performed as a vector search range.
【請求項12】 ブロックマッチング法により動ベクト
ルを発生する動ベクトル検出装置であって、 複数のシフトレジスタが直列に接続され、動ベクトル探
索範囲内の各画素値を上記直列に接続されたシフトレジ
スタの初段から最終段へと順次送りながら入力していく
ようになされるとともに、各シフトレジスタの出力が個
別に取り出されるようになされたシフトレジスタ群と、 符号化対象ブロック内の所定の画素位置に各々対応して
設けられ、上記シフトレジスタ群内の所定のシフトレジ
スタからの出力を複数入力してその中から何れかを選択
的に出力する複数の選択手段と、 上記符号化対象ブロック内の各画素値と、上記選択手段
あるいは上記シフトレジスタ群より供給される、上記動
ベクトル探索範囲中で参照ブロックの候補となるブロッ
ク内の各画素値との差分絶対値を計算する各画素毎の差
分絶対値計算手段と、 上記選択手段を所定の制御信号により制御する制御手段
とを備えたことを特徴とする動ベクトル検出装置。
12. A motion vector detecting apparatus for generating a motion vector by a block matching method, wherein a plurality of shift registers are connected in series, and each pixel value in a motion vector search range is connected to the serially connected shift register. The shift register group is designed to input while sequentially sending from the first stage to the last stage, and the output of each shift register is taken out individually, and at a predetermined pixel position in the encoding target block A plurality of selection means provided in correspondence with each other, for inputting a plurality of outputs from a predetermined shift register in the shift register group, and selectively outputting any one of the plurality of outputs; A pixel value and a block supplied as a reference block candidate in the motion vector search range supplied from the selection means or the shift register group. Motion vector detection, comprising: a difference absolute value calculation means for each pixel for calculating a difference absolute value from each pixel value in the lock; and a control means for controlling the selection means by a predetermined control signal. apparatus.
【請求項13】 上記各画素毎の差分絶対値計算手段に
より求められた各画素毎の差分絶対値を合算するブロッ
ク合算手段と、 上記ブロック合算手段による計算結果に基づいて上記参
照ブロックを決定し、動ベクトルを求める動ベクトル発
生手段とを備えたことを特徴とする請求項12に記載の
動ベクトル検出装置。
13. A block summing means for summing the difference absolute value for each pixel obtained by the difference absolute value calculation means for each pixel, and the reference block is determined based on a calculation result by the block summing means. 13. The motion vector detecting device according to claim 12, further comprising: a motion vector generating means for obtaining a motion vector.
【請求項14】 上記シフトレジスタ群に各画素値が入
力される上記動ベクトル探索範囲は、上記符号化対象ブ
ロック位置を含む所定の矩形領域内において上記符号化
対象ブロックからの距離が遠い領域を除外した範囲であ
ることを特徴とする請求項12に記載の動ベクトル検出
装置。
14. The motion vector search range in which each pixel value is input to the shift register group is defined as an area that is far from the encoding target block within a predetermined rectangular area including the encoding target block position. 13. The motion vector detecting device according to claim 12, wherein the motion vector is excluded.
【請求項15】 上記所定の矩形領域は上記符号化対象
ブロックと相似または非相似の矩形領域であり、上記動
ベクトル探索範囲は上記矩形領域に内接する菱形の領域
であることを特徴とする請求項14に記載の動ベクトル
検出装置。
15. The method according to claim 15, wherein the predetermined rectangular area is a rectangular area similar or dissimilar to the encoding target block, and the motion vector search range is a rhombic area inscribed in the rectangular area. Item 15. A motion vector detecting device according to item 14.
【請求項16】 上記動ベクトル探索範囲内の各画素値
を含む参照フレームの画像メモリに対して、上記シフト
レジスタ群に入力する上記動ベクトル探索範囲内の各画
素値の読み出しを制御する読み出し手段を備えたことを
特徴とする請求項12〜15の何れか1項に記載の動ベ
クトル検出装置。
16. A reading means for controlling reading of each pixel value in the motion vector search range input to the shift register group from an image memory of a reference frame including each pixel value in the motion vector search range. The motion vector detecting device according to any one of claims 12 to 15, further comprising:
【請求項17】 符号化の方式がH.261、H.26
3、MPEG1、MPEG2またはMPEG4であるこ
とを特徴とする請求項11〜16の何れか1項に記載の
動ベクトル検出装置。
17. An encoding method according to H.264. 261, H .; 26
17. The motion vector detection device according to claim 11, wherein the motion vector detection device is MPEG1, MPEG2, or MPEG4.
【請求項18】 符号化対象ブロック内の各画素値と動
ベクトル探索範囲中で参照ブロックの候補となるブロッ
ク内の各画素値との差分絶対値を計算し、当該計算した
各画素毎の差分絶対値を上記符号化対象ブロックを複数
に分割した各サブブロックごとに合算するとともに、そ
れらの合算結果を更に合算し、上記サブブロックごとの
合算結果かそれら全ての合算結果の何れかに基づいて動
ベクトルを求めるようになされた動ベクトル検出装置に
おいて、 上記符号化対象ブロック単位の動ベクトルを求めるか上
記サブブロック単位の動ベクトルを求めるかに応じて、
上記参照ブロックの候補となるブロック内の各画素値の
入力に対する上記符号化対象ブロック内の各画素毎の差
分絶対値計算手段の接続状態を切り換えるとともに、上
記サブブロックごとの合算結果かそれら全ての合算結果
の何れかを選択して動ベクトルを求めるようにする機能
をコンピュータに実現させるためのプログラムを記録し
たコンピュータ読み取り可能な記録媒体。
18. An absolute difference between each pixel value in the encoding target block and each pixel value in a reference block candidate block in a motion vector search range is calculated, and the calculated difference for each pixel is calculated. The absolute value is summed for each sub-block obtained by dividing the encoding target block into a plurality, and the sum of the sums is further summed, based on either the sum of the sub-blocks or the sum of all of them. In a motion vector detection device adapted to determine a motion vector, according to whether to determine the motion vector for the encoding target block or the motion vector for the sub-block unit,
Switching the connection state of the difference absolute value calculation means for each pixel in the encoding target block with respect to the input of each pixel value in the candidate block of the reference block, and the sum result for each sub-block or all of them A computer-readable storage medium storing a program for causing a computer to realize a function of selecting any of the summation results and obtaining a motion vector.
【請求項19】 上記サブブロック単位の動ベクトルを
求める際に画像の動きに応じて所定のオフセットを加え
ることにより、上記動ベクトル探索範囲を移動させて当
該動ベクトル探索範囲内の各画素値を読み出すようにす
る機能を更にコンピュータに実現させるためのプログラ
ムを記録したことを特徴とする請求項18に記載のコン
ピュータ読み取り可能な記録媒体。
19. A motion vector search range is moved by adding a predetermined offset according to the motion of an image when obtaining a motion vector in sub-block units, and each pixel value in the motion vector search range is determined. 19. The computer-readable recording medium according to claim 18, wherein a program for causing a computer to further realize a function of reading is recorded.
【請求項20】 符号化対象ブロック内の各画素値と動
ベクトル探索範囲中で参照ブロックの候補となるブロッ
ク内の各画素値との差分絶対値を計算し、この計算結果
に基づいて上記参照ブロックを決定して動ベクトルを発
生する動ベクトル検出装置において、 上記符号化対象ブロック位置を含む所定の矩形領域内に
おいて上記符号化対象ブロックからの距離が遠い領域を
除外した範囲を上記動ベクトル探索範囲として計算を行
うようにする機能をコンピュータに実現させるためのプ
ログラムを記録したコンピュータ読み取り可能な記録媒
体。
20. An absolute difference between each pixel value in an encoding target block and each pixel value in a reference block candidate block in a motion vector search range is calculated, and the reference value is calculated based on the calculation result. In the motion vector detecting device that determines a block and generates a motion vector, the motion vector search is performed in a predetermined rectangular area including the position of the current block, excluding an area that is far from the current block. A computer-readable recording medium in which a program for causing a computer to perform a function of performing a calculation as a range is recorded.
【請求項21】 上記動ベクトル検出装置は、複数のシ
フトレジスタが直列に接続され、上記動ベクトル探索範
囲内の各画素値を上記直列に接続されたシフトレジスタ
の初段から最終段へと順次送りながら入力していくよう
になされるとともに、各シフトレジスタの出力が個別に
取り出されるようになされたシフトレジスタ群と、上記
符号化対象ブロック内の所定の画素位置に各々対応して
設けられ、上記シフトレジスタ群内の所定のシフトレジ
スタからの出力を複数入力してその中から何れかを選択
的に出力する複数の選択手段と、上記符号化対象ブロッ
ク内の各画素値と、上記選択手段あるいは上記シフトレ
ジスタ群より供給される、上記動ベクトル探索範囲中で
参照ブロックの候補となるブロック内の各画素値との差
分絶対値を計算する各画素毎の差分絶対値計算手段とを
備え、 上記動ベクトル探索範囲内の各画素値を含む参照フレー
ムの画像メモリから当該動ベクトル探索範囲内の各画素
値を読み出して上記シフトレジスタ群に入力するように
するとともに、上記選択手段での選択動作を制御する機
能をコンピュータに実現させるためのプログラムを記録
したことを特徴とする請求項20に記載のコンピュータ
読み取り可能な記録媒体。
21. The motion vector detection device, wherein a plurality of shift registers are connected in series, and each pixel value within the motion vector search range is sequentially sent from the first stage to the last stage of the serially connected shift registers. And a shift register group in which the output of each shift register is individually taken out, and provided corresponding to a predetermined pixel position in the encoding target block, respectively. A plurality of selecting means for inputting a plurality of outputs from a predetermined shift register in the shift register group and selectively outputting any one of the plurality of outputs; each pixel value in the encoding target block; Calculate the absolute value of the difference between each pixel value in a block that is a reference block candidate in the motion vector search range and is supplied from the shift register group. Means for calculating a difference absolute value for each pixel, reading each pixel value in the motion vector search range from the image memory of the reference frame including each pixel value in the motion vector search range, and inputting the pixel value to the shift register group 21. The computer-readable recording medium according to claim 20, wherein a program for causing a computer to implement a function of controlling a selection operation by said selection means is recorded.
JP32527997A 1996-12-26 1997-11-11 Motion vector detection device and recording medium Expired - Fee Related JP3968161B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32527997A JP3968161B2 (en) 1996-12-26 1997-11-11 Motion vector detection device and recording medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP8-357004 1996-12-26
JP35700496 1996-12-26
JP32527997A JP3968161B2 (en) 1996-12-26 1997-11-11 Motion vector detection device and recording medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2007025733A Division JP2007151169A (en) 1996-12-26 2007-02-05 Motion vector detection apparatus and recording medium

Publications (2)

Publication Number Publication Date
JPH10243404A true JPH10243404A (en) 1998-09-11
JP3968161B2 JP3968161B2 (en) 2007-08-29

Family

ID=26571775

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32527997A Expired - Fee Related JP3968161B2 (en) 1996-12-26 1997-11-11 Motion vector detection device and recording medium

Country Status (1)

Country Link
JP (1) JP3968161B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007096804A (en) * 2005-09-29 2007-04-12 Megachips Lsi Solutions Inc Motion searching method
JP2008167048A (en) * 2006-12-27 2008-07-17 Toshiba Corp Information processing apparatus and program
US8130835B2 (en) 2004-03-29 2012-03-06 Samsung Electronics Co., Ltd. Method and apparatus for generating motion vector in hierarchical motion estimation

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8130835B2 (en) 2004-03-29 2012-03-06 Samsung Electronics Co., Ltd. Method and apparatus for generating motion vector in hierarchical motion estimation
JP2007096804A (en) * 2005-09-29 2007-04-12 Megachips Lsi Solutions Inc Motion searching method
JP2008167048A (en) * 2006-12-27 2008-07-17 Toshiba Corp Information processing apparatus and program
US8130839B2 (en) 2006-12-27 2012-03-06 Kabushiki Kaisha Toshiba Information processing apparatus with video encoding process control based on detected load

Also Published As

Publication number Publication date
JP3968161B2 (en) 2007-08-29

Similar Documents

Publication Publication Date Title
US6167090A (en) Motion vector detecting apparatus
KR100905880B1 (en) Motion estimation and/or compensation
KR100413153B1 (en) Picture encoder and picture decoder
KR100788570B1 (en) Motion picture decoding device and method thereof
JP5115498B2 (en) Image coding apparatus, image coding control method, and program
JP2001169288A (en) Device and method for searching motion vector
JPH0568155B2 (en)
US7853091B2 (en) Motion vector operation devices and methods including prediction
KR100450746B1 (en) Apparatus and method for performing mixed motion estimation based on hierarchical Search
JPWO2006006489A1 (en) Motion detection device
TWI706668B (en) Method and apparatus of inter prediction for video coding
JP2001076155A (en) Method and device for detecting moving object in dynamic image
JP3968161B2 (en) Motion vector detection device and recording medium
WO2003049034A2 (en) Image data retrieval
JP2007151169A (en) Motion vector detection apparatus and recording medium
JP2007267123A (en) Moving image encoding apparatus
JPH05236452A (en) Method and device for detection motion vector
JP4235209B2 (en) Motion vector detection apparatus and motion vector detection method
JP4570700B2 (en) Motion vector detector
JP3698501B2 (en) Motion vector detection device
JPH1042300A (en) Motion vector detection device
JP3483751B2 (en) Motion vector detecting device and motion vector detecting method
JP3585628B2 (en) Motion vector detection device
KR100892471B1 (en) Motion detection device
JP2006042114A (en) Motion vector detecting device, and detecting program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040929

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061030

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061107

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070205

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070529

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070604

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20100608

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110608

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120608

Year of fee payment: 5

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

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

Free format text: PAYMENT UNTIL: 20120608

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120608

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130608

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees