JP2012124542A - Moving image encoding method and moving image decoding method - Google Patents

Moving image encoding method and moving image decoding method Download PDF

Info

Publication number
JP2012124542A
JP2012124542A JP2009048727A JP2009048727A JP2012124542A JP 2012124542 A JP2012124542 A JP 2012124542A JP 2009048727 A JP2009048727 A JP 2009048727A JP 2009048727 A JP2009048727 A JP 2009048727A JP 2012124542 A JP2012124542 A JP 2012124542A
Authority
JP
Japan
Prior art keywords
prediction
decoding
image
encoding
target block
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
JP2009048727A
Other languages
Japanese (ja)
Inventor
Yuto Komatsu
佑人 小松
Masashi Takahashi
昌史 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2009048727A priority Critical patent/JP2012124542A/en
Priority to PCT/JP2010/001198 priority patent/WO2010100860A1/en
Publication of JP2012124542A publication Critical patent/JP2012124542A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/40Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
    • H03M7/42Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code using table look-up for the coding or decoding process, e.g. using read-only memory
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a moving image encoding technology and a moving image decoding technology for supplying a video of high image quality with a small code amount.SOLUTION: An encoding stream is inputted, and a prediction mode of a block being a decoding object, which is included in the encoding stream, is discriminated. An estimation index value of a prediction error of the block of the decoding object is calculated based on a previously decoded image by a calculation system corresponding to the discriminated prediction mode. A decoding table used for a variable length decoding processing is determined from a plurality of decoding tables based on the calculated estimation index value. A variable length decoding processing is performed on data of the encoding stream based on the determined decoding table. An inverse quantization processing and an inverse frequency conversion processing are performed on data on which the variable length decoding processing is performed, and a prediction difference is decoded. A decoding image is generated based on the decoded prediction difference and a predicted image generated by a prediction processing by the discriminated prediction mode.

Description

本発明は動画像を符号化する動画像符号化技術、符号化された動画像を復号化する動画像復号化技術に関する。 The present invention relates to a moving image encoding technique for encoding a moving image and a moving image decoding technique for decoding an encoded moving image.

大容量の動画像情報をデジタルデータ化して記録、伝達する手法として、MPEG (Moving Picture Experts Group)方式等の符号化方式が策定され、MPEG-1規格、MPEG-2規格、MPEG-4規格、H.264/AVC(Advanced Video Coding)規格等として国際標準の符号化方式となっている。これらの方式はデジタル衛星放送やDVD、携帯電話やデジタルカメラなどにおける符号化方式として採用され、現在ますます利用の範囲が広がり、身近なものとなってきている。   Encoding methods such as MPEG (Moving Picture Experts Group) method have been established as a method for recording and transmitting large-capacity moving image information as digital data, and MPEG-1 standard, MPEG-2 standard, MPEG-4 standard, It is an international standard encoding method such as H.264 / AVC (Advanced Video Coding) standard. These systems have been adopted as encoding systems for digital satellite broadcasting, DVDs, mobile phones, digital cameras, and the like, and the range of use is now expanding and becoming familiar.

これらの規格では、符号化処理が完了した画像情報を利用して符号化対象画像をブロック単位で予測し、原画像との予測差分を可変長符号化することによって、符号量を減らしている。   In these standards, the encoding amount is reduced by predicting the encoding target image in units of blocks using the image information for which the encoding process has been completed, and variable-length encoding the prediction difference from the original image.

特にH.264/AVCでは、符号化対象ブロックの周辺画素を利用する画面内予測符号化方式と、符号化対象ブロックの前後の画面の画素を利用する画面間予測符号化方式とを採用して予測差分のみを符号化する。   In particular, H.264 / AVC employs an intra-screen predictive coding scheme that uses the surrounding pixels of the encoding target block and an inter-screen predictive encoding scheme that uses the pixels of the screen before and after the encoding target block. Only the prediction difference is encoded.

しかし、上記可変長符号化における符号表は、予測差分が小さくなることを想定して作成されているため、予測精度が低いと予測誤差が大きくなり、符号量が膨大になるといった課題があった。   However, since the code table in the variable length coding is created on the assumption that the prediction difference is small, there is a problem that the prediction error increases and the code amount becomes enormous if the prediction accuracy is low. .

この課題を解決する試みとして特許文献1の段落0007には、「符号化対象ブロックの周辺に位置する符号化済ブロック中に含まれる0以外の係数の個数に基づいて、前記符号化対象ブロック中に含まれる0以外の係数の個数の予測値を算出する予測ステップと、前記予測ステップにより算出された前記予測値に基づいて可変長符号化用のテーブルを選択するテーブル選択ステップと、前記テーブル選択ステップにより選択された前記可変長符号化用のテーブルを参照して、前記符号化対象ブロック中に含まれる0以外の係数の個数に対して可変長符号化を行う可変長符号化ステップとを含む」ように構成することが記載されている。   As an attempt to solve this problem, paragraph 0007 of Patent Document 1 states that “based on the number of non-zero coefficients included in an encoded block located around the encoding target block, A prediction step for calculating a prediction value for the number of coefficients other than 0 included in the table, a table selection step for selecting a variable length coding table based on the prediction value calculated by the prediction step, and the table selection A variable length coding step for performing variable length coding on the number of non-zero coefficients included in the coding target block with reference to the variable length coding table selected in the step. It is described that it is constituted as follows.

特開2008−193725JP2008-193725

しかしながら、特許文献1開示の技術は「直交変換を適用したブロック中に含まれる0以外の係数の個数」について高効率化な可変長符号化処理を図るものであって、その他の種類の係数について高効率化な可変長符号化処理を行うことはできないという課題があった。   However, the technique disclosed in Patent Document 1 is intended to perform variable-length coding processing with high efficiency for “the number of coefficients other than 0 included in a block to which orthogonal transform is applied”. There was a problem that highly efficient variable-length encoding processing could not be performed.

本発明は上記課題を鑑みてなされたものであり、その目的は、少ない符号量で高画質の映像を提供する動画像符号化技術および動画像復号化技術を提供することである。   The present invention has been made in view of the above problems, and an object thereof is to provide a moving picture encoding technique and a moving picture decoding technique that provide high-quality video with a small code amount.

本発明の一実施の形態は、たとえば、符号化ストリームを入力し、符号化ストリームに含まれる復号化対象ブロックの予測モードを判別し、判別した予測モードに対応する算出方式により、既に復号化済みの画像に基づいて復号化対象ブロックの予測誤差の推定指標値を算出し、算出した推定指標値に基づいて、複数の復号化テーブルから、可変長復号化処理に用いる復号化テーブルを決定し、決定した復号化テーブルに基づいて符号化ストリームのデータに可変長復号化処理を行い、可変長復号化処理を行ったデータに逆量子化処理及び逆周波数変換処理を行って予測差分を復号し、復号した予測差分と判別した予測モードによる予測処理により生成した予測画像とに基づいて復号画像を生成する。   In one embodiment of the present invention, for example, an encoded stream is input, a prediction mode of a decoding target block included in the encoded stream is determined, and already decoded by a calculation method corresponding to the determined prediction mode An estimated index value of a prediction error of a decoding target block is calculated based on the image of, and a decoding table used for variable length decoding processing is determined from a plurality of decoding tables based on the calculated estimated index value, Based on the determined decoding table, the encoded stream data is subjected to variable length decoding processing, the variable length decoding processing data is subjected to inverse quantization processing and inverse frequency transform processing to decode the prediction difference, A decoded image is generated based on the decoded prediction difference and the predicted image generated by the prediction process in the determined prediction mode.

本発明によれば、少ない符号量で高画質の映像を提供する動画像符号化技術および動画像復号化技術を提供することができる。   According to the present invention, it is possible to provide a moving picture encoding technique and a moving picture decoding technique that provide high-quality video with a small code amount.

実施例1に係る画像符号化装置のブロック図の一例Example of block diagram of image coding apparatus according to embodiment 1 実施例1に係る可変長符号化部のブロック図の一例Example of block diagram of variable-length encoding unit according to embodiment 1 実施例1に係る画像復号化装置のブロック図の一例Example of block diagram of image decoding apparatus according to embodiment 1 実施例1に係る可変長復号化部のブロック図の一例Example of block diagram of variable length decoding unit according to embodiment 1 実施例1に係る画面間予測の一例の概念的な説明図Conceptual explanatory diagram of an example of inter-screen prediction according to the first embodiment. 実施例1に係る画面内予測の一例の概念的な説明図Conceptual explanatory diagram of an example of intra prediction according to the first embodiment. H.264規格の可変長符号化の概念的な説明図Conceptual illustration of H.264 standard variable length coding 実施例1に係る画面間予測向けの予測誤差推定指標値算出処理の一例の概念的な説明図Conceptual explanatory diagram of an example of a prediction error estimation index value calculation process for inter-screen prediction according to the first embodiment 実施例1に係る画面間予測向けの予測誤差推定指標値算出処理の一例の説明図Explanatory drawing of an example of the prediction error estimation index value calculation process for the inter-screen prediction which concerns on Example 1. FIG. 実施例2に係る画面間予測向けの予測誤差推定指標値算出処理の一例の説明図Explanatory drawing of an example of the prediction error estimation index value calculation process for inter-screen prediction which concerns on Example 2. FIG. 実施例1に係る画面内予測向けの予測誤差推定指標値算出処理の一例の説明図Explanatory drawing of an example of the prediction error estimation index value calculation process for the prediction in a screen which concerns on Example 1. FIG. 実施例2に係る画面内予測向けの予測誤差推定指標値算出処理の一例の説明図Explanatory drawing of an example of the prediction error estimation index value calculation process for the prediction in a screen which concerns on Example 2. FIG. 実施例1に係る符号化・復号化テーブルの決定方法の一例の説明図Explanatory drawing of an example of the determination method of the encoding / decoding table which concerns on Example 1. FIG. 実施例1に係る画像符号化方法の流れ図の一例An example of a flowchart of an image encoding method according to the first embodiment 実施例1に係る画像復号化方法の流れ図の一例Example of flowchart of image decoding method according to embodiment 1 実施例1に係る可変長符号化方法の流れ図の一例Example of flowchart of variable length coding method according to embodiment 1 実施例1に係る可変長復号化方法の流れ図の一例Example of flowchart of variable length decoding method according to embodiment 1 実施例1に係る符号化テーブルの一例の説明図Explanatory drawing of an example of the encoding table which concerns on Example 1. FIG.

以下、本発明の実施例を、図面を参照して説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は実施例1における動画像符号化装置の一例を示したものである。動画像符号化装置は、入力された原画像(101)を保持する入力画像メモリ(102)と、入力画像を小領域に分割するブロック分割部(103)と、ブロック単位で画面内予測を行って予測画像を生成する画面内予測部(105)と、対象ブロックについての動き探索を行って動きベクトルを算出し、当該動きベクトルに基づいて画面間予測処理により予測画像を生成する画面間予測部(106)と、画像の性質に合った予測モード(予測方法およびブロックサイズ)を決定して、決定した予測モードの予測画像を出力するモード決定部(107)と、入力画像から決定した予測モードの予測画像を減算して予測差分を生成する減算部(108)と、予測差分に対して符号化を行う周波数変換部(109)および量子化部(110)と、可変長符号化処理を行う可変長符号化部(111)と、周波数変換及び量子化した予測差分を復号化する逆量子化処理部(112)および逆周波数変換部(113)と、復号化された予測差分と決定した予測モードの予測画像を用いて復号化画像を生成する加算部(114)と、後の予測処理に用いるための復号化画像を保持する参照画像メモリ(104)を有する。以下、各部の詳細な動作について説明する。   FIG. 1 shows an example of a moving image encoding apparatus according to the first embodiment. The moving image encoding apparatus performs an intra-screen prediction in units of blocks, an input image memory (102) that holds an input original image (101), a block division unit (103) that divides the input image into small regions. An intra-screen prediction unit (105) that generates a predicted image and an inter-screen prediction unit that calculates a motion vector by performing a motion search on the target block, and generates a predicted image by an inter-screen prediction process based on the motion vector (106), a mode determination unit (107) for determining a prediction mode (prediction method and block size) suitable for the nature of the image, and outputting a prediction image of the determined prediction mode, and a prediction mode determined from the input image A subtractor (108) that subtracts the predicted image to generate a prediction difference, a frequency conversion unit (109) and a quantization unit (110) that perform encoding on the prediction difference, and performs variable-length encoding processing Variable length encoder (111), frequency conversion and quantization An inverse quantization processing unit (112) and an inverse frequency transform unit (113) for decoding the predicted prediction difference, and an adding unit for generating a decoded image using the decoded prediction difference and the predicted image of the determined prediction mode (114) and a reference image memory (104) that holds a decoded image for use in later prediction processing. Hereinafter, detailed operations of each unit will be described.

入力画像メモリ(102)は原画像(101)の中から一枚の画像を符号化対象画像として保持する。ブロック分割部(103)は、原画像を複数のブロックに分割して、画面内予測部(105)、および画面間予測部(106)に出力する。画面間予測部(106)は、参照画像メモリ(117)に格納されている復号化済み画像を用いて、動き探索により対象ブロックの動きベクトルを算出し、ブロック単位で画面間予測処理を実行する。   The input image memory (102) holds one image from the original image (101) as an encoding target image. The block dividing unit (103) divides the original image into a plurality of blocks, and outputs them to the intra-screen prediction unit (105) and the inter-screen prediction unit (106). The inter-screen prediction unit (106) calculates the motion vector of the target block by motion search using the decoded image stored in the reference image memory (117), and executes the inter-screen prediction process on a block basis .

ここで、画面間予測部(106)による画面間予測処理の詳細について図5を用いて説明する。画面間予測部(106)では、符号化対象画像に対してラスタースキャンの順序に従ってブロック単位による符号化を行う。画面間予測を行う際には、符号化対象画像(503)と同じ映像(501)に含まれる符号化済みの画像の復号画像を参照画像(502)とし、対象画像中の対象ブロック(504)と相関の高い参照ブロック(予測画像)(505)を参照画像中から探索する動き探索を行う。探索結果として動きベクトルを算出し、対象ブロック(504)の符号化に用いる予測画像(505)を決定する。   Here, details of the inter-screen prediction processing by the inter-screen prediction unit (106) will be described with reference to FIG. The inter-screen prediction unit (106) performs encoding in units of blocks on the encoding target image in the raster scan order. When performing inter-screen prediction, the decoded image of the encoded image included in the same video (501) as the encoding target image (503) is set as the reference image (502), and the target block (504) in the target image Motion search is performed to search a reference block (predicted image) (505) having a high correlation with the reference image from the reference image. A motion vector is calculated as a search result, and a prediction image (505) used for encoding the target block (504) is determined.

図1において、画面間予測部(106)は、当該動きベクトルを可変長符号化部(111)に出力し、対象ブロックについての予測画像をモード決定部(107)に出力する。   In FIG. 1, the inter-screen prediction unit (106) outputs the motion vector to the variable length coding unit (111), and outputs the predicted image for the target block to the mode determination unit (107).

また、画面内予測部(105)は、ブロック単位で画面内予測処理を実行する。画面内予測部(105)による画面内予測処理の詳細について図6を用いて説明する。画面内予測部(105)では、符号化対象ブロックの左、左上、上、右上に隣接する符号化済みのブロックの復号化画像を用いて予測を行う。特に、予測にはこれらのブロックに含まれる13個の画素を参照画素として利用し、予測方向ベクトルを傾きとする同一直線上の画素はすべて同一画素から予測する(601)。さらに、予測方向については、説明(602)に示すように、縦、横、斜めなど、8種類の予測方向候補の中から最適なものをブロック単位で選択する。すなわち、画面内予測処理における予測とは、符号化対象ブロックの予測画像を、隣接する符号化済みのブロックの画素の画素値を選択した予測方向上の画素にコピーすることにより生成することである。また、上記の8種類の方向に沿った予測の他に、上記13個の画素を参照画素のうち対象ブロックの上または左に隣接するブロックに属する8個の画素の画素値の平均値によって符号化対象ブロックに含まれるすべての画素を予測する「DC予測」も利用可能である(602)。この場合、予測画像のすべての画素値が、上記8個の画素の画素値の平均値となる。   The intra-screen prediction unit (105) performs intra-screen prediction processing in units of blocks. Details of the intra-screen prediction processing by the intra-screen prediction unit (105) will be described with reference to FIG. The intra prediction unit (105) performs prediction using the decoded images of the encoded blocks adjacent to the left, upper left, upper, and upper right of the encoding target block. In particular, for prediction, 13 pixels included in these blocks are used as reference pixels, and all pixels on the same straight line having a prediction direction vector as an inclination are predicted from the same pixel (601). Further, as shown in the description (602), the optimum prediction direction is selected in units of blocks from eight types of prediction direction candidates such as vertical, horizontal, and diagonal directions. That is, the prediction in the in-screen prediction process is to generate the prediction image of the encoding target block by copying the pixel value of the pixel of the adjacent encoded block to the pixel in the selected prediction direction. . In addition to the prediction along the above eight types of directions, the 13 pixels are encoded by the average value of the pixel values of the 8 pixels belonging to the block adjacent to the target block above or to the left of the reference pixels. “DC prediction” for predicting all pixels included in the conversion target block can also be used (602). In this case, all the pixel values of the predicted image are average values of the pixel values of the eight pixels.

図1において、画面内予測部(105)は、画面内予測処理において用いた予測方法の種類の情報(例えば、予測方向またはDC予測などの画面内予測モードの種類を示す情報)を可変長符号化部(111)に出力し、対象ブロックについての予測画像をモード決定部(107)に出力する。   In FIG. 1, an intra-screen prediction unit (105) uses variable-length codes for information on the type of prediction method used in the intra-screen prediction process (for example, information indicating the type of intra-screen prediction mode such as prediction direction or DC prediction). And outputting the prediction image for the target block to the mode determining unit (107).

次に、図1において、モード決定部(107)は画面内予測処理または画面間予測処理の結果に基づいて最適な予測モードを決定する。減算部(108)では、原画像の対象ブロック画像から決定した予測モードの予測画像を減算して予測差分を生成し、周波数変換部(109)に出力する。周波数変換部(109)は、取得した予測差分に対してDCT(Discrete Cosine Transformation:離散コサイン変換)などの周波数変換処理を行う。続いて、量子化処理部(110)が量子化処理を行って、可変長符号化処理部(111)および逆量子化処理部(112)に出力する。さらに可変長符号化処理部(111)は、対象ブロックの周辺ブロックの画素の画素値に基づいて予測誤差推定指標値を算出し、当該予測誤差推定指標値に基づいて符号化テーブルを決定する。次に、決定した符号化テーブルを用いて、量子化された予測差分情報、画面内予測処理で用いた予測方向や画面間予測処理で用いた動きベクトルなど、復号化に必要な情報を可変長符号化して符号化ストリームを生成する。当該可変長符号化処理部(111)の処理の詳細については後述する。   Next, in FIG. 1, the mode determination unit (107) determines an optimal prediction mode based on the result of the intra-screen prediction process or the inter-screen prediction process. The subtraction unit (108) subtracts the prediction image in the prediction mode determined from the target block image of the original image to generate a prediction difference, and outputs the prediction difference to the frequency conversion unit (109). The frequency conversion unit (109) performs frequency conversion processing such as DCT (Discrete Cosine Transformation) on the acquired prediction difference. Subsequently, the quantization processing unit (110) performs quantization processing and outputs the result to the variable length coding processing unit (111) and the inverse quantization processing unit (112). Further, the variable length coding processing unit (111) calculates a prediction error estimation index value based on the pixel values of the pixels of the peripheral block of the target block, and determines a coding table based on the prediction error estimation index value. Next, using the determined coding table, variable length information necessary for decoding, such as quantized prediction difference information, prediction direction used in intra prediction processing, and motion vector used in inter prediction processing Encode to generate an encoded stream. Details of the processing of the variable length coding processing unit (111) will be described later.

また、逆量子化処理部(112)は、予測差分情報の量子化された周波数変換係数に対して、逆量子化処理を行い、逆周波数変換部(113)では、IDCT(Inverse DCT:逆DCT)などの逆周波数変換処理を行い、予測差分を生成して加算部(114)に出力する。続いて、加算部(114)は、予測差分を決定した予測モードの予測画像に加算して、復号化画像を生成する。生成された復号化画像は参照画像メモリ(104)に格納される。   The inverse quantization processing unit (112) performs an inverse quantization process on the quantized frequency transform coefficient of the prediction difference information, and the inverse frequency transform unit (113) performs IDCT (Inverse DCT: Inverse DCT). ) And the like, and a prediction difference is generated and output to the adding unit (114). Subsequently, the adding unit (114) adds the prediction difference to the prediction image in the prediction mode in which the prediction difference is determined, and generates a decoded image. The generated decoded image is stored in the reference image memory (104).

次に、可変長符号化処理部(111)の処理の詳細について、従来のH.264規格の可変長符号化処理と比較して説明する。   Next, details of the processing of the variable length coding processing unit (111) will be described in comparison with the conventional variable length coding processing of the H.264 standard.

まず、図7を用いてH.264規格の可変長符号化処理(CAVLC)について説明する。H.264/AVCでは、符号化対象ブロックについて、画面間予測処理または画面内予測処理により生成した予測差分に周波数変換処理(DCT変換等)と量子化処理を行った係数値をジグザグスキャンによって1次元配列に変換とする。次に、当該1次元配列に含まれる(1)〜(6)に示す6種類の情報について、例えば図示する特性を有する符号化テーブルを用いて可変長符号化する。   First, variable length coding processing (CAVLC) of the H.264 standard will be described with reference to FIG. In H.264 / AVC, a coefficient value obtained by performing frequency conversion processing (such as DCT conversion) and quantization processing on a prediction difference generated by inter-screen prediction processing or intra-screen prediction processing is encoded by a zigzag scan. Convert to a dimensional array. Next, the six types of information shown in (1) to (6) included in the one-dimensional array are subjected to variable length encoding using, for example, an encoding table having the illustrated characteristics.

これに対し、本実施例における動画像符号化装置の可変長符号化部(111)の詳細な構成の一例を図2に示す。可変長符号化部(111)は、例えば、予測誤差推定指標値算出部(201)と、テーブル決定部(202)と、符号化部(203)とを有する。予測誤差推定指標値算出部(201)は、参照画像メモリ(104)から符号化対象ブロックに隣接する符号化済みの周辺ブロックの画素値を取得し、符号化対象ブロックについての予測誤差の推定指標値を算出する。なお、予測誤差推定指標値算出部(201)は、モード決定部(107)から決定した予測モードの情報を取得し、決定した予測モードが画面内予測モードか、画面間予測モードかによって、予測誤差推定指標値算出処理の種類を切り替える。当該予測誤差推定指標値算出処理は、画面内予測部(105)から上述の予測方法の種類の情報を取得し、画面間予測部(106)から上述の動きベクトルを取得して行うが、それぞれの予測モードに応じた予測誤差推定指標値算出処理の詳細については後述する。テーブル決定部(202)は、予測誤差推定指標値算出部(201)が算出した予測誤差推定指標値に基づいて、予め保持している複数の符号化テーブルのうちから可変長符号化処理に用いる符号化テーブルを決定する。符号化部(203)は、決定した符号化テーブルを用いて、量子化処理部(110)から取得した量子化後の係数について可変長符号化処理を行う。なお、符号化部(203)は、画面内予測部(105)から上述の予測方法の種類の情報を取得し、画面間予測部(106)から上述の動きベクトルを取得するが、これらについては、テーブル決定部(202)で決定した符号化テーブル以外の符号化テーブルや、その他の符号化方法によって符号化して構わない。   On the other hand, FIG. 2 shows an example of a detailed configuration of the variable length coding unit (111) of the moving picture coding apparatus according to the present embodiment. The variable length coding unit (111) includes, for example, a prediction error estimation index value calculation unit (201), a table determination unit (202), and a coding unit (203). A prediction error estimation index value calculation unit (201) obtains pixel values of encoded peripheral blocks adjacent to the encoding target block from the reference image memory (104), and estimates prediction errors for the encoding target block. Calculate the value. The prediction error estimation index value calculation unit (201) acquires information on the prediction mode determined from the mode determination unit (107), and predicts depending on whether the determined prediction mode is the intra prediction mode or the inter prediction mode. Switches the type of error estimation index value calculation processing. The prediction error estimation index value calculation processing is performed by acquiring information on the type of the prediction method described above from the intra-screen prediction unit (105) and acquiring the motion vector described above from the inter-screen prediction unit (106). Details of the prediction error estimation index value calculation process according to the prediction mode will be described later. Based on the prediction error estimation index value calculated by the prediction error estimation index value calculation unit (201), the table determination unit (202) is used for variable length encoding processing from among a plurality of encoding tables held in advance. Determine the encoding table. The encoding unit (203) performs variable length encoding processing on the quantized coefficients acquired from the quantization processing unit (110) using the determined encoding table. The encoding unit (203) acquires information on the type of the prediction method described above from the intra-screen prediction unit (105), and acquires the motion vector described above from the inter-screen prediction unit (106). The encoding may be performed using an encoding table other than the encoding table determined by the table determination unit (202), or other encoding methods.

ここで、図13及び図18を用いて、上述の可変長符号化部(111)による、符号化テーブルの決定方法の一例について説明する。   Here, an example of a coding table determination method by the above-described variable length coding unit (111) will be described with reference to FIGS.

まず、可変長符号化部(111)は、例えば、図示しない記憶部などに予め、図18に示すような特性の異なる複数の符号化テーブルを保持している。ここで、図18のテーブルAは、量子化済みの予測差分の係数値が小さい場合には符号長が比較的小さいが、係数値が大きい場合には、符号長が比較的大きくなる特性を有するテーブルである。これに対し、テーブルCは、係数値が大きくても符号長は比較的大きくならないが、係数値が小さい場合にも符号長が比較的小さくならない特性を有するテーブルである。テーブルBは、テーブルAとテーブルCの間の特性を有するテーブルである。   First, the variable length coding unit (111) holds, for example, a plurality of coding tables having different characteristics as shown in FIG. Here, the table A in FIG. 18 has a characteristic that the code length is relatively small when the coefficient value of the quantized prediction difference is small, but the code length is relatively large when the coefficient value is large. It is a table. In contrast, the table C is a table having a characteristic that the code length does not become relatively large even when the coefficient value is large, but the code length does not become relatively small even when the coefficient value is small. Table B is a table having characteristics between Table A and Table C.

ここで、テーブル決定部(202)は、例えば、予測誤差推定指標値算出部(201)の算出した予測誤差推定指標値をXとして、Xが所定の閾値S1以下の場合、図13のテーブルAを選択する。この場合、符号化部(203)の符号化処理においてテーブルAを用いることにより、テーブルB、Cを用いた場合よりも符号長を小さくすることが可能となり符号量を低減できる。   Here, for example, when the prediction error estimation index value calculated by the prediction error estimation index value calculation unit (201) is X and X is equal to or less than a predetermined threshold value S1, the table determination unit (202) performs table A in FIG. Select. In this case, by using the table A in the encoding process of the encoding unit (203), the code length can be made smaller than when the tables B and C are used, and the code amount can be reduced.

また、テーブル決定部(202)は、Xが所定の閾値S2より大きい場合、図13のテーブルCを選択する。この場合、符号化部(203)の符号化処理においてテーブルCを用いることにより、テーブルA、Bを用いた場合よりも符号長を小さくすることが可能となり、符号量を低減できる。   Further, the table determination unit (202) selects the table C in FIG. 13 when X is larger than the predetermined threshold value S2. In this case, by using the table C in the encoding process of the encoding unit (203), the code length can be made smaller than when the tables A and B are used, and the code amount can be reduced.

同様に、テーブル決定部(202)は、Xが所定の閾値S1より大きく、閾値S2以下である場合は図13のテーブルBを選択する。この場合、符号化部(203)の符号化処理においてテーブルBを用いることにより、テーブルA、Cを用いた場合よりも符号長を小さくすることが可能となり、符号量を低減できる。   Similarly, the table determination unit (202) selects the table B in FIG. 13 when X is larger than the predetermined threshold value S1 and equal to or smaller than the threshold value S2. In this case, by using the table B in the encoding process of the encoding unit (203), the code length can be made smaller than when the tables A and C are used, and the code amount can be reduced.

なお、上記の手順で選択したテーブルは、予測誤差に関する情報であればどのようなものに対しても適応することができるが、例えば、図7の(1)から(6)に示す6項目のうち(2)DCT係数値などに適用すると、特に、可変長の低減、符号量の低減に効果的である。   Note that the table selected in the above procedure can be applied to any information as long as it relates to the prediction error. For example, the six items shown in (1) to (6) of FIG. Of these, (2) when applied to DCT coefficient values, etc., it is particularly effective in reducing variable length and code amount.

次に、上記の符号化テーブルの決定に用いる予測誤差推定指標値の算出方法について説明する。   Next, a method for calculating a prediction error estimation index value used for determining the above coding table will be described.

まず、予測誤差推定指標値算出部(201)は、上述のとおり、モード決定部(107)から決定した予測モードの情報を取得し、決定した予測モードが画面内予測モードか、画面間予測モードかによって、予測誤差推定指標値算出処理の種類を切り替える。   First, as described above, the prediction error estimation index value calculation unit (201) acquires information on the prediction mode determined from the mode determination unit (107), and whether the determined prediction mode is the intra prediction mode or the inter prediction mode. Depending on the type, the type of prediction error estimation index value calculation processing is switched.

ここで、決定した予測モードが画面間予測の場合は、図8及び図9に示す画面間予測向けの予測誤差推定指標値算出処理を行う。以下、図8及び図9について説明する。   Here, when the determined prediction mode is inter-screen prediction, prediction error estimation index value calculation processing for inter-screen prediction shown in FIGS. 8 and 9 is performed. Hereinafter, FIGS. 8 and 9 will be described.

図8に示すように、画面間予測向けの予測誤差推定指標値算出処理は、対象ブロック(801)の周辺ブロックに属する符号化済みの画素領域と、予測画像(802)のの周辺ブロックに属する符号化済みの画素領域との差分値を予測誤差推定指標値として算出する。当該算出処理の具体例を図9に示す。   As shown in FIG. 8, the prediction error estimation index value calculation process for inter-screen prediction belongs to the encoded pixel region belonging to the peripheral block of the target block (801) and the peripheral block of the predicted image (802). A difference value from the encoded pixel region is calculated as a prediction error estimation index value. A specific example of the calculation process is shown in FIG.

図9は本実施例に係る画面間予測向け予測誤差推定指標値算出処理の一例を示したものである。一般に画像の空間方向の相関は高い。すなわち対象ブロックと対象領域の周辺領域とは似ている。そのため、対象ブロックの周辺領域と動き探索により求められた参照ブロックの周辺領域の画像を比較することにより、対象ブロックと参照ブロックの画像の相関の推定、すなわち予測誤差の大きさの指標値を推定することが可能である。   FIG. 9 shows an example of prediction error estimation index value calculation processing for inter-screen prediction according to the present embodiment. In general, the spatial correlation of images is high. That is, the target block and the peripheral area of the target area are similar. Therefore, by comparing the surrounding area of the target block with the image of the surrounding area of the reference block obtained by motion search, the correlation between the target block and the reference block image is estimated, that is, the index value of the size of the prediction error is estimated. Is possible.

例えば、図9の例では、符号化対象ブロックの左、左上、上、右上に隣接する符号化済みブロック中の領域の復号化画像と、予測画像の左、左上、上、右上に隣接する符号化済みブロック中の領域の復号化画像との差分値を用いて予測誤差の推定値とする。   For example, in the example of FIG. 9, the decoded image of the area in the encoded block adjacent to the left, upper left, upper, and upper right of the encoding target block, and the code adjacent to the left, upper left, upper, and upper right of the predicted image A difference value from the decoded image of the area in the segmented block is used as an estimation value of the prediction error.

ここで、隣接ブロック中の左、左上、上、右上に位置する、対象ブロックよりも先に符号化された符号化済み領域を用いる理由は、復号側で同様の予測誤差推定指標値算出処理を行う際に、対象ブロックよりも先に復号化されている画素でなければ、用いることができないからである。   Here, the reason for using the encoded region encoded before the target block located on the left, upper left, upper, upper right in the adjacent block is that the decoding side performs the same prediction error estimation index value calculation process. This is because the pixel cannot be used unless it is decoded before the target block.

ここで、図9の例では、当該予測誤差の推定値の算出において、対象画像中おいて、対象ブロックの左に隣接するブロックの右端に位置する画素と対象ブロックの左上、上、右上に隣接するブロックの下端の画素とを含む13個の画素を周辺領域画素とする。また、参照画像において、上記13個の周辺領域画素に対応する位置にある画素を周辺領域画素とする。上記の対象画像中の周辺領域画素と参照画像中の周辺領域画素の対応する各画素の差分を周辺領域画素中のすべての画素について合計した値Nを、対象ブロックの量子化ステップ値で除算し、所定の係数α(αは0より大きい)を乗じて所定の値βを加算する式(901)により求める値Errorを予測誤差推定指標値とする。なお、量子化ステップ値は、量子化処理部(110)から取得すればよい。   Here, in the example of FIG. 9, in the calculation of the estimated value of the prediction error, the pixel located at the right end of the block adjacent to the left of the target block and the upper left, upper, and upper right of the target block in the target image Thirteen pixels including the pixel at the lower end of the block to be processed are set as peripheral region pixels. Further, in the reference image, a pixel at a position corresponding to the 13 peripheral region pixels is set as a peripheral region pixel. The value N obtained by adding the differences between the corresponding pixels of the peripheral region pixel in the target image and the peripheral region pixel in the reference image for all the pixels in the peripheral region pixel is divided by the quantization step value of the target block. Then, a value Error obtained by a formula (901) obtained by multiplying a predetermined coefficient α (α is larger than 0) and adding a predetermined value β is set as a prediction error estimation index value. The quantization step value may be acquired from the quantization processing unit (110).

なお、図9の例では上記周辺領域の差分値を算出する際、周辺領域画素として1画素幅領域分の13画素しか用いていないが、複数画素幅の領域の画素(例えば、2ライン分では28画素)を周辺領域画素とすることも可能である。   In the example of FIG. 9, when calculating the difference value of the peripheral region, only 13 pixels corresponding to one pixel width region are used as the peripheral region pixels, but pixels in a region having a plurality of pixel widths (for example, for two lines) 28 pixels) can be used as the peripheral region pixels.

また、図9の例では、対象ブロックに左、左上、上、右上に隣接する符号化済みブロック内の一部の画素を周辺領域画素としている。しかし、周辺領域画素を構成する画素は、対象ブロックよりも先に符号化されるブロックであって対象ブロックの辺または角に接するブロックに属する画素であれば、いずれの画素を組み合わせてもかまわない。   In the example of FIG. 9, some pixels in the encoded block adjacent to the target block on the left, upper left, upper, and upper right are set as peripheral region pixels. However, any pixel may be combined as long as the pixels constituting the peripheral region pixel are pixels that are encoded before the target block and belong to a block that touches the side or corner of the target block. .

例えば、対象ブロックに左、上、右上に隣接する3つのブロックに属する画素、例えば、図9の13個の画素から画素Aを除いた12個の画素を用いても良い。   For example, pixels belonging to three blocks adjacent to the target block on the left, upper, and upper right, for example, 12 pixels excluding pixel A from 13 pixels in FIG. 9 may be used.

以上説明した画面間予測向け予測誤差推定指標値算出処理によれば、画像の空間方向の相関が高いことを用いて、予測誤差の大きさを推定する指標値を算出することができる。   According to the prediction error estimation index value calculation process for inter-screen prediction described above, the index value for estimating the magnitude of the prediction error can be calculated using the fact that the correlation in the spatial direction of the image is high.

次に、モード決定部(107)が決定した予測モードが画面内予測の場合、予測誤差推定指標値算出部(201)は、図11に示す画面内予測向けの予測誤差推定指標値算出処理を行う。以下、図11について説明する。   Next, when the prediction mode determined by the mode determination unit (107) is intra prediction, the prediction error estimation index value calculation unit (201) performs prediction error estimation index value calculation processing for intra prediction shown in FIG. Do. Hereinafter, FIG. 11 will be described.

図11は本実施例による画面内予測向け予測誤差推定指標値算出処理の動作について、その一例を示したものである。図11の例では、対象画像中おいて、対象ブロックの左に隣接するブロックの右端に位置する画素と対象ブロックの左上、上、右上に隣接するブロックに属する画素を用いて、予測誤差推定指標値を算出する。このとき、画面内予測処理において用いた画面内予測モード(予測方向)に応じて、予測誤差推定指標値の算出方法を変更する。   FIG. 11 shows an example of the operation of the prediction error estimation index value calculation process for intra prediction according to the present embodiment. In the example of FIG. 11, a prediction error estimation index is obtained using a pixel located at the right end of a block adjacent to the left of the target block and a pixel belonging to a block adjacent to the upper left, upper, and upper right of the target block in the target image. Calculate the value. At this time, the calculation method of the prediction error estimation index value is changed according to the intra-screen prediction mode (prediction direction) used in the intra-screen prediction process.

例えば、図6に示す予測方向のうち、画面内予測モード0(画面下方向への予測方向)の場合は、対象ブロックの上に隣接する上隣接ブロックの下端2列の画素を用いる。当該2列の画素のうち、画面内予測モード0と同じ方向(画面下方向への予測方向)に並ぶ2つの画素をペアとし、ペアとなる画素の差分を算出する。次に、例えば、対象ブロックと上隣接ブロックとの境界方向に配列する複数の画素のペアの各差分を合計した値Nを、対象ブロックの量子化ステップ値で除算し、所定の係数α(αは0より大きい)を乗じて所定の値βを加算する式(1101) により求める値Errorを予測誤差推定指標値とする。ここで、当該算出に用いる画素のペアは、例えば、図11にA−A’、B−B’、C−C’として示すように3組のペアでも良いが、1〜4組のいずれでもかまわない。   For example, among the prediction directions shown in FIG. 6, in the case of the intra prediction mode 0 (prediction direction in the screen downward direction), pixels in the lower two columns of the upper adjacent block adjacent on the target block are used. Of the two columns of pixels, a pair of two pixels arranged in the same direction as the intra-screen prediction mode 0 (prediction direction in the lower direction of the screen) is used as a pair, and a difference between the paired pixels is calculated. Next, for example, a value N obtained by summing the differences of a plurality of pixel pairs arranged in the boundary direction between the target block and the upper adjacent block is divided by the quantization step value of the target block, and a predetermined coefficient α (α The value Error obtained by the formula (1101) of multiplying by a value greater than 0 and adding a predetermined value β is set as a prediction error estimation index value. Here, the pixel pairs used for the calculation may be, for example, three pairs as shown by AA ′, BB ′, and CC ′ in FIG. It doesn't matter.

また、例えば、図6に示す予測方向のうち、画面内予測モード1(画面右方向への予測方向)の場合は、対象ブロックの左に隣接する左隣接ブロックの右端2列の画素を用いる。当該2列の画素のうち、画面内予測モード1と同じ方向(画面右方向への予測方向)に並ぶ2つの画素をペアとし、ペアとなる画素の差分を算出する。次に、例えば、対象ブロックと左隣接ブロックとの境界方向に配列する複数の画素のペアの各差分を合計した値Nを、対象ブロックの量子化ステップ値で除算し、所定の係数α(αは0より大きい)を乗じて所定の値βを加算する式(1102)により求める値Errorを予測誤差推定指標値とする。ここで、当該算出に用いる画素のペアは、例えば、図11にD−D’、E−E’、F−F’として示すように3組のペアでも良いが、1〜4組のいずれでもかまわない。   Further, for example, in the case of intra prediction mode 1 (prediction direction to the right side of the screen) among the prediction directions shown in FIG. 6, pixels in the rightmost two columns of the left adjacent block adjacent to the left of the target block are used. Of the two columns of pixels, a pair of two pixels arranged in the same direction as the intra-screen prediction mode 1 (prediction direction in the right direction of the screen) is used as a pair, and a difference between the paired pixels is calculated. Next, for example, a value N obtained by summing the differences of a plurality of pixel pairs arranged in the boundary direction between the target block and the left adjacent block is divided by the quantization step value of the target block, and a predetermined coefficient α (α The value Error obtained by the formula (1102) obtained by multiplying by 0 and greater than the predetermined value β is set as the prediction error estimation index value. Here, the pixel pairs used for the calculation may be, for example, three pairs as shown as DD ′, EE ′, and FF ′ in FIG. It doesn't matter.

以上説明した画面内予測モード0や画面内予測モード1の予測誤差推定指標値によれば、対象ブロックの周辺領域の予測方向に応じた所定の画素のペアの画素値の差分に基づいて、対象ブロックの予測誤差の推定指標値を決定することができる。   According to the prediction error estimation index values in the intra prediction mode 0 and the intra prediction mode 1 described above, based on the difference between the pixel values of a predetermined pixel pair according to the prediction direction of the peripheral area of the target block, An estimated index value of the block prediction error can be determined.

また、例えば、図6に示す画面内予測モードのうち画面内予測モード2〜8の場合は、図11に示すように、対象ブロックに左、上に隣接する符号化済みブロック内のうち図示するような2列(上隣接ブロックでは下2列、左隣接ブロックでは、右2列)の画素を用いて、当該2列の画素のうち、対象ブロックから遠い列の画素の画素値の合計と対象ブロックに近い列の画素の合計との差分Nを、対象ブロックの量子化ステップ値で除算し、所定の係数α(αは0より大きい)を乗じて所定の値βを加算する式(1103)により求める値Errorを予測誤差推定指標値とする。   Further, for example, in the case of the intra prediction modes 2 to 8 among the intra prediction modes shown in FIG. 6, as shown in FIG. 11, in the encoded block adjacent to the left and the upper side of the target block. Using the pixels in such two columns (the lower two columns in the upper adjacent block and the right two columns in the left adjacent block), among the pixels in the two columns, the sum of the pixel values of the pixels far from the target block and the target An expression (1103) for dividing the difference N from the sum of the pixels in the column close to the block by the quantization step value of the target block, multiplying by a predetermined coefficient α (α is greater than 0), and adding a predetermined value β The value Error obtained by the above is used as a prediction error estimation index value.

以上説明した予測モード2〜8の予測誤差推定指標値によれば、対象ブロックの周辺領域の所定の画素のペアの画素値の差分に基づいて、対象ブロックの予測誤差の推定指標値を決定することができる。   According to the prediction error estimation index values of the prediction modes 2 to 8 described above, the estimation index value of the prediction error of the target block is determined based on the difference between the pixel values of a predetermined pixel pair in the peripheral area of the target block. be able to.

すなわち、以上説明した画面内予測向け予測誤差推定指標値算出処理では、復号化対象ブロックの画面内予測モードの種類に応じて、復号化対象ブロックに隣接するブロックに属する画素のうちから二つの画素群を決定し、各画素群に属する画素値の和の算出し、両者の画素群間の画素値の和の差に基づいて、前記復号化対象ブロックの予測誤差の推定指標値を算出する。   That is, in the prediction error estimation index value calculation process for intra prediction described above, two pixels out of the pixels belonging to the block adjacent to the decoding target block according to the type of the intra prediction mode of the decoding target block A group is determined, a sum of pixel values belonging to each pixel group is calculated, and an estimation index value of a prediction error of the decoding target block is calculated based on a difference in sum of pixel values between the two pixel groups.

なお、上記の画面内予測向け予測誤差推定指標値算出処理において、各予測モードにおいて用いる周辺領域の画素の数が異なる場合に、予測誤差推定指標値Errorの算出結果にて用いた周辺領域の画素の数で除算して正規化すれば、画素数の差の影響を調整することが可能となる。   In the above-described prediction error estimation index value calculation process for intra prediction, when the number of pixels in the surrounding area used in each prediction mode is different, the pixels in the surrounding area used in the calculation result of the prediction error estimation index value Error By dividing by the number of and normalizing, the influence of the difference in the number of pixels can be adjusted.

以上説明した実施例1の可変長符号化部(111)及びこれを有する動画像符号化装置によれば、対象ブロックの周辺領域の画素の情報に基づいて、対象ブロックの予測誤差を推定する指標値を算出し、これに基づいて符号化テーブルを切替えることにより、符号量を削減することが可能となる。特に、図7の(3)非0以外の係数の個数、以外の項目についても高効率化な可変長符号化処理を行うことが可能となる。   According to the variable length coding unit (111) of the first embodiment described above and the moving picture coding apparatus having the same, the index for estimating the prediction error of the target block based on the information of the pixels in the peripheral area of the target block By calculating the value and switching the encoding table based on this value, the amount of code can be reduced. In particular, highly efficient variable-length encoding processing can be performed for items other than (3) the number of coefficients other than non-zero in FIG.

次に、図3を用いて実施例1に係る動画像復号化装置の一例について説明する。動画像復号化装置は、例えば図1に示す動画像符号化装置によって生成された符号化ストリーム(301)に対して可変長符号化の逆処理、画面間予測に用いる動きベクトルや画面内予測に用いる画面内予測方法の種類情報(画面内予測モード情報)の復号化処理を行う可変長復号化部(302)と、可変長復号化部(302)からの出力に逆量子化処理を行う逆量子化処理部(303)と、逆量子化処理部(303)からの出力に逆周波数変換処理を行って予測差分を復号する逆周波数変換部(304)と、可変長復号化部(302)から出力される動きベクトルと参照画像メモリ(308)に格納される復号済み画像を用いて予測画像を生成する画面間予測を行う画面間予測部(305)と、可変長復号化部(302)から出力される画面内予測モード情報と参照画像メモリ(308)に格納される復号済み画像を用いて予測画像を生成する画面内予測を行う画面内予測部(306)と、画面間予測部(305)または画面内予測部(306)が生成した予測画像と、逆周波数変換部(304)から出力される予測差分とを加算して復号画像を生成する加算部(307)と、生成した復号化画像を記憶する参照画像メモリ(308)を有する。   Next, an example of a moving picture decoding apparatus according to the first embodiment will be described with reference to FIG. For example, the moving image decoding apparatus performs reverse processing of variable length coding on the encoded stream (301) generated by the moving image encoding apparatus shown in FIG. 1, motion vectors used for inter-screen prediction, and intra-screen prediction. A variable length decoding unit (302) that performs decoding processing of type information (intra prediction mode information) of the intra prediction method to be used, and an inverse that performs inverse quantization processing on the output from the variable length decoding unit (302) A quantization processing unit (303), an inverse frequency conversion unit (304) that performs inverse frequency conversion processing on the output from the inverse quantization processing unit (303) and decodes a prediction difference, and a variable length decoding unit (302) An inter-screen prediction unit (305) that performs inter-screen prediction to generate a predicted image using the motion vector output from the decoded image stored in the reference image memory (308), and a variable-length decoding unit (302) Screen prediction mode information output from the image and the decoded image stored in the reference image memory (308) In-screen prediction unit (306) that performs intra-screen prediction to generate a prediction image, prediction image generated by inter-screen prediction unit (305) or in-screen prediction unit (306), and output from inverse frequency conversion unit (304) And a reference image memory (308) for storing the generated decoded image.

ここで、画面間予測部(305)による画面間予測処理の詳細について、図5を用いて説明する。画面間予測部(305)は、復号化対象画像に対してラスタースキャンの順序に従ってブロック単位による復号化を行う。画面間予測を行う際には、復号化対象画像(503)中の対象ブロック(504)についての動きベクトルを可変長復号化部(302)から取得し、当該動きベクトルに基づいて復号化済みの参照画像の中の参照ブロック(予測画像)(505)を特定し、復号化に用いる予測画像を決定する。   Here, details of the inter-screen prediction process by the inter-screen prediction unit (305) will be described with reference to FIG. The inter-screen prediction unit (305) performs decoding in units of blocks on the decoding target image according to the raster scan order. When performing inter-screen prediction, the motion vector for the target block (504) in the decoding target image (503) is obtained from the variable length decoding unit (302), and the motion vector has been decoded based on the motion vector. A reference block (predicted image) (505) in the reference image is specified, and a predicted image used for decoding is determined.

また、画面内予測部(306)による画面内予測処理の詳細について、図6を用いて説明する。画面内予測部(306)は、対象ブロックについての画面内予測モード情報を可変長復号化部(302)から取得し、当該画面内予測モード情報に基づいて、画面間予測方法の種類(予測方向を用いた予測またはDC予測)を特定し、特定した予測方法により、符号化時と同様の予測を行って予測画像を生成する。   Details of the intra prediction process by the intra prediction unit (306) will be described with reference to FIG. The intra prediction unit (306) acquires intra prediction mode information about the target block from the variable length decoding unit (302), and based on the intra prediction mode information, the type of inter prediction method (prediction direction) Prediction or DC prediction) is specified, and a prediction image is generated by performing prediction similar to that at the time of encoding by the specified prediction method.

次に、図4を用いて、可変長復号化部(302)の詳細について説明する。可変長復号化部(302)は予測誤差推定指標値算出部(401)と、テーブル決定部(402)と、符号化部(403)とを有する。   Next, details of the variable length decoding unit (302) will be described with reference to FIG. The variable length decoding unit (302) includes a prediction error estimation index value calculation unit (401), a table determination unit (402), and an encoding unit (403).

予測誤差推定指標値算出部(401)は、可変長復号化部(302)に入力された符号化ストリームの復号化対象ブロックが画面内予測ブロックか画面間予測ブロックかを判定する。   The prediction error estimation index value calculation unit (401) determines whether the decoding target block of the encoded stream input to the variable length decoding unit (302) is an intra-screen prediction block or an inter-screen prediction block.

ここで、復号化対象ブロックが画面間予測ブロックであれば、符号化ストリームに含まれる復号化対象ブロックの動きベクトル情報と、参照画像メモリ(308)から取得する復号化済みの参照画像とを用いて、符号化側と同様に図8、図9で説明した予測誤差推定指標値算出処理を行う。   Here, if the decoding target block is an inter-picture prediction block, the motion vector information of the decoding target block included in the encoded stream and the decoded reference image acquired from the reference image memory (308) are used. Then, the prediction error estimation index value calculation process described with reference to FIGS. 8 and 9 is performed in the same manner as the encoding side.

ここで、復号化対象ブロックが画面内予測ブロックであれば、符号化ストリームに含まれる復号化対象ブロックの復号化対象ブロックの画面内予測方法の種類情報(画面内予測モード情報)と、参照画像メモリ(308)から取得する復号化済みの周辺領域の画素とを用いて、符号化側と同様に図11で説明した予測誤差推定指標値算出処理を行う。   Here, if the decoding target block is an intra prediction block, the type information (intra prediction mode information) of the intra prediction method of the decoding target block of the decoding target block included in the encoded stream, and the reference image The prediction error estimation index value calculation process described with reference to FIG. 11 is performed using the decoded peripheral region pixels acquired from the memory (308) in the same manner as the encoding side.

テーブル決定部(402)は、予測誤差推定指標値算出部(401)の算出した予測誤差推定指標値に基づいて、可変長復号化処理に用いる復号化テーブルを決定する。当該テーブル決定部(402)は、既に図13及び図18を用いて説明した符号化側の処理と同様であるので、説明を省略する。なお、図18のテーブルは、符号化時は符号化テーブル、復号化時は復号化テーブルと称するが、両者は同じテーブルである。   The table determination unit (402) determines a decoding table to be used for variable length decoding processing based on the prediction error estimation index value calculated by the prediction error estimation index value calculation unit (401). The table determination unit (402) is the same as the processing on the encoding side already described with reference to FIG. 13 and FIG. The table in FIG. 18 is referred to as an encoding table at the time of encoding and a decoding table at the time of decoding, but both are the same table.

復号化部(403)は、決定した符号化テーブルを用いて、符号化ストリームに含まれる符号化係数データに可変長符号化処理を行う。可変長符号化処理により生じた量子化係数は逆量子化部(303)に出力する。また、復号化部(403)は、符号化ストリームから復号した動きベクトルを画面間予測部(306)へ、符号化ストリームから復号した画面内予測方法の種類の情報を画面内予測部(306)へ出力する。   The decoding unit (403) performs variable-length encoding processing on the encoded coefficient data included in the encoded stream, using the determined encoding table. The quantization coefficient generated by the variable length coding process is output to the inverse quantization unit (303). Further, the decoding unit (403) transmits the motion vector decoded from the encoded stream to the inter-screen prediction unit (306), and the information about the type of the intra-screen prediction method decoded from the encoded stream to the intra-screen prediction unit (306). Output to.

以上説明した実施例1の可変長復号化部(302)及びこれを有する動画像復号化装置によれば、対象ブロックの周辺領域の画素の情報に基づいて、対象ブロックの予測誤差を推定する指標値を算出し、これに基づいて復号化テーブルを切替えることにより、符号化側で選択した符号化テーブルに対応した可変長復号処理を行うことが可能となり、より符号量の小さい符号化ストリームを好適に復号することが可能となる。特に、図7の(3)非0以外の係数の個数、以外の項目についても高効率化な可変長符号化処理を行うことが可能となる。   According to the variable length decoding unit (302) of the first embodiment described above and the moving picture decoding apparatus having the variable length decoding unit (302), the index for estimating the prediction error of the target block based on the information of the pixels in the peripheral region of the target block By calculating the value and switching the decoding table based on this value, it becomes possible to perform variable length decoding processing corresponding to the encoding table selected on the encoding side, and it is preferable to use an encoded stream with a smaller code amount. Can be decoded. In particular, highly efficient variable-length encoding processing can be performed for items other than (3) the number of coefficients other than non-zero in FIG.

図14は、実施例1の動画像符号化方法における1フレームの符号化処理手順について示している。まず、符号化対象となるフレーム内に存在するすべてのブロックに対して(1401)、以下の処理を行う。すなわち、該当ブロックに対して、すべての予測モード(予測方法とブロックサイズの組み合わせ)に対して(1402)、予測処理を実行する。次に、予測処理を行う予測モードを判別する(1403)。判別結果が、画面内予測モードであれば画面内予測処理を行う(1404)。当該画面内予測の一例は図6にて説明したとおりである。また、判別結果が、画面間予測モードであれば画面間予測処理を行う(1405)。当該画面間予測の一例は図5にて説明したとおりである。画面内予測処理、画面間予測処理のいずれにおいても予測画像を生成し、対象ブロック画像と予測画像との予測差分の計算を行う。続いて、当該予測差分に対して周波数変換処理(1410)、量子化処理(1411)、および可変長符号化処理(1412)を行い、各予測モードの画質歪と符号量を計算する。以上の処理をすべての予測モードに対して終了すれば、以上の結果に基づいて最も符号化効率の良いモードを決定し(1413)、決定した予測モードの可変長符号化済みデータを符号化ストリームに含める。なお、多数の予測モードの中から最も符号化効率の高いものを選択する際には、例えば画質歪みと符号量の関係から最適な予測モードを決定するRD-Optimization方式を利用することによって、効率良く符号化できる。RD-Optimization方式の詳細については下記参考文献1を参照のこと。
[参考文献1]G. Sullivan and T.Wiegand :“Rate-Distortion Optimization for Video Compression”, IEEE Signal Processing Magazine, vol.15, no.6, pp.74-90, 1998.
続いて、決定された予測モードの量子化済みの周波数変換係数について、逆量子化処理(1414)と逆周波数変換処理(1415)を施して予測差分を復号化し、決定された予測モードの予測画像と加算して復号化画像を生成して参照画像メモリに格納する(1416)。以上の処理をすべてのブロックに対して完了すれば、画像1フレーム分の符号化は終了する(1417)。
FIG. 14 shows a procedure for encoding one frame in the moving image encoding method according to the first embodiment. First, the following processing is performed for all blocks existing in a frame to be encoded (1401). That is, the prediction process is executed for all prediction modes (combination of prediction method and block size) for the corresponding block (1402). Next, the prediction mode for performing the prediction process is determined (1403). If the determination result is the intra prediction mode, the intra prediction process is performed (1404). An example of the in-screen prediction is as described with reference to FIG. If the determination result is an inter-screen prediction mode, an inter-screen prediction process is performed (1405). An example of the inter-screen prediction is as described in FIG. A predicted image is generated in both the intra-screen prediction process and the inter-screen prediction process, and the prediction difference between the target block image and the predicted image is calculated. Subsequently, frequency conversion processing (1410), quantization processing (1411), and variable length encoding processing (1412) are performed on the prediction difference, and image quality distortion and code amount of each prediction mode are calculated. If the above processing is completed for all prediction modes, the most efficient coding mode is determined based on the above results (1413), and the variable length encoded data of the determined prediction mode is encoded stream. Include in When selecting the one with the highest coding efficiency from among many prediction modes, for example, by using the RD-Optimization method that determines the optimal prediction mode from the relationship between image quality distortion and code amount, the efficiency is improved. Encode well. See Reference 1 below for details of the RD-Optimization method.
[Reference 1] G. Sullivan and T. Wiegand: “Rate-Distortion Optimization for Video Compression”, IEEE Signal Processing Magazine, vol.15, no.6, pp.74-90, 1998.
Subsequently, the quantized frequency transform coefficient of the determined prediction mode is subjected to inverse quantization processing (1414) and inverse frequency transform processing (1415) to decode the prediction difference, and the predicted image of the determined prediction mode And a decoded image is generated and stored in the reference image memory (1416). When the above processing is completed for all the blocks, the encoding for one frame of the image is completed (1417).

次に、図16を用いて図14に示す可変長符号化処理(1412)の詳細な手順を説明する。まず、図14の可変長符号化処理(1412)を行う際の予測モードを判別する(1601)。判別結果が画面内予測であれば画面内予測処理向けの予測誤差推定指標値算出処理を行う(1602)。当該画面内予測処理向け予測誤差推定指標値算出処理の一例は図11にて説明したとおりである。また、判別結果が画面間予測であれば画面間予測処理向けの予測誤差推定指標値算出処理を行う(1603)。当該画面間予測処理向けの予測誤差推定指標値算出処理の一例は図8及び図9にて説明したとおりである。次に、テーブル決定処理(1604)にて符号化テーブルを決定する。当該テーブル決定処理は、図13及び図18において説明したとおりである。続いて、決定した符号化テーブルを用いて係数符号化(1605)を行い、可変長符号化処理を終了する(1606)。   Next, a detailed procedure of the variable length coding process (1412) shown in FIG. 14 will be described with reference to FIG. First, a prediction mode when performing the variable length coding process (1412) of FIG. 14 is determined (1601). If the determination result is intra prediction, prediction error estimation index value calculation processing for intra prediction processing is performed (1602). An example of the prediction error estimation index value calculation process for the intra-screen prediction process is as described with reference to FIG. If the determination result is inter-screen prediction, prediction error estimation index value calculation processing for inter-screen prediction processing is performed (1603). An example of the prediction error estimation index value calculation process for the inter-screen prediction process is as described with reference to FIGS. Next, an encoding table is determined by table determination processing (1604). The table determination process is as described in FIGS. Subsequently, coefficient encoding (1605) is performed using the determined encoding table, and the variable length encoding process is terminated (1606).

以上説明した実施例1の実施例1の動画像符号化方法によれば、対象ブロックの周辺領域の画素の情報に基づいて、対象ブロックの予測誤差を推定する指標値を算出し、これに基づいて符号化テーブルを切替えることにより、符号量を削減する動画像符号化方法を実現できる。   According to the moving picture coding method of the first embodiment of the first embodiment described above, the index value for estimating the prediction error of the target block is calculated based on the information on the pixels in the peripheral area of the target block, and based on this. Thus, by switching the encoding table, it is possible to realize a moving image encoding method that reduces the code amount.

図15は、実施例1の動画像復号化方法における1フレームの復号化処理手順について示している。まず、1フレーム内のすべてのブロックに対して、以下の処理を行う(1501)。すなわち、入力ストリームに対して可変長復号化処理(1502)を行い、逆量子化処理(1503)および逆周波数変換処理(1504)を行い予測差分を復号化する。続いて、復号化対象ブロックの予測モードを判別する(1505)。判別結果が、画面内予測であれば画面内予測処理を行う(1506)。当該画面内予測の一例は図6にて説明したとおりである。また、判別結果が、画面間予測であれば画面間予測処理を行う(1507)。当該画面間予測の一例は図5にて説明したとおりである。以上の処理をフレーム中のすべてのブロックに対して完了すれば、画像1フレーム分の復号化が終了する(1508)。   FIG. 15 shows a decoding process procedure for one frame in the moving picture decoding method according to the first embodiment. First, the following processing is performed for all blocks in one frame (1501). That is, the variable length decoding process (1502) is performed on the input stream, the inverse quantization process (1503) and the inverse frequency transform process (1504) are performed, and the prediction difference is decoded. Subsequently, the prediction mode of the decoding target block is determined (1505). If the determination result is intra prediction, intra prediction processing is performed (1506). An example of the in-screen prediction is as described with reference to FIG. If the determination result is inter-screen prediction, inter-screen prediction processing is performed (1507). An example of the inter-screen prediction is as described in FIG. When the above processing is completed for all the blocks in the frame, decoding for one frame of the image is completed (1508).

次に、図17を用いて、図15に示す可変長復号化処理(1502)の詳細な手順を説明する。まず、図14の可変長復号化処理(1502)を行う際の予測モードを判別する(1701)。判別結果が画面内予測であれば画面内予測処理向けの予測誤差推定指標値算出処理を行う(1702)。当該画面内予測処理向け予測誤差推定指標値算出処理の一例は図11にて説明したとおりである。また、判別結果が画面間予測であれば画面間予測処理向けの予測誤差推定指標値算出処理を行う(1703)。当該画面間予測処理向けの予測誤差推定指標値算出処理の一例は図8及び図9にて説明したとおりである。次に、テーブル決定処理(1704)にて復号化テーブルを決定する。当該テーブル決定処理は、図13及び図18において説明したとおりである。続いて、決定した復号化テーブルを用いて係数符号化(1705)を行い、可変長符号化処理を終了する(1706)。   Next, the detailed procedure of the variable length decoding process (1502) shown in FIG. 15 will be described with reference to FIG. First, the prediction mode for performing the variable length decoding process (1502) of FIG. 14 is determined (1701). If the determination result is intra prediction, prediction error estimation index value calculation processing for intra prediction processing is performed (1702). An example of the prediction error estimation index value calculation process for the intra-screen prediction process is as described with reference to FIG. If the discrimination result is inter-screen prediction, prediction error estimation index value calculation processing for inter-screen prediction processing is performed (1703). An example of the prediction error estimation index value calculation process for the inter-screen prediction process is as described with reference to FIGS. Next, a decoding table is determined by table determination processing (1704). The table determination process is as described in FIGS. Subsequently, coefficient coding (1705) is performed using the determined decoding table, and the variable length coding process is terminated (1706).

以上説明した実施例1の動画像復号化方法によれば、対象ブロックの周辺領域の画素の情報に基づいて、対象ブロックの予測誤差を推定する指標値を算出し、これに基づいて復号化テーブルを切替えることにより、符号化側で選択した符号化テーブルに対応した可変長復号処理を行うことが可能となり、より符号量の小さい符号化ストリームを好適に復号することが可能となる。   According to the moving picture decoding method of the first embodiment described above, the index value for estimating the prediction error of the target block is calculated based on the information of the pixels in the peripheral area of the target block, and the decoding table is based on this. Is switched, it is possible to perform variable length decoding processing corresponding to the encoding table selected on the encoding side, and it is possible to suitably decode an encoded stream with a smaller code amount.

以上説明した実施例1では、周波数変換の一例としてDCTを挙げているが、DST(Discrete Sine Transformation:離散サイン変換)、WT(Wavelet Transformation:ウェーブレット変換)、DFT(Discrete Fourier Transformation:離散フーリエ変換)、KLT(Karhunen-Loeve Transformation:カルーネン-レーブ変換)など、画素間相関除去に利用する直交変換であればいずれの変換処理でも構わない。周波数変換を行わずに予測差分そのものに対して符号化を行っても構わない。   In the first embodiment described above, DCT is cited as an example of frequency transformation, but DST (Discrete Sine Transformation), WT (Wavelet Transformation), DFT (Discrete Fourier Transformation). Any transformation process may be used as long as it is an orthogonal transform used for inter-pixel correlation removal, such as KLT (Karhunen-Loeve Transformation). You may encode with respect to the prediction difference itself, without performing frequency conversion.

また、実施例1では、画面内予測と画面間予測を行う場合を例として周辺領域の情報より対象ブロックの予測精度を見積もる方法を示したが、例えば画面間予測に関する特別な方式であるスキップモードやダイレクトモードなど、その他の予測方法についても同様に本発明を利用することができる。すなわち、対象ブロックに対して行う予測と同様の手順で周辺領域に対して予測を施すことにより予測誤差を見積もることができれば、どのような予測方法に対して本発明を適用してもよい。   Further, in the first embodiment, the method of estimating the prediction accuracy of the target block from the information on the peripheral area is shown by taking as an example the case of performing intra prediction and inter prediction. The present invention can be similarly used for other prediction methods such as the direct mode and the direct mode. That is, the present invention may be applied to any prediction method as long as the prediction error can be estimated by performing prediction on the peripheral region in the same procedure as that performed for the target block.

以上説明した実施例1に係る動画像符号化方法、動画像復号化方法、動画像符号化装置、動画像復号化装置によれば、符号化対象ブロックの符号化済み周辺領域から予測精度を推定し、予測誤差推定値の大きさに基づいて、符号化テーブルを切り替えることにより、符号化時の符号量を低減し、圧縮効率を向上できる。これにより、少ない符号量で高画質の映像を提供することが可能となる。   According to the moving picture coding method, the moving picture decoding method, the moving picture coding apparatus, and the moving picture decoding apparatus according to the first embodiment described above, the prediction accuracy is estimated from the encoded peripheral area of the coding target block. Then, by switching the encoding table based on the size of the prediction error estimated value, the code amount at the time of encoding can be reduced and the compression efficiency can be improved. Thereby, it is possible to provide a high-quality video with a small code amount.

次に、本発明の実施例2について説明する。   Next, a second embodiment of the present invention will be described.

本発明の実施例2に係る動画像符号化方法、動画像復号化方法、動画像符号化装置、動画像復号化装置は、実施例1に係る画面間予測処理向け予測誤差推定指標値算出処理と画面内予測処理向け予測誤差推定指標値算出処理とを、それぞれ図10、図12に示す処理に変更したものである。その他の動作、構成については、実施例1と同様であるので説明を省略する。   The moving picture coding method, the moving picture decoding method, the moving picture coding apparatus, and the moving picture decoding apparatus according to the second embodiment of the present invention are the prediction error estimation index value calculation process for the inter-screen prediction process according to the first embodiment. And the prediction error estimation index value calculation process for the in-screen prediction process are changed to the processes shown in FIGS. 10 and 12, respectively. Since other operations and configurations are the same as those in the first embodiment, the description thereof is omitted.

まず、図10を用いて実施例2に係る画面間予測処理向け予測誤差推定指標値算出処理
について説明する。実施例2では、符号化・復号化対象ブロックの左、上、左上、右上に隣接する符号化・復号化済みのブロックのいずれかの復号化画像と、参照画像の予測画像の左、上に隣接する符号化済みのブロックの対応するブロックの復号化画像との差分値を算出し、差分値ブロックを生成する。次に、上記差分値ブロックにDCT変換またはアダマール変換などの周波数変換を行う。当該変換処理により生成した係数値の合計S’を、対象ブロックの量子化ステップ値で除算し、所定の係数γ(γは0より大きい)を乗じて所定の値δを加算する式(1001) により求める値Errorを予測誤差推定指標値とする。
First, the prediction error estimation index value calculation process for the inter-screen prediction process according to the second embodiment will be described with reference to FIG. In the second embodiment, the decoded image of any of the encoded / decoded blocks adjacent to the left, upper, upper left, and upper right of the encoding / decoding target block, and the left and upper of the prediction image of the reference image The difference value between the adjacent encoded block and the decoded image of the corresponding block is calculated, and a difference value block is generated. Next, a frequency transform such as DCT transform or Hadamard transform is performed on the difference value block. Formula (1001) for dividing the sum S ′ of coefficient values generated by the conversion process by the quantization step value of the target block, multiplying by a predetermined coefficient γ (γ is greater than 0), and adding a predetermined value δ The value Error obtained by the above is used as a prediction error estimation index value.

なお、上述のS’の算出では、ブロック内のすべての係数値を用いてもよいが、演算簡易化のために、低周波成分のみを用いて、式(1002)により算出した値Errorを予測誤差推定指標値としてもよい。   In the calculation of S ′ described above, all coefficient values in the block may be used. However, for simplification of the calculation, the value Error calculated by the equation (1002) is predicted using only the low frequency component. An error estimation index value may be used.

なお、図10の例では、符号化・復号化対象ブロックおよび参照ブロックに上方向に隣接するブロックのみを用いる例を示したが、対象ブロックよりも先に符号化、復号化される隣接ブロック(左、上、左上、右上隣接ブロック)であれば、いずれでもよい。また、これらのブロックのうち複数のブロックのS’の結果を加算または平均した値をS’としてもよい。この場合、いずれのブロックを用いるか、加算を行うのか平均を行うのかの各方式は符号化側と復号化側で対応する方式を行えば、符号化側と復号化側で対応するテーブルを選択することが可能となり、好適な符号化・復号化処理を行うことができる。   In the example of FIG. 10, an example is shown in which only the block adjacent to the encoding / decoding target block and the reference block in the upward direction is used. However, an adjacent block that is encoded and decoded before the target block ( Left, upper, upper left, upper right adjacent block). A value obtained by adding or averaging the results of S ′ of a plurality of blocks among these blocks may be set as S ′. In this case, as to which block to use, whether to perform addition or averaging, if the corresponding method is performed on the encoding side and the decoding side, the corresponding table on the encoding side and the decoding side is selected. Therefore, suitable encoding / decoding processing can be performed.

次に、図12を用いて実施例2に係る画面内予測処理向け予測誤差推定指標値算出処理
について説明する。実施例2では、符号化・復号化対象ブロックの左、上、左上、右上に隣接する符号化・復号化済みのブロックのいずれかの復号化画像において、隣接する画素(図12であれば、画素aと画素a’)との差分を算出し、当該差分をブロック内の各位置の画素について算出することにより、差分値ブロックSを生成する。次に、上記差分値ブロックにDCT変換またはアダマール変換などの周波数変換を行う。当該変換処理により生成した係数値の合計S’を、対象ブロックの量子化ステップ値で除算し、所定の係数γ(γは0より大きい)を乗じて所定の値δを加算する式(1201) により求める値Errorを予測誤差推定指標値とする。
Next, prediction error estimation index value calculation processing for intra-screen prediction processing according to the second embodiment will be described with reference to FIG. In the second embodiment, in the decoded image of any of the encoded / decoded blocks adjacent to the left, upper, upper left, and upper right of the encoding / decoding target block, adjacent pixels (in FIG. 12, A difference value block S is generated by calculating a difference between the pixel a and the pixel a ′) and calculating the difference for each pixel in each position in the block. Next, a frequency transform such as DCT transform or Hadamard transform is performed on the difference value block. Formula (1201) for dividing the sum S ′ of coefficient values generated by the conversion processing by the quantization step value of the target block, multiplying by a predetermined coefficient γ (γ is greater than 0), and adding a predetermined value δ The value Error obtained by the above is used as a prediction error estimation index value.

なお、上記差分値ブロックSは、隣接ブロックの隣接画素間の画素値の差分を用いているため、元の隣接ブロックよりも小さいブロックとなる。例えば、元の隣接ブロックが16×16画素である場合には差分値ブロックSは最大でも16×15画素となる。しかし、DCT変換またはアダマール変換などの周波数変換を行う際に正方形ブロックとする必要が生じるため、1画素列を減らし、15×15画素の正方形ブロックとしたのち処理を行う。すなわち、差分値ブロックSの生成は、隣接ブロックの一部の隣接画素間の画素値の差分を用いて正方形の差分値ブロックを生成することにより行う。   The difference value block S is a block smaller than the original adjacent block because the difference between pixel values of adjacent pixels in the adjacent block is used. For example, when the original adjacent block is 16 × 16 pixels, the difference value block S is 16 × 15 pixels at the maximum. However, when performing frequency conversion such as DCT conversion or Hadamard conversion, it is necessary to form a square block. Therefore, processing is performed after reducing one pixel column to a square block of 15 × 15 pixels. That is, the difference value block S is generated by generating a square difference value block using a difference in pixel values between some adjacent pixels of the adjacent block.

なお、図12の例では、符号化・復号化対象ブロックおよび参照ブロックに上方向に隣接するブロックのみを用いる例を示したが、対象ブロックよりも先に符号化、復号化される隣接ブロック(左、上、左上、右上隣接ブロック)であれば、いずれでもよい。また、これらのブロックのうち複数のブロックのS’の結果を加算または平均した値をS’としてもよい。この場合、いずれのブロックを用いるか、加算を行うのか平均を行うのかの各方式は符号化側と復号化側で対応する方式を行えば、符号化側と復号化側で対応するテーブルを選択することが可能となり、好適な符号化・復号化処理を行うことができる。   In the example of FIG. 12, an example is shown in which only the block adjacent to the encoding / decoding target block and the reference block in the upward direction is used. However, the neighboring block (encoded and decoded before the target block) Left, upper, upper left, upper right adjacent block). A value obtained by adding or averaging the results of S ′ of a plurality of blocks among these blocks may be set as S ′. In this case, as to which block to use, whether to perform addition or averaging, if the corresponding method is performed on the encoding side and the decoding side, the corresponding table on the encoding side and the decoding side is selected. Therefore, suitable encoding / decoding processing can be performed.

さらに、図11に示す実施例1の画面内予測処理向け予測誤差推定指標値算出処理と同様に、差分を算出する画素の組み合わせの方向(図12の例では上下方向)を、当該対象ブロックの予測方向に応じて変更してもよい。例えば、画面内予測モード0の場合は、図12の例のように、上隣接ブロックを用いて、上下方向に隣接した画素の差分値を用いればよい。また、例えば、画面内予測モード1の場合は、左隣接ブロックを用いて、左右方向に隣接した画素の差分値を用いればよい。また、例えば、画面内予測モード2〜8の場合は、左、上、左上、右上隣接ブロックのうちの複数のブロックを用いて、左隣接ブロックについては左右方向に隣接した画素の差分値を用い、上、左上、右上隣接ブロックについては、上下方向に隣接した画素の差分値を用いればよい。   Further, similarly to the prediction error estimation index value calculation process for the intra-screen prediction process of the first embodiment illustrated in FIG. 11, the direction of the combination of pixels for calculating the difference (vertical direction in the example of FIG. 12) is set to the target block. You may change according to a prediction direction. For example, in the case of the intra prediction mode 0, a difference value between pixels adjacent in the vertical direction may be used using the upper adjacent block as in the example of FIG. In addition, for example, in the case of the intra prediction mode 1, it is only necessary to use a difference value between pixels adjacent in the left-right direction using the left adjacent block. Further, for example, in the case of the intra prediction modes 2 to 8, a plurality of blocks among the left, upper, upper left, and upper right adjacent blocks are used, and the difference value of the pixels adjacent in the left-right direction is used for the left adjacent block. For the upper, upper left, and upper right adjacent blocks, a difference value between pixels adjacent in the vertical direction may be used.

なお、S’の算出では、ブロック内のすべての係数値を用いてもよいが、演算簡易化のために、低周波成分のみを用いて、式(1202)により算出した値Errorを予測誤差推定指標値としてもよい。   In the calculation of S ′, all coefficient values in the block may be used. However, for simplification of calculation, only the low frequency component is used, and the value Error calculated by Expression (1202) is used as the prediction error estimation. It may be an index value.

このように、予測誤差推定指標値の算出処理に周波数変換処理を含めることにより、実施例1の予測誤差推定指標値算出処理に比べて、符号化・復号化テーブルの切替に適した精度のよい指標値を算出することが可能となる。   As described above, by including the frequency conversion process in the calculation process of the prediction error estimation index value, the accuracy suitable for switching of the encoding / decoding table is improved as compared with the prediction error estimation index value calculation process of the first embodiment. An index value can be calculated.

以上説明した実施例2に係る動画像符号化方法、動画像復号化方法、動画像符号化装置、動画像復号化装置によれば、より精度の高い予測誤差推定指標値を用いることが可能となり、実施例1よりもさらに少ない符号量で高画質の映像を提供することが可能となる。   According to the moving picture coding method, the moving picture decoding method, the moving picture coding apparatus, and the moving picture decoding apparatus according to the second embodiment described above, it is possible to use a prediction error estimation index value with higher accuracy. Thus, it is possible to provide a high-quality video with a smaller code amount than in the first embodiment.

102…入力画像メモリ、103…ブロック分割部、104…参照画像メモリ、105…画面間予測部、106…画面内予測部、107…モード決定部、108…減算部、109…周波数変換部、110…量子化部、111…可変長符号化部、112…逆量子化部、113…逆周波数変換部、114…加算部、201…予測誤差推定指標値算出部、202…テーブル決定部、203…符号化部、302…可変長復号化部、303…逆量子化処理部、304…逆周波数変換部、305…画面間予測部、306…画面内予測部、307…加算部、308…参照画像メモリ、401…予測誤差推定指標値算出部、402…テーブル決定部、403…復号化部 DESCRIPTION OF SYMBOLS 102 ... Input image memory, 103 ... Block division part, 104 ... Reference image memory, 105 ... Inter-screen prediction part, 106 ... In-screen prediction part, 107 ... Mode determination part, 108 ... Subtraction part, 109 ... Frequency conversion part, 110 DESCRIPTION OF SYMBOLS ... Quantization part 111 ... Variable length encoding part 112 ... Inverse quantization part 113 ... Inverse frequency conversion part 114 ... Addition part 201 ... Prediction error estimation index value calculation part 202 ... Table determination part 203 ... Coding section 302 ... variable length decoding section 303 ... inverse quantization processing section 304 ... inverse frequency transform section 305 ... inter-screen prediction section 306 ... intra-screen prediction section 307 ... addition section 308 ... reference image Memory 401: Prediction error estimation index value calculation unit 402: Table determination unit 403: Decoding unit

Claims (10)

符号化ストリームを入力するステップと、
前記符号化ストリームに含まれる復号化対象ブロックの予測モードを判別するステップと、
前記判別した予測モードに対応する算出方式により、既に復号化済みの画像に基づいて前記復号化対象ブロックの予測誤差の推定指標値を算出する予測誤差推定指標値算出ステップと、
前記予測誤差推定指標値算出ステップにおいて算出した推定指標値に基づいて、複数の復号化テーブルから、可変長復号化処理に用いる復号化テーブルを決定する復号化テーブル決定ステップと、
前記復号化テーブル決定ステップで決定した復号化テーブルに基づいて符号化ストリームのデータに可変長復号化処理を行い、該可変長復号化処理を行ったデータに逆量子化処理及び逆周波数変換処理を行って予測差分を復号し、復号した予測差分と前記判別した予測モードによる予測処理により生成した予測画像とに基づいて復号画像を生成する復号画像生成ステップとを備えることを特徴とする動画像復号化方法。
Inputting an encoded stream;
Determining a prediction mode of a decoding target block included in the encoded stream;
A prediction error estimation index value calculating step of calculating an estimation index value of a prediction error of the decoding target block based on an already decoded image by a calculation method corresponding to the determined prediction mode;
A decoding table determining step for determining a decoding table to be used for variable length decoding processing from a plurality of decoding tables based on the estimated index value calculated in the prediction error estimation index value calculating step;
Based on the decoding table determined in the decoding table determination step, the encoded stream data is subjected to variable length decoding processing, and the variable length decoding processing is subjected to inverse quantization processing and inverse frequency conversion processing. And a decoded image generating step of generating a decoded image based on the decoded prediction difference and the predicted image generated by the prediction process using the determined prediction mode. Method.
前記判別した予測モードが画面間予測モードである場合に、前記予測誤差推定指標値算出ステップは、復号化対象画像中の復号化対象ブロックに隣接するブロックに属する画素と、前記復号化対象画像とは異なるブロックであって、前記復号化対象ブロックについての動きベクトルが示す参照画像中の参照ブロックに隣接するブロックに属する画素との画素値の差分値に基づいて、前記復号化対象ブロックの予測誤差の推定指標値を算出することを特徴とする請求項1に記載の動画像復号化方法。   When the determined prediction mode is the inter-screen prediction mode, the prediction error estimation index value calculation step includes: a pixel belonging to a block adjacent to the decoding target block in the decoding target image; and the decoding target image Are different blocks, and based on a difference value of a pixel value from a pixel belonging to a block adjacent to a reference block in a reference image indicated by a motion vector for the decoding target block, a prediction error of the decoding target block The method of claim 1, further comprising: calculating an estimated index value. 前記差分値を前記復号化対象ブロックの量子化ステップ値で除算した値に基づいて、前記復号化対象ブロックの予測誤差の推定指標値を算出することを特徴とする請求項2に記載の動画像復号化方法。   The moving image according to claim 2, wherein an estimation index value of a prediction error of the decoding target block is calculated based on a value obtained by dividing the difference value by a quantization step value of the decoding target block. Decryption method. 前記判別した予測モードが画面内予測モードである場合に、前記復号化対象ブロックの前記画面内予測モードの種類に応じて、前記復号化対象ブロックに隣接するブロックに属する画素のうちから二つの画素群を決定し、各画素群に属する画素値の和の算出し、両者の画素群間の画素値の和の差に基づいて、前記復号化対象ブロックの予測誤差の推定指標値を算出することを特徴とする請求項1に記載の動画像復号化方法。   When the determined prediction mode is the intra prediction mode, two pixels among the pixels belonging to the block adjacent to the decoding target block according to the type of the intra prediction mode of the decoding target block Determining a group, calculating a sum of pixel values belonging to each pixel group, and calculating an estimation index value of a prediction error of the decoding target block based on a difference in sum of pixel values between the two pixel groups. The moving picture decoding method according to claim 1, wherein: 前記差分値を前記復号化対象ブロックの量子化ステップ値で除算した値に基づいて、前記復号化対象ブロックの予測誤差の推定指標値を算出することを特徴とする請求項4に記載の動画像復号化方法。   5. The moving image according to claim 4, wherein an estimation index value of a prediction error of the decoding target block is calculated based on a value obtained by dividing the difference value by a quantization step value of the decoding target block. Decryption method. 画面内予測モードまたは画面間予測モードにより符号化対象画像中の符号化対象画像ブロックについての予測画像を生成して、前記符号化対象画像ブロックの画像と前記予測画像との予測差分を生成する予測処理ステップと、
前記予測処理ステップで生成した予測差分に周波数変換処理と量子化処理とを行い量子化データを生成する周波数変換・量子化ステップと、
前記予測処理ステップにおける予測モードに対応する算出方式により、既に符号化済みの画像に基づいて符号化対象ブロックの予測誤差の推定指標値を算出する予測誤差推定指標値算出ステップと、
前記予測誤差推定指標値算出ステップにおいて算出した推定指標値に基づいて、複数の符号化テーブルから、可変長符号化処理に用いる符号化テーブルを決定する符号化テーブル決定ステップと、
前記符号化テーブル決定ステップで決定した符号化テーブルを用いて、前記周波数変換・量子化ステップで生成した量子化データを可変長符号化して符号化ストリームに含める符号化ストリーム生成ステップとを備える特徴とする動画像符号化方法。
Prediction that generates a prediction image for an encoding target image block in an encoding target image in an intra prediction mode or an inter prediction mode, and generates a prediction difference between the image of the encoding target image block and the prediction image Processing steps;
A frequency conversion / quantization step for generating a quantized data by performing a frequency conversion process and a quantization process on the prediction difference generated in the prediction process step;
A prediction error estimation index value calculation step of calculating an estimation index value of a prediction error of the encoding target block based on an already encoded image by a calculation method corresponding to the prediction mode in the prediction processing step;
An encoding table determining step for determining an encoding table to be used for variable length encoding processing from a plurality of encoding tables based on the estimated index value calculated in the prediction error estimation index value calculating step;
A coded stream generation step that includes variable length coding of the quantized data generated in the frequency conversion / quantization step using the coding table determined in the coding table determination step and includes the encoded data in the encoded stream; and A moving image encoding method.
前記予測処理ステップにおける予測モードが画面間予測モードである場合に、前記予測誤差推定指標値算出ステップは、符号化対象画像中の符号化対象ブロックに隣接するブロックに属する画素と、前記符号化対象画像とは異なるブロックであって、前記符号化対象ブロックについての動きベクトルが示す参照画像中の参照ブロックに隣接するブロックに属する画素との画素値の差分値に基づいて、前記符号化対象ブロックの予測誤差の推定指標値を算出することを特徴とする請求項6に記載の動画像符号化方法。   When the prediction mode in the prediction processing step is an inter-screen prediction mode, the prediction error estimation index value calculation step includes: a pixel belonging to a block adjacent to the encoding target block in the encoding target image; and the encoding target Based on a difference value of a pixel value of a block different from an image and a pixel belonging to a block adjacent to a reference block in a reference image indicated by a motion vector for the encoding target block, the encoding target block The moving picture coding method according to claim 6, wherein an estimated index value of a prediction error is calculated. 前記差分値を前記符号化対象ブロックの量子化ステップ値で除算した値に基づいて、前記符号化対象ブロックの予測誤差の推定指標値を算出することを特徴とする請求項7に記載の動画像符号化方法。   8. The moving image according to claim 7, wherein an estimation index value of a prediction error of the encoding target block is calculated based on a value obtained by dividing the difference value by a quantization step value of the encoding target block. Encoding method. 前記予測処理ステップにおける予測モードが画面内予測モードである場合に、前記符号化対象ブロックの前記画面内予測モードの種類に応じて、前記符号化対象ブロックに隣接するブロックに属する画素のうちから二つの画素群を決定し、各画素群に属する画素値の和の算出し、両者の画素群間の画素値の和の差に基づいて、前記符号化対象ブロックの予測誤差の推定指標値を算出することを特徴とする請求項6に記載の動画像符号化方法。   When the prediction mode in the prediction processing step is the intra prediction mode, two of the pixels belonging to the block adjacent to the encoding target block are selected according to the type of the intra prediction mode of the encoding target block. One pixel group is determined, the sum of pixel values belonging to each pixel group is calculated, and the estimation index value of the prediction error of the encoding target block is calculated based on the difference in the sum of pixel values between the two pixel groups The moving picture encoding method according to claim 6, wherein: 前記差分値を前記符号化対象ブロックの量子化ステップ値で除算した値に基づいて、前記符号化対象ブロックの予測誤差の推定指標値を算出することを特徴とする請求項9に記載の動画像符号化方法。   The moving image according to claim 9, wherein an estimation index value of a prediction error of the encoding target block is calculated based on a value obtained by dividing the difference value by a quantization step value of the encoding target block. Encoding method.
JP2009048727A 2009-03-03 2009-03-03 Moving image encoding method and moving image decoding method Pending JP2012124542A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2009048727A JP2012124542A (en) 2009-03-03 2009-03-03 Moving image encoding method and moving image decoding method
PCT/JP2010/001198 WO2010100860A1 (en) 2009-03-03 2010-02-23 Moving image encoding method and moving image decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009048727A JP2012124542A (en) 2009-03-03 2009-03-03 Moving image encoding method and moving image decoding method

Publications (1)

Publication Number Publication Date
JP2012124542A true JP2012124542A (en) 2012-06-28

Family

ID=42709430

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009048727A Pending JP2012124542A (en) 2009-03-03 2009-03-03 Moving image encoding method and moving image decoding method

Country Status (2)

Country Link
JP (1) JP2012124542A (en)
WO (1) WO2010100860A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4447197B2 (en) * 2002-01-07 2010-04-07 三菱電機株式会社 Moving picture encoding apparatus and moving picture decoding apparatus
JP4130780B2 (en) * 2002-04-15 2008-08-06 松下電器産業株式会社 Image encoding method and image decoding method
JP4240283B2 (en) * 2002-10-10 2009-03-18 ソニー株式会社 Decoding device and decoding method
JP4799477B2 (en) * 2007-05-08 2011-10-26 キヤノン株式会社 Image coding apparatus and image coding method

Also Published As

Publication number Publication date
WO2010100860A1 (en) 2010-09-10

Similar Documents

Publication Publication Date Title
KR102518242B1 (en) Encoding And Decoding Methods For Video Information
KR102570488B1 (en) Motion vector refinement for multi-reference prediction
JP6545838B2 (en) Merge candidate block derivation method and apparatus using such method
US9058659B2 (en) Methods and apparatuses for encoding/decoding high resolution images
US10523967B2 (en) Method for deriving a temporal predictive motion vector, and apparatus using the method
KR102355841B1 (en) Search area for motion vector refinement
KR100739714B1 (en) Method and apparatus for intra prediction mode decision
JP5400798B2 (en) Moving picture decoding method and apparatus, moving picture encoding method and apparatus
JP2009094828A (en) Device and method for encoding image, and device and method for decoding image
JP2010016453A (en) Image encoding apparatus and method, image decoding apparatus and method, and program
JP5216710B2 (en) Decryption processing method
KR101197176B1 (en) Methods of derivation of merge candidate block and apparatuses for using the same
JP2017069866A (en) Moving image encoder, moving image encoding method and computer program for encoding moving image
US8792549B2 (en) Decoder-derived geometric transformations for motion compensated inter prediction
AU2018236767A1 (en) Method for inducing a merge candidate block and device using same
JP2009049969A (en) Device and method of coding moving image and device and method of decoding moving image
WO2010100860A1 (en) Moving image encoding method and moving image decoding method
KR102573577B1 (en) A method for processing a video, a method and an apparatus for frame rate conversion
WO2010061515A1 (en) Dynamic image encoding device, encoding method, dynamic image decoding device, and decoding method
KR20070092481A (en) Adaptive fast motion estimation method for h.264 video encoder