JP2015177342A - Image coding device, image decoding device, image coding method, and image decoding method - Google Patents

Image coding device, image decoding device, image coding method, and image decoding method Download PDF

Info

Publication number
JP2015177342A
JP2015177342A JP2014052210A JP2014052210A JP2015177342A JP 2015177342 A JP2015177342 A JP 2015177342A JP 2014052210 A JP2014052210 A JP 2014052210A JP 2014052210 A JP2014052210 A JP 2014052210A JP 2015177342 A JP2015177342 A JP 2015177342A
Authority
JP
Japan
Prior art keywords
block
unit
image
prediction
histogram
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014052210A
Other languages
Japanese (ja)
Other versions
JP6338408B2 (en
Inventor
一之 宮澤
Kazuyuki Miyazawa
一之 宮澤
彰 峯澤
Akira Minesawa
彰 峯澤
関口 俊一
Shunichi Sekiguchi
俊一 関口
村上 篤道
Hiromichi Murakami
篤道 村上
守屋 芳美
Yoshimi Moriya
芳美 守屋
亮史 服部
Akifumi Hattori
亮史 服部
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2014052210A priority Critical patent/JP6338408B2/en
Publication of JP2015177342A publication Critical patent/JP2015177342A/en
Application granted granted Critical
Publication of JP6338408B2 publication Critical patent/JP6338408B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To sufficiently reduce a coding distortion occurring in a local decoded image of a screen content where a histogram is sparse.SOLUTION: An image coding device comprises: a histogram calculator 21 which calculates the histogram of a pixel value in a local decoded image obtained from compression data of a coding target image; and a pixel value correction unit 22 which identifies, from the histogram calculated by the histogram calculator 21, a pixel with noise associated with the coding distortion superimposed thereon, and corrects the pixel value of the pixel with the noise superimposed thereon.

Description

この発明は、画像を高効率で符号化を行う画像符号化装置及び画像符号化方法と、高効率で符号化されている画像を復号する画像復号装置及び画像復号方法に関するものである。   The present invention relates to an image encoding device and an image encoding method for encoding an image with high efficiency, and an image decoding device and an image decoding method for decoding an image encoded with high efficiency.

動画像を伝送・蓄積する際には、MPEG(Moving Picture Expert Groups)やITU−T H.26xなどの国際標準動画像符号化方式を用いて情報量を圧縮することが一般的に行われる。特に、2013年1月に標準化を完了したHEVC(High Efficiency Video Coding)は、4KやSHV(Super Hi−Vision)といったUHDTV(Ultra High Definition Television)による放送・通信サービスや、モバイル回線でのHD(High Definition)映像伝送の実現に向けて必要不可欠な技術である。   When transmitting and accumulating moving images, MPEG (Moving Picture Expert Groups) or ITU-T H.264. It is common practice to compress the amount of information using an international standard video coding scheme such as 26x. In particular, HEVC (High Efficiency Video Coding), which has been standardized in January 2013, is a broadcasting / communication service (HD or HD) using UHDTV (Ultra High Definition Television) such as 4K and SHV (Super Hi-Vision), and mobile lines (HD). High Definition) This technology is indispensable for realizing video transmission.

原画像である符号化対象画像の動画像符号化が行われた場合、符号化対象画像の圧縮データを復号することで得られる復号画像には、本来原画像に存在しないノイズ(符号化歪みに伴うノイズ)が発生することがある。
このノイズの存在は、復号画像の画質を低下させるだけでなく、画像符号化装置が符号化を実施する際に用いる参照画像の画質も低下させる。参照画像の画質の低下は、符号化効率の低下を招くため、符号化歪みに伴うノイズは可能な限り取り除く必要がある。
When moving image coding of an encoding target image that is an original image is performed, a decoded image obtained by decoding compressed data of the encoding target image includes noise that does not originally exist in the original image (encoding distortion). Accompanying noise) may occur.
The presence of this noise not only lowers the image quality of the decoded image, but also reduces the image quality of the reference image used when the image coding apparatus performs coding. A reduction in the image quality of the reference image causes a reduction in encoding efficiency, and therefore noise accompanying encoding distortion must be removed as much as possible.

符号化歪みに伴うノイズを低減するための手法として、復号画像に対してフィルタを適用するループフィルタがある。
例えば、以下の特許文献1に開示されている画像符号化装置では、ループフィルタの一つとして、画素適応オフセットと呼ばれるフィルタを利用している。これは、予め定められたルールに従って復号画像の各画素を複数のクラスに分類し、同じクラスに属する画素毎に、一定のオフセットを画素値に対して加算するという手法である。オフセットの値は、画像符号化装置で決定されて画像復号装置に伝送される。
例えば、原画像と復号画像の画素値の差分平均値をオフセットとすれば、画素適応オフセットの適用により復号画像が原画像に近付き、符号化歪みに伴うノイズを低減することができる。
As a technique for reducing noise accompanying coding distortion, there is a loop filter that applies a filter to a decoded image.
For example, the image encoding device disclosed in Patent Document 1 below uses a filter called a pixel adaptive offset as one of the loop filters. This is a method of classifying each pixel of a decoded image into a plurality of classes according to a predetermined rule, and adding a certain offset to the pixel value for each pixel belonging to the same class. The offset value is determined by the image encoding device and transmitted to the image decoding device.
For example, if the difference average value of the pixel values of the original image and the decoded image is used as an offset, the decoded image approaches the original image by applying a pixel adaptive offset, and noise associated with encoding distortion can be reduced.

画素適応オフセットにおける画素の分類方法には、大きく分けてバンドオフセットとエッジオフセットの2種類がある(例えば、非特許文献1を参照)。
バンドオフセットは、画素値の最小値から最大値までを等間隔に分割し、対象画素の画素値が、どの領域に属するかで画素を分類する。一方、エッジオフセットは、対象画素の画素値と、その近傍画素の画素値を比較して、対象画素がエッジであるか否かを判断し、対象画素がエッジである場合には、そのエッジの方向に応じて画素の分類を行う。バンドオフセットとエッジオフセットのどちらを用いるかは画像符号化装置が決定する。
The pixel classification method in the pixel adaptive offset is roughly divided into two types, a band offset and an edge offset (see, for example, Non-Patent Document 1).
The band offset divides the pixel value from the minimum value to the maximum value at equal intervals, and classifies the pixel according to which region the pixel value of the target pixel belongs. On the other hand, the edge offset compares the pixel value of the target pixel with the pixel values of its neighboring pixels to determine whether the target pixel is an edge, and when the target pixel is an edge, The pixels are classified according to the direction. The image encoding apparatus determines whether to use the band offset or the edge offset.

ところで、現在、スマートフォンやタブレットの普及に伴ってニーズが拡大している画面共有や、FA・ビル用ディスプレイ、サイネージ、メディアアーカイブなどにおいて、PC・制御端末画面等を動画像として記録するニーズが高まっている。これらは、通常のカメラにより撮影された動画像と区別するため、スクリーンコンテンツと呼ばれている。
スクリーンコンテンツは、カメラにより撮影された動画像とは異なるいくつかの性質を有している。
By the way, there is a growing need to record PC / control terminal screens as moving images for screen sharing, FA / building displays, signage, media archives, etc. ing. These are called screen contents in order to distinguish them from moving images taken by a normal camera.
The screen content has several properties that are different from those of a moving image shot by a camera.

図42はスクリーンコンテンツの特徴例の説明図である。
カメラにより撮影された画像における画素値のヒストグラム(画素値ごとの出現頻度)を算出すると、一般的には、図42(a)に示すように密なヒストグラムになる。
これに対して、スクリーンコンテンツにおける画素値のヒストグラムを算出すると、図42(b)に示すように、極めて限られた画素値しか出現しておらず、非常に疎なヒストグラムとなる。
FIG. 42 is an explanatory diagram of a characteristic example of screen content.
When a pixel value histogram (appearance frequency for each pixel value) in an image photographed by a camera is calculated, a dense histogram is generally obtained as shown in FIG.
On the other hand, when a histogram of pixel values in the screen content is calculated, only a very limited pixel value appears as shown in FIG. 42B, resulting in a very sparse histogram.

このような特性を有するスクリーンコンテンツを符号化すると、前述の符号化歪みによってヒストグラムに変化が生じる。
図43はスクリーンコンテンツにおける符号化前後のヒストグラムの変化を示す説明図である。
符号化前のスクリーンコンテンツのヒストグラムでは、一本の鋭いピークのある箇所の周辺にはピークが存在していないが、そのスクリーンコンテンツを符号化してから復号した場合、符号化歪みが生じることで、その復号したスクリーンコンテンツのヒストグラムでは、一本の鋭いピークのある箇所の周辺には複数のピーク(符号化歪みに伴うノイズ)が存在している。
符号化歪みに伴うノイズは、復号画像の画質を低下させる原因となるため、前述のループフィルタなどによって取り除く必要がある。
When screen content having such characteristics is encoded, a change occurs in the histogram due to the encoding distortion described above.
FIG. 43 is an explanatory diagram showing changes in the histogram before and after encoding in the screen content.
In the histogram of the screen content before encoding, there is no peak around the point where there is one sharp peak, but when the screen content is encoded and then decoded, coding distortion occurs, In the histogram of the decoded screen content, there are a plurality of peaks (noise due to encoding distortion) around a portion with a single sharp peak.
Noise due to coding distortion causes a reduction in the image quality of the decoded image, and thus needs to be removed by the loop filter described above.

特開2012−5113号公報(段落番号[0005])JP2012-5113A (paragraph number [0005])

H.265勧告書、p. 158-160H.265 Recommendation, p. 158-160

従来の画像符号化装置は以上のように構成されているので、符号化対象画像がカメラにより撮影された画像であるように、画素値のヒストグラムが密になる画像であれば、画素適応オフセットなどのループフィルタを適用することで、符号化歪みに伴うノイズを低減することができる。しかし、ヒストグラムが疎になるスクリーンコンテンツの局所復号画像に対して、画素適応オフセットなどのループフィルタを適用しても、符号化歪みに伴うノイズを十分に低減することができない課題があった。   Since the conventional image coding apparatus is configured as described above, if the image to be coded is an image taken by a camera, if the pixel value histogram is dense, pixel adaptive offset, etc. By applying this loop filter, it is possible to reduce noise accompanying coding distortion. However, even when a loop filter such as a pixel adaptive offset is applied to a locally decoded image of screen content having a sparse histogram, there is a problem that noise accompanying coding distortion cannot be sufficiently reduced.

この発明は上記のような課題を解決するためになされたもので、ヒストグラムが疎になるスクリーンコンテンツの局所復号画像に生じる符号化歪みに伴うノイズを十分に低減することができる画像符号化装置及び画像符号化方法を得ることを目的とする。
また、この発明は、ヒストグラムが疎になるスクリーンコンテンツの復号画像に生じる符号化歪みに伴うノイズを十分に低減することができる画像復号装置及び画像復号方法を得ることを目的とする。
The present invention has been made to solve the above-described problems, and an image encoding apparatus capable of sufficiently reducing noise accompanying encoding distortion generated in a locally decoded image of a screen content having a sparse histogram. The object is to obtain an image coding method.
Another object of the present invention is to provide an image decoding apparatus and an image decoding method capable of sufficiently reducing noise accompanying encoding distortion occurring in a decoded image of screen content having a sparse histogram.

この発明に係る画像符号化装置は、符号化対象画像の圧縮データから得られる局所復号画像における画素値のヒストグラムを算出するヒストグラム算出手段と、ヒストグラム算出手段により算出されたヒストグラムから符号化歪みに伴うノイズが重畳している画素を特定して、そのノイズが重畳している画素の画素値を補正する画素値補正手段とを備えるようにしたものである。   The image coding apparatus according to the present invention includes a histogram calculation unit that calculates a histogram of pixel values in a locally decoded image obtained from compressed data of an encoding target image, and encoding distortion from the histogram calculated by the histogram calculation unit. A pixel value correcting means for specifying a pixel on which noise is superimposed and correcting a pixel value of the pixel on which the noise is superimposed is provided.

この発明によれば、符号化対象画像の圧縮データから得られる局所復号画像における画素値のヒストグラムを算出するヒストグラム算出手段と、ヒストグラム算出手段により算出されたヒストグラムから符号化歪みに伴うノイズが重畳している画素を特定して、そのノイズが重畳している画素の画素値を補正する画素値補正手段とを備えるように構成したので、ヒストグラムが疎になるスクリーンコンテンツの局所復号画像に生じる符号化歪みに伴うノイズを十分に低減することができる効果がある。   According to this invention, the histogram calculation means for calculating the histogram of the pixel values in the locally decoded image obtained from the compressed data of the encoding target image, and the noise accompanying the encoding distortion are superimposed from the histogram calculated by the histogram calculation means. And a pixel value correction unit that corrects the pixel value of the pixel on which the noise is superimposed, so that the encoding that occurs in the locally decoded image of the screen content with a sparse histogram There is an effect that noise accompanying distortion can be sufficiently reduced.

この発明の実施の形態1による画像符号化装置を示す構成図である。It is a block diagram which shows the image coding apparatus by Embodiment 1 of this invention. YUV4:2:0フォーマットの信号における輝度信号及び色差信号の圧縮処理を実施する際の変換ブロックサイズを示す説明図である。It is explanatory drawing which shows the conversion block size at the time of implementing the compression process of the luminance signal and color-difference signal in the signal of YUV4: 2: 0 format. YUV4:2:2フォーマットの信号における輝度信号及び色差信号の圧縮処理を実施する際の変換ブロックサイズを示す説明図である。It is explanatory drawing which shows the conversion block size at the time of implementing the compression process of the luminance signal and color difference signal in the signal of YUV4: 2: 2 format. YUV4:4:4フォーマットの信号における輝度信号及び色差信号の圧縮処理を実施する際の変換ブロックサイズを示す説明図である。It is explanatory drawing which shows the conversion block size at the time of implementing the compression process of the luminance signal and color difference signal in the signal of YUV4: 4: 4 format. YUV4:2:0フォーマットの信号において輝度信号と色差信号で同一の方向性予測を用いた場合を示す説明図である。It is explanatory drawing which shows the case where the same directionality prediction is used with a luminance signal and a color difference signal in the signal of YUV4: 2: 0 format. YUV4:2:2フォーマットの信号において輝度信号と色差信号で同一の方向性予測を用いた場合を示す説明図である。It is explanatory drawing which shows the case where the same directionality prediction is used with a luminance signal and a color difference signal in the signal of YUV4: 2: 2 format. YUV4:4:4フォーマットとYUV4:2:2フォーマットの関係を示す説明図である。It is explanatory drawing which shows the relationship between YUV4: 4: 4 format and YUV4: 2: 2 format. YUV4:4:4フォーマットの信号において輝度信号と色差信号で同一の方向性予測を用いることと等価となるYUV4:2:2フォーマットでの方向性予測の例を示す説明図である。It is explanatory drawing which shows the example of the directionality prediction in YUV4: 2: 2 format equivalent to using the same directionality prediction with a luminance signal and a color difference signal in the signal of YUV4: 4: 4 format. YUV4:2:2フォーマットの信号での方向性予測の予測方向ベクトルを示す説明図である。It is explanatory drawing which shows the prediction direction vector of directionality prediction with the signal of YUV4: 2: 2 format. 方向性予測と角度の関係を示す説明図である。It is explanatory drawing which shows the relationship between directionality prediction and an angle. 4×4DCTの量子化マトリクスの一例を示す説明図である。It is explanatory drawing which shows an example of the quantization matrix of 4x4 DCT. 複数のフィルタ処理を用いる場合のループフィルタ部13の構成例を示す説明図である。It is explanatory drawing which shows the structural example of the loop filter part 13 in the case of using a several filter process. ヒストグラム補正処理を実施するループフィルタ部13内の処理部を示す構成図である。It is a block diagram which shows the process part in the loop filter part 13 which implements a histogram correction process. 補正前後の画素値のヒストグラムを示す説明図である。It is explanatory drawing which shows the histogram of the pixel value before and behind correction | amendment. 符号化ビットストリームの一例を示す説明図である。It is explanatory drawing which shows an example of an encoding bit stream. この発明の実施の形態1による画像符号化装置の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the image coding apparatus by Embodiment 1 of this invention. この発明の実施の形態1による画像復号装置を示す構成図である。It is a block diagram which shows the image decoding apparatus by Embodiment 1 of this invention. 複数のフィルタ処理を用いる場合のループフィルタ部39の構成例を示す説明図である。It is explanatory drawing which shows the structural example of the loop filter part 39 in the case of using a several filter process. ヒストグラム補正処理を実施するループフィルタ部39内の処理部を示す構成図である。It is a block diagram which shows the process part in the loop filter part 39 which implements a histogram correction process. この発明の実施の形態1による画像復号装置の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the image decoding apparatus by Embodiment 1 of this invention. 最大符号化ブロックが階層的に複数の符号化ブロックに分割される例を示す説明図である。It is explanatory drawing which shows the example by which the largest encoding block is divided | segmented into a some encoding block hierarchically. (a)は分割後の符号化ブロック及び予測ブロックの分布を示し、(b)は階層分割によって符号化モードm(B)が割り当てられる状況を示す説明図である。(A) shows the distribution of the encoding block and prediction block after a division | segmentation, (b) is explanatory drawing which shows the condition where encoding mode m ( Bn ) is allocated by hierarchy division | segmentation. 画素適応オフセット処理のクラス分類手法のインデックスを示す説明図である。It is explanatory drawing which shows the index of the class classification method of a pixel adaptive offset process. この発明の実施の形態1による画像符号化装置におけるヒストグラム補正処理の内容を示すフローチャートである。It is a flowchart which shows the content of the histogram correction process in the image coding apparatus by Embodiment 1 of this invention. この発明の実施の形態1による画像符号化装置におけるヒストグラム補正処理の内容を示すフローチャートである。It is a flowchart which shows the content of the histogram correction process in the image coding apparatus by Embodiment 1 of this invention. 16×16画素のサイズの直交変換における変換係数の符号化順を示す説明図である。It is explanatory drawing which shows the encoding order of the conversion factor in the orthogonal transformation of the size of 16x16 pixels. 16×16画素のサイズの直交変換における変換係数の分布の一例を示す説明図である。It is explanatory drawing which shows an example of distribution of the transformation coefficient in the orthogonal transformation of the size of 16x16 pixels. 4×4画素と8×8画素のサイズの直交変換における変換係数の符号化順の一例を示す説明図である。It is explanatory drawing which shows an example of the encoding order of the transform coefficient in the orthogonal transformation of the size of 4x4 pixel and 8x8 pixel. 符号化ブロックB内の各予測ブロックP が選択可能なイントラ予測モードの一例を示す説明図である。Each prediction block P i n the coded block B n is an explanatory diagram showing an example of a selectable intra prediction modes. =m =4の場合の予測画像生成ブロック内の画素の予測値を生成する際に用いる画素の一例を示す説明図である。It is explanatory drawing which shows an example of the pixel used when producing | generating the predicted value of the pixel in the predicted image generation block in the case of l i n = m i n = 4. 平均値予測時のフィルタ処理におけるフィルタの切り替え領域を示す説明図である。It is explanatory drawing which shows the switching area | region of the filter in the filter process at the time of average value prediction. 平均値予測時のフィルタ処理の参照画素配置を示す説明図である。It is explanatory drawing which shows the reference pixel arrangement | positioning of the filter process at the time of average value prediction. 予測画像生成ブロック内の左上画素を原点とする相対座標を示す説明図である。It is explanatory drawing which shows the relative coordinate which makes the upper left pixel in a prediction image generation block the origin. 色差信号のイントラ予測パラメータ(インデックス値)と色差イントラ予測モードの対応例を示す説明図である。It is explanatory drawing which shows the example of a response | compatibility with the intra prediction parameter (index value) of a color difference signal, and color difference intra prediction mode. YUV4:2:2フォーマットの信号において輝度信号のイントラ予測モードインデックスと色差信号のイントラ予測モードインデックスの関係を示す説明図である。It is explanatory drawing which shows the relationship between the intra prediction mode index of a luminance signal, and the intra prediction mode index of a color difference signal in the signal of YUV4: 2: 2 format. イントラ予測モードインデックスとtanθの関係を示す説明図である。It is explanatory drawing which shows the relationship between an intra prediction mode index and tan (theta). 色差信号のイントラ予測パラメータと色差イントラ予測モードの対応例を示す説明図である。It is explanatory drawing which shows the example of a response | compatibility of the intra prediction parameter of a color difference signal, and a color difference intra prediction mode. この発明の実施の形態1による画像復号装置におけるヒストグラム補正処理の内容を示すフローチャートである。It is a flowchart which shows the content of the histogram correction process in the image decoding apparatus by Embodiment 1 of this invention. 複数のフィルタ処理を用いる場合のループフィルタ部13の構成例を示す説明図である。It is explanatory drawing which shows the structural example of the loop filter part 13 in the case of using a several filter process. ヒストグラム補正処理を実施するループフィルタ部39内の処理部を示す構成図である。It is a block diagram which shows the process part in the loop filter part 39 which implements a histogram correction process. インデックスとオフセット適用手法の対応例を示す説明図である。It is explanatory drawing which shows the example of a response | compatibility of an index and an offset application method. 図40における複数のオフセット適用手法の中から、使用するオフセット適用手法を選択する手順を示すフローチャートである。It is a flowchart which shows the procedure which selects the offset application method to be used from the some offset application methods in FIG. スクリーンコンテンツの特徴例の説明図である。It is explanatory drawing of the example of a characteristic of a screen content. スクリーンコンテンツにおける符号化前後のヒストグラムの変化を示す説明図である。It is explanatory drawing which shows the change of the histogram before and behind encoding in a screen content. 画素適応オフセット処理において、最大符号化ブロックであるCoding Tree Unit(CTU)の単位で常に分割する場合を例として、画素適応オフセット処理におけるパラメータを符号化してビットストリームに挿入する位置を示す説明図である。In the pixel adaptive offset process, it is explanatory drawing which shows the position which encodes the parameter in a pixel adaptive offset process, and inserts it in a bit stream, taking as an example the case where it always divides | segments in the unit of Coding Tree Unit (CTU) which is a largest encoding block. is there. 可変長符号化部15においてどのように画素適応オフセット処理パラメータを符号化してビットストリームに加えるかを示したフローチャートである。It is the flowchart which showed how the pixel adaptive offset process parameter was encoded in the variable length encoding part 15, and it added to a bit stream. 可変長復号部31による画素値適応オフセット処理パラメータの復号手順を示すフローチャートである。12 is a flowchart illustrating a decoding procedure of pixel value adaptive offset processing parameters by the variable length decoding unit 31. 実施の形態3におけるループフィルタ部13の動作を示すフローチャートである。10 is a flowchart showing the operation of the loop filter unit 13 in the third embodiment. 実施の形態3におけるループフィルタ部13の動作を示すフローチャートである。10 is a flowchart showing the operation of the loop filter unit 13 in the third embodiment. ヒストグラム補正処理によるブロック分割を示す説明図である。It is explanatory drawing which shows the block division by a histogram correction process. パラメータの流用方法を示す説明図である。It is explanatory drawing which shows the diversion method of a parameter. パラメータの流用方法を示す説明図である。It is explanatory drawing which shows the diversion method of a parameter. パラメータ符号化方法のインデックス表を示す説明図である。It is explanatory drawing which shows the index table of the parameter encoding method. 可変長符号化部15の動作を表すフローチャートである。3 is a flowchart showing the operation of the variable length coding unit 15. ヒストグラム補正処理に関する可変長復号部31の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the variable length decoding part 31 regarding a histogram correction process. パラメータ符号化方法のインデックス表を示す説明図である。It is explanatory drawing which shows the index table of the parameter encoding method. 実施の形態3を実施の形態2と組み合わせた場合の可変長符号化部15のオフセット処理に係る動作を示すフローチャートである。10 is a flowchart illustrating an operation related to offset processing of the variable length coding unit 15 when the third embodiment is combined with the second embodiment. 実施の形態3を実施の形態2と組み合わせた場合の可変長復号部31のオフセット処理に係る動作を示すフローチャートである。12 is a flowchart illustrating an operation related to an offset process of the variable length decoding unit 31 when the third embodiment is combined with the second embodiment. 補正対象の画素値と出現頻度の関係を示す説明図である。It is explanatory drawing which shows the relationship between the pixel value of correction object, and appearance frequency. 補正対象の画素値と出現頻度の関係を示す説明図である。It is explanatory drawing which shows the relationship between the pixel value of correction object, and appearance frequency. オフセット適用手法のインデックス表を示す説明図である。It is explanatory drawing which shows the index table of an offset application method.

実施の形態1.
図1はこの発明の実施の形態1による画像符号化装置を示す構成図である。
この実施の形態1の画像符号化装置が処理対象とする映像信号は、輝度信号と2つの色差信号からなるYUV信号や、ディジタル撮像素子から出力されるRGB信号等の任意の色空間のカラー映像信号のほか、モノクロ画像信号や赤外線画像信号など、映像フレームが水平・垂直2次元のディジタルサンプル(画素)列から構成される任意の映像信号である。各画素の階調は8ビットでもよいし、10ビット、12ビットなどの階調であってもよい。また、入力信号は映像信号ではなく静止画像信号でもよいことは、静止画像信号を1フレームのみで構成される映像信号と解釈できることから当然である。
Embodiment 1 FIG.
FIG. 1 is a block diagram showing an image coding apparatus according to Embodiment 1 of the present invention.
The video signal to be processed by the image coding apparatus according to the first embodiment is a color video in an arbitrary color space such as a YUV signal composed of a luminance signal and two color difference signals, or an RGB signal output from a digital image sensor. In addition to signals, the video frame is an arbitrary video signal such as a monochrome image signal or an infrared image signal, in which a video frame is composed of a horizontal / vertical two-dimensional digital sample (pixel) sequence. The gradation of each pixel may be 8 bits, or a gradation of 10 bits, 12 bits, or the like. Further, it is natural that the input signal may be a still image signal instead of a video signal because the still image signal can be interpreted as a video signal composed of only one frame.

以下の説明においては、便宜上、特に断らない限り、入力される映像信号が、2つの色差成分U,Vが輝度成分Yに対して、縦横ともに2分の1にサブサンプルされたYUV4:2:0フォーマット、2つの色差成分U,Vが輝度成分Yに対して、横方向に2分の1にサブサンプルされたYUV4:2:2フォーマット、あるいは、2つの色差成分U,Vが輝度成分Yと同じサンプル数であるYUV4:4:4フォーマットの信号であるものとする。また、赤色(R)、緑色(G)、青色(B)の三原色の信号からなるRGB4:4:4フォーマットの信号については、それぞれの信号をYUV4:4:4フォーマットの信号とみなしてYUV4:4:4フォーマットと同一の符号化を行う。ただし、RGB4:4:4フォーマットの各信号(RGB)のYUV4:4:4フォーマットの各信号(YUV)への対応付けについては限定しない(任意に設定できる)。この対応付けはインデックス情報として上位ヘッダで符号化して画像復号装置側で認識できるようにしてもよい。このようにすることで、画像復号装置によって復号した復号画像の色を正しく表示することができる。   In the following description, for convenience, unless otherwise specified, the input video signal is YUV4: 2 in which the two color difference components U and V are subsampled in half both vertically and horizontally with respect to the luminance component Y: 0 format, YUV4: 2: 2 format in which two color difference components U and V are subsampled in half in the horizontal direction with respect to luminance component Y, or two color difference components U and V are luminance component Y And YUV 4: 4: 4 format signal having the same number of samples. In addition, for RGB 4: 4: 4 format signals composed of signals of the three primary colors of red (R), green (G), and blue (B), each signal is regarded as a YUV 4: 4: 4 format signal and YUV 4: Performs the same encoding as the 4: 4 format. However, the correspondence of each signal (RGB) in RGB 4: 4: 4 format to each signal (YUV) in YUV 4: 4: 4 format is not limited (can be arbitrarily set). This association may be encoded as an index information with a high-order header so that the image decoding apparatus can recognize it. By doing in this way, the color of the decoded image decoded by the image decoding apparatus can be correctly displayed.

また、YUV4:4:4フォーマット信号やRGB4:4:4フォーマット信号の場合、各信号をモノクローム画像信号とみなしてそれぞれ独立にモノクローム(YUV4:0:0)符号化してビットストリームを生成するようにしてもよい。このようにすることで各信号並列に符号化処理を実施することができる。その際、各モノクローム信号がどの色信号であるかを示す情報をインデックス情報として上位ヘッダで符号化して画像復号装置側で認識できるようにしてもよい。このようにすることで、画像復号装置によって復号した復号画像の色を正しく表示することができる。
なお、映像の各フレームに対応する処理データ単位を「ピクチャ」と称し、この実施の形態1では、「ピクチャ」は順次走査(プログレッシブスキャン)された映像フレームの信号として説明を行う。ただし、映像信号がインタレース信号である場合、「ピクチャ」は映像フレームを構成する単位であるフィールド画像信号であってもよい。
In the case of a YUV 4: 4: 4 format signal or an RGB 4: 4: 4 format signal, each signal is regarded as a monochrome image signal and is independently encoded in monochrome (YUV 4: 0: 0) to generate a bit stream. May be. In this way, encoding processing can be performed in parallel with each signal. At this time, information indicating which color signal each monochrome signal is may be encoded as an index information with a high-order header so that the image decoding apparatus can recognize it. By doing in this way, the color of the decoded image decoded by the image decoding apparatus can be correctly displayed.
The processing data unit corresponding to each frame of the video is referred to as “picture”. In the first embodiment, “picture” is described as a signal of a video frame that has been sequentially scanned (progressive scan). However, when the video signal is an interlace signal, the “picture” may be a field image signal which is a unit constituting a video frame.

図1において、符号化制御部1は符号化処理が実施される際の処理単位となる符号化ブロックの最大サイズを決定するとともに、最大サイズの符号化ブロックが階層的に分割される際の上限の階層数を決定することで、各々の符号化ブロックのサイズを決定する処理を実施する。また、符号化制御部1は選択可能な1以上の符号化モード(予測処理単位を示す予測ブロックのサイズなどが異なる1以上のイントラ符号化モード、予測処理単位を示す予測ブロックのサイズなどが異なる1以上のイントラブロックコピー符号化モード、予測ブロックのサイズなどが異なる1以上のインター符号化モード)の中から、ブロック分割部3から出力される符号化ブロックに適用する符号化モードを選択する処理を実施する。選択手法の例としては、選択可能な1以上の符号化モードの中から、ブロック分割部3から出力される符号化ブロックに対する符号化効率が最も高い符号化モードを選択する手法がある。   In FIG. 1, the encoding control unit 1 determines the maximum size of an encoding block that is a processing unit when the encoding process is performed, and the upper limit when the encoding block of the maximum size is hierarchically divided. By determining the number of layers, the process of determining the size of each encoded block is performed. The encoding control unit 1 also has one or more selectable encoding modes (one or more intra encoding modes having different prediction block sizes indicating prediction processing units, etc., and different prediction block sizes indicating prediction processing units). Processing for selecting a coding mode to be applied to a coding block output from the block division unit 3 from one or more intra block copy coding modes and one or more inter coding modes having different prediction block sizes. To implement. As an example of the selection method, there is a method of selecting a coding mode having the highest coding efficiency for the coding block output from the block dividing unit 3 from one or more selectable coding modes.

また、符号化制御部1は符号化効率が最も高い符号化モードがイントラ符号化モードである場合、そのイントラ符号化モードで符号化ブロックに対するイントラ予測処理を実施する際に用いるイントラ予測パラメータを上記イントラ符号化モードが示す予測処理単位である予測ブロック毎に決定し、符号化効率が最も高い符号化モードがイントラブロックコピー符号化モードである場合、そのイントラブロックコピー符号化モードで符号化ブロックに対するイントラブロックコピー予測処理を実施する際に用いるイントラブロックコピー予測パラメータを上記イントラブロックコピー符号化モードが示す予測処理単位である予測ブロック毎に決定し、符号化効率が最も高い符号化モードがインター符号化モードである場合、そのインター符号化モードで符号化ブロックに対するインター予測処理を実施する際に用いるインター予測パラメータを上記インター符号化モードが示す予測処理単位である予測ブロック毎に決定する処理を実施する。   In addition, when the coding mode with the highest coding efficiency is the intra coding mode, the coding control unit 1 sets the intra prediction parameters used when performing the intra prediction process on the coding block in the intra coding mode. It is determined for each prediction block that is a prediction processing unit indicated by the intra coding mode, and when the coding mode having the highest coding efficiency is the intra block copy coding mode, the intra block copy coding mode is used for the coding block. An intra block copy prediction parameter used when performing the intra block copy prediction process is determined for each prediction block which is a prediction processing unit indicated by the intra block copy coding mode, and the coding mode having the highest coding efficiency is an inter code. The inter code The inter prediction parameters used in practicing the inter prediction process for encoding blocks to implement the process of determining for each prediction block is a prediction processing unit indicated by the inter coding mode in the mode.

さらに、符号化制御部1は変換・量子化部9及び逆量子化・逆変換部10に与える予測差分符号化パラメータを決定する処理を実施する。予測差分符号化パラメータには、符号化ブロックにおける直交変換処理単位となる変換ブロックの分割情報を示す変換ブロック分割情報や、変換係数の量子化を行う際の量子化ステップサイズを規定する量子化パラメータなどが含まれる。   Furthermore, the encoding control unit 1 performs a process of determining a prediction difference encoding parameter to be given to the transform / quantization unit 9 and the inverse quantization / inverse transform unit 10. The prediction difference coding parameter includes transform block partition information indicating transform block partition information that is a unit of orthogonal transform processing in the coded block, and a quantization parameter that specifies a quantization step size when transform coefficients are quantized. Etc. are included.

ここで、図2はYUV4:2:0フォーマットの信号における輝度信号及び色差信号の圧縮処理(変換処理、量子化処理)を実施する際の変換ブロックサイズを示す説明図である。変換ブロックサイズは、図2に示すように、符号化ブロックを四分木状に階層分割することによって決定される。例えば、変換ブロックを分割する場合と変換ブロックを分割しない場合での符号量や、符号化誤差を加味した評価尺度などに基づいて、評価値が最小になるように変換ブロックを分割するか否かを決定することで、符号量と符号化誤差のトレードオフの観点から最適な変換ブロックの分割形状を決定することができる。   Here, FIG. 2 is an explanatory diagram showing the conversion block size when the compression processing (conversion processing and quantization processing) of the luminance signal and the color difference signal in the YUV 4: 2: 0 format signal is performed. As shown in FIG. 2, the transform block size is determined by hierarchically dividing the encoded block into a quadtree. For example, whether or not to divide the transform block so that the evaluation value is minimized based on the amount of code when the transform block is divided and when the transform block is not divided, the evaluation scale that takes into account the coding error, etc. By determining, it is possible to determine the optimal division shape of the transform block from the viewpoint of the trade-off between the code amount and the coding error.

輝度信号については、例えば、図2に示すように、符号化ブロックが1つ又は複数の正方形の変換ブロックに階層的に分割されるように構成する。色差信号については、図2に示すように、入力信号フォーマットがYUV4:2:0信号である場合、輝度信号と同様に、符号化ブロックが1つ又は複数の正方形の変換ブロックに階層的に分割されるように構成する。この場合、色差信号の変換ブロックサイズは、対応する輝度信号の変換ブロックの縦横ともに半分のサイズとなる。   For example, as shown in FIG. 2, the luminance signal is configured so that the encoding block is hierarchically divided into one or a plurality of square transform blocks. For the color difference signal, as shown in FIG. 2, when the input signal format is a YUV 4: 2: 0 signal, the encoding block is hierarchically divided into one or a plurality of square transform blocks as with the luminance signal. To be configured. In this case, the conversion block size of the color difference signal is half the vertical and horizontal sizes of the corresponding luminance signal conversion block.

入力信号フォーマットがYUV4:2:2信号である場合、図3に示すように、輝度信号と同様の四分木状の階層分割を行う。また、分割したブロックの形状が、垂直方向の画素数が水平方向の画素数の2倍になる長方形となるため、さらに、分割したブロックを上下に二分することで、YUV4:2:0信号での色差信号と同じブロックサイズ(輝度信号の変換ブロックの縦横ともに半分のサイズ)の変換ブロック2つで構成するようにする。   When the input signal format is a YUV 4: 2: 2 signal, quadtree-like hierarchical division similar to the luminance signal is performed as shown in FIG. Further, since the shape of the divided block is a rectangle in which the number of pixels in the vertical direction is twice the number of pixels in the horizontal direction, the divided block is further divided into two parts in the vertical direction, so that the YUV 4: 2: 0 signal The color difference signal is composed of two conversion blocks having the same block size (half the vertical and horizontal sizes of the luminance signal conversion block).

また、入力信号フォーマットがYUV4:4:4信号である場合、図4に示すように、色差信号の変換ブロックは、常に輝度信号の変換ブロックと同様の分割を行い、同じサイズの変換ブロックとなるように構成する。輝度信号の変換ブロックの分割情報は、例えば、階層毎に分割するか否かを示す変換ブロック分割フラグとして可変長符号化部15に出力する。   When the input signal format is a YUV 4: 4: 4 signal, the color difference signal conversion block is always divided in the same manner as the luminance signal conversion block as shown in FIG. Configure as follows. The division information of the conversion block of the luminance signal is output to the variable length encoding unit 15 as a conversion block division flag indicating whether or not to divide for each layer, for example.

スライス分割部2は入力画像として映像信号を入力すると、その入力画像を符号化制御部1により決定されたスライス分割情報にしたがって1以上の“スライス”という部分画像に分割する処理を実施する。スライスの分割単位は、上述した符号化ブロック単位まで細かくすることができる。
ブロック分割部3はスライス分割部2により分割されたスライスを入力する毎に、そのスライスを符号化制御部1により決定された最大サイズの符号化ブロックである最大符号化ブロックに分割するとともに、符号化制御部1により決定された上限の階層数に至るまで、その最大符号化ブロックを階層的に各符号化ブロックへ分割する処理を実施する。即ち、ブロック分割部3はスライスを符号化制御部1により決定された分割に応じて各符号化ブロックに分割して、その符号化ブロックを出力する処理を実施する。また、各符号化ブロックは予測処理単位となる1つないし複数の予測ブロックに分割される。
When a video signal is input as an input image, the slice division unit 2 performs a process of dividing the input image into one or more partial images called “slices” according to the slice division information determined by the encoding control unit 1. The slice division unit can be finely divided to the above-described coding block unit.
Each time the block dividing unit 3 inputs the slice divided by the slice dividing unit 2, the slice dividing unit 3 divides the slice into maximum coding blocks that are coding blocks of the maximum size determined by the coding control unit 1, and Until the maximum number of hierarchies determined by the coding control unit 1 is reached, a process of dividing the maximum coding block hierarchically into each coding block is performed. That is, the block division unit 3 divides the slice into each coding block according to the division determined by the coding control unit 1, and performs a process of outputting the coding block. Each coding block is divided into one or a plurality of prediction blocks which are prediction processing units.

切換スイッチ4は符号化制御部1により決定された符号化モードがイントラ符号化モードであれば、ブロック分割部3から出力された符号化ブロックをイントラ予測部5に出力し、符号化制御部1により決定された符号化モードがイントラブロックコピー符号化モードであれば、ブロック分割部3から出力された符号化ブロックをイントラブロックコピー予測部6に出力し、符号化制御部1により決定された符号化モードがインター符号化モードであれば、ブロック分割部3から出力された符号化ブロックを動き補償予測部7に出力する処理を実施する。   If the coding mode determined by the coding control unit 1 is the intra coding mode, the changeover switch 4 outputs the coded block output from the block dividing unit 3 to the intra prediction unit 5, and the coding control unit 1 If the coding mode determined by is the intra block copy coding mode, the coding block output from the block division unit 3 is output to the intra block copy prediction unit 6, and the code determined by the coding control unit 1 is output. If the encoding mode is the inter encoding mode, a process of outputting the encoded block output from the block dividing unit 3 to the motion compensation prediction unit 7 is performed.

イントラ予測部5は切換スイッチ4から出力された符号化ブロックに対応する符号化モードとして、符号化制御部1によりイントラ符号化モードが選択された場合、イントラ用メモリ12に格納されている局所復号画像を参照しながら、符号化制御部1により決定されたイントラ予測パラメータを用いたイントラ予測処理(フレーム内予測処理)を実施してイントラ予測画像を生成する処理を実施する。   When the intra control mode is selected by the encoding control unit 1 as the encoding mode corresponding to the encoded block output from the changeover switch 4, the intra prediction unit 5 performs local decoding stored in the intra memory 12. With reference to the image, an intra prediction process (intraframe prediction process) using the intra prediction parameter determined by the encoding control unit 1 is performed to generate an intra predicted image.

即ち、イントラ予測部5は、輝度信号については、輝度信号のイントラ予測パラメータを用いたイントラ予測処理(フレーム内予測処理)を実施して、輝度信号の予測画像を生成する。一方、色差信号については、色差信号のイントラ予測パラメータが、輝度信号に対するイントラ予測モードと同じ予測モードを用いる旨を示している場合(イントラ予測パラメータが輝度色差共通イントラ予測モード(DMモード)を示している場合)、輝度信号と同じフレーム内予測を実施して、色差信号の予測画像を生成する。図5はYUV4:2:0フォーマットの信号において輝度信号と色差信号で同一の方向性予測を用いた場合を示し、図6はYUV4:2:2フォーマットの信号において輝度信号と色差信号で同一の方向性予測を用いた場合を示している。   That is, for the luminance signal, the intra prediction unit 5 performs an intra prediction process (intraframe prediction process) using an intra prediction parameter of the luminance signal to generate a prediction image of the luminance signal. On the other hand, for the color difference signal, the intra prediction parameter of the color difference signal indicates that the same prediction mode as the intra prediction mode for the luminance signal is used (the intra prediction parameter indicates the luminance color difference common intra prediction mode (DM mode)). The same intra-frame prediction as that of the luminance signal is performed to generate a predicted image of the color difference signal. FIG. 5 shows a case where the same directionality prediction is used for a luminance signal and a color difference signal in a YUV 4: 2: 0 format signal, and FIG. 6 shows that the luminance signal and the color difference signal are the same in a YUV 4: 2: 2 format signal. The case where directionality prediction is used is shown.

また、色差信号のイントラ予測パラメータが、垂直方向予測モード又は水平方向予測モードを示している場合、色差信号に対する方向性予測を実施して、色差信号の予測画像を生成する。また、色差信号のイントラ予測パラメータが、輝度相関利用色差信号予測モード(LMモード)を示している場合、予測画像の生成対象ブロックの上及び左に隣接している複数の画素の輝度信号及び色差信号を用いて、輝度信号と色差信号の相関を示す相関パラメータを算出し、その相関パラメータと予測処理対象の色差信号のブロックに対応する輝度信号を用いて、色差信号の予測画像を生成する。   Further, when the intra prediction parameter of the color difference signal indicates the vertical direction prediction mode or the horizontal direction prediction mode, the directionality prediction for the color difference signal is performed to generate a prediction image of the color difference signal. Further, when the intra prediction parameter of the color difference signal indicates the luminance correlation use color difference signal prediction mode (LM mode), the luminance signal and color difference of a plurality of pixels adjacent above and to the left of the prediction image generation target block. A correlation parameter indicating the correlation between the luminance signal and the color difference signal is calculated using the signal, and a predicted image of the color difference signal is generated using the correlation parameter and the luminance signal corresponding to the block of the color difference signal to be predicted.

入力信号フォーマットがYUV4:2:2信号である場合、図7に示すように、輝度信号が正方ブロックであれば、色差信号は輝度信号と比較して水平方向の画素数が1/2となる長方形のブロックとなる。したがって、図8に示すように、YUV4:4:4信号をYUV4:2:2信号に変換した際に、輝度信号と色差信号で同一方向の予測となるようにするためには、YUV4:2:2信号上では、垂直方向予測と水平方向予測以外の方向性予測の場合には、色差信号の予測方向が輝度信号の予測方向と異なることとなる。具体的には、図9に示すように、輝度信号の予測方向ベクトルをv=(dx,dy)とした場合、色差信号の予測方向ベクトルは、v=(dx/2,dy)となる。即ち、図10に示すように、予測方向の角度をθとした場合、輝度信号の予測方向の角度をθ、色差信号の予測方向の角度をθとして、tanθ=2tanθの関係となる予測方向で予測する必要がある。 When the input signal format is a YUV 4: 2: 2 signal and the luminance signal is a square block as shown in FIG. 7, the color difference signal has half the number of pixels in the horizontal direction compared to the luminance signal. It becomes a rectangular block. Therefore, as shown in FIG. 8, when the YUV4: 4: 4 signal is converted into a YUV4: 2: 2 signal, in order to predict the luminance signal and the color difference signal in the same direction, YUV4: 2 : On two signals, in the case of directional prediction other than vertical prediction and horizontal prediction, the prediction direction of the color difference signal is different from the prediction direction of the luminance signal. Specifically, as shown in FIG. 9, when the prediction direction vector of the luminance signal is v L = (dx L , dy L ), the prediction direction vector of the color difference signal is v C = (dx L / 2, dy L ). That is, as shown in FIG. 10, when the angle of the prediction direction is θ, the angle of the prediction direction of the luminance signal is θ L , the angle of the prediction direction of the color difference signal is θ C , and tan θ C = 2tan θ L It is necessary to predict in the prediction direction.

したがって、輝度信号と色差信号で同一方向の予測を行う上記DMモードを正しく実施できるようにするために、入力信号フォーマットがYUV4:2:2信号である場合、輝度信号に使用したイントラ予測モードのインデックスを色差信号の予測に用いるイントラ予測モードのインデックスに変換し、変換後のインデックスに対応するイントラ予測モードによる色差信号の予測処理を実施する。具体的には、インデックスの変換テーブルを用意し、その変換テーブルを参照することで、インデックスを変換するように構成してもよいし、予め変換式を用意して、その変換式に従ってインデックスを変換するように構成してもよい。このように構成することで、方向性予測処理自体を変更することなく、インデックスの変換のみで、YUV4:2:2信号のフォーマットに応じた色差信号の適切な予測を実施することができる。   Therefore, when the input signal format is a YUV 4: 2: 2 signal in order to correctly implement the DM mode in which the prediction in the same direction is performed with the luminance signal and the color difference signal, the intra prediction mode used for the luminance signal is used. The index is converted into an index of an intra prediction mode used for prediction of the color difference signal, and the prediction process of the color difference signal in the intra prediction mode corresponding to the converted index is performed. Specifically, an index conversion table may be prepared, and the index may be converted by referring to the conversion table. Alternatively, a conversion formula is prepared in advance, and the index is converted according to the conversion formula. You may comprise. With this configuration, it is possible to perform appropriate prediction of the color difference signal according to the format of the YUV 4: 2: 2 signal only by converting the index without changing the directionality prediction process itself.

イントラブロックコピー予測部6は切換スイッチ4から出力された符号化ブロックに対応する符号化モードとして、符号化制御部1によりイントラブロックコピー符号化モードが選択された場合、その符号化ブロック内の予測ブロック(予測処理単位のブロック)が属している最大サイズの符号化ブロック(最大符号化ブロック)の中で、未だ局所復号が済んでいない領域内の各画素の画素値を所定の方法で仮定する処理を実施する。また、イントラブロックコピー予測部6は符号化ブロック内の予測ブロック毎に、同一のピクチャ内で既に符号化が行われて局所復号が済んでいる領域の中から、当該予測ブロックと最も近似しているブロックである参照ブロックを探索して、その参照ブロックを当該予測ブロックの予測画像に決定する処理を実施する。   When the intra block copy encoding mode is selected by the encoding control unit 1 as the encoding mode corresponding to the encoded block output from the changeover switch 4, the intra block copy predicting unit 6 predicts the encoded block. The pixel value of each pixel in an area that has not been subjected to local decoding is assumed in a predetermined method among the maximum size encoded block (maximum encoded block) to which the block (prediction processing unit block) belongs. Perform the process. In addition, the intra block copy prediction unit 6 approximates the prediction block for each prediction block in the encoded block most closely to the prediction block from the regions that have already been encoded and locally decoded in the same picture. A process is performed for searching for a reference block that is an existing block and determining the reference block as a prediction image of the prediction block.

動き補償予測部7は切換スイッチ4から出力された符号化ブロックに対応する符号化モードとして、符号化制御部1によりインター符号化モードが選択された場合、符号化ブロックと動き補償予測フレームメモリ14に格納されている1フレーム以上の局所復号画像を比較して動きベクトルを探索し、その動きベクトルと符号化制御部1により決定された参照するフレーム番号などのインター予測パラメータを用いて、その符号化ブロックに対するインター予測処理(動き補償予測処理)を実施してインター予測画像を生成する処理を実施する。   When the inter coding mode is selected by the coding control unit 1 as the coding mode corresponding to the coding block output from the changeover switch 4, the motion compensated prediction unit 7 and the motion compensated prediction frame memory 14 A motion vector is searched by comparing locally decoded images of one frame or more stored in the image, and the motion vector and an inter prediction parameter such as a frame number to be determined determined by the encoding control unit 1 are used to encode the code. A process for generating an inter-predicted image by performing an inter prediction process (motion-compensated prediction process) on a block is performed.

減算部8はブロック分割部3より出力された符号化ブロックから、イントラ予測部5により生成されたイントラ予測画像、イントラブロックコピー予測部6により生成されたイントラブロックコピー予測画像、又は、動き補償予測部7により生成されたインター予測画像を減算して、その減算結果である差分画像を示す予測差分信号を変換・量子化部9に出力する処理を実施する。   The subtracting unit 8 is an intra prediction image generated by the intra prediction unit 5, an intra block copy prediction image generated by the intra block copy prediction unit 6, or motion compensated prediction from the encoded block output from the block dividing unit 3. A process of subtracting the inter prediction image generated by the unit 7 and outputting a prediction difference signal indicating the difference image as a subtraction result to the transform / quantization unit 9 is performed.

変換・量子化部9は符号化制御部1により決定された予測差分符号化パラメータに含まれる変換ブロック分割情報を参照して、減算部8から出力された予測差分信号に対する直交変換処理(例えば、DCT(離散コサイン変換)やDST(離散サイン変換)、予め特定の学習系列に対して基底設計がなされているKL変換等の直交変換処理)を変換ブロック単位に実施して変換係数を算出するとともに、その予測差分符号化パラメータに含まれる量子化パラメータを参照して、その変換ブロック単位の変換係数を量子化し、量子化後の変換係数である圧縮データを逆量子化・逆変換部10及び可変長符号化部15に出力する処理を実施する。
変換・量子化部9は変換係数を量子化する際、上記量子化パラメータから算出される量子化ステップサイズを変換係数毎にスケーリングする量子化マトリクスを用いて、変換係数の量子化処理を実施するようにしてもよい。
The transform / quantization unit 9 refers to the transform block division information included in the prediction difference coding parameter determined by the coding control unit 1 and performs orthogonal transform processing on the prediction difference signal output from the subtraction unit 8 (for example, DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), orthogonal transform processing such as KL transform, which is previously designed for a specific learning sequence, is performed for each transform block, and transform coefficients are calculated. Then, referring to the quantization parameter included in the prediction differential encoding parameter, the transform coefficient of the transform block unit is quantized, and the compressed data that is the transform coefficient after quantization is dequantized / inverse transform unit 10 and variable A process of outputting to the long encoding unit 15 is performed.
When the transform / quantization unit 9 quantizes the transform coefficient, the transform / quantization unit 9 performs a transform coefficient quantization process using a quantization matrix that scales the quantization step size calculated from the quantization parameter for each transform coefficient. You may do it.

ここで、図11は4×4DCTの量子化マトリクスの一例を示す説明図である。図中の数字は、各変換係数の量子化ステップサイズのスケーリング値を示している。例えば、符号化ビットレートを抑制するために、図11に示すように、高域の変換係数程、量子化ステップサイズを大きな値にスケーリングすることで、複雑な画像領域等で発生する高域の変換係数を抑制して符号量を抑えつつ、主観品質に大きく影響する低域の係数の情報を落とさずに符号化することができる。このように、変換係数毎の量子化ステップサイズを制御したい場合には量子化マトリクスを用いればよい。   FIG. 11 is an explanatory diagram showing an example of a 4 × 4 DCT quantization matrix. The numbers in the figure indicate the scaling value of the quantization step size of each transform coefficient. For example, in order to suppress the encoding bit rate, as shown in FIG. 11, by scaling the quantization step size to a larger value for a higher frequency transform coefficient, a higher frequency generated in a complex image region or the like. It is possible to perform coding without dropping information on low-frequency coefficients that greatly affect subjective quality while suppressing the amount of codes by suppressing conversion coefficients. Thus, when it is desired to control the quantization step size for each transform coefficient, a quantization matrix may be used.

また、量子化マトリクスは、各直交変換サイズで色信号や符号化モード(イントラ符号化かインター符号化か)毎に独立したマトリクスを使用することができ、初期値として、画像符号化装置及び画像復号装置で予め共通に用意されている量子化マトリクスや既に符号化された量子化マトリクスの中から選択するか、新しい量子化マトリクスを用いるかをそれぞれ選択することができる。したがって、変換・量子化部9は、各直交変換サイズに対して色信号や符号化モード毎に、新しい量子化マトリクスを用いるか否かを示すフラグ情報を符号化すべき量子化マトリクスパラメータに設定する。   In addition, the quantization matrix can use an independent matrix for each color signal and coding mode (intra coding or inter coding) with each orthogonal transform size. It is possible to select whether to use a quantization matrix that is commonly prepared in advance by the decoding apparatus or an already encoded quantization matrix or to use a new quantization matrix. Accordingly, the transform / quantization unit 9 sets flag information indicating whether or not to use a new quantization matrix for each orthogonal transform size for each color signal or coding mode, in a quantization matrix parameter to be encoded. .

さらに、新しい量子化マトリクスを用いる場合には、図11に示すような量子化マトリクスの各スケーリング値を符号化すべき量子化マトリクスパラメータに設定する。一方、新しい量子化マトリクスを用いない場合には、初期値として、画像符号化装置及び画像復号装置で、予め共通に用意されている量子化マトリクス、又は、既に符号化された量子化マトリクスの中から、使用するマトリクスを特定するインデックスを符号化すべき量子化マトリクスパラメータに設定する。ただし、参照可能な既に符号化された量子化マトリクスが存在しない場合、画像符号化装置及び画像復号装置で予め共通に用意されている量子化マトリクスのみ選択可能となる。   Furthermore, when a new quantization matrix is used, each scaling value of the quantization matrix as shown in FIG. 11 is set as a quantization matrix parameter to be encoded. On the other hand, when a new quantization matrix is not used, as an initial value, a quantization matrix prepared in advance by the image encoding device and the image decoding device, or a quantization matrix that has already been encoded is used. Thus, an index for specifying a matrix to be used is set as a quantization matrix parameter to be encoded. However, when there is no already-encoded quantization matrix that can be referred to, it is possible to select only the quantization matrix that is prepared in advance by the image encoding device and the image decoding device.

逆量子化・逆変換部10は符号化制御部1により決定された予測差分符号化パラメータに含まれる量子化パラメータ及び変換ブロック分割情報を参照して、変換ブロック単位に変換・量子化部9から出力された圧縮データを逆量子化するとともに、逆量子化後の圧縮データである変換係数に対する逆直交変換処理を実施して、減算部8から出力された予測差分信号に相当する局所復号予測差分信号を算出する処理を実施する。なお、変換・量子化部9が量子化マトリクスを用いて、量子化処理を実施している場合には、逆量子化処理時においても、その量子化マトリクスを参照して、対応する逆量子化処理を実施する。   The inverse quantization / inverse transform unit 10 refers to the quantization parameter and transform block division information included in the prediction difference coding parameter determined by the coding control unit 1, and transforms and transforms the transform block 9 in units of transform blocks. A local decoded prediction difference corresponding to the prediction difference signal output from the subtracting unit 8 is obtained by dequantizing the output compressed data and performing an inverse orthogonal transform process on the transform coefficient that is the compressed data after the inverse quantization. A process of calculating a signal is performed. In addition, when the transform / quantization unit 9 uses the quantization matrix to perform the quantization process, the corresponding inverse quantization can be performed by referring to the quantization matrix even during the inverse quantization process. Implement the process.

加算部11は逆量子化・逆変換部10により算出された局所復号予測差分信号と、イントラ予測部5により生成されたイントラ予測画像、イントラブロックコピー予測部6により生成されたイントラブロックコピー予測画像、又は、動き補償予測部7により生成されたインター予測画像とを加算して、ブロック分割部3から出力された符号化ブロックに相当する局所復号画像を算出する処理を実施する。
イントラ用メモリ12は加算部11により算出された局所復号画像を格納する記録媒体である。
The addition unit 11 includes a local decoded prediction difference signal calculated by the inverse quantization / inverse conversion unit 10, an intra prediction image generated by the intra prediction unit 5, and an intra block copy prediction image generated by the intra block copy prediction unit 6. Alternatively, the inter prediction image generated by the motion compensation prediction unit 7 is added to perform a process of calculating a local decoded image corresponding to the encoded block output from the block dividing unit 3.
The intra memory 12 is a recording medium that stores the locally decoded image calculated by the adding unit 11.

ループフィルタ部13は加算部11により算出された局所復号画像に対して、所定のフィルタ処理を実施して、フィルタ処理後の局所復号画像を出力する処理を実施する。具体的には、変換ブロックの境界や予測ブロックの境界に発生する歪みを低減するフィルタ(デブロッキングフィルタ)処理、画素単位に適応的にオフセットを加算する(画素適応オフセット)処理、ウィーナフィルタ等の線形フィルタを適応的に切り替えてフィルタ処理する適応フィルタ処理などを行う。
これらのループフィルタは、復号画像の画質を向上させることを目的として適用されるが、図42に示すようなスクリーンコンテンツの特殊なヒストグラム形状を考慮しておらず、十分な画質改善効果が得られない。そこで、この実施の形態1では、新たなループフィルタ処理としてヒストグラム補正処理を実施する。
The loop filter unit 13 performs a predetermined filter process on the local decoded image calculated by the adding unit 11 and performs a process of outputting the local decoded image after the filter process. Specifically, filter (deblocking filter) processing that reduces distortion occurring at the boundaries of transform blocks and prediction blocks, processing for adaptively adding an offset (pixel adaptive offset) for each pixel, Wiener filter, etc. Performs adaptive filter processing for adaptively switching linear filters and performing filter processing.
These loop filters are applied for the purpose of improving the image quality of the decoded image, but do not consider the special histogram shape of the screen content as shown in FIG. 42, and a sufficient image quality improvement effect can be obtained. Absent. Therefore, in the first embodiment, histogram correction processing is performed as new loop filter processing.

ループフィルタ部13は、上記のデブロッキングフィルタ処理、画素適応オフセット処理、適応フィルタ処理及びヒストグラム補正処理のそれぞれについて処理を行うか否かを決定し、各処理の有効フラグをヘッダ情報として可変長符号化部15に出力する。なお、上記のフィルタ処理を複数使用する際には、各フィルタ処理を順番に実施する。図12は複数のフィルタ処理を用いる場合のループフィルタ部13の構成例を示している。
ただし、図12に示しているループフィルタの種類と順序は一例に過ぎず、適用するループフィルタの種類と適用順序は必ずしも図12のようにする必要はない。例えば、デブロッキングフィルタ処理、画素適応オフセット処理、ヒストグラム補正処理の3種類だけでループフィルタ部13を構成することや、適用順序をデブロッキングフィルタ処理、ヒストグラム補正処理、画素適応オフセット処理の順にすることなどが考えられる。
The loop filter unit 13 determines whether or not to perform each of the deblocking filter process, the pixel adaptive offset process, the adaptive filter process, and the histogram correction process, and uses a variable length code with the valid flag of each process as header information. To the conversion unit 15. When a plurality of the above filter processes are used, each filter process is performed in order. FIG. 12 shows a configuration example of the loop filter unit 13 when a plurality of filter processes are used.
However, the types and order of the loop filters shown in FIG. 12 are merely examples, and the types and application order of the loop filters to be applied are not necessarily as shown in FIG. For example, the loop filter unit 13 is configured by only three types of deblocking filter processing, pixel adaptive offset processing, and histogram correction processing, and the application order is in order of deblocking filter processing, histogram correction processing, and pixel adaptive offset processing. And so on.

デブロッキングフィルタ処理では、ブロック境界にかけるフィルタ強度の選択に用いる各種パラメータを初期値から変更することができる。変更する場合には、そのパラメータをヘッダ情報として可変長符号化部15に出力する。
画素適応オフセット処理では、最初に、画像を複数のブロックに分割し、そのブロック単位に、オフセット処理を行わない場合もクラス分類手法の一つとして定義して、予め用意されている複数のクラス分類手法の中から、1つのクラス分類手法を選択する。次に、選択したクラス分類手法によって、ブロック内の各画素をクラス分類し、クラス毎に符号化歪みを補償するオフセット値を算出する。最後に、局所復号画像の画素値に対して、そのオフセット値を加算する処理を行うことで局所復号画像の画像品質を改善する。
In the deblocking filter process, various parameters used for selecting the filter strength applied to the block boundary can be changed from the initial values. When changing, the parameter is output to the variable length coding unit 15 as header information.
In the pixel adaptive offset process, first, an image is divided into a plurality of blocks, and when the offset process is not performed for each block, it is defined as one of the class classification methods, and a plurality of class classifications prepared in advance are used. One classification method is selected from the methods. Next, each pixel in the block is classified by the selected class classification method, and an offset value for compensating the coding distortion is calculated for each class. Finally, the image quality of the locally decoded image is improved by performing a process of adding the offset value to the pixel value of the locally decoded image.

したがって、画素適応オフセット処理では、ブロック分割情報、各ブロックのクラス分類手法を示すインデックス、ブロック単位の各クラスのオフセット値を特定するオフセット情報をヘッダ情報として可変長符号化部15に出力する。
なお、画素適応オフセット処理において、例えば、最大符号化ブロックといった固定サイズのブロック単位に常に分割して、そのブロック毎にクラス分類手法を選択して、クラス毎の適応オフセット処理を行ってもよい。この場合、上記ブロック分割情報が不要となり、ブロック分割情報に要する符号量分だけ符号量が削減され、符号化効率を高めることができる。
Therefore, in the pixel adaptive offset processing, block division information, an index indicating a class classification method for each block, and offset information for specifying an offset value of each class in block units are output to the variable length coding unit 15 as header information.
In the pixel adaptive offset processing, for example, it may be always divided into fixed-size block units such as a maximum coding block, and a class classification method may be selected for each block to perform adaptive offset processing for each class. In this case, the block division information becomes unnecessary, the code amount is reduced by the amount of code required for the block division information, and the coding efficiency can be improved.

適応フィルタ処理では、局所復号画像を所定の手法でクラス分類し、各クラスに属する領域(局所復号画像)毎に、重畳されている歪みを補償するフィルタを設計し、そのフィルタを用いて、当該局所復号画像のフィルタ処理を実施する。そして、クラス毎に設計したフィルタをヘッダ情報として可変長符号化部15に出力する。クラス分類手法としては、画像を空間的に等間隔に区切る簡易な手法や、ブロック単位に画像の局所的な特性(分散など)に応じて分類する手法がある。また、適応フィルタ処理で使用するクラス数は、予め画像符号化装置及び画像復号装置に共通の値として設定してもよいし、符号化すべきパラメータとしてもよい。前者と比較して後者の方が、使用するクラス数を自由に設定することができるため、画像品質改善効果が上がるが、一方でクラス数を符号化するために、その分の符号量が増加する。   In adaptive filter processing, local decoded images are classified by a predetermined method, and a filter that compensates for the distortion that is superimposed is designed for each region (local decoded image) belonging to each class. Filter the local decoded image. Then, the filter designed for each class is output to the variable length encoding unit 15 as header information. As the class classification method, there are a simple method for spatially dividing an image at equal intervals, and a method for classifying an image according to local characteristics (dispersion, etc.) of each block. Further, the number of classes used in the adaptive filter processing may be set in advance as a value common to the image encoding device and the image decoding device, or may be a parameter to be encoded. Compared to the former, the latter can set the number of classes to be used freely, so the image quality improvement effect will be improved, but on the other hand, the amount of code will be increased to encode the number of classes. To do.

図13はヒストグラム補正処理を実施するループフィルタ部13内の処理部を示す構成図である。
図13において、ヒストグラム算出部21は映像信号が示す入力画像(符号化対象画像)を複数のブロックに分割するとともに、加算部11により算出された局所復号画像を複数のブロックに分割し、その局所復号画像のブロック毎に画素値のヒストグラムを算出する処理を実施する。なお、ヒストグラム算出部21はヒストグラム算出手段を構成している。
画素値補正部22はヒストグラム算出部21により算出されたヒストグラムから符号化歪みに伴うノイズが重畳している画素を特定して、そのノイズが重畳している画素の画素値を補正する処理を実施する。なお、画素値補正部22は画素値補正手段を構成している。
FIG. 13 is a configuration diagram illustrating a processing unit in the loop filter unit 13 that performs the histogram correction processing.
In FIG. 13, the histogram calculation unit 21 divides an input image (encoding target image) indicated by the video signal into a plurality of blocks, divides the local decoded image calculated by the addition unit 11 into a plurality of blocks, A process of calculating a histogram of pixel values is performed for each block of the decoded image. The histogram calculator 21 constitutes a histogram calculator.
The pixel value correcting unit 22 specifies a pixel on which noise accompanying coding distortion is superimposed from the histogram calculated by the histogram calculating unit 21, and performs processing for correcting the pixel value of the pixel on which the noise is superimposed. To do. The pixel value correcting unit 22 constitutes a pixel value correcting unit.

画素値補正部22の第1の誤差算出部23はブロック単位の入力画像と局所復号画像との誤差を算出する処理を実施する。
第2の誤差算出部24はヒストグラム算出部21により算出されたヒストグラムにおけるピーク画素値を含む補正画素値範囲内の画素値を前記ピーク画素値に置換したと仮定した場合のブロック単位の局所復号画像と、ブロック単位の入力画像との誤差を算出する処理を実施する。
The first error calculation unit 23 of the pixel value correction unit 22 performs a process of calculating an error between the input image in units of blocks and the locally decoded image.
The second error calculation unit 24 is a local decoded image in block units on the assumption that the pixel value within the correction pixel value range including the peak pixel value in the histogram calculated by the histogram calculation unit 21 is replaced with the peak pixel value. And processing for calculating an error between the input image and the block unit.

補正画素値範囲保存部25は第2の誤差算出部24により算出された誤差が第1の誤差算出部23により算出された誤差より小さければ、第1の誤差算出部23により算出された誤差を第2の誤差算出部24により算出された誤差に置き換えて、その補正画素値範囲を上書き保存する。
繰り返し処理部26は前記補正画素値範囲が予め設定された最大範囲に至るまで、その補正画素値範囲を更新して、誤差の算出処理の再実施を第2の誤差算出部24に繰り返し指示する処理を実施する。
画素値置換部27は繰り返し処理部26により更新された補正画素値範囲が予め設定された最大範囲に至ったのち、補正画素値範囲保存部25により保存されている補正画素値範囲内の画素値をピーク画素値に置換する処理を実施する。
If the error calculated by the second error calculation unit 24 is smaller than the error calculated by the first error calculation unit 23, the corrected pixel value range storage unit 25 calculates the error calculated by the first error calculation unit 23. The correction pixel value range is overwritten and stored in place of the error calculated by the second error calculation unit 24.
The iterative processing unit 26 updates the correction pixel value range until the correction pixel value range reaches a preset maximum range, and repeatedly instructs the second error calculation unit 24 to re-execute the error calculation process. Perform the process.
After the corrected pixel value range updated by the iterative processing unit 26 reaches a preset maximum range, the pixel value replacement unit 27 stores pixel values within the corrected pixel value range stored by the corrected pixel value range storage unit 25. A process of substituting for the peak pixel value is performed.

即ち、ヒストグラム補正処理では、最初に、ヒストグラム算出部21が、映像信号が示す入力画像を複数のブロックに分割するとともに、加算部11により算出された局所復号画像を複数のブロックに分割し、その局所復号画像のブロック毎に画素値のヒストグラムを算出する。
画素値補正部22は、ヒストグラム算出部21により算出されたヒストグラムのピーク画素値を所定の方法によって特定する。そのピーク画素値の近傍には、符号化歪みによるノイズが存在するため、ピーク画素値に近い画素値を持つ画素(補正画素値範囲内の画素値)に対して、その画素値をピーク画素値で置換することで符号化歪みを低減する。
ここで、図14は補正前後の画素値のヒストグラムを示す説明図である。
図14では、どれだけの範囲の画素値に対して補正を実施するのかを示す補正幅(補正画素値範囲)をwで表しており、この補正幅wは、ピーク画素値の位置や画像の特性に応じて最適な値が変わるため、画素値補正部22が算出する。
That is, in the histogram correction process, first, the histogram calculation unit 21 divides the input image indicated by the video signal into a plurality of blocks, and also divides the local decoded image calculated by the addition unit 11 into a plurality of blocks. A histogram of pixel values is calculated for each block of the locally decoded image.
The pixel value correction unit 22 specifies the peak pixel value of the histogram calculated by the histogram calculation unit 21 by a predetermined method. Since noise due to encoding distortion exists in the vicinity of the peak pixel value, the pixel value is set to the peak pixel value for a pixel having a pixel value close to the peak pixel value (a pixel value within the correction pixel value range). The encoding distortion is reduced by replacing with.
Here, FIG. 14 is an explanatory diagram showing a histogram of pixel values before and after correction.
In FIG. 14, a correction width (correction pixel value range) indicating how much of the pixel value is to be corrected is represented by w, and this correction width w indicates the position of the peak pixel value or the image. Since the optimum value changes according to the characteristics, the pixel value correction unit 22 calculates.

図1において、動き補償予測フレームメモリ14はループフィルタ部13のフィルタ処理後の局所復号画像を格納する記録媒体である。
可変長符号化部15は変換・量子化部9から出力された圧縮データと、符号化制御部1の出力信号(最大符号化ブロック内のブロック分割情報、符号化モード、予測差分符号化パラメータ、ループフィルタパラメータ、イントラ予測パラメータ、イントラブロックコピー予測パラメータ、インター予測パラメータ)と、動き補償予測部7から出力された動きベクトル(符号化モードがインター符号化モードである場合)と、画素値補正部22により算出された最適な補正幅w(補正画素値範囲)とを可変長符号化して符号化データを生成する処理を実施する。
また、可変長符号化部15は、図15に例示するように、符号化ビットストリームのヘッダ情報として、シーケンスレベルヘッダ、ピクチャレベルヘッダを符号化し、ピクチャデータと共に符号化ビットストリームを生成する処理を実施する。なお、可変長符号化部15は符号化手段を構成している。
In FIG. 1, a motion compensated prediction frame memory 14 is a recording medium that stores a locally decoded image after the filter processing of the loop filter unit 13.
The variable length encoding unit 15 and the compressed data output from the transform / quantization unit 9 and the output signal of the encoding control unit 1 (block division information in the maximum encoding block, encoding mode, prediction difference encoding parameter, A loop filter parameter, an intra prediction parameter, an intra block copy prediction parameter, an inter prediction parameter), a motion vector output from the motion compensation prediction unit 7 (when the encoding mode is an inter encoding mode), and a pixel value correction unit. A process for generating encoded data by performing variable length encoding on the optimal correction width w (correction pixel value range) calculated in Step 22 is performed.
Further, as illustrated in FIG. 15, the variable length encoding unit 15 encodes a sequence level header and a picture level header as header information of the encoded bit stream, and generates an encoded bit stream together with the picture data. carry out. Note that the variable length coding unit 15 constitutes coding means.

ただし、ピクチャデータは1以上のスライスデータから構成され、各スライスデータはスライスレベルヘッダと当該スライス内にある上記符号化データをまとめたものである。ピクチャデータはスライスデータの他に補足情報を示すヘッダ情報を含む場合もある。
シーケンスレベルヘッダは、画像サイズ、色信号フォーマット、輝度信号や色差信号の信号値のビット深度、シーケンス単位でのループフィルタ部13における各フィルタ処理(適応フィルタ処理、画素適応オフセット処理、デブロッキングフィルタ処理、ヒストグラム補正処理)の有効フラグ情報、量子化マトリクスの有効フラグ情報など、一般的にシーケンス単位に共通となるヘッダ情報をまとめたものである。
However, picture data is composed of one or more slice data, and each slice data is a combination of a slice level header and the encoded data in the slice. The picture data may include header information indicating supplementary information in addition to the slice data.
The sequence level header includes an image size, a color signal format, a bit depth of a signal value of a luminance signal or a color difference signal, and each filter process (adaptive filter process, pixel adaptive offset process, deblocking filter process) in the loop filter unit 13 in sequence units. , Histogram correction processing) effective flag information, quantization matrix effective flag information, and the like, which are header information that is generally common to each sequence unit.

ピクチャレベルヘッダは、参照するシーケンスレベルヘッダのインデックスや動き補償時の参照ピクチャ数、エントロピー符号化の確率テーブル初期化フラグ、量子化マトリクスパラメータなど、ピクチャ単位で設定するヘッダ情報をまとめたものである。
スライスレベルヘッダは、当該スライスがピクチャのどの位置にあるかを示す位置情報、どのピクチャレベルヘッダを参照するかを示すインデックス、スライスの符号化タイプ(オールイントラ符号化、インター符号化など)、ループフィルタ部13における各フィルタ処理(適応フィルタ処理、画素適応オフセット処理、デブロッキングフィルタ処理、適応オフセット処理)を行うか否かを示すフラグ情報などのスライス単位のパラメータをまとめたものである。
The picture level header is a collection of header information set in units of pictures, such as an index of a sequence level header to be referenced, the number of reference pictures at the time of motion compensation, an entropy coding probability table initialization flag, and a quantization matrix parameter. .
The slice level header includes position information indicating where the slice is located in the picture, an index indicating which picture level header is referred to, a slice coding type (all-intra coding, inter coding, etc.), and a loop. This is a collection of parameters in units of slices such as flag information indicating whether or not each filter process (adaptive filter process, pixel adaptive offset process, deblocking filter process, and adaptive offset process) in the filter unit 13 is performed.

各ヘッダ情報とピクチャデータはNALユニットによって識別される。具体的には、シーケンスパラメータセット(上記シーケンスレベルヘッダに相当)、ピクチャパラメータヘッダ(上記ピクチャレベルヘッダに相当)、スライスデータはそれぞれ固有のNALユニットタイプとして定義され、NALユニットタイプの識別情報(インデックス)と共に符号化される。補足情報についても、存在する場合には固有のNALユニットとして定義される。また、上記ピクチャデータはアクセスユニットとして定義され、一つのピクチャの符号化データを含むデータアクセスの単位を示している。   Each header information and picture data is identified by a NAL unit. Specifically, a sequence parameter set (corresponding to the above sequence level header), a picture parameter header (corresponding to the above picture level header), and slice data are each defined as a unique NAL unit type, together with identification information (index) of the NAL unit type Encoded. Supplemental information is also defined as a unique NAL unit if it exists. The picture data is defined as an access unit and indicates a unit of data access including encoded data of one picture.

図1の例では、画像符号化装置の構成要素である符号化制御部1、スライス分割部2、ブロック分割部3、切換スイッチ4、イントラ予測部5、イントラブロックコピー予測部6、動き補償予測部7、減算部8、変換・量子化部9、逆量子化・逆変換部10、加算部11、イントラ用メモリ12、ループフィルタ部13、動き補償予測フレームメモリ14及び可変長符号化部15のそれぞれが専用のハードウェアで構成(イントラ用メモリ12及び動き補償予測フレームメモリ14以外の構成要素は、例えば、CPUを実装している半導体集積回路や、ワンチップマイコンなどで構成)されているものを想定しているが、画像符号化装置がコンピュータで構成されていてもよい。   In the example of FIG. 1, a coding control unit 1, a slice division unit 2, a block division unit 3, a changeover switch 4, an intra prediction unit 5, an intra block copy prediction unit 6, and motion compensation prediction, which are components of the image coding apparatus. Unit 7, subtraction unit 8, transform / quantization unit 9, inverse quantization / inverse transform unit 10, addition unit 11, intra memory 12, loop filter unit 13, motion compensated prediction frame memory 14, and variable length coding unit 15 Are configured by dedicated hardware (components other than the intra memory 12 and the motion compensation prediction frame memory 14 are configured by, for example, a semiconductor integrated circuit on which a CPU is mounted, a one-chip microcomputer, or the like). Although the thing is assumed, the image coding apparatus may be configured by a computer.

画像符号化装置をコンピュータで構成する場合、イントラ用メモリ12及び動き補償予測フレームメモリ14をコンピュータのメモリ上に構成するとともに、符号化制御部1、スライス分割部2、ブロック分割部3、切換スイッチ4、イントラ予測部5、イントラブロックコピー予測部6、動き補償予測部7、減算部8、変換・量子化部9、逆量子化・逆変換部10、加算部11、ループフィルタ部13及び可変長符号化部15の処理内容を記述しているプログラムをコンピュータのメモリに格納し、当該コンピュータのCPUが当該メモリに格納されているプログラムを実行するようにすればよい。
図16はこの発明の実施の形態1による画像符号化装置の処理内容を示すフローチャートである。
When the image encoding device is configured by a computer, the intra memory 12 and the motion compensated prediction frame memory 14 are configured on the computer memory, and the encoding control unit 1, the slice dividing unit 2, the block dividing unit 3, and the changeover switch. 4, intra prediction unit 5, intra block copy prediction unit 6, motion compensation prediction unit 7, subtraction unit 8, transformation / quantization unit 9, inverse quantization / inverse transformation unit 10, addition unit 11, loop filter unit 13 and variable A program describing the processing contents of the long encoding unit 15 may be stored in a memory of a computer so that the CPU of the computer executes the program stored in the memory.
FIG. 16 is a flowchart showing the processing contents of the image coding apparatus according to Embodiment 1 of the present invention.

図17はこの発明の実施の形態1による画像復号装置を示す構成図である。
図17において、可変長復号部31は図1の画像符号化装置により生成された符号化ビットストリームを入力すると、そのビットストリームからシーケンスレベルヘッダ、ピクチャレベルヘッダ、スライスレベルヘッダなどの各ヘッダ情報とピクチャデータを復号する処理を実施する。
ただし、ピクチャデータは1以上のスライスデータから構成されており、各スライスデータはスライスレベルヘッダと当該スライス内にある符号化データがまとめられているものである。ピクチャデータはスライスデータの他に補足情報を示すヘッダ情報を含む場合もある。このとき、YUV4:4:4フォーマット信号やRGB4:4:4フォーマット信号の各信号をモノクローム画像信号とみなしてそれぞれ独立にモノクローム(YUV4:0:0)符号化していることを示す情報がヘッダ情報に含まれる場合、各色信号の符号化ビットストリームに対してそれぞれ独立に復号処理を実施することができる。
FIG. 17 is a block diagram showing an image decoding apparatus according to Embodiment 1 of the present invention.
In FIG. 17, when the variable length decoding unit 31 receives the encoded bit stream generated by the image encoding device of FIG. A process of decoding picture data is performed.
However, picture data is composed of one or more slice data, and each slice data is a collection of a slice level header and encoded data in the slice. The picture data may include header information indicating supplementary information in addition to the slice data. At this time, the header information includes information indicating that each of the YUV 4: 4: 4 format signal and the RGB 4: 4: 4 format signal is regarded as a monochrome image signal and is independently encoded in monochrome (YUV 4: 0: 0). In the case where it is included, the decoding process can be performed independently on the encoded bit stream of each color signal.

各ヘッダ情報とピクチャデータはNALユニットによって識別される。具体的には、シーケンスパラメータセット(上記シーケンスレベルヘッダに相当)、ピクチャパラメータヘッダ(上記ピクチャレベルヘッダに相当)、スライスデータはそれぞれ固有のNALユニットタイプとして定義され、NALユニットタイプの識別情報(インデックス)を復号することで識別される。補足情報についても、存在する場合には固有のNALユニットとして識別される。また、ピクチャデータはスライスデータを示すNALユニット等をまとめたアクセスユニットとして識別される。   Each header information and picture data is identified by a NAL unit. Specifically, a sequence parameter set (corresponding to the sequence level header), a picture parameter header (corresponding to the picture level header), and slice data are defined as unique NAL unit types, respectively, and identification information (index) of the NAL unit type is used. It is identified by decoding. The supplemental information is also identified as a unique NAL unit if it exists. The picture data is identified as an access unit in which NAL units indicating slice data are collected.

上記ヘッダ情報に含まれる量子化マトリクスの有効フラグ情報が“有効”を示す場合、可変長復号部31は量子化マトリクスパラメータを可変長復号し、量子化マトリクスを特定する。具体的には、各直交変換サイズの色信号や符号化モード毎に、量子化マトリクスパラメータが初期値として、画像符号化装置及び画像復号装置で予め共通に用意されている量子化マトリクス、又は、既に復号された量子化マトリクスである(新しい量子化マトリクスでない)ことを示す場合は、上記マトリクスの内のどの量子化マトリクスであるかを特定するインデックス情報を参照して量子化マトリクスを特定し、量子化マトリクスパラメータが新しい量子化マトリクスを用いることを示す場合は、量子化マトリクスパラメータに含まれる量子化マトリクスを使用する量子化マトリクスとして特定する。   When the valid flag information of the quantization matrix included in the header information indicates “valid”, the variable length decoding unit 31 performs variable length decoding of the quantization matrix parameter, and specifies the quantization matrix. Specifically, for each color signal or encoding mode of each orthogonal transform size, the quantization matrix parameter is set as an initial value, a quantization matrix prepared in advance in the image encoding device and the image decoding device, or When indicating that the quantization matrix has already been decoded (not a new quantization matrix), the quantization matrix is identified with reference to the index information identifying which quantization matrix of the matrix, When the quantization matrix parameter indicates that a new quantization matrix is used, the quantization matrix is specified as a quantization matrix that uses the quantization matrix included in the quantization matrix parameter.

また、可変長復号部31は、スライスレベルヘッダを参照して、スライス分割状態を特定するとともに、各スライスのスライスデータを復号して、最大符号化ブロックの符号化データを特定すると共に、スライスデータに含まれるブロック分割情報を復号して、最大符号化ブロックを階層的に分割して復号処理を行う単位である符号化ブロックを特定し、各々の符号化ブロックに係る圧縮データ、符号化モード、イントラ予測パラメータ(符号化モードがイントラ符号化モードである場合)、イントラブロックコピー予測パラメータ(符号化モードがイントラブロックコピー符号化モードである場合)、インター予測パラメータ(符号化モードがインター符号化モードである場合)、動きベクトル(符号化モードがインター符号化モードである場合)、最適な補正幅w(補正画素値範囲)及び予測差分符号化パラメータを可変長復号する処理を実施する。なお、可変長復号部31は復号手段を構成している。   In addition, the variable length decoding unit 31 refers to the slice level header, specifies the slice division state, decodes the slice data of each slice, specifies the encoded data of the maximum encoded block, and slice data The block division information included in the block, the encoding block that is a unit for performing decoding processing by hierarchically dividing the maximum encoding block, and specifying the compressed data, the encoding mode, Intra prediction parameters (when the encoding mode is the intra encoding mode), intra block copy prediction parameters (when the encoding mode is the intra block copy encoding mode), inter prediction parameters (the encoding mode is the inter encoding mode) ) Motion vector (if the coding mode is inter coding mode) If), carries out a process of variable length decoding optimum correction width w (corrected pixel value range) and predictive differential coding parameters. The variable length decoding unit 31 constitutes decoding means.

逆量子化・逆変換部32は可変長復号部31により可変長復号された予測差分符号化パラメータに含まれる量子化パラメータ及び変換ブロック分割情報を参照して、可変長復号部31により可変長復号された圧縮データを変換ブロック単位に逆量子化するとともに、逆量子化後の圧縮データである変換係数に対する逆直交変換処理を実施して、図1の逆量子化・逆変換部10から出力された局所復号予測差分信号と同一の復号予測差分信号を算出する処理を実施する。   The inverse quantization / inverse transform unit 32 refers to the quantization parameter and transform block division information included in the prediction difference encoding parameter variable length decoded by the variable length decoding unit 31, and the variable length decoding unit 31 performs variable length decoding. 1 is inversely quantized on a transform block basis, and inverse orthogonal transform processing is performed on transform coefficients that are compressed data after inverse quantization, and output from the inverse quantization / inverse transform unit 10 in FIG. A process of calculating the same decoded prediction difference signal as the local decoding prediction difference signal is performed.

ここで、上記変換ブロック分割情報から、符号化ブロックにおける変換ブロックの分割状態を特定する。例えば、YUV4:2:0フォーマットの信号の場合、変換ブロックサイズは、図2に示すように、符号化ブロックを四分木状に階層分割することによって決定される。
輝度信号については、例えば、図2に示すように、符号化ブロックが1つ又は複数の正方形の変換ブロックに階層的に分割されるように構成する。色差信号については、図2に示すように、入力信号フォーマットがYUV4:2:0信号である場合、輝度信号と同様に、符号化ブロックが1つ又は複数の正方形の変換ブロックに階層的に分割されるように構成する。この場合、色差信号の変換ブロックサイズは、対応する輝度信号の変換ブロックの縦横ともに半分のサイズとなる。
Here, the division state of the transform block in the coding block is specified from the transform block partition information. For example, in the case of a YUV 4: 2: 0 format signal, the transform block size is determined by hierarchically dividing the encoded block into quadtrees as shown in FIG.
For example, as shown in FIG. 2, the luminance signal is configured so that the encoding block is hierarchically divided into one or a plurality of square transform blocks. For the color difference signal, as shown in FIG. 2, when the input signal format is a YUV 4: 2: 0 signal, the encoding block is hierarchically divided into one or a plurality of square transform blocks as with the luminance signal. To be configured. In this case, the conversion block size of the color difference signal is half the vertical and horizontal sizes of the corresponding luminance signal conversion block.

入力信号フォーマットがYUV4:2:2信号である場合、図3に示すように、輝度信号と同様の四分木状の階層分割を行う。また、分割したブロックの形状が、垂直方向の画素数が水平方向の画素数の2倍になる長方形となるため、さらに、分割したブロックを上下に二分することで、YUV4:2:0信号での色差信号と同じブロックサイズ(輝度信号の変換ブロックの縦横ともに半分のサイズ)の変換ブロック2つで構成するようにする。
入力信号フォーマットがYUV4:4:4信号である場合、図4に示すように、色差信号の変換ブロックは、常に輝度信号の変換ブロックと同様の分割を行い、同じサイズの変換ブロックとなるように構成する。
When the input signal format is a YUV 4: 2: 2 signal, quadtree-like hierarchical division similar to the luminance signal is performed as shown in FIG. In addition, the shape of the divided block is a rectangle in which the number of pixels in the vertical direction is twice the number of pixels in the horizontal direction. The color difference signal is composed of two conversion blocks having the same block size (half the vertical and horizontal sizes of the luminance signal conversion block).
When the input signal format is a YUV 4: 4: 4 signal, as shown in FIG. 4, the color difference signal conversion block is always divided in the same manner as the luminance signal conversion block so that the conversion block has the same size. Configure.

また、可変長復号部31により可変長復号された各ヘッダ情報が、当該スライスで量子化マトリクスを用いて、逆量子化処理を実施することを示している場合、量子化マトリクスを用いて逆量子化処理を行う。具体的には、各ヘッダ情報から特定される量子化マトリクスを用いて逆量子化処理を行う。   In addition, when each header information variable-length decoded by the variable-length decoding unit 31 indicates that inverse quantization processing is to be performed using the quantization matrix in the slice, inverse quantization is performed using the quantization matrix. Process. Specifically, inverse quantization processing is performed using a quantization matrix specified from each header information.

切換スイッチ33は可変長復号部31により可変長復号された符号化モードがイントラ符号化モードであれば、可変長復号部31により可変長復号されたイントラ予測パラメータをイントラ予測部34に出力し、可変長復号部31により可変長復号された符号化モードがイントラブロックコピー符号化モードであれば、可変長復号部31により可変長復号されたイントラブロックコピー予測パラメータをイントラブロックコピー予測部35に出力し、可変長復号部31により可変長復号された符号化モードがインター符号化モードであれば、可変長復号部31により可変長復号されたインター予測パラメータ及び動きベクトルを動き補償予測部36に出力する処理を実施する。   The changeover switch 33 outputs the intra-prediction parameter variable-length decoded by the variable-length decoding unit 31 to the intra-prediction unit 34 if the coding mode variable-length decoded by the variable-length decoding unit 31 is the intra-coding mode. If the encoding mode variable length decoded by the variable length decoding unit 31 is the intra block copy encoding mode, the intra block copy prediction parameters variable length decoded by the variable length decoding unit 31 are output to the intra block copy prediction unit 35. If the coding mode variable length decoded by the variable length decoding unit 31 is the inter coding mode, the inter prediction parameter and the motion vector variable length decoded by the variable length decoding unit 31 are output to the motion compensation prediction unit 36. Perform the process.

イントラ予測部34は可変長復号部31により可変長復号されたブロック分割情報から特定される符号化ブロックに係る符号化モードがイントラ符号化モードである場合、イントラ用メモリ38に格納されている復号画像を参照しながら、切換スイッチ33から出力されたイントラ予測パラメータを用いたイントラ予測処理(フレーム内予測処理)を実施してイントラ予測画像を生成する処理を実施する。   The intra prediction unit 34, when the coding mode related to the coding block identified from the block division information variable-length decoded by the variable-length decoding unit 31 is the intra-coding mode, the decoding stored in the intra memory 38 With reference to the image, an intra prediction process (intraframe prediction process) using the intra prediction parameter output from the changeover switch 33 is performed to generate an intra predicted image.

即ち、イントラ予測部34は、輝度信号については、輝度信号に対する上記イントラ予測パラメータを用いたイントラ予測処理(フレーム内予測処理)を実施して、輝度信号の予測画像を生成する。一方、色差信号については、色差信号のイントラ予測パラメータが、輝度信号に対するイントラ予測モードと同じ予測モードを用いる旨を示している場合(イントラ予測パラメータが輝度色差共通イントラ予測モード(DMモード)を示している場合)、輝度信号と同じフレーム内予測を実施して、色差信号の予測画像を生成する。   That is, for the luminance signal, the intra prediction unit 34 performs an intra prediction process (intra-frame prediction process) using the intra prediction parameter for the luminance signal, and generates a prediction image of the luminance signal. On the other hand, for the color difference signal, the intra prediction parameter of the color difference signal indicates that the same prediction mode as the intra prediction mode for the luminance signal is used (the intra prediction parameter indicates the luminance color difference common intra prediction mode (DM mode)). The same intra-frame prediction as that of the luminance signal is performed to generate a predicted image of the color difference signal.

また、色差信号のイントラ予測パラメータが、垂直方向予測モード又は水平方向予測モードを示している場合、色差信号に対する方向性予測を実施して、色差信号の予測画像を生成する。また、色差信号のイントラ予測パラメータが、輝度相関利用色差信号予測モード(LMモード)を示している場合、予測画像の生成対象ブロックの上及び左に隣接している複数の画素の輝度信号及び色差信号を用いて、輝度信号と色差信号の相関を示す相関パラメータを算出し、その相関パラメータと予測処理対象の色差信号のブロックに対応する輝度信号を用いて、色差信号の予測画像を生成する。   Further, when the intra prediction parameter of the color difference signal indicates the vertical direction prediction mode or the horizontal direction prediction mode, the directionality prediction for the color difference signal is performed to generate a prediction image of the color difference signal. Further, when the intra prediction parameter of the color difference signal indicates the luminance correlation use color difference signal prediction mode (LM mode), the luminance signal and color difference of a plurality of pixels adjacent above and to the left of the prediction image generation target block. A correlation parameter indicating the correlation between the luminance signal and the color difference signal is calculated using the signal, and a predicted image of the color difference signal is generated using the correlation parameter and the luminance signal corresponding to the block of the color difference signal to be predicted.

入力信号フォーマットがYUV4:2:2信号である場合、図7に示すように、輝度信号が正方ブロックであれば、色差信号は輝度信号と比較して水平方向の画素数が1/2となる長方形のブロックとなる。したがって、図8に示すように、YUV4:4:4信号をYUV4:2:2信号に変換した際に、輝度信号と色差信号で同一方向の予測となるようにするためには、YUV4:2:2信号上では、垂直方向予測と水平方向予測以外の方向性予測の場合には、色差信号の予測方向が輝度信号の予測方向と異なることとなる。具体的には、図9に示すように、輝度信号の予測方向ベクトルをv=(dx,dy)とした場合、色差信号の予測方向ベクトルは、v=(dx/2,dy)となる。即ち、図10に示すように、予測方向の角度をθとした場合、輝度信号の予測方向の角度をθ、色差信号の予測方向の角度をθとして、tanθ=2tanθの関係となる予測方向で予測する必要がある。 When the input signal format is a YUV 4: 2: 2 signal and the luminance signal is a square block as shown in FIG. 7, the color difference signal has half the number of pixels in the horizontal direction compared to the luminance signal. It becomes a rectangular block. Therefore, as shown in FIG. 8, when the YUV4: 4: 4 signal is converted into a YUV4: 2: 2 signal, in order to predict the luminance signal and the color difference signal in the same direction, YUV4: 2 : On two signals, in the case of directional prediction other than vertical prediction and horizontal prediction, the prediction direction of the color difference signal is different from the prediction direction of the luminance signal. Specifically, as shown in FIG. 9, when the prediction direction vector of the luminance signal is v L = (dx L , dy L ), the prediction direction vector of the color difference signal is v C = (dx L / 2, dy L ). That is, as shown in FIG. 10, when the angle of the prediction direction is θ, the angle of the prediction direction of the luminance signal is θ L , the angle of the prediction direction of the color difference signal is θ C , and tan θ C = 2tan θ L It is necessary to predict in the prediction direction.

したがって、輝度信号と色差信号で同一方向の予測を行う上記DMモードを正しく実施できるようにするために、入力信号フォーマットがYUV4:2:2信号である場合、輝度信号に使用したイントラ予測モードのインデックスを色差信号の予測に用いるイントラ予測モードのインデックスに変換し、変換後のインデックスに対応するイントラ予測モードによる色差信号の予測処理を実施する。具体的には、インデックスの変換テーブルを用意し、その変換テーブルを参照することで、インデックスを変換するように構成してもよいし、予め変換式を用意して、その変換式に従ってインデックスを変換するように構成してもよい。このように構成することで、方向性予測処理自体を変更することなく、インデックスの変換のみで、YUV4:2:2信号のフォーマットに応じた色差信号の適切な予測を実施することができる。   Therefore, when the input signal format is a YUV 4: 2: 2 signal in order to correctly implement the DM mode in which the prediction in the same direction is performed with the luminance signal and the color difference signal, the intra prediction mode used for the luminance signal is used. The index is converted into an index of an intra prediction mode used for prediction of the color difference signal, and the prediction process of the color difference signal in the intra prediction mode corresponding to the converted index is performed. Specifically, an index conversion table may be prepared, and the index may be converted by referring to the conversion table. Alternatively, a conversion formula is prepared in advance, and the index is converted according to the conversion formula. You may comprise. With this configuration, it is possible to perform appropriate prediction of the color difference signal according to the format of the YUV 4: 2: 2 signal only by converting the index without changing the directionality prediction process itself.

イントラブロックコピー予測部35は可変長復号部31により可変長復号されたブロック分割情報から特定される符号化ブロックに係る符号化モードがイントラブロックコピー符号化モードである場合、その符号化ブロック内の予測ブロックが属している最大符号化ブロックの中で、未だ復号が済んでいない領域内の各画素の画素値を所定の方法で仮定する処理を実施する。また、イントラブロックコピー予測部35は符号化ブロック内の予測ブロック毎に、同一のピクチャ内で既に復号が済んでいる領域の中から、当該予測ブロックと最も近似しているブロックである参照ブロックを探索して、その参照ブロックを当該予測ブロックの予測画像に決定する処理を実施する。   The intra block copy prediction unit 35, when the coding mode related to the coding block specified from the block division information variable-length decoded by the variable length decoding unit 31 is the intra block copy coding mode, In the maximum coding block to which the prediction block belongs, a process of assuming a pixel value of each pixel in a region not yet decoded by a predetermined method is performed. In addition, the intra block copy prediction unit 35 selects, for each prediction block in the encoded block, a reference block that is a block that is closest to the prediction block from among regions that have already been decoded in the same picture. A process of searching and determining the reference block as a prediction image of the prediction block is performed.

動き補償予測部36は可変長復号部31により可変長復号されたブロック分割情報から特定される符号化ブロックに係る符号化モードがインター符号化モードである場合、動き補償予測フレームメモリ40に格納されている復号画像を参照しながら、切換スイッチ33から出力された動きベクトルとインター予測パラメータを用いたインター予測処理(動き補償予測処理)を実施してインター予測画像を生成する処理を実施する。   The motion compensation prediction unit 36 is stored in the motion compensation prediction frame memory 40 when the coding mode related to the coding block specified from the block division information variable-length decoded by the variable length decoding unit 31 is the inter coding mode. The inter prediction process (motion compensation prediction process) using the motion vector output from the changeover switch 33 and the inter prediction parameter is performed while referring to the decoded image, and the process of generating the inter prediction image is performed.

加算部37は逆量子化・逆変換部32により算出された復号予測差分信号と、イントラ予測部34により生成されたイントラ予測画像、イントラブロックコピー予測部35により生成されたイントラブロックコピー予測画像、又は、動き補償予測部36により生成されたインター予測画像とを加算して、図1の加算部11から出力された局所復号画像と同一の復号画像を算出する処理を実施する。
イントラ用メモリ38は加算部37により算出された復号画像をイントラ予測処理及びイントラブロックコピー予測処理で用いる参照画像として格納する記録媒体である。
The addition unit 37 includes a decoded prediction difference signal calculated by the inverse quantization / inverse conversion unit 32, an intra prediction image generated by the intra prediction unit 34, an intra block copy prediction image generated by the intra block copy prediction unit 35, Or the inter prediction image produced | generated by the motion compensation prediction part 36 is added, and the process which calculates the decoding image same as the local decoding image output from the addition part 11 of FIG. 1 is implemented.
The intra memory 38 is a recording medium that stores the decoded image calculated by the adding unit 37 as a reference image used in the intra prediction process and the intra block copy prediction process.

ループフィルタ部39は加算部37により算出された復号画像に対して、所定のフィルタ処理を実施して、フィルタ処理後の復号画像を出力する処理を実施する。具体的には、変換ブロックの境界や予測ブロックの境界に発生する歪みを低減するフィルタ(デブロッキングフィルタ)処理、画素単位に適応的にオフセットを加算する(画素適応オフセット)処理、ウィーナフィルタ等の線形フィルタを適応的に切り替えてフィルタ処理する適応フィルタ処理などを行う。
これらのループフィルタは、復号画像の画質を向上させることを目的として適用されるが、図42に示すようなスクリーンコンテンツの特殊なヒストグラム形状を考慮しておらず、十分な画質改善効果が得られない。そこで、この実施の形態1では、新たなループフィルタ処理としてヒストグラム補正処理を実施する。
The loop filter unit 39 performs a predetermined filter process on the decoded image calculated by the adder unit 37 and performs a process of outputting the decoded image after the filter process. Specifically, filter (deblocking filter) processing that reduces distortion occurring at the boundaries of transform blocks and prediction blocks, processing for adaptively adding an offset (pixel adaptive offset) for each pixel, Wiener filter, etc. Performs adaptive filter processing for adaptively switching linear filters and performing filter processing.
These loop filters are applied for the purpose of improving the image quality of the decoded image, but do not consider the special histogram shape of the screen content as shown in FIG. 42, and a sufficient image quality improvement effect can be obtained. Absent. Therefore, in the first embodiment, histogram correction processing is performed as new loop filter processing.

ループフィルタ部39は、上記のデブロッキングフィルタ処理、画素適応オフセット処理、適応フィルタ処理及びヒストグラム補正処理のそれぞれについて、可変長復号部31により可変長復号された各ヘッダ情報を参照することで、当該スライスで行うか否かを特定する。
このとき、2つ以上のフィルタ処理を行う場合において、例えば、画像符号化装置のループフィルタ部13が図12のように構成されていれば、図18に示すようにループフィルタ部39が構成される。当然、画像符号化装置のループフィルタ部13がデブロッキングフィルタ処理、画素適応オフセット処理及びヒストグラム補正処理から構成されていれば、ループフィルタ部39もデブロッキングフィルタ処理、画素適応オフセット処理及びヒストグラム補正処理で構成される。
The loop filter unit 39 refers to each header information variable length decoded by the variable length decoding unit 31 for each of the above deblocking filter processing, pixel adaptive offset processing, adaptive filter processing, and histogram correction processing. Specify whether to do this in slices.
At this time, when two or more filter processes are performed, for example, if the loop filter unit 13 of the image coding apparatus is configured as shown in FIG. 12, a loop filter unit 39 is configured as shown in FIG. The Naturally, if the loop filter unit 13 of the image encoding device is configured by deblocking filter processing, pixel adaptive offset processing, and histogram correction processing, the loop filter unit 39 also performs deblocking filter processing, pixel adaptive offset processing, and histogram correction processing. Consists of.

デブロッキングフィルタ処理では、可変長復号部31により可変長復号されたヘッダ情報を参照し、ブロック境界にかけるフィルタ強度の選択に用いる各種パラメータを初期値から変更する情報が存在する場合、その変更情報に基づいて、デブロッキングフィルタ処理を実施する。変更情報がない場合は、予め定められた手法に従って行う。
画素適応オフセット処理では、可変長復号部31により可変長復号された画素適応オフセット処理のブロック分割情報に基づいて復号画像を分割し、そのブロック単位に、可変長復号部31により可変長復号されたブロック単位のクラス分類手法を示すインデックスを参照して、そのインデックスが“オフセット処理を行わない”ことを示すインデックスでない場合、ブロック単位にブロック内の各画素を上記インデックスが示すクラス分類手法に従ってクラス分類する。なお、クラス分類手法の候補として、ループフィルタ部13の画素適応オフセット処理のクラス分類手法の候補と同一のものが予め用意されている。そして、ブロック単位の各クラスのオフセット値を特定するオフセット情報を参照して、復号画像の画素値にオフセットを加算する処理を行う。
In the deblocking filter processing, when there is information for changing various parameters used for selecting the filter strength applied to the block boundary from the initial value with reference to the header information variable-length decoded by the variable-length decoding unit 31, the change information Based on the above, deblocking filtering is performed. When there is no change information, it is performed according to a predetermined method.
In the pixel adaptive offset processing, the decoded image is divided based on the block division information of the pixel adaptive offset processing variable-length decoded by the variable-length decoding unit 31, and the variable-length decoding unit 31 performs variable-length decoding on the block basis. If the index indicating the block classification method is not an index indicating that “offset processing is not performed”, each pixel in the block is classified according to the class classification method indicated by the index. To do. Note that the same class classification method candidates as those for the pixel adaptive offset processing class classification method of the loop filter unit 13 are prepared in advance. Then, a process of adding the offset to the pixel value of the decoded image is performed with reference to the offset information specifying the offset value of each class in block units.

ただし、画像符号化装置のループフィルタ部13の画素適応オフセット処理において、ブロック分割情報は符号化せずに、常に画像を固定サイズのブロック単位(例えば、最大符号化ブロック単位)に分割し、そのブロック毎にクラス分類手法を選択して、クラス毎の適応オフセット処理を行うように構成されている場合、ループフィルタ部39においても、ループフィルタ部13と同一の固定サイズのブロック単位に画素適応オフセット処理を実施する。
適応フィルタ処理では、可変長復号部31により可変長復号されたクラス毎のフィルタを用いて、図1の画像符号化装置と同一の手法でクラス分類した後に、そのクラス分類情報に基づいてフィルタ処理を行う。
However, in the pixel adaptive offset processing of the loop filter unit 13 of the image encoding device, the block division information is not encoded, and the image is always divided into fixed-size block units (for example, the maximum encoded block unit). When a class classification method is selected for each block and adaptive offset processing for each class is performed, the loop filter unit 39 also has a pixel adaptive offset in units of blocks having the same fixed size as the loop filter unit 13. Perform the process.
In the adaptive filter process, after classifying by the same method as the image encoding apparatus of FIG. 1 using the filter for each class variable-length decoded by the variable-length decoding unit 31, the filter process is performed based on the class classification information. I do.

図19はヒストグラム補正処理を実施するループフィルタ部39内の処理部を示す構成図である。
図19において、ヒストグラム算出部41は加算部11により算出された復号画像を複数のブロックに分割し、その局所復号画像のブロック毎に画素値のヒストグラムを算出する処理を実施する。なお、ヒストグラム算出部41はヒストグラム算出手段を構成している。
画素値補正部42はヒストグラム算出部41により算出されたヒストグラムから符号化歪みに伴うノイズが重畳している画素を特定して、そのノイズが重畳している画素の画素値を補正する処理を実施する。
即ち、画素値補正部42はヒストグラム算出部41により算出されたヒストグラムにおけるピーク画素値を含む補正幅w(補正画素値範囲)内の画素値をピーク画素値に置換する処理を実施する。なお、画素値補正部42は画素値補正手段を構成している。
FIG. 19 is a configuration diagram illustrating a processing unit in the loop filter unit 39 that performs the histogram correction processing.
In FIG. 19, the histogram calculation unit 41 divides the decoded image calculated by the addition unit 11 into a plurality of blocks, and performs a process of calculating a pixel value histogram for each block of the local decoded image. The histogram calculator 41 constitutes a histogram calculator.
The pixel value correction unit 42 identifies a pixel on which noise accompanying coding distortion is superimposed from the histogram calculated by the histogram calculation unit 41, and performs a process of correcting the pixel value of the pixel on which the noise is superimposed. To do.
That is, the pixel value correction unit 42 performs a process of replacing the pixel value within the correction width w (correction pixel value range) including the peak pixel value in the histogram calculated by the histogram calculation unit 41 with the peak pixel value. The pixel value correction unit 42 constitutes a pixel value correction unit.

即ち、ヒストグラム補正処理では、ヒストグラム算出部41が、可変長復号部31により可変長復号されたヒストグラム補正処理のブロック分割情報に基づいて復号画像を分割し、そのブロック単位に、可変長復号部31により可変長復号されたヒストグラム補正を実施するか否かを表すフラグを参照して、そのフラグが“ヒストグラム補正処理を行わない”ことを示す値でない場合、当該ブロックで画素値のヒストグラムを算出する。
画素値補正部42は、ヒストグラム算出部41により算出されたヒストグラムのピーク画素値を所定の方法によって特定する。そのピーク画素値の近傍には、符号化歪みによるノイズが存在するため、ピーク画素値に近い画素値を持つ画素(可変長復号部31により可変長復号された補正幅w内の画素値)に対して、その画素値をピーク画素値で置換することで符号化歪みを低減する。
That is, in the histogram correction process, the histogram calculation unit 41 divides the decoded image based on the block division information of the histogram correction process variable-length decoded by the variable-length decoding unit 31, and the variable-length decoding unit 31 for each block. Referring to the flag indicating whether or not to perform histogram correction that has been subjected to variable length decoding in accordance with the above, if the flag is not a value indicating that “histogram correction processing is not performed”, a histogram of pixel values is calculated in the block .
The pixel value correction unit 42 specifies the peak pixel value of the histogram calculated by the histogram calculation unit 41 by a predetermined method. Since noise due to coding distortion exists in the vicinity of the peak pixel value, a pixel having a pixel value close to the peak pixel value (a pixel value within the correction width w that has been variable-length decoded by the variable-length decoding unit 31). On the other hand, encoding distortion is reduced by replacing the pixel value with a peak pixel value.

図17において、動き補償予測フレームメモリ40はループフィルタ部39のフィルタ処理後の復号画像をインター予測処理(動き補償予測処理)で用いる参照画像として格納する記録媒体である。   In FIG. 17, the motion compensation prediction frame memory 40 is a recording medium that stores the decoded image after the filter processing of the loop filter unit 39 as a reference image used in the inter prediction processing (motion compensation prediction processing).

図17の例では、画像復号装置の構成要素である可変長復号部31、逆量子化・逆変換部32、切換スイッチ33、イントラ予測部34、イントラブロックコピー予測部35、動き補償予測部36、加算部37、イントラ用メモリ38、ループフィルタ部39及び動き補償予測フレームメモリ40のそれぞれが専用のハードウェアで構成(イントラ用メモリ38及び動き補償予測フレームメモリ40以外の構成要素は、例えば、CPUを実装している半導体集積回路や、ワンチップマイコンなどで構成)されているものを想定しているが、画像復号装置がコンピュータで構成されていてもよい。   In the example of FIG. 17, a variable length decoding unit 31, an inverse quantization / inverse conversion unit 32, a changeover switch 33, an intra prediction unit 34, an intra block copy prediction unit 35, and a motion compensation prediction unit 36 that are components of the image decoding device. Each of the adder 37, the intra memory 38, the loop filter unit 39, and the motion compensated prediction frame memory 40 is configured by dedicated hardware (components other than the intra memory 38 and the motion compensated prediction frame memory 40 are, for example, It is assumed that the CPU is mounted on a semiconductor integrated circuit or a one-chip microcomputer), but the image decoding apparatus may be configured by a computer.

画像復号装置をコンピュータで構成する場合、イントラ用メモリ38及び動き補償予測フレームメモリ40をコンピュータのメモリ上に構成するとともに、可変長復号部31、逆量子化・逆変換部32、切換スイッチ33、イントラ予測部34、イントラブロックコピー予測部35、動き補償予測部36、加算部37及びループフィルタ部39の処理内容を記述しているプログラムをコンピュータのメモリに格納し、当該コンピュータのCPUが当該メモリに格納されているプログラムを実行するようにすればよい。
図20はこの発明の実施の形態1による画像復号装置の処理内容を示すフローチャートである。
When the image decoding device is configured by a computer, the intra memory 38 and the motion compensated prediction frame memory 40 are configured on the computer memory, and a variable length decoding unit 31, an inverse quantization / inverse conversion unit 32, a changeover switch 33, A program describing the processing contents of the intra prediction unit 34, the intra block copy prediction unit 35, the motion compensation prediction unit 36, the addition unit 37, and the loop filter unit 39 is stored in the memory of the computer, and the CPU of the computer stores the memory. The program stored in the program may be executed.
FIG. 20 is a flowchart showing the processing contents of the image decoding apparatus according to Embodiment 1 of the present invention.

次に動作について説明する。
この実施の形態1では、映像の各フレーム画像を入力画像として、符号化済みの近傍画素からのイントラ予測又は近接フレーム間での動き補償予測を実施して、得られた予測差分信号に対して直交変換・量子化による圧縮処理を施し、その後、可変長符号化を行って符号化ビットストリームを生成する画像符号化装置と、その画像符号化装置から出力される符号化ビットストリームを復号する画像復号装置について説明する。
Next, the operation will be described.
In the first embodiment, each frame image of a video is used as an input image, intra prediction from encoded neighboring pixels or motion compensation prediction between adjacent frames is performed, and an obtained prediction difference signal is obtained. An image encoding device that performs compression processing by orthogonal transform / quantization and then performs variable length encoding to generate an encoded bitstream, and an image that decodes the encoded bitstream output from the image encoding device A decoding apparatus will be described.

図1の画像符号化装置は、映像信号の空間・時間方向の局所的な変化に適応して、映像信号を多様なサイズのブロックに分割して、フレーム内・フレーム間適応符号化を行うことを特徴としている。一般的に、映像信号は、空間・時間的に信号の複雑さが局所的に変化する特性を有している。空間的に見ると、ある映像フレーム上では、例えば、空や壁などのような比較的広い画像領域中で均一な信号特性を有する絵柄もあれば、人物や細かいテクスチャを含む絵画など、小さい画像領域内で複雑なテクスチャパターンを有する絵柄も混在することがある。時間的に見ても、空や壁は局所的に時間方向の絵柄の変化は小さいが、動く人物や物体は、その輪郭が時間的に剛体・非剛体の運動をするため、時間的な変化が大きい。   The image encoding apparatus in FIG. 1 performs intra-frame and inter-frame adaptive encoding by dividing a video signal into blocks of various sizes in response to local changes in the spatial and temporal directions of the video signal. It is characterized by. In general, a video signal has a characteristic that the complexity of the signal changes locally in space and time. When viewed spatially, a small image, such as a picture with a uniform signal characteristic in a relatively wide image area such as the sky or a wall, or a picture containing a person or fine texture, on a video frame. A pattern having a complicated texture pattern in the region may be mixed. Even when viewed temporally, the change in the pattern of the sky and the wall locally in the time direction is small, but because the outline of the moving person or object moves rigidly or non-rigidly in time, the temporal change Is big.

符号化処理は、時間・空間的な予測によって、信号電力やエントロピーの小さい予測差分信号を生成して、全体の符号量を削減する処理を行うが、予測に用いるパラメータをできるだけ大きな画像信号領域に均一に適用できれば、当該パラメータの符号量を小さくすることができる。一方、時間的・空間的に変化の大きい画像信号パターンに対して、同一の予測パラメータを大きな画像領域に適用すると、予測の誤りが増えてしまうため、予測差分信号の符号量が増加してしまう。したがって、時間的・空間的に変化が大きい領域では、同一の予測パラメータを適用して予測処理を行うブロックサイズを小さくして、予測に用いるパラメータのデータ量を増やし、予測差分信号の電力・エントロピーを低減する方が望ましい。
この実施の形態1では、このような映像信号の一般的な性質に適応した符号化を行うため、最初に所定の最大ブロックサイズから予測処理等を開始し、階層的に映像信号の領域を分割し、分割した領域毎に予測処理や、その予測差分の符号化処理を適応化させる構成をとるようにしている。
In the encoding process, a prediction difference signal with small signal power and entropy is generated by temporal and spatial prediction to reduce the overall code amount. However, the parameters used for the prediction are set as large as possible in the image signal region. If it can be applied uniformly, the code amount of the parameter can be reduced. On the other hand, if the same prediction parameter is applied to a large image region with respect to an image signal pattern having a large temporal and spatial change, the number of prediction differential signals increases because prediction errors increase. . Therefore, in a region where the temporal and spatial changes are large, the block size for performing the prediction process by applying the same prediction parameter is reduced, the amount of parameter data used for prediction is increased, and the power and entropy of the prediction difference signal are increased. It is desirable to reduce
In the first embodiment, in order to perform coding adapted to the general characteristics of such a video signal, first, prediction processing or the like is started from a predetermined maximum block size, and the video signal region is divided hierarchically. In addition, the prediction process and the encoding process of the prediction difference are adapted for each divided area.

最初に、図1の画像符号化装置の処理内容を説明する。
まず、符号化制御部1は、符号化対象となるピクチャ(カレントピクチャ)のスライス分割状態を決めると共に、ピクチャの符号化に用いる最大符号化ブロックのサイズと、最大符号化ブロックを階層分割する階層数の上限を決定する(図16のステップST1)。
最大符号化ブロックのサイズの決め方としては、例えば、入力画像の映像信号の解像度に応じて、全てのピクチャに対して同一のサイズを定めてもよいし、入力画像の映像信号の局所的な動きの複雑さの違いをパラメータとして定量化して、動きの激しいピクチャには、小さいサイズを定める一方、動きが少ないピクチャには、大きいサイズを定めるようにしてもよい。
First, the processing contents of the image encoding device in FIG. 1 will be described.
First, the encoding control unit 1 determines a slice division state of a picture to be encoded (current picture), and the size of a maximum encoding block used for encoding a picture and a hierarchy for dividing the maximum encoding block into layers. The upper limit of the number is determined (step ST1 in FIG. 16).
As a method of determining the size of the maximum coding block, for example, the same size may be determined for all the pictures according to the resolution of the video signal of the input image, or the local motion of the video signal of the input image The size difference may be quantified as a parameter, and a small size may be determined for a picture with high motion, while a large size may be determined for a picture with little motion.

分割階層数の上限の決め方としては、例えば、入力画像の映像信号の解像度に応じて、全てのピクチャに対して同一の階層数を定める方法や、入力画像の映像信号の動きが激しい場合には、階層数を深くして、より細かい動きが検出できるように設定し、動きが少ない場合には、階層数を抑えるように設定する方法などがある。なお、上記最大符号化ブロックのサイズと、最大符号化ブロックを階層分割する階層数の上限は、シーケンスレベルヘッダなどで符号化する。その場合、分割階層数の上限の代わりに、符号化ブロックの最小ブロックサイズを符号化するようにしてもよい。即ち、最大符号化ブロックを分割階層数の上限まで分割したときのブロックのサイズが、符号化ブロックの最小ブロックサイズであるため、画像復号装置側において、最大符号化ブロックのサイズと符号化ブロックの最小ブロックサイズから分割階層数の上限を特定することができる。   For example, the upper limit of the number of division layers can be determined by, for example, determining the same number of layers for all pictures according to the resolution of the video signal of the input image, or when the motion of the video signal of the input image is severe There is a method in which the number of hierarchies is increased so that finer movements can be detected, and when there are few movements, the number of hierarchies is set to be suppressed. Note that the size of the maximum coding block and the upper limit of the number of hierarchies for dividing the maximum coding block into layers are coded by a sequence level header or the like. In that case, the minimum block size of the encoded block may be encoded instead of the upper limit of the number of division layers. That is, since the size of the block when the maximum encoded block is divided up to the upper limit of the number of division layers is the minimum block size of the encoded block, the size of the maximum encoded block and the size of the encoded block are determined on the image decoding device side. The upper limit of the number of divided hierarchies can be specified from the minimum block size.

また、符号化制御部1は、利用可能な1以上の符号化モードの中から、階層的に分割される各々の符号化ブロックに対応する符号化モードを選択する(図16のステップST2)。即ち、符号化制御部1は、最大符号化ブロックサイズの画像領域毎に、先に定めた分割階層数の上限に至るまで、階層的に符号化ブロックサイズを有する符号化ブロックに分割して、各々の符号化ブロックに対する符号化モードを決定する。   Also, the encoding control unit 1 selects an encoding mode corresponding to each encoding block divided hierarchically from one or more available encoding modes (step ST2 in FIG. 16). That is, the encoding control unit 1 divides the image area of the maximum encoding block size into encoded blocks having the encoding block size hierarchically until reaching the upper limit of the number of division layers defined above. A coding mode for each coding block is determined.

符号化モードには、1つないし複数のイントラ符号化モード(総称して「INTRA」と称する)と、1つないし複数のイントラブロックコピー符号化モード(総称して「ICOPY」と称する)と、1つないし複数のインター符号化モード(総称して、「INTER」と称する)とがあり、符号化制御部1は、当該ピクチャで利用可能な全ての符号化モード、又は、そのサブセットの中から、各々の符号化ブロックに対応する符号化モードを選択する。
ただし、後述するブロック分割部3により階層的に分割される各々の符号化ブロックは、さらに予測処理を行う単位である1つないし複数の予測ブロックに分割され、予測ブロックの分割状態も符号化モードの中に情報として含まれる。即ち、符号化モードは、どのような予測ブロック分割を持つイントラ符号化モード、イントラブロックコピー符号化モード又はインター符号化モードかを識別するインデックスである。
符号化制御部1による符号化モードの選択方法は、公知の技術であるため詳細な説明を省略するが、例えば、利用可能な任意の符号化モードを用いて、符号化ブロックに対する符号化処理を実施して符号化効率を検証し、利用可能な複数の符号化モードの中で、最も符号化効率がよい符号化モードを選択する方法などがある。
The coding modes include one or more intra coding modes (collectively referred to as “INTRA”), one or more intra block copy coding modes (collectively referred to as “ICOPY”), There are one or a plurality of inter coding modes (collectively referred to as “INTER”), and the coding control unit 1 can select from all the coding modes available in the picture or a subset thereof. The encoding mode corresponding to each encoding block is selected.
However, each coding block that is hierarchically divided by the block division unit 3 to be described later is further divided into one or a plurality of prediction blocks, which are units for performing prediction processing, and the division state of the prediction block is also coded mode. Is included as information. That is, the coding mode is an index for identifying what kind of prediction block division the intra coding mode, intra block copy coding mode, or inter coding mode is.
Since the encoding mode selection method by the encoding control unit 1 is a known technique, a detailed description thereof will be omitted. For example, an encoding process for an encoding block is performed using any available encoding mode. There is a method in which coding efficiency is verified by performing and a coding mode having the best coding efficiency is selected from among a plurality of available coding modes.

また、符号化制御部1は、各々の符号化ブロック毎に、差分画像が圧縮される際に用いられる量子化パラメータ及び変換ブロック分割状態を決定するとともに、予測処理が実施される際に用いられる予測パラメータ(イントラ予測パラメータ、イントラブロックコピー予測パラメータ又はインター予測パラメータ)を決定する。ただし、符号化ブロックがさらに予測処理を行う予測ブロック単位に分割される場合は、予測ブロック毎に予測パラメータ(イントラ予測パラメータ、イントラブロックコピー予測パラメータ又はインター予測パラメータ)を選択する。   The encoding control unit 1 determines a quantization parameter and a transform block division state used when the differential image is compressed for each encoding block, and is used when the prediction process is performed. A prediction parameter (intra prediction parameter, intra block copy prediction parameter, or inter prediction parameter) is determined. However, when the encoded block is further divided into prediction block units for performing prediction processing, a prediction parameter (intra prediction parameter, intra block copy prediction parameter, or inter prediction parameter) is selected for each prediction block.

ここで、図2は4:2:0フォーマットの信号における輝度信号及び色差信号の圧縮処理(変換処理、量子化処理)を実施する際の変換ブロックサイズを示す説明図である。変換ブロックサイズは、図2に示すように、符号化ブロックを四分木状に階層分割することによって決定される。
例えば、変換ブロックを分割する場合と変換ブロックを分割しない場合での符号量や、符号化誤差を加味した評価尺度などに基づいて、評価値が最小になるように変換ブロックを分割するか否かを決定することで、符号量と符号化誤差のトレードオフの観点から最適な変換ブロックの分割形状を決定することができる。
Here, FIG. 2 is an explanatory diagram showing the conversion block size when performing compression processing (conversion processing, quantization processing) of the luminance signal and the color difference signal in the 4: 2: 0 format signal. As shown in FIG. 2, the transform block size is determined by hierarchically dividing the encoded block into a quadtree.
For example, whether or not to divide the transform block so that the evaluation value is minimized based on the amount of code when the transform block is divided and when the transform block is not divided, the evaluation scale that takes into account the coding error, etc. By determining this, it is possible to determine the optimal transform block division shape from the viewpoint of the trade-off between the code amount and the coding error.

輝度信号については、例えば、図2に示すように、符号化ブロックが1つ又は複数の正方形の変換ブロックに階層的に分割されるように構成する。色差信号については、図2に示すように、入力信号フォーマットがYUV4:2:0信号である場合、輝度信号と同様に、符号化ブロックが1つ又は複数の正方形の変換ブロックに階層的に分割されるように構成する。この場合、色差信号の変換ブロックサイズは、対応する輝度信号の変換ブロックの縦横ともに半分のサイズとなる。   For example, as shown in FIG. 2, the luminance signal is configured so that the encoding block is hierarchically divided into one or a plurality of square transform blocks. For the color difference signal, as shown in FIG. 2, when the input signal format is a YUV 4: 2: 0 signal, the encoding block is hierarchically divided into one or a plurality of square transform blocks as with the luminance signal. To be configured. In this case, the conversion block size of the color difference signal is half the vertical and horizontal sizes of the corresponding luminance signal conversion block.

入力信号フォーマットがYUV4:2:2信号である場合、図3に示すように、輝度信号と同様の四分木状の階層分割を行う。また、分割したブロックの形状が、垂直方向の画素数が水平方向の画素数の2倍になる長方形となるため、さらに、分割したブロックを上下に二分することで、YUV4:2:0信号での色差信号と同じブロックサイズ(輝度信号の変換ブロックの縦横ともに半分のサイズ)の変換ブロック2つで構成するようにする。
また、入力信号フォーマットがYUV4:4:4信号である場合、図4に示すように、色差信号の変換ブロックは、常に輝度信号の変換ブロックと同様の分割を行い、同じサイズの変換ブロックとなるように構成する。
When the input signal format is a YUV 4: 2: 2 signal, quadtree-like hierarchical division similar to the luminance signal is performed as shown in FIG. In addition, the shape of the divided block is a rectangle in which the number of pixels in the vertical direction is twice the number of pixels in the horizontal direction. The color difference signal is composed of two conversion blocks having the same block size (half the vertical and horizontal sizes of the luminance signal conversion block).
When the input signal format is a YUV 4: 4: 4 signal, the color difference signal conversion block is always divided in the same manner as the luminance signal conversion block as shown in FIG. Configure as follows.

符号化制御部1は、符号化ブロックにおける変換ブロックの分割情報を示す変換ブロック分割情報や、変換係数の量子化を行う際の量子化ステップサイズを規定する量子化パラメータなどを含む予測差分符号化パラメータを変換・量子化部9、逆量子化・逆変換部10及び可変長符号化部15に出力する。
符号化制御部1は、イントラ予測パラメータを必要に応じてイントラ予測部5に出力する。
また、符号化制御部1は、イントラブロックコピー予測パラメータを必要に応じてイントラブロックコピー予測部6に出力する。
また、符号化制御部1は、インター予測パラメータを必要に応じて動き補償予測部7に出力する。
The encoding control unit 1 includes predictive differential encoding including transform block partition information indicating transform block partition information in a block to be encoded, a quantization parameter that defines a quantization step size when transform coefficients are quantized, and the like. The parameter is output to the transform / quantization unit 9, the inverse quantization / inverse transform unit 10, and the variable length coding unit 15.
The encoding control unit 1 outputs intra prediction parameters to the intra prediction unit 5 as necessary.
Also, the encoding control unit 1 outputs the intra block copy prediction parameters to the intra block copy prediction unit 6 as necessary.
Also, the encoding control unit 1 outputs inter prediction parameters to the motion compensation prediction unit 7 as necessary.

スライス分割部2は、入力画像として映像信号を入力すると、その入力画像を符号化制御部1により決定されたスライス分割情報にしたがって1以上の部分画像であるスライスに分割する。
ブロック分割部3は、スライス分割部2から各スライスを入力する毎に、そのスライスを符号化制御部1により決定された最大符号化ブロックサイズに分割し、さらに、分割した最大符号化ブロックを符号化制御部1により決定された符号化ブロックへ階層的に分割して、その符号化ブロックを出力する。
When a video signal is input as an input image, the slice division unit 2 divides the input image into slices that are one or more partial images according to the slice division information determined by the encoding control unit 1.
Each time each slice is input from the slice dividing unit 2, the block dividing unit 3 divides the slice into the maximum encoded block size determined by the encoding control unit 1, and further encodes the divided maximum encoded block. The coding block is hierarchically divided into coding blocks determined by the coding control unit 1, and the coding blocks are output.

ここで、図21は最大符号化ブロックが階層的に複数の符号化ブロックに分割される例を示す説明図である。
図21において、最大符号化ブロックは、「第0階層」と記されている輝度成分が(L,M)のサイズを有する符号化ブロックである。最大符号化ブロックを出発点として、4分木構造で別途定める所定の深さまで、階層的に分割を行うことによって符号化ブロックを得るようにしている。深さnにおいては、符号化ブロックはサイズ(L,M)の画像領域である。ただし、LとMは、同じであってもよいし、異なっていてもよいが、図21では、L=Mのケースを示している。
Here, FIG. 21 is an explanatory diagram showing an example in which the maximum coding block is hierarchically divided into a plurality of coding blocks.
In FIG. 21, the maximum coding block is a coding block whose luminance component described as “0th layer” has a size of (L 0 , M 0 ). Starting from the maximum encoding block, the encoding block is obtained by performing hierarchical division to a predetermined depth separately defined by a quadtree structure. At depth n, the coding block is an image area of size (L n , M n ). However, L n and M n may be the same or different, but FIG. 21 shows a case of L n = M n .

以降、符号化制御部1により決定される符号化ブロックサイズは、符号化ブロックの輝度成分におけるサイズ(L,M)と定義する。4分木分割を行うため、常に、(Ln+1,Mn+1)=(L/2,M/2)が成立する。なお、RGB信号など、全ての色成分が同一サンプル数を有するカラー映像信号(4:4:4フォーマット)では、全ての色成分のサイズが(L,M)になるが、4:2:0フォーマットを扱う場合、対応する色差成分の符号化ブロックサイズは(L/2,M/2)になる。 Hereinafter, the coding block size determined by the coding control unit 1 is defined as the size (L n , M n ) in the luminance component of the coding block. Since quadtree partitioning is performed, (L n + 1 , M n + 1 ) = (L n / 2, M n / 2) always holds. Note that in a color video signal (4: 4: 4 format) in which all color components have the same number of samples, such as RGB signals, the size of all color components is (L n , M n ), but 4: 2. : When the 0 format is handled, the encoding block size of the corresponding color difference component is (L n / 2, M n / 2).

以降、第n階層の符号化ブロックをBで表し、符号化ブロックBで選択可能な符号化モードをm(B)で表すものとする。複数の色成分からなるカラー映像信号の場合、符号化モードm(B)は、色成分毎に、それぞれ個別のモードを用いるように構成されてもよいし、全ての色成分に対し共通のモードを用いるように構成されてもよい。以降、特に断らない限り、YUV信号、4:2:0フォーマットの符号化ブロックの輝度成分に対する符号化モードを指すものとして説明を行う。 Hereinafter, the coding block of the n hierarchy expressed in B n, denote the encoding modes selectable by the coding block B n with m (B n). In the case of a color video signal composed of a plurality of color components, the encoding mode m (B n ) may be configured to use an individual mode for each color component, or common to all color components. It may be configured to use a mode. Hereinafter, unless otherwise specified, description will be made assuming that it indicates a coding mode for a luminance component of a coding block of a YUV signal and 4: 2: 0 format.

符号化ブロックBは、図21に示すように、ブロック分割部3によって、予測処理単位を表す1つないし複数の予測ブロックに分割される。以降、符号化ブロックBに属する予測ブロックをP (iは、第n階層における予測ブロック番号)と表記する。図21にはP とP の例を示している。符号化ブロックB内の予測ブロックの分割が、どのようになされているかは、符号化モードm(B)の中に情報として含まれる。予測ブロックP は、全て符号化モードm(B)に従って予測処理が行われるが、予測ブロックP 毎に、個別の予測パラメータ(イントラ予測パラメータ、イントラブロックコピー予測パラメータ又はインター予測パラメータ)を選択することができる。 As shown in FIG. 21, the coding block B n is divided into one or a plurality of prediction blocks representing a prediction processing unit by the block dividing unit 3. Hereinafter, a prediction block belonging to the coding block B n is denoted as P i n (i is a prediction block number in the n-th layer). FIG. 21 shows an example of P 0 0 and P 1 0 . How the prediction block is divided in the coding block Bn is included as information in the coding mode m ( Bn ). Prediction blocks P i n are all subjected to prediction processing according to the encoding mode m (B n ). For each prediction block P i n , individual prediction parameters (intra prediction parameters, intra block copy prediction parameters, or inter prediction parameters) are used. ) Can be selected.

符号化制御部1は、最大符号化ブロックに対して、例えば、図22に示すようなブロック分割状態を生成して、符号化ブロックを特定する。図22(a)の点線で囲まれた矩形が各符号化ブロックを表し、各符号化ブロック内にある斜線で塗られたブロックが各予測ブロックの分割状態を表している。図22(b)は、図22(a)の例について、階層分割によって符号化モードm(B)が割り当てられる状況を4分木グラフで示したものである。図22(b)の□で囲まれているノードは、符号化モードm(B)が割り当てられたノード(符号化ブロック)である。この4分木グラフの情報は符号化モードm(B)と共に符号化制御部1から可変長符号化部15に出力されて、ビットストリームに多重化される。 For example, the encoding control unit 1 generates a block division state as illustrated in FIG. 22 for the maximum encoding block, and specifies the encoding block. A rectangle surrounded by a dotted line in FIG. 22A represents each coding block, and a block painted with diagonal lines in each coding block represents a division state of each prediction block. FIG. 22B shows a situation in which the coding mode m (B n ) is assigned by hierarchical division in the quadtree graph for the example of FIG. Nodes surrounded by □ in FIG. 22B are nodes (encoding blocks) to which the encoding mode m (B n ) is assigned. Information of the quadtree graph is output from the encoding control unit 1 to the variable length encoding unit 15 together with the encoding mode m (B n ), and is multiplexed into the bit stream.

切換スイッチ4は、符号化制御部1により決定された符号化モードm(B)がイントラ符号化モードである場合(m(B)∈INTRAの場合)、ブロック分割部3から出力された符号化ブロックBをイントラ予測部5に出力し、符号化制御部1により決定された符号化モードm(B)がイントラブロックコピー符号化モードである場合(m(B)∈ICOPYの場合)、ブロック分割部3から出力された符号化ブロックBをイントラブロックコピー予測部6に出力し、符号化制御部1により決定された符号化モードm(B)がインター符号化モードである場合(m(B)∈INTERの場合)、ブロック分割部3から出力された符号化ブロックBを動き補償予測部7に出力する。 The changeover switch 4 is output from the block dividing unit 3 when the coding mode m (B n ) determined by the coding control unit 1 is an intra coding mode (when m (B n ) ∈INTRA). When the coding block B n is output to the intra prediction unit 5 and the coding mode m (B n ) determined by the coding control unit 1 is the intra block copy coding mode (m (B n ) ∈ICOPY The encoding block B n output from the block division unit 3 is output to the intra block copy prediction unit 6, and the encoding mode m (B n ) determined by the encoding control unit 1 is the inter encoding mode. In some cases (when m (B n ) εINTER), the encoded block B n output from the block dividing unit 3 is output to the motion compensation prediction unit 7.

イントラ予測部5は、符号化制御部1により決定された符号化モードm(B)がイントラ符号化モードであり(m(B)∈INTRAの場合)、切換スイッチ4から符号化ブロックBを受けると(図16のステップST3)、イントラ用メモリ12に格納されている局所復号画像を参照しながら、符号化制御部1により決定されたイントラ予測パラメータを用いて、その符号化ブロックB内の各予測ブロックP に対するイントラ予測処理を実施して、イントラ予測画像PINTRAi を生成する(図16のステップST4)。 In the intra prediction unit 5, the coding mode m (B n ) determined by the coding control unit 1 is an intra coding mode (when m (B n ) ∈INTRA), and the coding block B is changed from the changeover switch 4 to the coding block B. When n is received (step ST3 in FIG. 16), the encoding block B is determined using the intra prediction parameter determined by the encoding control unit 1 while referring to the local decoded image stored in the intra memory 12. and implementing intra prediction process for each of the prediction block P i n in the n, generates an intra prediction image P INTRAi n (step ST4 in FIG. 16).

ただし、詳細は後述するが、イントラ予測画像を生成する処理を行う際に、予測ブロックに隣接する符号化済みの画素を用いることから、イントラ予測画像を生成する処理は、予測処理に用いる予測ブロックに隣接する画素が既に符号化済みとなるように常に変換ブロック単位に行われなくてはならない。したがって、符号化モードがイントラ符号化モードである符号化ブロックでは、選択可能な変換ブロックのブロックサイズは、予測ブロックのサイズ以下に制限され、さらに、変換ブロックが予測ブロックより小さい場合(予測ブロック内に複数の変換ブロックが存在する場合)には、変換ブロック単位に、当該予測ブロックで定められたイントラ予測パラメータを用いたイントラ予測処理を実施してイントラ予測画像を生成する処理を実施する。
なお、図17の画像復号装置がイントラ予測画像PINTRAi と全く同じイントラ予測画像を生成する必要があるため、イントラ予測画像PINTRAi の生成に用いられたイントラ予測パラメータは、符号化制御部1から可変長符号化部15に出力されて、ビットストリームに多重化される。イントラ予測部5の処理内容の詳細は後述する。
However, although details will be described later, since the encoded pixel adjacent to the prediction block is used when performing the process of generating the intra prediction image, the process of generating the intra prediction image is the prediction block used for the prediction process. Must always be performed in units of transform blocks so that pixels adjacent to are already encoded. Therefore, in a coding block in which the coding mode is the intra coding mode, the block size of the selectable transform block is limited to the size of the prediction block or smaller and the transform block is smaller than the prediction block (in the prediction block). In the case where there are a plurality of transform blocks, the intra prediction process using the intra prediction parameters defined in the prediction block is performed for each transform block to generate an intra predicted image.
Incidentally, since it is necessary to image decoding apparatus of FIG. 17 to generate exactly the same intra prediction image and the intra prediction image P INTRAi n, intra prediction parameters used for generating the intra prediction image P INTRAi n, the encoding control unit 1 is output to the variable length encoding unit 15 and multiplexed into the bit stream. Details of processing contents of the intra prediction unit 5 will be described later.

イントラブロックコピー予測部6は、符号化制御部1により決定された符号化モードm(B)がイントラブロックコピー符号化モードであり(m(B)∈ICOPYの場合)、切換スイッチ4から符号化ブロックBを受けると(図16のステップST3)、その符号化ブロックB内の各予測ブロックP とイントラ用メモリ12に格納されている局所復号画像を比較してブロックシフトベクトルを探索する。即ち、イントラブロックコピー予測部6は、イントラ用メモリ12に格納されている局所復号画像の中で、予測ブロックP と最も近似している領域のブロック(参照ブロック)を特定して、その参照ブロックを指し示すブロックシフトベクトルを探索する。
イントラブロックコピー予測部6は、参照ブロックを指し示すブロックシフトベクトルを探索すると、そのブロックシフトベクトルが指し示す参照ブロックを予測ブロックP の予測画像として、イントラブロックコピー予測画像PICOPYi を生成する(図16のステップST5)。
The intra block copy prediction unit 6 is the intra block copy encoding mode when the encoding mode m (B n ) determined by the encoding control unit 1 is m (B n ) ∈ICOPY, and When the encoded block B n is received (step ST3 in FIG. 16), each prediction block P i n in the encoded block B n is compared with the locally decoded image stored in the intra memory 12, and a block shift vector is obtained. Explore. That is, the intra block copy prediction unit 6, in the local decoded image stored in the intra-memory 12, to identify the block (reference block) in the region which is the most approximate to the prediction block P i n, that Search for a block shift vector pointing to the reference block.
Intra block copy prediction unit 6, when searching for a block shift vector pointing to the reference block, the reference block whose block shift vector is pointing as the predicted image of the prediction block P i n, generates an intra block copy predicted image P ICOPYi n ( Step ST5 in FIG.

図17の画像復号装置では、イントラブロックコピー予測画像PICOPYi と全く同じイントラブロックコピー予測画像を生成する必要があるため、イントラブロックコピー予測画像PICOPYi の生成に用いられたイントラブロックコピー予測パラメータは、符号化制御部1から可変長符号化部15に出力されて、ビットストリームに多重化される。
イントラブロックコピー予測パラメータとしては、イントラブロックコピー予測部6により探索されたブロックシフトベクトルが挙げられる。また、ブロックシフトベクトルは直前の符号化済み予測ブロックのブロックシフトベクトル、あるいは当該予測ブロックの周囲の符号化済み予測ブロックのブロックシフトベクトルとの差分値をイントラブロックコピー予測パラメータの一部として符号化するようにしてもよい。
In the image decoding apparatus of FIG. 17, it is necessary to generate exactly the same intra block copy predictive image and the intra block copy predicted image P ICOPYi n, intra block copy prediction is used for generating the intra block copy predicted image P ICOPYi n The parameters are output from the encoding control unit 1 to the variable length encoding unit 15 and multiplexed into the bit stream.
Examples of the intra block copy prediction parameter include a block shift vector searched by the intra block copy prediction unit 6. Also, the block shift vector is encoded by using the block shift vector of the previous encoded prediction block or the difference value with the block shift vector of the encoded prediction block around the prediction block as a part of the intra block copy prediction parameter. You may make it do.

動き補償予測部7は、符号化制御部1により決定された符号化モードm(B)がインター符号化モードであり(m(B)∈INTERの場合)、切換スイッチ4から符号化ブロックBを受けると(図16のステップST3)、その符号化ブロックB内の各予測ブロックP と動き補償予測フレームメモリ14に格納されているフィルタ処理後の局所復号画像を比較して動きベクトルを探索し、その動きベクトルと符号化制御部1により決定されたインター予測パラメータを用いて、その符号化ブロックB内の各予測ブロックP に対するインター予測処理を実施して、インター予測画像PINTERi を生成する(図16のステップST6)。 The motion compensated prediction unit 7 uses the encoding switch 4 from the changeover switch 4 when the encoding mode m (B n ) determined by the encoding control unit 1 is the inter encoding mode (when m (B n ) ∈INTER). When receiving B n (step ST3 in FIG. 16), each prediction block P i n in the encoded block B n is compared with the locally decoded image after filtering stored in the motion compensated prediction frame memory 14. It searches a motion vector, by using the inter prediction parameters determined by the motion vector and the encoding control unit 1, to implement the inter-prediction processing for each of the prediction block P i n in the encoding block B n, inter generating a predicted image P INTERi n (step ST6 in FIG. 16).

図17の画像復号装置がインター予測画像PINTERi と全く同じインター予測画像を生成する必要があるため、インター予測画像PINTERi の生成に用いられたインター予測パラメータは、符号化制御部1から可変長符号化部15に出力されて、ビットストリームに多重化される。
また、動き補償予測部7により探索された動きベクトルも可変長符号化部15に出力されて、ビットストリームに多重化される。
Since the image decoding apparatus of FIG. 17 needs to generate exactly the same inter prediction image and the inter-predicted image P INTERi n, inter prediction parameters used for generating the inter prediction image P INTERi n from the coding controller 1 The data is output to the variable length encoding unit 15 and multiplexed into the bit stream.
The motion vector searched by the motion compensation prediction unit 7 is also output to the variable length encoding unit 15 and multiplexed into the bit stream.

減算部8は、ブロック分割部3から符号化ブロックBを受けると、その符号化ブロックB内の予測ブロックP から、イントラ予測部5により生成されたイントラ予測画像PINTRAi 、イントラブロックコピー予測部6により生成されたイントラブロックコピー予測画像PICOPYi 、又は、動き補償予測部7により生成されたインター予測画像PINTERi のいずれかを減算して、その減算結果である差分画像を示す予測差分信号e を変換・量子化部9に出力する(図16のステップST7)。 Subtracting unit 8 receives the encoded block B n from the block dividing unit 3, from its prediction block P i n the coded block B n, the intra prediction image P INTRAi n generated by the intra prediction unit 5, the intra block copy prediction unit 6 intra block copy predicted image P ICOPYi n generated by, or subtracts one of the inter-prediction image P INTERi n generated by the motion compensation prediction unit 7, which is the subtraction result difference image the prediction difference signal e i n outputs the transform and quantization unit 9 shown (step ST7 in FIG. 16).

変換・量子化部9は、減算部8から予測差分信号e を受けると、符号化制御部1により決定された予測差分符号化パラメータに含まれる変換ブロック分割情報を参照して、その予測差分信号e に対する直交変換処理(例えば、DCT(離散コサイン変換)やDST(離散サイン変換)、予め特定の学習系列に対して基底設計がなされているKL変換等の直交変換処理)を変換ブロック単位に実施して、変換係数を算出する。
また、変換・量子化部9は、その予測差分符号化パラメータに含まれる量子化パラメータを参照して、その変換ブロック単位の変換係数を量子化し、量子化後の変換係数である圧縮データを逆量子化・逆変換部10及び可変長符号化部15に出力する(図16のステップST8)。このとき、上記量子化パラメータから算出される量子化ステップサイズを変換係数毎にスケーリングする量子化マトリクスを用いて量子化処理を実施するようにしてもよい。
When the transform / quantization unit 9 receives the prediction difference signal e i n from the subtraction unit 8, the transform / quantization unit 9 refers to the transform block division information included in the prediction difference encoding parameter determined by the encoding control unit 1, and performs the prediction. orthogonal transform processing with respect to the difference signal e i n (e.g., DCT (discrete cosine transform) or DST (discrete sine transform), the orthogonal transform for KL conversion and the base design have been made in advance to the particular learning sequence) to transform This is performed for each block, and a conversion coefficient is calculated.
Also, the transform / quantization unit 9 refers to the quantization parameter included in the prediction differential encoding parameter, quantizes the transform coefficient of the transform block unit, and reverses the compressed data that is the transform coefficient after quantization. The data is output to the quantization / inverse transform unit 10 and the variable length coding unit 15 (step ST8 in FIG. 16). At this time, the quantization process may be performed using a quantization matrix that scales the quantization step size calculated from the quantization parameter for each transform coefficient.

量子化マトリクスは、各直交変換サイズで色信号や符号化モード(イントラ符号化かインター符号化か)毎に独立しているマトリクスを使用することができ、初期値として、画像符号化装置及び画像復号装置で、予め共通に用意されている量子化マトリクスや既に符号化された量子化マトリクスの中から選択するか、新しい量子化マトリクスを用いるかをそれぞれ選択することができる。したがって、変換・量子化部9は、各直交変換サイズに対して色信号や符号化モード毎に、新しい量子化マトリクスを用いるか否かを示すフラグ情報を符号化すべき量子化マトリクスパラメータに設定する。   As the quantization matrix, an independent matrix can be used for each color signal and coding mode (intra coding or inter coding) at each orthogonal transform size. As an initial value, an image coding device and an image are used. In the decoding apparatus, it is possible to select whether to use a previously prepared quantization matrix or an already encoded quantization matrix or to use a new quantization matrix. Accordingly, the transform / quantization unit 9 sets flag information indicating whether or not to use a new quantization matrix for each orthogonal transform size for each color signal or coding mode, in a quantization matrix parameter to be encoded. .

さらに、新しい量子化マトリクスを用いる場合には、図11に示すような量子化マトリクスの各スケーリング値を符号化すべき量子化マトリクスパラメータに設定する。一方、新しい量子化マトリクスを用いない場合には、初期値として、画像符号化装置及び画像復号装置で、予め共通に用意されている量子化マトリクス、又は、既に符号化された量子化マトリクスの中から、使用するマトリクスを特定するインデックスを符号化すべき量子化マトリクスパラメータに設定する。ただし、参照可能な既に符号化された量子化マトリクスが存在しない場合、画像符号化装置及び画像復号装置で、予め共通に用意されている量子化マトリクスのみ選択可能となる。そして、変換・量子化部9は、設定した量子化マトリクスパラメータを可変長符号化部15に出力する。   Furthermore, when a new quantization matrix is used, each scaling value of the quantization matrix as shown in FIG. 11 is set as a quantization matrix parameter to be encoded. On the other hand, when a new quantization matrix is not used, as an initial value, a quantization matrix prepared in advance by the image encoding device and the image decoding device, or a quantization matrix that has already been encoded is used. Thus, an index for specifying a matrix to be used is set as a quantization matrix parameter to be encoded. However, when there is no already-encoded quantization matrix that can be referred to, only the quantization matrix prepared in advance can be selected in advance in the image encoding device and the image decoding device. Then, the transform / quantization unit 9 outputs the set quantization matrix parameter to the variable length coding unit 15.

逆量子化・逆変換部10は、変換・量子化部9から圧縮データを受けると、符号化制御部1により決定された予測差分符号化パラメータに含まれる量子化パラメータ及び変換ブロック分割情報を参照して、変換ブロック単位にその圧縮データを逆量子化する。変換・量子化部9が量子化処理に量子化マトリクスを用いている場合には、逆量子化処理時においても、その量子化マトリクスを参照して、対応した逆量子化処理を実施する。
また、逆量子化・逆変換部10は、変換ブロック単位に逆量子化後の圧縮データである変換係数に対する逆直交変換処理(例えば、逆DCT、逆DST、逆KL変換など)を実施して、減算部8から出力された予測差分信号e に相当する局所復号予測差分信号を算出して加算部11に出力する(図16のステップST9)。
When the inverse quantization / inverse transform unit 10 receives the compressed data from the transform / quantization unit 9, the inverse quantization / inverse transform unit 10 refers to the quantization parameter and transform block division information included in the prediction difference coding parameter determined by the coding control unit 1 Then, the compressed data is inversely quantized for each transform block. When the transform / quantization unit 9 uses a quantization matrix for the quantization process, the corresponding inverse quantization process is performed with reference to the quantization matrix even during the inverse quantization process.
Further, the inverse quantization / inverse transform unit 10 performs inverse orthogonal transform processing (for example, inverse DCT, inverse DST, inverse KL transform, etc.) on transform coefficients that are compressed data after inverse quantization for each transform block. calculates a local decoded prediction difference signal corresponding to the prediction difference signal e i n output from the subtraction unit 8 outputs to the adder 11 (step ST9 of FIG. 16).

加算部11は、逆量子化・逆変換部10から局所復号予測差分信号を受けると、その局所復号予測差分信号と、イントラ予測部5により生成されたイントラ予測画像PINTRAi 、イントラブロックコピー予測部6により生成されたイントラブロックコピー予測画像PICOPYi 、又は、動き補償予測部7により生成されたインター予測画像PINTERi のいずれかを加算することで、局所復号画像を算出する(図16のステップST10)。
また、加算部11は、その局所復号画像をループフィルタ部13に出力するとともに、その局所復号画像をイントラ用メモリ12に格納する。この局所復号画像が、以降のイントラ予測処理及びイントラブロックコピー予測処理の際に用いられる符号化済みの画像信号になる。
Addition unit 11, when the inverse quantization and inverse transform unit 10 receives the local decoded prediction difference signal, and the local decoded prediction difference signal, an intra prediction image P INTRAi n generated by the intra prediction unit 5, the intra block copy prediction part 6 intra block copy predicted image P ICOPYi n generated by, or by adding one of the inter-prediction image P INTERi n generated by the motion compensation prediction unit 7 calculates a local decoded image (FIG. 16 Step ST10).
The adding unit 11 outputs the locally decoded image to the loop filter unit 13 and stores the locally decoded image in the intra memory 12. This locally decoded image becomes an encoded image signal used in the subsequent intra prediction process and intra block copy prediction process.

ループフィルタ部13は、加算部11から局所復号画像を受けると、その局所復号画像に対して、所定のフィルタ処理を実施して、フィルタ処理後の局所復号画像を動き補償予測フレームメモリ14に格納する(図16のステップST11)。具体的には、変換ブロックの境界や予測ブロックの境界に発生する歪みを低減するフィルタ(デブロッキングフィルタ)処理、画素単位に適応的にオフセットを加算する(画素適応オフセット)処理、ウィーナフィルタ等の線形フィルタを適応的に切り替えてフィルタ処理する適応フィルタ処理などを行う。
これらのループフィルタは、復号画像の画質を向上させることを目的として適用されるが、図42に示すようなスクリーンコンテンツの特殊なヒストグラム形状を考慮しておらず、十分な画質改善効果が得られない。そこで、この実施の形態1では、新たなループフィルタ処理としてヒストグラム補正処理を実施する。
When the loop filter unit 13 receives the local decoded image from the adder unit 11, the loop filter unit 13 performs a predetermined filter process on the local decoded image, and stores the filtered local decoded image in the motion compensated prediction frame memory 14. (Step ST11 in FIG. 16). Specifically, filter (deblocking filter) processing that reduces distortion occurring at the boundaries of transform blocks and prediction blocks, processing for adaptively adding an offset (pixel adaptive offset) for each pixel, Wiener filter, etc. Performs adaptive filter processing for adaptively switching linear filters and performing filter processing.
These loop filters are applied for the purpose of improving the image quality of the decoded image, but do not consider the special histogram shape of the screen content as shown in FIG. 42, and a sufficient image quality improvement effect can be obtained. Absent. Therefore, in the first embodiment, histogram correction processing is performed as new loop filter processing.

ループフィルタ部13は、上記のデブロッキングフィルタ処理、画素適応オフセット処理、適応フィルタ処理及びヒストグラム補正処理のそれぞれについて処理を行うか否かを決定し、各処理の有効フラグをヘッダ情報として可変長符号化部15に出力する。なお、上記のフィルタ処理を複数使用する際には、各フィルタ処理を順番に実施する。図12は複数のフィルタ処理を用いる場合のループフィルタ部13の構成例を示している。
ただし、図12に示しているループフィルタの種類と順序は一例に過ぎず、適用するループフィルタの種類と適用順序は必ずしも図12のようにする必要はない。例えば、デブロッキングフィルタ処理、画素適応オフセット処理、ヒストグラム補正処理の3種類だけでループフィルタ部13を構成することや、適用順序をデブロッキングフィルタ処理、ヒストグラム補正処理、画素適応オフセット処理の順にすることなどが考えられる。
The loop filter unit 13 determines whether or not to perform each of the deblocking filter process, the pixel adaptive offset process, the adaptive filter process, and the histogram correction process, and uses a variable length code with the valid flag of each process as header information. To the conversion unit 15. When a plurality of the above filter processes are used, each filter process is performed in order. FIG. 12 shows a configuration example of the loop filter unit 13 when a plurality of filter processes are used.
However, the types and order of the loop filters shown in FIG. 12 are merely examples, and the types and application order of the loop filters to be applied are not necessarily as shown in FIG. For example, the loop filter unit 13 is configured by only three types of deblocking filter processing, pixel adaptive offset processing, and histogram correction processing, and the application order is in order of deblocking filter processing, histogram correction processing, and pixel adaptive offset processing. And so on.

ここで、デブロッキングフィルタ処理では、ブロック境界にかけるフィルタ強度の選択に用いる各種パラメータを初期値から変更することができる。変更する場合には、そのパラメータをヘッダ情報として可変長符号化部15に出力する。
画素適応オフセット処理では、最初に、画像を複数のブロックに分割し、そのブロック単位に、オフセット処理を行わない場合もクラス分類手法の一つとして定義して、予め用意されている複数のクラス分類手法の中から、1つのクラス分類手法を選択する。次に、選択したクラス分類手法によって、ブロック内の各画素をクラス分類し、クラス毎に符号化歪みを補償するオフセット値を算出する。最後に、局所復号画像の画素値に対して、そのオフセット値を加算する処理を行うことで局所復号画像の画像品質を改善する。
Here, in the deblocking filter process, various parameters used for selecting the filter strength applied to the block boundary can be changed from the initial values. When changing, the parameter is output to the variable length coding unit 15 as header information.
In the pixel adaptive offset process, first, an image is divided into a plurality of blocks, and when the offset process is not performed for each block, it is defined as one of the class classification methods, and a plurality of class classifications prepared in advance are used. One classification method is selected from the methods. Next, each pixel in the block is classified by the selected class classification method, and an offset value for compensating the coding distortion is calculated for each class. Finally, the image quality of the locally decoded image is improved by performing a process of adding the offset value to the pixel value of the locally decoded image.

クラス分類手法としては、局所復号画像の画素値の大きさで分類する手法(BO手法と呼ぶ)や、エッジの方向毎に各画素の周囲の状況(エッジ部か否か等)に応じて分類する手法(EO手法と呼ぶ)がある。これらの手法は、予め画像符号化装置及び画像復号装置で共通に用意されており、例えば、図23に示すように、オフセット処理を行わない場合もクラス分類手法の一つとして定義して、これらの手法のうち、どの手法でクラス分類を行うかを示すインデックスを上記ブロック単位に選択する。
したがって、画素適応オフセット処理は、ブロックの分割情報、ブロック単位のクラス分類手法を示すインデックス、ブロック単位のオフセット情報をヘッダ情報として可変長符号化部15に出力する。
As a classifying method, a method of classifying by the size of a pixel value of a locally decoded image (referred to as a BO method), or a classification according to a situation around each pixel (whether it is an edge portion or the like) for each edge direction. There is a technique (referred to as EO technique). These methods are prepared in advance by the image encoding device and the image decoding device in advance. For example, as shown in FIG. 23, when no offset processing is performed, these methods are defined as one of the class classification methods. An index indicating which method is used for class classification is selected for each block.
Therefore, the pixel adaptive offset processing outputs the block division information, the index indicating the class classification method for each block, and the offset information for each block to the variable length encoding unit 15 as header information.

なお、画素適応オフセット処理において、例えば、最大符号化ブロックといった固定サイズのブロック単位に常に分割し、そのブロック毎にクラス分類手法を選択して、クラス毎の適応オフセット処理を行ってもよい。この場合、上記ブロック分割情報が不要となり、ブロック分割情報に要する符号量分だけ符号量が削減され、符号化効率を高めることができる。
また、適応フィルタ処理では、局所復号画像を所定の手法でクラス分類し、各クラスに属する領域(局所復号画像)毎に、重畳されている歪みを補償するフィルタを設計し、そのフィルタを用いて、当該局所復号画像のフィルタ処理を実施する。そして、クラス毎に設計したフィルタをヘッダ情報として可変長符号化部15に出力する。
In the pixel adaptive offset processing, for example, it may be always divided into fixed-size block units such as a maximum coding block, and a class classification method may be selected for each block to perform adaptive offset processing for each class. In this case, the block division information becomes unnecessary, the code amount is reduced by the amount of code required for the block division information, and the coding efficiency can be improved.
Also, in adaptive filter processing, local decoded images are classified by a predetermined method, and a filter that compensates for superimposed distortion is designed for each region (local decoded image) belonging to each class. Then, the local decoded image is filtered. Then, the filter designed for each class is output to the variable length encoding unit 15 as header information.

ここで、クラス分類手法としては、画像を空間的に等間隔に区切る簡易な手法や、ブロック単位に画像の局所的な特性(分散など)に応じて分類する手法がある。また、適応フィルタ処理で使用するクラス数は、予め画像符号化装置及び画像復号装置で共通の値に設定してもよいし、符号化すべきパラメータの一つとしてもよい。前者と比較して後者の方が、使用するクラス数を自由に設定することができるため、画像品質改善効果が上がるが、一方でクラス数を符号化するために、その分の符号量が増加する。   Here, as a class classification method, there are a simple method for spatially dividing an image at equal intervals, and a method for classifying the image in units of blocks according to local characteristics (dispersion, etc.). Further, the number of classes used in the adaptive filter process may be set in advance to a common value in the image encoding device and the image decoding device, or may be one of the parameters to be encoded. Compared to the former, the latter can set the number of classes to be used freely, so the image quality improvement effect will be improved, but on the other hand, the amount of code will be increased to encode the number of classes. To do.

図24A及び図24Bはこの発明の実施の形態1による画像符号化装置におけるヒストグラム補正処理の内容を示すフローチャートである。
以下、図24A及び図24Bを参照しながら、ヒストグラム補正処理の流れを説明する。
ヒストグラム補正処理では、最初に、図13のヒストグラム算出部21が、映像信号が示す入力画像を複数のブロックに分割するとともに、加算部11により算出された局所復号画像を複数のブロックに分割する。
画素値補正部22の第1の誤差算出部23は、ヒストグラム算出部21により分割されたブロック単位の入力画像と局所復号画像との誤差Eminを算出する(図24AのステップST100〜ST101)。
24A and 24B are flowcharts showing the contents of histogram correction processing in the image coding apparatus according to Embodiment 1 of the present invention.
Hereinafter, the flow of the histogram correction process will be described with reference to FIGS. 24A and 24B.
In the histogram correction process, first, the histogram calculation unit 21 in FIG. 13 divides the input image indicated by the video signal into a plurality of blocks and also divides the local decoded image calculated by the addition unit 11 into a plurality of blocks.
The first error calculation unit 23 of the pixel value correction unit 22 calculates an error E min between the input image in units of blocks divided by the histogram calculation unit 21 and the locally decoded image (steps ST100 to ST101 in FIG. 24A).

誤差Eminの算出方法として、例えば、画素値の絶対値差分を合計するSAD(Sum of Absolute Differences)、画素値の差分を二乗した値を合計するSSD(Sum of Squared Differences)などを用いることが考えられる。これらの指標が小さいほど、入力画像と局所復号画像が似通っており、符号化による歪みが小さいことを意味する。
また、誤差ではなく画質を表す指標を算出するようにしてもよい。画質を表す指標としては、信号が取り得る最大のパワーと劣化をもたらすノイズの比率を表すPSNR(Peak Signal−to−Noise Ratio)などが考えられる。画質を表す指標を用いた場合は、値が大きいほど符号化歪みが小さいことを意味する。
As a calculation method of the error Emin , for example, SAD (Sum of Absolute Differences) for summing absolute value differences of pixel values, SSD (Sum of Squared Differences) for summing values obtained by squaring pixel value differences, or the like may be used. Conceivable. The smaller these indexes, the more similar the input image and the local decoded image, and the smaller the distortion due to encoding.
In addition, an index representing image quality instead of error may be calculated. As an index representing image quality, PSNR (Peak Signal-to-Noise Ratio) representing the ratio of the maximum power that a signal can take and the noise that causes deterioration can be considered. When an index representing image quality is used, the larger the value, the smaller the encoding distortion.

また、ヒストグラム算出部21は、その局所復号画像のブロック毎に画素値のヒストグラムを算出し(図24AのステップST102)、ヒストグラムの値が最大となる画素値を選択し、その画素値をp(以下、「ピーク画素値」と称する)とする(図24AのステップST103)。
なお、ヒストグラムのステップ幅は、必ずしも1とする必要はなく、1以上の値としてもよい。ヒストグラム生成のためのステップ幅を大きくすると、ヒストグラムの精度は落ちるが、ヒストグラム生成のために必要なメモリなどを小さく抑えることが可能である。ヒストグラムのステップ幅を1以上とした場合は、ピーク画素値pはステップ幅の中央値などに設定することが考えられる。
Further, the histogram calculation unit 21 calculates a histogram of pixel values for each block of the locally decoded image (step ST102 in FIG. 24A), selects a pixel value with the maximum histogram value, and sets the pixel value to p ( Hereinafter, it is referred to as “peak pixel value”) (step ST103 in FIG. 24A).
Note that the step width of the histogram is not necessarily set to 1, and may be 1 or more. Increasing the step width for generating the histogram reduces the accuracy of the histogram, but it is possible to reduce the memory required for generating the histogram. When the histogram step width is 1 or more, the peak pixel value p may be set to the median value of the step width.

また、必ずしもブロック内の全ての画素を用いてヒストグラムを計算する必要はなく、一部の画素だけを用いてヒストグラムを求めてもよい。ヒストグラム計算に使用する画素数を削減することで、ヒストグラム計算に必要な演算量を削減することが可能である。   Further, it is not always necessary to calculate the histogram using all the pixels in the block, and the histogram may be obtained using only some of the pixels. By reducing the number of pixels used for the histogram calculation, it is possible to reduce the amount of calculation required for the histogram calculation.

なお、求めたヒストグラムを直接用いてその値が最大となる画素値を選択するだけでなく、例えばヒストグラムを微分してからその最大値を求めることも考えられる。このようにすることで、隣接したピークからの差分が大きい顕著なピークだけを特定できる効果が期待できる。   In addition to directly using the obtained histogram to select the pixel value that maximizes the value, it is also conceivable to obtain the maximum value after differentiating the histogram, for example. By doing in this way, the effect which can specify only the remarkable peak with a big difference from an adjacent peak can be anticipated.

次に、第2の誤差算出部24、補正画素値範囲保存部25及び繰り返し処理部26が、補正を適用する幅である図14の補正幅wを決定する処理を実施する。
まず、補正幅wの初期値として、補正幅wtempが例えば1に設定されたのち(図24AのステップST104)、第2の誤差算出部24が、補正幅wtemp内の画素値((ピーク画素値p−補正幅wtemp)〜(ピーク画素値p+補正幅wtemp)の画素値)をピーク画素値pに置換する(図24AのステップST105〜ST108)。ただし、ここでの置換は、補正幅wを決定するために仮に置換するだけであり、実際の置換(画素値の補正)は最適な補正幅wが決定されてから、画素値置換部27で行われる。
Next, the second error calculation unit 24, the correction pixel value range storage unit 25, and the iterative processing unit 26 perform a process of determining the correction width w in FIG.
First, as the initial value of the correction width w, after the correction width w temp is set to 1, for example (step ST104 in FIG. 24A), the second error calculation unit 24 uses the pixel value ((peak) in the correction width w temp Pixel value p-correction width w temp ) to (pixel value of peak pixel value p + correction width w temp ) are replaced with peak pixel value p (steps ST 105 to ST 108 in FIG. 24A). However, the replacement here is only temporary replacement to determine the correction width w, and the actual replacement (correction of the pixel value) is performed by the pixel value replacement unit 27 after the optimum correction width w is determined. Done.

具体的には、以下のように、画素値の置換を行う。

Figure 2015177342
ここで、(x,y)はブロック単位の局所復号画像における画素の座標を表し、L(x,y)は置換前の画素値、L’(x,y)は置換後の画素値を表している。
ブロック内の全部または一部の画素に対して上記の補正を実施する。なお、上式において、p−wtempが画素値の下限を下回った場合はこれを画素値の下限に置き換え、p+wtempが画素値の上限を上回った場合はこれを画素値の上限に置き換えてもよい。
ここでは、補正幅wtempをピーク画素値pよりも大きい側と小さい側で同一としているが、必ずしも両者を一致させる必要はなく、それぞれに対して異なる補正幅wtempを使用してもよい。 Specifically, pixel value replacement is performed as follows.
Figure 2015177342
Here, (x, y) represents the pixel coordinates in the local decoded image in block units, L (x, y) represents the pixel value before replacement, and L ′ (x, y) represents the pixel value after replacement. ing.
The above correction is performed on all or some of the pixels in the block. In the above equation, when p-w temp falls below the lower limit of the pixel value, this is replaced with the lower limit of the pixel value, and when p + w temp exceeds the upper limit of the pixel value, it is replaced with the upper limit of the pixel value. Also good.
Here, although the correction width w temp is the same on the side larger than the peak pixel value p and the smaller side, it is not always necessary to match both, and different correction widths w temp may be used for each.

第2の誤差算出部24は、補正幅wtemp内の画素値を仮にピーク画素値pに置換すると、ブロック単位の局所復号画像と、ブロック単位の入力画像との誤差Eを算出する(図24AのステップST109)。
補正画素値範囲保存部25は、第2の誤差算出部24が誤差Eを算出すると、その誤差Eと第1の誤差算出部23により算出された誤差Eminとを比較し(図24AのステップST110)、その誤差Eが誤差Eminより小さければ(E<Emin)、第1の誤差算出部23により算出された誤差Eminを誤差Eに置き換えるとともに、補正幅wtempを現在のピーク画素値に対する最適な補正幅w(初期値は0)として上書き保存する(図24AのステップST111)。
ただし、iは処理中のピーク画素値を示すインデックスであり、初期値は0である。なお、誤差Eが誤差Eminよりも大きい場合は、画素値を置換することで誤差が増加しているので、誤差Emin及び補正幅wtempの更新を行わない。なお、誤差としてPSNRなどの画質を表す指標を用いる場合は、ステップST110の不等号が逆向きになる。
When the pixel value in the correction width w temp is replaced with the peak pixel value p, the second error calculation unit 24 calculates an error E between the block-unit local decoded image and the block-unit input image (FIG. 24A). Step ST109).
When the second error calculation unit 24 calculates the error E, the corrected pixel value range storage unit 25 compares the error E with the error E min calculated by the first error calculation unit 23 (step of FIG. 24A). ST110) If the error E is smaller than the error E min (E <E min ), the error E min calculated by the first error calculation unit 23 is replaced with the error E, and the correction width w temp is changed to the current peak pixel. The optimum correction width w i (initial value is 0) for the value is overwritten and saved (step ST111 in FIG. 24A).
Here, i is an index indicating the peak pixel value being processed, and the initial value is 0. When the error E is larger than the error E min , the error is increased by replacing the pixel value, and therefore the error E min and the correction width w temp are not updated. When an index representing image quality such as PSNR is used as an error, the inequality sign in step ST110 is reversed.

次に、繰り返し処理部26は、その補正幅wtempに対して、例えば、1を加算することで、その補正幅wtempを更新して(図24AのステップST112)、ピーク画素値pに置換した補正幅wtemp内の画素値を元の画素値に戻してから(図24AのステップST113)、更新後の補正幅wtempと予め設定された最大補正幅wmaxを比較する(図24AのステップST114)。
繰り返し処理部26は、更新後の補正幅wtempが最大補正幅wmax以下であれば(wtemp≦wmax)、誤差Eの算出処理の再実施を第2の誤差算出部24に指示して、ステップST105の処理に戻る。
一方、更新後の補正幅wtempが最大補正幅wmaxより大きければ(wtemp>wmax)、ステップST115の処理に移行する。
Then, repetitive processing unit 26 for the correction width w temp, for example, by adding 1, to update the correction width w temp (step of FIG. 24A ST 112), substituted to the peak pixel value p After the pixel value in the corrected correction width w temp is returned to the original pixel value (step ST113 in FIG. 24A), the updated correction width w temp is compared with the preset maximum correction width w max (in FIG. 24A). Step ST114).
If the updated correction width w temp is equal to or smaller than the maximum correction width w max (w temp ≦ w max ), the iterative processing unit 26 instructs the second error calculation unit 24 to perform the error E calculation process again. Then, the process returns to step ST105.
On the other hand, if the updated correction width w temp is larger than the maximum correction width w max (w temp > w max ), the process proceeds to step ST115.

ステップST105からST114の処理の繰り返し回数は、最大補正幅wmaxに依存する。最大補正幅wmaxの値は画像符号化装置が自由に設定してよいが、大きな値を設定するとヒストグラム補正処理による画質改善効果は高くなるが、繰り返し回数が増えるために計算時間が増大する。逆に小さな値を設定すると画質改善効果は小さくなるが、計算時間も抑えられるというトレードオフの関係が存在する。最大補正幅wmaxの具体例としては15などが考えられる。 The number of repetitions of the processes of steps ST105 to ST114 depends on the maximum correction width w max . The value of the maximum correction width w max may be freely set by the image coding apparatus. However, if a large value is set, the image quality improvement effect by the histogram correction processing is enhanced, but the calculation time increases because the number of repetitions increases. Conversely, if a small value is set, the image quality improvement effect is reduced, but there is a trade-off relationship that the calculation time can be suppressed. A specific example of the maximum correction width w max is 15 or the like.

なお、wmaxの値は必ずしも常に固定値とする必要はなく、符号化処理中に符号化パラメータに応じて変更してもよい。例えば、量子化パラメータが大きく、符号化歪みが大きい場合はwmaxを大きくして画質改善効果を高め、量子化パラメータが小さく、符号化歪みが小さい場合はwmaxを小さくして計算時間を削減することなどが考えられる。 Note that the value of w max does not always have to be a fixed value, and may be changed according to the encoding parameter during the encoding process. For example, when the quantization parameter is large and the coding distortion is large, w max is increased to improve the image quality improvement effect, and when the quantization parameter is small and the coding distortion is small, w max is decreased to reduce the calculation time. It is possible to do.

また、補正幅wは、例えば2のべき乗などの値に限定するようにしてもよい。このようにした場合、補正幅wを符号化する際に指数部だけを符号化すればよいため、補正幅wの符号化に必要な符号量を削減することが可能である。   Further, the correction width w may be limited to a value such as a power of 2, for example. In this case, since only the exponent part needs to be encoded when encoding the correction width w, it is possible to reduce the code amount necessary for encoding the correction width w.

画素値置換部27は、更新後の補正幅wtempが最大補正幅wmaxより大きくなると(wtemp>wmax)、以下のように、補正画素値範囲保存部25により保存されている最適な補正幅w内の画素値((ピーク画素値p−補正幅w)〜(ピーク画素値p+補正幅w)の画素値)をピーク画素値pに置換する(図24BのステップST115〜ST118)。

Figure 2015177342
ブロック内の全部または一部の画素に対して上記の補正を実施する。なお、上式において、p−wが画素値の下限を下回った場合はこれを画素値の下限に置き換え、p+wが画素値の上限を上回った場合はこれを画素値の上限に置き換えてもよい。 When the updated correction width w temp becomes larger than the maximum correction width w max (w temp > w max ), the pixel value replacement unit 27 optimizes that is stored by the correction pixel value range storage unit 25 as follows. The pixel values in the correction width w i ((peak pixel value p−correction width w i ) to (pixel value of peak pixel value p + correction width w i )) are replaced with the peak pixel value p (step ST115 in FIG. 24B). ST118).
Figure 2015177342
The above correction is performed on all or some of the pixels in the block. Incidentally, in the above equation, replace it if p-w i is below the lower limit of the pixel value to the lower limit of the pixel value, p + w i is replaced this if it exceeds the upper limit of the pixel value to the upper limit of the pixel value Also good.

次に、画素値置換部27は、ピーク画素値を示すインデックスiに1を加え、ST102でヒストグラム算出部21により算出されたヒストグラムから、画素値がpとなる画素に相当する部分を削除する(図24BのステップST119〜ST120)。
画素値置換部27は、インデックスiと予め設定された最大ピーク数Pmaxを比較し(図24BのステップST121)、インデックスiが最大ピーク数Pmaxより小さければ(i<Pmax)、ピーク画素値の再選択をヒストグラム算出部21に指示して、ステップST103の処理に戻る。
一方、インデックスiが最大ピーク数Pmaxに到達していれば(i≧Pmax)、ヒストグラム補正処理を終了する。
Next, the pixel value replacement unit 27 adds 1 to the index i indicating the peak pixel value, and deletes a portion corresponding to a pixel having a pixel value of p from the histogram calculated by the histogram calculation unit 21 in ST102 ( Steps ST119 to ST120 in FIG. 24B).
The pixel value replacement unit 27 compares the index i with a preset maximum peak number P max (step ST121 in FIG. 24B), and if the index i is smaller than the maximum peak number P max (i <P max ), the peak pixel. The histogram calculation unit 21 is instructed to reselect values, and the process returns to step ST103.
On the other hand, if the index i has reached the maximum number of peaks P max (i ≧ P max ), the histogram correction process is terminated.

この実施の形態1では、画素値補正部22が、ヒストグラムの各ピーク画素値に対する最適な補正幅wを求め、可変長符号化部15が、各ピーク画素値に対する最適な補正幅wを符号化する。
したがって、補正を実施するピークの数Pmaxの分だけ補正幅wを符号化(w,w,w,…,wPmax−1の全てを符号化)する必要があり、最大ピーク数Pmaxが大きくなると画質改善効果は大きくなるが符号量が増大し、逆に最大ピーク数Pmaxが小さくなると画質改善効果は小さくなるが符号量が抑えられるというトレードオフの関係が存在する。
また、当然ながら最大ピーク数Pmaxが大きいほど計算時間も増える。最大ピーク数Pmaxの具体例としては4などが考えられる。
In the first embodiment, the pixel value correction unit 22 obtains an optimum correction width w i for each peak pixel value of the histogram, and the variable length coding unit 15 obtains the optimum correction width w i for each peak pixel value. Encode.
Therefore, it is necessary to encode the correction width w i by the number of peaks P max to be corrected (encoding all of w 0 , w 1 , w 2 ,..., W Pmax−1 ), and the maximum peak When the number P max increases, the image quality improvement effect increases, but the code amount increases. Conversely, when the maximum peak number P max decreases, the image quality improvement effect decreases but the code amount can be suppressed.
Naturally, the calculation time increases as the maximum number of peaks P max increases. As a specific example of the maximum peak number P max , 4 or the like can be considered.

例えば、全てのピーク画素値に対する補正幅wが0である場合(ヒストグラム補正処理を実施しても効果が見られない場合)などは、当該ブロックに対してはヒストグラム補正処理を適用しないようにすることも可能である。このようにすることで、不要な情報を符号化することを避け、符号量を削減することで符号化効率を高めることができる。
ヒストグラム補正処理を適用するか否かの判定には、この他にも様々な手法を用いることができ、例えば、実際にヒストグラム補正処理を実施して符号化を行った場合にどれだけ符号化効率を改善できるかを調べるようにしてもよいし、テクスチャやエッジなどの画像特徴や、スクリーンコンテンツであるか否かを判定した結果を利用して決定するようにしてもよい。
したがって、ヒストグラム補正処理では、まず、ブロック分割情報をヘッダ情報として可変長符号化部15に出力し、さらにブロック毎に補正を実施するか否かのフラグ、補正を実施する場合は各ピーク画素値に対する適正な補正幅w(i=0、1、…、Pmax−1)をヘッダ情報として可変長符号化部15に出力する。
また、ヒストグラム補正処理を実施するか否かは、映像単位やスライス、ピクチャ単位に決定してもよい。例えば、映像単位でのヘッダ部(シーケンスパラメータセット)にフラグを追加し、映像がスクリーンコンテンツではなく、ヒストグラム補正処理が効果的でないとあらかじめ判断できる場合には、このフラグを0などに設定することでヒストグラム補正処理が実施されないようにしてもよい。もちろん、ピクチャやスライス単位でのヘッダ部(ピクチャパラメータセット、スライスパラメータセット)にフラグを追加し、ピクチャやスライス単位で切り替えることも考えられる。このようにすることで、ヒストグラム補正処理の効果がない映像あるいはピクチャ、スライスに対してはヒストグラム補正処理に係るパラメータを符号化する必要がなくなるため、符号量を削減することが可能である。
なお、ヒストグラム補正処理において、例えば、最大符号化ブロックといった固定サイズのブロック単位に常に分割して、そのブロック毎にヒストグラムを算出し、各ピーク画素値に対する補正幅wを求めて補正処理を行ってもよい。この場合、上記のブロック分割情報が不要になり、ブロック分割情報に要する符号量分だけ符号量が削減されるため、符号化効率を高めることができる。
For example, when the correction width w i for all the peak pixel values is 0 (when no effect is seen even if the histogram correction process is performed), the histogram correction process is not applied to the block. It is also possible to do. By doing in this way, it can avoid encoding unnecessary information and can improve encoding efficiency by reducing code amount.
Various other methods can be used to determine whether or not to apply the histogram correction processing. For example, how much encoding efficiency is achieved when encoding is performed by actually performing the histogram correction processing. It may be determined whether or not it can be improved, or may be determined using image characteristics such as texture and edges, and the result of determining whether or not the screen content.
Therefore, in the histogram correction process, first, the block division information is output as header information to the variable length encoding unit 15, and a flag indicating whether or not to perform correction for each block. An appropriate correction width w i (i = 0, 1,..., P max −1) is output to the variable length encoding unit 15 as header information.
Whether or not to perform the histogram correction process may be determined in units of video, slices, or pictures. For example, if a flag is added to the header unit (sequence parameter set) in units of video and it can be determined in advance that the video is not screen content and histogram correction processing is not effective, this flag should be set to 0 or the like. Thus, the histogram correction process may not be performed. Of course, it is also conceivable to add a flag to the header (picture parameter set, slice parameter set) in units of pictures and slices, and switch in units of pictures and slices. By doing so, it is not necessary to encode parameters relating to the histogram correction process for a video, picture, or slice that does not have the effect of the histogram correction process, so that the code amount can be reduced.
In the histogram correction process, for example, the block is always divided into fixed-size block units such as the maximum coding block, a histogram is calculated for each block, and the correction width w i for each peak pixel value is obtained to perform the correction process. May be. In this case, the above-described block division information becomes unnecessary and the code amount is reduced by the amount of code required for the block division information, so that the coding efficiency can be improved.

また、既にヒストグラム補正処理済みの近傍ブロックの補正幅などを用いて、処理中ブロックの補正幅wを予測し、その予測誤差のみを可変長符号化部15に出力して符号化するようにしてもよい。このようにすることで、補正幅wの符号量を削減することができる。 Further, the correction width w i of the block being processed is predicted using the correction width of the neighboring block that has already undergone the histogram correction processing, and only the prediction error is output to the variable length encoding unit 15 for encoding. May be. In this way, the code amount of the correction width w i can be reduced.

図16のステップST3〜ST10の処理は、階層的に分割された全ての符号化ブロックBに対する処理が完了するまで繰り返し実施され、全ての符号化ブロックBに対する処理が完了すると、ステップST14の処理に移行する(図16のステップST12,ST13)。 The processes in steps ST3 to ST10 in FIG. 16 are repeatedly performed until the processes for all the encoding blocks Bn divided hierarchically are completed. When the processes for all the encoding blocks Bn are completed, the process of step ST14 is performed. The process proceeds (steps ST12 and ST13 in FIG. 16).

可変長符号化部15は、変換・量子化部9から出力された圧縮データと、符号化制御部1から出力された最大符号化ブロック内のブロック分割情報(図22(b)を例とする4分木情報)、符号化モードm(B)及び予測差分符号化パラメータと、ループフィルタパラメータと、符号化制御部1から出力されたイントラ予測パラメータ(符号化モードがイントラ符号化モードである場合)、イントラブロックコピー予測パラメータ(符号化モードがイントラブロックコピー符号化モードである場合)又はインター予測パラメータ(符号化モードがインター符号化モードである場合)と、動き補償予測部7から出力された動きベクトル(符号化モードがインター符号化モードである場合)と、画素値補正部22により算出された全てのピーク画素値に対する補正幅wとを可変長符号化し、それらの符号化結果を示す符号化データを生成する(図16のステップST14)。 The variable length encoding unit 15 uses the compressed data output from the transform / quantization unit 9 and the block division information (FIG. 22B) in the maximum encoded block output from the encoding control unit 1 as an example. (Quadrant tree information), encoding mode m (B n ), prediction differential encoding parameter, loop filter parameter, and intra prediction parameter output from the encoding control unit 1 (the encoding mode is an intra encoding mode). ), An intra block copy prediction parameter (when the encoding mode is the intra block copy encoding mode) or an inter prediction parameter (when the encoding mode is the inter encoding mode), and the motion compensated prediction unit 7 Motion vectors (when the encoding mode is the inter encoding mode) and all the peaks calculated by the pixel value correction unit 22. A correction width w i with respect to the pixel value to the variable length coding to generate a coded data indicating their encoding result (step ST14 in FIG. 16).

その際、量子化された直交変換係数である圧縮データの符号化手法として、変換ブロックをさらにCoefficient Group(CG)と呼ばれる4×4画素単位のブロック(符号化サブブロック)に分割して、CG単位に係数の符号化処理を実施する。
図25は16×16画素の変換ブロックにおける係数の符号化順(スキャン順)を示している。このように、4×4画素単位の16個のCGを右下のCGから順に符号化処理し、さらに、各CGはCG内の16個の係数を右下の係数から順に符号化する。
At this time, as a method of encoding compressed data that is a quantized orthogonal transform coefficient, the transform block is further divided into blocks of 4 × 4 pixel units (encoding sub-blocks) called Coefficient Group (CG), and CG Coding of coefficients is performed for each unit.
FIG. 25 shows the coding order (scan order) of coefficients in a 16 × 16 pixel transform block. In this way, 16 CGs in units of 4 × 4 pixels are encoded in order from the lower right CG, and each CG encodes 16 coefficients in the CG in order from the lower right coefficient.

具体的には、まず、CG内の16個の係数の中に有意(非零)係数が存在するか否かのフラグ情報を符号化し、次に、CG内に有意(非零)係数が存在する場合のみ、CG内の各係数が有意(非零)係数であるかを上記順に符号化し、最後に有意(非零)係数に対して、その係数値情報を順に符号化する。これをCG単位に上記順に行う。その際、有意(非零)係数がなるべく連続で発生するように偏るスキャン順とした方がエントロピー符号化による符号化効率を高めることができる。
直交変換後の係数は、左上に位置する直流成分をはじめとして、左上に近い程、低い周波数成分の低い係数を表すことから、図26に示す例のように、一般的に左上に近いほど有意(非零)係数が多く発生するために、図25に示すように、右下から順に符号化することで効率的に符号化することができる。
Specifically, first, flag information indicating whether or not a significant (non-zero) coefficient exists in 16 coefficients in the CG is encoded, and then a significant (non-zero) coefficient exists in the CG. Only in this case, whether each coefficient in the CG is a significant (non-zero) coefficient is encoded in the above order, and finally, the coefficient value information is encoded in order for the significant (non-zero) coefficient. This is performed in the above order in units of CG. In this case, the encoding efficiency by entropy encoding can be increased by using a biased scan order so that significant (non-zero) coefficients are generated as continuously as possible.
Since the coefficient after the orthogonal transformation represents the lower coefficient of the low frequency component as it is closer to the upper left, including the DC component located at the upper left, generally, the closer to the upper left, the more significant as the example is shown in FIG. Since many (non-zero) coefficients are generated, as shown in FIG. 25, encoding can be performed efficiently by encoding sequentially from the lower right.

なお、上記では16×16画素の変換ブロックについて説明したが、8×8画素や32×32画素の変換ブロック等、16×16画素以外のブロックサイズにおいてもCG(符号化サブブロック)単位の符号化処理を実施するものとする。また、イントラ予測が選択されている4×4画素と8×8画素の変換ブロックについては、イントラ予測モードのインデックスに応じて、図25のスキャン順ではなく図27に示すスキャン順で処理を行う。これはイントラ予測の方向によって残差信号の周波数成分の分布が異なる傾向があるためである。   In the above description, a 16 × 16 pixel conversion block has been described. However, in a block size other than 16 × 16 pixels, such as an 8 × 8 pixel conversion block or a 32 × 32 pixel conversion block, a code in CG (encoding sub-block) unit is used. It shall be implemented. In addition, for 4 × 4 pixel and 8 × 8 pixel conversion blocks for which intra prediction is selected, processing is performed in the scan order shown in FIG. 27 instead of the scan order of FIG. 25 according to the index of the intra prediction mode. . This is because the frequency component distribution of the residual signal tends to differ depending on the direction of intra prediction.

また、可変長符号化部15は、図15に例示するように、符号化ビットストリームのヘッダ情報として、シーケンスレベルヘッダ、ピクチャレベルヘッダを符号化し、ピクチャデータと共に符号化ビットストリームを生成する。ただし、ピクチャデータは1以上のスライスデータから構成され、各スライスデータはスライスレベルヘッダと当該スライス内にある上記符号化データをまとめたものである。ピクチャデータはスライスデータの他に補足情報を示すヘッダ情報を含む場合もある。
シーケンスレベルヘッダは、画像サイズ、色信号フォーマット、輝度信号や色差信号の信号値のビット深度、シーケンス単位でのループフィルタ部13における各フィルタ処理(適応フィルタ処理、画素適応オフセット処理、デブロッキングフィルタ処理、ヒストグラム補正処理)の有効フラグ情報、量子化マトリクスの有効フラグ情報など、一般的にシーケンス単位に共通となるヘッダ情報をまとめたものである。
Further, as illustrated in FIG. 15, the variable length encoding unit 15 encodes a sequence level header and a picture level header as header information of the encoded bit stream, and generates an encoded bit stream together with the picture data. However, picture data is composed of one or more slice data, and each slice data is a combination of a slice level header and the encoded data in the slice. The picture data may include header information indicating supplementary information in addition to the slice data.
The sequence level header includes an image size, a color signal format, a bit depth of a signal value of a luminance signal or a color difference signal, and each filter process (adaptive filter process, pixel adaptive offset process, deblocking filter process) in the loop filter unit 13 in sequence units. , Histogram correction processing) effective flag information, quantization matrix effective flag information, and the like, which are header information that is generally common to each sequence unit.

ピクチャレベルヘッダは、参照するシーケンスレベルヘッダのインデックスや動き補償時の参照ピクチャ数、エントロピー符号化の確率テーブル初期化フラグ等のピクチャ単位で設定するヘッダ情報をまとめたものである。
スライスレベルヘッダは、当該スライスがピクチャのどの位置にあるかを示す位置情報、どのピクチャレベルヘッダを参照するかを示すインデックス、スライスの符号化タイプ(オールイントラ符号化、インター符号化など)、ループフィルタ部13における各フィルタ処理(適応フィルタ処理、画素適応オフセット処理、デブロッキングフィルタ処理、ヒストグラム補正処理)を行うか否かを示すフラグ情報などといったスライス単位のパラメータをまとめたものである。
The picture level header is a collection of header information set in units of pictures such as an index of a sequence level header to be referenced, the number of reference pictures at the time of motion compensation, an entropy encoding probability table initialization flag, and the like.
The slice level header includes position information indicating where the slice is located in the picture, an index indicating which picture level header is referred to, a slice coding type (all-intra coding, inter coding, etc.), and a loop. This is a collection of parameters in units of slices such as flag information indicating whether or not to perform each filter process (adaptive filter process, pixel adaptive offset process, deblocking filter process, histogram correction process) in the filter unit 13.

各ヘッダ情報とピクチャデータはNALユニットによって識別される。具体的には、シーケンスパラメータセット(上記シーケンスレベルヘッダに相当)、ピクチャパラメータヘッダ(上記ピクチャレベルヘッダに相当)、スライスデータはそれぞれ固有のNALユニットタイプとして定義され、NALユニットタイプの識別情報(インデックス)と共に符号化される。補足情報についても存在する場合には、固有のNALユニットとして定義される。また、上記ピクチャデータはアクセスユニットとして定義され、一つのピクチャの符号化データを含むデータアクセスの単位を示している。   Each header information and picture data is identified by a NAL unit. Specifically, a sequence parameter set (corresponding to the above sequence level header), a picture parameter header (corresponding to the above picture level header), and slice data are each defined as a unique NAL unit type, together with identification information (index) of the NAL unit type Encoded. If supplementary information also exists, it is defined as a unique NAL unit. The picture data is defined as an access unit and indicates a unit of data access including encoded data of one picture.

次に、イントラ予測部5の処理内容を詳細に説明する。
イントラ予測部5は、上述したように、予測ブロックP のイントラ予測パラメータを参照して、その予測ブロックP に対するイントラ予測処理を実施して、イントラ予測画像PINTRAi を生成するが、ここでは、輝度信号における予測ブロックP のイントラ予測画像を生成するイントラ処理について説明する。
Next, the processing content of the intra estimation part 5 is demonstrated in detail.
The intra prediction unit 5, as described above, with reference to the intra prediction parameters of the prediction block P i n, to implement intra prediction processing for the prediction block P i n, but to generate an intra prediction image P INTRAi n , will be described here intra process for generating an intra prediction image predicted block P i n in the luminance signal.

図28は符号化ブロックB内の各予測ブロックP が選択可能なイントラ予測モードの一例を示す説明図であり、イントラ予測モードのインデックス値と、そのイントラ予測モードが示す予測方向ベクトルを示している。上記イントラ予測モードのインデックス値がイントラ予測パラメータを示している。なお、イントラ予測モード数は、処理対象となるブロックのサイズに応じて異なるように構成してもよい。大きいサイズのブロックでは、イントラ予測の効率が低下するため、選択できるイントラ予測方向数を少なくし、小さいサイズのブロックでは、選択できるイントラ予測方向数を多くするように構成することで演算量を抑制することができる。 Figure 28 is an explanatory diagram showing an example of the prediction block P i n-selectable intra prediction modes for intra-coded blocks B n, and the index value of the intra prediction mode, the prediction direction vector indicated by the intra-prediction mode Show. The index value of the intra prediction mode indicates the intra prediction parameter. In addition, you may comprise so that the number of intra prediction modes may differ according to the size of the block used as a process target. Intra-prediction efficiency decreases for large-sized blocks, so the number of selectable intra-prediction directions is reduced, and for small-sized blocks, the number of selectable intra-prediction directions is increased to reduce the amount of computation. can do.

まず、イントラ予測画像を生成する処理は、処理対象のブロックに隣接する符号化済みの画素を用いることから、上述した通り、変換ブロック単位に行われなくてはならない。ここで、イントラ予測画像を生成する変換ブロックを予測画像生成ブロックと呼ぶこととする。したがって、イントラ予測部5は、予測画像生成ブロック単位に下記に述べるイントラ予測画像生成処理を実施して、予測ブロックP のイントラ予測画像を生成する。予測画像生成ブロックのサイズをl ×m 画素とする。
図29はl =m =4の場合の予測画像生成ブロック内の画素の予測値を生成する際に用いる画素の一例を示す説明図である。図29では、予測画像生成ブロックの上の符号化済みの画素(2×l +1)個と、左の符号化済みの画素(2×m )個を予測に用いる画素としているが、予測に用いる画素は、図29に示す画素より多くても少なくてもよい。また、図29では、予測画像生成ブロックの近傍の1行又は1列分の画素を予測に用いているが、2行又は2列、あるいは、それ以上の画素を予測に用いてもよい。
First, since the process which produces | generates an intra estimated image uses the encoded pixel adjacent to the block of a process target, as above-mentioned, it must be performed per conversion block. Here, the transform block that generates the intra predicted image is referred to as a predicted image generation block. Therefore, the intra prediction unit 5 may implement an intra-prediction image generation processing described below to the predicted image generation block generates an intra prediction image predicted block P i n. The size of the predicted image generation block is assumed to be l i n × m i n pixels.
FIG. 29 is an explanatory diagram illustrating an example of a pixel used when generating a predicted value of a pixel in a predicted image generation block in the case of l i n = m i n = 4. In FIG. 29, the encoded pixels (2 × l i n +1) and the left encoded pixels (2 × m i n ) on the predicted image generation block are used as pixels for prediction. The number of pixels used for prediction may be more or less than the pixels shown in FIG. In FIG. 29, pixels for one row or one column in the vicinity of the predicted image generation block are used for prediction. However, two or two or more pixels may be used for prediction.

予測画像生成ブロックが属する予測ブロックP に対するイントラ予測モードのインデックス値が0(平面(Planar)予測)の場合には、予測画像生成ブロックの上に隣接する符号化済み画素と、予測画像生成ブロックの左に隣接する符号化済み画素を用いて、これら画素と予測画像生成ブロック内の予測対象画素との距離に応じて内挿した値を予測値として予測画像を生成する。
予測画像生成ブロックが属する予測ブロックP に対するイントラ予測モードのインデックス値が1(平均値(DC)予測)の場合には、予測画像生成ブロックの上に隣接する符号化済み画素と、予測画像生成ブロックの左に隣接する符号化済み画素の平均値を予測画像生成ブロック内の画素の予測値として予測画像を生成する。
If the index value of the intra prediction mode for prediction block P i n that the predicted image generation block belongs is 0 (plane (Planar) prediction) includes a coded pixels adjacent to the top of the predicted image generation block, the predicted image generation Using the encoded pixels adjacent to the left of the block, a predicted image is generated using a value interpolated according to the distance between these pixels and the prediction target pixel in the predicted image generation block as a predicted value.
When the index value of the intra prediction mode for the prediction block P i n to which the prediction image generation block belongs is 1 (average (DC) prediction), encoded pixels adjacent to the prediction image generation block and the prediction image A predicted image is generated using the average value of the encoded pixels adjacent to the left of the generated block as the predicted value of the pixels in the predicted image generating block.

さらに、予測画像生成ブロックの上端及び左端に位置する図30の領域A,B,Cに対して、ブロック境界を平滑化するフィルタ処理を行って最終的な予測画像とする。例えば、下記の式(1)にしたがって、図31のフィルタの参照画素配置で、下記のフィルタ係数を用いてフィルタ処理を実施する。

Figure 2015177342
・領域A(P の左上の画素)
=1/2,a=1/4,a=1/4
・領域B(領域A以外のP の上端の画素)
=3/4,a=1/4,(a=0)
・領域C(領域A以外のP の左端の画素)
=3/4,a=1/4,(a=0) Further, filter processing for smoothing the block boundary is performed on the regions A, B, and C in FIG. For example, according to the following formula (1), the filter processing is performed using the following filter coefficients with the reference pixel arrangement of the filter of FIG.
Figure 2015177342
· Area A (the upper left pixel of the P i n)
a 0 = 1/2, a 1 = ¼, a 2 = ¼
- region B (the upper end of the pixel of P i n other than the region A)
a 0 = 3/4, a 2 = ¼, (a 1 = 0)
· Area C (the leftmost pixel of the P i n other than the region A)
a 0 = 3/4, a 1 = ¼, (a 2 = 0)

ただし、式(1)において、a(n=0,1,2)は参照画素にかかるフィルタ係数、p(n=0,1,2)はフィルタ処理対象画素pを含むフィルタの参照画素、S’(p)はフィルタ処理対象画素pにおけるフィルタ処理後の予測値、S(p)(n=0,1,2)はフィルタ処理対象画素pを含む参照画素のフィルタ処理前の予測値を表している。 In equation (1), a n (n = 0, 1, 2) is a filter coefficient applied to the reference pixel, and p n (n = 0, 1, 2) is a reference to a filter including the pixel to be filtered p 0 . The pixel, S ′ (p 0 ) is the predicted value after the filtering process in the filtering target pixel p 0 , and S (p n ) (n = 0, 1, 2) is the filter of the reference pixel including the filtering target pixel p 0 It represents the predicted value before processing.

さらに、上記フィルタ処理を行う予測画像生成ブロックのブロックサイズは限定してもよい。一般にブロック端のみフィルタ処理を行って予測値を変化させる場合、大きなブロックサイズのブロックでは、フィルタ処理により予測値が変化する領域の占める割合が小さいために、この予測値の変化によって生じた予測残差信号の変化を非常に高い周波数成分で表されることになり、この高周波数成分を符号化するために符号化効率の悪化を生じさせてしまう傾向がある。また、符号化効率を優先して、この高周波数成分を符号化しないようにすることで、ブロック端の予測残差信号の変化を復元できずに、ブロック境界に歪みが生じてしまう傾向がある。   Furthermore, the block size of the predicted image generation block that performs the filtering process may be limited. In general, when the prediction value is changed by filtering only at the block edge, since the ratio of the area where the prediction value changes due to the filter processing is small in a block having a large block size, the prediction residual caused by the change in the prediction value is generated. The change of the difference signal is expressed by a very high frequency component, and the encoding efficiency tends to be deteriorated because the high frequency component is encoded. Also, by giving priority to encoding efficiency and not encoding this high frequency component, the change in the prediction residual signal at the block end cannot be restored, and the block boundary tends to be distorted. .

一方、小さなブロックサイズのブロックでは、フィルタ処理により予測値が変化する領域の占める割合が大きいために、この予測値の変化によって生じた予測残差信号の変化が大きなブロックサイズのブロックの時のような高い周波数成分で表されることはなく、適切に残差信号を符号化することができ、本フィルタ処理によって、ブロック境界の連続性を高めた分、復号画像の品質を高めることができる。したがって、例えば、32×32画素以上のブロックサイズの予測画像生成ブロックでは、上記フィルタ処理を適用せずに、32×32画素より小さいブロックのみに上記フィルタ処理を適用することで、従来の平均値予測よりも予測性能を向上させながら、演算量の増加を抑えることができる。   On the other hand, in a block having a small block size, since the ratio of the area where the prediction value changes due to the filter processing is large, the change in the prediction residual signal caused by the change in the prediction value is as in the case of the block having a large block size. Therefore, the residual signal can be appropriately encoded, and the quality of the decoded image can be improved by increasing the continuity of the block boundary by this filter processing. Therefore, for example, in a predicted image generation block having a block size of 32 × 32 pixels or more, the above-described filter processing is not applied, and the above-described filter processing is applied only to blocks smaller than 32 × 32 pixels, thereby obtaining a conventional average value. It is possible to suppress an increase in the calculation amount while improving the prediction performance rather than the prediction.

予測画像生成ブロックに属する予測ブロックP に対するイントラ予測モードのインデックス値が26(垂直方向予測)の場合、下記の式(2)から予測画像生成ブロック内の画素の予測値を算出して予測画像を生成する。

Figure 2015177342
ただし、座標(x,y)は予測画像生成ブロック内の左上画素を原点とする相対座標(図32を参照)であり、S’(x,y)は座標(x,y)における予測値、S(x,y)は座標(x,y)における符号化済み画素の輝度値(復号された輝度値)である。また、算出した予測値が輝度値の取り得る値の範囲を超えている場合、予測値がその範囲内に収まるように値を丸めるようにする。 If the index value of the intra prediction mode for prediction block P i n belonging to the prediction image generation block 26 (vertical prediction), the prediction calculates the prediction value of the pixel of the predicted image generation block according to the following formula (2) Generate an image.
Figure 2015177342
However, the coordinates (x, y) are relative coordinates (see FIG. 32) with the upper left pixel in the predicted image generation block as the origin, and S ′ (x, y) is the predicted value at the coordinates (x, y), S (x, y) is the luminance value (decoded luminance value) of the encoded pixel at the coordinates (x, y). Further, when the calculated predicted value exceeds the range of values that the luminance value can take, the value is rounded so that the predicted value falls within the range.

なお、式(2)の1行目の式は、MPEG−4 AVC/H.264における垂直方向予測の予測値であるS(x,−1)に対し、隣接する符号化済み画素の垂直方向の輝度値の変化量S(−1,y)−S(−1,−1)を1/2にした値を加算することで、ブロック境界が平滑化されるようにフィルタ処理したものを予測値とすることを意味しており、式(2)の2行目の式は、MPEG−4 AVC/H.264における垂直方向予測と同じ予測式を示している。   Note that the equation in the first line of equation (2) is MPEG-4 AVC / H. The amount of change S (−1, y) −S (−1, −1) in the vertical direction of adjacent encoded pixels with respect to S (x, −1), which is the predicted value of the vertical direction prediction in H.264. ) Is added to the value obtained by halving, and the result of filtering so that the block boundary is smoothed is used as the predicted value. The expression in the second row of Expression (2) is , MPEG-4 AVC / H. The same prediction formula as the vertical direction prediction in H.264 is shown.

予測画像生成ブロックが属する予測ブロックP に対するイントラ予測モードのインデックス値が10(水平方向予測)の場合、下記の式(3)から予測画像生成ブロック内の画素の予測値を算出して予測画像を生成する。

Figure 2015177342
ただし、座標(x,y)は予測画像生成ブロック内の左上画素を原点とする相対座標(図32を参照)であり、S’(x,y)は座標(x,y)における予測値、S(x,y)は座標(x,y)における符号化済み画素の輝度値(復号された輝度値)である。また、算出した予測値が輝度値の取り得る値の範囲を超えている場合、予測値がその範囲内に収まるように値を丸めるようにする。 If the index value of the intra prediction mode for prediction block P i n that the predicted image generation block belongs 10 (horizontal prediction), the prediction calculates the prediction value of the pixel of the predicted image generation block according to the following formula (3) Generate an image.
Figure 2015177342
However, the coordinates (x, y) are relative coordinates (see FIG. 32) with the upper left pixel in the predicted image generation block as the origin, and S ′ (x, y) is the predicted value at the coordinates (x, y), S (x, y) is the luminance value (decoded luminance value) of the encoded pixel at the coordinates (x, y). Further, when the calculated predicted value exceeds the range of values that the luminance value can take, the value is rounded so that the predicted value falls within the range.

なお、式(3)の1行目の式は、MPEG−4 AVC/H.264における水平方向予測の予測値であるS(−1,y)に対し、隣接する符号化済み画素の水平方向の輝度値の変化量S(x,−1)−S(−1,−1)を1/2にした値を加算することで、ブロック境界が平滑化されるようにフィルタ処理したものを予測値とすることを意味しており、式(3)の2行目の式は、MPEG−4 AVC/H.264における水平方向予測と同じ予測式を示している。   Note that the expression on the first line of Expression (3) is MPEG-4 AVC / H. The amount of change in luminance value S (x, −1) −S (−1, −1) in the horizontal direction of an adjacent encoded pixel with respect to S (−1, y), which is the predicted value of the horizontal direction prediction in H.264. ) Is added to the value obtained by halving, and the result of filtering so that the block boundary is smoothed is used as the predicted value. The expression in the second row of Expression (3) is , MPEG-4 AVC / H. The same prediction formula as the horizontal prediction in H.264 is shown.

ただし、式(2)の垂直方向予測、式(3)の水平方向予測を行う予測画像生成ブロックのブロックサイズを限定してもよい。一般にブロック端のみ予測方向の輝度値の変化量に比例する値を加算するフィルタ処理を行うことで予測値を変化させる場合、大きなブロックサイズのブロックでは、上述した予測画像生成ブロックのブロック端のフィルタ処理により予測値が変化する領域の占める割合が小さいために、この予測値の変化によって生じた予測残差信号の変化を非常に高い周波数成分で表されることになり、この高周波数成分を符号化するために符号化効率の悪化を生じさせてしまう傾向がある。また、符号化効率を優先して、この高周波数成分を符号化しないようにすることで、ブロック端の予測残差信号の変化を復元できずにブロック境界に歪みが生じてしまう傾向がある。   However, the block size of the predicted image generation block that performs the vertical direction prediction of Expression (2) and the horizontal direction prediction of Expression (3) may be limited. In general, when the prediction value is changed by performing a filter process that adds a value proportional to the amount of change in the luminance value in the prediction direction only at the block edge, the block edge filter of the prediction image generation block described above is used in a block having a large block size. Since the ratio of the area where the predicted value changes due to processing is small, the change in the prediction residual signal caused by the change in the predicted value is represented by a very high frequency component. Therefore, the encoding efficiency tends to deteriorate. Also, by giving priority to encoding efficiency and not encoding this high frequency component, the change in the prediction residual signal at the block end cannot be restored, and the block boundary tends to be distorted.

一方、小さなブロックサイズのブロックでは、上記フィルタ処理により予測値が変化する領域の占める割合が大きいために、この予測値の変化によって生じた予測残差信号の変化が大きなブロックサイズのブロックの時のような高い周波数成分で表されることはなく、適切に残差信号を符号化することができ、本フィルタ処理によってブロック境界の連続性を高めた分、復号画像の品質を高めることができる。したがって、例えば、32×32画素以上のブロックサイズの予測画像生成ブロックでは、予測対象画素の座標によらず、式(2)及び式(3)の2行目の式を常に用いるようにし(予測画像生成ブロックのブロック端のフィルタ処理を行わないことにする)、32×32画素より小さいブロックのみに、上記フィルタ処理を行う式(2)及び式(3)を適用することで、従来の垂直方向予測、水平方向予測よりも予測性能を向上させながら、演算量の増加を抑えることができる。   On the other hand, in a block with a small block size, since the ratio of the region where the prediction value changes due to the above filtering process is large, the change in the prediction residual signal caused by the change in the prediction value is large when the block size is large. The residual signal can be appropriately encoded without being represented by such high frequency components, and the quality of the decoded image can be improved by the increase in the continuity of the block boundary by this filter processing. Therefore, for example, in a prediction image generation block having a block size of 32 × 32 pixels or more, the expressions in the second row of Expression (2) and Expression (3) are always used regardless of the coordinates of the prediction target pixel (prediction). By applying the equations (2) and (3) for performing the above-described filter processing only to blocks smaller than 32 × 32 pixels, the filter edge of the image generation block is not performed. It is possible to suppress an increase in the calculation amount while improving the prediction performance compared to the direction prediction and the horizontal direction prediction.

イントラ予測モードのインデックス値が0(平面予測)、1(平均値予測)、26(垂直方向予測)、10(水平方向予測)以外の場合には、インデックス値が示す予測方向ベクトルυ=(dx,dy)に基づいて、予測画像生成ブロック内の画素の予測値を生成する。
図32に示すように、予測画像生成ブロックの左上画素を原点として、予測画像生成ブロック内の相対座標を(x,y)と設定すると、予測に用いる参照画素の位置は、下記のLと隣接画素の交点になる。

Figure 2015177342
ただし、kは負の実数である。 When the index value in the intra prediction mode is other than 0 (plane prediction), 1 (average value prediction), 26 (vertical direction prediction), and 10 (horizontal direction prediction), the prediction direction vector υ p = ( Based on (dx, dy), a predicted value of a pixel in the predicted image generation block is generated.
As shown in FIG. 32, when the upper left pixel of the predicted image generation block is the origin and the relative coordinates in the predicted image generation block are set to (x, y), the position of the reference pixel used for prediction is adjacent to the following L This is the intersection of pixels.
Figure 2015177342
However, k is a negative real number.

参照画素が整数画素位置にある場合には、その整数画素を予測対象画素の予測値とし、参照画素が整数画素位置にない場合には、参照画素に隣接する整数画素から生成される補間画素を予測値とする。図29の例では、参照画素は整数画素位置にないので、参照画素に隣接する2画素から内挿したものを予測値とする。なお、隣接する2画素のみではなく、隣接する2画素以上の画素から補間画素を生成して予測値としてもよい。補間処理に用いる画素を多くすることで補間画素の補間精度を向上させる効果がある一方、補間処理に要する演算の複雑度が増加することから、演算負荷が大きくても高い符号化性能を要求する画像符号化装置の場合には、より多くの画素から補間画素を生成するようにした方がよい。   When the reference pixel is at the integer pixel position, the integer pixel is set as the prediction value of the prediction target pixel. When the reference pixel is not at the integer pixel position, an interpolation pixel generated from the integer pixel adjacent to the reference pixel is selected. Estimated value. In the example of FIG. 29, since the reference pixel is not located at the integer pixel position, a value interpolated from two pixels adjacent to the reference pixel is set as a predicted value. Note that an interpolation pixel may be generated not only from two adjacent pixels but also from two or more adjacent pixels, and used as a predicted value. While increasing the number of pixels used in the interpolation process has the effect of improving the interpolation accuracy of the interpolated pixels, it increases the complexity of the calculation required for the interpolation process, requiring high coding performance even when the calculation load is large. In the case of an image encoding device, it is better to generate interpolation pixels from a larger number of pixels.

以上に述べた処理によって、予測画像生成ブロック単位に予測ブロックP 内の輝度信号の全ての画素に対する予測画素を生成して、イントラ予測画像PINTRAi を出力する。なお、イントラ予測画像PINTRAi の生成に用いられたイントラ予測パラメータ(イントラ予測モード)は、ビットストリームに多重化するために可変長符号化部15に出力される。 The processing described above, to generate a predicted pixel for all the pixels of the luminance signals of the prediction block P i n in the predicted image generation block, and outputs an intra prediction image P INTRAi n. Incidentally, the intra prediction parameters used for generating the intra prediction image P INTRAi n (intra prediction mode) is output to the variable length coding unit 15 for multiplexing the bitstream.

なお、先に説明したMPEG−4 AVC/H.264における8×8画素のブロックのイントラ予測時に参照画素に対して施される平滑化処理と同様に、イントラ予測部5において、予測画像生成ブロックの予測画像を生成する際の参照画素を、予測画像生成ブロックに隣接する符号化済み画素を平滑化処理した画素とするように構成した場合であっても、上述の例と同様の予測画像に対するフィルタ処理を行うことができる。このようにすることで参照画素へのフィルタ処理による参照画素のノイズが除去され、これを用いて予測を行うことで予測の精度高めることができる。あるいは、上記参照画素へのフィルタ処理は予測画像へのフィルタ処理を行う平均値予測、垂直方向予測、水平方向予測以外の予測の際のみ実施するようにしてもよい。このようにすることで、各予測モードに対して最大で1つのフィルタ処理しか行わずに済み、演算量の増加を抑えることができる。   Note that the MPEG-4 AVC / H. Similarly to the smoothing process performed on the reference pixels at the time of intra prediction of the 8 × 8 pixel block in H.264, the intra prediction unit 5 predicts the reference pixels when generating the predicted image of the predicted image generation block. Even when the encoded pixels adjacent to the image generation block are configured to be the smoothed pixels, it is possible to perform the same filtering process on the predicted image as in the above example. By doing in this way, the noise of the reference pixel by the filter process to a reference pixel is removed, and prediction accuracy can be improved by performing prediction using this. Alternatively, the filtering process on the reference pixel may be performed only in the prediction other than the average value prediction, the vertical direction prediction, and the horizontal direction prediction for performing the filtering process on the predicted image. By doing in this way, it is only necessary to perform at most one filter process for each prediction mode, and an increase in the amount of calculation can be suppressed.

上記では、輝度信号の予測画像生成処理について説明したが、色差成分に対する予測画像は次のように生成する。予測ブロックP の色差信号に対して、色差信号のイントラ予測パラメータ(イントラ予測モード)に基づくイントラ予測処理を実施し、イントラ予測画像の生成に用いられたイントラ予測パラメータを可変長符号化部15に出力する。 In the above description, the predicted image generation process of the luminance signal has been described, but the predicted image for the color difference component is generated as follows. The color difference signal of the prediction block P i n, conduct intra prediction processing based on the intra prediction parameter of the color difference signal (intra prediction mode), the variable length coding unit intra prediction parameter used to generate the intra-prediction image 15 is output.

図33は色差信号のイントラ予測パラメータ(インデックス値)と色差イントラ予測モードの対応例を示す説明図である。色差信号のイントラ予測パラメータが、輝度信号に対するイントラ予測モードと同じ予測モードを用いる旨を示している場合(イントラ予測パラメータが輝度色差共通イントラ予測モード(DMモード)を示している場合)、輝度信号と同じフレーム内予測を実施して、色差信号の予測画像を生成する。
また、色差信号のイントラ予測パラメータが、垂直方向予測モード又は水平方向予測モードを示している場合、色差信号に対する方向性予測を実施して、色差信号の予測画像を生成する。また、色差信号のイントラ予測パラメータが、輝度相関利用色差信号予測モード(LMモード)を示している場合、予測画像の生成対象ブロックの上及び左に隣接している複数の画素の輝度信号及び色差信号を用いて、輝度信号と色差信号の相関を示す相関パラメータを算出し、その相関パラメータと予測処理対象の色差信号のブロックに対応する輝度信号を用いて、色差信号の予測画像を生成する。
FIG. 33 is an explanatory diagram showing an example of correspondence between intra prediction parameters (index values) of color difference signals and color difference intra prediction modes. When the intra prediction parameter of the chrominance signal indicates that the same prediction mode as the intra prediction mode for the luminance signal is used (when the intra prediction parameter indicates the luminance / chrominance common intra prediction mode (DM mode)), the luminance signal The same intra-frame prediction is performed to generate a prediction image of the color difference signal.
Further, when the intra prediction parameter of the color difference signal indicates the vertical direction prediction mode or the horizontal direction prediction mode, the directionality prediction for the color difference signal is performed to generate a prediction image of the color difference signal. Further, when the intra prediction parameter of the color difference signal indicates the luminance correlation use color difference signal prediction mode (LM mode), the luminance signal and color difference of a plurality of pixels adjacent above and to the left of the prediction image generation target block. A correlation parameter indicating the correlation between the luminance signal and the color difference signal is calculated using the signal, and a predicted image of the color difference signal is generated using the correlation parameter and the luminance signal corresponding to the block of the color difference signal to be predicted.

入力信号フォーマットがYUV4:2:2信号である場合、図7に示すように、輝度信号が正方ブロックであれば、色差信号は輝度信号と比較して水平方向の画素数が1/2となる長方形のブロックとなる。したがって、図8に示すように、YUV4:4:4信号をYUV4:2:2信号に変換した際に、輝度信号と色差信号で同一方向の予測となるようにするためには、YUV4:2:2信号上では、垂直方向予測と水平方向予測以外の方向性予測の場合には、色差信号の予測方向が輝度信号の予測方向と異なることとなる。具体的には、図9に示すように、輝度信号の予測方向ベクトルをv=(dx,dy)とした場合、色差信号の予測方向ベクトルは、v=(dx/2,dy)となる。即ち、図10に示すように、予測方向の角度をθとした場合、輝度信号の予測方向の角度をθ、色差信号の予測方向の角度をθとして、tanθ=2tanθの関係となる予測方向で予測する必要がある。
したがって、輝度信号と色差信号で同一方向の予測を行う上記DMモードを正しく実施できるようにするために、入力信号フォーマットがYUV4:2:2信号である場合、輝度信号に使用したイントラ予測モードのインデックスを色差信号の予測に用いるイントラ予測モードのインデックスに変換し、変換後のインデックスに対応するイントラ予測モードによる色差信号の予測処理を実施する。
When the input signal format is a YUV 4: 2: 2 signal and the luminance signal is a square block as shown in FIG. 7, the color difference signal has half the number of pixels in the horizontal direction compared to the luminance signal. It becomes a rectangular block. Therefore, as shown in FIG. 8, when the YUV4: 4: 4 signal is converted into a YUV4: 2: 2 signal, in order to predict the luminance signal and the color difference signal in the same direction, YUV4: 2 : On two signals, in the case of directional prediction other than vertical prediction and horizontal prediction, the prediction direction of the color difference signal is different from the prediction direction of the luminance signal. Specifically, as shown in FIG. 9, when the prediction direction vector of the luminance signal is v L = (dx L , dy L ), the prediction direction vector of the color difference signal is v C = (dx L / 2, dy L ). That is, as shown in FIG. 10, when the angle of the prediction direction is θ, the angle of the prediction direction of the luminance signal is θ L , the angle of the prediction direction of the color difference signal is θ C , and tan θ C = 2tan θ L It is necessary to predict in the prediction direction.
Therefore, when the input signal format is a YUV 4: 2: 2 signal in order to correctly implement the DM mode in which the prediction in the same direction is performed with the luminance signal and the color difference signal, the intra prediction mode used for the luminance signal is used. The index is converted into an index of an intra prediction mode used for prediction of the color difference signal, and the prediction process of the color difference signal in the intra prediction mode corresponding to the converted index is performed.

図34は図28のイントラ予測モードにおけるイントラ予測モードインデックスの変換例を示している。図34の変換テーブルは、予測方向の角度がθであるとき(図10を参照)、イントラ予測モードの方向性予測が図35に示すtanθとなる角度である場合、tanθ=2tanθの関係に最も近い角度θに変換するテーブルの例である。
変換処理の実現は、上記のように、インデックスの変換テーブルを用意し、その変換テーブルを参照することでインデックスを変換するように構成してもよいし、変換式を用意し、その変換式に従ってインデックスを変換するように構成してもよい。このように構成することで、方向性予測処理自体を変更することなく、インデックスの変換のみでYUV4:2:2信号のフォーマットに応じた色差信号の適切な予測を実施することができる。
FIG. 34 shows a conversion example of the intra prediction mode index in the intra prediction mode of FIG. In the conversion table of FIG. 34, when the angle of the prediction direction is θ (see FIG. 10), the relationship of tan θ C = 2 tan θ L when the direction prediction of the intra prediction mode is tan θ shown in FIG. It is an example of the table converted into the angle θ C closest to.
As described above, the conversion process may be realized by preparing an index conversion table and converting the index by referring to the conversion table, or by preparing a conversion formula and according to the conversion formula. You may comprise so that an index may be converted. With this configuration, it is possible to perform appropriate prediction of the color difference signal according to the format of the YUV 4: 2: 2 signal only by converting the index without changing the directionality prediction process itself.

また、色差信号に対して上記LMモードを行わないように構成してもよい。このときの色差信号のイントラ予測パラメータ(インデックス値)と色差イントラ予測モードの対応例として、図34が挙げられる。このようにLMモードも用いないようにすることで、予測対象画素の輝度信号と色差信号の依存性がなくなるため、輝度信号と色差信号の予測処理の並列化が可能となり、高速な演算処理を実現することができる。
さらに、色差信号では、平均値(DC)予測、垂直方向予測、水平方向予測について、輝度信号の場合で説明したブロック境界のフィルタ処理を行わずに、MPEG−4 AVC/H.264と同様の予測手法としてもよい。このようにフィルタ処理を行わないことで、予測処理の低演算化を図ることができる。
Further, the LM mode may not be performed on the color difference signal. FIG. 34 shows a correspondence example between the intra prediction parameter (index value) of the color difference signal and the color difference intra prediction mode at this time. By not using the LM mode in this way, the dependency of the luminance signal and the color difference signal of the pixel to be predicted is eliminated, so that the prediction processing of the luminance signal and the color difference signal can be parallelized, and high-speed calculation processing is performed. Can be realized.
Further, in the color difference signal, the average value (DC) prediction, the vertical direction prediction, and the horizontal direction prediction are performed without performing the block boundary filtering process described in the case of the luminance signal, and the MPEG-4 AVC / H. It is good also as the prediction method similar to H.264. By not performing the filtering process in this way, it is possible to reduce the prediction process.

次に、図17の画像復号装置の処理内容を具体的に説明する。
可変長復号部31は、図1の画像符号化装置により生成された符号化ビットストリームを入力すると、そのビットストリームに対する可変長復号処理を実施して(図20のステップST21)、1フレーム以上のピクチャから構成されるシーケンス単位のヘッダ情報(シーケンスレベルヘッダ)及びピクチャ単位のヘッダ情報(ピクチャレベルヘッダ)などの各ヘッダ情報とピクチャデータを復号する。ただし、ピクチャデータは1以上のスライスデータから構成され、各スライスデータはスライスレベルヘッダと当該スライス内にある符号化データがまとめられているものである。ピクチャデータはスライスデータの他に補足情報を示すヘッダ情報を含む場合もある。
Next, the processing content of the image decoding apparatus in FIG. 17 will be specifically described.
When the encoded bit stream generated by the image encoding device in FIG. 1 is input, the variable length decoding unit 31 performs a variable length decoding process on the bit stream (step ST21 in FIG. 20), and performs one or more frames. Each header information such as header information (sequence level header) and header information (picture level header) in units of a sequence composed of pictures is decoded. However, picture data is composed of one or more slice data, and each slice data is a collection of a slice level header and encoded data in the slice. The picture data may include header information indicating supplementary information in addition to the slice data.

このとき、上記ヘッダ情報に含まれる量子化マトリクスの有効フラグ情報が“有効”を示す場合、可変長復号部31は量子化マトリクスパラメータを可変長復号し、量子化マトリクスを特定する。具体的には、各直交変換サイズの色信号や符号化モード毎に、量子化マトリクスパラメータが初期値として、画像符号化装置及び画像復号装置で、予め共通に用意されている量子化マトリクス、又は、既に復号された量子化マトリクスである(新しい量子化マトリクスでない)ことを示す場合は、量子化マトリクスパラメータに含まれる上記マトリクスの内のどの量子化マトリクスであるかを特定するインデックス情報を参照して量子化マトリクスを特定し、量子化マトリクスパラメータが新しい量子化マトリクスを用いることを示す場合は、量子化マトリクスパラメータに含まれる量子化マトリクスを使用する量子化マトリクスとして特定する。そして、ピクチャ単位のデータを構成するスライスデータから、スライス分割情報等のスライス単位のヘッダ情報(スライスレベルヘッダ)を復号し、各スライスの符号化データを復号する。   At this time, when the valid flag information of the quantization matrix included in the header information indicates “valid”, the variable length decoding unit 31 performs variable length decoding of the quantization matrix parameter to identify the quantization matrix. Specifically, for each color signal or encoding mode of each orthogonal transform size, the quantization matrix parameter is set as an initial value, and a quantization matrix prepared in advance by the image encoding device and the image decoding device, or When indicating that the quantization matrix is already decoded (not a new quantization matrix), refer to the index information for specifying which quantization matrix among the matrices included in the quantization matrix parameter. When the quantization matrix is specified, and the quantization matrix parameter indicates that a new quantization matrix is to be used, it is specified as a quantization matrix that uses the quantization matrix included in the quantization matrix parameter. Then, slice unit header information (slice level header) such as slice division information is decoded from slice data constituting picture unit data, and encoded data of each slice is decoded.

また、可変長復号部31は、上記ヘッダ情報から、最大符号化ブロックサイズ及び分割階層数の上限を特定する(図20のステップST22)。ただし、分割階層数の上限の代わりに、符号化ブロックの最小ブロックサイズが符号化されている場合、これを復号することで分割階層数の上限を決定する。即ち、最大符号化ブロックを上記最小ブロックサイズまで分割した場合が分割階層数の上限となる。
可変長復号部31は、決定された最大符号化ブロック単位に、図22で示されるような最大符号化ブロックの分割状態を復号する。復号された分割状態に基づき、階層的に符号化ブロックを特定する(図20のステップST23)。
Further, the variable length decoding unit 31 specifies the maximum encoding block size and the upper limit of the number of division layers from the header information (step ST22 in FIG. 20). However, when the minimum block size of the encoded block is encoded instead of the upper limit of the number of division layers, the upper limit of the number of division layers is determined by decoding this. That is, the upper limit of the number of division layers is obtained when the maximum encoded block is divided to the minimum block size.
The variable length decoding unit 31 decodes the division state of the maximum encoded block as shown in FIG. 22 for each determined maximum encoded block. Based on the decoded division state, coding blocks are identified hierarchically (step ST23 in FIG. 20).

次に、可変長復号部31は、符号化ブロックに割り当てられている符号化モードを復号する。復号した符号化モードに含まれる情報に基づき、符号化ブロックをさらに1つないし複数の予測処理単位である予測ブロックに分割し、予測ブロック単位に割り当てられている予測パラメータを復号する(図20のステップST24)。
即ち、可変長復号部31は、符号化ブロックに割り当てられている符号化モードがイントラ符号化モードである場合、符号化ブロックに含まれており、予測処理単位となる1つ以上の予測ブロック毎にイントラ予測パラメータを復号し、符号化ブロックに割り当てられている符号化モードがイントラブロックコピー符号化モードである場合、符号化ブロックに含まれており、予測処理単位となる1つ以上の予測ブロック毎にイントラブロックコピー予測パラメータを復号する。また、符号化ブロックに割り当てられている符号化モードがインター符号化モードである場合、符号化ブロックに含まれており、予測処理単位となる1つ以上の予測ブロック毎にインター予測パラメータ及び動きベクトルを復号する(図20のステップST24)。また、全てのピーク画素値に対する補正幅wを復号する。
Next, the variable length decoding unit 31 decodes the encoding mode assigned to the encoding block. Based on the information included in the decoded coding mode, the coded block is further divided into one or more prediction blocks which are prediction processing units, and the prediction parameters assigned to the prediction block units are decoded (FIG. 20). Step ST24).
That is, when the encoding mode assigned to the encoding block is the intra encoding mode, the variable length decoding unit 31 is included in the encoding block, and each of one or more prediction blocks serving as a prediction processing unit When the intra prediction parameter is decoded and the coding mode assigned to the coding block is the intra block copy coding mode, one or more prediction blocks included in the coding block and serving as a prediction processing unit The intra block copy prediction parameter is decoded every time. Further, when the coding mode assigned to the coding block is the inter coding mode, the inter prediction parameter and the motion vector are included in the coding block and each of one or more prediction blocks serving as a prediction processing unit. Is decoded (step ST24 in FIG. 20). Also, the correction width w i for all peak pixel values is decoded.

さらに、可変長復号部31は、予測差分符号化パラメータに含まれる変換ブロック分割情報に基づき、変換ブロック毎に圧縮データ(変換・量子化後の変換係数)を復号する(図20のステップST24)。その際、図1の画像符号化装置の可変長符号化部15での圧縮データの符号化処理と同様に、CG単位の係数の復号処理を実施する。したがって、図25に示すように、4×4画素単位の16個のCGを右下のCGから順に復号処理し、さらに、各CGはCG内の16個の係数を右下の係数から順に復号していくことになる。   Furthermore, the variable length decoding unit 31 decodes the compressed data (transformed and transformed transform coefficients) for each transform block based on the transform block division information included in the prediction difference encoding parameter (step ST24 in FIG. 20). . At that time, similarly to the encoding process of the compressed data in the variable length encoding unit 15 of the image encoding apparatus of FIG. Accordingly, as shown in FIG. 25, 16 CGs in units of 4 × 4 pixels are decoded in order from the lower right CG, and each CG decodes 16 coefficients in the CG in order from the lower right coefficient. Will do.

具体的には、まず、CG内の16個の係数の中に有意(非零)係数が存在するか否かのフラグ情報を復号し、次に復号したフラグ情報がCG内に有意(非零)係数が存在することを示す場合のみCG内の各係数が有意(非零)係数であるかを上記順に復号し、最後に有意(非零)係数を示す係数に対して、その係数値情報を順に復号する。これをCG単位に上記順に行う。ただし、スキャン順については、イントラ予測が選択されている4×4画素と8×8画素の変換ブロックの場合、イントラ予測モードのインデックスに応じて、図25のスキャン順ではなく図27に示すスキャン順で処理を行う。   Specifically, first, flag information indicating whether or not a significant (non-zero) coefficient exists in 16 coefficients in the CG is decoded, and then the decoded flag information is significant (non-zero) in the CG. Only when it indicates that a coefficient exists, whether each coefficient in the CG is a significant (non-zero) coefficient is decoded in the above order, and finally, coefficient value information for the coefficient indicating the significant (non-zero) coefficient Are sequentially decoded. This is performed in the above order in units of CG. However, with regard to the scan order, in the case of a 4 × 4 pixel and 8 × 8 pixel conversion block for which intra prediction is selected, the scan shown in FIG. 27 is used instead of the scan order of FIG. 25 according to the index of the intra prediction mode. Process in order.

切換スイッチ33は、可変長復号部31により可変長復号された符号化モードm(B)がイントラ符号化モードであれば(m(B)∈INTRAの場合)、可変長復号部31により可変長復号された予測ブロック単位のイントラ予測パラメータをイントラ予測部34に出力し、可変長復号部31により可変長復号された符号化モードm(B)がイントラブロックコピー符号化モードであれば(m(B)∈ICOPYの場合)、可変長復号部31により可変長復号された予測ブロック単位のイントラブロックコピー予測パラメータをイントラブロックコピー予測部35に出力し、可変長復号部31により可変長復号された符号化モードm(B)がインター符号化モードであれば(m(B)∈INTERの場合)、可変長復号部31により可変長復号された予測ブロック単位のインター予測パラメータ及び動きベクトルを動き補償予測部36に出力する。 If the encoding mode m (B n ) variable-length decoded by the variable-length decoding unit 31 is an intra-encoding mode (when m (B n ) ∈INTRA), the changeover switch 33 is changed by the variable-length decoding unit 31. outputs the intra prediction parameters of the variable length decoded prediction block to the intra prediction unit 34, if the variable-length decoded coding mode m (B n) is an intra block copy coding mode by the variable-length decoder 31 (In the case of m (B n ) εICOPY), the intra block copy prediction parameter of the prediction block unit variable length decoded by the variable length decoding unit 31 is output to the intra block copy prediction unit 35 and variable by the variable length decoding unit 31 If the length decoded coding mode m (B n) is an inter coding mode (m (the case of B n) ∈INTER), variable recovery And it outputs the inter prediction parameter and the motion vector variable length decoding prediction block to the motion compensation prediction unit 36 by the part 31.

イントラ予測部34は、可変長復号部31により可変長復号された符号化モードm(B)がイントラ符号化モード(m(B)∈INTRA)である場合(図20のステップST25)、切換スイッチ33から出力された予測ブロック単位のイントラ予測パラメータを受け取って、図1のイントラ予測部5と同様の手順で、イントラ用メモリ38に格納されている復号画像を参照しながら、上記イントラ予測パラメータを用いた符号化ブロックB内の各予測ブロックP に対するイントラ予測処理を実施して、イントラ予測画像PINTRAi を生成する(図20のステップST26)。
また、イントラ予測部34は、輝度信号については、輝度信号に対する上記イントラ予測パラメータを用いたイントラ予測処理(フレーム内予測処理)を実施して、輝度信号の予測画像を生成する。
一方、色差信号については、色差信号のイントラ予測パラメータに基づくイントラ予測処理を実施して、色差信号の予測画像を生成する。
When the encoding mode m (B n ) variable-length decoded by the variable-length decoding unit 31 is the intra-coding mode (m (B n ) εINTRA) (Step ST25 in FIG. 20), the intra prediction unit 34 The intra prediction parameter output from the selector switch 33 is received, and the intra prediction is performed with reference to the decoded image stored in the intra memory 38 in the same procedure as the intra prediction unit 5 in FIG. and implementing intra prediction process for each of the prediction block P i n the coded block B n using a parameter to generate an intra prediction image P INTRAi n (step ST26 in FIG. 20).
In addition, for the luminance signal, the intra prediction unit 34 performs an intra prediction process (intra-frame prediction process) using the intra prediction parameter for the luminance signal to generate a prediction image of the luminance signal.
On the other hand, for the color difference signal, intra prediction processing based on the intra prediction parameter of the color difference signal is performed to generate a predicted image of the color difference signal.

図33に示すように、色差信号のイントラ予測パラメータが、輝度信号に対するイントラ予測モードと同じ予測モードを用いる旨を示している場合(イントラ予測パラメータが輝度色差共通イントラ予測モード(DMモード)を示している場合)、輝度信号と同じフレーム内予測を実施して、色差信号の予測画像を生成する。
また、色差信号のイントラ予測パラメータが、垂直方向予測モード又は水平方向予測モードを示している場合、色差信号に対する方向性予測を実施して、色差信号の予測画像を生成する。また、色差信号のイントラ予測パラメータが、輝度相関利用色差信号予測モード(LMモード)を示している場合、予測画像の生成対象ブロックの上及び左に隣接している複数の画素の輝度信号及び色差信号を用いて、輝度信号と色差信号の相関を示す相関パラメータを算出し、その相関パラメータと予測処理対象の色差信号のブロックに対応する輝度信号を用いて、色差信号の予測画像を生成する。
As shown in FIG. 33, when the intra prediction parameter of the color difference signal indicates that the same prediction mode as the intra prediction mode for the luminance signal is used (the intra prediction parameter indicates the luminance color difference common intra prediction mode (DM mode)). The same intra-frame prediction as that of the luminance signal is performed to generate a predicted image of the color difference signal.
Further, when the intra prediction parameter of the color difference signal indicates the vertical direction prediction mode or the horizontal direction prediction mode, the directionality prediction for the color difference signal is performed to generate a prediction image of the color difference signal. Further, when the intra prediction parameter of the color difference signal indicates the luminance correlation use color difference signal prediction mode (LM mode), the luminance signal and color difference of a plurality of pixels adjacent above and to the left of the prediction image generation target block. A correlation parameter indicating the correlation between the luminance signal and the color difference signal is calculated using the signal, and a predicted image of the color difference signal is generated using the correlation parameter and the luminance signal corresponding to the block of the color difference signal to be predicted.

入力信号フォーマットがYUV4:2:2信号である場合、図7に示すように、輝度信号が正方ブロックであれば、色差信号は輝度信号と比較して水平方向の画素数が1/2となる長方形のブロックとなる。したがって、図8に示すように、YUV4:4:4信号をYUV4:2:2信号に変換した際に、輝度信号と色差信号で同一方向の予測となるようにするためには、YUV4:2:2信号上では、垂直方向予測と水平方向予測以外の方向性予測の場合には、色差信号の予測方向が輝度信号の予測方向と異なることとなる。具体的には、図9に示すように、輝度信号の予測方向ベクトルをv=(dx,dy)とした場合、色差信号の予測方向ベクトルは、v=(dx/2,dy)となる。即ち、図10に示すように、予測方向の角度をθとした場合、輝度信号の予測方向の角度をθ、色差信号の予測方向の角度をθとして、tanθ=2tanθの関係となる予測方向で予測する必要がある。 When the input signal format is a YUV 4: 2: 2 signal and the luminance signal is a square block as shown in FIG. 7, the color difference signal has half the number of pixels in the horizontal direction compared to the luminance signal. It becomes a rectangular block. Therefore, as shown in FIG. 8, when the YUV4: 4: 4 signal is converted into a YUV4: 2: 2 signal, in order to predict the luminance signal and the color difference signal in the same direction, YUV4: 2 : On two signals, in the case of directional prediction other than vertical prediction and horizontal prediction, the prediction direction of the color difference signal is different from the prediction direction of the luminance signal. Specifically, as shown in FIG. 9, when the prediction direction vector of the luminance signal is v L = (dx L , dy L ), the prediction direction vector of the color difference signal is v C = (dx L / 2, dy L ). That is, as shown in FIG. 10, when the angle of the prediction direction is θ, the angle of the prediction direction of the luminance signal is θ L , the angle of the prediction direction of the color difference signal is θ C , and tan θ C = 2tan θ L It is necessary to predict in the prediction direction.

したがって、輝度信号と色差信号で同一方向の予測を行う上記DMモードを正しく実施できるようにするために、入力信号フォーマットがYUV4:2:2信号である場合、輝度信号に使用したイントラ予測モードのインデックスを色差信号の予測に用いるイントラ予測モードのインデックスに変換し、変換後のインデックスに対応するイントラ予測モードによる色差信号の予測処理を実施する。   Therefore, when the input signal format is a YUV 4: 2: 2 signal in order to correctly implement the DM mode in which the prediction in the same direction is performed with the luminance signal and the color difference signal, the intra prediction mode used for the luminance signal is used. The index is converted into an index of an intra prediction mode used for prediction of the color difference signal, and the prediction process of the color difference signal in the intra prediction mode corresponding to the converted index is performed.

図34の変換テーブルは、予測方向の角度がθであるとき(図10を参照)、イントラ予測モードの方向性予測が図35に示すtanθとなる角度である場合、tanθ=2tanθの関係に最も近い角度θに変換するテーブルの例である。変換処理の実現は、上記のように、インデックスの変換テーブルを用意し、その変換テーブルを参照することでインデックスを変換するように構成してもよいし、変換式を用意し、その変換式に従ってインデックスを変換するように構成してもよい。このように構成することで、方向性予測処理自体を変更することなく、インデックスの変換のみでYUV4:2:2信号のフォーマットに応じた色差信号の適切な予測を実施することができる。 In the conversion table of FIG. 34, when the angle of the prediction direction is θ (see FIG. 10), the relationship of tan θ C = 2 tan θ L when the direction prediction of the intra prediction mode is tan θ shown in FIG. It is an example of the table converted into the angle θ C closest to. As described above, the conversion process may be realized by preparing an index conversion table and converting the index by referring to the conversion table, or by preparing a conversion formula and according to the conversion formula. You may comprise so that an index may be converted. With this configuration, it is possible to perform appropriate prediction of the color difference signal according to the format of the YUV 4: 2: 2 signal only by converting the index without changing the directionality prediction process itself.

また、色差信号に対して、上記LMモードを行わないように画像符号化装置が構成されている場合、その画像符号化装置から生成される符号化ビットストリームが復号できるように画像復号装置も同様の構成とする。このときの色差信号のイントラ予測パラメータ(インデックス値)と色差イントラ予測モードの対応例として、図34が挙げられる。このようにLMモードも用いないようにすることで、予測対象画素の輝度信号と色差信号の依存性がなくなるため、輝度信号と色差信号の予測処理の並列化が可能になり、高速な演算処理を実現することができる。
さらに、色差信号では、平均値(DC)予測、垂直方向予測、水平方向予測について、輝度信号の場合で説明したブロック境界のフィルタ処理を行わずに、MPEG−4 AVC/H.264と同様の予測手法として画像符号化装置が構成されている場合、その画像符号化装置から生成される符号化ビットストリームが復号できるように画像復号装置も同様の構成とする。このようにフィルタ処理を行わないことで、予測処理の低演算化を図ることができる。
In addition, when the image encoding device is configured not to perform the LM mode on the color difference signal, the image decoding device is also configured so that the encoded bitstream generated from the image encoding device can be decoded. The configuration is as follows. FIG. 34 shows a correspondence example between the intra prediction parameter (index value) of the color difference signal and the color difference intra prediction mode at this time. By not using the LM mode in this way, the dependency of the luminance signal and the color difference signal of the prediction target pixel is eliminated, so that the prediction process of the luminance signal and the color difference signal can be parallelized, and high-speed calculation processing is possible. Can be realized.
Further, in the color difference signal, the average value (DC) prediction, the vertical direction prediction, and the horizontal direction prediction are performed without performing the block boundary filtering process described in the case of the luminance signal, and the MPEG-4 AVC / H. When an image encoding apparatus is configured as a prediction method similar to H.264, the image decoding apparatus has the same configuration so that an encoded bit stream generated from the image encoding apparatus can be decoded. By not performing the filtering process in this way, it is possible to reduce the prediction process.

イントラブロックコピー予測部35は、可変長復号部31により可変長復号された符号化モードm(B)がイントラブロックコピー符号化モード(m(B)∈ICOPY)である場合(ステップST25)、切換スイッチ33から出力された予測ブロック単位のブロックシフトベクトルを含むイントラブロックコピー予測パラメータを受け取って、イントラ用メモリ38に格納されている復号画像を参照しながら、上記イントラブロックコピー予測パラメータを用いた符号化ブロックB内の各予測ブロックP に対するイントラブロックコピー予測処理を実施して、イントラブロックコピー予測画像PICOPYi を生成する(ステップST27)。画像符号化装置において、ブロックシフトベクトルは直前の符号化(復号)済み予測ブロックのブロックシフトベクトル、あるいは当該予測ブロックの周囲の符号化(復号)済み予測ブロックのブロックシフトベクトルとの差分値をイントラブロックコピー予測パラメータの一部として符号化するようにしている場合、イントラブロックコピー予測パラメータに含む差分値と上記ブロックシフトベクトルとを可算して、当該予測ブロックのブロックシフトベクトルを算出する。 The intra block copy prediction unit 35, when the encoding mode m (B n ) that has been variable length decoded by the variable length decoding unit 31 is the intra block copy encoding mode (m (B n ) εICOPY) (step ST25). The intra block copy prediction parameter including the block shift vector of the prediction block unit output from the changeover switch 33 is received, and the intra block copy prediction parameter is used while referring to the decoded image stored in the intra memory 38. There was then conducted intra block copy prediction processing for each of the prediction block P i n the coded block B n, generates an intra block copy predicted image P ICOPYi n (step ST27). In the image coding apparatus, the block shift vector is obtained by calculating the difference value between the block shift vector of the previous encoded (decoded) predicted block or the block shift vector of the encoded (decoded) predicted block around the predicted block. When encoding is performed as a part of the block copy prediction parameter, the difference value included in the intra block copy prediction parameter and the block shift vector are added to calculate the block shift vector of the prediction block.

動き補償予測部36は、可変長復号部31により可変長復号された符号化モードm(B)がインター符号化モード(m(B)∈INTER)である場合(図20のステップST25)、切換スイッチ33から出力された予測ブロック単位の動きベクトルとインター予測パラメータを受け取って、動き補償予測フレームメモリ40に格納されているフィルタ処理後の復号画像を参照しながら、その動きベクトルとインター予測パラメータを用いた符号化ブロックB内の各予測ブロックP に対するインター予測処理を実施してインター予測画像PINTERi を生成する(図20のステップST28)。 The motion compensation prediction unit 36, when the encoding mode m (B n ) that has been variable length decoded by the variable length decoding unit 31 is the inter encoding mode (m (B n ) εINTER) (step ST25 in FIG. 20). The motion vector and inter prediction parameters output from the changeover switch 33 are received and the inter prediction parameters are received while referring to the decoded image after filtering stored in the motion compensated prediction frame memory 40. by carrying out inter-prediction processing for each of the prediction block P i n the coded block B n using a parameter to generate an inter prediction image P INTERi n (step ST28 in FIG. 20).

逆量子化・逆変換部32は、可変長復号部31から圧縮データ及び予測差分符号化パラメータを受けると、図1の逆量子化・逆変換部10と同様の手順で、その予測差分符号化パラメータに含まれる量子化パラメータ及び変換ブロック分割情報を参照して、変換ブロック単位にその圧縮データを逆量子化する。このとき、可変長復号部31により可変長復号された各ヘッダ情報を参照し、各ヘッダ情報が、当該スライスで量子化マトリクスを用いて、逆量子化処理を実施することを示している場合は、量子化マトリクスを用いて逆量子化処理を行う。   When receiving the compressed data and the prediction difference encoding parameter from the variable length decoding unit 31, the inverse quantization / inverse conversion unit 32 performs the prediction difference encoding in the same procedure as the inverse quantization / inverse conversion unit 10 of FIG. With reference to the quantization parameter and transform block division information included in the parameters, the compressed data is inversely quantized in transform block units. At this time, when referring to each header information variable-length decoded by the variable-length decoding unit 31, each header information indicates that the inverse quantization process is performed using the quantization matrix in the slice. Inverse quantization processing is performed using a quantization matrix.

この際、可変長復号部31により可変長復号された各ヘッダ情報を参照して、各直交変換サイズで色信号や符号化モード(イントラ符号化、イントラブロックコピー符号化、インター符号化)毎に使用する量子化マトリクスを特定する。また、逆量子化・逆変換部32は、変換ブロック単位に逆量子化後の圧縮データである変換係数に対する逆直交変換処理を実施して、図1の逆量子化・逆変換部10から出力された局所復号予測差分信号と同一の復号予測差分信号を算出する(図20のステップST29)。   At this time, referring to each header information variable length decoded by the variable length decoding unit 31, for each color signal and coding mode (intra coding, intra block copy coding, inter coding) with each orthogonal transform size Specify the quantization matrix to be used. Further, the inverse quantization / inverse transform unit 32 performs inverse orthogonal transform processing on transform coefficients that are compressed data after inverse quantization in units of transform blocks, and outputs from the inverse quantization / inverse transform unit 10 in FIG. The same decoded prediction difference signal as the local decoding prediction difference signal thus obtained is calculated (step ST29 in FIG. 20).

加算部37は、逆量子化・逆変換部32により算出された復号予測差分信号と、イントラ予測部34により生成されたイントラ予測画像PINTRAi 、イントラブロックコピー予測部35により生成されたイントラブロックコピー予測画像PICOPYi 、又は、動き補償予測部36により生成されたインター予測画像PINTERi のいずれかを加算して復号画像を算出し、その復号画像をループフィルタ部39に出力するとともに、その復号画像をイントラ用メモリ38に格納する(図20のステップST30)。この復号画像が、以降のイントラ予測処理及びイントラブロックコピー予測処理の際に用いられる復号済みの画像信号になる。 Addition unit 37, an intra block generated by the decoded prediction difference signal calculated by the inverse quantization and inverse transform unit 32, an intra prediction image P INTRAi n, intra block copy prediction unit 35 generated by the intra prediction unit 34 copy predicted image P ICOPYi n, or, together with by adding one of generated by the motion compensation prediction unit 36 inter-prediction image P INTERi n calculates a decoded image, and outputs the decoded image to the loop filter unit 39, The decoded image is stored in the intra memory 38 (step ST30 in FIG. 20). This decoded image becomes a decoded image signal used in the subsequent intra prediction processing and intra block copy prediction processing.

ループフィルタ部39は、全ての符号化ブロックBに対するステップST23〜ST30の処理が完了すると(図20のステップST31)、加算部37から出力された復号画像に対して、所定のフィルタ処理を実施して、フィルタ処理後の復号画像を動き補償予測フレームメモリ40に格納する(図20のステップST32)。
具体的には、変換ブロックの境界や予測ブロックの境界に発生する歪みを低減するフィルタ(デブロッキングフィルタ)処理、画素単位に適応的にオフセットを加算する(画素適応オフセット)処理、ウィーナフィルタ等の線形フィルタを適応的に切り替えてフィルタ処理する適応フィルタ処理などを行う。
これらのループフィルタは、復号画像の画質を向上させることを目的として適用されるが、図42に示すようなスクリーンコンテンツの特殊なヒストグラム形状を考慮しておらず、十分な画質改善効果が得られない。そこで、この実施の形態1では、新たなループフィルタ処理としてヒストグラム補正処理を実施する。
Loop filter unit 39, the process of step ST23~ST30 of all the coding blocks B n is completed (step ST31 in FIG. 20), with respect to output decoded image from the adder 37, a predetermined filter process performed Then, the decoded image after filter processing is stored in the motion compensated prediction frame memory 40 (step ST32 in FIG. 20).
Specifically, filter (deblocking filter) processing that reduces distortion occurring at the boundaries of transform blocks and prediction blocks, processing for adaptively adding an offset (pixel adaptive offset) for each pixel, Wiener filter, etc. Performs adaptive filter processing for adaptively switching linear filters and performing filter processing.
These loop filters are applied for the purpose of improving the image quality of the decoded image, but do not consider the special histogram shape of the screen content as shown in FIG. 42, and a sufficient image quality improvement effect can be obtained. Absent. Therefore, in the first embodiment, histogram correction processing is performed as new loop filter processing.

ループフィルタ部39は、上記のデブロッキングフィルタ処理、画素適応オフセット処理、適応フィルタ処理及びヒストグラム補正処理のそれぞれについて、可変長復号部31により可変長復号された各ヘッダ情報を参照することで、当該スライスで行うか否かを特定する。
このとき、2つ以上のフィルタ処理を行う場合において、例えば、図1の画像符号化装置のループフィルタ部13が図12のように構成されていれば、図18に示すようにループフィルタ部39が構成される。当然、画像符号化装置のループフィルタ部13がデブロッキングフィルタ処理、画素適応オフセット処理及びヒストグラム補正処理から構成されていれば、ループフィルタ部39もデブロッキングフィルタ処理、画素適応オフセット処理及びヒストグラム補正処理で構成される。
The loop filter unit 39 refers to each header information variable length decoded by the variable length decoding unit 31 for each of the above deblocking filter processing, pixel adaptive offset processing, adaptive filter processing, and histogram correction processing. Specify whether to do this in slices.
At this time, when two or more filter processes are performed, for example, if the loop filter unit 13 of the image encoding device of FIG. 1 is configured as shown in FIG. 12, the loop filter unit 39 as shown in FIG. Is configured. Naturally, if the loop filter unit 13 of the image encoding device is configured by deblocking filter processing, pixel adaptive offset processing, and histogram correction processing, the loop filter unit 39 also performs deblocking filter processing, pixel adaptive offset processing, and histogram correction processing. Consists of.

ここで、デブロッキングフィルタ処理では、可変長復号部31により可変長復号されたヘッダ情報を参照し、ブロック境界にかけるフィルタ強度の選択に用いる各種パラメータを初期値から変更する情報が存在する場合には、その変更情報に基づいて、デブロッキングフィルタ処理を実施する。変更情報がない場合は、予め定められた手法に従って行う。
画素適応オフセット処理では、可変長復号部31により可変長復号された画素適応オフセット処理のブロック分割情報に基づいて分割し、そのブロック単位に、可変長復号部31により可変長復号されたブロック単位のクラス分類手法を示すインデックスを参照して、そのインデックスが“オフセット処理を行わない”ことを示すインデックスでない場合、ブロック単位にブロック内の各画素を上記インデックスが示すクラス分類手法に従ってクラス分類する。なお、クラス分類手法の候補として、ループフィルタ部13の画素適応オフセット処理のクラス分類手法の候補と同一のものが予め用意されている。
Here, in the deblocking filter processing, when there is information for referring to the header information that has been variable-length decoded by the variable-length decoding unit 31 and changing various parameters used for selecting the filter strength applied to the block boundary from the initial value. Performs a deblocking filter process based on the change information. When there is no change information, it is performed according to a predetermined method.
In the pixel adaptive offset processing, the block is divided based on the block division information of the pixel adaptive offset processing variable-length decoded by the variable-length decoding unit 31, and the block unit of variable-length decoded by the variable-length decoding unit 31 is divided into the blocks. When an index indicating a class classification method is referred to and the index is not an index indicating that “offset processing is not performed”, each pixel in the block is classified into blocks in accordance with the class classification method indicated by the index. Note that the same class classification method candidates as those for the pixel adaptive offset processing class classification method of the loop filter unit 13 are prepared in advance.

そして、ループフィルタ部39は、ブロック単位の各クラスのオフセット値を特定する可変長復号部31により可変長復号されたオフセット情報を参照して、復号画像の画素値にオフセットを加算する処理を行う。
適応フィルタ処理では、可変長復号部31により可変長復号されたクラス毎のフィルタを用いて、図1の画像符号化装置と同一の手法でクラス分類した後に、そのクラス分類情報に基づいてフィルタ処理を行う。
Then, the loop filter unit 39 performs processing for adding the offset to the pixel value of the decoded image with reference to the offset information that has been variable-length decoded by the variable-length decoding unit 31 that identifies the offset value of each class in block units. .
In the adaptive filter process, after classifying by the same method as the image encoding apparatus of FIG. 1 using the filter for each class variable-length decoded by the variable-length decoding unit 31, the filter process is performed based on the class classification information. I do.

ヒストグラム補正処理では、ヒストグラム算出部41が、可変長復号部31により可変長復号されたヒストグラム補正処理のブロック分割情報に基づいて復号画像を分割し、そのブロック単位に、可変長復号部31により可変長復号されたヒストグラム補正を実施するか否かを表すフラグを参照して、そのフラグが“ヒストグラム補正処理を行わない”ことを示す値でない場合、当該ブロックに対してヒストグラム補正処理を実行する。   In the histogram correction process, the histogram calculation unit 41 divides the decoded image based on the block division information of the histogram correction process variable-length decoded by the variable-length decoding unit 31, and variable by the variable-length decoding unit 31 for each block. With reference to a flag indicating whether or not to perform long-decoded histogram correction, if the flag is not a value indicating that “no histogram correction processing is performed”, the histogram correction processing is executed for the block.

図37はこの発明の実施の形態1による画像復号装置におけるヒストグラム補正処理の内容を示すフローチャートである。
以下、図37を参照しながら、ヒストグラム補正処理の流れを説明する。
ヒストグラム補正処理では、最初に、図19のヒストグラム算出部41が、加算部37により算出された復号画像を複数のブロックに分割し、その復号画像のブロック毎に画素値のヒストグラムを算出する(図37のステップST200〜ST201)。また、ヒストグラムの値が最大となる画素値を選択し、その画素値をp(以下、「ピーク画素値」と称する)とする(図37のステップST202)。
なお、ヒストグラムのステップ幅は、必ずしも1とする必要はないが、ループフィルタ部39の出力画像を図1の画像符号化装置におけるループフィルタ部13の出力画像と一致させる必要があるため、ここではループフィルタ部13と同じステップ幅を用いる。また、ヒストグラムのステップ幅を1以上とした場合は、pはステップ幅の中央値などに設定することが考えられるが、これも上記と同様の理由によりループフィルタ部13と一致させる必要がある。
FIG. 37 is a flowchart showing the contents of the histogram correction processing in the image decoding apparatus according to Embodiment 1 of the present invention.
Hereinafter, the flow of the histogram correction process will be described with reference to FIG.
In the histogram correction processing, first, the histogram calculation unit 41 in FIG. 19 divides the decoded image calculated by the addition unit 37 into a plurality of blocks, and calculates a histogram of pixel values for each block of the decoded image (FIG. 19). 37 steps ST200 to ST201). Further, the pixel value having the maximum histogram value is selected, and the pixel value is set to p (hereinafter referred to as “peak pixel value”) (step ST202 in FIG. 37).
Note that the step width of the histogram does not necessarily have to be 1, but the output image of the loop filter unit 39 needs to match the output image of the loop filter unit 13 in the image encoding device of FIG. The same step width as that of the loop filter unit 13 is used. When the step width of the histogram is set to 1 or more, it is conceivable that p is set to the median value of the step width or the like, but this also needs to be matched with the loop filter unit 13 for the same reason as described above.

また、必ずしもブロック内の全ての画素を用いてヒストグラムを計算する必要はなく、一部の画素だけを用いてヒストグラムを求めてもよい。ヒストグラム計算に使用する画素数を削減することで、ヒストグラム計算に必要な演算量を削減することが可能である。なお、これも上記と同様の理由によりループフィルタ部13と一致させる必要がある。   Further, it is not always necessary to calculate the histogram using all the pixels in the block, and the histogram may be obtained using only some of the pixels. By reducing the number of pixels used for the histogram calculation, it is possible to reduce the amount of calculation required for the histogram calculation. This also needs to be matched with the loop filter unit 13 for the same reason as described above.

また、求めたヒストグラムを直接用いてその値が最大となる画素値を選択するだけでなく、例えばヒストグラムを微分してからその最大値を求めることも考えられるが、これも上記と同様の理由によりループフィルタ部13と一致させる必要がある。   In addition to directly using the obtained histogram to select the pixel value that maximizes the value, for example, it may be possible to obtain the maximum value after differentiating the histogram, for the same reason as above. It is necessary to match with the loop filter unit 13.

画素値補正部42は、可変長復号部31により可変長復号されたi番目のピークに対する補正幅w内の画素値((ピーク画素値p−補正幅w)〜(ピーク画素値p+補正幅w)の画素値)をピーク画素値pに置換する(図37のステップST203〜ST206)。

Figure 2015177342
ここで、(x,y)はブロック単位の復号画像における画素の座標を表し、D(x,y)は置換前の画素値、D’(x,y)は置換後の画素値を表している。 The pixel value correction unit 42 includes pixel values ((peak pixel value p−correction width w i ) to (peak pixel value p + correction) within the correction width w i for the i-th peak variable-length decoded by the variable length decoding unit 31. The pixel value of the width w i ) is replaced with the peak pixel value p (steps ST203 to ST206 in FIG. 37).
Figure 2015177342
Here, (x, y) represents the pixel coordinates in the decoded image in block units, D (x, y) represents the pixel value before replacement, and D ′ (x, y) represents the pixel value after replacement. Yes.

ブロック内の全部または一部の画素に対して上記の補正を実施する。なお、上式において、p−wが画素値の下限を下回った場合はこれを画素値の下限に置き換え、p+wが画素値の上限を上回った場合はこれを画素値の上限に置き換えてもよい。
ここでは、補正幅wをピーク画素値pよりも大きい側と小さい側で同一としているが、必ずしも両者を一致させる必要はなく、それぞれに対して異なる補正幅wを使用してもよい。ただし、ループフィルタ部39の出力画像を図1の画像符号化装置におけるループフィルタ部13の出力画像と一致させる必要があるため、ループフィルタ部13と同様の方式を用いなければならない。
The above correction is performed on all or some of the pixels in the block. Incidentally, in the above equation, replace it if p-w i is below the lower limit of the pixel value to the lower limit of the pixel value, p + w i is replaced this if it exceeds the upper limit of the pixel value to the upper limit of the pixel value Also good.
Here, the correction width w i is the same on the side larger than the peak pixel value p and the smaller side, but it is not always necessary to match both, and a different correction width w i may be used for each. However, since it is necessary to match the output image of the loop filter unit 39 with the output image of the loop filter unit 13 in the image encoding device of FIG. 1, a method similar to that for the loop filter unit 13 must be used.

次に、画素値補正部42は、ピーク画素値を示すインデックスiに1を加え、ST202でヒストグラム算出部41により算出されたヒストグラムから、画素値がpとなる画素に相当する部分を削除する(図37のステップST207〜ST208)。
画素値補正部42は、インデックスiと予め設定された最大ピーク数Pmaxを比較し(図37のステップST209)、インデックスiが最大ピーク数Pmaxより小さければ(i<Pmax)、ピーク画素値の再選択をヒストグラム算出部41に指示して、ステップST202の処理に戻る。
一方、インデックスiが最大ピーク数Pmaxに到達していれば(i≧Pmax)、ヒストグラム補正処理を終了する。
このループフィルタ部39によるフィルタ処理後の復号画像が、動き補償予測用の参照画像となり、また、再生画像となる。
Next, the pixel value correcting unit 42 adds 1 to the index i indicating the peak pixel value, and deletes a portion corresponding to a pixel having a pixel value of p from the histogram calculated by the histogram calculating unit 41 in ST202 ( Steps ST207 to ST208 in FIG. 37).
The pixel value correcting unit 42 compares the index i with a preset maximum peak number P max (step ST209 in FIG. 37), and if the index i is smaller than the maximum peak number P max (i <P max ), the peak pixel. The histogram calculation unit 41 is instructed to reselect the value, and the process returns to step ST202.
On the other hand, if the index i has reached the maximum number of peaks P max (i ≧ P max ), the histogram correction process is terminated.
The decoded image after the filter processing by the loop filter unit 39 becomes a reference image for motion compensation prediction and also becomes a reproduced image.

以上で明らかなように、この実施の形態1によれば、入力画像の圧縮データから得られる局所復号画像における画素値のヒストグラムを算出するヒストグラム算出部21と、ヒストグラム算出部21により算出されたヒストグラムから符号化歪みに伴うノイズが重畳している画素を特定して、そのノイズが重畳している画素の画素値を補正する画素値補正部22とを備えるように構成したので、ヒストグラムが疎になるスクリーンコンテンツの局所復号画像に生じる符号化歪みに伴うノイズを十分に低減することができる効果を奏する。
即ち、画像符号化装置におけるループフィルタ部13の画素値補正部22が、局所復号画像のブロック毎に、ヒストグラムの各ピーク画素値に対する最適な補正幅wを求め、その補正幅w内の画素値をピーク画素値pに置換することで、局所復号画像からノイズを取り除くよう構成したので、図42に示すように、ヒストグラムの各ピークが鋭く、疎であるようなスクリーンコンテンツに対して、局所復号画像の大幅な画質改善を実現することができる効果を奏する。ただし、本効果はスクリーンコンテンツに限定されるものではなく、同様のヒストグラム特徴を持つ映像信号であれば、当然ながら同様の効果が得られる。
As is apparent from the above, according to the first embodiment, the histogram calculation unit 21 that calculates a histogram of pixel values in the local decoded image obtained from the compressed data of the input image, and the histogram calculated by the histogram calculation unit 21 And the pixel value correcting unit 22 for correcting the pixel value of the pixel on which the noise is superimposed and specifying the pixel on which the noise due to the coding distortion is superimposed. This produces an effect of sufficiently reducing noise accompanying encoding distortion occurring in the locally decoded image of the screen content.
That is, the pixel value correction unit 22 of the loop filter unit 13 in the image encoding device obtains an optimum correction width w i for each peak pixel value of the histogram for each block of the locally decoded image, and the correction value w i within the correction width w i By replacing the pixel value with the peak pixel value p so as to remove noise from the local decoded image, as shown in FIG. 42, for screen content where each peak of the histogram is sharp and sparse, There is an effect that the image quality of the locally decoded image can be significantly improved. However, this effect is not limited to the screen content, and the same effect can be obtained as long as it is a video signal having a similar histogram characteristic.

また、この実施の形態1によれば、画像符号化装置の可変長符号化部15が、各ピーク画素値に対する補正幅wを符号化して出力する一方、画像復号装置の可変長復号部31が、各ピーク画素値に対する補正幅wを復号し、ループフィルタ部39の画素値補正部42が、可変長復号部31により復号された補正幅w内の画素値をピーク画素値pに置換することで、局所復号画像からノイズを取り除くよう構成したので、図42に示すように、ヒストグラムの各ピークが鋭く、疎であるようなスクリーンコンテンツに対して、復号画像の大幅な画質改善を実現することができる効果を奏する。ただし、本効果はスクリーンコンテンツに限定されるものではなく、同様のヒストグラム特徴を持つ映像信号であれば、当然ながら同様の効果が得られる。
また、この実施の形態1によれば、上記効果を持つ画像符号化装置及び画像符号化方法が生成する符号化ビットストリームを正しく復号することができる画像復号装置及び画像復号方法が得られる効果を奏する。
Further, according to the first embodiment, the variable length encoding unit 15 of the image encoding device encodes and outputs the correction width w i for each peak pixel value, while the variable length decoding unit 31 of the image decoding device. However, the correction width w i for each peak pixel value is decoded, and the pixel value correction unit 42 of the loop filter unit 39 sets the pixel value within the correction width w i decoded by the variable length decoding unit 31 to the peak pixel value p. Since it is configured to remove noise from the local decoded image by replacing, as shown in FIG. 42, the image quality of the decoded image is greatly improved for screen contents in which each peak of the histogram is sharp and sparse. There is an effect that can be realized. However, this effect is not limited to the screen content, and the same effect can be obtained as long as it is a video signal having a similar histogram characteristic.
In addition, according to the first embodiment, the image decoding apparatus and the image decoding method that can correctly decode the encoded bitstream generated by the image encoding apparatus and the image encoding method having the above effects can be obtained. Play.

実施の形態2.
上記実施の形態1では、図1の画像符号化装置のループフィルタ部13に対して、図12に示すようにヒストグラム補正処理を追加し、さらに、図17の画像復号装置のループフィルタ部39に対して、図18に示すようにヒストグラム補正処理を追加しているものを示したが、既存のループフィルタの一部としてヒストグラム補正処理を実現するように構成することで、符号化する情報量を削減するようにしてもよい。
Embodiment 2. FIG.
In the first embodiment, histogram correction processing is added to the loop filter unit 13 of the image encoding device of FIG. 1 as shown in FIG. 12, and the loop filter unit 39 of the image decoding device of FIG. On the other hand, as shown in FIG. 18, the histogram correction processing is added. However, by configuring the histogram correction processing as a part of the existing loop filter, the amount of information to be encoded can be reduced. You may make it reduce.

この実施の形態2による画像符号化装置は、上記実施の形態1における図1の画像符号化装置と同様の構成であるが、図12に示すループフィルタ部13の内部構成のみが、図38のように変更される。
ここでは、図38に示す変更後のループフィルタ部13の構成についてのみ説明する。
The image coding apparatus according to the second embodiment has the same configuration as the image coding apparatus of FIG. 1 in the first embodiment, but only the internal configuration of the loop filter unit 13 shown in FIG. Will be changed as follows.
Here, only the configuration of the modified loop filter unit 13 shown in FIG. 38 will be described.

図38のループフィルタ部13は、加算部11により算出された局所復号画像に対して、所定のフィルタ処理を実施して、フィルタ処理後の局所復号画像を出力する処理を実施する。具体的には、変換ブロックの境界や予測ブロックの境界に発生する歪みを低減するフィルタ(デブロッキングフィルタ)処理、画素単位に適応的にオフセットを加算する(画素適応オフセット)処理、ウィーナフィルタ等の線形フィルタを適応的に切り替えてフィルタ処理する適応フィルタ処理などを行う。   The loop filter unit 13 in FIG. 38 performs a predetermined filtering process on the local decoded image calculated by the adding unit 11, and performs a process of outputting the local decoded image after the filter process. Specifically, filter (deblocking filter) processing that reduces distortion occurring at the boundaries of transform blocks and prediction blocks, processing for adaptively adding an offset (pixel adaptive offset) for each pixel, Wiener filter, etc. Performs adaptive filter processing for adaptively switching linear filters and performing filter processing.

これらのループフィルタは、復号画像の画質を向上させることを目的として適用されるが、図42に示したようなスクリーンコンテンツの特殊なヒストグラム形状を考慮しておらず、十分な画質改善効果が得られない。
そこで、上記実施の形態1では、新たなループフィルタを追加する形でヒストグラム補正処理を実施しているが、この実施の形態2では、既存のループフィルタの一部としてヒストグラム補正処理を実施する。
These loop filters are applied for the purpose of improving the image quality of the decoded image, but do not consider the special histogram shape of the screen content as shown in FIG. 42, so that a sufficient image quality improvement effect is obtained. I can't.
Therefore, in the first embodiment, the histogram correction process is performed by adding a new loop filter. In the second embodiment, the histogram correction process is performed as a part of the existing loop filter.

この実施の形態2では、画素適応オフセットの一部としてヒストグラム補正処理を実施する場合について説明する。
ただし、ヒストグラム補正処理との組み合わせは必ずしも画素適応オフセットに限定されるものではなく、他のループフィルタとの組み合わせも当然考えられる。
In the second embodiment, a case where histogram correction processing is performed as part of the pixel adaptive offset will be described.
However, the combination with the histogram correction processing is not necessarily limited to the pixel adaptive offset, and combinations with other loop filters are naturally conceivable.

図38のループフィルタ部13は、上記のデブロッキングフィルタ処理、画素適応オフセット処理、適応フィルタ処理のそれぞれについて、処理を行うか否かを決定し、各処理の有効フラグをヘッダ情報として可変長符号化部15に出力する。なお、上記のフィルタ処理を複数使用する際は、各フィルタ処理を順番に実施する。図38は複数のフィルタ処理を用いる場合のループフィルタ部13の構成例を示している。
ただし、図38に示しているループフィルタの種類と順序は一例に過ぎず、適用するループフィルタの種類と適用順序は必ずしも図38のようにする必要はない。例えば、デブロッキングフィルタ処理と画素適応オフセット処理の2種類だけでループフィルタ部13を構成することや、適用順序を画素適応オフセット処理、デブロッキングフィルタ処理の順にすることなどが考えられる。
The loop filter unit 13 in FIG. 38 determines whether or not to perform each of the above deblocking filter processing, pixel adaptive offset processing, and adaptive filter processing, and uses a variable length code with the valid flag of each processing as header information. To the conversion unit 15. When a plurality of the above filter processes are used, each filter process is performed in order. FIG. 38 shows a configuration example of the loop filter unit 13 when a plurality of filter processes are used.
However, the types and order of the loop filters shown in FIG. 38 are merely examples, and the types and application order of the loop filters to be applied do not necessarily have to be as shown in FIG. For example, it is conceivable that the loop filter unit 13 is configured with only two types of deblocking filter processing and pixel adaptive offset processing, or that the application order is in order of pixel adaptive offset processing and deblocking filter processing.

ここで、デブロッキングフィルタ処理では、ブロック境界にかけるフィルタ強度の選択に用いる各種パラメータを初期値から変更することができる。変更する場合には、そのパラメータをヘッダ情報として可変長符号化部15に出力する。
画素適応オフセット処理では、最初に、画像を複数のブロックに分割し、そのブロック単位に、オフセット処理を行わない場合も含めて、複数のオフセットの適用方法の中から一つを選択する。
この実施の形態2では、このオフセットの適用方法の一つとしてヒストグラム補正処理を選択することが可能である。図38のループフィルタ部13は、選択したオフセット適用方法に応じて、ブロック内の各画素をクラス分類し、クラス毎に符号化歪みを補償するオフセット値を算出するか、あるいは、ヒストグラム補正を実施するための最適な補正幅Wをピーク画素値毎に算出する。
最後に、局所復号画像の画素値に対してオフセット値を加算する処理を行うか、あるいは、局所復号画像のヒストグラムを補正することによって局所復号画像の画像品質を改善する。
Here, in the deblocking filter process, various parameters used for selecting the filter strength applied to the block boundary can be changed from the initial values. When changing, the parameter is output to the variable length coding unit 15 as header information.
In the pixel adaptive offset process, first, an image is divided into a plurality of blocks, and one of a plurality of offset application methods is selected for each block including the case where the offset process is not performed.
In the second embodiment, histogram correction processing can be selected as one method of applying this offset. The loop filter unit 13 in FIG. 38 classifies each pixel in the block according to the selected offset application method, and calculates an offset value for compensating for coding distortion for each class, or performs histogram correction. An optimum correction width W i is calculated for each peak pixel value.
Finally, processing for adding an offset value to the pixel value of the locally decoded image is performed, or the image quality of the locally decoded image is improved by correcting the histogram of the locally decoded image.

補正幅がwである場合、ヒストグラム補正処理は、以下のように行う。

Figure 2015177342
ここで、(x,y)はブロック単位の局所復号画像における画素の座標を表し、L(x,y)は置換前の画素値、L’(x,y)は置換後の画素値を表している。
ブロック内の全部または一部の画素に対して上記の補正を実施する。なお、上式において、p−wが画素値の下限を下回った場合はこれを画素値の下限に置き換え、p+wが画素値の上限を上回った場合はこれを画素値の上限に置き換えてもよい。
ここでは、補正幅wをピーク画素値pよりも大きい側と小さい側で同一としているが、必ずしも両者を一致させる必要はなく、それぞれに対して異なる補正幅wを使用してもよい。 When the correction width is w i , the histogram correction process is performed as follows.
Figure 2015177342
Here, (x, y) represents the pixel coordinates in the local decoded image in block units, L (x, y) represents the pixel value before replacement, and L ′ (x, y) represents the pixel value after replacement. ing.
The above correction is performed on all or some of the pixels in the block. Incidentally, in the above equation, replace it if p-w i is below the lower limit of the pixel value to the lower limit of the pixel value, p + w i is replaced this if it exceeds the upper limit of the pixel value to the upper limit of the pixel value Also good.
Here, the correction width w i is the same on the side larger than the peak pixel value p and the smaller side, but it is not always necessary to match both, and a different correction width w i may be used for each.

ヒストグラム補正処理では、上記のようにして最初のピークを補正した後、次のピークに移動し、同様の処理を所定のピーク数に達するまで繰り返し実施する。
画素適応オフセット処理では、ブロック分割情報、各ブロックのクラス分類手法を示すインデックス、ブロック単位の各クラスのオフセット値を特定するオフセット情報あるいはヒストグラム補正のためのヒストグラムの各ピークに対する補正幅をヘッダ情報として可変長符号化部15に出力する。
In the histogram correction process, after correcting the first peak as described above, the process moves to the next peak, and the same process is repeated until a predetermined number of peaks is reached.
In the pixel adaptive offset process, header information includes block division information, an index indicating a class classification method for each block, offset information for specifying an offset value of each class in block units, or a correction width for each peak of a histogram for histogram correction. The data is output to the variable length coding unit 15.

上記実施の形態1では、画素適応オフセット処理のための情報に加えてヒストグラム補正処理のための情報を符号化する必要があったが、この実施の形態2では、画素適応オフセット処理の一部としてヒストグラム補正処理を実施することによって、オフセット処理のための情報とヒストグラム補正処理のための情報のいずれか一方だけを符号化すればよいため、ループフィルタ全体での符号量を削減することができる。   In the first embodiment, it is necessary to encode information for the histogram correction process in addition to the information for the pixel adaptive offset process. However, in the second embodiment, as a part of the pixel adaptive offset process, By performing the histogram correction process, only one of the information for the offset process and the information for the histogram correction process needs to be encoded, so that the code amount in the entire loop filter can be reduced.

なお、画素適応オフセット処理において、例えば、最大符号化ブロックといった固定サイズのブロック単位に常に分割して、そのブロック毎にクラス分類手法を選択して、クラス毎の適応オフセット処理を行ってもよい。この場合、上記ブロック分割情報が不要となり、ブロック分割情報に要する符号量分だけ符号量が削減され、符号化効率を高めることができる。   In the pixel adaptive offset processing, for example, it may be always divided into fixed-size block units such as a maximum coding block, and a class classification method may be selected for each block to perform adaptive offset processing for each class. In this case, the block division information becomes unnecessary, the code amount is reduced by the amount of code required for the block division information, and the coding efficiency can be improved.

適応フィルタ処理では、局所復号画像を所定の手法でクラス分類し、各クラスに属する領域(局所復号画像)毎に、重畳されている歪みを補償するフィルタを設計し、そのフィルタを用いて、当該局所復号画像のフィルタ処理を実施する。そして、クラス毎に設計したフィルタをヘッダ情報として可変長符号化部15に出力する。クラス分類手法としては、画像を空間的に等間隔に区切る簡易な手法や、ブロック単位に画像の局所的な特性(分散など)に応じて分類する手法がある。また、適応フィルタ処理で使用するクラス数は、予め画像符号化装置及び画像復号装置に共通の値として設定してもよいし、符号化すべきパラメータとしてもよい。前者と比較して後者の方が、使用するクラス数を自由に設定することができるため、画像品質改善効果が上がるが、一方でクラス数を符号化するために、その分の符号量が増加する。   In adaptive filter processing, local decoded images are classified by a predetermined method, and a filter that compensates for the distortion that is superimposed is designed for each region (local decoded image) belonging to each class. Filter the local decoded image. Then, the filter designed for each class is output to the variable length encoding unit 15 as header information. As the class classification method, there are a simple method for spatially dividing an image at equal intervals, and a method for classifying an image according to local characteristics (dispersion, etc.) of each block. Further, the number of classes used in the adaptive filter processing may be set in advance as a value common to the image encoding device and the image decoding device, or may be a parameter to be encoded. Compared to the former, the latter can set the number of classes to be used freely, so the image quality improvement effect will be improved, but on the other hand, the amount of code will be increased to encode the number of classes. To do.

この実施の形態2による画像復号装置は、上記実施の形態1における図17の画像復号装置と同様の構成であるが、図18に示すループフィルタ部39の内部構成のみが、図39のように変更される。
ここでは、図39に示す変更後のループフィルタ部39の構成についてのみ説明する。
The image decoding apparatus according to the second embodiment has the same configuration as that of the image decoding apparatus in FIG. 17 in the first embodiment, but only the internal configuration of the loop filter unit 39 shown in FIG. 18 is as shown in FIG. Be changed.
Here, only the configuration of the modified loop filter unit 39 shown in FIG. 39 will be described.

図39のループフィルタ部39は、加算部37により算出された復号画像に対して、所定のフィルタ処理を実施して、フィルタ処理後の復号画像を出力する処理を実施する。具体的には、変換ブロックの境界や予測ブロックの境界に発生する歪みを低減するフィルタ(デブロッキングフィルタ)処理、画素単位に適応的にオフセットを加算する(画素適応オフセット)処理、ウィーナフィルタ等の線形フィルタを適応的に切り替えてフィルタ処理する適応フィルタ処理などを行う。   The loop filter unit 39 in FIG. 39 performs a predetermined filter process on the decoded image calculated by the adder unit 37, and performs a process of outputting the decoded image after the filter process. Specifically, filter (deblocking filter) processing that reduces distortion occurring at the boundaries of transform blocks and prediction blocks, processing for adaptively adding an offset (pixel adaptive offset) for each pixel, Wiener filter, etc. Performs adaptive filter processing for adaptively switching linear filters and performing filter processing.

これらのループフィルタは、復号画像の画質を向上させることを目的として適用されるが、図42に示したようなスクリーンコンテンツの特殊なヒストグラム形状を考慮しておらず、十分な画質改善効果が得られない。
そこで、上記実施の形態1では、新たなループフィルタを追加する形でヒストグラム補正処理を実施しているが、この実施の形態2では、既存のループフィルタの一部としてヒストグラム補正処理を実施する。
These loop filters are applied for the purpose of improving the image quality of the decoded image, but do not consider the special histogram shape of the screen content as shown in FIG. 42, so that a sufficient image quality improvement effect is obtained. I can't.
Therefore, in the first embodiment, the histogram correction process is performed by adding a new loop filter. In the second embodiment, the histogram correction process is performed as a part of the existing loop filter.

この実施の形態2では、画素適応オフセットの一部としてヒストグラム補正処理を実施する場合について説明する。
ただし、ヒストグラム補正処理との組み合わせは必ずしも画素適応オフセットに限定されるものではなく、他のループフィルタとの組み合わせも当然考えられる。ただし、組み合わせ方法は、画像符号化装置のループフィルタ部13と同様にする必要がある。
In the second embodiment, a case where histogram correction processing is performed as part of the pixel adaptive offset will be described.
However, the combination with the histogram correction processing is not necessarily limited to the pixel adaptive offset, and combinations with other loop filters are naturally conceivable. However, the combination method needs to be the same as that of the loop filter unit 13 of the image encoding device.

図39のループフィルタ部39は、上記のデブロッキングフィルタ処理、画素適応オフセット処理、適応フィルタ処理のそれぞれについて、可変長復号部31により可変長復号された各ヘッダ情報を参照して、当該スライスで行うか否かを特定する。
このとき、2つ以上のフィルタ処理を行う場合において、例えば、画像符号化装置のループフィルタ部13が図38のように構成されていれば、図39に示すようにループフィルタ部39が構成される。当然、画像符号化装置のループフィルタ部13がデブロッキングフィルタ処理と画素適応オフセット処理から構成されていれば、ループフィルタ部39もデブロッキングフィルタ処理と画素適応オフセット処理で構成される。
The loop filter unit 39 in FIG. 39 refers to each header information variable length decoded by the variable length decoding unit 31 for each of the deblocking filter processing, pixel adaptive offset processing, and adaptive filter processing described above, and Specify whether to do it.
At this time, when two or more filter processes are performed, for example, if the loop filter unit 13 of the image encoding device is configured as shown in FIG. 38, the loop filter unit 39 is configured as shown in FIG. The Naturally, if the loop filter unit 13 of the image encoding device is configured by deblocking filter processing and pixel adaptive offset processing, the loop filter unit 39 is also configured by deblocking filter processing and pixel adaptive offset processing.

ここで、デブロッキングフィルタ処理では、可変長復号部31により可変長復号されたヘッダ情報を参照し、ブロック境界にかけるフィルタ強度の選択に用いる各種パラメータを初期値から変更する情報が存在する場合、その変更情報に基づいて、デブロッキングフィルタ処理を実施する。変更情報がない場合は、予め定められた手法に従って行う。
画素適応オフセット処理では、可変長復号部31により可変長復号された画素適応オフセット処理のブロック分割情報に基づいて復号画像を分割し、そのブロック単位に、可変長復号部31により可変長復号されたブロック単位のクラス分類手法を示すインデックスを参照して、そのインデックスが“オフセット処理を行わない”ことを示すインデックスではなく、かつ“ヒストグラム補正処理を行う”ことを示すインデックスではない場合、そのインデックスに応じてブロック単位にブロック内の各画素を上記インデックスが示すクラス分類手法に従ってクラス分類する。なお、クラス分類手法の候補として、図38のループフィルタ部13の画素適応オフセット処理のクラス分類手法の候補と同一のものが予め用意されている。そして、ブロック単位の各クラスのオフセット値を特定するオフセット情報を参照して、復号画像の画素値にオフセットを加算する処理を行う。
Here, in the deblocking filter processing, with reference to the header information that has been subjected to variable length decoding by the variable length decoding unit 31, there is information for changing various parameters used for selecting the filter strength applied to the block boundary from the initial value. Based on the change information, deblocking filter processing is performed. When there is no change information, it is performed according to a predetermined method.
In the pixel adaptive offset processing, the decoded image is divided based on the block division information of the pixel adaptive offset processing variable-length decoded by the variable-length decoding unit 31, and the variable-length decoding unit 31 performs variable-length decoding on the block basis. Referring to an index indicating a block classification method, if the index is not an index indicating that “offset processing is not performed” and is not an index indicating that “histogram correction processing is performed”, the index Accordingly, each pixel in the block is classified according to the class classification method indicated by the index. As the class classification method candidates, the same class classification method candidates for the pixel adaptive offset process of the loop filter unit 13 of FIG. 38 are prepared in advance. Then, a process of adding the offset to the pixel value of the decoded image is performed with reference to the offset information specifying the offset value of each class in block units.

一方、可変長復号部31により可変長復号されたブロック単位のクラス分類手法を示すインデックスが“オフセット処理を行わない”ことを示すインデックスではなく、かつ“ヒストグラム補正処理を行う”ことを示すインデックスである場合、当該ブロックにおける画素値のヒストグラムを算出し、そのヒストグラムのピーク画素値の位置を所定の方法によって決定する。   On the other hand, the index indicating the block class classification method variable-length decoded by the variable-length decoding unit 31 is not an index indicating that “offset processing is not performed” and is an index indicating that “histogram correction processing is performed”. In some cases, a histogram of pixel values in the block is calculated, and the position of the peak pixel value in the histogram is determined by a predetermined method.

画素値補正部42は、可変長復号部31により可変長復号されたi番目のピークに対する補正幅w内の画素値((ピーク画素値p−補正幅w)〜(ピーク画素値p+補正幅w)の画素値)をピーク画素値pに置換する。

Figure 2015177342
ここで、(x,y)はブロック単位の復号画像における画素の座標を表し、D(x,y)は置換前の画素値、D’(x,y)は置換後の画素値を表している。
ブロック内の全部または一部の画素に対して上記の補正を実施する。なお、上式において、p−wが画素値の下限を下回った場合はこれを画素値の下限に置き換え、p+wが画素値の上限を上回った場合はこれを画素値の上限に置き換えてもよい。 The pixel value correction unit 42 includes pixel values ((peak pixel value p−correction width w i ) to (peak pixel value p + correction) within the correction width w i for the i-th peak variable-length decoded by the variable length decoding unit 31. Replace the pixel value of width w i ) with the peak pixel value p.
Figure 2015177342
Here, (x, y) represents the pixel coordinates in the decoded image in block units, D (x, y) represents the pixel value before replacement, and D ′ (x, y) represents the pixel value after replacement. Yes.
The above correction is performed on all or some of the pixels in the block. Incidentally, in the above equation, replace it if p-w i is below the lower limit of the pixel value to the lower limit of the pixel value, p + w i is replaced this if it exceeds the upper limit of the pixel value to the upper limit of the pixel value Also good.

ここでは、補正幅wをピーク画素値pよりも大きい側と小さい側で同一としているが、必ずしも両者を一致させる必要はなく、それぞれに対して異なる補正幅wを使用してもよい。ただし、ループフィルタ部39の出力画像を画像符号化装置におけるループフィルタ部13の出力画像と一致させる必要があるため、ループフィルタ部13と同様の方式を用いなければならない。
ヒストグラム補正処理では、上記のようにして最初のピークを補正した後、次のピークに移動し、同様の処理を所定のピーク数に達するまで繰り返し実施する。
Here, the correction width w i is the same on the side larger than the peak pixel value p and the smaller side, but it is not always necessary to match both, and a different correction width w i may be used for each. However, since it is necessary to match the output image of the loop filter unit 39 with the output image of the loop filter unit 13 in the image encoding device, the same method as the loop filter unit 13 must be used.
In the histogram correction process, after correcting the first peak as described above, the process moves to the next peak, and the same process is repeated until a predetermined number of peaks is reached.

ただし、画像符号化装置のループフィルタ部13の画素適応オフセット処理において、ブロック分割情報は符号化せずに、常に画像を固定サイズのブロック単位(例えば、最大符号化ブロック単位)に分割し、そのブロック毎にクラス分類手法を選択して、クラス毎の適応オフセット処理を行うように構成されている場合、ループフィルタ部39においても、ループフィルタ部13と同一の固定サイズのブロック単位に画素適応オフセット処理を実施する。
適応フィルタ処理では、可変長復号部31により可変長復号されたクラス毎のフィルタを用いて、図1の画像符号化装置と同一の手法でクラス分類した後に、そのクラス分類情報に基づいてフィルタ処理を行う。
However, in the pixel adaptive offset processing of the loop filter unit 13 of the image encoding device, the block division information is not encoded, and the image is always divided into fixed-size block units (for example, the maximum encoded block unit). When a class classification method is selected for each block and adaptive offset processing for each class is performed, the loop filter unit 39 also has a pixel adaptive offset in units of blocks having the same fixed size as the loop filter unit 13. Perform the process.
In the adaptive filter process, after classifying by the same method as the image encoding apparatus of FIG. 1 using the filter for each class variable-length decoded by the variable-length decoding unit 31, the filter process is performed based on the class classification information. I do.

次に、この実施の形態2による画像符号化装置において、上記実施の形態1による画像符号化装置と構成が異なるループフィルタ部13についての動作を説明する。その他の動作は、上記実施の形態1と同様である。
図38のループフィルタ部13は、加算部11から局所復号画像を受けると、その局所復号画像に対して、所定のフィルタ処理を実施して、フィルタ処理後の局所復号画像を動き補償予測フレームメモリ14に格納する(図16のステップST11)。具体的には、変換ブロックの境界や予測ブロックの境界に発生する歪みを低減するフィルタ(デブロッキングフィルタ)処理、画素単位に適応的にオフセットを加算する(画素適応オフセット)処理、ウィーナフィルタ等の線形フィルタを適応的に切り替えてフィルタ処理する適応フィルタ処理などを行う。
Next, in the image coding apparatus according to the second embodiment, the operation of the loop filter unit 13 having a configuration different from that of the image coding apparatus according to the first embodiment will be described. Other operations are the same as those in the first embodiment.
When the loop filter unit 13 in FIG. 38 receives the local decoded image from the adder unit 11, the loop filter unit 13 performs a predetermined filter process on the local decoded image, and the local decoded image after the filter process is subjected to motion compensation prediction frame memory. 14 (step ST11 in FIG. 16). Specifically, filter (deblocking filter) processing that reduces distortion occurring at the boundaries of transform blocks and prediction blocks, processing for adaptively adding an offset (pixel adaptive offset) for each pixel, Wiener filter, etc. Performs adaptive filter processing for adaptively switching linear filters and performing filter processing.

これらのループフィルタは、復号画像の画質を向上させることを目的として適用されるが、図42に示したようなスクリーンコンテンツの特殊なヒストグラム形状を考慮しておらず、十分な画質改善効果が得られない。
そこで、上記実施の形態1では、新たなループフィルタを追加する形でヒストグラム補正処理を実施しているが、この実施の形態2では、既存のループフィルタの一部としてヒストグラム補正処理を実施する。
この実施の形態2では、画素適応オフセットの一部としてヒストグラム補正処理を実施する場合について説明する。
ただし、ヒストグラム補正処理との組み合わせは必ずしも画素適応オフセットに限定されるものではなく、他のループフィルタとの組み合わせも当然考えられる。
These loop filters are applied for the purpose of improving the image quality of the decoded image, but do not consider the special histogram shape of the screen content as shown in FIG. 42, so that a sufficient image quality improvement effect is obtained. I can't.
Therefore, in the first embodiment, the histogram correction process is performed by adding a new loop filter. In the second embodiment, the histogram correction process is performed as a part of the existing loop filter.
In the second embodiment, a case where histogram correction processing is performed as part of the pixel adaptive offset will be described.
However, the combination with the histogram correction processing is not necessarily limited to the pixel adaptive offset, and combinations with other loop filters are naturally conceivable.

図38のループフィルタ部13は、上記のデブロッキングフィルタ処理、画素適応オフセット処理、適応フィルタ処理のそれぞれについて、処理を行うか否かを決定し、各処理の有効フラグをヘッダ情報として可変長符号化部15に出力する。なお、上記のフィルタ処理を複数使用する際は、各フィルタ処理を順番に実施する。図38は複数のフィルタ処理を用いる場合のループフィルタ部13の構成例を示している。
ただし、図38に示しているループフィルタの種類と順序は一例に過ぎず、適用するループフィルタの種類と適用順序は必ずしも図38のようにする必要はない。例えば、デブロッキングフィルタ処理と画素適応オフセット処理の2種類だけでループフィルタ部13を構成することや、適用順序を画素適応オフセット処理、デブロッキングフィルタ処理の順にすることなどが考えられる。
The loop filter unit 13 in FIG. 38 determines whether or not to perform each of the above deblocking filter processing, pixel adaptive offset processing, and adaptive filter processing, and uses a variable length code with the valid flag of each processing as header information. To the conversion unit 15. When a plurality of the above filter processes are used, each filter process is performed in order. FIG. 38 shows a configuration example of the loop filter unit 13 when a plurality of filter processes are used.
However, the types and order of the loop filters shown in FIG. 38 are merely examples, and the types and application order of the loop filters to be applied do not necessarily have to be as shown in FIG. For example, it is conceivable that the loop filter unit 13 is configured with only two types of deblocking filter processing and pixel adaptive offset processing, or that the application order is in order of pixel adaptive offset processing and deblocking filter processing.

ここで、デブロッキングフィルタ処理では、ブロック境界にかけるフィルタ強度の選択に用いる各種パラメータを初期値から変更することができる。変更する場合には、そのパラメータをヘッダ情報として可変長符号化部15に出力する。
画素適応オフセット処理では、最初に、画像を複数のブロックに分割し、そのブロック単位に、オフセット処理を行わない場合も含めて、複数のオフセットの適用方法の中から一つを選択する。
この実施の形態2では、このオフセットの適用方法の一つとしてヒストグラム補正処理を選択することが可能である。図38のループフィルタ部13は、選択したオフセット適用方法に応じて、ブロック内の各画素をクラス分類し、クラス毎に符号化歪みを補償するオフセット値を算出するか、あるいは、ヒストグラム補正を実施するための最適な補正幅Wをピーク画素値毎に算出する。
最後に、局所復号画像の画素値に対してオフセット値を加算する処理を行うか、あるいは、局所復号画像のヒストグラムを補正することによって局所復号画像の画像品質を改善する。
Here, in the deblocking filter process, various parameters used for selecting the filter strength applied to the block boundary can be changed from the initial values. When changing, the parameter is output to the variable length coding unit 15 as header information.
In the pixel adaptive offset process, first, an image is divided into a plurality of blocks, and one of a plurality of offset application methods is selected for each block including the case where the offset process is not performed.
In the second embodiment, histogram correction processing can be selected as one method of applying this offset. The loop filter unit 13 in FIG. 38 classifies each pixel in the block according to the selected offset application method, and calculates an offset value for compensating for coding distortion for each class, or performs histogram correction. An optimum correction width W i is calculated for each peak pixel value.
Finally, processing for adding an offset value to the pixel value of the locally decoded image is performed, or the image quality of the locally decoded image is improved by correcting the histogram of the locally decoded image.

オフセット適用手法としては、局所復号画像の画素値の大きさでクラス分類する手法(BO手法と呼ぶ)や、エッジの方向毎に各画素の周囲の状況(エッジ部か否か等)に応じてクラス分類する手法(EO手法と呼ぶ)がある。
この実施の形態2では、上記実施の形態1と異なり、ここにヒストグラム補正処理を追加している。これらの手法は、予め画像符号化装置及び画像復号装置で共通に用意されており、例えば、図40に示すように、オフセット処理を行わない場合もオフセット適用手法の一つとして定義し、これらの手法のうち、どの手法を用いるか示すインデックスを上記ブロック単位に選択する。
As an offset application method, a method of classifying by the size of a pixel value of a locally decoded image (referred to as a BO method), a situation around each pixel (whether or not an edge portion, etc.) for each edge direction, etc. There is a method of classifying (called an EO method).
In the second embodiment, unlike the first embodiment, a histogram correction process is added here. These methods are prepared in advance by the image encoding device and the image decoding device in advance. For example, as shown in FIG. 40, when the offset process is not performed, it is defined as one of the offset application methods. Among the methods, an index indicating which method is used is selected for each block.

また、図40に示すオフセット適用手法は、あらかじめいくつかのセットを用意しておき、それを切り替えて用いてもよい。例えば、入力映像がスクリーンコンテンツであるか否かを示すフラグ(ここではSCフラグと呼ぶ)をシーケンスごとに付与するヘッダ(シーケンスパラメータセット)に用意し、そのフラグに応じて図59に示す2つのセットを切り替えるようにすることが考えられる。図59では、入力映像がスクリーンコンテンツでない場合はBO手法またはEO手法を用いるようにし、入力映像がスクリーンコンテンツの場合はBO手法またはヒストグラム補正処理を用いるようにしている。このようにすることで、オフセット適用手法を表現するのに必要なインデックスのビット数を削減することが可能である。なお、SCフラグは必ずしもシーケンスパラメータセットに置く必要はなく、ピクチャ単位に切り替えるためにピクチャごとに付与するヘッダ(ピクチャパラメータセット)に置いたり、スライス単位に切り替えるためにスライスごとに付与するヘッダ(スライスパラメータセット)に置くことなども考えられる。さらに、ブロック単位に切り替えることも当然考えられる。また、当然ながらSCフラグも任意の条件で変更可能なフラグに一般化できる。   Also, the offset application method shown in FIG. 40 may be prepared by preparing several sets in advance and switching them. For example, a flag (herein referred to as an SC flag) indicating whether or not the input video is screen content is prepared in a header (sequence parameter set) assigned for each sequence, and two flags shown in FIG. It is possible to switch the set. In FIG. 59, when the input video is not screen content, the BO method or EO method is used, and when the input video is screen content, the BO method or histogram correction processing is used. By doing so, it is possible to reduce the number of bits of the index necessary for expressing the offset application method. Note that the SC flag does not necessarily have to be placed in the sequence parameter set. The SC flag is placed in a header (picture parameter set) given for each picture to switch to a picture unit, or a header (slice that is given to each slice to switch in a slice unit). It may be placed in the parameter set. Furthermore, switching to a block unit is naturally conceivable. Of course, the SC flag can be generalized to a flag that can be changed under an arbitrary condition.

図41は図40における複数のオフセット適用手法の中から、使用するオフセット適用手法を選択する手順を示すフローチャートである。
まず、図38のループフィルタ部13は、画素適応オフセット処理を適用せずに符号化を実施した場合の符号化コストCoffを求める(図41のステップST300)。
符号化コストの算出方法には様々な手法が考えられるが、原画像との誤差をd、ヘッダ情報などを送るのに必要となる符号量をrとすると、d+λrという形で表現することが一般的である。ここで、λはビットレートなどに応じて画像符号化装置が決定する係数である。
FIG. 41 is a flowchart showing a procedure for selecting an offset application method to be used from among a plurality of offset application methods in FIG.
First, the loop filter unit 13 in FIG. 38 obtains an encoding cost C off when encoding is performed without applying the pixel adaptive offset processing (step ST300 in FIG. 41).
There are various methods for calculating the encoding cost, but it is generally expressed in the form of d + λr, where d is the error from the original image and r is the amount of code required to send the header information. Is. Here, λ is a coefficient determined by the image coding apparatus according to the bit rate or the like.

次に、図38のループフィルタ部13は、図40に示すBO手法やEO手法のそれぞれについて、ブロック内の各画素をクラス分類し、クラス毎に符号化歪みを補償するオフセット値を算出する。クラス分類手法やオフセット算出手法については公知の技術であるためここでは説明を割愛する。
そして、図38のループフィルタ部13は、これらのオフセット値を局所復号画像の画素値に対して加算した場合の符号化コストを求める(図41のステップST301〜ST305)。
Next, the loop filter unit 13 of FIG. 38 classifies each pixel in the block for each of the BO method and the EO method shown in FIG. 40, and calculates an offset value for compensating the coding distortion for each class. Since the class classification method and the offset calculation method are known techniques, description thereof is omitted here.
And the loop filter part 13 of FIG. 38 calculates | requires the encoding cost at the time of adding these offset values with respect to the pixel value of a local decoded image (step ST301-ST305 of FIG. 41).

この実施の形態2では、上記の他に、図38のループフィルタ部13が、ヒストグラム補正を実施するためのヒストグラムの各ピーク画素値に対する補正幅wを算出する。補正幅wの算出方法は、上記実施の形態1と同様に行うことが考えられる。
図38のループフィルタ部13は、各ピーク画素値に対する補正幅wを用いて局所復号画像のヒストグラム補正を実施した場合の符号化コストを求める(図41のステップST306)。
図38のループフィルタ部13は、図40における複数のオフセット適用手法の中から、最も小さい符号化コストを示す手法を選択する(図41のステップST307)。
In the second embodiment, in addition to the above, the loop filter unit 13 of FIG. 38 calculates a correction width w i for each peak pixel value of the histogram for performing histogram correction. It is conceivable that the correction width w i is calculated in the same manner as in the first embodiment.
The loop filter unit 13 in FIG. 38 obtains the coding cost when the histogram correction of the locally decoded image is performed using the correction width w i for each peak pixel value (step ST306 in FIG. 41).
The loop filter unit 13 in FIG. 38 selects a technique indicating the lowest coding cost from the plurality of offset application techniques in FIG. 40 (step ST307 in FIG. 41).

上記の比較の結果、画素適応オフセット処理を適用しても符号化効率の改善が見られない場合(Coffが最小となる場合)、インデックス0をヘッダ情報として可変長符号化部15に出力して終了する(図41のステップST308〜ST309)。これは、画素適応オフセット処理を適用しないことを意味する。
一方、符号化コストを最小化する手法として、BO手法またはEO手法が選択された場合、選択された手法を表すインデックスを図40に従ってヘッダ情報として可変長符号化部15に出力し、さらに、各クラスに対するオフセットをヘッダ情報として可変長符号化部15に出力して終了する(図41のステップST310〜ST311)。
また、符号化コストを最小化する手法として、ヒストグラム補正が選択された場合、選択された手法を表すインデックスを図40に従ってヘッダ情報として可変長符号化部15に出力し、さらに、ヒストグラムの各ピークに対する補正幅をヘッダ情報として可変長符号化部15に出力して終了する(図41のステップST312)。
As a result of the above comparison, if no improvement in coding efficiency is observed even when pixel adaptive offset processing is applied (when C off is minimized), index 0 is output to the variable length coding unit 15 as header information. (Steps ST308 to ST309 in FIG. 41). This means that pixel adaptive offset processing is not applied.
On the other hand, when the BO method or the EO method is selected as a method for minimizing the coding cost, an index representing the selected method is output to the variable length coding unit 15 as header information according to FIG. The offset for the class is output as header information to the variable length coding unit 15 and the process ends (steps ST310 to ST311 in FIG. 41).
Further, when histogram correction is selected as a method for minimizing the coding cost, an index representing the selected method is output to the variable length coding unit 15 as header information according to FIG. 40, and each peak of the histogram is further displayed. Is output to the variable length encoding unit 15 as header information, and the process ends (step ST312 in FIG. 41).

図41からも明らかなように、この実施の形態2では、BO手法またはEO手法を適用するためのオフセットか、あるいは、ヒストグラム補正を適用するための補正幅wのどちらか一方だけが符号化される。したがって、両者を符号化する必要がある上記実施の形態1よりも符号量を削減することが可能である。
ただし、BO手法またはEO手法及びヒストグラム補正の両方を適用することが可能である上記実施の形態1に対し、この実施の形態2では、BO手法またはEO手法か、ヒストグラム補正のどちらか一方だけしか適用できないため、画質改善効果は上記実施の形態1よりも劣る可能性がある。
As is clear from FIG. 41, in the second embodiment, only one of the offset for applying the BO method or the EO method or the correction width w i for applying the histogram correction is encoded. Is done. Therefore, it is possible to reduce the code amount as compared with the first embodiment in which both need to be encoded.
However, in contrast to the first embodiment in which both the BO method or the EO method and the histogram correction can be applied, in the second embodiment, only either the BO method or the EO method or the histogram correction is performed. Since it cannot be applied, the image quality improvement effect may be inferior to that of the first embodiment.

BO手法またはEO手法で分類するクラスの数と、ヒストグラム補正処理を適用するヒストグラムのピークの数(上記実施の形態1における最大ピーク数Pmax)とを同一とすれば、オフセットまたは補正幅を符号化するためのシンタックスを共通にして簡易化することができる。もちろん、クラス数とヒストグラムのピーク数を異なる値とすることも可能である。
したがって、画素適応オフセット処理は、ブロックの分割情報、ブロック単位のオフセット適用手法を示すインデックス、ブロック単位のオフセット情報あるいはヒストグラム補正のため補正幅wをヘッダ情報として可変長符号化部15に出力する。
If the number of classes classified by the BO method or EO method is the same as the number of histogram peaks to which the histogram correction processing is applied (maximum peak number P max in the first embodiment), the offset or the correction width is encoded. A common syntax can be simplified. Of course, the number of classes and the number of peaks in the histogram may be different from each other.
Therefore, the pixel adaptive offset processing outputs block division information, an index indicating an offset application technique in units of blocks, offset information in units of blocks, or correction width w i for histogram correction to the variable length encoding unit 15 as header information. .

なお、画素適応オフセット処理において、例えば、最大符号化ブロックといった固定サイズのブロック単位に常に分割して、そのブロック毎にクラス分類手法を選択して、クラス毎の適応オフセット処理を行ってもよい。この場合、上記ブロック分割情報が不要となり、ブロック分割情報に要する符号量分だけ符号量が削減され、符号化効率を高めることができる。   In the pixel adaptive offset processing, for example, it may be always divided into fixed-size block units such as a maximum coding block, and a class classification method may be selected for each block to perform adaptive offset processing for each class. In this case, the block division information becomes unnecessary, the code amount is reduced by the amount of code required for the block division information, and the coding efficiency can be improved.

図44は、画素適応オフセット処理において、最大符号化ブロックであるCoding Tree Unit(CTU)の単位で常に分割する場合を例として、画素適応オフセット処理におけるパラメータを符号化してビットストリームに挿入する位置を図示したものである。なお、図44はあくまでも一例であり、必ずしもこのように符号化を行う必要はない。図44では、スライスヘッダに続く各CTUのデータの先頭にまずオフセット適用手法を示すインデックス(図40)を符号化して挿入し、続いてEO手法またはBO手法を用いる場合は各クラスに対するオフセット、ヒストグラム補正処理を行う場合は、画素値ヒストグラムの各ピークに対応する補正幅を符号化して挿入している。なお、画素適応オフセット処理を行わない場合は、インデックス以降には何も符号化しない。   FIG. 44 shows an example of a case where division is always performed in units of Coding Tree Unit (CTU) which is the maximum coding block in the pixel adaptive offset process, and the position where the parameter in the pixel adaptive offset process is encoded and inserted into the bitstream It is illustrated. Note that FIG. 44 is merely an example, and it is not always necessary to perform such encoding. In FIG. 44, an index (FIG. 40) indicating an offset application method is first encoded and inserted at the head of each CTU data following the slice header, and then, when using the EO method or the BO method, an offset and a histogram for each class. When performing the correction process, the correction width corresponding to each peak of the pixel value histogram is encoded and inserted. When the pixel adaptive offset process is not performed, nothing is encoded after the index.

また、図45は、可変長符号化部15においてどのように画素適応オフセット処理パラメータを符号化してビットストリームに加えるかを示したフローチャートである。可変長符号化部15は、まず、図40に示す各オフセット適用手法に対応するインデックスを符号化する(図45のステップST400)。そして、オフセットを適用しない場合(図45のステップST401)はそのまま終了し、EO手法またはBO手法を用いる場合は各クラスに対するオフセットを全て符号化する(図45のステップST402,ST403)。一方、ヒストグラム補正処理を行う場合は、画素値ヒストグラムの各ピークに対応する補正幅を全て符号化する(図45のステップST404)。なお、図45では、EO手法またはBO手法におけるクラスの数およびヒストグラム補正において補正対象とする画素値ヒストグラムのピークの数をいずれも4としている。   FIG. 45 is a flowchart showing how the variable-length encoding unit 15 encodes the pixel adaptive offset processing parameter and adds it to the bitstream. First, the variable length encoding unit 15 encodes an index corresponding to each offset application method shown in FIG. 40 (step ST400 in FIG. 45). Then, when no offset is applied (step ST401 in FIG. 45), the processing ends as it is, and when the EO method or the BO method is used, all the offsets for each class are encoded (steps ST402 and ST403 in FIG. 45). On the other hand, when the histogram correction process is performed, all correction widths corresponding to the respective peaks of the pixel value histogram are encoded (step ST404 in FIG. 45). In FIG. 45, the number of classes in the EO method or the BO method and the number of peaks of the pixel value histogram to be corrected in the histogram correction are both 4.

また、適応フィルタ処理では、局所復号画像を所定の手法でクラス分類し、各クラスに属する領域(局所復号画像)毎に、重畳されている歪みを補償するフィルタを設計し、そのフィルタを用いて、当該局所復号画像のフィルタ処理を実施する。そして、クラス毎に設計したフィルタをヘッダ情報として可変長符号化部15に出力する。   Also, in adaptive filter processing, local decoded images are classified by a predetermined method, and a filter that compensates for superimposed distortion is designed for each region (local decoded image) belonging to each class. Then, the local decoded image is filtered. Then, the filter designed for each class is output to the variable length encoding unit 15 as header information.

ここで、クラス分類手法としては、画像を空間的に等間隔に区切る簡易な手法や、ブロック単位に画像の局所的な特性(分散など)に応じて分類する手法がある。また、適応フィルタ処理で使用するクラス数は、予め画像符号化装置及び画像復号装置で共通の値に設定してもよいし、符号化すべきパラメータの一つとしてもよい。前者と比較して後者の方が、使用するクラス数を自由に設定することができるため、画像品質改善効果が上がるが、一方でクラス数を符号化するために、その分の符号量が増加する。   Here, as a class classification method, there are a simple method for spatially dividing an image at equal intervals, and a method for classifying the image in units of blocks according to local characteristics (dispersion, etc.). Further, the number of classes used in the adaptive filter process may be set in advance to a common value in the image encoding device and the image decoding device, or may be one of the parameters to be encoded. Compared to the former, the latter can set the number of classes to be used freely, so the image quality improvement effect will be improved, but on the other hand, the amount of code will be increased to encode the number of classes. To do.

次に、この実施の形態2による画像復号装置において、上記実施の形態1による画像復号装置と構成が異なるループフィルタ部39についての動作を説明する。なお、その他の動作は、上記実施の形態1と同様である。
図20に示す画像復号装置の動作を表すフローチャートにおいて、図39のループフィルタ部39は、全ての符号化ブロックBに対するステップST23〜ST30の処理が完了した後(図20のステップST31)、加算部37から出力された復号画像に対して、所定のフィルタ処理を実施して、フィルタ処理後の復号画像を動き補償予測フレームメモリ40に格納する(図20のステップST32)。
Next, in the image decoding apparatus according to the second embodiment, the operation of the loop filter unit 39 having a configuration different from that of the image decoding apparatus according to the first embodiment will be described. Other operations are the same as those in the first embodiment.
In the flowchart representing the operation of the image decoding apparatus shown in FIG. 20, the loop filter unit 39 in FIG. 39 adds the processing after completing the processing of steps ST23 to ST30 for all the coding blocks Bn (step ST31 in FIG. 20). A predetermined filter process is performed on the decoded image output from the unit 37, and the decoded image after the filter process is stored in the motion compensated prediction frame memory 40 (step ST32 in FIG. 20).

具体的には、変換ブロックの境界や予測ブロックの境界に発生する歪みを低減するフィルタ(デブロッキングフィルタ)処理、画素単位に適応的にオフセットを加算する(画素適応オフセット)処理、ウィーナフィルタ等の線形フィルタを適応的に切り替えてフィルタ処理する適応フィルタ処理などを行う。
これらのループフィルタは、復号画像の画質を向上させることを目的として適用されるが、図42に示したようなスクリーンコンテンツの特殊なヒストグラム形状を考慮しておらず、十分な画質改善効果が得られない。
そこで、上記実施の形態1では、新たなループフィルタを追加する形でヒストグラム補正処理を実施しているが、この実施の形態2では、既存のループフィルタの一部としてヒストグラム補正処理を実施する。
Specifically, filter (deblocking filter) processing that reduces distortion occurring at the boundaries of transform blocks and prediction blocks, processing for adaptively adding an offset (pixel adaptive offset) for each pixel, Wiener filter, etc. Performs adaptive filter processing for adaptively switching linear filters and performing filter processing.
These loop filters are applied for the purpose of improving the image quality of the decoded image, but do not consider the special histogram shape of the screen content as shown in FIG. 42, so that a sufficient image quality improvement effect is obtained. I can't.
Therefore, in the first embodiment, the histogram correction process is performed by adding a new loop filter. In the second embodiment, the histogram correction process is performed as a part of the existing loop filter.

ただし、図39のループフィルタ部39は、上記のデブロッキングフィルタ処理、画素適応オフセット処理、適応フィルタ処理のそれぞれについて、可変長復号部31により可変長復号された各ヘッダ情報を参照して、当該スライスで処理を行うか否かを特定する。このとき、2つ以上のフィルタ処理を行う場合に、例えば、画像符号化装置のループフィルタ部13が図38のように構成されている場合には、図39に示すようにループフィルタ部39が成される。
ここで、デブロッキングフィルタ処理では、可変長復号部31により可変長復号されたヘッダ情報を参照し、ブロック境界にかけるフィルタ強度の選択に用いる各種パラメータを初期値から変更する情報が存在する場合には、その変更情報に基づいて、デブロッキングフィルタ処理を実施する。変更情報がない場合は、予め定められた手法に従って行う。
However, the loop filter unit 39 in FIG. 39 refers to each header information variable length decoded by the variable length decoding unit 31 for each of the above deblocking filter processing, pixel adaptive offset processing, and adaptive filter processing, and Specify whether to perform processing in slices. At this time, when two or more filter processes are performed, for example, when the loop filter unit 13 of the image encoding device is configured as shown in FIG. 38, the loop filter unit 39 is configured as shown in FIG. Made.
Here, in the deblocking filter processing, when there is information for referring to the header information that has been variable-length decoded by the variable-length decoding unit 31 and changing various parameters used for selecting the filter strength applied to the block boundary from the initial value. Performs a deblocking filter process based on the change information. When there is no change information, it is performed according to a predetermined method.

画素適応オフセット処理では、可変長復号部31により可変長復号された画素適応オフセット処理のブロック分割情報に基づいて復号画像を分割し、そのブロック単位に、可変長復号部31により可変長復号されたブロック単位のクラス分類手法を示すインデックスを参照して、そのインデックスが“オフセット処理を行わない”ことを示すインデックスではなく、かつ“ヒストグラム補正処理を行う”ことを示すインデックスではない場合、そのインデックスに応じてブロック単位にブロック内の各画素を上記インデックスが示すクラス分類手法に従ってクラス分類する。
クラス分類手法の候補として、図38のループフィルタ部13の画素適応オフセット処理のクラス分類手法の候補と同一のものが予め用意されている。そして、ブロック単位の各クラスのオフセット値を特定するオフセット情報を参照して、復号画像の画素値にオフセットを加算する処理を行う。
In the pixel adaptive offset processing, the decoded image is divided based on the block division information of the pixel adaptive offset processing variable-length decoded by the variable-length decoding unit 31, and the variable-length decoding unit 31 performs variable-length decoding on the block basis. Referring to an index indicating a block classification method, if the index is not an index indicating that “offset processing is not performed” and is not an index indicating that “histogram correction processing is performed”, the index Accordingly, each pixel in the block is classified according to the class classification method indicated by the index.
As the class classification method candidates, the same class classification method candidates for the pixel adaptive offset processing of the loop filter unit 13 of FIG. 38 are prepared in advance. Then, a process of adding the offset to the pixel value of the decoded image is performed with reference to the offset information specifying the offset value of each class in block units.

一方、可変長復号部31により可変長復号されたブロック単位のクラス分類手法を示すインデックスが“オフセット処理を行わない”ことを示すインデックスではなく、かつ“ヒストグラム補正処理を行う”ことを示すインデックスである場合、当該ブロックに対してヒストグラム補正処理を実行する。   On the other hand, the index indicating the block class classification method variable-length decoded by the variable-length decoding unit 31 is not an index indicating that “offset processing is not performed” and is an index indicating that “histogram correction processing is performed”. If there is, the histogram correction processing is executed for the block.

図46は、可変長復号部31による画素値適応オフセット処理パラメータの復号手順を示すフローチャートである。   FIG. 46 is a flowchart showing the decoding procedure of the pixel value adaptive offset processing parameter by the variable length decoding unit 31.

この実施の形態2による画像復号装置におけるヒストグラム補正処理の処理内容は、上記実施の形態1による画像復号装置におけるヒストグラム補正処理と同様である。   The processing content of the histogram correction process in the image decoding apparatus according to the second embodiment is the same as the histogram correction process in the image decoding apparatus according to the first embodiment.

即ち、ヒストグラム算出部41が、加算部37により算出された復号画像を複数のブロックに分割し、その復号画像のブロック毎に画素値のヒストグラムを算出する(図37のステップST200〜ST201)。また、ヒストグラムの値が最大となる画素値を選択し、その画素値をピーク画素値pとする(図37のステップST202)。
なお、ヒストグラムのステップ幅は、必ずしも1とする必要はないが、ループフィルタ部39の出力画像を図38のループフィルタ部13の出力画像と一致させる必要があるため、ここではループフィルタ部13と同じステップ幅を用いる。また、ヒストグラムのステップ幅を1以上とした場合は、pはステップ幅の中央値などに設定することが考えられるが、これも上記と同様の理由によりループフィルタ部13と一致させる必要がある。
That is, the histogram calculation unit 41 divides the decoded image calculated by the addition unit 37 into a plurality of blocks, and calculates a histogram of pixel values for each block of the decoded image (steps ST200 to ST201 in FIG. 37). Also, the pixel value with the maximum histogram value is selected, and the pixel value is set as the peak pixel value p (step ST202 in FIG. 37).
Note that the step width of the histogram does not necessarily have to be 1, but the output image of the loop filter unit 39 needs to match the output image of the loop filter unit 13 in FIG. Use the same step width. When the step width of the histogram is set to 1 or more, it is conceivable that p is set to the median value of the step width or the like, but this also needs to be matched with the loop filter unit 13 for the same reason as described above.

画素値補正部42は、可変長復号部31により可変長復号されたi番目のピークに対する補正幅w内の画素値((ピーク画素値p−補正幅w)〜(ピーク画素値p+補正幅w)の画素値)をピーク画素値pに置換する(図37のステップST203〜ST206)。

Figure 2015177342
ここで、(x,y)はブロック単位の復号画像における画素の座標を表し、D(x,y)は置換前の画素値、D’(x,y)は置換後の画素値を表している。 The pixel value correction unit 42 includes pixel values ((peak pixel value p−correction width w i ) to (peak pixel value p + correction) within the correction width w i for the i-th peak variable-length decoded by the variable length decoding unit 31. The pixel value of the width w i ) is replaced with the peak pixel value p (steps ST203 to ST206 in FIG. 37).
Figure 2015177342
Here, (x, y) represents the pixel coordinates in the decoded image in block units, D (x, y) represents the pixel value before replacement, and D ′ (x, y) represents the pixel value after replacement. Yes.

ブロック内の全部または一部の画素に対して上記の補正を実施する。なお、上式において、p−wが画素値の下限を下回った場合はこれを画素値の下限に置き換え、p+wが画素値の上限を上回った場合はこれを画素値の上限に置き換えてもよい。
ここでは、補正幅wをピーク画素値pよりも大きい側と小さい側で同一としているが、必ずしも両者を一致させる必要はなく、それぞれに対して異なる補正幅wを使用してもよい。ただし、ループフィルタ部39の出力画像を図38のループフィルタ部13の出力画像と一致させる必要があるため、ループフィルタ部13と同様の方式を用いなければならない。
The above correction is performed on all or some of the pixels in the block. Incidentally, in the above equation, replace it if p-w i is below the lower limit of the pixel value to the lower limit of the pixel value, p + w i is replaced this if it exceeds the upper limit of the pixel value to the upper limit of the pixel value Also good.
Here, the correction width w i is the same on the side larger than the peak pixel value p and the smaller side, but it is not always necessary to match both, and a different correction width w i may be used for each. However, since it is necessary to match the output image of the loop filter unit 39 with the output image of the loop filter unit 13 of FIG. 38, the same method as the loop filter unit 13 must be used.

次に、画素値補正部42は、ピーク画素値を示すインデックスiに1を加え、ST202でヒストグラム算出部41により算出されたヒストグラムから、画素値がpとなる画素に相当する部分を削除する(図37のステップST207〜ST208)。
画素値補正部42は、インデックスiと予め設定された最大ピーク数Pmaxを比較し(図37のステップST2091)、インデックスiが最大ピーク数Pmaxより小さければ(i<Pmax)、ピーク画素値の再選択をヒストグラム算出部41に指示して、ステップST202の処理に戻る。
一方、インデックスiが最大ピーク数Pmaxに到達していれば(i≧Pmax)、ヒストグラム補正処理を終了する。
Next, the pixel value correcting unit 42 adds 1 to the index i indicating the peak pixel value, and deletes a portion corresponding to a pixel having a pixel value of p from the histogram calculated by the histogram calculating unit 41 in ST202 ( Steps ST207 to ST208 in FIG. 37).
The pixel value correcting unit 42 compares the index i with a preset maximum peak number P max (step ST2091 in FIG. 37), and if the index i is smaller than the maximum peak number P max (i <P max ), the peak pixel. The histogram calculation unit 41 is instructed to reselect the value, and the process returns to step ST202.
On the other hand, if the index i has reached the maximum number of peaks P max (i ≧ P max ), the histogram correction process is terminated.

ただし、図38のループフィルタ部13の画素適応オフセット処理において、ブロック分割情報は符号化せずに、常に画像を固定サイズのブロック単位(例えば、最大符号化ブロック単位)に分割し、そのブロック毎にクラス分類手法を選択して、クラス毎の適応オフセット処理を行うように構成されている場合、ループフィルタ部39においても、ループフィルタ部13と同一の固定サイズのブロック単位に画素適応オフセット処理を実施する。
適応フィルタ処理では、可変長復号部31により可変長復号されたクラス毎のフィルタを用いて、図1の画像符号化装置と同一の手法でクラス分類した後に、そのクラス分類情報に基づいてフィルタ処理を行う。
このループフィルタ部39によるフィルタ処理後の復号画像が、動き補償予測用の参照画像となり、また、再生画像となる。
However, in the pixel adaptive offset processing of the loop filter unit 13 in FIG. 38, the block division information is not encoded, and the image is always divided into fixed-size block units (for example, the maximum encoded block unit), When the class classification method is selected and adaptive offset processing is performed for each class, the loop filter unit 39 also performs pixel adaptive offset processing in units of blocks having the same fixed size as the loop filter unit 13. carry out.
In the adaptive filter process, after classifying by the same method as the image encoding apparatus of FIG. 1 using the filter for each class variable-length decoded by the variable-length decoding unit 31, the filter process is performed based on the class classification information. I do.
The decoded image after the filter processing by the loop filter unit 39 becomes a reference image for motion compensation prediction and also becomes a reproduced image.

この実施の形態2では、上記実施の形態1と同様に、画像符号化装置のループフィルタ部13が、局所復号画像のブロック毎にヒストグラムの各ピーク画素値に対する最適な補正幅wを求め、ヒストグラムを補正することで局所復号画像からノイズを取り除くよう構成したので、図42に示すようにヒストグラムの各ピークが鋭く、疎であるようなスクリーンコンテンツに対して局所復号画像の大幅な画質改善を実現することができる効果を奏する。ただし、本効果はスクリーンコンテンツに限定されるものではなく、同様のヒストグラム特徴を持つ映像信号であれば当然ながら同様の効果が得られる。 In the second embodiment, as in the first embodiment, the loop filter unit 13 of the image encoding device obtains the optimum correction width w i for each peak pixel value of the histogram for each block of the locally decoded image, Since the configuration is such that noise is removed from the locally decoded image by correcting the histogram, as shown in FIG. 42, the image quality of the locally decoded image is greatly improved for screen contents in which each peak of the histogram is sharp and sparse. There is an effect that can be realized. However, this effect is not limited to the screen content, and naturally the same effect can be obtained as long as the video signal has the same histogram feature.

さらに、この実施の形態2では、上記のヒストグラム補正を既存のループフィルタ(例えば、画素適応オフセット)の一部として実行するようにし、画像符号化装置で一つの手法を選択して適用する(例えば、図40に示す手法の中から、いずれか一つだけを選択して適用する)ように構成したので、ループフィルタに関して符号化するヘッダ情報を上記実施の形態1よりも少なくすることができ、符号量を削減することができる効果を奏する。   Furthermore, in the second embodiment, the above-described histogram correction is executed as a part of an existing loop filter (for example, pixel adaptive offset), and one method is selected and applied by the image coding apparatus (for example, 40, only one of the methods shown in FIG. 40 is selected and applied), and header information to be encoded with respect to the loop filter can be reduced as compared with the first embodiment. There is an effect that the amount of codes can be reduced.

また、この実施の形態2では、上記実施の形態1と同様に、画像符号化装置の可変長符号化部15が、上記のヒストグラム補正に必要な各ピークの補正幅wを符号化して出力し、画像復号装置は、各ピークの補正幅wを可変長復号し、ループフィルタ部39において復号画像のヒストグラム補正を行って復号画像からノイズを取り除くよう構成したので、図42に示すようにヒストグラムの各ピークが鋭く、疎であるようなスクリーンコンテンツに対して復号画像の大幅な画質改善を実現することができる効果を奏する。ただし、本効果はスクリーンコンテンツに限定されるものではなく、同様のヒストグラム特徴を持つ映像信号であれば当然ながら同様の効果が得られる。 In the second embodiment, similarly to the first embodiment, the variable length coding unit 15 of the image coding apparatus codes and outputs the correction width w i of each peak necessary for the histogram correction. Then, the image decoding apparatus is configured to perform variable length decoding on the correction width w i of each peak and to perform a histogram correction of the decoded image in the loop filter unit 39 to remove noise from the decoded image, as shown in FIG. There is an effect that a significant improvement in the image quality of the decoded image can be realized for screen content in which each peak of the histogram is sharp and sparse. However, this effect is not limited to the screen content, and naturally the same effect can be obtained as long as the video signal has the same histogram feature.

また、この実施の形態2によれば、上記効果を持つ画像符号化装置及び画像符号化方法が生成する符号化ビットストリームを正しく復号することができる画像復号装置及び画像復号方法が得られる効果を奏する。   In addition, according to the second embodiment, the image decoding apparatus and the image decoding method capable of correctly decoding the encoded bitstream generated by the image encoding apparatus and the image encoding method having the above effects can be obtained. Play.

実施の形態3.
上記実施の形態1では、画像符号化装置において常にそれぞれのブロックに対して新たにヒストグラム補正処理のパラメータ(画素値ヒストグラムの各ピークに対する補正幅など)を算出して符号化していたのに対し、この実施の形態3では、過去に計算した他ブロックのパラメータを流用できるように構成することで、符号化する情報量を削減できる場合を説明する。
Embodiment 3 FIG.
In Embodiment 1 described above, the image encoding apparatus always calculates and encodes a new histogram correction parameter (such as a correction width for each peak of the pixel value histogram) for each block. In the third embodiment, a case will be described in which the amount of information to be encoded can be reduced by configuring so that parameters of other blocks calculated in the past can be used.

実施の形態3による画像符号化装置は、基本的に図1に示す実施の形態1の画像符号化装置と同様の構成および動作である。ただし、図12に示すループフィルタ部13および可変長符号化部15のヒストグラム補正処理に関する動作のみが異なる。以降ではまず、ループフィルタ部13のヒストグラム補正処理に関する動作について説明する。   The image coding apparatus according to Embodiment 3 has basically the same configuration and operation as the image coding apparatus according to Embodiment 1 shown in FIG. However, only the operations related to the histogram correction processing of the loop filter unit 13 and the variable length coding unit 15 shown in FIG. 12 are different. Hereinafter, first, an operation related to the histogram correction processing of the loop filter unit 13 will be described.

図47A及び図47Bは、実施の形態3におけるループフィルタ部13の動作を示すフローチャートであり、これに基づいてループフィルタ部13の動作を説明する。まず、ループフィルタ部13は、ヒストグラム補正処理を行わない場合の符号化コストCOFFを求め(図47AのステップST600)、続いて実施の形態1と同様の手順(図24)で画素値ヒストグラムの各ピークに対する最適な補正幅を求め、このパラメータを符号化する場合の符号化コストCNEWを求める(図47AのステップST601)。
47A and 47B are flowcharts showing the operation of the loop filter unit 13 in the third embodiment, and the operation of the loop filter unit 13 will be described based on this. First, the loop filter unit 13 obtains the encoding cost C OFF when the histogram correction processing is not performed (step ST600 in FIG. 47A), and then the pixel value histogram is obtained by the same procedure as in the first embodiment (FIG. 24). An optimum correction width for each peak is obtained, and an encoding cost C NEW for encoding this parameter is obtained (step ST601 in FIG. 47A).

ここで、ヒストグラム補正処理により図48のようなブロック分割が行われ、右下のブロックがヒストグラム補正処理中のブロックであるとする。また、このとき、その周囲のブロック1、2、3はすでにヒストグラム補正処理が完了しているものとする。この実施の形態3では、ヒストグラム補正中のブロックにて新たに計算したパラメータを用いてもよいし、すでに処理が完了しているブロック1、2、3のいずれかのパラメータを流用してもよい。なお、図48はあくまでも参照可能なブロックの例を示しているに過ぎず、他にも、処理中ブロックの真上と左だけを参照するなどのさまざまなバリエーションが考えられる。   Here, it is assumed that block division as shown in FIG. 48 is performed by the histogram correction processing, and the lower right block is a block during the histogram correction processing. At this time, it is assumed that the histogram correction processing has already been completed for the surrounding blocks 1, 2, and 3. In the third embodiment, a newly calculated parameter may be used in the block whose histogram is being corrected, or any of the parameters of blocks 1, 2, and 3 that have already been processed may be used. . Note that FIG. 48 merely shows examples of blocks that can be referred to, and various other variations such as referring to just above and to the left of the block being processed can be considered.

パラメータの流用方法を図49に示す。例えば、図48に示すヒストグラム補正処理済みブロック1において、図49上段のようにヒストグラム補正処理が施されたものとする。図49上段において、p、p、p、pは補正処理を施したピークの位置を表しており、ヒストグラムの値はp>p>p>pである。また、各ピークに対する補正幅をw、w、w、wとする。このとき、ヒストグラム補正中ブロックでは、図49下段に示すように画素値のヒストグラムを求め、さらにヒストグラム補正処理済みブロック1を参照して補正幅wをヒストグラムの値が最大となるピークp’に適用して当該ピークの補正を行う。続いて、ヒストグラムの値がp’の次に大きいp’に対してwの補正幅で補正を実施する。以降これを繰り返し、ヒストグラム補正処理済みブロック1のパラメータを流用してp’、p’、p’、p’の補正を行う。 FIG. 49 shows a parameter diversion method. For example, it is assumed that the histogram correction processing is performed as shown in the upper part of FIG. 49 in the histogram correction processed block 1 shown in FIG. In the upper part of FIG. 49, p 0 , p 1 , p 2 , and p 3 represent peak positions that have been subjected to correction processing, and the values of the histogram are p 0 > p 1 > p 2 > p 3 . Further, the correction width for each peak is set to w 0 , w 1 , w 2 , and w 3 . At this time, in the block during histogram correction, a histogram of pixel values is obtained as shown in the lower part of FIG. 49, and the correction width w 0 is determined with reference to the histogram corrected block 1 and the peak p 0 ′ at which the histogram value is maximum is obtained. Apply to the above to correct the peak. Subsequently, correction is performed with a correction width of w 1 for p 1 ′ having the histogram value next to p 0 ′. Thereafter, this is repeated, and correction of p 0 ′, p 1 ′, p 2 ′, and p 3 ′ is performed using the parameters of the block 1 that has been subjected to the histogram correction processing.

また、異なるパラメータの流用方法として、図50に示すように常に同じピーク位置に対して補正を実施することも考えられる。図49では、ヒストグラム補正処理済みブロックの補正幅w、w、w、wだけを参照し、ピーク位置p’、p’、p’、p’については補正中ブロックにおいて新たに計算していた。これに対し、図50に示す流用方法では、補正幅に加えてピーク位置p、p、p、pについても補正処理済みブロックを参照し、補正中ブロックのヒストグラム形状によらず、常にp、p、p、pに対して幅w、w、w、wの補正を施すようにする。 Further, as a method of diverting different parameters, it is conceivable to always perform correction on the same peak position as shown in FIG. In FIG. 49, only the correction widths w 0 , w 1 , w 2 , and w 3 of the histogram-corrected blocks are referenced, and the peak positions p 0 ′, p 1 ′, p 2 ′, and p 3 ′ are being corrected. Was newly calculated. On the other hand, in the diversion method shown in FIG. 50, the corrected block is also referred to for the peak positions p 0 , p 1 , p 2 , and p 3 in addition to the correction width, regardless of the histogram shape of the block being corrected, The correction of the widths w 0 , w 1 , w 2 , and w 3 is always applied to p 0 , p 1 , p 2 , and p 3 .

図49に示すパラメータ流用方法の利点として、保持するパラメータの量を最小限に抑えられることが挙げられる。パラメータを流用するために保持する必要があるのは各ブロックにおける補正幅w、w、w、wのみである。しかし、補正中ブロックにおいてピーク位置を求めるために画素値のヒストグラムを計算しなければならない。これに対し、図50に示すパラメータ流用方法では、補正幅に加えてピーク位置も流用しているため、補正中ブロックにおいてヒストグラムを計算する必要がない。しかし、補正幅のみでなくピーク位置も保持しておく必要があるため、パラメータ保持のためのメモリサイズは図49に示す手法に比べて大きくなる。 An advantage of the parameter diversion method shown in FIG. 49 is that the amount of parameters to be held can be minimized. Only the correction widths w 0 , w 1 , w 2 , and w 3 in each block need to be retained in order to use the parameters. However, a histogram of pixel values must be calculated in order to obtain the peak position in the block being corrected. On the other hand, in the parameter diversion method shown in FIG. 50, since the peak position is also diverted in addition to the correction width, it is not necessary to calculate a histogram in the block being corrected. However, since it is necessary to hold not only the correction width but also the peak position, the memory size for holding the parameter becomes larger than the method shown in FIG.

いま、図48に示すとおり参照可能なブロックを左上、真上、左とすると、これらのブロックにおけるヒストグラム補正処理パラメータを流用するか、新規に計算したパラメータを用いるか、あるいはヒストグラム補正処理を行わないかを図51に示すインデックスで表現することができる。つまり、ヒストグラム補正処理を行わない場合はインデックス0を符号化し、新規に計算したパラメータを用いる場合はインデックス1を符号化した後にそれに続いて計算したヒストグラム補正処理パラメータを符号化する。一方、周囲のブロックのパラメータを流用する場合は、そのブロック位置を表すインデックスだけを符号化すればよく、別途パラメータを符号化する必要がない。そのため、新規にパラメータを符号化する場合に比べて、符号量を削減することが可能である。なお、図51はあくまでもインデックスの一例であり、図51と異なるインデックスを用いることも考えられる。   Now, as shown in FIG. 48, if the blocks that can be referred to are upper left, right above, and left, the histogram correction processing parameters in these blocks are diverted, newly calculated parameters are used, or histogram correction processing is not performed. Can be expressed by the index shown in FIG. That is, when the histogram correction process is not performed, index 0 is encoded. When a newly calculated parameter is used, index 1 is encoded and then the calculated histogram correction process parameter is encoded. On the other hand, when the parameters of the surrounding blocks are used, only the index indicating the block position needs to be encoded, and there is no need to separately encode the parameters. Therefore, it is possible to reduce the amount of codes compared to the case of newly encoding parameters. Note that FIG. 51 is merely an example of an index, and an index different from that in FIG. 51 may be used.

このように周囲のブロックのパラメータを流用する場合は、インデックスだけを符号化すればよいことを考慮して、左上、真上、左のブロックのヒストグラム補正処理パラメータを流用した場合の符号化コストCTL、C、Cをそれぞれ計算する(図47AのステップST602からST604)。 When the parameters of the surrounding blocks are diverted in this way, the encoding cost C when the histogram correction processing parameters of the upper left, right above, and left blocks are diverted in consideration that only the index needs to be encoded. TL, calculating C T, the C L, respectively (ST 604 from step ST602 of FIG. 47A).

そして、各符号化コストを比較し、COFFが最も小さい場合は図51に基づいてインデックス0を可変長符号化部15に出力して終了する(図47BのステップST605,ST606)。一方、CNEWが最も小さい場合は新規にパラメータを符号化することを意味するインデックス1を可変長符号化部15に出力し(図47BのステップST607、ST608)、それに続いてヒストグラム補正処理パラメータを可変長符号化部15に出力して終了する(図47BのステップST609)。 Then, the respective coding costs are compared, and when C OFF is the smallest, index 0 is output to the variable length coding unit 15 based on FIG. 51 and the process ends (steps ST605 and ST606 in FIG. 47B). On the other hand, when C NEW is the smallest, index 1 which means that a parameter is newly encoded is output to the variable length encoding unit 15 (steps ST607 and ST608 in FIG. 47B), and subsequently the histogram correction processing parameters are set. It outputs to the variable-length encoding part 15 and complete | finishes (step ST609 of FIG. 47B).

また、CTL、C、Cのいずれかが最小コストとなる場合は、対応するブロックの位置を表すインデックスだけを可変長符号化部15に出力して終了する(図47BのステップST610〜ST614)。 If any one of C TL , C T , and C L is the minimum cost, only the index indicating the position of the corresponding block is output to the variable length coding unit 15 and the process ends (step ST610 in FIG. 47B). ST614).

図52は、可変長符号化部15の動作を表すフローチャートである。図52を用いてこの実施の形態3に関わるヒストグラム補正処理における可変長符号化部15の動作を説明する。可変長符号化部15は、ループフィルタ部13からヒストグラム補正処理について図51に示すパラメータ符号化方法を表すインデックスを受け取り、まずこれを符号化する(図52のステップST700)。   FIG. 52 is a flowchart showing the operation of the variable length coding unit 15. The operation of the variable length coding unit 15 in the histogram correction processing according to the third embodiment will be described with reference to FIG. The variable length encoding unit 15 receives an index representing the parameter encoding method shown in FIG. 51 for the histogram correction processing from the loop filter unit 13, and first encodes this (step ST700 in FIG. 52).

続いて、新規にパラメータを符号化する(図51においてインデックスが1)場合(ステップST701)、インデックスの後にループフィルタ部13から受け取ったヒストグラム補正処理のためのパラメータ(各ピークに対する補正幅)を符号化して終了する(図52のステップST702)。一方、新規にパラメータを符号化しない(図51においてインデックスが1以外)場合、インデックスのみを符号化して終了する。   Subsequently, when the parameter is newly encoded (index is 1 in FIG. 51) (step ST701), the parameter for the histogram correction processing (correction width for each peak) received from the loop filter unit 13 after the index is encoded. And finishes (step ST702 in FIG. 52). On the other hand, when a parameter is not newly encoded (in FIG. 51, the index is other than 1), only the index is encoded and the process is terminated.

この実施の形態3による画像復号装置は、基本的に図17に示す実施の形態1の画像復号装置と同様の構成および動作である。ただし、図18に示すループフィルタ部39および可変長復号部31のヒストグラム補正処理に関する動作のみが異なる。以降ではまず、可変長復号部31のヒストグラム補正処理に関する動作について説明する。   The image decoding apparatus according to the third embodiment has basically the same configuration and operation as the image decoding apparatus according to the first embodiment shown in FIG. However, only the operations relating to the histogram correction processing of the loop filter unit 39 and the variable length decoding unit 31 shown in FIG. 18 are different. Hereinafter, first, an operation related to the histogram correction processing of the variable length decoding unit 31 will be described.

図53は、ヒストグラム補正処理に関する可変長復号部31の動作を示すフローチャートである。可変長復号部31は、まず、ビットストリームから当該ブロックのヒストグラム補正処理について、パラメータの符号化方法を示すインデックスを復号する(図52のステップST800)。復号したインデックスが、新規にパラメータを符号化していることを意味する値である場合(図51のインデックス1)、さらにヒストグラム補正処理パラメータを復号する(図52のステップST801,ST802)。   FIG. 53 is a flowchart showing the operation of the variable length decoding unit 31 relating to the histogram correction process. First, the variable length decoding unit 31 decodes an index indicating a parameter encoding method for the histogram correction processing of the block from the bit stream (step ST800 in FIG. 52). When the decoded index is a value meaning that a parameter is newly encoded (index 1 in FIG. 51), the histogram correction processing parameter is further decoded (steps ST801 and ST802 in FIG. 52).

この実施の形態3による画像復号装置におけるヒストグラム補正処理の処理内容は、上記実施の形態1による画像復号装置におけるヒストグラム補正処理と基本的に同様であるが、他ブロックのパラメータを流用する場合の動作が異なる。   The processing content of the histogram correction processing in the image decoding device according to the third embodiment is basically the same as the histogram correction processing in the image decoding device according to the first embodiment, but the operation when the parameters of other blocks are diverted. Is different.

即ち、可変長復号部31を参照して得られる図51のインデックスが0または1である場合、その動作は実施の形態1による画像復号装置におけるヒストグラム補正処理と同様である。一方、インデックスが2、3、4のいずれかである場合は、図48に示すヒストグラム補正処理済みのブロックのうちインデックスに対応するブロックを参照し、ヒストグラム補正処理に係るパラメータを流用する。   That is, when the index of FIG. 51 obtained by referring to the variable length decoding unit 31 is 0 or 1, the operation is the same as the histogram correction processing in the image decoding apparatus according to the first embodiment. On the other hand, when the index is any of 2, 3, and 4, the block corresponding to the index among the blocks that have been subjected to the histogram correction processing shown in FIG. 48 is referred to, and parameters relating to the histogram correction processing are used.

パラメータの流用方法を図49に示す。例えば、図48に示すヒストグラム補正処理済みブロック1において、図49上段のようにヒストグラム補正処理が施されたものとする。図49上段において、p、p、p、pは補正処理を施したピークの位置を表しており、ヒストグラムの値はp>p>p>pである。また、各ピークに対する補正幅をw、w、w、wとする。このとき、ヒストグラム補正中ブロックでは、図49下段に示すように画素値のヒストグラムを求め、さらにヒストグラム補正処理済みブロック1を参照して補正幅wをヒストグラムの値が最大となるピークp’に適用して当該ピークの補正を行う。続いて、ヒストグラムの値がp’の次に大きいp’に対してwの補正幅で補正を実施する。以降これを繰り返し、ヒストグラム補正処理済みブロック1のパラメータを流用してp’、p’、p’、p’の補正を行う。 FIG. 49 shows a parameter diversion method. For example, it is assumed that the histogram correction processing is performed as shown in the upper part of FIG. 49 in the histogram correction processed block 1 shown in FIG. In the upper part of FIG. 49, p 0 , p 1 , p 2 , and p 3 represent peak positions that have been subjected to correction processing, and the values of the histogram are p 0 > p 1 > p 2 > p 3 . Further, the correction width for each peak is set to w 0 , w 1 , w 2 , and w 3 . At this time, in the block during histogram correction, a histogram of pixel values is obtained as shown in the lower part of FIG. 49, and the correction width w 0 is determined with reference to the histogram corrected block 1 and the peak p 0 ′ at which the histogram value is maximum is obtained. Apply to the above to correct the peak. Subsequently, correction is performed with a correction width of w 1 for p 1 ′ having the histogram value next to p 0 ′. Thereafter, this is repeated, and correction of p 0 ′, p 1 ′, p 2 ′, and p 3 ′ is performed using the parameters of the block 1 that has been subjected to the histogram correction processing.

また、異なるパラメータの流用方法として、図50に示すように常に同じピーク位置に対して補正を実施することも考えられる。図49では、ヒストグラム補正処理済みブロックの補正幅w、w、w、wだけを参照し、ピーク位置p’、p’、p’、p’については補正中ブロックにおいて新たに計算していた。これに対し、図50に示す流用方法では、補正幅に加えてピーク位置p、p、p、pについても補正処理済みブロックを参照し、補正中ブロックのヒストグラム形状によらず、常にp、p、p、pに対して幅w、w、w、wの補正を施すようにする。 Further, as a method of diverting different parameters, it is conceivable to always perform correction on the same peak position as shown in FIG. In FIG. 49, only the correction widths w 0 , w 1 , w 2 , and w 3 of the histogram-corrected blocks are referenced, and the peak positions p 0 ′, p 1 ′, p 2 ′, and p 3 ′ are being corrected. Was newly calculated. On the other hand, in the diversion method shown in FIG. 50, the corrected block is also referred to for the peak positions p 0 , p 1 , p 2 , and p 3 in addition to the correction width, regardless of the histogram shape of the block being corrected, The correction of the widths w 0 , w 1 , w 2 , and w 3 is always applied to p 0 , p 1 , p 2 , and p 3 .

図49に示すパラメータ流用方法の利点として、保持するパラメータの量を最小限に抑えられることが挙げられる。パラメータを流用するために保持する必要があるのは各ブロックにおける補正幅w、w、w、wのみである。しかし、補正中ブロックにおいてピーク位置を求めるために画素値のヒストグラムを計算しなければならない。これに対し、図50に示すパラメータ流用方法では、補正幅に加えてピーク位置も流用しているため、補正中ブロックにおいてヒストグラムを計算する必要がない。しかし、補正幅のみでなくピーク位置も保持しておく必要があるため、パラメータ保持のためのメモリサイズは図49に示す手法に比べて大きくなる。 An advantage of the parameter diversion method shown in FIG. 49 is that the amount of parameters to be held can be minimized. Only the correction widths w 0 , w 1 , w 2 , and w 3 in each block need to be retained in order to use the parameters. However, a histogram of pixel values must be calculated in order to obtain the peak position in the block being corrected. On the other hand, in the parameter diversion method shown in FIG. 50, since the peak position is also diverted in addition to the correction width, it is not necessary to calculate a histogram in the block being corrected. However, since it is necessary to hold not only the correction width but also the peak position, the memory size for holding the parameter becomes larger than the method shown in FIG.

なお、ループフィルタ部39の出力画像を図38のループフィルタ部13の出力画像と一致させる必要があるため、パラメータの流用方式はループフィルタ部13と同様のものを用いなければならない。   Since the output image of the loop filter unit 39 must match the output image of the loop filter unit 13 in FIG. 38, the parameter diversion method must be the same as that of the loop filter unit 13.

このループフィルタ部39によるフィルタ処理後の復号画像が、動き補償予測用の参照画像となり、また、再生画像となる。   The decoded image after the filter processing by the loop filter unit 39 becomes a reference image for motion compensation prediction and also becomes a reproduced image.

この実施の形態3では、上記実施の形態1と同様に、画像符号化装置のループフィルタ部13が、局所復号画像のブロック毎にヒストグラムの各ピーク画素値に対する最適な補正幅wを求め、ヒストグラムを補正することで局所復号画像からノイズを取り除くよう構成したので、図42に示すようにヒストグラムの各ピークが鋭く、疎であるようなスクリーンコンテンツに対して局所復号画像の大幅な画質改善を実現することができる効果を奏する。ただし、本効果はスクリーンコンテンツに限定されるものではなく、同様のヒストグラム特徴を持つ映像信号であれば当然ながら同様の効果が得られる。 In the third embodiment, as in the first embodiment, the loop filter unit 13 of the image encoding device obtains the optimum correction width w i for each peak pixel value of the histogram for each block of the locally decoded image, Since the configuration is such that noise is removed from the locally decoded image by correcting the histogram, as shown in FIG. 42, the image quality of the locally decoded image is greatly improved for screen contents in which each peak of the histogram is sharp and sparse. There is an effect that can be realized. However, this effect is not limited to the screen content, and naturally the same effect can be obtained as long as the video signal has the same histogram feature.

さらに、この実施の形態3では、上記のヒストグラム補正に係るパラメータを既にヒストグラム補正処理済みのブロックから参照できるように構成したので、常に上記のパラメータを符号化する場合に比べて符号化するヘッダ情報を上記実施の形態1よりも少なくすることができ、符号量を削減することができる効果を奏する。   Furthermore, in the third embodiment, since the parameters relating to the above histogram correction can be referred to from the blocks that have already been subjected to the histogram correction processing, the header information that is always encoded as compared with the case where the above parameters are encoded. Can be reduced as compared with the first embodiment, and the amount of code can be reduced.

また、この実施の形態3では、上記実施の形態1と同様に、画像符号化装置の可変長符号化部15が、上記のヒストグラム補正に必要な各ピークの補正幅wまたは参照するブロックのインデックスを符号化して出力し、画像復号装置は、各ピークの補正幅wあるいは参照するブロックのインデックスを可変長復号し、ループフィルタ部39において復号画像のヒストグラム補正を行って復号画像からノイズを取り除くよう構成したので、図42に示すようにヒストグラムの各ピークが鋭く、疎であるようなスクリーンコンテンツに対して復号画像の大幅な画質改善を実現することができる効果を奏する。ただし、本効果はスクリーンコンテンツに限定されるものではなく、同様のヒストグラム特徴を持つ映像信号であれば当然ながら同様の効果が得られる。 In the third embodiment, similarly to the first embodiment, the variable length coding unit 15 of the image coding apparatus performs the correction width w i of each peak necessary for the histogram correction or the block to be referred to. The image decoding apparatus encodes and outputs the index, and the image decoding apparatus performs variable length decoding on the correction width w i of each peak or the index of the block to be referred to, and performs a histogram correction of the decoded image in the loop filter unit 39 to generate noise from the decoded image. Since it is configured to be removed, as shown in FIG. 42, there is an effect that a significant improvement in the image quality of the decoded image can be realized for screen content in which each peak of the histogram is sharp and sparse. However, this effect is not limited to the screen content, and naturally the same effect can be obtained as long as the video signal has the same histogram feature.

また、この実施の形態3によれば、上記効果を持つ画像符号化装置及び画像符号化方法が生成する符号化ビットストリームを正しく復号することができる画像復号装置及び画像復号方法が得られる効果を奏する。   In addition, according to the third embodiment, the image decoding apparatus and the image decoding method that can correctly decode the encoded bitstream generated by the image encoding apparatus and the image encoding method having the above-described effects can be obtained. Play.

また、この実施の形態3は、上記実施の形態2とも容易に組み合わせることができる。例えば、図40に示すインデックス表を図54に示すように2種類のインデックスを用いたものに置き換えることが考えられる。   Further, the third embodiment can be easily combined with the second embodiment. For example, the index table shown in FIG. 40 can be replaced with one using two types of indexes as shown in FIG.

図55は、この実施の形態3を上記実施の形態2と組み合わせた場合の可変長符号化部15のオフセット処理に係る動作を図示したものである。まず、可変長符号化部15は、図54に示すインデックス1を符号化する(図55のステップST900)。即ち、当該ブロックにおいてオフセット処理(ヒストグラム補正処理を含む)を実施しない場合は0、新たに符号化したパラメータを用いてオフセット処理を実施する場合は1、処理済みブロックのパラメータを流用してオフセット処理を実施する場合は2を符号化する。   FIG. 55 illustrates an operation related to the offset processing of the variable length coding unit 15 when the third embodiment is combined with the second embodiment. First, the variable length encoding unit 15 encodes index 1 shown in FIG. 54 (step ST900 in FIG. 55). That is, 0 is performed when no offset processing (including histogram correction processing) is performed in the block, 1 is performed when offset processing is performed using a newly encoded parameter, and offset processing is performed using the parameters of the processed block. When 2 is implemented, 2 is encoded.

続いて、当該ブロックにおいてオフセット処理を実施しない場合は終了し(図55のステップST901)、実施する場合はインデックス2を符号化する(図55のステップST902)。即ち、新規にパラメータを符号化する場合(インデックス1が1)はオフセット適用手法を表す値を符号化し、処理済みブロックのパラメータを流用する場合はブロック位置を表す値を符号化する。   Subsequently, when the offset process is not performed in the block, the process ends (step ST901 in FIG. 55), and when it is performed, index 2 is encoded (step ST902 in FIG. 55). That is, when a parameter is newly encoded (index 1 is 1), a value indicating an offset application method is encoded, and when a parameter of a processed block is used, a value indicating a block position is encoded.

続いて、処理済みブロックのパラメータを流用する場合は終了し、新規にパラメータを符号化する場合はそのパラメータを符号化する(図55のステップST903,ST904)。   Subsequently, when the parameters of the processed block are diverted, the processing ends. When the parameters are newly encoded, the parameters are encoded (steps ST903 and ST904 in FIG. 55).

また、図56は、実施の形態3を実施の形態2と組み合わせた場合の可変長復号部31のオフセット処理に係る動作を図示したものである。まず、可変長復号部31は、図54に示すインデックス1を復号する(図56のステップST1000)。   FIG. 56 illustrates an operation related to the offset process of the variable length decoding unit 31 when the third embodiment is combined with the second embodiment. First, the variable length decoding unit 31 decodes index 1 shown in FIG. 54 (step ST1000 in FIG. 56).

続いて、復号したインデックス1を参照し、当該ブロックにおいてオフセット処理を実施しない場合は終了し(図56のステップST1001)、実施する場合はインデックス2を復号する(図56のステップST1002)。   Subsequently, the decoded index 1 is referred to, and if the offset process is not performed in the block, the process ends (step ST1001 in FIG. 56), and if performed, the index 2 is decoded (step ST1002 in FIG. 56).

続いて、復号したインデックス2を参照し、処理済みブロックのパラメータを流用する場合は終了し、新規にパラメータが符号化されている場合はそのパラメータを復号する(図56のステップST1003,ST1004)。   Subsequently, the decoded index 2 is referred to, and when the parameter of the processed block is diverted, the process ends. When the parameter is newly encoded, the parameter is decoded (steps ST1003 and ST1004 in FIG. 56).

実施の形態4.
上記実施の形態1では、画像符号化装置において画素値ヒストグラムの各ピークに対して最適な補正幅を求め、それらを可変長符号化してビットストリームに加えていたが、この実施の形態4では、補正幅ではなくノイズ除去を実施するピークの個数を符号化するよう構成することで、符号化する情報量を削減できる場合を説明する。
Embodiment 4 FIG.
In Embodiment 1 described above, an optimum correction width is obtained for each peak of the pixel value histogram in the image encoding device, and these are variable-length encoded and added to the bitstream. In Embodiment 4, however, A case will be described in which the amount of information to be encoded can be reduced by encoding the number of peaks for which noise removal is performed instead of the correction width.

この実施の形態4による画像符号化装置は、基本的に図1に示す実施の形態1の画像符号化装置と同様の構成および動作である。ただし、ヒストグラム補正処理に必要なパラメータとして、ヒストグラムの各ピークの補正幅ではなく、ノイズ除去を実施するピークの個数を符号化している。   The image coding apparatus according to the fourth embodiment has basically the same configuration and operation as the image coding apparatus according to the first embodiment shown in FIG. However, as a parameter necessary for the histogram correction processing, not the correction width of each peak of the histogram but the number of peaks for which noise removal is performed is encoded.

図1におけるループフィルタ部13は、図57に示すように画素値ヒストグラムの各ピークに対する補正幅を全てwとし、補正を実施するピークの個数Nを決定する。図57はN=4の例を示している。p、p、p、p、p、pは各ピークの高さを表し、p>p>p>p>p>pである。即ち、値の大きなピークから順に幅wの補正を実施する。 Loop filter unit 13 in FIG. 1, and all w correction width for each peak pixel value histogram as shown in FIG. 57, determines the number N P of the peak of implementing the correction. FIG. 57 shows an example of N P = 4. p 0 , p 1 , p 2 , p 3 , p 4 , and p 5 represent the height of each peak, and p 0 > p 1 > p 2 > p 3 > p 4 > p 5 . That is, the width w is corrected in order from the peak having the largest value.

このとき、ループフィルタ部13は、上記実施の形態1でピークごとの補正幅の最適値を求めた場合と同様にして、Nを変化させながら画質改善効果や符号化効率が最も高くなるようなNを求める。なお、補正幅wは例えば15などの定数をあらかじめ設定しておいてもよいし、ヒストグラム補正処理を実施するブロックごとに最適な値を求めてもよい。 In this case, the loop filter unit 13, in the same manner as that for determining the optimum value of the correction width for each peak in the first embodiment, so that the image quality improving effect and the coding efficiency is maximized while changing the N P seek such N P. For the correction width w, a constant such as 15 may be set in advance, or an optimal value may be obtained for each block on which the histogram correction processing is performed.

そして、求めたピークの個数の最適値Nを可変長符号化部15に出力して符号化する。なお、補正幅wをブロックごとに変化させる場合は補正幅wも併せて符号化する。 The encoding outputs an optimum value N P of the number of peaks found in the variable length coding unit 15. When the correction width w is changed for each block, the correction width w is also encoded.

この実施の形態4による画像復号装置は、基本的に図17に示す実施の形態1の画像復号装置と同様の構成および動作である。ただし、可変長復号部31は、ヒストグラム補正処理に必要なパラメータとしてノイズ除去を実施するピークの個数Nを復号し、ループフィルタ部39はこれを参照してヒストグラム補正処理を実施する。また、補正幅wが符号化されている場合は、これも併せて可変長復号部31で復号し、ループフィルタ部39で参照してヒストグラム補正処理を実施する。 The image decoding apparatus according to the fourth embodiment has basically the same configuration and operation as the image decoding apparatus according to the first embodiment shown in FIG. However, the variable length decoding unit 31 decodes the number N P of the peak of implementing noise reduction as a parameter necessary for histogram correction process, the loop filter unit 39 with reference to this implementing histogram correction process. Further, when the correction width w is encoded, this is also decoded by the variable length decoding unit 31 and is referenced by the loop filter unit 39 to perform the histogram correction processing.

このループフィルタ部39によるフィルタ処理後の復号画像が、動き補償予測用の参照画像となり、また、再生画像となる。   The decoded image after the filter processing by the loop filter unit 39 becomes a reference image for motion compensation prediction and also becomes a reproduced image.

この実施の形態4では、画像符号化装置のループフィルタ部13が、局所復号画像のブロック毎にノイズ除去を実施する最適なヒストグラムのピークの個数N(あるいはこれに加えて補正幅w)を求め、ヒストグラムを補正することで局所復号画像からノイズを取り除くよう構成したので、図42に示すようにヒストグラムの各ピークが鋭く、疎であるようなスクリーンコンテンツに対して局所復号画像の大幅な画質改善を実現することができる効果を奏する。ただし、本効果はスクリーンコンテンツに限定されるものではなく、同様のヒストグラム特徴を持つ映像信号であれば当然ながら同様の効果が得られる。 In the fourth embodiment, the loop filter unit 13 of the image encoding device sets the optimum number N P (or correction width w) of the histogram peak for performing noise removal for each block of the locally decoded image. Since the configuration is such that noise is removed from the locally decoded image by obtaining and correcting the histogram, as shown in FIG. 42, the image quality of the locally decoded image is greatly improved with respect to screen content in which each peak of the histogram is sharp and sparse. The effect which can implement | achieve improvement is produced. However, this effect is not limited to the screen content, and naturally the same effect can be obtained as long as the video signal has the same histogram feature.

この実施の形態4では、ピークの個数Nの一種類、あるいは個数Nと幅wの二種類だけをヒストグラム補正処理に必要なパラメータとして符号化するため、上記実施の形態1に比べて符号化するパラメータの個数が減り、符号化するヘッダ情報を少なくすることができ、符号量を削減することができる効果を奏する。 In the fourth embodiment, to encode one type of number N P of the peak, or two of the number N P and the width w only as a parameter necessary for histogram correction process, as compared to the first embodiment codes The number of parameters to be reduced is reduced, header information to be encoded can be reduced, and the amount of code can be reduced.

また、この実施の形態4では、画像符号化装置の可変長符号化部15が、上記のヒストグラム補正に必要なピークの個数N(あるいはこれに加えて補正幅w)を符号化して出力し、画像復号装置は、ピークの個数N(あるいはこれに加えて補正幅w)を可変長復号し、ループフィルタ部39において復号画像のヒストグラム補正を行って復号画像からノイズを取り除くよう構成したので、図42に示すようにヒストグラムの各ピークが鋭く、疎であるようなスクリーンコンテンツに対して復号画像の大幅な画質改善を実現することができる効果を奏する。ただし、本効果はスクリーンコンテンツに限定されるものではなく、同様のヒストグラム特徴を持つ映像信号であれば当然ながら同様の効果が得られる。 In the fourth embodiment, the variable length coding unit 15 of the image coding apparatus codes and outputs the number of peaks N P (or correction width w) in addition to the above-described histogram correction. The image decoding apparatus is configured to perform variable-length decoding on the number of peaks N P (or in addition to the correction width w) and to perform noise correction on the decoded image in the loop filter unit 39 to remove noise from the decoded image. As shown in FIG. 42, there is an effect that a significant improvement in the image quality of the decoded image can be realized for screen content in which each peak of the histogram is sharp and sparse. However, this effect is not limited to the screen content, and naturally the same effect can be obtained as long as the video signal has the same histogram feature.

また、この実施の形態4によれば、上記効果を持つ画像符号化装置及び画像符号化方法が生成する符号化ビットストリームを正しく復号することができる画像復号装置及び画像復号方法が得られる効果を奏する。   In addition, according to the fourth embodiment, the image decoding apparatus and the image decoding method that can correctly decode the encoded bitstream generated by the image encoding apparatus and the image encoding method having the above-described effects can be obtained. Play.

また、この実施の形態4は、他の実施の形態とも容易に組み合わせることができる。例えば、上記実施の形態1〜3のようにヒストグラムの各ピークに対して最適な補正幅を求めて符号化するのに加え、補正を実施するピークの本数も符号化する(Nとw(i=0〜N−1)の全てを符号化する)ことで、より画質改善効果を高めることができる。ただし、符号化するヘッダ情報が増えることで符号量が増加することに注意が必要である。 In addition, the fourth embodiment can be easily combined with other embodiments. For example, in addition to obtaining and encoding the optimum correction width for each peak of the histogram as in the first to third embodiments, the number of peaks to be corrected is also encoded (N P and w i (Encoding all of i = 0 to N P −1) can further enhance the image quality improvement effect. However, it should be noted that the amount of code increases as the header information to be encoded increases.

なお、上記の他の実施の形態との組み合わせ方は、映像単位、あるいはピクチャやスライス、ブロック単位で適応的に変更してもよい。このようにすることで、画質改善効果や符号化効率がより向上する。このとき、組み合わせ方を示すフラグなどを変更単位に応じてヘッダ(シーケンスパラメータセットやピクチャパラメータセット、スライスパラメータセットなど)に追加し、画像符号化装置にて符号化してもよい。   Note that the combination with the other embodiments described above may be adaptively changed in units of video, or in units of pictures, slices, or blocks. By doing so, the image quality improvement effect and the encoding efficiency are further improved. At this time, a flag indicating a combination may be added to the header (sequence parameter set, picture parameter set, slice parameter set, etc.) according to the change unit, and may be encoded by the image encoding device.

実施の形態5.
上記実施の形態1では、画像符号化装置において画素値ヒストグラムの各ピークに対して最適な補正幅を求め、それらを可変長符号化してビットストリームに加えていたが、この実施の形態5では、補正幅ではなくノイズ除去を実施するピークの位置を符号化するよう構成することで、復号処理における演算量を削減できる場合を説明する。
Embodiment 5 FIG.
In Embodiment 1 described above, an optimum correction width is obtained for each peak of the pixel value histogram in the image encoding device, and these are variable-length encoded and added to the bitstream. In Embodiment 5, however, A case will be described in which the calculation amount in the decoding process can be reduced by encoding the peak position where noise removal is performed instead of the correction width.

この実施の形態5による画像符号化装置は、基本的に図1に示す実施の形態1の画像符号化装置と同様の構成および動作である。ただし、ヒストグラム補正処理に必要なパラメータとして、ヒストグラムの各ピークの補正幅ではなく、ノイズ除去を実施するピークの位置を用いる。   The image coding apparatus according to the fifth embodiment has basically the same configuration and operation as the image coding apparatus according to the first embodiment shown in FIG. However, as a parameter necessary for the histogram correction processing, the peak position where noise removal is performed is used instead of the correction width of each peak of the histogram.

図1におけるループフィルタ部13は、図58に示すように画素値ヒストグラムの各ピークに対する補正幅を全てwとし、補正を実施するピークの位置v、v、v、vを決定する。図57では、補正するピークの個数を4としている。 As shown in FIG. 58, the loop filter unit 13 in FIG. 1 sets w as the correction width for each peak of the pixel value histogram, and determines peak positions v 0 , v 1 , v 2 , and v 3 to be corrected. . In FIG. 57, the number of peaks to be corrected is four.

このとき、ループフィルタ部13は、上記実施の形態1でピークごとの補正幅の最適値を求めた場合と同様にして、補正値v(図57の例ではi=0、1、2、3)を変化させながら画質改善効果や符号化効率が最も高くなるようなvを求める。なお、補正幅wは例えば15などの定数をあらかじめ設定しておいてもよいし、ヒストグラム補正処理を実施するブロックごとに最適な値を求めてもよい。 At this time, the loop filter unit 13 performs the correction value v i (i = 0, 1, 2, in the example of FIG. 57) in the same manner as in the case of obtaining the optimum value of the correction width for each peak in the first embodiment. While changing 3), v i that maximizes the image quality improvement effect and coding efficiency is obtained. For the correction width w, a constant such as 15 may be set in advance, or an optimal value may be obtained for each block on which the histogram correction processing is performed.

そして、求めたピークの位置の最適値vを可変長符号化部15に出力して符号化する。なお、補正幅wをブロックごとに変化させる場合は補正幅wも併せて符号化する。 Then, the obtained optimum value v i of the peak position is output to the variable length encoding unit 15 and encoded. When the correction width w is changed for each block, the correction width w is also encoded.

この実施の形態5による画像復号装置は、基本的に図17に示す実施の形態1の画像復号装置と同様の構成および動作である。ただし、可変長復号部31は、ヒストグラム補正処理に必要なパラメータとしてノイズ除去を実施するピークの位置vを復号し、ループフィルタ部39はこれを参照してヒストグラム補正処理を実施する。また、補正幅wが符号化されている場合は、これも併せて可変長復号部31で復号し、ループフィルタ部39で参照してヒストグラム補正処理を実施する。 The image decoding apparatus according to the fifth embodiment has basically the same configuration and operation as the image decoding apparatus according to the first embodiment shown in FIG. However, the variable length decoding unit 31 decodes the position v i of the peak of implementing noise reduction as a parameter necessary for histogram correction process, the loop filter unit 39 with reference to this implementing histogram correction process. Further, when the correction width w is encoded, this is also decoded by the variable length decoding unit 31 and is referenced by the loop filter unit 39 to perform the histogram correction processing.

なお、補正するピークの位置vがループフィルタ部39で既知となるため、実際にはループフィルタ部39でヒストグラムを求める必要はない。即ち、この実施の形態5では、実施の形態1に比べてループフィルタ部39における演算量を削減することが可能である。 Since the peak position v i to be corrected is known by the loop filter unit 39, it is not actually necessary to obtain a histogram by the loop filter unit 39. That is, in the fifth embodiment, it is possible to reduce the calculation amount in the loop filter unit 39 as compared with the first embodiment.

このループフィルタ部39によるフィルタ処理後の復号画像が、動き補償予測用の参照画像となり、また、再生画像となる。   The decoded image after the filter processing by the loop filter unit 39 becomes a reference image for motion compensation prediction and also becomes a reproduced image.

この実施の形態5では、画像符号化装置のループフィルタ部13が、局所復号画像のブロック毎にノイズ除去を実施する最適なヒストグラムのピークの位置v(あるいはこれに加えて補正幅w)を求め、ヒストグラムを補正することで局所復号画像からノイズを取り除くよう構成したので、図42に示すようにヒストグラムの各ピークが鋭く、疎であるようなスクリーンコンテンツに対して局所復号画像の大幅な画質改善を実現することができる効果を奏する。ただし、本効果はスクリーンコンテンツに限定されるものではなく、同様のヒストグラム特徴を持つ映像信号であれば当然ながら同様の効果が得られる。 In the fifth embodiment, the loop filter unit 13 of the image encoding device sets the optimum histogram peak position v i (or correction width w) for performing noise removal for each block of the locally decoded image. Since the configuration is such that noise is removed from the locally decoded image by obtaining and correcting the histogram, as shown in FIG. 42, the image quality of the locally decoded image is greatly improved with respect to screen content in which each peak of the histogram is sharp and sparse. The effect which can implement | achieve improvement is produced. However, this effect is not limited to the screen content, and naturally the same effect can be obtained as long as the video signal has the same histogram feature.

この実施の形態5では、ピークの位置v(あるいはこれに加えて補正幅w)をヒストグラム補正処理に必要なパラメータとして符号化するため、復号時にループフィルタ部39にてヒストグラム計算をする必要がなくなり、上記実施の形態1に比べて復号処理のための演算量を削減することができる効果を奏する。 In the fifth embodiment, since the peak position v i (or the correction width w) is encoded as a parameter necessary for the histogram correction process, it is necessary to perform histogram calculation by the loop filter unit 39 at the time of decoding. As a result, the amount of calculation for the decoding process can be reduced as compared with the first embodiment.

また、この実施の形態5では、画像符号化装置の可変長符号化部15が、上記のヒストグラム補正に必要なピークの位置v(あるいはこれに加えて補正幅w)を符号化して出力し、画像復号装置は、ピークの位置v(あるいはこれに加えて補正幅w)を可変長復号し、ループフィルタ部39において復号画像のヒストグラム補正を行って復号画像からノイズを取り除くよう構成したので、図42に示すようにヒストグラムの各ピークが鋭く、疎であるようなスクリーンコンテンツに対して復号画像の大幅な画質改善を実現することができる効果を奏する。ただし、本効果はスクリーンコンテンツに限定されるものではなく、同様のヒストグラム特徴を持つ映像信号であれば当然ながら同様の効果が得られる。 Further, in the fifth embodiment, the variable length coding unit 15 of the image encoding apparatus, the position of the peak required in the above histogram correction v i (or in addition to the correction width w) and outputs the encoded The image decoding apparatus is configured to perform variable-length decoding on the peak position v i (or correction width w in addition to this) and to perform histogram correction of the decoded image in the loop filter unit 39 to remove noise from the decoded image. As shown in FIG. 42, there is an effect that a significant improvement in the image quality of the decoded image can be realized for screen content in which each peak of the histogram is sharp and sparse. However, this effect is not limited to the screen content, and naturally the same effect can be obtained as long as the video signal has the same histogram feature.

また、この実施の形態5によれば、上記効果を持つ画像符号化装置及び画像符号化方法が生成する符号化ビットストリームを正しく復号することができる画像復号装置及び画像復号方法が得られる効果を奏する。   In addition, according to the fifth embodiment, the image decoding apparatus and the image decoding method that can correctly decode the encoded bitstream generated by the image encoding apparatus and the image encoding method having the above-described effects can be obtained. Play.

また、この実施の形態5は、他の実施の形態とも容易に組み合わせることができる。例えば、上記実施の形態1から3のようにヒストグラムの各ピークに対して最適な補正幅を求めて符号化するのに加え、上記実施の形態4のように補正を実施するピークの本数も符号化する(N、v、w(i=0〜N−1)の全てを符号化する)ことで、より画質改善効果を高めることができる。ただし、符号化するヘッダ情報が増えることで符号量が増加することに注意が必要である。 In addition, the fifth embodiment can be easily combined with other embodiments. For example, in addition to obtaining and encoding the optimum correction width for each peak of the histogram as in the first to third embodiments, the number of peaks to be corrected as in the fourth embodiment is also encoded. (Encoding all of N P , v i , and w i (i = 0 to N P −1)) can further enhance the image quality improvement effect. However, it should be noted that the amount of code increases as the header information to be encoded increases.

なお、上記の他の実施の形態との組み合わせ方は、映像単位、あるいはピクチャやスライス、ブロック単位で適応的に変更してもよい。このようにすることで、画質改善効果や符号化効率がより向上する。このとき、組み合わせ方を示すフラグなどを変更単位に応じてヘッダ(シーケンスパラメータセットやピクチャパラメータセット、スライスパラメータセットなど)に追加し、画像符号化装置にて符号化してもよい。   Note that the combination with the other embodiments described above may be adaptively changed in units of video, or in units of pictures, slices, or blocks. By doing so, the image quality improvement effect and the encoding efficiency are further improved. At this time, a flag indicating a combination may be added to the header (sequence parameter set, picture parameter set, slice parameter set, etc.) according to the change unit, and may be encoded by the image encoding device.

実施の形態6.
上記実施の形態1では、画像符号化装置において画素値ヒストグラムの各ピークに対して最適な補正幅を求め、それらを可変長符号化してビットストリームに加えていたが、この実施の形態6では、ブロック単位にヒストグラム補正を実施するか否かのフラグだけを符号化するように構成することで、ヒストグラム補正処理に必要なパラメータの符号化に係る符号量を削減できる場合を説明する。
Embodiment 6 FIG.
In Embodiment 1 described above, an optimum correction width is obtained for each peak of the pixel value histogram in the image encoding device, and these are variable length encoded and added to the bitstream. In Embodiment 6, however, A case will be described in which the code amount related to the encoding of the parameters necessary for the histogram correction process can be reduced by encoding only the flag indicating whether or not to perform the histogram correction for each block.

この実施の形態6による画像符号化装置は、基本的に図1に示す実施の形態1の画像符号化装置と同様の構成および動作である。ただし、ヒストグラム補正処理のパラメータとして、ヒストグラム補正を当該ブロックで実施するか否かのフラグだけを符号化する。   The image coding apparatus according to the sixth embodiment has basically the same configuration and operation as the image coding apparatus according to the first embodiment shown in FIG. However, as a parameter for histogram correction processing, only a flag indicating whether or not to perform histogram correction on the block is encoded.

図1におけるループフィルタ部13は、所定のピーク本数に対して所定の補正幅で補正を実施し、その際の符号化コストを求める。なお、ピーク本数は常に固定値としてもよいし、スライスやブロックといった任意の単位で変更できるようにしてもよい。また、補正幅についても、全てのピークに対して常に同じ固定値を用いるようにしてもよいし、ピークごとに異なる値を用いるようにしてもよい。   The loop filter unit 13 in FIG. 1 corrects a predetermined number of peaks with a predetermined correction width, and obtains an encoding cost at that time. Note that the number of peaks may always be a fixed value, or may be changed in an arbitrary unit such as a slice or a block. As for the correction width, the same fixed value may always be used for all peaks, or a different value may be used for each peak.

そして、求めた符号化コストが、ヒストグラム補正処理を実施しない場合の符号化コストよりも小さくなる場合、当該ブロックにてヒストグラム補正処理を実施するか否かを示すフラグに例えば1を代入して可変長符号化部15に出力する。また、求めた符号化コストが、ヒストグラム補正処理を実施しない場合の符号化コストよりも大きくなる場合、当該ブロックにてヒストグラム補正処理を実施するか否かを示すフラグに例えば0を代入して可変長符号化部15に出力する。   If the obtained encoding cost is smaller than the encoding cost when the histogram correction processing is not performed, for example, 1 is substituted into a flag indicating whether or not the histogram correction processing is performed in the block. The data is output to the long encoding unit 15. In addition, when the obtained coding cost is larger than the coding cost when the histogram correction processing is not performed, it is variable by substituting, for example, 0 for a flag indicating whether or not the histogram correction processing is performed in the block. The data is output to the long encoding unit 15.

この実施の形態6による画像復号装置は、基本的に図17に示す実施の形態1の画像復号装置と同様の構成および動作である。ただし、可変長復号部31は、ヒストグラム補正処理に必要なパラメータとして当該ブロックにてヒストグラム補正処理を実施するか否かを示すフラグを復号し、ループフィルタ部39はこれを参照してヒストグラム補正処理を実施する。   The image decoding apparatus according to the sixth embodiment has basically the same configuration and operation as the image decoding apparatus according to the first embodiment shown in FIG. However, the variable length decoding unit 31 decodes a flag indicating whether or not the histogram correction processing is performed in the block as a parameter necessary for the histogram correction processing, and the loop filter unit 39 refers to this to perform the histogram correction processing. To implement.

即ち、ループフィルタ部39は、可変長復号部31で復号したフラグを参照し、これが1である場合は、所定のピーク本数に対して所定の補正幅で補正を実施する。なお、ピーク本数は常に固定値としてもよいし、スライスやブロックといった任意の単位で変更できるようにしてもよいが、ループフィルタ部39の出力画像を図1の画像符号化装置におけるループフィルタ部13の出力画像と一致させる必要があるため、ループフィルタ部13と同様にする必要がある。また、補正幅についても、全てのピークに対して常に同じ固定値を用いるようにしてもよいし、ピークごとに異なる値を用いるようにしてもよいが、これもループフィルタ部13と同様にする必要がある。   That is, the loop filter unit 39 refers to the flag decoded by the variable length decoding unit 31, and when this is 1, the loop filter unit 39 corrects the predetermined number of peaks with a predetermined correction width. The number of peaks may always be a fixed value, or may be changed in arbitrary units such as slices and blocks, but the output image of the loop filter unit 39 is used as the loop filter unit 13 in the image encoding device of FIG. Therefore, it is necessary to make the same as the loop filter unit 13. As for the correction width, the same fixed value may be always used for all the peaks, or a different value may be used for each peak, which is also the same as the loop filter unit 13. There is a need.

また、可変長復号部31で復号したフラグが0である場合は、ループフィルタ部39は、当該ブロックにてヒストグラム補正処理を実施しない。   When the flag decoded by the variable length decoding unit 31 is 0, the loop filter unit 39 does not perform the histogram correction process on the block.

このループフィルタ部39によるフィルタ処理後の復号画像が、動き補償予測用の参照画像となり、また、再生画像となる。   The decoded image after the filter processing by the loop filter unit 39 becomes a reference image for motion compensation prediction and also becomes a reproduced image.

この実施の形態6では、画像符号化装置のループフィルタ部13が、局所復号画像のブロック毎に所定のピーク本数と補正幅を参照してヒストグラムを補正することで局所復号画像からノイズを取り除くよう構成したので、図42に示すようにヒストグラムの各ピークが鋭く、疎であるようなスクリーンコンテンツに対して局所復号画像の大幅な画質改善を実現することができる効果を奏する。ただし、本効果はスクリーンコンテンツに限定されるものではなく、同様のヒストグラム特徴を持つ映像信号であれば当然ながら同様の効果が得られる。   In the sixth embodiment, the loop filter unit 13 of the image encoding device removes noise from the local decoded image by correcting the histogram with reference to a predetermined number of peaks and correction width for each block of the local decoded image. Since it is configured, as shown in FIG. 42, there is an effect that a significant improvement in the image quality of the locally decoded image can be realized for screen content in which each peak of the histogram is sharp and sparse. However, this effect is not limited to the screen content, and naturally the same effect can be obtained as long as the video signal has the same histogram feature.

この実施の形態6では、当該ブロックにてヒストグラム補正処理を実施するか否かを示すフラグだけを符号化するため、上記実施の形態1に比べてヒストグラム補正処理に係るパラメータの符号化に必要な符号量を削減することができる効果を奏する。   In the sixth embodiment, since only the flag indicating whether or not the histogram correction processing is to be performed is encoded in the block, it is necessary for encoding parameters related to the histogram correction processing as compared with the first embodiment. There is an effect that the amount of codes can be reduced.

また、この実施の形態6では、画像符号化装置の可変長符号化部15が、当該ブロックにて上記のヒストグラム補正を実施するか否かを表すフラグを符号化して出力し、画像復号装置は、上記のフラグを可変長復号し、フラグがヒストグラム補正処理を実施することを示す値である場合はループフィルタ部39において復号画像のヒストグラム補正を行って復号画像からノイズを取り除くよう構成したので、図42に示すようにヒストグラムの各ピークが鋭く、疎であるようなスクリーンコンテンツに対して復号画像の大幅な画質改善を実現することができる効果を奏する。ただし、本効果はスクリーンコンテンツに限定されるものではなく、同様のヒストグラム特徴を持つ映像信号であれば当然ながら同様の効果が得られる。   In the sixth embodiment, the variable length encoding unit 15 of the image encoding device encodes and outputs a flag indicating whether or not the above-described histogram correction is performed in the block, and the image decoding device Since the above-mentioned flag is variable-length decoded and the flag is a value indicating that the histogram correction processing is performed, the loop filter unit 39 performs histogram correction of the decoded image to remove noise from the decoded image. As shown in FIG. 42, there is an effect that a significant improvement in the image quality of the decoded image can be realized for screen content in which each peak of the histogram is sharp and sparse. However, this effect is not limited to the screen content, and naturally the same effect can be obtained as long as the video signal has the same histogram feature.

また、この実施の形態6によれば、上記効果を持つ画像符号化装置及び画像符号化方法が生成する符号化ビットストリームを正しく復号することができる画像復号装置及び画像復号方法が得られる効果を奏する。   In addition, according to the sixth embodiment, an effect of obtaining an image decoding apparatus and an image decoding method capable of correctly decoding an encoded bitstream generated by the image encoding apparatus and the image encoding method having the above-described effects can be obtained. Play.

なお、本願発明はその発明の範囲内において、各実施の形態の自由な組み合わせ、あるいは各実施の形態の任意の構成要素の変形、もしくは各実施の形態において任意の構成要素の省略が可能である。   In the present invention, within the scope of the invention, any combination of the embodiments, or any modification of any component in each embodiment, or omission of any component in each embodiment is possible. .

1 符号化制御部、2 スライス分割部、3 ブロック分割部、4 切換スイッチ、5 イントラ予測部、6 イントラブロックコピー予測部、7 動き補償予測部、8 減算部、9 変換・量子化部、10 逆量子化・逆変換部、11 加算部、12 イントラ用メモリ、13 ループフィルタ部、14 動き補償予測フレームメモリ、15 可変長符号化部(符号化手段)、21 ヒストグラム算出部(ヒストグラム算出手段)、22 画素値補正部(画素値補正手段)、23 第1の誤差算出部、24 第2の誤差算出部、25 補正画素値範囲保存部、26 繰り返し処理部、27 画素値置換部、31 可変長復号部(復号手段)、32 逆量子化・逆変換部、33 切換スイッチ、34 イントラ予測部、35 イントラブロックコピー予測部、36 動き補償予測部、37 加算部、38 イントラ用メモリ、39 ループフィルタ部、40 動き補償予測フレームメモリ、41 ヒストグラム算出部(ヒストグラム算出手段)、42 画素値補正部(画素値補正手段)。   DESCRIPTION OF SYMBOLS 1 Encoding control part, 2 slice division part, 3 block division part, 4 changeover switch, 5 intra prediction part, 6 intra block copy prediction part, 7 motion compensation prediction part, 8 subtraction part, 9 conversion and quantization part, 10 Inverse quantization / inverse transform unit, 11 addition unit, 12 intra memory, 13 loop filter unit, 14 motion compensated prediction frame memory, 15 variable length coding unit (encoding unit), 21 histogram calculation unit (histogram calculation unit) , 22 Pixel value correction unit (pixel value correction means), 23 First error calculation unit, 24 Second error calculation unit, 25 Correction pixel value range storage unit, 26 Repeat processing unit, 27 Pixel value replacement unit, 31 Variable Long decoding unit (decoding means), 32 inverse quantization / inverse conversion unit, 33 changeover switch, 34 intra prediction unit, 35 intra block copy prediction unit, 3 Motion compensation prediction unit, 37 adder unit, 38 an intra memory, 39 a loop filter unit, 40 motion-compensated prediction frame memory, 41 histogram calculation unit (histogram calculating means), 42 a pixel value correcting unit (pixel value correcting unit).

Claims (7)

符号化対象画像の圧縮データから得られる局所復号画像における画素値のヒストグラムを算出するヒストグラム算出手段と、
前記ヒストグラム算出手段により算出されたヒストグラムから符号化歪みに伴うノイズが重畳している画素を特定して、前記ノイズが重畳している画素の画素値を補正する画素値補正手段と
を備えた画像符号化装置。
A histogram calculating means for calculating a histogram of pixel values in a locally decoded image obtained from compressed data of an encoding target image;
An image comprising: a pixel value correcting unit that identifies a pixel on which noise accompanying coding distortion is superimposed from a histogram calculated by the histogram calculating unit, and corrects a pixel value of the pixel on which the noise is superimposed. Encoding device.
前記画素値補正手段は、
前記符号化対象画像と前記局所復号画像との誤差を算出する第1の誤差算出部と、
前記ヒストグラム算出手段により算出されたヒストグラムにおけるピーク画素値を含む補正画素値範囲内の画素値を前記ピーク画素値に置換したと仮定した場合の前記局所復号画像と、前記符号化対象画像との誤差を算出する第2の誤差算出部と、
前記第2の誤差算出部により算出された誤差が前記第1の誤差算出部により算出された誤差より小さければ、前記第1の誤差算出部により算出された誤差を前記第2の誤差算出部により算出された誤差に置き換えて、前記補正画素値範囲を上書き保存する補正画素値範囲保存部と、
前記補正画素値範囲が予め設定された範囲に至るまで、前記補正画素値範囲を更新して、誤差の算出処理の再実施を前記第2の誤差算出部に繰り返し指示する繰り返し処理部と、
前記繰り返し処理部により更新された補正画素値範囲が予め設定された範囲に至ったのち、前記補正画素値範囲保存部により保存されている補正画素値範囲内の画素値を前記ピーク画素値に置換する画素値置換部とから構成されていることを特徴とする請求項1記載の画像符号化装置。
The pixel value correcting means includes
A first error calculation unit for calculating an error between the encoding target image and the locally decoded image;
An error between the local decoded image and the encoding target image when it is assumed that a pixel value within a correction pixel value range including a peak pixel value in the histogram calculated by the histogram calculation unit is replaced with the peak pixel value. A second error calculation unit for calculating
If the error calculated by the second error calculator is smaller than the error calculated by the first error calculator, the error calculated by the first error calculator is converted by the second error calculator. A corrected pixel value range storage unit that overwrites and stores the corrected pixel value range in place of the calculated error;
A repetitive processing unit that updates the correction pixel value range until the correction pixel value range reaches a preset range and repeatedly instructs the second error calculation unit to re-execute an error calculation process;
After the correction pixel value range updated by the iterative processing unit reaches a preset range, the pixel value in the correction pixel value range stored by the correction pixel value range storage unit is replaced with the peak pixel value The image encoding device according to claim 1, further comprising: a pixel value replacement unit that performs the processing.
前記繰り返し処理部により更新された補正画素値範囲が予め設定された範囲に至ったのち、前記補正画素値範囲保存部により保存されている補正画素値範囲を符号化する符号化手段を備えたことを特徴とする請求項2記載の画像符号化装置。   An encoding unit configured to encode the correction pixel value range stored by the correction pixel value range storage unit after the correction pixel value range updated by the iterative processing unit reaches a preset range; The image encoding device according to claim 2. 符号化対象画像の圧縮データから得られる復号画像における画素値のヒストグラムを算出するヒストグラム算出手段と、
前記ヒストグラム算出手段により算出されたヒストグラムから符号化歪みに伴うノイズが重畳している画素を特定して、前記ノイズが重畳している画素の画素値を補正する画素値補正手段と
を備えた画像復号装置。
Histogram calculating means for calculating a histogram of pixel values in a decoded image obtained from compressed data of an encoding target image;
An image comprising: a pixel value correcting unit that identifies a pixel on which noise accompanying coding distortion is superimposed from a histogram calculated by the histogram calculating unit, and corrects a pixel value of the pixel on which the noise is superimposed. Decoding device.
画像符号化装置により符号化された補正画素値範囲を復号する復号手段を備え、
前記画素値補正手段は、前記ヒストグラム算出手段により算出されたヒストグラムにおけるピーク画素値を含む前記補正画素値範囲内の画素値を前記ピーク画素値に置換することを特徴とする請求項4記載の画像復号装置。
A decoding means for decoding the corrected pixel value range encoded by the image encoding device;
5. The image according to claim 4, wherein the pixel value correcting unit replaces a pixel value within the correction pixel value range including a peak pixel value in the histogram calculated by the histogram calculating unit with the peak pixel value. Decoding device.
ヒストグラム算出手段が、符号化対象画像の圧縮データから得られる局所復号画像における画素値のヒストグラムを算出するヒストグラム算出処理ステップと、
画素値補正手段が、前記ヒストグラム算出処理ステップで算出されたヒストグラムから符号化歪みに伴うノイズが重畳している画素を特定して、前記ノイズが重畳している画素の画素値を補正する画素値補正処理ステップと
を備えた画像符号化方法。
A histogram calculation processing step in which a histogram calculation means calculates a histogram of pixel values in a locally decoded image obtained from compressed data of an encoding target image;
A pixel value for correcting a pixel value of a pixel on which the noise is superimposed by specifying a pixel on which noise associated with encoding distortion is superimposed from the histogram calculated in the histogram calculation processing step. An image encoding method comprising: a correction processing step.
ヒストグラム算出手段が、符号化対象画像の圧縮データから得られる復号画像における画素値のヒストグラムを算出するヒストグラム算出処理ステップと、
画素値補正手段が、前記ヒストグラム算出処理ステップで算出されたヒストグラムから符号化歪みに伴うノイズが重畳している画素を特定して、前記ノイズが重畳している画素の画素値を補正する画素値補正処理ステップと
を備えた画像復号方法。
A histogram calculation processing step in which a histogram calculation means calculates a histogram of pixel values in a decoded image obtained from compressed data of an encoding target image;
A pixel value for correcting a pixel value of a pixel on which the noise is superimposed by specifying a pixel on which noise associated with encoding distortion is superimposed from the histogram calculated in the histogram calculation processing step. An image decoding method comprising: a correction processing step.
JP2014052210A 2014-03-14 2014-03-14 Image encoding device, image decoding device, image encoding method, and image decoding method Expired - Fee Related JP6338408B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014052210A JP6338408B2 (en) 2014-03-14 2014-03-14 Image encoding device, image decoding device, image encoding method, and image decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014052210A JP6338408B2 (en) 2014-03-14 2014-03-14 Image encoding device, image decoding device, image encoding method, and image decoding method

Publications (2)

Publication Number Publication Date
JP2015177342A true JP2015177342A (en) 2015-10-05
JP6338408B2 JP6338408B2 (en) 2018-06-06

Family

ID=54256108

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014052210A Expired - Fee Related JP6338408B2 (en) 2014-03-14 2014-03-14 Image encoding device, image decoding device, image encoding method, and image decoding method

Country Status (1)

Country Link
JP (1) JP6338408B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115243041A (en) * 2018-05-03 2022-10-25 Lg电子株式会社 Image encoding method, image decoding apparatus, storage medium, and image transmission method
CN115243041B (en) * 2018-05-03 2024-06-04 Lg电子株式会社 Image encoding and decoding method, decoding device, storage medium, and transmission method

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004080741A (en) * 2002-06-21 2004-03-11 Nippon Hoso Kyokai <Nhk> Encoding error estimation method and encoding error estimation apparatus
JP2005328383A (en) * 2004-05-14 2005-11-24 Mitsubishi Electric Corp Dynamic image encoding device and program
JP2006262310A (en) * 2005-03-18 2006-09-28 Fuji Xerox Co Ltd Decoder, inverse quantization method, and program thereof
JP2007053618A (en) * 2005-08-18 2007-03-01 Sony Corp Data processing device, data processing method, and program
US20090290809A1 (en) * 2007-06-28 2009-11-26 Hitoshi Yamada Image processing device, image processing method, and program
JP4550016B2 (en) * 2006-06-19 2010-09-22 パナソニック株式会社 Brightness converter
WO2013068433A2 (en) * 2011-11-07 2013-05-16 Canon Kabushiki Kaisha Method, device and program for encoding and decoding a sequence of images
JP2013135366A (en) * 2011-12-27 2013-07-08 Kddi Corp Dynamic image transmission device, dynamic image receiving device, dynamic image transmission system, dynamic image transmission method, dynamic image reception method, and program
JP2013258685A (en) * 2012-05-16 2013-12-26 Sharp Corp Image processing device, moving image processing device, video processing device, image processing method, video processing method, television receiver, program, and recording medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004080741A (en) * 2002-06-21 2004-03-11 Nippon Hoso Kyokai <Nhk> Encoding error estimation method and encoding error estimation apparatus
JP2005328383A (en) * 2004-05-14 2005-11-24 Mitsubishi Electric Corp Dynamic image encoding device and program
JP2006262310A (en) * 2005-03-18 2006-09-28 Fuji Xerox Co Ltd Decoder, inverse quantization method, and program thereof
JP2007053618A (en) * 2005-08-18 2007-03-01 Sony Corp Data processing device, data processing method, and program
JP4550016B2 (en) * 2006-06-19 2010-09-22 パナソニック株式会社 Brightness converter
US20090290809A1 (en) * 2007-06-28 2009-11-26 Hitoshi Yamada Image processing device, image processing method, and program
WO2013068433A2 (en) * 2011-11-07 2013-05-16 Canon Kabushiki Kaisha Method, device and program for encoding and decoding a sequence of images
JP2013135366A (en) * 2011-12-27 2013-07-08 Kddi Corp Dynamic image transmission device, dynamic image receiving device, dynamic image transmission system, dynamic image transmission method, dynamic image reception method, and program
JP2013258685A (en) * 2012-05-16 2013-12-26 Sharp Corp Image processing device, moving image processing device, video processing device, image processing method, video processing method, television receiver, program, and recording medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ROBERT COHEN ET AL.: "Description of screen content coding technology proposal by Mitsubishi Electric Corporation", JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT-VC) OF ITU-T SG16 WP3 AND ISO/IEC JTC1/SC29/WG11 17TH, vol. JCTVC-Q0036, JPN6017037628, 18 March 2014 (2014-03-18), pages 6−8頁 *
吉野 知伸 他: "低ビットレート映像に対する画素値ヒストグラム情報に基づく質感復元方式", 電子情報通信学会誌D, vol. Vol. J97-D, No.2, JPN6017037630, 28 February 2014 (2014-02-28), JP, pages 81 - 293 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115243041A (en) * 2018-05-03 2022-10-25 Lg电子株式会社 Image encoding method, image decoding apparatus, storage medium, and image transmission method
CN115243041B (en) * 2018-05-03 2024-06-04 Lg电子株式会社 Image encoding and decoding method, decoding device, storage medium, and transmission method

Also Published As

Publication number Publication date
JP6338408B2 (en) 2018-06-06

Similar Documents

Publication Publication Date Title
JP6573689B2 (en) Image coding apparatus and image coding method
US9451279B2 (en) Method for decoding a moving picture
KR102070319B1 (en) Method of coefficient scan based on partition mode of prediction unit and apparatus using the same
JP6147368B2 (en) Image encoding device, image decoding device, encoded stream conversion device, image encoding method, and image decoding method
KR20190046704A (en) Method and apparatus for asymmetric sub-block based video encoding/decoding
US20160381381A1 (en) Apparatus for encoding a moving picture
JP5551837B2 (en) Image decoding apparatus, image encoding apparatus, image decoding method, and image encoding method
JPWO2014163200A1 (en) Color image encoding device, color image decoding device, color image encoding method, and color image decoding method
WO2014049981A1 (en) Video encoding device, video decoding device, video encoding method and video decoding method
JP6362370B2 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
JP6373008B2 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
JP6318729B2 (en) Terminal device and data management device
JP6338408B2 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
JP2016046641A (en) Image coding device, image decoding device, image coding method and image decoding method
JP6555856B2 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
WO2014049982A1 (en) Video encoding device, video decoding device, video encoding method and video decoding method
JP6300660B2 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
JP2018166329A (en) Image encoder and image decoder
KR20240082214A (en) Method and Apparatus for Video Coding Using Inter Prediction Based on Template Matching

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161114

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170922

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171003

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180109

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180308

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180508

R150 Certificate of patent or registration of utility model

Ref document number: 6338408

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees