JP2015223003A - Image decoding method - Google Patents

Image decoding method Download PDF

Info

Publication number
JP2015223003A
JP2015223003A JP2015179599A JP2015179599A JP2015223003A JP 2015223003 A JP2015223003 A JP 2015223003A JP 2015179599 A JP2015179599 A JP 2015179599A JP 2015179599 A JP2015179599 A JP 2015179599A JP 2015223003 A JP2015223003 A JP 2015223003A
Authority
JP
Japan
Prior art keywords
prediction
ref1
pixel
screen
ref2
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.)
Granted
Application number
JP2015179599A
Other languages
Japanese (ja)
Other versions
JP5887013B2 (en
Inventor
昌史 高橋
Masashi Takahashi
昌史 高橋
村上 智一
Tomokazu Murakami
智一 村上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maxell Holdings Ltd
Original Assignee
Hitachi Maxell Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Maxell Ltd filed Critical Hitachi Maxell Ltd
Priority to JP2015179599A priority Critical patent/JP5887013B2/en
Publication of JP2015223003A publication Critical patent/JP2015223003A/en
Application granted granted Critical
Publication of JP5887013B2 publication Critical patent/JP5887013B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an image encoding/decoding technique with higher compression efficiency.SOLUTION: An image decoding method for performing intra-frame prediction in a block unit to decode an image includes: a first prediction step of generating pixel values of two reference pixels by prediction; and a second prediction step of predicting a pixel value of a decoding target pixel arranged between the two reference pixels using the pixel values of the two reference pixels generated in the first prediction step.

Description

本発明は動画像を符号化する動画像符号化技術に関する。   The present invention relates to a moving picture coding technique for coding a moving picture.

大容量の動画像情報をデジタルデータ化して記録、伝達する手法として、MPEG (Moving Picture Experts Group)方式等の符号化方式が策定され、MPEG-1規格、MPEG-2規格、MPEG-4規格、H.264/AVC(Advanced Video Coding)規格等として国際標準の符号化方式となっている。   Encoding methods such as MPEG (Moving Picture Experts Group) method have been established as a method for recording and transmitting large-capacity moving image information as digital data, and MPEG-1 standard, MPEG-2 standard, MPEG-4 standard, The H.264 / AVC (Advanced Video Coding) standard is an international standard encoding method.

これらの規格では、符号化処理が完了した画像情報を利用して符号化対象画像をブロック単位で予測し、原画像との予測差分を符号化することによって、動画像の持つ冗長性を除いて符号量を減らしている。特にH.264/AVCでは、符号化対象ブロックの周辺画素を利用する画面内予測符号化方式を採用することにより、劇的な圧縮率の向上を実現した。   In these standards, the encoding target image is predicted in block units using the image information that has been encoded, and the prediction difference from the original image is encoded, thereby eliminating the redundancy of the moving image. The code amount is reduced. In particular, in H.264 / AVC, a dramatic improvement in the compression rate was realized by adopting an intra-screen predictive encoding method that uses peripheral pixels of the encoding target block.

しかし、H.264/AVCにおける画面内予測の場合、予測方法が単純であり十分な予測精度を実現することができなかった。例えば、H.264/AVCによる画面内予測では、参照画素を1つだけ指定し、予測方向に沿った画素をすべて1つの参照画素の画素値のみを参照値として予測するという単方向による予測方式を採用しており、予測精度の向上の余地があった。そのため、画面内予測の精度を向上させて圧縮率を高めるための画面内符号化技術が求められるようになった。   However, in the case of intra prediction in H.264 / AVC, the prediction method is simple and sufficient prediction accuracy cannot be realized. For example, in the intra-screen prediction based on H.264 / AVC, only one reference pixel is designated, and all pixels along the prediction direction are predicted using only the pixel value of one reference pixel as a reference value. There was room for improvement in prediction accuracy. Therefore, an intra-screen coding technique for improving the accuracy of intra-screen prediction and increasing the compression rate has been demanded.

画面内予測の精度を向上させる技術として、例えば特許文献1には、画像全体を反転してから符号化することを可能にすることによって、画面内予測に利用可能な画素の種類を増やすことが開示されている。   As a technique for improving the accuracy of intra-screen prediction, for example, in Patent Document 1, it is possible to increase the number of types of pixels that can be used for intra-screen prediction by enabling encoding after the entire image is inverted. It is disclosed.

また、非特許文献1には、符号化順序をブロック単位で変更することによって、上下・左右のブロックを用いた予測を行うことが開示されている。   Non-Patent Document 1 discloses that prediction is performed using upper, lower, left and right blocks by changing the encoding order in units of blocks.

特開2006-352181JP2006-352181

塩寺太一郎, 谷沢昭行, 中條健,“ブロックベース外挿/内挿予測に基づくイントラ符号化”, PCSJ2006, November, 2006.Taichiro Shiojira, Akiyuki Tanizawa, Takeshi Nakajo, “Intra coding based on block-based extrapolation / interpolation prediction”, PCSJ2006, November, 2006.

しかし、特許文献1では、画像を反転した後はH.264/AVCと同様に1つの参照画素の画素値のみを参照値として、単方向による単純な予測を行うため、それ以上に予測精度を向上することができない。   However, in Patent Document 1, after the image is inverted, since simple prediction in one direction is performed using only the pixel value of one reference pixel as a reference value in the same manner as H.264 / AVC, the prediction accuracy is further increased. It cannot be improved.

また、非特許文献1では、上下・左右のブロックを用いた予測が可能になるブロックは一部に限られ、それ以外のブロックではH.264/AVCに比べて予測精度が低下する。   In Non-Patent Document 1, only a part of blocks can be predicted using the upper, lower, left and right blocks, and the prediction accuracy of other blocks is lower than that of H.264 / AVC.

これらの従来技術では、例えば、予測方向に沿って輝度値が大きく変化する場合に、予測値に対しての差分が大きくなり、符号量が増大し、圧縮率が低下するという課題があった。   In these conventional techniques, for example, when the luminance value greatly changes along the prediction direction, there is a problem that the difference from the prediction value increases, the code amount increases, and the compression rate decreases.

本発明は上記課題を鑑みてなされたものであり、本発明の目的は、より圧縮効率のよい画像符号化・復号化技術を提供することにある。   The present invention has been made in view of the above problems, and an object of the present invention is to provide an image encoding / decoding technique with higher compression efficiency.

上記目的を達成するために、本発明の一実施の態様は、例えば、特許請求の範囲に記載されるように構成すればよい。   In order to achieve the above object, an embodiment of the present invention may be configured as described in the claims, for example.

本発明によれば、より圧縮効率のよい画像符号化・復号化技術を提供することにある。   According to the present invention, there is provided an image encoding / decoding technique with better compression efficiency.

本発明の一実施例に係る画像符号化装置の説明図Explanatory drawing of the image coding apparatus which concerns on one Example of this invention. 本発明の一実施例に係る画像復号化装置の説明図Explanatory drawing of the image decoding apparatus concerning one Example of this invention. H.264/AVCで用いる画面内予測符号化処理の説明図Explanatory drawing of the prediction encoding process in a screen used by H.264 / AVC 本発明の一実施例に係る画面内予測符号化処理の説明図Explanatory drawing of the prediction encoding process in a screen based on one Example of this invention. 本発明の一実施例に係る画面内予測符号化処理の説明図Explanatory drawing of the prediction encoding process in a screen based on one Example of this invention. H.264/AVCで用いる画面内予測復号化処理の説明図Explanatory drawing of the prediction decoding process in a screen used by H.264 / AVC 本発明の一実施例に係る画面内予測復号化処理の説明図Explanatory drawing of the prediction decoding process in a screen based on one Example of this invention. 本発明の一実施例に係る画面内予測復号化処理の説明図Explanatory drawing of the prediction decoding process in a screen based on one Example of this invention. H.264/AVCで用いる画面内予測の説明図Illustration of intra-screen prediction used in H.264 / AVC 本発明の一実施例に係る画面内予測の説明図Explanatory drawing of the prediction in a screen concerning one Example of this invention 本発明の一実施例に係る画面内予測の説明図Explanatory drawing of the prediction in a screen concerning one Example of this invention 本発明の一実施例に係る画像符号化装置の流れ図1 is a flowchart of an image encoding apparatus according to an embodiment of the present invention. 本発明の一実施例に係る画像符号化装置の詳細な流れ図1 is a detailed flowchart of an image encoding device according to an embodiment of the present invention. 本発明の一実施例に係る画像復号化装置の流れ図1 is a flowchart of an image decoding apparatus according to an embodiment of the present invention. 本発明の一実施例に係る画像復号化装置の詳細な流れ図1 is a detailed flowchart of an image decoding apparatus according to an embodiment of the present invention. 本発明の一実施例の説明図Explanatory drawing of one Example of this invention 本発明の一実施例に係る画面内予測と異なる予測方法の説明図Explanatory drawing of the prediction method different from the prediction in a screen concerning one Example of this invention. 本発明の一実施例に係る符号化ストリームの構成例Configuration example of encoded stream according to one embodiment of the present invention 本発明の一実施例に係る符号化ストリームの構成例Configuration example of encoded stream according to one embodiment of the present invention

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

また、各図面において、同一の符号が付されている構成要素は同一の機能を有することとする。   Moreover, in each drawing, the component to which the same code | symbol was attached | subjected shall have the same function.

また、本明細書の各記載及び各図面における「画素の和」という表現は、画素の画素値を加算した結果をいう。   In addition, the expression “sum of pixels” in each description and each drawing of the present specification refers to a result of adding pixel values of pixels.

まず、図3を用いて、H.264/AVCによる画面内予測符号化処理の動作を説明する。H.264/AVCでは、符号化対象画像に対してラスタースキャンの順序に従って符号化を実行する(301)。なお、ラスタースキャンの順序とは、一般的に画面の左上端から右端まで処理を行い、その後、一段下の左端から右端へ処理を行い、これを繰り返す順序をいう。   First, the operation of the intra-frame predictive coding process based on H.264 / AVC will be described with reference to FIG. In H.264 / AVC, encoding is performed on the encoding target image in the raster scan order (301). Note that the order of raster scanning generally refers to the order in which processing is performed from the upper left end to the right end of the screen, and then the processing is performed from the lower left end to the right end one step down and repeated.

ここで、符号化対象ブロックの各画素についての予測は、符号化対象ブロックの左、左上、上、右上に隣接する符号化済みのブロックの復号化画像の画素値を用いて予測を行う。   Here, the prediction for each pixel of the encoding target block is performed using the pixel value of the decoded image of the encoded block adjacent to the left, upper left, upper, and upper right of the encoding target block.

特に、符号化済みのブロックのうち、図3に示す13個の画素のうち一の画素の画素値を参照値とし、当該一の画素を始点として予測方向の同一直線上に整列する画素はすべて当該一の画素の画素値を参照値として予測する(302)。   In particular, among the encoded blocks, all the pixels aligned on the same straight line in the prediction direction with the pixel value of one of the 13 pixels shown in FIG. The pixel value of the one pixel is predicted as a reference value (302).

例えば(303)に示すように、符号化対象ブロックの画素B、C、D、Eはすべて同一画素を参照して予測符号化が行われ、画素Bの直上の画素を復号化した値A’との差分(予測差分)b、c、d、eが計算される。さらに、H.264/AVCでは縦、横、斜めなど、8種類の予測方向候補の中から最適なものをブロック単位で選択することができ、予測差分と予測方向の値が符号化される。ただし、H.264/AVCでは、上記特定の方向に沿った予測の他に、参照画素の平均値によって符号化対象ブロックに含まれるすべての画素を予測する「DC予測」を利用することもできる(304)。   For example, as shown in (303), all the pixels B, C, D, and E of the encoding target block are subjected to predictive encoding with reference to the same pixel, and a value A ′ obtained by decoding the pixel immediately above the pixel B (Prediction differences) b, c, d, and e are calculated. Further, in H.264 / AVC, an optimal one of eight types of prediction direction candidates such as vertical, horizontal, and diagonal can be selected in units of blocks, and the prediction difference and the value of the prediction direction are encoded. However, in H.264 / AVC, in addition to the prediction along the specific direction, “DC prediction” that predicts all the pixels included in the encoding target block by the average value of the reference pixels can be used. (304).

次に、図6を用いて、H.264/AVCによる画面内予測復号化処理の動作を説明する。復号化処理も符号化処理と同様にラスタースキャンの順序に従って復号化を実行し(601)、復号化済みの参照画素と予測差分とを用いて、復号化画像の画素値を算出する。すなわち、予測方向に沿って予測差分を参照画素と足し合わせることによって復号化画像を取得する。   Next, the operation of the intra-screen predictive decoding process according to H.264 / AVC will be described with reference to FIG. Similarly to the encoding process, the decoding process is also performed according to the raster scan order (601), and the pixel value of the decoded image is calculated using the decoded reference pixel and the prediction difference. That is, a decoded image is acquired by adding a prediction difference with a reference pixel along the prediction direction.

例えば(602)では、復号化対象ブロックの予測差分b’、c’、d’、e’(それぞれ、上記図3のb、c、d、eが復号化され量子化誤差を含んだもの)に対して、それぞれ復号化済みの参照画素A’との和を計算することにより、復号化画素B’、C’、D’、E’(それぞれ、上記図3のB、C、D、Eに対する復号化画素)を取得する。   For example, in (602), prediction differences b ′, c ′, d ′, and e ′ of the decoding target block (b, c, d, and e in FIG. 3 are decoded and include quantization errors), respectively. For each decoded pixel B ′, C ′, D ′, E ′ (B, C, D, E in FIG. 3 respectively) To obtain a decoded pixel).

以上のように、H.264/AVCによる画面内予測符号化処理では、参照画素を1つだけ指定し、予測方向に沿った画素をすべてその値で予測する単方向による単純な方法を採用している。   As described above, the intra-screen predictive encoding process based on H.264 / AVC employs a simple method based on a single direction in which only one reference pixel is designated and all pixels along the prediction direction are predicted with the value. ing.

H.264/AVCによる画面内予測符号化の概念図を図9に示す。ここでは、水平軸は対象ブロックにおける座標値を予測方向に沿って設定し、垂直軸はその座標における画素値(輝度値)を設定している。そのため、グラフ中の曲線は対象ブロックにおける輝度曲線を表している。すでに説明したように、H.264/AVCでは、画面内予測を行う際に参照できるのは対象ブロックの左側、および上側に位置するブロックに限られる。そのため、H.264/AVCでは、参照画素を1方向にコピーする方法を採用している。この場合、(901)のように、対象ブロックにおける輝度勾配が小さければ予測が当たりやすく予測差分は小さくなるが、(902)のように、輝度勾配が大きいと参照画素から離れるにつれて予測差分が大きくなり、符号量が増大してしまう。   FIG. 9 shows a conceptual diagram of intra-screen predictive coding by H.264 / AVC. Here, the horizontal axis sets the coordinate value in the target block along the prediction direction, and the vertical axis sets the pixel value (luminance value) at that coordinate. Therefore, the curve in the graph represents the luminance curve in the target block. As already described, in H.264 / AVC, when performing intra prediction, only the blocks located on the left side and the upper side of the target block can be referred to. For this reason, H.264 / AVC employs a method of copying reference pixels in one direction. In this case, as shown in (901), if the luminance gradient in the target block is small, the prediction is easy to hit and the prediction difference is small.However, if the luminance gradient is large, the prediction difference increases as the distance from the reference pixel increases. As a result, the code amount increases.

本実施例による画面内予測符号化の概念図を図10に示す。H.264/AVCによる上記の課題に対処するために、本実施例では(1001)のように対象ブロックの境界に位置する画素を新たな参照画素(参照画素2)とし、通常の参照画素(参照画素1)と組み合わせて予測する。すなわち、対象ブロックを通過する直線上に位置する2つの参照画素(参照画素1および参照画素2)を選択し、これらの参照画素が挟み込む画素の値をこれら2つの参照画素を用いた内挿予測による補間処理によって予測する。これにより、特に輝度勾配が大きなブロックに対して予測精度を高め、予測誤差を低減させることができる。   A conceptual diagram of intra prediction encoding according to the present embodiment is shown in FIG. In order to cope with the above-described problem due to H.264 / AVC, in this embodiment, a pixel located at the boundary of the target block is set as a new reference pixel (reference pixel 2) as in (1001), and a normal reference pixel ( Predicted in combination with reference pixel 1). That is, two reference pixels (reference pixel 1 and reference pixel 2) located on a straight line passing through the target block are selected, and the value of the pixel sandwiched between these reference pixels is interpolated using these two reference pixels. Predict by the interpolation process by. As a result, the prediction accuracy can be increased and the prediction error can be reduced particularly for blocks having a large luminance gradient.

しかし、H.264/AVCのようにラスタースキャンの順序に従って符号化を行った場合、多くの場合において対象ブロックの境界に位置する2つの参照画素のうち一方(参照画素1)の値しか得ることができない。本願に係る方式では、上記参照画素のうち他方(参照画素2)の値を、符号化済みの周辺ブロックに含まれる画素値から予測する。   However, when encoding is performed according to the raster scan order as in H.264 / AVC, in most cases, only one (reference pixel 1) value of two reference pixels located at the boundary of the target block is obtained. I can't. In the method according to the present application, the value of the other reference pixel (reference pixel 2) among the reference pixels is predicted from the pixel value included in the encoded peripheral block.

すなわち、本実施例では、参照画素1および参照画素2を符号化済みの画素から選択できる場合は符号化済みの画素から選択する。ここで、参照画素2が符号化済みの画素から選択できない場合は、符号化済みの画素から参照画素2を先に予測することにより、図10に示すような2つの参照画素を用いた内挿予測による補間処理によって予測する。   That is, in this embodiment, when the reference pixel 1 and the reference pixel 2 can be selected from the encoded pixels, the reference pixel 1 and the reference pixel 2 are selected from the encoded pixels. Here, when the reference pixel 2 cannot be selected from the encoded pixels, the reference pixel 2 is predicted from the encoded pixels first, so that interpolation using two reference pixels as shown in FIG. 10 is performed. Prediction is performed by interpolation processing by prediction.

これにより、2つの参照画素のうち一方の画素が符号化済みの画素ではない場合でも、輝度勾配が大きなブロックに対して予測精度を高め、予測誤差を低減させることができる。   As a result, even when one of the two reference pixels is not an encoded pixel, it is possible to increase the prediction accuracy and reduce the prediction error for a block having a large luminance gradient.

図4は本実施例による画面内予測符号化処理の動作例について概念的に示したものである。この場合も符号化対象画像に対してラスタースキャンの順序に従って符号化を行い、対象ブロックの左、左上、上、右上に隣接する符号化済みのブロックを参照して予測を行う。(401)は、垂直方向による画面内予測符号化手順を表している。ここでは、「ステップ1:対象ブロックの境界に位置する画素(例えば(1001)における参照画素2)の予測と予測差分の計算」、および「ステップ2:対象ブロックの両端に位置する参照画素を利用した双方向予測」の2ステップによる処理によって予測を実行する。   FIG. 4 conceptually shows an operation example of the intra prediction encoding process according to the present embodiment. Also in this case, encoding is performed on the encoding target image according to the order of raster scanning, and prediction is performed with reference to the encoded blocks adjacent to the left, upper left, upper, and upper right of the target block. (401) represents an intra-frame prediction encoding procedure in the vertical direction. Here, “Step 1: Prediction of pixels located at the boundary of the target block (for example, reference pixel 2 in (1001)) and calculation of prediction difference” and “Step 2: Reference pixels located at both ends of the target block are used. Prediction is executed by the two-step process of “bidirectional prediction”.

ステップ1では、双方向予測に利用する2つの参照画素を選択する。ここで、参照画素を符号化済みの画素から選択できない場合は、符号化済みの周辺ブロックから予測する。例えば(402)では、対象ブロックの最も下の行に位置する画素の値E、F、G、Hを、対象ブロックの左に隣接するブロックの同じ行に位置する4つの復号化画素A’、B’、C’、D’の平均値Zによって予測している。また同時に、これら4つの画素とZの差分値を予測差分e、f、g、hとして符号化する。   In step 1, two reference pixels used for bidirectional prediction are selected. Here, if the reference pixel cannot be selected from the encoded pixels, the reference pixel is predicted from the encoded peripheral block. For example, in (402), the values E, F, G, and H of the pixels located in the lowermost row of the target block are set to four decoded pixels A ′ located in the same row of the block adjacent to the left of the target block. Prediction is based on the average value Z of B ′, C ′, and D ′. At the same time, the difference values between these four pixels and Z are encoded as prediction differences e, f, g, and h.

続いてステップ2では、対象ブロックに含まれる他の画素値を、ステップ1にて選択または予測した2つの参照画素を用いた内挿予測による補間処理を行うことによって予測する。例えば(403)では、対象ブロック中の同じ列に属する画素J、K、Lを参照画素I’と、ステップ1にて予測したZの値を用いた線形補間によって予測し、予測差分j、k、lを算出する手順について述べており、さらにこれらの予測差分が符号化されることになる。   Subsequently, in step 2, other pixel values included in the target block are predicted by performing interpolation processing by interpolation prediction using the two reference pixels selected or predicted in step 1. For example, in (403), the pixels J, K, and L belonging to the same column in the target block are predicted by linear interpolation using the reference pixel I ′ and the value of Z predicted in step 1, and the prediction difference j, k , L are described, and further, these prediction differences are encoded.

図7は本実施例による画面内予測復号化処理の動作例について概念的に示したものである。復号化には上記図4の手順の逆を行えばよく(701)、まず対象ブロックの左側に隣接するブロックを用いて参照画素Zを計算し(702)、対象ブロックの境界に位置する画素の予測差分e’、f’、g’、h’に加算することによって復号化画像E’、F’、G’、H’を取得する。続いて、対象ブロックの上側に隣接するブロックに含まれる参照画素I’と、上記の処理によって予測した値Zの内挿予測による線形補間によって対象ブロック中の各画素を予測し(703)、予測差分j’、k’、l’に加算することによって復号化画素J’、K’、L’を取得する。   FIG. 7 conceptually shows an operation example of the intra prediction decoding process according to the present embodiment. For decoding, the procedure of FIG. 4 may be reversed (701). First, the reference pixel Z is calculated using the block adjacent to the left side of the target block (702), and the pixel located at the boundary of the target block is calculated. Decoded images E ′, F ′, G ′, and H ′ are obtained by adding to the prediction differences e ′, f ′, g ′, and h ′. Subsequently, each pixel in the target block is predicted by linear interpolation by interpolation prediction of the reference pixel I ′ included in the block adjacent to the upper side of the target block and the value Z predicted by the above processing (703), and prediction The decoded pixels J ′, K ′, and L ′ are obtained by adding to the differences j ′, k ′, and l ′.

図4によって示した画面内予測では、対象画素の左側および上側に隣接するブロックを利用して参照画素の1つを予測するため、画面端に位置するブロックに対して本願に係る方式を適用することができない。そのため、画面端に位置するブロックに対しては、例えば図5の手順に従って画面内予測符号化を行うことによって、本実施例による双方向予測を適用することができる(501)。すなわち、ステップ1(対象ブロックの境界に位置する画素の予測と予測差分の計算)では、対象ブロックの上側に隣接するブロックの両端に位置する2つの画素の復号値A’、D’を用いた外挿予測を行うことによって、対象ブロックにおける同じ列の境界に位置する画素Hを予測するとともに、画素値Hと予測値Zとの差分hを予測差分として符号化する(502)。   In the intra prediction shown in FIG. 4, one of the reference pixels is predicted using blocks adjacent to the left and upper sides of the target pixel, and thus the method according to the present application is applied to the block located at the screen end. I can't. Therefore, the bi-directional prediction according to the present embodiment can be applied to the block located at the end of the screen by performing intra prediction encoding according to the procedure of FIG. 5, for example (501). That is, in Step 1 (prediction of pixels located at the boundary of the target block and calculation of the prediction difference), the decoded values A ′ and D ′ of the two pixels located at both ends of the block adjacent to the upper side of the target block are used. By performing extrapolation prediction, the pixel H located at the boundary of the same column in the target block is predicted, and the difference h between the pixel value H and the predicted value Z is encoded as a prediction difference (502).

続いてステップ2(対象ブロックの両端に位置する参照画素を利用した双方向予測)では、対象ブロック中の同じ列に属する画素E、F、Gを、参照画素D’と上記ステップ1にて予測したZを用いた内挿予測による線形補間を行うことによって予測し、予測差分e、f、gを符号化する(503)。すなわち、画面端に位置するブロックに対する画面内予測処理は、それ以外の場合(図4)と比べてステップ1による手順が異なることになる。   Subsequently, in step 2 (bidirectional prediction using reference pixels located at both ends of the target block), the pixels E, F, and G belonging to the same column in the target block are predicted in step 1 and the reference pixel D ′. Prediction is performed by performing linear interpolation by interpolation prediction using Z, and prediction differences e, f, and g are encoded (503). In other words, the intra-screen prediction process for the block located at the screen edge has a different procedure in step 1 compared to the other cases (FIG. 4).

画面端に位置するブロックに対して上記の手順に従うことにより、対象ブロックの左側に隣接するブロックが利用できない場合でも本実施例による双方向予測を行うことが可能になる。この場合、図8の手順に従うことによって、復号化を行うことができる。すなわち、復号化には上記図5の手順の逆を行えばよく(801)、まず対象ブロックの上側に隣接するブロックを用いて参照画素Zを計算し(802)、対象ブロックの境界に位置する画素の予測差分h’に加算することによって復号化画像Hを取得する。続いて、対象ブロックの上側に隣接するブロックに含まれる参照画素D’と、上記の処理によって予測した値Zを用いた線形補間によって対象ブロック中の各画素を予測し(903)、予測差分e’、f’、g’に加算することによって復号化画素E’、F’、G’を取得する。   By following the above procedure for the block located at the screen edge, bi-directional prediction according to the present embodiment can be performed even when a block adjacent to the left side of the target block cannot be used. In this case, decoding can be performed by following the procedure of FIG. That is, the decoding may be performed by reversing the procedure of FIG. 5 (801). First, the reference pixel Z is calculated using the block adjacent to the upper side of the target block (802), and is located at the boundary of the target block. The decoded image H is obtained by adding to the pixel prediction difference h ′. Subsequently, each pixel in the target block is predicted by linear interpolation using the reference pixel D ′ included in the block adjacent to the upper side of the target block and the value Z predicted by the above processing (903), and the prediction difference e Decoded pixels E ′, F ′, and G ′ are obtained by adding to “, f”, and g ′.

本願に係る方式でも予測方法を複数の候補の中から選択可能であり、例えば図11に示すH.264/AVCで使われている9つの予測方法(1101)のうち、DC予測を除く8種類の予測方向の中から1つを利用することができる。例えば水平方向(予測方向1)に予測する場合(1102)、画面端以外のブロックに対して対象ブロックの最も右の列に属する画素を上側に隣接するブロックを用いて予測し、これを参照画素の1つとして双方向予測を行う。   Even in the method according to the present application, a prediction method can be selected from a plurality of candidates. For example, among the nine prediction methods (1101) used in H.264 / AVC shown in FIG. One of the prediction directions can be used. For example, when predicting in the horizontal direction (prediction direction 1) (1102), the pixel belonging to the rightmost column of the target block is predicted using the adjacent block on the upper side of the block other than the screen edge, and this is used as the reference pixel. One-way prediction is performed.

また、予測方向4のように斜めの方向に沿って予測を行う場合(1103)は、対象ブロックの最も右の列に属する画素と、最も下の行に属する画素をそれぞれ上側と左側に隣接するブロックから予測することによって、双方向予測を実現する。一方、画面端に位置するブロックに対しては、例えば水平方向(予測方向1)に予測する場合(1104)、左側に隣接するブロックを利用して対象ブロックの最も左の列に属する画素値を予測することによって双方向予測を実現する。また、予測方向7の場合(1105)は、上側に隣接するブロックを利用して対象ブロックの最も下の行に属する画素値を予測することによって双方向予測を実現する。この場合、(1104)と(1105)の手順に従うことによって、それぞれ上側、左側に隣接するブロックが利用できなくても本実施例による双方向予測を実現することができる。   When prediction is performed along an oblique direction such as the prediction direction 4 (1103), the pixel belonging to the rightmost column and the pixel belonging to the lowermost row of the target block are adjacent to the upper side and the left side, respectively. Bidirectional prediction is realized by predicting from the block. On the other hand, for the block located at the edge of the screen, for example, when predicting in the horizontal direction (prediction direction 1) (1104), the pixel value belonging to the leftmost column of the target block is determined using the adjacent block on the left side. Bidirectional prediction is realized by prediction. In the case of the prediction direction 7 (1105), bi-directional prediction is realized by predicting a pixel value belonging to the lowermost row of the target block using an adjacent block on the upper side. In this case, by following the procedures of (1104) and (1105), bi-directional prediction according to the present embodiment can be realized even if the blocks adjacent to the upper side and the left side cannot be used.

本実施例による予測符号化技術は従来技術と組み合わせて利用することにより、画像の性質に応じて高い圧縮率を実現することができると考えられる。例えば、本技術と従来技術をブロック単位で使い分けて予測符号化することにより、画像の性質に適した符号化が可能になる。従来技術としては、例えば図3(図6)に示すH.264/AVCによる画面内予測符号化方式(復号化方式)や、H.264/AVCでも利用されている画面間予測方式(符号化対象画像とは異なる画像を参照する予測方式)などを利用すると効果的である。   By using the predictive coding technique according to the present embodiment in combination with the conventional technique, it is considered that a high compression rate can be realized according to the property of the image. For example, predictive encoding using the present technology and the conventional technology separately in units of blocks enables encoding suitable for the properties of the image. As conventional techniques, for example, an intra-screen prediction encoding method (decoding method) based on H.264 / AVC shown in FIG. 3 (FIG. 6), or an inter-screen prediction method (encoding) used also in H.264 / AVC. It is effective to use a prediction method that refers to an image different from the target image.

図1は本実施例による動画像符号化装置の一実施例を示したものである。動画像符号化装置は、入力された原画像(101)を保持する入力画像メモリ(102)と、入力画像を小領域に分割するブロック分割部(103)と、ブロック単位で動きを検出する動き探索部(104)と、同じくブロック単位で例えばH.264/AVCによる画面内予測(図3に記載)など本実施例以外の手順にて画面内予測処理を行う旧画面内予測部(105)と、ブロック単位で本実施例による画面内予測(図4および図5に記載)を行う新画面内予測部(106)と、動き探索部(104)にて検出された動き量を基にブロック単位で画面間予測を行う画面間予測部(107)と、画像の性質に合った予測符号化手段(予測方法およびブロックサイズ)を決定するモード選択部(108)と、予測差分を生成するための減算部(109)と、予測差分に対して符号化を行う周波数変換部(110)および量子化部(111)と、記号の発生確率に応じた符号化を行うための可変長符号化部(112)と、一度符号化した予測差分を復号化するための逆量子化処理部(113)および逆周波数変換部(114)と、復号化された予測差分を用いて復号化画像を生成するための加算部(115)と、復号化画像を保持して後の予測に活用するための参照画像メモリ(116)を有する。   FIG. 1 shows an embodiment of a moving picture encoding apparatus according to this embodiment. The moving image encoding apparatus includes an input image memory (102) that holds an input original image (101), a block dividing unit (103) that divides the input image into small regions, and a motion that detects motion in units of blocks. Similarly to the search unit (104), the intra-screen prediction unit (105) that performs intra-screen prediction processing in a procedure other than the present example, such as intra-screen prediction by H.264 / AVC (described in FIG. 3), in units of blocks. And a new intra-screen prediction unit (106) that performs intra-screen prediction (described in FIGS. 4 and 5) according to the present embodiment in block units, and a block based on the amount of motion detected by the motion search unit (104). In order to generate a prediction difference, an inter-screen prediction unit (107) that performs inter-screen prediction in units, a mode selection unit (108) that determines a predictive encoding means (prediction method and block size) that matches the characteristics of the image, and A subtracting unit (109), a frequency converting unit (110) and a quantizing unit (111) for encoding the prediction difference, A variable length encoding unit (112) for encoding according to the occurrence probability of the symbol, an inverse quantization processing unit (113) and an inverse frequency transform unit for decoding the prediction difference encoded once ( 114), an addition unit (115) for generating a decoded image using the decoded prediction difference, and a reference image memory (116) for holding the decoded image and utilizing it for later prediction Have.

入力画像メモリ(102)は原画像(101)の中から一枚の画像を符号化対象画像として保持し、これをブロック分割部(103)にて細かなブロックに分割し、動き探索部(104)、旧画面内予測部(105)および新画面内予測部(106)に渡す。動き探索部(104)では、参照画像メモリ(116)に格納されている復号化済み画像を用いて該当ブロックの動き量を計算し、動きベクトルとして画面間予測部(107)に渡す。旧画面内予測部(105)、新画面内予測部(106)および画面間予測部(107)では画面内予測処理および画面間予測処理をいくつかの大きさのブロック単位で実行し、モード選択部(108)にて最適な予測符号化手段を選ぶ。続いて減算部(109)では最適な予測符号化手段による予測差分を生成し、周波数変換部(110)に渡す。周波数変換部(110)および量子化処理部(111)では、送られてきた予測差分に対して指定された大きさのブロック単位でそれぞれDCT(Discrete Cosine Transformation:離散コサイン変換)などの周波数変換および量子化処理を行い、可変長符号化処理部(112)および逆量子化処理部(113)に渡す。さらに可変長符号化処理部(112)では、周波数変換係数によって表される予測差分情報を、例えば画面内予測符号化における予測方向や画面間予測符号化における動きベクトルなど、予測復号化に必要な情報とともに、記号の発生確率に基づいて可変長符号化を行って符号化ストリームを生成する。   The input image memory (102) holds one image as an encoding target image from the original image (101), and divides it into fine blocks by the block dividing unit (103), and the motion search unit (104 ) To the old screen prediction unit (105) and the new screen prediction unit (106). The motion search unit (104) calculates the motion amount of the corresponding block using the decoded image stored in the reference image memory (116), and passes it to the inter-screen prediction unit (107) as a motion vector. The old screen prediction unit (105), new screen prediction unit (106), and inter-screen prediction unit (107) perform intra-screen prediction processing and inter-screen prediction processing in units of several blocks, and select the mode. In section (108), the optimum predictive encoding means is selected. Subsequently, the subtraction unit (109) generates a prediction difference by the optimal prediction encoding means and passes it to the frequency conversion unit (110). The frequency transform unit (110) and the quantization processing unit (111) each perform frequency transform such as DCT (Discrete Cosine Transformation) in units of blocks of a specified size with respect to the transmitted prediction difference. Quantization processing is performed, and the result is passed to the variable length coding processing unit (112) and the inverse quantization processing unit (113). Further, in the variable length coding processing unit (112), the prediction difference information represented by the frequency transform coefficient is necessary for predictive decoding such as a prediction direction in intra prediction encoding and a motion vector in inter prediction encoding. Along with the information, variable length coding is performed based on the occurrence probability of the symbol to generate a coded stream.

また、逆量子化処理部(113)および逆周波数変換部(114)では、量子化後の周波数変換係数に対して、それぞれ逆量子化およびIDCT(Inverse DCT:逆DCT)などの逆周波数変換を施し、予測差分を取得して加算部(115)に送る。続いて加算部(115)により復号化画像を生成して参照画像メモリ(116)に格納する。   In addition, the inverse quantization processing unit (113) and the inverse frequency transform unit (114) perform inverse frequency transform such as inverse quantization and IDCT (Inverse DCT) on the frequency transform coefficients after quantization. The prediction difference is acquired and sent to the adding unit (115). Subsequently, the adder (115) generates a decoded image and stores it in the reference image memory (116).

図2は本実施例による動画像復号化装置の一実施例を示したものである。動画像復号化装置は、例えば図1に示す動画像符号化装置によって生成された符号化ストリーム(201)に対して可変長符号化の逆の手順を踏む可変長復号化部(202)と、予測差分を復号化するための逆量子化処理部(203)および逆周波数変換部(204)と、例えばH.264/AVCによる画面内予測(図6に記載)など、本実施例以外の手順にて画面内予測処理を行う旧画面内予測部(205)と、本実施例による画面内予測(図7および図8に記載)を行う新画面内予測部(206)と、画面内予測を行う画面間予測部(207)と、復号化画像を取得するための加算部(208)と、復号化画像を一時的に記憶しておくための参照画像メモリ(209)を有する。   FIG. 2 shows an embodiment of the moving picture decoding apparatus according to this embodiment. The video decoding device includes, for example, a variable length decoding unit (202) that performs the reverse procedure of variable length encoding on the encoded stream (201) generated by the video encoding device shown in FIG. Procedures other than the present embodiment, such as an inverse quantization processing unit (203) and an inverse frequency transform unit (204) for decoding a prediction difference, and intra-screen prediction (described in FIG. 6) using, for example, H.264 / AVC The old intra-screen prediction unit (205) that performs intra-screen prediction processing in FIG. 8, the new intra-screen prediction unit (206) that performs intra-screen prediction (described in FIGS. 7 and 8) according to the present embodiment, and intra-screen prediction An inter-screen prediction unit (207) to perform, an addition unit (208) for obtaining a decoded image, and a reference image memory (209) for temporarily storing the decoded image are provided.

可変長復号化部(202)では、符号化ストリーム(201)を可変長復号化し、予測差分の周波数変換係数成分と、予測方向や動きベクトルなどの予測処理に必要な情報を取得する。前者の予測差分情報に対しては逆量子化処理部(203)に、後者の予測処理に必要な情報に対しては、予測手段に応じて旧画面内予測部(205)、新画面内予測部(206)、または画面間予測部(207)に送られる。続いて、逆量子化処理部(203)および逆周波数変換部(204)では、予測差分情報に対してそれぞれ逆量子化と逆周波数変換を施して復号化を行う。一方で旧画面内予測部(205)、新画面内予測部(206)または画面間予測部(206)では、可変長復号化部(202)から送られてきた情報を基に参照画像メモリ(209)を参照して予測処理を実行し、加算部(208)にて復号化画像を生成するとともに、復号化画像を参照画像メモリ(209)に格納する。   The variable length decoding unit (202) performs variable length decoding on the encoded stream (201), and obtains information necessary for prediction processing, such as the frequency transform coefficient component of the prediction difference and the prediction direction and motion vector. For the former prediction difference information, the inverse quantization processing unit (203) is used. For the information required for the latter prediction processing, the old screen prediction unit (205) and the new screen prediction are used according to the prediction means. Part (206) or the inter-screen prediction unit (207). Subsequently, the inverse quantization processing unit (203) and the inverse frequency transform unit (204) perform decoding by performing inverse quantization and inverse frequency transform on the prediction difference information, respectively. On the other hand, the old intra-screen prediction unit (205), the new intra-screen prediction unit (206), or the inter-screen prediction unit (206) uses the reference image memory (based on the information sent from the variable length decoding unit (202)). 209), the prediction process is executed, and the adder (208) generates a decoded image and stores the decoded image in the reference image memory (209).

図12は、図1に示す動画像符号化装置の実施例における1フレームの符号化処理手順について示している。まず、符号化対象となるフレーム内に存在するすべてのブロックに対して(1201)、以下の処理を行う。すなわち、該当ブロックに対して一度すべての符号化モード(予測方法とブロックサイズの組み合わせ)に対して予測符号化処理を行って予測差分を計算し、その中から最も符号化効率の高いものを選択する。予測処理方法としては、本実施例による方法(以下、「新画面内予測符号化処理」(1205))の他に、例えばH.264/AVCに採用されている画面内予測方法(以下、「旧画面内予測符号化処理」(1206))や画面間予測符号化処理(1207)を実行し、その中から最適なものを選ぶことによって、画像の性質に応じて効率良く符号化できる。上記多数の符号化モードの中から最も符号化効率の高いものを選択する際には(1208)、例えば画質歪みと符号量の関係から最適な符号化モードを決定するRD-Optimization方式を利用することによって、効率良く符号化できる。RD-Optimization方式については、例えば、以下の参考文献1に記載の方式を用いればよい。
〔参考文献1〕G. Sullivan and T.Wiegand : “Rate-Distortion Optimization for Vid
eo Compression”, IEEE Signal Processing Magazine, vol.15, no.6, pp.74-90, 1998.
続いて、選ばれた符号化モードで生成された予測差分に対して周波数変換(1209)と量子化処理(1210)を施し、さらに可変長符号化を行うことによって符号化ストリームを生成する(1211)。一方、量子化済みの周波数変換係数に対しては逆量子化処理(1212)と逆周波数変換処理(1213)を施して予測差分を復号化し、復号化画像を生成して参照画像メモリに格納する(1214)。以上の処理をすべてのブロックに対して完了すれば、画像1フレーム分の符号化は終了する(1215)。
FIG. 12 shows a procedure for encoding one frame in the embodiment of the moving picture encoding apparatus shown in FIG. First, the following processing is performed for all blocks existing in the frame to be encoded (1201). In other words, the prediction coding process is performed once for all coding modes (combination of prediction method and block size) for the corresponding block, the prediction difference is calculated, and the one with the highest coding efficiency is selected from among them. To do. As a prediction processing method, in addition to the method according to the present embodiment (hereinafter referred to as “intra-screen predictive encoding process” (1205)), for example, the intra-screen prediction method (hereinafter referred to as “ By executing the “previous intra-frame predictive encoding process” (1206)) and the inter-screen predictive encoding process (1207) and selecting an optimum one from these, it is possible to efficiently encode according to the property of the image. When selecting the one with the highest coding efficiency from among the above-mentioned many coding modes (1208), for example, the RD-Optimization method for determining the optimum coding mode from the relationship between image quality distortion and code amount is used. Therefore, it can encode efficiently. For the RD-Optimization method, for example, the method described in Reference Document 1 below may be used.
[Reference 1] G. Sullivan and T. Wiegand: “Rate-Distortion Optimization for Vid
eo Compression ”, IEEE Signal Processing Magazine, vol.15, no.6, pp.74-90, 1998.
Subsequently, frequency conversion (1209) and quantization processing (1210) are performed on the prediction difference generated in the selected encoding mode, and further, variable length encoding is performed to generate an encoded stream (1211). ). On the other hand, the quantized frequency transform coefficient is subjected to inverse quantization processing (1212) and inverse frequency transform processing (1213) to decode the prediction difference, generate a decoded image, and store it in the reference image memory (1214). When the above processing is completed for all the blocks, encoding for one frame of the image is completed (1215).

図13は、上記新画面内予測符号化処理(1205)の詳細な処理手順について示している。ここでは、例えば(1101)のように、あらかじめ定義されたすべての予測方向に対し(1301)、予測方向に沿ったすべてのラインに対して以下の処理を行う(1302)。すなわち、対象ブロックが画面端に位置するなら(1303)、図5ステップ1の手順に従って境界画素の予測と予測差分の計算を行う(1304)。一方、対象ブロックが画面端に位置していないなら、図4ステップ1の手順に従って境界画素の予測と予測差分の計算を行う(1305)。続いて、周辺ブロックに含まれる参照画素と上記の手順にて予測した境界画素の値を用いて、図4および図5のステップ2の手順に従って双方向予測を行う(1305)。以上の処理をすべての予測方向およびすべてのラインに対して完了すれば、ブロック1つ分に対する予測符号化処理を終了する(1307)。   FIG. 13 shows a detailed processing procedure of the new intra-screen prediction encoding process (1205). Here, for example, as shown in (1101), the following processing is performed for all lines along the prediction direction (1301) for all the prediction directions defined in advance (1302). That is, if the target block is located at the screen edge (1303), the prediction of the boundary pixel and the calculation of the prediction difference are performed according to the procedure of step 1 in FIG. 5 (1304). On the other hand, if the target block is not located at the edge of the screen, prediction of the boundary pixel and calculation of the prediction difference are performed according to the procedure of step 1 in FIG. 4 (1305). Subsequently, bi-directional prediction is performed according to the procedure of step 2 of FIGS. 4 and 5 using the reference pixels included in the peripheral blocks and the values of the boundary pixels predicted by the above procedure (1305). If the above processing is completed for all prediction directions and all lines, the prediction encoding processing for one block is terminated (1307).

図14は、図2に示す動画像復号化装置の実施例における1フレームの復号化処理手順について示している。まず、1フレーム内のすべてのブロックに対して、以下の処理を行う(1401)。すなわち、入力ストリームに対して可変長復号化処理を施し(1402)、逆量子化処理(1403)および逆周波数変換処理(1404)を施して予測差分を復号化する。続いて、対象ブロックがどの方法によって予測符号化されているかに応じて、新画面内予測復号化処理(1407)、従来型画面内予測復号化処理(1408)、もしくは画面間予測復号化処理(1409)を行い、復号化画像を取得して参照画像メモリに格納する。以上の処理をフレーム中のすべてのブロックに対して完了すれば、画像1フレーム分の復号化が終了する(1410)。   FIG. 14 shows a procedure for decoding one frame in the embodiment of the moving picture decoding apparatus shown in FIG. First, the following processing is performed on all blocks in one frame (1401). That is, the variable length decoding process is performed on the input stream (1402), the inverse quantization process (1403), and the inverse frequency conversion process (1404) are performed to decode the prediction difference. Subsequently, depending on which method is used to predictively encode the target block, new intra-screen predictive decoding processing (1407), conventional intra-screen predictive decoding processing (1408), or inter-screen predictive decoding processing ( 1409), the decoded image is acquired and stored in the reference image memory. When the above processing is completed for all the blocks in the frame, decoding for one frame of the image is completed (1410).

図15は、上記新画面内予測復号化処理(1407)の詳細な処理手順について示している。ここでは、予測方向に沿ったすべてのラインに対して(1501)、以下の処理を行う。すなわち、対象ブロックが画面端に位置するなら(1402)、図8ステップ1の手順に従って境界画素の予測と予測差分の計算を行う(1403)。一方、対象ブロックが画面端に位置していないなら、図7ステップ1の手順に従って境界画素の予測と予測差分の計算を行う(1404)。続いて、周辺ブロックに含まれる参照画素と上記の手順にて予測した境界画素の値を用いて、図7および図8のステップ2の手順に従って双方向予測を行う(1405)。以上の処理をすべてのラインに対して完了すれば、ブロック1つ分に対する予測復号化処理を終了する(1406)。   FIG. 15 shows a detailed processing procedure of the new intra-screen predictive decoding process (1407). Here, the following processing is performed for all lines along the prediction direction (1501). That is, if the target block is located at the edge of the screen (1402), prediction of the boundary pixel and calculation of the prediction difference are performed according to the procedure of step 1 in FIG. 8 (1403). On the other hand, if the target block is not located at the screen edge, prediction of the boundary pixel and calculation of the prediction difference are performed according to the procedure of step 1 in FIG. 7 (1404). Subsequently, bi-directional prediction is performed according to the procedure of Step 2 of FIGS. 7 and 8 using the reference pixels included in the peripheral blocks and the values of the boundary pixels predicted by the above procedure (1405). When the above process is completed for all lines, the predictive decoding process for one block is terminated (1406).

実施例では周波数変換の一例としてDCTを挙げているが、DST(Discrete Sine Transformation:離散サイン変換)、WT(Wavelet Transformation:ウェーブレット変換)、DFT(Discrete Fourier Transformation:離散フーリエ変換)、KLT(Karhunen-Loeve Transformation:カルーネン-レーブ変換)など、画素間相関除去に利用する直交変換ならどんなものでも構わないし、特に周波数変換を施さずに予測差分そのものに対して符号化を行っても構わない。さらに、可変長符号化も特に行わなくて良い。また、実施例では特に4×4画素サイズのブロック単位で輝度成分の予測を行う場合について記載しているが、例えば8×8画素サイズや16×16画素サイズなど、どのようなサイズのブロックに対して本実施例を適用しても良いし、輝度成分以外にも、例えば色差成分に対する予測に本実施例を適用しても良い。また、実施例ではH.264/AVCで定められている8方向に沿って予測を行っているが、方向数を増やしても減らしても構わない。   In the embodiment, DCT is cited as an example of frequency transformation, but DST (Discrete Sine Transformation), WT (Wavelet Transformation), DFT (Discrete Fourier Transformation), KLT (Karhunen- Any orthogonal transformation used for removing correlation between pixels, such as Loeve Transformation (Karunen-Leave transformation), may be used, and the prediction difference itself may be encoded without any frequency transformation. Furthermore, variable length coding is not particularly required. Further, in the embodiment, the case where the luminance component is predicted in a block unit of 4 × 4 pixel size in particular is described, but for example, the block of any size such as 8 × 8 pixel size or 16 × 16 pixel size is described. On the other hand, the present embodiment may be applied. For example, the present embodiment may be applied to prediction for a color difference component in addition to the luminance component. In the embodiment, prediction is performed along 8 directions defined in H.264 / AVC, but the number of directions may be increased or decreased.

続いて、本実施例における予測式の一例について記載する。ここでは、4×4画素サイズのブロック単位で輝度成分の予測を行う場合について記載する。まず図16(1601)のように、対象ブロックの最も左上に位置する画素の座標を(0, 0)とし、水平右側に向かってx軸を、垂直下側に向かってy軸を設定する。そして、対象ブロック中の座標(x, y)における輝度値をp[x, y]、予測値をpred4x4[x, y]と表す。また、双方向予測に利用する2つの参照画素をそれぞれRef1、Ref2とする。なお、関数Min(a, b)は、2つの整数a、bのうちで小さいほうを返し、関数ROUND(a)は、実数aの小数点第1位を四捨五入した整数値を返す。   Subsequently, an example of a prediction formula in the present embodiment will be described. Here, a case where a luminance component is predicted in units of 4 × 4 pixel size blocks will be described. First, as shown in FIG. 16 (1601), the coordinate of the pixel located at the upper left of the target block is set to (0, 0), and the x axis is set to the horizontal right side and the y axis is set to the vertical lower side. The luminance value at the coordinates (x, y) in the target block is represented as p [x, y], and the predicted value is represented as pred4x4 [x, y]. Also, two reference pixels used for bidirectional prediction are Ref1 and Ref2, respectively. The function Min (a, b) returns the smaller of the two integers a and b, and the function ROUND (a) returns an integer value obtained by rounding off the first decimal place of the real number a.

以下では、9種類の予測方法(1602)〜(1610)のうち、DC予測(1604)を除く8種類の方向に沿った予測を行う場合について、それぞれ予測値pred4x4の計算式について記載する。   In the following, the calculation formulas for the prediction value pred4x4 will be described in the case of performing prediction along eight types of directions except for the DC prediction (1604) among the nine types of prediction methods (1602) to (1610).

予測方向0(Vertical)(1602)の場合、以下の数式1によって予測を行う。
(数1)
・左側および上側に隣接するブロックが利用できる場合
Ref1 = p[x, -1]
Ref2 = (p[-1, 3] + p[-2, 3] + p[-3, 3] + p[-4, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 Ref1) * (y+1) / 4)
・上側に隣接するブロックが利用でき、左側に隣接するブロックが利用できない場合
Ref1 = p[x, -1]
Ref2 = 2 * p[x, -1] - p[x, -4]
pred4x4[x, y] = ROUND(Ref1 + (Ref2 Ref1) * (y+1) / 4)
予測方向1(Horizontal)(1603)の場合、以下の数式2によって予測を行う。
(数2)
・左側および上側に隣接するブロックが利用できる場合
Ref1 = p[-1, y]
Ref2 = (p[3, -1] + p[3, -2] + p[3, -3] + p[3, -4] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 Ref1) * (x+1) / 4)
・左側に隣接するブロックが利用でき、上側に隣接するブロックが利用できない場合
Ref1 = p[-1, y]
Ref2 = 2 * p[-1, y] - p[-4, y]
pred4x4[x, y] = ROUND(Ref1 + (Ref2 Ref1) * (x+1) / 4)
予測方向3(Diagonal Down Left)(1605)の場合、以下の数式3によって予測を行う。
(数3)
・左側および上側に隣接するブロックが利用できる場合
・x=y=3の場合
Ref1 = (p[6, -1] + 3 * p[7, -1] + 2) >> 2
Ref2 = (p[-1, 2] + 3 * p[ -1, 3 ] + 2) >> 2
pred4x4[x, y] = ROUND( (Ref1 + Ref2) / 2)
・それ以外の場合(xが3ではなく、かつyが3ではない場合)
Ref1 = ( p[x+y, -1] + 2 * p[x+y+1, -1] + p[x+y+2, -1] + 2 ) >> 2
Ref2 = ( p[-1, Min(3, x+y)] + 2 * p[-1, Min(3, x+y+1)] + p[-1, Min(3, x+y+2)] + 2 ) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 Ref1) * (y+1) / (x+y+2))
・上側に隣接するブロックが利用でき、左側に隣接するブロックが利用できない場合
・x=y=3の場合
Ref1 = (p[6, -1] + 3 * p[7, -1] + 2) >> 2
Ref2 = (p[3, -1] + p[3, -2] + p[3, -3] + p[3, -4] + 2) >> 2
pred4x4[x, y] = ROUND( (Ref1 + Ref2) / 2)
・それ以外の場合(xが3ではなく、かつyが3ではない場合)
Ref1 = ( p[x+y, -1] + 2 * p[x+y+1, -1] + p[x+y+2, -1] + 2 ) >> 2
Ref2 = (p[3, -1] + p[3, -2] + p[3, -3] + p[3, -4] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 Ref1) * (y+1) / (x+y+2))
予測方向4(Diagonal Down Right)(1606)の場合、以下の数式4によって予測を行う。
(数4)
・左側および上側に隣接するブロックが利用できる場合
・x>yの場合
Ref1 = (p[x-y-2, -1] + 2 * p[x-y-1, -1] + p[x-y, -1] + 2 ) >> 2
Ref2 = (p[3, -1] + p[3, -2] + p[3, -3] + p[3, -4] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * x / 3)
・x<yの場合
Ref1 = (p[-1, y-x-2] + 2 * p[-1, y-x-1] + p[-1, y-x] + 2 ) >> 2
Ref2 = (p[-1, 3] + p[-2, 3] + p[-3, 3] + p[-4, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * y / 3)
・x=yの場合
Ref1 = (p[0, -1] + 2 * p[-1, -1] + p[-1, 0] + 2) >> 2
Ref2 = (p[3, -1] + p[3, -2] + p[-1, 3] + p[-2, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (x+1) / 4)
予測方向5(1607)(Vertical Right)の場合、以下の数式5によって予測を行う。
(数5)
zVR = 2 * x y としたとき、
・左側および上側に隣接するブロックが利用できる場合
・zVR = 0, 2, 4, 6の場合
Ref1 = (p[x-(y>>1)-1, -1] + p[x-(y>>1), -1] + 1) >> 1
Ref2 = (p[-1, 3] + p[-2, 3] + p[-3, 3] + p[-4, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (y+1) / 4)
・zVR = 1, 3, 5の場合
Ref1 = (p[x-(y>>1)-2, -1] + 2*p[x-(y>>1)-1, -1] + p[x-(y>>1), -1] + 2)
>> 2
Ref2 = (p[-1, 3] + p[-2, 3] + p[-3, 3] + p[-4, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (y+1) / 4)
・zVR = -1の場合
Ref1 = (p[-1, 0] + 2*p[-1, -1] + p[0, -1] + 2) >> 2
Ref2 = (p[-1, 3] + p[-2, 3] + p[-3, 3] + p[-4, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (y+1) / 4)
・それ以外(zVR = -2, -3の場合)
Ref1 = (-1, y-1] + 2*p[-1, y-2] + p[-1, y-3] + 2) >> 2
Ref2 = (p[-1, 3] + p[-2, 3] + p[-3, 3] + p[-4, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (y+1) / 4)
予測方向6(Horizontal Down)(1608)の場合、以下の数式6によって予測を行う。
(数6)
zHD = 2 * y x としたとき、
・左側および上側に隣接するブロックが利用できる場合
・zHD = 0, 2, 4, 6の場合
Ref1 = (p[-1, y-(x>>1)-1] + p[-1, y-(x>>1)] + 1) >> 1
Ref2 = (p[3, -1] + p[3, -2] + p[-1, 3] + p[-2, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (x+1) / 4)
・zHD = 1, 3, 5の場合
Ref1 = (p[-1, y-(x>>1)-2] + 2*p[-1, y-(x>>1)-1] + p[-1, y-(x>>1)] + 2) >> 2
Ref2 = (p[3, -1] + p[3, -2] + p[-1, 3] + p[-2, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (x+1) / 4)
・zHD = -1の場合
Ref1 = (p[-1, 0] + 2*p[-1, -1] + p[0, -1] + 2) >> 2
Ref2 = (p[3, -1] + p[3, -2] + p[-1, 3] + p[-2, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (x+1) / 4)
・それ以外(zHD = -2, -3の場合)
Ref1 = (p[x-1, -1] + 2*p[x-2, -1] + p[x-3, -1] + 2) >> 2
Ref2 = (p[3, -1] + p[3, -2] + p[-1, 3] + p[-2, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (x+1) / 4)
予測方向7(Vertical Left)(1609)の場合、以下の数式7によって予測を行う。
(数7)
・左側および上側に隣接するブロックが利用できる場合
・y = 0, 2の場合
Ref1 = (p[x+(y>>1), -1] + p[x+(y>>1)+1, -1] + 1) >> 1
Ref2 = (p[-1, 3] + p[-2, 3] + p[-3, 3] + p[-4, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (y+1) / (x+y+2))
・それ以外(y = 1, 3の場合)
Ref1 = (p[x+(y>>1), -1] + 2 * p[x+(y>>1)+1, -1] + p[x+(y>>1)+2, -1]+ 2) >> 2
Ref2 = (p[-1, 3] + p[-2, 3] + p[-3, 3] + p[-4, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (y+1) / (x+y+2))
・上側に隣接するブロックが利用でき、左側に隣接するブロックが利用できない場合
・y = 0, 2の場合
Ref1 = (p[x+(y>>1), -1] + p[x+(y>>1)+1, -1] + 1) >> 1
Ref2 = 2 * p[x, -1] - p[x, -4]
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (y+1) / (x+y+2))
・それ以外(y = 1, 3の場合)
Ref1 = (p[x+(y>>1), -1] + 2 * p[x+(y>>1)+1, -1] + p[x+(y>>1)+2, -1]+ 2) >> 2
Ref2 = 2 * p[x, -1] - p[x, -4]
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (y+1) / (x+y+2))
予測方向8(Horizontal Up)(1610)の場合、以下の数式8によって予測を行う。
(数8)
zHU = x + 2 * y としたとき、
・左側および上側に隣接するブロックが利用できる場合
・zHU = 0, 2, 4の場合
Ref1 = (p[-1, y+(x>>1)] + p[-1, y+(x>>1)+1] + 1) >> 1
Ref2 = (p[3, -1] + p[3, -2] + p[-1, 3] + p[-2, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (x+1) / 4)
・zHU = 1, 3の場合
Ref1 = (p[-1, y+(x>>1)] + 2*p[-1, y+(x>>1)+1] + p[-1, y+(x>>1)+2] + 2) >> 2
Ref2 = (p[3, -1] + p[3, -2] + p[-1, 3] + p[-2, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (x+1) / 4)
・zHU = 5の場合
Ref1 = (p[-1, 2] + 3*p[-1, 3] + 2) >> 2
Ref2 = (p[3, -1] + p[3, -2] + p[-1, 3] + p[-2, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (x+1) / 4)
・それ以外(zHU > 5の場合)
Ref1 = p[-1, 3]
Ref2 = (p[3, -1] + p[3, -2] + p[-1, 3] + p[-2, 3] + 2) >> 2
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (x+1) / 4)
・左側に隣接するブロックが利用でき、上側に隣接するブロックが利用できない場合
・zHU = 0, 2, 4の場合
Ref1 = (p[-1, y+(x>>1)] + p[-1, y+(x>>1)+1] + 1) >> 1
Ref2 = 2 * p[-1, y] - p[-4, y]
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (x+1) / 4)
・zHU = 1, 3の場合
Ref1 = (p[-1, y+(x>>1)] + 2*p[-1, y+(x>>1)+1] + p[-1, y+(x>>1)+2] + 2) >> 2
Ref2 = 2 * p[-1, y] - p[-4, y]
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (x+1) / 4)
・zHU = 5の場合
Ref1 = (p[-1, 2] + 3*p[-1, 3] + 2) >> 2
Ref2 = 2 * p[-1, y] - p[-4, y]
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (x+1) / 4)
・それ以外(zHU > 5の場合)
Ref1 = p[-1, 3]
Ref2 = 2 * p[-1, y] - p[-4, y]
pred4x4[x, y] = ROUND(Ref1 + (Ref2 - Ref1) * (x+1) / 4)
上記の実施例では、2つの参照画素のうち符号化済み(復号化済み)の画素から選択できないものの予測(例えば図4のステップ1における境界画素E、F、G、Hの予測)を、主に符号化済み隣接ブロックの同じ行(もしくは列)に属する画素の平均値によって行っているが、特に平均値でなくても、例えば最小値や最大値、あるいは中間値などを用いても良いし、これらの画素を用いた外挿予測や内挿予測など、どんな計算式を用いても良い。特に内挿予測を行う場合には線形補間、非線形補間などどのような方法を用いても良いし、外挿予測を行う場合には、例えば最小二乗法を用いた直線・放物線近似、ニュートン補間、ラグランジュ補間など、どのようなモデルを利用して予測を行っても構わない。
In the case of the prediction direction 0 (Vertical) (1602), prediction is performed according to the following Equation 1.
(Equation 1)
・ When adjacent blocks on the left and upper sides are available
Ref1 = p [x, -1]
Ref2 = (p [-1, 3] + p [-2, 3] + p [-3, 3] + p [-4, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2 Ref1) * (y + 1) / 4)
・ When the adjacent block on the upper side can be used, and the adjacent block on the left side cannot be used
Ref1 = p [x, -1]
Ref2 = 2 * p [x, -1]-p [x, -4]
pred4x4 [x, y] = ROUND (Ref1 + (Ref2 Ref1) * (y + 1) / 4)
In the case of the prediction direction 1 (Horizontal) (1603), the prediction is performed according to Equation 2 below.
(Equation 2)
・ When adjacent blocks on the left and upper sides are available
Ref1 = p [-1, y]
Ref2 = (p [3, -1] + p [3, -2] + p [3, -3] + p [3, -4] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2 Ref1) * (x + 1) / 4)
・ When the adjacent block on the left side can be used and the adjacent block on the upper side cannot be used
Ref1 = p [-1, y]
Ref2 = 2 * p [-1, y]-p [-4, y]
pred4x4 [x, y] = ROUND (Ref1 + (Ref2 Ref1) * (x + 1) / 4)
In the case of the prediction direction 3 (Diagonal Down Left) (1605), prediction is performed according to the following Equation 3.
(Equation 3)
・ When adjacent blocks on the left and upper sides can be used ・ When x = y = 3
Ref1 = (p [6, -1] + 3 * p [7, -1] + 2) >> 2
Ref2 = (p [-1,2] + 3 * p [-1,3] + 2) >> 2
pred4x4 [x, y] = ROUND ((Ref1 + Ref2) / 2)
・ Other cases (when x is not 3 and y is not 3)
Ref1 = (p [x + y, -1] + 2 * p [x + y + 1, -1] + p [x + y + 2, -1] + 2) >> 2
Ref2 = (p [-1, Min (3, x + y)] + 2 * p [-1, Min (3, x + y + 1)] + p [-1, Min (3, x + y + 2)] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2 Ref1) * (y + 1) / (x + y + 2))
・ When the adjacent block on the upper side can be used and the adjacent block on the left side cannot be used ・ When x = y = 3
Ref1 = (p [6, -1] + 3 * p [7, -1] + 2) >> 2
Ref2 = (p [3, -1] + p [3, -2] + p [3, -3] + p [3, -4] + 2) >> 2
pred4x4 [x, y] = ROUND ((Ref1 + Ref2) / 2)
・ Other cases (when x is not 3 and y is not 3)
Ref1 = (p [x + y, -1] + 2 * p [x + y + 1, -1] + p [x + y + 2, -1] + 2) >> 2
Ref2 = (p [3, -1] + p [3, -2] + p [3, -3] + p [3, -4] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2 Ref1) * (y + 1) / (x + y + 2))
In the case of the prediction direction 4 (Diagonal Down Right) (1606), prediction is performed according to the following Equation 4.
(Equation 4)
-When adjacent blocks on the left and upper sides are available-When x> y
Ref1 = (p [xy-2, -1] + 2 * p [xy-1, -1] + p [xy, -1] + 2) >> 2
Ref2 = (p [3, -1] + p [3, -2] + p [3, -3] + p [3, -4] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * x / 3)
・ If x <y
Ref1 = (p [-1, yx-2] + 2 * p [-1, yx-1] + p [-1, yx] + 2) >> 2
Ref2 = (p [-1, 3] + p [-2, 3] + p [-3, 3] + p [-4, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * y / 3)
・ When x = y
Ref1 = (p [0, -1] + 2 * p [-1, -1] + p [-1, 0] + 2) >> 2
Ref2 = (p [3, -1] + p [3, -2] + p [-1, 3] + p [-2, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (x + 1) / 4)
In the case of the prediction direction 5 (1607) (Vertical Right), prediction is performed according to the following Expression 5.
(Equation 5)
When zVR = 2 * xy,
・ When adjacent blocks on the left and upper sides can be used ・ When zVR = 0, 2, 4, 6
Ref1 = (p [x- (y >> 1) -1, -1] + p [x- (y >> 1), -1] + 1) >> 1
Ref2 = (p [-1, 3] + p [-2, 3] + p [-3, 3] + p [-4, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (y + 1) / 4)
・ When zVR = 1, 3, 5
Ref1 = (p [x- (y >> 1) -2, -1] + 2 * p [x- (y >> 1) -1, -1] + p [x- (y >> 1), -1] + 2)
>> 2
Ref2 = (p [-1, 3] + p [-2, 3] + p [-3, 3] + p [-4, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (y + 1) / 4)
・ When zVR = -1
Ref1 = (p [-1, 0] + 2 * p [-1, -1] + p [0, -1] + 2) >> 2
Ref2 = (p [-1, 3] + p [-2, 3] + p [-3, 3] + p [-4, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (y + 1) / 4)
・ Other (when zVR = -2, -3)
Ref1 = (-1, y-1] + 2 * p [-1, y-2] + p [-1, y-3] + 2) >> 2
Ref2 = (p [-1, 3] + p [-2, 3] + p [-3, 3] + p [-4, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (y + 1) / 4)
In the case of the prediction direction 6 (Horizontal Down) (1608), the prediction is performed according to Equation 6 below.
(Equation 6)
When zHD = 2 * yx,
・ When adjacent blocks on the left and upper sides can be used ・ When zHD = 0, 2, 4, 6
Ref1 = (p [-1, y- (x >> 1) -1] + p [-1, y- (x >> 1)] + 1) >> 1
Ref2 = (p [3, -1] + p [3, -2] + p [-1, 3] + p [-2, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (x + 1) / 4)
・ When zHD = 1, 3, 5
Ref1 = (p [-1, y- (x >> 1) -2] + 2 * p [-1, y- (x >> 1) -1] + p [-1, y- (x >> 1)] + 2) >> 2
Ref2 = (p [3, -1] + p [3, -2] + p [-1, 3] + p [-2, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (x + 1) / 4)
・ When zHD = -1
Ref1 = (p [-1, 0] + 2 * p [-1, -1] + p [0, -1] + 2) >> 2
Ref2 = (p [3, -1] + p [3, -2] + p [-1, 3] + p [-2, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (x + 1) / 4)
・ Other (when zHD = -2, -3)
Ref1 = (p [x-1, -1] + 2 * p [x-2, -1] + p [x-3, -1] + 2) >> 2
Ref2 = (p [3, -1] + p [3, -2] + p [-1, 3] + p [-2, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (x + 1) / 4)
In the case of the prediction direction 7 (Vertical Left) (1609), prediction is performed according to Equation 7 below.
(Equation 7)
-When adjacent blocks on the left and upper sides can be used-When y = 0, 2
Ref1 = (p [x + (y >> 1), -1] + p [x + (y >> 1) +1, -1] + 1) >> 1
Ref2 = (p [-1, 3] + p [-2, 3] + p [-3, 3] + p [-4, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (y + 1) / (x + y + 2))
・ Other than that (when y = 1, 3)
Ref1 = (p [x + (y >> 1), -1] + 2 * p [x + (y >> 1) +1, -1] + p [x + (y >> 1) +2, -1] + 2) >> 2
Ref2 = (p [-1, 3] + p [-2, 3] + p [-3, 3] + p [-4, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (y + 1) / (x + y + 2))
・ When the adjacent block on the upper side can be used and the adjacent block on the left side cannot be used ・ When y = 0, 2
Ref1 = (p [x + (y >> 1), -1] + p [x + (y >> 1) +1, -1] + 1) >> 1
Ref2 = 2 * p [x, -1]-p [x, -4]
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (y + 1) / (x + y + 2))
・ Other than that (when y = 1, 3)
Ref1 = (p [x + (y >> 1), -1] + 2 * p [x + (y >> 1) +1, -1] + p [x + (y >> 1) +2, -1] + 2) >> 2
Ref2 = 2 * p [x, -1]-p [x, -4]
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (y + 1) / (x + y + 2))
In the case of the prediction direction 8 (Horizontal Up) (1610), prediction is performed according to the following Expression 8.
(Equation 8)
When zHU = x + 2 * y,
・ When adjacent blocks on the left and upper sides can be used ・ When zHU = 0, 2, 4
Ref1 = (p [-1, y + (x >> 1)] + p [-1, y + (x >> 1) +1] + 1) >> 1
Ref2 = (p [3, -1] + p [3, -2] + p [-1, 3] + p [-2, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (x + 1) / 4)
・ When zHU = 1 or 3
Ref1 = (p [-1, y + (x >> 1)] + 2 * p [-1, y + (x >> 1) +1] + p [-1, y + (x >> 1) +2] + 2) >> 2
Ref2 = (p [3, -1] + p [3, -2] + p [-1, 3] + p [-2, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (x + 1) / 4)
・ When zHU = 5
Ref1 = (p [-1, 2] + 3 * p [-1, 3] + 2) >> 2
Ref2 = (p [3, -1] + p [3, -2] + p [-1, 3] + p [-2, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (x + 1) / 4)
・ Other (when zHU> 5)
Ref1 = p [-1, 3]
Ref2 = (p [3, -1] + p [3, -2] + p [-1, 3] + p [-2, 3] + 2) >> 2
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (x + 1) / 4)
・ When the adjacent block on the left side can be used and the adjacent block on the upper side cannot be used ・ When zHU = 0, 2, 4
Ref1 = (p [-1, y + (x >> 1)] + p [-1, y + (x >> 1) +1] + 1) >> 1
Ref2 = 2 * p [-1, y]-p [-4, y]
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (x + 1) / 4)
・ When zHU = 1 or 3
Ref1 = (p [-1, y + (x >> 1)] + 2 * p [-1, y + (x >> 1) +1] + p [-1, y + (x >> 1) +2] + 2) >> 2
Ref2 = 2 * p [-1, y]-p [-4, y]
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (x + 1) / 4)
・ When zHU = 5
Ref1 = (p [-1, 2] + 3 * p [-1, 3] + 2) >> 2
Ref2 = 2 * p [-1, y]-p [-4, y]
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (x + 1) / 4)
・ Other (when zHU> 5)
Ref1 = p [-1, 3]
Ref2 = 2 * p [-1, y]-p [-4, y]
pred4x4 [x, y] = ROUND (Ref1 + (Ref2-Ref1) * (x + 1) / 4)
In the above-described embodiment, prediction (for example, prediction of boundary pixels E, F, G, and H in step 1 in FIG. 4) that cannot be selected from the encoded (decoded) pixels of the two reference pixels is performed mainly. However, the average value of pixels belonging to the same row (or column) of the encoded adjacent block is not particularly limited. For example, a minimum value, a maximum value, or an intermediate value may be used. Any calculation formula such as extrapolation prediction or interpolation prediction using these pixels may be used. In particular, when performing interpolation prediction, any method such as linear interpolation and nonlinear interpolation may be used, and when performing extrapolation prediction, for example, linear / parabolic approximation using the least square method, Newton interpolation, Any model such as Lagrangian interpolation may be used for prediction.

図17は、図4のステップ1(402)において、外挿予測によって境界画素E、F、G、Hを予測した場合の概念図を示している。ここでは、水平軸に座標を、垂直軸に輝度値を設定している。(1701)では直線近似を行う場合について示しており、左側に隣接するブロックの最も下の行に位置する復号化画素A’、B’、C’、D’を用いて最小二乗法などを利用することによって予測直線を算出し、その直線上において境界画素E、F、G、Hの座標に対応する点を予測値とする。また、(1702)では、同じ外挿予測を放物線近似、ニュートン補間、ラグランジュ補間など曲線近似による方法によって行う場合について示しており、この場合復号化画素A’、B’、C’、D’を用いて算出した予測曲線に基づいて境界画素E、F、G、Hを予測する。上記の処理によって予測された境界画素は、例えば図4におけるステップ2の双方向予測を行う際に、参照画素の1つとして利用される。   FIG. 17 shows a conceptual diagram when the boundary pixels E, F, G, and H are predicted by extrapolation prediction in Step 1 (402) of FIG. Here, coordinates are set on the horizontal axis and luminance values are set on the vertical axis. (1701) shows a case where linear approximation is performed, and the least square method is used by using the decoded pixels A ′, B ′, C ′, and D ′ located in the lowermost row of the adjacent block on the left side. Thus, a predicted straight line is calculated, and points corresponding to the coordinates of the boundary pixels E, F, G, and H on the straight line are set as predicted values. (1702) shows a case where the same extrapolation prediction is performed by a curve approximation method such as parabolic approximation, Newton interpolation, Lagrangian interpolation, etc. In this case, the decoded pixels A ′, B ′, C ′, and D ′ are set as follows. The boundary pixels E, F, G, and H are predicted based on the prediction curve calculated using the above. The boundary pixel predicted by the above processing is used as one of the reference pixels when the bidirectional prediction in step 2 in FIG. 4 is performed, for example.

また、参照画素の予測に利用する情報としては、隣接ブロックの情報であれば特に同じ行(もしくは列)に属する画素に限定しない。さらに、実施例では双方向予測(例えば図4のステップ2における画素J、K、Lの予測)を、2つの参照画素を用いた線形補間によって行っているが、対象画素を挟む2つの参照画素を利用していればその補間方法は特に問わない。例えば、対象画素の予測値を2つの参照画素の任意の直線式によって表しても良い。この場合、2つの参照画素をRef1、Ref2とした場合、以下の数式9によって予測値pred4x4が計算される。
(数9)
pred4x4[x, y] = a * Ref1 + b * Ref2
ここで、a、bはそれぞれ実数の定数を表し、これらの値はあらかじめ一定の値に定めておいても良いし、ブロック単位で指定しても良い。また、図5(図8)に示す画面端に対する画面内予測符号化方式(復号化方式)は、特に画面端のブロックでなくても適用可能である。すなわち、この方式を画面端以外のブロックに適用しても構わない。
Further, the information used for prediction of the reference pixel is not particularly limited to pixels belonging to the same row (or column) as long as it is information on adjacent blocks. Furthermore, in the embodiment, bi-directional prediction (for example, prediction of pixels J, K, and L in step 2 in FIG. 4) is performed by linear interpolation using two reference pixels, but two reference pixels sandwiching the target pixel As long as the method is used, the interpolation method is not particularly limited. For example, the predicted value of the target pixel may be represented by an arbitrary linear expression of two reference pixels. In this case, assuming that the two reference pixels are Ref1 and Ref2, the predicted value pred4x4 is calculated by the following formula 9.
(Equation 9)
pred4x4 [x, y] = a * Ref1 + b * Ref2
Here, a and b represent real constants, respectively, and these values may be set to constant values in advance or may be specified in units of blocks. Further, the intra prediction encoding method (decoding method) for the screen edge shown in FIG. 5 (FIG. 8) can be applied even if it is not a block at the screen edge. That is, this method may be applied to blocks other than the screen edge.

図18は、本実施例を利用した場合に生成される符号化ストリームのうち、ブロック単位で設定されるべき符号化パラメータに関する部分の構成例について示している。ここではH.264/AVCにおける処理単位と同様に、固定長サイズのマクロブロック単位で符号化モードを決定する場合について説明している。マクロブロックはさらに細かなブロックに分割することができ、分割されたブロック単位で予測符号化が行われるものとする。この時、マクロブロックごとにその座標を特定するためのマクロブロック番号(1801)と、予測方法とブロックサイズを表す符号化モード番号(1802)、そして例えば画面間予測の際の動きベクトルや画面内予測の際の予測方向など、予測を行う際に必要となる情報(1803)、そして予測差分情報(1804)が可変長符号化されて格納される。特に符号化モード番号(1802)に対しては、すべての予測手段に対して連番で割り当てても良いし、予測手段ごとに異なるビットで表しても良い。   FIG. 18 shows a configuration example of a portion related to the encoding parameter to be set in units of blocks in the encoded stream generated when this embodiment is used. Here, as in the processing unit in H.264 / AVC, a case is described in which the encoding mode is determined in units of macroblocks of a fixed length size. The macroblock can be divided into finer blocks, and predictive coding is performed in units of the divided blocks. At this time, the macroblock number (1801) for specifying the coordinates for each macroblock, the encoding mode number (1802) indicating the prediction method and the block size, and the motion vector and intra-frame prediction for inter-screen prediction, for example Information necessary for the prediction (1803) and prediction difference information (1804), such as the prediction direction at the time of prediction, are variable-length encoded and stored. In particular, the encoding mode number (1802) may be assigned sequentially to all prediction means, or may be expressed by a different bit for each prediction means.

図19は、図18にて示したブロック単位で設定されるべき符号化パラメータに関する部分に対する別の構成例について示している。この例では、マクロブロック番号(1901)と、予測方法(1902)に対して、本実施例による隣接画素を利用した予測を行うか否かを表すフラグ(1903)を付加し、さらに予測に必要な情報(1904)と予測差分情報(1905)を格納する。   FIG. 19 shows another configuration example for the part related to the encoding parameter to be set in block units shown in FIG. In this example, a flag (1903) indicating whether to perform prediction using an adjacent pixel according to the present embodiment is added to the macroblock number (1901) and the prediction method (1902), and further necessary for prediction. Information (1904) and prediction difference information (1905) are stored.

101…原画像、102…原画像メモリ、103…ブロック分割部、104…動き探索部、105…旧画面間予測部、106…新画面内予測部、107…画面間予測部、108…モード選択部、109…減算部、110…周波数変換部、111…量子化処理部、112…可変長符号化部、113…逆量子化処理部、114…逆周波数変換部、115…加算部、116…参照画像メモリ、201…符号化ストリーム、202…可変長復号化部、203…逆量子化処理部、204…逆周波数変換部、205…旧画面内予測部、206…新画面内予測部、207…画面間予測部、208…加算部、209…参照画像メモリ DESCRIPTION OF SYMBOLS 101 ... Original image, 102 ... Original image memory, 103 ... Block division part, 104 ... Motion search part, 105 ... Old screen prediction part, 106 ... New screen prediction part, 107 ... Inter screen prediction part, 108 ... Mode selection 109: Subtraction unit, 110 ... Frequency conversion unit, 111 ... Quantization processing unit, 112 ... Variable length coding unit, 113 ... Inverse quantization processing unit, 114 ... Inverse frequency conversion unit, 115 ... Addition unit, 116 ... Reference image memory, 201 ... encoded stream, 202 ... variable length decoding unit, 203 ... dequantization processing unit, 204 ... inverse frequency transform unit, 205 ... prediction unit in old screen, 206 ... prediction unit in new screen, 207 ... Inter-screen prediction unit, 208 ... Adding unit, 209 ... Reference image memory

Claims (1)

予測処理を行って画像を復号化する画像復号化方法であって、
前記予測処理についての複数の予測モードのうちの一つの予測モードを選択する予測モード選択ステップと、
前記予測モード選択ステップで選択された予測モードの予測処理を行う予測ステップと、を備え、
前記予測モード選択ステップで選択できる予測モードには、
画面内予測モードであって、復号化対象ブロックの左側または上側に隣接する復号化済ブロック内の画素を用いて第1の参照画素を生成し、前記復号化対象ブロックの上側または左側であって前記第1の参照画素とは異なる側に隣接する復号化済の第2の参照画素の画素値と前記第1の参照画素の画素値を用いた演算処理により予測画素を生成する第1の画面内予測モードと、
前記第1の画面内予測モードとは異なる画面内予測モードであって、前記復号化対象ブロックに隣接する復号化済の画素値を用いて予測画素を生成する第2の画面内予測モードと、
があり、
前記第1の画面内予測モードでは前記第2の参照画素の画素値と前記第1の参照画素の画素値との補間処理を用いた演算処理により予測画素を生成する、
画像復号化方法。
An image decoding method for decoding an image by performing a prediction process,
A prediction mode selection step of selecting one prediction mode among a plurality of prediction modes for the prediction process;
A prediction step of performing prediction processing of the prediction mode selected in the prediction mode selection step,
In the prediction mode that can be selected in the prediction mode selection step,
In the intra prediction mode, the first reference pixel is generated using the pixels in the decoded block adjacent to the left side or the upper side of the decoding target block, and is the upper side or the left side of the decoding target block. A first screen for generating a prediction pixel by a calculation process using a pixel value of a decoded second reference pixel adjacent to a different side from the first reference pixel and a pixel value of the first reference pixel Intra prediction mode,
A second intra prediction mode that is an intra prediction mode different from the first intra prediction mode and that generates a prediction pixel using a decoded pixel value adjacent to the decoding target block;
There is
In the first intra-screen prediction mode, a prediction pixel is generated by an arithmetic process using an interpolation process between a pixel value of the second reference pixel and a pixel value of the first reference pixel.
Image decoding method.
JP2015179599A 2015-09-11 2015-09-11 Image decoding method Active JP5887013B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015179599A JP5887013B2 (en) 2015-09-11 2015-09-11 Image decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015179599A JP5887013B2 (en) 2015-09-11 2015-09-11 Image decoding method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2014192491A Division JP5886922B2 (en) 2014-09-22 2014-09-22 Image decoding method

Publications (2)

Publication Number Publication Date
JP2015223003A true JP2015223003A (en) 2015-12-10
JP5887013B2 JP5887013B2 (en) 2016-03-16

Family

ID=54785760

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015179599A Active JP5887013B2 (en) 2015-09-11 2015-09-11 Image decoding method

Country Status (1)

Country Link
JP (1) JP5887013B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9699459B2 (en) 2007-10-10 2017-07-04 Hitachi Maxell, Ltd. Image encoding apparatus, image encoding method, image decoding apparatus, and image decoding method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04219074A (en) * 1990-08-31 1992-08-10 Toshiba Corp Picture coder
JPH10136376A (en) * 1996-10-31 1998-05-22 Victor Co Of Japan Ltd Inter-block prediction coding/decoding device and its method
WO2005107267A1 (en) * 2004-04-28 2005-11-10 Hitachi, Ltd. Image encoding/decoding device, encoding/decoding program, and encoding/decoding method
JP2006352181A (en) * 2005-02-18 2006-12-28 Hitachi Ltd Image encoding/decoding device, encoding/decoding program and encoding/decoding method
WO2008012918A1 (en) * 2006-07-28 2008-01-31 Kabushiki Kaisha Toshiba Image encoding and decoding method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04219074A (en) * 1990-08-31 1992-08-10 Toshiba Corp Picture coder
JPH10136376A (en) * 1996-10-31 1998-05-22 Victor Co Of Japan Ltd Inter-block prediction coding/decoding device and its method
WO2005107267A1 (en) * 2004-04-28 2005-11-10 Hitachi, Ltd. Image encoding/decoding device, encoding/decoding program, and encoding/decoding method
JP2006352181A (en) * 2005-02-18 2006-12-28 Hitachi Ltd Image encoding/decoding device, encoding/decoding program and encoding/decoding method
WO2008012918A1 (en) * 2006-07-28 2008-01-31 Kabushiki Kaisha Toshiba Image encoding and decoding method and apparatus

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JPN6011046338; Taichiro Shiodera et al.: 'Bidirectional Intra Prediction' ITU - Telecommunications Standardization Sector STUDY GROUP 16 Question 6 Video Coding Experts Group VCEG-AE14, 200701, pp.1-6, 31st Meeting: Marrakech, MA *
JPN6015027964; 塩寺大一郎 他: 'ブロックベース外挿/内挿予測に基づくイントラ符号化' 2006年画像符号化シンポジウム(PCSJ2006) P-5.19, 200611, pp.123-124 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9699459B2 (en) 2007-10-10 2017-07-04 Hitachi Maxell, Ltd. Image encoding apparatus, image encoding method, image decoding apparatus, and image decoding method

Also Published As

Publication number Publication date
JP5887013B2 (en) 2016-03-16

Similar Documents

Publication Publication Date Title
JP2009094828A (en) Device and method for encoding image, and device and method for decoding image
JP5400798B2 (en) Moving picture decoding method and apparatus, moving picture encoding method and apparatus
JP2007013298A (en) Image coding apparatus
JP5887012B2 (en) Image decoding method
JP5886922B2 (en) Image decoding method
JP2017103810A (en) Moving picture decoding method
JP5887013B2 (en) Image decoding method
JP5891333B2 (en) Image decoding method
JP6176044B2 (en) Block structure determination circuit and information compression circuit
JP5690898B2 (en) Image decoding method
JP5422681B2 (en) Image decoding method
JP2009049969A (en) Device and method of coding moving image and device and method of decoding moving image
JP2016129391A (en) Image decoding method
KR20130050534A (en) Methods of encoding using hadamard transform and apparatuses using the same

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150911

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20150911

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20151008

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151020

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151218

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160126

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160212

R150 Certificate of patent or registration of utility model

Ref document number: 5887013

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250