JP2014135742A - Image processing device and method, and recording medium - Google Patents

Image processing device and method, and recording medium Download PDF

Info

Publication number
JP2014135742A
JP2014135742A JP2014030815A JP2014030815A JP2014135742A JP 2014135742 A JP2014135742 A JP 2014135742A JP 2014030815 A JP2014030815 A JP 2014030815A JP 2014030815 A JP2014030815 A JP 2014030815A JP 2014135742 A JP2014135742 A JP 2014135742A
Authority
JP
Japan
Prior art keywords
unit
pixel
intra prediction
image
pixels
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
JP2014030815A
Other languages
Japanese (ja)
Other versions
JP5776804B2 (en
Inventor
Kazufumi Sato
数史 佐藤
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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2014030815A priority Critical patent/JP5776804B2/en
Publication of JP2014135742A publication Critical patent/JP2014135742A/en
Application granted granted Critical
Publication of JP5776804B2 publication Critical patent/JP5776804B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To enable encoding efficiency in intra prediction to be improved.SOLUTION: In the event that the optimal intra prediction mode is mode 0, adjacent pixels to be used for prediction of the target block are pixels A0, A1, A2, and A3. According to these pixels and a 6-tap FIR filter, pixels a-0.5, a+0.5, and so on with 1/2 pixel precision are generated, and further, pixels a-0.75, a-0.25, a+0.25, and a+0.75 with 1/4 pixel precision are generated by linear interpolation. Subsequently, the optimal shift amount is determined with a value of -0.75 through +0.75 that is phase difference between an integer pixel and generated fractional pixel precision serving as a candidate of the shift amount in the horizontal direction. The present invention may be applied to an image encoding device which performs encoding using the H.264/AVC system, for example.

Description

本発明は画像処理装置および方法、並びに記録媒体に関し、特に、イントラ予測における符号化効率を向上させるようにした画像処理装置および方法、並びに記録媒体に関する。   The present invention relates to an image processing apparatus and method, and a recording medium, and more particularly, to an image processing apparatus and method, and a recording medium that improve encoding efficiency in intra prediction.

近年、画像情報をデジタルとして取り扱い、その際、効率の高い情報の伝送、蓄積を目的とし、画像情報特有の冗長性を利用して、離散コサイン変換等の直交変換と動き補償により圧縮する符号化方式を採用して画像を圧縮符号する装置が普及しつつある。この符号化方式には、例えば、MPEG(Moving Picture Experts Group)などがある。   In recent years, image information has been handled as digital data, and at that time, for the purpose of efficient transmission and storage of information, encoding is performed by orthogonal transform such as discrete cosine transform and motion compensation using redundancy unique to image information. An apparatus that employs a method to compress and code an image is becoming widespread. This encoding method includes, for example, MPEG (Moving Picture Experts Group).

特に、MPEG2(ISO/IEC 13818-2)は、汎用画像符号化方式として定義されており、飛び越し走査画像及び順次走査画像の双方、並びに標準解像度画像及び高精細画像を網羅する標準である。例えば、MPEG2は、プロフェッショナル用途及びコンシューマ用途の広範なアプリケーションに現在広く用いられている。MPEG2圧縮方式を用いることにより、例えば720×480画素を持つ標準解像度の飛び越し走査画像であれば4乃至8Mbpsの符号量(ビットレート)が割り当てられる。また、MPEG2圧縮方式を用いることにより、例えば1920×1088画素を持つ高解像度の飛び越し走査画像であれば18乃至22 Mbpsの符号量(ビットレート)が割り当てられる。これにより、高い圧縮率と良好な画質の実現が可能である。   In particular, MPEG2 (ISO / IEC 13818-2) is defined as a general-purpose image coding system, and is a standard that covers both interlaced scanning images and progressive scanning images, as well as standard resolution images and high-definition images. For example, MPEG2 is currently widely used in a wide range of applications for professional and consumer applications. By using the MPEG2 compression method, for example, a code amount (bit rate) of 4 to 8 Mbps is assigned to an interlaced scanned image having a standard resolution of 720 × 480 pixels. Further, by using the MPEG2 compression method, for example, in the case of a high-resolution interlaced scanned image having 1920 × 1088 pixels, a code amount (bit rate) of 18 to 22 Mbps is allocated. As a result, a high compression rate and good image quality can be realized.

MPEG2は主として放送用に適合する高画質符号化を対象としていたが、MPEG1より低い符号量(ビットレート)、つまりより高い圧縮率の符号化方式には対応していなかった。携帯端末の普及により、今後そのような符号化方式のニーズは高まると思われ、これに対応してMPEG4符号化方式の標準化が行われた。画像符号化方式に関しては、1998年12月にISO/IEC 14496-2としてその規格が国際標準に承認された。   MPEG2 was mainly intended for high-quality encoding suitable for broadcasting, but did not support encoding methods with a lower code amount (bit rate) than MPEG1, that is, a higher compression rate. With the widespread use of mobile terminals, the need for such an encoding system is expected to increase in the future, and the MPEG4 encoding system has been standardized accordingly. Regarding the image coding system, the standard was approved as an international standard as ISO / IEC 14496-2 in December 1998.

さらに、近年、当初テレビ会議用の画像符号化を目的として、H.26L (ITU-T Q6/16 VCEG)という標準の規格化が進んでいる。H.26LはMPEG2やMPEG4といった従来の符号化方式に比べ、その符号化、復号化により多くの演算量が要求されるものの、より高い符号化効率が実現されることが知られている。また、現在、MPEG4の活動の一環として、このH.26Lをベースに、H.26Lではサポートされない機能をも取り入れ、より高い符号化効率を実現する標準化がJoint Model of Enhanced-Compression Video Codingとして行われている。標準化のスケジュールとしては、2003年3月にはH.264及びMPEG-4 Part10 (Advanced Video Coding、以下H.264/AVCと記す)という国際標準となっている。   Furthermore, in recent years, for the purpose of image coding for the initial video conference, The standardization of 26L (ITU-T Q6 / 16 VCEG) is in progress. H. 26L is known to achieve higher encoding efficiency than the conventional encoding schemes such as MPEG2 and MPEG4, although a large amount of calculation is required for encoding and decoding. In addition, as part of MPEG4 activities, this H. Based on 26L, H. Standardization to achieve higher coding efficiency by incorporating functions not supported by 26L is being carried out as Joint Model of Enhanced-Compression Video Coding. As for the standardization schedule, H. H.264 and MPEG-4 Part10 (Advanced Video Coding, hereinafter referred to as H.264 / AVC).

さらに、その拡張として、RGBや4:2:2、4:4:4といった、業務用に必要な符号化ツールや、MPEG-2で規定されていた8x8DCTや量子化マトリクスをも含んだFRExt (Fidelity Range Extension) の標準化が2005年2月に完了している。これにより、H.264/AVCを用いて、映画に含まれるフィルムノイズをも良好に表現することが可能な符号化方式となって、Blu-Ray Disc(商標)等の幅広いアプリケーションに用いられる運びとなった。   As an extension, FRExt (including RGB, 4: 2: 2, 4: 4: 4 coding tools necessary for business use, 8x8DCT and quantization matrix specified by MPEG-2) Fidelity Range Extension) standardization was completed in February 2005. As a result, H.C. Using 264 / AVC, it became an encoding method that can express film noise contained in movies well, and it has been used in a wide range of applications such as Blu-Ray Disc (trademark).

しかしながら、昨今、ハイビジョン画像の4倍の、4000×2000画素程度の画像を圧縮したいといった、更なる高圧縮率符号化に対するニーズが高まっている。あるいは、インターネットのような、限られた伝送容量の環境において、ハイビジョン画像を配信したいといった、更なる高圧縮率符号化に対するニーズが高まっている。このため、先述の、ITU-T傘下のVCEG (=Video Coding Expert Group) において、符号化効率の改善に関する検討が継続され行なわれている。   However, nowadays, there is an increasing need for further high-compression encoding such as wanting to compress an image of about 4000 × 2000 pixels, which is four times the high-definition image. Alternatively, there is a growing need for further high compression rate encoding such as the desire to deliver high-definition images in an environment with a limited transmission capacity such as the Internet. For this reason, in the above-mentioned VCEG (= Video Coding Expert Group) under the ITU-T, studies on improving the coding efficiency are being continued.

例えば、MPEG2方式においては、線形内挿処理により1/2画素精度の動き予測・補償処理が行われている。一方、H.264/AVC方式においては、6タップのFIR (Finite Impulse Response Filter)フィルタを用いた1/4画素精度の予測・補償処理が行われている。   For example, in the MPEG2 system, motion prediction / compensation processing with 1/2 pixel accuracy is performed by linear interpolation processing. On the other hand, H. In the H.264 / AVC format, prediction / compensation processing with 1/4 pixel accuracy using a 6-tap FIR (Finite Impulse Response Filter) filter is performed.

この1/4画素精度の予測・補償処理に対して、近年、H.264/AVC方式の効率をさらに向上させようという検討が行われている。このための符号化方式の1つとして、非特許文献1においては、1/8画素精度の動き予測が提案されている。   In recent years, the H.264 pixel accuracy prediction / compensation process has been developed. Studies are underway to further improve the efficiency of the H.264 / AVC format. As one encoding method for this purpose, Non-Patent Document 1 proposes motion prediction with 1/8 pixel accuracy.

すなわち、非特許文献1において、1/2画素精度の補間処理はフィルタ[-3,12,-39,158,158,-39,12,-3]/256により行われる。また、1/4画素精度の補間処理はフィルタ[-3,12,-37,229,71,-21,6,-1]/256により行われ、1/8画素精度の補間処理は線形補間により行われる。   That is, in Non-Patent Document 1, the interpolation process with 1/2 pixel accuracy is performed by the filter [−3,12, −39,158,158, −39,12, −3] / 256. The interpolation processing with 1/4 pixel accuracy is performed by the filter [-3,12, -37,229,71, -21,6, -1] / 256, and the interpolation processing with 1/8 pixel accuracy is performed by linear interpolation. Is called.

このように、より高い画素精度の補間処理を用いた動き予測を行うことにより、特に、解像度が高いテクスチャを持ち、比較的ゆっくりした動きのシーケンスにおいては、予測精度を向上させ、符号化効率の向上を実現することができる。   In this way, by performing motion prediction using interpolation processing with higher pixel accuracy, it is possible to improve prediction accuracy and improve coding efficiency, particularly in a relatively slow motion sequence having a texture with high resolution. Improvements can be realized.

ところで、H.264/AVC方式が、従来のMPEG2方式などに比して高い符号化効率を実現する要因の1つとして、次に説明するイントラ予測方式の採用が挙げられる。   H. One of the factors that realize the high encoding efficiency of the H.264 / AVC format compared to the conventional MPEG2 format is the adoption of the intra prediction method described below.

H.264/AVC方式において、輝度信号については、9種類の4×4画素および8×8画素のブロック単位、並びに4種類の16×16画素のマクロブロック単位のイントラ予測モードが定められている。色差信号については、4種類の8×8画素のブロック単位のイントラ予測モードが定められている。色差信号のイントラ予測モードは、輝度信号のイントラ予測モードと独立に設定が可能である。なお、予測モードの種類は、図1の番号0,1,3乃至8で示される方向に対応している。予測モード2は平均値予測である。   H. In the H.264 / AVC format, nine types of 4 × 4 pixel and 8 × 8 pixel block units and four types of 16 × 16 pixel macroblock unit intra prediction modes are defined for luminance signals. For color difference signals, four types of 8 × 8 pixel block-unit intra prediction modes are defined. The color difference signal intra prediction mode can be set independently of the luminance signal intra prediction mode. Note that the types of prediction modes correspond to the directions indicated by the numbers 0, 1, 3 to 8 in FIG. Prediction mode 2 is average value prediction.

このようなイントラ予測方式が採用されることで、予測精度の向上が実現されている。しかしながら、H.264/AVC方式においては、図1の方向に示されるように、22.5°単位でのイントラ予測しか行われない。したがって、エッジの傾きが、それ以外の角度の場合、符号化効率の向上が制限されてしまう。   By adopting such an intra prediction method, improvement in prediction accuracy is realized. However, H.C. In the H.264 / AVC format, as shown in the direction of FIG. 1, only intra prediction in units of 22.5 ° is performed. Therefore, when the inclination of the edge is other than that, the improvement of the encoding efficiency is limited.

そこで、さらなる符号化効率の改善のため、非特許文献2においては、22.5°の単位よりも細かい角度で予測を行う提案がなされている。   Therefore, in order to further improve the coding efficiency, Non-Patent Document 2 proposes that prediction is performed at an angle smaller than the unit of 22.5 °.

”Motion compensated prediction with 1/8-pel displacement vector resolution”,VCEG-AD09,ITU-Telecommunications Standardization Sector STUDY GROUP Question 6 Video coding Experts Group(VCEG), 23-27 Oct 2006“Motion compensated prediction with 1 / 8-pel displacement vector resolution”, VCEG-AD09, ITU-Telecommunications Standardization Sector STUDY GROUP Question 6 Video coding Experts Group (VCEG), 23-27 Oct 2006 Virginie Drugeon, Thomas Wedi, and Torsten Palfner ,”High Precision Edge Prediction for Intra Coding”, 2008Virginie Drugeon, Thomas Wedi, and Torsten Palfner, “High Precision Edge Prediction for Intra Coding”, 2008

しかしながら、H.264/AVC方式のイントラ予測では、予測に、符号化対象となるブロックの所定の隣接画素が用いられるのに対して、非特許文献2に記載の提案では、符号化対象となるブロックの隣接画素以外の画素も予測に用いなければならない。   However, H.C. In the intra prediction of the H.264 / AVC method, a predetermined adjacent pixel of the block to be encoded is used for the prediction, whereas in the proposal described in Non-Patent Document 2, the adjacent pixel of the block to be encoded is used. Other pixels must also be used for prediction.

したがって、非特許文献2に記載の提案では、22.5°の単位よりも細かい角度で予測を行ったとしても、メモリアクセス回数や処理が増大してしまう。   Therefore, in the proposal described in Non-Patent Document 2, even if the prediction is performed at an angle smaller than the unit of 22.5 °, the number of memory accesses and the processing increase.

本発明は、このような状況に鑑みてなされたものであり、メモリアクセス回数や処理を増大させることなく、イントラ予測における符号化効率をさらに向上させるものである。   The present invention has been made in view of such a situation, and further improves the encoding efficiency in intra prediction without increasing the number of memory accesses and processing.

本発明の一側面の画像処理装置は、符号化処理する画像を対象として、符号化処理の対象となる対象ブロックの画素に対してイントラ予測を行う際に参照する隣接画素を蓄積するメモリと、前記対象ブロックの画素に対してイントラ予測を行う際の予測方向とブロックサイズとに応じて、前記メモリから読み出した隣接画素の位相をシフトさせるか、前記メモリから読み出した隣接画素の位相をシフトさせないかを選択する選択部と、前記隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行い、予測画像を生成するイントラ予測部と、前記イントラ予測部により生成された予測画像を用いて、前記画像を符号化処理する符号化部とを備える。   An image processing apparatus according to an aspect of the present invention is directed to an image to be encoded, a memory that accumulates adjacent pixels that are referred to when performing intra prediction on pixels of a target block that is an object of encoding processing, The phase of adjacent pixels read from the memory is shifted or the phase of adjacent pixels read from the memory is not shifted according to the prediction direction and block size when performing intra prediction on the pixels of the target block. A selection unit that selects the image, an intra prediction unit that performs intra prediction on the pixel of the target block using the adjacent pixel, and generates a prediction image, and a prediction image generated by the intra prediction unit And an encoding unit for encoding the image.

前記イントラ予測部は、前記選択部により前記メモリから読み出した隣接画素の位相がシフトさせると選択された場合に、位相がシフトされた隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行うことができる。   When the selection unit selects that the phase of the adjacent pixel read from the memory is shifted, the intra prediction unit uses the adjacent pixel whose phase is shifted to perform intra prediction on the pixel of the target block. It can be performed.

前記イントラ予測部は、前記選択部により前記メモリから読み出した隣接画素の位相がシフトさせないと選択された場合に、位相がシフトされなかった隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行うことができる。   When the selection unit selects that the phase of the adjacent pixel read from the memory is not shifted, the intra prediction unit uses the adjacent pixel whose phase has not been shifted to the intra of the pixel of the target block. Predictions can be made.

本発明の一側面の画像処理方法は、画像処理装置が、符号化処理する画像を対象として、符号化処理の対象となる対象ブロックの画素に対してイントラ予測を行う際の予測方向とブロックサイズとに応じて、前記対象ブロックの画素に対してイントラ予測を行う際に参照する隣接画素を蓄積するメモリから読み出した隣接画素の位相をシフトさせるか、前記メモリから読み出した隣接画素の位相をシフトさせないかを選択し、前記隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行い、予測画像を生成し、生成された予測画像を用いて、前記画像を符号化処理する。   An image processing method according to an aspect of the present invention is directed to a prediction direction and a block size when an image processing apparatus performs intra prediction on a pixel of a target block that is a target of encoding processing for an image to be encoded. In response to this, the phase of the adjacent pixel read from the memory that stores the adjacent pixel to be referred to when performing intra prediction on the pixel of the target block is shifted, or the phase of the adjacent pixel read from the memory is shifted. Whether to perform the intra prediction on the pixels of the target block using the adjacent pixels, generates a prediction image, and encodes the image using the generated prediction image.

前記メモリから読み出した隣接画素の位相がシフトさせると選択された場合に、位相がシフトされた隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行うことができる。   When it is selected that the phase of the adjacent pixel read from the memory is shifted, intra prediction can be performed on the pixel of the target block using the adjacent pixel whose phase is shifted.

前記メモリから読み出した隣接画素の位相がシフトさせないと選択された場合に、位相がシフトされなかった隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行うことができる。   When it is selected that the phase of the adjacent pixel read from the memory is not shifted, intra prediction can be performed on the pixel of the target block using the adjacent pixel whose phase is not shifted.

本発明の一側面の記録媒体は、本発明の一側面の画像処理装置により生成された符号化ストリームを記録した記録媒体である。   A recording medium according to one aspect of the present invention is a recording medium that records an encoded stream generated by the image processing apparatus according to one aspect of the present invention.

本発明の一側面においては、符号化処理する画像を対象として、符号化処理の対象となる対象ブロックの画素に対してイントラ予測を行う際の予測方向とブロックサイズとに応じて、前記対象ブロックの画素に対してイントラ予測を行う際に参照する隣接画素を蓄積するメモリから読み出した隣接画素の位相をシフトさせるか、前記メモリから読み出した隣接画素の位相をシフトさせないかが選択される。そして、前記隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測が行われ、予測画像が生成され、生成された予測画像を用いて、前記画像が符号化処理される。   In one aspect of the present invention, for an image to be encoded, the target block is selected according to a prediction direction and a block size when performing intra prediction on pixels of the target block to be encoded. It is selected whether to shift the phase of the adjacent pixel read from the memory that stores the adjacent pixel to be referred to when intra prediction is performed on this pixel, or not to shift the phase of the adjacent pixel read from the memory. Then, intra prediction is performed on the pixels of the target block using the adjacent pixels, a predicted image is generated, and the image is encoded using the generated predicted image.

なお、上述の画像処理装置のそれぞれは、独立した装置であっても良いし、1つの画像符号化装置または画像復号装置を構成している内部ブロックであってもよい。   Note that each of the above-described image processing apparatuses may be an independent apparatus, or may be an internal block constituting one image encoding apparatus or image decoding apparatus.

本発明によれば、イントラ予測により予測画像を生成することができる。また、本発明によれば、メモリアクセス回数や処理を増大させることなく、符号化効率を向上させることができる。   According to the present invention, a prediction image can be generated by intra prediction. Further, according to the present invention, it is possible to improve the encoding efficiency without increasing the number of memory accesses or processing.

4×4画素のイントラ予測の方向を説明する図である。It is a figure explaining the direction of 4 * 4 pixel intra prediction. 本発明を適用した画像符号化装置の一実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of one Embodiment of the image coding apparatus to which this invention is applied. 1/4画素精度の動き予測・補償処理を説明する図である。It is a figure explaining the motion prediction / compensation process of 1/4 pixel precision. マルチ参照フレームの動き予測・補償方式について説明する図である。It is a figure explaining the motion prediction and compensation system of a multi reference frame. 動きベクトル情報の生成方法の例を説明する図である。It is a figure explaining the example of the production | generation method of motion vector information. イントラ予測部および隣接画素内挿部の構成例を示すブロック図である。It is a block diagram which shows the structural example of an intra estimation part and an adjacent pixel interpolation part. 図2の画像符号化装置の符号化処理を説明するフローチャートである。3 is a flowchart for describing an encoding process of the image encoding device in FIG. 2. 図7のステップS21の予測処理を説明するフローチャートである。It is a flowchart explaining the prediction process of step S21 of FIG. 16×16画素のイントラ予測モードの場合の処理順序を説明する図である。It is a figure explaining the processing order in the case of 16 * 16 pixel intra prediction mode. 輝度信号の4×4画素のイントラ予測モードの種類を示す図である。It is a figure which shows the kind of 4 * 4 pixel intra prediction mode of a luminance signal. 輝度信号の4×4画素のイントラ予測モードの種類を示す図である。It is a figure which shows the kind of 4 * 4 pixel intra prediction mode of a luminance signal. 4×4画素のイントラ予測の方向を説明する図である。It is a figure explaining the direction of 4 * 4 pixel intra prediction. 4×4画素のイントラ予測を説明する図である。It is a figure explaining intra prediction of 4x4 pixels. 輝度信号の4×4画素のイントラ予測モードの符号化を説明する図である。It is a figure explaining encoding of the 4 * 4 pixel intra prediction mode of a luminance signal. 輝度信号の16×16画素のイントラ予測モードの種類を示す図である。It is a figure which shows the kind of 16 * 16 pixel intra prediction mode of a luminance signal. 輝度信号の16×16画素のイントラ予測モードの種類を示す図である。It is a figure which shows the kind of 16 * 16 pixel intra prediction mode of a luminance signal. 16×16画素のイントラ予測を説明する図である。It is a figure explaining the 16 * 16 pixel intra prediction. 小数画素精度のイントラ予測を実現するための動作を説明する図である。It is a figure explaining the operation | movement for implement | achieving the intra prediction of decimal pixel precision. 小数画素精度のイントラ予測の効果例を説明する図である。It is a figure explaining the example of an effect of intra prediction of decimal pixel accuracy. 図8のステップS31のイントラ予測処理を説明するフローチャートである。It is a flowchart explaining the intra prediction process of step S31 of FIG. 図20のステップS45の隣接画素内挿処理を説明するフローチャートである。It is a flowchart explaining the adjacent pixel interpolation process of step S45 of FIG. 図8のステップS32のインター動き予測処理を説明するフローチャートである。It is a flowchart explaining the inter motion prediction process of step S32 of FIG. イントラ予測部および隣接画素内挿部の他の構成例を示すブロック図である。It is a block diagram which shows the other structural example of an intra estimation part and an adjacent pixel interpolation part. 図8のステップS31のイントラ予測処理の他の例を説明するフローチャートである。It is a flowchart explaining the other example of the intra prediction process of FIG.8 S31. 図24のステップS101の隣接画素内挿処理を説明するフローチャートである。It is a flowchart explaining the adjacent pixel interpolation process of step S101 of FIG. 本発明を適用した画像復号装置の一実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of one Embodiment of the image decoding apparatus to which this invention is applied. イントラ予測部および隣接画素内挿部の他の構成例を示すブロック図である。It is a block diagram which shows the other structural example of an intra estimation part and an adjacent pixel interpolation part. 図26の画像復号装置の復号処理を説明するフローチャートである。It is a flowchart explaining the decoding process of the image decoding apparatus of FIG. 図28のステップS138の予測処理を説明するフローチャートである。It is a flowchart explaining the prediction process of step S138 of FIG. コンピュータのハードウエアの構成例を示すブロック図である。It is a block diagram which shows the structural example of the hardware of a computer.

以下、図を参照して本発明の実施の形態について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

[画像符号化装置の構成例]
図2は、本発明を適用した画像処理装置としての画像符号化装置の一実施の形態の構成を表している。
[Configuration Example of Image Encoding Device]
FIG. 2 shows a configuration of an embodiment of an image encoding apparatus as an image processing apparatus to which the present invention is applied.

この画像符号化装置51は、例えば、H.264及びMPEG-4 Part10(Advanced Video Coding)(以下H.264/AVCと記す)方式で画像を圧縮符号化する。   This image encoding device 51 is, for example, H.264. 264 and MPEG-4 Part 10 (Advanced Video Coding) (hereinafter referred to as H.264 / AVC) format is used for compression coding.

図2の例において、画像符号化装置51は、A/D変換部61、画面並べ替えバッファ62、演算部63、直交変換部64、量子化部65、可逆符号化部66、蓄積バッファ67、逆量子化部68、逆直交変換部69、演算部70、デブロックフィルタ71、フレームメモリ72、スイッチ73、イントラ予測部74、隣接画素内挿部75、動き予測・補償部76、予測画像選択部77、およびレート制御部78により構成されている。   In the example of FIG. 2, the image encoding device 51 includes an A / D conversion unit 61, a screen rearrangement buffer 62, a calculation unit 63, an orthogonal transformation unit 64, a quantization unit 65, a lossless encoding unit 66, a storage buffer 67, Inverse quantization unit 68, inverse orthogonal transform unit 69, operation unit 70, deblock filter 71, frame memory 72, switch 73, intra prediction unit 74, adjacent pixel interpolation unit 75, motion prediction / compensation unit 76, prediction image selection The unit 77 and the rate control unit 78 are configured.

A/D変換部61は、入力された画像をA/D変換し、画面並べ替えバッファ62に出力し、記憶させる。画面並べ替えバッファ62は、記憶した表示の順番のフレームの画像を、GOP(Group of Picture)に応じて、符号化のためのフレームの順番に並べ替える。   The A / D conversion unit 61 performs A / D conversion on the input image, outputs it to the screen rearrangement buffer 62, and stores it. The screen rearrangement buffer 62 rearranges the stored frame images in the display order in the order of frames for encoding in accordance with GOP (Group of Picture).

演算部63は、画面並べ替えバッファ62から読み出された画像から、予測画像選択部77により選択されたイントラ予測部74からの予測画像または動き予測・補償部76からの予測画像を減算し、その差分情報を直交変換部64に出力する。直交変換部64は、演算部63からの差分情報に対して、離散コサイン変換、カルーネン・レーベ変換等の直交変換を施し、その変換係数を出力する。量子化部65は直交変換部64が出力する変換係数を量子化する。   The calculation unit 63 subtracts the prediction image from the intra prediction unit 74 or the prediction image from the motion prediction / compensation unit 76 selected by the prediction image selection unit 77 from the image read from the screen rearrangement buffer 62, The difference information is output to the orthogonal transform unit 64. The orthogonal transform unit 64 subjects the difference information from the calculation unit 63 to orthogonal transform such as discrete cosine transform and Karhunen-Loeve transform, and outputs the transform coefficient. The quantization unit 65 quantizes the transform coefficient output from the orthogonal transform unit 64.

量子化部65の出力となる、量子化された変換係数は、可逆符号化部66に入力され、ここで可変長符号化、算術符号化等の可逆符号化が施され、圧縮される。   The quantized transform coefficient that is the output of the quantization unit 65 is input to the lossless encoding unit 66, where lossless encoding such as variable length encoding and arithmetic encoding is performed and compressed.

可逆符号化部66は、イントラ予測を示す情報などをイントラ予測部74から取得し、インター予測モードを示す情報などを動き予測・補償部76から取得する。なお、イントラ予測を示す情報は、以下、イントラ予測モード情報とも称する。また、インター予測を示す情報モードを示す情報は、以下、インター予測モード情報とも称する。   The lossless encoding unit 66 acquires information indicating intra prediction from the intra prediction unit 74 and acquires information indicating inter prediction mode from the motion prediction / compensation unit 76. Note that information indicating intra prediction is hereinafter also referred to as intra prediction mode information. In addition, information indicating an information mode indicating inter prediction is hereinafter also referred to as inter prediction mode information.

可逆符号化部66は、量子化された変換係数を符号化するとともに、イントラ予測を示す情報やインター予測モードを示す情報などを符号化し、圧縮画像におけるヘッダ情報の一部とする。可逆符号化部66は、符号化したデータを蓄積バッファ67に供給して蓄積させる。   The lossless encoding unit 66 encodes the quantized transform coefficient and also encodes information indicating intra prediction, information indicating inter prediction mode, and the like, and uses it as a part of header information in the compressed image. The lossless encoding unit 66 supplies the encoded data to the accumulation buffer 67 for accumulation.

例えば、可逆符号化部66においては、可変長符号化または算術符号化等の可逆符号化処理が行われる。可変長符号化としては、H.264/AVC方式で定められているCAVLC(Context-Adaptive Variable Length Coding)などがあげられる。算術符号化としては、CABAC(Context-Adaptive Binary Arithmetic Coding)などがあげられる。   For example, the lossless encoding unit 66 performs lossless encoding processing such as variable length encoding or arithmetic encoding. Examples of variable length coding include H.264. CAVLC (Context-Adaptive Variable Length Coding) defined in H.264 / AVC format. Examples of arithmetic coding include CABAC (Context-Adaptive Binary Arithmetic Coding).

蓄積バッファ67は、可逆符号化部66から供給されたデータを、H.264/AVC方式で符号化された圧縮画像として、例えば、後段の図示せぬ記録装置や伝送路などに出力する。   The accumulation buffer 67 converts the data supplied from the lossless encoding unit 66 to H.264. As a compressed image encoded by the H.264 / AVC format, for example, it is output to a recording device or a transmission path (not shown) in the subsequent stage.

また、量子化部65より出力された、量子化された変換係数は、逆量子化部68にも入力され、逆量子化された後、さらに逆直交変換部69において逆直交変換される。逆直交変換された出力は演算部70により予測画像選択部77から供給される予測画像と加算されて、局部的に復号された画像となる。デブロックフィルタ71は、復号された画像のブロック歪を除去した後、フレームメモリ72に供給し、蓄積させる。フレームメモリ72には、デブロックフィルタ71によりデブロックフィルタ処理される前の画像も供給され、蓄積される。   Further, the quantized transform coefficient output from the quantization unit 65 is also input to the inverse quantization unit 68, and after inverse quantization, the inverse orthogonal transform unit 69 further performs inverse orthogonal transform. The output subjected to the inverse orthogonal transform is added to the predicted image supplied from the predicted image selection unit 77 by the calculation unit 70, and becomes a locally decoded image. The deblocking filter 71 removes block distortion from the decoded image, and then supplies the deblocking filter 71 to the frame memory 72 for accumulation. The image before the deblocking filter processing by the deblocking filter 71 is also supplied to the frame memory 72 and accumulated.

スイッチ73はフレームメモリ72に蓄積された参照画像を動き予測・補償部76またはイントラ予測部74に出力する。   The switch 73 outputs the reference image stored in the frame memory 72 to the motion prediction / compensation unit 76 or the intra prediction unit 74.

この画像符号化装置51においては、例えば、画面並べ替えバッファ62からのIピクチャ、Bピクチャ、およびPピクチャが、イントラ予測(イントラ処理とも称する)する画像として、イントラ予測部74に供給される。また、画面並べ替えバッファ62から読み出されたBピクチャおよびPピクチャが、インター予測(インター処理とも称する)する画像として、動き予測・補償部76に供給される。   In the image encoding device 51, for example, the I picture, the B picture, and the P picture from the screen rearrangement buffer 62 are supplied to the intra prediction unit 74 as images for intra prediction (also referred to as intra processing). Further, the B picture and the P picture read from the screen rearrangement buffer 62 are supplied to the motion prediction / compensation unit 76 as an image to be inter predicted (also referred to as inter processing).

イントラ予測部74は、画面並べ替えバッファ62から読み出されたイントラ予測する画像とフレームメモリ72から供給された参照画像に基づいて、候補となる全てのイントラ予測モードのイントラ予測処理を行い、予測画像を生成する。   The intra prediction unit 74 performs intra prediction processing of all candidate intra prediction modes based on the image to be intra predicted read from the screen rearrangement buffer 62 and the reference image supplied from the frame memory 72, and performs prediction. Generate an image.

イントラ予測部74は、予測画像を生成したイントラ予測モードに対してコスト関数値を算出し、算出したコスト関数値が最小値を与えるイントラ予測モードを、最適イントラ予測モードとして選択する。イントラ予測部74は、イントラ予測する対象ブロックの隣接画素と、最適イントラ予測モードの情報を、隣接画素内挿部75に供給する。   The intra prediction unit 74 calculates a cost function value for the intra prediction mode in which the predicted image is generated, and selects an intra prediction mode in which the calculated cost function value gives the minimum value as the optimal intra prediction mode. The intra prediction unit 74 supplies the adjacent pixel of the target block to be intra-predicted and the information of the optimal intra prediction mode to the adjacent pixel interpolation unit 75.

隣接画素内挿部75は、イントラ予測部74からの最適イントラ予測モードに応じたシフト方向に、候補となるシフト量で、隣接画素の位相をシフトさせる。実際には、隣接画素内挿部75は、最適イントラ予測モードに応じたシフト方向について、隣接画素に対して、6タップのFIRフィルタをかけ、線形内挿することで、隣接画素の位相を、小数画素精度にシフトさせる。したがって、以下、説明の便宜上、6タップのFIRフィルタおよび線形内挿により位相がシフトされた隣接画素を、内挿された隣接画素または位相がシフトされた隣接画素と適宜説明するが、それらは同意である。   The adjacent pixel interpolation unit 75 shifts the phase of the adjacent pixel in the shift direction according to the optimal intra prediction mode from the intra prediction unit 74 by a candidate shift amount. Actually, the adjacent pixel interpolation unit 75 applies a 6-tap FIR filter to the adjacent pixels in the shift direction corresponding to the optimal intra prediction mode, and linearly interpolates the adjacent pixels to obtain the phase of the adjacent pixels. Shift to decimal pixel accuracy. Therefore, for convenience of explanation, adjacent pixels whose phases are shifted by a 6-tap FIR filter and linear interpolation will be appropriately described as adjacent pixels that have been interpolated or whose phases have been shifted, but they agree. It is.

隣接画素内挿部75は、位相がシフトされた隣接画素を、イントラ予測部74に供給する。   The adjacent pixel interpolation unit 75 supplies the adjacent pixel whose phase has been shifted to the intra prediction unit 74.

イントラ予測部74は、隣接画像バッファ81からの隣接画素の画素値および隣接画素内挿部75により位相がシフトされた隣接画素の画素値を用いて、隣接画素に対して位相の最適シフト量を決定する。また、イントラ予測部74は、決定した最適シフト量で位相がシフトされた隣接画素の画素値を用いて、対象ブロックの予測画像を生成し、生成された予測画像と、対応する最適イントラ予測モードについて算出されたコスト関数値を、予測画像選択部77に供給する。   The intra prediction unit 74 uses the pixel value of the adjacent pixel from the adjacent image buffer 81 and the pixel value of the adjacent pixel whose phase is shifted by the adjacent pixel interpolation unit 75 to calculate the optimum phase shift amount for the adjacent pixel. decide. Further, the intra prediction unit 74 generates a predicted image of the target block using the pixel value of the adjacent pixel whose phase is shifted by the determined optimal shift amount, and the generated predicted image and the corresponding optimal intra prediction mode. The cost function value calculated for is supplied to the predicted image selection unit 77.

イントラ予測部74は、予測画像選択部77により最適イントラ予測モードで生成された予測画像が選択された場合、最適イントラ予測モードを示す情報と最適シフト量の情報を、可逆符号化部66に供給する。可逆符号化部66は、イントラ予測部74から情報が送られてきた場合には、この情報を符号化し、圧縮画像におけるヘッダ情報の一部とする。   When the predicted image generated in the optimal intra prediction mode is selected by the predicted image selection unit 77, the intra prediction unit 74 supplies information indicating the optimal intra prediction mode and information on the optimal shift amount to the lossless encoding unit 66. To do. When information is sent from the intra prediction unit 74, the lossless encoding unit 66 encodes this information and uses it as a part of header information in the compressed image.

動き予測・補償部76は、候補となる全てのインター予測モードの動き予測・補償処理を行う。すなわち、動き予測・補償部76には、画面並べ替えバッファ62から読み出されたインター処理する画像と、スイッチ73を介してフレームメモリ72から参照画像が供給される。動き予測・補償部76は、インター処理する画像と参照画像に基づいて、候補となる全てのインター予測モードの動きベクトルを検出し、動きベクトルに基づいて参照画像に補償処理を施し、予測画像を生成する。   The motion prediction / compensation unit 76 performs motion prediction / compensation processing for all candidate inter prediction modes. That is, the inter prediction image read from the screen rearrangement buffer 62 and the reference image from the frame memory 72 are supplied to the motion prediction / compensation unit 76 via the switch 73. The motion prediction / compensation unit 76 detects motion vectors of all candidate inter prediction modes based on the inter-processed image and the reference image, performs compensation processing on the reference image based on the motion vector, and obtains the predicted image. Generate.

また、動き予測・補償部76は、候補となる全てのインター予測モードに対してコスト関数値を算出する。動き予測・補償部76は、算出したコスト関数値のうち、最小値を与える予測モードを、最適インター予測モードとして決定する。   Also, the motion prediction / compensation unit 76 calculates cost function values for all candidate inter prediction modes. The motion prediction / compensation unit 76 determines the prediction mode that gives the minimum value among the calculated cost function values as the optimal inter prediction mode.

動き予測・補償部76は、最適インター予測モードで生成された予測画像とそのコスト関数値を、予測画像選択部77に供給する。動き予測・補償部76は、予測画像選択部77により最適インター予測モードで生成された予測画像が選択された場合、最適インター予測モードを示す情報(インター予測モード情報)を可逆符号化部66に出力する。   The motion prediction / compensation unit 76 supplies the predicted image generated in the optimal inter prediction mode and its cost function value to the predicted image selection unit 77. When the predicted image generated in the optimal inter prediction mode is selected by the predicted image selection unit 77, the motion prediction / compensation unit 76 transmits information indicating the optimal inter prediction mode (inter prediction mode information) to the lossless encoding unit 66. Output.

なお、必要であれば、動きベクトル情報、フラグ情報、参照フレーム情報なども可逆符号化部66に出力される。可逆符号化部66は、動き予測・補償部76からの情報をやはり可変長符号化、算術符号化といった可逆符号化処理し、圧縮画像のヘッダ部に挿入する。   If necessary, motion vector information, flag information, reference frame information, and the like are also output to the lossless encoding unit 66. The lossless encoding unit 66 performs lossless encoding processing such as variable length encoding and arithmetic encoding on the information from the motion prediction / compensation unit 76 and inserts the information into the header portion of the compressed image.

予測画像選択部77は、イントラ予測部74または動き予測・補償部76より出力された各コスト関数値に基づいて、最適イントラ予測モードと最適インター予測モードから、最適予測モードを決定する。そして、予測画像選択部77は、決定された最適予測モードの予測画像を選択し、演算部63,70に供給する。このとき、予測画像選択部77は、予測画像の選択情報を、イントラ予測部74または動き予測・補償部76に供給する。   The predicted image selection unit 77 determines an optimal prediction mode from the optimal intra prediction mode and the optimal inter prediction mode based on each cost function value output from the intra prediction unit 74 or the motion prediction / compensation unit 76. Then, the predicted image selection unit 77 selects a predicted image in the determined optimal prediction mode and supplies the selected predicted image to the calculation units 63 and 70. At this time, the predicted image selection unit 77 supplies the prediction image selection information to the intra prediction unit 74 or the motion prediction / compensation unit 76.

レート制御部78は、蓄積バッファ67に蓄積された圧縮画像に基づいて、オーバーフローあるいはアンダーフローが発生しないように、量子化部65の量子化動作のレートを制御する。   The rate control unit 78 controls the rate of the quantization operation of the quantization unit 65 based on the compressed image stored in the storage buffer 67 so that overflow or underflow does not occur.

[H.264/AVC方式の説明]
図3は、H.264/AVC方式における動き予測・補償のブロックサイズの例を示す図である。H.264/AVC方式においては、ブロックサイズを可変にして、動き予測・補償が行われる。
[H. Explanation of H.264 / AVC format]
FIG. 3 is a diagram illustrating an example of a block size for motion prediction / compensation in the H.264 / AVC format. FIG. H. In the H.264 / AVC format, motion prediction / compensation is performed with a variable block size.

図3の上段には、左から、16×16画素、16×8画素、8×16画素、および8×8画素のパーティションに分割された16×16画素で構成されるマクロブロックが順に示されている。また、図3の下段には、左から、8×8画素、8×4画素、4×8画素、および4×4画素のサブパーティションに分割された8×8画素のパーティションが順に示されている。   In the upper part of FIG. 3, macroblocks composed of 16 × 16 pixels divided into 16 × 16 pixels, 16 × 8 pixels, 8 × 16 pixels, and 8 × 8 pixel partitions are sequentially shown from the left. ing. Further, in the lower part of FIG. 3, from the left, 8 × 8 pixel partitions divided into 8 × 8 pixel, 8 × 4 pixel, 4 × 8 pixel, and 4 × 4 pixel subpartitions are sequentially shown. Yes.

すなわち、H.264/AVC方式においては、1つのマクロブロックを、16×16画素、16×8画素、8×16画素、あるいは8×8画素のいずれかのパーティションに分割して、それぞれ独立した動きベクトル情報を持つことが可能である。また、8×8画素のパーティションに関しては、8×8画素、8×4画素、4×8画素、あるいは4×4画素のいずれかのサブパーティションに分割し、それぞれ独立した動きベクトル情報を持つことが可能である。   That is, H. In the H.264 / AVC format, one macroblock is divided into any partition of 16 × 16 pixels, 16 × 8 pixels, 8 × 16 pixels, or 8 × 8 pixels, and independent motion vector information is obtained. It is possible to have. In addition, an 8 × 8 pixel partition is divided into 8 × 8 pixel, 8 × 4 pixel, 4 × 8 pixel, or 4 × 4 pixel subpartitions and has independent motion vector information. Is possible.

図4は、H.264/AVC方式における1/4画素精度の予測・補償処理を説明する図である。H.264/AVC方式においては、6タップのFIR (Finite Impulse Response Filter)フィルタを用いた1/4画素精度の予測・補償処理が行われている。   FIG. It is a figure explaining the prediction and compensation process of the 1/4 pixel precision in a H.264 / AVC system. H. In the H.264 / AVC format, prediction / compensation processing with 1/4 pixel accuracy using a 6-tap FIR (Finite Impulse Response Filter) filter is performed.

図4の例において、位置Aは、整数精度画素の位置、位置b,c,dは、1/2画素精度の位置、位置e1,e2,e3は、1/4画素精度の位置を示している。まず、以下においては、Clip()を次の式(1)のように定義する。   In the example of FIG. 4, the position A is the position of the integer precision pixel, the positions b, c, and d are the positions of the 1/2 pixel precision, and the positions e1, e2, and e3 are the positions of the 1/4 pixel precision. Yes. First, in the following, Clip () is defined as the following equation (1).

Figure 2014135742

なお、入力画像が8ビット精度である場合、max_pixの値は255となる。
Figure 2014135742

When the input image has 8-bit precision, the value of max_pix is 255.

位置bおよびdにおける画素値は、6タップのFIRフィルタを用いて、次の式(2)のように生成される。

Figure 2014135742
The pixel values at the positions b and d are generated by the following equation (2) using a 6-tap FIR filter.

Figure 2014135742

位置cにおける画素値は、水平方向および垂直方向に6タップのFIRフィルタを適用し、次の式(3)のように生成される。

Figure 2014135742

なお、Clip処理は、水平方向および垂直方向の積和処理の両方を行った後、最後に1度のみ実行される。 The pixel value at the position c is generated as in the following Expression (3) by applying a 6-tap FIR filter in the horizontal direction and the vertical direction.

Figure 2014135742

The clip process is executed only once at the end after performing both the horizontal and vertical product-sum processes.

位置e1乃至e3は、次の式(4)のように線形内挿により生成される。

Figure 2014135742
The positions e1 to e3 are generated by linear interpolation as in the following equation (4).

Figure 2014135742

H.264/AVC方式においては、図3および図4を参照して上述した動き予測・補償処理が行われることにより、膨大な動きベクトル情報が生成され、これをこのまま符号化することは、符号化効率の低下を招いてしまう。これに対して、H.264/AVC方式においては、図5に示す方法により、動きベクトルの符号化情報の低減が実現されている。   H. In the H.264 / AVC format, a large amount of motion vector information is generated by performing the motion prediction / compensation process described above with reference to FIG. 3 and FIG. Will be reduced. In contrast, H. In the H.264 / AVC format, motion vector encoding information is reduced by the method shown in FIG.

図5は、H.264/AVC方式による動きベクトル情報の生成方法について説明する図である。   FIG. It is a figure explaining the production | generation method of the motion vector information by a H.264 / AVC system.

図5の例において、これから符号化される対象ブロックE(例えば、16×16画素)と、既に符号化済みであり、対象ブロックEに隣接するブロックA乃至Dが示されている。   In the example of FIG. 5, a target block E to be encoded (for example, 16 × 16 pixels) and blocks A to D that have already been encoded and are adjacent to the target block E are shown.

すなわち、ブロックDは、対象ブロックEの左上に隣接しており、ブロックBは、対象ブロックEの上に隣接しており、ブロックCは、対象ブロックEの右上に隣接しており、ブロックAは、対象ブロックEの左に隣接している。なお、ブロックA乃至Dが区切られていないのは、それぞれ、図2で上述した16×16画素乃至4×4画素のうちのいずれかの構成のブロックであることを表している。   That is, the block D is adjacent to the upper left of the target block E, the block B is adjacent to the upper side of the target block E, the block C is adjacent to the upper right of the target block E, and the block A is , Adjacent to the left of the target block E. It should be noted that the blocks A to D are not divided represent blocks having any one of the 16 × 16 pixels to 4 × 4 pixels described above with reference to FIG.

例えば、X(=A,B,C,D,E)に対する動きベクトル情報を、mvXで表す。まず、対象ブロックEに対する予測動きベクトル情報pmvEは、ブロックA,B,Cに関する動きベクトル情報を用いて、メディアン予測により次の式(5)のように生成される。   For example, motion vector information for X (= A, B, C, D, E) is represented by mvX. First, the predicted motion vector information pmvE for the target block E is generated by the median prediction using the motion vector information regarding the blocks A, B, and C as shown in the following equation (5).

pmvE = med(mvA,mvB,mvC) ・・・(5)

ブロックCに関する動きベクトル情報が、画枠の端であったり、あるいは、まだ符号化されていないなどの理由により、利用可能でない(unavailableである)場合がある。この場合には、ブロックCに関する動きベクトル情報は、ブロックDに関する動きベクトル情報で代用される。
pmvE = med (mvA, mvB, mvC) (5)

The motion vector information related to the block C may be unavailable (unavailable) because it is at the edge of the image frame or is not yet encoded. In this case, the motion vector information regarding the block C is substituted with the motion vector information regarding the block D.

対象ブロックEに対する動きベクトル情報として、圧縮画像のヘッダ部に付加されるデータmvdEは、pmvEを用いて、次の式(6)のように生成される。

mvdE = mvE - pmvE ・・・(6)
Data mvdE added to the header portion of the compressed image as motion vector information for the target block E is generated as shown in the following equation (6) using pmvE.

mvdE = mvE-pmvE (6)

なお、実際には、動きベクトル情報の水平方向、垂直方向のそれぞれの成分に対して、独立に処理が行われる。   Actually, processing is performed independently for each of the horizontal and vertical components of the motion vector information.

このように、予測動きベクトル情報を生成し、隣接するブロックとの相関で生成された予測動きベクトル情報と動きベクトル情報との差分であるデータmvdEを、動きベクトル情報として、圧縮画像のヘッダ部に付加することにより、動きベクトル情報を低減することができる。   As described above, the motion vector information is generated, and the data mvdE that is the difference between the motion vector information and the motion vector information predicted by the correlation with the adjacent block is used as motion vector information in the header portion of the compressed image. By adding, motion vector information can be reduced.

ここで、図4を参照して上述したH.264/AVC方式における1/4画素精度の予測・補償処理は、動き予測・補償部において実行されるが、図2の画像符号化装置51においては、1/4画素精度の予測が、イントラ予測においても行われる。この小数画素精度のイントラ予測は、次に説明するイントラ予測部74および隣接画素内挿部75により実行される。   Here, as described above with reference to FIG. The prediction / compensation processing with 1/4 pixel accuracy in the H.264 / AVC format is executed by the motion prediction / compensation unit. In the image encoding device 51 in FIG. 2, prediction with 1/4 pixel accuracy is performed by intra prediction. Also performed in This intra prediction with decimal pixel accuracy is executed by an intra prediction unit 74 and an adjacent pixel interpolation unit 75 described below.

[イントラ予測部および隣接画素内挿部の構成例]
図6は、イントラ予測部および隣接画素内挿部の詳細な構成例を示すブロック図である。
[Configuration Example of Intra Prediction Unit and Adjacent Pixel Interpolation Unit]
FIG. 6 is a block diagram illustrating a detailed configuration example of the intra prediction unit and the adjacent pixel interpolation unit.

図6の例の場合、イントラ予測部74は、隣接画像バッファ81、最適モード決定部82、最適シフト量決定部83、および予測画像生成部84により構成されている。   In the case of the example of FIG. 6, the intra prediction unit 74 includes an adjacent image buffer 81, an optimal mode determination unit 82, an optimal shift amount determination unit 83, and a predicted image generation unit 84.

隣接画素内挿部75は、モード判別部91、水平方向内挿部92、および垂直方向内挿部93により構成されている。   The adjacent pixel interpolation unit 75 includes a mode determination unit 91, a horizontal direction interpolation unit 92, and a vertical direction interpolation unit 93.

隣接画像バッファ81は、フレームメモリ72からのイントラ予測の対象ブロックの隣接画素を蓄積する。図6の場合、スイッチ73の図示は省略されているが、隣接画素は、フレームメモリ72から、スイッチ73を介して隣接画像バッファ81に供給される。   The adjacent image buffer 81 accumulates adjacent pixels of the target block for intra prediction from the frame memory 72. In the case of FIG. 6, the illustration of the switch 73 is omitted, but the adjacent pixels are supplied from the frame memory 72 to the adjacent image buffer 81 via the switch 73.

最適モード決定部82には、画面並べ替えバッファ62から読み出されたイントラ予測する画像が入力される。最適モード決定部82は、イントラ予測する対象ブロックに対応する隣接画素を隣接画像バッファ81から読み出す。   The image for intra prediction read from the screen rearrangement buffer 62 is input to the optimum mode determination unit 82. The optimum mode determination unit 82 reads out adjacent pixels corresponding to the target block to be intra predicted from the adjacent image buffer 81.

最適モード決定部82は、イントラ予測する対象ブロックの画像と対応する隣接画素を用いて、候補となる全てのイントラ予測モードのイントラ予測処理を行い、予測画像を生成する。最適モード決定部82は、予測画像を生成したイントラ予測モードに対してコスト関数値を算出し、算出したコスト関数値が最小値を与えるイントラ予測モードを、最適イントラ予測モードとして決定する。決定された予測モードの情報は、モード判別部91、最適シフト量決定部83、および予測画像生成部84に供給される。また、予測画像生成部84には、供給される予測モードに対応するコスト関数値も供給される。   The optimal mode determination unit 82 performs intra prediction processing of all candidate intra prediction modes using adjacent pixels corresponding to the image of the target block to be intra predicted, and generates a prediction image. The optimal mode determination unit 82 calculates a cost function value for the intra prediction mode in which the predicted image is generated, and determines an intra prediction mode in which the calculated cost function value gives the minimum value as the optimal intra prediction mode. Information on the determined prediction mode is supplied to the mode determination unit 91, the optimum shift amount determination unit 83, and the predicted image generation unit 84. The predicted image generation unit 84 is also supplied with a cost function value corresponding to the supplied prediction mode.

最適シフト量決定部83には、画面並べ替えバッファ62から読み出されたイントラ予測する画像と、最適モード決定部82により最適と決定された予測モードの情報が入力される。また、最適シフト量決定部83には、最適イントラ予測モードに応じて、水平方向内挿部92および垂直方向内挿部93により線形内挿され、位相がシフトされた隣接画素が入力される。最適シフト量決定部83は、イントラ予測する対象ブロックに対応する隣接画素を隣接画像バッファ81から読み出す。   The optimal shift amount determination unit 83 receives the image for intra prediction read from the screen rearrangement buffer 62 and information on the prediction mode determined to be optimal by the optimal mode determination unit 82. In addition, the optimum shift amount determination unit 83 receives adjacent pixels whose phases are linearly interpolated by the horizontal direction interpolation unit 92 and the vertical direction interpolation unit 93 in accordance with the optimum intra prediction mode. The optimum shift amount determination unit 83 reads adjacent pixels corresponding to the target block to be intra-predicted from the adjacent image buffer 81.

最適シフト量決定部83は、最適モード決定部82により決定された予測モードについて、イントラ予測する対象ブロックの画像、対応する隣接画素、および対応する内挿された隣接画素の画素値を用いて、最適なシフト量を決定する。最適シフト量決定部83は、例えば、予測誤差(残差)などを算出して、算出した予測誤差の小さいものを最適なシフト量として決定する。最適シフト量決定部83により決定された最適シフト量の情報は、予測画像生成部84に供給される。   The optimum shift amount determination unit 83 uses the image of the target block to be intra-predicted, the corresponding adjacent pixel, and the pixel value of the corresponding interpolated adjacent pixel for the prediction mode determined by the optimal mode determination unit 82, Determine the optimal shift amount. The optimal shift amount determination unit 83 calculates, for example, a prediction error (residual) and determines the calculated small shift as the optimal shift amount. Information on the optimal shift amount determined by the optimal shift amount determination unit 83 is supplied to the predicted image generation unit 84.

予測画像生成部84には、最適モード決定部82により決定された予測モードの情報と対応するコスト関数値、および最適シフト量決定部83により決定された最適シフト量の情報が入力される。予測画像生成部84は、イントラ予測する対象ブロックに対応する隣接画素を隣接画像バッファ81から読み出し、予測モードに応じた位相方向に、読みだした隣接画素を最適シフト量で、隣接画素の位相をシフトする。   The predicted image generation unit 84 receives the cost function value corresponding to the prediction mode information determined by the optimal mode determination unit 82 and the information of the optimal shift amount determined by the optimal shift amount determination unit 83. The predicted image generation unit 84 reads the adjacent pixel corresponding to the target block to be intra-predicted from the adjacent image buffer 81, and sets the read adjacent pixel in the phase direction according to the prediction mode with the optimum shift amount and the phase of the adjacent pixel. shift.

予測画像生成部84は、位相がシフトされた隣接画素を用いて、最適モード決定部82により決定された最適イントラ予測モードでイントラ予測を行い、対象ブロックの予測画像を生成する。予測画像生成部84は、生成された予測画像と、対応するコスト関数値を予測画像選択部77に出力する。   The predicted image generation unit 84 performs intra prediction in the optimal intra prediction mode determined by the optimal mode determination unit 82 using adjacent pixels whose phases are shifted, and generates a predicted image of the target block. The predicted image generation unit 84 outputs the generated predicted image and the corresponding cost function value to the predicted image selection unit 77.

また、予測画像生成部84は、予測画像選択部77により最適イントラ予測モードで生成された予測画像が選択された場合、最適イントラ予測モードを示す情報とシフト量の情報を、可逆符号化部66に供給する。   Further, when the predicted image generated in the optimal intra prediction mode is selected by the predicted image selection unit 77, the predicted image generation unit 84 converts the information indicating the optimal intra prediction mode and the shift amount information into the lossless encoding unit 66. To supply.

モード判別部91は、最適モード決定部82により決定された予測モードに応じた制御信号を、水平方向内挿部92および垂直方向内挿部93に出力する。例えば、内挿処理のONを示す制御信号が予測モードに応じて出力される。   The mode determination unit 91 outputs a control signal corresponding to the prediction mode determined by the optimal mode determination unit 82 to the horizontal direction interpolation unit 92 and the vertical direction interpolation unit 93. For example, a control signal indicating ON of interpolation processing is output according to the prediction mode.

水平方向内挿部92および垂直方向内挿部93は、モード判別部91からの制御信号に応じて、隣接画像バッファ81より隣接画素をそれぞれ読み出す。水平方向内挿部92および垂直方向内挿部93は、読み出した隣接画素に対して、6タップのFIRフィルタおよび線形内挿により、水平方向および垂直方向に、位相をそれぞれシフトする。水平方向内挿部92および垂直方向内挿部93により内挿された隣接画素の情報は、最適シフト量決定部83に供給される。   The horizontal direction interpolation unit 92 and the vertical direction interpolation unit 93 read adjacent pixels from the adjacent image buffer 81 in response to a control signal from the mode determination unit 91. The horizontal direction interpolation unit 92 and the vertical direction interpolation unit 93 shift the phase in the horizontal direction and the vertical direction, respectively, by a 6-tap FIR filter and linear interpolation with respect to the read adjacent pixels. Information on adjacent pixels interpolated by the horizontal direction interpolation unit 92 and the vertical direction interpolation unit 93 is supplied to the optimum shift amount determination unit 83.

[画像符号化装置の符号化処理の説明]
次に、図7のフローチャートを参照して、図2の画像符号化装置51の符号化処理について説明する。
[Description of Encoding Process of Image Encoding Device]
Next, the encoding process of the image encoding device 51 of FIG. 2 will be described with reference to the flowchart of FIG.

ステップS11において、A/D変換部61は入力された画像をA/D変換する。ステップS12において、画面並べ替えバッファ62は、A/D変換部61より供給された画像を記憶し、各ピクチャの表示する順番から符号化する順番への並べ替えを行う。   In step S11, the A / D converter 61 performs A / D conversion on the input image. In step S12, the screen rearrangement buffer 62 stores the image supplied from the A / D conversion unit 61, and rearranges the picture from the display order to the encoding order.

ステップS13において、演算部63は、ステップS12で並び替えられた画像と予測画像との差分を演算する。予測画像は、インター予測する場合は動き予測・補償部76から、イントラ予測する場合はイントラ予測部74から、それぞれ予測画像選択部77を介して演算部63に供給される。   In step S13, the calculation unit 63 calculates the difference between the image rearranged in step S12 and the predicted image. The prediction image is supplied from the motion prediction / compensation unit 76 in the case of inter prediction, and from the intra prediction unit 74 in the case of intra prediction, to the calculation unit 63 via the prediction image selection unit 77, respectively.

差分データは元の画像データに較べてデータ量が小さくなっている。したがって、画像をそのまま符号化する場合に較べて、データ量を圧縮することができる。   The difference data has a smaller data amount than the original image data. Therefore, the data amount can be compressed as compared with the case where the image is encoded as it is.

ステップS14において、直交変換部64は演算部63から供給された差分情報を直交変換する。具体的には、離散コサイン変換、カルーネン・レーベ変換等の直交変換が行われ、変換係数が出力される。ステップS15において、量子化部65は変換係数を量子化する。この量子化に際しては、後述するステップS25の処理で説明されるように、レートが制御される。   In step S <b> 14, the orthogonal transform unit 64 performs orthogonal transform on the difference information supplied from the calculation unit 63. Specifically, orthogonal transformation such as discrete cosine transformation and Karhunen-Loeve transformation is performed, and transformation coefficients are output. In step S15, the quantization unit 65 quantizes the transform coefficient. At the time of this quantization, the rate is controlled as described in the process of step S25 described later.

以上のようにして量子化された差分情報は、次のようにして局部的に復号される。すなわち、ステップS16において、逆量子化部68は量子化部65により量子化された変換係数を量子化部65の特性に対応する特性で逆量子化する。ステップS17において、逆直交変換部69は逆量子化部68により逆量子化された変換係数を直交変換部64の特性に対応する特性で逆直交変換する。   The difference information quantized as described above is locally decoded as follows. That is, in step S <b> 16, the inverse quantization unit 68 inversely quantizes the transform coefficient quantized by the quantization unit 65 with characteristics corresponding to the characteristics of the quantization unit 65. In step S <b> 17, the inverse orthogonal transform unit 69 performs inverse orthogonal transform on the transform coefficient inversely quantized by the inverse quantization unit 68 with characteristics corresponding to the characteristics of the orthogonal transform unit 64.

ステップS18において、演算部70は、予測画像選択部77を介して入力される予測画像を局部的に復号された差分情報に加算し、局部的に復号された画像(演算部63への入力に対応する画像)を生成する。ステップS19においてデブロックフィルタ71は、演算部70より出力された画像をフィルタリングする。これによりブロック歪みが除去される。ステップS20においてフレームメモリ72は、フィルタリングされた画像を記憶する。なお、フレームメモリ72にはデブロックフィルタ71によりフィルタ処理されていない画像も演算部70から供給され、記憶される。   In step S18, the calculation unit 70 adds the predicted image input via the predicted image selection unit 77 to the locally decoded difference information, and outputs the locally decoded image (for input to the calculation unit 63). Corresponding image). In step S <b> 19, the deblock filter 71 filters the image output from the calculation unit 70. Thereby, block distortion is removed. In step S20, the frame memory 72 stores the filtered image. Note that an image that has not been filtered by the deblocking filter 71 is also supplied to the frame memory 72 from the computing unit 70 and stored therein.

ステップS21において、イントラ予測部74および動き予測・補償部76は、それぞれ画像の予測処理を行う。すなわち、ステップS21において、イントラ予測部74は、イントラ予測モードのイントラ予測処理を行う。動き予測・補償部76は、インター予測モードの動き予測・補償処理を行う。   In step S21, the intra prediction unit 74 and the motion prediction / compensation unit 76 each perform image prediction processing. That is, in step S21, the intra prediction unit 74 performs an intra prediction process in the intra prediction mode. The motion prediction / compensation unit 76 performs motion prediction / compensation processing in the inter prediction mode.

ステップS21における予測処理の詳細は、図8を参照して後述するが、この処理により、候補となる全ての予測モードでの予測処理がそれぞれ行われ、候補となる全ての予測モードでのコスト関数値がそれぞれ算出される。そして、算出されたコスト関数値に基づいて、最適イントラ予測モードが選択され、最適イントラ予測モードのイントラ予測により生成された予測画像とそのコスト関数値が予測画像選択部77に供給される。   The details of the prediction process in step S21 will be described later with reference to FIG. 8. With this process, prediction processes in all candidate prediction modes are performed, and cost functions in all candidate prediction modes are obtained. Each value is calculated. Then, based on the calculated cost function value, the optimal intra prediction mode is selected, and the predicted image generated by the intra prediction in the optimal intra prediction mode and its cost function value are supplied to the predicted image selection unit 77.

具体的には、このとき、イントラ予測部74は、6タップのFIRフィルタおよび線形内挿により、最適イントラ予測モードに応じたシフト方向に、最適シフト量で、位相がシフトされた隣接画素を用いてイントラ予測で生成した予測画像を予測画像選択部77に供給する。なお、予測画像と一緒に、最適イントラ予測モードについてのコスト関数値も、予測画像選択部77に供給される。   Specifically, at this time, the intra prediction unit 74 uses adjacent pixels whose phase is shifted by the optimal shift amount in the shift direction according to the optimal intra prediction mode by the 6-tap FIR filter and linear interpolation. Then, the predicted image generated by the intra prediction is supplied to the predicted image selection unit 77. A cost function value for the optimal intra prediction mode is also supplied to the predicted image selection unit 77 together with the predicted image.

一方、算出されたコスト関数値に基づいて、インター予測モードの中から、最適インター予測モードが決定され、最適インター予測モードで生成された予測画像とそのコスト関数値が、予測画像選択部77に供給される。   On the other hand, the optimal inter prediction mode is determined from the inter prediction modes based on the calculated cost function value, and the predicted image generated in the optimal inter prediction mode and its cost function value are sent to the predicted image selection unit 77. Supplied.

ステップS22において、予測画像選択部77は、イントラ予測部74および動き予測・補償部76より出力された各コスト関数値に基づいて、最適イントラ予測モードと最適インター予測モードのうちの一方を、最適予測モードに決定する。そして、予測画像選択部77は、決定した最適予測モードの予測画像を選択し、演算部63,70に供給する。この予測画像が、上述したように、ステップS13,S18の演算に利用される。   In step S <b> 22, the predicted image selection unit 77 optimizes one of the optimal intra prediction mode and the optimal inter prediction mode based on the cost function values output from the intra prediction unit 74 and the motion prediction / compensation unit 76. Determine the prediction mode. Then, the predicted image selection unit 77 selects the predicted image of the determined optimal prediction mode and supplies it to the calculation units 63 and 70. As described above, this predicted image is used for the calculations in steps S13 and S18.

なお、この予測画像の選択情報は、イントラ予測部74または動き予測・補償部76に供給される。最適イントラ予測モードの予測画像が選択された場合、イントラ予測部74は、最適イントラ予測モードを示す情報(すなわち、イントラ予測モード情報)と最適と決定されたシフト量の情報を、可逆符号化部66に供給する。   The prediction image selection information is supplied to the intra prediction unit 74 or the motion prediction / compensation unit 76. When a prediction image in the optimal intra prediction mode is selected, the intra prediction unit 74 converts information indicating the optimal intra prediction mode (that is, intra prediction mode information) and information on the shift amount determined to be optimal into a lossless encoding unit. 66.

最適インター予測モードの予測画像が選択された場合、動き予測・補償部76は、最適インター予測モードを示す情報と、必要に応じて、最適インター予測モードに応じた情報を可逆符号化部66に出力する。最適インター予測モードに応じた情報としては、動きベクトル情報やフラグ情報、参照フレーム情報などがあげられる。すなわち、最適インター予測モードとして、インター予測モードによる予測画像が選択されているときには、動き予測・補償部76は、インター予測モード情報、動きベクトル情報、参照フレーム情報を可逆符号化部66に出力する。   When the prediction image of the optimal inter prediction mode is selected, the motion prediction / compensation unit 76 sends information indicating the optimal inter prediction mode and, if necessary, information corresponding to the optimal inter prediction mode to the lossless encoding unit 66. Output. Information according to the optimal inter prediction mode includes motion vector information, flag information, reference frame information, and the like. That is, when a prediction image in the inter prediction mode is selected as the optimal inter prediction mode, the motion prediction / compensation unit 76 outputs the inter prediction mode information, motion vector information, and reference frame information to the lossless encoding unit 66. .

ステップS23において、可逆符号化部66は量子化部65より出力された量子化された変換係数を符号化する。すなわち、差分画像が可変長符号化、算術符号化等の可逆符号化され、圧縮される。このとき、上述したステップS22において可逆符号化部66に入力された、イントラ予測部74からのイントラ予測モード情報、または、動き予測・補償部76からの最適インター予測モードに応じた情報なども符号化され、ヘッダ情報に付加される。   In step S23, the lossless encoding unit 66 encodes the quantized transform coefficient output from the quantization unit 65. That is, the difference image is subjected to lossless encoding such as variable length encoding and arithmetic encoding, and is compressed. At this time, the intra prediction mode information from the intra prediction unit 74 or the information corresponding to the optimal inter prediction mode from the motion prediction / compensation unit 76, which is input to the lossless encoding unit 66 in step S22 described above, is also encoded. And added to the header information.

ステップS24において蓄積バッファ67は差分画像を圧縮画像として蓄積する。蓄積バッファ67に蓄積された圧縮画像が適宜読み出され、伝送路を介して復号側に伝送される。   In step S24, the accumulation buffer 67 accumulates the difference image as a compressed image. The compressed image stored in the storage buffer 67 is appropriately read and transmitted to the decoding side via the transmission path.

ステップS25においてレート制御部78は、蓄積バッファ67に蓄積された圧縮画像に基づいて、オーバーフローあるいはアンダーフローが発生しないように、量子化部65の量子化動作のレートを制御する。   In step S <b> 25, the rate control unit 78 controls the quantization operation rate of the quantization unit 65 based on the compressed image stored in the storage buffer 67 so that overflow or underflow does not occur.

[予測処理の説明]
次に、図8のフローチャートを参照して、図7のステップS21における予測処理を説明する。
[Explanation of prediction processing]
Next, the prediction process in step S21 in FIG. 7 will be described with reference to the flowchart in FIG.

画面並べ替えバッファ62から供給される処理対象の画像がイントラ処理されるブロックの画像である場合、参照される復号済みの画像がフレームメモリ72から読み出され、スイッチ73を介してイントラ予測部74に供給される。   When the processing target image supplied from the screen rearrangement buffer 62 is an image of a block to be intra-processed, the decoded image to be referred to is read from the frame memory 72, and the intra prediction unit 74 via the switch 73. To be supplied.

ステップS31において、イントラ予測部74は、供給された画像を用いて、処理対象のブロックの画素を、候補となる全てのイントラ予測モードでイントラ予測する。なお、参照される復号済みの画素としては、デブロックフィルタ71によりデブロックフィルタリングされていない画素が用いられる。   In step S31, the intra prediction unit 74 performs intra prediction on the pixels of the block to be processed in all candidate intra prediction modes, using the supplied image. Note that pixels that have not been deblocked filtered by the deblocking filter 71 are used as decoded pixels that are referred to.

ステップS31におけるイントラ予測処理の詳細は、図20を参照して後述するが、この処理により、候補となる全てのイントラ予測モードでイントラ予測が行われる。そして、候補となる全てのイントラ予測モードに対してコスト関数値が算出され、算出されたコスト関数値に基づいて、最適イントラ予測モードが決定される。   The details of the intra prediction process in step S31 will be described later with reference to FIG. 20. With this process, intra prediction is performed in all candidate intra prediction modes. Then, cost function values are calculated for all candidate intra prediction modes, and the optimal intra prediction mode is determined based on the calculated cost function values.

そして、6タップのFIRフィルタおよび線形内挿により、決定された最適イントラ予測モードに応じたシフト方向に最適シフト量で、隣接画素の位相がシフトされる。この位相がシフトされた隣接画素が用いられて、最適イントラ予測モードでのイントラ予測により予測画像が生成される。生成された予測画像と最適イントラ予測モードのコスト関数値は、予測画像選択部77に供給される。   Then, by the 6-tap FIR filter and linear interpolation, the phase of the adjacent pixel is shifted by the optimal shift amount in the shift direction corresponding to the determined optimal intra prediction mode. Adjacent pixels whose phases are shifted are used, and a prediction image is generated by intra prediction in the optimal intra prediction mode. The generated predicted image and the cost function value of the optimal intra prediction mode are supplied to the predicted image selection unit 77.

画面並べ替えバッファ62から供給される処理対象の画像がインター処理される画像である場合、参照される画像がフレームメモリ72から読み出され、スイッチ73を介して動き予測・補償部76に供給される。これらの画像に基づいて、ステップS32において、動き予測・補償部76はインター動き予測処理を行う。すなわち、動き予測・補償部76は、フレームメモリ72から供給される画像を参照して、候補となる全てのインター予測モードの動き予測処理を行う。   When the processing target image supplied from the screen rearrangement buffer 62 is an image to be inter-processed, the referenced image is read from the frame memory 72 and supplied to the motion prediction / compensation unit 76 via the switch 73. The Based on these images, in step S32, the motion prediction / compensation unit 76 performs an inter motion prediction process. That is, the motion prediction / compensation unit 76 refers to the image supplied from the frame memory 72 and performs motion prediction processing for all candidate inter prediction modes.

ステップS32におけるインター動き予測処理の詳細は、図22を参照して後述するが、この処理により、候補となる全てのインター予測モードで動き予測処理が行われ、候補となる全てのインター予測モードに対してコスト関数値が算出される。   Details of the inter motion prediction process in step S32 will be described later with reference to FIG. 22. With this process, the motion prediction process is performed in all candidate inter prediction modes, and all candidate inter prediction modes are set. On the other hand, a cost function value is calculated.

ステップS33において、動き予測・補償部76は、ステップS32において算出されたインター予測モードに対してのコスト関数値を比較し、最小値を与える予測モードを、最適インター予測モードとして決定する。そして、動き予測・補償部76は、最適インター予測モードで生成された予測画像とそのコスト関数値を、予測画像選択部77に供給する。   In step S33, the motion prediction / compensation unit 76 compares the cost function value for the inter prediction mode calculated in step S32, and determines the prediction mode that gives the minimum value as the optimal inter prediction mode. Then, the motion prediction / compensation unit 76 supplies the predicted image generated in the optimal inter prediction mode and its cost function value to the predicted image selection unit 77.

[H.264/AVC方式におけるイントラ予測処理の説明]
次に、H.264/AVC方式で定められているイントラ予測の各モードについて説明する。
[H. Explanation of Intra Prediction Processing in H.264 / AVC System]
Next, H.I. Each mode of intra prediction defined in the H.264 / AVC format will be described.

まず、輝度信号に対するイントラ予測モードについて説明する。輝度信号のイントラ予測モードには、イントラ4×4予測モード、イントラ8×8予測モード、およびイントラ16×16予測モードの3通りの方式が定められている。これは、ブロック単位を定めるモードであり、マクロブロック毎に設定される。また、色差信号に対しては、マクロブロック毎に輝度信号とは独立したイントラ予測モードを設定することが可能である。   First, the intra prediction mode for the luminance signal will be described. In the luminance signal intra prediction mode, three methods are defined: an intra 4 × 4 prediction mode, an intra 8 × 8 prediction mode, and an intra 16 × 16 prediction mode. This is a mode for determining a block unit, and is set for each macroblock. For color difference signals, an intra prediction mode independent of the luminance signal can be set for each macroblock.

さらに、イントラ4×4予測モードの場合、4×4画素の対象ブロック毎に、9種類の予測モードから1つの予測モードを設定することができる。イントラ8×8予測モードの場合、8×8画素の対象ブロック毎に、9種類の予測モードから1つの予測モードを設定することができる。また、イントラ16×16予測モードの場合、16×16画素の対象マクロブロックに対して、4種類の予測モードから1つの予測モードを設定することができる。   Further, in the case of the intra 4 × 4 prediction mode, one prediction mode can be set from nine types of prediction modes for each target block of 4 × 4 pixels. In the case of the intra 8 × 8 prediction mode, one prediction mode can be set from nine types of prediction modes for each target block of 8 × 8 pixels. In the case of the intra 16 × 16 prediction mode, one prediction mode can be set from four types of prediction modes for a target macroblock of 16 × 16 pixels.

なお、以下、イントラ4×4予測モード、イントラ8×8予測モード、およびイントラ16×16予測モードは、それぞれ、4×4画素のイントラ予測モード、8×8画素のイントラ予測モード、および16×16画素のイントラ予測モードとも適宜称する。   Note that, hereinafter, the intra 4 × 4 prediction mode, the intra 8 × 8 prediction mode, and the intra 16 × 16 prediction mode will be referred to as 4 × 4 pixel intra prediction mode, 8 × 8 pixel intra prediction mode, and 16 ×, respectively. This is also referred to as a 16-pixel intra prediction mode as appropriate.

図9の例において、各ブロックに付されている数字−1乃至25は、その各ブロックのビットストリーム順(復号側における処理順)を表している。なお、輝度信号については、マクロブロックが4×4画素に分割されて、4×4画素のDCTが行われる。そして、イントラ16×16予測モードの場合のみ、−1のブロックに示されるように、各ブロックの直流成分を集めて、4×4行列が生成され、これに対して、さらに、直交変換が施される。   In the example of FIG. 9, the numbers −1 to 25 attached to each block indicate the bit stream order (processing order on the decoding side) of each block. For the luminance signal, the macroblock is divided into 4 × 4 pixels, and DCT of 4 × 4 pixels is performed. Only in the case of the intra 16 × 16 prediction mode, as shown in the block of −1, the DC components of each block are collected to generate a 4 × 4 matrix, and further, orthogonal transformation is performed on this. Is done.

一方、色差信号については、マクロブロックが4×4画素に分割され、4×4画素のDCTが行われた後に、16および17の各ブロックに示されるように、各ブロックの直流成分を集めて、2×2行列が生成され、これに対して、さらに、直交変換が施される。   On the other hand, for the color difference signal, after the macroblock is divided into 4 × 4 pixels and the DCT of 4 × 4 pixels is performed, the DC components of each block are collected as shown in the blocks 16 and 17. A 2 × 2 matrix is generated, and is further subjected to orthogonal transformation.

なお、このことは、イントラ8×8予測モードに関しては、ハイプロファイルまたはそれ以上のプロファイルで、対象マクロブロックに、8×8直交変換が施される場合についてのみ適用可能である。   Note that this can be applied to the intra 8 × 8 prediction mode only when the target macroblock is subjected to 8 × 8 orthogonal transformation with a high profile or higher profile.

図10および図11は、9種類の輝度信号の4×4画素のイントラ予測モード(Intra_4x4_pred_mode)を示す図である。平均値(DC)予測を示すモード2以外の8種類の各モードは、それぞれ、上述した図1の番号0,1,3乃至8で示される方向に対応している。   FIG. 10 and FIG. 11 are diagrams illustrating nine types of luminance signal 4 × 4 pixel intra prediction modes (Intra — 4 × 4_pred_mode). Each of the eight modes other than mode 2 indicating average value (DC) prediction corresponds to the direction indicated by the numbers 0, 1, 3 to 8 in FIG.

9種類のIntra_4x4_pred_modeについて、図12を参照して説明する。図12の例において、画素a乃至pは、イントラ処理される対象ブロックの画素を表し、画素値A乃至Mは、隣接ブロックに属する画素の画素値を表している。すなわち、画素a乃至pは、画面並べ替えバッファ62から読み出された処理対象の画像であり、画素値A乃至Mは、フレームメモリ72から読み出され、参照される復号済みの画像の画素値である。   Nine types of Intra_4x4_pred_mode will be described with reference to FIG. In the example of FIG. 12, pixels a to p represent pixels of a target block to be intra-processed, and pixel values A to M represent pixel values of pixels belonging to adjacent blocks. That is, the pixels a to p are images to be processed that are read from the screen rearrangement buffer 62, and the pixel values A to M are pixel values of a decoded image that is read from the frame memory 72 and referred to. It is.

図10および図11に示す各イントラ予測モードの場合、画素a乃至pの予測画素値は、隣接ブロックに属する画素の画素値A乃至Mを用いて、以下のように生成される。なお、画素値が“available”であるとは、画枠の端であったり、あるいは、まだ符号化されていないなどの理由がなく、利用可能であることを表す。これに対して、画素値が“unavailable”であるとは、画枠の端であったり、あるいは、まだ符号化されていないなどの理由により利用可能ではないことを表す。   In the case of each intra prediction mode shown in FIGS. 10 and 11, the predicted pixel values of the pixels a to p are generated as follows using the pixel values A to M of the pixels belonging to the adjacent blocks. Note that the pixel value “available” indicates that the pixel value can be used without any reason such as being at the end of the image frame or not yet encoded. On the other hand, the pixel value “unavailable” indicates that the pixel value is not usable because it is at the end of the image frame or has not been encoded yet.

モード0はVertical Prediction modeであり、画素値A乃至Dが “available” の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(7)のように生成される。

画素a, e, i, mの予測画素値 = A
画素b, f, j, nの予測画素値 = B
画素c, g, k, oの予測画素値 = C
画素d, h, l, pの予測画素値 = D ・・・(7)
Mode 0 is the Vertical Prediction mode, and is applied only when the pixel values A to D are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (7).

Predicted pixel value of pixels a, e, i, m = A
Predicted pixel value of pixels b, f, j, n = B
Predicted pixel value of pixels c, g, k, o = C
Predicted pixel value of pixels d, h, l, and p = D (7)

モード1はHorizontal Prediction modeであり、画素値I乃至Lが “available” の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(8)のように生成される。

画素a, b, c, dの予測画素値 = I
画素e, f, g, hの予測画素値 = J
画素i, j, k, lの予測画素値 = K
画素m, n, o, pの予測画素値 = L ・・・(8)
Mode 1 is a horizontal prediction mode and is applied only when the pixel values I to L are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (8).

Predicted pixel value of pixels a, b, c, d = I
Predicted pixel value of pixels e, f, g, h = J
Predicted pixel value of pixels i, j, k, l = K
Predicted pixel value of pixels m, n, o, p = L (8)

モード2はDC Prediction modeであり、画素値A,B,C,D,I,J,K,Lが全て “available” である時、予測画素値は式(9)のように生成される。

(A+B+C+D+I+J+K+L+4) >> 3 ・・・(9)
Mode 2 is a DC Prediction mode. When the pixel values A, B, C, D, I, J, K, and L are all “available”, the predicted pixel value is generated as shown in Expression (9).

(A + B + C + D + I + J + K + L + 4) >> 3 (9)

また、画素値A,B,C,Dが全て “unavailable” である時、予測画素値は式(10)のように生成される。

(I+J+K+L+2) >> 2 ・・・(10)
Also, when the pixel values A, B, C, and D are all “unavailable”, the predicted pixel value is generated as in Expression (10).

(I + J + K + L + 2) >> 2 (10)

また、画素値I,J,K,Lが全て “unavailable” である時、予測画素値は式(11)のように生成される。

(A+B+C+D+2) >> 2 ・・・(11)
Further, when the pixel values I, J, K, and L are all “unavailable”, the predicted pixel value is generated as in Expression (11).

(A + B + C + D + 2) >> 2 (11)

なお、画素値A,B,C,D,I,J,K,Lが全て“unavailable” である時、128を予測画素値として用いる。   When the pixel values A, B, C, D, I, J, K, and L are all “unavailable”, 128 is used as the predicted pixel value.

モード3はDiagonal_Down_Left Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(12)のように生成される。

画素aの予測画素値 = (A+2B+C+2) >> 2
画素b,eの予測画素値 = (B+2C+D+2) >> 2
画素c,f,iの予測画素値 = (C+2D+E+2) >> 2
画素d,g,j,mの予測画素値 = (D+2E+F+2) >> 2
画素h,k,nの予測画素値 = (E+2F+G+2) >> 2
画素l,oの予測画素値 = (F+2G+H+2) >> 2
画素pの予測画素値 = (G+3H+2) >> 2
・・・(12)
Mode 3 is a Diagonal_Down_Left Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (12).

Predicted pixel value of pixel a = (A + 2B + C + 2) >> 2
Predicted pixel value of pixels b and e = (B + 2C + D + 2) >> 2
Predicted pixel value of pixels c, f, i = (C + 2D + E + 2) >> 2
Predicted pixel value of pixels d, g, j, m = (D + 2E + F + 2) >> 2
Predicted pixel value of pixels h, k, n = (E + 2F + G + 2) >> 2
Predicted pixel value of pixels l and o = (F + 2G + H + 2) >> 2
Predicted pixel value of pixel p = (G + 3H + 2) >> 2
(12)

モード4はDiagonal_Down_Right Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが “available” の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(13)のように生成される。

画素mの予測画素値 = (J+2K+L+2) >> 2
画素i,nの予測画素値 = (I+2J+K+2) >> 2
画素e,j,oの予測画素値 = (M+2I+J+2) >> 2
画素a,f,k,pの予測画素値 = (A+2M+I+2) >> 2
画素b,g,lの予測画素値 = (M+2A+B+2) >> 2
画素c,hの予測画素値 = (A+2B+C+2) >> 2
画素dの予測画素値 = (B+2C+D+2) >> 2
・・・(13)
Mode 4 is a Diagonal_Down_Right Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (13).

Predicted pixel value of pixel m = (J + 2K + L + 2) >> 2
Predicted pixel value of pixels i and n = (I + 2J + K + 2) >> 2
Predicted pixel value of pixels e, j, o = (M + 2I + J + 2) >> 2
Predicted pixel value of pixels a, f, k, p = (A + 2M + I + 2) >> 2
Predicted pixel value of pixels b, g, l = (M + 2A + B + 2) >> 2
Predicted pixel value of pixels c and h = (A + 2B + C + 2) >> 2
Predicted pixel value of pixel d = (B + 2C + D + 2) >> 2
... (13)

モード5はDiagonal_Vertical_Right Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(14)のように生成される。

画素a,jの予測画素値 = (M+A+1) >> 1
画素b,kの予測画素値 = (A+B+1) >> 1
画素c,lの予測画素値 = (B+C+1) >> 1
画素dの予測画素値 = (C+D+1) >> 1
画素e,nの予測画素値 = (I+2M+A+2) >> 2
画素f,oの予測画素値 = (M+2A+B+2) >> 2
画素g,pの予測画素値 = (A+2B+C+2) >> 2
画素hの予測画素値 = (B+2C+D+2) >> 2
画素iの予測画素値 = (M+2I+J+2) >> 2
画素mの予測画素値 = (I+2J+K+2) >> 2
・・・(14)
Mode 5 is a Diagonal_Vertical_Right Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (14).

Predicted pixel value of pixels a and j = (M + A + 1) >> 1
Predicted pixel value of pixels b and k = (A + B + 1) >> 1
Predicted pixel value of pixels c and l = (B + C + 1) >> 1
Predicted pixel value of pixel d = (C + D + 1) >> 1
Predicted pixel value of pixels e and n = (I + 2M + A + 2) >> 2
Predicted pixel value of pixels f and o = (M + 2A + B + 2) >> 2
Predicted pixel value of pixels g and p = (A + 2B + C + 2) >> 2
Predicted pixel value of pixel h = (B + 2C + D + 2) >> 2
Predicted pixel value of pixel i = (M + 2I + J + 2) >> 2
Predicted pixel value of pixel m = (I + 2J + K + 2) >> 2
(14)

モード6はHorizontal_Down Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(15)のように生成される。

画素a,gの予測画素値 = (M+I+1) >> 1
画素b,hの予測画素値 = (I+2M+A+2) >> 2
画素cの予測画素値 = (M+2A+B+2) >> 2
画素dの予測画素値 = (A+2B+C+2) >> 2
画素e,kの予測画素値 = (I+J+1) >> 1
画素f,lの予測画素値 = (M+2I+J+2) >> 2
画素i,oの予測画素値 = (J+K+1) >> 1
画素j,pの予測画素値 = (I+2J+K+2) >> 2
画素mの予測画素値 = (K+L+1) >> 1
画素nの予測画素値 = (J+2K+L+2) >> 2
・・・(15)
Mode 6 is a Horizontal_Down Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (15).

Predicted pixel value of pixels a and g = (M + I + 1) >> 1
Predicted pixel value of pixels b and h = (I + 2M + A + 2) >> 2
Predicted pixel value of pixel c = (M + 2A + B + 2) >> 2
Predicted pixel value of pixel d = (A + 2B + C + 2) >> 2
Predicted pixel value of pixels e and k = (I + J + 1) >> 1
Predicted pixel value of pixels f and l = (M + 2I + J + 2) >> 2
Predicted pixel value of pixels i and o = (J + K + 1) >> 1
Predicted pixel value of pixels j and p = (I + 2J + K + 2) >> 2
Predicted pixel value of pixel m = (K + L + 1) >> 1
Predicted pixel value of pixel n = (J + 2K + L + 2) >> 2
... (15)

モード7は、Vertical_Left Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(16)のように生成される。

画素aの予測画素値 = (A+B+1) >> 1
画素b,iの予測画素値 = (B+C+1) >> 1
画素c,jの予測画素値 = (C+D+1) >> 1
画素d,kの予測画素値 = (D+E+1) >> 1
画素lの予測画素値 = (E+F+1) >> 1
画素eの予測画素値 = (A+2B+C+2) >> 2
画素f,mの予測画素値 = (B+2C+D+2) >> 2
画素g,nの予測画素値 = (C+2D+E+2) >> 2
画素h,oの予測画素値 = (D+2E+F+2) >> 2
画素pの予測画素値 = (E+2F+G+2) >> 2
・・・(16)
Mode 7 is a Vertical_Left Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (16).

Predicted pixel value of pixel a = (A + B + 1) >> 1
Predicted pixel value of pixels b and i = (B + C + 1) >> 1
Predicted pixel value of pixels c and j = (C + D + 1) >> 1
Predicted pixel value of pixels d and k = (D + E + 1) >> 1
Predicted pixel value of pixel l = (E + F + 1) >> 1
Predicted pixel value of pixel e = (A + 2B + C + 2) >> 2
Predicted pixel value of pixels f and m = (B + 2C + D + 2) >> 2
Predicted pixel value of pixels g and n = (C + 2D + E + 2) >> 2
Predicted pixel value of pixels h and o = (D + 2E + F + 2) >> 2
Predicted pixel value of pixel p = (E + 2F + G + 2) >> 2
... (16)

モード8は、Horizontal_Up Prediction modeであり、画素値A,B,C,D,I,J,K,L,Mが“available”の場合のみ適用される。この場合、画素a乃至pの予測画素値は、次の式(17)のように生成される。

画素aの予測画素値 = (I+J+1) >> 1
画素bの予測画素値 = (I+2J+K+2) >> 2
画素c,eの予測画素値 = (J+K+1) >> 1
画素d,fの予測画素値 = (J+2K+L+2) >> 2
画素g,iの予測画素値 = (K+L+1) >> 1
画素h,jの予測画素値 = (K+3L+2) >> 2
画素k,l,m,n,o,pの予測画素値 = L
・・・(17)
Mode 8 is a Horizontal_Up Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (17).

Predicted pixel value of pixel a = (I + J + 1) >> 1
Predicted pixel value of pixel b = (I + 2J + K + 2) >> 2
Predicted pixel value of pixels c and e = (J + K + 1) >> 1
Predicted pixel value of pixels d and f = (J + 2K + L + 2) >> 2
Predicted pixel value of pixels g and i = (K + L + 1) >> 1
Predicted pixel value of pixels h and j = (K + 3L + 2) >> 2
Predicted pixel value of pixels k, l, m, n, o, p = L
... (17)

次に、図13を参照して、輝度信号の4×4画素のイントラ予測モード(Intra_4x4_pred_mode)の符号化方式について説明する。図13の例において、4×4画素からなり、符号化対象となる対象ブロックCが示されており、対象ブロックCに隣接する4×4画素からなるブロックAおよびブロックBが示されている。   Next, a 4 × 4 pixel intra prediction mode (Intra — 4 × 4_pred_mode) encoding method for luminance signals will be described with reference to FIG. In the example of FIG. 13, a target block C that is 4 × 4 pixels and is an encoding target is illustrated, and a block A and a block B that are 4 × 4 pixels adjacent to the target block C are illustrated.

この場合、対象ブロックCにおけるIntra_4x4_pred_modeと、ブロックAおよびブロックBにおけるIntra_4x4_pred_modeとは高い相関があると考えられる。この相関性を用いて、次のように符号化処理を行うことにより、より高い符号化効率を実現することができる。   In this case, it is considered that Intra_4x4_pred_mode in the target block C and Intra_4x4_pred_mode in the block A and the block B have a high correlation. By using this correlation and performing encoding processing as follows, higher encoding efficiency can be realized.

すなわち、図13の例において、ブロックAおよびブロックBにおけるIntra_4x4_pred_modeを、それぞれ、Intra_4x4_pred_modeAおよびIntra_4x4_pred_modeBとして、MostProbableModeを次の式(18)と定義する。

MostProbableMode=Min(Intra_4x4_pred_modeA, Intra_4x4_pred_modeB)
・・・(18)
That is, in the example of FIG. 13, Intra_4x4_pred_mode in the block A and the block B is set as Intra_4x4_pred_modeA and Intra_4x4_pred_modeB, respectively, and MostProbableMode is defined as the following equation (18).

MostProbableMode = Min (Intra_4x4_pred_modeA, Intra_4x4_pred_modeB)
... (18)

すなわち、ブロックAおよびブロックBのうち、より小さなmode_numberを割り当てられている方をMostProbableModeとする。   That is, among blocks A and B, the one to which a smaller mode_number is assigned is referred to as MostProbableMode.

ビットストリーム中には、対象ブロックCに対するパラメータとして、prev_intra4x4_pred_mode_flag[luma4x4BlkIdx] および rem_intra4x4_pred_mode[luma4x4BlkIdx] という2つの値が定義されており、次の式(19)に示される擬似コードに基づく処理により、復号処理が行われ、対象ブロックCに対するIntra_4x4_pred_mode、Intra4x4PredMode[luma4x4BlkIdx] の値を得ることができる。   In the bitstream, two values, prev_intra4x4_pred_mode_flag [luma4x4BlkIdx] and rem_intra4x4_pred_mode [luma4x4BlkIdx], are defined as parameters for the target block C. And the values of Intra_4x4_pred_mode and Intra4x4PredMode [luma4x4BlkIdx] for the target block C can be obtained.

if(prev_intra4x4_pred_mode_flag[luma4x4BlkIdx])
Intra4x4PredMode[luma4x4BlkIdx] = MostProbableMode
else
if(rem_intra4x4_pred_mode[luma4x4BlkIdx] < MostProbableMode)
Intra4x4PredMode[luma4x4BlkIdx]=rem_intra4x4_pred_mode[luma4x4BlkIdx]
else
Intra4x4PredMode[luma4x4BlkIdx]=rem_intra4x4_pred_mode[luma4x4BlkIdx] + 1
・・・(19)
if (prev_intra4x4_pred_mode_flag [luma4x4BlkIdx])
Intra4x4PredMode [luma4x4BlkIdx] = MostProbableMode
else
if (rem_intra4x4_pred_mode [luma4x4BlkIdx] <MostProbableMode)
Intra4x4PredMode [luma4x4BlkIdx] = rem_intra4x4_pred_mode [luma4x4BlkIdx]
else
Intra4x4PredMode [luma4x4BlkIdx] = rem_intra4x4_pred_mode [luma4x4BlkIdx] + 1
... (19)

次に、16×16画素のイントラ予測モードについて説明する。図14および図15は、4種類の輝度信号の16×16画素のイントラ予測モード(Intra_16x16_pred_mode)を示す図である。   Next, the 16 × 16 pixel intra prediction mode will be described. FIG. 14 and FIG. 15 are diagrams showing 16 × 16 pixel intra prediction modes (Intra_16 × 16_pred_mode) of four types of luminance signals.

4種類のイントラ予測モードについて、図16を参照して説明する。図16の例において、イントラ処理される対象マクロブロックAが示されており、P(x,y);x,y=-1,0,…,15は、対象マクロブロックAに隣接する画素の画素値を表している。   The four types of intra prediction modes will be described with reference to FIG. In the example of FIG. 16, the target macroblock A to be intra-processed is shown, and P (x, y); x, y = −1,0,..., 15 are pixels adjacent to the target macroblock A. It represents a pixel value.

モード0は、Vertical Prediction modeであり、P(x,-1); x,y=-1,0,…,15が “available” である時のみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(20)のように生成される。

Pred(x,y) = P(x,-1);x,y=0,…,15
・・・(20)
Mode 0 is a Vertical Prediction mode, and is applied only when P (x, -1); x, y = -1,0,..., 15 is “available”. In this case, the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following equation (20).

Pred (x, y) = P (x, -1); x, y = 0, ..., 15
... (20)

モード1はHorizontal Prediction modeであり、P(-1,y); x,y=-1,0,…,15が “available” である時のみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(21)のように生成される。

Pred(x,y) = P(-1,y);x,y=0,…,15
・・・(21)
Mode 1 is a horizontal prediction mode and is applied only when P (-1, y); x, y = -1,0,..., 15 is “available”. In this case, the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following equation (21).

Pred (x, y) = P (-1, y); x, y = 0, ..., 15
... (21)

モード2はDC Prediction modeであり、P(x,-1)およびP(-1,y); x,y=-1,0,…,15が全て “available” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(22)のように生成される。

Figure 2014135742
Mode 2 is a DC Prediction mode, and when P (x, -1) and P (-1, y); x, y = -1,0, ..., 15 are all "available", the target macroblock A The predicted pixel value Pred (x, y) of each pixel is generated as in the following Expression (22).

Figure 2014135742

また、P(x,-1); x,y=-1,0,…,15が “unavailable” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(23)のように生成される。

Figure 2014135742
When P (x, -1); x, y = -1,0, ..., 15 is "unavailable", the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is Is generated as shown in Equation (23).

Figure 2014135742

P(-1,y); x,y=-1,0,…,15が “unavailable” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(24)のように生成される。

Figure 2014135742
When P (-1, y); x, y = −1,0,..., 15 is “unavailable”, the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is expressed by the following equation: It is generated as in (24).

Figure 2014135742

P(x,-1)およびP(-1,y); x,y=-1,0,…,15が全て “unavailable” である場合には、予測画素値として128を用いる。   When P (x, −1) and P (−1, y); x, y = −1,0,..., 15 are all “unavailable”, 128 is used as the predicted pixel value.

モード3はPlane Prediction modeであり、P(x,-1)及びP(-1,y); x,y=-1,0,…,15が全て “available” の場合のみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(25)のように生成される。

Figure 2014135742
Mode 3 is a plane prediction mode, and is applied only when P (x, -1) and P (-1, y); x, y = -1,0, ..., 15 are all "available". In this case, the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following Expression (25).

Figure 2014135742

次に、色差信号に対するイントラ予測モードについて説明する。図17は、4種類の色差信号のイントラ予測モード(Intra_chroma_pred_mode)を示す図である。色差信号のイントラ予測モードは、輝度信号のイントラ予測モードと独立に設定が可能である。色差信号に対するイントラ予測モードは、上述した輝度信号の16×16画素のイントラ予測モードに順ずる。   Next, the intra prediction mode for color difference signals will be described. FIG. 17 is a diagram illustrating four types of color difference signal intra prediction modes (Intra_chroma_pred_mode). The color difference signal intra prediction mode can be set independently of the luminance signal intra prediction mode. The intra prediction mode for the color difference signal is in accordance with the 16 × 16 pixel intra prediction mode of the luminance signal described above.

ただし、輝度信号の16×16画素のイントラ予測モードが、16×16画素のブロックを対象としているのに対し、色差信号に対するイントラ予測モードは、8×8画素のブロックを対象としている。さらに、上述した図14と図17に示されるように、両者においてモード番号は対応していない。   However, the 16 × 16 pixel intra prediction mode for the luminance signal is intended for a block of 16 × 16 pixels, whereas the intra prediction mode for a color difference signal is intended for a block of 8 × 8 pixels. Furthermore, as shown in FIGS. 14 and 17 described above, the mode numbers do not correspond to each other.

ここで、図16を参照して上述した輝度信号の16×16画素のイントラ予測モードの対象マクロブロックAの画素値および隣接する画素値の定義に準じる。例えば、イントラ処理される対象マクロブロックA(色差信号の場合は、8×8画素)に隣接する画素の画素値をP(x,y);x,y=-1,0,…,7とする。   Here, the definition of the pixel value of the target macroblock A and the adjacent pixel value in the 16 × 16 pixel intra prediction mode of the luminance signal described above with reference to FIG. 16 is applied. For example, pixel values of pixels adjacent to the target macroblock A to be intra-processed (8 × 8 pixels in the case of a color difference signal) are P (x, y); x, y = −1,0,. To do.

モード0はDC Prediction modeであり、P(x,-1)およびP(-1,y); x,y=-1,0,…,7が全て “available” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(26)のように生成される。

Figure 2014135742
Mode 0 is DC Prediction mode, and when P (x, -1) and P (-1, y); x, y = -1,0, ..., 7 are all "available", the target macroblock A The predicted pixel value Pred (x, y) of each pixel is generated as in the following Expression (26).

Figure 2014135742

また、P(-1,y) ; x,y=-1,0,…,7が “unavailable” である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(27)のように生成される。

Figure 2014135742
Further, when P (−1, y); x, y = −1,0,..., 7 is “unavailable”, the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is (27).

Figure 2014135742

また、P(x,-1) ; x,y=-1,0,…,7が “unavailable”である場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(28)のように生成される。

Figure 2014135742
When P (x, -1); x, y = -1,0,..., 7 is “unavailable”, the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is Is generated as shown in Equation (28).

Figure 2014135742

モード1はHorizontal Prediction modeであり、P(-1,y) ; x,y=-1,0,…,7が “available” の場合にのみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(29)のように生成される。

Pred(x,y) = P(-1,y);x,y=0,…,7
・・・(29)
Mode 1 is a Horizontal Prediction mode, and is applied only when P (-1, y); x, y = -1,0,..., 7 is “available”. In this case, the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following Expression (29).

Pred (x, y) = P (-1, y); x, y = 0, ..., 7
... (29)

モード2はVertical Prediction modeであり、P(x,-1) ; x,y=-1,0,…,7が “available” の場合にのみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(30)のように生成される。

Pred(x,y) = P(x,-1);x,y=0,…,7
・・・(30)
Mode 2 is the Vertical Prediction mode, and is applied only when P (x, -1); x, y = -1,0, ..., 7 is "available". In this case, the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following equation (30).

Pred (x, y) = P (x, -1); x, y = 0, ..., 7
... (30)

モード3はPlane Prediction modeであり、P(x,-1)及びP(-1,y) ; x,y=-1,0,…,7 が “available” の場合にのみ適用される。この場合、対象マクロブロックAの各画素の予測画素値Pred(x,y)は、次の式(31)のように生成される。

Figure 2014135742
Mode 3 is a plane prediction mode and is applied only when P (x, -1) and P (-1, y); x, y = -1,0, ..., 7 are "available". In this case, the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is generated as in the following Expression (31).

Figure 2014135742

以上のように、輝度信号のイントラ予測モードには、9種類の4×4画素および8×8画素のブロック単位、並びに4種類の16×16画素のマクロブロック単位の予測モードがある。このブロック単位のモードは、マクロブロック単位毎に設定される。色差信号のイントラ予測モードには、4種類の8×8画素のブロック単位の予測モードがある。この色差信号のイントラ予測モードは、輝度信号のイントラ予測モードと独立に設定が可能である。   As described above, the luminance signal intra prediction modes include nine types of 4 × 4 pixel and 8 × 8 pixel block units, and four types of 16 × 16 pixel macroblock unit prediction modes. This block unit mode is set for each macroblock unit. The color difference signal intra prediction modes include four types of prediction modes in units of 8 × 8 pixel blocks. This color difference signal intra prediction mode can be set independently of the luminance signal intra prediction mode.

また、輝度信号の4×4画素のイントラ予測モード(イントラ4×4予測モード)および8×8画素のイントラ予測モード(イントラ8×8予測モード)については、4×4画素および8×8画素の輝度信号のブロック毎に1つのイントラ予測モードが設定される。輝度信号の16×16画素のイントラ予測モード(イントラ16×16予測モード)と色差信号のイントラ予測モードについては、1つのマクロブロックに対して1つの予測モードが設定される。   In addition, the 4 × 4 pixel intra prediction mode (intra 4 × 4 prediction mode) and the 8 × 8 pixel intra prediction mode (intra 8 × 8 prediction mode) of the luminance signal are 4 × 4 pixels and 8 × 8 pixels. One intra prediction mode is set for each block of luminance signals. For the 16 × 16 pixel intra prediction mode for luminance signals (intra 16 × 16 prediction mode) and the intra prediction mode for color difference signals, one prediction mode is set for one macroblock.

なお、予測モードの種類は、上述した図1の番号0,1,3乃至8で示される方向に対応している。予測モード2は平均値予測である。   Note that the types of prediction modes correspond to the directions indicated by the numbers 0, 1, 3 to 8 in FIG. Prediction mode 2 is average value prediction.

以上のようにH.264/AVC方式におけるイントラ予測は整数画素精度で行われる。これに対して、画像符号化装置51においては、小数画素精度のイントラ予測が行われる。   As above. Intra prediction in the H.264 / AVC format is performed with integer pixel accuracy. On the other hand, in the image encoding device 51, intra prediction with decimal pixel accuracy is performed.

[小数画素精度のイントラ予測の動作]
次に、図18を参照して、小数画素精度のイントラ予測を実現するための動作について説明する。なお、図18の例においては、対象ブロックが4×4画素の場合の例が示されている。
[Operation of intra prediction with decimal pixel precision]
Next, with reference to FIG. 18, an operation for realizing the intra prediction with decimal pixel accuracy will be described. In the example of FIG. 18, an example in which the target block is 4 × 4 pixels is shown.

図18の例の場合、黒丸がイントラ予測の対象ブロックの画素を表しており、白丸が対象ブロックに隣接する隣接画素を表している。さらに詳細には、白丸の隣接画素のうち、対象ブロックの左上部に隣接する左上部隣接画素は、A-1かつI-1であり、この画素は、図12の画素値Mの画素に相当する。白丸の隣接画素のうち、対象ブロックの上部に隣接する上部隣接画素は、A0, A1, A2,…であり、これらの画素は、図12の画素値A乃至Hの画素に相当する。白丸の隣接画素のうち、対象ブロックの左部に隣接する左部隣接画素は、I0, I1, I2,…であり、これらの画素は、図12の画素値I乃至Lの画素に相当する。   In the example of FIG. 18, black circles represent pixels of the target block for intra prediction, and white circles represent adjacent pixels adjacent to the target block. More specifically, among the adjacent pixels of the white circle, the upper left adjacent pixel adjacent to the upper left of the target block is A-1 and I-1, and this pixel corresponds to the pixel having the pixel value M in FIG. To do. Among the white circle adjacent pixels, the upper adjacent pixels adjacent to the upper part of the target block are A0, A1, A2,..., And these pixels correspond to the pixels having the pixel values A to H in FIG. Among the white circle adjacent pixels, the left adjacent pixels adjacent to the left portion of the target block are I0, I1, I2,..., And these pixels correspond to pixels having pixel values I to L in FIG.

また、隣接画素の間に示されるa-0.5,a+0.5,…およびi-0.5,i+0.5,…は、1/2画素精度の画素を表している。さらに、a-0.5,a+0.5,…およびi-0.5,i+0.5,…の画素間に示されるa-0.75,a-0.25,a+0.25,a+0.75,…およびi-0.75,i-0.25,i+0.25,i+0.75,…は、1/4画素精度の画素を表している。   Also, a-0.5, a + 0.5,... And i-0.5, i + 0.5,... Shown between adjacent pixels represent pixels with 1/2 pixel accuracy. Further, a-0.75, a-0.25, a + 0.25, a + 0.75,... And i-0.75, i shown between the pixels of a-0.5, a + 0.5, ... and i-0.5, i + 0.5, ... -0.25, i + 0.25, i + 0.75,... Represent pixels with 1/4 pixel accuracy.

まず、第1の動作として、イントラ予測部74においては、図12に示される画素値A乃至Mを用いて、各イントラ予測モードに対してイントラ予測が行われ、各イントラ予測モードの中から、最適イントラ予測モードが決定される。対象ブロックが4×4の場合、この最適イントラ予測モードは、図10または図11の9つの予測モードのいずれかである。   First, as a first operation, the intra prediction unit 74 performs intra prediction for each intra prediction mode using the pixel values A to M shown in FIG. An optimal intra prediction mode is determined. When the target block is 4 × 4, this optimal intra prediction mode is one of the nine prediction modes in FIG. 10 or FIG. 11.

例えば、最適イントラ予測モードとして、モード0(Vertical Prediction mode)が選ばれたとする。このとき、対象ブロックの予測に用いられる隣接画素は、図12の画素値A乃至Dの画素であり、図18の画素A0, A1, A2, A3となる。   For example, it is assumed that mode 0 (Vertical Prediction mode) is selected as the optimal intra prediction mode. At this time, adjacent pixels used for prediction of the target block are pixels having pixel values A to D in FIG. 12, and are pixels A0, A1, A2, and A3 in FIG.

第2の動作として、隣接画素内挿部75においては、図4を参照して上述したH.264/AVC方式における6タップのFIRフィルタにより、図18の1/2画素精度の画素a-0.5,a+0.5,…が生成される。すなわち、画素a-0.5は、次の式(32)で示される。

a-0.5 = (A-2 -5*A-1 + 20*A0 + 20*A1 -5*A1 + A2 + 16) >> 5
・・・(32)

他の1/2画素精度の画素a+0.5, a+1.5などに関しても同様である。
As a second operation, in the adjacent pixel interpolation unit 75, the H.P. described above with reference to FIG. The pixels a-0.5, a + 0.5,... With 1/2 pixel accuracy in FIG. That is, the pixel a-0.5 is represented by the following equation (32).

a-0.5 = (A-2 -5 * A-1 + 20 * A0 + 20 * A1 -5 * A1 + A2 + 16) >> 5
... (32)

The same applies to the other pixels a + 0.5, a + 1.5, etc. with half-pixel accuracy.

第3の動作として、隣接画素内挿部75においては、画素A0, A1, A2, A3および画素a-0.5,a+0.5などから、図18の1/4画素精度の画素a-0.75,a-0.25,a+0.25,a+0.75が、線形内挿により生成される。すなわち、画素a+0.25は、次の式(33)で示される。   As a third operation, in the adjacent pixel interpolation unit 75, from the pixels A0, A1, A2, A3, the pixels a-0.5, a + 0.5, and the like, the pixels a-0.75, a having the 1/4 pixel accuracy of FIG. -0.25, a + 0.25, a + 0.75 are generated by linear interpolation. That is, the pixel a + 0.25 is expressed by the following equation (33).

a-0.5 = A0 + a+0.5 + 1) >> 2 ・・・(33)

他の1/4画素精度の画素に関しても同様である。
a-0.5 = A0 + a + 0.5 + 1) >> 2 (33)

The same applies to other ¼ pixel precision pixels.

第4の動作として、イントラ予測部74においては、モード0の場合、整数画素と各小数画素精度の位相差である-0.75,-0.50,-0.25,+0.25,+0.50,+0.75の値を、水平方向のシフト量の候補として、最適なシフト量が決定される。   As a fourth operation, in the mode 0, in the intra prediction unit 74, values of −0.75, −0.50, −0.25, +0.25, +0.50, and +0.75, which are phase differences between the integer pixels and the decimal pixel precision, are set. The optimum shift amount is determined as a candidate for the horizontal shift amount.

例えば、シフト量が+0.25の場合には、画素A0, A1, A2, A3の画素値の代わりに、画素a+0.25,a+1.25,a+2.25,a+3.25の画素値が用いられて、イントラ予測が行われる。   For example, when the shift amount is +0.25, the pixel values of the pixels a + 0.25, a + 1.25, a + 2.25, a + 3.25 are used instead of the pixel values of the pixels A0, A1, A2, A3. Intra prediction is performed.

このように、第1の動作で選択された最適イントラ予測モードに対して、最適なシフト量が決定される。例えば、シフト量が0の場合が最適とされて、整数画素の画素値が用いられる場合もあり得る。   Thus, the optimal shift amount is determined for the optimal intra prediction mode selected in the first operation. For example, it may be optimal when the shift amount is 0, and a pixel value of an integer pixel may be used.

なお、図10または図11に示される9つの予測モードのうち、モード2(DC prediction mode)に関しては、平均値処理を行うことになる。したがって、シフトを行ったとしても、符号化効率の向上には直接関与しないため、上述した動作は禁止され、行われない。   Of the nine prediction modes shown in FIG. 10 or FIG. 11, the average value processing is performed for mode 2 (DC prediction mode). Therefore, even if the shift is performed, the above-described operation is prohibited and is not performed because it is not directly related to the improvement of the coding efficiency.

モード0(Vertical Prediction mode)、モード3(Diagonal_Down_Left Prediction mode)、またはモード7(Vertical_Left Prediction mode)に関しては、図18における上部隣接画素A0, A1, A2,…のみのシフトが候補となる。   For mode 0 (Vertical Prediction mode), mode 3 (Diagonal_Down_Left Prediction mode), or mode 7 (Vertical_Left Prediction mode), only the upper adjacent pixels A0, A1, A2,.

モード1(Horizontal Prediction mode)、またはモード8(Horizontal_Up Prediction mode)に関しては、図18における左部隣接画素I0, I1, I2,…のみのシフトが候補となる。   For mode 1 (Horizontal Prediction mode) or mode 8 (Horizontal_Up Prediction mode), only the left adjacent pixels I0, I1, I2,... In FIG.

その他のモード(モード4乃至6)に関しては、上部隣接画素および左部隣接画素の双方に関して、シフトを考慮する必要がある。   For the other modes (modes 4 to 6), it is necessary to consider the shift for both the upper adjacent pixel and the left adjacent pixel.

また、上部隣接画素に関しては、水平方向のシフト量のみが決定され、左部隣接画素に関しては、垂直方向のシフト量のみが決定される。   For the upper adjacent pixel, only the horizontal shift amount is determined, and for the left adjacent pixel, only the vertical shift amount is determined.

以上の第1乃至第4の動作を行い、最適なシフト量を決定することにより、イントラ予測モードにおいて用いられる画素値の選択肢を増やすことができ、より最適なイントラ予測を行うことができる。これにより、イントラ予測における符号化効率をさらに向上させることが可能である。   By performing the above first to fourth operations and determining the optimum shift amount, the choices of pixel values used in the intra prediction mode can be increased, and more optimum intra prediction can be performed. Thereby, it is possible to further improve the encoding efficiency in intra prediction.

また、H.264/AVC方式においては、図4を参照して上述したように、インター動き予測補償にしか用いられなかった6タップのFIRフィルタの回路を、イントラ予測にも有効活用することができる。これにより、回路を増大させることなく、効率を改善することができる。   H. In the H.264 / AVC format, as described above with reference to FIG. 4, the 6-tap FIR filter circuit that was used only for inter motion prediction compensation can be effectively used for intra prediction. Thereby, the efficiency can be improved without increasing the circuit.

さらに、H.264/AVC方式において定められているイントラ予測の分解能である22.5°よりさらに細かい分解能でのイントラ予測を行うことができる。   In addition, H. It is possible to perform intra prediction at a resolution finer than 22.5 ° which is the resolution of intra prediction defined in the H.264 / AVC format.

[小数画素精度のイントラ予測の効果例]
図19の例において、点線は、図1を参照して上述したH.264/AVC方式のイントラ予測の予測モードの方向を表している。点線に付された番号は、図10または図11に示されている9つの予測モードの番号に対応している。なお、モード2は、平均値予測であるため、その番号が示されていない。
[Example of effects of intra prediction with decimal pixel precision]
In the example of FIG. 19, the dotted line indicates the H.264 described above with reference to FIG. This indicates the direction of the prediction mode of the H.264 / AVC system intra prediction. The numbers given to the dotted lines correspond to the numbers of the nine prediction modes shown in FIG. 10 or FIG. Since mode 2 is an average value prediction, its number is not shown.

H.264/AVC方式においては、点線に示す22.5°の分解能でしかイントラ予測を行うことができなかった。これに対して、画像符号化装置51においては、小数画素精度のイントラ予測を行うことにより、太線が表すように22.5°よりさらに細かな分解能でのイントラ予測を行うことができる。これにより、特に、斜めエッジを持つテクスチャに対する符号化効率を向上させることができる。   H. In the H.264 / AVC format, intra prediction could be performed only at the resolution of 22.5 ° shown by the dotted line. On the other hand, in the image encoding device 51, by performing intra prediction with decimal pixel accuracy, it is possible to perform intra prediction with a resolution finer than 22.5 ° as indicated by a thick line. Thereby, especially the encoding efficiency with respect to the texture with a diagonal edge can be improved.

[イントラ予測処理の説明]
次に、図20のフローチャートを参照して、上述した動作としてのイントラ予測処理を説明する。なお、このイントラ予測処理は、図8のステップS31におけるイントラ予測処理であり、図20の例においては、輝度信号の場合を例として説明する。
[Description of intra prediction processing]
Next, the intra prediction process as the operation described above will be described with reference to the flowchart of FIG. This intra prediction process is the intra prediction process in step S31 of FIG. 8, and in the example of FIG. 20, a case of a luminance signal will be described as an example.

最適モード決定部82は、ステップS41において、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対してイントラ予測を行う。   In step S41, the optimal mode determination unit 82 performs intra prediction for each of the 4 × 4 pixel, 8 × 8 pixel, and 16 × 16 pixel intra prediction modes.

上述したように、イントラ4×4予測モードとイントラ8×8予測モードには、9種類の予測モードがあり、それぞれブロック毎に1つの予測モードを定義することができる。イントラ16×16予測モードと色差信号のイントラ予測モードには、4種類の予測モードがあり、1つのマクロブロックに対して1つの予測モードを定義することができる。   As described above, the intra 4 × 4 prediction mode and the intra 8 × 8 prediction mode have nine types of prediction modes, and one prediction mode can be defined for each block. The intra 16 × 16 prediction mode and the color difference signal intra prediction mode include four types of prediction modes, and one prediction mode can be defined for one macroblock.

最適モード決定部82は、処理対象のブロックの画素を、隣接画像バッファ81から読み出される復号済みの隣接画像を参照して、各イントラ予測モードのすべての種類の予測モードで、イントラ予測する。これにより、各イントラ予測モードのすべての種類の予測モードでの予測画像が生成される。なお、参照される復号済みの画素としては、デブロックフィルタ71によりデブロックフィルタリングされていない画素が用いられる。   The optimum mode determination unit 82 performs intra prediction on the pixels of the processing target block with reference to the decoded adjacent image read from the adjacent image buffer 81 in all types of prediction modes of each intra prediction mode. Thereby, the prediction image in all kinds of prediction modes of each intra prediction mode is generated. Note that pixels that have not been deblocked filtered by the deblocking filter 71 are used as decoded pixels that are referred to.

最適モード決定部82は、ステップS42において、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対するコスト関数値を算出する。ここで、コスト関数値としては、High Complexity モードか、Low Complexity モードのいずれかの手法に基づいて行う。これらのモードは、H.264/AVC方式における参照ソフトウエアであるJM(Joint Model)で定められている。   In step S42, the optimum mode determination unit 82 calculates cost function values for the 4 × 4 pixel, 8 × 8 pixel, and 16 × 16 pixel intra prediction modes. Here, the cost function value is determined based on either the High Complexity mode or the Low Complexity mode. These modes are H.264. It is defined by JM (Joint Model) which is reference software in the H.264 / AVC format.

すなわち、High Complexity モードにおいては、ステップS41の処理として、候補となる全ての予測モードに対して、仮に符号化処理までが行われる。そして、次の式(34)で表わされるコスト関数値が各予測モードに対して算出され、その最小値を与える予測モードが最適予測モードであるとして選択される。   In other words, in the High Complexity mode, the process up to step S41 is temporarily performed up to the encoding process for all candidate prediction modes. Then, the cost function value represented by the following equation (34) is calculated for each prediction mode, and the prediction mode that gives the minimum value is selected as the optimal prediction mode.

Cost(Mode) = D + λ・R ・・・(34)

Dは、原画像と復号画像の差分(歪)、Rは、直交変換係数まで含んだ発生符号量、λは、量子化パラメータQPの関数として与えられるラグランジュ乗数である。
Cost (Mode) = D + λ · R (34)

D is a difference (distortion) between the original image and the decoded image, R is a generated code amount including up to the orthogonal transform coefficient, and λ is a Lagrange multiplier given as a function of the quantization parameter QP.

一方、Low Complexity モードにおいては、ステップS41の処理として、候補となる全ての予測モードに対して、予測画像の生成、および、動きベクトル情報や予測モード情報、フラグ情報などのヘッダビットまでが算出される。そして、次の式(35)で表わされるコスト関数値が各予測モードに対して算出され、その最小値を与える予測モードが最適予測モードであるとして選択される。   On the other hand, in the Low Complexity mode, as a process in step S41, generation of a prediction image and header bits such as motion vector information, prediction mode information, and flag information are calculated for all candidate prediction modes. The Then, the cost function value represented by the following equation (35) is calculated for each prediction mode, and the prediction mode that gives the minimum value is selected as the optimum prediction mode.

Cost(Mode) = D + QPtoQuant(QP)・Header_Bit ・・・(35)

Dは、原画像と復号画像の差分(歪)、Header_Bitは、予測モードに対するヘッダビット、QPtoQuantは、量子化パラメータQPの関数として与えられる関数である。
Cost (Mode) = D + QPtoQuant (QP) · Header_Bit (35)

D is a difference (distortion) between the original image and the decoded image, Header_Bit is a header bit for the prediction mode, and QPtoQuant is a function given as a function of the quantization parameter QP.

Low Complexity モードにおいては、全ての予測モードに対して、予測画像を生成するのみで、符号化処理および復号処理を行う必要がないため、演算量が少なくて済む。   In the Low Complexity mode, only a prediction image is generated for all prediction modes, and it is not necessary to perform encoding processing and decoding processing.

最適モード決定部82は、ステップS43において、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対して、それぞれ最適モードを決定する。すなわち、上述したように、イントラ4×4予測モードおよびイントラ8×8予測モードの場合には、予測モードの種類が9種類あり、イントラ16×16予測モードの場合には、予測モードの種類が4種類ある。したがって、最適モード決定部82は、ステップS42において算出されたコスト関数値に基づいて、それらの中から、最適イントラ4×4予測モード、最適イントラ8×8予測モード、最適イントラ16×16予測モードを決定する。   In step S43, the optimal mode determination unit 82 determines an optimal mode for each of the 4 × 4 pixel, 8 × 8 pixel, and 16 × 16 pixel intra prediction modes. That is, as described above, in the case of the intra 4 × 4 prediction mode and the intra 8 × 8 prediction mode, there are nine types of prediction modes, and in the case of the intra 16 × 16 prediction mode, there are types of prediction modes. There are four types. Therefore, based on the cost function value calculated in step S42, the optimal mode determination unit 82 selects among them the optimal intra 4 × 4 prediction mode, optimal intra 8 × 8 prediction mode, and optimal intra 16 × 16 prediction mode. To decide.

最適モード決定部82は、ステップS44において、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対して決定された各最適モードの中から、ステップS42において算出されたコスト関数値に基づく最適イントラ予測モードを選択する。すなわち、4×4画素、8×8画素、および16×16画素に対して決定された各最適モードの中から、コスト関数値が最小値であるモードを、最適イントラ予測モードとして選択する。   The optimum mode determination unit 82 is calculated in step S42 from among the optimum modes determined for the 4 × 4 pixel, 8 × 8 pixel, and 16 × 16 pixel intra prediction modes in step S44. The optimal intra prediction mode based on the cost function value is selected. That is, the mode having the minimum cost function value is selected as the optimum intra prediction mode from among the optimum modes determined for 4 × 4 pixels, 8 × 8 pixels, and 16 × 16 pixels.

決定された予測モードの情報は、モード判別部91、最適シフト量決定部83、および予測画像生成部84に供給される。また、予測画像生成部84には、予測モードに対応するコスト関数値も供給される。   Information on the determined prediction mode is supplied to the mode determination unit 91, the optimum shift amount determination unit 83, and the predicted image generation unit 84. The cost function value corresponding to the prediction mode is also supplied to the predicted image generation unit 84.

隣接画素内挿部75および最適シフト量決定部83は、ステップS45において、隣接内挿処理を実行する。ステップS45における隣接内挿処理の詳細は、図21を参照して後述するが、この処理により、決定された最適イントラ予測モードに応じたシフト方向に、最適なシフト量が決定される。決定された最適なシフト量に関する情報は、予測画像生成部84に供給される。   In step S45, the adjacent pixel interpolation unit 75 and the optimum shift amount determination unit 83 perform adjacent interpolation processing. The details of the adjacent interpolation process in step S45 will be described later with reference to FIG. 21. With this process, an optimal shift amount is determined in the shift direction corresponding to the determined optimal intra prediction mode. Information on the determined optimum shift amount is supplied to the predicted image generation unit 84.

ステップS46において、予測画像生成部84は、最適シフト量で位相がシフトされた隣接画素を用いて、予測画像を生成する。   In step S <b> 46, the predicted image generation unit 84 generates a predicted image using adjacent pixels whose phase is shifted by the optimum shift amount.

すなわち、予測画像生成部84は、イントラ予測する対象ブロックに対応する隣接画素を隣接画像バッファ81から読み出す。そして、予測画像生成部84は、6タップのFIRフィルタおよび線形内挿により、予測モードに応じた位相方向に、読みだした隣接画素の位相を最適シフト量でシフトする。予測画像生成部84は、位相がシフトされた隣接画素を用いて、最適モード決定部82により決定された予測モードでイントラ予測を行い、対象ブロックの予測画像を生成し、生成された予測画像と、対応するコスト関数値を予測画像選択部77に供給する。   That is, the predicted image generation unit 84 reads adjacent pixels corresponding to the target block to be intra predicted from the adjacent image buffer 81. Then, the predicted image generation unit 84 shifts the phase of the read adjacent pixel by the optimal shift amount in the phase direction corresponding to the prediction mode, using a 6-tap FIR filter and linear interpolation. The prediction image generation unit 84 performs intra prediction in the prediction mode determined by the optimal mode determination unit 82 using the adjacent pixels whose phases are shifted, generates a prediction image of the target block, and the generated prediction image and The corresponding cost function value is supplied to the predicted image selection unit 77.

なお、最適シフト量が0の場合には、隣接画像バッファ81からの隣接画素の画素値が用いられる。   When the optimum shift amount is 0, the pixel value of the adjacent pixel from the adjacent image buffer 81 is used.

予測画像選択部77により最適イントラ予測モードで生成された予測画像が選択された場合、予測画像生成部84により、これらの最適イントラ予測モードを示す情報とシフト量の情報は、可逆符号化部66に供給される。そして、可逆符号化部66において、符号化され、圧縮画像のヘッダ情報に付加される(上述した図7のステップS23)。   When a predicted image generated in the optimal intra prediction mode is selected by the predicted image selection unit 77, the information indicating the optimal intra prediction mode and the information on the shift amount are stored in the lossless encoding unit 66 by the predicted image generation unit 84. To be supplied. Then, it is encoded by the lossless encoding unit 66 and added to the header information of the compressed image (step S23 in FIG. 7 described above).

なお、このシフト量の情報の符号化としては、決定された対象ブロックのシフト量と、図13を参照して上述したMostProbableModeを与えるブロックにおけるシフト量との差分が符号化される。   As the encoding of the shift amount information, the difference between the determined shift amount of the target block and the shift amount in the block that gives the MostProbableMode described above with reference to FIG. 13 is encoded.

ただし、例えば、MostProbableModeがモード2(DC予測)であり、対象ブロックの予測モードがモード0(Vertical予測)である場合、MostProbableModeを与えるブロックにおける水平方向のシフト量は存在しないことになる。また、インタースライスにおけるイントラマクロブロックであるという事情によっても、MostProbableModeを与えるブロックにおける水平方向のシフト量は存在しないことになる。   However, for example, when MostProbableMode is mode 2 (DC prediction) and the prediction mode of the target block is mode 0 (Vertical prediction), there is no horizontal shift amount in the block giving MostProbableMode. Also, due to the fact that it is an intra macroblock in an inter slice, there is no horizontal shift amount in a block that gives MostProbableMode.

このような場合には、MostProbableModeを与えるブロックにおける水平方向のシフト量は0であるとして、差分符号化処理が行われる。   In such a case, the differential encoding process is performed assuming that the horizontal shift amount in the block to which MostProbableMode is given is zero.

[隣接画素内挿処理の説明]
次に、図21のフローチャートを参照して、図20のステップS45の隣接画素内挿処理について説明する。図21の例においては、対象ブロックが4×4の場合について説明される。
[Description of adjacent pixel interpolation processing]
Next, the adjacent pixel interpolation processing in step S45 of FIG. 20 will be described with reference to the flowchart of FIG. In the example of FIG. 21, a case where the target block is 4 × 4 will be described.

最適モード決定部82により決定された予測モードの情報は、モード判別部91に供給される。モード判別部91は、ステップS51において、最適イントラ予測モードがDCモードであるか否かを判定する。ステップS51において、最適イントラ予測モードがDCモードではないと判定された場合、処理は、ステップS52に進む。   Information on the prediction mode determined by the optimal mode determination unit 82 is supplied to the mode determination unit 91. In step S51, the mode determination unit 91 determines whether or not the optimal intra prediction mode is the DC mode. If it is determined in step S51 that the optimal intra prediction mode is not the DC mode, the process proceeds to step S52.

ステップS52において、モード判別部91は、最適イントラ予測モードが、Vertical Prediction mode、Diagonal_Down_Left Prediction mode、またはVertical_Left Prediction modeであるか否かを判定する。   In step S52, the mode determination unit 91 determines whether or not the optimal intra prediction mode is Vertical Prediction mode, Diagonal_Down_Left Prediction mode, or Vertical_Left Prediction mode.

ステップS52において、最適イントラ予測モードが、Vertical Prediction mode、Diagonal_Down_Left Prediction mode、またはVertical_Left Prediction modeであると判定された場合、処理は、ステップS53に進む。   In Step S52, when it is determined that the optimal intra prediction mode is Vertical Prediction mode, Diagonal_Down_Left Prediction mode, or Vertical_Left Prediction mode, the process proceeds to Step S53.

ステップS53において、モード判別部91は、水平方向内挿部92に制御信号を出力し、水平方向の内挿を行わせる。すなわち、水平方向内挿部92は、モード判別部91からの制御信号に応じて、隣接画像バッファ81より上部隣接画素を読み出し、6タップのFIRフィルタおよび線形内挿により、読み出した上部隣接画素に対して、水平方向の位相をシフトする。水平方向内挿部92は、内挿された上部隣接画素の情報を、最適シフト量決定部83に供給する。   In step S <b> 53, the mode determination unit 91 outputs a control signal to the horizontal direction interpolation unit 92 to perform horizontal direction interpolation. That is, the horizontal direction interpolation unit 92 reads the upper adjacent pixel from the adjacent image buffer 81 in accordance with the control signal from the mode determination unit 91, and uses the 6-tap FIR filter and linear interpolation to read the upper adjacent pixel. On the other hand, the phase in the horizontal direction is shifted. The horizontal direction interpolation unit 92 supplies the information on the interpolated upper adjacent pixel to the optimum shift amount determination unit 83.

ステップS54において、最適シフト量決定部83は、最適モード決定部82により決定された予測モードについて、-0.75乃至+0.75のうち、上部隣接画素の最適シフト量を決定する。なお、この決定には、イントラ予測する対象ブロックの画像、隣接画像バッファ81から読み出される上部隣接画素、および内挿された上部隣接画素の情報が用いられる。また、このとき、左部隣接画素についての最適シフト量は0とされる。決定された最適シフト量の情報は、予測画像生成部84に供給される。   In step S54, the optimal shift amount determination unit 83 determines the optimal shift amount of the upper adjacent pixel from −0.75 to +0.75 for the prediction mode determined by the optimal mode determination unit 82. For this determination, information on the target block image to be intra-predicted, upper adjacent pixels read from the adjacent image buffer 81, and interpolated upper adjacent pixels are used. At this time, the optimum shift amount for the left adjacent pixel is set to zero. Information on the determined optimum shift amount is supplied to the predicted image generation unit 84.

ステップS52において、最適イントラ予測モードが、Vertical Prediction mode、Diagonal_Down_Left Prediction mode、およびVertical_Left Prediction modeではないと判定された場合、処理は、ステップS55に進む。   If it is determined in step S52 that the optimal intra prediction mode is not Vertical Prediction mode, Diagonal_Down_Left Prediction mode, or Vertical_Left Prediction mode, the process proceeds to step S55.

ステップS55において、モード判別部91は、最適イントラ予測モードがHorizontal Prediction mode、またはHorizontal_Up Prediction modeであるか否かを判定する。ステップS55において、最適イントラ予測モードがHorizontal Prediction mode、またはHorizontal_Up Prediction modeであると判定された場合、処理は、ステップS56に進む。   In step S55, the mode determination unit 91 determines whether or not the optimal intra prediction mode is the Horizontal Prediction mode or the Horizontal_Up Prediction mode. In Step S55, when it is determined that the optimal intra prediction mode is Horizontal Prediction mode or Horizontal_Up Prediction mode, the process proceeds to Step S56.

ステップS56において、モード判別部91は、垂直方向内挿部93に制御信号を出力し、垂直方向の内挿を行わせる。すなわち、垂直方向内挿部93は、モード判別部91からの制御信号に応じて、隣接画像バッファ81より左部隣接画素を読み出し、6タップのFIRフィルタおよび線形内挿により、読み出した左部隣接画素に対して垂直方向の位相をシフトする。垂直方向内挿部93は、内挿された左部隣接画素の情報を、最適シフト量決定部83に供給する。   In step S56, the mode determination unit 91 outputs a control signal to the vertical direction interpolation unit 93 to perform vertical direction interpolation. That is, the vertical interpolation unit 93 reads the left adjacent pixel from the adjacent image buffer 81 in accordance with the control signal from the mode determination unit 91, and reads the left adjacent pixel by the 6-tap FIR filter and linear interpolation. The phase in the vertical direction is shifted with respect to the pixel. The vertical direction interpolation unit 93 supplies the interpolated left adjacent pixel information to the optimum shift amount determination unit 83.

ステップS57において、最適シフト量決定部83は、最適モード決定部82により決定された予測モードについて、-0.75乃至+0.75のうち、左部隣接画素の最適シフト量を決定する。なお、この決定には、イントラ予測する対象ブロックの画像、隣接画像バッファ81から読み出される左部隣接画素、および内挿された左部隣接画素の情報が用いられる。また、このとき、上部隣接画素についての最適シフト量は0とされる。決定された最適シフト量の情報は、予測画像生成部84に供給される。   In step S57, the optimal shift amount determination unit 83 determines the optimal shift amount of the left adjacent pixel from −0.75 to +0.75 for the prediction mode determined by the optimal mode determination unit 82. For this determination, information on the target block image to be intra-predicted, the left adjacent pixel read from the adjacent image buffer 81, and the interpolated left adjacent pixel are used. At this time, the optimum shift amount for the upper adjacent pixel is set to zero. Information on the determined optimum shift amount is supplied to the predicted image generation unit 84.

ステップS55において、最適イントラ予測モードがHorizontal Prediction mode、およびHorizontal_Up Prediction modeではないと判定された場合、処理は、ステップS58に進む。   In Step S55, when it is determined that the optimal intra prediction mode is not the Horizontal Prediction mode and the Horizontal_Up Prediction mode, the process proceeds to Step S58.

ステップS58において、モード判別部91は、水平方向内挿部92に制御信号を出力し、水平方向の内挿を行わせ、垂直方向内挿部93に制御信号を出力し、垂直方向の内挿を行わせる。   In step S58, the mode determination unit 91 outputs a control signal to the horizontal interpolation unit 92, performs horizontal interpolation, outputs a control signal to the vertical interpolation unit 93, and performs vertical interpolation. To do.

すなわち、水平方向内挿部92は、モード判別部91からの制御信号に応じて、隣接画像バッファ81より上部隣接画素を読み出し、6タップのFIRフィルタおよび線形内挿により、読み出した上部隣接画素に対して水平方向の位相をシフトする。水平方向内挿部92は、内挿された上部隣接画素の情報を、最適シフト量決定部83に供給する。   That is, the horizontal direction interpolation unit 92 reads the upper adjacent pixel from the adjacent image buffer 81 in accordance with the control signal from the mode determination unit 91, and uses the 6-tap FIR filter and linear interpolation to read the upper adjacent pixel. In contrast, the phase in the horizontal direction is shifted. The horizontal direction interpolation unit 92 supplies the information on the interpolated upper adjacent pixel to the optimum shift amount determination unit 83.

また、垂直方向内挿部93は、モード判別部91からの制御信号に応じて、隣接画像バッファ81より左部隣接画素を読み出し、6タップのFIRフィルタおよび線形内挿により、読み出した左部隣接画素に対して垂直方向の位相をシフトする。垂直方向内挿部93は、内挿された左部隣接画素の情報を、最適シフト量決定部83に供給する。   The vertical interpolation unit 93 reads the left adjacent pixel from the adjacent image buffer 81 in accordance with the control signal from the mode determination unit 91, and reads the left adjacent pixel by a 6-tap FIR filter and linear interpolation. The phase in the vertical direction is shifted with respect to the pixel. The vertical direction interpolation unit 93 supplies the interpolated left adjacent pixel information to the optimum shift amount determination unit 83.

ステップS59において、最適シフト量決定部83は、最適モード決定部82により決定された予測モードについて、-0.75乃至+0.75のうち、上部および左部隣接画素の最適シフト量を決定する。この決定には、イントラ予測する対象ブロックの画像、隣接画像バッファ81から読み出される上部および左部隣接画素、並びに内挿された上部および左部隣接画素の情報が用いられる。決定された最適シフト量の情報は、予測画像生成部84に供給される。   In step S59, the optimal shift amount determination unit 83 determines the optimal shift amounts of the upper and left adjacent pixels from −0.75 to +0.75 for the prediction mode determined by the optimal mode determination unit 82. This determination uses the image of the target block to be intra-predicted, the upper and left adjacent pixels read from the adjacent image buffer 81, and the interpolated upper and left adjacent pixels. Information on the determined optimum shift amount is supplied to the predicted image generation unit 84.

一方、ステップS51において、最適イントラ予測モードがDCモードであると判定された場合、隣接画素内挿処理は終了される。すなわち、水平方向内挿部82および垂直方向内挿部83は動作せず、最適シフト量決定部83においては、シフト量0が最適シフト量に決定される。   On the other hand, when it is determined in step S51 that the optimal intra prediction mode is the DC mode, the adjacent pixel interpolation process is ended. That is, the horizontal direction interpolation unit 82 and the vertical direction interpolation unit 83 do not operate, and the optimal shift amount determination unit 83 determines the shift amount 0 as the optimal shift amount.

[インター動き予測処理の説明]
次に、図22のフローチャートを参照して、図8のステップS32のインター動き予測処理について説明する。
[Explanation of inter motion prediction processing]
Next, the inter motion prediction process in step S32 in FIG. 8 will be described with reference to the flowchart in FIG.

動き予測・補償部76は、ステップS61において、16×16画素乃至4×4画素からなる8種類の各インター予測モードに対して動きベクトルと参照画像をそれぞれ決定する。すなわち、各インター予測モードの処理対象のブロックについて、動きベクトルと参照画像がそれぞれ決定される。   In step S61, the motion prediction / compensation unit 76 determines a motion vector and a reference image for each of eight types of inter prediction modes including 16 × 16 pixels to 4 × 4 pixels. That is, a motion vector and a reference image are determined for each block to be processed in each inter prediction mode.

動き予測・補償部76は、ステップS62において、16×16画素乃至4×4画素からなる8種類の各インター予測モードについて、ステップS61で決定された動きベクトルに基づいて、参照画像に動き予測と補償処理を行う。この動き予測と補償処理により、各インター予測モードでの予測画像が生成される。   In step S62, the motion prediction / compensation unit 76 performs motion prediction on the reference image based on the motion vector determined in step S61 for each of the eight types of inter prediction modes including 16 × 16 pixels to 4 × 4 pixels. Perform compensation processing. By this motion prediction and compensation processing, a prediction image in each inter prediction mode is generated.

動き予測・補償部76は、ステップS63において、16×16画素乃至4×4画素からなる8種類の各インター予測モードに対して決定された動きベクトルについて、圧縮画像に付加するための動きベクトル情報を生成する。このとき、図5を参照して上述した動きベクトルの生成方法が用いられる。   In step S63, the motion prediction / compensation unit 76 adds motion vector information for adding to the compressed image the motion vectors determined for each of the eight types of inter prediction modes including 16 × 16 pixels to 4 × 4 pixels. Is generated. At this time, the motion vector generation method described above with reference to FIG. 5 is used.

生成された動きベクトル情報は、次のステップS64におけるコスト関数値算出の際にも用いられ、最終的に予測画像選択部77により対応する予測画像が選択された場合には、予測モード情報および参照フレーム情報とともに、可逆符号化部66へ出力される。   The generated motion vector information is also used when calculating the cost function value in the next step S64. When the corresponding predicted image is finally selected by the predicted image selection unit 77, the prediction mode information and reference It is output to the lossless encoding unit 66 together with the frame information.

動き予測・補償部76は、ステップS64において、16×16画素乃至4×4画素からなる8種類の各インター予測モードに対して、上述した式(34)または式(35)で示されるコスト関数値を算出する。ここで算出されたコスト関数値は、上述した図8のステップS34で最適インター予測モードを決定する際に用いられる。   In step S64, the motion prediction / compensation unit 76 performs the cost function represented by the above-described equation (34) or equation (35) for each of the eight types of inter prediction modes including 16 × 16 pixels to 4 × 4 pixels. Calculate the value. The cost function value calculated here is used when determining the optimal inter prediction mode in step S34 of FIG. 8 described above.

なお、本発明における動作原理は、図18、または図20および図21を参照して上述した動作に限らない。例えば、すべてのイントラ予測モードに対して、候補となるすべてのシフト量の予測値を算出し、その残差を算出して、最適イントラ予測モードおよび最適シフト量を決定するようにすることもできる。この動作を行う場合のイントラ予測部および隣接画素内挿部の構成例は、図23に示される。   The operation principle in the present invention is not limited to the operation described above with reference to FIG. 18, or FIG. 20 and FIG. For example, for all intra prediction modes, prediction values of all candidate shift amounts can be calculated, and the residual can be calculated to determine the optimal intra prediction mode and the optimal shift amount. . A configuration example of the intra prediction unit and the adjacent pixel interpolation unit in the case of performing this operation is illustrated in FIG.

[イントラ予測部および隣接画素内挿部の他の構成例]
図23は、イントラ予測部および隣接画素内挿部の他の構成例を示すブロック図である。
[Other Configuration Examples of Intra Prediction Unit and Adjacent Pixel Interpolation Unit]
FIG. 23 is a block diagram illustrating another configuration example of the intra prediction unit and the adjacent pixel interpolation unit.

図23の例の場合、イントラ予測部74は、隣接画像バッファ101、最適モード/最適シフト量決定部102、および予測画像生成部103により構成されている。   In the case of the example in FIG. 23, the intra prediction unit 74 includes an adjacent image buffer 101, an optimal mode / optimum shift amount determination unit 102, and a predicted image generation unit 103.

隣接画素内挿部75は、水平方向内挿部111、および垂直方向内挿部112により構成されている。   The adjacent pixel interpolation unit 75 includes a horizontal direction interpolation unit 111 and a vertical direction interpolation unit 112.

隣接画像バッファ101は、フレームメモリ72からのイントラ予測の対象ブロックの隣接画素を蓄積する。図23の場合も、スイッチ73の図示は省略されているが、実際には、隣接画素は、フレームメモリ72から、スイッチ73を介して隣接画像バッファ101に供給される。   The adjacent image buffer 101 accumulates adjacent pixels of the target block for intra prediction from the frame memory 72. Also in FIG. 23, the switch 73 is not shown, but actually, the adjacent pixels are supplied from the frame memory 72 to the adjacent image buffer 101 via the switch 73.

最適モード/最適シフト量決定部102には、イントラ予測する対象ブロックの画素が画面並べ替えバッファ62から入力される。最適モード/最適シフト量決定部102は、イントラ予測する対象ブロックに対応する隣接画素を隣接画像バッファ101から読み出す。   The optimal mode / optimum shift amount determination unit 102 receives the pixel of the target block for intra prediction from the screen rearrangement buffer 62. The optimum mode / optimum shift amount determination unit 102 reads adjacent pixels corresponding to the target block to be intra predicted from the adjacent image buffer 101.

最適モード/最適シフト量決定部102は、候補のイントラ予測モード(以下、候補モードと称する)の情報を、水平方向内挿部111および垂直方向内挿部112に供給する。最適モード/最適シフト量決定部102には、候補モードに応じて内挿された隣接画素の情報が水平方向内挿部111および垂直方向内挿部112から入力される。   The optimum mode / optimum shift amount determination unit 102 supplies information on candidate intra prediction modes (hereinafter referred to as candidate modes) to the horizontal direction interpolation unit 111 and the vertical direction interpolation unit 112. Information of adjacent pixels interpolated according to the candidate mode is input from the horizontal direction interpolation unit 111 and the vertical direction interpolation unit 112 to the optimal mode / optimum shift amount determination unit 102.

最適モード/最適シフト量決定部102は、イントラ予測する対象ブロックの画素、対応する隣接画素、および内挿された隣接画素の画素値を用いて、すべての候補モードおよびすべての候補シフト量に対して、イントラ予測を行い、予測画像を生成する。そして、最適モード/最適シフト量決定部102は、コスト関数値や予測残差などを算出して、すべての候補モードおよびすべてのシフト量の中から、最適なイントラ予測モードおよび最適なシフト量を決定する。決定された予測モードおよびシフト量の情報は、予測画像生成部103に供給される。なお、このとき、予測モードに対応するコスト関数値も予測画像生成部103に供給される。   The optimal mode / optimum shift amount determination unit 102 uses the pixel values of the target block to be intra-predicted, the corresponding adjacent pixels, and the interpolated adjacent pixels for all candidate modes and all candidate shift amounts. Then, intra prediction is performed to generate a predicted image. Then, the optimum mode / optimum shift amount determination unit 102 calculates a cost function value, a prediction residual, and the like, and selects an optimum intra prediction mode and an optimum shift amount from all candidate modes and all shift amounts. decide. Information on the determined prediction mode and shift amount is supplied to the predicted image generation unit 103. At this time, the cost function value corresponding to the prediction mode is also supplied to the predicted image generation unit 103.

予測画像生成部103は、イントラ予測する対象ブロックに対応する隣接画素を隣接画像バッファ101から読み出し、6タップのFIRフィルタおよび線形内挿により、予測モードに応じた位相方向に、読みだした隣接画素の位相を最適シフト量でシフトする。   The predicted image generation unit 103 reads adjacent pixels corresponding to the target block to be intra-predicted from the adjacent image buffer 101, and reads the adjacent pixels in the phase direction corresponding to the prediction mode by a 6-tap FIR filter and linear interpolation. Is shifted by the optimum shift amount.

予測画像生成部103は、位相がシフトされた隣接画素を用いて、最適モード/最適シフト量決定部102により決定された最適イントラ予測モードでイントラ予測を行い、対象ブロックの予測画像を生成する。予測画像生成部103は、生成された予測画像と、対応するコスト関数値を予測画像選択部77に出力する。   The prediction image generation unit 103 performs intra prediction in the optimal intra prediction mode determined by the optimal mode / optimum shift amount determination unit 102 using adjacent pixels whose phases are shifted, and generates a prediction image of the target block. The predicted image generation unit 103 outputs the generated predicted image and the corresponding cost function value to the predicted image selection unit 77.

また、予測画像生成部103は、予測画像選択部77により最適イントラ予測モードで生成された予測画像が選択された場合、最適イントラ予測モードを示す情報とシフト量の情報を、可逆符号化部66に供給する。   Further, when the predicted image generated in the optimal intra prediction mode is selected by the predicted image selection unit 77, the predicted image generation unit 103 converts the information indicating the optimal intra prediction mode and the shift amount information into the lossless encoding unit 66. To supply.

水平方向内挿部111および垂直方向内挿部112は、最適モード/最適シフト量決定部102からの候補モードに応じて、隣接画像バッファ101より隣接画素をそれぞれ読み出す。水平方向内挿部111および垂直方向内挿部112は、6タップのFIRフィルタおよび線形内挿により、読み出した隣接画素に対して、水平方向および垂直方向に、それぞれ、位相をシフトする。   The horizontal direction interpolation unit 111 and the vertical direction interpolation unit 112 read adjacent pixels from the adjacent image buffer 101 according to the candidate mode from the optimal mode / optimum shift amount determination unit 102, respectively. The horizontal direction interpolating unit 111 and the vertical direction interpolating unit 112 shift the phase in the horizontal direction and the vertical direction, respectively, with respect to the read adjacent pixels by a 6-tap FIR filter and linear interpolation.

[イントラ予測処理の他の説明]
次に、図24のフローチャートを参照して、図23のイントラ予測部74および隣接画素内挿部75が行うイントラ予測処理を説明する。なお、このイントラ予測処理は、図8のステップS31におけるイントラ予測処理の他の例である。
[Other explanation of intra prediction processing]
Next, the intra prediction process performed by the intra prediction unit 74 and the adjacent pixel interpolation unit 75 in FIG. 23 will be described with reference to the flowchart in FIG. This intra prediction process is another example of the intra prediction process in step S31 of FIG.

最適モード/最適シフト量決定部102は、候補のイントラ予測モードの情報を、水平方向内挿部111および垂直方向内挿部112に供給する。   The optimum mode / optimum shift amount determination unit 102 supplies information on candidate intra prediction modes to the horizontal direction interpolation unit 111 and the vertical direction interpolation unit 112.

ステップS101において、水平方向内挿部111および垂直方向内挿部112は、すべての候補のイントラ予測モードに対して、隣接画素内挿処理を実行する。すなわち、ステップS101においては、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対して、隣接画素内挿処理がそれぞれ実行される。   In step S101, the horizontal direction interpolation unit 111 and the vertical direction interpolation unit 112 perform adjacent pixel interpolation processing on all candidate intra prediction modes. That is, in step S101, adjacent pixel interpolation processing is executed for each intra prediction mode of 4 × 4 pixels, 8 × 8 pixels, and 16 × 16 pixels.

ステップS101における隣接内挿処理の詳細は、図25を参照して後述するが、この処理により、各イントラ予測モードに応じたシフト方向に内挿された隣接画素の情報が、最適モード/最適シフト量決定部102に供給される。   The details of the adjacent interpolation process in step S101 will be described later with reference to FIG. 25. By this process, information on adjacent pixels interpolated in the shift direction corresponding to each intra prediction mode is converted into the optimum mode / optimum shift. The amount is supplied to the quantity determination unit 102.

ステップS102において、最適モード/最適シフト量決定部102は、4×4画素、8×8画素、および16×16画素の各イントラ予測モードと各シフト量に対してイントラ予測を行う。   In step S102, the optimum mode / optimum shift amount determination unit 102 performs intra prediction for each intra prediction mode and each shift amount of 4 × 4 pixels, 8 × 8 pixels, and 16 × 16 pixels.

すなわち、最適モード/最適シフト量決定部102は、イントラ予測する対象ブロックの画素、対応する隣接画素、および内挿された隣接画素の画素値を用いて、すべてのイントラ予測モードおよびすべての候補シフト量に対して、イントラ予測を行う。この結果、すべてのイントラ予測モードおよびすべての候補シフト量に対して、予測画像が生成される。   That is, the optimum mode / optimum shift amount determination unit 102 uses the pixel values of the target block to be intra-predicted, the corresponding adjacent pixels, and the interpolated adjacent pixel values, for all intra prediction modes and all candidate shifts. Intra prediction is performed on the quantity. As a result, prediction images are generated for all intra prediction modes and all candidate shift amounts.

ステップS103において、最適モード/最適シフト量決定部102は、予測画像を生成した4×4画素、8×8画素、および16×16画素の各イントラ予測モードと各シフト量に対して、上述した式(34)または式(35)のコスト関数値を算出する。   In step S103, the optimum mode / optimum shift amount determination unit 102 described above for each intra prediction mode and each shift amount of 4 × 4 pixels, 8 × 8 pixels, and 16 × 16 pixels that generated the predicted image. The cost function value of Expression (34) or Expression (35) is calculated.

ステップS104において、最適モード/最適シフト量決定部102は、算出したコスト関数値を比較することで、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対して、それぞれ最適モードおよび最適シフト量を決定する。   In step S104, the optimum mode / optimum shift amount determination unit 102 compares the calculated cost function values with respect to each of the 4 × 4 pixel, 8 × 8 pixel, and 16 × 16 pixel intra prediction modes. The optimum mode and the optimum shift amount are determined respectively.

ステップS105において、最適モード/最適シフト量決定部102は、ステップS104において決定された各最適モードと最適シフト量の中から、ステップS103において算出されたコスト関数値に基づいて、最適イントラ予測モードと最適シフト量を選択する。すなわち、4×4画素、8×8画素、および16×16画素の各イントラ予測モードに対して決定された各最適モードと最適シフト量の中から、最適イントラ予測モードと最適シフト量が選択される。選択された予測モードおよびシフト量の情報は、対応するコスト関数値とともに、予測画像生成部103に供給される。   In step S105, the optimum mode / optimum shift amount determination unit 102 determines the optimum intra prediction mode based on the cost function value calculated in step S103 from among the optimum modes and optimum shift amounts determined in step S104. Select the optimal shift amount. That is, the optimal intra prediction mode and the optimal shift amount are selected from the optimal modes and the optimal shift amounts determined for the 4 × 4 pixel, 8 × 8 pixel, and 16 × 16 pixel intra prediction modes. The The information on the selected prediction mode and shift amount is supplied to the predicted image generation unit 103 together with the corresponding cost function value.

ステップS106において、予測画像生成部103は、最適シフト量で位相がシフトされた隣接画素を用いて、予測画像を生成する。   In step S <b> 106, the predicted image generation unit 103 generates a predicted image using adjacent pixels whose phase is shifted by the optimal shift amount.

すなわち、予測画像生成部103は、イントラ予測する対象ブロックに対応する隣接画素を隣接画像バッファ101から読み出す。そして、予測画像生成部103は、6タップのFIRフィルタおよび線形内挿により、決定された予測モードに応じた位相方向に、読みだした隣接画素の位相を最適シフト量でシフトする。   That is, the predicted image generation unit 103 reads adjacent pixels corresponding to the target block to be intra-predicted from the adjacent image buffer 101. Then, the predicted image generation unit 103 shifts the phase of the read adjacent pixel by the optimal shift amount in the phase direction corresponding to the determined prediction mode by the 6-tap FIR filter and linear interpolation.

予測画像生成部103は、位相がシフトされた隣接画素を用いて、最適モード/最適シフト量決定部102により決定された予測モードでイントラ予測を行い、対象ブロックの予測画像を生成する。生成された予測画像は、対応するコスト関数値とともに予測画像選択部77に供給される。   The prediction image generation unit 103 performs intra prediction in the prediction mode determined by the optimal mode / optimum shift amount determination unit 102 using adjacent pixels whose phases are shifted, and generates a prediction image of the target block. The generated predicted image is supplied to the predicted image selection unit 77 together with the corresponding cost function value.

[隣接画素内挿処理の説明]
次に、図25のフローチャートを参照して、図24のステップS101の隣接画素内挿処理について説明する。なお、この隣接画素内挿処理は、候補のイントラ予測モード毎に行われる処理である。また、図25のステップS111乃至S116は、図21のステップS51乃至S53、S55、S56、およびS58と同様の処理を行うので、その詳細な説明は適宜省略する。
[Description of adjacent pixel interpolation processing]
Next, the adjacent pixel interpolation processing in step S101 in FIG. 24 will be described with reference to the flowchart in FIG. The adjacent pixel interpolation process is a process performed for each candidate intra prediction mode. Also, steps S111 to S116 in FIG. 25 perform the same processing as steps S51 to S53, S55, S56, and S58 in FIG. 21, and thus detailed description thereof will be omitted as appropriate.

最適モード/最適シフト量決定部102から候補のイントラ予測モードの情報は、水平方向内挿部111および垂直方向内挿部112に供給される。水平方向内挿部111および垂直方向内挿部112は、ステップS111において、候補のイントラ予測モードがDCモードであるか否かを判定する。ステップS111において、候補のイントラ予測モードがDCモードではないと判定された場合、処理は、ステップS112に進む。   Information on candidate intra prediction modes from the optimum mode / optimum shift amount determination unit 102 is supplied to the horizontal direction interpolation unit 111 and the vertical direction interpolation unit 112. In step S111, the horizontal direction interpolation unit 111 and the vertical direction interpolation unit 112 determine whether the candidate intra prediction mode is the DC mode. If it is determined in step S111 that the candidate intra prediction mode is not the DC mode, the process proceeds to step S112.

ステップS112において、水平方向内挿部111および垂直方向内挿部112は、候補のイントラ予測モードが、Vertical Prediction mode、Diagonal_Down_Left Prediction mode、またはVertical_Left Prediction modeであるか否かを判定する。   In step S112, the horizontal direction interpolation unit 111 and the vertical direction interpolation unit 112 determine whether the candidate intra prediction mode is Vertical Prediction mode, Diagonal_Down_Left Prediction mode, or Vertical_Left Prediction mode.

ステップS112において、候補のイントラ予測モードが、Vertical Prediction mode、Diagonal_Down_Left Prediction mode、またはVertical_Left Prediction modeであると判定された場合、処理は、ステップS113に進む。   If it is determined in step S112 that the candidate intra prediction mode is Vertical Prediction mode, Diagonal_Down_Left Prediction mode, or Vertical_Left Prediction mode, the process proceeds to step S113.

ステップS113において、水平方向内挿部111は、候補のイントラ予測モードに応じて、水平方向の内挿を行う。水平方向内挿部111は、内挿された上部隣接画素の情報を、最適モード/最適シフト量決定部102に供給する。このとき、垂直方向内挿部112は、垂直方向の内挿処理を行わない。   In step S113, the horizontal interpolation unit 111 performs horizontal interpolation according to the candidate intra prediction mode. The horizontal direction interpolation unit 111 supplies the information on the interpolated upper adjacent pixel to the optimum mode / optimum shift amount determination unit 102. At this time, the vertical direction interpolation unit 112 does not perform vertical direction interpolation processing.

ステップS112において、候補のイントラ予測モードが、Vertical Prediction mode、Diagonal_Down_Left Prediction mode、およびVertical_Left Prediction modeではないと判定された場合、処理は、ステップS114に進む。   If it is determined in step S112 that the candidate intra prediction mode is not Vertical Prediction mode, Diagonal_Down_Left Prediction mode, or Vertical_Left Prediction mode, the process proceeds to step S114.

ステップS114において、水平方向内挿部111および垂直方向内挿部112は、候補のイントラ予測モードがHorizontal Prediction mode、またはHorizontal_Up Prediction modeであるか否かを判定する。ステップS114において、候補のイントラ予測モードがHorizontal Prediction mode、またはHorizontal_Up Prediction modeであると判定された場合、処理は、ステップS115に進む。   In step S114, the horizontal direction interpolation unit 111 and the vertical direction interpolation unit 112 determine whether the candidate intra prediction mode is the Horizontal Prediction mode or the Horizontal_Up Prediction mode. If it is determined in step S114 that the candidate intra prediction mode is the Horizontal Prediction mode or Horizontal_Up Prediction mode, the process proceeds to Step S115.

ステップS115において、垂直方向内挿部112は、候補のイントラ予測モードに応じて、垂直方向の内挿を行う。垂直方向内挿部112は、内挿された左部隣接画素の情報を、最適モード/最適シフト量決定部102に供給する。このとき、水平方向内挿部111は、水平方向の内挿を行なわない。   In step S115, the vertical direction interpolation unit 112 performs vertical direction interpolation in accordance with the candidate intra prediction mode. The vertical direction interpolation unit 112 supplies the interpolated information on the left adjacent pixel to the optimum mode / optimum shift amount determination unit 102. At this time, the horizontal interpolation unit 111 does not perform horizontal interpolation.

ステップS114において、候補のイントラ予測モードがHorizontal Prediction mode、およびHorizontal_Up Prediction modeではないと判定された場合、処理は、ステップS116に進む。   If it is determined in step S114 that the candidate intra prediction mode is not the Horizontal Prediction mode and Horizontal_Up Prediction mode, the process proceeds to step S116.

ステップS116において、水平方向内挿部111および垂直方向内挿部112は、候補のイントラ予測モードに応じて、水平方向の内挿、および垂直方向の内挿をそれぞれ行う。水平方向内挿部111および垂直方向内挿部112は、内挿された上部隣接画素および左部隣接画素の情報を、最適モード/最適シフト量決定部102にそれぞれ供給する。   In step S116, the horizontal direction interpolation unit 111 and the vertical direction interpolation unit 112 perform horizontal direction interpolation and vertical direction interpolation, respectively, according to the candidate intra prediction modes. The horizontal direction interpolation unit 111 and the vertical direction interpolation unit 112 supply information on the interpolated upper adjacent pixel and left adjacent pixel to the optimum mode / optimum shift amount determination unit 102, respectively.

符号化された圧縮画像は、所定の伝送路を介して伝送され、画像復号装置により復号される。   The encoded compressed image is transmitted via a predetermined transmission path and decoded by the image decoding device.

[画像復号装置の構成例]
図26は、本発明を適用した画像処理装置としての画像復号装置の一実施の形態の構成を表している。
[Configuration Example of Image Decoding Device]
FIG. 26 shows a configuration of an embodiment of an image decoding apparatus as an image processing apparatus to which the present invention is applied.

画像復号装置151は、蓄積バッファ161、可逆復号部162、逆量子化部163、逆直交変換部164、演算部165、デブロックフィルタ166、画面並べ替えバッファ167、D/A変換部168、フレームメモリ169、スイッチ170、イントラ予測部171、隣接画素内挿部172、動き予測・補償部173、およびスイッチ174により構成されている。   The image decoding device 151 includes a storage buffer 161, a lossless decoding unit 162, an inverse quantization unit 163, an inverse orthogonal transform unit 164, an operation unit 165, a deblock filter 166, a screen rearrangement buffer 167, a D / A conversion unit 168, a frame The memory 169, the switch 170, the intra prediction unit 171, the adjacent pixel interpolation unit 172, the motion prediction / compensation unit 173, and the switch 174 are configured.

蓄積バッファ161は伝送されてきた圧縮画像を蓄積する。可逆復号部162は、蓄積バッファ161より供給された、図2の可逆符号化部66により符号化された情報を、可逆符号化部66の符号化方式に対応する方式で復号する。逆量子化部163は可逆復号部162により復号された画像を、図2の量子化部65の量子化方式に対応する方式で逆量子化する。逆直交変換部164は、図2の直交変換部64の直交変換方式に対応する方式で逆量子化部163の出力を逆直交変換する。   The accumulation buffer 161 accumulates the transmitted compressed image. The lossless decoding unit 162 decodes the information supplied from the accumulation buffer 161 and encoded by the lossless encoding unit 66 in FIG. 2 by a method corresponding to the encoding method of the lossless encoding unit 66. The inverse quantization unit 163 inversely quantizes the image decoded by the lossless decoding unit 162 by a method corresponding to the quantization method of the quantization unit 65 in FIG. The inverse orthogonal transform unit 164 performs inverse orthogonal transform on the output of the inverse quantization unit 163 by a method corresponding to the orthogonal transform method of the orthogonal transform unit 64 in FIG.

逆直交変換された出力は演算部165によりスイッチ174から供給される予測画像と加算されて復号される。デブロックフィルタ166は、復号された画像のブロック歪を除去した後、フレームメモリ169に供給し、蓄積させるとともに、画面並べ替えバッファ167に出力する。   The inverse orthogonal transformed output is added to the predicted image supplied from the switch 174 by the arithmetic unit 165 and decoded. The deblocking filter 166 removes block distortion of the decoded image, and then supplies the frame to the frame memory 169 to store it, and outputs it to the screen rearrangement buffer 167.

画面並べ替えバッファ167は、画像の並べ替えを行う。すなわち、図2の画面並べ替えバッファ62により符号化の順番のために並べ替えられたフレームの順番が、元の表示の順番に並べ替えられる。D/A変換部168は、画面並べ替えバッファ167から供給された画像をD/A変換し、図示せぬディスプレイに出力し、表示させる。   The screen rearrangement buffer 167 rearranges images. That is, the order of frames rearranged for the encoding order by the screen rearrangement buffer 62 in FIG. 2 is rearranged in the original display order. The D / A conversion unit 168 D / A converts the image supplied from the screen rearrangement buffer 167, and outputs and displays the image on a display (not shown).

スイッチ170は、インター処理される画像と参照される画像をフレームメモリ169から読み出し、動き予測・補償部173に出力するとともに、イントラ予測に用いられる画像をフレームメモリ169から読み出し、イントラ予測部171に供給する。   The switch 170 reads an image to be inter-processed and a referenced image from the frame memory 169 and outputs them to the motion prediction / compensation unit 173, and also reads an image used for intra prediction from the frame memory 169 to the intra prediction unit 171. Supply.

イントラ予測部171には、ヘッダ情報を復号して得られたイントラ予測モードを示す情報と、隣接画素のシフト量の情報が、可逆復号部162から供給される。イントラ予測部171は、これらの情報を、隣接画素内挿部172にも供給する。   The intra prediction unit 171 is supplied with information indicating the intra prediction mode obtained by decoding the header information and information on the shift amount of adjacent pixels from the lossless decoding unit 162. The intra prediction unit 171 also supplies this information to the adjacent pixel interpolation unit 172.

イントラ予測部171は、これらの情報に基づき、必要に応じて、隣接画素内挿部172に隣接画素の位相をシフトさせ、隣接画素または位相がシフトされた隣接画素を用いて、予測画像を生成し、生成した予測画像を、スイッチ174に出力する。   Based on the information, the intra prediction unit 171 shifts the phase of the adjacent pixel to the adjacent pixel interpolation unit 172 as necessary, and generates a predicted image using the adjacent pixel or the adjacent pixel whose phase is shifted. Then, the generated predicted image is output to the switch 174.

隣接画素内挿部172は、イントラ予測部171から供給されるイントラ予測モードに応じたシフト方向に、イントラ予測部171から供給されるシフト量で、隣接画素の位相をシフトさせる。実際には、隣接画素内挿部172は、イントラ予測モードに応じたシフト方向について、隣接画素に対して、6タップのFIRフィルタをかけ、線形内挿することで、隣接画素の位相を、小数画素精度にシフトさせる。隣接画素内挿部172は、位相がシフトされた隣接画素を、イントラ予測部171に供給する。   The adjacent pixel interpolation unit 172 shifts the phase of the adjacent pixel by the shift amount supplied from the intra prediction unit 171 in the shift direction corresponding to the intra prediction mode supplied from the intra prediction unit 171. Actually, the adjacent pixel interpolation unit 172 applies a 6-tap FIR filter to the adjacent pixels in the shift direction according to the intra prediction mode, and linearly interpolates the phase of the adjacent pixels to a decimal number. Shift to pixel accuracy. The adjacent pixel interpolation unit 172 supplies the adjacent pixel whose phase has been shifted to the intra prediction unit 171.

動き予測・補償部173には、ヘッダ情報を復号して得られた情報(予測モード情報、動きベクトル情報、参照フレーム情報)が可逆復号部162から供給される。インター予測モードを示す情報が供給された場合、動き予測・補償部173は、動きベクトル情報と参照フレーム情報に基づいて画像に動き予測と補償処理を施し、予測画像を生成する。動き予測・補償部173は、インター予測モードにより生成された予測画像をスイッチ174に出力する。   Information (prediction mode information, motion vector information, reference frame information) obtained by decoding the header information is supplied from the lossless decoding unit 162 to the motion prediction / compensation unit 173. When information indicating the inter prediction mode is supplied, the motion prediction / compensation unit 173 performs motion prediction and compensation processing on the image based on the motion vector information and the reference frame information, and generates a predicted image. The motion prediction / compensation unit 173 outputs the prediction image generated in the inter prediction mode to the switch 174.

スイッチ174は、動き予測・補償部173またはイントラ予測部171により生成された予測画像を選択し、演算部165に供給する。   The switch 174 selects the prediction image generated by the motion prediction / compensation unit 173 or the intra prediction unit 171 and supplies the selected prediction image to the calculation unit 165.

[イントラ予測部および隣接画素内挿部の構成例]
図27は、イントラ予測部および隣接画素内挿部の詳細な構成例を示すブロック図である。
[Configuration Example of Intra Prediction Unit and Adjacent Pixel Interpolation Unit]
FIG. 27 is a block diagram illustrating a detailed configuration example of the intra prediction unit and the adjacent pixel interpolation unit.

図27の例の場合、イントラ予測部171は、予測モード受信部181、シフト量受信部182、イントラ予測画像生成部183により構成されている。隣接画素内挿部172は、水平方向内挿部191および垂直方向内挿部192により構成されている。   In the case of the example in FIG. 27, the intra prediction unit 171 includes a prediction mode reception unit 181, a shift amount reception unit 182, and an intra prediction image generation unit 183. The adjacent pixel interpolation unit 172 includes a horizontal direction interpolation unit 191 and a vertical direction interpolation unit 192.

予測モード受信部181は、可逆復号部162により復号されたイントラ予測モード情報を受信する。予測モード受信部181は、受信したイントラ予測モード情報を、イントラ予測画像生成部183、水平方向内挿部191、および垂直方向内挿部192に供給する。   The prediction mode receiving unit 181 receives the intra prediction mode information decoded by the lossless decoding unit 162. The prediction mode reception unit 181 supplies the received intra prediction mode information to the intra prediction image generation unit 183, the horizontal direction interpolation unit 191, and the vertical direction interpolation unit 192.

シフト量受信部182は、可逆復号部162により復号されたシフト量(水平方向および垂直方向)の情報を受信する。シフト量受信部182は、受信したシフト量のうち、水平方向のシフト量を、水平方向内挿部191に供給し、垂直方向のシフト量を、垂直方向内挿部192に供給する。   The shift amount receiving unit 182 receives information on the shift amount (horizontal direction and vertical direction) decoded by the lossless decoding unit 162. Of the received shift amounts, the shift amount reception unit 182 supplies the horizontal shift amount to the horizontal interpolation unit 191 and supplies the vertical shift amount to the vertical interpolation unit 192.

イントラ予測画像生成部183には、予測モード受信部181により受信されたイントラ予測モードの情報が入力される。また、イントラ予測画像生成部183には、水平方向内挿部191から上部隣接画素または内挿された上部隣接画素の情報と、垂直方向内挿部192から左部隣接画素または内挿された左部隣接画素の情報が入力される。   Information on the intra prediction mode received by the prediction mode reception unit 181 is input to the intra prediction image generation unit 183. In addition, the intra predicted image generation unit 183 includes information on the upper adjacent pixel or the upper adjacent pixel interpolated from the horizontal interpolation unit 191 and the left adjacent pixel or the interpolated left from the vertical interpolation unit 192. Information of adjacent pixels is input.

イントラ予測画像生成部183は、入力されるイントラ予測モード情報が示す予測モードで、隣接画素または内挿された隣接画素の画素値を用いて、イントラ予測を行い、予測画像を生成し、生成した予測画像を、スイッチ174に出力する。   The intra prediction image generation unit 183 generates and generates a prediction image by performing intra prediction using the pixel value of the adjacent pixel or the interpolated adjacent pixel in the prediction mode indicated by the input intra prediction mode information. The predicted image is output to the switch 174.

水平方向内挿部191は、予測モード受信部181からの予測モードに応じて、フレームメモリ169より上部隣接画素を読み出す。水平方向内挿部191は、6タップのFIRフィルタおよび線形内挿により、読み出した上部隣接画素に対して、シフト量受信部182からの水平方向のシフト量で、位相をシフトする。内挿された上部隣接画素または内挿が行われなかった上部隣接画素(すなわち、フレームメモリ169からの隣接画素)の情報は、イントラ予測画像生成部183に供給される。図27の場合、スイッチ170の図示は省略されているが、隣接画素は、フレームメモリ169から、スイッチ170を介して読み出される。   The horizontal direction interpolation unit 191 reads the upper adjacent pixel from the frame memory 169 according to the prediction mode from the prediction mode reception unit 181. The horizontal interpolation unit 191 shifts the phase by the horizontal shift amount from the shift amount reception unit 182 with respect to the read upper adjacent pixel by a 6-tap FIR filter and linear interpolation. Information on the interpolated upper adjacent pixel or the upper adjacent pixel that has not been interpolated (that is, the adjacent pixel from the frame memory 169) is supplied to the intra-predicted image generation unit 183. In the case of FIG. 27, the switch 170 is not shown, but adjacent pixels are read out from the frame memory 169 via the switch 170.

垂直方向内挿部192は、予測モード受信部181からの予測モードに応じて、フレームメモリ169より左部隣接画素を読み出す。垂直方向内挿部192は、6タップのFIRフィルタおよび線形内挿により、読み出した左部隣接画素に対して、シフト量受信部182からの垂直方向のシフト量で、位相をシフトする。線形内挿された左部隣接画素または内挿が行われなかった左部隣接画素(すなわち、フレームメモリ169からの隣接画素)の情報は、イントラ予測画像生成部183に供給される。   The vertical interpolation unit 192 reads the left adjacent pixel from the frame memory 169 in accordance with the prediction mode from the prediction mode receiving unit 181. The vertical interpolation unit 192 shifts the phase by the shift amount in the vertical direction from the shift amount reception unit 182 with respect to the read left adjacent pixel by a 6-tap FIR filter and linear interpolation. Information on the left adjacent pixel that has been linearly interpolated or the left adjacent pixel that has not been interpolated (that is, the adjacent pixel from the frame memory 169) is supplied to the intra-predicted image generation unit 183.

[画像復号装置の復号処理の説明]
次に、図28のフローチャートを参照して、画像復号装置151が実行する復号処理について説明する。
[Description of Decoding Process of Image Decoding Device]
Next, the decoding process executed by the image decoding device 151 will be described with reference to the flowchart of FIG.

ステップS131において、蓄積バッファ161は伝送されてきた画像を蓄積する。ステップS132において、可逆復号部162は、蓄積バッファ161から供給される圧縮画像を復号する。すなわち、図2の可逆符号化部66により符号化されたIピクチャ、Pピクチャ、並びにBピクチャが復号される。   In step S131, the accumulation buffer 161 accumulates the transmitted image. In step S132, the lossless decoding unit 162 decodes the compressed image supplied from the accumulation buffer 161. That is, the I picture, P picture, and B picture encoded by the lossless encoding unit 66 in FIG. 2 are decoded.

このとき、動きベクトル情報、参照フレーム情報、予測モード情報(イントラ予測モード、またはインター予測モードを示す情報)、フラグ情報、およびシフト量の情報なども復号される。   At this time, motion vector information, reference frame information, prediction mode information (information indicating an intra prediction mode or an inter prediction mode), flag information, shift amount information, and the like are also decoded.

すなわち、予測モード情報がイントラ予測モード情報である場合、予測モード情報とシフト量の情報は、イントラ予測部171に供給される。予測モード情報がインター予測モード情報である場合、予測モード情報と対応する動きベクトル情報および参照フレーム情報は、動き予測・補償部173に供給される。   That is, when the prediction mode information is intra prediction mode information, the prediction mode information and the shift amount information are supplied to the intra prediction unit 171. When the prediction mode information is inter prediction mode information, motion vector information and reference frame information corresponding to the prediction mode information are supplied to the motion prediction / compensation unit 173.

ステップS133において、逆量子化部163は可逆復号部162により復号された変換係数を、図2の量子化部65の特性に対応する特性で逆量子化する。ステップS134において逆直交変換部164は逆量子化部163により逆量子化された変換係数を、図2の直交変換部64の特性に対応する特性で逆直交変換する。これにより図2の直交変換部64の入力(演算部63の出力)に対応する差分情報が復号されたことになる。   In step S133, the inverse quantization unit 163 inversely quantizes the transform coefficient decoded by the lossless decoding unit 162 with characteristics corresponding to the characteristics of the quantization unit 65 in FIG. In step S134, the inverse orthogonal transform unit 164 performs inverse orthogonal transform on the transform coefficient inversely quantized by the inverse quantization unit 163 with characteristics corresponding to the characteristics of the orthogonal transform unit 64 in FIG. As a result, the difference information corresponding to the input of the orthogonal transform unit 64 of FIG. 2 (output of the calculation unit 63) is decoded.

ステップS135において、演算部165は、後述するステップS141の処理で選択され、スイッチ174を介して入力される予測画像を差分情報と加算する。これにより元の画像が復号される。ステップS136においてデブロックフィルタ166は、演算部165より出力された画像をフィルタリングする。これによりブロック歪みが除去される。ステップS137においてフレームメモリ169は、フィルタリングされた画像を記憶する。   In step S135, the calculation unit 165 adds the prediction image selected in the process of step S141 described later and input via the switch 174 to the difference information. As a result, the original image is decoded. In step S136, the deblocking filter 166 filters the image output from the calculation unit 165. Thereby, block distortion is removed. In step S137, the frame memory 169 stores the filtered image.

ステップS138において、イントラ予測部171、および動き予測・補償部173は、可逆復号部162から供給される予測モード情報に対応して、それぞれ画像の予測処理を行う。   In step S138, the intra prediction unit 171 and the motion prediction / compensation unit 173 perform image prediction processing corresponding to the prediction mode information supplied from the lossless decoding unit 162, respectively.

すなわち、可逆復号部162からイントラ予測モード情報が供給された場合、イントラ予測部171は、イントラ予測モードのイントラ予測処理を行う。このとき、イントラ予測部171は、イントラ予測モードに応じたシフト方向に、可逆復号部162から供給されるシフト量で位相がシフトされた隣接画素を用いて、イントラ予測処理を行う。   That is, when intra prediction mode information is supplied from the lossless decoding unit 162, the intra prediction unit 171 performs an intra prediction process in the intra prediction mode. At this time, the intra prediction unit 171 performs an intra prediction process using adjacent pixels whose phase is shifted by the shift amount supplied from the lossless decoding unit 162 in the shift direction according to the intra prediction mode.

ステップS138における予測処理の詳細は、図29を参照して後述するが、この処理により、イントラ予測部171により生成された予測画像、または動き予測・補償部173により生成された予測画像がスイッチ174に供給される。   The details of the prediction process in step S138 will be described later with reference to FIG. 29, and as a result, the prediction image generated by the intra prediction unit 171 or the prediction image generated by the motion prediction / compensation unit 173 is switched by the switch 174. To be supplied.

ステップS139において、スイッチ174は予測画像を選択する。すなわち、イントラ予測部171により生成された予測画像、または動き予測・補償部173により生成された予測画像供給される。したがって、供給された予測画像が選択されて演算部165に供給され、上述したように、ステップS134において逆直交変換部164の出力と加算される。   In step S139, the switch 174 selects a predicted image. That is, a prediction image generated by the intra prediction unit 171 or a prediction image generated by the motion prediction / compensation unit 173 is supplied. Therefore, the supplied predicted image is selected and supplied to the calculation unit 165, and is added to the output of the inverse orthogonal transform unit 164 in step S134 as described above.

ステップS140において、画面並べ替えバッファ167は並べ替えを行う。すなわち画像符号化装置51の画面並べ替えバッファ62により符号化のために並べ替えられたフレームの順序が、元の表示の順序に並べ替えられる。   In step S140, the screen rearrangement buffer 167 performs rearrangement. That is, the order of frames rearranged for encoding by the screen rearrangement buffer 62 of the image encoding device 51 is rearranged to the original display order.

ステップS141において、D/A変換部168は、画面並べ替えバッファ167からの画像をD/A変換する。この画像が図示せぬディスプレイに出力され、画像が表示される。   In step S141, the D / A converter 168 D / A converts the image from the screen rearrangement buffer 167. This image is output to a display (not shown), and the image is displayed.

[予測処理の説明]
次に、図29のフローチャートを参照して、図28のステップS138の予測処理を説明する。
[Explanation of prediction processing]
Next, the prediction processing in step S138 in FIG. 28 will be described with reference to the flowchart in FIG.

予測モード受信部181は、ステップS171において、対象ブロックがイントラ符号化されているか否かを判定する。可逆復号部162からイントラ予測モード情報が予測モード受信部181に供給されると、予測モード受信部181は、ステップ171において、対象ブロックがイントラ符号化されていると判定し、処理は、ステップS172に進む。   In step S171, the prediction mode receiving unit 181 determines whether the target block is intra-coded. When the intra prediction mode information is supplied from the lossless decoding unit 162 to the prediction mode receiving unit 181, the prediction mode receiving unit 181 determines in step 171 that the target block is intra-encoded, and the processing is performed in step S <b> 172. Proceed to

予測モード受信部181は、ステップS172において、可逆復号部162からのイントラ予測モード情報を受信、取得する。予測モード受信部181は、受信したイントラ予測モード情報を、イントラ予測画像生成部183、水平方向内挿部191、および垂直方向内挿部192に供給する。   In step S172, the prediction mode receiving unit 181 receives and acquires intra prediction mode information from the lossless decoding unit 162. The prediction mode reception unit 181 supplies the received intra prediction mode information to the intra prediction image generation unit 183, the horizontal direction interpolation unit 191, and the vertical direction interpolation unit 192.

シフト量受信部182は、ステップS173において、可逆復号部162により復号された隣接画素のシフト量(水平方向および垂直方向)の情報を受信、取得する。シフト量受信部182は、受信したシフト量のうち、水平方向のシフト量を、水平方向内挿部191に供給し、垂直方向のシフト量を、垂直方向内挿部192に供給する。   In step S173, the shift amount reception unit 182 receives and acquires information on the shift amounts (horizontal direction and vertical direction) of the adjacent pixels decoded by the lossless decoding unit 162. Of the received shift amounts, the shift amount reception unit 182 supplies the horizontal shift amount to the horizontal interpolation unit 191 and supplies the vertical shift amount to the vertical interpolation unit 192.

水平方向内挿部191および垂直方向内挿部192は、フレームメモリ169より隣接画素を読み出し、ステップS174において、隣接画素内挿処理を実行する。ステップS174における隣接内挿処理の詳細は、図25を参照して上述した隣接内挿処理と基本的に同様の処理であるため、その説明と図示は省略される。   The horizontal direction interpolation unit 191 and the vertical direction interpolation unit 192 read adjacent pixels from the frame memory 169, and perform adjacent pixel interpolation processing in step S174. Details of the adjacent interpolation processing in step S174 are basically the same as the adjacent interpolation processing described above with reference to FIG.

この処理により、予測モード受信部181からのイントラ予測モードに応じたシフト方向に、内挿された隣接画素、あるいは、イントラ予測モードに応じて内挿されなかった隣接画素が、イントラ予測画像生成部183に供給される。   By this processing, the adjacent pixels that are interpolated in the shift direction according to the intra prediction mode from the prediction mode receiving unit 181 or the adjacent pixels that are not interpolated according to the intra prediction mode are converted into the intra prediction image generation unit. 183.

すなわち、イントラ予測モードがモード2(DC 予測)の場合、水平方向内挿部191および垂直方向内挿部192は、隣接画素の内挿を行わず、フレームメモリ169から読み出された上部および左部隣接画素を、イントラ予測画像生成部183に供給する。   That is, when the intra prediction mode is mode 2 (DC prediction), the horizontal direction interpolation unit 191 and the vertical direction interpolation unit 192 do not perform interpolation of adjacent pixels, and the upper and left sides read from the frame memory 169 The adjacent pixels are supplied to the intra predicted image generation unit 183.

イントラ予測モードがモード0(Vertical 予測)、モード3(Diagonal_Down_Left 予測)、またはモード7(Vertical_Left 予測)の場合、水平方向の内挿のみが行われる。すなわち、水平方向内挿部191は、フレームメモリ169から読み出された上部隣接画素に対して、シフト量受信部182からの水平方向のシフト量で内挿し、内挿された上部隣接画素を、イントラ予測画像生成部183に供給する。このとき、垂直方向内挿部192は、左部隣接画素の内挿を行わず、フレームメモリ169から読み出された左部隣接画素を、イントラ予測画像生成部183に供給する。   When the intra prediction mode is mode 0 (Vertical prediction), mode 3 (Diagonal_Down_Left prediction), or mode 7 (Vertical_Left prediction), only horizontal interpolation is performed. That is, the horizontal direction interpolation unit 191 interpolates the upper adjacent pixel read from the frame memory 169 with the horizontal shift amount from the shift amount reception unit 182, and the interpolated upper adjacent pixel is It supplies to the intra estimated image generation part 183. At this time, the vertical direction interpolation unit 192 supplies the left adjacent pixel read from the frame memory 169 to the intra predicted image generation unit 183 without performing interpolation of the left adjacent pixel.

イントラ予測モードがモード1(Horizontal 予測)、またはモード8(Horizontal_Up 予測)の場合、垂直方向のみの内挿が行われる。すなわち、垂直方向内挿部192は、フレームメモリ169から読み出された左部隣接画素に対して、シフト量受信部182からの垂直方向のシフト量で内挿し、内挿された左部隣接画素を、イントラ予測画像生成部183に供給する。このとき、水平方向内挿部191は、上部隣接画素の内挿を行わず、フレームメモリ169から読み出された上部隣接画素を、イントラ予測画像生成部183に供給する。   When the intra prediction mode is mode 1 (horizontal prediction) or mode 8 (horizontal_up prediction), interpolation is performed only in the vertical direction. That is, the vertical interpolation unit 192 interpolates the left adjacent pixel read from the frame memory 169 with the shift amount in the vertical direction from the shift amount reception unit 182, and interpolates the left adjacent pixel. Is supplied to the intra predicted image generation unit 183. At this time, the horizontal direction interpolation unit 191 supplies the upper adjacent pixel read from the frame memory 169 to the intra predicted image generation unit 183 without performing interpolation of the upper adjacent pixel.

イントラ予測モードがその他の予測モードの場合、水平方向および垂直方向の内挿が行われる。すなわち、水平方向内挿部191は、フレームメモリ169から読み出された上部隣接画素に対して、シフト量受信部182からの水平方向のシフト量で内挿し、内挿された上部隣接画素を、イントラ予測画像生成部183に供給する。垂直方向内挿部192は、フレームメモリ169から読み出された左部隣接画素に対して、シフト量受信部182からの垂直方向のシフト量で内挿し、内挿された左部隣接画素を、イントラ予測画像生成部183に供給する。   When the intra prediction mode is any other prediction mode, horizontal and vertical interpolation is performed. That is, the horizontal direction interpolation unit 191 interpolates the upper adjacent pixel read from the frame memory 169 with the horizontal shift amount from the shift amount reception unit 182, and the interpolated upper adjacent pixel is It supplies to the intra estimated image generation part 183. The vertical interpolation unit 192 interpolates the left adjacent pixel read from the frame memory 169 with the vertical shift amount from the shift amount receiving unit 182, and the interpolated left adjacent pixel is It supplies to the intra estimated image generation part 183.

ステップS175において、イントラ予測画像生成部183は、入力されるイントラ予測モード情報が示す予測モードで、水平方向内挿部191および垂直方向内挿部192からの隣接画素または内挿された隣接画素の画素値を用いて、イントラ予測を行う。このイントラ予測により、予測画像が生成され、生成された予測画像は、スイッチ174に出力される。   In step S175, the intra predicted image generation unit 183 is the prediction mode indicated by the input intra prediction mode information, and the adjacent pixels from the horizontal direction interpolation unit 191 and the vertical direction interpolation unit 192 or the interpolated adjacent pixels are displayed. Intra prediction is performed using pixel values. A prediction image is generated by the intra prediction, and the generated prediction image is output to the switch 174.

一方、ステップS171において、イントラ符号化されていないと判定された場合、処理は、ステップS176に進む。   On the other hand, if it is determined in step S171 that the intra encoding has not been performed, the process proceeds to step S176.

処理対象の画像がインター処理される画像である場合、可逆復号部162からインター予測モード情報、参照フレーム情報、動きベクトル情報が動き予測・補償部173に供給される。ステップS176において、動き予測・補償部173は、可逆復号部162からのインター予測モード情報、参照フレーム情報、動きベクトル情報などを取得する。   When the processing target image is an inter-processed image, the inter prediction mode information, the reference frame information, and the motion vector information are supplied from the lossless decoding unit 162 to the motion prediction / compensation unit 173. In step S176, the motion prediction / compensation unit 173 acquires inter prediction mode information, reference frame information, motion vector information, and the like from the lossless decoding unit 162.

そして、動き予測・補償部173は、ステップS177において、インター動き予測を行う。すなわち、処理対象の画像がインター予測処理される画像である場合、必要な画像がフレームメモリ169から読み出され、スイッチ170を介して動き予測・補償部173に供給される。ステップS177において動き予測・補償部173は、ステップS176で取得した動きベクトルに基づいて、インター予測モードの動き予測をし、予測画像を生成する。生成した予測画像は、スイッチ174に出力される。   Then, the motion prediction / compensation unit 173 performs inter motion prediction in step S177. That is, when the image to be processed is an image subjected to inter prediction processing, a necessary image is read from the frame memory 169 and supplied to the motion prediction / compensation unit 173 via the switch 170. In step S177, the motion prediction / compensation unit 173 performs motion prediction in the inter prediction mode based on the motion vector acquired in step S176, and generates a predicted image. The generated predicted image is output to the switch 174.

以上のように、画像符号化装置51において、6タップのFIRフィルタと線形内挿により、小数画素精度の画素を求め、最適なシフト量を決定するようにしたので、イントラ予測モードにおいて用いられる画素値の選択肢を増やすことができる。これにより最適なイントラ予測を行うことができ、イントラ予測における符号化効率をさらに向上させることが可能である。   As described above, in the image encoding device 51, pixels with decimal pixel precision are obtained by a 6-tap FIR filter and linear interpolation, and the optimum shift amount is determined, so that pixels used in the intra prediction mode are used. You can increase the value choices. Thereby, optimal intra prediction can be performed, and the encoding efficiency in intra prediction can be further improved.

また、H.264/AVC方式においては、図4を参照して上述したインター動き予測補償にしか用いられなかった6タップのFIRフィルタの回路を、イントラ予測にも有効活用することができる。これにより、回路を増大させることなく、効率を改善することができる。   H. In the H.264 / AVC format, the 6-tap FIR filter circuit that has been used only for the inter motion prediction compensation described above with reference to FIG. 4 can be effectively used for intra prediction. Thereby, the efficiency can be improved without increasing the circuit.

さらに、H.264/AVC方式において定められているイントラ予測の分解能である22.5°よりさらに細かい分解能でのイントラ予測を行うことができる。   In addition, H. It is possible to perform intra prediction at a resolution finer than 22.5 ° which is the resolution of intra prediction defined in the H.264 / AVC format.

なお、画像符号化装置51においては、非特許文献2に記載の提案と異なり、H.264/AVC方式のイントラ予測で用いられる対象ブロックに所定の位置で隣接する画素のみがイントラ予測で用いられる。すなわち、隣接画素バッファ81に読み出す画素は隣接画素のみでよい。   Note that in the image encoding device 51, unlike the proposal described in Non-Patent Document 2, H.264 is used. Only pixels adjacent to the target block used in the intra prediction of the H.264 / AVC system at a predetermined position are used in the intra prediction. That is, only the adjacent pixels need be read out to the adjacent pixel buffer 81.

したがって、非特許文献2の提案における符号化対象となるブロックの隣接画素以外の画素も予測に用いることによるメモリアクセス回数や処理の増加、すなわち、処理効率の低下を回避することができる。   Therefore, it is possible to avoid an increase in the number of memory accesses and an increase in processing, that is, a decrease in processing efficiency, by using pixels other than the adjacent pixels of the encoding target block in the proposal of Non-Patent Document 2 for prediction.

なお、上記説明においては、隣接画素内挿処理として、輝度信号のイントラ4×4予測モードの場合を例に説明したが、本発明は、イントラ8×8やイントラ16×16予測モードの場合にも適用することができる。また、本発明は、色差信号のイントラ予測モードの場合にも適用することができる。   In the above description, the case of the luminance signal intra 4 × 4 prediction mode has been described as an example of the adjacent pixel interpolation processing. However, the present invention is applicable to the case of the intra 8 × 8 or intra 16 × 16 prediction mode. Can also be applied. The present invention can also be applied to the case of the color difference signal intra prediction mode.

なお、イントラ8×8予測モードの場合には、イントラ4×4予測モードの場合と同様に、モード2(DC prediction mode)に関しては、平均値処理を行うことになる。したがって、シフトを行ったとしても、符号化効率の向上には直接関与しないため、上述した動作は禁止され、行われない。   In addition, in the case of the intra 8 × 8 prediction mode, as in the case of the intra 4 × 4 prediction mode, average value processing is performed for mode 2 (DC prediction mode). Therefore, even if the shift is performed, the above-described operation is prohibited and is not performed because it is not directly related to the improvement of the coding efficiency.

モード0(Vertical Prediction mode)、モード3(Diagonal_Down_Left Prediction mode)、またはモード7(Vertical_Left Prediction mode)に関しては、図18における上部隣接画素A0, A1, A2,…のみのシフトが候補となる。   For mode 0 (Vertical Prediction mode), mode 3 (Diagonal_Down_Left Prediction mode), or mode 7 (Vertical_Left Prediction mode), only the upper adjacent pixels A0, A1, A2,.

モード1(Horizontal Prediction mode)、またはモード8(Horizontal_Up Prediction mode)に関しては、図18における左部隣接画素I0, I1, I2,…のみのシフトが候補となる。   For mode 1 (Horizontal Prediction mode) or mode 8 (Horizontal_Up Prediction mode), only the left adjacent pixels I0, I1, I2,... In FIG.

その他のモード(モード4乃至6)に関しては、上部隣接画素および左部隣接画素の双方に関して、シフトを考慮する必要がある。   For the other modes (modes 4 to 6), it is necessary to consider the shift for both the upper adjacent pixel and the left adjacent pixel.

また、イントラ16×16予測モードおよび色差信号のイントラ予測モードの場合、Vertical Prediction modeに関しては、上部隣接画素の水平方向のシフトのみが行われる。Horizontal Prediction modeに関しては、左部隣接画素の垂直方向のシフトのみが行われる。DC Prediction modeに関しては、シフト処理は行われない。Plane Prediction modeに関しては、上部隣接画素の水平方向のシフトおよび左部隣接画素の垂直方向のシフトの両方が行われる。   In addition, in the case of the intra 16 × 16 prediction mode and the color difference signal intra prediction mode, only the horizontal shift of the upper adjacent pixels is performed in the vertical prediction mode. For the horizontal prediction mode, only the vertical shift of the left adjacent pixel is performed. Shift processing is not performed for DC Prediction mode. Regarding the Plane Prediction mode, both the horizontal shift of the upper adjacent pixel and the vertical shift of the left adjacent pixel are performed.

さらに、非特許文献1に記載されているように、動き予測で1/8画素精度の内挿処理が行われている場合、本発明においても、1/8画素精度の内挿処理が行われる。   Furthermore, as described in Non-Patent Document 1, when interpolation processing with 1/8 pixel accuracy is performed in motion prediction, the interpolation processing with 1/8 pixel accuracy is also performed in the present invention. .

以上においては、符号化方式としてH.264/AVC方式を用いるようにしたが、本発明はこれに限らず、隣接画素を用いたイントラ予測を行う、その他の符号化方式/復号方式を適用することができる。   In the above, the encoding method is H.264. The H.264 / AVC system is used, but the present invention is not limited to this, and other encoding systems / decoding systems that perform intra prediction using adjacent pixels can be applied.

なお、本発明は、例えば、MPEG、H.26x等の様に、離散コサイン変換等の直交変換と動き補償によって圧縮された画像情報(ビットストリーム)を、衛星放送、ケーブルテレビジョン、インターネット、または携帯電話機などのネットワークメディアを介して受信する際に用いられる画像符号化装置および画像復号装置に適用することができる。また、本発明は、光、磁気ディスク、およびフラッシュメモリのような記憶メディア上で処理する際に用いられる画像符号化装置および画像復号装置に適用することができる。さらに、本発明は、それらの画像符号化装置および画像復号装置などに含まれる動き予測補償装置にも適用することができる。   Note that the present invention is, for example, MPEG, H.264. When receiving image information (bitstream) compressed by orthogonal transformation such as discrete cosine transformation and motion compensation, such as 26x, via network media such as satellite broadcasting, cable television, the Internet, or mobile phones. The present invention can be applied to an image encoding device and an image decoding device used in the above. Further, the present invention can be applied to an image encoding device and an image decoding device used when processing on a storage medium such as an optical, magnetic disk, and flash memory. Furthermore, the present invention can also be applied to motion prediction / compensation devices included in such image encoding devices and image decoding devices.

上述した一連の処理は、ハードウエアにより実行することもできるし、ソフトウエアにより実行することもできる。一連の処理をソフトウエアにより実行する場合には、そのソフトウエアを構成するプログラムが、コンピュータにインストールされる。ここで、コンピュータには、専用のハードウエアに組み込まれているコンピュータや、各種のプログラムをインストールすることで、各種の機能を実行することが可能な汎用のパーソナルコンピュータなどが含まれる。   The series of processes described above can be executed by hardware or can be executed by software. When a series of processing is executed by software, a program constituting the software is installed in the computer. Here, the computer includes a computer incorporated in dedicated hardware, a general-purpose personal computer capable of executing various functions by installing various programs, and the like.

図30は、上述した一連の処理をプログラムにより実行するコンピュータのハードウエアの構成例を示すブロック図である。   FIG. 30 is a block diagram illustrating a configuration example of hardware of a computer that executes the above-described series of processing by a program.

コンピュータにおいて、CPU(Central Processing Unit)301、ROM(Read Only Memory)302、RAM(Random Access Memory)303は、バス304により相互に接続されている。   In a computer, a central processing unit (CPU) 301, a read only memory (ROM) 302, and a random access memory (RAM) 303 are connected to each other via a bus 304.

バス304には、さらに、入出力インタフェース305が接続されている。入出力インタフェース305には、入力部306、出力部307、記憶部308、通信部309、およびドライブ310が接続されている。   An input / output interface 305 is further connected to the bus 304. An input unit 306, an output unit 307, a storage unit 308, a communication unit 309, and a drive 310 are connected to the input / output interface 305.

入力部306は、キーボード、マウス、マイクロフォンなどよりなる。出力部307は、ディスプレイ、スピーカなどよりなる。記憶部308は、ハードディスクや不揮発性のメモリなどよりなる。通信部309は、ネットワークインタフェースなどよりなる。ドライブ310は、磁気ディスク、光ディスク、光磁気ディスク、又は半導体メモリなどのリムーバブルメディア311を駆動する。   The input unit 306 includes a keyboard, a mouse, a microphone, and the like. The output unit 307 includes a display, a speaker, and the like. The storage unit 308 includes a hard disk, a nonvolatile memory, and the like. The communication unit 309 includes a network interface and the like. The drive 310 drives a removable medium 311 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory.

以上のように構成されるコンピュータでは、CPU301が、例えば、記憶部308に記憶されているプログラムを入出力インタフェース305及びバス304を介してRAM303にロードして実行することにより、上述した一連の処理が行われる。   In the computer configured as described above, for example, the CPU 301 loads the program stored in the storage unit 308 to the RAM 303 via the input / output interface 305 and the bus 304 and executes the program, thereby performing the series of processes described above. Is done.

コンピュータ(CPU301)が実行するプログラムは、例えば、パッケージメディア等としてのリムーバブルメディア311に記録して提供することができる。また、プログラムは、ローカルエリアネットワーク、インターネット、デジタル放送といった、有線または無線の伝送媒体を介して提供することができる。   The program executed by the computer (CPU 301) can be provided by being recorded on a removable medium 311 as a package medium or the like, for example. The program can be provided via a wired or wireless transmission medium such as a local area network, the Internet, or digital broadcasting.

コンピュータでは、プログラムは、リムーバブルメディア311をドライブ310に装着することにより、入出力インタフェース305を介して、記憶部308にインストールすることができる。また、プログラムは、有線または無線の伝送媒体を介して、通信部309で受信し、記憶部308にインストールすることができる。その他、プログラムは、ROM302や記憶部308に、あらかじめインストールしておくことができる。   In the computer, the program can be installed in the storage unit 308 via the input / output interface 305 by attaching the removable medium 311 to the drive 310. Further, the program can be received by the communication unit 309 via a wired or wireless transmission medium and installed in the storage unit 308. In addition, the program can be installed in advance in the ROM 302 or the storage unit 308.

なお、コンピュータが実行するプログラムは、本明細書で説明する順序に沿って時系列に処理が行われるプログラムであっても良いし、並列に、あるいは呼び出しが行われたとき等の必要なタイミングで処理が行われるプログラムであっても良い。   The program executed by the computer may be a program that is processed in time series in the order described in this specification, or in parallel or at a necessary timing such as when a call is made. It may be a program for processing.

本発明の実施の形態は、上述した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。   The embodiments of the present invention are not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the present invention.

51 画像符号化装置, 66 可逆符号化部, 74 イントラ予測部, 75 隣接画素内挿部, 76 動き予測・補償部, 77 予測画像選択部, 81 隣接画素バッファ, 82 最適モード決定部, 83 最適シフト量決定部, 84 予測画像生成部, 91 モード判定部, 92 水平方向内挿部, 93 垂直方向内挿部, 151 画像復号装置, 162 可逆復号部, 171 イントラ予測部, 172 隣接画素内挿部, 173 動き予測・補償部, 174 スイッチ, 181 予測モード受信部, 182 シフト量受信部, 183 イントラ予測画像生成部, 191 水平方向内挿部, 192 垂直方向内挿部   51 image encoding device, 66 lossless encoding unit, 74 intra prediction unit, 75 adjacent pixel interpolation unit, 76 motion prediction / compensation unit, 77 predicted image selection unit, 81 adjacent pixel buffer, 82 optimum mode determination unit, 83 optimal Shift amount determination unit, 84 predicted image generation unit, 91 mode determination unit, 92 horizontal direction interpolation unit, 93 vertical direction interpolation unit, 151 image decoding device, 162 lossless decoding unit, 171 intra prediction unit, 172 adjacent pixel interpolation Unit, 173 motion prediction / compensation unit, 174 switch, 181 prediction mode reception unit, 182 shift amount reception unit, 183 intra prediction image generation unit, 191 horizontal direction interpolation unit, 192 vertical direction interpolation unit

Claims (7)

符号化処理する画像を対象として、符号化処理の対象となる対象ブロックの画素に対してイントラ予測を行う際に参照する隣接画素を蓄積するメモリと、
前記対象ブロックの画素に対してイントラ予測を行う際の予測方向とブロックサイズとに応じて、前記メモリから読み出した隣接画素の位相をシフトさせるか、前記メモリから読み出した隣接画素の位相をシフトさせないかを選択する選択部と、
前記隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行い、予測画像を生成するイントラ予測部と、
前記イントラ予測部により生成された予測画像を用いて、前記画像を符号化処理する符号化部と
を備える画像処理装置。
A memory that accumulates adjacent pixels that are referred to when performing intra prediction on the pixels of the target block that is the target of the encoding process for the image to be encoded;
The phase of adjacent pixels read from the memory is shifted or the phase of adjacent pixels read from the memory is not shifted according to the prediction direction and block size when performing intra prediction on the pixels of the target block. A selection section for selecting or
An intra prediction unit that performs intra prediction on the pixels of the target block using the adjacent pixels and generates a predicted image;
An image processing apparatus comprising: an encoding unit that encodes the image using a predicted image generated by the intra prediction unit.
前記イントラ予測部は、前記選択部により前記メモリから読み出した隣接画素の位相がシフトさせると選択された場合に、位相がシフトされた隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行う
請求項1に記載の画像処理装置。
When the selection unit selects that the phase of the adjacent pixel read from the memory is shifted, the intra prediction unit uses the adjacent pixel whose phase is shifted to perform intra prediction on the pixel of the target block. The image processing apparatus according to claim 1.
前記イントラ予測部は、前記選択部により前記メモリから読み出した隣接画素の位相がシフトさせないと選択された場合に、位相がシフトされなかった隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行う
請求項1に記載の画像処理装置。
When the selection unit selects that the phase of the adjacent pixel read from the memory is not shifted, the intra prediction unit uses the adjacent pixel whose phase has not been shifted to the intra of the pixel of the target block. The image processing apparatus according to claim 1, wherein prediction is performed.
画像処理装置が、
符号化処理する画像を対象として、符号化処理の対象となる対象ブロックの画素に対してイントラ予測を行う際の予測方向とブロックサイズとに応じて、前記対象ブロックの画素に対してイントラ予測を行う際に参照する隣接画素を蓄積するメモリから読み出した隣接画素の位相をシフトさせるか、前記メモリから読み出した隣接画素の位相をシフトさせないかを選択し、
前記隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行い、予測画像を生成し、
生成された予測画像を用いて、前記画像を符号化処理する
画像処理方法。
The image processing device
Intra-prediction is performed on pixels of the target block according to the prediction direction and block size when performing intra-prediction on the pixels of the target block that is the target of encoding processing for the image to be encoded. Select whether to shift the phase of the adjacent pixel read from the memory that stores the adjacent pixel to be referred to when performing, or not to shift the phase of the adjacent pixel read from the memory,
Using the adjacent pixels, perform intra prediction on the pixels of the target block to generate a predicted image,
An image processing method for encoding the image using the generated predicted image.
前記メモリから読み出した隣接画素の位相がシフトさせると選択された場合に、位相がシフトされた隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行う
請求項4に記載の画像処理方法。
The image processing according to claim 4, wherein when it is selected that the phase of an adjacent pixel read from the memory is shifted, intra prediction is performed on the pixel of the target block using the adjacent pixel whose phase is shifted. Method.
前記メモリから読み出した隣接画素の位相がシフトさせないと選択された場合に、位相がシフトされなかった隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行う
請求項4に記載の画像処理方法。
The image according to claim 4, wherein when it is selected that the phase of the adjacent pixel read from the memory is not shifted, intra prediction is performed on the pixel of the target block using the adjacent pixel whose phase is not shifted. Processing method.
請求項1に記載された画像処理装置により生成された符号化ストリームを記録した記録媒体。   The recording medium which recorded the encoding stream produced | generated by the image processing apparatus described in Claim 1.
JP2014030815A 2014-02-20 2014-02-20 Image processing apparatus and method, and recording medium Active JP5776804B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014030815A JP5776804B2 (en) 2014-02-20 2014-02-20 Image processing apparatus and method, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014030815A JP5776804B2 (en) 2014-02-20 2014-02-20 Image processing apparatus and method, and recording medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2012286746A Division JP5488685B2 (en) 2012-12-28 2012-12-28 Image processing apparatus and method, program, and recording medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2015096017A Division JP6102978B2 (en) 2015-05-08 2015-05-08 Image processing apparatus and method, program, and recording medium

Publications (2)

Publication Number Publication Date
JP2014135742A true JP2014135742A (en) 2014-07-24
JP5776804B2 JP5776804B2 (en) 2015-09-09

Family

ID=51413683

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014030815A Active JP5776804B2 (en) 2014-02-20 2014-02-20 Image processing apparatus and method, and recording medium

Country Status (1)

Country Link
JP (1) JP5776804B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003348595A (en) * 2002-05-28 2003-12-05 Sony Corp Image processor and image processing method, recording medium and program
WO2008012918A1 (en) * 2006-07-28 2008-01-31 Kabushiki Kaisha Toshiba Image encoding and decoding method and apparatus
JP2008271371A (en) * 2007-04-24 2008-11-06 Sharp Corp Moving image encoding apparatus, moving image decoding apparatus, moving image encoding method, moving image decoding method, and program
WO2009090884A1 (en) * 2008-01-18 2009-07-23 Panasonic Corporation Image encoding method and image decoding method
JP2009284275A (en) * 2008-05-23 2009-12-03 Nippon Telegr & Teleph Corp <Ntt> Image encoding method, image decoding method, image encoder, image decoder, image encoding program, image decoding program, and recording medium recording programs and readable by computer
JP5488685B2 (en) * 2012-12-28 2014-05-14 ソニー株式会社 Image processing apparatus and method, program, and recording medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003348595A (en) * 2002-05-28 2003-12-05 Sony Corp Image processor and image processing method, recording medium and program
WO2008012918A1 (en) * 2006-07-28 2008-01-31 Kabushiki Kaisha Toshiba Image encoding and decoding method and apparatus
JP2008271371A (en) * 2007-04-24 2008-11-06 Sharp Corp Moving image encoding apparatus, moving image decoding apparatus, moving image encoding method, moving image decoding method, and program
WO2009090884A1 (en) * 2008-01-18 2009-07-23 Panasonic Corporation Image encoding method and image decoding method
JP2009284275A (en) * 2008-05-23 2009-12-03 Nippon Telegr & Teleph Corp <Ntt> Image encoding method, image decoding method, image encoder, image decoder, image encoding program, image decoding program, and recording medium recording programs and readable by computer
JP5488685B2 (en) * 2012-12-28 2014-05-14 ソニー株式会社 Image processing apparatus and method, program, and recording medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TAKESHI TSUKUBA ET AL.: "Adaptive Multidirectional Intra Prediction", ITU - TELECOMMUNICATIONS STANDARDIZATION SECTOR STUDY GROUP 16 QUESTION 6 VIDEO CODING EXPERTS GROUP, vol. VCEG-AG05, JPN6013051960, October 2007 (2007-10-01), pages 1 - 6, XP002501810, ISSN: 0003090299 *

Also Published As

Publication number Publication date
JP5776804B2 (en) 2015-09-09

Similar Documents

Publication Publication Date Title
JP5169978B2 (en) Image processing apparatus and method
WO2010143583A1 (en) Image processing device and method
JP2010268259A (en) Image processing device and method, and program
JP2010258738A (en) Image processing apparatus, method and program
WO2010123055A1 (en) Image-processing device and method
WO2010123057A1 (en) Image-processing device and method
JP5488685B2 (en) Image processing apparatus and method, program, and recording medium
JP5488684B2 (en) Image processing apparatus and method, program, and recording medium
JP6102977B2 (en) Image processing apparatus and method, program, and recording medium
JP6102978B2 (en) Image processing apparatus and method, program, and recording medium
JP5776803B2 (en) Image processing apparatus and method, and recording medium
JP5776804B2 (en) Image processing apparatus and method, and recording medium
AU2015255215B2 (en) Image processing apparatus and method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141216

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150108

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150210

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150508

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20150519

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: 20150609

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150622

R151 Written notification of patent or utility model registration

Ref document number: 5776804

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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