JP3337515B2 - Motion vector detection device - Google Patents

Motion vector detection device

Info

Publication number
JP3337515B2
JP3337515B2 JP6452393A JP6452393A JP3337515B2 JP 3337515 B2 JP3337515 B2 JP 3337515B2 JP 6452393 A JP6452393 A JP 6452393A JP 6452393 A JP6452393 A JP 6452393A JP 3337515 B2 JP3337515 B2 JP 3337515B2
Authority
JP
Japan
Prior art keywords
block
motion vector
signal
screen
template
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP6452393A
Other languages
Japanese (ja)
Other versions
JPH06276510A (en
Inventor
紳一 浦本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP6452393A priority Critical patent/JP3337515B2/en
Publication of JPH06276510A publication Critical patent/JPH06276510A/en
Application granted granted Critical
Publication of JP3337515B2 publication Critical patent/JP3337515B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、動画像の動き補償に
用いられる動きベクトルを検出するための装置に関し、
特に、動き補償付予測符号化処理に用いられる動きベク
トルをブロックマッチング処理に従って検出するための
動きベクトル検出装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus for detecting a motion vector used for motion compensation of a moving image.
In particular, the present invention relates to a motion vector detecting device for detecting a motion vector used for predictive coding processing with motion compensation according to block matching processing.

【0002】[0002]

【従来の技術】膨大なデータ量を有する画像信号の伝送
または蓄積のためには、データ量を削減するデータ圧縮
技術が必要不可欠となる。画像データは、近隣画素間の
相関関係および人間の知覚特性などに起因するかなりの
冗長度を備える。このデータの冗長度を抑圧して伝送デ
ータ量を低減するデータ圧縮技術は高能率符号化と呼ば
れる。この高能率符号化方式の1つに、フレーム間予測
符号化方式がある。フレーム間予測符号化方式において
は、以下の処理が実行される。
2. Description of the Related Art For transmitting or storing an image signal having a huge data amount, a data compression technique for reducing the data amount is indispensable. The image data has considerable redundancy due to correlation between neighboring pixels and human perceptual characteristics. The data compression technique for suppressing the data redundancy to reduce the amount of transmission data is called high-efficiency coding. One of the high-efficiency coding methods is an inter-frame predictive coding method. In the inter-frame prediction coding method, the following processing is executed.

【0003】現在符号化しようとしている現フレームの
各画素データと算出する前フレームの同じ位置にある各
画素データとの差分である予測誤差を各画素に対して算
出する。この算出された予測誤差を以後の符号化に用い
る。この方法では、動きの少ない画像に関してはフレー
ム間の相関が大きいため、高能率で符号化を行なうこと
かできる。しかしながら、動きの大きな画像について
は、フレーム間の相関が小さいため誤差が大きくなり、
逆に伝送されるデータ量が増加するという欠点が生じ
る。
A prediction error, which is the difference between each pixel data of the current frame to be encoded and each pixel data at the same position in the previous frame to be calculated, is calculated for each pixel. The calculated prediction error is used for subsequent encoding. In this method, since the correlation between frames is large for an image with little motion, encoding can be performed with high efficiency. However, for images with large motion, the error becomes large because the correlation between frames is small,
On the contrary, there is a disadvantage that the amount of transmitted data increases.

【0004】上述の問題点を解決する方法として、動き
補償付フレーム間予測符号化方式がある。この方法にお
いては、以下の処理が行なわれる。予測誤差を算出する
前に、予め現フレームと前フレームの両画素データを用
いて動きベクトルを算出する。このこの算出された動き
ベクトルに従って前フレームの予測画像を移動させる。
すなわち、前フレームの動きベクトルだけずれた位置の
画素データを参照画素として、この参照画素を予測値と
して用いる。次いで、この移動後の前フレームと現フレ
ームとの各画素の予測誤差を算出し、予測誤差と動きベ
クトルを伝送する。
As a method for solving the above-mentioned problem, there is an inter-frame predictive coding method with motion compensation. In this method, the following processing is performed. Before calculating the prediction error, a motion vector is calculated in advance using both pixel data of the current frame and the previous frame. The predicted image of the previous frame is moved according to the calculated motion vector.
That is, pixel data at a position shifted by the motion vector of the previous frame is used as a reference pixel, and this reference pixel is used as a prediction value. Next, the prediction error of each pixel between the previous frame after the movement and the current frame is calculated, and the prediction error and the motion vector are transmitted.

【0005】次に、動きベクトルの算出について具体的
に説明する。動きベクトルの算出には、一般にブロック
マッチング法が用いられる。
Next, the calculation of the motion vector will be specifically described. In general, a block matching method is used for calculating a motion vector.

【0006】図17(A)および図17(B)は参照フ
レーム(m−1)と現フレームmとを用いて動きベクト
ルを求める手法を説明するための図である。今、図17
(A)に示すように、第(m−1)フレームにおける画
像Aが第mフレームにおいては画像A′に移動した状態
を考える。ブロックマッチング法においては、画像(1
フレーム)をP×Q画素のブロックに分割する(一般に
はP=Q)。現フレームmにおいて着目するブロックに
最も近似するブロックを前フレーム(m−1)から探し
出す。この着目ブロックから最も近似する前フレームに
おけるブロックへのずれを「動きベクトル」と称す。以
下により詳細にこの動きベクトルの検出について説明す
る。
FIGS. 17A and 17B are diagrams for explaining a method of obtaining a motion vector using the reference frame (m-1) and the current frame m. Now, FIG.
As shown in (A), consider a state in which the image A in the (m-1) th frame has moved to the image A 'in the mth frame. In the block matching method, the image (1
The frame is divided into blocks of P × Q pixels (generally, P = Q). The block closest to the block of interest in the current frame m is searched for from the previous frame (m-1). The shift from the target block to the block in the previous frame that is the closest to the target block is referred to as a “motion vector”. Hereinafter, the detection of the motion vector will be described in more detail.

【0007】図17(B)に示すように、第mフレーム
が符号化対象フレーム、すなわち現フレームとする。フ
レームはN×N画素のブロックに分割される。第mフレ
ームにおけるN×N画素のブロックにおける一番左上の
画素位置(Nk,Nl)における画素データの値をXm
(Nk,Nl)とする。前フレーム(m−1)における
画素位置を位置(a,j)だけずらしたブロックの各画
素と現フレームにおけるブロックの各画素の値の差分の
絶対値和を求める。次に、このずれ(i,j)を様々な
値に変え、各値に対して差分絶対値和を求める。最小の
差分絶対値和を与える位置(a,b)を動きベクトルと
称する。
As shown in FIG. 17B, the m-th frame is a frame to be encoded, that is, the current frame. The frame is divided into blocks of N × N pixels. The value of the pixel data at the upper left pixel position (Nk, Nl) in the block of N × N pixels in the m-th frame is Xm
(Nk, Nl). The absolute value sum of the difference between each pixel of the block in which the pixel position in the previous frame (m-1) is shifted by the position (a, j) and the value of each pixel of the block in the current frame is obtained. Next, the deviation (i, j) is changed to various values, and the sum of absolute differences is calculated for each value. The position (a, b) where the minimum sum of absolute differences is given is called a motion vector.

【0008】動きベクトルは1ブロック画素当り1個伝
送する必要がある。ブロックサイズを小さくすると伝送
情報量が増加し、効果的なデータ圧縮ができなくなる。
一方、ブロックサイズを大きくすると効果的な動き検出
が困難となる。そこで、一般的には、ブロックサイズは
16×16画素、動きベクトル探索範囲(i,jの最大
変化幅)は−15〜+15とされる。以下に、具体的に
ブロックマッチング法による動きベクトルの算出につい
て説明する。
It is necessary to transmit one motion vector per block pixel. If the block size is reduced, the amount of transmission information increases, and effective data compression cannot be performed.
On the other hand, when the block size is increased, it becomes difficult to effectively detect motion. Therefore, in general, the block size is set to 16 × 16 pixels, and the motion vector search range (the maximum change width of i and j) is set to -15 to +15. Hereinafter, the calculation of the motion vector by the block matching method will be specifically described.

【0009】図18は、ブロックマッチング法による動
きベクトルの算出手法を説明するための図である。今、
352ドット×288ラインからなる画像(フレーム)
950を考える。画像(フレーム)950を、16×1
6画素を1ブロックとしてブロックに分割する。このブ
ロック単位で動きベクトルの検出が実行される。動きベ
クトル検出処理の対象となるブロック(以下、テンプレ
ートブロックと称す)952の同じ位置にある前フレー
ムにおけるブロック954を基準として水平方向および
垂直方向に±16画素大きなブロック、すなわち、ブロ
ック954を中心とする48画素×48画素により構成
されるブロック956を探索ブロック(以下、サーチエ
リアと称す)とする。テンプレートブロック952に対
する動きベクトルの探索はこのサーチエリア内において
実行される。ブロックマッチング法に従った動きベクト
ルの検索方法は、以下の処理ステップを備える。
FIG. 18 is a diagram for explaining a method of calculating a motion vector by the block matching method. now,
Image (frame) consisting of 352 dots x 288 lines
Consider 950. 16x1 image (frame) 950
Six pixels are divided into blocks as one block. The detection of the motion vector is executed for each block. A block larger by ± 16 pixels in the horizontal and vertical directions with reference to the block 954 in the previous frame at the same position as the block (hereinafter, referred to as a template block) 952 to be subjected to the motion vector detection processing, that is, the block 954 A block 956 composed of 48 × 48 pixels is referred to as a search block (hereinafter, referred to as a search area). The search for the motion vector for the template block 952 is performed in this search area. The motion vector search method according to the block matching method includes the following processing steps.

【0010】動きベクトルの候補に対応する変位を有す
る予測画像ブロック(図18においては(i,j)で示
す)を求める。この求められたブロックとテンプレート
ブロックの対応の位置にある画素対を用いて差分絶対値
和(または差分自乗和)のような評価関数値を求める。
A predicted image block (indicated by (i, j) in FIG. 18) having a displacement corresponding to a motion vector candidate is obtained. An evaluation function value such as a sum of absolute differences (or a sum of squares of differences) is obtained using the pixel pair at the corresponding position between the obtained block and the template block.

【0011】上述の評価動作を(i,j)=(−16,
−16)〜(+16,+16)の範囲のすべての変位に
対して実行する。すべての予測画像ブロックに対して評
価関数(評価値;たとえば差分絶対値和)を求めた後、
この評価関数値が最小となる予測画像ブロックを検出す
る。テンプレートブロック952と同じ位置(以下、真
裏と称す)のブロック(図16においてベクトル(0,
0)で示すブロック954)から評価関数値が最小とな
る予測画像ブロックに向かうベクトルをこのテンプレー
トブロック952に対する動きベクトルと決定する。
[0011] The above evaluation operation is represented by (i, j) = (-16,
Performed for all displacements in the range of -16) to (+16, +16). After calculating an evaluation function (evaluation value; for example, sum of absolute differences) for all the prediction image blocks,
A predicted image block in which this evaluation function value is minimum is detected. A block at the same position as the template block 952 (hereinafter referred to as the true back) (the vector (0,
A vector from the block 954) indicated by 0) to the predicted image block having the smallest evaluation function value is determined as a motion vector for the template block 952.

【0012】図19は、従来の動き補償付予測符号化方
式に従って画像データを符号化する符号器の全体の構成
を概略的に示すブロック図である。図19において、符
号器は、入力画像信号に対し所定の前処理を実行する前
処理回路910と、この前処理回路910により前処理
された信号に対し冗長度の除去および入力信号の量子化
を実行するソース符号化回路912と、ソース符号化回
路912からの信号に対し所定のフォーマットに従った
符号化およびこの符号化信号を予め定められたデータ構
造の符号列に多重化するビデオマルチプレクス符号化回
路914とを含む。
FIG. 19 is a block diagram schematically showing an entire configuration of an encoder that encodes image data according to a conventional predictive coding method with motion compensation. In FIG. 19, the encoder performs a pre-processing circuit 910 for executing predetermined pre-processing on an input image signal, and removes redundancy and quantizes the input signal for the signal pre-processed by the pre-processing circuit 910. A source encoding circuit 912 to be executed, and a video multiplex code for encoding a signal from the source encoding circuit 912 according to a predetermined format and multiplexing the encoded signal into a code sequence having a predetermined data structure. And a conversion circuit 914.

【0013】前処理回路910は、時間および空間フィ
ルタを用いて入力画像信号を共通の中間フォーマット
(CIF)に変換しかつノイズ除去のためのフィルタ処
理を実行する。
The preprocessing circuit 910 converts an input image signal into a common intermediate format (CIF) using a temporal and spatial filter, and performs a filtering process for removing noise.

【0014】ソース符号化回路912は、入力画像信号
に対する動き補償による予測誤差を求めるとともに、こ
の予測誤差信号に対するたとえば離散コサイン変換(D
CT)などの直交変換処理を行なうとともにさらにこの
直交変換された画像データを量子化テーブル(予め準備
されている)を用いて量子化する。
The source coding circuit 912 calculates a prediction error due to motion compensation for the input image signal, and performs a discrete cosine transform (D
CT) and the like, and the orthogonally transformed image data is further quantized using a quantization table (prepared in advance).

【0015】ビデオマルチプレクス符号化回路914
は、与えられた画像信号に対したとえばハフマン符号化
などの2次元可変長符号化を行なうとともに、データ処
理単位であるブロックの各種属性(動きベクトルなど)
も可変長符号化した後に、予め定められたデータ構造の
符号列に多重化する。
Video multiplex coding circuit 914
Performs two-dimensional variable length coding such as Huffman coding on a given image signal and various attributes (such as motion vectors) of a block as a data processing unit.
Is also multiplexed into a code string having a predetermined data structure after variable-length coding.

【0016】符号器はさらに、ビデオマルチプレクス符
号化回路914からの画像データをバッファ処理する伝
送バッファ916と、伝送バッファ916からの画像デ
ータを伝送チャネルに適合させるための伝送符号化回路
918を含む。
The encoder further includes a transmission buffer 916 for buffering the image data from the video multiplex encoding circuit 914, and a transmission encoding circuit 918 for adapting the image data from the transmission buffer 916 to the transmission channel. .

【0017】伝送バッファ916は、情報発生速度を一
定速度に平滑化する。伝送符号化回路918は、誤り訂
正ビットの付加、および音声信号データの付加などを実
行する。
The transmission buffer 916 smoothes the information generation speed to a constant speed. The transmission encoding circuit 918 performs addition of error correction bits, addition of audio signal data, and the like.

【0018】図20は、図19に示すソース符号化回路
の具体的構成の一例を示す図である。この図19および
図20に示す符号器の構成は、たとえば日経エレクトロ
ニクス1990年6月25日号の第214頁の図3に示
されている。
FIG. 20 is a diagram showing an example of a specific configuration of the source encoding circuit shown in FIG. The configuration of the encoder shown in FIGS. 19 and 20 is shown, for example, in FIG. 3 on page 214 of Nikkei Electronics, June 25, 1990.

【0019】図20を参照して、ソース符号化回路91
2は、前処理回路910から与えられる画像信号に対し
動きベクトルを検出しかつ動きベクトルに従って動き補
償された参照画素を生成する動き補償予測器920と、
動き補償予測器920からの参照画素データに対しフィ
ルタ処理を行なうループフィルタ922と、ループフィ
ルタ922の出力と入力画像信号との差分を求める減算
器924と、減算器924の出力を直交変換する直交変
換器926と、直交変換器926により直交変換された
データを量子化する量子化器928を含む。
Referring to FIG. 20, source encoding circuit 91
A motion compensation predictor 920 for detecting a motion vector with respect to the image signal supplied from the preprocessing circuit 910 and generating a motion-compensated reference pixel according to the motion vector;
A loop filter 922 that performs a filtering process on the reference pixel data from the motion compensation predictor 920, a subtractor 924 that calculates the difference between the output of the loop filter 922 and the input image signal, and an orthogonal that orthogonally transforms the output of the subtractor 924. It includes a transformer 926 and a quantizer 928 for quantizing the data orthogonally transformed by the orthogonal transformer 926.

【0020】動き補償予測器920は、1フレーム前の
画素データを格納するフレームメモリを含み、入力画像
信号データとこのフレームメモリ内の画素データとに従
って動きベクトルの検出および動き補償された参照画素
データの生成を行なう。ループフィルタ992は、画質
改善のために設けられる。
The motion compensation predictor 920 includes a frame memory for storing the pixel data of the previous frame, and detects the motion vector according to the input image signal data and the pixel data in the frame memory, and performs the motion compensated reference pixel data. Is generated. The loop filter 992 is provided for improving image quality.

【0021】直交変換器926は、減算器924からの
データに対し、所定のサイズのブロック(通常8×8画
素)を1つの単位としてDCT変換などの直交変換を行
なう。量子化器928は、この直交変換器926により
直交変換された画素データを、予め準備された量子化テ
ーブルを用いて量子化する。
The orthogonal transformer 926 performs an orthogonal transform such as a DCT transform on the data from the subtractor 924 using a block of a predetermined size (usually 8 × 8 pixels) as one unit. The quantizer 928 quantizes the pixel data orthogonally transformed by the orthogonal transformer 926 using a quantization table prepared in advance.

【0022】動き補償予測器920および減算器924
により、動き補償付フレーム間予測が実行され、動画像
信号における時間的な冗長性が除去される。また、直交
変換器926による直交変換により動画像信号における
空間的な冗長性が除去される。
A motion compensation predictor 920 and a subtractor 924
As a result, inter-frame prediction with motion compensation is performed, and temporal redundancy in a moving image signal is removed. Further, spatial redundancy in the moving image signal is removed by the orthogonal transform by the orthogonal transformer 926.

【0023】ソース符号化回路912はさらに、量子化
器928で量子化されたデータを量子化前の信号状態に
変換するための逆量子化器930と、この逆量子化器9
30の出力に対し逆直交変換を行なう逆直交変換器93
2と、ループフィルタ922の出力と逆直交変換器93
2の出力とを加算する加算器934を含む。
The source encoding circuit 912 further includes an inverse quantizer 930 for converting the data quantized by the quantizer 928 into a signal state before quantization, and an inverse quantizer 9
Inverse orthogonal transformer 93 which performs inverse orthogonal transformation on the output of
2, the output of the loop filter 922 and the inverse orthogonal transformer 93
2 and an adder 934 for adding the output of the second.

【0024】逆量子化器930および逆直交変換器93
2により、直交変換前の信号(減算器924の出力信
号)が生成される。加算器934は逆直交変換器932
の出力とループフィルタ922の出力とを加算する。こ
れにより予測値と予測誤差との加算が実行され、次のフ
レームに対するフレーム間予測のための参照画像データ
が生成される。加算器934により生成された画像デー
タは動き補償予測器920に含まれるフレームメモリへ
書込まれる。通常、一般にこの逆量子化処理、逆直交変
換処理および加算処理は局部復号過程と呼ばれる。
Inverse quantizer 930 and inverse orthogonal transformer 93
By (2), a signal before the orthogonal transform (an output signal of the subtractor 924) is generated. The adder 934 is an inverse orthogonal transformer 932
And the output of the loop filter 922 are added. As a result, the prediction value and the prediction error are added, and reference image data for inter-frame prediction for the next frame is generated. The image data generated by the adder 934 is written to a frame memory included in the motion compensation predictor 920. Generally, the inverse quantization, inverse orthogonal transform, and addition are generally called a local decoding process.

【0025】図21は、図20に示す動き補償予測器に
含まれる動きベクトル検出部の構成を概略的に示すブロ
ック図である。図21において、動きベクトル検出部
は、前処理回路910(図19参照)から与えられる現
画像画素信号を格納する現画像メモリ940と、加算器
934(図20参照)から与えられる参照画像画素信号
を格納する参照画像メモリ942と、メモリ940およ
び942からの現画像画素信号および参照画像画素信号
を読出しこの現画像画素に対する動きベクトルを算出す
る動きベクトル算出部944を含む。メモリ940およ
び942は、たとえば1フレームの画素信号を格納する
フレームメモリで構成される。
FIG. 21 is a block diagram schematically showing a configuration of a motion vector detecting section included in the motion compensation predictor shown in FIG. 21, a motion vector detecting unit includes a current image memory 940 for storing a current image pixel signal supplied from a preprocessing circuit 910 (see FIG. 19), and a reference image pixel signal supplied from an adder 934 (see FIG. 20). And a motion vector calculator 944 for reading the current image pixel signal and the reference image pixel signal from the memories 940 and 942 and calculating a motion vector for the current image pixel. Memories 940 and 942 are each formed of a frame memory for storing a pixel signal of one frame, for example.

【0026】動きベクトル算出部944は、符号化され
るべき画素ブロック(テンプレートブロック)の画素信
号とこのテンプレートブロックに関連するサーチエリア
内の画素信号とを受け、サーチエリア内の変位ベクトル
各々に対する評価値を算出する評価値算出部948と、
評価値算出部949により算出された評価値に従ってテ
ンプレートブロックに対する動きベクトルを検出する動
きベクトル判定部949とを含む。テンプレートブロッ
クの画素信号およびサーチエリア内の画素信号はそれぞ
れ制御回路946の制御の下に読出されて評価値算出部
948へ与えられる。この制御回路946は、また、動
きベクトル算出部944における各種動作タイミングを
も制御する。
The motion vector calculating section 944 receives a pixel signal of a pixel block (template block) to be encoded and a pixel signal in a search area related to the template block, and evaluates each displacement vector in the search area. An evaluation value calculation unit 948 for calculating a value,
A motion vector determining unit 949 for detecting a motion vector for the template block according to the evaluation value calculated by the evaluation value calculating unit 949. The pixel signal of the template block and the pixel signal in the search area are read out under the control of the control circuit 946 and provided to the evaluation value calculation unit 948. The control circuit 946 also controls various operation timings in the motion vector calculation section 944.

【0027】評価値算出部948は、テンプレートブロ
ック内の画素信号a(x,y)とサーチエリア内のブロ
ック(変位ベクトル(i,j)に対応)の画素信号b
(x+i,y+j)とのたとえば次式に示す差分絶対値
和で示される評価関数を用いて評価値を算出する。
The evaluation value calculator 948 calculates the pixel signal a (x, y) in the template block and the pixel signal b in the block (corresponding to the displacement vector (i, j)) in the search area.
An evaluation value is calculated using an evaluation function represented by the following equation with (x + i, y + j).

【0028】 D(i,j)=Σ|a(x,y)−b(x+i,y+j)| ただし総和Σはテンプレートブロック内の画素(x,
y)すべてに対して実行される。動きベクトル判定部9
49は、この評価値算出部948からの評価値D(i,
j)を受け、最小の評価値を与える変位ベクトル(i,
j)をこのテンプレートブロックに対する動きベクトル
と判定し、動きベクトルmvおよび評価値D(i,j)
=fを出力する。
D (i, j) = {| a (x, y) −b (x + i, y + j) | where the sum is a pixel (x,
y) Performed for all. Motion vector determination unit 9
49 is the evaluation value D (i,
j), and the displacement vector (i,
j) is determined as the motion vector for this template block, and the motion vector mv and the evaluation value D (i, j) are determined.
= F is output.

【0029】この動きベクトル判定部949により算出
された動きベクトルmvを用いて参照画像メモリ942
へアクセスし、今求められたテンプレートブロックの各
画素に対する参照画素信号が読出され、図20に示す減
算器924へループフィルタ922を介して伝達され
る。
Using the motion vector mv calculated by the motion vector determination section 949, the reference image memory 942
, The reference pixel signal for each pixel of the template block just obtained is read out, and transmitted to the subtractor 924 shown in FIG. 20 via the loop filter 922.

【0030】この動きベクトル算出部944は先に図1
8を参照して説明したブロックマッチング法による動き
ベクトルを検出している。このような動きベクトルをハ
ードウェアにより高速で求めるための構成が種々提案さ
れている。
The motion vector calculation section 944 has been described with reference to FIG.
8 is detected by the block matching method described with reference to FIG. Various configurations have been proposed for obtaining such a motion vector at high speed by hardware.

【0031】図22は、従来の動きベクトル検出装置の
全体の構成を概略的に示す図である。図22に示す動き
ベクトル検出装置の構成は、たとえば1989IEE
E、ICASSP’89のプロシーディングス(予稿
集)第2453頁ないし第2456頁においてA・アル
ティエリ等により示されている。
FIG. 22 is a diagram schematically showing an entire configuration of a conventional motion vector detecting device. The configuration of the motion vector detecting device shown in FIG.
E, Proceedings of ICASP SP '89 (Pages 2453 to 2456), by A. Artieri et al.

【0032】図22において、動きベクトル検出装置
は、サーチエリア内の画素データをサーチエリアの1列
分入力するためのサーチエリア入力レジスタ962と、
テンプレートブロック評価点(変位ベクトル)と同一サ
イズの行および列のマトリクス状に配置された複数のプ
ロセサを含むプロセサアレイ966と、このプロセサア
レイ966に対しサーチエリアにおける同一列のデータ
を格納するサーチエリアサイドレジスタ964aおよび
964bと、プロセサアレイ966からの演算結果に従
って動きベクトルを検出する動きベクトル検出部968
を含む。この動きベクトル検出部968は、図21に示
す動きベクトル判定部949に対応する。サーチエリア
入力レジスタ962、サーチエリアサイドレジスタ96
4aおよび964bならびにプロセサアレイ966が図
21に示す評価値算出部948に対応する。
In FIG. 22, a motion vector detecting device includes a search area input register 962 for inputting pixel data in the search area for one column of the search area,
A processor array 966 including a plurality of processors arranged in a matrix of rows and columns of the same size as the template block evaluation points (displacement vectors), and a search area for storing data of the same column in the search area for the processor array 966 Side registers 964a and 964b, and a motion vector detecting section 968 for detecting a motion vector in accordance with the operation result from the processor array 966
including. This motion vector detection unit 968 corresponds to the motion vector determination unit 949 shown in FIG. Search area input register 962, search area side register 96
4a and 964b and the processor array 966 correspond to the evaluation value calculation unit 948 shown in FIG.

【0033】プロセサアレイ966には、変位ベクトル
(i,j)に対応してプロセサが配置される。プロセサ
アレイ966において、第i行、第j列に配置されたプ
ロセサPijは変位ベクトル(i,j)に対する評価値
Dijを算出する。
In the processor array 966, processors are arranged corresponding to the displacement vectors (i, j). In the processor array 966, the processor Pij arranged in the i-th row and the j-th column calculates an evaluation value Dij for the displacement vector (i, j).

【0034】図23は、図22で示すプロセサアレイに
含まれるプロセサの構成を概略的に示すブロック図であ
る。図23において、プロセサ970は、プロセサアレ
イの水平および垂直方向の3方向のプロセサから伝達さ
れるサーチエリアデータ(サーチエリア内画素データ)
をうけ、選択信号SELに応答してその1つの入力を通
過させる3入力レジスタ972と、3入力レジスタ97
2からのサーチエリアデータYと外部から与えられるテ
ンプレートブロックデータXとに基づいて歪(差分絶対
値和)を計算する歪計算部974と、歪計算部974か
らの歪Dと水平方向において隣接するプロセサからの歪
データとを受け、選択信号Toに従って一方を選択的に
通過させる2入力レジスタ976を含む。
FIG. 23 is a block diagram schematically showing a configuration of a processor included in the processor array shown in FIG. In FIG. 23, a processor 970 includes search area data (pixel data in a search area) transmitted from processors in three directions of horizontal and vertical directions of the processor array.
, A three-input register 972 that passes one input in response to the selection signal SEL, and a three-input register 97
2, a distortion calculator 974 for calculating a distortion (sum of absolute differences) based on the search area data Y from the outside and the template block data X given from the outside, and the distortion D from the distortion calculator 974 is horizontally adjacent to the distortion D. It includes a two-input register 976 that receives distortion data from the processor and selectively passes one of them according to a selection signal To.

【0035】図23に示すプロセサは、図22に示すプ
ロセサアレイ966におい、サーチエリアにおいて動き
ベクトルの候補となるすべての変位ベクトルに対応して
2次元アレイ状に配置される。プロセサアレイ966
(図22参照)の各プロセサ970へは、同じテンプレ
ートブロックの画素データXが同時に与えられる。この
とき、プロセサ970へは、サーチエリア内の対応の画
素データが与えられる。
The processors shown in FIG. 23 are arranged in the processor array 966 shown in FIG. 22 in a two-dimensional array corresponding to all the displacement vectors which are candidates for motion vectors in the search area. Processor array 966
Pixel data X of the same template block is simultaneously supplied to each processor 970 (see FIG. 22). At this time, the corresponding pixel data in the search area is supplied to the processor 970.

【0036】たとえば、テンプレートブロック画素デー
タXが、テンプレートブロック内の位置(m,n)の画
素信号X(m,n)の場合、プロセサPijに対しては
サーチエリア内画素データY(i+m,j+n)が与え
られる。サーチウィンドデータは、サーチエリアサイド
レジスタ964aおよび964bならびにプロセサアレ
イ966内の各プロセサ970を介して転送される。こ
のとき、外部からすべてのプロセサに対し共通に与えら
れるテンプレートブロックデータX(m,n)に対し、
各プロセサPijに対して正確にサーチエリアブロック
データY(m+i,n+j)を与えるためには、テンプ
レートブロック画素データおよびサーチエリアブロック
画素データはある規則性を持ってスキャンされる。
For example, when the template block pixel data X is the pixel signal X (m, n) at the position (m, n) in the template block, the search area pixel data Y (i + m, j + n) for the processor Pij. ) Is given. The search window data is transferred via search area side registers 964a and 964b and each processor 970 in processor array 966. At this time, for template block data X (m, n) which is given externally to all processors in common,
In order to accurately supply the search area block data Y (m + i, n + j) to each processor Pij, the template block pixel data and the search area block pixel data are scanned with a certain regularity.

【0037】図24はこのテンプレートブロックのデー
タのスキャン態様を示す図である。図24において、テ
ンプレートブロック画素データはテンプレートブロック
999において同図において矢印で示すようにまず同一
列に沿って上方向から下方向へスキャンされ、次いで1
列隣の画素データが下方向から上方向へスキャンされ、
以下この動作を繰り返すことにより生成される。テンプ
レートブロック各列においてスキャン方向が逆転する。
このようなスキャン方法は一般に「スネークスキャン」
と呼ばれる。このテンプレートブロック画素データのス
ネークスキャンに従って、同様にプロセサアレイへ与え
られるサーチエリアブロック画素データも「スネークス
キャン」態様でスキャンされる。プロセサ970は、そ
のアレイ内の配置位置においてサーチエリアデータを図
23の上下方向または左方向へ転送する必要がある。こ
の転送方向を調節するために3入力レジスタ972が設
けられる。2入力レジスタ976は、対応のプロセサで
計算された歪を動きベクトル検出部968へ伝達する。
動きベクトル検出部968は、各プロセサから与えられ
た歪Dijのうち最小の歪を検出し、その最小の歪を与
えるプロセサ位置、すなわち動きベクトルを求める。次
に、この図22および23に示す動きベクトル検出装置
の動作について簡単に説明する。
FIG. 24 is a diagram showing a manner of scanning the data of the template block. In FIG. 24, the template block pixel data is first scanned in the template block 999 from the top to the bottom along the same column as indicated by the arrow in FIG.
The pixel data next to the column is scanned from bottom to top,
Hereinafter, it is generated by repeating this operation. The scanning direction is reversed in each column of the template block.
Such a scanning method is generally called "snake scan"
Called. In accordance with the snake scan of the template block pixel data, the search area block pixel data similarly supplied to the processor array is also scanned in a “snake scan” mode. The processor 970 needs to transfer the search area data in the vertical direction or the left direction in FIG. 23 at the arrangement position in the array. A three-input register 972 is provided to adjust the transfer direction. Two-input register 976 transmits the distortion calculated by the corresponding processor to motion vector detecting section 968.
The motion vector detection unit 968 detects the minimum distortion among the distortions Dij given from the processors, and obtains a processor position that gives the minimum distortion, that is, a motion vector. Next, the operation of the motion vector detecting device shown in FIGS. 22 and 23 will be briefly described.

【0038】プロセサアレイ966において第i行、第
j列に配置されたプロセサPijは、 Dij=Σ|X(m,n)−Y(m+i,n+j)| で表わされる歪Dijを算出する。ここで総和Σはmお
よびnに関して行なわれる。m,nの変化範囲はテンプ
レートブロックのサイズにより決定される。
The processor Pij arranged in the i-th row and j-th column in the processor array 966 calculates a distortion Dij represented by Dij = Σ | X (m, n) -Y (m + i, n + j) |. Here, the sum Σ is performed for m and n. The change range of m and n is determined by the size of the template block.

【0039】今、図25に示すように、テンプレートブ
ロック980としてM行N列に配置された画素群を考え
る。最初のサイクルにおいては、プロセサアレイにおけ
る各プロセサ970には、参照符号982で示すサーチ
エリアブロックデータがそれぞれ格納される。外部から
は、テンプレートブロック980における第1行第1列
の画素X(1,1)がプロセサアレイ966内のすべて
のプロセサ970に与えられる。プロセサ970の各々
は、そこに格納されているサーチウィンド画素データY
と与えられたテンプレートブロック画素データXとの差
分絶対値を求めて格納する。
Now, consider a group of pixels arranged in M rows and N columns as a template block 980 as shown in FIG. In the first cycle, search area block data indicated by reference numeral 982 is stored in each processor 970 in the processor array. From the outside, the pixel X (1,1) in the first row and first column in the template block 980 is given to all the processors 970 in the processor array 966. Each of the processors 970 stores the search window pixel data Y stored therein.
And the absolute value of the difference from the given template block pixel data X is stored.

【0040】次のサイクルにおいて、プロセサアレイに
おいてサーチエリアデータが1行図25の下方向へシフ
トされる。この状態で次いでテンプレートブロック98
0の第2行第1列の画素データX(2,1)が与えられ
る。変位ベクトルPijに対応するプロセサが格納する
サーチエリアデータはY(2+i,1+j)である。こ
れらのデータX(2,1)およびY(2+i,1+j)
を用いて再び差分絶対値がとられて累算される。一般に
画素データX(m,n)が与えられると、変位ベクトル
Pijに対応するプロセサに格納されるサーチエリア画
素データはY(m+i,n+j)である。この動作をM
回繰り返すと、サーチエリアの1列の画素に対する変位
ベクトルの算出が完了する。
In the next cycle, one row of search area data is shifted downward in FIG. 25 in the processor array. In this state, the template block 98
Pixel data X (2,1) in the second row and the first column of 0 is given. The search area data stored by the processor corresponding to the displacement vector Pij is Y (2 + i, 1 + j). These data X (2,1) and Y (2 + i, 1 + j)
Is again used to take the absolute value of the difference and accumulate it. Generally, when pixel data X (m, n) is given, search area pixel data stored in a processor corresponding to a displacement vector Pij is Y (m + i, n + j). This operation is called M
After repeating this, the calculation of the displacement vector for one row of pixels in the search area is completed.

【0041】この後外部からサーチエリアの新たな1列
のサーチエリア画素データをサーチエリア入力レジスタ
962を介して書込む。不要となったサーチエリアの1
列の画素データが放出される。これにより新しいサーチ
エリアデータがサーチエリアサイドレジスタ964aお
よび964bならびにプロセサアレイ966に格納され
る。この動作が繰り返し実行される。
Thereafter, one new search area pixel data of the search area is externally written via the search area input register 962. 1 of search area that became unnecessary
Column pixel data is emitted. As a result, new search area data is stored in search area side registers 964a and 964b and processor array 966. This operation is repeatedly performed.

【0042】すなわち、図26に示すように、最初はサ
ーチウィンド990を用いて差分絶対値和の計算が実行
され、Mサイクル完了後、次のサーチウィンド992の
データを用いて再び同様の計算が実行され、以降、サー
チウィンド994、…と同様の動作が繰り返し実行され
る。最終的にサーチエリア996すべてに対する画素デ
ータに対する計算が実行されると、変位ベクトルPij
に対応するプロセサにおいて歪Dijが求められ、保持
される。
That is, as shown in FIG. 26, first, the calculation of the sum of absolute differences is performed using search window 990, and after completion of M cycles, the same calculation is performed again using the data of the next search window 992. , And thereafter, the same operations as the search windows 994,... Are repeatedly executed. When the calculation for the pixel data for all the search areas 996 is finally performed, the displacement vector Pij
Is obtained and held in the processor corresponding to.

【0043】このプロセサ970において求められた歪
Dijは、動きベクトル検出部968(図22参照)へ
伝達される。動きベクトル検出部968は最小の歪を与
えるプロセサに対応する変位ベクトルを動きベクトルと
して判定し、動きベクトルmvを出力する。
The distortion Dij obtained by the processor 970 is transmitted to a motion vector detecting section 968 (see FIG. 22). The motion vector detection unit 968 determines a displacement vector corresponding to the processor giving the minimum distortion as a motion vector, and outputs a motion vector mv.

【0044】このようにして求められた動きベクトルm
vを用いて参照画像メモリへアクセスし、現画像画素信
号X(m,n)に対する参照画素信号Y(m+i,y+
j)が読出され、予測値(予測誤差)X(m,n)−Y
(m+i,n+j)が生成される。
The motion vector m thus obtained
v, the reference image memory is accessed, and the reference pixel signal Y (m + i, y +) for the current image pixel signal X (m, n) is accessed.
j) is read out and the predicted value (prediction error) X (m, n) -Y
(M + i, n + j) is generated.

【0045】フレーム画像をブロックに分割した場合、
ブロックの位置には、図27に示すように9種類が存在
する。
When the frame image is divided into blocks,
There are nine types of block positions as shown in FIG.

【0046】図27はフレーム画像(画面)200にお
ける動きベクトル検出単位のブロックすなわちテンプレ
ートブロックおよびサーチウィンドブロックの位置を代
表的に示す図である。図27において、画面200内の
内部に存在するテンプレートブロック201jに対して
はサーチエリア202の画素はすべて画面200内に存
在する。したがって前述のようにしてサーチエリア内の
画素データすべてに対して歪を計算して動きベクトルを
検出することができる。
FIG. 27 is a diagram representatively showing the position of a block of a motion vector detection unit, that is, a template block and a search window block in a frame image (screen) 200. In FIG. 27, for the template block 201j existing inside the screen 200, all pixels in the search area 202 exist within the screen 200. Therefore, as described above, the motion vector can be detected by calculating the distortion for all the pixel data in the search area.

【0047】しかしながら、テンプレートブロックが画
面200の端部、すなわち上端部UE、下端部BE、左
端部LEおよび右端部REに存在する場合、すなわちテ
ンプレートブロック201a〜201hに対しては動き
ベクトル検出にあたってある種の制限が必要となる。予
測画像(動きベクトルにより補償された画像)が画面2
00を逸脱することはないためである。以下この条件に
ついて説明する。
However, when the template block exists at the end of the screen 200, that is, at the upper end UE, the lower end BE, the left end LE, and the right end RE, that is, the motion vector is detected for the template blocks 201a to 201h. Species restrictions are required. The predicted image (image compensated by the motion vector) is displayed on screen 2
This is because there is no deviation from 00. Hereinafter, this condition will be described.

【0048】図28は1つの端部に含まれるテンプレー
トブロックに対する動きベクトルの制限条件を示す。
FIG. 28 shows a restriction condition of a motion vector for a template block included in one end.

【0049】(i) テンプレートブロック201a:
図28(a)に示すように、テンプレートブロック20
1aは画面200の上端UEに存在する。この場合、動
きベクトルの垂直成分VCが負の領域は無効となる。サ
ーチエリア(破線で示す)は画面200内に含まれない
ためである。ここで、以下の説明において図28におい
て図の下方向を垂直成分の正方向とし、図28の左から
右方向を水平成分HCの正方向とする。
(I) Template block 201a:
As shown in FIG.
1a exists at the upper end UE of the screen 200. In this case, an area where the vertical component VC of the motion vector is negative is invalid. This is because the search area (shown by a broken line) is not included in the screen 200. Here, in the following description, the downward direction in FIG. 28 is the positive direction of the vertical component, and the left to right direction in FIG. 28 is the positive direction of the horizontal component HC.

【0050】(ii) テンプレートブロック201b:
図28(b)に示すように、テンプレートブロック20
1bは、下端ブロックBEに存在する。この場合、動き
ベクトルの垂直成分VCの正の領域は無効となる。
(Ii) Template block 201b:
As shown in FIG. 28B, the template block 20
1b exists in the lower end block BE. In this case, the positive region of the vertical component VC of the motion vector becomes invalid.

【0051】(iii) テンプレートフロー201c:図
28(c)に示すように、テンプレートブロック201
cは、左端ブロックLEに属しており、この場合動きベ
クトルの水平成分HCが負の領域は無効となる。
(Iii) Template flow 201c: As shown in FIG.
c belongs to the left end block LE. In this case, a region where the horizontal component HC of the motion vector is negative is invalid.

【0052】(iv) テンプレートブロック201d:
図28(d)に示すように、テンプレートブロック20
1dは右端ブロックREに属しており、この場合動きベ
クトルの水平成分HCが正の領域は無効となる。
(Iv) Template block 201d:
As shown in FIG. 28D, the template block 20
1d belongs to the right end block RE, and in this case, a region where the horizontal component HC of the motion vector is positive is invalid.

【0053】図29は画面上の角部に存在する有効サー
チエリアを示す図である。 (v) テンプレートブロック201e:図29(a)
に示すように、画面200の左上角に存在するテンプレ
ートブロック201eは、上端ブロックUEおよび左端
ブロックLE両者に存在する。この場合、動きベクトル
の垂直および水平成分VCおよびHCの負の領域はとも
に無効領域となる。
FIG. 29 is a diagram showing an effective search area existing at a corner on the screen. (V) Template block 201e: FIG. 29 (a)
As shown in the figure, the template block 201e existing at the upper left corner of the screen 200 exists in both the upper end block UE and the left end block LE. In this case, the negative regions of the vertical and horizontal components VC and HC of the motion vector are both invalid regions.

【0054】(vi) テンプレートブロック201f:
画面200の右上角に存在するテンプレートブロック2
01fは、上端ブロックUEおよび右端ブロックRE両
者に属する。この場合、動きベクトルとしては水平成分
HCの正の領域および垂直成分VCの負の領域は無効領
域となる。
(Vi) Template block 201f:
Template block 2 in the upper right corner of screen 200
01f belongs to both the upper end block UE and the right end block RE. In this case, as the motion vector, the positive region of the horizontal component HC and the negative region of the vertical component VC are invalid regions.

【0055】(vii) テンプレートブロック201g:
画面200の左下角に存在するテンプレートブロック2
01gは図29(c)に示すように、下端ブロックBE
および左端ブロックLE両者に属する。この場合動きベ
クトルの垂直成分VCの正の領域および水平成分HCの
負の領域は無効領域となる。
(Vii) Template block 201g:
Template block 2 in the lower left corner of screen 200
01g is the lower end block BE as shown in FIG.
And the left end block LE. In this case, the positive area of the vertical component VC and the negative area of the horizontal component HC of the motion vector are invalid areas.

【0056】(viii) テンプレートブロック201h:
図29(d)に示すように、画面右下角に存在するテン
プレートブロック201hは、下端ブロックBEおよび
右端ブロックRE両者に存在する。このテンプレートブ
ロック201hに対しては動きベクトルの垂直および水
平成分VCおよびHCがともに正の領域が無効領域とな
る。
(Viii) Template block 201h:
As shown in FIG. 29D, the template block 201h existing in the lower right corner of the screen exists in both the lower end block BE and the right end block RE. For the template block 201h, an area in which both the vertical and horizontal components VC and HC of the motion vector are positive is an invalid area.

【0057】上述のような画面上での端(画面角を含
む)の画素ブロックに対しては動きベクトルの探索範囲
に対し制限を設ける必要がある。このような制御信号は
従来は、外部から動きベクトル算出部へ与えられてい
る。
It is necessary to limit the search range of the motion vector for the pixel block at the end (including the screen angle) on the screen as described above. Conventionally, such a control signal is externally provided to a motion vector calculation unit.

【0058】図30は、従来の探索範囲制限機能付動き
ベクトル検出装置の構成を概略的に示す図である。図3
0において、動きベクトル検出装置210は、図21に
示すものと同様の構成を備える動きベクトル算出部94
4と、外部から与えられるブロック位置指示信号φU
E、φBE、φRE、φLEに従って動きベクトル算出
部944の動きベクトル探索範囲を制御する端ブロック
制御部212を含む。動きベクトル算出部944はテン
プレート画素データ(符号化中の現画像画素ブロックの
データ)TDとサーチウィンド画素データ(テンプレー
トブロックに関連するサーチエリア内のデータ)SDと
を受け、上述のようなブロックマッチング法に従って動
きベクトルmvおよび評価値(必要な場合)fを算出す
る。
FIG. 30 is a diagram schematically showing a configuration of a conventional motion vector detecting device with a search range limiting function. FIG.
0, the motion vector detecting device 210 has a motion vector calculating unit 94 having a configuration similar to that shown in FIG.
4 and a block position indication signal φU externally applied.
An end block control unit 212 that controls the motion vector search range of the motion vector calculation unit 944 according to E, φBE, φRE, and φLE is included. The motion vector calculation unit 944 receives the template pixel data (data of the current image pixel block being encoded) TD and the search window pixel data (data in the search area related to the template block) SD, and performs block matching as described above. The motion vector mv and the evaluation value (if necessary) f are calculated according to the method.

【0059】端ブロック制御部212へ与えられる信号
φUE、φBE、φRE、およびφLEはそれぞれ現在
与えられているテンプレート画素データTDが含まれる
テンプレートブロックの画面上での位置を示す信号であ
る。1つのテンプレートブロックに関する動きベクトル
検出動作時において最初のサイクルで各信号の状態が決
定されて端ブロック制御部212へ与えられる。
Signals φUE, φBE, φRE, and φLE applied to end block control section 212 are signals indicating the position on the screen of the template block including the currently applied template pixel data TD. In the motion vector detection operation for one template block, the state of each signal is determined in the first cycle and is provided to the end block control unit 212.

【0060】信号φUEは、符号化中の画素ブロック
(以下、テンプレートブロックと称す)が上端ブロック
に含まれることを示す上端指示信号である。信号φBE
は、テンプレートブロックが下端ブロックBEに属する
ことを示す下端指示信号である。信号φREは、テンプ
レートブロックが右端ブロックに含まれることを示す右
端指示信号である。信号φLEは、テンプレートブロッ
クが左端ブロックLEに含まれるブロックであることを
示す左端指示信号である。
The signal φUE is an upper end instruction signal indicating that the pixel block being encoded (hereinafter, referred to as a template block) is included in the upper end block. Signal φBE
Is a lower end instruction signal indicating that the template block belongs to the lower end block BE. Signal φRE is a right end instruction signal indicating that the template block is included in the right end block. Signal φLE is a left end instruction signal indicating that the template block is a block included in left end block LE.

【0061】動きベクトル算出部944は、前述のよう
なプロセサアレイを含む場合、この端ブロック制御部2
12から与えられるブロック位置指示信号に従って、無
効として示された変位ベクトル領域に対応するプロセサ
の出力を無効として動きベクトルの判定を行なう。
When the above-described processor array is included, the motion vector calculation section 944 includes the end block control section 2.
In accordance with the block position indication signal given from 12, the output of the processor corresponding to the displacement vector region indicated as invalid is invalidated and the motion vector is determined.

【0062】図31は、テンプレートブロック位置指示
信号φUE、φBE、φLE、およびφREと動きベク
トル探索範囲の制限との関係を一覧にして示す図であ
る。信号φUE、φBE、φLE、およびφREは、活
性状態の“H”となったときにはそのときのテンプレー
トブロックが対応の端ブロックに属することを示す。
FIG. 31 is a table showing the relationship between the template block position indicating signals φUE, φBE, φLE, and φRE and the limitation of the motion vector search range. Signals φUE, φBE, φLE, and φRE when activated to “H” indicate that the template block at that time belongs to the corresponding end block.

【0063】図31に示されるように、4つの信号φU
E、φBE、φLE、およびφREを用いることによ
り、テンプレートブロックの画面内位置を示すことがで
き、動きベクトル探索範囲を効果的に制限することがで
きる。
As shown in FIG. 31, four signals φU
By using E, φBE, φLE, and φRE, the position of the template block in the screen can be indicated, and the motion vector search range can be effectively limited.

【0064】[0064]

【発明が解決しようとする課題】一般に、動画像処理回
路においては、図20に示すような符号化器の構成が1
つのチップで構成されるのではなく、各機能ブロックが
1つのLSIを用いて実現される。動き補償予測器92
0では、たとえば動きベクトル検出器を1つのチップと
し、フレームメモリからこの動きベクトル検出装置から
の動きベクトルに従って参照画素信号(予測画素デー
タ)の読出が実行される。したがって、図30に示すよ
うにテンプレートブロックの画面内位置に応じて動きベ
クトルの探索位置を制限するためには4種類の信号φU
E、φBE、φLE、およびφREを外部からこの動き
ベクトル検出装置へ与える必要がある。
Generally, in a moving picture processing circuit, an encoder as shown in FIG.
Each functional block is realized by using one LSI instead of being constituted by one chip. Motion compensation predictor 92
In the case of 0, for example, the motion vector detector is one chip, and the reference pixel signal (predicted pixel data) is read from the frame memory according to the motion vector from the motion vector detection device. Therefore, as shown in FIG. 30, in order to limit the search position of the motion vector according to the position of the template block in the screen, four types of signals φU
It is necessary to provide E, φBE, φLE, and φRE from the outside to this motion vector detecting device.

【0065】これらのブロック位置指示信号は、たとえ
ば図21に示す制御回路946から現画像メモリ(たと
えばフレームメモリで構成される)940からブロック
単位で画素データを読出すときそのときのアドレスまた
はブロック番号に応じて発生される。このため、動きベ
クトル検出装置に対し外部信号線として4本の信号線が
必要とされ、応じて4つの外部信号端子が必要とされ
る。このため、動きベクトル検出装置の端子数が増加
し、装置構成を小規模とすることができなくなるという
問題が生じる。これは同様に外部の制御装置も4つのブ
ロック位置指示信号を発生する必要があるため、4本の
信号線を必要とし同様に端子数が増加するという欠点が
生じる。
These block position indicating signals are, for example, the address or block number at the time of reading pixel data in block units from current image memory (eg, frame memory) 940 from control circuit 946 shown in FIG. Generated according to. Therefore, four signal lines are required as external signal lines for the motion vector detection device, and accordingly, four external signal terminals are required. For this reason, the number of terminals of the motion vector detecting device increases, and there is a problem that the device configuration cannot be reduced in scale. Similarly, since the external control device also needs to generate four block position indicating signals, four signal lines are required and the number of terminals similarly increases.

【0066】また動画像符号化標準においては、前処理
回路(図19参照)において、A/D変換された画像信
号が共通の中間フォーマットに変換された後予測符号化
が行なわれる。この中間フォーマット(CIF)は、F
CIFとQCIFを含む。FCIFの場合、画面サイズ
は水平方向のブロック数が22、垂直方向のブロック数
が18である。QCIFの場合水平方向ブロック数が1
1、垂直方向ブロック数が9である。QCIFの場合ブ
ロックの数がFCIFのそれの1/4となる。
According to the moving picture coding standard, the pre-processing circuit (see FIG. 19) performs predictive coding after the A / D converted picture signal is converted into a common intermediate format. This intermediate format (CIF) is
Includes CIF and QCIF. In the case of FCIF, the screen size is 22 in the horizontal direction and 18 in the vertical direction. In the case of QCIF, the number of horizontal blocks is 1
1, the number of blocks in the vertical direction is nine. In the case of QCIF, the number of blocks is 1/4 that of FCIF.

【0067】画面上の特定位置を示すブロック位置指示
信号に従って画面内位置を検出する場合、一方のフォー
マットにしか対応することができない。制御回路が画面
サイズの指定信号に応じてブロック位置指示信号を発生
するように構成されてもよいが、この場合、制御回路の
負荷が大きくなり、高速で動きベクトルを検出すること
ができなくなり、応じて高速で符号化処理を実行するこ
とができなくなるという問題が生じる。
When a position in a screen is detected in accordance with a block position instruction signal indicating a specific position on the screen, only one format can be supported. The control circuit may be configured to generate the block position indication signal in response to the screen size designation signal, but in this case, the load on the control circuit increases, and the motion vector cannot be detected at high speed. Accordingly, there arises a problem that the encoding process cannot be executed at a high speed.

【0068】それゆえ、この発明の目的は端子数を増加
させることなく端ブロック処理を行なうことのできる動
きベクトル検出装置を提供することである。
Therefore, an object of the present invention is to provide a motion vector detecting device capable of performing end block processing without increasing the number of terminals.

【0069】この発明の他の目的は様々な画面サイズ
(1画面に含まれるブロック数)に対しても柔軟に対応
することのできる動きベクトル検出装置を提供すること
である。
Another object of the present invention is to provide a motion vector detecting device which can flexibly cope with various screen sizes (the number of blocks included in one screen).

【0070】この発明のさらに他の目的は、装置規模を
増加させることなく柔軟に複数の画面サイズに対応して
端ブロックを処理することのできる動きベクトル検出装
置を提供することである。
Still another object of the present invention is to provide a motion vector detecting device capable of flexibly processing end blocks corresponding to a plurality of screen sizes without increasing the device scale.

【0071】[0071]

【0072】[0072]

【課題を解決するための手段】請求項に係る動きベク
トル検出装置は、現画像内の符号化されるべきブロック
(テンプレートブロック)の画素データと予測基準とな
る参照画像内の画素データとを入力し、所定の評価関数
に従って符号化されるべきブロックの動きベクトルを算
出する動きベクトル算出手段と、この動きベクトル算出
手段の動きベクトル探索範囲を制御する信号を発生する
制御信号発生手段とを含む。この制御信号発生手段は、
現画像画面上の前記現画像画面についての処理開始の位
置を示す処理開始位置指示信号と複数の画面サイズのう
ちのいずれかの画面サイズを指定する画面サイズ選択信
号とに応答してこの符号化されるべきブロックの画面上
での位置を検出し、該検出結果に従って動きベクトル算
出手段が画面から逸脱する動きベクトルを算出するのを
防止するための制御信号を発生する。
According to a first aspect of the present invention, there is provided a motion vector estimating apparatus for extracting pixel data of a block (template block) to be encoded in a current image and pixel data in a reference image serving as a prediction reference. A motion vector calculating means for calculating a motion vector of a block to be coded according to a predetermined evaluation function; and a control signal generating means for generating a signal for controlling a motion vector search range of the motion vector calculating means. . This control signal generating means includes:
The code in response to the screen size selection signal for specifying one of a screen size of said display size of the processing start position indicating signal and multiple indicating the position of the start processing for the current video frame on the current video frame A position on the screen of a block to be converted is detected, and a control signal for preventing a motion vector calculating unit from calculating a motion vector deviating from the screen according to the detection result is generated.

【0073】[0073]

【0074】[0074]

【0075】[0075]

【0076】[0076]

【作用】請求項に係る動きベクトル検出装置において
は、制御信号発生手段は、画面サイズ選択信号と現画像
画面についての処理開始位置指示信号とに従って符号化
されるべきブロックの画面上での位置を検出して動きベ
クトル算出手段の動きベクトル探索範囲を制限してい
る。このため、4種類のブロック位置指示信号を用いる
ことなく動きベクトルの探索範囲を制限することができ
るとともに、複数種類の画面サイズに対しても確実に符
号化されるブロックの画面位置を特定することができ、
確実に動きベクトルを算出することができる。
[Action] In the motion vector detecting device according to claim 1, the control signal generating means, the screen size selection signal and the current image
The position on the screen of the block to be coded is detected in accordance with the processing start position instruction signal for the screen to limit the motion vector search range of the motion vector calculation means. Therefore, the search range of the motion vector can be limited without using the four types of block position indication signals, and the screen position of the block to be coded with respect to a plurality of types of screen sizes can be reliably specified. Can be
The motion vector can be calculated reliably.

【0077】[0077]

【0078】[0078]

【実施例】(i) 実施例1 図1はこの発明の第1の実施例である動きベクトル検出
装置の全体の構成を示すブロック図である。図1におい
て、動きベクトル検出装置1は、信号線3を介して与え
られるサーチウィンドデータSDと、信号線4を介して
与えられるテンプレートデータTDとを受け、このテン
プレートデータTDを含むテンプレートブロックに対す
る動きベクトルを算出する動きベクトル算出部2と、信
号線8を介して与えられるフレーム動機信号φFSに応
答して動きベクトル算出部2の動きベクトル算出動作を
制御する信号を信号線7上に発生する端ブロック制御部
6を含む。以下の説明においては、サーチエリア内画素
データをサーチウィンドデータと称し、テンプレートブ
ロック内画素データをテンプレートデータと称す。
Embodiment (i) Embodiment 1 FIG. 1 is a block diagram showing the overall configuration of a motion vector detecting device according to a first embodiment of the present invention. In FIG. 1, a motion vector detecting device 1 receives search window data SD provided via a signal line 3 and template data TD provided via a signal line 4, and performs a motion on a template block including the template data TD. A motion vector calculation unit 2 for calculating a vector, and an end for generating a signal on a signal line 7 for controlling a motion vector calculation operation of the motion vector calculation unit 2 in response to a frame motive signal φFS given via a signal line 8. A block control unit 6 is included. In the following description, pixel data in the search area is referred to as search window data, and pixel data in the template block is referred to as template data.

【0079】動きベクトル算出部2からは、信号線5上
に動きベクトルmvが出力される。このとき動きベクト
ルmvに関連する評価値(f)が併せて出力されてもよ
い。端ブロック制御部6は、動きベクトル算出部2が、
テンプレートブロック(信号線4を介して与えられるテ
ンプレートデータを含むブロック)に対する動きベクト
ル算出時において、動きベクトル算出部2が、画面から
逸脱した動きベクトルを算出するのを防止するような制
御信号を発生する。
The motion vector calculator 2 outputs a motion vector mv on the signal line 5. At this time, the evaluation value (f) related to the motion vector mv may be output together. The end block control unit 6 determines that the motion vector calculation unit 2
When calculating a motion vector for a template block (a block including template data given via the signal line 4), the motion vector calculation unit 2 generates a control signal for preventing calculation of a motion vector deviating from the screen. I do.

【0080】図2は、図1に示す端ブロック制御部の構
成を示すブロック図である。図2において、端ブロック
制御部6は、信号線8上のフレーム同期信号φFSに従
ってテンプレートブロックの画面上の位置を検出する位
置検出部61と、位置検出部61からの位置指示信号に
応答して動きベクトル算出部2へ制御信号を発生する制
御信号発生部62を含む。フレーム同期信号φFSは、
現画像画面の特定のブロック位置を示す信号であればよ
い。好ましくは、このフレーム同期信号φFSは、現画
像画面の最初に処理されるテンプレートブロックを示す
信号である。
FIG. 2 is a block diagram showing a configuration of the end block control unit shown in FIG. In FIG. 2, an end block control unit 6 detects a position of a template block on a screen according to a frame synchronization signal φFS on a signal line 8, and responds to a position instruction signal from the position detection unit 61. A control signal generator 62 for generating a control signal to the motion vector calculator 2 is included. The frame synchronization signal φFS is
Any signal indicating a specific block position on the current image screen may be used. Preferably, this frame synchronization signal φFS is a signal indicating a template block to be processed first in the current image screen.

【0081】位置検出部61は、このフレーム同期信号
φFSに従って初期位置を検出し、クロック信号φCK
に従ってテンプレートブロックの画面上の位置を検出す
る。このクロック信号φCKは、テンプレートブロック
の各動きベクトル算出シーケンスの最初のサイクルで与
えられるブロック指示信号であってもよい。また、この
クロック信号φCKは、動きベクトル算出部2へ与えら
れるクロック信号CLK(画素信号(サーチウィンドデ
ータおよびテンプレートデータ)の入力および動きベク
トル算出の動作サイクルを規定するクロック信号)を所
定回数カウントアップしたときに発生される信号であっ
てもよい。変位ベクトルの範囲(サーチエリア)が予め
定められており、クロック信号CLKの各サイクルにお
いて1つの変位ベクトルに対する評価値が算出される構
成の場合、クロック信号CLKを用いてテンプレートブ
ロックの画面上位置を算出することができる。次に具体
的動作について説明する。
The position detecting section 61 detects an initial position according to the frame synchronization signal φFS, and outputs a clock signal φCK.
, The position of the template block on the screen is detected. This clock signal φCK may be a block instruction signal given in the first cycle of each motion vector calculation sequence of the template block. The clock signal φCK counts up a predetermined number of times of a clock signal CLK (a clock signal defining an input cycle of a pixel signal (search window data and template data) and an operation cycle of motion vector calculation) supplied to the motion vector calculation unit 2. The signal may be a signal generated when the operation is performed. In a configuration in which the range of the displacement vector (search area) is predetermined and the evaluation value for one displacement vector is calculated in each cycle of the clock signal CLK, the position of the template block on the screen is determined using the clock signal CLK. Can be calculated. Next, a specific operation will be described.

【0082】今、図3に示すように画面100を3行6
列の18個のブロックMB1〜MB18に分割した画面
サイズを考える。ブロックMB1〜MB18は、その付
された番号に従った順に処理が実行される。このマクロ
ブロックMB1〜MB18各々は、画面100が現画像
フレームを示す場合には、テンプレートブロックに対応
する。処理の順序はマクロブロックMB1から始まって
マクロブロックMB18で終るものとする。図3に示す
ように画面100を18個のブロックに分割した場合、
各ブロックの属性(端ブロックの種類)は図4に示すよ
うになる。
Now, as shown in FIG.
Consider a screen size divided into 18 blocks MB1 to MB18 in a column. The processing of the blocks MB1 to MB18 is executed in the order according to the assigned numbers. Each of the macro blocks MB1 to MB18 corresponds to a template block when the screen 100 indicates the current image frame. It is assumed that the processing order starts from the macroblock MB1 and ends with the macroblock MB18. When the screen 100 is divided into 18 blocks as shown in FIG.
The attributes (the types of end blocks) of each block are as shown in FIG.

【0083】図4は、画面100における端ブロックの
分布を示す図である。図4において、符号Lは左端ブロ
ックを示し、符号Rは右端ブロックを示し、Uは上端ブ
ロックを示し。符号Bは下端ブロックを示す。したがっ
て、図3に示すマクロブロックとの対応関係で説明する
と、最初に処理されるマクロブロックMB1は、左端ブ
ロックLに属しかつ上端ブロックUに属する。マクロブ
ロックMB2〜MB5は上端ブロックUに属する。マク
ロブロックMB6、MB12は右端ブロックRに属し、
マクロブロックMB7は左端ブロックLに属する。マク
ロブロックMB8〜MB11は、端ブロックではない。
マクロブロックMB13は、左端ブロックLに属しかつ
下端ブロックBに属する。マクロブロックMB14〜M
B17は下端ブロックBに属する。マクロブロックMB
18は右端ブロックRに属しかつ下端ブロックBに属す
る。
FIG. 4 is a diagram showing the distribution of end blocks on the screen 100. In FIG. 4, reference symbol L indicates a left end block, reference symbol R indicates a right end block, and U indicates an upper end block. Symbol B indicates a lower end block. Therefore, to explain the relationship with the macroblock shown in FIG. 3, the macroblock MB1 processed first belongs to the left end block L and belongs to the upper end block U. The macro blocks MB2 to MB5 belong to the upper end block U. The macro blocks MB6 and MB12 belong to the rightmost block R,
The macro block MB7 belongs to the left end block L. Macro blocks MB8 to MB11 are not end blocks.
The macro block MB13 belongs to the left end block L and belongs to the lower end block B. Macro blocks MB14 to M
B17 belongs to the lower end block B. Macro block MB
18 belongs to the right end block R and the bottom end block B.

【0084】図5は、図3に示す画面100における各
マクロブロックMB1〜MB18に対する動きベクトル
の無効範囲を一覧にして示す図である。図5に示すよう
に、マクロブロックMB1〜MB18はそれぞれその番
号順に従って処理が行なわれる。マクロブロックMB1
はその動きベクトルの水平および垂直成分がともに負の
領域が無効範囲となる。マクロブロックMB2〜MB5
は、動きベクトルの垂直成分の負の領域が無効範囲とな
る。マクロブロックMB6は、動きベクトルの水平成分
の正の範囲が無効範囲となりまた垂直成分の負の範囲が
無効範囲となる。マクロブロックMB7は、動きベクト
ルの水平成分が無効範囲となる。マクロブロックMB8
〜MB11については動きベクトル成分の無効範囲が存
在しない。
FIG. 5 is a diagram showing a list of invalid ranges of motion vectors for each of the macroblocks MB1 to MB18 on the screen 100 shown in FIG. As shown in FIG. 5, the macroblocks MB1 to MB18 are processed according to their numerical order. Macro block MB1
The area in which the horizontal and vertical components of the motion vector are both negative is the invalid range. Macro blocks MB2 to MB5
Is, the negative range of the vertical component of the motion vector is the invalid range. In the macro block MB6, the positive range of the horizontal component of the motion vector is an invalid range, and the negative range of the vertical component is an invalid range. In the macro block MB7, the horizontal component of the motion vector is in an invalid range. Macro block MB8
There is no invalid range of the motion vector component for ~ MB11.

【0085】マクロブロックMB12に対しては、動き
ベクトルの水平成分の正の範囲が無効範囲となる。マク
ロブロックMB13については、水平成分の負の領域が
無効範囲となりまた垂直成分の正の領域が無効範囲とな
る。マクロブロックMB14〜MB17については動き
ベクトルの垂直成分の正の領域が無効範囲となる。マク
ロブロックMB18については、動きベクトルの水平成
分の正の範囲または垂直成分の正の範囲が無効範囲とな
る。次に、この動きベクトル検出装置の動作について説
明する。
For the macro block MB12, the positive range of the horizontal component of the motion vector is the invalid range. For the macroblock MB13, the negative region of the horizontal component is the invalid range, and the positive region of the vertical component is the invalid range. For the macroblocks MB14 to MB17, the positive region of the vertical component of the motion vector is the invalid range. For the macroblock MB18, the positive range of the horizontal component or the positive range of the vertical component of the motion vector is the invalid range. Next, the operation of the motion vector detecting device will be described.

【0086】図2に示す位置検出部61は、フレーム同
期信号φFSがアサートされる(有効状態となる)と、
動きベクトル算出部2において処理されるテンプレート
ブロックが、画面100における最初の処理ブロック、
すなわちマクロブロックMB1であることを検出する。
このフレーム同期信号φFSのアサートに応答して、位
置検出部61は、画面100における左上端のブロッ
ク、すなわちマクロブロックMB1を示す位置指示信号
を制御信号発生部62へ与える。
When the frame synchronization signal φFS is asserted (enabled), the position detector 61 shown in FIG.
The template block processed by the motion vector calculation unit 2 is the first processing block on the screen 100,
That is, it is detected that the block is the macro block MB1.
In response to the assertion of the frame synchronization signal φFS, the position detecting section 61 supplies a control signal generating section 62 with a position indicating signal indicating the upper left block on the screen 100, that is, the macroblock MB1.

【0087】制御信号発生部62は、この位置検出部6
1からの位置指示信号に応答して、信号線7上に動きベ
クトル無効指示信号を発生する。動きベクトル算出部2
は、この制御信号発生部62からの動きベクトル無効指
示信号に従って無効範囲に対する動きベクトルの探索動
作が禁止される。
The control signal generator 62 is provided with the position detector 6
In response to the position indicating signal from the control signal No. 1, a motion vector invalidating signal is generated on the signal line 7. Motion vector calculation unit 2
In accordance with the motion vector invalidity instruction signal from the control signal generator 62, the motion vector search operation for the invalid range is prohibited.

【0088】位置検出部61は、新たなブロックに対す
る動きベクトル算出が行なわれることを示す信号φCK
に従って、次のマクロブロックMB2をテンプレートブ
ロックとする動きベクトル検出が行なわれることを識別
し、そのテンプレートブロックの位置を示す信号を制御
信号発生部62へ与える。以降、位置検出部61からの
ブロック位置指示信号に従って制御信号発生部62は、
画面から逸脱する動きベクトルの検出を防止するように
動きベクトル無効指示信号を発生する。この構成によ
り、図28および図29において破線で示した無効領域
に対する動きベクトルの探索が禁止される。
The position detector 61 outputs a signal φCK indicating that a motion vector is to be calculated for a new block.
, The motion vector detection using the next macroblock MB2 as a template block is performed, and a signal indicating the position of the template block is supplied to the control signal generator 62. Thereafter, according to the block position indication signal from the position detection unit 61, the control signal generation unit 62
A motion vector invalidation instruction signal is generated so as to prevent detection of a motion vector deviating from the screen. With this configuration, search for a motion vector for an invalid area indicated by a broken line in FIGS. 28 and 29 is prohibited.

【0089】図6は、図1および図2に示す端ブロック
制御部の具体的構成を示す図である。この端ブロック制
御部6は、図2に示すように位置検出部61と制御信号
発生部62を含む。位置検出部61は、信号線8を介し
て与えられるフレーム同期信号φFSに応答してリセッ
トされ、ブロック指示信号φCKをカウントし、処理中
のテンプレートブロックの番号を示す信号を発生する水
平ブロックカウンタ12と、水平ブロックカウンタ12
から信号線15上に与えられる水平同期信号(カウント
アップ信号)をカウントし、垂直方向についてのブロッ
ク位置を示す信号を発生する垂直ブロックカウンタ11
を含む。
FIG. 6 is a diagram showing a specific configuration of the end block control unit shown in FIGS. The end block control section 6 includes a position detection section 61 and a control signal generation section 62 as shown in FIG. The position detector 61 is reset in response to the frame synchronization signal φFS provided via the signal line 8, counts the block instruction signal φCK, and generates a signal indicating the number of the template block being processed. And the horizontal block counter 12
The vertical block counter 11 counts a horizontal synchronizing signal (count-up signal) provided on a signal line 15 from the controller and generates a signal indicating a block position in the vertical direction.
including.

【0090】ブロック指示信号φCKは、動き算出部2
へ与えられるテンプレートデータが1つのテンプレート
ブロックに含まれることを示す信号である。垂直ブロッ
クカウンタ11は、また、フレーム同期信号φFSによ
りリセットされる。動きベクトル算出部2は、このブロ
ック指示信号φCKが与えられると新たなテンプレート
ブロックについての動きベクトル算出を行なうことが指
令されたことを識別し、その内部で評価値のリセットを
行なって新たな評価値の算出および動きベクトル算出動
作を実行する。
The block instruction signal φCK is supplied to the motion calculation unit 2
Is a signal indicating that the template data given to the template block is included in one template block. The vertical block counter 11 is reset by the frame synchronization signal φFS. When the block instruction signal φCK is given, the motion vector calculation unit 2 identifies that it has been instructed to calculate a motion vector for a new template block, resets the evaluation value therein, and performs a new evaluation. A value calculation and a motion vector calculation operation are executed.

【0091】信号線15上に与えられる水平同期信号φ
Hは水平ブロックカウンタ12が水平方向のブロック数
(本実施例においては6個)をカウントし、初期値に戻
るときに発生される信号である。
Horizontal synchronizing signal φ applied on signal line 15
H is a signal generated when the horizontal block counter 12 counts the number of blocks in the horizontal direction (six in this embodiment) and returns to the initial value.

【0092】位置検出部61はさらに水平ブロックカウ
ンタ12から信号線16上に与えられるカウント値を予
め定められた値と比較する左端コンパレータ13cおよ
び右端コンパレータ13dと、垂直ブロックカウンタ1
1から信号線17上に与えられるカウント値を所定の値
と比較する上端コンパレータ13aおよび下端コンパレ
ータ13bを含む。上端コンパレータ13aから信号線
18a上に上端ブロック指示信号φUEが発生される。
下端コンパレータ13bから下端ブロック指示信号φL
Eが信号線18b上に発生される。左端コンパレータ1
3cから、左端ブロック指示信号φLEが信号線18c
上に伝達される。右端コンパレータ13dから信号線1
8d上に右端ブロック指示信号φREが発生される。
The position detecting section 61 further includes a left end comparator 13c and a right end comparator 13d for comparing the count value given from the horizontal block counter 12 on the signal line 16 with a predetermined value, and the vertical block counter 1
It includes an upper comparator 13a and a lower comparator 13b for comparing the count value given from 1 to the signal line 17 with a predetermined value. The upper end comparator 13a generates an upper end block instruction signal φUE on the signal line 18a.
The lower end block instruction signal φL is output from the lower end comparator 13b.
E is generated on signal line 18b. Left end comparator 1
3c, the left end block instruction signal φLE is
Conveyed on. Signal line 1 from right end comparator 13d
A right end block designating signal φRE is generated on 8d.

【0093】図7はこの図6に示すコンパレータ13a
〜13dの構成を具体的に示す図である。図7におい
て、上端コンパレータ13aは、カウント値“0(10
進数)”を記憶する0記憶レジスタ50aと、信号線1
7上の垂直ブロックカウンタ11の出力カウント値と0
記憶レジスタ50aの記憶値との一致を検出する一致検
出器52aを含む。信号線17上の垂直ブロックカウン
タ11からのカウント値が0のとき一致検出器52aか
ら上端ブロック指示信号φUEが発生される(アサート
される)。
FIG. 7 shows the comparator 13a shown in FIG.
It is a figure which shows the structure of 13d specifically. In FIG. 7, the upper end comparator 13a outputs the count value “0 (10
0), a 0 storage register 50a for storing “
7, the output count value of the vertical block counter 11 and 0
It includes a coincidence detector 52a for detecting coincidence with the value stored in the storage register 50a. When the count value from the vertical block counter 11 on the signal line 17 is 0, the coincidence detector 52a generates (asserts) the upper block instruction signal φUE.

【0094】下端コンパレータ13bは、“2(10進
数)”を記憶する2記憶レジスタ50bと、2記憶レジ
スタ50bの記憶値と信号線17上のカウント値との一
致を検出する一致検出器52bを含む。垂直ブロックカ
ウンタ11から信号線17上に与えられるカウント値が
“2(10進数)”となったときに一致検出器52bは
下端ブロック指示信号φBEを発生する。
The lower comparator 13b includes a two-storage register 50b for storing "2 (decimal number)" and a coincidence detector 52b for detecting coincidence between the stored value of the two-storage register 50b and the count value on the signal line 17. Including. When the count value given from the vertical block counter 11 on the signal line 17 becomes "2 (decimal number)", the coincidence detector 52b generates the lower end block instruction signal φBE.

【0095】左端コンパレータ13cは、“0(10進
数)”を記憶する0記憶レジスタ50cと、信号線16
上の水平ブロックカウンタ12からのカウント値と0記
憶レジスタ50cの記憶値との一致を検出する一致検出
器52cを含む。水平ブロックカウンタのカウント値が
“0(10進数)”のとき一致検出器52cから左端ブ
ロック指示信号φLEが発生される。
The left end comparator 13c is provided with a 0 storage register 50c for storing "0 (decimal number)" and a signal line 16
A coincidence detector 52c for detecting coincidence between the count value from the upper horizontal block counter 12 and the value stored in the 0 storage register 50c is included. When the count value of the horizontal block counter is "0 (decimal number)", the coincidence detector 52c generates the left end block instruction signal φLE.

【0096】右端コンパレータ13dは、“5(10進
数)”を記憶する5記憶レジスタ50dと、信号線16
上の水平プロジェクタカウンタのカウント値と5記憶レ
ジスタ50dの記憶値との一致を検出する一致検出器5
2dを含む。水平ブロックカウンタ12の出力カウント
値が“5(10進数)”となったときに一致検出器52
dから右端ブロック指示信号φREが発生される。
The right end comparator 13d comprises a five storage register 50d for storing "5 (decimal number)" and a signal line 16
A match detector 5 for detecting a match between the count value of the upper horizontal projector counter and the value stored in the 5 storage register 50d.
2d. When the output count value of the horizontal block counter 12 becomes “5 (decimal number)”, the coincidence detector 52
The right end block instruction signal φRE is generated from d.

【0097】図6に示す動きベクトル無効判定回路14
は、このコンパレータ13a〜13dからの信号φU
E、φBE、φLE、およびφREに従って動きベクト
ル算出部における動きベクトルの検索範囲を制御する。
この動きベクトル無効判定回路14から発生される動き
ベクトル無効信号は図5に示す論理を備える。
The motion vector invalidity judgment circuit 14 shown in FIG.
Is the signal φU from the comparators 13a to 13d.
The search range of the motion vector in the motion vector calculation unit is controlled according to E, φBE, φLE, and φRE.
The motion vector invalid signal generated from the motion vector invalid determination circuit 14 has the logic shown in FIG.

【0098】次にこの図6に示す位置検出部の動作をそ
のタイミングチャート図である図8を参照して説明す
る。
Next, the operation of the position detector shown in FIG. 6 will be described with reference to the timing chart of FIG.

【0099】新しい画面が与えられ、最初の画素ブロッ
ク(図3のマクロブロックMB1)が処理されるとき、
フレーム同期信号φFSがアサートされる。このフレー
ム信号φFSのアサートに応答して、水平ブロックカウ
ンタ12および垂直ブロックカウンタ11がリセットさ
れ、そのカウント値は“0”となる。これに応答して、
上端コンパレータ13aの出力φUEおよび左端コンパ
レータ13cの出力φLBが活性状態の“H”となる。
この状態で、最初の画素ブロック(テンプレートブロッ
ク)に対する動きベクトルの算出が実行される。この動
きベクトルの算出においては動きベクトル無効判定回路
14により動きベクトル探索範囲が制限される。
When a new screen is provided and the first pixel block (macroblock MB1 in FIG. 3) is processed,
The frame synchronization signal φFS is asserted. In response to the assertion of the frame signal φFS, the horizontal block counter 12 and the vertical block counter 11 are reset, and their count values become “0”. In response,
The output φUE of the upper-end comparator 13a and the output φLB of the left-end comparator 13c become active “H”.
In this state, the calculation of the motion vector for the first pixel block (template block) is executed. In calculating the motion vector, the motion vector search range is limited by the motion vector invalidity determination circuit 14.

【0100】水平ブロックカウンタ12は、クロック信
号φCKに従って、画素ブロック単位で画面上の水平位
置のブロックの位置をカウントする。この水平ブロック
カウンタ12がカウントするクロック信号φCKは、動
きベクトル算出部が利用する動作タイミング規定用のク
ロック信号CLKであってもよく、テンプレートブロッ
クの開始を示すブロック指示信号であってもよい。また
このクロック信号φCKは、サーチエリアに含まれるサ
ーチウィンドブロック(参照画素ブロック)の区切りを
示す信号(1つの評価値算出動作のサイクルを規定する
信号)であってもよい。いずれであっても画面上の水平
位置に関するブロック位置を検出することができる。
The horizontal block counter 12 counts the position of a horizontal block on the screen in units of pixel blocks according to the clock signal φCK. The clock signal φCK counted by the horizontal block counter 12 may be a clock signal CLK for defining operation timing used by the motion vector calculation unit, or may be a block instruction signal indicating the start of a template block. The clock signal φCK may be a signal (a signal defining a cycle of one evaluation value calculation operation) indicating a break of a search window block (reference pixel block) included in the search area. In any case, the block position with respect to the horizontal position on the screen can be detected.

【0101】水平ブロックカウンタ12からは、そのカ
ウントアップ完了後信号線15上に水平同期信号φHが
発生され、垂直ブロックカウンタ11へ与えられる。垂
直ブロックカウンタ11は、この信号線15上の水平同
期信号φHをカウントし、画面上の垂直方向についての
ブロックの位置をカウントする。
The horizontal block counter 12 generates a horizontal synchronizing signal φH on the signal line 15 after the count-up is completed, and supplies it to the vertical block counter 11. The vertical block counter 11 counts the horizontal synchronization signal φH on the signal line 15 and counts the position of the block on the screen in the vertical direction.

【0102】水平ブロックカウンタ12のカウント値が
左端ブロックを示しているとき、左端コンパレータ13
cの出力φLEが活性状態となる。右端コンパレータ1
3dは、水平ブロックカウンタ12の出力が対応のブロ
ックが右端(カウント値“5”)のとき信号φREを活
性状態とする。
When the count value of the horizontal block counter 12 indicates the left end block, the left end comparator 13
The output φLE of c is activated. Right end comparator 1
3d activates the signal φRE when the output of the horizontal block counter 12 is at the right end (count value “5”) of the corresponding block.

【0103】上端コンパレータ13aは、水平ブロック
カウンタ11のカウント値が上端ブロックを示す(カウ
ント値“0”)のとき信号φUEを活性状態とする。下
端コンパレータ13bは、垂直ブロックカウンタ11の
出力が下端ブロックを示す(カウント値“2”)とき信
号φBEを活性状態とする。
The upper end comparator 13a activates the signal φUE when the count value of the horizontal block counter 11 indicates the upper end block (count value “0”). The lower end comparator 13b activates the signal φBE when the output of the vertical block counter 11 indicates the lower end block (count value “2”).

【0104】動きベクトル無効判定回路14は、このコ
ンパレータ13a〜13dの出力φUE、φBE、φL
E、およびφREを受け、処理中のブロック(テンプレ
ートブロック)が端ブロックである場合に動きベクトル
算出部2が無効な動きベクトルを探索しないように制御
する信号(動きベクトル無効指示信号)を発生して動き
ベクトル算出部2へ与える。
The motion vector invalidity judging circuit 14 outputs the outputs φUE, φBE, φL of the comparators 13a to 13d.
In response to E and φRE, when the block being processed (template block) is an end block, the motion vector calculation unit 2 generates a signal (motion vector invalid instruction signal) for controlling not to search for an invalid motion vector. To the motion vector calculation unit 2.

【0105】上述のように、上端コンパレータ13aお
よび下端コンパレータ13bからの出力φUEおよびφ
BEは、1水平期間(ブロック単位での)の間活性状態
となり、左端コンパレータ13cおよび右端コンパレー
タ13dの出力φLEおよびφREは1ブロック処理サ
イクルの間活性状態となる。
As described above, the outputs φUE and φUE from upper end comparator 13a and lower end comparator 13b
BE is active for one horizontal period (in units of blocks), and the outputs φLE and φRE of the left end comparator 13c and the right end comparator 13d are active for one block processing cycle.

【0106】動きベクトル無効判定回路14からの出力
信号7の内容は、動きベクトル算出部の構成に従って異
なる。この動きベクトル無効判定回路14の構成例につ
いて簡単に説明する。
The content of the output signal 7 from the motion vector invalidity determination circuit 14 differs according to the configuration of the motion vector calculation section. A configuration example of the motion vector invalidity determination circuit 14 will be briefly described.

【0107】図9(A)は変位ベクトルに対応して配置
されるプロセサを含むプロセサアレイを利用する動きベ
クトル検出装置の構成を示す図である。プロセサアレイ
966と動きベクトル検出部960との間に動きベクト
ル無効判定回路14からの出力信号7を受けてプロセサ
Pijの出力を無効化する無効化回路70が設けられ
る。プロセサアレイ966は、4つの領域#1、#2、
#3および#4を含む。このプロセサアレイ966の領
域#1〜#4は、動きベクトル(変位ベクトル)の垂直
および水平成分VCおよびHCの正および負に応じて分
割される。無効化回路70はこのプロセサアレイ966
の各ブロック単位でプロセサの出力する歪値の有効化/
無効化を実行する。動きベクトル検出部968は、この
無効化回路70を介して与えられる歪値を受け、この歪
値の最小値を与えるプロセサに対応する変位ベクトルを
動きベクトルmvとして出力する。
FIG. 9A is a diagram showing a configuration of a motion vector detecting device using a processor array including a processor arranged corresponding to a displacement vector. An invalidation circuit 70 is provided between the processor array 966 and the motion vector detection unit 960 to invalidate the output of the processor Pij upon receiving the output signal 7 from the motion vector invalidation determination circuit 14. The processor array 966 has four regions # 1, # 2,
# 3 and # 4 are included. The areas # 1 to # 4 of the processor array 966 are divided according to the positive and negative of the vertical and horizontal components VC and HC of the motion vector (displacement vector). The invalidation circuit 70 is provided with the processor array 966.
Of the distortion value output by the processor in each block unit of /
Perform invalidation. The motion vector detection unit 968 receives the distortion value given through the invalidation circuit 70, and outputs a displacement vector corresponding to the processor giving the minimum value of the distortion value as a motion vector mv.

【0108】図9(B)に無効化回路70の構成の一例
を示す。無効化回路70は、プロセサPijからの歪値
Dijと固定値レジスタ72に格納される固定値(最大
の歪値を与える固定値)とを信号線7上に与えられる信
号に応答して選択的に通過させる切換回路74を含む。
固定値レジスタ72は、図9(A)に示すブロックそれ
ぞれに対応して設けられる。
FIG. 9B shows an example of the configuration of the invalidation circuit 70. The invalidating circuit 70 selectively converts the distortion value Dij from the processor Pij and the fixed value stored in the fixed value register 72 (the fixed value giving the maximum distortion value) in response to a signal provided on the signal line 7. And a switching circuit 74 for allowing the signal to pass through.
The fixed value registers 72 are provided corresponding to the respective blocks shown in FIG.

【0109】プロセサアレイ966から1列ずつプロセ
サPijの出力が読出されて動きベクトル検出部960
へ与えられる構成の場合、信号線7上の信号は、ブロッ
ク単位でプロセサの出力する歪値の有効化/無効化を指
定する。たとえば符号化されるべきブロック(テンプレ
ートブロック)が左上端部のブロックの場合、信号線7
上に与えられる信号に応答して無効化回路70は、ブロ
ック#1、#2、および#3のプロセサから与えられる
歪値Dijを無効状態とする。この場合、各列ごとにプ
ロセサの格納する歪値が読出されるため、列の数をカウ
ントすることによりブロックの境界(水平方向につい
て)を識別することができるため、確実に不要な変位ベ
クトルを無効状態とすることができる。
The outputs of the processors Pij are read out one by one from the processor array 966, and the motion vector detector 960 is read out.
In the case of the configuration given to, the signal on the signal line 7 specifies the enable / disable of the distortion value output from the processor in block units. For example, if the block to be coded (template block) is the upper left block, the signal line 7
In response to the signal given above, the invalidation circuit 70 invalidates the distortion value Dij supplied from the processors of the blocks # 1, # 2, and # 3. In this case, since the distortion value stored in the processor is read for each column, the boundary of the block (in the horizontal direction) can be identified by counting the number of columns. It can be in an invalid state.

【0110】図10(A)および(B)はこのプロセサ
アレイを利用する動きベクトル検出装置において利用さ
れる動きベクトル無効判定回路の構成および動作を示す
図である。図10(A)において、動きベクトル無効判
定回路62はプロセサアレイから1列の歪値データを読
出すタイミングを与えるクロック信号CLKをカウント
するカウンタ110と、カウンタ110のカウント値を
所定の値と比較する比較器112および114とを含
む。比較器112は、右端ブロック指示信号φREに応
答して活性化され、一方、比較器114は、左端ブロッ
ク指示信号φLEに応答して活性化される。比較器11
2は、カウンタ110のカウント値が所定値を超えると
その出力信号φRを不活性状態とする。比較器114
は、カウンタ110のカウント値が所定値を超えるとそ
の出力信号φLを活性状態とする。
FIGS. 10A and 10B are diagrams showing the configuration and operation of a motion vector invalidity determination circuit used in a motion vector detection device using this processor array. In FIG. 10A, a motion vector invalidity determination circuit 62 counts a clock signal CLK for giving a timing to read out one column of distortion value data from the processor array, and compares the count value of the counter 110 with a predetermined value. And comparators 112 and 114 that perform the operations. Comparator 112 is activated in response to right end block designating signal φRE, while comparator 114 is activated in response to left end block designating signal φLE. Comparator 11
2 makes the output signal φR inactive when the count value of the counter 110 exceeds a predetermined value. Comparator 114
Activates its output signal φL when the count value of counter 110 exceeds a predetermined value.

【0111】動きベクトル無効判定回路62は、さらに
比較器112および114の出力φRおよびφLと、上
端ブロック指示信号φUEを受けるOR回路116と、
信号φR、φLおよび下端ブロック指示信号φBEを受
けるOR回路112を含む。
Motion vector invalidity determination circuit 62 further includes outputs φR and φL of comparators 112 and 114, an OR circuit 116 receiving upper end block instruction signal φUE,
An OR circuit 112 receives signals φR, φL and lower end block instruction signal φBE.

【0112】図10(B)に示すように、OR回路11
6の出力φ1は、プロセサアレイの上側半分のブロック
に対して設けられた切換回路70aへ与えられる。信号
φ2は、プロセサアレイの下側半分のブロックに対して
設けられた切換回路70bへ与えられる。次に動作につ
いて簡単に説明する。図10(B)においては、各信号
が活性状態となった場合を示す。現在符号化されている
ブロック(テンプレートブロック)の画面上での位置に
応じて対応の信号が活性状態となる。プロセサアレイか
らは、1列のプロセサが格納する歪値Dijがクロック
信号CLKに応答して出力される。
As shown in FIG. 10B, the OR circuit 11
The output φ1 of 6 is supplied to a switching circuit 70a provided for the upper half block of the processor array. Signal φ2 is applied to switching circuit 70b provided for the lower half block of the processor array. Next, the operation will be briefly described. FIG. 10B shows a case where each signal is activated. The corresponding signal is activated according to the position on the screen of the currently coded block (template block). From the processor array, the distortion value Dij stored by the processor in one column is output in response to the clock signal CLK.

【0113】信号φREが活性状態のときブロック#2
および#4のプロセサから歪値が読出される期間、信号
φRが活性状態となる。信号φLEが活性状態の場合に
は、ブロック#1および#3から歪値が読出される期間
信号φLが活性状態となる。
Block # 2 when signal φRE is active
During the period when the distortion value is read out from the processor # 4 and the signal φR, the signal φR is activated. When signal φLE is in an active state, signal φL is in an active state during a period in which a distortion value is read from blocks # 1 and # 3.

【0114】信号φUEおよびφBEは、このテンプレ
ートブロックに対する動きベクトル検出期間中、活性状
態となる。OR回路116および118から出力される
信号φ1およびφ2に従って、所望のプロセサブロック
の出力を無効状態とすることができる。たとえばテンプ
レートブロックが左上端ブロックの場合、信号φLおよ
びφUEが活性状態の“H”となる。この場合、ブロッ
ク#4(動きベクトルの水平および垂直成分がともに正
の領域)のデータのみが有効とされて動きベクトル検出
部へ与えられる。他の場合についても同様である。
Signals φUE and φBE are active during the motion vector detection period for this template block. According to signals φ1 and φ2 output from OR circuits 116 and 118, an output of a desired processor block can be made invalid. For example, when the template block is the upper left block, the signals φL and φUE are in the active state “H”. In this case, only the data of block # 4 (the area where the horizontal and vertical components of the motion vector are both positive) are validated and provided to the motion vector detection unit. The same applies to other cases.

【0115】図11は動きベクトル検出装置の他の構成
を示す図である。図11において、動きベクトル算出部
2は、現画像メモリ940からテンプレートデータを読
出して格納するテンプレートブロックデータ格納部12
0と、参照画像メモリ942からそのサーチエリア内の
サーチウィンドデータを読出して格納するサーチウィン
ドブロックデータ格納部122と、テンプレートブロッ
クデータ格納部120に格納された画素データおよびサ
ーチウィンドブロックデータ格納部122に格納された
画素データに対し所定の評価関数を用いてこのテンプレ
ートブロックとサーチウィンドブロックの類似度を示す
評価値を算出する演算部124を含む。
FIG. 11 is a diagram showing another configuration of the motion vector detecting device. In FIG. 11, a motion vector calculation unit 2 reads a template data from a current image memory 940 and stores the template data.
0, a search window block data storage unit 122 for reading and storing search window data in the search area from the reference image memory 942, and pixel data and search window block data storage units 122 stored in the template block data storage unit 120. And a calculation unit 124 that calculates an evaluation value indicating the similarity between the template block and the search window block by using a predetermined evaluation function for the pixel data stored in.

【0116】テンプレートブロックデータ格納部12
0、サーチウィンドブロックデータ格納部122および
演算部124はテンプレートブロックそれぞれの画素デ
ータに対応して配置されたプロセサ内に分散的に配置さ
れてもよい。この場合、演算部124としては、評価関
数として差分絶対値和が用いられる場合、差分絶対値回
路がプロセサ内に分散され、総和回路のみが外部に設け
られてもよい。プロセサ内に差分絶対値和回路が配置さ
れてもよい。この構成の場合、各クロックサイクルにお
いて1つの変位ベクトルに対する評価値が生成される。
テンプレートブロックデータ格納部120においてテン
プレートブロックデータを固定的に格納しておき、サー
チウィンドブロックデータ格納部122へ順次異なる変
位ベクトルに対応するサーチウィンドブロックの画素デ
ータを格納する。このテンプレートブロックデータ格納
部120およびサーチウィンドブロックデータ格納部1
22はたとえばシフト機能を備えるレジスタを用いて構
成されてもよい。
Template block data storage unit 12
0, the search window block data storage unit 122 and the calculation unit 124 may be dispersedly arranged in processors arranged corresponding to the pixel data of each template block. In this case, when the sum of absolute differences is used as the evaluation function, the arithmetic unit 124 may be configured such that the absolute difference circuits are dispersed in the processor and only the sum circuit is provided outside. A difference absolute value sum circuit may be arranged in the processor. With this configuration, an evaluation value for one displacement vector is generated in each clock cycle.
The template block data is fixedly stored in the template block data storage unit 120, and the pixel data of the search window block corresponding to the different displacement vectors is sequentially stored in the search window block data storage unit 122. The template block data storage unit 120 and the search window block data storage unit 1
22 may be configured using a register having a shift function, for example.

【0117】動きベクトル算出部2は、さらに動きベク
トル無効判定回路から出力される信号線7上の動きベク
トル無効化信号に従って演算部124の出力を無効化す
る無効化回路126と、無効化回路126を介して与え
られる評価値(歪値)を受け、その最小の評価値(歪
値)に対応する変位ベクトルを動きベクトルmvとして
出力する比較部128を含む。無効化回路126は、信
号線7上に与えられる動きベクトル無効化指示信号に従
って演算部124の出力を無効状態とする。すなわち、
その演算部124の出力に変えて、固定された値(可能
な最大の歪値)を比較部128へ与える。比較部128
は、与えられた歪値データを既に格納している最小の歪
値と比較し、新たに与えられた歪値が先に格納した歪値
よりも小さい場合には、その歪値を新たに格納するとと
もに対応の動きベクトル(たとえばカウンタの出力)を
動きベクトル候補として格納する。したがってこの構成
においては、無効化回路126からは最大となる歪値が
出力されるため、比較部128における歪値および動き
ベクトル候補の更新は行なわれず、画面からはみ出す動
きベクトルが検出されることはない。
The motion vector calculation unit 2 further includes an invalidation circuit 126 for invalidating the output of the arithmetic unit 124 in accordance with the motion vector invalidation signal on the signal line 7 output from the motion vector invalidation determination circuit, and a nullification circuit 126 And a comparison unit 128 which receives an evaluation value (distortion value) given through the control unit and outputs a displacement vector corresponding to the minimum evaluation value (distortion value) as a motion vector mv. The invalidation circuit 126 invalidates the output of the arithmetic unit 124 in accordance with the motion vector invalidation instruction signal provided on the signal line 7. That is,
A fixed value (maximum possible distortion value) is provided to the comparing unit 128 instead of the output of the calculating unit 124. Comparison section 128
Compares the given distortion value data with the already stored minimum distortion value, and if the newly given distortion value is smaller than the previously stored distortion value, stores that distortion value newly At the same time, the corresponding motion vector (for example, the output of the counter) is stored as a motion vector candidate. Therefore, in this configuration, since the maximum distortion value is output from the invalidation circuit 126, the distortion value and the motion vector candidate are not updated in the comparing unit 128, and the motion vector that extends off the screen is not detected. Absent.

【0118】図12(A)および(B)は図11に示す
動きベクトル算出部に対する動きベクトル無効化信号を
生成するための動きベクトル無効判定回路の構成の一例
を示す図である。図12(A)において、制御信号発生
回路112は、評価値算出のタイミングを与えるクロッ
ク信号CLKをカウントする垂直カウンタ130と、垂
直カウンタ130のカウント値VCのカウントアップ信
号をカウントする水平カウンタ132を含む。
FIGS. 12A and 12B are diagrams showing an example of the configuration of a motion vector invalidation determination circuit for generating a motion vector invalidation signal for the motion vector calculating section shown in FIG. In FIG. 12A, a control signal generation circuit 112 includes a vertical counter 130 that counts a clock signal CLK that gives a timing for calculating an evaluation value, and a horizontal counter 132 that counts a count-up signal of a count value VC of the vertical counter 130. Including.

【0119】この構成においては、クロック信号CLK
の1サイクルにおいて1つの変位ベクトルに対する評価
値が算出される。またサーチエリア内のサーチウィンド
ブロックの走査方向は画面上部から下部へ向かった垂直
方向に沿って行なわれ、この方向におけるすべてのサー
チブロックの評価値の算出後再び1列水平方向にサーチ
ウィンドブロックをずらして同様に画面上部から下方向
に向かってサーチウィンドブロックの走査が行なわれ
る。この垂直カウンタ130のカウント値VCおよび水
平カウンタ132のカウント値HCがサーチウィンドブ
ロックの位置、すなわち動きベクトル候補となる変位ベ
クトルを示す。
In this configuration, clock signal CLK
In one cycle, the evaluation value for one displacement vector is calculated. The scanning direction of the search window block in the search area is performed in the vertical direction from the upper part to the lower part of the screen, and after calculating the evaluation values of all the search blocks in this direction, the search window block is again moved horizontally by one column. Similarly, the search window block is scanned from the upper part of the screen downward. The count value VC of the vertical counter 130 and the count value HC of the horizontal counter 132 indicate the position of the search window block, that is, a displacement vector that is a motion vector candidate.

【0120】制御信号発生部62はさらに、垂直カウン
タ130のカウント値VCを所定のカウント値と比較す
る比較器134および136と、水平カウンタ132の
カウント値HCを所定のカウント値と比較する比較器1
38および140と、比較器134、136、138お
よび140の出力を受けるOR回路142を含む。
Control signal generator 62 further includes comparators 134 and 136 for comparing count value VC of vertical counter 130 with a predetermined count value, and a comparator for comparing count value HC of horizontal counter 132 with a predetermined count value. 1
38 and 140, and an OR circuit 142 receiving the outputs of the comparators 134, 136, 138 and 140.

【0121】比較器134は上端ブロック指示信号φU
Eに応答して活性化され、垂直カウンタ130のカウン
ト値VCが所定値以下のときその出力φUを活性状態と
する。比較器136は、下端ブロック指示信号φBEに
応答して活性化され、垂直カウンタ130のカウント値
VCが所定のカウント値以上となったときその出力φB
を活性状態とする。比較器138は左端ブロック指示信
号φLEに応答して活性化され、水平カウンタ132の
カウント値HCが所定のカウント値以下のときその出力
信号φLを活性状態とする。比較器140は、右端ブロ
ック指示信号φREに応答して活性化され水平カウンタ
132のカウント値HCが所定のカウント値以上となっ
たときにその出力φRを活性状態とする。次に動作につ
いて図12(B)を参照して説明する。
The comparator 134 outputs an upper end block instruction signal φU
Activated in response to E, and when count value VC of vertical counter 130 is equal to or less than a predetermined value, its output φU is activated. The comparator 136 is activated in response to the lower end block instruction signal φBE, and outputs the output φB when the count value VC of the vertical counter 130 exceeds a predetermined count value.
To an active state. Comparator 138 is activated in response to left end block instruction signal φLE, and activates output signal φL thereof when count value HC of horizontal counter 132 is equal to or smaller than a predetermined count value. Comparator 140 is activated in response to right end block instruction signal φRE, and activates its output φR when count value HC of horizontal counter 132 exceeds a predetermined count value. Next, the operation will be described with reference to FIG.

【0122】図12(B)の(a)に示すように、サー
チエリアは9つのブロック#1〜#9に分割される。ブ
ロック#5はテンプレートブロックの位置に対応する。
サーチウィンドブロックの走査順序はブロック#1、#
4、および#7の順となる。1列ずつずらせて各サーチ
ウィンドブロックが生成されて評価値の算出が実行され
る。クロック信号CLK1サイクルごとに歪値(評価
値)Dが順次出力される。この算出動作の初期時におい
て、ブロック指示信号φBSが発生されて評価値算出動
作指示が指定され、垂直カウンタ130および水平カウ
ンタ132がリセットされる。
As shown in (a) of FIG. 12B, the search area is divided into nine blocks # 1 to # 9. Block # 5 corresponds to the position of the template block.
The search order of the search window block is block # 1, #
4, and # 7. Each search window block is generated by shifting one column at a time, and the calculation of the evaluation value is executed. The distortion value (evaluation value) D is sequentially output every cycle of the clock signal CLK. At the beginning of this calculation operation, a block instruction signal φBS is generated to specify an evaluation value calculation operation instruction, and the vertical counter 130 and the horizontal counter 132 are reset.

【0123】今、テンプレートブロックが左上端ブロッ
クである場合を考える。このとき信号φUEおよびφL
Eがともに活性状態の“L”となる。この状態において
は、図12(B)の(a)に示すブロック#1〜#7お
よび#2、ならびに#3内のブロックに含まれる画素デ
ータがサーチウィンドブロック内に含まれている場合に
は比較器134および比較器138の出力の一方または
双方がともに活性状態の“H”となる。ここで、ブロッ
ク#5は変位ベクトル(0,0)に対応するブロック位
置をも示す。サーチウィンドブロックの大きさとテンプ
レートブロックの大きさは同じであるとしており、垂直
方向の走査は、ブロック#7をサーチウィンドブロック
とした評価値算出が行なわれた場合、第1列に対する評
価値算出動作が完了する。この1列目の評価値算出動作
において、比較器134の出力φUはブロック#1に含
まれる画素データをサーチウィンドブロックが含んでい
る場合に活性状態となる。一方、比較138の出力φL
はこの間“H”の活性状態にある。水平カウンタ132
の出力HCは最小値であるためである。
Now, consider the case where the template block is the upper left block. At this time, the signals φUE and φL
E both become "L" in an active state. In this state, if the pixel data included in the blocks in blocks # 1 to # 7 and # 2, and # 3 shown in (a) of FIG. 12B is included in the search window block, One or both of the outputs of the comparator 134 and the comparator 138 go to the active state “H”. Here, block # 5 also indicates the block position corresponding to the displacement vector (0,0). It is assumed that the size of the search window block is the same as the size of the template block. In the vertical scanning, when the evaluation value calculation is performed using block # 7 as the search window block, the evaluation value calculation operation for the first column is performed. Is completed. In the evaluation value calculation operation of the first column, the output φU of the comparator 134 is activated when the search window block includes the pixel data included in the block # 1. On the other hand, the output φL of the comparison 138
Are in the active state of “H” during this time. Horizontal counter 132
Is the minimum value.

【0124】1列の評価値算出が完了すると、垂直カウ
ンタ130のカウント値VCが初期値へ復帰し、再度カ
ウント動作が実行される。この動作を以降繰り返す。サ
ーチウィンドブロックがブロック#2に重なると、比較
器138の出力φLが“L”の不活性状態となる。一方
このとき、比較134の出力φUは活性状態の“H”に
ある。したがって、左上端ブロックに対し、動きベクト
ル候補としての変位ベクトルが有効となるのはブロック
#5、#6、#8および#9の画素データを含むサーチ
ウィンドブロックに対してのみである。この領域は変位
ベクトルの垂直および水平成分がともに正である領域に
対応する。
When the calculation of the evaluation value for one column is completed, the count value VC of the vertical counter 130 returns to the initial value, and the counting operation is performed again. This operation is repeated thereafter. When the search window block overlaps with block # 2, the output φL of comparator 138 becomes inactive at “L”. On the other hand, at this time, the output φU of the comparison 134 is in the active state “H”. Therefore, for the upper left block, the displacement vector as a motion vector candidate is valid only for a search window block including pixel data of blocks # 5, # 6, # 8, and # 9. This region corresponds to a region where both the vertical and horizontal components of the displacement vector are positive.

【0125】他の制御信号においても同様であり、確実
に、テンプレートブロックの位置に応じて評価値の無効
化を行なうことができる。
The same applies to other control signals, and the evaluation value can be reliably invalidated according to the position of the template block.

【0126】なお、図11に示す構成においてはこの制
御信号発生部62は、演算部124の出力を無効化する
無効化回路126の動作を制御している。この無効化回
路126の構成には、図9(B)に示す構成と同様の構
成を利用することができる。この構成に代えて、制御信
号発生部62からの動きベクトル無効化信号が比較部1
28へ与えられ、比較部128における比較動作の禁止
が行なわれるように構成されてもよい。また比較部12
8における動きベクトル候補の更新の禁止が行なわれて
もよい。
In the configuration shown in FIG. 11, the control signal generating section 62 controls the operation of the invalidating circuit 126 for invalidating the output of the arithmetic section 124. The same configuration as the configuration shown in FIG. 9B can be used for the configuration of this invalidation circuit 126. Instead of this configuration, the motion vector invalidation signal from the control signal generation unit 62 is
28, and the comparison unit 128 may be configured to prohibit the comparison operation. Also, the comparison unit 12
8, the update of the motion vector candidate may be prohibited.

【0127】また、図12に示す垂直カウンタ130お
よび水平カウンタ132は、図11に示す比較部128
における動きベクトル生成用のカウンタと共用される構
成が利用されてもよい。
The vertical counter 130 and the horizontal counter 132 shown in FIG. 12 correspond to the comparing unit 128 shown in FIG.
A configuration shared with a counter for generating a motion vector in the above may be used.

【0128】また、上述の構成においては、画面上の左
上端のテンプレートブロックが最初に処理されるブロッ
クとして説明しており、フレーム同期信号φFSもこの
最初に処理されるブロックMB1に対応して有効状態と
なっているが、このフレーム同期信号φFSは、画面上
での特定の位置を示すものであれば、任意の位置に対応
させることができる。画面上での特定のブロック位置に
対応してフレーム同期信号φFSが発生されてもよい。
In the above-described configuration, the template block at the upper left corner on the screen is described as the block to be processed first, and the frame synchronization signal φFS is also valid corresponding to the block MB1 to be processed first. In this state, the frame synchronization signal φFS can correspond to an arbitrary position as long as it indicates a specific position on the screen. The frame synchronization signal φFS may be generated corresponding to a specific block position on the screen.

【0129】また上記実施例においては、テンプレート
ブロックはラスタースキャンと同様の走査(ブロック単
位)が行なわれているが、これは垂直方向についてまず
テンプレートブロックの走査が行なわれ、次いで隣接す
るブロックの垂直方向の走査が行なわれるように構成さ
れてもよい。
In the above embodiment, the template block is scanned in the same manner as the raster scan (in units of blocks). In this case, the template block is first scanned in the vertical direction, and then the vertical scan of the adjacent block is performed. It may be configured such that scanning in the direction is performed.

【0130】また上述の構成においては、画面サイズ
(画面に含まれるブロックの数)が固定されている。し
かしながらこの場合、カウンタをプログラマブルカウン
タとして構成しておけば、レジスタに外部から画面サイ
ズ(ブロック数)を書込み、これに応じてカウンタのカ
ウント範囲を調整する構成とすれば任意の画面サイズに
対しても端ブロックに対する動きベクトル探索に対する
制御を実現することができる。
In the above configuration, the screen size (the number of blocks included in the screen) is fixed. However, in this case, if the counter is configured as a programmable counter, the screen size (the number of blocks) is written from the outside to the register, and the count range of the counter is adjusted accordingly. Can also realize control over motion vector search for end blocks.

【0131】以上ように、この第1の実施例に従えば、
画面上の特定の位置を示すフレーム同期信号に従って装
置内部でテンプレートブロックの位置を検出し、動きベ
クトル探索範囲制御信号を生成しているため、端子数を
大幅に低減することができ、小規模の動きベクトル検出
装置を実現することができる。またこのとき、動きベク
トル検出装置はチップ単体でなく、外部のメモリまたは
制御装置と同一チップ上に集積化され、内部配線で接続
される構成であっても、制御信号線の数が大幅に低減さ
れるため、配線占有面積の低減および装置規模の低減が
実現できる。
As described above, according to the first embodiment,
Since the position of the template block is detected inside the device according to the frame synchronization signal indicating a specific position on the screen and the motion vector search range control signal is generated, the number of terminals can be significantly reduced, and A motion vector detection device can be realized. At this time, the number of control signal lines is greatly reduced even if the motion vector detection device is not integrated with the chip but integrated with an external memory or control device on the same chip and connected by internal wiring. Therefore, a reduction in the wiring occupation area and a reduction in the device scale can be realized.

【0132】(ii) 第2の実施例 図13はこの発明の第2の実施例である動きベクトル検
出装置の全体の構成を概略的に示す図である。図13に
示す動きベクトル検出装置は、端ブロック制御部6が、
フレーム同期信号φFSに加えてさらに画面サイズ指示
信号φPSを信号線9を介して受ける。端ブロック制御
部6は、この画面サイズ指示信号φPSに応答して対応
の画面サイズ(1画面に含まれるテンプレートブロック
の数)に従ってブロックの位置を検出する。この構成の
場合、複数の画面サイズのうち画面サイズ指示信号φP
Sにより選択された画面サイズに含まれるブロックの数
に応じて端ブロックの処理を実行することができる。た
とえば、動画像符号化標準においては、前処理回路にお
いて共通の中間フォーマット(CIF)に変換される。
この中間フォーマットCIFはFCIはとQCIFの2
種類のフォーマットを備える。FCIFとQCIFは1
ライン当りの画素数、1フレーム当りのライン数等が異
なる。したがって、このような画面サイズ指示信号φP
Sを利用すれば、表3に示すように2つの異なる画面サ
イズに対しても柔軟に端子数を増加させることなく対処
して端ブロック処理を実行することができる。
(Ii) Second Embodiment FIG. 13 is a diagram schematically showing an entire configuration of a motion vector detecting device according to a second embodiment of the present invention. In the motion vector detection device shown in FIG.
In addition to frame synchronization signal φFS, screen size instruction signal φPS is received via signal line 9. The end block control unit 6 detects the position of the block according to the corresponding screen size (the number of template blocks included in one screen) in response to the screen size instruction signal φPS. In the case of this configuration, of the plurality of screen sizes, the screen size instruction signal φP
The processing of the end block can be executed according to the number of blocks included in the screen size selected by S. For example, in the moving picture coding standard, the data is converted into a common intermediate format (CIF) in a preprocessing circuit.
This intermediate format CIF is 2 of FCI and QCIF.
With different formats. FCIF and QCIF are 1
The number of pixels per line, the number of lines per frame, and the like are different. Therefore, such a screen size instruction signal φP
If S is used, end block processing can be executed flexibly without increasing the number of terminals even for two different screen sizes as shown in Table 3.

【0133】[0133]

【表1】 [Table 1]

【0134】表1に示すように画面サイズ指示信号φP
Sが“H”のとき、FCIFフォーマットが指定され、
水平方向のブロック数が22、垂直方向のブロック数が
18の画面サイズが指定される。画面サイズ指示信号φ
PSが“L”のとき、QCIF中間フォーマットが指定
され、水平方向のブロック数が11、垂直方向のブロッ
ク数が9の画面サイズが指定される。
As shown in Table 1, the screen size instruction signal φP
When S is “H”, the FCIF format is specified,
A screen size in which the number of blocks in the horizontal direction is 22 and the number of blocks in the vertical direction is 18 is specified. Screen size indication signal φ
When PS is “L”, the QCIF intermediate format is specified, and a screen size in which the number of blocks in the horizontal direction is 11 and the number of blocks in the vertical direction is 9 is specified.

【0135】図14はこの画面サイズ指示信号φPSに
従って端ブロック検出動作を切換える部分の構成を示す
図である。図14において、端ブロック制御部6は、ク
ロック信号φCKをカウントし、水平ブロック位置を示
すカウント値を生成する水平ブロックカウンタ12と、
水平ブロックカウンタ12のカウント値とレジスタ15
2に予め格納されたカウント値との一致を検出する一致
検出回路150と、一致検出回路150の出力の立下が
りに応答してワンショットのパルスを発生するパルス発
生回路154と、パルス発生回路154の出力とフレー
ム同期信号φFSを受けるOR回路156を含む。OR
回路156は水平ブロックカウンタ12のカウント値を
リセットする。この構成は、先に図6に示した端ブロッ
ク制御部の位置検出部61の構成の変更を与える。残り
の構成は図6に示す構成を利用することができる。垂直
ブロックカウンタ11に対し、特にそのカウント範囲を
制限するための構成は設ける必要はない。フレーム同期
信号φFSに従って垂直ブロックカウンタ11のカウン
ト値がリセットされるためである。次に動作について簡
単に説明する。
FIG. 14 is a diagram showing a configuration of a portion for switching the end block detection operation in accordance with the screen size instruction signal φPS. 14, an end block control section 6 counts a clock signal φCK and generates a count value indicating a horizontal block position;
Count value of horizontal block counter 12 and register 15
2, a coincidence detection circuit 150 for detecting coincidence with a count value stored in advance, a pulse generation circuit 154 for generating a one-shot pulse in response to a fall of the output of the coincidence detection circuit 150, and a pulse generation circuit 154. And an OR circuit 156 for receiving the frame synchronization signal φFS. OR
The circuit 156 resets the count value of the horizontal block counter 12. This configuration changes the configuration of the position detection unit 61 of the end block control unit previously shown in FIG. The remaining configuration can utilize the configuration shown in FIG. It is not necessary to provide the vertical block counter 11 with a configuration for particularly limiting the count range. This is because the count value of the vertical block counter 11 is reset according to the frame synchronization signal φFS. Next, the operation will be briefly described.

【0136】水平ブロックカウンタ12のカウント範囲
は、選択可能な画面サイズのうち最大の水平方向ブロッ
ク数をカウントするように構成される。すなわち、表1
に示すような画面サイズが準備されている場合、水平ブ
ロックカウンタ12は、22個のブロックをカウントす
ることが可能なように構成される。レジスタ152に
は、表1に示すQCIFフォーマットに従う画面サイズ
に対応する水平方向ブロックの数“11(10進数)”
が格納される。一致検出回路150は、画面サイズ指示
信号φPSが画面サイズQCIFを示す“L”のとき活
性状態とされ、一致検出動作を実行する。信号φPSが
“L”のとき(信号/φPSが“L”のとき)には、一
致検出回路150は検出動作を実行せず、その出力は
“L”に固定される。
The count range of the horizontal block counter 12 is configured to count the maximum number of horizontal blocks among selectable screen sizes. That is, Table 1
Is prepared, the horizontal block counter 12 is configured to be able to count 22 blocks. The number of horizontal blocks “11 (decimal)” corresponding to the screen size according to the QCIF format shown in Table 1 is stored in the register 152.
Is stored. The match detection circuit 150 is activated when the screen size instruction signal φPS is “L” indicating the screen size QCIF, and performs a match detection operation. When signal φPS is at “L” (signal / φPS is at “L”), match detection circuit 150 does not execute the detection operation, and its output is fixed at “L”.

【0137】水平ブロックカウンタ12のカウント値が
レジスタ152に格納された格納データと一致した場合
に、その一致検出回路150の出力が“H”に立上が
る。次のブロックの動きベクトル検出が行なわれると
き、水平ブロックカウンタ12のカウント値が1増分さ
れる。それに応答して一致検出回路回路150の出力が
“L”に立下がる。パルス発生器154はこの一致検出
回路154の出力の立下がりに応答してワンショットの
パルス信号を発生する。OR回路156はこのパルス発
生回路154からのワンショットのパルス信号に応答し
て水平ブロックカウンタ12のカウント値を初期値
(0)にリセットする。パルス発生回路154の出力は
また水平同期信号φHとして垂直ブロックカウンタへ与
えられる。垂直ブロックカウンタはこのパルス発生回路
154の出力をカウントし、そのカウント値を1増分す
る。
When the count value of horizontal block counter 12 matches the data stored in register 152, the output of match detection circuit 150 rises to "H". When the motion vector of the next block is detected, the count value of the horizontal block counter 12 is incremented by one. In response, the output of match detection circuit 150 falls to "L". The pulse generator 154 generates a one-shot pulse signal in response to the fall of the output of the coincidence detection circuit 154. The OR circuit 156 resets the count value of the horizontal block counter 12 to an initial value (0) in response to the one-shot pulse signal from the pulse generation circuit 154. The output of pulse generating circuit 154 is also provided to vertical block counter as horizontal synchronizing signal φH. The vertical block counter counts the output of the pulse generation circuit 154 and increments the count value by one.

【0138】上述の構成により、複数の画面サイズに対
しても、正確にブロックの位置を検出し、そのブロック
位置に応じた動きベクトルの探索範囲の制御を行なうこ
とができる。
With the above-described configuration, the position of a block can be accurately detected even for a plurality of screen sizes, and the search range of a motion vector can be controlled in accordance with the block position.

【0139】なお、上述の第2の実施例においては、画
面サイズ指示信号φPSは1ビットであり、2つの画面
サイズのうちの一方を指定している。画面サイズ指示信
号φPSが複数ビットであり、さらに数多くの画面サイ
ズのうちの1つの画面サイズを指定するように構成され
てもよい。この場合、水平ブロックカウンタが複数個準
備され、多ビット画面サイズ指示信号φPSに従って1
つのカウンタが活性状態とされてもよい。また、この複
数ビット画面サイズ指示信号φPSに従ってプログラム
カウンタのカウント範囲が設定される構成が利用されて
もよい。
In the second embodiment, the screen size instruction signal φPS is one bit, and designates one of two screen sizes. The screen size instruction signal φPS may have a plurality of bits, and may be configured to specify one screen size out of many screen sizes. In this case, a plurality of horizontal block counters are prepared, and 1 is set according to the multi-bit screen size instruction signal φPS.
One counter may be activated. Further, a configuration in which the count range of the program counter is set in accordance with multi-bit screen size instruction signal φPS may be used.

【0140】上述のように、端ブロック制御部へ画面サ
イズ指示信号を与えることにより、複数種類の画面サイ
ズに対しても容易に対応することが可能となり、1つの
回路構成で複数種類の画面サイズに対応することのでき
る汎用性の高い動きベクトル検出装置を得ることができ
る。
As described above, by providing a screen size instruction signal to the end block control unit, it is possible to easily cope with a plurality of types of screen sizes. And a highly versatile motion vector detection device that can handle

【0141】(iii) 実施例3 図15はこの発明の第3の実施例である動きベクトル検
出装置の全体の構成を概略的に示す図である。図15に
示す動きベクトル検出装置1では、端ブロック制御部6
へフレーム同期信号φFS,画面サイズ指示信号φPS
ならびに端ブロック指示信号φUE,φBE,φLEお
よびφREが与えられる。端ブロック制御部6は、画面
サイズ指示信号φPSが所定のたとえば“H”の場合に
は、予め定められた画面サイズに従った端ブロック制御
処理を実行する。画面サイズ指示信号φPSが他方論理
(“L”)の場合、端ブロック制御部6は、外部から与
えられる端ブロック指示信号φUE,φBE,φLEお
よびφREに従って端ブロックに対する動きベクトル探
索処理を制御する。表2にこの画面サイズ指示信号φP
Sの真理値表を示す。
(Iii) Third Embodiment FIG. 15 is a diagram schematically showing an entire configuration of a motion vector detecting device according to a third embodiment of the present invention. In the motion vector detecting device 1 shown in FIG.
Frame synchronization signal φFS, screen size indication signal φPS
And end block designating signals φUE, φBE, φLE and φRE. When the screen size instruction signal φPS is, for example, “H”, the end block control unit 6 executes end block control processing according to a predetermined screen size. When the screen size instruction signal φPS is the other logic (“L”), the end block control unit 6 controls the motion vector search processing for the end blocks according to end block instruction signals φUE, φBE, φLE, and φRE given from the outside. Table 2 shows this screen size instruction signal φP
2 shows a truth table of S.

【0142】[0142]

【表2】 [Table 2]

【0143】表2に示すように、画面サイズ指示信号φ
PSが“H”の場合、画面サイズとしては予め定められ
た中間フォーマットのQCIF(176画素×144画
素)のサイズの画面に対する端ブロックの処理が実行さ
れる。この場合、外部端ブロック信号は無効とされる。
As shown in Table 2, the screen size instruction signal φ
When the PS is “H”, the process of the end block is executed for a screen having a size of QCIF (176 pixels × 144 pixels) of a predetermined intermediate format as the screen size. In this case, the external end block signal is invalidated.

【0144】一方、画面サイズ指示信号φPSが“L”
の場合には、外部端ブロック信号が有効とされ、外部か
らの端ブロック指示信号が指定するブロック位置に従っ
て動きベクトル探索の制御を行なうための制御信号が発
生される。
On the other hand, when screen size instruction signal φPS is at “L”
In this case, the external end block signal is made valid, and a control signal for controlling the motion vector search is generated in accordance with the block position specified by the external end block instruction signal.

【0145】端ブロック指示信号φUE,φBE,φL
E,φREとしては、図31に示す従来と同様の端ブロ
ック指示信号が与えられてもよい。また、この図31に
示すものと異なる論理の端ブロック指示信号が与えられ
てもよい。
End block designating signals φUE, φBE, φL
As E and φRE, an end block instruction signal similar to the conventional one shown in FIG. 31 may be given. Further, an end block instruction signal having a logic different from that shown in FIG. 31 may be provided.

【0146】図16は、図15に示す端ブロック制御部
6の具体的構成の一例を示す図である。この図16に示
す端ブロック制御部は、図6に示す端ブロック制御部の
構成と、コンパレータ13a〜13dと動きベクトル無
効判定回路14との間にマルチプレクス回路160が設
けられる点が異なっている。他の構成は同様である。マ
ルチプレクス回路160は、コンパレータ13a〜13
dそれぞれに対応して設けられる切換回路161a〜1
61dを含む。
FIG. 16 is a diagram showing an example of a specific configuration of the end block control section 6 shown in FIG. The end block controller shown in FIG. 16 is different from the end block controller shown in FIG. 6 in that a multiplex circuit 160 is provided between the comparators 13a to 13d and the motion vector invalidity determination circuit 14. . Other configurations are the same. The multiplex circuit 160 includes comparators 13a to 13
d switching circuits 161a to 161
61d.

【0147】切換回路161aはコンパレータ13aの
出力φUEと外部からの上端ブロック指示信号ext.
φUEとを受ける。切換回路161bは、下段コンパレ
ータ13bの出力φBEと外部からの下段ブロック指示
信号ext.φBEとを受ける。切換回路161cはコ
ンパレータ13cの出力φLEと外部からの左端ブロッ
ク指示信号ext.φLEとを受ける。切換回路161
dは、コンパレータ13dの出力φREと外部からの右
端ブロック指示信号ext.φREとを受ける。切換回
路161a〜161dの各々は画面サイズ指示信号φP
Sに従ってその2入力に与えられた信号のうち一方を通
過させる。すなわち、切換回路161a〜161dは、
画面サイズ指示信号φPSが“H”にあり、画面サイズ
としてQCIFフォーマットの画面サイズを示している
場合には、コンパレータ13a〜13dの出力を通過さ
せて動きベクトル無効判定回路14へ与える。切換回路
161a〜161dは画面サイズ指示信号φPSが
“L”の場合には、外部からの端ブロック指示信号ex
t.φUE、ext.φBE、ext.φLE、および
ext.φREを通過させて動きベクトル無効判定回路
14へ与える。この場合、動きベクトル無効判定回路1
4は、与えられたブロック位置指示信号に従って動きベ
クトルの無効判定を行なう。
The switching circuit 161a outputs the output φUE of the comparator 13a and the upper end block instruction signal ext.
Receive φUE. The switching circuit 161b receives the output φBE of the lower comparator 13b and an external lower block instruction signal ext. Receive φBE. The switching circuit 161c outputs the output φLE of the comparator 13c and the left end block instruction signal ext. Receive φLE. Switching circuit 161
d is an output φRE of the comparator 13d and a right end block instruction signal ext. Receive φRE. Each of the switching circuits 161a to 161d outputs a screen size instruction signal φP.
According to S, one of the signals given to the two inputs is passed. That is, the switching circuits 161a to 161d
When the screen size instruction signal φPS is “H” and indicates the screen size of the QCIF format as the screen size, the output of the comparators 13 a to 13 d is passed to the motion vector invalidity determination circuit 14. When the screen size instruction signal φPS is “L”, the switching circuits 161a to 161d output end block instruction signals ex from the outside.
t. φUE, ext. φBE, ext. φLE, and ext. The signal passes through φRE and is supplied to the motion vector invalidity determination circuit 14. In this case, the motion vector invalidity determination circuit 1
4 makes a motion vector invalidity determination in accordance with the given block position indication signal.

【0148】この図16に示す構成に従えば、特定の画
面サイズに対してのみ用いられる用途においては、外部
からの端ブロック指示信号ext.φUE等を受ける必
要がない。したがって、特定の画面サイズに対して利用
される場合には端子数は増加せず、フレーム同期信号φ
FSのみを利用して端ブロックに対する動きベクトル検
索の制御を実行することができる。
According to the configuration shown in FIG. 16, in an application used only for a specific screen size, external end block instruction signal ext. There is no need to receive φUE etc. Therefore, when used for a specific screen size, the number of terminals does not increase and the frame synchronization signal φ
The control of the motion vector search for the end block can be executed using only the FS.

【0149】また特定の画面サイズ(本実施例において
はQCIFフォーマット)以外の画面サイズに対して
は、外部からの端ブロック指示信号に従って動きベクト
ルの処理を行なうことができ、複数の種類の画面サイズ
に対しても柔軟に対応することができる。
For a screen size other than a specific screen size (QCIF format in this embodiment), motion vector processing can be performed in accordance with an external end block instruction signal. Can be flexibly dealt with.

【0150】この図16に示す構成は第2の実施例と組
合わせられてもよい。また特定の画面サイズが2個また
はそれ以上の画面サイズであってもよい。2個以上の特
定画面サイズから1つの画素サイズを選択するための構
成は第2の実施例の構成を拡張することにより実現でき
る。
The configuration shown in FIG. 16 may be combined with the second embodiment. Also, the specific screen size may be two or more screen sizes. A configuration for selecting one pixel size from two or more specific screen sizes can be realized by extending the configuration of the second embodiment.

【0151】なお第1ないし第3の実施例において、テ
ンプレートブロックの同期をとるための(処理テンプレ
ートブロックの先頭を示す)ブロック同期信号φBSを
クロック信号φCKとして与えておけば、図8に示すタ
イミングチャート図において、処理シーケンスの各サイ
クルにおいてこのブロック同期信号φBSが立上がり、
確実にブロック位置をカウンタにより検出することがで
きる。
In the first to third embodiments, if the block synchronization signal φBS for indicating the synchronization of the template block (indicating the beginning of the processing template block) is given as the clock signal φCK, the timing shown in FIG. In the chart, the block synchronization signal φBS rises in each cycle of the processing sequence,
The block position can be reliably detected by the counter.

【0152】[0152]

【0153】[0153]

【0154】[0154]

【発明の効果】請求項に係る発明に従えば、画面サイ
ズ指示信号と処理開始位置指示信号とに従って、内部で
符号化されるべきブロックの位置を検出して動きベクト
ル検出動作を制御するように構成したため、任意の画面
サイズに対して柔軟に端子数を増させることなく対応
することのできる高性能の動きベクトル検出装置を実現
することができる。
According to the first aspect of the present invention, the position of a block to be coded internally is detected in accordance with the screen size instruction signal and the processing start position instruction signal to control the motion vector detection operation. because the configuration, it is possible to realize a high-performance motion vector detecting device capable of corresponding without increasing large number of terminals flexibly with respect to any screen size.

【0155】[0155]

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

【図1】この発明の第1の実施例である動きベクトル検
出装置の全体の構成を概略的に示す図である。
FIG. 1 is a diagram schematically showing an overall configuration of a motion vector detecting device according to a first embodiment of the present invention.

【図2】図1に示す端ブロック制御部の構成を概略的に
示す図である。
FIG. 2 is a diagram schematically showing a configuration of an end block control unit shown in FIG. 1;

【図3】画面のブロック分割および処理順序を示す図で
ある。
FIG. 3 is a diagram showing a screen block division and a processing order.

【図4】図3に示す画面サイズの構成における端ブロッ
クの分布を示す図である。
FIG. 4 is a diagram showing a distribution of end blocks in the screen size configuration shown in FIG. 3;

【図5】図3に示す各ブロックに対する動きベクトルの
無効範囲を一覧にして示す図である。
FIG. 5 is a diagram showing a list of invalid ranges of motion vectors for each block shown in FIG. 3;

【図6】図1および図2に示す端ブロック制御部の具体
的構成を示すブロック図である。
FIG. 6 is a block diagram showing a specific configuration of an end block control unit shown in FIGS. 1 and 2;

【図7】図6に示すコンパレータの構成を概略的に示す
図である。
FIG. 7 is a diagram schematically showing a configuration of a comparator shown in FIG. 6;

【図8】この発明の第1の実施例である動きベクトル検
出装置における端ブロック制御部の動作を示すタイミン
グチャート図である。
FIG. 8 is a timing chart showing an operation of an end block control unit in the motion vector detection device according to the first embodiment of the present invention.

【図9】図1に示す動きベクトル算出部の構成の一例お
よびその無効化回路の具体的構成を示す図である。
9 is a diagram illustrating an example of a configuration of a motion vector calculation unit illustrated in FIG. 1 and a specific configuration of a nullification circuit thereof.

【図10】図9に示す動きベクトル算出部に対する制御
信号発生発生部(動きベクトル無効判定回路)の構成お
よび動作を示す図である。
10 is a diagram showing a configuration and operation of a control signal generation unit (motion vector invalidity determination circuit) for the motion vector calculation unit shown in FIG. 9;

【図11】図1に示す動きベクトル算出部の他の構成例
を示す図である。
FIG. 11 is a diagram illustrating another configuration example of the motion vector calculation unit illustrated in FIG. 1;

【図12】図11に示す動きベクトル算出部に対する動
きベクトル無効化判定回路(制御信号発生回路)の構成
および動作を示す図である。
12 is a diagram showing the configuration and operation of a motion vector invalidation determination circuit (control signal generation circuit) for the motion vector calculation unit shown in FIG.

【図13】この発明の第2の実施例である動きベクトル
検出装置の構成を示す図である。
FIG. 13 is a diagram showing a configuration of a motion vector detection device according to a second embodiment of the present invention.

【図14】図13に示す端ブロック制御部の要部の構成
を示す図である。
14 is a diagram illustrating a configuration of a main part of an end block control unit illustrated in FIG. 13;

【図15】この発明の第3の実施例である動きベクトル
検出装置の全体の構成を概略的に示す図である。
FIG. 15 is a diagram schematically showing an overall configuration of a motion vector detecting device according to a third embodiment of the present invention.

【図16】図15に示す端ブロック制御部の構成例を示
す図である。
FIG. 16 is a diagram illustrating a configuration example of an end block control unit illustrated in FIG. 15;

【図17】ブロックマッチング法による動きベクトル検
出動作を説明するための図である。
FIG. 17 is a diagram for explaining a motion vector detection operation by a block matching method.

【図18】この発明において適用されるテンプレートブ
ロックおよびサーチエリアならびにサーチウィンドブロ
ックの構成を示す図である。
FIG. 18 is a diagram showing a configuration of a template block, a search area, and a search window block applied in the present invention.

【図19】この発明が適用される画像信号符号化回路の
構成の一例を示す図である。
FIG. 19 is a diagram illustrating an example of a configuration of an image signal encoding circuit to which the present invention is applied.

【図20】図19に示すソース符号化回路の構成の一例
を示す図である。
20 is a diagram illustrating an example of a configuration of a source encoding circuit illustrated in FIG. 19;

【図21】図20に示す動き補償予測器の構成の一例を
示す図である。
21 is a diagram illustrating an example of a configuration of a motion compensation predictor illustrated in FIG.

【図22】図21に示す動きベクトル算出部の構成の一
例を示す図である。
FIG. 22 is a diagram illustrating an example of a configuration of a motion vector calculation unit illustrated in FIG. 21;

【図23】図22に示すプロセサアレイ内に含まれるプ
ロセサの構成を示す図である。
FIG. 23 is a diagram showing a configuration of a processor included in the processor array shown in FIG.

【図24】図20に示す動きベクトル算出部の動きベク
トル算出時におけるサーチエリアデータおよびテンプレ
ートデータのスキャンの方向を示す図である。
FIG. 24 is a diagram showing scan directions of search area data and template data when the motion vector calculation unit shown in FIG. 20 calculates a motion vector.

【図25】図22に示すプロセサアレイにおける評価値
算出動作を示す図である。
FIG. 25 is a diagram showing an evaluation value calculation operation in the processor array shown in FIG. 22;

【図26】図22に示す動きベクトル算出部の評価値算
出動作時におけるサーチエリア内のデータのスキャンの
態様を示す図である。
26 is a diagram illustrating a manner of scanning data in a search area during an evaluation value calculation operation of the motion vector calculation unit illustrated in FIG. 22.

【図27】画面上のブロックの端ブロックの位置を示す
図である。
FIG. 27 is a diagram showing the positions of end blocks of blocks on the screen.

【図28】上端および下端ブロックに対する動きベクト
ルの無効範囲を示す図である。
FIG. 28 is a diagram illustrating an invalid range of a motion vector with respect to upper and lower blocks.

【図29】画面上角のブロックに対する動きベクトルの
無効範囲を示す図である。
FIG. 29 is a diagram showing an invalid range of a motion vector for a block at an upper corner of the screen.

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

【図31】図30に示される端ブロック制御部へ与えら
れる端ブロック指示信号およびその出力制御信号の論理
を一覧にして示す図である。
FIG. 31 is a diagram showing a list of end block instruction signals supplied to the end block control unit shown in FIG. 30 and the logics of output control signals thereof;

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

1 動きベクトル検出装置 2 動きベクトル算出部 6 端ブロック制御部 11 垂直ブロックカウンタ 12 水平ブロックカウンタ 13a 上端コンパレータ 13b 下端コンパレータ 13c 左端コンパレータ 13d 右端コンパレータ 14 動きベクトル無効判定回路 61 位置検出部 62 制御信号発生部 70 無効化回路 74 切換回路 126 無効化回路 Reference Signs List 1 motion vector detecting device 2 motion vector calculating unit 6 end block control unit 11 vertical block counter 12 horizontal block counter 13a upper end comparator 13b lower end comparator 13c left end comparator 13d right end comparator 14 motion vector invalidity determination circuit 61 position detection unit 62 control signal generation unit 70 invalidating circuit 74 switching circuit 126 invalidating circuit

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 動き補償付予測符号化処理に用いられ
る動きベクトルを検出するための装置であって、 現画像内の符号化されるべきブロックの画素データと前
記現画像の予測基準となる参照画像内の画素データとを
入力し、所定の評価関数に従って前記符号化されるべき
ブロックの動きベクトルを算出する動きベクトル算出手
段と、 前記現画像画面上の前記現画像画面についての処理開始
の位置を示す処理開始位置指示信号と複数の画面サイズ
のうちのいずれかの画面サイズを指定する画面サイズ選
択信号とに応答して、前記符号化されるべきブロックの
画面上のブロック単位での位置を検出し、該検出結果に
従って前記動きベクトル算出手段が画面から逸脱する動
きベクトルを算出するのを防止するための制御信号を発
生する制御信号発生手段とを備える、動きベクトル検出
装置。
1. A device for detecting a motion vector to be used in-out with motion compensated predictive coding process, a prediction reference of the current image and the pixel data of the block to be coded in a current image Motion vector calculating means for inputting pixel data in a reference image and calculating a motion vector of the block to be coded according to a predetermined evaluation function; and starting processing of the current image screen on the current image screen < in response to the screen size selection signal for specifying one of a screen size of the br / processing start position instruction signal and the screen size of several indicating the position of the>, on the screen of the block to be the encoding A control signal for detecting a position in block units and generating a control signal for preventing the motion vector calculation means from calculating a motion vector deviating from the screen according to the detection result. And a generating unit, a motion vector detecting device.
JP6452393A 1993-03-24 1993-03-24 Motion vector detection device Expired - Fee Related JP3337515B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6452393A JP3337515B2 (en) 1993-03-24 1993-03-24 Motion vector detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6452393A JP3337515B2 (en) 1993-03-24 1993-03-24 Motion vector detection device

Publications (2)

Publication Number Publication Date
JPH06276510A JPH06276510A (en) 1994-09-30
JP3337515B2 true JP3337515B2 (en) 2002-10-21

Family

ID=13260668

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6452393A Expired - Fee Related JP3337515B2 (en) 1993-03-24 1993-03-24 Motion vector detection device

Country Status (1)

Country Link
JP (1) JP3337515B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001224036A (en) * 1995-10-18 2001-08-17 Sharp Corp Moving picture coder
JP4511842B2 (en) * 2004-01-26 2010-07-28 パナソニック株式会社 Motion vector detecting device and moving image photographing device
US8018463B2 (en) * 2004-05-10 2011-09-13 Nvidia Corporation Processor for video data

Also Published As

Publication number Publication date
JPH06276510A (en) 1994-09-30

Similar Documents

Publication Publication Date Title
KR100413153B1 (en) Picture encoder and picture decoder
US6292589B1 (en) Method for choosing rate control parameters in motion-compensated transform-based picture coding scheme using non-parametric technique
US6295546B1 (en) Method and apparatus for eliminating the transpose buffer during a decomposed forward or inverse 2-dimensional discrete cosine transform through operand decomposition, storage and retrieval
US6760478B1 (en) Method and apparatus for performing two pass quality video compression through pipelining and buffer management
EP0528293B1 (en) Apparatus for reducing quantization artifacts in an interframe hybrid coding system with motion compensation
CN100562114C (en) Video encoding/decoding method and decoding device
US5949486A (en) Unit for detecting motion vector for motion compensation
JP3089165B2 (en) Motion vector search device
JPH0799659A (en) Nonexhaustive movement estimation method
JP2003125415A (en) Image processor, and motion estimation method
US6952501B2 (en) Image processing apparatus, image encoding apparatus, and image decoding apparatus
US6470050B1 (en) Image coding apparatus and its motion vector detection method
JP2007507987A (en) Rectangular motion search
JP3337515B2 (en) Motion vector detection device
JPH01179584A (en) Method for searching motion compensating dynamic vector
JP3355964B2 (en) Adaptive orthogonal transform mode determination method
JPH089385A (en) Dynamic image encoder
KR0160324B1 (en) Data processing system
JP2702139B2 (en) Video predictive coding
JP2776284B2 (en) Image coding device
JP2768669B2 (en) Motion compensation inter-frame coding device for TV signal
JP2004229150A (en) Motion vector searching method and device
JP2923875B2 (en) Video encoding device
JP2004140759A (en) Image decoding device
JP2000078589A (en) Method for calculating movement vector and storage medium for recording movement vector calculating program

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020716

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20080809

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20080809

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090809

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090809

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100809

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110809

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20110809

Year of fee payment: 9

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20110809

Year of fee payment: 9

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

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees