JP7291471B2 - Image encoding device, image decoding device, and program - Google Patents

Image encoding device, image decoding device, and program Download PDF

Info

Publication number
JP7291471B2
JP7291471B2 JP2018207585A JP2018207585A JP7291471B2 JP 7291471 B2 JP7291471 B2 JP 7291471B2 JP 2018207585 A JP2018207585 A JP 2018207585A JP 2018207585 A JP2018207585 A JP 2018207585A JP 7291471 B2 JP7291471 B2 JP 7291471B2
Authority
JP
Japan
Prior art keywords
unit
prediction
image
similarity
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018207585A
Other languages
Japanese (ja)
Other versions
JP2020072458A (en
JP2020072458A5 (en
Inventor
和久 井口
俊輔 岩村
敦郎 市ヶ谷
慎平 根本
菊文 神田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Broadcasting Corp
Original Assignee
Japan Broadcasting 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 Japan Broadcasting Corp filed Critical Japan Broadcasting Corp
Priority to JP2018207585A priority Critical patent/JP7291471B2/en
Publication of JP2020072458A publication Critical patent/JP2020072458A/en
Publication of JP2020072458A5 publication Critical patent/JP2020072458A5/ja
Priority to JP2023092736A priority patent/JP2023101834A/en
Application granted granted Critical
Publication of JP7291471B2 publication Critical patent/JP7291471B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は、画像符号化装置、画像復号装置、及びプログラムに関する。 The present invention relates to an image encoding device, an image decoding device, and a program.

画像をブロック分割して得られた符号化対象ブロックごとに符号化する従来の画像符号化装置は、複数の参照画像を用いて動き補償予測を行い、符号化対象ブロックに対応する予測画像を生成し、当該符号化対象ブロックと予測画像との間の画素単位での差分を表す予測残差に対して直交変換を行って直交変換係数を生成し、当該直交変換係数を量子化し、量子化された直交変換係数に対してエントロピー符号化を行う。 A conventional image coding apparatus that encodes each encoding target block obtained by dividing an image into blocks performs motion compensation prediction using a plurality of reference images to generate a prediction image corresponding to the encoding target block. Then, orthogonal transform is performed on the prediction residual representing the pixel-by-pixel difference between the encoding target block and the predicted image to generate orthogonal transform coefficients, the orthogonal transform coefficients are quantized, and the quantized Entropy coding is performed on the orthogonal transform coefficients.

具体的には、エントロピー符号化は、2次元に配列された直交変換係数を所定のスキャン順で読み出して1次元の直交変換係数列に変換するシリアライズという処理を含む。このシリアライズとは、1次元の直交変換係数列の先頭の直交変換係数から順に符号化する処理をいう。 Specifically, entropy coding includes a process called serialization in which two-dimensionally arranged orthogonal transform coefficients are read out in a predetermined scan order and converted into a one-dimensional orthogonal transform coefficient sequence. This serialization refers to a process of sequentially encoding a one-dimensional orthogonal transform coefficient sequence from the leading orthogonal transform coefficient.

一般的に、画像符号化における直交変換により、直交変換係数は低域にエネルギーが集中し、高域において量子化後のエネルギー(すなわち、量子化直交変換係数の値)がゼロになることが知られている。このため、従来においては、量子化直交変換係数を低域から高域のスキャン順に読み出し、最後の有意係数(非ゼロ係数)に対して終了フラグを付与することにより、有意係数のみを効率的に符号化している(例えば、非特許文献1参照)。 It is generally known that due to orthogonal transform in image coding, the energy of the orthogonal transform coefficients is concentrated in the low frequency range, and the energy after quantization (that is, the value of the quantized orthogonal transform coefficients) becomes zero in the high frequency range. It is For this reason, conventionally, the quantized orthogonal transform coefficients are read out in scanning order from low frequency to high frequency, and an end flag is given to the last significant coefficient (non-zero coefficient), so that only the significant coefficient is efficiently processed. It is encoded (see, for example, Non-Patent Document 1).

Recommendation ITU-T H.265,(12/2016), “High efficiency video coding”, International Telecommunication UnionRecommendation ITU-T H. 265, (12/2016), "High efficiency video coding", International Telecommunications Union

HEVC(非特許文献1参照)では、直交変換処理を行うモードのほか、直交変換処理を行わない変換スキップモードを適用可能である。変換スキップモードを適用する場合、予測残差に対する直交変換を行わないため、低域にエネルギーが集中することを期待できない。 In HEVC (see Non-Patent Document 1), in addition to a mode in which orthogonal transform processing is performed, a transform skip mode in which orthogonal transform processing is not performed can be applied. When the transform skip mode is applied, the prediction residual is not orthogonally transformed, so energy cannot be expected to be concentrated in the low frequency range.

このため、変換スキップモードにおいて、直交変換を行うモードと同じ方法でエントロピー符号化を行うと、効率的なエントロピー符号化を行うことができず、符号化効率が低下してしまう。 For this reason, if entropy coding is performed in the transform skip mode by the same method as in the orthogonal transform mode, efficient entropy coding cannot be performed, resulting in a decrease in coding efficiency.

そこで、本発明は、複数の参照画像を用いて動き補償予測を行う場合において符号化効率を改善可能な画像符号化装置、画像復号装置、及びプログラムを提供することを目的とする。 SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide an image encoding device, an image decoding device, and a program capable of improving encoding efficiency when motion compensation prediction is performed using a plurality of reference images.

第1の特徴に係る画像符号化装置は、入力画像を分割して得られたブロック単位の符号化対象ブロックを符号化する画像符号化装置であって、前記符号化対象ブロックの直交変換処理をスキップする変換スキップモードにおいて、複数の参照画像を用いて動き補償予測を行うことにより、前記符号化対象ブロックに対応する予測画像を生成する動き補償予測部と、前記複数の参照画像間の類似度を画素単位で評価する評価部と、前記符号化対象ブロックと前記予測画像との間の画素単位での差分を表す予測残差を量子化して得られる量子化予測残差又は前記量子化予測残差を逆量子化して得られる復元予測残差と、前記評価部により評価された前記類似度との間の相関を表す相似度を算出し、前記相似度が閾値以上であるかを判定する判定部と、前記判定部により前記相似度が前記閾値以上であると判定された場合に、前記評価部により評価された前記類似度に応じた順に前記量子化予測残差を符号化する符号化部とを備えることを要旨とする。 An image encoding device according to a first feature is an image encoding device that encodes an encoding target block in block units obtained by dividing an input image, wherein the encoding target block is subjected to orthogonal transform processing. A motion compensation prediction unit that generates a prediction image corresponding to the encoding target block by performing motion compensation prediction using a plurality of reference images in a skip transform skip mode, and a similarity between the plurality of reference images. and a quantized prediction residual obtained by quantizing a prediction residual representing a pixel-by-pixel difference between the encoding target block and the predicted image or the quantized prediction residual calculating a degree of similarity representing a correlation between the restored prediction residual obtained by inversely quantizing the difference and the degree of similarity evaluated by the evaluation unit, and determining whether the degree of similarity is greater than or equal to a threshold; and an encoding unit that encodes the quantized prediction residuals in order according to the similarities evaluated by the evaluation unit when the determination unit determines that the similarity is equal to or greater than the threshold. The gist is to provide

第2の特徴に係る画像復号装置は、符号化データからブロック単位の復号対象ブロックを復号する画像復号装置であって、前記復号対象ブロックの逆直交変換処理をスキップする変換スキップモードにおいて、複数の参照画像を用いて動き補償予測を行うことにより、前記復号対象ブロックに対応する予測画像を生成する動き補償予測部と、前記複数の参照画像間の類似度を画素単位で評価する評価部と、前記符号化データを復号して、前記復号対象ブロックと前記予測画像との間の画素単位での差分を表す量子化予測残差を取得する復号部と、前記復号部により取得された前記量子化予測残差又は当該量子化予測残差を逆量子化して得られた復元予測残差と、前記評価部により評価された前記類似度との間の相関を表す相似度を算出し、前記相似度が閾値以上であるかを判定する判定部と、前記判定部により前記相似度が前記閾値以上であると判定された場合に、前記評価部により評価された前記類似度に応じた順に前記量子化予測残差を並び替えて出力する並び替え部とを備えることを要旨とする。 An image decoding device according to a second feature is an image decoding device that decodes a decoding target block in units of blocks from encoded data, wherein in a transform skip mode for skipping inverse orthogonal transform processing of the decoding target block, a plurality of A motion compensation prediction unit that generates a prediction image corresponding to the block to be decoded by performing motion compensation prediction using a reference image, an evaluation unit that evaluates the similarity between the plurality of reference images on a pixel-by-pixel basis; a decoding unit that decodes the encoded data to obtain a quantized prediction residual representing a pixel-by-pixel difference between the decoding target block and the predicted image; and the quantization obtained by the decoding unit. calculating a degree of similarity representing a correlation between a prediction residual or a restored prediction residual obtained by inversely quantizing the quantized prediction residual and the degree of similarity evaluated by the evaluation unit, and calculating the degree of similarity; a determination unit that determines whether the similarity is equal to or greater than the threshold, and the quantization in order according to the similarity evaluated by the evaluation unit when the determination unit determines that the similarity is equal to or greater than the threshold and a rearrangement unit that rearranges and outputs the prediction residuals.

第3の特徴に係るプログラムは、コンピュータを第1の特徴に係る画像符号化装置として機能させることを要旨とする。 A program according to a third feature is summarized to cause a computer to function as the image encoding device according to the first feature.

第4の特徴に係るプログラムは、コンピュータを第2の特徴に係る画像復号装置として機能させることを要旨とする。 A gist of a program according to a fourth feature is to cause a computer to function as the image decoding device according to the second feature.

本発明によれば、複数の参照画像を用いて動き補償予測を行う場合において符号化効率を改善可能な画像符号化装置、画像復号装置、及びプログラムを提供できる。 Advantageous Effects of Invention According to the present invention, it is possible to provide an image encoding device, an image decoding device, and a program capable of improving encoding efficiency when motion compensation prediction is performed using a plurality of reference images.

実施形態に係る画像符号化装置の構成を示す図である。1 is a diagram showing the configuration of an image encoding device according to an embodiment; FIG. 実施形態に係る画像復号装置の構成を示す図である。It is a figure which shows the structure of the image decoding apparatus which concerns on embodiment. 実施形態に係る動き補償予測の一例を示す図である。It is a figure which shows an example of the motion compensation prediction which concerns on embodiment. 実施形態に係る動き補償予測により生成される予測画像の一例を示す図である。It is a figure which shows an example of the prediction image produced|generated by the motion compensation prediction which concerns on embodiment. 実施形態に係る評価部の構成の一例を示す図である。It is a figure which shows an example of a structure of the evaluation part which concerns on embodiment. 実施形態に係るエントロピー符号化部の構成の一例を示す図である。It is a figure which shows an example of a structure of the entropy coding part which concerns on embodiment. 実施形態に係る確度インデックスの生成例を示す図である。It is a figure which shows the example of generation|occurrence|production of the probability index which concerns on embodiment. 実施形態に係る予測残差の並び替えの一例を示す図である。It is a figure which shows an example of rearrangement of the prediction residual which concerns on embodiment. 実施形態に係るエントロピー符号復号部の構成の一例を示す図である。It is a figure which shows an example of a structure of the entropy code decoding part which concerns on embodiment. 実施形態に係る画像符号化装置における処理フローを示す図である。It is a figure which shows the processing flow in the image coding apparatus which concerns on embodiment. 実施形態に係る画像復号装置における処理フローを示す図である。It is a figure which shows the processing flow in the image decoding apparatus which concerns on embodiment. 実施形態の変更例1に係る重複動き補償の一例を示す図である。It is a figure which shows an example of overlapped motion compensation based on the modification 1 of embodiment. 実施形態の変更例3に係る画像符号化装置の構成を示す図である。It is a figure which shows the structure of the image coding apparatus which concerns on the modification 3 of embodiment. 実施形態の変更例3に係る並び替え部の動作の一例を示す図である。It is a figure which shows an example of operation|movement of the rearrangement part which concerns on the modification 3 of embodiment. 実施形態の変更例3に係る画像復号装置の構成を示す図である。It is a figure which shows the structure of the image decoding apparatus based on the modification 3 of embodiment. 実施形態の変更例4に係る並び替え部の動作の一例を示す図である。It is a figure which shows an example of operation|movement of the rearrangement part based on the modification 4 of embodiment.

以下、図面を参照しながら本発明の実施形態に係る画像符号化装置及び画像復号装置について説明する。本発明の実施形態に係る画像符号化装置及び画像復号装置は、MPEG(Moving Picture Experts Group)に代表される動画像の符号化及び復号を行う。なお、図面の記載において、構成が同一又は類似の部分については同一又は類似の符号を付している。 An image encoding device and an image decoding device according to embodiments of the present invention will be described below with reference to the drawings. An image encoding device and an image decoding device according to the embodiments of the present invention encode and decode moving images represented by MPEG (Moving Picture Experts Group). In addition, in the description of the drawings, the same or similar reference numerals are given to the parts having the same or similar configurations.

<1.画像符号化装置の構成>
図1は、実施形態に係る画像符号化装置1Aの構成を示す図である。図1に示すように、画像符号化装置1Aは、ブロック分割部100と、減算部101と、変換部102aと、量子化部102bと、切替部102cと、エントロピー符号化部103Aと、逆量子化部104aと、逆変換部104bと、切替部104cと、合成部105と、イントラ予測部106と、ループフィルタ107と、フレームメモリ108と、動き補償予測部109と、切替部110と、評価部111とを備える。
<1. Configuration of image encoding device>
FIG. 1 is a diagram showing the configuration of an image encoding device 1A according to the embodiment. As shown in FIG. 1, the image coding device 1A includes a block division unit 100, a subtraction unit 101, a transform unit 102a, a quantization unit 102b, a switching unit 102c, an entropy coding unit 103A, an inverse quantization unit transforming unit 104a, inverse transforming unit 104b, switching unit 104c, synthesizing unit 105, intra prediction unit 106, loop filter 107, frame memory 108, motion compensation prediction unit 109, switching unit 110, evaluation and a section 111 .

ブロック分割部100は、フレーム(或いはピクチャ)単位の入力画像をブロック状の小領域に分割し、画像ブロックを減算部101(及び動き補償予測部109)に出力する。画像ブロックのサイズは、例えば32×32画素、16×16画素、8×8画素、又は4×4画素等である。但し、画像ブロックの形状は正方形に限定されるものではなく、長方形や台形や三角形やL字等の形状であってもよい。画像ブロックは、画像符号化装置1Aが符号化を行う単位及び画像復号装置2A(図2参照)が復号を行う単位であり、かかる画像ブロックを符号化対象ブロックという。かかる画像ブロックとは、符号化ユニット(CU:Coding Unit)や符号化ブロック(CB:Coding Block)ともいう。 The block division unit 100 divides an input image in units of frames (or pictures) into block-shaped small regions, and outputs the image blocks to the subtraction unit 101 (and the motion compensation prediction unit 109). The size of an image block is, for example, 32×32 pixels, 16×16 pixels, 8×8 pixels, or 4×4 pixels. However, the shape of the image block is not limited to a square, and may be rectangular, trapezoidal, triangular, or L-shaped. An image block is a unit for encoding by the image encoding device 1A and a unit for decoding by the image decoding device 2A (see FIG. 2), and such an image block is called a block to be encoded. Such an image block is also referred to as a coding unit (CU: Coding Unit) or a coding block (CB: Coding Block).

減算部101は、ブロック分割部100から入力された符号化対象ブロックと、符号化対象ブロックに対応する予測画像(予測画像ブロック)との画素単位の差分を表す予測残差を算出する。具体的には、減算部101は、符号化対象ブロックの各画素値から予測画像の各画素値を減算することにより予測残差を算出し、算出した予測残差を変換部102aに出力する。なお、予測画像は、後述するイントラ予測部106又は動き補償予測部109から切替部110を介して減算部101に入力される。 The subtraction unit 101 calculates a prediction residual representing a pixel-by-pixel difference between the encoding target block input from the block division unit 100 and a predicted image (prediction image block) corresponding to the encoding target block. Specifically, the subtracting unit 101 calculates a prediction residual by subtracting each pixel value of the predicted image from each pixel value of the encoding target block, and outputs the calculated prediction residual to the transforming unit 102a. Note that the predicted image is input to the subtraction unit 101 via the switching unit 110 from the intra prediction unit 106 or the motion compensation prediction unit 109 which will be described later.

変換部102a、量子化部102b、及び切替部103cは、ブロック単位で直交変換処理及び量子化処理を行う変換・量子化部102を構成する。 The transformation unit 102a, the quantization unit 102b, and the switching unit 103c constitute a transformation/quantization unit 102 that performs orthogonal transformation processing and quantization processing on a block basis.

変換部102aは、減算部101から入力された予測残差に対して直交変換することにより周波数成分ごとに直交変換係数を算出し、算出した直交変換係数を量子化部102bに出力する。直交変換には、例えば、離散コサイン変換(DCT:Discrete Cosine Transform)や離散サイン変換(DST:Discrete Sine Transform)、カルーネンレーブ変換(KLT: Karhunen‐Loeve Transform)等を用いてもよい。かかる直交変換により、画素領域の残差信号は周波数領域に変換される。なお、一般的に、直交変換により画素領域の残差信号が低域側にエネルギーが集中する。 Transformation section 102a calculates an orthogonal transformation coefficient for each frequency component by orthogonally transforming the prediction residual input from subtraction section 101, and outputs the computed orthogonal transformation coefficient to quantization section 102b. For the orthogonal transform, for example, a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), or the like may be used. By such orthogonal transform, the residual signal in the pixel domain is transformed into the frequency domain. In general, the energy of the residual signal in the pixel region concentrates on the low frequency side due to the orthogonal transformation.

なお、直交変換の演算に無理数や浮動小数を用いると、符号化装置や復号装置の演算方法や精度により装置間で演算結果に微細な差が生じる場合がある。この差を避けるために、直交変換基底を整数や有理数で模擬した変換を用いても良い。このような変換は直交性を持たない場合があるが、本実施例では直交性を持たない変換についても直交変換の用語を用い、逆変換についても、直交性を持たない逆変換を逆直交変換の用語を用いる。 Note that if irrational numbers or floating point numbers are used for the orthogonal transform calculation, there may be a slight difference in calculation results between devices depending on the calculation methods and accuracy of the encoding devices and decoding devices. In order to avoid this difference, a transform simulating the orthogonal transform basis with integers or rational numbers may be used. Such transforms may not have orthogonality, but in this embodiment, the term orthogonal transform is used for transforms that do not have orthogonality, and inverse transforms that do not have orthogonality are referred to as inverse orthogonal transforms. use the term

切替部102cは、量子化部102bの入力を、変換部102aの出力と、減算部101の出力との間で切替える。通常、切替部102cは変換部102aの出力である直交変換係数を選択し、後述する変換スキップ符号化対象ブロックの場合は減算部101の出力である予測残差を選択する。したがって、変換スキップ符号化対象ブロックの場合は、予測残差と直交変換係数とを同一の信号とみなすことができる。また、変換スキップ符号化対象ブロックの場合は、量子化予測残差と量子化直交変換係数とを同一の信号とみなすことができる。 The switching unit 102 c switches the input of the quantization unit 102 b between the output of the transform unit 102 a and the output of the subtraction unit 101 . Normally, the switching unit 102c selects the orthogonal transform coefficient output from the transform unit 102a, and selects the prediction residual output from the subtraction unit 101 in the case of a transform skip encoding target block, which will be described later. Therefore, in the case of the transform skip encoding target block, the prediction residual and the orthogonal transform coefficient can be regarded as the same signal. In the case of a transform skip encoding target block, the quantized prediction residual and the quantized orthogonal transform coefficients can be regarded as the same signal.

量子化部102bは、変換部102aから切替部102cを介して入力された直交変換係数を量子化パラメータ(Qp)及び量子化行列を用いて量子化し、量子化された直交変換係数(量子化直交変換係数)を生成する。量子化パラメータ(Qp)は、ブロック内の各直交変換係数に対して共通して適用されるパラメータであって、量子化の粗さを定めるパラメータである。量子化行列は、各直交変換係数を量子化する際の量子化値を要素とする行列である。量子化部102bは、生成した量子化直交変換係数をエントロピー符号化部103A及び逆量子化部104aに出力する。 Quantization section 102b quantizes the orthogonal transform coefficients input from transform section 102a through switching section 102c using a quantization parameter (Qp) and a quantization matrix, and converts the quantized orthogonal transform coefficients (quantized orthogonal transform coefficients). A quantization parameter (Qp) is a parameter commonly applied to each orthogonal transform coefficient in a block, and is a parameter that determines coarseness of quantization. A quantization matrix is a matrix whose elements are quantization values when each orthogonal transform coefficient is quantized. The quantization section 102b outputs the generated quantized orthogonal transform coefficients to the entropy coding section 103A and the inverse quantization section 104a.

エントロピー符号化部103Aは、量子化部102bから入力された量子化直交変換係数に対してエントロピー符号化し、かかるエントロピー符号化のデータ圧縮により符号化データ(ビットストリーム)を生成し、符号化データを画像符号化装置1Aの外部に出力する。エントロピー符号化には、ハフマン符号やCABAC(Context-based Adaptive Binary Arithmetic Coding;コンテキスト適応型2値算術符号)等を用いることができる。 The entropy coding unit 103A performs entropy coding on the quantized orthogonal transform coefficients input from the quantization unit 102b, generates coded data (bitstream) by data compression of the entropy coding, and converts the coded data to Output to the outside of the image encoding device 1A. Huffman code, CABAC (Context-based Adaptive Binary Arithmetic Coding), or the like can be used for entropy coding.

エントロピー符号化は、2次元に配列された量子化直交変換係数を所定のスキャン順で読み出して1次元の量子化直交変換係数列に変換するシリアライズという処理を含み、1次元の量子化直交変換係数列の先頭の量子化直交変換係数から順に符号化する。直交変換により低域の周波数にエネルギーが集中し、量子化により高域におけるエネルギー(量子化直交変換係数の値)がゼロに収束することになるため、低域から高域のスキャン順に量子化直交変換係数を読み出し、スキャン順の最後の有意係数に対して終了フラグを付与することにより、有意係数のみを効率的に符号化している。 Entropy coding includes a process called serialization in which the two-dimensionally arranged quantized orthogonal transform coefficients are read out in a predetermined scan order and converted into a one-dimensional quantized orthogonal transform coefficient sequence. The quantized orthogonal transform coefficients are encoded in order from the head of the column. Orthogonal transformation concentrates energy in the low frequency range, and quantization causes the energy in the high frequency range (quantized orthogonal transform coefficient values) to converge to zero. Only the significant coefficients are efficiently coded by reading out the transform coefficients and adding an end flag to the last significant coefficient in the scanning order.

なお、エントロピー符号化部103Aには、イントラ予測部106及び動き補償予測部109から予測に関する情報が入力され、ループフィルタ107からフィルタ処理に関する情報が入力される。エントロピー符号化部103Aは、これらの情報のエントロピー符号化も行う。また、エントロピー符号化部103Aは、符号化対象ブロックに変換スキップモードが適用される場合、当該符号化対象ブロックに変換スキップモードが適用される旨の変換スキップフラグを符号化データに含める。 The entropy coding unit 103A receives information about prediction from the intra prediction unit 106 and the motion compensation prediction unit 109 and receives information about filtering from the loop filter 107 . The entropy coding unit 103A also entropy codes these pieces of information. Further, when the transform skip mode is applied to the encoding target block, the entropy encoding unit 103A includes in the encoded data a transform skip flag indicating that the transform skip mode is applied to the encoding target block.

逆量子化部104a、逆変換部104b、及び切替部104cは、ブロック単位で逆量子化処理及び逆直交変換処理を行う逆量子化・逆変換部104を構成する。 The inverse quantization unit 104a, the inverse transform unit 104b, and the switching unit 104c constitute an inverse quantization/inverse transform unit 104 that performs inverse quantization processing and inverse orthogonal transform processing for each block.

逆量子化部104aは、量子化部102bが行う量子化処理に対応する逆量子化処理を行う。具体的には、逆量子化部104aは、量子化部102bから入力された量子化直交変換係数を、量子化パラメータ(Qp)及び量子化行列を用いて逆量子化することにより、直交変換係数を復元し、復元した直交変換係数(復元直交変換係数)を逆変換部104bに出力する。 The inverse quantization unit 104a performs inverse quantization processing corresponding to the quantization processing performed by the quantization unit 102b. Specifically, the inverse quantization unit 104a inversely quantizes the quantized orthogonal transform coefficients input from the quantization unit 102b using a quantization parameter (Qp) and a quantization matrix, thereby obtaining orthogonal transform coefficients is restored, and the restored orthogonal transform coefficients (restored orthogonal transform coefficients) are output to the inverse transform unit 104b.

切替部104cは、逆量子化・逆変換部104の出力を、逆変換部104bの出力と、逆量子化部104aの出力との間で切替える。通常は逆変換部104bの出力である復元直交変換係数を選択し、後述する変換スキップ符号化対象ブロックの場合は逆量子化部104aの出力である復元予測残差を選択する。したがって、変換スキップ符号化対象ブロックの場合は、復元予測残差と復元直交変換係数とを同一の信号とみなすことができる。また、変換スキップ符号化対象ブロックの場合は、量子化直交変換係数と量子化予測誤差とを同一の信号とみなすことができる。 The switching unit 104c switches the output of the inverse quantization/inverse transform unit 104 between the output of the inverse transform unit 104b and the output of the inverse quantization unit 104a. Normally, the restored orthogonal transform coefficient output from the inverse transform unit 104b is selected, and the restored prediction residual output from the inverse quantization unit 104a is selected in the case of a transform skip encoding target block, which will be described later. Therefore, in the case of a transform skip encoding target block, the reconstructed prediction residual and the reconstructed orthogonal transform coefficient can be regarded as the same signal. In the case of a transform skip encoding target block, the quantized orthogonal transform coefficient and the quantized prediction error can be regarded as the same signal.

逆変換部104bは、変換部102aが行う直交変換処理に対応する逆直交変換処理を行う。例えば、変換部102aが離散コサイン変換を行った場合には、逆変換部104bは逆離散コサイン変換を行う。逆変換部104bは、逆量子化部104aから入力された復元直交変換係数に対して逆直交変換を行って予測残差を復元し、復元した予測残差である復元予測残差を合成部105に出力する。 The inverse transform unit 104b performs inverse orthogonal transform processing corresponding to the orthogonal transform processing performed by the transform unit 102a. For example, when the transform unit 102a performs discrete cosine transform, the inverse transform unit 104b performs inverse discrete cosine transform. The inverse transform unit 104b performs inverse orthogonal transform on the restored orthogonal transform coefficients input from the inverse quantization unit 104a to restore the prediction residuals, and the restored prediction residuals, which are the restored prediction residuals, are synthesized by the synthesis unit 105. output to

合成部105は、逆変換部104bから切替部104cを介して入力された復元予測残差を、切替部110から入力された予測画像と画素単位で合成する。合成部105は、復元予測残差の各画素値と予測画像の各画素値を加算して符号化対象ブロックを再構成し、再構成した符号化対象ブロックである再構成ブロックをイントラ予測部106及びループフィルタ107に出力する。 The synthesizing unit 105 synthesizes the restored prediction residual input from the inverse transform unit 104b via the switching unit 104c with the predicted image input from the switching unit 110 on a pixel-by-pixel basis. Synthesizing section 105 adds each pixel value of the restored prediction residual and each pixel value of the predicted image to reconstruct the encoding target block, and outputs the reconstructed block, which is the reconstructed encoding target block, to intra prediction section 106 . and output to the loop filter 107 .

イントラ予測部106は、合成部105から入力された再構成ブロックを用いてイントラ予測を行ってイントラ予測画像を生成し、イントラ予測画像を切替部110に出力する。また、イントラ予測部106は、選択したイントラ予測モードの情報等をエントロピー符号化部103Aに出力する。 The intra prediction unit 106 performs intra prediction using the reconstructed block input from the synthesis unit 105 to generate an intra prediction image, and outputs the intra prediction image to the switching unit 110 . In addition, the intra prediction unit 106 outputs information about the selected intra prediction mode and the like to the entropy coding unit 103A.

ループフィルタ107は、合成部105から入力された再構成ブロックに対して、後処理としてのフィルタ処理を行い、フィルタ処理後の再構成ブロックをフレームメモリ108に出力する。また、ループフィルタ107は、フィルタ処理に関する情報をエントロピー符号化部103Aに出力する。フィルタ処理には、デブロッキングフィルタ処理とサンプルアダプティブオフセット処理とが含まれる。 Loop filter 107 performs filtering as post-processing on the reconstructed block input from synthesizing section 105 , and outputs the reconstructed block after filtering to frame memory 108 . Loop filter 107 also outputs information about filtering to entropy coding section 103A. Filtering includes deblocking filtering and sample adaptive offsetting.

フレームメモリ108は、ループフィルタ107から入力された再構成ブロックをフレーム単位で復号済み画像として記憶する。 The frame memory 108 stores the reconstructed block input from the loop filter 107 in frame units as a decoded image.

動き補償予測部109は、フレームメモリ108に記憶された1又は複数の再構成ブロック(復号済み画像)を参照画像として用いるインター予測を行う。具体的には、動き補償予測部109は、ブロックマッチングなどの手法により動きベクトルを算出し、動きベクトルに基づいて動き補償予測画像を生成し、動き補償予測画像を切替部110に出力する。また、動き補償予測部109は、動きベクトルに関する情報をエントロピー符号化部103Aに出力する。 The motion compensation prediction unit 109 performs inter prediction using one or a plurality of reconstructed blocks (decoded images) stored in the frame memory 108 as reference images. Specifically, the motion-compensated prediction unit 109 calculates a motion vector by a method such as block matching, generates a motion-compensated predicted image based on the motion vector, and outputs the motion-compensated predicted image to the switching unit 110 . The motion compensation prediction unit 109 also outputs information about motion vectors to the entropy coding unit 103A.

切替部110は、イントラ予測部106から入力されたイントラ予測画像と、動き補償予測部109から入力された動き補償予測画像とを切替え、予測画像を減算部101及び合成部105に出力する。 The switching unit 110 switches between the intra prediction image input from the intra prediction unit 106 and the motion compensation prediction image input from the motion compensation prediction unit 109 and outputs the prediction image to the subtraction unit 101 and synthesis unit 105 .

一方、符号化対象ブロックの直交変換処理をスキップする変換スキップモードにおいて、ブロック分割部100が出力する符号化対象ブロックは、減算部101において予測残差に変換された後、直交変換されずに量子化される。具体的には、切替部102cが減算部101の出力を選択し、減算部101が出力する予測残差は、変換部102aにおける直交変換をスキップして、量子化部102bに入力される。量子化部102bは、直交変換をスキップする符号化対象ブロック(以下、「変換スキップ符号化対象ブロック」という)について予測残差を量子化し、量子化された予測残差である量子化予測残差をエントロピー符号化部103A及び逆量子化部104aに出力する。 On the other hand, in the transform skip mode in which the orthogonal transform processing of the encoding target block is skipped, the encoding target block output by the block division unit 100 is transformed into a prediction residual in the subtraction unit 101, and then is quantized without being orthogonally transformed. become. Specifically, the switching unit 102c selects the output of the subtraction unit 101, and the prediction residual output by the subtraction unit 101 skips the orthogonal transform in the transform unit 102a and is input to the quantization unit 102b. The quantization unit 102b quantizes the prediction residual for the encoding target block that skips the orthogonal transform (hereinafter referred to as the “transform skip encoding target block”), and converts the quantized prediction residual, which is the quantized prediction residual. is output to the entropy coding unit 103A and the inverse quantization unit 104a.

変換スキップ符号化対象ブロックについて、エントロピー符号化部103Aは、量子化部102bから入力された量子化予測残差に対してエントロピー符号化を行い、データ圧縮を行って符号化データ(ビットストリーム)を生成し、符号化データを画像符号化装置1Aの外部に出力する。 For the transform skip encoding target block, the entropy encoding unit 103A performs entropy encoding on the quantized prediction residual input from the quantization unit 102b, performs data compression, and outputs encoded data (bitstream). and outputs the encoded data to the outside of the image encoding device 1A.

変換スキップ符号化対象ブロックについて、逆量子化部104aは、量子化部102bが行う量子化処理に対応する逆量子化処理を行う。変換スキップブロックについて、切替部104cが逆量子化部104aの出力を選択することにより、逆変換部104bは、逆直交変換処理をスキップする。よって、逆量子化部104aが復元した信号はは、逆直交変換処理を経ることなく、復元予測残差として合成部105に入力される。 The inverse quantization unit 104a performs inverse quantization processing corresponding to the quantization processing performed by the quantization unit 102b on the transform skip encoding target block. For the transform skip block, the switching unit 104c selects the output of the inverse quantization unit 104a, so that the inverse transform unit 104b skips the inverse orthogonal transform processing. Therefore, the signal restored by inverse quantization section 104a is input to synthesis section 105 as a restored prediction residual without undergoing inverse orthogonal transform processing.

評価部111は、変換スキップ符号化対象ブロックについて、動き補償予測部109が複数の参照画像を用いて動き補償予測を行う場合において、複数の参照画像間の類似度を画素単位で評価し、評価結果を表すマップ情報をエントロピー符号化部103Aに出力する。エントロピー符号化部103Aは、変換スキップ符号化対象ブロックについて、評価部111から入力されたマップ情報に基づいて、量子化部102bから入力された復元予測残差を並び替えたうえで符号化する。評価部111及びエントロピー符号化部103Aの詳細については後述する。 When the motion compensation prediction unit 109 performs motion compensation prediction using a plurality of reference images for a transform skip encoding target block, the evaluation unit 111 evaluates the similarity between the plurality of reference images on a pixel-by-pixel basis. Map information representing the result is output to entropy coding section 103A. Based on the map information input from the evaluation unit 111, the entropy encoding unit 103A rearranges the restored prediction residual input from the quantization unit 102b and then encodes the target block for transform skip encoding. Details of the evaluation unit 111 and the entropy coding unit 103A will be described later.

<2.画像復号装置の構成>
図2は、実施形態に係る画像復号装置2Aの構成を示す図である。図2に示すように、画像復号装置2Aは、エントロピー符号復号部200Aと、逆量子化部201aと、逆変換部201bと、切替部201cと、合成部202と、イントラ予測部203と、ループフィルタ204と、フレームメモリ205と、動き補償予測部206と、切替部207と、評価部208とを備える。
<2. Configuration of image decoding device>
FIG. 2 is a diagram showing the configuration of the image decoding device 2A according to the embodiment. As shown in FIG. 2, the image decoding device 2A includes an entropy code decoding unit 200A, an inverse quantization unit 201a, an inverse transform unit 201b, a switching unit 201c, a synthesis unit 202, an intra prediction unit 203, a loop It comprises a filter 204 , a frame memory 205 , a motion compensation prediction section 206 , a switching section 207 and an evaluation section 208 .

エントロピー符号復号部200Aは、画像符号化装置1により生成された符号化データを復号し、量子化直交変換係数を逆量子化部201aに出力する。また、エントロピー符号復号部200Aは、符号化データを復号し、予測(イントラ予測及び動き補償予測)に関する情報とフィルタ処理に関する情報とを取得し、予測に関する情報をイントラ予測部203及び動き補償予測部206に出力し、フィルタ処理に関する情報をループフィルタ204に出力する。 The entropy code decoding unit 200A decodes the encoded data generated by the image encoding device 1 and outputs the quantized orthogonal transform coefficients to the inverse quantization unit 201a. Further, the entropy code decoding unit 200A decodes the encoded data, acquires information on prediction (intra prediction and motion compensation prediction) and information on filtering, and transmits information on prediction to the intra prediction unit 203 and the motion compensation prediction unit. 206 and outputs information about filtering to the loop filter 204 .

逆量子化部201a、逆変換部201b、及び切替部201cは、ブロック単位で逆量子化処理及び逆直交変換処理を行う逆量子化・逆変換部201を構成する。 The inverse quantization unit 201a, the inverse transform unit 201b, and the switching unit 201c constitute an inverse quantization/inverse transform unit 201 that performs inverse quantization processing and inverse orthogonal transform processing for each block.

逆量子化部201aは、画像符号化装置1Aの量子化部102bが行う量子化処理に対応する逆量子化処理を行う。逆量子化部201aは、エントロピー符号復号部200Aから入力された量子化直交変換係数を、量子化パラメータ(Qp)及び量子化行列を用いて逆量子化することにより、直交変換係数を復元し、復元した直交変換係数(復元直交変換係数)を逆変換部201bに出力する。 The inverse quantization unit 201a performs inverse quantization processing corresponding to the quantization processing performed by the quantization unit 102b of the image encoding device 1A. The inverse quantization unit 201a restores the orthogonal transform coefficients by inversely quantizing the quantized orthogonal transform coefficients input from the entropy code decoding unit 200A using the quantization parameter (Qp) and the quantization matrix, The restored orthogonal transform coefficients (restored orthogonal transform coefficients) are output to the inverse transform unit 201b.

切替部201cは、逆量子化・逆変換部201の出力を、逆変換部201bの出力と、逆量子化部201aの出力との間で切替える。通常は逆変換部201bの出力を選択し、後述する変換スキップ復号対象ブロックの場合は逆量子化部201aの出力を選択する。これにより、変換スキップ復号対象ブロックの場合は、復元予測残差と復元直交変換係数とを同一の信号とみなすことができ、また、変換スキップ復号対象ブロックの場合は、量子化直交変換係数と量子化予測残差とを同一の信号とみなすことができる。 The switching unit 201c switches the output of the inverse quantization/inverse transform unit 201 between the output of the inverse transform unit 201b and the output of the inverse quantization unit 201a. The output of the inverse transform unit 201b is normally selected, and the output of the inverse quantization unit 201a is selected in the case of a transform skip decoding target block, which will be described later. As a result, in the case of the target block for transform skip decoding, the restored prediction residual and the recovered orthogonal transform coefficients can be regarded as the same signal. can be regarded as the same signal.

逆変換部201bは、画像符号化装置1Aの変換部102aが行う直交変換処理に対応する逆直交変換処理を行う。逆変換部201bは、逆量子化部201aから入力された復元直交変換係数に対して逆直交変換を行って予測残差を復元し、復元した予測残差である復元予測残差を合成部202に出力する。 The inverse transform unit 201b performs inverse orthogonal transform processing corresponding to the orthogonal transform processing performed by the transform unit 102a of the image encoding device 1A. The inverse transform unit 201b performs inverse orthogonal transform on the restored orthogonal transform coefficients input from the inverse quantization unit 201a to restore prediction residuals, and the restored prediction residuals, which are the restored prediction residuals, are synthesized by the synthesis unit 202. output to

合成部202は、逆変換部201bから切替部201cを介して入力された復元予測残差と、切替部207から入力された予測画像とを画素単位で合成することにより、元の対象ブロックを再構成し、再構成ブロックをイントラ予測部203及びループフィルタ204に出力する。 The synthesizing unit 202 synthesizes the restored prediction residual input from the inverse transform unit 201b via the switching unit 201c and the predicted image input from the switching unit 207 on a pixel-by-pixel basis, thereby reproducing the original target block. and outputs the reconstructed block to the intra prediction unit 203 and the loop filter 204 .

イントラ予測部203は、合成部202から入力された再構成ブロックを参照し、エントロピー符号復号部200Aから入力されたイントラ予測情報に基づいてイントラ予測を行うことによりイントラ予測画像を生成し、イントラ予測画像を切替部207に出力する。 The intra prediction unit 203 refers to the reconstructed block input from the synthesizing unit 202 and performs intra prediction based on the intra prediction information input from the entropy code decoding unit 200A to generate an intra prediction image. The image is output to the switching unit 207 .

ループフィルタ204は、エントロピー符号復号部200Aから入力されたフィルタ処理情報に基づいて、合成部202から入力された再構成ブロックに対して、画像符号化装置1Aのループフィルタ107が行うフィルタ処理と同様なフィルタ処理を行い、フィルタ処理後の再構成ブロックをフレームメモリ205に出力する。 The loop filter 204 performs filtering similar to that performed by the loop filter 107 of the image encoding device 1A on the reconstructed block input from the synthesizing unit 202 based on the filtering information input from the entropy code decoding unit 200A. Filter processing is performed, and the reconstructed block after filtering is output to the frame memory 205 .

フレームメモリ205は、ループフィルタ204から入力された再構成ブロックをフレーム単位で記憶し、復号済み画像として画像復号装置2Aの外部に出力する。 The frame memory 205 stores the reconstructed block input from the loop filter 204 in frame units, and outputs it as a decoded image to the outside of the image decoding device 2A.

動き補償予測部206は、フレームメモリ205に記憶された復号済み画像を参照画像として用いて、エントロピー符号復号部200Aから入力された動きベクトル情報に基づいて動き補償予測(インター予測)を行うことにより、動き補償予測画像を生成し、動き補償予測画像を切替部207に出力する。 The motion compensation prediction unit 206 uses the decoded image stored in the frame memory 205 as a reference image to perform motion compensation prediction (inter prediction) based on the motion vector information input from the entropy code decoding unit 200A. , generates a motion-compensated predicted image, and outputs the motion-compensated predicted image to the switching unit 207 .

切替部207は、イントラ予測部203から入力されたイントラ予測画像と、動き補償予測部206から入力された動き補償予測画像とを切替えて、予測画像を合成部202に出力する。 The switching unit 207 switches between the intra prediction image input from the intra prediction unit 203 and the motion compensation prediction image input from the motion compensation prediction unit 206 and outputs the prediction image to the synthesis unit 202 .

一方、変換スキップモードが適用された復号対象ブロック(変換スキップ復号対象ブロック)について、エントロピー符号復号部200Aは、符号化装置1により生成された符号化データを復号し、量子化された予測残差(量子化予測残差)を逆量子化部201aに出力する。 On the other hand, for the decoding target block to which the transform skip mode is applied (transform skip decoding target block), the entropy code decoding unit 200A decodes the encoded data generated by the encoding device 1, and the quantized prediction residual is (Quantized prediction residual) is output to the inverse quantization unit 201a.

変換スキップブロックについて、逆量子化部201aは、画像符号化装置1Aの量子化部102bが行う量子化処理に対応する逆量子化処理を行う。変換スキップブロックについて、切替部201cが逆量子化部201aの出力を選択することにより、逆変換部201bは、逆直交変換処理をスキップする。よって、逆量子化部201aが復元した予測残差(復元予測残差)は、逆直交変換処理を経ることなく合成部202に入力される。 The inverse quantization unit 201a performs inverse quantization processing corresponding to the quantization processing performed by the quantization unit 102b of the image coding device 1A for the transform skip blocks. For the transform skip blocks, the switching unit 201c selects the output of the inverse quantization unit 201a, so that the inverse transform unit 201b skips the inverse orthogonal transform processing. Therefore, the prediction residual (restored prediction residual) restored by the inverse quantization unit 201a is input to the synthesizing unit 202 without undergoing inverse orthogonal transform processing.

評価部208は、画像符号化装置1Aの評価部111と同様な動作を行う。具体的には、評価部208は、変換スキップ復号対象ブロックについて、動き補償予測部206が複数の参照画像を用いて動き補償予測を行う場合において、複数の参照画像間の類似度を画素単位で評価し、評価結果を表すマップ情報をエントロピー符号復号部200Aに出力する。エントロピー符号復号部200Aは、変換スキップ符号化対象ブロックについて、符号化データを復号して量子化予測残差を取得し、評価部208から入力されたマップ情報に基づいて量子化予測残差を元の並び順に並べ替えて出力する。評価部208及びエントロピー符号復号部200Aの詳細については後述する。 The evaluation unit 208 performs the same operation as the evaluation unit 111 of the image encoding device 1A. Specifically, when the motion-compensated prediction unit 206 performs motion-compensated prediction using a plurality of reference images for a transform-skip-decoding target block, the evaluation unit 208 calculates the degree of similarity between the plurality of reference images on a pixel-by-pixel basis. It evaluates and outputs map information representing the evaluation result to the entropy code decoding unit 200A. The entropy code decoding unit 200A decodes the encoded data for the transform skip encoding target block to acquire the quantized prediction residual, and based on the map information input from the evaluation unit 208, the quantized prediction residual Output after rearranging in the order of . Details of the evaluation unit 208 and the entropy code decoding unit 200A will be described later.

<3.動き補償予測>
図3は、動き補償予測の一例を示す図である。図4は、予測画像及び予測残差の一例を示す図である。動き補償予測のシンプルな例として、HEVCで用いられている双予測、特に前方向と後方向予測(両方向予測)を用いる場合について説明する。
<3. Motion compensation prediction>
FIG. 3 is a diagram illustrating an example of motion compensated prediction. FIG. 4 is a diagram illustrating an example of a predicted image and prediction residuals. As a simple example of motion-compensated prediction, a case of using bi-prediction, especially forward and backward prediction (bidirectional prediction) used in HEVC will be described.

図3に示すように、動き補償予測は、符号化対象フレーム(現フレーム)に対して時間的に前及び後のフレームを参照する。図3の例では、現フレームであるtフレーム目の画像中のブロックの動き補償予測を、t-1フレーム目とt+1フレーム目とを参照して行う。動き補償は、t-1及びt+1フレーム目の参照フレーム内から、符号化対象ブロックと類似する箇所(ブロック)をシステムで設定された探索範囲の中から検出する。 As shown in FIG. 3, motion compensated prediction refers to frames temporally before and after the frame being coded (the current frame). In the example of FIG. 3, motion compensated prediction of a block in an image of the tth frame, which is the current frame, is performed with reference to the t−1th frame and the t+1th frame. Motion compensation detects a portion (block) similar to the encoding target block from within a search range set by the system from within the t−1 and t+1 reference frames.

検出された箇所が参照画像である。符号化対象ブロックに対する参照画像の相対位置を表す情報が図中に示す矢印であり、動きベクトルと呼ばれる。動きベクトルの情報は、画像符号化装置1Aにおいて、参照画像のフレーム情報とともにエントロピー符号化によって符号化される。一方、画像復号装置2Aは、画像符号化装置1Aにより生成された動きベクトルの情報に基づいて参照画像を検出する。 The detected location is the reference image. Information representing the relative position of the reference image with respect to the block to be coded is the arrow shown in the drawing, and is called a motion vector. The motion vector information is encoded by entropy encoding together with the frame information of the reference image in the image encoding device 1A. On the other hand, the image decoding device 2A detects a reference image based on the motion vector information generated by the image encoding device 1A.

図3及び図4に示すように、動き補償によって検出された参照画像1及び2は、符号化対象ブロックに対し、参照するフレーム内で位置合わせされた類似する部分画像であるため、符号化対象ブロックに類似した画像となる。図4の例では、符号化対象ブロックは、星の絵柄と部分的な円の絵柄とを含んでいる。参照画像1は、星の絵柄と全体的な円の絵柄とを含んでいる。参照画像2は、星の絵柄を含むが、円の絵柄を含んでいない。 As shown in FIGS. 3 and 4, the reference images 1 and 2 detected by motion compensation are similar partial images aligned within the reference frame to the block to be coded. The image resembles a block. In the example of FIG. 4, the encoding target block includes a star pattern and a partial circle pattern. Reference image 1 includes a star pattern and a general circle pattern. Reference image 2 contains a pattern of stars, but does not contain a pattern of circles.

かかる参照画像1及び2から予測画像を生成する。予測処理は処理負荷の高い処理であるため、参照画像1及び2を平均化することによって予測画像を生成することが一般的である。但し、より高度な処理、例えば、ローパスフィルタやハイパスフィルタ等による信号強調処理を併用して予測画像を生成してもよい。ここで、参照画像1は円の絵柄を含み、参照画像2は円の絵柄を含まないため、参照画像1及び2を平均化して予測画像を生成すると、予測画像における円の絵柄は、参照画像1に比べて信号が半減している。 A predicted image is generated from the reference images 1 and 2 . Since the prediction process is a process with a high processing load, it is common to generate a predicted image by averaging the reference images 1 and 2. FIG. However, a predicted image may be generated by using more advanced processing, for example, signal enhancement processing using a low-pass filter, high-pass filter, or the like. Here, since the reference image 1 includes a circle pattern and the reference image 2 does not include a circle pattern, when the predicted image is generated by averaging the reference images 1 and 2, the circle pattern in the predicted image is the same as that in the reference image The signal is halved compared to 1.

参照画像1及び2から得られた予測画像と符号化対象ブロックとの差分が予測残差である。参照画像1及び2から得られた予測画像と対象画像ブロック(符号化対象画像)との差分が予測残差である。図4に示す予測残差において、丸の絵柄のずれた部分(斜線部)に大きな差分が生じているが、それ以外の部分については精度よく予測が行えており、差分が生じていない。 The difference between the prediction image obtained from the reference images 1 and 2 and the coding target block is the prediction residual. The difference between the predicted image obtained from the reference images 1 and 2 and the target image block (encoding target image) is the prediction residual. In the prediction residual shown in FIG. 4, a large difference occurs in the part where the circle pattern is deviated (hatched part), but the other parts are accurately predicted and no difference occurs.

差分が生じていない星の絵柄の部分は、参照画像1と参照画像2との間の類似度が高い部分であって、高精度な予測が行われた部分である。一方、大きな差分が生じている部分は、各参照画像に特有な部分、すなわち、参照画像1と参照画像2との間の類似度が低い部分である。よって、参照画像1と参照画像2との間の類似度が低い部分、すなわち、予測残差における「領域A」は、予測の精度が低く、大きな予測残差を生じさせるといえる。 The portion of the star pattern in which no difference has occurred is the portion where the degree of similarity between the reference image 1 and the reference image 2 is high, and where highly accurate prediction has been performed. On the other hand, a portion with a large difference is a portion unique to each reference image, that is, a portion with low similarity between reference image 1 and reference image 2 . Therefore, it can be said that the portion where the degree of similarity between the reference image 1 and the reference image 2 is low, that is, the “area A” in the prediction residual has low prediction accuracy and causes a large prediction residual.

そこで、画像符号化装置1Aは、変換スキップモードにおいて、参照画像1と参照画像2との間の類似度が低い部分を予測残差が大きい部分とみなして優先的に符号化する。具体的には、エントロピー符号化部103Aは、参照画像間の類似度の低い画素位置から順に量子化予測残差を符号化することにより有意係数を優先的に符号化し、より早期に終了フラグを付与できるようにする。 Therefore, in the transform skip mode, the image encoding device 1A preferentially encodes a portion with a low degree of similarity between the reference image 1 and the reference image 2 as a portion with a large prediction residual. Specifically, the entropy encoding unit 103A encodes the quantized prediction residuals in order from the pixel position with the lowest similarity between the reference images, thereby preferentially encoding the significant coefficients, and sets the end flag earlier. make it possible to give

一方、予測残差における「領域B」は、参照画像1と参照画像2との間の類似度が高い部分であるが、大きな予測残差を生じている。このため、参照画像1と参照画像2との間の類似度が低い部分である領域Aのみを量子化予測残差が大きい部分とみなして優先的に符号化すると、「領域B」の符号化が後回しとなり、終了フラグの付与が遅れることになる。 On the other hand, "area B" in the prediction residual is a portion with high similarity between the reference image 1 and the reference image 2, but produces a large prediction residual. For this reason, if only the region A, which is a portion with a low degree of similarity between the reference image 1 and the reference image 2, is regarded as a portion with a large quantized prediction residual and preferentially encoded, the coding of the “region B” will be postponed, and the addition of the end flag will be delayed.

特に、HEVCで用いられている従来の変換スキップ符号化対象ブロックの符号化では、対角スキャン(MPEG-2等のジグザグスキャンに類似した、右斜め上方向に行なわれるスキャン方法)で符号化を行う。このため、従来の対角スキャンを用いると、領域Bは早期に符号化が行われ、終了フラグも早期に付与される。つまり、このような場合では、参照画像1と参照画像2との間の類似度が低い部分を予測残差が大きい部分とみなして優先的に符号化するよりも、従来の対角スキャンに従った順に符号化した方が終了フラグの付与が早くなる。 In particular, in the conventional encoding of transform skip encoding target blocks used in HEVC, encoding is performed by diagonal scanning (a scanning method performed diagonally upward to the right, similar to zigzag scanning such as MPEG-2). conduct. Therefore, if the conventional diagonal scan is used, the region B is coded early and the end flag is added early. In other words, in such a case, rather than preferentially encoding a portion with low similarity between reference image 1 and reference image 2 as a portion with a large prediction residual, conventional diagonal scanning is used. If the encoding is performed in the order in which the data are encoded, the end flag will be added sooner.

そこで、実施形態においては、変換スキップモードにおいて、参照画像1と参照画像2との間の画素単位での類似度の分布を表すマップ情報と「量子化された予測残差」である量子化予測残差の分布との相関を求め、相関が低い場合には従来のスキャン順に従って符号化を行い、相関が高い場合にはマップ情報に基づいて類似度が低い部分から順に符号化を行う。これにより、効率的なエントロピー符号化を行うことが可能になり、符号化効率を改善できる。 Therefore, in the embodiment, in the transform skip mode, map information representing the distribution of the degree of similarity in units of pixels between the reference image 1 and the reference image 2 and quantized prediction that is "quantized prediction residual" The correlation with the residual distribution is obtained, and if the correlation is low, the encoding is performed according to the conventional scan order, and if the correlation is high, the encoding is performed in descending order of similarity based on the map information. This enables efficient entropy coding and improves coding efficiency.

以下、参照画像1と参照画像2との間の画素単位での類似度の分布を表すマップ情報と量子化予測残差の分布との相関を求める一例について説明するが、相関を求める際に、量子化予測残差に代えて復元予測残差を用いてもよい。すなわち、参照画像1と参照画像2との間の画素単位での類似度の分布を表すマップ情報と復元予測残差の分布との相関を求めてもよい。 An example of determining the correlation between map information representing the distribution of similarity in pixel units between reference image 1 and reference image 2 and the distribution of quantized prediction residuals will be described below. A reconstructed prediction residual may be used instead of the quantized prediction residual. That is, the correlation between the map information representing the similarity distribution in units of pixels between the reference image 1 and the reference image 2 and the distribution of the restored prediction residuals may be obtained.

<4.評価部>
図5は、画像符号化装置1Aにおける評価部111の構成の一例を示す図である。図5に示すように、評価部111は、差分算出部111aと、正規化部111bとを備える。
<4. Evaluation Department>
FIG. 5 is a diagram showing an example of the configuration of the evaluation section 111 in the image encoding device 1A. As shown in FIG. 5, the evaluation unit 111 includes a difference calculation unit 111a and a normalization unit 111b.

差分算出部111aは、動き補償予測部109から入力された参照画像1及び2の差分値(具体的には、差分値の絶対値。以下同様)を画素単位で算出し、算出した差分値を正規化部111bに出力する。 The difference calculation unit 111a calculates the difference value (specifically, the absolute value of the difference value; the same shall apply hereinafter) between the reference images 1 and 2 input from the motion compensation prediction unit 109 on a pixel-by-pixel basis, and calculates the calculated difference value. Output to the normalization unit 111b.

ここで、差分値が大きいほど類似度が低く、予測の確度が低いといえる。差分値が小さいほど類似度が高く、予測の確度が高いといえる。差分算出部111aは、各参照画像に対してフィルタ処理を行ったうえで差分値を算出してもよい。差分算出部111aは、二乗誤差等の統計量を算出し、かかる統計量を出力してもよい。 Here, it can be said that the larger the difference value, the lower the degree of similarity and the lower the accuracy of prediction. It can be said that the smaller the difference value, the higher the degree of similarity and the higher the accuracy of prediction. The difference calculation unit 111a may calculate the difference value after performing filter processing on each reference image. The difference calculator 111a may calculate a statistic such as a squared error and output the statistic.

正規化部111bは、差分算出部111aから入力された画素単位での差分値を、符号化対象ブロック内で最大となる差分値(すなわち、符号化対象ブロック内の差分値の最大値)で正規化して出力する。正規化部111bは、量子化の粗さを定める量子化パラメータ(Qp)と、直交変換係数ごとに異なる量子化値が適用される量子化行列との少なくとも一方に基づいて、正規化部111bから入力された差分値を調整して出力してもよい。 The normalization unit 111b normalizes the pixel-by-pixel difference value input from the difference calculation unit 111a by the maximum difference value in the encoding target block (that is, the maximum difference value in the encoding target block). and output. Based on at least one of a quantization parameter (Qp) that determines the coarseness of quantization and a quantization matrix to which a different quantization value is applied for each orthogonal transform coefficient, the normalization unit 111b outputs The input difference value may be adjusted and output.

評価部111は、符号化対象ブロック内の画素単位での確度Rijを例えば下記の式(1)のように算出する。 The evaluation unit 111 calculates the accuracy Rij for each pixel in the encoding target block, for example, as shown in Equation (1) below.

Rij=1-(abs(Xij-Yij)/maxD×Scale(Qp)) ・・・(1)
但し、Xijは参照画像1の画素位置ijの画素値であり、Yijは参照画像2の画素位置ijの画素値であり、absは絶対値を得る関数である。
Rij=1−(abs(Xij−Yij)/maxD×Scale(Qp)) (1)
However, Xij is the pixel value at pixel position ij in reference image 1, Yij is the pixel value at pixel position ij in reference image 2, and abs is a function for obtaining an absolute value.

また、式(1)において、maxDは、符号化対象ブロック内の差分値abs(Xij-Yij)の最大値である。maxDを求めるために符号化対象ブロック内のすべての画素位置について差分値を求める必要があるが、この処理を省略するためにすでに符号化処理済みの隣接するブロックの最大値で代用してもよい。或いは、量子化パラメータ(Qp)や量子化行列の量子化値と、maxDとの対応関係を定めるテーブルを用いて、量子化パラメータ(Qp)や量子化行列の量子化値からmaxDを求めてもよい。或いは、予め仕様で規定された固定値をmaxDとして用いてもよい。 Also, in equation (1), maxD is the maximum value of the difference values abs(Xij−Yij) in the encoding target block. In order to obtain maxD, it is necessary to obtain difference values for all pixel positions in the block to be coded, but in order to omit this process, the maximum value of adjacent blocks that have already been coded may be substituted. . Alternatively, maxD can be obtained from the quantization parameter (Qp) or the quantization value of the quantization matrix using a table that defines the correspondence between the quantization parameter (Qp) or the quantization value of the quantization matrix and maxD. good. Alternatively, a fixed value defined in advance by specifications may be used as maxD.

また、式(1)において、Scale(Qp)は、量子化パラメータ(Qp)や量子化行列の量子化値に応じて乗じられる係数である。Scale(Qp)は、Qpや量子化行列の量子化値が大きい場合に1.0に近づき、小さい場合に0に近づくように設計され、その度合いはシステムによって調整するものとする。或いは、予め仕様で規定された固定値をScale(Qp)として用いてもよい。 In equation (1), Scale(Qp) is a coefficient that is multiplied according to the quantization parameter (Qp) and the quantization value of the quantization matrix. Scale(Qp) is designed so that it approaches 1.0 when Qp or the quantization value of the quantization matrix is large, and approaches 0 when it is small, and its degree is adjusted by the system. Alternatively, a fixed value defined in advance by specifications may be used as Scale (Qp).

なお、maxDやScale(Qp)として固定値等の代用値を用いる場合には、確度Rijが1.0を超える、あるいは0を下回る場合も存在しうるが、その場合は、1.0や0にクリップ処理すればよい。 In addition, when a substitute value such as a fixed value is used as maxD or Scale (Qp), there may be cases where the accuracy Rij exceeds 1.0 or is less than 0. In that case, 1.0 or 0 clip processing to .

評価部111は、符号化対象ブロック内の各画素位置ijの確度Rijからなるマップ情報をエントロピー符号化部103Aに出力する。 The evaluation unit 111 outputs map information including the accuracy Rij of each pixel position ij in the encoding target block to the entropy encoding unit 103A.

但し、評価部111は、変換スキップ符号化対象ブロックについて、複数の参照画像を用いる動き補償予測を適用する場合にのみ評価(確度Rijの算出)を行い、それ以外のモード、例えば単方向予測やイントラ予測処理においては、評価(確度Rijの算出)を行わなくてもよい。 However, the evaluation unit 111 performs evaluation (calculation of the accuracy Rij) only when motion-compensated prediction using a plurality of reference images is applied to the transform-skip coding target block, and other modes such as unidirectional prediction and In intra-prediction processing, evaluation (calculation of accuracy Rij) may not be performed.

なお、画像復号装置2Aにおける評価部208は、画像符号化装置1Aにおける評価部111と同様に構成される。具体的には、画像復号装置2Aにおける評価部208は、差分算出部208aと、正規化部208bとを備える。画像復号装置2Aにおける評価部208は、符号化対象ブロック内の各画素位置ijの確度Rijからなるマップ情報をエントロピー符号復号部200Aに出力する。 Note that the evaluation unit 208 in the image decoding device 2A is configured similarly to the evaluation unit 111 in the image encoding device 1A. Specifically, the evaluation unit 208 in the image decoding device 2A includes a difference calculation unit 208a and a normalization unit 208b. The evaluation unit 208 in the image decoding device 2A outputs map information including the accuracy Rij of each pixel position ij in the encoding target block to the entropy coding/decoding unit 200A.

<5.エントロピー符号化部>
図6は、エントロピー符号化部103Aの構成の一例を示す図である。図7は、確度インデックスの生成例を示す図である。図8は、量子化予測残差の並び替えの一例を示す図である。
<5. Entropy Encoding Unit>
FIG. 6 is a diagram showing an example of the configuration of entropy coding section 103A. FIG. 7 is a diagram illustrating an example of generating a probability index. FIG. 8 is a diagram illustrating an example of rearrangement of quantized prediction residuals.

図6に示すように、エントロピー符号化部103Aは、ソート部103aと、予測残差並び替え部103bと、シリアライズ部103cと、確度並び替え部103dと、判定部103eと、切替部103fと、符号化部103gとを備える。 As shown in FIG. 6, the entropy coding unit 103A includes a sorting unit 103a, a prediction residual rearrangement unit 103b, a serialization unit 103c, a probability rearrangement unit 103d, a determination unit 103e, a switching unit 103f, and an encoding unit 103g.

ソート部103aは、評価部111から入力されたマップ情報中の確度Rijを低い順に並べ替える。具体的には、図7(A)に示すように、マップ情報において確度Rijは2次元に配列されているため、ソート部103aは、例えばマップ情報をジグザグスキャン(左上から右下のスキャン順)によりシリアライズして確度列とする。そして、ソート部103aは、図7(B)に示すように、確度Rijが低い順に並び替え、確度Rijをインデックスiとして、インデックスiと画素位置(X座標の位置及びY座標の位置)とを対応付けた確度インデックス情報を予測残差並び替え部103b及び確度並び替え部103dに出力する。 The sorting unit 103a sorts the accuracies Rij in the map information input from the evaluating unit 111 in ascending order. Specifically, as shown in FIG. 7A, the accuracy Rij is arranged two-dimensionally in the map information. is serialized by and set as a probability sequence. Then, as shown in FIG. 7B, the sorting unit 103a sorts the accuracy Rij in descending order, and uses the accuracy Rij as an index i to convert the index i and the pixel position (the X coordinate position and the Y coordinate position). The associated probability index information is output to the prediction residual rearrangement unit 103b and the probability rearrangement unit 103d.

なお、図7(A)の例において、画素位置(x,y)=(2,2)における確度が最も低く、画素位置(x,y)=(2,3)における確度が2番目に低く、画素位置(x,y)=(3,2)における確度が3番目に低く、画素位置(x,y)=(3,3)における確度が4番目に低い。かかる画素位置からなる領域は、予測精度が低く、大きな予測残差を発生させると推定できる。一方、確度が1である画素位置については、予測精度が高く、予測残差を発生させないと推定できる。 In the example of FIG. 7A, the accuracy at pixel position (x, y)=(2, 2) is the lowest, and the accuracy at pixel position (x, y)=(2, 3) is the second lowest. , pixel position (x,y)=(3,2) has the third lowest probability, and pixel position (x,y)=(3,3) has the fourth lowest probability. It can be estimated that a region composed of such pixel positions has low prediction accuracy and generates a large prediction residual. On the other hand, it can be estimated that a pixel position with a certainty of 1 has high prediction accuracy and does not generate a prediction residual.

予測残差並び替え部103bは、変換スキップブロックについて、量子化部102bから入力された量子化予測残差を、ソート部103aから入力された確度インデックス情報に基づいて並び替える。具体的には、予測残差並び替え部103bは、確度の低い画素位置(すなわち、参照画像間の類似度の低い画素位置)から順に量子化予測残差が符号化されるように、量子化予測残差を画素単位で並び替える。 The prediction residual rearrangement unit 103b rearranges the quantized prediction residuals input from the quantization unit 102b for the transform skip blocks based on the probability index information input from the sorting unit 103a. Specifically, the prediction residual rearrangement unit 103b performs quantization so that the quantized prediction residuals are encoded in order from pixel positions with low accuracy (that is, pixel positions with low similarity between reference images). Sort the prediction residuals pixel by pixel.

図8(A)に示す量子化予測残差は2次元に配列されており、予測残差並び替え部103bは、図8(B)に示すように、ソート部103aから入力された確度インデックス情報に基づいて、確度が低い画素位置の量子化予測残差を左上領域に集中させるように並び替える。ここではスキャン順としてジグザグスキャンを想定しており、予測残差並び替え部103bは、左上領域から右下領域の順にスキャンを行い、確度が低い画素位置の量子化予測残差を優先的にシリアライズして、確度が低い(すなわち、参照画像間の類似度が低い)順に量子化予測残差が並ぶ量子化予測残差列を切替部103f及び判定部103eに出力する。但し、スキャン順はジグザグスキャンに限定されず、水平スキャンや垂直スキャンを用いてもよい。予測残差並び替え部103bは、スキャンを行う前に並び替えを行うのではなく、スキャンを行った後に並び替えを行ってもよい。 The quantized prediction residuals shown in FIG. 8A are arranged two-dimensionally, and the prediction residual rearrangement unit 103b, as shown in FIG. is rearranged so that the quantized prediction residuals of pixel positions with low accuracy are concentrated in the upper left region. Here, zigzag scanning is assumed as the scanning order, and the prediction residual rearrangement unit 103b scans in order from the upper left region to the lower right region, and preferentially serializes the quantized prediction residuals at pixel positions with low accuracy. Then, a quantized prediction residual sequence in which quantized prediction residuals are arranged in descending order of accuracy (that is, the similarity between reference images is low) is output to the switching unit 103f and the determination unit 103e. However, the scanning order is not limited to zigzag scanning, and horizontal scanning or vertical scanning may be used. The prediction residual rearrangement unit 103b may rearrange after scanning instead of rearranging before scanning.

或いは、予測残差並び替え部103bは、ジグザグスキャンや、水平スキャン、垂直スキャン等の固定的なスキャン順に代えて、確度が低い画素位置から順に量子化予測残差をスキャンするように可変のスキャン順を決定し、決定したスキャン順でスキャンを行うことにより、確度が低い順に量子化予測残差が並ぶ量子化予測残差列を切替部103f及び判定部103eに出力してもよい。 Alternatively, instead of a fixed scanning order such as zigzag scanning, horizontal scanning, or vertical scanning, the prediction residual rearrangement unit 103b performs variable scanning so that quantized prediction residuals are scanned in order from pixel positions with low accuracy. By determining the order and scanning in the determined scan order, a quantized prediction residual sequence in which quantized prediction residuals are arranged in descending order of accuracy may be output to the switching unit 103f and the determination unit 103e.

シリアライズ部103cは、量子化部102bから入力された量子化予測残差に対して、従来の変換スキップブロックに対する処理と同じシリアライズ処理を行う。すなわち、シリアライズ部103cは、2次元の量子化予測残差を予め規定された順(対角スキャンや、ジグザグスキャンなど)で1次元の量子化予測残差列に変換し、量子化予測残差列を切替部103fに出力する。 The serialization unit 103c performs the same serialization processing as that for conventional transform skip blocks on the quantized prediction residual input from the quantization unit 102b. That is, the serialization unit 103c converts the two-dimensional quantized prediction residual into a one-dimensional quantized prediction residual in a predetermined order (diagonal scan, zigzag scan, etc.), The column is output to the switching unit 103f.

確度並び替え部103dは、ソート部103aから入力された確度インデックス情報に基づいて、予測残差並び替え部103bと同様な方法で、評価部111から入力されたマップ情報を1次元に並び替える。具体的には、確度並び替え部103dは、確度の低い画素位置(すなわち、参照画像間の類似度の低い画素位置)から順にマップ情報を一次元の信号として出力する。この出力信号を、ここでは「確度列」と呼ぶ。確度並び替え部103dは、かかる確度列を判定部103eに出力する。 The probability rearrangement unit 103d one-dimensionally rearranges the map information input from the evaluation unit 111 in the same manner as the prediction residual rearrangement unit 103b, based on the probability index information input from the sort unit 103a. Specifically, the accuracy sorting unit 103d outputs map information as a one-dimensional signal in order from pixel positions with low accuracy (that is, pixel positions with low similarity between reference images). This output signal is referred to herein as the "probability column". The probability rearrangement unit 103d outputs the probability sequence to the determination unit 103e.

判定部103eは、確度並び替え部103dから入力された確度列と、予測残差予測残差並び替え部103bから入力された量子化予測残差列の絶対値とから、確度列と量子化予測残差列との間の相関を表す相似度を求め、相似度が閾値Th以上(あるいは、より大きい場合)は、マップ情報に基づく並び替えの適用を示す信号を切替部103fに出力し、相似度が閾値Th未満(あるいは以下)の場合は、マップ情報に基づく並び替えの不適用を示す信号を切替部103fに出力する。 The determination unit 103e determines the accuracy sequence and the quantization prediction from the accuracy sequence input from the accuracy rearrangement unit 103d and the absolute values of the quantized prediction residual sequence input from the prediction residual prediction residual rearrangement unit 103b. The degree of similarity representing the correlation between the residual sequence is obtained, and if the degree of similarity is equal to or greater than the threshold Th (or greater), a signal indicating application of sorting based on the map information is output to the switching unit 103f. If the degree is less than (or less than) the threshold Th, a signal indicating non-application of rearrangement based on the map information is output to the switching unit 103f.

ここで、確度列及び量子化予測残差列から求める相似度の例1乃至3を以下に示す。以下では、変換スキップブロックの画素数をN、確度列をpi、確度列を逆順に並べた数列(逆順確度列)をqi(すなわち、qi=pN-1-i)、量子化予測残差列をdi、求める相似度をRとして説明する。iはインデックスであり、の範囲を取る。 Examples 1 to 3 of similarities obtained from the accuracy sequence and the quantized prediction residual sequence are shown below. In the following, N is the number of pixels in the transform skip block, p i is the accuracy sequence, q i is the sequence obtained by arranging the accuracy sequence in reverse order (reverse order accuracy sequence) (that is, q i =p N-1-i ), and quantization Let d i be the prediction residual sequence and R be the degree of similarity to be obtained. i is an index and takes the range of .

(1)判定部103eで用いる相似度の例1
相似度として、逆順確度列と、量子化予測残差列の絶対値とのコサイン類似度を用いた例を示す。
(1) Example 1 of similarity used in determination unit 103e
An example using the cosine similarity between the reverse order accuracy sequence and the absolute value of the quantized prediction residual sequence as the similarity is shown.

Figure 0007291471000001
Figure 0007291471000001

(2)判定部103eで用いる相似度の例2
別の例として、L2距離を用いた相似度の例を示す。
(2) Example 2 of degree of similarity used in determination unit 103e
As another example, an example of similarity using the L2 distance is shown.

Figure 0007291471000002
Figure 0007291471000002

ここで、Qiはqiを0~1の範囲に正規化した確度列である(0が最も確度が低く、1が最も確度が高い)。確度の正規化は、評価部111における正規化と同様である。なお、確度列がもともと正規化されていた場合はQi=qiとなる。また、Diは、量子化予測残差列の絶対値を0~1の範囲に正規化した数列である。対象とする画像フォーマットの取り得る最大の画素値をminL、最小値をmaxLとしたとき、Diは、例えば、 where Q i is the probability sequence normalized from 0 to 1 (where 0 is the lowest probability and 1 is the highest probability). The normalization of accuracy is the same as the normalization in the evaluation unit 111 . Note that Q i =q i if the probability sequence was originally normalized. D i is a sequence obtained by normalizing the absolute values of the quantized prediction residual sequence to a range of 0-1. When the maximum possible pixel value of the target image format is minL and the minimum value is maxL, D i is, for example,

Figure 0007291471000003
Figure 0007291471000003

として求めることができる。 can be obtained as

(3)判定部103eで用いる相似度の例3
さらに別の例としてL1距離を用いた相似度の例を示す。
(3) Example 3 of similarity used in determination unit 103e
As another example, an example of similarity using the L1 distance will be shown.

Figure 0007291471000004
Figure 0007291471000004

このように相似度としては、2つの数列の間で計算可能なさまざまな類似度や距離を用いることができる。類似度(2つの数列が似ているほど値が大きい指標)の場合は正規化した値を相似度として用いればよく、距離(2つの数列が似ているほど値が小さくなる指標)の場合は正規化した距離を1から減算した値を相似度として用いればよい。 In this way, as similarity, various degrees of similarity and distances that can be calculated between two sequences can be used. In the case of similarity (an index with a larger value as the two sequences are similar), a normalized value can be used as the similarity, and in the case of distance (an index with a smaller value as the two sequences are more similar) A value obtained by subtracting the normalized distance from 1 may be used as the degree of similarity.

なお、相似度と比較する閾値Thは、あらかじめ定めた定数であってもよいし、可変の値であってもよい。可変の値とする場合、符号化データに当該閾値を含めて伝送してもよい。 Note that the threshold Th to be compared with the degree of similarity may be a predetermined constant or a variable value. When a variable value is used, the encoded data may be transmitted including the threshold value.

切替部103fは、判定部103eから入力された信号に基づき、マップ情報に基づく並び替え適用の場合は、予測残差並び替え部103bの出力を符号化部103gに送り、マップ情報に基づく並び替え不適用の場合は、シリアライズ部103cの出力を符号化部103gに送る。なお、マップ情報に基づく並び替え不適用の場合は従来と同じ変換スキップによる符号化対象ブロックの処理になる。 Based on the signal input from the determination unit 103e, the switching unit 103f sends the output of the prediction residual rearrangement unit 103b to the encoding unit 103g when rearrangement based on map information is applied, and performs rearrangement based on the map information. If not applicable, the output of the serialization unit 103c is sent to the encoding unit 103g. Note that when the rearrangement based on the map information is not applied, the encoding target block is processed by the same transform skip as in the conventional art.

符号化部103gは、切替部103fから入力された予測残差列中の量子化予測残差を符号化して符号化データを出力する。符号化部103gは、予測残差並び替え部103bから入力された量子化予測残差列に含まれる最後の有意係数を判定し、量子化予測残差列の先頭から当該最後の有意係数までに対して符号化を行う。符号化部103gは、予測残差並び替え部103bから入力された量子化予測残差列の先頭から順に有意係数であるか否かを判定し、最後の有意係数に対して終了フラグを付与し、終了フラグの後の量子化予測残差(すなわち、ゼロ係数)を符号化しないことにより、有意係数を効率的に符号化する。 The coding unit 103g codes the quantized prediction residual in the prediction residual sequence input from the switching unit 103f and outputs coded data. The encoding unit 103g determines the last significant coefficient included in the quantized prediction residual sequence input from the prediction residual rearrangement unit 103b, and determines the last significant coefficient from the beginning of the quantized prediction residual sequence to the last significant coefficient. encoding. The encoding unit 103g sequentially determines whether or not the quantized prediction residual sequence input from the prediction residual rearrangement unit 103b is a significant coefficient from the beginning, and assigns an end flag to the last significant coefficient. , efficiently encode the significant coefficients by not encoding the quantized prediction residuals (ie, zero coefficients) after the end flag.

例えば、符号化部103gは、図8(C)に示すように、切替部103fから入力された量子化予測残差列のうち、最後の有意係数、すなわち、図8(B)の(X=1,Y=2)の座標位置を、last_sig_coeff_x及びy(終了フラグ)として符号化する。その後、符号化部103gは、最後の有意係数の位置(1,2)から、スキャン順の逆順、すなわち、(3,3)から(0,0)に向かう順に、有意係数が存在するか否かをsig_coeff_flagとして符号化する。sig_coeff_flagにおいて、有意係数が存在する座標位置を“1”で示し、有意係数が存在しない座標位置を“0”で示す。 For example, the encoding unit 103g, as shown in FIG. 8C, of the quantized prediction residual sequence input from the switching unit 103f, the last significant coefficient, that is, (X= 1, Y=2) is encoded as last_sig_coeff_x and y (end flag). After that, the encoding unit 103g determines whether or not significant coefficients exist in reverse scan order, that is, in order from (3, 3) to (0, 0), starting from the position (1, 2) of the last significant coefficient. or as sig_coeff_flag. In sig_coeff_flag, "1" indicates a coordinate position where a significant coefficient exists, and "0" indicates a coordinate position where no significant coefficient exists.

さらに、符号化部103gは、有意係数が1よりも大きいか否かをcoeff_abs_level_greater1_flagとして符号化し、有意係数が2よりも大きいか否かをcoeff_abs_level_greater2_flagとして符号化する。符号化部103gは、有意係数のうち2よりも大きいものについては、有意係数の絶対値から3を引いた値をcoeff_abs_level_remainingとして符号化するとともに、有意係数の正負を表すフラグをcoeff_sign_flagとして符号化する。 Furthermore, the encoding unit 103g encodes whether the significant coefficient is greater than 1 as coeff_abs_level_greater1_flag, and encodes whether the significant coefficient is greater than 2 as coeff_abs_level_greater2_flag. For significant coefficients greater than 2, the encoding unit 103g encodes a value obtained by subtracting 3 from the absolute value of the significant coefficient as coeff_abs_level_remaining, and encodes a flag indicating whether the significant coefficient is positive or negative as coeff_sign_flag. .

かかるエントロピー符号化により、最後の有意係数の位置が右下領域(スキャン順の後ろ)になればなるほど、last_sig_coeff_x及びyの値は大きくなり、かつ、Sig_coeff_flagの量が増大する。そして、かかるエントロピー符号化により発生情報量は増大することになる。 With such entropy encoding, the lower right region (later in the scan order) the position of the last significant coefficient is, the larger the values of last_sig_coeff_x and y and the larger the amount of Sig_coeff_flag. Such entropy coding increases the amount of generated information.

マップ情報に基づく並び替えを適用する場合には、確度の低い画素位置(すなわち、参照画像間の類似度の低い画素位置)から順に量子化予測残差が符号化されるように並び替えを行うため、Last_sig_coeff_x及びyの値が小さくなり、かつ、Sig_coeff_flagの量が減少する。これにより、エントロピー符号化による発生情報量を減少させることができる。 When sorting based on map information is applied, sorting is performed so that quantized prediction residuals are encoded in order from pixel positions with low accuracy (that is, pixel positions with low similarity between reference images). Therefore, the values of Last_sig_coeff_x and y are reduced and the amount of Sig_coeff_flag is reduced. As a result, the amount of information generated by entropy coding can be reduced.

さらに、図4に示す例のように、複数の参照画像間の類似度の低い画素位置は大きな予測残差を有するという仮定が成立しないような場合であって、上記の相似度が閾値Th未満である場合には、マップ情報に基づく並び替えを不適用とする。つまり、量子化予測残差を従来の対角スキャンに従った順に符号化する。これにより、マップ情報に基づく並び替えを適用することによる符号化効率の悪化を回避できる。 Furthermore, as in the example shown in FIG. 4, the assumption that pixel positions with low similarity between a plurality of reference images have large prediction residuals does not hold, and the similarity is less than the threshold Th. , the sorting based on the map information is not applied. That is, the quantized prediction residuals are encoded in order according to conventional diagonal scanning. This makes it possible to avoid deterioration of coding efficiency due to applying rearrangement based on map information.

<6.エントロピー符号復号部>
図9は、エントロピー符号復号部200Aの構成の一例を示す図である。図9に示すように、エントロピー符号復号部200Aは、復号部200aと、ソート部200bと、予測残差予測残差並び替え部200cと、デシリアライズ部200dと、確度並び替え部200eと、判定部200fと、切替部200gとを備える。
<6. Entropy Coding/Decoding Unit>
FIG. 9 is a diagram showing an example of the configuration of the entropy code decoding unit 200A. As shown in FIG. 9, the entropy code decoding unit 200A includes a decoding unit 200a, a sorting unit 200b, a prediction residual prediction residual rearranging unit 200c, a deserializing unit 200d, a probability rearranging unit 200e, and a determination It includes a section 200f and a switching section 200g.

復号部200aは、画像符号化装置1Aにより生成された符号化データを復号し、量子化予測残差列(量子化された予測残差)と、予測(イントラ予測及び動き補償予測)に関する情報とを取得し、量子化予測残差列を予測残差並び替え部200c及びデシリアライズ部200dに出力し、予測に関する情報をイントラ予測部203及び動き補償予測部206に出力する。復号部200aは、符号化データから取得された変換スキップフラグが変換スキップの適用を示しており、予測に関する情報が双予測を表している場合には、マップ情報に基づく並び替えを行うと判断してもよい。これにより、マップ情報に基づく並び替えを行う旨のフラグを符号化データに含めて伝送する必要がなく、フラグの増大を抑制できる。 The decoding unit 200a decodes the encoded data generated by the image encoding device 1A, and generates a quantized prediction residual sequence (quantized prediction residual), information on prediction (intra prediction and motion compensation prediction), and , outputs the quantized prediction residual sequence to the prediction residual rearrangement unit 200 c and the deserialization unit 200 d, and outputs information about prediction to the intra prediction unit 203 and the motion compensation prediction unit 206 . When the transform skip flag obtained from the encoded data indicates application of transform skip and the information on prediction indicates bi-prediction, the decoding unit 200a determines to perform rearrangement based on the map information. may As a result, there is no need to include in the encoded data a flag indicating that the rearrangement is to be performed based on the map information, and it is possible to suppress an increase in the number of flags.

ソート部200bは、評価部208から入力されたマップ情報中の確度Rijを低い順に並べ替える。マップ情報において確度Rijは2次元に配列されているため、ソート部200bは、例えばマップ情報をジグザグスキャンによりシリアライズして確度列とする。そして、ソート部200bは、確度Rijが低い順に並び替え、確度Rijをインデックスiとして、インデックスiと画素位置(X座標の位置及びY座標の位置)とを対応付けた確度インデックス情報を予測残差並び替え部200c及び確度並び替え部200eに出力する。 The sorting unit 200b sorts the accuracies Rij in the map information input from the evaluating unit 208 in ascending order. Since the accuracies Rij are arranged two-dimensionally in the map information, the sorting unit 200b serializes the map information by, for example, zigzag scanning to form an accuracy sequence. Then, the sorting unit 200b sorts the accuracy Rij in descending order, sets the accuracy Rij as an index i, and converts the accuracy index information that associates the index i with the pixel position (X-coordinate position and Y-coordinate position) to the prediction residual. Output to the rearrangement section 200c and the probability rearrangement section 200e.

予測残差並び替え部200cは、画像符号化装置1Aの予測残差並び替え部103bが行う並び替え処理の逆処理を行う。予測残差並び替え部200cは、変換スキップ復号対象ブロックについて、復号部200aから入力された量子化予測残差列を、ソート部200bから入力された確度インデックス情報に基づいて並び替えることによりデシリアライズし、2次元に配列された量子化予測残差を切替部200gに出力する。 The prediction residual rearrangement unit 200c reverses the rearrangement processing performed by the prediction residual rearrangement unit 103b of the image encoding device 1A. The prediction residual rearrangement unit 200c deserializes the quantized prediction residual sequence input from the decoding unit 200a for the transform skip decoding target block by rearranging it based on the probability index information input from the sorting unit 200b. and outputs the two-dimensionally arranged quantized prediction residuals to the switching unit 200g.

デシリアライズ部200dは、従来の変換スキップブロックに対する処理と同じデシリアライズ処理を行う。すなわち、デシリアライズ部200dは、量子化予測残差列をあらかじめ定められた順(例えば左上から右下へのジグザグスキャン)で2次元の量子化予測残差に並び替える。 The deserialization unit 200d performs the same deserialization processing as the conventional processing for the conversion skip blocks. That is, the deserialization unit 200d rearranges the quantized prediction residual sequence into two-dimensional quantized prediction residuals in a predetermined order (for example, zigzag scanning from upper left to lower right).

確度並び替え部200eは、評価部208から入力されたマップ情報に基づいて、画像符号化装置1の確度並び替え部103dと同じ処理を行い、確度列を判定部200fに出力する。 Based on the map information input from the evaluation unit 208, the probability rearrangement unit 200e performs the same processing as the probability rearrangement unit 103d of the image encoding device 1, and outputs the probability sequence to the determination unit 200f.

判定部200fは、画像符号化装置1の判定部103eと同じ処理を行う。 The determination unit 200 f performs the same processing as the determination unit 103 e of the image encoding device 1 .

切替部200gは、判定部200fがマップ情報に基づく並び替えの適用を示す信号を出力した場合は、並び替え部200cの出力を選択し、判定部200fがマップ情報に基づく並び替えの不適用を示す信号を出力した場合は、デシリアライズ部200dの出力を選択する。切替部200gは、選択した出力(2次元の量子化予測残差)を逆量子化部201aに出力する。 The switching unit 200g selects the output of the rearrangement unit 200c when the determination unit 200f outputs a signal indicating the application of the rearrangement based on the map information, and the determination unit 200f selects the non-application of the rearrangement based on the map information. When the signal indicating is output, the output of the deserialization unit 200d is selected. The switching unit 200g outputs the selected output (two-dimensional quantized prediction residual) to the inverse quantization unit 201a.

実施形態において、予測残差並び替え部200c、デシリアライズ部200d、及び切替部200gは、並び替え部を構成する。かかる並び替え部200cは、判定部200fにより相似度が閾値以上であると判定された場合には、評価部208により評価された類似度に応じた順に量子化予測残差を並び替えて出力し、判定部200fにより相似度が閾値未満であると判定された場合には、量子化予測残差を予め規定された順に並び替えて出力する。 In the embodiment, the prediction residual rearrangement unit 200c, the deserialization unit 200d, and the switching unit 200g constitute a rearrangement unit. When the determination unit 200f determines that the degree of similarity is equal to or greater than the threshold, the rearrangement unit 200c rearranges and outputs the quantized prediction residuals in order according to the degree of similarity evaluated by the evaluation unit 208. , when the determination unit 200f determines that the degree of similarity is less than the threshold, the quantized prediction residuals are rearranged in a predetermined order and output.

<7.画像符号化の動作>
図10は、実施形態に係る画像符号化装置1Aにおける処理フローを示す図である。画像符号化装置1Aは、符号化対象ブロックに対して変換スキップモードかつ動き補償予測を適用する場合に、本処理フローを実行する。
<7. Operation of image encoding>
FIG. 10 is a diagram showing a processing flow in the image encoding device 1A according to the embodiment. The image coding device 1A executes this processing flow when applying the transform skip mode and motion compensation prediction to the coding target block.

図10に示すように、ステップS1101において、動き補償予測部109は、複数の参照画像を用いて動き補償予測を行うことにより符号化対象ブロックを予測し、符号化対象ブロックに対応する予測画像を生成する。 As shown in FIG. 10, in step S1101, the motion-compensated prediction unit 109 predicts an encoding target block by performing motion compensation prediction using a plurality of reference images, and generates a predicted image corresponding to the encoding target block. Generate.

ステップS1102において、評価部111は、複数の参照画像間の類似度を画素位置ごとに評価し、符号化対象ブロック内の各画素位置の予測の確度(予測精度)を表すマップ情報を生成する。 In step S1102, the evaluation unit 111 evaluates the degree of similarity between a plurality of reference images for each pixel position, and generates map information representing the prediction accuracy (prediction accuracy) of each pixel position in the encoding target block.

ステップS1103において、減算部101は、符号化対象ブロックと予測画像との間の画素単位での差分を表す予測残差を算出する。 In step S1103, the subtraction unit 101 calculates a prediction residual representing a pixel-by-pixel difference between the encoding target block and the prediction image.

ステップS1104において、量子化部102bは、減算部101が算出した予測残差に対して量子化を行うことにより、量子化予測残差を生成する。 In step S1104, the quantization unit 102b quantizes the prediction residual calculated by the subtraction unit 101 to generate a quantized prediction residual.

ステップS1105において、エントロピー符号化部103Aは、量子化予測残差とマップ情報との間の相関を表す相似度を算出し、相似度が閾値以上であるか否かを判定する。 In step S1105, the entropy coding unit 103A calculates a degree of similarity representing the correlation between the quantized prediction residual and the map information, and determines whether or not the degree of similarity is equal to or greater than a threshold.

ステップS1106において、エントロピー符号化部103Aは、相似度が閾値以上である場合は、マップ情報に基づいて量子化予測残差を確度の低い順に符号化して符号化データを出力する。相似度が閾値未満である場合、エントロピー符号化部103Aは、予め規定された順に符号化を行って符号化データを出力する。 In step S1106, if the degree of similarity is equal to or greater than the threshold, the entropy encoding unit 103A encodes the quantized prediction residuals in ascending order of accuracy based on the map information, and outputs encoded data. When the degree of similarity is less than the threshold, entropy coding section 103A performs coding in a predetermined order and outputs coded data.

ステップS1107において、逆量子化部104aは、量子化部102bから入力された量子化予測残差に対して逆量子化を行うことにより予測残差を復元し、復元予測残差を生成する。 In step S1107, the inverse quantization unit 104a performs inverse quantization on the quantized prediction residual input from the quantization unit 102b to restore the prediction residual and generate a restored prediction residual.

ステップS1108において、合成部105は、復元予測残差を画素単位で予測画像と合成することにより対象ブロックを再構成し、再構成ブロックを生成する。 In step S1108, the synthesizing unit 105 reconstructs the target block by synthesizing the restored prediction residual with the predicted image on a pixel-by-pixel basis to generate a reconstructed block.

ステップS1109において、ループフィルタ107は、再構成ブロックに対してフィルタ処理を行う。 In step S1109, the loop filter 107 filters the reconstructed block.

ステップS1110において、フレームメモリ108は、フィルタ処理後の再構成ブロックをフレーム単位で記憶する。 In step S1110, the frame memory 108 stores the reconstructed block after filtering in units of frames.

<8.画像復号の動作>
図11は、実施形態に係る画像復号装置2Aにおける処理フローを示す図である。画像復号装置2Aは、対象ブロックに対して変換スキップモードかつ動き補償予測を適用する場合に、本処理フローを実行する。
<8. Operation of image decoding>
FIG. 11 is a diagram showing a processing flow in the image decoding device 2A according to the embodiment. The image decoding device 2A executes this processing flow when applying the transform skip mode and motion compensation prediction to the target block.

図11に示すように、ステップS1201において、エントロピー符号復号部200Aの復号部200aは、符号化データを復号して動きベクトル情報を取得し、取得した動きベクトル情報を動き補償予測部206に出力する。 As shown in FIG. 11, in step S1201, the decoding unit 200a of the entropy code decoding unit 200A decodes encoded data to acquire motion vector information, and outputs the acquired motion vector information to the motion compensation prediction unit 206. .

ステップS1202において、動き補償予測部206は、動きベクトル情報に基づく複数の参照画像を用いて動き補償予測を行うことにより復号対象ブロックを予測し、復号対象ブロックに対応する予測画像を生成する。 In step S1202, the motion compensation prediction unit 206 predicts the decoding target block by performing motion compensation prediction using a plurality of reference images based on motion vector information, and generates a prediction image corresponding to the decoding target block.

ステップS1203において、評価部208は、複数の参照画像間の類似度を画素位置ごとに算出し、ブロック内の各画素位置の予測の確度(予測精度)を表すマップ情報を生成する。 In step S1203, the evaluation unit 208 calculates the degree of similarity between a plurality of reference images for each pixel position, and generates map information representing the prediction accuracy (prediction accuracy) of each pixel position in the block.

ステップS1204において、エントロピー符号復号部200Aは、符号化データを復号して量子化予測残差列を取得する。エントロピー符号復号部200Aは、量子化予測残差列とマップ情報との間の相関を表す相似度を算出し、相似度が閾値以上であるか否かを判定する。エントロピー符号復号部200Aは、相似度が閾値以上である場合は、マップ情報に基づいて量子化予測残差を並び替えて、2次元に配列された量子化予測残差を逆量子化部201aに出力する。相似度が閾値未満である場合、エントロピー符号復号部200Aは、予め規定された順に量子化予測残差を並び替えて、2次元に配列された量子化予測残差を逆量子化部201aに出力する。 In step S1204, the entropy code decoding unit 200A decodes the encoded data to acquire a quantized prediction residual sequence. The entropy code decoding unit 200A calculates a degree of similarity representing the correlation between the quantized prediction residual sequence and the map information, and determines whether or not the degree of similarity is equal to or greater than a threshold. If the degree of similarity is equal to or greater than the threshold, the entropy code decoding unit 200A rearranges the quantized prediction residuals based on the map information, and outputs the two-dimensionally arranged quantized prediction residuals to the inverse quantization unit 201a. Output. When the degree of similarity is less than the threshold, the entropy code decoding unit 200A rearranges the quantized prediction residuals in a predetermined order, and outputs the two-dimensionally arranged quantized prediction residuals to the inverse quantization unit 201a. do.

ステップS1205において、逆量子化部201aは、量子化予測残差に対して逆量子化を行うことにより予測残差を復元し、復元予測残差を生成する。 In step S1205, the inverse quantization unit 201a performs inverse quantization on the quantized prediction residual to restore the prediction residual and generate a restored prediction residual.

ステップS1206において、合成部202は、復元予測残差を画素単位で予測画像と合成することにより対象ブロックを再構成し、再構成ブロックを生成する。 In step S1206, the synthesizing unit 202 reconstructs the target block by synthesizing the restored prediction residual with the predicted image on a pixel-by-pixel basis to generate a reconstructed block.

ステップS1207において、ループフィルタ204は、再構成ブロックに対してフィルタ処理を行う。 In step S1207, the loop filter 204 filters the reconstructed block.

ステップS1208において、フレームメモリ205は、フィルタ処理後の再構成ブロックをフレーム単位で記憶して出力する。 In step S1208, the frame memory 205 stores and outputs the reconfigured block after filtering in units of frames.

<9.実施形態のまとめ>
画像符号化装置1Aにおいて、評価部111は、複数の参照画像間の類似度を画素単位で評価し、評価結果の情報(マップ情報)をエントロピー符号化部103Aに出力する。エントロピー符号化部103Aは、量子化予測残差とマップ情報との間の相関を表す相似度を算出し、相似度が閾値以上である場合は、マップ情報に基づいて、量子化部102bから入力された量子化予測残差を、参照画像間の類似度の低い画素位置から順に符号化する。参照画像間の類似度の低い画素位置から順に量子化予測残差を符号化することにより、有意係数を優先的に符号化し、より早期に終了フラグを付与することができる。これにより、変換スキップブロックに対して効率的なエントロピー符号化を行うことを可能とし、符号化効率を改善することができる。
<9. Summary of Embodiments>
In the image encoding device 1A, the evaluation unit 111 evaluates the degree of similarity between a plurality of reference images on a pixel-by-pixel basis, and outputs information (map information) of the evaluation result to the entropy encoding unit 103A. The entropy encoding unit 103A calculates a similarity that represents the correlation between the quantized prediction residual and the map information, and if the similarity is equal to or greater than a threshold, the entropy encoding unit 103A inputs from the quantization unit 102b based on the map information. The resulting quantized prediction residuals are coded in order from the pixel position with the lowest similarity between the reference images. By encoding the quantized prediction residuals in order from the pixel position with the lowest similarity between the reference images, it is possible to preferentially encode the significant coefficients and attach the end flag earlier. This makes it possible to perform efficient entropy coding on transform-skipped blocks and improve coding efficiency.

画像復号装置2Aにおいて、評価部208は、複数の参照画像間の類似度を画素単位で評価し、評価結果の情報(マップ情報)をエントロピー符号復号部200Aに出力する。エントロピー符号復号部200Aは、符号化データを復号して画素単位で量子化予測残差を取得し、量子化予測残差とマップ情報との間の相関を表す相似度を算出し、相似度が閾値以上である場合は、マップ情報に基づいて量子化予測残差を並べ替えて出力する。このように、評価部208による評価の結果に基づいて量子化予測残差を並べ替えることにより、並び替えの詳細を指定する情報が画像符号化装置から伝送されなくても、エントロピー符号復号部200Aが自律的に量子化予測残差を並べ替えることができる。これにより、並び替えの詳細を指定する情報を画像符号化装置1から伝送する必要がないため、符号化効率の低下を回避することができる。 In the image decoding device 2A, the evaluation unit 208 evaluates the degree of similarity between a plurality of reference images on a pixel-by-pixel basis, and outputs information (map information) on the evaluation result to the entropy code decoding unit 200A. The entropy code decoding unit 200A decodes the encoded data to obtain a quantized prediction residual on a pixel-by-pixel basis, calculates a degree of similarity representing the correlation between the quantized prediction residual and the map information, and calculates the degree of similarity. If it is equal to or greater than the threshold, the quantized prediction residuals are rearranged and output based on the map information. In this way, by rearranging the quantized prediction residuals based on the evaluation result of the evaluation unit 208, the entropy coding/decoding unit 200A can be used even if the information specifying the details of the rearrangement is not transmitted from the image coding apparatus. can autonomously rearrange the quantized prediction residuals. This eliminates the need to transmit information designating the details of rearrangement from the image encoding device 1, thereby avoiding deterioration in encoding efficiency.

また、予測残差とマップ情報との間の相関を表す相似度が閾値未満である場合は、予め規定された順に並び替えを行うことにより、符号化効率をさらに改善することができる。具体的には、複数の参照画像間の類似度の低い画素位置は大きな予測残差を有するという仮定が成立しないような場合であって、相似度が閾値未満である場合には、マップ情報に基づく並び替えを不適用とし、従来の対角スキャンに従った順に量子化予測残差を符号化する。これにより、マップ情報に基づく並び替えを適用することによる符号化効率の悪化を回避できる。 Also, if the degree of similarity representing the correlation between the prediction residuals and the map information is less than the threshold, the encoding efficiency can be further improved by rearranging in a predetermined order. Specifically, when the assumption that pixel positions with low similarity between multiple reference images have large prediction residuals does not hold and the similarity is less than the threshold, the map information , and encode the quantized prediction residuals in order according to conventional diagonal scanning. This makes it possible to avoid deterioration of coding efficiency due to applying rearrangement based on map information.

<10.変更例1>
図12は、実施形態の変更例1に係る重複動き補償の一例を示す図である。
<10. Modification 1>
FIG. 12 is a diagram illustrating an example of overlapping motion compensation according to Modification 1 of the embodiment.

画像符号化装置1Aの評価部111及び画像復号装置2Aの評価部208は、以下に示す方法でマップ情報として誤差マップを生成し、並べ替え部112に入力してもよい。誤差マップを並び替え部112に入力する場合には、誤差マップの値が大きい領域を類似度が低い領域とし、誤差マップの値が小さい領域を類似度が高い領域として、並べ替え部112は量子化予測残差の並び換え処理を行う。 The evaluation unit 111 of the image encoding device 1A and the evaluation unit 208 of the image decoding device 2A may generate error maps as map information by the method described below and input them to the rearrangement unit 112 . When the error map is input to the sorting unit 112, the sorting unit 112 performs quantum permutation processing of the prediction residuals.

双予測モードの予測画像の生成に用いる2つの参照画像(参照先ブロック)の輝度信号をL0[i,j]及びL1[i,j](但し、[i,j]は対象ブロック内の座標)とすると、下記の式(2)により誤差マップmap[i,j]及びその最大値max_mapを算出する。 L0[i,j] and L1[i,j] (where [i,j] are the coordinates ), the error map map[i,j] and its maximum value max_map are calculated by the following equation (2).

map [i,j] = abs (L0 [i,j] - L1 [i,j])
max_map = max (map [i,j]) ・・・(2)
map[i,j]=abs(L0[i,j]-L1[i,j])
max_map=max(map[i,j]) (2)

式(2)のmax_mapが6ビット精度を超える(64を超える)場合には、下記の式(3)により、max_mapが6ビット精度に収まるように設定したshiftにより誤差マップ及び最大値を更新する。 If max_map in formula (2) exceeds 6-bit precision (exceeds 64), the error map and maximum value are updated by shift set so that max_map falls within 6-bit precision according to formula (3) below. .

max_map = max_map >> shift
map [i,j] = map [i,j] >> shift ・・・(3)
max_map = max_map >> shift
map[i, j] = map[i, j] >> shift (3)

<11.変更例2>
画像符号化装置1Aの動き補償予測部109及び画像復号装置2Aの動き補償予測部206は、対象ブロック(CU)を複数の小ブロックに分割し、小ブロックごとに異なる動きベクトルを適用可能とし、小ブロックごとに片方向予測、双予測を切り替え可能であってもよい。かかる場合、片方向予測及び双方向予測の両方を用いて予測画像を生成するCUに対しては、画像符号化装置1Aの評価部111及び画像復号装置2Aの評価部208がマップ情報を算出しないものとしてもよい。一方、全ての小ブロックについて双予測により予測画像を生成している場合には、画像符号化装置1Aの評価部111及び画像復号装置2Aの評価部208は、マップ情報を生成する。
<11. Modification 2>
The motion compensation prediction unit 109 of the image encoding device 1A and the motion compensation prediction unit 206 of the image decoding device 2A divide the target block (CU) into a plurality of small blocks, and apply a different motion vector to each small block, It may be possible to switch between unidirectional prediction and bi-prediction for each small block. In such a case, the evaluation unit 111 of the image encoding device 1A and the evaluation unit 208 of the image decoding device 2A do not calculate map information for a CU for which a predicted image is generated using both unidirectional prediction and bidirectional prediction. It can be a thing. On the other hand, when predicted images are generated by bi-prediction for all small blocks, the evaluation unit 111 of the image encoding device 1A and the evaluation unit 208 of the image decoding device 2A generate map information.

また、画像符号化装置1Aの動き補償予測部109及び画像復号装置2Aの動き補償予測部206は、動きベクトルの異なるブロック境界における予測画像の不連続性低減のために、重複動き補償(OBMC:Ooverlapped Block Motion Compensation)を行ってもよい。画像符号化装置1Aの評価部111及び画像復号装置2Aの評価部208は、マップ情報生成の際に、OBMCによる参照画素の補正を考慮してもよい。 Also, the motion compensation prediction unit 109 of the image encoding device 1A and the motion compensation prediction unit 206 of the image decoding device 2A perform overlapping motion compensation (OBMC: Overlapped Block Motion Compensation) may be performed. The evaluation unit 111 of the image encoding device 1A and the evaluation unit 208 of the image decoding device 2A may consider correction of reference pixels by OBMC when generating map information.

例えば、OBMCの補正に用いる周囲のブロックの予測モードが双予測である場合には、画像符号化装置1Aの評価部111及び画像復号装置2Aの評価部208は、OBMCの補正が影響する予測画像の領域について、周辺ブロックの双予測の予測画像生成に用いる参照画像(L0及びL1)の動きベクトルを用いてマップ情報を補正する。具体的には、ブロック境界領域について、隣り合うブロックの動きベクトルが双予測である場合には、隣り合うブロックのマップ情報との位置に応じた加重平均をする。隣り合うブロックがイントラモードの場合や、片方向予測の場合には、マップ情報の補正は行わない。図12のケースでは、上側のブロック境界についてはL0aとL1aを用いてマップ情報を生成し、その下側の領域について(当該CUと重なり合う領域について)当該CUのマップ情報との加重平均をする。下側や右側、左側CUの予測モードが片方向予測であるので、それらのCUと重なり合う領域についてはマップ情報の補正は行わない。 For example, when the prediction mode of the surrounding blocks used for OBMC correction is bi-prediction, the evaluation unit 111 of the image encoding device 1A and the evaluation unit 208 of the image decoding device 2A determine the predicted image affected by the OBMC correction. , the map information is corrected using the motion vectors of the reference images (L0 and L1) used for generating predicted images for bi-prediction of surrounding blocks. Specifically, in the block boundary area, when the motion vectors of adjacent blocks are bi-predictive, weighted averaging is performed according to the position of the map information of the adjacent blocks. If the adjacent blocks are in the intra mode or in the case of unidirectional prediction, the map information is not corrected. In the case of FIG. 12, the map information is generated using L0 a and L1 a for the upper block boundary, and the weighted average of the map information of the CU and the map information of the CU is calculated for the lower area (the area overlapping with the CU). do. Since the prediction modes of the lower, right, and left CUs are unidirectional prediction, the map information is not corrected for regions overlapping these CUs.

<12.変更例3>
上述した実施形態において、予測残差を画素単位で並び替える一例を説明したが、予測残差を画素グループ(小ブロック)単位で並び替えてもよい。かかる小ブロックは、4×4の画素からなるブロックであり、CGと称されることがある。
<12. Modification 3>
In the above-described embodiment, an example of rearranging prediction residuals in units of pixels has been described, but prediction residuals may be rearranged in units of pixel groups (small blocks). Such a small block is a block made up of 4×4 pixels and is sometimes called CG.

図13は、実施形態の変更例3に係る画像符号化装置1Bの構成を示す図である。図13に示すように、画像符号化装置1Bは、予測残差を画素グループ(小ブロック)単位で並び替える並び替え部112を備える。並び替え部112は、対象ブロック(CU)が双予測を用いて予測画像を生成するものであって、当該CUが変換スキップモードを適用するものである場合には、上述した誤差マップに基いて、当該CUの予測残差に対して小ブロック単位(4×4)での並び換えを行う。 FIG. 13 is a diagram showing the configuration of an image encoding device 1B according to Modification 3 of the embodiment. As shown in FIG. 13, the image coding device 1B includes a rearrangement unit 112 that rearranges prediction residuals in units of pixel groups (small blocks). If the target block (CU) generates a predicted image using bi-prediction and the CU applies the transform skip mode, the rearrangement unit 112 uses the error map described above. , the prediction residual of the CU is rearranged in units of small blocks (4×4).

図14は、実施形態の変更例3に係る並び替え部112の動作の一例を示す図である。 FIG. 14 is a diagram illustrating an example of the operation of the sorting unit 112 according to Modification 3 of the embodiment.

図14(A)に示すように、画像符号化装置1Bの減算部101は、CUに対応する予測残差を算出する。図14(A)の例では、CU内の右上領域に予測残差が存在する。CU内の右上領域は、参照画像間の類似度が低い領域であって、予測精度(確度)が低い領域であるとみなすことができる。 As shown in FIG. 14A, the subtraction unit 101 of the image coding device 1B calculates prediction residuals corresponding to CUs. In the example of FIG. 14A, a prediction residual exists in the upper right region within the CU. The upper right region in the CU is a region with low similarity between reference images and can be regarded as a region with low prediction accuracy (certainty).

図14(B)に示すように、画像符号化装置1Bの評価部111又は並び替え部112は、誤差マップを4×4のCG単位に分割し、CG単位での誤差の平均値CGmapを下記の式(4)により算出する。 As shown in FIG. 14B, the evaluation unit 111 or the rearrangement unit 112 of the image encoding device 1B divides the error map into 4×4 CG units, and calculates the average value CGmap of the errors in CG units as follows. It is calculated by the formula (4).

Figure 0007291471000005
Figure 0007291471000005

そして、並び替え部112は、誤差の平均値CGmapが高い順にCGを並び替えてインデックスを付与する。言い換えると、並び替え部112は、参照画像間の類似度が低い順にCGを並び替えてインデックスを付与する。図14(B)の例において、各CG内の数字は並び替え後のインデックスを表す。右上領域のCGの平均値CGmapが大きいため、スキャン(符号化)の優先順位が高く設定されている。次に、並び替え部112は、図14(C)に示すように、インデックスが小さい順にスキャン(符号化)されるようにCGを並べ替える。その結果、並び替え部112は、図14(D)に示すように、CG単位で並び替えた予測残差を量子化部102bに出力する。 Then, the rearrangement unit 112 rearranges the CGs in descending order of the error average value CGmap and assigns an index. In other words, the rearrangement unit 112 rearranges the CGs in descending order of similarity between the reference images and assigns an index. In the example of FIG. 14B, the numbers in each CG represent the index after rearrangement. Since the average value CGmap of the CG in the upper right area is large, the scan (encoding) priority is set high. Next, the rearrangement unit 112 rearranges the CGs so that the CGs are scanned (encoded) in ascending order of index, as shown in FIG. 14(C). As a result, the rearrangement section 112 outputs the prediction residuals rearranged in CG units to the quantization section 102b, as shown in FIG. 14(D).

量子化部102bは、並び替え部112から入力された予測残差に対して量子化を行って、量子化した量子化予測残差をエントロピー符号化部103Bに出力する。エントロピー符号化部103Bは、誤差の平均値CGmapが高い順にCGを符号化して符号化データを生成する。 Quantization section 102b quantizes the prediction residual input from rearrangement section 112, and outputs the quantized quantized prediction residual to entropy coding section 103B. The entropy coding unit 103B generates coded data by coding the CGs in descending order of the error average value CGmap.

なお、並び替え部112は、逆量子化部104aが出力する復元予測残差に対して、元のCGの並び順に戻すようにCG単位で並び替えを行い、CG単位で並び替えた復元予測残差を合成部105に出力する。 Note that the rearrangement unit 112 rearranges the restored prediction residual output from the inverse quantization unit 104a in units of CG so as to restore the original arrangement order of the CGs, and rearranges the restored prediction residuals rearranged in units of CG. The difference is output to combining section 105 .

図15は、実施形態の変更例3に係る画像復号装置2Bの構成を示す図である。図15に示すように、画像復号装置2Bは、逆量子化部201aが出力する復元予測残差をCG単位で並び替える並び替え部209を備える。 FIG. 15 is a diagram showing the configuration of an image decoding device 2B according to Modification 3 of the embodiment. As shown in FIG. 15, the image decoding device 2B includes a rearrangement unit 209 that rearranges the restored prediction residual output from the inverse quantization unit 201a in CG units.

並び替え部209は、対象ブロック(CU)が双予測を用いて予測画像を生成するものであって、当該CUが変換スキップモードを適用するものである場合には、上述した誤差マップに基いて、当該CUの予測残差に対してCG単位での並び換えを行う。 If the target block (CU) generates a predicted image using bi-prediction and the CU applies the transform skip mode, the rearrangement unit 209 uses the error map described above. , the prediction residuals of the CU are rearranged in CG units.

具体的には、画像復号装置2Bの評価部208又は並び替え部209は、誤差マップを4×4のCG単位に分割し、CG単位での誤差の平均値CGmapを上記の式(5)により算出する。そして、並び替え部209は、CG単位での誤差の平均値CGmapに基づいて、画像復号装置2Aの並び替え部112が行う並び替え処理の逆処理を行い、並び替え後の予測残差を合成部202に出力する。 Specifically, the evaluation unit 208 or the rearrangement unit 209 of the image decoding device 2B divides the error map into 4×4 CG units, and calculates the average value CGmap of the errors in CG units using the above equation (5). calculate. Then, the rearrangement unit 209 reverses the rearrangement processing performed by the rearrangement unit 112 of the image decoding device 2A based on the average value CGmap of errors in CG units, and synthesizes the prediction residuals after the rearrangement. Output to the unit 202 .

なお、本変更例において、相似度に基づく判定及び切替を行う場合は、画素グループ(CG)内の予測残差の絶対値の平均値を、上述した実施形態における予測残差列の1つの要素として扱えばよい。 In addition, in this modification, when performing determination and switching based on similarity, the average value of the absolute values of the prediction residuals in the pixel group (CG) is set to one element of the prediction residual sequence in the above-described embodiment. should be treated as

<13.変更例4>
上述した実施形態において、予測残差を画素単位もしくは小ブロック単位で並び替える例を説明したが、予測残差を水平もしくは垂直もしくは水平垂直に反転させるよう並び換えてもよい。
<13. Modification 4>
In the above-described embodiment, an example in which prediction residuals are rearranged in pixel units or small block units has been described, but prediction residuals may be rearranged so as to be horizontally or vertically reversed.

図16に示すように、画像符号化装置1Bの減算部101は、対象ブロックに対応する予測残差を算出する。図16の例では対象ブロックの右上領域に予測残差が存在する。また、対象ブロックの右上領域は、参照画素間の類似度が低い領域であって、予測精度(確度)が低い領域であるとみなすことができる。 As shown in FIG. 16, the subtraction unit 101 of the image coding device 1B calculates a prediction residual corresponding to the target block. In the example of FIG. 16, a prediction residual exists in the upper right area of the target block. Also, the upper right area of the target block can be regarded as an area where the degree of similarity between reference pixels is low and the prediction accuracy (certainty) is low.

実施形態の変更例4の並び替え部112は、誤差マップの重心を下記の式(5)により算出する。 The rearrangement unit 112 of Modification 4 of the embodiment calculates the center of gravity of the error map by the following equation (5).

Figure 0007291471000006
Figure 0007291471000006

並び替え部112は、算出した誤差マップの重心(gi,gj)がマップの右上領域に位置する場合、すなわち、左上座標を(0,0)、右下座標を(m,n)とすると、 When the calculated center of gravity ( gi , gj ) of the error map is located in the upper right region of the map, the rearrangement unit 112 sets the upper left coordinates to (0, 0) and the lower right coordinates to (m, n). Then,

Figure 0007291471000007
Figure 0007291471000007

かつ and

Figure 0007291471000008
Figure 0007291471000008

である場合には、予測残差を水平反転する。 , then horizontally flip the prediction residual.

並び替え部112は、誤差マップの重心が左下領域に位置する場合、すなわち、 When the center of gravity of the error map is located in the lower left area, the rearrangement unit 112 performs

Figure 0007291471000009
Figure 0007291471000009

かつ and

Figure 0007291471000010
Figure 0007291471000010

である場合には、予測残差を垂直反転する。 , then vertically flip the prediction residual.

並び替え部112は、誤差マップの重心が右下領域に位置する場合、すなわち、 When the center of gravity of the error map is located in the lower right region, the rearrangement unit 112 performs

Figure 0007291471000011
Figure 0007291471000011

かつ and

Figure 0007291471000012
Figure 0007291471000012

である場合には、予測残差を水平および垂直に反転する。 , flip the prediction residual horizontally and vertically.

なお、誤差マップの重心が右下領域である場合には、並び替え部112は、予測残差を水平および垂直に反転するかわりに、予測残差を180度回転させるよう構成してもよいし、係数符号化の際のスキャン順を左上から右下に行うかわりに、右下から左上に向かうように変更するよう構成してもよい。 Note that when the center of gravity of the error map is the lower right region, the rearrangement unit 112 may be configured to rotate the prediction residual by 180 degrees instead of horizontally and vertically inverting the prediction residual. Alternatively, the scanning order for coefficient encoding may be changed from the lower right to the upper left instead of from the upper left to the lower right.

また、処理の低減のため、誤差マップの重心を算出せずに、誤差マップの最大値の位置を探索し、最大値の位置を前記重心の位置とみなして、上述の反転処理を行うよう施してもよい。 In order to reduce the processing, the position of the maximum value of the error map is searched without calculating the center of gravity of the error map, and the position of the maximum value is regarded as the position of the center of gravity, and the above-mentioned inversion processing is performed. may

実施形態の変更例4の並べ替え部112による予測残差の反転処理が施された予測残差は量子化部102bに出力する。 The prediction residual after the prediction residual is reversed by the rearrangement unit 112 of Modification 4 of the embodiment is output to the quantization unit 102b.

量子化部102bは、並び替え部112から入力された予測残差に対して量子化を行って、量子化した量子化予測残差をエントロピー符号化部103Bに出力する。エントロピー符号化部103Bは、予測残差の左上領域から右下領域の順に符号化して符号化データを生成する。 Quantization section 102b quantizes the prediction residual input from rearrangement section 112, and outputs the quantized quantized prediction residual to entropy coding section 103B. The entropy coding unit 103B generates coded data by coding the prediction residual in order from the upper left region to the lower right region.

なお、並び替え部112は、逆量子化部104aが出力する復元予測残差に対して、誤差マップの重心の位置に基いて予測残差の反転処理を行い、並び替えた復元予測残差を合成部105に出力する。 Note that the rearrangement unit 112 performs an inversion process on the restored prediction residual output from the inverse quantization unit 104a based on the position of the center of gravity of the error map, and converts the rearranged restored prediction residual to Output to the synthesizing unit 105 .

<14.その他の実施形態>
上述した実施形態において、エントロピー符号化部103Aが、2次元に配列された予測残差の全てを確度の低い順に読み出してシリアライズ処理を行う一例について説明した。しかしながら、2次元に配列された予測残差のうち確度が低い順に上位数個のみを読み出し、それ以外の予測残差についてはシステムで定められた固定の順序で読み出すとしてもよい。或いは、2次元に配列された予測残差について、確度に応じて読み出し順を所定の数だけ繰り上げる又は繰り下げるとしてもよい。
<14. Other Embodiments>
In the above-described embodiment, an example has been described in which the entropy encoding unit 103A reads out all the prediction residuals arranged two-dimensionally in descending order of accuracy and serializes them. However, it is also possible to read out only the top several prediction residuals in descending order of accuracy among the two-dimensionally arranged prediction residuals, and read out the other prediction residuals in a fixed order determined by the system. Alternatively, the reading order of the two-dimensionally arranged prediction residuals may be moved up or down by a predetermined number according to the accuracy.

上述した実施形態において、動き補償予測としてインター予測を主として説明した。インター予測においては、現フレームと異なるフレーム内の参照画像が現フレームの対象ブロックの予測に用いられる。しかしながら、動き補償予測としてイントラブロックコピーと呼ばれる技術も適用することが可能である。イントラブロックコピーにおいては、現フレームと同じフレーム内の参照画像が現フレームの対象ブロックの予測に用いられる。 In the above-described embodiments, inter prediction was mainly described as motion compensated prediction. In inter prediction, a reference image in a frame different from the current frame is used for prediction of a target block in the current frame. However, it is also possible to apply a technique called intra block copy as motion compensated prediction. In intra-block copying, a reference image in the same frame as the current frame is used for prediction of the target block of the current frame.

画像符号化装置1A、1Bが行う各処理をコンピュータに実行させるプログラム及び画像復号装置2A、2Bが行う各処理をコンピュータに実行させるプログラムが提供されてもよい。また、プログラムは、コンピュータ読取り可能媒体に記録されていてもよい。コンピュータ読取り可能媒体を用いれば、コンピュータにプログラムをインストールすることが可能である。ここで、プログラムが記録されたコンピュータ読取り可能媒体は、非一過性の記録媒体であってもよい。非一過性の記録媒体は、特に限定されるものではないが、例えば、CD-ROMやDVD-ROM等の記録媒体であってもよい。また、画像符号化装置1A、1Bが行う各処理を実行する回路を集積化し、画像符号化装置1A、1Bを半導体集積回路(チップセット、SoC)として構成してもよい。同様に、画像復号装置2A、2Bが行う各処理を実行する回路を集積化し、画像復号装置2A、2Bを半導体集積回路(チップセット、SoC)として構成してもよい。 A program that causes a computer to execute each process performed by the image encoding devices 1A and 1B and a program that causes a computer to execute each process performed by the image decoding devices 2A and 2B may be provided. Also, the program may be recorded on a computer-readable medium. A computer readable medium allows the installation of the program on the computer. Here, the computer-readable medium on which the program is recorded may be a non-transitory recording medium. The non-transitory recording medium is not particularly limited, but may be, for example, a recording medium such as CD-ROM or DVD-ROM. Alternatively, the image encoding devices 1A and 1B may be configured as semiconductor integrated circuits (chipsets, SoC) by integrating circuits for executing each process performed by the image encoding devices 1A and 1B. Similarly, a circuit for executing each process performed by the image decoding devices 2A and 2B may be integrated, and the image decoding devices 2A and 2B may be configured as semiconductor integrated circuits (chipsets, SoC).

以上、図面を参照して実施形態について詳しく説明したが、具体的な構成は上述のものに限られることはなく、要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。 Although the embodiments have been described in detail with reference to the drawings, the specific configuration is not limited to the above, and various design changes can be made without departing from the spirit of the invention.

1、1A、1B :画像符号化装置
2、2A、2B :画像復号装置
100 :ブロック分割部
101 :減算部
102 :変換・量子化部
102a :変換部
102b :量子化部
103A、103B:エントロピー符号化部
103a :ソート部
103b :予測残差並び替え部
103c :シリアライズ部
103d :確度並び替え部
103e :判定部
103f :切替部
103g :符号化部
104 :逆量子化・逆変換部
104a :逆量子化部
104b :逆変換部
105 :合成部
106 :イントラ予測部
107 :ループフィルタ
108 :フレームメモリ
109 :動き補償予測部
110 :切替部
111 :評価部
111a :差分算出部
111b :正規化部
112 :並び替え部
200A :エントロピー符号復号部
200a :復号部
200b :ソート部
200c :予測残差並び替え部
200d :デシリアライズ部
200e :確度並び替え部
200f :判定部
200g :切替部
201 :逆量子化・逆変換部
201a :逆量子化部
201b :逆変換部
202 :合成部
203 :イントラ予測部
204 :ループフィルタ
205 :フレームメモリ
206 :動き補償予測部
207 :切替部
209 :並び替え部
1, 1A, 1B: image encoding devices 2, 2A, 2B: image decoding device 100: block division unit 101: subtraction unit 102: transformation/quantization unit 102a: transformation unit 102b: quantization units 103A, 103B: entropy code Conversion unit 103a: Sorting unit 103b: Prediction residual rearrangement unit 103c: Serialization unit 103d: Accuracy rearrangement unit 103e: Judging unit 103f: Switching unit 103g: Encoding unit 104: Inverse quantization/inverse transform unit 104a: Inverse quantization conversion unit 104b: inverse transform unit 105: synthesis unit 106: intra prediction unit 107: loop filter 108: frame memory 109: motion compensation prediction unit 110: switching unit 111: evaluation unit 111a: difference calculation unit 111b: normalization unit 112: Sorting unit 200A: Entropy code decoding unit 200a: Decoding unit 200b: Sorting unit 200c: Prediction residual sorting unit 200d: Deserializing unit 200e: Accuracy sorting unit 200f: Judging unit 200g: Switching unit 201: Inverse quantization/ Inverse transform unit 201a: Inverse quantization unit 201b: Inverse transform unit 202: Synthesis unit 203: Intra prediction unit 204: Loop filter 205: Frame memory 206: Motion compensation prediction unit 207: Switching unit 209: Sorting unit

Claims (6)

符号化データに対してブロック単位で復号を行う画像復号装置であって、
複数の参照画像を用いて双予測を行うことにより、復号対象のブロックに対応する予測画像のブロックを生成する動き補償予測部と、
前記双予測を行う場合に限り、前記複数の参照画像間の類似度を示す評価値を前記ブロックよりも小さい単位であって複数の画素からなる小ブロックごとに算出する評価部と、
前記符号化データを復号して、前記復号対象のブロックに対応する予測残差を取得する取得部と、
前記取得された予測残差を前記予測画像のブロックと合成して前記復号対象のブロックを再構成する合成部と、を備え、
前記評価部が算出する前記評価値は、前記合成部の合成対象を前記小ブロック単位で補正するために用いられる、画像復号装置。
An image decoding device that decodes encoded data in units of blocks,
A motion compensation prediction unit that generates a predicted image block corresponding to a block to be decoded by performing bi-prediction using a plurality of reference images;
an evaluation unit that calculates an evaluation value indicating a degree of similarity between the plurality of reference images for each small block that is a unit smaller than the block and is made up of a plurality of pixels only when the bi-prediction is performed;
an acquisition unit that decodes the encoded data and acquires a prediction residual corresponding to the block to be decoded;
a synthesizing unit that synthesizes the obtained prediction residual with the block of the predicted image to reconstruct the block to be decoded,
The image decoding device, wherein the evaluation value calculated by the evaluation unit is used to correct the composition target of the composition unit in units of the small blocks.
前記復号対象のブロックの直交変換処理をスキップする変換スキップモードにおいて、
量子化された前記予測残差又は当該量子化された予測残差を逆量子化して得られた復元予測残差と、前記評価部により評価された前記類似度との間の相関を表す相似度を算出し、前記相似度が閾値以上であるかを判定する判定部と、
前記判定部により前記相似度が前記閾値以上であると判定された場合に、前記評価部により評価された前記類似度に応じた順に前記量子化された予測残差を並び替えて出力する並び替え部と、をさらに備えることを特徴とする請求項1に記載の画像復号装置。
In a transform skip mode that skips the orthogonal transform processing of the block to be decoded,
A degree of similarity representing the correlation between the quantized prediction residual or the restored prediction residual obtained by inverse quantizing the quantized prediction residual and the similarity evaluated by the evaluation unit and a determination unit that determines whether the degree of similarity is equal to or greater than a threshold;
Sorting for sorting and outputting the quantized prediction residuals in order according to the similarity evaluated by the evaluating unit when the determining unit determines that the similarity is equal to or greater than the threshold. The image decoding device according to claim 1, further comprising a unit.
前記並び替え部は、前記判定部により前記相似度が前記閾値未満であると判定された場合に、前記量子化された予測残差を予め規定された順に並び替えて出力することを特徴とする請求項2に記載の画像復号装置。 The rearrangement unit rearranges and outputs the quantized prediction residuals in a predetermined order when the determination unit determines that the degree of similarity is less than the threshold value. The image decoding device according to claim 2. 入力画像を分割して得られたブロック単位の符号化対象ブロックを符号化する画像符号化装置であって、
複数の参照画像を用いて双予測を行うことにより、前記符号化対象ブロックに対応する予測画像を生成する動き補償予測部と、
前記双予測を行う場合に限り、前記複数の参照画像間の類似度を示す評価値を前記ブロックよりも小さい単位であって複数の画素からなる小ブロックごとに算出する評価部と、
前記符号化対象ブロックと前記予測画像との間の画素単位での差分を表す予測残差を前記予測画像のブロックと合成して前記符号化対象のブロックを再構成する合成部と、を備え、
前記評価部が算出する前記評価値は、前記合成部の合成対象を前記小ブロック単位で補正するために用いられ、
前記符号化対象ブロックの直交変換処理をスキップする変換スキップモードにおいて、
前記予測残差を量子化して得られる量子化予測残差又は前記量子化予測残差を逆量子化して得られる復元予測残差と、前記評価部により評価された前記類似度との間の相関を表す相似度を算出し、前記相似度が閾値以上であるかを判定する判定部と、
前記判定部により前記相似度が前記閾値以上であると判定された場合に、前記評価部により評価された前記類似度に応じた順に前記量子化予測残差を符号化する符号化部と、を備えることを特徴とする画像符号化装置。
An image encoding device that encodes an encoding target block in units of blocks obtained by dividing an input image,
A motion compensation prediction unit that generates a prediction image corresponding to the encoding target block by performing bi-prediction using a plurality of reference images;
an evaluation unit that calculates an evaluation value indicating a degree of similarity between the plurality of reference images for each small block that is a unit smaller than the block and is made up of a plurality of pixels only when the bi-prediction is performed;
a synthesizing unit that reconstructs the block to be encoded by synthesizing a prediction residual representing a pixel-by-pixel difference between the block to be encoded and the predicted image with the block of the predicted image;
The evaluation value calculated by the evaluation unit is used to correct the composition target of the composition unit in units of the small blocks,
In a transform skip mode that skips orthogonal transform processing of the encoding target block,
Correlation between a quantized prediction residual obtained by quantizing the prediction residual or a restored prediction residual obtained by inversely quantizing the quantized prediction residual and the similarity evaluated by the evaluation unit A determination unit that calculates a degree of similarity representing and determines whether the degree of similarity is greater than or equal to a threshold;
an encoding unit that encodes the quantized prediction residual in order according to the similarity evaluated by the evaluation unit when the determination unit determines that the similarity is equal to or greater than the threshold; An image encoding device, comprising:
前記符号化部は、前記判定部により前記相似度が前記閾値未満であると判定された場合に、前記量子化予測残差を予め規定された順に符号化することを特徴とする請求項4に記載の画像符号化装置。 5. The encoding unit according to claim 4, wherein, when the determination unit determines that the degree of similarity is less than the threshold, the encoding unit encodes the quantized prediction residual in a predetermined order. An image encoding device as described. コンピュータを請求項1乃至3のいずれか1項に記載の画像復号装置として機能させることを特徴とするプログラム。 A program that causes a computer to function as the image decoding device according to any one of claims 1 to 3.
JP2018207585A 2018-11-02 2018-11-02 Image encoding device, image decoding device, and program Active JP7291471B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2018207585A JP7291471B2 (en) 2018-11-02 2018-11-02 Image encoding device, image decoding device, and program
JP2023092736A JP2023101834A (en) 2018-11-02 2023-06-05 Correction device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018207585A JP7291471B2 (en) 2018-11-02 2018-11-02 Image encoding device, image decoding device, and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2023092736A Division JP2023101834A (en) 2018-11-02 2023-06-05 Correction device and program

Publications (3)

Publication Number Publication Date
JP2020072458A JP2020072458A (en) 2020-05-07
JP2020072458A5 JP2020072458A5 (en) 2022-06-24
JP7291471B2 true JP7291471B2 (en) 2023-06-15

Family

ID=70549683

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2018207585A Active JP7291471B2 (en) 2018-11-02 2018-11-02 Image encoding device, image decoding device, and program
JP2023092736A Pending JP2023101834A (en) 2018-11-02 2023-06-05 Correction device and program

Family Applications After (1)

Application Number Title Priority Date Filing Date
JP2023092736A Pending JP2023101834A (en) 2018-11-02 2023-06-05 Correction device and program

Country Status (1)

Country Link
JP (2) JP7291471B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006340198A (en) 2005-06-03 2006-12-14 Canon Inc Coding device and coding method
WO2011080807A1 (en) 2009-12-28 2011-07-07 富士通株式会社 Moving picture coding device and moving picture decoding device
WO2011080806A1 (en) 2009-12-28 2011-07-07 富士通株式会社 Moving picture coding device and moving picture decoding device
WO2019189900A1 (en) 2018-03-29 2019-10-03 日本放送協会 Image encoding device, image decoding device, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006340198A (en) 2005-06-03 2006-12-14 Canon Inc Coding device and coding method
WO2011080807A1 (en) 2009-12-28 2011-07-07 富士通株式会社 Moving picture coding device and moving picture decoding device
WO2011080806A1 (en) 2009-12-28 2011-07-07 富士通株式会社 Moving picture coding device and moving picture decoding device
WO2019189900A1 (en) 2018-03-29 2019-10-03 日本放送協会 Image encoding device, image decoding device, and program
JP2021119705A (en) 2018-03-29 2021-08-12 日本放送協会 Image decoding device and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Shunsuke Iwamura, Shimpei Nemoto, Kazuhisa Iguchi, Atsuro Ichigaya, Kiran Misra, Jie Zhao, Andrew Segall, Weijia Zhu, Byeongdoo Choi, Frank Bossen, Michael Horowitz, Phil Cowan, Sachin Deshpande, Yukinobu Yasugi, Tomonori Hashimoto, Tianyang Zhou, Tomohiro Ikai, Takeshi Chujoh, Tomoko Aono,Description of SDR and HDR video coding technology proposal by NHK and SHARP [online], JVET-J JVET-J0027r3,ITU-T インターネット<URL:http://phenix.it-sudparis.eu/jvet/doc_end_user/documents/10_San%20Diego/wg11/JVET-J0027-v5.zip>,2019年10月17日,i-iv, 1-36

Also Published As

Publication number Publication date
JP2020072458A (en) 2020-05-07
JP2023101834A (en) 2023-07-21

Similar Documents

Publication Publication Date Title
JP7092920B2 (en) Image decoder and program
JP5367097B2 (en) Motion vector predictive coding method, motion vector predictive decoding method, moving picture coding apparatus, moving picture decoding apparatus, and programs thereof
JP5306485B2 (en) Motion vector predictive coding method, motion vector predictive decoding method, moving picture coding apparatus, moving picture decoding apparatus, and programs thereof
US20240040128A1 (en) Image encoding device, image decoding device and program
JP6360214B2 (en) Video decoding method
JP2023123811A (en) Image decoding device and image decoding method
JP7291471B2 (en) Image encoding device, image decoding device, and program
CN114097224B (en) Intra-frame prediction device, image decoding device, and program
JP7412343B2 (en) Image encoding device, image decoding device, and program
US12034969B2 (en) Image encoding device, image decoding device and program
JP2020053725A (en) Predictive image correction device, image encoding device, image decoding device, and program
JP7449690B2 (en) Inter prediction device, image encoding device, image decoding device, and program
JP2022171424A (en) Encoder, program, and model generation method
JP2020109960A (en) Intra-prediction device, image coding device, image decoding device, and program
KR20170108367A (en) Method and apparatus for processing a video signal based on intra prediction

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20200529

RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20200612

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211001

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220616

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220906

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221011

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221209

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

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20230501

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230605

R150 Certificate of patent or registration of utility model

Ref document number: 7291471

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150