JP2010273110A - Image encoding apparatus and image encoding method - Google Patents
Image encoding apparatus and image encoding method Download PDFInfo
- 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
Links
Images
Abstract
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
ブロック化部2は、入力画像データを輝度信号、色差信号について所定のブロック単位(色差信号:8画素×8画素、輝度信号16画素×16画素)にブロック化する。
The
イントラ予測部12は、予測モード判定部11により決定された予測モードで、隣接画素記憶部10に蓄積した隣接画素から予測データを生成する。
The
差分計算部3は、イントラ予測部12で生成した予測画素データと、入力画像データの画素の差分を計算する。DCT部4は、差分計算部3からの差分データに対してDCT変換処理を行う。量子化部5は、DCT変換部4のDCT変換後のデータを量子化する。
The
符号化部6は、量子化部5の出力データを符号化する。逆量子化部7は、量子化部5の出力データに対して逆量子化を行う。逆DCT部8は、逆量子化部7で逆量子化されたデータに対して、逆DCT変換処理を行う。再構成部9は、逆DCT部8からの出力データとイントラ予測部12からの予測データから画像データを再構成する。隣接画素記憶部10は、再構成部9からの出力データから各ブロックの境界にある隣接画素データを記憶する。
The
予測モード判定部11は、隣接画素記憶部10に記憶されている隣接画素データから予測される予測画素を生成する。そして、予測モード毎に、予測した画素値と入力画素値の差分を計算し、差分値が最も小さい予測モードを最適予測モードとして決定する。そして、再びイントラ予測部12が、この決定された最適な予測モードによる予測画素を生成し、差分計算部3が予測画素と入力画素の差分を計算する。
The prediction
この予測モード判定部11の一例として、非特許文献1のような技術がある。図19に非特許文献1の概略構成ブロック図を示す。なお、ここでは予測モードの種類として、DC予測、垂直予測、水平予測、平面予測が採用されているものとする。
As an example of the prediction
図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
ここで、図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
図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
分割ブロック垂直予測計算部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
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
分割ブロック水平予測計算部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
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
分割ブロック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
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
分割ブロック平面予測計算部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
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
差分計算部31〜34は、図18のブロック化部2から分割ブロック内部の画像データ(以下、入力画素と称す)を入力し、隣接画素記憶部10が記憶している画素(以下、参照画素と称す)から分割ブロック垂直予測計算部21、分割ブロック水平予測計算部22、分割ブロックDC予測計算部23、分割ブロック平面予測計算部24が生成したそれぞれの予測画素値との差分をとり、予測誤差値を算出する。
The
評価値計算部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
比較部50は、絶対値和計算部71〜74がそれぞれ出力した評価値を比較し、その評価値の最小の値となった予測モードを最適な予測モードと判定する。
The
なお、予測モード判定部11の他の技術として、特許文献1のようなものもある。
In addition, there exists a thing like
図19の予測モード判定部11は、各予測モードにおいて、分割ブロックの予測値を算出する際、必要なマクロブロックの隣接参照画素を全て読み込まないと、各予測モードの評価値の計算の開始ができない。よって、全体の処理時間が長くなる欠点を有している。
When the prediction
本発明の一態様は、動画像データを入力し、複数の予測モードのうち少なくとも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
以下、本発明を適用した具体的な実施の形態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
図1に本実施の形態1にかかる画像符号化装置の予測モード判定部100の構成を示す。図1示すように、予測モード判定部100は、分割ブロック垂直予測計算部111と、分割ブロック水平予測計算部112と、分割ブロックDC予測計算部113と、分割ブロック平面予測計算部114と、差分計算部121〜124と、評価値計算部161〜164と、比較部150とを有する。
FIG. 1 shows a configuration of a prediction
また、分割ブロック平面予測計算部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
ここで、図2〜図5を用いて、本実施の形態1における分割ブロック垂直予測計算部111、分割ブロック水平予測計算部112、分割ブロックDC予測計算部113、分割ブロック平面予測計算部114のそれぞれが利用するマクロブロックの隣接画素の説明を行う。なお、マクロブロック自体は、図20で示したものと同様である。
Here, using FIG. 2 to FIG. 5, the divided block vertical
図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
分割ブロック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
分割ブロック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
分割ブロック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
以下に、予測モード判定部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
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
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
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
分割ブロック平面予測計算部114の変数推定部171は、各分割ブロックに対応する垂直方向と水平方向の隣接画素値から平面予測のための変数を算出する。
The variable estimation unit 171 of the divided block plane
分割ブロック平面予測計算部114の推定予測値計算部172は、前記変数推定部171が算出した変数を利用して、各分割ブロックに対応する垂直方向と水平方向の隣接画素値平面予測モードにより予測される予測画素値を算出する。
The estimated predicted
上記分割ブロック平面予測計算部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
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
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
つまり、この図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
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
評価値計算部161〜164は、それぞれ上記差分計算部121〜124が算出した予測誤差値に応じた評価値を算出する。なお、評価値計算部161〜164は、それぞれ2次元アダマール変換値生成部131〜134と、絶対値和計算部141〜144とを有する。
The evaluation
2次元アダマール変換値生成部131〜134は、それぞれ上記差分計算部121〜124が算出した予測誤差値をアダマール変換処理する。そして、それぞれ絶対値和計算部141〜144により、その処理結果の絶対値和を算出し、上記評価値として出力する。
The two-dimensional Hadamard
比較部150は、絶対値和計算部141〜144がそれぞれ出力した評価値を比較し、その評価値の最小の値となった予測モードを最適な予測モードと判定する。
The
ここで、図19の従来の予測モード判定部11では、各予測モードにおいて、分割ブロックの予測値を算出する際、必要なマクロブロックの隣接参照画素を全て読み込まないと、各予測モードの評価値の計算の開始ができなかった。しかし、本実施の形態1の予測モード判定部100では、マクロブロックの隣接参照画素を全て読み込む必要がなく、各分割ブロックに対応する隣接参照画素のみを読み込めばよい。このため、この隣接参照画素値の読み取りデータを保持するレジスタ等の記憶装置のハードウェア規模を小さく抑えることができる。
Here, in the prediction
また、分割ブロックに対応する隣接参照画素のみを読み出した時点で、判定処理が開始できるため、全体の処理時間を短縮することができる。更に、各分割ブロックで参照する隣接参照画素が、それぞれの予測モードで同じにできるため、予測モード判定部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
発明の実施の形態2
以下、本発明を適用した具体的な実施の形態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
図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
なお、図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
ここで、図11を用いて、本実施の形態2における分割ブロック垂直予測計算部111、分割ブロック水平予測計算部112、分割ブロックDC予測計算部213、分割ブロック平面予測計算部214のそれぞれが利用するマクロブロックの隣接画素の説明を行う。なお、マクロブロック自体は、図10で示したものと同様である。
Here, referring to FIG. 11, each of divided block vertical
図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
以下に、予測モード判定部200の構成及び動作を説明する。分割ブロック垂直予測計算部111は、実施の形態1と同様の動作を行う。このため、分割ブロックblock(k)に対応する隣接参照画素A〜Dから垂直予測モードにより予測される予測画素値P_VERT(k)を算出する。
The configuration and operation of the prediction
分割ブロック水平予測計算部112も、実施の形態1と同様の動作を行う。このため、分割ブロックblock(k)に対応する隣接参照画素E〜Hから水平予測モードにより予測される予測画素値P_HORI(k)を算出する。
The divided block horizontal
分割ブロック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
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
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
以上、実施の形態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
なお、本発明は上記実施の形態に限られたものでなく、趣旨を逸脱しない範囲で適宜変更することが可能である。例えば、実施の形態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
Claims (15)
前記マクロブロックを複数に分割したそれぞれの分割ブロックにおいて、前記複数の予測モードのうちの少なくとも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
請求項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.
前記第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の予測画素を推定する推定予測値計算部と、を有する
請求項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.
請求項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.
請求項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.
前記第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.
請求項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.
請求項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.
請求項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の予測画素を生成し、
前記複数の予測モードのうちの第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.
請求項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.
前記第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の予測画素を推定する
請求項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.
前記第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.
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)
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)
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 |
-
2009
- 2009-05-21 JP JP2009123187A patent/JP2010273110A/en active Pending
Patent Citations (2)
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)
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 |