JP5108828B2 - Image encoding device - Google Patents
Image encoding device Download PDFInfo
- Publication number
- JP5108828B2 JP5108828B2 JP2009109621A JP2009109621A JP5108828B2 JP 5108828 B2 JP5108828 B2 JP 5108828B2 JP 2009109621 A JP2009109621 A JP 2009109621A JP 2009109621 A JP2009109621 A JP 2009109621A JP 5108828 B2 JP5108828 B2 JP 5108828B2
- Authority
- JP
- Japan
- Prior art keywords
- prediction
- pixel
- value
- unit
- hadamard transform
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
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 coding system H.264 In H.264, intra prediction coding using correlation between blocks is employed.
図26に画像符号化装置1のブロック構成図を示す。図26に示すように、画像符号化装置1は、ブロック化部2と、差分計算部3と、DCT部4と、量子化部5と、符号化部6と、逆量子化部7と、逆DCT部8と、再構成部9と、隣接画素記憶部10と、予測モード判定部11と、イントラ予測部12とを有する。
FIG. 26 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 difference calculation unit 3 calculates the difference between the predicted pixel data generated by the
符号化部6は、量子化部5の出力データを符号化する。逆量子化部7は、量子化部5の出力データに対して逆量子化を行う。逆DCT部8は、逆量子化部7で逆量子化されたデータに対して、逆DCT変換処理を行う。再構成部9は、逆DCT部8からの出力データとイントラ予測部12からの予測データから画像データを再構成する。隣接画素記憶部10は、再構成部9からの出力データから各ブロックの境界にある隣接画素データを記憶する。
The encoding unit 6 encodes the output data of the
予測モード判定部11は、隣接画素記憶部10に記憶されている隣接画素データから予測される予測画素を生成する。そして、予測モード毎に、予測した画素値と入力画素値の差分を計算し、差分値が最も小さい予測モードを最適予測モードとして決定する。そして、再びイントラ予測部12が、この決定された最適な予測モードによる予測画素を生成し、差分計算部3が予測画素と入力画素の差分を計算する。
The prediction
この予測モード判定部11の一例として、非特許文献1のような技術がある。図27に非特許文献1の概略構成ブロック図を示す。なお、ここでは、予測モードの種類として、DC予測、垂直予測、水平予測、平面予測が採用されているものとする。
As an example of the prediction
図27に示すように、非特許文献1の予測モード判定部11は、DC予測画素生成部21、垂直予測画素生成部22、水平予測画素生成部23、平面予測画素生成部24と、差分計算部31〜34と、2次元アマダール変換値生成部41〜44と、絶対値和計算部51〜54と、比較部60とを有する。
As illustrated in FIG. 27, the prediction
DC予測画素生成部21、垂直予測画素生成部22、水平予測画素生成部23、平面予測画素生成部24は、それぞれブロックに隣接する隣接参照画素に応じて、各予測モードの予測画素を生成する。
The DC prediction
差分計算部31〜34は、図26の隣接画素記憶部10が記憶している画素(以下、入力画素と称す)を入力し、DC予測画素生成部21、垂直予測画素生成部22、水平予測画素生成部23、平面予測画素生成部24が生成したそれぞれの予測画素との差分を計算する。
The
2次元アマダール変換値生成部41〜44は、それぞれ差分計算部31〜34が出力する差分値を2次元アマダール変換処理する。そして、絶対値和計算部51〜54は、それぞれ2次元アマダール変換値生成部41〜44により処理された変換値の絶対値和を算出する。比較部60は、絶対値和計算部51〜54がそれぞれ算出した値を比較し、最小の予測値となった予測モードを最適な予測モードと判定する。
The two-dimensional amadar conversion
なお、予測モード判定部11の他の技術として、特許文献1のようなものもある。
In addition, there exists a thing like
図27の予測モード判定部11は、それぞれの予測モードの予測誤差を計算し、その計算値に対して2次元アマダール変換を行っている。2次元アマダール変換の計算を実行する演算回路は、行列計算を行うため回路規模が非常に大きくなる。よって、図27の予測モード判定部11を備えた画像符号化装置はハードウェア規模が大きくなり、チップコストが増大化する要因となる。
The prediction
本発明の一態様は、動画像データを入力し、複数の予測モードのうち少なくとも1つの予測モードを用いて、マクロブロック単位の動画像データを前記マクロブロックの周辺にある参照画素から予測し、その予測した動画像データを用いて、前記入力した動画像データを符号化する画像符号化装置であって、前記複数の予測モードのうちの第1の予測モードにより、前記参照画素から第1の予測画素を生成する第1の予測画素生成部と、入力画素の画素値と、前記第1の予測画素の画素値の差分を求めることにより第1の予測誤差を生成する差分計算部と、前記第1の予測誤差値を直交変換し、第1の予測誤差変換値を生成する直交変換値生成部と、前記複数の予測モードのうち少なくとも1つの第2の予測モードにより、前記参照画素から第2の予測画素を直交変換した画素値と、前記第1の予測画素を直交変換した画素値とに対する補正値を計算する補正値計算部と、前記補正値と、前記第1の予測誤差変換値に応じて、前記第2の予測モードに対する第2の予測誤差変換値を生成する変換値生成部と、前記第1及び第2の予測誤差変換値に応じた値を比較して、前記1つの予測モードを判定する判定部と、を有する画像符号化装置である。 According to an 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 in units of macroblocks from reference pixels around the macroblock, An image encoding device that encodes the input moving image data using the predicted moving image data, wherein a first prediction mode out of the plurality of prediction modes causes a first prediction from the reference pixel. A first prediction pixel generation unit that generates a prediction pixel; a pixel value of an input pixel; and a difference calculation unit that generates a first prediction error by obtaining a difference between the pixel value of the first prediction pixel; From the reference pixel, an orthogonal transformation value generation unit that orthogonally transforms the first prediction error value to generate a first prediction error conversion value and at least one second prediction mode of the plurality of prediction modes. A correction value calculation unit that calculates a correction value for a pixel value obtained by orthogonally transforming two prediction pixels and a pixel value obtained by orthogonal transformation of the first prediction pixel; the correction value; and the first prediction error conversion value In response, the conversion value generation unit that generates the second prediction error conversion value for the second prediction mode is compared with the values corresponding to the first and second prediction error conversion values, And a determination unit that determines a prediction mode.
本発明の別の態様は、動画像データを入力し、複数の予測モードのうち少なくとも1つの予測モードを用いて、マクロブロック単位の動画像データを前記マクロブロックの周辺にある参照画素から予測し、その予測した動画像データを用いて、前記入力した動画像データを符号化する画像符号化方法であって、前記複数の予測モードのうちの第1の予測モードにより、前記参照画素から第1の予測画素を生成し、入力画素の画素値と、前記第1の予測画素の画素値の差分を求めることにより第1の予測誤差を生成し、前記第1の予測誤差値を直交変換し、第1の予測誤差変換値を生成し、前記複数の予測モードのうち少なくとも1つの第2の予測モードにより、前記参照画素から第2の予測画素を直交変換した画素値と、前記第1の予測画素を直交変換した画素値とに対する補正値を計算し、前記補正値と、前記第1の予測誤差変換値に応じて、前記第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 in units of macroblocks from reference pixels around the macroblock. An image encoding method for encoding the input moving image data using the predicted moving image data, wherein the first prediction mode is a first prediction mode out of the plurality of prediction modes. A first prediction error is generated by calculating a difference between a pixel value of the input pixel and a pixel value of the first prediction pixel, and orthogonally transforming the first prediction error value, A first prediction error conversion value is generated, and a pixel value obtained by orthogonally transforming the second prediction pixel from the reference pixel in at least one second prediction mode among the plurality of prediction modes, and the first prediction Pixel A correction value for the orthogonally transformed pixel value is calculated, and a second prediction error conversion value for the second prediction mode is generated according to the correction value and the first prediction error conversion value. In this image encoding method, the one prediction mode is determined by comparing values corresponding to the first and second prediction error conversion values.
本発明にかかる画像符号化装置は、複数の予測モードのうち少なくとも1つの予測モードを判定する場合、第1の予測画素生成部が生成した第1の予測画素と入力画素から算出した第1の予測誤差値を直交変換する直交変換値生成部を少なくとも1つだけ備えればよい。このため、回路規模が大きい直交変換値生成部を複数の予測モード分全て備える必要がない。 The image coding apparatus according to the present invention, when determining at least one prediction mode among a plurality of prediction modes, the first prediction pixel calculated from the first prediction pixel generated by the first prediction pixel generation unit and the input pixel. It is only necessary to provide at least one orthogonal transformation value generation unit that orthogonally transforms the prediction error value. For this reason, it is not necessary to provide the orthogonal transformation value production | generation part with a large circuit scale for several prediction modes.
本発明にかかる画像符号化装置は、ハードウェア規模の増大化を防ぐことができる。 The image coding apparatus according to the present invention can prevent an increase in hardware scale.
発明の実施の形態1
以下、本発明を適用した具体的な実施の形態1について、図面を参照しながら詳細に説明する。この実施の形態1は、本発明を画像符号化装置の予測モード判定部に適用したものである。なお、実施の形態1にかかる画像符号化装置の全体構成は、図26に示した画像符号化装置1のものと同様である。また、本実施の形態1では、予測モード判定部が判定する最適なイントラ予測モードを、DC予測、垂直予測、水平予測、平面予測の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 apparatus according to the first embodiment is the same as that of the
図1に本実施の形態1にかかる画像符号化装置の予測モード判定部100の構成を示す。図1示すように、予測モード判定部100は、DC予測画素生成部111と、垂直予測補正値計算部112と、水平予測補正値計算部113と、平面予測補正値計算部114と、差分計算部120と、2次元アダマール変換値生成部130と、補正値加算部141〜143と、絶対値和計算部151〜154と、比較部160とを有する。なお、以下の説明は、予測モード判定部100が色差成分についてのイントラ予測を行う場合を前提に行う。
FIG. 1 shows a configuration of a prediction
DC予測画素生成部111は、イントラ予測のため、後述するマクロブロック内の4画素×4画素を基本単位とした分割ブロックに対応する隣接参照画素からDC予測モードで予測された予測画素データ(以下、予測画素値と称す)を生成する。
The DC prediction
差分計算部120は、上記分割ブロックのDC予測モードで予測された予測画素値と、入力画素の画素値との差分(以下、予測誤差と称す)を計算する。
The
2次元アダマール変換値生成部130は、差分計算部120が算出したDC予測誤差を2次元アダマール変換(直交変換)処理し、その変換値(以下、DC予測誤差変換値もしくは必要に応じてDC予測誤差変換係数と称す)を出力する。
The two-dimensional Hadamard transform
垂直予測補正値計算部112は、隣接参照画素の画素値とDC予測モードで予測された予測画素値から、垂直予測とDC予測の予測誤差のアダマール変換に対する補正値(以下、垂直予測補正値と称す)を所定の計算式を用いて等価的に計算する。
The vertical prediction correction
水平予測補正値計算部113は、隣接参照画素の画素値とDC予測モードで予測された予測画素値から、水平予測とDC予測の予測誤差のアダマール変換に対する補正値(以下、水平予測補正値と称す)を所定の計算式を用いて等価的に計算する。
The horizontal prediction correction
平面予測補正値計算部114は、隣接参照画素の画素値とDC予測モードで予測された予測画素値から、平面予測とDC予測の予測誤差のアダマール変換に対する補正値(以下、平面予測補正値と称す)を所定の計算式を用いて等価的に計算する。なお、垂直予測補正値計算部112、水平予測補正値計算部113、平面予測補正値計算部114の動作の詳細は後述する。
The plane prediction correction
補正値加算部141〜143(補正値生成部)は、それぞれDC予測誤差変換係数に対して、垂直予測補正値、水平予測補正値、平面予測補正値を加算し、各予測モードの変換係数を算出する。
The correction
絶対値和計算部151〜154は、それぞれ2次元アダマール変換値生成部130からのDC予測誤差変換係数及び補正値加算部141〜143が算出した変換係数の絶対値和を計算し、各予測モードに対する評価値として出力する。
The absolute value
比較部160は、絶対値和計算部151〜154が出力したそれぞれの予測モードの評価値から最も小さな値のものを最適な予測モードとして判定する。
The
次に、上記予測モード判定部100の動作及び動作理論を、数式や図面を用いて説明する。まず、図2を用いて一般的なイントラ予測の各予測モードで用いられるマクロブロックを説明する。図2に示すように、マクロブロックは、4画素×4画素からなる分割ブロックblock0〜block3を有する。このようなマクロブロックの周辺には、網掛けで示す隣接参照画素が隣接する。この隣接参照画素として、マクロブロックの水平方向に隣接画素p0〜p7、垂直方向に隣接画素q0〜q7がある。また、マクロブロックの左上、つまり隣接画素p0、q0に接する場所に隣接画素pqがある。なお、各画素に示した値pq、p0〜p7、q0〜q7が各画素名を示すとともに、その画素の画素値を示すものとする。また、マクロブロックのマトリクス状に並んだ各画素をM(x,y)(x=0〜7、y=0〜7)とする。
Next, the operation and operation theory of the prediction
DC予測画素生成部111は、上記隣接参照画素から各分割ブロックの予測画素値の算出を行う。ここで、図3にDC予測モードのイントラ予測の概念図を示す。DC予測画素生成部111は、図3の概念図に示すように、DC予測として、各分割ブロックに対応する隣接参照画素値の平均値により、各分割ブロックの予測画素値の算出を行う。分割ブロックblock0〜block3に対応するDC予測値DC(k)(k=0〜3)の予測画素値P(x,y)は、以下のようになる。
The DC prediction
分割ブロックの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)
となる。図4に上記のように各分割ブロックをDC予測して得られる予測値の予測画素行列P_DC(k)を示す。
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. FIG. 4 shows a prediction pixel matrix P_DC (k) of prediction values obtained by DC prediction of each divided block as described above.
差分計算部120は、DC予測画素生成部111が算出した予測画素行列P_DC(k)と、入力画素の画素値の差分を算出する。なお、以下では、特に断らない限り、予測画素行列P_DC(k)を「予測画素P_DC」と称す。
The
ここで、本実施の形態1の予測モード判定部100は、上述したように入力画素値と、DC予測、垂直予測、水平予測、平面予測により得られる予測画素値との差分が最も少ない予測モードを最適なモードとして判定する。また、予測モード判定部100は、この判定に際し、2次元アダマール変換を利用している。アダマール変換行列をH、予測差分をDとすると、アダマール変換後の予測差分行列TDは、
TD=H×D×H
となる。
Here, as described above, the prediction
TD = H × D × H
It becomes.
なお、アダマール変換行列Hは、図5に示すような係数を有する行列である。ここで図6に、図4の予測画素P_DCを2次元アダマール変換した後の周波数軸行列T_DC(k)を示す。図6に示すように、2次元アダマール変換後の行列T_DC(k)は、実質的に1つの係数16DC(k)となる。なお、以下では、予測画素行列P_DC(k)の2次元アダマール変換後の行列T_DC(k)(k=0〜3)を「予測画素アダマール変換T_DC」と称す。 The Hadamard transform matrix H is a matrix having coefficients as shown in FIG. Here, FIG. 6 shows the frequency axis matrix T_DC (k) after the two-dimensional Hadamard transform of the prediction pixel P_DC of FIG. As shown in FIG. 6, the matrix T_DC (k) after the two-dimensional Hadamard transform is substantially one coefficient 16DC (k). Hereinafter, the matrix T_DC (k) (k = 0 to 3) after the two-dimensional Hadamard transform of the predicted pixel matrix P_DC (k) is referred to as “predicted pixel Hadamard transform T_DC”.
ここで、差分計算部120で予測画素P_DCとの差分をとる入力画素値の行列を「O」とする(以下、単に入力画素Oと称す)。そして、この入力画素Oのアダマール変換結果をT_Origとすると、DC予測の予測誤差のアダマール変換TD_DCは、以下のような式(1)で表せる。
TD_DC
=H×(O−P_DC)×H=H×O×H−H×P_DC×H
=T_Orig−T_DC・・・(1)
Here, a matrix of input pixel values for which the
TD_DC
= H * (OP-DC) * H = H * O * H-H * P_DC * H
= T_Orig-T_DC (1)
次に、垂直予測補正値計算部112、水平予測補正値計算部113、平面予測補正値計算部114の動作理論を説明するため、垂直予測、水平予測、平面予測の各予測モードのイントラ予測を説明する。
Next, in order to explain the operation theory of the vertical prediction correction
まず、図7に垂直予測モードのイントラ予測の概念図を示す。図7の概念図に示すように、垂直予測モードでは、水平方向の隣接画素値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)
となる。
First, FIG. 7 shows a conceptual diagram of intra prediction in the vertical prediction mode. As shown in the conceptual diagram of FIG. 7, in the vertical prediction mode, the predicted pixel value of each pixel is determined based on 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〜block3を代表して、分割ブロックblock0に注目して説明する。図8に分割ブロックblock0を垂直予測して得られる予測値の予測画素行列P_VERT(0)を示す。なお、分割ブロックblock2も分割ブロックblock0と同様の値となるため、予測画素行列P_VERT(2)もP_VERT(0)と同様の値となる。また、分割ブロックblock1、block3の予測画素行列P_VERT(1)、P_VERT(3)は、予測画素行列P_VERT(0)のp0〜p3が、それぞれp4〜p7の値に置きかえられたものとなる。
Here, the divided
ここで、図8の予測画素行列を2次元アダマール変換する。図9に図8の予測画素行列を2次元アダマール変換した後の周波数軸行列T_VERT(0)を示す。但し、
A1=(p0+p1+p2+p3)×4
A2=(p0+p1−p2−p3)×4
A3=(p0−p1−p2+p3)×4
A4=(p0−p1+p2−p3)×4
とする。
Here, the prediction pixel matrix of FIG. 8 is two-dimensional Hadamard transformed. FIG. 9 shows a frequency axis matrix T_VERT (0) after the two-dimensional Hadamard transform of the prediction pixel matrix of FIG. However,
A1 = (p0 + p1 + p2 + p3) × 4
A2 = (p0 + p1-p2-p3) × 4
A3 = (p0−p1−p2 + p3) × 4
A4 = (p0−p1 + p2−p3) × 4
And
図9に示すように、2次元アダマール変換後の行列T_VERT(0)は、低域の4つの係数以外が「0」となる。なお、分割ブロックblock2も同様の値となる。また、block1、block3の2次元アダマール変換後の行列T_VERT(1)、T_VERT(3)は、
A1=(p4+p5+p6+p7)×4
A2=(p4+p5−p6−p7)×4
A3=(p4−p5−p6+p7)×4
A4=(p4−p5+p6−p7)×4
となる以外は、P_VERT(0)と同様である。
As shown in FIG. 9, the matrix T_VERT (0) after the two-dimensional Hadamard transform is “0” except for the four low-frequency coefficients. The divided block block2 has the same value. In addition, matrices T_VERT (1) and T_VERT (3) after the two-dimensional Hadamard transform of block1 and block3 are
A1 = (p4 + p5 + p6 + p7) × 4
A2 = (p4 + p5-p6-p7) × 4
A3 = (p4-p5-p6 + p7) × 4
A4 = (p4-p5 + p6-p7) × 4
Other than that, it is the same as P_VERT (0).
なお、以下では、特に断らない限り、予測画素行列P_VERT(k)(k=0〜3)を「垂直予測画素P_VERT」、そして、その予測画素行列P_VERT(k)の2次元アダマール変換後の行列T_VERT(k)(k=0〜3)を「予測画素アダマール変換T_VERT」と称す。 In the following, unless otherwise specified, the prediction pixel matrix P_VERT (k) (k = 0 to 3) is “vertical prediction pixel P_VERT”, and the matrix after the two-dimensional Hadamard transform of the prediction pixel matrix P_VERT (k) T_VERT (k) (k = 0 to 3) is referred to as “predicted pixel Hadamard transform T_VERT”.
ここで、垂直予測の予測誤差のアダマール変換TD_VERTは、以下のような式(2)で表せる。
TD_VERT
=H×(O−P_VERT)×H=H×O×H−H×P_VERT×H
=T_Orig−T_VERT・・・(2)
Here, the Hadamard transform TD_VERT of the prediction error of the vertical prediction can be expressed by the following equation (2).
TD_VERT
= H * (OP-VERT) * H = H * O * H-H * P_VERT * H
= T_Orig-T_VERT (2)
ここで、垂直予測の予測誤差のアダマール変換TD_VERTとDC予測の予測誤差のアダマール変換TD_DCとの差分を求める。この差分は、式(1)と式(2)により、以下に示す式(3)で表せる。
TD_VERT−TD_DC
=(T_Orig−T_VERT)−(T_Orig−T_DC)
=T_DC−T_VERT・・・(3)
Here, the difference between the Hadamard transform TD_VERT of the prediction error of the vertical prediction and the Hadamard transform TD_DC of the prediction error of the DC prediction is obtained. This difference can be expressed by the following formula (3) by formula (1) and formula (2).
TD_VERT-TD_DC
= (T_Orig-T_VERT)-(T_Orig-T_DC)
= T_DC-T_VERT (3)
この式(3)に基づき、垂直予測の予測誤差のアダマール変換TD_VERTを求めると、以下の式(4)が求まる。
TD_VERT
=TD_DC+T_DC−T_VERT
=TD_DC+ΔTD_VERT・・・(4)
ここで、式(4)のΔTD_VERTを垂直予測補正値とする。
When the Hadamard transform TD_VERT of the prediction error of the vertical prediction is obtained based on this equation (3), the following equation (4) is obtained.
TD_VERT
= TD_DC + T_DC-T_VERT
= TD_DC + ΔTD_VERT (4)
Here, ΔTD_VERT in Expression (4) is set as the vertical prediction correction value.
垂直予測補正値計算部112は、隣接参照画素から生成した垂直予測画素P_VERTと、DC予測画素生成部111が生成したDC予測画素P_DCから予測画素アダマール変換T_VERTとT_DCを算出する。そして、予測画素アダマール変換T_VERTとT_DCから、上式(4)にある垂直予測補正値ΔTD_VERTを算出する。
The vertical prediction correction
ここで、上述したように、予測画素アダマール変換T_DCは低域の1つの係数以外が「0」、予測画素アダマール変換T_VERTは、低域の4つの係数以外が「0」である。よって、垂直予測補正値ΔTD_VERTの算出は、行列式が有する16係数のうち低域の4係数以外は「0」であるため、その4係数だけ注目して行えばよい。よって、演算量は、16係数全て行う場合に比べ、約1/4に削減することができる。例えば、分割ブロックblock0の垂直予測補正値ΔTD_VERT(0)は、図10に示すような行列の差の計算により導かれる。 Here, as described above, the prediction pixel Hadamard transform T_DC except one coefficient of the low frequency is "0", the prediction pixel Hadamard transform T_VERT is other than four coefficients of low frequency "0". Therefore, the calculation of the vertical prediction correction value ΔTD_VERT is “0” except for the four low-frequency coefficients among the 16 coefficients included in the determinant, and it is sufficient to pay attention to only those four coefficients. Therefore, the amount of calculation can be reduced to about ¼ compared with the case where all 16 coefficients are performed. For example, the vertical prediction correction value ΔTD_VERT (0) of the divided block block0 is derived by calculating the matrix difference as shown in FIG.
次に、図11に水平予測モードのイントラ予測の概念図を示す。図11の概念図に示すように、水平予測モードでは、垂直方向の隣接画素値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)
となる。
Next, FIG. 11 shows a conceptual diagram of intra prediction in the horizontal prediction mode. As shown in the conceptual diagram of FIG. 11, 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.
ここで、分割ブロックblock0〜block3を代表して、分割ブロックblock0に注目して説明する。図12に分割ブロックblock0を垂直予測して得られる予測値の予測画素行列P_HORI(0)を示す。なお、分割ブロックblock1も分割ブロックblock0と同様の値となるため、予測画素行列P_HORI(1)もP_HORI(0)と同様の値となる。また、分割ブロックblock2、block3の予測画素行列P_HORI(2)、P_VERT(3)は、予測画素行列P_HORI(0)のq0〜q3が、それぞれq4〜q7の値に置きかえられたものとなる。
Here, the divided
ここで、図12の予測画素行列を2次元アダマール変換する。図13に図12の予測画素行列を2次元アダマール変換した後の周波数軸行列T_HORI(0)を示す。但し、B1=(q0+q1+q2+q3)×4
B2=(q0+q1−q2−q3)×4
B3=(q0−q1−q2+q3)×4
B4=(q0−q1+q2−q3)×4
とする。図13に示すように、2次元アダマール変換後の行列T_HORI(0)は、低域の4つの係数以外が「0」となる。なお、ブロックblock1も同様の値となる。
Here, the prediction pixel matrix of FIG. 12 is two-dimensional Hadamard transformed. FIG. 13 shows a frequency axis matrix T_HORI (0) after the two-dimensional Hadamard transform of the prediction pixel matrix of FIG. However, B1 = (q0 + q1 + q2 + q3) × 4
B2 = (q0 + q1-q2-q3) × 4
B3 = (q0−q1−q2 + q3) × 4
B4 = (q0−q1 + q2−q3) × 4
And As shown in FIG. 13, the matrix T_HORI (0) after the two-dimensional Hadamard transform is “0” except for the four low-frequency coefficients. The block block1 has the same value.
また、block2、block3の2次元アダマール変換後の行列T_HORI(2)、T_HORI(3)は、
B1=(q4+q5+q6+q7)×4
B2=(q4+q5−q6−q7)×4
B3=(q4−q5−q6+q7)×4
B4=(q4−q5+q6−q7)×4
となる以外は、P_HORI(0)と同様である。なお、以下では、特に断らない限り、水平予測の予測画素行列P_HORI(k)(k=0〜3)を「水平予測画素P_HORI」、そして、その予測画素行列P_HORI(k)の2次元アダマール変換後の行列T_HORI(k)(k=0〜3)を「予測画素アダマール変換T_HORI」と称す。
In addition, the matrices T_HORI (2) and T_HORI (3) after the two-dimensional Hadamard transform of block2 and block3 are
B1 = (q4 + q5 + q6 + q7) × 4
B2 = (q4 + q5-q6-q7) × 4
B3 = (q4-q5-q6 + q7) × 4
B4 = (q4-q5 + q6-q7) × 4
Is the same as P_HORI (0) except that In the following, unless otherwise specified, the prediction pixel matrix P_HORI (k) (k = 0 to 3) of horizontal prediction is “horizontal prediction pixel P_HORI”, and the two-dimensional Hadamard transform of the prediction pixel matrix P_HORI (k) The subsequent matrix T_HORI (k) (k = 0 to 3) is referred to as “predicted pixel Hadamard transform T_HORI”.
ここで、水平予測の予測誤差のアダマール変換TD_HORIは、以下のような式(5)で表せる。
TD_HORI
=H×(O−P_HORI)×H=H×O×H−H×P_HORI×H
=T_Orig−T_HORI・・・(5)
Here, the Hadamard transform TD_HORI of the prediction error of horizontal prediction can be expressed by the following equation (5).
TD_HORI
= H * (OP-HORI) * H = H * O * H-H * P_HORI * H
= T_Orig-T_HORI (5)
ここで、水平予測の予測誤差のアダマール変換TD_HORIとDC予測の予測誤差のアダマール変換TD_DCとの差分を求める。この差分は、式(1)と式(5)により、以下に示す式(6)で表せる。
TD_HORI−TD_DC
=(T_Orig−T_HORI)−(T_Orig−T_DC)
=T_DC−T_HORI・・・(6)
Here, the difference between the Hadamard transform TD_HORI of the prediction error of horizontal prediction and the Hadamard transform TD_DC of the prediction error of DC prediction is obtained. This difference can be expressed by the following equation (6) using equations (1) and (5).
TD_HORI-TD_DC
= (T_Orig-T_HORI)-(T_Orig-T_DC)
= T_DC-T_HORI (6)
この式(6)に基づき、水平予測の予測誤差のアダマール変換TD_HORIを求めると、以下の式(7)が求まる。
TD_HORI
=TD_DC+T_DC−T_HORI
=TD_DC+ΔTD_HORI・・・(7)
ここで、式(7)のΔTD_HORIを水平予測補正値とする。
When the Hadamard transform TD_HORI of the prediction error of horizontal prediction is obtained based on this equation (6), the following equation (7) is obtained.
TD_HORI
= TD_DC + T_DC-T_HORI
= TD_DC + ΔTD_HORI (7)
Here, ΔTD_HORI in Expression (7) is set as the horizontal prediction correction value.
水平予測補正値計算部113は、隣接参照画素から生成した水平予測画素P_HORIと、DC予測画素生成部111が生成したDC予測画素P_DCから予測画素アダマール変換T_HORIとT_DCを算出する。そして、予測画素アダマール変換T_HORIとT_DCから、上式(7)にある水平予測補正値ΔTD_HORIを算出する。
The horizontal prediction correction
ここで、上述したように、予測画素アダマール変換T_DCは低域の1つの係数以外が「0」、予測画素アダマール変換T_HORIは、低域の4つの係数以外が「0」である。よって、水平予測補正値ΔTD_HORIの算出は、行列式が有する16係数のうち低域の4係数以外は「0」であるため、その4係数だけ注目して行えばよい。よって、演算量は、16係数全て行う場合に比べ、1/4に削減することができる。例えば、分割ブロックblock0の水平予測補正値ΔTD_HORI(0)は、図14に示すような行列の差の計算により導かれる。 Here, as described above, the predicted pixel Hadamard transform T_DC is “0” except for one coefficient in the low band, and the predicted pixel Hadamard transform T_HORI is “0” except for the four coefficients in the low band. Therefore, the calculation of the horizontal prediction correction value ΔTD_HORI is “0” except for the four coefficients in the low band among the 16 coefficients included in the determinant, and it is only necessary to pay attention to only those four coefficients. Therefore, the amount of calculation can be reduced to ¼ compared to the case where all 16 coefficients are performed. For example, the horizontal prediction correction value ΔTD_HORI (0) of the divided block block0 is derived by calculating the matrix difference as shown in FIG.
次に、図15に平面予測モードのイントラ予測の概念図を示す。平面予測モードでは、各画素の予測値予測値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)
である。ここで、図16(a)、図16(b)に分割ブロックblock0、block1を平面予測して得られる予測値の予測画素行列P_PLAN(0)、P_PLAN(1)を示す。また、図17(a)、図17(b)に分割ブロックblock2、block3を平面予測して得られる予測値の予測画素行列P_PLAN(2)、P_PLAN(3)を示す。
Next, FIG. 15 shows a conceptual diagram of intra prediction in the planar prediction mode. In the planar prediction mode, the predicted value 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) × 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. Here, FIGS. 16A and 16B show prediction pixel matrices P_PLAN (0) and P_PLAN (1) of prediction values obtained by plane prediction of the divided blocks block0 and block1, respectively. FIGS. 17A and 17B show prediction pixel matrices P_PLAN (2) and P_PLAN (3) of predicted values obtained by plane prediction of the divided blocks block2 and block3.
ここで、図16(a)、図16(b)、図17(a)、図17(b)の予測画素行列を2次元アダマール変換する。図18(a)、図18(b)に図16(a)、図16(b)の予測画素行列を2次元アダマール変換した後の周波数軸行列T_PLAN(0)、T_PLAN(1)を示す。図19(a)、図19(b)に図17(a)、図17(b)の予測画素行列を2次元アダマール変換した後の周波数軸行列T_PLAN(2)、T_PLAN(3)を示す。 Here, the prediction pixel matrix of FIG. 16A, FIG. 16B, FIG. 17A, and FIG. FIGS. 18A and 18B show frequency axis matrices T_PLAN (0) and T_PLAN (1) after the two-dimensional Hadamard transform of the prediction pixel matrix of FIGS. 16A and 16B. FIGS. 19A and 19B show frequency axis matrices T_PLAN (2) and T_PLAN (3) after the two-dimensional Hadamard transform of the prediction pixel matrix of FIGS. 17A and 17B.
図18(a)、図18(b)、図19(a)、図19(b)に示すように、2次元アダマール変換後の行列T_PLAN(k)(k=0〜3)は、低域の5つの係数以外が「0」となる。なお、以下では、特に断らない限り、平面予測の予測画素行列P_PLAN(k)(k=0〜3)を「平面予測画素P_PLAN」、そして、その予測画素行列P_PLAN(k)の2次元アダマール変換後の行列T_PLAN(k)(k=0〜3)を「予測画素アダマール変換T_PLAN」と称す。 As shown in FIG. 18A, FIG. 18B, FIG. 19A, and FIG. 19B, the matrix T_PLAN (k) (k = 0 to 3) after the two-dimensional Hadamard transform has a low frequency range. Other than these five coefficients are “0”. In the following description, unless otherwise specified, the prediction pixel matrix P_PLAN (k) (k = 0 to 3) for plane prediction is referred to as “plane prediction pixel P_PLAN”, and the two-dimensional Hadamard transform of the prediction pixel matrix P_PLAN (k). The subsequent matrix T_PLAN (k) (k = 0 to 3) is referred to as “predicted pixel Hadamard transform T_PLAN”.
ここで、平面予測の予測誤差のアダマール変換TD_PLANは、以下のような式(8)で表せる。
TD_PLAN
=H×(O−P_PLAN)×H=H×O×H−H×P_PLAN×H
=T_Orig−T_PLAN・・・(8)
Here, Hadamard transform TD_PLAN of prediction error of plane prediction can be expressed by the following equation (8).
TD_PLAN
= H * (OP-PLAN) * H = H * O * H-H * P_PLAN * H
= T_Orig-T_PLAN (8)
ここで、平面予測の予測誤差のアダマール変換TD_PLANとDC予測の予測誤差のアダマール変換TD_DCとの差分を求める。この差分は、式(1)と式(8)により、以下に示す式(9)で表せる。
TD_PLAN−TD_DC
=(T_Orig−T_PLAN)−(T_Orig−T_DC)
=T_DC−T_PLAN・・・(9)
Here, the difference between the Hadamard transform TD_PLAN of the prediction error of plane prediction and the Hadamard transform TD_DC of the prediction error of DC prediction is obtained. This difference can be expressed by the following formula (9) by formula (1) and formula (8).
TD_PLAN-TD_DC
= (T_Orig-T_PLAN)-(T_Orig-T_DC)
= T_DC-T_PLAN (9)
この式(9)に基づき、平面予測の予測誤差のアダマール変換TD_PLANを求めると、以下の式(10)が求まる。
TD_PLAN
=TD_DC+T_DC−T_PLAN
=TD_DC+ΔTD_PLAN・・・(10)
ここで、式(10)のΔTD_PLANを平面予測補正値とする。
When the Hadamard transform TD_PLAN of the prediction error of plane prediction is obtained based on this equation (9), the following equation (10) is obtained.
TD_PLAN
= TD_DC + T_DC-T_PLAN
= TD_DC + ΔTD_PLAN (10)
Here, ΔTD_PLAN in Expression (10) is set as a plane prediction correction value.
平面予測補正値計算部114は、隣接参照画素から生成した平面予測画素P_PLANと、DC予測画素生成部111が生成したDC予測画素P_DCから予測画素アダマール変換T_PLANとT_DCを算出する。そして、予測画素アダマール変換T_PLANとT_DCから、上式(10)にある平面予測補正値ΔTD_PLANを算出する。
The plane prediction correction
ここで、上述したように、予測画素アダマール変換T_DCは低域の1つの係数以外が「0」、予測画素アダマール変換T_PLANは、低域の5つの係数以外が「0」である。よって、平面予測補正値ΔTD_PLANの算出は、行列式が有する16係数のうち低域の5係数以外は「0」であるため、その5係数だけ注目して行えばよい。よって、演算量は、16係数全て行う場合に比べ、5/16に削減することができる。例えば、分割ブロックblock0の平面予測補正値ΔTD_PLAN(0)は、図20に示すような行列の差の計算により導かれる。 Here, as described above, the predicted pixel Hadamard transform T_DC is “0” except for one coefficient in the low band, and the predicted pixel Hadamard transform T_PLAN is “0” except for the five coefficients in the low band. Therefore, the calculation of the plane prediction correction value ΔTD_PLAN is “0” except for the five low-frequency coefficients among the 16 coefficients included in the determinant, and it is sufficient to pay attention to only those five coefficients. Therefore, the amount of calculation can be reduced to 5/16 compared with the case where all 16 coefficients are performed. For example, the plane prediction correction value ΔTD_PLAN (0) of the divided block block0 is derived by calculating the matrix difference as shown in FIG.
補正値加算部141は、垂直予測補正値計算部112から出力された垂直予測補正値ΔTD_VERTと、2次元アダマール変換値生成部130から出力されたDC予測の予測誤差のアダマール変換TD_DCとの和を計算する。この計算は、式(4)に相当するため、結果として補正値加算部141から、垂直予測の予測誤差のアダマール変換TD_VERTが出力される。
The correction
補正値加算部142は、水平予測補正値計算部113から出力された水平予測補正値ΔTD_HORIと、2次元アダマール変換値生成部130から出力されたDC予測の予測誤差のアダマール変換TD_DCとの和を計算する。この計算は、式(7)に相当するため、結果として補正値加算部142から、水平予測の予測誤差のアダマール変換TD_HORIが出力される。
The correction
補正値加算部143は、平面予測補正値計算部114から出力された平面予測補正値ΔTD_PLANと、2次元アダマール変換値生成部130から出力されたDC予測の予測誤差のアダマール変換TD_DCとの和を計算する。この計算は、式(10)に相当するため、結果として補正値加算部143から、平面予測の予測誤差のアダマール変換TD_PLANが出力される。
The correction
絶対値和計算部151〜154は、それぞれ上述した予測誤差のアダマール変換TD_DC、TD_VERT、TD_HORI、TD_PLANの絶対値和を算出する。そして、比較部160が、絶対値和計算部151〜154が出力した各予測モードの絶対値和を比較し、最小の値の予測モードが最適な予測モードであると判定する。
Absolute value
ここで、図27の従来の画像符号化装置の予測モード判定部11は、それぞれの予測モードの予測誤差を算出し、その算出した値に対して2次元アマダール変換値生成部41〜44が2次元アマダール変換を行っていた。この場合、それぞれの予測モードの予測誤差値の16係数全てに対して、2次元アマダール変換の計算を実行しなければならない。このため、演算量が非常に多くなってしまっていた。また、この2次元アマダール変換の計算を実行する2次元アマダール変換値生成部41〜44のそれぞれの演算回路は、行列計算を行うため回路規模が大きくなり、予測モード判定部11のハードウェア規模が非常に大きくなってしまう問題点があった。
Here, the prediction
しかし、本実施の形態1の画像符号化装置の予測モード判定部100は、DC予測モードの予測誤差のみを算出し、その算出した値に対して2次元アマダール変換値生成部130が2次元アマダール変換を行うだけでよい。よって、垂直予測、水平予測、平面予測の予測モードに対する予測誤差の2次元アマダール変換を行う必要がなく、その分演算回路の削減が可能となる。なお、垂直予測補正値計算部112、水平予測補正値計算部113、平面予測補正値計算部114において、垂直予測補正値ΔTD_VERT、水平予測補正値ΔTD_HORI、平面予測補正値ΔTD_PLANを算出するときに、2次元アマダール変換を行うが、上述したように算出する係数が少なくてよいため、演算量が少なく、また、演算回路の規模も小さくてすむ。このため、予測モード判定部100のハードウェア規模を従来より削減することができる。
However, the prediction
なお、以上の説明は、規格H.264の色差成分の予測モード判定について述べたが、輝度成分についても上述したのと同様の方式が適用可能である。H.264の規格上、輝度成分では、図21に示すように16画素×16画素や、4画素×4画素のマクロブロックがある。このような16画素×16画素や4画素×4画素のマクロブロックについても本実施の形態1の方式が適用可能である。また、図22に示すように1ブロックを8画素×8画素に拡張した場合でも本実施の形態1の方式が適用可能である。 The above description is based on the standard H.264 standard. Although the prediction mode determination of the H.264 color difference component has been described, the same method as described above can be applied to the luminance component. H. According to the H.264 standard, luminance components include macroblocks of 16 pixels × 16 pixels and 4 pixels × 4 pixels as shown in FIG. The system of the first embodiment can also be applied to macroblocks of 16 pixels × 16 pixels or 4 pixels × 4 pixels. Also, as shown in FIG. 22, the method of the first embodiment can be applied even when one block is expanded to 8 pixels × 8 pixels.
発明の実施の形態2
以下、本発明を適用した具体的な実施の形態2について、図面を参照しながら詳細に説明する。この実施の形態2は、実施の形態1と同様、本発明を画像符号化装置の予測モード判定部に適用したものである。なお、実施の形態1と同様、実施の形態2にかかる画像符号化装置の全体構成も、図26に示した画像符号化装置1のものと同様である。なお、本実施の形態2では、予測モード判定部が判定する最適なイントラ予測モードを、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
図23に本実施の形態2にかかる画像符号化装置の予測モード判定部200の構成を示す。図23示すように、予測モード判定部200は、DC予測画素生成部111と、垂直予測補正値計算部112と、水平予測補正値計算部113と、平面予測補正値計算部114と、差分計算部120と、2次元アダマール変換値生成部130と、補正値加算部141〜143と、絶対値和計算部151〜154と、比較部160と、その他の予測画素生成部210と、セレクタ220と、記憶部230とを有する。
FIG. 23 illustrates a configuration of the prediction
なお、図23に示された符号のうち、図1と同じ符号を付した構成は、図1と同じか又は類似の構成を示している。本実施の形態2と実施の形態1と異なる点は、予測モード判定部200が、DC予測、垂直予測、水平予測、平面予測の4種類以外のその他の予測モードを含めた予測モードから最適な予測モードを判定する構成となっている。このため、本実施の形態2では、その実施の形態1との相違点を重点的に説明し、実施の形態1と同様の部分は説明を省略する。
In addition, the structure which attached | subjected the code | symbol same as FIG. 1 among the code | symbols shown in FIG. 23 has shown the structure same as or similar to FIG. The difference between the second embodiment and the first embodiment is that the prediction
その他の予測画素生成部210は、DC予測、垂直予測、水平予測、平面予測以外のその他の予測モードによる予測のため、参照画素から予測画素データ(以下、予測画素値と称す)を生成する。なお、その他の予測モードとして、インター予測や、輝度成分のイントラ予測におけるモード3〜8のようなものがある。
The other prediction
セレクタ220は、DC予測画素生成部111からの出力と、その他の予測画素生成部210からの出力のいずれかを選択して、差分計算部120へ出力する。
The
記憶部230は、絶対値和計算部151が出力するその他の予測モードによる予測誤差のアダマール変換の絶対値和の値、もしくは、DC予測誤差のアダマール変換の絶対値和の値を記憶し、その記憶した値を比較部160へ出力する。
The
なお、セレクタ220は、その入力となっている複数の予測モードの比較評価を行うために全ての入力を時分割で選択する。また、記憶部230も、セレクタ220が選択した入力に応じて、絶対値和計算部151の出力した値を記憶する。
Note that the
例えば、まず、その他の予測画素生成部210からの出力をセレクタ220が選択した場合、絶対値和計算部151が算出するその他の予測モードによる予測誤差のアダマール変換の絶対値和を記憶部230が一旦記憶する。そして、その後、DC予測画素生成部111からの出力をセレクタ220が選択した場合、絶対値和計算部151が算出するDC予測誤差のアダマール変換の絶対値和の値を記憶部230は記憶せず、絶対値和計算部151からの算出結果は比較部160に直接入力され比較される。
For example, first, if the output from the other predicting
またその逆、つまり、まずセレクタ220がDC予測画素生成部111からの出力をセレクタ220が選択した場合、絶対値和計算部151が算出するDC予測誤差のアダマール変換の絶対値和の値を一旦記憶部230が記憶する。その後、その他の予測画素生成部210からの出力をセレクタ220が選択した場合、絶対値和計算部151が算出するその他の予測モードによる予測誤差のアダマール変換の絶対値和を記憶部230が記憶せず、絶対値和計算部151からの算出結果は比較部160に直接入力され比較されるようにしてもよい。
And vice versa, i.e., first case where the
なお、比較部160が、その他の予測モードによる予測誤差のアダマール変換の絶対値和、もしくは、DC予測誤差のアダマール変換の絶対値和を一時的に記憶する機能を有している場合、記憶部230は削除してもかまわない。
When the
このような構成の予測モード判定部200の動作を説明する。なお、記憶部230は、その他の予測モードによる予測誤差のアダマール変換の絶対値和を記憶する場合を想定する。
The operation of the prediction
まず、その他の予測画素生成部210が隣接参照画素から予測画素値を生成する。セレクタ220は、その他の予測画素生成部210が出力するデータを差分計算部120へ出力する。差分計算部120は、入力画素の画素値と、その他の予測画素生成部210が出力する予測画素値との差分を算出し、予測誤差データとして出力する。2次元アダマール変換値生成部130は、その予測誤差を2次元アダマール変換処理し、絶対値和計算部151へ出力する。絶対値和計算部151は、2次元アダマール変換値生成部130からの出力の絶対値和を算出する。記憶部230は、絶対値和計算部151が算出した値を記憶する。
First, the other prediction pixel production |
以後は、実施の形態1で説明した動作が行われ、絶対値和計算部151〜154からそれぞれDC予測、垂直予測、水平予測、平面予測の予測モードによる予測誤差のアダマール変換の絶対値和が算出される。比較部160は、これらDC予測、垂直予測、水平予測、平面予測の予測モードによる予測誤差のアダマール変換の絶対値和と、記憶部230が記憶しているその他の予測モードによる予測誤差のアダマール変換の絶対値和とを比較する。そして、この5種類の予測モードの予測誤差のアダマール変換の絶対値和のうち最も値の小さい予測モードが最適な予測モードであると判定する。
Thereafter, performed the operation described in the first embodiment, each DC prediction from the absolute value
ここで、特許文献1に開示されている技術において、DC予測、垂直予測、水平予測、平面予測の4種類以外のその他の予測モードを追加した場合の予測モード判定部300の構成を図24に示す。図24に示す予測モード判定部300は、2次元アダマール変換値生成部310と、DC予測アダマール変換値生成部311と、垂直予測アダマール変換値生成部312と、水平予測アダマール変換値生成部313と、平面予測アダマール変換値生成部314と、その他の予測アダマール変換値生成部315と、その他の予測画素生成部320と、差分計算部331〜335と、絶対値和計算部341〜345と、比較部350とを有する。
Here, in the technique disclosed in
予測モード判定部300の動作を簡単に説明する。まず、2次元アダマール変換値生成部310は、入力画素の2次元アダマール変換を計算し、その変換値を生成する。DC予測アダマール変換値生成部311、垂直予測アダマール変換値生成部312、水平予測アダマール変換値生成部313、平面予測アダマール変換値生成部314は、それぞれ隣接参照画素から予測値の2次元アダマール変換を計算し、その変換値を生成する。
The operation of the prediction
その他の予測画素生成部320は、上記DC予測、垂直予測、水平予測、平面予測以外の予測モードによる予測画素を生成する。その他の予測アダマール変換値生成部315は、その他の予測画素生成部320が生成した予測画素の2次元アダマール変換を計算し、その変換値を生成する。
The other prediction
差分計算部331〜335は、上述した各予測モードのアダマール変換値生成部311〜315が生成したアダマール変換値と、入力画素のアダマール変換値との差分を算出し、各予測モードの予測誤差を出力する。絶対値和計算部341〜345は、これら各予測モードの予測誤差の絶対値和を算出する。比較部350は、絶対値和計算部341〜345が算出した各予測モードの予測誤差の絶対値和の値を比較する。そして、比較部350が、この5種類の予測モードの予測誤差のアダマール変換の絶対値和のうち、最も値の小さい予測モードが最適な予測モードであると判定する。
The
以上が、予測モード判定部300の動作である。ここで、追加されたその他の予測モードのアダマール変換がDC予測、垂直予測、水平予測、平面予測のように係数が容易に簡略化できない場合、上述のようにその他の予測画素生成部320が生成した予測画素をアダマール変換するための、その他の予測アダマール変換値生成部315が必要となってしまう。
The above is the operation of the prediction
しかし、本実施の形態2の予測モード判定部200では、その他の予測画素生成部210が生成した予測画素と、入力画素との差分を2次元アダマール変換値生成部130が行うため、予測モード判定部300における、その他の予測アダマール変換値生成部315に該当する構成要素が削減できる。
However, in the prediction
更に、特許文献1に開示されている技術において、DC予測、垂直予測、水平予測、平面予測のそれぞれのモードの予測誤差の算出で利用する入力画素と、その他の予測モードの予測誤差の算出で利用する入力画素とのアダマール変換処理が、異なるタイミングで行われる場合、図25に示す予測モード判定部400のような構成が必要となる。予測モード判定部400では、予測モード判定部300のその他の予測画素生成部320と、差分計算部335と、絶対値和計算部345が無くなる代わりに、セレクタ411、412と、記憶部421、422が追加される。
Furthermore, in the technique disclosed in
この場合の動作は、以下のようになる。まず、その他の予測画素生成部320が生成した予測画素の出力をセレクタ410が選択して、2次元アダマール変換値生成部310に出力する。そして、2次元アダマール変換値生成部310が、その予測画素の2次元アダマール変換を計算する。記憶部420は、その計算結果であるアダマール変換値を記憶する。次に、2次元アダマール変換値生成部310は、セレクタ411が選択した入力画素の2次元アダマール変換を計算する。差分計算部335は、記憶部420が記憶したその他の予測モードの予測画素のアダマール変換値と、入力画素の2次元アダマール変換値との差分を算出し、その予測誤差を出力する。セレクタ412は、差分計算部335からの出力を選択し、絶対値和計算部341に出力する。記憶部422は、絶対値和計算部341が算出した、その他の予測モードの予測誤差の絶対値和の値を記憶する。
The operation in this case is as follows. First, the selector 410 selects the output of the prediction pixel generated by the other prediction
以後は、予測モード判定部300で説明したような動作により、DC予測、垂直予測、水平予測、平面予測の予測誤差の絶対値和が、それぞれ絶対値和計算部341〜344から出力される。比較部350は、この絶対値和計算部341〜344から出力される値と、記憶部422が記憶する値とを比較する。そして、比較部350が、この5種類の予測モードの予測誤差のアダマール変換の絶対値和のうち最も値の小さい予測モードが最適な予測モードであると判定する。
Thereafter, the absolute value sums of the prediction errors of DC prediction, vertical prediction, horizontal prediction, and plane prediction are output from the absolute value
このような予測モード判定部400では、予測モード判定部300に対して、アダマール変換値生成部315が削減されるが、記憶部421が追加されてしまう。この記憶部421は、行列の係数を記憶するため、回路規模が大きくなる。よって、予測モード判定部400も本実施の形態2の予測モード判定部200より回路規模増大してしまう。
In such a prediction
以上、予測モード判定部200は、DC予測、垂直予測、水平予測、平面予測以外のその他の予測モードが追加されたとしても、上述した予測モード判定部300、400に対して回路規模の増大を抑えることが可能である。
As described above, even when other prediction modes other than DC prediction, vertical prediction, horizontal prediction, and plane prediction are added, the prediction
なお、本発明は上記実施の形態に限られたものでなく、趣旨を逸脱しない範囲で適宜変更することが可能である。例えば、実施の形態1、2では、DC予測の予測画素を生成し、それを基準にして垂直予測、水平予測、平面予測の補正値を算出し、その補正値とDC予測の予測誤差の値の和を求めていた。 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 and second embodiments, a prediction pixel for DC prediction is generated, correction values for vertical prediction, horizontal prediction, and plane prediction are calculated based on the prediction pixel, and the correction value and a prediction error value for DC prediction are calculated. I was seeking the sum of
ここで、DC予測の代わりに他の予測モードの予測画素を生成し、それを基準にして残りの予測モードの補正値を算出し、その補正値と上記他の予測モードの予測誤差の直交変換結果との和を求めてもよい。例えば、垂直予測の予測画素を生成し、それを基準にしてDC予測、水平予測、平面予測の補正値を算出し、その補正値と垂直予測の直交変換結果との和を求めてもよい。つまり、基準となる予測モードは任意とすることができる。また、その基準となる予測モードの数も任意である。例えば、DC予測と垂直予測の2つを基準となる予測モードとする等である。但し、この場合、基準とならなかった残りの予測モードの補正値は、基準となる予測モードの予測画素から算出される。 Here, instead of DC prediction, a prediction pixel of another prediction mode is generated, a correction value of the remaining prediction mode is calculated based on the prediction pixel, and orthogonal correction of the correction value and the prediction error of the other prediction mode is performed. You may ask for the sum with a result. For example, a prediction pixel for vertical prediction may be generated, a correction value for DC prediction, horizontal prediction, and plane prediction may be calculated based on the prediction pixel, and a sum of the correction value and an orthogonal transformation result for vertical prediction may be obtained. That is, the reference prediction mode can be set arbitrarily. Further, the number of prediction modes serving as the reference is also arbitrary. For example, two prediction methods, DC prediction and vertical prediction, are used as reference prediction modes. However, in this case, the correction values of the remaining prediction modes that have not become the reference are calculated from the prediction pixels of the reference prediction mode.
また更に、補正値を算出する予測モードの数も任意である。例えば、DC予測の予測画素を生成し、それを基準にして垂直予測、水平予測の2つの予測モードの補正値を算出し、その補正値とDC予測の予測誤差の直交変換結果との和を求めるようにしてもよい。補正値を算出しない平面予測については、DC予測と同様に予測画素を生成して予測誤差を計算し、直交変換を行うようにしてもよい。 Furthermore, the number of prediction modes for calculating correction values is also arbitrary. For example, a prediction pixel of DC prediction is generated, correction values for two prediction modes of vertical prediction and horizontal prediction are calculated based on the prediction pixel, and the sum of the correction value and the orthogonal transformation result of the prediction error of DC prediction is calculated. You may make it ask. For planar prediction in which no correction value is calculated, a prediction pixel may be generated and a prediction error may be calculated and orthogonal transformation may be performed in the same manner as in DC prediction.
100、200 予測モード判定部
111 DC予測画素生成部
112 垂直予測補正値計算部
113 水平予測補正値計算部
114 平面予測補正値計算部
120 差分計算部
130 2次元アダマール変換値生成部
141〜143 補正値加算部
151〜154 絶対値和計算部
160 比較部
210 その他の予測画素生成部
220 セレクタ
230 記憶部
100, 200 Prediction
Claims (1)
前記複数の予測モードのうちの第1の予測モードにより、前記参照画素から第1の予測画素を生成する第1の予測画素生成部と、
入力画素の画素値と、前記第1の予測画素の画素値の差分を求めることにより第1の予測誤差を生成する差分計算部と、
前記第1の予測誤差値を直交変換し、第1の予測誤差変換値を生成する直交変換値生成部と、
前記複数の予測モードのうち少なくとも1つの第2の予測モードにより、前記参照画素から第2の予測画素を直交変換した画素値と、前記第1の予測画素を直交変換した画素値とに対する補正値を計算する補正値計算部と、
前記補正値と、前記第1の予測誤差変換値に応じて、前記第2の予測モードに対する第2の予測誤差変換値を生成する変換値生成部と、
前記第1及び第2の予測誤差変換値に応じた値を比較して、前記1つの予測モードを判定する判定部と、を有する
画像符号化装置。 Moving picture data is input, using at least one prediction mode of a plurality of prediction modes, moving picture data in units of macroblocks is predicted from reference pixels around the macroblock, and the predicted moving picture data is And an image encoding device for encoding the input moving image data,
A first prediction pixel generation unit configured to generate a first prediction pixel from the reference pixel according to a first prediction mode of the plurality of prediction modes;
A difference calculation unit that generates a first prediction error by calculating a difference between a pixel value of an input pixel and a pixel value of the first prediction pixel;
An orthogonal transform value generation unit that orthogonally transforms the first prediction error value to generate a first prediction error transform value;
Correction value for a pixel value obtained by orthogonally transforming the second predicted pixel from the reference pixel and a pixel value obtained by orthogonally transforming the first predicted pixel in at least one second prediction mode of the plurality of prediction modes A correction value calculation unit for calculating
A conversion value generation unit that generates a second prediction error conversion value for the second prediction mode according to the correction value and the first prediction error conversion value;
An image coding apparatus comprising: a determination unit that compares the values according to the first and second prediction error conversion values to determine the one prediction mode.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009109621A JP5108828B2 (en) | 2009-04-28 | 2009-04-28 | Image encoding device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009109621A JP5108828B2 (en) | 2009-04-28 | 2009-04-28 | Image encoding device |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JP2010258984A JP2010258984A (en) | 2010-11-11 |
| JP2010258984A5 JP2010258984A5 (en) | 2012-04-05 |
| JP5108828B2 true JP5108828B2 (en) | 2012-12-26 |
Family
ID=43319352
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2009109621A Expired - Fee Related JP5108828B2 (en) | 2009-04-28 | 2009-04-28 | Image encoding device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5108828B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2022095797A1 (en) * | 2020-11-06 | 2022-05-12 | 深圳Tcl数字技术有限公司 | Image compression method and apparatus, and intelligent terminal and computer-readable storage medium |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8819724B2 (en) * | 2006-12-04 | 2014-08-26 | 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 encoding apparatus and image encoding program |
-
2009
- 2009-04-28 JP JP2009109621A patent/JP5108828B2/en not_active Expired - Fee Related
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2022095797A1 (en) * | 2020-11-06 | 2022-05-12 | 深圳Tcl数字技术有限公司 | Image compression method and apparatus, and intelligent terminal and computer-readable storage medium |
| US12482139B2 (en) | 2020-11-06 | 2025-11-25 | Shenzhen Tcl Digital Technology Ltd. | Image compression method and apparatus, and intelligent terminal and computer-readable storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2010258984A (en) | 2010-11-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6663520B2 (en) | Simplified intra prediction for video coding | |
| CN104067619B (en) | Video decoder, video decoding method, and recording medium of video decoding program | |
| KR101449435B1 (en) | Method and apparatus for encoding image, and method and apparatus for decoding image based on regularization of motion vector | |
| KR20140064972A (en) | Method, device, and program for encoding and decoding image | |
| TW201941608A (en) | Image processing apparatus, filtering method, non-transitory computer-readable recording medium and image device | |
| US10349071B2 (en) | Motion vector searching apparatus, motion vector searching method, and storage medium storing motion vector searching program | |
| JP2019208090A (en) | Video encoding device, video decoding device, and program | |
| US11202082B2 (en) | Image processing apparatus and method | |
| JP2010273110A (en) | Image coding apparatus and image coding method | |
| JP5108828B2 (en) | Image encoding device | |
| CN112313950B (en) | Video image component prediction method, device and computer storage medium | |
| JP6564315B2 (en) | Encoding device, decoding device, and program | |
| CN116614633B (en) | Decoding prediction method, device and computer storage medium | |
| JP6311821B2 (en) | Moving image processing apparatus and moving image processing method | |
| JP4451759B2 (en) | Lossless video encoding device, lossless video encoding method, lossless video decoding device, lossless video decoding method, lossless video encoding program, lossless video decoding program, and recording medium for those programs | |
| JP6317720B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding program | |
| KR101802304B1 (en) | Methods of encoding using hadamard transform and apparatuses using the same | |
| JP6700877B2 (en) | Image decoding device, image decoding program and chip | |
| JP2026501366A (en) | Intra prediction method, video codec method, device and system | |
| JP5194039B2 (en) | Intra prediction apparatus, encoder, decoder, and program | |
| EA043315B1 (en) | DECODING BIT STREAM | |
| JP2008283302A (en) | Moving image processing apparatus and moving image processing method |
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 |
|
| TRDD | Decision of grant or rejection written | ||
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120919 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20120925 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20121005 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20151012 Year of fee payment: 3 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| LAPS | Cancellation because of no payment of annual fees |