JP2012160991A - Image processing apparatus, method and program - Google Patents

Image processing apparatus, method and program Download PDF

Info

Publication number
JP2012160991A
JP2012160991A JP2011020381A JP2011020381A JP2012160991A JP 2012160991 A JP2012160991 A JP 2012160991A JP 2011020381 A JP2011020381 A JP 2011020381A JP 2011020381 A JP2011020381 A JP 2011020381A JP 2012160991 A JP2012160991 A JP 2012160991A
Authority
JP
Japan
Prior art keywords
unit
intra prediction
prediction mode
image
code length
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.)
Withdrawn
Application number
JP2011020381A
Other languages
Japanese (ja)
Inventor
Kenji Kondo
健治 近藤
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 JP2011020381A priority Critical patent/JP2012160991A/en
Priority to PCT/JP2012/051657 priority patent/WO2012105406A1/en
Publication of JP2012160991A publication Critical patent/JP2012160991A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Abstract

PROBLEM TO BE SOLVED: To enable improvement of coding efficiency.SOLUTION: A mode restriction level control part 321 adaptively controls intra-prediction mode used for intra prediction by an intra-prediction part 314 and a code length of binarization assigned to designation information of an optimal intra-prediction mode by a lossless encoding part 306. The intra-prediction part 314 performs intra prediction in the intra-prediction mode allowed by the mode restriction level control part 321 to select the optimal intra-prediction mode. The lossless encoding part 306 binarizes and encodes the designation information of the optimal intra-prediction mode by a code length designated by the mode restriction level control part 321. The present invention can be applied to an image processing apparatus, for example.

Description

本発明は、画像処理装置および方法、並びに、プログラムに関し、特に、符号化効率を向上させることができるようにした画像処理装置および方法、並びに、プログラムに関する。   The present invention relates to an image processing apparatus and method, and a program, and more particularly, to an image processing apparatus and method and a program capable of improving encoding efficiency.

近年、画像情報をデジタルとして取り扱い、その際、効率の高い情報の伝送、蓄積を目的とし、画像情報特有の冗長性を利用して、離散コサイン変換等の直交変換と動き補償により圧縮するMPEG(Moving Picture Experts Group)などの方式に準拠した装置が、放送局などの情報配信、及び一般家庭における情報受信の双方において普及しつつある。   In recent years, MPEG (compressed by orthogonal transform such as discrete cosine transform and motion compensation is used for the purpose of efficiently transmitting and storing information, and using redundancy unique to image information. A device conforming to a system such as Moving Picture Experts Group) is becoming popular in both information distribution at broadcasting stations and information reception in general households.

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

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(International Telecommunication Union Telecommunication Standardization Sector) Q6/16 VCEG(Video Coding Expert Group))という標準の規格化が進んでいる。H.26LはMPEG2やMPEG4といった従来の符号化方式に比べ、その符号化、復号化により多くの演算量が要求されるものの、より高い符号化効率が実現されることが知られている。また、現在、MPEG4の活動の一環として、このH.26Lをベースに、H.26Lではサポートされない機能をも取り入れ、より高い符号化効率を実現する標準化がJoint Model of Enhanced-Compression Video Codingとして行われている。   Furthermore, in recent years, the standardization of the standard called H.26L (ITU-T (International Telecommunication Union Telecommunication Standardization Sector) Q6 / 16 VCEG (Video Coding Expert Group)) has progressed for the purpose of image coding for the initial video conference. Yes. 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. Currently, as part of MPEG4 activities, standardization to achieve higher coding efficiency based on this H.26L and incorporating functions not supported by H.26L is performed as Joint Model of Enhanced-Compression Video Coding. It has been broken.

標準化のスケジュールとしては、2003年3月にはH.264及びMPEG-4 Part10 (Advanced Video Coding、以下AVCと記す)という名の元に国際標準となった。   The standardization schedule became an international standard in March 2003 under the names of H.264 and MPEG-4 Part 10 (Advanced Video Coding, hereinafter referred to as AVC).

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

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

ところで、イントラ予測で符号化する際、エンコーダは複数のイントラ予測モードから1つを採用し、どのイントラ予測モードを採用したかを示すindex(IntraPredMode)を符号化してデコーダに送る。   By the way, when encoding by intra prediction, the encoder employs one of a plurality of intra prediction modes, encodes an index (IntraPredMode) indicating which intra prediction mode is employed, and sends the encoded index to the decoder.

エンコーダはRD最適化の作法に基づいて複数のイントラ予測モードから最適なイントラ予測モードを選択する。これをイントラ予測モード判定と呼ぶ。   The encoder selects an optimal intra prediction mode from a plurality of intra prediction modes based on the manner of RD optimization. This is called intra prediction mode determination.

エンコーダとデコーダの一致を得るために、デコーダはIntraPredModeに基づいてエンコーダが採用したものと同じイントラ予測モードを採用する。   In order to obtain a match between the encoder and the decoder, the decoder adopts the same intra prediction mode as that adopted by the encoder based on IntraPredMode.

IntraPredModeの符号化では、ハフマン符号や算術符号といったエントロピ符号化が用いられる。   In IntraPredMode encoding, entropy encoding such as Huffman code or arithmetic code is used.

ところで、現在、AVCより更なる符号化効率の向上を目的として、ITU-Tと、ISO/IECの共同の標準化団体であるJCTVC(Joint Collaboration Team - Video Coding)により、HEVC(High Efficiency Video Coding)と呼ばれる符号化方式の標準化が進められている(例えば、非特許文献1参照)。   By the way, for the purpose of further improving coding efficiency than AVC, HECT (High Efficiency Video Coding) is being developed by JCTVC (Joint Collaboration Team-Video Coding), a joint standardization organization of ITU-T and ISO / IEC. Is being standardized (for example, see Non-Patent Document 1).

一般的に、イントラ予測モードの種類が多いほどイントラ予測の予測精度は向上する。したがって、近年においては、新たなイントラ予測モードが次々と提案され、HEVCのような新たな符号化方式においては、より多くのイントラ予測モードが採用されている。   In general, the prediction accuracy of intra prediction improves as the types of intra prediction modes increase. Therefore, in recent years, new intra prediction modes have been proposed one after another, and more intra prediction modes are employed in new coding schemes such as HEVC.

,"Test Model under Consideration",JCTVC-B205,Joint Collaborative Team on Video Coding (JCT-VC)of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 2nd Meeting:Geneva,CH,21-28 July, 2010, "Test Model under Consideration", JCTVC-B205, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11 2nd Meeting: Geneva, CH, 21-28 July, 2010

しかしながら、用意されるイントラ予測モードの種類が多くなるほど、イントラ予測モードを指定する情報の符号長が増大するが、実際には全てのイントラ予測モードが使用されるとは限らず、そのために符号化効率が不要に低減する恐れがあった。   However, as the types of prepared intra prediction modes increase, the code length of the information specifying the intra prediction mode increases. However, not all intra prediction modes are actually used. There was a risk that efficiency would be reduced unnecessarily.

本発明は、このような状況に鑑みてなされたものであり、イントラ予測モードを指定する情報の符号長を適応的に制御することができるようにすることにより、符号化効率の不要な低減を抑制することができるようにすることを目的とする。   The present invention has been made in view of such a situation, and by enabling the code length of information specifying an intra prediction mode to be adaptively controlled, unnecessary reduction in coding efficiency can be achieved. It aims to be able to suppress.

本発明の一側面は、符号化する画像の内容に応じて、イントラ予測モードを指定するイントラ予測モード情報に割り当てる2値化の符号長を決定する符号長決定部と、前記符号長決定部により決定された符号長で前記イントラ予測モード情報を2値化する2値化部とを備える画像処理装置である。   One aspect of the present invention includes a code length determination unit that determines a code length of binarization to be assigned to intra prediction mode information that specifies an intra prediction mode according to the content of an image to be encoded, and the code length determination unit. An image processing apparatus comprising: a binarization unit that binarizes the intra prediction mode information with a determined code length.

前記符号長決定部は、過去に行われたイントラ予測におけるモード選択結果に基づいて前記符号長を決定することができる。   The code length determination unit can determine the code length based on a mode selection result in intra prediction performed in the past.

前記符号長決定部は、現在の処理対象に対するイントラ予測におけるモード選択結果に基づいて前記符号長を決定することができる。   The code length determination unit can determine the code length based on a mode selection result in intra prediction for the current processing target.

前記符号長決定部は、前記モード選択結果に基づいて算出されるコスト関数値に基づいて前記符号長を決定することができる。   The code length determination unit may determine the code length based on a cost function value calculated based on the mode selection result.

符号化する画像の内容に応じて、予め用意されたイントラ予測モードの中から、イントラ予測での使用を許可するモードを決定する許可モード決定部と、前記許可モード決定部により使用を許可されたイントラ予測モードを用いてイントラ予測を行うイントラ予測部とをさらに備え、前記符号長決定部は、前記許可モード決定部により使用を許可されたイントラ予測モードの数に応じて前記符号長を決定することができる。   According to the content of the image to be encoded, the permission mode determination unit that determines a mode that is permitted to be used in intra prediction from among the intra prediction modes prepared in advance, and the use is permitted by the permission mode determination unit. An intra prediction unit that performs intra prediction using an intra prediction mode, and the code length determination unit determines the code length according to the number of intra prediction modes permitted to be used by the permission mode determination unit. be able to.

使用を許可するイントラ予測モードを処理対象の領域の大きさ毎に指定する、前記イントラ予測モードの制限レベル毎のテーブル情報を記憶するテーブル情報記憶部と、前記テーブル情報記憶部により記憶される各制御レベルのテーブル情報の中から、符号化する画像の内容に応じた制限レベルのテーブル情報を選択するテーブル選択部とをさらに備え、前記許可モード決定部は、前記テーブル選択部により選択されたテーブル情報を用いて、前記イントラ予測での使用を許可するモードとして決定することができる。   A table information storage unit that stores table information for each restriction level of the intra prediction mode that specifies an intra prediction mode that is allowed to be used for each size of a region to be processed, and each of the table information storage units that stores the table information A table selection unit that selects table information at a restriction level corresponding to the content of the image to be encoded from the table information at the control level, and the permission mode determination unit is a table selected by the table selection unit. Using the information, it can be determined as a mode that permits use in the intra prediction.

前記テーブル選択部が選択したテーブル情報の制限レベルを示すフラグ情報を生成するフラグ生成部をさらに備えることができる。   The information processing apparatus may further include a flag generation unit that generates flag information indicating a restriction level of the table information selected by the table selection unit.

前記2値化部により前記イントラ予測モード情報が2値化された2値データを符号化する符号化部をさらに備えることができる。   The image processing apparatus may further include an encoding unit that encodes binary data in which the intra prediction mode information is binarized by the binarization unit.

前記符号長決定部は、所定の処理単位毎に前記符号長を決定することができる。   The code length determination unit can determine the code length for each predetermined processing unit.

本発明の一側面は、また、画像処理装置の画像処理方法であって、符号長決定部が、符号化する画像の内容に応じて、イントラ予測モードを指定するイントラ予測モード情報に割り当てる2値化の符号長を決定し、2値化部が、決定された符号長で前記イントラ予測モード情報を2値化する画像処理方法である。   One aspect of the present invention is also an image processing method of an image processing device, in which a code length determination unit assigns binary values to intra prediction mode information that specifies an intra prediction mode according to the content of an image to be encoded. This is an image processing method in which the encoding code length is determined, and the binarization unit binarizes the intra prediction mode information with the determined code length.

本発明の一側面は、さらに、コンピュータを、符号化する画像の内容に応じて、イントラ予測モードを指定するイントラ予測モード情報に割り当てる2値化の符号長を決定する符号長決定部、決定された符号長で前記イントラ予測モード情報を2値化する2値化部として機能させるためのプログラムである。   One aspect of the present invention further includes a code length determination unit that determines a code length for binarization to be assigned to intra prediction mode information that specifies an intra prediction mode in accordance with the content of an image to be encoded. This is a program for functioning as a binarization unit that binarizes the intra prediction mode information with a code length.

本発明の他の側面は、符号化時のイントラ予測において行われたイントラ予測モードの使用制限の度合いを示す制限レベルに基づいて、前記イントラ予測において採用されたイントラ予測モードを指定するイントラ予測モード情報に割り当てられた2値化の符号長を決定する符号長決定部と、前記符号長決定部により決定された符号長で前記イントラ予測モード情報の2値データを逆2値化する逆2値化部とを備える画像処理装置である。   Another aspect of the present invention is an intra prediction mode that specifies an intra prediction mode employed in the intra prediction based on a restriction level indicating a degree of restriction on the use of the intra prediction mode performed in the intra prediction at the time of encoding. A code length determination unit that determines a code length of binarization assigned to the information, and an inverse binary that reverse-binarizes the binary data of the intra prediction mode information with the code length determined by the code length determination unit An image processing apparatus including a conversion unit.

前記制限レベルを示すフラグ情報を取得するフラグ情報取得部をさらに備え、前記符号長決定部は、前記フラグ情報取得部により取得された前記フラグ情報により示される制限レベルに基づいて、前記符号長を決定することができる。   A flag information acquisition unit that acquires flag information indicating the restriction level; and the code length determination unit calculates the code length based on the restriction level indicated by the flag information acquired by the flag information acquisition unit. Can be determined.

前記符号長決定部は、前記フラグ情報により示される制限レベルにおいて、処理対象の領域の大きさに応じた符号長を、前記符号長として決定することができる。   The code length determination unit can determine, as the code length, a code length corresponding to the size of the region to be processed at the restriction level indicated by the flag information.

前記逆2値化部により逆2値化されて得られた前記イントラ予測モード情報により示されるイントラ予測モードでイントラ予測を行うイントラ予測部をさらに備えることができる。   An intra prediction unit that performs intra prediction in an intra prediction mode indicated by the intra prediction mode information obtained by debinarization by the debinarization unit may be further provided.

符号化データを復号する復号部をさらに備え、前記逆2値化部は、前記復号部により復号されて得られた前記イントラ予測モード情報の2値データを、前記符号長決定部により決定された符号長で逆2値化することができる。   A decoding unit that decodes encoded data; and the inverse binarization unit determines binary data of the intra prediction mode information obtained by decoding by the decoding unit by the code length determination unit. Inverse binarization can be performed with the code length.

本発明の他の側面は、また、画像処理装置の画像処理方法であって、符号長決定部が、符号化時のイントラ予測において行われたイントラ予測モードの使用制限の度合いを示す制限レベルに基づいて、前記イントラ予測において採用されたイントラ予測モードを指定するイントラ予測モード情報に割り当てられた2値化の符号長を決定し、逆2値化部が、決定された符号長で前記イントラ予測モード情報の2値データを逆2値化する画像処理方法である。   Another aspect of the present invention is also an image processing method of an image processing device, wherein the code length determination unit has a restriction level indicating a degree of restriction on use of an intra prediction mode performed in intra prediction at the time of encoding. And determining a binarization code length assigned to the intra prediction mode information specifying the intra prediction mode employed in the intra prediction, and an inverse binarization unit performs the intra prediction with the determined code length. This is an image processing method for binarizing binary data of mode information.

本発明の他の側面は、さらに、コンピュータを、符号化時のイントラ予測において行われたイントラ予測モードの使用制限の度合いを示す制限レベルに基づいて、前記イントラ予測において採用されたイントラ予測モードを指定するイントラ予測モード情報に割り当てられた2値化の符号長を決定する符号長決定部、決定された符号長で前記イントラ予測モード情報の2値データを逆2値化する逆2値化部として機能させるためのプログラムである。   In another aspect of the present invention, the computer further determines the intra prediction mode adopted in the intra prediction based on a restriction level indicating a degree of use restriction of the intra prediction mode performed in the intra prediction at the time of encoding. A code length determining unit that determines a code length of binarization assigned to the designated intra prediction mode information, and an inverse binarizing unit that reverse-binarizes the binary data of the intra prediction mode information with the determined code length It is a program to make it function as.

本発明の一側面においては、符号化する画像の内容に応じて、イントラ予測モードを指定するイントラ予測モード情報に割り当てる2値化の符号長が決定され、決定された符号長で前記イントラ予測モード情報が2値化される。   In one aspect of the present invention, a binarization code length to be assigned to intra prediction mode information designating an intra prediction mode is determined according to the content of an image to be encoded, and the intra prediction mode is determined with the determined code length. Information is binarized.

本発明の他の側面においては、符号化時のイントラ予測において行われたイントラ予測モードの使用制限の度合いを示す制限レベルに基づいて、前記イントラ予測において採用されたイントラ予測モードを指定するイントラ予測モード情報に割り当てられた2値化の符号長が決定され、決定された符号長で前記イントラ予測モード情報の2値データが逆2値化される。   In another aspect of the present invention, intra prediction that specifies an intra prediction mode employed in the intra prediction based on a restriction level indicating a degree of restriction on the use of the intra prediction mode performed in intra prediction at the time of encoding. The binarization code length assigned to the mode information is determined, and the binary data of the intra prediction mode information is inverse binarized with the determined code length.

本発明によれば、画像を処理することができる。特に、符号化効率を向上させることができる。   According to the present invention, an image can be processed. In particular, encoding efficiency can be improved.

AVC符号化方式に基づく画像圧縮情報を出力する画像符号化装置を示すブロック図である。It is a block diagram which shows the image coding apparatus which outputs the image compression information based on an AVC encoding system. AVC符号化方式に基づく画像圧縮情報を入力とする画像復号装置を示すブロック図である。It is a block diagram which shows the image decoding apparatus which inputs the image compression information based on an AVC encoding system. AVC符号化方式における1つのマクロブロックに含まれる4×4ブロックの処理順序を示した図である。It is the figure which showed the processing order of 4x4 block contained in one macroblock in an AVC encoding system. AVC符号化方式において定められているイントラ4×4予測モードを示す図である。It is a figure which shows the intra 4x4 prediction mode defined in the AVC encoding system. AVC符号化方式において定められているイントラ4×4予測モードを示す図である。It is a figure which shows the intra 4x4 prediction mode defined in the AVC encoding system. AVC符号化方式において定められているイントラ4×4予測モードの予測方向を示した図である。It is the figure which showed the prediction direction of the intra 4x4 prediction mode defined in the AVC encoding system. AVC符号化方式において定められているイントラ4×4予測モードの予測方法を説明するための図である。It is a figure for demonstrating the prediction method of the intra 4x4 prediction mode defined in the AVC encoding system. AVC符号化方式において定められているイントラ4×4予測モードの符号化方法を説明するための図である。It is a figure for demonstrating the encoding method of the intra 4x4 prediction mode defined in the AVC encoding system. AVC符号化方式において定められているイントラ8×8予測モードを示した図である。It is the figure which showed the intra 8x8 prediction mode defined in the AVC encoding system. AVC符号化方式において定められているイントラ8×8予測モードを示した図である。It is the figure which showed the intra 8x8 prediction mode defined in the AVC encoding system. AVC符号化方式において定められているイントラ16×16予測モードを示した図である。It is the figure which showed the intra 16x16 prediction mode defined in the AVC encoding system. AVC符号化方式において定められているイントラ16×16予測モードを示した図である。It is the figure which showed the intra 16x16 prediction mode defined in the AVC encoding system. AVC符号化方式において定められているイントラ16×16予測モードにおける予測値の算出方法を説明するための図である。It is a figure for demonstrating the calculation method of the predicted value in the intra 16x16 prediction mode defined in the AVC encoding system. AVC符号化方式において定められている色差信号に対する予測モードの例を示す図である。It is a figure which shows the example of the prediction mode with respect to the color difference signal defined in the AVC encoding system. コーディングユニットの構成例を説明する図である。It is a figure explaining the structural example of a coding unit. Angular Prediction イントラ予測方式を説明する図である。It is a figure explaining an Angular Prediction intra prediction method. Arbitrary Directional Intra イントラ予測方式を説明する図である。It is a figure explaining an Arbitrary Directional Intra intra prediction system. イントラ予測モードの番号の符号化・復号を説明する図である。It is a figure explaining encoding and decoding of the number of intra prediction modes. 本発明を適用した画像符号化装置の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the image coding apparatus to which this invention is applied. モード制限レベル制御部の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of a mode restriction level control part. テーブルの例を示す図である。It is a figure which shows the example of a table. テーブルの他の例を示す図である。It is a figure which shows the other example of a table. 可逆符号化部の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of a lossless encoding part. 符号化処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of an encoding process. イントラ予測処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of an intra prediction process. モード制限レベル制御処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a mode restriction | limiting level control process. 可逆符号化処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a lossless encoding process. イントラ予測モード情報符号化処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of an intra prediction mode information encoding process. イントラ予測モード情報符号化処理の流れの例を説明する、図28に続くフローチャートである。FIG. 29 is a flowchart following FIG. 28, illustrating an example of the flow of an intra prediction mode information encoding process. モード制限レベル制御部の他の構成例を示すブロック図である。It is a block diagram which shows the other structural example of a mode restriction | limiting level control part. モード制限レベル制御処理の流れの他の例を説明するフローチャートである。It is a flowchart explaining the other example of the flow of a mode restriction | limiting level control process. テーブルのさらに他の例を示す図である。It is a figure which shows the further another example of a table. 本発明を適用した画像復号装置の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the image decoding apparatus to which this invention is applied. 可逆復号部の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of a lossless decoding part. 復号処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a decoding process. 可逆復号処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a lossless decoding process. イントラ予測モード情報復号処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of an intra prediction mode information decoding process. イントラ予測モード情報復号処理の流れの例を説明する、図37に続くフローチャートである。It is a flowchart following FIG. 37 explaining the example of the flow of an intra prediction mode information decoding process. 本発明を適用したパーソナルコンピュータの主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the personal computer to which this invention is applied. 本発明を適用したテレビジョン受像機の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the television receiver to which this invention is applied. 本発明を適用した携帯電話機の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the mobile telephone to which this invention is applied. 本発明を適用したハードディスクレコーダの主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the hard disk recorder to which this invention is applied. 本発明を適用したカメラの主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the camera to which this invention is applied.

以下、発明を実施するための形態(以下実施の形態とする)について説明する。なお、説明は以下の順序で行う。
1.第1の実施の形態(画像符号化装置)
2.第2の実施の形態(画像復号装置)
3.第3の実施の形態(パーソナルコンピュータ)
4.第4の実施の形態(テレビジョン受像機)
5.第5の実施の形態(携帯電話機)
6.第6の実施の形態(ハードディスクレコーダ)
7.第7の実施の形態(カメラ)
Hereinafter, modes for carrying out the invention (hereinafter referred to as embodiments) will be described. The description will be given in the following order.
1. First Embodiment (Image Encoding Device)
2. Second embodiment (image decoding apparatus)
3. Third embodiment (personal computer)
4). Fourth embodiment (television receiver)
5. Fifth embodiment (mobile phone)
6). Sixth embodiment (hard disk recorder)
7). Seventh embodiment (camera)

<1.第1の実施の形態>
[AVC符号化方式の画像符号化装置]
図1は、H.264及びMPEG(Moving Picture Experts Group)4 Part10(AVC(Advanced Video Coding))符号化方式により画像を符号化する画像符号化装置の一実施の形態の構成を表している。
<1. First Embodiment>
[AVC coding image coding device]
FIG. 1 illustrates a configuration of an embodiment of an image encoding apparatus that encodes an image using an H.264 and MPEG (Moving Picture Experts Group) 4 Part 10 (AVC (Advanced Video Coding)) encoding method.

図1に示される画像符号化装置100は、AVC規格に基づいた符号化方式で画像を符号化し、出力する装置である。図1に示されるように、画像符号化装置100は、A/D変換部101、画面並べ替えバッファ102、演算部103、直交変換部104、量子化部105、可逆符号化部106、および蓄積バッファ107を有する。また、画像符号化装置100は、逆量子化部108、逆直交変換部109、演算部110、デブロックフィルタ111、フレームメモリ112、選択部113、イントラ予測部114、動き予測・補償部115、選択部116、およびレート制御部117を有する。   An image encoding apparatus 100 shown in FIG. 1 is an apparatus that encodes and outputs an image using an encoding method based on the AVC standard. As illustrated in FIG. 1, the image encoding device 100 includes an A / D conversion unit 101, a screen rearrangement buffer 102, a calculation unit 103, an orthogonal transformation unit 104, a quantization unit 105, a lossless encoding unit 106, and an accumulation. A buffer 107 is provided. In addition, the image encoding device 100 includes an inverse quantization unit 108, an inverse orthogonal transform unit 109, a calculation unit 110, a deblock filter 111, a frame memory 112, a selection unit 113, an intra prediction unit 114, a motion prediction / compensation unit 115, A selection unit 116 and a rate control unit 117 are included.

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

画面並べ替えバッファ102は、フレームの順番を並び替えた画像を、演算部103に供給する。また、画面並べ替えバッファ102は、フレームの順番を並び替えた画像を、イントラ予測部114および動き予測・補償部115にも供給する。   The screen rearrangement buffer 102 supplies the image with the rearranged frame order to the arithmetic unit 103. The screen rearrangement buffer 102 also supplies the image in which the order of the frames is rearranged to the intra prediction unit 114 and the motion prediction / compensation unit 115.

演算部103は、画面並べ替えバッファ102から読み出された画像から、選択部116を介してイントラ予測部114若しくは動き予測・補償部115から供給される予測画像を減算し、その差分情報を直交変換部104に出力する。   The calculation unit 103 subtracts the prediction image supplied from the intra prediction unit 114 or the motion prediction / compensation unit 115 via the selection unit 116 from the image read from the screen rearrangement buffer 102, and orthogonalizes the difference information. The data is output to the conversion unit 104.

例えば、イントラ符号化が行われる画像の場合、演算部103は、画面並べ替えバッファ102から読み出された画像から、イントラ予測部114から供給される予測画像を減算する。また、例えば、インター符号化が行われる画像の場合、演算部103は、画面並べ替えバッファ102から読み出された画像から、動き予測・補償部115から供給される予測画像を減算する。   For example, in the case of an image on which intra coding is performed, the calculation unit 103 subtracts the prediction image supplied from the intra prediction unit 114 from the image read from the screen rearrangement buffer 102. For example, in the case of an image on which inter coding is performed, the arithmetic unit 103 subtracts the predicted image supplied from the motion prediction / compensation unit 115 from the image read from the screen rearrangement buffer 102.

直交変換部104は、演算部103から供給される差分情報に対して、離散コサイン変換、カルーネン・レーベ変換等の直交変換を施し、その変換係数を量子化部105に供給する。   The orthogonal transform unit 104 performs orthogonal transform such as discrete cosine transform and Karhunen-Loeve transform on the difference information supplied from the calculation unit 103 and supplies the transform coefficient to the quantization unit 105.

量子化部105は、直交変換部104が出力する変換係数を量子化する。量子化部105は、レート制御部117から供給される符号量の目標値に関する情報に基づいて量子化パラメータを設定し、量子化を行う。量子化部105は、量子化された変換係数を可逆符号化部106に供給する。   The quantization unit 105 quantizes the transform coefficient output from the orthogonal transform unit 104. The quantization unit 105 sets a quantization parameter based on information on the target value of the code amount supplied from the rate control unit 117, and performs quantization. The quantization unit 105 supplies the quantized transform coefficient to the lossless encoding unit 106.

可逆符号化部106は、その量子化された変換係数に対して、可変長符号化、算術符号化等の可逆符号化を施す。係数データは、レート制御部117の制御の下で量子化されているので、この符号量は、レート制御部117が設定した目標値となる(若しくは目標値に近似する)。   The lossless encoding unit 106 performs lossless encoding such as variable length encoding and arithmetic encoding on the quantized transform coefficient. Since the coefficient data is quantized under the control of the rate control unit 117, the code amount becomes a target value set by the rate control unit 117 (or approximates the target value).

可逆符号化部106は、イントラ予測を示す情報などをイントラ予測部114から取得し、インター予測モードを示す情報や動きベクトル情報などを動き予測・補償部115から取得する。なお、イントラ予測(画面内予測)を示す情報は、以下、イントラ予測モード情報とも称する。また、インター予測(画面間予測)を示す情報モードを示す情報は、以下、インター予測モード情報とも称する。   The lossless encoding unit 106 acquires information indicating intra prediction from the intra prediction unit 114, and acquires information indicating inter prediction mode, motion vector information, and the like from the motion prediction / compensation unit 115. Note that information indicating intra prediction (intra-screen prediction) is hereinafter also referred to as intra prediction mode information. In addition, information indicating an information mode indicating inter prediction (inter-screen prediction) is hereinafter also referred to as inter prediction mode information.

可逆符号化部106は、量子化された変換係数を符号化するとともに、フィルタ係数、イントラ予測モード情報、インター予測モード情報、および量子化パラメータなどの各種情報を、符号化データのヘッダ情報の一部とする(多重化する)。可逆符号化部106は、符号化して得られた符号化データを蓄積バッファ107に供給して蓄積させる。   The lossless encoding unit 106 encodes the quantized transform coefficient, and also converts various information such as filter coefficient, intra prediction mode information, inter prediction mode information, and quantization parameter into one piece of header information of the encoded data. Part (multiplex). The lossless encoding unit 106 supplies the encoded data obtained by encoding to the accumulation buffer 107 for accumulation.

例えば、可逆符号化部106においては、可変長符号化または算術符号化等の可逆符号化処理が行われる。可変長符号化としては、H.264/AVC方式で定められているCAVLC(Context-Adaptive Variable Length Coding)などがあげられる。算術符号化としては、CABAC(Context-Adaptive Binary Arithmetic Coding)などがあげられる。   For example, the lossless encoding unit 106 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).

蓄積バッファ107は、可逆符号化部106から供給された符号化データを、一時的に保持し、所定のタイミングにおいて、H.264/AVC方式で符号化された符号化画像として、例えば、後段の図示せぬ記録装置や伝送路などに出力する。   The accumulation buffer 107 temporarily holds the encoded data supplied from the lossless encoding unit 106, and at a predetermined timing, the H.264 buffer stores the encoded data. As an encoded 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.

また、量子化部105において量子化された変換係数は、逆量子化部108にも供給される。逆量子化部108は、その量子化された変換係数を、量子化部105による量子化に対応する方法で逆量子化する。逆量子化部108は、得られた変換係数を、逆直交変換部109に供給する。   The transform coefficient quantized by the quantization unit 105 is also supplied to the inverse quantization unit 108. The inverse quantization unit 108 inversely quantizes the quantized transform coefficient by a method corresponding to the quantization by the quantization unit 105. The inverse quantization unit 108 supplies the obtained transform coefficient to the inverse orthogonal transform unit 109.

逆直交変換部109は、供給された変換係数を、直交変換部104による直交変換処理に対応する方法で逆直交変換する。逆直交変換された出力(復元された差分情報)は、演算部110に供給される。   The inverse orthogonal transform unit 109 performs inverse orthogonal transform on the supplied transform coefficient by a method corresponding to the orthogonal transform process by the orthogonal transform unit 104. The inversely orthogonal transformed output (restored difference information) is supplied to the calculation unit 110.

演算部110は、逆直交変換部109より供給された逆直交変換結果、すなわち、復元された差分情報に、選択部116を介してイントラ予測部114若しくは動き予測・補償部115から供給される予測画像を加算し、局部的に復号された画像(復号画像)を得る。   The calculation unit 110 uses the inverse prediction unit 114 or the motion prediction / compensation unit 115 via the selection unit 116 for the inverse orthogonal transformation result supplied from the inverse orthogonal transformation unit 109, that is, the restored difference information. The images are added to obtain a locally decoded image (decoded image).

例えば、差分情報が、イントラ符号化が行われる画像に対応する場合、演算部110は、その差分情報にイントラ予測部114から供給される予測画像を加算する。また、例えば、差分情報が、インター符号化が行われる画像に対応する場合、演算部110は、その差分情報に動き予測・補償部115から供給される予測画像を加算する。   For example, when the difference information corresponds to an image on which intra coding is performed, the calculation unit 110 adds the predicted image supplied from the intra prediction unit 114 to the difference information. For example, when the difference information corresponds to an image on which inter coding is performed, the calculation unit 110 adds the predicted image supplied from the motion prediction / compensation unit 115 to the difference information.

その加算結果は、デブロックフィルタ111またはフレームメモリ112に供給される。   The addition result is supplied to the deblock filter 111 or the frame memory 112.

デブロックフィルタ111は、適宜デブロックフィルタ処理を行うことにより復号画像のブロック歪を除去するとともに、例えばウィナーフィルタ(Wiener Filter)を用いて適宜ループフィルタ処理を行うことにより画質改善を行う。デブロックフィルタ111は、各画素をクラス分類し、クラスごとに適切なフィルタ処理を施す。デブロックフィルタ111は、そのフィルタ処理結果をフレームメモリ112に供給する。   The deblocking filter 111 removes block distortion of the decoded image by appropriately performing the deblocking filter process, and improves the image quality by appropriately performing the loop filter process using, for example, a Wiener filter. The deblocking filter 111 classifies each pixel and performs an appropriate filter process for each class. The deblocking filter 111 supplies the filter processing result to the frame memory 112.

フレームメモリ112は、所定のタイミングにおいて、蓄積されている参照画像を、選択部113を介してイントラ予測部114または動き予測・補償部115に出力する。   The frame memory 112 outputs the stored reference image to the intra prediction unit 114 or the motion prediction / compensation unit 115 via the selection unit 113 at a predetermined timing.

例えば、イントラ符号化が行われる画像の場合、フレームメモリ112は、参照画像を、選択部113を介してイントラ予測部114に供給する。また、例えば、インター符号化が行われる場合、フレームメモリ112は、参照画像を、選択部113を介して動き予測・補償部115に供給する。   For example, in the case of an image on which intra coding is performed, the frame memory 112 supplies the reference image to the intra prediction unit 114 via the selection unit 113. For example, when inter coding is performed, the frame memory 112 supplies the reference image to the motion prediction / compensation unit 115 via the selection unit 113.

選択部113は、フレームメモリ112から供給される参照画像がイントラ符号化を行う画像である場合、その参照画像をイントラ予測部114に供給する。また、選択部113は、フレームメモリ112から供給される参照画像がインター符号化を行う画像である場合、その参照画像を動き予測・補償部115に供給する。   When the reference image supplied from the frame memory 112 is an image on which intra coding is performed, the selection unit 113 supplies the reference image to the intra prediction unit 114. Further, when the reference image supplied from the frame memory 112 is an image to be subjected to inter coding, the selection unit 113 supplies the reference image to the motion prediction / compensation unit 115.

イントラ予測部114は、画面内の画素値を用いて予測画像を生成するイントラ予測(画面内予測)を行う。イントラ予測部114は、複数のモード(イントラ予測モード)によりイントラ予測を行う。   The intra prediction unit 114 performs intra prediction (intra-screen prediction) that generates a predicted image using pixel values in the screen. The intra prediction unit 114 performs intra prediction in a plurality of modes (intra prediction modes).

H.264画像情報符号化方式において、輝度信号に対しては、イントラ4×4予測モード、イントラ8×8予測モード及びイントラ16×16予測モードが定義されており、また、色差信号に関しては、それぞれのマクロブロックごとに、輝度信号とは独立した予測モードを定義することが可能である。イントラ4×4予測モードについては、それぞれの4×4輝度ブロックに対して、イントラ8×8予測モードについては、それぞれの8×8輝度ブロックに対して、1つのイントラ予測モードが定義されることになる。イントラ16×16予測モード、並びに、色差信号に対しては、1つのマクロブロックに対して、それぞれ1つの予測モードが定義されることになる。   In the H.264 image information encoding method, for the luminance signal, an intra 4 × 4 prediction mode, an intra 8 × 8 prediction mode, and an intra 16 × 16 prediction mode are defined, and for a color difference signal, For each macroblock, it is possible to define a prediction mode independent of the luminance signal. For intra 4x4 prediction mode, one intra prediction mode must be defined for each 4x4 luminance block, and for intra 8x8 prediction mode, for each 8x8 luminance block become. For the intra 16 × 16 prediction mode and the color difference signal, one prediction mode is defined for each macroblock.

イントラ予測部114は、全てのイントラ予測モードで予測画像を生成し、各予測画像を評価し、最適なモードを選択する。イントラ予測部114は、最適なイントラ予測モードを選択すると、その最適なモードで生成された予測画像を、選択部116を介して演算部103や演算部110に供給する。   The intra prediction unit 114 generates prediction images in all intra prediction modes, evaluates each prediction image, and selects an optimal mode. When the optimal intra prediction mode is selected, the intra prediction unit 114 supplies the prediction image generated in the optimal mode to the calculation unit 103 and the calculation unit 110 via the selection unit 116.

また、上述したように、イントラ予測部114は、採用したイントラ予測モードを示すイントラ予測モード情報等の情報を、適宜可逆符号化部106に供給する。   Further, as described above, the intra prediction unit 114 supplies information such as intra prediction mode information indicating the adopted intra prediction mode to the lossless encoding unit 106 as appropriate.

動き予測・補償部115は、インター符号化が行われる画像について、画面並べ替えバッファ102から供給される入力画像と、選択部113を介してフレームメモリ112から供給される参照画像とを用いて、動き予測を行い、検出された動きベクトルに応じて動き補償処理を行い、予測画像(インター予測画像情報)を生成する。   The motion prediction / compensation unit 115 uses the input image supplied from the screen rearrangement buffer 102 and the reference image supplied from the frame memory 112 via the selection unit 113 for the image to be inter-coded, Motion prediction is performed, motion compensation processing is performed according to the detected motion vector, and a predicted image (inter predicted image information) is generated.

動き予測・補償部115は、候補となる全てのインター予測モードのインター予測処理を行い、予測画像を生成する。動き予測・補償部115は、生成された予測画像を、選択部116を介して演算部103や演算部110に供給する。   The motion prediction / compensation unit 115 performs inter prediction processing in all candidate inter prediction modes, and generates a prediction image. The motion prediction / compensation unit 115 supplies the generated predicted image to the calculation unit 103 and the calculation unit 110 via the selection unit 116.

また、動き予測・補償部115は、採用されたインター予測モードを示すインター予測モード情報や、算出した動きベクトルを示す動きベクトル情報を可逆符号化部106に供給する。   In addition, the motion prediction / compensation unit 115 supplies the inter prediction mode information indicating the adopted inter prediction mode and the motion vector information indicating the calculated motion vector to the lossless encoding unit 106.

選択部116は、イントラ符号化を行う画像の場合、イントラ予測部114の出力を演算部103や演算部110に供給し、インター符号化を行う画像の場合、動き予測・補償部115の出力を演算部103や演算部110に供給する。   The selection unit 116 supplies the output of the intra prediction unit 114 to the calculation unit 103 and the calculation unit 110 in the case of an image to be subjected to intra coding, and outputs the output of the motion prediction / compensation unit 115 in the case of an image to be subjected to inter coding. It supplies to the calculating part 103 and the calculating part 110.

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

[AVC符号化方式の画像復号装置]
図2は、離散コサイン変換若しくはカルーネン・レーベ変換等の直交変換と動き補償により画像圧縮を実現する画像復号装置の主な構成例を示すブロック図である。図2に示される画像復号装置200は、図1の画像符号化装置100に対応する復号装置である。
[AVC encoding image decoding device]
FIG. 2 is a block diagram illustrating a main configuration example of an image decoding apparatus that realizes image compression by orthogonal transformation such as discrete cosine transformation or Karhunen-Labe transformation and motion compensation. An image decoding apparatus 200 shown in FIG. 2 is a decoding apparatus corresponding to the image encoding apparatus 100 of FIG.

画像符号化装置100より符号化された符号化データは、例えば、所定の伝送路を介して、この画像符号化装置100に対応する画像復号装置200に供給され、復号される。   The encoded data encoded by the image encoding device 100 is supplied to the image decoding device 200 corresponding to the image encoding device 100 via, for example, a predetermined transmission path and decoded.

図2に示されるように、画像復号装置200は、蓄積バッファ201、可逆復号部202、逆量子化部203、逆直交変換部204、演算部205、デブロックフィルタ206、画面並べ替えバッファ207、およびD/A変換部208を有する。また、画像復号装置200は、フレームメモリ209、選択部210、イントラ予測部211、動き予測・補償部212、および選択部213を有する。   As shown in FIG. 2, the image decoding apparatus 200 includes a storage buffer 201, a lossless decoding unit 202, an inverse quantization unit 203, an inverse orthogonal transform unit 204, a calculation unit 205, a deblock filter 206, a screen rearrangement buffer 207, And a D / A converter 208. The image decoding apparatus 200 includes a frame memory 209, a selection unit 210, an intra prediction unit 211, a motion prediction / compensation unit 212, and a selection unit 213.

蓄積バッファ201は、伝送されてきた符号化データを蓄積する。この符号化データは、画像符号化装置100により符号化されたものである。可逆復号部202は、蓄積バッファ201から所定のタイミングで読み出された符号化データを、図1の可逆符号化部106の符号化方式に対応する方式で復号する。   The accumulation buffer 201 accumulates the transmitted encoded data. This encoded data is encoded by the image encoding device 100. The lossless decoding unit 202 decodes the encoded data read from the accumulation buffer 201 at a predetermined timing by a method corresponding to the encoding method of the lossless encoding unit 106 in FIG.

また、当該フレームがイントラ符号化されたものである場合、符号化データのヘッダ部にはイントラ予測モード情報が格納されている。可逆復号部202は、このイントラ予測モード情報も復号し、その情報をイントラ予測部211に供給する。これに対して、当該フレームがインター符号化されたものである場合、符号化データのヘッダ部には動きベクトル情報が格納されている。可逆復号部202は、この動きベクトル情報も復号し、その情報を動き予測・補償部212に供給する。   When the frame is intra-coded, intra prediction mode information is stored in the header portion of the encoded data. The lossless decoding unit 202 also decodes the intra prediction mode information and supplies the information to the intra prediction unit 211. On the other hand, when the frame is inter-encoded, motion vector information is stored in the header portion of the encoded data. The lossless decoding unit 202 also decodes the motion vector information and supplies the information to the motion prediction / compensation unit 212.

逆量子化部203は、可逆復号部202により復号されて得られた係数データ(量子化係数)を、図1の量子化部105の量子化方式に対応する方式で逆量子化する。つまり、逆量子化部203は、図1の逆量子化部108と同様の方法で量子化係数の逆量子化を行う。   The inverse quantization unit 203 inversely quantizes the coefficient data (quantization coefficient) obtained by decoding by the lossless decoding unit 202 by a method corresponding to the quantization method of the quantization unit 105 in FIG. That is, the inverse quantization unit 203 performs inverse quantization of the quantization coefficient by the same method as the inverse quantization unit 108 in FIG.

逆量子化部203は、逆量子化された係数データ、つまり、直交変換係数を、逆直交変換部204に供給する。逆直交変換部204は、図1の直交変換部104の直交変換方式に対応する方式(図1の逆直交変換部109と同様の方式)で、その直交変換係数を逆直交変換し、画像符号化装置100において直交変換される前の残差データに対応する復号残差データを得る。例えば、4次の逆直交変換が施される。   The inverse quantization unit 203 supplies the inversely quantized coefficient data, that is, the orthogonal transform coefficient, to the inverse orthogonal transform unit 204. The inverse orthogonal transform unit 204 is a method corresponding to the orthogonal transform method of the orthogonal transform unit 104 in FIG. 1 (the same method as the inverse orthogonal transform unit 109 in FIG. 1), and inverse orthogonal transforms the orthogonal transform coefficient to obtain an image code. The decoding apparatus 100 obtains decoded residual data corresponding to the residual data before being orthogonally transformed in the encoding apparatus 100. For example, fourth-order inverse orthogonal transform is performed.

逆直交変換されて得られた復号残差データは、演算部205に供給される。また、演算部205には、選択部213を介して、イントラ予測部211若しくは動き予測・補償部212から予測画像が供給される。   Decoded residual data obtained by the inverse orthogonal transform is supplied to the calculation unit 205. In addition, a prediction image is supplied to the calculation unit 205 from the intra prediction unit 211 or the motion prediction / compensation unit 212 via the selection unit 213.

演算部205は、その復号残差データと予測画像とを加算し、画像符号化装置100の演算部103により予測画像が減算される前の画像データに対応する復号画像データを得る。演算部205は、その復号画像データをデブロックフィルタ206に供給する。   The computing unit 205 adds the decoded residual data and the predicted image, and obtains decoded image data corresponding to the image data before the predicted image is subtracted by the computing unit 103 of the image encoding device 100. The arithmetic unit 205 supplies the decoded image data to the deblock filter 206.

デブロックフィルタ206は、供給された復号画像のブロック歪を除去した後、画面並べ替えバッファ207に供給する。   The deblocking filter 206 removes block distortion of the supplied decoded image, and then supplies it to the screen rearranging buffer 207.

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

デブロックフィルタ206の出力は、さらに、フレームメモリ209に供給される。   The output of the deblocking filter 206 is further supplied to the frame memory 209.

フレームメモリ209、選択部210、イントラ予測部211、動き予測・補償部212、および選択部213は、画像符号化装置100のフレームメモリ112、選択部113、イントラ予測部114、動き予測・補償部115、および選択部116にそれぞれ対応する。   The frame memory 209, the selection unit 210, the intra prediction unit 211, the motion prediction / compensation unit 212, and the selection unit 213 are the frame memory 112, the selection unit 113, the intra prediction unit 114, and the motion prediction / compensation unit of the image encoding device 100. 115 and the selection unit 116 respectively.

選択部210は、インター処理される画像と参照される画像をフレームメモリ209から読み出し、動き予測・補償部212に供給する。また、選択部210は、イントラ予測に用いられる画像をフレームメモリ209から読み出し、イントラ予測部211に供給する。   The selection unit 210 reads out the inter-processed image and the referenced image from the frame memory 209, and supplies them to the motion prediction / compensation unit 212. Further, the selection unit 210 reads an image used for intra prediction from the frame memory 209 and supplies the image to the intra prediction unit 211.

イントラ予測部211には、ヘッダ情報を復号して得られたイントラ予測モードを示す情報等が可逆復号部202から適宜供給される。イントラ予測部211は、この情報に基づいて、フレームメモリ209から取得した参照画像から予測画像を生成し、生成した予測画像を選択部213に供給する。   Information indicating the intra prediction mode obtained by decoding the header information is appropriately supplied from the lossless decoding unit 202 to the intra prediction unit 211. Based on this information, the intra prediction unit 211 generates a prediction image from the reference image acquired from the frame memory 209 and supplies the generated prediction image to the selection unit 213.

動き予測・補償部212は、ヘッダ情報を復号して得られた情報(予測モード情報、動きベクトル情報、参照フレーム情報、フラグ、および各種パラメータ等)を可逆復号部202から取得する。   The motion prediction / compensation unit 212 acquires information (prediction mode information, motion vector information, reference frame information, flags, various parameters, and the like) obtained by decoding the header information from the lossless decoding unit 202.

動き予測・補償部212は、可逆復号部202から供給されるそれらの情報に基づいて、フレームメモリ209から取得した参照画像から予測画像を生成し、生成した予測画像を選択部213に供給する。   The motion prediction / compensation unit 212 generates a prediction image from the reference image acquired from the frame memory 209 based on the information supplied from the lossless decoding unit 202, and supplies the generated prediction image to the selection unit 213.

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

[イントラ予測モード]
次に、AVC符号化方式で定められているイントラ予測方式について述べる。AVC符号化方式の場合、輝度信号については、イントラ4×4予測モードとイントラ8×8予測モード、イントラ16×16予測モードの3通りの方式が定められている。図3に示されるように、イントラ16×16予測モードの際には、各ブロックの直流成分を集めて4×4行列が生成され、これに対して、更に、直交変換が施される。
[Intra prediction mode]
Next, the intra prediction method defined in the AVC encoding method will be described. In the case of the AVC encoding method, three types of luminance signals are defined: an intra 4 × 4 prediction mode, an intra 8 × 8 prediction mode, and an intra 16 × 16 prediction mode. As shown in FIG. 3, in the intra 16 × 16 prediction mode, a DC component of each block is collected to generate a 4 × 4 matrix, and orthogonal transformation is further performed on this.

イントラ8×8予測モードに関しては、ハイプロファイル若しくはそれ以上のプロファイルで、当該マクロブロックに、8×8直交変換が施される場合についてのみ適用可能である。   The intra 8 × 8 prediction mode can be applied only when the macroblock is subjected to 8 × 8 orthogonal transform with a high profile or higher profile.

[イントラ4×4予測モード]
以下では、まず、イントラ4×4予測モードについて述べる
[Intra 4x4 prediction mode]
In the following, first, the intra 4 × 4 prediction mode will be described.

AVC符号化方式において規定される9通りのイントラ4×4予測モードを、図4および図5に示す。このうち、DC予測(モード2)以外のモードに関しては、図6に示される通り、それぞれのモードが一定の方向を示している。つまり、イントラ4×4予測モードにおいては、9通りの予測方向(予測モード)が用意されている。   Nine kinds of intra 4 × 4 prediction modes defined in the AVC encoding method are shown in FIGS. Among these, for modes other than DC prediction (mode 2), as shown in FIG. 6, each mode indicates a certain direction. In other words, nine prediction directions (prediction modes) are prepared in the intra 4 × 4 prediction mode.

図7において、'a'〜'p'は、当該ブロックの画素を示し、'A'〜'M'は隣接ブロックに属する画素値を示す。表に示したそれぞれのモードについて、以下に述べるように、'A'〜'M'を用いて'a'〜'p'の予測画素値を生成する。   In FIG. 7, “a” to “p” indicate pixels of the block, and “A” to “M” indicate pixel values belonging to adjacent blocks. For each mode shown in the table, predicted pixel values of 'a' to 'p' are generated using 'A' to 'M' as described below.

モード0(Mode 0)はVertical Predictionであり、A,B,C,Dが "available" の場合のみ適用される。予測画素値は以下の通りである。   Mode 0 (Mode 0) is Vertical Prediction, and is applied only when A, B, C, and D are “available”. The predicted pixel value is as follows.

a, e, i, m : A
b, f, j, n : B
c, g, k, o : C
d, h, l, p : D
a, e, i, m: A
b, f, j, n: B
c, g, k, o: C
d, h, l, p: D

モード1(Mode 1)は、Horizontal Predictionであり、I,J,K,Lが "available" の場合のみ適用される。それぞれの予測画素値は以下のように生成される。   Mode 1 (Horizontal Prediction) is applied only when I, J, K, and L are “available”. Each predicted pixel value is generated as follows.

a, b, c, d : I,
e, f, g, h : J,
i, j, k, l : K,
m, n, o, p : L.
a, b, c, d: I,
e, f, g, h: J,
i, j, k, l: K,
m, n, o, p: L.

モード2(Mode 2)は、DC Predictionであり、A,B,C,D,I,J,K,Lが全て "available" である時、予測値は、以下の式(1)ように生成される。   Mode 2 (Mode 2) is DC Prediction, and when A, B, C, D, I, J, K, and L are all “available”, the predicted value is generated as in the following equation (1). Is done.

Figure 2012160991
・・・(1)
Figure 2012160991
... (1)

また、A,B,C,Dが全て "unavailable" である時、予測値は、以下の式(2)ように生成される。   When A, B, C, and D are all “unavailable”, the predicted value is generated as shown in the following equation (2).

Figure 2012160991
・・・(2)
Figure 2012160991
... (2)

また、I,J,K,Lが全て "unavailable" である時、予測値は以下の式(3)ように生成される。   Further, when I, J, K, and L are all “unavailable”, the predicted value is generated as in the following Expression (3).

Figure 2012160991
・・・(3)
Figure 2012160991
... (3)

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

モード3(Mode 3)は、Diagonal_Down_Left Predictionであり、A,B,C,D,I,J,K,L,Mが "available" の場合のみ適用される。それぞれの予測値は以下のように生成される。   Mode 3 (Diagonal_Down_Left Prediction) is applied only when A, B, C, D, I, J, K, L, and M are “available”. Each predicted value is generated as follows.

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

モード4(Mode 4)は、Diagonal_Down_Right Predictionであり、A,B,C,D,I,J,K,L,Mが "available" の場合のみ適用される。それぞれの予測値は以下のように生成される。   Mode 4 (Diagonal_Down_Right Prediction) is applied only when A, B, C, D, I, J, K, L, and M are “available”. Each predicted value is generated as follows.

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

モード5(Mode 5)は、Diagonal_Vertical_Right Predictionであり、A,B,C,D,I,J,K,L,Mが "available" の場合のみ適用される。それぞれの予測値は以下のように生成される。   Mode 5 (Mode 5) is Diagonal_Vertical_Right Prediction, and is applied only when A, B, C, D, I, J, K, L, and M are “available”. Each predicted value is generated as follows.

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

モード6(Mode 6)は、Horizontal_Down Predictionであり、A,B,C,D,I,J,K,L,Mが "available" の場合のみ適用される。それぞれの予測値は以下のように生成される。   Mode 6 (Mode 6) is Horizontal_Down Prediction, and is applied only when A, B, C, D, I, J, K, L, and M are “available”. Each predicted value is generated as follows.

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

モード7(Mode 7)は、Vertical_Left Predictionであり、A,B,C,D,I,J,K,L,Mが "available" の場合のみ適用される。それぞれの予測値は以下のように生成される。   Mode 7 is Vertical_Left Prediction and is applied only when A, B, C, D, I, J, K, L, and M are “available”. Each predicted value is generated as follows.

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

モード8(Mode 8)は、Horizontal_Up Predictionであり、A,B,C,D,I,J,K,L,Mが "available" の場合のみ適用される。それぞれの予測値は以下のように生成される。   Mode 8 (Mode 8) is Horizontal_Up Prediction, and is applied only when A, B, C, D, I, J, K, L, and M are “available”. Each predicted value is generated as follows.

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

次に、イントラ4×4予測モード(Intra_4x4_pred_mode)の符号化方式について説明する。   Next, the encoding method of intra 4 * 4 prediction mode (Intra_4x4_pred_mode) is demonstrated.

図8において、Cを当該4×4 ブロック、A及びBを隣接する4×4ブロックであるとすると、Cにおけるイントラ4×4予測モード(Intra_4x4_pred_mode)と、A及びBにおけるイントラ4×4予測モード(Intra_4x4_pred_mode)は高い相関があると考えられる。この事実を利用して、以下のように符号化処理を行うことにより、より高い符号化効率を実現することが可能である。   In FIG. 8, if C is the corresponding 4 × 4 block and A and B are adjacent 4 × 4 blocks, an intra 4 × 4 prediction mode (Intra_4x4_pred_mode) in C and an intra 4 × 4 prediction mode in A and B (Intra_4x4_pred_mode) is considered to have a high correlation. By utilizing this fact and performing the encoding process as follows, it is possible to realize higher encoding efficiency.

すなわち、図8において、AおよびBに対するイントラ4×4予測モード(Intra_4x4_pred_mode)をそれぞれイントラ4×4予測モードA(Intra_4x4_pred_modeA)およびイントラ4×4予測モードB(Intra_4x4_pred_modeB)として、MostProbableModeを以下の式(4)のように定義する。   That is, in FIG. 8, the intra 4 × 4 prediction mode (Intra_4x4_pred_mode) for A and B is set to intra 4 × 4 prediction mode A (Intra_4x4_pred_modeA) and intra 4 × 4 prediction mode B (Intra_4x4_pred_modeB), respectively. Define as 4).

MostProbableMode=Min(Intra_4x4_pred_modeA, Intra_4x4_pred_modeB) ・・・(4)   MostProbableMode = Min (Intra_4x4_pred_modeA, Intra_4x4_pred_modeB) (4)

すなわち、A,Bのうち、より小さなモード番号(mode_number)を割り当てられている方をMostProbableModeとする。つまり、隣接ブロックAおよびBの予測モード(予測方向)を用いて、当該ブロックCの予測モード(予測方向)を予測する。その予測値をMostProbableModeとする。   That is, among A and B, the one assigned a smaller mode number (mode_number) is set as MostProbableMode. That is, the prediction mode (prediction direction) of the block C is predicted using the prediction mode (prediction direction) of the adjacent blocks A and B. The predicted value is set to MostProbableMode.

ビットストリーム中には、当該4×4ブロックに対するパラメータとして、prev_intra4x4_pred_mode_flag[luma4x4BlkIdx]、および、rem_intra4x4_pred_mode[luma4x4BlkIdx]という2つの値が定義されており、以下に示される擬似コードに基づく処理により、復号処理が行われ、当該4×4ブロックに対するイントラ4×4予測モード(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 4 × 4 block. Is performed, and the value of Intra4x4PredMode [luma4x4BlkIdx] indicating the intra 4x4 prediction mode (Intra_4x4_pred_mode) for the 4x4 block 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
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

[イントラ8×8予測方式]
次に、イントラ8×8予測方式について説明する。
[Intra 8 × 8 prediction method]
Next, the intra 8 × 8 prediction method will be described.

AVCにおいては、図9および図10に示されるように、9通りのイントラ8×8予測モード(Intra_8x8_pred_mode)が定義されている。つまり、イントラ8×8予測モードには9通りの予測方向(予測モード)が用意されている。当該8×8ブロックにおける画素値をp[x,y](0≦x≦7;0≦y≦7)とし、隣接ブロックの画素値をp[-1,-1],…,p[-1,15],p[-1,0],…p[-1,7]のように表すものとする。   In AVC, as shown in FIG. 9 and FIG. 10, nine intra 8 × 8 prediction modes (Intra_8 × 8_pred_mode) are defined. That is, nine prediction directions (prediction modes) are prepared for the intra 8 × 8 prediction mode. The pixel value in the 8 × 8 block is p [x, y] (0 ≦ x ≦ 7; 0 ≦ y ≦ 7), and the pixel value of the adjacent block is p [-1, -1],. 1,15], p [-1,0],... P [-1,7].

イントラ8×8予測モードについては、以下に述べるとおり、予測値を生成するに先立ち、隣接画素にローパスフィルタリング処理を施す。ここで、ローパスフィルタリング処理前の画素値をp[-1,-1],…,p[-1,15],p[-1,0],…p[-1,7]、処理後の画素値をp'[-1,-1],…,p'[-1,15],p'[-1,0],…p'[-1,7]と表すとする。   In the intra 8 × 8 prediction mode, as described below, a low-pass filtering process is performed on adjacent pixels prior to generating a prediction value. Here, the pixel values before low-pass filtering are p [-1, -1], ..., p [-1,15], p [-1,0], ... p [-1,7], The pixel values are represented as p ′ [− 1, −1],..., P ′ [− 1,15], p ′ [− 1,0],.

まず、p[-1,-1] が "available" である場合、p'[0,-1]は、以下の式(5)のように算出される。   First, when p [-1, -1] is "available", p '[0, -1] is calculated as in the following equation (5).

p'[0,-1] = (p[-1,-1] + 2*p[0,-1] + p[1,-1] + 2) >> 2 ・・・(5)   p '[0, -1] = (p [-1, -1] + 2 * p [0, -1] + p [1, -1] + 2) >> 2 (5)

また、p[-1,-1] が "not available" である場合、p'[0,-1]は、以下の式(6)のように算出される。   When p [-1, -1] is "not available", p '[0, -1] is calculated as in the following equation (6).

p'[0,-1] = (3*p[0,-1] + p[1,-1] + 2) >> 2 ・・・(6)   p '[0, -1] = (3 * p [0, -1] + p [1, -1] + 2) >> 2 (6)

p'[x,-1] (x=0,…,7)は、以下の式(7)のように算出される。   p ′ [x, −1] (x = 0,..., 7) is calculated as in the following equation (7).

p'[x,-1] = (p[x-1,-1] + 2*p[x,-1] + p[x+1,-1] + 2) >>2 ・・・(7)   p '[x, -1] = (p [x-1, -1] + 2 * p [x, -1] + p [x + 1, -1] + 2) >> 2 (7 )

p[x,-1] (x=8,…,15) が "available" である場合、p'[x,-1] (x=8,…,15)は、以下の式(8)および式(9)のように算出される。   When p [x, -1] (x = 8, ..., 15) is "available", p '[x, -1] (x = 8, ..., 15) is expressed by the following equation (8) and It is calculated as in equation (9).

p'[x,-1] = (p[x-1,-1] + 2*p[x,-1] + p[x+1,-1] + 2) >>2 ・・・(8)
p'[15,-1] = (p[14,-1] + 3*p[15,-1] + 2) >>2 ・・・(9)
p '[x, -1] = (p [x-1, -1] + 2 * p [x, -1] + p [x + 1, -1] + 2) >> 2 (8) )
p '[15, -1] = (p [14, -1] + 3 * p [15, -1] + 2) >> 2 (9)

次にp[-1,-1]が "available" である場合について説明する。p[0,-1]及びp[-1,0]の双方がavailableである場合、p'[-1,-1]は、以下の式(10)のように算出される。   Next, a case where p [-1, -1] is “available” will be described. When both p [0, -1] and p [-1,0] are available, p '[-1, -1] is calculated as in the following equation (10).

p'[-1,-1] = (p[0,-1] + 2*p[-1,-1] + p[-1,0] + 2) >>2 ・・・(10)   p '[-1, -1] = (p [0, -1] + 2 * p [-1, -1] + p [-1,0] + 2) >> 2 (10)

また、p[-1,0] が "unavailable" である場合、p'[-1,-1]は、以下の式(11)のように算出される。   When p [−1,0] is “unavailable”, p ′ [− 1, −1] is calculated as in the following equation (11).

p'[-1,-1] = (3*p[-1,-1] + p[0,-1] + 2) >>2 ・・・(11)   p '[-1, -1] = (3 * p [-1, -1] + p [0, -1] + 2) >> 2 (11)

さらに、p[0,-1] が "unavailable" である場合、p'[-1,-1]は、以下の式(12)のように算出される。   Further, when p [0, −1] is “unavailable”, p ′ [− 1, −1] is calculated as in the following Expression (12).

p'[-1,-1] = (3*p[-1,-1] + p[-1,0] + 2) >>2 ・・・(12)   p '[-1, -1] = (3 * p [-1, -1] + p [-1,0] + 2) >> 2 (12)

また、p'[-1,y] (y=0, … ,7) は、p[-1,y] (y=0, … ,7) が "available" の時、以下のように算出される。すなわち、まず、p[-1,-1]が "available" である場合、p'[-1,0]は、以下の式(13)のように算出される。   P '[-1, y] (y = 0,…, 7) is calculated as follows when p [-1, y] (y = 0,…, 7) is "available": The That is, first, when p [-1, -1] is “available”, p ′ [− 1,0] is calculated as in the following Expression (13).

p'[-1,0] = (p[-1,-1] + 2*p[-1,0] + p[-1,1] + 2) >>2 ・・・(13)   p '[-1,0] = (p [-1, -1] + 2 * p [-1,0] + p [-1,1] + 2) >> 2 (13)

また、p[-1,-1]が "unavailable" である場合、p'[-1,0]は、以下の式(14)のように算出される。   Further, when p [-1, -1] is “unavailable”, p ′ [− 1,0] is calculated as in the following Expression (14).

p'[-1,0] = (3*p[-1,0] + p[-1,1] + 2) >>2 ・・・(14)   p '[-1,0] = (3 * p [-1,0] + p [-1,1] + 2) >> 2 (14)

なお、p'[-1,y] (y=1,…,6)は、以下の式(15)のように算出される。   Note that p ′ [− 1, y] (y = 1,..., 6) is calculated as in the following equation (15).

p[-1,y] = (p[-1,y-1] + 2*p[-1,y] + p[-1,y+1] + 2) >>2 ・・・(15)   p [-1, y] = (p [-1, y-1] + 2 * p [-1, y] + p [-1, y + 1] + 2) >> 2 (15)

また、p'[-1,7]は、以下の式(16)のように算出される。   Further, p ′ [− 1,7] is calculated as in the following equation (16).

p'[-1,7] = (p[-1,6] + 3*p[-1,7] + 2) >>2 ・・・(16)   p '[-1,7] = (p [-1,6] + 3 * p [-1,7] + 2) >> 2 (16)

このように算出されたp'を用いて、図9に示された各イントラ予測モードにおける予測値は以下のように算出される。   Using p ′ thus calculated, the predicted value in each intra prediction mode shown in FIG. 9 is calculated as follows.

モード0(Mode 0)は、Vertical Predictionであり、p[x,-1] (x=0, … ,7) が "available" である時のみ適用される。予測値pred8x8L[x,y]は、以下の式(17)のように算出される。   Mode 0 (Mode 0) is Vertical Prediction and is applied only when p [x, -1] (x = 0,..., 7) is “available”. The predicted value pred8x8L [x, y] is calculated as in the following equation (17).

pred8x8L[x,y] = p'[x,-1] x,y=0,...,7 ・・・(17)   pred8x8L [x, y] = p '[x, -1] x, y = 0, ..., 7 (17)

モード1(Mode 1)は、Horizontal Predictionであり、p[-1,y] (y=0, … ,7) が "available" である時のみ適用される。予測値pred8x8L[x,y]は、以下の式(18)のように算出される。   Mode 1 (Horizontal Prediction) is applied only when p [-1, y] (y = 0,..., 7) is “available”. The predicted value pred8x8L [x, y] is calculated as in the following equation (18).

pred8x8L[x,y] = p'[-1,y] x,y=0,...,7 ・・・(18)   pred8x8L [x, y] = p '[-1, y] x, y = 0, ..., 7 (18)

モード2(Mode 2)は、DC Predictionであり、予測値pred8x8L[x,y]は以下の通り算出される。すなわち、p[x,-1] (x=0, … ,7) および p[-1,y] (y=0, … ,7) の両方が "available" である場合、予測値pred8x8L[x,y]は以下の式(19)のように算出される。   Mode 2 (Mode 2) is DC Prediction, and the predicted value pred8x8L [x, y] is calculated as follows. That is, if both p [x, -1] (x = 0,…, 7) and p [-1, y] (y = 0,…, 7) are “available”, the predicted value pred8x8L [x , y] is calculated as in the following equation (19).

Figure 2012160991
・・・(19)
Figure 2012160991
... (19)

p[x,-1] (x=0, … ,7) は、 "available" であるが、 p[-1,y] (y=0, … ,7) が "unavailable" である場合、予測値pred8x8L[x,y]は以下の式(20)のように算出される。   p [x, -1] (x = 0,…, 7) is "available", but if p [-1, y] (y = 0,…, 7) is "unavailable" The value pred8x8L [x, y] is calculated as in the following equation (20).

Figure 2012160991
・・・(20)
Figure 2012160991
... (20)

p[x,-1] (x=0, … ,7) は、 "unavailable" であるが、 p[-1,y] (y=0, … ,7) が "available" である場合、予測値pred8x8L[x,y]は以下の式(21)のように算出される。   p [x, -1] (x = 0,…, 7) is "unavailable", but if p [-1, y] (y = 0,…, 7) is "available" The value pred8x8L [x, y] is calculated as in the following equation (21).

Figure 2012160991
・・・(21)
Figure 2012160991
... (21)

p[x,-1] (x=0, … ,7) および p[-1,y] (y=0, … ,7) の両方が "unavailable" である場合、予測値pred8x8L[x,y]は以下の式(22)のように算出される(但し8ビット入力の場合)。   If both p [x, -1] (x = 0,…, 7) and p [-1, y] (y = 0,…, 7) are "unavailable", the predicted value pred8x8L [x, y ] Is calculated as in the following equation (22) (in the case of 8-bit input).

pred8x8L[x,y] = 128 ・・・(22)   pred8x8L [x, y] = 128 (22)

モード3(Mode 3)は、Diagonal_Down_Left_predictionであり、予測値pred8x8L[x,y]は、以下の通り算出される。すなわち、Diagonal_Down_Left_predictionは、p[x,-1], x=0,…,15が "available" の時のみ適用され、x=7かつy=7のとき、予測値pred8x8L[x,y]は、以下の式(23)のように算出される。   Mode 3 (Mode 3) is Diagonal_Down_Left_prediction, and the predicted value pred8x8L [x, y] is calculated as follows. That is, Diagonal_Down_Left_prediction is applied only when p [x, -1], x = 0, ..., 15 is "available", and when x = 7 and y = 7, the predicted value pred8x8L [x, y] is It is calculated as the following equation (23).

pred8x8L[x,y] = (p'[14,-1] + 3*p[15,-1] + 2) >> 2 ・・・(23)   pred8x8L [x, y] = (p '[14, -1] + 3 * p [15, -1] + 2) >> 2 (23)

その他の予測値pred8x8L[x,y]は、以下の式(24)のように算出される。   Other predicted values pred8x8L [x, y] are calculated as in the following Expression (24).

pred8x8L[x,y] = (p'[x+y,-1] + 2*p'[x+y+1,-1] + p'[x+y+2,-1] + 2) >> 2
・・・(24)
pred8x8L [x, y] = (p '[x + y, -1] + 2 * p' [x + y + 1, -1] + p '[x + y + 2, -1] + 2)>> 2
... (24)

モード4(Mode 4)は、Diagonal_Down_Right_predictionであり、予測値pred8x8L[x,y]は、以下の通り算出される。すなわち、Diagonal_Down_Right_predictionは、p[x,-1],x=0,…,7及びp[-1,y],y=0,…,7が "available"の時のみ適用され、x > y であるとき、予測値pred8x8L[x,y]は、以下の式(25)のように算出される。   Mode 4 (Mode 4) is Diagonal_Down_Right_prediction, and the predicted value pred8x8L [x, y] is calculated as follows. That is, Diagonal_Down_Right_prediction is applied only when p [x, -1], x = 0, ..., 7 and p [-1, y], y = 0, ..., 7 are "available", and x> y At some point, the predicted value pred8x8L [x, y] is calculated as in the following equation (25).

pred8x8L[x,y] = (p'[x-y-2,-1] + 2*p'[x-y-1,-1] + p'[x-y,-1] + 2) >> 2
・・・(25)
pred8x8L [x, y] = (p '[xy-2, -1] + 2 * p' [xy-1, -1] + p '[xy, -1] + 2) >> 2
... (25)

また、x < y であるとき、予測値pred8x8L[x,y]は、以下の式(26)のように算出される。   When x <y, the predicted value pred8x8L [x, y] is calculated as in the following equation (26).

pred8x8L[x,y] = (p'[-1,y-x-2] + 2*p'[-1,y-x-1] + p'[-1,y-x] + 2) >> 2
・・・(26)
pred8x8L [x, y] = (p '[-1, yx-2] + 2 * p' [-1, yx-1] + p '[-1, yx] + 2) >> 2
... (26)

さらに、x = yであるとき、予測値pred8x8L[x,y]は、以下の式(27)のように算出される。   Furthermore, when x = y, the predicted value pred8x8L [x, y] is calculated as in the following Expression (27).

pred8x8L[x,y] = (p'[0,-1] + 2*p'[-1,-1] + p'[-1,0] + 2) >> 2
・・・(27)
pred8x8L [x, y] = (p '[0, -1] + 2 * p' [-1, -1] + p '[-1,0] + 2) >> 2
... (27)

モード5(Mode 5)は、Vertical_Right_predictionであり、予測値pred8x8L[x,y]は以下の通り算出される。すなわち、Vertical_Right_predictionは、p[x,-1],x=0,…,7及びp[-1,y],y=-1,…,7が "available"の時のみ適用される。zVRを、以下の式(28)のように定義する。   Mode 5 (Mode 5) is Vertical_Right_prediction, and the predicted value pred8x8L [x, y] is calculated as follows. That is, Vertical_Right_prediction is applied only when p [x, -1], x = 0,..., 7 and p [-1, y], y = -1,. zVR is defined as the following formula (28).

zVR = 2*x - y ・・・(28)   zVR = 2 * x-y (28)

zVRが、0,2,4,6,8,10,12,14の場合、予測値pred8x8L[x,y]は、以下の式(29)のように算出される。   When zVR is 0, 2, 4, 6, 8, 10, 12, 14, the predicted value pred8x8L [x, y] is calculated as in the following Expression (29).

pred8x8L[x,y] = (p'[x-(y>>1)-1,-1] + p'[x-(y>>1),-1] + 1) >> 1
・・・(29)
pred8x8L [x, y] = (p '[x- (y >> 1) -1, -1] + p' [x- (y >> 1),-1] + 1) >> 1
... (29)

また、zVRが1,3,5,7,9,11,13の場合、予測値pred8x8L[x,y]は、以下の式(30)のように算出される。   Further, when zVR is 1, 3, 5, 7, 9, 11, 13, the predicted value pred8x8L [x, y] is calculated as in the following equation (30).

pred8x8L[x,y] = (p'[x-(y>>1)-2,-1] + 2*p'[x-(y>>1)-1,-1] + p'[x-(y>>1),-1] + 2) >> 2
・・・(30)
pred8x8L [x, y] = (p '[x- (y >> 1) -2, -1] + 2 * p' [x- (y >> 1) -1, -1] + p '[x -(y >> 1),-1] + 2) >> 2
... (30)

また、zVRが-1の場合、予測値pred8x8L[x,y]は、以下の式(31)のように算出される。   When zVR is −1, the predicted value pred8x8L [x, y] is calculated as in the following equation (31).

pred8x8L[x,y] = (p'[-1,0] + 2*p'[-1,-1] + p'[0,-1] + 2) >> 2
・・・(31)
pred8x8L [x, y] = (p '[-1,0] + 2 * p' [-1, -1] + p '[0, -1] + 2) >> 2
... (31)

これ以外の場合、すなわち、zVRが-2,-3,-4,-5,-6,-7の場合、以下の式(32)のように算出される。   In other cases, that is, in the case where zVR is −2, −3, −4, −5, −6, −7, calculation is performed as in the following Expression (32).

pred8x8L[x,y] = (p'[-1,y-2*x-1] + 2*p'[-1,y-2*x-2] + p'[-1,y-2*x-3] + 2) >> 2
・・・(32)
pred8x8L [x, y] = (p '[-1, y-2 * x-1] + 2 * p' [-1, y-2 * x-2] + p '[-1, y-2 * x-3] + 2) >> 2
... (32)

モード6(Mode 6)は、Horizontal_Down_predictionであり、予測値pred8x8L[x,y]は以下の通り算出される。Horizontal_Down_predictionは、p[x,-1],x=0,…,7及びp[-1,y],y=-1,…,7が "available"の時のみ適用される。zVRを以下の式(33)のように定義する。   Mode 6 (Mode 6) is Horizontal_Down_prediction, and the predicted value pred8x8L [x, y] is calculated as follows. Horizontal_Down_prediction is applied only when p [x, -1], x = 0, ..., 7 and p [-1, y], y = -1, ..., 7 are "available". zVR is defined as the following formula (33).

zHD = 2*y - x ・・・(33)   zHD = 2 * y-x (33)

zHDが0,2,4,6,8,10,12,14の場合、予測値pred8x8L[x,y]は、以下の式(34)のように算出される。   When zHD is 0,2,4,6,8,10,12,14, the predicted value pred8x8L [x, y] is calculated as in the following equation (34).

pred8x8L[x,y] = (p'[-1,y-(x>>1)-1] + p'[-1,y-(x>>1) + 1] >> 1
・・・(34)
pred8x8L [x, y] = (p '[-1, y- (x >> 1) -1] + p' [-1, y- (x >> 1) + 1] >> 1
... (34)

また、zHDが1,3,5,7,9,11,13の場合、予測値pred8x8L[x,y]は、以下の式(35)のように算出される。   Further, when zHD is 1,3,5,7,9,11,13, the predicted value pred8x8L [x, y] is calculated as in the following Expression (35).

pred8x8L[x,y] = (p'[-1,y-(x>>1)-2] + 2*p'[-1,y-(x>>1)-1] + p'[-1,y-(x>>1)] + 2) >> 2
・・・(35)
pred8x8L [x, y] = (p '[-1, y- (x >> 1) -2] + 2 * p' [-1, y- (x >> 1) -1] + p '[- 1, y- (x >> 1)] + 2) >> 2
... (35)

また、zHDが-1の場合、予測値pred8x8L[x,y]は、以下の式(36)のように算出される。   When zHD is −1, the predicted value pred8x8L [x, y] is calculated as in the following Expression (36).

pred8x8L[x,y] = (p'[-1,0] + 2*p[-1,-1] + p'[0,-1] + 2) >> 2
・・・(36)
pred8x8L [x, y] = (p '[-1,0] + 2 * p [-1, -1] + p' [0, -1] + 2) >> 2
... (36)

また、zHDがこれ以外の値の場合、すなわち、-2,-3,-4,-5,-6,-7の場合、予測値pred8x8L[x,y]は、以下の式(37)のように算出される。   When zHD is a value other than this, that is, when −2, −3, −4, −5, −6, −7, the predicted value pred8x8L [x, y] is expressed by the following equation (37). Is calculated as follows.

pred8x8L[x,y] = (p'[x-2*y-1,-1] + 2*p'[x-2*y-2,-1] + p'[x-2*y-3,-1] + 2) >> 2
・・・(37)
pred8x8L [x, y] = (p '[x-2 * y-1, -1] + 2 * p' [x-2 * y-2, -1] + p '[x-2 * y-3 , -1] + 2) >> 2
... (37)

モード7(Mode 7)は、Vertical_Left_predictionであり、予測値pred8x8L[x,y]は以下の通り算出される。すなわち、Vertical_Left_predictionは、p[x,-1], x=0,…,15が "available" の時のみ適用され、y=0,2,4,6の場合、予測値pred8x8L[x,y]は、以下の式(38)のように算出される。   Mode 7 is Vertical_Left_prediction, and the predicted value pred8x8L [x, y] is calculated as follows. That is, Vertical_Left_prediction is applied only when p [x, -1], x = 0, ..., 15 is "available", and when y = 0,2,4,6, the predicted value pred8x8L [x, y] Is calculated by the following equation (38).

pred8x8L[x,y] = (p'[x+(y>>1),-1] + p'[x+(y>>1)+1,-1] + 1) >> 1
・・・(38)
pred8x8L [x, y] = (p '[x + (y >> 1),-1] + p' [x + (y >> 1) + 1, -1] + 1) >> 1
... (38)

それ以外の場合、すなわち、y=1,3,5,7の場合、予測値pred8x8L[x,y]は、以下の式(39)のように算出される。   In other cases, that is, when y = 1, 3, 5, and 7, the predicted value pred8x8L [x, y] is calculated as in the following Expression (39).

pred8x8L[x,y] = (p'[x+(y>>1),-1] + 2*p'[x+(y>>1)+1,-1] + p'[x+(y>>1)+2,-1] + 2) >> 2
・・・(39)
pred8x8L [x, y] = (p '[x + (y >> 1),-1] + 2 * p' [x + (y >> 1) + 1, -1] + p '[x + (y >> 1) + 2, -1] + 2) >> 2
... (39)

モード8(Mode 8)は、Horizontal_Up_predictionであり、予測値pred8x8L[x,y]は以下の通り算出される。すなわち、Horizontal_Up_predictionは、p[-1,y], y=0,…,7 が "available" の時のみ適用される。以下では、zHUを以下の式(40)のように定義する。   Mode 8 (Mode 8) is Horizontal_Up_prediction, and the predicted value pred8x8L [x, y] is calculated as follows. That is, Horizontal_Up_prediction is applied only when p [-1, y], y = 0,..., 7 is “available”. In the following, zHU is defined as in the following formula (40).

zHU = x + 2*y ・・・(40)   zHU = x + 2 * y (40)

zHUの値が0,2,4,6,8,10,12の場合、予測値pred8x8L[x,y]は、以下の式(41)のように算出される。   When the value of zHU is 0, 2, 4, 6, 8, 10, 12, the predicted value pred8x8L [x, y] is calculated as in the following equation (41).

pred8x8L[x,y] = (p'[-1,y+(x>>1)] + p'[-1,y+(x>>1)+1] + 1) >> 1
・・・(41)
pred8x8L [x, y] = (p '[-1, y + (x >> 1)] + p' [-1, y + (x >> 1) +1] + 1) >> 1
... (41)

zHUの値が1,3,5,7,9,11の場合、予測値pred8x8L[x,y]は、以下の式(42)のように算出される。   When the value of zHU is 1,3,5,7,9,11, the predicted value pred8x8L [x, y] is calculated as in the following equation (42).

pred8x8L[x,y] = (p'[-1,y+(x>>1)] ・・・(42)   pred8x8L [x, y] = (p '[-1, y + (x >> 1)] (42)

zHUの値が13の場合、予測値pred8x8L[x,y]は、以下の式(43)のように算出される。   When the value of zHU is 13, the predicted value pred8x8L [x, y] is calculated as in the following equation (43).

pred8x8L[x,y] = (p'[-1,6] + 3*p'[-1,7] + 2) >> 2 ・・・(43)   pred8x8L [x, y] = (p '[-1,6] + 3 * p' [-1,7] + 2) >> 2 (43)

それ以外の場合、すなわち、zHUの値が13より大きい場合、予測画素値は、以下の式(44)のように算出される。   In other cases, that is, when the value of zHU is larger than 13, the predicted pixel value is calculated as in the following Expression (44).

pred8x8L[x,y] = p'[-1,7] ・・・(44)   pred8x8L [x, y] = p '[-1,7] (44)

[イントラ16×16予測方式]
次に、イントラ16×16予測方式について説明する。
[Intra 16 × 16 prediction method]
Next, the intra 16 × 16 prediction method will be described.

AVCにおいては、図11および図12に示されるように、4通りのイントラ16×16予測モード(Intra_16x16_pred_mode)が定義されている。つまり、イントラ16×16予測モードには、4通りの予測方向(予測モード)が用意されている。当該マクロブロックに含まれる画素値、並びに、隣接画素値を図13のように定義すると、それぞれの予測値は、以下のように生成される。   In AVC, as shown in FIGS. 11 and 12, four types of intra 16 × 16 prediction modes (Intra — 16 × 16_pred_mode) are defined. That is, four prediction directions (prediction modes) are prepared for the intra 16 × 16 prediction mode. When the pixel values included in the macroblock and the adjacent pixel values are defined as shown in FIG. 13, the respective predicted values are generated as follows.

モード0(Mode 0)は、Vertical Predictionであり、P(x,-1); x,y=-1..15が "available" である時のみ適用される。それぞれの予測値は以下の式(45)のように算出される。   Mode 0 (Mode 0) is Vertical Prediction and is applied only when P (x, -1); x, y = -1..15 is "available". Each predicted value is calculated as in the following equation (45).

Figure 2012160991
・・・(45)
Figure 2012160991
... (45)

モード1(Mode 1)は、Horizontal Predictionであり、P(-1,y); x,y=-1..15が "available" である時のみ適用される。それぞれの予測値は以下の式(46)のように算出される。   Mode 1 (Horizontal Prediction) is applied only when P (−1, y); x, y = −1.15 is “available”. Each predicted value is calculated as in the following formula (46).

Figure 2012160991
・・・(46)
Figure 2012160991
... (46)

モード2(Mode 2)は、DC Predictionであり、P(x,-1)及びP(-1,y); x,y=-1..15が全て "available" である場合、予測値は以下の式(47)のように算出される。   Mode 2 (Mode 2) is DC Prediction, and when P (x, -1) and P (-1, y); x, y = -1..15 are all "available", the predicted value is It is calculated as in the following formula (47).

Figure 2012160991
・・・(47)
Figure 2012160991
... (47)

また、P(x,-1); x,y=-1..15が "not available" である場合、予測値は以下の式(48)のように生成される。   Further, when P (x, −1); x, y = -1..15 is “not available”, the predicted value is generated as in the following Expression (48).

Figure 2012160991
・・・(48)
Figure 2012160991
... (48)

P(-1,y); x,y=-1..15が "not available" である場合、予測値は以下の式(49)のように生成される。   When P (−1, y); x, y = −1.15 is “not available”, the predicted value is generated as in the following Expression (49).

Figure 2012160991
・・・(49)
Figure 2012160991
... (49)

なお、P(x,-1)及びP(-1,y); x,y=-1..15が全て "not available" である場合、予測値として128が用いられる。   If P (x, -1) and P (-1, y); x, y = -1..15 are all "not available", 128 is used as the predicted value.

モード3(Mode 3)は、Plane Predictionであり、P(x,-1)及びP(-1,y); x,y=-1..15が全て "available" の場合のみ適用される。それぞれの予測値は以下の式(50)乃至式(55)のように生成される。   Mode 3 (Mode 3) is Plane Prediction, and is applied only when P (x, -1) and P (-1, y); x, y = -1..15 are all "available". Each predicted value is generated as in the following formulas (50) to (55).

Figure 2012160991
・・・(50)
Figure 2012160991
・・・(51)
Figure 2012160991
・・・(52)
Figure 2012160991
・・・(53)
Figure 2012160991
・・・(54)
Figure 2012160991
・・・(55)
Figure 2012160991
... (50)
Figure 2012160991
... (51)
Figure 2012160991
... (52)
Figure 2012160991
... (53)
Figure 2012160991
... (54)
Figure 2012160991
... (55)

[色差信号に対するイントラ予測モード]
次に、色差信号に対するイントラ予測モードについて述べる。色差信号に対するイントラ予測モードは、以下の通り、イントラ16×16予測モードに順ずる。但し、イントラ16×16予測モードが、16×16ブロックを対象としているのに対し、色差信号に対するイントラ予測モードは8×8ブロックを対象としている。更に、また、モード番号(mode番号)と、対応するモード(mode)が異なっていることに注意されたい。
[Intra prediction mode for color difference signals]
Next, the intra prediction mode for color difference signals will be described. The intra prediction mode for color difference signals follows the intra 16 × 16 prediction mode as follows. However, while the intra 16 × 16 prediction mode targets 16 × 16 blocks, the intra prediction mode for color difference signals targets 8 × 8 blocks. Furthermore, it should be noted that the mode number (mode number) and the corresponding mode (mode) are different.

色差信号に対する予測モードは、輝度信号に対するモードとは独立に設定することが可能である。   The prediction mode for the color difference signal can be set independently of the mode for the luminance signal.

以下では、当該マクロブロック(Macroblock)に含まれる画素値及び隣接画素値の定義については、イントラ16×16モード(Intra16x16Mode)の場合に順ずる。それぞれのIntra_chroma_pred_modeにおける予測値の生成は以下の通りである。   Hereinafter, the definition of the pixel value and the adjacent pixel value included in the macroblock is the same as in the case of the intra 16 × 16 mode (Intra16x16Mode). The generation of predicted values in each Intra_chroma_pred_mode is as follows.

Intra_chroma_pred_modeには、図14に示されるように、モード0乃至モード3の4つのモードがある。   Intra_chroma_pred_mode has four modes, mode 0 to mode 3, as shown in FIG.

モード0(Mode 0)は、DC Predictionであり、P(x,-1)及びP(-1,y)が "available" である場合、予測値は、以下の式(56)のように算出される。   Mode 0 is DC Prediction, and when P (x, -1) and P (-1, y) are "available", the predicted value is calculated as in the following formula (56) Is done.

Figure 2012160991
・・・(56)
Figure 2012160991
... (56)

また、P(-1,y)が "not available" である場合、予測値は、以下の式(57)のように算出される。   Further, when P (−1, y) is “not available”, the predicted value is calculated as in the following Expression (57).

Figure 2012160991
・・・(57)
Figure 2012160991
... (57)

また、P(x,-1)が "not available" である場合、予測値は、以下の式(58)のように算出される。   Further, when P (x, −1) is “not available”, the predicted value is calculated as in the following Expression (58).

Figure 2012160991
・・・(58)
Figure 2012160991
... (58)

モード1(Mode 1)は、Horizontal Predictionであり、P(-1,y) が "available" の場合にのみ適用される。予測値は、以下の式(59)のように生成される。   Mode 1 (Horizontal Prediction) is applied only when P (-1, y) is "available". The predicted value is generated as in the following formula (59).

Figure 2012160991
・・・(59)
Figure 2012160991
... (59)

モード2(Mode 2)は、Vertical Predictionであり、P(x,-1) が "available" の場合にのみ適用される。予測値は、以下の式(60)のように生成される。   Mode 2 (Mode 2) is Vertical Prediction and is applied only when P (x, -1) is "available". The predicted value is generated as in the following equation (60).

Figure 2012160991
・・・(60)
Figure 2012160991
... (60)

モード3(Mode 3)は、Plane Predictionであり、P(x,-1)及びP(-1,y) が "available" の場合にのみ適用される。予測値は、以下の式(61)乃至式(66)のように生成される。   Mode 3 (Mode 3) is Plane Prediction and is applied only when P (x, -1) and P (-1, y) are "available". The predicted value is generated as in the following formulas (61) to (66).

Figure 2012160991
・・・(61)
Figure 2012160991
・・・(62)
Figure 2012160991
・・・(63)
Figure 2012160991
・・・(64)
Figure 2012160991
・・・(65)
Figure 2012160991
・・・(66)
Figure 2012160991
... (61)
Figure 2012160991
... (62)
Figure 2012160991
... (63)
Figure 2012160991
... (64)
Figure 2012160991
... (65)
Figure 2012160991
... (66)

[コスト関数]
ところで、AVC符号化方式において、より高い符号化効率を達成するには、適切な予測モードの選択が重要である。
[Cost function]
By the way, in the AVC encoding method, in order to achieve higher encoding efficiency, selection of an appropriate prediction mode is important.

かかる選択方式の例として、http://iphome.hhi.de/suehring/tml/index.htm において公開されている、JM (Joint Model) と呼ばれるH.264/MPEG-4 AVCの参照ソフトウエアに実装されている方法を挙げることが出来る。   An example of such a selection method is the reference software for H.264 / MPEG-4 AVC called JM (Joint Model), which is published at http://iphome.hhi.de/suehring/tml/index.htm. The methods that are implemented can be mentioned.

JMにおいては、以下に述べる、High Complexity Modeと、Low Complexity Modeの2通りのモード判定方法を選択することが可能である。どちらも、それぞれの予測モードModeに関するコスト関数値を算出し、これを最小にする予測モードを当該ブロック乃至マクロブロックに対する最適モードとして選択する。   In JM, it is possible to select the following two mode determination methods: High Complexity Mode and Low Complexity Mode. In both cases, a cost function value for each prediction mode Mode is calculated, and a prediction mode that minimizes the cost function value is selected as the optimum mode for the block or macroblock.

High Complexity Modeにおけるコスト関数は、以下の式(67)のようになる。   The cost function in High Complexity Mode is as shown in the following formula (67).

Cost(Mode∈Ω) = D + λ*R ・・・(67)   Cost (Mode∈Ω) = D + λ * R (67)

ここで、Ωは、当該ブロック乃至マクロブロックを符号化するための候補モードの全体集合、Dは、当該予測モードModeで符号化した場合の、復号画像と入力画像の差分エネルギーである。λは、量子化パラメータの関数として与えられるLagrange未定乗数である。Rは、直交変換係数を含んだ、当該モードModeで符号化した場合の総符号量である。   Here, Ω is the entire set of candidate modes for encoding the block or macroblock, and D is the difference energy between the decoded image and the input image when encoded in the prediction mode Mode. λ is a Lagrange undetermined multiplier given as a function of the quantization parameter. R is a total code amount when encoding is performed in the mode Mode, including orthogonal transform coefficients.

つまり、High Complexity Modeでの符号化を行うには、上記パラメータD及びRを算出するため、全ての候補モードModeにより、一度、仮エンコード処理を行う必要があり、より高い演算量を要する。   That is, in order to perform encoding in the High Complexity Mode, the parameters D and R are calculated, and therefore, it is necessary to perform temporary encoding processing once in all candidate modes Mode, which requires a higher calculation amount.

Low Complexity Modeにおけるコスト関数は、以下の式(68)のようになる。   The cost function in Low Complexity Mode is as shown in the following formula (68).

Cost(Mode∈Ω) = D + QP2Quant(QP) * HeaderBit ・・・(68)   Cost (Mode∈Ω) = D + QP2Quant (QP) * HeaderBit (68)

ここで、Dは、High Complexity Modeの場合と異なり、予測画像と入力画像の差分エネルギーとなる。QP2Quant(QP) は、量子化パラメータQPの関数として与えられ、HeaderBitは、直交変換係数を含まない、動きベクトルや、モードといった、Headerに属する情報に関する符号量である。   Here, unlike the case of High Complexity Mode, D is the difference energy between the predicted image and the input image. QP2Quant (QP) is given as a function of the quantization parameter QP, and HeaderBit is a code amount related to information belonging to Header, such as a motion vector and mode, which does not include an orthogonal transform coefficient.

すなわち、Low Complexity Modeにおいては、それぞれの候補モードModeに関して、予測処理を行う必要があるが、復号化画像までは必要ないため、符号化処理まで行う必要はない。このため、High Complexity Modeより低い演算量での実現が可能である。   That is, in Low Complexity Mode, it is necessary to perform prediction processing for each candidate mode Mode, but it is not necessary to perform decoding processing because it is not necessary to perform decoding processing. For this reason, realization with a calculation amount lower than High Complexity Mode is possible.

[コーディングユニット]
ところで、マクロブロックサイズを16画素×16画素とするのは、次世代符号化方式の対象となるような、UHD(Ultra High Definition;4000画素×2000画素)といった大きな画枠に対しては、最適ではない。
[Coding unit]
By the way, the macro block size of 16 pixels × 16 pixels is optimal for a large image frame such as UHD (Ultra High Definition; 4000 pixels × 2000 pixels), which is a target of the next generation encoding method. is not.

そこで、AVCにおいては、マクロブロックとサブマクロブロックによる階層構造が規定されているが、例えば、HEVC(High Efficiency Video Coding)においては、図15に示されるように、コーディングユニット(CU(Coding Unit))が規定されている。   Thus, in AVC, a hierarchical structure is defined by macroblocks and sub-macroblocks. For example, in HEVC (High Efficiency Video Coding), as shown in FIG. 15, a coding unit (CU (Coding Unit)) is used. ) Is prescribed.

CUは、Coding Tree Block(CTB)とも呼ばれ、AVCにおけるマクロブロックと同様の役割を果たす、ピクチャ単位の画像の部分領域である。後者は、16×16画素の大きさに固定されているのに対し、前者の大きさは固定されておらず、それぞれのシーケンスにおいて、画像圧縮情報中において指定されることになる。   A CU is also called a Coding Tree Block (CTB), and is a partial area of a picture unit image that plays the same role as a macroblock in AVC. The latter is fixed to a size of 16 × 16 pixels, whereas the size of the former is not fixed, and is specified in the image compression information in each sequence.

例えば、出力となる符号化データに含まれるシーケンスパラメータセット(SPS(Sequence Parameter Set))において、CUの最大サイズ(LCU(Largest Coding Unit))と最小サイズ((SCU(Smallest Coding Unit))が規定される。   For example, in the sequence parameter set (SPS (Sequence Parameter Set)) included in the output encoded data, the maximum size (LCU (Largest Coding Unit)) and minimum size ((SCU (Smallest Coding Unit)) of the CU are specified. Is done.

それぞれのLCU内においては、SCUのサイズを下回らない範囲で、split-flag=1とすることにより、より小さなサイズのCUに分割することができる。図15の例では、LCUの大きさが128であり、最大階層深度が5となる。2N×2Nの大きさのCUは、split_flagの値が「1」である時、1つ下の階層となる、N×Nの大きさのCUに分割される。   Within each LCU, split-flag = 1 can be divided into smaller CUs within a range that does not fall below the SCU size. In the example of FIG. 15, the LCU size is 128 and the maximum hierarchical depth is 5. When the value of split_flag is “1”, the 2N × 2N size CU is divided into N × N size CUs that are one level below.

更に、CUは、イントラ若しくはインター予測の処理単位となる領域(ピクチャ単位の画像の部分領域)であるプレディクションユニット(Prediction Unit(PU))に分割され、また、直交変換の処理単位となる領域(ピクチャ単位の画像の部分領域)である、トランスフォームユニット(Transform Unit(TU))に分割される。現在、HEVCにおいては、4×4及び8×8に加え、16×16及び32×32直交変換を用いることが可能である。   Furthermore, CU is divided into prediction units (Prediction Units (PU)) that are regions (partial regions of images in units of pictures) that are processing units for intra or inter prediction, and are regions that are processing units for orthogonal transformation It is divided into transform units (Transform Units (TU)), which are (partial regions of images in picture units). Currently, in HEVC, it is possible to use 16 × 16 and 32 × 32 orthogonal transforms in addition to 4 × 4 and 8 × 8.

以上のHEVCのように、CUを定義し、そのCUを単位として各種処理を行うような符号化方式の場合、AVCにおけるマクロブロックはLCUに相当すると考えることができる。ただし、CUは図15に示されるように階層構造を有するので、その最上位階層のLCUのサイズは、例えば128×128画素のように、AVCのマクロブロックより大きく設定されることが一般的である。   In the case of an encoding method in which a CU is defined and various processes are performed in units of the CU as in the above HEVC, it can be considered that a macroblock in AVC corresponds to an LCU. However, since the CU has a hierarchical structure as shown in FIG. 15, the size of the LCU of the highest hierarchy is generally set larger than the AVC macroblock, for example, 128 × 128 pixels. is there.

[HEVCイントラ予測方式]
次に、HEVCにおいて定められているイントラ予測方式について説明する。
[HEVC intra prediction method]
Next, an intra prediction method defined in HEVC will be described.

HEVCにおいては、イントラ予測のためのPUの単位は、4×4、8×8、16×16、32×32若しくは64×64である。   In HEVC, the unit of PU for intra prediction is 4 × 4, 8 × 8, 16 × 16, 32 × 32, or 64 × 64.

4×4の大きさに関しては、AVCと同様のイントラ予測処理が行われる。   For the size of 4 × 4, intra prediction processing similar to AVC is performed.

8×8の大きさに関しては、後述する、Angular Predictionと呼ばれる方式に基づいてイントラ予測処理が行われる。   For the size of 8 × 8, intra prediction processing is performed based on a method called Angular Prediction, which will be described later.

16×16及び32×32及び64×64の大きさに関しては、後述するArbitrary Directional Intra(ADI)と呼ばれる方式に基づいて、イントラ予測処理が行われる。   For the sizes of 16 × 16, 32 × 32, and 64 × 64, intra prediction processing is performed based on a method called Arbitrary Directional Intra (ADI) described later.

更に、イントラ予測を行うに先立ち、符号化効率を向上させる場合には、係数(1,2,1)によるローパスフィルタ処理が、周辺画素値に施される。施す・施さないに関する情報が、それぞれのPU毎に、画像圧縮情報中に伝送されることになる。   Further, prior to performing intra prediction, in order to improve the encoding efficiency, a low-pass filter process using coefficients (1, 2, 1) is performed on the peripheral pixel values. Information on whether to apply or not is transmitted in the compressed image information for each PU.

以下では、HEVC符号化方式において規定されている、Angular Predictionイントラ予測方式について述べる。   Hereinafter, the Angular Prediction intra prediction method defined in the HEVC encoding method will be described.

[Angular Predictionイントラ予測方式]
図16に、Angular Predictionイントラ予測方式を説明するための図を示す。
[Angular Prediction Intra Prediction Method]
FIG. 16 is a diagram for explaining the Angular Prediction intra prediction method.

すなわち、Angular Predictionにおいては、図16Aに示されるような角度のイントラ予測処理を行うことが可能である。   That is, in Angular Prediction, it is possible to perform an angle intra prediction process as shown in FIG. 16A.

また、図16Aのような角度のイントラ予測を行うためには、図16Bに示されるように、周辺画素の間の画素値を用いる必要が生じるが、このため、Angular Predictionにおいては、1/8画素精度の線形内挿処理を行うことが可能となっている。   In addition, in order to perform intra prediction of an angle as shown in FIG. 16A, it is necessary to use pixel values between neighboring pixels as shown in FIG. 16B. For this reason, in Angular Prediction, 1/8 It is possible to perform linear interpolation processing with pixel accuracy.

[Arbitrary Directional Intra(ADI)イントラ予測方式]
次に、HEVC符号化方式において規定されている、Arbitrary Directional Intra(ADI)イントラ予測方式について述べる。
[Arbitrary Directional Intra (ADI) Intra Prediction Method]
Next, an Arbitrary Directional Intra (ADI) intra prediction method defined in the HEVC encoding method will be described.

図17に、Arbitrary Directional Intra(ADI)イントラ予測方式を説明するための図を示す。   FIG. 17 is a diagram for explaining an Arbitrary Directional Intra (ADI) intra prediction method.

Arbitrary Directional Intra(ADI)イントラ予測方式においては、図17Aに示されるように、左下に位置する隣接画素値も用いられる。   In the Arbitrary Directional Intra (ADI) intra prediction method, as shown in FIG. 17A, an adjacent pixel value located at the lower left is also used.

AVC符号化方式の場合と同様に、Vertical,Horizontal,DC,Diagonal Down-Left,Diagonal Down-Right,Vertical-Right,Horizontal-Down,Vertical-Left、およびHorizontal-Upの各予測モードが定義されているが、その他のモードに関しては、図17Bに示されるように、(dx,dy)を符号化情報として画像圧縮情報中に伝送される。   As in the case of the AVC encoding method, the prediction modes of Vertical, Horizontal, DC, Diagonal Down-Left, Diagonal Down-Right, Vertical-Right, Horizontal-Down, Vertical-Left, and Horizontal-Up are defined. However, as for other modes, as shown in FIG. 17B, (dx, dy) is transmitted as encoded information in the image compression information.

[イントラ予測モードの指定情報]
当該ブロックをイントラ予測で符号化する際、エンコーダは複数のイントラ予測モードから1つを採用し、どのイントラ予測モードを採用したかを示す index (IntraPredMode) を符号化してデコーダに送る。エンコーダはRD最適化の作法に基づいて複数のイントラ予測モードから最適なイントラ予測モードを選択する。これをイントラ予測モード判定と呼ぶ。エンコーダとデコーダの一致を得るために、デコーダはIntraPredMode に基づいてエンコーダが採用したものと同じイントラ予測モードを採用する。IntraPredMode の符号化では、ハフマン符号や算術符号といったエントロピ符号化が用いられる。
[Intra prediction mode specification information]
When encoding the block by intra prediction, the encoder employs one of a plurality of intra prediction modes, encodes an index (IntraPredMode) indicating which intra prediction mode is employed, and sends the encoded index (IntraPredMode) to the decoder. The encoder selects an optimal intra prediction mode from a plurality of intra prediction modes based on the manner of RD optimization. This is called intra prediction mode determination. In order to obtain a match between the encoder and the decoder, the decoder adopts the same intra prediction mode as that adopted by the encoder based on IntraPredMode. In IntraPredMode encoding, entropy encoding such as Huffman code or arithmetic code is used.

図18はイントラ予測モードがエンコーダからデコーダに伝えられる状況を示している。エンコーダでイントラ予測モードの番号は2値化部で2値化される。2値化されたデータはエントロピ符号化部で符号化されてストリーム情報に含められる。ストリームはデコーダでエントロピ復号されて2値化されたデータが取り出される。2値化データは逆2値化部で変換されてイントラ予測モードの番号が得られる。   FIG. 18 shows a situation in which the intra prediction mode is transmitted from the encoder to the decoder. In the encoder, the intra prediction mode number is binarized by the binarization unit. The binarized data is encoded by the entropy encoding unit and included in the stream information. The stream is entropy-decoded by a decoder, and binarized data is extracted. The binarized data is converted by an inverse binarization unit to obtain an intra prediction mode number.

一般的に、イントラ予測モードの種類が多いほどイントラ予測の予測精度は向上する。そのため、近年、様々なイントラ予測モードが提案され、HEVC等の新しい符号化方式においては、上述したように多数のイントラ予測モードが用意されるようになってきている。   In general, the prediction accuracy of intra prediction improves as the types of intra prediction modes increase. Therefore, in recent years, various intra prediction modes have been proposed, and as described above, a number of intra prediction modes have been prepared in new encoding schemes such as HEVC.

しかしながら、用意されるイントラ予測モードの種類が多くなると、全てのイントラ予測モードを識別することができるように、イントラ予測モードを指定する情報の符号長を長くしなければならなくなる。そのために符号量が増大する恐れがある。しかしながら、用意される全てのイントラ予測モードが使用されるとは限らない。つまり、必ず選ばれないイントラ予測モードに対してもIntraPredModeが割り振られているため2値化データが冗長な表現となって符号化効率が不要に低減する恐れがあった。   However, if the types of prepared intra prediction modes increase, the code length of information specifying the intra prediction mode must be increased so that all intra prediction modes can be identified. Therefore, there is a possibility that the code amount increases. However, not all prepared intra prediction modes are used. That is, since IntraPredMode is assigned even to an intra prediction mode that is not necessarily selected, there is a possibility that the binarized data becomes a redundant expression and the coding efficiency is unnecessarily reduced.

また、最適なイントラ予測モードを選択するためには、各イントラ予測モードで予測を行い、それぞれについてコスト関数値を求め、それらを比較する必要がある。つまり、用意されるイントラ予測モードが増大すると、選ばれないモードについての処理量も増大することになり、符号化処理の負荷が不要に増大する恐れがあった。   In order to select an optimal intra prediction mode, it is necessary to perform prediction in each intra prediction mode, obtain a cost function value for each, and compare them. That is, when the number of prepared intra prediction modes increases, the amount of processing for a mode that is not selected also increases, which may unnecessarily increase the load of encoding processing.

そこで本実施においては、イントラ予測モードの数を適応的に制御することができるようにし、このようなイントラ予測における符号化効率の不要な低減や、負荷の不要な増大を抑制することができるようにする。   Therefore, in the present embodiment, the number of intra prediction modes can be adaptively controlled so that unnecessary reduction in coding efficiency and unnecessary increase in load in such intra prediction can be suppressed. To.

[画像符号化装置]
図19は、本発明を適用した画像符号化装置の主な構成例を示すブロック図である。
[Image encoding device]
FIG. 19 is a block diagram illustrating a main configuration example of an image encoding device to which the present invention has been applied.

図19に示される画像符号化装置300は、図1の画像符号化装置100と基本的に同様の装置であり、画像データを符号化する。図19に示されるように画像符号化装置300は、A/D変換部301、画面並べ替えバッファ302、演算部303、直交変換部304、量子化部305、可逆符号化部306、および蓄積バッファ307を有する。また、画像符号化装置300は、逆量子化部308、逆直交変換部309、演算部310、ループフィルタ311、フレームメモリ312、選択部313、イントラ予測部314、動き予測・補償部315、選択部316、およびレート制御部317を有する。   An image encoding device 300 shown in FIG. 19 is basically the same device as the image encoding device 100 of FIG. 1, and encodes image data. As illustrated in FIG. 19, the image encoding device 300 includes an A / D conversion unit 301, a screen rearrangement buffer 302, a calculation unit 303, an orthogonal transformation unit 304, a quantization unit 305, a lossless encoding unit 306, and a storage buffer. 307. In addition, the image coding apparatus 300 includes an inverse quantization unit 308, an inverse orthogonal transform unit 309, a calculation unit 310, a loop filter 311, a frame memory 312, a selection unit 313, an intra prediction unit 314, a motion prediction / compensation unit 315, a selection Unit 316 and rate control unit 317.

画像符号化装置300は、さらに、モード制限レベル制御部321を有する。   The image encoding device 300 further includes a mode restriction level control unit 321.

A/D変換部301は、入力された画像データをA/D変換する。A/D変換部301は、変換後の画像データ(デジタルデータ)を、画面並べ替えバッファ302に供給し、記憶させる。   The A / D conversion unit 301 performs A / D conversion on the input image data. The A / D conversion unit 301 supplies the converted image data (digital data) to the screen rearrangement buffer 302 for storage.

画面並べ替えバッファ302は、記憶した表示の順番のフレームの画像を、GOP(Group of Picture)構造に応じて、符号化のためのフレームの順番に並べ替える。画面並べ替えバッファ302は、フレームの順番を並び替えた画像を、演算部303に供給する。また、画面並べ替えバッファ302は、フレームの順番を並び替えた画像を、イントラ予測部314および動き予測・補償部315にも供給する。   The screen rearrangement buffer 302 rearranges the stored frame images in the display order in the order of frames for encoding according to the GOP (Group of Picture) structure. The screen rearrangement buffer 302 supplies the image with the rearranged frame order to the arithmetic unit 303. The screen rearrangement buffer 302 also supplies the image in which the frame order is rearranged to the intra prediction unit 314 and the motion prediction / compensation unit 315.

演算部303は、画面並べ替えバッファ302から読み出された画像から、選択部316を介してイントラ予測部314若しくは動き予測・補償部315から供給される予測画像を減算する。演算部303は、その差分情報を直交変換部304に出力する。   The calculation unit 303 subtracts the predicted image supplied from the intra prediction unit 314 or the motion prediction / compensation unit 315 via the selection unit 316 from the image read from the screen rearrangement buffer 302. The calculation unit 303 outputs the difference information to the orthogonal transform unit 304.

例えば、イントラ符号化が行われる画像の場合、演算部303は、画面並べ替えバッファ302から読み出された画像から、イントラ予測部314から供給される予測画像を減算する。また、例えば、インター符号化が行われる画像の場合、演算部303は、画面並べ替えバッファ302から読み出された画像から、動き予測・補償部315から供給される予測画像を減算する。   For example, in the case of an image on which intra coding is performed, the calculation unit 303 subtracts the prediction image supplied from the intra prediction unit 314 from the image read from the screen rearrangement buffer 302. For example, in the case of an image on which inter coding is performed, the calculation unit 303 subtracts the predicted image supplied from the motion prediction / compensation unit 315 from the image read from the screen rearrangement buffer 302.

直交変換部304は、演算部303から供給される差分情報に対して、離散コサイン変換、カルーネン・レーベ変換等の直交変換を施す。なお、この直交変換の方法は任意である。直交変換部304は、その変換係数を量子化部305に供給する。   The orthogonal transform unit 304 performs orthogonal transform such as discrete cosine transform and Karhunen-Loeve transform on the difference information supplied from the computation unit 303. Note that this orthogonal transformation method is arbitrary. The orthogonal transform unit 304 supplies the transform coefficient to the quantization unit 305.

量子化部305は、直交変換部304から供給される変換係数を量子化する。量子化部305は、レート制御部317から供給される符号量の目標値に関する情報に基づいて量子化パラメータを設定し、その量子化を行う。なお、この量子化の方法は任意である。量子化部305は、量子化された変換係数を可逆符号化部306に供給する。   The quantization unit 305 quantizes the transform coefficient supplied from the orthogonal transform unit 304. The quantization unit 305 sets a quantization parameter based on information regarding the target value of the code amount supplied from the rate control unit 317, and performs the quantization. Note that this quantization method is arbitrary. The quantization unit 305 supplies the quantized transform coefficient to the lossless encoding unit 306.

可逆符号化部306は、量子化部305において量子化された変換係数に対して、可変長符号化、算術符号化等の可逆符号化を施す。係数データは、レート制御部317の制御の下で量子化されているので、この符号量は、レート制御部317が設定した目標値となる(若しくは目標値に近似する)。   The lossless encoding unit 306 performs lossless encoding such as variable length encoding and arithmetic encoding on the transform coefficient quantized by the quantization unit 305. Since the coefficient data is quantized under the control of the rate control unit 317, the code amount becomes the target value set by the rate control unit 317 (or approximates the target value).

また、可逆符号化部306は、イントラ予測のモードを示す情報などをイントラ予測部314から取得し、インター予測のモードを示す情報や動きベクトル情報などを動き予測・補償部315から取得する。さらに、可逆符号化部306は、ループフィルタ311において使用されたフィルタ係数を取得する。   In addition, the lossless encoding unit 306 acquires information indicating an intra prediction mode from the intra prediction unit 314 and acquires information indicating an inter prediction mode, motion vector information, and the like from the motion prediction / compensation unit 315. Further, the lossless encoding unit 306 acquires the filter coefficient used in the loop filter 311.

さらに、可逆符号化部306は、モード制限レベル制御部321からイントラ予測モード制限レベルフラグ(imode_limit_level)を取得する。   Further, the lossless encoding unit 306 acquires an intra prediction mode restriction level flag (imode_limit_level) from the mode restriction level control unit 321.

可逆符号化部306は、これらのフィルタ係数、イントラ予測やインター予測のモードを示す情報、量子化パラメータ、並びにイントラ予測モード制限レベルフラグなどの各種情報を符号化し、符号化データのヘッダ情報の一部とする(多重化する)。可逆符号化部306は、符号化して得られた符号化データを蓄積バッファ307に供給して蓄積させる。   The lossless encoding unit 306 encodes various types of information such as filter coefficients, information indicating intra prediction and inter prediction modes, quantization parameters, and an intra prediction mode restriction level flag, and provides one piece of header information of encoded data. Part (multiplex). The lossless encoding unit 306 supplies the encoded data obtained by encoding to the storage buffer 307 for storage.

例えば、可逆符号化部306においては、可変長符号化または算術符号化等の可逆符号化処理が行われる。可変長符号化としては、H.264/AVC方式で定められているCAVLC(Context-Adaptive Variable Length Coding)などがあげられる。算術符号化としては、CABAC(Context-Adaptive Binary Arithmetic Coding)などがあげられる。もちろん、可逆符号化部306が、これらの方法以外の方法で符号化を行うようにしてもよい。   For example, the lossless encoding unit 306 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). Of course, the lossless encoding unit 306 may perform encoding by a method other than these methods.

蓄積バッファ307は、可逆符号化部306から供給された符号化データを、一時的に保持する。蓄積バッファ307は、所定のタイミングにおいて、保持している符号化データを、例えば、後段の図示せぬ記録装置(記録媒体)や伝送路などに出力する。   The accumulation buffer 307 temporarily holds the encoded data supplied from the lossless encoding unit 306. The accumulation buffer 307 outputs the held encoded data to, for example, a recording device (recording medium) (not shown) or a transmission path at a later stage at a predetermined timing.

また、量子化部305において量子化された変換係数は、逆量子化部308にも供給される。逆量子化部308は、その量子化された変換係数を、量子化部305による量子化に対応する方法で逆量子化する。この逆量子化の方法は、量子化部305による量子化処理に対応する方法であればどのような方法であってもよい。逆量子化部308は、得られた変換係数を、逆直交変換部309に供給する。   Further, the transform coefficient quantized by the quantization unit 305 is also supplied to the inverse quantization unit 308. The inverse quantization unit 308 performs inverse quantization on the quantized transform coefficient by a method corresponding to the quantization by the quantization unit 305. This inverse quantization method may be any method as long as it is a method corresponding to the quantization processing by the quantization unit 305. The inverse quantization unit 308 supplies the obtained transform coefficient to the inverse orthogonal transform unit 309.

逆直交変換部309は、逆量子化部308から供給された変換係数を、直交変換部304による直交変換処理に対応する方法で逆直交変換する。この逆直交変換の方法は、直交変換部304による直交変換処理に対応する方法であればどのようなものであってもよい。逆直交変換された出力(復元された差分情報)は、演算部310に供給される。   The inverse orthogonal transform unit 309 performs inverse orthogonal transform on the transform coefficient supplied from the inverse quantization unit 308 by a method corresponding to the orthogonal transform processing by the orthogonal transform unit 304. This inverse orthogonal transform method may be any method as long as it corresponds to the orthogonal transform processing by the orthogonal transform unit 304. The inversely orthogonal transformed output (restored difference information) is supplied to the calculation unit 310.

演算部310は、逆直交変換部309から供給された逆直交変換結果、すなわち、復元された差分情報に、選択部316を介してイントラ予測部314若しくは動き予測・補償部315から供給される予測画像を加算し、局部的に復号された画像(復号画像)を得る。   The calculation unit 310 supplies the inverse orthogonal transform result supplied from the inverse orthogonal transform unit 309, that is, the prediction supplied from the intra prediction unit 314 or the motion prediction / compensation unit 315 to the restored difference information via the selection unit 316. The images are added to obtain a locally decoded image (decoded image).

例えば、差分情報が、イントラ符号化が行われる画像に対応する場合、演算部310は、その差分情報にイントラ予測部314から供給される予測画像を加算する。また、例えば、差分情報が、インター符号化が行われる画像に対応する場合、演算部310は、その差分情報に動き予測・補償部315から供給される予測画像を加算する。   For example, when the difference information corresponds to an image on which intra coding is performed, the calculation unit 310 adds the predicted image supplied from the intra prediction unit 314 to the difference information. For example, when the difference information corresponds to an image on which inter coding is performed, the calculation unit 310 adds the predicted image supplied from the motion prediction / compensation unit 315 to the difference information.

その加算結果(復号画像)は、ループフィルタ311またはフレームメモリ312に供給される。   The addition result (decoded image) is supplied to the loop filter 311 or the frame memory 312.

ループフィルタ311は、デブロックフィルタ111や適応ループフィルタ等を含み、演算部310から供給される復号画像に対して適宜フィルタ処理を行う。例えば、ループフィルタ311は、復号画像に対して、デブロックフィルタ処理を行うことにより復号画像のブロック歪を除去する。また、例えば、ループフィルタ311は、そのデブロックフィルタ処理結果(ブロック歪みの除去が行われた復号画像)に対して、ウィナーフィルタ(Wiener Filter)を用いてループフィルタ処理を行うことにより画質改善を行う。   The loop filter 311 includes a deblock filter 111, an adaptive loop filter, and the like, and appropriately performs a filtering process on the decoded image supplied from the calculation unit 310. For example, the loop filter 311 removes block distortion of the decoded image by performing a deblocking filter process on the decoded image. Further, for example, the loop filter 311 performs image quality improvement by performing loop filter processing using a Wiener filter on the deblock filter processing result (decoded image from which block distortion has been removed). Do.

なお、ループフィルタ311が、復号画像に対して任意のフィルタ処理を行うようにしてもよい。また、ループフィルタ311は、必要に応じて、フィルタ処理に用いたフィルタ係数を可逆符号化部306に供給し、それを符号化させるようにすることもできる。   Note that the loop filter 311 may perform arbitrary filter processing on the decoded image. Further, the loop filter 311 can supply the filter coefficient used for the filter processing to the lossless encoding unit 306 and encode it as necessary.

ループフィルタ311は、フィルタ処理結果(フィルタ処理後の復号画像)をフレームメモリ312に供給する。なお、上述したように、演算部310から出力される復号画像は、ループフィルタ311を介さずにフレームメモリ312に供給することができる。つまり、ループフィルタ311によるフィルタ処理は省略することができる。   The loop filter 311 supplies the filter process result (decoded image after the filter process) to the frame memory 312. As described above, the decoded image output from the calculation unit 310 can be supplied to the frame memory 312 without passing through the loop filter 311. That is, the filtering process by the loop filter 311 can be omitted.

フレームメモリ312は、供給される復号画像を記憶し、所定のタイミングにおいて、記憶している復号画像を参照画像として、選択部313を介してイントラ予測部314または動き予測・補償部315に出力する。   The frame memory 312 stores the supplied decoded image, and outputs the stored decoded image as a reference image to the intra prediction unit 314 or the motion prediction / compensation unit 315 via the selection unit 313 at a predetermined timing. .

例えば、イントラ符号化が行われる画像の場合、フレームメモリ312は、参照画像を、選択部313を介してイントラ予測部314に供給する。また、例えば、インター符号化が行われる場合、フレームメモリ312は、参照画像を、選択部313を介して動き予測・補償部315に供給する。   For example, in the case of an image on which intra coding is performed, the frame memory 312 supplies the reference image to the intra prediction unit 314 via the selection unit 313. For example, when inter coding is performed, the frame memory 312 supplies the reference image to the motion prediction / compensation unit 315 via the selection unit 313.

選択部313は、フレームメモリ312から供給される参照画像がイントラ符号化を行う画像である場合、その参照画像をイントラ予測部314に供給する。また、選択部313は、フレームメモリ312から供給される参照画像がインター符号化を行う画像である場合、その参照画像を動き予測・補償部315に供給する。   When the reference image supplied from the frame memory 312 is an image on which intra coding is performed, the selection unit 313 supplies the reference image to the intra prediction unit 314. The selection unit 313 supplies the reference image to the motion prediction / compensation unit 315 when the reference image supplied from the frame memory 312 is an image to be inter-encoded.

イントラ予測部314は、選択部313を介してフレームメモリ312から供給される処理対象ピクチャ内の画素値を用いて予測画像を生成するイントラ予測(画面内予測)を行う。イントラ予測部314は、予め用意された複数のモード(イントラ予測モード)でこのイントラ予測を行う。イントラ予測部314は、AVC符号化方式において規定されるモード以外の任意のモードでこのイントラ予測を行うこともできる。   The intra prediction unit 314 performs intra prediction (intra-screen prediction) that generates a predicted image using the pixel values in the processing target picture supplied from the frame memory 312 via the selection unit 313. The intra prediction unit 314 performs this intra prediction in a plurality of modes (intra prediction modes) prepared in advance. The intra prediction unit 314 can also perform this intra prediction in any mode other than the mode defined in the AVC encoding method.

イントラ予測部314は、候補となる全てのイントラ予測モードで予測画像を生成し、画面並べ替えバッファ102から供給される入力画像を用いて各予測画像のコスト関数値を評価し、最適なモードを選択する。イントラ予測部314は、最適なイントラ予測モードを選択すると、その最適なモードで生成された予測画像を、選択部316を介して演算部303や演算部310に供給する。   The intra prediction unit 314 generates predicted images in all candidate intra prediction modes, evaluates the cost function value of each predicted image using the input image supplied from the screen rearrangement buffer 102, and selects the optimum mode. select. When the intra prediction unit 314 selects the optimal intra prediction mode, the intra prediction unit 314 supplies the prediction image generated in the optimal mode to the calculation unit 303 and the calculation unit 310 via the selection unit 316.

また、上述したように、イントラ予測部314は、採用されたイントラ予測モードを示すイントラ予測モード情報等の情報を、適宜可逆符号化部306に供給し、符号化させる。   Further, as described above, the intra prediction unit 314 appropriately supplies information such as intra prediction mode information indicating the adopted intra prediction mode to the lossless encoding unit 306 to be encoded.

動き予測・補償部315は、インター符号化が行われる画像について、画面並べ替えバッファ302から供給される入力画像と、選択部313を介してフレームメモリ312から供給される参照画像とを用いて、動き予測(インター予測)を行い、検出された動きベクトルに応じて動き補償処理を行い、予測画像(インター予測画像情報)を生成する。動き予測・補償部315は、予め用意された複数のモード(インター予測モード)でこのようなインター予測を行う。動き予測・補償部315は、AVC符号化方式において規定されるモード以外の任意のモードでこのインター予測を行うこともできる。   The motion prediction / compensation unit 315 uses the input image supplied from the screen rearrangement buffer 302 and the reference image supplied from the frame memory 312 via the selection unit 313 for the image to be inter-coded. Motion prediction (inter prediction) is performed, motion compensation processing is performed according to the detected motion vector, and a predicted image (inter predicted image information) is generated. The motion prediction / compensation unit 315 performs such inter prediction in a plurality of modes (inter prediction modes) prepared in advance. The motion prediction / compensation unit 315 can also perform this inter prediction in an arbitrary mode other than the mode defined in the AVC encoding method.

動き予測・補償部315は、候補となる全てのインター予測モードで予測画像を生成し、各予測画像のコスト関数値を評価し、最適なモードを選択する。動き予測・補償部315は、最適なインター予測モードを選択すると、その最適なモードで生成された予測画像を、選択部316を介して演算部303や演算部310に供給する。   The motion prediction / compensation unit 315 generates prediction images in all candidate inter prediction modes, evaluates the cost function value of each prediction image, and selects an optimal mode. When the optimal inter prediction mode is selected, the motion prediction / compensation unit 315 supplies the prediction image generated in the optimal mode to the calculation unit 303 and the calculation unit 310 via the selection unit 316.

また、動き予測・補償部315は、採用されたインター予測モードを示すインター予測モード情報や、算出した動きベクトルを示す動きベクトル情報を可逆符号化部306に供給し、符号化させる。   Also, the motion prediction / compensation unit 315 supplies the inter prediction mode information indicating the adopted inter prediction mode and the motion vector information indicating the calculated motion vector to the lossless encoding unit 306 to be encoded.

選択部316は、イントラ符号化を行う画像の場合、イントラ予測部314の出力を演算部303や演算部310に供給し、インター符号化を行う画像の場合、動き予測・補償部315の出力を演算部303や演算部310に供給する。   The selection unit 316 supplies the output of the intra prediction unit 314 to the calculation unit 303 and the calculation unit 310 in the case of an image to be subjected to intra coding, and outputs the output of the motion prediction / compensation unit 315 in the case of an image to be subjected to inter coding. This is supplied to the calculation unit 303 and the calculation unit 310.

レート制御部317は、蓄積バッファ307に蓄積された符号化データの符号量に基づいて、オーバーフローあるいはアンダーフローが発生しないように、量子化部305の量子化動作のレートを制御する。   The rate control unit 317 controls the rate of the quantization operation of the quantization unit 305 based on the code amount of the encoded data stored in the storage buffer 307 so that overflow or underflow does not occur.

また、レート制御部317は、蓄積バッファ307に蓄積された符号化データの符号量(発生符号量)を可逆符号化部306に供給する。可逆符号化部306は、供給された発生符号量に基づいてスライス分割を行うことができる。   Further, the rate control unit 317 supplies the code amount (generated code amount) of the encoded data stored in the storage buffer 307 to the lossless encoding unit 306. The lossless encoding unit 306 can perform slice division based on the supplied generated code amount.

モード制限レベル制御部321は、イントラ予測部314によるイントラ予測に用いられるイントラ予測モードと、可逆符号化部306が最適イントラ予測モードの指定情報に割り当てる2値化の符号長とを適応的に制御する。   The mode restriction level control unit 321 adaptively controls the intra prediction mode used for intra prediction by the intra prediction unit 314 and the binarized code length that the lossless encoding unit 306 assigns to the designation information of the optimal intra prediction mode. To do.

モード制限レベル制御部321は、過去に処理された所定の範囲内の一部若しくは全部の予測結果(最適イントラ予測モード)に基づいて、当該PUのイントラ予測モードと符号長の制御を行う。   The mode restriction level control unit 321 controls the intra prediction mode and the code length of the PU based on some or all prediction results (optimum intra prediction mode) within a predetermined range processed in the past.

なお、PUを分割したパーティションを処理単位とする場合もあるが、PUを処理単位とする場合と同様であるので、以下においては、PUを処理単位とする場合についてのみ説明する。   The partition obtained by dividing the PU may be used as a processing unit. However, since the processing unit is the same as that when the PU is used as a processing unit, only the case where the PU is used as a processing unit will be described below.

イントラ予測部314は、モード制限レベル制御部321により許可されたイントラ予測モードでイントラ予測を行い、最適なイントラ予測モードを選択する。   The intra prediction unit 314 performs intra prediction in the intra prediction mode permitted by the mode restriction level control unit 321 and selects an optimal intra prediction mode.

可逆符号化部306は、モード制限レベル制御部321により指定された符号長で、最適イントラ予測モードの指定情報を2値化し、符号化する。   The lossless encoding unit 306 binarizes and encodes the specification information of the optimal intra prediction mode with the code length specified by the mode restriction level control unit 321.

[モード制限レベル制御部]
図20は、図19のモード制限レベル制御部321の主な構成例を示すブロック図である。
[Mode restriction level controller]
FIG. 20 is a block diagram illustrating a main configuration example of the mode restriction level control unit 321 of FIG.

図20に示されるようにモード制限レベル制御部321は、予測モード記憶部331、判定用情報生成部332、テーブル記憶部333、テーブル選択部334、イントラ予測モード制限レベルフラグ生成部335、および許可モード決定部336を有する。   As shown in FIG. 20, the mode restriction level control unit 321 includes a prediction mode storage unit 331, a determination information generation unit 332, a table storage unit 333, a table selection unit 334, an intra prediction mode restriction level flag generation unit 335, and a permission. A mode determination unit 336 is included.

予測モード記憶部331は、イントラ予測部314から供給される当該PUの最適イントラ予測モードおよび当該PUのサイズ(PU_Size)を取得し、記憶する。予測モード記憶部331は、時間的に後に処理される他のPUに対する処理において、その記憶した最適イントラ予測モードやPUサイズ(PU_Size)を、周辺のPUの(過去のPUの)最適イントラ予測モード(過去予測モード)やPUサイズ(過去PU_Size)として、判定用情報生成部332に供給する。   The prediction mode storage unit 331 acquires and stores the optimal intra prediction mode of the PU and the size (PU_Size) of the PU supplied from the intra prediction unit 314. The prediction mode storage unit 331 uses the stored optimal intra prediction mode and PU size (PU_Size) in the processing for other PUs to be processed later in time, and the optimal intra prediction mode of the surrounding PU (for the past PU). (Past prediction mode) and PU size (Past PU_Size) are supplied to the determination information generation unit 332.

判定用情報生成部332は、予測モード記憶部331から過去予測モードや過去PU_Sizeを取得すると、それらの情報を用いて、イントラ予測モードの制限レベルを判定するための情報である判定用情報を生成する。この判定用情報は、イントラ予測モードの制限レベルの判定に用いられるものであればどのような情報であっても良い。例えば、判定用情報生成部332は、過去の所定の範囲内において選択されたイントラ予測モードをPUサイズ毎に集計し、それを判定用情報とする。   When the determination information generation unit 332 acquires the past prediction mode and the past PU_Size from the prediction mode storage unit 331, the determination information generation unit 332 generates determination information that is information for determining the restriction level of the intra prediction mode using the information. To do. This determination information may be any information as long as it is used for determining the restriction level of the intra prediction mode. For example, the determination information generation unit 332 aggregates the intra prediction modes selected within a predetermined range in the past for each PU size, and uses it as determination information.

集計を行う範囲(過去の所定の範囲)は、任意である。例えば、直近に処理された所定数のPU群であってもよいし、当該PUと同じピクチャの処理済みのPU群であってもよいし、当該PUと同じシーケンスの処理済みのPU群であってもよいし、それらの範囲内の一部のPU(代表PU)であってもよい。   The range in which aggregation is performed (predetermined predetermined range) is arbitrary. For example, it may be a predetermined number of PU groups processed most recently, a processed PU group of the same picture as the PU, or a processed PU group of the same sequence as the PU. Alternatively, some PUs (representative PUs) within those ranges may be used.

判定用情報生成部332は、生成した判定用情報をテーブル選択部334に供給する。   The determination information generation unit 332 supplies the generated determination information to the table selection unit 334.

テーブル記憶部333は、イントラ予測における使用を許可する予測モードの種類の数(Number of modes)と、最適イントラ予測モードに割り当てる2値化の符号長(Bins)とを、PUサイズ毎に指定するテーブル情報を予め記憶し、テーブル選択部334の要求に応じてそのテーブル情報をテーブル選択部334に供給する。   The table storage unit 333 specifies, for each PU size, the number of types of prediction modes permitted to be used in intra prediction (Number of modes) and the binarized code length (Bins) assigned to the optimal intra prediction mode. Table information is stored in advance, and the table information is supplied to the table selection unit 334 in response to a request from the table selection unit 334.

テーブル選択部334は、判定用情報生成部332から供給される判定用情報に基づいて、テーブル記憶部333に記憶されるテーブル情報の中から1つを選択し、それを選択テーブル情報として取得し、イントラ予測モード制限レベルフラグ生成部335および許可モード決定部336に供給する。   Based on the determination information supplied from the determination information generation unit 332, the table selection unit 334 selects one of the table information stored in the table storage unit 333, and acquires it as selection table information. The intra prediction mode restriction level flag generation unit 335 and the permission mode determination unit 336 are supplied.

イントラ予測モード制限レベルフラグ生成部335は、テーブル選択部334から供給される選択テーブル情報に基づいて、イントラ予測モード制限レベルフラグ(imode_limit_level)の値を設定する。イントラ予測モード制限レベルフラグ生成部335は、そのイントラ予測モード制限レベルフラグ(imode_limit_level)を可逆符号化部306に供給する。   The intra prediction mode limit level flag generation unit 335 sets the value of the intra prediction mode limit level flag (imode_limit_level) based on the selection table information supplied from the table selection unit 334. The intra prediction mode restriction level flag generation unit 335 supplies the intra prediction mode restriction level flag (imode_limit_level) to the lossless encoding unit 306.

許可モード決定部336は、テーブル選択部334から供給された選択テーブル情報を参照して、イントラ予測部314から供給される当該PUのPUサイズ(PU_Size)に対応する許可モード(使用を許可するモード)を決定する。許可モード決定部336は、決定した許可モードを示す許可モード情報をイントラ予測部314に供給する。イントラ予測部314は、その許可モード情報に基づいて、各許可モードを最適イントラ予測モードの候補としてイントラ予測処理を実行する。   The permission mode determination unit 336 refers to the selection table information supplied from the table selection unit 334, and specifies a permission mode (a mode that permits use) corresponding to the PU size (PU_Size) of the PU supplied from the intra prediction unit 314. ). The permission mode determination unit 336 supplies permission mode information indicating the determined permission mode to the intra prediction unit 314. Based on the permission mode information, the intra prediction unit 314 performs intra prediction processing using each permission mode as a candidate for the optimal intra prediction mode.

[イントラ予測モード制限レベル]
最適イントラ予測モードの候補となるイントラ予測モードの数が増大すると、予測精度は向上するが、その全てのモードを識別することができるようにしなければならないので、最適イントラ予測モードの指定情報に割り当てられる2値化の符号長が増大し、符号量が増大する恐れがある。しかしながら、必ずしも全てのモードが最適イントラ予測モードとして選択されるとは限らない。つまり、不要に符号化効率が低減する恐れがある。
[Intra prediction mode restriction level]
As the number of intra prediction modes that are candidates for the optimal intra prediction mode increases, the prediction accuracy improves. However, since all the modes must be identified, it is assigned to the designation information of the optimal intra prediction mode. There is a possibility that the code length of binarization to be increased will increase the amount of codes. However, not all modes are necessarily selected as the optimal intra prediction mode. That is, there is a possibility that the encoding efficiency may be unnecessarily reduced.

そこで、モード制限レベル制御部321は、例えば画像の内容に応じて、イントラ予測に用いられるイントラ予測モードを、予め用意されたイントラ予測モードの中の一部のみに制限する。この制限のレベル(どの程度制限するか、若しくは制限しないか)をイントラ予測モード制限レベルと称する。   Therefore, the mode restriction level control unit 321 restricts the intra prediction mode used for the intra prediction to only a part of the intra prediction modes prepared in advance, for example, according to the content of the image. This level of restriction (how much it is restricted or not restricted) is referred to as an intra prediction mode restriction level.

つまり、モード制限レベル制御部321は、当該PUの、このイントラ予測モード制限レベルを適応的に制御するとも言える。このようにすることにより、モード制限レベル制御部321は、符号量の不要な増大を適応的に抑制し、符号化効率を向上させることができる。   That is, it can be said that the mode restriction level control unit 321 adaptively controls the intra prediction mode restriction level of the PU. By doing so, the mode restriction level control unit 321 can adaptively suppress an unnecessary increase in the code amount and improve the coding efficiency.

なお、ここで符号化効率を向上させるために重要なことは、最適イントラ予測モードの指定情報に割り当てる2値化の符号長を適応的に(極力)短くすることである。候補となるイントラ予測モードの数を適応的に制限することはそのために必要なことではあるが、それだけでは十分ではない。つまり、モード制限レベル制御部321によるイントラ予測モード制限レベルの制御には、最適イントラ予測モードの指定情報に割り当てる2値化の符号長の制御も含まれる。   Here, what is important for improving the coding efficiency is to adaptively (as much as possible) shorten the binarization code length assigned to the designation information of the optimal intra prediction mode. Although adaptively limiting the number of candidate intra-prediction modes is necessary for that purpose, it is not sufficient. That is, the control of the intra prediction mode restriction level by the mode restriction level control unit 321 includes control of the binarized code length assigned to the designation information of the optimal intra prediction mode.

[テーブル情報]
テーブル記憶部333は、例えば図21および図22に示されるようなテーブル情報を予め記憶する。図21は、イントラ予測制限モードレベルが0(imode_limit_level = 0)のテーブル情報の例を示し、図22は、イントラ予測制限モードレベルが1(imode_limit_level = 1)のテーブル情報の例を示す。
[Table information]
The table storage unit 333 stores in advance table information as shown in FIGS. 21 and 22, for example. FIG. 21 shows an example of table information with an intra prediction restriction mode level of 0 (imode_limit_level = 0), and FIG. 22 shows an example of table information with an intra prediction restriction mode level of 1 (imode_limit_level = 1).

図21に示されるイントラ予測制限モードレベル0(imode_limit_level = 0)の場合、予め用意されたイントラ予測モードの全てがイントラ予測に使用されることを許可される。つまり、イントラ予測制限モードレベル0の場合、イントラ予測部314は、予め用意されたイントラ予測モードの全てのモードでイントラ予測を行い、各予測結果のコスト関数値を算出して比較することにより最適なモードを選択する。   In the case of intra prediction restriction mode level 0 (imode_limit_level = 0) shown in FIG. 21, all of the prepared intra prediction modes are allowed to be used for intra prediction. That is, in the case of the intra prediction restriction mode level 0, the intra prediction unit 314 performs intra prediction in all modes of the prepared intra prediction modes, calculates the cost function value of each prediction result, and compares them optimally. The correct mode.

この例において、例えば、PUのサイズが8×8の場合、イントラ予測モードの候補数は34であり、最適イントラ予測モードの指定情報に割り当てられる2値化の符号長は5Binである。なお、イントラ予測モードの数が34に対してBin数が5では最大で32通りとなって不足しているが、MPM(MostProbableMode)と呼ばれるモードとエスケープコードと呼ばれる方法も合わせて最大で34通り符号化することができることを示している。   In this example, for example, when the PU size is 8 × 8, the number of intra prediction mode candidates is 34, and the binarization code length assigned to the designation information of the optimal intra prediction mode is 5 Bin. The number of intra prediction modes is 34 and the number of bins is 5 and the number of bins is 32, which is a maximum of 32. However, a mode called MPM (MostProbableMode) and a method called an escape code are combined and a maximum of 34 ways. It shows that it can be encoded.

これに対して、図22に示されるイントラ予測制限モードレベル1(imode_limit_level = 1)の場合、予め用意されたイントラ予測モードの一部のみがイントラ予測に使用されることを許可される。つまり、イントラ予測制限モードレベル1の場合、イントラ予測部314は、予め用意されたイントラ予測モードの内、使用を許可されたモードのみでイントラ予測を行い、各予測結果のコスト関数値を算出して比較することにより最適なモードを選択する。つまり、イントラ予測制限モードレベル1の場合、イントラ予測部314は、イントラ予測制限モードレベル0より少ないモードの中から最適なモードを選択する。   On the other hand, in the case of intra prediction restriction mode level 1 (imode_limit_level = 1) shown in FIG. 22, only a part of the prepared intra prediction modes is allowed to be used for intra prediction. That is, in the case of the intra prediction restriction mode level 1, the intra prediction unit 314 performs intra prediction only in a mode permitted to use among the prepared intra prediction modes, and calculates a cost function value of each prediction result. To select the optimum mode. That is, in the case of the intra prediction restriction mode level 1, the intra prediction unit 314 selects an optimum mode from modes having less than the intra prediction restriction mode level 0.

そのため、例えば、PUのサイズが8×8の場合、この状態ではモードの最大数が34から17に制限されている。したがって、モード制限レベル制御部321は、最適イントラ予測モードの指定情報に割り当てる符号長を、5Binから4Binに低減することができる。   Therefore, for example, when the PU size is 8 × 8, the maximum number of modes is limited to 34 to 17 in this state. Therefore, the mode restriction level control unit 321 can reduce the code length assigned to the designation information of the optimal intra prediction mode from 5 Bin to 4 Bin.

なお、図21や図22を参照して説明したテーブル情報のフォーマットは任意である。   Note that the format of the table information described with reference to FIGS. 21 and 22 is arbitrary.

例えば、使用を許可するイントラ予測モードの種類の数だけでなく、どのモードを許可するかを示す情報もテーブル情報に含まれるようにしてもよい。つまり、許可モード決定部336が、使用を許可するイントラ予測モードの数毎にどのモードを許可するかを予め把握しており、供給された選択テーブル情報において使用を許可するイントラ予測モードの数が指定されるだけで、どのモードを許可するかを決定することができるようにしてもよいし、供給された選択テーブル情報によってどのモードを許可するかが指定されるようにしてもよい。   For example, not only the number of types of intra prediction modes permitted to be used but also information indicating which modes are permitted may be included in the table information. That is, the permission mode determination unit 336 knows in advance which mode is permitted for each number of intra prediction modes permitted to be used, and the number of intra prediction modes permitted for use in the supplied selection table information. It may be possible to determine which mode is allowed only by being specified, or it may be specified which mode is allowed based on the supplied selection table information.

また、モード制限レベル制御部321においては、使用を許可するイントラ予測モードの数を制限できればよく、符号長の指定は不要である。したがって、テーブル記憶部333が記憶するテーブル情報において、Binsの項目は省略するようにしてもよい。   Further, the mode restriction level control unit 321 only needs to be able to limit the number of intra prediction modes permitted to be used, and designation of the code length is unnecessary. Accordingly, the Bins item may be omitted in the table information stored in the table storage unit 333.

また、図21および図22に示されるテーブル情報は一例であり、各PUサイズに割り当てられるモード数やBin数の値は、図21および図22に示される値以外であっても良い。さらに、PUサイズの区分も、図21および図22に示される例以外であってもよい。例えば、PU_16×8等のように長方形が含まれていてもよい。   The table information shown in FIGS. 21 and 22 is an example, and the values of the mode number and the Bin number assigned to each PU size may be other than the values shown in FIGS. 21 and 22. Furthermore, the PU size classification may be other than the examples shown in FIGS. 21 and 22. For example, a rectangle such as PU_16 × 8 may be included.

[可逆符号化部]
図23は、図19の可逆符号化部306の主な構成例を示すブロック図である。
[Lossless encoding unit]
FIG. 23 is a block diagram illustrating a main configuration example of the lossless encoding unit 306 in FIG.

図23の例において、可逆符号化部306は、イントラ予測モード記憶部341、MPM算出部342、比較部343、テーブル記憶部344、符号長決定部345、2値化部346、およびエントロピ符号化部347を有する。また、可逆符号化部306は、2値化部348、エントロピ符号化部349、2値化部350、エントロピ符号化部351、および合成部352も有する。   In the example of FIG. 23, the lossless encoding unit 306 includes an intra prediction mode storage unit 341, an MPM calculation unit 342, a comparison unit 343, a table storage unit 344, a code length determination unit 345, a binarization unit 346, and entropy encoding. Part 347. The lossless encoding unit 306 also includes a binarization unit 348, an entropy encoding unit 349, a binarization unit 350, an entropy encoding unit 351, and a combining unit 352.

イントラ予測モード記憶部341は、イントラ予測部314から供給される最適イントラ予測モードの指定情報である予測モード情報を記憶する。イントラ予測モード記憶部341は、時間的に後の、他のPUに対する処理において、記憶している予測モード情報を周辺のPUの予測モード情報(周辺予測モード情報)としてMPM算出部342に供給する。   The intra prediction mode storage unit 341 stores prediction mode information that is designation information for the optimal intra prediction mode supplied from the intra prediction unit 314. The intra prediction mode storage unit 341 supplies the stored prediction mode information to the MPM calculation unit 342 as prediction mode information (peripheral prediction mode information) of neighboring PUs in processing for other PUs later in time. .

MPM算出部342は、イントラ予測モード記憶部341から供給される周辺予測モード情報を取得すると、それを用いて当該PUのMPMを求め、そのMPMに関する情報であるMPM情報を生成し、比較部343に供給する。   When the MPM calculation unit 342 acquires the peripheral prediction mode information supplied from the intra prediction mode storage unit 341, the MPM calculation unit 342 obtains the MPM of the PU using the information, generates MPM information that is information related to the MPM, and the comparison unit 343. To supply.

比較部343は、MPM算出部342から供給されたMPM情報と、イントラ予測部314から供給される最適イントラ予測モードを指定する予測モード情報とを比較し、MPMと最適イントラ予測モードが一致するか否かを示すprev_intra_luma_pred_flagを生成する。比較部343は、prev_intra_luma_pred_flagを生成すると、それをエントロピ符号化部347に供給する。   The comparison unit 343 compares the MPM information supplied from the MPM calculation unit 342 with the prediction mode information specifying the optimal intra prediction mode supplied from the intra prediction unit 314, and whether the MPM and the optimal intra prediction mode match. Prev_intra_luma_pred_flag indicating whether or not is generated. When the comparison unit 343 generates prev_intra_luma_pred_flag, the comparison unit 343 supplies the prev_intra_luma_pred_flag to the entropy coding unit 347.

また、比較部343は、その比較結果に応じて2値化部346を制御する。比較部343は、prev_intra_luma_pred_flag=1の場合、すなわち、MPMが最適イントラ予測モードと一致する場合、2値化部346の動作を停止させ、prev_intra_luma_pred_flagのみをストリームに含めるようにする。   Further, the comparison unit 343 controls the binarization unit 346 according to the comparison result. When prev_intra_luma_pred_flag = 1, that is, when the MPM matches the optimal intra prediction mode, the comparison unit 343 stops the operation of the binarization unit 346 and includes only prev_intra_luma_pred_flag in the stream.

逆に、prev_intra_luma_pred_flag=0の場合、すなわち、MPMが最適イントラ予測モードと一致しない場合、比較部343は、2値化部346を動作させ、予測モード情報を2値化させ、その2値データをprev_intra_luma_pred_flagとともにストリームに含めるようにする。   Conversely, when prev_intra_luma_pred_flag = 0, that is, when the MPM does not match the optimal intra prediction mode, the comparison unit 343 operates the binarization unit 346 to binarize the prediction mode information, and the binary data It is included in the stream together with prev_intra_luma_pred_flag.

テーブル記憶部344は、最適イントラ予測モードの指定情報に割り当てる2値化の符号長(Bins)をPUサイズ毎に指定するテーブル情報を予め記憶し、符号長決定部345の要求に応じて、それを符号長決定部345に供給する。   The table storage unit 344 stores in advance table information that specifies the binarized code length (Bins) to be assigned to the specification information of the optimal intra prediction mode for each PU size, and in response to a request from the code length determination unit 345, Is supplied to the code length determination unit 345.

このテーブル情報は、図21および図22に示されるように、イントラ予測モード制限レベル毎のテーブル情報である。テーブル記憶部344は、テーブル記憶部333が記憶するテーブル情報の各イントラ予測モード制限レベルについてのテーブル情報(つまり、テーブル記憶部333が記憶するテーブル情報に対応するテーブル情報)を記憶する。   As shown in FIGS. 21 and 22, this table information is table information for each intra prediction mode restriction level. The table storage unit 344 stores table information about each intra prediction mode restriction level of the table information stored in the table storage unit 333 (that is, table information corresponding to the table information stored in the table storage unit 333).

符号長決定部345は、モード制限レベル制御部321から供給されるイントラ予測モード制限レベルフラグ(imode_limit_level)を取得すると、そのフラグが示すイントラ予測モード制限レベルのテーブル情報を、テーブル記憶部344から取得する。符号長決定部345は、そのテーブル情報を用いて、イントラ予測部314から供給される、最適イントラ予測モードを指定する予測モード情報に割り当てる2値化の符号長を、イントラ予測部314から供給される当該PUのPUサイズ(PU_Size)に応じて決定する。   When the code length determination unit 345 acquires the intra prediction mode limit level flag (imode_limit_level) supplied from the mode limit level control unit 321, the code length determination unit 345 acquires table information of the intra prediction mode limit level indicated by the flag from the table storage unit 344. To do. Using the table information, the code length determination unit 345 is supplied from the intra prediction unit 314 with a binarized code length that is supplied from the intra prediction unit 314 and is assigned to prediction mode information that designates the optimal intra prediction mode. This is determined according to the PU size (PU_Size) of the relevant PU.

符号長決定部345は、決定した符号長を示す符号長情報を2値化部346に供給する。   The code length determination unit 345 supplies code length information indicating the determined code length to the binarization unit 346.

なお、このテーブル情報は、最適イントラ予測モードの指定情報に割り当てる2値化の符号長(Bins)をPUサイズ毎に指定することができる限り、そのフォーマットは任意である。例えば、テーブル記憶部333が記憶するテーブル情報と同様のテーブル情報を記憶するようにしてもよい。   The format of the table information is arbitrary as long as the binarized code length (Bins) assigned to the specification information of the optimal intra prediction mode can be specified for each PU size. For example, the same table information as the table information stored in the table storage unit 333 may be stored.

また、各PUサイズに割り当てられるモード数やBin数の値は、図21および図22に示される値以外であっても良い。さらに、PUサイズの区分も、図21および図22に示される例以外であってもよい。   Further, the number of modes and the number of bins allocated to each PU size may be other than the values shown in FIGS. Furthermore, the PU size classification may be other than the examples shown in FIGS. 21 and 22.

なお、モード制限レベル制御部321が最適イントラ予測モードの指定情報に割り当てる2値化の符号長(Bins)を決定し、その符号長情報をイントラ予測モード制限レベルフラグ(imode_limit_level)とともに可逆符号化部306に供給するようにしてもよい。その場合、テーブル記憶部344および符号長決定部345は省略することができる。符号長情報は、2値化部346に供給され、イントラ予測モード制限レベルフラグ(imode_limit_level)は、エントロピ符号化部347に供給される。   The mode limit level control unit 321 determines a binarized code length (Bins) to be assigned to the designation information of the optimal intra prediction mode, and the code length information together with the intra prediction mode limit level flag (imode_limit_level) is a lossless encoding unit. 306 may be supplied. In that case, the table storage unit 344 and the code length determination unit 345 can be omitted. The code length information is supplied to the binarization unit 346, and the intra prediction mode restriction level flag (imode_limit_level) is supplied to the entropy encoding unit 347.

2値化部346は、比較部343の制御の下、イントラ予測部314から供給される最適イントラ予測モードを指定する予測モード情報を取得すると、符号長決定部345から供給される符号長情報により指定される符号長で、その予測モード情報を2値化する。   When the binarization unit 346 obtains prediction mode information specifying the optimal intra prediction mode supplied from the intra prediction unit 314 under the control of the comparison unit 343, the binarization unit 346 uses the code length information supplied from the code length determination unit 345. The prediction mode information is binarized with a designated code length.

2値化部346は、予測モード情報を2値化した2値データをエントロピ符号化部347に供給する。   The binarization unit 346 supplies binary data obtained by binarizing the prediction mode information to the entropy encoding unit 347.

エントロピ符号化部347は、比較部343からprev_intra_luma_pred_flagを取得すると、それを符号化し、その符号化データを合成部352に供給する。また、エントロピ符号化部347は、2値化部346から、予測モード情報を2値化した2値データを取得すると、それを符号化し、その符号化データを合成部352に供給する。さらに、エントロピ符号化部347は、モード制限レベル制御部321から供給されるイントラ予測モード制限レベルフラグ(imode_limit_level)を取得すると、それを符号化し、その符号化データを合成部352に供給する。   Upon obtaining prev_intra_luma_pred_flag from the comparison unit 343, the entropy encoding unit 347 encodes it and supplies the encoded data to the synthesis unit 352. Further, when the entropy encoding unit 347 acquires binary data obtained by binarizing the prediction mode information from the binarizing unit 346, the entropy encoding unit 347 encodes the binary data and supplies the encoded data to the synthesizing unit 352. Further, when the entropy encoding unit 347 obtains the intra prediction mode restriction level flag (imode_limit_level) supplied from the mode restriction level control unit 321, it encodes it and supplies the encoded data to the synthesis unit 352.

以上の処理は、最適予測モードとしてイントラ予測モードが選択される場合に行われる。   The above processing is performed when the intra prediction mode is selected as the optimal prediction mode.

最適予測モードとしてインター予測モードが選択される場合、2値化部348は、動き予測・補償部315から供給される予測モード情報を2値化し、その2値データをエントロピ符号化部349に供給する。エントロピ符号化部349は、2値化部348から供給される2値データを符号化し、その符号化データを合成部352に供給する。   When the inter prediction mode is selected as the optimal prediction mode, the binarization unit 348 binarizes the prediction mode information supplied from the motion prediction / compensation unit 315 and supplies the binary data to the entropy encoding unit 349. To do. The entropy encoding unit 349 encodes the binary data supplied from the binarization unit 348 and supplies the encoded data to the synthesis unit 352.

2値化部350は、量子化部305から供給される差分画像の係数データを2値化し、その2値データをエントロピ符号化部351に供給する。また、2値化部350は、ループフィルタ311から供給されるフィルタ係数等のフィルタ処理に関する情報を2値化し、その2値データをエントロピ符号化部351に供給する。エントロピ符号化部351は、2値化部350から供給される2値データを符号化し、その符号化データを合成部352に供給する。   The binarization unit 350 binarizes the coefficient data of the difference image supplied from the quantization unit 305 and supplies the binary data to the entropy encoding unit 351. The binarization unit 350 binarizes information related to filter processing such as filter coefficients supplied from the loop filter 311 and supplies the binary data to the entropy encoding unit 351. The entropy encoding unit 351 encodes the binary data supplied from the binarization unit 350 and supplies the encoded data to the synthesis unit 352.

合成部352は、必要に応じてヘッダ情報等を適宜生成し、その情報と、エントロピ符号化部347、エントロピ符号化部349、およびエントロピ符号化部351から供給される各符号化データとを適宜合成し、1本のストリームとして蓄積バッファ307に出力する。   The synthesizing unit 352 generates header information and the like as needed, and appropriately outputs the information and each encoded data supplied from the entropy encoding unit 347, the entropy encoding unit 349, and the entropy encoding unit 351. Combined and output to the accumulation buffer 307 as one stream.

例えば、合成部352は、イントラ予測モード制限レベルフラグ(imode_limit_level)をスライスヘッダに格納する。もちろん、イントラ予測モード制限レベルフラグは、ストリームの任意の位置に格納することができる。例えば、シーケンスパラメータセット(SPS(Sequence Parameter Set)やピクチャパラメータセット(PPS(Picture Parameter Set))等のNAL(Network Abstraction Layer)に格納されるようにしてもよいし、VCL(Video Coding Layer)に格納されるようにしてもよい。また、例えば、SEI(Suplemental Enhancement Information)等に格納されるようにしてもよい。   For example, the synthesis unit 352 stores an intra prediction mode limit level flag (imode_limit_level) in the slice header. Of course, the intra prediction mode restriction level flag can be stored at any position in the stream. For example, it may be stored in a NAL (Network Abstraction Layer) such as a sequence parameter set (SPS (Sequence Parameter Set) or picture parameter set (PPS (Picture Parameter Set)), or may be stored in a VCL (Video Coding Layer). For example, it may be stored in SEI (Suplemental Enhancement Information) or the like.

さらに、イントラ予測モード制限レベルフラグ(imode_limit_level)が、ストリームとは別に復号側に伝送されるようにしてもよい。その場合、イントラ予測モード制限レベルフラグ(imode_limit_level)と符号化データとの対応関係を明確にする(復号側で把握することができるようにする)必要があるが、その方法は任意である。例えば、別途、対応関係を示すテーブル情報を作成してもよいし、対応先のデータを示すリンク情報を互いのデータに埋め込むなどしてもよい。   Furthermore, the intra prediction mode limit level flag (imode_limit_level) may be transmitted to the decoding side separately from the stream. In this case, it is necessary to clarify the correspondence relationship between the intra prediction mode limit level flag (imode_limit_level) and the encoded data (so that it can be grasped on the decoding side), but the method is arbitrary. For example, table information indicating the correspondence relationship may be created separately, or link information indicating the correspondence destination data may be embedded in each other's data.

以上のように、モード制限レベル制御部321が、イントラ予測部314において行われるイントラ予測に用いられるモード数を適応的に制御し、可逆符号化部306が、最適イントラ予測モードの指定情報である予測モード情報を、イントラ予測のモード数に応じた符号長で2値化する。これにより、予測モード情報の符号長を、画像に応じた適切な長さにすることができるので、画像符号化装置300は、不要な符号量の増大を抑制し、符号化効率を向上させることができる。   As described above, the mode restriction level control unit 321 adaptively controls the number of modes used for intra prediction performed in the intra prediction unit 314, and the lossless encoding unit 306 is the designation information for the optimal intra prediction mode. Prediction mode information is binarized with a code length corresponding to the number of modes of intra prediction. Thereby, since the code length of prediction mode information can be made into the suitable length according to an image, the image coding apparatus 300 suppresses the increase in an unnecessary code amount and improves coding efficiency. Can do.

また、イントラ予測モードを適応的に制限するので、画像符号化装置300は、イントラ予測の負荷を低減することもできる。   In addition, since the intra prediction mode is adaptively limited, the image coding apparatus 300 can also reduce the intra prediction load.

[符号化処理の流れ]
次に、以上のような画像符号化装置300により実行される各処理の流れについて説明する。最初に、図24のフローチャートを参照して、符号化処理の流れの例を説明する。
[Flow of encoding process]
Next, the flow of each process executed by the image encoding device 300 as described above will be described. First, an example of the flow of encoding processing will be described with reference to the flowchart of FIG.

なお、各ステップの処理データ単位は互いに異なる場合もある。そのため、各ステップの処理は、実際には、互いに並行して行われたり、順序が入れ替えて行われる場合もある。以下に説明する他の処理においても同様である。   Note that the processing data unit of each step may be different from each other. Therefore, the processing of each step may actually be performed in parallel with each other or may be performed in a reversed order. The same applies to other processes described below.

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

ステップS303において、イントラ予測部314は、イントラ予測モードのイントラ予測処理を行う。ステップS304において、動き予測・補償部315は、インター予測モードでの動き予測や動き補償を行うインター動き予測処理を行う。   In step S303, the intra prediction unit 314 performs intra prediction processing in the intra prediction mode. In step S304, the motion prediction / compensation unit 315 performs an inter motion prediction process for performing motion prediction and motion compensation in the inter prediction mode.

ステップS305において、選択部316は、イントラ予測部314および動き予測・補償部315から出力された各コスト関数値に基づいて、最適なモードを決定する。つまり、選択部316は、イントラ予測部314により生成された予測画像と、動き予測・補償部315により生成された予測画像のいずれか一方を選択する。   In step S305, the selection unit 316 determines an optimum mode based on the cost function values output from the intra prediction unit 314 and the motion prediction / compensation unit 315. That is, the selection unit 316 selects one of the prediction image generated by the intra prediction unit 314 and the prediction image generated by the motion prediction / compensation unit 315.

また、このいずれの予測画像が選択されたかを示す選択情報は、イントラ予測部314および動き予測・補償部315のうち、予測画像が選択された方に供給される。最適イントラ予測モードの予測画像が選択された場合、イントラ予測部314は、最適イントラ予測モード等を示す予測モード情報や例えば当該PUのPUサイズ(PU_Size)等の関連情報を、可逆符号化部306に供給する。最適インター予測モードの予測画像が選択された場合、動き予測・補償部315は、最適インター予測モードを示す予測モード情報や関連情報を可逆符号化部306に出力する。   In addition, the selection information indicating which prediction image is selected is supplied to the intra prediction unit 314 and the motion prediction / compensation unit 315 that has selected the prediction image. When the prediction image of the optimal intra prediction mode is selected, the intra prediction unit 314 displays prediction mode information indicating the optimal intra prediction mode and the like, for example, related information such as the PU size (PU_Size) of the PU, and the lossless encoding unit 306. To supply. When the prediction image in the optimal inter prediction mode is selected, the motion prediction / compensation unit 315 outputs prediction mode information indicating the optimal inter prediction mode and related information to the lossless encoding unit 306.

ステップS306において、演算部303は、ステップS302の処理により並び替えられた画像と、ステップS305の処理により選択された予測画像との差分を演算する。予測画像は、インター予測する場合は動き予測・補償部315から、イントラ予測する場合はイントラ予測部314から、選択部316を介して演算部303に供給される。   In step S306, the calculation unit 303 calculates the difference between the image rearranged by the process of step S302 and the predicted image selected by the process of step S305. The predicted image is supplied from the motion prediction / compensation unit 315 when performing inter prediction, or from the intra prediction unit 314 when performing intra prediction, to the calculation unit 303 via the selection unit 316.

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

ステップS307において、直交変換部304は、ステップS306の処理により生成された差分情報を直交変換する。具体的には、離散コサイン変換、カルーネン・レーベ変換等の直交変換が行われ、変換係数が出力される。   In step S307, the orthogonal transform unit 304 performs orthogonal transform on the difference information generated by the process in step S306. Specifically, orthogonal transformation such as discrete cosine transformation and Karhunen-Loeve transformation is performed, and transformation coefficients are output.

ステップS308において、量子化部305は、ステップS307の処理により得られた直交変換係数を量子化する。   In step S308, the quantization unit 305 quantizes the orthogonal transform coefficient obtained by the process in step S307.

ステップS308の処理により量子化された差分情報は、次のようにして局部的に復号される。すなわち、ステップS309において、逆量子化部308は、ステップS308の処理により生成された量子化された直交変換係数(量子化係数とも称する)を量子化部305の特性に対応する特性で逆量子化する。ステップS310において、逆直交変換部309は、ステップS307の処理により得られた直交変換係数を、直交変換部304の特性に対応する特性で逆直交変換する。   The difference information quantized by the process of step S308 is locally decoded as follows. That is, in step S309, the inverse quantization unit 308 performs inverse quantization on the quantized orthogonal transform coefficient (also referred to as a quantization coefficient) generated by the process in step S308 with characteristics corresponding to the characteristics of the quantization unit 305. To do. In step S310, the inverse orthogonal transform unit 309 performs inverse orthogonal transform on the orthogonal transform coefficient obtained by the process of step S307 with characteristics corresponding to the characteristics of the orthogonal transform unit 304.

ステップS311において、演算部310は、予測画像を局部的に復号された差分情報に加算し、局部的に復号された画像(演算部303への入力に対応する画像)を生成する。ステップS312においてループフィルタ311は、ステップS311の処理により得られた局部的な復号画像に対して、デブロックフィルタ処理や適応ループフィルタ処理等を含むループフィルタ処理を適宜行う。   In step S311, the calculation unit 310 adds the predicted image to the locally decoded difference information, and generates a locally decoded image (an image corresponding to an input to the calculation unit 303). In step S312, the loop filter 311 appropriately performs a loop filter process including a deblock filter process and an adaptive loop filter process on the locally decoded image obtained by the process of step S311.

ステップS313において、フレームメモリ312は、ステップS312の処理によりループフィルタ処理が施された復号画像を記憶する。なお、フレームメモリ312にはループフィルタ311によりフィルタ処理されていない画像も演算部310から供給され、記憶される。   In step S313, the frame memory 312 stores the decoded image on which the loop filter process has been performed by the process of step S312. It should be noted that an image that has not been filtered by the loop filter 311 is also supplied from the arithmetic unit 310 and stored in the frame memory 312.

ステップS314において、可逆符号化部306は、ステップS308の処理により量子化された変換係数を符号化する。すなわち、差分画像に対して、可変長符号化や算術符号化等の可逆符号化が行われる。   In step S314, the lossless encoding unit 306 encodes the transform coefficient quantized by the process in step S308. That is, lossless encoding such as variable length encoding or arithmetic encoding is performed on the difference image.

なお、可逆符号化部306は、ステップS308において算出された量子化パラメータも符号化する。また、可逆符号化部306は、ステップS305の処理により選択された予測画像のモードに関する情報等も符号化する。つまり、可逆符号化部306は、イントラ予測部314から供給される各種情報、または、動き予測・補償部315から供給される各種情報なども符号化する。さらに、可逆符号化部306は、ループフィルタ311から供給される各種情報も符号化する。可逆符号化部306は、それらの符号化データを適宜合成し、ストリームとして出力する。   Note that the lossless encoding unit 306 also encodes the quantization parameter calculated in step S308. In addition, the lossless encoding unit 306 encodes information on the mode of the predicted image selected by the processing in step S305. That is, the lossless encoding unit 306 also encodes various information supplied from the intra prediction unit 314 or various information supplied from the motion prediction / compensation unit 315. Further, the lossless encoding unit 306 encodes various information supplied from the loop filter 311. The lossless encoding unit 306 appropriately synthesizes the encoded data and outputs the result as a stream.

ステップS315において蓄積バッファ307は、可逆符号化部306から出力されるストリームを蓄積する。蓄積バッファ307に蓄積された符号化データは、適宜読み出され、伝送路や記録媒体を介して復号側に伝送される。   In step S315, the accumulation buffer 307 accumulates the stream output from the lossless encoding unit 306. The encoded data stored in the storage buffer 307 is appropriately read out and transmitted to the decoding side via a transmission path or a recording medium.

ステップS316においてレート制御部317は、ステップS315の処理により蓄積バッファ307に蓄積された符号化データの符号量(発生符号量)に基づいて、オーバーフローあるいはアンダーフローが発生しないように、量子化部305の量子化動作のレートを制御する。   In step S316, the rate control unit 317 performs quantization so that an overflow or underflow does not occur based on the code amount (generated code amount) of the encoded data accumulated in the accumulation buffer 307 by the process in step S315. Controls the rate of quantization operation.

ステップS316の処理が終了すると、符号化処理が終了される。   When the process of step S316 ends, the encoding process ends.

[イントラ予測処理の流れ]
次に、図25のフローチャートを参照して、図24のステップS303において実行されるイントラ予測処理の流れの例を説明する。
[Flow of intra prediction processing]
Next, an example of the flow of the intra prediction process executed in step S303 in FIG. 24 will be described with reference to the flowchart in FIG.

イントラ予測処理が開始されると、モード制限レベル制御部321は、ステップS321において、イントラ予測のモード制限レベルを制御する。   When the intra prediction process is started, the mode restriction level control unit 321 controls the mode restriction level of intra prediction in step S321.

ステップS322において、イントラ予測部314は、許可された各イントラ予測モードでイントラ予測を行う。ステップS323において、イントラ予測部314は、許可された各イントラ予測モードの予測結果のコスト関数値を算出する。ステップS324において、イントラ予測部314は、ステップS323において算出された各コスト関数値を比較し、値が最も小さいモードを最適イントラ予測モードとして選択する。   In step S322, the intra prediction unit 314 performs intra prediction in each permitted intra prediction mode. In step S323, the intra prediction unit 314 calculates the cost function value of the prediction result of each permitted intra prediction mode. In step S324, the intra prediction unit 314 compares the cost function values calculated in step S323, and selects the mode with the smallest value as the optimal intra prediction mode.

ステップS325において、イントラ予測部314は、最適イントラ予測モードで予測画像を生成する。   In step S325, the intra prediction unit 314 generates a prediction image in the optimal intra prediction mode.

ステップS326において、モード制限レベル制御部321の予測モード記憶部331は、ステップS324において選択された最適イントラ予測モードと、当該PUのPUサイズを記憶する。   In step S326, the prediction mode storage unit 331 of the mode restriction level control unit 321 stores the optimum intra prediction mode selected in step S324 and the PU size of the PU.

ステップS326の処理が終了すると、予測モード記憶部331は、イントラ予測処理を終了し、処理を図24のステップS303に戻し、ステップS304以降の処理を実行させる。   When the process of step S326 ends, the prediction mode storage unit 331 ends the intra prediction process, returns the process to step S303 in FIG. 24, and executes the processes after step S304.

[モード制限レベル制御処理の流れ]
次に、図26のフローチャートを参照して、図25のステップS321において実行されるモード制限レベル制御処理の流れの例を説明する。
[Flow of mode restriction level control processing]
Next, an example of the flow of the mode restriction level control process executed in step S321 in FIG. 25 will be described with reference to the flowchart in FIG.

モード制限レベル制御処理が開始されると、モード制限レベル制御部321の判定用情報生成部332は、予測モード記憶部331に記憶されている過去のイントラ予測モード(過去予測モード)およびそのPUサイズ(過去PU_Size)を読み出す。   When the mode restriction level control process is started, the determination information generation unit 332 of the mode restriction level control unit 321 includes the past intra prediction mode (past prediction mode) stored in the prediction mode storage unit 331 and its PU size. Read (Past PU_Size).

ステップS332において、判定用情報生成部332は、ステップS331において読み出した過去予測モードおよび過去PU_Sizeを用いて、適切なイントラ予測モード制限レベルを判定するための判定用情報を生成する。   In step S332, the determination information generation unit 332 generates determination information for determining an appropriate intra prediction mode restriction level using the past prediction mode and the past PU_Size read in step S331.

ステップS333において、テーブル選択部334は、ステップS332において生成された判定用情報に基づいて、つまり、過去の最適イントラ予測モードの選択結果に基づいて、イントラ予測での使用を許可するモードをPUサイズ毎に指定する、イントラ予測モード制限レベル毎のテーブル情報を選択する。つまり、テーブル選択部334は、テーブル情報を選択することにより、イントラ予測モード制限レベルを制御する。   In step S333, the table selection unit 334 sets the PU size to be used for intra prediction based on the determination information generated in step S332, that is, based on the selection result of the past optimal intra prediction mode. Select table information for each intra prediction mode restriction level specified for each. That is, the table selection unit 334 controls the intra prediction mode restriction level by selecting table information.

ステップS334において、イントラ予測モード制限レベルフラグ生成部335は、ステップS334のテーブル選択結果に応じた値のイントラ予測モード制限レベルフラグ(imode_limit_level)を生成する。   In step S334, the intra prediction mode limit level flag generation unit 335 generates an intra prediction mode limit level flag (imode_limit_level) having a value corresponding to the table selection result in step S334.

ステップS335において、許可モード決定部336は、ステップS333において選択されたテーブル情報を参照し、当該PUのPUサイズに対応するモードを、当該PUのイントラ予測において使用を許可するモードとして決定する。   In step S335, the permission mode determination unit 336 refers to the table information selected in step S333, and determines the mode corresponding to the PU size of the PU as a mode for which use is permitted in the intra prediction of the PU.

ステップS335の処理を終了すると、許可モード決定部336は、モード制限レベル制御処理を終了し、処理を図25のステップS321に戻し、ステップS322以降の処理を実行させる。   When the process of step S335 ends, the permission mode determination unit 336 ends the mode restriction level control process, returns the process to step S321 of FIG. 25, and executes the processes after step S322.

[可逆符号化処理の流れ]
次に、図27のフローチャートを参照して、図24のステップS314において実行される可逆符号化処理の流れの例を説明する。
[Flow of lossless encoding processing]
Next, an example of the flow of lossless encoding processing executed in step S314 in FIG. 24 will be described with reference to the flowchart in FIG.

可逆符号化処理が開始されると、ステップS341において、2値化部350およびエントロピ符号化部351は、量子化部305において量子化された係数データを2値化し、符号化する。また、2値化部350およびエントロピ符号化部351は、ループフィルタ311から供給されるフィルタ係数等の情報も2値化し、符号化する。   When the lossless encoding process is started, in step S341, the binarization unit 350 and the entropy encoding unit 351 binarize and encode the coefficient data quantized by the quantization unit 305. The binarization unit 350 and the entropy encoding unit 351 also binarize and encode information such as filter coefficients supplied from the loop filter 311.

ステップS342において、可逆符号化部306は、当該領域の符号化方法がイントラ予測を用いたイントラ符号化であるか否かを判定する。イントラ符号化であると判定された場合、可逆符号化部306は、処理をステップS343に進める。   In step S342, the lossless encoding unit 306 determines whether or not the encoding method of the area is intra encoding using intra prediction. If it is determined that the encoding is intra coding, the lossless encoding unit 306 advances the processing to step S343.

ステップS343において、イントラ予測モード記憶部341乃至エントロピ符号化部347は、イントラ予測モード情報符号化処理を行う。イントラ予測モード情報符号化処理が終了すると、イントラ予測モード記憶部341乃至エントロピ符号化部347は、処理をステップS345に進める。   In step S343, the intra prediction mode storage unit 341 to the entropy encoding unit 347 perform intra prediction mode information encoding processing. When the intra prediction mode information encoding process ends, the intra prediction mode storage unit 341 through the entropy encoding unit 347 advance the process to step S345.

また、ステップS342において、当該領域の符号化方法がインター予測を用いたインター符号化であると判定された場合、可逆符号化部306は、処理をステップS344に進める。   Also, in step S342, when it is determined that the encoding method of the region is inter encoding using inter prediction, the lossless encoding unit 306 advances the processing to step S344.

ステップS344において、2値化部348およびエントロピ符号化部349は、動き予測・補償部315から供給される予測モード情報等を2値化し、符号化する。ステップS344の処理が終了すると、2値化部348およびエントロピ符号化部349は、処理をステップS345に進める。   In step S344, the binarization unit 348 and the entropy encoding unit 349 binarize and encode the prediction mode information and the like supplied from the motion prediction / compensation unit 315. When the process of step S344 ends, the binarization unit 348 and the entropy encoding unit 349 advance the process to step S345.

ステップS345において、合成部352は、各符号化データを合成し、ストリームを生成する。ステップS345の処理が終了すると、合成部352は、可逆符号化処理を終了し、処理を図24のステップS314に戻し、ステップS315以降の処理を実行させる。   In step S345, the synthesizing unit 352 synthesizes the encoded data and generates a stream. When the process of step S345 ends, the synthesizing unit 352 ends the lossless encoding process, returns the process to step S314 of FIG. 24, and executes the processes after step S315.

[イントラ予測モード情報符号化処理の流れ]
次に、図28および図29のフローチャートを参照して、図27のステップS343において実行されるイントラ予測モード情報符号化処理の流れの例を説明する。
[Flow of intra prediction mode information encoding process]
Next, an example of the flow of the intra prediction mode information encoding process executed in step S343 in FIG. 27 will be described with reference to the flowcharts in FIGS.

イントラ予測モード情報符号化処理が開始されると、ステップS351において、MPM算出部342は、周辺予測モード情報からMPMを求める。ステップS352において、可逆符号化部306、最適イントラ予測モードを指定する予測モード情報をイントラ予測部314から取得する。   When the intra prediction mode information encoding process is started, in step S351, the MPM calculation unit 342 obtains an MPM from the peripheral prediction mode information. In step S <b> 352, the lossless encoding unit 306 and the prediction mode information specifying the optimal intra prediction mode are acquired from the intra prediction unit 314.

ステップS353において、イントラ予測モード記憶部341は、ステップS342において取得された予測モード情報を記憶する。この情報は、現在より時間的に後の他のPUについての処理において、周辺予測モード情報として使用される。   In step S353, the intra prediction mode storage unit 341 stores the prediction mode information acquired in step S342. This information is used as the peripheral prediction mode information in processing for other PUs later in time than the current time.

ステップS354において、比較部343は、ステップS351において算出されたMPMと、ステップS352において取得された予測モード情報が示す最適イントラ予測モードとを比較し、両者が一致するか否かを判定する。   In step S354, the comparison unit 343 compares the MPM calculated in step S351 with the optimal intra prediction mode indicated by the prediction mode information acquired in step S352, and determines whether or not they match.

一致すると判定した場合、比較部343は、処理をステップS355に進める。ステップS355において、比較部343は、MPMを採用するか否かを示すフラグ情報であるprev_intra_luma_pred_flagを生成し、その値を1に設定する。   If it is determined that they match, the comparison unit 343 advances the processing to step S355. In step S355, the comparison unit 343 generates prev_intra_luma_pred_flag that is flag information indicating whether or not to employ MPM, and sets the value to 1.

ステップS356において、エントロピ符号化部347は、ステップS355において生成されたprev_intra_luma_pred_flagを符号化する。ステップS356の処理が終了すると、エントロピ符号化部347は、イントラ予測モード情報符号化処理を終了し、処理を図27のステップS343に戻し、ステップS345以降の処理を実行させる。   In step S356, the entropy encoding unit 347 encodes prev_intra_luma_pred_flag generated in step S355. When the process of step S356 ends, the entropy encoding unit 347 ends the intra prediction mode information encoding process, returns the process to step S343 of FIG. 27, and executes the processes after step S345.

また、図28のステップS354において、MPMと最適イントラ予測モードとが一致しないと判定された場合、比較部343は、処理を図29のステップS361に進める。   If it is determined in step S354 in FIG. 28 that the MPM and the optimal intra prediction mode do not match, the comparison unit 343 advances the processing to step S361 in FIG.

ステップS361において、比較部343は、MPMを採用するか否かを示すフラグ情報であるprev_intra_luma_pred_flagを生成し、その値を0に設定する。   In step S361, the comparison unit 343 generates prev_intra_luma_pred_flag that is flag information indicating whether or not to employ MPM, and sets the value to 0.

ステップS362において、比較部343は、イントラ予測モードの番号がMPMの番号以上であるか否かを判定し、イントラ予測モードの番号がMPMの番号以上であると判定された場合、処理をステップS363に進める。ステップS363において、2値化部346は、イントラ予測モード情報の値(最適イントラ予測モードに指定されるイントラ予測モードの番号)を1減算し、処理をステップS364に進める。   In step S362, the comparison unit 343 determines whether the intra prediction mode number is greater than or equal to the MPM number. If it is determined that the intra prediction mode number is greater than or equal to the MPM number, the process proceeds to step S363. Proceed to In step S363, the binarization unit 346 subtracts 1 from the value of the intra prediction mode information (the number of the intra prediction mode designated as the optimal intra prediction mode), and the process proceeds to step S364.

また、ステップS362において、イントラ予測モードの番号がMPMの番号より小さいと判定された場合、比較部343は、処理をステップS364に進める。   If it is determined in step S362 that the intra prediction mode number is smaller than the MPM number, the comparison unit 343 advances the process to step S364.

ステップS364において、符号長決定部345は、モード制限レベル制御部321から供給されたイントラ予測モード制限レベルフラグ(imode_limit_level)の値が1であるか否かを判定する。イントラ予測モード制限レベルフラグ(imode_limit_level)の値が1であり、イントラ予測においてモードの制限が行われたと判定された場合、処理をステップS365に進める。   In step S364, the code length determination unit 345 determines whether the value of the intra prediction mode limit level flag (imode_limit_level) supplied from the mode limit level control unit 321 is 1. When the value of the intra prediction mode limit level flag (imode_limit_level) is 1, and it is determined that the mode is limited in the intra prediction, the process proceeds to step S365.

ステップS365において、符号長決定部345は、テーブル記憶部344よりイントラ予測モード制限レベルが1(imode_limit_level = 1)のテーブル情報を取得し、そのテーブル情報に基づいて、当該PUのPUサイズに応じた2値化の符号長(Bin数)を決定する。   In step S365, the code length determination unit 345 obtains table information with an intra prediction mode restriction level of 1 (imode_limit_level = 1) from the table storage unit 344, and according to the PU size of the PU based on the table information. The binarization code length (number of bins) is determined.

ステップS366において、2値化部346は、ステップS365において決定された符号長(Bin数)で、予測モード情報(イントラ予測モードの番号)を2値化する。なお、ステップS363において予測モード情報の値が1減算されている場合、2値化部346は、その減算後の値を2値化する。   In step S366, the binarization unit 346 binarizes the prediction mode information (intra prediction mode number) with the code length (number of bins) determined in step S365. If the value of the prediction mode information is subtracted by 1 in step S363, the binarization unit 346 binarizes the value after the subtraction.

ステップS367において、エントロピ符号化部347は、ステップS366において予測モード情報が2値化されて得られた2値データをエントロピ符号化する。ステップS368において、エントロピ符号化部347は、イントラ予測モード制限レベルフラグ(imode_limit_level)を符号化する。ステップS368の処理が終了すると、エントロピ符号化部347は、処理を図28のステップS356に戻し、それ以降の処理を繰り返す。   In step S367, the entropy encoding unit 347 entropy encodes binary data obtained by binarizing the prediction mode information in step S366. In step S368, the entropy encoding unit 347 encodes the intra prediction mode restriction level flag (imode_limit_level). When the process of step S368 ends, the entropy encoding unit 347 returns the process to step S356 of FIG. 28 and repeats the subsequent processes.

また、図29のステップS364において、イントラ予測モード制限レベルフラグの値が0(imode_limit_level = 0)であり、イントラ予測においてモードの制限が行われなかったと判定された場合、処理をステップS369に進める。   Also, in step S364 of FIG. 29, if it is determined that the value of the intra prediction mode restriction level flag is 0 (imode_limit_level = 0) and no mode restriction has been performed in intra prediction, the process proceeds to step S369.

ステップS369において、2値化部346は、イントラ予測モードの番号が31より小さいか否かを判定し、小さいと判定された場合、処理をステップS370に進める。   In step S369, the binarization unit 346 determines whether or not the intra prediction mode number is smaller than 31, and if it is determined that the number is smaller, the process proceeds to step S370.

ステップS370において、符号長決定部345は、テーブル記憶部344よりイントラ予測モード制限レベルが0(imode_limit_level = 0)のテーブル情報を取得し、そのテーブル情報に基づいて、当該PUのPUサイズに応じた2値化の符号長(Bin数)を決定する。   In step S370, the code length determination unit 345 acquires table information with an intra prediction mode restriction level of 0 (imode_limit_level = 0) from the table storage unit 344, and according to the PU size of the PU based on the table information. The binarization code length (number of bins) is determined.

ステップS370の処理が終了すると、符号長決定部345は、処理をステップS366に戻し、それ以降の処理を実行させる。つまり、イントラ予測モード制限レベルが0のテーブル情報に基づいて決定された符号長によって予測モード情報を2値化させ、その2値データをエントロピ符号化させる。   When the process of step S370 ends, the code length determination unit 345 returns the process to step S366 and causes the subsequent processes to be executed. That is, the prediction mode information is binarized by the code length determined based on the table information whose intra prediction mode restriction level is 0, and the binary data is entropy encoded.

また、ステップS369において、イントラ予測モードの番号が31以上であると判定された場合、2値化部346は、処理をステップS371に進める。   In Step S369, when it is determined that the intra prediction mode number is 31 or more, the binarization unit 346 advances the processing to Step S371.

ステップS371において、2値化部346は、イントラ予測モードの2値化結果として2値コード「11111」を設定し、エントロピ符号化部347は、その2値コードをエントロピ符号化する。さらに、2値化部346は、イントラ予測モードの番号が31なら値「0」をイントラ予測モードの2値化結果(2値コード)に追加し、イントラ予測モードの番号が32なら値「1」をイントラ予測モードの2値化結果(2値コード)に追加する。つまり、エントロピ符号化部347は、イントラ予測モードの番号が31なら値「0」をさらに符号化し、イントラ予測モードの番号が32なら値「1」をさらに符号化する。   In step S371, the binarization unit 346 sets the binary code “11111” as the binarization result of the intra prediction mode, and the entropy encoding unit 347 performs entropy encoding on the binary code. Further, the binarization unit 346 adds the value “0” to the binarization result (binary code) of the intra prediction mode if the number of the intra prediction mode is 31, and the value “1” if the number of the intra prediction mode is 32. Is added to the binarization result (binary code) of the intra prediction mode. That is, the entropy encoding unit 347 further encodes the value “0” if the intra prediction mode number is 31, and further encodes the value “1” if the intra prediction mode number is 32.

ステップS371の処理を終了すると、エントロピ符号化部347は、処理をステップS368に戻し、それ以降の処理を実行させる。   When the process of step S371 ends, the entropy encoding unit 347 returns the process to step S368 and causes the subsequent processes to be executed.

以上のように各処理を実行することにより、モード制限レベル制御部321は、イントラ予測モードのモード数を、不要に増大させないように、例えば画像の内容等に応じて適応的に制御する。これによりイントラ予測部314は、イントラ予測において、最適イントラ予測モードとして採用される見込みのない不要なモードの処理(冗長な処理)の増大を抑制させることができ、イントラ予測の負荷を低減させることができる。   By executing each process as described above, the mode restriction level control unit 321 adaptively controls, for example, according to the content of the image so as not to unnecessarily increase the number of modes of the intra prediction mode. As a result, the intra prediction unit 314 can suppress an increase in unnecessary mode processing (redundant processing) that is not expected to be adopted as the optimal intra prediction mode in intra prediction, and reduce the intra prediction load. Can do.

そして、可逆符号化部306は、そのモード数の制御に応じて、予測モード情報に割り当てる2値化の符号長を適応的に制御する。これにより、可逆符号化部306は、符号量の不要な増大を抑制し、符号化効率を向上させることができる。   Then, the lossless encoding unit 306 adaptively controls the binarized code length assigned to the prediction mode information in accordance with the control of the number of modes. Thereby, the lossless encoding part 306 can suppress the unnecessary increase in code amount, and can improve encoding efficiency.

また、イントラ予測モードを適応的に制限するので、画像符号化装置300は、イントラ予測の負荷を低減することもできる。   In addition, since the intra prediction mode is adaptively limited, the image coding apparatus 300 can also reduce the intra prediction load.

[モード制限レベルの選択]
以上においては、過去に処理された所定の範囲内の一部若しくは全部の予測結果(最適イントラ予測モード)に基づいて、当該PUのイントラ予測モードと符号長の制御を行うように説明したが、これに限らず、現在の処理対象を含む所定の範囲内の一部若しくは全部の予測結果(最適イントラ予測モード)に基づいて、当該PUのイントラ予測モードと符号長の制御を行うようにしてもよい。
[Select mode restriction level]
In the above, based on some or all prediction results (optimum intra prediction mode) within a predetermined range processed in the past, it has been described to control the intra prediction mode and code length of the PU, Not limited to this, the intra prediction mode and code length of the PU may be controlled based on a part or all of the prediction results (optimum intra prediction mode) within a predetermined range including the current processing target. Good.

図30は、図19のモード制限レベル制御部321の他の構成例を示すブロック図である。図30の例の場合、モード制限レベル制御部321は、図20の例の場合の構成に加え、イントラ予測制御部361を有する。   30 is a block diagram showing another configuration example of the mode restriction level control unit 321 in FIG. In the case of the example in FIG. 30, the mode restriction level control unit 321 includes an intra prediction control unit 361 in addition to the configuration in the example in FIG.

イントラ予測制御部361は、テーブル記憶部333に記憶されているテーブル情報を取得し、各イントラ予測モード制限レベルでイントラ予測部314にイントラ予測を実行させる。   The intra prediction control unit 361 acquires table information stored in the table storage unit 333, and causes the intra prediction unit 314 to execute intra prediction at each intra prediction mode restriction level.

イントラ予測部314は、イントラ予測制御部361に制御されて各モードでイントラ予測を行い、そのイントラ予測結果(最適イントラ予測モードとそのときのPUサイズ(PU_Size))をモード制限レベル制御部321に供給する。   The intra prediction unit 314 is controlled by the intra prediction control unit 361 to perform intra prediction in each mode, and the intra prediction result (optimum intra prediction mode and PU size (PU_Size) at that time) is sent to the mode restriction level control unit 321. Supply.

予測モード記憶部331は、イントラ予測部314から供給されるイントラ予測結果を記憶する。判定用情報生成部332は、予測モード記憶部331に記憶される各イントラ予測モード制限レベルのイントラ予測結果(予測モードおよびPUサイズ)を取得し、それに基づいて判定用情報を生成する。テーブル選択部334は、その判定情報に基づいてテーブル情報(イントラ予測モード制限レベル)を選択する。   The prediction mode storage unit 331 stores the intra prediction result supplied from the intra prediction unit 314. The determination information generation unit 332 acquires the intra prediction results (prediction mode and PU size) of each intra prediction mode restriction level stored in the prediction mode storage unit 331, and generates determination information based thereon. The table selection unit 334 selects table information (intra prediction mode restriction level) based on the determination information.

このように処理対象の画像を用いてイントラ予測モード制限レベルの選択を行うことにより、モード制限レベル制御部321は、イントラ予測モード制限レベルの選択をより適切に行うことができる。これにより、画像符号化装置300は、符号化効率をより向上させることができる。   Thus, by selecting the intra prediction mode restriction level using the processing target image, the mode restriction level control unit 321 can more appropriately select the intra prediction mode restriction level. Thereby, the image coding apparatus 300 can further improve the coding efficiency.

この場合の各処理の流れは、基本的に上述した例と同様に行われる。ただし、イントラ予測処理において、図25のステップS326の処理は省略される。また、モード制限レベル制御処理は、以下に説明するように実行される。   The flow of each process in this case is basically performed in the same manner as the above-described example. However, in the intra prediction process, the process of step S326 in FIG. 25 is omitted. The mode restriction level control process is executed as described below.

図30のフローチャートを参照して、モード制限レベル制御処理の流れの他の例を説明する。   Another example of the flow of the mode restriction level control process will be described with reference to the flowchart of FIG.

この場合、ステップS381において、イントラ予測制御部361は、図26のステップS331の代わりに、イントラ予測部314を制御し、処理対象範囲について、全制限レベルでイントラ予測させ、最適イントラ予測モードとPUサイズを求めさせる。   In this case, in step S381, instead of step S331 in FIG. 26, the intra prediction control unit 361 controls the intra prediction unit 314 to perform intra prediction at all restriction levels for the processing target range, so that the optimal intra prediction mode and PU Ask for size.

ステップS382乃至ステップS385の各処理は、図381の処理結果を用いて、図26のステップS332乃至ステップS335の各処理と同様に実行される。   Each process of step S382 to step S385 is performed in the same manner as each process of step S332 to step S335 of FIG. 26 using the processing result of FIG.

このように各処理が行われることにより、画像符号化装置300は、符号化効率をより向上させることができる。   By performing each process in this way, the image encoding device 300 can further improve the encoding efficiency.

なお、モード制限レベルの選択の基準は任意である。すなわち、判定情報はどのような情報であってもよい。例えば、各制限レベルにおいて、最適イントラ予測モードに選択されたモードの種類の数をPUサイズ毎にカウントした統計値であってもよい。また、各制限レベルにおける最適イントラ予測モードのRDコスト関数値であってもよい。もちろん、これら以外であってもよい。   The standard for selecting the mode restriction level is arbitrary. That is, the determination information may be any information. For example, at each restriction level, a statistical value obtained by counting the number of types of modes selected as the optimal intra prediction mode for each PU size may be used. Further, it may be an RD cost function value of the optimum intra prediction mode at each restriction level. Of course, other than these may be used.

また、イントラ予測モード制限レベルの制御は、任意の処理単位毎に行うようにしてもよい。例えば、上述したスライス単位の他に、シーケンスやピクチャ毎に制御するようにしてもよい。例えば、シーケンス毎にイントラ予測モード制限レベルが制御される場合、イントラ予測モード制限レベルフラグは、SPSに格納される。また、例えば、ピクチャ毎にイントラ予測モード制限レベルが制御される場合、イントラ予測モード制限レベルフラグは、PPSに格納される。   Also, the control of the intra prediction mode restriction level may be performed for each arbitrary processing unit. For example, in addition to the above-described slice unit, control may be performed for each sequence or picture. For example, when the intra prediction mode restriction level is controlled for each sequence, the intra prediction mode restriction level flag is stored in the SPS. For example, when the intra prediction mode restriction level is controlled for each picture, the intra prediction mode restriction level flag is stored in the PPS.

また、以上においては、テーブル情報を選択することによりイントラ予測モード制限レベルの選択が行われるように説明したが、これに限らず、PUサイズ毎に互いに独立して、イントラ予測モード制限レベルの選択が行われるようにしてもよい。つまり、上述したテーブル情報の一部の項目(PUサイズ)についてのみ、モード数やBin数が更新されるようにしてもよい。   In the above description, the intra prediction mode restriction level is selected by selecting the table information. However, the present invention is not limited to this, and the intra prediction mode restriction level is selected independently for each PU size. May be performed. That is, the mode number and the Bin number may be updated only for some items (PU size) of the table information described above.

さらに、以上においてはイントラ予測モード制限レベルは、0と1の2つのみとして説明したが、3段階以上であってももちろんよい。つまり、イントラ予測モードの制限が、複数段階あってもよい。   Furthermore, in the above description, the intra prediction mode restriction level has been described as only two of 0 and 1, but it may of course have three or more levels. That is, the intra prediction mode may be limited in a plurality of stages.

図32は、図21および図22のテーブル情報に対応する、PUサイズ毎にイントラ予測での使用を許可するモードを指定するテーブル情報である。   FIG. 32 is table information for designating a mode that permits use in intra prediction for each PU size, corresponding to the table information in FIGS. 21 and 22.

図32の例のテーブル情報のイントラ予測モード制限レベルは2(imode_limit_leve = 2)である。この制限レベルの場合、PUサイズが8×8(PU_8×8)のPUにおいては、イントラ予測モードは9種類に制限される。そして、2値化の符号長として3Binが割り当てられる。   The intra prediction mode restriction level of the table information in the example of FIG. 32 is 2 (imode_limit_leve = 2). In the case of this restriction level, the intra prediction mode is limited to nine types in a PU having a PU size of 8 × 8 (PU_8 × 8). Then, 3Bin is assigned as the binarization code length.

このように多様な制限レベルを用意することにより、画像符号化装置300は、符号化効率やイントラ予測の負荷の低減をより適切に行うことができる。   By preparing various restriction levels in this way, the image coding apparatus 300 can more appropriately reduce the coding efficiency and the load of intra prediction.

[画像復号装置]
図33は、本実施の画像復号装置の主な構成例を示すブロック図である。図33に示される画像復号装置400は、図19の画像符号化装置300に対応する復号装置である。画像符号化装置300より符号化された符号化データは、例えば伝送路や記録媒体等、任意の経路を介して、この画像復号装置400に供給され、復号される。
[Image decoding device]
FIG. 33 is a block diagram illustrating a main configuration example of the image decoding apparatus according to the present embodiment. An image decoding apparatus 400 shown in FIG. 33 is a decoding apparatus corresponding to the image encoding apparatus 300 in FIG. The encoded data encoded by the image encoding device 300 is supplied to the image decoding device 400 via an arbitrary path such as a transmission path or a recording medium, and is decoded.

図33に示されるように、画像復号装置400は、蓄積バッファ401、可逆復号部402、逆量子化部403、逆直交変換部404、演算部405、ループフィルタ406、画面並べ替えバッファ407、およびD/A変換部408を有する。また、画像復号装置400は、フレームメモリ409、選択部410、イントラ予測部411、動き予測・補償部412、および選択部413を有する。   As shown in FIG. 33, the image decoding apparatus 400 includes a storage buffer 401, a lossless decoding unit 402, an inverse quantization unit 403, an inverse orthogonal transform unit 404, a calculation unit 405, a loop filter 406, a screen rearrangement buffer 407, and A D / A converter 408 is included. The image decoding apparatus 400 includes a frame memory 409, a selection unit 410, an intra prediction unit 411, a motion prediction / compensation unit 412, and a selection unit 413.

蓄積バッファ401は、伝送されてきた符号化データを蓄積する。この符号化データは、画像符号化装置300により符号化されたものである。可逆復号部402は、蓄積バッファ401から符号化データを所定のタイミングで読み出し、図19の可逆符号化部306の符号化方式に対応する方式で復号する。   The accumulation buffer 401 accumulates the transmitted encoded data. This encoded data is encoded by the image encoding device 300. The lossless decoding unit 402 reads the encoded data from the accumulation buffer 401 at a predetermined timing, and decodes the encoded data by a method corresponding to the encoding method of the lossless encoding unit 306 in FIG.

また、当該フレームがイントラ符号化されたものである場合、符号化データのヘッダ部にはイントラ予測モード情報が格納されている。可逆復号部402は、このイントラ予測モード情報も復号し、その情報をイントラ予測部411に供給する。   When the frame is intra-coded, intra prediction mode information is stored in the header portion of the encoded data. The lossless decoding unit 402 also decodes the intra prediction mode information and supplies the information to the intra prediction unit 411.

このとき、可逆復号部402は、画像符号化装置300から供給されるイントラ予測モード制限レベルフラグの値に基づいて(つまり、符号化の際に採用されたイントラ予測モード制限レベルに基づいて)、イントラ予測モード情報の2値データの符号長を特定する。これにより可逆復号部402は、イントラ予測モード情報をより正確に復号することができる。   At this time, the lossless decoding unit 402 is based on the value of the intra prediction mode restriction level flag supplied from the image coding apparatus 300 (that is, based on the intra prediction mode restriction level adopted at the time of encoding). The code length of the binary data of the intra prediction mode information is specified. Thereby, the lossless decoding part 402 can decode intra prediction mode information more correctly.

また、当該フレームがインター符号化されたものである場合、符号化データのヘッダ部には動きベクトル情報やインター予測モード情報が格納されている。可逆復号部402は、この動きベクトル情報やインター予測モード情報も復号し、その情報を動き予測・補償部412に供給する。   When the frame is inter-coded, motion vector information and inter prediction mode information are stored in the header portion of the encoded data. The lossless decoding unit 402 also decodes the motion vector information and inter prediction mode information, and supplies the information to the motion prediction / compensation unit 412.

逆量子化部403は、可逆復号部402により復号されて得られた係数データ(量子化係数)を、図19の量子化部305の量子化方式に対応する方式で逆量子化する。つまり、逆量子化部403は、図19の逆量子化部308と同様の方法で量子化係数の逆量子化を行う。   The inverse quantization unit 403 performs inverse quantization on the coefficient data (quantization coefficient) obtained by decoding by the lossless decoding unit 402 using a method corresponding to the quantization method of the quantization unit 305 in FIG. That is, the inverse quantization unit 403 performs inverse quantization of the quantization coefficient by the same method as the inverse quantization unit 308 in FIG.

逆量子化部403は、逆量子化された係数データ、つまり、直交変換係数を、逆直交変換部404に供給する。逆直交変換部404は、図19の直交変換部304の直交変換方式に対応する方式(図19の逆直交変換部309と同様の方式)で、その直交変換係数を逆直交変換する。逆直交変換部404は、この逆直交変換処理により、画像符号化装置300において直交変換される前の残差データに対応する復号残差データを得る。例えば、4次の逆直交変換が施される。   The inverse quantization unit 403 supplies the inversely quantized coefficient data, that is, the orthogonal transform coefficient, to the inverse orthogonal transform unit 404. The inverse orthogonal transform unit 404 performs inverse orthogonal transform on the orthogonal transform coefficient by a method corresponding to the orthogonal transform method of the orthogonal transform unit 304 of FIG. 19 (the same method as the inverse orthogonal transform unit 309 of FIG. 19). The inverse orthogonal transform unit 404 obtains decoded residual data corresponding to the residual data before being orthogonally transformed in the image encoding device 300 by the inverse orthogonal transform process. For example, fourth-order inverse orthogonal transform is performed.

逆直交変換されて得られた復号残差データは、演算部405に供給される。また、演算部405には、選択部413を介して、イントラ予測部411若しくは動き予測・補償部412から予測画像が供給される。   The decoded residual data obtained by the inverse orthogonal transform is supplied to the calculation unit 405. In addition, a prediction image is supplied from the intra prediction unit 411 or the motion prediction / compensation unit 412 to the calculation unit 405 via the selection unit 413.

演算部405は、その復号残差データと予測画像とを加算し、画像符号化装置300の演算部303により予測画像が減算される前の画像データに対応する復号画像データを得る。演算部405は、その復号画像データをループフィルタ406に供給する。   The calculation unit 405 adds the decoded residual data and the prediction image, and obtains decoded image data corresponding to the image data before the prediction image is subtracted by the calculation unit 303 of the image encoding device 300. The arithmetic unit 405 supplies the decoded image data to the loop filter 406.

ループフィルタ406は、供給された復号画像に対して、デブロックフィルタ処理や適応ループフィルタ処理等を含むループフィルタ処理を適宜施し、それを画面並べ替えバッファ407に供給する。   The loop filter 406 appropriately performs a loop filter process including a deblock filter process and an adaptive loop filter process on the supplied decoded image, and supplies it to the screen rearrangement buffer 407.

ループフィルタ406は、デブロックフィルタや適応ループフィルタ等を含み、演算部405から供給される復号画像に対して適宜フィルタ処理を行う。例えば、ループフィルタ406は、復号画像に対してデブロックフィルタ処理を行うことにより復号画像のブロック歪を除去する。また、例えば、ループフィルタ406は、そのデブロックフィルタ処理結果(ブロック歪みの除去が行われた復号画像)に対して、ウィナーフィルタ(Wiener Filter)を用いてループフィルタ処理を行うことにより画質改善を行う。   The loop filter 406 includes a deblock filter, an adaptive loop filter, and the like, and appropriately performs a filtering process on the decoded image supplied from the calculation unit 405. For example, the loop filter 406 removes block distortion of the decoded image by performing a deblocking filter process on the decoded image. Further, for example, the loop filter 406 performs image quality improvement by performing loop filter processing using a Wiener filter on the deblock filter processing result (decoded image from which block distortion has been removed). Do.

なお、ループフィルタ406が、復号画像に対して任意のフィルタ処理を行うようにしてもよい。また、ループフィルタ406が、図19の画像符号化装置300から供給されたフィルタ係数を用いてフィルタ処理を行うようにしてもよい。   Note that the loop filter 406 may perform arbitrary filter processing on the decoded image. Further, the loop filter 406 may perform filter processing using the filter coefficient supplied from the image encoding device 300 in FIG.

ループフィルタ406は、フィルタ処理結果(フィルタ処理後の復号画像)を画面並べ替えバッファ407およびフレームメモリ409に供給する。なお、演算部405から出力される復号画像は、ループフィルタ406を介さずに画面並べ替えバッファ407やフレームメモリ409に供給することができる。つまり、ループフィルタ406によるフィルタ処理は省略することができる。   The loop filter 406 supplies the filter processing result (the decoded image after the filter processing) to the screen rearrangement buffer 407 and the frame memory 409. Note that the decoded image output from the calculation unit 405 can be supplied to the screen rearrangement buffer 407 and the frame memory 409 without passing through the loop filter 406. That is, the filter process by the loop filter 406 can be omitted.

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

フレームメモリ409は、供給される復号画像を記憶し、所定のタイミングにおいて、若しくは、イントラ予測部411や動き予測・補償部412等の外部の要求に基づいて、記憶している復号画像を参照画像として、選択部410に供給する。   The frame memory 409 stores the supplied decoded image, and the stored decoded image is a reference image at a predetermined timing or based on an external request from the intra prediction unit 411, the motion prediction / compensation unit 412, or the like. Is supplied to the selection unit 410.

選択部410は、フレームメモリ409から供給される参照画像の供給先を選択する。選択部410は、イントラ符号化された画像を復号する場合、フレームメモリ409から供給される参照画像をイントラ予測部411に供給する。また、選択部410は、インター符号化された画像を復号する場合、フレームメモリ409から供給される参照画像を動き予測・補償部412に供給する。   The selection unit 410 selects a reference image supply destination supplied from the frame memory 409. The selection unit 410 supplies the reference image supplied from the frame memory 409 to the intra prediction unit 411 when decoding an intra-coded image. The selection unit 410 also supplies the reference image supplied from the frame memory 409 to the motion prediction / compensation unit 412 when decoding an inter-coded image.

イントラ予測部411には、ヘッダ情報を復号して得られたイントラ予測モードを示す情報等が可逆復号部402から適宜供給される。イントラ予測部411は、図19のイントラ予測部314において用いられたイントラ予測モードで、フレームメモリ409から取得した参照画像を用いてイントラ予測を行い、予測画像を生成する。   Information indicating the intra prediction mode obtained by decoding the header information is appropriately supplied from the lossless decoding unit 402 to the intra prediction unit 411. The intra prediction unit 411 performs intra prediction using the reference image acquired from the frame memory 409 in the intra prediction mode used in the intra prediction unit 314 in FIG. 19, and generates a predicted image.

イントラ予測部411は、生成した予測画像を選択部413に供給する。   The intra prediction unit 411 supplies the generated predicted image to the selection unit 413.

動き予測・補償部412は、ヘッダ情報を復号して得られた情報(最適モード情報、動きベクトル情報、参照フレーム情報、フラグ、および各種パラメータ等)を可逆復号部402から取得する。   The motion prediction / compensation unit 412 acquires information (optimum mode information, motion vector information, reference frame information, flags, various parameters, and the like) obtained by decoding the header information from the lossless decoding unit 402.

動き予測・補償部412は、図19の動き予測・補償部315において用いられたインター予測モードで、フレームメモリ409から取得した参照画像を用いてインター予測を行い、予測画像を生成する。つまり、動き予測・補償部412は、動き予測・補償部315と同様に、AVC符号化方式において規定されるモード以外の任意のモードでこのイントラ予測を行うこともできる。   The motion prediction / compensation unit 412 performs inter prediction using the reference image acquired from the frame memory 409 in the inter prediction mode used in the motion prediction / compensation unit 315 in FIG. 19, and generates a predicted image. That is, similarly to the motion prediction / compensation unit 315, the motion prediction / compensation unit 412 can also perform this intra prediction in an arbitrary mode other than the mode defined in the AVC encoding method.

動き予測・補償部412は、動き予測・補償部212の場合と同様に、生成した予測画像を選択部413に供給する。   Similar to the motion prediction / compensation unit 212, the motion prediction / compensation unit 412 supplies the generated predicted image to the selection unit 413.

選択部413は、演算部405に供給する予測画像の供給元を選択する。つまり、選択部413は、動き予測・補償部412またはイントラ予測部411により生成された予測画像を演算部405に供給する。   The selection unit 413 selects a supply source of the predicted image supplied to the calculation unit 405. That is, the selection unit 413 supplies the prediction image generated by the motion prediction / compensation unit 412 or the intra prediction unit 411 to the calculation unit 405.

[可逆復号部]
図34は、図33の可逆復号部402の主な構成例を示すブロック図である。図34に示されるように、可逆復号部402は、エントロピ復号部421、逆2値化部422、イントラ予測モード記憶部423、MPM算出部424、テーブル記憶部425、および符号長決定部426を有する。
[Reversible decoding unit]
FIG. 34 is a block diagram illustrating a main configuration example of the lossless decoding unit 402 of FIG. As shown in FIG. 34, the lossless decoding unit 402 includes an entropy decoding unit 421, an inverse binarization unit 422, an intra prediction mode storage unit 423, an MPM calculation unit 424, a table storage unit 425, and a code length determination unit 426. Have.

エントロピ復号部421は、蓄積バッファ401から供給される符号化データを復号し、その2値データを逆2値化部422に供給する。   The entropy decoding unit 421 decodes the encoded data supplied from the accumulation buffer 401 and supplies the binary data to the inverse binarization unit 422.

また、エントロピ復号部421は、prev_intra_luma_pred_flagを復号し、それをMPM算出部424に供給する。さらに、エントロピ復号部421は、イントラ予測モード制限レベルフラグ(imode_limit_level)とPUサイズ(PU_Size)を復号し、それらを符号長決定部426に供給する。   Also, the entropy decoding unit 421 decodes prev_intra_luma_pred_flag and supplies it to the MPM calculation unit 424. Furthermore, the entropy decoding unit 421 decodes the intra prediction mode restriction level flag (imode_limit_level) and the PU size (PU_Size), and supplies them to the code length determination unit 426.

逆2値化部422は、エントロピ復号部421から供給される2値データを逆2値化する。例えば、逆2値化部422は、量子化された差分画像データの係数データの2値データを逆2値化し、得られた係数データを逆量子化部403に供給する。また、図示は省略するが、逆2値化部422は、フィルタ係数等のループフィルタに関する情報の2値データを逆2値化し、得られたループフィルタに関する情報をループフィルタ406に供給する。   The inverse binarization unit 422 reverse-binarizes the binary data supplied from the entropy decoding unit 421. For example, the inverse binarization unit 422 performs inverse binarization on the binary data of the coefficient data of the quantized difference image data, and supplies the obtained coefficient data to the inverse quantization unit 403. Although not shown, the inverse binarization unit 422 performs inverse binarization on binary data of information relating to the loop filter such as a filter coefficient, and supplies the obtained information relating to the loop filter to the loop filter 406.

さらに、例えば逆2値化部422は、インター予測モード情報の2値データを逆2値化し、得られたインター予測モード情報を動き予測・補償部412に供給する。   Further, for example, the inverse binarization unit 422 debinarizes the binary data of the inter prediction mode information, and supplies the obtained inter prediction mode information to the motion prediction / compensation unit 412.

さらに、例えば、逆2値化部422は、イントラ予測モード情報の2値データを逆2値化する。その際、逆2値化部422は、画像符号化装置300から供給されるイントラ予測モード制限レベルフラグの値に基づいて(つまり、符号化の際に採用されたイントラ予測モード制限レベルに基づいて)決定された符号長で逆2値化を行う。逆2値化部422は、得られたイントラ予測モード情報をイントラ予測部411に供給する。   Further, for example, the inverse binarization unit 422 performs inverse binarization on the binary data of the intra prediction mode information. At that time, the inverse binarization unit 422 is based on the value of the intra prediction mode restriction level flag supplied from the image coding apparatus 300 (that is, based on the intra prediction mode restriction level adopted at the time of coding). ) Inverse binarization is performed with the determined code length. The inverse binarization unit 422 supplies the obtained intra prediction mode information to the intra prediction unit 411.

イントラ予測モード記憶部423は、逆2値化部422の逆2値化により得られた当該PUのイントラ予測モード情報や、MPM算出部424において生成された当該PUのMPM情報を記憶する。これらの情報は、現在より時間的に後に行われる他の領域に対する処理において、処理対象領域の周辺の領域のイントラ予測モードを示す周辺予測モード情報としてMPM算出部424に供給される。   The intra prediction mode storage unit 423 stores the intra prediction mode information of the PU obtained by the inverse binarization of the inverse binarization unit 422 and the MPM information of the PU generated by the MPM calculation unit 424. These pieces of information are supplied to the MPM calculation unit 424 as the peripheral prediction mode information indicating the intra prediction mode of the region around the processing target region in the processing for another region that is performed after the current time.

MPM算出部424は、prev_intra_luma_pred_flagをエントロピ復号部421から取得すると、その値が1の場合(つまり、MPMが適用されている場合)、イントラ予測モード記憶部423から周辺予測モード情報を取得し、MPMを算出し、それをMPM情報としてイントラ予測部411に供給する。prev_intra_luma_pred_flagの値が0の場合(つまり、MPMが適用されなかった場合)、MPM算出部424は、MPMの算出を省略する。   When the MPM calculation unit 424 acquires prev_intra_luma_pred_flag from the entropy decoding unit 421, when the value is 1 (that is, when MPM is applied), the MPM calculation unit 424 acquires the peripheral prediction mode information from the intra prediction mode storage unit 423, and MPM Is supplied to the intra prediction unit 411 as MPM information. When the value of prev_intra_luma_pred_flag is 0 (that is, when MPM is not applied), the MPM calculation unit 424 omits the calculation of MPM.

テーブル記憶部425は、画像符号化装置300のテーブル記憶部344(図23)と同様の、PUサイズ毎に符号長を指定する、イントラ予測モード制限レベル毎のテーブル情報を予め記憶している。   Similar to the table storage unit 344 (FIG. 23) of the image encoding device 300, the table storage unit 425 stores table information for each intra prediction mode restriction level that specifies a code length for each PU size.

符号長決定部426は、エントロピ復号部421からイントラ予測モード制限レベルフラグ(imode_limit_level)とPUサイズ(PU_Size)とを取得すると、テーブル記憶部425から、イントラ予測モード制限レベルフラグ(imode_limit_level)に対応するテーブル情報を取得する。また、符号長決定部426は、取得したテーブル情報を用いて、PUサイズ(PU_Size)に対応する符号長を決定し、その符号長を示す符号長情報を逆2値化部422に供給する。   When the code length determination unit 426 acquires the intra prediction mode restriction level flag (imode_limit_level) and the PU size (PU_Size) from the entropy decoding unit 421, the code length determination unit 426 corresponds to the intra prediction mode restriction level flag (imode_limit_level) from the table storage unit 425. Get table information. Also, the code length determination unit 426 determines the code length corresponding to the PU size (PU_Size) using the acquired table information, and supplies the code length information indicating the code length to the inverse binarization unit 422.

このように、可逆復号部402が画像符号化装置300から供給されるイントラ予測モード制限レベルフラグ(imode_limit_level)に基づいて、イントラ予測モード情報の2値データの符号長を設定し、その符号長を用いて逆2値化することにより、画像復号装置400は、画像符号化装置300において割り当てる符号長が適応的に制御されたイントラ予測モード情報を適切に復号することができる。つまり、画像復号装置400は、符号化効率を向上させることができる。   As described above, the lossless decoding unit 402 sets the code length of the binary data of the intra prediction mode information based on the intra prediction mode restriction level flag (imode_limit_level) supplied from the image encoding device 300, and sets the code length. By using the inverse binarization, the image decoding apparatus 400 can appropriately decode the intra prediction mode information in which the code length assigned in the image encoding apparatus 300 is adaptively controlled. That is, the image decoding apparatus 400 can improve encoding efficiency.

また、以上のように復号されて逆2値化されたイントラ予測モード情報は、画像符号化装置300において適応的にモードが制限されている。したがって、画像復号装置400は、イントラ予測の負荷を低減させることができる。   In addition, the mode of the intra prediction mode information decoded and inverse binarized as described above is adaptively limited in the image encoding device 300. Therefore, the image decoding apparatus 400 can reduce the load of intra prediction.

[復号処理の流れ]
次に、以上のような画像復号装置400により実行される各処理の流れについて説明する。最初に、図35のフローチャートを参照して、復号処理の流れの例を説明する。
[Decoding process flow]
Next, the flow of each process executed by the image decoding apparatus 400 as described above will be described. First, an example of the flow of decoding processing will be described with reference to the flowchart of FIG.

復号処理が開始されると、ステップS401において、蓄積バッファ401は、伝送されてきた符号化データを蓄積する。   When the decoding process is started, in step S401, the accumulation buffer 401 accumulates the transmitted encoded data.

ステップS402において、可逆復号部402は、蓄積バッファ401から供給される符号化データ(画像符号化装置300により画像データが符号化されて得られた符号化データ)を復号する。   In step S402, the lossless decoding unit 402 decodes encoded data (encoded data obtained by encoding image data by the image encoding device 300) supplied from the accumulation buffer 401.

ステップS403において、逆量子化部403は、可逆復号部402により復号されて得られた、量子化された直交変換係数を、図19の量子化部305による量子化処理に対応する方法で逆量子化する。ステップS404において逆直交変換部404は逆量子化部403により逆量子化されて得られた直交変換係数を、図19の直交変換部304による直交変換処理に対応する方法で逆直交変換する。これにより図19の直交変換部304の入力(演算部303の出力)に対応する差分情報が復号されたことになる。   In step S403, the inverse quantization unit 403 performs inverse quantization on the quantized orthogonal transform coefficient obtained by decoding by the lossless decoding unit 402 by a method corresponding to the quantization processing by the quantization unit 305 in FIG. Turn into. In step S404, the inverse orthogonal transform unit 404 performs inverse orthogonal transform on the orthogonal transform coefficient obtained by inverse quantization by the inverse quantization unit 403 by a method corresponding to the orthogonal transform processing by the orthogonal transform unit 304 of FIG. As a result, the difference information corresponding to the input of the orthogonal transform unit 304 of FIG. 19 (the output of the calculation unit 303) is decoded.

ステップS405において、イントラ予測部411および動き予測・補償部412は、予測処理を行い、予測画像を生成する。   In step S405, the intra prediction unit 411 and the motion prediction / compensation unit 412 perform a prediction process to generate a predicted image.

ステップS406において、選択部413は、ステップS405の処理により生成された予測画像を選択する。すなわち、選択部413には、イントラ予測部411により生成された予測画像、若しくは、動き予測・補償部412により生成された予測画像が供給される。選択部413は、その予測画像が供給された側を選択し、その予測画像を演算部405に供給する。   In step S406, the selection unit 413 selects the predicted image generated by the process in step S405. In other words, the prediction unit 413 is supplied with the prediction image generated by the intra prediction unit 411 or the prediction image generated by the motion prediction / compensation unit 412. The selection unit 413 selects the side to which the predicted image is supplied, and supplies the predicted image to the calculation unit 405.

ステップS407において、演算部405は、ステップS404の処理により得られた差分情報に、ステップS406において選択された予測画像を加算する。これにより元の画像データが復号される。   In step S407, the calculation unit 405 adds the predicted image selected in step S406 to the difference information obtained by the process in step S404. As a result, the original image data is decoded.

ステップS408において、ループフィルタ406は、ステップS407の処理により得られた復号画像を適宜フィルタリングする。   In step S408, the loop filter 406 appropriately filters the decoded image obtained by the process in step S407.

ステップS409において、画面並べ替えバッファ407は、ステップS408において適宜フィルタリングされた復号画像のフレームの並べ替えを行う。すなわち、画像符号化装置300の画面並べ替えバッファ302(図19)により符号化のために並べ替えられたフレームの順序が、元の表示の順序に並べ替えられる。   In step S409, the screen rearrangement buffer 407 rearranges the frames of the decoded image appropriately filtered in step S408. That is, the order of frames rearranged for encoding by the screen rearrangement buffer 302 (FIG. 19) of the image encoding device 300 is rearranged to the original display order.

ステップS410において、D/A変換部408は、ステップS409においてフレームが並べ替えられた復号画像データをD/A変換する。この復号画像データが図示せぬディスプレイに出力され、その画像が表示される。   In step S410, the D / A conversion unit 408 performs D / A conversion on the decoded image data in which the frames are rearranged in step S409. The decoded image data is output to a display (not shown), and the image is displayed.

ステップS411において、フレームメモリ409は、ステップS408において適宜フィルタリングされた復号画像を記憶する。   In step S411, the frame memory 409 stores the decoded image appropriately filtered in step S408.

ステップS411の処理が終了すると、フレームメモリ409は、復号処理を終了する。   When the process of step S411 ends, the frame memory 409 ends the decoding process.

[可逆復号処理の流れ]
次に、図36のフローチャートを参照して、図35のステップS402において実行される可逆復号処理の流れの例を説明する。
[Flow of lossless decoding]
Next, an example of the flow of lossless decoding processing executed in step S402 in FIG. 35 will be described with reference to the flowchart in FIG.

可逆復号処理が開始されると、可逆復号部402は、ステップS421において、処理対象がイントラ符号化されたものであるか否かを判定する。イントラ符号化されたものであると判定された場合、可逆復号部402は、処理をステップS422に進め、イントラ予測モード情報の符号化データを復号し、処理をステップS424に進める。   When the lossless decoding process is started, the lossless decoding unit 402 determines in step S421 whether the processing target is intra-coded. When it is determined that the data is intra-coded, the lossless decoding unit 402 advances the process to step S422, decodes the encoded data of the intra prediction mode information, and advances the process to step S424.

また、ステップS421において、処理対象がインター符号化されたものであると判定された場合、可逆復号部402は、処理をステップS423に進め、インター予測モード情報の符号化データを復号し、処理をステップS424に進める。   If it is determined in step S421 that the processing target is inter-coded, the lossless decoding unit 402 advances the processing to step S423, decodes the encoded data of the inter prediction mode information, and performs the processing. The process proceeds to step S424.

ステップS424において、可逆復号部402は、係数データの符号化データを復号する。ステップS424の処理が終了すると、可逆復号部402は、可逆復号処理を終了し、処理を図35のステップS402に戻し、ステップS403以降の処理を実行させる。   In step S424, the lossless decoding unit 402 decodes the encoded data of the coefficient data. When the process of step S424 ends, the lossless decoding unit 402 ends the lossless decoding process, returns the process to step S402 of FIG. 35, and executes the processes after step S403.

[イントラ予測モード情報復号処理の流れ]
次に、図37および図38のフローチャートを参照して、図36のステップS422において実行されるイントラ予測モード情報復号処理の流れの例を説明する。
[Flow of intra prediction mode information decoding process]
Next, an example of the flow of the intra prediction mode information decoding process executed in step S422 in FIG. 36 will be described with reference to the flowcharts in FIGS.

イントラ予測モード情報復号処理が開始されると、エントロピ復号部421は、図37のステップS431において、prev_intra_luma_pred_flagを復号する。ステップS432において、MPM算出部424は、prev_intra_luma_pred_flagの値が1であるか否かを判定する。prev_intra_luma_pred_flagの値が1であり、符号化の際にMPMが適用されたと判定された場合、MPM算出部424は、処理をステップS433に進める。   When the intra prediction mode information decoding process is started, the entropy decoding unit 421 decodes prev_intra_luma_pred_flag in step S431 in FIG. In step S432, the MPM calculation unit 424 determines whether the value of prev_intra_luma_pred_flag is 1. When the value of prev_intra_luma_pred_flag is 1 and it is determined that MPM is applied at the time of encoding, the MPM calculation unit 424 advances the processing to step S433.

ステップS433において、MPM算出部424は、イントラ予測モード記憶部423から、処理対象である当該PUの周辺の予測モード情報である周辺予測モード情報を読み出し、その周辺予測モード情報を用いてMPMを求める。   In step S433, the MPM calculation unit 424 reads out the peripheral prediction mode information that is the prediction mode information around the PU to be processed from the intra prediction mode storage unit 423, and obtains the MPM using the peripheral prediction mode information. .

ステップS434において、MPM算出部424は、ステップS433において算出したMPMをイントラ予測モード情報として出力する。   In step S434, the MPM calculation unit 424 outputs the MPM calculated in step S433 as intra prediction mode information.

ステップS435において、イントラ予測モード記憶部423は、ステップS433において算出されたMPMをイントラ予測モード情報として取得し、記憶する。ステップS435の処理を終了すると、イントラ予測モード記憶部423は、イントラ予測モード情報復号処理を終了し、処理を図36のステップS422に戻し、処理をステップS424に進める。   In step S435, the intra prediction mode storage unit 423 acquires and stores the MPM calculated in step S433 as intra prediction mode information. When the process of step S435 ends, the intra prediction mode storage unit 423 ends the intra prediction mode information decoding process, returns the process to step S422 in FIG. 36, and advances the process to step S424.

また、図37のステップS432において、prev_intra_luma_pred_flagの値が0であり、符号化の際にMPMが適用されなかったと判定された場合、MPM算出部424は、処理を図38のステップS441に進める。   Also, in step S432 in FIG. 37, if the value of prev_intra_luma_pred_flag is 0 and it is determined that MPM has not been applied at the time of encoding, the MPM calculation unit 424 advances the processing to step S441 in FIG.

図38のステップS441において、エントロピ復号部421は、例えばイントラ予測モード情報の符号化データを取得し、それらをエントロピ復号する。また、ステップS442において、エントロピ復号部421は、イントラ予測モード制限レベルフラグ(imode_limit_level)の符号化データを復号する。なお、実際には、このステップS441およびステップS442において、エントロピ復号部421は、これらの情報の他にも、例えばSPS、PPS、およびスライスヘッダ等に格納される情報も復号する。   In step S441 in FIG. 38, the entropy decoding unit 421 acquires encoded data of intra prediction mode information, for example, and entropy decodes them. In step S442, the entropy decoding unit 421 decodes the encoded data of the intra prediction mode restriction level flag (imode_limit_level). Actually, in step S441 and step S442, the entropy decoding unit 421 decodes information stored in, for example, an SPS, a PPS, and a slice header in addition to these pieces of information.

ステップS443において、符号長決定部426は、ステップS442において復号されて得られたイントラ予測モード制限レベルフラグの値が1(imode_limit_level = 1)であるか否かを判定する。イントラ予測モード制限レベルフラグの値が1(imode_limit_level = 1)であると判定された場合、符号長決定部426は、処理をステップS444に進める。   In step S443, the code length determination unit 426 determines whether or not the value of the intra prediction mode limit level flag obtained by decoding in step S442 is 1 (imode_limit_level = 1). When it is determined that the value of the intra prediction mode limit level flag is 1 (imode_limit_level = 1), the code length determination unit 426 advances the process to step S444.

ステップS444において、符号長決定部426は、テーブル記憶部425から、イントラ予測モード制限レベルが1(imode_limit_level = 1)のテーブル情報を読み出し、そのテーブル情報に基づいて、エントロピ復号部421において復号された当該PUのPUサイズ(PU_Size)に応じた符号長(Bin数)を求める。   In step S444, the code length determination unit 426 reads out table information with an intra prediction mode restriction level of 1 (imode_limit_level = 1) from the table storage unit 425, and the entropy decoding unit 421 decodes the table information based on the table information. A code length (number of bins) corresponding to the PU size (PU_Size) of the PU is obtained.

ステップS445において、逆2値化部422は、ステップS444において求められた符号長(Bin数)で、ステップS441において復号されて得られたイントラ予測モード情報の2値データを逆2値化する。この逆2値化により得られたイントラ予測モード情報はイントラ予測部411に供給される。   In step S445, the inverse binarization unit 422 performs inverse binarization on the binary data of the intra prediction mode information obtained by decoding in step S441 with the code length (number of bins) obtained in step S444. The intra prediction mode information obtained by the inverse binarization is supplied to the intra prediction unit 411.

ステップS446において、イントラ予測モード記憶部423は、ステップS445の処理により得られたイントラ予測モード情報を取得し、記憶する。ステップS446の処理を終了すると、イントラ予測モード記憶部423は、イントラ予測モード情報復号処理を終了し、処理を図36のステップS422に戻し、処理をステップS424に進める。   In step S446, the intra prediction mode storage unit 423 acquires and stores the intra prediction mode information obtained by the process of step S445. When the process of step S446 ends, the intra prediction mode storage unit 423 ends the intra prediction mode information decoding process, returns the process to step S422 in FIG. 36, and advances the process to step S424.

また、図38のステップS443において、イントラ予測モード制限レベルフラグの値が0であると判定された場合、符号長決定部426は、処理をステップS447に進める。   Also, in the event that determination is made in step S443 in FIG. 38 that the value of the intra prediction mode restriction level flag is 0, the code length determination unit 426 advances the processing to step S447.

ステップS447において、符号長決定部426は、テーブル記憶部425から、イントラ予測モード制限レベルが0(imode_limit_level = 0)のテーブル情報を読み出し、そのテーブル情報に基づいて、エントロピ復号部421において復号された当該PUのPUサイズ(PU_Size)に応じた符号長(Bin数)を求める。   In step S447, the code length determination unit 426 reads out table information with an intra prediction mode restriction level of 0 (imode_limit_level = 0) from the table storage unit 425, and the entropy decoding unit 421 decodes the table information based on the table information. A code length (number of bins) corresponding to the PU size (PU_Size) of the PU is obtained.

ステップS448において、逆2値化部422は、ステップS447において求められた符号長(Bin数)で、ステップS441において復号されて得られたイントラ予測モード情報の2値データを逆2値化する。   In step S448, the inverse binarization unit 422 inversely binarizes the binary data of the intra prediction mode information obtained by decoding in step S441 with the code length (number of bins) obtained in step S447.

ステップS449において、逆2値化部422は、ステップS448において得られたイントラ予測モード情報の値(イントラ予測モードの番号)が31であるか否かを判定し、31であると判定された場合、処理をステップS450に進める。   In step S449, the inverse binarization unit 422 determines whether the value of intra prediction mode information (intra prediction mode number) obtained in step S448 is 31, and if it is determined to be 31, Then, the process proceeds to step S450.

ステップS450において、逆2値化部422は、2値データからさらに1Bin抽出する。ステップS451において、逆2値化部422は、その抽出したBinの値が1であるか否かを判定し、1であると判定された場合、処理をステップS452に進める。   In step S450, the inverse binarization unit 422 further extracts 1 Bin from the binary data. In step S451, the inverse binarization unit 422 determines whether or not the extracted Bin value is 1, and if it is determined to be 1, the process proceeds to step S452.

つまり、この場合、図29のステップS371において1が符号化されている。したがって、ステップS452において、逆2値化部422は、イントラ予測モード情報の値(イントラ予測モードの番号)を32に変更する。ステップS452の処理を終了すると、逆2値化部422は、処理をステップS453に進める。   That is, in this case, 1 is encoded in step S371 in FIG. Accordingly, in step S452, the inverse binarization unit 422 changes the value of intra prediction mode information (intra prediction mode number) to 32. When the process of step S452 ends, the inverse binarization unit 422 advances the process to step S453.

また、ステップS451において、抽出したBinの値が0であると判定された場合、図29のステップS371において0が符号化されている。つまり、この場合、イントラ予測モード情報の値(イントラ予測モードの番号)は31で正しいので、逆2値化部422は、ステップS452の処理を省略し、ステップS453に処理を進める。   If it is determined in step S451 that the extracted Bin value is 0, 0 is encoded in step S371 of FIG. That is, in this case, since the value of the intra prediction mode information (intra prediction mode number) is correct at 31, the inverse binarization unit 422 skips the process of step S452 and advances the process to step S453.

また、ステップS449において、イントラ予測モード情報の値(イントラ予測モードの番号)が31でない(30以下である)と判定された場合、図29のステップS371の処理は行われていない。したがって、逆2値化部422は、ステップS450乃至ステップS452の処理を省略し、ステップS453に処理を進める。   If it is determined in step S449 that the value of intra prediction mode information (intra prediction mode number) is not 31 (30 or less), the process of step S371 in FIG. 29 is not performed. Therefore, the inverse binarization unit 422 omits the processing from step S450 to step S452 and advances the processing to step S453.

ステップS453において、イントラ予測モード情報の値(イントラ予測モードの番号)がMPMの番号以上であるか否かを判定し、MPMの番号以上であると判定された場合、処理をステップS454に進める。   In step S453, it is determined whether or not the value of intra prediction mode information (intra prediction mode number) is greater than or equal to the MPM number. If it is determined that the value is greater than or equal to the MPM number, the process proceeds to step S454.

この場合、図29のステップS363において値が1減算されている。したがって、逆2値化部422は、ステップS454において、イントラ予測モード情報の値(イントラ予測モードの番号)に1を加算する。ステップS454の処理が終了すると、逆2値化部422は、得られたイントラ予測モード情報をイントラ予測部411に供給し、処理をステップS446に戻す。   In this case, 1 is subtracted from the value in step S363 in FIG. Accordingly, the inverse binarization unit 422 adds 1 to the value of intra prediction mode information (intra prediction mode number) in step S454. When the process of step S454 ends, the inverse binarization unit 422 supplies the obtained intra prediction mode information to the intra prediction unit 411, and the process returns to step S446.

また、ステップS453において、イントラ予測モード情報の値(イントラ予測モードの番号)がMPMの番号より小さいと判定された場合、図29のステップS363の処理は行われていないので、逆2値化部422は、ステップS454の処理を省略し、処理をステップS446に戻す。   If it is determined in step S453 that the value of intra prediction mode information (intra prediction mode number) is smaller than the MPM number, the process of step S363 in FIG. 29 is not performed, and thus the inverse binarization unit In step 422, the process of step S454 is omitted, and the process returns to step S446.

以上のように各処理を実行することにより、画像復号装置400は、画像符号化装置300において割り当てる符号長が適応的に制御されたイントラ予測モード情報を適切に復号することができる。つまり、画像復号装置400は、符号化効率を向上させることができる。   By executing each process as described above, the image decoding apparatus 400 can appropriately decode intra prediction mode information in which the code length assigned in the image encoding apparatus 300 is adaptively controlled. That is, the image decoding apparatus 400 can improve encoding efficiency.

また、以上のように復号されて逆2値化されたイントラ予測モード情報は、画像符号化装置300において適応的にモードが制限されているので、画像復号装置400は、イントラ予測の負荷を低減させることができる。   In addition, since the mode of the intra prediction mode information decoded and debinarized as described above is adaptively limited in the image encoding device 300, the image decoding device 400 reduces the load of intra prediction. Can be made.

[その他の例]
以上においては、画像符号化装置300および画像復号装置400が各イントラ予測モード制限レベルのテーブル情報を予め共有するように説明したが、これに限らず、画像符号化装置300と画像復号装置400がこのテーブル情報を授受することができるようにしてもよい。例えば、符号化データを授受する前に、画像符号化装置300が、画像復号装置400に対してテーブル情報を供給するようにしてもよい。また、画像符号化装置300が画像符号化を開始する前に、画像復号装置400が、テーブル情報を画像符号化装置300に提供するようにしてもよい。さらに、画像符号化装置300および画像復号装置400以外の装置が、画像符号化装置300および画像復号装置400に対してテーブル情報を供給するようにしてもよい。
[Other examples]
In the above description, the image encoding device 300 and the image decoding device 400 have been described so as to share the table information of each intra prediction mode restriction level in advance. This table information may be exchanged. For example, the image encoding device 300 may supply table information to the image decoding device 400 before sending and receiving encoded data. Further, the image decoding device 400 may provide the table information to the image encoding device 300 before the image encoding device 300 starts image encoding. Furthermore, devices other than the image encoding device 300 and the image decoding device 400 may supply table information to the image encoding device 300 and the image decoding device 400.

また、以上においては、イントラ予測モード制限レベルが可変であるように説明したが、イントラ予測モード制限レベルは固定値とし、常にモードが制限されているようにしてもよい。その場合、画像符号化装置300と画像復号装置400との間の、イントラ予測モード制限レベルの授受は省略することができる。   In the above description, the intra prediction mode restriction level is variable. However, the intra prediction mode restriction level may be a fixed value, and the mode may be always restricted. In that case, transmission / reception of the intra prediction mode restriction level between the image encoding device 300 and the image decoding device 400 can be omitted.

さらに、以上においては、イントラ予測モード制限レベル0(モードの制限が無い状態)を初期状態とし、適応的にレベルを1にして制限を行うように説明したが、どのレベルを初期状態にしてもよい。例えば、イントラ予測モード制限レベル1(モードの制限がある状態)を初期状態とし、適応的にレベルを0にして制限を解除するようにしてもよい。   Further, in the above description, it has been described that the intra prediction mode restriction level 0 (the state where there is no mode restriction) is the initial state, and the restriction is adaptively performed with the level set to 1, but any level may be set to the initial state. Good. For example, the intra prediction mode restriction level 1 (state with mode restriction) may be set as an initial state, and the restriction may be released by adaptively setting the level to 0.

また、以上においては、イントラ予測モード制限レベルを3段階以上としてもよいと説明したが、このイントラ予測モード制限レベルの数を変更することができるようにしてもよい。さらに、例えばシーケンス、ピクチャ、若しくはスライス等、所定の処理単位毎にイントラ予測モード制限レベルの数を変更することができるようにしてもよい。   In the above description, the intra prediction mode restriction level may be three or more. However, the number of intra prediction mode restriction levels may be changed. Further, the number of intra prediction mode restriction levels may be changed for each predetermined processing unit such as a sequence, a picture, or a slice.

<3.第3の実施の形態>
[パーソナルコンピュータ]
上述した一連の処理は、ハードウエアにより実行させることもできるし、ソフトウエアにより実行させることもできる。この場合、例えば、図39に示されるようなパーソナルコンピュータとして構成されるようにしてもよい。
<3. Third Embodiment>
[Personal computer]
The series of processes described above can be executed by hardware or can be executed by software. In this case, for example, a personal computer as shown in FIG. 39 may be configured.

図39において、パーソナルコンピュータ500のCPU(Central Processing Unit)501は、ROM(Read Only Memory)502に記憶されているプログラム、または記憶部513からRAM(Random Access Memory)503にロードされたプログラムに従って各種の処理を実行する。RAM503にはまた、CPU501が各種の処理を実行する上において必要なデータなども適宜記憶される。   In FIG. 39, a CPU (Central Processing Unit) 501 of the personal computer 500 performs various processes according to a program stored in a ROM (Read Only Memory) 502 or a program loaded from a storage unit 513 to a RAM (Random Access Memory) 503. Execute the process. The RAM 503 also appropriately stores data necessary for the CPU 501 to execute various processes.

CPU501、ROM502、およびRAM503は、バス504を介して相互に接続されている。このバス504にはまた、入出力インタフェース510も接続されている。   The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input / output interface 510 is also connected to the bus 504.

入出力インタフェース510には、キーボード、マウスなどよりなる入力部511、CRT(Cathode Ray Tube)やLCD(Liquid Crystal Display)などよりなるディスプレイ、並びにスピーカなどよりなる出力部512、ハードディスクなどより構成される記憶部513、モデムなどより構成される通信部514が接続されている。通信部514は、インターネットを含むネットワークを介しての通信処理を行う。   The input / output interface 510 includes an input unit 511 including a keyboard and a mouse, a display including a CRT (Cathode Ray Tube) and an LCD (Liquid Crystal Display), an output unit 512 including a speaker, and a hard disk. A communication unit 514 including a storage unit 513 and a modem is connected. The communication unit 514 performs communication processing via a network including the Internet.

入出力インタフェース510にはまた、必要に応じてドライブ515が接続され、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリなどのリムーバブルメディア521が適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じて記憶部513にインストールされる。   A drive 515 is connected to the input / output interface 510 as necessary, and a removable medium 521 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory is appropriately mounted, and a computer program read from them is It is installed in the storage unit 513 as necessary.

上述した一連の処理をソフトウエアにより実行させる場合には、そのソフトウエアを構成するプログラムが、ネットワークや記録媒体からインストールされる。   When the above-described series of processing is executed by software, a program constituting the software is installed from a network or a recording medium.

この記録媒体は、例えば、図39に示されるように、装置本体とは別に、ユーザにプログラムを配信するために配布される、プログラムが記録されている磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD-ROM(Compact Disc - Read Only Memory),DVD(Digital Versatile Disc)を含む)、光磁気ディスク(MD(Mini Disc)を含む)、若しくは半導体メモリなどよりなるリムーバブルメディア521により構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに配信される、プログラムが記録されているROM502や、記憶部513に含まれるハードディスクなどで構成される。   For example, as shown in FIG. 39, the recording medium is distributed to distribute the program to the user separately from the apparatus main body, and includes a magnetic disk (including a flexible disk) on which the program is recorded, an optical disk ( It only consists of removable media 521 consisting of CD-ROM (compact disc-read only memory), DVD (including digital versatile disc), magneto-optical disc (including MD (mini disc)), or semiconductor memory. Rather, it is composed of a ROM 502 on which a program is recorded and a hard disk included in the storage unit 513, which is distributed to the user in a state of being pre-installed in the apparatus main body.

なお、コンピュータが実行するプログラムは、本明細書で説明する順序に沿って時系列に処理が行われるプログラムであっても良いし、並列に、あるいは呼び出しが行われたとき等の必要なタイミングで処理が行われるプログラムであっても良い。   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.

また、本明細書において、記録媒体に記録されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。   Further, in the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in chronological order according to the described order, but may be performed in parallel or It also includes processes that are executed individually.

また、本明細書において、システムとは、複数のデバイス(装置)により構成される装置全体を表すものである。   Further, in this specification, the system represents the entire apparatus composed of a plurality of devices (apparatuses).

また、以上において、1つの装置(または処理部)として説明した構成を分割し、複数の装置(または処理部)として構成するようにしてもよい。逆に、以上において複数の装置(または処理部)として説明した構成をまとめて1つの装置(または処理部)として構成されるようにしてもよい。また、各装置(または各処理部)の構成に上述した以外の構成を付加するようにしてももちろんよい。さらに、システム全体としての構成や動作が実質的に同じであれば、ある装置(または処理部)の構成の一部を他の装置(または他の処理部)の構成に含めるようにしてもよい。つまり、本発明の実施の形態は、上述した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。   In addition, in the above description, the configuration described as one device (or processing unit) may be divided and configured as a plurality of devices (or processing units). Conversely, the configurations described above as a plurality of devices (or processing units) may be combined into a single device (or processing unit). Of course, a configuration other than that described above may be added to the configuration of each device (or each processing unit). Furthermore, if the configuration and operation of the entire system are substantially the same, a part of the configuration of a certain device (or processing unit) may be included in the configuration of another device (or other processing unit). . That is, the embodiment of the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the gist of the present invention.

例えば、上述した画像符号化装置や画像復号装置は、任意の電子機器に適用することができる。以下にその例について説明する。   For example, the above-described image encoding device and image decoding device can be applied to any electronic device. Examples thereof will be described below.

<4.第4の実施の形態>
[テレビジョン受像機]
図40は、本発明を適用した画像復号装置200を用いるテレビジョン受像機の主な構成例を示すブロック図である。
<4. Fourth Embodiment>
[Television receiver]
FIG. 40 is a block diagram illustrating a main configuration example of a television receiver using the image decoding device 200 to which the present invention has been applied.

図40に示されるテレビジョン受像機1000は、地上波チューナ1013、ビデオデコーダ1015、映像信号処理回路1018、グラフィック生成回路1019、パネル駆動回路1020、および表示パネル1021を有する。   The television receiver 1000 shown in FIG. 40 includes a terrestrial tuner 1013, a video decoder 1015, a video signal processing circuit 1018, a graphic generation circuit 1019, a panel drive circuit 1020, and a display panel 1021.

地上波チューナ1013は、地上アナログ放送の放送波信号を、アンテナを介して受信し、復調し、映像信号を取得し、それをビデオデコーダ1015に供給する。ビデオデコーダ1015は、地上波チューナ1013から供給された映像信号に対してデコード処理を施し、得られたデジタルのコンポーネント信号を映像信号処理回路1018に供給する。   The terrestrial tuner 1013 receives a broadcast wave signal of analog terrestrial broadcasting via an antenna, demodulates it, acquires a video signal, and supplies it to the video decoder 1015. The video decoder 1015 performs a decoding process on the video signal supplied from the terrestrial tuner 1013 and supplies the obtained digital component signal to the video signal processing circuit 1018.

映像信号処理回路1018は、ビデオデコーダ1015から供給された映像データに対してノイズ除去などの所定の処理を施し、得られた映像データをグラフィック生成回路1019に供給する。   The video signal processing circuit 1018 performs predetermined processing such as noise removal on the video data supplied from the video decoder 1015 and supplies the obtained video data to the graphic generation circuit 1019.

グラフィック生成回路1019は、表示パネル1021に表示させる番組の映像データや、ネットワークを介して供給されるアプリケーションに基づく処理による画像データなどを生成し、生成した映像データや画像データをパネル駆動回路1020に供給する。また、グラフィック生成回路1019は、項目の選択などにユーザにより利用される画面を表示するための映像データ(グラフィック)を生成し、それを番組の映像データに重畳したりすることによって得られた映像データをパネル駆動回路1020に供給するといった処理も適宜行う。   The graphic generation circuit 1019 generates video data of a program to be displayed on the display panel 1021, image data by processing based on an application supplied via a network, and the generated video data and image data to the panel drive circuit 1020. Supply. The graphic generation circuit 1019 generates video data (graphics) for displaying a screen used by the user for selecting an item and superimposing it on the video data of the program. A process of supplying data to the panel drive circuit 1020 is also appropriately performed.

パネル駆動回路1020は、グラフィック生成回路1019から供給されたデータに基づいて表示パネル1021を駆動し、番組の映像や上述した各種の画面を表示パネル1021に表示させる。   The panel drive circuit 1020 drives the display panel 1021 based on the data supplied from the graphic generation circuit 1019 and causes the display panel 1021 to display a program video and the various screens described above.

表示パネル1021はLCD(Liquid Crystal Display)などよりなり、パネル駆動回路1020による制御に従って番組の映像などを表示させる。   The display panel 1021 includes an LCD (Liquid Crystal Display) or the like, and displays a program video or the like according to control by the panel drive circuit 1020.

また、テレビジョン受像機1000は、音声A/D(Analog/Digital)変換回路1014、音声信号処理回路1022、エコーキャンセル/音声合成回路1023、音声増幅回路1024、およびスピーカ1025も有する。   The television receiver 1000 also includes an audio A / D (Analog / Digital) conversion circuit 1014, an audio signal processing circuit 1022, an echo cancellation / audio synthesis circuit 1023, an audio amplification circuit 1024, and a speaker 1025.

地上波チューナ1013は、受信した放送波信号を復調することにより、映像信号だけでなく音声信号も取得する。地上波チューナ1013は、取得した音声信号を音声A/D変換回路1014に供給する。   The terrestrial tuner 1013 acquires not only the video signal but also the audio signal by demodulating the received broadcast wave signal. The terrestrial tuner 1013 supplies the acquired audio signal to the audio A / D conversion circuit 1014.

音声A/D変換回路1014は、地上波チューナ1013から供給された音声信号に対してA/D変換処理を施し、得られたデジタルの音声信号を音声信号処理回路1022に供給する。   The audio A / D conversion circuit 1014 performs A / D conversion processing on the audio signal supplied from the terrestrial tuner 1013 and supplies the obtained digital audio signal to the audio signal processing circuit 1022.

音声信号処理回路1022は、音声A/D変換回路1014から供給された音声データに対してノイズ除去などの所定の処理を施し、得られた音声データをエコーキャンセル/音声合成回路1023に供給する。   The audio signal processing circuit 1022 performs predetermined processing such as noise removal on the audio data supplied from the audio A / D conversion circuit 1014, and supplies the obtained audio data to the echo cancellation / audio synthesis circuit 1023.

エコーキャンセル/音声合成回路1023は、音声信号処理回路1022から供給された音声データを音声増幅回路1024に供給する。   The echo cancellation / voice synthesis circuit 1023 supplies the voice data supplied from the voice signal processing circuit 1022 to the voice amplification circuit 1024.

音声増幅回路1024は、エコーキャンセル/音声合成回路1023から供給された音声データに対してD/A変換処理、増幅処理を施し、所定の音量に調整した後、音声をスピーカ1025から出力させる。   The audio amplifying circuit 1024 performs D / A conversion processing and amplification processing on the audio data supplied from the echo cancellation / audio synthesizing circuit 1023, adjusts to a predetermined volume, and then outputs the audio from the speaker 1025.

さらに、テレビジョン受像機1000は、デジタルチューナ1016およびMPEGデコーダ1017も有する。   Furthermore, the television receiver 1000 also includes a digital tuner 1016 and an MPEG decoder 1017.

デジタルチューナ1016は、デジタル放送(地上デジタル放送、BS(Broadcasting Satellite)/CS(Communications Satellite)デジタル放送)の放送波信号を、アンテナを介して受信し、復調し、MPEG-TS(Moving Picture Experts Group-Transport Stream)を取得し、それをMPEGデコーダ1017に供給する。   The digital tuner 1016 receives a broadcast wave signal of a digital broadcast (terrestrial digital broadcast, BS (Broadcasting Satellite) / CS (Communications Satellite) digital broadcast) via an antenna, demodulates, and MPEG-TS (Moving Picture Experts Group). -Transport Stream) and supply it to the MPEG decoder 1017.

MPEGデコーダ1017は、デジタルチューナ1016から供給されたMPEG-TSに施されているスクランブルを解除し、再生対象(視聴対象)になっている番組のデータを含むストリームを抽出する。MPEGデコーダ1017は、抽出したストリームを構成する音声パケットをデコードし、得られた音声データを音声信号処理回路1022に供給するとともに、ストリームを構成する映像パケットをデコードし、得られた映像データを映像信号処理回路1018に供給する。また、MPEGデコーダ1017は、MPEG-TSから抽出したEPG(Electronic Program Guide)データを図示せぬ経路を介してCPU1032に供給する。   The MPEG decoder 1017 cancels the scramble applied to the MPEG-TS supplied from the digital tuner 1016, and extracts a stream including program data to be played back (viewing target). The MPEG decoder 1017 decodes the audio packet constituting the extracted stream, supplies the obtained audio data to the audio signal processing circuit 1022, decodes the video packet constituting the stream, and converts the obtained video data into the video This is supplied to the signal processing circuit 1018. Also, the MPEG decoder 1017 supplies EPG (Electronic Program Guide) data extracted from the MPEG-TS to the CPU 1032 via a path (not shown).

テレビジョン受像機1000は、このように映像パケットをデコードするMPEGデコーダ1017として、上述した画像復号装置400を用いる。なお、放送局等より送信されるMPEG-TSは、画像符号化装置300によって符号化されている。   The television receiver 1000 uses the above-described image decoding device 400 as the MPEG decoder 1017 for decoding video packets in this way. Note that MPEG-TS transmitted from a broadcasting station or the like is encoded by the image encoding device 300.

MPEGデコーダ1017は、画像復号装置400の場合と同様に、符号化側から供給されるイントラ予測モード制限フラグの値に応じて符号長を決定し、その符号長を用いて、イントラ予測モード情報の2値データを逆2値化する。したがって、MPEGデコーダ1017は、イントラ予測モードを適応的に制限してイントラ符号化された符号化データを適切に復号することができる。これにより、MPEGデコーダ1017は、符号化データの符号化効率を向上させることができる。   As in the case of the image decoding apparatus 400, the MPEG decoder 1017 determines the code length according to the value of the intra prediction mode restriction flag supplied from the encoding side, and uses the code length to determine the intra prediction mode information. The binary data is binarized. Therefore, the MPEG decoder 1017 can appropriately decode the encoded data that is intra-encoded by adaptively limiting the intra-prediction mode. Thereby, the MPEG decoder 1017 can improve the encoding efficiency of encoded data.

MPEGデコーダ1017から供給された映像データは、ビデオデコーダ1015から供給された映像データの場合と同様に、映像信号処理回路1018において所定の処理が施され、グラフィック生成回路1019において、生成された映像データ等が適宜重畳され、パネル駆動回路1020を介して表示パネル1021に供給され、その画像が表示される。   The video data supplied from the MPEG decoder 1017 is subjected to predetermined processing in the video signal processing circuit 1018 as in the case of the video data supplied from the video decoder 1015, and the generated video data in the graphic generation circuit 1019. Are appropriately superimposed and supplied to the display panel 1021 via the panel drive circuit 1020, and the image is displayed.

MPEGデコーダ1017から供給された音声データは、音声A/D変換回路1014から供給された音声データの場合と同様に、音声信号処理回路1022において所定の処理が施され、エコーキャンセル/音声合成回路1023を介して音声増幅回路1024に供給され、D/A変換処理や増幅処理が施される。その結果、所定の音量に調整された音声がスピーカ1025から出力される。   The audio data supplied from the MPEG decoder 1017 is subjected to predetermined processing in the audio signal processing circuit 1022 as in the case of the audio data supplied from the audio A / D conversion circuit 1014, and an echo cancellation / audio synthesis circuit 1023. Are supplied to the audio amplifier circuit 1024 through which D / A conversion processing and amplification processing are performed. As a result, sound adjusted to a predetermined volume is output from the speaker 1025.

また、テレビジョン受像機1000は、マイクロホン1026、およびA/D変換回路1027も有する。   The television receiver 1000 also includes a microphone 1026 and an A / D conversion circuit 1027.

A/D変換回路1027は、音声会話用のものとしてテレビジョン受像機1000に設けられるマイクロホン1026により取り込まれたユーザの音声の信号を受信し、受信した音声信号に対してA/D変換処理を施し、得られたデジタルの音声データをエコーキャンセル/音声合成回路1023に供給する。   The A / D conversion circuit 1027 receives a user's voice signal captured by a microphone 1026 provided in the television receiver 1000 for voice conversation, and performs A / D conversion processing on the received voice signal. The obtained digital audio data is supplied to the echo cancellation / audio synthesis circuit 1023.

エコーキャンセル/音声合成回路1023は、テレビジョン受像機1000のユーザ(ユーザA)の音声のデータがA/D変換回路1027から供給されている場合、ユーザAの音声データを対象としてエコーキャンセルを行い、他の音声データと合成するなどして得られた音声のデータを、音声増幅回路1024を介してスピーカ1025より出力させる。   When the audio data of the user (user A) of the television receiver 1000 is supplied from the A / D conversion circuit 1027, the echo cancellation / audio synthesis circuit 1023 performs echo cancellation on the audio data of the user A. The voice data obtained by combining with other voice data is output from the speaker 1025 via the voice amplifier circuit 1024.

さらに、テレビジョン受像機1000は、音声コーデック1028、内部バス1029、SDRAM(Synchronous Dynamic Random Access Memory)1030、フラッシュメモリ1031、CPU1032、USB(Universal Serial Bus) I/F1033、およびネットワークI/F1034も有する。   The television receiver 1000 further includes an audio codec 1028, an internal bus 1029, an SDRAM (Synchronous Dynamic Random Access Memory) 1030, a flash memory 1031, a CPU 1032, a USB (Universal Serial Bus) I / F 1033, and a network I / F 1034. .

A/D変換回路1027は、音声会話用のものとしてテレビジョン受像機1000に設けられるマイクロホン1026により取り込まれたユーザの音声の信号を受信し、受信した音声信号に対してA/D変換処理を施し、得られたデジタルの音声データを音声コーデック1028に供給する。   The A / D conversion circuit 1027 receives a user's voice signal captured by a microphone 1026 provided in the television receiver 1000 for voice conversation, and performs A / D conversion processing on the received voice signal. The obtained digital audio data is supplied to the audio codec 1028.

音声コーデック1028は、A/D変換回路1027から供給された音声データを、ネットワーク経由で送信するための所定のフォーマットのデータに変換し、内部バス1029を介してネットワークI/F1034に供給する。   The audio codec 1028 converts the audio data supplied from the A / D conversion circuit 1027 into data of a predetermined format for transmission via the network, and supplies the data to the network I / F 1034 via the internal bus 1029.

ネットワークI/F1034は、ネットワーク端子1035に装着されたケーブルを介してネットワークに接続される。ネットワークI/F1034は、例えば、そのネットワークに接続される他の装置に対して、音声コーデック1028から供給された音声データを送信する。また、ネットワークI/F1034は、例えば、ネットワークを介して接続される他の装置から送信される音声データを、ネットワーク端子1035を介して受信し、それを、内部バス1029を介して音声コーデック1028に供給する。   The network I / F 1034 is connected to the network via a cable attached to the network terminal 1035. For example, the network I / F 1034 transmits the audio data supplied from the audio codec 1028 to another device connected to the network. In addition, the network I / F 1034 receives, for example, audio data transmitted from another device connected via the network via the network terminal 1035, and receives the audio data via the internal bus 1029 to the audio codec 1028. Supply.

音声コーデック1028は、ネットワークI/F1034から供給された音声データを所定のフォーマットのデータに変換し、それをエコーキャンセル/音声合成回路1023に供給する。   The audio codec 1028 converts the audio data supplied from the network I / F 1034 into data of a predetermined format, and supplies it to the echo cancellation / audio synthesis circuit 1023.

エコーキャンセル/音声合成回路1023は、音声コーデック1028から供給される音声データを対象としてエコーキャンセルを行い、他の音声データと合成するなどして得られた音声のデータを、音声増幅回路1024を介してスピーカ1025より出力させる。   The echo cancellation / speech synthesis circuit 1023 performs echo cancellation on the speech data supplied from the speech codec 1028, and synthesizes speech data obtained by combining with other speech data via the speech amplification circuit 1024. And output from the speaker 1025.

SDRAM1030は、CPU1032が処理を行う上で必要な各種のデータを記憶する。   The SDRAM 1030 stores various data necessary for the CPU 1032 to perform processing.

フラッシュメモリ1031は、CPU1032により実行されるプログラムを記憶する。フラッシュメモリ1031に記憶されているプログラムは、テレビジョン受像機1000の起動時などの所定のタイミングでCPU1032により読み出される。フラッシュメモリ1031には、デジタル放送を介して取得されたEPGデータ、ネットワークを介して所定のサーバから取得されたデータなども記憶される。   The flash memory 1031 stores a program executed by the CPU 1032. The program stored in the flash memory 1031 is read by the CPU 1032 at a predetermined timing such as when the television receiver 1000 is activated. The flash memory 1031 also stores EPG data acquired via digital broadcasting, data acquired from a predetermined server via a network, and the like.

例えば、フラッシュメモリ1031には、CPU1032の制御によりネットワークを介して所定のサーバから取得されたコンテンツデータを含むMPEG-TSが記憶される。フラッシュメモリ1031は、例えばCPU1032の制御により、そのMPEG-TSを、内部バス1029を介してMPEGデコーダ1017に供給する。   For example, the flash memory 1031 stores MPEG-TS including content data acquired from a predetermined server via a network under the control of the CPU 1032. The flash memory 1031 supplies the MPEG-TS to the MPEG decoder 1017 via the internal bus 1029, for example, under the control of the CPU 1032.

MPEGデコーダ1017は、デジタルチューナ1016から供給されたMPEG-TSの場合と同様に、そのMPEG-TSを処理する。このようにテレビジョン受像機1000は、映像や音声等よりなるコンテンツデータを、ネットワークを介して受信し、MPEGデコーダ1017を用いてデコードし、その映像を表示させたり、音声を出力させたりすることができる。   The MPEG decoder 1017 processes the MPEG-TS as in the case of the MPEG-TS supplied from the digital tuner 1016. In this way, the television receiver 1000 receives content data including video and audio via the network, decodes it using the MPEG decoder 1017, displays the video, and outputs audio. Can do.

また、テレビジョン受像機1000は、リモートコントローラ1051から送信される赤外線信号を受光する受光部1037も有する。   The television receiver 1000 also includes a light receiving unit 1037 that receives an infrared signal transmitted from the remote controller 1051.

受光部1037は、リモートコントローラ1051からの赤外線を受光し、復調して得られたユーザ操作の内容を表す制御コードをCPU1032に出力する。   The light receiving unit 1037 receives infrared light from the remote controller 1051 and outputs a control code representing the content of the user operation obtained by demodulation to the CPU 1032.

CPU1032は、フラッシュメモリ1031に記憶されているプログラムを実行し、受光部1037から供給される制御コードなどに応じてテレビジョン受像機1000の全体の動作を制御する。CPU1032とテレビジョン受像機1000の各部は、図示せぬ経路を介して接続されている。   The CPU 1032 executes a program stored in the flash memory 1031 and controls the overall operation of the television receiver 1000 according to a control code supplied from the light receiving unit 1037. The CPU 1032 and each part of the television receiver 1000 are connected via a path (not shown).

USB I/F1033は、USB端子1036に装着されたUSBケーブルを介して接続される、テレビジョン受像機1000の外部の機器との間でデータの送受信を行う。ネットワークI/F1034は、ネットワーク端子1035に装着されたケーブルを介してネットワークに接続し、ネットワークに接続される各種の装置と音声データ以外のデータの送受信も行う。   The USB I / F 1033 transmits and receives data to and from a device external to the television receiver 1000 connected via a USB cable attached to the USB terminal 1036. The network I / F 1034 is connected to the network via a cable attached to the network terminal 1035, and transmits / receives data other than audio data to / from various devices connected to the network.

テレビジョン受像機1000は、MPEGデコーダ1017として画像復号装置400を用いることにより、アンテナを介して受信する放送波信号や、ネットワークを介して取得するコンテンツデータの符号化効率を向上させることができる。   By using the image decoding apparatus 400 as the MPEG decoder 1017, the television receiver 1000 can improve the encoding efficiency of a broadcast wave signal received via an antenna and content data acquired via a network.

<5.第5の実施の形態>
[携帯電話機]
図41は、本発明を適用した画像符号化装置300および画像復号装置400を用いる携帯電話機の主な構成例を示すブロック図である。
<5. Fifth embodiment>
[Mobile phone]
FIG. 41 is a block diagram illustrating a main configuration example of a mobile phone using the image encoding device 300 and the image decoding device 400 to which the present invention has been applied.

図41に示される携帯電話機1100は、各部を統括的に制御するようになされた主制御部1150、電源回路部1151、操作入力制御部1152、画像エンコーダ1153、カメラI/F部1154、LCD制御部1155、画像デコーダ1156、多重分離部1157、記録再生部1162、変復調回路部1158、および音声コーデック1159を有する。これらは、バス1160を介して互いに接続されている。   A mobile phone 1100 shown in FIG. 41 includes a main control unit 1150, a power supply circuit unit 1151, an operation input control unit 1152, an image encoder 1153, a camera I / F unit 1154, an LCD control, which are configured to control each unit in an integrated manner. Section 1155, image decoder 1156, demultiplexing section 1157, recording / reproducing section 1162, modulation / demodulation circuit section 1158, and audio codec 1159. These are connected to each other via a bus 1160.

また、携帯電話機1100は、操作キー1119、CCD(Charge Coupled Devices)カメラ1116、液晶ディスプレイ1118、記憶部1123、送受信回路部1163、アンテナ1114、マイクロホン(マイク)1121、およびスピーカ1117を有する。   The mobile phone 1100 includes an operation key 1119, a CCD (Charge Coupled Devices) camera 1116, a liquid crystal display 1118, a storage unit 1123, a transmission / reception circuit unit 1163, an antenna 1114, a microphone (microphone) 1121, and a speaker 1117.

電源回路部1151は、ユーザの操作により終話および電源キーがオン状態にされると、バッテリパックから各部に対して電力を供給することにより携帯電話機1100を動作可能な状態に起動する。   When the end call and the power key are turned on by the user's operation, the power supply circuit unit 1151 starts up the mobile phone 1100 in an operable state by supplying power from the battery pack to each unit.

携帯電話機1100は、CPU、ROMおよびRAM等でなる主制御部1150の制御に基づいて、音声通話モードやデータ通信モード等の各種モードで、音声信号の送受信、電子メールや画像データの送受信、画像撮影、またはデータ記録等の各種動作を行う。   The mobile phone 1100 transmits and receives voice signals, e-mails and image data, and images in various modes such as a voice call mode and a data communication mode based on the control of the main control unit 1150 including a CPU, a ROM, a RAM, and the like. Various operations such as shooting or data recording are performed.

例えば、音声通話モードにおいて、携帯電話機1100は、マイクロホン(マイク)1121で集音した音声信号を、音声コーデック1159によってデジタル音声データに変換し、これを変復調回路部1158でスペクトラム拡散処理し、送受信回路部1163でデジタルアナログ変換処理および周波数変換処理する。携帯電話機1100は、その変換処理により得られた送信用信号を、アンテナ1114を介して図示しない基地局へ送信する。基地局へ伝送された送信用信号(音声信号)は、公衆電話回線網を介して通話相手の携帯電話機に供給される。   For example, in the voice call mode, the mobile phone 1100 converts the voice signal collected by the microphone (microphone) 1121 into digital voice data by the voice codec 1159, performs spectrum spread processing by the modulation / demodulation circuit unit 1158, and transmits and receives The unit 1163 performs digital / analog conversion processing and frequency conversion processing. The cellular phone 1100 transmits the transmission signal obtained by the conversion process to a base station (not shown) via the antenna 1114. The transmission signal (voice signal) transmitted to the base station is supplied to the mobile phone of the other party via the public telephone line network.

また、例えば、音声通話モードにおいて、携帯電話機1100は、アンテナ1114で受信した受信信号を送受信回路部1163で増幅し、さらに周波数変換処理およびアナログデジタル変換処理し、変復調回路部1158でスペクトラム逆拡散処理し、音声コーデック1159によってアナログ音声信号に変換する。携帯電話機1100は、その変換して得られたアナログ音声信号をスピーカ1117から出力する。   Further, for example, in the voice call mode, the cellular phone 1100 amplifies the received signal received by the antenna 1114 by the transmission / reception circuit unit 1163, further performs frequency conversion processing and analog-digital conversion processing, and performs spectrum despreading processing by the modulation / demodulation circuit unit 1158. Then, the audio codec 1159 converts it into an analog audio signal. The cellular phone 1100 outputs an analog audio signal obtained by the conversion from the speaker 1117.

更に、例えば、データ通信モードにおいて電子メールを送信する場合、携帯電話機1100は、操作キー1119の操作によって入力された電子メールのテキストデータを、操作入力制御部1152において受け付ける。携帯電話機1100は、そのテキストデータを主制御部1150において処理し、LCD制御部1155を介して、画像として液晶ディスプレイ1118に表示させる。   Further, for example, when transmitting an e-mail in the data communication mode, the mobile phone 1100 receives e-mail text data input by operating the operation key 1119 in the operation input control unit 1152. The cellular phone 1100 processes the text data in the main control unit 1150 and displays it on the liquid crystal display 1118 as an image via the LCD control unit 1155.

また、携帯電話機1100は、主制御部1150において、操作入力制御部1152が受け付けたテキストデータやユーザ指示等に基づいて電子メールデータを生成する。携帯電話機1100は、その電子メールデータを、変復調回路部1158でスペクトラム拡散処理し、送受信回路部1163でデジタルアナログ変換処理および周波数変換処理する。携帯電話機1100は、その変換処理により得られた送信用信号を、アンテナ1114を介して図示しない基地局へ送信する。基地局へ伝送された送信用信号(電子メール)は、ネットワークおよびメールサーバ等を介して、所定のあて先に供給される。   In addition, the mobile phone 1100 generates e-mail data in the main control unit 1150 based on text data received by the operation input control unit 1152, user instructions, and the like. The cellular phone 1100 performs spread spectrum processing on the e-mail data by the modulation / demodulation circuit unit 1158 and digital / analog conversion processing and frequency conversion processing by the transmission / reception circuit unit 1163. The cellular phone 1100 transmits the transmission signal obtained by the conversion process to a base station (not shown) via the antenna 1114. The transmission signal (e-mail) transmitted to the base station is supplied to a predetermined destination via a network and a mail server.

また、例えば、データ通信モードにおいて電子メールを受信する場合、携帯電話機1100は、基地局から送信された信号を、アンテナ1114を介して送受信回路部1163で受信し、増幅し、さらに周波数変換処理およびアナログデジタル変換処理する。携帯電話機1100は、その受信信号を変復調回路部1158でスペクトラム逆拡散処理して元の電子メールデータを復元する。携帯電話機1100は、復元された電子メールデータを、LCD制御部1155を介して液晶ディスプレイ1118に表示する。   Further, for example, when receiving an e-mail in the data communication mode, the mobile phone 1100 receives and amplifies the signal transmitted from the base station by the transmission / reception circuit unit 1163 via the antenna 1114, and further performs frequency conversion processing and Analog-digital conversion processing. The cellular phone 1100 performs spectrum despreading processing on the received signal by the modulation / demodulation circuit unit 1158 to restore the original e-mail data. The cellular phone 1100 displays the restored e-mail data on the liquid crystal display 1118 via the LCD control unit 1155.

なお、携帯電話機1100は、受信した電子メールデータを、記録再生部1162を介して、記憶部1123に記録する(記憶させる)ことも可能である。   Note that the mobile phone 1100 can also record (store) the received e-mail data in the storage unit 1123 via the recording / playback unit 1162.

この記憶部1123は、書き換え可能な任意の記憶媒体である。記憶部1123は、例えば、RAMや内蔵型フラッシュメモリ等の半導体メモリであってもよいし、ハードディスクであってもよいし、磁気ディスク、光磁気ディスク、光ディスク、USBメモリ、またはメモリカード等のリムーバブルメディアであってもよい。もちろん、これら以外のものであってもよい。   The storage unit 1123 is an arbitrary rewritable storage medium. The storage unit 1123 may be, for example, a semiconductor memory such as a RAM or a built-in flash memory, a hard disk, or a removable disk such as a magnetic disk, a magneto-optical disk, an optical disk, a USB memory, or a memory card. It may be media. Of course, other than these may be used.

さらに、例えば、データ通信モードにおいて画像データを送信する場合、携帯電話機1100は、撮像によりCCDカメラ1116で画像データを生成する。CCDカメラ1116は、レンズや絞り等の光学デバイスと光電変換素子としてのCCDを有し、被写体を撮像し、受光した光の強度を電気信号に変換し、被写体の画像の画像データを生成する。CCDカメラ1116は、その画像データを、カメラI/F部1154を介して、画像エンコーダ1153で符号化し、符号化画像データに変換する。   Furthermore, for example, when transmitting image data in the data communication mode, the mobile phone 1100 generates image data with the CCD camera 1116 by imaging. The CCD camera 1116 has an optical device such as a lens and a diaphragm and a CCD as a photoelectric conversion element, images a subject, converts the intensity of received light into an electrical signal, and generates image data of the subject image. The CCD camera 1116 encodes the image data by the image encoder 1153 via the camera I / F unit 1154 and converts the encoded image data into encoded image data.

携帯電話機1100は、このような処理を行う画像エンコーダ1153として、上述した画像符号化装置300を用いる。画像エンコーダ1153は、画像符号化装置300の場合と同様に、イントラ予測のモードを適応的に制限し、さらに、イントラ予測モード情報に割り当てる2値化の符号長を適応的に制御する。つまり、画像エンコーダ1153は、イントラ予測モードが増大することによるイントラ予測モード情報の不要な符号長の増大を抑制することができる。これにより、画像エンコーダ1153は、符号化データの符号化効率を向上させることができる。   The cellular phone 1100 uses the above-described image encoding device 300 as the image encoder 1153 that performs such processing. Similar to the case of the image coding apparatus 300, the image encoder 1153 adaptively limits the intra prediction mode, and further adaptively controls the code length of binarization assigned to the intra prediction mode information. That is, the image encoder 1153 can suppress an unnecessary increase in code length of the intra prediction mode information due to the increase in the intra prediction mode. Accordingly, the image encoder 1153 can improve the encoding efficiency of the encoded data.

なお、携帯電話機1100は、このとき同時に、CCDカメラ1116で撮像中にマイクロホン(マイク)1121で集音した音声を、音声コーデック1159においてアナログデジタル変換し、さらに符号化する。   At the same time, the cellular phone 1100 converts the sound collected by the microphone (microphone) 1121 during imaging by the CCD camera 1116 from analog to digital at the audio codec 1159 and further encodes it.

携帯電話機1100は、多重分離部1157において、画像エンコーダ1153から供給された符号化画像データと、音声コーデック1159から供給されたデジタル音声データとを、所定の方式で多重化する。携帯電話機1100は、その結果得られる多重化データを、変復調回路部1158でスペクトラム拡散処理し、送受信回路部1163でデジタルアナログ変換処理および周波数変換処理する。携帯電話機1100は、その変換処理により得られた送信用信号を、アンテナ1114を介して図示しない基地局へ送信する。基地局へ伝送された送信用信号(画像データ)は、ネットワーク等を介して、通信相手に供給される。   The cellular phone 1100 multiplexes the encoded image data supplied from the image encoder 1153 and the digital audio data supplied from the audio codec 1159 in a demultiplexing unit 1157 using a predetermined method. The cellular phone 1100 performs spread spectrum processing on the multiplexed data obtained as a result by the modulation / demodulation circuit unit 1158 and digital / analog conversion processing and frequency conversion processing by the transmission / reception circuit unit 1163. The cellular phone 1100 transmits the transmission signal obtained by the conversion process to a base station (not shown) via the antenna 1114. A transmission signal (image data) transmitted to the base station is supplied to a communication partner via a network or the like.

なお、画像データを送信しない場合、携帯電話機1100は、CCDカメラ1116で生成した画像データを、画像エンコーダ1153を介さずに、LCD制御部1155を介して液晶ディスプレイ1118に表示させることもできる。   When image data is not transmitted, the mobile phone 1100 can also display the image data generated by the CCD camera 1116 on the liquid crystal display 1118 via the LCD control unit 1155 without using the image encoder 1153.

また、例えば、データ通信モードにおいて、簡易ホームページ等にリンクされた動画像ファイルのデータを受信する場合、携帯電話機1100は、基地局から送信された信号を、アンテナ1114を介して送受信回路部1163で受信し、増幅し、さらに周波数変換処理およびアナログデジタル変換処理する。携帯電話機1100は、その受信信号を変復調回路部1158でスペクトラム逆拡散処理して元の多重化データを復元する。携帯電話機1100は、多重分離部1157において、その多重化データを分離して、符号化画像データと音声データとに分ける。   Further, for example, when receiving data of a moving image file linked to a simple homepage or the like in the data communication mode, the mobile phone 1100 transmits a signal transmitted from the base station to the transmission / reception circuit unit 1163 via the antenna 1114. Receive, amplify, and further perform frequency conversion processing and analog-digital conversion processing. The cellular phone 1100 restores the original multiplexed data by subjecting the received signal to spectrum despreading processing by the modulation / demodulation circuit unit 1158. In the cellular phone 1100, the demultiplexing unit 1157 separates the multiplexed data and divides it into encoded image data and audio data.

携帯電話機1100は、画像デコーダ1156において符号化画像データをデコードすることにより、再生動画像データを生成し、これを、LCD制御部1155を介して液晶ディスプレイ1118に表示させる。これにより、例えば、簡易ホームページにリンクされた動画像ファイルに含まれる動画データが液晶ディスプレイ1118に表示される。   The cellular phone 1100 generates reproduced moving image data by decoding the encoded image data in the image decoder 1156, and displays it on the liquid crystal display 1118 via the LCD control unit 1155. Thereby, for example, the moving image data included in the moving image file linked to the simple homepage is displayed on the liquid crystal display 1118.

携帯電話機1100は、このような処理を行う画像デコーダ1156として、上述した画像復号装置400を用いる。つまり、画像デコーダ1156は、画像復号装置400の場合と同様に、符号化側から供給されるイントラ予測モード制限フラグの値に応じて符号長を決定し、その符号長を用いて、イントラ予測モード情報の2値データを逆2値化する。したがって、画像デコーダ1156は、イントラ予測モードを適応的に制限してイントラ符号化された符号化データを適切に復号することができる。これにより、画像デコーダ1156は、符号化データの符号化効率を向上させることができる。   The cellular phone 1100 uses the above-described image decoding device 400 as the image decoder 1156 that performs such processing. That is, as in the case of the image decoding apparatus 400, the image decoder 1156 determines a code length according to the value of the intra prediction mode restriction flag supplied from the encoding side, and uses the code length to determine the intra prediction mode. The binary data of information is binarized. Therefore, the image decoder 1156 can appropriately decode the encoded data that is intra-encoded by adaptively limiting the intra-prediction mode. Thereby, the image decoder 1156 can improve the encoding efficiency of encoded data.

このとき、携帯電話機1100は、同時に、音声コーデック1159において、デジタルの音声データをアナログ音声信号に変換し、これをスピーカ1117より出力させる。これにより、例えば、簡易ホームページにリンクされた動画像ファイルに含まれる音声データが再生される。   At this time, the cellular phone 1100 simultaneously converts digital audio data into an analog audio signal in the audio codec 1159 and outputs the analog audio signal from the speaker 1117. Thereby, for example, audio data included in the moving image file linked to the simple homepage is reproduced.

なお、電子メールの場合と同様に、携帯電話機1100は、受信した簡易ホームページ等にリンクされたデータを、記録再生部1162を介して、記憶部1123に記録する(記憶させる)ことも可能である。   As in the case of e-mail, the mobile phone 1100 can record (store) the data linked to the received simplified home page in the storage unit 1123 via the recording / playback unit 1162. .

また、携帯電話機1100は、主制御部1150において、撮像されてCCDカメラ1116で得られた2次元コードを解析し、2次元コードに記録された情報を取得することができる。   Further, the mobile phone 1100 can analyze the two-dimensional code captured by the CCD camera 1116 and acquire information recorded in the two-dimensional code in the main control unit 1150.

さらに、携帯電話機1100は、赤外線通信部1181で赤外線により外部の機器と通信することができる。   Further, the cellular phone 1100 can communicate with an external device by infrared rays at the infrared communication unit 1181.

携帯電話機1100は、画像エンコーダ1153として画像符号化装置300を用いることにより、例えばCCDカメラ1116において生成された画像データを符号化して伝送する際に、その符号化データの符号化効率を向上させることができる。   By using the image encoding device 300 as the image encoder 1153, the cellular phone 1100 improves the encoding efficiency of the encoded data, for example, when encoding and transmitting the image data generated by the CCD camera 1116. Can do.

また、携帯電話機1100は、画像デコーダ1156として画像復号装置400を用いることにより、例えば、簡易ホームページ等にリンクされた動画像ファイルのデータ(符号化データ)の符号化効率を向上させることができる。   In addition, the cellular phone 1100 can improve the encoding efficiency of moving image file data (encoded data) linked to a simple homepage by using the image decoding device 400 as the image decoder 1156, for example.

なお、以上において、携帯電話機1100が、CCDカメラ1116を用いるように説明したが、このCCDカメラ1116の代わりに、CMOS(Complementary Metal Oxide Semiconductor)を用いたイメージセンサ(CMOSイメージセンサ)を用いるようにしてもよい。この場合も、携帯電話機1100は、CCDカメラ1116を用いる場合と同様に、被写体を撮像し、被写体の画像の画像データを生成することができる。   In the above description, the mobile phone 1100 is described as using the CCD camera 1116, but instead of the CCD camera 1116, an image sensor (CMOS image sensor) using a CMOS (Complementary Metal Oxide Semiconductor) is used. May be. Also in this case, the mobile phone 1100 can capture an image of a subject and generate image data of the image of the subject, as in the case where the CCD camera 1116 is used.

また、以上においては携帯電話機1100として説明したが、例えば、PDA(Personal Digital Assistants)、スマートフォン、UMPC(Ultra Mobile Personal Computer)、ネットブック、ノート型パーソナルコンピュータ等、この携帯電話機1100と同様の撮像機能や通信機能を有する装置であれば、どのような装置であっても携帯電話機1100の場合と同様に、本発明を適用した画像符号化装置および画像復号装置を適用することができる。   In the above description, the cellular phone 1100 has been described. For example, an imaging function similar to that of the cellular phone 1100 such as a PDA (Personal Digital Assistants), a smartphone, an UMPC (Ultra Mobile Personal Computer), a netbook, a notebook personal computer, or the like. As in the case of the mobile phone 1100, any image encoding device and image decoding device to which the present invention is applied can be applied to any device as long as the device has a communication function.

<6.第6の実施の形態>
[ハードディスクレコーダ]
図42は、本発明を適用した画像符号化装置および画像復号装置を用いるハードディスクレコーダの主な構成例を示すブロック図である。
<6. Sixth Embodiment>
[Hard Disk Recorder]
FIG. 42 is a block diagram showing a main configuration example of a hard disk recorder using the image encoding device and the image decoding device to which the present invention is applied.

図42に示されるハードディスクレコーダ(HDDレコーダ)1200は、チューナにより受信された、衛星や地上のアンテナ等より送信される放送波信号(テレビジョン信号)に含まれる放送番組のオーディオデータとビデオデータを、内蔵するハードディスクに保存し、その保存したデータをユーザの指示に応じたタイミングでユーザに提供する装置である。   A hard disk recorder (HDD recorder) 1200 shown in FIG. 42 receives audio data and video data of a broadcast program included in a broadcast wave signal (television signal) transmitted from a satellite or a ground antenna received by a tuner. This is an apparatus for storing in a built-in hard disk and providing the stored data to the user at a timing according to the user's instruction.

ハードディスクレコーダ1200は、例えば、放送波信号よりオーディオデータとビデオデータを抽出し、それらを適宜復号し、内蔵するハードディスクに記憶させることができる。また、ハードディスクレコーダ1200は、例えば、ネットワークを介して他の装置からオーディオデータやビデオデータを取得し、それらを適宜復号し、内蔵するハードディスクに記憶させることもできる。   The hard disk recorder 1200 can extract, for example, audio data and video data from broadcast wave signals, appropriately decode them, and store them in a built-in hard disk. The hard disk recorder 1200 can also acquire audio data and video data from other devices via a network, for example, decode them as appropriate, and store them in a built-in hard disk.

さらに、ハードディスクレコーダ1200は、例えば、内蔵するハードディスクに記録されているオーディオデータやビデオデータを復号してモニタ1260に供給し、モニタ1260の画面にその画像を表示させ、モニタ1260のスピーカよりその音声を出力させることができる。また、ハードディスクレコーダ1200は、例えば、チューナを介して取得された放送波信号より抽出されたオーディオデータとビデオデータ、または、ネットワークを介して他の装置から取得したオーディオデータやビデオデータを復号してモニタ1260に供給し、モニタ1260の画面にその画像を表示させ、モニタ1260のスピーカよりその音声を出力させることもできる。   Further, the hard disk recorder 1200, for example, decodes audio data and video data recorded on the built-in hard disk, supplies them to the monitor 1260, displays the image on the screen of the monitor 1260, and displays the sound from the speaker of the monitor 1260. Can be output. Further, the hard disk recorder 1200 decodes audio data and video data extracted from a broadcast wave signal acquired via a tuner, or audio data and video data acquired from another device via a network, for example. The image can be supplied to the monitor 1260, the image can be displayed on the screen of the monitor 1260, and the sound can be output from the speaker of the monitor 1260.

もちろん、この他の動作も可能である。   Of course, other operations are possible.

図42に示されるように、ハードディスクレコーダ1200は、受信部1221、復調部1222、デマルチプレクサ1223、オーディオデコーダ1224、ビデオデコーダ1225、およびレコーダ制御部1226を有する。ハードディスクレコーダ1200は、さらに、EPGデータメモリ1227、プログラムメモリ1228、ワークメモリ1229、ディスプレイコンバータ1230、OSD(On Screen Display)制御部1231、ディスプレイ制御部1232、記録再生部1233、D/Aコンバータ1234、および通信部1235を有する。   As shown in FIG. 42, the hard disk recorder 1200 includes a receiving unit 1221, a demodulating unit 1222, a demultiplexer 1223, an audio decoder 1224, a video decoder 1225, and a recorder control unit 1226. The hard disk recorder 1200 further includes an EPG data memory 1227, a program memory 1228, a work memory 1229, a display converter 1230, an OSD (On Screen Display) control unit 1231, a display control unit 1232, a recording / playback unit 1233, a D / A converter 1234, And a communication unit 1235.

また、ディスプレイコンバータ1230は、ビデオエンコーダ1241を有する。記録再生部1233は、エンコーダ1251およびデコーダ1252を有する。   In addition, the display converter 1230 includes a video encoder 1241. The recording / playback unit 1233 includes an encoder 1251 and a decoder 1252.

受信部1221は、リモートコントローラ(図示せず)からの赤外線信号を受信し、電気信号に変換してレコーダ制御部1226に出力する。レコーダ制御部1226は、例えば、マイクロプロセッサなどにより構成され、プログラムメモリ1228に記憶されているプログラムに従って、各種の処理を実行する。レコーダ制御部1226は、このとき、ワークメモリ1229を必要に応じて使用する。   The receiving unit 1221 receives an infrared signal from a remote controller (not shown), converts it into an electrical signal, and outputs it to the recorder control unit 1226. The recorder control unit 1226 is constituted by, for example, a microprocessor and executes various processes according to a program stored in the program memory 1228. At this time, the recorder control unit 1226 uses the work memory 1229 as necessary.

通信部1235は、ネットワークに接続され、ネットワークを介して他の装置との通信処理を行う。例えば、通信部1235は、レコーダ制御部1226により制御され、チューナ(図示せず)と通信し、主にチューナに対して選局制御信号を出力する。   The communication unit 1235 is connected to a network and performs communication processing with other devices via the network. For example, the communication unit 1235 is controlled by the recorder control unit 1226, communicates with a tuner (not shown), and mainly outputs a channel selection control signal to the tuner.

復調部1222は、チューナより供給された信号を、復調し、デマルチプレクサ1223に出力する。デマルチプレクサ1223は、復調部1222より供給されたデータを、オーディオデータ、ビデオデータ、およびEPGデータに分離し、それぞれ、オーディオデコーダ1224、ビデオデコーダ1225、またはレコーダ制御部1226に出力する。   The demodulator 1222 demodulates the signal supplied from the tuner and outputs the demodulated signal to the demultiplexer 1223. The demultiplexer 1223 separates the data supplied from the demodulation unit 1222 into audio data, video data, and EPG data, and outputs them to the audio decoder 1224, the video decoder 1225, or the recorder control unit 1226, respectively.

オーディオデコーダ1224は、入力されたオーディオデータをデコードし、記録再生部1233に出力する。ビデオデコーダ1225は、入力されたビデオデータをデコードし、ディスプレイコンバータ1230に出力する。レコーダ制御部1226は、入力されたEPGデータをEPGデータメモリ1227に供給し、記憶させる。   The audio decoder 1224 decodes the input audio data and outputs it to the recording / playback unit 1233. The video decoder 1225 decodes the input video data and outputs it to the display converter 1230. The recorder control unit 1226 supplies the input EPG data to the EPG data memory 1227 for storage.

ディスプレイコンバータ1230は、ビデオデコーダ1225またはレコーダ制御部1226より供給されたビデオデータを、ビデオエンコーダ1241により、例えばNTSC(National Television Standards Committee)方式のビデオデータにエンコードし、記録再生部1233に出力する。また、ディスプレイコンバータ1230は、ビデオデコーダ1225またはレコーダ制御部1226より供給されるビデオデータの画面のサイズを、モニタ1260のサイズに対応するサイズに変換し、ビデオエンコーダ1241によってNTSC方式のビデオデータに変換し、アナログ信号に変換し、ディスプレイ制御部1232に出力する。   The display converter 1230 encodes the video data supplied from the video decoder 1225 or the recorder control unit 1226 into, for example, NTSC (National Television Standards Committee) video data by the video encoder 1241 and outputs the encoded video data to the recording / reproducing unit 1233. The display converter 1230 converts the screen size of the video data supplied from the video decoder 1225 or the recorder control unit 1226 into a size corresponding to the size of the monitor 1260, and converts the video data to NTSC video data by the video encoder 1241. Then, it is converted into an analog signal and output to the display control unit 1232.

ディスプレイ制御部1232は、レコーダ制御部1226の制御のもと、OSD(On Screen Display)制御部1231が出力したOSD信号を、ディスプレイコンバータ1230より入力されたビデオ信号に重畳し、モニタ1260のディスプレイに出力し、表示させる。   The display control unit 1232 superimposes the OSD signal output from the OSD (On Screen Display) control unit 1231 on the video signal input from the display converter 1230 under the control of the recorder control unit 1226, and displays it on the monitor 1260 display. Output and display.

モニタ1260にはまた、オーディオデコーダ1224が出力したオーディオデータが、D/Aコンバータ1234によりアナログ信号に変換されて供給されている。モニタ1260は、このオーディオ信号を内蔵するスピーカから出力する。   The monitor 1260 is also supplied with the audio data output from the audio decoder 1224 after being converted into an analog signal by the D / A converter 1234. The monitor 1260 outputs this audio signal from a built-in speaker.

記録再生部1233は、ビデオデータやオーディオデータ等を記録する記憶媒体としてハードディスクを有する。   The recording / playback unit 1233 includes a hard disk as a storage medium for recording video data, audio data, and the like.

記録再生部1233は、例えば、オーディオデコーダ1224より供給されるオーディオデータを、エンコーダ1251によりエンコードする。また、記録再生部1233は、ディスプレイコンバータ1230のビデオエンコーダ1241より供給されるビデオデータを、エンコーダ1251によりエンコードする。記録再生部1233は、そのオーディオデータの符号化データとビデオデータの符号化データとをマルチプレクサにより合成する。記録再生部1233は、その合成データをチャネルコーディングして増幅し、そのデータを、記録ヘッドを介してハードディスクに書き込む。   For example, the recording / reproducing unit 1233 encodes the audio data supplied from the audio decoder 1224 by the encoder 1251. The recording / playback unit 1233 encodes the video data supplied from the video encoder 1241 of the display converter 1230 by the encoder 1251. The recording / playback unit 1233 combines the encoded data of the audio data and the encoded data of the video data by a multiplexer. The recording / playback unit 1233 amplifies the synthesized data by channel coding, and writes the data to the hard disk via the recording head.

記録再生部1233は、再生ヘッドを介してハードディスクに記録されているデータを再生し、増幅し、デマルチプレクサによりオーディオデータとビデオデータに分離する。記録再生部1233は、デコーダ1252によりオーディオデータおよびビデオデータをデコードする。記録再生部1233は、復号したオーディオデータをD/A変換し、モニタ1260のスピーカに出力する。また、記録再生部1233は、復号したビデオデータをD/A変換し、モニタ1260のディスプレイに出力する。   The recording / playback unit 1233 plays back the data recorded on the hard disk via the playback head, amplifies it, and separates it into audio data and video data by a demultiplexer. The recording / playback unit 1233 uses the decoder 1252 to decode the audio data and the video data. The recording / playback unit 1233 performs D / A conversion on the decoded audio data and outputs it to the speaker of the monitor 1260. In addition, the recording / playback unit 1233 performs D / A conversion on the decoded video data and outputs it to the display of the monitor 1260.

レコーダ制御部1226は、受信部1221を介して受信されるリモートコントローラからの赤外線信号により示されるユーザ指示に基づいて、EPGデータメモリ1227から最新のEPGデータを読み出し、それをOSD制御部1231に供給する。OSD制御部1231は、入力されたEPGデータに対応する画像データを発生し、ディスプレイ制御部1232に出力する。ディスプレイ制御部1232は、OSD制御部1231より入力されたビデオデータをモニタ1260のディスプレイに出力し、表示させる。これにより、モニタ1260のディスプレイには、EPG(電子番組ガイド)が表示される。   The recorder control unit 1226 reads the latest EPG data from the EPG data memory 1227 based on the user instruction indicated by the infrared signal from the remote controller received via the receiving unit 1221, and supplies it to the OSD control unit 1231. To do. The OSD control unit 1231 generates image data corresponding to the input EPG data, and outputs the image data to the display control unit 1232. The display control unit 1232 outputs the video data input from the OSD control unit 1231 to the display of the monitor 1260 for display. As a result, an EPG (electronic program guide) is displayed on the display of the monitor 1260.

また、ハードディスクレコーダ1200は、インターネット等のネットワークを介して他の装置から供給されるビデオデータ、オーディオデータ、またはEPGデータ等の各種データを取得することができる。   Also, the hard disk recorder 1200 can acquire various data such as video data, audio data, or EPG data supplied from another device via a network such as the Internet.

通信部1235は、レコーダ制御部1226に制御され、ネットワークを介して他の装置から送信されるビデオデータ、オーディオデータ、およびEPGデータ等の符号化データを取得し、それをレコーダ制御部1226に供給する。レコーダ制御部1226は、例えば、取得したビデオデータやオーディオデータの符号化データを記録再生部1233に供給し、ハードディスクに記憶させる。このとき、レコーダ制御部1226および記録再生部1233が、必要に応じて再エンコード等の処理を行うようにしてもよい。   The communication unit 1235 is controlled by the recorder control unit 1226, acquires encoded data such as video data, audio data, and EPG data transmitted from another device via the network, and supplies the encoded data to the recorder control unit 1226. To do. For example, the recorder control unit 1226 supplies the encoded data of the acquired video data and audio data to the recording / playback unit 1233 and stores it in the hard disk. At this time, the recorder control unit 1226 and the recording / playback unit 1233 may perform processing such as re-encoding as necessary.

また、レコーダ制御部1226は、取得したビデオデータやオーディオデータの符号化データを復号し、得られるビデオデータをディスプレイコンバータ1230に供給する。ディスプレイコンバータ1230は、ビデオデコーダ1225から供給されるビデオデータと同様に、レコーダ制御部1226から供給されるビデオデータを処理し、ディスプレイ制御部1232を介してモニタ1260に供給し、その画像を表示させる。   Also, the recorder control unit 1226 decodes the acquired encoded data of video data and audio data, and supplies the obtained video data to the display converter 1230. Similar to the video data supplied from the video decoder 1225, the display converter 1230 processes the video data supplied from the recorder control unit 1226, supplies the processed video data to the monitor 1260 via the display control unit 1232, and displays the image. .

また、この画像表示に合わせて、レコーダ制御部1226が、復号したオーディオデータを、D/Aコンバータ1234を介してモニタ1260に供給し、その音声をスピーカから出力させるようにしてもよい。   In accordance with the image display, the recorder control unit 1226 may supply the decoded audio data to the monitor 1260 via the D / A converter 1234 and output the sound from the speaker.

さらに、レコーダ制御部1226は、取得したEPGデータの符号化データを復号し、復号したEPGデータをEPGデータメモリ1227に供給する。   Further, the recorder control unit 1226 decodes the encoded data of the acquired EPG data, and supplies the decoded EPG data to the EPG data memory 1227.

以上のようなハードディスクレコーダ1200は、ビデオデコーダ1225、デコーダ1252、およびレコーダ制御部1226に内蔵されるデコーダとして画像復号装置400を用いる。つまり、ビデオデコーダ1225、デコーダ1252、およびレコーダ制御部1226に内蔵されるデコーダは、画像復号装置400の場合と同様に、符号化側から供給されるイントラ予測モード制限フラグの値に応じて符号長を決定し、その符号長を用いて、イントラ予測モード情報の2値データを逆2値化する。したがって、ビデオデコーダ1225、デコーダ1252、およびレコーダ制御部1226に内蔵されるデコーダは、イントラ予測モードを適応的に制限してイントラ符号化された符号化データを適切に復号することができる。これにより、ビデオデコーダ1225、デコーダ1252、およびレコーダ制御部1226に内蔵されるデコーダは、符号化データの符号化効率を向上させることができる。   The hard disk recorder 1200 as described above uses the image decoding device 400 as a decoder incorporated in the video decoder 1225, the decoder 1252, and the recorder control unit 1226. That is, the decoder incorporated in the video decoder 1225, the decoder 1252, and the recorder control unit 1226 has a code length corresponding to the value of the intra prediction mode restriction flag supplied from the encoding side, as in the case of the image decoding device 400. And the binary data of the intra prediction mode information is binarized using the code length. Therefore, the video decoder 1225, the decoder 1252, and the decoder built in the recorder control unit 1226 can appropriately decode the intra-coded data by adaptively limiting the intra prediction mode. Thus, the video decoder 1225, the decoder 1252, and the decoder built in the recorder control unit 1226 can improve the encoding efficiency of the encoded data.

したがって、ハードディスクレコーダ1200は、例えば、チューナや通信部1235が受信するビデオデータ(符号化データ)や、記録再生部1233が再生するビデオデータ(符号化データ)の符号化効率を向上させることができる。   Therefore, the hard disk recorder 1200 can improve the encoding efficiency of video data (encoded data) received by the tuner or communication unit 1235 and video data (encoded data) reproduced by the recording / reproducing unit 1233, for example. .

また、ハードディスクレコーダ1200は、エンコーダ1251として画像符号化装置300を用いる。したがって、エンコーダ1251は、画像符号化装置300の場合と同様に、イントラ予測のモードを適応的に制限し、さらに、イントラ予測モード情報に割り当てる2値化の符号長を適応的に制御する。つまり、エンコーダ1251は、イントラ予測モードが増大することによるイントラ予測モード情報の不要な符号長の増大を抑制することができる。これにより、エンコーダ1251は、符号化データの符号化効率を向上させることができる。   The hard disk recorder 1200 uses the image encoding device 300 as the encoder 1251. Therefore, as in the case of the image coding apparatus 300, the encoder 1251 adaptively restricts the intra prediction mode and adaptively controls the binarization code length assigned to the intra prediction mode information. That is, the encoder 1251 can suppress an unnecessary increase in code length of the intra prediction mode information due to the increase of the intra prediction mode. Thereby, the encoder 1251 can improve the encoding efficiency of encoded data.

したがって、ハードディスクレコーダ1200は、例えば、ハードディスクに記録する符号化データの符号化効率を向上させることができる。   Therefore, the hard disk recorder 1200 can improve the encoding efficiency of the encoded data recorded on the hard disk, for example.

なお、以上においては、ビデオデータやオーディオデータをハードディスクに記録するハードディスクレコーダ1200について説明したが、もちろん、記録媒体はどのようなものであってもよい。例えばフラッシュメモリ、光ディスク、またはビデオテープ等、ハードディスク以外の記録媒体を適用するレコーダであっても、上述したハードディスクレコーダ1200の場合と同様に、本発明を適用した画像符号化装置300および画像復号装置400を適用することができる。   In the above description, the hard disk recorder 1200 for recording video data and audio data on the hard disk has been described. Of course, any recording medium may be used. For example, even in a recorder to which a recording medium other than a hard disk such as a flash memory, an optical disk, or a video tape is applied, as in the case of the hard disk recorder 1200 described above, an image encoding device 300 and an image decoding device to which the present invention is applied. 400 can be applied.

<7.第7の実施の形態>
[カメラ]
図43は、本発明を適用した画像符号化装置および画像復号装置を用いるカメラの主な構成例を示すブロック図である。
<7. Seventh Embodiment>
[camera]
FIG. 43 is a block diagram illustrating a main configuration example of a camera using the image encoding device and the image decoding device to which the present invention has been applied.

図43に示されるカメラ1300は、被写体を撮像し、被写体の画像をLCD1316に表示させたり、それを画像データとして、記録メディア1333に記録したりする。   The camera 1300 shown in FIG. 43 images a subject and displays an image of the subject on the LCD 1316 or records it on the recording medium 1333 as image data.

レンズブロック1311は、光(すなわち、被写体の映像)を、CCD/CMOS1312に入射させる。CCD/CMOS1312は、CCDまたはCMOSを用いたイメージセンサであり、受光した光の強度を電気信号に変換し、カメラ信号処理部1313に供給する。   The lens block 1311 causes light (that is, an image of the subject) to enter the CCD / CMOS 1312. The CCD / CMOS 1312 is an image sensor using CCD or CMOS, converts the intensity of received light into an electric signal, and supplies it to the camera signal processing unit 1313.

カメラ信号処理部1313は、CCD/CMOS1312から供給された電気信号を、Y,Cr,Cbの色差信号に変換し、画像信号処理部1314に供給する。画像信号処理部1314は、コントローラ1321の制御の下、カメラ信号処理部1313から供給された画像信号に対して所定の画像処理を施したり、その画像信号をエンコーダ1341で符号化したりする。画像信号処理部1314は、画像信号を符号化して生成した符号化データを、デコーダ1315に供給する。さらに、画像信号処理部1314は、オンスクリーンディスプレイ(OSD)1320において生成された表示用データを取得し、それをデコーダ1315に供給する。   The camera signal processing unit 1313 converts the electrical signal supplied from the CCD / CMOS 1312 into Y, Cr, and Cb color difference signals, and supplies them to the image signal processing unit 1314. The image signal processing unit 1314 performs predetermined image processing on the image signal supplied from the camera signal processing unit 1313 or encodes the image signal with the encoder 1341 under the control of the controller 1321. The image signal processing unit 1314 supplies encoded data generated by encoding the image signal to the decoder 1315. Further, the image signal processing unit 1314 acquires display data generated in the on-screen display (OSD) 1320 and supplies it to the decoder 1315.

以上の処理において、カメラ信号処理部1313は、バス1317を介して接続されるDRAM(Dynamic Random Access Memory)1318を適宜利用し、必要に応じて画像データや、その画像データが符号化された符号化データ等をそのDRAM1318に保持させる。   In the above processing, the camera signal processing unit 1313 appropriately uses a DRAM (Dynamic Random Access Memory) 1318 connected via the bus 1317, and image data or a code obtained by encoding the image data as necessary. The digitized data or the like is held in the DRAM 1318.

デコーダ1315は、画像信号処理部1314から供給された符号化データを復号し、得られた画像データ(復号画像データ)をLCD1316に供給する。また、デコーダ1315は、画像信号処理部1314から供給された表示用データをLCD1316に供給する。LCD1316は、デコーダ1315から供給された復号画像データの画像と表示用データの画像を適宜合成し、その合成画像を表示する。   The decoder 1315 decodes the encoded data supplied from the image signal processing unit 1314 and supplies the obtained image data (decoded image data) to the LCD 1316. In addition, the decoder 1315 supplies the display data supplied from the image signal processing unit 1314 to the LCD 1316. The LCD 1316 appropriately synthesizes the image of the decoded image data supplied from the decoder 1315 and the image of the display data, and displays the synthesized image.

オンスクリーンディスプレイ1320は、コントローラ1321の制御の下、記号、文字、または図形からなるメニュー画面やアイコンなどの表示用データを、バス1317を介して画像信号処理部1314に出力する。   Under the control of the controller 1321, the on-screen display 1320 outputs display data such as menu screens and icons composed of symbols, characters, or graphics to the image signal processing unit 1314 via the bus 1317.

コントローラ1321は、ユーザが操作部1322を用いて指令した内容を示す信号に基づいて、各種処理を実行するとともに、バス1317を介して、画像信号処理部1314、DRAM1318、外部インタフェース1319、オンスクリーンディスプレイ1320、およびメディアドライブ1323等を制御する。FLASH ROM1324には、コントローラ1321が各種処理を実行する上で必要なプログラムやデータ等が格納される。   The controller 1321 executes various processes based on a signal indicating the content instructed by the user using the operation unit 1322, and also via the bus 1317, an image signal processing unit 1314, a DRAM 1318, an external interface 1319, an on-screen display. 1320, media drive 1323, and the like are controlled. The FLASH ROM 1324 stores programs and data necessary for the controller 1321 to execute various processes.

例えば、コントローラ1321は、画像信号処理部1314やデコーダ1315に代わって、DRAM1318に記憶されている画像データを符号化したり、DRAM1318に記憶されている符号化データを復号したりすることができる。このとき、コントローラ1321は、画像信号処理部1314やデコーダ1315の符号化・復号方式と同様の方式によって符号化・復号処理を行うようにしてもよいし、画像信号処理部1314やデコーダ1315が対応していない方式により符号化・復号処理を行うようにしてもよい。   For example, the controller 1321 can encode the image data stored in the DRAM 1318 or decode the encoded data stored in the DRAM 1318 instead of the image signal processing unit 1314 or the decoder 1315. At this time, the controller 1321 may be configured to perform encoding / decoding processing by a method similar to the encoding / decoding method of the image signal processing unit 1314 or the decoder 1315, or the image signal processing unit 1314 or the decoder 1315 is compatible. The encoding / decoding process may be performed by a method that is not performed.

また、例えば、操作部1322から画像印刷の開始が指示された場合、コントローラ1321は、DRAM1318から画像データを読み出し、それを、バス1317を介して外部インタフェース1319に接続されるプリンタ1334に供給して印刷させる。   For example, when the start of image printing is instructed from the operation unit 1322, the controller 1321 reads out image data from the DRAM 1318 and supplies it to the printer 1334 connected to the external interface 1319 via the bus 1317. Let it print.

さらに、例えば、操作部1322から画像記録が指示された場合、コントローラ1321は、DRAM1318から符号化データを読み出し、それを、バス1317を介してメディアドライブ1323に装着される記録メディア1333に供給して記憶させる。   Further, for example, when image recording is instructed from the operation unit 1322, the controller 1321 reads the encoded data from the DRAM 1318 and supplies it to the recording medium 1333 mounted on the media drive 1323 via the bus 1317. Remember me.

記録メディア1333は、例えば、磁気ディスク、光磁気ディスク、光ディスク、または半導体メモリ等の、読み書き可能な任意のリムーバブルメディアである。記録メディア1333は、もちろん、リムーバブルメディアとしての種類も任意であり、テープデバイスであってもよいし、ディスクであってもよいし、メモリカードであってもよい。もちろん、非接触ICカード等であっても良い。   The recording medium 1333 is an arbitrary readable / writable removable medium such as a magnetic disk, a magneto-optical disk, an optical disk, or a semiconductor memory. Of course, the recording medium 1333 may be of any kind as a removable medium, and may be a tape device, a disk, or a memory card. Of course, a non-contact IC card or the like may be used.

また、メディアドライブ1323と記録メディア1333を一体化し、例えば、内蔵型ハードディスクドライブやSSD(Solid State Drive)等のように、非可搬性の記憶媒体により構成されるようにしてもよい。   Further, the media drive 1323 and the recording medium 1333 may be integrated and configured by a non-portable storage medium such as a built-in hard disk drive or SSD (Solid State Drive).

外部インタフェース1319は、例えば、USB入出力端子などで構成され、画像の印刷を行う場合に、プリンタ1334と接続される。また、外部インタフェース1319には、必要に応じてドライブ1331が接続され、磁気ディスク、光ディスク、あるいは光磁気ディスクなどのリムーバブルメディア1332が適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じて、FLASH ROM1324にインストールされる。   The external interface 1319 is composed of, for example, a USB input / output terminal, and is connected to the printer 1334 when printing an image. In addition, a drive 1331 is connected to the external interface 1319 as necessary, and a removable medium 1332 such as a magnetic disk, an optical disk, or a magneto-optical disk is appropriately mounted, and a computer program read from them is loaded as necessary. Installed in the FLASH ROM 1324.

さらに、外部インタフェース1319は、LANやインターネット等の所定のネットワークに接続されるネットワークインタフェースを有する。コントローラ1321は、例えば、操作部1322からの指示に従って、DRAM1318から符号化データを読み出し、それを外部インタフェース1319から、ネットワークを介して接続される他の装置に供給させることができる。また、コントローラ1321は、ネットワークを介して他の装置から供給される符号化データや画像データを、外部インタフェース1319を介して取得し、それをDRAM1318に保持させたり、画像信号処理部1314に供給したりすることができる。   Furthermore, the external interface 1319 has a network interface connected to a predetermined network such as a LAN or the Internet. For example, the controller 1321 can read the encoded data from the DRAM 1318 in accordance with an instruction from the operation unit 1322 and supply the encoded data to the other device connected via the network from the external interface 1319. In addition, the controller 1321 acquires encoded data and image data supplied from another device via the network via the external interface 1319, holds the data in the DRAM 1318, or supplies it to the image signal processing unit 1314. Can be.

以上のようなカメラ1300は、デコーダ1315として画像復号装置400を用いる。つまり、デコーダ1315は、画像復号装置400の場合と同様に、符号化側から供給されるイントラ予測モード制限フラグの値に応じて符号長を決定し、その符号長を用いて、イントラ予測モード情報の2値データを逆2値化する。したがって、デコーダ1315は、イントラ予測モードを適応的に制限してイントラ符号化された符号化データを適切に復号することができる。これにより、デコーダ1315は、符号化データの符号化効率を向上させることができる。   The camera 1300 as described above uses the image decoding device 400 as the decoder 1315. That is, similarly to the case of the image decoding apparatus 400, the decoder 1315 determines the code length according to the value of the intra prediction mode restriction flag supplied from the encoding side, and uses the code length to generate intra prediction mode information. The binary data is converted into a binary inverse. Therefore, the decoder 1315 can appropriately decode the encoded data that is intra-encoded by adaptively limiting the intra-prediction mode. Thereby, the decoder 1315 can improve the encoding efficiency of encoded data.

したがって、カメラ1300は、例えば、CCD/CMOS1312において生成される画像データや、DRAM1318または記録メディア1333から読み出すビデオデータの符号化データや、ネットワークを介して取得するビデオデータの符号化データの符号化効率を向上させることができる。   Therefore, the camera 1300, for example, encodes image data generated in the CCD / CMOS 1312, encoded data of video data read from the DRAM 1318 or the recording medium 1333, and encoded efficiency of encoded data of video data acquired via the network. Can be improved.

また、カメラ1300は、エンコーダ1341として画像符号化装置300を用いる。エンコーダ1341は、画像符号化装置300の場合と同様に、イントラ予測のモードを適応的に制限し、さらに、イントラ予測モード情報に割り当てる2値化の符号長を適応的に制御する。つまり、エンコーダ1341は、イントラ予測モードが増大することによるイントラ予測モード情報の不要な符号長の増大を抑制することができる。これにより、エンコーダ1341は、符号化データの符号化効率を向上させることができる。   The camera 1300 uses the image encoding device 300 as the encoder 1341. As in the case of the image coding apparatus 300, the encoder 1341 adaptively restricts the intra prediction mode and adaptively controls the binarization code length assigned to the intra prediction mode information. That is, the encoder 1341 can suppress an unnecessary increase in code length of the intra prediction mode information due to an increase in the intra prediction mode. Thereby, the encoder 1341 can improve the encoding efficiency of encoded data.

したがって、カメラ1300は、例えば、DRAM1318や記録メディア1333に記録する符号化データや、他の装置に提供する符号化データの符号化効率を向上させることができる。   Therefore, for example, the camera 1300 can improve the encoding efficiency of encoded data to be recorded in the DRAM 1318 and the recording medium 1333 and encoded data to be provided to other devices.

なお、コントローラ1321が行う復号処理に画像復号装置200の復号方法を適用するようにしてもよい。同様に、コントローラ1321が行う符号化処理に画像符号化装置100の符号化方法を適用するようにしてもよい。   Note that the decoding method of the image decoding device 200 may be applied to the decoding process performed by the controller 1321. Similarly, the encoding method of the image encoding device 100 may be applied to the encoding process performed by the controller 1321.

また、カメラ1300が撮像する画像データは動画像であってもよいし、静止画像であってもよい。   The image data captured by the camera 1300 may be a moving image or a still image.

もちろん、本発明を適用した画像符号化装置および画像復号装置は、上述した装置以外の装置やシステムにも適用可能である。   Of course, the image coding apparatus and the image decoding apparatus to which the present invention is applied can be applied to apparatuses and systems other than the apparatuses described above.

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

300 画像符号化装置, 306 可逆符号化部, 314 イントラ予測部, 321 モード制限レベル制御部, 331 予測モード記憶部, 332 判定用情報生成部, 333 テーブル記憶部, 334 テーブル選択部, 335 イントラ予測モード制限レベルフラグ生成部, 336 許可モード決定部, 341 イントラ予測モード記憶部, 342 MPM算出部, 343 比較部, 344 テーブル記憶部, 345 符号長決定部, 346 2値化部, 347 エントロピ符号化部, 352 合成部, 400 画像復号装置, 402 可逆復号部, 421 エントロピ復号部,422 逆2値化部, 423 イントラ予測モード記憶部, 424 MPM算出部, 425 テーブル記憶部, 426 符号長決定部   300 image encoding device, 306 lossless encoding unit, 314 intra prediction unit, 321 mode restriction level control unit, 331 prediction mode storage unit, 332 determination information generation unit, 333 table storage unit, 334 table selection unit, 335 intra prediction Mode restriction level flag generation unit, 336 permission mode determination unit, 341 intra prediction mode storage unit, 342 MPM calculation unit, 343 comparison unit, 344 table storage unit, 345 code length determination unit, 346 binarization unit, 347 entropy encoding Unit, 352 synthesis unit, 400 image decoding device, 402 lossless decoding unit, 421 entropy decoding unit, 422 inverse binarization unit, 423 intra prediction mode storage unit, 424 MPM calculation unit, 425 table storage unit, 426 code length determination unit

Claims (18)

符号化する画像の内容に応じて、イントラ予測モードを指定するイントラ予測モード情報に割り当てる2値化の符号長を決定する符号長決定部と、
前記符号長決定部により決定された符号長で前記イントラ予測モード情報を2値化する2値化部と
を備える画像処理装置。
A code length determining unit that determines a code length for binarization to be assigned to intra prediction mode information for designating an intra prediction mode according to the content of an image to be encoded;
An image processing apparatus comprising: a binarization unit that binarizes the intra prediction mode information with the code length determined by the code length determination unit.
前記符号長決定部は、過去に行われたイントラ予測におけるモード選択結果に基づいて前記符号長を決定する
請求項1に記載の画像処理装置。
The image processing device according to claim 1, wherein the code length determination unit determines the code length based on a mode selection result in intra prediction performed in the past.
前記符号長決定部は、現在の処理対象に対するイントラ予測におけるモード選択結果に基づいて前記符号長を決定する
請求項1に記載の画像処理装置。
The image processing device according to claim 1, wherein the code length determination unit determines the code length based on a mode selection result in intra prediction for a current processing target.
前記符号長決定部は、前記モード選択結果に基づいて算出されるコスト関数値に基づいて前記符号長を決定する
請求項3に記載の画像処理装置。
The image processing apparatus according to claim 3, wherein the code length determination unit determines the code length based on a cost function value calculated based on the mode selection result.
符号化する画像の内容に応じて、予め用意されたイントラ予測モードの中から、イントラ予測での使用を許可するモードを決定する許可モード決定部と、
前記許可モード決定部により使用を許可されたイントラ予測モードを用いてイントラ予測を行うイントラ予測部と
をさらに備え、
前記符号長決定部は、前記許可モード決定部により使用を許可されたイントラ予測モードの数に応じて前記符号長を決定する
請求項1に記載の画像処理装置。
According to the content of the image to be encoded, out of the intra prediction modes prepared in advance, a permission mode determination unit that determines a mode that permits use in intra prediction,
An intra prediction unit that performs intra prediction using an intra prediction mode permitted to be used by the permission mode determination unit, and
The image processing device according to claim 1, wherein the code length determination unit determines the code length according to the number of intra prediction modes permitted to be used by the permission mode determination unit.
使用を許可するイントラ予測モードを処理対象の領域の大きさ毎に指定する、前記イントラ予測モードの制限レベル毎のテーブル情報を記憶するテーブル情報記憶部と、
前記テーブル情報記憶部により記憶される各制御レベルのテーブル情報の中から、符号化する画像の内容に応じた制限レベルのテーブル情報を選択するテーブル選択部と
をさらに備え、
前記許可モード決定部は、前記テーブル選択部により選択されたテーブル情報を用いて、前記イントラ予測での使用を許可するモードとして決定する
請求項5に記載の画像処理装置。
A table information storage unit for storing table information for each restriction level of the intra prediction mode, which specifies an intra prediction mode permitted to be used for each size of a region to be processed;
A table selection unit that selects, from among the table information of each control level stored by the table information storage unit, table information of a restriction level according to the content of the image to be encoded;
The image processing apparatus according to claim 5, wherein the permission mode determination unit determines a mode for permitting use in the intra prediction, using the table information selected by the table selection unit.
前記テーブル選択部が選択したテーブル情報の制限レベルを示すフラグ情報を生成するフラグ生成部をさらに備える
請求項6に記載の画像処理装置。
The image processing apparatus according to claim 6, further comprising a flag generation unit that generates flag information indicating a restriction level of the table information selected by the table selection unit.
前記2値化部により前記イントラ予測モード情報が2値化された2値データを符号化する符号化部をさらに備える
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, further comprising: an encoding unit that encodes binary data in which the intra prediction mode information is binarized by the binarization unit.
前記符号長決定部は、所定の処理単位毎に前記符号長を決定する
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the code length determination unit determines the code length for each predetermined processing unit.
画像処理装置の画像処理方法であって、
符号長決定部が、符号化する画像の内容に応じて、イントラ予測モードを指定するイントラ予測モード情報に割り当てる2値化の符号長を決定し、
2値化部が、決定された符号長で前記イントラ予測モード情報を2値化する
画像処理方法。
An image processing method of an image processing apparatus,
The code length determination unit determines the code length of binarization assigned to the intra prediction mode information that specifies the intra prediction mode according to the content of the image to be encoded,
An image processing method in which a binarization unit binarizes the intra prediction mode information with a determined code length.
コンピュータを、
符号化する画像の内容に応じて、イントラ予測モードを指定するイントラ予測モード情報に割り当てる2値化の符号長を決定する符号長決定部、
決定された符号長で前記イントラ予測モード情報を2値化する2値化部
として機能させるためのプログラム。
Computer
A code length determining unit that determines a code length of binarization to be assigned to intra prediction mode information for designating an intra prediction mode according to the content of an image to be encoded;
The program for functioning as a binarization part which binarizes the said intra prediction mode information with the determined code length.
符号化時のイントラ予測において行われたイントラ予測モードの使用制限の度合いを示す制限レベルに基づいて、前記イントラ予測において採用されたイントラ予測モードを指定するイントラ予測モード情報に割り当てられた2値化の符号長を決定する符号長決定部と、
前記符号長決定部により決定された符号長で前記イントラ予測モード情報の2値データを逆2値化する逆2値化部と
を備える画像処理装置。
Binarization assigned to intra prediction mode information that designates an intra prediction mode adopted in the intra prediction based on a restriction level indicating a degree of restriction on the use of the intra prediction mode performed in intra prediction at the time of encoding. A code length determination unit for determining the code length of
An image processing apparatus comprising: an inverse binarization unit that inversely binarizes binary data of the intra prediction mode information with a code length determined by the code length determination unit.
前記制限レベルを示すフラグ情報を取得するフラグ情報取得部をさらに備え、
前記符号長決定部は、前記フラグ情報取得部により取得された前記フラグ情報により示される制限レベルに基づいて、前記符号長を決定する
請求項12に記載の画像処理装置。
A flag information acquisition unit for acquiring flag information indicating the restriction level;
The image processing device according to claim 12, wherein the code length determination unit determines the code length based on a restriction level indicated by the flag information acquired by the flag information acquisition unit.
前記符号長決定部は、前記フラグ情報により示される制限レベルにおいて、処理対象の領域の大きさに応じた符号長を、前記符号長として決定する
請求項13に記載の画像処理装置。
The image processing device according to claim 13, wherein the code length determination unit determines, as the code length, a code length corresponding to a size of a region to be processed at a restriction level indicated by the flag information.
前記逆2値化部により逆2値化されて得られた前記イントラ予測モード情報により示されるイントラ予測モードでイントラ予測を行うイントラ予測部をさらに備える
請求項12に記載の画像処理装置。
The image processing device according to claim 12, further comprising: an intra prediction unit that performs intra prediction in an intra prediction mode indicated by the intra prediction mode information obtained by debinarization by the debinarization unit.
符号化データを復号する復号部をさらに備え、
前記逆2値化部は、前記復号部により復号されて得られた前記イントラ予測モード情報の2値データを、前記符号長決定部により決定された符号長で逆2値化する
請求項12に記載の画像処理装置。
A decoding unit for decoding the encoded data;
The inverse binarization unit inverse binarizes binary data of the intra prediction mode information obtained by decoding by the decoding unit with a code length determined by the code length determination unit. The image processing apparatus described.
画像処理装置の画像処理方法であって、
符号長決定部が、符号化時のイントラ予測において行われたイントラ予測モードの使用制限の度合いを示す制限レベルに基づいて、前記イントラ予測において採用されたイントラ予測モードを指定するイントラ予測モード情報に割り当てられた2値化の符号長を決定し、
逆2値化部が、決定された符号長で前記イントラ予測モード情報の2値データを逆2値化する
画像処理方法。
An image processing method of an image processing apparatus,
In the intra prediction mode information in which the code length determination unit designates the intra prediction mode employed in the intra prediction based on a restriction level indicating a degree of use restriction of the intra prediction mode performed in the intra prediction at the time of encoding. Determine the assigned binarization code length;
An image processing method in which an inverse binarization unit binarizes binary data of the intra prediction mode information with a determined code length.
コンピュータを、
符号化時のイントラ予測において行われたイントラ予測モードの使用制限の度合いを示す制限レベルに基づいて、前記イントラ予測において採用されたイントラ予測モードを指定するイントラ予測モード情報に割り当てられた2値化の符号長を決定する符号長決定部、
決定された符号長で前記イントラ予測モード情報の2値データを逆2値化する逆2値化部
として機能させるためのプログラム。
Computer
Binarization assigned to intra prediction mode information that designates an intra prediction mode adopted in the intra prediction based on a restriction level indicating a degree of restriction on the use of the intra prediction mode performed in intra prediction at the time of encoding. A code length determination unit for determining the code length of
The program for functioning as a debinarization part which debinarizes the binary data of the said intra prediction mode information with the determined code length.
JP2011020381A 2011-02-02 2011-02-02 Image processing apparatus, method and program Withdrawn JP2012160991A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2011020381A JP2012160991A (en) 2011-02-02 2011-02-02 Image processing apparatus, method and program
PCT/JP2012/051657 WO2012105406A1 (en) 2011-02-02 2012-01-26 Image processor and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011020381A JP2012160991A (en) 2011-02-02 2011-02-02 Image processing apparatus, method and program

Publications (1)

Publication Number Publication Date
JP2012160991A true JP2012160991A (en) 2012-08-23

Family

ID=46602623

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011020381A Withdrawn JP2012160991A (en) 2011-02-02 2011-02-02 Image processing apparatus, method and program

Country Status (2)

Country Link
JP (1) JP2012160991A (en)
WO (1) WO2012105406A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016140090A1 (en) * 2015-03-04 2016-09-09 ソニー株式会社 Image coding device and method
US10321128B2 (en) 2015-02-06 2019-06-11 Sony Corporation Image encoding apparatus and image encoding method
WO2019189903A1 (en) * 2018-03-30 2019-10-03 日本放送協会 Image encoding device, image decoding device, and program

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3550839B1 (en) * 2013-03-21 2020-09-09 Sony Corporation Image encoding device and method
WO2018047952A1 (en) 2016-09-12 2018-03-15 日本電気株式会社 Intra-prediction mode determination method, intra-prediction mode determination device, and storage medium for storing intra-prediction mode determination program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3208101B2 (en) * 1996-11-07 2001-09-10 松下電器産業株式会社 Image encoding method, image encoding device, and recording medium recording image encoding program
JP2009089267A (en) * 2007-10-02 2009-04-23 Canon Inc Method and device for intra predictive coding, and program
KR101946376B1 (en) * 2007-10-16 2019-02-11 엘지전자 주식회사 A method and an apparatus for processing a video signal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10321128B2 (en) 2015-02-06 2019-06-11 Sony Corporation Image encoding apparatus and image encoding method
US10979702B2 (en) 2015-02-06 2021-04-13 Sony Corporation Image encoding apparatus and image encoding method
WO2016140090A1 (en) * 2015-03-04 2016-09-09 ソニー株式会社 Image coding device and method
US10893276B2 (en) 2015-03-04 2021-01-12 Sony Corporation Image encoding device and method
WO2019189903A1 (en) * 2018-03-30 2019-10-03 日本放送協会 Image encoding device, image decoding device, and program
US11388414B2 (en) 2018-03-30 2022-07-12 Nippon Hoso Kyokai Device and method for allocating code amounts to intra prediction modes

Also Published As

Publication number Publication date
WO2012105406A1 (en) 2012-08-09

Similar Documents

Publication Publication Date Title
KR101931730B1 (en) Image decoding apparatus, image decoding method and recording medium
WO2011155378A1 (en) Image processing apparatus and method
US11095889B2 (en) Image processing apparatus and method
WO2013002110A1 (en) Image processing device and method
WO2011155377A1 (en) Image processing apparatus and method
WO2011125866A1 (en) Image processing device and method
JP2011259040A (en) Image processing system and method
US9123130B2 (en) Image processing device and method with hierarchical data structure
WO2013031574A1 (en) Image processing device and method
WO2013108688A1 (en) Image processing device and method
WO2012105406A1 (en) Image processor and method
WO2012108271A1 (en) Image processing device and method
WO2014156708A1 (en) Image decoding device and method
WO2013051453A1 (en) Image processing device and method
WO2012173063A1 (en) Image processing device and method
JP2012019447A (en) Image processor and processing method
JP6826177B2 (en) Image decoding device, image decoding method, and recording medium
WO2012157539A1 (en) Image processing apparatus and method
JP6229770B2 (en) Image processing apparatus and method, recording medium, and program
JP2013012996A (en) Image processing device and method
WO2012081477A1 (en) Image processing device and method

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20120531

A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140513