JP2019075678A - Image encoder, image decoder, image coding program, and image decoding program - Google Patents

Image encoder, image decoder, image coding program, and image decoding program Download PDF

Info

Publication number
JP2019075678A
JP2019075678A JP2017200232A JP2017200232A JP2019075678A JP 2019075678 A JP2019075678 A JP 2019075678A JP 2017200232 A JP2017200232 A JP 2017200232A JP 2017200232 A JP2017200232 A JP 2017200232A JP 2019075678 A JP2019075678 A JP 2019075678A
Authority
JP
Japan
Prior art keywords
quantization
unit
quantization matrix
transform
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2017200232A
Other languages
Japanese (ja)
Other versions
JP7076190B2 (en
Inventor
市ヶ谷 敦郎
Atsuro Ichigaya
敦郎 市ヶ谷
俊輔 岩村
Shunsuke Iwamura
俊輔 岩村
慎平 根本
Shimpei Nemoto
慎平 根本
菊文 神田
Kikufumi Kanda
菊文 神田
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
Nippon Hoso Kyokai NHK
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 Nippon Hoso Kyokai NHK, Japan Broadcasting Corp filed Critical Nippon Hoso Kyokai NHK
Priority to JP2017200232A priority Critical patent/JP7076190B2/en
Publication of JP2019075678A publication Critical patent/JP2019075678A/en
Application granted granted Critical
Publication of JP7076190B2 publication Critical patent/JP7076190B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

To restrain image quality deterioration resulting from quantization distortion.SOLUTION: An image encoder (1) related to first feature includes a conversion part (104) performing orthogonal conversion for a conversion block, i.e., a part of the residual image of a prediction image and an input image, an activation determination part (109b) for determining whether or not the conversion skip (TS mode) for skipping the orthogonal conversion is activated with regard to a 4×4 conversion block having a 4×4 size, in units of sequence consisting of one or more than one frames, and a quantization section (105) performing quantization for each 4×4 conversion block corresponding to the sequence determined that the conversion skip was activated by the activation determination part, without using a first quantization matrix consisting of elements of different values, but using a second quantization matrix consisting of elements of equal values.SELECTED DRAWING: Figure 1

Description

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

高い効率で情報量を圧縮する符号化方式として、予測符号化方式が知られている。予測符号化方式は、現時点での予測画像を過去に符号化した画像から予測し、この予測した予測画像と入力した入力画像との残差である残差画像を符号化する。この残差画像の符号化とは、残差画像を変換処理し、この変換処理における変換領域(例えば、空間周波数領域)で示される変換係数を量子化したうえでエントロピー符号化等の可逆符号化をいう。ここで、人間の視覚特性は、空間周波数における低周波数帯域(低域)が高域よりも敏感であるため、しばしば、量子化において低域ほど小さく、高域ほど大きい量子化幅が用いられることがある。このようなブロック内の周波数毎の量子化幅で形成されるデータは、量子化行列と呼ばれる。低域ほど小さく、高域ほど大きい量子化幅を用いた量子化行列を適用することにより視覚的に敏感である残差信号の低域成分が重視され、情報量を圧縮しても主観的な品質の低下を抑制することができる。   A predictive coding scheme is known as a coding scheme that compresses the amount of information with high efficiency. The predictive coding scheme predicts a predicted image at the current time from an image coded in the past, and encodes a residual image which is a residual between the predicted image and the input image. The encoding of the residual image transforms the residual image, quantizes the transform coefficient indicated in the transform domain (for example, the spatial frequency domain) in this transform processing, and then performs lossless encoding such as entropy encoding. Say Here, since the low frequency band (low band) in the spatial frequency is more sensitive than the high band in human visual characteristics, often, the lower the low band in quantization, the larger the quantization width is used in the high band. There is. The data formed by the quantization width for each frequency in such a block is called a quantization matrix. By applying a quantization matrix that uses a smaller quantization width for lower frequencies and a larger quantization width for higher frequencies, low-frequency components of the residual signal that are visually sensitive are emphasized, and it is subjective even if the amount of information is compressed. It is possible to suppress the deterioration of quality.

予測符号化方式の代表的な方式として、HEVC(High Eficiency Video Coding)」方式(「ISO/IEC 23008−2 HEVC、ITU−T Recommendation H.265とも呼ばれる)がある(非特許文献1)。HEVC方式では、残差画像の一部である変換ブロックごとに、変換処理の一種である直交変換をスキップ(省略)するか否かを判定し、スキップすると判定したときは残差画像を直接量子化して可逆符号化する処理が採用されている。直交変換を行うか否かは各々について残差の大きさや信号特性を比較して決定される。このような直交変換をスキップして量子化及び符号化を行う処理モードは、変換スキップ(TS:Transform Skip)モードと呼ばれる。一般的に、画像信号の高域成分が符号化品質として重要な要素となるような信号の場合には、視覚特性に考慮した量子化行列を適用した場合、直交変換及び量子化によって高域成分が劣化する。このため、高域成分の劣化を抑えながら情報量を削減するために、TSモードが選択されることがある。TSモードが選択された場合、ブロック内の位置座標に応じた量子化幅を適用することにより、残差画像の高域成分が主となる信号特性の場合でも、品質を損なうことなく情報量を効率的に圧縮することができる。   There is HEVC (High Efficiency Video Coding) method (also referred to as “ISO / IEC 23008-2 HEVC, ITU-T Recommendation H. 265”) as a representative method of the predictive coding method (Non-Patent Document 1). In the method, it is determined whether to skip (omit) orthogonal transformation, which is a type of transformation processing, for each transformation block that is part of the residual image, and when it is determined to skip, the residual image is directly quantized Lossless coding processing is used, and whether or not to perform orthogonal transformation is determined by comparing the magnitudes of residuals and signal characteristics for each, skipping such orthogonal transformation to perform quantization and coding The processing mode to perform the conversion is called the transform skip (TS) mode. In general, in the case of a signal in which the high-frequency component of the image signal is an important element as the coding quality, the high-frequency component is obtained by orthogonal transformation and quantization when a quantization matrix considering visual characteristics is applied. Therefore, the TS mode may be selected in order to reduce the amount of information while suppressing the degradation of high frequency components, and when the TS mode is selected, a quantum according to the position coordinates in the block By applying the quantization width, even in the case of the signal characteristic in which the high frequency component of the residual image is the main, the information amount can be efficiently compressed without losing the quality.

ここで、非特許文献1に示される汎用プロファイル(Main profileやMain10 pforileなどのMainと呼ばれるプロファイル)では、4×4のブロックサイズを有する4×4変換ブロックの符号化における量子化において、任意の量子化行列に加えて低域ほど小さい量子化幅を有する量子化行列(以下、適宜「第1量子化行列」という)、若しくはブロック内の座標若しくは周波数によらず同一の量子化幅を有する量子化行列(以下、適宜「第2量子化行列」という)を用いることが規定されている。   Here, in a general-purpose profile (a profile called Main such as Main profile or Main 10 pforile) shown in Non-Patent Document 1, an arbitrary quantization in encoding of 4 × 4 transform block having a block size of 4 × 4 is arbitrary. A quantization matrix (hereinafter referred to as “first quantization matrix” as appropriate) having a smaller quantization width in the lower band in addition to the quantization matrix, or a quantum having the same quantization width regardless of the coordinates or frequency in the block It is defined to use a quantization matrix (hereinafter referred to as “second quantization matrix” as appropriate).

Recommendation ITU−T H.265,(04/2013)“,High efficiency video coding”,International Telecommunication Union,April 2013Recommendation ITU-T H.2. 265, (04/2013) “, High efficiency video coding”, International Telecommunication Union, April 2013

しかしながら、4×4変換ブロックについて、直交変換を行うか否かに応じていずれの量子化行列を用いるべきか指針が示されておらず、TSモードであろうとなかろうと、いずれかの量子化行列がフレーム単位又はシーケンス(一連の複数のフレーム)単位で固定的に適用される。   However, there is no indication as to which quantization matrix should be used depending on whether or not orthogonal transformation is performed for a 4 × 4 transform block, and whether it is in TS mode or not, either quantization matrix Are fixedly applied in units of frames or sequences (a plurality of series of frames).

仮に低域ほど小さい量子化幅を有する量子化行列である任意の量子化行列である第1量子化行列を量子化に用いると、直交変換を適用する場合は視覚的に良好な情報量の削減が行えるが、一方で直交変換をスキップする場合においては当該量子化行列を適用するブロックは直交変換されたものでないため、座標によって異なる量子化が適用されることにより空間的なひずみ(量子化ひずみ)が生じ、例えば隣接するブロックとの境界部に視覚的に顕著な劣化が生じるという課題がある。かかる現象は、残差画像の低域成分が主ではない場合、つまり、信号値が急激に変化する部分(エッジ)を有する入力画像で生じる傾向がある。   If the first quantization matrix, which is an arbitrary quantization matrix that is a quantization matrix having a smaller quantization width in the lower range, is used for quantization, visually reducing the amount of information when applying orthogonal transformation In the case where orthogonal transformation is skipped, the block to which the quantization matrix is applied is not orthogonally transformed, and therefore, spatial distortion (quantization distortion (quantization distortion may be caused by different quantization depending on coordinates). ), For example, there is a problem that visually noticeable deterioration occurs at the boundary with adjacent blocks. Such a phenomenon tends to occur in the case where the low-frequency component of the residual image is not dominant, that is, in the input image having a portion (edge) where the signal value changes rapidly.

一方、このような課題から拡張プロファイル(汎用プロファイル以外のプロファイル)においては、4×4変換ブロック以外のブロックにおいてTSモードを用いる場合には、第1量子化行列が伝送された場合であっても、TSモードによって符号化されるブロックであれば、第2量子化行列を用いて量子化することが示されている。しかしながら、拡張プロファイルにおいても、4×4変換ブロックにおいては実装における後方互換性のために、TSモードであるか否かにかかわらず、第1量子化行列を適用するフラグが有効である場合にはTSモードであっても第1量子化行列が適用されるという問題があった。   On the other hand, even if the first quantization matrix is transmitted in the case of using the TS mode in a block other than the 4 × 4 conversion block in the extension profile (profile other than the general-purpose profile) from such a problem, It is shown that quantization is performed using the second quantization matrix if the block is encoded by the TS mode. However, even in the extension profile, in the 4 × 4 transform block, for backward compatibility in implementation, whether the flag applying the first quantization matrix is valid regardless of whether it is in the TS mode or not. Even in the TS mode, there is a problem that the first quantization matrix is applied.

本発明は上記の点に鑑みてなされたものであり、量子化ひずみに起因する画質の劣化を抑制することができる画像符号化装置、画像復号装置、画像符号化プログラム、及び画像復号プログラムを提供することを目的とする。   The present invention has been made in view of the above points, and provides an image coding apparatus, an image decoding apparatus, an image coding program, and an image decoding program that can suppress deterioration in image quality due to quantization distortion. The purpose is to

第1の特徴に係る画像符号化装置は、予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する直交変換を行う変換部と、4×4のサイズを有する4×4変換ブロックについて、前記直交変換をスキップする変換スキップ(TSモード)を有効化するか否かを、1又は複数のフレームからなるシーケンス単位で判定する有効化判定部と、前記有効化判定部によって前記変換スキップが有効化されたと判定されたシーケンスに対応する各4×4変換ブロックに対して、異なる値の要素からなる第1量子化行列を用いることなく、等しい値の要素からなる第2量子化行列を用いて量子化を行う量子化部とを備える。   An image coding apparatus according to a first feature includes: a transform unit that performs orthogonal transform on a transform block that is a part of a residual image that is a residual between a predicted image and an input image; and 4 having a 4 × 4 size An enabling determination unit that determines whether or not to enable the conversion skip (TS mode) for skipping the orthogonal conversion for a × 4 conversion block in units of a sequence of one or a plurality of frames; For each 4 × 4 transform block corresponding to the sequence for which it is determined that the transform skip has been enabled by the second step, the second step comprises equal elements without using the first quantization matrix of different value elements And a quantization unit that performs quantization using a quantization matrix.

第2の特徴に係る画像復号装置は、予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する逆量子化を行う逆量子化部と、前記逆量子化が施された前記変換ブロックに対する逆直交変換を行う逆変換部と、4×4のサイズを有する4×4変換ブロックについて、直交変換をスキップする変換スキップが有効化されているか否かを、1又は複数のフレームからなるシーケンス単位で判定する有効化判定部とを備える。前記逆変換部は、前記有効化判定部によって前記変換スキップが有効化されていると判定されたシーケンスに対応する各4×4変換ブロックに対して、異なる値の要素からなる第1量子化行列を用いることなく、等しい値の要素からなる第2量子化行列を用いて逆量子化を行う。   An image decoding apparatus according to a second feature includes: an inverse quantization unit that performs inverse quantization on a transform block that is a part of a residual image that is a residual between a predicted image and an input image; Inverse transform unit for performing inverse orthogonal transform on the transform block, and whether or not transform skip for skipping orthogonal transform is enabled for 4 × 4 transform block having a size of 4 × 4. And a validation determination unit that makes a determination in units of a sequence of frames. The inverse transform unit is a first quantization matrix including elements of different values with respect to each 4 × 4 transform block corresponding to the sequence determined to be enabled by the validation determination unit. Inverse quantization is performed using a second quantization matrix consisting of elements of equal values without using.

第3の特徴に係る画像符号化装置は、予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する直交変換を行う変換部と、前記変換ブロックに対する量子化を行う量子化部と、4×4のサイズを有する4×4変換ブロックについて、異なる値の要素からなる第1量子化行列及び等しい値の要素からなる第2量子化行列のうちのいずれかを量子化に用いるか否かをフレーム単位で判定する量子化行列判定部とを備える。前記変換部は、前記量子化行列判定部によって前記第1量子化行列を量子化に用いると判定されたフレームに対応する各4×4変換ブロックに対して、前記直交変換をスキップする変換スキップを適用することなく、当該4×4変換ブロックに対する前記直交変換を行う。   An image coding apparatus according to a third feature performs a transform unit that performs orthogonal transform on a transform block that is a part of a residual image that is a residual between a predicted image and an input image, and performs quantization on the transform block. Quantizing one of a first quantization matrix consisting of elements of different values and a second quantization matrix consisting of elements of equal values, for a 4 × 4 transform block having a size of 4 × 4 And a quantization matrix determination unit that determines whether or not to use for each frame. The conversion unit is configured to perform a conversion skip for skipping the orthogonal conversion for each 4 × 4 conversion block corresponding to a frame determined to use the first quantization matrix for quantization by the quantization matrix determination unit. The orthogonal transform is performed on the 4 × 4 transform block without applying.

第4の特徴に係る画像復号装置は、予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する逆量子化を行う逆量子化部と、前記逆量子化が施された前記変換ブロックに対する逆直交変換を行う逆変換部と、4×4のサイズを有する4×4変換ブロックについて、異なる値の要素からなる第1量子化行列及び等しい値の要素からなる第2量子化行列のうちいずれを逆量子化に用いるかをフレーム単位で判定する量子化行列判定部とを備える。前記逆変換部は、前記量子化行列判定部によって前記第1量子化行列を量子化に用いると判定されたフレームに対応する各4×4変換ブロックに対して、前記逆直交変換をスキップする変換スキップを適用することなく、当該4×4変換ブロックに対する逆直交変換を行う。   An image decoding apparatus according to a fourth feature includes: an inverse quantization unit that performs inverse quantization on a transform block that is a part of a residual image that is a residual between a predicted image and an input image; Performing inverse orthogonal transformation on the transformed block, and for a 4 × 4 transform block having a size of 4 × 4, a first quantization matrix composed of elements of different values and a second composed of elements of equal values And a quantization matrix determination unit that determines which one of the quantization matrices is to be used for inverse quantization in units of frames. The inverse transformation unit is a transformation that skips the inverse orthogonal transformation for each 4 × 4 transformation block corresponding to a frame determined to use the first quantization matrix for quantization by the quantization matrix determination unit. Inverse orthogonal transform is performed on the 4 × 4 transform block without applying skips.

本発明によれば、量子化ひずみに起因する画質の劣化を抑制することができる画像符号化装置、画像復号装置、画像符号化プログラム、及び画像復号プログラムが提供される。   According to the present invention, an image coding apparatus, an image decoding apparatus, an image coding program, and an image decoding program capable of suppressing deterioration in image quality caused by quantization distortion are provided.

第1及び第2実施形態に係る画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image coding apparatus concerning 1st and 2nd embodiment. 量子化行列の例を示す図である。It is a figure which shows the example of a quantization matrix. 変換ブロックの区分の一例を示す図である。It is a figure which shows an example of division of a conversion block. 第1実施形態に係る符号化処理の一例を示すフローチャートである。It is a flowchart which shows an example of the encoding process concerning 1st Embodiment. 第1及び第2実施形態に係る画像復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image decoding apparatus which concerns on 1st and 2nd embodiment. 第1実施形態に係る復号処理の一例を示すフローチャートである。It is a flowchart which shows an example of the decoding process concerning 1st Embodiment. 第2実施形態に係る符号化処理の一例を示すフローチャートである。It is a flowchart which shows an example of the encoding process which concerns on 2nd Embodiment. 第2実施形態に係る復号処理の一例を示すフローチャートである。It is a flowchart which shows an example of the decoding process concerning 2nd Embodiment.

以下、図面を参照しながら本発明の第1及び第2実施形態について説明する。第1及び第2実施形態において、画像符号化装置はHEVC方式に基づく符号化処理を行い、画像復号装置はHEVC方式に基づく復号処理を行う。   Hereinafter, first and second embodiments of the present invention will be described with reference to the drawings. In the first and second embodiments, the image coding apparatus performs coding processing based on the HEVC scheme, and the image decoding apparatus performs decoding processing based on the HEVC scheme.

(1)第1実施形態
(1.1)画像符号化装置
第1実施形態に係る画像符号化装置について説明する。
(1) First Embodiment (1.1) Image Coding Device An image coding device according to the first embodiment will be described.

(1.1.1)画像符号化装置の構成
図1は、第1実施形態に係る画像符号化装置1の構成を示す。
(1.1.1) Configuration of Image Encoding Device FIG. 1 shows a configuration of an image encoding device 1 according to the first embodiment.

図1に示すように、画像符号化装置1は、フレームバッファ101、減算部102、符号化データ生成部103、制御部109、加算部(合成部)110、デブロッキングフィルタ111、参照メモリ112、予測部113、可逆符号化部114、蓄積バッファ115、及び動きベクトル算出部116を備える。   As shown in FIG. 1, the image encoding device 1 includes a frame buffer 101, a subtraction unit 102, an encoded data generation unit 103, a control unit 109, an addition unit (synthesis unit) 110, a deblocking filter 111, a reference memory 112, The prediction unit 113, the lossless encoding unit 114, the accumulation buffer 115, and the motion vector calculation unit 116 are provided.

第1実施形態に係る画像符号化装置1は、予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する直交変換を行う変換部104と、変換ブロックに対する量子化を行う量子化部105と、4×4のサイズを有する4×4変換ブロックについて、異なる値の要素からなる第1量子化行列及び等しい値の要素からなる第2量子化行列のうちのいずれかを量子化に用いるか否かをフレーム単位で判定する量子化行列判定部109dとを備える。変換部104は、量子化行列判定部109dによって第1量子化行列を量子化に用いると判定されたフレームに対応する各4×4変換ブロックに対して、直交変換をスキップする変換スキップを適用することなく、当該4×4変換ブロックに対する直交変換を行う。   The image coding apparatus 1 according to the first embodiment includes a transform unit 104 that performs orthogonal transform on a transform block that is a part of a residual image that is a residual between a predicted image and an input image, and quantization on the transform block. The quantization unit 105 for performing, and for a 4 × 4 transform block having a size of 4 × 4, either one of a first quantization matrix consisting of elements of different values and a second quantization matrix consisting of elements of equal values And a quantization matrix determination unit 109d that determines whether or not to use for quantization on a frame basis. The transformation unit 104 applies transformation skip for skipping orthogonal transformation to each 4 × 4 transformation block corresponding to a frame determined to be used for quantization by the quantization matrix determination unit 109 d. Without performing orthogonal transform on the 4 × 4 transform block.

フレームバッファ101は、画像符号化装置1の外部から入力された画像信号をフレームごとに一時的に記憶する。   The frame buffer 101 temporarily stores, for each frame, an image signal input from the outside of the image encoding device 1.

なお、フレームバッファ101は、入力画像信号を記憶する際、予め定めたGOP(Group of Picture)構造に応じて各フレームの順序を並び替えてもよい。このGOP構造とは、所定のフレーム数からなるフレームの種類(例えば、イントラフレーム、インターフレーム等)の配列をいう。イントラフレームとは、フレーム内予測(イントラ予測)を行って符号化される画像信号のフレームをいう。インターフレームとは、フレーム間予測(インター予測)を行って符号化される画像信号のフレームをいう。   Note that, when storing the input image signal, the frame buffer 101 may rearrange the order of each frame according to a predetermined GOP (Group of Picture) structure. The GOP structure is an array of frame types (for example, intra frames, inter frames, etc.) consisting of a predetermined number of frames. An intra frame refers to a frame of an image signal to be encoded by performing intra-frame prediction (intra prediction). The inter frame refers to a frame of an image signal to be encoded by performing inter prediction.

フレームバッファ101は、記憶した入力画像信号から現在処理を行うフレーム(現フレーム、カレントフレームともいう)の画像信号を特定し、特定したフレームの画像信号から、その一部として現在処理を行うブロック(現ブロック、カレントブロックともいう)の画像を示す入力画像ブロック信号を読み出す。   The frame buffer 101 identifies an image signal of a frame (also referred to as a current frame or current frame) to be currently processed from the stored input image signal, and performs a current process as a part of the image signal of the identified frame An input image block signal indicating an image of a current block or a current block) is read out.

フレームバッファ101が現ブロックを選択する順序は、例えば、ラスタスキャンの順序と同一であってもよい。フレームバッファ101は、読み出した入力画像ブロック信号を減算部102及び動きベクトル算出部116に出力する。   The order in which the frame buffer 101 selects the current block may be, for example, the same as the order of raster scan. The frame buffer 101 outputs the read input image block signal to the subtraction unit 102 and the motion vector calculation unit 116.

減算部102は、フレームバッファ101から入力された入力画像ブロック信号から、予測部113から入力された予測画像ブロック信号を減算し、差分画像ブロック信号を生成する。   The subtraction unit 102 subtracts the predicted image block signal input from the prediction unit 113 from the input image block signal input from the frame buffer 101 to generate a difference image block signal.

ここで、減算部102は、入力画像ブロック信号を形成する画素毎の信号値から、参照画像ブロック信号を形成する信号値のうち対応する画素の信号値を減算し、生成した差分画像ブロック信号を符号化データ生成部103に出力する。   Here, the subtraction unit 102 subtracts the signal value of the corresponding pixel among the signal values forming the reference image block signal from the signal value of each pixel forming the input image block signal, and generates the generated difference image block signal. It is output to the encoded data generation unit 103.

符号化データ生成部103は、減算部102から入力された差分画像ブロック信号について、より情報量が低減された符号化データを生成し、生成した符号化データのうち制御部109から入力された制御信号が示す処理態様(モード)に応じた符号化データを可逆符号化部114に出力する。この制御信号が示す処理態様は、例えば、直交変換をスキップするか否かの判定や、直交変換処理、量子化を行う際に用いる量子化行列の設定及び量子化処理等がある。   The encoded data generation unit 103 generates encoded data in which the information amount is further reduced for the difference image block signal input from the subtraction unit 102, and controls the control unit 109 among the generated encoded data. The encoded data corresponding to the processing mode (mode) indicated by the signal is output to the lossless encoding unit 114. The processing mode indicated by the control signal includes, for example, determination as to whether or not to skip orthogonal transformation, orthogonal transformation, setting of a quantization matrix used when performing quantization, and quantization.

また、符号化データ生成部103は、それぞれ逆処理を備え、生成した符号化データを復号して復元差分画像ブロック信号を生成し、生成した復元差分画像ブロック信号を加算部110に出力する。   Also, the encoded data generation unit 103 includes reverse processing, decodes the generated encoded data to generate a restored difference image block signal, and outputs the generated restored difference image block signal to the addition unit 110.

符号化データ生成部103は、変換部104、量子化部105、逆量子化部106、逆変換部107、及び量子化行列設定部108を備える。   The encoded data generation unit 103 includes a conversion unit 104, a quantization unit 105, an inverse quantization unit 106, an inverse conversion unit 107, and a quantization matrix setting unit 108.

変換部104は、減算部102から入力された差分画像ブロック信号について直交変換し、直交変換係数データを生成し、生成した変換係数データを量子化部105に出力する。   The transform unit 104 performs orthogonal transform on the differential image block signal input from the subtraction unit 102, generates orthogonal transform coefficient data, and outputs the generated transform coefficient data to the quantization unit 105.

直交変換とは、例えば、離散コサイン変換(DCT:Discrete Cosine Transform)や離散サイン変換(DST:Discrete Sine Transform)等をいう。なお、制御信号が示す処理態様によっては、変換部104は、直交変換をスキップする場合がある。その場合、変換部104は、差分画像ブロック信号を変換せずに変換係数データとして量子化部105に出力する。直交変換をスキップする動作態様は、TS(Transform Skip、変換スキップ)モードと呼ばれることがある。   Orthogonal transformation means, for example, discrete cosine transform (DCT), discrete sine transform (DST) or the like. Note that, depending on the processing mode indicated by the control signal, the transform unit 104 may skip orthogonal transformation. In that case, the conversion unit 104 outputs the difference image block signal to the quantization unit 105 as conversion coefficient data without converting it. The operation mode that skips the orthogonal transformation may be referred to as a TS (Transform Skip) mode.

量子化部105は、変換部104から入力された変換係数データが示す変換係数を量子化パラメータqP及び量子化行列を用いて量子化し、量子化した変換係数を示す量子化変換係数データを生成する。量子化パラメータqPは、ブロック内のデータに対して共通して適応される。量子化行列設定部108は、ブロック内の変換係数ごとに指定する量子化値によって構成される量子化行列を設定、する。量子化行列の各要素の値(量子化値)は、変換係数データの対応する要素の変換係数を量子化するための量子化幅を示す。量子化行列を構成する要素は、スケーリングファクタ(Scaling Factor)と呼ばれることがあるが、この量子化行列の例については後述する。なお、直交変換がスキップされた場合には、量子化部105に入力される変換係数データは、差分画像ブロックの信号値を示す差分画像ブロック信号である。量子化部105は、生成した量子化変換係数データを逆量子化部106に出力し、その量子化情報(量子化パラメータqP及び量子化行列)と量子化変換係数データとを符号化データの一部として可逆符号化部114に出力する。   The quantization unit 105 quantizes the conversion coefficient indicated by the conversion coefficient data input from the conversion unit 104 using the quantization parameter qP and the quantization matrix, and generates quantization conversion coefficient data indicating the quantized conversion coefficient. . The quantization parameter qP is commonly applied to the data in the block. The quantization matrix setting unit 108 sets a quantization matrix configured by quantization values specified for each transform coefficient in the block. The value (quantization value) of each element of the quantization matrix indicates the quantization width for quantizing the transform coefficient of the corresponding element of the transform coefficient data. The elements constituting the quantization matrix are sometimes called scaling factors, and examples of this quantization matrix will be described later. When orthogonal transformation is skipped, transform coefficient data input to the quantization unit 105 is a differential image block signal indicating the signal value of the differential image block. The quantization unit 105 outputs the generated quantization transformation coefficient data to the inverse quantization unit 106, and the quantization information (quantization parameter qP and quantization matrix) and the quantization transformation coefficient data are one of encoded data. Output to the lossless encoding unit 114 as a part.

逆量子化部106は、量子化部105から入力された量子化変換係数データが示す量子化変換係数を、量子化行列設定部108が設定した量子化行列と量子化パラメータqPとを用いて逆量子化し、復元変換係数を算出する。逆量子化部106が用いる量子化行列は、その量子化行列を生成する際に用いられた量子化行列と同一である。逆量子化部106は、算出した復元変換係数を示す復元変換係数データを逆変換部107に出力する。   The inverse quantization unit 106 dequantizes the quantization conversion coefficient indicated by the quantization conversion coefficient data input from the quantization unit 105 using the quantization matrix set by the quantization matrix setting unit 108 and the quantization parameter qP. Quantize and calculate restoration transform coefficients. The quantization matrix used by the inverse quantization unit 106 is the same as the quantization matrix used when generating the quantization matrix. The inverse quantization unit 106 outputs restoration transform coefficient data indicating the calculated restoration transform coefficient to the inverse transform unit 107.

逆変換部107は、逆量子化部106から入力された復元変換係数データが示す復元変換係数について逆直交変換し、復元差分画像ブロック信号を生成する。逆変換部107は、生成した復元差分画像ブロック信号を加算部110に出力する。逆変換部107が用いる逆直交変換は、変換部104が行う直交変換の逆演算である。例えば、変換部104がDCTを用いる場合には、逆変換部107はIDCT(Inverse DCT、逆離散コサイン変換)を用いる。また、変換部104が直交変換をスキップする場合には、逆変換部107は、逆直交変換をスキップする。その場合には、入力される復元変換係数データは、量子化された差分画像ブロックの信号値を示す信号であるため、逆変換部107は、入力された復元変換係数データを復元差分画像ブロック信号として加算部110に出力する。   The inverse transform unit 107 performs inverse orthogonal transform on the decompressed transform coefficient indicated by the decompressed transform coefficient data input from the inverse quantization unit 106, and generates a decompressed difference image block signal. The inverse transform unit 107 outputs the generated restored difference image block signal to the addition unit 110. The inverse orthogonal transform used by the inverse transform unit 107 is an inverse operation of the orthogonal transform performed by the transform unit 104. For example, when the transform unit 104 uses a DCT, the inverse transform unit 107 uses IDCT (Inverse DCT, inverse discrete cosine transform). When the transform unit 104 skips the orthogonal transform, the inverse transform unit 107 skips the inverse orthogonal transform. In that case, since the input restored transform coefficient data is a signal indicating the signal value of the quantized difference image block, the inverse transform unit 107 restores the input restored transform coefficient data. Output to the addition unit 110 as

量子化行列設定部108は、制御部109から入力された制御信号が示す処理態様に基づいて、量子化及び逆量子化に用いる量子化行列を量子化部105及び逆量子化部106に設定し、設定される量子化行列の候補である候補行列データを予め複数個(例えば、3個)記憶する。複数の候補行列データのうちの1つは、初期値(デフォルト)の候補行列データである。初期値の候補行列データは、例えば要素間で共通の量子化値(例えば、16)を有する。以下では、この要素間で共通の量子化値の候補行列データ若しくはその量子化行列を単に初期値、又は平坦(フラット)な初期値と呼ぶことがある。等しい値の要素からなる量子化行列は、第2量子化行列に相当する。残りの候補行列データが示す量子化行列は、要素間で各々異なる量子化値を有していてもよい。異なる値の要素からなる量子化行列は、第1量子化行列に相当する。ここで、異なる値の要素とは、量子化行列を構成する全ての要素の値が異なる場合に限らず、量子化行列を構成する一部の要素の値が異なっていてもよい。例えば、量子化行列において、それぞれが少なくとも1つの要素からなる複数のグループを定義し、グループ内では要素の値が等しく、かつグループ間では要素の値が異なるものであってもよい。なお、量子化行列設定部108に記憶された第2量子化行列を示す候補行列データの個数は、1個に限られず、2個以上であってもよい。以下の説明では、量子化行列設定部108が設定した第1量子化行列を、「設定された量子化行列」又は「平坦でない量子化行列」と呼ぶことがある。なお、量子化行列設定部108は、現フレームの種類(例えば、イントラフレーム、インターフレーム等)、ブロックサイズ、信号値の種類(例えば、輝度信号、色差信号等)に応じて、所定の設定された量子化行列を選択してもよい。また、量子化行列設定部108は、差分画像ブロック毎の周波数特性に応じて量子化行列を選択してもよい。   The quantization matrix setting unit 108 sets a quantization matrix to be used for quantization and dequantization in the quantization unit 105 and the dequantization unit 106 based on the processing mode indicated by the control signal input from the control unit 109. A plurality (for example, three) of candidate matrix data, which are candidates for the quantization matrix to be set, are stored in advance. One of the plurality of candidate matrix data is candidate matrix data of an initial value (default). The initial value candidate matrix data has, for example, a quantization value (e.g., 16) common to the elements. Hereinafter, candidate matrix data of quantization values common to the elements or the quantization matrix may be referred to simply as an initial value or a flat initial value. The quantization matrix consisting of elements of equal value corresponds to the second quantization matrix. The quantization matrices indicated by the remaining candidate matrix data may have different quantization values among the elements. The quantization matrix composed of elements of different values corresponds to the first quantization matrix. Here, the elements having different values are not limited to the case where the values of all the elements constituting the quantization matrix are different, and the values of some elements constituting the quantization matrix may be different. For example, in the quantization matrix, a plurality of groups each of which includes at least one element may be defined, the values of the elements may be equal in the groups, and the values of the elements may be different between the groups. The number of pieces of candidate matrix data indicating the second quantization matrix stored in the quantization matrix setting unit 108 is not limited to one, and may be two or more. In the following description, the first quantization matrix set by the quantization matrix setting unit 108 may be referred to as “set quantization matrix” or “non-flat quantization matrix”. The quantization matrix setting unit 108 is set in a predetermined manner in accordance with the type of the current frame (for example, intra frame, inter frame, etc.), the block size, and the type of signal value (for example, luminance signal, color difference signal, etc.). The quantization matrix may be selected. Further, the quantization matrix setting unit 108 may select the quantization matrix in accordance with the frequency characteristic of each differential image block.

制御部109は、画像符号化装置1全体の動作を制御する。制御部109は、差分画像ブロックごとに、処理態様として、直交変換をスキップするか否か、及びいかなる量子化行列(例えば、平坦な量子化行列又は平坦でない量子化行列)を選択するかを判定する。制御部109は、例えば、各処理態様について復元差分画像ブロック信号の差分画像ブロック信号との近似の度合いを示すコスト値を算出し、算出したコスト値に基づいて最も符号化効率が高い差分画像ブロック信号に近似する処理態様を選択する。その指標は、例えば、SAD(Sum of Absolute Differences、絶対差分和)、SSD(Sum of Squared Differences、二乗差分和)、RD(Rate−Distortion)コスト等である。制御部109は、判定した処理態様を示す制御信号を符号化データ生成部103に出力し、判定結果を示す制御信号を符号化データの一部として可逆符号化部114に出力する。   The control unit 109 controls the overall operation of the image encoding device 1. The control unit 109 determines, for each differential image block, as a processing mode, whether or not to skip orthogonal transformation, and which quantization matrix (for example, a flat quantization matrix or a non-flat quantization matrix) to select Do. The control unit 109 calculates, for example, a cost value indicating the degree of approximation of the restored difference image block signal with the difference image block signal for each processing mode, and the difference image block having the highest coding efficiency based on the calculated cost value. Select a processing mode that approximates the signal. The index is, for example, SAD (Sum of Absolute Differences, absolute difference sum), SSD (Sum of Squared Differences, square difference sum), RD (Rate-Distortion) cost or the like. The control unit 109 outputs a control signal indicating the determined processing mode to the encoded data generation unit 103, and outputs a control signal indicating the determination result to the lossless encoding unit 114 as a part of encoded data.

制御部109は、分割制御部109a、TS有効化判定部109b、TS適用判定部109c、及び量子化行列判定部109dを備える。   The control unit 109 includes a division control unit 109a, a TS validation determination unit 109b, a TS application determination unit 109c, and a quantization matrix determination unit 109d.

分割制御部109aは、符号化がなされる単位である差分画像ブロック(逆変換部107が逆変換処理を行う単位でもある)を分割して、更に細分化した変換ブロックを生成するための制御を行う。差分画像ブロックを原ブロックとして変換ブロックに分割する処理をブロック分割と呼ぶ。ブロック分割の詳細については後述する。分割制御部109aは、変換ブロックごとに、4×4のブロックサイズを有する4×4変換ブロックであるか否かを判定するブロックサイズ判定部を構成する。   The division control unit 109a divides the differential image block (which is also a unit for the inverse transformation unit 107 to perform inverse transformation processing), which is a unit to be encoded, and controls to generate a further subdivided transformation block. Do. A process of dividing a difference image block into a conversion block as an original block is called block division. Details of the block division will be described later. The division control unit 109a configures a block size determination unit that determines, for each conversion block, whether it is a 4 × 4 conversion block having a 4 × 4 block size.

TS有効化判定部109bは、フレーム単位又は複数のフレームからなるシーケンス単位で、変換ブロックに対する直交変換をスキップする変換スキップ(TS:Transform Skip)を有効化するか否かを判定する。第1実施形態においては、変換スキップが有効化されている場合を想定する。TS有効化判定部109bの詳細については、第2実施形態において説明する。   The TS validation determination unit 109b determines whether to validate a transform skip (TS: Transform Skip) that skips orthogonal transformation on a transform block in a frame unit or a sequence unit including a plurality of frames. In the first embodiment, it is assumed that the conversion skip is enabled. Details of the TS validation determination unit 109b will be described in the second embodiment.

TS適用判定部109cは、差分画像ブロック(変換ブロック)ごとに、直交変換をスキップするか否かを判定する。TS適用判定部109cは、TS有効化判定部109bがフレーム単位又はシーケンス単位で変換スキップを有効化すると判定した場合に限り、直交変換をスキップするか否かの判定を行ってもよい。TS適用判定部109cは、直交変換をスキップすると判定した変換ブロックについて、直交変換をスキップすることを示す制御信号(例えば、transform_skip_flag=1)を生成する。transform_skip_flag=1は、現在の変換ブロックに変換スキップが適用されることを示す。一方で、TS適用判定部109cは、直交変換をスキップしないと判定した変換ブロックについて、直交変換をスキップしないことを示す制御信号(例えば、transform_skip_flag=0)を生成する。   The TS application determination unit 109c determines, for each difference image block (transformation block), whether or not to skip the orthogonal transformation. The TS application determination unit 109c may determine whether or not to skip the orthogonal transformation only when the TS validation determination unit 109b determines to validate the conversion skip on a frame basis or a sequence basis. The TS application determination unit 109 c generates a control signal (for example, transform_skip_flag = 1) indicating that orthogonal transformation is skipped for a transform block determined to skip orthogonal transformation. transform_skip_flag = 1 indicates that a transform skip is applied to the current transform block. On the other hand, the TS application determination unit 109 c generates a control signal (for example, transform_skip_flag = 0) indicating that orthogonal transformation is not skipped for a transform block determined to not skip orthogonal transformation.

量子化行列判定部109dは、サイズの異なる差分画像ブロック(変換ブロック)ごとに、いかなる量子化行列(例えば、平坦な量子化行列又は平坦でない量子化行列)を選択するかを判定する。例えば、量子化行列判定部109dは、4×4変換ブロックについて、平坦な量子化行列又は平坦でない量子化行列のうちいずれを逆量子化に用いるかをフレーム単位で判定する。平坦な量子化行列としては例えばHEVCで規定されているすべての量子化幅が16と設計された初期値などがある。平坦でない量子化行列を用いると判定された場合、量子化行列判定部109dは、平坦でない量子化行列を用いることを示す制御信号(例えば、scaling_list_enable_flag=1)を生成する。scaling_list_enable_flag=1は、スケーリングリストを変換係数の量子化に用いることを示す。スケーリングリストは、平坦でない量子化行列を構成する各要素(スケーリングファクタ)を示すリストである。或いは、平坦でない量子化行列を用いることを示す制御信号は、4×4ブロックのscaling_list_pred_mode_flag=1、かつ、平坦でない量子化行列を指示又はエンコーダ定義の量子化行列が平坦でないことを示すものであってもよい。scaling_list_pred_mode_flag=1は、スケーリングリスト中の値が明示的に指示(通知)されることを示す。一方で、平坦な量子化行列を用いると判定された場合、量子化行列判定部109dは、平坦な量子化行列を用いることを示す制御信号(例えば、scaling_list_enable_flag=0)を生成する。scaling_list_enable_flag=0は、スケーリングリストを変換係数の量子化に用いないことを示す。或いは、平坦な量子化行列を用いることを示す制御信号は、scaling_list_enable_flag=1であって、4×4ブロックのscaling_list_pred_mode_flag=1、かつ、平坦な量子化行列を指示又はエンコーダ定義の量子化行列が平坦であることを示すものであってもよい。   The quantization matrix determination unit 109d determines which quantization matrix (for example, a flat quantization matrix or a non-flat quantization matrix) to select for each difference image block (transform block) having a different size. For example, the quantization matrix determination unit 109d determines, for each 4 × 4 transform block, which of the flat quantization matrix and the non-flat quantization matrix is to be used for inverse quantization. As a flat quantization matrix, for example, there is an initial value designed such that all quantization widths defined in HEVC are 16 and so on. If it is determined that a non-flat quantization matrix is to be used, the quantization matrix determination unit 109d generates a control signal (for example, scaling_list_enable_flag = 1) indicating that the non-flat quantization matrix is to be used. scaling_list_enable_flag = 1 indicates that the scaling list is used for quantization of transform coefficients. The scaling list is a list showing each element (scaling factor) that constitutes a non-flat quantization matrix. Alternatively, the control signal indicating that a non-flat quantization matrix is to be used is a 4 × 4 block scaling_list_pred_mode_flag = 1 and indicates a non-flat quantization matrix or indicates that an encoder-defined quantization matrix is not flat. May be scaling_list_pred_mode_flag = 1 indicates that the value in the scaling list is explicitly indicated (notified). On the other hand, when it is determined that a flat quantization matrix is to be used, the quantization matrix determination unit 109d generates a control signal (for example, scaling_list_enable_flag = 0) indicating that a flat quantization matrix is to be used. scaling_list_enable_flag = 0 indicates that the scaling list is not used for quantization of transform coefficients. Alternatively, the control signal indicating that a flat quantization matrix is used is scaling_list_enable_flag = 1, 4 × 4 block scaling_list_pred_mode_flag = 1, and a flat quantization matrix is indicated or the encoder definition quantization matrix is flat. It may indicate that the

第1実施形態において、量子化行列判定部109dの判定は、TS適用判定部109cの判定よりも前に行なわれる。TS適用判定部109cは、第1量子化行列(平坦でない量子化行列)を量子化に用いると判定されたフレームに対応する4×4変換ブロックについて、変換スキップを適用するか否かの判定を省略する。TS適用判定部109cの判定を省略することによって、符号化処理の処理量を削減するとともに符号化処理を高速化することができる。そして、変換部104は、制御信号に基づいて、第1量子化行列を量子化に用いると判定された4×4変換ブロックに対して、変換スキップを適用することなく、当該4×4変換ブロックに対する直交変換および量子化処理を行う。換言すると、変換部104は、第1量子化行列を量子化に用いる4×4変換ブロックについては必ず直交変換を行う。これにより、第1量子化行列が適用される4×4変換ブロックに変換スキップが適用されないようにすることができるため、HEVC方式において4×4変換ブロックの変換スキップ時の量子化ひずみに起因する画質の劣化を抑制することができる。   In the first embodiment, the determination of the quantization matrix determination unit 109d is performed before the determination of the TS application determination unit 109c. The TS application determination unit 109c determines whether or not to apply conversion skip to a 4 × 4 transform block corresponding to a frame determined to use the first quantization matrix (non-flat quantization matrix) for quantization. I omit it. By omitting the determination of the TS application determination unit 109c, the amount of processing of the encoding process can be reduced and the encoding process can be speeded up. Then, the conversion unit 104 does not apply conversion skip to the 4 × 4 conversion block determined to use the first quantization matrix for quantization based on the control signal, and the 4 × 4 conversion block Perform orthogonal transformation and quantization processing for In other words, the transform unit 104 always performs orthogonal transform on a 4 × 4 transform block that uses the first quantization matrix for quantization. As a result, it is possible to prevent the conversion skip from being applied to the 4 × 4 conversion block to which the first quantization matrix is applied, which results in quantization distortion at the time of conversion skip of the 4 × 4 conversion block in the HEVC scheme. It is possible to suppress the deterioration of the image quality.

加算部110は、逆変換部107から入力された復元差分画像ブロック信号と、予測部113から入力された予測画像ブロック信号とを加算(合成)して、復元画像ブロック信号を生成する。ここで、加算部110は、復元差分画像ブロック信号を形成する画素毎の信号値と予測画像ブロック信号を形成する信号値のうち対応する画素の信号値とを加算する。加算部110は、生成した復元画像ブロック信号をデブロッキングフィルタ111に出力する。   The addition unit 110 adds (combines) the restored difference image block signal input from the inverse conversion unit 107 and the predicted image block signal input from the prediction unit 113 to generate a restored image block signal. Here, the adding unit 110 adds the signal value of each pixel forming the restored difference image block signal and the signal value of the corresponding pixel among the signal values forming the predicted image block signal. The addition unit 110 outputs the generated restored image block signal to the deblocking filter 111.

デブロッキングフィルタ111は、加算部110から入力された復元画像ブロック信号にフィルタリング処理を行ってブロック歪の成分を除去する。また、鮮鋭度向上のためのフィルタ処理(例えばサンプル適応フィルタ:SAO)などを伴ってもよい。デブロッキングフィルタ111は、これらの符号化歪の成分が除去された復元画像ブロック信号を参照画像ブロック信号として参照メモリ112に記憶させる。   The deblocking filter 111 performs filtering processing on the restored image block signal input from the adding unit 110 to remove the block distortion component. In addition, filter processing for improving sharpness (for example, sample adaptive filter: SAO) may be involved. The deblocking filter 111 stores the restored image block signal from which the components of the coding distortion have been removed in the reference memory 112 as a reference image block signal.

参照メモリ112は、デブロッキングフィルタ111から入力された参照画像ブロック信号を、フレームごとに、その参照画像ブロックに応じた表示領域に対応する記憶領域に記憶し、参照画像を示す参照画像信号をフレームごとに記憶する。   The reference memory 112 stores the reference image block signal input from the deblocking filter 111 in a storage area corresponding to the display area corresponding to the reference image block for each frame, and the reference image signal indicating the reference image is a frame Remember each time.

予測部113は、参照メモリ112に既に記憶された参照画像信号を用いて公知の予測処理を行って現ブロックに係る予測画像ブロック信号を生成し、生成した予測画像ブロック信号を減算部102に出力する。ここで、予測部113は、現フレームがイントラフレームである場合には、現フレームに係る参照画像信号を用いてイントラ予測を行って現ブロックに係る予測画像ブロック信号を生成する。予測部113は、現フレームがインターフレームである場合には、現フレームとは異なるフレームに係る参照画像信号を用いてインター予測を行って現ブロックに係る予測画像ブロック信号を取得する。ここで、予測部113は、その参照画像信号から現ブロックを基準として動きベクトル算出部116から入力された動きベクトルで指定される位置のブロックを予測画像ブロック信号として抽出する。インター予測に用いられる参照画像信号のフレームは、所定のGOP構造に応じたフレーム順序のうち現フレームがどのフレームであるかによって定められる。なお、予測部113は、選択した予測モードを示すモードデータを符号化データの一部として可逆符号化部114に出力する。   The prediction unit 113 performs known prediction processing using the reference image signal already stored in the reference memory 112 to generate a prediction image block signal according to the current block, and outputs the generated prediction image block signal to the subtraction unit 102. Do. Here, when the current frame is an intra frame, the prediction unit 113 performs intra prediction using a reference image signal related to the current frame to generate a predicted image block signal related to the current block. When the current frame is an inter frame, the prediction unit 113 performs inter prediction using a reference image signal related to a frame different from the current frame to obtain a predicted image block signal related to the current block. Here, the prediction unit 113 extracts a block at a position designated by the motion vector input from the motion vector calculation unit 116 from the reference image signal with reference to the current block as a predicted image block signal. The frame of the reference image signal used for inter prediction is determined by which frame the current frame is in the frame order according to the predetermined GOP structure. The prediction unit 113 outputs the mode data indicating the selected prediction mode to the lossless encoding unit 114 as a part of the encoded data.

動きベクトル算出部116は、予測部113が予測画像ブロック信号を生成する際に参照する参照画像信号のフレームを示す参照画像データと、フレームバッファ101から入力された入力画像ブロック信号とを比較し、動きベクトルを算出する。動きベクトル算出部116は、現ブロックの代表点(例えば、左上端の画素)から選択した画像ブロックの代表点までのベクトルを動きベクトルと定める。動きベクトル算出部116は、定めた動きベクトルを予め定めた期間記憶する記憶部(図示せず)を備え、定めた動きベクトルとの距離が小さい現ブロックの近傍のブロックの動きベクトルから導かれる候補動きベクトルを予測ベクトルとして選択(ベクトル予測)する。動きベクトル算出部116は、定めた動きベクトルと選択された予測ベクトルとの差分ベクトルを算出し、算出した差分ベクトルと定めた予測ベクトルを示すベクトルインデックスを符号化データの一部として可逆符号化部114に出力する。動きベクトル算出部116は、定めた動きベクトルを予測部113に出力する。   The motion vector calculation unit 116 compares reference image data indicating a frame of a reference image signal to be referred to when the prediction unit 113 generates a predicted image block signal with the input image block signal input from the frame buffer 101, Calculate motion vector. The motion vector calculation unit 116 determines a vector from the representative point (for example, the pixel at the upper left end) of the current block to the representative point of the selected image block as a motion vector. The motion vector calculation unit 116 includes a storage unit (not shown) that stores a predetermined motion vector for a predetermined period, and is a candidate derived from the motion vectors of blocks near the current block having a small distance to the predetermined motion vector. A motion vector is selected as a prediction vector (vector prediction). The motion vector calculation unit 116 calculates a difference vector between the determined motion vector and the selected prediction vector, and the lossless encoding unit uses the calculated difference vector and a vector index indicating the determined prediction vector as part of the encoded data. Output to 114. The motion vector calculation unit 116 outputs the determined motion vector to the prediction unit 113.

可逆符号化部114には、符号化データ生成部103から符号化データの一部として、量子化変換係数データ、候補行列データ若しくはそのデータに係る符号(該当する場合)が入力され、制御部109から符号化データの一部として制御信号が入力される。可逆符号化部114には、予測部113から符号化データの一部としてモードデータが入力され、動きベクトル算出部116から差分ベクトル、ベクトルインデックス(該当する場合)が入力される。可逆符号化部114は、入力された符号化データをフレームごとに統合し、統合したデータ(統合データ)について可逆符号化、例えば、エントロピー符号化を行ってビットストリームを生成する。可逆符号化部114は、生成したビットストリームを蓄積バッファ115に記憶する。   The lossless encoding unit 114 receives, as part of the encoded data, the quantized transform coefficient data, the candidate matrix data, or the code (if applicable) relating to the data from the encoded data generation unit 103, The control signal is input as a part of the encoded data. The lossless encoding unit 114 receives mode data from the prediction unit 113 as a part of encoded data, and receives a difference vector and a vector index (if applicable) from the motion vector calculation unit 116. The lossless encoding unit 114 integrates the input encoded data for each frame, and performs lossless encoding, eg, entropy encoding, on the integrated data (integrated data) to generate a bit stream. The lossless encoding unit 114 stores the generated bit stream in the accumulation buffer 115.

蓄積バッファ115は、可逆符号化部114から入力されたビットストリームを記憶する。蓄積バッファ115は、記憶したビットストリームを、画像符号化装置1の外部、例えば、画像復号装置2に順次出力する。   The accumulation buffer 115 stores the bit stream input from the lossless encoding unit 114. The accumulation buffer 115 sequentially outputs the stored bit stream to the outside of the image coding device 1, for example, to the image decoding device 2.

(1.1.2)量子化行列の例
次に、量子化行列の例について説明する。図2は、量子化行列の例を示す図である。
(1.1.2) Example of quantization matrix Next, an example of the quantization matrix will be described. FIG. 2 is a diagram illustrating an example of the quantization matrix.

図2(a)、(b)は、それぞれ水平方向に4個(4列)、垂直方向に4個(4行)、計16個の量子化値を有する量子化行列tb11、tb21を示す。量子化行列tb11、tb21にそれぞれ含まれる四角形は要素を示す。四角形のそれぞれに記載された数字は量子化値を示し、その量子化値はその四角形の領域の濃淡でも表されている。図2に示す例では、濃く塗りつぶされた領域ほど量子化値が大きく、薄い領域ほど量子化値が小さい。   FIGS. 2A and 2B show quantization matrices tb11 and tb21 each having 16 quantization values in total (four columns in the horizontal direction and four columns in the vertical direction). The squares included in the quantization matrices tb11 and tb21 indicate elements. The numbers described in each of the squares indicate the quantization value, which is also represented by the shading of the square area. In the example shown in FIG. 2, the quantization value is larger as the area is filled in darker, and the quantization value is smaller as the area is thinner.

図2(a)に示すように、量子化行列tb11は、平坦な量子化行列(第2量子化行列)の一例であり、各要素の量子化値はいずれも16である。このような量子化行列を用いると、量子化の対象となる変換係数や信号値が要素によらず同一な精度で量子化できる。そのため、直交変換が行われない場合に、量子化行列tb21等のように量子化値に偏りを有する量子化行列を用いることによる、画質の劣化を回避できる。   As shown in FIG. 2A, the quantization matrix tb11 is an example of a flat quantization matrix (second quantization matrix), and the quantization value of each element is 16. By using such a quantization matrix, it is possible to quantize the transform coefficient to be quantized and the signal value with the same precision regardless of the elements. Therefore, when the orthogonal transformation is not performed, it is possible to avoid the deterioration of the image quality by using the quantization matrix having a bias in the quantization value such as the quantization matrix tb21 and the like.

図2(b)に示すように、量子化行列tb21は、平坦でない量子化行列(第1量子化行列)の一例である。量子化行列tb21は、水平方向、垂直方向の次数がそれぞれ大きくなるほど、大きな量子化値を有する。量子化行列tb21の左上端(第1行第1列)、中間(第3行第2列)、右下端(第4行第4列)の量子化値は、それぞれ16、22、42である。このような量子化行列では、より左上に配列された要素に係る直交変換係数、つまり低域の変換係数ほど高い精度で量子化され、より右下に配列された要素に係る変換係数、つまり高域の変換係数ほど低い精度で量子化される。そのため、直交変換が行われる場合には、低域ほど濃淡や色相の空間的変化に鋭敏であるという人間の視覚特性を活用し、画質を劣化させずに量子化によって高域での情報量を低減することができる。一方、直交変換を伴わない場合には座標ごとに異なるひずみが生じ、ブロックの右下の劣化が顕著となる。   As shown in FIG. 2B, the quantization matrix tb21 is an example of a non-flat quantization matrix (first quantization matrix). The quantization matrix tb 21 has a larger quantization value as the order in the horizontal direction and the vertical direction increases. The quantization values of the upper left end (the first row and the first column), the middle (the third row and the second column), and the lower right end (the fourth row and the fourth column) of the quantization matrix tb21 are 16, 22, and 42, respectively. . In such a quantization matrix, orthogonal transform coefficients associated with elements arranged at the upper left, that is, lower-range transform coefficients, are quantized with high accuracy, and conversion coefficients associated with the elements arranged at the lower right, ie, higher The domain transform coefficients are quantized with lower precision. Therefore, when orthogonal transformation is performed, the amount of information in the high region can be obtained by quantization without degrading the image quality by utilizing the human visual characteristic that the lower region is more sensitive to the spatial change in density and hue. It can be reduced. On the other hand, in the case where orthogonal transformation is not involved, different distortions occur in each coordinate, and the deterioration at the lower right of the block becomes remarkable.

量子化行列設定部108は、差分画像ブロックの要素数、つまり、ブロックサイズが可変である場合には、ブロックサイズと要素数が等しい量子化行列を選択する。その場合には、量子化行列設定部108は、候補となるブロックサイズのそれぞれに応じた量子化行列を取得する。候補となるブロックサイズは、例えば、水平方向4個、垂直方向4個(計16個)、水平方向8個、垂直方向8個(計64個)、水平方向16個、垂直方向16個(計256個)、水平方向32個、垂直方向32個(計1024個)などであるがそれ以上でもよい。   The quantization matrix setting unit 108 selects a quantization matrix having the same number of elements as the block size when the number of elements of the difference image block, that is, the block size is variable. In that case, the quantization matrix setting unit 108 acquires a quantization matrix corresponding to each of the candidate block sizes. The candidate block sizes are, for example, 4 in the horizontal direction, 4 in the vertical direction (16 in total), 8 in the horizontal direction, 8 in the vertical direction (64 in total), 16 in the horizontal direction, 16 in the vertical direction (total (256 pieces), 32 pieces in the horizontal direction, 32 pieces in the vertical direction (1024 pieces in total), etc.

(1.1.3)ブロック分割
次に、ブロック分割について説明する。
(1.1.3) Block Division Next, block division will be described.

制御部109の分割制御部109aは、符号化がなされる単位である差分画像ブロック(逆変換部107が逆変換処理を行う単位でもある)を分割して更に細分化した変換ブロックを生成するための制御を行う。この差分画像ブロックを原ブロックとして変換ブロックに分割する処理をブロック分割と呼ぶ。符号化がなされる単位である差分画像ブロックは符号化単位(CU:Coding Unit)と呼ばれることがあり、変換ブロックは変換単位(TU:Transform Unit)と呼ばれることがある。分割制御部109aは、例えば非特許文献1に記載のブロック分割を行う。従って、変換ブロックのブロックサイズは可変である。その場合、量子化及び逆量子化で用いられる量子化行列の大きさ(要素数)は変換ブロックのブロックサイズに等しい。   The division control unit 109a of the control unit 109 divides the difference image block (which is also a unit for the inverse conversion unit 107 to perform inverse conversion processing), which is a unit to be encoded, and generates a further divided conversion block. Control the The process of dividing this difference image block into the conversion block as the original block is called block division. A differential image block which is a unit to be coded may be called a coding unit (CU), and a transform block may be called a transform unit (TU). The division control unit 109a performs, for example, block division described in Non-Patent Document 1. Thus, the block size of the transform block is variable. In that case, the size (number of elements) of the quantization matrix used in quantization and dequantization is equal to the block size of the transform block.

ここで、分割制御部109aは、原ブロックのブロックサイズが予め定めたブロックサイズ(例えば、水平方向64個、垂直方向64個)である場合、この原ブロック(第0階層)を水平方向、垂直方向の要素数がそれぞれ半分の4つのブロック(第1階層)に分割することを試行する。分割制御部109aは、それぞれについて分割を行うか否かを残差の大きさを示す指標(例えば、RDコスト)が分割によって減少するか否かをもって判定する。具体的には、あるブロックについての指標が、そのブロックを仮に分割したブロック毎の指標の合計値よりも大きい場合、分割制御部109aは、そのブロックを分割すると判定する。   Here, when the block size of the original block is a predetermined block size (for example, 64 in the horizontal direction and 64 in the vertical direction), the division control unit 109a horizontally or vertically divides the original block (layer 0). Attempt to divide into four blocks (first hierarchy) each having half the number of elements in the direction. The division control unit 109a determines whether or not division is to be performed on the basis of whether or not an index (for example, RD cost) indicating the size of the residual decreases due to division. Specifically, when the index for a certain block is larger than the total value of the indices for each block obtained by temporarily dividing the block, the division control unit 109a determines that the block is to be divided.

そこで、分割制御部109aは、ある階層におけるブロックの各々について、次の階層における4つのブロックに仮に分割し、分割するか否かを判定するといった処理を予め定めた階層数(例えば、4階層)に達するまで繰り返す。分割制御部109aは、分割された変換ブロックの区分を示す区分情報を制御信号として可逆符号化部114及び符号化データ生成部103に出力する。変換ブロックの区分を示す区分情報は、変換ブロックのブロックサイズを示す情報とみなすことができる。   Therefore, the division control unit 109a temporarily divides each of the blocks in a certain hierarchy into four blocks in the next hierarchy, and determines whether or not to divide the number into a predetermined number of hierarchies (for example, four hierarchies). Repeat until it reaches The division control unit 109a outputs division information indicating the division of the divided transform block as a control signal to the lossless encoding unit 114 and the encoded data generation unit 103. The division information indicating the division of the conversion block can be regarded as information indicating the block size of the conversion block.

図3は、変換ブロックの区分の一例を示す図である。図3において、原ブロックtb31は3階層に分割されている。原ブロックtb31の右上、左下、右下のブロックtb317、tb318、tb319は、第1階層の変換ブロックである。原ブロックtb31の左上の領域は、さらに分割されている。その領域の右上、左下、右下のブロックtb314、tb315、tb316は、第2階層の変換ブロックである。その領域の左上の領域は、またさらに分割されている。その分割された領域は、4つの変換ブロックtb310、tb311、tb312、tb313であり、第3階層の変換ブロックである。   FIG. 3 is a diagram showing an example of division of transform blocks. In FIG. 3, an original block tb31 is divided into three layers. Blocks tb317, tb318, and tb319 on the upper right, lower left, and lower right of the original block tb31 are conversion blocks of the first hierarchy. The upper left region of the original block tb31 is further divided. The upper right, lower left and lower right blocks tb 314, tb 315 and tb 316 in the area are conversion blocks of the second hierarchy. The upper left area of the area is further divided. The divided regions are four transform blocks tb310, tb311, tb312, and tb313, which are the transform blocks of the third layer.

(1.1.4)符号化処理の動作
次に、第1実施形態に係る符号化処理の例について説明する。図4は、第1実施形態に係る符号化処理の一例を示すフローチャートである。図4に示すフローは、差分画像ブロック信号を構成する変換ブロックごとの符号化処理を示し、分割制御部109aによって4×4変換ブロックであると判定された変換ブロックに適用する。
(1.1.4) Operation of Encoding Process Next, an example of the encoding process according to the first embodiment will be described. FIG. 4 is a flowchart showing an example of the encoding process according to the first embodiment. The flow shown in FIG. 4 shows the encoding process for each transform block constituting the differential image block signal, and is applied to the transform block determined to be a 4 × 4 transform block by the division control unit 109a.

図4に示すように、ステップS101において、量子化行列判定部109dは、平坦な量子化行列(第2量子化行列)を用いるか又は平坦でない量子化行列(第1量子化行列)を用いるかを判定する。平坦な量子化行列を用いると判定された場合(ステップS101:NO)、量子化行列判定部109dは、平坦な量子化行列を用いることを示す制御信号を符号化データ生成部103及び可逆符号化部114に出力する。その後、ステップS102に処理が進む。   As shown in FIG. 4, in step S101, whether the quantization matrix determination unit 109d uses a flat quantization matrix (second quantization matrix) or a non-flat quantization matrix (first quantization matrix)? Determine If it is determined that a flat quantization matrix is to be used (step S101: NO), the quantization matrix determination unit 109d generates a control signal indicating that a flat quantization matrix is to be used. Output to the part 114. Thereafter, the process proceeds to step S102.

ステップS102において、量子化行列設定部108は、平坦な量子化行列を用いることを示す制御信号に基づいて、予め定めた平坦な量子化行列を示す候補行列データを量子化部105及び逆量子化部106に設定する。候補行列データが示す量子化値m[x][y]は、例えば、式(1)で示す。   In step S102, the quantization matrix setting unit 108 quantizes the candidate matrix data representing the predetermined flat quantization matrix based on the control signal indicating that the flat quantization matrix is used, and dequantizes the candidate matrix data. It is set in the part 106. The quantization value m [x] [y] indicated by the candidate matrix data is, for example, indicated by equation (1).

m[x][y]=16 … (1)
ここで、x、yは、それぞれ水平方向、垂直方向の要素を示す整数であり、0からxTbS−1、0からyTbS−1のいずれかの値をとる。xTbS、yTbSは、それぞれ変換ブロックの水平方向、垂直方向の要素数を示す整数(例えば、4、8、16、32のいずれか)である。第1実施形態では4×4変換ブロックを対象とするため、xTbS及びyTbSのいずれも4である。その後、ステップS103に処理が進む。
m [x] [y] = 16 (1)
Here, x and y are integers indicating elements in the horizontal direction and the vertical direction, respectively, and take values from 0 to xTbS-1 and from 0 to yTbS-1. xTbS and yTbS are integers (for example, any of 4, 8, 16, and 32) indicating the numbers of elements in the horizontal direction and the vertical direction of the conversion block, respectively. In the first embodiment, xTbS and yTbS are both 4 because 4 × 4 conversion blocks are targeted. Thereafter, the process proceeds to step S103.

ステップS103において、TS適用判定部109cは、変換処理(直交変換)をスキップするか否かを判定する。具体的には、TS適用判定部109cは、処理対象の4×4変換ブロックにTSモードを適用するか否かを判定する。変換処理をスキップすると判定された場合(ステップS103:YES)、TS適用判定部109cは、変換処理をスキップすることを示す制御信号(transform_skip_flag=1)を符号化データ生成部103及び可逆符号化部114に出力する。その後、ステップS107に進む。一方、変換処理をスキップしないと判定された場合(ステップS103:NO)、TS適用判定部109cは、変換処理をスキップしないことを示す制御信号(transform_skip_flag=0)を符号化データ生成部103及び可逆符号化部114に出力する。   In step S103, the TS application determination unit 109c determines whether to skip the conversion process (orthogonal transformation). Specifically, the TS application determination unit 109 c determines whether to apply the TS mode to the 4 × 4 conversion block to be processed. If it is determined that the conversion process is to be skipped (step S103: YES), the TS application determination unit 109c transmits a control signal (transform_skip_flag = 1) indicating that the conversion process is skipped to the encoded data generation unit 103 and the lossless encoding unit Output to 114. Thereafter, the process proceeds to step S107. On the other hand, when it is determined that the conversion process is not skipped (step S103: NO), the TS application determination unit 109c converts the control signal (transform_skip_flag = 0) indicating that the conversion process is not skipped to the encoded data generation unit 103 and lossless It is output to the encoding unit 114.

その後、ステップS104において、変換部104は、変換処理をスキップしないことを示す制御信号に基づいて、処理対象の4×4変換ブロックに対する直交変換を行う。そして、ステップS107に進む。   Thereafter, in step S104, the transform unit 104 performs orthogonal transform on the 4 × 4 transform block to be processed based on the control signal indicating that the transform process is not skipped. Then, the process proceeds to step S107.

一方、平坦でない量子化行列を用いると判定された場合(ステップS101:YES)、量子化行列判定部109dは、平坦でない量子化行列を用いることを示す制御信号と、変換処理をスキップしないことを示す制御信号(transform_skip_flag=0)とを符号化データ生成部103及び可逆符号化部114に出力する。量子化行列判定部109dは、変換処理をスキップしないことを示す制御信号を出力するようTS適用判定部109cに指示してもよい。ここで、平坦でない量子化行列を用いると判定された場合には、変換処理をスキップするか否かの判定をTS適用判定部109cが行わない。   On the other hand, when it is determined to use a non-flat quantization matrix (step S101: YES), the quantization matrix determination unit 109d does not skip the conversion processing and a control signal indicating that the non-flat quantization matrix is used. The control signal (transform_skip_flag = 0) shown is output to the encoded data generation unit 103 and the lossless encoding unit 114. The quantization matrix determination unit 109d may instruct the TS application determination unit 109c to output a control signal indicating not to skip the conversion process. Here, if it is determined that a non-flat quantization matrix is to be used, the TS application determination unit 109c does not determine whether to skip the conversion process.

ステップS105において、量子化行列設定部108は、平坦でない量子化行列を用いることを示す制御信号に基づいて、平坦でない量子化行列を量子化部105及び逆量子化部106に設定する。   In step S105, the quantization matrix setting unit 108 sets the non-flat quantization matrix in the quantization unit 105 and the inverse quantization unit 106 based on the control signal indicating that the non-flat quantization matrix is used.

そして、ステップS106において、変換部104は、変換処理をスキップしないことを示す制御信号に基づいて、処理対象の4×4変換ブロックに対する直交変換を行う。その後、S107に進む。   Then, in step S106, the transform unit 104 performs orthogonal transform on the 4 × 4 transform block to be processed based on the control signal indicating that the transform process is not skipped. Then, it progresses to S107.

ステップS107において、量子化部105は、処理対象の4×4変換ブロックを、量子化行列設定部108が設定した量子化行列と量子化パラメータqPを用いて量子化し、量子化係数データを生成する。量子化部105は、生成した量子化係数データを逆量子化部106及び可逆符号化部114に出力する。量子化部105は、量子化を行う際、例えば、式(2)の右辺の値が変換係数d[x][y]に最も近似する変換係数レベル値TransCoeffLevel[xTbY][yTbY][cIdx][x][y]を選択する。   In step S107, the quantization unit 105 quantizes the 4 × 4 transform block to be processed using the quantization matrix set by the quantization matrix setting unit 108 and the quantization parameter qP to generate quantization coefficient data. . The quantization unit 105 outputs the generated quantization coefficient data to the inverse quantization unit 106 and the lossless encoding unit 114. When the quantization unit 105 performs quantization, for example, a transform coefficient level value TransCoeffLevel [xTbY] [yTbY] [cIdx] at which the value on the right side of Equation (2) most approximates to the transform coefficient d [x] [y]. Select [x] [y].

d[x][y]=Clip3(coeffMin,coeffMax,((TransCoeffLevel[xTbY][yTbY][cIdx][x][y]*m[x][y]*levelScale[qP%6]<<(qP/6))+(1<<(bdShift−1)))>>bdShift) … (2) (H.265 8−311)
ここで、Clip3(a,b,xx)は、実数xxが実数aよりも小さい場合には、aと定め、実数xxが実数bよりも大きい場合には、bと定め、実数xxがa又はaよりも大きく、かつb又はbよりも小さい場合には、そのままxxと定める関数である。xTbY、yTbYは、それぞれ処理対象となる変換ブロック(対象ブロック)の左上端の水平方向、垂直方向の座標値を示す。coeffMin,coeffMaxは、それぞれ16ビットで示された要素毎の信号値の最小値、最大値を示す。cIdxは、信号値の種類を示すインデックスである。cIdx=0,1、2とは、それぞれ輝度信号、色差信号Cb、色差信号Crを示す。levelScale[0]−levelScale[5](H.265 8.4.4.2.7 Decoding process for palette mode(8−76)の次)は、それぞれ、40、45、57、64、72である。qPは、量子化パラメータ、つまり量子化精度を示す整数であって6増加する度に量子化値を半分にすることを促すパラメータである。qP%6は、qPを6で除算して得られる剰余を示す。a<<bは、aの値を二進表示でb桁だけ左側にシフトすること、つまり、2のb乗を乗算することを示すビットシフト演算子である。a>>bは、aの値を二進表示でb桁だけ右側にシフトすること、つまり、2のb乗を除算することを示すビットシフト演算子である。bdShiftは、信号値の種類に応じて予め定められたビットシフト値である。例えば、信号値が輝度信号Yである場合、bdShiftは、BitDepth+Log2(nTbS)−5である。BitDepthは、輝度信号Yのビット深度、つまり量子化ビット数(例えば、10ビット)を示す。nTbSは、対象ブロックのブロックサイズを示す。信号値が色差信号Cb、Crである場合、bdShiftは、BitDepth+Log2(nTbS)−5である。BitDepthは、輝度信号Cb、Crのビット深度、つまり量子化ビット数(例えば、10ビット)を示す。ここで、qPは、フレームの種類によって異なる値であってもよい。その後、ステップS108に処理が進む。
d [x] [y] = Clip3 (coeffMin, coeffMax, ((TransCoeffLevel [xTbY] [yTbY] [cIdx] [x] [m] * m [x] [y] * levelScale [qP% 6] << ( qP / 6)) + (1 << (bdShift-1))) >> bdShift) (2) (H. 265 8-311)
Here, Clip 3 (a, b, xx) is defined as a when the real number xx is smaller than the real number a, and as b when the real number xx is larger than the real number b, and the real number xx is a or When it is larger than a and smaller than b or b, it is a function that determines as it is as it is. xTbY and yTbY indicate horizontal and vertical coordinate values of the upper left end of the conversion block (target block) to be processed. coeffMin and coeffMax respectively indicate the minimum value and the maximum value of the signal value of each element indicated by 16 bits. cIdx is an index indicating the type of signal value. cIdx = 0, 1, 2 respectively indicate a luminance signal, a color difference signal Cb, and a color difference signal Cr. levelScale [0] -levelScale [5] (following H.265 8.4.4.2.7 Decoding process for palette mode (8-76)) are 40, 45, 57, 64 and 72, respectively. . qP is a quantization parameter, that is, an integer indicating a quantization accuracy, and a parameter that halves a quantization value every six increments. qP% 6 shows the remainder obtained by dividing qP by six. a << b is a bit shift operator indicating that the value of a is shifted to the left by b digits in binary notation, that is, multiplied by 2 to the power of b. a >> b is a bit shift operator indicating that the value of a is shifted to the right by b digits in binary notation, that is, division of 2 to the power of b is performed. bdShift is a bit shift value predetermined according to the type of signal value. For example, when the signal value is a luminance signal Y, BdShift is BitDepth Y + Log2 (nTbS) -5 . Bit Depth Y indicates the bit depth of the luminance signal Y, that is, the number of quantization bits (for example, 10 bits). nTbS indicates the block size of the target block. If the signal value is a color difference signal Cb, Cr, bdShift is BitDepth C + Log2 (nTbS) -5 . Bit Depth C indicates the bit depth of the luminance signals Cb and Cr, that is, the number of quantization bits (for example, 10 bits). Here, qP may have different values depending on the type of frame. Thereafter, the process proceeds to step S108.

ステップS108において、量子化部105は、選択した係数レベル値を示す量子化変換係数データを可逆符号化部114に符号化データの一部として出力する。   In step S108, the quantization unit 105 outputs quantized transform coefficient data indicating the selected coefficient level value to the lossless encoding unit 114 as a part of the encoded data.

また、量子化部105は、この量子化変換係数データを逆量子化部106に出力する。出力された量子化変換係数データは、逆量子化部106において逆量子化され、量子化された変換係数d[x][y]が算出される。その後、図4に示す処理を終了する。   In addition, the quantization unit 105 outputs the quantization transformation coefficient data to the inverse quantization unit 106. The output quantization transformation coefficient data is inverse-quantized in the inverse quantization unit 106, and the quantized transformation coefficient d [x] [y] is calculated. Thereafter, the process shown in FIG. 4 is ended.

このように、4×4変換ブロックにおいて平坦でない量子化行列を用いる場合、TSモードの適用/非適用の判断を回避することができ、高速かつ低消費電力を実現することができる。また、平坦でない量子化行列を用いる場合、TSモードを選択することによる空間的な量子化ひずみの発生を抑制することができ、復号画像の主観的な品質を向上することができる。   As described above, when using a non-flat quantization matrix in the 4 × 4 transform block, it is possible to avoid the determination of application / non-application of the TS mode, and high speed and low power consumption can be realized. Moreover, when using a non-flat quantization matrix, generation | occurrence | production of the spatial quantization distortion by selecting TS mode can be suppressed, and the subjective quality of a decoded image can be improved.

(1.2)画像復号装置
第1実施形態に係る画像符号化装置について説明する。
(1.2) Image Decoding Device An image coding device according to the first embodiment will be described.

(1.2.1)画像復号装置の構成
図5は、第1実施形態に係る画像復号装置2の構成を示すブロック図である。
(1.2.1) Configuration of Image Decoding Device FIG. 5 is a block diagram showing a configuration of the image decoding device 2 according to the first embodiment.

図5に示すように、画像復号装置2は、制御部200、蓄積バッファ201、可逆復号部202、符号化データ復号部203、加算部(合成部)207、デブロッキングフィルタ208、参照メモリ209、予測部210、フレームバッファ211、及び動きベクトル算出部212を備える。   As shown in FIG. 5, the image decoding apparatus 2 includes a control unit 200, an accumulation buffer 201, a lossless decoding unit 202, an encoded data decoding unit 203, an addition unit (composition unit) 207, a deblocking filter 208, a reference memory 209, A prediction unit 210, a frame buffer 211, and a motion vector calculation unit 212 are provided.

第1実施形態に係る画像復号装置2は、予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する逆量子化を行う逆量子化部204と、逆量子化が施された変換ブロックに対する逆直交変換を行う逆変換部205と、4×4のサイズを有する4×4変換ブロックについて、異なる値の要素からなる第1量子化行列及び等しい値の要素からなる第2量子化行列のうちいずれを逆量子化に用いるかをフレーム単位で判定する量子化行列判定部200dとを備える。逆変換部205は、量子化行列判定部200dによって第1量子化行列を量子化に用いると判定されたフレームに対応する各4×4変換ブロックに対して、逆直交変換をスキップする変換スキップを適用することなく、当該4×4変換ブロックに対する逆直交変換を行う。   The image decoding apparatus 2 according to the first embodiment includes an inverse quantization unit 204 that performs inverse quantization on a transform block that is a part of a residual image that is a residual between a predicted image and an input image; An inverse transform unit 205 for performing inverse orthogonal transform on the transform block applied, and a first quantization matrix composed of elements of different values and a first transform matrix composed of elements of equal values for a 4 × 4 transform block having a size of 4 × 4. And a quantization matrix determination unit 200d that determines which one of the two quantization matrices is to be used for inverse quantization in units of frames. The inverse transformation unit 205 performs transformation skip for skipping inverse orthogonal transformation with respect to each 4 × 4 transformation block corresponding to a frame determined to be used for quantization by the quantization matrix determination unit 200 d. Inverse orthogonal transform is performed on the 4 × 4 transform block without application.

蓄積バッファ201には、画像復号装置2の外部、例えば、画像符号化装置1からビットストリームが入力され、入力されたビットストリームが一時的に記憶される。蓄積バッファ201では、入力されたビットストリームがフレームごとに統合される。   The bit stream is input to the accumulation buffer 201 from the outside of the image decoding device 2, for example, the image coding device 1, and the input bit stream is temporarily stored. In the accumulation buffer 201, the input bit stream is integrated for each frame.

可逆符号復号部202は、蓄積バッファ201からフレーム毎のビットストリームを読み出し、読み出したビットストリームについて可逆符号の復号を行って符号化データを生成する。可逆符号復号部202が用いる可逆符号復号方式は、可逆符号化部114が用いた可逆符号化方式に対応する復号方式である。   The lossless code decoding unit 202 reads a bit stream for each frame from the accumulation buffer 201, performs lossless code decoding on the read bit stream, and generates coded data. The lossless code decoding method used by the lossless code decoding unit 202 is a decoding method corresponding to the lossless coding method used by the lossless coding unit 114.

可逆符号復号部202は、復号した符号化データのうち、量子化変換係数データ、候補行列データ若しくはそのデータに係る符号(該当する場合)を符号化データ復号部203に出力する。可逆符号復号部202は、復号した符号化データのうち、制御信号を制御部200に出力する。可逆符号復号部202は、復号した符号化データのうち、モードデータを予測部210に出力し、差分ベクトル及びベクトルインデックス(該当する場合)を動きベクトル算出部212に出力する。   The lossless code decoding unit 202 outputs the quantization conversion coefficient data, the candidate matrix data, or the code (if applicable) related to the data to the coded data decoding unit 203 among the decoded coded data. The lossless code decoding unit 202 outputs a control signal to the control unit 200 among the decoded encoded data. The lossless code decoding unit 202 outputs mode data of the decoded encoded data to the prediction unit 210, and outputs a difference vector and a vector index (if applicable) to the motion vector calculation unit 212.

符号化データ復号部203は、逆量子化部204、逆変換部205、及び量子化行列設定部206を備える。   The encoded data decoding unit 203 includes an inverse quantization unit 204, an inverse transform unit 205, and a quantization matrix setting unit 206.

逆量子化部204は、可逆符号復号部202から入力された量子化変換係数データが示す量子化変換係数を、量子化行列設定部206が設定した量子化行列を用いて逆量子化して変換係数を算出する。逆量子化部204は、算出した変換係数を示す復元変換係数データを逆変換部205に出力する。   The inverse quantization unit 204 inversely quantizes the quantization conversion coefficient indicated by the quantization conversion coefficient data input from the lossless code decoding unit 202 using the quantization matrix set by the quantization matrix setting unit 206 and converts the conversion coefficient Calculate The inverse quantization unit 204 outputs restoration transform coefficient data indicating the calculated transform coefficient to the inverse transform unit 205.

逆変換部205は、逆量子化部204から入力された復元変換係数について逆直交変換を行って復元差分ブロック画像信号を生成する。逆変換部205は、生成した復元差分ブロック画像信号を加算部207に出力する。逆変換部205が用いる逆直交変換は、変換部104(図1参照)が行う直交変換の逆演算である。また、制御部200から入力された制御信号が逆直交変換をスキップすることを示している場合には、逆変換部205は、逆直交変換をスキップする。その場合には、入力される量子化変換係数データは、量子化された差分ブロック画像の信号値を示す信号である。そのため、逆変換部205は、入力された復元変換係数データを逆変換せずに復元差分ブロック画像信号として加算部207に出力する。   The inverse transform unit 205 performs inverse orthogonal transform on the restored transform coefficients input from the inverse quantization unit 204 to generate a restored difference block image signal. The inverse transform unit 205 outputs the generated restored difference block image signal to the addition unit 207. The inverse orthogonal transform used by the inverse transform unit 205 is an inverse operation of the orthogonal transform performed by the transform unit 104 (see FIG. 1). In addition, when the control signal input from the control unit 200 indicates to skip the inverse orthogonal transformation, the inverse transformation unit 205 skips the inverse orthogonal transformation. In that case, the input quantized transform coefficient data is a signal indicating the signal value of the quantized difference block image. Therefore, the inverse conversion unit 205 outputs the input restoration conversion coefficient data as a restoration difference block image signal to the addition unit 207 without performing inverse conversion.

量子化行列設定部206は、制御部200及び可逆符号復号部202から入力された制御信号が示す処理態様に応じた候補行列データ若しくはそのデータに係る符号が示す量子化行列を逆量子化部204に設定する。量子化行列設定部206は、量子化行列設定部108(図1)と同一の候補行列データを取得する構成、例えば、記憶部を備える。   The quantization matrix setting unit 206 dequantizes the candidate matrix data corresponding to the processing mode indicated by the control signal input from the control unit 200 and the lossless code decoding unit 202 or the quantization matrix indicated by the code relating to the data. Set to The quantization matrix setting unit 206 has a configuration for acquiring the same candidate matrix data as the quantization matrix setting unit 108 (FIG. 1), for example, a storage unit.

制御部200は、可逆符号復号部202が出力する制御信号に基づいて、画像復号装置2全体の動作を制御する。制御部200は、ブロックサイズ判定部200a、TS有効化判定部200b、TS適用判定部200c、及び量子化行列判定部200dを備える。   The control unit 200 controls the overall operation of the image decoding apparatus 2 based on the control signal output from the lossless code decoding unit 202. The control unit 200 includes a block size determination unit 200a, a TS validation determination unit 200b, a TS application determination unit 200c, and a quantization matrix determination unit 200d.

ブロックサイズ判定部200aは、変換ブロックごとに、4×4のブロックサイズを有する4×4変換ブロックであるか否かを判定し、判定結果を示す制御信号を符号化データ復号部203に出力する。例えば、ブロックサイズ判定部200aは、制御信号のうち、分割された変換ブロックの区分を示す区分情報に基づいて、4×4変換ブロックであるか否かを判定する。   The block size determination unit 200a determines, for each conversion block, whether it is a 4 × 4 conversion block having a 4 × 4 block size, and outputs a control signal indicating the determination result to the encoded data decoding unit 203. . For example, the block size determination unit 200a determines whether or not it is a 4 × 4 conversion block based on the division information indicating the division of the divided conversion block in the control signal.

TS有効化判定部200bは、フレーム単位又はシーケンス単位で変換スキップを有効化するか否かを示す制御信号(例えば、transform_skip_enabled_flag)に基づいて、フレーム単位又はシーケンス単位で変換スキップが有効化されているか否かを判定し、判定結果を示す制御信号を符号化データ復号部203に出力する。第1実施形態においては、変換スキップが有効化されている場合を想定する。TS有効化判定部200bの詳細については、第2実施形態において説明する。   Whether or not the conversion skip is enabled in frame units or sequence units based on a control signal (for example, transform_skip_enabled_flag) indicating whether or not the conversion skip is enabled in frame units or sequence units. It is determined whether or not it is not, and a control signal indicating the determination result is output to the encoded data decoding unit 203. In the first embodiment, it is assumed that the conversion skip is enabled. Details of the TS validation determination unit 200b will be described in the second embodiment.

TS適用判定部200cは、直交変換をスキップするか否かを示す制御信号(transform_skip_flag)に基づいて、変換ブロックごとに、逆直交変換をスキップするか否かを判定し、判定結果を示す制御信号を符号化データ復号部203に出力する。例えば、TS有効化判定部200bは、処理対象の変換ブロックについて、transform_skip_flag=1である場合、逆直交変換をスキップすると判定する。TS有効化判定部200bは、処理対象の変換ブロックについて、transform_skip_flag=0である場合、逆直交変換をスキップしないと判定してもよい。   The TS application determination unit 200 c determines, for each transform block, whether to skip the inverse orthogonal transformation based on the control signal (transform_skip_flag) indicating whether to skip the orthogonal transformation, and indicates a control signal indicating the determination result. Are output to the encoded data decoding unit 203. For example, when transform_skip_flag = 1 for the transform block to be processed, the TS validation determination unit 200b determines to skip the inverse orthogonal transform. When transform_skip_flag = 0 for the transform block to be processed, the TS validation determination unit 200b may determine not to skip the inverse orthogonal transform.

量子化行列判定部200dは、平坦な量子化行列を用いるか又は平坦でない量子化行列を用いるかを示す制御信号に基づいて、サイズの異なる変換ブロックごとに、平坦な量子化行列を用いるか又は平坦でない量子化行列を逆量子化に用いるかを判定し、判定結果を示す制御信号を符号化データ復号部203に出力する。例えば、量子化行列判定部200dは、処理対象の変換ブロックについて、scaling_list_enable_flag=1である場合、平坦でない量子化行列を逆量子化に用いると判定する。或いは、量子化行列判定部200dは、制御信号が、4×4ブロックのscaling_list_pred_mode_flag=1、かつ、平坦でない量子化行列を指示又はエンコーダ定義の量子化行列が平坦でないことを示す場合、平坦でない量子化行列を逆量子化に用いると判定してもよい。一方で、量子化行列判定部200dは、scaling_list_enable_flag=0である場合、平坦な量子化行列を逆量子化に用いると判定する。或いは、量子化行列判定部200dは、制御信号が、scaling_list_enable_flag=1であって、4×4ブロックのscaling_list_pred_mode_flag=1、かつ、平坦な量子化行列を指示又はエンコーダ定義の量子化行列が平坦であることを示す場合、平坦な量子化行列を逆量子化に用いると判定してもよい。   The quantization matrix determination unit 200d uses a flat quantization matrix or does not use a flat quantization matrix for each transform block having different sizes based on a control signal indicating whether to use a flat quantization matrix or a non-flat quantization matrix. It is determined whether a non-flat quantization matrix is to be used for inverse quantization, and a control signal indicating the determination result is output to the encoded data decoding unit 203. For example, when scaling_list_enable_flag = 1 for the transform block to be processed, the quantization matrix determination unit 200 d determines that a non-flat quantization matrix is to be used for inverse quantization. Alternatively, if the quantization matrix determination unit 200 d indicates that the control signal indicates 4 × 4 block scaling_list_pred_mode_flag = 1 and the non-flat quantization matrix or indicates that the quantization matrix in the encoder definition is not flat, the non-flat quantum is determined. It may be determined that the quantization matrix is used for inverse quantization. On the other hand, when scaling_list_enable_flag = 0, the quantization matrix determination unit 200d determines that a flat quantization matrix is to be used for inverse quantization. Alternatively, the quantization matrix determination unit 200d indicates that the control signal is scaling_list_enable_flag = 1, indicates 4 × 4 block scaling_list_pred_mode_flag = 1, and indicates a flat quantization matrix or the quantization matrix in the encoder definition is flat. If it indicates, it may be determined that a flat quantization matrix is to be used for inverse quantization.

第1実施形態において、量子化行列判定部200dは、TS適用判定部200cの判定よりも前に上述した判定を行う。TS適用判定部200cは、平坦でない量子化行列(第1量子化行列)を逆量子化に用いると判定された4×4変換ブロックについて、変換スキップを適用するか否かの判定を省略する。これにより、TS適用判定部200cの判定を省略し、復号処理の処理量を削減でき、復号処理を高速化できる。   In the first embodiment, the quantization matrix determination unit 200d performs the above-described determination before the determination of the TS application determination unit 200c. The TS application determination unit 200c omits the determination as to whether or not to apply the transform skip to the 4 × 4 transform block determined to use the non-flat quantization matrix (first quantization matrix) for the inverse quantization. As a result, the determination of the TS application determination unit 200c can be omitted, the processing amount of the decoding process can be reduced, and the decoding process can be speeded up.

そして、逆変換部205は、平坦でない量子化行列を逆量子化に用いると判定された4×4変換ブロックに対して、変換スキップを適用することなく、当該4×4変換ブロックに対する逆直交変換を行う。換言すると、逆変換部205は、平坦でない量子化行列を逆量子化に用いる4×4変換ブロックについては必ず逆直交変換を行う。これにより、平坦でない量子化行列が適用される4×4変換ブロックに変換スキップが適用されないようにすることができるため、HEVC方式において4×4変換ブロックの量子化ひずみに起因する画質の劣化を抑制できる。   Then, the inverse transform unit 205 performs inverse orthogonal transform on the 4 × 4 transform block without applying a transform skip to the 4 × 4 transform block determined to use the non-flat quantization matrix for the inverse quantization. I do. In other words, the inverse transform unit 205 always performs inverse orthogonal transform on a 4 × 4 transform block that uses a non-flat quantization matrix for inverse quantization. As a result, it is possible to prevent the conversion skip from being applied to the 4 × 4 transform block to which the non-flat quantization matrix is applied, so that the image quality degradation due to the quantization distortion of the 4 × 4 transform block in the HEVC scheme It can be suppressed.

加算部207は、逆変換部205から入力された復元差分画像ブロック信号と、予測部210から入力された予測画像ブロック信号を加算(合成)して復元画像ブロック信号を生成する。加算部207は、生成した復元画像ブロック信号をデブロッキングフィルタ208に出力する。   The addition unit 207 adds (combines) the restored difference image block signal input from the inverse conversion unit 205 and the predicted image block signal input from the prediction unit 210 to generate a restored image block signal. The addition unit 207 outputs the generated restored image block signal to the deblocking filter 208.

デブロッキングフィルタ208は、加算部207から入力された復元画像ブロック信号にフィルタリング処理を行ってブロック歪の成分を除去する。また、画像の微細部分の明瞭性を表す鮮鋭度向上のためのフィルタ処理(例えばサンプル適応フィルタ:SAO)などを伴ってもよい。デブロッキングフィルタ208は、ブロック歪の成分が除去された復元画像ブロック信号を参照画像ブロック信号として参照メモリ209及びフレームバッファ211に記憶する。   The deblocking filter 208 performs filtering processing on the restored image block signal input from the adding unit 207 to remove the block distortion component. In addition, filter processing (e.g., sample adaptive filter: SAO) for improving sharpness may be included, which represents the clarity of a minute portion of an image. The deblocking filter 208 stores the restored image block signal from which the component of block distortion has been removed as a reference image block signal in the reference memory 209 and the frame buffer 211.

参照メモリ209は、デブロッキングフィルタ208から入力された参照画像ブロック信号をフレームごとに、その参照画像ブロックに応じた表示領域に対応する記憶領域に記憶する。これにより、参照画像を示す参照画像信号がフレームごとに記憶できる。   The reference memory 209 stores, for each frame, the reference image block signal input from the deblocking filter 208 in a storage area corresponding to the display area corresponding to the reference image block. Thereby, a reference image signal indicating a reference image can be stored for each frame.

予測部210は、参照メモリ209に記憶された参照画像信号を用いて、現ブロックに係る予測画像ブロック信号を生成し、生成した予測画像ブロック信号を加算部207に出力する。現フレームがイントラフレームである場合には、予測部210はイントラ予測を行う。現フレームがインターフレームである場合には、予測部210は現フレームとは異なるフレームに係る参照画像信号を用いてインター予測を行って現ブロックに係る予測画像ブロック信号を生成する。インター予測に用いられる参照画像信号のフレームは、所定のGOP構造に応じたフレーム順序のうち現フレームがどのフレームであるかによって定められる。インター予測を行う際、予測部210は、可逆符号復号部202から入力されたモードデータが示す予測モード(例えば、動き補償予測モード、マージモード等)で予測処理を行う。   The prediction unit 210 generates a predicted image block signal according to the current block using the reference image signal stored in the reference memory 209, and outputs the generated predicted image block signal to the addition unit 207. If the current frame is an intra frame, the prediction unit 210 performs intra prediction. When the current frame is an inter frame, the prediction unit 210 performs inter prediction using a reference image signal related to a frame different from the current frame to generate a predicted image block signal related to the current block. The frame of the reference image signal used for inter prediction is determined by which frame the current frame is in the frame order according to the predetermined GOP structure. When performing inter prediction, the prediction unit 210 performs prediction processing in a prediction mode (for example, a motion compensation prediction mode, a merge mode, and the like) indicated by mode data input from the lossless code decoding unit 202.

予測部210は、インター予測を行う場合、定められたフレームの参照画像信号から動きベクトル算出部212から入力された動きベクトルで指定される領域の参照画像ブロック信号を抽出し、抽出した参照画像ブロック信号を用いて予測画像ブロック信号を生成する。   When performing inter prediction, the prediction unit 210 extracts a reference image block signal of a region designated by the motion vector input from the motion vector calculation unit 212 from the reference image signal of the determined frame, and extracts the extracted reference image block The signal is used to generate a predicted image block signal.

フレームバッファ211は、デブロッキングフィルタ部208から入力された復元画像ブロック信号をフレームごとに、その復元画像ブロックに応じた表示領域に対応する記憶領域に記憶する。これにより、フレームバッファ211は、フレーム毎の復元画像信号を記憶領域に記憶する。フレームバッファ211は、記憶している復元画像信号を予め定めたGOP構造に係るフレームの順序に復元画像信号を並び替える。フレームバッファ211は、フレームごとに復元画像信号を画像復号装置2の外部に備えた、例えば、画像表示装置(ディスプレイ)に出力する。   The frame buffer 211 stores, for each frame, the restored image block signal input from the deblocking filter unit 208 in a storage area corresponding to a display area corresponding to the restored image block. Thereby, the frame buffer 211 stores the restored image signal for each frame in the storage area. The frame buffer 211 rearranges the restored image signals in the order of frames according to a predetermined GOP structure. The frame buffer 211 outputs the restored image signal to the outside of the image decoding device 2 for each frame, for example, to an image display device (display).

(1.2.2)復号処理の例
次に、第1実施形態に係る復号処理の例について説明する。図6は、第1実施形態に係る復号処理の一例を示すフローチャートである。図6に示すフローは、変換ブロックごとに復号処理を実行する。また、図6に示すフローは、ブロックサイズ判定部200aによって4×4変換ブロックであると判定された変換ブロックに対して適用される。
(1.2.2) Example of Decoding Process Next, an example of the decoding process according to the first embodiment will be described. FIG. 6 is a flowchart showing an example of the decoding process according to the first embodiment. In the flow shown in FIG. 6, the decoding process is performed for each conversion block. In addition, the flow illustrated in FIG. 6 is applied to a conversion block determined to be a 4 × 4 conversion block by the block size determination unit 200 a.

図6に示すように、ステップS201において、符号化データ復号部203は、可逆符号復号部202から符号化データの一部として制御信号、量子化変換係数データ、候補行列データ若しくはそのデータに係る符号を入力する。その後、ステップS202に進む。   As shown in FIG. 6, in step S201, the encoded data decoding unit 203 outputs a control signal, quantization conversion coefficient data, candidate matrix data or a code relating to that data from the lossless code decoding unit 202 as a part of the encoded data. Enter Thereafter, the process proceeds to step S202.

ステップS202において、量子化行列判定部200dは、入力された制御信号が量子化変換係数の逆量子化に用いる量子化行列が平坦な量子化値を用いることを示すものであるか、又は平坦でない量子化行列を用いることを示すものであり4×4に関して平坦な量子化値の行列であるか判定する。平坦な量子化行列を用いるものであると判定した場合(ステップS202:NO)、量子化行列判定部200dは、平坦な量子化行列を用いることを示す制御信号を符号化データ復号部203に出力する。その後、ステップS203に進む。   In step S202, the quantization matrix determination unit 200d indicates that the input control signal indicates that the quantization matrix used for inverse quantization of the quantization conversion coefficient uses a flat quantization value or is not flat. This shows that the quantization matrix is used, and it is determined whether it is a matrix of quantized values flat with respect to 4 × 4. When it is determined that the flat quantization matrix is used (step S202: NO), the quantization matrix determination unit 200d outputs a control signal indicating that the flat quantization matrix is used to the encoded data decoding unit 203. Do. Thereafter, the process proceeds to step S203.

ステップS203において、量子化行列設定部206は、平坦な量子化行列を用いることを示す制御信号に基づいて、予め定めた平坦な量子化行列を示す候補行列データを逆量子化部204に設定する。この候補行列データが示す量子化値は、例えば、式(1)で示すm[x][y]としてもよい。次に、ステップS204において、逆量子化部204は、平坦な量子化値からなる量子化行列を用いて、処理対象の4×4変換ブロックに対する逆量子化を行う。逆量子化部204は、可逆符号復号部202から入力された量子化変換係数データが示す量子化変換係数を量子化行列設定部206が設定した候補行列データと量子化パラメータQpとが示す量子化値を用いて逆量子化する。ここで、逆量子化部204は、例えば、式(2)を用いて復元変換係数d[x][y]を算出する。算出する過程で、量子化変換係数データが示す変換係数レベル値TransCoeffLevel[xTbY][yTbY][cIdx][x][y]と候補行列データが示す量子化値m[x][y]とを用いて復元変換係数d[x][y]を算出してもよい。その後、ステップS205に進む。   In step S203, the quantization matrix setting unit 206 sets candidate matrix data indicating a predetermined flat quantization matrix in the inverse quantization unit 204 based on a control signal indicating that a flat quantization matrix is to be used. . The quantization value indicated by this candidate matrix data may be, for example, m [x] [y] indicated by equation (1). Next, in step S204, the inverse quantization unit 204 performs inverse quantization on the 4 × 4 transform block to be processed using a quantization matrix formed of flat quantization values. The inverse quantization unit 204 performs quantization on the candidate matrix data set by the quantization matrix setting unit 206 and the quantization parameter Qp, with the quantization conversion coefficient indicated by the quantization conversion coefficient data input from the lossless code decoding unit 202 Inverse quantize using values. Here, the inverse quantization unit 204 calculates, for example, the restoration transform coefficient d [x] [y] using Expression (2). In the process of calculating, the transform coefficient level value indicated by the quantized transform coefficient data TransCoeffLevel [xTbY] [yTbY] [cIdx] [x] [y] and the quantization value m [x] [y] indicated by the candidate matrix data The restoration conversion coefficient d [x] [y] may be calculated using this. Thereafter, the process proceeds to step S205.

ステップS205において、TS適用判定部200cは、入力された制御信号が変換処理をスキップすることを示すものであるか否かを判定する。変換処理をスキップすることを示すもの(transform_skip_flag=1)であると判定された場合(ステップS205:YES)、TS適用判定部200cは、逆直交変換をスキップすることを示す制御信号を出力する。この場合、逆変換部205は、処理対象の4×4変換ブロックに対する逆直交変換をスキップし、逆量子化部204から入力された復元変換係数データを復元差分画像ブロックとして加算部207に出力する。一方、変換処理をスキップしないことを示すもの(transform_skip_flag=0)であると判定された場合(ステップS205:NO)、TS適用判定部200cは、逆直交変換をスキップしないことを示す制御信号を出力し、ステップS206に進む。   In step S205, the TS application determination unit 200c determines whether or not the input control signal indicates that the conversion process is to be skipped. If it is determined that the transformation process is to be skipped (transform_skip_flag = 1) (step S205: YES), the TS application determination unit 200c outputs a control signal indicating to skip the inverse orthogonal transformation. In this case, the inverse transform unit 205 skips inverse orthogonal transform on the 4 × 4 transform block to be processed, and outputs the restored transform coefficient data input from the inverse quantization unit 204 to the addition unit 207 as a restored difference image block. . On the other hand, when it is determined that the transformation processing is not skipped (transform_skip_flag = 0) (step S205: NO), the TS application determination unit 200c outputs a control signal indicating that the inverse orthogonal transformation is not skipped. And proceed to step S206.

ステップS206において、逆変換部205は、逆量子化部204から入力された復元変換係数データが示す復元変換係数について逆直交変換処理を行って復元差分画像ブロックを生成する。逆変換部205は、生成した復元差分画像ブロックを加算部207に出力する。   In step S206, the inverse transform unit 205 performs inverse orthogonal transform processing on the decompressed transform coefficient indicated by the decompressed transform coefficient data input from the dequantization unit 204 to generate a decompressed difference image block. The inverse transform unit 205 outputs the generated restored difference image block to the addition unit 207.

一方、平坦でない量子化行列を用いると判定した場合(ステップS202:YES)、量子化行列判定部200dは、平坦でない量子化行列を用いることを示す制御信号を符号化データ復号部203に出力し、ステップS207に進む。   On the other hand, when it is determined that the non-flat quantization matrix is to be used (step S202: YES), the quantization matrix determination unit 200d outputs a control signal indicating that the non-flat quantization matrix is to be used to the encoded data decoding unit 203. , And proceeds to step S207.

ステップS207において、量子化行列設定部206は、可逆符号復号部202から入力された制御信号が示す量子化行列を逆量子化部204に設定する。その後、ステップS208に進む。   In step S207, the quantization matrix setting unit 206 sets a quantization matrix indicated by the control signal input from the lossless code decoding unit 202 in the dequantization unit 204. Thereafter, the process proceeds to step S208.

ステップS208において、逆量子化部204は、平坦でない量子化行列を用いて、処理対象の4×4変換ブロックに対する逆量子化を行う。   In step S208, the inverse quantization unit 204 performs inverse quantization on the 4 × 4 transform block to be processed using a non-flat quantization matrix.

次に、ステップS209において、逆変換部205は、逆量子化部204から入力された復元変換係数データが示す復元変換係数について逆直交変換処理を行って復元差分画像ブロックを生成し、生成した復元差分画像ブロックを加算部207に出力する。なお、平坦でない量子化行列を用いると判定された場合には、変換処理をスキップするか否かの判定をTS適用判定部200cが行わない。   Next, in step S 209, the inverse transformation unit 205 performs inverse orthogonal transformation processing on the reconstruction transform coefficient indicated by the reconstruction transform coefficient data input from the inverse quantization unit 204 to generate a reconstruction difference image block, and the generated reconstruction The difference image block is output to the addition unit 207. When it is determined that a non-flat quantization matrix is to be used, the TS application determination unit 200c does not determine whether to skip the conversion process.

上述したように、平坦でない量子化行列(第1量子化行列)を用いる場合にはTSモードを用いることがないため、TS適用判定部200cは、直交変換の適用の有無の判定を省略できる。また、直交変換が行われなかった変換ブロックの各要素の信号値が等しい精度で逆量子化されるため、当該ブロック内で精度が不均等になることによる画質の劣化を回避できる。例えば、周波数成分が高い高域成分を多く含む領域が分布している画像について、復号画像の主観的な品質を向上できる。   As described above, since the TS mode is not used when a non-flat quantization matrix (first quantization matrix) is used, the TS application determination unit 200c can omit the determination as to whether or not orthogonal transform is applied. In addition, since the signal values of the respective elements of the transform block in which the orthogonal transform has not been performed are dequantized with equal precision, it is possible to avoid the deterioration of the image quality due to unequal precision in the block. For example, for an image in which a region including many high frequency components having high frequency components is distributed, the subjective quality of the decoded image can be improved.

(1.3)第1実施形態のまとめ
第1実施形態に係る画像符号化装置1において、変換部104は、第1量子化行列(平坦でない量子化行列)を量子化に用いると判定されたフレームに対応する4×4変換ブロックに対して、変換スキップを適用することなく、当該4×4変換ブロックに対する直交変換を行う。換言すると、変換部104は、第1量子化行列を量子化に用いる4×4変換ブロックについては必ず直交変換を行う。また、第1実施形態に係る画像復号装置2において、逆変換部205は、第1量子化行列を逆量子化に用いると判定された4×4変換ブロックに対して、変換スキップを適用することなく、当該4×4変換ブロックに対する逆直交変換を行う。換言すると、逆変換部205は、第1量子化行列を逆量子化に用いる4×4変換ブロックについては必ず逆直交変換を行う。よって、第1量子化行列が適用される4×4変換ブロックに変換スキップを適用しないようにできるため、HEVC方式において自然画像等の一般的な画像の画質を向上させることができる。
(1.3) Summary of the First Embodiment In the image coding apparatus 1 according to the first embodiment, the conversion unit 104 is determined to use the first quantization matrix (non-flat quantization matrix) for quantization. The 4 × 4 transform block corresponding to the frame is subjected to orthogonal transform on the 4 × 4 transform block without applying a transform skip. In other words, the transform unit 104 always performs orthogonal transform on a 4 × 4 transform block that uses the first quantization matrix for quantization. In the image decoding apparatus 2 according to the first embodiment, the inverse transform unit 205 applies a transform skip to the 4 × 4 transform block determined to use the first quantization matrix for inverse quantization. Instead, inverse orthogonal transform is performed on the 4 × 4 transform block. In other words, the inverse transform unit 205 always performs inverse orthogonal transform on a 4 × 4 transform block that uses the first quantization matrix for inverse quantization. Therefore, the conversion skip can not be applied to the 4 × 4 transform block to which the first quantization matrix is applied, so that the image quality of a general image such as a natural image can be improved in the HEVC method.

第1実施形態に係る画像符号化装置1において、TS適用判定部109bは、第2量子化行列(平坦な量子化行列)を量子化に用いると判定されたフレームに対応する4×4変換ブロックに対して、変換スキップを有効化する。換言すると、TS適用判定部109bは、第1量子化行列を量子化に用いる4×4変換ブロックに変換スキップを適用することなく、第2量子化行列を量子化に用いる4×4変換ブロックに変換スキップを適用可能にする。また、第1実施形態に係る画像復号装置2において、TS適用判定部200cは、第2量子化行列(平坦な量子化行列)を量子化に用いると判定されたフレームに対応する4×4変換ブロックに対して、変換スキップを有効化する。換言すると、TS適用判定部200cは、第1量子化行列を量子化に用いる4×4変換ブロックに変換スキップを適用することなく、第2量子化行列を量子化に用いる4×4変換ブロックに変換スキップを適用可能にする。このように、変換スキップを適用する4×4変換ブロックに対して第2量子化行列を用いて量子化・逆量子化を行うことによって、CGや、自然画像とCGが混在する画像の画質を向上できる。   In the image encoding device 1 according to the first embodiment, the TS application determination unit 109b is a 4 × 4 transform block corresponding to a frame determined to use the second quantization matrix (flat quantization matrix) for quantization. Enable conversion skipping for. In other words, the TS application determination unit 109 b does not apply the conversion skip to the 4 × 4 transform block that uses the first quantization matrix for quantization, and uses the second quantization matrix for the 4 × 4 transform block that performs quantization. Make conversion skip applicable. Further, in the image decoding apparatus 2 according to the first embodiment, the TS application determination unit 200c performs 4 × 4 conversion corresponding to a frame determined to use the second quantization matrix (flat quantization matrix) for quantization. Enable conversion skipping for the block. In other words, the TS application determination unit 200c does not apply the conversion skip to the 4 × 4 transform block that uses the first quantization matrix for quantization, and uses the second quantization matrix for the 4 × 4 transform block that performs quantization. Make conversion skip applicable. In this way, by performing quantization and inverse quantization on the 4 × 4 transform block to which the transform skip is applied using the second quantization matrix, the image quality of CG and an image in which CG and a natural image are mixed are obtained. It can improve.

さらに、第1実施形態に係る画像符号化装置1において、TS適用判定部109cは、第1量子化行列(平坦でない量子化行列)を量子化に用いると判定されたフレームに対応する4×4変換ブロックについて、変換スキップを適用するか否かの判定を省略する。また、第1実施形態に係る画像復号装置2において、TS適用判定部200cは、第1量子化行列を逆量子化に用いると判定されたフレームに対応する4×4変換ブロックについて、変換スキップを適用するか否かの判定を省略する。これにより、符号化処理及び復号処理の処理量を削減するとともに、符号化処理及び復号処理を高速化できる。   Furthermore, in the image coding device 1 according to the first embodiment, the TS application determination unit 109 c is 4 × 4 corresponding to a frame determined to use the first quantization matrix (non-flat quantization matrix) for quantization. The determination as to whether or not to apply the conversion skip is omitted for the conversion block. In addition, in the image decoding device 2 according to the first embodiment, the TS application determination unit 200c performs the conversion skip on the 4 × 4 conversion block corresponding to the frame determined to use the first quantization matrix for inverse quantization. The determination of whether or not to apply is omitted. As a result, the processing amount of the encoding process and the decoding process can be reduced, and the encoding process and the decoding process can be speeded up.

(2)第2実施形態
次に、第2実施形態について、第1実施形態との相違点を主として説明する。
(2) Second Embodiment Next, the difference between the second embodiment and the first embodiment will be mainly described.

(2.1)画像符号化装置
第2実施形態に係る画像符号化装置1について説明する。
(2.1) Image Encoding Device An image encoding device 1 according to the second embodiment will be described.

(2.1.1)画像符号化装置の構成
第2実施形態に係る画像符号化装置1の機能ブロック構成は、第1実施形態に係る画像符号化装置1の機能ブロック構成(図1参照)と同様である。但し、一部のブロックの動作が第1実施形態とは異なる。
(2.1.1) Configuration of Image Encoding Device The functional block configuration of the image encoding device 1 according to the second embodiment is the functional block configuration of the image encoding device 1 according to the first embodiment (see FIG. 1). Is the same as However, the operation of some of the blocks is different from that of the first embodiment.

第2実施形態に係る画像符号化装置1は、予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する直交変換を行う変換部104と、4×4のサイズを有する4×4変換ブロックについて、直交変換をスキップする変換スキップ(TSモード)を有効化するか否かを、1又は複数のフレームからなるシーケンス単位で判定するTS有効化判定部109dと、TS有効化判定部109dによって変換スキップが有効化されたと判定されたシーケンスに対応する各4×4変換ブロックに対して、異なる値の要素からなる第1量子化行列を用いることなく、等しい値の要素からなる第2量子化行列を用いて量子化を行う量子化部105とを備える。このように、第2実施形態に係る画像符号化装置1は、シーケンス単位でTSモードを有効化する場合に、シーケンスレベル(SPS:Sequence paramater set)で共通の量子化行列として、4×4変換ブロックについて平坦な量子化行列(第2量子化行列)を設定する。   The image coding apparatus 1 according to the second embodiment includes: a transform unit 104 which performs orthogonal transform on a transform block which is a part of a residual image which is a residual between a predicted image and an input image; TS validation determination unit 109d that determines whether or not to perform transform skip (TS mode) for skipping orthogonal transform for a 4 × 4 transform block that it has in units of a sequence of one or more frames, and TS valid For each 4 × 4 transform block corresponding to the sequence determined to be transform-skip enabled by the quantization determination unit 109d, without using a first quantization matrix consisting of elements of different values, from elements of equal values And a quantization unit 105 that performs quantization using the second quantization matrix. As described above, the image encoding device 1 according to the second embodiment performs 4 × 4 conversion as a quantization matrix common to the sequence level (SPS: Sequence parameter set) when enabling the TS mode in units of sequences. Set a flat quantization matrix (second quantization matrix) for the block.

第2実施形態において、TS有効化判定部109bは、1又は複数のフレームからなるシーケンス単位で、変換スキップを有効化するか否か(すなわち、TSモードを選択可能にするか否か)を判定する。シーケンス単位で変換スキップを有効化すると判定した場合、TS有効化判定部109bは、その旨の制御信号(例えば、transform_skip_enabled_flag=1)を出力する。transform_skip_enabled_flag=1は、対応するシーケンスについてtransform_skip_flagが存在し得ることを示す。一方で、シーケンス単位で変換スキップを有効化しないと判定した場合、TS有効化判定部109bは、その旨の制御信号(例えば、transform_skip_enabled_flag=0)を出力する。transform_skip_enabled_flag=0は、対応するシーケンスについてtransform_skip_flagが存在しないことを示す。なお、TS有効化判定部109bは、例えば、符号化の前処理においてCG(あるいはCGに似た性質)の入力信号であるかどうかを検出し、TSモードを有効化する。TS有効化判定部109bは、すでに符号化した映像を解析し、TSモードを有効化してもよい。   In the second embodiment, the TS validation determination unit 109b determines whether to enable conversion skipping (that is, whether or not the TS mode can be selected) in units of a sequence of one or a plurality of frames. Do. If it is determined that the conversion skip is enabled in units of sequences, the TS enable determination unit 109b outputs a control signal (for example, transform_skip_enabled_flag = 1) to that effect. transform_skip_enabled_flag = 1 indicates that transform_skip_flag may be present for the corresponding sequence. On the other hand, when it is determined that the conversion skip is not enabled in sequence units, the TS validation determination unit 109b outputs a control signal (for example, transform_skip_enabled_flag = 0) to that effect. transform_skip_enabled_flag = 0 indicates that transform_skip_flag does not exist for the corresponding sequence. The TS validation determination unit 109 b detects, for example, whether the input signal is CG (or a property similar to CG) in the pre-processing of encoding, and validates the TS mode. The TS validation determination unit 109b may analyze the already encoded video to validate the TS mode.

第2実施形態において、量子化部105は、TS有効化判定部109bによって変換スキップが有効化されたシーケンスを構成するフレームにおける4×4変換ブロックに対して、異なる値の要素からなる第1量子化行列(平坦でない量子化行列)を用いることなく、等しい値の要素からなる第2量子化行列(平坦な量子化行列)を用いて量子化を行うよう設定する。換言すると、量子化部105は、TS有効化判定部109bによって変換スキップが有効化されたシーケンスを構成するフレームについては、4×4変換ブロックに対する量子化を行う際に、必ず第2量子化行列を用いる。これにより、ピクチャ単位で設定することなく直交変換がスキップされた4×4変換ブロックに第1量子化行列が適用されないようにすることができる。   In the second embodiment, the quantizing unit 105 generates a first quantum composed of elements of different values with respect to a 4 × 4 transform block in a frame making up the sequence for which the transform skip is enabled by the TS validation determination unit 109 b. It is set that quantization is performed using a second quantization matrix (flat quantization matrix) consisting of elements of equal values without using a quantization matrix (non-flat quantization matrix). In other words, the quantization unit 105 always performs the second quantization matrix when performing quantization on the 4 × 4 transform block for the frames that constitute the sequence for which the conversion skip is enabled by the TS validation determination unit 109 b. Use This makes it possible to prevent the first quantization matrix from being applied to the 4 × 4 transform block in which the orthogonal transform is skipped without setting in units of pictures.

量子化部105は、TS有効化判定部109bによって変換スキップが有効化されたシーケンスを構成するフレームについて、可逆符号化部114に出力する量子化情報(すなわち、量子化行列に関する符号化信号)として、代替する符号量の少ない仮想データに置き換えてもよい。後述するように、画像復号装置2は、変換スキップが有効化されたシーケンスについては、等しい値の要素からなる第2量子化行列(平坦な量子化行列)を暗黙的に用いて逆量子化を行う。この場合、画像復号装置2は、4×4ブロックの量子化行列に関する符号化信号を無視することが可能である。量子化行列に関する符号化信号を、符号量の少ない仮想データに置き換えることによって、信号を復号せずに暗黙的に量子化行列を解し、判定を行う必要がなくなり処理量の低減が行える。   The quantization unit 105 uses the quantization information (that is, the encoded signal related to the quantization matrix) to be output to the lossless encoding unit 114 for the frame that constitutes the sequence for which the conversion skip is activated by the TS activation determination unit 109b. , And may be replaced by virtual data with a small amount of code to be replaced. As described later, the image decoding device 2 implicitly performs inverse quantization using a second quantization matrix (flat quantization matrix) consisting of elements of equal values for a sequence for which conversion skip is enabled. Do. In this case, the image decoding device 2 can ignore the coded signal related to the 4 × 4 block quantization matrix. By replacing the encoded signal relating to the quantization matrix with virtual data having a small code amount, the quantization matrix is implicitly solved without decoding the signal, and it is not necessary to make a determination, and the processing amount can be reduced.

第2実施形態において、量子化行列判定部109dは、変換スキップが有効化されたシーケンスに対応する各4×4変換ブロックについて、第1量子化行列及び第2量子化行列のいずれを量子化に用いるかの判定を省略する。これにより、符号化処理の処理量を削減するとともに符号化処理を高速化することができる。   In the second embodiment, the quantization matrix determination unit 109d quantizes any one of the first quantization matrix and the second quantization matrix for each 4 × 4 transform block corresponding to the sequence for which the transform skip is enabled. The determination of whether to use is omitted. As a result, the amount of processing of the encoding process can be reduced and the encoding process can be speeded up.

(2.1.2)符号化処理の動作
次に、第2実施形態に係る符号化処理の例について説明する。図7は、第2実施形態に係る符号化処理の一例を示すフローチャートである。図7に示すフローは、変換ブロックごとに符号化処理を実行する。また、図7に示すフローは、分割制御部109aによって4×4変換ブロックであると判定された変換ブロックに対して適用される。なお、上述した第1実施形態に係る符号化処理(図4参照)と同一の処理については、同一の符号を付して説明を適宜援用する。
(2.1.2) Operation of Encoding Process Next, an example of the encoding process according to the second embodiment will be described. FIG. 7 is a flowchart showing an example of the encoding process according to the second embodiment. The flow shown in FIG. 7 executes encoding processing for each transform block. Further, the flow shown in FIG. 7 is applied to the conversion block determined to be a 4 × 4 conversion block by the division control unit 109a. In addition, about the process same as the encoding process (refer FIG. 4) which concerns on 1st Embodiment mentioned above, the same code | symbol is attached | subjected and description is suitably used.

図7に示すように、ステップS301において、TS有効化判定部109bは、シーケンス単位で変換スキップを有効化するか否か(すなわち、TSモードを選択可能にするか否か)を判定する。シーケンス単位で変換スキップを有効化しないと判定した場合(ステップS301:NO)、ステップS302において、変換スキップ(TSモード)を使用しない従来の符号化処理と同様の処理を行う。その後、ステップS106において、変換部104は、処理対象の4×4変換ブロックに対する直交変換を行う。そして、S107に進む。   As shown in FIG. 7, in step S301, the TS validation determination unit 109b determines whether to enable conversion skipping on a sequence basis (that is, whether or not the TS mode can be selected). If it is determined that the conversion skip is not activated in sequence units (step S301: NO), the same process as the conventional encoding process not using the conversion skip (TS mode) is performed in step S302. Thereafter, in step S106, the transform unit 104 performs orthogonal transform on the 4 × 4 transform block to be processed. Then, the process proceeds to S107.

一方で、シーケンス単位で変換スキップを有効化すると判定した場合(ステップS301:YES)、TS有効化判定部109bは、シーケンス単位で変換スキップを有効化することを示す制御信号(例えば、transform_skip_enabled_flag=1)を出力する。量子化行列判定部109dは、シーケンス単位で変換スキップを有効化することを示す制御信号に基づいて、4×4変換ブロック用の量子化行列として平坦な量子化値からなる量子化行列を量子化部105及び逆量子化部106に設定する。平坦な量子化行列として、例えば式(1)を適用する。この場合、量子化行列判定部109dは、変換スキップが有効化されたシーケンスに対応する各4×4変換ブロックについて、第1量子化行列及び第2量子化行列のいずれを量子化に用いるかの判定を省略する。その後、ステップS103に処理が進む。   On the other hand, when it is determined that the conversion skip is enabled in sequence units (step S301: YES), the TS validation determination unit 109b is a control signal indicating that the conversion skip is enabled in sequence units (for example, transform_skip_enabled_flag = 1). Output). The quantization matrix determination unit 109d quantizes the quantization matrix including flat quantization values as a quantization matrix for the 4 × 4 conversion block based on the control signal indicating that the conversion skip is enabled in units of sequences. It is set in the unit 105 and the inverse quantization unit 106. For example, Equation (1) is applied as a flat quantization matrix. In this case, the quantization matrix determination unit 109d determines which of the first quantization matrix and the second quantization matrix is used for quantization for each 4 × 4 transform block corresponding to the sequence for which the transform skip is enabled. Omit the judgment. Thereafter, the process proceeds to step S103.

ステップS103において、TS適用判定部109cは、変換処理(直交変換)をスキップするか否かを判定する。その後の動作については、第1実施形態に係る符号化処理(図4参照)と同様である。   In step S103, the TS application determination unit 109c determines whether to skip the conversion process (orthogonal transformation). The subsequent operation is the same as the encoding process (see FIG. 4) according to the first embodiment.

このように、変換スキップが有効化されたシーケンスに対応する各4×4変換ブロックについては、第1量子化行列及び第2量子化行列のいずれを量子化に用いるかの判定を省略し、平坦な量子化行列を量子化に用いる。これにより、平坦でない量子化行列を設定時にTSモードを適用することによって生じる画質劣化を生じることなく、高速、低消費電力かつ高品質な符号化処理を行うことができる。   Thus, for each 4 × 4 transform block corresponding to the sequence for which transform skip is enabled, the determination of which of the first quantization matrix and the second quantization matrix to use for quantization is omitted and flat. Use quantization matrix for quantization. As a result, high-speed, low-power consumption and high-quality encoding processing can be performed without causing image quality deterioration caused by applying the TS mode when setting a non-flat quantization matrix.

(2.2)画像復号装置
第2実施形態に係る画像復号装置2について説明する。
(2.2) Image Decoding Device An image decoding device 2 according to the second embodiment will be described.

(2.2.1)画像復号装置の構成
第2実施形態に係る画像復号装置2の機能ブロック構成は、第1実施形態に係る画像復号装置2の機能ブロック構成(図5参照)と同様である。但し、一部のブロックの動作が第1実施形態とは異なる。
(2.2.1) Configuration of Image Decoding Device The functional block configuration of the image decoding device 2 according to the second embodiment is the same as the functional block configuration (see FIG. 5) of the image decoding device 2 according to the first embodiment. is there. However, the operation of some of the blocks is different from that of the first embodiment.

第2実施形態に係る画像復号装置2は、予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する逆量子化を行う逆量子化部204と、逆量子化が施された変換ブロックに対する逆直交変換を行う逆変換部205と、4×4のサイズを有する4×4変換ブロックについて、直交変換をスキップする変換スキップが有効化されているか否かを、1又は複数のフレームからなるシーケンス単位で判定するTS有効化判定部200bとを備える。逆変換部205は、TS有効化判定部によって変換スキップが有効化されていると判定されたシーケンスに対応する各4×4変換ブロックに対して、異なる値の要素からなる第1量子化行列を用いることなく、等しい値の要素からなる第2量子化行列を用いて逆量子化を行う。   The image decoding apparatus 2 according to the second embodiment includes an inverse quantization unit 204 that performs inverse quantization on a transform block that is a part of a residual image that is a residual between a predicted image and an input image; The inverse transform unit 205 which performs inverse orthogonal transform on the transformed block, and whether or not the transform skip for skipping the orthogonal transform is enabled for the 4 × 4 transform block having the 4 × 4 size, 1 or And a TS validation determination unit 200b that determines in units of a sequence of a plurality of frames. The inverse transform unit 205 is configured to generate a first quantization matrix including elements of different values for each 4 × 4 transform block corresponding to the sequence for which it is determined that the transform skip is enabled by the TS validation determination unit. Inverse quantization is performed using the second quantization matrix consisting of elements of equal value without using.

第2実施形態において、TS有効化判定部200bは、シーケンス単位で変換スキップを有効化するか否かを示す制御信号(例えば、transform_skip_enabled_flag)に基づいて、シーケンス単位で変換スキップが有効化されているか否か(すなわち、TSモードを選択可能にされているか否か)を判定し、判定結果を示す制御信号を符号化データ復号部203に出力する。   In the second embodiment, the TS validation determination unit 200b determines whether the conversion skip is enabled in sequence units based on a control signal (for example, transform_skip_enabled_flag) indicating whether or not the conversion skip is enabled in sequence units. It is determined whether or not it is possible (that is, whether or not the TS mode can be selected), and a control signal indicating the determination result is output to the encoded data decoding unit 203.

例えば、TS有効化判定部200bは、transform_skip_enabled_flag=1である場合、シーケンス単位で変換スキップが有効化されていると判定する。TS有効化判定部200bは、transform_skip_enabled_flag=0である場合、シーケンス単位で変換スキップが有効化されていないと判定する。TS有効化判定部200bは、シーケンス単位で変換スキップが有効化されていると判定した場合、平坦な量子化行列を用いることを示す制御信号を符号化データ復号部203に出力してもよい。   For example, when transform_skip_enabled_flag = 1, the TS enabled determination unit 200b determines that the conversion skip is enabled on a sequence basis. If transform_skip_enabled_flag = 0, the TS validation determination unit 200b determines that the transform skip is not enabled in units of sequences. The TS validation determination unit 200b may output a control signal indicating that a flat quantization matrix is to be used to the encoded data decoding unit 203, when it is determined that the conversion skip is enabled in units of sequences.

第2実施形態において、逆量子化部204は、フレーム単位又はシーケンス単位で変換スキップが有効化されていることを示す制御信号(又は平坦な量子化行列を用いることを示す制御信号)に基づいて、変換スキップが有効化されたシーケンスのフレームに対応する変換ブロックに対して、異なる値の要素からなる第1量子化行列(平坦でない量子化行列)を用いることなく、等しい値の要素からなる第2量子化行列(平坦な量子化行列)を用いて逆量子化を行う。換言すると、逆量子化部204は、TS有効化判定部200bによって変換スキップが有効化されていると判定されたシーケンスのフレームについては、4×4変換ブロックに対する逆量子化を行う際に、必ず第2量子化行列を用いる。これにより、直交変換がスキップされた4×4変換ブロックに第1量子化行列が適用されないようにできる。   In the second embodiment, the inverse quantization unit 204 is based on a control signal (or a control signal indicating that a flat quantization matrix is used) indicating that conversion skip is enabled on a frame basis or a sequence basis. , And for a transform block corresponding to a frame of a sequence for which transform skip is enabled, without using a first quantization matrix (non-flat quantization matrix) composed of elements of different values, Inverse quantization is performed using two quantization matrices (flat quantization matrices). In other words, the inverse quantization unit 204 always performs inverse quantization on the 4 × 4 transform block for the frame of the sequence determined by the TS validation determination unit 200 b to be the transform skip enabled. Use a second quantization matrix. This makes it possible to prevent the first quantization matrix from being applied to the 4 × 4 transform block from which the orthogonal transform has been skipped.

第2実施形態において、量子化行列判定部200dは、変換スキップが有効化されたシーケンスのフレームに対応する各4×4変換ブロックについて、第1量子化行列及び第2量子化行列のいずれを逆量子化に用いるかの判定を省略する。これにより、復号処理の処理量を削減するとともに復号処理を高速化できる。   In the second embodiment, the quantization matrix determination unit 200d inverts any one of the first quantization matrix and the second quantization matrix for each 4 × 4 transform block corresponding to the frame of the sequence for which the transform skip is enabled. The determination of whether to use for quantization is omitted. As a result, the processing amount of the decoding process can be reduced and the decoding process can be speeded up.

なお、量子化行列判定部200d(及び量子化行列設定部206)は、変換スキップが有効化されたシーケンスのフレームについては、可逆符号復号部202が復号した符号化データに含まれる量子化行列に関する符号化信号(候補行列データ等)を無視してもよい。   The quantization matrix determination unit 200d (and the quantization matrix setting unit 206) relates to the quantization matrix included in the encoded data decoded by the lossless code decoding unit 202 for the frame of the sequence for which the conversion skip is enabled. Coded signals (such as candidate matrix data) may be ignored.

(2.2.2)復号処理の動作
次に、第2実施形態に係る復号処理の例について説明する。図8は、第2実施形態に係る復号処理の一例を示すフローチャートである。図8に示すフローは、変換ブロックごとに復号処理を実行する。また、図8に示すフローは、ブロックサイズ判定部200aによって4×4変換ブロックであると判定された変換ブロックに対して適用される。なお、上述した第1実施形態に係る復号処理(図6参照)と同一の処理については、同一の符号を付して説明を適宜援用する。
(2.2.2) Operation of Decoding Process Next, an example of the decoding process according to the second embodiment will be described. FIG. 8 is a flowchart showing an example of the decoding process according to the second embodiment. In the flow shown in FIG. 8, the decoding process is performed for each conversion block. Also, the flow shown in FIG. 8 is applied to the conversion block determined to be a 4 × 4 conversion block by the block size determination unit 200 a. In addition, about the process same as the decoding process (refer FIG. 6) which concerns on 1st Embodiment mentioned above, the same code | symbol is attached | subjected and description is suitably used.

図8に示すように、ステップS201において、符号化データ復号部203は、可逆符号復号部202から符号化データの一部として制御信号、量子化変換係数データを入力し、ステップS401に進む。   As shown in FIG. 8, in step S201, the encoded data decoding unit 203 receives a control signal and quantized transform coefficient data as a part of encoded data from the lossless code decoding unit 202, and proceeds to step S401.

ステップS401において、TS有効化判定部200bは、シーケンス単位で変換スキップを有効化するか否かを示す制御信号(例えば、transform_skip_enabled_flag)に基づいて、シーケンス単位で変換スキップが有効化されているか否かを判定する。シーケンス単位で変換スキップが有効化されていないと判定した場合(ステップS401:NO)、ステップS402において、変換スキップ(TSモード)を使用しない従来の復号処理と同様の処理を行う。   In step S401, the TS validation determination unit 200b determines whether the conversion skip is enabled in sequence units based on a control signal (for example, transform_skip_enabled_flag) indicating whether the conversion skip is enabled in sequence units. Determine When it is determined that the conversion skip is not activated in sequence units (step S401: NO), the same processing as the conventional decoding processing not using the conversion skip (TS mode) is performed in step S402.

一方で、シーケンス単位で変換スキップが有効化されていると判定した場合(ステップS401:YES)、TS有効化判定部200bは、4x4ブロックにおいて平坦な量子化行列を用いることを示す制御信号を符号化データ復号部203に出力する。そして、ステップS203において、量子化行列設定部206は、平坦な量子化行列を用いることを示す制御信号に基づいて、予め定めた平坦な量子化行列を示す候補行列データを逆量子化部204に設定する。候補行列データが示す量子化値は、例えば、式(1)で示されるm[x][y]としてもよい。その後の動作については、第1実施形態に係る復号処理(図6参照)と同様である。   On the other hand, when it is determined that the conversion skip is enabled in sequence units (step S401: YES), the TS validation determination unit 200b codes a control signal indicating that a flat quantization matrix is used in the 4x4 block. It is output to the coded data decoding unit 203. Then, in step S203, the quantization matrix setting unit 206 sends candidate matrix data representing a predetermined flat quantization matrix to the inverse quantization unit 204 based on the control signal indicating that the flat quantization matrix is to be used. Set The quantization value indicated by the candidate matrix data may be, for example, m [x] [y] shown by equation (1). The subsequent operation is the same as the decoding process (see FIG. 6) according to the first embodiment.

このように、符号化シーケンスについて直交変換をスキップした符号化が行われていた場合は、4×4変換ブロックにおいて平坦な量子化行列が使われることが暗黙的に決定する。これにより、量子化行列の設定に関する処理が不要となり、処理を低減できる。また、暗黙的に設定されることから、量子化行列に関する符号化信号にエラーが重畳しても正常な復号処理を行うことが可能であると同時に、符号化情報として代替する符号量の少ない仮想データに置き換えることによって符号量の削減できる。   Thus, in the case where coding is performed by skipping orthogonal transformation for a coding sequence, it is implicitly determined that a flat quantization matrix is used in the 4 × 4 transform block. As a result, the process relating to the setting of the quantization matrix becomes unnecessary, and the process can be reduced. Also, since it is implicitly set, it is possible to perform normal decoding processing even if an error is superimposed on the coded signal related to the quantization matrix, and at the same time a virtual code with a small amount of code to be substituted as coding information. Code amount can be reduced by replacing with data.

(2.3)第2実施形態のまとめ
第2実施形態に係る画像符号化装置1において、量子化部105は、TS有効化判定部109bによって変換スキップが有効化されたシーケンスにおける4×4変換ブロックに対して、異なる値の要素からなる第1量子化行列(平坦でない量子化行列)を用いることなく、等しい値の要素からなる第2量子化行列(平坦な量子化行列)を用いて量子化を行う。また、第2実施形態に係る画像復号装置2において、逆量子化部204は変換スキップが有効化されたシーケンスに対応する4×4変換ブロックに対して、異なる値の要素からなる第1量子化行列(平坦でない量子化行列)を用いることなく、等しい値の要素からなる第2量子化行列(平坦な量子化行列)を用いて逆量子化を行う。これにより、直交変換がスキップされた4×4変換ブロックに第1量子化行列が適用されないようにすることができるため、HEVC方式において4×4変換ブロックの量子化ひずみに起因する画質の劣化を抑制することができる。特に、CG画像又は自然画像とCG画像等の人工画像が混在する画像の画質を向上させることができる。
(2.3) Summary of the Second Embodiment In the image coding device 1 according to the second embodiment, the quantization unit 105 performs 4 × 4 conversion in the sequence in which the conversion skip is enabled by the TS validation determination unit 109 b. Instead of using a first quantization matrix (non-flat quantization matrix) consisting of elements of different values for the block, using the second quantization matrix (flat quantization matrix) consisting of elements of equal values Perform. Further, in the image decoding device 2 according to the second embodiment, the inverse quantization unit 204 performs a first quantization including elements of different values with respect to the 4 × 4 transform block corresponding to the sequence for which the transform skip is enabled. Inverse quantization is performed using a second quantization matrix (flat quantization matrix) consisting of elements of equal values without using a matrix (non-flat quantization matrix). As a result, the first quantization matrix can be prevented from being applied to the 4 × 4 transform block in which the orthogonal transform is skipped, so that the image quality degradation due to the quantization distortion of the 4 × 4 transform block in the HEVC scheme It can be suppressed. In particular, the image quality of an image in which CG images or natural images and artificial images such as CG images are mixed can be improved.

さらに、第2実施形態に係る画像符号化装置1において、量子化行列判定部109dは、変換スキップが有効化されたシーケンスに対応する各4×4変換ブロックについて、第1量子化行列及び第2量子化行列のいずれを量子化に用いるかの判定を省略する。また、第2実施形態に係る画像復号装置2において、量子化行列判定部200dは、変換スキップが有効化されたシーケンスに対応する各4×4変換ブロックについて、第1量子化行列及び第2量子化行列のいずれを逆量子化に用いるかの判定を省略する。かかる判定を省略することによって、符号化処理及び復号処理の処理量を削減するとともに、符号化処理及び復号処理を高速化することができる。   Furthermore, in the image coding device 1 according to the second embodiment, the quantization matrix determination unit 109d determines the first quantization matrix and the second quantization matrix for each 4 × 4 transform block corresponding to the sequence for which the transform skip is enabled. The determination of which of the quantization matrices to use for quantization is omitted. Furthermore, in the image decoding device 2 according to the second embodiment, the quantization matrix determination unit 200d determines the first quantization matrix and the second quantum for each 4 × 4 transform block corresponding to the sequence for which the transform skip is enabled. The determination of which of the quantization matrices to use for inverse quantization is omitted. By omitting this determination, the processing amount of the encoding process and the decoding process can be reduced, and the encoding process and the decoding process can be speeded up.

(3)その他の実施形態
上述した第1及び第2実施形態は、画像符号化装置1と画像復号装置2を備えた画像処理システムとして実施してもよい。当該画像処理システムは、画像符号化装置1が出力した符号化データを記憶する記憶媒体を備え、画像復号装置2には当該記憶媒体から読み出された符号化データが入力されてもよい。また、当該画像処理システムは、画像符号化装置1が出力した符号化データを伝送するネットワークを備え、画像復号装置2には当該ネットワークが伝送した符号化データが入力されるようにしてもよい。当該ネットワークは、有線でも無線であってもよいし、複数の送信先に一斉にデータを送信する放送伝送路の一部又は全部であってもよい。
(3) Other Embodiments The first and second embodiments described above may be implemented as an image processing system including the image encoding device 1 and the image decoding device 2. The image processing system may include a storage medium for storing the encoded data output from the image encoding device 1, and the image decoding device 2 may receive the encoded data read from the storage medium. Further, the image processing system may include a network for transmitting the encoded data output from the image encoding device 1, and the image decoding device 2 may receive the encoded data transmitted from the network. The network may be wired or wireless, or may be part or all of a broadcast channel for transmitting data simultaneously to a plurality of transmission destinations.

変換ブロックは、上述のように水平方向の要素数と垂直方向の要素数が等しい正方形のブロックに限られない。変換ブロックは、水平方向の要素数と垂直方向の要素数が異なる矩形のブロックであってもよく、水平方向の要素数と垂直方向の要素数のいずれかが1である線形のブロックであってもよい。   The conversion block is not limited to a square block in which the number of elements in the horizontal direction and the number of elements in the vertical direction are equal as described above. The conversion block may be a rectangular block in which the number of elements in the horizontal direction and the number of elements in the vertical direction are different, and is a linear block in which either the number of elements in the horizontal direction or the number of elements in the vertical direction is one. It is also good.

なお、上述した第1及び第2実施形態における画像符号化装置1又は画像復号装置2の一部、例えば、減算部102、変換部104、量子化部105、逆量子化部106、逆変換部107、量子化行列設定部108、制御部109、加算部110、デブロッキングフィルタ111、予測部113、可逆符号化部114、制御部200、可逆符号復号部202、逆量子化部204、逆変換部205、量子化行列設定部206、加算部207、デブロッキングフィルタ208、及び予測部210の各機能をコンピュータで実現するようにしてもよい。その場合、これらの機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、当該プログラムを実行することによって実現してもよい。なお、ここでいう「コンピュータシステム」とは、画像符号化装置1又は画像復号装置2に内蔵されたコンピュータシステムであって、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また上記プログラムは、前述した機能の一部を実現するためのものであってもよく、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよい。   Note that part of the image encoding device 1 or the image decoding device 2 in the first and second embodiments described above, for example, the subtraction unit 102, the conversion unit 104, the quantization unit 105, the inverse quantization unit 106, and the inverse conversion unit 107, quantization matrix setting unit 108, control unit 109, addition unit 110, deblocking filter 111, prediction unit 113, lossless encoding unit 114, control unit 200, lossless code decoding unit 202, dequantization unit 204, inverse transform The functions of the unit 205, the quantization matrix setting unit 206, the addition unit 207, the deblocking filter 208, and the prediction unit 210 may be realized by a computer. In that case, a program for realizing these functions may be recorded in a computer readable recording medium, and the computer system may read the program recorded in the recording medium and execute the program. Good. Here, the “computer system” is a computer system built in the image encoding device 1 or the image decoding device 2 and includes an OS and hardware such as peripheral devices. The term "computer-readable recording medium" refers to a storage medium such as a flexible disk, a magneto-optical disk, a ROM, a portable medium such as a ROM or a CD-ROM, or a hard disk built in a computer system. Furthermore, the “computer-readable recording medium” is one that holds a program dynamically for a short time, like a communication line in the case of transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, a volatile memory in a computer system serving as a server or a client in that case may also include one that holds a program for a certain period of time. The program may be for realizing a part of the functions described above, or may be realized in combination with the program already recorded in the computer system.

また、上述した第1及び第2実施形態における画像符号化装置1及び画像復号装置2の一部、又は全部をLSI(Large Scale Integration)等の半導体集積回路として実現してもよい。画像符号化装置1及び画像復号装置2の各機能ブロックは個別にプロセッサ化してもよいし、一部又は全部を集積してプロセッサ化してもよい。また、集積回路化の手法はLSIに限らず専用回路、又は汎用プロセッサで実現してもよい。   Further, part or all of the image encoding device 1 and the image decoding device 2 in the first and second embodiments described above may be realized as a semiconductor integrated circuit such as an LSI (Large Scale Integration). Each functional block of the image encoding device 1 and the image decoding device 2 may be individually processorized, or part or all may be integrated and processed. Further, the method of circuit integration is not limited to LSI's, and implementation using dedicated circuitry or general purpose processors is also possible.

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

1:画像符号化装置、101:フレームバッファ、102:減算部、103:符号化データ生成部、109:制御部、110:加算部、111:デブロッキングフィルタ、112:参照メモリ、113:予測部、114:可逆符号化部、115:蓄積バッファ、116:動きベクトル算出部、2:画像復号装置、200:制御部、201:蓄積バッファ、202:可逆符号復号部、203:符号化データ復号部、207:加算部、208:デブロッキングフィルタ、209:参照メモリ、210:予測部、211:フレームバッファ、212:動きベクトル算出部 1: image coding apparatus 101: frame buffer 102: subtraction unit 103: coded data generation unit 109: control unit 110: addition unit 111: deblocking filter 112: reference memory 113: prediction unit , 114: lossless encoding unit, 115: accumulation buffer, 116: motion vector calculation unit, 2: image decoding apparatus, 200: control unit, 201: accumulation buffer, 202: lossless code decoding unit, 203: encoded data decoding unit , 207: addition unit, 208: deblocking filter, 209: reference memory, 210: prediction unit, 211: frame buffer, 212: motion vector calculation unit

Claims (10)

予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する直交変換を行う変換部と、
4×4のサイズを有する4×4変換ブロックについて、前記直交変換をスキップする変換スキップを有効化するか否かを、1又は複数のフレームからなるシーケンス単位で判定する有効化判定部と、
前記有効化判定部によって前記変換スキップが有効化されたと判定されたシーケンスに対応する各4×4変換ブロックに対して、異なる値の要素からなる第1量子化行列を用いることなく、等しい値の要素からなる第2量子化行列を用いて量子化を行う量子化部と
を備えることを特徴とする画像符号化装置。
A transform unit that performs orthogonal transform on a transform block that is part of a residual image that is a residual between the predicted image and the input image;
An enable determination unit that determines whether to enable the conversion skip for skipping the orthogonal transformation for a 4 × 4 transform block having a size of 4 × 4 in units of a sequence of one or more frames;
For each 4 × 4 transform block corresponding to the sequence determined to have the transform skip validated by the validation determination unit, the same value of the 4 × 4 transform block is used without using the first quantization matrix including elements of different values. An image coding apparatus comprising: a quantization unit that performs quantization using a second quantization matrix composed of elements.
前記4×4変換ブロックについて前記第1量子化行列及び前記第2量子化行列のいずれを量子化に用いるかをフレーム単位で判定する量子化行列判定部をさらに備え、
前記量子化行列判定部は、前記有効化判定部によって前記変換スキップが有効化されたと判定されたシーケンスに対応する各4×4変換ブロックについて、前記第1量子化行列及び前記第2量子化行列のいずれを量子化に用いるかの判定を省略することを特徴とする請求項1に記載の画像符号化装置。
The apparatus further comprises a quantization matrix determination unit that determines which one of the first quantization matrix and the second quantization matrix is to be used for quantization of the 4 × 4 transform block in frame units,
The quantization matrix determination unit determines the first quantization matrix and the second quantization matrix for each 4 × 4 transform block corresponding to the sequence determined by the validation determination unit as having the conversion skip validated. The image coding apparatus according to claim 1, wherein the determination as to which one of them is used for quantization is omitted.
予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する逆量子化を行う逆量子化部と、
前記逆量子化が施された前記変換ブロックに対する逆直交変換を行う逆変換部と、
4×4のサイズを有する4×4変換ブロックについて、直交変換をスキップする変換スキップが有効化されているか否かを、1又は複数のフレームからなるシーケンス単位で判定する有効化判定部とを備え、
前記逆変換部は、前記有効化判定部によって前記変換スキップが有効化されていると判定されたシーケンスに対応する各4×4変換ブロックに対して、異なる値の要素からなる第1量子化行列を用いることなく、等しい値の要素からなる第2量子化行列を用いて逆量子化を行うことを特徴とする画像復号装置。
An inverse quantization unit that performs inverse quantization on a transform block that is a part of a residual image that is a residual between a predicted image and an input image;
An inverse transform unit that performs inverse orthogonal transform on the transform block subjected to the inverse quantization;
The 4 × 4 transformation block having the 4 × 4 size is provided with an validation determination unit that determines whether or not a transform skip for skipping orthogonal transformation is enabled in a sequence unit of one or a plurality of frames. ,
The inverse transform unit is a first quantization matrix including elements of different values with respect to each 4 × 4 transform block corresponding to the sequence determined to be enabled by the validation determination unit. An image decoding apparatus characterized by performing inverse quantization using a second quantization matrix consisting of elements of equal values without using.
前記4×4変換ブロックについて前記第1量子化行列及び前記第2量子化行列のいずれを逆量子化に用いるかの判定をフレーム単位で行う量子化行列判定部をさらに備え、
前記量子化行列判定部は、前記有効化判定部によって前記変換スキップが有効化されたと判定されたシーケンスに対応する各4×4変換ブロックについて、前記第1量子化行列及び前記第2量子化行列のいずれを逆量子化に用いるかの判定を省略することを特徴とする請求項3に記載の画像復号装置。
The apparatus further comprises a quantization matrix determination unit that determines, in frame units, which of the first quantization matrix and the second quantization matrix is to be used for inverse quantization with respect to the 4 × 4 transform block,
The quantization matrix determination unit determines the first quantization matrix and the second quantization matrix for each 4 × 4 transform block corresponding to the sequence determined by the validation determination unit as having the conversion skip validated. 4. The image decoding apparatus according to claim 3, wherein the determination as to which of the above is to be used for inverse quantization is omitted.
予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する直交変換を行う変換部と、
前記変換ブロックに対する量子化を行う量子化部と、
4×4のサイズを有する4×4変換ブロックについて、異なる値の要素からなる第1量子化行列及び等しい値の要素からなる第2量子化行列のうちいずれを量子化に用いるか否かをフレーム単位で判定する量子化行列判定部とを備え、
前記変換部は、前記量子化行列判定部によって前記第1量子化行列を量子化に用いると判定されたフレームに対応する各4×4変換ブロックに対して、前記直交変換をスキップする変換スキップを適用することなく、当該4×4変換ブロックに対する前記直交変換を行うことを特徴とする画像符号化装置。
A transform unit that performs orthogonal transform on a transform block that is part of a residual image that is a residual between the predicted image and the input image;
A quantization unit that performs quantization on the transform block;
For a 4 × 4 transform block having a size of 4 × 4, it is determined whether to use the first quantization matrix of different value elements or the second quantization matrix of equal value elements for quantization. And a quantization matrix determination unit that determines in units,
The conversion unit is configured to perform a conversion skip for skipping the orthogonal conversion for each 4 × 4 conversion block corresponding to a frame determined to use the first quantization matrix for quantization by the quantization matrix determination unit. An image coding apparatus characterized by performing the orthogonal transform on the 4 × 4 transform block without applying it.
前記変換ブロックごとに、前記変換スキップを適用するか否かを判定する適用判定部をさらに備え、
前記適用判定部は、前記量子化行列判定部によって前記第1量子化行列を量子化に用いると判定されたフレームに対応する各4×4変換ブロックについて、前記変換スキップを適用するか否かの判定を省略することを特徴とする請求項5に記載の画像符号化装置。
The method further comprises an application determination unit that determines whether to apply the conversion skip for each of the conversion blocks,
The application determining unit determines whether the conversion skip is applied to each 4 × 4 conversion block corresponding to a frame determined to use the first quantization matrix for quantization by the quantization matrix determining unit. The image coding apparatus according to claim 5, wherein the determination is omitted.
予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する逆量子化を行う逆量子化部と、
前記逆量子化が施された前記変換ブロックに対する逆直交変換を行う逆変換部と、
4×4のサイズを有する4×4変換ブロックについて、異なる値の要素からなる第1量子化行列及び等しい値の要素からなる第2量子化行列のうちいずれを逆量子化に用いるかをフレーム単位で判定する量子化行列判定部とを備え、
前記逆変換部は、前記量子化行列判定部によって前記第1量子化行列を量子化に用いると判定されたフレームに対応する各4×4変換ブロックに対して、前記逆直交変換をスキップする変換スキップを適用することなく、当該4×4変換ブロックに対する逆直交変換を行うことを特徴とする画像復号装置。
An inverse quantization unit that performs inverse quantization on a transform block that is a part of a residual image that is a residual between a predicted image and an input image;
An inverse transform unit that performs inverse orthogonal transform on the transform block subjected to the inverse quantization;
For a 4 × 4 transform block having a size of 4 × 4, which of the first quantization matrix consisting of elements of different values and the second quantization matrix consisting of elements of equal values is to be used for inverse quantization in a frame unit And a quantization matrix determination unit to determine
The inverse transformation unit is a transformation that skips the inverse orthogonal transformation for each 4 × 4 transformation block corresponding to a frame determined to use the first quantization matrix for quantization by the quantization matrix determination unit. An image decoding apparatus characterized by performing inverse orthogonal transform on the 4 × 4 transform block without applying skips.
前記変換ブロックごとに、前記変換スキップを適用するか否かを判定する適用判定部をさらに備え、
前記適用判定部は、前記量子化行列判定部によって前記第1量子化行列を逆量子化に用いると判定されたフレームに対応する各4×4変換ブロックについて、前記変換スキップを適用するか否かの判定を省略することを特徴とする請求項7に記載の画像復号装置。
The method further comprises an application determination unit that determines whether to apply the conversion skip for each of the conversion blocks,
Whether the application determining unit applies the conversion skip to each 4 × 4 transform block corresponding to a frame determined to use the first quantization matrix for inverse quantization by the quantization matrix determining unit The image decoding apparatus according to claim 7, wherein the determination of is omitted.
コンピュータに、
予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する直交変換を行う変換ステップと、
4×4のサイズを有する4×4変換ブロックについて前記直交変換をスキップする変換スキップを有効化するか否かを、1又は複数のフレームからなるシーケンス単位で判定する有効化判定ステップと、
前記有効化判定ステップによって前記変換スキップが有効化されたと判定されたシーケンスに対応する各4×4変換ブロックに対して、異なる値の要素からなる第1量子化行列を用いることなく、等しい値の要素からなる第2量子化行列を用いて量子化を行う量子化ステップと
を実行させることを特徴とする画像符号化プログラム。
On the computer
A transformation step of performing orthogonal transformation on a transformation block which is a part of a residual image which is a residual between a predicted image and an input image;
An enabling determination step of determining whether to enable conversion skipping for skipping the orthogonal transformation for a 4 × 4 transform block having a size of 4 × 4 in units of a sequence of one or more frames;
For each 4 × 4 transform block corresponding to the sequence determined to have the transform skip validated by the validation determination step, without using a first quantization matrix consisting of elements of different values, the same value And a quantization step of performing quantization using a second quantization matrix composed of elements.
コンピュータに、
予測画像と入力画像との残差である残差画像の一部である変換ブロックに対する逆量子化を行う逆量子化ステップと、
前記逆量子化が施された前記変換ブロックに対する逆直交変換を行う逆変換ステップと、
4×4のサイズを有する4×4変換ブロックについて直交変換をスキップする変換スキップが有効化されているか否かを、1又は複数のフレームからなるシーケンス単位で判定する有効化判定ステップとを実行させ、
前記逆変換ステップは、前記有効化判定ステップによって前記変換スキップが有効化されていると判定されたシーケンスに対応する各4×4変換ブロックに対して、異なる値の要素からなる第1量子化行列を用いることなく、等しい値の要素からなる第2量子化行列を用いて逆量子化を行うことを特徴とする画像復号プログラム。
On the computer
An inverse quantization step for performing inverse quantization on a transform block which is a part of a residual image which is a residual between a predicted image and an input image;
Performing inverse orthogonal transformation on the transformation block subjected to the inverse quantization;
Execute an enabling determination step of determining whether or not conversion skipping for skipping orthogonal transformation is enabled for a 4 × 4 conversion block having a size of 4 × 4 in units of a sequence of one or more frames ,
The inverse transformation step is a first quantization matrix including elements of different values with respect to each 4 × 4 transformation block corresponding to the sequence determined to have the transformation skip enabled by the validation determination step. An image decoding program characterized by performing inverse quantization using a second quantization matrix consisting of elements of equal values without using.
JP2017200232A 2017-10-16 2017-10-16 Image coding device, image decoding device, image coding program, and image decoding program Active JP7076190B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017200232A JP7076190B2 (en) 2017-10-16 2017-10-16 Image coding device, image decoding device, image coding program, and image decoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017200232A JP7076190B2 (en) 2017-10-16 2017-10-16 Image coding device, image decoding device, image coding program, and image decoding program

Publications (2)

Publication Number Publication Date
JP2019075678A true JP2019075678A (en) 2019-05-16
JP7076190B2 JP7076190B2 (en) 2022-05-27

Family

ID=66544374

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017200232A Active JP7076190B2 (en) 2017-10-16 2017-10-16 Image coding device, image decoding device, image coding program, and image decoding program

Country Status (1)

Country Link
JP (1) JP7076190B2 (en)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BENJAMIN BROSS ET AL., HIGH EFFICIENCY VIDEO CODING (HEVC) TEXT SPECIFICATION DRAFT 7, JPN6021028796, 14 July 2012 (2012-07-14), pages 30 - 33, ISSN: 0004556309 *
CUILING LAN ET AL., INTRA TRANSFORM SKIPPING, JPN6021028800, 28 April 2012 (2012-04-28), ISSN: 0004556310 *

Also Published As

Publication number Publication date
JP7076190B2 (en) 2022-05-27

Similar Documents

Publication Publication Date Title
JP7051773B2 (en) Intra prediction method and encoders and decoders using it
KR102294733B1 (en) Methods of determination for chroma quantization parameter and apparatuses for using the same
US10244262B2 (en) Pixel-based intra prediction for coding in HEVC
CN105144718B (en) When skipping conversion for damaging the intra prediction mode of decoding
JP6141355B2 (en) Quantization in video coding
KR101628797B1 (en) Improved intra prediction in lossless coding in hevc
KR20190016981A (en) Method and apparatus for encoding intra prediction information
KR20190016988A (en) Method and apparatus for decoding image
JP2018137761A (en) Video coding method and device, and video decoding method and device
KR20170126896A (en) Fast video encoding method with block partitioning
KR102393178B1 (en) Method and apparatus for generating reconstruction block
US11223827B2 (en) Image encoding device, image decoding device, and the programs thereof
KR20090097013A (en) Apparatus of encoding image and apparatus of decoding image
JP2018507625A (en) Coding escape pixels for palette mode coding
KR20150099165A (en) Tsm rate-distortion optimizing method, encoding method and device using the same, and apparatus for processing picture
KR20170058870A (en) Method and apparatus for encoding/dicoding a video with non linear mapping
JP7076190B2 (en) Image coding device, image decoding device, image coding program, and image decoding program
CN112313955A (en) Method and device for encoding and decoding a data stream representing at least one image
CN112740690B (en) Method and device for encoding and decoding a data stream representing at least one image
JP7352364B2 (en) Video encoding device, video decoding device and program
US20230049569A1 (en) Method and apparatus for controlling coding tools
KR20210069005A (en) Video Encoding and Decoding Using Differential modulation
CN112292858A (en) Method and device for encoding and decoding a data stream representing at least one image
KR20130050534A (en) Methods of encoding using hadamard transform and apparatuses using the same

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

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210715

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210727

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20210927

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220215

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220330

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220517

R150 Certificate of patent or registration of utility model

Ref document number: 7076190

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150