JP2010273110A - Image encoding apparatus and image encoding method - Google Patents

Image encoding apparatus and image encoding method Download PDF

Info

Publication number
JP2010273110A
JP2010273110A JP2009123187A JP2009123187A JP2010273110A JP 2010273110 A JP2010273110 A JP 2010273110A JP 2009123187 A JP2009123187 A JP 2009123187A JP 2009123187 A JP2009123187 A JP 2009123187A JP 2010273110 A JP2010273110 A JP 2010273110A
Authority
JP
Japan
Prior art keywords
prediction
pixel
pixels
value
prediction mode
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
JP2009123187A
Other languages
Japanese (ja)
Other versions
JP2010273110A5 (en
Inventor
Yutaka Yokoyama
裕 横山
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2009123187A priority Critical patent/JP2010273110A/en
Publication of JP2010273110A publication Critical patent/JP2010273110A/en
Publication of JP2010273110A5 publication Critical patent/JP2010273110A5/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To enable fast processing in an image encoding apparatus for encoding motion picture data using one estimation mode from among a plurality of estimation modes. <P>SOLUTION: In a plurality of divided blocks of macro block, the image encoding apparatus has: a first estimated pixel producing part for producing a first estimated pixel from a reference pixel corresponding to the divided blocks according to a first estimation mode; a second estimated pixel producing part for producing a second estimated pixel in response to a value estimated from the reference pixel corresponding to the divided blocks according to a second estimation mode when the second estimated pixel is produced from the reference pixel corresponding to the divided blocks; and a determination part for deciding one estimation mode by comparing an estimated value responding to the first estimated pixel value with an estimated value responding to the second estimated pixel value. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、画像符号化装置および画像符号化方法に関する。   The present invention relates to an image encoding device and an image encoding method.

動画像をデジタル化して記憶する等の処理を行う場合、データ量が膨大となるため、その動画像の画像圧縮を行う。この圧縮されたデータをハードディスク等に記憶することで、長時間の動画像データを記憶することが可能となる。このような画像の圧縮方式として、フレーム内で隣接ブロックの相関を利用し、圧縮率を高める方式が検討されている。例えば、動画像符号化方式H.264では、ブロック間の相関を利用したイントラ予測符号化が採用されている。   When processing such as digitizing and storing a moving image is performed, the amount of data becomes enormous, and thus the moving image is compressed. By storing the compressed data in a hard disk or the like, it is possible to store moving image data for a long time. As such an image compression method, a method of using a correlation between adjacent blocks in a frame to increase the compression rate has been studied. For example, the moving picture encoding method H.264 is used. In H.264, intra prediction coding using correlation between blocks is employed.

図18に画像符号化装置1のブロック構成図を示す。図18に示すように、画像符号化装置1は、ブロック化部2と、差分計算部3と、DCT部4と、量子化部5と、符号化部6と、逆量子化部7と、逆DCT部8と、再構成部9と、隣接画素記憶部10と、予測モード判定部11と、イントラ予測部12とを有する。   FIG. 18 shows a block configuration diagram of the image encoding device 1. As illustrated in FIG. 18, the image encoding device 1 includes a blocking unit 2, a difference calculation unit 3, a DCT unit 4, a quantization unit 5, an encoding unit 6, an inverse quantization unit 7, An inverse DCT unit 8, a reconstruction unit 9, an adjacent pixel storage unit 10, a prediction mode determination unit 11, and an intra prediction unit 12 are included.

ブロック化部2は、入力画像データを輝度信号、色差信号について所定のブロック単位(色差信号:8画素×8画素、輝度信号16画素×16画素)にブロック化する。   The blocking unit 2 blocks the input image data into a predetermined block unit (color difference signal: 8 pixels × 8 pixels, luminance signal 16 pixels × 16 pixels) for the luminance signal and the color difference signal.

イントラ予測部12は、予測モード判定部11により決定された予測モードで、隣接画素記憶部10に蓄積した隣接画素から予測データを生成する。   The intra prediction unit 12 generates prediction data from adjacent pixels accumulated in the adjacent pixel storage unit 10 in the prediction mode determined by the prediction mode determination unit 11.

差分計算部3は、イントラ予測部12で生成した予測画素データと、入力画像データの画素の差分を計算する。DCT部4は、差分計算部3からの差分データに対してDCT変換処理を行う。量子化部5は、DCT変換部4のDCT変換後のデータを量子化する。   The difference calculation unit 3 calculates the difference between the predicted pixel data generated by the intra prediction unit 12 and the pixels of the input image data. The DCT unit 4 performs DCT conversion processing on the difference data from the difference calculation unit 3. The quantization unit 5 quantizes the data after the DCT conversion of the DCT conversion unit 4.

符号化部6は、量子化部5の出力データを符号化する。逆量子化部7は、量子化部5の出力データに対して逆量子化を行う。逆DCT部8は、逆量子化部7で逆量子化されたデータに対して、逆DCT変換処理を行う。再構成部9は、逆DCT部8からの出力データとイントラ予測部12からの予測データから画像データを再構成する。隣接画素記憶部10は、再構成部9からの出力データから各ブロックの境界にある隣接画素データを記憶する。   The encoding unit 6 encodes the output data of the quantization unit 5. The inverse quantization unit 7 performs inverse quantization on the output data of the quantization unit 5. The inverse DCT unit 8 performs an inverse DCT transform process on the data inversely quantized by the inverse quantization unit 7. The reconstruction unit 9 reconstructs image data from the output data from the inverse DCT unit 8 and the prediction data from the intra prediction unit 12. The adjacent pixel storage unit 10 stores adjacent pixel data at the boundary of each block from the output data from the reconstruction unit 9.

予測モード判定部11は、隣接画素記憶部10に記憶されている隣接画素データから予測される予測画素を生成する。そして、予測モード毎に、予測した画素値と入力画素値の差分を計算し、差分値が最も小さい予測モードを最適予測モードとして決定する。そして、再びイントラ予測部12が、この決定された最適な予測モードによる予測画素を生成し、差分計算部3が予測画素と入力画素の差分を計算する。   The prediction mode determination unit 11 generates a prediction pixel predicted from the adjacent pixel data stored in the adjacent pixel storage unit 10. Then, for each prediction mode, the difference between the predicted pixel value and the input pixel value is calculated, and the prediction mode with the smallest difference value is determined as the optimum prediction mode. Then, the intra prediction unit 12 again generates a prediction pixel in the determined optimal prediction mode, and the difference calculation unit 3 calculates the difference between the prediction pixel and the input pixel.

この予測モード判定部11の一例として、非特許文献1のような技術がある。図19に非特許文献1の概略構成ブロック図を示す。なお、ここでは予測モードの種類として、DC予測、垂直予測、水平予測、平面予測が採用されているものとする。   As an example of the prediction mode determination unit 11, there is a technique as described in Non-Patent Document 1. FIG. 19 shows a schematic block diagram of Non-Patent Document 1. Here, it is assumed that DC prediction, vertical prediction, horizontal prediction, and plane prediction are adopted as the types of prediction modes.

図19に示すように、非特許文献1の予測モード判定部11は、分割ブロック垂直予測計算部21と、分割ブロック水平予測計算部22と、分割ブロックDC予測計算部23と、分割ブロック平面予測計算部24と、差分計算部31〜34と、評価値計算部41〜44と、比較部50とを有する。なお、評価値計算部41〜44は、それぞれ2次元アダマール変換値生成部61〜64と、絶対値和計算部71〜74とを有する。   As illustrated in FIG. 19, the prediction mode determination unit 11 of Non-Patent Document 1 includes a divided block vertical prediction calculation unit 21, a divided block horizontal prediction calculation unit 22, a divided block DC prediction calculation unit 23, and divided block plane prediction. The calculation unit 24, the difference calculation units 31 to 34, the evaluation value calculation units 41 to 44, and the comparison unit 50 are included. Note that the evaluation value calculation units 41 to 44 include two-dimensional Hadamard transform value generation units 61 to 64 and absolute value sum calculation units 71 to 74, respectively.

ここで、図20に一般的なイントラ予測の各予測モードで用いられるマクロブロックを説明する。なお、この説明では、予測モード判定部11が色差成分についてのイントラ予測を行う場合を前提とする。また、マクロブロックは8画素×8画素を基本単位とする。   Here, FIG. 20 illustrates a macroblock used in each prediction mode of general intra prediction. In this description, it is assumed that the prediction mode determination unit 11 performs intra prediction for color difference components. In addition, a macroblock has 8 × 8 pixels as a basic unit.

図20に示すように、マクロブロックは、4×4の画素からなるブロックblock0〜block3を有する。このようなマクロブロックの周辺には、網掛けで示す周辺画素が隣接する。この周辺画素として、マクロブロックの水平方向に隣接画素p0〜p7、垂直方向に隣接画素q0〜q7がある。また、マクロブロックの左上、つまり隣接画素p0、q0に接する場所に隣接画素pqがある。   As shown in FIG. 20, the macroblock has blocks block0 to block3 made up of 4 × 4 pixels. In the vicinity of such a macroblock, peripheral pixels indicated by shading are adjacent. As the peripheral pixels, there are adjacent pixels p0 to p7 in the horizontal direction of the macroblock and adjacent pixels q0 to q7 in the vertical direction. In addition, there is an adjacent pixel pq at the upper left of the macroblock, that is, at a location in contact with the adjacent pixels p0 and q0.

なお、各画素に示した値pq、p0〜p7、q0〜q7は各画素名を示すとともに、その画素の画素値を示すものとする。また、マクロブロックの各画素値をQ(x,y)(x=0〜7、y=0〜7)とする。更に、本明細書内では、「分割ブロック」と称する場合はマクロブロックを分割してできる上記ブロックblock0〜block3の各ブロックのことを示すものとする。   The values pq, p0 to p7, and q0 to q7 shown for each pixel indicate the pixel name and the pixel value of that pixel. Further, each pixel value of the macroblock is assumed to be Q (x, y) (x = 0 to 7, y = 0 to 7). Furthermore, in the present specification, the term “divided block” refers to each of the blocks block 0 to block 3 formed by dividing a macro block.

分割ブロック垂直予測計算部21は、マクロブロックの隣接画素p0〜p7から垂直予測モードにより予測される予測画素値を算出する。図21に垂直予測モードのイントラ予測の概念図を示す。図21の概念図に示すように、垂直予測モードでは、水平方向の隣接画素値p0〜p7により、各画素の予測画素値が決定される。よって、垂直予測による予測画素値P(x,y)は、
P(0,y)=p0 (y=0〜7)
P(1,y)=p1 (y=0〜7)
P(2,y)=p2 (y=0〜7)
P(3,y)=p3 (y=0〜7)
P(4,y)=p4 (y=0〜7)
P(5,y)=p5 (y=0〜7)
P(6,y)=p6 (y=0〜7)
P(7,y)=p7 (y=0〜7)
となる。
The divided block vertical prediction calculation unit 21 calculates a prediction pixel value predicted by the vertical prediction mode from the adjacent pixels p0 to p7 of the macroblock. FIG. 21 shows a conceptual diagram of intra prediction in the vertical prediction mode. As shown in the conceptual diagram of FIG. 21, in the vertical prediction mode, the predicted pixel value of each pixel is determined by the adjacent pixel values p0 to p7 in the horizontal direction. Therefore, the predicted pixel value P (x, y) by vertical prediction is
P (0, y) = p0 (y = 0-7)
P (1, y) = p1 (y = 0-7)
P (2, y) = p2 (y = 0-7)
P (3, y) = p3 (y = 0-7)
P (4, y) = p4 (y = 0-7)
P (5, y) = p5 (y = 0-7)
P (6, y) = p6 (y = 0-7)
P (7, y) = p7 (y = 0-7)
It becomes.

ここで、ブロックblock0、block2に注目する。図22に、分割ブロック垂直予測計算部21によりブロックblock0、block2を垂直予測して得られる予測値の予測画素行列P_VERT(0)、P_VERT(2)を示す。なお、ブロックblock1、block3の予測画素行列P_VERT(1)、P_VERT(3)は、予測画素行列P_VERT(0)のp0〜p3が、それぞれp4〜p7の値に置きかえられたものとなる。   Here, attention is focused on the blocks block 0 and block 2. FIG. 22 shows prediction pixel matrices P_VERT (0) and P_VERT (2) of prediction values obtained by vertical prediction of blocks block0 and block2 by the divided block vertical prediction calculation unit 21. Note that the prediction pixel matrices P_VERT (1) and P_VERT (3) of the blocks block1 and block3 are obtained by replacing p0 to p3 of the prediction pixel matrix P_VERT (0) with the values of p4 to p7, respectively.

分割ブロック水平予測計算部22は、マクロブロックの隣接画素q0〜q7から水平予測モードにより予測される予測画素値を算出する。図23に水平予測モードのイントラ予測の概念図を示す。図23の概念図に示すように、水平予測モードでは、垂直方向の隣接画素値q0〜q7により、各画素の予測画素値が決定される。よって、水平予測による予測画素値P(x,y)は、
P(x,0)=q0 (x=0〜7)
P(x,1)=q1 (x=0〜7)
P(x,2)=q2 (x=0〜7)
P(x,3)=q3 (x=0〜7)
P(x,4)=q4 (x=0〜7)
P(x,5)=q5 (x=0〜7)
P(x,6)=q6 (x=0〜7)
P(x,7)=q7 (x=0〜7)
となる。ここで、ブロックblock0、block1に注目する。図24に、分割ブロック水平予測計算部22によりブロックblock0、block1を水平予測して得られる予測値の予測画素行列P_HORI(0)、P_HORI(1)を示す。なお、ブロックblock2、block3の予測画素行列P_HORI(2)、P_HORI(3)は、予測画素行列P_HORI(0)のq0〜q3が、それぞれq4〜q7の値に置きかえられたものとなる。
The divided block horizontal prediction calculation unit 22 calculates a prediction pixel value predicted by the horizontal prediction mode from the adjacent pixels q0 to q7 of the macroblock. FIG. 23 shows a conceptual diagram of intra prediction in the horizontal prediction mode. As shown in the conceptual diagram of FIG. 23, in the horizontal prediction mode, the predicted pixel value of each pixel is determined by the adjacent pixel values q0 to q7 in the vertical direction. Therefore, the predicted pixel value P (x, y) by horizontal prediction is
P (x, 0) = q0 (x = 0 to 7)
P (x, 1) = q1 (x = 0 to 7)
P (x, 2) = q2 (x = 0 to 7)
P (x, 3) = q3 (x = 0 to 7)
P (x, 4) = q4 (x = 0 to 7)
P (x, 5) = q5 (x = 0 to 7)
P (x, 6) = q6 (x = 0 to 7)
P (x, 7) = q7 (x = 0-7)
It becomes. Here, attention is focused on the blocks block 0 and block 1. FIG. 24 shows prediction pixel matrices P_HORI (0) and P_HORI (1) of prediction values obtained by horizontally predicting blocks block0 and block1 by the divided block horizontal prediction calculation unit 22. Note that the predicted pixel matrices P_HORI (2) and P_HORI (3) of the blocks block2 and block3 are obtained by replacing q0 to q3 of the predicted pixel matrix P_HORI (0) with the values of q4 to q7, respectively.

分割ブロックDC予測計算部23は、マクロブロックの隣接画素p0〜p7、q0〜q7からDC予測モードにより予測される予測画素値を算出する。図25にDC予測モードのイントラ予測の概念図を示す。分割ブロックDC予測計算部23は、図25の概念図に示すように、DC予測として、隣接画素値の平均値により、各ブロックの予測画素値の算出を行う。
ブロックblock0〜block3に対応するDC予測値DC(k)(k=0〜3)の予測画素値P(x,y)は、以下のようになる。
The divided block DC prediction calculation unit 23 calculates a prediction pixel value predicted by the DC prediction mode from the adjacent pixels p0 to p7 and q0 to q7 of the macroblock. FIG. 25 shows a conceptual diagram of intra prediction in the DC prediction mode. As shown in the conceptual diagram of FIG. 25, the divided block DC prediction calculation unit 23 calculates a predicted pixel value of each block based on an average value of adjacent pixel values as DC prediction.
The predicted pixel values P (x, y) of the DC predicted values DC (k) (k = 0 to 3) corresponding to the blocks block 0 to block 3 are as follows.

分割ブロックのDC予測値DC(0)の場合、
P(x,y)=(p0+p1+p2+p3+q0+q1+q2+q3+4)/8 (x=0〜3、y=0〜3)
となる。
In the case of the DC prediction value DC (0) of the divided block,
P (x, y) = (p0 + p1 + p2 + p3 + q0 + q1 + q2 + q3 + 4) / 8 (x = 0-3, y = 0-3)
It becomes.

分割ブロックのDC予測値DC(1)の場合、
P(x,y)=(p4+p5+p6+p7+2)/4 (x=4〜7、y=0〜3)
となる。
In the case of the DC prediction value DC (1) of the divided block,
P (x, y) = (p4 + p5 + p6 + p7 + 2) / 4 (x = 4-7, y = 0-3)
It becomes.

分割ブロックのDC予測値DC(2)の場合、
P(x,y)=(q4+q5+q6+q7+2)/4 (x=0〜3、y=4〜7)
となる。
In the case of the DC prediction value DC (2) of the divided block,
P (x, y) = (q4 + q5 + q6 + q7 + 2) / 4 (x = 0-3, y = 4-7)
It becomes.

分割ブロックのDC予測値DC(3)の場合、
P(x,y)=(p4+p5+p6+p7+q4+q5+q6+q7+4)/8 (x=4〜7、y=4〜7)
となる。
In the case of the DC prediction value DC (3) of the divided block,
P (x, y) = (p4 + p5 + p6 + p7 + q4 + q5 + q6 + q7 + 4) / 8 (x = 4-7, y = 4-7)
It becomes.

図26に、分割ブロックDC予測計算部23により各ブロックをDC予測して得られる予測値の予測画素行列P_DC(k)を示す。   FIG. 26 shows a prediction pixel matrix P_DC (k) of prediction values obtained by DC prediction of each block by the divided block DC prediction calculation unit 23.

分割ブロック平面予測計算部24は、マクロブロックの隣接画素p0〜p7、q0〜q7、pqから平面予測モードにより予測される予測画素値を算出する。図27に平面予測モードのイントラ予測の概念図を示す。平面予測モードでは、各画素の予測値P(x,y)(x=0〜7、y=0〜7)は、
P(x,y)=(a+b×(x−3)+c×(y−3)+16)/32
となる。但し、
a=(p7+q7)
b=(32×H+32)/64
c=(32×V+32)/64
H=(p7−pq)×4+(p6−p0)×3+(p5−p1)×2+(p4−p2)
V=(q7−pq)×4+(q6−q0)×3+(q5−q1)×2+(q4−q2)
である。ここで、図28(a)、図28(b)に、分割ブロック平面予測計算部24によりブロックblock0、block1を平面予測して得られる予測値の予測画素行列P_PLAN(0)、P_PLAN(1)を示す。また、図29(a)、図29(b)にブロックblock2、block3を平面予測して得られる予測値の予測画素行列P_PLAN(2)、P_PLAN(3)を示す。なお、図28(a)、図28(b)、図29(a)、図29(b)の平面予測による行列係数からもわかるように、平面予測の基準となる画素位置(以下、基準画素位置と称す)は、図20のマクロブロックで示すところのQ(3,3)となる。
The divided block plane prediction calculation unit 24 calculates a prediction pixel value predicted by the plane prediction mode from the adjacent pixels p0 to p7, q0 to q7, and pq of the macroblock. FIG. 27 shows a conceptual diagram of intra prediction in the planar prediction mode. In the planar prediction mode, the predicted value P (x, y) (x = 0 to 7, y = 0 to 7) of each pixel is
P (x, y) = (a + b × (x−3) + c × (y−3) +16) / 32
It becomes. However,
a = (p7 + q7)
b = (32 × H + 32) / 64
c = (32 × V + 32) / 64
H = (p7-pq) × 4 + (p6-p0) × 3 + (p5-p1) × 2 + (p4-p2)
V = (q7-pq) × 4 + (q6-q0) × 3 + (q5-q1) × 2 + (q4-q2)
It is. Here, in FIG. 28A and FIG. 28B, prediction pixel matrices P_PLAN (0) and P_PLAN (1) of predicted values obtained by plane prediction of the blocks block0 and block1 by the divided block plane prediction calculation unit 24. Indicates. In addition, FIGS. 29A and 29B show prediction pixel matrices P_PLAN (2) and P_PLAN (3) of prediction values obtained by plane prediction of the blocks block2 and block3. As can be seen from the matrix coefficients obtained by plane prediction in FIGS. 28 (a), 28 (b), 29 (a), and 29 (b), the pixel position that serves as a reference for plane prediction (hereinafter referred to as a reference pixel). (Referred to as position) is Q (3, 3) as shown by the macroblock in FIG.

差分計算部31〜34は、図18のブロック化部2から分割ブロック内部の画像データ(以下、入力画素と称す)を入力し、隣接画素記憶部10が記憶している画素(以下、参照画素と称す)から分割ブロック垂直予測計算部21、分割ブロック水平予測計算部22、分割ブロックDC予測計算部23、分割ブロック平面予測計算部24が生成したそれぞれの予測画素値との差分をとり、予測誤差値を算出する。   The difference calculation units 31 to 34 receive image data (hereinafter referred to as input pixels) inside the divided blocks from the block forming unit 2 in FIG. 18, and pixels stored in the adjacent pixel storage unit 10 (hereinafter referred to as reference pixels). The difference between the prediction pixel values generated by the divided block vertical prediction calculation unit 21, the divided block horizontal prediction calculation unit 22, the divided block DC prediction calculation unit 23, and the divided block plane prediction calculation unit 24 is calculated. An error value is calculated.

評価値計算部41〜44は、それぞれ上記差分計算部31〜34が算出した予測誤差値に応じた評価値を算出する。例えば、評価値計算部41〜44は、それぞれ2次元アダマール変換値生成部61〜64と、絶対値和計算部71〜74とを有する。そして、2次元アダマール変換値生成部61〜64は、それぞれ上記差分計算部31〜34が算出した予測誤差値をアダマール変換処理する。そして、それぞれ絶対値和計算部71〜74により、その処理結果の絶対値和を算出し、上記評価値として出力する。   The evaluation value calculation units 41 to 44 calculate evaluation values corresponding to the prediction error values calculated by the difference calculation units 31 to 34, respectively. For example, the evaluation value calculation units 41 to 44 include two-dimensional Hadamard transform value generation units 61 to 64 and absolute value sum calculation units 71 to 74, respectively. Then, the two-dimensional Hadamard transform value generation units 61 to 64 perform Hadamard transform processing on the prediction error values calculated by the difference calculation units 31 to 34, respectively. Then, the absolute value sum calculation units 71 to 74 calculate the absolute value sums of the processing results, and output them as the evaluation values.

比較部50は、絶対値和計算部71〜74がそれぞれ出力した評価値を比較し、その評価値の最小の値となった予測モードを最適な予測モードと判定する。   The comparison unit 50 compares the evaluation values output by the absolute value sum calculation units 71 to 74, respectively, and determines the prediction mode having the smallest evaluation value as the optimum prediction mode.

なお、予測モード判定部11の他の技術として、特許文献1のようなものもある。   In addition, there exists a thing like patent document 1 as another technique of the prediction mode determination part 11. FIG.

特開2008−172581号公報JP 2008-172581 A

Joint Video Team(JVT) of ISO/IEC MPEG and ITU-T VCEG "Text Description of Joint Model Reference Encoding Methods and Decoding Concealment Methods"Joint Video Team (JVT) of ISO / IEC MPEG and ITU-T VCEG "Text Description of Joint Model Reference Encoding Methods and Decoding Concealment Methods"

図19の予測モード判定部11は、各予測モードにおいて、分割ブロックの予測値を算出する際、必要なマクロブロックの隣接参照画素を全て読み込まないと、各予測モードの評価値の計算の開始ができない。よって、全体の処理時間が長くなる欠点を有している。   When the prediction mode determination unit 11 in FIG. 19 calculates the prediction value of the divided block in each prediction mode, if all adjacent reference pixels of the necessary macroblock are not read, the calculation of the evaluation value in each prediction mode is started. Can not. Therefore, there is a drawback that the entire processing time is increased.

本発明の一態様は、動画像データを入力し、複数の予測モードのうち少なくとも1つの予測モードを用いて、マクロブロックの動画像データを各マクロブロックに隣接する参照画素から予測し、その予測した動画像データを用いて、前記入力した動画像データを符号化する画像符号化装置であって、前記マクロブロックを複数に分割したそれぞれの分割ブロックにおいて、前記複数の予測モードのうちの少なくとも1つの第1の予測モードにより、前記分割ブロックに対応する前記参照画素から第1の予測画素を生成する第1の予測画素生成部と、前記複数の予測モードのうちの第2の予測モードにより、前記分割ブロックに対応する前記参照画素から第2の予測画素を生成する場合、前記分割ブロックに対応する参照画素から推定した値に応じて第2の予測画素を生成する第2の予測画素生成部と、前記第1の予測画素値に応じた評価値と第2の予測画素値に応じた評価値とを比較して、前記1つの予測モードを判定する判定部と、を有する画像符号化装置である。   According to one embodiment of the present invention, moving image data is input, and at least one prediction mode of a plurality of prediction modes is used to predict moving image data of a macroblock from reference pixels adjacent to each macroblock. An image encoding apparatus that encodes the input moving image data using the moving image data, wherein each of the divided blocks obtained by dividing the macroblock into at least one of the plurality of prediction modes. According to one first prediction mode, a first prediction pixel generation unit that generates a first prediction pixel from the reference pixels corresponding to the divided blocks, and a second prediction mode of the plurality of prediction modes, When generating the second prediction pixel from the reference pixel corresponding to the divided block, the value estimated from the reference pixel corresponding to the divided block is Comparing the evaluation value according to the first prediction pixel value and the evaluation value according to the second prediction pixel value, the second prediction pixel generation unit that generates the second prediction pixel at the same time, And a determination unit that determines one prediction mode.

本発明の別の態様は、動画像データを入力し、複数の予測モードのうち少なくとも1つの予測モードを用いて、マクロブロックの動画像データを各マクロブロックに隣接する参照画素から予測し、その予測した動画像データを用いて、前記入力した動画像データを符号化する画像符号化方法であって、前記マクロブロックを複数に分割したそれぞれの分割ブロックにおいて、前記複数の予測モードのうちの少なくとも1つの第1の予測モードにより、前記分割ブロックに対応する前記参照画素から第1の予測画素を生成し、前記複数の予測モードのうちの第2の予測モードにより、前記分割ブロックに対応する前記参照画素から第2の予測画素を生成する場合、前記分割ブロックに対応する参照画素から推定した値に応じて第2の予測画素を生成し、前記第1の予測画素の値に応じた評価値と前記第2の予測画素の値に応じた評価値とを比較して、前記1つの予測モードを判定する画像符号化方法である。   According to another aspect of the present invention, moving image data is input, and at least one prediction mode among a plurality of prediction modes is used to predict moving image data of a macroblock from reference pixels adjacent to each macroblock, An image encoding method for encoding the input moving image data using predicted moving image data, wherein each of the divided blocks obtained by dividing the macroblock into at least one of the plurality of prediction modes. A first prediction pixel is generated from the reference pixel corresponding to the divided block by one first prediction mode, and the second prediction mode of the plurality of prediction modes corresponds to the divided block. When generating the second prediction pixel from the reference pixel, the second prediction pixel is determined according to the value estimated from the reference pixel corresponding to the divided block. And an evaluation value according to the value of the first prediction pixel and an evaluation value according to the value of the second prediction pixel to determine the one prediction mode. .

本発明にかかる画像符号化装置は、第1の予測画素生成部と、変数推定部及び第2の予測画素生成部により、マクロブロックを複数に分割したそれぞれの分割ブロックに対応する参照画素だけで第1及び第2の予測画素を生成する。そして、それら第1及び第2の予測画素に応じた評価値により最適な予測モードを決定する。このことにより、分割ブロックにおける各予測モードの評価値を算出処理する際に、マクロブロックに隣接する参照画素を全て読み出す必要がなく、高速な処理動作が可能となる。   The image coding apparatus according to the present invention includes only the reference pixels corresponding to the respective divided blocks obtained by dividing the macroblock by the first prediction pixel generation unit, the variable estimation unit, and the second prediction pixel generation unit. First and second prediction pixels are generated. Then, an optimal prediction mode is determined based on the evaluation values corresponding to the first and second prediction pixels. Thus, when calculating the evaluation value of each prediction mode in the divided block, it is not necessary to read out all the reference pixels adjacent to the macroblock, and a high-speed processing operation is possible.

本発明にかかる画像符号化装置は、動作処理の高速化が可能となる。   The image encoding apparatus according to the present invention can increase the speed of operation processing.

実施の形態1にかかる画像符号化装置の予測モード判定部である。3 is a prediction mode determination unit of the image encoding device according to the first embodiment; 実施の形態1にかかる分割ブロック0及びその周辺画素を説明するための図である。FIG. 6 is a diagram for explaining a divided block 0 and its peripheral pixels according to the first embodiment. 実施の形態1にかかる分割ブロック1及びその周辺画素を説明するための図である。FIG. 3 is a diagram for explaining a divided block 1 and peripheral pixels according to the first embodiment; 実施の形態1にかかる分割ブロック2及びその周辺画素を説明するための図である。FIG. 3 is a diagram for explaining a divided block 2 and peripheral pixels according to the first embodiment; 実施の形態1にかかる分割ブロック3及びその周辺画素を説明するための図である。FIG. 3 is a diagram for explaining a divided block 3 and peripheral pixels according to the first embodiment; 通常のマクロブロックでの平面予測モードの変数値の算出方法の概念を説明するグラフである。It is a graph explaining the concept of the calculation method of the variable value of the plane prediction mode in a normal macroblock. 実施の形態1にかかる分割ブロックでの平面予測モードの変数値の算出方法の概念を説明するグラフである。5 is a graph for explaining a concept of a method for calculating a variable value in a planar prediction mode in a divided block according to the first embodiment; 実施の形態1にかかる分割ブロックでの平面予測モードの変数値の算出方法の概念を説明するグラフである。5 is a graph for explaining a concept of a method for calculating a variable value in a planar prediction mode in a divided block according to the first embodiment; 実施の形態2にかかる画像符号化装置の予測モード判定部である。10 is a prediction mode determination unit of the image encoding device according to the second embodiment. 実施の形態2にかかる輝度成分のマクロブロックと分割ブロックである。It is the macro block and division | segmentation block of a luminance component concerning Embodiment 2. FIG. 実施の形態2にかかる分割ブロック及びその周辺画素を説明するための模式図である。FIG. 10 is a schematic diagram for explaining a divided block and peripheral pixels according to the second embodiment; 実施の形態2にかかる分割ブロックでの平面予測モードの基準画素位置を説明するための模式図である。FIG. 10 is a schematic diagram for explaining a reference pixel position in a planar prediction mode in a divided block according to a second embodiment; その他の実施の形態にかかるマクロブロックと分割ブロックである。It is the macroblock and division | segmentation block concerning other embodiment. その他の実施の形態にかかるマクロブロックと分割ブロックである。It is the macroblock and division | segmentation block concerning other embodiment. その他の実施の形態にかかるマクロブロックと分割ブロックである。It is the macroblock and division | segmentation block concerning other embodiment. その他の実施の形態にかかるマクロブロックと分割ブロックである。It is the macroblock and division | segmentation block concerning other embodiment. その他の実施の形態にかかるマクロブロックと分割ブロックである。It is the macroblock and division | segmentation block concerning other embodiment. 画像符号化装置のブロック構成である。It is a block configuration of an image encoding device. 従来の画像符号化装置の予測モード判定部である。It is the prediction mode determination part of the conventional image coding apparatus. マクロブロック及びその隣接画素を説明するための図である(色差成分)。It is a figure for demonstrating a macroblock and its adjacent pixel (color difference component). 垂直予測を説明するための模式図である。It is a schematic diagram for demonstrating vertical prediction. 垂直予測画素の行列である(分割ブロック0、2)。This is a matrix of vertical prediction pixels (divided blocks 0, 2). 水平予測を説明するための模式図である。It is a schematic diagram for demonstrating horizontal prediction. 水平予測画素の行列である(分割ブロック0、1)。This is a matrix of horizontal prediction pixels (divided blocks 0, 1). DC予測を説明するための模式図である。It is a schematic diagram for demonstrating DC prediction. DC予測画素の行列である(分割ブロック0〜3)。This is a matrix of DC predicted pixels (divided blocks 0 to 3). 平面予測を説明するための模式図である。It is a schematic diagram for demonstrating plane prediction. 平面予測画素の行列である(分割ブロック0、1)。This is a matrix of plane prediction pixels (divided blocks 0, 1). 平面予測画素の行列である(分割ブロック2、3)。It is a matrix of plane prediction pixels (divided blocks 2, 3).

発明の実施の形態1   Embodiment 1 of the Invention

以下、本発明を適用した具体的な実施の形態1について、図面を参照しながら詳細に説明する。この実施の形態1は、本発明を画像符号化装置の予測モード判定部に適用したものである。なお、実施の形態1にかかる画像符号化装置の全体構成は、図18に示した画像符号化装置1のものと同様である。なお、本実施の形態1では、予測モード判定部が判定する最適なイントラ予測モードを、DC予測、垂直予測、水平予測、平面予測の4種類から決定するものとする。但し、必ずしも上記4つの予測モードに限定されるものではない。   Hereinafter, a specific first embodiment to which the present invention is applied will be described in detail with reference to the drawings. In the first embodiment, the present invention is applied to a prediction mode determination unit of an image encoding device. The overall configuration of the image encoding device according to the first embodiment is the same as that of the image encoding device 1 shown in FIG. In the first embodiment, the optimum intra prediction mode determined by the prediction mode determination unit is determined from four types of DC prediction, vertical prediction, horizontal prediction, and plane prediction. However, it is not necessarily limited to the above four prediction modes.

図1に本実施の形態1にかかる画像符号化装置の予測モード判定部100の構成を示す。図1示すように、予測モード判定部100は、分割ブロック垂直予測計算部111と、分割ブロック水平予測計算部112と、分割ブロックDC予測計算部113と、分割ブロック平面予測計算部114と、差分計算部121〜124と、評価値計算部161〜164と、比較部150とを有する。   FIG. 1 shows a configuration of a prediction mode determination unit 100 of the image encoding device according to the first embodiment. As shown in FIG. 1, the prediction mode determination unit 100 includes a divided block vertical prediction calculation unit 111, a divided block horizontal prediction calculation unit 112, a divided block DC prediction calculation unit 113, a divided block plane prediction calculation unit 114, a difference Calculation units 121 to 124, evaluation value calculation units 161 to 164, and comparison unit 150 are included.

また、分割ブロック平面予測計算部114は、変数推定部171と、推定予測値計算部172とを有する。また、評価値計算部161は、2次元アダマール変換値生成部131と、絶対値和計算部141とを有する。評価値計算部162は、2次元アダマール変換値生成部132と、絶対値和計算部142とを有する。評価値計算部163は、2次元アダマール変換値生成部133と、絶対値和計算部143とを有する。評価値計算部164は、2次元アダマール変換値生成部134と、絶対値和計算部144とを有する。なお、以下の説明は、予測モード判定部100が色差成分についてのイントラ予測を行う場合を前提に行う。また、マクロブロックは、8画素×8画素を基本単位とする。   The divided block plane prediction calculation unit 114 includes a variable estimation unit 171 and an estimated prediction value calculation unit 172. The evaluation value calculation unit 161 includes a two-dimensional Hadamard transform value generation unit 131 and an absolute value sum calculation unit 141. The evaluation value calculation unit 162 includes a two-dimensional Hadamard transform value generation unit 132 and an absolute value sum calculation unit 142. The evaluation value calculation unit 163 includes a two-dimensional Hadamard transform value generation unit 133 and an absolute value sum calculation unit 143. The evaluation value calculation unit 164 includes a two-dimensional Hadamard transform value generation unit 134 and an absolute value sum calculation unit 144. Note that the following description is based on the assumption that the prediction mode determination unit 100 performs intra prediction for color difference components. In addition, a macro block has 8 pixels × 8 pixels as a basic unit.

ここで、図2〜図5を用いて、本実施の形態1における分割ブロック垂直予測計算部111、分割ブロック水平予測計算部112、分割ブロックDC予測計算部113、分割ブロック平面予測計算部114のそれぞれが利用するマクロブロックの隣接画素の説明を行う。なお、マクロブロック自体は、図20で示したものと同様である。   Here, using FIG. 2 to FIG. 5, the divided block vertical prediction calculation unit 111, the divided block horizontal prediction calculation unit 112, the divided block DC prediction calculation unit 113, and the divided block plane prediction calculation unit 114 according to the first embodiment. The adjacent pixels of the macro block used by each will be described. The macro block itself is the same as that shown in FIG.

図2〜図5の網掛け部分に示すように、4画素×4画素を基本単位とするそれぞれの分割ブロックblock0〜block3において、各予測モードの予測計算に利用される隣接画素は異なる。例えば、分割ブロックblock0では、図2のように、水平側の隣接画素p0〜p3、垂直側の隣接画素q0〜q3を利用する。このため、分割ブロックblock0では、図1に示した「分割ブロック直上側参照画素」は、隣接画素p0〜p3、「分割ブロック直左側参照画素」は、隣接画素q0〜q3となる。   As shown in the shaded portions in FIGS. 2 to 5, adjacent pixels used for prediction calculation in each prediction mode are different in each of the divided blocks block 0 to block 3 having 4 pixels × 4 pixels as a basic unit. For example, in the divided block block0, as shown in FIG. 2, adjacent pixels p0 to p3 on the horizontal side and adjacent pixels q0 to q3 on the vertical side are used. Therefore, in the divided block block 0, the “reference pixels immediately above the divided block” illustrated in FIG. 1 are adjacent pixels p0 to p3, and the “reference pixels immediately to the left of the divided block” are adjacent pixels q0 to q3.

分割ブロックblock1では、図3のように、水平側の隣接画素p4〜p7、垂直側の隣接画素q0〜q3を利用する。このため、分割ブロックblock1では、図1に示した「分割ブロック直上側参照画素」は、隣接画素p4〜p7、「分割ブロック直左側参照画素」は、隣接画素q0〜q3となる。   In the divided block block1, as shown in FIG. 3, the adjacent pixels p4 to p7 on the horizontal side and the adjacent pixels q0 to q3 on the vertical side are used. Therefore, in the divided block block 1, the “reference pixels immediately above the divided block” illustrated in FIG. 1 are adjacent pixels p 4 to p 7, and the “reference pixels immediately to the left of the divided block” are adjacent pixels q 0 to q 3.

分割ブロックblock2では、図4のように、水平側の隣接画素p0〜p3、垂直側の隣接画素q4〜q7を利用する。このため、分割ブロックblock2では、図1に示した「分割ブロック直上側参照画素」は、隣接画素p0〜p3、「分割ブロック直左側参照画素」は、隣接画素q4〜q7となる。   In the divided block block2, as shown in FIG. 4, horizontal side adjacent pixels p0 to p3 and vertical side adjacent pixels q4 to q7 are used. For this reason, in the divided block block 2, the “reference pixels immediately above the divided block” illustrated in FIG. 1 are adjacent pixels p 0 to p 3, and the “reference pixels directly to the left of the divided block” are adjacent pixels q 4 to q 7.

分割ブロックblock3では、図5のように、水平側の隣接画素p4〜p7、垂直側の隣接画素q4〜q7を利用する。このため、分割ブロックblock3では、図1に示した「分割ブロック直上側参照画素」は、隣接画素p4〜p7、「分割ブロック直左側参照画素」は、隣接画素q4〜q7となる。   In the divided block block3, as shown in FIG. 5, the adjacent pixels p4 to p7 on the horizontal side and the adjacent pixels q4 to q7 on the vertical side are used. For this reason, in the divided block block 3, the “reference pixels immediately above the divided block” illustrated in FIG. 1 are adjacent pixels p 4 to p 7, and the “reference pixels immediately to the left of the divided block” are adjacent pixels q 4 to q 7.

以下に、予測モード判定部100の構成及び動作を説明する。分割ブロック垂直予測計算部111は、分割ブロックblock0、block2では隣接画素p0〜p3、分割ブロックblock1、block3では隣接画素p4〜p7から垂直予測モードにより予測される予測画素値を算出する。つまり、水平方向の隣接画素値p0〜p7により、各画素の予測画素値が決定される。よって、分割ブロックblock0〜block3の垂直予測(P_VERT(0)〜P_VERT(3))による予測画素値P(x,y)は、以下のようになる。   Below, the structure and operation | movement of the prediction mode determination part 100 are demonstrated. The divided block vertical prediction calculation unit 111 calculates prediction pixel values predicted by the vertical prediction mode from the adjacent pixels p0 to p3 in the divided blocks block0 and block2, and from the adjacent pixels p4 to p7 in the divided blocks block1 and block3. That is, the predicted pixel value of each pixel is determined by the adjacent pixel values p0 to p7 in the horizontal direction. Therefore, the prediction pixel value P (x, y) by the vertical prediction (P_VERT (0) to P_VERT (3)) of the divided blocks block0 to block3 is as follows.

P_VERT(0)の場合、
P(0,y)=p0 (y=0〜3)
P(1,y)=p1 (y=0〜3)
P(2,y)=p2 (y=0〜3)
P(3,y)=p3 (y=0〜3)
となる。
In the case of P_VERT (0),
P (0, y) = p0 (y = 0-3)
P (1, y) = p1 (y = 0-3)
P (2, y) = p2 (y = 0-3)
P (3, y) = p3 (y = 0-3)
It becomes.

P_VERT(2)の場合、
P(0,y)=p0 (y=4〜7)
P(1,y)=p1 (y=4〜7)
P(2,y)=p2 (y=4〜7)
P(3,y)=p3 (y=4〜7)
となる。
In the case of P_VERT (2),
P (0, y) = p0 (y = 4-7)
P (1, y) = p1 (y = 4-7)
P (2, y) = p2 (y = 4-7)
P (3, y) = p3 (y = 4-7)
It becomes.

また、P_VERT(1)の場合、
P(4,y)=p4 (y=0〜3)
P(5,y)=p5 (y=0〜3)
P(6,y)=p6 (y=0〜3)
P(7,y)=p7 (y=0〜3)
となる。
In the case of P_VERT (1),
P (4, y) = p4 (y = 0-3)
P (5, y) = p5 (y = 0-3)
P (6, y) = p6 (y = 0-3)
P (7, y) = p7 (y = 0-3)
It becomes.

P_VERT(3)の場合、
P(4,y)=p4 (y=4〜7)
P(5,y)=p5 (y=4〜7)
P(6,y)=p6 (y=4〜7)
P(7,y)=p7 (y=4〜7)
となる。
In the case of P_VERT (3),
P (4, y) = p4 (y = 4-7)
P (5, y) = p5 (y = 4-7)
P (6, y) = p6 (y = 4-7)
P (7, y) = p7 (y = 4-7)
It becomes.

分割ブロック水平予測計算部112は、分割ブロックblock0、block1では隣接画素q0〜q3、分割ブロックblock2、block3では隣接画素q4〜q7から水平予測モードにより予測される予測画素値を算出する。つまり、垂直方向の隣接画素値q0〜q7により、各画素の予測画素値が決定される。よって、分割ブロックblock0〜block3の水平予測(P_HORI(0)〜P_HORI(3))による予測画素値P(x,y)は、以下のようになる。   The divided block horizontal prediction calculation unit 112 calculates predicted pixel values predicted by the horizontal prediction mode from the adjacent pixels q0 to q3 in the divided blocks block0 and block1 and from the adjacent pixels q4 to q7 in the divided blocks block2 and block3. That is, the predicted pixel value of each pixel is determined by the adjacent pixel values q0 to q7 in the vertical direction. Therefore, the prediction pixel value P (x, y) by horizontal prediction (P_HORI (0) to P_HORI (3)) of the divided blocks block0 to block3 is as follows.

P_HORI(0)の場合、
P(x,0)=q0 (x=0〜3)
P(x,1)=q1 (x=0〜3)
P(x,2)=q2 (x=0〜3)
P(x,3)=q3 (x=0〜3)
となる。
In the case of P_HORI (0),
P (x, 0) = q0 (x = 0 to 3)
P (x, 1) = q1 (x = 0-3)
P (x, 2) = q2 (x = 0 to 3)
P (x, 3) = q3 (x = 0-3)
It becomes.

P_HORI(1)の場合、
P(x,0)=q0 (x=4〜7)
P(x,1)=q1 (x=4〜7)
P(x,2)=q2 (x=4〜7)
P(x,3)=q3 (x=4〜7)
となる。
In the case of P_HORI (1),
P (x, 0) = q0 (x = 4 to 7)
P (x, 1) = q1 (x = 4-7)
P (x, 2) = q2 (x = 4-7)
P (x, 3) = q3 (x = 4-7)
It becomes.

P_HORI(2)の場合、
P(x,4)=q4 (x=0〜3)
P(x,5)=q5 (x=0〜3)
P(x,6)=q6 (x=0〜3)
P(x,7)=q7 (x=0〜3)
となる。
In the case of P_HORI (2),
P (x, 4) = q4 (x = 0 to 3)
P (x, 5) = q5 (x = 0 to 3)
P (x, 6) = q6 (x = 0-3)
P (x, 7) = q7 (x = 0-3)
It becomes.

P_HORI(3)の場合、
P(x,4)=q4 (x=4〜7)
P(x,5)=q5 (x=4〜7)
P(x,6)=q6 (x=4〜7)
P(x,7)=q7 (x=4〜7)
となる。
For P_HORI (3),
P (x, 4) = q4 (x = 4-7)
P (x, 5) = q5 (x = 4-7)
P (x, 6) = q6 (x = 4-7)
P (x, 7) = q7 (x = 4-7)
It becomes.

分割ブロックDC予測計算部113は、分割ブロックblock0では隣接画素p0〜p3、q0〜q3、分割ブロックblock1では隣接画素p4〜p5、q0〜q3、分割ブロックblock2では隣接画素p0〜p3、q4〜q7、分割ブロックblock3では隣接画素p4〜p7、q4〜q7からDC予測モードにより予測される予測画素値を算出する。DC予測モードでは、各分割ブロックに対応する垂直方向と水平方向の隣接画素値の平均値により各画素の予測画素値が決定される。よって、分割ブロックblock0〜block3のDC予測(P_DC(0)〜P_DC(3))による予測画素値P(x,y)は、以下のようになる。   The divided block DC prediction calculation unit 113 includes adjacent pixels p0 to p3 and q0 to q3 in the divided block block0, adjacent pixels p4 to p5 and q0 to q3 in the divided block block1, and adjacent pixels p0 to p3 and q4 to q7 in the divided block block2. In the divided block block3, predicted pixel values predicted by the DC prediction mode are calculated from the adjacent pixels p4 to p7 and q4 to q7. In the DC prediction mode, the predicted pixel value of each pixel is determined based on the average value of the adjacent pixel values in the vertical and horizontal directions corresponding to each divided block. Therefore, the predicted pixel value P (x, y) by DC prediction (P_DC (0) to P_DC (3)) of the divided blocks block0 to block3 is as follows.

P_DC(0)の場合、
P(x,y)=(p0+p1+p2+p3+q0+q1+q2+q3+4)/8 (x=0〜3、y=0〜3)
となる。
In the case of P_DC (0),
P (x, y) = (p0 + p1 + p2 + p3 + q0 + q1 + q2 + q3 + 4) / 8 (x = 0-3, y = 0-3)
It becomes.

P_DC(1)の場合、
P(x,y)=(p4+p5+p6+p7+2)/4 (x=4〜7、y=0〜3)
となる。
In the case of P_DC (1),
P (x, y) = (p4 + p5 + p6 + p7 + 2) / 4 (x = 4-7, y = 0-3)
It becomes.

P_DC(2)の場合、
P(x,y)=(q4+q5+q6+q7+2)/4 (x=0〜3、y=4〜7)
となる。
In the case of P_DC (2),
P (x, y) = (q4 + q5 + q6 + q7 + 2) / 4 (x = 0-3, y = 4-7)
It becomes.

P_DC(3)の場合、
P(x,y)=(p4+p5+p6+p7+q4+q5+q6+q7+4)/8 (x=4〜7、y=4〜7)
となる。
In the case of P_DC (3),
P (x, y) = (p4 + p5 + p6 + p7 + q4 + q5 + q6 + q7 + 4) / 8 (x = 4-7, y = 4-7)
It becomes.

分割ブロック平面予測計算部114は、分割ブロックblock0では隣接画素p0〜p3、q0〜q3、分割ブロックblock1では隣接画素p4〜p5、q0〜q3、分割ブロックblock2では隣接画素p0〜p3、q4〜q7、分割ブロックblock3では隣接画素p4〜p7、q4〜q7から平面予測モードにより予測される予測画素値を算出する。   The divided block plane prediction calculation unit 114 includes adjacent pixels p0 to p3 and q0 to q3 in the divided block block0, adjacent pixels p4 to p5 and q0 to q3 in the divided block block1, and adjacent pixels p0 to p3 and q4 to q7 in the divided block block2. In the divided block block3, predicted pixel values predicted by the planar prediction mode are calculated from the adjacent pixels p4 to p7 and q4 to q7.

分割ブロック平面予測計算部114の変数推定部171は、各分割ブロックに対応する垂直方向と水平方向の隣接画素値から平面予測のための変数を算出する。   The variable estimation unit 171 of the divided block plane prediction calculation unit 114 calculates a variable for plane prediction from vertical and horizontal adjacent pixel values corresponding to each divided block.

分割ブロック平面予測計算部114の推定予測値計算部172は、前記変数推定部171が算出した変数を利用して、各分割ブロックに対応する垂直方向と水平方向の隣接画素値平面予測モードにより予測される予測画素値を算出する。   The estimated predicted value calculation unit 172 of the divided block plane prediction calculation unit 114 uses the variables calculated by the variable estimation unit 171 to perform prediction in the vertical and horizontal adjacent pixel value plane prediction modes corresponding to each divided block. The predicted pixel value to be calculated is calculated.

上記分割ブロック平面予測計算部114の動作及び動作理論を、数式を用いて説明する。ここで、従来技術の分割ブロック平面予測計算部24で説明したが、平面予測モードでは、上述しようにマクロブロックの各画素の予測値P(x,y)(x=0〜7、y=0〜7)は、
P(x,y)=(a+b×(x−3)+c×(y−3)+16)/32
となる。但し、
a=(p7+q7)×16
b=(34×H+32)/64
c=(34×V+32)/64
H=(p7−pq)×4+(p6−p0)×3+(p5−p1)×2+(p4−p2)
V=(q7−pq)×4+(q6−q0)×3+(q5−q1)×2+(q4−q2)
である。なお、画素P(3,3)は、P(3,3)=(a+16)/32となり、マクロブロックの平面予測の基準画素位置となる。
The operation and operation theory of the divided block plane prediction calculation unit 114 will be described using mathematical expressions. Here, the conventional block division plane prediction calculation unit 24 has been described, but in the plane prediction mode, as described above, the prediction value P (x, y) (x = 0 to 7, y = 0) of each pixel of the macroblock. ~ 7)
P (x, y) = (a + b × (x−3) + c × (y−3) +16) / 32
It becomes. However,
a = (p7 + q7) × 16
b = (34 × H + 32) / 64
c = (34 × V + 32) / 64
H = (p7-pq) × 4 + (p6-p0) × 3 + (p5-p1) × 2 + (p4-p2)
V = (q7-pq) × 4 + (q6-q0) × 3 + (q5-q1) × 2 + (q4-q2)
It is. Note that the pixel P (3, 3) is P (3, 3) = (a + 16) / 32, which is a reference pixel position for plane prediction of the macroblock.

ここで、変数b、cは、マクロブロックの垂直方向側もしくは水平方向側の隣接画素の2つの画素値と、その画素間距離に応じて重み付け平均したものである。なお、以下説明では、水平方向側の隣接画素pq、p0〜p7により算出される変数bについて説明する。変数cについて算出方法は、垂直方向側の隣接画素pq、q0〜q7を用いる以外は変数bと同様であるため省略する。   Here, the variables b and c are weighted averages according to two pixel values of adjacent pixels on the vertical or horizontal side of the macroblock and the distance between the pixels. In the following description, the variable b calculated from the adjacent pixels pq and p0 to p7 on the horizontal side will be described. The calculation method for the variable c is the same as the variable b except that the adjacent pixels pq and q0 to q7 on the vertical direction side are used, and thus the description thereof is omitted.

変数bの値の算出方法の概念を説明するグラフを図6に示す。図6のグラフでは、縦軸を隣接画素の画素値、横軸を相対画素位置とする。この相対画素位置は、画素pq〜p7でそれぞれ「−1」〜「7」となる。図6のグラフに示すような画素pqとp7、画素p0とp6、画素p1とp5、画素p2とp4の各画素間の直線の傾きにそれぞれの相対画素位置の差で重み付けし、平均化して変数bを算出している。   A graph for explaining the concept of the method for calculating the value of the variable b is shown in FIG. In the graph of FIG. 6, the vertical axis represents the pixel value of the adjacent pixel, and the horizontal axis represents the relative pixel position. The relative pixel positions are “−1” to “7” for the pixels pq to p7, respectively. Pixels qq and p7, pixels p0 and p6, pixels p1 and p5, and pixels p2 and p4 as shown in the graph of FIG. 6 are weighted with the relative pixel position difference and averaged. The variable b is calculated.

しかし、ここで本実施の形態1では、図2〜図5に示したような各分割ブロックに対応する隣接画素しか利用しない。このため、変数推定部171は、各分割ブロックに対応する隣接画素のみを利用して、この変数を推定する。各分割ブロックk(k=0〜3)の平面予測のための変数a(k)、b(k)、c(k)(以下、推定変数a(k)、b(k)、c(k)と称す)は、
a(0)=(p3+q3)×16
a(1)=(p7+q3)×16
a(2)=(p3+q7)×16
a(3)=(p7+q7)×16
b(0)=b(2)=(((p3−p0)×3+(p2−p1))×205+32)/64
b(1)=b(3)=(((p7−p4)×3+(p6−p5))×205+32)/64
c(0)=c(1)=(((q3−q0)×3+(q2−q1))×205+32)/64
c(2)=c(3)=(((q7−q4)×3+(q6−q5))×205+32)/64
となる。
However, in the first embodiment, only adjacent pixels corresponding to each divided block as shown in FIGS. 2 to 5 are used. Therefore, the variable estimation unit 171 estimates this variable using only adjacent pixels corresponding to each divided block. Variables a (k), b (k), c (k) (hereinafter, estimated variables a (k), b (k), c (k) for plane prediction of each divided block k (k = 0 to 3) ))
a (0) = (p3 + q3) × 16
a (1) = (p7 + q3) × 16
a (2) = (p3 + q7) × 16
a (3) = (p7 + q7) × 16
b (0) = b (2) = (((p3-p0) × 3 + (p2-p1)) × 205 + 32) / 64
b (1) = b (3) = (((p7−p4) × 3 + (p6−p5)) × 205 + 32) / 64
c (0) = c (1) = (((q3-q0) * 3 + (q2-q1)) * 205 + 32) / 64
c (2) = c (3) = (((q7-q4) * 3 + (q6-q5)) * 205 + 32) / 64
It becomes.

なお、ブロックblock0においては、隣接参照画素pqの画素値を画素p0とq0の画素値から以下のように推定してもよい。
pq=(p0+q0+1)/2
In the block block 0, the pixel value of the adjacent reference pixel pq may be estimated from the pixel values of the pixels p0 and q0 as follows.
pq = (p0 + q0 + 1) / 2

そして、この推定した画素値pqを用いて、
b(0)=(((p2−pq)×3+(p1−p0))×205+32)/64
c(0)=(((q2−qq)×3+(q1−q0))×205+32)/64
としてもよい。
And using this estimated pixel value pq,
b (0) = (((p2-pq) × 3 + (p1-p0)) × 205 + 32) / 64
c (0) = (((q2-qq) * 3 + (q1-q0)) * 205 + 32) / 64
It is good.

図7に、本実施の形態1のブロックblock0、block1の推定変数b(0)、b(1)の値の算出方法の概念を説明するグラフを示す。なお、分割ブロックblock2、block3の推定変数b(2)、b(3)もそれぞれ推定変数b(0)、b(1)と同様である。このグラフに示すように、分割ブロックblock0では、画素p0とp3、画素p1とp2の各画素間の直線の傾きにそれぞれの相対画素位置の差で重み付けし、平均化して推定変数b(0)を算出している。また、分割ブロックblock1では、画素p4とp7、画素p5とp6の各画素間の直線の傾きにそれぞれの相対画素位置の差で重み付けし、平均化して推定変数b(1)を算出している。   FIG. 7 shows a graph for explaining the concept of the method of calculating the values of the estimated variables b (0) and b (1) of the blocks block0 and block1 of the first embodiment. Note that the estimation variables b (2) and b (3) of the divided blocks block2 and block3 are the same as the estimation variables b (0) and b (1), respectively. As shown in this graph, in the divided block block0, the gradients of the straight lines between the pixels p0 and p3 and the pixels p1 and p2 are weighted by the difference between the relative pixel positions, averaged, and estimated variable b (0). Is calculated. Further, in the divided block block 1, the estimation variable b (1) is calculated by weighting and averaging the slopes of the straight lines between the pixels p 4 and p 7 and the pixels p 5 and p 6 with the difference between the relative pixel positions. .

つまり、この図7の推定変数b(0)、b(1)は、図6で説明した変数bの近似値を推定値として算出している。推定変数c(k)についても、上述した推定変数b(k)と同様に変数cの近似値を推定値として算出される。   That is, the estimated variables b (0) and b (1) in FIG. 7 are calculated using the approximate value of the variable b described in FIG. 6 as an estimated value. As for the estimated variable c (k), an approximate value of the variable c is calculated as an estimated value in the same manner as the estimated variable b (k) described above.

また、推定変数b(k)、c(k)を求める別の方法として、図8の概念図に示すような各分割ブロックで参照できる4つの隣接参照画素の最小2乗法による近似直線を求め、その近似直線の傾きをスケーリングしたものを用いて推定変数b(k)、c(k)を求めてもよい。   As another method for obtaining the estimated variables b (k) and c (k), an approximate straight line by the least square method of four adjacent reference pixels that can be referred to in each divided block as shown in the conceptual diagram of FIG. 8 is obtained. The estimated variables b (k) and c (k) may be obtained using a scaled slope of the approximate straight line.

推定予測値計算部172は、上記推定変数a(k)、b(k)、c(k)を用いて、平面予測モードにより予測される予測画素値を算出する。よって、分割ブロックblock0〜block3の平面予測(P_PLAN(0)〜P_PLAN(0))による予測画素値P(x,y)は、以下のようになる。   The estimated predicted value calculation unit 172 calculates a predicted pixel value predicted in the planar prediction mode using the estimated variables a (k), b (k), and c (k). Therefore, the prediction pixel value P (x, y) by plane prediction (P_PLAN (0) to P_PLAN (0)) of the divided blocks block0 to block3 is as follows.

P_PLAN(0)の場合、
P(x,y)=(a(0)+b(0)×(x−1)+c(0)×(y−1)+16)/32 (x=0〜3、y=0〜3)
となる。なお、PLAN(0)の場合、基準画素位置は、P(1,1)となる。
In the case of P_PLAN (0),
P (x, y) = (a (0) + b (0) × (x−1) + c (0) × (y−1) +16) / 32 (x = 0 to 3, y = 0 to 3)
It becomes. In the case of PLAN (0), the reference pixel position is P (1, 1).

P_PLAN(1)の場合、
P(x,y)=(a(1)+b(1)×(x−3)+c(1)×(y−1)+16)/32 (x=4〜7、y=0〜3)
となる。なお、PLAN(1)の場合、基準画素位置は、P(3,1)となる。
In the case of P_PLAN (1),
P (x, y) = (a (1) + b (1) × (x−3) + c (1) × (y−1) +16) / 32 (x = 4 to 7, y = 0 to 3)
It becomes. In the case of PLAN (1), the reference pixel position is P (3, 1).

P_PLAN(2)の場合、
P(x,y)=(a(2)+b(2)×(x−1)+c(2)×(y−3)+16)/32 (x=0〜3、y=4〜7)
となる。なお、PLAN(2)の場合、基準画素位置は、P(1,3)となる。
In the case of P_PLAN (2),
P (x, y) = (a (2) + b (2) × (x−1) + c (2) × (y−3) +16) / 32 (x = 0 to 3, y = 4 to 7)
It becomes. In the case of PLAN (2), the reference pixel position is P (1, 3).

P_PLAN(3)の場合、
P(x,y)=(a(3)+b(3)×(x−3)+c(3)×(y−3)+16)/32 (x=4〜7、y=4〜7)
となる。なお、PLAN(3)の場合、基準画素位置は、P(3,3)となる。
In the case of P_PLAN (3),
P (x, y) = (a (3) + b (3) × (x−3) + c (3) × (y−3) +16) / 32 (x = 4 to 7, y = 4 to 7)
It becomes. In the case of PLAN (3), the reference pixel position is P (3, 3).

差分計算部121〜124は、分割ブロック垂直予測計算部111、分割ブロック水平予測計算部112、分割ブロックDC予測計算部113、分割ブロック平面予測計算部114が算出した各分割ブロックの上記予測画素値P(x,y)と、分割ブロックの入力画素の画素値の差分を計算し、各予測モードの予測誤差値を算出する。   The difference calculation units 121 to 124 are the predicted pixel values of the respective divided blocks calculated by the divided block vertical prediction calculation unit 111, the divided block horizontal prediction calculation unit 112, the divided block DC prediction calculation unit 113, and the divided block plane prediction calculation unit 114. The difference between P (x, y) and the pixel value of the input pixel of the divided block is calculated, and the prediction error value of each prediction mode is calculated.

評価値計算部161〜164は、それぞれ上記差分計算部121〜124が算出した予測誤差値に応じた評価値を算出する。なお、評価値計算部161〜164は、それぞれ2次元アダマール変換値生成部131〜134と、絶対値和計算部141〜144とを有する。   The evaluation value calculation units 161 to 164 calculate evaluation values corresponding to the prediction error values calculated by the difference calculation units 121 to 124, respectively. The evaluation value calculators 161 to 164 include two-dimensional Hadamard transform value generators 131 to 134 and absolute value sum calculators 141 to 144, respectively.

2次元アダマール変換値生成部131〜134は、それぞれ上記差分計算部121〜124が算出した予測誤差値をアダマール変換処理する。そして、それぞれ絶対値和計算部141〜144により、その処理結果の絶対値和を算出し、上記評価値として出力する。   The two-dimensional Hadamard transform value generators 131 to 134 perform Hadamard transform processing on the prediction error values calculated by the difference calculators 121 to 124, respectively. Then, the absolute value sum calculation units 141 to 144 respectively calculate the absolute value sum of the processing results and output it as the evaluation value.

比較部150は、絶対値和計算部141〜144がそれぞれ出力した評価値を比較し、その評価値の最小の値となった予測モードを最適な予測モードと判定する。   The comparison unit 150 compares the evaluation values output by the absolute value sum calculation units 141 to 144, respectively, and determines the prediction mode having the smallest evaluation value as the optimum prediction mode.

ここで、図19の従来の予測モード判定部11では、各予測モードにおいて、分割ブロックの予測値を算出する際、必要なマクロブロックの隣接参照画素を全て読み込まないと、各予測モードの評価値の計算の開始ができなかった。しかし、本実施の形態1の予測モード判定部100では、マクロブロックの隣接参照画素を全て読み込む必要がなく、各分割ブロックに対応する隣接参照画素のみを読み込めばよい。このため、この隣接参照画素値の読み取りデータを保持するレジスタ等の記憶装置のハードウェア規模を小さく抑えることができる。   Here, in the prediction mode determination unit 11 of FIG. 19, when calculating the prediction value of the divided block in each prediction mode, if all the adjacent reference pixels of the necessary macroblock are not read, the evaluation value of each prediction mode Could not start the calculation. However, the prediction mode determination unit 100 of Embodiment 1 does not need to read all the adjacent reference pixels of the macroblock, and only needs to read the adjacent reference pixels corresponding to each divided block. For this reason, the hardware scale of a storage device such as a register holding read data of the adjacent reference pixel value can be reduced.

また、分割ブロックに対応する隣接参照画素のみを読み出した時点で、判定処理が開始できるため、全体の処理時間を短縮することができる。更に、各分割ブロックで参照する隣接参照画素が、それぞれの予測モードで同じにできるため、予測モード判定部100の制御が容易になる。   Further, since only the adjacent reference pixels corresponding to the divided blocks are read out, the determination process can be started, so that the entire processing time can be shortened. Furthermore, since the adjacent reference pixels referenced in each divided block can be the same in each prediction mode, the prediction mode determination unit 100 can be easily controlled.

発明の実施の形態2   Embodiment 2 of the Invention

以下、本発明を適用した具体的な実施の形態2について、図面を参照しながら詳細に説明する。この実施の形態2は、実施の形態1と同様、本発明を画像符号化装置の予測モード判定部に適用したものである。なお、実施の形態1と同様、実施の形態2にかかる画像符号化装置の全体構成も、図18に示した画像符号化装置1のものと同様である。なお、本実施の形態2でも、実施の形態1と同様、予測モード判定部が判定する最適なイントラ予測モードを、DC予測、垂直予測、水平予測、平面予測の4種類から決定するものとする。   Hereinafter, a specific second embodiment to which the present invention is applied will be described in detail with reference to the drawings. In the second embodiment, as in the first embodiment, the present invention is applied to a prediction mode determination unit of an image encoding device. As in the first embodiment, the overall configuration of the image coding apparatus according to the second embodiment is the same as that of the image coding apparatus 1 shown in FIG. In the second embodiment, as in the first embodiment, the optimum intra prediction mode determined by the prediction mode determination unit is determined from four types of DC prediction, vertical prediction, horizontal prediction, and plane prediction. .

図9に本実施の形態2にかかる画像符号化装置の予測モード判定部200の構成を示す。図9示すように、予測モード判定部200は、分割ブロック垂直予測計算部111と、分割ブロック水平予測計算部112と、分割ブロックDC予測計算部213と、分割ブロック平面予測計算部214と、差分計算部121〜124と、評価値計算部161〜164と、比較部150とを有する。また、評価値計算部161は、2次元アダマール変換値生成部131と、絶対値和計算部141とを有する。評価値計算部162は、2次元アダマール変換値生成部132と、絶対値和計算部142とを有する。評価値計算部163は、2次元アダマール変換値生成部133と、絶対値和計算部143とを有する。評価値計算部164は、2次元アダマール変換値生成部134と、絶対値和計算部144とを有する。   FIG. 9 illustrates a configuration of the prediction mode determination unit 200 of the image encoding device according to the second embodiment. As illustrated in FIG. 9, the prediction mode determination unit 200 includes a divided block vertical prediction calculation unit 111, a divided block horizontal prediction calculation unit 112, a divided block DC prediction calculation unit 213, a divided block plane prediction calculation unit 214, and a difference. Calculation units 121 to 124, evaluation value calculation units 161 to 164, and comparison unit 150 are included. The evaluation value calculation unit 161 includes a two-dimensional Hadamard transform value generation unit 131 and an absolute value sum calculation unit 141. The evaluation value calculation unit 162 includes a two-dimensional Hadamard transform value generation unit 132 and an absolute value sum calculation unit 142. The evaluation value calculation unit 163 includes a two-dimensional Hadamard transform value generation unit 133 and an absolute value sum calculation unit 143. The evaluation value calculation unit 164 includes a two-dimensional Hadamard transform value generation unit 134 and an absolute value sum calculation unit 144.

なお、図9に示された符号のうち、図1と同じ符号を付した構成は、図1と同じか又は類似の構成を示している。本実施の形態2と実施の形態1と異なる点は、実施の形態1が色差成分のイントラ予測を行っていたのに対して、本実施の形態2は、輝度成分のイントラ予測を行うことを前提としている。この輝度成分のイントラ予測では、図10に示すように、マクロブロックを16画素×16画素とする。このため、本実施の形態2では、その実施の形態1との相違点である16画素×16画素のマクロブロックで本発明を適用した場合の構成を重点的に説明する。なお、実施の形態1と重複する場合は、その説明を省略する。   In addition, the structure which attached | subjected the code | symbol same as FIG. 1 among the codes | symbols shown in FIG. 9 has shown the structure similar to or similar to FIG. The difference between the second embodiment and the first embodiment is that the first embodiment performs the intra prediction of the color difference component, whereas the second embodiment performs the intra prediction of the luminance component. It is assumed. In this intra prediction of luminance components, as shown in FIG. 10, the macroblock is 16 pixels × 16 pixels. For this reason, in the second embodiment, a configuration when the present invention is applied to a macroblock of 16 pixels × 16 pixels, which is a difference from the first embodiment, will be described mainly. In addition, when overlapping with Embodiment 1, the description is abbreviate | omitted.

ここで、図11を用いて、本実施の形態2における分割ブロック垂直予測計算部111、分割ブロック水平予測計算部112、分割ブロックDC予測計算部213、分割ブロック平面予測計算部214のそれぞれが利用するマクロブロックの隣接画素の説明を行う。なお、マクロブロック自体は、図10で示したものと同様である。   Here, referring to FIG. 11, each of divided block vertical prediction calculation unit 111, divided block horizontal prediction calculation unit 112, divided block DC prediction calculation unit 213, and divided block plane prediction calculation unit 214 in the second embodiment is used. The adjacent pixels of the macro block to be described will be described. The macroblock itself is the same as that shown in FIG.

図10に示すように、マクロブロックは、4画素×4画素を基本単位とする16個の分割ブロックblock(k)(k=0〜15)を有する。各予測モードでの予測計算に利用される隣接画素は、これら分割ブロックblock(k)それぞれに対応して異なる。このため、図11では、任意の分割ブロックblock(k)に対応する垂直方向の隣接参照画素をA〜Dとし、水平方向の隣接参照画素をE〜Hとする。このため、図9に示した「分割ブロック直上側参照画素」、「分割ブロック直左側参照画素」は、それぞれ図11の隣接画素A〜D、E〜Hを表す。   As shown in FIG. 10, the macroblock has 16 divided blocks block (k) (k = 0 to 15) whose basic unit is 4 pixels × 4 pixels. The adjacent pixels used for the prediction calculation in each prediction mode differ corresponding to each of these divided blocks block (k). Therefore, in FIG. 11, adjacent reference pixels in the vertical direction corresponding to an arbitrary divided block block (k) are A to D, and adjacent reference pixels in the horizontal direction are E to H. For this reason, the “reference pixel immediately above the divided block” and the “reference pixel immediately to the left of the divided block” illustrated in FIG. 9 respectively represent the adjacent pixels A to D and E to H in FIG.

このため、隣接参照画素A〜Dは、対応する分割ブロックblock(k)に応じて隣接画素p0〜p15から選択される。隣接参照画素E〜Hも同様、対応する分割ブロックblock(k)に応じて隣接画素q0〜q15から選択される。例えば、分割ブロックblock0では、隣接参照画素A〜Dは、画素p0〜p3、隣接参照画素E〜Hは、画素q0〜q3となる。また、例えば、分割ブロックblock10では、隣接参照画素A〜Dは、画素p4〜p7、隣接参照画素E〜Hは、画素q8〜q11となる。   For this reason, the adjacent reference pixels A to D are selected from the adjacent pixels p0 to p15 according to the corresponding divided block block (k). Similarly, the adjacent reference pixels E to H are selected from the adjacent pixels q0 to q15 according to the corresponding divided block block (k). For example, in the divided block block0, adjacent reference pixels A to D are pixels p0 to p3, and adjacent reference pixels E to H are pixels q0 to q3. Further, for example, in the divided block block 10, the adjacent reference pixels A to D are the pixels p4 to p7, and the adjacent reference pixels E to H are the pixels q8 to q11.

以下に、予測モード判定部200の構成及び動作を説明する。分割ブロック垂直予測計算部111は、実施の形態1と同様の動作を行う。このため、分割ブロックblock(k)に対応する隣接参照画素A〜Dから垂直予測モードにより予測される予測画素値P_VERT(k)を算出する。   The configuration and operation of the prediction mode determination unit 200 will be described below. The divided block vertical prediction calculation unit 111 performs the same operation as in the first embodiment. For this reason, the prediction pixel value P_VERT (k) predicted by the vertical prediction mode is calculated from the adjacent reference pixels A to D corresponding to the divided block block (k).

分割ブロック水平予測計算部112も、実施の形態1と同様の動作を行う。このため、分割ブロックblock(k)に対応する隣接参照画素E〜Hから水平予測モードにより予測される予測画素値P_HORI(k)を算出する。   The divided block horizontal prediction calculation unit 112 also performs the same operation as in the first embodiment. For this reason, the prediction pixel value P_HORI (k) predicted by the horizontal prediction mode is calculated from the adjacent reference pixels E to H corresponding to the divided block block (k).

分割ブロックDC予測計算部213は、推定予測値計算部211を有する。推定予測値計算部211は、以下の式に示すように、分割ブロックblock(k)に対応する隣接参照画素A〜D及びE〜Hの平均値を推定値として算出する。そして、その算出した結果をDC予測モードにより予測される推定予測画素値とする。
P_DC(k)=(A+B+C+D+E+F+G+H+4)/8
The divided block DC prediction calculation unit 213 includes an estimated prediction value calculation unit 211. The estimated predicted value calculation unit 211 calculates, as estimated values, average values of adjacent reference pixels A to D and E to H corresponding to the divided block block (k), as shown in the following equation. Then, the calculated result is set as an estimated prediction pixel value predicted by the DC prediction mode.
P_DC (k) = (A + B + C + D + E + F + G + H + 4) / 8

分割ブロック平面予測計算部214は、変数推定部221と、推定予測値計算部222とを有する。変数推定部221は、分割ブロックblock(k)に対応する隣接画素A〜D及びE〜Hを利用して、推定変数a(k)、b(k)、c(k)を推定する。推定変数a(k)、b(k)、c(k)は、以下に示すような式となる。
a(k)=(D+H)×16
b(k)=(((D−A)×3+(C−B))×205+32)/64
c(k)=(((H−E)×3+(G−F))×205+32)/64
The divided block plane prediction calculation unit 214 includes a variable estimation unit 221 and an estimated prediction value calculation unit 222. The variable estimation unit 221 estimates the estimation variables a (k), b (k), and c (k) using the adjacent pixels A to D and E to H corresponding to the divided block block (k). The estimated variables a (k), b (k), and c (k) are expressed as follows.
a (k) = (D + H) × 16
b (k) = (((D−A) × 3 + (C−B)) × 205 + 32) / 64
c (k) = (((H−E) × 3 + (G−F)) × 205 + 32) / 64

推定予測値計算部222は、上記推定変数a(k)、b(k)、c(k)を用いて、平面予測モードにより予測される予測画素値を算出する。よって、分割ブロックblock(k)の平面予測による予測画素値P(x,y)は、以下のようになる。
P(x,y)=(a(k)+b(k)×(x−xo(k))+c(k)×(y−yo(k))+16)/32 (x=0〜15、y=0〜15)
The estimated predicted value calculation unit 222 calculates a predicted pixel value predicted by the planar prediction mode using the estimated variables a (k), b (k), and c (k). Therefore, the predicted pixel value P (x, y) by plane prediction of the divided block block (k) is as follows.
P (x, y) = (a (k) + b (k) × (x−xo (k)) + c (k) × (y−yo (k)) + 16) / 32 (x = 0 to 15, y = 0 to 15)

但し、xo(k)及びyo(k)は、それぞれ分割ブロックblock(k)に応じて、
(xo(0),yo(0))=(1,1)
(xo(1),yo(1))=(3,1)
(xo(2),yo(2))=(1,3)
(xo(3),yo(3))=(3,3)
(xo(4),yo(4))=(5,1)
(xo(5),yo(5))=(7,1)
(xo(6),yo(6))=(5,3)
(xo(7),yo(7))=(7,3)
(xo(8),yo(8))=(1,5)
(xo(9),yo(9))=(3,5)
(xo(10),yo(10))=(1,7)
(xo(11),yo(11))=(3,7)
(xo(12),yo(12))=(5,5)
(xo(13),yo(13))=(7,5)
(xo(14),yo(14))=(5,7)
(xo(15),yo(15))=(7,7)
となる。なお、この場合の平面予測モードによる各分割ブロックの基準画素位置は、図12(a)〜図12(c)の例に示すように、分割ブロックblock(k)のマクロブロック内の位置に応じてそれぞれ異なることに注意する。
However, xo (k) and yo (k) are respectively in accordance with the divided block block (k),
(Xo (0), yo (0)) = (1,1)
(Xo (1), yo (1)) = (3, 1)
(Xo (2), yo (2)) = (1,3)
(Xo (3), yo (3)) = (3, 3)
(Xo (4), yo (4)) = (5, 1)
(Xo (5), yo (5)) = (7, 1)
(Xo (6), yo (6)) = (5, 3)
(Xo (7), yo (7)) = (7,3)
(Xo (8), yo (8)) = (1,5)
(Xo (9), yo (9)) = (3, 5)
(Xo (10), yo (10)) = (1,7)
(Xo (11), yo (11)) = (3, 7)
(Xo (12), yo (12)) = (5, 5)
(Xo (13), yo (13)) = (7, 5)
(Xo (14), yo (14)) = (5, 7)
(Xo (15), yo (15)) = (7,7)
It becomes. Note that the reference pixel position of each divided block in the planar prediction mode in this case depends on the position of the divided block block (k) in the macro block as shown in the examples of FIGS. 12 (a) to 12 (c). Note that they are different.

差分計算部121〜124、評価値計算部161〜164、比較部150の機能及び動作は、実施の形態1と同様なため説明は省略する。   Since the functions and operations of the difference calculation units 121 to 124, the evaluation value calculation units 161 to 164, and the comparison unit 150 are the same as those in the first embodiment, description thereof will be omitted.

以上、実施の形態1では本発明を用いて色差成分のイントラ予測を行っていたが、本実施の形態2のように本発明を用いて輝度成分のイントラ予測を行うこともできる。この実施の形態2でも、マクロブロックの隣接参照画素を全て読み込む必要がなく、分割ブロックに対応する隣接参照画素のみを読み込めばよい。このため、実施の形態1と同様の効果を得ることができる。   As described above, in the first embodiment, the intra prediction of the color difference component is performed using the present invention. However, the intra prediction of the luminance component can be performed using the present invention as in the second embodiment. Also in the second embodiment, it is not necessary to read all the adjacent reference pixels of the macroblock, and only the adjacent reference pixels corresponding to the divided block need be read. For this reason, the same effect as Embodiment 1 can be acquired.

なお、本発明は上記実施の形態に限られたものでなく、趣旨を逸脱しない範囲で適宜変更することが可能である。例えば、実施の形態1では、分割ブロックを4画素×4画素としていたが、図13に示すように8画素×4画素もしくは図14に示すように4画素×8画素としてもよい。あるいは実施の形態2のようにマクロブロックが16画素×16画素である場合、もしくは、マクロブロックがそれ以上の画素単位である場合、分割ブロックを図15に示すように、8画素×8画素を基本単位としてもよい。また、図16、図17に示すように、16画素×8画素もしくは8画素×16画素を基本単位としてもよい。   Note that the present invention is not limited to the above-described embodiment, and can be changed as appropriate without departing from the spirit of the present invention. For example, in the first embodiment, the divided blocks are 4 pixels × 4 pixels, but may be 8 pixels × 4 pixels as shown in FIG. 13 or 4 pixels × 8 pixels as shown in FIG. Alternatively, when the macro block is 16 pixels × 16 pixels as in the second embodiment, or when the macro block is a unit of pixels larger than that, the divided block is 8 pixels × 8 pixels as shown in FIG. It may be a basic unit. Also, as shown in FIGS. 16 and 17, 16 pixels × 8 pixels or 8 pixels × 16 pixels may be used as a basic unit.

この場合、n画素×m画素(n、mは正の整数)の分割ブロックでは、分割ブロック直上参照画素としてn画素、分割ブロック直左参照画素としてm画素を参照できることを意味する。このように、参照できる画素数が多くなるので、モード判定時の予測値計算の推定精度を高くすることができる。   In this case, in a divided block of n pixels × m pixels (n and m are positive integers), it means that n pixels can be referred to as a reference pixel immediately above the divided block and m pixels can be referred to as a reference pixel immediately to the left of the divided block. In this way, since the number of pixels that can be referred to increases, the estimation accuracy of prediction value calculation at the time of mode determination can be increased.

100、200 予測モード判定部
111 分割ブロック垂直予測補正値計算部
112 分割ブロック水平予測補正値計算部
113 分割ブロックDC予測補正値計算部
114 分割ブロック平面予測補正値計算部
121〜124 差分計算部
131〜134 2次元アダマール変換値生成部
150 比較部
161〜164 評価値計算部
171、221 変数推定部
172、222 推定予測値計算部
100, 200 Prediction mode determination unit 111 Division block vertical prediction correction value calculation unit 112 Division block horizontal prediction correction value calculation unit 113 Division block DC prediction correction value calculation unit 114 Division block plane prediction correction value calculation unit 121 to 124 Difference calculation unit 131 ~ 134 2D Hadamard Transform Value Generation Unit 150 Comparison Units 161 to 164 Evaluation Value Calculation Units 171, 221 Variable Estimation Units 172, 222 Estimated Prediction Value Calculation Unit

Claims (15)

動画像データを入力し、複数の予測モードのうち少なくとも1つの予測モードを用いて、マクロブロックの動画像データを各マクロブロックに隣接する参照画素から予測し、その予測した動画像データを用いて、前記入力した動画像データを符号化する画像符号化装置であって、
前記マクロブロックを複数に分割したそれぞれの分割ブロックにおいて、前記複数の予測モードのうちの少なくとも1つの第1の予測モードにより、前記分割ブロックに対応する前記参照画素から第1の予測画素を生成する第1の予測画素生成部と、
前記複数の予測モードのうちの第2の予測モードにより、前記分割ブロックに対応する前記参照画素から第2の予測画素を生成する場合、前記分割ブロックに対応する参照画素から推定した値に応じて第2の予測画素を生成する第2の予測画素生成部と、
前記第1の予測画素値に応じた評価値と第2の予測画素値に応じた評価値とを比較して、前記1つの予測モードを判定する判定部と、を有する
画像符号化装置
Moving picture data is input, using at least one prediction mode among a plurality of prediction modes, the moving picture data of the macroblock is predicted from reference pixels adjacent to each macroblock, and the predicted moving picture data is used. An image encoding device for encoding the input moving image data,
In each divided block obtained by dividing the macroblock into a plurality, a first prediction pixel is generated from the reference pixel corresponding to the division block by using at least one first prediction mode of the plurality of prediction modes. A first predicted pixel generation unit;
When generating the second prediction pixel from the reference pixel corresponding to the divided block by the second prediction mode of the plurality of prediction modes, according to the value estimated from the reference pixel corresponding to the divided block A second predicted pixel generation unit for generating a second predicted pixel;
An image coding apparatus comprising: a determination unit that compares the evaluation value according to the first prediction pixel value with the evaluation value according to the second prediction pixel value and determines the one prediction mode
前記複数の予測モードは、DC予測、垂直予測、水平予測、平面予測を含む
請求項1に記載の画像符号化装置。
The image encoding apparatus according to claim 1, wherein the plurality of prediction modes include DC prediction, vertical prediction, horizontal prediction, and plane prediction.
前記第1の予測モードは、DC予測、垂直予測、水平予測の予測モードのうちの少なくとも1つの予測モードであり、
前記第2の予測モードは、平面予測の予測モードである
請求項2に記載の画像符号化装置。
The first prediction mode is at least one prediction mode of DC prediction, vertical prediction, and horizontal prediction modes;
The image coding apparatus according to claim 2, wherein the second prediction mode is a prediction mode of plane prediction.
前記第2の予測画素生成部は、
前記分割ブロックに対応する参照画素を利用して前記第2の予測画素を推定するための推定変数値を生成する変数推定部と、
前記第2の予測モードにより、前記推定変数値から第2の予測画素を推定する推定予測値計算部と、を有する
請求項1〜請求項3のいずれか1項に記載の画像符号化装置。
The second predicted pixel generation unit
A variable estimation unit that generates an estimated variable value for estimating the second predicted pixel using a reference pixel corresponding to the divided block;
4. The image encoding device according to claim 1, further comprising: an estimated predicted value calculation unit configured to estimate a second predicted pixel from the estimated variable value in the second prediction mode. 5.
前記マクロブロックに隣接する、水平方向側の参照画素を左から順に、pq、p0〜pn(n:正の整数)、垂直方向側の参照画素を上から順に、前記pq、q0〜qm(m:正の整数)とする場合、前記p0〜pnの画素及び前記q0〜qmの画素のうち前記分割ブロックに対応する参照画素の画素値から平面予測の前記推定変数値を算出する
請求項4に記載の画像符号化装置。
Pq, p0 to pn (n: positive integer) in order from the left in the horizontal direction reference pixels adjacent to the macroblock, and pq, q0 to qm (m in order from the top in the vertical direction. 5 is calculated from the pixel value of the reference pixel corresponding to the divided block among the pixels of p0 to pn and the pixels of q0 to qm. The image encoding device described.
前記マクロブロックに隣接する、水平方向側の参照画素を左から順に、pq、p0〜pn(n:正の整数)、垂直方向側の参照画素を上から順に、前記pq、q0〜qm(m:正の整数)とする場合、前記pqの画素値を前記p0、q0の画素値に応じて算出した推定pq値とし、前記推定pq値及び前記p0〜pnの画素及び前記q0〜qmの画素のうち前記分割ブロックに対応する参照画素の画素値から平面予測の前記推定変数値を算出する
請求項4に記載の画像符号化装置。
Pq, p0 to pn (n: positive integer) in order from the left in the horizontal direction reference pixels adjacent to the macroblock, and pq, q0 to qm (m in order from the top in the vertical direction. : A positive integer), the pixel value of pq is the estimated pq value calculated according to the pixel values of p0 and q0, the estimated pq value, the pixels of p0 to pn, and the pixels of q0 to qm The image coding apparatus according to claim 4, wherein the estimated variable value for plane prediction is calculated from a pixel value of a reference pixel corresponding to the divided block.
前記第1の予測モードは、平面予測、垂直予測、水平予測の予測モードのうちの少なくとも1つの予測モードであり、
前記第2の予測モードは、DC予測の予測モードである
請求項2に記載の画像符号化装置。
The first prediction mode is at least one prediction mode of a prediction mode of plane prediction, vertical prediction, and horizontal prediction,
The image coding apparatus according to claim 2, wherein the second prediction mode is a prediction mode of DC prediction.
前記マクロブロックに隣接する、水平方向側の参照画素を左から順に、pq、p0〜pn(n:正の整数)、垂直方向側の参照画素を上から順に、前記pq、q0〜qm(m:正の整数)とする場合、前記p0〜pnの画素及び前記q0〜qmの画素のうち前記分割ブロックに対応する参照画素の画素値の平均値をDC予測の前記推定した値とする
請求項7に記載の画像符号化装置。
Pq, p0 to pn (n: positive integer) in order from the left in the horizontal direction reference pixels adjacent to the macroblock, and pq, q0 to qm (m in order from the top in the vertical direction. : Is a positive integer), an average value of pixel values of reference pixels corresponding to the divided blocks among the pixels of p0 to pn and the pixels of q0 to qm is set as the estimated value of DC prediction. 8. The image encoding device according to 7.
前記マクロブロックは、H.264の色差成分もしくは輝度成分の規格に応じた画素単位からなる
請求項1〜請求項8のいずれか1項に記載の画像符号化装置。
The macroblock is H.264. The image coding apparatus according to any one of claims 1 to 8, comprising a pixel unit according to a H.264 color difference component or luminance component standard.
前記分割ブロックは、4画素×4画素もしくは8画素×4画素もしくは8画素×8画素で構成される
請求項9に記載の画像符号化装置。
The image coding apparatus according to claim 9, wherein the divided block includes 4 pixels × 4 pixels, 8 pixels × 4 pixels, or 8 pixels × 8 pixels.
動画像データを入力し、複数の予測モードのうち少なくとも1つの予測モードを用いて、マクロブロックの動画像データを各マクロブロックに隣接する参照画素から予測し、その予測した動画像データを用いて、前記入力した動画像データを符号化する画像符号化方法であって、
前記マクロブロックを複数に分割したそれぞれの分割ブロックにおいて、前記複数の予測モードのうちの少なくとも1つの第1の予測モードにより、前記分割ブロックに対応する前記参照画素から第1の予測画素を生成し、
前記複数の予測モードのうちの第2の予測モードにより、前記分割ブロックに対応する前記参照画素から第2の予測画素を生成する場合、前記分割ブロックに対応する参照画素から推定した値に応じて第2の予測画素を生成し、
前記第1の予測画素の値に応じた評価値と前記第2の予測画素の値に応じた評価値とを比較して、前記1つの予測モードを判定する
画像符号化方法。
Moving picture data is input, using at least one prediction mode among a plurality of prediction modes, the moving picture data of the macroblock is predicted from reference pixels adjacent to each macroblock, and the predicted moving picture data is used. An image encoding method for encoding the input moving image data,
In each divided block obtained by dividing the macroblock into a plurality, a first prediction pixel is generated from the reference pixel corresponding to the divided block by at least one first prediction mode of the plurality of prediction modes. ,
When generating the second prediction pixel from the reference pixel corresponding to the divided block by the second prediction mode of the plurality of prediction modes, according to the value estimated from the reference pixel corresponding to the divided block Generating a second predicted pixel;
An image encoding method for comparing the evaluation value according to the value of the first prediction pixel and the evaluation value according to the value of the second prediction pixel to determine the one prediction mode.
前記複数の予測モードは、DC予測、垂直予測、水平予測、平面予測を含む
請求項11に記載の画像符号化方法。
The image encoding method according to claim 11, wherein the plurality of prediction modes include DC prediction, vertical prediction, horizontal prediction, and plane prediction.
前記第1の予測モードは、DC予測、垂直予測、水平予測の予測モードのうちの少なくとも1つの予測モードであり、
前記第2の予測モードは、平面予測の予測モードである
請求項12に記載の画像符号化方法。
The first prediction mode is at least one prediction mode of DC prediction, vertical prediction, and horizontal prediction modes;
The image encoding method according to claim 12, wherein the second prediction mode is a prediction mode of plane prediction.
前記複数の予測モードのうちの第2の予測モードにより、前記分割ブロックに対応する前記参照画素から第2の予測画素を生成する場合、
前記分割ブロックに対応する参照画素を利用して前記第2の予測画素を推定するための推定変数値を生成し、
前記第2の予測モードにより、前記推定変数値から第2の予測画素を推定する
請求項13に記載の画像符号化方法。
When generating a second prediction pixel from the reference pixel corresponding to the divided block by a second prediction mode of the plurality of prediction modes,
Generating an estimated variable value for estimating the second predicted pixel using a reference pixel corresponding to the divided block;
The image coding method according to claim 13, wherein a second prediction pixel is estimated from the estimated variable value in the second prediction mode.
前記第1の予測モードは、平面予測、垂直予測、水平予測の予測モードのうちの少なくとも1つの予測モードであり、
前記第2の予測モードは、DC予測の予測モードである
請求項12に記載の画像符号化方法。
The first prediction mode is at least one prediction mode of a prediction mode of plane prediction, vertical prediction, and horizontal prediction,
The image coding method according to claim 12, wherein the second prediction mode is a prediction mode of DC prediction.
JP2009123187A 2009-05-21 2009-05-21 Image encoding apparatus and image encoding method Pending JP2010273110A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009123187A JP2010273110A (en) 2009-05-21 2009-05-21 Image encoding apparatus and image encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009123187A JP2010273110A (en) 2009-05-21 2009-05-21 Image encoding apparatus and image encoding method

Publications (2)

Publication Number Publication Date
JP2010273110A true JP2010273110A (en) 2010-12-02
JP2010273110A5 JP2010273110A5 (en) 2012-04-05

Family

ID=43420791

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009123187A Pending JP2010273110A (en) 2009-05-21 2009-05-21 Image encoding apparatus and image encoding method

Country Status (1)

Country Link
JP (1) JP2010273110A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101853215B1 (en) * 2016-12-30 2018-04-27 동의대학교 산학협력단 Coding Device and Method and Depth Information Compensation by Plane Modeling
KR101865821B1 (en) * 2016-12-30 2018-06-08 동의대학교 산학협력단 Noise Removing Method and Device for Depth Image, Coding Method and Device through Noise Remove
WO2019059107A1 (en) * 2017-09-20 2019-03-28 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Encoding device, decoding device, encoding method and decoding method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008070614A2 (en) * 2006-12-04 2008-06-12 Qualcomm Incorporated Systems, methods and apparatus for providing sequences of media segments and corresponding interactive data on a channel in a media distribution system
JP2008172581A (en) * 2007-01-12 2008-07-24 Matsushita Electric Ind Co Ltd Image encoder and image encoding program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008070614A2 (en) * 2006-12-04 2008-06-12 Qualcomm Incorporated Systems, methods and apparatus for providing sequences of media segments and corresponding interactive data on a channel in a media distribution system
JP2008172581A (en) * 2007-01-12 2008-07-24 Matsushita Electric Ind Co Ltd Image encoder and image encoding program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101853215B1 (en) * 2016-12-30 2018-04-27 동의대학교 산학협력단 Coding Device and Method and Depth Information Compensation by Plane Modeling
KR101865821B1 (en) * 2016-12-30 2018-06-08 동의대학교 산학협력단 Noise Removing Method and Device for Depth Image, Coding Method and Device through Noise Remove
WO2019059107A1 (en) * 2017-09-20 2019-03-28 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Encoding device, decoding device, encoding method and decoding method
US11368709B2 (en) 2017-09-20 2022-06-21 Panasonic Intellectual Property Corporation Of America Encoder, decoder, encoding method, and decoding method
US11671617B2 (en) 2017-09-20 2023-06-06 Panasonic Intellectual Property Corporation Of America Encoder, decoder, encoding method, and decoding method

Similar Documents

Publication Publication Date Title
JP7335315B2 (en) Image prediction method and related device
AU2015213341B2 (en) Video decoder, video encoder, video decoding method, and video encoding method
US8385628B2 (en) Image encoding and decoding method, apparatuses therefor, programs therefor, and storage media for storing the programs
JP5234587B2 (en) Video encoding method and decoding method, apparatus thereof, program thereof, and storage medium storing program
JP5277257B2 (en) Video decoding method and video encoding method
WO2012161444A2 (en) Method and apparatus for intra prediction within display screen
JP5833757B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, image decoding program, and recording medium
KR101449435B1 (en) Method and apparatus for encoding image, and method and apparatus for decoding image based on regularization of motion vector
JP6149707B2 (en) Moving picture coding apparatus, moving picture coding method, moving picture coding program, and moving picture photographing apparatus
JP4786612B2 (en) Predicted motion vector generation apparatus for moving picture encoding apparatus
KR20150135457A (en) Method for encoding a plurality of input images and storage medium and device for storing program
JP5926451B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, and image decoding program
JP2010273110A (en) Image encoding apparatus and image encoding method
JP5552078B2 (en) Encoder
JP6159292B2 (en) Motion vector detection apparatus, motion vector detection method, and motion vector detection program
JP5108828B2 (en) Image encoding device
KR20150137081A (en) Method for encoding a plurality of input images and storage medium and device for storing program
JPWO2013125171A1 (en) Intra prediction mode determination device, intra prediction mode determination method, and intra prediction mode determination program
WO2023044916A1 (en) Intra prediction method, encoder, decoder, and encoding and decoding system
WO2023044918A1 (en) Intra prediction method, coder, decoder, and coding/decoding system
WO2023044917A1 (en) Intra prediction method, coder, decoder, and coding and decoding system
JP2011182167A (en) Image encoding device
JP2016054512A (en) Moving image decoding device, moving image decoding method, and moving image decoding program
JP6496166B2 (en) Predictive coding determination device, coding device, and program
JP2016213657A (en) Encoded block size determination device, encoding device, and program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120220

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120919

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120925

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121105

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20121204