JPH10322706A - Motion vector detection device - Google Patents

Motion vector detection device

Info

Publication number
JPH10322706A
JPH10322706A JP13129297A JP13129297A JPH10322706A JP H10322706 A JPH10322706 A JP H10322706A JP 13129297 A JP13129297 A JP 13129297A JP 13129297 A JP13129297 A JP 13129297A JP H10322706 A JPH10322706 A JP H10322706A
Authority
JP
Japan
Prior art keywords
block
register
motion vector
input
cumulative addition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP13129297A
Other languages
Japanese (ja)
Inventor
Takashi Nishimura
崇 西村
Tadao Matsuura
忠男 松浦
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP13129297A priority Critical patent/JPH10322706A/en
Publication of JPH10322706A publication Critical patent/JPH10322706A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】 【課題】 符号化ブロックの画素数を多くしても、1つ
の画素値を同時に多くの回路へ出力する方法をとらずに
差分絶対値和を演算し、誤差なく高精度で、集積回路の
配置を容易化した動きベクトル検出回路を提供する。 【解決手段】 入力ポート1からの画素値は注目ブロッ
クの画素値を保持するRAレジスタ2と探索範囲の画素
値を保持するRBレジスタ3に入力され、RAレジスタ
2に検出期間中保持続ける注目ブロックの画素値とRB
レジスタ3に順次入力され保持される探索範囲の画素値
の差分の絶対値を演算器4で計算し、その出力を加算器
5で累積加算し、累積加算の中間結果を各RCレジスタ
6に保持する。遅延素子8により、演算タイミングに合
わせ中間結果を遅延させ、全累積加算値を最小値検出回
路9に入力し注目ブロックに対し最小値を示す候補ブロ
ックを求め、動きベクトルを検出する。また、回路構成
を変え、フィールド/フレーム毎にも検出できる。
(57) [Summary] [Problem] Even if the number of pixels in an encoding block is increased, the sum of absolute differences is calculated without taking a method of outputting one pixel value to many circuits at the same time, and high accuracy without error Accordingly, the present invention provides a motion vector detection circuit that facilitates the arrangement of an integrated circuit. A pixel value from an input port (1) is input to an RA register (2) for holding a pixel value of a block of interest and an RB register (3) for holding a pixel value of a search range, and is kept in the RA register (2) during the detection period. Pixel value and RB
The arithmetic unit 4 calculates the absolute value of the difference between the pixel values in the search range that are sequentially input to and held in the register 3, accumulates the output in the adder 5, and holds the intermediate result of the accumulation in each RC register 6. I do. The delay element 8 delays the intermediate result in accordance with the operation timing, inputs the total accumulated value to the minimum value detection circuit 9, obtains a candidate block having the minimum value for the target block, and detects a motion vector. Further, the detection can be performed for each field / frame by changing the circuit configuration.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、動画像の符号化に
関し、より詳細には、動き補償予測を用いた符号化方式
において求められる動きベクトルの検出回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to video coding, and more particularly, to a motion vector detection circuit required in a coding system using motion compensated prediction.

【0002】[0002]

【従来の技術】近年、動画像の高能率符号化方式とし
て、動き補償予測を用いた符号化方式が多く用いられ
る。動き補償予測方式は、動画像シーケンスの各画像を
符号化ブロックに分割し、符号化ブロック毎に用意する
参照画像の中から最も相関性の高いブロックへの変位を
表す動きベクトルを検出し、その動きベクトルを用いて
予測ブロックを求め、画像間に含まれる時間冗長性を低
減させる符号化方式である。
2. Description of the Related Art In recent years, as a high-efficiency coding method for a moving image, a coding method using motion compensation prediction is often used. The motion compensation prediction method divides each image of a moving image sequence into coding blocks, detects a motion vector representing a displacement to a most correlated block from among reference images prepared for each coding block, and detects the motion vector. This is a coding method that obtains a prediction block using a motion vector and reduces temporal redundancy included between images.

【0003】動きべクトルの検出方式としては、ブロッ
クマッチング法が知られている。以下、ブロックマッチ
ング法について説明する。ブロックマッチング法では、
動きべクトル探索領域内にある予測ブロック候補を取り
出し、ブロック候補と符号化ブロックとの間の誤差量を
計算する。そして、誤差量が最小となる候補を予測ブロ
ックとし、予測ブロック位置の符号化ブロック位置から
の相対的なズレ量を動きべクトルとする。ここで、前記
誤差量を下記式(1)で表されるD、すなわち符号化ブ
ロック内の画素と探索領域内の画素の間の差分絶対値和
(以下、「AE」と呼ぶ)とすると、誤差量Dを最小と
する(i,j)が動きベクトルとなる。ただし、式
(1)においては、符号化ブロックのサイズをM×N,
探索領域を水平垂直方向に各々[−K:K−1],[−
L:L−1]としている。また、Tは符号化ブロックの
画素、Rは探索領域内の画素を表している。
As a method of detecting a motion vector, a block matching method is known. Hereinafter, the block matching method will be described. In the block matching method,
The prediction block candidate in the motion vector search area is extracted, and an error amount between the block candidate and the coded block is calculated. Then, the candidate with the smallest error amount is set as the prediction block, and the relative shift amount of the prediction block position from the coded block position is set as the motion vector. Here, assuming that the error amount is D represented by the following equation (1), that is, the sum of absolute differences between the pixels in the coding block and the pixels in the search area (hereinafter, referred to as “AE”): (I, j) that minimizes the error amount D is a motion vector. However, in equation (1), the size of the coding block is M × N,
The search area is set to [-K: K-1] and [-
L: L-1]. Further, T represents a pixel of the coding block, and R represents a pixel in the search area.

【0004】[0004]

【数1】 (Equation 1)

【0005】上記、ブロックマッチング法により動きベ
クトルを検出する従来の動きベクトル検出回路として、
特開平7−184210号公報に示されるものがある。
以下に従来の動きベクトル検出回路について説明する。
図37は、従来の動きベクトル検出回路のブロック図で
ある。ここでは、説明の簡単化のため、ブロックサイズ
を2×2、探索範囲を4×4としている。図37におい
て、101は注目ブロック内の画素を保持するAレジス
タ、102は2つの値の差分の絶対値を計算する2項演
算器、103はAレジスタ101並びに2項演算器10
2からなるプロセッサ(1)〜プロセッサ(4)であ
る。104は注目ブロック内画素値を入力するSポー
ト、105は注目ブロック内画素値を入力し、その入力
した画素値を103のプロセッサ(1)〜プロセッサ
(4)のそれぞれのAレジスタ101に出力する注目ブ
ロック内画素値入力回路、106,107は探索範囲内
の画素値を入力するRAポート及びRBポート、108
は探索範囲内の画素値を入力し、その入力した画素値を
103のプロセッサ(1)〜プロセッサ(4)の2項演
算器102に出力する探索範囲内画素値入力回路、10
9は加算器(1)〜加算器(4)ならびにBレジスタ1
10からなる累積加算回路、112は最小値検出回路で
ある。注目ブロック内画素値入力回路105の内部構成
は、201のゲート(1)〜ゲート(4)、ゲート
(1)〜ゲート(4)201を制御する制御信号G
(1)〜G(4)、202の制御信号G(1)〜G
(4)のパターンが記憶されているROM,203のカ
ウンタで構成される。探索範囲内画素値入力回路108
の内部構成は、301のセレクタ(1)〜セレクタ
(4)、セレクタ(1)〜セレクタ(4)301を制御
する制御信号F(1)〜F(4)、制御信号F(1)〜
F(4)のパターンが記憶されている302のROM,
303のカウンタで構成される。
[0005] As a conventional motion vector detecting circuit for detecting a motion vector by the block matching method,
There is one disclosed in Japanese Patent Application Laid-Open No. 7-184210.
Hereinafter, a conventional motion vector detection circuit will be described.
FIG. 37 is a block diagram of a conventional motion vector detection circuit. Here, for simplicity of description, the block size is 2 × 2 and the search range is 4 × 4. In FIG. 37, reference numeral 101 denotes an A register that holds a pixel in a block of interest, 102 denotes a binary operation unit that calculates an absolute value of a difference between two values, 103 denotes an A register 101 and a binary operation unit 10
2 are processors (1) to (4). 104 is an S port for inputting a pixel value in the block of interest, 105 is input a pixel value in the block of interest, and outputs the input pixel value to the A register 101 of each of the processors (1) to (4) 103. A pixel value input circuit in the block of interest; 106 and 107 are RA ports and RB ports for inputting pixel values within the search range;
Is a search range pixel value input circuit that inputs pixel values within the search range and outputs the input pixel values to the binomial calculator 102 of the processors (1) to (4) 103.
9 is adder (1) to adder (4) and B register 1
An accumulative addition circuit consisting of 10 and 112 is a minimum value detection circuit. The internal configuration of the pixel value input circuit 105 in the block of interest includes a control signal G for controlling the gates (1) to (4) and the gates (1) to (4) 201 of 201.
(1) to G (4), control signals G (1) to G of 202
It is composed of a ROM storing the pattern of (4) and a counter of 203. Search range pixel value input circuit 108
Has an internal configuration of selectors (1) to (4) 301, control signals F (1) to F (4) for controlling the selectors 301 and (4) 301, and control signals F (1) to
ROM of 302 storing the pattern of F (4),
It comprises 303 counters.

【0006】以上のように構成された従来の動きベクト
ル検出回路の動作について、図38に示すような4×4
の探索範囲内の画素値R(i,j)(同図(B)参照)
及び2×2の注目のブロック内の画素値S(x,y)
(同図(A)参照)を用いて説明する。注目ブロック内
素入力回路105には、2×2の注目ブロック内の画素
値S(x,y)が、図37のSポート104から、図3
8の矢印の示す順番、すなわちS(1,1),S(1,
2),S(2,1),S(2,2)の順に入力され、制
御信号G(1)〜G(4)によって制御されるゲート
(1)〜ゲート(4)201によって選択され、プロセ
ッサ(1)103のAレジスタ101にはS(1,1)
プロセッサ(2)のAレジスタにはにはS(1,2)、
プロセッサ(3)のAレジスタにはS(2,1)、プロ
セッサ(4)のAレジスタにはS(2,2)の注目ブロ
ック内画素値が保持される。
[0008] The operation of the conventional motion vector detecting circuit having the above-described configuration will be described with reference to FIG.
Pixel value R (i, j) within the search range (see FIG. 3B)
And the pixel value S (x, y) in the 2 × 2 block of interest
This will be described with reference to FIG. The pixel value S (x, y) in the 2 × 2 target block is input from the S port 104 in FIG.
8, ie, S (1,1), S (1,
2), S (2,1), S (2,2) are input in this order and selected by gates (1) to (4) 201 controlled by control signals G (1) to G (4), S (1, 1) is stored in the A register 101 of the processor (1) 103.
S (1,2) is stored in the A register of the processor (2).
The A register of the processor (3) holds S (2,1), and the A register of the processor (4) holds S (2,2) the pixel value in the target block.

【0007】探索範囲内画素入力回路108には、4×
4の探索範囲内の画素値R(i,j)が、図37のRA
ポート106から図38のバンドAの各画素値が、同図
の矢印の示す順番、すなわちR(1,1),R(1,
2),R(2,1),R(2,2),…,R(4,
1),R(4,2)の順に入力され、図37のRBポー
ト107から図38のバンドBの各画素値が、同図の矢
印の示す順番、すなわちR(1,3),R(1,4),
R(2,3),R(2,4),…,R(4,3),R
(4,4)の順に入力される。ここでバンドBの入力は
バンドAの入力開始から2サイクル遅れて開始される。
探索範囲内画素入力回路108は図37に示すように、
301の各セレクタ(1)〜セレクタ(4)は、カウン
タ303とROM302より入力される制御信号F
(1)〜F(4)のレベルが、LOWならばRAポート
106から入力した画素値を、HIならばRBポート1
07から入力した画素値を選択し、103のプロセッサ
(1)〜プロセッサ(4)の2項演算器102に出力す
る。図39に各制御信号と各2項演算器102への入力
を示す。これにより、図38に示す候補ブロック1につ
いては、図39から、第1サイクルにプロセッサ(1)
の2項演算器102にR(1,1)が、第2サイクルに
プロセッサ(2)の2項演算器102にR(1,2)
が、第3サイクルにプロセッサ(3)の2項演算器10
2にR(2,1)が、第4サイクルにプロセッサ(4)
の2項演算器102にR(2,2)が、というように、
プロセッサ(1)〜プロセッサ(4)の2項演算器10
2に1サイクルおきに、そのプロセッサのAレジスタ1
01に保持された注目ブロック内の画素値と、候補ブロ
ック1内で同じ位置にある画素値が入力される。
The search range pixel input circuit 108 has 4 ×
The pixel value R (i, j) within the search range of No. 4 is RA
Each pixel value of the band A in FIG. 38 from the port 106 is arranged in the order indicated by the arrow in FIG. 38, that is, R (1,1), R (1,
2), R (2,1), R (2,2), ..., R (4
1) and R (4, 2) in order, and the pixel values of the band B in FIG. 38 from the RB port 107 in FIG. 37 are changed in the order indicated by the arrows in FIG. 37, that is, R (1, 3), R ( 1,4),
R (2,3), R (2,4), ..., R (4,3), R
They are input in the order of (4, 4). Here, the input of band B is started two cycles after the start of input of band A.
The search range pixel input circuit 108, as shown in FIG.
Each of the selectors (1) to (4) 301 includes a control signal F input from the counter 303 and the ROM 302.
If the level of (1) to F (4) is LOW, the pixel value input from the RA port 106 is used. If the level is HI, the RB port 1 is used.
07, the input pixel value is selected and output to the binomial calculator 102 of the processors (1) to (4) 103. FIG. 39 shows each control signal and the input to each binomial calculator 102. Thereby, for candidate block 1 shown in FIG. 38, processor (1)
In the second cycle, R (1,1) is stored in the binary operation unit 102 of the processor (2), and R (1,2) is stored in the binary operation unit 102 of the processor (2).
In the third cycle, the binomial operator 10 of the processor (3).
R (2,1) in 2 and processor (4) in 4th cycle
R (2,2) in the binomial calculator 102 of
Binary operation unit 10 of processors (1) to (4)
2 every other cycle, the processor's A register 1
The pixel value in the target block held at 01 and the pixel value at the same position in the candidate block 1 are input.

【0008】また、プロセッサ(1)103に入力され
る各候補ブロックの画素値に着目すると、図39から、
第1サイクルからは、候補ブロック1に関して、第2サ
イクルからは、候補ブロック2に関して、第3サイクル
からは、候補ブロック3に関して、…と、1サイクルお
きに次の候補ブロックに関しての画素値が入力される。
同様に、プロセッサ(2)〜プロセッサ(4)の2項演
算器102にも、1サイクルおきに次の候補ブロックに
関しての画素値が順次入力される。図37のプロセッサ
(1)〜プロセッサ(4)103では、2項演算器10
2がAレジスタ101に保持した注目ブロック内の画素
値S(x,y)と、入力した探索範囲内の画素値R
(i,j)との差分の絶対値 |S(x,y)−R(i,j)| を計算し、その計算結果を、累積加算回路111内の加
算器(1)〜加算器(4)109に出力する。累積加算
回路111では、各加算器109は2項演算器102の
出力と左側の加算器の出力とを加算し、結果をBレジス
タ110に格納する構成となっている。例えば図38の
候補ブロック1についてみれば、まずプロセッサ(1)
で |S(1,1)−R(1,1)| が計算され、結果は加算器(1)を介してBレジスタ
(1)に格納される。次にプロセッサ(2)で |S(1,2)−R(1,2)| が計算され、これとBレジスタ(1)にある先の |S(1,1)−R(1,1)| が加算器(2)で加算され、 |S(1,1)−R(1,1)|+|S(1,2)−R
(1,2)| がBレジスタ(2)に格納される。以下同様にして最終
的にBレジスタ(4)には、 |S(1,1)−R(1,1)|+|S(1,2)−R
(1,2)|+|S(2,1)−R(2,1)|+|S
(2,2)−R(2,2)| すなわち候補ブロック1に対するAE(式(1)参照)
が格納されることになる。以上がパイプライン的に動作
した結果として、候補ブロック2,3,…についても順
次計算され、Bレジスタ(4)を経て最小値検出回路に
順に供給されることになる。最小値検出回路112は、
累積加算回路111から順次出力される各候補ブロック
に対するAEの中から最小の値を持つものを検出し、対
応する候補ブロックの偏位を動きべクトル値として出力
する。
Focusing on the pixel value of each candidate block input to the processor (1) 103, FIG.
From the first cycle, regarding the candidate block 1, from the second cycle, regarding the candidate block 2, from the third cycle, regarding the candidate block 3,..., Pixel values regarding the next candidate block are input every other cycle. Is done.
Similarly, pixel values for the next candidate block are sequentially input to the binomial calculators 102 of the processors (2) to (4) every other cycle. In the processors (1) to (4) 103 of FIG.
2 is a pixel value S (x, y) in the block of interest held in the A register 101 and a pixel value R in the input search range.
The absolute value | S (x, y) −R (i, j) | of the difference from (i, j) is calculated, and the calculation result is added to adders (1) to ( 4) Output to 109. In the accumulator 111, each adder 109 adds the output of the binomial operator 102 and the output of the left adder, and stores the result in the B register 110. For example, regarding candidate block 1 in FIG. 38, first, the processor (1)
| S (1,1) -R (1,1) | is calculated, and the result is stored in the B register (1) via the adder (1). Next, | S (1,2) -R (1,2) | is calculated by the processor (2), and | S (1,1) -R (1,1) in the B register (1) is calculated. ) | Is added by the adder (2), and | S (1,1) -R (1,1) | + | S (1,2) -R
(1,2) | is stored in the B register (2). Similarly, finally, in the B register (4), | S (1,1) -R (1,1) | + | S (1,2) -R
(1,2) | + | S (2,1) -R (2,1) | + | S
(2,2) −R (2,2) | That is, AE for candidate block 1 (see equation (1))
Will be stored. As a result of the above-described pipeline operation, the candidate blocks 2, 3,... Are also sequentially calculated and sequentially supplied to the minimum value detection circuit via the B register (4). The minimum value detection circuit 112
The AE for each candidate block sequentially output from the accumulator 111 is detected as the one having the smallest value, and the deviation of the corresponding candidate block is output as a motion vector value.

【0009】[0009]

【発明が解決しようとする課題】上記の従来の動きベク
トル検出回路は、注目ブロックの大きさをM×Nとした
時、ポートSから入力される注目ブロック内画素値およ
びRAポートとRBポートから入力される候補ブロック
内画素値が、それぞれM×N個のゲート(1)〜ゲート
(M×N)およびセレクタ(1)〜セレクタ(M×N)
へ同時に出力されることになるが、MおよびNの数値が
大きくなると1つの入力画素値を非常に多くの回路に同
時に出力しなければならないため出力負荷の増大と信号
遅延をまねき、集積回路で実現する際には、配線が困難
であったり、集積回路内の配置を適切に行わなければタ
イミングにスキューが生じたりする問題を有していた。
When the size of the block of interest is M × N, the conventional motion vector detection circuit described above uses the pixel value in the block of interest input from the port S and the RA and RB ports. The input pixel values in the candidate block are M × N gates (1) to (M × N) and selectors (1) to (M × N), respectively.
However, if the numerical values of M and N increase, one input pixel value must be output to a very large number of circuits at the same time, which results in an increase in output load and signal delay. At the time of realization, there is a problem that wiring is difficult or skew occurs in timing unless the arrangement in the integrated circuit is properly performed.

【0010】本発明は上記した従来技術における問題点
に鑑みてなされたもので、符号化ブロックの画素数を多
くしても、1つの画素値を同時に多くの回路へ出力する
という方法をとらないようにして差分絶対値和の演算処
理を行い、この演算処理において誤差を生じさせず、検
出精度を上げるとともに、集積回路の配置を容易化した
動きベクトル検出回路を提供することをその解決すべき
課題とする。
The present invention has been made in view of the above-mentioned problems in the prior art, and does not take a method of simultaneously outputting one pixel value to many circuits even if the number of pixels of the coding block is increased. Thus, it is necessary to solve the problem of providing a motion vector detection circuit that performs the calculation of the sum of absolute differences, does not cause an error in the calculation, increases the detection accuracy, and facilitates the arrangement of the integrated circuit. Make it an issue.

【0011】[0011]

【課題を解決するための手段】本発明におけるは、符号
化(注目)ブロックのブロックサイズをM×Nとし、ブ
ロックマッチング法によって参照画像上で全探索を行
い、動きベクトルを検出する回路であって、探索範囲内
の画素値を入力するポートを1つにして、探索範囲内の
画素値を保持するレジスタをプロセッサ一定数毎に設
け、注目ブロックの画素値を保持するレジスタおよび上
記探索範囲内の画素値を保持するレジスタを各々カスケ
ード接続し、上記注目ブロックの画素値を保持するレジ
スタの出力と上記探索範囲内の画素値を保持するレジス
タの出力との差分の絶対値を計算するM×Nの演算ユニ
ットと、上記演算ユニットの計算結果を累積加算するた
めのカスケード接続された加算器と、上記累積加算の中
間結果を保持するレジスタと、上記累積加算の中間結果
を保持するレジスタをプロセッサの演算タイミングに合
わせるために遅延させる遅延遅延手段と、上記累積加算
器の結果の中から最小値を検出する最小値検出回路を設
けたものである。
According to the present invention, there is provided a circuit for detecting a motion vector by performing a full search on a reference image by a block matching method with a block size of an encoded (attention) block being M × N. A single port for inputting pixel values within the search range is provided, a register for holding the pixel values within the search range is provided for each fixed number of processors, and a register for holding the pixel value of the block of interest and M × are calculated by cascade-connecting the registers for holding the pixel values of the above and calculating the absolute value of the difference between the output of the register for holding the pixel values of the block of interest and the output of the register for holding the pixel values within the search range. N arithmetic units, a cascade-connected adder for cumulatively adding the calculation result of the arithmetic unit, and a register for holding an intermediate result of the cumulative addition And a delay holding means for delaying a register holding an intermediate result of the cumulative addition to match the operation timing of the processor, and a minimum value detecting circuit for detecting a minimum value from the result of the cumulative adder. Things.

【0012】請求項1の発明は、画像におけるM×N個
の画素からなるブロックを符号化ブロックとし、該符号
化ブロックに対する候補ブロックを参照画像上の探索範
囲においてブロックマッチング法により探索し、得られ
る最適なマッチングを示す候補ブロックの位置にもとづ
き、動きベクトルを検出する動きベクトル検出装置であ
って、前記符号化ブロック内のM×N個の画素値及び前
記探索範囲内の画素値を入力する入力部と、該入力部か
ら入力された符号化ブロック内の各画素値を画素毎に保
持するカスケード接続されたM×N個の第1のレジスタ
と、前記入力部から入力された前記探索範囲内の各画素
値を画素毎に保持するカスケード接続された第2のレジ
スタと、前記第1のレジスタの出力と前記第2のレジス
タの出力との差分の絶対値計算を該第1のレジスタの各
出力毎に行うM×N個の演算器と、それぞれがカスケー
ド接続され累積加算を行うM×N個の加算器と、前記加
算器で行った累積加算結果を該加算器毎に保持する第3
のレジスタと、前記加算器において前記演算器の出力と
前記第3のレジスタの出力を所定の動作タイミングで加
算を行うように前記第3のレジスタの出力を所定サイク
ルの動作タイミング期間遅延させるための(M−1)個
または(N−1)個の遅延手段と、前記探索範囲の各候
補ブロックに対する前記M×N個の加算器の少くとも一
部の累積加算結果の中から最小値を示す候補ブロックを
検出する最小値検出回路を備えるようにするものであ
る。
According to a first aspect of the present invention, a block consisting of M × N pixels in an image is set as a coding block, and a candidate block for the coding block is searched for in a search range on a reference image by a block matching method. A motion vector detecting device that detects a motion vector based on a position of a candidate block indicating an optimum matching to be performed, and inputs M × N pixel values in the encoded block and pixel values in the search range. An input unit, M × N first registers connected in cascade to hold each pixel value in an encoding block input from the input unit for each pixel, and the search range input from the input unit And a cascade-connected second register for holding each pixel value in each pixel, and a difference between an output of the first register and an output of the second register. M × N arithmetic units for performing logarithmic calculation for each output of the first register, M × N adders each of which is cascaded to perform cumulative addition, and cumulative addition performed by the adder A third method for storing the result for each adder
And an adder for delaying the output of the third register by an operation timing period of a predetermined cycle so that the output of the arithmetic unit and the output of the third register are added at a predetermined operation timing in the adder. (M-1) or (N-1) delay means and the minimum value from at least some of the cumulative addition results of the M × N adders for each candidate block in the search range. A minimum value detection circuit for detecting a candidate block is provided.

【0013】請求項2の発明は、請求項1において、そ
れぞれがカスケード接続された累積加算を行うM×N個
の前記加算器および該加算器で行った累積加算結果を該
加算器毎に保持する第3のレジスタについて、それぞれ
のM×(N/2)個を1組として全体を2つの組に分割
し、それぞれの組において累積加算を行い、得た累積加
算結果の中から最小値を示す候補ブロックをそれぞれ検
出する第1および第2の最小値検出回路を備えるように
するものである。
According to a second aspect of the present invention, in the first aspect, each of the M × N adders for performing the cascade-connected cumulative addition and the cumulative addition result performed by the adder are stored for each of the adders. For each of the third registers, the M × (N / 2) registers are set as one set, the whole is divided into two sets, cumulative addition is performed in each set, and the minimum value is obtained from the obtained cumulative addition results. And a first and a second minimum value detection circuit for detecting the candidate block shown in FIG.

【0014】請求項3の発明は、請求項1において、前
記第3のレジスタに保持される累積加算の中間結果を遅
延させるM×N個の第4のレジスタを該第3のレジスタ
それぞれに追加し、また前記遅延手段を(2×(M−
1))個に増やすとともに、カスケード接続された累積
加算を行う前記M×N個の加算器、累積加算結果を保持
する前記第3のレジスタ、前記第4のレジスタおよび前
記遅延手段について、(M/2)×N個の加算器と(M
/2)×N個の第3のレジスタと(M/2)×N個の第
4のレジスタと(M−1)個の遅延手段を1組として全
体を2つの組に分割し、それぞれの組について累積加算
を行い、得た累積加算結果の中から最小値を示す候補ブ
ロックをそれぞれ検出する第1および第2の最小値検出
回路を備えるようにするものである。
According to a third aspect of the present invention, in the first aspect, M × N fourth registers for delaying an intermediate result of the cumulative addition held in the third register are added to each of the third registers. And the delay means is (2 × (M−
1)) The M × N adders that perform the cumulative addition in cascade and increase the number of the adders, the third register, the fourth register, and the delay unit that hold the cumulative addition result are represented by (M / 2) × N adders and (M
(2) × N third registers, (M / 2) × N fourth registers, and (M−1) delay means as one set, and the whole is divided into two sets. The present invention is provided with first and second minimum value detection circuits for performing cumulative addition on a set and detecting candidate blocks having the minimum value from the obtained cumulative addition results.

【0015】請求項4の発明は、請求項2又は3におい
て、分割した前記2つの組のそれぞれが前記符号化ブロ
ックの奇数フィールド及び偶数フィールドに対応するよ
うにするものである。
According to a fourth aspect of the present invention, in the second or third aspect, each of the divided two sets corresponds to an odd field and an even field of the encoded block.

【0016】請求項5の発明は、請求項2ないし4いず
れか1において、いずれか1分割した前記2つの組につ
いて得た累積加算の合計を求めるさらなる加算器と、該
さらなる加算器の累積加算結果の中から最小値を示す候
補ブロックを検出する第3の最小値検出回路を備えるよ
うにするものである。
According to a fifth aspect of the present invention, in any one of the second to fourth aspects, a further adder for obtaining a sum of the cumulative additions obtained for the two sets divided by one, and a cumulative addition of the further adder A third minimum value detection circuit for detecting a candidate block having the minimum value from the results is provided.

【0017】[0017]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

(実施形態1)図1は、本発明による動きベクトル検出
装置の一実施形態を示す図である。図1において、1は
注目ブロック内の画素値及び探索範囲内の画素値両方を
入力するための入力ポートである。2は入力ポート1か
ら入力される注目ブロック内の画素値を保持するための
RAレジスタであり、3は入力される探索範囲内の画素
値を保持するためのRBレジスタであり、4はRAレジ
スタ2に保持された注目ブロック内の画素値とRBレジ
スタ3に保持された探索範囲内の画素値の差分の絶対値
を計算するための|A−B|演算器であり、5は|A−
B|演算器4の出力を累積加算していくための加算器で
あり、6は加算器5で計算された累積加算の中間結果を
保持するためのRCレジスタである。7は上記RAレジ
スタ2と|A−B|演算器4と加算器5とRCレジスタ
6から構成されるプロセッシングエレメント(PE)で
ある。8は所定のRCレジスタ6に保持された累積加算
の中間結果を所定のPE7での演算タイミングに合わせ
るために遅延させる遅延素子である。9は累積加算の結
果求められた注目ブロックと探索範囲内の各ブロックの
差分絶対値和(AE)から最小値を検出するための最小
値検出回路で、最小値が検出されたタイミングにもとづ
き最小値ブロックの注目ブロックに対する偏位を動きベ
クトルとして出力する。なお、図1において、Mは注目
ブロック水平方向の画素数に対応し、Nは注目ブロック
の垂直方向の画素数に対応し、PEは、PE[1],P
E[2]…,PE[M×N]からなるM×Nのエレメン
トを構成する。また、本実施形態では、入力ポート1は
1つであるが、注目ブロック内の画素値と探索範囲内の
画素値で別々の入力用ポートに分けても良い。
(Embodiment 1) FIG. 1 is a diagram showing an embodiment of a motion vector detecting device according to the present invention. In FIG. 1, reference numeral 1 denotes an input port for inputting both a pixel value in a target block and a pixel value in a search range. Reference numeral 2 denotes an RA register for holding a pixel value in a target block input from the input port 1, reference numeral 3 denotes an RB register for holding a pixel value in a search range to be input, and reference numeral 4 denotes an RA register. | AB | computing unit for calculating the absolute value of the difference between the pixel value in the target block held in 2 and the pixel value in the search range held in the RB register 3, and 5 is | A-
B | is an adder for cumulatively adding the output of the arithmetic unit 4, and 6 is an RC register for holding an intermediate result of the cumulative addition calculated by the adder 5. Reference numeral 7 denotes a processing element (PE) composed of the RA register 2, | AB | arithmetic unit 4, adder 5, and RC register 6. Reference numeral 8 denotes a delay element that delays the intermediate result of the cumulative addition held in the predetermined RC register 6 in order to match the operation timing in the predetermined PE 7. Reference numeral 9 denotes a minimum value detection circuit for detecting a minimum value from the sum of absolute differences (AE) between the block of interest obtained as a result of the cumulative addition and each block within the search range, and a minimum value detection circuit 9 based on the timing at which the minimum value is detected. The deviation of the value block from the target block is output as a motion vector. In FIG. 1, M corresponds to the number of pixels in the horizontal direction of the block of interest, N corresponds to the number of pixels in the vertical direction of the block of interest, and PE is PE [1], P
.., And constitutes an M × N element composed of PE [M × N]. In this embodiment, the number of input ports 1 is one. However, the input ports may be divided into different input ports based on the pixel values in the target block and the pixel values in the search range.

【0018】以下、本実施形態の動作について説明をす
るが、説明を簡単にするため、図2の例、すなわち、注
目ブロックのサイズを4×4(図1(A)参照)、動き
ベクトルの探索範囲を水平方向、垂直方向とも[−2:
1]とした(図2(B)参照)場合について、注目ブロ
ック内の画素値T(m,n)と探索範囲内の画素値R
(i,j)を使って説明する。この場合、図1のM,N
はそれぞれ4となる。まず、入力端子1から図2に示す
順番(同図中(A)の矢印の順)に注目ブロック内の画
素値が、T(0,0),T(0,1),T(0,2),
T(0,3),T(1,0),…,T(3,3)と入力
され、入力された注目ブロック内の画素値は、図3に示
すように、注目ブロック内の画素値を保持するためのR
Aレジスタ2のRA[16],RA[15],RA[1
4],…,RA[2],RA[1]に1サイクルおきに
転送されていき、入力開始後、17サイクル目にはRA
[1],RA[2],…,RA[16]にそれぞれT
(0,0),T(0,1),…,T(3,3)が保持さ
れ、注目ブロック内の画素値の入力が完了する。RAレ
ジスタ2に保持された注目ブロック内の画素値T(m,
n)は、演算器4へ出力される。この時、注目ブロック
内の各画素はそれぞれ各PEに1画素ずつ配置されてい
ることになる。
Hereinafter, the operation of this embodiment will be described. For simplicity, the example of FIG. 2, that is, the size of the block of interest is 4 × 4 (see FIG. 1A), The search range is [-2:
1] (see FIG. 2B), the pixel value T (m, n) in the block of interest and the pixel value R in the search range
This will be described using (i, j). In this case, M, N in FIG.
Becomes 4. First, in the order shown in FIG. 2 (in the order of the arrow (A) in FIG. 2), the pixel values in the target block are T (0,0), T (0,1), T (0, 2),
T (0,3), T (1,0),..., T (3,3) are input, and the input pixel values in the target block are, as shown in FIG. R to hold
RA [16], RA [15], RA [1
4],..., RA [2], RA [1] every other cycle.
[1], RA [2],.
(0,0), T (0,1),..., T (3,3) are held, and the input of the pixel values in the target block is completed. The pixel value T (m, m) in the block of interest held in the RA register 2
n) is output to the arithmetic unit 4. At this time, each pixel in the block of interest is arranged one pixel in each PE.

【0019】上記注目ブロック内の画素値の入力が完了
後、探索範囲内の画素値が、入力端子1から図2に示す
順番(同図中(A)の矢印の順)で、R(−2,−
2),R(−2,−1),R(−2,0),…,R(−
2,4),R(−1,−2),…,R(4,4)と入力
され、図4に示すように、図1の探索範囲内の画素値を
保持するためのRBレジスタ3のRB[4],RB
[3],RB[2],RB[1],に1サイクルおきに
転送されていく。各RBレジスタ3の出力は、図1で横
に並んだN(=4)個のPE7の中の演算器4に入力さ
れる。上記RAレジスタ2に保持された注目ブロックの
画素値T(m,n)と上記RBレジスタ3に保持された
探索範囲内の画素値R(i,j)を用いて式(1)の演
算が、M×N個(4×4=16個)のPE7とM−1個
(3個)の遅延素子8で行われる。
After the input of the pixel values in the target block is completed, the pixel values in the search range are changed from the input terminal 1 in the order shown in FIG. 2 (in the order of the arrow (A) in FIG. 2) by R (−). 2,-
2), R (-2, -1), R (-2, 0), ..., R (-
2, 4), R (-1, -2),..., R (4, 4), and as shown in FIG. 4, an RB register 3 for holding a pixel value within the search range of FIG. RB [4], RB
[3], RB [2] and RB [1] are transferred every other cycle. The output of each RB register 3 is input to a computing unit 4 in N (= 4) PEs 7 arranged side by side in FIG. Using the pixel value T (m, n) of the block of interest held in the RA register 2 and the pixel value R (i, j) in the search range held in the RB register 3, the operation of Expression (1) is performed. , M × N (4 × 4 = 16) PEs 7 and M−1 (three) delay elements 8.

【0020】その過程を図5ないし図9に示す。なお、
図6ないし図9は、それぞれ図5中のA1,B1,C
1,D1に相当する部分図である。図5〜9を図2の探
索範囲内の候補ブロック1についての演算に注目して説
明する。入力端子1からの探索範囲内の画素値入力の開
始を1サイクル目とすると、5サイクル目に候補ブロッ
クの最初の画素値であるR(−2,−2)がRB[1]
に保持される。6サイクル目では、上記5サイクル目で
RB[1]に保持された候補ブロック1の画素R(−
2,−2)とRA[1]に保持された注目ブロックの画
素T(0,0)から両者の差分の絶対値 |R(−2,−2)−T(0,0)| がPE[1]内の演算器4で計算され、その結果と0と
の加算がPE[1]内の加算器5で行われ、その加算結
果 |R(−2,−2)−T(0,0)| が累積加算の一時保持用レジスタRC[1]に保持され
る。7サイクル目では、6サイクル目でRB[1]に保
持された候補ブロック1の画素R(−2,−1)とRA
[2]に保持された注目ブロックの画素値T(0,1)
から両者の差分の絶対値 |R(−2,−1)−T(0,1)| がPE[2]内の演算器4で計算され、その結果とRC
[1]との加算がPE[2]内の加算器5で行われ、そ
の加算結果 |R(−2,−2)−T(0,0)|+|R(−2,−
1)−T(0,1)| が累積加算の一時保持用レジスタRC[2]に保持され
る。8サイクル目では、PE[3]で上記7サイクル目
と同様の処理が行われ、RC[3]には、 |R(−2,−2)−T(0,0)|+|R(−2,−
1)−T(0,1)|+|R(−2,−0)−T(0,
2)| が保持される。9サイクル目では、PE[4]で上記7
サイクル目と同様の処理が行われ、RC[4]には、 R(−2,−2)−T(0,0)|+|R(−2,−
1)−T(0,1)|+|R(−2,−0)−T(0,
2)|+|R(−2,−1)−T(0,3)| が保持される。10サイクル目および11サイクル目で
は探索範囲内の画素値を保持しているレジスタRB
[1]に候補ブロック1以外の画素値が入っているの
で、遅延素子[1]を使って上記9サイクル目にRC
[4]に保持された累積加算の中間結果を候補ブロック
1内の画素値が入力され次の演算ができるまで遅延させ
る。12サイクル目では、RB[2]に候補ブロック1
の2列目の画素R(−1,−2)が保持されているの
で、PE[5]内でこのRB[2]に保持されたR(−
1,−2)とRA[5]に保持された注目ブロックの画
素値T(1,0)から差分の絶対値演算および遅延素子
[1]の出力との累積加算演算が行われ、RC[5]に
は、 |R(−2,−2)−T(0,0)|+|R(−2,−1)−T
(0,1)|+|R(−2,0)−T(0,2)|+|R(−2,
1)−T(0,3)|+|R(−1,−2)−T(1,0)| が保持される。以下、同様の処理を繰り返していくこと
により、28サイクル目にPE[16]内のRC[1
6]に、 |R(−2,−2)−T(0,0)|+|R(−2,−
1)−T(0,1)|+|R(−2,0)−T(0,
2)|+|R(−2,1)−T(0,3)|+|R(−
1,2)−T(1,0)|+|R(−1,−1)−T
(1,1)|+|R(−1,0)−T(1,2)|+|
R(−1,1)−T(1,3)|+|R(0,−2)−
T(2,0)|+|R(0,−1)−T(2,1)|R
(0,0)−T(2,2)|+|R(0,1)−T
(2,3)|+|R(1,2)−T(3,0)|+|R
(1,−1)−T(3,1)|+|R(1,0)−T
(3,2)|+|R(1,1)−T(3,3)| が保持され、注目ブロックの画素と探索範囲内の候補ブ
ロック1との間の式(1)で表されるAEの値が求めら
れる。
The process is shown in FIGS. In addition,
6 to 9 show A1, B1, and C in FIG. 5, respectively.
1 is a partial view corresponding to D1. 5 to 9 will be described focusing on the calculation for the candidate block 1 within the search range in FIG. Assuming that the start of the input of the pixel value within the search range from the input terminal 1 is the first cycle, R (−2, −2) which is the first pixel value of the candidate block is RB [1] in the fifth cycle.
Is held. In the sixth cycle, the pixel R (−) of the candidate block 1 held in RB [1] in the fifth cycle is
From the pixel T (0,0) of the block of interest held in RA [1], the absolute value | R (−2, −2) −T (0,0) | Calculated by the arithmetic unit 4 in [1], the result and 0 are added in the adder 5 in PE [1], and the addition result | R (−2, −2) −T (0, 0) | is held in the temporary addition register RC [1] for cumulative addition. In the seventh cycle, pixels R (−2, −1) of candidate block 1 held in RB [1] in the sixth cycle and RA
Pixel value T (0,1) of the block of interest held in [2]
The absolute value | R (−2, −1) −T (0,1) | of the difference between them is calculated by the arithmetic unit 4 in PE [2], and the result and RC
The addition with [1] is performed by the adder 5 in PE [2], and the addition result | R (−2, −2) −T (0, 0) | + | R (−2, −
1) -T (0, 1) | is held in the temporary register RC [2] for cumulative addition. In the eighth cycle, the same processing as in the seventh cycle is performed in PE [3], and | R (−2, −2) −T (0,0) | + | R ( −2, −
1) -T (0,1) | + | R (-2, -0) -T (0,
2) | is maintained. In the ninth cycle, PE [4]
The same processing as in the cycle is performed, and R (−2, −2) −T (0, 0) | + | R (−2, −
1) -T (0,1) | + | R (-2, -0) -T (0,
2) | + | R (−2, −1) −T (0, 3) | In the tenth cycle and the eleventh cycle, the register RB holding the pixel value within the search range
Since [1] contains a pixel value other than that of candidate block 1, the delay element [1] is used to set the RC value in the ninth cycle.
The intermediate result of the cumulative addition held in [4] is delayed until the pixel value in the candidate block 1 is input and the next operation can be performed. At the 12th cycle, candidate block 1 is assigned to RB [2].
, The pixel R (-1, -2) in the second column is held, and the R (-) held in this RB [2] in PE [5] is stored.
1, [-2] and the pixel value T (1,0) of the block of interest held in RA [5], the absolute value calculation of the difference and the cumulative addition calculation with the output of the delay element [1] are performed. 5] includes | R (−2, −2) −T (0,0) | + | R (−2, −1) −T
(0,1) | + | R (-2,0) -T (0,2) | + | R (-2,
1) -T (0,3) | + | R (-1, -2) -T (1,0) | Hereinafter, by repeating the same processing, RC [1] in PE [16] at the 28th cycle.
6]: | R (−2, −2) −T (0,0) | + | R (−2, −
1) -T (0,1) | + | R (-2,0) -T (0,
2) | + | R (-2,1) -T (0,3) | + | R (-
1,2) -T (1,0) | + | R (-1, -1) -T
(1,1) | + | R (-1,0) -T (1,2) | + |
R (-1,1) -T (1,3) | + | R (0, -2)-
T (2,0) | + | R (0, -1) -T (2,1) | R
(0,0) -T (2,2) | + | R (0,1) -T
(2,3) | + | R (1,2) -T (3,0) | + | R
(1, -1) -T (3,1) | + | R (1,0) -T
(3,2) | + | R (1,1) -T (3,3) | is held, and is represented by Expression (1) between the pixel of the target block and the candidate block 1 within the search range. The value of AE is determined.

【0021】候補ブロック2についての処理は、上記候
補ブロック1についての処理より1サイクル遅れてパイ
プラインで行われるので、29サイクル目に注目ブロッ
クの画素と探索範囲内の候補ブロック2との間のAEが
PE[16]内のRC[16]に保持される。候補ブロ
ック3以降についても同様である。図1の最小値検出回
路9は、上記のように各画素値間の差分の絶対値と累積
加算値をPE[1]からPE[16]で求め、注目ブロ
ックTと候補ブロックRとの間の候補ブロック毎のAE
の値がPE[16]内のRC[16]から累積加算値と
して各サイクルで次々に入力され、それらの中で最小と
なるAEの値を検出する。同時に、このAEが最小値に
なる候補ブロックからこの候補ブロックと注目ブロック
の間の動きベクトルを検出する。なお、上記図1に示す
(実施形態1)において、MとN入れ換えると図10に
示す入力順序で注目ブロックの画素および探索範囲内の
画素の入力を行っても、図2に示す入力順序の場合と同
様の処理により、動きベクトルを検出することができ
る。
The processing for candidate block 2 is performed in the pipeline one cycle later than the processing for candidate block 1 described above. Therefore, the 29th cycle between the pixel of the target block and candidate block 2 within the search range is performed. AE is held in RC [16] in PE [16]. The same applies to the candidate block 3 and thereafter. The minimum value detection circuit 9 in FIG. 1 calculates the absolute value of the difference between the pixel values and the cumulative addition value from PE [1] to PE [16] as described above, and calculates the difference between the target block T and the candidate block R. AE for each candidate block
Is sequentially input as an accumulated value from RC [16] in PE [16] in each cycle, and the minimum AE value is detected among them. At the same time, a motion vector between the candidate block and the block of interest is detected from the candidate block having the minimum AE. In FIG. 1 (Embodiment 1), if M and N are exchanged, even if the pixels of the target block and the pixels in the search range are input in the input order shown in FIG. 10, the input order shown in FIG. A motion vector can be detected by the same processing as in the case.

【0022】(実施形態2)図11は、本発明による動
きベクトル検出装置の他の実施形態を示す図である。本
実施形態は、フレーム間の動きベクトルとフィールド間
の動きベクトルを同時に検出するものである。図11に
おいて、Mは注目ブロックの水平方向の画素数に対応
し、Nは注目ブロック垂直方向の画素数に対応してい
る。また、垂直方向に処理を2組に分割し、各組毎に最
小値検出回路9として最小値検出回路[1]及び[2]
を設けるとともに、2組の累積加算結果を加算するため
の加算器10を備え、この出力に対しても最小値検出回
路[3]を設ける。図11中の番号については、図1中
の同じ要素については、同一番号を付している。
(Embodiment 2) FIG. 11 is a diagram showing another embodiment of the motion vector detecting device according to the present invention. In the present embodiment, a motion vector between frames and a motion vector between fields are simultaneously detected. In FIG. 11, M corresponds to the number of pixels in the horizontal direction of the block of interest, and N corresponds to the number of pixels in the vertical direction of the block of interest. Further, the processing is divided into two sets in the vertical direction, and the minimum value detection circuits [1] and [2] are used as the minimum value detection circuit 9 for each group.
And an adder 10 for adding two sets of cumulative addition results, and a minimum value detection circuit [3] for this output. 11, the same elements in FIG. 1 are given the same numbers.

【0023】以下、本実施形態の動作について説明をす
るが、説明を簡単にするため、図10の例、すなわち、
注目ブロックのサイズを4×4(図10(A)参照)、
動きベクトルの探索範囲を水平方向垂直方向とも[−
2:1]とした(図10(B)参照)場合について、注
目ブロック内の画素値T(m,n)と探索範囲内の画素
値R(i,j)を使って説明する。この場合に、上記
M,Nは、それぞれ4となる。入力端子1から図10に
示す順番(同図中(A)の矢印の順)に注目ブロック内
の画素値が入力され、入力された注目ブロック内の画素
値は、図12に示すように注目ブロック内の画素値を保
持するためのRAレジスタ2へ転送されていく。図12
の17サイクル目で注目ブロック内のすべての画素が、
図11の各PEに1画素ずつ配置され、注目ブロックの
画素入力が完了する。
Hereinafter, the operation of this embodiment will be described. For simplicity, the example of FIG.
The size of the block of interest is 4 × 4 (see FIG. 10A),
The search range of the motion vector is set to [-
2: 1] (see FIG. 10B) will be described using the pixel value T (m, n) in the target block and the pixel value R (i, j) in the search range. In this case, M and N are each equal to 4. The pixel values in the block of interest are input from the input terminal 1 in the order shown in FIG. 10 (in the order of the arrow (A) in FIG. 10), and the pixel values in the block of interest are input as shown in FIG. The data is transferred to the RA register 2 for holding the pixel value in the block. FIG.
In the 17th cycle, all pixels in the block of interest are
One pixel is arranged for each PE in FIG. 11, and the pixel input of the target block is completed.

【0024】上記注目ブロック内の画素の入力が完了
後、探索範囲内の画素値が、入力端子1から図10に示
す順番で入力され、図13に示すように、探索範囲内の
画素値を保持するためのRBレジスタ3へ転送されてい
く。各RBレジスタ3の出力は、図11で横に並んだM
個のPE7の中の演算器4に入力される。上記RAレジ
スタに保持された注目ブロックの画素値T(m,n)と
上記RBレジスタに保持された探索範囲内の画素値R
(i,j)を用いて式(1)の演算が、M×N個(4×
4=16個)のPE7とN−1個(3個)の遅延素子8
で行われる。上記PE7,遅延素子8は、図11の1行
目と3行目のPE(PE[1]〜PE[4],PE
[9]〜PE[12])と遅延素子[1],[3]から
構成される第1の演算系と、図11の2行目と4行目の
PE(PE[5]〜PE[8],PE[13]〜PE
[16])と遅延素子[2]から構成される第2の演算
系に分けられる。ここで、第1の演算系は注目ブロック
の奇数行(第1フィールド)の画素に対するAEを求め
るものであり、第2の演算系は注目ブロックの偶数行
(第2フィールド)の画素に対するAEを求めるもので
ある。
After the input of the pixels in the block of interest is completed, the pixel values in the search range are input from the input terminal 1 in the order shown in FIG. 10, and as shown in FIG. The data is transferred to the RB register 3 for holding. The output of each RB register 3 is M
Are input to the arithmetic unit 4 in the PEs 7. The pixel value T (m, n) of the block of interest held in the RA register and the pixel value R within the search range held in the RB register
Using (i, j), the calculation of the expression (1) is performed by M × N (4 ×
4 = 16) PE7 and N-1 (three) delay elements 8
Done in The PE 7 and the delay element 8 are the PEs (PE [1] to PE [4], PE
[9] to PE [12]) and a first arithmetic system composed of delay elements [1] and [3], and PEs (PE [5] to PE [5] in the second and fourth rows of FIG. 11). 8], PE [13] to PE
[16]) and a second operation system including a delay element [2]. Here, the first arithmetic system determines the AE for the pixels in the odd-numbered row (first field) of the block of interest, and the second arithmetic system calculates the AE for the pixels in the even-numbered row (second field) of the block of interest. Is what you want.

【0025】図14ないし図19に上記第1の演算系で
行われる演算の過程を示している。また、図20ないし
図25に上記第2の演算系で行われる演算の過程を示し
ている。なお、図15ないし図19は、それぞれ図14
中のA2,B2,D2,E2,F2に相当する部分図で
あり、図21ないし図25は、図20中のA3,B3,
D3,E3,F3に相当する部分図である。図10
(B)に示す探索範囲内の候補ブロック1についての演
算に注目してみると、上記実施形態1の場合と同様に、
第1の演算系では、21サイクル目にPE[12]内の
RC[12]に、 |R(−2,−2)−T(0,0)|+|R(−1,−
2)−T(1,0)|+|R(0,−2)−T(2,
0)|+|R(1,−2)−T(3,0)|+|R(−
2,0)−T(0,2)|+|R(−1,0)−T
(1,2)|+|R(0,0)−T(2,2)|+|R
(1,0)−T(3,2)| が保持され、これは注目ブロックと候補ブロック1の奇
数行(第1フィールド)に対するAEとなる。一方、上
記第2の演算系では、27サイクル目にPE[16]内
のRC[16]に、 |R(−2,−1)−T(0,1)|+|R(−1,−
1)−T(1,1)|+|R(0,−1)−T(2,
1)|+|R(1,−1)−T(3,1)|+|R(−
2,1)−T(0,3)|+|R(−1,1)−T
(1,3)|+|R(0,1)−T(2,3)|+|R
(1,1)−T(3,3)| が保持され、これは注目ブロックと候補ブロック1の偶
数行(第2フィールド)に対するAEとなる。これらの
演算結果は、注目ブロックと候補ブロック1のフィール
ド間AEに対応する。
FIGS. 14 to 19 show the steps of the operation performed in the first operation system. FIGS. 20 to 25 show the steps of the operation performed in the second operation system. 15 to 19 correspond to FIG.
FIGS. 21 to 25 are partial views corresponding to A2, B2, D2, E2, and F2 in FIGS.
It is a partial view corresponding to D3, E3, and F3. FIG.
Paying attention to the calculation for the candidate block 1 within the search range shown in (B), similar to the first embodiment,
In the first arithmetic system, | R (−2, −2) −T (0, 0) | + | R (−1, −) is added to RC [12] in PE [12] at the 21st cycle.
2) -T (1,0) | + | R (0, -2) -T (2,
0) | + | R (1, -2) -T (3,0) | + | R (-
2,0) -T (0,2) | + | R (-1,0) -T
(1,2) | + | R (0,0) -T (2,2) | + | R
(1,0) -T (3,2) | is held, which is the AE for the odd-numbered row (first field) of the block of interest and candidate block 1. On the other hand, in the second arithmetic system, | R (−2, −1) −T (0, 1) | + | R (−1, −
1) -T (1,1) | + | R (0, -1) -T (2,
1) | + | R (1, -1) -T (3,1) | + | R (-
2,1) -T (0,3) | + | R (-1,1) -T
(1,3) | + | R (0,1) -T (2,3) | + | R
(1,1) -T (3,3) | is held, which is the AE for the even block (second field) of the block of interest and candidate block 1. These calculation results correspond to the AE between the fields of the target block and the candidate block 1.

【0026】上記第1の演算系では、21サイクル目に
PE[12]内のRC[12]に保持された注目ブロッ
クと候補ブロック1間の第1フィールドに対する演算結
果AEは、上記第2の演算系で第2フィールドに対する
結果AEが保持される27サイクル目まで遅延素子
[3]で遅延され、28サイクル目に加算器10で第1
の演算系の結果と第2の演算系の結果が加算され、 |R(−2,−2)−T(0,0)|+|R(−1,−
2)−T(1,0)|+|R(0,−2)−T(2,
0)|+|R(1,−2)−T(3,0)|+|R(−
2,−1)−T(0,1)|+|R(−1,−1)−T
(1,1)|+|R(0,−1)−T(2,1)|+|
R(1,−1)−T(3,1)|+|R(−2,0)−
T(0,2)|+|R(−1,0)−T(1,2)|+
|R(0,0)−T(2,2)|+|R(1,0)−T
(3,2)|+|R(−2,1)−T(0,3)|+|
R(−1,1)−T(1,3)|+|R(0,1)−T
(2,3)|+|R(1,1)−T(3,3)| が求められる。この加算結果は、注目ブロックと候補ブ
ロック1の間のフレーム間AEに対応する。そして、2
8サイクル目には、上記のようにして注目ブロックと候
補ブロック1間の2つのフィールドについてそれぞれが
得られるAEの値が最小値検出回路[1]と最小値検出
回路[2]にそれぞれ入力され、また、上記のようにし
て加算器10から得られるフレーム間AEの値が最小値
検出回路[3]に入力される。
In the first operation system, the operation result AE for the first field between the block of interest and the candidate block 1 held in RC [12] in PE [12] at the 21st cycle is obtained by the second operation. The result is delayed by the delay element [3] until the 27th cycle in which the result AE for the second field is held in the arithmetic system.
Is added to the result of the second operation system, and | R (−2, −2) −T (0,0) | + | R (−1, −
2) -T (1,0) | + | R (0, -2) -T (2,
0) | + | R (1, -2) -T (3,0) | + | R (-
2, -1) -T (0,1) | + | R (-1, -1) -T
(1,1) | + | R (0, -1) -T (2,1) | + |
R (1, -1) -T (3,1) | + | R (-2,0)-
T (0,2) | + | R (-1,0) -T (1,2) | +
| R (0,0) -T (2,2) | + | R (1,0) -T
(3,2) | + | R (-2,1) -T (0,3) | + |
R (-1,1) -T (1,3) | + | R (0,1) -T
(2,3) | + | R (1,1) -T (3,3) | This addition result corresponds to the inter-frame AE between the target block and the candidate block 1. And 2
In the eighth cycle, the AE values obtained for the two fields between the target block and the candidate block 1 as described above are input to the minimum value detection circuit [1] and the minimum value detection circuit [2], respectively. The value of the inter-frame AE obtained from the adder 10 as described above is input to the minimum value detection circuit [3].

【0027】候補ブロック2についての処理は、上記候
補ブロック1についての処理より1サイクル遅れてパイ
プラインで行われるので、29サイクル目に、注目ブロ
ックと候補ブロック2に対する2つのフィールド間AE
の値と1つのフレーム間AEの値が、最小値検出回路
[1]〜[3]に前述と同様にして入力される。候補ブ
ロック3以降についても同様である。最小値検出回路
[1]では、上記のようにPE[1]〜PE[4]とP
E[9]〜PE[12]で求められた注目ブロックTと
候補ブロックRのそれぞれ奇数行(第1フィールド)に
対するフィールド間AEの値が各サイクルで次々に入力
され、それらの中で最小となるAEの値を検出する。同
時に、このAEが最小値になる候補ブロックRから注目
ブロックTと候補ブロックRの間の第1フィールド間動
きベクトルを検出する。最小値検出回路[2]では、上
記のようにPE[5]〜PE[8]とPE[13]〜P
E[16]で求められた注目ブロックTと候補ブロック
Rのそれぞれ偶数行(第2フィールド)に対するフィー
ルド間AEの値が各サイクルで次々に入力され、それら
の中で最小となるAEの値を検出する。同時に、このA
Eが最小値になる候補ブロックRから注目ブロックTと
この候補ブロックRの間の第2フィールド間動きベクト
ルを検出する。最小値検出回路[3]では、上記のよう
にPE[1]〜PE[6]と加算器10で求められた注
目ブロックTと候補ブロックRとの間のフレーム間AE
の値が各サイクルで次々に入力されそれらの中で最小と
なるAEの値を検出する。同時に、このAEが最小値に
なる候補ブロックRからその候補ブロックRと注目ブロ
ックT両者の間の第2フィールド間動きベクトルを検出
する。
Since the processing for candidate block 2 is performed in the pipeline one cycle later than the processing for candidate block 1, the AE between the two fields for the block of interest and candidate block 2 is performed at the 29th cycle.
And the value of one inter-frame AE are input to the minimum value detection circuits [1] to [3] in the same manner as described above. The same applies to the candidate block 3 and thereafter. In the minimum value detection circuit [1], PE [1] to PE [4] and P
The value of the inter-field AE for each of the odd-numbered rows (first field) of the target block T and the candidate block R obtained in E [9] to PE [12] is sequentially input in each cycle. Is detected. At the same time, a first inter-field motion vector between the target block T and the candidate block R is detected from the candidate block R in which the AE becomes the minimum value. In the minimum value detection circuit [2], as described above, PE [5] to PE [8] and PE [13] to P
The inter-field AE values for the even-numbered rows (second fields) of the target block T and the candidate block R obtained in E [16] are sequentially input in each cycle, and the minimum AE value among them is To detect. At the same time, this A
A second inter-field motion vector between the block of interest T and this candidate block R is detected from the candidate block R where E becomes the minimum value. In the minimum value detection circuit [3], the inter-frame AE between the target block T and the candidate block R calculated by the adder 10 and the PEs [1] to PE [6] as described above.
Are successively input in each cycle, and the value of AE which is the smallest among them is detected. At the same time, a second inter-field motion vector between the candidate block R and the target block T is detected from the candidate block R in which the AE becomes the minimum value.

【0028】(実施形態3)図26は、本発明による動
きベクトル検出装置の他の実施形態を示す図である。本
実施形態は、フレーム間の動きベクトルとフィールド間
の動きベクトルを同時に検出する上記(実施形態2)と
異なる他の実施形態である。図26において、11は累
積加算の中間結果を遅延させるためのRDレジスタであ
る。遅延素子8は2系統の処理に対応してA,B遅延素
子としているが、図26中の番号については、図1およ
び図11中の同じ要素については同一番号を付してい
る。以下、本実施形態の動作について説明するが、説明
を簡単にするため、図2の例、すなわち、注目ブロック
のサイズを4×4(図2(A)参照)、動きベクトルの
探索範囲を水平方向垂直方向とも[−2:1]とした
(図2(B)参照)場合について、注目ブロック内の画
素値T(m,n)と探索範囲内の画素値R(i,j)を
使って説明する。この場合に、図26のM,Nはそれぞ
れ4となる。
(Embodiment 3) FIG. 26 is a diagram showing another embodiment of the motion vector detecting device according to the present invention. This embodiment is another embodiment different from the above (Embodiment 2) in which a motion vector between frames and a motion vector between fields are simultaneously detected. In FIG. 26, reference numeral 11 denotes an RD register for delaying the intermediate result of the cumulative addition. The delay elements 8 are A and B delay elements corresponding to the two systems of processing, and the numbers in FIG. 26 are assigned the same numbers for the same elements in FIGS. 1 and 11. Hereinafter, the operation of this embodiment will be described. For simplicity, the example of FIG. 2, that is, the size of the block of interest is 4 × 4 (see FIG. 2A), and the search range of the motion vector is horizontal. In the case where [-2: 1] is set in both directions (see FIG. 2B), the pixel value T (m, n) in the block of interest and the pixel value R (i, j) in the search range are used. Will be explained. In this case, M and N in FIG.

【0029】入力端子からは、(実施形態1)の場合と
同様に、図2に示す順(同図中(A)の矢印の順)に注
目ブロック内の画素値は図3に示すタイミングでRAレ
ジスタ2へ、探索範囲内の画素値は図4に示すタイミン
グでRBレジスタ3へ転送されていく。各RBレジスタ
3の出力は、図26で横に並んだN個(=4個)のPE
7の中の演算器4に入力される。上記RAレジスタに保
持された注目ブロックの画素値T(m,n)と上記RB
レジスタに保持された探索範囲内のR(i,j)を用い
て式1の演算が、M×N個(4×4=16個)のPE
7、M−1個(3個)のA遅延素子8およびM−1個
(3個)B遅延素子8、M×N個(4×4=16個)の
RDレジスタ11で行われる。上記PE7、AおよびB
遅延素子8、RDレジスタ11は、PE[2p−1]
(p=1,2,…,8)、A遅延素子[1]〜[3]、
RD[2p](p=1,2,…,8)から構成される第
1の演算系と、PE[2p](p=1,2,…,8)、
B遅延素子[1]〜[3]、RD[2p−1](p=
1,2,…,8)から構成される第2の演算系に分けら
れる。ここで、第1の演算系は注目ブロックの奇数行
(第1フィールド)の画素に対するAEを求めるもので
あり、第2の演算系は注目ブロック偶数行(第2フィー
ルド)の画素に対するAEを求めるものである。
From the input terminal, as in (Embodiment 1), the pixel values in the block of interest are arranged at the timing shown in FIG. 3 in the order shown in FIG. 2 (in the order indicated by the arrow (A) in FIG. 2). The pixel values in the search range are transferred to the RA register 2 to the RB register 3 at the timing shown in FIG. The output of each RB register 3 is N (= 4) PEs arranged side by side in FIG.
7 is input to the arithmetic unit 4. The pixel value T (m, n) of the block of interest held in the RA register and the RB
Using R (i, j) within the search range held in the register, the operation of Expression 1 is performed using M × N (4 × 4 = 16) PEs.
7, M-1 (three) A delay elements 8 and M-1 (three) B delay elements 8, and M × N (4 × 4 = 16) RD registers 11. PE7, A and B above
The delay element 8 and the RD register 11 are PE [2p-1]
(P = 1, 2,..., 8), A delay elements [1] to [3],
A first operation system composed of RD [2p] (p = 1, 2,..., 8), PE [2p] (p = 1, 2,.
B delay elements [1] to [3], RD [2p-1] (p =
, 8) are divided into a second operation system. Here, the first arithmetic system determines the AE for the pixels in the odd-numbered row (first field) of the target block, and the second arithmetic system determines the AE for the pixels in the even-numbered row (second field) of the target block. Things.

【0030】図27ないし図33に上記第1の演算系及
び上記第2の演算系で行われる演算の過程を示してい
る。なお、図26ないし図33は、それぞれ図27中の
A4,B4,C4,D4,E4,F4に相当する部分図
である。図2示す探索範囲内の候補ブロック1について
の演算に注目してみると、図27ないし図33に示すよ
うに、演算が進められ、上記第1の演算系では、26サ
イクル目にPE[15]内のRC[15]に、 |R(−2,−2)−T(0,0)|+|R(−2,
0)−T(0,2)|+|R(−1,−2)−T(1,
0)|+|R(−1,0)−T(1,2)|+|R
(0,−2)−T(2,0)|+|R(0,0)−T
(2,2)|+|R(1,−2)−T(3,0)|+|
R(1,0)−T(3,2) が保持され、これは注目ブロックと候補ブロック1の奇
数行(第1フィールド)に対するAEとなる。一方、上
記第2の演算系では、27サイクル目にPE[16]内
のRC[16]に、 |R(−2,−1)−T(0,1)|+|R(−2,
1)−T(0,3)|+|R(−1,−1)−T(1,
1)|+|R(−1,1)−T(1,3)|+|R
(0,−1)−T(2,1)|+|R(0,1)−T
(2,3)|+|R(1,−1)−T(3,1)|+|
R(1,1)−T(3,3)| が保持され、これは注目ブロックと候補ブロック1の偶
数行(第2フィールド)に対するAEとなる。これらの
演算結果は、注目ブロックと候補ブロックの間のフィー
ルド間AEに対応する。
FIGS. 27 to 33 show the steps of the operations performed in the first operation system and the second operation system. 26 to 33 are partial views corresponding to A4, B4, C4, D4, E4, and F4 in FIG. 27, respectively. Paying attention to the operation on candidate block 1 in the search range shown in FIG. 2, the operation proceeds as shown in FIGS. 27 to 33, and in the first operation system, PE [15 | R (−2, −2) −T (0,0) | + | R (−2,
0) -T (0,2) | + | R (-1, -2) -T (1,
0) | + | R (-1,0) -T (1,2) | + | R
(0, -2) -T (2,0) | + | R (0,0) -T
(2,2) | + | R (1, -2) -T (3,0) | + |
R (1,0) -T (3,2) is held, which is the AE for the odd-numbered row (first field) of the block of interest and candidate block 1. On the other hand, in the second arithmetic system, | R (−2, −1) −T (0,1) | + | R (−2,
1) -T (0,3) | + | R (-1, -1) -T (1,
1) | + | R (-1,1) -T (1,3) | + | R
(0, -1) -T (2,1) | + | R (0,1) -T
(2,3) | + | R (1, -1) -T (3,1) | + |
R (1,1) -T (3,3) | is held, which is the AE for the even block (second field) of the block of interest and candidate block 1. These calculation results correspond to the inter-field AE between the block of interest and the candidate block.

【0031】上記第1の演算系で、26サイクル目にP
E[15]内のRC[15]に保持された注目ブロック
と候補ブロック1間の第1フィールドに対する演算結果
AEは、レジスタRD[16]によって、上記第2の演
算系で、第2フィールドに対する演算結果AEが保持さ
れる27サイクル目に遅延され、28サイクル目に加算
器10で第1の演算系の結果と第2の演算の結果が加算
され、 |R(−2,−2)−T(0,0)|+|R(−2,−
1)−T(0,1)|+|R(−2,0)−T(0,
2)|+|R(−2,1)−T(0,3)|+|R(−
1,−2)−T(1,0)|+|R(−1,−1)−T
(1,1)|+|R(−1,0)−T(1,2)|+|
R(−1,1)−T(1,3)|+|R(0,−2)−
T(2,0)|+|R(0,−1)−T(2,1)|+
|R(0,0)−T(2,2)|+|R(0,1)−T
(2,3)|+|R(1,−2)−T(3,0)|+|
R(1,−1)−T(3,1)|+|R(1,0)−T
(3,2)|+|R(1,1)−T(3,3)| が求められる。この加算結果は、注目ブロックと候補ブ
ロック1の間のフレーム間AEに対応する。そして、2
8サイクル目には、上記のようにして注目ブロックと候
補ブロック1間の2つのフィールドについてそれぞれ求
められるAEの値が最小値検出回路[1]と最小値検出
回路[2]にそれぞれ入力され、また、上記のようにし
て加算器10から得られるフレーム間AEの値が最小値
検出回路[3]に入力される。
In the first operation system, P
The operation result AE for the first field between the block of interest and the candidate block 1 held in RC [15] in E [15] is calculated by the register RD [16] in the second operation system with respect to the second field. The result of the first operation system and the result of the second operation are added by the adder 10 in the adder 10 in the 28th cycle, and the result is | R (-2, -2)- T (0,0) | + | R (−2, −
1) -T (0,1) | + | R (-2,0) -T (0,
2) | + | R (-2,1) -T (0,3) | + | R (-
1, -2) -T (1,0) | + | R (-1, -1) -T
(1,1) | + | R (-1,0) -T (1,2) | + |
R (-1,1) -T (1,3) | + | R (0, -2)-
T (2,0) | + | R (0, -1) -T (2,1) | +
| R (0,0) -T (2,2) | + | R (0,1) -T
(2,3) | + | R (1, -2) -T (3,0) | + |
R (1, -1) -T (3,1) | + | R (1,0) -T
(3,2) | + | R (1,1) -T (3,3) | This addition result corresponds to the inter-frame AE between the target block and the candidate block 1. And 2
In the eighth cycle, the AE values obtained for the two fields between the target block and the candidate block 1 as described above are input to the minimum value detection circuit [1] and the minimum value detection circuit [2], respectively. The value of the inter-frame AE obtained from the adder 10 as described above is input to the minimum value detection circuit [3].

【0032】候補ブロック2についての処理は、上記候
補ブロック1についての処理より1サイクル遅れてパイ
プラインで行われるので29サイクル目に、注目ブロッ
クと候補ブロック2間の2つのフィールド間AEの値と
1つのフレーム間AEの値が、最小値検出回路[1]〜
[3]に前述と同様にして入力される。候補ブロック3
以降についても同様である。最小値検出回路[1]で
は、上記のようにPE[2p−1](p=1,2,…,
8)で求められた注目ブロックTと候補ブロックRのそ
れぞれ奇数行(第1フィールド)に対するフィールド間
AEの値が各サイクルで次々に入力され、それらの中で
最小となるAEの値を検出する。同時に、このAEが最
小値になる候補ブロックRから両者の間の第1フィール
ド間動きベクトルを検出する。最小値検出回路[2]で
は、上記のようにPE[2p](p=1,2…,8)で
求められた注目ブロックTと候補ブロックRのそれぞれ
偶数行(第2フィールド)に対するフィールド間AEの
値が各サイクルで次々に入力されそれらの中で最小とな
るAEの値を検出する。同時に、このAEが最小値にな
る候補ブロックRから両者の間の第2フィールド間動き
ベクトルを検出する。最小値検出回路[3]では、上記
のようにPE[1]〜PE[16]で求められた注目ブ
ロックTと候補ブロックR間のフレーム間AEの値が各
サイクルで次々に入力され、それらの中で最小となるA
Eの値を検出する。同時に、このAEが最小値になる候
補ブロックRから両者の間のフレーム間動きベクトルを
検出する。
Since the processing for candidate block 2 is performed in the pipeline one cycle later than the processing for candidate block 1, the value of the AE between the two fields between the block of interest and candidate block 2 The value of one inter-frame AE is determined by the minimum value detection circuit [1] to
[3] is input in the same manner as described above. Candidate block 3
The same applies to the following. In the minimum value detection circuit [1], PE [2p-1] (p = 1, 2,...,
8) The inter-field AE values for the odd-numbered rows (first field) of the target block T and the candidate block R obtained in 8) are sequentially input in each cycle, and the minimum AE value is detected among them. . At the same time, a first inter-field motion vector between the candidate block R having the minimum AE is detected. In the minimum value detection circuit [2], as described above, the inter-field between the even-numbered row (the second field) of the target block T and the candidate block R obtained by PE [2p] (p = 1, 2,..., 8) The values of AE are inputted one after another in each cycle, and the smallest value of AE is detected among them. At the same time, a second inter-field motion vector between the candidate blocks R having the minimum AE is detected. In the minimum value detection circuit [3], the value of the inter-frame AE between the target block T and the candidate block R obtained by PE [1] to PE [16] as described above is sequentially input in each cycle. A which is the smallest among
The value of E is detected. At the same time, an inter-frame motion vector between the candidate block R having the minimum AE is detected.

【0033】上記実施形態1ないし3の各々に適用し得
る変更例を以下に説明すると、それは、装置の各回路構
成において、一つのRBレジスタ3からの出力先が多い
場合には、探索範囲内の画素値を保持するRBレジスタ
3を2系列にしてもよく、そのためにREレジスタ12
(RE[1]〜RE[N])を追加するという例であ
る。例えば、1行目のPE7についてみると横に並んだ
PE7の左半分(1番上の列の場合、PE[1]〜PE
[N/2])の中の演算器4にはRB[1]から出力
し、横に並んだPE7の右半分(1番上の列の場合、P
E[N/2+1]〜PE[N])の中の演算器4にはR
E[1]から出力するようにしてもよい。具体的には、
実施形態1の場合を例にすると、ブロック図は図34の
様になる。RBレジスタ3を3系列以上にする場合も同
様である。また、上記実施形態1ないし3の各々におい
て、注目ブロック内の画素値の入力順序と注目ブロック
内の画素値を保持するためのRAレジスタ2の接続順序
を逆にしてもよい。具体的には、実施形態1の場合を例
にすると、注目ブロック内の画素値の入力順を図35に
示すように、T(3,3),T(3,2),T(3,
1),…,T(0,1),T(0,0)とし、図36に
示すような回路構成にしてもよい。
The following is a description of a modification that can be applied to each of the first to third embodiments. In each circuit configuration of the device, when there are many output destinations from one RB register 3, the search range is The RB register 3 for holding the pixel values of the two lines may be divided into two series.
This is an example in which (RE [1] to RE [N]) are added. For example, looking at PE7 in the first row, the left half of PE7 arranged horizontally (in the case of the top row, PE [1] to PE [1]
The output from RB [1] is output to the arithmetic unit 4 in [N / 2]), and the right half of the PEs 7 arranged side by side (in the case of the top row, P
E [N / 2 + 1] to PE [N]) have R
The output may be made from E [1]. In particular,
Taking the case of Embodiment 1 as an example, the block diagram is as shown in FIG. The same applies when the number of RB registers 3 is three or more. In each of Embodiments 1 to 3, the input order of the pixel values in the target block and the connection order of the RA register 2 for holding the pixel values in the target block may be reversed. Specifically, taking the case of Embodiment 1 as an example, the input order of the pixel values in the block of interest is T (3,3), T (3,2), T (3,3) as shown in FIG.
1),..., T (0,1), T (0,0), and a circuit configuration as shown in FIG.

【0034】[0034]

【発明の効果】【The invention's effect】

請求項1に対応する効果:画素値の入力端子および探索
範囲内の画素値を保持するためのレジスタからの出力先
を減らすことが可能となり、出力負荷の増大と信号遅延
をまねくことはなく、スキューの少ない回路を実現で
き、集積回路を使って実現する際にも、特定の箇所に配
線が集中することを避けることができ、配線や配置の困
難さを減らすことができる。
Advantageous Effects According to Claim 1: It is possible to reduce the number of input terminals for pixel values and the number of output destinations from registers for holding pixel values within the search range, without increasing output load and signal delay. A circuit with less skew can be realized, and even when an integrated circuit is used, it is possible to prevent wiring from being concentrated on a specific portion, and to reduce difficulty in wiring and arrangement.

【0035】請求項2に対応する効果:請求項1の効果
に加え、画像を生成する方式に対応した回路構成をとる
ことができ、より精度の良い適切な動きベクトルの検出
ができる。また、2分割することにより出力負荷も減ら
すことが可能で、回路構成の設計をより容易にすること
ができる。
Effect corresponding to claim 2: In addition to the effect of claim 1, a circuit configuration corresponding to a method of generating an image can be employed, and a more accurate and appropriate motion vector can be detected. In addition, by dividing into two, the output load can be reduced, and the design of the circuit configuration can be made easier.

【0036】請求項3に対応する効果:請求項1の効果
に加え、画像を生成する方式として請求項2とは異なる
方式に対応した回路構成をとることができ、より精度の
良い適切な動きベクトルの検出ができる。また、2分割
することにより出力負荷も減らすことが可能で、回路構
成の設計をより容易にすることができる。
Effect corresponding to the third aspect: In addition to the effect of the first aspect, a circuit configuration corresponding to a method different from that of the second aspect can be adopted as a method of generating an image, and a more accurate and appropriate motion can be obtained. Vector can be detected. In addition, by dividing into two, the output load can be reduced, and the design of the circuit configuration can be made easier.

【0037】請求項4に対応する効果:請求項2及び3
の効果に加えて、奇数フィールド及び偶数フィールドに
対応した構成とすることにより、飛越し走査方式の画像
生成に適した動きベクトル検出回路が提供できる。
Effects corresponding to claim 4: Claims 2 and 3
In addition to the effects described above, the configuration corresponding to the odd field and the even field makes it possible to provide a motion vector detecting circuit suitable for interlaced scanning image generation.

【0038】請求項5に対応する効果:請求項2ないし
4の効果に加えて、さらに、フレーム全体に対する動き
ベクトルを検出することもできる。
Effect corresponding to claim 5: In addition to the effects of claims 2 to 4, it is also possible to detect a motion vector for the entire frame.

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

【図1】本発明による動きベクトル検出装置の一実施形
態を示す図である。
FIG. 1 is a diagram showing an embodiment of a motion vector detection device according to the present invention.

【図2】図1に示す実施形態の回路構成によるブロック
マッチング動作における画素の並びと第1の入力順序を
説明するための図である。
FIG. 2 is a diagram for explaining an arrangement of pixels and a first input order in a block matching operation according to the circuit configuration of the embodiment shown in FIG. 1;

【図3】図1及び図2に示す実施形態における注目画素
の各画素値の入力についてのタインミングチャートであ
る。
FIG. 3 is a timing chart regarding input of each pixel value of a target pixel in the embodiment shown in FIGS. 1 and 2;

【図4】図1及び図2に示す実施形態における探索領域
内の各画素値の入力についてのタイミングチャートであ
る。
FIG. 4 is a timing chart for inputting each pixel value in a search area in the embodiment shown in FIGS. 1 and 2;

【図5】図1及び図2に示す実施形態におけるRB及び
RCレジスタ及び遅延素子のデータ内容を各PEでの演
算タイミングに従って示し、演算プロセスを説明するた
めの図である。
FIG. 5 is a diagram for explaining an operation process by showing data contents of RB and RC registers and delay elements in the embodiment shown in FIGS. 1 and 2 according to operation timing in each PE.

【図6】図5中のA1部分を拡大して示す部分図であ
る。
FIG. 6 is an enlarged partial view showing an A1 part in FIG. 5;

【図7】図5中のB1部分を拡大して示す部分図であ
る。
FIG. 7 is an enlarged partial view showing a B1 part in FIG. 5;

【図8】図5中のC1部分を拡大して示す部分図であ
る。
FIG. 8 is an enlarged partial view showing a C1 part in FIG. 5;

【図9】図5中のD1部分を拡大して示す部分図であ
る。
FIG. 9 is an enlarged partial view showing a D1 part in FIG. 5;

【図10】本発明の実施形態のブロックマッチング動作
における第2の入力順序を説明するための図である。
FIG. 10 is a diagram for explaining a second input order in the block matching operation according to the embodiment of the present invention.

【図11】本発明による動きベクトル検出装置の他の実
施形態を示す図である。
FIG. 11 is a diagram showing another embodiment of the motion vector detecting device according to the present invention.

【図12】図11及び図10に示す実施形態における注
目画素の各画素値の入力についてのタイミングチャート
である。
FIG. 12 is a timing chart for inputting each pixel value of a target pixel in the embodiment shown in FIGS. 11 and 10;

【図13】図11に示す実施形態で、図10の入力順序
をとる場合における探索領域内の各画素値の入力につい
てのタイミングチャートである。
13 is a timing chart for inputting each pixel value in a search area when the input order shown in FIG. 10 is adopted in the embodiment shown in FIG. 11;

【図14】図11及び図10に示す実施形態における各
PE内のRCレジスタ及び遅延素子のデータ内容を演算
タイミングに従って示し、演算プロセスを説明するため
の第1の図(図20(第2の図)参照)である。
FIG. 14 shows the data contents of the RC register and the delay element in each PE in the embodiment shown in FIGS. 11 and 10 according to the operation timing, and is a first diagram (FIG. 20 (second See Fig.).

【図15】図14中のA2部分を拡大して示す部分図で
ある。
FIG. 15 is an enlarged partial view showing an A2 part in FIG. 14;

【図16】図14中のB2部分を拡大して示す部分図で
ある。
FIG. 16 is an enlarged partial view showing a B2 part in FIG. 14;

【図17】図14中のD2部分を拡大して示す部分図で
ある。
FIG. 17 is an enlarged partial view showing a portion D2 in FIG. 14;

【図18】図14中のE2部分を拡大して示す部分図で
ある。
FIG. 18 is an enlarged partial view showing an E2 part in FIG. 14;

【図19】図14中のF2部分を拡大して示す部分図で
ある。
FIG. 19 is an enlarged partial view showing an F2 part in FIG. 14;

【図20】図11及び図10に示す実施形態における各
PE内のRCレジスタ及び遅延素子のデータ内容を演算
タイミングに従って示し、演算プロセスを説明するため
の第2の図(図14(第1の図)参照)である。
FIG. 20 is a second diagram (FIG. 14 (first diagram) for explaining the operation process, showing the data contents of the RC register and the delay element in each PE in the embodiment shown in FIGS. 11 and 10 according to the operation timing; See Fig.).

【図21】図20中のA3部分を拡大して示す部分図で
ある。
FIG. 21 is an enlarged partial view showing an A3 part in FIG. 20;

【図22】図20中のB3部分を拡大して示す部分図で
ある。
FIG. 22 is an enlarged partial view showing a B3 part in FIG. 20;

【図23】図20中のD3部分を拡大して示す部分図で
ある。
FIG. 23 is an enlarged partial view showing a portion D3 in FIG. 20;

【図24】図20中のE3部分を拡大して示す部分図で
ある。
FIG. 24 is an enlarged partial view showing a portion E3 in FIG. 20;

【図25】図20中のF3部分を拡大して示す部分図で
ある。
FIG. 25 is an enlarged partial view showing an F3 part in FIG. 20;

【図26】本発明による動きベクトル検出装置の他の実
施形態を示す図である。
FIG. 26 is a diagram showing another embodiment of the motion vector detecting device according to the present invention.

【図27】図26に示す実施形態における各PE内のR
Cレジスタ及び遅延素子のデータ内容を演算タイミング
に従って示し、演算プロセスを説明するための図であ
る。
FIG. 27 shows R in each PE in the embodiment shown in FIG. 26;
FIG. 9 is a diagram for illustrating data contents of a C register and a delay element according to operation timing, and explaining an operation process.

【図28】図27中のA4部分を拡大して示す部分図で
ある。
FIG. 28 is an enlarged partial view showing an A4 part in FIG. 27;

【図29】図27中のB4部分を拡大して示す部分図で
ある。
FIG. 29 is an enlarged partial view showing a B4 part in FIG. 27;

【図30】図27中のC4部分を拡大して示す部分図で
ある。
FIG. 30 is an enlarged partial view showing a C4 part in FIG. 27;

【図31】図27中のD4部分を拡大して示す部分図で
ある。
FIG. 31 is an enlarged partial view showing a D4 part in FIG. 27;

【図32】図27中のE4部分を拡大して示す部分図で
ある。
FIG. 32 is an enlarged partial view showing an E4 part in FIG. 27;

【図33】図27中のF4部分を拡大して示す部分図で
ある。
FIG. 33 is an enlarged partial view showing an F4 portion in FIG. 27;

【図34】図1に示される実施形態において探索領域内
の画素値の入力を2系統にした場合のブロック図であ
る。
FIG. 34 is a block diagram in a case where inputs of pixel values in a search area are made into two systems in the embodiment shown in FIG. 1;

【図35】図1に示される実施形態において注目ブロッ
クの画素値の入力順序を逆順にした場合を説明するため
の図である。
FIG. 35 is a diagram illustrating a case where the input order of the pixel values of the target block is reversed in the embodiment shown in FIG. 1;

【図36】図1に示される実施形態において注目ブロッ
クの画素値の入力順序を逆順にした場合の回路構成を示
すブロック図である。
FIG. 36 is a block diagram showing a circuit configuration when the input order of the pixel values of the target block is reversed in the embodiment shown in FIG. 1;

【図37】従来の動きベクトル検出装置の一例を示すブ
ロック図である。
FIG. 37 is a block diagram illustrating an example of a conventional motion vector detection device.

【図38】図37に示される従来例においてブロックマ
ッチング動作を行う際の画素の並びと入力順序を説明す
るための図である。
FIG. 38 is a diagram for explaining an arrangement of pixels and an input order when performing a block matching operation in the conventional example shown in FIG. 37;

【図39】図37に示される従来例のブロックマッチン
グ動作における探索領域内の画素の入力と演算タイミン
グを説明するための図である。
FIG. 39 is a diagram for explaining pixel input and calculation timing in a search area in the conventional block matching operation shown in FIG. 37;

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

1…入力端子(画素値を入力するための入力端子)、2
…RAレジスタ(注目ブロック内の画素値を保持するた
めのレジスタ)、3…RBレジスタ(探索範囲内の画素
値を保持するためのレジスタ)、4…演算器(差分の絶
対値を計算するための演算器)、5,10…加算器、6
…RCレジスタ(中間結果を保持するためのレジス
タ)、7…プロセッシングエレメント(PE)、8…遅
延素子、9…最小値検出回路、12…REレジスタ(探
索範囲内の画素値を2系列に保持するためのレジス
タ)、101…Aレジスタ、102…2項演算器、10
3…プロセッサ、104…Sポート、105…注目ブロ
ック内画素入力回路、106…RAポート、107…R
Bポート、108…探索範囲内画素入力回路、109…
加算器、110…Bレジスタ、111…累積加算回路、
112…最小値検出回路、201…ゲート、301…セ
レクタ、302…ROM、303…カウンタ。
1 ... input terminal (input terminal for inputting pixel value), 2
... RA register (register for holding pixel values in the block of interest), 3... RB register (register for holding pixel values in the search range), 4... Arithmetic unit (for calculating the absolute value of the difference) Arithmetic unit), 5, 10 ... adder, 6
... RC register (register for holding intermediate results), 7 ... processing element (PE), 8 ... delay element, 9 ... minimum value detection circuit, 12 ... RE register (holds pixel values in the search range in two series , 101... A register, 102.
3 Processor, 104 S port, 105 Pixel input circuit in block of interest, 106 RA port, 107 R
B port, 108 ... pixel input circuit in search range, 109 ...
Adder, 110 ... B register, 111 ... accumulator circuit,
112: minimum value detection circuit, 201: gate, 301: selector, 302: ROM, 303: counter.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 画像におけるM×N個の画素からなるブ
ロックを符号化ブロックとし、該符号化ブロックに対す
る候補ブロックを参照画像上の探索範囲においてブロッ
クマッチング法により探索し、得られる最適なマッチン
グを示す候補ブロックの位置にもとづき、動きベクトル
を検出する動きベクトル検出装置であって、前記符号化
ブロック内のM×N個の画素値及び前記探索範囲内の画
素値を入力する入力部と、該入力部から入力された符号
化ブロック内の各画素値を画素毎に保持するカスケード
接続されたM×N個の第1のレジスタと、前記入力部か
ら入力された前記探索範囲内の各画素値を画素毎に保持
するカスケード接続された第2のレジスタと、前記第1
のレジスタの出力と前記第2のレジスタの出力との差分
の絶対値計算を該第1のレジスタの各出力毎に行うM×
N個の演算器と、それぞれがカスケード接続され累積加
算を行うM×N個の加算器と、前記加算器で行った累積
加算結果を該加算器毎に保持する第3のレジスタと、前
記加算器において前記演算器の出力と前記第3のレジス
タの出力を所定の動作タイミングで加算を行うように前
記第3のレジスタの出力を所定サイクルの動作タイミン
グ期間遅延させるための(M−1)個または(N−1)
個の遅延手段と、前記探索範囲の各候補ブロックに対す
る前記M×N個の加算器の少くとも一部の累積加算結果
の中から最小値を示す候補ブロックを検出する最小値検
出回路を備えるようにしたことを特徴とする動きベクト
ル検出装置。
1. A block consisting of M × N pixels in an image is defined as a coded block, and a candidate block for the coded block is searched for in a search range on a reference image by a block matching method. A motion vector detection device that detects a motion vector based on the position of the candidate block shown in the input block, wherein an input unit that inputs M × N pixel values in the encoded block and pixel values in the search range; A cascade-connected M × N first register for holding, for each pixel, each pixel value in an encoding block input from an input unit, and each pixel value in the search range input from the input unit Cascaded second register for holding the
Calculating the absolute value of the difference between the output of the first register and the output of the second register for each output of the first register.
N arithmetic units, M × N adders each of which is cascade-connected to perform cumulative addition, a third register for holding the cumulative addition result performed by the adder for each adder, (M-1) delays the output of the third register by a predetermined cycle of operation timing so that the output of the arithmetic unit and the output of the third register are added at a predetermined operation timing in the unit. Or (N-1)
Delay means, and a minimum value detection circuit for detecting a candidate block having a minimum value from at least a part of the cumulative addition results of the M × N adders for each candidate block in the search range. A motion vector detecting device characterized in that:
【請求項2】 それぞれがカスケード接続された累積加
算を行うM×N個の前記加算器および該加算器で行った
累積加算結果を該加算器毎に保持する第3のレジスタに
ついて、それぞれのM×(N/2)個を1組として全体
を2つの組に分割し、それぞれの組において累積加算を
行い、得た累積加算結果の中から最小値を示す候補ブロ
ックをそれぞれ検出する第1および第2の最小値検出回
路を備えるようにしたことを特徴とする請求項1に記載
の動きべクトル検出装置。
2. The M × N number of adders, each of which performs cascade-connected cumulative addition, and a third register for holding the cumulative addition result performed by each adder for each of the adders. X (N / 2) units as one set, the whole is divided into two sets, cumulative addition is performed in each of the sets, and first and second candidate blocks each detecting a candidate block having the minimum value from the obtained cumulative addition results. The motion vector detection device according to claim 1, further comprising a second minimum value detection circuit.
【請求項3】 前記第3のレジスタに保持される累積加
算の中間結果を遅延させるM×N個の第4のレジスタを
該第3のレジスタそれぞれに追加し、また前記遅延手段
を(2×(M−1))個に増やすとともに、カスケード
接続された累積加算を行う前記M×N個の加算器、累積
加算結果を保持する前記第3のレジスタ、前記第4のレ
ジスタおよび前記遅延手段について、(M/2)×N個
の加算器と(M/2)×N個の第3のレジスタと(M/
2)×N個の第4のレジスタと(M−1)個の遅延手段
を1組として全体を2つの組に分割し、それぞれの組に
ついて累積加算を行い、得た累積加算結果の中から最小
値を示す候補ブロックをそれぞれ検出する第1および第
2の最小値検出回路を備えるようにしたことを特徴とす
る請求項1に記載の動きベクトル検出装置。
3. An M × N fourth register for delaying an intermediate result of the cumulative addition held in the third register is added to each of the third registers. (M-1)) and the cascade-connected M × N adders that perform cumulative addition, the third register, the fourth register, and the delay unit that hold the result of cumulative addition. , (M / 2) × N adders and (M / 2) × N third registers and (M /
2) The entirety is divided into two sets with one set of × N fourth registers and (M−1) delay means, and cumulative addition is performed for each set. 2. The motion vector detecting device according to claim 1, further comprising a first and a second minimum value detecting circuit for respectively detecting a candidate block indicating a minimum value.
【請求項4】 分割した前記2つの組のそれぞれが前記
符号化ブロックの奇数フィールド及び偶数フィールドに
対応するようにしたことを特徴とする請求項2又は3に
記載の動きベクトル検出装置。
4. The motion vector detecting device according to claim 2, wherein each of the two divided sets corresponds to an odd field and an even field of the encoded block.
【請求項5】 分割した前記2つの組について得た累積
加算の合計を求めるさらなる加算器と、該さらなる加算
器の累積加算結果の中から最小値を示す候補ブロックを
検出する第3の最小値検出回路を備えるようにしたこと
を特徴とする請求項2ないし4のいずれか1に記載の動
きベクトル検出装置。
5. A further adder for obtaining the sum of the cumulative additions obtained for the two divided sets, and a third minimum value for detecting a candidate block having the minimum value from the cumulative addition result of the further adder. 5. The motion vector detecting device according to claim 2, further comprising a detecting circuit.
JP13129297A 1997-05-21 1997-05-21 Motion vector detection device Pending JPH10322706A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13129297A JPH10322706A (en) 1997-05-21 1997-05-21 Motion vector detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13129297A JPH10322706A (en) 1997-05-21 1997-05-21 Motion vector detection device

Publications (1)

Publication Number Publication Date
JPH10322706A true JPH10322706A (en) 1998-12-04

Family

ID=15054563

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13129297A Pending JPH10322706A (en) 1997-05-21 1997-05-21 Motion vector detection device

Country Status (1)

Country Link
JP (1) JPH10322706A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004012460A1 (en) * 2002-07-29 2004-02-05 Matsushita Electric Industrial Co., Ltd. Motion vector detection device and motion vector detection method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004012460A1 (en) * 2002-07-29 2004-02-05 Matsushita Electric Industrial Co., Ltd. Motion vector detection device and motion vector detection method

Similar Documents

Publication Publication Date Title
US6690730B2 (en) Motion estimator
JP2636674B2 (en) Video motion vector detection device
KR101578052B1 (en) Motion estimation device and Moving image encoding device having the same
US5793443A (en) Motion vector detection circuit
US6516031B1 (en) Motion vector detecting device
JPH07115646A (en) Image processing device
KR100416444B1 (en) Motion vector selection method and image processing device performing this method
CN100553341C (en) Motion vector detection device and motion vector detection method
Baglietto et al. Parallel implementation of the full search block matching algorithm for motion estimation
JPH07203457A (en) Motion vector detector
JP3545004B2 (en) Arithmetic circuit
JPH10322706A (en) Motion vector detection device
US6968011B2 (en) Motion vector detecting device improved in detection speed of motion vectors and system employing the same devices
JP2885039B2 (en) Motion vector detection circuit
US6198771B1 (en) Motion vector processing circuit
KR100225690B1 (en) Correlation Computing Device, Parallel Correlation Computing Device, and Correlation Computation Method
JP3698501B2 (en) Motion vector detection device
JP4170173B2 (en) Block matching arithmetic unit
JP2000023163A (en) Motion vector detection device
KR100246033B1 (en) Computation Method for Fast Real-time Processing Motion Estimation and Computing Device Therefor
JPH09503324A (en) Pixel block comparison processor (block matching processor)
JP4155102B2 (en) Pixel value calculation device, moving image encoding device, and moving image decoding device
JP2934134B2 (en) Block matching method and apparatus in video compression
JP2618146B2 (en) Motion vector detection circuit
JP2872105B2 (en) Distortion calculator