JPH10224797A - Moving vector detector and moving image coder using it - Google Patents

Moving vector detector and moving image coder using it

Info

Publication number
JPH10224797A
JPH10224797A JP2161997A JP2161997A JPH10224797A JP H10224797 A JPH10224797 A JP H10224797A JP 2161997 A JP2161997 A JP 2161997A JP 2161997 A JP2161997 A JP 2161997A JP H10224797 A JPH10224797 A JP H10224797A
Authority
JP
Japan
Prior art keywords
data
search
motion vector
reference image
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2161997A
Other languages
Japanese (ja)
Inventor
Susumu Takahashi
将 高橋
Yukitoshi Tsuboi
幸利 坪井
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2161997A priority Critical patent/JPH10224797A/en
Publication of JPH10224797A publication Critical patent/JPH10224797A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To assign a time slot efficiently and to read a reference image for detecting a moving vector from a memory. SOLUTION: A macro block input image from a memory 14 is stored to a buffer 15 and a reference image for a retrieval range consisting of a plurality of retrieval areas with respect to the macro block are stored to a buffer 16 respectively and a motion vector retrieval circuit 17 detects an optimum motion vector from the input image and the reference image. When the detection of the motion vector is finished, the input image of a succeeding macro block is stored in the buffer 15, a reference image for one retrieval area is rewritten in the buffer 16 to set a new retrieval range and to detect the motion vector. When the retrieval range is protruded from the right end of a screen, the contents of the buffer 16 are rewritten by using part of reference image in other retrieval range at the right end of the screen, corresponding thereto and the processing by the motion vector retrieval circuit 17 with the reference image is inhibited by a retrieval range limit circuit 19.

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 for predictive coding of a moving picture using motion compensation, and a moving picture coding apparatus using the same.

【0002】[0002]

【従来の技術】動き補償を用いた動画像の予測符号化
は、入力画像と参照画像とを16×16画素範囲のマク
ロブロック単位でパターンマッチングを行ない、最もマ
ッチングした入力画像と参照画像との差分を符号化する
ものであり、この際、これら差分がとられる参照画像で
のマクロブロックに対する入力画像のマクロブロックの
画面での変位量及び変位方向を表わす動きベクトルを検
出し、これを符号化して対応するマクロブロックの符号
化データとともに伝送あるいは記録される。この参照画
像としては、動画像符号化の国際標準規格であるMPE
G2を例にとると、前方予測フレーム間/フィールド間
符号化されるPピクチャが入力画像であるときには、先
行配列のフレーム内/フィールド内符号化されるIピク
チャまたはPピクチャのうちの最も近いものであり、両
方向予測フレーム間/フィールド間符号化されるBピク
チャが入力画像であるときには、先行配列のIピクチャ
またはPピクチャのうちの最も近いものと後続するIピ
クチャまたはPピクチャのうちの最も近いものとを用い
る。
2. Description of the Related Art In predictive coding of a moving image using motion compensation, an input image and a reference image are subjected to pattern matching in units of macroblocks in a 16 × 16 pixel range, and the best matching of the input image and the reference image is determined. At this time, a motion vector representing a displacement amount and a displacement direction on the screen of the macroblock of the input image with respect to the macroblock in the reference image from which these differences are obtained is detected and encoded. Is transmitted or recorded together with the encoded data of the corresponding macro block. As the reference image, MPE, which is an international standard for video coding, is used.
Taking G2 as an example, if the P picture to be coded forward-prediction inter-frame / inter-field is an input image, the closest one of the I-pictures or P-pictures to be coded in the intra-frame / in-field of the preceding array When the B-picture to be bidirectionally predicted inter-frame / inter-field encoded is an input image, the closest one of the preceding I-pictures or P-pictures and the closest one of the subsequent I-pictures or P-pictures Use something.

【0003】このように、かかる符号化では、入力画像
のマクロブロックをこれに最もバターンマッチングした
参照画像のマクロブロックとで行なうものであるから、
高い圧縮効率を得ることができる。しかし、動き補償に
用いる動きベクトルを検出するためには、画像の広い範
囲でパターンマッチングを行なう必要があり、そのた
め、メモリアクセスや回路規模の面で、動きベクトル検
出の占める割合は非常に大きい。
[0003] As described above, in such encoding, a macroblock of an input image is performed with a macroblock of a reference image most closely matched to the macroblock.
High compression efficiency can be obtained. However, in order to detect a motion vector used for motion compensation, it is necessary to perform pattern matching over a wide range of an image. Therefore, in terms of memory access and circuit scale, the ratio of motion vector detection is very large.

【0004】そこで、特開平5−236466号公報に
記載のように、低精度で参照画像の広い範囲を探索して
から高精度で参照画像の狭い範囲の探索を行なう二
(多)段階探索や、予測誤差生成用の参照データの読み
出しとメモリアクセスを兼用する等の工夫がなされてい
る。なお、参照画像のかかる範囲を探索範囲という。
Therefore, as described in Japanese Patent Application Laid-Open No. Hei 5-236466, a two- (multi) -step search for searching a wide range of a reference image with low accuracy and then searching for a narrow range of a reference image with high accuracy, For example, the reading of reference data for generating a prediction error and the memory access are combined. Note that such a range of the reference image is called a search range.

【0005】この従来技術での二段階探索では、第1段
階として、入力画像の16×16画素範囲のマクロブロ
ックに対し、参照画像に、このマクロブロックに対応す
る位置を中心として、32×32画素範囲の探索範囲
(探索ウインド)を設定し、この探索範囲内でこの入力
画像のマクロブロックとこれに最もパターンマッチング
する16×16画素の範囲を探索するものであり、これ
が探索されると、探索されたこの参照画像の16×16
画素部分に対する入力画像のマクロブロックの変位量と
方向とを表わす動きベクトルを演算で求める。
[0005] In the two-stage search according to the prior art, as a first stage, a macroblock of a 16x16 pixel range of an input image is added to a reference image at 32x32 around a position corresponding to the macroblock. A search range (search window) of a pixel range is set, and a macroblock of the input image and a range of 16 × 16 pixels that most closely match the macroblock of the input image are searched within the search range. 16 × 16 of this searched reference image
A motion vector representing the displacement amount and direction of the macroblock of the input image with respect to the pixel portion is obtained by calculation.

【0006】但し、この場合、入力画像のマクロブロッ
クMBとしては、図2(a)に示すように、16×16
画素の範囲を1つおきにサブサンプリングして8×8画
素からなるものとし(即ち、マクロブロックMBは、画
像の16×16画素の範囲の大きさをもつが、その1つ
おきのサブサンプリング(間引き)された8×8画素か
らなる)、同様に、探索範囲SAも32×32の画素範
囲の大きさをもつが、その1つおきにサブサンプリング
された16×16画素からなるするものであり、これに
より、2画素精度で動きベクトルが検出されることにな
る。図2(b)はこれらマクロブロックMBと探索範囲
SAのサブサンプリングした状態を示し、○印がサブサ
ンプリングされた画素であり、×印が除かれた画素であ
る。
However, in this case, as shown in FIG. 2A, the macroblock MB of the input image is 16 × 16
Every other pixel range is sub-sampled to be 8 × 8 pixels (ie, the macroblock MB has a size of the image 16 × 16 pixel range, but every other sub-sampling is performed). Similarly, the search area SA also has the size of the 32 × 32 pixel range, but is composed of 16 × 16 pixels that are sub-sampled every other pixel. Accordingly, a motion vector is detected with two-pixel accuracy. FIG. 2B shows a sub-sampled state of the macro block MB and the search area SA, where a circle is a sub-sampled pixel and a cross is a pixel from which the cross is removed.

【0007】また、第2段階では、図2(c)に示すよ
うに、参照画像のこの検出された動きベクトルで決まる
16×16画素のマクロブロックMB’を中心として1
8×18画素の探索範囲SA’を設定し、この探索範囲
SA’内で入力画像のマクロブロックMBに最もマッチ
ングする16×16画素範囲を探索する。これが探索さ
れると、探索されたこの参照画像の16×16画素範囲
に対する入力画像のマクロブロックMB’の変位量と方
向とを表わす動きベクトルを演算で求める。
In the second stage, as shown in FIG. 2 (c), one macroblock MB 'of 16 × 16 pixels determined by the detected motion vector of the reference image is centered.
An 8 × 18 pixel search range SA ′ is set, and a 16 × 16 pixel range that best matches the macroblock MB of the input image is searched within this search range SA ′. When this is searched, a motion vector representing the displacement and direction of the macroblock MB ′ of the input image with respect to the searched 16 × 16 pixel range of the reference image is calculated.

【0008】但し、この場合には、18×18画素の探
索範囲SA’は、図2(d)に示すように、○印で示す
元の画素間に補間画素を設け、36×36画素からなる
ものである。ここで、△印は水平方向に配列される○印
で示す元の画素間の補間画素、▽印は垂直方向に配列さ
れる○印で示す元の画素間の補間画素、□印は△印,▽
印で示す補間画素間の補間画素である。
In this case, however, the search area SA ′ of 18 × 18 pixels is, as shown in FIG. 2D, provided with interpolated pixels between the original pixels indicated by ○ and from 36 × 36 pixels. It becomes. Here, the symbol △ indicates the interpolated pixel between the original pixels indicated by a circle arranged in the horizontal direction, the symbol ▽ indicates the interpolated pixel between the original pixels indicated by a circle arranged in the vertical direction, and the symbol △ indicates the interpolated pixel. , ▽
Interpolated pixels between the interpolated pixels indicated by marks.

【0009】かかる探索範囲SA’内で16×16画素
の入力画像のマクロブロックMB’を補間画素も含めて
1画素ずつ移動させることにより、○印,△印,▽印及
び□印で示す画素毎にこのマクロブロックMB’と最も
パターンマッチングした16×16画素範囲の領域を探
索し、この最適な領域に対する入力画像のマクロブロッ
クMB’の動きベクトルを求める。これにより、これに
より、1/2画素精度で動きベクトルが検出されること
になる。
By moving the macro block MB 'of the input image of 16 × 16 pixels including the interpolation pixel one pixel at a time within the search range SA', the pixels indicated by the circles, triangles, triangles, and squares are obtained. Every time, a region in a 16 × 16 pixel range that is most pattern-matched with the macroblock MB ′ is searched, and a motion vector of the macroblock MB ′ of the input image corresponding to the optimal region is obtained. As a result, a motion vector is thus detected with half-pixel accuracy.

【0010】[0010]

【発明が解決しようとする課題】しかしながら、上記従
来技術では、動きベクトル検出の単位であるマクロブロ
ックの走査順については配慮されておらず、上記のよう
に、符号化の単位であるマクロブロック毎に探索範囲を
設定し、この探索範囲全体から動きベクトルを探索する
ような方法をとると、次のような問題が生ずる。
However, in the above-mentioned prior art, no consideration is given to the scanning order of the macroblocks, which are the units of motion vector detection. If a method is used in which a search range is set and the motion vector is searched from the entire search range, the following problem occurs.

【0011】即ち、動画像符号化の国際標準規格である
MPEG2を始めとする動き補償を用いた予測符号化方
式では、マクロブロックを画像走査と同じように左から
右へとその配列順に符号化し、画面の右端のマクロブロ
ックの符号化が終わると、次に、マクロブロックの幅分
下のマクロブロック配列ラインについて、その画面の左
端から右方へ順次マクロブロックを符号化していくので
あるが、これと同じ順序で各マクロブロックでの動きベ
クトルの検出を行なうものとすると、図2(a)に示し
たようにマクロブロックMBに対する探索範囲SAが設
定されるものとして、図3(a)に示すように、マクロ
ブロックMBに設定されている探索範囲SA全体が画面
DF内に含まれ、図3(b)示すように、1つのマクロ
ブロックMB1についての動きベクトルの検出が終わっ
て次の右隣のマクロブロックMB2の動きベクトルの検
出のために、1つ前のマクロブロックMB1の探索範囲
SA1に対して1マクロブロック分右側に移動して探索
範囲SA2が設定されるようにして、順次探索範囲SA
が右方に移動し、図3(c)に示すように、画面DFの
右端部のマクロブロックMBに達しても、その探索範囲
SAが画面DF内にあるまでは格別問題はないが、図3
(d)に示すように、画面DFの最も右端のマクロブロ
ックMBに達して場合には、これに対して設定される探
索範囲SAは、その一部が画面DFからはみ出してしま
い、このはみ出した領域では、画素が存在しない。
That is, in a predictive coding method using motion compensation such as MPEG2 which is an international standard for moving picture coding, macroblocks are coded from left to right in the arrangement order in the same manner as in image scanning. When the coding of the macroblock at the right end of the screen is completed, the macroblocks are sequentially coded from the left end of the screen to the right with respect to the macroblock array line below the width of the macroblock. Assuming that motion vectors are detected in each macroblock in the same order as this, the search range SA for the macroblock MB is set as shown in FIG. As shown, the entire search range SA set in the macroblock MB is included in the screen DF, and as shown in FIG. In order to detect the motion vector of the next right next macroblock MB2 after the detection of the previous motion block is completed, the search is performed by moving one macroblock to the right with respect to the search range SA1 of the immediately preceding macroblock MB1. The search range SA is sequentially set so that the range SA2 is set.
Moves rightward and reaches the rightmost macroblock MB of the screen DF, as shown in FIG. 3C, there is no particular problem until the search range SA is within the screen DF. 3
As shown in (d), when the rightmost macroblock MB of the screen DF is reached, a part of the search range SA set for the macroblock MB protrudes from the screen DF. There are no pixels in the region.

【0012】ところで、上記従来技術では、動きベクト
ルの検出に際しても、参照画像がメモリに記憶され、動
きベクトルを検出すべきマクロブロックMBが決まる
と、これに対する探索範囲内の画素データがこのメモリ
から読み出されるのであるが、図3(b)に示すよう
に、或るマクロブロックMB1に対する探索範囲SA1
と次に動きベクトルが検出されるべきマクロブロックM
B2の探索範囲SA2とは一部重複しており、この重複
した部分の画素データはマクロブロックMB2の動きベ
クトル検出でも使用することができるから、このマクロ
ブロックMB2の動きベクトルの検出に際しては、その
探索範囲SA2のうちのこの重複した部分以外の画素デ
ータをメモリから読み出せばよく、この重複した部分で
のメモリのアクセスを削減することができる。
In the prior art, when detecting a motion vector, a reference image is stored in a memory, and when a macroblock MB from which a motion vector is to be detected is determined, pixel data within a search range for the macroblock MB is retrieved from the memory. 3B, the search range SA1 for a certain macroblock MB1 is read out.
And the macroblock M from which the motion vector is to be detected next
The search range SA2 of B2 partially overlaps, and the pixel data of the overlapped portion can be used for the detection of the motion vector of the macroblock MB2. Pixel data other than the overlapping portion of the search range SA2 may be read from the memory, and the memory access at the overlapping portion can be reduced.

【0013】しかしながら、図3(d)に示すように、
マクロブロックMBの探索範囲SAの一部の領域ΔS
A’が画面DFの右端からはみ出した場合、この状態に
続いては、図3(e)に示すように、1マクロブロック
d2分だけ下方のマクロブロック配列ラインでの画面D
Fの左端のマクロブロックMBについて動きベクトルを
検出する状態となることから、図3(d)において、探
索範囲SAのはみ出した領域ΔSA’は、符号ΔSA”
として示すように、画面DFの左端部にかかっているこ
とになるが、この領域ΔSA”はマクロブロックMBの
探索範囲SAでの情報内容とは関連性がなく、メモリか
ら読み出してこの探索範囲SAにつなぎ合わせることは
できない。
However, as shown in FIG.
Partial area ΔS of search range SA of macro block MB
If A 'protrudes from the right end of the screen DF, following this state, as shown in FIG.
Since a motion vector is detected for the macroblock MB at the left end of F, in FIG. 3D, the area ΔSA ′ that extends beyond the search range SA is represented by a code ΔSA ″.
, The area .DELTA.SA "has no relevance to the information content in the search range SA of the macroblock MB, and is read out from the memory and read out from the search range SA. Cannot be joined.

【0014】このため、図3(d)に示す状態では、メ
モリの読出しを行なってはならず、この間メモリアクセ
スの休止が必要となり、また、このマクロブロックMB
での動きベクトルの検出処理も、探索範囲SAでの画面
DFに含まれている領域のみで行なうようにしなければ
ならない。
For this reason, in the state shown in FIG. 3D, the memory must not be read out, and the memory access must be suspended during this time.
Must be performed only in the area included in the screen DF in the search range SA.

【0015】あるいはまた、図3(d)に示す状態にお
いて、探索範囲SAのはみ出した領域ΔSA’に対し、
左端の領域ΔSA”のメモリの読出しを行なうとする
と、このマクロブロックMBに対する探索範囲SAには
情報内容に関連性のないこの領域ΔSA”の情報が含ま
れることになり、このこのマクロブロックMBに対して
は、動きベクトルを検出することができない。
Alternatively, in the state shown in FIG. 3 (d), the area .DELTA.
If the memory of the left end area .DELTA.SA "is read out, the search range SA for this macroblock MB includes the information of this area .DELTA.SA" which is not related to the information content. On the other hand, a motion vector cannot be detected.

【0016】また、図3(d)に示す状態から図3
(e)に移った状態でも、画面DFの左端のマクロブロ
ックMBに対する探索範囲SAは、図示するように、そ
の一部の領域が画面DFの左端からはみ出しており、上
記のことからして、このはみ出した部分は、図3(d)
に示す右端のマクロブロックMBの探索範囲SAに含ま
れるものである。このため、図3(e)においても、図
3(b)で説明したように、1つ前のマクロブロックM
Bの探索範囲SAの一部の情報が図3(e)におけるマ
クロブロックMBの探索範囲SAに含まれていることに
なり、従って、図3(e)に示す状態では、動きベクト
ルの検出を行なうことができない。
Also, from the state shown in FIG.
Even in the state shifted to (e), the search range SA for the macroblock MB at the left end of the screen DF has a part of the area protruding from the left end of the screen DF as shown in the figure. This protruding part is shown in FIG.
Are included in the search range SA of the rightmost macroblock MB shown in FIG. For this reason, in FIG. 3E, as described with reference to FIG.
Part of the information of the search range SA of B is included in the search range SA of the macroblock MB in FIG. 3E, and therefore, in the state shown in FIG. Cannot do it.

【0017】このように、動きベクトルを検出すべきマ
クロブロックMBが画面DFの右端部に達して次のマク
ロブロック配列ラインに移るときには、メモリアクセス
や動きベクトルの検出の処理を休止することが必要とな
り、一連の処理動作でこのような休止期間を設けること
により、タイムスロットを有効に割り当てることができ
ず、また、処理も非常に複雑になる。
As described above, when the macroblock MB whose motion vector is to be detected reaches the right end of the screen DF and moves to the next macroblock array line, it is necessary to suspend the processing of memory access and motion vector detection. By providing such a pause period in a series of processing operations, time slots cannot be effectively assigned, and the processing becomes very complicated.

【0018】また、MPEG2では、インターレース画
像を効率良く符号化するために、フレーム単位で符号化
を行なうフレーム構造とフィールド単位で符号化を行な
うフィールド構造とを任意に選択することができ、ま
た、夫々に対して複数の予測モードをとることができる
が、回路規模を大きくせずにかかる選択に対応できるよ
うにすることが必要である。
In MPEG2, in order to efficiently encode an interlaced image, a frame structure in which encoding is performed in frame units and a field structure in which encoding is performed in field units can be arbitrarily selected. A plurality of prediction modes can be set for each, but it is necessary to be able to cope with such selection without increasing the circuit scale.

【0019】本発明の第1の目的は、かかる問題を解消
し、効率の良いタイムスロット割り当てで、かつ処理を
簡略化して動きベクトル検出のための参照画像の読出し
を可能とした動きベクトル検出装置を提供することにあ
る。
A first object of the present invention is to solve the above-mentioned problems, to efficiently allocate time slots, and to simplify the processing to enable reading of a reference image for detecting a motion vector. Is to provide.

【0020】本発明の第2の目的は、回路規模の大型化
を回避して、フレーム構造とフィールド構造との複数の
予測モードの動きベクトルの検出を行なうことができる
ようにした動きベクトル検出装置を提供することにあ
る。
A second object of the present invention is to provide a motion vector detecting device capable of detecting motion vectors in a plurality of prediction modes of a frame structure and a field structure while avoiding an increase in circuit scale. Is to provide.

【0021】本発明の第3の目的は、かかる動きベクト
ル検出装置を用いた動画像符号化装置を提供することに
ある。
A third object of the present invention is to provide a moving picture coding device using such a motion vector detecting device.

【0022】[0022]

【発明が解決しようとする課題】上記第1の目的を達成
するために、本発明による動きベクトル検出装置は、少
なくとも探索範囲分の参照画像の画像データを記憶する
参照画像記憶手段と、該参照画像記憶手段に記憶された
該参照画像の画像データを用いて動きベクトルの検出対
象となるブロック内の入力画像に対する動きベクトルを
探索する動きベクトル探索手段と、動きベクトルの検出
対象となる該ブロックが隣のブロックに移る毎に、該参
照画像記憶手段に記憶されている探索範囲分の該参照画
像の画像データの一部を更新し、該参照画像記憶手段を
新たに動きベクトルの検出対象となる該ブロックに対す
る探索範囲分の該参照画像の画像データを記憶した状態
とする追加書込手段と、画面の一方の端部側の該ブロッ
クが動きベクトルの検出対象のブロックとなって該探索
範囲の一部が該画面の一方の端部からはみ出し、該参照
画像記憶手段に記憶されている探索範囲分の該参照画像
の画像データの一部を更新するための該参照画像の画像
データがないとき、該画面の一方の端部からはみ出した
該探索範囲の一部が該画面の他方の端部に移ったものと
して、該画面の他方の端部に移った該探索範囲の一部内
の該参照画像の画像データを該参照画像記憶手段に記憶
されている探索範囲分の該参照画像の画像データの一部
を更新するための追加書込データとするように、該追加
書込手段を制御する追加書込制御手段と、該追加書込制
御手段の制御によって該参照画像記憶手段での追加書込
データとなった該参照画像の画像データによる該動きベ
クトル探索手段の探索結果を無効とするように、該動き
ベクトル探索手段の探索結果に制限を加える探索範囲制
限手段とを備えている。
SUMMARY OF THE INVENTION In order to achieve the first object, a motion vector detecting device according to the present invention comprises: a reference image storage means for storing image data of reference images for at least a search range; A motion vector search unit that searches for a motion vector for an input image in a block for which a motion vector is to be detected using the image data of the reference image stored in the image storage unit; Every time the block moves to the next block, a part of the image data of the reference image for the search range stored in the reference image storage is updated, and the reference image storage becomes a new motion vector detection target. Additional writing means for storing the image data of the reference image for the search range for the block, and the block at one end of the screen being a motion vector As a block to be detected, a part of the search range protrudes from one end of the screen, and a part of the image data of the reference image corresponding to the search range stored in the reference image storage unit is updated. When there is no image data of the reference image, a part of the search range protruding from one end of the screen is moved to the other end of the screen, and the image is displayed on the other end of the screen. The image data of the reference image in a part of the moved search range is used as additional write data for updating a part of the image data of the reference image for the search range stored in the reference image storage unit. As described above, the additional writing control means for controlling the additional writing means, and the movement by the image data of the reference image which becomes the additional writing data in the reference image storage means under the control of the additional writing control means Invalidate the search result of the vector search means In so that, and a search range limiting means to restrict the search result of the motion vector search unit.

【0023】上記第2の目的を達成するために、本発明
による動きベクトル検出装置は、フレーム構造の入力画
像の動きベクトルを検出する第1のモードと、フィール
ド構造の該入力画像の動きベクトルを検出する第2のモ
ードとが設定可能であって、該第1のモードでは、動き
ベクトル検出の対象となるブロック内の該入力画像の第
1フィールドの画像データを第1のテンプレートデータ
として、第2フイールドの画像データを第2のテンプレ
ートデータとし、また、該第2のモードでは、該ブロッ
クの上半分の領域の該入力画像の画像データを第1のテ
ンプレートデータとして、下半分の該入力画像の画像デ
ータを第2のテンプレートデータとするデータ切換手段
と、探索範囲内の参照画像の第1フィールドの画像デー
タを第1のサーチエリアデータとし、第2フィールドの
画像データを第2のサーチエリアデータとするデータ分
配手段と、該第1のテンプレートデータの該第1のサー
チエリアデータからの第1の予測誤差と、該第1のテン
プレートデータの該第2のサーチエリアデータからの第
2の予測誤差と、該第2のテンプレートデータの該第1
のサーチエリアデータからの第3の予測誤差と、該第2
のテンプレートデータの該第2のサーチエリアデータか
らの第4の予測誤差とを夫々算出する予測誤差算出手段
と、該第1のモードでは、該第1〜該第4の予測誤差か
らフレーム予測とフィールド予測との最適なベクトルと
その予測誤差とを求め、該第2のモードでは、該第1〜
該第4の予測誤差からフィールド予測と該上下半分毎の
予測との最適ベクトルとその予測誤差とを求める予測誤
差比較手段とを備えている。
In order to achieve the second object, a motion vector detecting device according to the present invention comprises a first mode for detecting a motion vector of an input image having a frame structure, and a motion vector detecting device for detecting a motion vector of the input image having a field structure. A second mode to be detected can be set. In the first mode, image data of a first field of the input image in a block to be subjected to motion vector detection is used as first template data, In the second mode, the image data of the input image in the upper half area of the block is used as the first template data, and the lower half of the input image is used as the second template data. Data switching means for setting the image data of the first field of the reference image within the search range as the second template data. A data distribution unit that uses image data of a second field as second search area data as rear data; a first prediction error of the first template data from the first search area data; A second prediction error of the template data from the second search area data and a first prediction error of the second template data.
A third prediction error from the search area data of
Prediction error calculating means for respectively calculating a fourth prediction error from the second search area data of the template data of the first mode, and in the first mode, calculating a frame prediction from the first to fourth prediction errors. The optimum vector for the field prediction and its prediction error are determined, and in the second mode,
A prediction error comparing means for obtaining an optimum vector between the field prediction and the prediction for each of the upper and lower halves from the fourth prediction error and a prediction error thereof;

【0024】上記第3の目的を達成するために、本発明
は、入力画像の動きベクトルを低精度で検出する動きベ
クトル粗探索手段と、該動きベクトル粗探索手段により
求めた動きベクトルの周辺について高精度で動きベクト
ルの検出を行なう動きベクトル密探索手段と、該動きベ
クトル密探索手段により求めた動きベクトルを用いて参
照画像から該入力画像への動き補償予測を行なう動き補
償予測手段と、動きベクトル密探索手段により求めた動
きベクトルと動き補償予測を行なった残差信号を符号化
する符号化手段とを備えた動画像符号化装置であって、
該動きベクトル粗探索手段として、上記本発明の動きベ
クトル検出装置を用いる。
In order to achieve the third object, the present invention provides a motion vector coarse search means for detecting a motion vector of an input image with low precision, and a method for detecting a motion vector around the motion vector obtained by the motion vector coarse search means. Motion vector dense search means for detecting a motion vector with high accuracy; motion compensation prediction means for performing motion compensation prediction from a reference image to the input image using the motion vector obtained by the motion vector dense search means; A video encoding apparatus comprising: a motion vector obtained by a vector dense search means; and an encoding means for encoding a residual signal subjected to motion compensation prediction,
As the motion vector coarse search means, the above-described motion vector detection device of the present invention is used.

【0025】[0025]

【発明の実施の形態】以下、本発明の実施形態を図面説
明する。図1は本発明による動きベクトル検出装置の一
実施形態をブロック図であって、1は画面同期回路、2
はリセット遅延回路、3,4は水平/垂直マクロブロッ
クカウンタ、5は入力画像読出アドレス発生回路、6は
参照画像追加読出アドレス発生回路、7は入力画像書込
アドレス信号の入力端子、8は参照画像書込アドレス信
号の入力端子、9はメモリアクセス切換回路、10は入
力画像書込データの入力端子、11は参照画像データの
入力端子、12は書込データ切換回路、13は書込/読
出切換回路、14はメモリ、15は入力画像バッファ、
16は参照画像バッファ、17は動きベクトル探索回
路、18は動きベクトルの出力端子、19は探索範囲制
限回路、34は動きベクトル検出部である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a motion vector detecting device according to the present invention, wherein 1 is a screen synchronization circuit,
Is a reset delay circuit, 3 and 4 are horizontal / vertical macroblock counters, 5 is an input image read address generation circuit, 6 is a reference image additional read address generation circuit, 7 is an input terminal of an input image write address signal, and 8 is a reference. An input terminal for an image write address signal, 9 is a memory access switching circuit, 10 is an input terminal for input image write data, 11 is an input terminal for reference image data, 12 is a write data switching circuit, and 13 is write / read. Switching circuit, 14 is a memory, 15 is an input image buffer,
Reference numeral 16 denotes a reference image buffer, 17 denotes a motion vector search circuit, 18 denotes a motion vector output terminal, 19 denotes a search range limiting circuit, and 34 denotes a motion vector detection unit.

【0026】同図において、入力端子10から入力画像
データが、また、入力端子11から参照画像データが夫
々入力され、書込データ切換回路12によって時分割多
重されて、書込/読出切換回路13を介してメモリ14
に書き込まれる。また、メモリ14に書き込まれた入力
画像データは1マクロブロック分ずつ読み出され、書込
/読出切換回路13を介して入力画像バッファ15に書
き込まれ、メモリ14に書き込まれた参照画像データ
も、後述するように読み出されて入力画像バッファ15
に書き込まれた入力画像データのマクロブロックに対応
する探索範囲分が参照画像バッファ16に書き込まれ
る。そして、動きベクトル探索回路17により、入力画
像バッファ15に書き込まれた動きベクトルの検出対象
となるマクロブロックMB(これを、以下、検出対象マ
クロブロックという)の入力画像データと参照画像バッ
ファ16に格納された探索範囲SAの参照画像データと
で動きベクトルの検出処理が行なわれ、検出された動き
ベクトルが出力端子18から出力される。
In FIG. 1, input image data is input from an input terminal 10 and reference image data is input from an input terminal 11. The input data is time-division multiplexed by a write data switching circuit 12, and Through the memory 14
Is written to. Also, the input image data written in the memory 14 is read out one macroblock at a time, written into the input image buffer 15 via the write / read switching circuit 13, and the reference image data written in the memory 14 is The input image buffer 15 is read out as described later.
Are written into the reference image buffer 16 for the search range corresponding to the macroblock of the input image data written in the reference image buffer 16. Then, the motion vector search circuit 17 stores the input image data of the macroblock MB (hereinafter, referred to as a detection target macroblock) as a detection target of the motion vector written in the input image buffer 15 and the reference image buffer 16. A motion vector detection process is performed with the reference image data in the search range SA, and the detected motion vector is output from the output terminal 18.

【0027】かかる入力画像データと参照画像データの
メモリ14での書込み,読出しは、入力端子7からの入
力画像書込アドレス信号と、入力端子8からの参照画像
書込アドレス信号と、入力画像読出アドレス発生回路5
からの入力画像書込アドレス信号と、参照画像追加読出
アドレス発生回路6からの参照画像追加読出アドレス信
号とをメモリアクセス切換回路9で切り換えることによ
り、行なわれる。
The input image data and the reference image data are written and read in and out of the memory 14 by an input image write address signal from the input terminal 7, a reference image write address signal from the input terminal 8, and an input image read. Address generation circuit 5
The switching is performed by the memory access switching circuit 9 between the input image writing address signal supplied from the memory device and the reference image additional reading address signal from the reference image additional reading address generating circuit 6.

【0028】いま、図4(a)に示すように、1つの画
面DFにおいて、検出対象マクロブロックMBに対し、
それを中心とする探索範囲SAが設定され、この検出対
象マクロブロックMBの入力画像データがメモリ14か
ら読み出されて入力画像バッファ15に格納され、ま
た、探索範囲SAの参照画像データがメモリ14から読
み出されて参照画像バッファ16に格納されるのである
が、ここで、図4(b)に示すように、探索範囲SA
を、検出対象マクロブロックMBを中心として、フレー
ム画像またはフィールド画像での縦5マクロブロック
分,横9マクロブロック分の範囲とし、この探索範囲S
A内でのマクロブロックMBの探索のための移動範囲を
縦±2マクロブロック(±32画素)分,横±4マクロ
ブロック(±64画素)分とする。
Now, as shown in FIG. 4A, in one screen DF, the detection target macro block MB
A search area SA centered on the search area SA is set, the input image data of the macroblock MB to be detected is read from the memory 14 and stored in the input image buffer 15, and the reference image data of the search area SA is stored in the memory 14 , And stored in the reference image buffer 16. Here, as shown in FIG.
Is a range of 5 vertical macroblocks and 9 horizontal macroblocks in a frame image or a field image with the detection target macroblock MB as a center.
The moving range for searching for the macroblock MB in A is ± 2 vertical macroblocks (± 32 pixels) and ± 4 horizontal macroblocks (± 64 pixels).

【0029】そして、図4(a)に矢印で示すように、
画面DF内を右方向、即ち、画像の水平走査方向に検出
対象マクロブロックMBが移っていくと、これにともな
って探索範囲SAも1マクロブロック分ずつ同じ方向に
移っていくことになる。検出対象マクロブロックMBが
画面DFの右端のものとなると、次には、1つ下のマク
ロブロック配列ラインの左端のマクロブロックが検出対
象マクロブロックMBとなり、そのラインを右方向に順
次検出対象マクロブロックMBが移っていく。
Then, as shown by an arrow in FIG.
As the detection target macroblock MB moves rightward in the screen DF, that is, in the horizontal scanning direction of the image, the search range SA also moves in the same direction by one macroblock at a time. When the macroblock MB to be detected becomes the rightmost one of the screen DF, the macroblock at the left end of the next lower macroblock array line becomes the macroblock MB to be detected, and the lines are sequentially shifted to the right in the right direction. The block MB moves.

【0030】以上のことは、探索範囲SAの大きさの点
を除いて、上記の従来技術と同様である。
The above is the same as the above prior art except for the size of the search range SA.

【0031】また、図5に示すように、いま、検出対象
マクロブロックMB’に対し、探索範囲SA’を用いて
動きベクトルの検索が終了すると、その右隣のマクロブ
ロックが検索対象マクロブロックMBとなり、これに対
して探索範囲SAが設定されるが、この探索範囲SAは
1つ前の探索範囲SA’とハッチングした部分で重複し
ており、このハッチング部分の参照画像データはこの探
索範囲SA内の参照画像データとして用いることができ
る。このために、探索範囲SAについては、ハッチング
以外の領域ΔSA(この領域ΔSAは、図4(b)で明
らかなように、水平方向に1マクロブロック幅、垂直方
向に5マクロブロック幅の領域である。この実施形態で
は、探索範囲はかかる領域を9個含むものであるが、以
下、探索範囲内のかかる領域を探索領域という)での参
照画像データをメモリ14から読み出して参照画像バッ
ファ16に追加書込みすればよく、これにより、メモリ
14へのアクセス回数を低減することができる。
As shown in FIG. 5, when the search for the motion vector is completed for the detection target macroblock MB 'using the search range SA', the macroblock to the right of the search target macroblock MB 'becomes the search target macroblock MB'. The search range SA is set for the search range SA. The search range SA overlaps the previous search range SA ′ at a hatched portion, and the reference image data of the hatched portion is the search range SA. Can be used as reference image data. For this reason, regarding the search range SA, the area ΔSA other than the hatching (the area ΔSA is an area having a width of one macroblock in the horizontal direction and a width of 5 macroblocks in the vertical direction, as is apparent from FIG. 4B). In this embodiment, the search range includes nine such areas, but hereinafter, such an area within the search range is referred to as a search area.) The reference image data is read from the memory 14 and additionally written into the reference image buffer 16. By doing so, the number of accesses to the memory 14 can be reduced.

【0032】参照画像追加読出アドレス発生回路6は、
水平/垂直マクロブロックカウンタ4のカウント値によ
り、ある検出対象マクロブロックMB’の動きベクトル
の検出が終了すると、図5での探索領域ΔSAでの参照
画像データを読み出しすための参照画像追加読出アドレ
ス信号を発生し、メモリアクセス切換回路9を介してメ
モリ14に送る。この場合、図5に示す1つ前の探索範
囲SA’でのハッチングしていない1マクロブロック幅
の探索領域ΔSA’の参照画像データが不要となるの
で、参照画像バッファ16では、メモリ14から読み出
された図5に示す探索範囲SAの探索領域ΔSAの参照
画像データは、1つ前の探索範囲SA’の探索領域ΔS
A’での参照画像データが記憶されていたメモリ領域に
書き込まれる。
The reference image additional read address generation circuit 6
When the detection of the motion vector of a certain detection-target macroblock MB 'is completed based on the count value of the horizontal / vertical macroblock counter 4, the reference image additional read address for reading the reference image data in the search area ΔSA in FIG. A signal is generated and sent to the memory 14 via the memory access switching circuit 9. In this case, the reference image data of the search area ΔSA ′ having a width of one macroblock which is not hatched in the immediately preceding search range SA ′ shown in FIG. The output reference image data of the search area ΔSA of the search area SA shown in FIG.
The reference image data at A 'is written to the memory area where it was stored.

【0033】水平/垂直マクロブロックカウンタ4は、
画面同期回路1から画面の開始毎に供給されるスタート
信号によってリセットされて始めからカウントを開始
し、また、水平/垂直マクロブロックカウンタ3は、リ
セット遅延回路2で遅延されたこのスタート信号でリセ
ットされて始めからカウントを開始する。
The horizontal / vertical macro block counter 4
The count is started from the beginning after being reset by the start signal supplied from the screen synchronization circuit 1 every time the screen is started, and the horizontal / vertical macro block counter 3 is reset by the start signal delayed by the reset delay circuit 2. Start counting from the beginning.

【0034】図5で説明したように、検出対象マクロブ
ロックMB’の探索範囲SA’を用いた動きベクトルの
検出処理が動きベクトル探索回路17で行なわれ、検出
された動きベクトルが出力端子18から出力されると、
次に、メモリ14から次の検出対象マクロブロックMB
の入力画像データが読み出されて入力画像バッファ15
に書き込まれ、また、図5における探索範囲SAの探索
領域ΔSAの参照画像データがメモリ14から読み出さ
れて参照画像バッファ16に書き込まれるが、ここで
は、これらの書込み順序として、探索範囲SAの探索領
域ΔSAの参照画像データがメモリ14から読み出され
て参照画像バッファ16に書き込まれてから、次の検出
対象マクロブロックMBの入力画像データがメモリ14
から読み出されて入力画像バッファ15に書き込まれる
ものとしており、このため、水平/垂直マクロブロック
カウンタ5のカウント動作が水平/垂直マクロブロック
カウンタ5のカウント動作よりも探索範囲SAの探索領
域ΔSAの参照画像データのメモリ14からの読出し時
間分遅れるように、この水平/垂直マクロブロックカウ
ンタ5への上記スタート信号の供給をリセット遅延回路
2で遅らせる。
As described with reference to FIG. 5, a motion vector detecting process using the search range SA 'of the detection target macroblock MB' is performed by the motion vector searching circuit 17, and the detected motion vector is output from the output terminal 18. When output,
Next, the next detection target macro block MB is read from the memory 14.
Is read from the input image buffer 15
The reference image data in the search area ΔSA of the search range SA in FIG. 5 is read out from the memory 14 and written into the reference image buffer 16. After the reference image data of the search area ΔSA is read from the memory 14 and written into the reference image buffer 16, the input image data of the next detection target macroblock MB is stored in the memory 14.
, And is written into the input image buffer 15. Therefore, the counting operation of the horizontal / vertical macroblock counter 5 is smaller than the counting operation of the horizontal / vertical macroblock counter 5 in the search area ΔSA of the search range SA. The supply of the start signal to the horizontal / vertical macroblock counter 5 is delayed by the reset delay circuit 2 so as to delay the reference image data from the memory 14 by the reading time.

【0035】次に、図6及び図7により、検出対象マク
ロブロックMBが画面の右端部から左端部に移るときの
この実施形態の動作について説明する。但し、同図で
は、あるマクロブロック配列ラインでの検出対象マクロ
ブロックを符号MB1で、これに対する探索範囲を符号
SA1で夫々表わし、この次のマクロブロック配列ライ
ンでの検出対象マクロブロックを符号MB2で、これに
対する探索範囲を符号SA2で夫々表わしている。な
お、いうまでもないが、これらの探索範囲SA1,SA
2はフレーム画像またはフィールド画像での水平方向9
マクロブロック幅,垂直方向5マクロブロック幅の領域
である。
Next, the operation of this embodiment when the macroblock MB to be detected moves from the right end to the left end of the screen will be described with reference to FIGS. However, in the figure, a detection target macroblock in a certain macroblock array line is represented by a code MB1, a search range for the macroblock is represented by a code SA1, and a detection target macroblock in the next macroblock array line is represented by a code MB2. , A search range for this is represented by reference symbol SA2. Needless to say, these search ranges SA1, SA
2 is a horizontal direction 9 in a frame image or a field image
This is an area having a macroblock width of 5 macroblocks in the vertical direction.

【0036】まず、図6(a)は検出対象マクロブロッ
クMB1の探索範囲SA1が画面DFの右端に達した状
態を示している。ここで、この探索範囲SA1は、図4
(b)に示したように、横方向に9マクロブロック幅を
有しているから、参照画像の左側から1マクロブロック
幅ずつの9個の探索領域からなり、これら探索領域を夫
々A〜Iとする。即ち、探索領域Iは参照画像の最も右
端の1マクロブロック幅の範囲であり、探索領域Hは参
照画像での探索領域Iの左隣(つまり、右端から2番
目)の1マクロブロック幅の探索領域であり、……、探
索領域Aは参照画像の右端から9番目の1マクロブロッ
ク幅の探索領域である。この状態では、検出対象マクロ
ブロックMB1に対し、この探索範囲SA1全体の探索
領域A〜Iの参照画像データを用いて動きベクトルの検
出が行なわれる。
First, FIG. 6A shows a state where the search range SA1 of the detection target macroblock MB1 has reached the right end of the screen DF. Here, this search range SA1 is the same as FIG.
As shown in (b), since the reference image has a width of 9 macroblocks, the search image includes nine search regions each having a width of 1 macroblock from the left side of the reference image. And That is, the search area I is a range of one macroblock width at the right end of the reference image, and the search area H is a search of one macroblock width adjacent to the left of the search area I (that is, the second from the right end) in the reference image. The search area A is a ninth macroblock width search area from the right end of the reference image. In this state, a motion vector is detected for the detection target macroblock MB1 using the reference image data of the search areas A to I in the entire search range SA1.

【0037】この状態で動きベクトルの検出処理が終了
すると、図6(b)に示すように、右隣のマクロブロッ
クが検出対象マクロブロックMB1となって探索範囲S
A1も1マクロブロック幅分右方に移り、9個の探索領
域B〜Jからなる。探索領域B〜Iの参照画像データが
探索範囲SA1に含まれるが、この探索範囲SA1の破
線で示す右端の探索領域Jが画面DFからはみ出してし
まう。従って、この探索領域Jに対しては、参照画像デ
ータは存在しない。
When the motion vector detection processing is completed in this state, as shown in FIG. 6B, the macro block on the right becomes the detection target macro block MB1 and the search range S
A1 also shifts to the right by one macroblock width, and includes nine search areas B to J. The reference image data of the search areas B to I is included in the search area SA1, but the rightmost search area J indicated by the broken line of the search area SA1 protrudes from the screen DF. Therefore, no reference image data exists for this search area J.

【0038】そこで、この実施形態では、探索範囲SA
1の探索領域Jが画面DFの右端からはみ出したときに
は、図6(b)の画面DFの左側に示すように、次のマ
クロブロック配列ラインの画面DFの左端よりもさらに
左端にある検出対象マクロブロックMB2を想定し、こ
の検出マクロブロックMB2の探索範囲SA2での画面
右端の探索領域jが画面DFの左端にかかったものとし
て、この探索領域Jの代わりに、この探索領域jの参照
画像データをメモリ14から読み出し、参照画像バッフ
ァ16の探索領域Aが格納されていたメモリ領域に追加
書き込む。
Therefore, in this embodiment, the search range SA
When the first search area J extends beyond the right end of the screen DF, as shown on the left side of the screen DF in FIG. 6B, the detection target macro located further left than the left end of the screen DF of the next macroblock array line. Assuming a block MB2, assuming that a search area j at the right end of the screen in the search range SA2 of the detected macroblock MB2 extends over the left end of the screen DF, the reference image data of the search area j is used instead of the search area J. Is read from the memory 14 and additionally written into the memory area of the reference image buffer 16 where the search area A was stored.

【0039】そして、動きベクトル探索回路17では、
入力画像バッファ15に格納されている検出対象マクロ
ブロックMB1と、参照画像バッファ16に格納されて
いる探索範囲SA1内の探索領域B〜I及び探索範囲S
A2内の探索領域jとにより、この検出対象マクロブロ
ックMB1に対する動きベクトルの検出処理を行なう
が、その処理結果のうちの探索範囲SA2内の探索領域
jに関係する部分が探索範囲制限回路19によって除か
れる。
Then, in the motion vector search circuit 17,
The detection target macroblock MB1 stored in the input image buffer 15 and the search areas B to I and the search range S in the search range SA1 stored in the reference image buffer 16
The motion vector detection process for the detection target macroblock MB1 is performed using the search area j in A2. Removed.

【0040】即ち、動きベクトル探索回路17では、次
の探索範囲SA2の一部(つまり、探索領域j)も含め
て、参照画像バファ16に格納されている1探索範囲分
の参照画像データを用いて動きベクトルの検出処理を行
なうが、検出対象マクロブロック(即ち、マクロブロッ
クMB1)を含まない探索範囲(即ち、探索範囲SA
2)に含まれる探索領域(即ち、探索領域j)の参照画
像データが関係する処理結果は探索範囲制限回路19に
よって除かれ、検出対象マクロブロック(即ち、マクロ
ブロックMB1)を含む探索範囲(即ち、探索範囲SA
1)に含まれる参照画像の探索領域(即ち、探索領域B
〜I)内の参照画像データによる処理結果から動きベク
トルを求めるものである。
That is, the motion vector search circuit 17 uses the reference image data for one search range stored in the reference image buffer 16 including a part of the next search range SA2 (that is, the search area j). To perform a motion vector detection process.
The processing result relating to the reference image data of the search area (ie, search area j) included in 2) is removed by the search range limiting circuit 19, and the search area including the detection target macroblock (ie, macroblock MB1) (ie, the search area). , Search range SA
The search area of the reference image included in 1) (that is, search area B)
1) to obtain a motion vector from a processing result based on the reference image data in I).

【0041】そこで、図6(b)に示す状態で探索範囲
SA1の探索領域B〜Iの参照画像から検出対象マクロ
ブロックMB1の動きベクトルが求まると、図6(c)
に示すように、次の検出対象マクロブロックMB1に対
し、探索範囲SA1が設定される。この場合には、探索
範囲SA1は右側の2個の探索領域が画面DFの右端か
らはみ出す(このはみ出した部分を1マクロブロック幅
ずつの探索領域J,Kとする)が、これに対して、画面
DFの左端部に次の検出対象マクロブロックMB2に対
する探索範囲SA2の右側の夫々1マクロブロック幅の
探索領域j,kが設定される。つまり、図6(c)に示
す状態で、メモリ14から探索範囲SAの探索領域kで
の参照画像データが読み出され、参照画像バッファ16
での探索領域Bが格納されていたメモリ領域に追加書き
込まれるのである。
Therefore, when the motion vector of the macroblock MB1 to be detected is obtained from the reference images of the search areas B to I in the search range SA1 in the state shown in FIG. 6B, FIG.
As shown in (1), a search range SA1 is set for the next detection target macroblock MB1. In this case, the search range SA1 is such that the two right search areas protrude from the right end of the screen DF (the protruding portions are referred to as search areas J and K each having a width of one macroblock). At the left end of the screen DF, search areas j and k each having a width of one macroblock on the right side of the search range SA2 for the next detection target macroblock MB2 are set. That is, in the state shown in FIG. 6C, the reference image data in the search area k of the search range SA is read from the memory 14 and the reference image buffer 16
Is additionally written into the memory area where the search area B was stored.

【0042】この図6(c)に示す状態では、動きベク
トル探索回路17において、探索範囲SA1の探索領域
C〜Iと探索探索領域j,kとの参照画像データとによ
り、検出対象マクロブロックMB1に対する動きベクト
ルの検出処理がなされるが、その処理結果のうちの探索
範囲SA2の探索領域j,kの参照画像データに対する
処理結果が探索範囲制限回路19によって除かれ、探索
範囲SA1の探索領域C〜Iの参照画像データのみから
動きベクトルが求められる。
In the state shown in FIG. 6C, the motion vector search circuit 17 uses the search areas CI to I of the search range SA1 and the reference image data of the search search areas j and k to detect the macroblock MB1 to be detected. Is performed, the processing result for the reference image data in the search areas j and k in the search range SA2 is removed by the search range limiting circuit 19, and the search area C in the search range SA1 is removed. A motion vector is obtained only from the reference image data of .about.I.

【0043】以下同様にして、検出対象マクロブロック
MB1が1つずつ右方向に移り、探索範囲SA1も1マ
クロブロック幅ずつ右方に移動し、図6(d),(e)
に示す状態となって、夫々の検出対象マクロブロックM
B1の動きベクトルが探索範囲SA1内の参照画像デー
タから求められる。
Similarly, the detection target macroblock MB1 moves rightward one by one, and the search range SA1 also moves rightward one macroblock width, as shown in FIGS. 6 (d) and 6 (e).
And the respective detection target macroblocks M
The motion vector of B1 is obtained from the reference image data within the search range SA1.

【0044】図6(e)に示す状態で動きベクトルの検
出が終わると、次に、図7(f)に示すように、検出対
象マクロブロックは、画面DFの左端でのマクロブロッ
クMB1よりも1つ下のマクロブロック配列ラインの左
端のマクロブロックMB2に移る。このとき、探索範囲
SA2の探索領域nの参照画像データがメモリ14から
読み出され、参照画像バッファ16での先の探索範囲S
A1での範囲Eが格納されていたメモリ領域に追加書込
みされて、この検出対象マクロブロックMB2に対する
探索範囲SA2が、先の探索範囲SA1よりも1マクロ
ブロック幅分下方に設定されるが、この探索範囲SA2
の左側4個の探索領域が画面DFの左端からはみ出して
いる。
When the detection of the motion vector is completed in the state shown in FIG. 6 (e), then, as shown in FIG. 7 (f), the macroblock to be detected is larger than the macroblock MB1 at the left end of the screen DF. The process moves to the leftmost macroblock MB2 of the next lower macroblock array line. At this time, the reference image data of the search area n of the search range SA2 is read from the memory 14, and the previous search range S in the reference image buffer 16 is read.
Additional writing is performed in the memory area where the range E in A1 is stored, and the search range SA2 for this detection target macroblock MB2 is set one macroblock width lower than the previous search range SA1. Search range SA2
The four search areas on the left side of protrude from the left end of the screen DF.

【0045】この状態においては、この検出対象マクロ
ブロックMB2の動きベクトル検出のための動きベクト
ル探索回路17での処理が、探索範囲SA1の探索領域
F〜Iと探索範囲SA2の探索領域j〜nとの参照画像
データを用いてなされるが、検出対象マクロブロックM
B2が探索範囲SA2内にあることから、この処理結果
のうち、探索範囲SA1の探索領域F〜Iによるものが
探索範囲制限回路19によって除かれ、探索範囲SA2
の探索領域j〜nの参照画像データに対する処理結果か
ら動きベクトルが求められる。
In this state, the processing in the motion vector search circuit 17 for detecting the motion vector of the detection target macroblock MB2 is performed by the search areas FI to I of the search area SA1 and the search areas j to n of the search area SA2. Is performed using the reference image data of the macro block M to be detected.
Since B2 is within the search range SA2, of the processing results, those based on the search areas F to I of the search range SA1 are removed by the search range limiting circuit 19, and the search range SA2
Are obtained from the processing results for the reference image data in the search areas j to n.

【0046】以下同様にして、検出対象マクロブロック
MB2が右方に移っていくに従い、図7(g),
(h),(i)に示すように、順次探索領域o,p,q
の参照画像データがメモリ14から読み出されて参照画
像バッファ16の探索範囲SA1の参照画像データが格
納されていたメモリ領域に追加書き込まれていき、これ
によって検出対象SA2の探索範囲SA2が1マクロブ
ロック幅分ずつ右方向に移動していく。そして、図7
(j)に示す状態以降では、検出対象マクロブロックM
B2の動きベクトルが、その探索範囲SA2全体の参照
画像データを用いて求められるようになる。
Similarly, as the detection target macroblock MB2 moves to the right, FIG.
As shown in (h) and (i), the search areas o, p, q
Is read from the memory 14 and is additionally written in the memory area of the reference image buffer 16 in which the reference image data of the search range SA1 is stored, whereby the search range SA2 of the detection target SA2 becomes one macro. Move to the right by the block width. And FIG.
After the state shown in (j), the detection target macroblock M
The motion vector of B2 is obtained using the reference image data of the entire search range SA2.

【0047】このようにして、この実施形態では、検出
対象マクロブロックMBが画面DFの右端から左端に移
るときも、連続してメモリ14からの1探索領域ずつの
参照画像データの読出しが行なわれ、上記従来技術での
ような読出しの休止期間を設ける必要がなく、特に、メ
モリ14での画像データの書込みや読出しのタイムスロ
ットを有効に割り当てることができて、メモリアクセス
を有効に利用することができる。
As described above, in this embodiment, even when the macro block MB to be detected moves from the right end to the left end of the screen DF, the reference image data is continuously read from the memory 14 for each search area. It is not necessary to provide an idle period for reading as in the prior art described above, and in particular, it is possible to effectively allocate time slots for writing and reading image data in the memory 14 and effectively use memory access. Can be.

【0048】また、探索範囲制限回路19を用いること
により、動きベクトル探索回路17の処理動作を常に探
索範囲全体の参照画像データが供給された状態で行なう
ことができて、かつ、画像内容に連続性のない他の探索
範囲の参照画像データによる処理結果を除くものである
から、動きベクトル探索回路17での処理も連続して行
なわれて、参照画像バッファ16からこの動きベクトル
探索回路17への探索範囲の参照画像データの読出しも
連続して行なわせることができ、動きベクトル探索回路
17の処理や参照画像バッファ16の動作制御が簡略化
できる。
Further, by using the search range limiting circuit 19, the processing operation of the motion vector search circuit 17 can always be performed in a state in which the reference image data of the entire search range is supplied, and the motion vector Since the processing result by the reference image data in the other search range having no characteristic is excluded, the processing in the motion vector search circuit 17 is also performed continuously, and the processing from the reference image buffer 16 to the motion vector search circuit 17 is performed. The reading of the reference image data in the search range can be performed continuously, and the processing of the motion vector search circuit 17 and the operation control of the reference image buffer 16 can be simplified.

【0049】なお、この実施形態では、探索範囲SAを
横長の領域としているが、画像の動きとしては、一般
に、垂直方向よりも水平方向の動き成分の方が多く、か
つ水平方向の動きが速い場合が多いので、このように探
索範囲SAを横長とすることにより、横方向の動きを広
範囲にわたって検出することができ、また、探索範囲S
Aを、上記従来技術での探索範囲に比べて、横9マクロ
ブロック幅,横5マクロブロック幅と充分広くすること
により、横方向の動きばかりでなく、縦方向の動きも広
い範囲で検出することができる。
In this embodiment, the search range SA is a horizontally long region. However, as for the motion of an image, the motion component in the horizontal direction is generally larger than that in the vertical direction, and the motion in the horizontal direction is faster. In many cases, by making the search range SA horizontally long, it is possible to detect a horizontal movement over a wide range, and furthermore, the search range S
By making A sufficiently wider than the search range in the prior art, that is, 9 horizontal macroblocks and 5 horizontal macroblocks, not only the horizontal movement but also the vertical movement can be detected in a wide range. be able to.

【0050】また、上記の探索範囲SAを、上記のよう
な画素のサブサンプリングをせず、もとのフレーム画像
やフィールド画像の全ての画像データからなるものとす
ると、1画素の精度で動きベクトルを検出することがで
きるが、上記従来技術のように粗い精度の検出と細かい
精度の検出との2段階探索の場合には、この実施形態を
粗い精度の検出に用い、図2(a)に示したように、こ
の探索範囲SAや検出対象マクロブロックMBを1画素
おきにサブサンプリングし、2画素の精度で動きベクト
ルを検出するようにしてもよい。
If the search range SA is made up of all the image data of the original frame image and field image without sub-sampling the pixels as described above, the motion vector can be calculated with an accuracy of one pixel. Can be detected. However, in the case of a two-stage search of coarse precision detection and fine precision detection as in the above-described conventional technique, this embodiment is used for coarse precision detection, and FIG. As shown, the search range SA and the detection target macroblock MB may be sub-sampled every other pixel, and the motion vector may be detected with an accuracy of two pixels.

【0051】次に、図1における要部の具体例について
説明する。図8は図1における参照画像バッファ16,
動きベクトル探索回路17及び探索範囲制限回路19の
一具体例を示すブロック図であって、20,21は入力
端子、22は比較無効信号発生回路、23は探索領域カ
ウンタ、24は予測誤差算出部、25は予測誤差比較
部、26はデータ切換回路、27は書込領域選択カウン
タ、28は書込アドレス発生回路、29は領域リセット
回路、30は読出領域カウンタ、31は読出アドレス発
生回路、32はアドレス切換回路、33はバッファメモ
リであり、図1に対応する部分には同一符号を付けて重
複する説明を省略する。
Next, a specific example of the main part in FIG. 1 will be described. FIG. 8 shows the reference image buffer 16 in FIG.
FIG. 2 is a block diagram showing a specific example of a motion vector search circuit 17 and a search range limiting circuit 19, wherein reference numerals 20 and 21 denote input terminals, 22 denotes a comparison invalid signal generation circuit, 23 denotes a search area counter, and 24 denotes a prediction error calculation unit. , 25 a prediction error comparing section, 26 a data switching circuit, 27 a write area selection counter, 28 a write address generation circuit, 29 an area reset circuit, 30 a read area counter, 31 a read address generation circuit, 32 Denotes an address switching circuit, and 33 denotes a buffer memory. The same reference numerals are given to portions corresponding to those in FIG.

【0052】同図において、メモリ14(図1)から読
み出された検出対象マクロブロックMBの入力画像デー
タやこの検出対象マクロブロックMBに対する探索範囲
SAの右端の探索領域の参照画像データは入力端子21
から入力され、この入力画像データが入力画像バッファ
15に、この参照画像データが参照画像バッファ16に
夫々供給される。
In the figure, the input image data of the detection target macroblock MB read from the memory 14 (FIG. 1) and the reference image data of the rightmost search area of the search range SA for the detection target macroblock MB are input terminals. 21
The input image data is supplied to the input image buffer 15 and the reference image data is supplied to the reference image buffer 16.

【0053】この参照画像バッファ16では、データ切
換回路26が書込みと読出しとでのデータの切換えを行
ない、データ書込み時では、入力端子21から入力され
た1探索領域の参照画像データをバッファメモリ33に
供給する。バッファメモリ33は、1探索範囲が9個の
探索領域からなることに対応して、9個のメモリ領域1
〜9に区分されている。
In the reference image buffer 16, the data switching circuit 26 switches data between writing and reading, and at the time of data writing, the reference image data of one search area input from the input terminal 21 is stored in the buffer memory 33. To supply. The buffer memory 33 includes nine memory areas 1 corresponding to one search range including nine search areas.
-9.

【0054】書込領域選択カウンタ27は、メモリ14
(図1)からの探索範囲SAの右端の探索領域の参照画
像データの読出しに同期してカウントアップし、そのカ
ウント値に応じて書込アドレス発生回路28がデータ切
換回路26からのこの探索領域の参照画像データのバッ
ファメモリ33での書込領域をメモリ領域1〜9のいず
れにするかを決定する書込アドレス信号を発生する。ま
た、このバッファメモリ33でのメモリ領域1〜9のい
ずれかへの1探索領域分の参照画像データの書込みが終
了すると、このバッファメモリ33全体から探索範囲S
A全体の読出しが開始されるが、このための読出アドレ
ス信号が読出アドレス発生回路31で生成される。図9
はバッファメモリ33でのかかる書込アドレス信号と読
出アドレス信号の発生タイミングを示す図である。ま
た、アドレス切換回路32は、これら書込アドレス信号
と読出アドレス信号とを切り換えてバッファメモリ33
に供給する。
The write area selection counter 27 is
The count-up is performed in synchronization with the reading of the reference image data in the search area on the right end of the search area SA from FIG. 1 (FIG. 1). A write address signal for determining which of the memory areas 1 to 9 is to be used as the write area of the reference image data in the buffer memory 33. When the writing of the reference image data for one search area to any of the memory areas 1 to 9 in the buffer memory 33 is completed, the search range S
Reading of the entire A is started, and a read address signal for this is generated by the read address generation circuit 31. FIG.
FIG. 4 is a diagram showing the generation timing of the write address signal and the read address signal in the buffer memory 33. The address switching circuit 32 switches between the write address signal and the read address signal to switch the buffer memory 33.
To supply.

【0055】ここで、書込領域選択カウンタ27のカウ
ント値は領域オフセット回路29で所定値のオフセット
が付されて読出領域カウンタ30に供給され、そのカウ
ント値に応じて読出アドレス発生回路31が読出アドレ
ス信号を発生するのであるが、この領域オフセット回路
29で付されるオフセット値により、バッファメモリ3
3でのメモリ領域1〜9のうちの読出開始となるメモリ
領域の設定と書込開始から所定時間t1だけ遅れた読出
開始タイミング(図9)とが設定される。
Here, the count value of the write area selection counter 27 is supplied to the read area counter 30 with a predetermined value offset by the area offset circuit 29, and the read address generation circuit 31 reads the count value in accordance with the count value. The address signal is generated.
In step 3, the setting of the memory area from among the memory areas 1 to 9 at which reading is started and the reading start timing (FIG. 9) delayed by a predetermined time t1 from the start of writing are set.

【0056】図10はバッファメモリ33での書込み/
読出しの動作を示す図である。いま、図5に示すよう
に、検出対象マクロブロックMB’に対して設定された
探索範囲SA’内の参照画像データが、図10(a)に
示すように格納されているものとする。なお、ここで
は、メモリ領域1に探索範囲SA’の右端の探索領域Δ
SA’の参照画像データが格納され、残りの図5に示す
ハッチングした8個の探索領域の参照画像データがメモ
リ領域2〜9に格納されているものとする。
FIG. 10 shows the writing / writing in the buffer memory 33.
FIG. 7 is a diagram illustrating a read operation. Now, as shown in FIG. 5, it is assumed that reference image data within the search range SA 'set for the detection target macroblock MB' is stored as shown in FIG. Here, the search area Δ at the right end of the search range SA ′ is stored in the memory area 1.
It is assumed that the reference image data of SA ′ is stored, and the reference image data of the remaining eight hatched search areas shown in FIG.

【0057】図10(a)に示すかかる状態において、
検出対象マクロブロックMB’の動きベクトルを検出す
るときには、矢印で示すように、メモリ領域1から順に
メモリ領域2,3,……,9と参照画像データの読出し
が行なわれる。そして、この動きベクトル検出のための
読出しが終ると、図5での次の検出対象マクロブロック
MBの動きベクトル検出のために、次の探索範囲SAの
設定が必要であり、このために、この探索範囲SAの右
端の探索領域ΔSAの参照画像データがメモリ14(図
1)から読み出されるのであるが、この参照画像データ
は、図10(b)に示すように、探索領域ΔSA’の参
照画像データの代わりに、メモリ領域1に書き込まれ
る。この書込みが終わると、探索範囲SAでは、メモリ
領域2に格納されている参照画像データが最も左端の範
囲のものとなるから、矢印で示すように、このメモリ領
域2から順にメモリ領域3,4,……,9と読み出さ
れ、最後にメモリ領域1が読み出される。
In the state shown in FIG.
When the motion vector of the detection target macroblock MB 'is detected, the reference image data is read from the memory areas 1, 3,... When the reading for detecting the motion vector is completed, the next search range SA needs to be set for detecting the motion vector of the next detection target macroblock MB in FIG. The reference image data of the search area ΔSA at the right end of the search area SA is read from the memory 14 (FIG. 1). The reference image data is, as shown in FIG. The data is written to the memory area 1 instead of the data. When this writing is completed, in the search range SA, the reference image data stored in the memory area 2 is in the leftmost range. Therefore, as indicated by an arrow, the memory areas 3, 4 ,..., 9, and finally the memory area 1 is read.

【0058】さらに次の検出対象マクロブロックに対し
ては、メモリ14(図1)から読み出された参照画像デ
ータは、バッファメモリ33のメモリ領域2に書き込ま
れ、次いで、メモリ領域3から順にメモリ領域4,5,
……,9と読み出され、さらに、メモリ領域1,2と読
み出されることにより、探索範囲全体の参照画像データ
が読み出される。
For the next macro block to be detected, the reference image data read from the memory 14 (FIG. 1) is written to the memory area 2 of the buffer memory 33, and then the memory area 3 Regions 4, 5,
.., 9 and the memory areas 1 and 2, the reference image data of the entire search range is read.

【0059】このようにして、検出対象マクロブロック
が1つずつ右方に移る毎に、不要となった参照画像デー
タが格納されていたメモリ領域に新たな参照画像データ
が書き込まれ、その次のメモリ領域から読み出されて、
データ切換回路26を介し、動きベクトル探索回路17
の予測誤差算出部24に供給される。
In this way, each time the macro block to be detected moves to the right one by one, new reference image data is written into the memory area where the unnecessary reference image data is stored, and the next reference image data is written. Read from the memory area,
The motion vector search circuit 17 via the data switching circuit 26
Is supplied to the prediction error calculation unit 24.

【0060】次に、図6及び図7で説明したように、検
出対象マクロブロックMBが画面DFの右端から左端に
移るときのバッファメモリ33でのデータの書込み/読
出し動作を、図11により説明する。
Next, the data write / read operation in the buffer memory 33 when the macro block MB to be detected moves from the right end to the left end of the screen DF as described with reference to FIGS. I do.

【0061】いま、図6(a)に示すように、探索範囲
SAが画面DFの右端にあるときの状態で、図11
(a)に示すように、バッファメモリ33のメモリ領域
1にこの探索範囲SA1の探索領域Aの参照画像データ
が格納されており(これを、探索範囲SA1の探索領域
Aが格納されているという。以下同様)、以下、メモリ
領域2,3,……,9にこの探索範囲SA1の探索領域
B,C,……,Iが格納されているとする。この状態で
は、メモリ領域1から順に矢印で示す方向に読出しが行
なわれ、動きベクトル探索回路17の予測誤差算出部2
4に供給される。
Now, as shown in FIG. 6A, when the search range SA is at the right end of the screen DF, FIG.
As shown in (a), the reference image data of the search area A of the search area SA1 is stored in the memory area 1 of the buffer memory 33 (this is referred to as the storage of the search area A of the search area SA1). Hereafter, it is assumed that the search areas B, C,..., I of this search range SA1 are stored in the memory areas 2, 3,. In this state, reading is performed sequentially from the memory area 1 in the direction indicated by the arrow, and the prediction error calculation unit 2 of the motion vector search circuit 17
4 is supplied.

【0062】図6(b)に示す状態では、図11(b)
に示すように、バッファメモリ33のメモリ領域1が次
の探索範囲SA2の探索領域jで書き換えられ、矢印で
示すように、メモリ領域2から順に読み出され、最後
に、メモリ領域1の探索領域jが読み出される。以下、
図6(c),(d)と状態が変化するとともに、バッフ
ァメモリ33では、メモリ領域2に探索範囲SA2の探
索領域kが書き込まれ、メモリ領域3に探索領域lが書
き込まれて、矢印で示すように読出しが行なわれる。そ
して、図6(e)に示す状態になると、さらに、メモリ
領域4に探索範囲SA2の探索領域mが書き込まれ、矢
印で示すように、メモリ領域5からメモリ領域4まで順
に読み出される。
In the state shown in FIG. 6B, the state shown in FIG.
As shown in the figure, the memory area 1 of the buffer memory 33 is rewritten with the search area j of the next search area SA2, and is sequentially read from the memory area 2 as shown by the arrow. j is read. Less than,
6C and 6D, the search area k of the search range SA2 is written in the memory area 2 in the buffer memory 33, the search area 1 is written in the memory area 3, and Reading is performed as shown. Then, when the state shown in FIG. 6E is reached, the search area m of the search range SA2 is further written in the memory area 4, and are sequentially read from the memory area 5 to the memory area 4 as indicated by arrows.

【0063】この図11(e)までの状態は、ハッチン
グして示すメモリ領域に図6(a)〜(e)までの検出
対象マクロブロックMB1に対する探索範囲SA1の参
照画像データが格納されており、バッファメモリ33か
ら読み出された参照画像データ全体が動きベクトル探索
回路24の予測誤差算出部24に供給されて、入力画像
バッファ15から読み出された検出対象マクロブロック
MBの入力画像データとで予測誤差算出の処理がなされ
るが、その処理結果のうちの探索範囲SA1の参照画像
データによる処理結果のみが、探索範囲制限回路19に
より、予測誤差比較部25で使用されて検出対象マクロ
ブロックMBに対する動きベクトルが検出される。
In the state up to FIG. 11E, reference image data of the search range SA1 for the macroblock MB1 to be detected shown in FIGS. 6A to 6E is stored in the hatched memory area. The entire reference image data read from the buffer memory 33 is supplied to the prediction error calculating unit 24 of the motion vector search circuit 24, and the input image data of the detection target macroblock MB read from the input image buffer 15 is used. The prediction error calculation process is performed. Of the processing results, only the processing result based on the reference image data of the search range SA1 is used by the prediction range comparison circuit 25 by the search range limiting circuit 19 and is used as the detection target macroblock MB. Is detected.

【0064】次に、図7(f)に示す状態になると、図
11(f)に示すように、バッファメモリ33のメモリ
領域5に探索範囲SA2の探索領域nが書き込まれ、矢
印で示すように、メモリ領域6から始まってメモリ領域
5で終わる読出しが行なわれる。この場合には、検出対
象マクロブロックMB2は画面DFの左側に移ってお
り、このために、バッファメモリ33のハッチングして
示すメモリ領域1〜5から読み出された探索範囲SA2
の探索領域j〜nの参照画像データが動きベクトル探索
回路17での動きベクトルの検出に有効となる。
Next, in the state shown in FIG. 7F, the search area n of the search range SA2 is written in the memory area 5 of the buffer memory 33 as shown in FIG. Then, a read operation starting from the memory area 6 and ending at the memory area 5 is performed. In this case, the detection target macro block MB2 has moved to the left side of the screen DF, and therefore, the search range SA2 read from the hatched memory areas 1 to 5 of the buffer memory 33.
The reference image data of the search areas j to n are effective for detecting the motion vector in the motion vector search circuit 17.

【0065】以下、図7(g),(h),(i)と状態
が移るとともに、図11(g),(h),(i)に示す
ように、メモリ領域6,7,8に順に探索範囲SA2の
探索領域o,p,qが書き込まれていき、夫々矢印で示
す順に読出しが行なわれるが、夫々の状態でハッチング
して示すメモリ領域から読み出された参照画像データが
動きベクトル探索回路17での動きベクトルの検出に有
効となる。そして、図6(j)に示す状態になると、図
11(j)に示すように、動きベクトル探索回路17で
は、バッファメモリ33から読み出される全ての参照画
像データが動きベクトル検出に有効となる。
Thereafter, the state changes to FIGS. 7 (g), 7 (h) and 7 (i), and as shown in FIGS. 11 (g), (h) and (i), The search areas o, p, and q of the search range SA2 are sequentially written, and reading is performed in the order indicated by arrows. This is effective for detecting a motion vector in the search circuit 17. Then, in the state shown in FIG. 6 (j), as shown in FIG. 11 (j), in the motion vector search circuit 17, all the reference image data read from the buffer memory 33 becomes effective for the motion vector detection.

【0066】次に、図12により、図8における動きベ
クトル探索回路17での予測誤差算出部24の動作につ
いて説明する。なお、ここでは、図6(b)に示す状態
のときの説明とし、この場合には、参照画像バッファ1
6のバッファメモリ33には、図11(b)に示す状態
で参照画像データが格納されている。
Next, the operation of the prediction error calculator 24 in the motion vector search circuit 17 in FIG. 8 will be described with reference to FIG. Here, the description will be given for the state shown in FIG. 6B, and in this case, the reference image buffer 1
Reference image data is stored in the buffer memory 33 of No. 6 in the state shown in FIG.

【0067】まず、バッファメモリ33からそのメモリ
領域2に格納されている探索範囲SA1の探索領域Bの
参照画像データが読み出され、予測誤差算出部24に供
給される。また、このときには、入力画像バッファ15
から検出対象マクロブロックMB1の入力画像データも
読み出されて、この予測誤差算出部24に供給されてい
る。探索領域カウンタ23はバッファメモリ33からの
メモリ領域の読出個数をカウントするものであって、そ
のカウント値は、入力画像バッファ15から予測誤差算
出部24に入力画像データが読み取られてからのバッフ
ァメモリ33のメモリ領域の読出個数を表わす。このと
き、探索領域カウンタ23のカウント値は1となる。
First, the reference image data of the search area B in the search area SA1 stored in the memory area 2 is read from the buffer memory 33 and supplied to the prediction error calculation section 24. At this time, the input image buffer 15
The input image data of the macro block MB1 to be detected is also read out from the block and supplied to the prediction error calculation unit 24. The search area counter 23 counts the number of memory areas read out from the buffer memory 33. It indicates the number of readouts of 33 memory areas. At this time, the count value of the search area counter 23 is 1.

【0068】そして、図12(a)に示すように(な
お、説明を簡明にするために、予測誤差算出部24に取
り込まれる探索領域を探索範囲SA1と関連させて図示
している)、まず、検出対象マクロブロックMB1と同
じ大きさで同じ画素データ配列からなる範囲(以下、こ
れを探索マクロブロックSMAという)を探索領域Bの
上端部に仮想的に位置設定し、検出対象マクロブロック
MB1内の入力画像データとこの探索マクロブロックS
MA内の参照画像データとについて、これらの対応する
画素データ毎の誤差を算出してその総和を求める。この
誤差算出が終了すると、次に、探索マクロブロックSM
Aを、図12(b)に示すように、1画素間隔d3分
(検出対象マクロブロックMB1や探索範囲SA1内
で、図2(a)のように、1つおきの画素をサブサンプ
リングしているときには、もとの画像の2画素間隔分)
矢印で示す下方向(この方向を+(プラス)方向とす
る)に移動させ、この状態で検出対象マクロブロックM
B1内での入力画像データと探索マクロブロックSMB
内の参照画像データとの上記の誤差の総和を算出する。
Then, as shown in FIG. 12A (for simplicity, the search area taken into the prediction error calculation unit 24 is shown in relation to the search range SA1). A range (hereinafter, referred to as a search macroblock SMA) having the same size and the same pixel data array as the detection target macroblock MB1 is virtually set at the upper end of the search area B, and is set in the detection target macroblock MB1. Input image data and the search macroblock S
With respect to the reference image data in the MA, an error for each of the corresponding pixel data is calculated, and the sum is obtained. When this error calculation is completed, the search macro block SM
As shown in FIG. 12 (b), A is subsampled every other pixel by one pixel interval d3 (within the detection target macroblock MB1 and the search range SA1 as shown in FIG. 2 (a)). When it is, it is 2 pixel interval of the original image)
It is moved in the downward direction indicated by an arrow (this direction is defined as a + (plus) direction), and in this state, the macro block M to be detected is moved.
Input image data and search macroblock SMB in B1
Is calculated with respect to the reference image data in the above.

【0069】以下同様にして、探索マクロブロックSM
Bを探索領域B内で順次1画素間隔d3分ずつ下方に移
動させながら、その都度検出対象マクロブロックMB1
内での入力画像データと探索マクロブロックSMA内の
参照画像データとの上記の誤差の総和を求め、図12
(c)に示すように、探索マクロブロックSMBが探索
領域Bの下端に達すると、予測誤差算出部24は、次
に、バッファメモリ33のメモリ領域3から探索範囲S
A1の探索領域Cの参照画像データを読み取る。このと
き、探索領域カウンタ23のカウント値は2となる。
Similarly, search macro block SM
B is sequentially moved downward in the search area B by one pixel interval d3, and each time the detection target macroblock MB1
The sum of the above-mentioned errors between the input image data in the search macroblock SMA and the reference image data in the search macroblock SMA is calculated,
As shown in (c), when the search macro block SMB reaches the lower end of the search area B, the prediction error calculation unit 24 next moves from the memory area 3 of the buffer memory 33 to the search range S.
The reference image data of the search area C of A1 is read. At this time, the count value of the search area counter 23 is 2.

【0070】そして、探索マクロブロックSMBを矢印
で示す右方向に1画素間隔d4分(探索領域が1画素お
きにサブサンプリングされている場合には、もとのフレ
ーム画像やフィールド画像での2画素間隔分)移動さ
せ、図12(d)に示す状態で検出対象マクロブロック
MB1内での入力画像データと探索マクロブロックSM
B内の参照画像データとの上記の誤差の総和を算出す
る。これ以降は探索マクロブロックSMBが、破線矢印
で示すように、上方(この方向を−(マイナス)方向と
する)に1画素間隔d3分ずつ移動し、探索範囲SA1
の上端に達すると、さらに右方に1画素間隔分移動して
再び下方に1画素間隔d3分ずつ移動し、その都度検出
対象マクロブロックMB1内での入力画像データと探索
マクロブロックSMB内での参照画像データとの上記の
誤差の総和を算出する。
Then, the search macroblock SMB is shifted rightward by one pixel interval d4 as indicated by the arrow (when the search area is sub-sampled every other pixel, two pixels in the original frame image or field image are used). 12D), and the input image data and the search macroblock SM in the detection target macroblock MB1 in the state shown in FIG.
The sum of the above-mentioned errors with the reference image data in B is calculated. Thereafter, the search macroblock SMB moves upward (this direction is referred to as a-(minus) direction) by one pixel interval d3 as shown by the broken line arrow, and the search range SA1
At the upper end of the target macroblock MB1, the pixel moves further rightward by one pixel interval and moves downward again by one pixel interval d3. Calculate the sum of the above errors with the reference image data.

【0071】このようにして、探索マクロブロックSM
Bが上下にジグザグに1画素間隔分ずつ右方向に移動し
て、その移動毎に検出対象マクロブロックMB1内での
入力画像データと探索マクロブロックSMB内での参照
画像データとの上記の誤差の総和を算出し、探索マクロ
ブロックSMBが最後に取り込まれた探索領域の右下隅
または右上隅に達すると、次の探索領域の参照画像デー
タがバッファメモリ33から読み取られ、これととも
に、探索領域カウンタ23は1だけカウントアップす
る。
Thus, the search macro block SM
B moves up and down in a zigzag manner by one pixel at a time in the right direction, and every time the B moves, the difference between the input image data in the detection target macroblock MB1 and the reference image data in the search macroblock SMB is determined. When the sum is calculated and the search macroblock SMB reaches the lower right corner or the upper right corner of the last captured search area, the reference image data of the next search area is read from the buffer memory 33 and the search area counter 23 is read. Counts up by one.

【0072】この場合、バッファメモリ33から最後に
読み取られるのは、次の探索範囲SA2での探索領域j
の参照画像データである。
In this case, the last read from the buffer memory 33 is the search area j in the next search range SA2.
Is the reference image data.

【0073】予測誤差算出部24で求められた上記の誤
差の総和は予測誤差比較部25に供給され、これら誤差
の総和を用いて検出対象マクロブロックMB1の動きベ
クトルが求められる。このとき、次の探索範囲SA2で
の探索領域jの参照画像データに関連して求められた誤
差の総和は、予測誤差比較部25において、探索範囲制
限回路19により、無効とされる。
The sum of the above-mentioned errors obtained by the prediction error calculation unit 24 is supplied to a prediction error comparison unit 25, and the motion vector of the macroblock MB1 to be detected is obtained using the sum of these errors. At this time, the total sum of the errors obtained in relation to the reference image data of the search area j in the next search range SA2 is invalidated by the search range limiting circuit 19 in the prediction error comparison unit 25.

【0074】この探索範囲制限回路19は比較無効信号
発生回路22からなり、探索領域カウンタ23のカウン
ト値を取り込むとともに、入力端子20から検出対象マ
クロブロックMB1の画面DF(例えば、図6)内での
位置を示すマクロブロックアドレス信号が供給される。
図6及び図7から明らかなように、検出対象マクロブロ
ックMB1の画面DF上での位置に応じて、この検出対
象マクロブロックMB1に対する探索範囲SA1の全体
が画面DF内にあるか否か、また、探索範囲SA1の一
部が画面DFからはみ出すとして、どの部分がはみ出す
か決まる。
The search range limiting circuit 19 comprises a comparison invalid signal generating circuit 22. The search range limiting circuit 19 captures the count value of the search area counter 23, and inputs the count value from the input terminal 20 into the screen DF (for example, FIG. 6) of the macroblock MB1 to be detected. Are supplied.
As is clear from FIGS. 6 and 7, depending on the position of the detection target macroblock MB1 on the screen DF, whether or not the entire search range SA1 for the detection target macroblock MB1 is within the screen DF; Assuming that a part of the search range SA1 protrudes from the screen DF, it is determined which part protrudes.

【0075】例えば、図6(b)に示す状態では、探索
範囲SA1の右端の1つ(左端から9番目の)探索領
域、即ち、探索領域Jが画面DFの右端からはみ出す
が、このことは入力端子20からのマクロブロックアド
レス信号によって判定することができる。また、探索領
域カウンタ23は、上記のように、バッファメモリ33
からのメモリ領域の読出個数をカウントするものである
から、そのカウント値が9のときに、バッファメモリ3
3から読み取る参照画像データが探索範囲SA2の探索
領域jに含まれるものであることが分かる。従って、比
較無効信号発生回路22は、予測誤差比較部25におい
て、この探索領域jの参照画像データに関係する上記誤
差の総和を無効にするタイミングで比較無効信号を発生
し、この予測誤差比較部25に供給する。
For example, in the state shown in FIG. 6 (b), one search area (the ninth from the left end) of the search area SA1, ie, the search area J, extends beyond the right end of the screen DF. It can be determined by the macro block address signal from the input terminal 20. Further, the search area counter 23 stores the buffer memory 33 as described above.
When the count value is 9, the buffer memory 3
It can be seen that the reference image data read from No. 3 is included in the search area j of the search range SA2. Therefore, the comparison invalid signal generation circuit 22 generates a comparison invalid signal at a timing when the prediction error comparison unit 25 invalidates the sum of the errors related to the reference image data of the search area j. 25.

【0076】また、例えば、図7(f)に示す状態で
は、検出対象マクロブロックMB2が画面DFの右端に
あり、この場合には、この検出対象マクロブロックMB
2に対する探索範囲SA2の左側4個の探索領域が画面
DFの左端からはみ出していることを、比較無効信号発
生回路22が入力端子20からのマクロブロックアドレ
ス信号から判定し、この結果、比較無効信号発生回路2
2は、探索領域カウンタ23のカウント値が1,2,
3,4であることを検知すると、このはみ出した探索領
域の参照画像データ(図11(f))において、バッフ
ァメモリ33のメモリ領域6,7,8,9から読み出さ
れる1つ前の探索範囲SA1の参照画像データ)が関係
する上記の誤差の総和を無効にする比較無効信号を発生
して予測誤差比較部25に供給する。
For example, in the state shown in FIG. 7F, the macro block MB2 to be detected is at the right end of the screen DF.
The comparison invalid signal generation circuit 22 determines from the macroblock address signal from the input terminal 20 that the four search areas on the left side of the search range SA2 with respect to 2 are protruded from the left end of the screen DF. Generation circuit 2
2 means that the count value of the search area counter 23 is 1, 2, 2,
When it is detected that the search area is 3, 4, the previous search range read from the memory areas 6, 7, 8, 9 of the buffer memory 33 in the reference image data (FIG. 11 (f)) of the protruded search area. A reference invalidation signal that invalidates the sum of the above-mentioned errors related to the SA1 reference image data) is generated and supplied to the prediction error comparison unit 25.

【0077】このように、バッファメモリ33からそこ
に格納されている探索範囲の参照画像データが読み出さ
れ、また、予測誤差算出部24はこれら参照画像データ
を全て誤差検出処理に用いるものであるから、検出対象
マクロブロックの画面上での位置に係らず、バッファメ
モリ33のデータ書込/読出制御に割り当てられるタイ
ムスロットは一定のものとなって、その制御が容易とな
るし、予測誤差算出部24での算出処理も常に一定の動
作で行なわれることになり、その構成や制御を簡略化す
ることができる。
As described above, the reference image data of the search range stored therein is read from the buffer memory 33, and the prediction error calculator 24 uses all of these reference image data for the error detection processing. Therefore, regardless of the position of the macroblock to be detected on the screen, the time slot allocated to the data write / read control of the buffer memory 33 becomes constant, which facilitates the control and calculates the prediction error. The calculation process in the unit 24 is always performed by a constant operation, and the configuration and control thereof can be simplified.

【0078】図13は図8における予測誤差算出部24
の一具体例を示すブロック図であって、35はフレーム
/フィールド構造設定回路、36,37はスイッチ、3
8は第1フィールド抜出し回路、39は上サブブロック
抜出し回路、40は第2フィールド抜出し回路、41は
下サブブロック抜出し回路、42は第1フィールド抜出
し回路、43は第2フィールド抜出し回路、44〜47
はシリアル/パラレル変換回路、48はプロセッサアレ
イ、49は1−1誤差総和計算回路、50は1−2誤差
総和計算回路、51は2−1誤差総和計算回路、52は
2−2誤差総和計算回路であり、図8に対応する部分に
は同一符号を付けて重複する説明を省略する。
FIG. 13 shows the prediction error calculator 24 in FIG.
35 is a block diagram showing a specific example of a frame / field structure setting circuit 35; switches 36 and 37;
8 is a first field extraction circuit, 39 is an upper sub block extraction circuit, 40 is a second field extraction circuit, 41 is a lower sub block extraction circuit, 42 is a first field extraction circuit, 43 is a second field extraction circuit, and 44 to 47
Is a serial / parallel conversion circuit, 48 is a processor array, 49 is a 1-1 error sum calculation circuit, 50 is a 1-2 error sum calculation circuit, 51 is a 2-1 error sum calculation circuit, and 52 is a 2-2 error sum calculation. This is a circuit, and the same reference numerals are given to portions corresponding to FIG.

【0079】MPEG2では、動画像信号をI,P,B
ピクチャと異なる方法で符号化するものであるが、この
ピクチャとしてフレームを割り当てることもできるし、
フィールドを割り当てることもできる。前者の割付け方
法をフレーム構造といい、後者の割付け方法をフィール
ド構造というが、この具体例でも、符号化をフレーム構
造で行なうか、フィールド構造で行なうかを選択するこ
とができるようにしている。
In MPEG2, moving picture signals are represented by I, P, B
It is encoded in a different way from a picture, but a frame can be assigned as this picture,
You can also assign fields. The former allocation method is referred to as a frame structure, and the latter allocation method is referred to as a field structure. In this specific example, it is possible to select whether to perform encoding using a frame structure or a field structure.

【0080】まず、フレーム構造の場合について説明す
ると、フレーム構造の場合には、入力画像バッファ15
に第1フィールド(たとえば、奇フィールド)と第2フ
ィールド(たとえば、偶フィールド)とで構成されるフ
レーム画像の一部としての検出対象マクロブロックMB
の入力画像データが格納されており、また、参照画像バ
ッファ16には、同様にして、フレーム画像の一部とし
ての探索範囲SAの参照画像データが格納されている。
このとき、スイッチ36,37は夫々、フレーム/フィ
ールド構造設定回路35により、図示するように、第1
フィールド抜出し回路38側,第2フィールド抜出し回
路40側に閉じている。
First, the case of the frame structure will be described. In the case of the frame structure, the input image buffer 15
To be detected as a part of a frame image composed of a first field (eg, an odd field) and a second field (eg, an even field)
, And the reference image buffer 16 similarly stores reference image data of the search range SA as a part of the frame image.
At this time, the switches 36 and 37 are respectively operated by the frame / field structure setting circuit 35 as shown in FIG.
It is closed on the field extraction circuit 38 side and the second field extraction circuit 40 side.

【0081】入力画像バッファ15からは、検出対象マ
クロブロックMBの入力画像データが画素毎にシリアル
に読み出され、第1フィールド抜出し回路38で第1フ
ィールドの画素データが、第2フィールド抜出し回路4
0で第2フィールドの画素データが夫々抜き出される。
ここで、フレーム構造の場合、検出対象マクロブロック
MBは、フレーム画像上水平,垂直方向で16×16画
素の範囲の大きさのものとなるが、水平方向では1つお
きの画素データがサブサンプリングされて1つおきの8
画素データらなり、また、垂直方向も、第1フィールド
抜出し回路38と第2フィールド抜出し回路40とで夫
々1つおきに分離されるから、8画素データからなる。
即ち、これら第1フィールド抜出し回路38と第2フィ
ールド抜出し回路40とから夫々、16×16画素から
なる検出対象マクロブロック内の入力画像データが第1
フィールドの画像データと第2フィールドの画像データ
とに分離されて、8×8画素からなる検出対象マクロブ
ロックとしての入力画像データが得られることになる。
From the input image buffer 15, the input image data of the detection target macroblock MB is read out serially for each pixel, and the first field extraction circuit 38 outputs the pixel data of the first field to the second field extraction circuit 4.
At 0, the pixel data of the second field is extracted respectively.
Here, in the case of the frame structure, the detection target macroblock MB has a size of 16 × 16 pixels in the horizontal and vertical directions on the frame image, but every other pixel data is sub-sampled in the horizontal direction. Every other 8
Each pixel is separated by the first field extraction circuit 38 and the second field extraction circuit 40 in the vertical direction, so that it is composed of eight pixel data.
That is, the first field extraction circuit 38 and the second field extraction circuit 40 respectively input the input image data in the macroblock to be detected consisting of 16 × 16 pixels into the first image data.
The image data of the field and the image data of the second field are separated, and the input image data as a detection target macroblock composed of 8 × 8 pixels is obtained.

【0082】第1フィールド抜出し回路38から出力さ
れる8×8=64画素データのシリアルデータは、スイ
ッチ36を介してシリアル/パラレル変換回路44に供
給され、マクロブロック内で垂直方向に配列された8画
素データがパラレルに配列されてこれが8列続くパラレ
ルデータ(即ち、8×8画素のパラレルデータ)に変換
される。同様にして、第2フィールド抜出し回路40か
ら出力される8×8=64画素のシリアルデータも、ス
イッチ37を介してシリアル/パラレル変換回路45に
供給され、同様の8×8画素のパラレルデータに変換さ
れる。これらシリアル/パラレル変換回路44,45か
ら出力されるパラレルデータは夫々、テンプレートデー
タT1,T2としてプロセッサアレイ48に供給され
る。
The serial data of 8 × 8 = 64 pixel data output from the first field extraction circuit 38 is supplied to the serial / parallel conversion circuit 44 via the switch 36 and is arranged vertically in the macro block. Eight pixel data are arranged in parallel, and this is converted into parallel data (that is, parallel data of 8 × 8 pixels) that continues in eight columns. Similarly, 8 × 8 = 64 pixel serial data output from the second field extraction circuit 40 is also supplied to the serial / parallel conversion circuit 45 via the switch 37, and converted into similar 8 × 8 pixel parallel data. Is converted. The parallel data output from the serial / parallel conversion circuits 44 and 45 are supplied to the processor array 48 as template data T1 and T2, respectively.

【0083】また、フィールド構造の場合には、スイッ
チ36,37は、フレーム/フィールド構造設定回路3
5により、図示とは反対側の上サブブロック抜出し回路
39側、下サブブロック抜出し回路41側に閉じてい
る。
In the case of the field structure, the switches 36 and 37 are connected to the frame / field structure setting circuit 3
5 closes to the upper sub-block extracting circuit 39 side and the lower sub-block extracting circuit 41 side opposite to the illustration.

【0084】入力画像バッファ15に記憶される検出対
象マクロブロックは、フィールド画像上では16×16
画素の範囲であるが、垂直方向で16画素、水平方向で
1つおきにサブサンプリングされて8画素の垂直,水平
方向に16×8画素データからなる。かかる入力画像バ
ッファ15からこの検出対象マクロブロックMBの画素
データがシリアルに読み出される。読み出されたシリア
ルの画素データ列は、一方では、上サブブロック抜出し
回路39に供給されてこの検出対象マクロブロックMB
の上半分の8×8画素の範囲の画素データが抜き取ら
れ、他方、下サブブロック抜出し回路41に供給されて
この検出対象マクロブロックMBの下半分の8×8画素
の範囲の画素データが抜き取られる。上サブブロック抜
出し回路39から出力される8×8=64画素のシリア
ルデータは、スイッチ36を介してシリアル/パラレル
変換回路44に供給され、同様の8×8画素のパラレル
データに変換される。同様にして、下サブブロック抜出
し回路41から出力される8×8=64画素のシリアル
データも、スイッチ37を介してシリアル/パラレル変
換回路45に供給され、同様の8×8画素のパラレルデ
ータに変換される。これらシリアル/パラレル変換回路
44,45から出力されるパラレルデータは夫々、検出
対象マクロブロックMBのテンプレートデータT1,T
2としてプロセッサアレイ48に供給される。
The macroblock to be detected stored in the input image buffer 15 is 16 × 16 on the field image.
The pixel range is 16 pixels in the vertical direction and sub-sampled every other pixel in the horizontal direction. The pixel data of the detection target macro block MB is serially read from the input image buffer 15. On the other hand, the read serial pixel data string is supplied to an upper sub-block extracting circuit 39, and the detection target macro block MB
The pixel data in the upper half 8 × 8 pixel range is extracted, while the pixel data in the lower half 8 × 8 pixel range in the lower half of this detection target macroblock MB is supplied to the lower sub block extraction circuit 41. It is. The serial data of 8 × 8 = 64 pixels output from the upper sub-block extracting circuit 39 is supplied to the serial / parallel conversion circuit 44 via the switch 36 and is converted into the same parallel data of 8 × 8 pixels. Similarly, the serial data of 8 × 8 = 64 pixels output from the lower sub-block extracting circuit 41 is also supplied to the serial / parallel conversion circuit 45 via the switch 37 and converted into the same parallel data of 8 × 8 pixels. Is converted. The parallel data output from the serial / parallel conversion circuits 44 and 45 are respectively template data T1 and T of the detection target macroblock MB.
2 is supplied to the processor array 48.

【0085】図14にこれらテンプレートデータT1,
T2での画素データの配列状態を示す。ここでは、例え
ば、図4での検出対象マクロブロックMBでの左辺に垂
直方向に配列される8個の画素データが第1列の画素デ
ータとなる。
FIG. 14 shows these template data T1,
The arrangement state of the pixel data at T2 is shown. Here, for example, eight pixel data vertically arranged on the left side of the detection target macroblock MB in FIG. 4 is the pixel data of the first column.

【0086】図13において、参照画像バッファ16か
らは、探索範囲SAの1探索領域分ずつ参照画像データ
が読み出される。読み出されたこの参照画像データは、
第1フィールド抜出し回路42に供給されて第1フィー
ルドの画素データが抜き出され、また、第2フィールド
抜出し回路43にも供給されて第2フィールドの画素デ
ータが抜き出される。従って、第1,第2フィールド抜
出し回路42,43からは夫々、画面の垂直方向に1つ
おきにサブサンプリングされた画素データがシリアルに
出力される。なお、ここでは、参照画像バッファ16か
ら読み出される参照画像データは、画面の水平方向に1
つおきにサブサンプリングされたものである。そこで、
フレーム画像での探索範囲SAの1探索領域は、垂直,
水平方向に5×1マクロブロック分(80×16画素)
の大きさをもつが、80×8画素からなり、第1,第2
フィールド抜出し回路42,43から出力される1探索
領域分のデータは、40×8画素データからなることに
なる。
In FIG. 13, reference image data is read from the reference image buffer 16 for each search area of the search range SA. The read reference image data is
The pixel data of the first field is supplied to the first field extraction circuit 42, and the pixel data of the second field is also supplied to the second field extraction circuit 43. Accordingly, the first and second field extracting circuits 42 and 43 output sub-sampled pixel data every other pixel in the vertical direction of the screen, respectively, in a serial manner. Here, the reference image data read from the reference image buffer 16 is 1 in the horizontal direction of the screen.
Subsampled every other time. Therefore,
One search area of the search range SA in the frame image is vertical,
5 × 1 macroblocks in the horizontal direction (80 × 16 pixels)
, But is composed of 80 × 8 pixels.
The data for one search area output from the field extraction circuits 42 and 43 is composed of 40 × 8 pixel data.

【0087】第1,第2フィールド抜出し回路42,4
3から出力される1探索領域分のシリアルデータは夫
々、シリアル/パラレル変換回路46,47に供給され
て、画面上垂直方向に配列される40個の画素データが
パラレルに配列され、かかる配列が水平方向の画素の配
列分、即ち、8列続くパラレルデータに変換される。こ
れらパラレルデータは夫々、探索領域のサーチエリアデ
ータR1,R2としてプロセッサアレイ48に供給され
る。
The first and second field extraction circuits 42 and 4
The serial data for one search area output from 3 is supplied to serial / parallel conversion circuits 46 and 47, respectively, and 40 pixel data vertically arranged on the screen are arranged in parallel. The data is converted into the horizontal pixel array, that is, parallel data continuing for eight columns. These parallel data are supplied to the processor array 48 as search area data R1 and R2 of the search area, respectively.

【0088】図14にこれらサーチエリアデータR1,
R2での画素データの配列状態を示す。ここでは、例え
ば、図4での探索範囲SA内の1つの探索領域での左辺
に上下方向に配列される40個の画素が第1列の画素と
なる。
FIG. 14 shows these search area data R1,
9 shows an arrangement state of pixel data in R2. Here, for example, 40 pixels vertically arranged on the left side of one search area in the search range SA in FIG. 4 are pixels in the first column.

【0089】プロセッサアレイ48は、8×8画素デー
タからなるテンプレートデータT1,T2を夫々サーチ
エリアデータR1からなる探索領域内の8×8画素から
なる領域(以下、これを探索マクロブロックという),
サーチエリアデータR2からなる探索領域内の8×8画
素からなる探索マクロブロック夫々との画素毎の誤差を
検出する。この場合、テンプレートデータT1とサーチ
エリアデータR1との画素毎の誤差(これを、以下、1
−1誤差という),テンプレートデータT1とサーチエ
リアデータR2との画素毎の誤差(これを、以下、1−
2誤差という),テンプレートデータT2とサーチエリ
アデータR1との画素毎の誤差(これを、以下、2−1
誤差という)及びテンプレートデータT2とサーチエリ
アデータR2との画素毎の誤差(これを、以下、2−2
誤差という)の4種類の誤差群が得られるが、これら誤
差群は、明らかに、8×8=64個の画素毎の誤差から
なっている。
The processor array 48 converts the template data T1 and T2 composed of 8 × 8 pixel data into an area composed of 8 × 8 pixels in a search area composed of the search area data R1 (hereinafter, referred to as a search macro block).
An error for each pixel is detected from each of the search macro blocks including 8 × 8 pixels in the search area including the search area data R2. In this case, the error of each pixel between the template data T1 and the search area data R1 (hereinafter referred to as 1
-1 error), an error of each pixel between the template data T1 and the search area data R2 (hereinafter referred to as 1-error).
2), an error of each pixel between the template data T2 and the search area data R1 (hereinafter referred to as 2-1).
Error) and an error of each pixel between the template data T2 and the search area data R2 (hereinafter referred to as 2-2).
(Referred to as errors), four types of error groups are obtained, and these error groups clearly consist of 8 × 8 = 64 errors per pixel.

【0090】プロセッサアレイ48から出力される1−
1誤差群は1−1誤差総和計算回路49に供給され、こ
の誤差群の64個の1−1誤差が加算されてその総和が
得られる。また、プロセッサアレイ48から出力される
1−2誤差群は1−2誤差総和計算回路50に供給さ
れ、この誤差群の64個の1−2誤差が加算されてその
総和が得られる。さらに、プロセッサアレイ48から出
力される2−1誤差群は2−1誤差総和計算回路51に
供給され、この誤差群の64個の2−1誤差が加算され
てその総和が得られる。さらにまた、プロセッサアレイ
48から出力される2−2誤差群は2−2誤差総和計算
回路52に供給され、この誤差群の64個の2−2誤差
が加算されてその総和が得られる。このようにして得ら
れた4種類の誤差の総和は、予測誤差比較部25に供給
されて検出対象マクロブロックMBに対する動きベクト
ルが検出される。
1- output from processor array 48
One error group is supplied to a 1-1 error sum calculation circuit 49, and the 64 1-1 errors of the error group are added to obtain a sum. Further, the 1-2 error group output from the processor array 48 is supplied to a 1-2 error sum calculation circuit 50, and the 64 1-2 errors of this error group are added to obtain the sum. Further, the 2-1 error group output from the processor array 48 is supplied to a 2-1 error sum calculation circuit 51, and 64 2-1 errors of the error group are added to obtain a sum. Furthermore, the 2-2 error group output from the processor array 48 is supplied to the 2-2 error sum calculation circuit 52, and the 64 2-2 errors of this error group are added to obtain the sum. The sum of the four types of errors obtained in this way is supplied to the prediction error comparison unit 25, and the motion vector for the detection target macroblock MB is detected.

【0091】このようにして、サーチエリアデータR
1,R2でのたんさくマクロブロックにたいして上記各
誤差群が得られると、次に、プロセッサアレイ48にサ
ーチエリアデータR1,R2での次のパラレルの8画素
データが供給され、この8画素データと前の8×8画素
データのうちの先頭のパラレルの8画素データを除いた
7×8画素データとで新たな8×8画素データの探索マ
クロブロックが形成され、これと8×8画素データのテ
ンプレートデータT1,T2とについて上記の動作が繰
り返されて、1−1誤差の総和,1−2誤差の総和,2
−1誤差の総和及び2−2誤差の総和が夫々生成されて
予測誤差比較部25に供給される。
Thus, search area data R
When the above error groups are obtained for the protein macroblocks at R1 and R2, the next parallel 8-pixel data in the search area data R1 and R2 is supplied to the processor array 48. A search macroblock of new 8 × 8 pixel data is formed by the 7 × 8 pixel data obtained by removing the leading parallel 8 pixel data from the previous 8 × 8 pixel data, and this and the 8 × 8 pixel data The above operation is repeated for template data T1 and T2, and the sum of 1-1 error, the sum of 1-2 error, 2
The sum of the −1 error and the sum of the 2-2 error are respectively generated and supplied to the prediction error comparison unit 25.

【0092】以下、同様の動作が繰り返されるのである
が、かかる動作は、図12に示した探索範囲SAの各探
索領域B,C,……での検出対象マクロブロックMB1
における入力画像データと探索マクロブロックSMBに
おける参照画像データとの画素毎の比較動作である。こ
の場合、テンプレートデータTI,T2は検出対象マク
ロブロックMB内の入力画像の画素データからなるもの
であり、サーチエリアデータR1,R2は探索範囲B内
の参照画像の画素データからなるものである。
Hereinafter, the same operation is repeated. This operation is performed in each of the search areas B, C,... Of the search area SA shown in FIG.
Is a comparison operation for each pixel between the input image data in the search macroblock and the reference image data in the search macroblock SMB. In this case, the template data TI and T2 are composed of pixel data of the input image in the detection target macroblock MB, and the search area data R1 and R2 are composed of pixel data of the reference image within the search range B.

【0093】ここで、プロセッサアレイ48の動作の概
略を図14を用いて説明する。プロセッサアレイ48に
は、まず、8行8列の入力画像の画素データからなるテ
ンプレートデータT1,T2が供給され、また、サーチ
エリアデータR1,R2での第1行〜第8行の8行8列
の画素データからなる部分(破線で囲って示す領域。こ
の領域が図12における探索マクロブロックSMBに相
当する)が供給され、これらによって上記の1−1誤差
群,1−2誤差群,2−1誤差群及び2−2誤差群が求
められ、次に、サーチエリアデータR1,R2の第9行
の画素データが供給されて、その第2行〜第8行の8行
8列の画素データからなる部分とテンプレートデータT
1,T2との1−1誤差群,1−2誤差群,2−1誤差
群及び2−2誤差群が求められる。以下同様にして、テ
ンプレートデータT1,T2と画素毎の誤差群が求めら
れるサーチエリアデータR1,R2の8×8画素からな
る部分が、図14において、1画素間隔ずつ矢印で示す
下方向に移動する。
Here, an outline of the operation of the processor array 48 will be described with reference to FIG. The processor array 48 is first supplied with template data T1 and T2 composed of pixel data of an input image having eight rows and eight columns, and further includes eight rows and eight rows of the first to eighth rows in the search area data R1 and R2. A portion composed of pixel data of a column (a region surrounded by a broken line; this region corresponds to the search macroblock SMB in FIG. 12) is supplied, and the above-mentioned 1-1 error group, 1-2 error group, 2 -1 error group and 2-2 error group are obtained. Next, pixel data of the ninth row of the search area data R1 and R2 is supplied, and pixels of the second to eighth rows of eight rows and eight columns are supplied. Data part and template data T
1, a 1-1 error group with T2, a 1-2 error group, a 2-1 error group, and a 2-2 error group are obtained. Similarly, the portion of the search area data R1 and R2 in which the error group for each pixel is obtained from the template data T1 and T2, which is obtained by 8 × 8 pixels, is shifted downward by one pixel interval in FIG. I do.

【0094】ここで、図14のサーチエリアデータR
1,R2において、破線で囲んだ8×8画素の領域は、
上記のように、図12での探索マクロブロックSMBに
相当するものであり、この領域が矢印方向に画素データ
の1行分ずつ移っていくということは、図12で説明し
た探索マクロブロックSMBの移動に対応している。
Here, the search area data R shown in FIG.
In 1 and R2, an area of 8 × 8 pixels surrounded by a broken line is
As described above, it corresponds to the search macroblock SMB in FIG. 12, and the fact that this area shifts by one row of pixel data in the direction of the arrow means that the search macroblock SMB explained in FIG. It supports moving.

【0095】図15は図13におけるプロセッサアレイ
48の一具体例を示す構成図であって、53〜56は入
力端子、57(571-1〜578-8)はプロセッサエレメ
ント(PE)、58(581-1〜588-32)はサイドレ
ジスタ(SR)、59〜62は出力端子である。
[0095] Figure 15 is a block diagram showing a specific example of a processor array 48 in FIG. 13, 53-56 is an input terminal, 57 (57 1-1 to 57 8-8) is a processor element (PE), 58 (58 1-1 to 58 8-32) is a side register (SR), 59-62 denotes an output terminal.

【0096】同図において、この具体例では、夫々が従
属接続された8個のプロセッサエレメント571-1,5
2-1,……,578-1の群(以下、第1のエレメント群
という)と、同じく8個のプロセッサエレメント57
1-2,572-2,……,578-2の群(以下、第2のエレ
メント群という)と、……、同じく8個のプロセッサエ
レメント571-8,572-8,……,578-8の群(以
下、第8のエレメント群という)との8個のエレメント
群がパラレルに配列されており、これらはテンプレート
データT1,T2とサーチエリアデータR1,R2との
間で画素データ毎の誤差を検出する。また、夫々が従属
接続された8個のサイドレジスタ581-1,582-1,…
…,588-1の群(以下、第1のレジスタ群という)
と、同じく8個のサイドレジスタ581-2,582-2,…
…,588-2の群(以下、第2のレジスタ群という)
と、……、同じく8個のサイドレジスタ581-32,58
2-32,……,588-32の群(以下、第32のレジスタ群
という)との32個のレジスタ群がパラレルに配列され
ており、これらはプロセッサエレメント57で誤差検出
に使用されないサーチエリアデータR1,R2の各画素
データを保持するものである。
In this example, in this specific example, eight processor elements 571-1, 571-5 , each of which is cascade-connected, are shown.
7 2-1 ,..., 57 8-1 (hereinafter referred to as a first element group) and eight processor elements 57
1-2, 57 2-2, ..., 57 8-2 group (hereinafter, referred to as a second element group) and, ..., also eight of the processor element 57 1-8, 57 2-8, ... , 57 8-8 (hereinafter referred to as an eighth element group) are arranged in parallel, and these are arranged between the template data T1, T2 and the search area data R1, R2. Detects an error for each pixel data. Further, eight side registers 581-1 , 582-1 ,.
…, 58 8-1 group (hereinafter referred to as first register group)
And the same eight side registers 58 1-2 , 58 2-2 , ...
…, 58 8-2 group (hereinafter referred to as second register group)
, And the same eight side registers 58 1-32 , 58
2-2 ,..., 588-32 (hereinafter referred to as the 32nd register group) and 32 register groups are arranged in parallel. These are not used by processor element 57 for error detection. It holds each pixel data of the area data R1 and R2.

【0097】入力端子53には、シリアル/パラレル変
換回路44(図13)からの図14に示した8×8画素
からなるテンプレートデータT1が入力され、入力端子
54には、シリアル/パラレル変換回路45(図13)
からの図14に示した8×8画素からなるテンプレート
データT2が入力され、入力端子55には、シリアル/
パラレル変換回路46(図13)からの図14に示した
40×8画素からなるサーチエリアデータR1が入力さ
れ、入力端子56には、シリアル/パラレル変換回路4
7(図13)からの図14に示した40×8画素からな
るサーチエリアデータR2が入力される。
An input terminal 53 receives template data T1 of 8 × 8 pixels shown in FIG. 14 from a serial / parallel conversion circuit 44 (FIG. 13). 45 (FIG. 13)
From the template data T2 composed of 8 × 8 pixels shown in FIG.
The search area data R1 composed of 40 × 8 pixels shown in FIG. 14 is input from the parallel conversion circuit 46 (FIG. 13), and the serial / parallel conversion circuit 4
The search area data R2 composed of 40 × 8 pixels shown in FIG. 14 from FIG. 7 (FIG. 13) is input.

【0098】テンプレートデータT1,T2夫々の図1
4に示す第1行目の8画素データはプロセッサエレメン
ト571-1,572-1,……,578-1の第1のエレメン
ト群に供給されて順次転送され、夫々のプロセッサエレ
メントに1画素データずつ保持される。テンプレートデ
ータT1,T2夫々の同じく第2行目の8画素データは
プロセッサエレメント571-2,572-2,……,57
8-2の第2のエレメント群に供給されて順次転送され、
夫々のプロセッサエレメントに1画素データずつ保持さ
れる。以下同様にして、テンプレートデータT1,T2
夫々の同じく第8行目の8画素データはプロセッサエレ
メント571-8,572-8,……,578-8の第8のエレ
メント群に供給されて順次転送され、夫々のプロセッサ
エレメント57に1画素データつ保持される。即ち、8
×8に配列して示す64個のプロセッサエレメント57
は、その配列が図14に示すように配列して示すテンプ
レートデータT1,T2の画素データ夫々に対応してお
り、これらの画素データが対応するプロセッサエレメン
ト57に格納保持される。また、このような状態は、図
12(a)に示すように、検出対象マクロブロックMB
1が設定されたことに相当する。
FIG. 1 shows template data T1 and T2.
4 are supplied to the first element group of the processor elements 571-1 , 572-1 ,..., 578-1 and sequentially transferred to the respective processor elements. Each pixel data is held. The eight pixel data in the same second row of the template data T1 and T2 are the processor elements 57 1-2 , 57 2-2 ,.
8-2 is supplied to the second element group and sequentially transferred,
One pixel data is held in each processor element. Similarly, template data T1, T2
Each of the eight pixel data in the same eighth row is supplied to an eighth element group of processor elements 57 1-8 , 57 2-8 ,. Holds one pixel data. That is, 8
64 processor elements 57 shown in an array of × 8
Correspond to the pixel data of the template data T1 and T2 whose arrangement is as shown in FIG. 14, and these pixel data are stored and held in the corresponding processor element 57. In addition, such a state is detected as shown in FIG.
1 is equivalent to being set.

【0099】これと同時に、入力端子55,56からサ
ーチエリアデータR1,R2が供給され、いま、図14
の破線で囲んだ8×8画素の部分が入力されたものとす
ると、サーチエリアデータR1,R2夫々の図14に示
す第1行の8画素データはプロセッサエレメント57
1-1,572-1,……,578-1の第1のエレメント群に
供給されて順次転送され、夫々のプロセッサエレメント
に1画素データずつ保持される。サーチエリアデータR
1,R2夫々の同じく第2行目の8画素データはプロセ
ッサエレメント571-2,572-2,……,578-2の第
2のエレメント群に供給されて順次転送され、夫々のプ
ロセッサエレメントに1画素データずつ保持される。以
下同様にして、サーチエリアデータR1,R2夫々の同
じく第8行目の8画素データはプロセッサエレメント5
1-8,572-8,……,578-8の第8のエレメント群
に供給されて順次転送され、夫々のプロセッサエレメン
トに1画素データずつ保持される。サーチエリアデータ
R1,R2夫々の同じく第9行目の8画素データはサイ
ドレジスタ581-1,582-1,……,588-1の第1の
レジスタ群に供給されて順次転送されて、夫々のサイド
レジスタ58に1画素データずつ保持され、サーチエリ
アデータR1,R2夫々の同じく第10行目の8画素デ
ータはサイドレジスタ581-2,582-2,……,58
8-2の第2のレジスタ群に供給されて順次転送されて、
夫々のサイドレジスタ58に1画素データずつ保持さ
れ、……、サーチエリアデータR1,R2夫々の同じく
第40行目の8画素データはサイドレジスタ581-32
582-32,……,588-32の第32のレジスタ群に供給
されて順次転送されて、夫々のサイドレジスタ58に1
画素データずつ保持される。
At the same time, search area data R1 and R2 are supplied from input terminals 55 and 56.
Assuming that a portion of 8 × 8 pixels surrounded by a broken line is input, the 8-pixel data of the first row shown in FIG.
1-1, 57 2-1, ..., are supplied sequentially transferred to the first element group 57 8-1 is held by one pixel data to the processor elements each. Search area data R
, R2 are supplied to the second element group of the processor elements 57 1-2 , 57 2-2 ,..., 57 8-2 and sequentially transferred to the second element group. The pixel data is stored in the processor element one by one. Similarly, the eight pixel data in the same eighth row of each of the search area data R1 and R2 is
7 1-8 57 2-8, ..., are supplied sequentially transferred to the eighth element group 57 8-8 is held by one pixel data to the processor elements each. The eight pixel data of the ninth row of each of the search area data R1 and R2 is supplied to the first register group of the side registers 581-1 , 582-1 ,..., 588-1 and sequentially transferred. Each of the side registers 58 holds one pixel data at a time, and the eight pixel data of the same tenth row of the search area data R1 and R2 are stored in the side registers 58 1-2 , 58 2-2 ,.
8-2 , supplied to the second register group and sequentially transferred,
Each of the side registers 58 holds one pixel data at a time...., The eight pixel data of the 40th row of the search area data R1 and R2 are stored in the side registers 58 1-32,.
, 58 2-32 ,..., 58 8-32 are supplied to the 32nd register group and sequentially transferred to the respective side registers 58.
It is held for each pixel data.

【0100】即ち、8×8に配列して示す64個のプロ
セッサエレメント57と8×32に配列して示す256
個のサイドレジスタ58は、それらの配列が図14に示
すように配列して示すサーチエリアデータR1,R2の
画素データ夫々に対応しており、これらの画素データが
対応するプロセッサエレメント57とサイドレジスタ5
8に格納保持される。
That is, 64 processor elements 57 arranged in 8 × 8 and 256 processor elements arranged in 8 × 32
The side registers 58 correspond to the respective pixel data of the search area data R1 and R2 which are arranged as shown in FIG. 14, and these pixel data correspond to the processor element 57 and the side register 5
8 is stored and held.

【0101】このようにして、64個のプロセッサエレ
メント57に検出対象マクロブロックMB内の入力画像
データであるテンプレートデータT1,T2が保持さ
れ、また、これらプロセッサエレメント57と256個
のサイドレジスタ58とに検出対象マクロブロックMB
に対する探索範囲SAの1探索領域内の参照画像データ
であるサーチエリアデータR1,R2が保持され、その
うちの探索マクロブロックSMB内の参照画像データが
64個のプロセッサエレメント57に保持されることに
なる。
In this way, the template data T1 and T2, which are the input image data in the macroblock MB to be detected, are held in the 64 processor elements 57, and the processor elements 57 and the 256 side registers 58 To the macroblock MB to be detected
, Search area data R1 and R2, which are reference image data in one search area of the search range SA, are held, and 64 of the processor elements 57 hold reference image data in the search macroblock SMB. .

【0102】以上の状態は、図12(a)に示すよう
に、検出対象マクロブロックMB1に対して探索範囲S
A1での1つの探索領域Bが設定され、これと同時に、
探索マクロブロックSMBも設定されたことに相当す
る。
In the above state, as shown in FIG. 12 (a), the search range S
One search area B in A1 is set, and at the same time,
This is equivalent to setting the search macro block SMB.

【0103】そこで、いま、上記のように、64個のプ
ロセッサエレメント57に、テンプレートデータT1,
T2とサーチエリアデータR1,R2での図14で破線
で囲って示す8×8画素の部分とが格納された状態にあ
るとすると、これらプロセッサエレメント57毎に、保
持されているテンプレートデータT1,T2とサーチエ
リアデータR1,R2との画素データの差分(誤差)が
検出される。例えば、プロセッサエレメント578-1
は、テンプレートデータT1,T2とサーチエリアデー
タR1,R2との図14に示す第1行第1列の画素デー
タの誤差が検出され、プロセッサエレメント578-2
は、テンプレートデータT1,T2とサーチエリアデー
タR1,R2との同じく第2行第1列の画素データの誤
差が検出され、……、プロセッサエレメント571-8
は、テンプレートデータT1,T2とサーチエリアデー
タR1,R2との同じく第8行第8列の画素データの誤
差が検出される。
Therefore, as described above, the template data T1,
Assuming that T2 and the 8 × 8 pixel portion of the search area data R1 and R2 surrounded by a broken line in FIG. 14 are stored, the template data T1 and The difference (error) between the pixel data of T2 and the search area data R1, R2 is detected. For example, the processor element 57 8-1 first row error of the first column of pixel data shown in FIG. 14 with the template data T1, T2 and search area data R1, R2 are detected, the processor element 57 8-2 , also the error of the pixel data of the second row, first column is detected, ......, the processor element 57 1-8, template data T1, T2 and the search area with the template data T1, T2 and search area data R1, R2 An error is detected in the pixel data of the eighth row and the eighth column, similarly to the data R1 and R2.

【0104】ここで、各プロセッサエレメント57の出
力1−1はテンプレートデータT1とサーチエリアデー
タR1との画素データの誤差、即ち、上記の1−1誤差
であり、各プロセッサエレメント57の出力1−2はテ
ンプレートデータT1とサーチエリアデータR2との画
素データの誤差、即ち、上記の1−2誤差であり、各プ
ロセッサエレメント57の出力2−1はテンプレートデ
ータT2とサーチエリアデータR1との画素データの誤
差、即ち、上記の2−1誤差であり、各プロセッサエレ
メント57の出力2−2はテンプレートデータT2とサ
ーチエリアデータR2との画素データの誤差、即ち、上
記の2−2誤差である。これら1−1誤差,1−2誤
差,2−1誤差及び2−2誤差は夫々、パラレルに8×
8=64個ずつ得られるものであり、出力端子59,6
0,61,62から出力される。
Here, the output 1-1 of each processor element 57 is the error of the pixel data between the template data T1 and the search area data R1, that is, the above-mentioned 1-1 error. 2 is the error of the pixel data between the template data T1 and the search area data R2, that is, the above-mentioned 1-2 error. The output 2-1 of each processor element 57 is the pixel data of the template data T2 and the search area data R1. , Ie, the above-mentioned 2-1 error, and the output 2-2 of each processor element 57 is an error of the pixel data between the template data T2 and the search area data R2, ie, the above-mentioned 2-2 error. These 1-1 error, 1-2 error, 2-1 error, and 2-2 error are each 8 × in parallel.
8 = 64 each, and output terminals 59 and 6
0, 61 and 62.

【0105】以上の誤差検出が終わると、サーチエリア
データR1,R2が、全体として、図15の上方に1ス
テップ転送される(以下、この上方向の転送を+方向の
転送といい、このような1ステップの転送を+1ステッ
プ転送という)。ここで、1ステップ転送とは、図15
において、あるプロセッサエレメントまたはサイドレジ
スタからその隣りのプロセッサエレメントまたはサイド
レジスタへ転送されることをいう。このことは、また、
探索マクロブロックSMBをサーチエリアデータR1,
R2からなる探索領域で1画素間隔分移動させることに
相当する。
When the above error detection is completed, search area data R1 and R2 are transferred one step upward in FIG. 15 as a whole (hereinafter, this upward transfer is referred to as + direction transfer. One-step transfer is referred to as + 1-step transfer). Here, one-step transfer refers to FIG.
In this case, the transfer from one processor element or side register to the adjacent processor element or side register. This also means
The search macro block SMB is stored in the search area data R1,
This corresponds to moving by one pixel interval in the search area consisting of R2.

【0106】即ち、プロセッサエレメント571-1,5
2-1,……,578-1に格納されているサーチエリアデ
ータR1,R2の第1行目の画素データ(図14)が最
下段のサイドレジスタ581-32,582-32,……,58
8-32に夫々+1ステップ転送され、プロセッサエレメン
ト571-2,572-2,……,578-2に格納されている
同じくの第2行目の画素データが最上段のプロセッサエ
レメント571-1,572-1,……,578-1に夫々+1
ステップ転送され、……、最上段のサイドレジスタ58
1-1,582-1,……,588-1に格納されている同じく
第9行目の画素データが最下段のプロセッサエレメント
571-8,572-8,……,578-8に夫々+1ステップ
転送され、……、最下段のサイドレジスタ581-32,5
2-32,……,588-32に格納されている同じく第40
行目の画素データが図示しないその1段上のサイドレジ
スタ581-31,582-31,……,588-31に夫々+1ス
テップ転送される。そして、上記と同様に、各プロセッ
サエレメント57で1−1誤差,1−2誤差,2−1誤
差及び2−2誤差が求められる。
[0106] In other words, the processor element 57 1-1, 5
7 2-1, ..., 57 8-1 search area data stored in R1, R2 first row of pixel data (Fig. 14) is the lowermost side register 58 1-32, 58 2-32 , ……, 58
The same second row of pixel data stored in the processor elements 57 1-2 , 57 2-2 ,..., 57 8-2 is transferred to the processor elements 57 1-2 , 57 2-2 ,. +1 to 1-1 , 57 2-1 , ..., 57 8-1
Step transfer,..., The uppermost side register 58
1-1, 58 2-1, ..., 58 8-1 likewise stored in the ninth row of pixel data is the bottom of the processor element 57 1-8, 57 2-8, ..., 57 8 -8 are transferred by +1 step, respectively,..., The lowest side register 58 1-32 , 5
8 2-32 ,..., 58 8-32
Side register 58 1-31 of 1 level upper the row of pixel data is not shown, 58 2-31, ..., are respectively +1 step transferred to 58 8-31. Then, similarly to the above, the 1-1 error, the 1-2 error, the 2-1 error, and the 2-2 error are obtained by each processor element 57.

【0107】このように、かかる誤差が得られる毎に、
サーチエリアデータR1,R2は+1ステップずつ転送
されるのであるが、これは、図12に示すように、探索
マクロブロックSMBが探索範囲SA1の1つの探索範
囲B内を1画素間隔分ずつ矢印方向に移動しながら、夫
々でこの検出対象マクロブロックMB内での入力画像デ
ータと探索マクロブロックSMB内の参照画像データと
の画素データの誤差を求めていることにほかならない
(探索マクロブロックSMBの方を移動させるか、探索
領域Bの方を移動させるかの違いがあるだけである)。
Thus, every time such an error is obtained,
The search area data R1 and R2 are transferred by +1 step at a time, as shown in FIG. , The error of the pixel data between the input image data in the macroblock MB to be detected and the reference image data in the search macroblock SMB is calculated. There is only a difference between moving the search area and the search area B).

【0108】そして、サーチエリアデータR1,R2が
+32ステップ移動すると、図12(c)に示すよう
に、探索マクロブロックSMBが探索領域Bの端部に達
したことになり、このときには、図15において、サー
チエリアデータR1,R2の第1行目の8個の画素デー
タ(図14)が第1のレジスタ群、即ち、サイドレジス
タ581-1,582-1,……,588-1に格納されている
状態となっている。
When the search area data R1 and R2 move by +32 steps, the search macroblock SMB reaches the end of the search area B as shown in FIG. 12 (c). in the search area data R1, 8 pieces of pixel data of the first line of R2 (FIG. 14) is the first register group, i.e., the side register 58 1-1, 58 2-1, ..., 58 8 It is in the state stored in 1 .

【0109】かかる状態では、次の探索領域(図12で
は、探索領域C)でのサーチエリアデータR1,R2の
第1列目の40画素データが夫々入力端子55,56か
ら入力されるが、この場合には、これら40画素データ
のうちの最後の8個の行の画素データ、即ち、第33行
目〜第40行目の画素データが夫々各エレメント群の初
段のプロセッサエレメント571-1,571-2,……,5
1-8に供給されて保持され、また、他の第1行目〜第
32行目の32個の画素データは夫々各レジスタ群の初
段のサイドレジスタ581-1,581-2,……,581-32
に供給されて保持される。勿論、これまでプロセッサエ
レメント57とサイドレジスタ58とに格納されていた
1つ前のサーチエリアデータR1,R2の各画素データ
は右方向に1ステップだけ転送され、夫々1つ後段のプ
ロセッサエレメント57やサイドレジスタ58に保持さ
れる。従って、プロセッサエレメント578-1,5
8-2,……,578-8やサイドレジスタ588-1,58
8-2,……,578-32に格納されていた1つ前のサーチ
エリアデータR1,R2の第1列目の画像データは夫
々、図示しないプロセッサエレメント577-1,5
7-2,……,577-8やサイドレジスタ587-1,58
7-2,……,577-32からのサーチエリアデータR1,
R2の画素データで書き換えられて失われる。この状態
は、図12(d)で示す検出対象マクロブロックMBが
右側に1画素間隔分移動した状態である。
In this state, 40 pixel data in the first column of search area data R1 and R2 in the next search area (search area C in FIG. 12) is input from input terminals 55 and 56, respectively. in this case, these 40 pixel last 8 rows of pixel data of the data, i.e., the line 33 - line 40 the first stage of the pixel data of each respective element groups of processor elements 57 1-1 , 57 1-2 , ……, 5
The pixel data is supplied to and held in a memory 7 1-8 , and the other 32 pixel data in the first to 32nd rows are stored in the first-stage side registers 58 1-1 , 58 1-2 , 58 1-2 , ............ 58 1-32
Supplied and held. Of course, each pixel data of the previous search area data R1 and R2 previously stored in the processor element 57 and the side register 58 is transferred rightward by one step, and each of the pixel data of the succeeding processor element 57 It is held in the side register 58. Therefore, the processor elements 57 8-1,5
7 8-2 ,..., 57 8-8 and side registers 58 8-1 , 58
8-2 ,..., 57 8-32 , the image data of the first column of the immediately preceding search area data R1, R2 are processor elements 57 7-1 , 5-7 (not shown), respectively.
7 7-2 ,..., 57 7-8 and side registers 58 7-1 , 58
7-2, ..., the search area data R1 from 57 7-32,
It is rewritten with the pixel data of R2 and lost. This state is a state where the detection target macroblock MB shown in FIG. 12D has moved to the right by one pixel interval.

【0110】このようにして新たな1列40画素データ
で入れ換えられてプロセッサエレメント57とサイドレ
ジスタ58とに格納されるサーチエリアデータR1,R
2も、当然のことながら、図14に示すデータ構成をな
している。
In this manner, search area data R1, R which are replaced with new one-column 40-pixel data and stored in processor element 57 and side register 58 are stored.
2 also has the data configuration shown in FIG.

【0111】かかる状態から、上記のように、サーチエ
リアデータR1,R2の各画素データが1ステップずつ
転送され、この転送毎にプロセッサエレメント57で1
−1誤差,1−2誤差,2−1誤差及び2−2誤差が求
められるのであるが、このときの転送方向は、上記とは
逆に、図15の図面上、下方に転送される(以下、この
下方向の転送を−方向の転送といい、このような1ステ
ップの転送を−1ステップ転送という)。このことは、
図12(d)に矢印で示すように、探索マクロブロック
SMBの移動方向が逆転したことに相当する。
From this state, as described above, each pixel data of the search area data R1 and R2 is transferred one step at a time.
The -1 error, the 1-2 error, the 2-1 error, and the 2-2 error are obtained. The transfer direction at this time is transferred downward in the drawing of FIG. Hereinafter, this downward transfer is referred to as -direction transfer, and such one-step transfer is referred to as -1 step transfer.) This means
As shown by the arrow in FIG. 12D, this corresponds to the reversal of the moving direction of the search macroblock SMB.

【0112】そして、サーチエリアデータR1,R2
が、−1ステップ転送される毎に上記4種類の画素デー
タの誤差が検出されつつ、−32ステップ転送されて、
それらの第1行目の8画素データ(図14)が第1のエ
レメント群であるプロセッサエレメント571-1,57
2-1,……,578-1に夫々格納される状態になると、再
びサーチエリアデータR1,R2の次の列の40画素デ
ータ(これは、図12で言えば、探索範囲Cの第2列目
の画素データに相当する)が入力端子55,56から入
力される。このときには、この列の第1行目の画素デー
タから順に、プロセッサエレメント571-1,571-2
……,571-8,サイドレジスタ581-1,581-2,…
…,581-32に格納される。そして、格納されたサーチ
エリアデータR1,R2の全体は、上記とは逆に、+1
ステップずつ移動する。これは、図12(d)に示す破
線矢印の折返し方向に探索マクロブロックSMBが移動
することに対応する。
The search area data R1, R2
Is transferred by -32 steps while an error of the above four types of pixel data is detected each time the data is transferred by -1 step.
The eight pixel data (FIG. 14) in the first row are the processor elements 571-1 and 571-1 as the first element group.
2-1 ..., 58 8-1 , the 40 pixel data of the next column of the search area data R 1, R 2 (this is the first pixel of the search range C in FIG. (Corresponding to the pixel data of the second column) is input from the input terminals 55 and 56. At this time, the processor elements 571-1 , 571-2 ,.
......, 57 1-8 , side registers 58 1-1 , 58 1-2 , ...
..., 58 1-32 . Then, the entirety of the stored search area data R1, R2 is +1
Move step by step. This corresponds to the movement of the search macroblock SMB in the direction in which the broken arrow shown in FIG.

【0113】以下、プロセッサエレメント57とサイド
レジスタ58に保持されているサーチエリアデータR
1,R2の画素データの全てについて1−1誤差,1−
2誤差,2−1誤差及び2−2誤差が求められる毎に、
入力端子55,56からサーチエリアデータR1,R2
の1列の40画素データが入力され、この入力毎にサー
チエリアデータR1,R2での画素データの探索マクロ
ブロックSMBの図15での転送方向が反転される。
Hereinafter, search area data R held in processor element 57 and side register 58 will be described.
1, 1-1 error for all pixel data of R2, 1-
Each time 2 error, 2-1 error and 2-2 error are obtained,
Search area data R1, R2 from input terminals 55, 56
Is input, and the transfer direction of the search macro block SMB of the pixel data in the search area data R1 and R2 in FIG. 15 is inverted every time this input is performed.

【0114】これにより、図12で説明したように、探
索マクロブロックSMBのジグザグの移動が行なわれる
ことになり、例えば、図12(c)に示す状態になる
と、1画素間隔分右側にずれた図12(a)に示す状態
に戻してから、再び探索マクロブロックSMBを下方に
移動させるような、常に1方向に探索マクロブロックM
Bを移動させる場合に比べ、誤差検出の処理を迅速に行
なうことができる。
As a result, as described with reference to FIG. 12, the zigzag movement of the search macro block SMB is performed. For example, in the state shown in FIG. After returning to the state shown in FIG. 12A, the search macroblock M is always moved in one direction such that the search macroblock SMB is moved downward again.
The error detection process can be performed more quickly than when B is moved.

【0115】図16は図15におけるプロセッサエレメ
ント57の一具体例を示すブロック図であり、63〜6
6は入力端子、67〜70は出力端子、71,72は選
択回路、73,74はフリップフロップ(FF)回路、
75〜78は絶対値差分計算回路、79〜82はフリッ
プフロップ(FF)回路、83〜86は出力端子であ
る。この具体例は図15でのプロセッサエレメント57
1-1 についてのものであるが、他のプロセッサエレメン
ト57についても同様である。
FIG. 16 is a block diagram showing a specific example of the processor element 57 in FIG.
6 is an input terminal, 67 to 70 are output terminals, 71 and 72 are selection circuits, 73 and 74 are flip-flop (FF) circuits,
75 to 78 are absolute value difference calculation circuits, 79 to 82 are flip-flop (FF) circuits, and 83 to 86 are output terminals. This specific example corresponds to the processor element 57 in FIG.
This is the case of 1-1 , but the same applies to other processor elements 57.

【0116】同図において、プロセッサアレイ48(図
15)にテンプレートデータT1,T2を取り込むとき
には、入力端子63を介して前段(この場合、図15の
入力端子53,54)から順次テンプレートデータT
1,T2の同じ行の画素データが入力され、選択回路7
1,FF回路73を介して出力端子67から出力されて
次段(ここでは、プロセッサエレメント572-1(図1
5))に供給される。そして、所定の画素データ(この
場合、図14に示すテンプレートデータT1,T2の第
8列第1行の画素データ)が入力端子63から選択回路
71を介して入力されると、この所定の画素データがF
F回路73に保持される。
In the figure, when the template data T1 and T2 are taken into the processor array 48 (FIG. 15), the template data T1 is sequentially inputted from the preceding stage (in this case, the input terminals 53 and 54 in FIG. 15) via the input terminal 63.
1 and T2, the pixel data of the same row is input and the selection circuit 7
1, output from the output terminal 67 via the FF circuit 73 and the next stage (here, the processor element 57 2-1 (FIG. 1)
5)). When predetermined pixel data (in this case, pixel data of the eighth column and first row of the template data T1 and T2 shown in FIG. 14) is input from the input terminal 63 via the selection circuit 71, the predetermined pixel data Data is F
It is held in the F circuit 73.

【0117】これと同時に、入力端子64を介して前段
(この場合、図15の入力端子55,56)から順次サ
ーチエリアデータR1,R2の同じ行の画素データが入
力され、選択回路72,FF回路74を介して出力端子
68から出力されて次段(ここでは、プロセッサエレメ
ント572-1(図15))に供給される。そして、所定
の画素データ(この場合、図14に示すサーチエリアデ
ータR1,R2の第8列第1行の画素データ)が入力端
子64から選択回路72を介して入力されると、この所
定の画素データがFF回路74に保持される。
At the same time, the pixel data of the same row of the search area data R1, R2 is sequentially input from the preceding stage (in this case, the input terminals 55, 56 in FIG. 15) via the input terminal 64, and the selection circuit 72, FF The signal is output from the output terminal 68 via the circuit 74 and supplied to the next stage (here, the processor element 57 2-1 (FIG. 15)). When predetermined pixel data (in this case, pixel data of the eighth column and first row of search area data R1 and R2 shown in FIG. 14) is input from input terminal 64 via selection circuit 72, the predetermined pixel data is input. The pixel data is held in the FF circuit 74.

【0118】以上の状態で、プロセッサアレイ48にテ
ンプレートデータT1,T2と1探索領域分のサーチエ
リアデータR1,R2とが格納されたことになり、この
状態で、絶対値差分計算回路75により、FF回路73
に保持されているテンプレートデータT1の画素データ
とFF回路74に保持されているサーチエリアデータR
1の画素データとの差分の絶対値が計算され、得られた
計算結果はFF回路79に保持されて、出力端子83か
ら1−1誤差として出力される。同様にして、絶対値差
分計算回路76とFF回路80とにより、FF回路73
に保持されているテンプレートデータT1の画素データ
とFF回路74に保持されているサーチエリアデータR
2の画素データとの差分の絶対値である1−2誤差が得
られて出力端子84から出力され、また、絶対値差分計
算回路77とFF回路81とにより、FF回路73に保
持されているテンプレートデータT2の画素データとF
F回路74に保持されているサーチエリアデータR1の
画素データとの差分の絶対値である2−1誤差が得られ
て出力端子85から出力され、さらに、絶対値差分計算
回路78とFF回路82とにより、FF回路73に保持
されているテンプレートデータT2の画素データとFF
回路74に保持されているサーチエリアデータR2の画
素データとの差分の絶対値である2−2誤差が得られて
出力端子86から出力される。
In the above state, the template data T1, T2 and the search area data R1, R2 for one search area are stored in the processor array 48. In this state, the absolute value difference calculation circuit 75 FF circuit 73
And the search area data R stored in the FF circuit 74.
The absolute value of the difference from the one pixel data is calculated, and the obtained calculation result is held in the FF circuit 79 and output from the output terminal 83 as a 1-1 error. Similarly, the FF circuit 73 is provided by the absolute value difference calculation circuit 76 and the FF circuit 80.
And the search area data R stored in the FF circuit 74.
An 1-2 error, which is the absolute value of the difference between the pixel data and the second pixel data, is obtained and output from the output terminal 84, and is held in the FF circuit 73 by the absolute value difference calculation circuit 77 and the FF circuit 81. Pixel data of template data T2 and F
An 2-1 error, which is the absolute value of the difference between the search area data R1 and the pixel data held in the F circuit 74, is obtained and output from the output terminal 85. Further, the absolute value difference calculation circuit 78 and the FF circuit 82 Thus, the pixel data of the template data T2 held in the FF circuit 73 and the FF
A 2-2 error, which is the absolute value of the difference between the search area data R2 held in the circuit 74 and the pixel data, is obtained and output from the output terminal 86.

【0119】以上の演算処理が終わると、選択回路71
はFF回路73側を、また、選択回路72は入力端子6
6側を夫々選択し、FF回路73に格納されていたテン
プレートデータT1,T2の第8列第1行(図14)の
画素データが格納され直し、プロセッサエレメント57
1-2でのFF回路74と同様のFF回路に格納されてい
たサーチエリアデータR1,R2の第8列第2行の画素
データ(図14)が入力端子66から入力されてFF回
路74に格納される。勿論、このFF回路74に格納さ
れていたサーチエリアデータR1,R2の第8列第1行
の画素データは、出力端子69からサイドレジスタ58
1-32に供給されて格納される。そして、上記と同様にし
て、出力端子83,84,85,86に夫々1−1誤
差,1−2誤差,2−1誤差,2−2誤差が得られる。
When the above operation is completed, the selection circuit 71
Is the FF circuit 73 side, and the selection circuit 72 is the input terminal 6
6 is selected, and the pixel data of the eighth column and first row (FIG. 14) of the template data T1 and T2 stored in the FF circuit 73 is stored again, and the processor element 57 is selected.
The pixel data (FIG. 14) of the eighth column and second row of the search area data R1 and R2 stored in the same FF circuit as the FF circuit 74 in 1-2 is input from the input terminal 66 and sent to the FF circuit 74. Is stored. Of course, the pixel data of the eighth column and the first row of the search area data R1 and R2 stored in the FF circuit 74 is supplied from the output terminal 69 to the side register 58.
It is supplied to 1-32 and stored. Then, in the same manner as above, a 1-1 error, a 1-2 error, a 2-1 error, and a 2-2 error are obtained at the output terminals 83, 84, 85, 86, respectively.

【0120】以下同様にして、探索範囲SAの1探索領
域での誤差検出では、順次入力端子66からサーチエリ
アデータR1,R2の第8列各行の画像データが入力さ
れるとともに、FF回路74に格納されていた画像デー
タが出力端子69から出力され、その入出力毎に上記画
素データ間の各誤差が検出される。これにより、図15
で説明したように、プロセッサエレメント57とサイド
レジスタ58とに格納されているサーチエリアデータR
1,R2が+1ステップずつ転送されることになる。換
言すると、探索マクロブロックSMBが探索領域内を図
12に示すように移動することになる。
Similarly, in the error detection in one search area of the search range SA, the image data of each row of the eighth column of the search area data R1 and R2 is sequentially input from the input terminal 66 and the FF circuit 74 The stored image data is output from the output terminal 69, and each error between the pixel data is detected for each input and output. As a result, FIG.
As described above, the search area data R stored in the processor element 57 and the side register 58
1 and R2 are transferred by +1 step at a time. In other words, the search macroblock SMB moves in the search area as shown in FIG.

【0121】勿論、かかるサーチエリアデータR1,R
2が図15で−1ステップずつ転送されるときには、選
択回路72が入力端子65側を選択し、図14に示すサ
ーチエリアデータR1,R2の第8列第1行の画素デー
タが探索領域の下側から上方向の順にFF回路74に供
給されることになる。
Of course, the search area data R1, R
When 2 is transferred by one step in FIG. 15, the selection circuit 72 selects the input terminal 65 side, and the pixel data of the eighth column and first row of the search area data R1 and R2 shown in FIG. The data is supplied to the FF circuit 74 in order from the lower side to the upper side.

【0122】また、図12(c),(d)に示すように
探索マクロブロックSMBが探索範囲SAの1画素間隔
分右方に移動するときには、選択回路72が入力端子6
4側を選択し、そこから入力されるサーチエリアデータ
R1,R2の1画素データを取り込んでFF回路74に
格納するとともに、これまでこのFF回路74に格納さ
れていた画素データを出力端子68から次段のプロセッ
サエレメント572-1に転送する。
When the search macroblock SMB moves to the right by one pixel interval of the search range SA as shown in FIGS.
4 is selected, and one pixel data of the search area data R1 and R2 input therefrom is fetched and stored in the FF circuit 74, and the pixel data previously stored in the FF circuit 74 is output from the output terminal 68. transferred to the next processor element 57 2-1.

【0123】図17は図15におけるサイドレジスタ5
8の一具体例を示すブロック図であって、87〜89は
入力端子、90〜92は出力端子、93は選択回路、9
4はフリップフロップ(FF)回路である。なお、この
具体例は、図15でのサイドレシスタ581-1について
のものであるが、他のサイドレジスタ58についても同
様である。
FIG. 17 shows side register 5 in FIG.
8 is a block diagram showing a specific example of 8; 87 to 89 are input terminals; 90 to 92 are output terminals; 93 is a selection circuit;
4 is a flip-flop (FF) circuit. Incidentally, the specific examples are intended for Saidoreshisuta 58 1-1 in FIG. 15, the same applies to the other side register 58.

【0124】同図において、テンプレートデータT1,
T2が、図15や図16で説明したように、プロセッサ
エレメント57に入力保持されるときには、選択回路9
3は入力端子87側を選択しており、入力端子87から
前段(この場合には、図15の入力端子55,56)か
らのサーチエリアデータR1,R2の第9行目の画素デ
ータ(図14)が順次入力され、選択回路93,FF回
路94を介して、出力端子90から次段(この場合に
は、図15でのサイドレジスタ582-1)に供給され
る。そして、このサイドレジスタ581-1に対応する画
素データ(この場合には、図14でのサーチエリアデー
タR1,R2の第8列第9行の画素データ)が供給され
ると、これがFF回路93に保持される。
In the figure, template data T1,
When T2 is input and held in the processor element 57 as described with reference to FIGS.
Reference numeral 3 designates the input terminal 87 side, and pixel data on the ninth row of the search area data R1 and R2 from the input terminal 87 to the preceding stage (in this case, the input terminals 55 and 56 in FIG. 15). 14) are sequentially input and supplied to the next stage (in this case, the side register 58 2-1 in FIG. 15) from the output terminal 90 via the selection circuit 93 and the FF circuit 94. Then, the pixel data corresponding to the side register 58 1-1 (in this case, the search column 8 line 9 of the pixel data of the area data R1, R2 in FIG. 14) has been supplied, this FF circuit 93.

【0125】この状態で、上記のように、プロセッサエ
レメント57(図15)で上記の画素データ間の誤差が
検出されるが、図15で説明したように格納されている
1探索領域のサーチエリアデータR1,R2が+1ステ
ップずつ転送されて画素データ間の各誤差を検出すると
きには、選択回路93が入力端子89側を選択し、サイ
ドレジスタ581-2から順次供給される画素データをF
F回路94に取り込み、また、図15で説明したように
格納されている1探索領域のサーチエリアデータR1,
R2が−1ステップずつ転送して画素データ間の各誤差
を検出するときには、選択回路93が入力端子88側を
選択し、プロセッサエレメント571-8から順次供給さ
れる画素データをFF回路94に取り込む。
In this state, the error between the pixel data is detected by the processor element 57 (FIG. 15) as described above, but the search area of one search area stored as described with reference to FIG. data R1, when R2 is detecting each error between the transferred and the pixel data by +1 step selects the input terminal 89 side selection circuit 93, the pixel data sequentially supplied from the side register 58 1-2 F
The search area data R1 and R1 of one search area which are taken in by the F circuit 94 and stored as described with reference to FIG.
When R2 transfers −1 step at a time to detect each error between pixel data, the selection circuit 93 selects the input terminal 88 side, and pixel data sequentially supplied from the processor element 57 1-8 is supplied to the FF circuit 94. take in.

【0126】また、図12(c),(d)に示すように
探索マクロブロックSMBが探索範囲SAの1画素間隔
分右方に移動するときには、選択回路93が入力端子8
7側を選択し、そこから入力されるサーチエリアデータ
R1,R2の1画素データを取り込んでFF回路94に
格納するとともに、これまでこのFF回路94に格納さ
れていた画素データを出力端子90から次のサイドレジ
スタ582-1に転送する。
When the search macroblock SMB moves to the right by one pixel interval in the search range SA as shown in FIGS.
7 is selected, and one pixel data of the search area data R1 and R2 input therefrom is fetched and stored in the FF circuit 94, and the pixel data previously stored in the FF circuit 94 is output from the output terminal 90. to transfer to the next side register 58 2-1.

【0127】図18は図15に示したプロセッサアレイ
48の動作を探索範囲の1探索領域ΔSAについて模式
的に示した図である。
FIG. 18 is a diagram schematically showing the operation of the processor array 48 shown in FIG. 15 for one search area ΔSA in the search range.

【0128】図18(a)はフレーム構造の場合を示す
ものであって、この場合、プロセッサアレイ48では、
検出対象マクロブロックMBでの入力画像データと探索
領域ΔSAでの探索マクロブロックSMB内の参照画像
データとの画素データ毎の誤差を検出するものであるが
(図18では、図面の都合上、検出対象マクロブロック
MBと探索マクロブロックSMBとを重複して示し、夫
々の符号を付している)、この場合の入力画像データと
参照画像データとはフレーム画像の画素データであっ
て、検出対象マクロブロックMBも探索マクロブロック
SMBも、このフレーム画像において、16×16画素
からなる。
FIG. 18A shows a case of a frame structure. In this case, in the processor array 48,
This is to detect an error for each pixel data between the input image data in the detection target macroblock MB and the reference image data in the search macroblock SMB in the search area ΔSA. The target macroblock MB and the search macroblock SMB are shown in an overlapping manner, and are denoted by the same reference numerals. In this case, the input image data and the reference image data are pixel data of a frame image, Both the block MB and the search macroblock SMB consist of 16 × 16 pixels in this frame image.

【0129】そして、プロセッサアレイ48の上記の検
出動作としては、検出対象マクロブロックMBでの入力
画像データを第1フィールドの画素データと第2フィー
ルドの画素データとに分離して、前者をテンプレートデ
ータT1、後者をテンプレートデータT2とし、同様
に、探索領域ΔSAでの参照画像データを第1フィール
ドの画像データと第2フィールドの画像データとに分離
して、前者をサーチエリアデータR1、後者をサーチエ
リアデータR2とし、a1として示すように、テンプレ
ートデータT1とサーチエリアデータR1との画素デー
タ毎の差の絶対値を求めて1−1誤差、テンプレートデ
ータT2とサーチエリアデータR1との画素データ毎の
差の絶対値を求めて1−2誤差とし、また、a2として
示すように、テンプレートデータT1とサーチエリアデ
ータR2との画素データ毎の差の絶対値を求めて2−1
誤差、テンプレートデータT2とサーチエリアデータR
2との画素データ毎の差の絶対値を求めて2−2誤差と
するものである。
The above-described detection operation of the processor array 48 is performed by separating the input image data of the detection target macro block MB into pixel data of the first field and pixel data of the second field, and converting the former into the template data. T1, the latter is template data T2, and similarly, the reference image data in the search area ΔSA is separated into image data of the first field and image data of the second field, and the former is search area data R1, and the latter is search. The absolute value of the difference between the template data T1 and the search area data R1 for each pixel data is calculated as an area data R2, and the absolute value of the difference between the template data T1 and the search area data R1 is calculated as shown as a1. The absolute value of the difference is obtained as 1-2 error, and as shown as a2, Todeta T1 and 2-1 obtains the absolute value of the difference between each pixel data of the search area data R2
Error, template data T2 and search area data R
The absolute value of the difference between each pixel data and the pixel data of 2 is calculated to be a 2-2 error.

【0130】つまり、フレーム画像の画素データからな
る検出対象マクロブロックMB内の入力画像データと探
索領域ΔSA内の参照画像データとが夫々第1,第2フ
ィールド毎に分離され、夫々毎に互いに画素データ毎の
誤差を検出するものである。なお、1−1誤差総和計算
回路49,1−2誤差総和計算回路50,2−1誤差総
和計算回路51,2−2誤差総和計算回路52は夫々、
テンプレートデータT1,T2夫々の全画素データに対
する1−1誤差の総和,1−2誤差の総和,2−1誤差
の総和,2−2誤差の総和を計算することはいうまでも
ない。
That is, the input image data in the macroblock MB to be detected, which is composed of the pixel data of the frame image, and the reference image data in the search area ΔSA are separated into first and second fields, respectively. This is to detect an error for each data. The 1-1 total error calculation circuit 49, the 1-2 total error calculation circuit 50, the 2-1 total error calculation circuit 51, and the 2-2 total error calculation circuit 52 include:
It goes without saying that the sum of the 1-1 error, the sum of the 1-2 errors, the sum of the 2-1 errors, and the sum of the 2-2 errors with respect to all the pixel data of the template data T1 and T2 are calculated.

【0131】図18(b)はフィールド構造の場合を示
すものであって、この場合、プロセッサアレイ48で
は、検出対象マクロブロックMB内での入力画像データ
と探索領域ΔSAでの探索マクロブロックSMB内の参
照画像データとの画素データ毎の誤差を検出するもので
あるが、この場合の入力画像データはフィールド画像の
画素データであり、参照画像データはフレーム画像の画
素データであって、検出対象マクロブロックMBや探索
マクロブロックSMBは、このフィールド画像におい
て、16×16画素からなる。
FIG. 18B shows the case of the field structure. In this case, in the processor array 48, the input image data in the macro block MB to be detected and the search macro block SMB in the search area ΔSA In this case, the input image data is the pixel data of the field image, the reference image data is the pixel data of the frame image, and the detection target macro The block MB and the search macroblock SMB consist of 16 × 16 pixels in this field image.

【0132】そして、プロセッサアレイ48の上記の検
出動作としては、検出対象マクロブロックMBの入力画
像を上下に16×8画素からなる2つのサブブロックに
分離して、前者をテンプレートデータT1、後者をテン
プレートデータT2とし、探索領域ΔSAでの参照画像
データについては、フレーム構造の場合と同様、第1フ
ィールドの画像データと第2フィールドの画像データと
に分離して、前者をサーチエリアデータR1、後者をサ
ーチエリアデータR2とするものであり、フレーム構造
の場合と同様、b1として示すように、テンプレートデ
ータT1とサーチエリアデータR1との画素データ毎の
差の絶対値を求めて1−1誤差、テンプレートデータT
2とサーチエリアデータR1との画素データ毎の差の絶
対値を求めて1−2誤差とし、また、b2として示すよ
うに、テンプレートデータT1とサーチエリアデータR
2との画素データ毎の差の絶対値を求めて2−1誤差、
テンプレートデータT2とサーチエリアデータR2との
画素データ毎の差の絶対値を求めて2−2誤差とするも
のである。
The above-described detection operation of the processor array 48 is such that the input image of the macroblock MB to be detected is divided into two sub-blocks each consisting of 16 × 8 pixels, and the former is used as template data T1 and the latter is used as template data T1. As the template data T2, the reference image data in the search area ΔSA is separated into image data of the first field and image data of the second field, as in the case of the frame structure, and the former is searched area data R1, and the latter is the latter. Is used as the search area data R2. As in the case of the frame structure, the absolute value of the difference between the template data T1 and the search area data R1 for each pixel data is obtained as shown by b1 to obtain a 1-1 error, Template data T
The absolute value of the difference between each pixel data and the search area data R1 is obtained as a 1-2 error, and the template data T1 and the search area data R
The absolute value of the difference for each pixel data from 2 is calculated to be 2-1 error,
The absolute value of the difference between the template data T2 and the search area data R2 for each pixel data is determined to be a 2-2 error.

【0133】なお、この場合でも、1−1誤差総和計算
回路49,1−2誤差総和計算回路50,2−1誤差総
和計算回路51,2−2誤差総和計算回路52は夫々、
テンプレートデータT1,T2夫々の全画素データに対
する1−1誤差の総和,1−2誤差の総和,2−1誤差
の総和,2−2誤差の総和を計算することはいうまでも
ない。
In this case as well, the 1-1 error sum calculation circuit 49, the 1-2 error sum calculation circuit 50, the 2-1 error sum calculation circuit 51, and the 2-2 error sum calculation circuit 52 are:
It goes without saying that the sum of the 1-1 error, the sum of the 1-2 errors, the sum of the 2-1 errors, and the sum of the 2-2 errors with respect to all the pixel data of the template data T1 and T2 are calculated.

【0134】図19は図13における予測誤差比較部2
5の一具体例を示すブロック図であって、95,96は
8ステップ遅延調整回路、97は1ステップ遅延調整回
路、98〜101はスイッチ、102,103は加算回
路、104〜106は小値選択回路、107〜109は
最小値検出回路、110は第1フィールドフィールド予
測/16×8予測ベクトル算出回路、111はフレーム
予測/16×16予測ベクトル算出回路、112は第2
フィールドフィールド予測/16×8予測ベクトル算出
回路、113は最適ベクトル選択回路、114は入力端
子であり、図13に対応する部分には同一符号を付けて
重複する説明を省略する。
FIG. 19 shows the prediction error comparing unit 2 in FIG.
5 is a block diagram showing one specific example, wherein 95 and 96 are eight-step delay adjustment circuits, 97 is one-step delay adjustment circuits, 98 to 101 are switches, 102 and 103 are addition circuits, and 104 to 106 are small values. A selection circuit, 107 to 109 are minimum value detection circuits, 110 is a first field / field prediction / 16 × 8 prediction vector calculation circuit, 111 is a frame prediction / 16 × 16 prediction vector calculation circuit, and 112 is a second
A field / field prediction / 16 × 8 prediction vector calculation circuit, 113 is an optimum vector selection circuit, and 114 is an input terminal, parts corresponding to those in FIG.

【0135】まず、フレーム構造の場合について図18
(a)をも参照して説明する。なお、この場合には、ス
イッチ98〜101は図示する状態にある。
First, FIG. 18 shows a case of a frame structure.
This will be described with reference to FIG. In this case, the switches 98 to 101 are in the illustrated state.

【0136】1−1誤差総和計算回路49からの1−1
誤差の総和と2−1誤差総和計算回路51からの2−1
誤差の装置とは小値選択回路104に供給され、これら
のうちの小さい方が選択される。これを図18(a)で
みると、検出対象マクロブロックMB内の第1フィール
ドの入力画像(テンプレートデータT1からなる)と、
探索マクロブロックSMB内の第1フィールドの参照画
像(サーチエリアデータR1からなる),第2フィール
ドの参照画像(サーチエリアデータR2からなる)のい
ずれがとのパターンマッチングの度合いが高いかを判定
し、よりマッチングしている方の誤差の総和を選択する
ものである。
1-1 from the error sum calculating circuit 49
Sum of error and 2-1 from error sum calculating circuit 51
The error device is supplied to the small value selection circuit 104, and the smaller one of them is selected. 18A, the input image (consisting of the template data T1) of the first field in the macroblock MB to be detected is:
It is determined whether the degree of pattern matching with the reference image of the first field (consisting of the search area data R1) or the reference image of the second field (consisting of the search area data R2) in the search macroblock SMB is high. , The sum of the errors of the matching one is selected.

【0137】これにより、検出たいしょうマクロブロッ
クMB毎に、その第1フィールドの入力画像が探索マク
ロブロックSMBの第1,第2フィールドのいずれかの
方の参照画像画がよりパターンマッチングしているか判
定され、マッチングしている方の誤差の総和が選択され
ることになる。
With this, for each macro block MB to be detected, whether the input image of the first field of the first field of the search macro block SMB matches the reference image of one of the first and second fields more closely. It is determined, and the sum of the error of the matching one is selected.

【0138】最小値検出回路107は、小値選択回路1
04で選択される小さい方の誤差の総和を探索範囲SA
全体にわたって監視し、そのうちの最小のものを抽出す
る。これにより、探索範囲SA内のどの探索マクロブロ
ックSMBの第1,第2フィールドのいずれが検出対象
マクロブロックMBの第1フィールドの入力画像に最も
パターンマッチングしているかが判定され、その誤差の
総和が求められる。
The minimum value detection circuit 107 is provided with the small value selection circuit 1
04 is the sum of the smaller errors selected in the search range SA
Monitor throughout and extract the smallest of them. Thus, it is determined which of the first and second fields of which search macroblock SMB in the search range SA most closely matches the input image of the first field of the detection target macroblock MB, and the sum of the errors is determined. Is required.

【0139】最小値検出回路107が誤差の総和の最小
値のものを検出すると、この検出タイミングでの検出対
象マクロブロックMBの画面上での位置データとこの最
小の誤差の総和を持つ探索マクロブロックSMBの画面
上での位置データとから、第1フィールドフィールド予
測/16×8予測ベクトル算出回路110により、フィ
ールド予測符号化でのこの探索マクロブロックSMBか
らのこの検出対象マクロブロックMB内の第1フィール
ドの入力画像の動きベクトルを生成する。
When the minimum value detection circuit 107 detects the one having the minimum value of the total error, the position data on the screen of the macro block MB to be detected at this detection timing and the search macro block having the minimum total error are searched. From the position data of the SMB on the screen, the first field field prediction / 16 × 8 prediction vector calculation circuit 110 calculates the first field in the detection target macroblock MB from the search macroblock SMB in the field prediction coding. Generate a motion vector of the input image of the field.

【0140】同様にして、小値選択回路106と最小値
検出回路109とにより、1−2誤差総和計算回路50
からの1−2誤差の総和と2−2誤差総和計算回路52
からの2−2誤差の総和とのうちの上記探索範囲SA内
で最も小さい値のものが検出され、この最小の誤差の総
和が検出されたときの検出対象マクロブロックMBの画
面上での位置データとこの最小の誤差の総和を持つ探索
マクロブロックSMBの画面上での位置データとから、
第2フィールドフィールド予測/16×8予測ベクトル
算出回路112により、フィールド予測符号化でのこの
探索マクロブロックSMBからのこの検出対象マクロブ
ロックMB内の第2フィールドの入力画像の動きベクト
ルを生成される。
Similarly, the small value selection circuit 106 and the minimum value detection circuit 109 provide a 1-2 error sum calculation circuit 50.
Sum of 1-2 error from and 2-2 error sum calculation circuit 52
And the sum of the 2-2 errors from the above, the one with the smallest value within the search range SA is detected, and the position on the screen of the macroblock MB to be detected when the minimum sum of the errors is detected From the data and the position data on the screen of the search macro block SMB having the minimum sum of the errors,
The second field field prediction / 16 × 8 prediction vector calculation circuit 112 generates a motion vector of the input image of the second field in the detection target macroblock MB from the search macroblock SMB in the field prediction coding. .

【0141】また、フレーム予測符号化方式での動きベ
クトルを求める。ここで、この動きベクトルの概略を図
20により説明する。
Further, a motion vector in the frame predictive coding method is obtained. Here, the outline of the motion vector will be described with reference to FIG.

【0142】この動きベクトルは、フレーム画像につい
て、検出対象マクロブロックMBの入力画像データと探
索範囲SAでの参照画像データとからもとめるものであ
る。この場合の検出対象マクロブロックMBも探索範囲
SA内を移動する探索マクロブロックSMBも、フレー
ム画像での16×16画素の範囲であって、この範囲内
で水平/垂直方向に8×16画素からなっている。
This motion vector is obtained from the input image data of the macroblock MB to be detected and the reference image data in the search range SA for the frame image. In this case, both the detection target macroblock MB and the search macroblock SMB that moves in the search range SA are 16 × 16 pixels in the frame image, and within this range, 8 × 16 pixels in the horizontal / vertical direction. Has become.

【0143】図20(a)はかかる検出対象マクロブロ
ックMBと探索領域ΔSAでの探索マクロブロックSM
Bとを示すものであって、ハッチングした部分は第1フ
ィールドの画素列を、ハッチングしていない部分は第2
フィールドの画素列を夫々示している。また、図20
(b)も同様のことを示す図であるが、これは図20
(a)に示す状態から1画素間隔分探索マクロブロック
が上方または下方に移動した状態を示している。
FIG. 20A shows a macro block MB to be detected and a search macro block SM in the search area ΔSA.
B, the hatched portion indicates the pixel column of the first field, and the non-hatched portion indicates the second column.
Each pixel column of the field is shown. FIG.
(B) is a diagram showing the same thing, which is shown in FIG.
A state in which the search macroblock has been moved upward or downward by one pixel interval from the state shown in FIG.

【0144】フレーム予測符号化方式での動きベクトル
を求める場合には、かかる検出対象マクロブロックMB
での入力画像データと探索マクロブロックSMBでの参
照画像データとの予測誤差(誤差の総和)を求めるので
あるが、探索マクロブロックSMBが探索領域ΔSAに
沿って順次1画素間隔分ずつ移動するとともに、図20
(a),(b)の状態を交互に繰り返す。そして、夫々
の状態毎に検出対象マクロブロックMBでの入力画像デ
ータと探索マクロブロックSMBでの参照画像データと
の予測誤差を求め、求めた予測誤差のうちの最小のもの
に対して、探索マクロブロックSMBに対する検出対象
マクロブロックMBの動きベクトルを求めればよいので
あるが、上記のように、プロセッサアレイ48(図1
5)で検出対象マクロブロックMBでの入力画像データ
と探索マクロブロックSMBでの参照画像データとを夫
々第1,第2フィールドの画素データに分離してテンプ
レートデータT1,T2及びサーチエリアデータR1,
R2を形成し、これらを用いて、夫々間の予測誤差を求
めていることから、図19に示す予測誤差比較部25の
具体例では、図20(a),(b)に示す2つの状態を
セットとし、夫々の探索範囲SAにおいて、図20
(a)に示す状態で求まる予測誤差と図20(b)に示
す状態で求まる予測誤差との小さい方を選択し、選択さ
れた予測誤差のうちの最小のものを検出するようにして
いる。
When obtaining a motion vector in the frame predictive coding method, the macro block MB to be detected
The prediction error (sum of the errors) between the input image data in the search macroblock and the reference image data in the search macroblock SMB is calculated. The search macroblock SMB sequentially moves by one pixel interval along the search area ΔSA. , FIG.
The states (a) and (b) are alternately repeated. Then, the prediction error between the input image data in the detection target macroblock MB and the reference image data in the search macroblock SMB is calculated for each state, and the search macro What is necessary is just to find the motion vector of the detection target macroblock MB with respect to the block SMB. As described above, the processor array 48 (FIG.
In step 5), the input image data of the detection target macroblock MB and the reference image data of the search macroblock SMB are separated into pixel data of the first and second fields, respectively, and the template data T1, T2 and the search area data R1,
Since R2 is formed and the prediction error between them is obtained using these, in the specific example of the prediction error comparison unit 25 shown in FIG. 19, the two states shown in FIGS. Are set, and in each search range SA, FIG.
The smaller of the prediction error obtained in the state shown in FIG. 20A and the prediction error obtained in the state shown in FIG. 20B is selected, and the smallest one of the selected prediction errors is detected.

【0145】ここで、図20(a),(b)において、
検出対象マクロブロックMBでのハッチングして示す画
素列の画素データは先のテンプレートデータT1を構成
し、ハッチングしない画素列の画素データは先のテンプ
レートデータT2を構成する。また、探索領域ΔSAで
のハッチングして示す画素列の画素データは先のサーチ
エリアデータR1を構成し、ハッチングしない画素列の
画素データは先のサーチエリアデータR2を構成する。
そして、図20(a)に示す状態では、検出対象マクロ
ブロックMBでの入力画像データと探索マクロブロック
SMBでの参照画像データとの予測誤差を求めるという
ことは、これら検出対象マクロブロックMBと探索マク
ロブロックSMBとのハッチングして示す画素列の画素
データ同士の予測誤差,ハッチングしていない画素列の
画素データ同士の予測誤差を夫々求めるものであるか
ら、テンプレートデータT1とサーチエリアデータR1
との画素データの誤差,テンプレートデータT2とサー
チエリアデータR2との画素データの誤差を夫々求め、
これらの総和が求めるべき予測誤差ということになる。
Here, in FIGS. 20 (a) and 20 (b),
The pixel data of the hatched pixel column in the detection target macroblock MB constitutes the preceding template data T1, and the pixel data of the unhatched pixel column constitutes the preceding template data T2. The pixel data of the pixel row indicated by hatching in the search area ΔSA constitutes the preceding search area data R1, and the pixel data of the pixel row not hatched constitutes the preceding search area data R2.
Then, in the state shown in FIG. 20A, obtaining the prediction error between the input image data in the detection target macroblock MB and the reference image data in the search macroblock SMB means that these detection target macroblocks MB Since the prediction error between the pixel data of the pixel row indicated by hatching with the macro block SMB and the prediction error between the pixel data of the pixel row not hatched are calculated, the template data T1 and the search area data R1 are obtained.
Of the pixel data of the template data T2 and the search area data R2, respectively.
The sum of these is the prediction error to be obtained.

【0146】そこで、図19において、テンプレートデ
ータT1とサーチエリアデータR1との画素データの誤
差の総和である1−1誤差総和計算回路49からの1−
1誤差の総和と、テンプレートデータT2とサーチエリ
アデータR2との画素データの誤差の総和である2−2
誤差総和計算回路52からの2−2誤差の総和とは夫
々、スイッチ98,99を介して加算回路102に供給
されて加算され、上記のように、図20(a)に示す状
態での予測誤差が求められる。
Therefore, in FIG. 19, 1--1 from the 1-1 error sum calculation circuit 49, which is the sum of the errors of the pixel data between the template data T1 and the search area data R1.
2-2 which is the sum of one error and the sum of errors of pixel data between template data T2 and search area data R2.
The sum of the 2-2 error from the error sum calculation circuit 52 is supplied to the addition circuit 102 via the switches 98 and 99 and added, and the prediction in the state shown in FIG. An error is required.

【0147】一方、図20(b)に示す状態では、検出
対象マクロブロックMBでの入力画像データと探索マク
ロブロックSMBでの参照画像データとの予測誤差を求
めるということは、検出対象マクロブロックMBのハッ
チングして示す画素列の画素データと探索マクロブロッ
クSMBのハッチングしていない画素列の画素データ同
士の誤差と、検出対象マクロブロックMBのハッチング
していない画素列の画素データと探索マクロブロックS
MBのハッチングして示す画素列の画素データ同士の誤
差とを求め、これらの総和を求めるものであるから、テ
ンプレートデータT1とサーチエリアデータR2との画
素データの誤差,テンプレートデータT2とサーチエリ
アデータR1との画素データの誤差を夫々求め、これら
の総和が求めるべき予測誤差ということになる。従っ
て、この予測誤差は、図19において、1−2誤差総和
計算回路50からの1−2誤差の総和と2−1誤差総和
計算回路51からの2−1誤差の総和との加算値とな
る。
On the other hand, in the state shown in FIG. 20B, obtaining the prediction error between the input image data in the macroblock MB to be detected and the reference image data in the search macroblock SMB means that the macroblock MB to be detected is not detected. Between the pixel data of the hatched pixel row and the pixel data of the unhatched pixel row of the search macroblock SMB, the pixel data of the unhatched pixel row of the detection target macroblock MB, and the search macroblock S
An error between pixel data of a pixel row indicated by hatching of MB is obtained, and a sum thereof is obtained. Therefore, an error of pixel data between template data T1 and search area data R2, and an error between template data T2 and search area data are obtained. The error of the pixel data with respect to R1 is obtained, and the sum of these is the prediction error to be obtained. Therefore, this prediction error is the sum of the sum of the 1-2 errors from the 1-2 error sum calculation circuit 50 and the sum of the 2-1 errors from the 2-1 error sum calculation circuit 51 in FIG. .

【0148】但し、この場合、図20(b)に示す状態
は図20(a)に示す状態よりも1画像間隔分ずれた状
態であるから、次のようなタイミングの補正が必要とな
る。即ち、図20(a),(b)を比較すると、いま、
図20(b)に示す状態が図20(a)に示す状態か
ら、図12(a),(b)に示したように、下方に1画
素間隔分移動した状態とすると、図20(b)での探索
マクロブロックSMBのハッチングしない画素列は、図
20(a)に示す状態での探索マクロブロックSMBで
のハッチングしない画素列と同じものであるが、図20
(b)での探索マクロブロックSMBのハッチングした
画素列は、図20(a)に示す状態での探索マクロブロ
ックSMBでのハッチングした画素列とは異なり、この
探索マクロブロックSMBの進行方向(下方)先頭に新
たな画素列が加わり、最後の画素列がこの探索マクロブ
ロックSMBからはずれる。
However, in this case, since the state shown in FIG. 20B is shifted from the state shown in FIG. 20A by one image interval, the following timing correction is necessary. That is, comparing FIGS. 20A and 20B,
If the state shown in FIG. 20B is shifted downward by one pixel interval from the state shown in FIG. 20A as shown in FIGS. 12A and 12B, the state shown in FIG. 20) are the same as the non-hatched pixel columns in the search macroblock SMB in the state shown in FIG. 20 (a).
The hatched pixel row of the search macroblock SMB in (b) is different from the hatched pixel row in the search macroblock SMB in the state shown in FIG. ) A new pixel row is added at the head, and the last pixel row is deviated from this search macroblock SMB.

【0149】このことからして、この図20(b)の状
態での予測誤差の検出では、1−2誤差総和計算回路5
0からの1−2誤差の総和と2−1誤差総和計算回路5
1からの2−1誤差の総和とを用いるのであるが、1−
2誤差総和計算回路50からの1−2誤差の総和として
は、2−1誤差総和計算回路51からの2−1誤差の総
和よりも探索マクロブロックSMBの1移動周期分、即
ち、上記の1ステップ分遅れて出力されるものを使用す
る必要がある。
Therefore, in the detection of the prediction error in the state of FIG. 20B, the 1-2 error sum calculation circuit 5
Sum of 1-2 error from 0 and 2-1 error sum calculating circuit 5
The sum of 2-1 error from 1 is used.
The sum of the 1-2 errors from the two-error sum calculation circuit 50 is larger than the sum of the 2-1 errors from the 2-1 error sum calculation circuit 51 by one moving period of the search macroblock SMB, that is, 1 It is necessary to use the output that is delayed by the step.

【0150】そこで、この場合には、図19において、
1−2誤差総和計算回路50からの1−2誤差の総和と
2−1誤差総和計算回路51からの2−1誤差の総和と
を夫々スイッチ100,101を介して加算回路103
に供給し、これらを加算して図20(b)に示す状態で
の予測誤差を形成するものであるが、この際、2−1誤
差総和計算回路51からの2−1誤差の総和の方を1ス
テップ遅延調整回路97で1ステップ遅延させ、対応す
る1−2誤差総和計算回路50からの1−2誤差の総和
とタイミングを合わせる。
Thus, in this case, in FIG.
The sum of the 1-2 error from the 1-2 error sum calculation circuit 50 and the 2-1 error sum from the 2-1 error sum calculation circuit 51 are added to the addition circuit 103 via the switches 100 and 101, respectively.
, And adds them to form a prediction error in the state shown in FIG. 20B. At this time, the sum of the 2-1 errors from the 2-1 error sum calculation circuit 51 is Is delayed by one step in a one-step delay adjusting circuit 97, and the timing is adjusted to the sum of the 1-2 errors from the corresponding 1-2 error sum calculating circuit 50.

【0151】図20(b)に示す状態が図20(a)に
示す状態から、図12(d)に示したように、上方に1
画素分移動した状態であるときには、上記とは逆に、図
20(b)での探索マクロブロックSMBのハッチング
した画素列が、図20(a)に示す状態での探索マクロ
ブロックSMBでのハッチングした画素列と同じもので
あり、図20(b)での探索マクロブロックSMBのハ
ッチングしない画素列が、図20(a)に示す状態での
探索マクロブロックSMBでのハッチングしない画素列
とは異なり、この探索マクロブロックSMBの進行方向
(上方)先頭に新たな画素列が加わり、最後の画素列が
この探索マクロブロックSMBからはずれる。
The state shown in FIG. 20 (b) is changed from the state shown in FIG. 20 (a) by one upward as shown in FIG. 12 (d).
Contrary to the above, when the pixel array is moved by the number of pixels, the hatched pixel column of the search macroblock SMB in FIG. 20B is replaced by the hatch in the search macroblock SMB in the state shown in FIG. 20 (b), and the unhatched pixel row in the search macroblock SMB in FIG. 20 (b) is different from the unhatched pixel row in the search macroblock SMB in the state shown in FIG. 20 (a). A new pixel row is added to the head of the search macroblock SMB in the traveling direction (upward), and the last pixel row is deviated from the search macroblock SMB.

【0152】従って、この場合には、図19において、
1ステップ遅延調整回路97により、1−2誤差総和計
算回路50からの1−2誤差の総和を1ステップ分遅延
させればよい。
Therefore, in this case, in FIG.
The one-step delay adjusting circuit 97 may delay the sum of the 1-2 errors from the 1-2 error sum calculating circuit 50 by one step.

【0153】加算回路102,103からの加算出力は
小値選択回路105に供給され、これらのうちの小さい
方が選択され、図20(a),(b)で示す状態のセッ
ト毎に、検出対象マクロブロックMB内の入力画像と探
索マクロブロックSMB内の参照画像との類似の度合い
の高い方が選択され、選択された加算出力が最小値検出
回路108に順次供給される。この最小値検出回路10
8は、小値選択回路105で選択された加算値を探索範
囲SA全体にわたって監視し、そのうちの最小のものを
フレーム予測符号化での予測誤差として抽出する。最小
値検出回路108が最小値のものを検出すると、この検
出タイミングでの検出対象マクロブロックMBと探索マ
クロブロックSMBとの画面上での位置データとから、
フレーム予測/16×16予測ベクトル算出回路111
により、フレーム予測符号化でのこの探索マクロブロッ
クSMBに対するこの検出対象マクロブロックMBの動
きベクトルを生成する。
The addition outputs from the addition circuits 102 and 103 are supplied to a small value selection circuit 105, and the smaller one of them is selected, and the smaller one is selected for each set of states shown in FIGS. 20 (a) and 20 (b). The higher similarity between the input image in the target macroblock MB and the reference image in the search macroblock SMB is selected, and the selected addition output is sequentially supplied to the minimum value detection circuit 108. This minimum value detection circuit 10
8 monitors the added value selected by the small value selection circuit 105 over the entire search range SA, and extracts the minimum value as a prediction error in frame prediction coding. When the minimum value detection circuit 108 detects the one with the minimum value, from the position data on the screen of the detection target macroblock MB and the search macroblock SMB at this detection timing,
Frame prediction / 16 × 16 prediction vector calculation circuit 111
Thus, a motion vector of the detection target macroblock MB with respect to the search macroblock SMB in the frame prediction coding is generated.

【0154】以上のようにして、フレーム構造では、第
1フィールドフィールド予測/16×8予測ベクトル算
出回路110により、検出対象マクロブロックMBの第
1フィールドの入力画像に対する動きベクトル(以下、
第1フィールド動きベクトルという)が、第2フィール
ドフィールド予測/16×8予測ベクトル算出回路11
2により、検出対象マクロブロックMBの第2フィール
ドの入力画像に対する動きベクトル(以下、第2フィー
ルド動きベクトルという)が、フレーム予測/16×1
6予測ベクトル算出回路111により、検出対象マクロ
ブロックMBのフレームの入力画像に対する動きベクト
ル(以下、フレーム動きベクトルという)が夫々得ら
れ、これらは最適ベクトル選択回路113に供給され
る。
As described above, in the frame structure, the first field / field prediction / 16 × 8 prediction vector calculation circuit 110 uses the motion vector (hereinafter, referred to as the motion vector) for the input image of the first field of the macroblock MB to be detected.
The first field motion vector is referred to as a second field field prediction / 16 × 8 prediction vector calculation circuit 11
2, a motion vector (hereinafter, referred to as a second field motion vector) for the input image of the second field of the macroblock MB to be detected is calculated as frame prediction / 16 × 1
The 6 prediction vector calculation circuit 111 obtains motion vectors (hereinafter, referred to as frame motion vectors) for the input image of the frame of the detection target macroblock MB, and these are supplied to the optimum vector selection circuit 113.

【0155】この最適ベクトル選択回路113では、最
小値検出回路107,109の検出値(予測誤差)が加
算され、この加算値と最小検出回路108の検出値(予
測誤差)とを比較して小さい方を検出し、この小さい方
に対する動きベクトルを最適動きベクトルとして、これ
に対する予測誤差とともに、出力端子18から出力す
る。従って、最小値検出回路108の検出値の方が小さ
いときには、フレーム予測/16×16予測ベクトル算
出回路111で生成されたフレーム動きベクトルが最適
動きベクトルとして出力され、最小値検出回路107,
109の検出値の加算値の方が小さいときには、第1フ
ィールドフィールド予測/16×8予測ベクトル算出回
路110で生成された第1フィールド動きベクトルと第
2フィールドフィールド予測/16×8予測ベクトル算
出回路112で生成された第2動きベクトルが最適動き
ベクトルとして出力される。
In the optimum vector selection circuit 113, the detection values (prediction errors) of the minimum value detection circuits 107 and 109 are added, and this added value is compared with the detection value (prediction error) of the minimum detection circuit 108 to be smaller. The motion vector for the smaller one is detected as the optimum motion vector and output from the output terminal 18 together with the prediction error for the motion vector. Therefore, when the detection value of the minimum value detection circuit 108 is smaller, the frame motion vector generated by the frame prediction / 16 × 16 prediction vector calculation circuit 111 is output as the optimal motion vector, and the minimum value detection circuit 107,
When the addition value of the detection values of step 109 is smaller, the first field motion vector generated by the first field field prediction / 16 × 8 prediction vector calculation circuit 110 and the second field field prediction / 16 × 8 prediction vector calculation circuit The second motion vector generated at 112 is output as the optimal motion vector.

【0156】以上の動作が図6(a)〜(j)に示す状
態毎に行なわれ、各状態では、図21に示すように、動
きベクトルが求まる。図21(a)は図19での第1フ
ィールドフィールド予測/16×8予測ベクトル算出回
路110と第2フィールドフィールド予測/16×8予
測ベクトル算出回路112とで得られる動きベクトルを
最適動きベクトルとする場合を示し、検出対象マクロブ
ロック内の第1フィールドの入力画像MB(T1)に対
しては、その探索範囲SAで探索マクロブロックSMB
1の参照画像と最もマッチングしており、この探索マク
ロブロックSMB1からの第1フィールド動きベクトル
V(T1)が最適な動きベクトルとなり、検出対象マク
ロブロック内の第2フィールドの入力画像MB(T1)
に対しては、その探索範囲SAで探索マクロブロックS
MB2の参照画像と最もマッチングしており、この探索
マクロブロックSMB2からの第1フィールド動きベク
トルV(T2)が最適な動きベクトルとなることを示し
ている。
The above operation is performed for each of the states shown in FIGS. 6A to 6J. In each state, a motion vector is obtained as shown in FIG. FIG. 21A shows the motion vectors obtained by the first field / field prediction / 16 × 8 prediction vector calculation circuit 112 and the second field field prediction / 16 × 8 prediction vector calculation circuit 112 in FIG. In the case of the input image MB (T1) of the first field in the detection target macroblock, the search macroblock SMB in the search range SA is shown.
1, the first field motion vector V (T1) from the search macroblock SMB1 becomes the optimal motion vector, and the input image MB (T1) of the second field in the macroblock to be detected.
For the search macroblock S in the search range SA.
The best matching with the reference picture of MB2 indicates that the first field motion vector V (T2) from this search macroblock SMB2 is the optimum motion vector.

【0157】また、図21(b)は図19でのフレーム
予測/16×16予測ベクトル算出回路111で得られ
る動きベクトルを最適動きベクトルとする場合を示して
おり、検出対象マクロブロックMB内のフレーム入力画
像に対しては、その探索範囲SAで探索マクロブロック
SMBのフレーム参照画像と最もマッチングしており、
この探索マクロブロックSMBからのフレーム動きベク
トルV(F)が最適な動きベクトルとなることを示して
いる。
FIG. 21B shows a case where the motion vector obtained by the frame prediction / 16 × 16 prediction vector calculation circuit 111 in FIG. 19 is used as an optimum motion vector. For the frame input image, the search range SA best matches the frame reference image of the search macroblock SMB,
This shows that the frame motion vector V (F) from this search macroblock SMB is the optimal motion vector.

【0158】なお、1−1誤差総和計算回路49,1−
2誤差総和計算回路50,2−1誤差総和計算回路5
1,2−2誤差総和計算回路52から夫々出力される誤
差の総和が、図6(b)〜図7(i)で説明したよう
に、画面DFの他方の端にかかる探索範囲での探索領域
の参照画像が関連するものであるときには、比較無効信
号発生回路22(図8)から入力端子114を介して、
例えば、最小値検出回路107〜109に比較無効信号
が供給され、かかる誤差の総和が遮断されてこれら最小
値検出回路107〜109での処理対象からはずされ
る。
Incidentally, the 1-1 error sum calculation circuit 49,1-
2 total error calculating circuit 50, 2-1 total error calculating circuit 5
As described with reference to FIGS. 6B to 7I, the sum of the errors output from the 1-2 sum error calculation circuit 52 is the search in the search range over the other end of the screen DF. When the reference image of the area is relevant, the comparison invalid signal generation circuit 22 (FIG. 8)
For example, a comparison invalid signal is supplied to the minimum value detection circuits 107 to 109, and the sum of such errors is cut off and removed from the processing targets of these minimum value detection circuits 107 to 109.

【0159】次に、フィールド構造の場合の図19に示
す具体例の動作を説明する。なお、この場合には、スイ
ッチ98〜101は図示とは反対側に閉じた状態にあ
る。
Next, the operation of the specific example shown in FIG. 19 in the case of the field structure will be described. Note that, in this case, the switches 98 to 101 are closed on the opposite side from the illustration.

【0160】この場合には、上記のように、検出対象マ
クロブロックMBは同一フィールドの16×16画素の
範囲であって、垂直/水平方向に16×8画素データか
らなっており、かかる検出対象マクロブロックMBが上
下のサブブロックに分割されて夫々第1,第2のテンプ
レートデータT1,T2を形成し、かかる第1,第2の
テンプレートデータT1,T2と上記のサーチエリアデ
ータR1,R2との画素データ毎の誤差から、1−1誤
差総和計算回路49,1−2誤差総和計算回路50,2
−1誤差総和計算回路51,2−2誤差総和計算回路5
2で夫々1−1誤差の総和,1−2誤差の総和,2−1
誤差の総和,2−2誤差の総和が形成される。
In this case, as described above, the macroblock MB to be detected is a range of 16 × 16 pixels in the same field, and is composed of 16 × 8 pixel data in the vertical / horizontal directions. The macroblock MB is divided into upper and lower sub-blocks to form first and second template data T1 and T2, respectively. The first and second template data T1 and T2 and the search area data R1 and R2 are From the error for each pixel data, 1-1 error sum calculation circuit 49, 1-2 error sum calculation circuit 50, 2
-1 Error total calculation circuit 51, 2-2 Error total calculation circuit 5
2, the sum of 1-1 error, the sum of 1-2 error, 2-1
The sum of the errors and the sum of the 2-2 errors are formed.

【0161】先のフレーム構造の場合と同様に、小値選
択回路104,最小値検出回路107及び第1フィール
ドフィールド予測/16×8予測ベクトル算出回路11
0により、同じ探索範囲SA内での1−1誤差総和計算
回路49からの1−1誤差の総和と2−1誤差総和計算
回路51からの2−1誤差の総和とのうちの最小のもの
の動きベクトル(上サブブロックの16×8予測ベクト
ル)が生成され、同様に、小値選択回路106,最小値
検出回路109及び第1フィールドフィールド予測/1
6×8予測ベクトル算出回路112により、同じ探索範
囲SA内での1−2誤差総和計算回路50からの1−2
誤差の総和と2−2誤差総和計算回路52からの2−2
誤差の総和とのうちの最小のものの動きベクトル(下サ
ブブロックの16×8予測ベクトル)が生成される。
As in the case of the previous frame structure, the small value selection circuit 104, the minimum value detection circuit 107, and the first field / field prediction / 16 × 8 prediction vector calculation circuit 11
0, the smallest one of the sum of the 1-1 error from the 1-1 error sum calculation circuit 49 and the sum of the 2-1 error from the 2-1 error sum calculation circuit 51 within the same search range SA. A motion vector (16 × 8 prediction vector of the upper sub-block) is generated, and similarly, the small value selection circuit 106, the minimum value detection circuit 109, and the first field field prediction / 1
The 6 × 8 prediction vector calculation circuit 112 outputs the 1-2 from the 1-2 error sum calculation circuit 50 within the same search range SA.
Sum of Error and 2-2 from Error Sum Calculation Circuit 52
The motion vector (the 16 × 8 prediction vector of the lower sub-block) of the smallest one of the sum of the errors is generated.

【0162】さらに、この具体例では、フィールド画像
での16×16画素の範囲の検出対象マクロブロックM
Bについても動きベクトル(16×16予測ベクトル)
を求め、これと上下夫々のサブブロックの動きベクトル
(16×8予測ベクトル)とのうちの最適なものをこの
検出対象マクロブロックMBの動きベクトルとする。
Further, in this specific example, the macroblock M to be detected in the range of 16 × 16 pixels in the field image is used.
Motion vector for B (16 × 16 prediction vector)
And the optimal one of the motion vector and the motion vector (16 × 8 prediction vector) of each of the upper and lower sub-blocks is set as the motion vector of the detection-target macroblock MB.

【0163】フィールド画像の16×16画素範囲の大
きさをもつ16×8画素からなる検出対象マクロブロッ
クMBの動きベクトル(即ち、16×16予測ベクト
ル)は、図22に示すように、8×8画素からなる(も
とのフィールド画像で16×8画素範囲の)上サブブロ
ックと同じく8×8画素からなる(もとのフィールド画
像で16×8画素範囲の)下サブブロックとが探索範囲
SAの探索領域ΔSAに沿って配列されてなる検出対象
マクロブロックMBの入力画像と、探索領域ΔSAでの
同じ大きさの探索マクロブロック(SMB+SMB’)
の参照画像とのマッチングの度合いによって求めるもの
であるが、上記のように、プロセッサアレイ48(図1
5)において、かかる検出対象マクロブロックMBを
上,下サブブロックに分割して夫々からテンプレートデ
ータT1,T2を得、これを用いて16×8予測ベクト
ルを求めるようにしているので、この16×16予測ベ
クトルも、かかるテンプレートデータT1,T2から1
−1誤差総和計算回路49,1−2誤差総和計算回路5
0,2−1誤差総和計算回路51及び2−2誤差総和計
算回路52で夫々得られる1−1誤差の総和,1−2誤
差の総和,2−1誤差の総和及び2−2誤差の総和を用
いて、得るようにするものである。
As shown in FIG. 22, the motion vector (ie, 16 × 16 prediction vector) of the macroblock MB to be detected consisting of 16 × 8 pixels having a size in the 16 × 16 pixel range of the field image is, as shown in FIG. The upper sub-block consisting of 8 pixels (having a 16 × 8 pixel range in the original field image) and the lower sub-block consisting of 8 × 8 pixels (having a 16 × 8 pixel range in the original field image) An input image of a detection target macroblock MB arranged along the SA search area ΔSA, and a search macroblock (SMB + SMB ′) of the same size in the search area ΔSA
Is determined by the degree of matching with the reference image of the processor array 48, as described above.
In 5), the macro block MB to be detected is divided into upper and lower sub-blocks, template data T1 and T2 are obtained from each of them, and a 16 × 8 prediction vector is obtained using the template data. The 16 predicted vectors are also 1 from the template data T1 and T2.
-1 error sum calculation circuit 49, 1-2 error sum calculation circuit 5
The sum of the 1-1 error, the sum of the 1-2 errors, the sum of the 2-1 errors, and the sum of the 2-2 errors obtained by the 0, 2-1 error sum calculation circuit 51 and the 2-2 error sum calculation circuit 52, respectively. Is to be obtained by using

【0164】そこで、図19において、1−1誤差総和
計算回路49からの1−1誤差の総和と1−2誤差総和
計算回路50の1−2誤差の総和とをスイッチ98,9
9を介して加算回路102に供給し、そこで加算するも
のであるが、この加算値を図22における上サブブロッ
クと下サブブロックとが探索領域ΔSAの方向に配列さ
れてなる検出対象マクロブロックMBと探索領域ΔSA
での探索マクロブロック(SMB+SMB’)との誤差
の総和となるようにする。
Therefore, in FIG. 19, the total of the 1-1 error from the 1-1 total error calculating circuit 49 and the total of the 1-2 error of the 1-2 total error calculating circuit 50 are changed by switches 98 and 9.
9 is added to the addition circuit 102 and added there. This addition value is used as the detection target macroblock MB in which the upper sub-block and the lower sub-block in FIG. 22 are arranged in the direction of the search area ΔSA. And search area ΔSA
And the sum of the errors with the search macroblock (SMB + SMB ').

【0165】しかしながら、図15に示したプロセッサ
アレイ48の動作によると、図22に示すように、検出
対象マクロブロックMBの上サブブロックMB(T1)
のテンプレートデータT1と下サブブロックMB(T
2)のテンプレートデータT2とは、同じタイミングで
探索領域ΔSAでの同じ探索マクロブロックSMBのサ
ーチエリアデータR1,R2と画素データの誤差を求め
ている。これによると、図19において、1−1誤差総
和計算回路49と1−2誤差総和計算回路50とから同
時に出力される1−1誤差の総和と1−2誤差の総和と
は、上サブブロックMB(T1)のテンプレートデータ
T1,下サブブロックMB(T2)のテンプレートデー
タT2とが同じサーチエリアR1に対して得られる誤差
の総和であり、これら同時に得られる1−1誤差の総和
と1−2誤差の総和を加算しても、図22に示す上,下
サブブロックが探索領域ΔSAに沿って配列されてなる
検出対象マクロブロックMBに対する誤差の総和とはな
らない。
However, according to the operation of the processor array 48 shown in FIG. 15, as shown in FIG. 22, the upper sub-block MB (T1)
Template data T1 and the lower sub-block MB (T
With the template data T2 of 2), the error between the search area data R1 and R2 of the same search macroblock SMB in the search area ΔSA and the pixel data at the same timing is obtained. According to FIG. 19, the sum of the 1-1 error and the sum of the 1-2 error simultaneously output from the 1-1 error sum calculation circuit 49 and the 1-2 error sum calculation circuit 50 in FIG. The template data T1 of the MB (T1) and the template data T2 of the lower sub-block MB (T2) are the sum of errors obtained for the same search area R1, and the sum of the simultaneously obtained 1-1 errors and 1- Even if the sum of the two errors is added, the sum of the errors does not become the sum of the errors for the detection target macroblock MB in which the upper and lower sub-blocks shown in FIG. 22 are arranged along the search area ΔSA.

【0166】図22から明らかなように、いま、実線で
囲む同じ探索マクロブロックSMB内のサーチエリアデ
ータR1に対して上マクロブロックMB(T1)のテン
プレートデータT1と下マクロブロック(T2)のテン
プレートデータT2との1−1誤差の総和と1−2誤差
の総和が得られたとし、このとき、探索マクロブロック
SMBが下方に1ステップずつ移動するものとすると、
この探索マクロブロックSMBが8ステップ下方に移動
したときに、探索マクロブロックSMB内のサーチエリ
アデータR1に対して下マクロブロック(T2)のテン
プレートデータT2の1−2誤差の総和が得られること
になる。従って、先行する上マクロブロックMB(T
1)のテンプレートデータT1の1−1誤差の総和とこ
れより8ステップだけ遅れて得られるこの下マクロブロ
ック(T2)のテンプレートデータT2の1−2誤差の
総和とを加算することにより、検出対象マクロブロック
MBに対する誤差の総和が得られることになる。
As is clear from FIG. 22, the template data T1 of the upper macroblock MB (T1) and the template data of the lower macroblock (T2) are now compared with the search area data R1 in the same search macroblock SMB surrounded by a solid line. It is assumed that the sum of the 1-1 error and the sum of the 1-2 error with respect to the data T2 are obtained. At this time, assuming that the search macro block SMB moves downward by one step,
When the search macroblock SMB moves downward by 8 steps, the sum of 1-2 errors of the template data T2 of the lower macroblock (T2) with respect to the search area data R1 in the search macroblock SMB is obtained. Become. Therefore, the preceding upper macroblock MB (T
By adding the sum of the 1-1 errors of the template data T1 of 1) and the sum of the 1-2 errors of the template data T2 of the lower macroblock (T2) obtained 8 steps later than this, the detection target is obtained. The sum of the errors for the macroblock MB is obtained.

【0167】そこで、この具体例では、このような方向
に探索マクロブロックSMBが移動する場合には、先行
して得られる1−1誤差総和計算回路49からの1−1
誤差の総和を、8ステップ遅延調整回路95によって8
ステップだけ遅延させてから、加算回路102に供給す
る。
Therefore, in this specific example, when the search macro block SMB moves in such a direction, the 1-1 from the 1-1 error sum calculation circuit 49 obtained in advance is used.
The sum of the errors is calculated by an eight-step delay adjustment circuit 95 as 8
After being delayed by a step, the signal is supplied to the addition circuit 102.

【0168】逆に、探索マクロブロックSMBが上方に
移動するときには、1−2誤差総和計算回路50からの
1−2誤差の総和の方が先行して得られるから、これを
8ステップ遅延調整回路95によって8ステップだけ遅
延させて加算回路102に供給する。
Conversely, when the search macroblock SMB moves upward, the sum of the 1-2 error from the 1-2 error sum calculation circuit 50 is obtained earlier, so that the 8-step delay adjustment circuit The signal is delayed by eight steps by 95 and supplied to the adding circuit 102.

【0169】以上は、上サブブロックMB(T1),下
サブブロックMB(T2)のテンプレートデータT1,
T2と探索マクロブロックSMBの第1フィールドのサ
ーチエリアデータR1との誤差の総和を得る場合であっ
たが、探索マクロブロックSMBの第2フィールド側の
サーチエリアデータR2との誤差の総和を得る場合も同
様であり、2−1誤差総和計算回路51と2−2誤差総
和計算回路52とから出力される2−1誤差の総和と2
−2誤差の総和との、探索マクロブロックSMBの移動
方向に応じて一方を8ステップ遅延調整回路96で遅延
させ、これによってタイミング調整されたこれら誤差の
総和をスイッチ100,101を介して加算回路103
に供給し、そこで加算して探索マクロブロックSMB内
の第2フィールドに対する検出対象マクロブロックMB
の誤差の総和を求める。
The above is the description of the template data T1,
In the case where the sum of the error between T2 and the search area data R1 of the first field of the search macroblock SMB is obtained, the case where the sum of the error of the search area data R2 on the second field side of the search macroblock SMB is obtained. Similarly, the sum of the 2-1 error output from the 2-1 error sum calculation circuit 51 and the 2-2 error sum calculation circuit 52 and 2
One of them is delayed by an eight-step delay adjusting circuit 96 in accordance with the moving direction of the search macro block SMB with respect to the sum of the errors, and the sum of these errors whose timing has been adjusted is added via switches 100 and 101 to an adding circuit. 103
, And then add the detected macroblock MB to the second field in the search macroblock SMB.
Find the sum of the errors of

【0170】これ以下の処理は、フレーム構造でのフレ
ーム予測の動きベクトルを検出する場合と同様であっ
て、加算器102,103から同時に誤差の総和が出力
される毎に、それらのうちの小さい方を小値選択回路1
05で選択し、さらに、このように選択された誤差の総
和の同じ探索範囲SA内での最小のものを最小値検出回
路108で検出し、この検出された最小の誤差の総和に
対する動きベクトル(16×16予測ベクトル)をフレ
ーム予測/16×16予測ベクトル算出回路111で生
成する。そして、最適ベクトル選択回路113により、
第1,フィールドフィールド予測/16×8予測ベクト
ル算出回路110と第2フィールドフィールド予測/1
6×8予測ベクトル算出回路112とで得られた動きベ
クトル(16×8予測ベクトル)と、フレーム予測/1
6×16予測ベクトル算出回路111で得られる動きベ
クトル(16×16予測ベクトル)とのうち、最適な動
きベクトルを検出対象マクロブロックMBの動きベクト
ルとして選択し、その予測誤差とともに、出力端子18
から出力する。
The subsequent processing is the same as that of detecting a motion vector for frame prediction in the frame structure. Each time the adders 102 and 103 simultaneously output the sum of errors, a smaller one of them is output. One small value selection circuit 1
05, and the minimum value of the sum of the errors thus selected within the same search range SA is detected by the minimum value detection circuit 108, and the motion vector ( 16 × 16 prediction vector) is generated by the frame prediction / 16 × 16 prediction vector calculation circuit 111. Then, by the optimal vector selection circuit 113,
1st field field prediction / 16 × 8 prediction vector calculation circuit 110 and second field field prediction / 1
The motion vector (16 × 8 prediction vector) obtained by the 6 × 8 prediction vector calculation circuit 112 and the frame prediction / 1
Among the motion vectors (16 × 16 prediction vectors) obtained by the 6 × 16 prediction vector calculation circuit 111, an optimum motion vector is selected as a motion vector of the macroblock MB to be detected, and the prediction error is output to the output terminal 18.
Output from

【0171】なお、16×16予測ベクトルの検出の場
合には、探索範囲SAの垂直方向の8ステップ期間は
上,下サブブロックの一方に対する予測誤差がないの
で、探索範囲SAは±12画素(フレーム画像の場合、
±24画素相当)になる。
In the case of detecting a 16 × 16 prediction vector, since there is no prediction error with respect to one of the upper and lower sub-blocks during eight vertical steps of the search range SA, the search range SA is ± 12 pixels ( For frame images,
(Corresponding to ± 24 pixels).

【0172】図23(a)はこのようにして求めた16
×8予測ベクトルV(T1),V(T2)を示すもので
あり、図23(b)は16×16予測ベクトルVを示す
ものである。
FIG. 23 (a) shows the results of 16
FIG. 23 (b) shows a 16 × 16 prediction vector V, showing × 8 prediction vectors V (T1) and V (T2).

【0173】以上のように、この実施形態では、同じ探
索範囲のデータを用いて、フレーム構造の場合には、フ
レーム予測符号化とフィールド予測符号化夫々の最適ベ
クトルと予測誤差の値とが、フィールド構造の場合に
は、16×16予測符号化と16×8予測符号化との最
適ベクトルと予測誤差の値を求めることができるので、
フレーム構造の場合でも、また、フィールド構造の場合
でも、最適な予測符号化の動きベクトルを選ぶことがで
きる。
As described above, in this embodiment, using data in the same search range, in the case of a frame structure, the optimal vector and the prediction error value of each of the frame predictive coding and the field predictive coding are: In the case of the field structure, since the optimal vector and the prediction error value of 16 × 16 prediction encoding and 16 × 8 prediction encoding can be obtained,
Even in the case of the frame structure or the case of the field structure, it is possible to select an optimal motion vector for predictive coding.

【0174】図24は本発明による動きベクトル検出装
置を用いた動画像符号化装置の一実施形態を示すブロッ
ク図であって、34は動きベクトル粗探索回路、115
は入力端子、116は画像入力回路、117は動き補償
予測回路、118はDCT変換回路、119は量子化回
路、120は局部復号回路、121は可変長符号化回
路、122は符号出力回路、123は出力端子、124
は動きベクトル密探索回路であり、図一に対応する部分
には同一符号を付けている。
FIG. 24 is a block diagram showing an embodiment of a moving picture coding apparatus using a motion vector detecting apparatus according to the present invention.
Is an input terminal, 116 is an image input circuit, 117 is a motion compensation prediction circuit, 118 is a DCT conversion circuit, 119 is a quantization circuit, 120 is a local decoding circuit, 121 is a variable length coding circuit, 122 is a code output circuit, 123 Is an output terminal, 124
Denotes a motion vector fine search circuit, and the same reference numerals are given to portions corresponding to FIG.

【0175】同図において、この実施形態は、動きベク
トル粗探索回路34として図1に示した動きベクトル検
出部34を用いたものである。メモリアクセス切換回路
9,書込データ切換回路12,書込/読出切換回路13
及びメモリ14も図1に示したものと同じであるが、メ
モリ14は他の回路からもアクセスされる。
In this embodiment, the present embodiment uses the motion vector detecting section 34 shown in FIG. Memory access switching circuit 9, write data switching circuit 12, write / read switching circuit 13
The memory 14 is the same as that shown in FIG. 1, but the memory 14 is also accessed from other circuits.

【0176】動きベクトル粗探索回路34による垂直1
画素,水平2画素精度の動きベクトルの探索と、これに
よって得られた動きベクトルの周辺で、動きベクトル密
探索回路124による垂直水平1/2画素精度の動きベ
クトルの探索との2段階探索が行なわれる。
Vertical 1 by the motion vector coarse search circuit 34
A two-stage search of a motion vector search with pixel and horizontal two-pixel accuracy and a search for a motion vector with vertical and horizontal half-pixel accuracy by the motion vector dense search circuit 124 is performed around the motion vector obtained thereby. It is.

【0177】入力端子115からの入力画像データは、
画像入力回路116により、メモリ14へ書き込まれ
る。このメモリ14のアクセス削減のために、動きベク
トル密探索回路114及び動き補償予測回路117で使
用される入力画像データは、動きベクトル粗探索回路3
4のために読み出したものを転送して用いる。動き補償
予測回路117は、動きベクトル密探索回路114で得
られた動きベクトルを用いてメモリ14から参照画像デ
ータを読み出し、1/2画素精度の動き補償予測を行な
って残差を出力する。
The input image data from the input terminal 115 is
The image is written into the memory 14 by the image input circuit 116. The input image data used in the motion vector fine search circuit 114 and the motion compensation prediction circuit 117 to reduce the access to the memory 14 is the motion vector coarse search circuit 3
The data read for 4 is transferred and used. The motion compensation prediction circuit 117 reads the reference image data from the memory 14 using the motion vector obtained by the motion vector dense search circuit 114, performs 1/2 pixel accuracy motion compensation prediction, and outputs a residual.

【0178】この残差はDCT変換回路118でDCT
変換され、さらに、量子化回路119で量子化される。
局部復号回路120では、この量子化されたデータが逆
量子化,逆DCT変換され、さらに、動き補償予測回路
117から転送される予測データが加算されることによ
り、局部復号画像が作成されてメモリ14に書き込まれ
る。
This residual is converted by the DCT conversion circuit 118 into the DCT
It is transformed and further quantized by the quantization circuit 119.
In the local decoding circuit 120, the quantized data is inversely quantized and inversely DCT-transformed, and further, the prediction data transferred from the motion compensation prediction circuit 117 is added, so that a local decoded image is created and stored in the memory. 14 is written.

【0179】なお、この実施形態では、動きベクトル粗
探索回路34で用いる参照画像は入力画像であり、動き
ベクトル密探索回路114で用いる参照画像は上記の局
部復号画像である。
In this embodiment, the reference image used in the coarse motion vector search circuit 34 is an input image, and the reference image used in the fine motion vector search circuit 114 is the above-described local decoded image.

【0180】可変長符号化回路121では、量子化回路
119からの量子化データと動きベクトル密探索回路1
24からの動きベクトルとを符号化し、符号出力回路1
22は、これを一旦メモリ14に書き込んでから一定レ
ートで読み出し、出力端子123から出力する。
In the variable length coding circuit 121, the quantized data from the quantization circuit 119 and the motion vector dense search circuit 1
24, and encodes the motion vector from the
Reference numeral 22 writes the data into the memory 14 once, reads it out at a constant rate, and outputs it from the output terminal 123.

【0181】この実施形態では、広い探索範囲と正確な
動きベクトルの検出を実現しつつ、少ないメモリアクセ
スで、なおかつ効率の良いタイムスロット割り当てで、
フレーム構造とフィールド構造の複数の予測モードに対
応した動画像符号化が実現することができる。
In this embodiment, while realizing a wide search range and accurate motion vector detection, with a small memory access and an efficient time slot allocation,
Video encoding corresponding to a plurality of prediction modes having a frame structure and a field structure can be realized.

【0182】[0182]

【発明の効果】以上説明したように、本発明によると、
少ないメモリアクセスで、なおかつ効率の良いタイムス
ロット割り当てで動きベクトル検出用の参照画像の読み
出しを行なうことができる。
As described above, according to the present invention,
A reference image for detecting a motion vector can be read with less memory access and more efficient time slot allocation.

【0183】また、フレーム構造の場合には、フレーム
予測とフィールド予測夫々の最適動きベクトルと予測誤
差の値が、また、フィールド構造の場合には、16×1
6予測符号化と16×8予測符号化の最適動きベクトル
と予測誤差の値を求めることができるので、フレーム構
造の場合でも、また、フィールド構造の場合でも、最適
な予測符号化と動きベクトルとを選ぶことができる。
In the case of the frame structure, the optimum motion vector and the value of the prediction error of the frame prediction and the field prediction, respectively, and in the case of the field structure, 16 × 1
Since the optimal motion vector and the value of the prediction error of the 6-prediction coding and the 16 × 8 prediction coding can be obtained, the optimal prediction coding and the motion vector can be obtained regardless of the frame structure or the field structure. You can choose.

【0184】そして、それにより、広い探索範囲と正確
な動きベクトルの検出を実現しつつ、少ないメモリアク
セスで、なおかつ効率の良いタイムスロット割り当て
で、また、フレーム構造とフィールド構造の複数の予測
モードに対応した動画像符号化が実現する。
Thus, while realizing a wide search range and accurate motion vector detection, it is possible to use a small number of memory accesses, achieve efficient time slot allocation, and use a plurality of prediction modes having a frame structure and a field structure. Corresponding video coding is realized.

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

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

【図2】動きベクトル検出装置の一従来例での粗い動き
ベクトル検出と細かい動きベクトル検出とにおけるマク
ロブロックとそれに対する探索範囲との関係を示す図で
ある。
FIG. 2 is a diagram illustrating a relationship between a macroblock and a search range for the macroblock in coarse motion vector detection and fine motion vector detection in a conventional example of a motion vector detection device.

【図3】図2に示した従来技術の粗い動きベクトル検出
動作を示す図である。
FIG. 3 is a diagram illustrating a coarse motion vector detection operation according to the related art shown in FIG. 2;

【図4】図1に示した実施形態での検出対象マクロブロ
ックとそれに対する探索範囲との関係示す図である。
FIG. 4 is a diagram showing a relationship between a detection target macroblock and a search range for the macroblock in the embodiment shown in FIG. 1;

【図5】図1に示した実施形態での検出対象マクロブロ
ックの移動と探索範囲の変化とを説明するための図であ
る。
FIG. 5 is a diagram for explaining movement of a detection target macroblock and a change in a search range in the embodiment shown in FIG. 1;

【図6】図1に示した実施形態でのマクロブロックが画
面の右端から左端に移るときの前半部分の動作を示す図
である。
FIG. 6 is a diagram illustrating an operation of a first half when a macro block moves from a right end to a left end of a screen in the embodiment illustrated in FIG. 1;

【図7】図1に示した実施形態でのマクロブロックが画
面の右端から左端に移るときの後半部分の動作を示す図
である。
FIG. 7 is a diagram illustrating an operation of a second half when a macro block moves from a right end to a left end of a screen in the embodiment illustrated in FIG. 1;

【図8】図1における参照画像バッファ、動きベクトル
探索回路及び探索範囲制限回路の一具体例を示すブロッ
ク図である。
FIG. 8 is a block diagram showing a specific example of a reference image buffer, a motion vector search circuit, and a search range limiting circuit in FIG. 1;

【図9】図8におけるメモリバッファでのかかる書込み
アドレス信号と読出しアドレス信号の発生タイミングを
示す図である。
FIG. 9 is a diagram showing generation timings of such a write address signal and a read address signal in the memory buffer in FIG. 8;

【図10】図8におけるバッファメモリでの書込み/読
出しの動作を示す図である。
FIG. 10 is a diagram showing write / read operations in the buffer memory in FIG. 8;

【図11】図8における予測誤差算出部の動作を概略的
に示す図である。
FIG. 11 is a diagram schematically showing an operation of a prediction error calculator in FIG. 8;

【図12】図8における動きベクトル探索回路での予測
誤差算出部24の動作を説明するための図である。
FIG. 12 is a diagram for explaining an operation of a prediction error calculation unit 24 in the motion vector search circuit in FIG.

【図13】図8における予測誤差算出部の一具体例を示
すブロック図である。
13 is a block diagram illustrating a specific example of a prediction error calculator in FIG.

【図14】図13におけるプロセッサアレイに供給され
るテンプレートデータ、サーチエリアデータの構成を示
す図である。
14 is a diagram showing a configuration of template data and search area data supplied to the processor array in FIG.

【図15】図13におけるプロセッサアレイの一具体例
を示す構成図である。
FIG. 15 is a configuration diagram illustrating a specific example of a processor array in FIG. 13;

【図16】図15におけるプロセッサエレメントの一具
体例を示すブロック図である。
16 is a block diagram showing a specific example of a processor element in FIG.

【図17】図15におけるサイドレジスタの一具体例を
示すブロック図である。
FIG. 17 is a block diagram showing a specific example of a side register in FIG. 15;

【図18】図13に示した具体例の全体的な動作を示す
模式図である。
FIG. 18 is a schematic diagram showing an overall operation of the specific example shown in FIG.

【図19】図8における予測誤差比較部の一具体例を示
すブロック図である。
FIG. 19 is a block diagram illustrating a specific example of a prediction error comparison unit in FIG. 8;

【図20】図19に示した具体例のフレーム構造での一
動作例を説明するための模式図である。
20 is a schematic diagram for explaining an operation example in the frame structure of the specific example shown in FIG. 19;

【図21】図19に示した具体例のフレーム構造での検
出した動きベクトルを示す模式図である。
FIG. 21 is a schematic diagram showing a motion vector detected in the frame structure of the specific example shown in FIG. 19;

【図22】図19に示した具体例のフィールド構造での
一動作例を説明するための模式図である。
FIG. 22 is a schematic diagram for explaining an example of an operation in the field structure of the specific example shown in FIG. 19;

【図23】図19に示した具体例のフィールド構造での
検出した動きベクトルを示す模式図である。
FIG. 23 is a schematic diagram showing a motion vector detected in the field structure of the specific example shown in FIG. 19;

【図24】本発明による動きベクトル検出装置を用いた
動画像符号化装置の一実施形態を示すブロック図であ
る。
FIG. 24 is a block diagram showing an embodiment of a moving picture coding device using a motion vector detecting device according to the present invention.

【符号の説明】 1 画面同期回路 2 リセット遅延回路 3,4 水平/垂直マクロブロックカウンタ 5 入力画像読出アドレス発生回路 6 参照画像追加読出アドレス発生回路 7 入力画像書込アドレス信号の入力端子 8 参照画像書込アドレス信号の入力端子 9 メモリアクセス切換回路 10 入力画像書込データの入力端子 11 参照画像データの入力端子 12 書込データ切換回路 13 書込/読出切換回路 14 メモリ 15 入力画像バッファ 16 参照画像バッファ 17 動きベクトル探索回路 18 動きベクトルの出力端子 19 探索範囲制限回路 20,21 入力端子 22 比較無効信号発生回路 23 探索領域カウンタ 24 予測誤差算出部 25 予測誤差比較部 26 データ切換回路 27 書込領域選択カウンタ 28 書込アドレス発生回路 29 領域リセット回路 30 読出領域カウンタ 31 読出アドレス発生回路 32 アドレス切換回路 33 バッファメモリ 34 動きベクトル検出部 35 フレーム/フィールド構造設定回路 36,37 スイッチ 38 第1フィールド抜出し回路 39 上サブブロック抜出し回路 40 第2フィールド抜出し回路 41 下サブブロック抜出し回路 42 第1フィールド抜出し回路 43 第2フィールド抜出し回路 44〜47 シリアル/パラレル変換回路 48 プロセッサアレイ 49 1−1誤差総和計算回路 50 1−2誤差総和計算回路 51 2−1誤差総和計算回路 52 2−2誤差総和計算回路 571-1〜578-8 プロセッサエレメント 581-1〜588-32 サイドレジスタ 95,96 8ステップ遅延調整回路 97 1ステップ遅延調整回路 98〜101 スイッチ 102,103 加算回路 104〜106 小値選択回路 107〜109 最小値検出回路 110 第1フィールドフィールド予測/16×8予測
ベクトル算出回路 111 フレーム予測/16×16予測ベクトル算出回
路 112 第2フィールドフィールド予測/16×8予測
ベクトル算出回路 113 最適ベクトル選択回路 117 動き補償予測回路 118 DCT変換回路 119 量子化回路 121 可変長符号化回路 124 動きベクトル密探索回路
[Description of Signs] 1 Screen synchronization circuit 2 Reset delay circuit 3, 4 Horizontal / vertical macroblock counter 5 Input image read address generation circuit 6 Reference image additional read address generation circuit 7 Input terminal for input image write address signal 8 Reference image Input terminal of write address signal 9 Memory access switching circuit 10 Input terminal of input image write data 11 Input terminal of reference image data 12 Write data switching circuit 13 Write / read switching circuit 14 Memory 15 Input image buffer 16 Reference image Buffer 17 Motion vector search circuit 18 Motion vector output terminal 19 Search range limiting circuit 20, 21 Input terminal 22 Comparison invalid signal generation circuit 23 Search area counter 24 Prediction error calculation unit 25 Prediction error comparison unit 26 Data switching circuit 27 Write area Selection counter 28 Write address generation circuit 29 area reset circuit 30 read area counter 31 read address generation circuit 32 address switching circuit 33 buffer memory 34 motion vector detection unit 35 frame / field structure setting circuit 36, 37 switch 38 first field extraction circuit 39 upper sub block extraction circuit 40 2 field extraction circuit 41 lower sub block extraction circuit 42 first field extraction circuit 43 second field extraction circuit 44 to 47 serial / parallel conversion circuit 48 processor array 49 1-1 error total calculation circuit 50 1-2 error total calculation circuit 51 2-1 Error total calculation circuit 52 2-2 Error total calculation circuit 57 1-1 to 57 8-8 Processor element 58 1-1 to 58 8-32 Side register 95,968 8-step delay adjustment circuit 97 One-step delay adjustment Circuit 98 Reference Signs List 101 Switch 102, 103 Addition circuit 104-106 Small value selection circuit 107-109 Minimum value detection circuit 110 First field field prediction / 16 × 8 prediction vector calculation circuit 111 Frame prediction / 16 × 16 prediction vector calculation circuit 112 Second field Field prediction / 16 × 8 prediction vector calculation circuit 113 Optimum vector selection circuit 117 Motion compensation prediction circuit 118 DCT transformation circuit 119 Quantization circuit 121 Variable length coding circuit 124 Motion vector dense search circuit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 1画面分の入力画像を所定の大きさのブ
ロックに分割するとともに、該ブロック毎に参照画像の
探索範囲を設定し、該ブロック毎に、該参照画像からの
該入力画像の動きベクトルを該ブロックに対して設定さ
れた該探索範囲内から検出する動きベクトル検出装置に
おいて、 少なくとも該探索範囲分の該参照画像の画像データを記
憶する参照画像記憶手段と、 該参照画像記憶手段に記憶された該参照画像の画像デー
タを用いて、動きベクトルの検出対象となる該ブロック
内の入力画像に対する動きベクトルを探索する動きベク
トル探索手段と、 動きベクトルの検出対象となる該ブロックが隣のブロッ
クに移る毎に、該参照画像記憶手段に記憶されている探
索範囲分の該参照画像の画像データの一部を更新し、該
参照画像記憶手段を新たに動きベクトルの検出対象とな
る該ブロックに対する探索範囲分の該参照画像の画像デ
ータを記憶した状態とする追加書込手段と、 画面の一方の端部側の該ブロックが動きベクトルの検出
対象のブロックとなって該探索範囲の一部が該画面の一
方の端部からはみ出し、該参照画像記憶手段に記憶され
ている探索範囲分の該参照画像の画像データの一部を更
新するための該参照画像の画像データがないとき、該画
面の一方の端部からはみ出した該探索範囲の一部が該画
面の他方の端部に移ったものとして、該画面の他方の端
部に移った該探索範囲の一部内の該参照画像の画像デー
タを該参照画像記憶手段に記憶されている探索範囲分の
該参照画像の画像データの一部を更新するための追加書
込データとするように、該追加書込手段を制御する追加
書込制御手段と、 該追加書込制御手段の制御によって該参照画像記憶手段
での追加書込データとなった該参照画像の画像データに
よる該動きベクトル探索手段の探索結果を無効とするよ
うに、該動きベクトル探索手段の探索結果に制限を加え
る探索範囲制限手段とを備えたことを特徴とする動きベ
クトル検出装置。
1. An input image for one screen is divided into blocks of a predetermined size, a search range of a reference image is set for each block, and a search range of the input image from the reference image is set for each block. In a motion vector detecting device for detecting a motion vector from within the search range set for the block, reference image storage means for storing at least image data of the reference image for the search range, and reference image storage means A motion vector searching means for searching for a motion vector for an input image in the block for which a motion vector is to be detected using the image data of the reference image stored in the block; Every time the process moves to a block of the reference image storage unit, a part of the image data of the reference image for the search range stored in the reference image storage unit is updated. Additional writing means for storing the image data of the reference image for the search range for the block for which a motion vector is to be newly detected, and the block at one end of the screen for detecting the motion vector. In order to update a part of the image data of the reference image corresponding to the search range stored in the reference image storage unit, a part of the search range protrudes from one end of the screen as a target block. When there is no image data of the reference image, the part of the search range that protrudes from one end of the screen moves to the other end of the screen and moves to the other end of the screen. The image data of the reference image in a part of the search range is set as additional write data for updating a part of the image data of the reference image in the search range stored in the reference image storage unit. Control the additional writing means An additional writing control unit that invalidates a search result of the motion vector searching unit based on image data of the reference image that has become additional writing data in the reference image storage unit under the control of the additional writing control unit. And a search range limiting means for limiting a search result of the motion vector searching means.
【請求項2】 1画面分の入力画像を所定の大きさのブ
ロックに分割するとともに、該ブロック毎に参照画像の
探索範囲を設定し、該ブロック毎に、該参照画像からの
該入力画像の動きベクトルを該ブロックに対して設定さ
れた該探索範囲内から検出する動きベクトル検出装置に
おいて、 フレーム構造の該入力画像の動きベクトルを検出する第
1のモードと、フィールド構造の該入力画像の動きベク
トルを検出する第2のモードとが設定可能であって、 該第1のモードでは、該ブロック内の該入力画像の第1
フィールドの画像データを第1のテンプレートデータと
して、第2フイールドの画像データを第2のテンプレー
トデータとし、また、該第2のモードでは、該ブロック
の上半分の領域の該入力画像の画像データを第1のテン
プレートデータとして、下半分の該入力画像の画像デー
タを第2のテンプレートデータとするデータ切換手段
と、 該探索範囲内の参照画像の第1フィールドの画像データ
を第1のサーチエリアデータとし、第2フィールドの画
像データを第2のサーチエリアデータとするデータ分配
手段と、 該第1のテンプレートデータの該第1のサーチエリアデ
ータからの第1の予測誤差と、該第1のテンプレートデ
ータの該第2のサーチエリアデータからの第2の予測誤
差と、該第2のテンプレートデータの該第1のサーチエ
リアデータからの第3の予測誤差と、該第2のテンプレ
ートデータの該第2のサーチエリアデータからの第4の
予測誤差とを夫々算出する予測誤差算出手段と、 該第1のモードでは、該第1〜該第4の予測誤差からフ
レーム予測とフィールド予測との最適なベクトルとその
予測誤差とを求め、該第2のモードでは、該第1〜該第
4の予測誤差からフィールド予測と該上下半分毎の予測
との最適ベクトルとその予測誤差とを求める予測誤差比
較手段とを備えたことを特徴とする動きベクトル検出装
置。
2. An input image for one screen is divided into blocks of a predetermined size, a search range of a reference image is set for each block, and a search range of the input image from the reference image is set for each block. A motion vector detecting device for detecting a motion vector from within the search range set for the block, a first mode for detecting a motion vector of the input image having a frame structure, and a motion of the input image having a field structure. A second mode for detecting a vector can be set, and in the first mode, a first mode of the input image in the block is set.
The field image data is used as the first template data, the second field image data is used as the second template data, and in the second mode, the image data of the input image in the upper half area of the block is used. Data switching means for using, as the first template data, image data of the lower half of the input image as second template data; image data of a first field of a reference image within the search range as first search area data Data distribution means for using image data of a second field as second search area data; a first prediction error of the first template data from the first search area data; A second prediction error of data from the second search area data, and a first search area of the second template data. Prediction error calculating means for calculating a third prediction error from the data and a fourth prediction error from the second search area data of the second template data, and in the first mode, From the first to fourth prediction errors, an optimum vector of frame prediction and field prediction and its prediction error are obtained. In the second mode, field prediction and field prediction are performed from the first to fourth prediction errors. A motion vector detecting device, comprising: a prediction error comparing means for obtaining an optimum vector for the prediction for each of the upper and lower halves and a prediction error thereof.
【請求項3】 入力画像の参照画像からの動きベクトル
を低精度で検出する動きベクトル粗探索手段と、該参照
画像での該動きベクトル粗探索手段で得られた該動きベ
クトルで決まる位置にある所定の大きさの領域からの動
きベクトルを高精度で検出する動きベクトル密探索手段
と、該動きベクトル密探索手段によって得られた該動き
ベクトルを用いて該参照画像から該入力画像への動き補
償予測を行なう動き補償予測手段と、該動きベクトル密
探索手段で得られた該動きベクトルと該動き補償予測手
段からの残差信号とを符号化する符号化手段とを備えた
動画像符号化装置において、 該動きベクトル粗検出手段として請求項1または2に記
載の動きベクトル検出装置を用いたことを特徴とする動
画像符号化装置。
3. A motion vector coarse search means for detecting a motion vector from a reference image of an input image with low accuracy, and a position in the reference image determined by the motion vector obtained by the motion vector coarse search means. Motion vector dense search means for detecting a motion vector from a region of a predetermined size with high accuracy; and motion compensation from the reference image to the input image using the motion vector obtained by the motion vector dense search means A video encoding apparatus comprising: motion compensation prediction means for performing prediction; and encoding means for encoding the motion vector obtained by the motion vector dense search means and a residual signal from the motion compensation prediction means. 3. A moving picture coding apparatus according to claim 1, wherein the motion vector detecting apparatus according to claim 1 is used as the coarse motion vector detecting means.
JP2161997A 1997-02-04 1997-02-04 Moving vector detector and moving image coder using it Pending JPH10224797A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2161997A JPH10224797A (en) 1997-02-04 1997-02-04 Moving vector detector and moving image coder using it

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2161997A JPH10224797A (en) 1997-02-04 1997-02-04 Moving vector detector and moving image coder using it

Publications (1)

Publication Number Publication Date
JPH10224797A true JPH10224797A (en) 1998-08-21

Family

ID=12060079

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2161997A Pending JPH10224797A (en) 1997-02-04 1997-02-04 Moving vector detector and moving image coder using it

Country Status (1)

Country Link
JP (1) JPH10224797A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005530246A (en) * 2002-06-13 2005-10-06 アナログ・デバイスズ・インク Image data processing method and apparatus using image fragment and circular addressing arrangement
JP2006211192A (en) * 2005-01-27 2006-08-10 Matsushita Electric Ind Co Ltd Moving picture compression apparatus and moving picture compression processing method
JP2008546224A (en) * 2005-04-28 2008-12-18 アップル インコーポレイテッド Video processing in multiparty video conferences
US8269816B2 (en) 2005-04-28 2012-09-18 Apple Inc. Video encoding in a video conference

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005530246A (en) * 2002-06-13 2005-10-06 アナログ・デバイスズ・インク Image data processing method and apparatus using image fragment and circular addressing arrangement
JP2006211192A (en) * 2005-01-27 2006-08-10 Matsushita Electric Ind Co Ltd Moving picture compression apparatus and moving picture compression processing method
JP4507896B2 (en) * 2005-01-27 2010-07-21 パナソニック株式会社 Moving picture compression apparatus and moving picture compression processing method
JP2008546224A (en) * 2005-04-28 2008-12-18 アップル インコーポレイテッド Video processing in multiparty video conferences
JP2012178840A (en) * 2005-04-28 2012-09-13 Apple Inc Video processing in multi-participant video conference
US8269816B2 (en) 2005-04-28 2012-09-18 Apple Inc. Video encoding in a video conference

Similar Documents

Publication Publication Date Title
JP4879558B2 (en) Motion vector detection device
CN102036067B (en) Moving image encoding apparatus and control method thereof
US20070076795A1 (en) Method and apparatus for determining inter-mode in video encoding
JP4095664B2 (en) Video encoding device
RU2488235C2 (en) Method for scalable video coding, device of scalable video coding, software of scalable video coding and machine-readable record medium that saves software
CN101127902A (en) Interframe prediction processor with address management mechanism for motion vector storage
CN1168320C (en) Video encoding with two step motion estimation for p-frame
JP2008061156A (en) Motion picture processing apparatus
JP4405516B2 (en) Rectangular motion search
US8135224B2 (en) Generating image data
KR100646302B1 (en) Motion vector estimation apparatus and method thereof
US6178203B1 (en) Method and apparatus for two-row decoding of MPEG video
JPH0759096A (en) Video encoder and decoder
CN101822058A (en) Video encoding using pixel decimation
JPH10224797A (en) Moving vector detector and moving image coder using it
JP2000069469A (en) Moving picture encoding method/system and moving picture decoding method/system
CN100553341C (en) Device for detecting motion vector and motion vector detecting method
CN101394559A (en) Dynamic image processing method, decoding method and apparatus thereof
KR100708183B1 (en) Image storing device for motion prediction, and method for storing data of the same
US20040120402A1 (en) Motion estimation apparatus for image data compression
JP3457540B2 (en) Image decoding apparatus and method
JPH1042300A (en) Motion vector detection device
JPH10164596A (en) Motion detector
JP2008072608A (en) Apparatus and method for encoding image
JP2023112565A (en) Image processing apparatus and method, and program