JP2009284058A - Moving image encoding device - Google Patents

Moving image encoding device Download PDF

Info

Publication number
JP2009284058A
JP2009284058A JP2008131835A JP2008131835A JP2009284058A JP 2009284058 A JP2009284058 A JP 2009284058A JP 2008131835 A JP2008131835 A JP 2008131835A JP 2008131835 A JP2008131835 A JP 2008131835A JP 2009284058 A JP2009284058 A JP 2009284058A
Authority
JP
Japan
Prior art keywords
motion vector
image signal
search range
motion
prediction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008131835A
Other languages
Japanese (ja)
Inventor
Yusuke Itani
裕介 伊谷
Yuichi Izuhara
優一 出原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2008131835A priority Critical patent/JP2009284058A/en
Publication of JP2009284058A publication Critical patent/JP2009284058A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a moving image encoding device that determines the search range of a motion vector and searches for the motion vector without performing many arithmetic operations. <P>SOLUTION: The moving image encoding device includes a motion prediction unit 9 which evaluates the level ¾PMV¾ of a prediction vector calculated when encoded data are generated by a variable-length encoding unit 4 to determine the search range of the motion vector MV, and collates an input image signal with a reference image signal stored in a frame memory 8 to search for the suitable motion vector MV from the search range, and a motion compensation unit 10 uses the motion vector MV searched by the motion prediction unit 9 to generate a prediction image signal from the reference image signal stored in the frame memory 8. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

この発明は、画像信号を符号化する際、時間方向の冗長度を削減する動き補償フレーム間予測に必要な動きベクトルを検出する機能を有する動画像符号化装置に関するものである。   The present invention relates to a moving picture coding apparatus having a function of detecting a motion vector necessary for motion compensated interframe prediction for reducing temporal redundancy when coding a picture signal.

例えば、「MPEG」や「ITU−T H.26x」などの国際標準映像符号化方式では、画像信号の各フレームについて、輝度信号16×16画素と、それに対応する色差信号8×8画素とをまとめたブロックデータ(以下、マクロブロック)を一単位として、動き補償処理や直交変換/変換係数量子化処理を実施することにより、圧縮する方法が採用されている。
動き補償処理に用いる動きベクトルを検出するに際して、符号化対象の入力画像信号と参照画像信号を16×16画素からなるブロック単位でマッチングをとるブロックマッチング手法が主に用いられている。
For example, in an international standard video encoding method such as “MPEG” or “ITU-T H.26x”, a luminance signal of 16 × 16 pixels and a corresponding color difference signal of 8 × 8 pixels are provided for each frame of an image signal. A method of compressing by performing motion compensation processing and orthogonal transform / transform coefficient quantization processing using the combined block data (hereinafter referred to as macroblock) as a unit is adopted.
When detecting a motion vector used for the motion compensation process, a block matching method is mainly used in which an input image signal to be encoded and a reference image signal are matched in units of 16 × 16 pixels.

映像符号化方式では、この動きベクトルを探索する動き予測処理に必要な演算量が一般的に、その他の処理と比較して多くなる。
理想的には、画像中のすべての領域において、ブロック内のすべての画素に対して探索すればよいが、このような方法では演算量が膨大である。そのため、性能を維持しつつも演算量を削減する技術が提案されている。
例えば、以下の特許文献1では、過去の画像の符号化の際に得られた動きベクトル情報を保持し、現在、符号化中の画像と同じ位置にあるマクロブロックで得られた動きベクトルの分散を求めることで、動きベクトルの探索範囲を推定するようにしている。
これにより、動きベクトルの探索範囲が限定されるため、動き予測処理の処理量が削減される。
In the video encoding method, the amount of calculation required for the motion prediction process for searching for a motion vector is generally larger than that for other processes.
Ideally, the search should be performed for all the pixels in the block in all the regions in the image, but such a method requires a large amount of computation. Therefore, a technique for reducing the amount of calculation while maintaining performance has been proposed.
For example, in Patent Document 1 below, motion vector information obtained at the time of encoding a past image is held, and a motion vector obtained by a macroblock located at the same position as the currently encoded image is distributed. Thus, the motion vector search range is estimated.
Thereby, since the search range of the motion vector is limited, the processing amount of the motion prediction process is reduced.

特開平11−308617号公報(段落番号[0015]から[0016]、図2)JP-A-11-308617 (paragraph numbers [0015] to [0016], FIG. 2)

従来の動画像符号化装置は以上のように構成されているので、動きベクトルの探索範囲が限定されて、動き予測処理の処理量が削減される。しかし、動きベクトルの探索範囲を推定する際、多くのメモリを用意して、多くの演算を実施する必要があるなどの課題があった(例えば、DSPのようなプロセッサを用いて、ソフトウェア処理によって符号化処理を行う場合、使用可能なメモリ量や単位時間当りの演算量に限りがあるため、メモリ量や演算量を極力減らす必要がある)。   Since the conventional moving image encoding apparatus is configured as described above, the search range of motion vectors is limited, and the amount of motion prediction processing is reduced. However, when estimating the search range of the motion vector, there is a problem that it is necessary to prepare many memories and perform many operations (for example, by using a processor such as a DSP and performing software processing) When performing the encoding process, there is a limit to the amount of memory that can be used and the amount of calculation per unit time, so it is necessary to reduce the amount of memory and the amount of calculation as much as possible.

この発明は上記のような課題を解決するためになされたもので、多くの演算を実施することなく、動きベクトルの探索範囲の決定や動きベクトルの探索を行うことができる動画像符号化装置を得ることを目的とする。   The present invention has been made in order to solve the above-described problems, and provides a moving image encoding apparatus capable of determining a search range of a motion vector and searching for a motion vector without performing many operations. The purpose is to obtain.

この発明に係る動画像符号化装置は、符号化データ生成手段により符号化データが生成される際に算出される予測ベクトルの大きさを評価して動きベクトルの探索範囲を決定し、入力画像信号と参照画像信号生成手段により生成された参照画像信号を照合して、その探索範囲から適正な動きベクトルを探索する動きベクトル探索手段を設け、動き補償手段が動きベクトル探索手段により探索された動きベクトルを用いて、参照画像信号生成手段により生成された参照画像信号から予測画像信号を生成するようにしたものである。   The moving image encoding apparatus according to the present invention evaluates the size of a prediction vector calculated when encoded data is generated by the encoded data generation means, determines a motion vector search range, and inputs an input image signal Motion vector search means for searching for an appropriate motion vector from the search range by comparing the reference image signal generated by the reference image signal generation means and the motion vector search means by the motion vector search means Is used to generate the predicted image signal from the reference image signal generated by the reference image signal generation means.

この発明によれば、符号化データ生成手段により符号化データが生成される際に算出される予測ベクトルの大きさを評価して動きベクトルの探索範囲を決定し、入力画像信号と参照画像信号生成手段により生成された参照画像信号を照合して、その探索範囲から適正な動きベクトルを探索する動きベクトル探索手段を設け、動き補償手段が動きベクトル探索手段により探索された動きベクトルを用いて、参照画像信号生成手段により生成された参照画像信号から予測画像信号を生成するように構成したので、多くの演算を実施することなく、動きベクトルの探索範囲の決定や動きベクトルの探索を行うことができるようになり、その結果、符号化画質の劣化を招くことなく、効率的に動きベクトルを探索することができる効果がある。   According to the present invention, the motion vector search range is determined by evaluating the size of the prediction vector calculated when the encoded data is generated by the encoded data generation means, and the input image signal and the reference image signal are generated. A motion vector search means for collating the reference image signal generated by the means and searching for an appropriate motion vector from the search range is provided, and the motion compensation means refers to the motion vector searched by the motion vector search means. Since the prediction image signal is generated from the reference image signal generated by the image signal generation means, the motion vector search range can be determined and the motion vector can be searched without performing many operations. As a result, there is an effect that the motion vector can be efficiently searched without causing deterioration of the encoded image quality.

実施の形態1.
図1はこの発明の実施の形態1による動画像符号化装置を示す構成図であり、図において、差分器1はフレーム信号である入力画像信号と動き補償部10から出力されたフレーム信号である予測画像信号の差分を求め、その差分の信号である予測残差信号をマクロブロック単位に分割してDCT変換部2に出力する。なお、差分器1は画像信号差分手段を構成している。
Embodiment 1 FIG.
FIG. 1 is a block diagram showing a moving picture coding apparatus according to Embodiment 1 of the present invention. In the figure, a differentiator 1 is an input picture signal which is a frame signal and a frame signal output from the motion compensation unit 10. The difference between the prediction image signals is obtained, and the prediction residual signal, which is the difference signal, is divided into macroblock units and output to the DCT conversion unit 2. The differentiator 1 constitutes an image signal difference means.

DCT変換部2は差分器1から出力されたマクロブロック単位の予測残差信号を離散コサイン変換する。
量子化部3はDCT変換部2により離散コサイン変換された予測残差信号を量子化する処理を実施する。
なお、DCT変換部2及び量子化部3から量子化手段が構成されている。
The DCT transform unit 2 performs a discrete cosine transform on the prediction residual signal in units of macroblocks output from the differentiator 1.
The quantization unit 3 performs a process of quantizing the prediction residual signal subjected to the discrete cosine transform by the DCT transform unit 2.
The DCT conversion unit 2 and the quantization unit 3 constitute a quantization means.

可変長符号化部4は量子化部3により量子化された予測残差信号を可変長符号化して符号化データを生成するとともに、動き予測部9から出力された動きベクトルを符号化し、その符号化データと符号化後の動きベクトルを出力する処理を実施する。なお、可変長符号化部4は符号化データ生成手段を構成している。   The variable length encoding unit 4 generates encoded data by variable length encoding the prediction residual signal quantized by the quantization unit 3, encodes the motion vector output from the motion prediction unit 9, A process for outputting the encoded data and the encoded motion vector is performed. The variable length encoding unit 4 constitutes encoded data generating means.

逆量子化部5は量子化部3により量子化された予測残差信号を逆量子化する処理を実施する。
逆DCT変換部6は逆量子化部5により逆量子化された予測残差信号を逆離散コサイン変換する。
加算器7は逆DCT変換部6により逆離散コサイン変換された予測残差信号と動き補償部10から出力された予測画像信号を加算して参照画像信号を生成する処理を実施する。
フレームメモリ8は加算器7により生成された参照画像信号を格納するメモリである。
なお、逆量子化部5、逆DCT変換部6、加算器7及びフレームメモリ8から参照画像信号生成手段が構成されている。
The inverse quantization unit 5 performs a process of inversely quantizing the prediction residual signal quantized by the quantization unit 3.
The inverse DCT transformer 6 performs inverse discrete cosine transform on the prediction residual signal inversely quantized by the inverse quantizer 5.
The adder 7 performs a process of generating a reference image signal by adding the prediction residual signal subjected to inverse discrete cosine transform by the inverse DCT transform unit 6 and the predicted image signal output from the motion compensation unit 10.
The frame memory 8 is a memory for storing the reference image signal generated by the adder 7.
The inverse quantization unit 5, the inverse DCT conversion unit 6, the adder 7, and the frame memory 8 constitute reference image signal generation means.

動き予測部9は可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさを評価して動きベクトルの探索範囲を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルを探索する処理を実施する。なお、動き予測部9は動きベクトル探索手段を構成している。
動き補償部10は動き予測部9により探索された動きベクトルを用いて、フレームメモリ8に格納された参照画像信号から予測画像信号を生成し、その予測画像信号を差分器1及び加算器7に出力する処理を実施する。なお、動き補償部10は動き補償手段を構成している。
The motion prediction unit 9 evaluates the size of the prediction vector calculated when the encoded data is generated by the variable length encoding unit 4 to determine the search range of the motion vector, and stores the motion vector in the input image signal and the frame memory 8. The stored reference image signal is collated, and a process for searching for an appropriate motion vector from the search range is performed. Note that the motion prediction unit 9 constitutes a motion vector search means.
The motion compensation unit 10 generates a predicted image signal from the reference image signal stored in the frame memory 8 using the motion vector searched by the motion prediction unit 9, and sends the predicted image signal to the differencer 1 and the adder 7. Perform the output process. The motion compensation unit 10 constitutes motion compensation means.

図2はこの発明の実施の形態1による動画像符号化装置の動き予測部9を示す構成図であり、図において、探索範囲決定部11は可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさが閾値δより大きい場合、動きベクトルの探索範囲を広範囲に決定し、その予測ベクトルの大きさが閾値δより小さい場合、動きベクトルの探索範囲を上記広範囲より狭い狭範囲に決定する処理を実施する。
動き探索部12は入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、探索範囲決定部11により決定された探索範囲から適正な動きベクトルを探索する処理を実施する。
FIG. 2 is a block diagram showing the motion prediction unit 9 of the moving picture encoding apparatus according to Embodiment 1 of the present invention. In the figure, the search range determination unit 11 generates encoded data by the variable length encoding unit 4. The motion vector search range is determined to be a wide range when the predicted vector size calculated is larger than the threshold δ, and the motion vector search range is set to the wide range when the predicted vector size is smaller than the threshold δ. A process for determining a narrower narrow range is performed.
The motion search unit 12 collates the input image signal with the reference image signal stored in the frame memory 8 and performs a process of searching for an appropriate motion vector from the search range determined by the search range determination unit 11.

次に動作について説明する。
差分器1は、フレーム信号である入力画像信号を入力し、後述する動き補償部10からフレーム信号である予測画像信号を入力すると、その入力画像信号と予測画像信号の差分を求め、その差分の信号である予測残差信号をマクロブロック単位に分割してDCT変換部2に出力する。
Next, the operation will be described.
The differentiator 1 receives an input image signal that is a frame signal, and receives a predicted image signal that is a frame signal from a motion compensation unit 10 to be described later, obtains a difference between the input image signal and the predicted image signal, The prediction residual signal, which is a signal, is divided into macroblock units and output to the DCT transform unit 2.

DCT変換部2は、差分器1からマクロブロック単位の予測残差信号を受けると、その予測残差信号を離散コサイン変換し、離散コサイン変換後の予測残差信号を量子化部3に出力する。
量子化部3は、DCT変換部2から離散コサイン変換後の予測残差信号を受けると、その予測残差信号を量子化し、量子化後の予測残差信号を可変長符号化部4及び逆量子化部5に出力する。
When the DCT transform unit 2 receives the prediction residual signal in units of macroblocks from the differentiator 1, the DCT transform unit 2 performs discrete cosine transform on the prediction residual signal and outputs the prediction residual signal after the discrete cosine transform to the quantization unit 3. .
When the quantization unit 3 receives the prediction residual signal after the discrete cosine transform from the DCT conversion unit 2, the quantization unit 3 quantizes the prediction residual signal and converts the quantized prediction residual signal into the variable length encoding unit 4 and the inverse. It outputs to the quantization part 5.

可変長符号化部4は、量子化部3から量子化後の予測残差信号を受けると、その予測残差信号の各マクロブロックを可変長符号化して符号化データを生成し、各マクロブロックの符号化データを出力する。
また、可変長符号化部4は、後述する動き予測部9により探索された動きベクトルMVを符号化し、符号化後の動きベクトルMVを出力する。
When the variable length coding unit 4 receives the quantized prediction residual signal from the quantization unit 3, the variable length coding unit 4 performs variable length coding on each macroblock of the prediction residual signal, and generates coded data. The encoded data is output.
The variable length encoding unit 4 encodes a motion vector MV searched for by a motion prediction unit 9 described later, and outputs the encoded motion vector MV.

なお、可変長符号化部4は、マクロブロックの符号化データを生成する際に、当該マクロブロックの予測ベクトルPMVを算出する。
以下、予測ベクトルPMVの算出方法を説明する。
ここでは、ISO/IEC14496−2(通称、MPEG−4ビジュアル符号化方式)で決められている方法を例にして説明する。
Note that the variable length coding unit 4 calculates the prediction vector PMV of the macroblock when generating the coded data of the macroblock.
Hereinafter, a method for calculating the prediction vector PMV will be described.
Here, a method determined by ISO / IEC 14496-2 (commonly known as MPEG-4 visual encoding system) will be described as an example.

例えば、予測ベクトルPMVを算出する対象のマクロブロックが図3に示すようなカレントマクロブロック(current MB)である場合、そのカレントマクロブロックの左横、上、右上にそれぞれ位置している符号化済のマクロブロックA,B,Cの動きベクトルMVa,MVb,MVcを用いて、そのカレントマクロブロックの予測ベクトルPMVを算出する。
即ち、符号化済のマクロブロックA,B,Cの動きベクトルMVa,MVb,MVcを下記の式(1)に代入して、動きベクトルMVa,MVb,MVcのメディアン(中央値)を求めることにより、予測ベクトルPMVを算出する。
PMV=median(MVa,MVb,MVc) (1)
For example, if the target macroblock for which the prediction vector PMV is calculated is a current macroblock (current MB) as shown in FIG. 3, the encoded macros located on the left side, top, and top right of the current macroblock, respectively. Using the motion vectors MV a , MV b , and MV c of the macroblocks A, B, and C, the prediction vector PMV of the current macroblock is calculated.
That is, the motion vectors MV a , MV b , and MV c of the encoded macroblocks A, B, and C are substituted into the following equation (1), and the median (center) of the motion vectors MV a , MV b , and MV c is assigned. By calculating (value), the prediction vector PMV is calculated.
PMV = median (MV a , MV b , MV c ) (1)

ここでは、MPEG−4ビジュアル符号化方式で決められている方法で、予測ベクトルPMVを算出する例を説明したが、これは一例に過ぎず、例えば、ITU−T H.264などの符号化方式で決められている方法で、予測ベクトルPMVを算出するようにしてもよい。
また、図1の例では、可変長符号化部4が予測ベクトルPMVを算出するようにしているが、可変長符号化部4以外の処理部(例えば、予測ベクトルPMVを算出する専用の処理部)が予測ベクトルPMVを算出するようにしてもよい。
なお、符号化対象のマクロブロックに隣接するマクロブロックでは、図3に示すように、動きが連続する可能性が高いため、予測ベクトルPMVを用いることで、符号化対象のマクロブロックの動きベクトルを大まかに予測することができる。
Here, an example in which the prediction vector PMV is calculated by a method determined by the MPEG-4 visual encoding method has been described, but this is only an example, for example, ITU-T H.264. The prediction vector PMV may be calculated by a method determined by an encoding method such as H.264.
In the example of FIG. 1, the variable length encoding unit 4 calculates the prediction vector PMV, but a processing unit other than the variable length encoding unit 4 (for example, a dedicated processing unit that calculates the prediction vector PMV) ) May calculate the prediction vector PMV.
Note that, as shown in FIG. 3, since there is a high possibility that the motion is continuous in the macro block adjacent to the encoding target macro block, the motion vector of the encoding target macro block is obtained by using the prediction vector PMV. Roughly predictable.

逆量子化部5は、量子化部3から量子化後の予測残差信号を受けると、その予測残差信号を逆量子化して、逆量子化後の予測残差信号を逆DCT変換部6に出力する。
逆DCT変換部6は、逆量子化部5から逆量子化後の予測残差信号を受けると、その予測残差信号を逆離散コサイン変換して、逆離散コサイン変換後の予測残差信号を加算器7に出力する。
加算器7は、逆DCT変換部6から逆離散コサイン変換後の予測残差信号を受け、後述する動き補償部10から予測画像信号を受けると、その予測残差信号と予測画像信号を加算して参照画像信号を生成し、その参照画像信号をフレームメモリ8に格納する。
When the inverse quantization unit 5 receives the quantized prediction residual signal from the quantization unit 3, the inverse quantization unit 5 performs inverse quantization on the prediction residual signal, and converts the prediction residual signal after inverse quantization to the inverse DCT transform unit 6. Output to.
When the inverse DCT transform unit 6 receives the prediction residual signal after inverse quantization from the inverse quantization unit 5, the inverse DCT transform unit 6 performs inverse discrete cosine transform on the prediction residual signal, and converts the prediction residual signal after inverse discrete cosine transform to Output to adder 7.
When the adder 7 receives the prediction residual signal after the inverse discrete cosine transform from the inverse DCT transform unit 6 and receives the prediction image signal from the motion compensation unit 10 described later, the adder 7 adds the prediction residual signal and the prediction image signal. The reference image signal is generated, and the reference image signal is stored in the frame memory 8.

動き予測部9は、可変長符号化部4が符号化データを生成する際に予測ベクトルPMVを算出すると、その予測ベクトルPMVの大きさを評価して動きベクトルMVの探索範囲を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルMVを探索する。
以下、動き予測部9の処理内容を具体的に説明する。
When the variable length encoding unit 4 calculates the prediction vector PMV when the variable length encoding unit 4 generates encoded data, the motion prediction unit 9 evaluates the size of the prediction vector PMV, determines the search range of the motion vector MV, and inputs The image signal and the reference image signal stored in the frame memory 8 are collated, and an appropriate motion vector MV is searched from the search range.
Hereinafter, the processing content of the motion estimation part 9 is demonstrated concretely.

動き予測部9の探索範囲決定部11は、可変長符号化部4が予測ベクトルPMVを算出すると、その予測ベクトルPMVの大きさ|PMV|を算出する。
予測ベクトルPMVの大きさ|PMV|を算出する方法としては、例えば、予測ベクトルPMVの水平成分の絶対値と垂直成分の絶対値を算出し、大きい方の絶対値を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
あるいは、予測ベクトルPMVの水平成分と垂直成分の二乗和を算出し、その二乗和を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
When the variable length coding unit 4 calculates the prediction vector PMV, the search range determination unit 11 of the motion prediction unit 9 calculates the magnitude | PMV | of the prediction vector PMV.
As a method of calculating the magnitude | PMV | of the prediction vector PMV, for example, the absolute value of the horizontal component and the vertical component of the prediction vector PMV are calculated, and the larger absolute value is used as the magnitude of the prediction vector PMV. A method of setting PMV | is conceivable.
Alternatively, a method is conceivable in which the sum of squares of the horizontal and vertical components of the prediction vector PMV is calculated and the sum of the squares is used as the magnitude | PMV | of the prediction vector PMV.

動き予測部9の探索範囲決定部11は、予測ベクトルPMVの大きさ|PMV|と閾値δを比較し、その予測ベクトルPMVの大きさ|PMV|が閾値δより大きい場合、動きベクトルMVの探索範囲を広範囲に決定する。
一方、その予測ベクトルPMVの大きさ|PMV|が閾値δより小さい場合、動きベクトルの探索範囲MVを狭範囲(広範囲>狭範囲)に決定する。
|PMV|≧δ → 広範囲
|PMV|<δ → 狭範囲
The search range determination unit 11 of the motion prediction unit 9 compares the magnitude | PMV | of the prediction vector PMV with a threshold δ, and if the magnitude | PMV | of the prediction vector PMV is larger than the threshold δ, the search for the motion vector MV is performed. Determine the range extensively.
On the other hand, when the magnitude | PMV | of the prediction vector PMV is smaller than the threshold δ, the motion vector search range MV is determined to be a narrow range (wide range> narrow range).
| PMV | ≧ δ → Wide range | PMV | <δ → Narrow range

一般的に、動きの大きさに応じて必要とされる探索範囲は異なり、動きが大きい場合には、広範囲な探索を必要とするが、動きが小さい場合には、狭範囲の探索で十分であり、逆に広範囲な探索を行うと、無駄な演算を行うことになる。
そのため、この実施の形態1では、探索範囲を切り替えることにより、無駄な演算を減らすことができるようにしている。
In general, the required search range differs depending on the magnitude of the motion, and if the motion is large, a wide range of search is required, but if the motion is small, a narrow range search is sufficient. On the other hand, if a wide range search is performed, useless calculation is performed.
For this reason, in the first embodiment, wasteful computation can be reduced by switching the search range.

動き予測部9の動き探索部12は、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、探索範囲決定部11により決定された探索範囲(広範囲 or 狭範囲)から適正な動きベクトルMVを探索する。
即ち、動き探索部12は、探索範囲内の複数の動きベクトル(当該マクロブロックの動きベクトルの候補)の中から任意の動きベクトルを選択し、その動きベクトルの分だけ、入力画像信号の符号化対象のマクロブロックを移動する。
そして、動き探索部12は、移動後のマクロブロックと参照画像信号を照合して、両者が似ているか否かを評価する。
評価の方法として、例えば、絶対値差分和(以下、「SAD」と略すこともある)を用いることができる。あるいは、差分二乗和を用いることができる。
The motion search unit 12 of the motion prediction unit 9 collates the input image signal with the reference image signal stored in the frame memory 8 and corrects the search range (wide range or narrow range) determined by the search range determination unit 11. Search for a motion vector MV.
That is, the motion search unit 12 selects an arbitrary motion vector from among a plurality of motion vectors within the search range (motion vector candidates of the macroblock), and encodes the input image signal by the amount of the motion vector. Move the target macroblock.
Then, the motion search unit 12 collates the moved macroblock with the reference image signal and evaluates whether or not they are similar.
As an evaluation method, for example, an absolute value difference sum (hereinafter sometimes abbreviated as “SAD”) can be used. Alternatively, the sum of squared differences can be used.

動き探索部12は、探索範囲内の全ての動きベクトルを順次選択して、その動きベクトルの分だけ、符号化対象のマクロブロックを移動し、移動後のマクロブロックと参照画像信号を照合して、両者が似ているか否かを評価する。
動き探索部12は、探索範囲内の複数の動きベクトルのうち、その評価の結果が最も高い動きベクトル(例えば、SADが一番小さい動きベクトル)を適正な動きベクトルMVとして、動き補償部10及び可変長符号化部4に出力する。
The motion search unit 12 sequentially selects all motion vectors within the search range, moves the macroblock to be encoded by the motion vector, and collates the moved macroblock with the reference image signal. Evaluate whether the two are similar.
The motion search unit 12 uses the motion vector having the highest evaluation result (for example, the motion vector having the smallest SAD) among the plurality of motion vectors in the search range as an appropriate motion vector MV, The data is output to the variable length coding unit 4.

動き補償部10は、動き予測部9が動きベクトルMVを探索すると、その動きベクトルMVを用いて、フレームメモリ8に格納された参照画像信号から予測画像信号を生成し、その予測画像信号を差分器1及び加算器7に出力する。
実際の符号化では、フレーム間予測モードだけでなく、フレーム内(イントラ)符号化モードなども考慮して最適な符号化モードが選択されるが、その点は本発明の本質から外れるため詳細な説明を省略する。
When the motion prediction unit 9 searches for the motion vector MV, the motion compensation unit 10 generates a predicted image signal from the reference image signal stored in the frame memory 8 using the motion vector MV, and calculates the difference between the predicted image signal. Output to the device 1 and the adder 7.
In actual encoding, an optimal encoding mode is selected in consideration of not only the inter-frame prediction mode but also the intra-frame (intra) encoding mode, etc., but this point is out of the essence of the present invention. Description is omitted.

以上で明らかなように、この実施の形態1によれば、可変長符号化部4により符号化データが生成される際に算出される予測ベクトルPMVの大きさ|PMV|を評価して動きベクトルMVの探索範囲を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルMVを探索する動き予測部9を設け、動き補償部10が動き予測部9により探索された動きベクトルMVを用いて、フレームメモリ8に格納された参照画像信号から予測画像信号を生成するように構成したので、多くの演算を実施することなく、動きベクトルの探索範囲の決定や動きベクトルの探索を行うことができるようになり、その結果、符号化画質の劣化を招くことなく、効率的に動きベクトルを探索することができる効果を奏する。   As apparent from the above, according to the first embodiment, the motion vector is evaluated by evaluating the magnitude | PMV | of the prediction vector PMV calculated when the encoded data is generated by the variable length encoding unit 4. A motion prediction unit 9 is provided that determines an MV search range, collates an input image signal with a reference image signal stored in the frame memory 8, and searches for an appropriate motion vector MV from the search range. Is configured to generate the predicted image signal from the reference image signal stored in the frame memory 8 using the motion vector MV searched by the motion prediction unit 9, so that the motion vector can be obtained without performing many operations. As a result, it is possible to efficiently search for a motion vector without degrading the encoded image quality. Achieve the kill effect.

即ち、動き予測部9の探索範囲決定部11が予測ベクトルPMVの動きの大きさに応じて必要とされる探索範囲を決定し、動き探索部12が必要とされる探索範囲のみを探索すればよいため、無駄な演算が減り、その結果、同等な画質を維持しながら、少ない演算量で、符号化データを作成することが可能となる。
特に、この実施の形態1では、符号化データが生成される際に必ず算出される予測ベクトルPMVを用いて、動きベクトルMVの探索範囲を切り替えるようにしているので、演算量を増やすことなく、動きベクトルMVの探索範囲を決定することが可能である。そのため、動きベクトルの探索に要する演算量を削減し、従来の符号化装置よりも少ない演算量で符号化することが可能となる。
That is, if the search range determination unit 11 of the motion prediction unit 9 determines a search range required according to the magnitude of the motion of the prediction vector PMV, and the motion search unit 12 searches only the required search range. Therefore, useless computation is reduced, and as a result, encoded data can be created with a small amount of computation while maintaining equivalent image quality.
In particular, in the first embodiment, the search range of the motion vector MV is switched by using the prediction vector PMV that is always calculated when the encoded data is generated. It is possible to determine the search range of the motion vector MV. Therefore, it is possible to reduce the amount of calculation required for the motion vector search and to encode with a smaller amount of calculation than the conventional encoding device.

なお、この実施の形態1の方法は、上記の国際標準映像符号化方式に採用されているようなフレーム内予測とフレーム間予測をマクロブロック単位に切り替える方式に適用できることは言うまでもない。
また、この方法は、MPEG−4、H.264/AVC、VC−1など、あらゆる国際標準映像符号化方式に適用できることは言うまでもない。
Needless to say, the method of Embodiment 1 can be applied to a method of switching between intra-frame prediction and inter-frame prediction in units of macroblocks as employed in the above international standard video coding method.
This method is also disclosed in MPEG-4, H.264. It goes without saying that the present invention can be applied to all international standard video encoding schemes such as H.264 / AVC and VC-1.

実施の形態2.
図4はこの発明の実施の形態2による動画像符号化装置を示す構成図であり、図において、図1と同一符号は同一または相当部分を示すので説明を省略する。
動き予測部20は可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさを評価して動きベクトルの探索範囲と動きベクトルの探索密度を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルを探索する処理を実施する。なお、動き予測部20は動きベクトル探索手段を構成している。
Embodiment 2. FIG.
4 is a block diagram showing a moving picture coding apparatus according to Embodiment 2 of the present invention. In the figure, the same reference numerals as those in FIG.
The motion prediction unit 20 evaluates the size of the prediction vector calculated when the encoded data is generated by the variable length encoding unit 4, determines the motion vector search range and the motion vector search density, and inputs the input image. The signal and the reference image signal stored in the frame memory 8 are collated, and processing for searching an appropriate motion vector from the search range is performed. Note that the motion prediction unit 20 constitutes a motion vector search means.

図5はこの発明の実施の形態2による動画像符号化装置の動き予測部20を示す構成図であり、図において、探索範囲・密度決定部21は図2の探索範囲決定部11と同様に、可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさが閾値δより大きい場合、動きベクトルの探索範囲を広範囲に決定し、その予測ベクトルの大きさが閾値δより小さい場合、動きベクトルの探索範囲を狭範囲に決定する。
ただし、探索範囲・密度決定部21は図2の探索範囲決定部11と異なり、動きベクトルの探索範囲を決定すると、その動きベクトルの探索密度についても決定する。即ち、その動きベクトルの探索範囲の広さに応じて、その動きベクトルの探索密度を決定する。
FIG. 5 is a block diagram showing the motion prediction unit 20 of the moving picture coding apparatus according to Embodiment 2 of the present invention. In the figure, the search range / density determination unit 21 is the same as the search range determination unit 11 of FIG. When the size of the prediction vector calculated when the encoded data is generated by the variable length encoding unit 4 is larger than the threshold δ, the motion vector search range is determined in a wide range, and the size of the prediction vector is If it is smaller than the threshold δ, the motion vector search range is determined to be a narrow range.
However, unlike the search range determination unit 11 in FIG. 2, the search range / density determination unit 21 determines the search density of the motion vector when the search range of the motion vector is determined. That is, the motion vector search density is determined according to the size of the motion vector search range.

動き探索部22は図2の動き探索部12と同様に、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、探索範囲・密度決定部21により決定された探索範囲から適正な動きベクトルを探索する処理を実施する。
ただし、動き探索部22は図2の動き探索部12と異なり、探索範囲・密度決定部21により決定された探索範囲から適正な動きベクトルを探索する際、探索範囲・密度決定部21により決定された探索密度で動きベクトルを探索する。
Similar to the motion search unit 12 in FIG. 2, the motion search unit 22 collates the input image signal with the reference image signal stored in the frame memory 8, and determines the appropriate value from the search range determined by the search range / density determination unit 21. A process for searching for a motion vector is performed.
However, unlike the motion search unit 12 in FIG. 2, the motion search unit 22 is determined by the search range / density determination unit 21 when searching for an appropriate motion vector from the search range determined by the search range / density determination unit 21. The motion vector is searched with the search density.

次に動作について説明する。
この実施の形態2では、図1の動き予測部9の代わりに、動き予測部20が実装されている点以外は、上記実施の形態1と同様であるため、動き予測部20の動作のみを説明する。
動き予測部20は、可変長符号化部4が符号化データを生成する際に予測ベクトルPMVを算出すると、その予測ベクトルPMVの大きさを評価して動きベクトルMVの探索範囲と動きベクトルMVの探索密度を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルMVを探索する。
以下、動き予測部20の処理内容を具体的に説明する。
Next, the operation will be described.
The second embodiment is the same as the first embodiment except that the motion prediction unit 20 is mounted instead of the motion prediction unit 9 in FIG. 1, and therefore only the operation of the motion prediction unit 20 is performed. explain.
The motion prediction unit 20 calculates the prediction vector PMV when the variable length encoding unit 4 generates encoded data, evaluates the size of the prediction vector PMV, and determines the search range of the motion vector MV and the motion vector MV. The search density is determined, the input image signal and the reference image signal stored in the frame memory 8 are collated, and an appropriate motion vector MV is searched from the search range.
Hereinafter, the processing content of the motion estimation part 20 is demonstrated concretely.

動き予測部20の探索範囲・密度決定部21は、可変長符号化部4が予測ベクトルPMVを算出すると、その予測ベクトルPMVの大きさ|PMV|を算出する。
予測ベクトルPMVの大きさ|PMV|を算出する方法としては、例えば、予測ベクトルPMVの水平成分の絶対値と垂直成分の絶対値を算出し、大きい方の絶対値を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
あるいは、予測ベクトルPMVの水平成分と垂直成分の二乗和を算出し、その二乗和を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
When the variable length coding unit 4 calculates the prediction vector PMV, the search range / density determination unit 21 of the motion prediction unit 20 calculates the magnitude | PMV | of the prediction vector PMV.
As a method of calculating the magnitude | PMV | of the prediction vector PMV, for example, the absolute value of the horizontal component and the vertical component of the prediction vector PMV are calculated, and the larger absolute value is used as the magnitude of the prediction vector PMV. A method of setting PMV | is conceivable.
Alternatively, a method is conceivable in which the sum of squares of the horizontal and vertical components of the prediction vector PMV is calculated and the sum of the squares is used as the magnitude | PMV | of the prediction vector PMV.

探索範囲・密度決定部21は、予測ベクトルPMVの大きさ|PMV|と閾値δを比較し、その予測ベクトルPMVの大きさ|PMV|が閾値δより大きい場合、動きベクトルMVの探索範囲を広範囲に決定する。
一方、その予測ベクトルPMVの大きさ|PMV|が閾値δより小さい場合、動きベクトルの探索範囲MVを狭範囲(広範囲>狭範囲)に決定する。
|PMV|≧δ → 広範囲
|PMV|<δ → 狭範囲
The search range / density determination unit 21 compares the magnitude | PMV | of the prediction vector PMV with a threshold δ, and if the magnitude | PMV | of the prediction vector PMV is larger than the threshold δ, the search range / density determination unit 21 widens the search range of the motion vector MV. To decide.
On the other hand, when the magnitude | PMV | of the prediction vector PMV is smaller than the threshold δ, the motion vector search range MV is determined to be a narrow range (wide range> narrow range).
| PMV | ≧ δ → Wide range | PMV | <δ → Narrow range

探索範囲・密度決定部21は、動きベクトルMVの探索範囲を決定すると、その探索範囲の広さに応じて動きベクトルMVの探索密度を決定する。
即ち、探索範囲・密度決定部21は、動きベクトルMVの探索範囲が広い程、その動きベクトルMVの探索密度を下げる決定を行う。
ここで、動きベクトルMVの探索密度と動きベクトルMVの探索範囲の関係は、下記の通りである。
D=C/R (2)
ただし、Dは探索密度、Rは探索範囲、Cは動きベクトルの探索点数(動きベクトルの候補の数)である。
When the search range / density determination unit 21 determines the search range of the motion vector MV, the search range / density determination unit 21 determines the search density of the motion vector MV according to the size of the search range.
That is, the search range / density determination unit 21 determines to decrease the search density of the motion vector MV as the search range of the motion vector MV is wider.
Here, the relationship between the search density of the motion vector MV and the search range of the motion vector MV is as follows.
D = C / R (2)
Here, D is the search density, R is the search range, and C is the number of motion vector search points (the number of motion vector candidates).

式(2)から明らかなように、動きベクトルMVの探索範囲Rが広く、動きベクトルMVの探索密度Dが高いと、動きベクトルMVの探索点数Cが多くなり、逆に、動きベクトルMVの探索範囲Rが狭く、動きベクトルMVの探索密度Dが低いと、動きベクトルMVの探索点数Cが少なくなることが分る。
したがって、動きベクトルMVの探索点数Cが切り替えられて、演算量が増えないようにするには、動きベクトルMVの探索範囲Rの比に応じて探索密度Dを決定すればよいことが分る。
As is clear from equation (2), when the search range R of the motion vector MV is wide and the search density D of the motion vector MV is high, the number of search points C of the motion vector MV increases, and conversely, the search for the motion vector MV is performed. It can be seen that when the range R is narrow and the search density D of the motion vector MV is low, the number of search points C of the motion vector MV decreases.
Therefore, it is understood that the search density D may be determined in accordance with the ratio of the search range R of the motion vector MV in order to prevent the calculation amount from being increased by switching the search point number C of the motion vector MV.

動きベクトルMVの探索範囲Rが広範囲の場合は、例えば、探索原点(0,0)の周囲±16画素を探索し、狭範囲の場合は、例えば、探索原点(0,0)の周囲±8画素を探索するものとすると、広範囲の探索範囲と狭範囲の探索範囲の比は4:1となる。
このような場合に、動きベクトルMVの探索密度Dの切替前後の比が、探索範囲Rの切替前後の比と逆比になるように探索密度Dを決定する。
例えば、広範囲に探索する場合の探索密度Dを4画素おきに探索する密度に決定し、狭範囲に探索する場合の探索密度Dを2画素おきに探索する密度に決定すると、探索密度Dの切替前後の比が1:2となり、動きベクトルMVの探索点数Cは、切替前後で同じになる。
When the search range R of the motion vector MV is wide, for example, ± 16 pixels around the search origin (0,0) are searched, and when the search range R is narrow, for example, ± 8 around the search origin (0,0). If a pixel is searched, the ratio of the wide search range to the narrow search range is 4: 1.
In such a case, the search density D is determined so that the ratio before and after switching of the search density D of the motion vector MV is opposite to the ratio before and after switching of the search range R.
For example, if the search density D for searching in a wide range is determined to be a density for searching every 4 pixels, and the search density D for searching in a narrow range is determined to be a density for searching every 2 pixels, the search density D is switched. The ratio before and after becomes 1: 2, and the search point C of the motion vector MV is the same before and after switching.

なお、動きベクトルMVの探索範囲Rが狭範囲である場合、その探索範囲Rが広範囲である場合と比較して、同じ探索方法を用いると、処理時間が少なくなる。
一般的に、探索密度Dを上げると、動き予測の精度が向上し、画質の向上につながることが期待される。
上記のように、探索範囲Rに応じて探索密度Dを決定すると、探索点数Cは変わらないため、処理時間を増やすことなく、動き予測の精度が向上し、画質を向上させることができる。
When the search range R of the motion vector MV is a narrow range, the processing time is reduced when the same search method is used as compared with the case where the search range R is a wide range.
Generally, increasing the search density D is expected to improve the accuracy of motion prediction and improve the image quality.
As described above, when the search density D is determined according to the search range R, the number C of search points does not change, so that the accuracy of motion prediction can be improved and the image quality can be improved without increasing the processing time.

動き予測部20の動き探索部22は、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、探索範囲・密度決定部21により決定された探索範囲(広範囲 or 狭範囲)から適正な動きベクトルMVを探索する。
即ち、動き探索部22は、探索範囲内の複数の動きベクトル(当該マクロブロックの動きベクトルの候補)の中から任意の動きベクトルを選択し、その動きベクトルの分だけ、入力画像信号の符号化対象のマクロブロックを移動する。
ただし、探索範囲内の複数の動きベクトルの中から任意の動きベクトルを選択する際、探索範囲・密度決定部21により決定された探索密度Dにしたがって動きベクトルを選択する。
The motion search unit 22 of the motion prediction unit 20 collates the input image signal with the reference image signal stored in the frame memory 8, and starts from the search range (wide range or narrow range) determined by the search range / density determination unit 21. Search for an appropriate motion vector MV.
That is, the motion search unit 22 selects an arbitrary motion vector from among a plurality of motion vectors within the search range (candidate motion vectors of the macroblock), and encodes the input image signal by the amount of the motion vector. Move the target macroblock.
However, when an arbitrary motion vector is selected from a plurality of motion vectors within the search range, the motion vector is selected according to the search density D determined by the search range / density determination unit 21.

動き探索部22は、入力画像信号の符号化対象のマクロブロックを移動すると、移動後のマクロブロックと参照画像信号を照合して、両者が似ているか否かを評価する。
評価の方法として、例えば、絶対値差分和であるSADを用いることができる。あるいは、差分二乗和を用いることができる。
When the motion search unit 22 moves the macro block to be encoded of the input image signal, the motion search unit 22 collates the moved macro block with the reference image signal and evaluates whether or not they are similar.
As an evaluation method, for example, SAD which is a sum of absolute difference can be used. Alternatively, the sum of squared differences can be used.

動き探索部22は、探索範囲内の全ての動きベクトルを順次選択して、その動きベクトルの分だけ、符号化対象のマクロブロックを移動し、移動後のマクロブロックと参照画像信号を照合して、両者が似ているか否かを評価する。
動き探索部22は、探索範囲内の複数の動きベクトルのうち、その評価の結果が最も高い動きベクトル(例えば、SADが一番小さい動きベクトル)を適正な動きベクトルMVとして、動き補償部10及び可変長符号化部4に出力する。
The motion search unit 22 sequentially selects all motion vectors within the search range, moves the macroblock to be encoded by the motion vector, and collates the moved macroblock with the reference image signal. Evaluate whether the two are similar.
The motion search unit 22 uses the motion vector having the highest evaluation result (for example, the motion vector having the smallest SAD) among the plurality of motion vectors in the search range as an appropriate motion vector MV, The data is output to the variable length coding unit 4.

以上で明らかなように、この実施の形態2によれば、探索範囲・密度決定部21が、動きベクトルMVの探索範囲Rの広さに応じて、その動きベクトルMVの探索密度Dを決定するように構成したので、例えば、動きベクトルMVの探索範囲Rが狭範囲に切り替えられると、演算量を増やすことなく、探索密度Dを増やすことが可能になり、従来の符号化装置と比べて、動きベクトルの精度を高めて、画質を向上させることができる効果を奏する。   As is apparent from the above, according to the second embodiment, the search range / density determination unit 21 determines the search density D of the motion vector MV according to the size of the search range R of the motion vector MV. Thus, for example, when the search range R of the motion vector MV is switched to a narrow range, the search density D can be increased without increasing the amount of calculation, and compared with a conventional encoding device, There is an effect that the accuracy of the motion vector can be improved and the image quality can be improved.

実施の形態3.
図6はこの発明の実施の形態3による動画像符号化装置を示す構成図であり、図において、図1と同一符号は同一または相当部分を示すので説明を省略する。
動き予測部30は図1の動き予測部9と同様に、可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさを評価して動きベクトルの探索範囲を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルを探索する処理を実施する。
ただし、動き予測部30は図1の動き予測部9と異なり、入力画像信号のフレームレートと解像度を考慮して、動きベクトルの探索範囲を決定する。なお、動き予測部30は動きベクトル探索手段を構成している。
この実施の形態3では、動き予測部30が動きベクトルの探索範囲を決定するものについて説明するが、図4の動き予測部20と同様にして、動きベクトルの探索密度についても決定するようにしてもよい。
Embodiment 3 FIG.
FIG. 6 is a block diagram showing a moving picture coding apparatus according to Embodiment 3 of the present invention. In the figure, the same reference numerals as those in FIG.
Similar to the motion prediction unit 9 in FIG. 1, the motion prediction unit 30 evaluates the size of the prediction vector calculated when the encoded data is generated by the variable length encoding unit 4 and determines the motion vector search range. The input image signal and the reference image signal stored in the frame memory 8 are collated, and processing for searching for an appropriate motion vector from the search range is performed.
However, unlike the motion prediction unit 9 in FIG. 1, the motion prediction unit 30 determines a motion vector search range in consideration of the frame rate and resolution of the input image signal. The motion prediction unit 30 constitutes a motion vector search means.
In the third embodiment, the motion prediction unit 30 determines the motion vector search range, but the motion vector search density is also determined in the same manner as the motion prediction unit 20 of FIG. Also good.

図7はこの発明の実施の形態3による動画像符号化装置の動き予測部30を示す構成図であり、図において、図2と同一符号は同一または相当部分を示すので説明を省略する。
探索範囲決定部31は図2の探索範囲決定部11と同様に、可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさが閾値δより大きい場合、動きベクトルの探索範囲を広範囲に決定し、その予測ベクトルの大きさが閾値δより小さい場合、動きベクトルの探索範囲を狭範囲に決定する。
ただし、探索範囲決定部31は図2の探索範囲決定部11と異なり、入力画像信号のフレームレートと解像度を考慮して、動きベクトルの探索範囲を決定する。
FIG. 7 is a block diagram showing the motion prediction unit 30 of the moving picture coding apparatus according to Embodiment 3 of the present invention. In the figure, the same reference numerals as those in FIG.
Similar to the search range determination unit 11 in FIG. 2, the search range determination unit 31 performs motion when the size of the prediction vector calculated when the encoded data is generated by the variable length encoding unit 4 is larger than the threshold δ. A vector search range is determined over a wide range, and if the size of the prediction vector is smaller than the threshold δ, the motion vector search range is determined as a narrow range.
However, unlike the search range determination unit 11 in FIG. 2, the search range determination unit 31 determines the search range of the motion vector in consideration of the frame rate and resolution of the input image signal.

次に動作について説明する。
この実施の形態3では、図1の動き予測部9の代わりに、動き予測部30が実装されている点以外は、上記実施の形態1と同様であるため、動き予測部30の動作のみを説明する。
動き予測部30は、可変長符号化部4が符号化データを生成する際に予測ベクトルPMVを算出すると、その予測ベクトルPMVの大きさを評価して動きベクトルMVの探索範囲を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルMVを探索する。
ただし、探索範囲決定部31は、入力画像信号のフレームレートと解像度を考慮して、動きベクトルMVの探索範囲を決定する。
以下、動き予測部30の処理内容を具体的に説明する。
Next, the operation will be described.
The third embodiment is the same as the first embodiment except that the motion prediction unit 30 is mounted instead of the motion prediction unit 9 in FIG. 1, and therefore only the operation of the motion prediction unit 30 is performed. explain.
The motion prediction unit 30 calculates the prediction vector PMV when the variable length encoding unit 4 generates encoded data, evaluates the magnitude of the prediction vector PMV, determines the search range of the motion vector MV, and inputs The image signal and the reference image signal stored in the frame memory 8 are collated, and an appropriate motion vector MV is searched from the search range.
However, the search range determination unit 31 determines the search range of the motion vector MV in consideration of the frame rate and resolution of the input image signal.
Hereinafter, the processing content of the motion estimation part 30 is demonstrated concretely.

入力画像信号のフレームレートが小さい場合、あるいは、解像度が大きい場合、フレーム間の動きベクトルの大きさが大きくなると予想される。
逆に、入力画像信号のフレームレートが大きい場合、あるいは、解像度が小さい場合、フレーム間の動きベクトルの大きさが小さくなると予想される。
そこで、この実施の形態3では、動きベクトルの探索範囲をフレームレートや解像度にしたがって切り替えるようにしている。
When the frame rate of the input image signal is small or when the resolution is large, the magnitude of the motion vector between frames is expected to be large.
Conversely, when the frame rate of the input image signal is large or the resolution is small, it is expected that the size of the motion vector between frames will be small.
Therefore, in the third embodiment, the search range of motion vectors is switched according to the frame rate and resolution.

動き予測部30の探索範囲決定部31は、入力画像信号のフレームレートと解像度を示す情報を入力すると、下記の式(3)に示すように、そのフレームレートと解像度から探索範囲を決定する指標Mを算出する。
M=(Ra×Rb)/F (3)
ただし、Fはフレームレートであり、Ra×Rbは解像度(Raは画面内の縦方向のマクロブロックの個数、Rbは画面内の横方向のマクロブロックの個数)である。
探索範囲を決定する指標Mの値は、フレームレートFが小さいほど大きくなり、また、解像度Ra×Rbが高くなるほど大きくなる。
When the search range determination unit 31 of the motion prediction unit 30 inputs information indicating the frame rate and resolution of the input image signal, an index for determining the search range from the frame rate and resolution as shown in the following equation (3). M is calculated.
M = (R a × R b ) / F (3)
Here, F is the frame rate, R a × R b is the resolution (R a is the number of macroblocks in the vertical direction in the screen, and R b is the number of macroblocks in the horizontal direction in the screen).
The value of the index M for determining the search range increases as the frame rate F decreases, and increases as the resolution R a × R b increases.

探索範囲決定部31は、探索範囲を決定する指標Mを算出すると、探索範囲を決定する指標Mの値が大きい場合には、例えば、下記の式(4)に示すように、広範囲の探索範囲が選択され易いように閾値δを小さな値に設定する。
一方、指標Mの値が小さい場合には、例えば、下記の式(4)に示すように、狭範囲の探索範囲が選択され易いように閾値δを大きな値に設定する。
δ=a/M (4)
ただし、aは予め設定されている定数である。
When the search range determination unit 31 calculates the index M for determining the search range, when the value of the index M for determining the search range is large, for example, as shown in the following formula (4), a wide range of search ranges Is set to a small value so that is easily selected.
On the other hand, when the value of the index M is small, for example, as shown in the following formula (4), the threshold δ is set to a large value so that a narrow search range can be easily selected.
δ = a / M (4)
However, a is a preset constant.

探索範囲決定部31は、上記のようにして、閾値δを設定すると、可変長符号化部4により算出された予測ベクトルPMVの大きさ|PMV|を算出する。
予測ベクトルPMVの大きさ|PMV|を算出する方法としては、例えば、予測ベクトルPMVの水平成分の絶対値と垂直成分の絶対値を算出し、大きい方の絶対値を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
あるいは、予測ベクトルPMVの水平成分と垂直成分の二乗和を算出し、その二乗和を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
When the threshold δ is set as described above, the search range determination unit 31 calculates the magnitude | PMV | of the prediction vector PMV calculated by the variable length encoding unit 4.
As a method of calculating the magnitude | PMV | of the prediction vector PMV, for example, the absolute value of the horizontal component and the vertical component of the prediction vector PMV are calculated, and the larger absolute value is used as the magnitude of the prediction vector PMV. A method of setting PMV | is conceivable.
Alternatively, a method is conceivable in which the sum of squares of the horizontal and vertical components of the prediction vector PMV is calculated and the sum of the squares is used as the magnitude | PMV | of the prediction vector PMV.

探索範囲決定部31は、予測ベクトルPMVの大きさ|PMV|と閾値δを比較し、その予測ベクトルPMVの大きさ|PMV|が閾値δより大きい場合、動きベクトルMVの探索範囲を広範囲に決定する。
一方、その予測ベクトルPMVの大きさ|PMV|が閾値δより小さい場合、動きベクトルの探索範囲MVを狭範囲(広範囲>狭範囲)に決定する。
|PMV|≧δ → 広範囲
|PMV|<δ → 狭範囲
The search range determination unit 31 compares the magnitude | PMV | of the prediction vector PMV with the threshold δ, and if the magnitude | PMV | of the prediction vector PMV is larger than the threshold δ, the search range of the motion vector MV is determined over a wide range. To do.
On the other hand, when the magnitude | PMV | of the prediction vector PMV is smaller than the threshold δ, the motion vector search range MV is determined to be a narrow range (wide range> narrow range).
| PMV | ≧ δ → Wide range | PMV | <δ → Narrow range

このように、探索範囲決定部31がフレームレートと解像度を考慮して、動きベクトルMVの探索範囲を決定することで、例えば、VGA30fpsでは、周囲±16画素が探索範囲であるとすると、QCIF30fpsなどのように解像度が小さい場合には、周囲±8画素を探索範囲とするように決定される。また、VGA7.5fpsなどのようにフレームレートが小さい場合には、周囲±32画素を探索範囲とするように決定される。   In this way, the search range determination unit 31 determines the search range of the motion vector MV in consideration of the frame rate and the resolution. For example, in the case of VGA 30 fps, assuming that the surrounding ± 16 pixels is the search range, QCIF 30 fps, etc. When the resolution is small as described above, it is determined that the surrounding ± 8 pixels are set as the search range. In addition, when the frame rate is small, such as VGA 7.5 fps, it is determined that the surrounding ± 32 pixels are set as the search range.

動き予測部30の動き探索部12は、上記実施の形態1と同様に、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、探索範囲決定部31により決定された探索範囲(広範囲 or 狭範囲)から適正な動きベクトルMVを探索する。   Similar to the first embodiment, the motion search unit 12 of the motion prediction unit 30 collates the input image signal with the reference image signal stored in the frame memory 8, and determines the search range determined by the search range determination unit 31. An appropriate motion vector MV is searched from (wide range or narrow range).

以上で明らかなように、この実施の形態3によれば、動き予測部30が入力画像信号のフレームレートと解像度を考慮して、動きベクトルの探索範囲を決定するように構成したので、上記実施の形態1よりも、更に適正な探索範囲を決定することができる効果を奏する。   As apparent from the above, according to the third embodiment, the motion prediction unit 30 is configured to determine the motion vector search range in consideration of the frame rate and resolution of the input image signal. There is an effect that a more appropriate search range can be determined than in the first form.

なお、この実施の形態3では、フレームレートと解像度にしたがって閾値δを設定するものについて示したが、上記実施の形態1と同様に、予測ベクトルの大きさを評価して動きベクトルの探索範囲を決定してから、その探索範囲をフレームレートと解像度にしたがって修正するようにしてもよく、同様の効果を奏することができる。   In the third embodiment, the threshold value δ is set according to the frame rate and resolution. However, as in the first embodiment, the size of the prediction vector is evaluated to determine the motion vector search range. After the determination, the search range may be corrected according to the frame rate and resolution, and the same effect can be obtained.

実施の形態4.
図8はこの発明の実施の形態4による動画像符号化装置を示す構成図であり、図において、図1と同一符号は同一または相当部分を示すので説明を省略する。
動き予測部40は図1の動き予測部9と同様に、可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさを評価して動きベクトルの探索範囲を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルを探索する処理を実施する。
ただし、動き予測部40は図1の動き予測部9と異なり、複数の探索範囲候補が用意されており、可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさを複数の閾値と比較して、複数の探索範囲候補の中から、その比較結果に対応する探索範囲候補を選択し、その探索範囲候補を動きベクトルの探索範囲に決定する。なお、動き予測部40は動きベクトル探索手段を構成している。
この実施の形態4では、動き予測部40が動きベクトルの探索範囲を決定するものについて説明するが、図4の動き予測部20と同様にして、動きベクトルの探索密度についても決定するようにしてもよい。
Embodiment 4 FIG.
FIG. 8 is a block diagram showing a moving picture coding apparatus according to Embodiment 4 of the present invention. In the figure, the same reference numerals as those in FIG.
Similar to the motion prediction unit 9 in FIG. 1, the motion prediction unit 40 evaluates the size of the prediction vector calculated when the encoded data is generated by the variable length encoding unit 4 and determines the motion vector search range. The input image signal and the reference image signal stored in the frame memory 8 are collated, and processing for searching for an appropriate motion vector from the search range is performed.
However, unlike the motion prediction unit 9 in FIG. 1, the motion prediction unit 40 has a plurality of search range candidates, and the prediction vector calculated when the encoded data is generated by the variable length encoding unit 4. The size is compared with a plurality of thresholds, a search range candidate corresponding to the comparison result is selected from a plurality of search range candidates, and the search range candidate is determined as a search range of a motion vector. Note that the motion prediction unit 40 constitutes a motion vector search means.
In the fourth embodiment, the motion prediction unit 40 determines the motion vector search range, but the motion vector search density is also determined in the same manner as the motion prediction unit 20 of FIG. Also good.

図9はこの発明の実施の形態4による動画像符号化装置の動き予測部40を示す構成図であり、図において、図2と同一符号は同一または相当部分を示すので説明を省略する。
探索範囲決定部41は可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさを複数の閾値δ1,δ2,・・・,δNと比較して、複数の探索範囲候補R1,R2,・・・,RNの中から、その比較結果に対応する探索範囲候補を選択し、その探索範囲候補を動きベクトルの探索範囲に決定する。
FIG. 9 is a block diagram showing a motion prediction unit 40 of a moving picture coding apparatus according to Embodiment 4 of the present invention. In the figure, the same reference numerals as those in FIG.
Search range determining unit 41 variable-length coding unit 4 by a plurality of threshold values [delta] 1 the magnitude of the prediction vector encoded data is calculated when it is generated, [delta] 2, as compared ..., and [delta] N , R N , a search range candidate corresponding to the comparison result is selected from the search range candidates R 1 , R 2 ,.

次に動作について説明する。
この実施の形態4では、図1の動き予測部9の代わりに、動き予測部40が実装されている点以外は、上記実施の形態1と同様であるため、動き予測部40の動作のみを説明する。
動き予測部40は、可変長符号化部4が符号化データを生成する際に予測ベクトルPMVを算出すると、その予測ベクトルPMVの大きさを複数の閾値と比較して、複数の探索範囲候補の中から、その比較結果に対応する探索範囲候補を選択し、その探索範囲候補を動きベクトルの探索範囲に決定する。そして、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルMVを探索する。
以下、動き予測部40の処理内容を具体的に説明する。
Next, the operation will be described.
Since the fourth embodiment is the same as the first embodiment except that the motion prediction unit 40 is mounted instead of the motion prediction unit 9 in FIG. 1, only the operation of the motion prediction unit 40 is performed. explain.
When the motion prediction unit 40 calculates the prediction vector PMV when the variable length encoding unit 4 generates encoded data, the motion prediction unit 40 compares the magnitude of the prediction vector PMV with a plurality of thresholds, and calculates a plurality of search range candidates. A search range candidate corresponding to the comparison result is selected, and the search range candidate is determined as a motion vector search range. Then, the input image signal and the reference image signal stored in the frame memory 8 are collated, and an appropriate motion vector MV is searched from the search range.
Hereinafter, the processing content of the motion estimation part 40 is demonstrated concretely.

動き予測部40の探索範囲決定部41は、可変長符号化部4が予測ベクトルPMVを算出すると、その予測ベクトルPMVの大きさ|PMV|を算出する。
予測ベクトルPMVの大きさ|PMV|を算出する方法としては、例えば、予測ベクトルPMVの水平成分の絶対値と垂直成分の絶対値を算出し、大きい方の絶対値を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
あるいは、予測ベクトルPMVの水平成分と垂直成分の二乗和を算出し、その二乗和を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
When the variable length coding unit 4 calculates the prediction vector PMV, the search range determination unit 41 of the motion prediction unit 40 calculates the magnitude | PMV | of the prediction vector PMV.
As a method of calculating the magnitude | PMV | of the prediction vector PMV, for example, the absolute value of the horizontal component and the vertical component of the prediction vector PMV are calculated, and the larger absolute value is used as the magnitude of the prediction vector PMV. A method of setting PMV | is conceivable.
Alternatively, a method is conceivable in which the sum of squares of the horizontal and vertical components of the prediction vector PMV is calculated and the sum of the squares is used as the magnitude | PMV | of the prediction vector PMV.

探索範囲決定部41は、複数の探索範囲候補R1,R2,・・・,RNと、複数の閾値δ1,δ2,・・・,δNを保持している。
探索範囲決定部41は、予測ベクトルPMVの大きさ|PMV|を算出すると、その大きさ|PMV|を複数の閾値δ1,δ2,・・・,δNと比較する。
探索範囲決定部41は、下記に示すように、複数の探索範囲候補R1,R2,・・・,RNの中から、その比較結果に対応する探索範囲候補Rnを選択し、その探索範囲候補Rnを動きベクトルの探索範囲に決定する。
Search range determining unit 41 holds a plurality of search ranges candidate R 1, R 2, · · ·, and R N, a plurality of threshold values δ 1, δ 2, ···, and [delta] N.
Search range determining section 41, the magnitude of the prediction vector PMV | calculating the, its magnitude | | PMV comparing multiple thresholds δ 1, δ 2, ···, and [delta] N | PMV.
Search range determining section 41, as shown below, a plurality of search ranges candidate R 1, R 2, · · ·, among R N, and select the search range candidate R n corresponding to the comparison result, the motion search range candidate R n to determine the search range of the vector.

|PMV|<δ1 → R1
δ1≦|PMV|<δ2 → R2
δ2≦|PMV|<δ3 → R3


δn-1≦|PMV|<δn → Rn


δN-1≦|PMV|<δN → RN
ただし、δ1<δ2,・・・<δNであり、R1<R2<・・・<RNである。
| PMV | <δ 1 → R 1
δ 1 ≦ | PMV | <δ 2 → R 2
δ 2 ≦ | PMV | <δ 3 → R 3
:
:
δ n-1 ≦ | PMV | <δ n → R n
:
:
δ N-1 ≦ | PMV | <δ N → R N
However, δ 12, a ··· <δ N, is R 1 <R 2 <··· < R N.

したがって、探索範囲決定部41は、例えば、δ1≦|PMV|<δ2が成立すれば、探索範囲候補R2を選択し、δ2≦|PMV|<δ3が成立すれば、探索範囲候補R3を選択し、δn-1≦|PMV|<δnが成立すれば、探索範囲候補Rnを選択し、その選択した探索範囲候補を動きベクトルの探索範囲に決定する。 Accordingly, for example, the search range determination unit 41 selects the search range candidate R 2 if δ 1 ≦ | PMV | <δ 2 is satisfied, and searches for the search range if δ 2 ≦ | PMV | <δ 3 is satisfied. If candidate R 3 is selected and δ n-1 ≦ | PMV | <δ n is satisfied, search range candidate R n is selected, and the selected search range candidate is determined as the search range of the motion vector.

動き予測部40の動き探索部12は、上記実施の形態1と同様に、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、探索範囲決定部41により決定された探索範囲から適正な動きベクトルMVを探索する。   Similar to the first embodiment, the motion search unit 12 of the motion prediction unit 40 collates the input image signal with the reference image signal stored in the frame memory 8 and determines the search range determined by the search range determination unit 41. To search for an appropriate motion vector MV.

以上で明らかなように、この実施の形態4によれば、動き予測部40が可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさを複数の閾値δ1,δ2,・・・,δNと比較して、複数の探索範囲候補R1,R2,・・・,RNの中から、その比較結果に対応する探索範囲候補を選択し、その探索範囲候補を動きベクトルの探索範囲に決定するように構成したので、上記実施の形態1よりも、更に適正な探索範囲を決定することができる効果を奏する。 As is apparent from the above, according to the fourth embodiment, the size of the prediction vector calculated when the motion prediction unit 40 generates encoded data by the variable length encoding unit 4 is set to a plurality of threshold values δ. 1, [delta] 2, · · ·, as compared to the [delta] N, a plurality of search ranges candidate R 1, R 2, · · ·, among R N, and select the search range candidate corresponding to the comparison result, Since the search range candidate is determined to be the search range of the motion vector, there is an effect that a more appropriate search range can be determined than in the first embodiment.

実施の形態5.
図10はこの発明の実施の形態5による動画像符号化装置を示す構成図であり、図において、図1と同一符号は同一または相当部分を示すので説明を省略する。
動き予測部50は入力画像信号のフレームレートと解像度から目標処理時間Tbを算出するとともに、符号化処理開始時刻から現マクロブック処理開始時刻までの実測処理時間Tcを算出し、その目標処理時間Tbと実測処理時間Tcから閾値δを設定する処理を実施し、また、図1の動き予測部9と同様に、可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさを評価して動きベクトルの探索範囲を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルを探索する処理を実施する。なお、動き予測部50は動きベクトル探索手段を構成している。
この実施の形態5では、動き予測部50が動きベクトルの探索範囲を決定するものについて説明するが、図4の動き予測部20と同様にして、動きベクトルの探索密度についても決定するようにしてもよい。
Embodiment 5 FIG.
10 is a block diagram showing a moving picture coding apparatus according to Embodiment 5 of the present invention. In the figure, the same reference numerals as those in FIG.
The motion prediction unit 50 calculates the target processing time T b from the frame rate and resolution of the input image signal, calculates the actual processing time T c from the encoding processing start time to the current macrobook processing start time, and the target processing A process for setting a threshold value δ from the time T b and the actual measurement processing time T c is performed, and is calculated when the encoded data is generated by the variable length encoding unit 4 as in the motion prediction unit 9 of FIG. The motion vector search range is determined by evaluating the size of the predicted vector, the input image signal and the reference image signal stored in the frame memory 8 are collated, and an appropriate motion vector is searched from the search range. Perform the process. Note that the motion prediction unit 50 constitutes a motion vector search means.
In the fifth embodiment, the motion prediction unit 50 determines the motion vector search range. However, the motion vector search density is also determined in the same manner as the motion prediction unit 20 in FIG. Also good.

図11はこの発明の実施の形態5による動画像符号化装置の動き予測部50を示す構成図であり、図において、図2と同一符号は同一または相当部分を示すので説明を省略する。
探索範囲決定部51は入力画像信号のフレームレートと解像度から目標処理時間Tbを算出するとともに、符号化処理開始時刻から現マクロブック処理開始時刻までの実測処理時間Tcを算出し、その目標処理時間Tbと実測処理時間Tcから閾値δを設定する処理を実施し、また、図2の探索範囲決定部11と同様に、可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさが閾値δより大きい場合、動きベクトルの探索範囲を広範囲に決定し、その予測ベクトルの大きさが閾値δより小さい場合、動きベクトルの探索範囲を上記広範囲より狭い狭範囲に決定する処理を実施する。
FIG. 11 is a block diagram showing a motion prediction unit 50 of a moving picture coding apparatus according to Embodiment 5 of the present invention. In the figure, the same reference numerals as those in FIG.
The search range determination unit 51 calculates the target processing time T b from the frame rate and resolution of the input image signal, calculates the actual processing time T c from the encoding processing start time to the current macrobook processing start time, and sets the target processing time T c. When the process of setting the threshold value δ from the processing time T b and the actually measured processing time T c is performed, and the encoded data is generated by the variable length encoding unit 4 as in the search range determination unit 11 of FIG. If the size of the predicted vector calculated in the above is larger than the threshold δ, the motion vector search range is determined over a wide range. If the size of the predicted vector is smaller than the threshold δ, the motion vector search range is narrower than the wide range. A process for determining a narrow range is performed.

次に動作について説明する。
この実施の形態5では、図1の動き予測部9の代わりに、動き予測部50が実装されている点以外は、上記実施の形態1と同様であるため、動き予測部50の動作のみを説明する。
動き予測部50は、入力画像信号のフレームレートと解像度から目標処理時間Tbを算出するとともに、符号化処理開始時刻から現マクロブック処理開始時刻までの実測処理時間Tcを算出し、その目標処理時間Tbと実測処理時間Tcから閾値δを設定する。また、可変長符号化部4により算出された予測ベクトルPMVの大きさを評価して動きベクトルMVの探索範囲を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルMVを探索する。
以下、動き予測部50の処理内容を具体的に説明する。
Next, the operation will be described.
Since the fifth embodiment is the same as the first embodiment except that the motion prediction unit 50 is mounted instead of the motion prediction unit 9 of FIG. 1, only the operation of the motion prediction unit 50 is performed. explain.
The motion prediction unit 50 calculates the target processing time T b from the frame rate and resolution of the input image signal, calculates the actual processing time T c from the encoding processing start time to the current macrobook processing start time, and sets the target processing time T c. A threshold δ is set from the processing time T b and the measured processing time T c . Also, the search range of the motion vector MV is determined by evaluating the size of the prediction vector PMV calculated by the variable length encoding unit 4, and the input image signal and the reference image signal stored in the frame memory 8 are collated. The appropriate motion vector MV is searched from the search range.
Hereinafter, the processing content of the motion estimation part 50 is demonstrated concretely.

動き予測部50の探索範囲決定部51は、入力画像信号のフレームレートと解像度を示す情報を入力すると、下記の式(5)に示すように、そのフレームレートと解像度から、1個のマクロブロックにかけられる処理時間Taを算出する。
a=1000/(F×Ra×Rb) (5)
ただし、Fはフレームレートであり、Ra×Rbは解像度(Raは画面内の縦方向のマクロブロックの個数、Rbは画面内の横方向のマクロブロックの個数)である。
When the search range determination unit 51 of the motion prediction unit 50 receives information indicating the frame rate and resolution of the input image signal, one macroblock is calculated from the frame rate and resolution as shown in the following equation (5). It calculates the processing time T a to be subjected to.
T a = 1000 / (F × R a × R b ) (5)
Here, F is the frame rate, R a × R b is the resolution (R a is the number of macroblocks in the vertical direction in the screen, and R b is the number of macroblocks in the horizontal direction in the screen).

探索範囲決定部51は、1個のマクロブロックにかけられる処理時間Taを算出すると、下記の式(6)に示すように、N個のマクロブロックにかけられる目標処理時間Tbを算出する。
b=Ta×N (6)
探索範囲決定部51は、N個のマクロブロックにかけられる目標処理時間Tbを算出すると、その目標処理時間Tbが、例えば、タイマにより計測された実測処理時間Tcを越えている場合、処理が間に合わない可能性があるので、処理時間が短い狭範囲の探索範囲が選択され易いように、予め設定された閾値δを大きな値に変更する。
一方、その目標処理時間Tbが実測処理時間Tcを越えていなければ、処理が間に合わない可能性が小さいので、処理時間が長い広範囲の探索範囲が選択され易いように閾値δを小さな値に変更する。あるいは、予め設定された閾値δを変更せずに維持するようにする。
Search range determining section 51 calculates calculating the processing time T a to be applied to one macroblock, as shown in the following formula (6), a target processing time T b which is subjected to the N macroblocks.
T b = T a × N (6)
When the search range determination unit 51 calculates the target processing time T b to be applied to N macroblocks, if the target processing time T b exceeds the actual processing time T c measured by a timer, for example, Therefore, the preset threshold value δ is changed to a large value so that a narrow search range with a short processing time can be easily selected.
On the other hand, if the target processing time T b does not exceed the actual measurement processing time T c , the possibility that the processing will not be in time is small. Therefore, the threshold δ is set to a small value so that a wide search range with a long processing time can be easily selected. change. Alternatively, the preset threshold value δ is maintained without being changed.

探索範囲決定部51は、上記のようにして、閾値δの変更又は維持を行うと、可変長符号化部4により算出された予測ベクトルPMVの大きさ|PMV|を算出する。
予測ベクトルPMVの大きさ|PMV|を算出する方法としては、例えば、予測ベクトルPMVの水平成分の絶対値と垂直成分の絶対値を算出し、大きい方の絶対値を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
あるいは、予測ベクトルPMVの水平成分と垂直成分の二乗和を算出し、その二乗和を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
When the threshold value δ is changed or maintained as described above, the search range determination unit 51 calculates the magnitude | PMV | of the prediction vector PMV calculated by the variable length encoding unit 4.
As a method of calculating the magnitude | PMV | of the prediction vector PMV, for example, the absolute value of the horizontal component and the vertical component of the prediction vector PMV are calculated, and the larger absolute value is used as the magnitude of the prediction vector PMV. A method of setting PMV | is conceivable.
Alternatively, a method is conceivable in which the sum of squares of the horizontal and vertical components of the prediction vector PMV is calculated and the sum of the squares is used as the magnitude | PMV | of the prediction vector PMV.

探索範囲決定部51は、予測ベクトルPMVの大きさ|PMV|と閾値δを比較し、その予測ベクトルPMVの大きさ|PMV|が閾値δより大きい場合、動きベクトルMVの探索範囲を広範囲に決定する。
一方、その予測ベクトルPMVの大きさ|PMV|が閾値δより小さい場合、動きベクトルの探索範囲MVを狭範囲(広範囲>狭範囲)に決定する。
|PMV|≧δ → 広範囲
|PMV|<δ → 狭範囲
The search range determination unit 51 compares the magnitude | PMV | of the prediction vector PMV with a threshold δ, and if the magnitude | PMV | of the prediction vector PMV is larger than the threshold δ, the search range of the motion vector MV is determined over a wide range. To do.
On the other hand, when the magnitude | PMV | of the prediction vector PMV is smaller than the threshold δ, the motion vector search range MV is determined to be a narrow range (wide range> narrow range).
| PMV | ≧ δ → Wide range | PMV | <δ → Narrow range

以上で明らかなように、この実施の形態5によれば、動き予測部50が入力画像信号のフレームレートと解像度から目標処理時間Tを算出するとともに、符号化処理開始時刻から現マクロブック処理開始時刻までの実測処理時間Tcを算出し、その目標処理時間Tと実測処理時間Tcから閾値δを設定するように構成したので、処理時間に応じた演算量で符号化することができる効果を奏する。 As can be seen from the above description, according to the fifth embodiment, with the motion prediction unit 50 calculates the target processing time T b from the frame rate and resolution of the input image signal, the current macroblock processing from the encoding processing start time Since the actual measurement processing time T c up to the start time is calculated and the threshold value δ is set from the target processing time T b and the actual measurement processing time T c , it is possible to encode with a calculation amount corresponding to the processing time. There is an effect that can be done.

この発明の実施の形態1による動画像符号化装置を示す構成図である。It is a block diagram which shows the moving image encoder by Embodiment 1 of this invention. この発明の実施の形態1による動画像符号化装置の動き予測部9を示す構成図である。It is a block diagram which shows the motion estimation part 9 of the moving image encoder by Embodiment 1 of this invention. カレントマクロブロックの予測ベクトルと、隣接するマクロブロックの動きベクトルを示す説明図である。It is explanatory drawing which shows the prediction vector of a current macroblock, and the motion vector of an adjacent macroblock. この発明の実施の形態2による動画像符号化装置を示す構成図である。It is a block diagram which shows the moving image encoder by Embodiment 2 of this invention. この発明の実施の形態2による動画像符号化装置の動き予測部20を示す構成図である。It is a block diagram which shows the motion estimation part 20 of the moving image encoder by Embodiment 2 of this invention. この発明の実施の形態3による動画像符号化装置を示す構成図である。It is a block diagram which shows the moving image encoder by Embodiment 3 of this invention. この発明の実施の形態3による動画像符号化装置の動き予測部30を示す構成図である。It is a block diagram which shows the motion estimation part 30 of the moving image encoder by Embodiment 3 of this invention. この発明の実施の形態4による動画像符号化装置を示す構成図である。It is a block diagram which shows the moving image encoder by Embodiment 4 of this invention. この発明の実施の形態4による動画像符号化装置の動き予測部40を示す構成図である。It is a block diagram which shows the motion estimation part 40 of the moving image encoder by Embodiment 4 of this invention. この発明の実施の形態5による動画像符号化装置を示す構成図である。It is a block diagram which shows the moving image encoder by Embodiment 5 of this invention. この発明の実施の形態5による動画像符号化装置の動き予測部50を示す構成図である。It is a block diagram which shows the motion estimation part 50 of the moving image encoder by Embodiment 5 of this invention.

符号の説明Explanation of symbols

1 差分器(画像信号差分手段)、2 DCT変換部(量子化手段)、3 量子化部(量子化手段)、4 可変長符号化部(符号化データ生成手段)、5 逆量子化部(参照画像信号生成手段)、6 逆DCT変換部(参照画像信号生成手段)、7 加算器(参照画像信号生成手段)、8 フレームメモリ(参照画像信号生成手段)、9 動き予測部(動きベクトル探索手段)、10 動き補償部(動き補償手段)、11 探索範囲決定部、12 動き探索部、20 動き予測部(動きベクトル探索手段)、21 探索範囲・密度決定部、22 動き探索部、30 動き予測部(動きベクトル探索手段)、31 探索範囲決定部、40 動き予測部(動きベクトル探索手段)、41 探索範囲決定部、50 動き予測部(動きベクトル探索手段)、51 探索範囲決定部。   1 differencer (image signal difference unit), 2 DCT transform unit (quantization unit), 3 quantization unit (quantization unit), 4 variable length encoding unit (encoded data generation unit), 5 inverse quantization unit ( Reference image signal generation means), 6 Inverse DCT conversion section (reference image signal generation means), 7 Adder (reference image signal generation means), 8 Frame memory (reference image signal generation means), 9 Motion prediction section (motion vector search) Means), 10 motion compensation unit (motion compensation unit), 11 search range determination unit, 12 motion search unit, 20 motion prediction unit (motion vector search unit), 21 search range / density determination unit, 22 motion search unit, 30 motion Prediction unit (motion vector search unit), 31 search range determination unit, 40 motion prediction unit (motion vector search unit), 41 search range determination unit, 50 motion prediction unit (motion vector search unit), 51 search Range determining unit.

Claims (6)

入力画像信号と予測画像信号の差分を求め、その差分の信号である予測残差信号を出力する画像信号差分手段と、上記画像信号差分手段から出力された予測残差信号を量子化する量子化手段と、上記量子化手段により量子化された予測残差信号を可変長符号化して符号化データを生成する符号化データ生成手段と、上記量子化手段により量子化された予測残差信号を逆量子化し、逆量子化後の予測残差信号と上記予測画像信号を加算して参照画像信号を生成する参照画像信号生成手段と、上記符号化データ生成手段により符号化データが生成される際に算出される予測ベクトルの大きさを評価して動きベクトルの探索範囲を決定し、上記入力画像信号と上記参照画像信号生成手段により生成された参照画像信号を照合して、上記探索範囲から適正な動きベクトルを探索する動きベクトル探索手段と、上記動きベクトル探索手段により探索された動きベクトルを用いて、上記参照画像信号生成手段により生成された参照画像信号から予測画像信号を生成し、上記予測画像信号を上記画像信号差分手段及び上記参照画像信号生成手段に出力する動き補償手段とを備えた動画像符号化装置。   Image signal difference means for obtaining a difference between the input image signal and the predicted image signal, and outputting a prediction residual signal that is a signal of the difference, and quantization for quantizing the prediction residual signal output from the image signal difference means Means, variable length coding of the prediction residual signal quantized by the quantization means to generate encoded data, and the prediction residual signal quantized by the quantization means is inverted. Reference image signal generation means for generating a reference image signal by adding the prediction residual signal after quantization and inverse quantization and the prediction image signal, and when the encoded data is generated by the encoded data generation means A motion vector search range is determined by evaluating the size of the calculated prediction vector, the input image signal and the reference image signal generated by the reference image signal generation means are collated, and the search range is calculated. Using a motion vector search means for searching for a positive motion vector, and a motion vector searched by the motion vector search means, a predicted image signal is generated from the reference image signal generated by the reference image signal generation means, A moving image encoding apparatus comprising: a motion compensation unit that outputs a predicted image signal to the image signal difference unit and the reference image signal generation unit. 動きベクトル探索手段は、符号化データ生成手段により符号化データが生成される際に算出される予測ベクトルの大きさが所定の閾値より大きい場合、動きベクトルの探索範囲を広範囲に決定し、上記予測ベクトルの大きさが所定の閾値より小さい場合、動きベクトルの探索範囲を上記広範囲より狭い狭範囲に決定することを特徴とする請求項1記載の動画像符号化装置。   The motion vector search means determines a motion vector search range over a wide range when the size of the prediction vector calculated when the encoded data is generated by the encoded data generation means is larger than a predetermined threshold, 2. The moving picture coding apparatus according to claim 1, wherein when the vector size is smaller than a predetermined threshold, the motion vector search range is determined to be narrower than the wide range. 動きベクトル探索手段は、動きベクトルの探索範囲の広さに応じて、上記動きベクトルの探索密度を決定することを特徴とする請求項1または請求項2記載の動画像符号化装置。   3. The moving picture coding apparatus according to claim 1, wherein the motion vector search means determines the search density of the motion vector according to the size of the search range of the motion vector. 動きベクトル探索手段は、入力画像信号のフレームレートと解像度を考慮して、動きベクトルの探索範囲を決定することを特徴とする請求項1から請求項3のうちのいずれか1項記載の動画像符号化装置。   4. The moving image according to claim 1, wherein the motion vector search means determines a motion vector search range in consideration of a frame rate and resolution of an input image signal. Encoding device. 動きベクトル探索手段は、複数の探索範囲候補が用意されている場合、符号化データ生成手段により符号化データが生成される際に算出される予測ベクトルの大きさを複数の閾値と比較して、複数の探索範囲候補の中から、その比較結果に対応する探索範囲候補を選択し、上記探索範囲候補を動きベクトルの探索範囲に決定することを特徴とする請求項1記載の動画像符号化装置。   When a plurality of search range candidates are prepared, the motion vector search unit compares the size of the prediction vector calculated when the encoded data is generated by the encoded data generation unit with a plurality of thresholds, 2. The moving picture coding apparatus according to claim 1, wherein a search range candidate corresponding to the comparison result is selected from a plurality of search range candidates, and the search range candidate is determined as a search range of a motion vector. . 動きベクトル探索手段は、入力画像信号のフレームレートと解像度から目標処理時間を算出するとともに、符号化処理開始時刻から現マクロブック処理開始時刻までの実測処理時間を算出し、上記目標処理時間と上記実測処理時間から閾値を設定することを特徴とする請求項2記載の動画像符号化装置。   The motion vector search means calculates the target processing time from the frame rate and resolution of the input image signal, calculates the actual processing time from the encoding processing start time to the current macrobook processing start time, and calculates the target processing time and the above 3. The moving picture encoding apparatus according to claim 2, wherein a threshold value is set from an actual measurement processing time.
JP2008131835A 2008-05-20 2008-05-20 Moving image encoding device Pending JP2009284058A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008131835A JP2009284058A (en) 2008-05-20 2008-05-20 Moving image encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008131835A JP2009284058A (en) 2008-05-20 2008-05-20 Moving image encoding device

Publications (1)

Publication Number Publication Date
JP2009284058A true JP2009284058A (en) 2009-12-03

Family

ID=41454075

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008131835A Pending JP2009284058A (en) 2008-05-20 2008-05-20 Moving image encoding device

Country Status (1)

Country Link
JP (1) JP2009284058A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014017571A (en) * 2012-07-06 2014-01-30 Canon Inc Encoder
JP2015142233A (en) * 2014-01-28 2015-08-03 富士通株式会社 Moving picture encoder
JP2018166306A (en) * 2017-03-28 2018-10-25 キヤノン株式会社 Coding apparatus, imaging apparatus, coding method, and program
WO2019065916A1 (en) * 2017-09-29 2019-04-04 株式会社ニコン Moving image compression device, electronic device, and moving image compression program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014017571A (en) * 2012-07-06 2014-01-30 Canon Inc Encoder
JP2015142233A (en) * 2014-01-28 2015-08-03 富士通株式会社 Moving picture encoder
JP2018166306A (en) * 2017-03-28 2018-10-25 キヤノン株式会社 Coding apparatus, imaging apparatus, coding method, and program
WO2019065916A1 (en) * 2017-09-29 2019-04-04 株式会社ニコン Moving image compression device, electronic device, and moving image compression program
JPWO2019065916A1 (en) * 2017-09-29 2020-11-05 株式会社ニコン Video compressors, electronics, and video compression programs
JP7167928B2 (en) 2017-09-29 2022-11-09 株式会社ニコン MOVIE COMPRESSORS, ELECTRONICS AND MOVIE COMPRESSION PROGRAMS

Similar Documents

Publication Publication Date Title
US8155193B2 (en) Moving picture encoding apparatus, moving picture decoding apparatus, moving picture encoding method, moving picture decoding method, moving picture encoding program, and moving picture decoding program
KR101377883B1 (en) Non-zero rounding and prediction mode selection techniques in video encoding
EP2302933A1 (en) Weighted motion compensation of video
JP5426655B2 (en) Compressed video encoding device, compressed video decoding device, compressed video encoding method, and compressed video decoding method
KR20050074286A (en) Image encoding device, image encoding method and image encoding program
KR100560843B1 (en) Method and Apparatus for Determining Search Range for Adaptive Motion Vector for Use in Video Encoder
JP2006157881A (en) Variable-length coding device and method of same
KR20050089838A (en) Video encoding with skipping motion estimation for selected macroblocks
US20070009037A1 (en) Apparatus for and method of decoding moving picture, and computer product
US20090041119A1 (en) Method and Device for Coding a Video Image
US8194740B2 (en) Apparatus and method for compression-encoding moving picture
US20090046779A1 (en) Method and apparatus for determining block mode using bit-generation probability estimation in moving picture coding
US7912130B2 (en) Moving picture coding apparatus
JP2009284058A (en) Moving image encoding device
JP5649296B2 (en) Image encoding device
EP1593271A2 (en) Device for encoding a video data stream
KR20070034869A (en) Apparatus and method for controlling bit rate of video encoder
JP2005086249A (en) Dynamic image coding method and dynamic image coding apparatus
KR100617598B1 (en) Method for compressing moving picture using 1/4 pixel motion vector
KR100602148B1 (en) Method for motion picture encoding use of the a quarter of a pixel motion vector in mpeg system
KR100757832B1 (en) Method for compressing moving picture using 1/4 pixel motion vector
KR100757829B1 (en) Method for compressing moving picture using 1/4 pixel motion vector
KR100757831B1 (en) Method for compressing moving picture using 1/4 pixel motion vector
KR100757830B1 (en) Method for compressing moving picture using 1/4 pixel motion vector
KR20070063479A (en) Method for compressing moving picture using 1/4 pixel motion vector