JP2009225163A - Video encoder and video encoding method - Google Patents
Video encoder and video encoding method Download PDFInfo
- Publication number
- JP2009225163A JP2009225163A JP2008068070A JP2008068070A JP2009225163A JP 2009225163 A JP2009225163 A JP 2009225163A JP 2008068070 A JP2008068070 A JP 2008068070A JP 2008068070 A JP2008068070 A JP 2008068070A JP 2009225163 A JP2009225163 A JP 2009225163A
- Authority
- JP
- Japan
- Prior art keywords
- prediction
- inter
- search
- cost
- intra
- 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
Abstract
Description
本発明は、予測符号化及び算術符号化を採用した動画像符号化装置及び動画像符号化方法に関する。 The present invention relates to a moving picture coding apparatus and a moving picture coding method that employ predictive coding and arithmetic coding.
近年、画像処理のディジタル化が普及している。ディジタル化された画像データは、符号量を削減するために、H.264、AVC規格等の動画像符号化方法を採用して符号化後に伝送や記録が行われることが多い。 In recent years, digitization of image processing has become widespread. In order to reduce the amount of codes, digitized image data is recorded in H.264 format. In many cases, transmission and recording are performed after encoding using a moving image encoding method such as H.264 and AVC standards.
H.264規格等においては、複数の予測モードで複数のブロック形状の予測符号化を採用しており、画像ブロック単位に多数の予測モードの中から最適なモードを選択して、予測符号化を行う。最適な予測モードは、画像ブロックの性質毎に相違し、適切なモードを選択することで、符号化効率を向上させることができる。 H. In the H.264 standard and the like, predictive encoding of a plurality of block shapes is employed in a plurality of prediction modes, and an optimal mode is selected from a large number of prediction modes for each image block, and predictive encoding is performed. The optimum prediction mode differs depending on the property of the image block, and the encoding efficiency can be improved by selecting an appropriate mode.
複数の予測モードから最適なモードを選択する手法として、ラグランジュの未定乗数法に基づくレート−歪み最適化手法が知られている。このレート−歪み最適化手法では、各予測モードで符号化した際の符号化歪みD(現画像と再生画像の2乗誤差)と発生符号量とから、符号化コストを算出する。画像符号化における符号化効率は、いかに少ない符号量で、いかに画質劣化の少ない符号化ができるかということを意味している。つまり符号化コストが小さいほど符号化効率が高くなる。従って、与えられた量子化パラメータに対して、符号化コストが最小となる予測モードを画像ブロック毎に選択することで、符号化効率を最大にすることができる。 A rate-distortion optimization method based on Lagrange's undetermined multiplier method is known as a method for selecting an optimum mode from a plurality of prediction modes. In this rate-distortion optimization method, the encoding cost is calculated from the encoding distortion D (the square error between the current image and the reproduced image) and the generated code amount when encoding is performed in each prediction mode. The encoding efficiency in image encoding means how much encoding can be performed with a small amount of code and with little deterioration in image quality. That is, the encoding efficiency increases as the encoding cost decreases. Therefore, the encoding efficiency can be maximized by selecting, for each image block, a prediction mode that minimizes the encoding cost for a given quantization parameter.
ところで、H.264では、画面内予測によって符号量を削減するイントラ予測と、画面間予測によって符号量を削減するインター予測とが行われる。イントラ予測及びインター予測は、種々のモードを含んでおり、最小の符号化コストのモードを決定するための計算量は極めて大きい。特に、H.264におけるインター予測においては、参照画像の探索精度として1/4画素精度の予測モードを選択することが可能であり、符号化コスト算出のためには膨大な計算が必要である。 H. In H.264, intra prediction for reducing the code amount by intra prediction and inter prediction for reducing the code amount by inter prediction are performed. Intra prediction and inter prediction include various modes, and the amount of calculation for determining the mode with the minimum coding cost is extremely large. In particular, H.C. In the inter prediction in H.264, it is possible to select a prediction mode of 1/4 pixel accuracy as the reference image search accuracy, and enormous calculation is necessary for calculating the coding cost.
そこで、従来、モードの決定に必要な符号化コストの算出のための計算量を削減する技術が採用されている。例えば、インター予測において、各探索精度の演算を階層化する技術がある。この技術では、最も低い探索精度、つまり2画素精度において所定の探索範囲を設定して参照画像ブロックの候補を求める。そして、求めた候補の参照画像ブロックを中心にして、比較的狭い探索範囲を新たに設定し、この探索範囲で次の探索精度つまり、1画素精度の探索を行う。以後同様にして、各探索精度で求めた候補のブロックを中心にして、次の探索精度の探索範囲を設定するのである。探索範囲を狭くすることができるので、参照画像ブロックの候補の探索に必要な計算量を低減することが可能である。こうして、最終的には、1/4画素精度で参照画像ブロックの候補を求めて、符号化コストを算出する。こうして得たインター予測における最小符号化コストと、イントラ予測における最小符号化コストとを比較して、符号化モードを決定するようになっている。 Therefore, conventionally, a technique for reducing the amount of calculation for calculating the coding cost necessary for mode determination has been adopted. For example, in inter prediction, there is a technique for hierarchizing each search accuracy calculation. In this technique, a reference image block candidate is obtained by setting a predetermined search range with the lowest search accuracy, that is, two-pixel accuracy. Then, a relatively narrow search range is newly set centering on the obtained candidate reference image block, and the next search accuracy, that is, a one-pixel accuracy search is performed within this search range. Thereafter, similarly, the search range of the next search accuracy is set around the candidate block obtained with each search accuracy. Since the search range can be narrowed, it is possible to reduce the amount of calculation required for searching for reference image block candidates. Thus, finally, a candidate for a reference image block is obtained with 1/4 pixel accuracy, and the encoding cost is calculated. The encoding mode is determined by comparing the minimum encoding cost in the inter prediction thus obtained and the minimum encoding cost in the intra prediction.
しかしながら、例え階層化したとしても、高い探索精度、例えば1/4画素精度の探索には、膨大な計算量が必要であり、全体として計算量を十分に削減することはできない。 However, even if hierarchization is performed, a search with high search accuracy, for example, 1/4 pixel accuracy, requires a huge amount of calculation, and the calculation amount as a whole cannot be reduced sufficiently.
また、特許文献1においては、符号化対象画像と参照画像とから計算された類似度に基づいてインター予測及びイントラ予測のいずれかを選択する技術が開示されている。しかしながら、特許文献1の提案では、類似度のみによってインター予測とイントラ予測との切り換えを行っており、最適な予測モードの判定に誤りが生じる可能性がある。また、インター予測を選択した場合には、高精度の探索処理が行われるので、計算量を低減することはできないという問題があった。
本発明は、最適な予測モードを少ない演算量で決定して高効率の符号化を行うことができる動画像符号化装置及び動画像符号化方法を提供することを目的とする。 An object of the present invention is to provide a moving picture coding apparatus and a moving picture coding method capable of determining an optimum prediction mode with a small amount of calculation and performing highly efficient coding.
本発明の一態様に係る動画像符号化装置は、符号化コストに基づいてイントラ予測における予測画像を探索して決定するイントラ予測画像生成部と、インター予測における予測画像の探索処理を探索精度に応じて階層化し、探索精度を低い精度から高い精度に階層毎に順次切り換えて、各階層毎に符号化コストに基づいてインター予測における予測画像を探索して決定するインター予測画像生成部と、前記イントラ予測画像生成部が決定した予測画像の符号化コストと前記インター予測画像生成部が決定した予測画像の符号化コストとを前記階層毎に比較し、比較結果に基づいて前記階層毎にイントラ予測とインター予測とのいずれかの予測モードを決定し又は決定を保留し、予測モードをイントラ予測のモードに決定した場合には、前記インター予測画像生成部における以後の階層の探索処理を停止させる比較部とを具備したことを特徴とするものであり、
本発明の一態様に係る動画像符号化方法は、符号化コストに基づいてイントラ予測における予測画像を探索して決定し、インター予測における予測画像の探索処理を探索精度に応じて階層化し、探索精度を低い精度から高い精度に階層毎に順次切り換えて、各階層毎に符号化コストに基づいてインター予測における予測画像を探索して決定し、前記イントラ予測における予測画像の符号化コストと前記インター予測における予測画像の符号化コストとを前記階層毎に比較し、比較結果に基づいて前記階層毎にイントラ予測とインター予測とのいずれかの予測モードを決定し又は決定を保留し、予測モードをイントラ予測のモードに決定した場合には、前記インター予測における以後の探索処理を停止させることを特徴とする。
A video encoding apparatus according to an aspect of the present invention provides an intra-predicted image generation unit that searches for and determines a predicted image in intra prediction based on a coding cost, and search processing for a predicted image in inter prediction with search accuracy. The inter prediction image generation unit for sequentially searching for and determining the prediction image in the inter prediction based on the coding cost for each layer, by layering according to the layer, sequentially switching the search accuracy from low accuracy to high accuracy for each layer, and The encoding cost of the prediction image determined by the intra prediction image generation unit and the encoding cost of the prediction image determined by the inter prediction image generation unit are compared for each layer, and intra prediction is performed for each layer based on the comparison result. If the prediction mode is determined as the intra prediction mode or the prediction mode is determined as the intra prediction mode or the inter prediction mode is determined. Which is characterized by comprising a comparator unit stopping the search process following layer in the terpolymer predicted image generation unit,
A moving image encoding method according to an aspect of the present invention searches for and determines a prediction image in intra prediction based on an encoding cost, hierarchizes search processing for a prediction image in inter prediction according to search accuracy, and performs search The accuracy is sequentially switched from low accuracy to high accuracy for each layer, and the prediction image in the inter prediction is searched and determined based on the encoding cost for each layer, and the encoding cost of the prediction image in the intra prediction and the inter prediction are determined. The coding cost of the prediction image in the prediction is compared for each layer, and the prediction mode of either intra prediction or inter prediction is determined for each layer based on the comparison result, or the determination is suspended, and the prediction mode is set. When the intra prediction mode is determined, the subsequent search process in the inter prediction is stopped.
本発明によれば、最適な予測モードを少ない演算量で決定して高効率の符号化を行うことができるという効果を有する。 According to the present invention, it is possible to determine an optimal prediction mode with a small amount of calculation and perform highly efficient encoding.
以下、図面を参照して本発明の実施の形態について詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
図1は本発明の実施の形態に係る動画像符号化装置に採用される予測信号生成部を示すブロック図である。また、図2は動画像符号化装置の全体構成を示すブロック図である。 FIG. 1 is a block diagram showing a prediction signal generation unit employed in a video encoding apparatus according to an embodiment of the present invention. FIG. 2 is a block diagram showing the overall configuration of the moving picture coding apparatus.
図2において、符号化部11には画像信号が入力される。この画像信号は符号化部11の減算器12及び予測信号生成部23に供給される。減算器12は、後述するMB予測モード選択部24から予測画像信号が与えられており、入力された画像信号と予測画像信号との差分値(予測誤差)を出力する。なお、予測誤差は、予測モードに応じたサイズのブロック単位で求められる。
In FIG. 2, an image signal is input to the
減算器12からの予測誤差は、直交変換部13に与えられる。直交変換部13は、入力された予測誤差を直交変換して、ブロック単位で空間周波数成分に変換する。これにより空間的な相関成分が削減可能となる。直交変換部13からの変換係数は量子化部14に与えられる。量子化部14は、入力された変換係数を量子化することにより、ブロックの信号の冗長度を削減して出力する。
The prediction error from the
量子化部14からの量子化出力は、CABAC符号化部15に供給される。CABAC符号化部15は、2値化部16及び算術符号化部17によって構成されている。2値化部16は、量子化出力であるシンタックス要素が入力されると共に、MB予測モード選択部24から予測モード情報も入力され、シンタックス要素を可変長の2値のシンボル列に変換する。算術符号化部17は、2値化部16からの2値シンボル列を、シンボルの発生確率に応じて算術符号化する。こうして、CABAC符号化部15は、符号量を一層削減した符号化出力を出力バッファ18に出力するようになっている。
The quantized output from the quantizing
また、MB予測モード選択部24から出力される量子化係数等の予測方法に関する情報は、可変長符号化部25に与えられる。可変長符号化部25は入力された情報を可変長符号化して出力バッファ18に出力する。出力バッファ18はCABAC符号化部15の出力及び可変長符号化部25の出力を、所定のビットレートで符号化データとして出力する。
In addition, information regarding a prediction method such as a quantization coefficient output from the MB prediction
符号化制御部31は、発生符号量のフィードバック制御及び量子化特性制御等によって発生符号量を制御するレート制御、予測モードの決定処理の制御の他、符号化処理全体の制御等を行う。
The
量子化部14の出力は、予測画像信号を生成するために逆量子化部19にも与えられる。逆量子化部19、逆直交変換部20、加算器21及び参照画像メモリ22によって局部復号器が構成される。逆量子化部19は入力された量子化出力を逆量子化して、量子化前のデータ(変換係数)に戻して逆直交変換部20に出力する。逆直交変換部20は入力された変換係数を逆直交変換することにより、直交変換前の予測誤差を得る。この予測誤差は加算器21に与えられる。
The output of the
加算器21はMB予測モード選択部24から予測画像信号も与えられており、予測誤差と予測画像信号との加算によって、入力画像を復元する。加算器21からの復元画像は、参照画像として参照画像メモリ22に与えられる。
The
予測信号生成部23には入力画像信号も入力されている。予測信号生成部23は、後述するように、各予測モードに応じた予測画像信号を生成してMB予測モード選択部24に出力する共に、いずれの予測モードに決定するかを指示するためのモード指示信号を発生してMB予測モード選択部24に出力するようになっている。MB予測モード選択部24は、予測信号生成部23から、各予測モード毎の予測画像信号及びモード指示信号が与えられる。MB予測モード選択部24は、予測モードを示すモード指示信号に基づいて、予測画像信号を選択して、減算器12及び加算器21に出力するようになっている。
An input image signal is also input to the prediction
図1は図2中の予測信号生成部23の具体的な構成を示している。
FIG. 1 shows a specific configuration of the prediction
予測信号生成部23は、イントラ予測及びインター予測に基づく予測画像信号を生成することができる。また、予測信号生成部23は、インター予測においては複数の画素精度、例えば、2画素精度、1画素精度、1/2画素精度及び1/4画素精度で予測画像信号を求めることができる。本実施の形態においては、後述するように、予測信号生成部23は、予測モードの決定に要する計算量を削減することが可能である。
The prediction
イントラ予測画像生成部41には、入力画像信号が供給される。イントラ予測画像生成部41は、入力画像信号が与えられて、画面内の画像を用いて予測画像(イントラ予測画像)を生成する。例えば、イントラ予測画像生成部41は、符号化の対象のブロックに隣接する画素を用いて、イントラ予測画像を生成する。イントラ予測画像生成部41は、生成したイントラ予測画像を差分画像生成部44に出力すると共に、MB予測モード選択部24にも出力する。なお、最終的には、後述するように、イントラ予測画像生成部41は、イントラ予測の各モードのうち最も小さい符号化コストが得られるモードのイントラ予測画像をMB予測モード選択部24に出力するようになっている。
An input image signal is supplied to the intra predicted
インター予測画像生成部42は、参照画像信号が与えられ、他の画面の画像(参照画像)を用いて予測画像(インター予測画像)を生成する。この場合において、インター予測画像生成部42は、符号化コストが最も小さくなるように、インター予測画像を生成する。
The inter prediction
本実施の形態においては、インター予測画像生成部42は、後述する比較部46に制御されて、インター予測画像の生成のための探索処理を階層化する。即ち、インター予測画像生成部42は、最も低い探索精度から高い探索精度に向かって探索精度を階層毎に切換えて順次探索を行う。なお、本実施の形態をH.264に適用した場合には、探索精度としては、2画素精度、1画素精度、1/2画素精度及び1/4画素精度が採用される。
In the present embodiment, the inter-predicted
例えば、インター予測画像生成部42は、階層毎に、参照画像中に探索範囲を設定し、設定した探索範囲内で、当該階層の探索精度に応じてブロック化位置を順次変化させながらマクロブロックを選択してインター予測画像として差分画像生成部44に出力する。そして、インター予測画像生成部42は、最終的には、後述する比較部46から符号化コストについての情報が与えられて、当該階層において最も符号化コストが小さくなるインター予測画像をMB予測モード選択部24に出力する。
For example, the inter prediction
差分画像生成部44は、入力画像信号も入力され、イントラ予測画像信号と入力画像信号との差分を求めて、差分画像を符号化コスト計算部45に出力する。また、差分画像生成部44は、インター予測画像信号と入力画像信号との差分を求めて、差分画像を符号化コスト計算部45に出力する。
The difference
符号化コスト計算部45は、差分画像生成部44の出力に基づいて、符号化コストを算出する。即ち、符号化コスト計算部45は、イントラ予測画像と入力画像との差分から、イントラ予測画像の符号化コストを算出する。また、符号化コスト計算部45は、インター予測画像と入力画像との差分から、インター予測画像の符号化コストを算出する。
The encoding
比較部46は、メモリ47を有しており、入力されるイントラ予測画像の符号化コスト及びインター予測画像の符号化コストをメモリ47に記憶させながら比較を行う。即ち、比較部46は、イントラ予測における各モードのイントラ予測画像毎に符号化コストを比較し、最も低い符号化コストが得られるモードをイントラ予測画像生成部41に指示する。また、比較部46は、インター予測の各階層におけるイントラ予測画像の符号化コストを比較し、各階層毎に、最も低い符号化コストが得られるインター予測画像(マクロブロック)をイントラ予測画像生成部42に指示する。
The comparison unit 46 includes a
図3はインター予測における階層的な探索処理を説明するための説明図である。図3(a)は最も低い探索精度の探索処理を示し、図3(b)は2番目に低い探索精度の探索処理を示し、図3(c)は3番目に低い探索精度の探索処理を示している。 FIG. 3 is an explanatory diagram for explaining hierarchical search processing in inter prediction. 3A shows the search processing with the lowest search accuracy, FIG. 3B shows the search processing with the second lowest search accuracy, and FIG. 3C shows the search processing with the third lowest search accuracy. Show.
いま、図3の対象となるマクロブロック(処理MB)52について、インター予測画像となるマクロブロック(以下、インター予測画像マクロブロックという)を求めるものとする。先ず、インター予測画像生成部42は、最も低い探索精度で探索を行う。即ち、インター予測画像生成部42は、入力画像の処理MB52と同一位置の参照画像のマクロブロックを中心として、所定の探索範囲R1を設定する。インター予測画像生成部42は、探索範囲R1内で探索精度に応じてブロック化位置を変化させながら、インター予測画像マクロブロックを順次選択する。
Assume that a macroblock (hereinafter referred to as an inter-predicted image macroblock) that is an inter-predicted image is obtained for the macroblock (processing MB) 52 in FIG. First, the inter prediction
インター予測画像生成部42からのインター予測画像は差分画像生成部44に与えられて、入力画像との差分画像が求められる。符号化コスト計算部45は、差分画像からインター予測画像の符号化コストを求める。符号化コストは比較部46に順次供給される。比較部46は、探索範囲R1内で、最小の符号化コストが得られるマクロブロックを候補C1(×印)とする。
The inter prediction image from the inter prediction
インター予測画像生成部42は、比較部46から2番目に低い探索精度での探索が指示されると、候補C1のマクロブロックを中心として、所定の探索範囲R2を設定する。インター予測画像生成部42は、探索範囲R2内で、2番目に低い探索精度に応じてブロック化位置を変化させながら、順次インター予測画像マクロブロックを選択する。インター予測画像生成部42からのインター予測画像の符号化コストは、比較部46によって比較される。こうして、最も低い符号化コストが得られるマクロブロックが候補C2として求められる。
When the search with the second lowest search accuracy is instructed from the comparison unit 46, the inter predicted
更に、インター予測画像生成部42は、比較部46から3番目に低い探索精度での探索が指示されると、候補C2のマクロブロックを中心として、所定の探索範囲R3を設定する。インター予測画像生成部42は、探索範囲R3内で3番目に低い探索精度に応じてブロック化位置を変化させながら、順次インター予測画像マクロブロックを選択する。インター予測画像生成部42は、比較部46から最も低い符号化コストが得られるマクロブロックが指定されて、当該マクロブロックを候補C3とする。
Further, when a search with the third lowest search accuracy is instructed by the comparison unit 46, the inter predicted
以後、同様にして、インター予測画像生成部42は、比較部46の指示に応じて、低い探索精度から高い探索精度に切り換えながら階層的にインター予測画像の探索を行う。
Thereafter, similarly, the inter-predicted
本実施の形態においては、比較部46は、イントラ予測における符号化コストと、インター予測における符号化コストとを、インター予測の各階層毎に比較するようになっている。比較部46は、各探索精度の探索毎に閾値を設定し、所定の探索精度の探索時に、イントラ予測画像の符号化コストがインター予測画像の符号化コストより所定の閾値を超えて小さい場合には、イントラ予測モードを設定するためのモード指示信号を出力する共に、イントラ予測画像生成部41から当該イントラ予測画像信号をMB予測モード選択部24に出力させる。
In the present embodiment, the comparison unit 46 compares the encoding cost in intra prediction and the encoding cost in inter prediction for each layer of inter prediction. The comparison unit 46 sets a threshold value for each search with each search accuracy, and when searching with a predetermined search accuracy, the coding cost of the intra prediction image is smaller than the coding cost of the inter prediction image and is smaller than the predetermined cost. Outputs a mode instruction signal for setting the intra prediction mode, and causes the MB prediction
また、比較部46は、所定の探索精度の探索時に、イントラ予測画像の符号化コストとインター予測画像の符号化コストとの差が所定の閾値以内である場合には、当該探索精度よりも高い探索精度の探索を継続して行うように、インター予測画像生成部42に指示を与える。
In addition, when the difference between the coding cost of the intra-predicted image and the coding cost of the inter-predicted image is within a predetermined threshold during the search with a predetermined search accuracy, the comparing unit 46 is higher than the search accuracy. An instruction is given to the inter-predicted
また、比較部46は、所定の探索精度の探索時に、インター予測画像の符号化コストがイントラ予測画像の符号化コストより所定の閾値を超えて小さい場合には、インター予測モードを設定するためのモード指示信号を出力する共に、当該所定の探索精度の探索時に求めたインター予測画像信号をインター予測画像生成部42からMB予測モード選択部24に出力させるようになっている。またこの場合には、比較部46は、以後、インター予測画像生成部42の探索処理(インター予測画像の生成処理)を停止させるようになっている。
In addition, the comparison unit 46 sets the inter prediction mode when the coding cost of the inter prediction image is smaller than the coding cost of the intra prediction image at a predetermined search accuracy and exceeds a predetermined threshold. While outputting the mode instruction signal, the inter prediction
本実施の形態においては、インター予測画像生成部42は、比較部46によって、インター予測画像の探索処理が制御されるようになっている。即ち、インター予測画像生成部42は、各探索精度毎のインター予測画像の算出を比較部46からの指示に従って行い、比較部46からイントラ予測モードを決定するモード指示信号が出力されると、以後の階層における演算を停止するようになっている。
In the present embodiment, the inter prediction
次にこのように構成された実施の形態の動作について図4乃至図9を参照して説明する。図4は予測モードの決定処理を説明するためのフローチャートである。図5は図4中のイントラ予測候補決定処理を具体的に示すフローチャートである。図6乃至図9はインター予測における予測画像生成処理(探索処理)を示しており、夫々2画素精度、1画素精度、1/2画素精度又は1/4画素精度による探索処理を用いた例を示している。なお、図5乃至図9は図1に示す予測信号生成部23の各部の処理をソフトウェアによって実現した場合のフローを示している。
Next, the operation of the embodiment configured as described above will be described with reference to FIGS. FIG. 4 is a flowchart for explaining prediction mode determination processing. FIG. 5 is a flowchart specifically showing the intra prediction candidate determination process in FIG. 6 to 9 show predicted image generation processing (search processing) in inter prediction, and examples using search processing with 2-pixel accuracy, 1-pixel accuracy, 1 / 2-pixel accuracy, or 1 / 4-pixel accuracy, respectively. Show. 5 to 9 show a flow when the processing of each unit of the prediction
入力画像信号は予測信号生成部23に与えられる。予測信号生成部23は、図4のステップS1において、イントラ予測による符号化コストが最小となる予測画像の候補を決定する。即ち、入力画像信号は予測信号生成部23内のイントラ予測画像生成部41に与えられて、各モードにおける予測画像が生成される。差分画像生成部44は入力画像と予測画像との差分画像を求め、符号化コスト計算部45は差分画像の符号化コストを計算する。比較部46は、イントラ予測における各モードの符号化コストを比較し、最小の符号化コストが得られる予測画像を求める。
The input image signal is given to the
予測信号生成部23はコンピュータシステムを用いて構成することができ、図5はCPUによるイントラ予測画像の生成処理を示している。図5のステップS11において、CPUは、先ず、最小の符号化コストの変数intraCostを、符号化コストとして取り得る最大値に初期化する。次に、ステップS12において、所定の予測モードによるイントラ予測画像pred[x,y]を生成する。次に、イントラ予測画像と入力画像との差分が求められ(ステップS13)、差分画像diff[x,y]に対して符号化コストが計算される。
The prediction
符号化コストは、差分画像のコストである係数コストcoeffCostと予測モードの情報を符号化した場合のコストである予測モードコストmodeCostとの和で与えられる。ステップS14においては係数コストが計算され、ステップS15では予測モードコストが計算される。なお、係数コストcoeffCostは、例えば下記(1)式に示す絶対値和の計算式で求められる。 The encoding cost is given as the sum of the coefficient cost coeffCost that is the cost of the difference image and the prediction mode cost modeCost that is the cost when the prediction mode information is encoded. In step S14, the coefficient cost is calculated, and in step S15, the prediction mode cost is calculated. The coefficient cost coeffCost is obtained, for example, by the absolute value sum calculation formula shown in the following formula (1).
coeffCost=ΣΣabs(diff[x,y]) …(1)
なお、abs()は、()内の値の絶対値を示す。
coeffCost = ΣΣabs (diff [x, y]) (1)
Note that abs () indicates the absolute value of the value in ().
次に、ステップS16において、CPUは、イントラ予測時の各モードの符号化コストの比較に用いる変数tmpCostに、係数コストの値coeffCostと予測モードコストの値modeCostの和を代入する。ステップS17では、CPUは、tmpCostと最小の符号化コストの変数intraCostとの大小を判定する。tmpCostの方がintraCostよりも小さい場合には、CPUは、intraCostにtmpCostを代入して更新し(ステップS18)、そうでない場合には、intraCostを更新しない。 Next, in step S <b> 16, the CPU substitutes the sum of the coefficient cost value coeffCost and the prediction mode cost value modeCost into a variable tmpCost used for comparing the coding cost of each mode at the time of intra prediction. In step S <b> 17, the CPU determines the magnitude of tmpCost and the variable intraCost of the minimum encoding cost. If tmpCost is smaller than intraCost, the CPU assigns tmpCost to intraCost and updates it (step S18). Otherwise, it does not update intraCost.
CPUは、ステップS12〜S18を、各予測モード毎に繰返す。こうして、intraCostには、全予測モードの最も小さい符号化コストの値が格納される。ステップS19では、CPUは、イントラ予測時の符号化コストとインター予測時の符号化コストとの比較を行う場合の調整パラメータintraCostOffsetをintraCostに加算する。こうして、最小の符号化コストintraCost及び最小の符号化コストを得るイントラ予測画像が求められる。 The CPU repeats steps S12 to S18 for each prediction mode. In this way, the value of the smallest coding cost of all prediction modes is stored in intraCost. In step S <b> 19, the CPU adds an adjustment parameter intraCostOffset for comparison between the encoding cost at the time of intra prediction and the encoding cost at the time of inter prediction, to intraCost. In this way, an intra prediction image that obtains the minimum coding cost intraCost and the minimum coding cost is obtained.
次に、インター予測による候補を決定する。いま、インター予測画像の探索精度が2画素精度、1画素精度、1/2画素精度又は1/4画素精度であるものとする。本実施の形態においてはインター予測画像の探索は階層的に行われる。 Next, a candidate by inter prediction is determined. Now, the search accuracy of the inter prediction image is assumed to be 2 pixel accuracy, 1 pixel accuracy, 1/2 pixel accuracy, or 1/4 pixel accuracy. In the present embodiment, the search for inter predicted images is performed hierarchically.
先ず、図4のステップS2において、最も低い探索精度による探索処理を実施する。予測信号生成部23は、インター予測においても、符号化コストが最小となる予測画像の候補を決定する。インター予測画像生成部42は、参照画像信号が与えられて、探索範囲内で最も低い探索精度に応じてブロック化位置を変化させながらマクロブロックを選択して、インター予測画像として順次差分画像生成部44に出力する。差分画像生成部44は入力画像とインター予測画像との差分画像を求め、符号化コスト計算部45は差分画像の符号化コストを計算する。比較部46は、各インター予測画像の符号化コストを比較し、最小の符号化コストinterCost0が得られるインター予測画像を求める。
First, in step S2 of FIG. 4, a search process with the lowest search accuracy is performed. The predicted
図6はCPUによる2画素精度の探索処理を示している。図6のステップS21において、CPUは、先ず、最小の符号化コストの変数interCost0を、符号化コストとして取り得る最大値に初期化する。次に、ステップS22において、インター予測画像を生成する。即ち、CPUは、所定の探索範囲内で、2画素精度で動きベクトルを探索し、動きベクトル候補MV候補Mv0を決定する。次に、CPUは、2画素精度の動きベクトル候補からインター予測画像pred[x,y]を生成する。次に、インター予測画像と入力画像との差分が求められ(ステップS23)、差分画像diff[x,y]に対して符号化コストが計算される。 FIG. 6 shows a two-pixel precision search process by the CPU. In step S21 in FIG. 6, the CPU first initializes the variable coding cost interCost0 of the minimum coding cost to the maximum value that can be taken as the coding cost. Next, in step S22, an inter prediction image is generated. That is, the CPU searches for a motion vector with 2-pixel accuracy within a predetermined search range, and determines a motion vector candidate MV candidate Mv0. Next, the CPU generates an inter predicted image pred [x, y] from the motion vector candidates with 2-pixel accuracy. Next, the difference between the inter predicted image and the input image is obtained (step S23), and the coding cost is calculated for the difference image diff [x, y].
インター予測における符号化コストは、差分画像diff[x,y]のコストである係数コストcoeffCostとインター予測画像のブロック化位置を示す動きベクトルの情報を符号化した場合のコストであるMVコストmvCostとの和で与えられる。ステップS24においては係数コストが計算され、ステップS25ではMVコストが計算される。 The encoding cost in the inter prediction is a coefficient cost coeffCost that is a cost of the difference image diff [x, y] and an MV cost mvCost that is a cost in the case of encoding motion vector information indicating the blocking position of the inter prediction image. Is given as the sum of In step S24, the coefficient cost is calculated, and in step S25, the MV cost is calculated.
次に、ステップS26において、インター予測時の各モードの符号化コストの比較に用いる変数tmpCostに、係数コストの値coeffCostとMVコストの値mvCostの和を代入する。ステップS27では、tmpCostと最小の符号化コストの変数interCost0との大小を判定する。tmpCostの方がinterCost0よりも小さい場合には、interCost0にtmpCostを代入して更新し(ステップS28)、そうでない場合には、interCost0を更新しない。 Next, in step S26, the sum of the coefficient cost value coeffCost and the MV cost value mvCost is substituted into a variable tmpCost used for comparison of the coding cost of each mode during inter prediction. In step S27, it is determined whether tmpCost is the minimum encoding cost variable interCost0. If tmpCost is smaller than interCost0, tmpCost is substituted and updated for interCost0 (step S28). Otherwise, interCost0 is not updated.
ステップS22〜S28を繰返して、探索範囲内で2画素精度でブロック化位置を変化させながら、最小となる符号化コストを求める。こうして、interCost0には、探索範囲内で最も小さい符号化コストの値が格納される。ステップS29では、イントラ予測時の符号化コストとインター予測時の符号化コストとの比較を行う場合の調整パラメータinterCostOffsetをinterCost0に加算する。こうして、探索精度が2画素精度の場合において、最小の符号化コスト及び最小の符号化コストを得るインター予測画像が求められる。 Steps S22 to S28 are repeated to obtain the minimum encoding cost while changing the blocking position with two-pixel accuracy within the search range. Thus, interCost0 stores the smallest coding cost value within the search range. In step S29, the adjustment parameter interCostOffset for comparing the coding cost at the time of intra prediction and the coding cost at the time of inter prediction is added to interCost0. Thus, when the search accuracy is two-pixel accuracy, an inter prediction image that obtains the minimum coding cost and the minimum coding cost is obtained.
なお、本実施の形態においては、後述するように、イントラ予測の符号化コストとインター予測の符号化コストとの比較時に所定の閾値を用いているので、この閾値を適宜設定することにより、調整パラメータinterCostOffsetの加算は、省略してもよい。 In this embodiment, as will be described later, since a predetermined threshold is used when comparing the encoding cost of intra prediction and the encoding cost of inter prediction, adjustment can be made by appropriately setting this threshold. The addition of the parameter interCostOffset may be omitted.
次に、図4のステップS3において、CPUは、ステップS2の探索処理が最も探索精度が高い探索処理であるか否かを判定する。最も高い探索精度の探索処理でない場合には、処理をステップS4に移行して、イントラ予測における符号化コスト(イントラコスト)が十分に小さいか否かを判定する。例えば、CPUは、下記(2)式に示すように、イントラ予測における符号化コストintraCostがインター予測における符号化コストinterCost(この場合には、2画素精度で求めたinterCost0)より所定の閾値thIntra0を超えて小さいか否かを判定する。 Next, in step S3 in FIG. 4, the CPU determines whether or not the search process in step S2 is the search process with the highest search accuracy. If it is not the search process with the highest search accuracy, the process proceeds to step S4, and it is determined whether or not the encoding cost (intra cost) in intra prediction is sufficiently small. For example, as shown in the following equation (2), the CPU sets a predetermined threshold thIntra0 from the encoding cost intraCost in intra prediction based on the encoding cost interCost in inter prediction (in this case, interCost0 obtained with two-pixel accuracy). It is determined whether or not it is too small.
intraCost<interCost0−thIntra0 …(2)
上記(2)式を満足しない場合には、次のステップS6において、インターコストが十分に小さいか否かが判定される。例えば、CPUは、下記(3)式に示すように、インター予測における符号化コストinterCostがイントラ予測における符号化コストintraCost(この場合には、interCost0)より所定の閾値thInter0を超えて小さいか否かを判定する。
intraCost <interCost0-thIntra0 (2)
If the above equation (2) is not satisfied, it is determined in the next step S6 whether or not the inter cost is sufficiently small. For example, as shown in the following equation (3), the CPU determines whether or not the coding cost interCost in inter prediction is smaller than the coding cost intraCost in intra prediction (in this case, interCost0) exceeding a predetermined threshold thInter0. Determine.
interCost0<intraCost−thInter0 …(3)
上記(3)式を満足すると判定された場合、即ち、インター予測モードの方がイントラ予測モードよりも十分に低い符号化コストが得られると判定された場合には、CPUは処理をステップS7に移行して、従来と同様に、次に高い探索精度から最高探索精度まで順次探索処理を実施する。
interCost0 <intraCost-thInter0 (3)
If it is determined that the above equation (3) is satisfied, that is, if it is determined that the inter prediction mode can provide a sufficiently lower encoding cost than the intra prediction mode, the CPU proceeds to step S7. In the same manner as in the prior art, the search processing is sequentially performed from the next highest search accuracy to the highest search accuracy.
図7はCPUによる1画素精度の探索処理を示している。1画素精度の探索処理においては、図3において示したように、探索範囲は、2画素精度の探索処理における候補を含む範囲に設定される。従って、1画素精度において求められるイントラ予測の符号化コストは、必ず、2画素精度において求められるイントラ予測の符号化コスト以下の値となる。そこで、図7のステップS31において、CPUは、1画素精度の探索処理における最小の符号化コストの変数interCost1を、符号化コストとして取り得る最大値であるinterCost0に初期化する。 FIG. 7 shows search processing with one pixel accuracy by the CPU. In the search process with one pixel accuracy, as shown in FIG. 3, the search range is set to a range including candidates in the search process with two pixel accuracy. Therefore, the coding cost of intra prediction obtained with one pixel accuracy is always a value equal to or lower than the coding cost of intra prediction obtained with two pixel accuracy. Therefore, in step S31 of FIG. 7, the CPU initializes the variable interCost1 of the minimum encoding cost in the search process with one pixel accuracy to the interCost0 that is the maximum value that can be taken as the encoding cost.
次に、ステップS32において、インター予測画像を生成する。即ち、CPUは、所定の探索範囲内で、1画素精度で動きベクトルを探索し、動きベクトル候補を決定し、決定した動きベクトル候補からインター予測画像pred[x,y]を生成する。以後のステップS33〜S39の処理は、図6の2画素精度の探索処理と同様である。こうして、ステップS29において、1画素精度の探索処理における最小の符号化コストinterCost1が求められる。 Next, in step S32, an inter prediction image is generated. That is, the CPU searches for a motion vector with one pixel accuracy within a predetermined search range, determines a motion vector candidate, and generates an inter-predicted image pred [x, y] from the determined motion vector candidate. The subsequent steps S33 to S39 are the same as the two-pixel precision search process of FIG. Thus, in step S29, the minimum encoding cost interCost1 in the search process with one pixel accuracy is obtained.
次に、CPUは図8に示す1/2画素精度の探索処理を行う。1/2画素精度の探索処理においては、ステップS41において、CPUは、1/2画素精度の探索処理における最小の符号化コストの変数interCost2を、符号化コストとして取り得る最大値であるinterCost1に初期化する。 Next, the CPU performs a search process with 1/2 pixel accuracy shown in FIG. In the search process with 1/2 pixel accuracy, in step S41, the CPU initially sets a variable interCost2 of the minimum encoding cost in the search process with 1/2 pixel accuracy to interCost1, which is the maximum value that can be taken as the encoding cost. Turn into.
次に、ステップS42において、インター予測画像を生成する。即ち、CPUは、所定の探索範囲内で、1/2画素精度で動きベクトルを探索し、動きベクトル候補を決定し、決定した動きベクトル候補からインター予測画像pred[x,y]を生成する。以後のステップS43〜S49の処理は、図6の2画素精度の探索処理と同様である。こうして、ステップS49において、1/2画素精度の探索処理における最小の符号化コストinterCost2が求められる。 Next, in step S42, an inter prediction image is generated. That is, the CPU searches for a motion vector with a 1/2 pixel accuracy within a predetermined search range, determines a motion vector candidate, and generates an inter predicted image pred [x, y] from the determined motion vector candidate. The subsequent steps S43 to S49 are the same as the two-pixel precision search process of FIG. Thus, in step S49, the minimum encoding cost interCost2 in the search process with 1/2 pixel accuracy is obtained.
次に、CPUは図9に示す1/4画素精度の探索処理を行う。1/4画素精度の探索処理においては、ステップS51において、CPUは、1/4画素精度の探索処理における最小の符号化コストの変数interCost3を、符号化コストとして取り得る最大値であるinterCost2に初期化する。 Next, the CPU performs a search process with 1/4 pixel accuracy shown in FIG. In the 1/4 pixel precision search process, in step S51, the CPU initially sets a variable coding cost interCost3 of the minimum coding cost in the 1/4 pixel precision search process to interCost2, which is the maximum value that can be taken as the coding cost. Turn into.
次に、ステップS52において、インター予測画像を生成する。即ち、CPUは、所定の探索範囲内で、1/4画素精度で動きベクトルを探索し、動きベクトル候補を決定し、決定した動きベクトル候補からインター予測画像pred[x,y]を生成する。以後のステップS53〜S59の処理は、図6の2画素精度の探索処理と同様である。こうして、ステップS59において、1/4画素精度の探索処理における最小の符号化コストinterCost3が求められる。 Next, in step S52, an inter prediction image is generated. That is, the CPU searches for a motion vector with 1/4 pixel accuracy within a predetermined search range, determines a motion vector candidate, and generates an inter predicted image pred [x, y] from the determined motion vector candidate. The subsequent processing of steps S53 to S59 is the same as the two-pixel precision search processing of FIG. Thus, in step S59, the minimum encoding cost interCost3 in the search process with 1/4 pixel accuracy is obtained.
次のステップS8において、CPUは、インター予測モードを設定する。即ち、ステップS7の処理が行われる場合には、インター予測において、最低探索精度から最高探索精度までの全ての探索精度での処理が行われることになる。 In the next step S8, the CPU sets an inter prediction mode. That is, when the process of step S7 is performed, in the inter prediction, the process is performed with all the search precisions from the lowest search precision to the highest search precision.
これに対し、ステップS4において、上記(2)式を満足するものと判定されて、処理がステップS5に移行する場合には、最低探索精度から最高探索精度までの全ての探索精度での処理は行われない。例えば、インター予測の最低探索精度の探索処理において求められた符号化コストが十分に小さいと判定された場合には、CPUは、処理をステップS4からステップS5に移行して、イントラ予測モードを設定する。即ち、この場合には、インター予測の探索処理としては、最低探索精度の処理のみが行われることになる。 On the other hand, if it is determined in step S4 that the above equation (2) is satisfied and the process proceeds to step S5, the process with all search accuracy from the minimum search accuracy to the maximum search accuracy is performed. Not done. For example, if it is determined that the coding cost obtained in the search process with the minimum search accuracy for inter prediction is sufficiently small, the CPU shifts the process from step S4 to step S5 to set the intra prediction mode. To do. That is, in this case, only the process with the lowest search accuracy is performed as the inter prediction search process.
また、ステップS4において、上記(2)式を満足しないものと判定され、更に、ステップS6において上記(3)式も満足しないと判定された場合には、イントラ予測モードとインター予測モードとのいずれのモードにするかの決定を行わずに、ステップS9において次に高い探索精度の探索処理を行う。 In step S4, if it is determined that the above equation (2) is not satisfied, and further, if it is determined in step S6 that the above equation (3) is not satisfied, either the intra prediction mode or the inter prediction mode is selected. In step S9, the search processing with the next highest search accuracy is performed without determining whether to select the mode.
例えば、2画素精度の探索処理によって得られた符号化コストに基づいて、ステップS4,S6が判定されてステップS9に処理が移行した場合には、ステップS9において1画素精度の探索処理が行われる。そして、1画素精度の探索処理によって得られた符号化コストに基づいて、ステップS4,S6の判定が行われる。 For example, when steps S4 and S6 are determined based on the coding cost obtained by the search process with two pixel accuracy and the process proceeds to step S9, the search process with one pixel accuracy is performed at step S9. . Then, determinations in steps S4 and S6 are made based on the encoding cost obtained by the search process with one pixel accuracy.
例えば、ステップS4,S6では、下記(4),(5)式を満足するか否かが判定される。なお、CPUは、各階層毎に、ステップS4,S6に用いる閾値を再設定する。インター予測の符号化コストは、探索精度が高精度になる程小さくなるので、閾値も探索精度に応じて小さくした方がよい。 For example, in steps S4 and S6, it is determined whether or not the following expressions (4) and (5) are satisfied. In addition, CPU resets the threshold value used for step S4, S6 for every hierarchy. Since the encoding cost of inter prediction becomes smaller as the search accuracy becomes higher, it is better to reduce the threshold according to the search accuracy.
intraCost<interCost1−thIntra1 …(4)
interCost1<intraCost−thInter1 …(5)
上記(5)式を満足する場合には、次のステップS7が実行されることになり、上記(4)式を満足する場合には、次のステップS5が実行されることになる。ステップS5が実行される場合には、インター予測の2画素精度及び1画素精度の探索処理のみによって、イントラ予測モードが決定されることになる。
intraCost <interCost1-thIntra1 (4)
interCost1 <intraCost-thInter1 (5)
When the above equation (5) is satisfied, the next step S7 is executed, and when the above equation (4) is satisfied, the next step S5 is executed. When step S5 is executed, the intra prediction mode is determined only by the search process with the 2-pixel accuracy and the 1-pixel accuracy of inter prediction.
同様に、ステップS9において1/2画素精度の探索処理が行われる場合には、1/2画素精度の探索処理によって得られた符号化コストに基づいて、ステップS4,S6の判定が行われる。この場合には、CPUは、ステップS4,S6において、符号化コストが下記(6),(7)式を満足するか否かを判定する。 Similarly, when the search process with 1/2 pixel accuracy is performed in step S9, the determinations of steps S4 and S6 are made based on the coding cost obtained by the search process with 1/2 pixel accuracy. In this case, the CPU determines whether or not the encoding cost satisfies the following expressions (6) and (7) in steps S4 and S6.
intraCost<interCost2−thIntra2 …(6)
interCost2<intraCost−thInter2 …(7)
上記(7)式を満足する場合には、次のステップS7が実行されることになり、上記(6)式を満足する場合には、次のステップS5が実行されることになる。ステップS5が実行される場合には、インター予測の2画素精度〜1/2画素精度の探索処理によって、イントラ予測モードが決定されることになる。
intraCost <interCost2-thIntra2 (6)
interCost2 <intraCost-thInter2 (7)
When the above equation (7) is satisfied, the next step S7 is executed, and when the above equation (6) is satisfied, the next step S5 is executed. When step S5 is executed, the intra prediction mode is determined by the search process with the inter-prediction 2-pixel accuracy to 1 / 2-pixel accuracy.
ステップS9において1/4画素精度の探索処理が行われる場合には、CPUは、処理をステップS3からステップS10に移行させて、1/4画素精度の探索処理によって得られた符号化コストとイントラコストとの比較を行う。この場合には、CPUは、ステップS10において、例えば符号化コストが下記(8)式を満足するか否かを判定する。 When the 1/4 pixel precision search process is performed in step S9, the CPU shifts the process from step S3 to step S10, and the encoding cost and the intra obtained by the 1/4 pixel precision search process. Compare with cost. In this case, the CPU determines in step S10 whether, for example, the encoding cost satisfies the following expression (8).
interCost3>intraCost …(8)
上記(8)式を満足する場合には、ステップS5においてイントラ予測モードが設定され、上記(8)式を満足しない場合には、ステップS8においてインター予測モードが設定されることになる。
interCost3> intraCost (8)
If the expression (8) is satisfied, the intra prediction mode is set in step S5. If the expression (8) is not satisfied, the inter prediction mode is set in step S8.
ステップS5においてイントラ予測モードが設定される場合には、CPUは以降の探索処理を停止する。なお、図1では比較部46がインター予測画像生成部42を制御することで探索処理を停止させることができる。即ち、ステップS4の比較処理において、イントラ予測モードが選択された場合には、その階層以降の探索処理が停止されることになり、その分の計算を省略することができる。つまり、インター予測における演算量の削減が可能である。
When the intra prediction mode is set in step S5, the CPU stops the subsequent search process. In FIG. 1, the search process can be stopped by the comparison unit 46 controlling the inter predicted
このように本実施の形態においては、インター予測の探索処理を探索精度毎に階層化して行い、各階層毎にイントラ予測とインター予測の符号化コストによるモードの決定処理を行い、イントラ予測モードの決定を行った場合には、次の階層の探索処理を停止させるようになっている。これにより、インター予測における演算量を削減することができ、消費電力を削減させることが可能である。また、インター予測の演算量が少なくなるので、モード決定に要する時間を短縮することもできる。 As described above, in the present embodiment, the inter prediction search process is hierarchized for each search accuracy, and the mode determination process is performed for each hierarchy based on the intra prediction and the inter prediction encoding cost. When the determination is made, the search process for the next hierarchy is stopped. Thereby, the calculation amount in the inter prediction can be reduced, and the power consumption can be reduced. In addition, since the amount of calculation for inter prediction is reduced, the time required for mode determination can be shortened.
なお、本発明は上記各実施の形態に限定されるものではなく、種々の変形が可能である。例えば、符号化装置の構成及び符号化手法は、特に限定されるものではない。 In addition, this invention is not limited to said each embodiment, A various deformation | transformation is possible. For example, the configuration of the encoding device and the encoding method are not particularly limited.
23…予測信号生成部、41…イントラ予測画像生成部、42…インター予測画像生成部、44…差分画像生成部、45…符号化コスト計算部、46…比較部。
DESCRIPTION OF
Claims (5)
インター予測における予測画像の探索処理を探索精度に応じて階層化し、探索精度を低い精度から高い精度に階層毎に順次切り換えて、各階層毎に符号化コストに基づいてインター予測における予測画像を探索して決定するインター予測画像生成部と、
前記イントラ予測画像生成部が決定した予測画像の符号化コストと前記インター予測画像生成部が決定した予測画像の符号化コストとを前記階層毎に比較し、比較結果に基づいて前記階層毎にイントラ予測とインター予測とのいずれかの予測モードを決定し又は決定を保留し、予測モードをイントラ予測のモードに決定した場合には、前記インター予測画像生成部における以後の階層の探索処理を停止させる比較部と
を具備したことを特徴とする動画像符号化装置。 An intra-prediction image generation unit that searches and determines a prediction image in intra prediction based on the coding cost;
Search processing for predicted images in inter prediction is hierarchized according to search accuracy, search accuracy is sequentially switched from low to high accuracy for each layer, and prediction images in inter prediction are searched based on coding cost for each layer An inter-prediction image generation unit to be determined,
The encoding cost of the prediction image determined by the intra-prediction image generation unit and the encoding cost of the prediction image determined by the inter-prediction image generation unit are compared for each hierarchy, and the intra cost is calculated for each hierarchy based on the comparison result. When the prediction mode of prediction or inter prediction is determined or suspended, and the prediction mode is determined to be the intra prediction mode, the search process of the subsequent layers in the inter prediction image generation unit is stopped. A moving picture coding apparatus comprising: a comparison unit.
前記イントラ予測画像生成部が決定した予測画像の符号化コストが前記インター予測画像生成部が決定した予測画像の符号化コストより所定の閾値を超えて小さい場合には、予測モードをイントラ予測モードに決定し、
前記インター予測画像生成部が決定した予測画像の符号化コストが前記イントラ予測画像生成部が決定した予測画像の符号化コストより所定の閾値を超えて小さい場合には、予測モードをインター予測モードに決定し、
前記イントラ予測画像生成部が決定した予測画像の符号化コストと前記インター予測画像生成部が決定した予測画像の符号化コストとの差が所定の閾値以内である場合には、予測モードの決定を保留することを特徴とする請求項1に記載の動画像符号化装置。 The comparison unit includes:
When the encoding cost of the prediction image determined by the intra prediction image generation unit is smaller than the encoding cost of the prediction image determined by the inter prediction image generation unit by exceeding a predetermined threshold, the prediction mode is changed to the intra prediction mode. Decide
When the encoding cost of the prediction image determined by the inter prediction image generation unit is smaller than the encoding cost of the prediction image determined by the intra prediction image generation unit exceeding a predetermined threshold, the prediction mode is set to the inter prediction mode. Decide
When the difference between the encoding cost of the prediction image determined by the intra prediction image generation unit and the encoding cost of the prediction image determined by the inter prediction image generation unit is within a predetermined threshold, the prediction mode is determined. The video encoding apparatus according to claim 1, wherein the video encoding apparatus holds the video.
インター予測における予測画像の探索処理を探索精度に応じて階層化し、探索精度を低い精度から高い精度に階層毎に順次切り換えて、各階層毎に符号化コストに基づいてインター予測における予測画像を探索して決定し、
前記イントラ予測における予測画像の符号化コストと前記インター予測における予測画像の符号化コストとを前記階層毎に比較し、
比較結果に基づいて前記階層毎にイントラ予測とインター予測とのいずれかの予測モードを決定し又は決定を保留し、
予測モードをイントラ予測のモードに決定した場合には、前記インター予測における以後の探索処理を停止させることを特徴とする動画像符号化方法。 Search and determine the prediction image in intra prediction based on the coding cost,
Search processing for predicted images in inter prediction is hierarchized according to search accuracy, search accuracy is sequentially switched from low to high accuracy for each layer, and prediction images in inter prediction are searched based on coding cost for each layer Decide
Comparing the encoding cost of the prediction image in the intra prediction and the encoding cost of the prediction image in the inter prediction for each layer,
Based on the comparison result, determine any prediction mode of intra prediction and inter prediction for each tier or hold the decision,
A moving picture coding method characterized by stopping subsequent search processing in the inter prediction when the prediction mode is determined to be an intra prediction mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008068070A JP2009225163A (en) | 2008-03-17 | 2008-03-17 | Video encoder and video encoding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008068070A JP2009225163A (en) | 2008-03-17 | 2008-03-17 | Video encoder and video encoding method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009225163A true JP2009225163A (en) | 2009-10-01 |
Family
ID=41241479
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008068070A Pending JP2009225163A (en) | 2008-03-17 | 2008-03-17 | Video encoder and video encoding method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009225163A (en) |
-
2008
- 2008-03-17 JP JP2008068070A patent/JP2009225163A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7145252B2 (en) | Video decoding method | |
JP6291613B2 (en) | Video encoding device | |
JP5467701B2 (en) | Motion vector search method and apparatus, program thereof, and recording medium storing program | |
JP2007166039A (en) | Image coding equipment | |
JP2006270435A (en) | Dynamic image encoder | |
JP2009111691A (en) | Image-encoding device and encoding method, and image-decoding device and decoding method | |
JP2010081465A (en) | Moving image encoding method and moving image decoding method | |
JP2009055519A (en) | Encoding processing apparatus, encoding processing method, decoding processing apparatus, and decoding processing method | |
JP2008219612A (en) | Data embedding apparatus, data extracting apparatus, data embedding method, and data extracting metho | |
EP2343899A1 (en) | Method and device for video transcoding using quad-tree based mode selection | |
JP2006246396A (en) | Moving picture processing apparatus, method, and program | |
JP2008011431A (en) | Image coding apparatus | |
JP2005244749A (en) | Dynamic image encoding device | |
KR102532484B1 (en) | Method and apparatus for encoding and decoding a data stream representing at least one image | |
JPWO2016116984A1 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding program | |
JPWO2013014693A1 (en) | Video decoding method and video encoding method | |
CA2726973C (en) | Method and device for motion vector estimation in video transcoding using union of search areas | |
CA2726974A1 (en) | Method and device for motion vector estimation in video transcoding using full-resolution residuals | |
JP2009049969A (en) | Device and method of coding moving image and device and method of decoding moving image | |
JP2015111774A (en) | Video coding device and video coding program | |
JP2009225163A (en) | Video encoder and video encoding method | |
JP2006025033A (en) | Device and method for image processing | |
US20070110157A1 (en) | Power optimized collocated motion estimation method | |
JP5281597B2 (en) | Motion vector prediction method, motion vector prediction apparatus, and motion vector prediction program | |
JP6696889B2 (en) | IMAGE ENCODING DEVICE, IMAGE ENCODING METHOD, AND COMPUTER PROGRAM |