JP5854296B2 - Image processing apparatus and method, program, and recording medium - Google Patents

Image processing apparatus and method, program, and recording medium Download PDF

Info

Publication number
JP5854296B2
JP5854296B2 JP2014153962A JP2014153962A JP5854296B2 JP 5854296 B2 JP5854296 B2 JP 5854296B2 JP 2014153962 A JP2014153962 A JP 2014153962A JP 2014153962 A JP2014153962 A JP 2014153962A JP 5854296 B2 JP5854296 B2 JP 5854296B2
Authority
JP
Japan
Prior art keywords
unit
image
intra prediction
prediction
pixels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014153962A
Other languages
Japanese (ja)
Other versions
JP2014225910A (en
Inventor
佐藤 数史
数史 佐藤
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 JP2014153962A priority Critical patent/JP5854296B2/en
Publication of JP2014225910A publication Critical patent/JP2014225910A/en
Application granted granted Critical
Publication of JP5854296B2 publication Critical patent/JP5854296B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は画像処理装置および方法、プログラム、並びに記録媒体に関し、特に、画像やビットレートに応じたノイズ除去を実現し、予測効率を改善することができるようにした画像処理装置および方法、プログラム、並びに記録媒体に関する。 The present invention relates to an image processing apparatus and method , a program, and a recording medium , and in particular, an image processing apparatus and method , a program, which realizes noise removal according to an image and a bit rate and can improve prediction efficiency , And a recording medium .

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

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

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

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

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

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

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

イントラ予測方式において、輝度信号については、9種類の4×4画素および8×8画素のブロック単位、並びに4種類の16×16画素のマクロブロック単位のイントラ予測モードが定められている。色差信号については、4種類の8×8画素のブロック単位のイントラ予測モードが定められている。色差信号のイントラ予測モードは、輝度信号のイントラ予測モードと独立に設定が可能である。   In the intra prediction method, nine types of 4 × 4 pixel and 8 × 8 pixel block units, and four types of 16 × 16 pixel macroblock unit intra prediction modes are defined for luminance signals. For color difference signals, four types of 8 × 8 pixel block-unit intra prediction modes are defined. The color difference signal intra prediction mode can be set independently of the luminance signal intra prediction mode.

このようなイントラ予測後の残差の出方には、イントラ予測モード毎に特定のパターンが存在する。   There is a specific pattern for each intra prediction mode in how to generate such a residual after intra prediction.

かかる冗長性を排除し、さらに符号化効率を高める方法として、非特許文献1においては、以下のような方法が提案されている。   As a method for eliminating such redundancy and further improving the encoding efficiency, Non-Patent Document 1 proposes the following method.

すなわち、予めオフライン処理において、トレーニング信号を用い、通常のH.264/AVC方式により、イントラ画像の符号化処理が行われ、それぞれのブロックに対するイントラ予測モード毎に、カルーネン・レーベ変換等の直交変換が行われ、最適な変換係数が算出される。   That is, in the offline processing in advance, the normal H. According to the H.264 / AVC format, intra-picture encoding processing is performed, and orthogonal transform such as Karhunen-Loeve transform is performed for each intra prediction mode for each block, and an optimal transform coefficient is calculated.

そして、実際の符号化処理において、H.264/AVC方式で定められている直交変換に代えて、上述したカルーネン・レーベ変換により、モード毎に最適化された直交変換係数を用いた処理が行われる。   In the actual encoding process, H. Instead of the orthogonal transformation defined in the H.264 / AVC format, processing using the orthogonal transformation coefficient optimized for each mode is performed by the above-described Karhunen-Loeve transformation.

また、非特許文献2には、上述したイントラ予測を、インター予測に組み合わせる方法も提案されている。   Non-Patent Document 2 also proposes a method of combining the above-described intra prediction with inter prediction.

すなわち、非特許文献2においては、インター予測において求められた動きベクトル情報に対して、対象ブロックのみならず、対象ブロックの周辺の隣接画素値に関しても差分情報が生成される。このように生成された対象ブロックに関する差分情報と、隣接画素に関する差分情報の間で、イントラ予測が施されることにより2次差分情報が生成される。そして、生成された2次差分情報が、直交変換および量子化され、圧縮画像とともに、後段に出力される。   That is, in Non-Patent Document 2, difference information is generated not only for the target block but also for adjacent pixel values around the target block for the motion vector information obtained in the inter prediction. Secondary difference information is generated by performing intra prediction between the difference information regarding the target block generated in this way and the difference information regarding adjacent pixels. Then, the generated secondary difference information is orthogonally transformed and quantized and output to the subsequent stage together with the compressed image.

これにより、さらに、符号化効率が向上される。   Thereby, the encoding efficiency is further improved.

また、上述したように、H.264/AVC方式において、マクロブロックサイズは16×16画素である。しかしながら、マクロブロックサイズを16×16画素とするのは、次世代符号化方式の対象となるようなUHD(Ultra High Definition;4000×2000画素)といった大きな画枠に対しては最適ではない。   In addition, as described above, H.P. In the H.264 / AVC format, the macroblock size is 16 × 16 pixels. However, the macroblock size of 16 × 16 pixels is not optimal for a large image frame such as UHD (Ultra High Definition; 4000 × 2000 pixels) that is the target of the next generation encoding method.

そこで、非特許文献3などにおいては、マクロブロックサイズを、例えば、32×32画素といった大きさに拡張することも提案されている。   Therefore, in Non-Patent Document 3, etc., it is also proposed to expand the macroblock size to a size of 32 × 32 pixels, for example.

”Improved Intra Coding”,VCEG-AF15,ITU-Telecommunications Standardization Sector STUDY GROUP Question 6 Video coding Experts Group(VCEG), 20-21 April 2007“Improved Intra Coding”, VCEG-AF15, ITU-Telecommunications Standardization Sector STUDY GROUP Question 6 Video coding Experts Group (VCEG), 20-21 April 2007 ”Second Order Prediction (SOP) in P Slice”, Sijia Chen , JinpengWang , Shangwen Li and, Lu Yu ,VCEG-AD09,ITU-Telecommunications Standardization Sector STUDY GROUP Question 6 Video coding Experts Group(VCEG), 16-18 July 2008“Second Order Prediction (SOP) in P Slice”, Sijia Chen, JinpengWang, Shangwen Li and, Lu Yu, VCEG-AD09, ITU-Telecommunications Standardization Sector STUDY GROUP Question 6 Video coding Experts Group (VCEG), 16-18 July 2008 ”Video Coding Using Extended Block Sizes”,VCEG-AD09,ITU-Telecommunications Standardization Sector STUDY GROUP Question 16 - Contribution 123, Jan 2009“Video Coding Using Extended Block Sizes”, VCEG-AD09, ITU-Telecommunications Standardization Sector STUDY GROUP Question 16-Contribution 123, Jan 2009

ところで、H.264/AVC方式においては、上述した8×8画素のブロック単位のイントラ予測を行うに先立ち、隣接画素の画素値のローパスフィルタ処理が行われている。これにより、隣接画素に含まれる雑音が除去され、相関を高められるので、より高い符号化効率の実現を可能としている。   H. In the H.264 / AVC format, the low-pass filter processing of the pixel values of adjacent pixels is performed prior to performing the above-described intra prediction in units of 8 × 8 pixels. As a result, noise contained in adjacent pixels is removed and the correlation can be increased, so that higher encoding efficiency can be realized.

しかしながら、雑音の含まれる度合いは、入力画像や、量子化パラメータ値、イントラ予測モードによっても異なるものであるにも関わらず、H.264/AVC方式においては、雑音を除去するためのローパスフィルタが固定されたものであった。すなわち、このローパスフィルタは、入力画像、量子化パラメータ値、イントラ予測モードなどに応じた最適なものではなかった。   However, although the degree of noise is different depending on the input image, the quantization parameter value, and the intra prediction mode, H.264 is used. In the H.264 / AVC format, a low-pass filter for removing noise is fixed. That is, the low-pass filter is not optimal according to the input image, the quantization parameter value, the intra prediction mode, and the like.

また、H.264/AVC方式において、上述の隣接画素の画素値の雑音除去を行うのは、8×8画素のブロック単位のイントラ予測モードのみであり、他のモードに対して適用されていなかった。   H. In the H.264 / AVC format, the noise removal of the pixel values of the adjacent pixels described above is performed only in the 8 × 8 pixel block unit intra prediction mode, and has not been applied to other modes.

本発明は、このような状況に鑑みてなされたものであり、画像やビットレートに応じたノイズ除去を実現し、予測効率を改善させるものである。   The present invention has been made in view of such a situation, and realizes noise removal according to an image and a bit rate and improves prediction efficiency.

本発明の一側面の画像処理装置は、ビットストリームを復号処理して得られる画像を対象として、復号処理の対象となる対象ブロックの画素に対してイントラ予測を行う際のブロックサイズに応じて設定されたフィルタ係数を用いて、前記対象ブロックの画素に対してイントラ予測を行う際に参照する隣接画素にフィルタ処理を行うフィルタ部と、前記対象ブロックの画素に対してイントラ予測を行う際の予測モードに対して、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを制御する制御情報を用いて、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを選択するように、前記フィルタ処理を制御する制御部と、前記隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行い、予測画像を生成するイントラ予測部を備える。 An image processing apparatus according to an aspect of the present invention sets an image obtained by decoding a bitstream according to a block size when performing intra prediction on a pixel of a target block to be decoded. A filter unit that performs filter processing on adjacent pixels that are referred to when intra prediction is performed on the pixels of the target block using the filter coefficients that have been determined , and prediction when performing intra prediction on the pixels of the target block For the mode, the control information for controlling whether to perform the filtering process on the adjacent pixel or not to perform the filtering process on the adjacent pixel is used to perform the filtering process on the adjacent pixel or the filtering process on the adjacent pixel. to select or not performed, and a control unit for controlling the filtering process, using the neighboring pixels, to the pixel of the current block Performed Ntora prediction, and a intra-prediction unit that generates a predicted image.

前記フィルタ部は、前記隣接画素にフィルタ処理を行うことを選択した場合に、3タップのフィルタ係数を用いたフィルタ演算を用いて、前記隣接画素にフィルタ処理を行うことができる When the filter unit has selected to perform filtering on the adjacent pixel, the filtering unit can perform filtering on the adjacent pixel using a filter operation using a 3-tap filter coefficient .

前記イントラ予測部により生成された予測画像を用いて、前記ビットストリームを復号処理する復号部をさらに備えることができる。The image processing apparatus may further include a decoding unit that decodes the bitstream using the prediction image generated by the intra prediction unit.

前記ビットストリームは、階層構造を有する単位で符号化されており、前記復号部は、前記ビットストリームを、階層構造を有する単位で復号処理することができる。The bit stream is encoded in a unit having a hierarchical structure, and the decoding unit can decode the bit stream in a unit having a hierarchical structure.

前記イントラ予測部は、ブロックサイズを4×4画素、8×8画素、16×16画素、32×32画素として、イントラ予測を行うことができる。The intra prediction unit can perform intra prediction with block sizes of 4 × 4 pixels, 8 × 8 pixels, 16 × 16 pixels, and 32 × 32 pixels.

本発明の一側面の画像処理方法は、画像処理装置が、ビットストリームを復号処理して得られる画像を対象として、復号処理の対象となる対象ブロックの画素に対してイントラ予測を行う際のブロックサイズに応じて設定されたフィルタ係数を用いて、前記対象ブロックの画素に対してイントラ予測を行う際に参照する隣接画素にフィルタ処理を行い前記対象ブロックの画素に対してイントラ予測を行う際の予測モードに対して、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを制御する制御情報を用いて、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを選択するように、前記フィルタ処理を制御し、前記隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行い、予測画像を生成する。 An image processing method according to an aspect of the present invention is a block when an image processing apparatus performs intra prediction on a pixel of a target block that is a target of decoding processing, for an image obtained by decoding the bitstream. using a filter coefficient set according to the size, to filter the neighboring pixels to be referred to when performing intra prediction for pixels of the target block, when performing intra prediction for pixels of the current block With respect to the prediction mode, the control information for controlling whether to perform the filtering process on the adjacent pixel or not to perform the filtering process on the adjacent pixel is used to perform the filtering process on the adjacent pixel, or to the adjacent pixel. to select or not to perform the filtering, and controlling the filtering process, using the neighboring pixels, Into to the pixel of the current block Making predictions, to generate a prediction image.

前記隣接画素にフィルタ処理を行うことを選択した場合に、3タップのフィルタ係数を用いたフィルタ演算を用いて、前記隣接画素にフィルタ処理を行うことができる。When it is selected that the adjacent pixel is to be filtered, the adjacent pixel can be filtered using a filter operation using a 3-tap filter coefficient.

生成された予測画像を用いて、前記ビットストリームを復号処理することができる。The bit stream can be decoded using the generated predicted image.

前記ビットストリームは、階層構造を有する単位で符号化されており、前記ビットストリームを、階層構造を有する単位で復号処理することができる。The bitstream is encoded in a unit having a hierarchical structure, and the bitstream can be decoded in a unit having a hierarchical structure.

ブロックサイズを4×4画素、8×8画素、16×16画素、32×32画素として、イントラ予測を行うことができる。Intra prediction can be performed with block sizes of 4 × 4 pixels, 8 × 8 pixels, 16 × 16 pixels, and 32 × 32 pixels.

本発明の一側面のプログラムは、ビットストリームを復号処理して得られる画像を対象として、復号処理の対象となる対象ブロックの画素に対してイントラ予測を行う際のブロックサイズに応じて設定されたフィルタ係数を用いて、前記対象ブロックの画素に対してイントラ予測を行う際に参照する隣接画素にフィルタ処理を行うフィルタ部と、前記対象ブロックの画素に対してイントラ予測を行う際の予測モードに対して、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを制御する制御情報を用いて、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを選択するように、前記フィルタ処理を制御する制御部と、前記隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行い、予測画像を生成するイントラ予測部として、コンピュータを機能させる。The program according to an aspect of the present invention is set according to a block size when performing intra prediction on a pixel of a target block that is a target of decoding processing for an image obtained by decoding a bitstream. Using a filter coefficient, a filter unit that performs filter processing on adjacent pixels that are referred to when performing intra prediction on the pixels of the target block, and a prediction mode when performing intra prediction on the pixels of the target block On the other hand, using the control information for controlling whether the adjacent pixel is filtered or not, the adjacent pixel is filtered or the adjacent pixel is filtered. In order to select whether or not there is a pixel, the control unit that controls the filtering process and the adjacent pixel are used to inspect the pixel of the target block. Performed tiger prediction, as an intra-prediction unit generating a predicted image, causing a computer to function.

本発明の一側面においては、ビットストリームを復号処理して得られる画像を対象として、復号処理の対象となる対象ブロックの画素に対してイントラ予測を行う際のブロックサイズに応じて設定されたフィルタ係数を用いて、前記対象ブロックの画素に対してイントラ予測を行う際に参照する隣接画素にフィルタ処理が行われる。また、前記対象ブロックの画素に対してイントラ予測を行う際の予測モードに対して、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを制御する制御情報を用いて、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを選択するように、前記フィルタ処理が制御される。そして、前記隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測が行われ、予測画像が生成される。 In one aspect of the present invention, for an image obtained by decoding a bitstream, a filter set in accordance with a block size when performing intra prediction on pixels of a target block that is a target of decoding processing Using the coefficient, filter processing is performed on adjacent pixels that are referred to when intra prediction is performed on the pixels of the target block. In addition, with respect to a prediction mode when performing intra prediction on the pixels of the target block, control information for controlling whether to perform filtering processing on the adjacent pixels or not to perform filtering processing on the adjacent pixels is used. The filtering process is controlled so as to select whether to perform the filtering process on the adjacent pixels or not to perform the filtering process on the adjacent pixels. And using the said adjacent pixel, intra prediction is performed with respect to the pixel of the said target block, and a predicted image is produced | generated.

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

本発明によれば、画像やビットレートに応じたノイズ除去を行うことができる。   According to the present invention, it is possible to perform noise removal according to an image and a bit rate.

本発明を適用した画像符号化装置の一実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of one Embodiment of the image coding apparatus to which this invention is applied. 16×16画素のイントラ予測モードの場合の処理順序を説明する図である。It is a figure explaining the processing order in the case of 16 * 16 pixel intra prediction mode. 輝度信号の4×4画素のイントラ予測モードの種類を示す図である。It is a figure which shows the kind of 4 * 4 pixel intra prediction mode of a luminance signal. 輝度信号の4×4画素のイントラ予測モードの種類を示す図である。It is a figure which shows the kind of 4 * 4 pixel intra prediction mode of a luminance signal. 4×4画素のイントラ予測の方向を説明する図である。It is a figure explaining the direction of 4 * 4 pixel intra prediction. 4×4画素のイントラ予測を説明する図である。It is a figure explaining intra prediction of 4x4 pixels. 輝度信号の4×4画素のイントラ予測モードの符号化を説明する図である。It is a figure explaining encoding of the 4 * 4 pixel intra prediction mode of a luminance signal. 輝度信号の8×8画素のイントラ予測モードの種類を示す図である。It is a figure which shows the kind of 8x8 pixel intra prediction mode of a luminance signal. 輝度信号の8×8画素のイントラ予測モードの種類を示す図である。It is a figure which shows the kind of 8x8 pixel intra prediction mode of a luminance signal. 輝度信号の16×16画素のイントラ予測モードの種類を示す図である。It is a figure which shows the kind of 16 * 16 pixel intra prediction mode of a luminance signal. 輝度信号の16×16画素のイントラ予測モードの種類を示す図である。It is a figure which shows the kind of 16 * 16 pixel intra prediction mode of a luminance signal. 16×16画素のイントラ予測を説明する図である。It is a figure explaining the 16 * 16 pixel intra prediction. 色差信号のイントラ予測モードの種類を示す図である。It is a figure which shows the kind of intra prediction mode of a color difference signal. 図1のイントラ予測部および隣接画素内挿フィルタ切替部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the intra estimation part of FIG. 1, and an adjacent pixel interpolation filter switching part. フィルタ係数の算出について説明する図である。It is a figure explaining calculation of a filter coefficient. 図1の画像符号化装置の符号化処理を説明するフローチャートである。It is a flowchart explaining the encoding process of the image coding apparatus of FIG. 図16のステップS21の予測処理を説明するフローチャートである。It is a flowchart explaining the prediction process of step S21 of FIG. 図17のステップS31のイントラ予測処理を説明するフローチャートである。It is a flowchart explaining the intra prediction process of step S31 of FIG. 図17のステップS32のインター動き予測処理を説明するフローチャートである。It is a flowchart explaining the inter motion prediction process of step S32 of FIG. 図1のイントラ予測部および隣接画素内挿フィルタ切替部の他の構成例を示すブロック図である。It is a block diagram which shows the other structural example of the intra estimation part of FIG. 1, and an adjacent pixel interpolation filter switching part. 図17のステップS31のイントラ予測処理の他の例を説明するフローチャートである。It is a flowchart explaining the other example of the intra prediction process of step S31 of FIG. 本発明を適用した画像復号装置の一実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of one Embodiment of the image decoding apparatus to which this invention is applied. 図22のイントラ予測部および隣接画素内挿フィルタ切替部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the intra estimation part of FIG. 22, and an adjacent pixel interpolation filter switching part. 図22の画像復号装置の復号処理を説明するフローチャートである。It is a flowchart explaining the decoding process of the image decoding apparatus of FIG. 図24のステップS138の予測処理を説明するフローチャートである。It is a flowchart explaining the prediction process of step S138 of FIG. 図22のイントラ予測部および隣接画素内挿フィルタ切替部の他の構成例を示すブロック図である。It is a block diagram which shows the other structural example of the intra estimation part of FIG. 22, and an adjacent pixel interpolation filter switching part. 図24のステップS138の予測処理の他の例を説明するフローチャートである。It is a flowchart explaining the other example of the prediction process of step S138 of FIG. 本発明を適用した学習装置の一実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of one Embodiment of the learning apparatus to which this invention is applied. 図28のイントラ予測部および隣接画素内挿フィルタ算出部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the intra estimation part of FIG. 28, and an adjacent pixel interpolation filter calculation part. 図28の学習装置によるイントラ予測処理を説明するフローチャートである。It is a flowchart explaining the intra prediction process by the learning apparatus of FIG. 本発明を適用した画像符号化装置の他の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of other embodiment of the image coding apparatus to which this invention is applied. 2次予測処理を説明する図である。It is a figure explaining secondary prediction processing. 本発明を適用した画像復号装置の他の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of other embodiment of the image decoding apparatus to which this invention is applied. 本発明を適用した画像符号化装置のさらに他の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of further another embodiment of the image coding apparatus to which this invention is applied. 図34のイントラ予測部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the intra estimation part of FIG. 図17のステップS31のイントラ予測処理の他の例を説明するフローチャートである。It is a flowchart explaining the other example of the intra prediction process of step S31 of FIG. 図17のステップS31のイントラ予測処理のさらに他の例を説明するフローチャートである。It is a flowchart explaining the further another example of the intra prediction process of step S31 of FIG. 図17のステップS31のイントラ予測処理の他の例を説明するフローチャートである。It is a flowchart explaining the other example of the intra prediction process of step S31 of FIG. 本発明を適用した画像復号装置のさらに他の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of other embodiment of the image decoding apparatus to which this invention is applied. 図39のイントラ予測部および隣接画素内挿フィルタ制御部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the intra estimation part of FIG. 39, and an adjacent pixel interpolation filter control part. 図24のステップS138の予測処理のさらに他の例を説明するフローチャートである。It is a flowchart explaining the further another example of the prediction process of step S138 of FIG. 本発明を適用した画像符号化装置の他の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of other embodiment of the image coding apparatus to which this invention is applied. 本発明を適用した画像復号装置の他の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of other embodiment of the image decoding apparatus to which this invention is applied. 拡張されたブロックサイズの例を示す図である。It is a figure which shows the example of the expanded block size. コンピュータのハードウエアの構成例を示すブロック図である。It is a block diagram which shows the structural example of the hardware of a computer. 本発明を適用したテレビジョン受像機の主な構成例を示すブロック図である。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の実施の形態(隣接画素内挿フィルタ切替:2次予測の例)
3.第3の実施の形態(隣接画素内挿フィルタオンオフ制御:イントラ予測の例)
4.第4の実施の形態(隣接画素内挿フィルタオンオフ制御:2次予測の例)
Hereinafter, embodiments of the present invention will be described with reference to the drawings. The description will be given in the following order.
1. First embodiment (neighboring pixel interpolation filter switching: example of intra prediction)
2. Second embodiment (neighboring pixel interpolation filter switching: example of secondary prediction)
3. Third Embodiment (Adjacent Pixel Interpolation Filter On / Off Control: Example of Intra Prediction)
4). Fourth embodiment (adjacent pixel interpolation filter on / off control: example of secondary prediction)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

このイントラ予測処理に先立ち、イントラ予測部74は、各対象ブロックのイントラ予測に用いられる画素であって、対象ブロックに所定の位置関係で隣接する隣接画素に対して、フィルタ処理を施す。このフィルタ処理には、イントラ予測部74により供給されたイントラ予測モードなどに対応して、隣接画素内挿フィルタ切替部75により設定されたフィルタ係数が用いられる。すなわち、イントラ予測部74において、候補となる全てのイントラ予測モードのイントラ予測処理には、隣接画素内挿フィルタ切替部75により設定されたフィルタ係数で、フィルタ処理が施された隣接画素が用いられる。   Prior to this intra prediction process, the intra prediction unit 74 performs a filtering process on adjacent pixels that are used for intra prediction of each target block and are adjacent to the target block in a predetermined positional relationship. In this filtering process, the filter coefficient set by the adjacent pixel interpolation filter switching unit 75 corresponding to the intra prediction mode supplied by the intra prediction unit 74 is used. That is, in the intra prediction unit 74, for the intra prediction processing in all the candidate intra prediction modes, adjacent pixels that have been subjected to the filter processing with the filter coefficient set by the adjacent pixel interpolation filter switching unit 75 are used. .

イントラ予測部74は、予測画像を生成したイントラ予測モードに対してコスト関数値を算出し、算出したコスト関数値が最小値を与えるイントラ予測モードを、最適イントラ予測モードとして選択する。イントラ予測部74は、最適イントラ予測モードで生成された予測画像と、対応する最適イントラ予測モードについて算出されたコスト関数値を、予測画像選択部77に供給する。   The intra prediction unit 74 calculates a cost function value for the intra prediction mode in which the predicted image is generated, and selects an intra prediction mode in which the calculated cost function value gives the minimum value as the optimal intra prediction mode. The intra prediction unit 74 supplies the predicted image generated in the optimal intra prediction mode and the cost function value calculated for the corresponding optimal intra prediction mode to the predicted image selection unit 77.

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

隣接画素内挿フィルタ切替部75は、後述する図28の学習装置251において、トレーニング画像が用いられて学習されることにより得られた、量子化パラメータおよびイントラ予測モードに対応したフィルタ係数を記憶している。   The adjacent pixel interpolation filter switching unit 75 stores the filter parameter corresponding to the quantization parameter and the intra prediction mode obtained by learning using the training image in the learning device 251 of FIG. 28 described later. ing.

隣接画素内挿フィルタ切替部75には、レート制御部78からの量子化パラメータが供給され、イントラ予測部74からイントラ予測モードの情報が供給される。隣接画素内挿フィルタ切替部75は、レート制御部78からの量子化パラメータおよびイントラ予測部74からのイントラ予測モードに対応して、フィルタ係数を設定する。隣接画素内挿フィルタ切替部75は、設定したフィルタ係数を、イントラ予測部74に供給する。   The quantization parameter from the rate control unit 78 is supplied to the adjacent pixel interpolation filter switching unit 75, and information on the intra prediction mode is supplied from the intra prediction unit 74. The adjacent pixel interpolation filter switching unit 75 sets filter coefficients corresponding to the quantization parameter from the rate control unit 78 and the intra prediction mode from the intra prediction unit 74. The adjacent pixel interpolation filter switching unit 75 supplies the set filter coefficient to the intra prediction unit 74.

なお、隣接画素内挿フィルタ切替部75においては、フィルタ係数を、量子化パラメータおよびイントラ予測モードの両方でなくても、どちらか一方に対応するように学習、記憶しておくことも可能である。   Note that, in the adjacent pixel interpolation filter switching unit 75, it is possible to learn and store the filter coefficient so as to correspond to either one of the quantization parameters and the intra prediction mode, not both. .

また、隣接画素内挿フィルタ切替部75においては、予めオフラインで学習されたフィルタ係数が記憶されているが、その代わりに、オンラインでフィルタ係数が算出されるようにすることも可能である。この場合、復号側に送るために、点線矢印に示されるように、隣接画素内挿フィルタ切替部75により設定されたフィルタ係数が、可逆符号化部66に出力される。   Further, in the adjacent pixel interpolation filter switching unit 75, filter coefficients learned offline in advance are stored, but it is also possible to calculate filter coefficients online instead. In this case, the filter coefficient set by the adjacent pixel interpolation filter switching unit 75 is output to the lossless encoding unit 66 as shown by the dotted arrow in order to send to the decoding side.

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

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

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

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

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

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

量子化部65のレートの制御に用いられた量子化パラメータは、可逆符号化部66に供給され、可逆符号化処理され、圧縮画像のヘッダ部に挿入される。また、この量子化パラメータは、隣接画素内挿フィルタ切替部75に供給され、隣接画素に施すフィルタ処理に用いられるフィルタ係数の設定に用いられる。   The quantization parameter used for controlling the rate of the quantization unit 65 is supplied to the lossless encoding unit 66, subjected to lossless encoding processing, and inserted into the header portion of the compressed image. Further, the quantization parameter is supplied to the adjacent pixel interpolation filter switching unit 75 and used for setting a filter coefficient used for the filter processing applied to the adjacent pixel.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

画素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
・・・(6)
Mode 3 is a Diagonal_Down_Left Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (6).

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

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

画素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
・・・(7)
Mode 4 is a Diagonal_Down_Right Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (7).

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

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

画素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
・・・(8)
Mode 5 is a Diagonal_Vertical_Right Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (8).

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

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

画素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
・・・(9)
Mode 6 is a Horizontal_Down Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (9).

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

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

画素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
・・・(10)
Mode 7 is a Vertical_Left Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (10).

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

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

画素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
・・・(11)
Mode 8 is a Horizontal_Up Prediction mode, and is applied only when the pixel values A, B, C, D, I, J, K, L, and M are “available”. In this case, the predicted pixel values of the pixels a to p are generated as in the following Expression (11).

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

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

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

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

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

MostProbableMode = Min (Intra_4x4_pred_modeA, Intra_4x4_pred_modeB)
(12)

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

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

if(prev_intra4x4_pred_mode_flag[luma4x4BlkIdx])
Intra4x4PredMode[luma4x4BlkIdx] = MostProbableMode
else
if(rem_intra4x4_pred_mode[luma4x4BlkIdx] < MostProbableMode)
Intra4x4PredMode[luma4x4BlkIdx]=rem_intra4x4_pred_mode[luma4x4BlkIdx]
else
Intra4x4PredMode[luma4x4BlkIdx]=rem_intra4x4_pred_mode[luma4x4BlkIdx] + 1
・・・(13)
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
... (13)

次に、8×8画素のイントラ予測モードについて説明する。図8および図9は、9種類の輝度信号の8×8画素のイントラ予測モード(Intra_8x8_pred_mode)を示す図である。   Next, an 8 × 8 pixel intra prediction mode will be described. FIG. 8 and FIG. 9 are diagrams illustrating nine types of luminance signal 8 × 8 pixel intra prediction modes (Intra_8 × 8_pred_mode).

対象の8×8ブロックにおける画素値を、p[x,y](0≦x≦7;0≦y≦7)とし、隣接ブロックの画素値をp[-1,-1],…,p[-1,15],p[-1,0],…,[p-1,7]のように表すものとする。   The pixel value in the target 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 8 × 8 pixel intra prediction mode, adjacent pixels are subjected to a low-pass filtering process prior to generating a prediction value. Here, the pixel values before the low-pass filtering process are p [-1, -1], ..., p [-1,15], p [-1,0], ... p [-1,7], and after the process Are represented as p ′ [− 1, −1],..., P ′ [− 1,15], p ′ [− 1,0],... P ′ [− 1,7].

まず、p’[0,-1]は、p[-1,-1] が “available” である場合には、次の式(14)のように算出され、“not available” である場合には、次の式(15)のように算出される。

p’[0,-1] = (p[-1,-1] + 2*p[0,-1] + p[1,-1] + 2) >> 2
・・・(14)
p’[0,-1] = (3*p[0,-1] + p[1,-1] + 2) >> 2
・・・(15)
First, p ′ [0, -1] is calculated as in the following equation (14) when p [-1, -1] is “available”, and when “not available” Is calculated as in the following equation (15).

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

p’[x,-1] (x=0,…,7)は、次の式(16)のように算出される。

p’[x,-1] = (p[x-1,-1] + 2*p[x,-1] + p[x+1,-1] + 2) >>2
・・・(16)
p ′ [x, −1] (x = 0,..., 7) is calculated as in the following equation (16).

p '[x, -1] = (p [x-1, -1] + 2 * p [x, -1] + p [x + 1, -1] + 2) >> 2
... (16)

p’[x,-1] (x=8,…,15)は、p[x,-1] (x=8,…,15) が “available” である場合には、次の式(17)のように算出される。

p’[x,-1] = (p[x-1,-1] + 2*p[x,-1] + p[x+1,-1] + 2) >>2
p’[15,-1] = (p[14,-1] + 3*p[15,-1] + 2) >>2
・・・(17)
p '[x, -1] (x = 8, ..., 15) is expressed by the following equation (17) when p [x, -1] (x = 8, ..., 15) is "available": ).

p '[x, -1] = (p [x-1, -1] + 2 * p [x, -1] + p [x + 1, -1] + 2) >> 2
p '[15, -1] = (p [14, -1] + 3 * p [15, -1] + 2) >> 2
... (17)

p’[-1,-1]は、p[-1,-1]が “available” である場合には、以下のように算出される。すなわち、p’[-1,-1]は、p[0,-1]及びp[-1,0]の双方がavailableである場合には、式(18)のように算出され、p[-1,0] が “unavailable” である場合には、式(19)のように算出される。また、p’[-1,-1]は、p[0,-1] が “unavailable” である場合には、式(20)のように算出される。

p’[-1,-1] = (p[0,-1] + 2*p[-1,-1] + p[-1,0] + 2) >>2
・・・(18)

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

p’[-1,-1] = (3*p[-1,-1] + p[-1,0] + 2) >>2
・・・(20)
p '[-1, -1] is calculated as follows when p [-1, -1] is "available". That is, p ′ [− 1, −1] is calculated as in Expression (18) when both p [0, −1] and p [−1,0] are available, and p [ -1,0] is “unavailable”, it is calculated as in equation (19). Further, p ′ [− 1, −1] is calculated as in Expression (20) when p [0, −1] is “unavailable”.

p '[-1, -1] = (p [0, -1] + 2 * p [-1, -1] + p [-1,0] + 2) >> 2
... (18)

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

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

p’[-1,y] (y=0, … ,7) は、p[-1,y] (y=0, … ,7) が “available” の時、以下のように算出される。すなわち、まず、p’[-1,0]は、p[-1,-1]が “available” である場合には、次の式(21)のように算出され、“unavailable” である場合には、式(22)のように算出される。

p’[-1,0] = (p[-1,-1] + 2*p[-1,0] + p[-1,1] + 2) >>2
・・・(21)

p’[-1,0] = (3*p[-1,0] + p[-1,1] + 2) >>2
・・・(22)
p '[-1, y] (y = 0,..., 7) is calculated as follows when p [-1, y] (y = 0,..., 7) is “available”. That is, first, p ′ [− 1,0] is calculated as in the following equation (21) when p [−1, −1] is “available”, and is “unavailable” Is calculated as shown in Equation (22).

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

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

また、p’[-1,y] (y=1,…,6)は、次の式(23)のように算出され、p’[-1,7]は、式(24)のように算出される。

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

p’[-1,7] = (p[-1,6] + 3*p[-1,7] + 2) >>2
・・・(24)
Further, p ′ [− 1, y] (y = 1,..., 6) is calculated as in the following equation (23), and p ′ [− 1, 7] is as in equation (24). Calculated.

p [-1, y] = (p [-1, y-1] + 2 * p [-1, y] + p [-1, y + 1] + 2) >> 2
... (23)

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

このように算出されたp’を用いて、図8および図9に示される各イントラ予測モードにおける予測値は以下のように生成される。   Using p ′ calculated in this way, the prediction values in each intra prediction mode shown in FIGS. 8 and 9 are generated as follows.

モード0はVertical Prediction modeであり、p[x,-1] (x=0, … ,7) が “available” である時のみ適用される。予測値pred8x8L[x,y]は、次の式(25)のように生成される。

pred8x8L[x,y] = p’[x,-1] x,y=0,...,7
・・・(25)
Mode 0 is the Vertical Prediction mode and is applied only when p [x, -1] (x = 0,..., 7) is “available”. The predicted value pred8x8 L [x, y] is generated as in the following Expression (25).

pred8x8 L [x, y] = p '[x, -1] x, y = 0, ..., 7
... (25)

モード1はHorizontal Prediction modeであり、p[-1,y] (y=0, … ,7) が “available” である時のみ適用される。予測値pred8x8L[x,y]は、次の式(26)のように生成される。

pred8x8L[x,y] = p’[-1,y] x,y=0,...,7
・・・(26)
Mode 1 is a Horizontal Prediction mode, and is applied only when p [-1, y] (y = 0,..., 7) is “available”. The predicted value pred8x8 L [x, y] is generated as in the following Expression (26).

pred8x8 L [x, y] = p '[-1, y] x, y = 0, ..., 7
... (26)

モード2はDC Prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、p[x,-1] (x=0, … ,7) および p[-1,y] (y=0, … ,7) の両方が “available” である場合には、予測値pred8x8L[x,y]は、次の式(27)のように生成される。

Figure 0005854296
Mode 2 is a DC Prediction mode, and the predicted value pred8x8 L [x, y] is generated as follows. That is, when both p [x, -1] (x = 0,…, 7) and p [-1, y] (y = 0,…, 7) are “available”, the predicted value pred8x8 L [x, y] is generated as in the following Expression (27).

Figure 0005854296

p[x,-1] (x=0, … ,7) は “available” であるが、 p[-1,y] (y=0, … ,7) が “unavailable” である場合には、予測値pred8x8L[x,y]は、次の式(28)のように生成される。

Figure 0005854296
p [x, -1] (x = 0,…, 7) is “available”, but if p [-1, y] (y = 0,…, 7) is “unavailable” The predicted value pred8x8 L [x, y] is generated as in the following Expression (28).

Figure 0005854296

p[x,-1] (x=0, … ,7) は “unavailable” であるが、 p[-1,y] (y=0, … ,7) が “available” である場合には、予測値pred8x8L[x,y]は、次の式(29)のように生成される。

Figure 0005854296
p [x, -1] (x = 0,…, 7) is “unavailable”, but if p [-1, y] (y = 0,…, 7) is “available” The predicted value pred8x8 L [x, y] is generated as in the following Expression (29).

Figure 0005854296

p[x,-1] (x=0, … ,7) および p[-1,y] (y=0, … ,7) の両方が “unavailable” である場合には、予測値pred8x8L[x,y]は、次の式(30)のように生成される。

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

ただし、式(30)は、8ビット入力の場合を表している。
If both p [x, -1] (x = 0,…, 7) and p [-1, y] (y = 0,…, 7) are “unavailable”, the predicted value pred8x8 L [ x, y] is generated as in the following Expression (30).

pred8x8 L [x, y] = 128
... (30)

However, Expression (30) represents the case of 8-bit input.

モード3はDiagonal_Down_Left_prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、Diagonal_Down_Left_prediction modeは、p[x,-1], x=0,…,15が “available” の時のみ適用され、x=7かつy=7である予測画素値は、次の式(31)のように生成され、その他の予測画素値は、次の式(32)のように生成される。

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

pred8x8L[x,y] = (p’[x+y,-1] + 2*p’[x+y+1,-1] + p’[x+y+2,-1] + 2) >> 2
・・・(32)
Mode 3 is a Diagonal_Down_Left_prediction mode, and the prediction value pred8x8 L [x, y] is generated as follows. That is, the Diagonal_Down_Left_prediction mode is applied only when p [x, -1], x = 0,..., “15” is “available”, and the predicted pixel value where x = 7 and y = 7 is expressed by the following equation (31 ) And other predicted pixel values are generated as in the following Expression (32).

pred8x8 L [x, y] = (p '[14, -1] + 3 * p [15, -1] + 2) >> 2
... (31)

pred8x8 L [x, y] = (p '[x + y, -1] + 2 * p' [x + y + 1, -1] + p '[x + y + 2, -1] + 2) >> 2
... (32)

モード4はDiagonal_Down_Right_prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、Diagonal_Down_Right_prediction modeは、p[x,-1],x=0,…,7及びp[-1,y],y=0,…,7が “available”の時のみ適用され、x > y である予測画素値は、次の式(33)のように生成され、x < y である予測画素値は、次の式(34)のように生成される。また、x = y である予測画素値は、次の式(35)のように生成される。

pred8x8L[x,y] = (p’[x-y-2,-1] + 2*p’[x-y-1,-1] + p’[x-y,-1] + 2) >> 2
・・・(33)

pred8x8L[x,y] = (p’[-1,y-x-2] + 2*p’[-1,y-x-1] + p’[-1,y-x] + 2) >> 2
・・・(34)

pred8x8L[x,y] = (p’[0,-1] + 2*p’[-1,-1] + p’[-1,0] + 2) >> 2
・・・(35)
Mode 4 is a Diagonal_Down_Right_prediction mode, and the prediction value pred8x8 L [x, y] is generated as follows. That is, Diagonal_Down_Right_prediction mode is applied only when p [x, -1], x = 0, ..., 7 and p [-1, y], y = 0, ..., 7 are "available", and x> y A predicted pixel value is generated as shown in the following equation (33), and a predicted pixel value where x <y is generated as shown in the following equation (34). Further, a predicted pixel value with x = y is generated as in the following Expression (35).

pred8x8 L [x, y] = (p '[xy-2, -1] + 2 * p' [xy-1, -1] + p '[xy, -1] + 2) >> 2
... (33)

pred8x8 L [x, y] = (p '[-1, yx-2] + 2 * p' [-1, yx-1] + p '[-1, yx] + 2) >> 2
... (34)

pred8x8 L [x, y] = (p '[0, -1] + 2 * p' [-1, -1] + p '[-1,0] + 2) >> 2
... (35)

モード5はVertical_Right_prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、Vertical_Right_prediction modeは、p[x,-1],x=0,…,7及びp[-1,y],y=-1,…,7が “available”の時のみ適用される。今、zVRを、次の式(36)のように定義する。

zVR = 2*x - y
・・・(36)
Mode 5 is Vertical_Right_prediction mode, and the predicted value pred8x8 L [x, y] is generated as follows. That is, the Vertical_Right_prediction mode is applied only when p [x, -1], x = 0,..., 7 and p [-1, y], y = -1,. Now, zVR is defined as the following formula (36).

zVR = 2 * x-y
... (36)

この時、zVRが、0,2,4,6,8,10,12,14の場合には、画素予測値は、次の式(37)のように生成され、zVRが1,3,5,7,9,11,13の場合には、画素予測値は、次の式(38)のように生成される。

pred8x8L[x,y] = (p’[x-(y>>1)-1,-1] + p’[x-(y>>1),-1] + 1) >> 1
・・・(37)
pred8x8L[x,y]
= (p’[x-(y>>1)-2,-1] + 2*p’[x-(y>>1)-1,-1] + p’[x-(y>>1),-1] + 2) >> 2
・・・(38)
At this time, when zVR is 0,2,4,6,8,10,12,14, the pixel prediction value is generated as in the following equation (37), and zVR is 1,3,5 , 7, 9, 11, and 13, the predicted pixel value is generated as in the following Expression (38).

pred8x8 L [x, y] = (p '[x- (y >> 1) -1, -1] + p' [x- (y >> 1),-1] + 1) >> 1
... (37)
pred8x8 L [x, y]
= (p '[x- (y >> 1) -2, -1] + 2 * p' [x- (y >> 1) -1, -1] + p '[x- (y >> 1 ),-1] + 2) >> 2
... (38)

また、zVRが-1の場合には、画素予測値は、次の式(39)のように生成され、これ以外の場合、すなわち、zVRが-2,-3,-4,-5,-6,-7の場合には、画素予測値は、次の式(40)のように生成される。

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

pred8x8L[x,y] = (p’[-1,y-2*x-1] + 2*p’[-1,y-2*x-2] + p’[-1,y-2*x-3] + 2) >> 2
・・・(40)
In addition, when zVR is −1, the predicted pixel value is generated as in the following Expression (39). In other cases, that is, zVR is −2, −3, −4, −5, − In the case of 6, -7, the pixel prediction value is generated as in the following Expression (40).

pred8x8 L [x, y] = (p '[-1,0] + 2 * p' [-1, -1] + p '[0, -1] + 2) >> 2
... (39)

pred8x8 L [x, y] = (p '[-1, y-2 * x-1] + 2 * p' [-1, y-2 * x-2] + p '[-1, y-2 * X-3] + 2) >> 2
... (40)

モード6はHorizontal_Down_prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、Horizontal_Down_prediction modeは、p[x,-1],x=0,…,7及びp[-1,y],y=-1,…,7が “available”の時のみ適用される。今、zVRを次の式(41)のように定義するものとする。

zHD = 2*y - x
・・・(41)
Mode 6 is a Horizontal_Down_prediction mode, and the predicted value pred8x8 L [x, y] is generated as follows. That is, the Horizontal_Down_prediction mode is applied only when p [x, -1], x = 0,..., 7 and p [-1, y], y = -1,. Now, let us assume that zVR is defined as the following equation (41).

zHD = 2 * y-x
... (41)

この時、zHDが0,2,4,6,8,10,12,14の場合には、予測画素値は、次の式(42)のように生成され、zHDが1,3,5,7,9,11,13の場合には、予測画素値は、次の式(43)のように生成される。

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

pred8x8L[x,y]
= (p’[-1,y-(x>>1)-2] + 2*p’[-1,y-(x>>1)-1] + p’[-1,y-(x>>1)] + 2) >> 2
・・・(43)
At this time, when zHD is 0,2,4,6,8,10,12,14, the predicted pixel value is generated as in the following equation (42), and zHD is 1,3,5, In the case of 7, 9, 11, 13, the predicted pixel value is generated as in the following equation (43).

pred8x8 L [x, y] = (p '[-1, y- (x >> 1) -1] + p' [-1, y- (x >> 1) + 1] >> 1
... (42)

pred8x8 L [x, y]
= (p '[-1, y- (x >> 1) -2] + 2 * p' [-1, y- (x >> 1) -1] + p '[-1, y- (x >> 1)] + 2) >> 2
... (43)

また、zHDが-1の場合には、予測画素値は、次の式(44)のように生成され、zHDがこれ以外の値の場合、すなわち、-2,-3,-4,-5,-6,-7の場合には、予測画素値は、次の式(45)のように生成される。

pred8x8L[x,y] = (p’[-1,0] + 2*p[-1,-1] + p’[0,-1] + 2) >> 2
・・・(44)

pred8x8L[x,y] = (p’[x-2*y-1,-1] + 2*p’[x-2*y-2,-1] + p’[x-2*y-3,-1] + 2) >> 2
・・・(45)
Further, when zHD is −1, the predicted pixel value is generated as in the following Expression (44), and when zHD is a value other than this, that is, −2, −3, −4, −5 , -6, -7, the predicted pixel value is generated as in the following Expression (45).

pred8x8 L [x, y] = (p '[-1,0] + 2 * p [-1, -1] + p' [0, -1] + 2) >> 2
... (44)

pred8x8 L [x, y] = (p '[x-2 * y-1, -1] + 2 * p' [x-2 * y-2, -1] + p '[x-2 * y- 3, -1] + 2) >> 2
... (45)

モード7はVertical_Left_prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、Vertical_Left_prediction modeは、p[x,-1], x=0,…,15が “available” の時のみ適用され、y=0,2,4,6の場合、予測画素値は、次の式(46)のように生成され、それ以外の場合、すなわち、y=1,3,5,7の場合、予測画素値は、次の式(47)のように生成される。

pred8x8L[x,y] = (p’[x+(y>>1),-1] + p’[x+(y>>1)+1,-1] + 1) >> 1
・・・(46)

pred8x8L[x,y]
= (p’[x+(y>>1),-1] + 2*p’[x+(y>>1)+1,-1] + p’[x+(y>>1)+2,-1] + 2) >> 2
・・・(47)
Mode 7 is Vertical_Left_prediction mode, and the predicted value pred8x8 L [x, y] is generated as follows. That is, Vertical_Left_prediction mode is applied only when p [x, -1], x = 0, ..., 15 is “available”, and when y = 0,2,4,6, the predicted pixel value is In other cases, that is, in the case of y = 1, 3, 5, and 7, the predicted pixel value is generated as in the following expression (47).

pred8x8 L [x, y] = (p '[x + (y >> 1),-1] + p' [x + (y >> 1) + 1, -1] + 1) >> 1
... (46)

pred8x8 L [x, y]
= (p '[x + (y >> 1),-1] + 2 * p' [x + (y >> 1) + 1, -1] + p '[x + (y >> 1) + 2,- 1] + 2) >> 2
... (47)

モード8はHorizontal_Up_prediction modeであり、予測値pred8x8L[x,y]は以下の通り生成される。すなわち、Horizontal_Up_prediction modeは、p[-1,y], y=0,…,7 が “available” の時のみ適用される。以下では、zHUを次の式(48)のように定義する。

zHU = x + 2*y
・・・(48)
Mode 8 is Horizontal_Up_prediction mode, and the predicted value pred8x8 L [x, y] is generated as follows. That is, the Horizontal_Up_prediction mode is applied only when p [-1, y], y = 0,..., 7 is “available”. In the following, zHU is defined as in the following equation (48).

zHU = x + 2 * y
... (48)

zHUの値が0,2,4,6,8,10,12の場合、予測画素値は、次の式(49)のように生成され、zHUの値が1,3,5,7,9,11の場合、予測画素値は、次の式(50)のように生成される。

pred8x8L[x,y] = (p’[-1,y+(x>>1)] + p’[-1,y+(x>>1)+1] + 1) >> 1
・・・(49)

pred8x8L[x,y] = (p’[-1,y+(x>>1)]
・・・(50)
When the value of zHU is 0,2,4,6,8,10,12, the predicted pixel value is generated as in the following equation (49), and the value of zHU is 1,3,5,7,9 , 11, the predicted pixel value is generated as in the following equation (50).

pred8x8 L [x, y] = (p '[-1, y + (x >> 1)] + p' [-1, y + (x >> 1) +1] + 1) >> 1
... (49)

pred8x8 L [x, y] = (p '[-1, y + (x >> 1)]
... (50)

また、zHUの値が13の場合、予測画素値は、次の式(51)のように生成され、それ以外の場合、すなわち、zHUの値が13より大きい場合、予測画素値は、次の式(52)のように生成される。

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

pred8x8L[x,y] = p’[-1,7]
・・・(52)
In addition, when the value of zHU is 13, the predicted pixel value is generated as in the following equation (51). In other cases, that is, when the value of zHU is larger than 13, the predicted pixel value is It is generated as shown in equation (52).

pred8x8 L [x, y] = (p '[-1,6] + 3 * p' [-1,7] + 2) >> 2
... (51)

pred8x8 L [x, y] = p '[-1,7]
... (52)

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

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

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

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

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

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

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

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

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

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

Figure 0005854296

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

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

Figure 0005854296

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

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

Figure 0005854296

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

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

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

Figure 0005854296

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

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

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

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

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

Figure 0005854296

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

Figure 0005854296
Further, when P (−1, y); x, y = −1,0,..., 7 is “unavailable”, the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is Is generated as shown in equation (60).

Figure 0005854296

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

Figure 0005854296
When P (x, -1); x, y = -1,0,..., 7 is “unavailable”, the predicted pixel value Pred (x, y) of each pixel of the target macroblock A is (61).

Figure 0005854296

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

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

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

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

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

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

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

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

Figure 0005854296

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

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

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

以上のようにH.264/AVC方式におけるイントラ予測においては、式(14)乃至式(24)で上述したように、8×8画素のブロック単位のイントラ予測を行うに先立ってのみ、定められたフィルタ係数で、隣接画素の画素値のフィルタ処理が行われている。これに対して、画像符号化装置51においては、すべてのイントラ予測モードのイントラ予測を行うに先立ち、予測対象のブロックに応じて設定されたフィルタ係数で隣接画素の画素値のフィルタ処理が行われる。   As above. In the intra prediction in the H.264 / AVC format, as described above with reference to the equations (14) to (24), adjacent to the 8 × 8 pixel block unit intra prediction with the predetermined filter coefficient only. Filter processing of pixel values of pixels is performed. On the other hand, in the image encoding device 51, prior to performing intra prediction in all intra prediction modes, filter processing of pixel values of adjacent pixels is performed with a filter coefficient set according to a prediction target block. .

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

図14の例の場合、イントラ予測部74は、隣接画像設定部81、予測画像生成部82、および最適予測モード判定部83により構成されている。   In the example of FIG. 14, the intra prediction unit 74 includes an adjacent image setting unit 81, a predicted image generation unit 82, and an optimal prediction mode determination unit 83.

隣接画素内挿フィルタ切替部75は、予測モードバッファ91、量子化パラメータバッファ92、およびローパスフィルタ設定部93により構成されている。なお、ローパスフィルタ設定部93には、フィルタ係数メモリ94が内蔵されている。   The adjacent pixel interpolation filter switching unit 75 includes a prediction mode buffer 91, a quantization parameter buffer 92, and a low pass filter setting unit 93. The low-pass filter setting unit 93 includes a filter coefficient memory 94.

隣接画像設定部81には、フレームメモリ72からのイントラ予測の対象ブロックの隣接画素値が供給される。図14の場合、スイッチ73の図示は省略されているが、実際には、隣接画素値は、フレームメモリ72から、スイッチ73を介して隣接画像設定部81に供給される。なお、イントラ予測の場合、隣接画素値として、デブロックフィルタ71によりデブロックフィルタリングされていない画素値が用いられる。   The adjacent image setting unit 81 is supplied with the adjacent pixel value of the target block for intra prediction from the frame memory 72. In FIG. 14, the switch 73 is not shown, but actually, the adjacent pixel value is supplied from the frame memory 72 to the adjacent image setting unit 81 via the switch 73. In the case of intra prediction, a pixel value that has not been deblocked filtered by the deblocking filter 71 is used as an adjacent pixel value.

隣接画素設定部81は、ローパスフィルタ設定部93により設定されたフィルタ係数を用いて、フレームメモリ72からの対象ブロックの隣接画素値に対して、フィルタ処理を施し、フィルタ処理された隣接画素値を、予測画像生成部82に供給する。   The adjacent pixel setting unit 81 performs a filtering process on the adjacent pixel value of the target block from the frame memory 72 using the filter coefficient set by the low-pass filter setting unit 93, and determines the filtered adjacent pixel value. And supplied to the predicted image generation unit 82.

予測画像生成部82は、現在処理されているイントラ予測モードがどのモードであるのかという情報を、予測モードバッファ91に供給する。予測画像生成部82は、隣接画素設定部81からのフィルタ処理された隣接画素値を用いて、予測モードバッファ91に供給したイントラ予測モードでの対象ブロックのイントラ予測を行い、予測画像を生成する。生成された予測画像は、イントラ予測モード情報とともに、最適予測モード判定部83に供給される。   The prediction image generation unit 82 supplies information indicating which mode is the currently processed intra prediction mode to the prediction mode buffer 91. The prediction image generation unit 82 performs intra prediction of the target block in the intra prediction mode supplied to the prediction mode buffer 91 using the filtered adjacent pixel value from the adjacent pixel setting unit 81, and generates a prediction image. . The generated prediction image is supplied to the optimum prediction mode determination unit 83 together with the intra prediction mode information.

最適予測モード判定部83には、画面並べ替えバッファ62から読み出されたイントラ予測する画像と、予測画像生成部82により生成された予測画像と、そのイントラ予測モード情報が供給される。   The optimal prediction mode determination unit 83 is supplied with the image for intra prediction read from the screen rearrangement buffer 62, the prediction image generated by the prediction image generation unit 82, and the intra prediction mode information thereof.

最適予測モード判定部83は、供給された情報を用いて、予測画像を生成したイントラ予測モードに対してコスト関数値を算出し、算出したコスト関数値が最小値を与えるイントラ予測モードを、最適イントラ予測モードとして決定する。最適予測モード判定部83は、最適イントラ予測モードの予測画像と、対応するコスト関数値を予測画像選択部77に出力する。   The optimal prediction mode determination unit 83 uses the supplied information to calculate a cost function value for the intra prediction mode in which the predicted image is generated, and selects the intra prediction mode in which the calculated cost function value gives the minimum value. The intra prediction mode is determined. The optimal prediction mode determination unit 83 outputs the predicted image in the optimal intra prediction mode and the corresponding cost function value to the predicted image selection unit 77.

また、最適予測モード判定部83は、予測画像選択部77により最適イントラ予測モードで生成された予測画像が選択された場合、最適イントラ予測モードを示す情報を、可逆符号化部66に供給する。   In addition, when the predicted image generated in the optimal intra prediction mode is selected by the predicted image selection unit 77, the optimal prediction mode determination unit 83 supplies information indicating the optimal intra prediction mode to the lossless encoding unit 66.

予測モードバッファ91は、予測画像生成部82からのイントラ予測モード情報を格納する。量子化パラメータバッファ92は、レート制御部78からの量子化パラメータを格納する。   The prediction mode buffer 91 stores the intra prediction mode information from the predicted image generation unit 82. The quantization parameter buffer 92 stores the quantization parameter from the rate control unit 78.

ローパスフィルタ設定部93は、予測モードバッファ91から対象ブロックのイントラ予測モード情報を読み出し、量子化パラメータバッファ92から対象ブロックに対する量子化パラメータを読み出す。ローパスフィルタ設定部93は、内蔵するフィルタ係数メモリ94に記憶されているフィルタ係数の中から、これらの情報に対応するフィルタ係数を設定し、設定したフィルタ係数を、隣接画素設定部81に供給する。   The low pass filter setting unit 93 reads the intra prediction mode information of the target block from the prediction mode buffer 91, and reads the quantization parameter for the target block from the quantization parameter buffer 92. The low-pass filter setting unit 93 sets filter coefficients corresponding to these pieces of information from the filter coefficients stored in the built-in filter coefficient memory 94, and supplies the set filter coefficients to the adjacent pixel setting unit 81. .

フィルタ係数メモリ94は、後述する図28の学習装置251において、トレーニング画像が用いられて学習されることにより得られた、量子化パラメータおよびイントラ予測モードに対応したフィルタ係数を記憶している。このフィルタ係数は、例えば、スライス毎に、次に説明するように算出されて記憶されたものである。   The filter coefficient memory 94 stores the filter coefficient corresponding to the quantization parameter and the intra prediction mode obtained by learning using the training image in the learning device 251 of FIG. 28 described later. This filter coefficient is calculated and stored as described below for each slice, for example.

[最適フィルタ係数の算出の説明]
次に、図15を参照して、この隣接画素のフィルタ処理に用いられる、最適なフィルタ係数の算出方法について説明する。なお、図15の例においては、4×4画素の対象ブロックについて、垂直予測(vertical Prediction)を行う例が示されているが、以下の説明は、どのイントラ予測モードにも適用可能な場合を説明する。
[Explanation of calculation of optimum filter coefficient]
Next, an optimal filter coefficient calculation method used for the filter processing of the adjacent pixels will be described with reference to FIG. In the example of FIG. 15, an example in which vertical prediction (vertical prediction) is performed on a target block of 4 × 4 pixels is shown, but the following description is applicable to any intra prediction mode. explain.

式(14)乃至式(24)で上述した8×8画素のブロック単位のイントラ予測においては、隣接画素に対するローパスフィルタとして、{1,2,1}なる3タップのフィルタ係数が定義されているが、3タップの一般形として、{c0,c1,c2}を考えることとする。さらに、本発明においては、オフセット値として、第4のパラメータc3も導入される。 In the 8 × 8 pixel block prediction intra prediction described above in Equations (14) to (24), a 3-tap filter coefficient of {1, 2, 1} is defined as a low-pass filter for adjacent pixels. Let {c 0 , c 1 , c 2 } be considered as a general form of 3 taps. Furthermore, in the present invention, the fourth parameter c 3 is also introduced as an offset value.

なお、以下の説明においては、この3タップのフィルタが、スライス毎に設定可能であるとするが、これに限定されず、例えば、シーケンス全体や、GOP毎に設定可能であってもよい。   In the following description, the 3-tap filter can be set for each slice. However, the present invention is not limited to this, and may be set for the entire sequence or for each GOP, for example.

図15の例において、akm(0≦k,m≦3)は、対象ブロックに含まれる画素の画素値、bm(-1≦m≦4)は、垂直予測に用いられる隣接画素の画素値である。 In the example of FIG. 15, a km (0 ≦ k, m ≦ 3) is a pixel value of a pixel included in the target block, and bm (−1 ≦ m ≦ 4) is a pixel value of an adjacent pixel used for vertical prediction. It is.

まず、隣接画素値bmに、3タップのフィルタ処理が施されることにより、次の式(65)に示されるb’m(0≦m≦3)が生成される。

Figure 0005854296

すなわち、フィルタ処理がなされ、フィルタ係数が用いられる場合、以下、特に言及しなくても、式(65)に示されるように、対応するオフセット値も用いられるものとする。換言するに、フィルタ係数とオフセット値は、フィルタ処理に用いられる係数である。同様に、フィルタ係数が符号化されて復号側に送られる場合、対応するオフセット値も符号化されて送られるものとする。 First, by performing a 3-tap filter process on the adjacent pixel value b m , b′m (0 ≦ m ≦ 3) shown in the following equation (65) is generated.

Figure 0005854296

That is, when the filter processing is performed and the filter coefficient is used, the corresponding offset value is also used as shown in Expression (65), even if not specifically mentioned below. In other words, the filter coefficient and the offset value are coefficients used for the filtering process. Similarly, when the filter coefficient is encoded and sent to the decoding side, the corresponding offset value is also encoded and sent.

いま、イントラ予測モードがnであるときの予測画素値をpij(b’m,n);0≦i,j≦3であるとすると、イントラ予測画素値は、図2乃至図14を参照して上述したように、予測画素は線形な式により生成されるため、次の式(66)が成り立つ。

Figure 0005854296
Now, assuming that the prediction pixel value when the intra prediction mode is n is p ij (b ′ m , n); 0 ≦ i, j ≦ 3, refer to FIG. 2 to FIG. 14 for the intra prediction pixel value. As described above, since the prediction pixel is generated by a linear expression, the following expression (66) is established.

Figure 0005854296

このとき、aijを原画像画素値として、対象ブロックΩに対する予測2乗誤差は、次の式(67)で表される。

Figure 0005854296
At this time, with a ij as the original image pixel value, the predicted square error with respect to the target block Ω is expressed by the following equation (67).

Figure 0005854296

ここで、対象スライス内で、イントラ予測モードnとして符号化されるイントラブロックの集合を、Φで表すとして、Φに属するブロックに関する予測2乗誤差の総和は、次の式(68)で表される。

Figure 0005854296
Here, assuming that a set of intra blocks encoded as the intra prediction mode n in the target slice is represented by Φ, the sum of the prediction square errors regarding the blocks belonging to Φ is expressed by the following equation (68). The

Figure 0005854296

上述した式(68)において、Err(Ω∈Φ)を、c0,c1,c2,c3の関数、すなわち、Err(Ω∈Φ;c0,c1,c2,c3)とみなし、Err(Ω∈Φ;c0,c1,c2,c3)を最小とするようなc0,c1,c2,c3が対象スライスにおける最適なフィルタ係数の値ということになる。すなわち、次の式(69)が成り立つc0,c1,c2,c3を求めればよい。

Figure 0005854296
In the above formula (68), Err (Ω∈Φ) is a function of c 0 , c 1 , c 2 , c 3 , that is, Err (Ω∈Φ; c 0 , c 1 , c 2 , c 3 ) that; (c 0, c 1, c 2, c 3 Ω∈Φ) c 0 that minimizes the, c 1, c 2, c 3 is the optimum filter coefficient of the current slice value as regards, Err become. That is, c 0 , c 1 , c 2 , and c 3 that satisfy the following expression (69) may be obtained.

Figure 0005854296

つまり、式(69)により、次の式(70)に示される連立方程式が得られることになる。

Figure 0005854296
That is, simultaneous equations shown in the following equation (70) are obtained from the equation (69).

Figure 0005854296

行列を用いて、この式(70)を書きなおすと、式(71)となる。

Figure 0005854296
When this equation (70) is rewritten using a matrix, equation (71) is obtained.

Figure 0005854296

この式(71)を解くことで、対象スライスに対する最適フィルタ係数およびオフセット値{c0,c1,c2,c3}を求めることができる。 By solving the equation (71), the optimum filter coefficient and the offset value {c 0 , c 1 , c 2 , c 3 } for the target slice can be obtained.

なお、最適フィルタ係数およびオフセット値{c0,c1,c2,c3}は、式(70)の連立方程式を解くことにより、浮動小数点の値として求められることになるが、図1の画像符号化装置51と、対応する図22の画像復号装置151に適用する場合には、例えば、8ビットの係数に丸められる。 The optimum filter coefficient and the offset value {c 0 , c 1 , c 2 , c 3 } are obtained as floating point values by solving the simultaneous equations of Equation (70). When the present invention is applied to the image encoding device 51 and the corresponding image decoding device 151 in FIG. 22, it is rounded to an 8-bit coefficient, for example.

すなわち、フィルタ係数は浮動小数点であっても、例えば、フィルタ係数メモリ94においては、プロセッサのレジスタ長に応じて、nビット(nは整数)の値として保持される。   That is, even if the filter coefficient is a floating point, for example, in the filter coefficient memory 94, it is held as a value of n bits (n is an integer) according to the register length of the processor.

上述した方法と同様の方法を、他のイントラ予測モードにも適用することにより、他のイントラ予測モードにおいても、最適フィルタ係数を求めることができる。また、イントラ4×4予測モードのみならず、イントラ8×8予測モード、イントラ16×16予測モード、色差信号に対するイントラ予測モードに対しても、同様の方法により、最適フィルタ係数を求めることができる。   By applying the same method as described above to other intra prediction modes, the optimum filter coefficient can be obtained also in other intra prediction modes. Further, not only the intra 4 × 4 prediction mode but also the intra 8 × 8 prediction mode, the intra 16 × 16 prediction mode, and the intra prediction mode for color difference signals, the optimum filter coefficient can be obtained by the same method. .

上記説明においては、それぞれのイントラ予測モードに対して1つのフィルタ係数を求めるとしたが、これに限らず、すべてのイントラ予測モードに対して1つだけフィルタ係数を求めるようにしてもよい。特に、図2乃至図14を参照して上述したイントラ予測モードは、Vertical(垂直)及びHorizontal(水平)モードに関しては、予測画素値をそのまま使うのに対し、その他のモードに関しては、予測画素の生成に、何らかの平均処理若しくは加重平均処理が行なわれるため、特性が異なる。このため、VerticalおよびHorizontalモードと、それ以外のモードという2つのクラス分類を行い、それぞれのクラスに対してフィルタ係数を算出することで、更なる符号化効率の向上が実現できる。また、例えば、輝度信号については、イントラ4×4予測モードに対して1つ、イントラ8×8予測モードに対して1つ、イントラ16×16予測モードに対して1つとしてもよい。色差信号に関しては、例えば、Cb/Crそれぞれに対して別途フィルタ係数を求めてもよい。   In the above description, one filter coefficient is obtained for each intra prediction mode. However, the present invention is not limited to this, and only one filter coefficient may be obtained for all intra prediction modes. In particular, the intra prediction modes described above with reference to FIGS. 2 to 14 use the predicted pixel values as they are for the Vertical and Horizontal modes, while the prediction pixel values for the other modes are the same. Since some average processing or weighted average processing is performed for generation, the characteristics are different. For this reason, the encoding efficiency can be further improved by performing two class classifications of the Vertical and Horizontal modes and the other modes and calculating the filter coefficient for each class. Further, for example, one luminance signal may be used for the intra 4 × 4 prediction mode, one for the intra 8 × 8 prediction mode, and one for the intra 16 × 16 prediction mode. For the color difference signal, for example, a separate filter coefficient may be obtained for each of Cb / Cr.

また、上記説明においては、ローパスフィルタ処理のためのフィルタ係数として、{c0,c1,c2}の3タップとしたが、3タップに限らず、何タップのフィルタを使用してもよい。すなわち、タップ数のフィルタ係数+オフセット値が求められる。ただし、タップ数の増加とともに、解くべき連立方程式の次数が増大する。 In the above description, the filter coefficients for the low-pass filter processing are three taps {c 0 , c 1 , c 2 }, but the number of filters is not limited to three taps, and any number of taps may be used. . That is, the filter coefficient of the number of taps + the offset value is obtained. However, as the number of taps increases, the order of simultaneous equations to be solved increases.

さらに、CIF(Common Intermediate Format)/QCIF(Quarter CIF),SD(Standard Definition),HD(High Definition)などといったように、画枠に応じて異なるフィルタ係数を用意しておき、それを適用することもできる。   Furthermore, prepare different filter coefficients according to the image frame, such as CIF (Common Intermediate Format) / QCIF (Quarter CIF), SD (Standard Definition), HD (High Definition), etc., and apply them. You can also.

また、上述した方法においては、イントラ予測残差(予測2乗誤差)を最小にすることにより、フィルタ係数の算出を行っている。ただし、フィルタ係数の算出方法は、これに限定されず、例えば、フィルタ係数を復号側に送る必要がある場合には、そのフィルタ係数を送るためのビットを含めた最適化を行ってもよい。   In the above-described method, the filter coefficient is calculated by minimizing the intra prediction residual (prediction square error). However, the calculation method of the filter coefficient is not limited to this. For example, when it is necessary to send the filter coefficient to the decoding side, optimization including a bit for sending the filter coefficient may be performed.

さらに、上述したフィルタ係数において、次の式(72)に示されるように、係数の対称性を仮定する。

C0 = C2
・・・(72)
Further, in the above-described filter coefficient, the symmetry of the coefficient is assumed as shown in the following equation (72).

C0 = C2
... (72)

すなわち、{c0,c1,c0}のように、フィルタ係数が、0位相に対する係数を中心にして、対称性を有するように算出される。これにより、上述した式(70)に示される3つの連立方程式を、2つに減らすことが可能である。この結果、演算量を減らすことができる。 That is, as in {c 0 , c 1 , c 0 }, the filter coefficient is calculated so as to have symmetry with the coefficient for the 0 phase as the center. Thereby, it is possible to reduce the three simultaneous equations shown in the above-mentioned formula (70) to two. As a result, the amount of calculation can be reduced.

以上の方法を用いて、入力画像に適切なフィルタ係数を設定し、適応的に隣接画素に対するローパスフィルタ処理を行うことにより、画像や量子化パラメータ、予測モードに適した予測画像を用いて符号化することが可能となる。これにより、符号化効率を向上させることができる。   Using the above method, by setting an appropriate filter coefficient to the input image and adaptively performing low-pass filter processing on adjacent pixels, encoding using the predicted image suitable for the image, quantization parameter, and prediction mode It becomes possible to do. Thereby, encoding efficiency can be improved.

上述した最適フィルタ係数の算出としては、以下の2通りの方法が考えられる。第1の方法は、符号化処理を行うに先立ち、トレーニングのための画像信号を用いて、予め、その画像信号全体を最適化するフィルタ係数を算出しておくオフライン処理である。このオフライン処理である学習処理については、図28を参照して後述され、その学習処理により算出されたフィルタ係数とオフセット値が、図14のフィルタ係数メモリ94に記憶されている。   As the calculation of the optimum filter coefficient described above, the following two methods are conceivable. The first method is an off-line process in which a filter coefficient for optimizing the entire image signal is calculated in advance using an image signal for training prior to performing the encoding process. The learning process as the offline process will be described later with reference to FIG. 28, and the filter coefficient and the offset value calculated by the learning process are stored in the filter coefficient memory 94 of FIG.

第2の方法は、各スライスに対し、逐次最適なフィルタ係数を算出するオンライン処理である。この場合、算出されたフィルタ係数とオフセット値は復号側に送られる。なお、第2の方法であるオンライン処理を行う場合の例については、図20を参照して後述される。   The second method is online processing for calculating the optimum filter coefficient sequentially for each slice. In this case, the calculated filter coefficient and offset value are sent to the decoding side. An example of performing the online process as the second method will be described later with reference to FIG.

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

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

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

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

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

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

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

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

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

なお、このとき、イントラ予測部74においては、イントラ予測処理に先立ち、隣接画素内挿フィルタ切替部75により設定されたフィルタ係数を用いて、各対象ブロックのイントラ予測に用いられる隣接画素に対して、フィルタ処理が施される。そして、イントラ予測部74においては、フィルタ処理が施された隣接画素を用いて、イントラ予測が行われて、予測画像が生成される。   At this time, the intra prediction unit 74 uses the filter coefficient set by the adjacent pixel interpolation filter switching unit 75 prior to the intra prediction process to perform the adjacent pixel used for the intra prediction of each target block. Filter processing is performed. And in the intra estimation part 74, intra prediction is performed using the adjacent pixel to which the filter process was performed, and a predicted image is produced | generated.

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

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

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

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

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

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

量子化部65のレートの制御に用いられた量子化パラメータは、可逆符号化部66に供給され、上述したステップS23において、可逆符号化処理され、圧縮画像のヘッダ部に挿入される。また、この量子化パラメータは、隣接画素内挿フィルタ切替部75に供給され、上述したステップS21において、イントラ予測に先立って行われる、隣接画素に施すフィルタ処理に用いられるフィルタ係数の設定に用いられる。   The quantization parameter used to control the rate of the quantization unit 65 is supplied to the lossless encoding unit 66, and is subjected to lossless encoding processing in step S23 described above, and inserted into the header portion of the compressed image. Further, the quantization parameter is supplied to the adjacent pixel interpolation filter switching unit 75, and is used for setting a filter coefficient used for the filter processing applied to the adjacent pixel, which is performed prior to the intra prediction in step S21 described above. .

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

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

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

ステップS31におけるイントラ予測処理の詳細は、図18を参照して後述するが、この処理により、最適なフィルタ係数が設定され、設定されたフィルタ係数が用いられて、隣接画素に対してフィルタ処理が行われる。そして、フィルタ処理が行われた隣接画素が用いられて、イントラ予測が行われて、予測画像が生成される。   Details of the intra prediction process in step S31 will be described later with reference to FIG. 18. With this process, an optimum filter coefficient is set, and the set filter coefficient is used to perform a filter process on adjacent pixels. Done. Then, intra prediction is performed using the adjacent pixels on which the filter process has been performed, and a predicted image is generated.

以上の処理が、候補となる全てのイントラ予測モードに対して行われ、候補となる全てのイントラ予測モードに対してコスト関数値が算出され、算出されたコスト関数値に基づいて、最適イントラ予測モードが決定される。生成された予測画像と最適イントラ予測モードのコスト関数値は、予測画像選択部77に供給される。   The above processing is performed for all candidate intra prediction modes, cost function values are calculated for all candidate intra prediction modes, and optimal intra prediction is performed based on the calculated cost function values. The mode is determined. The generated predicted image and the cost function value of the optimal intra prediction mode are supplied to the predicted image selection unit 77.

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

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

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

[イントラ予測処理の説明]
次に、図18のフローチャートを参照して、図17のステップS31におけるイントラ予測処理を説明する。なお、図18の例においては、輝度信号の場合を例として説明する。
[Description of intra prediction processing]
Next, the intra prediction process in step S31 in FIG. 17 will be described with reference to the flowchart in FIG. In the example of FIG. 18, a case of a luminance signal will be described as an example.

レート制御部78は、上述した図16のステップS25において、対象ブロックに対する量子化パラメータを供給してくる。量子化パラメータバッファ92は、ステップS41において、レート制御部78からの対象ブロックに対する量子化パラメータを取得し、格納する。   The rate control unit 78 supplies the quantization parameter for the target block in step S25 of FIG. 16 described above. In step S41, the quantization parameter buffer 92 acquires and stores the quantization parameter for the target block from the rate control unit 78.

予測画像生成部82は、ステップS42において、4×4画素、8×8画素、および16×16画素の各イントラ予測モードのうち、1つのイントラ予測モードを選択する。選択したイントラ予測モードの情報は、予測モードバッファ91に格納される。   In step S42, the predicted image generation unit 82 selects one intra prediction mode from the 4 × 4 pixel, 8 × 8 pixel, and 16 × 16 pixel intra prediction modes. Information on the selected intra prediction mode is stored in the prediction mode buffer 91.

ローパスフィルタ設定部93は、予測モードバッファ91からイントラ予測モードの情報を読み出し、量子化パラメータバッファ92から量子化パラメータ値を読み出す。そして、ローパスフィルタ設定部93は、ステップS43において、フィルタ係数メモリ94に記憶されている、スライス毎に算出されたフィルタ係数の中から、イントラ予測モードおよび量子化パラメータに対応するフィルタ係数を設定する。設定されたフィルタ係数は、隣接画素設定部81に供給される。   The low-pass filter setting unit 93 reads the intra prediction mode information from the prediction mode buffer 91 and reads the quantization parameter value from the quantization parameter buffer 92. In step S43, the low-pass filter setting unit 93 sets the filter coefficient corresponding to the intra prediction mode and the quantization parameter from the filter coefficients calculated for each slice stored in the filter coefficient memory 94. . The set filter coefficient is supplied to the adjacent pixel setting unit 81.

ステップS44において、隣接画素設定部81は、設定されたフィルタ係数を用いて、対象ブロックの隣接画素値に対してフィルタ処理を行い、フィルタ処理された隣接画素値を、予測画像生成部82に供給する。   In step S44, the adjacent pixel setting unit 81 performs filter processing on the adjacent pixel value of the target block using the set filter coefficient, and supplies the filtered adjacent pixel value to the predicted image generation unit 82. To do.

ステップS43において、予測画像生成部82は、フィルタ処理された隣接画素値を用いて、ステップS42で選択されたイントラ予測モードで、対象ブロックのイントラ予測を行い、予測画像を生成する。   In step S43, the prediction image generation unit 82 performs intra prediction of the target block in the intra prediction mode selected in step S42, using the filtered adjacent pixel values, and generates a prediction image.

最適予測モード判定部83には、画面並べ替えバッファ62から読み出されたイントラ予測する画像と、予測画像生成部82により生成された予測画像と、そのイントラ予測モード情報が供給される。   The optimal prediction mode determination unit 83 is supplied with the image for intra prediction read from the screen rearrangement buffer 62, the prediction image generated by the prediction image generation unit 82, and the intra prediction mode information thereof.

最適予測モード判定部83は、ステップS46において、供給された情報を用いて、予測画像を生成したイントラ予測モードに対してコスト関数値を算出する。ここで、コスト関数値としては、High Complexity モードか、Low Complexity モードのいずれかの手法に基づいて行う。これらのモードは、H.264/AVC方式における参照ソフトウエアであるJM(Joint Model)で定められている。   In step S46, the optimal prediction mode determination unit 83 uses the supplied information to calculate a cost function value for the intra prediction mode in which the predicted image is generated. Here, the cost function value is determined based on either the High Complexity mode or the Low Complexity mode. These modes are H.264. It is defined by JM (Joint Model) which is reference software in the H.264 / AVC format.

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

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

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

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

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

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

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

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

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

最適予測モード判定部83は、ステップS47において、全てのイントラ予測モードについての処理が終了したか否かを判定する。すなわち、ステップS47においては、4×4画素、8×8画素、および16×16画素の各イントラ予測モードすべてについて、ステップS42乃至S46の処理が行われたか否かが判定される。   In step S47, the optimal prediction mode determination unit 83 determines whether or not the processing for all intra prediction modes has been completed. That is, in step S47, it is determined whether or not the processing in steps S42 to S46 has been performed for all the 4 × 4 pixel, 8 × 8 pixel, and 16 × 16 pixel intra prediction modes.

ステップS47において、全てのイントラ予測モードについての処理が終了していないと判定された場合、処理は、ステップS42に戻り、それ以降の処理が繰り返される。   If it is determined in step S47 that the processing for all intra prediction modes has not been completed, the processing returns to step S42, and the subsequent processing is repeated.

ステップS47において、全てのイントラ予測モードについての処理が終了されたと判定された場合、処理は、ステップS48に進む。最適予測モード判定部83は、ステップS48において、算出されたコスト関数値が最小値となるイントラ予測モードを、最適イントラ予測モードとして決定する。   If it is determined in step S47 that the processes for all intra prediction modes have been completed, the process proceeds to step S48. In step S48, the optimal prediction mode determination unit 83 determines the intra prediction mode in which the calculated cost function value is the minimum value as the optimal intra prediction mode.

最適イントラ予測モードの予測画像と、対応するコスト関数値は、予測画像選択部77に供給される。   The predicted image in the optimal intra prediction mode and the corresponding cost function value are supplied to the predicted image selection unit 77.

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

なお、フィルタ係数メモリ94に記憶されている、学習処理により算出されたフィルタ係数は、後述する図22の画像復号装置151にも同様に記憶させることにより、設定されたフィルタ係数を、圧縮画像のヘッダ情報に付加し、それを送ることは不要となる。   The filter coefficient calculated by the learning process stored in the filter coefficient memory 94 is also stored in the image decoding device 151 in FIG. 22 described later, so that the set filter coefficient is stored in the compressed image. It is not necessary to add the header information and send it.

したがって、H.264/AVCの場合、量子化パラメータは、51通りあり、イントラ予測モードは、4×4または8×8については9通りあり、これらの組み合わせを考えると、51×9=459通りという膨大なフィルタ係数が必要となる。このように膨大なフィルタ係数に関する情報を復号側に送る必要がないので、係数情報のオーバヘッドを増大させることなく、処理を実現することができる。   Therefore, H. In the case of H.264 / AVC, there are 51 quantization parameters and 9 intra prediction modes for 4 × 4 or 8 × 8, and considering these combinations, a huge filter of 51 × 9 = 459 A coefficient is required. In this way, since it is not necessary to send information on a huge amount of filter coefficients to the decoding side, processing can be realized without increasing the overhead of coefficient information.

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

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

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

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

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

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

次に、図20を参照して、最適フィルタ係数を算出する第2の方法としての、各スライスに対し、逐次最適なフィルタ係数を算出するオンライン処理を行う場合の例について説明する。   Next, with reference to FIG. 20, an example in which online processing for sequentially calculating optimum filter coefficients is performed on each slice as a second method of calculating optimum filter coefficients will be described.

なお、この場合、各スライスに対して、符号化側で算出されたフィルタ係数を、復号側に送る必要があり、あまりに多くの場合わけされたフィルタ係数を送ることは、符号化効率の低下を招く。したがって、フィルタ係数は、スライスに対して1つだけ伝送されるか、各ブロックサイズ毎の予測モードのそれぞれに1つだけ伝送されるか、あるいは、水平予測、垂直予測、…といった予測モードの種類に対して1つだけ伝送される。   In this case, for each slice, it is necessary to send the filter coefficient calculated on the encoding side to the decoding side, and sending filter coefficients that are divided in too many cases reduces the encoding efficiency. Invite. Therefore, only one filter coefficient is transmitted for each slice, only one is transmitted for each prediction mode for each block size, or the type of prediction mode such as horizontal prediction, vertical prediction,. Only one is transmitted.

また、上述したオフライン処理の場合には、フィルタ係数を算出するためのパラメータとして、イントラ予測モードと量子化パラメータを用いる例を説明した。これに対して、オンライン処理の場合、フィルタ係数を算出するためのパラメータが多いと処理量が増えてしまうため、図20の例においては、イントラ予測モードのみをパラメータとした例を説明する。説明は省略するが、もちろん、量子化パラメータのみを用いてもよいし、両方のパラメータを用いることもできる。   Moreover, in the case of the offline process mentioned above, the example which used intra prediction mode and a quantization parameter as a parameter for calculating a filter coefficient was demonstrated. On the other hand, in the case of online processing, the amount of processing increases when there are many parameters for calculating filter coefficients. Therefore, in the example of FIG. 20, an example in which only the intra prediction mode is used as a parameter will be described. Although description is omitted, of course, only the quantization parameter may be used, or both parameters may be used.

[イントラ予測部および隣接画素内挿フィルタ切替部の他の構成例]
図20は、各スライスに対し、逐次最適なフィルタ係数を算出するオンライン処理を行う場合のイントラ予測部74および隣接画素内挿フィルタ切替部75の他の構成例を示すブロック図である。
[Other Configuration Examples of Intra Prediction Unit and Adjacent Pixel Interpolation Filter Switching Unit]
FIG. 20 is a block diagram illustrating another configuration example of the intra prediction unit 74 and the adjacent pixel interpolation filter switching unit 75 in the case of performing online processing for calculating the optimum filter coefficient sequentially for each slice.

図20の例の場合、イントラ予測部74と隣接画素内挿フィルタ切替部75との間には、スイッチ101が設けられており、スイッチ101のオンオフにより、図14の場合と異なり、イントラ予測部74は、2回イントラ予測を行う。すなわち、イントラ予測部74においては、スイッチ101がオフの状態で、H.264/AVCで定義されているイントラ予測が行われ、そのイントラ予測に適するフィルタ係数が算出される。そして、算出されたフィルタ係数の中から、スイッチ101がオンの状態で、隣接画素内挿フィルタ切替部75により設定されたフィルタ係数でのイントラ予測が行われる。   In the example of FIG. 20, a switch 101 is provided between the intra prediction unit 74 and the adjacent pixel interpolation filter switching unit 75, and the intra prediction unit differs from the case of FIG. 14 by turning on and off the switch 101. 74 performs intra prediction twice. That is, in the intra prediction unit 74, the H. Intra prediction defined by H.264 / AVC is performed, and filter coefficients suitable for the intra prediction are calculated. From the calculated filter coefficients, intra prediction is performed with the filter coefficients set by the adjacent pixel interpolation filter switching unit 75 while the switch 101 is on.

図20のイントラ予測部74は、隣接画像設定部111、予測画像生成部112、および最適予測モード判定部113により構成されている。   The intra prediction unit 74 in FIG. 20 includes an adjacent image setting unit 111, a predicted image generation unit 112, and an optimal prediction mode determination unit 113.

隣接画素内挿フィルタ切替部75は、予測モードバッファ121、最適フィルタ算出部122、およびローパスフィルタ設定部123により構成されている。   The adjacent pixel interpolation filter switching unit 75 includes a prediction mode buffer 121, an optimum filter calculation unit 122, and a low-pass filter setting unit 123.

隣接画像設定部111には、フレームメモリ72からのイントラ予測の対象スライスのすべての対象ブロックの隣接画素値が供給される。図20の場合も、スイッチ73の図示は省略されている。なお、イントラ予測の場合、隣接画素値として、デブロックフィルタ71によりデブロックフィルタリングされていない画素値が用いられる。   The adjacent image setting unit 111 is supplied with the adjacent pixel values of all the target blocks of the intra prediction target slice from the frame memory 72. Also in the case of FIG. 20, the switch 73 is not shown. In the case of intra prediction, a pixel value that has not been deblocked filtered by the deblocking filter 71 is used as an adjacent pixel value.

隣接画素設定部111は、スイッチ101がオフ状態の場合、H.264/AVCで定義されているイントラ予測モードのみ、フィルタ係数を用いて、フレームメモリ72からの対象ブロックの隣接画素値に対して、フィルタ処理を施し、予測画像生成部112に供給する。すなわち、式(14)乃至式(24)に上述した8×8画素予測モードの場合のみ、フィルタ処理が施された隣接画素値が、予測画像生成部112に供給される。それ以外の場合、フレームメモリ72からの対象ブロックの隣接画素値がそのまま、予測画像生成部112に供給される。   When the switch 101 is in the OFF state, the adjacent pixel setting unit 111 performs the H.264 setting. Only in the intra prediction mode defined by H.264 / AVC, the filter processing is performed on the adjacent pixel value of the target block from the frame memory 72 using the filter coefficient, and the result is supplied to the predicted image generation unit 112. That is, the adjacent pixel value subjected to the filter processing is supplied to the predicted image generation unit 112 only in the case of the 8 × 8 pixel prediction mode described above in Expressions (14) to (24). In other cases, the adjacent pixel value of the target block from the frame memory 72 is supplied to the predicted image generation unit 112 as it is.

隣接画素設定部111は、スイッチ101がオン状態の場合、ローパスフィルタ設定部123から、フィルタ係数が供給される。よって、隣接画素設定部111は、ローパスフィルタ設定部123により設定されたフィルタ係数を用いて、フレームメモリ72からの対象ブロックの隣接画素値に対して、フィルタ処理を施し、フィルタ処理された隣接画素値を、予測画像生成部112に供給する。   The adjacent pixel setting unit 111 is supplied with a filter coefficient from the low-pass filter setting unit 123 when the switch 101 is in an ON state. Therefore, the adjacent pixel setting unit 111 performs the filtering process on the adjacent pixel value of the target block from the frame memory 72 using the filter coefficient set by the low-pass filter setting unit 123, and the filtered adjacent pixel The value is supplied to the predicted image generation unit 112.

予測画像生成部112は、隣接画素設定部111からの隣接画素値を用いて、すべてのイントラ予測モードでの対象ブロックのイントラ予測を行い、予測画像を生成する。生成された予測画像は、イントラ予測モード情報とともに、最適予測モード判定部113に供給される。   The predicted image generation unit 112 performs intra prediction of the target block in all intra prediction modes using the adjacent pixel value from the adjacent pixel setting unit 111, and generates a predicted image. The generated prediction image is supplied to the optimal prediction mode determination unit 113 together with the intra prediction mode information.

最適予測モード判定部113には、画面並べ替えバッファ62から読み出されたイントラ予測する画像と、予測画像生成部112により生成された予測画像と、そのイントラ予測モード情報が供給される。   The optimal prediction mode determination unit 113 is supplied with the image to be intra-predicted read from the screen rearrangement buffer 62, the prediction image generated by the prediction image generation unit 112, and the intra prediction mode information thereof.

最適予測モード判定部113は、供給された情報を用いて、予測画像を生成したイントラ予測モードに対してコスト関数値を算出し、算出したコスト関数値が最小値を与えるイントラ予測モードを、最適イントラ予測モードとして決定する。   The optimal prediction mode determination unit 113 uses the supplied information to calculate a cost function value for the intra prediction mode in which the predicted image is generated, and selects the intra prediction mode in which the calculated cost function value gives the minimum value. The intra prediction mode is determined.

最適予測モード判定部113は、スイッチ101がオフ状態の場合、最適イントラ予測モードの情報を予測モードバッファ121に供給する。最適予測モード判定部113は、スイッチ101がオン状態の場合、最適イントラ予測モードの予測画像と、対応するコスト関数値を予測画像選択部77に供給する。   The optimal prediction mode determination unit 113 supplies information on the optimal intra prediction mode to the prediction mode buffer 121 when the switch 101 is in the off state. When the switch 101 is on, the optimal prediction mode determination unit 113 supplies the prediction image in the optimal intra prediction mode and the corresponding cost function value to the prediction image selection unit 77.

また、最適予測モード判定部113は、予測画像選択部77により最適イントラ予測モードで生成された予測画像が選択された場合、最適イントラ予測モードを示す情報を、可逆符号化部66に供給する。   Further, when the predicted image generated in the optimal intra prediction mode is selected by the predicted image selection unit 77, the optimal prediction mode determination unit 113 supplies information indicating the optimal intra prediction mode to the lossless encoding unit 66.

予測モードバッファ121は、最適予測モード判定部113からのイントラ予測モード情報を格納する。   The prediction mode buffer 121 stores the intra prediction mode information from the optimum prediction mode determination unit 113.

最適フィルタ算出部122には、画面並べ替えバッファ62から読み出されたイントラ予測する画像と、フレームメモリ72からの対象ブロックの隣接画素値が供給される。最適フィルタ算出部122は、予測モードバッファ121から対象スライスに含まれる各ブロックのイントラ予測モードを読み出す。そして、最適フィルタ算出部122は、これらの情報を用いて、図15を参照して上述したように、対象スライスの各イントラ予測モードに対する最適なフィルタ係数を算出し、算出したフィルタ係数を、ローパスフィルタ設定部123に供給する。   The optimal filter calculation unit 122 is supplied with the intra-predicted image read from the screen rearrangement buffer 62 and the adjacent pixel value of the target block from the frame memory 72. The optimum filter calculation unit 122 reads the intra prediction mode of each block included in the target slice from the prediction mode buffer 121. Then, the optimum filter calculation unit 122 calculates the optimum filter coefficient for each intra prediction mode of the target slice using these pieces of information as described above with reference to FIG. This is supplied to the filter setting unit 123.

ローパスフィルタ設定部123は、算出された対象スライスのフィルタ係数の中から、対象ブロックに対するフィルタ係数を設定し、スイッチ101の端子をオンにして、設定されたフィルタ係数を、隣接画素設定部111に供給する。また、ローパスフィルタ設定部123は、対象スライスのフィルタ係数を、可逆符号化部66に供給する。   The low pass filter setting unit 123 sets the filter coefficient for the target block from the calculated filter coefficients of the target slice, turns on the terminal of the switch 101, and sends the set filter coefficient to the adjacent pixel setting unit 111. Supply. Further, the low pass filter setting unit 123 supplies the filter coefficient of the target slice to the lossless encoding unit 66.

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

まず、スイッチ101はオフ状態となっている。隣接画像設定部111には、フレームメモリ72からのイントラ予測の対象スライスのすべての対象ブロックの隣接画素値が供給される。隣接画素設定部111は、H.264/AVCで定義されている8×8画素のイントラ予測モードのみ、フィルタ係数を用いて、フレームメモリ72からの対象ブロックの隣接画素値に対して、フィルタ処理を施し、予測画像生成部112に供給する。すなわち、他のイントラ予測モードの場合、フレームメモリ72からの対象ブロックの隣接画素値が、そのまま、予測画像生成部112に供給される。   First, the switch 101 is in an off state. The adjacent image setting unit 111 is supplied with the adjacent pixel values of all the target blocks of the intra prediction target slice from the frame memory 72. The adjacent pixel setting unit 111 is an H.264 format. Only in the 8 × 8 pixel intra prediction mode defined by H.264 / AVC, the filter processing is performed on the adjacent pixel value of the target block from the frame memory 72 using the filter coefficient, and the prediction image generation unit 112 is subjected to the filtering process. Supply. That is, in the case of another intra prediction mode, the adjacent pixel value of the target block from the frame memory 72 is supplied to the predicted image generation unit 112 as it is.

予測画像生成部112は、ステップS101において、対象スライスに含まれるすべてのブロックに対して、イントラ予測処理を行う。すなわち、予測画像生成部112は、隣接画素設定部111からの対象ブロックの隣接画素値を用いて、各イントラ予測モードで、イントラ予測を行い、予測画像を生成する。   In step S101, the predicted image generation unit 112 performs intra prediction processing on all blocks included in the target slice. That is, the predicted image generation unit 112 performs intra prediction in each intra prediction mode using the adjacent pixel value of the target block from the adjacent pixel setting unit 111, and generates a predicted image.

最適予測モード判定部113には、画面並べ替えバッファ62から読み出されたイントラ予測する画像と、予測画像生成部112により生成された予測画像と、そのイントラ予測モード情報が供給される。   The optimal prediction mode determination unit 113 is supplied with the image to be intra-predicted read from the screen rearrangement buffer 62, the prediction image generated by the prediction image generation unit 112, and the intra prediction mode information thereof.

最適予測モード判定部113は、ステップS102において、供給された情報を用いて、予測画像を生成した全てのイントラ予測モードに対して、上述した式(73)または式(74)のコスト関数値を算出する。   In step S102, the optimum prediction mode determination unit 113 uses the supplied information to calculate the cost function value of the above-described equation (73) or equation (74) for all intra prediction modes for which a prediction image has been generated. calculate.

最適予測モード判定部113は、ステップS103において、式(73)または式(74)のコスト関数を最小値とするイントラ予測モードを、最適イントラ予測モードとして決定し、決定したイントラ予測モードの情報を、予測モードバッファ121に供給する。   In step S103, the optimal prediction mode determination unit 113 determines an intra prediction mode having the cost function of Expression (73) or Expression (74) as a minimum value as the optimal intra prediction mode, and information on the determined intra prediction mode is used. To the prediction mode buffer 121.

最適フィルタ算出部122には、画面並べ替えバッファ62から読み出されたイントラ予測する画像と、フレームメモリ72からの対象ブロックの隣接画素値が供給される。最適フィルタ算出部122は、予測モードバッファ121から対象スライスに含まれる各ブロックのイントラ予測モードを読み出す。   The optimal filter calculation unit 122 is supplied with the intra-predicted image read from the screen rearrangement buffer 62 and the adjacent pixel value of the target block from the frame memory 72. The optimum filter calculation unit 122 reads the intra prediction mode of each block included in the target slice from the prediction mode buffer 121.

そして、最適フィルタ算出部122は、ステップS104において、これらの情報を用いて、対象スライスの各イントラ予測モードに対して、対象スライス全体での残差を最小にするフィルタ係数を、最適なフィルタ係数として算出する。図15を参照して上述したように算出されたフィルタ係数は、ローパスフィルタ設定部123に供給される。   Then, in step S104, the optimum filter calculation unit 122 uses these pieces of information to determine, for each intra prediction mode of the target slice, the filter coefficient that minimizes the residual in the entire target slice, and the optimal filter coefficient. Calculate as The filter coefficients calculated as described above with reference to FIG. 15 are supplied to the low-pass filter setting unit 123.

ローパスフィルタ設定部123は、算出された対象スライスのフィルタ係数の中から、対象ブロックに対するフィルタ係数を設定し、スイッチ101の端子をオンにして、設定されたフィルタ係数を、隣接画素設定部111に供給する。   The low pass filter setting unit 123 sets the filter coefficient for the target block from the calculated filter coefficients of the target slice, turns on the terminal of the switch 101, and sends the set filter coefficient to the adjacent pixel setting unit 111. Supply.

隣接画素設定部111は、ステップS105において、ローパスフィルタ設定部123により設定されたフィルタ係数を用いて、フレームメモリ72からの対象ブロックの隣接画素値に対して、フィルタ処理を行う。   In step S <b> 105, the adjacent pixel setting unit 111 performs filter processing on the adjacent pixel value of the target block from the frame memory 72 using the filter coefficient set by the low-pass filter setting unit 123.

フィルタ処理された隣接画素値は、予測画像生成部112に供給される。予測画像生成部112は、ステップS106において、フィルタ処理された隣接画素値を用いて、対象スライスに含まれる、全てのブロックに対して、再びイントラ予測を行い、予測画像を生成する。生成された予測画像は、イントラ予測モード情報とともに、最適予測モード判定部113に供給される。   The filtered adjacent pixel values are supplied to the predicted image generation unit 112. In step S <b> 106, the predicted image generation unit 112 performs intra prediction again on all blocks included in the target slice using the filtered adjacent pixel values, and generates a predicted image. The generated prediction image is supplied to the optimal prediction mode determination unit 113 together with the intra prediction mode information.

最適予測モード判定部113は、スイッチ101がオン状態の場合、最適イントラ予測モードの予測画像と、対応するコスト関数値を予測画像選択部77に供給する。   When the switch 101 is on, the optimal prediction mode determination unit 113 supplies the prediction image in the optimal intra prediction mode and the corresponding cost function value to the prediction image selection unit 77.

予測画像選択部77は、上述した図16のステップS22において、最適イントラ予測モードと最適インター予測モードのうちの一方を、最適予測モードに決定して、予測画像の選択情報を供給してくる。   In step S22 in FIG. 16 described above, the predicted image selection unit 77 determines one of the optimal intra prediction mode and the optimal inter prediction mode as the optimal prediction mode, and supplies the selection information of the predicted image.

この予測画像の選択情報に対応して、最適予測モード判定部113は、ステップS107において、最適イントラ予測モードの予測画像が選択されたか否かを判定する。ステップS107において、最適イントラ予測モードの予測画像が選択されたと判定された場合、処理は、ステップS108に進む。   Corresponding to the prediction image selection information, the optimal prediction mode determination unit 113 determines whether or not a prediction image of the optimal intra prediction mode is selected in step S107. If it is determined in step S107 that a prediction image in the optimal intra prediction mode has been selected, the process proceeds to step S108.

ステップS108において、最適予測モード判定部113は、イントラ予測モードの情報を、可逆符号化部66に供給する。なお、対象スライスにおいて、まだ、フィルタ係数が供給されていない場合には、最適フィルタ算出部122からのフィルタ係数も可逆符号化部66に供給される。   In step S <b> 108, the optimal prediction mode determination unit 113 supplies the intra prediction mode information to the lossless encoding unit 66. If the filter coefficient is not yet supplied in the target slice, the filter coefficient from the optimum filter calculation unit 122 is also supplied to the lossless encoding unit 66.

ステップS107において、最適イントラ予測モードの予測画像が選択されていないと判定された場合、イントラ予測処理は終了される。   If it is determined in step S107 that the prediction image in the optimal intra prediction mode has not been selected, the intra prediction process is terminated.

なお、上述したステップS104乃至S106の処理を繰り返すことにより、さらに最適化されたフィルタ係数を得ることも可能である。   It should be noted that further optimized filter coefficients can be obtained by repeating the above-described steps S104 to S106.

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

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

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

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

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

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

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

イントラ予測部171には、ヘッダ情報を復号して得られたイントラ予測モードを示す情報が、可逆復号部162から供給される。イントラ予測部171は、これらの情報に基づき、隣接画素内挿フィルタ切替部172により設定されたフィルタ係数を用いて、隣接画素値に対してフィルタ処理およびイントラ予測を行うことで、予測画像を生成し、生成した予測画像を、スイッチ174に出力する。   Information indicating the intra prediction mode obtained by decoding the header information is supplied from the lossless decoding unit 162 to the intra prediction unit 171. Based on these pieces of information, the intra prediction unit 171 uses the filter coefficient set by the adjacent pixel interpolation filter switching unit 172 to perform filter processing and intra prediction on the adjacent pixel value, thereby generating a predicted image. Then, the generated predicted image is output to the switch 174.

隣接画素内挿フィルタ切替部172には、画像符号化装置51での符号化に応じて、ヘッダ情報を復号して得られたイントラ予測モードを示す情報と量子化パラメータの情報の少なくとも1つが、可逆復号部162から供給される。隣接画素内挿フィルタ切替部172は、図1の隣接画素内挿フィルタ切替部75と同じ、後述する図28の学習装置251において学習されることにより得られた、量子化パラメータおよびイントラ予測モードの少なくとも1つに対応したフィルタ係数を記憶している。   In the adjacent pixel interpolation filter switching unit 172, at least one of information indicating the intra prediction mode obtained by decoding the header information and quantization parameter information in accordance with the encoding in the image encoding device 51, Supplied from the lossless decoding unit 162. The adjacent pixel interpolation filter switching unit 172 is the same as the adjacent pixel interpolation filter switching unit 75 in FIG. 1, and the quantization parameter and the intra prediction mode obtained by learning in the learning device 251 in FIG. 28 described later. A filter coefficient corresponding to at least one is stored.

隣接画素内挿フィルタ切替部172は、可逆復号部162からの量子化パラメータおよびイントラ予測モードの少なくとも1つに対応するフィルタ係数を設定する。隣接画素内挿フィルタ切替部172は、設定したフィルタ係数を、イントラ予測部74に供給する。   The adjacent pixel interpolation filter switching unit 172 sets a filter coefficient corresponding to at least one of the quantization parameter from the lossless decoding unit 162 and the intra prediction mode. The adjacent pixel interpolation filter switching unit 172 supplies the set filter coefficient to the intra prediction unit 74.

なお、隣接画素内挿フィルタ切替部172においては、予めオフラインで学習されたフィルタ係数が記憶されている。ただし、図1の隣接画素内挿フィルタ切替部75において、オンラインでフィルタ係数が算出された場合には、そのフィルタ係数が例えば、スライス毎に送信されてくる。この場合、隣接画素内挿フィルタ切替部172においては、可逆復号部162により復号されるフィルタ係数が用いられる。   In the adjacent pixel interpolation filter switching unit 172, filter coefficients learned in advance offline are stored. However, when the filter coefficient is calculated online in the adjacent pixel interpolation filter switching unit 75 in FIG. 1, the filter coefficient is transmitted for each slice, for example. In this case, in the adjacent pixel interpolation filter switching unit 172, the filter coefficient decoded by the lossless decoding unit 162 is used.

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

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

なお、図1の画像符号化装置51においては、コスト関数に基づく予測モード判定のため、すべてのイントラ予測モードに対してイントラ予測処理が行われる。これに対して、この画像復号装置151においては、符号化されて送られてくるイントラ予測モードの情報に基づいてのみイントラ予測処理が行われる。   In the image encoding device 51 in FIG. 1, intra prediction processing is performed for all intra prediction modes for prediction mode determination based on a cost function. On the other hand, in this image decoding apparatus 151, an intra prediction process is performed only based on the information of the intra prediction mode transmitted by encoding.

[イントラ予測部および隣接画素内挿フィルタ切替部の構成例]
図23は、イントラ予測部および隣接画素内挿フィルタ切替部の詳細な構成例を示すブロック図である。なお、図23の機能ブロックは、図14に示された画像符号化装置51のオフライン処理の場合の機能ブロックに対応するものである。
[Configuration Example of Intra Prediction Unit and Adjacent Pixel Interpolation Filter Switching Unit]
FIG. 23 is a block diagram illustrating a detailed configuration example of the intra prediction unit and the adjacent pixel interpolation filter switching unit. The functional blocks in FIG. 23 correspond to the functional blocks in the case of offline processing of the image encoding device 51 shown in FIG.

図23の例の場合、イントラ予測部171は、予測画像生成部181、および隣接画素設定部182により構成されている。隣接画素内挿フィルタ切替部172は、予測モードバッファ191、量子化パラメータバッファ192、およびローパスフィルタ設定部193により構成されている。なお、ローパスフィルタ設定部193には、フィルタ係数メモリ194が内蔵されている。   In the case of the example in FIG. 23, the intra prediction unit 171 includes a predicted image generation unit 181 and an adjacent pixel setting unit 182. The adjacent pixel interpolation filter switching unit 172 includes a prediction mode buffer 191, a quantization parameter buffer 192, and a low pass filter setting unit 193. The low-pass filter setting unit 193 includes a filter coefficient memory 194.

予測画像生成部181には、可逆復号部162からのイントラ予測モード情報、隣接画素設定部182からフィルタ処理された隣接画素値が供給される。予測画像生成部181は、供給された隣接画素値を用いて、可逆復号部162からのイントラ予測モードでのイントラ予測を行い、予測画像を生成し、生成した予測画像を、スイッチ174に供給する。   The prediction image generation unit 181 is supplied with the intra prediction mode information from the lossless decoding unit 162 and the adjacent pixel value subjected to the filter processing from the adjacent pixel setting unit 182. The predicted image generation unit 181 performs intra prediction in the intra prediction mode from the lossless decoding unit 162 using the supplied adjacent pixel value, generates a predicted image, and supplies the generated predicted image to the switch 174. .

隣接画素設定部182には、フレームメモリ169からのイントラ予測の対象ブロックの隣接画素値が供給される。図23の場合、スイッチ170の図示は省略されているが、実際には、隣接画素値は、フレームメモリ169から、スイッチ170を介して隣接画像設定部182に供給される。   The adjacent pixel setting unit 182 is supplied with the adjacent pixel value of the intra prediction target block from the frame memory 169. In the case of FIG. 23, the illustration of the switch 170 is omitted, but actually, the adjacent pixel value is supplied from the frame memory 169 to the adjacent image setting unit 182 via the switch 170.

隣接画素設定部182は、ローパスフィルタ設定部193により設定されたフィルタ係数を用いて、フレームメモリ169からの対象ブロックの隣接画素値に対して、フィルタ処理を施し、フィルタ処理された隣接画素値を、予測画像生成部181に供給する。   The adjacent pixel setting unit 182 performs filter processing on the adjacent pixel value of the target block from the frame memory 169 using the filter coefficient set by the low-pass filter setting unit 193, and determines the filtered adjacent pixel value. And supplied to the predicted image generation unit 181.

予測モードバッファ191は、可逆復号部162からのイントラ予測モード情報を格納する。量子化パラメータバッファ192は、可逆復号部162からの量子化パラメータを格納する。   The prediction mode buffer 191 stores the intra prediction mode information from the lossless decoding unit 162. The quantization parameter buffer 192 stores the quantization parameter from the lossless decoding unit 162.

ローパスフィルタ設定部193は、予測モードバッファ191から対象ブロックのイントラ予測モード情報を読み出し、量子化パラメータバッファ192から対象ブロックに対する量子化パラメータを読み出す。ローパスフィルタ設定部193は、内蔵するフィルタ係数メモリ194に記憶されているフィルタ係数の中から、これらの情報に対応するフィルタ係数を設定し、設定したフィルタ係数を、隣接画素設定部182に供給する。   The low-pass filter setting unit 193 reads the intra prediction mode information of the target block from the prediction mode buffer 191 and reads the quantization parameter for the target block from the quantization parameter buffer 192. The low-pass filter setting unit 193 sets filter coefficients corresponding to these pieces of information from the filter coefficients stored in the built-in filter coefficient memory 194, and supplies the set filter coefficients to the adjacent pixel setting unit 182. .

フィルタ係数メモリ194は、図14のフィルタ係数メモリ94と同様に、後述する図28の学習装置251において学習されることにより得られた、量子化パラメータおよびイントラ予測モードに対応したフィルタ係数を記憶している。   Similarly to the filter coefficient memory 94 of FIG. 14, the filter coefficient memory 194 stores the filter coefficient corresponding to the quantization parameter and the intra prediction mode obtained by learning in the learning device 251 of FIG. 28 described later. ing.

このフィルタ係数は、例えば、スライス毎に、図15を参照して上述したように算出されて記憶されたものである。なお、フィルタ係数メモリ194においても、フィルタ係数は、プロセッサのレジスタ長に応じて、nビット(nは整数)の値として保持される。   This filter coefficient is calculated and stored as described above with reference to FIG. 15 for each slice, for example. Also in the filter coefficient memory 194, the filter coefficient is held as a value of n bits (n is an integer) according to the register length of the processor.

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

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

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

すなわち、予測モード情報がイントラ予測モード情報である場合、予測モード情報は、イントラ予測部171および隣接画素内挿フィルタ切替部172に供給される。また、量子化パラメータの情報が復号された場合には、これも隣接画素内挿フィルタ切替部172に供給される。予測モード情報がインター予測モード情報である場合、予測モード情報と対応する動きベクトル情報および参照フレーム情報は、動き予測・補償部173に供給される。   That is, when the prediction mode information is intra prediction mode information, the prediction mode information is supplied to the intra prediction unit 171 and the adjacent pixel interpolation filter switching unit 172. Further, when the quantization parameter information is decoded, this is also supplied to the adjacent pixel interpolation filter switching unit 172. When the prediction mode information is inter prediction mode information, motion vector information and reference frame information corresponding to the prediction mode information are supplied to the motion prediction / compensation unit 173.

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

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

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

すなわち、可逆復号部162からイントラ予測モード情報が供給された場合、イントラ予測部171は、イントラ予測モードのイントラ予測処理を行う。このとき、イントラ予測部171は、隣接画素内挿フィルタ切替部172により設定されたフィルタ係数を用いて、隣接画素に対してのフィルタ処理およびイントラ予測処理を行う。   That is, when intra prediction mode information is supplied from the lossless decoding unit 162, the intra prediction unit 171 performs an intra prediction process in the intra prediction mode. At this time, the intra prediction unit 171 performs filter processing and intra prediction processing on adjacent pixels using the filter coefficient set by the adjacent pixel interpolation filter switching unit 172.

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

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

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

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

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

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

予測画像生成部181は、ステップS172において、可逆復号部162からのイントラ予測モード情報を受信、取得する。このとき、予測モードバッファ191にも、イントラ予測モード情報が供給され、格納される。   In step S172, the prediction image generation unit 181 receives and acquires the intra prediction mode information from the lossless decoding unit 162. At this time, intra prediction mode information is also supplied to and stored in the prediction mode buffer 191.

また、可逆復号部162から量子化パラメータの情報が量子化パラメータバッファ192に供給されると、量子化パラメータバッファ192は、ステップS173において、量子化パラメータを取得し、格納する。   Also, when the quantization parameter information is supplied from the lossless decoding unit 162 to the quantization parameter buffer 192, the quantization parameter buffer 192 acquires and stores the quantization parameter in step S173.

ローパスフィルタ設定部193は、予測モードバッファ191から対象ブロックのイントラ予測モード情報を読み出し、量子化パラメータバッファ192から対象ブロックに対する量子化パラメータを読み出す。ローパスフィルタ設定部193は、ステップS174において、内蔵するフィルタ係数メモリ194に記憶されているスライス毎のフィルタ係数の中から、これらの情報に対応する、隣接画素に対するフィルタ係数を設定する。設定したフィルタ係数は、隣接画素設定部182に供給される。   The low-pass filter setting unit 193 reads the intra prediction mode information of the target block from the prediction mode buffer 191 and reads the quantization parameter for the target block from the quantization parameter buffer 192. In step S174, the low-pass filter setting unit 193 sets filter coefficients for adjacent pixels corresponding to these pieces of information from the filter coefficients for each slice stored in the built-in filter coefficient memory 194. The set filter coefficient is supplied to the adjacent pixel setting unit 182.

隣接画素設定部182は、ステップS175において、ローパスフィルタ設定部193により設定されたフィルタ係数を用いて、フレームメモリ169からの対象ブロックの隣接画素値に対して、フィルタ処理を施し、フィルタ処理された隣接画素値を、予測画像生成部181に供給する。   In step S175, the adjacent pixel setting unit 182 performs a filtering process on the adjacent pixel value of the target block from the frame memory 169 using the filter coefficient set by the low-pass filter setting unit 193, and the filtering process is performed. The adjacent pixel value is supplied to the predicted image generation unit 181.

予測画像生成部181は、隣接画素設定部182から供給された隣接画素値を用いて、ステップS172で取得したイントラ予測モードでのイントラ予測を行い、予測画像を生成する。生成された予測画像は、スイッチ174に供給される。   The prediction image generation unit 181 uses the adjacent pixel value supplied from the adjacent pixel setting unit 182 to perform intra prediction in the intra prediction mode acquired in step S172, and generates a prediction image. The generated predicted image is supplied to the switch 174.

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

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

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

[イントラ予測部および隣接画素内挿フィルタ切替部の他の構成例]
図26は、イントラ予測部および隣接画素内挿フィルタ切替部の詳細な構成例を示すブロック図である。なお、図26の機能ブロックは、図20に示された画像符号化装置51のオンライン処理の場合の機能ブロックに対応するものである。
[Other Configuration Examples of Intra Prediction Unit and Adjacent Pixel Interpolation Filter Switching Unit]
FIG. 26 is a block diagram illustrating a detailed configuration example of the intra prediction unit and the adjacent pixel interpolation filter switching unit. The functional blocks in FIG. 26 correspond to the functional blocks in the case of online processing of the image encoding device 51 shown in FIG.

図26の例の場合、イントラ予測部171は、図23の予測画像生成部181、および隣接画素設定部182により構成されている。隣接画素内挿フィルタ切替部172は、図23の予測モードバッファ191、並びに、内挿フィルタバッファ201、およびローパスフィルタ設定部202により構成されている。なお、図26の例において、図23の場合と対応する部には、対応する符号が付されており、基本的に同様な処理を行うので、その説明は省略する。   In the case of the example in FIG. 26, the intra prediction unit 171 includes the predicted image generation unit 181 and the adjacent pixel setting unit 182 in FIG. The adjacent pixel interpolation filter switching unit 172 includes the prediction mode buffer 191, the interpolation filter buffer 201, and the low-pass filter setting unit 202 in FIG. 23. In the example of FIG. 26, the parts corresponding to those in FIG. 23 are denoted by the corresponding reference numerals, and basically the same processing is performed, and thus the description thereof is omitted.

図26の場合、画像符号化装置51から対象スライスについて算出されたフィルタ係数が符号化されて送られてくる。したがって、可逆復号部162は、それを他の情報とともに復号して、隣接画素内挿フィルタ切替部172の内挿フィルタバッファ201に供給してくる。   In the case of FIG. 26, the filter coefficient calculated for the target slice is encoded from the image encoding device 51 and sent. Therefore, the lossless decoding unit 162 decodes it together with other information and supplies it to the interpolation filter buffer 201 of the adjacent pixel interpolation filter switching unit 172.

内挿フィルタバッファ201は、可逆復号部162からの対象スライスのフィルタ係数を取得し、格納する。   The interpolation filter buffer 201 acquires the filter coefficient of the target slice from the lossless decoding unit 162 and stores it.

ローパスフィルタ設定部202は、予測モードバッファ191から対象ブロックのイントラ予測モード情報を読み出す。ローパスフィルタ設定部202は、内挿フィルタバッファ201に格納されている対象スライスのフィルタ係数の中から、読み出したイントラ予測モードに対応するフィルタ係数を読み出して、対象ブロックのフィルタ係数として設定する。設定されたフィルタ係数は、隣接画素設定部182に供給される。   The low pass filter setting unit 202 reads the intra prediction mode information of the target block from the prediction mode buffer 191. The low-pass filter setting unit 202 reads out the filter coefficient corresponding to the read intra prediction mode from the filter coefficients of the target slice stored in the interpolation filter buffer 201, and sets it as the filter coefficient of the target block. The set filter coefficient is supplied to the adjacent pixel setting unit 182.

[予測処理の他の説明]
次に、図27のフローチャートを参照して、図26のイントラ予測部171および隣接画素内挿フィルタ切替部172の場合の予測処理を説明する。なお、このイントラ予測処理は、図24のステップS138における予測処理の他の例である。また、図27のステップS181、S182、およびS185乃至S188の処理は、基本的に、図25のステップS171、S172、およびS175乃至S178と同様の処理を行うので、その詳細な説明は省略される。
[Other description of prediction processing]
Next, prediction processing in the case of the intra prediction unit 171 and the adjacent pixel interpolation filter switching unit 172 in FIG. 26 will be described with reference to the flowchart in FIG. This intra prediction process is another example of the prediction process in step S138 of FIG. In addition, the processes in steps S181, S182, and S185 to S188 in FIG. 27 are basically the same processes as steps S171, S172, and S175 to S178 in FIG. .

予測画像生成部181は、ステップS181において、対象ブロックがイントラ符号化されているか否かを判定する。可逆復号部162からイントラ予測モード情報が予測画像生成部181に供給されると、予測画像生成部181は、ステップ181において、対象ブロックがイントラ符号化されていると判定し、処理は、ステップS182に進む。   In step S181, the predicted image generation unit 181 determines whether the target block is intra-coded. When the intra prediction mode information is supplied from the lossless decoding unit 162 to the predicted image generation unit 181, the predicted image generation unit 181 determines in step 181 that the target block has been intra-encoded, and the processing is performed in step S 182. Proceed to

予測画像生成部181は、ステップS182において、可逆復号部162からのイントラ予測モード情報を受信、取得する。このとき、予測モードバッファ191にも、イントラ予測モード情報が供給され、格納される。   In step S182, the predicted image generation unit 181 receives and acquires the intra prediction mode information from the lossless decoding unit 162. At this time, intra prediction mode information is also supplied to and stored in the prediction mode buffer 191.

また、可逆復号部162から対象スライスのフィルタ係数の情報が内挿フィルタバッファ201に供給されると、内挿フィルタバッファ201は、ステップS183において、対象スライスのフィルタ係数を取得し、格納する。なお、このフィルタ係数は、スライス毎に供給される。   Further, when the information on the filter coefficient of the target slice is supplied from the lossless decoding unit 162 to the interpolation filter buffer 201, the interpolation filter buffer 201 acquires and stores the filter coefficient of the target slice in step S183. This filter coefficient is supplied for each slice.

ローパスフィルタ設定部202は、予測モードバッファ191から対象ブロックのイントラ予測モード情報を読み出す。ローパスフィルタ設定部202は、ステップS184において、内挿フィルタバッファ201に格納された対象スライスのフィルタ係数の中から、対象ブロックのイントラ予測モードに対応する、隣接画素に対するフィルタ係数を設定する。設定したフィルタ係数は、隣接画素設定部182に供給される。   The low pass filter setting unit 202 reads the intra prediction mode information of the target block from the prediction mode buffer 191. In step S184, the low-pass filter setting unit 202 sets filter coefficients for adjacent pixels corresponding to the intra prediction mode of the target block from the filter coefficients of the target slice stored in the interpolation filter buffer 201. The set filter coefficient is supplied to the adjacent pixel setting unit 182.

隣接画素設定部182は、ステップS185において、ローパスフィルタ設定部202により設定されたフィルタ係数を用いて、フレームメモリ169からの対象ブロックの隣接画素値に対して、フィルタ処理を施し、フィルタ処理された隣接画素値を、予測画像生成部181に供給する。   In step S185, the adjacent pixel setting unit 182 performs a filtering process on the adjacent pixel value of the target block from the frame memory 169 using the filter coefficient set by the low-pass filter setting unit 202. The adjacent pixel value is supplied to the predicted image generation unit 181.

予測画像生成部181は、ステップS186において、隣接画素設定部182から供給された隣接画素値を用いて、ステップS172で取得したイントラ予測モードでのイントラ予測を行い、予測画像を生成する。生成された予測画像は、スイッチ174に供給される。   In step S186, the predicted image generation unit 181 performs intra prediction in the intra prediction mode acquired in step S172 using the adjacent pixel value supplied from the adjacent pixel setting unit 182 to generate a predicted image. The generated predicted image is supplied to the switch 174.

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

ステップS187において、動き予測・補償部173は、可逆復号部162からのインター予測モード情報、参照フレーム情報、動きベクトル情報などを取得する。   In step S187, the motion prediction / compensation unit 173 acquires inter prediction mode information, reference frame information, motion vector information, and the like from the lossless decoding unit 162.

動き予測・補償部173は、ステップS188において、インター動き予測を行う。この処理により、生成された予測画像は、スイッチ174に出力される。   In step S188, the motion prediction / compensation unit 173 performs inter motion prediction. By this processing, the generated predicted image is output to the switch 174.

以上、図1の画像符号化装置51および図22の画像復号装置151においては、イントラ予測に先立ち、イントラ予測に用いられる隣接画素に対して、画像に適応的に設定されたフィルタ係数を用いて、フィルタ処理が行われる。例えば、イントラ予測のモードや量子化パラメータに応じて、フィルタ係数が設定される。   As described above, in the image encoding device 51 in FIG. 1 and the image decoding device 151 in FIG. 22, prior to intra prediction, the filter coefficients adaptively set in the image are used for adjacent pixels used in intra prediction. Filter processing is performed. For example, the filter coefficient is set according to the intra prediction mode and the quantization parameter.

これにより、画像やビットレートに応じたノイズ除去を行うことができる。その結果、予測効率を改善することができる。   Thereby, noise removal according to an image and a bit rate can be performed. As a result, prediction efficiency can be improved.

図28は、本発明を適用した学習装置の一実施の形態の構成を表している。図28の例において、学習装置251は、トレーニング画像信号を用いて、フィルタ係数の学習処理を行う。   FIG. 28 shows a configuration of an embodiment of a learning apparatus to which the present invention is applied. In the example of FIG. 28, the learning device 251 performs a filter coefficient learning process using the training image signal.

なお、トレーニング画像信号とは、フィルタ係数を求めるためのテスト画像のことであり、例えば、www.vqeg.orgにおいて取得可能な画像圧縮符号化の標準化で使われる標準シーケンスを用いてもよい。あるいは、また、各アプリケーションに応じた入力画像を用いてもよい。例えば、入力がカメラ信号である場合には、CCDやCMOSセンサを用いて撮影されたベースバンド信号を用いて学習を行ってもよい。   The training image signal is a test image for obtaining a filter coefficient. For example, a standard sequence used for standardization of image compression encoding that can be obtained at www.vqeg.org may be used. Alternatively, an input image corresponding to each application may be used. For example, when the input is a camera signal, learning may be performed using a baseband signal photographed using a CCD or CMOS sensor.

図28の学習装置251は、A/D変換部61、画面並べ替えバッファ62、演算部63、直交変換部64、量子化部65、可逆符号化部66、蓄積バッファ67、逆量子化部68、逆直交変換部69、演算部70、デブロックフィルタ71、フレームメモリ72、スイッチ73、イントラ予測部74、動き予測・補償部76、予測画像選択部77、およびレート制御部78を備えている点が、図1の画像符号化装置51と共通している。   The learning device 251 in FIG. 28 includes an A / D conversion unit 61, a screen rearrangement buffer 62, a calculation unit 63, an orthogonal transformation unit 64, a quantization unit 65, a lossless encoding unit 66, an accumulation buffer 67, and an inverse quantization unit 68. , An inverse orthogonal transform unit 69, a calculation unit 70, a deblock filter 71, a frame memory 72, a switch 73, an intra prediction unit 74, a motion prediction / compensation unit 76, a predicted image selection unit 77, and a rate control unit 78. The point is common to the image encoding device 51 of FIG.

また、学習装置251は、用いられる信号として、トレーニング用の画像信号が用いられる点、並びに、隣接画素内挿フィルタ切替部75に代えて、隣接画素内挿フィルタ算出部261を備えている点が、図1の画像符号化装置51と異なる。   Further, the learning device 251 includes a point that an image signal for training is used as a signal to be used, and a point that an adjacent pixel interpolation filter calculation unit 261 is provided instead of the adjacent pixel interpolation filter switching unit 75. This is different from the image encoding device 51 of FIG.

具体的には、学習装置251においては、Iピクチャに含まれるブロックのみが用いられて、学習が行われる。あるいは、学習装置251においては、BピクチャおよびPピクチャに含まれるイントラマクロブロック内のブロックのみが用いられて学習が行われる。前者の方が、後者よりも学習に要する演算量は少なくてすむ。また、前者の場合、Iピクチャに含まれるブロック求められた係数を、Iピクチャに含まれるブロックのみに適用してもよいし、BピクチャおよびPピクチャに含まれるイントラマクロブロックに対してもよい。   Specifically, in the learning device 251, learning is performed using only the blocks included in the I picture. Alternatively, the learning device 251 performs learning using only the blocks in the intra macroblock included in the B picture and the P picture. The former requires less computation for learning than the latter. In the former case, the coefficient obtained for the block included in the I picture may be applied only to the block included in the I picture, or may be applied to the intra macroblock included in the B picture and the P picture.

すなわち、学習装置251においては、イントラ予測部74によるイントラ予測のみによる学習が行われる。したがって、動き予測・補償部76は、実際には、機能しないものとする。   That is, the learning device 251 performs learning based only on intra prediction by the intra prediction unit 74. Therefore, the motion prediction / compensation unit 76 does not actually function.

さらに、図29の隣接画素内挿フィルタ算出部261は、予測モードバッファ121、最適フィルタ算出部122、およびローパスフィルタ設定部123を備える点が図20の隣接画素内挿フィルタ切替部75と共通する。   Furthermore, the adjacent pixel interpolation filter calculation unit 261 in FIG. 29 is common to the adjacent pixel interpolation filter switching unit 75 in FIG. 20 in that the prediction mode buffer 121, the optimum filter calculation unit 122, and the low pass filter setting unit 123 are provided. .

これに対して、隣接画素内挿フィルタ算出部261は、フィルタ係数記憶部271が追加されている点と、レート制御部78から量子化パラメータが、最適フィルタ算出部122に供給されている点が、図20の隣接画素内挿フィルタ切替部75と異なる。   On the other hand, the adjacent pixel interpolation filter calculation unit 261 has a point that a filter coefficient storage unit 271 is added and a quantization parameter is supplied from the rate control unit 78 to the optimum filter calculation unit 122. This is different from the adjacent pixel interpolation filter switching unit 75 in FIG.

具体的に説明すると、図29の例においては、図20の例の場合と同様に、イントラ予測部74と隣接画素内挿フィルタ切替部75との間には、スイッチ101が設けられており、スイッチ101のオンオフにより、イントラ予測部74は、2回イントラ予測を行う。   Specifically, in the example of FIG. 29, as in the example of FIG. 20, a switch 101 is provided between the intra prediction unit 74 and the adjacent pixel interpolation filter switching unit 75. When the switch 101 is turned on / off, the intra prediction unit 74 performs intra prediction twice.

すなわち、イントラ予測部74においては、スイッチ101がオフの状態で、H.264/AVCで定義されているイントラ予測が行われ、そのイントラ予測モードと、量子化パラメータに最適なフィルタ係数がスライス毎に算出される。この算出されたスライス毎のフィルタ係数は、フィルタ係数記憶部271に記憶される。そして、スイッチ101がオンの状態で、算出されたスライス毎のフィルタ係数の中から、隣接画素内挿フィルタ切替部75により設定されたフィルタ係数でのイントラ予測が行われる。   That is, in the intra prediction unit 74, the H. Intra prediction defined in H.264 / AVC is performed, and an intra prediction mode and a filter coefficient optimum for the quantization parameter are calculated for each slice. The calculated filter coefficient for each slice is stored in the filter coefficient storage unit 271. In the state where the switch 101 is on, intra prediction is performed using the filter coefficients set by the adjacent pixel interpolation filter switching unit 75 from the calculated filter coefficients for each slice.

このフィルタ係数記憶部271に記憶されたフィルタ係数が、図1の画像符号化装置51のフィルタ係数メモリ94(図14)および図22の画像復号装置151のフィルタ係数メモリ194(図23)に、記録媒体やネットワークなどを介して記憶される。   The filter coefficients stored in the filter coefficient storage unit 271 are stored in the filter coefficient memory 94 (FIG. 14) of the image encoding device 51 in FIG. 1 and the filter coefficient memory 194 (FIG. 23) of the image decoding device 151 in FIG. It is stored via a recording medium or a network.

[学習処理におけるイントラ予測処理の説明]
次に、図30のフローチャートを参照して、図28の学習装置251が行う学習処理の1処理としてのイントラ予測処理を説明する。なお、学習装置251としては、学習処理として、ステップS21の予測処理が図30のイントラ予測処理に入れ替わったことを除いて、図17の符号化処理と基本的に同様の処理が行われる。
[Description of intra prediction processing in learning processing]
Next, with reference to the flowchart of FIG. 30, the intra prediction process as one process of the learning process which the learning apparatus 251 of FIG. 28 performs is demonstrated. The learning device 251 performs basically the same processing as the encoding processing in FIG. 17 except that the prediction processing in step S21 is replaced with the intra prediction processing in FIG. 30 as learning processing.

また、図30のステップS201乃至S203、およびS206乃至S209は、図21のステップS101乃至S103、およびS105乃至S108と基本的に同様な処理を行うので、その説明は繰り返しになるので省略する。すなわち、図30のステップS204において、最適フィルタ算出部122は、対象スライスの各イントラ予測モードおよび対応する量子化パラメータに対して、対象スライス全体での残差を最小にするフィルタ係数を、最適なフィルタ係数として算出する。算出されたフィルタ係数は、フィルタ係数記憶部271に供給される。   Also, steps S201 to S203 and S206 to S209 in FIG. 30 are basically the same as steps S101 to S103 and S105 to S108 in FIG. That is, in step S204 of FIG. 30, the optimum filter calculation unit 122 sets the optimum filter coefficient that minimizes the residual in the entire target slice for each intra prediction mode of the target slice and the corresponding quantization parameter. Calculated as a filter coefficient. The calculated filter coefficient is supplied to the filter coefficient storage unit 271.

ステップS205において、フィルタ係数記憶部271は、最適フィルタ算出部122から供給されたフィルタ係数を記憶する。   In step S <b> 205, the filter coefficient storage unit 271 stores the filter coefficient supplied from the optimum filter calculation unit 122.

ローパスフィルタ設定部123は、フィルタ係数記憶部271に記憶された対象スライスのフィルタ係数の中から、対象ブロックに対するフィルタ係数を設定し、スイッチ101の端子をオンにして、設定されたフィルタ係数を、隣接画素設定部111に供給する。   The low-pass filter setting unit 123 sets the filter coefficient for the target block from the filter coefficients of the target slice stored in the filter coefficient storage unit 271, turns on the terminal of the switch 101, and sets the set filter coefficient This is supplied to the adjacent pixel setting unit 111.

これに対応して、ステップS206においては、設定されたフィルタ係数が用いられて、フレームメモリ72からの対象ブロックの隣接画素値に対して、フィルタ処理が行われる。   Correspondingly, in step S206, the set filter coefficient is used, and the filter processing is performed on the adjacent pixel value of the target block from the frame memory 72.

もちろん、図21の例の場合と同様に、上述したステップS204乃至S207の処理を繰り返すことにより、さらに最適化されたフィルタ係数を得ることも可能である。   Of course, as in the case of the example of FIG. 21, it is also possible to obtain further optimized filter coefficients by repeating the processes of steps S204 to S207 described above.

以上のように、学習装置251においては、トレーニング画像信号が用いられて、実際に行われる符号化処理と同様な処理が行われ、その中で算出されたフィルタ係数が、フィルタ係数記憶部271される。したがって、最適なフィルタ係数を求めることができる。   As described above, in the learning device 251, the training image signal is used, and the same processing as the actual encoding processing is performed, and the filter coefficient calculated therein is stored in the filter coefficient storage unit 271. The Therefore, the optimum filter coefficient can be obtained.

このフィルタ係数記憶部271に記憶されたフィルタ係数が、図1の画像符号化装置51のフィルタ係数メモリ94(図14)および図22の画像復号装置151のフィルタ係数メモリ194(図23)に、記録媒体やネットワークなどを介して記憶される。   The filter coefficients stored in the filter coefficient storage unit 271 are stored in the filter coefficient memory 94 (FIG. 14) of the image encoding device 51 in FIG. 1 and the filter coefficient memory 194 (FIG. 23) of the image decoding device 151 in FIG. It is stored via a recording medium or a network.

そして、画像符号化装置51においては、上述したように、Iピクチャに含まれるブロック求められた係数(あるいはBピクチャおよびPピクチャに含まれるイントラマクロブロック)が、Iピクチャに含まれるブロックのみに適用される。あるいは、Iピクチャに含まれるブロックだけでなく、BピクチャおよびPピクチャに含まれるイントラマクロブロックにも適用される。   Then, in the image coding device 51, as described above, the coefficient obtained for the block included in the I picture (or the intra macroblock included in the B picture and the P picture) is applied only to the block included in the I picture. Is done. Alternatively, the present invention is applied not only to blocks included in I pictures but also to intra macroblocks included in B pictures and P pictures.

これにより、図1の画像符号化装置51および図22の画像復号装置151において、高い符号化効率を実現することが可能となる。   Accordingly, high encoding efficiency can be realized in the image encoding device 51 in FIG. 1 and the image decoding device 151 in FIG. 22.

なお、上述した図1の画像符号化装置51の直交変換部64および逆直交変換部69、並びに、図22の画像復号装置151の逆直交変換部164においては、H.264/AVCで定義されている直交変換・逆直交変換が行われる。これに代えて、図1の画像符号化装置51の直交変換部64および逆直交変換部69、並びに、図22の画像復号装置151の逆直交変換部164に、非特許文献1において提案されている直交変換・逆直交変換を適用することもできる。   Note that the orthogonal transform unit 64 and the inverse orthogonal transform unit 69 of the image encoding device 51 of FIG. 1 and the inverse orthogonal transform unit 164 of the image decoding device 151 of FIG. Orthogonal transformation and inverse orthogonal transformation defined in H.264 / AVC are performed. Instead, the orthogonal transform unit 64 and the inverse orthogonal transform unit 69 of the image encoding device 51 of FIG. 1 and the inverse orthogonal transform unit 164 of the image decoding device 151 of FIG. It is also possible to apply orthogonal transformation / inverse orthogonal transformation.

これにより、非特許文献1において提案されている方式の符号化効率をさらに向上させることができる。   Thereby, the encoding efficiency of the system proposed in Non-Patent Document 1 can be further improved.

なお、上記説明においては、イントラ予測を行う例を説明したが、本発明は、非特許文献2で提案される2次予測におけるイントラ予測にも適用することができる。   In addition, although the example which performs intra prediction was demonstrated in the said description, this invention is applicable also to the intra prediction in the secondary prediction proposed by the nonpatent literature 2. FIG.

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

画像符号化装置351は、A/D変換部61、画面並べ替えバッファ62、演算部63、直交変換部64、量子化部65、可逆符号化部66、蓄積バッファ67、逆量子化部68、逆直交変換部69、演算部70、デブロックフィルタ71、フレームメモリ72、スイッチ73、イントラ予測部74、動き予測・補償部76、予測画像選択部77、およびレート制御部78を備えている点は、図1の画像符号化装置51と共通している。   The image encoding device 351 includes an A / D conversion unit 61, a screen rearrangement buffer 62, a calculation unit 63, an orthogonal transformation unit 64, a quantization unit 65, a lossless encoding unit 66, an accumulation buffer 67, an inverse quantization unit 68, An inverse orthogonal transform unit 69, a calculation unit 70, a deblock filter 71, a frame memory 72, a switch 73, an intra prediction unit 74, a motion prediction / compensation unit 76, a predicted image selection unit 77, and a rate control unit 78 are provided. Is common to the image encoding device 51 of FIG.

また、画像符号化装置351は、隣接画素内挿フィルタ切替部75が除かれている点、並びに、2次予測部361および隣接画素内挿フィルタ切替部362が追加されている点が、図1の画像符号化装置51と異なる。   Further, the image encoding device 351 has the point that the adjacent pixel interpolation filter switching unit 75 is removed, and the point that the secondary prediction unit 361 and the adjacent pixel interpolation filter switching unit 362 are added. Different from the image encoding device 51 of FIG.

すなわち、図31の例においては、イントラ予測部74は、H.264/AVCのイントラ予測を行う。   That is, in the example of FIG. Performs 264 / AVC intra prediction.

一方、動き予測・補償部76は、インター処理する画像と参照画像に基づいて、候補となる全てのインター予測モードの動きベクトルを検出し、動きベクトルに基づいて参照画像に補償処理を施し、予測画像を生成する。   On the other hand, the motion prediction / compensation unit 76 detects motion vectors in all candidate inter prediction modes based on the inter-processed image and the reference image, performs compensation processing on the reference image based on the motion vector, and performs prediction. Generate an image.

動き予測・補償部76は、検出された動きベクトル情報、インター処理する画像の情報(アドレスなど)、およびインター処理する画像と生成された予測画像の差分である1次残差を、2次予測部361に供給する。   The motion prediction / compensation unit 76 performs secondary prediction on the detected motion vector information, information on the image to be inter-processed (such as an address), and a primary residual that is a difference between the image to be inter-processed and the generated predicted image. To the unit 361.

動き予測・補償部76は、2次予測部361からの2次残差を比較することで、2次予測における最適なイントラ予測モードを決定する。また、動き予測・補償部76は、2次残差と1次残差を比較することで、2次残差を符号化するか、または1次残差を符号化するかを決定する。なお、これらの処理は、候補となる全てのインター予測モードに対して行われる。   The motion prediction / compensation unit 76 compares the secondary residual from the secondary prediction unit 361 to determine an optimal intra prediction mode in the secondary prediction. In addition, the motion prediction / compensation unit 76 determines whether to encode the secondary residual or the primary residual by comparing the secondary residual with the primary residual. Note that these processes are performed for all candidate inter prediction modes.

そして、動き予測・補償部76は、候補となる全てのインター予測モードに対してコスト関数値を算出する。このとき、1次残差および2次残差のうち、インター予測モード毎に決定された残差が用いられて、コスト関数値が算出される。動き予測・補償部76は、算出したコスト関数値のうち、最小値を与える予測モードを、最適インター予測モードとして決定する。   Then, the motion prediction / compensation unit 76 calculates cost function values for all candidate inter prediction modes. At this time, a cost function value is calculated using a residual determined for each inter prediction mode among the primary residual and the secondary residual. The motion prediction / compensation unit 76 determines the prediction mode that gives the minimum value among the calculated cost function values as the optimal inter prediction mode.

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

このとき、動きベクトル情報、参照フレーム情報、2次予測を行うことを示す2次予測フラグ、および2次予測におけるイントラ予測モードの情報なども可逆符号化部66に出力される。可逆符号化部66は、動き予測・補償部76からの情報をやはり可変長符号化、算術符号化といった可逆符号化処理し、圧縮画像のヘッダ部に挿入する。   At this time, motion vector information, reference frame information, a secondary prediction flag indicating that the secondary prediction is performed, information on the intra prediction mode in the secondary prediction, and the like are also output to the lossless encoding unit 66. The lossless encoding unit 66 performs lossless encoding processing such as variable length encoding and arithmetic encoding on the information from the motion prediction / compensation unit 76 and inserts the information into the header portion of the compressed image.

2次予測部361は、動き予測・補償部76からの動きベクトル情報とインター処理する画像の情報に基づいて、インター処理する対象の対象ブロックに隣接する対象隣接画素をフレームメモリ72から読み出す。また、2次予測部361は、動きベクトル情報により対象ブロックに対応付けられる参照ブロックに隣接する参照隣接画素をフレームメモリ72から読み出す。   Based on the motion vector information from the motion prediction / compensation unit 76 and image information to be inter-processed, the secondary prediction unit 361 reads out the target adjacent pixels adjacent to the target block to be inter-processed from the frame memory 72. In addition, the secondary prediction unit 361 reads, from the frame memory 72, reference adjacent pixels adjacent to the reference block associated with the target block based on the motion vector information.

2次予測部361は、2次予測処理を行う。2次予測処理とは、1次残差、および対象隣接画素と参照隣接画素の差分の間でイントラ予測を行い、2次差分情報(2次残差)を生成する処理である。   The secondary prediction unit 361 performs secondary prediction processing. The secondary prediction process is a process of generating secondary difference information (secondary residual) by performing intra prediction between the primary residual and the difference between the target adjacent pixel and the reference adjacent pixel.

ここで、2次予測処理について、図32を参照して説明する。   Here, the secondary prediction process will be described with reference to FIG.

図32の例においては、対象フレームと参照フレームが示されており、対象フレームには、対象ブロックAが示されている。   In the example of FIG. 32, the target frame and the reference frame are shown, and the target block A is shown in the target frame.

参照フレームと対象フレームにおいて対象ブロックAに対して動きベクトルmv(mv_x,mv_y)が求められた場合に、対象ブロックAと、対象ブロックAに動きベクトルmvで対応付けられるブロックの差分情報(残差)が算出される。   When the motion vector mv (mv_x, mv_y) is obtained for the target block A in the reference frame and the target frame, difference information (residual) between the target block A and the block associated with the target block A by the motion vector mv ) Is calculated.

2次予測方式においては、対象ブロックAに関する差分情報だけでなく、対象ブロックAに隣接する隣接画素群Rと、隣接画素群Rに動きベクトルmvで対応付けられる隣接画素群R1との差分情報も算出される。   In the secondary prediction method, not only the difference information regarding the target block A but also the difference information between the adjacent pixel group R adjacent to the target block A and the adjacent pixel group R1 associated with the adjacent pixel group R by the motion vector mv. Calculated.

すなわち、対象ブロックAの左上の座標(x,y)から、隣接画素群Rの各座標が求められる。また、対象ブロックAに動きベクトルmvで対応付けられるブロックの左上の座標(x+mv_x,y+mv_y)から、隣接画素群R1の各座標が求められる。これらの座標値により、隣接画素群の差分情報が算出される。   That is, each coordinate of the adjacent pixel group R is obtained from the upper left coordinate (x, y) of the target block A. Further, each coordinate of the adjacent pixel group R1 is obtained from the upper left coordinates (x + mv_x, y + mv_y) of the block associated with the target block A by the motion vector mv. Based on these coordinate values, difference information between adjacent pixel groups is calculated.

2次予測方式においては、このように算出された対象ブロックに関する差分情報と、隣接画素に関する差分情報との間で、H.264/AVC方式におけるイントラ予測が行われ、これにより、2次差分情報が生成される。生成された2次差分情報が直交変換、量子化され、圧縮画像とともに符号化されて、復号側に送られる。   In the secondary prediction method, the difference between the difference information related to the target block calculated in this way and the difference information related to adjacent pixels is H.264. Intra prediction in the H.264 / AVC format is performed, whereby secondary difference information is generated. The generated secondary difference information is orthogonally transformed and quantized, encoded with the compressed image, and sent to the decoding side.

2次予測部361は、この2次予測に先立ち、隣接画素内挿フィルタ切替部362により設定されたフィルタ係数を用いて、イントラ予測に用いる対象隣接画素と参照隣接画素の差分に対して、フィルタ処理を行う。そして、2次予測部361は、フィルタ処理された対象隣接画素と参照隣接画素の差分を用いて、2次予測処理を行い、得られた2次差分情報(2次残差)を、動き予測・補償部76に出力する。   Prior to the secondary prediction, the secondary prediction unit 361 uses the filter coefficient set by the adjacent pixel interpolation filter switching unit 362 to filter the difference between the target adjacent pixel used for intra prediction and the reference adjacent pixel. Process. Then, the secondary prediction unit 361 performs secondary prediction processing using the difference between the filtered target adjacent pixel and the reference adjacent pixel, and uses the obtained secondary difference information (secondary residual) as motion prediction. Output to the compensation unit 76.

すなわち、2次予測部361は、図14に示したイントラ予測部74などを含むように構成されている。   That is, the secondary prediction unit 361 is configured to include the intra prediction unit 74 shown in FIG.

隣接画素内挿フィルタ切替部362は、図1の隣接画素内挿フィルタ切替部75と基本的に同様に構成され、同様の処理を行う。すなわち、隣接画素内挿フィルタ切替部362は、2次予測部361からのイントラ予測モードの情報と、レート制御部78からの量子化パラメータに応じたフィルタ係数を設定し、設定したフィルタ係数を、2次予測部361に供給する。   The adjacent pixel interpolation filter switching unit 362 is basically configured in the same manner as the adjacent pixel interpolation filter switching unit 75 in FIG. 1 and performs the same processing. That is, the adjacent pixel interpolation filter switching unit 362 sets the filter coefficient corresponding to the intra prediction mode information from the secondary prediction unit 361 and the quantization parameter from the rate control unit 78, and sets the set filter coefficient as This is supplied to the secondary prediction unit 361.

なお、図31の画像符号化装置351の符号化処理は、以下のイントラ処理と動き予測処理が異なるだけであり、その他の処理は、図1の画像符号化装置51による図16の符号化処理と基本的に同様の処理であるので、その説明は省略する。   Note that the encoding process of the image encoding device 351 in FIG. 31 is different only in the following intra processing and motion prediction processing, and the other processing is the encoding processing in FIG. 16 by the image encoding device 51 in FIG. Since this is basically the same processing, the description thereof is omitted.

すなわち、図31の画像符号化装置351においては、イントラ処理として、H.264/AVC方式におけるイントラ予測が行われる。また、動き予測処理として、動き予測処理の際に、隣接画素内挿フィルタ切替部362により設定されたフィルタ係数が用いられて、2次差分情報が生成される。そして、1次差分情報と2次差分情報のうち、符号化効率のよいものが選択され、コスト関数値が比較されることにより最適インター予測モードが決定される。   That is, in the image encoding device 351 in FIG. Intra prediction in the H.264 / AVC format is performed. In addition, as the motion prediction process, the filter coefficient set by the adjacent pixel interpolation filter switching unit 362 is used during the motion prediction process, and secondary difference information is generated. Then, of the primary difference information and the secondary difference information, the one with good coding efficiency is selected, and the optimal inter prediction mode is determined by comparing the cost function values.

この画像符号化装置351により符号化された圧縮画像を受け、それを復号する画像復号装置について図33を参照して説明する。   An image decoding apparatus that receives a compressed image encoded by the image encoding apparatus 351 and decodes it will be described with reference to FIG.

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

画像復号装置401は、蓄積バッファ161、可逆復号部162、逆量子化部163、逆直交変換部164、演算部165、デブロックフィルタ166、画面並べ替えバッファ167、D/A変換部168、フレームメモリ169、スイッチ170、イントラ予測部171、動き予測・補償部173、およびスイッチ174を備える点が、図22の画像復号装置151と共通している。   The image decoding apparatus 401 includes a storage buffer 161, a lossless decoding unit 162, an inverse quantization unit 163, an inverse orthogonal transform unit 164, an operation unit 165, a deblock filter 166, a screen rearrangement buffer 167, a D / A conversion unit 168, a frame The point provided with the memory 169, the switch 170, the intra prediction unit 171, the motion prediction / compensation unit 173, and the switch 174 is common to the image decoding device 151 in FIG.

また、画像復号装置401は、隣接画素内挿フィルタ切替部172が除かれている点、並びに、2次予測部411、および隣接画素内挿フィルタ切替部412が追加されている点が、図22の画像復号装置151と異なっている。   In addition, the image decoding apparatus 401 has the point that the adjacent pixel interpolation filter switching unit 172 is removed, and the point that the secondary prediction unit 411 and the adjacent pixel interpolation filter switching unit 412 are added. Different from the image decoding device 151 of FIG.

すなわち、イントラ予測部171には、ヘッダ情報を復号して得られたイントラ予測モードを示す情報が可逆復号部162から供給される。イントラ予測部171は、この情報に基づいて、予測画像を生成し、生成した予測画像を、スイッチ174に出力する。   That is, information indicating the intra prediction mode obtained by decoding the header information is supplied from the lossless decoding unit 162 to the intra prediction unit 171. The intra prediction unit 171 generates a predicted image based on this information, and outputs the generated predicted image to the switch 174.

動き予測・補償部173には、ヘッダ情報を復号して得られた情報のうち、予測モード情報、動きベクトル情報、参照フレーム情報などが可逆復号部162から供給される。また、動き予測・補償部173には、対象ブロックに対して2次予測処理が適用されている場合には、2次予測を行うことを示す2次予測フラグと、2次予測におけるイントラ予測モード情報も可逆復号部162から供給される。   Among the information obtained by decoding the header information, the motion prediction / compensation unit 173 is supplied with prediction mode information, motion vector information, reference frame information, and the like from the lossless decoding unit 162. The motion prediction / compensation unit 173 has a secondary prediction flag indicating that the secondary prediction is performed when the secondary prediction processing is applied to the target block, and an intra prediction mode in the secondary prediction. Information is also supplied from the lossless decoding unit 162.

動き予測・補償部173は、2次予測処理が適用されていると判定した場合、2次予測部411を制御し、2次予測におけるイントラ予測モード情報が示すイントラ予測モードで、2次予測を行わせる。   When the motion prediction / compensation unit 173 determines that the secondary prediction process is applied, the motion prediction / compensation unit 173 controls the secondary prediction unit 411 to perform the secondary prediction in the intra prediction mode indicated by the intra prediction mode information in the secondary prediction. Let it be done.

動き予測・補償部173は、動きベクトル情報と参照フレーム情報に基づいて画像に動き予測と補償処理を施し、予測画像を生成する。すなわち、対象ブロックの予測画像は、参照フレームにおいて、対象ブロックに動きベクトルで対応付けられる参照ブロックの画素値が用いられて生成される。そして、動き予測・補償部173は、生成された予測画像と2次予測部411からの予測差分値を加算して、それをスイッチ174に出力する。   The motion prediction / compensation unit 173 performs motion prediction and compensation processing on the image based on the motion vector information and the reference frame information, and generates a predicted image. That is, the predicted image of the target block is generated using the pixel value of the reference block associated with the target block by a motion vector in the reference frame. Then, the motion prediction / compensation unit 173 adds the generated prediction image and the prediction difference value from the secondary prediction unit 411, and outputs it to the switch 174.

2次予測部411は、フレームメモリ169から読み出される対象隣接画素と参照隣接画素の差分を用いて、2次予測を行う。2次予測部411は、この2次予測に先立ち、隣接画素内挿フィルタ切替部412により設定されたフィルタ係数を用いて、対象隣接画素と参照隣接画素の差分に対して、フィルタ処理を行う。そして、2次予測部411は、フィルタ処理された対象隣接画素と参照隣接画素の差分を用いて、2次予測処理を行い、得られた2次差分情報(2次残差)を、動き予測・補償部173に出力する。   The secondary prediction unit 411 performs secondary prediction using the difference between the target adjacent pixel and the reference adjacent pixel read from the frame memory 169. Prior to the secondary prediction, the secondary prediction unit 411 performs a filter process on the difference between the target adjacent pixel and the reference adjacent pixel using the filter coefficient set by the adjacent pixel interpolation filter switching unit 412. Then, the secondary prediction unit 411 performs secondary prediction processing using the difference between the filtered target adjacent pixel and the reference adjacent pixel, and uses the obtained secondary difference information (secondary residual) as motion prediction. Output to the compensation unit 173.

すなわち、2次予測部411は、図26に示したイントラ予測部171を含むように構成されている。   That is, the secondary prediction unit 411 is configured to include the intra prediction unit 171 illustrated in FIG.

隣接画素内挿フィルタ切替部412は、隣接画素内挿フィルタ切替部172と基本的に同様に構成される。すなわち、隣接画素内挿フィルタ切替部412は、可逆復号部162からの量子化パラメータおよびイントラ予測モードの少なくとも1つに対応するフィルタ係数を設定する。隣接画素内挿フィルタ切替部412は、設定したフィルタ係数を、2次予測部411に供給する。   The adjacent pixel interpolation filter switching unit 412 is basically configured in the same manner as the adjacent pixel interpolation filter switching unit 172. That is, the adjacent pixel interpolation filter switching unit 412 sets a filter coefficient corresponding to at least one of the quantization parameter from the lossless decoding unit 162 and the intra prediction mode. The adjacent pixel interpolation filter switching unit 412 supplies the set filter coefficient to the secondary prediction unit 411.

なお、図33の画像復号装置401の符号化処理は、以下のイントラ処理と動き予測処理が異なるだけであり、その他の処理は、図22の画像復号装置151による図24の復号処理と基本的に同様の処理であるので、その説明は省略する。   Note that the encoding process of the image decoding device 401 in FIG. 33 is different only in the following intra processing and motion prediction processing, and other processing is basically the same as the decoding processing in FIG. 24 by the image decoding device 151 in FIG. Since this is the same processing, the description thereof is omitted.

すなわち、図33の画像復号装置401においては、イントラ処理として、H.264/AVC方式におけるイントラ予測が行われる。また、動き予測処理として、動き予測処理の際に、隣接画素内挿フィルタ切替部412により設定されたフィルタ係数が用いられて、2次予測(イントラ予測)が行われ、2次差分情報が生成される。   That is, in the image decoding apparatus 401 in FIG. Intra prediction in the H.264 / AVC format is performed. In addition, as the motion prediction process, the filter coefficient set by the adjacent pixel interpolation filter switching unit 412 is used at the time of the motion prediction process, and secondary prediction (intra prediction) is performed to generate secondary difference information. Is done.

以上のような2次予測処理におけるイントラ予測にも、本発明を適用することができる。   The present invention can also be applied to intra prediction in the secondary prediction processing as described above.

なお、上記説明においては、イントラ予測に先立ち、イントラ予測に用いられる隣接画素に対して、画像に適応的に設定されたフィルタ係数を用いてフィルタ処理が行われる例を説明した。   In the above description, an example has been described in which filter processing is performed on adjacent pixels used for intra prediction using filter coefficients that are adaptively set in the image prior to intra prediction.

ところで、イントラ予測方式に用いられる隣接画素に含まれるノイズは、画像コンテンツおよび量子化パラメータ等の符号化条件により異なる。このため、例えば、H.264/AVC方式において行われるフィルタ処理を施すことにより、符号化効率が向上するブロックと、そうでないブロックが存在する。   By the way, noise included in adjacent pixels used in the intra prediction method varies depending on encoding conditions such as image content and quantization parameters. For this reason, for example, H.C. There are blocks in which the encoding efficiency is improved by performing the filter processing performed in the H.264 / AVC format, and blocks that are not.

それにも拘わらず、H.264/AVC方式においては、マクロブロックに対して、8×8ブロックベースのイントラ予測が行われる際、全てのブロックに対して一様にフィルタ処理が行われていたため、これにより符号化効率が低下するブロックが発生していた。   Nevertheless, H.C. In the H.264 / AVC format, when 8 × 8 block-based intra prediction is performed on a macro block, since all the blocks are uniformly filtered, this reduces the coding efficiency. A block was generated.

そこで、次に、イントラ予測に用いられる隣接画素に対するフィルタ処理をオン/オフする場合の例について説明する。   Therefore, next, an example in which the filter processing for adjacent pixels used for intra prediction is turned on / off will be described.

<3.第3の実施の形態>
[画像符号化装置の他の構成例]
図34は、本発明を適用した画像処理装置としての画像符号化装置の他の実施の形態の構成を表している。
<3. Third Embodiment>
[Other Configuration Examples of Image Encoding Device]
FIG. 34 shows the configuration of another embodiment of an image encoding apparatus as an image processing apparatus to which the present invention is applied.

画像符号化装置451は、A/D変換部61、画面並べ替えバッファ62、演算部63、直交変換部64、量子化部65、可逆符号化部66、蓄積バッファ67、逆量子化部68、逆直交変換部69、演算部70、デブロックフィルタ71、フレームメモリ72、スイッチ73、イントラ予測部74、動き予測・補償部76、予測画像選択部77、およびレート制御部78を備えている点は、図1の画像符号化装置51と共通している。   The image encoding device 451 includes an A / D conversion unit 61, a screen rearrangement buffer 62, a calculation unit 63, an orthogonal transformation unit 64, a quantization unit 65, a lossless encoding unit 66, an accumulation buffer 67, an inverse quantization unit 68, An inverse orthogonal transform unit 69, a calculation unit 70, a deblock filter 71, a frame memory 72, a switch 73, an intra prediction unit 74, a motion prediction / compensation unit 76, a predicted image selection unit 77, and a rate control unit 78 are provided. Is common to the image encoding device 51 of FIG.

また、画像符号化装置451は、隣接画素内挿フィルタ切替部75が、隣接画素内挿フィルタ制御部461に入れ替わっている点が、図1の画像符号化装置51と異なる。   The image encoding device 451 is different from the image encoding device 51 in FIG. 1 in that the adjacent pixel interpolation filter switching unit 75 is replaced with the adjacent pixel interpolation filter control unit 461.

すなわち、隣接画素内挿フィルタ制御部461は、H.264/AVC方式においては、8×8ブロックベースのイントラ予測が行われる際、全てのブロックに対して一様に行われていた隣接画素に対するフィルタ処理を、onまたはoffする制御を行う。なお、H.264/AVC方式においては、8×8ブロックベースのイントラ予測についてのみフィルタ処理が行われていたが、画像符号化装置451においては、イントラ4×4、イントラ16×16についても行われる。   That is, the adjacent pixel interpolation filter control unit 461 performs the H.264 conversion. In the H.264 / AVC format, when 8 × 8 block-based intra prediction is performed, control is performed to turn on or off filter processing for adjacent pixels that has been performed uniformly for all blocks. H. In the H.264 / AVC format, filter processing is performed only for 8 × 8 block-based intra prediction, but the image encoding device 451 also performs intra 4 × 4 and intra 16 × 16.

隣接画素内挿フィルタ制御部461からのフィルタ処理のon/offの制御信号は、イントラ予測部74に供給される。   The on / off control signal for the filter processing from the adjacent pixel interpolation filter control unit 461 is supplied to the intra prediction unit 74.

イントラ予測部74は、画面並べ替えバッファ62から読み出されたイントラ予測する画像とフレームメモリ72から供給された参照画像に基づいて、候補となる全てのイントラ予測モードのイントラ予測処理を行い、予測画像を生成する。この際、イントラ予測部74においては、イントラ予測に先立ち、隣接画素内挿フィルタ制御部461からの制御信号に応じてフィルタ処理をonまたはoffして、イントラ予測が行われ、結果的に、算出されるコスト関数値の小さい方が採用される。   The intra prediction unit 74 performs intra prediction processing of all candidate intra prediction modes based on the image to be intra predicted read from the screen rearrangement buffer 62 and the reference image supplied from the frame memory 72, and performs prediction. Generate an image. At this time, in the intra prediction unit 74, prior to intra prediction, filter processing is turned on or off in accordance with the control signal from the adjacent pixel interpolation filter control unit 461, intra prediction is performed, and as a result, calculation is performed. The smaller cost function value is adopted.

さらに、イントラ予測部74は、このフィルタ処理のonまたはoffを示すフラグを生成する。このフラグ情報は、予測画像選択部77により最適イントラ予測モードで生成された予測画像が選択された場合、最適イントラ予測モードを示す情報とともに、可逆符号化部66に供給される。   Further, the intra prediction unit 74 generates a flag indicating on or off of the filter process. This flag information is supplied to the lossless encoding unit 66 together with information indicating the optimal intra prediction mode when a predicted image generated in the optimal intra prediction mode is selected by the predicted image selection unit 77.

[イントラ予測部の構成例]
図35は、図34のイントラ予測部74の詳細な構成例を示すブロック図である。図35の例の場合、イントラ予測部74は、予測画像生成部471、コスト関数値生成部472、並びにモード及びon/off判定部473により構成されている。
[Configuration example of intra prediction unit]
FIG. 35 is a block diagram illustrating a detailed configuration example of the intra prediction unit 74 in FIG. In the case of the example in FIG. 35, the intra prediction unit 74 includes a predicted image generation unit 471, a cost function value generation unit 472, and a mode and on / off determination unit 473.

予測画像生成部471には、フレームメモリ72からのイントラ予測の対象ブロックの隣接画素値が供給される。図35の場合、スイッチ73の図示は省略されているが、実際には、隣接画素値は、フレームメモリ72から、スイッチ73を介して予測画像生成部471に供給される。なお、イントラ予測の場合、隣接画素値として、デブロックフィルタ71によりデブロックフィルタリングされていない画素値が用いられる。   The prediction image generation unit 471 is supplied with the adjacent pixel value of the target block for intra prediction from the frame memory 72. In the case of FIG. 35, the switch 73 is not shown, but actually, the adjacent pixel value is supplied from the frame memory 72 to the predicted image generation unit 471 via the switch 73. In the case of intra prediction, a pixel value that has not been deblocked filtered by the deblocking filter 71 is used as an adjacent pixel value.

予測画像生成部471は、隣接画素内挿フィルタ制御部461からの制御信号に基づいて、隣接画素値に対するフィルタ処理を行い、あるいは、フィルタ処理を行わずに、候補となる全てのイントラ予測モードのイントラ予測処理を行い、予測画像を生成する。この制御信号が示す隣接画素内挿フィルタ制御部461によるon/offの制御は、図36乃至図38を参照して後述するように、ブロック単位またはマクロブロック単位で行われる。   Based on the control signal from the adjacent pixel interpolation filter control unit 461, the predicted image generation unit 471 performs a filter process on the adjacent pixel value, or performs all the candidate intra prediction modes without performing the filter process. Intra prediction processing is performed to generate a predicted image. The on / off control by the adjacent pixel interpolation filter control unit 461 indicated by this control signal is performed in units of blocks or macroblocks as will be described later with reference to FIGS.

予測画像生成部471は、生成した予測画像画素値と、そのイントラ予測モードの情報を、コスト関数値生成部472に供給する。   The predicted image generation unit 471 supplies the generated predicted image pixel value and information on the intra prediction mode to the cost function value generation unit 472.

コスト関数値生成部472には、画面並べ替えバッファ62から原画像画素値が供給される。コスト関数値生成部472は、原画像画素値と予測画像画素値を用いて、フィルタ処理onまたはoffの場合の、各イントラ予測モードに対するコスト関数値を算出する。コスト関数値生成部472は、算出したコスト関数値、予測画像画素値、およびイントラ予測モードの情報を、モード及びon/off判定部473に供給する。   The original image pixel value is supplied from the screen rearrangement buffer 62 to the cost function value generation unit 472. The cost function value generation unit 472 uses the original image pixel value and the predicted image pixel value to calculate a cost function value for each intra prediction mode when the filter process is on or off. The cost function value generation unit 472 supplies the calculated cost function value, predicted image pixel value, and intra prediction mode information to the mode and on / off determination unit 473.

モード及びon/off判定部473は、コスト関数値生成部472からのコスト関数値を用いて、最適イントラ予測モードと、フィルタ処理をonまたはoffのどちらに設定するかを決定し、フィルタ処理のonまたはoffを示すon/offフラグ情報を生成する。   The mode and on / off determination unit 473 uses the cost function value from the cost function value generation unit 472 to determine the optimal intra prediction mode and whether to set the filter process to on or off, and to perform the filter process. Generates on / off flag information indicating on or off.

モード及びon/off判定部473は、最適イントラ予測モードの予測画像画素値を予測画像選択部77に供給する。予測画像選択部77により最適イントラ予測モードの予測画像が選択された場合、モード及びon/off判定部473は、最適イントラ予測モードを示す情報と、対応するon/offフラグ情報を可逆符号化部66に供給する。   The mode and on / off determination unit 473 supplies the predicted image pixel value of the optimal intra prediction mode to the predicted image selection unit 77. When the predicted image in the optimal intra prediction mode is selected by the predicted image selection unit 77, the mode and on / off determination unit 473 is a lossless encoding unit that displays information indicating the optimal intra prediction mode and corresponding on / off flag information. 66.

なお、画像符号化装置451による処理は、以下に説明するイントラ予測処理以外は、図1の画像符号化装置51の処理と同様の処理を行うため、その説明は繰り返しになるので省略される。   Note that the processing by the image encoding device 451 is the same as the processing of the image encoding device 51 in FIG. 1 except for the intra prediction processing described below.

次に、図36のフローチャートを参照して、ブロック単位でonまたはoffの制御が行われる場合の図34のイントラ予測部74のイントラ予測処理について説明する。なお、この処理は、図17のステップS31のイントラ予測処理の他の例であり、図36の例においては、イントラ4×4を例に説明する。また、以下、フィルタ処理on/offを、単にフィルタon/offとも称する。   Next, the intra prediction process of the intra prediction unit 74 in FIG. 34 when on or off control is performed in units of blocks will be described with reference to the flowchart in FIG. 36. This process is another example of the intra prediction process in step S31 of FIG. 17, and in the example of FIG. 36, description will be made using intra 4 × 4 as an example. Hereinafter, the filter processing on / off is also simply referred to as filter on / off.

ステップS401において、コスト関数値生成部472は、対象ブロックについて、図3または図4に示した9種類のそれぞれのイントラ予測モードに対するコスト関数値を生成する。   In step S401, the cost function value generation unit 472 generates cost function values for the nine types of intra prediction modes shown in FIG. 3 or FIG. 4 for the target block.

すなわち、予測画像生成部471には、フレームメモリ72からのイントラ予測の対象ブロックの隣接画素値が供給される。予測画像生成部471は、図3または図4に示した9種類のそれぞれのイントラ予測モードに対するイントラ予測を行い、対象ブロックの予測画像を生成する。   That is, the prediction image generation unit 471 is supplied with the adjacent pixel value of the target block for intra prediction from the frame memory 72. The predicted image generation unit 471 performs intra prediction for each of the nine types of intra prediction modes illustrated in FIG. 3 or FIG. 4, and generates a predicted image of the target block.

このとき、隣接画素内挿フィルタ制御部461から、隣接画素に対するフィルタ処理を行わない制御信号が供給され、予測画像生成部471は、隣接画素に対するフィルタ処理を行わずに、イントラ予測を行う。なお、ここでは、隣接画素に対するフィルタ処理を行う制御信号が供給されるようにしてもよい。ただし、例えば、9つのモードのうち、Verticalには行うが、Horizontalには行わないなど異なる制御をするのではなく、行うか行わないかは、9つのモードに対して同一の制御を行うものとする。また、ここでは、全てのモードに対してフィルタ処理を行わないとしたほうが、演算量は少なくて済む。   At this time, a control signal that does not perform filter processing on the adjacent pixels is supplied from the adjacent pixel interpolation filter control unit 461, and the predicted image generation unit 471 performs intra prediction without performing filter processing on the adjacent pixels. Here, a control signal for performing filter processing on adjacent pixels may be supplied. However, for example, whether or not to perform different control such as performing for Vertical but not for Horizontal among the nine modes is the same control for the nine modes. To do. Here, the amount of calculation is smaller when the filter processing is not performed for all modes.

予測画像生成部471は、生成した予測画像画素値と、そのイントラ予測モードの情報を、コスト関数値生成部472に供給する。コスト関数値生成部472は、画面並べ替えバッファ62からの原画像画素値と予測画像画素値を用いて、フィルタoffの場合の、各イントラ予測モードに対して、上述した式(73)または式(74)で示されるコスト関数値を算出する。コスト関数値生成部472は、算出したコスト関数値、予測画像画素値、およびイントラ予測モードの情報を、モード及びon/off判定部473に供給する。   The predicted image generation unit 471 supplies the generated predicted image pixel value and information on the intra prediction mode to the cost function value generation unit 472. The cost function value generation unit 472 uses the original image pixel value and the predicted image pixel value from the screen rearrangement buffer 62 and uses the above equation (73) or equation for each intra prediction mode when the filter is off. The cost function value indicated by (74) is calculated. The cost function value generation unit 472 supplies the calculated cost function value, predicted image pixel value, and intra prediction mode information to the mode and on / off determination unit 473.

ステップS402において、モード及びon/off判定部473は、コスト関数値生成部472からのコスト関数値を用いて、対象ブロックについて最適なイントラ予測モードを選択する。選択されたイントラ予測モードの情報は、隣接画素内挿フィルタ制御部461に供給される。   In step S402, the mode and on / off determination unit 473 selects an optimal intra prediction mode for the target block using the cost function value from the cost function value generation unit 472. Information on the selected intra prediction mode is supplied to the adjacent pixel interpolation filter control unit 461.

ステップS403において、隣接画素内挿フィルタ制御部461は、コスト関数値生成部472に、選択されたイントラ予測モードに対して、フィルタonおよびoffのコスト関数値を生成させる。なお、ステップS401でフィルタoffのコスト関数値は生成されているので、実際には、ステップS403においては、フィルタonのコスト関数値が生成される。   In step S403, the adjacent pixel interpolation filter control unit 461 causes the cost function value generation unit 472 to generate the cost function values for the filters on and off for the selected intra prediction mode. Since the cost function value for filter off is generated in step S401, the cost function value for filter on is actually generated in step S403.

すなわち、隣接画素内挿フィルタ制御部461は、予測画像生成部471に、フィルタonの制御信号と、選択されたイントラ予測モードの情報を供給する。予測画像生成部471は、選択されたイントラ予測モードに用いられる隣接画素値に対するフィルタ処理を行い、選択されたイントラ予測モードで、イントラ予測を行い、対象ブロックの予測画像を生成する。   That is, the adjacent pixel interpolation filter control unit 461 supplies the prediction image generation unit 471 with a filter on control signal and information on the selected intra prediction mode. The predicted image generation unit 471 performs a filtering process on adjacent pixel values used in the selected intra prediction mode, performs intra prediction in the selected intra prediction mode, and generates a predicted image of the target block.

予測画像生成部471は、生成した予測画像画素値と、選択されたイントラ予測モードの情報を、コスト関数値生成部472に供給する。コスト関数値生成部472は、画面並べ替えバッファ62からの原画像画素値と予測画像画素値を用いて、フィルタonの場合の、選択されたイントラ予測モードに対して、上述した式(73)または式(74)で示されるコスト関数値を算出する。コスト関数値生成部472は、算出したコスト関数値、および予測画像画素値を、モード及びon/off判定部473に供給する。   The predicted image generation unit 471 supplies the generated predicted image pixel value and information on the selected intra prediction mode to the cost function value generation unit 472. The cost function value generation unit 472 uses the original image pixel value and the predicted image pixel value from the screen rearrangement buffer 62 to calculate the above-described formula (73) for the selected intra prediction mode in the case of the filter on. Or the cost function value shown by Formula (74) is calculated. The cost function value generation unit 472 supplies the calculated cost function value and predicted image pixel value to the mode and on / off determination unit 473.

ステップS404において、モード及びon/off判定部473は、選択されたイントラ予測モードについてのフィルタonおよびoffのコスト関数値を比較し、対象ブロックについて、フィルタon/offを決定する。すなわち、フィルタonのコスト関数値が小さい場合は、対象ブロックについてフィルタonを決定し、フィルタoffのコスト関数値が小さい場合には、対象ブロックについてフィルタoffを決定する。そして、モード及びon/off判定部473は、決定された方の予測画像値を、予測画像選択部77に供給する。   In step S404, the mode and on / off determination unit 473 compares the cost function values of the filter on and off for the selected intra prediction mode, and determines the filter on / off for the target block. That is, when the cost function value of the filter on is small, the filter on is determined for the target block, and when the cost function value of the filter off is small, the filter off is determined for the target block. Then, the mode and on / off determination unit 473 supplies the determined predicted image value to the predicted image selection unit 77.

ステップS405において、モード及びon/off判定部473は、対象ブロックについて、ステップS404で決定されたonまたはoffを示すon/offフラグを生成する。例えば、フィルタonの場合、on/offフィルタの値は、1とされる。フィルタoffの場合、on/offフィルタの値は、0とされる。   In step S405, the mode and on / off determination unit 473 generates an on / off flag indicating on or off determined in step S404 for the target block. For example, when the filter is on, the value of the on / off filter is 1. When the filter is off, the value of the on / off filter is 0.

生成されたon/offフラグ情報は、上述した図16のステップS22でイントラ予測モードの予測画像が選択された場合に、最適イントラ予測モードを示す情報とともに、可逆符号化部66に供給される。そして、供給されたこれらの情報は、図16のステップS23において、符号化され、圧縮画像のヘッダに付加されて、復号側に送信される。   The generated on / off flag information is supplied to the lossless encoding unit 66 together with information indicating the optimal intra prediction mode when the prediction image in the intra prediction mode is selected in step S22 of FIG. 16 described above. The supplied information is encoded in step S23 of FIG. 16, added to the header of the compressed image, and transmitted to the decoding side.

次に、図37のフローチャートを参照して、ブロック単位でonまたはoffの制御が行われる場合の図34のイントラ予測部74のイントラ予測処理の他の例について説明する。図37の例の場合も、イントラ4×4を例に説明する。   Next, another example of the intra prediction process of the intra prediction unit 74 in FIG. 34 when on or off control is performed in units of blocks will be described with reference to the flowchart in FIG. In the case of the example of FIG.

ステップS421において、コスト関数値生成部472は、対象ブロックについて、それぞれのイントラ予測モードに対して、フィルタのonおよびoffによるコスト関数値を生成する。   In step S <b> 421, the cost function value generation unit 472 generates cost function values based on filter on and off for each intra prediction mode for the target block.

すなわち、予測画像生成部471には、フレームメモリ72からのイントラ予測の対象ブロックの隣接画素値が供給される。予測画像生成部471は、図3または図4に示した9種類のそれぞれのイントラ予測モードに対するイントラ予測を行い、対象ブロックの予測画像を生成する。   That is, the prediction image generation unit 471 is supplied with the adjacent pixel value of the target block for intra prediction from the frame memory 72. The predicted image generation unit 471 performs intra prediction for each of the nine types of intra prediction modes illustrated in FIG. 3 or FIG. 4, and generates a predicted image of the target block.

このとき、まず、隣接画素内挿フィルタ制御部461から、隣接画素に対するフィルタ処理を行わない制御信号が供給され、予測画像生成部471は、隣接画素に対するフィルタ処理を行わずに、各イントラ予測モードに対するイントラ予測を行い、予測画像を生成する。さらに、隣接画素内挿フィルタ制御部461から、隣接画素に対するフィルタ処理を行う制御信号が供給され、予測画像生成部471は、隣接画素に対するフィルタ処理を行って、各イントラ予測モードに対するイントラ予測を行い、予測画像を生成する。   At this time, first, a control signal that does not perform filter processing on adjacent pixels is supplied from the adjacent pixel interpolation filter control unit 461, and the prediction image generation unit 471 does not perform filter processing on adjacent pixels, and each intra prediction mode. Intra prediction is performed on the image to generate a predicted image. Furthermore, a control signal for performing filter processing on adjacent pixels is supplied from the adjacent pixel interpolation filter control unit 461, and the predicted image generation unit 471 performs filter processing on adjacent pixels to perform intra prediction for each intra prediction mode. Generate a predicted image.

予測画像生成部471は、フィルタonおよびoffの各イントラ予測モードの情報と、対応する予測画像画素値を、コスト関数値生成部472に供給する。コスト関数値生成部472は、画面並べ替えバッファ62からの原画像画素値と予測画像画素値を用いて、フィルタ処理offの場合、onの場合それぞれの、各イントラ予測モードに対して、上述した式(73)または式(74)で示されるコスト関数値を算出する。コスト関数値生成部472は、算出したフィルタ処理on、offの各場合のコスト関数値、予測画像画素値、およびイントラ予測モードの情報を、モード及びon/off判定部473に供給する。   The predicted image generation unit 471 supplies information about each intra prediction mode of the filters on and off and the corresponding predicted image pixel value to the cost function value generation unit 472. The cost function value generation unit 472 uses the original image pixel value and the predicted image pixel value from the screen rearrangement buffer 62, and has been described above for each intra prediction mode when the filtering process is off and when it is on. The cost function value represented by the equation (73) or the equation (74) is calculated. The cost function value generation unit 472 supplies the calculated cost function value, predicted image pixel value, and intra prediction mode information in each case of on and off filter processing to the mode and on / off determination unit 473.

ステップS422において、モード及びon/off判定部473は、コスト関数値生成部472からのコスト関数値を用いて、対象ブロックについて、それぞれのイントラ予測モードに対して、フィルタをonするかoffするかを決定する。   In step S422, the mode and on / off determination unit 473 uses the cost function value from the cost function value generation unit 472 to turn the filter on or off for each intra prediction mode for the target block. To decide.

そして、さらに、ステップS423において、モード及びon/off判定部473は、フィルタonまたはoffが決定された各イントラ予測モードの中から、対象ブロックについての最適なイントラ予測モードを選択する。   In step S423, the mode / on / off determination unit 473 selects an optimal intra prediction mode for the target block from the intra prediction modes for which the filter on or off is determined.

ステップS424において、モード及びon/off判定部473は、選択したイントラ予測モードのフィルタの状態(onかoff)を示すon/offフラグを生成する。生成されたon/offフラグ情報は、上述した図16のステップS22でイントラ予測モードの予測画像が選択された場合に、最適イントラ予測モードを示す情報とともに、可逆符号化部66に供給される。そして、供給されたこれらの情報は、図16のステップS23において、符号化され、圧縮画像のヘッダに付加されて、復号側に送信される。   In step S424, the mode and on / off determination unit 473 generates an on / off flag indicating the filter state (on or off) of the selected intra prediction mode. The generated on / off flag information is supplied to the lossless encoding unit 66 together with information indicating the optimal intra prediction mode when the prediction image in the intra prediction mode is selected in step S22 of FIG. 16 described above. The supplied information is encoded in step S23 of FIG. 16, added to the header of the compressed image, and transmitted to the decoding side.

次に、図38のフローチャートを参照して、マクロブロック単位でonまたはoffの制御が行われる場合の図34のイントラ予測部74のイントラ予測処理について説明する。なお、この処理は、図17のステップS31のイントラ予測処理の他の例であり、図38の例においても、イントラ4×4を例に説明する。   Next, the intra prediction process of the intra prediction unit 74 in FIG. 34 when on or off control is performed in units of macroblocks will be described with reference to the flowchart in FIG. 38. This process is another example of the intra prediction process in step S31 of FIG. 17, and in the example of FIG. 38, the intra 4 × 4 will be described as an example.

ステップS451において、隣接画素内挿フィルタ制御部461は、マクロブロック全体に対するフィルタをoffまたはonに固定する。いまの場合、隣接画素内挿フィルタ制御部461は、フィルタをoffに固定し、フィルタoffの制御信号を、予測画像生成部471に供給する。フィルタの固定は、onでもoffでもよいが、offに固定した方が、より少ない演算量により実現することが可能になる。   In step S451, the adjacent pixel interpolation filter control unit 461 fixes the filter for the entire macroblock to off or on. In this case, the adjacent pixel interpolation filter control unit 461 fixes the filter to off, and supplies the filter off control signal to the predicted image generation unit 471. The filter can be fixed either on or off, but can be realized with a smaller amount of computation if it is fixed to off.

イントラ予測部74は、ステップS452において、それぞれのブロックに対してイントラ予測モードを決定する。すなわち、予測画像生成部471には、フレームメモリ72からのイントラ予測の対象ブロックの隣接画素値が供給される。予測画像生成部471は、図3または図4に示した9種類のそれぞれのイントラ予測モードに対するイントラ予測を行い、対象ブロックの予測画像を生成する。   In step S452, the intra prediction unit 74 determines an intra prediction mode for each block. That is, the prediction image generation unit 471 is supplied with the adjacent pixel value of the target block for intra prediction from the frame memory 72. The predicted image generation unit 471 performs intra prediction for each of the nine types of intra prediction modes illustrated in FIG. 3 or FIG. 4, and generates a predicted image of the target block.

このとき、隣接画素内挿フィルタ制御部461から、隣接画素に対するフィルタ処理を行わない制御信号が供給され、予測画像生成部471は、隣接画素に対するフィルタ処理を行わずに、イントラ予測を行い、予測画像を生成する。予測画像生成部471は、生成した予測画像画素値と、そのイントラ予測モードの情報を、コスト関数値生成部472に供給する。   At this time, the adjacent pixel interpolation filter control unit 461 receives a control signal that does not perform the filter processing on the adjacent pixels, and the predicted image generation unit 471 performs intra prediction without performing the filter processing on the adjacent pixels, and performs prediction. Generate an image. The predicted image generation unit 471 supplies the generated predicted image pixel value and information on the intra prediction mode to the cost function value generation unit 472.

コスト関数値生成部472は、画面並べ替えバッファ62からの原画像画素値と予測画像画素値を用いて、フィルタoffの場合の、各イントラ予測モードに対して、上述した式(73)または式(74)で示されるコスト関数値を算出する。コスト関数値生成部472は、算出したコスト関数値、予測画像画素値、およびイントラ予測モードの情報を、モード及びon/off判定部473に供給する。   The cost function value generation unit 472 uses the original image pixel value and the predicted image pixel value from the screen rearrangement buffer 62 and uses the above equation (73) or equation for each intra prediction mode when the filter is off. The cost function value indicated by (74) is calculated. The cost function value generation unit 472 supplies the calculated cost function value, predicted image pixel value, and intra prediction mode information to the mode and on / off determination unit 473.

モード及びon/off判定部473は、コスト関数値生成部472からのコスト関数値を用いて、それぞれのブロックについて最適なイントラ予測モードを決定する。決定されたイントラ予測モードの情報は、隣接画素内挿フィルタ制御部461に供給される。   The mode and on / off determination unit 473 determines an optimal intra prediction mode for each block using the cost function value from the cost function value generation unit 472. Information on the determined intra prediction mode is supplied to the adjacent pixel interpolation filter control unit 461.

ステップS453において、隣接画素内挿フィルタ制御部461は、コスト関数値生成部472に、マクロブロック全体に対して、フィルタon及びoffのコスト関数値を生成させる。なお、マクロブロック内の各ブロックの最適なイントラ予測モード(すなわち、マクロブロック全体)についてのフィルタoffのコスト関数値は、ステップS452で生成されている。したがって、実際には、ステップS453においては、マクロブロック全体に対してのフィルタonのコスト関数値が生成される。   In step S453, the adjacent pixel interpolation filter control unit 461 causes the cost function value generation unit 472 to generate cost function values for the filters on and off for the entire macroblock. Note that the cost function value of the filter off for the optimal intra prediction mode (that is, the entire macroblock) of each block in the macroblock is generated in step S452. Therefore, in practice, in step S453, the cost function value of the filter on for the entire macroblock is generated.

すなわち、隣接画素内挿フィルタ制御部461は、予測画像生成部471に、フィルタonの制御信号と、各ブロックについてそれぞれ決定されたイントラ予測モードの情報を供給する。予測画像生成部471は、決定されたイントラ予測モードに用いられる隣接画素値に対するフィルタ処理を行い、決定されたイントラ予測モードで、イントラ予測を行い、対象ブロックの予測画像を生成する。   That is, the adjacent pixel interpolation filter control unit 461 supplies the prediction image generation unit 471 with a filter-on control signal and information on the intra prediction mode determined for each block. The predicted image generation unit 471 performs a filtering process on adjacent pixel values used in the determined intra prediction mode, performs intra prediction in the determined intra prediction mode, and generates a predicted image of the target block.

予測画像生成部471は、生成した予測画像画素値と、決定されたイントラ予測モードの情報を、コスト関数値生成部472に供給する。コスト関数値生成部472は、画面並べ替えバッファ62からの原画像画素値と予測画像画素値を用いて、フィルタ処理onの場合の、決定されたイントラ予測モードに対して、上述した式(73)または式(74)で示されるコスト関数値を算出する。コスト関数値生成部472は、算出したフィルタonおよびoffの場合のコスト関数値、および予測画像画素値を、モード及びon/off判定部473に供給する。   The predicted image generation unit 471 supplies the generated predicted image pixel value and information on the determined intra prediction mode to the cost function value generation unit 472. The cost function value generation unit 472 uses the original image pixel value and the predicted image pixel value from the screen rearrangement buffer 62 to calculate the above-described formula (73) for the determined intra prediction mode when the filter process is on. ) Or a cost function value represented by the equation (74) is calculated. The cost function value generation unit 472 supplies the calculated cost function value in the case of on and off filters and the predicted image pixel value to the mode and on / off determination unit 473.

ステップS454において、モード及びon/off判定部473は、コスト関数値生成部472からのフィルタonおよびoffの場合のマクロブロック内のすべてのブロックのコスト関数値を比較して、マクロブロック全体に対して、フィルタon/offのどちらを適用するかを決定する。   In step S454, the mode and on / off determination unit 473 compares the cost function values of all the blocks in the macro block in the case of the filter on and off from the cost function value generation unit 472, and the entire macro block is compared. To determine whether to apply the filter on / off.

ステップS455において、モード及びon/off判定部473は、マクロブロック全体に対して、ステップS454で決定されたonまたはoffを示すon/offフラグを生成する。生成されたon/offフラグ情報は、マクロブロック毎に、可逆符号化部66に供給される。そして、供給されたこれらの情報は、ステップS23において、符号化され、圧縮画像のヘッダに付加されて、復号側に送信される。   In step S455, the mode and on / off determination unit 473 generates an on / off flag indicating on or off determined in step S454 for the entire macroblock. The generated on / off flag information is supplied to the lossless encoding unit 66 for each macroblock. The supplied information is encoded in step S23, added to the header of the compressed image, and transmitted to the decoding side.

以上のように、フィルタのon/off(onまたはoff)の制御は、ブロック単位で行うこともできるし、マクロブロック単位で行うこともできる。なお、ブロック単位でon/offを制御することにより、イントラ予測処理による予測精度を向上させることが可能であるが、各ブロックに対するフラグ情報を伝送するのに必要な情報量が増大してしまう。これに対して、マクロブロック単位で制御する場合、予測精度の向上はブロック単位で行うよりも低いが、フラグ情報は各マクロブロックに1つで済むので、フラグによる情報量の増大を少なくすることができる。   As described above, the on / off (on or off) control of the filter can be performed in units of blocks or in units of macroblocks. Note that by controlling on / off in units of blocks, it is possible to improve prediction accuracy by intra prediction processing, but the amount of information necessary to transmit flag information for each block increases. On the other hand, when the control is performed in units of macroblocks, the prediction accuracy is lower than that performed in units of blocks, but only one flag information is required for each macroblock. Can do.

なお、上記説明においては、輝度信号の例を説明したが、色差信号に対するイントラ予測にも用いることができる。また、制御するフィルタ処理におけるフィルタ係数については、H.264/AVC方式における{1,2,1}//4という3タップのものに限らず、任意のタップ長の任意の係数や、図1の画像符号化装置51で設定されるフィルタ係数にも適用することができる。   In the above description, an example of a luminance signal has been described, but it can also be used for intra prediction for a color difference signal. For filter coefficients in the filter processing to be controlled, see H. It is not limited to the three taps {1, 2, 1} // 4 in the H.264 / AVC format, but also an arbitrary coefficient having an arbitrary tap length and a filter coefficient set by the image encoding device 51 in FIG. Can be applied.

すなわち、フィルタonの場合には、図1の画像符号化装置51で設定されるフィルタ係数によるフィルタ処理が行われるとすることも可能である。   That is, in the case of the filter on, it is possible to perform filter processing using the filter coefficient set by the image encoding device 51 of FIG.

この画像符号化装置451により符号化された圧縮画像を受け、それを復号する画像復号装置について図39を参照して説明する。   An image decoding apparatus that receives a compressed image encoded by the image encoding apparatus 451 and decodes it will be described with reference to FIG.

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

画像復号装置501は、蓄積バッファ161、可逆復号部162、逆量子化部163、逆直交変換部164、演算部165、デブロックフィルタ166、画面並べ替えバッファ167、D/A変換部168、フレームメモリ169、スイッチ170、イントラ予測部171、動き予測・補償部173、およびスイッチ174を備える点が、図22の画像復号装置151と共通している。   The image decoding device 501 includes a storage buffer 161, a lossless decoding unit 162, an inverse quantization unit 163, an inverse orthogonal transform unit 164, an operation unit 165, a deblock filter 166, a screen rearrangement buffer 167, a D / A conversion unit 168, a frame The point provided with the memory 169, the switch 170, the intra prediction unit 171, the motion prediction / compensation unit 173, and the switch 174 is common to the image decoding device 151 in FIG.

また、画像復号装置501は、隣接画素内挿フィルタ切替部172が、隣接画素内挿フィルタ制御部511に入れ替わっている点が、図22の画像復号装置151と異なる。   Further, the image decoding apparatus 501 is different from the image decoding apparatus 151 in FIG. 22 in that the adjacent pixel interpolation filter switching unit 172 is replaced with the adjacent pixel interpolation filter control unit 511.

すなわち、イントラ予測部171には、ヘッダ情報を復号して得られたイントラ予測モードを示す情報が、可逆復号部162から供給される。イントラ予測部171は、情報が示すイントラ予測モードによるイントラ予測を行うことで、予測画像を生成し、生成した予測画像を、スイッチ174に出力する。このとき。イントラ予測に先立ち、イントラ予測部171は、隣接画素内挿フィルタ制御部511からの制御信号に応じて隣接画素値に対してフィルタ処理を行う(あるいは、行わない)。   That is, information indicating the intra prediction mode obtained by decoding the header information is supplied from the lossless decoding unit 162 to the intra prediction unit 171. The intra prediction unit 171 generates a predicted image by performing intra prediction in the intra prediction mode indicated by the information, and outputs the generated predicted image to the switch 174. At this time. Prior to intra prediction, the intra prediction unit 171 performs (or does not perform) filter processing on adjacent pixel values in accordance with a control signal from the adjacent pixel interpolation filter control unit 511.

隣接画素内挿フィルタ制御部511には、画像符号化装置451での符号化に応じて、マクロブロック毎あるいはブロック毎に、on/offフラグ情報が可逆復号部162から供給される。隣接画素内挿フィルタ制御部511は、供給されたon/offフラグ情報に応じて、フィルタ処理を行うか、行わないことを示す制御信号を、イントラ予測部171に供給する。   The on / off flag information is supplied from the lossless decoding unit 162 to the adjacent pixel interpolation filter control unit 511 for each macroblock or each block according to the encoding by the image encoding device 451. The adjacent pixel interpolation filter control unit 511 supplies, to the intra prediction unit 171, a control signal indicating whether or not to perform filter processing according to the supplied on / off flag information.

なお、図34の画像符号化装置451においては、フィルタがonの場合とoffの場合の両方を試し、コスト関数値により、より高い符号化効率を与えると判定された方を選択し、イントラ予測処理が行われる。これに対して、この画像復号装置501においては、符号化されて送られてくるon/offフラグの情報に基づいてフィルタonまたはoffが制御されて、イントラ予測処理が行われる。   Note that the image encoding device 451 in FIG. 34 tries both when the filter is on and when it is off, selects the one determined to give higher encoding efficiency by the cost function value, and performs intra prediction. Processing is performed. On the other hand, in this image decoding apparatus 501, the filter on or off is controlled based on the on / off flag information encoded and transmitted, and the intra prediction process is performed.

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

図40の例の場合、イントラ予測部171は、予測モードバッファ521、予測画像生成部522により構成されている。隣接画素内挿フィルタ制御部511は、フラグバッファ531、および制御信号発生部532により構成されている。   In the case of the example of FIG. 40, the intra prediction unit 171 includes a prediction mode buffer 521 and a predicted image generation unit 522. The adjacent pixel interpolation filter control unit 511 includes a flag buffer 531 and a control signal generation unit 532.

予測モードバッファ521には、可逆復号部162からのイントラ予測モード情報が供給される。予測画像生成部522には、フレームメモリ169からのイントラ予測の対象ブロックの隣接画素値が供給される。図40の場合も、スイッチ170の図示は省略されているが、実際には、隣接画素値は、フレームメモリ169から、スイッチ170を介して予測画像生成部522に供給される。   The intra prediction mode information from the lossless decoding unit 162 is supplied to the prediction mode buffer 521. The prediction image generation unit 522 is supplied with the adjacent pixel value of the target block for intra prediction from the frame memory 169. Also in the case of FIG. 40, the switch 170 is not shown, but actually, the adjacent pixel value is supplied from the frame memory 169 to the predicted image generation unit 522 via the switch 170.

予測画像生成部522は、予測モードバッファ521からの対象ブロックに対するイントラ予測モード情報を読み出し、対象ブロックについて、読み出したイントラ予測モードのイントラ予測を行い、予測画像を生成する。このイントラ予測に先立ち、予測画像生成部522は、制御信号発生部532からの制御信号に応じて、フレームメモリ169からの隣接画像画素値にフィルタ処理を行う。   The predicted image generation unit 522 reads the intra prediction mode information for the target block from the prediction mode buffer 521, performs intra prediction of the read intra prediction mode for the target block, and generates a predicted image. Prior to this intra prediction, the predicted image generation unit 522 performs a filtering process on the adjacent image pixel values from the frame memory 169 in accordance with the control signal from the control signal generation unit 532.

フラグバッファ531には、マクロブロック毎またはブロック毎にon/offフラグ情報が可逆復号部162から供給される。制御信号発生部532は、フラグバッファ531から対応するon/offフラグを読み出し、ブロック毎に、フィルタ処理を行うか行わないかを示す制御信号を生成し、生成した制御信号を予測画像生成部522に供給する。   On / off flag information is supplied from the lossless decoding unit 162 to the flag buffer 531 for each macroblock or for each block. The control signal generation unit 532 reads the corresponding on / off flag from the flag buffer 531, generates a control signal indicating whether or not to perform filter processing for each block, and uses the generated control signal as the predicted image generation unit 522. To supply.

なお、画像復号装置501による処理は、以下に説明する予測処理以外は、図22の画像復号装置151の処理と同様の処理を行うため、その説明は繰り返しになるので省略される。   Note that the processing by the image decoding device 501 is the same as the processing of the image decoding device 151 in FIG. 22 except for the prediction processing described below, and thus the description thereof is omitted because it is repeated.

[予測処理の説明]
次に、図41のフローチャートを参照して、図39の画像復号装置501の予測処理について説明する。なお、この処理は、図24のステップS138の予測処理の他の例である。
[Explanation of prediction processing]
Next, prediction processing of the image decoding apparatus 501 in FIG. 39 will be described with reference to the flowchart in FIG. This process is another example of the prediction process in step S138 of FIG.

予測画像生成部522は、ステップS501において、対象ブロックがイントラ符号化されているか否かを判定する。可逆復号部162からイントラ予測モード情報が予測モードバッファ521に供給され、予測画像生成部522がそれを読み出す。これに対応して、予測画像生成部522は、ステップS501において、対象ブロックがイントラ符号化されていると判定し、処理は、ステップS502に進む。   In step S501, the predicted image generation unit 522 determines whether the target block is intra-coded. Intra prediction mode information is supplied from the lossless decoding unit 162 to the prediction mode buffer 521, and the prediction image generation unit 522 reads it. In response to this, the predicted image generation unit 522 determines in step S501 that the target block is intra-coded, and the process proceeds to step S502.

予測画像生成部522は、ステップS502において、予測モードバッファ521のイントラ予測モード情報を取得する。   In step S502, the predicted image generation unit 522 acquires intra prediction mode information in the prediction mode buffer 521.

また、可逆復号部162からon/offフラグの情報がフラグバッファ531に供給されると、フラグバッファ531は、ステップS503において、on/offフラグを取得し、格納する。   Further, when the information of the on / off flag is supplied from the lossless decoding unit 162 to the flag buffer 531, the flag buffer 531 acquires and stores the on / off flag in step S503.

制御信号発生部532は、対象ブロックに対応するon/offフラグを、フラグバッファ531から読み出し、ステップS504において、on/offフラグが1であるか否かを判定する。ステップS504において、on/offフラグが1である、すなわち、フィルタ処理がonであると判定された場合、制御信号発生部532は、予測画像生成部522に、フィルタ処理を行わせるための制御信号を供給する。   The control signal generator 532 reads the on / off flag corresponding to the target block from the flag buffer 531 and determines whether or not the on / off flag is 1 in step S504. In step S504, when the on / off flag is 1, that is, when it is determined that the filter processing is on, the control signal generation unit 532 causes the prediction image generation unit 522 to perform the filter processing. Supply.

この制御信号に対応して、予測画像生成部522は、ステップS505において、フィルタ係数を用いて隣接画素に対してフィルタ処理を施す。そして、ステップS506において、予測画像生成部522は、フィルタ処理を施した隣接画素値を用いて、イントラ予測を行い、予測画像を生成する。   In response to this control signal, the predicted image generation unit 522 performs filter processing on adjacent pixels using the filter coefficient in step S505. In step S506, the predicted image generation unit 522 performs intra prediction using the adjacent pixel values subjected to the filter process, and generates a predicted image.

一方、ステップS504において、on/offフラグが1ではない、すなわち、フィルタ処理がoffであると判定された場合、ステップS505のフィルタ処理はスキップされ、処理は、ステップS506に進む。   On the other hand, if it is determined in step S504 that the on / off flag is not 1, that is, the filtering process is off, the filtering process in step S505 is skipped, and the process proceeds to step S506.

ステップS506において、予測画像生成部522は、フレームメモリ169からの隣接画像画素値を用いて、イントラ予測を行い、予測画像を生成する。   In step S506, the predicted image generation unit 522 performs intra prediction using the adjacent image pixel value from the frame memory 169, and generates a predicted image.

ステップS506において生成された予測画像は、スイッチ174に供給される。   The predicted image generated in step S506 is supplied to the switch 174.

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

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

以上のように、画像符号化装置451および画像復号装置501においては、イントラ予測に用いられる隣接画素に対するフィルタ処理のonまたはoffを制御し、符号化効率が低下するブロックに対しては、フィルタ処理を行わないようにした。これにより符号化効率を向上させることができる。   As described above, the image encoding device 451 and the image decoding device 501 control the on / off of the filter processing for the adjacent pixels used for the intra prediction, and the filter processing is performed for the block in which the encoding efficiency is lowered. Was not done. Thereby, encoding efficiency can be improved.

なお、上記説明においては、イントラ予測を行う例を説明したが、図32を参照して上述した2次予測におけるイントラ予測にも、フィルタ処理のonまたはoffの制御を適用することができる。   In the above description, an example in which intra prediction is performed has been described. However, on / off control of filter processing can also be applied to intra prediction in the secondary prediction described above with reference to FIG.

<4.第4の実施の形態>
[画像符号化装置の他の構成例]
図42は、本発明を適用した画像処理装置としての画像符号化装置の他の実施の形態の構成を表している。
<4. Fourth Embodiment>
[Other Configuration Examples of Image Encoding Device]
FIG. 42 shows a configuration of another embodiment of an image encoding device as an image processing device to which the present invention is applied.

画像符号化装置551は、A/D変換部61、画面並べ替えバッファ62、演算部63、直交変換部64、量子化部65、可逆符号化部66、蓄積バッファ67、逆量子化部68、逆直交変換部69、演算部70、デブロックフィルタ71、フレームメモリ72、スイッチ73、イントラ予測部74、動き予測・補償部76、予測画像選択部77、およびレート制御部78を備えている点は、図34の画像符号化装置451と共通している。   The image encoding device 551 includes an A / D conversion unit 61, a screen rearrangement buffer 62, a calculation unit 63, an orthogonal transformation unit 64, a quantization unit 65, a lossless encoding unit 66, a storage buffer 67, an inverse quantization unit 68, An inverse orthogonal transform unit 69, a calculation unit 70, a deblock filter 71, a frame memory 72, a switch 73, an intra prediction unit 74, a motion prediction / compensation unit 76, a predicted image selection unit 77, and a rate control unit 78 are provided. Is common to the image encoding device 451 of FIG.

また、画像符号化装置551は、隣接画素内挿フィルタ制御部461が除かれている点、並びに、図31の2次予測部361、および隣接画素内挿フィルタ制御部561が追加されている点が、図34の画像符号化装置451と異なる。   In addition, the image encoding device 551 is such that the adjacent pixel interpolation filter control unit 461 is removed, and the secondary prediction unit 361 and the adjacent pixel interpolation filter control unit 561 in FIG. 31 are added. Is different from the image encoding device 451 in FIG.

すなわち、図42の例においては、イントラ予測部74は、H.264/AVCのイントラ予測を行う。   That is, in the example of FIG. Performs 264 / AVC intra prediction.

一方、動き予測・補償部76は、インター処理する画像と参照画像に基づいて、候補となる全てのインター予測モードの動きベクトルを検出し、動きベクトルに基づいて参照画像に補償処理を施し、予測画像を生成する。   On the other hand, the motion prediction / compensation unit 76 detects motion vectors in all candidate inter prediction modes based on the inter-processed image and the reference image, performs compensation processing on the reference image based on the motion vector, and performs prediction. Generate an image.

動き予測・補償部76は、検出された動きベクトル情報、インター処理する画像の情報(アドレスなど)、およびインター処理する画像と生成された予測画像の差分である1次残差を、2次予測部361に供給する。   The motion prediction / compensation unit 76 performs secondary prediction on the detected motion vector information, information on the image to be inter-processed (such as an address), and a primary residual that is a difference between the image to be inter-processed and the generated predicted image. To the unit 361.

動き予測・補償部76は、2次予測部361からの2次残差を比較することで、2次予測における最適なイントラ予測モードを決定する。また、動き予測・補償部76は、2次残差と1次残差を比較することで、2次残差を符号化するか、または1次残差を符号化するかを決定する。なお、これらの処理は、候補となる全てのインター予測モードに対して行われる。   The motion prediction / compensation unit 76 compares the secondary residual from the secondary prediction unit 361 to determine an optimal intra prediction mode in the secondary prediction. In addition, the motion prediction / compensation unit 76 determines whether to encode the secondary residual or the primary residual by comparing the secondary residual with the primary residual. Note that these processes are performed for all candidate inter prediction modes.

そして、動き予測・補償部76は、候補となる全てのインター予測モードに対してコスト関数値を算出する。このとき、1次残差および2次残差のうち、インター予測モード毎に決定された残差が用いられて、コスト関数値が算出される。動き予測・補償部76は、算出したコスト関数値のうち、最小値を与える予測モードを、最適インター予測モードとして決定する。   Then, the motion prediction / compensation unit 76 calculates cost function values for all candidate inter prediction modes. At this time, a cost function value is calculated using a residual determined for each inter prediction mode among the primary residual and the secondary residual. The motion prediction / compensation unit 76 determines the prediction mode that gives the minimum value among the calculated cost function values as the optimal inter prediction mode.

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

このとき、動きベクトル情報、参照フレーム情報、2次予測を行うことを示す2次予測フラグ、2次予測におけるイントラ予測モードの情報、および2次予測におけるon/ofフラグ情報なども可逆符号化部66に出力される。可逆符号化部66は、動き予測・補償部76からの情報をやはり可変長符号化、算術符号化といった可逆符号化処理し、圧縮画像のヘッダ部に挿入する。   At this time, the motion vector information, the reference frame information, the secondary prediction flag indicating that the secondary prediction is performed, the intra prediction mode information in the secondary prediction, the on / of flag information in the secondary prediction, and the like are also lossless encoding units. 66. The lossless encoding unit 66 performs lossless encoding processing such as variable length encoding and arithmetic encoding on the information from the motion prediction / compensation unit 76 and inserts the information into the header portion of the compressed image.

2次予測部361は、動き予測・補償部76からの動きベクトル情報とインター処理する画像の情報に基づいて、インター処理する対象の対象ブロックに隣接する対象隣接画素をフレームメモリ72から読み出す。また、2次予測部361は、動きベクトル情報により対象ブロックに対応付けられる参照ブロックに隣接する参照隣接画素をフレームメモリ72から読み出す。   Based on the motion vector information from the motion prediction / compensation unit 76 and image information to be inter-processed, the secondary prediction unit 361 reads out the target adjacent pixels adjacent to the target block to be inter-processed from the frame memory 72. In addition, the secondary prediction unit 361 reads, from the frame memory 72, reference adjacent pixels adjacent to the reference block associated with the target block based on the motion vector information.

2次予測部361は、図32を参照して上述した2次予測処理を行う。2次予測処理とは、1次残差、および対象隣接画素と参照隣接画素の差分の間でイントラ予測を行い、2次差分情報(2次残差)を生成する処理である。   The secondary prediction unit 361 performs the secondary prediction process described above with reference to FIG. The secondary prediction process is a process of generating secondary difference information (secondary residual) by performing intra prediction between the primary residual and the difference between the target adjacent pixel and the reference adjacent pixel.

ただし、図42の2次予測部361は、この2次予測に先立ち、隣接画素内挿フィルタ制御部561からの制御信号に応じて、イントラ予測に用いる対象隣接画素と参照隣接画素の差分に対して、フィルタ処理を行う(あるいは行わない)。そして、2次予測部361は、フィルタ処理された(あるいはフィルタ処理なしの)対象隣接画素と参照隣接画素の差分を用いて、2次予測処理を行い、得られた2次差分情報(2次残差)を、動き予測・補償部76に出力する。このとき、2次予測部361は、フィルタ処理を行うこと、または行わないことを示すon/offフラグ情報も、動き予測・補償部76に出力する。   However, prior to the secondary prediction, the secondary prediction unit 361 in FIG. 42 determines the difference between the target adjacent pixel used for intra prediction and the reference adjacent pixel according to the control signal from the adjacent pixel interpolation filter control unit 561. Filter processing (or not). Then, the secondary prediction unit 361 performs the secondary prediction process using the difference between the target adjacent pixel subjected to the filtering process (or without the filtering process) and the reference adjacent pixel, and the obtained secondary difference information (secondary difference) Residual) is output to the motion prediction / compensation unit 76. At this time, the secondary prediction unit 361 also outputs to the motion prediction / compensation unit 76 on / off flag information indicating that the filtering process is performed or not performed.

すなわち、2次予測部361は、図35に示したイントラ予測部74を含むように構成されている。   That is, the secondary prediction unit 361 is configured to include the intra prediction unit 74 illustrated in FIG.

隣接画素内挿フィルタ制御部561は、図34の隣接画素内挿フィルタ制御部461と基本的に同様に構成され、同様の処理を行う。すなわち、隣接画素内挿フィルタ制御部561は、ブロック単位またはマクロブロック単位でフィルタ処理を行うか、行わないかを制御する制御信号を、2次予測部361に供給する。   The adjacent pixel interpolation filter control unit 561 is basically configured in the same manner as the adjacent pixel interpolation filter control unit 461 in FIG. 34, and performs the same processing. That is, the adjacent pixel interpolation filter control unit 561 supplies a control signal for controlling whether or not to perform filter processing in units of blocks or macroblocks to the secondary prediction unit 361.

なお、図42の画像符号化装置551の符号化処理は、以下のイントラ処理と動き予測処理が異なるだけであり、その他の処理は、図34の画像符号化装置451による符号化処理(すなわち、図16の符号化処理)と基本的に同様の処理であるので、その説明は省略する。   Note that the encoding process of the image encoding device 551 in FIG. 42 is different only in the following intra processing and motion prediction processing, and the other processing is the encoding processing by the image encoding device 451 in FIG. Since this is basically the same process as the encoding process in FIG. 16, its description is omitted.

すなわち、図42の画像符号化装置551においては、イントラ処理として、H.264/AVC方式におけるイントラ予測が行われる。また、動き予測処理として、動き予測処理の際に、隣接画素内挿フィルタ制御部561からの制御信号に応じてフィルタ処理が制御されて、フィルタ処理された(あるいはフィルタ処理されない)2次差分情報が生成される。そして、1次差分情報と2次差分情報のうち、符号化効率のよいものが選択され、コスト関数値が比較されることにより最適インター予測モードが決定される。   That is, in the image encoding device 551 in FIG. Intra prediction in the H.264 / AVC format is performed. In addition, as the motion prediction process, the second-order difference information subjected to the filtering process (or not subjected to the filtering process) by controlling the filtering process according to the control signal from the adjacent pixel interpolation filter control unit 561 during the motion prediction process. Is generated. Then, of the primary difference information and the secondary difference information, the one with good coding efficiency is selected, and the optimal inter prediction mode is determined by comparing the cost function values.

この画像符号化装置551により符号化された圧縮画像を受け、それを復号する画像復号装置について図43を参照して説明する。   An image decoding apparatus that receives a compressed image encoded by the image encoding apparatus 551 and decodes it will be described with reference to FIG.

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

画像復号装置601は、蓄積バッファ161、可逆復号部162、逆量子化部163、逆直交変換部164、演算部165、デブロックフィルタ166、画面並べ替えバッファ167、D/A変換部168、フレームメモリ169、スイッチ170、イントラ予測部171、動き予測・補償部173、およびスイッチ174を備える点が、図39の画像復号装置501と共通している。   The image decoding device 601 includes a storage buffer 161, a lossless decoding unit 162, an inverse quantization unit 163, an inverse orthogonal transform unit 164, an operation unit 165, a deblock filter 166, a screen rearrangement buffer 167, a D / A conversion unit 168, a frame The image decoding apparatus 501 in FIG. 39 is common to the memory 169, the switch 170, the intra prediction unit 171, the motion prediction / compensation unit 173, and the switch 174.

また、画像復号装置601は、隣接画素内挿フィルタ制御部511が除かれている点、並びに、図33の2次予測部411、および隣接画素内挿フィルタ制御部611が追加されている点が、図39の画像復号装置501と異なっている。   Further, the image decoding apparatus 601 has the point that the adjacent pixel interpolation filter control unit 511 is removed, and the point that the secondary prediction unit 411 and the adjacent pixel interpolation filter control unit 611 in FIG. 33 are added. , Which is different from the image decoding apparatus 501 in FIG.

すなわち、イントラ予測部171には、ヘッダ情報を復号して得られたイントラ予測モードを示す情報が可逆復号部162から供給される。イントラ予測部171は、この情報に基づいて、予測画像を生成し、生成した予測画像を、スイッチ174に出力する。   That is, information indicating the intra prediction mode obtained by decoding the header information is supplied from the lossless decoding unit 162 to the intra prediction unit 171. The intra prediction unit 171 generates a predicted image based on this information, and outputs the generated predicted image to the switch 174.

動き予測・補償部173には、ヘッダ情報を復号して得られた情報のうち、予測モード情報、動きベクトル情報、参照フレーム情報などが可逆復号部162から供給される。また、動き予測・補償部173には、対象ブロックに対して2次予測処理が適用されている場合には、2次予測を行うことを示す2次予測フラグと、2次予測におけるイントラ予測モード情報も可逆復号部162から供給される。   Among the information obtained by decoding the header information, the motion prediction / compensation unit 173 is supplied with prediction mode information, motion vector information, reference frame information, and the like from the lossless decoding unit 162. The motion prediction / compensation unit 173 has a secondary prediction flag indicating that the secondary prediction is performed when the secondary prediction processing is applied to the target block, and an intra prediction mode in the secondary prediction. Information is also supplied from the lossless decoding unit 162.

動き予測・補償部173は、2次予測処理が適用されていると判定した場合、2次予測部411を制御し、2次予測におけるイントラ予測モード情報が示すイントラ予測モードで、2次予測を行わせる。   When the motion prediction / compensation unit 173 determines that the secondary prediction process is applied, the motion prediction / compensation unit 173 controls the secondary prediction unit 411 to perform the secondary prediction in the intra prediction mode indicated by the intra prediction mode information in the secondary prediction. Let it be done.

動き予測・補償部173は、動きベクトル情報と参照フレーム情報に基づいて画像に動き予測と補償処理を施し、予測画像を生成する。すなわち、対象ブロックの予測画像は、参照フレームにおいて、対象ブロックに動きベクトルで対応付けられる参照ブロックの画素値が用いられて生成される。そして、動き予測・補償部173は、生成された予測画像と2次予測部411からの予測差分値を加算して、それをスイッチ174に出力する。   The motion prediction / compensation unit 173 performs motion prediction and compensation processing on the image based on the motion vector information and the reference frame information, and generates a predicted image. That is, the predicted image of the target block is generated using the pixel value of the reference block associated with the target block by a motion vector in the reference frame. Then, the motion prediction / compensation unit 173 adds the generated prediction image and the prediction difference value from the secondary prediction unit 411, and outputs it to the switch 174.

2次予測部411は、フレームメモリ169から読み出される対象隣接画素と参照隣接画素の差分を用いて、2次予測を行う。ただし、図43の2次予測部411は、隣接画素内挿フィルタ制御部611からフィルタ処理を行うことを制御する制御信号を受けた場合、この2次予測に先立ち、対象隣接画素と参照隣接画素の差分に対して、フィルタ処理を行う。そして、2次予測部411は、フィルタ処理された対象隣接画素と参照隣接画素の差分を用いて、2次予測処理を行い、得られた2次差分情報(2次残差)を、動き予測・補償部173に出力する。   The secondary prediction unit 411 performs secondary prediction using the difference between the target adjacent pixel and the reference adjacent pixel read from the frame memory 169. However, when receiving the control signal for controlling the filtering process from the adjacent pixel interpolation filter control unit 611, the secondary prediction unit 411 in FIG. 43 prior to the secondary prediction, the target adjacent pixel and the reference adjacent pixel. Filtering is performed on the difference between the two. Then, the secondary prediction unit 411 performs secondary prediction processing using the difference between the filtered target adjacent pixel and the reference adjacent pixel, and uses the obtained secondary difference information (secondary residual) as motion prediction. Output to the compensation unit 173.

なお、隣接画素内挿フィルタ制御部611からフィルタ処理を行わないことを制御する制御信号を受けた場合、2次予測部411は、フィルタ処理を行わず、対象隣接画素と参照隣接画素の差分を用いて、2次予測処理を行う。   When receiving a control signal for controlling not to perform the filter processing from the adjacent pixel interpolation filter control unit 611, the secondary prediction unit 411 does not perform the filter processing and calculates the difference between the target adjacent pixel and the reference adjacent pixel. The second order prediction process is performed.

すなわち、2次予測部411は、図40に示したイントラ予測部171を含むように構成されている。   That is, the secondary prediction unit 411 is configured to include the intra prediction unit 171 illustrated in FIG.

隣接画素内挿フィルタ制御部611は、図39の隣接画素内挿フィルタ制御部511と基本的に同様に構成され、基本的に同様の処理を行う。すなわち、隣接画素内挿フィルタ制御部611には、ヘッダ情報を復号して得られた情報のうち、on/offフラグ情報が可逆復号部162から供給される。隣接画素内挿フィルタ制御部611は、on/offフラグ情報に応じて、2次予測部411に隣接画素のフィルタ処理を行わせる、または行わせない制御信号を供給する。   The adjacent pixel interpolation filter control unit 611 is basically configured in the same manner as the adjacent pixel interpolation filter control unit 511 in FIG. 39, and basically performs the same processing. That is, the on / off flag information among the information obtained by decoding the header information is supplied from the lossless decoding unit 162 to the adjacent pixel interpolation filter control unit 611. The adjacent pixel interpolation filter control unit 611 supplies a control signal that causes the secondary prediction unit 411 to perform or not perform the adjacent pixel filtering process according to the on / off flag information.

なお、図43の画像復号装置601の復号処理は、以下のイントラ処理と動き予測処理が異なるだけであり、その他の処理は、図39の画像復号装置501による復号処理(すなわち、図24の復号処理)と基本的に同様の処理であるので、その説明は省略する。   Note that the decoding process of the image decoding apparatus 601 in FIG. 43 is only different from the following intra process and motion prediction process, and the other processes are decoding processes by the image decoding apparatus 501 in FIG. 39 (that is, the decoding process in FIG. 24). Since the process is basically the same as that of (Process), the description thereof is omitted.

すなわち、図43の画像復号装置601においては、イントラ処理として、H.264/AVC方式におけるイントラ予測が行われる。また、動き予測処理として、動き予測処理の際に、隣接画素内挿フィルタ制御部611からの制御信号に応じてフィルタ処理がなされて、2次予測(イントラ予測)が行われ、2次差分情報が生成される。   That is, in the image decoding apparatus 601 in FIG. Intra prediction in the H.264 / AVC format is performed. In addition, as the motion prediction process, a filter process is performed according to the control signal from the adjacent pixel interpolation filter control unit 611 in the motion prediction process, and the secondary prediction (intra prediction) is performed. Is generated.

以上のような2次予測処理におけるイントラ予測にも、フィルタ処理のonまたはoffの制御を適用することができる。   The filter processing on or off control can also be applied to the intra prediction in the secondary prediction processing as described above.

なお、上記説明においては、マクロブロックの大きさが、16×16画素の場合について説明してきたが、本発明は、特許文献3に記載の拡張されたマクロブロックサイズに対しても適用することが可能である。   In the above description, the case where the size of the macroblock is 16 × 16 pixels has been described. However, the present invention can also be applied to the expanded macroblock size described in Patent Document 3. Is possible.

図44は、拡張されたマクロブロックサイズの例を示す図である。特許文献3では、マクロブロックサイズが32×32画素に拡張されている。   FIG. 44 is a diagram illustrating an example of an extended macroblock size. In Patent Document 3, the macroblock size is expanded to 32 × 32 pixels.

図44の上段には、左から、32×32画素、32×16画素、16×32画素、および16×16画素のブロック(パーティション)に分割された32×32画素で構成されるマクロブロックが順に示されている。図44の中段には、左から、16×16画素、16×8画素、8×16画素、および8×8画素のブロックに分割された16×16画素で構成されるブロックが順に示されている。また、図44の下段には、左から、8×8画素、8×4画素、4×8画素、および4×4画素のブロックに分割された8×8画素のブロックが順に示されている。   In the upper part of FIG. 44, from the left, a macro block composed of 32 × 32 pixels divided into blocks (partitions) of 32 × 32 pixels, 32 × 16 pixels, 16 × 32 pixels, and 16 × 16 pixels. They are shown in order. In the middle part of FIG. 44, blocks composed of 16 × 16 pixels divided into blocks of 16 × 16 pixels, 16 × 8 pixels, 8 × 16 pixels, and 8 × 8 pixels are sequentially shown from the left. Yes. In the lower part of FIG. 44, an 8 × 8 pixel block divided into 8 × 8 pixel, 8 × 4 pixel, 4 × 8 pixel, and 4 × 4 pixel blocks is sequentially shown from the left. .

すなわち、32×32画素のマクロブロックは、図44の上段に示される32×32画素、32×16画素、16×32画素、および16×16画素のブロックでの処理が可能である。   That is, the 32 × 32 pixel macroblock can be processed in the 32 × 32 pixel, 32 × 16 pixel, 16 × 32 pixel, and 16 × 16 pixel blocks shown in the upper part of FIG.

また、上段の右側に示される16×16画素のブロックは、H.264/AVC方式と同様に、中段に示される16×16画素、16×8画素、8×16画素、および8×8画素のブロックでの処理が可能である。   The 16 × 16 pixel block shown on the right side of the upper row is H.264. Similar to the H.264 / AVC format, processing in blocks of 16 × 16 pixels, 16 × 8 pixels, 8 × 16 pixels, and 8 × 8 pixels shown in the middle stage is possible.

さらに、中段の右側に示される8×8画素のブロックは、H.264/AVC方式と同様に、下段に示される8×8画素、8×4画素、4×8画素、および4×4画素のブロックでの処理が可能である。   Further, the 8 × 8 pixel block shown on the right side of the middle stage is H.264. Similar to the H.264 / AVC format, processing in blocks of 8 × 8 pixels, 8 × 4 pixels, 4 × 8 pixels, and 4 × 4 pixels shown in the lower stage is possible.

このような階層構造を採用することにより、拡張されたマクロブロックサイズにおいては、16×16画素のブロック以下に関してH.264/AVC方式と互換性を保ちながら、そのスーパーセットとして、より大きなブロックが定義されている。   By adopting such a hierarchical structure, in the expanded macroblock size, H. A larger block is defined as a superset while maintaining compatibility with the H.264 / AVC format.

以上のように提案される拡張されたマクロブロックサイズにも、本発明のフィルタ係数の設定、算出、またはフィルタ処理のオンオフの制御を適用することができる。   The filter coefficient setting, calculation, or filter processing on / off control according to the present invention can be applied to the extended macroblock size proposed as described above.

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

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

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

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

コンピュータにおいて、CPU(Central Processing Unit)801、ROM(Read Only Memory)802、RAM(Random Access Memory)803は、バス804により相互に接続されている。   In the computer, a CPU (Central Processing Unit) 801, a ROM (Read Only Memory) 802, and a RAM (Random Access Memory) 803 are connected to each other by a bus 804.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

表示パネル1321はLCD(Liquid Crystal Display)などよりなり、パネル駆動回路1320による制御に従って番組の映像などを表示させる。   The display panel 1321 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 1320.

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

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

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

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

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

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

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

デジタルチューナ1316は、デジタル放送(地上デジタル放送、BS(Broadcasting Satellite)/CS(Communications Satellite)デジタル放送)の放送波信号を、アンテナを介して受信し、復調し、MPEG-TS(Moving Picture Experts Group-Transport Stream)を取得し、それをMPEGデコーダ1317に供給する。   The digital tuner 1316 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 1317.

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

テレビジョン受像機1300は、このように映像パケットをデコードするMPEGデコーダ1317として、上述した画像復号装置151、401、501、または601を用いる。したがって、MPEGデコーダ1317は、画像復号装置151および401の場合と同様に、イントラ予測に先立ち、量子化パラメータや予測モードに応じてフィルタ係数を切り替えて、隣接画素のフィルタ処理を行う。あるいは、MPEGデコーダ1317は、画像復号装置501および601の場合と同様に、on/offフラグに基づき、イントラ予測に先立って行われる隣接画素のフィルタ処理をする、しないを制御する。これにより、符号化効率を向上することができる。   The television receiver 1300 uses the above-described image decoding device 151, 401, 501, or 601 as the MPEG decoder 1317 for decoding a video packet in this way. Therefore, as in the case of the image decoding devices 151 and 401, the MPEG decoder 1317 performs filter processing of adjacent pixels by switching the filter coefficient according to the quantization parameter and the prediction mode prior to intra prediction. Alternatively, as in the case of the image decoding devices 501 and 601, the MPEG decoder 1317 controls whether or not to perform adjacent pixel filtering processing prior to intra prediction based on the on / off flag. Thereby, encoding efficiency can be improved.

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

MPEGデコーダ1317から供給された音声データは、音声A/D変換回路1314から供給された音声データの場合と同様に、音声信号処理回路1322において所定の処理が施される。そして、所定の処理が施された音声データは、エコーキャンセル/音声合成回路1323を介して音声増幅回路1324に供給され、D/A変換処理や増幅処理が施される。その結果、所定の音量に調整された音声がスピーカ1325から出力される。   The audio data supplied from the MPEG decoder 1317 is subjected to predetermined processing in the audio signal processing circuit 1322 as in the case of the audio data supplied from the audio A / D conversion circuit 1314. The audio data that has been subjected to the predetermined processing is supplied to the audio amplifying circuit 1324 via the echo cancellation / audio synthesizing circuit 1323 and subjected to D / A conversion processing and amplification processing. As a result, sound adjusted to a predetermined volume is output from the speaker 1325.

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

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

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

さらに、テレビジョン受像機1300は、音声コーデック1328、内部バス1329、SDRAM(Synchronous Dynamic Random Access Memory)1330、フラッシュメモリ1331、CPU1332、USB(Universal Serial Bus) I/F1333、およびネットワークI/F1334も有する。   Furthermore, the television receiver 1300 also includes an audio codec 1328, an internal bus 1329, an SDRAM (Synchronous Dynamic Random Access Memory) 1330, a flash memory 1331, a CPU 1332, a USB (Universal Serial Bus) I / F 1333, and a network I / F 1334. .

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

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

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

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

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

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

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

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

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

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

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

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

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

テレビジョン受像機1300は、MPEGデコーダ1317として画像復号装置151、401、501、または601を用いることにより、符号化効率を向上することができる。その結果として、テレビジョン受像機1300は、アンテナを介して受信した放送波信号や、ネットワークを介して取得したコンテンツデータから、より高速に、より高精細な復号画像を得て、表示することができる。   The television receiver 1300 can improve the encoding efficiency by using the image decoding device 151, 401, 501, or 601 as the MPEG decoder 1317. As a result, the television receiver 1300 can obtain and display a higher-definition decoded image at higher speed from the broadcast wave signal received via the antenna or the content data obtained via the network. it can.

図47は、本発明を適用した画像符号化装置および画像復号装置を用いる携帯電話機の主な構成例を示すブロック図である。   FIG. 47 is a block diagram showing a main configuration example of a mobile phone using an image encoding device and an image decoding device to which the present invention is applied.

図47に示される携帯電話機1400は、各部を統括的に制御するようになされた主制御部1450、電源回路部1451、操作入力制御部1452、画像エンコーダ1453、カメラI/F部1454、LCD制御部1455、画像デコーダ1456、多重分離部1457、記録再生部1462、変復調回路部1458、および音声コーデック1459を有する。これらは、バス1460を介して互いに接続されている。   A cellular phone 1400 shown in FIG. 47 has a main control unit 1450, a power supply circuit unit 1451, an operation input control unit 1452, an image encoder 1453, a camera I / F unit 1454, an LCD control, which are configured to control each unit in an integrated manner. Section 1455, image decoder 1456, demultiplexing section 1457, recording / reproducing section 1462, modulation / demodulation circuit section 1458, and audio codec 1459. These are connected to each other via a bus 1460.

また、携帯電話機1400は、操作キー1419、CCD(Charge Coupled Devices)カメラ1416、液晶ディスプレイ1418、記憶部1423、送受信回路部1463、アンテナ1414、マイクロホン(マイク)1421、およびスピーカ1417を有する。   The cellular phone 1400 includes an operation key 1419, a CCD (Charge Coupled Devices) camera 1416, a liquid crystal display 1418, a storage unit 1423, a transmission / reception circuit unit 1463, an antenna 1414, a microphone (microphone) 1421, and a speaker 1417.

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

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

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

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

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

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

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

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

この記憶部1423は、書き換え可能な任意の記憶媒体である。記憶部1423は、例えば、RAMや内蔵型フラッシュメモリ等の半導体メモリであってもよいし、ハードディスクであってもよいし、磁気ディスク、光磁気ディスク、光ディスク、USBメモリ、またはメモリカード等のリムーバブルメディアであってもよい。もちろん、これら以外のものであってもよい。   The storage unit 1423 is an arbitrary rewritable storage medium. The storage unit 1423 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.

さらに、例えば、データ通信モードにおいて画像データを送信する場合、携帯電話機1400は、撮像によりCCDカメラ1416で画像データを生成する。CCDカメラ1416は、レンズや絞り等の光学デバイスと光電変換素子としてのCCDを有し、被写体を撮像し、受光した光の強度を電気信号に変換し、被写体の画像の画像データを生成する。その画像データを、カメラI/F部1454を介して、画像エンコーダ1453で、例えばMPEG2やMPEG4等の所定の符号化方式によって圧縮符号化することにより符号化画像データに変換する。   Furthermore, for example, when transmitting image data in the data communication mode, the mobile phone 1400 generates image data with the CCD camera 1416 by imaging. The CCD camera 1416 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 image data is converted into encoded image data by compression encoding with a predetermined encoding method such as MPEG2 or MPEG4 by the image encoder 1453 via the camera I / F unit 1454.

携帯電話機1400は、このような処理を行う画像エンコーダ1453として、上述した画像符号化装置51、351、451、または551を用いる。したがって、画像エンコーダ1453は、画像符号化装置51および351の場合と同様に、イントラ予測に先立ち、量子化パラメータや予測モードに応じてフィルタ係数を設定して、隣接画素のフィルタ処理を行う。あるいは、画像エンコーダ1453は、画像符号化装置451および551の場合と同様に、イントラ予測に先立って行われる隣接画素のフィルタ処理をする、しないを制御する。これにより、符号化効率を向上することができる。   The cellular phone 1400 uses the above-described image encoding device 51, 351, 451, or 551 as the image encoder 1453 that performs such processing. Therefore, as in the case of the image encoding devices 51 and 351, the image encoder 1453 sets the filter coefficient according to the quantization parameter and the prediction mode and performs adjacent pixel filtering processing prior to intra prediction. Alternatively, the image encoder 1453 controls whether or not to perform adjacent pixel filter processing prior to intra prediction, as in the case of the image encoding devices 451 and 551. Thereby, encoding efficiency can be improved.

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

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

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

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

携帯電話機1400は、画像デコーダ1456において、符号化画像データを、MPEG2やMPEG4等の所定の符号化方式に対応した復号方式でデコードすることにより、再生動画像データを生成し、これを、LCD制御部1455を介して液晶ディスプレイ1418に表示させる。これにより、例えば、簡易ホームページにリンクされた動画像ファイルに含まれる動画データが液晶ディスプレイ1418に表示される。   The cellular phone 1400 generates reproduced moving image data by decoding the encoded image data with a decoding method corresponding to a predetermined encoding method such as MPEG2 or MPEG4 in the image decoder 1456, and this is generated by the LCD control. The image is displayed on the liquid crystal display 1418 via the unit 1455. Thereby, for example, moving image data included in a moving image file linked to a simple homepage is displayed on the liquid crystal display 1418.

携帯電話機1400は、このような処理を行う画像デコーダ1456として、上述した画像復号装置151、401、501、または601を用いる。したがって、画像デコーダ1456は、画像復号装置151および401の場合と同様に、イントラ予測に先立ち、量子化パラメータや予測モードに応じてフィルタ係数を切り替えて、隣接画素のフィルタ処理を行う。あるいは、画像デコーダ1456は、画像復号装置501および601の場合と同様に、on/offフラグに基づき、イントラ予測に先立って行われる隣接画素のフィルタ処理をする、しないを制御する。これにより、符号化効率を向上することができる。   The cellular phone 1400 uses the above-described image decoding device 151, 401, 501, or 601 as the image decoder 1456 for performing such processing. Therefore, as in the case of the image decoding devices 151 and 401, the image decoder 1456 performs filter processing on adjacent pixels by switching filter coefficients according to the quantization parameter and the prediction mode prior to intra prediction. Alternatively, the image decoder 1456 controls whether or not to perform adjacent pixel filter processing prior to intra prediction based on the on / off flag, as in the case of the image decoding devices 501 and 601. Thereby, encoding efficiency can be improved.

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

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

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

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

携帯電話機1400は、画像エンコーダ1453として画像符号化装置51、351、451、または551を用いることにより、例えばCCDカメラ1416において生成された画像データを符号化して生成する符号化データの符号化効率を向上させることができる。結果として、携帯電話機1400は、符号化効率のよい符号化データ(画像データ)を、他の装置に提供することができる。   The cellular phone 1400 uses, for example, the image encoding device 51, 351, 451, or 551 as the image encoder 1453, thereby improving the encoding efficiency of the encoded data generated by encoding the image data generated by the CCD camera 1416, for example. Can be improved. As a result, the mobile phone 1400 can provide encoded data (image data) with high encoding efficiency to other devices.

また、携帯電話機1400は、画像デコーダ1456として画像復号装置151、401、501、または601を用いることにより、精度の高い予測画像を生成することができる。その結果として、携帯電話機1400は、例えば、簡易ホームページにリンクされた動画像ファイルから、より高精細な復号画像を得て、表示することができる。   In addition, the mobile phone 1400 can generate a predicted image with high accuracy by using the image decoding device 151, 401, 501, or 601 as the image decoder 1456. As a result, the mobile phone 1400 can obtain and display a higher-definition decoded image from a moving image file linked to a simple homepage, for example.

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

また、以上においては携帯電話機1400として説明したが、例えば、PDA(Personal Digital Assistants)、スマートフォン、UMPC(Ultra Mobile Personal Computer)、ネットブック、ノート型パーソナルコンピュータ等、この携帯電話機1400と同様の撮像機能や通信機能を有する装置であれば、どのような装置であっても携帯電話機1400の場合と同様に、画像符号化装置51、351、451、または551および画像復号装置151、401、501、または601を適用することができる。   In the above description, the mobile phone 1400 has been described. For example, PDA (Personal Digital Assistants), smart phones, UMPC (Ultra Mobile Personal Computer), netbooks, notebook personal computers, etc. As long as the mobile phone 1400 is any device that has a communication function, the image encoding device 51, 351, 451, or 551 and the image decoding device 151, 401, 501, or 601 can be applied.

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

図48に示されるハードディスクレコーダ(HDDレコーダ)1500は、チューナにより受信された、衛星や地上のアンテナ等より送信される放送波信号(テレビジョン信号)に含まれる放送番組のオーディオデータとビデオデータを、内蔵するハードディスクに保存し、その保存したデータをユーザの指示に応じたタイミングでユーザに提供する装置である。   A hard disk recorder (HDD recorder) 1500 shown in FIG. 48 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.

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

さらに、ハードディスクレコーダ1500は、例えば、内蔵するハードディスクに記録されているオーディオデータやビデオデータを復号してモニタ1560に供給し、モニタ1560の画面にその画像を表示させる。また、ハードディスクレコーダ1500は、モニタ1560のスピーカよりその音声を出力させることができる。   Further, the hard disk recorder 1500, for example, decodes audio data and video data recorded on the built-in hard disk, supplies the decoded data to the monitor 1560, and displays the image on the screen of the monitor 1560. Further, the hard disk recorder 1500 can output the sound from the speaker of the monitor 1560.

ハードディスクレコーダ1500は、例えば、チューナを介して取得された放送波信号より抽出されたオーディオデータとビデオデータ、または、ネットワークを介して他の装置から取得したオーディオデータやビデオデータを復号してモニタ1560に供給し、モニタ1560の画面にその画像を表示させる。また、ハードディスクレコーダ1500は、モニタ1560のスピーカよりその音声を出力させることもできる。   For example, the hard disk recorder 1500 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, and monitors 1560. And the image is displayed on the screen of the monitor 1560. The hard disk recorder 1500 can also output the sound from the speaker of the monitor 1560.

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

図48に示されるように、ハードディスクレコーダ1500は、受信部1521、復調部1522、デマルチプレクサ1523、オーディオデコーダ1524、ビデオデコーダ1525、およびレコーダ制御部1526を有する。ハードディスクレコーダ1500は、さらに、EPGデータメモリ1527、プログラムメモリ1528、ワークメモリ1529、ディスプレイコンバータ1530、OSD(On Screen Display)制御部1531、ディスプレイ制御部1532、記録再生部1533、D/Aコンバータ1534、および通信部1535を有する。   As shown in FIG. 48, the hard disk recorder 1500 includes a receiving unit 1521, a demodulating unit 1522, a demultiplexer 1523, an audio decoder 1524, a video decoder 1525, and a recorder control unit 1526. The hard disk recorder 1500 further includes an EPG data memory 1527, a program memory 1528, a work memory 1529, a display converter 1530, an OSD (On Screen Display) control unit 1531, a display control unit 1532, a recording / playback unit 1533, a D / A converter 1534, And a communication unit 1535.

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

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

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

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

オーディオデコーダ1524は、入力されたオーディオデータを、例えばMPEG方式でデコードし、記録再生部1533に出力する。ビデオデコーダ1525は、入力されたビデオデータを、例えばMPEG方式でデコードし、ディスプレイコンバータ1530に出力する。レコーダ制御部1526は、入力されたEPGデータをEPGデータメモリ1527に供給し、記憶させる。   The audio decoder 1524 decodes the input audio data using, for example, the MPEG system, and outputs the decoded audio data to the recording / playback unit 1533. The video decoder 1525 decodes the input video data using, for example, the MPEG system, and outputs the decoded video data to the display converter 1530. The recorder control unit 1526 supplies the input EPG data to the EPG data memory 1527 for storage.

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

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

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

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

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

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

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

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

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

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

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

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

以上のようなハードディスクレコーダ1500は、ビデオデコーダ1525、デコーダ1552、およびレコーダ制御部1526に内蔵されるデコーダとして画像復号装置151、401、501、または601を用いる。したがって、ビデオデコーダ1525、デコーダ1552、およびレコーダ制御部1526に内蔵されるデコーダは、画像復号装置151および401の場合と同様に、イントラ予測に先立ち、量子化パラメータや予測モードに応じてフィルタ係数を切り替えて、隣接画素のフィルタ処理を行う。あるいは、ビデオデコーダ1525、デコーダ1552、およびレコーダ制御部1526に内蔵されるデコーダは、画像復号装置501および601の場合と同様に、on/offフラグに基づき、イントラ予測に先立って行われる隣接画素のフィルタ処理をする、しないを制御する。これにより、符号化効率を向上することができる。   The hard disk recorder 1500 as described above uses the image decoding device 151, 401, 501, or 601 as a decoder incorporated in the video decoder 1525, the decoder 1552, and the recorder control unit 1526. Accordingly, the decoder incorporated in the video decoder 1525, the decoder 1552, and the recorder control unit 1526, as in the case of the image decoding devices 151 and 401, sets the filter coefficient according to the quantization parameter and the prediction mode prior to intra prediction. Switching is performed to filter adjacent pixels. Alternatively, the decoder incorporated in the video decoder 1525, the decoder 1552, and the recorder control unit 1526, as in the case of the image decoding devices 501 and 601, is based on the on / off flag, and the adjacent pixels that are performed prior to the intra prediction. Controls whether or not to perform filtering. Thereby, encoding efficiency can be improved.

したがって、ハードディスクレコーダ1500は、精度の高い予測画像を生成することができる。その結果として、ハードディスクレコーダ1500は、例えば、チューナを介して受信されたビデオデータの符号化データや、記録再生部1533のハードディスクから読み出されたビデオデータの符号化データや、ネットワークを介して取得したビデオデータの符号化データから、より高精細な復号画像を得て、モニタ1560に表示させることができる。   Therefore, the hard disk recorder 1500 can generate a predicted image with high accuracy. As a result, the hard disk recorder 1500 acquires the encoded data of the video data received via the tuner, the encoded data of the video data read from the hard disk of the recording / playback unit 1533, or the network, for example. From the encoded data of the video data, a higher-definition decoded image can be obtained and displayed on the monitor 1560.

また、ハードディスクレコーダ1500は、エンコーダ1551として画像符号化装置51、351、451、または551を用いる。したがって、エンコーダ1551は、画像符号化装置51および351の場合と同様に、イントラ予測に先立ち、量子化パラメータや予測モードに応じてフィルタ係数を設定して、隣接画素のフィルタ処理を行う。あるいは、エンコーダ1551は、画像符号化装置451および551の場合と同様に、イントラ予測に先立って行われる隣接画素のフィルタ処理をする、しないを制御する。これにより、符号化効率を向上することができる。   The hard disk recorder 1500 uses the image encoding device 51, 351, 451, or 551 as the encoder 1551. Therefore, the encoder 1551 sets the filter coefficient according to the quantization parameter and the prediction mode and performs the filtering process on adjacent pixels prior to the intra prediction, as in the case of the image encoding devices 51 and 351. Alternatively, the encoder 1551 controls whether or not to perform adjacent pixel filtering processing prior to intra prediction, as in the case of the image encoding devices 451 and 551. Thereby, encoding efficiency can be improved.

したがって、ハードディスクレコーダ1500は、例えば、ハードディスクに記録する符号化データの符号化効率を向上させることができる。その結果として、ハードディスクレコーダ1500は、ハードディスクの記憶領域をより効率よく使用することができる。   Therefore, the hard disk recorder 1500 can improve the encoding efficiency of the encoded data recorded on the hard disk, for example. As a result, the hard disk recorder 1500 can use the storage area of the hard disk more efficiently.

なお、以上においては、ビデオデータやオーディオデータをハードディスクに記録するハードディスクレコーダ1500について説明したが、もちろん、記録媒体はどのようなものであってもよい。例えばフラッシュメモリ、光ディスク、またはビデオテープ等、ハードディスク以外の記録媒体を適用するレコーダであっても、上述したハードディスクレコーダ1500の場合と同様に、画像符号化装置51、351、451、および551並びに画像復号装置151、401、501、および601を適用することができる。   In the above description, the hard disk recorder 1500 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 1500 described above, the image encoding devices 51, 351, 451, and 551 and the image Decoding devices 151, 401, 501, and 601 can be applied.

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

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

レンズブロック1611は、光(すなわち、被写体の映像)を、CCD/CMOS1612に入射させる。CCD/CMOS1612は、CCDまたはCMOSを用いたイメージセンサであり、受光した光の強度を電気信号に変換し、カメラ信号処理部1613に供給する。   The lens block 1611 causes light (that is, an image of the subject) to enter the CCD / CMOS 1612. The CCD / CMOS 1612 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 1613.

カメラ信号処理部1613は、CCD/CMOS1612から供給された電気信号を、Y,Cr,Cbの色差信号に変換し、画像信号処理部1614に供給する。画像信号処理部1614は、コントローラ1621の制御の下、カメラ信号処理部1613から供給された画像信号に対して所定の画像処理を施したり、その画像信号をエンコーダ1641で例えばMPEG方式により符号化したりする。画像信号処理部1614は、画像信号を符号化して生成した符号化データを、デコーダ1615に供給する。さらに、画像信号処理部1614は、オンスクリーンディスプレイ(OSD)1620において生成された表示用データを取得し、それをデコーダ1615に供給する。   The camera signal processing unit 1613 converts the electrical signal supplied from the CCD / CMOS 1612 into Y, Cr, and Cb color difference signals, and supplies them to the image signal processing unit 1614. The image signal processing unit 1614 performs predetermined image processing on the image signal supplied from the camera signal processing unit 1613 under the control of the controller 1621, and encodes the image signal by the encoder 1641 using, for example, the MPEG system. To do. The image signal processing unit 1614 supplies encoded data generated by encoding the image signal to the decoder 1615. Further, the image signal processing unit 1614 acquires display data generated in the on-screen display (OSD) 1620 and supplies it to the decoder 1615.

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

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

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

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

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

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

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

記録メディア1633は、例えば、磁気ディスク、光磁気ディスク、光ディスク、または半導体メモリ等の、読み書き可能な任意のリムーバブルメディアである。記録メディア1633は、もちろん、リムーバブルメディアとしての種類も任意であり、テープデバイスであってもよいし、ディスクであってもよいし、メモリカードであってもよい。もちろん、非接触ICカード等であっても良い。   The recording medium 1633 is any 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 1633 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.

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

外部インタフェース1619は、例えば、USB入出力端子などで構成され、画像の印刷を行う場合に、プリンタ1634と接続される。また、外部インタフェース1619には、必要に応じてドライブ1631が接続され、磁気ディスク、光ディスク、あるいは光磁気ディスクなどのリムーバブルメディア1632が適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じて、FLASH ROM1624にインストールされる。   The external interface 1619 is composed of, for example, a USB input / output terminal and is connected to the printer 1634 when printing an image. In addition, a drive 1631 is connected to the external interface 1619 as necessary, and a removable medium 1632 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 1624.

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

以上のようなカメラ1600は、デコーダ1615として画像復号装置151、401、501、または601を用いる。したがって、デコーダ1615は、画像復号装置151および401の場合と同様に、イントラ予測に先立ち、量子化パラメータや予測モードに応じてフィルタ係数を切り替えて、隣接画素のフィルタ処理を行う。あるいは、デコーダ1615は、画像復号装置501および601の場合と同様に、on/offフラグに基づき、イントラ予測に先立って行われる隣接画素のフィルタ処理をする、しないを制御する。これにより、符号化効率を向上することができる。   The camera 1600 as described above uses the image decoding device 151, 401, 501, or 601 as the decoder 1615. Therefore, as in the case of the image decoding devices 151 and 401, the decoder 1615 performs filter processing on adjacent pixels by switching filter coefficients according to the quantization parameter and the prediction mode prior to intra prediction. Alternatively, the decoder 1615 controls whether or not to perform adjacent pixel filtering processing prior to intra prediction based on the on / off flag, as in the case of the image decoding devices 501 and 601. Thereby, encoding efficiency can be improved.

したがって、カメラ1600は、精度の高い予測画像を生成することができる。その結果として、カメラ1600は、例えば、CCD/CMOS1612において生成された画像データや、DRAM1618または記録メディア1633から読み出されたビデオデータの符号化データや、ネットワークを介して取得したビデオデータの符号化データから、より高精細な復号画像を得て、LCD1616に表示させることができる。   Therefore, the camera 1600 can generate a predicted image with high accuracy. As a result, the camera 1600 encodes, for example, image data generated in the CCD / CMOS 1612, encoded data of video data read from the DRAM 1618 or the recording medium 1633, and encoded video data acquired via the network. A higher-resolution decoded image can be obtained from the data and displayed on the LCD 1616.

また、カメラ1600は、エンコーダ1641として画像符号化装置51、351、451、または551を用いる。したがって、エンコーダ1641は、画像符号化装置51および351の場合と同様に、イントラ予測に先立ち、量子化パラメータや予測モードに応じてフィルタ係数を設定して、隣接画素のフィルタ処理を行う。あるいは、エンコーダ1641は、画像符号化装置451および551の場合と同様に、イントラ予測に先立って行われる隣接画素のフィルタ処理をする、しないを制御する。これにより、符号化効率を向上することができる。   The camera 1600 uses the image encoding device 51, 351, 451, or 551 as the encoder 1641. Therefore, as in the case of the image encoding devices 51 and 351, the encoder 1641 sets filter coefficients according to the quantization parameter and the prediction mode and performs adjacent pixel filtering processing prior to intra prediction. Alternatively, the encoder 1641 controls whether or not to perform adjacent pixel filter processing prior to intra prediction, as in the case of the image encoding devices 451 and 551. Thereby, encoding efficiency can be improved.

したがって、カメラ1600は、例えば、ハードディスクに記録する符号化データの符号化効率を向上させることができる。その結果として、カメラ1600は、DRAM1618や記録メディア1633の記憶領域をより効率よく使用することができる。   Therefore, the camera 1600 can improve the encoding efficiency of the encoded data recorded on the hard disk, for example. As a result, the camera 1600 can use the storage area of the DRAM 1618 and the recording medium 1633 more efficiently.

なお、コントローラ1621が行う復号処理に画像復号装置151、401、501、または601の復号方法を適用するようにしてもよい。同様に、コントローラ1621が行う符号化処理に画像符号化装置51、351、451、または551の符号化方法を適用するようにしてもよい。   Note that the decoding method of the image decoding device 151, 401, 501, or 601 may be applied to the decoding process performed by the controller 1621. Similarly, the encoding method of the image encoding device 51, 351, 451, or 551 may be applied to the encoding process performed by the controller 1621.

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

もちろん、画像符号化装置51、351、451、または551および画像復号装置151、401、501、または601は、上述した装置以外の装置やシステムにも適用可能である。   Of course, the image encoding devices 51, 351, 451, or 551 and the image decoding devices 151, 401, 501, or 601 are also applicable to devices and systems other than those described above.

51 画像符号化装置, 66 可逆符号化部, 74 イントラ予測部, 75 隣接画素内挿フィルタ切替部, 81 隣接画素設定部, 82 予測画像生成部, 83 最適予測モード判定部, 91 予測モードバッファ, 92 量子化パラメータバッファ, 93 ローパスフィルタ設定部, 94 フィルタ係数メモリ, 111 隣接画素設定部, 112 予測画像生成部, 113 最適予測モード判定部, 121 予測モードバッファ, 122 最適フィルタ算出部, 93 ローパスフィルタ設定部, 151 画像復号装置, 162 可逆復号部, 171 イントラ予測部, 172 隣接画素内挿フィルタ切替部, 181 予測画像生成部, 182 隣接画素設定部, 191 予測モードバッファ, 192 量子化パラメータバッファ, 193 ローパスフィルタ設定部, 194 フィルタ係数メモリ, 202 ローパスフィルタ設定部, 251 学習装置, 261 隣接内挿フィルタ算出部, 271 フィルタ係数記憶部, 351 画像符号化装置, 361 2次予測部, 362 隣接画素内挿フィルタ切替部, 401 画像復号装置, 411 2次予測部, 412 隣接画素内挿フィルタ切替部, 451 画像符号化装置, 461 隣接画素内挿フィルタ制御部, 501 画像復号装置, 511 隣接画素内挿フィルタ制御部, 551 画像符号化装置, 561 隣接画素内挿フィルタ制御部, 601 画像復号装置, 611 隣接画素内挿フィルタ制御部   51 image encoding device, 66 lossless encoding unit, 74 intra prediction unit, 75 adjacent pixel interpolation filter switching unit, 81 adjacent pixel setting unit, 82 predicted image generation unit, 83 optimal prediction mode determination unit, 91 prediction mode buffer, 92 quantization parameter buffer, 93 low-pass filter setting unit, 94 filter coefficient memory, 111 adjacent pixel setting unit, 112 prediction image generation unit, 113 optimal prediction mode determination unit, 121 prediction mode buffer, 122 optimal filter calculation unit, 93 low-pass filter Setting unit, 151 image decoding device, 162 lossless decoding unit, 171 intra prediction unit, 172 adjacent pixel interpolation filter switching unit, 181 prediction image generation unit, 182 adjacent pixel setting unit, 191 prediction mode buffer, 192 quantization parameter bar Buffer, 193 low-pass filter setting unit, 194 filter coefficient memory, 202 low-pass filter setting unit, 251 learning device, 261 adjacent interpolation filter calculation unit, 271 filter coefficient storage unit, 351 image encoding device, 361 secondary prediction unit, 362 Adjacent pixel interpolation filter switching unit, 401 image decoding device, 411 secondary prediction unit, 412 Adjacent pixel interpolation filter switching unit, 451 image encoding device, 461 Adjacent pixel interpolation filter control unit, 501 Image decoding device, 511 Adjacent Pixel interpolation filter control unit, 551 Image encoding device, 561 Adjacent pixel interpolation filter control unit, 601 Image decoding device, 611 Adjacent pixel interpolation filter control unit

Claims (12)

ビットストリームを復号処理して得られる画像を対象として、復号処理の対象となる対象ブロックの画素に対してイントラ予測を行う際のブロックサイズに応じて設定されたフィルタ係数を用いて、前記対象ブロックの画素に対してイントラ予測を行う際に参照する隣接画素にフィルタ処理を行うフィルタ部と、
前記対象ブロックの画素に対してイントラ予測を行う際の予測モードに対して、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを制御する制御情報を用いて、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを選択するように、前記フィルタ処理を制御する制御部と、
前記隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行い、予測画像を生成するイントラ予測部
を備える画像処理装置。
Targeting an image obtained by decoding a bitstream, the target block using a filter coefficient set according to a block size when performing intra prediction on pixels of the target block to be decoded A filter unit that performs filter processing on adjacent pixels that are referred to when performing intra prediction on the pixels of
For the prediction mode when performing intra prediction on the pixels of the target block, using control information for controlling whether to perform filter processing on the adjacent pixels or not to perform filter processing on the adjacent pixels, A control unit that controls the filtering process so as to select whether to perform the filtering process on the adjacent pixels or not to perform the filtering process on the adjacent pixels ;
Using said neighboring pixels, performs intra prediction for pixels of the target block, the image processing apparatus and an intra-prediction unit that generates a predicted image.
前記フィルタ部は、前記隣接画素にフィルタ処理を行うことを選択した場合に、3タップのフィルタ係数を用いたフィルタ演算を用いて、前記隣接画素にフィルタ処理を行う
請求項1に記載の画像処理装置。
The image processing according to claim 1 , wherein the filter unit performs a filter process on the adjacent pixel using a filter operation using a 3-tap filter coefficient when the filter unit selects to perform the filter process on the adjacent pixel. apparatus.
前記イントラ予測部により生成された予測画像を用いて、前記ビットストリームを復号処理する復号部
をさらに備える請求項1に記載の画像処理装置。
A decoding unit that decodes the bitstream using the prediction image generated by the intra prediction unit
The image processing apparatus according to claim 1, further comprising:
前記ビットストリームは、階層構造を有する単位で符号化されており、
前記復号部は、前記ビットストリームを、階層構造を有する単位で復号処理する
請求項3に記載の画像処理装置。
The bitstream is encoded in a unit having a hierarchical structure,
The decoding unit decodes the bitstream in units having a hierarchical structure.
The image processing apparatus according to claim 3 .
前記イントラ予測部は、ブロックサイズを4×4画素、8×8画素、16×16画素、32×32画素として、イントラ予測を行う
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the intra prediction unit performs intra prediction with a block size of 4 × 4 pixels, 8 × 8 pixels, 16 × 16 pixels, and 32 × 32 pixels .
画像処理装置が、
ビットストリームを復号処理して得られる画像を対象として、復号処理の対象となる対象ブロックの画素に対してイントラ予測を行う際のブロックサイズに応じて設定されたフィルタ係数を用いて、前記対象ブロックの画素に対してイントラ予測を行う際に参照する隣接画素にフィルタ処理を行い
前記対象ブロックの画素に対してイントラ予測を行う際の予測モードに対して、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを制御する制御情報を用いて、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを選択するように、前記フィルタ処理を制御し、
前記隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行い、予測画像を生成する
画像処理方法。
The image processing device
Targeting an image obtained by decoding a bitstream, the target block using a filter coefficient set according to a block size when performing intra prediction on pixels of the target block to be decoded Filter the adjacent pixels that are referenced when performing intra prediction on
For the prediction mode when performing intra prediction on the pixels of the target block, using control information for controlling whether to perform filter processing on the adjacent pixels or not to perform filter processing on the adjacent pixels, Controlling the filtering process to select whether to perform the filtering process on the adjacent pixels or not to perform the filtering process on the adjacent pixels;
An image processing method for generating a predicted image by performing intra prediction on the pixels of the target block using the adjacent pixels.
前記隣接画素にフィルタ処理を行うことを選択した場合に、3タップのフィルタ係数を用いたフィルタ演算を用いて、前記隣接画素にフィルタ処理を行う
請求項6に記載の画像処理方法。
When filtering is performed on the neighboring pixel, filtering is performed on the neighboring pixel using a filter operation using a 3-tap filter coefficient.
The image processing method according to claim 6 .
生成された予測画像を用いて、前記ビットストリームを復号処理する
請求項6に記載の画像処理方法。
The bit stream is decoded using the generated prediction image
The image processing method according to claim 6 .
前記ビットストリームは、階層構造を有する単位で符号化されており、
前記ビットストリームを、階層構造を有する単位で復号処理する
請求項8に記載の画像処理方法。
The bitstream is encoded in a unit having a hierarchical structure,
Decode the bitstream in units having a hierarchical structure
The image processing method according to claim 8 .
ブロックサイズを4×4画素、8×8画素、16×16画素、32×32画素として、イントラ予測を行う
請求項6に記載の画像処理方法。
Intra prediction is performed with a block size of 4 × 4 pixels, 8 × 8 pixels, 16 × 16 pixels, and 32 × 32 pixels.
The image processing method according to claim 6 .
ビットストリームを復号処理して得られる画像を対象として、復号処理の対象となる対象ブロックの画素に対してイントラ予測を行う際のブロックサイズに応じて設定されたフィルタ係数を用いて、前記対象ブロックの画素に対してイントラ予測を行う際に参照する隣接画素にフィルタ処理を行うフィルタ部と、Targeting an image obtained by decoding a bitstream, the target block using a filter coefficient set according to a block size when performing intra prediction on pixels of the target block to be decoded A filter unit that performs filter processing on adjacent pixels that are referred to when performing intra prediction on the pixels of
前記対象ブロックの画素に対してイントラ予測を行う際の予測モードに対して、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを制御する制御情報を用いて、前記隣接画素にフィルタ処理を行うか、前記隣接画素にフィルタ処理を行わないかを選択するように、前記フィルタ処理を制御する制御部と、For the prediction mode when performing intra prediction on the pixels of the target block, using control information for controlling whether to perform filter processing on the adjacent pixels or not to perform filter processing on the adjacent pixels, A control unit that controls the filtering process so as to select whether to perform the filtering process on the adjacent pixels or not to perform the filtering process on the adjacent pixels;
前記隣接画素を用いて、前記対象ブロックの画素に対してイントラ予測を行い、予測画像を生成するイントラ予測部と  An intra prediction unit that performs intra prediction on the pixels of the target block using the adjacent pixels and generates a predicted image;
して、コンピュータを機能させるプログラム。Program that causes the computer to function.
請求項11のプログラムが記録されている記録媒体。A recording medium on which the program according to claim 11 is recorded.
JP2014153962A 2009-07-01 2014-07-29 Image processing apparatus and method, program, and recording medium Active JP5854296B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014153962A JP5854296B2 (en) 2009-07-01 2014-07-29 Image processing apparatus and method, program, and recording medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2009156563 2009-07-01
JP2009156563 2009-07-01
JP2014153962A JP5854296B2 (en) 2009-07-01 2014-07-29 Image processing apparatus and method, program, and recording medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2009244753A Division JP5597968B2 (en) 2009-07-01 2009-10-23 Image processing apparatus and method, program, and recording medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2015229645A Division JP6048774B2 (en) 2009-07-01 2015-11-25 Image processing apparatus and method

Publications (2)

Publication Number Publication Date
JP2014225910A JP2014225910A (en) 2014-12-04
JP5854296B2 true JP5854296B2 (en) 2016-02-09

Family

ID=47676305

Family Applications (5)

Application Number Title Priority Date Filing Date
JP2012194913A Active JP5429582B2 (en) 2009-07-01 2012-09-05 Image processing apparatus and method
JP2014003301A Pending JP2014103687A (en) 2009-07-01 2014-01-10 Image processing device and method, and recording medium
JP2014003300A Active JP5733587B2 (en) 2009-07-01 2014-01-10 Image processing apparatus and method, program, and recording medium
JP2014153962A Active JP5854296B2 (en) 2009-07-01 2014-07-29 Image processing apparatus and method, program, and recording medium
JP2015229645A Active JP6048774B2 (en) 2009-07-01 2015-11-25 Image processing apparatus and method

Family Applications Before (3)

Application Number Title Priority Date Filing Date
JP2012194913A Active JP5429582B2 (en) 2009-07-01 2012-09-05 Image processing apparatus and method
JP2014003301A Pending JP2014103687A (en) 2009-07-01 2014-01-10 Image processing device and method, and recording medium
JP2014003300A Active JP5733587B2 (en) 2009-07-01 2014-01-10 Image processing apparatus and method, program, and recording medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
JP2015229645A Active JP6048774B2 (en) 2009-07-01 2015-11-25 Image processing apparatus and method

Country Status (1)

Country Link
JP (5) JP5429582B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6065613B2 (en) * 2013-01-29 2017-01-25 富士通株式会社 Video encoding device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3165296B2 (en) * 1992-12-25 2001-05-14 三菱電機株式会社 Inter-frame coding processing method, inter-frame coding processing method, and coding control method
JP2007060689A (en) * 2001-11-30 2007-03-08 Ntt Docomo Inc Moving picture coding apparatus, moving picture decoding apparatus, moving picture coding method, moving picture decoding method, program, and compute-readable recording medium containing the program
DE10158658A1 (en) * 2001-11-30 2003-06-12 Bosch Gmbh Robert Method for directional prediction of an image block
US7289562B2 (en) * 2003-08-01 2007-10-30 Polycom, Inc. Adaptive filter to improve H-264 video quality
JP2007150913A (en) * 2005-11-29 2007-06-14 Matsushita Electric Ind Co Ltd Image encoding device
US8189934B2 (en) * 2006-03-27 2012-05-29 Panasonic Corporation Image coding apparatus and image decoding apparatus
US8942505B2 (en) * 2007-01-09 2015-01-27 Telefonaktiebolaget L M Ericsson (Publ) Adaptive filter representation
KR101591825B1 (en) * 2008-03-27 2016-02-18 엘지전자 주식회사 A method and an apparatus for encoding or decoding of a video signal

Also Published As

Publication number Publication date
JP5733587B2 (en) 2015-06-10
JP2014103687A (en) 2014-06-05
JP2014225910A (en) 2014-12-04
JP2013009418A (en) 2013-01-10
JP2014103686A (en) 2014-06-05
JP2016042736A (en) 2016-03-31
JP5429582B2 (en) 2014-02-26
JP6048774B2 (en) 2016-12-21

Similar Documents

Publication Publication Date Title
JP5597968B2 (en) Image processing apparatus and method, program, and recording medium
WO2011018965A1 (en) Image processing device and method
WO2010035731A1 (en) Image processing apparatus and image processing method
WO2010095559A1 (en) Image processing device and method
WO2010035734A1 (en) Image processing device and method
JPWO2010095560A1 (en) Image processing apparatus and method
WO2010035732A1 (en) Image processing apparatus and image processing method
WO2010101063A1 (en) Image processing device and method
JP6048774B2 (en) Image processing apparatus and method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150721

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150723

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150907

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20151112

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20151125

R151 Written notification of patent or utility model registration

Ref document number: 5854296

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350