JP2009284058A - Moving image encoding device - Google Patents
Moving image encoding device Download PDFInfo
- 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
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
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.
従来の動画像符号化装置は以上のように構成されているので、動きベクトルの探索範囲が限定されて、動き予測処理の処理量が削減される。しかし、動きベクトルの探索範囲を推定する際、多くのメモリを用意して、多くの演算を実施する必要があるなどの課題があった(例えば、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
DCT変換部2は差分器1から出力されたマクロブロック単位の予測残差信号を離散コサイン変換する。
量子化部3はDCT変換部2により離散コサイン変換された予測残差信号を量子化する処理を実施する。
なお、DCT変換部2及び量子化部3から量子化手段が構成されている。
The
The
The
可変長符号化部4は量子化部3により量子化された予測残差信号を可変長符号化して符号化データを生成するとともに、動き予測部9から出力された動きベクトルを符号化し、その符号化データと符号化後の動きベクトルを出力する処理を実施する。なお、可変長符号化部4は符号化データ生成手段を構成している。
The variable
逆量子化部5は量子化部3により量子化された予測残差信号を逆量子化する処理を実施する。
逆DCT変換部6は逆量子化部5により逆量子化された予測残差信号を逆離散コサイン変換する。
加算器7は逆DCT変換部6により逆離散コサイン変換された予測残差信号と動き補償部10から出力された予測画像信号を加算して参照画像信号を生成する処理を実施する。
フレームメモリ8は加算器7により生成された参照画像信号を格納するメモリである。
なお、逆量子化部5、逆DCT変換部6、加算器7及びフレームメモリ8から参照画像信号生成手段が構成されている。
The
The
The
The
The
動き予測部9は可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさを評価して動きベクトルの探索範囲を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルを探索する処理を実施する。なお、動き予測部9は動きベクトル探索手段を構成している。
動き補償部10は動き予測部9により探索された動きベクトルを用いて、フレームメモリ8に格納された参照画像信号から予測画像信号を生成し、その予測画像信号を差分器1及び加算器7に出力する処理を実施する。なお、動き補償部10は動き補償手段を構成している。
The
The
図2はこの発明の実施の形態1による動画像符号化装置の動き予測部9を示す構成図であり、図において、探索範囲決定部11は可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさが閾値δより大きい場合、動きベクトルの探索範囲を広範囲に決定し、その予測ベクトルの大きさが閾値δより小さい場合、動きベクトルの探索範囲を上記広範囲より狭い狭範囲に決定する処理を実施する。
動き探索部12は入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、探索範囲決定部11により決定された探索範囲から適正な動きベクトルを探索する処理を実施する。
FIG. 2 is a block diagram showing the
The
次に動作について説明する。
差分器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
DCT変換部2は、差分器1からマクロブロック単位の予測残差信号を受けると、その予測残差信号を離散コサイン変換し、離散コサイン変換後の予測残差信号を量子化部3に出力する。
量子化部3は、DCT変換部2から離散コサイン変換後の予測残差信号を受けると、その予測残差信号を量子化し、量子化後の予測残差信号を可変長符号化部4及び逆量子化部5に出力する。
When the
When the
可変長符号化部4は、量子化部3から量子化後の予測残差信号を受けると、その予測残差信号の各マクロブロックを可変長符号化して符号化データを生成し、各マクロブロックの符号化データを出力する。
また、可変長符号化部4は、後述する動き予測部9により探索された動きベクトルMVを符号化し、符号化後の動きベクトルMVを出力する。
When the variable
The variable
なお、可変長符号化部4は、マクロブロックの符号化データを生成する際に、当該マクロブロックの予測ベクトルPMVを算出する。
以下、予測ベクトルPMVの算出方法を説明する。
ここでは、ISO/IEC14496−2(通称、MPEG−4ビジュアル符号化方式)で決められている方法を例にして説明する。
Note that the variable
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
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
When the inverse
When the
動き予測部9は、可変長符号化部4が符号化データを生成する際に予測ベクトルPMVを算出すると、その予測ベクトルPMVの大きさを評価して動きベクトルMVの探索範囲を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルMVを探索する。
以下、動き予測部9の処理内容を具体的に説明する。
When the variable
Hereinafter, the processing content of the
動き予測部9の探索範囲決定部11は、可変長符号化部4が予測ベクトルPMVを算出すると、その予測ベクトルPMVの大きさ|PMV|を算出する。
予測ベクトルPMVの大きさ|PMV|を算出する方法としては、例えば、予測ベクトルPMVの水平成分の絶対値と垂直成分の絶対値を算出し、大きい方の絶対値を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
あるいは、予測ベクトルPMVの水平成分と垂直成分の二乗和を算出し、その二乗和を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
When the variable
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
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
That is, the
Then, the
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
The
動き補償部10は、動き予測部9が動きベクトルMVを探索すると、その動きベクトルMVを用いて、フレームメモリ8に格納された参照画像信号から予測画像信号を生成し、その予測画像信号を差分器1及び加算器7に出力する。
実際の符号化では、フレーム間予測モードだけでなく、フレーム内(イントラ)符号化モードなども考慮して最適な符号化モードが選択されるが、その点は本発明の本質から外れるため詳細な説明を省略する。
When the
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
即ち、動き予測部9の探索範囲決定部11が予測ベクトルPMVの動きの大きさに応じて必要とされる探索範囲を決定し、動き探索部12が必要とされる探索範囲のみを探索すればよいため、無駄な演算が減り、その結果、同等な画質を維持しながら、少ない演算量で、符号化データを作成することが可能となる。
特に、この実施の形態1では、符号化データが生成される際に必ず算出される予測ベクトルPMVを用いて、動きベクトルMVの探索範囲を切り替えるようにしているので、演算量を増やすことなく、動きベクトルMVの探索範囲を決定することが可能である。そのため、動きベクトルの探索に要する演算量を削減し、従来の符号化装置よりも少ない演算量で符号化することが可能となる。
That is, if the search range determination unit 11 of the
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は動きベクトル探索手段を構成している。
4 is a block diagram showing a moving picture coding apparatus according to
The
図5はこの発明の実施の形態2による動画像符号化装置の動き予測部20を示す構成図であり、図において、探索範囲・密度決定部21は図2の探索範囲決定部11と同様に、可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさが閾値δより大きい場合、動きベクトルの探索範囲を広範囲に決定し、その予測ベクトルの大きさが閾値δより小さい場合、動きベクトルの探索範囲を狭範囲に決定する。
ただし、探索範囲・密度決定部21は図2の探索範囲決定部11と異なり、動きベクトルの探索範囲を決定すると、その動きベクトルの探索密度についても決定する。即ち、その動きベクトルの探索範囲の広さに応じて、その動きベクトルの探索密度を決定する。
FIG. 5 is a block diagram showing the
However, unlike the search range determination unit 11 in FIG. 2, the search range /
動き探索部22は図2の動き探索部12と同様に、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、探索範囲・密度決定部21により決定された探索範囲から適正な動きベクトルを探索する処理を実施する。
ただし、動き探索部22は図2の動き探索部12と異なり、探索範囲・密度決定部21により決定された探索範囲から適正な動きベクトルを探索する際、探索範囲・密度決定部21により決定された探索密度で動きベクトルを探索する。
Similar to the
However, unlike the
次に動作について説明する。
この実施の形態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
The
Hereinafter, the processing content of the
動き予測部20の探索範囲・密度決定部21は、可変長符号化部4が予測ベクトルPMVを算出すると、その予測ベクトルPMVの大きさ|PMV|を算出する。
予測ベクトルPMVの大きさ|PMV|を算出する方法としては、例えば、予測ベクトルPMVの水平成分の絶対値と垂直成分の絶対値を算出し、大きい方の絶対値を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
あるいは、予測ベクトルPMVの水平成分と垂直成分の二乗和を算出し、その二乗和を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
When the variable
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 /
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 /
That is, the search range /
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
That is, the
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 /
動き探索部22は、入力画像信号の符号化対象のマクロブロックを移動すると、移動後のマクロブロックと参照画像信号を照合して、両者が似ているか否かを評価する。
評価の方法として、例えば、絶対値差分和であるSADを用いることができる。あるいは、差分二乗和を用いることができる。
When the
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
The
以上で明らかなように、この実施の形態2によれば、探索範囲・密度決定部21が、動きベクトルMVの探索範囲Rの広さに応じて、その動きベクトルMVの探索密度Dを決定するように構成したので、例えば、動きベクトルMVの探索範囲Rが狭範囲に切り替えられると、演算量を増やすことなく、探索密度Dを増やすことが可能になり、従来の符号化装置と比べて、動きベクトルの精度を高めて、画質を向上させることができる効果を奏する。
As is apparent from the above, according to the second embodiment, the search range /
実施の形態3.
図6はこの発明の実施の形態3による動画像符号化装置を示す構成図であり、図において、図1と同一符号は同一または相当部分を示すので説明を省略する。
動き予測部30は図1の動き予測部9と同様に、可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさを評価して動きベクトルの探索範囲を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルを探索する処理を実施する。
ただし、動き予測部30は図1の動き予測部9と異なり、入力画像信号のフレームレートと解像度を考慮して、動きベクトルの探索範囲を決定する。なお、動き予測部30は動きベクトル探索手段を構成している。
この実施の形態3では、動き予測部30が動きベクトルの探索範囲を決定するものについて説明するが、図4の動き予測部20と同様にして、動きベクトルの探索密度についても決定するようにしてもよい。
FIG. 6 is a block diagram showing a moving picture coding apparatus according to
Similar to the
However, unlike the
In the third embodiment, the
図7はこの発明の実施の形態3による動画像符号化装置の動き予測部30を示す構成図であり、図において、図2と同一符号は同一または相当部分を示すので説明を省略する。
探索範囲決定部31は図2の探索範囲決定部11と同様に、可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさが閾値δより大きい場合、動きベクトルの探索範囲を広範囲に決定し、その予測ベクトルの大きさが閾値δより小さい場合、動きベクトルの探索範囲を狭範囲に決定する。
ただし、探索範囲決定部31は図2の探索範囲決定部11と異なり、入力画像信号のフレームレートと解像度を考慮して、動きベクトルの探索範囲を決定する。
FIG. 7 is a block diagram showing the
Similar to the search range determination unit 11 in FIG. 2, the search
However, unlike the search range determination unit 11 in FIG. 2, the search
次に動作について説明する。
この実施の形態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
The
However, the search
Hereinafter, the processing content of the
入力画像信号のフレームレートが小さい場合、あるいは、解像度が大きい場合、フレーム間の動きベクトルの大きさが大きくなると予想される。
逆に、入力画像信号のフレームレートが大きい場合、あるいは、解像度が小さい場合、フレーム間の動きベクトルの大きさが小さくなると予想される。
そこで、この実施の形態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
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
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
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
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
動き予測部30の動き探索部12は、上記実施の形態1と同様に、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、探索範囲決定部31により決定された探索範囲(広範囲 or 狭範囲)から適正な動きベクトルMVを探索する。
Similar to the first embodiment, the
以上で明らかなように、この実施の形態3によれば、動き予測部30が入力画像信号のフレームレートと解像度を考慮して、動きベクトルの探索範囲を決定するように構成したので、上記実施の形態1よりも、更に適正な探索範囲を決定することができる効果を奏する。
As apparent from the above, according to the third embodiment, the
なお、この実施の形態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と同様にして、動きベクトルの探索密度についても決定するようにしてもよい。
FIG. 8 is a block diagram showing a moving picture coding apparatus according to
Similar to the
However, unlike the
In the fourth embodiment, the
図9はこの発明の実施の形態4による動画像符号化装置の動き予測部40を示す構成図であり、図において、図2と同一符号は同一または相当部分を示すので説明を省略する。
探索範囲決定部41は可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさを複数の閾値δ1,δ2,・・・,δNと比較して、複数の探索範囲候補R1,R2,・・・,RNの中から、その比較結果に対応する探索範囲候補を選択し、その探索範囲候補を動きベクトルの探索範囲に決定する。
FIG. 9 is a block diagram showing a
Search
次に動作について説明する。
この実施の形態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
When the
Hereinafter, the processing content of the
動き予測部40の探索範囲決定部41は、可変長符号化部4が予測ベクトルPMVを算出すると、その予測ベクトルPMVの大きさ|PMV|を算出する。
予測ベクトルPMVの大きさ|PMV|を算出する方法としては、例えば、予測ベクトルPMVの水平成分の絶対値と垂直成分の絶対値を算出し、大きい方の絶対値を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
あるいは、予測ベクトルPMVの水平成分と垂直成分の二乗和を算出し、その二乗和を予測ベクトルPMVの大きさ|PMV|とする方法が考えられる。
When the variable
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
Search
Search
|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, δ 1 <δ 2, 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
動き予測部40の動き探索部12は、上記実施の形態1と同様に、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、探索範囲決定部41により決定された探索範囲から適正な動きベクトルMVを探索する。
Similar to the first embodiment, the
以上で明らかなように、この実施の形態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
実施の形態5.
図10はこの発明の実施の形態5による動画像符号化装置を示す構成図であり、図において、図1と同一符号は同一または相当部分を示すので説明を省略する。
動き予測部50は入力画像信号のフレームレートと解像度から目標処理時間Tbを算出するとともに、符号化処理開始時刻から現マクロブック処理開始時刻までの実測処理時間Tcを算出し、その目標処理時間Tbと実測処理時間Tcから閾値δを設定する処理を実施し、また、図1の動き予測部9と同様に、可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさを評価して動きベクトルの探索範囲を決定し、入力画像信号とフレームメモリ8に格納された参照画像信号を照合して、その探索範囲から適正な動きベクトルを探索する処理を実施する。なお、動き予測部50は動きベクトル探索手段を構成している。
この実施の形態5では、動き予測部50が動きベクトルの探索範囲を決定するものについて説明するが、図4の動き予測部20と同様にして、動きベクトルの探索密度についても決定するようにしてもよい。
10 is a block diagram showing a moving picture coding apparatus according to
The
In the fifth embodiment, the
図11はこの発明の実施の形態5による動画像符号化装置の動き予測部50を示す構成図であり、図において、図2と同一符号は同一または相当部分を示すので説明を省略する。
探索範囲決定部51は入力画像信号のフレームレートと解像度から目標処理時間Tbを算出するとともに、符号化処理開始時刻から現マクロブック処理開始時刻までの実測処理時間Tcを算出し、その目標処理時間Tbと実測処理時間Tcから閾値δを設定する処理を実施し、また、図2の探索範囲決定部11と同様に、可変長符号化部4により符号化データが生成される際に算出される予測ベクトルの大きさが閾値δより大きい場合、動きベクトルの探索範囲を広範囲に決定し、その予測ベクトルの大きさが閾値δより小さい場合、動きベクトルの探索範囲を上記広範囲より狭い狭範囲に決定する処理を実施する。
FIG. 11 is a block diagram showing a
The search
次に動作について説明する。
この実施の形態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
The
Hereinafter, the processing content of the
動き予測部50の探索範囲決定部51は、入力画像信号のフレームレートと解像度を示す情報を入力すると、下記の式(5)に示すように、そのフレームレートと解像度から、1個のマクロブロックにかけられる処理時間Taを算出する。
Ta=1000/(F×Ra×Rb) (5)
ただし、Fはフレームレートであり、Ra×Rbは解像度(Raは画面内の縦方向のマクロブロックの個数、Rbは画面内の横方向のマクロブロックの個数)である。
When the search
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を算出する。
Tb=Ta×N (6)
探索範囲決定部51は、N個のマクロブロックにかけられる目標処理時間Tbを算出すると、その目標処理時間Tbが、例えば、タイマにより計測された実測処理時間Tcを越えている場合、処理が間に合わない可能性があるので、処理時間が短い狭範囲の探索範囲が選択され易いように、予め設定された閾値δを大きな値に変更する。
一方、その目標処理時間Tbが実測処理時間Tcを越えていなければ、処理が間に合わない可能性が小さいので、処理時間が長い広範囲の探索範囲が選択され易いように閾値δを小さな値に変更する。あるいは、予め設定された閾値δを変更せずに維持するようにする。
Search
T b = T a × N (6)
When the search
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
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
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が入力画像信号のフレームレートと解像度から目標処理時間Tbを算出するとともに、符号化処理開始時刻から現マクロブック処理開始時刻までの実測処理時間Tcを算出し、その目標処理時間Tbと実測処理時間Tcから閾値δを設定するように構成したので、処理時間に応じた演算量で符号化することができる効果を奏する。
As can be seen from the above description, according to the fifth embodiment, with the
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)
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)
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 |
-
2008
- 2008-05-20 JP JP2008131835A patent/JP2009284058A/en active Pending
Cited By (6)
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 |