JP2003259373A - Moving picture compression/coding apparatus and motion vector detection method - Google Patents

Moving picture compression/coding apparatus and motion vector detection method

Info

Publication number
JP2003259373A
JP2003259373A JP2002373296A JP2002373296A JP2003259373A JP 2003259373 A JP2003259373 A JP 2003259373A JP 2002373296 A JP2002373296 A JP 2002373296A JP 2002373296 A JP2002373296 A JP 2002373296A JP 2003259373 A JP2003259373 A JP 2003259373A
Authority
JP
Japan
Prior art keywords
motion vector
detection range
vector detection
motion
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002373296A
Other languages
Japanese (ja)
Other versions
JP4034180B2 (en
Inventor
Makoto Kawarada
誠 河原田
Tomoko Yasunari
智子 安成
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2002373296A priority Critical patent/JP4034180B2/en
Publication of JP2003259373A publication Critical patent/JP2003259373A/en
Application granted granted Critical
Publication of JP4034180B2 publication Critical patent/JP4034180B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide a moving picture compression/coding apparatus capable of detecting a proper motion vector even when an image indicates a greater motion and setting a proper motion vector detecting range and to provide a motion vector detection method, a recording medium, and a program. <P>SOLUTION: The moving picture compression/coding apparatus includes: a motion vector detection means 12 for detecting a motion vector within a first motion vector detection range from a demodulated moving picture signal and a macro block moving picture signal; motion vector count means 14, 15, 16 for counting the number of first motion vectors which are the number of motion vectors located over the first outermost line which is the outermost line of a first motion vector detection range and the second outermost line or lines of a second motion vector detection range which is inside the first motion vector detection range, the second outermost line or lines being adjacent to the first outermost line, and a motion vector detection range decision means 13 for increasing the first motion vector detection range according to the number of the first motion vectors counted. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、動画像を圧縮符号
化するための動画像圧縮符号化装置と、その動きベクト
ル検出方法、記録媒体、及びプログラムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a moving picture compression coding apparatus for compressing and coding a moving picture, a motion vector detecting method therefor, a recording medium, and a program.

【0002】[0002]

【従来の技術】動画像圧縮符号装置において、動きベク
トル検出装置は、動きベクトルの検出精度を高めようと
すると、ハードウェア規模が大きくならざるを得ない。
そのため動きベクトル検出は、検出範囲は狭いが検出精
度は高いモード、あるいは、検出範囲は広いが検出精度
は低いモードで行われている。
2. Description of the Related Art In a moving picture compression coding apparatus, a motion vector detection apparatus is unavoidably increased in hardware scale in order to improve the accuracy of motion vector detection.
Therefore, the motion vector detection is performed in a mode in which the detection range is narrow but the detection accuracy is high, or in a mode in which the detection range is wide but the detection accuracy is low.

【0003】従来の動きベクトル検出装置を図10に示
す(例えば、特許文献1参照。)101は動画像圧縮符
号化器に現在のフレーム信号である参照フレーム信号を
入力する参照フレーム信号入力端子で、102は動画像
圧縮符号化器に1つ前のフレーム信号である予測フレー
ム信号を入力する予測フレーム信号入力端子である。1
03は検出範囲は広いが検出精度は低いモードで動きベ
クトル検出を行う広域動きベクトル検出器であり、10
4は検出範囲は狭いが検出精度は高いモードで動きベク
トル検出を行う狭域動きベクトル検出器であり、105
は広域動きベクトル検出器103と狭域動きベクトル検
出器104とで得られた動きベクトル検出結果を比較評
価する比較器であり、106は比較器105の比較結果
に基づき、広域動きベクトル検出器103、あるいは狭
域動きベクトル検出器104からの動きベクトル検出の
結果いずれかを出力する切換器であり、107は広域動
きベクトル検出器で検出した動きベクトルを出力する出
力端子である。
A conventional motion vector detecting device is shown in FIG. 10 (for example, refer to Patent Document 1). Reference numeral 101 is a reference frame signal input terminal for inputting a reference frame signal which is a current frame signal to a moving image compression encoder. , 102 are prediction frame signal input terminals for inputting the prediction frame signal which is the previous frame signal to the moving image compression encoder. 1
Reference numeral 03 denotes a wide area motion vector detector that detects a motion vector in a mode in which the detection range is wide but the detection accuracy is low.
Reference numeral 4 denotes a narrow area motion vector detector that detects a motion vector in a mode in which the detection range is narrow but the detection accuracy is high.
Is a comparator for comparing and evaluating the motion vector detection results obtained by the wide area motion vector detector 103 and the narrow area motion vector detector 104, and 106 is a wide area motion vector detector 103 based on the comparison result of the comparator 105. , Or a result of motion vector detection from the narrow area motion vector detector 104, and 107 is an output terminal for outputting the motion vector detected by the wide area motion vector detector.

【0004】以上のように構成された従来の動きベクト
ル検出装置について、その動作について説明する。ま
ず、参照フレーム信号入力端子101から入力した参照
フレーム信号はローパスフィルタ108及びダウンサン
プリング回路109を経て広域動きベクトル検出器10
3に入力される。それと共に、参照フレーム信号入力端
子101から入力した参照フレーム信号は、狭域動きベ
クトル検出器104にも入力される。同様に、予測フレ
ーム信号入力端子102から入力した予測フレーム信号
はローパスフィルタ110及びダウンサンプリング回路
111を経て広域動きベクトル検出器103に入力され
る。それと共に、予測フレーム信号入力端子102から
入力した予測フレーム信号は、狭域動きベクトル検出器
104にも入力される。それぞれの動きベクトル検出器
103及び104で検出された動きベクトルは、比較器
105で比較評価され、評価の高い方の動きベクトルを
切換器106から出力端子107に出力される。
The operation of the conventional motion vector detecting device configured as described above will be described. First, the reference frame signal input from the reference frame signal input terminal 101 passes through the low-pass filter 108 and the downsampling circuit 109, and the wide area motion vector detector 10
Input to 3. At the same time, the reference frame signal input from the reference frame signal input terminal 101 is also input to the narrow band motion vector detector 104. Similarly, the prediction frame signal input from the prediction frame signal input terminal 102 is input to the wide area motion vector detector 103 via the low pass filter 110 and the downsampling circuit 111. At the same time, the predicted frame signal input from the predicted frame signal input terminal 102 is also input to the narrow band motion vector detector 104. The motion vectors detected by the motion vector detectors 103 and 104 are compared and evaluated by the comparator 105, and the motion vector with the higher evaluation is output from the switch 106 to the output terminal 107.

【0005】しかしながら図10の動きベクトル検出装
置の構成では、より適正な動きベクトルを検出するため
動きベクトル検出範囲の数(以下、モード数と称す)
を、例えば2つにすると、モード数が1つの場合に比べ
てハードウェア規模が増大する。
However, in the configuration of the motion vector detecting device of FIG. 10, the number of motion vector detection ranges (hereinafter referred to as the number of modes) is used to detect a more appropriate motion vector.
If, for example, there are two, the hardware scale increases as compared with the case where the number of modes is one.

【0006】すなわち、動きベクトル検出範囲の数を例
えば検出範囲は狭いが検出精度は高い動きベクトルの検
出範囲と、検出範囲は広いが検出精度は低い動きベクト
ル検出範囲との2つにすると、検出範囲は狭いが検出精
度は高い狭域動きベクトル検出器104と、検出範囲は
広いが検出精度は低い広域動きベクトル検出器103と
の2種類のハードウェアが必要になる。そして、それぞ
れの動きベクトル検出器について、同時に動きベクトル
検出を実行する必要があり、2つの動きベクトル検出器
103及び104それぞれに独立した動きベクトル検出
回路が必須となり、動きベクトル検出回路等のハードウ
ェア規模が大きくなるという課題があった。
That is, if the number of motion vector detection ranges is set to, for example, a motion vector detection range having a narrow detection range but high detection accuracy and a motion vector detection range having a wide detection range but low detection accuracy, detection is performed. Two types of hardware are required: a narrow area motion vector detector 104 that has a narrow range but high detection accuracy, and a wide area motion vector detector 103 that has a wide detection range but low detection accuracy. Then, it is necessary to simultaneously perform motion vector detection for each motion vector detector, and independent motion vector detection circuits are required for the two motion vector detectors 103 and 104 respectively, and hardware such as a motion vector detection circuit is required. There was a problem that the scale became large.

【0007】図10で説明した従来の動きベクトル検出
装置の課題を解決するために、図11に示す動画像圧縮
符号化装置が知られている(例えば、特許文献2参
照。)。
In order to solve the problem of the conventional motion vector detecting device described with reference to FIG. 10, the moving picture compression encoding device shown in FIG. 11 is known (see, for example, Patent Document 2).

【0008】すなわち、図11は、従来の動画像圧縮符
号化装置のブロック図である。図11において、301
はDCT回路であり、302は量子化器であり、303
は逆量子化器であり、304は逆DCT回路であり、3
05はフレームメモリであり、306は動き補償フレー
ム間予測回路であり、307Aは動き検出装置であり、
308はフレーム内・フレーム間切り替え信号である。
また、動き検出装置307Aは、バッファメモリ20
1、誤差計算回路202、誤差比較回路203、アドレ
ス発生回路204からなる。
That is, FIG. 11 is a block diagram of a conventional moving picture compression coding apparatus. In FIG. 11, 301
Is a DCT circuit, 302 is a quantizer, and 303
Is an inverse quantizer, 304 is an inverse DCT circuit, 3
Reference numeral 05 is a frame memory, 306 is a motion compensation inter-frame prediction circuit, 307A is a motion detection device,
Reference numeral 308 is an intra-frame / inter-frame switching signal.
In addition, the motion detection device 307A uses the buffer memory 20.
1, an error calculation circuit 202, an error comparison circuit 203, and an address generation circuit 204.

【0009】以上のように構成された従来の画像符号化
装置について、以下その動作を説明する。符号化の最初
のフレーム、すなわち第1フレームは、フレーム内・フ
レーム間切り替え信号308により、フレーム内符号化
に切り替えられ、差分が取られることなく、フレームご
とにフレーム内符号化される。すなわち、画像データ
は、2次元ブロック単位でDCT回路301で変換係数
に変換され、量子化器302で変換係数を量子化された
後、伝送路に送出される。一般的に、画像は相関が高い
ため、DCTを行うと、低い周波数成分に対応する変換
係数にエネルギーが集中する。したがって、視覚的に目
立たない高い周波数成分を粗く、重要な成分である低い
周波数成分を細かく量子化を行うことで、画質劣化を最
小限にとどめ、かつデータ量を減らすことが可能とな
る。上記伝送路に送出した量子化後の変換係数は、同時
に逆量子化器303、逆DCT変換回路304を経て実
時間データに戻され、フレームメモリ305に蓄えられ
る。
The operation of the conventional image coding apparatus configured as described above will be described below. The first frame of coding, that is, the first frame is switched to intraframe coding by the intraframe / interframe switching signal 308, and intraframe coding is performed for each frame without taking a difference. That is, the image data is converted into transform coefficients by the DCT circuit 301 in units of two-dimensional blocks, the transform coefficients are quantized by the quantizer 302, and then sent to the transmission path. In general, images have a high correlation, so that when DCT is performed, energy concentrates on transform coefficients corresponding to low frequency components. Therefore, it is possible to minimize the image quality deterioration and reduce the data amount by coarsely quantizing the high frequency components that are visually inconspicuous and finely quantizing the low frequency components that are important components. The quantized transform coefficients sent to the transmission path are simultaneously returned to real-time data through the inverse quantizer 303 and the inverse DCT transform circuit 304, and stored in the frame memory 305.

【0010】一方、第2フレーム以降の画像は、フレー
ム内・フレーム間切り替え信号308により、フレーム
間符号化に切り替えられ、動き補償された上で前フレー
ムの画像との差分が取られ、フレームごとにフレーム間
の画像信号の差分が符号化される。つまり、フレームメ
モリ305に格納した前フレームの画像データと動き検
出装置307Aで検出した2次元ブロック単位の動きベ
クトルとに基づいて第2フレーム以降の画像の予測値が
動き補償フレーム間予測回路306で生成され、第2フ
レーム以降の画像と動き補償フレーム間予測回路306
で生成された第2フレーム以降の予測値との差分である
予測誤差が、2次元ブロック単位でDCT回路301で
変換係数に変換され、量子化器302で変換係数を量子
化された後、伝送路に送出される。上記伝送路に送出し
た量子化後の変換係数は、同時に逆量子化器303、逆
DCT変換回路304を経て実時間データに戻し、フレ
ームメモリ305に蓄える。
On the other hand, the image after the second frame is switched to the interframe coding by the intraframe / interframe switching signal 308, the motion is compensated, and the difference from the image of the previous frame is taken to obtain each frame. The image signal difference between frames is encoded. That is, the motion-compensated inter-frame prediction circuit 306 calculates the predicted value of the image after the second frame based on the image data of the previous frame stored in the frame memory 305 and the motion vector of the two-dimensional block detected by the motion detection device 307A. Images generated and motion-compensated interframe prediction circuit 306 of the second and subsequent frames
The prediction error, which is the difference between the prediction value after the second frame and the prediction value generated in step 2, is converted into transform coefficients by the DCT circuit 301 in two-dimensional block units, and the transform coefficients are quantized by the quantizer 302, and then transmitted. Sent to the road. The quantized transform coefficients sent to the transmission path are simultaneously returned to real-time data through the inverse quantizer 303 and the inverse DCT transform circuit 304, and stored in the frame memory 305.

【0011】つぎに、動き検出装置307Aについて詳
しく説明する。この動き検出装置307Aでは、例えば
良く知られた、全探索方法を用いて、2次元ブロック単
位にフレーム間の動きベクトルを求める構成となってい
る。図12は動き検出装置307Aの動作を示す説明図
で、以下、図12を参照しながら動き検出動作を説明す
る。図12において、311は第2フレームのある1つ
の2次元ブロックでm画素(水平方向)×n画素(垂直
方向)の矩形ブロックからなる。312A,312Bは
誤差計算を行うための第1フレームの2次元ブロックで
あり、大きさは2次元ブロック311と同じ大きさであ
る。313は動き検出によって求めた動きベクトルで、
2次元ブロック311の中心座標と2次元ブロック31
2Bの中心座標を結ぶものである。
Next, the motion detecting device 307A will be described in detail. The motion detection device 307A is configured to obtain a motion vector between frames in a unit of a two-dimensional block using, for example, the well-known full search method. FIG. 12 is an explanatory diagram showing the operation of the motion detection device 307A. Hereinafter, the motion detection operation will be described with reference to FIG. In FIG. 12, reference numeral 311 denotes one two-dimensional block having the second frame, which is composed of a rectangular block of m pixels (horizontal direction) × n pixels (vertical direction). Reference numerals 312A and 312B are two-dimensional blocks of the first frame for performing error calculation, and their sizes are the same as those of the two-dimensional block 311. 313 is a motion vector obtained by motion detection,
Center coordinates of the two-dimensional block 311 and the two-dimensional block 31
It connects the center coordinates of 2B.

【0012】図12における二次元ブロック311は、
第2フレームにおける中心座標(x,y,2) を有する2次元
ブロックであり、二次元ブロックを中心座標に対応した
記号S(x,y,2)で表す。また、2次元ブロック312A,
312Bは第1フレームにおける中心座標(x,y,1) ,(x
+mx,y+my,1) をそれぞれ有する2次元ブロックであり、
同様に二次元ブロックを中心座標に対応した記号S(x,y,
2),S(x+mx,y+my,1)で表す。ただし、xはフレームの中
心を原点とする水平方向の画素座標を示し、yはフレー
ムの中心を原点とする垂直方向の画素座標を示し、x,
yの後の1,2の数字はフレーム番号を示す。また、3
14は動きベクトルを計算する2次元ブロックを示す矩
形(水平方向2h、垂直方向2v)の動きベクトル検出
範囲であり、xhは動きベクトル検出範囲の中心(図で
は、座標(x,y,1) )を原点とする水平方向の局部画素座
標を示し、yvは動きベクトル検出範囲の中心(図で
は、座標(x,y,1) )を原点とする垂直方向の局部画素座
標を示している。
The two-dimensional block 311 in FIG.
It is a two-dimensional block having the center coordinates (x, y, 2) in the second frame, and the two-dimensional block is represented by the symbol S (x, y, 2) corresponding to the center coordinates. Also, the two-dimensional block 312A,
312B is the center coordinates (x, y, 1), (x
+ mx, y + my, 1) are two-dimensional blocks,
Similarly, the symbol S (x, y,
2), S (x + mx, y + my, 1). However, x represents the pixel coordinates in the horizontal direction with the center of the frame as the origin, y represents the pixel coordinates in the vertical direction with the center of the frame as the origin, and x,
The numbers 1 and 2 after y indicate frame numbers. Also, 3
Reference numeral 14 is a rectangular (horizontal direction 2h, vertical direction 2v) motion vector detection range indicating a two-dimensional block for calculating a motion vector, and xh is the center of the motion vector detection range (coordinates (x, y, 1) in the figure). ) Is the local pixel coordinate in the horizontal direction, and yv is the vertical pixel coordinate in the vertical direction with the center of the motion vector detection range (coordinate (x, y, 1) in the figure) as the origin.

【0013】第2フレームの画像データは、フレーム間
符号化されるときに、同時にバッファメモリ201に入
力する。なお、第1フレームの画像データは、既にバッ
ファメモリ201に格納されている。今、基準を第2フ
レーム(現フレーム)の2次元ブロック311とし、第
1フレーム(前フレーム)の2次元ブロック312Bと
第2フレーム(現フレーム)の2次元ブロック311の
間の動きベクトル313を検出する。バッファメモリ2
01に入力した第1,第2フレームの画像は、m×n画
素ずつの2次元ブロック単位で読み出し、2次元ブロッ
ク単位で動きベクトルを検出する。
The image data of the second frame is input to the buffer memory 201 at the same time when it is encoded between frames. The image data of the first frame is already stored in the buffer memory 201. Now, the reference is the two-dimensional block 311 of the second frame (current frame), and the motion vector 313 between the two-dimensional block 312B of the first frame (previous frame) and the two-dimensional block 311 of the second frame (current frame) is set. To detect. Buffer memory 2
The first and second frame images input to 01 are read in units of two-dimensional blocks of m × n pixels, and the motion vector is detected in units of two-dimensional blocks.

【0014】以下、座標を用いて動きベクトルの検出手
順について、具体的に説明する。アドレス発生回路20
4により、第2フレームにおける中心座標(x,y,2) を有
する2次元ブロックS(x,y,2)の画像データを読み出し、
この2次元ブロックS(x,y,2)を基準ブロックにとり、以
下の手順でこの基準ブロックと第1フレームとの間の動
きを検出する。バッファメモリ201には上述したよう
に第1フレームの画像データも格納してあり、つぎに第
1フレームにおける中心座標(x,y,1) を有する2次元ブ
ロックS(x,y,1)の各画像データを読み出す。誤差計算回
路202では、前記2つの2次元ブロックS(x,y,2),S
(x,y,1)における画像データの振幅の2乗誤差の和(以
下、単に誤差という)σ(x,y)(0,0)を〔数1〕で計算
し、誤差比較回路203に送る。
The procedure of detecting the motion vector using the coordinates will be specifically described below. Address generation circuit 20
4, the image data of the two-dimensional block S (x, y, 2) having the center coordinates (x, y, 2) in the second frame is read out,
The two-dimensional block S (x, y, 2) is taken as a reference block, and the motion between the reference block and the first frame is detected by the following procedure. As described above, the image data of the first frame is also stored in the buffer memory 201, and then the two-dimensional block S (x, y, 1) having the center coordinates (x, y, 1) in the first frame is stored. Each image data is read. In the error calculation circuit 202, the two two-dimensional blocks S (x, y, 2), S
The sum of squared errors of the amplitude of the image data at (x, y, 1) (hereinafter simply referred to as error) σ (x, y) (0,0) is calculated by [Equation 1], and the error comparison circuit 203 send.

【0015】[0015]

【数1】 [Equation 1]

【0016】次に、アドレス発生回路204は、第1フ
レームにおける水平方向1画素隣のm×nブロックすな
わち中心座標(x+1,y,1) の二次元ブロックS(x+1,y,1)の
アドレスを発生する。誤差計算回路202では、同様に
σ(x,y)(+1,0) を計算し、誤差比較回路203に送る。
誤差比較回路203では、σ(x,y)(0,0)とσ(x,y)(+1,
0) を比較し、小さい方を選択する。以下同様に、−h
<xh<h、−v<yv<vの範囲でアドレスを逐次変
更しながら2次元ブロックの画像データを読み出し、σ
(x,y)(xh,yv)を計算する。
Next, the address generating circuit 204 outputs the m × n block adjacent to one pixel in the horizontal direction in the first frame, that is, the two-dimensional block S (x + 1, y, 1) having the center coordinates (x + 1, y, 1). Generate the address of 1). The error calculation circuit 202 similarly calculates σ (x, y) (+ 1,0) and sends it to the error comparison circuit 203.
In the error comparison circuit 203, σ (x, y) (0,0) and σ (x, y) (+ 1,
0) is compared and the smaller one is selected. Similarly, -h
The image data of the two-dimensional block is read while sequentially changing the address within the range of <xh <h, -v <yv <v, and σ
Calculate (x, y) (xh, yv).

【0017】誤差比較回路203は、以上で計算された
誤差σ(x,y)(xh,yv)から最小値をとる誤差σ(x,y)(mx,m
y)を選択し、同時にアドレスmx,myを出力する。したが
って、2次元ブロックS(x,y,2)における動きベクトル2
13はmv(mx, my)となる。以下、第2フレーム内におい
て、複数に分割された2次元ブロックの全てについて上
記した動作を繰り返すことにより、第2フレーム内の全
ての2次元ブロックの動きベクトルが求まる。
The error comparison circuit 203 has a minimum error σ (x, y) (mx, m) from the error σ (x, y) (xh, yv) calculated above.
Select y) and output the addresses mx and my at the same time. Therefore, the motion vector 2 in the two-dimensional block S (x, y, 2)
13 is mv (mx, my). Hereinafter, in the second frame, by repeating the above operation for all of the two-dimensional blocks divided into a plurality, the motion vectors of all the two-dimensional blocks in the second frame are obtained.

【0018】動き補償フレーム間予測回路306は、第
2フレームについて各2次元ブロック毎に検出した動き
ベクトルを用いて、第2フレームの動き補償した予測値
を2次元ブロック単位で生成する。第2フレームの画像
は、まず第1フレームの画像データと第2フレームの動
きベクトルから上述した方法で生成した予測値との差
分、すなわち予測誤差を計算する。その後、前述した予
測誤差をフレーム毎に、第1フレームと同様の方法で符
号化する。
The motion-compensated inter-frame prediction circuit 306 generates a motion-compensated prediction value for the second frame in units of two-dimensional blocks using the motion vector detected for each two-dimensional block in the second frame. For the image of the second frame, first, the difference between the image data of the first frame and the prediction value generated by the above-described method from the motion vector of the second frame, that is, the prediction error is calculated. After that, the above-described prediction error is encoded for each frame by the same method as in the first frame.

【0019】以上のような構成により、現フレームを分
割した2次元ブロックの位置を中心とする前フレームの
所定の動きベクトル検出範囲内で、現フレームを分割し
た2次元ブロックと同じ大きさの2次元ブロックの画像
データを逐次位置を変更しながら抽出し、前フレームの
所定の動きベクトル検出範囲内の各2次元ブロックの画
像データと現フレームの分割した2次元ブロックの画像
データとの誤差計算および前フレームの所定の動きベク
トル検出範囲内の位置の異なる2次元ブロックについて
の誤差比較を行うことにより、現フレームを分割した2
次元ブロックに対して画像データの誤差がもっとも最も
少ない前フレームの所定の動きベクトル検出範囲内の2
次元ブロックの位置を探索し、現フレームを分割した2
次元ブロックの位置と現フレームを分割した2次元ブロ
ックに対して画像データの誤差がもっとも最も少ない前
フレームの所定の動きベクトル検出範囲内の2次元ブロ
ックの位置とから現フレームを分割した2次元ブロック
の前フレームからの画面上の動きを示す動きベクトルを
計算することになる。
With the above-described structure, within the predetermined motion vector detection range of the previous frame centering on the position of the two-dimensional block obtained by dividing the current frame, the two-dimensional block having the same size as the two-dimensional block obtained by dividing the current frame is displayed. The image data of the three-dimensional block is extracted while sequentially changing the position, and the error between the image data of each two-dimensional block within the predetermined motion vector detection range of the previous frame and the image data of the divided two-dimensional block of the current frame and The current frame is divided into two by performing error comparison on two-dimensional blocks having different positions within the predetermined motion vector detection range of the previous frame.
2 within the predetermined motion vector detection range of the previous frame in which the error of the image data is the smallest for the three-dimensional block
Searching the position of the dimensional block and dividing the current frame 2
A two-dimensional block obtained by dividing the current frame from the position of the two-dimensional block and the position of the two-dimensional block within the predetermined motion vector detection range of the previous frame having the smallest image data error with respect to the two-dimensional block obtained by dividing the current frame. A motion vector indicating the motion on the screen from the previous frame of will be calculated.

【0020】以上の方法によれば、予測誤差を符号化す
ることになるので、フレーム内符号化のように、画像デ
ータを直接符号化する場合に比べ、エネルギーが減少
し、さらに高効率な符号化が可能となる。
According to the above method, since the prediction error is coded, the energy is reduced compared to the case where the image data is directly coded like the intra-frame coding, and the code with higher efficiency is obtained. Can be realized.

【0021】次に第3フレーム以降の動作について説明
する。第3フレーム以降の各フレームの動きベクトルを
計算する際に、前フレーム(第3フレームの場合には、
第2フレーム)の動きベクトルを、画像の動きの大きさ
を示す時間的に前に検出された動きベクトル検出範囲決
定用情報としてCPU205に入力し、以下に示すよう
な演算処理を行って、アドレス発生回路204を制御す
ることにより動きベクトル検出範囲を変更する。
Next, the operation after the third frame will be described. When calculating the motion vector of each frame after the third frame, the previous frame (in the case of the third frame,
The motion vector of the second frame) is input to the CPU 205 as the motion vector detection range determination information that is detected in time before and indicates the magnitude of the motion of the image, and the arithmetic processing as described below is performed to determine the address. The motion vector detection range is changed by controlling the generation circuit 204.

【0022】図13はCPU5の処理動作を示すフロー
チャートである。図13について説明すると、ステップ
21で前フレーム(例えば、第2フレーム)の全2次元
ブロックの動きベクトルを読み込み、ステップ22で通
常時の動きベクトル検出範囲の水平方向の最大値hを示
す動きベクトルの個数をカウントする。ステップ23で
個数が全ブロックの50以上かどうかを判定し、個数が
全ブロックの50%以上である場合には画像の動きが大
きいものとして水平方向の動きベクトル検出範囲を例え
ば2hに拡大する。動きベクトル検出範囲を2倍に拡大
するためには、ステップ24に示したように誤差計算回
路2への入力を1サンプル毎に間引いて、すなわち1/
2にサブサンプルして入力するようにアドレス発生回路
4を制御する。このようにすることにより、各2次元ブ
ロック当たりの計算量は1/2になるので、動きベクト
ル検出範囲が2倍になっても、総計算量は動きベクトル
検出範囲を広げない場合と等しくなる。また、ステップ
25に示すようにh/2を超える動きベクトルの個数も
同時にカウントしておき、ステップ26でh/2を超え
る動きベクトルの個数が10%以下であるか判定し、1
0%以下であるときは、動きが少ないものとして動きベ
クトル検出範囲をh/2とする。この場合には、誤差計
算回路2へは間引かずに入力する(ステップ27)。な
お、hを超える動きベクトルが50%未満で、かつh/
2を超える動きベクトルの個数が10%を超えている場
合は、動きベクトル検出範囲の変更を行わず、サブサン
プリングは行わない。
FIG. 13 is a flow chart showing the processing operation of the CPU 5. Referring to FIG. 13, in step 21, the motion vectors of all the two-dimensional blocks of the previous frame (for example, the second frame) are read, and in step 22, the motion vector indicating the maximum value h in the horizontal direction of the motion vector detection range at normal time. Count the number of. In step 23, it is determined whether or not the number is 50 or more of all blocks. If the number is 50% or more of all blocks, it is determined that the image motion is large and the horizontal motion vector detection range is expanded to, for example, 2h. In order to double the motion vector detection range, as shown in step 24, the input to the error calculation circuit 2 is thinned out every sample, that is, 1 /
The address generation circuit 4 is controlled so as to be subsampled to 2 and input. By doing so, the amount of calculation for each two-dimensional block is halved, so that even if the motion vector detection range is doubled, the total amount of calculation becomes equal to that when the motion vector detection range is not widened. . Further, as shown in step 25, the number of motion vectors exceeding h / 2 is also counted at the same time, and it is determined in step 26 whether the number of motion vectors exceeding h / 2 is 10% or less.
When it is 0% or less, the motion vector detection range is set to h / 2, assuming that there is little motion. In this case, the data is input to the error calculation circuit 2 without being thinned (step 27). The motion vector exceeding h is less than 50%, and h /
When the number of motion vectors exceeding 2 exceeds 10%, the motion vector detection range is not changed and subsampling is not performed.

【0023】上記動作により、画像の動きが大きいとき
には計算量を増加させることなく動きベクトル検出範囲
を広げることが可能となる。一般的に、サブサンプルし
た画像から動き検出を行うと、動きの検出精度が低下す
るため画質劣化につながる。しかしながら動きの大きな
場合は、動きが追従しないことに起因する画質劣化の方
が影響が大きいため、サブサンプルした画像であっても
動きベクトル検出範囲を拡大した方が画質は向上する。
また、動きの少ないときはサブサンプルしない画像で動
き検出を行うので、画質劣化を生ずることはなく、さら
に動きベクトル検出範囲を狭めているので、探索に要す
る処理時間を短くできる。
By the above operation, when the motion of the image is large, the motion vector detection range can be expanded without increasing the calculation amount. In general, when motion detection is performed from a subsampled image, the motion detection accuracy decreases, leading to image quality deterioration. However, when the motion is large, the image quality deterioration due to the non-follow of the motion has a larger effect, and thus the image quality is improved by expanding the motion vector detection range even in the sub-sampled image.
Further, when the motion is small, the motion is detected by the image that is not subsampled, so that the image quality is not deteriorated and the motion vector detection range is further narrowed, so that the processing time required for the search can be shortened.

【0024】このように、画像の動きに応じて動きベク
トル検出範囲を変えることができ、大きな動きに対応す
ることができてフレーム間差分を小さくすることがで
き、画質を劣化させない。しかも、動きベクトルの計算
のための演算量が増えないので、動きベクトル演算のた
めのハードウェア量が増えることはない。
In this way, the motion vector detection range can be changed according to the motion of the image, large motion can be supported, the inter-frame difference can be reduced, and the image quality is not deteriorated. Moreover, since the amount of calculation for calculating the motion vector does not increase, the amount of hardware for calculating the motion vector does not increase.

【0025】[0025]

【特許文献1】特開平9−224249号公報[Patent Document 1] Japanese Patent Laid-Open No. 9-224249

【特許文献2】特開平10−23420号公報[Patent Document 2] Japanese Unexamined Patent Publication No. 10-23420

【0026】[0026]

【発明が解決しようとする課題】しかしながら図11で
説明した従来の動画像圧縮符号化装置では、動きの大き
な画像に対しては、適正な動きベクトルを検出すること
が出来ず、さらに適正な動きベクトル検出範囲を設定す
ることが困難である。
However, the conventional moving picture compression coding apparatus described with reference to FIG. 11 cannot detect an appropriate motion vector for an image having a large motion, and thus a more appropriate motion. It is difficult to set the vector detection range.

【0027】すなわち、図11で説明した従来の動画像
圧縮符号化装置では、図14に示すように動きベクトル
検出範囲320に対して、動きベクトル検出範囲320
の最外周に乗っている動きベクトルPの個数が全ブロッ
ク数の50%以上になった場合に動きベクトル検出範囲
320を拡大していた。すなわち、動きベクトル検出範
囲320の最外周上に乗っている動きベクトルPのみを
検出していた。ところが、動きベクトル検出範囲320
の最外周に乗っている動きベクトルPよりも適正な動き
ベクトルが動きベクトル検出範囲320の外部に存在す
る可能性がある。このような場合であっても、図11で
説明した従来の動画像圧縮符号化装置では、適正な動き
ベクトルを検出する代わりに動きベクトルPを検出して
用いていた。
That is, in the conventional moving picture compression coding apparatus described in FIG. 11, the motion vector detection range 320 is different from the motion vector detection range 320 as shown in FIG.
The motion vector detection range 320 is expanded when the number of motion vectors P on the outermost periphery of the number of blocks becomes 50% or more of the total number of blocks. That is, only the motion vector P on the outermost periphery of the motion vector detection range 320 is detected. However, the motion vector detection range 320
There is a possibility that a more appropriate motion vector than the motion vector P on the outermost periphery of the vector exists outside the motion vector detection range 320. Even in such a case, the conventional moving image compression encoding apparatus described in FIG. 11 detects and uses the motion vector P instead of detecting the appropriate motion vector.

【0028】すなわち、従来の動画像圧縮符号化装置で
は、動きの大きな画像に対しては、適正な動きベクトル
を検出することが出来ず、さらに適正な動きベクトル検
出範囲を設定することは困難であるという課題がある。
That is, the conventional moving picture compression coding apparatus cannot detect an appropriate motion vector for an image with a large motion, and it is difficult to set an appropriate motion vector detection range. There is a problem that exists.

【0029】本発明は、上記課題を考慮し、動きの大き
な画像であっても適正な動きベクトルを検出することが
出来、また、適正な動きベクトル検出範囲を設定するこ
とが出来る動画像圧縮符号化装置、動きベクトル検出方
法、記録媒体、及びプログラムを提供することを目的と
するものである。
In consideration of the above problems, the present invention is a moving image compression code capable of detecting an appropriate motion vector even in an image having a large motion and setting an appropriate motion vector detection range. It is an object of the present invention to provide an encoding device, a motion vector detecting method, a recording medium, and a program.

【0030】[0030]

【課題を解決するための手段】上述した課題を解決する
ために、第1の本発明は、入力動画像映像を1フレーム
に付きN(但し、Nは2以上の自然数)個に細分化した
マクロブロック動画像信号を生成するマクロブロック生
成手段(2)と、前記マクロブロック動画像信号を圧縮
符号化した後に復号化して復号化動画像信号を生成する
符号復号化手段(18、17、3、4、9、10、1
9、20、11)と、前記復号化動画像信号と前記マク
ロブロック動画像信号とから第1の動きベクトル検出範
囲内で動きベクトルを検出する動きベクトル検出手段
(12)と、検出された前記動きベクトルのうち、前記
第1の動きベクトル検出範囲の最外線である第1の最外
線と、前記第1の動きベクトル検出範囲の内側にある第
2の動きベクトル検出範囲の最外線である第2の最外線
との間にある動きベクトルの数を第1の動きベクトルの
数としてカウントする動きベクトルカウント手段(1
4、15、16)と、カウントされた前記第1の動きベ
クトルの数に基づいて前記第1の動きベクトル検出範囲
を拡大する動きベクトル検出範囲決定手段(13)とを
備えた動画像圧縮符号化装置である。
In order to solve the above-mentioned problems, the first aspect of the present invention subdivides an input moving picture image into N (where N is a natural number of 2 or more) per frame. Macroblock generating means (2) for generating a macroblock moving image signal, and code decoding means (18, 17, 3) for compressing the macroblock moving image signal and then decoding it to generate a decoded moving image signal. 4, 9, 10, 1
9, 20, 11), a motion vector detection means (12) for detecting a motion vector within a first motion vector detection range from the decoded video signal and the macroblock video signal, and the detected motion vector. Of the motion vectors, a first outermost line that is the outermost line of the first motion vector detection range and a second outermost line of the second motion vector detection range that is inside the first motion vector detection range. The motion vector counting means (1 that counts the number of motion vectors between the outermost line of 2 as the number of first motion vectors
4, 15, 16) and a motion vector detection range determining means (13) for expanding the first motion vector detection range based on the counted number of the first motion vectors. It is an oxidizer.

【0031】また、第2の本発明は、前記動きベクトル
カウント手段(14、15、16)は、前記第2の動き
ベクトル検出範囲の内側にある第3の動きベクトル検出
範囲内にある動きベクトルの数を第2の動きベクトルの
数としてカウントし、前記動きベクトル検出範囲決定手
段(13)は、カウントされた前記第2の動きベクトル
の数に基づいて前記第1の動きベクトル検出範囲を縮小
する第1の本発明の動画像圧縮符号化装置である。
In the second aspect of the present invention, the motion vector counting means (14, 15, 16) includes a motion vector within a third motion vector detection range inside the second motion vector detection range. Is counted as the number of second motion vectors, and the motion vector detection range determination means (13) reduces the first motion vector detection range based on the counted number of the second motion vectors. The video compression encoding apparatus according to the first aspect of the present invention.

【0032】また、第3の本発明は、前記動きベクトル
検出範囲決定手段(13)は、カウントされた前記第1
の動きベクトルの数が所定の閾値より多い場合、前記第
1の動きベクトル検出範囲を拡大し、前記所定の閾値よ
り小さい場合、前記第1の動きベクトル検出範囲を拡大
しないまたは前記第1の動きベクトル検出範囲を変更し
ない第1の本発明の動画像圧縮符号化装置である。
Further, in a third aspect of the present invention, the motion vector detection range determining means (13) is configured to count the first
If the number of motion vectors is larger than a predetermined threshold value, the first motion vector detection range is expanded, and if it is smaller than the predetermined threshold value, the first motion vector detection range is not expanded or the first motion vector is detected. It is the moving picture compression coding apparatus of the first aspect of the present invention which does not change the vector detection range.

【0033】また、第4の本発明は、前記動きベクトル
検出範囲決定手段(13)は、カウントされた前記第1
の動きベクトルの数が多いほど前記第1の動きベクトル
検出範囲の拡大率を大きくする第1の本発明の動画像圧
縮符号化装置である。
According to a fourth aspect of the present invention, the motion vector detection range determining means (13) is configured to count the first
Is the moving image compression encoding apparatus according to the first aspect of the present invention, which enlarges the expansion rate of the first motion vector detection range as the number of motion vectors increases.

【0034】また、第5の本発明は、前記動きベクトル
検出範囲決定手段(13)は、カウントされた前記第2
の動きベクトルの数が多いほど前記第1の動きベクトル
検出範囲の縮小率を大きくする第2の本発明の動画像圧
縮符号化装置である。
Further, in a fifth aspect of the present invention, the motion vector detection range determining means (13) is configured to count the second vector.
The moving picture compression encoding apparatus according to the second aspect of the present invention, which increases the reduction rate of the first motion vector detection range as the number of motion vectors increases.

【0035】また、第6の本発明は、前記動きベクトル
検出範囲決定手段(13)は、予め複数種類の動きベク
トル検出範囲を有しており、その複数種類の動きベクト
ル検出範囲から、カウントされた前記第1の動きベクト
ルの数が多いほど大きな動きベクトル検出範囲を選択し
て、前記第1の動きベクトル検出範囲とする第1の本発
明の動画像圧縮符号化装置である。
In the sixth aspect of the present invention, the motion vector detection range determining means (13) has a plurality of types of motion vector detection ranges in advance, and the motion vector detection ranges are counted from the plurality of types of motion vector detection ranges. The moving image compression encoding apparatus according to the first aspect of the present invention is such that a larger motion vector detection range is selected as the number of the first motion vectors is larger and is set as the first motion vector detection range.

【0036】また、第7の本発明は、前記動きベクトル
検出範囲決定手段(13)は、予め複数種類の動きベク
トル検出範囲を有しており、その複数種類の動きベクト
ル検出範囲から、カウントされた前記第2の動きベクト
ルの数が多いほど小さな動きベクトル検出範囲を選択し
て、前記第1の動きベクトル検出範囲とする第2の本発
明の動画像圧縮符号化装置である。
In the seventh aspect of the present invention, the motion vector detection range determining means (13) has a plurality of types of motion vector detection ranges in advance, and the motion vector detection ranges are counted from the plurality of types of motion vector detection ranges. In addition, the moving image compression encoding apparatus according to the second aspect of the present invention is such that a larger motion vector detection range is selected as the number of the second motion vectors is increased, and the smaller motion vector detection range is selected as the first motion vector detection range.

【0037】また、第8の本発明は、前記動きベクトル
検出範囲決定手段(13)は、前記第1の動きベクトル
検出範囲の更新を、Pフレーム毎に行う、またはPフレ
ームをn個(但し、n≦Nの自然数)に分割した分割単
位毎に行い、前記第1の動きベクトル検出範囲が更新さ
れる際、前記動きベクトル検出範囲決定手段は、前記P
フレームのまたは前記分割単位のカウントされた前記第
1の動きベクトルの数を、前記Pフレームにまたは前記
分割単位に存在するマクロブロック動画像信号の数で割
った数が、所定の閾値以上になった場合に、前記第1の
動きベクトル検出範囲を拡大する第1の本発明の動画像
圧縮符号化装置であるまた、第9の本発明は、前記動き
ベクトル検出範囲決定手段(13)は、前記第1の動き
ベクトル検出範囲の更新を、Pフレーム毎に行う、また
はPフレームをn個(但し、n≦Nの自然数)に分割し
た分割単位毎に行い、前記第1の動きベクトル検出範囲
が更新される際、前記動きベクトル検出範囲決定手段
は、前記Pフレームのまたは前記分割単位のカウントさ
れた前記第2の動きベクトルの数を、前記Pフレームに
または前記分割単位に存在するマクロブロック動画像信
号の数で割った数が、所定の閾値以上になった場合に、
前記第1の動きベクトル検出範囲を縮小する第1の本発
明の動画像圧縮符号化装置である。
According to an eighth aspect of the present invention, the motion vector detection range determining means (13) updates the first motion vector detection range every P frames, or n P frames (however, not shown). , N ≦ N, which is a natural number), and when the first motion vector detection range is updated, the motion vector detection range determining means determines the P
A number obtained by dividing the number of counted first motion vectors of a frame or of the division unit by the number of macroblock moving image signals existing in the P frame or of the division unit is equal to or more than a predetermined threshold value. In this case, the first motion vector detection range is expanded, and the motion vector detection range determination means (13) is provided. The first motion vector detection range is updated for each P frame or for each division unit obtained by dividing the P frame into n (where n ≦ N is a natural number). Is updated, the motion vector detection range determining means determines the number of the counted second motion vectors in the P frame or in the division unit to be in the P frame or in the division unit. When divided by the number of macroblocks moving image signal is present, equal to or greater than a predetermined threshold value,
The moving image compression encoding apparatus according to the first aspect of the present invention reduces the first motion vector detection range.

【0038】また、第10の本発明は、前記動きベクト
ル検出手段は、前記第1の動きベクトル検出範囲を拡大
する際、前記第2の動きベクトル検出範囲をも拡大する
第1、3、4、6、8の本発明のいずれかの動画像圧縮
符号化装置である。
Further, in a tenth aspect of the present invention, the motion vector detecting means, when expanding the first motion vector detection range, also expands the second motion vector detection range. , 6 and 8 according to the present invention.

【0039】また、第11の本発明は、前記動きベクト
ル検出手段は、前記第1の動きベクトル検出範囲を縮小
する際、前記第3の動きベクトル検出範囲をも縮小する
第2、4、7、9の本発明のいずれかの動画像圧縮符号
化装置である。
In the eleventh aspect of the present invention, the motion vector detecting means also reduces the third motion vector detection range when reducing the first motion vector detection range. , 9 according to the present invention.

【0040】また、第12の本発明は、入力動画像映像
を1フレームに付きN(但し、Nは2以上の自然数)個
に細分化して生成されたマクロブロック動画像信号を圧
縮符号化した後に復号化して生成された復号化動画像信
号と、前記マクロブロック動画像信号とから第1の動き
ベクトル検出範囲内で動きベクトルを検出する動きベク
トル検出ステップと、検出された前記動きベクトルのう
ち、前記第1の動きベクトル検出範囲の最外線である第
1の最外線と、前記第1の動きベクトル検出範囲の内側
にある第2の動きベクトル検出範囲の最外線である第2
の最外線との間にある動きベクトルの数を第1の動きベ
クトルの数としてカウントする動きベクトルカウントス
テップと、前記第1の動きベクトル検出範囲の最外線で
ある第1の最外線と、前記第1の動きベクトル検出範囲
の内側にある第2の動きベクトル検出範囲の最外線であ
る第2の最外線であって、前記第1の最外線に隣接する
1本もしくは複数本の第2の最外線との上にある動きベ
クトルの数である第1の動きベクトルの数をカウントす
る動きベクトルカウントステップと、カウントされた前
記第1の動きベクトルの数に基づいて前記第1の動きベ
クトル検出範囲を拡大する動きベクトル検出範囲決定ス
テップとを備えた動きベクトル検出方法である。
The twelfth aspect of the present invention compresses and encodes a macroblock moving image signal generated by subdividing an input moving image video into N (where N is a natural number of 2 or more) per frame. A motion vector detecting step of detecting a motion vector within a first motion vector detection range from a decoded moving image signal generated by decoding afterwards and the macroblock moving image signal; and among the detected motion vectors, A first outermost line which is the outermost line of the first motion vector detection range, and a second outermost line of the second motion vector detection range which is inside the first motion vector detection range.
A motion vector counting step of counting the number of motion vectors between the outermost line of the first motion vector and the outermost line of the first motion vector as the number of first motion vectors; One or a plurality of second outermost lines that are the outermost lines of the second motion vector detection range inside the first motion vector detection range and that are adjacent to the first outermost line. A motion vector counting step of counting the number of first motion vectors, which is the number of motion vectors on the outermost line, and the first motion vector detection based on the counted number of the first motion vectors. And a motion vector detection range determining step of expanding the range.

【0041】また、第13の本発明は、第12の本発明
の動きベクトル検出方法の、入力動画像映像を1フレー
ムに付きN(但し、Nは2以上の自然数)個に細分化し
て生成されたマクロブロック動画像信号を圧縮符号化し
た後に復号化して生成された復号化動画像信号と、前記
マクロブロック動画像信号とから第1の動きベクトル検
出範囲内で動きベクトルを検出する動きベクトル検出ス
テップと、検出された前記動きベクトルのうち、前記第
1の動きベクトル検出範囲の最外線である第1の最外線
と、前記第1の動きベクトル検出範囲の内側にある第2
の動きベクトル検出範囲の最外線である第2の最外線と
の間にある動きベクトルの数を第1の動きベクトルの数
としてカウントする動きベクトルカウントステップと、
カウントされた前記第1の動きベクトルの数に基づいて
前記第1の動きベクトル検出範囲を拡大する動きベクト
ル検出範囲決定ステップとをコンピュータに実行させる
ためのプログラムである。
The thirteenth aspect of the present invention is the motion vector detecting method of the twelfth aspect of the present invention, in which an input moving image is subdivided into N (where N is a natural number of 2 or more) per frame. Vector for detecting a motion vector within a first motion vector detection range from a decoded moving image signal generated by compressing and encoding the generated macroblock moving image signal and the macroblock moving image signal A detection step, a first outermost line which is an outermost line of the first motion vector detection range among the detected motion vectors, and a second outermost line which is inside the first motion vector detection range.
A motion vector counting step of counting, as the number of first motion vectors, the number of motion vectors between the second outermost line which is the outermost line of the motion vector detection range of
And a motion vector detection range determining step of expanding the first motion vector detection range based on the counted number of the first motion vectors.

【0042】また、第14の本発明は、第13の本発明
のプログラムを担持した記録媒体であって、コンピュー
タにより処理可能な記録媒体である。
The 14th aspect of the present invention is a recording medium carrying the program according to the 13th aspect of the present invention, which can be processed by a computer.

【0043】[0043]

【発明の実施の形態】以下に本発明の実施の形態を図面
を参照して説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings.

【0044】本発明の実施の形態によれば、例えば動き
ベクトル検出部(手段)で検出した動きベクトルに基づ
き適応的に求めた動きベクトル検出範囲を、当該動きベ
クトル検出部(手段)に帰還する構成を備えるため、動
きベクトル検出部(手段)による動きベクトルを検出す
る動きベクトル検出範囲を、入力動画像映像の動きに合
わせて設定することができ、より適正な動きベクトルを
検出するため動きベクトル検出範囲数(すなわち、モー
ド数)が複数存在する場合であっても回路規模を増大す
ることなく、かつ動きベクトルの検出に際しての精度を
向上することができる。
According to the embodiment of the present invention, for example, the motion vector detection range adaptively obtained based on the motion vector detected by the motion vector detection unit (means) is fed back to the motion vector detection unit (means). Since the configuration is provided, the motion vector detection range for detecting the motion vector by the motion vector detection unit (means) can be set in accordance with the motion of the input moving image, and the motion vector for detecting a more appropriate motion vector. Even when there are a plurality of detection ranges (that is, the number of modes), it is possible to improve the accuracy in detecting a motion vector without increasing the circuit scale.

【0045】また、本発明の実施の形態によれば、例え
ば入力動画像映像を細分化した単位で動きベクトル検出
範囲を動きベクトル検出部に帰還する構成を備えるた
め、例えば1フレーム等の入力動画像映像のまとまった
単位で入力動画像映像の動きに合わせた動きベクトル検
出範囲を動きベクトル検出部に適切に設定でき、精度の
高い動きベクトル検出範囲の設定を簡略化することがで
きる。
Further, according to the embodiment of the present invention, for example, since the motion vector detection range is fed back to the motion vector detecting unit in a unit of subdividing the input moving image video, for example, an input moving image of one frame or the like is provided. The motion vector detection range can be appropriately set in the motion vector detection unit according to the motion of the input moving image video in a unit of the image video, and the setting of the highly accurate motion vector detection range can be simplified.

【0046】また、本発明の実施の形態によれば、例え
ば、適応的に求めた動きベクトル検出範囲の結果を参照
し、予め複数種類備えた動きベクトル検出範囲から実際
に適用する動きベクトル検出範囲を選択する構成を備え
るため、動きベクトル検出部に設定する動きベクトル検
出範囲の更新を入力動画像に応じて当該複数種類から自
由に合わせることができ、例えば好み等の使用者の意図
に合わせた動きベクトル検出が達成できる。また、動き
ベクトル検出部に設定する動きベクトル検出範囲を、入
力動画像映像の動きに合わせた例えば使用者の意図に合
わせた動きベクトル検出が達成できる。
Further, according to the embodiment of the present invention, for example, referring to the result of the motion vector detection range obtained adaptively, the motion vector detection range actually applied from a plurality of types of motion vector detection ranges provided in advance. Since it has a configuration for selecting, it is possible to freely update the motion vector detection range set in the motion vector detection unit from the plurality of types according to the input moving image, for example, according to the user's intention such as preference. Motion vector detection can be achieved. Further, it is possible to achieve motion vector detection in which the motion vector detection range set in the motion vector detection unit matches the motion of the input moving image, for example, the user's intention.

【0047】また、本発明の実施の形態によれば、例え
ば、帰還手段が動きベクトル検出範囲決定手段で決定し
た動きベクトル検出範囲を、動きベクトル検出手段及び
切換領域生成手段に帰還する構成を備えるため、動きベ
クトル検出範囲の設定をより入力動画像映像の動きの速
さに追従して決定でき、入力動画像映像の動きに合わせ
た動きベクトル検出範囲の即時性を高めることができ
る。
Further, according to the embodiment of the present invention, for example, the feedback means returns the motion vector detection range determined by the motion vector detection range determination means to the motion vector detection means and the switching area generation means. Therefore, the setting of the motion vector detection range can be determined more in accordance with the speed of movement of the input moving image video, and the immediacy of the motion vector detection range that matches the motion of the input moving image video can be improved.

【0048】また、本発明の実施の形態によれば、例え
ば、(動きベクトルが動きベクトル切換領域に存在する
数)/(n個の期間に存在するマクロブロック数)が所
定の閾値以上になった時、動きベクトル検出範囲を切り
換え、切り換えた動きベクトル検出範囲を動きベクトル
検出手段と切換領域生成手段とに帰還する構成を備える
ため、入力動画像映像の符号化に際して発生符号量の削
減ができ、入力動画像映像の動きに合わせた動きベクト
ルの検出をより高速化できる。
Further, according to the embodiment of the present invention, for example, (the number of motion vectors existing in the motion vector switching area) / (the number of macroblocks existing in n periods) is equal to or more than a predetermined threshold value. In this case, since the motion vector detection range is switched and the switched motion vector detection range is fed back to the motion vector detection means and the switching area generation means, it is possible to reduce the amount of generated code when encoding the input moving image. , It is possible to speed up the detection of the motion vector according to the motion of the input moving image.

【0049】(第1の実施の形態)図1は本発明の第1
の実施の形態における動画像圧縮符号化装置の構成を示
すブロック図であり、MPEG(Moving Pic
tures Experts Group)方式の場合
を示した例である。1は入力端子であり、2はフレーム
並べ替え器であり、3は離散コサイン変換(以下、DC
Tと称す)器であり、4は量子化器であり、5は可変長
符号化器であり、6はバッファメモリであり、7は出力
端子であり、8はレート制御器であり、9は逆量子化器
であり、10は逆DCT器であり、11はフレームメモ
リであり、12は予測器であり、13は検出範囲決定器
であり、14は切換領域決定器であり、15は比較器で
あり、16はカウンタであり、17は減算器であり、1
8は切換スイッチであり、19は加算器であり、20は
スイッチである。
(First Embodiment) FIG. 1 shows a first embodiment of the present invention.
FIG. 3 is a block diagram showing the configuration of a moving picture compression encoding apparatus according to the embodiment of the present invention.
This is an example showing the case of the True Experts Group) method. 1 is an input terminal, 2 is a frame rearranger, 3 is a discrete cosine transform (hereinafter, DC
(T), 4 is a quantizer, 5 is a variable length encoder, 6 is a buffer memory, 7 is an output terminal, 8 is a rate controller, and 9 is a rate controller. Inverse quantizer, 10 is an inverse DCT device, 11 is a frame memory, 12 is a predictor, 13 is a detection range determiner, 14 is a switching area determiner, and 15 is a comparison. , 16 is a counter, 17 is a subtractor, 1
Reference numeral 8 is a changeover switch, 19 is an adder, and 20 is a switch.

【0050】なお、本実施の形態のフレーム並べ替え器
2は本発明のマクロブロック生成手段の例であり、本実
施の形態の切替スイッチ18、減算器17、DCT器
3、量子化器4、逆量子化器9、逆DCT器10、加算
器19、スイッチ20、及びフレーム目盛り11は本発
明の符号復号手段の例であり、本実施の形態の予測器1
2は本発明の動きベクトル検出手段の例であり、本実施
の形態の切換領域決定器14、比較器15、及びカウン
タ16は本発明の動きベクトルカウント手段の例であ
り、本実施の形態の検出範囲決定器13は本発明の動き
ベクトル検出範囲決定手段の例である。
The frame rearranger 2 of the present embodiment is an example of the macroblock generating means of the present invention, and the changeover switch 18, the subtractor 17, the DCT unit 3, the quantizer 4, of the present embodiment is used. The inverse quantizer 9, the inverse DCT device 10, the adder 19, the switch 20, and the frame scale 11 are examples of the code decoding means of the present invention, and the predictor 1 of the present embodiment.
2 is an example of the motion vector detecting means of the present invention, and the switching area determiner 14, the comparator 15, and the counter 16 of the present embodiment are examples of the motion vector counting means of the present invention, and The detection range determiner 13 is an example of the motion vector detection range determination means of the present invention.

【0051】以上のように構成した各ブロックの動作を
説明する。入力端子1から入力する原画信号は、映像音
声信号の内予め音声信号と映像信号とに分離した映像信
号である。映像信号は、フレーム並べ替え器2で一旦フ
レームに並べ替えた後、フレームを所定の画素数で細分
化した単位(以下、マクロブロック単位と称す)の原画
映像信号を、フレーム並べ替え器2で並べ替えた順番
(以下、デコード順と称す)に切換スイッチ18に出力
する。切換スイッチ18は、マクロブロック単位の原画
映像信号(以下、マクロブロック動画像信号と称す)を
そのまま出力するか、または、マクロブロック動画像信
号から動き補償予測映像信号等で減算器17により減算
するかを選択する。
The operation of each block configured as described above will be described. The original image signal input from the input terminal 1 is a video signal in which the audio signal and the video signal are separated in advance from the video and audio signal. The video signal is once rearranged into frames by the frame rearrangement unit 2 and then the original image video signal in a unit (hereinafter referred to as macroblock unit) obtained by subdividing the frame into a predetermined number of pixels is processed by the frame rearrangement unit 2. The data is output to the changeover switch 18 in the rearranged order (hereinafter referred to as decoding order). The changeover switch 18 outputs an original image video signal in macro block units (hereinafter, referred to as macro block moving image signal) as it is, or subtracts it from the macro block moving image signal with a motion compensation prediction image signal by a subtractor 17. Or select.

【0052】先ず、切換スイッチ18がマクロブロック
動画像信号そのままを選択する場合について説明する。
切換スイッチ18から出力するマクロブロック動画像信
号がIピクチャの場合、DCT器3で離散コサイン変換
したDCT信号を量子化器4に出力する。量子化器4で
は、レート制御器8から帰還する所定の量子化値で量子
化を行うことで、情報量を削減した量子化信号を可変長
符号化器5及び逆量子化器9に出力する。
First, the case where the changeover switch 18 selects the macroblock moving image signal as it is will be described.
When the macroblock moving image signal output from the changeover switch 18 is an I picture, the DCT signal subjected to the discrete cosine transform in the DCT unit 3 is output to the quantizer 4. The quantizer 4 outputs a quantized signal having a reduced amount of information to the variable length encoder 5 and the inverse quantizer 9 by performing quantization with a predetermined quantized value fed back from the rate controller 8. .

【0053】可変長符号化器5に入力した量子化信号
は、可変長符号化器5で符号化を施した符号化信号とし
てバッファメモリ6に出力し、バッファメモリ6では出
力端子7から引き抜かれるまで符号化信号を格納すると
共に、発生符号量をレート制御器8に出力する。レート
制御器8では、発生符号量に基づく量子化値を量子化器
4に帰還する。出力端子7から引き抜かれた符号化信号
は、不図示のシステムエンコーダで音声信号と多重化さ
れる。
The quantized signal input to the variable length encoder 5 is output to the buffer memory 6 as an encoded signal encoded by the variable length encoder 5, and is extracted from the output terminal 7 in the buffer memory 6. The coded signal is stored up to and the generated code amount is output to the rate controller 8. The rate controller 8 feeds back the quantized value based on the generated code amount to the quantizer 4. The encoded signal extracted from the output terminal 7 is multiplexed with the audio signal by a system encoder (not shown).

【0054】一方、逆量子化器9に入力した量子化信号
は、所定の量子化値で逆量子化した逆量子化信号を逆D
CT器10に出力する。逆DCT器10では入力した量
子化信号を逆離散コサイン処理を施した逆DCT信号を
出力する。Iピクチャのように、切換スイッチ18がマ
クロブロック動画像信号そのままを選択している場合
は、切換スイッチ18に連動してスイッチ20はOFF
状態となり、加算器19で逆DCT信号に加算すること
なく、フレームメモリ11に1フレームになるまでマク
ロブロック単位の参照映像信号(以下、マクロブロック
参照信号と称す)を格納する。Pピクチャでは、フレー
ムメモリ11に1フレーム分格納したフレーム単位の参
照映像信号(以下、フレーム参照信号と称す)とフレー
ム並べ替え器2からのマクロブロック動画像信号との差
分が最小となる動きベクトルを予測器12で予測し、動
きベクトル検出範囲を検出すると共に、動きベクトルと
動き補償予測後の映像信号(以下、予測映像信号と称
す)とを出力する。
On the other hand, the quantized signal input to the inverse quantizer 9 is the inverse quantized signal which is inversely quantized with a predetermined quantized value.
Output to the CT device 10. The inverse DCT device 10 outputs an inverse DCT signal obtained by subjecting the input quantized signal to inverse discrete cosine processing. When the changeover switch 18 selects the macroblock moving image signal as it is, like the I picture, the switch 20 is turned off in conjunction with the changeover switch 18.
In this state, the adder 19 does not add the inverse DCT signal to the frame memory 11 and stores a reference video signal (hereinafter, referred to as a macroblock reference signal) in macroblock units until one frame is formed. In the P picture, a motion vector that minimizes the difference between the frame-based reference video signal stored in the frame memory 11 for one frame (hereinafter referred to as a frame reference signal) and the macroblock moving image signal from the frame rearranger 2. Is detected by the predictor 12 to detect the motion vector detection range, and at the same time, the motion vector and the video signal after motion compensation prediction (hereinafter referred to as the predicted video signal) are output.

【0055】切換スイッチ18が減算器17でマクロブ
ロック動画像信号と予測映像信号との差分信号を選択す
るPピクチャまたはBピクチャの場合を説明する。Pピ
クチャの場合は、直前のIピクチャまたはPピクチャに
基づく予測映像信号をマクロブロック動画像信号から減
算した差分信号をDCT器3に出力し、DCT信号を量
子化器4に出力する。量子化器4から出力する量子化信
号の一方は、可変長符号化器5、バッファメモリ6を経
て出力端子7から引き抜かれるまでバッファメモリ7に
格納されると共に、発生符号量をレート制御器8に入力
し量子化器4に量子化値を帰還する。バッファメモリ6
に格納された符号化信号は、前述と同様にして出力端子
7からシステムエンコーダに出力される。
A case where the changeover switch 18 is a P picture or a B picture in which the subtractor 17 selects the difference signal between the macroblock moving image signal and the predicted video signal will be described. In the case of a P picture, the difference signal obtained by subtracting the predicted video signal based on the immediately preceding I picture or P picture from the macroblock moving image signal is output to the DCT unit 3, and the DCT signal is output to the quantizer 4. One of the quantized signals output from the quantizer 4 is stored in the buffer memory 7 through the variable-length encoder 5 and the buffer memory 6 until it is extracted from the output terminal 7, and the generated code amount is controlled by the rate controller 8 And the quantized value is fed back to the quantizer 4. Buffer memory 6
The encoded signal stored in is output from the output terminal 7 to the system encoder in the same manner as described above.

【0056】量子化信号の他方は、逆量子化器9、逆D
CT器10を経て、加算器19に入力する。切換スイッ
チ18に連動してスイッチ20はON状態となり、減算
器17で減算した直前のIピクチャまたはPピクチャを
逆DCT器10から出力する逆DCT信号に加算し、マ
クロブロック参照信号を得る。加算器19で加算したマ
クロブロック参照信号を1フレームとなるまでフレーム
メモリ11に格納し、予測器12では、フレームメモリ
11からのフレーム参照信号及びマクロブロック動画像
信号から差分信号が最小となる動きベクトルを動きベク
トル検出範囲内で検出し、例えば図2に示すような動き
ベクトルと予測映像信号とを出力する。
The other of the quantized signals is the inverse quantizer 9, inverse D
It is input to the adder 19 via the CT unit 10. The switch 20 is turned on in association with the changeover switch 18, and the I picture or P picture immediately before being subtracted by the subtractor 17 is added to the inverse DCT signal output from the inverse DCT unit 10 to obtain a macroblock reference signal. The macroblock reference signal added by the adder 19 is stored in the frame memory 11 until one frame is obtained, and the predictor 12 performs a motion in which the difference signal is minimized from the frame reference signal from the frame memory 11 and the macroblock moving image signal. The vector is detected within the motion vector detection range, and the motion vector and the predicted video signal as shown in FIG. 2 are output.

【0057】なお、マクロブロック動画像信号がBピク
チャの場合は、前後のIピクチャまたはPピクチャに基
づく予測映像信号とマクロブロック動画像信号との差分
を減算器17でとる以外はPピクチャと同様である。但
し、Bピクチャも考慮すると前述したようにBピクチャ
は前後のピクチャを参照するため、動きベクトル検出範
囲をフレーム単位等で更新するアルゴリズムが複雑化す
る割には精度の向上は少ないため、本実施の形態ではB
ピクチャであれば次のPピクチャを選択するまで無視す
るアルゴリズムを採用した。
When the macroblock moving picture signal is a B picture, it is the same as the P picture except that the subtracter 17 takes the difference between the predicted video signal based on the preceding or following I picture or P picture and the macroblock moving picture signal. Is. However, considering B-pictures as well, B-pictures refer to the preceding and subsequent pictures as described above, so the accuracy is not improved despite the complexity of the algorithm for updating the motion vector detection range in frame units. In the form of B
If it is a picture, an algorithm is adopted that ignores it until the next P picture is selected.

【0058】こうして得た予測器12から出力する信号
の一方は、次のマクロブロック動画像信号を減算器17
で減算するための予測映像信号として供し、他方は、例
えば図3に示すように動きベクトルが動きベクトル検出
範囲内に存在するかを比較検証するため、マクロブロッ
ク単位の動きベクトルを比較器15に出力する。図3に
おける領域Dは動きベクトル検出範囲を狭める領域を示
し、領域Uは動きベクトル検出範囲を広げる領域を示
す。すなわち、図2に示した予測器12で検出したマク
ロブロックCijに対応する動きベクトルVijを、切換領
域決定器14から出力される動きベクトル切換領域Dま
たはUの何れの範囲内に存在するかを比較器15で比較
検証し、マクロブロック切替信号を適応的に求め、カウ
ンタ16に出力する。
One of the signals output from the predictor 12 thus obtained is the subtractor 17 for the next macroblock moving image signal.
Is used as a predictive video signal for subtraction in step S1, and the other uses a motion vector in macroblock units to the comparator 15 in order to compare and verify whether the motion vector is within the motion vector detection range as shown in FIG. Output. Region D in FIG. 3 indicates a region where the motion vector detection range is narrowed, and region U indicates a region where the motion vector detection range is widened. That is, the motion vector V ij corresponding to the macroblock C ij detected by the predictor 12 shown in FIG. 2 exists in either range of the motion vector switching area D or U output from the switching area determining unit 14. It is compared and verified by the comparator 15 to adaptively obtain the macroblock switching signal and output to the counter 16.

【0059】図3に示した動きベクトル検出範囲をさら
に詳細に説明する。図4は、図3に示した動きベクトル
検出範囲をさらに詳細に説明した図である。図4(a)
は、動きベクトル検出範囲の候補を示すものであり、本
実施の形態では、5個の動きベクトル検出範囲の候補A
1、A2、A3、A4、A5がある。これらの動きベク
トル検出範囲の候補は、検出範囲決定器13に格納され
ている。そして、予測器12で動きベクトルを検出する
際や、切換領域決定器14で動きベクトル切換領域を決
定する際に使われる動きベクトル検出範囲は、これら5
個の動きベクトル検出範囲の候補A1、A2、A3、A
4、A5のうちのいずれか一つが選択して使われる。
The motion vector detection range shown in FIG. 3 will be described in more detail. FIG. 4 is a diagram for explaining the motion vector detection range shown in FIG. 3 in more detail. Figure 4 (a)
Indicates a motion vector detection range candidate, and in the present embodiment, five motion vector detection range candidates A
There are 1, A2, A3, A4 and A5. These motion vector detection range candidates are stored in the detection range determiner 13. The motion vector detection range used when the predictor 12 detects the motion vector and when the switching area determiner 14 determines the motion vector switching area is 5 or less.
Motion vector detection range candidates A1, A2, A3, A
Any one of A4 and A5 is selected and used.

【0060】今、動きベクトル検出範囲の候補A1、A
2、A3、A4、A5のうち、A3が動きベクトル検出
範囲として実際に用いられていているとする。
Now, the motion vector detection range candidates A1, A
Of 2, A3, A4, and A5, A3 is actually used as the motion vector detection range.

【0061】図4(b)に示すように、動きベクトル検
出範囲A3の最外線である最外線l3と、動きベクトル
検出範囲A3の内側にある動きベクトル検出範囲A3’
の最外線である最外線l3’との間にある領域が図3で
説明した領域Uに対応する。図3の領域Uは、切換領域
決定器14で決定される。そして、後述するように領域
Uに動きベクトルが乗っている場合が所定の条件を満た
す場合には、動きベクトル検出範囲A3を拡大するよう
処理される。この時、同時に動きベクトル検出範囲A
3’、A3’’も拡大するよう処理される。
As shown in FIG. 4B, the outermost line l3, which is the outermost line of the motion vector detection range A3, and the motion vector detection range A3 'inside the motion vector detection range A3.
The area between the outermost line l3 'and the outermost line l3' corresponds to the area U described in FIG. The area U in FIG. 3 is determined by the switching area determiner 14. Then, as described later, when the motion vector is in the area U and the predetermined condition is satisfied, the motion vector detection range A3 is expanded. At this time, the motion vector detection range A
3 ′ and A3 ″ are also processed to be enlarged.

【0062】同様に、図4(b)に示すように、動きベ
クトル検出範囲A3’の内側にある動きベクトル検出範
囲A3’’の最外線である最外線l3’’の内側の領域
が図3で説明した領域Dに対応する。図3の領域Dは、
切換領域決定器14で決定される、そして、後述するよ
うに領域Dに動きベクトルが乗っている場合が所定の条
件を満たす場合には、動きベクトル検出範囲A3を縮小
するように処理される。この時、同時に動きベクトル検
出範囲A3’、A3’’も縮小するように処理される。
Similarly, as shown in FIG. 4B, the area inside the outermost line l3 ″, which is the outermost line of the motion vector detection range A3 ″ inside the motion vector detection range A3 ′, is shown in FIG. This corresponds to the area D described in. Region D in FIG. 3 is
If it is determined by the switching area determiner 14 and if a motion vector is present in the area D as described later and a predetermined condition is satisfied, the motion vector detection range A3 is reduced. At this time, the motion vector detection ranges A3 ′ and A3 ″ are simultaneously processed so as to be reduced.

【0063】また、切換領域決定器14は、動きベクト
ル検出範囲に応じて図3の領域U及び領域Dを決定す
る。
The switching area determiner 14 determines the area U and the area D in FIG. 3 according to the motion vector detection range.

【0064】なお、本実施の形態では動きベクトル検出
範囲の切換には、Pピクチャに基づく動きベクトルのみ
を対象としているため、比較器15はPピクチャの符号
化時のみ動作するが、Bピクチャも考慮する場合にはB
ピクチャの符号化時も動作すること当然である。
In this embodiment, since the motion vector detection range is switched only for the motion vector based on the P picture, the comparator 15 operates only when the P picture is encoded, but the B picture is also operated. B to consider
It goes without saying that it also works when encoding a picture.

【0065】比較器15は、マクロブロックCijに対応
する動きベクトルVijが図3の領域Uに乗っているかど
うか、また、領域Dに乗っているかどうかを判定し、そ
の判定結果をマクロブロック切換信号としてカウンタ1
6に出力する。
The comparator 15 determines whether the motion vector V ij corresponding to the macroblock C ij is in the area U of FIG. 3 and whether it is in the area D, and the determination result is determined as the macroblock. Counter 1 as switching signal
Output to 6.

【0066】カウンタ16は、マクロブロック切換信号
が入力されると、マクロブロック切換信号がマクロブロ
ックCijに対応する動きベクトルVijが図3の領域Uに
乗っていることを示す場合には領域Uに対応するカウン
ト値を1だけ増加させ、また、マクロブロック切換信号
がマクロブロックCijに対応する動きベクトルVijが図
3の領域Dに乗っていることを示す場合には、領域Dに
対応するカウント値を1だけ増加させる。
When the macroblock switching signal is input, the counter 16 indicates the area when the macroblock switching signal indicates that the motion vector V ij corresponding to the macroblock C ij is in the area U in FIG. When the count value corresponding to U is incremented by 1, and when the macroblock switching signal indicates that the motion vector V ij corresponding to the macroblock C ij is in the area D of FIG. Increment the corresponding count value by 1.

【0067】このようにしてカウンタ16は、領域Dに
対応するカウント値及び領域Uに対応するカウント値を
1フレーム分カウントし、カウンタ16はカウント結果
をフレーム単位の切換信号(以下、フレーム切換信号と
称す)として検出範囲決定器13に出力する。フレーム
切換信号が入力されると、検出範囲決定器13は、動き
ベクトル検出範囲をフレーム単位で適応的に決定する。
In this way, the counter 16 counts the count value corresponding to the area D and the count value corresponding to the area U for one frame, and the counter 16 outputs the count result in a frame-based switching signal (hereinafter referred to as a frame switching signal). Is output to the detection range determiner 13. When the frame switching signal is input, the detection range determiner 13 adaptively determines the motion vector detection range on a frame-by-frame basis.

【0068】すなわち、検出範囲決定器13は、図4
(a)に示す動きベクトル検出範囲の候補A1、A2、
A3、A4、A5から実際に用いる動きベクトル検出範
囲を選択することにより決定する。
That is, the detection range determiner 13 is shown in FIG.
The motion vector detection range candidates A1, A2, shown in (a),
It is determined by selecting the motion vector detection range that is actually used from A3, A4, and A5.

【0069】検出範囲決定器13は、図5(a)に示す
ように、動きベクトルQが領域Dに乗っている場合に
は、図5(b)に示すように動きベクトル検出範囲A4
を選択することにより動きベクトル検出範囲を縮小す
る。さらに、詳細に説明すると、検出範囲決定器13
は、カウンタ16から入力されたフレーム切換信号に基
づいて、(動きベクトルが動きベクトル切換領域Dに存
在する数)を(1フレームの期間に存在するマクロブロ
ック数)で除した値が所定の閾値以上になったとき、動
きベクトル検出範囲を動きベクトル切換領域A4に切り
換える。この時、同時に動きベクトル検出範囲A3’、
A3’’をそれぞれA4’、A4’’に切り換える。こ
のように検出範囲決定器13は、各動きベクトル検出範
囲を縮小する。そして、検出範囲決定器13が動きベク
トル検出範囲を動きベクトル検出範囲A4に決定する
と、決定した動きベクトル検出範囲を切換領域決定器1
4及び予測器12に帰還する。切換領域決定器14は、
その決定に応じて、図5(b)に示すように動きベクト
ル切換領域D及びUを決定する。
When the motion vector Q is in the area D as shown in FIG. 5A, the detection range determiner 13 detects the motion vector detection range A4 as shown in FIG. 5B.
The motion vector detection range is reduced by selecting. More specifically, the detection range determiner 13
Is a predetermined threshold value obtained by dividing (the number of motion vectors existing in the motion vector switching area D) by (the number of macroblocks existing in one frame period) based on the frame switching signal input from the counter 16. When the above is reached, the motion vector detection range is switched to the motion vector switching area A4. At this time, the motion vector detection range A3 ′,
A3 ″ is switched to A4 ′ and A4 ″, respectively. In this way, the detection range determiner 13 reduces each motion vector detection range. Then, when the detection range determiner 13 determines the motion vector detection range to be the motion vector detection range A4, the determined motion vector detection range is set to the switching area determiner 1
4 and predictor 12. The switching area determiner 14 is
In accordance with the determination, the motion vector switching areas D and U are determined as shown in FIG.

【0070】また、検出範囲決定器13は、図6(b)
に示すように、動きベクトルRが領域Uに乗っている場
合には、図6(b)に示すように動きベクトル検出範囲
A2を選択することにより動きベクトル検出範囲を拡大
する。さらに、詳細に説明すると、検出範囲決定器13
は、カウンタ16から入力されたフレーム切換信号に基
づいて、(動きベクトルが動きベクトル切換領域Uに存
在する数)を(1フレームの期間に存在するマクロブロ
ック数)で除した値が所定の閾値以上になったとき、動
きベクトル検出範囲を動きベクトル検出範囲A2に切り
換える。この時、同時に動きベクトル検出範囲A3’、
A3’’をそれぞれA2’、A2’’に切り換える。こ
のように検出範囲決定器13は、各動きベクトル検出範
囲を拡大する。そして、検出範囲決定器13が動きベク
トル検出範囲を動きベクトル検出範囲A2に決定する
と、決定した動きベクトル検出範囲を切換領域決定器1
4及び予測器12に帰還する。切換領域決定器14は、
その決定に応じて、図6(b)に示すように動きベクト
ル切換領域D及びUを決定する。
The detection range determiner 13 is shown in FIG.
As shown in FIG. 6, when the motion vector R is in the area U, the motion vector detection range A2 is selected as shown in FIG. 6B to expand the motion vector detection range. More specifically, the detection range determiner 13
Is a predetermined threshold value obtained by dividing (the number of motion vectors existing in the motion vector switching area U) by (the number of macroblocks existing in one frame period) based on the frame switching signal input from the counter 16. When the above is reached, the motion vector detection range is switched to the motion vector detection range A2. At this time, the motion vector detection range A3 ′,
A3 ″ is switched to A2 ′ and A2 ″, respectively. In this way, the detection range determiner 13 expands each motion vector detection range. When the detection range determiner 13 determines the motion vector detection range to be the motion vector detection range A2, the determined motion vector detection range is set to the switching area determiner 1
4 and predictor 12. The switching area determiner 14 is
In accordance with the determination, the motion vector switching areas D and U are determined as shown in FIG. 6 (b).

【0071】また、検出範囲決定器13は、(動きベク
トルが動きベクトル切換領域Dに存在する数)を(1フ
レームの期間に存在するマクロブロック数)で除した値
が所定の閾値より小さく、かつ、(動きベクトルが動き
ベクトル切換領域Uに存在する数)を(1フレームの期
間に存在するマクロブロック数)で除した値が所定の閾
値より小さいときは、動きベクトル検出範囲を拡大も縮
小もしない。すなわち、動きベクトル検出範囲を変更し
ない。
Further, the detection range determiner 13 divides (the number of motion vectors existing in the motion vector switching area D) by (the number of macroblocks existing in one frame period) is smaller than a predetermined threshold value, If the value obtained by dividing (the number of motion vectors existing in the motion vector switching area U) by (the number of macroblocks existing in one frame period) is smaller than a predetermined threshold value, the motion vector detection range is expanded or reduced. There isn't. That is, the motion vector detection range is not changed.

【0072】予測器12に帰還された動きベクトル検出
範囲は、フレーム単位で最適な動きベクトル検出範囲と
して、次のフレーム単位で予測器12において動きベク
トルを予測する際に、動きベクトル検出範囲として用い
られる。
The motion vector detection range fed back to the predictor 12 is used as an optimum motion vector detection range in frame units, and is used as a motion vector detection range in predicting a motion vector in the next frame unit in the predictor 12. To be

【0073】例えば、検出範囲決定器13が図5(b)
に示すように動きベクトル検出範囲を動きベクトルA4
に決定した場合には、次のフレーム単位で予測器12
は、動きベクトルを予測する際に、動きベクトル検出範
囲A4を用いる。
For example, the detection range determiner 13 is shown in FIG.
As shown in FIG.
If it is decided to, the predictor 12
Uses the motion vector detection range A4 when predicting the motion vector.

【0074】同様に、検出範囲決定器13が図6(b)
に示すように動きベクトル検出範囲を動きベクトルA2
に決定した場合には、次のフレーム単位で予測器12
は、動きベクトルを予測する際に、動きベクトル検出範
囲A2を用いる。
Similarly, the detection range determiner 13 is shown in FIG.
As shown in FIG.
If it is decided to, the predictor 12
Uses the motion vector detection range A2 when predicting the motion vector.

【0075】次のフレーム単位でも上記と同様の動作を
行い、適応的に予測器12で用いられる動きベクトル検
出範囲が次々と更新されていく。本実施の形態では、上
記のような動作をPフレーム毎に行う。すなわち、図7
に動きベクトル検出範囲更新のタイミングを示す。Pフ
レーム20で検出された動きベクトルは、検出範囲決定
器13が次のPフレーム21の動きベクトル検出範囲を
決定するのに用いられる。このように本実施の形態の動
画像圧縮符号化装置は、Pフレーム毎に動きベクトル検
出範囲を切り換えていくものである。
The same operation as above is performed in the next frame unit, and the motion vector detection range used in the predictor 12 is adaptively updated one after another. In the present embodiment, the above operation is performed for each P frame. That is, FIG.
Shows the timing of updating the motion vector detection range. The motion vector detected in the P frame 20 is used by the detection range determiner 13 to determine the motion vector detection range of the next P frame 21. As described above, the moving picture compression coding apparatus according to the present embodiment switches the motion vector detection range for each P frame.

【0076】特に大きな動きを有する入力動画像映像の
場合には、図11で説明した従来の動画像圧縮符号化装
置では、動きベクトル検出範囲320の最外周上に乗っ
ている動きベクトルPのみを検出していたので、動きベ
クトル検出範囲320の最外周に乗っている動きベクト
ルPよりも適正な動きベクトルが動きベクトル検出範囲
320の外部に存在してもそのような動きベクトルを検
出して用いることができなかった。このような場合であ
っても、図11で説明した従来の動画像圧縮符号化装置
では、適正な動きベクトルを検出する代わりに動きベク
トルPを検出して用いていた。
In the case of an input moving image video having a particularly large motion, in the conventional moving image compression coding apparatus described in FIG. 11, only the motion vector P on the outermost periphery of the motion vector detection range 320 is used. Since it has been detected, even if a motion vector more appropriate than the motion vector P on the outermost periphery of the motion vector detection range 320 exists outside the motion vector detection range 320, such a motion vector is detected and used. I couldn't. Even in such a case, the conventional moving image compression encoding apparatus described in FIG. 11 detects and uses the motion vector P instead of detecting the appropriate motion vector.

【0077】これに対して本実施の形態の動画像圧縮符
号化装置では、動きベクトル検出範囲を拡大する際に
は、図3、図4、図5、図6などにそれぞれ示した領域
Uに乗っている動きベクトルを考慮の対象とする。従っ
て、従来の技術で動きベクトル検出範囲の外側により適
正な動きベクトルが存在し、そのような適正な動きベク
トルが検出出来ない場合であっても、本実施の形態のよ
うに領域Uを動きベクトルの考慮の対象とすることによ
り、従来の技術では検出できなかった適正な動きベクト
ルを検出することが出来るようになる。
On the other hand, in the moving picture compression coding apparatus of the present embodiment, when expanding the motion vector detection range, the area U shown in each of FIGS. 3, 4, 5, and 6 is used. The riding motion vector is taken into consideration. Therefore, even if there is a proper motion vector outside the motion vector detection range by the conventional technique and such a proper motion vector cannot be detected, the motion vector is set to the region U as in the present embodiment. By taking into consideration the above, it becomes possible to detect an appropriate motion vector that could not be detected by the conventional technique.

【0078】このように、本実施の形態によれば、動き
の大きな入力動画像映像であっても適正な動きベクトル
を検出することが出来、また、適正な動きベクトル検出
範囲を設定することが出来るようになる。
As described above, according to the present embodiment, it is possible to detect an appropriate motion vector even in an input moving image having a large motion, and set an appropriate motion vector detection range. become able to do.

【0079】以上のように、本実施の形態の動画像圧縮
符号化装置は、圧縮符号化することにより動画像信号の
動きベクトルを検出する動きベクトル検出手段21の処
理動作に並行して、動きベクトルを検出する動きベクト
ル検出範囲を最前のフレーム単位で最適化した範囲に置
き換える構成であるため、動きベクトル検出手段21に
供する回路等のハードウェア規模を増大することなく、
動きベクトルの検出を最適化できる効果がある。また、
動きの大きな画像であっても適正な動きベクトルを検出
することが出来、また、適正な動きベクトル検出範囲を
設定することが出来るようになる。
As described above, the moving picture compression coding apparatus according to the present embodiment moves in parallel with the processing operation of the motion vector detecting means 21 for detecting the motion vector of the moving picture signal by compression coding. Since the motion vector detection range for detecting a vector is replaced with the optimized range in the unit of the previous frame, the hardware scale of the circuit or the like provided to the motion vector detection means 21 is not increased.
There is an effect that the detection of the motion vector can be optimized. Also,
It is possible to detect an appropriate motion vector even in an image with large motion, and set an appropriate motion vector detection range.

【0080】なお、本実施の形態では、検出範囲決定器
13が5個の動きベクトル検出範囲の候補から実際に用
いる動きベクトル検出範囲を選択するとして説明した
が、これに限らない。3個の動きベクトル検出範囲の候
補から実際の動きベクトル検出範囲を選択してもよく、
また7個の動きベクトル検出範囲の候補から実際の動き
ベクトル検出範囲を選択しても構わない。本実施の形態
の検出範囲決定器13は、複数個の動きベクトル検出範
囲の候補を格納しており、その中から実際に用いる動き
ベクトル検出範囲を選択することにより決定しさえすれ
ばよい。
Although the detection range determiner 13 selects the motion vector detection range to be actually used from the five motion vector detection range candidates in this embodiment, the present invention is not limited to this. The actual motion vector detection range may be selected from the three motion vector detection range candidates,
The actual motion vector detection range may be selected from the seven motion vector detection range candidates. The detection range determiner 13 of the present embodiment stores a plurality of motion vector detection range candidates, and it suffices to select the motion vector detection range to be actually used from among the candidates.

【0081】さらに、本実施の形態では、検出範囲決定
器13が5個の動きベクトル検出範囲から実際に用いる
動きベクトル検出範囲を選択するとして説明したが、こ
れに限らない。検出範囲決定器13は、動きベクトルが
動きベクトル切換領域Uに存在する数が多いほど動きベ
クトル検出範囲の拡大率を大きくしても構わない。
Furthermore, in the present embodiment, the detection range determiner 13 has been described as selecting the motion vector detection range to be actually used from the five motion vector detection ranges, but the present invention is not limited to this. The detection range determiner 13 may increase the expansion rate of the motion vector detection range as the number of motion vectors existing in the motion vector switching area U increases.

【0082】また、この場合、検出範囲決定器13は、
予め保持している動きベクトル検出範囲から動きベクト
ルが動きベクトル切換領域Uに存在する数が多いほど大
きな動きベクトル検出範囲を選択しても構わないし、ま
た、検出範囲決定器13が予め動きベクトル検出範囲を
保持せず、動きベクトルが動きベクトル切換領域Uに存
在する数が多いほど大きな動きベクトル検出範囲を生成
しても構わない。
Further, in this case, the detection range determiner 13
The larger the number of motion vectors existing in the motion vector switching area U, the larger the motion vector detection range may be selected from the motion vector detection ranges held in advance, and the detection range determiner 13 may detect the motion vector in advance. It is also possible to generate a larger motion vector detection range as the number of motion vectors existing in the motion vector switching area U increases without holding the range.

【0083】また、検出範囲決定器13は、動きベクト
ルが動きベクトル切換領域Dに存在する数が多いほど動
きベクトル検出範囲の縮小率を大きくしても構わない。
The detection range determiner 13 may increase the reduction ratio of the motion vector detection range as the number of motion vectors existing in the motion vector switching area D increases.

【0084】また、この場合、検出範囲決定器13は、
予め保持している動きベクトル検出範囲から動きベクト
ルが動きベクトル切換領域Dに存在する数が多いほど小
さな動きベクトル検出範囲を選択しても構わないし、ま
た、検出範囲決定器13が予め動きベクトル検出範囲を
保持せず、動きベクトルが動きベクトル切換領域Dに存
在する数が多いほど小さな動きベクトル検出範囲を生成
しても構わない。
In this case, the detection range determiner 13
The larger the number of motion vectors existing in the motion vector switching area D, the smaller the motion vector detection range may be selected from the motion vector detection ranges held in advance, and the detection range determiner 13 may detect the motion vector in advance. It is also possible to generate a smaller motion vector detection range as the number of motion vectors existing in the motion vector switching region D increases without holding the range.

【0085】なお、本実施の形態の動画像圧縮符号化装
置は、図8(a)、図8(b)、図8(c)に示すよう
に、動きベクトル検出範囲が狭い場合には画素単位に近
付いた動きベクトルの検出となり、逆に広い場合には広
くなった分だけ検出する動きベクトルは間引かれた検出
となる。すなわち、図8(a)のように動きベクトル検
出範囲A1のように検出範囲が広い場合には、黒印で示
すように間引かれた画素に関する動きベクトルが検出さ
れ、逆に図8(c)のように動きベクトル検出範囲A5
のように検出範囲が狭い場合には、黒印で示すように、
画素単位で動きベクトルが検出される。従って、動きベ
クトル検出範囲が広くなってもその広さに応じて動きベ
クトルを求める画素が間引かれるので、動きベクトル検
出のための演算量が増加することはない。
The moving picture compression coding apparatus according to the present embodiment, as shown in FIG. 8A, FIG. 8B, and FIG. When the motion vector approaches the unit, it is detected. On the contrary, when the motion vector is wide, the motion vector detected by the widened part is thinned out. That is, when the detection range is wide such as the motion vector detection range A1 as shown in FIG. 8A, the motion vector regarding the thinned pixels is detected as shown by the black mark, and conversely, FIG. ) Motion vector detection range A5
If the detection range is narrow, as shown in,
The motion vector is detected in pixel units. Therefore, even if the motion vector detection range is widened, the pixels for which the motion vector is calculated are thinned out according to the width, so that the calculation amount for motion vector detection does not increase.

【0086】そして、図4に示したように、動きベクト
ル検出範囲を複数種類備え、当該複数種類の動きベクト
ル検出範囲から動きベクトル検出範囲を選択する構成を
備えると、動きベクトル検出範囲を入力映像の動きの大
きさに応じて適宜拡大・縮小することで最適化を図れ、
動きベクトル検出精度の向上及びそれによる発生符号量
の削減ができ、復号化後の動画像の高画質化が達成でき
る。
As shown in FIG. 4, when a plurality of motion vector detection ranges are provided and a motion vector detection range is selected from the plurality of types of motion vector detection ranges, the motion vector detection range is input to the input image. Can be optimized by appropriately enlarging / reducing according to the size of the movement of
The motion vector detection accuracy can be improved and the generated code amount can be reduced, and the high quality of the moving image after decoding can be achieved.

【0087】また、動きベクトル検出に要する記憶手段
等の回路を、当該動きベクトル検出範囲の内最も狭い範
囲に対応する規模とすることができ、動きベクトル検出
精度向上に起因して高画質の復号画像を実現できる装置
を安価にすることもできる。
Further, the circuit such as the storage means required for the motion vector detection can be of a scale corresponding to the narrowest range of the motion vector detection range, and the high quality decoding can be achieved due to the improvement of the motion vector detection accuracy. It is also possible to reduce the cost of the device that can realize the image.

【0088】上記実施の形態における動きベクトル検出
範囲13から、動きベクトル検出範囲に応じて動きベク
トル検出範囲切換領域を生成する切換領域決定器14
と、当該動きベクトル検出範囲切換領域と検出された動
きベクトルとを比較し当該動きベクトルが動きベクトル
切換領域内の存在を判定する比較器15とを備え、カウ
ンター16が当該動きベクトル切換領域と比較器15の
出力信号の判定信号とを格納し、カウンター16に格納
した判定信号を基に動きベクトル検出範囲を決定する構
成を備えると、動きベクトル検出手段21で検出する動
きベクトルの動きベクトル検出範囲の設定を、入力動画
像映像の動きに追従することができ、入力動画像映像の
動きに合わせた動きベクトル検出範囲の即時性を向上で
きる。
From the motion vector detection range 13 in the above embodiment, a switching area determiner 14 for generating a motion vector detection range switching area according to the motion vector detection range.
And a comparator 15 for comparing the motion vector detection range switching area with the detected motion vector to determine whether the motion vector exists in the motion vector switching area, and a counter 16 for comparing with the motion vector switching area. When a configuration is provided in which the determination signal of the output signal of the device 15 is stored and the motion vector detection range is determined based on the determination signal stored in the counter 16, the motion vector detection range of the motion vector detected by the motion vector detection means 21. Can follow the movement of the input moving image video, and the immediacy of the motion vector detection range according to the movement of the input moving image video can be improved.

【0089】なお、本実施の形態では、検出範囲決定器
13から予測器12に出力する動きベクトル検出範囲を
フレーム単位で更新するとして説明したが、これに限ら
ない。フレーム単位で動きベクトル検出範囲を適応的に
決定するとして説明したが、これに限らない。
In this embodiment, the motion vector detection range output from the detection range determiner 13 to the predictor 12 has been described as being updated on a frame-by-frame basis, but the present invention is not limited to this. Although it has been described that the motion vector detection range is adaptively determined for each frame, the present invention is not limited to this.

【0090】検出範囲決定器13から予測器12に出力
する動きベクトル検出範囲の更新を、n(nはn≦Nを
満たす自然数)個の期間で行っても構わない。ただし、
Nを1フレームに存在するマクロブロックの総数とし、
1フレームを複数個に分割した場合の一つの分割単位の
マクロブロックの総数をn個とする。この場合、カウン
ター16は、n個の期間での動きベクトルが動きベクト
ル切換領域中に存在する数も記憶する構成であり、(動
きベクトルが動きベクトル切換領域に存在する数)を
(n個の期間に存在するマクロブロック数)で除した値
が所定の閾値以上になったとき、動きベクトル検出範囲
を切り換え、当該切り換えた動きベクトル検出範囲を動
きベクトル検出手段21と切換領域決定器14とに帰還
する。
The motion vector detection range output from the detection range determiner 13 to the predictor 12 may be updated in n (n is a natural number satisfying n ≦ N) periods. However,
Let N be the total number of macroblocks present in one frame,
When one frame is divided into a plurality of pieces, the total number of macro blocks in one division unit is n. In this case, the counter 16 is configured to store the number of motion vectors existing in the motion vector switching area for n periods, and stores (the number of motion vectors existing in the motion vector switching area) as (n When the value divided by (the number of macroblocks existing in the period) becomes equal to or larger than a predetermined threshold value, the motion vector detection range is switched, and the switched motion vector detection range is set to the motion vector detection means 21 and the switching area determiner 14. To return.

【0091】例えば、(動きベクトルが領域Dに存在す
る数)を(n個の期間に存在するマクロブロック数)で
除した値が所定の閾値以上になったとき、動きベクトル
検出範囲を例えば図5(a)、図5(b)に示すように
動きベクトル検出範囲A3から動きベクトル検出範囲A
4に切り換える。すなわち、動きベクトル検出範囲を縮
小するまた、例えば(動きベクトルが領域Uに存在する
数)を(n個の期間に存在するマクロブロック数)で除
した値が所定の閾値以上になったとき、動きベクトル検
出範囲を例えば図6(a)、図6(b)に示すように動
きベクトル検出範囲A3から動きベクトル検出範囲A2
に切り換える。すなわち動きベクトル検出範囲を拡大す
る。
For example, when the value obtained by dividing (the number of motion vectors existing in the area D) by (the number of macroblocks existing in n periods) is equal to or greater than a predetermined threshold, the motion vector detection range is calculated as shown in FIG. 5 (a) and 5 (b), from the motion vector detection range A3 to the motion vector detection range A
Switch to 4. That is, when the motion vector detection range is reduced, or when the value obtained by dividing (the number of motion vectors existing in the area U) by (the number of macroblocks existing in n periods) is equal to or greater than a predetermined threshold value, For example, as shown in FIGS. 6A and 6B, the motion vector detection range is changed from the motion vector detection range A3 to the motion vector detection range A2.
Switch to. That is, the motion vector detection range is expanded.

【0092】このような構成を採用すると、入力動画像
映像の動きに合わせた動きベクトルの検出精度の向上と
発生符号量の削減とが実現出来る。
By adopting such a configuration, it is possible to improve the detection accuracy of the motion vector according to the motion of the input moving image and reduce the generated code amount.

【0093】次に、上述した一連の処理の流れを図1に
示したブロック図を参照しながら、図9を用いて説明す
る。
Next, the flow of the series of processes described above will be described with reference to FIG. 9 while referring to the block diagram shown in FIG.

【0094】先ず、入力端子1から入力された入力動画
像映像は、デコード順にフレーム並べ替え器2で並べ替
えられ、ステップ31で1フレームに付きN個(ただし
Nは2以上の自然数)に細分化したマクロブロック動画
像信号となる。
First, the input moving image video input from the input terminal 1 is rearranged in the decoding order by the frame rearranger 2, and is subdivided into N pieces (where N is a natural number of 2 or more) per frame in step 31. It becomes a converted macroblock moving image signal.

【0095】フレーム並べ替え器2からデコード順に抜
き取ったマクロブロック動画像信号は、ステップ32で
IピクチャかIピクチャ以外かを切替スイッチ18で判
定する。切替スイッチ18でマクロブロック動画像信号
がIピクチャであると判定されると、スイッチ20をO
FF状態にする。
In step 32, the changeover switch 18 determines whether the macroblock moving image signal extracted from the frame rearranger 2 in the decoding order is an I picture or a non-I picture. When the changeover switch 18 determines that the macroblock moving image signal is an I picture, the switch 20 is turned on.
Set to FF state.

【0096】Iピクチャと判定されたマクロブロック動
画像信号は、ステップ33でDCT器3、量子化器4、
逆量子化器9、逆DCT器10、加算器19を経てフレ
ームメモリ11にIピクチャのマクロブロック動画像の
復号化信号を格納する。
In step 33, the macroblock moving image signal determined to be the I picture is supplied to the DCT unit 3, the quantizer 4,
The decoded signal of the macroblock moving image of the I picture is stored in the frame memory 11 via the inverse quantizer 9, the inverse DCT device 10, and the adder 19.

【0097】次に、ステップ34で1フレーム分のマク
ロブロック動画像信号の圧縮復号の終了を判断し、1フ
レームに達していないときはステップ32に戻る。
Next, in step 34, it is judged that the compression / decoding of the macroblock moving image signal for one frame is completed, and when one frame is not reached, the process returns to step 32.

【0098】並び替え器2から抽出したマクロブロック
動画像信号がIピクチャかをステップ32で判断し、I
ピクチャでない場合はステップ35でPピクチャかBピ
クチャかを切替スイッチ18にて判定する。
In step 32, it is judged whether the macroblock moving image signal extracted from the rearranger 2 is an I picture.
If it is not a picture, the changeover switch 18 determines in step 35 whether it is a P picture or a B picture.

【0099】マクロブロック動画像信号がPピクチャと
判定されると、ステップ36で当該マクロブロック動画
像信号と予測器12から出力される予測映像信号とを減
算器17にて減算し差分信号を出力すると共に、スイッ
チ20をON状態にする。
When it is determined that the macroblock moving image signal is a P picture, the subtractor 17 subtracts the macroblock moving image signal and the predicted video signal output from the predictor 12 in step 36 to output a difference signal. At the same time, the switch 20 is turned on.

【0100】ステップ36で減算した差分信号は、ステ
ップ37でDCT器3、量子化器4、逆量子化器9、逆
DCT器10を経て、加算器19でPピクチャの逆DC
T信号と予測器12から出力される予測映像信号(本例
の場合は直前のIピクチャからの予測映像信号である
が、Pピクチャが続く場合では直前のPピクチャからの
予測映像信号となる)とを加算し、マクロブロック参照
信号をフレームメモリ11に1フレームとなるまで格納
する。それと共に、予測器12にてフレーム参照信号と
フレーム並べ替え器2からのマクロブロック動画像信号
との差分が最小となる動きベクトルを用いて予測映像信
号を生成する。
The difference signal subtracted in step 36 passes through the DCT unit 3, the quantizer 4, the inverse quantizer 9 and the inverse DCT unit 10 in step 37, and the adder 19 inverse DC of the P picture.
The T signal and the predicted video signal output from the predictor 12 (in this example, the predicted video signal is from the immediately preceding I picture, but when the P picture continues, the predicted video signal is from the immediately preceding P picture) And are added and the macroblock reference signal is stored in the frame memory 11 until one frame is formed. At the same time, the predictor 12 generates a predicted video signal using a motion vector that minimizes the difference between the frame reference signal and the macroblock moving image signal from the frame rearranger 2.

【0101】ステップ37で生成した予測映像信号は、
ステップ38で比較器15に入力され、比較器15で当
該予測映像信号と切換領域決定器14から出力される動
きベクトル切換領域とを比較することでマクロブロック
切換信号をカウンタ16に出力する。カウンタ16は、
1フレームになるまでマクロブロック切換信号を格納す
る。
The predicted video signal generated in step 37 is
In step 38, the macroblock switching signal is input to the comparator 15, and the comparator 15 compares the predicted video signal with the motion vector switching area output from the switching area determiner 14 to output a macroblock switching signal to the counter 16. Counter 16
The macroblock switching signal is stored until one frame is reached.

【0102】次にステップ34で、1フレーム分のマク
ロブロック動画像信号の圧縮復号の終了を判断し、1フ
レームに達していないときはステップ32に戻る。な
お、上述の例ではスイッチ20をON状態にするステッ
プをステップ36としたが、加算器19で加算を行う前
であれば何れであっても良く、ステップ35またはステ
ップ37であっても良いこと勿論である。
Next, at step 34, it is judged that the compression / decoding of the macroblock moving image signal for one frame is completed, and if one frame is not reached, the process returns to step 32. In the above example, the step of turning on the switch 20 is set to step 36, but any step may be performed before addition is performed by the adder 19, and step 35 or step 37 may be performed. Of course.

【0103】並び替え器2から抽出されたマクロブロッ
ク動画像信号がIピクチャかをステップ32で判断し、
Iピクチャでない場合はステップ35でPピクチャかB
ピクチャかを切替スイッチ18にて判定する。
In step 32, it is judged whether the macroblock moving image signal extracted from the rearranger 2 is an I picture,
If it is not an I picture, it is a P picture or B in step 35.
The changeover switch 18 determines whether the picture is a picture.

【0104】マクロブロック動画像信号がBピクチャと
判定されると、ステップ39で当該マクロブロック動画
像信号と比較器12から出力する予測映像信号とを減算
器17にて減算し差分信号を出力する。ステップ39で
減算した差分信号は、ステップ40でDCT器3及び量
子化器4を経て量子化信号を生成し、ステップ34で、
1フレーム分のマクロブロック動画像信号の圧縮復号の
終了を判断し、1フレームに達していないときはステッ
プ32に戻る。
When it is determined that the macroblock moving image signal is a B picture, the subtractor 17 subtracts the macroblock moving image signal and the predicted video signal output from the comparator 12 in step 39 to output a difference signal. . The difference signal subtracted in step 39 is quantized by the DCT device 3 and the quantizer 4 in step 40, and in step 34,
The end of compression decoding of the macroblock moving image signal for one frame is judged, and when it has not reached one frame, the process returns to step 32.

【0105】なお、ステップ34で1フレームに達して
いると判断した場合には、ステップ41でカウンタ16
からフレーム切換信号を検出範囲決定器13に出力し、
検出範囲決定器13はフレーム単位の動きベクトル検出
範囲を予測器12に帰還すると共に、切換領域決定器1
4にも出力し、切換領域決定器14で動きベクトル切換
領域を生成し、比較器15に出力する。
If it is determined in step 34 that one frame has been reached, in step 41 the counter 16
To output a frame switching signal to the detection range determiner 13,
The detection range determiner 13 feeds back the motion vector detection range on a frame-by-frame basis to the predictor 12, and the switching region determiner 1
4, and the switching area determiner 14 generates a motion vector switching area and outputs it to the comparator 15.

【0106】ステップ41でフレーム単位の動きベクト
ル検出範囲を生成し予測器12に出力した後、ステップ
42で動画像映像信号が終了し次のフレームの有無を判
定し、次のフレームがある場合はフレーム並べ替え器2
に戻り、次のフレームがない場合は処理を終了する。
In step 41, a motion vector detection range for each frame is generated and output to the predictor 12. Then, in step 42, the moving picture image signal ends and it is judged whether or not there is a next frame. Frame sorter 2
Then, if there is no next frame, the process ends.

【0107】なお、上述の実施の形態では動きベクトル
検出範囲の更新をフレーム単位で行う場合を説明した
が、画面単位、フレーム単位、グループオブピクチャ
(GOP)単位等入力動画像信号の所定のまとまり単位
で行うこともできる。但し、まとまり単位に応じて、動
きベクトル検出範囲決定器13及びフレームメモリ11
等を変化させる必要がある。
In the above embodiment, the case where the motion vector detection range is updated in frame units has been described, but a predetermined group of input moving image signals such as screen units, frame units, group of pictures (GOP) units, etc. It can also be done in units. However, the motion vector detection range determiner 13 and the frame memory 11 are selected according to the unit of aggregation.
Etc. need to be changed.

【0108】また、上述の実施の形態ではMPEG圧縮
を例に採り説明したが、圧縮復号化方法はMPEGに限
定されるものではなく、例えばH.261またはH.2
63等の時間方向の冗長度を削減するフレーム間予測を
行う圧縮方式であれば何れでも適応できる。
Further, although the above embodiment has been described by taking MPEG compression as an example, the compression / decoding method is not limited to MPEG. 261 or H.261. Two
Any compression method, such as 63, that performs inter-frame prediction that reduces the redundancy in the time direction can be applied.

【0109】本実施の形態によれば、動きベクトル検出
のための検出範囲が複数存在しても、ハードウェア規模
を増大させることなく、動画像圧縮符号化を行う際に、
入力映像の動きの速さに応じて、最適な動きベクトル検
出範囲を選択出来るという作用を有し、その結果、高画
質が実現できるという、優れた効果が得られる。また、
動きの大きな画像であっても適正な動きベクトルを検出
することが出来、また、適正な動きベクトル検出範囲を
設定することが出来る。
According to the present embodiment, even when there are a plurality of detection ranges for motion vector detection, when moving image compression coding is performed without increasing the hardware scale,
It has an effect that an optimum motion vector detection range can be selected according to the speed of movement of the input image, and as a result, an excellent effect that high image quality can be realized is obtained. Also,
It is possible to detect an appropriate motion vector even in an image with large motion, and set an appropriate motion vector detection range.

【0110】又、本発明のプログラムは、上述した本発
明の動きベクトル検出方法の全部又は一部のステップ
(又は、工程、動作、作用等)の動作をコンピュータに
より実行させるためのプログラムであって、コンピュー
タと協働して動作するプログラムである。
The program of the present invention is a program for causing a computer to execute all or part of the steps (or steps, operations, actions, etc.) of the above-described motion vector detection method of the present invention. , A program that operates in cooperation with a computer.

【0111】又、本発明の記録媒体は、上述した本発明
の動きベクトル検出方法の全部又は一部のステップ(又
は、工程、動作、作用等)の全部又は一部の動作をコン
ピュータにより実行させるためのプログラムを担持した
記録媒体であり、コンピュータにより読み取り可能且
つ、読み取られた前記プログラムが前記コンピュータと
協動して前記動作を実行する記録媒体である。
Further, the recording medium of the present invention causes a computer to execute all or part of all or some of the steps (or steps, operations, actions, etc.) of the above-described motion vector detecting method of the present invention. Is a recording medium carrying a program for executing the operation, which is readable by a computer and in which the read program cooperates with the computer to execute the operation.

【0112】尚、本発明の上記「一部の手段(又は、装
置、素子等)」とは、それらの複数の手段の内の、一つ
又は幾つかの手段を意味し、本発明の上記「一部のステ
ップ(又は、工程、動作、作用等)」とは、それらの複
数のステップの内の、一つ又は幾つかのステップを意味
する。
The "partial means (or device, element, etc.)" of the present invention means one or some of the plural means, and the above-mentioned The "partial step (or process, operation, action, etc.)" means one or some of the plurality of steps.

【0113】又、本発明の上記「手段(又は、装置、素
子等)の機能」とは、前記手段の全部又は一部の機能を
意味し、本発明の上記「ステップ(又は、工程、動作、
作用等)の動作」とは、前記ステップの全部又は一部の
動作を意味する。
The "function of the means (or device, element, etc.)" of the present invention means all or a part of the function of the above means, and the "step (or process, operation) of the present invention". ,
"Operation or the like" means an operation of all or a part of the steps.

【0114】又、本発明のプログラムの一利用形態は、
コンピュータにより読み取り可能な記録媒体に記録さ
れ、コンピュータと協働して動作する態様であっても良
い。
Further, one usage form of the program of the present invention is:
It may be recorded in a computer-readable recording medium and operate in cooperation with the computer.

【0115】又、本発明のプログラムの一利用形態は、
伝送媒体中を伝送し、コンピュータにより読みとられ、
コンピュータと協働して動作する態様であっても良い。
Further, one usage form of the program of the present invention is as follows:
Transmitted through a transmission medium, read by a computer,
It may be a mode of operating in cooperation with a computer.

【0116】又、本発明のデータ構造としては、データ
ベース、データフォーマット、データテーブル、データ
リスト、データの種類などを含む。
Further, the data structure of the present invention includes a database, a data format, a data table, a data list, a data type and the like.

【0117】又、記録媒体としては、ROM等が含ま
れ、伝送媒体としては、インターネット等の伝送媒体、
光・電波・音波等が含まれる。
Further, the recording medium includes a ROM and the like, and the transmission medium includes the transmission medium such as the Internet,
Light, radio waves, sound waves, etc. are included.

【0118】又、上述した本発明のコンピュータは、C
PU等の純然たるハードウェアに限らず、ファームウェ
アや、OS、更に周辺機器を含むものであっても良い。
The computer of the present invention described above is a C
The hardware is not limited to pure hardware such as PU, but may include firmware, OS, and peripheral devices.

【0119】尚、以上説明した様に、本発明の構成は、
ソフトウェア的に実現しても良いし、ハードウェア的に
実現しても良い。
As described above, the structure of the present invention is
It may be realized by software or hardware.

【0120】[0120]

【発明の効果】以上説明したところから明らかなよう
に、本発明は、動きの大きな画像であっても適正な動き
ベクトルを検出することが出来、また、適正な動きベク
トル検出範囲を設定することが出来る動画像圧縮符号化
装置、動きベクトル検出方法、記録媒体、及びプログラ
ムを提供することが出来る。
As is apparent from the above description, according to the present invention, it is possible to detect a proper motion vector even in an image having a large motion, and to set a proper motion vector detection range. It is possible to provide a moving picture compression encoding device, a motion vector detecting method, a recording medium, and a program capable of performing the above.

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

【図1】本発明の第1の実施の形態における動画像圧縮
符号化装置のブロック図
FIG. 1 is a block diagram of a moving image compression encoding apparatus according to a first embodiment of the present invention.

【図2】本発明の第1の実施の形態におけるマクロブロ
ックの動きベクトルの一例を示す図
FIG. 2 is a diagram showing an example of a motion vector of a macroblock according to the first embodiment of the present invention.

【図3】本発明の第1の実施の形態における動きベクト
ルと動きベクトル切換領域との一例を示す図
FIG. 3 is a diagram showing an example of motion vectors and motion vector switching regions according to the first embodiment of the present invention.

【図4】(a)本発明の第1の実施の形態における動き
ベクトル検出範囲の候補を示す図 (b)本発明の第1の実施の形態における動きベクトル
検出範囲を示す図
FIG. 4A is a diagram showing motion vector detection range candidates in the first embodiment of the invention, and FIG. 4B is a diagram showing motion vector detection ranges in the first embodiment of the invention.

【図5】(a)本発明の第1の実施の形態における現在
の動きベクトル検出範囲の例を示す図 (b)本発明の第1の実施の形態における更新後の動き
ベクトル検出範囲の例を示す図
FIG. 5A is a diagram showing an example of a current motion vector detection range according to the first embodiment of the present invention. FIG. 5B is an example of an updated motion vector detection range according to the first embodiment of the present invention. Showing

【図6】(a)本発明の第1の実施の形態における現在
の動きベクトル検出範囲の例を示す図 (b)本発明の第1の実施の形態における更新後の動き
ベクトル検出範囲の例を示す図
FIG. 6A is a diagram showing an example of a current motion vector detection range in the first embodiment of the present invention. FIG. 6B is an example of an updated motion vector detection range in the first embodiment of the present invention. Showing

【図7】本発明の第1の実施の形態における動きベクト
ル検出範囲の更新のタイミングを示す図
FIG. 7 is a diagram showing a timing of updating a motion vector detection range according to the first embodiment of the present invention.

【図8】(a)本発明の第1の実施の形態における動き
ベクトル検出範囲が大きい場合の動きベクトルを検出す
る際の画素のサンプリングの概要を示す図 (b)本発明の第1の実施の形態における動きベクトル
検出範囲が中程度の場合の動きベクトルを検出する際の
画素のサンプリングの概要を示す図 (c)本発明の第1の実施の形態における動きベクトル
検出範囲が小さい場合の動きベクトルを検出する際の画
素のサンプリングの概要を示す図
FIG. 8A is a diagram showing an outline of pixel sampling when detecting a motion vector when the motion vector detection range is large according to the first embodiment of the present invention; and FIG. 8B is a first embodiment of the present invention. FIG. 6C is a diagram showing an outline of pixel sampling when detecting a motion vector in the case where the motion vector detection range in the first embodiment is medium (c) Motion in the case where the motion vector detection range is small in the first embodiment of the present invention Diagram showing the outline of pixel sampling when detecting a vector

【図9】本発明の第1の実施の形態における動きベクト
ル切換領域決定の流れ図
FIG. 9 is a flowchart for determining a motion vector switching area according to the first embodiment of the present invention.

【図10】従来の動きベクトル検出装置の構成を示すブ
ロック図
FIG. 10 is a block diagram showing a configuration of a conventional motion vector detection device.

【図11】従来の動画像圧縮符号化装置の構成を示すブ
ロック図
FIG. 11 is a block diagram showing a configuration of a conventional moving image compression encoding apparatus.

【図12】従来の動画像圧縮符号化装置を構成する動き
検出装置307Aの動作を示す説明図
FIG. 12 is an explanatory diagram showing an operation of a motion detection device 307A which constitutes a conventional moving image compression encoding device.

【図13】従来の動画像圧縮符号化装置を構成するCP
U5の処理動作を示すフローチャート図
FIG. 13 is a CP constituting a conventional moving image compression encoding device.
Flowchart diagram showing the processing operation of U5

【図14】従来の動画像圧縮符号化装置の動きベクトル
検出範囲と動きベクトルの一例を示す図
FIG. 14 is a diagram showing an example of a motion vector detection range and a motion vector of a conventional moving image compression encoding apparatus.

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

1 入力端子 2 フレーム並べ替え器 3 DCT器 4 量子化器 5 可変長符号化器 6 バッファメモリ 7 出力端子 8 レート制御器 9 逆量子化器 10 逆DCT器 11 フレームメモリ 12 予測器 13 動きベクトル検出範囲決定器 14 切換領域決定器 15 比較器 16 カウンター 17 減算器 18 切替スイッチ 19 加算器 20 スイッチ 21 動きベクトル検出手段 1 input terminal 2 frame sorter 3 DCT device 4 Quantizer 5 Variable length encoder 6 buffer memory 7 output terminals 8 rate controller 9 Inverse quantizer 10 Inverse DCT device 11 frame memory 12 Predictor 13 Motion vector detection range determiner 14 Switching area determiner 15 Comparator 16 counter 17 Subtractor 18 Changeover switch 19 adder 20 switches 21 motion vector detecting means

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5C059 KK19 MA00 MA23 MC11 ME01 NN01 NN03 NN28 PP06 SS20 UA02 UA33 UA39    ─────────────────────────────────────────────────── ─── Continued front page    F term (reference) 5C059 KK19 MA00 MA23 MC11 ME01                       NN01 NN03 NN28 PP06 SS20                       UA02 UA33 UA39

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 入力動画像映像を1フレームに付きN
(但し、Nは2以上の自然数)個に細分化したマクロブ
ロック動画像信号を生成するマクロブロック生成手段
と、 前記マクロブロック動画像信号を圧縮符号化した後に復
号化して復号化動画像信号を生成する符号復号化手段
と、 前記復号化動画像信号と前記マクロブロック動画像信号
とから第1の動きベクトル検出範囲内で動きベクトルを
検出する動きベクトル検出手段と、 検出された前記動きベクトルのうち、前記第1の動きベ
クトル検出範囲の最外線である第1の最外線と、前記第
1の動きベクトル検出範囲の内側にある第2の動きベク
トル検出範囲の最外線である第2の最外線との間にある
動きベクトルの数を第1の動きベクトルの数としてカウ
ントする動きベクトルカウント手段と、 カウントされた前記第1の動きベクトルの数に基づいて
前記第1の動きベクトル検出範囲を拡大する動きベクト
ル検出範囲決定手段とを備えた動画像圧縮符号化装置。
1. An input moving image video is provided in N frames per frame.
(Where N is a natural number of 2 or more), a macroblock generating unit that generates a macroblock moving image signal that has been subdivided into a plurality of pieces; A code decoding means for generating; a motion vector detecting means for detecting a motion vector within a first motion vector detection range from the decoded moving image signal and the macroblock moving image signal; Among them, a first outermost line which is the outermost line of the first motion vector detection range and a second outermost line which is the outermost line of the second motion vector detection range inside the first motion vector detection range. A motion vector counting means for counting the number of motion vectors existing between the outside line and the first motion vector, and the counted number of the first motion vectors. And a motion vector detection range determining means for expanding the first motion vector detection range on the basis of the first motion vector detection range.
【請求項2】 前記動きベクトルカウント手段は、前記
第2の動きベクトル検出範囲の内側にある第3の動きベ
クトル検出範囲内にある動きベクトルの数を第2の動き
ベクトルの数としてカウントし、 前記動きベクトル検出範囲決定手段は、カウントされた
前記第2の動きベクトルの数に基づいて前記第1の動き
ベクトル検出範囲を縮小する請求項1記載の動画像圧縮
符号化装置。
2. The motion vector counting means counts the number of motion vectors within a third motion vector detection range inside the second motion vector detection range as the number of second motion vectors, 2. The moving picture compression coding apparatus according to claim 1, wherein the motion vector detection range determining means reduces the first motion vector detection range based on the counted number of the second motion vectors.
【請求項3】 前記動きベクトル検出範囲決定手段は、
カウントされた前記第1の動きベクトルの数が所定の閾
値より多い場合、前記第1の動きベクトル検出範囲を拡
大し、前記所定の閾値より小さい場合、前記第1の動き
ベクトル検出範囲を拡大しないまたは前記第1の動きベ
クトル検出範囲を変更しない請求項1記載の動画像圧縮
符号化装置。
3. The motion vector detection range determination means,
If the number of counted first motion vectors is larger than a predetermined threshold value, the first motion vector detection range is expanded, and if it is smaller than the predetermined threshold value, the first motion vector detection range is not expanded. The moving picture compression coding apparatus according to claim 1, wherein the first motion vector detection range is not changed.
【請求項4】 前記動きベクトル検出範囲決定手段は、
カウントされた前記第1の動きベクトルの数が多いほど
前記第1の動きベクトル検出範囲の拡大率を大きくする
請求項1記載の動画像圧縮符号化装置。
4. The motion vector detection range determination means,
The moving image compression encoding apparatus according to claim 1, wherein the larger the number of counted first motion vectors is, the larger the expansion rate of the first motion vector detection range is.
【請求項5】 前記動きベクトル検出範囲決定手段は、
カウントされた前記第2の動きベクトルの数が多いほど
前記第1の動きベクトル検出範囲の縮小率を大きくする
請求項2記載の動画像圧縮符号化装置。
5. The motion vector detection range determining means is
The moving picture compression encoding apparatus according to claim 2, wherein the reduction ratio of the first motion vector detection range is increased as the number of counted second motion vectors increases.
【請求項6】 前記動きベクトル検出範囲決定手段は、
予め複数種類の動きベクトル検出範囲を有しており、 その複数種類の動きベクトル検出範囲から、カウントさ
れた前記第1の動きベクトルの数が多いほど大きな動き
ベクトル検出範囲を選択して、前記第1の動きベクトル
検出範囲とする請求項1記載の動画像圧縮符号化装置。
6. The motion vector detection range determination means,
It has a plurality of types of motion vector detection ranges in advance, and a larger motion vector detection range is selected from the plurality of types of motion vector detection ranges as the number of counted first motion vectors increases, The moving picture compression coding apparatus according to claim 1, wherein the motion vector detection range is 1.
【請求項7】 前記動きベクトル検出範囲決定手段は、
予め複数種類の動きベクトル検出範囲を有しており、 その複数種類の動きベクトル検出範囲から、カウントさ
れた前記第2の動きベクトルの数が多いほど小さな動き
ベクトル検出範囲を選択して、前記第1の動きベクトル
検出範囲とする請求項2記載の動画像圧縮符号化装置。
7. The motion vector detection range determining means is
It has a plurality of types of motion vector detection ranges in advance, and a smaller motion vector detection range is selected from the plurality of types of motion vector detection ranges as the number of counted second motion vectors increases, and 3. The moving picture compression coding apparatus according to claim 2, wherein the motion vector detection range is 1.
【請求項8】 前記動きベクトル検出範囲決定手段は、
前記第1の動きベクトル検出範囲の更新を、Pフレーム
毎に行う、またはPフレームをn個(但し、n≦Nの自
然数)に分割した分割単位毎に行い、 前記第1の動きベクトル検出範囲が更新される際、前記
動きベクトル検出範囲決定手段は、前記Pフレームのま
たは前記分割単位のカウントされた前記第1の動きベク
トルの数を、前記Pフレームにまたは前記分割単位に存
在するマクロブロック動画像信号の数で割った数が、所
定の閾値以上になった場合に、前記第1の動きベクトル
検出範囲を拡大する請求項1記載の動画像圧縮符号化装
置。
8. The motion vector detection range determination means,
The first motion vector detection range is updated for each P frame, or for each division unit obtained by dividing the P frame into n (where n ≦ N is a natural number), Is updated, the motion vector detection range determining means determines the number of the counted first motion vectors of the P frame or of the division unit as a macroblock existing in the P frame or in the division unit. The moving image compression encoding apparatus according to claim 1, wherein the first motion vector detection range is expanded when a number divided by the number of moving image signals is equal to or larger than a predetermined threshold value.
【請求項9】 前記動きベクトル検出範囲決定手段は、
前記第1の動きベクトル検出範囲の更新を、Pフレーム
毎に行う、またはPフレームをn個(但し、n≦Nの自
然数)に分割した分割単位毎に行い、 前記第1の動きベクトル検出範囲が更新される際、前記
動きベクトル検出範囲決定手段は、前記Pフレームのま
たは前記分割単位のカウントされた前記第2の動きベク
トルの数を、前記Pフレームにまたは前記分割単位に存
在するマクロブロック動画像信号の数で割った数が、所
定の閾値以上になった場合に、前記第1の動きベクトル
検出範囲を縮小する請求項1記載の動画像圧縮符号化装
置。
9. The motion vector detection range determination means,
The first motion vector detection range is updated for each P frame, or for each division unit obtained by dividing the P frame into n (where n ≦ N is a natural number), Is updated, the motion vector detection range determining means determines the number of the counted second motion vectors of the P frame or of the division unit as a macroblock existing in the P frame or in the division unit. The moving picture compression coding apparatus according to claim 1, wherein the first motion vector detection range is reduced when a number divided by the number of moving picture signals becomes equal to or larger than a predetermined threshold value.
【請求項10】 前記動きベクトル検出手段は、前記第
1の動きベクトル検出範囲を拡大する際、前記第2の動
きベクトル検出範囲をも拡大する請求項1、3、4、
6、8のいずれかに記載の動画像圧縮符号化装置。
10. The motion vector detection means, when expanding the first motion vector detection range, also expands the second motion vector detection range.
The moving image compression encoding apparatus according to any one of 6 and 8.
【請求項11】 前記動きベクトル検出手段は、前記第
1の動きベクトル検出範囲を縮小する際、前記第3の動
きベクトル検出範囲をも縮小する請求項2、4、7、9
記載の動画像圧縮符号化装置。
11. The motion vector detecting means, when reducing the first motion vector detection range, also reduces the third motion vector detection range.
The moving picture compression encoding device described.
【請求項12】 入力動画像映像を1フレームに付きN
(但し、Nは2以上の自然数)個に細分化して生成され
たマクロブロック動画像信号を圧縮符号化した後に復号
化して生成された復号化動画像信号と、前記マクロブロ
ック動画像信号とから第1の動きベクトル検出範囲内で
動きベクトルを検出する動きベクトル検出ステップと、 検出された前記動きベクトルのうち、前記第1の動きベ
クトル検出範囲の最外線である第1の最外線と、前記第
1の動きベクトル検出範囲の内側にある第2の動きベク
トル検出範囲の最外線である第2の最外線との間にある
動きベクトルの数を第1の動きベクトルの数としてカウ
ントする動きベクトルカウントステップと、 前記第1の動きベクトル検出範囲の最外線である第1の
最外線と、前記第1の動きベクトル検出範囲の内側にあ
る第2の動きベクトル検出範囲の最外線である第2の最
外線であって、前記第1の最外線に隣接する1本もしく
は複数本の第2の最外線との上にある動きベクトルの数
である第1の動きベクトルの数をカウントする動きベク
トルカウントステップと、 カウントされた前記第1の動きベクトルの数に基づいて
前記第1の動きベクトル検出範囲を拡大する動きベクト
ル検出範囲決定ステップとを備えた動きベクトル検出方
法。
12. The input moving image is N per frame.
(However, N is a natural number of 2 or more) is divided into a plurality of macroblock moving image signals, which are compressed and encoded, and then decoded to generate a decoded moving image signal and the macroblock moving image signal. A motion vector detecting step of detecting a motion vector within a first motion vector detection range; a first outermost line which is an outermost line of the first motion vector detection range among the detected motion vectors; A motion vector that counts the number of motion vectors between the second outermost line, which is the outermost line of the second motion vector detection range inside the first motion vector detection range, as the number of first motion vectors Counting step, a first outermost line which is the outermost line of the first motion vector detection range, and a second motion vector detection which is inside the first motion vector detection range A first motion, which is a second outermost line that is the outermost line of the enclosure and is the number of motion vectors on one or more second outermost lines adjacent to the first outermost line Motion vector detection including a motion vector counting step of counting the number of vectors, and a motion vector detection range determining step of expanding the first motion vector detection range based on the counted number of the first motion vectors. Method.
【請求項13】 請求項12記載の動きベクトル検出方
法の、入力動画像映像を1フレームに付きN(但し、N
は2以上の自然数)個に細分化して生成されたマクロブ
ロック動画像信号を圧縮符号化した後に復号化して生成
された復号化動画像信号と、前記マクロブロック動画像
信号とから第1の動きベクトル検出範囲内で動きベクト
ルを検出する動きベクトル検出ステップと、 検出された前記動きベクトルのうち、前記第1の動きベ
クトル検出範囲の最外線である第1の最外線と、前記第
1の動きベクトル検出範囲の内側にある第2の動きベク
トル検出範囲の最外線である第2の最外線との間にある
動きベクトルの数を第1の動きベクトルの数としてカウ
ントする動きベクトルカウントステップと、 カウントされた前記第1の動きベクトルの数に基づいて
前記第1の動きベクトル検出範囲を拡大する動きベクト
ル検出範囲決定ステップとをコンピュータに実行させる
ためのプログラム。
13. The motion vector detecting method according to claim 12, wherein N (where N
Is a natural number of 2 or more) and the first motion is generated from the decoded moving image signal generated by compressing and encoding the macroblock moving image signal generated by compression and the macroblock moving image signal. A motion vector detecting step of detecting a motion vector within a vector detection range; a first outermost line which is an outermost line of the first motion vector detection range among the detected motion vectors; and a first motion A motion vector counting step of counting, as the number of first motion vectors, the number of motion vectors between the second outermost line which is the outermost line of the second motion vector detection range inside the vector detection range; A motion vector detection range determining step of expanding the first motion vector detection range based on the counted number of the first motion vectors. Program to be executed by the data.
【請求項14】 請求項13記載のプログラムを担持し
た記録媒体であって、コンピュータにより処理可能な記
録媒体。
14. A recording medium carrying the program according to claim 13, which can be processed by a computer.
JP2002373296A 2001-12-25 2002-12-24 Moving picture compression coding apparatus and motion vector detection method Expired - Fee Related JP4034180B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002373296A JP4034180B2 (en) 2001-12-25 2002-12-24 Moving picture compression coding apparatus and motion vector detection method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001-391441 2001-12-25
JP2001391441 2001-12-25
JP2002373296A JP4034180B2 (en) 2001-12-25 2002-12-24 Moving picture compression coding apparatus and motion vector detection method

Publications (2)

Publication Number Publication Date
JP2003259373A true JP2003259373A (en) 2003-09-12
JP4034180B2 JP4034180B2 (en) 2008-01-16

Family

ID=28677055

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002373296A Expired - Fee Related JP4034180B2 (en) 2001-12-25 2002-12-24 Moving picture compression coding apparatus and motion vector detection method

Country Status (1)

Country Link
JP (1) JP4034180B2 (en)

Also Published As

Publication number Publication date
JP4034180B2 (en) 2008-01-16

Similar Documents

Publication Publication Date Title
CN110809887B (en) Method and apparatus for motion vector modification for multi-reference prediction
KR100803611B1 (en) Method and apparatus for encoding video, method and apparatus for decoding video
EP1675403B1 (en) Moving-picture compression encoding method, apparatus and program
JP5081305B2 (en) Method and apparatus for interframe predictive coding
US7444026B2 (en) Image processing apparatus and method of motion vector detection in a moving picture, and recording medium used therewith
JP2004336369A (en) Moving image encoder, moving image decoder, moving image encoding method, moving image decoding method, moving image encoding program and moving image decoding program
US9516320B2 (en) Method of generating image data
JP2004048552A (en) Image encoder, image encoding method, image decoder, image decoding method and communication equipment
KR20110008653A (en) Method and apparatus for predicting motion vector and method and apparatus of encoding/decoding a picture using the same
KR100560843B1 (en) Method and Apparatus for Determining Search Range for Adaptive Motion Vector for Use in Video Encoder
JP2005176073A (en) Device, method, and program for motion picture coding
JP3866624B2 (en) Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus
JP2013115583A (en) Moving image encoder, control method of the same, and program
KR100632072B1 (en) Moving picture compression/coding apparatus and motion vector detection method
JP2002051341A (en) Moving picture coding apparatus and apparatus of detecting special effect scene in the moving picture
JP3674535B2 (en) Video coding method and apparatus
JP2001128179A (en) Device and method for encoding moving picture
JPH0846969A (en) System for encoding video signal
JP4034180B2 (en) Moving picture compression coding apparatus and motion vector detection method
JP5322956B2 (en) Image coding apparatus and image coding method
JP5171658B2 (en) Image encoding device
JP2000308066A (en) Device and method for encoding moving picture
KR100635009B1 (en) Mothod and apparatus for motion estimation considering total moving of image
JP4561701B2 (en) Video encoding device
JPH0799645A (en) Motion vector detecting circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051209

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070912

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20071002

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071024

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

Free format text: PAYMENT UNTIL: 20101102

Year of fee payment: 3

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees