[go: up one dir, main page]

JP7544722B2 - Encoding device, decoding device, and program - Google Patents

Encoding device, decoding device, and program Download PDF

Info

Publication number
JP7544722B2
JP7544722B2 JP2021543783A JP2021543783A JP7544722B2 JP 7544722 B2 JP7544722 B2 JP 7544722B2 JP 2021543783 A JP2021543783 A JP 2021543783A JP 2021543783 A JP2021543783 A JP 2021543783A JP 7544722 B2 JP7544722 B2 JP 7544722B2
Authority
JP
Japan
Prior art keywords
quantization
block
unit
filter
inverse
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2021543783A
Other languages
Japanese (ja)
Other versions
JPWO2021045059A1 (en
Inventor
敦郎 市ヶ谷
俊輔 岩村
慎平 根本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Broadcasting Corp
Original Assignee
Japan Broadcasting Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Japan Broadcasting Corp filed Critical Japan Broadcasting Corp
Publication of JPWO2021045059A1 publication Critical patent/JPWO2021045059A1/ja
Application granted granted Critical
Publication of JP7544722B2 publication Critical patent/JP7544722B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

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

MPEG(Moving Picture Experts Group)の委員会で勧告された規格群のシリーズなどに代表されるブロック単位で符号化処理を行う映像符号化方式では、ブロック単位で異なる条件で符号化が行われるため、ブロック間の品質が均一でないという特徴がある。Video coding methods that perform coding processing on a block-by-block basis, such as the series of standards recommended by the Moving Picture Experts Group (MPEG) committee, have the characteristic that the quality between blocks is not uniform because coding is performed under different conditions for each block.

この特徴は、映像の部分領域の信号特性に応じて、例えば、人間の検知しやすい信号特性の領域であれば高品質の信号に符号化し、検知しにくい領域であれば低品質の信号に符号化するように制御することにより視覚的に画質の劣化を感じさせない符号化制御が行えるというメリットがある。反面、ブロック単位で符号化を制御するため、ブロック境界に画質の品質差が顕在化し、ブロック状の歪みが検知される場合がある。 This feature has the advantage that it allows for coding control that does not cause visual degradation of image quality by controlling the coding according to the signal characteristics of partial regions of the image, for example by coding areas with signal characteristics that are easy for humans to detect into a high-quality signal and areas that are difficult to detect into a low-quality signal. On the other hand, because coding is controlled on a block-by-block basis, quality differences in image quality become apparent at block boundaries, and block-like distortion may be detected.

このような信号の劣化を低減するため、近年の符号化方式ではデブロッキングフィルタ処理が一般的に用いられる。デブロッキングフィルタは、信号のギャップを低減するためのフィルタであるため、一般的には低域通過フィルタの特性を持つ。 To reduce this type of signal degradation, deblocking filter processing is commonly used in recent coding methods. A deblocking filter is a filter that reduces signal gaps, so it generally has low-pass filter characteristics.

デブロッキングフィルタを固定的に適用すると、高品質領域同士の境界部においては、フィルタ処理による信号劣化が品質改善よりも大きく作用することがあり、逆に過度に低品質に符号化処理された領域同士の境界部においては、フィルタが十分に効果を発揮できない。 When a deblocking filter is applied in a fixed manner, the signal degradation caused by the filter process may have a greater effect than the quality improvement at the boundaries between high-quality regions, and conversely, the filter may not be effective enough at the boundaries between regions that have been coded at excessively low quality.

このような状況に鑑みて、従来の映像符号化方式では、量子化パラメータ(具体的には、境界を挟むブロックの量子化パラメータの平均値)に基づいてデブロッキングフィルタのフィルタ強度を制御している(例えば、非特許文献1参照)。ここで、量子化パラメータとは、1つのブロックに対して1つの値が設定され、このブロックの量子化の粗さ(ステップサイズ)を規定するパラメータをいう。In view of this situation, in conventional video coding methods, the filter strength of the deblocking filter is controlled based on a quantization parameter (specifically, the average value of the quantization parameters of blocks on either side of a boundary) (see, for example, Non-Patent Document 1). Here, the quantization parameter refers to a parameter for which one value is set for one block and which specifies the quantization coarseness (step size) of the block.

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

画像が分割されたブロック内の品質を制御するパラメータは、上述した量子化パラメータのほかに、視覚による知覚強度に応じた品質制御のために、ブロック内の周波数特性を制御する量子化行列(スケーリングリストまたはスケーリングファクターと呼ばれることもある)が用いられている。In addition to the quantization parameters mentioned above, parameters that control the quality within the blocks into which an image is divided include quantization matrices (sometimes called scaling lists or scaling factors) that control the frequency characteristics within the blocks in order to control quality according to the intensity of visual perception.

量子化行列は、ブロックサイズに応じてi×j要素の成分ごとに設定される値(重み付け係数)からなる行列であって、変換係数の低周波から高周波にわたる成分ごとに量子化の粗さを調整するために用いられる。 A quantization matrix is a matrix consisting of values (weighting coefficients) that are set for each i x j element component depending on the block size, and is used to adjust the quantization coarseness for each component ranging from low to high frequencies of the transform coefficients.

しかしながら、従来の映像符号化方式は、ブロック単位で設定される一意のパラメータである量子化パラメータを考慮してデブロッキングフィルタのフィルタ強度を制御しているものの、フィルタ強度の制御において量子化行列を考慮していない。However, while conventional video coding methods control the filter strength of the deblocking filter by taking into account the quantization parameter, which is a unique parameter that is set on a block-by-block basis, they do not take the quantization matrix into account when controlling the filter strength.

このため、量子化行列に起因するブロックノイズの発生に対してはデブロッキングフィルタのフィルタ強度を制御する方法がなく、デブロッキングフィルタによるブロック歪みの低減効果が不十分であるという問題がある。 As a result, there is no way to control the filter strength of the deblocking filter to prevent block noise caused by the quantization matrix, and the effect of the deblocking filter in reducing block noise is insufficient.

そこで、本発明は、デブロッキングフィルタを適切に制御することで画質や符号化効率を向上させる符号化装置、復号装置、及びプログラムを提供することを目的とする。 Therefore, the present invention aims to provide an encoding device, a decoding device, and a program that improve image quality and encoding efficiency by appropriately controlling a deblocking filter.

第1の態様に係る符号化装置は、画像をブロック単位に分割し、ブロック単位で前記画像を符号化する符号化装置であって、前記画像をブロック単位に分割した符号化対象ブロックと前記符号化対象ブロックを予測することにより生成した予測ブロックとの差である予測残差に変換処理及び量子化処理を行う変換・量子化部と、前記変換・量子化部により生成された変換係数に逆量子化処理及び逆変換処理することで前記予測残差を復元する逆量子化・逆変換部と、前記復元した予測残差と前記予測ブロックとを合成することにより前記符号化対象ブロックを復元する合成部と、前記復元した符号化対象ブロックと当該符号化対象ブロックに隣接する隣接ブロックとの境界にフィルタ処理するデブロッキングフィルタと、前記量子化処理及び前記逆量子化処理で用いた量子化パラメータ及び量子化行列に基づいて、前記デブロッキングフィルタのフィルタ強度を制御するフィルタ制御部と、を備え、前記量子化パラメータは、1つのブロックに対して1つの値が設定されるパラメータであって、前記量子化行列は、前記1つのブロック内の成分ごとに設定される値からなる行列であることを要旨とする。The coding device according to the first aspect is a coding device that divides an image into blocks and codes the image in blocks, and includes a transform/quantization unit that performs a transform process and a quantization process on a prediction residual, which is a difference between a block to be coded obtained by dividing the image into blocks and a prediction block generated by predicting the block to be coded; an inverse quantization/inverse transform unit that restores the prediction residual by performing an inverse quantization process and an inverse transform process on the transform coefficient generated by the transform/quantization unit; a synthesis unit that restores the block to be coded by synthesizing the restored prediction residual and the prediction block; a deblocking filter that performs a filter process on the boundary between the restored block to be coded and an adjacent block adjacent to the block to be coded; and a filter control unit that controls the filter strength of the deblocking filter based on a quantization parameter and a quantization matrix used in the quantization process and the inverse quantization process, wherein the quantization parameter is a parameter for which one value is set for one block, and the quantization matrix is a matrix consisting of values set for each component in the one block.

第2の態様に係る復号装置は、画像を分割して生成したブロック単位で復号を行う復号装置であって、符号化ストリームを復号することで、復号対象ブロックに対応する変換係数を出力するエントロピー復号部と、前記エントロピー復号部が出力する変換係数に対して逆量子化処理及び逆変換処理を行って予測残差を復元する逆量子化・逆変換部と、前記復元した予測残差と前記復号対象ブロックを予測して生成した予測ブロックとを合成して前記復号対象ブロックを復元する合成部と、前記復元した復号対象ブロックと当該復号対象ブロックに隣接する隣接ブロックとの境界に対するフィルタ処理を行うデブロッキングフィルタと、前記逆量子化処理で用いた量子化パラメータ及び量子化行列に基づいて、前記デブロッキングフィルタのフィルタ強度を制御するフィルタ制御部と、を備え、前記量子化パラメータは、1つのブロックに対して1つの値が設定されるパラメータであって、前記量子化行列は、前記1つのブロック内の成分ごとに設定される値からなる行列であることを要旨とする。 The decoding device according to the second aspect is a decoding device that performs decoding on a block-by-block basis generated by dividing an image, and includes an entropy decoding unit that decodes an encoded stream to output transform coefficients corresponding to a block to be decoded, an inverse quantization/inverse transform unit that performs inverse quantization and inverse transform processing on the transform coefficients output by the entropy decoding unit to restore a prediction residual, a synthesis unit that synthesizes the restored prediction residual and a prediction block generated by predicting the block to be decoded to restore the block to be decoded, a deblocking filter that performs a filter process on the boundary between the restored block to be decoded and an adjacent block adjacent to the block to be decoded, and a filter control unit that controls the filter strength of the deblocking filter based on a quantization parameter and a quantization matrix used in the inverse quantization process, wherein the quantization parameter is a parameter for which one value is set for one block, and the quantization matrix is a matrix consisting of values set for each component in the one block.

第3の態様に係るプログラムは、コンピュータを第1の態様に係る符号化装置として機能させることを要旨とする。The program of the third aspect has the purpose of causing a computer to function as an encoding device of the first aspect.

第4の態様に係るプログラムは、コンピュータを第2の態様に係る復号装置として機能させることを要旨とする。The program relating to the fourth aspect has the purpose of causing a computer to function as a decryption device relating to the second aspect.

本発明によれば、デブロッキングフィルタを適切に制御することで画質や符号化効率を向上させる符号化装置、復号装置、及びプログラムを提供できる。 The present invention provides an encoding device, a decoding device, and a program that improve image quality and encoding efficiency by appropriately controlling a deblocking filter.

実施形態に係る符号化装置の構成を示す図である。FIG. 1 is a diagram illustrating a configuration of an encoding device according to an embodiment. 量子化行列の一例を示す図である。FIG. 2 is a diagram illustrating an example of a quantization matrix. 実施形態に係るデブロッキングフィルタの動作例を示す図である。FIG. 11 is a diagram illustrating an example of the operation of a deblocking filter according to the embodiment. 実施形態に係る符号化装置のフィルタ制御部の構成を示す図である。FIG. 2 is a diagram illustrating a configuration of a filter control unit of the encoding device according to the embodiment. 実施形態に係る復号装置の構成を示す図である。FIG. 2 is a diagram illustrating a configuration of a decoding device according to an embodiment. 実施形態に係る復号装置のフィルタ制御部の構成を示す図である。FIG. 2 is a diagram illustrating a configuration of a filter control unit of a decoding device according to an embodiment. 実施形態に係るフィルタ制御部の動作フロー例を示す図である。FIG. 4 is a diagram illustrating an example of an operation flow of a filter control unit according to the embodiment. 変更例に係る符号化装置のフィルタ制御部の構成を示す図である。FIG. 13 is a diagram illustrating a configuration of a filter control unit of an encoding device according to a modified example. 変更例に係る復号装置のフィルタ制御部の構成を示す図である。FIG. 13 is a diagram illustrating a configuration of a filter control unit of a decoding device according to a modified example. 変更例に係るフィルタ制御部の動作フロー例を示す図である。FIG. 11 is a diagram illustrating an example of an operation flow of a filter control unit according to a modified example.

図面を参照して、実施形態に係る符号化装置及び復号装置について説明する。実施形態に係る符号化装置及び復号装置は、MPEGに代表される動画像の符号化及び復号をそれぞれ行う。以下の図面の記載において、同一又は類似の部分には同一又は類似の符号を付している。 The encoding device and the decoding device according to the embodiment will be described with reference to the drawings. The encoding device and the decoding device according to the embodiment respectively encode and decode moving images as represented by MPEG. In the following description of the drawings, the same or similar parts are given the same or similar reference symbols.

<符号化装置の構成>
まず、本実施形態に係る符号化装置の構成について説明する。図1は、本実施形態に係る符号化装置1の構成を示す図である。符号化装置1は、画像を分割して得たブロック単位で符号化を行う装置である。
<Structure of the Encoding Device>
First, the configuration of the encoding device according to this embodiment will be described. Fig. 1 is a diagram showing the configuration of an encoding device 1 according to this embodiment. The encoding device 1 is a device that performs encoding in units of blocks obtained by dividing an image.

図1に示すように、符号化装置1は、ブロック分割部100と、減算部110と、変換・量子化部120と、エントロピー符号化部130と、逆量子化・逆変換部140と、合成部150と、デブロッキングフィルタ160と、フィルタ制御部161と、メモリ170と、予測部180とを有する。As shown in FIG. 1, the encoding device 1 has a block division unit 100, a subtraction unit 110, a transformation/quantization unit 120, an entropy encoding unit 130, an inverse quantization/inverse transform unit 140, a synthesis unit 150, a deblocking filter 160, a filter control unit 161, a memory 170, and a prediction unit 180.

ブロック分割部100は、動画像を構成するフレーム(或いはピクチャ)単位の入力画像を複数の画像ブロックに分割し、分割により得た画像ブロックを減算部110に出力する。画像ブロックのサイズは、例えば32×32画素、16×16画素、8×8画素、又は4×4画素等である。画像ブロックの形状は正方形に限らず矩形(非正方形)であってもよい。画像ブロックは、符号化装置1が符号化を行う単位(符号化対象ブロック)であり、且つ復号装置が復号を行う単位(復号対象ブロック)である。このような画像ブロックはCU(Coding Unit)と呼ばれることがある。The block division unit 100 divides an input image of a frame (or picture) constituting a moving image into a plurality of image blocks, and outputs the image blocks obtained by division to the subtraction unit 110. The size of the image block is, for example, 32x32 pixels, 16x16 pixels, 8x8 pixels, or 4x4 pixels. The shape of the image block is not limited to a square, but may be a rectangle (non-square). The image block is the unit (block to be coded) that the coding device 1 codes, and is the unit (block to be coded) that the decoding device codes. Such an image block is sometimes called a CU (Coding Unit).

ブロック分割部100は、輝度信号と色差信号とに対してブロック分割を行う。以下において、ブロック分割の形状が輝度信号と色差信号とで同じである場合について主として説明するが、輝度信号と色差信号とで分割を独立に制御可能であってもよい。輝度ブロック及び色差ブロックを特に区別しないときは単に符号化対象ブロックと呼ぶ。The block division unit 100 performs block division on the luminance signal and the color difference signal. In the following, the case where the shape of the block division is the same for the luminance signal and the color difference signal will be mainly described, but it may be possible to control the division independently for the luminance signal and the color difference signal. When there is no particular distinction between the luminance block and the color difference block, they are simply referred to as the block to be coded.

減算部110は、ブロック分割部100から出力される符号化対象ブロックと、符号化対象ブロックを予測部180が予測して得た予測ブロックとの差分(誤差)を表す予測残差を算出する。減算部110は、ブロックの各画素値から予測ブロックの各画素値を減算することにより予測残差を算出し、算出した予測残差を変換・量子化部120に出力する。The subtraction unit 110 calculates a prediction residual that represents the difference (error) between the block to be coded output from the block division unit 100 and a predicted block obtained by predicting the block to be coded by the prediction unit 180. The subtraction unit 110 calculates the prediction residual by subtracting each pixel value of the predicted block from each pixel value of the block, and outputs the calculated prediction residual to the transformation/quantization unit 120.

変換・量子化部120は、ブロック単位で変換処理及び量子化処理を行う。変換・量子化部120は、変換部121と、量子化部122とを有する。The transform/quantization unit 120 performs transform processing and quantization processing on a block-by-block basis. The transform/quantization unit 120 has a transform unit 121 and a quantization unit 122.

変換部121は、減算部110から出力される予測残差に対して変換処理を行って周波数成分ごとの変換係数を算出し、算出した変換係数を量子化部122に出力する。変換処理(変換)とは、画素領域の信号を周波数領域の信号に変換する処理をいい、例えば、離散コサイン変換(DCT)や離散サイン変換(DST)、カルーネンレーブ変換(KLT)、及びそれらを整数化した変換等をいう。また、変換処理には画素領域の信号を周波数領域の信号に変換することなくスケーリング等により調整する変換スキップを含んでもよい。The transform unit 121 performs a transform process on the prediction residuals output from the subtraction unit 110 to calculate transform coefficients for each frequency component, and outputs the calculated transform coefficients to the quantization unit 122. The transform process (transformation) refers to a process of converting a pixel domain signal into a frequency domain signal, such as discrete cosine transform (DCT), discrete sine transform (DST), Karhunen-Loeb transform (KLT), and transforms that convert these into integers. The transform process may also include a transform skip that adjusts the pixel domain signal by scaling or the like without converting it into a frequency domain signal.

量子化部122は、変換部121から出力される変換係数を量子化パラメータ及び量子化行列を用いて量子化し、量子化した変換係数をエントロピー符号化部130及び逆量子化・逆変換部140に出力する。また、量子化部122は、量子化処理に関する情報(具体的には、量子化処理で用いた量子化パラメータ及び量子化行列の情報)を、エントロピー符号化部130、逆量子化部141、及びフィルタ制御部161に出力する。The quantization unit 122 quantizes the transformation coefficients output from the transformation unit 121 using the quantization parameters and the quantization matrix, and outputs the quantized transformation coefficients to the entropy coding unit 130 and the inverse quantization/inverse transform unit 140. The quantization unit 122 also outputs information related to the quantization process (specifically, information on the quantization parameters and the quantization matrix used in the quantization process) to the entropy coding unit 130, the inverse quantization unit 141, and the filter control unit 161.

ここで、量子化パラメータは、1つのブロックに対して1つの値が設定されるパラメータである。具体的には、量子化パラメータは、ブロック内の各変換係数に対して共通して適用されるパラメータであって、量子化の粗さ(ステップサイズ)を定めるパラメータである。Here, the quantization parameter is a parameter for which one value is set for one block. Specifically, the quantization parameter is a parameter that is commonly applied to each transform coefficient in a block, and is a parameter that determines the coarseness (step size) of quantization.

量子化行列は、1つのブロック内の成分ごとに設定される値からなる行列である。具体的には、量子化行列は、ブロックサイズに応じてi×j要素の成分ごとに設定される値(重み付け係数)からなる行列であって、変換係数の低周波から高周波にわたる成分ごとに量子化の粗さを調整するために用いられる。 A quantization matrix is a matrix of values that are set for each component in a block. Specifically, a quantization matrix is a matrix of values (weighting coefficients) that are set for each component of i x j elements according to the block size, and is used to adjust the quantization coarseness for each component ranging from low to high frequencies of the transform coefficients.

図2は、量子化行列の一例を示す図である。図2において、i×j=4×4である一例を示している。図2に示す例では、量子化行列は、水平方向、垂直方向の次数がそれぞれ大きくなるほど、大きな値を有する。このような量子化行列では、より右下に配列された要素に係る変換係数、つまり高域の変換係数ほど低い精度で量子化される。そのため、低域ほど濃淡や色相の空間的変化に鋭敏であるという人間の視覚特性を活用し、主観的な画質を劣化させずに量子化によって高域での情報量を低減することが許容される。 Figure 2 is a diagram showing an example of a quantization matrix. In Figure 2, an example where i x j = 4 x 4 is shown. In the example shown in Figure 2, the quantization matrix has larger values as the horizontal and vertical orders increase. In such a quantization matrix, the conversion coefficients associated with elements arranged further to the bottom right, i.e., the higher the frequency, the lower the quantization accuracy. Therefore, by utilizing the human visual characteristic that the lower the frequency, the more sensitive the spatial changes in shading and hue are, it is permissible to reduce the amount of information in the high frequency range by quantization without degrading the subjective image quality.

なお、量子化行列は、符号化対象ブロックの予測モード(イントラ予測、インター予測の別)、ブロックサイズ(例えば、2x2、4x4、8x8、16x16、32x32、64x64)、及び1つの輝度・2つの色差信号(RGB信号の場合は、R信号、B信号、G信号)のそれぞれの組み合わせについて設定可能である。 The quantization matrix can be set for each combination of the prediction mode of the block to be encoded (intra prediction or inter prediction), block size (e.g., 2x2, 4x4, 8x8, 16x16, 32x32, 64x64), and one luminance and two color difference signals (in the case of an RGB signal, the R signal, the B signal, and the G signal).

エントロピー符号化部130は、量子化部122から出力される変換係数に対してエントロピー符号化を行い、データ圧縮を行って符号化ストリーム(ビットストリーム)を生成し、符号化ストリームを符号化装置1の外部に出力する。エントロピー符号化には、ハフマン符号やCABAC(Context-based Adaptive Binary Arithmetic Coding;コンテキスト適応型2値算術符号)等を用いることができる。The entropy coding unit 130 performs entropy coding on the transform coefficients output from the quantization unit 122, compresses the data, generates a coded stream (bit stream), and outputs the coded stream to the outside of the coding device 1. For entropy coding, Huffman codes, CABAC (Context-based Adaptive Binary Arithmetic Coding), etc. can be used.

また、エントロピー符号化部130は、ブロック分割部100から各符号化対象ブロックのサイズ・形状等の情報を取得し、量子化部122から量子化処理に関する情報を取得し、予測部180から予測に関する情報(例えば、予測モードや動きベクトルの情報)を取得し、これらの情報の符号化も行う。In addition, the entropy coding unit 130 obtains information such as the size and shape of each block to be coded from the block division unit 100, obtains information regarding the quantization process from the quantization unit 122, and obtains information regarding prediction (e.g., prediction mode and motion vector information) from the prediction unit 180, and also codes this information.

逆量子化・逆変換部140は、ブロック単位で逆量子化処理及び逆変換処理を行う。逆量子化・逆変換部140は、逆量子化部141と、逆変換部142とを有する。The inverse quantization and inverse transform unit 140 performs inverse quantization and inverse transform processing on a block-by-block basis. The inverse quantization and inverse transform unit 140 includes an inverse quantization unit 141 and an inverse transform unit 142.

逆量子化部141は、量子化部122が行う量子化処理に対応する逆量子化処理を行う。具体的には、逆量子化部141は、量子化部122から出力される変換係数を、量子化パラメータ及び量子化行列を用いて逆量子化することにより変換係数を復元し、復元した変換係数を逆変換部142に出力する。The inverse quantization unit 141 performs an inverse quantization process corresponding to the quantization process performed by the quantization unit 122. Specifically, the inverse quantization unit 141 restores the transform coefficients by inverse quantizing the transform coefficients output from the quantization unit 122 using a quantization parameter and a quantization matrix, and outputs the restored transform coefficients to the inverse transform unit 142.

逆変換部142は、変換部121が行う変換処理に対応する逆変換処理を行う。例えば、変換部121がDCTを行った場合には、逆変換部142は逆DCTを行う。逆変換部142は、逆量子化部141から出力される変換係数に対して逆変換処理を行って予測残差を復元し、復元した予測残差である復元予測残差を合成部150に出力する。The inverse transform unit 142 performs an inverse transform process corresponding to the transform process performed by the transform unit 121. For example, if the transform unit 121 performs a DCT, the inverse transform unit 142 performs an inverse DCT. The inverse transform unit 142 performs an inverse transform process on the transform coefficients output from the inverse quantization unit 141 to restore the prediction residual, and outputs the restored prediction residual, which is the restored prediction residual, to the synthesis unit 150.

合成部150は、逆変換部142から出力される復元予測残差を、予測部180から出力される予測ブロックと画素単位で合成する。合成部150は、復元予測残差の各画素値と予測ブロックの各画素値を加算して符号化対象ブロックを復元(復号)し、復元したブロック単位の復号画像(復元ブロック)をデブロッキングフィルタ160に出力する。The synthesis unit 150 synthesizes the reconstructed prediction residual output from the inverse transform unit 142 with the predicted block output from the prediction unit 180 on a pixel-by-pixel basis. The synthesis unit 150 adds each pixel value of the reconstructed prediction residual to each pixel value of the predicted block to reconstruct (decode) the block to be coded, and outputs the reconstructed decoded image (reconstructed block) on a block-by-block basis to the deblocking filter 160.

デブロッキングフィルタ160は、復元ブロックと当該復元ブロックに隣接する隣接ブロックとからなる2つのブロックのブロック境界に対するフィルタ処理を行い、フィルタ処理後の復元ブロックをメモリ170に出力する。フィルタ処理は、ブロック単位の処理に起因する信号劣化を軽減するための処理であって、隣り合う2つのブロックのブロック境界における信号のギャップを平滑化するフィルタ処理である。デブロッキングフィルタ160は、一般的に信号の変動を緩やかにするローパスフィルタとして構成されている。The deblocking filter 160 performs filtering on the block boundary between two blocks consisting of a restored block and an adjacent block adjacent to the restored block, and outputs the filtered restored block to the memory 170. The filtering is a process for reducing signal degradation caused by block-by-block processing, and is a filtering process for smoothing signal gaps at the block boundary between two adjacent blocks. The deblocking filter 160 is generally configured as a low-pass filter that smoothes signal fluctuations.

図3は、本実施形態に係るデブロッキングフィルタ160の動作例を示す図である。図3に示す例では、デブロッキングフィルタ160は、8×8画素のブロックごとのブロック境界を対象としてフィルタ処理を行う。また、デブロッキングフィルタ160は、4行又は4列を単位としてフィルタ処理を行う。図3に示すブロックP及びQでは、デブロッキングフィルタ160のフィルタ処理の1単位であり、ブロックサイズが4×4画素である一例を示している。ブロックP及びQのそれぞれは、サブブロックと呼ばれてもよい。デブロッキングフィルタ160の動作の詳細については後述する。 Figure 3 is a diagram showing an example of the operation of the deblocking filter 160 according to this embodiment. In the example shown in Figure 3, the deblocking filter 160 performs filtering on block boundaries for each block of 8x8 pixels. The deblocking filter 160 also performs filtering in units of 4 rows or 4 columns. Blocks P and Q shown in Figure 3 are one unit of filtering by the deblocking filter 160, and show an example in which the block size is 4x4 pixels. Each of blocks P and Q may be referred to as a sub-block. Details of the operation of the deblocking filter 160 will be described later.

フィルタ制御部161は、デブロッキングフィルタ160を制御する。具体的には、フィルタ制御部161は、対象ブロック対のブロック境界に対するフィルタ処理を行うか否かを示す境界強度(Bs:Boundary strength)、及びデブロッキングフィルタ160のフィルタ強度を制御する。境界強度Bsとは、フィルタ処理を適用するか否か、及びそのフィルタ処理の種類を決定するためのパラメータをいう。なお、フィルタ処理を行うか否かの制御は、境界強度Bsを1以上とするか又はゼロとするかの制御とみなすことができる。The filter control unit 161 controls the deblocking filter 160. Specifically, the filter control unit 161 controls the boundary strength (Bs) indicating whether or not to perform filter processing on the block boundary of the target block pair, and the filter strength of the deblocking filter 160. The boundary strength Bs refers to a parameter for determining whether or not to apply filter processing and the type of filter processing. Note that the control of whether or not to perform filter processing can be regarded as the control of whether to set the boundary strength Bs to 1 or more or to zero.

フィルタ制御部161は、対象ブロック対の境界近傍領域における画素値の変動や、予測モード、量子化パラメータ、動き補償予測(インター予測)に用いる動きベクトルの値に基づいて、デブロッキングフィルタ160を制御する。The filter control unit 161 controls the deblocking filter 160 based on the fluctuations in pixel values in the area near the boundary of the target block pair, the prediction mode, the quantization parameter, and the value of the motion vector used for motion compensation prediction (inter prediction).

詳細については後述するが、本実施形態に係るフィルタ制御部161は、量子化部120における量子化処理及び逆量子化部141における逆変換処理に用いた量子化パラメータ及び量子化行列に基づいて、デブロッキングフィルタ160のフィルタ強度を制御する。 Although details will be described later, the filter control unit 161 in this embodiment controls the filter strength of the deblocking filter 160 based on the quantization parameter and quantization matrix used in the quantization process in the quantization unit 120 and the inverse transformation process in the inverse quantization unit 141.

このように、ブロック単位で設定される一意のパラメータである量子化パラメータだけではなく、量子化行列も考慮してデブロッキングフィルタのフィルタ強度を制御することにより、量子化行列に起因するブロックノイズの発生に対してデブロッキングフィルタ160のフィルタ強度を制御可能になり、デブロッキングフィルタ160によるブロック歪みの低減効果を向上させることができる。In this way, by controlling the filter strength of the deblocking filter taking into consideration not only the quantization parameter, which is a unique parameter set on a block-by-block basis, but also the quantization matrix, it becomes possible to control the filter strength of the deblocking filter 160 against the occurrence of block noise caused by the quantization matrix, thereby improving the effect of reducing block distortion by the deblocking filter 160.

メモリ170は、デブロッキングフィルタ160から出力される復元ブロックをフレーム単位で復号画像として蓄積する。メモリ170は、記憶している復号画像を予測部180に出力する。The memory 170 accumulates the reconstructed blocks output from the deblocking filter 160 as decoded images on a frame-by-frame basis. The memory 170 outputs the stored decoded images to the prediction unit 180.

予測部180は、ブロック単位で予測処理を行うことにより、符号化対象ブロックに対応する予測ブロックを生成し、生成した予測ブロックを減算部110及び合成部150に出力する。予測部180は、インター予測部181と、イントラ予測部182と、切替部183とを有する。The prediction unit 180 performs prediction processing on a block-by-block basis to generate a prediction block corresponding to the block to be coded, and outputs the generated prediction block to the subtraction unit 110 and the synthesis unit 150. The prediction unit 180 has an inter prediction unit 181, an intra prediction unit 182, and a switching unit 183.

インター予測部181は、メモリ170に記憶された復号画像を参照画像として用いて、ブロックマッチング等の手法により動きベクトルを算出し、符号化対象ブロックを予測してインター予測ブロックを生成し、生成したインター予測ブロックを切替部183に出力する。インター予測部181は、複数の参照画像を用いるインター予測(典型的には、双予測)や、1つの参照画像を用いるインター予測(片方向予測)の中から最適なインター予測方法を選択し、選択したインター予測方法を用いてインター予測を行う。インター予測部181は、インター予測に関する情報(動きベクトル等)をエントロピー符号化部130及びフィルタ制御部161に出力する。The inter prediction unit 181 uses the decoded image stored in the memory 170 as a reference image to calculate a motion vector by a method such as block matching, predicts the block to be coded to generate an inter prediction block, and outputs the generated inter prediction block to the switching unit 183. The inter prediction unit 181 selects an optimal inter prediction method from inter prediction using multiple reference images (typically bi-prediction) and inter prediction using one reference image (unidirectional prediction), and performs inter prediction using the selected inter prediction method. The inter prediction unit 181 outputs information related to the inter prediction (motion vector, etc.) to the entropy coding unit 130 and the filter control unit 161.

イントラ予測部182は、複数のイントラ予測モードの中から、符号化対象ブロックに適用する最適なイントラ予測モードを選択し、選択したイントラ予測モードを用いて符号化対象ブロックを予測する。イントラ予測部182は、メモリ170に記憶された復号画像のうち、符号化対象ブロックに隣接する復号済み画素値を参照してイントラ予測ブロックを生成し、生成したイントラ予測ブロックを切替部183に出力する。また、イントラ予測部182は、選択したイントラ予測モードに関する情報をエントロピー符号化部130及びフィルタ制御部161に出力する。The intra prediction unit 182 selects an optimal intra prediction mode to be applied to the block to be coded from among multiple intra prediction modes, and predicts the block to be coded using the selected intra prediction mode. The intra prediction unit 182 generates an intra prediction block by referring to decoded pixel values adjacent to the block to be coded in the decoded image stored in the memory 170, and outputs the generated intra prediction block to the switching unit 183. The intra prediction unit 182 also outputs information related to the selected intra prediction mode to the entropy coding unit 130 and the filter control unit 161.

切替部183は、インター予測部181から出力されるインター予測ブロックとイントラ予測部182から出力されるイントラ予測ブロックとを切り替えて、いずれかの予測ブロックを減算部110及び合成部150に出力する。The switching unit 183 switches between the inter prediction block output from the inter prediction unit 181 and the intra prediction block output from the intra prediction unit 182, and outputs one of the prediction blocks to the subtraction unit 110 and the synthesis unit 150.

このように、本実施形態に係る符号化装置1は、符号化対象ブロックと符号化対象ブロックを予測して得た予測ブロックとの差を表す予測残差に対して変換処理及び量子化処理を行う変換・量子化部120と、変換・量子化部により得た変換係数に対して逆量子化処理及び逆変換処理を行って予測残差を復元する逆量子化・逆変換部140と、復元した予測残差と予測ブロックとを合成して符号化対象ブロックを復元する合成部150と、復元した符号化対象ブロックと当該符号化対象ブロックに隣接する隣接ブロックとの境界に対するフィルタ処理を行うデブロッキングフィルタ160と、量子化処理及び逆量子化処理で用いた量子化パラメータ及び量子化行列に基づいて、デブロッキングフィルタ160のフィルタ強度を制御するフィルタ制御部161とを有する。 Thus, the encoding device 1 according to this embodiment has a transform/quantization unit 120 that performs transform processing and quantization processing on a prediction residual representing the difference between the block to be encoded and a prediction block obtained by predicting the block to be encoded, an inverse quantization/inverse transform unit 140 that performs inverse quantization processing and inverse transform processing on the transform coefficients obtained by the transform/quantization unit to restore the prediction residual, a synthesis unit 150 that synthesizes the restored prediction residual and the prediction block to restore the block to be encoded, a deblocking filter 160 that performs filtering processing on the boundary between the restored block to be encoded and an adjacent block adjacent to the block to be encoded, and a filter control unit 161 that controls the filter strength of the deblocking filter 160 based on the quantization parameter and quantization matrix used in the quantization processing and inverse quantization processing.

次に、本実施形態に係るフィルタ制御部161の構成について説明する。本実施形態に係るフィルタ制御部161は、符号化対象ブロックに対する量子化処理及び逆量子化処理で用いた量子化パラメータ及び量子化行列と、隣接ブロックに対する量子化処理及び逆量子化処理で用いた量子化パラメータ及び量子化行列とに基づいて、デブロッキングフィルタ160のフィルタ強度を制御する。以下において、符号化対象ブロック又はそのサブブロックがブロックPであり、隣接ブロック又はそのサブブロックがブロックQであるものとする。Next, the configuration of the filter control unit 161 according to this embodiment will be described. The filter control unit 161 according to this embodiment controls the filter strength of the deblocking filter 160 based on the quantization parameters and quantization matrix used in the quantization process and inverse quantization process for the block to be coded, and the quantization parameters and quantization matrix used in the quantization process and inverse quantization process for the adjacent block. In the following, it is assumed that the block to be coded or its sub-block is block P, and the adjacent block or its sub-block is block Q.

図4は、本実施形態に係るフィルタ制御部161の構成を示す図である。図4に示すように、本実施形態に係るフィルタ制御部161は、境界強度決定部161aと、代表値導出部161bと、オフセット算出部161cと、閾値導出部161dと、フィルタ強度制御部161eとを有する。 Figure 4 is a diagram showing the configuration of the filter control unit 161 according to this embodiment. As shown in Figure 4, the filter control unit 161 according to this embodiment has a boundary strength determination unit 161a, a representative value derivation unit 161b, an offset calculation unit 161c, a threshold derivation unit 161d, and a filter strength control unit 161e.

境界強度決定部161aは、例えば下記の表1に基づいて境界強度Bsを決定し、決定した境界強度Bsの値を閾値導出部161d及びフィルタ強度制御部161eに出力する。本実施形態では、境界強度Bsの値は0,1,2のいずれかとする。なお、輝度信号と色差信号のブロックに対する境界強度をそれぞれ算出してもよいし、輝度信号と色差信号のブロックの境界強度の組み合わせを一つの境界強度として判定してもよい。The boundary strength determination unit 161a determines the boundary strength Bs, for example, based on Table 1 below, and outputs the determined value of boundary strength Bs to the threshold derivation unit 161d and the filter strength control unit 161e. In this embodiment, the value of boundary strength Bs is set to 0, 1, or 2. Note that the boundary strengths for the luminance signal and color difference signal blocks may be calculated separately, or the combination of the boundary strengths for the luminance signal and color difference signal blocks may be determined as one boundary strength.

Figure 0007544722000001
Figure 0007544722000001

表1に示すように、境界強度決定部161aは、ブロックP及びQの少なくとも一方にイントラ予測が適用されている場合、Bsの値を2とする。 As shown in Table 1, the boundary strength determination unit 161a sets the value of Bs to 2 when intra prediction is applied to at least one of blocks P and Q.

一方、境界強度決定部161aは、ブロックP及びQの両方にインター予測が適用されており、且つ少なくとも以下の(a)乃至(d)の中の1つの条件を満たす場合には、Bs値を1とし、その他の場合には、Bs値を0とする。On the other hand, the boundary strength determination unit 161a sets the Bs value to 1 when inter prediction is applied to both blocks P and Q and at least one of the following conditions (a) to (d) is satisfied, and sets the Bs value to 0 otherwise.

(a)ブロックP及びQの少なくとも一方が有意な変換係数(すなわち、非ゼロ変換係数)を含むこと。(a) at least one of blocks P and Q contains significant transform coefficients (i.e., non-zero transform coefficients);

(b)ブロックP及びQの動きベクトルの数又は参照画像が異なること。 (b) The number of motion vectors or reference images of blocks P and Q are different.

(c)ブロックP及びQの動きベクトルの差の絶対値が閾値(例えば1画素)以上であること。 (c) The absolute value of the difference between the motion vectors of blocks P and Q is greater than or equal to a threshold value (e.g., one pixel).

境界強度決定部161aは、決定した境界強度Bsの値が0の場合、ブロックP及びQの境界に対するフィルタ処理を行わないようデブロッキングフィルタ160を制御する。 When the determined boundary strength Bs value is 0, the boundary strength determination unit 161a controls the deblocking filter 160 so as not to perform filtering on the boundaries of blocks P and Q.

代表値導出部161bは、ブロックPに対する量子化処理及び逆量子化処理で用いた量子化行列の代表値mppを導出するとともに、ブロックQに対する量子化処理及び逆量子化処理で用いた量子化行列の代表値mpqを導出し、導出した代表値mpp及びmpqをオフセット算出部161cに出力する。以下において、代表値mpp及びmpqを特に区別しないときは単に代表値mと呼ぶ。 The representative value derivation unit 161b derives a representative value m pp of the quantization matrix used in the quantization process and inverse quantization process for the block P, and also derives a representative value m pq of the quantization matrix used in the quantization process and inverse quantization process for the block Q, and outputs the derived representative values m pp and m pq to the offset calculation unit 161c. Hereinafter, when there is no particular distinction between the representative values m pp and m pq , they will simply be referred to as the representative value m p .

代表値導出部161bが導出する代表値mとしては、次の1)乃至3)のいずれかとする。 The representative value mp derived by the representative value derivation unit 161b is any one of the following 1) to 3).

1)代表値mは、量子化行列の低域成分を構成する複数の値の平均値である。 1) The representative value m p is the average value of a plurality of values constituting the low-frequency components of the quantization matrix.

直交変換された予測残差を量子化行列で量子化するケースにおいて、最もブロック歪みに影響をおよぼす低域成分に限定してmを導出する。具体的には、代表値導出部161bは、次の式(1)に示すように、低域、i<s,j<t(例えば、s=t=4)を満たすm[j][i]の平均値を代表値mとする。 In the case where the orthogonally transformed prediction residual is quantized by a quantization matrix, m p is derived by limiting it to the low-frequency component that most affects the block distortion. Specifically, the representative value derivation unit 161b determines the average value of m[j][i] that satisfies the low frequency, i<s, j<t (for example, s=t=4), as the representative value m p , as shown in the following formula (1).

Figure 0007544722000002
Figure 0007544722000002

一般的に、量子化行列は、i,jが0に近いほど低域に対する重み付け係数を意味し、人間の視覚特性を考慮して重み付けが小さくなるが、i,jが大きくなるにしたがって重み付けが大きくなる(図2参照)。また、一般的に、変換係数は、i,jが0に近いほど大きく、i,jが大きくなるほど小さくなる傾向がある。このため、低域成分に限定してmを導出することとしている。 Generally, the closer i and j are to 0, the lower the weighting coefficient for the low frequency range. Taking into account the human visual characteristics, the lower the weighting coefficient, but the larger i and j are, the higher the weighting coefficient (see FIG. 2). In addition, generally, the closer i and j are to 0, the larger the conversion coefficient is, and the larger i and j are, the smaller the conversion coefficient is. For this reason, mp is derived by limiting it to the low frequency components.

2)代表値mは、量子化行列の最低域に相当する1つの値である。 2) The representative value m p is a single value that corresponds to the lowest range of the quantization matrix.

直交変換された予測残差を量子化行列で量子化するケースにおいて、代表値導出部161bは、次の式(2)に示すように、最もブロック歪みに影響を与える最低域の係数m[0][0]を代表値mとする。 In the case of quantizing the orthogonally transformed prediction residuals using a quantization matrix, the representative value derivation unit 161b sets the lowest frequency coefficient m[0][0] that has the greatest impact on block distortion as the representative value m p , as shown in the following equation (2).

mp=m[0][0] (2)
この方法は、最低域のみのブロック歪みへの影響のみを考慮したもので、上述した1)の方法に比べてデブロッキングフィルタ制御への影響は少ないが、1つの係数の代入のみで実現されるため、非常に軽量な実現方法である。
m p = m[0][0] (2)
This method considers only the impact on lowest-frequency blocking distortion, and has less impact on deblocking filter control than method 1) above. However, since it can be implemented by only substituting one coefficient, it is a very lightweight implementation method.

3)代表値mは、量子化行列の全成分を構成する複数の値の重み付き平均値である。 3) The representative value m p is a weighted average value of a plurality of values constituting all the components of the quantization matrix.

代表値導出部161bは、量子化行列の全係数の量子化行列を考慮して代表値mを導出する。全係数を用いることで高域にも多数の係数が発生するケースについて効果的にデブロッキングフィルタ制御に反映することができる。量子化行列(MxN)は、一般的に高域に対して大きな重み付け係数が用いられることから、広域の係数を含めて平均化すると極端に代表値mの値が大きくなる傾向がある。そこで、代表値導出部161bは、視覚特性を考慮し、次の式(3)に示すように、低域成分の重みを大きくして量子化行列の重み付けを用って平均化する。 The representative value derivation unit 161b derives the representative value m p in consideration of the quantization matrix of all the coefficients of the quantization matrix. By using all the coefficients, cases in which many coefficients occur in the high frequency range can be effectively reflected in the deblocking filter control. Since a large weighting coefficient is generally used for the high frequency range in the quantization matrix (MxN), the value of the representative value m p tends to become extremely large when averaging is performed including the wide frequency range coefficients. Therefore, the representative value derivation unit 161b takes into consideration the visual characteristics and averages the low frequency components by increasing the weighting of the quantization matrix as shown in the following formula (3).

Figure 0007544722000003
Figure 0007544722000003

ここで、c[j][i]は、1.0以下の少数であり、一般的に高域において0に近づく重み付けを有する。具体的な値はシステムによって設計する。Here, c[j][i] is a decimal value less than or equal to 1.0, and generally has a weighting approaching 0 in the high frequency range. The specific value is designed depending on the system.

なお、上述した1)の方法と3)の方法とを組み合わせてもよい。具体的には、代表値導出部161bは、量子化行列の低域成分に限定してmを導出しつつ、量子化行列の最低域の係数の重みを大きくした重み付け平均を行ってもよい。 The above-mentioned methods 1) and 3) may be combined. Specifically, the representative value derivation unit 161b may derive m p limited to the low-frequency components of the quantization matrix, and perform a weighted average in which the weight of the lowest-frequency coefficient of the quantization matrix is increased.

オフセット算出部161cは、代表値導出部161bが導出した代表値mpp及びmpqに基づいて、ブロックP及びQのそれぞれについてオフセット値を算出する。 The offset calculation unit 161c calculates offset values for each of the blocks P and Q based on the representative values m pp and m pq derived by the representative value derivation unit 161b.

具体的には、オフセット算出部161cは、代表値mppを用いて、ブロックPに対するオフセット値QppOffsetを算出し、算出したオフセット値QppOffsetを閾値導出部161dに出力する。例えば、オフセット算出部161cは、次の式(4)によりオフセット値QppOffsetを算出する。 Specifically, the offset calculation unit 161c uses the representative value mpp to calculate an offset value QppOffset for the block P, and outputs the calculated offset value QppOffset to the threshold derivation unit 161d. For example, the offset calculation unit 161c calculates the offset value QppOffset by the following equation (4).

QppOffset=log2(mpp/m)×6 (4)
ただし、mはデフォルトの量子化行列の値としてシステムに規定される値である。本例では例えばmを16に設定する。
QppOffset=log 2 (m pp /m d )×6 (4)
Here, md is a value defined in the system as a default quantization matrix value. In this example, md is set to 16.

同様に、オフセット算出部161cは、代表値mpqを用いて、ブロックQに対するオフセット値QpqOffsetを算出し、算出したオフセット値QpqOffsetを閾値導出部161dに出力する。例えば、オフセット算出部161cは、次の式(5)によりオフセットQpqOffsetを算出する。 Similarly, the offset calculation unit 161c uses the representative value m pq to calculate an offset value QpqOffset for the block Q, and outputs the calculated offset value QpqOffset to the threshold derivation unit 161d. For example, the offset calculation unit 161c calculates the offset QpqOffset by the following equation (5).

QpqOffset=log2(mpq/m)×6 (5)
式(4)及び(5)において、量子化パラメータQpが対数関数によって増減するパラメータであって、代表値mをmで除算して対数をとっている。
QpqOffset=log 2 (m pq /m d )×6 (5)
In equations (4) and (5), the quantization parameter Qp is a parameter that increases and decreases according to a logarithmic function, and the representative value m p is divided by m d to take its logarithm.

なお、オフセット算出部161cでは、ハードウェアでの実装などにおいては、除算やlog関数の処理の代わりにルックアップテーブルを用いて、式(4)及び式(5)を実装してもよい。 In addition, in the case of hardware implementation, the offset calculation unit 161c may implement the formulas (4) and (5) using a lookup table instead of division or log 2 function processing.

例えば式(4)の処理の代わりにルックアップテーブルLUTをLUT[]={18,21,23,26,29,32,36,41,46,51,58,64,72,81,91,102,115,128,144,162,182,204,229,256}としたとき、下記の処理によりQppOffsetを算出してもよい。
if (mpp<md)
{
sign = -1
M = md × md / mpp
}
else
{
sign = 1
M = mpp
}
Q = 0
while (M >= LUT[Q])
{
Q++
}
QppOffset = sign × Q
For example, instead of processing equation (4), when the lookup table LUT is LUT[ ]={18, 21, 23, 26, 29, 32, 36, 41, 46, 51, 58, 64, 72, 81, 91, 102, 115, 128, 144, 162, 182, 204, 229, 256}, QppOffset may be calculated by the following processing.
if (m p p < m d )
{
sign = -1
M = md × md / mpp
}
else
{
sign = 1
M = mpp
}
Q = 0
while (M >= LUT[Q])
{
Q++
}
QppOffset = sign × Q

同様に、式(5)の処理の代わりに、下記の処理によりQpqOffsetを算出してもよい。
if (mpq<md)
{
sign = -1
M = md × md / mpq
}
else
{
sign = 1
M = mpq
}
Q = 0
while (M >= LUT[Q])
{
Q++
}
QpqOffset = sign × Q
Similarly, instead of the process of equation (5), QpqOffset may be calculated by the following process.
if (m pq < m d )
{
sign = -1
M = md × md / mpq
}
else
{
sign = 1
M = m pq
}
Q = 0
while (M >= LUT[Q])
{
Q++
}
QpqOffset = sign × Q

なお、上記はルックアップテーブルを用いたQppOffset及びQpqOffsetの算出の一例であり、量子化行列の代表値mpp及びmqqに基づいてmにより除算および対数処理をLUTで算出していれば、上記の例には限らない。 Note that the above is one example of calculating QppOffset and QpqOffset using a lookup table, and is not limited to the above example as long as division by md and logarithmic processing are calculated using an LUT based on representative values mpp and mqq of the quantization matrix.

閾値導出部161dは、ブロックPに対する量子化処理及び逆量子化処理で用いた量子化パラメータQpと、ブロックQに対する量子化処理及び逆量子化処理で用いた量子化パラメータQpと、オフセット算出部161cが算出したオフセット値QppOffset及びQpqOffsetとに基づいて、デブロッキングフィルタ160のフィルタ強度を制御するための閾値β及びtを導出し、導出した閾値β及びtをフィルタ強度制御部161eに出力する。 The threshold derivation unit 161d derives thresholds β and tC for controlling the filter strength of the deblocking filter 160, based on the quantization parameter QpP used in the quantization process and inverse quantization process for the block P, the quantization parameter QpQ used in the quantization process and inverse quantization process for the block Q, and the offset values QppOffset and QpqOffset calculated by the offset calculation unit 161c, and outputs the derived thresholds β and tC to the filter strength control unit 161e.

第1に、閾値導出部161dは、例えば次の式(6)により変数qPを算出する。First, the threshold derivation unit 161d calculates the variable qP, for example, using the following equation (6).

qP=((QpQ+QpqOffset+QpP+QppOffset+1)>>1) (6)
ここで、“>>”はシフト演算子(右シフト演算)を示す。式(6)は、基本的には、ブロックPの量子化パラメータQpと、ブロックQの量子化パラメータQpとの平均を求める計算式であるが、この計算式において量子化行列に基づくオフセット値QppOffset及びQpqOffsetが導入されている。なお、式(6)の計算式は一例に過ぎないものであって、量子化行列に基づくオフセット値QppOffset及びQpqOffsetが反映されたものであれば他の計算式を用いてもよい。
qP=((Qp Q +QpqOffset+Qp P +QppOffset+1)>>1) (6)
Here, “>>” indicates a shift operator (right shift operation). Equation (6) is basically a quantization parameter Qp P of block P and a quantization parameter Qp Q of block Q. The formula for calculating the average includes offset values QppOffset and QpqOffset based on the quantization matrix. Note that the formula (6) is merely an example. Other calculation formulas may be used as long as they reflect the offset values QppOffset and QpqOffset based on the matrix.

第2に、閾値導出部161dは、例えば次の式(7)により、閾値βを導出するためのQを算出する。Secondly, the threshold derivation unit 161d calculates Q for deriving threshold β, for example, using the following formula (7).

Q=Clip3(0,63,qP+(slice_beta_offset_div2<<1)) (7)
ここで、“<<”はシフト演算子(左シフト演算)を示す。“Clip3(X,Y,Z)”は、ZがXより小さければXを返し、ZがYより大きければYを返し、それ以外の場合はZを返すクリップ演算子である。slice_beta_offset_div2は、復号装置2にシグナリングするパラメータの1つである。
Q=Clip3(0,63,qP+(slice_beta_offset_div2<<1)) (7)
Here, "<<" indicates a shift operator (left shift operation). "Clip3(X,Y,Z)" returns X if Z is less than X, and returns Y if Z is greater than Y. otherwise, it returns Z. slice_beta_offset_div2 is one of the parameters signaled to the decoding device 2.

また、閾値導出部161dは、例えば次の式(8)により、閾値tを導出するためのQを算出する。 Furthermore, the threshold derivation unit 161d calculates Q for deriving the threshold tC , for example, by the following formula (8).

Q=Clip3(0,65,qP+2*(bS?1)+(slice_tc_offset_div2<<1)) (8)
ここで、“bS”は境界強度決定部161aが出力するBs値である。slice_tc_offset_div2は、復号装置2にシグナリングするパラメータの1つである。
Q=Clip3(0,65,qP+2*(bS?1)+(slice_tc_offset_div2<<1)) (8)
Here, “bS” is the Bs value output by the boundary strength determining unit 161 a. slice_tc_offset_div2 is one of the parameters signaled to the decoding device 2.

第3に、閾値導出部161dは、次の表2により、それぞれ算出したQから閾値β及びtを導出する。 Thirdly, the threshold derivation unit 161d derives thresholds β and tC from the calculated Q according to Table 2 below.

Figure 0007544722000004
Figure 0007544722000004

フィルタ強度制御部161eは、境界強度決定部161aが出力する境界強度Bsの値と、閾値導出部161dが出力する閾値β及びtとに基づいて、デブロッキングフィルタ160のフィルタ強度を制御する。 The filter strength control unit 161e controls the filter strength of the deblocking filter 160 based on the value of the boundary strength Bs output by the boundary strength determination unit 161a and the thresholds β and tC output by the threshold derivation unit 161d.

フィルタ強度制御部161eは、境界強度Bsの値が1又は2の場合には、次の式(9)を満たす場合にのみ、フィルタ処理を行うようデブロッキングフィルタ160を制御してもよい(図3参照)。When the value of the boundary strength Bs is 1 or 2, the filter strength control unit 161e may control the deblocking filter 160 to perform filtering only when the following equation (9) is satisfied (see Figure 3).

Figure 0007544722000005
Figure 0007544722000005

また、フィルタ強度制御部161eは、フィルタ処理を行う場合、以下の条件式(10)乃至(15)を全て満たす場合に強いフィルタを適用し、それ以外の場合に弱いフィルタを適用してもよい(図3参照)。In addition, when performing filter processing, the filter strength control unit 161e may apply a strong filter when all of the following conditional expressions (10) to (15) are satisfied, and apply a weak filter in other cases (see Figure 3).

Figure 0007544722000006
Figure 0007544722000006

このように、本実施形態に係るフィルタ制御部161は、ブロック単位で設定される一意のパラメータである量子化パラメータだけではなく、量子化行列も考慮してデブロッキングフィルタ160のフィルタ強度を制御する。これにより、量子化行列に起因するブロックノイズの発生に対してデブロッキングフィルタ160のフィルタ強度を制御可能になり、デブロッキングフィルタ160によるブロック歪みの低減効果を向上させることができる。In this way, the filter control unit 161 according to this embodiment controls the filter strength of the deblocking filter 160 taking into consideration not only the quantization parameter, which is a unique parameter set for each block, but also the quantization matrix. This makes it possible to control the filter strength of the deblocking filter 160 in response to the occurrence of block noise caused by the quantization matrix, thereby improving the effect of reducing block distortion by the deblocking filter 160.

<復号装置の構成>
次に、本実施形態に係る復号装置の構成について、上述した符号化装置の構成との相違点を主として説明する。図5は、本実施形態に係る復号装置2の構成を示す図である。復号装置2は、符号化ストリームから復号対象ブロックを復号する装置である。
<Configuration of Decoding Device>
Next, the configuration of a decoding device according to this embodiment will be described, focusing mainly on the differences from the configuration of the encoding device described above. Fig. 5 is a diagram showing the configuration of a decoding device 2 according to this embodiment. The decoding device 2 is a device that decodes a current block from an encoded stream.

図5に示すように、復号装置2は、エントロピー復号部200と、逆量子化・逆変換部210と、合成部220と、デブロッキングフィルタ230と、フィルタ制御部231と、メモリ240と、予測部250とを有する。As shown in FIG. 5, the decoding device 2 has an entropy decoding unit 200, an inverse quantization/inverse transform unit 210, a synthesis unit 220, a deblocking filter 230, a filter control unit 231, a memory 240, and a prediction unit 250.

エントロピー復号部200は、符号化装置1により生成された符号化ストリームを復号し、各種のシグナリング情報を復号する。具体的には、エントロピー復号部200は、復号対象ブロックに適用された量子化処理に関する情報を取得し、取得した情報を逆量子化部211及びフィルタ制御部231に出力する。また、エントロピー復号部200は、復号対象ブロックに適用された予測に関する情報(例えば、予測種別情報、動きベクトル情報)を取得し、取得した情報を予測部250及びフィルタ制御部231に出力する。The entropy decoding unit 200 decodes the encoded stream generated by the encoding device 1 and decodes various signaling information. Specifically, the entropy decoding unit 200 acquires information related to the quantization process applied to the block to be decoded, and outputs the acquired information to the inverse quantization unit 211 and the filter control unit 231. The entropy decoding unit 200 also acquires information related to the prediction applied to the block to be decoded (e.g., prediction type information, motion vector information), and outputs the acquired information to the prediction unit 250 and the filter control unit 231.

また、エントロピー復号部200は、符号化ストリームを復号し、量子化された変換係数を取得し、取得した変換係数を逆量子化・逆変換部210(逆量子化部211)に出力する。 In addition, the entropy decoding unit 200 decodes the encoded stream, obtains quantized transform coefficients, and outputs the obtained transform coefficients to the inverse quantization/inverse transform unit 210 (inverse quantization unit 211).

逆量子化・逆変換部210は、ブロック単位で逆量子化処理及び逆変換処理を行う。逆量子化・逆変換部210は、逆量子化部211と、逆変換部212とを有する。The inverse quantization and inverse transform unit 210 performs inverse quantization and inverse transform processing on a block-by-block basis. The inverse quantization and inverse transform unit 210 has an inverse quantization unit 211 and an inverse transform unit 212.

逆量子化部211は、符号化装置1の量子化部122が行う量子化処理に対応する逆量子化処理を行う。逆量子化部211は、エントロピー復号部200から出力される量子化変換係数を、量子化パラメータ及び量子化行列を用いて逆量子化することにより、復号対象ブロックの変換係数を復元し、復元した変換係数を逆変換部212に出力する。The inverse quantization unit 211 performs an inverse quantization process corresponding to the quantization process performed by the quantization unit 122 of the encoding device 1. The inverse quantization unit 211 restores the transform coefficients of the block to be decoded by inverse quantizing the quantized transform coefficients output from the entropy decoding unit 200 using a quantization parameter and a quantization matrix, and outputs the restored transform coefficients to the inverse transform unit 212.

逆変換部212は、符号化装置1の変換部121が行う変換処理に対応する逆変換処理を行う。逆変換部212は、逆量子化部211から出力される変換係数に対して逆変換処理を行って予測残差を復元し、復元した予測残差(復元予測残差)を合成部220に出力する。The inverse transform unit 212 performs an inverse transform process corresponding to the transform process performed by the transform unit 121 of the encoding device 1. The inverse transform unit 212 performs an inverse transform process on the transform coefficients output from the inverse quantization unit 211 to restore the prediction residual, and outputs the restored prediction residual (restored prediction residual) to the synthesis unit 220.

合成部220は、逆変換部212から出力される予測残差と、予測部250から出力される予測ブロックとを画素単位で合成することにより、復号対象ブロックを復元(復号)し、復元ブロックをデブロッキングフィルタ230に出力する。The synthesis unit 220 reconstructs (decodes) the block to be decoded by synthesizing the prediction residual output from the inverse transform unit 212 and the prediction block output from the prediction unit 250 on a pixel-by-pixel basis, and outputs the reconstructed block to the deblocking filter 230.

デブロッキングフィルタ230は、符号化装置1のデブロッキングフィルタ160と同様な動作を行う。デブロッキングフィルタ230は、合成部220から出力される復元ブロックと当該復元ブロックに隣接するブロックとからなるブロック対(ブロックP及びQ)の境界に対するフィルタ処理を行い、フィルタ処理後の復元ブロックをメモリ240に出力する。The deblocking filter 230 performs an operation similar to that of the deblocking filter 160 of the encoding device 1. The deblocking filter 230 performs a filter process on the boundary of a block pair (blocks P and Q) consisting of a reconstructed block output from the synthesis unit 220 and a block adjacent to the reconstructed block, and outputs the reconstructed block after the filter process to the memory 240.

フィルタ制御部231は、エントロピー復号部200から出力される情報に基づいて、符号化装置1のフィルタ制御部161と同様な動作を行う。フィルタ制御部231は、例えば、表1に示した方法で境界強度Bsを選択し、式(1)乃至式(15)によりデブロッキングフィルタ160のフィルタ強度を制御する。The filter control unit 231 performs operations similar to those of the filter control unit 161 of the encoding device 1 based on the information output from the entropy decoding unit 200. The filter control unit 231 selects the boundary strength Bs, for example, by the method shown in Table 1, and controls the filter strength of the deblocking filter 160 according to equations (1) to (15).

メモリ240は、デブロッキングフィルタ230から出力される復元ブロックをフレーム単位で復号画像として記憶する。メモリ240は、フレーム単位の復号画像を復号装置2の外部に出力する。The memory 240 stores the reconstructed blocks output from the deblocking filter 230 as decoded images on a frame-by-frame basis. The memory 240 outputs the decoded images on a frame-by-frame basis to the outside of the decoding device 2.

予測部250は、ブロック単位で予測を行う。予測部250は、インター予測部251と、イントラ予測部252と、切替部253とを有する。The prediction unit 250 performs prediction on a block-by-block basis. The prediction unit 250 has an inter prediction unit 251, an intra prediction unit 252, and a switching unit 253.

インター予測部251は、メモリ240に記憶された復号画像を参照画像として用いて、復号対象ブロックをインター予測により予測する。インター予測部251は、エントロピー復号部200から出力される動きベクトル情報を用いてインター予測を行うことによりインター予測ブロックを生成し、生成したインター予測ブロックを切替部253に出力する。The inter prediction unit 251 predicts the block to be decoded by inter prediction using the decoded image stored in the memory 240 as a reference image. The inter prediction unit 251 generates an inter prediction block by performing inter prediction using the motion vector information output from the entropy decoding unit 200, and outputs the generated inter prediction block to the switching unit 253.

イントラ予測部252は、メモリ240に記憶された復号画像のうち復号対象ブロックに隣接する参照画素を参照し、エントロピー復号部200から出力される情報に基づいて、復号対象ブロックをイントラ予測により予測する。そして、イントラ予測部252は、イントラ予測ブロックを生成し、生成したイントラ予測ブロックを切替部253に出力する。The intra prediction unit 252 refers to reference pixels adjacent to the block to be decoded in the decoded image stored in the memory 240, and predicts the block to be decoded by intra prediction based on the information output from the entropy decoding unit 200. The intra prediction unit 252 then generates an intra prediction block and outputs the generated intra prediction block to the switching unit 253.

切替部253は、インター予測部251から出力されるインター予測ブロックとイントラ予測部252から出力されるイントラ予測ブロックとを切り替えて、いずれかの予測ブロックを合成部220に出力する。The switching unit 253 switches between the inter prediction block output from the inter prediction unit 251 and the intra prediction block output from the intra prediction unit 252, and outputs one of the prediction blocks to the synthesis unit 220.

このように、本実施形態に係る復号装置2は、符号化ストリームを復号することで、復号対象ブロックに対応する変換係数を出力するエントロピー復号部200と、エントロピー復号部200が出力する変換係数に対して逆量子化処理及び逆変換処理を行って予測残差を復元する逆量子化・逆変換部210と、復元した予測残差と復号対象ブロックを予測して得た予測ブロックとを合成して復号対象ブロックを復元する合成部220と、復元した復号対象ブロックと当該復号対象ブロックに隣接する隣接ブロックとの境界に対するフィルタ処理を行うデブロッキングフィルタ230と、逆量子化処理で用いた量子化パラメータ及び量子化行列に基づいて、デブロッキングフィルタ230のフィルタ強度を制御するフィルタ制御部231とを有する。 Thus, the decoding device 2 according to this embodiment includes an entropy decoding unit 200 that outputs transform coefficients corresponding to a block to be decoded by decoding an encoded stream, an inverse quantization/inverse transform unit 210 that performs inverse quantization and inverse transform processing on the transform coefficients output by the entropy decoding unit 200 to restore a prediction residual, a synthesis unit 220 that synthesizes the restored prediction residual and a prediction block obtained by predicting the block to be decoded to restore the block to be decoded, a deblocking filter 230 that performs filtering processing on the boundary between the restored block to be decoded and an adjacent block adjacent to the block to be decoded, and a filter control unit 231 that controls the filter strength of the deblocking filter 230 based on the quantization parameter and quantization matrix used in the inverse quantization processing.

次に、本実施形態に係るフィルタ制御部231の構成について説明する。図6は、本実施形態に係るフィルタ制御部231の構成を示す図である。図6に示すように、本実施形態に係るフィルタ制御部231は、境界強度決定部231aと、代表値導出部231bと、オフセット算出部231cと、閾値導出部231dと、フィルタ強度制御部231eとを有する。Next, the configuration of the filter control unit 231 according to this embodiment will be described. FIG. 6 is a diagram showing the configuration of the filter control unit 231 according to this embodiment. As shown in FIG. 6, the filter control unit 231 according to this embodiment has a boundary strength determination unit 231a, a representative value derivation unit 231b, an offset calculation unit 231c, a threshold derivation unit 231d, and a filter strength control unit 231e.

境界強度決定部231a、代表値導出部231b、オフセット算出部231c、閾値導出部231d、及びフィルタ強度制御部231eは、符号化装置1の境界強度決定部161a、代表値導出部161b、オフセット算出部161c、閾値導出部161d、及びフィルタ強度制御部161eとそれぞれ同様な動作を行う。The boundary strength determination unit 231a, the representative value derivation unit 231b, the offset calculation unit 231c, the threshold derivation unit 231d, and the filter strength control unit 231e perform operations similar to those of the boundary strength determination unit 161a, the representative value derivation unit 161b, the offset calculation unit 161c, the threshold derivation unit 161d, and the filter strength control unit 161e of the encoding device 1, respectively.

<フィルタ制御部の動作例>
次に、本実施形態に係るフィルタ制御部161及びフィルタ制御部231の動作例について説明する。フィルタ制御部161及びフィルタ制御部231は同じ動作を行うため、ここではフィルタ制御部231を例に挙げて説明する。図7は、本実施形態に係るフィルタ制御部231の動作フロー例を示す図である。
<Example of operation of filter control section>
Next, an example of the operation of the filter control unit 161 and the filter control unit 231 according to this embodiment will be described. Since the filter control unit 161 and the filter control unit 231 perform the same operation, the filter control unit 231 will be taken as an example for description here. Fig. 7 is a diagram showing an example of the operation flow of the filter control unit 231 according to this embodiment.

図7に示すように、ステップS1において、境界強度決定部231aは、表1に示した方法により境界強度Bsを決定し、決定した境界強度Bsの値を閾値導出部231d及びフィルタ強度制御部231eに出力する。決定された境界強度Bsの値が0である場合、ステップS2以降の処理を行わずに、ブロックP及びQの境界に対するフィルタ処理を行わない。 As shown in FIG. 7, in step S1, the boundary strength determination unit 231a determines the boundary strength Bs using the method shown in Table 1, and outputs the determined value of boundary strength Bs to the threshold derivation unit 231d and the filter strength control unit 231e. If the determined value of boundary strength Bs is 0, the processing from step S2 onwards is not performed, and filter processing is not performed on the boundaries of blocks P and Q.

ステップS2において、代表値導出部231bは、ブロックPに対する逆量子化処理で用いた量子化行列の代表値mppを導出するとともに、ブロックQに対する逆量子化処理で用いた量子化行列の代表値mpqを導出し、導出した代表値mpp及びmpqをオフセット算出部231cに出力する。代表値導出部231bが導出する代表値mとしては、上述した1)乃至3)のいずれかを用いる。 In step S2, the representative value derivation unit 231b derives a representative value m pp of the quantization matrix used in the inverse quantization process for block P, and derives a representative value m pq of the quantization matrix used in the inverse quantization process for block Q, and outputs the derived representative values m pp and m pq to the offset calculation unit 231c. As the representative value m p derived by the representative value derivation unit 231b, any of 1) to 3) described above is used.

ステップS3において、オフセット算出部231cは、代表値導出部231bが導出した代表値mpp及びmpqに基づいて、ブロックP及びQのそれぞれについてオフセット値を算出する。具体的には、オフセット算出部231cは、代表値mppを用いて、上述した式(4)によりブロックPに対するオフセット値QppOffsetを算出し、算出したオフセット値QppOffsetを閾値導出部231dに出力する。同様に、オフセット算出部231cは、代表値mpqを用いて、上述した式(5)によりブロックQに対するオフセット値QpqOffsetを算出し、算出したオフセット値QpqOffsetを閾値導出部231dに出力する。 In step S3, the offset calculation unit 231c calculates offset values for each of blocks P and Q based on the representative values m pp and m pq derived by the representative value derivation unit 231b. Specifically, the offset calculation unit 231c uses the representative value m pp to calculate an offset value QppOffset for block P according to the above-mentioned equation (4), and outputs the calculated offset value QppOffset to the threshold derivation unit 231d. Similarly, the offset calculation unit 231c uses the representative value m pq to calculate an offset value QpqOffset for block Q according to the above-mentioned equation (5), and outputs the calculated offset value QpqOffset to the threshold derivation unit 231d.

ステップS4において、閾値導出部231dは、ブロックPに対する逆量子化処理で用いた量子化パラメータQpと、ブロックQに対する逆量子化処理で用いた量子化パラメータQpと、オフセット算出部231cが算出したオフセット値QppOffset及びQpqOffsetとに基づいて、上述した式(6)により変数qPを算出する。 In step S4, the threshold derivation unit 231d calculates the variable qP by the above-mentioned equation (6) based on the quantization parameter QpP used in the inverse quantization process for the block P, the quantization parameter QpQ used in the inverse quantization process for the block Q, and the offset values QppOffset and QpqOffset calculated by the offset calculation unit 231c.

ステップS5において、閾値導出部231dは、変数qPに基づいて、上述した式(7)及び式(8)により変数Qを算出し、算出した変数Qから表2により閾値β及びtを導出する。 In step S5, the threshold derivation unit 231d calculates the variable Q by the above-mentioned formulas (7) and (8) based on the variable qP, and derives the thresholds β and tC from the calculated variable Q according to Table 2.

ステップS6において、フィルタ強度制御部231eは、境界強度決定部231aが出力する境界強度Bsの値と、閾値導出部231dが出力する閾値β及びtとに基づいて、デブロッキングフィルタ230のフィルタ強度を制御する。 In step S6, the filter strength control unit 231e controls the filter strength of the deblocking filter 230 based on the value of the boundary strength Bs output by the boundary strength determination unit 231a and the thresholds β and tC output by the threshold derivation unit 231d.

このように、本実施形態に係るフィルタ制御部231は、ブロック単位で設定される一意のパラメータである量子化パラメータだけではなく、量子化行列も考慮してデブロッキングフィルタ230のフィルタ強度を制御する。これにより、量子化行列に起因するブロックノイズの発生に対してデブロッキングフィルタ230のフィルタ強度を制御可能になり、デブロッキングフィルタ230によるブロック歪みの低減効果を向上させることができる。In this way, the filter control unit 231 according to this embodiment controls the filter strength of the deblocking filter 230 taking into consideration not only the quantization parameter, which is a unique parameter set for each block, but also the quantization matrix. This makes it possible to control the filter strength of the deblocking filter 230 in response to the occurrence of block noise caused by the quantization matrix, thereby improving the effect of reducing block distortion by the deblocking filter 230.

<変更例>
次に、実施形態の変更例について、上述の実施形態との相違点を主として説明する。
<Example of change>
Next, a modified example of the embodiment will be described, focusing mainly on the differences from the above-described embodiment.

まず、本変更例に係る符号化装置1について説明する。本変更例に係る符号化装置1において、エントロピー符号化部130は、複数の量子化行列の候補のそれぞれについて規定されたオフセット値からなる配列(以下、「オフセット配列」と呼ぶ)を符号化ストリームに含めて復号装置に伝送する。具体的には、オフセット配列は、符号化対象ブロックの予測モード、ブロックサイズ、及び信号種別(1つの輝度・2つの色差信号)の組み合わせに応じて設定される各量子化行列についてオフセット値を格納したものである。詳細については後述するが、オフセット値は、デブロッキングフィルタ処理におけるフィルタ強度を制御するために用いられる。First, the encoding device 1 according to this modified example will be described. In the encoding device 1 according to this modified example, the entropy encoding unit 130 transmits an array (hereinafter referred to as the "offset array") consisting of offset values defined for each of a plurality of quantization matrix candidates to the decoding device, including the array in the encoding stream. Specifically, the offset array stores offset values for each quantization matrix set according to a combination of the prediction mode, block size, and signal type (one luminance and two chrominance signals) of the block to be encoded. The offset values are used to control the filter strength in the deblocking filter process, as will be described in detail later.

図8は、本変更例に係るフィルタ制御部161の構成を示す図である。図8に示すように、本変更例に係るフィルタ制御部161は、境界強度決定部1161aと、オフセット導出部1161bと、閾値導出部1161cと、フィルタ強度制御部1161dとを有する。 Figure 8 is a diagram showing the configuration of the filter control unit 161 according to this modified example. As shown in Figure 8, the filter control unit 161 according to this modified example has a boundary strength determination unit 1161a, an offset derivation unit 1161b, a threshold derivation unit 1161c, and a filter strength control unit 1161d.

境界強度決定部1161aは、例えば上記の表1に基づいて境界強度Bsを決定し、決定した境界強度Bsの値を閾値導出部1161c及びフィルタ強度制御部1161dに出力する。本変更例では、境界強度Bsの値は0,1,2のいずれかとする。なお、輝度信号と色差信号のブロックに対する境界強度をそれぞれ算出してもよいし、輝度信号と色差信号のブロックの境界強度の組み合わせを一つの境界強度として判定してもよい。The boundary strength determination unit 1161a determines the boundary strength Bs, for example, based on Table 1 above, and outputs the determined value of boundary strength Bs to the threshold derivation unit 1161c and the filter strength control unit 1161d. In this modified example, the value of boundary strength Bs is set to 0, 1, or 2. Note that the boundary strengths for the luminance signal and color difference signal blocks may be calculated separately, or the combination of the boundary strengths of the luminance signal and color difference signal blocks may be determined as one boundary strength.

表1に示すように、境界強度決定部1161aは、ブロックP及びQの少なくとも一方にイントラ予測が適用されている場合、Bsの値を2とする。 As shown in Table 1, the boundary strength determination unit 1161a sets the value of Bs to 2 when intra prediction is applied to at least one of blocks P and Q.

一方、境界強度決定部1161aは、ブロックP及びQの両方にインター予測が適用されており、且つ少なくとも以下の(a)乃至(d)の中の1つの条件を満たす場合には、Bs値を1とし、その他の場合には、Bs値を0とする。On the other hand, the boundary strength determination unit 1161a sets the Bs value to 1 when inter prediction is applied to both blocks P and Q and at least one of the following conditions (a) to (d) is satisfied, and sets the Bs value to 0 otherwise.

(a)ブロックP及びQの少なくとも一方が有意な変換係数(すなわち、非ゼロ変換係数)を含むこと。(a) at least one of blocks P and Q contains significant transform coefficients (i.e., non-zero transform coefficients);

(b)ブロックP及びQの動きベクトルの数又は参照画像が異なること。 (b) The number of motion vectors or reference images of blocks P and Q are different.

(c)ブロックP及びQの動きベクトルの差の絶対値が閾値(例えば1画素)以上であること。 (c) The absolute value of the difference between the motion vectors of blocks P and Q is greater than or equal to a threshold value (e.g., one pixel).

境界強度決定部1161aは、決定した境界強度Bsの値が0の場合、ブロックP及びQの境界に対するフィルタ処理を行わないようデブロッキングフィルタ160を制御する。 When the determined boundary strength Bs value is 0, the boundary strength determination unit 1161a controls the deblocking filter 160 so as not to perform filtering on the boundaries of blocks P and Q.

オフセット導出部1161bは、上述したオフセット配列に基づいて、ブロックPに対する量子化処理及び逆量子化処理で用いた量子化行列に対応するオフセット値QppOffsetと、ブロックQに対する量子化処理及び逆量子化処理で用いた量子化行列に対応するオフセット値QpqOffsetとを導出する。 Based on the above-mentioned offset array, the offset derivation unit 1161b derives an offset value QppOffset corresponding to the quantization matrix used in the quantization process and inverse quantization process for block P, and an offset value QpqOffset corresponding to the quantization matrix used in the quantization process and inverse quantization process for block Q.

例えば、オフセット導出部1161bは、ブロックPに対する量子化処理及び逆量子化処理で用いた量子化行列の番号をkとした場合、オフセット配列中のオフセット値m[k]を取得し、取得したオフセット値m[k]をQppOffsetとする。ここで、kは、予測モード、ブロックサイズ、及び信号種別の組み合わせに応じて定まるブロック種別を示すインデックス値であってもよい。オフセット導出部1161bは、オフセット値m[k]を次の式(16)のようにして変換してQppOffsetとしてもよい。For example, when the number of the quantization matrix used in the quantization process and the inverse quantization process for the block P is k, the offset derivation unit 1161b obtains an offset value m[k] in the offset array, and sets the obtained offset value m[k] as QppOffset. Here, k may be an index value indicating a block type determined according to a combination of a prediction mode, a block size, and a signal type. The offset derivation unit 1161b may convert the offset value m[k] according to the following formula (16) to obtain QppOffset.

QppOffset=log2(mpp/md)×6 (16)
ただし、mdはデフォルトの量子化行列の値としてシステムに規定される値である。本例では例えばmdを16に設定する。
QppOffset=log 2 (m pp /m d )×6 (16)
Here, md is a value defined in the system as the default quantization matrix value. In this example, md is set to 16.

同様に、オフセット導出部1161bは、ブロックQに対する量子化処理及び逆量子化処理で用いた量子化行列の番号をlとした場合、オフセット配列中のオフセット値m[l]を取得し、取得したオフセット値m[l]をQpqOffsetとする。ここで、lは、予測モード、ブロックサイズ、及び信号種別の組み合わせに応じて定まるブロック種別を示すインデックス値であってもよい。オフセット導出部1161bは、オフセット値m[l]を次の式(17)のようにして変換してQpqOffsetとしてもよい。Similarly, when the number of the quantization matrix used in the quantization process and the inverse quantization process for block Q is l, the offset derivation unit 1161b obtains an offset value m[l] in the offset array, and sets the obtained offset value m[l] as QpqOffset. Here, l may be an index value indicating a block type determined according to a combination of a prediction mode, a block size, and a signal type. The offset derivation unit 1161b may convert the offset value m[l] according to the following formula (17) to obtain QpqOffset.

QpqOffset=log2(mpq/md)×6 (17)
式(16)及び(17)において、量子化パラメータQpが対数関数によって増減するパラメータであって、代表値mpをmdで除算して対数をとっている。
QpqOffset=log 2 (m pq /m d )×6 (17)
In equations (16) and (17), the quantization parameter Qp is a parameter that increases and decreases according to a logarithmic function, and the representative value m p is divided by m d to take the logarithm.

なお、オフセット導出部1161bでは、ハードウェアでの実装などにおいては、除算やlog2関数の処理の代わりにルックアップテーブルを用いて、式(16)及び式(17)を実装してもよい。 In addition, in the case of hardware implementation, the offset derivation unit 1161b may implement equations (16) and (17) using a lookup table instead of division or log 2 function processing.

例えば式(16)の処理の代わりにルックアップテーブルLUTをLUT[]={18,21,23,26,29,32,36,41,46,51,58,64,72,81,91,102,115,128,144,162,182,204,229,256}としたとき、下記の処理によりQppOffsetを算出してもよい。
if (mpp<md)
[
sign = -1
M = md × md / mpp
]
else
[
sign = 1
M = mpp
]
Q = 0
while (M >= LUT[Q])
[
Q++
]
QppOffset = sign × Q
For example, instead of processing equation (16), when the lookup table LUT is LUT[ ]={18, 21, 23, 26, 29, 32, 36, 41, 46, 51, 58, 64, 72, 81, 91, 102, 115, 128, 144, 162, 182, 204, 229, 256}, QppOffset may be calculated by the following processing.
if (m p p < m d )
[
sign = -1
M = md × md / mpp
]
else
[
sign = 1
M = mpp
]
Q = 0
while (M >= LUT[Q])
[
Q++
]
QppOffset = sign × Q

同様に、式(17)の処理の代わりに、下記の処理によりQpqOffsetを算出してもよい。
if (mpq<md)
[
sign = -1
M = md × md / mpq
]
else
[
sign = 1
M = mpq
]
Q = 0
while (M >= LUT[Q])
[
Q++
]
QpqOffset = sign × Q
Similarly, instead of the process of equation (17), QpqOffset may be calculated by the following process.
if (m pq < m d )
[
sign = -1
M = md × md / mpq
]
else
[
sign = 1
M = m pq
]
Q = 0
while (M >= LUT[Q])
[
Q++
]
QpqOffset = sign × Q

なお、上記はルックアップテーブルを用いたQppOffset及びQpqOffsetの算出の一例であり、上記の例には限らない。 Note that the above is an example of calculating QppOffset and QpqOffset using a lookup table, and is not limited to the above example.

閾値導出部1161cは、ブロックPに対する量子化処理及び逆量子化処理で用いた量子化パラメータQpPと、ブロックQに対する量子化処理及び逆量子化処理で用いた量子化パラメータQpQと、オフセット導出部1161bが導出したオフセット値QppOffset及びQpqOffsetとに基づいて、デブロッキングフィルタ160のフィルタ強度を制御するための閾値β及びtCを導出し、導出した閾値β及びtCをフィルタ強度制御部1161dに出力する。 The threshold derivation unit 1161c derives thresholds β and tC for controlling the filter strength of the deblocking filter 160 based on the quantization parameter QpP used in the quantization process and inverse quantization process for the block P , the quantization parameter QpQ used in the quantization process and inverse quantization process for the block Q, and the offset values QppOffset and QpqOffset derived by the offset derivation unit 1161b, and outputs the derived thresholds β and tC to the filter strength control unit 1161d.

第1に、閾値導出部1161cは、例えば次の式(18)により変数qPを算出する。First, the threshold derivation unit 1161c calculates the variable qP, for example, using the following equation (18).

qP=((QpQ+QpqOffset+QpP+QppOffset+1)>>1) (18)
ここで、“>>”はシフト演算子(右シフト演算)を示す。式(18)は、基本的には、ブロックPの量子化パラメータQpPと、ブロックQの量子化パラメータQpQとの平均を求める計算式であるが、この計算式において量子化行列に基づくオフセット値QppOffset及びQpqOffsetが導入されている。なお、式(18)の計算式は一例に過ぎないものであって、量子化行列に基づくオフセット値QppOffset及びQpqOffsetが反映されたものであれば他の計算式を用いてもよい。
qP=((Qp Q +QpqOffset+Qp P +QppOffset+1)>>1) (18)
Here, “>>” indicates a shift operator (right shift operation). Equation (18) basically expresses the relationship between the quantization parameter Qp P of block P and the quantization parameter Qp Q of block Q. The formula for calculating the average includes offset values QppOffset and QpqOffset based on the quantization matrix. Note that the formula (18) is merely an example. Other calculation formulas may be used as long as they reflect the offset values QppOffset and QpqOffset based on the matrix.

第2に、閾値導出部1161cは、例えば次の式(19)により、閾値βを導出するためのQを算出する。Secondly, the threshold derivation unit 1161c calculates Q for deriving threshold β, for example, using the following formula (19).

Q=Clip3(0,63,qP+(slice_beta_offset_div2<<1)) (19)
ここで、“<<”はシフト演算子(左シフト演算)を示す。“Clip3(X,Y,Z)”は、ZがXより小さければXを返し、ZがYより大きければYを返し、それ以外の場合はZを返すクリップ演算子である。slice_beta_offset_div2は、復号装置2にシグナリングするパラメータの1つである。
Q=Clip3(0,63,qP+(slice_beta_offset_div2<<1)) (19)
Here, "<<" indicates a shift operator (left shift operation). "Clip3(X,Y,Z)" returns X if Z is less than X, and returns Y if Z is greater than Y. otherwise, it returns Z. slice_beta_offset_div2 is one of the parameters signaled to the decoding device 2.

また、閾値導出部1161cは、例えば次の式(20)により、閾値tCを導出するためのQを算出する。 Furthermore, the threshold derivation unit 1161c calculates Q for deriving the threshold t C , for example, by the following equation (20).

Q=Clip3(0,65,qP+2*(bS-1)+(slice_tc_offset_div2<<1)) (20)
ここで、“bS”は境界強度決定部1161aが出力するBs値である。slice_tc_offset_div2は、復号装置2にシグナリングするパラメータの1つである。
Q=Clip3(0,65,qP+2*(bS-1)+(slice_tc_offset_div2<<1)) (20)
Here, “bS” is the Bs value output by the boundary strength determining unit 1161 a. slice_tc_offset_div2 is one of the parameters signaled to the decoding device 2.

第3に、閾値導出部1161cは、上記の表2により、それぞれ算出したQから閾値β及びtCを導出する。 Thirdly, the threshold derivation unit 1161c derives thresholds β and t C from the calculated Q according to Table 2 above.

フィルタ強度制御部1161dは、境界強度決定部1161aが出力する境界強度Bsの値と、閾値導出部1161cが出力する閾値β及びtCとに基づいて、デブロッキングフィルタ160のフィルタ強度を制御する。 The filter strength control unit 1161d controls the filter strength of the deblocking filter 160 based on the value of the boundary strength Bs output by the boundary strength determination unit 1161a and the thresholds β and t C output by the threshold derivation unit 1161c.

フィルタ強度制御部1161dは、境界強度Bsの値が1又は2の場合には、上記の式(9)を満たす場合にのみ、フィルタ処理を行うようデブロッキングフィルタ160を制御してもよい(図3参照)。When the value of the boundary strength Bs is 1 or 2, the filter strength control unit 1161d may control the deblocking filter 160 to perform filtering only when the above equation (9) is satisfied (see Figure 3).

また、フィルタ強度制御部1161dは、フィルタ処理を行う場合、上記の条件式(10)乃至(15)を全て満たす場合に強いフィルタを適用し、それ以外の場合に弱いフィルタを適用してもよい(図3参照)。In addition, when performing filter processing, the filter strength control unit 1161d may apply a strong filter when all of the above conditional expressions (10) to (15) are satisfied, and apply a weak filter in other cases (see Figure 3).

このように、本変更例に係るフィルタ制御部161は、ブロック単位で設定される一意のパラメータである量子化パラメータだけではなく、量子化行列も考慮してデブロッキングフィルタ160のフィルタ強度を制御する。これにより、量子化行列に起因するブロックノイズの発生に対してデブロッキングフィルタ160のフィルタ強度を制御可能になり、デブロッキングフィルタ160によるブロック歪みの低減効果を向上させることができる。In this way, the filter control unit 161 according to this modified example controls the filter strength of the deblocking filter 160 taking into consideration not only the quantization parameter, which is a unique parameter set for each block, but also the quantization matrix. This makes it possible to control the filter strength of the deblocking filter 160 in response to the occurrence of block noise caused by the quantization matrix, thereby improving the effect of reducing block distortion by the deblocking filter 160.

次に、本変更例に係る復号装置2について説明する。 Next, we will explain the decoding device 2 related to this modified example.

本変更例に係る復号装置2において、エントロピー復号部200は、符号化装置1により生成された符号化ストリームを復号し、各種のシグナリング情報を復号する。具体的には、エントロピー復号部200は、復号対象ブロックに適用された量子化処理に関する情報を取得し、取得した情報を逆量子化部211及びフィルタ制御部231に出力する。また、エントロピー復号部200は、復号対象ブロックに適用された予測に関する情報(例えば、予測種別情報、動きベクトル情報)を取得し、取得した情報を予測部250及びフィルタ制御部231に出力する。さらに、エントロピー復号部200は、オフセット配列を取得し、取得したオフセット配列をフィルタ制御部231に出力する。In the decoding device 2 according to this modified example, the entropy decoding unit 200 decodes the encoded stream generated by the encoding device 1 and decodes various signaling information. Specifically, the entropy decoding unit 200 acquires information related to the quantization process applied to the block to be decoded, and outputs the acquired information to the inverse quantization unit 211 and the filter control unit 231. The entropy decoding unit 200 also acquires information related to the prediction applied to the block to be decoded (e.g., prediction type information, motion vector information), and outputs the acquired information to the prediction unit 250 and the filter control unit 231. Furthermore, the entropy decoding unit 200 acquires an offset array, and outputs the acquired offset array to the filter control unit 231.

このように、本変更例に係る復号装置2は、符号化ストリームを復号することで、複数の量子化行列の候補のそれぞれについて規定されたオフセット値からなる配列と、復号対象ブロックに対応する変換係数とを出力するエントロピー復号部200と、エントロピー復号部200が出力する変換係数に対して逆量子化処理及び逆変換処理を行って予測残差を復元する逆量子化・逆変換部210と、復元した予測残差と復号対象ブロックを予測して得た予測ブロックとを合成して復号対象ブロックを復元する合成部220と、復元した復号対象ブロックと当該復号対象ブロックに隣接する隣接ブロックとの境界に対するフィルタ処理を行うデブロッキングフィルタ230と、逆量子化処理で用いた量子化パラメータ及び量子化行列と、オフセット配列とに基づいて、デブロッキングフィルタ230のフィルタ強度を制御するフィルタ制御部231とを有する。 In this way, the decoding device 2 according to this modified example has an entropy decoding unit 200 that decodes the encoded stream and outputs an array consisting of offset values specified for each of a plurality of quantization matrix candidates and a transform coefficient corresponding to the block to be decoded, an inverse quantization/inverse transform unit 210 that performs inverse quantization processing and inverse transform processing on the transform coefficients output by the entropy decoding unit 200 to restore a prediction residual, a synthesis unit 220 that synthesizes the restored prediction residual and a prediction block obtained by predicting the block to be decoded to restore the block to be decoded, a deblocking filter 230 that performs a filter processing on the boundary between the restored block to be decoded and an adjacent block adjacent to the block to be decoded, and a filter control unit 231 that controls the filter strength of the deblocking filter 230 based on the quantization parameter and quantization matrix used in the inverse quantization processing and the offset array.

次に、本変更例に係るフィルタ制御部231の構成について説明する。図9は、本変更例に係るフィルタ制御部231の構成を示す図である。図9に示すように、本変更例に係るフィルタ制御部231は、境界強度決定部2231aと、オフセット導出部2231bと、閾値導出部2231cと、フィルタ強度制御部2231dとを有する。Next, the configuration of the filter control unit 231 according to this modified example will be described. FIG. 9 is a diagram showing the configuration of the filter control unit 231 according to this modified example. As shown in FIG. 9, the filter control unit 231 according to this modified example has a boundary strength determination unit 2231a, an offset derivation unit 2231b, a threshold derivation unit 2231c, and a filter strength control unit 2231d.

境界強度決定部2231a、オフセット導出部2231b、閾値導出部2231c、及びフィルタ強度制御部2231dは、符号化装置1の境界強度決定部1161a、オフセット導出部1161b、閾値導出部1161c、及びフィルタ強度制御部1161dとそれぞれ同様な動作を行う。The boundary strength determination unit 2231a, the offset derivation unit 2231b, the threshold derivation unit 2231c, and the filter strength control unit 2231d perform operations similar to those of the boundary strength determination unit 1161a, the offset derivation unit 1161b, the threshold derivation unit 1161c, and the filter strength control unit 1161d of the encoding device 1, respectively.

次に、本変更例に係るフィルタ制御部161及びフィルタ制御部231の動作例について説明する。フィルタ制御部161及びフィルタ制御部231は同じ動作を行うため、ここではフィルタ制御部231を例に挙げて説明する。図10は、本変更例に係るフィルタ制御部231の動作フロー例を示す図である。Next, an example of the operation of the filter control unit 161 and the filter control unit 231 according to this modified example will be described. Since the filter control unit 161 and the filter control unit 231 perform the same operation, the filter control unit 231 will be described as an example here. Figure 10 is a diagram showing an example of the operation flow of the filter control unit 231 according to this modified example.

図10に示すように、ステップS11において、境界強度決定部2231aは、表1に示した方法により境界強度Bsを決定し、決定した境界強度Bsの値を閾値導出部2231c及びフィルタ強度制御部2231dに出力する。決定された境界強度Bsの値が0である場合、ステップS12以降の処理を行わずに、ブロックP及びQの境界に対するフィルタ処理を行わない。 As shown in FIG. 10, in step S11, the boundary strength determination unit 2231a determines the boundary strength Bs using the method shown in Table 1, and outputs the determined value of boundary strength Bs to the threshold derivation unit 2231c and the filter strength control unit 2231d. If the determined value of boundary strength Bs is 0, the processing from step S12 onwards is not performed, and filter processing is not performed on the boundaries of blocks P and Q.

ステップS12において、オフセット導出部2231bは、符号化装置1から伝送されたオフセット配列に基づいて、ブロックPに対する逆量子化処理で用いた量子化行列に対応するオフセット値QppOffsetを算出するとともに、ブロックQに対する逆量子化処理で用いた量子化行列に対応するオフセット値QpqOffsetを算出し、オフセット導出部2231b算出したオフセット値QppOffset及びQpqOffsetを閾値導出部2231cに出力する。 In step S12, the offset derivation unit 2231b calculates an offset value QppOffset corresponding to the quantization matrix used in the inverse quantization process for block P based on the offset array transmitted from the encoding device 1, and calculates an offset value QpqOffset corresponding to the quantization matrix used in the inverse quantization process for block Q, and outputs the offset values QppOffset and QpqOffset calculated by the offset derivation unit 2231b to the threshold derivation unit 2231c.

ステップS13において、閾値導出部2231cは、ブロックPに対する逆量子化処理で用いた量子化パラメータQpPと、ブロックQに対する逆量子化処理で用いた量子化パラメータQpQと、オフセット導出部2231bが導出したオフセット値QppOffset及びQpqOffsetとに基づいて、上述した式(18)により変数qPを算出する。 In step S13, the threshold derivation unit 2231c calculates the variable qP using the above-mentioned equation (18) based on the quantization parameter Qp P used in the inverse quantization process for block P, the quantization parameter Qp Q used in the inverse quantization process for block Q, and the offset values QppOffset and QpqOffset derived by the offset derivation unit 2231b.

ステップS14において、閾値導出部2231cは、変数qPに基づいて、上述した式(19)及び式(20)により変数Qを算出し、算出した変数Qから表2により閾値β及びtCを導出する。 In step S14, the threshold derivation unit 2231c calculates the variable Q by the above-mentioned equations (19) and (20) based on the variable qP, and derives the thresholds β and t C from the calculated variable Q according to Table 2.

ステップS15において、フィルタ強度制御部2231dは、境界強度決定部2231aが出力する境界強度Bsの値と、閾値導出部2231cが出力する閾値β及びtCとに基づいて、デブロッキングフィルタ230のフィルタ強度を制御する。 In step S15, the filter strength control unit 2231d controls the filter strength of the deblocking filter 230 based on the value of the boundary strength Bs output by the boundary strength determination unit 2231a and the thresholds β and t C output by the threshold derivation unit 2231c.

このように、本変更例に係るフィルタ制御部231は、ブロック単位で設定される一意のパラメータである量子化パラメータだけではなく、量子化行列も考慮してデブロッキングフィルタ230のフィルタ強度を制御する。これにより、量子化行列に起因するブロックノイズの発生に対してデブロッキングフィルタ230のフィルタ強度を制御可能になり、デブロッキングフィルタ230によるブロック歪みの低減効果を向上させることができる。In this way, the filter control unit 231 according to this modified example controls the filter strength of the deblocking filter 230 taking into consideration not only the quantization parameter, which is a unique parameter set for each block, but also the quantization matrix. This makes it possible to control the filter strength of the deblocking filter 230 in response to the occurrence of block noise caused by the quantization matrix, thereby improving the effect of reducing block distortion by the deblocking filter 230.

<その他の実施形態>
上述の実施形態に係る符号化装置1および復号装置2では、フィルタ制御部161及び231においてブロックPに適用される量子化行列の代表値およびブロックQに適用される量子化行列の代表値を用いて対象ブロック対ごとにオフセット値QppOffset及びQpqOffsetを算出するよう構成されている。
<Other embodiments>
In the encoding device 1 and decoding device 2 according to the above-described embodiment, the filter control units 161 and 231 are configured to calculate offset values QppOffset and QpqOffset for each target block pair using a representative value of the quantization matrix applied to block P and a representative value of the quantization matrix applied to block Q.

しかしながら、処理の簡略化のために、予測モード(イントラ予測、インター予測の別)、ブロックサイズ(例えば、2x2、4x4、8x8、16x16、32x32、64x64)、及び1つの輝度・2つの色差信号(RGB信号の場合は、R信号、B信号、G信号)のそれぞれの組み合わせについて設定された量子化行列について、オフセット値を算出しメモリに保存しておき、対象ブロック対の各ブロックが輝度信号であるか、あるいは2つの色差信号のどちらであるか、予測モード、ブロックサイズに基づいて、オフセット値をメモリから呼び出すよう構成してもよい。However, to simplify processing, offset values may be calculated and stored in memory for the quantization matrix set for each combination of prediction mode (intra prediction or inter prediction), block size (e.g., 2x2, 4x4, 8x8, 16x16, 32x32, 64x64), and one luminance and two chrominance signals (in the case of RGB signals, the R signal, the B signal, and the G signal), and the offset values may be called from memory based on the prediction mode and block size, whether each block of the target block pair is a luminance signal or two chrominance signals.

符号化装置1が行う各処理をコンピュータに実行させるプログラムが提供されてもよい。復号装置2が行う各処理をコンピュータに実行させるプログラムが提供されてもよい。プログラムは、コンピュータ読取り可能媒体に記録されていてもよい。コンピュータ読取り可能媒体を用いれば、コンピュータにプログラムをインストールすることが可能である。ここで、プログラムが記録されたコンピュータ読取り可能媒体は、非一過性の記録媒体であってもよい。非一過性の記録媒体は、特に限定されるものではないが、例えば、CD-ROMやDVD-ROM等の記録媒体であってもよい。 A program may be provided that causes a computer to execute each process performed by the encoding device 1. A program may be provided that causes a computer to execute each process performed by the decoding device 2. The program may be recorded on a computer-readable medium. Using the computer-readable medium, it is possible to install the program on a computer. Here, the computer-readable medium on which the program is recorded may be a non-transient recording medium. The non-transient recording medium is not particularly limited, and may be, for example, a recording medium such as a CD-ROM or a DVD-ROM.

符号化装置1が行う各処理を実行する回路を集積化し、符号化装置1を半導体集積回路(チップセット、SoC)により構成してもよい。復号装置2が行う各処理を実行する回路を集積化し、復号装置2を半導体集積回路(チップセット、SoC)により構成してもよい。The circuits that execute the processes performed by the encoding device 1 may be integrated, and the encoding device 1 may be configured as a semiconductor integrated circuit (chip set, SoC). The circuits that execute the processes performed by the decoding device 2 may be integrated, and the decoding device 2 may be configured as a semiconductor integrated circuit (chip set, SoC).

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

本願は、日本国特許出願第2019-159971号(2019年9月2日出願)及び日本国特許出願第2019-160251号(2019年9月3日出願)の優先権を主張し、それらの内容のすべてが参照により本願明細書に組み込まれている。This application claims priority to Japanese Patent Application No. 2019-159971 (filed September 2, 2019) and Japanese Patent Application No. 2019-160251 (filed September 3, 2019), the entire contents of which are incorporated herein by reference.

Claims (15)

画像をブロック単位に分割し、ブロック単位で前記画像を符号化する符号化装置であって、
前記画像をブロック単位に分割した符号化対象ブロックと前記符号化対象ブロックを予測することにより生成した予測ブロックとの差である予測残差に変換処理及び量子化処理を行う変換・量子化部と、
前記変換・量子化部により生成された変換係数に逆量子化処理及び逆変換処理することで前記予測残差を復元する逆量子化・逆変換部と、
前記復元した予測残差と前記予測ブロックとを合成することにより前記符号化対象ブロックを復元する合成部と、
前記復元した符号化対象ブロックと当該符号化対象ブロックに隣接する隣接ブロックとの境界にフィルタ処理するデブロッキングフィルタと、
前記量子化処理及び前記逆量子化処理で用いた量子化パラメータ及び量子化行列に基づいて、前記デブロッキングフィルタのフィルタ強度を制御するフィルタ制御部と、を備え、
前記量子化パラメータは、1つのブロックに対して1つの値が設定されるパラメータであって、前記量子化行列は、前記1つのブロック内の成分ごとに設定される値からなる行列であり、
前記フィルタ制御部は、前記量子化行列の代表値を導出する代表値導出部を有し、
前記代表値は、前記量子化行列の低域成分のみを構成する複数の値の重み付き平均値であり、前記重み付きにおいて、前記複数の値のうち、前記量子化行列の最低域に相当する1つの値の重みが他の値の重みよりも大きく、
前記フィルタ制御部は、前記代表値に基づいて前記フィルタ強度を制御することを特徴とする符号化装置。
An encoding device that divides an image into blocks and encodes the image in blocks, comprising:
a transform/quantization unit that performs a transform process and a quantization process on a prediction residual that is a difference between a current block to be coded, which is obtained by dividing the image into blocks, and a predicted block generated by predicting the current block to be coded;
an inverse quantization and inverse transform unit that performs inverse quantization and inverse transform processing on the transform coefficients generated by the transform and quantization unit to restore the prediction residual;
a synthesis unit that synthesizes the reconstructed prediction residual and the prediction block to reconstruct the encoding target block;
a deblocking filter that performs filtering on a boundary between the restored encoding target block and an adjacent block adjacent to the encoding target block;
A filter control unit that controls a filter strength of the deblocking filter based on a quantization parameter and a quantization matrix used in the quantization process and the inverse quantization process,
the quantization parameter is a parameter in which one value is set for one block, and the quantization matrix is a matrix of values set for each component in the one block;
the filter control unit has a representative value derivation unit that derives a representative value of the quantization matrix,
the representative value is a weighted average of a plurality of values constituting only low-frequency components of the quantization matrix, and in the weighting, a weight of one value corresponding to a lowest frequency component of the quantization matrix among the plurality of values is greater than weights of other values;
The encoding device , wherein the filter control unit controls the filter strength based on the representative value .
前記フィルタ制御部は、前記符号化対象ブロックに対する前記量子化処理及び前記逆量子化処理で用いた前記量子化パラメータ及び前記量子化行列と、前記隣接ブロックに対する前記量子化処理及び前記逆量子化処理で用いた前記量子化パラメータ及び前記量子化行列とに基づいて、前記フィルタ強度を制御することを特徴とする請求項1に記載の符号化装置。 The encoding device according to claim 1, characterized in that the filter control unit controls the filter strength based on the quantization parameter and the quantization matrix used in the quantization process and the inverse quantization process for the encoding target block, and the quantization parameter and the quantization matrix used in the quantization process and the inverse quantization process for the adjacent block. 前記代表値導出部は、
前記符号化対象ブロックに対する前記量子化処理及び前記逆量子化処理で用いた前記量子化行列の前記代表値と、前記隣接ブロックに対する前記量子化処理及び前記逆量子化処理で用いた前記量子化行列の前記代表値とを導出することを特徴とする請求項2に記載の符号化装置。
The representative value derivation unit
The encoding device according to claim 2, characterized in that the representative value of the quantization matrix used in the quantization process and the inverse quantization process for the block to be encoded and the representative value of the quantization matrix used in the quantization process and the inverse quantization process for the adjacent block are derived.
前記フィルタ制御部は、
前記代表値導出部が導出した前記代表値に基づいて、前記符号化対象ブロック及び前記隣接ブロックのそれぞれについてオフセット値を算出するオフセット算出部と、
前記符号化対象ブロックに対する前記量子化処理及び前記逆量子化処理で用いた前記量子化パラメータと、前記隣接ブロックに対する前記量子化処理及び前記逆量子化処理で用いた前記量子化パラメータと、前記オフセット算出部が算出した前記オフセット値とに基づいて、前記フィルタ強度を制御するための閾値を導出する閾値導出部と、をさらに有することを特徴とする請求項3に記載の符号化装置。
The filter control unit includes:
an offset calculation unit that calculates an offset value for each of the encoding target block and the neighboring blocks based on the representative value derived by the representative value derivation unit;
the encoding device according to claim 3, further comprising a threshold derivation unit that derives a threshold for controlling the filter strength based on the quantization parameter used in the quantization process and the inverse quantization process for the block to be encoded, the quantization parameter used in the quantization process and the inverse quantization process for the adjacent block, and the offset value calculated by the offset calculation unit.
前記変換・量子化部により生成された前記変換係数を符号化して符号化ストリームを出力するエントロピー符号化部をさらに備え、
前記フィルタ制御部は、前記量子化処理及び前記逆量子化処理で用いた前記量子化パラメータ及び前記量子化行列と、複数の量子化行列の候補のそれぞれについて規定されたオフセット値からなる配列とに基づいて、前記デブロッキングフィルタのフィルタ強度を制御し、
前記エントロピー符号化部は、前記配列を前記符号化ストリームに含めて伝送することを特徴とする請求項1に記載の符号化装置。
an entropy coding unit that codes the transform coefficients generated by the transform/quantization unit and outputs a coded stream;
the filter control unit controls a filter strength of the deblocking filter based on the quantization parameter and the quantization matrix used in the quantization process and the inverse quantization process, and an array of offset values defined for each of a plurality of quantization matrix candidates;
The encoding device according to claim 1 , wherein the entropy encoding unit transmits the sequence by including it in the encoded stream.
前記フィルタ制御部は、前記符号化対象ブロックに対する前記量子化処理及び前記逆量子化処理で用いた前記量子化パラメータ及び前記量子化行列と、前記隣接ブロックに対する前記量子化処理及び前記逆量子化処理で用いた前記量子化パラメータ及び前記量子化行列とに基づいて、前記フィルタ強度を制御することを特徴とする請求項に記載の符号化装置。 The encoding device according to claim 5, characterized in that the filter control unit controls the filter strength based on the quantization parameter and the quantization matrix used in the quantization process and the inverse quantization process for the block to be encoded, and the quantization parameter and the quantization matrix used in the quantization process and the inverse quantization process for the adjacent block. 前記フィルタ制御部は、
前記配列に基づいて、前記符号化対象ブロックに対する前記量子化処理及び前記逆量子化処理で用いた前記量子化行列に対応するオフセット値と、前記隣接ブロックに対する前記量子化処理及び前記逆量子化処理で用いた前記量子化行列に対応するオフセット値とを導出するオフセット導出部を有することを特徴とする請求項に記載の符号化装置。
The filter control unit includes:
The encoding device according to claim 6, further comprising an offset derivation unit that derives, based on the array, an offset value corresponding to the quantization matrix used in the quantization process and the inverse quantization process for the block to be encoded, and an offset value corresponding to the quantization matrix used in the quantization process and the inverse quantization process for the adjacent block.
前記フィルタ制御部は、
前記符号化対象ブロックに対する前記量子化処理及び前記逆量子化処理で用いた前記量子化パラメータと、前記隣接ブロックに対する前記量子化処理及び前記逆量子化処理で用いた前記量子化パラメータと、前記オフセット導出部が導出した前記オフセット値とに基づいて、前記フィルタ強度を制御するための閾値を導出する閾値導出部をさらに有することを特徴とする請求項に記載の符号化装置。
The filter control unit includes:
The encoding device according to claim 7, further comprising a threshold derivation unit that derives a threshold for controlling the filter strength based on the quantization parameter used in the quantization process and the inverse quantization process for the block to be encoded, the quantization parameter used in the quantization process and the inverse quantization process for the adjacent block, and the offset value derived by the offset derivation unit.
画像を分割して生成したブロック単位で復号を行う復号装置であって、
符号化ストリームを復号することで、復号対象ブロックに対応する変換係数を出力するエントロピー復号部と、
前記エントロピー復号部が出力する変換係数に対して逆量子化処理及び逆変換処理を行って予測残差を復元する逆量子化・逆変換部と、
前記復元した予測残差と前記復号対象ブロックを予測して生成した予測ブロックとを合成して前記復号対象ブロックを復元する合成部と、
前記復元した復号対象ブロックと当該復号対象ブロックに隣接する隣接ブロックとの境界に対するフィルタ処理を行うデブロッキングフィルタと、
前記逆量子化処理で用いた量子化パラメータ及び量子化行列に基づいて、前記デブロッキングフィルタのフィルタ強度を制御するフィルタ制御部と、を備え、
前記量子化パラメータは、1つのブロックに対して1つの値が設定されるパラメータであって、前記量子化行列は、前記1つのブロック内の成分ごとに設定される値からなる行列であり、
前記フィルタ制御部は、前記量子化行列の代表値に基づいて前記フィルタ強度を制御し、
前記代表値は、前記量子化行列の低域成分のみを構成する複数の値の重み付き平均値であり、前記重み付きにおいて、前記複数の値のうち、前記量子化行列の最低域に相当する1つの値の重みが他の値の重みよりも大きいことを特徴とする復号装置。
A decoding device that performs decoding on a block-by-block basis by dividing an image,
an entropy decoding unit that decodes the encoded stream to output a transform coefficient corresponding to a block to be decoded;
an inverse quantization and inverse transform unit that performs inverse quantization processing and inverse transform processing on the transform coefficients output by the entropy decoding unit to restore a prediction residual;
a synthesis unit that synthesizes the reconstructed prediction residual and a prediction block generated by predicting the block to be decoded to reconstruct the block to be decoded;
a deblocking filter that performs a filtering process on a boundary between the restored decoding target block and an adjacent block adjacent to the decoding target block;
A filter control unit that controls a filter strength of the deblocking filter based on a quantization parameter and a quantization matrix used in the inverse quantization process,
the quantization parameter is a parameter in which one value is set for one block, and the quantization matrix is a matrix of values set for each component in the one block;
the filter control unit controls the filter strength based on a representative value of the quantization matrix;
A decoding device characterized in that the representative value is a weighted average of multiple values that constitute only the low-frequency components of the quantization matrix, and in the weighting, the weight of one value among the multiple values that corresponds to the lowest frequency component of the quantization matrix is greater than the weight of the other values .
前記エントロピー復号部は、前記符号化ストリームを復号することで、複数の量子化行列の候補のそれぞれについて規定されたオフセット値からなる配列をさらに出力し、
前記フィルタ制御部は、前記逆量子化処理で用いた前記量子化パラメータ及び前記量子化行列と、前記配列とに基づいて、前記デブロッキングフィルタのフィルタ強度を制御することを特徴とする請求項に記載の復号装置。
the entropy decoding unit further outputs an array including offset values defined for each of a plurality of quantization matrix candidates by decoding the encoded stream;
10. The decoding device according to claim 9, wherein the filter control unit controls a filter strength of the deblocking filter based on the quantization parameter and the quantization matrix used in the inverse quantization process, and the array.
前記フィルタ制御部は、前記復号対象ブロックに対する前記逆量子化処理で用いた前記量子化パラメータ及び前記量子化行列と、前記隣接ブロックに対する前記逆量子化処理で用いた前記量子化パラメータ及び前記量子化行列とに基づいて、前記フィルタ強度を制御することを特徴とする請求項10に記載の復号装置。 The decoding device according to claim 10, characterized in that the filter control unit controls the filter strength based on the quantization parameter and the quantization matrix used in the inverse quantization process for the block to be decoded and the quantization parameter and the quantization matrix used in the inverse quantization process for the adjacent block. 前記フィルタ制御部は、
前記配列に基づいて、前記復号対象ブロックに対する前記逆量子化処理で用いた前記量子化行列に対応するオフセット値と、前記隣接ブロックに対する前記逆量子化処理で用いた前記量子化行列に対応するオフセット値とを導出するオフセット導出部を有することを特徴とする請求項11に記載の復号装置。
The filter control unit includes:
The decoding device according to claim 11, further comprising an offset derivation unit that derives, based on the array, an offset value corresponding to the quantization matrix used in the inverse quantization process for the block to be decoded and an offset value corresponding to the quantization matrix used in the inverse quantization process for the adjacent block.
前記フィルタ制御部は、
前記復号対象ブロックに対する前記逆量子化処理で用いた前記量子化パラメータと、前記隣接ブロックに対する前記逆量子化処理で用いた前記量子化パラメータと、前記オフセット導出部が導出した前記オフセット値とに基づいて、前記フィルタ強度を制御するための閾値を導出する閾値導出部をさらに有することを特徴とする請求項12に記載の復号装置。
The filter control unit includes:
The decoding device according to claim 12, further comprising a threshold derivation unit that derives a threshold for controlling the filter strength based on the quantization parameter used in the inverse quantization process for the block to be decoded, the quantization parameter used in the inverse quantization process for the adjacent block, and the offset value derived by the offset derivation unit.
コンピュータを請求項1に記載の符号化装置として機能させることを特徴とするプログラム。 A program that causes a computer to function as the encoding device described in claim 1. コンピュータを請求項に記載の復号装置として機能させることを特徴とするプログラム。 A program for causing a computer to function as the decoding device according to claim 9 .
JP2021543783A 2019-09-02 2020-09-01 Encoding device, decoding device, and program Active JP7544722B2 (en)

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP2019159971 2019-09-02
JP2019159971 2019-09-02
JP2019160251 2019-09-03
JP2019160251 2019-09-03
PCT/JP2020/033129 WO2021045059A1 (en) 2019-09-02 2020-09-01 Encoding device, decoding device, and program

Publications (2)

Publication Number Publication Date
JPWO2021045059A1 JPWO2021045059A1 (en) 2021-03-11
JP7544722B2 true JP7544722B2 (en) 2024-09-03

Family

ID=74852210

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021543783A Active JP7544722B2 (en) 2019-09-02 2020-09-01 Encoding device, decoding device, and program

Country Status (2)

Country Link
JP (1) JP7544722B2 (en)
WO (1) WO2021045059A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008182562A (en) 2007-01-25 2008-08-07 Matsushita Electric Ind Co Ltd Method and device of adaptive deblocking filtering using quantization matrix
WO2012165095A1 (en) 2011-05-27 2012-12-06 ソニー株式会社 Image-processing device and method
US20130259120A1 (en) 2012-04-03 2013-10-03 Qualcomm Incorporated Quantization matrix and deblocking filter adjustments for video coding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008182562A (en) 2007-01-25 2008-08-07 Matsushita Electric Ind Co Ltd Method and device of adaptive deblocking filtering using quantization matrix
WO2012165095A1 (en) 2011-05-27 2012-12-06 ソニー株式会社 Image-processing device and method
US20130259120A1 (en) 2012-04-03 2013-10-03 Qualcomm Incorporated Quantization matrix and deblocking filter adjustments for video coding

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SATO, Kazushi,On Deblocking Filter and DC Component of Quantization Matrices,Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11,JCTVC-J0186 (version 2),2012年07月11日,pp. 1-6
VAN DER AUWERA, Geert et al.,AHG6: Quantization Matrices and Deblocking Filtering,Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11,JCTVC-I0280 (version 2),2012年04月25日,pp. 1-10

Also Published As

Publication number Publication date
WO2021045059A1 (en) 2021-03-11
JPWO2021045059A1 (en) 2021-03-11

Similar Documents

Publication Publication Date Title
KR101962284B1 (en) Enhanced intra-prediction coding using planar representations
JP7130890B2 (en) Encoding device, decoding device, and program
JP2024087085A (en) Encoding device, decoding device, and program
JP7357721B2 (en) Deblocking filter control device and program
JP7544722B2 (en) Encoding device, decoding device, and program
JP7474772B2 (en) Encoding device, decoding device, and program
JP7505869B2 (en) Encoding device, decoding device, and program
WO2021251400A1 (en) Decoding device and program
JP7357481B2 (en) Deblocking filter control device and program
WO2021251398A1 (en) Deblocking filter device, decoding device, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230801

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240521

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240722

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240822

R150 Certificate of patent or registration of utility model

Ref document number: 7544722

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150