JP7796810B2 - Decoding device and decoding method - Google Patents
Decoding device and decoding methodInfo
- Publication number
- JP7796810B2 JP7796810B2 JP2024096244A JP2024096244A JP7796810B2 JP 7796810 B2 JP7796810 B2 JP 7796810B2 JP 2024096244 A JP2024096244 A JP 2024096244A JP 2024096244 A JP2024096244 A JP 2024096244A JP 7796810 B2 JP7796810 B2 JP 7796810B2
- Authority
- JP
- Japan
- Prior art keywords
- block
- unit
- inverse
- quantization
- prediction
- 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
Links
Landscapes
- 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 MPEG (Moving Picture Experts Group) committee, are characterized by uneven quality between blocks because each block is coded under different conditions.
この特徴は、映像の部分領域の信号特性に応じて、例えば、人間の検知しやすい信号特性の領域であれば高品質の信号に符号化し、検知しにくい領域であれば低品質の信号に符号化するように制御することにより視覚的に画質の劣化を感じさせない符号化制御が行えるというメリットがある。デメリットとしては、ブロック単位で符号化を制御するため、ブロック境界に画質の品質差が顕在化し、ブロック状の歪みが検知される場合がある。 The advantage of this feature is that it allows for coding control that does not result in visual degradation of image quality, by controlling the coding to occur according to the signal characteristics of a partial region of the image, for example, by encoding regions with signal characteristics that are easily detected by humans into a high-quality signal, and regions that are difficult to detect into a low-quality signal. The disadvantage is that because coding is controlled on a block-by-block basis, differences in image quality become apparent at block boundaries, and block-like distortion may be detected.
このような信号の劣化を低減するため、近年の符号化方式ではデブロッキングフィルタ処理が一般的に用いられる。デブロッキングフィルタは、信号のギャップを低減するためのフィルタであるため、一般的には低域通過フィルタの特性を持つ。 To reduce this type of signal degradation, deblocking filtering is commonly used in recent encoding methods. Deblocking filters are filters designed to reduce signal gaps, and generally have the characteristics of a low-pass filter.
デブロッキングフィルタを固定的に適用すると、高品質領域同士の境界部においては、フィルタ処理による信号劣化が品質改善よりも大きく作用することがあり、逆に過度に低品質に符号化処理された領域同士の境界部においては、フィルタが十分に効果を発揮できない。 If a deblocking filter is applied in a fixed manner, the signal degradation caused by the filter processing 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.
このような状況に鑑みて、従来の映像符号化方式であるHEVCでは、量子化パラメータ(具体的には、境界を挟むブロックの量子化パラメータの平均値)に基づいてデブロッキングフィルタのフィルタ強度を制御している(例えば、非特許文献1参照)。ここで、量子化パラメータとは、1つのブロックに対して1つの値が設定され、このブロックの量子化の粗さ(ステップサイズ)を規定するパラメータをいう。 In light of this situation, HEVC, a conventional video coding method, controls the filter strength of a deblocking filter 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, a quantization parameter is a parameter for which one value is set for one block, and which specifies the coarseness (step size) of quantization for that block.
ところで、新たな映像符号化方式であるVVCの委員会原案では、Luma mapping and chroma scaling(LMCS)が採用されている(例えば、非特許文献2参照)。 By the way, the committee's draft for VVC, a new video coding method, uses Luma Mapping and Chroma Scaling (LMCS) (see, for example, Non-Patent Document 2).
LMCSでは、入力画像の信号特性に応じて、予測処理や変換処理などの処理を行う前に原画像の輝度信号の値を、ルックアップテーブル(転換テーブル)を用いたマッピング処理により変更し、マッピング後の輝度信号に対して予測処理及び変換処理、量子化処理を適用する。また、原画像の色差信号の値を原画像の輝度信号の値に応じてスケーリング処理により変更し、スケーリング後の色差信号に対して予測処理及び変換処理、量子化処理を適用する。 In LMCS, the value of the luminance signal of the original image is changed by a mapping process using a lookup table (conversion table) before performing processes such as prediction and conversion, depending on the signal characteristics of the input image, and prediction, conversion, and quantization processes are then applied to the mapped luminance signal. Furthermore, the value of the chrominance signal of the original image is changed by a scaling process depending on the value of the luminance signal of the original image, and prediction, conversion, and quantization processes are then applied to the scaled chrominance signal.
LMCSによれば、原画像の画素値の偏りを利用した輝度信号へのマッピング処理及び色差信号へのスケーリング処理により、符号化効率を向上させることができる。 LMCS can improve coding efficiency by mapping to the luminance signal and scaling to the color difference signal, taking advantage of the bias in pixel values in the original image.
上述したLMCSのマッピング処理及びスケーリング処理は、符号化装置側では、原画像に対する予測処理や変換処理、量子化処理の前に行われる。復号装置側では、逆量子化処理、逆変換処理及び予測処理の後にマッピング処理に対応する逆マッピング処理及びスケーリング処理に対応する逆スケーリング処理が行われる。即ち、量子化処理及び逆量子化処理により生じる量子化誤差は、逆マッピング処理及び逆スケーリング処理により増減する可能性がある。 The above-mentioned LMCS mapping and scaling processes are performed on the encoding device before the prediction, transformation, and quantization processes are performed on the original image. On the decoding device, the inverse mapping process corresponding to the mapping process and the inverse scaling process corresponding to the scaling process are performed after the inverse quantization process, inverse transformation process, and prediction process. In other words, the quantization error generated by the quantization process and inverse quantization process may increase or decrease due to the inverse mapping and inverse scaling processes.
しかしながら、従来の映像符号化方式は、ブロック単位で設定される一意のパラメータである量子化パラメータを考慮してデブロッキングフィルタのフィルタ強度を制御しているものの、フィルタ強度の制御において上述の逆マッピング処理及び逆スケーリング処理を考慮していない。 However, while conventional video coding methods control the filter strength of a deblocking filter by taking into account the quantization parameter, which is a unique parameter set on a block-by-block basis, they do not take into account the inverse mapping and inverse scaling processes described above when controlling the filter strength.
このため、逆マッピング処理及び逆スケーリング処理に起因するブロックノイズの発生に対してはデブロッキングフィルタのフィルタ強度を制御する方法がなく、デブロッキングフィルタによるブロック歪みの低減効果が不十分であるという問題がある。 As a result, there is no way to control the filter strength of the deblocking filter to address the block noise caused by the inverse mapping and inverse scaling processes, and the deblocking filter is not effective in reducing block noise.
そこで、本発明は、デブロッキングフィルタを適切に制御することで画質や符号化効率を向上させる符号化装置、復号装置、及びプログラムを提供することを目的とする。 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つ又は複数のスライスに対して設定されるテーブルであって、転換対象の画素値が取りうる最小値から最大値までの範囲を規定の数に分割した各バンドに対して割り当てる転換後の画素値の数を示す値からなるテーブルであることを要旨とする。 The encoding device according to the first aspect is an encoding device that encodes encoding target blocks obtained by dividing an image into block units, and includes: a conversion unit that generates a new encoding target block by performing a conversion process consisting of a mapping process for each pixel value of a luminance signal and a scaling process for each pixel value of a color difference signal based on a conversion table within the encoding target block; a transform/quantization unit that performs a conversion process and a quantization process on a prediction residual, which is the difference between the encoding target block newly generated by the conversion unit and a prediction block generated by predicting the encoding target block; 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 coefficients generated by the transform/quantization unit; and a composite block that generates a composite block by combining the restored prediction residual with the prediction block. the deblocking filter that performs filtering on the boundary between the restored target block and an adjacent block adjacent to the target block; and a filter control unit that controls the filter strength of the deblocking filter based on the quantization parameters used in the quantization and inverse quantization processes and the conversion table used in the conversion and inverse conversion processes, wherein the conversion table is a table set for one or more slices and is a table consisting of values indicating the number of pixel values after conversion to be assigned to each band obtained by dividing the range from the minimum to maximum possible values of the target pixel values into a specified number of bands.
ここで、「スライス」は、「ピクチャ」、「タイル」、「タイルグループ」、「ブリック」のいずれかに読み替えてもよい。 Here, "slice" may be interpreted as "picture," "tile," "tile group," or "brick."
第2の態様に係る復号装置は、画像を分割して生成したブロック単位で符号化ストリームを復号する復号装置であって、前記符号化ストリームを復号することで、復号対象ブロックに対応する変換係数を出力するエントロピー復号部と、前記エントロピー復号部が出力する変換係数に対して逆量子化処理及び逆変換処理を行って予測残差を復元する逆量子化・逆変換部と、前記復元した予測残差と前記復号対象ブロックを予測して生成した予測ブロックとを合成して合成ブロックを生成する合成部と、前記生成した合成ブロック内の各画素値に対して転換テーブルに基づいて符号化側で行った輝度信号の各画素値に対するマッピング処理及び色差信号の各画素値に対するスケーリング処理により構成される転換処理に対応する逆転換処理を行うことにより前記符号化対象ブロックを復元する逆転換部と、前記復元した復号対象ブロックと当該復号対象ブロックに隣接する隣接ブロックとの境界に対するフィルタ処理を行うデブロッキングフィルタと、前記逆量子化処理で用いた量子化パラメータと前記逆転換処理で用いた転換テーブルとに基づいて、前記デブロッキングフィルタのフィルタ強度を制御するフィルタ制御部と、を備え、前記転換テーブルは、1つ又は複数のスライスに対して設定されるテーブルであって、転換対象の画素値が取りうる最小値から最大値までの範囲を規定の数に分割した各バンドに対して割り当てる転換後の画素値の数を示す値からなるテーブルであることを要旨とする。 A decoding device according to a second aspect is a decoding device that decodes an encoded stream in units of blocks generated by dividing an image, and is configured to include an entropy decoding unit that decodes the encoded stream and outputs transform coefficients corresponding to a block to be decoded; an inverse quantization and 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 generates a composite block by synthesizing the restored prediction residual with a prediction block generated by predicting the block to be decoded; and a mapping process for each pixel value of a luminance signal and a scaling process for each pixel value of a color difference signal that are performed on the encoding side based on a conversion table for each pixel value in the generated composite block. The coding system comprises an inverse transformation unit that restores the block to be coded by performing an inverse transformation corresponding to the transformation performed in the dequantization process; a deblocking filter that performs a filtering 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 the quantization parameter used in the inverse quantization process and the transformation table used in the inverse transformation process, wherein the transformation table is a table set for one or more slices and is a table consisting of values indicating the number of pixel values after transformation to be assigned to each band obtained by dividing the range from the minimum to maximum possible values of pixel values to be transformed into a specified number of bands.
第3の態様に係るプログラムは、コンピュータを第1の態様に係る符号化装置として機能させることを要旨とする。 The program according to the third aspect causes a computer to function as the encoding device according to the first aspect.
第4の態様に係るプログラムは、コンピュータを第2の態様に係る復号装置として機能させることを要旨とする。 The program according to the fourth aspect is intended to cause a computer to function as the decryption device according 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.
図面を参照して、実施形態に係る符号化装置及び復号装置について説明する。実施形態に係る符号化装置及び復号装置は、MPEGに代表される動画像の符号化及び復号をそれぞれ行う。以下の図面の記載において、同一又は類似の部分には同一又は類似の符号を付している。 An encoding device and a decoding device according to an embodiment will be described with reference to the drawings. The encoding device and the decoding device according to an embodiment encode and decode moving images, respectively, as typified by MPEG. In the following description of the drawings, the same or similar parts are designated by the same or similar reference numerals.
<符号化装置の構成>
まず、本実施形態に係る符号化装置の構成について説明する。図1は、本実施形態に係る符号化装置1の構成を示す図である。符号化装置1は、スライス単位の画像を分割したブロック単位で符号化を行う装置である。
<Configuration of the encoding device>
First, the configuration of an encoding device according to this embodiment will be described. Fig. 1 shows 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 in units of slices.
図1に示すように、符号化装置1は、ブロック分割部100と、転換部110と、減算部120と、変換・量子化部130と、エントロピー符号化部140と、逆量子化・逆変換部150と、合成部160と、逆転換部170と、デブロッキングフィルタ180と、フィルタ制御部181と、メモリ185と、予測部190とを有する。 As shown in FIG. 1, the encoding device 1 includes a block division unit 100, a transformation unit 110, a subtraction unit 120, a transformation/quantization unit 130, an entropy encoding unit 140, an inverse quantization/inverse transformation unit 150, a synthesis unit 160, an inverse transformation unit 170, a deblocking filter 180, a filter control unit 181, a memory 185, and a prediction unit 190.
ブロック分割部100は、動画像を構成するフレーム(或いはピクチャ)単位の入力画像を複数の画像ブロックに分割し、分割された画像ブロックを転換部110に出力する。画像ブロックのサイズは、例えば32×32画素、16×16画素、8×8画素、又は4×4画素等である。画像ブロックの形状は正方形に限らず矩形(非正方形)であってもよい。画像ブロックは、符号化装置1が符号化を行う単位(符号化対象ブロック)であり、且つ復号装置が復号を行う単位(復号対象ブロック)である。このような画像ブロックはCU(Coding Unit)と呼ばれることがある。 The block division unit 100 divides an input image, which is made up of frames (or pictures) that make up a moving image, into multiple image blocks and outputs the divided image blocks to the conversion unit 110. The size of the image blocks is, for example, 32x32 pixels, 16x16 pixels, 8x8 pixels, or 4x4 pixels. The shape of the image blocks is not limited to squares and may be rectangular (non-square). An image block is the unit used for coding by the encoding device 1 (block to be encoded) and the unit used for decoding by the decoding device (block to be decoded). Such an image block is sometimes called a CU (Coding Unit).
ブロック分割部100は、輝度信号と色差信号とに対してブロック分割を行う。以下において、ブロック分割の形状が輝度信号と色差信号とで同じである場合について主として説明するが、輝度信号と色差信号とで分割を独立に制御可能であってもよい。輝度ブロック及び色差ブロックを特に区別しないときは単に符号化対象ブロックと呼ぶ。 The block division unit 100 divides the luminance signal and the color difference signal into blocks. The following mainly describes the case where the shape of the block division is the same for the luminance signal and the color difference signal, but it is also possible to control the division independently for the luminance signal and the color difference signal. When no particular distinction is made between luminance blocks and color difference blocks, they are simply referred to as the blocks to be coded.
転換部110は、ブロック分割部100から出力される符号化対象ブロック内の各画素値を転換テーブルに基づいて転換処理をすることで転換された新たな符号化対象ブロックを生成し、転換後の新たな符号化対象ブロックを減算部120に出力する。 The conversion unit 110 generates a new converted block to be coded by converting each pixel value in the block to be coded output from the block division unit 100 based on a conversion table, and outputs the new converted block to be coded to the subtraction unit 120.
図2は、本実施形態に係る転換処理における入力画素値と出力画素値との関係を表すグラフである。図2において、横軸は入力信号の値であり、縦軸は出力信号の値である。 Figure 2 is a graph showing the relationship between input pixel values and output pixel values in the conversion process according to this embodiment. In Figure 2, the horizontal axis represents the input signal value, and the vertical axis represents the output signal value.
図2に示すように、転換テーブルは、1つ又は複数のスライスに対して設定されるテーブルであって、転換処理前の入力信号と転換処理後の出力信号との関係を表すための係数テーブルである。具体的には、転換テーブルには、転換前の入力信号(転換対象の画素値)が取りうる最小値から最大値までを予め規定する数(N)に分割した各バンドに対して、割り当てる変換後の出力信号の画素値の数を示す値が格納されている。 As shown in Figure 2, the conversion table is a table set for one or more slices, and is a coefficient table that represents the relationship between the input signal before conversion processing and the output signal after conversion processing. Specifically, the conversion table stores values that indicate the number of pixel values of the converted output signal to be assigned to each band obtained by dividing the input signal before conversion (pixel values to be converted) from its minimum to maximum possible values into a predefined number (N).
例えば、10bitの画像信号の転換処理においてバンドの数Nを16とした場合を例に転換テーブルについて説明する。転換前の入力信号が取りうる最小値0から最大値1023までを、等分割した各バンドに対応する入力信号として割り当てる。例えば1番目のバンドは入力画素値0乃至63に対応する。また、2番目のバンドは入力画素値の64乃至127に対応する。同様にして16番目のバンドまで入力信号が割り当たてられている。 For example, the conversion table will be explained using an example where the number of bands N is 16 in the conversion process for a 10-bit image signal. The minimum possible value of the input signal before conversion, 0, to the maximum possible value, 1023, is assigned as the input signal corresponding to each equally divided band. For example, the first band corresponds to input pixel values 0 to 63. The second band corresponds to input pixel values 64 to 127. Input signals are assigned in a similar manner up to the 16th band.
なお、各バンドは転換テーブルの各係数の位置に対応する。転換テーブルに格納される係数は各バンドに割り当てられている出力画素値の数を意味する。例えば転換テーブルlmcsCWがlmcsCW={39,40,55,70,80,90,97,97,104,83,57,55,49,44,34,30}である場合、1番目のバンドに対応する出力画素値は0乃至38であり、2番目のバンドに対応する出力画素値は39乃至78である。3番目から16番目のバンドについても同様に割り当てられる。 Each band corresponds to the position of each coefficient in the conversion table. The coefficients stored in the conversion table represent the number of output pixel values assigned to each band. For example, if the conversion table lmcs CW is lmcs CW = {39, 40, 55, 70, 80, 90, 97, 97, 104, 83, 57, 55, 49, 44, 34, 30}, the output pixel values corresponding to the first band are 0 to 38, and the output pixel values corresponding to the second band are 39 to 78. The same allocation is performed for the third to sixteenth bands.
転換テーブル内のあるバンドに対応する値が大きい場合、当該バンドに割り当てられる出力画素値の数が多くなり、逆に小さい場合には、当該バンドに割り当てられる出力画素値の数が少なくなる。このため、転換テーブルによる転換処理が行われた転換後の信号領域に対して量子化処理を行い、再び逆転換により元の信号領域に戻す場合には、転換処理に用いる転換テーブルの値が異なると、同一の量子化処理を行ったとしても量子化誤差の量が異なる。 If the value corresponding to a certain band in the conversion table is large, the number of output pixel values assigned to that band will be large; conversely, if the value is small, the number of output pixel values assigned to that band will be small. For this reason, when quantization processing is performed on a signal region converted using a conversion table, and then the original signal region is restored by inverse conversion, the amount of quantization error will be different if the conversion table values used in the conversion processing are different, even if the same quantization processing is performed.
具体的には、転換テーブルの値が32である場合には、あるバンドの入力画素値64個分の画素値が出力画素値32個分の画素値で表現されるよう転換されることを意味する。符号化装置1で当該出力信号に対する量子化処理が適用され、量子化誤差が生じる場合、復号装置2(図8参照)では、生じた量子化誤差を含めて前記転換処理に対応する逆転換処理が適用される。この際、当該バンドにおける転換テーブルの値が32であり、逆転換処理では、逆転換処理に対する入力画素値32個分が出力画素値64個分の画素値で表現されるよう逆転換される。即ち、復号装置2では、当該バンドに該当する信号に生じた量子化誤差が2倍になって出力されることを意味する。 Specifically, when the value in the conversion table is 32, this means that 64 input pixel values of a certain band are converted to be represented by 32 output pixel values. When the encoding device 1 applies quantization processing to the output signal, resulting in quantization error, the decoding device 2 (see Figure 8) applies an inverse conversion process corresponding to the conversion processing, including the resulting quantization error. In this case, the conversion table value for the band is 32, and the inverse conversion process inversely converts 32 input pixel values for the inverse conversion process so that they are represented by 64 output pixel values. This means that the decoding device 2 doubles the quantization error that occurred in the signal corresponding to that band before outputting it.
即ち、画像に対して同一の量子化パラメータを適用する場合にも、転換テーブルの値が小さい領域については量子化誤差が大きくなり、逆に転換テーブルの値が大きい領域については量子化誤差が小さくなる。 In other words, even when the same quantization parameter is applied to an image, the quantization error will be large in areas where the conversion table values are small, and conversely, the quantization error will be small in areas where the conversion table values are large.
転換テーブルは、1つ又は複数のスライスの原画像の輝度信号の値の出現頻度に応じて符号化装置で設定してもよいし、予めシステムで規定した複数の転換テーブルの中から符号化装置で選択してもよいし、予めシステムで規定した転換テーブルを用いてもよい。なお、転換テーブルは、転換後の出力信号が取りうる最小値から最大値までを予め規定する数に分割した各バンドに対して、割り当てる変換前の入力信号の画素値の数を示す値が格納されていてもよいし、転換テーブル内の値を量子化して保持してもよく、転換前後の入力信号と出力信号との関係を示していれば上記の例には限らない。 The conversion table may be set by the encoding device according to the frequency of occurrence of the luminance signal values of the original image of one or more slices, or may be selected by the encoding device from among multiple conversion tables predefined by the system, or a conversion table predefined by the system may be used. Note that the conversion table may store values indicating the number of pixel values of the pre-conversion input signal to be assigned to each band obtained by dividing the range from the minimum to maximum possible values of the converted output signal into a predefined number, or the values in the conversion table may be quantized and stored. The conversion table is not limited to the above examples, as long as it shows the relationship between the input signal and output signal before and after conversion.
また、符号化装置1で輝度信号の値の出現頻度に応じて転換テーブルを設定した場合や複数の転換テーブルの中から選択した場合には、なんらかの手段で復号装置2に転換テーブルの情報を伝送する。例えば、テーブルの値の情報をエントロピー符号化し、ストリーム出力してもよい。また、映像のフォーマット情報(例えば映像信号における光信号と電気信号との関係を表すパラメータなど)を基に符号化装置1と復号装置2とで予め用意された転換テーブルを切り替えて用いてもよい。 Furthermore, if the encoding device 1 sets a conversion table according to the frequency of occurrence of luminance signal values or selects from multiple conversion tables, the conversion table information is transmitted to the decoding device 2 by some means. For example, the table value information may be entropy coded and streamed. Furthermore, the encoding device 1 and decoding device 2 may switch between pre-prepared conversion tables based on video format information (for example, parameters representing the relationship between optical and electrical signals in a video signal).
図3は、本実施形態に係る転換部110の構成を示す図である。図3に示すように、転換部110は、パラメータ導出部111と、マッピング部112と、スケーリング部113とを有する。 Figure 3 is a diagram showing the configuration of the conversion unit 110 according to this embodiment. As shown in Figure 3, the conversion unit 110 includes a parameter derivation unit 111, a mapping unit 112, and a scaling unit 113.
パラメータ導出部111は、ブロック分割部100から出力される符号化対象ブロックの輝度信号に対して適用するマッピング処理に用いるルックアップテーブルの構成要素であるマッピングスケールテーブル及びマッピングオフセットテーブルと、逆マッピングスケールテーブルとを転換テーブルに基づいて算出し、マッピングスケールテーブル及びマッピングオフセットテーブルをマッピング部112に出力し、マッピングオフセットテーブル及び逆マッピングスケールテーブルを逆転換部170に出力する。 The parameter derivation unit 111 calculates, based on the conversion table, a mapping scale table, a mapping offset table, and an inverse mapping scale table, which are components of a lookup table used in the mapping process applied to the luminance signal of the block to be coded output from the block division unit 100, and outputs the mapping scale table and mapping offset table to the mapping unit 112, and outputs the mapping offset table and inverse mapping scale table to the inverse conversion unit 170.
さらに、パラメータ導出部111は、算出した逆マッピングスケールテーブルを用いて、スケーリング部113における符号化対象ブロックの色差信号に対して適用するスケーリング処理に用いるスケーリング係数テーブルを算出し、算出したスケーリング係数テーブルをスケーリング部113に出力する。 Furthermore, the parameter derivation unit 111 uses the calculated inverse mapping scale table to calculate a scaling coefficient table to be used in the scaling process applied to the color difference signal of the block to be coded in the scaling unit 113, and outputs the calculated scaling coefficient table to the scaling unit 113.
パラメータ導出部111の動作について詳細を説明する。分割数Nの転換テーブルをlmcsCWとするとき、パラメータ導出部111は、マッピングオフセットテーブルLmcsPivot、マッピングスケールテーブルScaleCoeff、及び逆マッピングスケールテーブルInvScaleCoeffを次の式(1)により算出する。 The following describes in detail the operation of the parameter derivation unit 111. When the conversion table for the division number N is lmcs CW , the parameter derivation unit 111 calculates the mapping offset table LmcsPivot, the mapping scale table ScaleCoeff, and the inverse mapping scale table InvScaleCoeff using the following equation (1).
LmcsPivot[0] = 0
for (i=0; i<=N-1; i++){
LmcsPivot[i+1] = LmcsPivot[i]+lmcsCW[i]
ScaleCoeff[i] = (lmcsCW[i]*(1<<11)+(1<<(Log2(64)-1)))>>(Log2(64))
if (lmcsCW[i] == 0)
InvScaleCoeff[i] = 0
else
InvScaleCoeff[i]=64*(1<<11)/lmcsCW[i]
}
・・・(1)
LmcsPivot[0] = 0
for (i=0; i<=N-1; i++){
LmcsPivot[i+1] = LmcsPivot[i]+lmcs CW [i]
ScaleCoeff[i] = (lmcs CW [i]*(1<<11)+(1<<(Log2(64)-1)))>>(Log2(64))
if (lmcs CW [ i ] == 0 )
InvScaleCoeff[i] = 0
else
InvScaleCoeff[i]=64*(1<<11)/lmcs CW [i]
}
...(1)
但し、「x<<n」はxをn桁左シフトする左シフト演算子であり、「x>>n」はxをn桁右シフトする右シフト演算子であり、「Log2(x)」は2を底としたxの対数を求める演算子である。 where "x<<n" is a left shift operator that shifts x to the left by n places, "x>>n" is a right shift operator that shifts x to the right by n places, and "Log2(x)" is an operator that finds the logarithm of x to the base 2.
さらに、パラメータ導出部111は、スケーリング係数テーブルChromaScaleCoeffを次の式(2)により算出する。 Furthermore, the parameter derivation unit 111 calculates the scaling coefficient table ChromaScaleCoeff using the following formula (2):
for (i=0;i<=15;i++){
if (lmcwCW[i]==0)
ChromaScaleCoeff[i]=(1<<11)
else
ChromaScaleCoeff[i]=InvScaleCoeff[i]
}
・・・(2)
for (i=0;i<=15;i++){
if (lmcwCW[i]==0)
ChromaScaleCoeff[i]=(1<<11)
else
ChromaScaleCoeff[i]=InvScaleCoeff[i]
}
...(2)
マッピング部112は、ブロック分割部100から出力される符号化対象ブロックの輝度信号に対して、パラメータ導出部111から出力されたマッピングスケールテーブル及びマッピングオフセットテーブルを用いてマッピング処理を行い、生成されたマッピング処理後の符号化対象ブロックの輝度信号を減算部120に出力する。 The mapping unit 112 performs mapping processing on the luminance signal of the block to be coded output from the block division unit 100 using the mapping scale table and mapping offset table output from the parameter derivation unit 111, and outputs the generated luminance signal of the block to be coded after the mapping processing to the subtraction unit 120.
具体的には、符号化対象ブロック内の輝度信号をSamplesY[i][j]とするとき、マッピング部112は、マッピングスケールテーブルScaleCoeff及びマッピングオフセットテーブルLmcsPivotを用いて、マッピング処理後の符号化対象ブロック内の輝度信号MapSamples[i][j]を次の式(3)により算出する。 Specifically, when the luminance signal in the block to be coded is SamplesY[i][j], the mapping unit 112 uses the mapping scale table ScaleCoeff and the mapping offset table LmcsPivot to calculate the luminance signal MapSamples[i][j] in the block to be coded after the mapping process using the following equation (3):
idxY=SamplesY[i][j]>>Log2(64)
MapSamples[i][j]=LmcsPivot[idxY]+(ScaleCoeff[idxY]*(SamplesY[i][j]-idxY*64)+(1<<10))>>11
・・・(3)
idxY=SamplesY[i][j]>>Log2(64)
MapSamples[i][j]=LmcsPivot[idxY]+(ScaleCoeff[idxY]*(SamplesY[i][j]-idxY*64)+(1<<10))>>11
...(3)
但し、i=0…Wy-1,j=0…Hy-1は符号化対象ブロック内の輝度信号の座標であり、Wy及びHyは符号化対象ブロックの輝度信号の幅及び高さをそれぞれ表す。 where i = 0...Wy-1 and j = 0...Hy-1 are the coordinates of the luminance signal within the block to be coded, and Wy and Hy represent the width and height, respectively, of the luminance signal of the block to be coded.
スケーリング部113は、ブロック分割部100から出力される符号化対象ブロックの色差信号に対して、パラメータ導出部111から出力されたスケーリング係数テーブルを用いてスケーリング処理を行い、生成されたスケーリング処理後の符号化対象ブロックの色差信号を減算部120に出力する。 The scaling unit 113 performs scaling processing on the color difference signals of the block to be coded output from the block division unit 100 using the scaling coefficient table output from the parameter derivation unit 111, and outputs the generated color difference signals of the block to be coded after the scaling processing to the subtraction unit 120.
具体的には、符号化対象ブロック内の色差信号をSamplesC[i][j]、符号化対象ブロックに隣接する復号済み輝度信号の平均値をYiとするとき、スケーリング部113は、スケーリング係数テーブルChromaScaleCoeffを用いて、スケーリング処理後の符号化対象ブロック内の色差信号ScaleSamples[i][j]を次の式(4)により算出する。 Specifically, when the color difference signal in the block to be coded is SamplesC[i][j] and the average value of the decoded luminance signals adjacent to the block to be coded is Yi, the scaling unit 113 uses the scaling coefficient table ChromaScaleCoeff to calculate the color difference signal ScaleSamples[i][j] in the block to be coded after scaling processing using the following equation (4):
idxYInv = Yi>>Log2(64)
ScaleSamples[i][j]=sign(SampleC[i][j])*((abs(SamplesC[i][j])<<11)+(ChromaScaleCoeff[idxYInv]>>1))/ChromaScaleCoeff[idxYInv]
・・・(4)
idxYInv = Yi>>Log2(64)
ScaleSamples[i][j]=sign(SampleC[i][j])*((abs(SamplesC[i][j])<<11)+(ChromaScaleCoeff[idxYInv]>>1))/ChromaScaleCoeff[idxYInv]
...(4)
但し、i=0…Wc-1,j=0…Hc-1は符号化対象ブロック内の色差信号の座標であり、Wc及びHcは符号化対象ブロックの色差信号の幅及び高さをそれぞれ表す。また、「sign(x)」は変数xの符号に応じて-1,0,1のいずれかの値を返す符号関数であり、「abs(x)」は変数xの絶対値を返す演算子である。 where i = 0...Wc-1, j = 0...Hc-1 are the coordinates of the color difference signal within the block to be coded, and Wc and Hc represent the width and height, respectively, of the color difference signal within the block to be coded. Also, "sign(x)" is a sign function that returns a value of -1, 0, or 1 depending on the sign of the variable x, and "abs(x)" is an operator that returns the absolute value of the variable x.
このようにして、転換部110は、マッピング部112が算出したマッピング後の符号化対象ブロックの輝度信号と、スケーリング部113の算出したスケーリング後の符号化対象ブロックの色差信号とにより構成される転換後の新たな符号化対象ブロックを減算部120に出力する。 In this way, the conversion unit 110 outputs to the subtraction unit 120 a new converted block to be coded, which is composed of the luminance signal of the block to be coded after mapping calculated by the mapping unit 112 and the chrominance signal of the block to be coded after scaling calculated by the scaling unit 113.
減算部120は、転換部110から出力される転換後の新たな符号化対象ブロックと、この新たな符号化対象ブロックを予測部190が予測した予測ブロックとの差分(誤差)を表す予測残差を算出する。減算部120は、ブロックの各画素値から予測ブロックの各画素値を減算することにより予測残差を算出し、算出した予測残差を変換・量子化部130に出力する。 The subtraction unit 120 calculates a prediction residual that represents the difference (error) between the new, converted block to be coded output from the conversion unit 110 and the predicted block that the prediction unit 190 predicts from this new block to be coded. The subtraction unit 120 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 130.
変換・量子化部130は、ブロック単位で変換処理及び量子化処理を行う。変換・量子化部130は、変換部131と、量子化部132とを有する。 The transform/quantization unit 130 performs transform processing and quantization processing on a block-by-block basis. The transform/quantization unit 130 includes a transform unit 131 and a quantization unit 132.
変換部131は、減算部120から出力される予測残差に対して変換処理を行って周波数成分ごとの変換係数を算出し、算出した変換係数を量子化部132に出力する。変換処理(変換)とは、画素領域の信号を周波数領域の信号に変換する処理をいい、例えば、離散コサイン変換(DCT)や離散サイン変換(DST)、カルーネンレーブ変換(KLT)、及びそれらを整数化した変換等をいう。また、変換処理には画素領域の信号を周波数領域の信号に変換することなくスケーリング等により調整する変換スキップを含んでもよい。 The transform unit 131 performs a transform process on the prediction residual output from the subtraction unit 120 to calculate transform coefficients for each frequency component, and outputs the calculated transform coefficients to the quantization unit 132. Transform process (conversion) refers to a process of converting a pixel-domain signal into a frequency-domain signal, such as a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), or an integer version of any of these. The transform process may also include a transform skip, which adjusts the pixel-domain signal by scaling or the like without converting it into a frequency-domain signal.
量子化部132は、変換部131から出力される変換係数を量子化パラメータ及び量子化行列を用いて量子化し、量子化した変換係数をエントロピー符号化部140及び逆量子化・逆変換部150に出力する。また、量子化部132は、量子化処理に関する情報(具体的には、量子化処理で用いた量子化パラメータ及び量子化行列の情報)を、エントロピー符号化部140、逆量子化部151、及びフィルタ制御部181に出力する。 The quantization unit 132 quantizes the transform coefficients output from the transform unit 131 using a quantization parameter and a quantization matrix, and outputs the quantized transform coefficients to the entropy coding unit 140 and the inverse quantization/inverse transform unit 150. The quantization unit 132 also outputs information related to the quantization process (specifically, information about the quantization parameter and quantization matrix used in the quantization process) to the entropy coding unit 140, the inverse quantization unit 151, and the filter control unit 181.
ここで、量子化パラメータは、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 all transform coefficients within a block, and determines the coarseness (step size) of quantization.
量子化行列は、1つのブロック内の成分ごとに設定される値からなる行列である。具体的には、量子化行列は、ブロックサイズに応じてi×j要素の成分ごとに設定される値(重み付け係数)からなる行列であって、変換係数の低周波から高周波にわたる成分ごとに量子化の粗さを調整するために用いられる。 A quantization matrix is a matrix consisting of values set for each component within a block. Specifically, a quantization matrix is a matrix consisting of values (weighting coefficients) 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.
図4は、量子化行列の一例を示す図である。図4において、i×j=4×4である一例を示している。図4に示す例では、量子化行列は、水平方向、垂直方向の次数がそれぞれ大きくなるほど、大きな値を有する。このような量子化行列では、より右下に配列された要素に係る変換係数、つまり高域の変換係数ほど低い精度で量子化される。そのため、低域ほど濃淡や色相の空間的変化に鋭敏であるという人間の視覚特性を活用し、主観的な画質を劣化させずに量子化によって高域での情報量を低減することが許容される。 Figure 4 shows an example of a quantization matrix. Figure 4 shows an example where i x j = 4 x 4. In the example shown in Figure 4, the quantization matrix has larger values as the horizontal and vertical orders increase. In such a quantization matrix, transform coefficients associated with elements arranged further to the bottom right, i.e., transform coefficients in higher frequencies, are quantized with lower precision. Therefore, by taking advantage of the human visual characteristic that the lower the frequency, the more sensitive the spatial changes in shade and hue, it is possible to reduce the amount of information in higher frequencies through quantization without degrading 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 (intra prediction or inter prediction) of the block to be coded, the block size (e.g., 2x2, 4x4, 8x8, 16x16, 32x32, 64x64), and one luminance and two color difference signals (in the case of RGB signals, the R signal, B signal, and G signal).
エントロピー符号化部140は、量子化部132から出力される変換係数に対してエントロピー符号化を行い、データ圧縮を行って符号化ストリーム(ビットストリーム)を生成し、符号化ストリームを符号化装置1の外部に出力する。エントロピー符号化には、ハフマン符号やCABAC(Context-based Adaptive Binary Arithmetic Coding;コンテキスト適応型2値算術符号)等を用いることができる。 The entropy coding unit 140 performs entropy coding on the transform coefficients output from the quantization unit 132, compresses the data, generates a coded stream (bit stream), and outputs the coded stream to the outside of the coding device 1. Entropy coding can use Huffman coding or CABAC (Context-based Adaptive Binary Arithmetic Coding), etc.
また、エントロピー符号化部140は、ブロック分割部100から各符号化対象ブロックのサイズ・形状等の情報を取得し、量子化部132から量子化処理に関する情報を取得し、予測部190から予測に関する情報(例えば、予測モードや動きベクトルの情報)を取得し、これらの情報の符号化も行う。 The entropy coding unit 140 also obtains information such as the size and shape of each block to be coded from the block division unit 100, obtains information about the quantization process from the quantization unit 132, and obtains information about prediction (e.g., prediction mode and motion vector information) from the prediction unit 190, and encodes this information.
逆量子化・逆変換部150は、ブロック単位で逆量子化処理及び逆変換処理を行う。逆量子化・逆変換部150は、逆量子化部151と、逆変換部152とを有する。 The inverse quantization and inverse transform unit 150 performs inverse quantization and inverse transform processing on a block-by-block basis. The inverse quantization and inverse transform unit 150 includes an inverse quantization unit 151 and an inverse transform unit 152.
逆量子化部151は、量子化部132が行う量子化処理に対応する逆量子化処理を行う。具体的には、逆量子化部151は、量子化部132から出力される変換係数を、量子化パラメータ及び量子化行列を用いて逆量子化することにより変換係数を復元し、復元した変換係数を逆変換部152に出力する。 The inverse quantization unit 151 performs inverse quantization processing corresponding to the quantization processing performed by the quantization unit 132. Specifically, the inverse quantization unit 151 restores the transform coefficients by inverse quantizing the transform coefficients output from the quantization unit 132 using a quantization parameter and a quantization matrix, and outputs the restored transform coefficients to the inverse transform unit 152.
逆変換部152は、変換部131が行う変換処理に対応する逆変換処理を行う。例えば、変換部131がDCTを行った場合には、逆変換部152は逆DCTを行う。逆変換部152は、逆量子化部151から出力される変換係数に対して逆変換処理を行って予測残差を復元し、復元した予測残差である復元予測残差を合成部160に出力する。 The inverse transform unit 152 performs inverse transform processing corresponding to the transform processing performed by the transform unit 131. For example, if the transform unit 131 performs DCT, the inverse transform unit 152 performs inverse DCT. The inverse transform unit 152 performs inverse transform processing on the transform coefficients output from the inverse quantization unit 151 to restore the prediction residual, and outputs the restored prediction residual, which is the restored prediction residual, to the synthesis unit 160.
合成部160は、逆変換部152から出力される復元予測残差を、予測部190から出力される予測ブロックと画素単位で合成する。合成部160は、復元予測残差の各画素値と予測ブロックの各画素値を加算して合成ブロックを算出し、算出した合成ブロックを逆転換部170に出力する。 The synthesis unit 160 synthesizes the reconstructed prediction residual output from the inverse transform unit 152 with the predicted block output from the prediction unit 190 on a pixel-by-pixel basis. The synthesis unit 160 adds each pixel value of the reconstructed prediction residual to each pixel value of the predicted block to calculate a synthesized block, and outputs the calculated synthesized block to the inverse transform unit 170.
逆転換部170は、転換部110の転換処理に対応する逆転換処理を行う。具体的には、逆転換部170は、合成部160から出力される合成ブロック内の各画素値に対して、転換テーブルに基づいて、転換部110における転換処理に対応する逆転換処理をすることで符号化対象ブロックを復元(復号)し、復元したブロック単位の復号画像(復元ブロック)をデブロッキングフィルタ180に出力する。 The inverse transformation unit 170 performs an inverse transformation process corresponding to the transformation process performed by the transformation unit 110. Specifically, the inverse transformation unit 170 restores (decodes) the block to be coded by performing an inverse transformation process corresponding to the transformation process performed by the transformation unit 110 on each pixel value in the composite block output from the synthesis unit 160 based on a transformation table, and outputs the restored decoded image (restored block) in block units to the deblocking filter 180.
図5は、本実施形態に係る逆転換部170の構成を示す図である。図5に示すように、逆転換部170は、逆マッピング部171と、逆スケーリング部172とを有する。 Figure 5 is a diagram showing the configuration of the inverse transformation unit 170 according to this embodiment. As shown in Figure 5, the inverse transformation unit 170 includes a de-mapping unit 171 and a de-scaling unit 172.
逆マッピング部171は、合成部160から出力される合成ブロックの輝度信号に対して、パラメータ導出部111から出力されたマッピングスケールテーブル及びマッピングオフセットテーブルを用いて逆マッピング処理を行い、符号化対象ブロックの輝度信号を復元し、復元した符号化対象ブロックの輝度信号をデブロッキングフィルタ180に出力する。 The inverse mapping unit 171 performs an inverse mapping process on the luminance signal of the composite block output from the synthesis unit 160 using the mapping scale table and mapping offset table output from the parameter derivation unit 111 to restore the luminance signal of the block to be coded, and outputs the restored luminance signal of the block to be coded to the deblocking filter 180.
具体的には、合成ブロック内の輝度信号をMapSampleY’[i][j]とするとき、逆マッピング部171は、逆マッピングスケールテーブルInvScaleCoeff及びマッピングオフセットテーブルLmcsPivotを用いて、逆マッピング処理後の復元した符号化対象ブロック内の輝度信号RecSmaplesY[i][j]を次の式(5)により算出する。 Specifically, when the luminance signal in the composite block is MapSampleY'[i][j], the inverse mapping unit 171 uses the inverse mapping scale table InvScaleCoeff and the mapping offset table LmcsPivot to calculate the luminance signal RecSmaplesY[i][j] in the block to be coded that has been restored after the inverse mapping process, using the following equation (5):
for (idxYInv = 0; idxYInv<=15;idxYInv++){
if (MapSampleY’[i][j] < LmcsPivot[idxYInv+1])
break
}
idxYInv = Min(idxYInv, 15)
RecSamplesY[i][j]=idxYInv*64+(InvScaleCoeff[idxYInv]*(MapSampleY’[i][j]-LmcsPivot[idxYInv])+(1<<10))>>11
・・・(5)
for (idxYInv = 0; idxYInv<=15;idxYInv++){
if (MapSampleY'[i][j] < LmcsPivot[idxYInv+1])
break
}
idxYInv = Min(idxYInv, 15)
RecSamplesY[i][j]=idxYInv*64+(InvScaleCoeff[idxYInv]*(MapSampleY'[i][j]-LmcsPivot[idxYInv])+(1<<10))>>11
...(5)
但し、i=0…Wy-1,j=0…Hy-1は符号化対象ブロック内の輝度信号の座標であり、Wy及びHyは符号化対象ブロックの輝度信号の幅及び高さである。また、「Min(x,y)」はx及びyのうち小さい方を返す演算子である。 where i = 0...Wy-1, j = 0...Hy-1 are the coordinates of the luminance signal within the block to be coded, and Wy and Hy are the width and height of the luminance signal of the block to be coded. Also, "Min(x, y)" is an operator that returns the smaller of x and y.
逆スケーリング部172は、合成部160から出力される合成ブロックの色差信号に対して、パラメータ導出部111から出力されたスケーリング係数テーブルを用いて逆スケーリング処理を行い、符号化対象ブロックの色差信号を復元し、復元した符号化対象ブロックの色差信号をデブロッキングフィルタ180に出力する。 The inverse scaling unit 172 performs inverse scaling processing on the chrominance signal of the composite block output from the synthesis unit 160 using the scaling coefficient table output from the parameter derivation unit 111 to restore the chrominance signal of the block to be coded, and outputs the restored chrominance signal of the block to be coded to the deblocking filter 180.
具体的には、合成ブロック内の色差信号をScaleSamplesC[i][j]、合成ブロックに隣接する復号済み輝度信号の平均値をYiとするとき、逆スケーリング部172は、スケーリング係数テーブルChromaScaleCoeffを用いて、逆スケーリング処理後の復元された符号化対象ブロックの色差信号RecSampleC[i][j]を次の式(6)により算出する。 Specifically, when the color difference signal within the composite block is ScaleSamplesC[i][j] and the average value of the decoded luminance signals adjacent to the composite block is Yi, the inverse scaling unit 172 uses the scaling coefficient table ChromaScaleCoeff to calculate the color difference signal RecSampleC[i][j] of the restored encoding target block after the inverse scaling process using the following equation (6):
idxYInv = Yi>>Log2(64)
RecSamplesC[i][j]=sign(ScaleSamplesC[i][j])*(abs(ScaleSamplesC[i][j])*ChromaScaleCoeff[idxYInv]+(1<<10))>>11
・・・(6)
idxYInv = Yi>>Log2(64)
RecSamplesC[i][j]=sign(ScaleSamplesC[i][j])*(abs(ScaleSamplesC[i][j])*ChromaScaleCoeff[idxYInv]+(1<<10))>>11
...(6)
但し、i=0…Wc-1,j=0…Hc-1は符号化対象ブロック内の色差信号の座標であり、Wc及びHcは符号化対象ブロックの色差信号の幅及び高さをそれぞれ表す。 where i = 0...Wc-1 and j = 0...Hc-1 are the coordinates of the color difference signal within the block to be coded, and Wc and Hc represent the width and height, respectively, of the color difference signal of the block to be coded.
このようにして、逆転換部170は、逆マッピング部171が復元した符号化対象ブロックの輝度信号と、逆スケーリング部172が復元した符号化対象ブロックの色差信号とにより構成される復元後の符号化対象ブロックをデブロッキングフィルタ180に出力する。 In this way, the inverse transformation unit 170 outputs to the deblocking filter 180 the restored block to be coded, which is composed of the luminance signal of the block to be coded restored by the inverse mapping unit 171 and the chrominance signal of the block to be coded restored by the inverse scaling unit 172.
デブロッキングフィルタ180は、復元ブロックと当該復元ブロックに隣接する隣接ブロックとからなる2つのブロックのブロック境界に対するフィルタ処理を行い、フィルタ処理後の復元ブロックをメモリ185に出力する。フィルタ処理は、ブロック単位の処理に起因する信号劣化を軽減するための処理であって、隣り合う2つのブロックのブロック境界における信号のギャップを平滑化するフィルタ処理である。デブロッキングフィルタ180は、一般的に信号の変動を緩やかにするローパスフィルタとして構成されている。 The deblocking filter 180 performs filtering on the block boundary between two blocks consisting of a reconstructed block and an adjacent block adjacent to the reconstructed block, and outputs the filtered reconstructed block to memory 185. The filtering is performed to reduce signal degradation caused by block-by-block processing, and smooths signal gaps at the block boundary between two adjacent blocks. The deblocking filter 180 is generally configured as a low-pass filter that smooths signal fluctuations.
図6は、本実施形態に係るデブロッキングフィルタ180の動作例を示す図である。図6に示す例では、デブロッキングフィルタ180は、8×8画素のブロックごとのブロック境界を対象としてフィルタ処理を行う。また、デブロッキングフィルタ180は、4行又は4列を単位としてフィルタ処理を行う。図6に示すブロックP及びQでは、デブロッキングフィルタ180のフィルタ処理の1単位であり、ブロックサイズが4×4画素である一例を示している。ブロックP及びQのそれぞれは、サブブロックと呼ばれてもよい。デブロッキングフィルタ180の動作の詳細については後述する。 Figure 6 is a diagram showing an example of the operation of the deblocking filter 180 according to this embodiment. In the example shown in Figure 6, the deblocking filter 180 performs filtering on block boundaries for each 8x8 pixel block. The deblocking filter 180 also performs filtering in units of 4 rows or 4 columns. Blocks P and Q shown in Figure 6 are one unit of filtering by the deblocking filter 180, and show an example where the block size is 4x4 pixels. Each of blocks P and Q may also be referred to as a sub-block. Details of the operation of the deblocking filter 180 will be described later.
フィルタ制御部181は、デブロッキングフィルタ180を制御する。具体的には、フィルタ制御部181は、対象ブロック対のブロック境界に対するフィルタ処理を行うか否かを示す境界強度(Bs:Boundary strength)、及びデブロッキングフィルタ180のフィルタ強度を制御する。境界強度Bsとは、フィルタ処理を適用するか否か、及びそのフィルタ処理の種類を決定するためのパラメータをいう。なお、フィルタ処理を行うか否かの制御は、境界強度Bsを1以上とするか又はゼロとするかの制御とみなすことができる。 The filter control unit 181 controls the deblocking filter 180. Specifically, the filter control unit 181 controls the boundary strength (Bs), which indicates whether or not to perform filtering on the block boundaries of the current block pair, and the filter strength of the deblocking filter 180. The boundary strength Bs is a parameter that determines whether or not to apply filtering and the type of filtering. Note that controlling whether or not to perform filtering can be considered as controlling whether or not to set the boundary strength Bs to 1 or greater, or to zero.
フィルタ制御部181は、対象ブロック対の境界近傍領域における画素値の変動や、予測モード、量子化パラメータ、動き補償予測(インター予測)に用いる動きベクトルの値に基づいて、デブロッキングフィルタ180を制御する。 The filter control unit 181 controls the deblocking filter 180 based on the fluctuations in pixel values in the region near the boundary between the current block pair, the prediction mode, the quantization parameter, and the value of the motion vector used in motion compensation prediction (inter prediction).
詳細については後述するが、本実施形態に係るフィルタ制御部181は、量子化部132における量子化処理及び逆量子化部151における逆変換処理に用いた量子化パラメータと、転換部110における転換処理及び逆転換部170における逆転換処理に用いた転換テーブルとに基づいて、デブロッキングフィルタ180のフィルタ強度を制御する。 As will be described in more detail below, the filter control unit 181 in this embodiment controls the filter strength of the deblocking filter 180 based on the quantization parameters used in the quantization process in the quantization unit 132 and the inverse transformation process in the inverse quantization unit 151, and the transformation table used in the transformation process in the transformation unit 110 and the inverse transformation process in the inverse transformation unit 170.
このように、ブロック単位で設定される一意のパラメータである量子化パラメータだけではなく、転換テーブルも考慮してデブロッキングフィルタのフィルタ強度を制御することにより、転換処理及び逆転換処理に起因するブロックノイズの発生に対してデブロッキングフィルタ180のフィルタ強度を制御可能になり、デブロッキングフィルタ180によるブロック歪みの低減効果を向上させることができる。 In this way, by controlling the filter strength of the deblocking filter taking into account not only the quantization parameter, which is a unique parameter set on a block-by-block basis, but also the conversion table, it becomes possible to control the filter strength of the deblocking filter 180 in response to the occurrence of block noise caused by the conversion process and inverse conversion process, thereby improving the effectiveness of the deblocking filter 180 in reducing block distortion.
メモリ185は、デブロッキングフィルタ180から出力される復元ブロックをフレーム単位で復号画像として蓄積する。メモリ185は、記憶している復号画像を予測部190(インター予測部191)に出力する。 Memory 185 accumulates the reconstructed blocks output from the deblocking filter 180 as decoded images on a frame-by-frame basis. Memory 185 outputs the stored decoded images to the prediction unit 190 (inter prediction unit 191).
予測部190は、ブロック単位で予測処理を行うことにより、符号化対象ブロックに対応する予測ブロックを生成し、生成した予測ブロックを減算部120及び合成部160に出力する。予測部190は、インター予測部191と、予測転換部192と、イントラ予測部193と、切替部194とを有する。 The prediction unit 190 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 120 and the synthesis unit 160. The prediction unit 190 has an inter prediction unit 191, a prediction conversion unit 192, an intra prediction unit 193, and a switching unit 194.
インター予測部191は、メモリ185に記憶された復号画像を参照画像として用いて、ブロックマッチング等の手法により動きベクトルを算出し、符号化対象ブロックを予測してインター予測ブロックを生成する。インター予測部191は、複数の参照画像を用いるインター予測(典型的には、双予測)や、1つの参照画像を用いるインター予測(片方向予測)の中から最適なインター予測方法を選択し、選択したインター予測方法を用いてインター予測を行う。インター予測部191は、インター予測に関する情報(動きベクトル等)をエントロピー符号化部140及びフィルタ制御部181に出力する。 The inter prediction unit 191 uses the decoded image stored in memory 185 as a reference image to calculate a motion vector using a technique such as block matching, and predicts the block to be coded to generate an inter prediction block. The inter prediction unit 191 selects the most appropriate inter prediction method from inter prediction using multiple reference images (typically bi-prediction) and inter prediction using a single reference image (unidirectional prediction), and performs inter prediction using the selected inter prediction method. The inter prediction unit 191 outputs information related to the inter prediction (motion vectors, etc.) to the entropy coding unit 140 and the filter control unit 181.
インター予測部191は、輝度信号については、インター予測ブロックを予測転換部192に出力する。一方、色差信号については、インター予測部191は、予測転換部192をスキップしてインター予測ブロックを切替部194に出力する。 For the luminance signal, the inter prediction unit 191 outputs the inter prediction block to the prediction conversion unit 192. On the other hand, for the chrominance signal, the inter prediction unit 191 skips the prediction conversion unit 192 and outputs the inter prediction block to the switching unit 194.
予測転換部192は、転換部110と同様の転換処理(具体的には、マッピング部112のマッピング処理)を行うことにより、新たなインター予測ブロックを生成する。予測転換部192は、インター予測ブロック内の輝度信号に対して転換テーブルに基づいたマッピング処理を行って新たなインター予測ブロックを生成し、新たなインター予測ブロックを切替部194に出力する。 The prediction conversion unit 192 generates a new inter-prediction block by performing the same conversion process as the conversion unit 110 (specifically, the mapping process of the mapping unit 112). The prediction conversion unit 192 performs mapping process based on a conversion table on the luminance signal in the inter-prediction block to generate a new inter-prediction block, and outputs the new inter-prediction block to the switching unit 194.
イントラ予測部193は、複数のイントラ予測モードの中から、符号化対象ブロックに適用する最適なイントラ予測モードを選択し、選択したイントラ予測モードを用いて符号化対象ブロックを予測する。具体的には、イントラ予測部193は、合成部160から出力される合成ブロックのうち、符号化対象ブロックに隣接する合成ブロックの画素値を参照してイントラ予測ブロックを生成し、生成したイントラ予測ブロックを切替部194に出力する。また、イントラ予測部193は、選択したイントラ予測モードに関する情報をエントロピー符号化部140及びフィルタ制御部181に出力する。 The intra prediction unit 193 selects the optimal intra prediction mode to apply to the current block from among multiple intra prediction modes, and predicts the current block using the selected intra prediction mode. Specifically, the intra prediction unit 193 generates an intra prediction block by referencing pixel values of synthesized blocks adjacent to the current block from the synthesized blocks output by the synthesis unit 160, and outputs the generated intra prediction block to the switching unit 194. The intra prediction unit 193 also outputs information related to the selected intra prediction mode to the entropy coding unit 140 and the filter control unit 181.
切替部194は、予測転換部192(又はインター予測部191)から出力されるインター予測ブロックとイントラ予測部193から出力されるイントラ予測ブロックとを切り替えて、いずれかの予測ブロックを減算部120及び合成部160に出力する。 The switching unit 194 switches between the inter-predicted block output from the prediction conversion unit 192 (or the inter-prediction unit 191) and the intra-predicted block output from the intra-prediction unit 193, and outputs either of the predicted blocks to the subtraction unit 120 and the synthesis unit 160.
このように、本実施形態に係る符号化装置1は、符号化対象ブロックに対する転換処理を行い新たな符号化対象ブロックを生成する転換部110と前記新たな符号化対象ブロックを予測により生成された予測ブロックとの差を表す予測残差に対して変換処理及び量子化処理を行う変換・量子化部130と、変換・量子化部で生成された変換係数に対して逆量子化処理及び逆変換処理を行って予測残差を復元する逆量子化・逆変換部150と、復元した予測残差と予測ブロックとを合成して合成ブロックを生成する合成部160と、合成ブロックに対する逆転換処理を行うことで符号化対象ブロックを復元する逆転換部と、復元した符号化対象ブロックと当該符号化対象ブロックに隣接する隣接ブロックとの境界に対するフィルタ処理を行うデブロッキングフィルタ180と、量子化処理及び逆量子化処理で用いた量子化パラメータと転換処理及び逆転換処理で用いた転換テーブルとに基づいて、デブロッキングフィルタ180のフィルタ強度を制御するフィルタ制御部181とを有する。 As such, the encoding device 1 according to this embodiment includes a conversion unit 110 that performs a conversion process on a current block to be encoded to generate a new current block to be encoded; a transform/quantization unit 130 that performs a conversion process and a quantization process on a prediction residual that represents the difference between the new current block to be encoded and a prediction block generated by predicting the new current block to be encoded; an inverse quantization/inverse transform unit 150 that performs an inverse quantization process and an inverse transform process on the transform coefficients generated by the transform/quantization unit to restore the prediction residual; a synthesis unit 160 that synthesizes the restored prediction residual and the prediction block to generate a composite block; an inverse transformation unit that performs an inverse transformation process on the composite block to restore the current block to be encoded; a deblocking filter 180 that performs a filtering process on the boundary between the restored current block to be encoded and an adjacent block adjacent to the current block to be encoded; and a filter control unit 181 that controls the filter strength of the deblocking filter 180 based on the quantization parameters used in the quantization process and inverse quantization process and the transformation table used in the transformation process and inverse transformation process.
次に、本実施形態に係るフィルタ制御部181の構成について説明する。本実施形態に係るフィルタ制御部181は、符号化対象ブロックに対する量子化処理及び逆量子化処理で用いた量子化パラメータと、隣接ブロックに対する量子化処理及び逆量子化処理で用いた量子化パラメータと、符号化対象ブロック及び隣接ブロックに対する転換処理及び逆転換処理で用いた転換テーブルと、符号化対象ブロックの画素値及び隣接ブロックの画素値とに基づいて、デブロッキングフィルタ180のフィルタ強度を制御する。以下において、符号化対象ブロック又はそのサブブロックがブロックPであり、隣接ブロック又はそのサブブロックがブロックQであるものとする。 Next, the configuration of the filter control unit 181 according to this embodiment will be described. The filter control unit 181 according to this embodiment controls the filter strength of the deblocking filter 180 based on the quantization parameters used in the quantization and inverse quantization processes for the block to be coded, the quantization parameters used in the quantization and inverse quantization processes for the adjacent blocks, the conversion tables used in the conversion and inverse conversion processes for the block to be coded and the adjacent blocks, and the pixel values of the block to be coded and the adjacent blocks. 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.
図7は、本実施形態に係るフィルタ制御部181の構成を示す図である。図7に示すように、本実施形態に係るフィルタ制御部181は、境界強度決定部181aと、代表値導出部181bと、オフセット算出部181cと、閾値導出部181dと、フィルタ強度制御部181eとを有する。 Figure 7 is a diagram showing the configuration of the filter control unit 181 according to this embodiment. As shown in Figure 7, the filter control unit 181 according to this embodiment includes a boundary strength determination unit 181a, a representative value derivation unit 181b, an offset calculation unit 181c, a threshold derivation unit 181d, and a filter strength control unit 181e.
境界強度決定部181aは、例えば下記の表1に基づいて境界強度Bsを決定し、決定した境界強度Bsの値を閾値導出部181d及びフィルタ強度制御部181eに出力する。本実施形態では、境界強度Bsの値は0,1,2のいずれかとする。なお、輝度信号と色差信号のブロックに対する境界強度をそれぞれ算出してもよいし、輝度信号と色差信号のブロックの境界強度の組み合わせを一つの境界強度として判定してもよい。 The boundary strength determination unit 181a 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 181d and the filter strength control unit 181e. 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 a single boundary strength.
表1に示すように、境界強度決定部181aは、ブロックP及びQの少なくとも一方にイントラ予測が適用されている場合、Bsの値を2とする。 As shown in Table 1, the boundary strength determination unit 181a sets the value of Bs to 2 when intra prediction is applied to at least one of blocks P and Q.
一方、境界強度決定部181aは、ブロックP及びQの両方にインター予測が適用されており、且つ少なくとも以下の(a)乃至(d)の中の1つの条件を満たす場合には、Bs値を1とし、その他の場合には、Bs値を0とする。 On the other hand, the boundary strength determination unit 181a sets the Bs value to 1 if inter prediction is applied to both blocks P and Q and at least one of the following conditions (a) to (d) is met, 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., 1 pixel).
境界強度決定部181aは、決定した境界強度Bsの値が0の場合、ブロックP及びQの境界に対するフィルタ処理を行わないようデブロッキングフィルタ180を制御する。 If the determined value of boundary strength Bs is 0, the boundary strength determination unit 181a controls the deblocking filter 180 so that filtering is not performed on the boundaries of blocks P and Q.
代表値導出部181bは、ブロックP及びブロックQのぞれぞれの輝度信号に基づいて輝度信号の代表値ypqを導出し、導出した代表値ypqをオフセット算出部181cに出力する。 The representative value derivation unit 181b derives a representative value y pq of the luminance signal based on the luminance signals of the blocks P and Q, and outputs the derived representative value y pq to the offset calculation unit 181c.
代表値導出部181bが導出する代表値ypqとしては、次の1)もしくは2)のいずれかとする。 The representative value y pq derived by the representative value deriving unit 181b is either 1) or 2) below.
1)代表値ypqは、ブロックP及びブロックQのそれぞれの輝度信号の平均値である。 1) The representative value y pq is the average value of the luminance signals of the block P and the block Q.
具体的には、代表導出部181bは、次の式(7)に示すようにブロックP及びブロックQの平均値を代表値ypqとする。 Specifically, the representative derivation unit 181b determines the average value of the block P and the block Q as the representative value y pq as shown in the following equation (7).
ypq=(ΣYp[i][j]+ΣYq[s][t])/(Wp*Hp+Wq*Hq)
・・・(7)
y pq =(ΣYp[i][j]+ΣYq[s][t])/(Wp*Hp+Wq*Hq)
... (7)
但し、Yp及びYqはブロックP及びブロックQに含まれる輝度信号をそれぞれ表し、i=0…Hp-1,j=0…Wp-1はブロックP内の座標であり、s=0…Hq-1,t=0…Wq-1はブロックQ内の座標であり、Wp及びWqはブロックP及びブロックQの幅をそれぞれ表し、Hp及びHqはブロックP及びブロックQの高さをそれぞれ表す。 where Yp and Yq represent the luminance signals contained in block P and block Q, respectively; i = 0...Hp-1, j = 0...Wp-1 are coordinates within block P; s = 0...Hq-1, t = 0...Wq-1 are coordinates within block Q; Wp and Wq represent the widths of block P and block Q, respectively; and Hp and Hq represent the heights of block P and block Q, respectively.
2)代表値ypqは、ブロックP及びブロックQのそれぞれの輝度信号におけるブロック境界付近の平均値である。 2) The representative value y pq is the average value of the luminance signals of each of the blocks P and Q near the block boundary.
具体的には、代表導出部181bは、ブロックP及びブロックQのブロック境界の平均値を代表値ypqとする。例えばブロックP及びブロックQが水平に隣り合う場合(即ち、ブロックPとブロックQとの間に位置する垂直方向のブロック境界に対するデブロッキング処理を行う場合)には、次の式(8)に示すように、ブロックP及びブロックQの前記ブロック境界に位置する輝度画素値の平均値を代表値ypqとする。 Specifically, the representative derivation unit 181b sets the representative value ypq to the average value of the block boundary between block P and block Q. For example, when block P and block Q are horizontally adjacent to each other (i.e., when performing deblocking processing on the vertical block boundary between block P and block Q), the representative value ypq is set to the average value of luminance pixel values located at the block boundary between block P and block Q, as shown in the following equation (8).
ypq=(Yp[0][Wp-1]+Yp[Hp-1][Wp-1]+Yq[0][0]+Yq[Hq-1][0])>>2
・・・(8)
y pq =(Yp[0][Wp-1]+Yp[Hp-1][Wp-1]+Yq[0][0]+Yq[Hq-1][0])>>2
...(8)
同様に、ブロックP及びブロックQが垂直に隣り合う場合(即ちブロックPとブロックQとの間に位置する水平方向のブロック境界に対するデブロッキング処理を行う場合)には、次の式(9)に示すようにブロックP及びブロックQの前記ブロック境界に位置する輝度画素値の平均値を代表値ypqとする。 Similarly, when blocks P and Q are vertically adjacent (i.e., when performing deblocking processing on the horizontal block boundary between blocks P and Q), the average value of the luminance pixel values located at the block boundary of blocks P and Q is set as the representative value y pq , as shown in the following equation (9).
ypq=(Yp[Hp-1][0]+Yp[Hp-1][Wp-1]+Yq[0][0]+Yq[0][Wq-1])>>2
・・・(9)
y pq =(Yp[Hp-1][0]+Yp[Hp-1][Wp-1]+Yq[0][0]+Yq[0][Wq-1])>>2
...(9)
オフセット算出部181cは、代表値導出部181bが導出した代表値ypqと、ブロックP及びブロックQに対する転換処理及び逆転換処理で用いた転換テーブルとに基づいて、オフセット値を算出する。 The offset calculation unit 181c calculates an offset value based on the representative value y pq derived by the representative value derivation unit 181b and the conversion table used in the conversion process and inverse conversion process for the block P and the block Q.
具体的には、オフセット算出部181cは、代表値ypqを用いて、ブロックPとブロックQとの境界に適用するデブロッキングフィルタの制御のためのオフセット値QpOffsetを算出し、算出したオフセット値QpOffsetを閾値導出部181dに出力する。例えば、オフセット算出部181cは、次の式(10)によりオフセット値QpOffsetを算出する。 Specifically, the offset calculation unit 181c uses the representative value y pq to calculate an offset value QpOffset for controlling a deblocking filter to be applied to the boundary between block P and block Q, and outputs the calculated offset value QpOffset to the threshold derivation unit 181d. For example, the offset calculation unit 181c calculates the offset value QpOffset using the following equation (10).
QpOffset=log2(lmcsCW[ypq>>6]/64)×6
・・・(10)
QpOffset=log2(lmcs CW [y pq >>6]/64)×6
...(10)
なお、オフセット算出部181cでは、ハードウェアでの実装などにおいては、除算やlog2関数の処理の代わりに、ルックアップテーブルを用いて式(4)及び式(5)を実装してもよい。 In addition, when the offset calculation unit 181c is implemented in hardware, equations (4) and (5) may be implemented using a lookup table instead of division or log2 function processing.
閾値導出部181dは、ブロックPに対する量子化処理及び逆量子化処理で用いた量子化パラメータQpPと、ブロックQに対する量子化処理及び逆量子化処理で用いた量子化パラメータQpQと、オフセット算出部181cが算出したオフセット値QpOffsetとに基づいて、デブロッキングフィルタ180のフィルタ強度を制御するための閾値β及びtCを導出し、導出した閾値β及びtCをフィルタ強度制御部181eに出力する。 The threshold derivation unit 181d derives thresholds β and tC for controlling the filter strength of the deblocking filter 180 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 value QpOffset calculated by the offset calculation unit 181c, and outputs the derived thresholds β and tC to the filter strength control unit 181e.
第1に、閾値導出部181dは、例えば次の式(11)により変数qPを算出する。 First, the threshold derivation unit 181d calculates the variable qP, for example, using the following equation (11):
qP=((QpQ+QpP +1)>>1+QpOffset)
・・・(11)
qP=((Qp Q +Qp P +1)>>1+QpOffset)
...(11)
式(11)は、基本的には、ブロックPの量子化パラメータQpPと、ブロックQの量子化パラメータQpQとの平均を求める計算式であるが、この計算式において転換テーブルに基づくオフセット値QpOffsetが導入されている。なお、式(11)の計算式は一例に過ぎないものであって、オフセット値QpOffsetが反映されたものであれば他の計算式を用いてもよい。 Formula (11) is basically a calculation formula for finding the average of the quantization parameter QpP of block P and the quantization parameter QpQ of block Q, but this calculation formula introduces an offset value QpOffset based on a conversion table. Note that formula (11) is merely an example, and other calculation formulas may be used as long as they reflect the offset value QpOffset.
第2に、閾値導出部181dは、例えば次の式(12)により、閾値βを導出するためのQを算出する。 Second, the threshold derivation unit 181d calculates Q for deriving the threshold β, for example, using the following equation (12):
Q=Clip3(0,63,qP+(slice_beta_offset_div2<<1))
・・・(12)
Q=Clip3(0,63,qP+(slice_beta_offset_div2<<1))
...(12)
但し、「Clip3(x,y,z)」は、zがxより小さければxを返し、zがyより大きければyを返し、それ以外の場合はzを返すクリップ演算子である。「slice_beta_offset_div2」は、復号装置2にシグナリングするパラメータの1つである。 where "Clip3(x, y, z)" is a clip operator that returns x if z is less than x, returns y if z is greater than y, and returns z otherwise. "slice_beta_offset_div2" is one of the parameters signaled to the decoding device 2.
また、閾値導出部181dは、例えば次の式(13)により、閾値tCを導出するためのQを算出する。 Furthermore, the threshold value deriving unit 181d calculates Q for deriving the threshold value tC , for example, using the following equation (13).
Q=Clip3(0,65,qP+2*(bS?1)+(slice_tc_offset_div2<<1))
・・・(13)
Q=Clip3(0,65,qP+2*(bS?1)+(slice_tc_offset_div2<<1))
...(13)
但し、「bS」は境界強度決定部181aが出力するBs値である。「slice_tc_offset_div2」は、復号装置2にシグナリングするパラメータの1つである。 where "bS" is the Bs value output by the boundary strength determination unit 181a. "slice_tc_offset_div2" is one of the parameters signaled to the decoding device 2.
第3に、閾値導出部181dは、次の表2により、それぞれ算出したQから閾値β及びtCを導出する。 Third, the threshold value deriving unit 181d derives threshold values β and tC from the calculated Q according to Table 2 below.
フィルタ強度制御部181eは、境界強度決定部181aが出力する境界強度Bsの値と、閾値導出部181dが出力する閾値β及びtCとに基づいて、デブロッキングフィルタ180のフィルタ強度を制御する。 The filter strength control unit 181e controls the filter strength of the deblocking filter 180 based on the value of the boundary strength Bs output by the boundary strength determination unit 181a and the threshold β and tC output by the threshold derivation unit 181d.
上述の代表値導出部181bは、ブロックP及びブロックQの前記ブロック境界に位置する輝度画素値の平均値を代表値ypqとしたが、それぞれのブロックの一部もしくは全体の平均によりブロックPの代表値yp及びブロックQの代表値yqをそれぞれ算出し、前記代表値を用いてブロックP及びブロックQに対するオフセット値を導出してもよい。 The representative value derivation unit 181b described above sets the average value of the luminance pixel values located at the block boundary of block P and block Q as the representative value ypq . However, it is also possible to calculate the representative value yp of block P and the representative value yq of block Q by averaging a part or the whole of each block, and derive offset values for block P and block Q using the representative values.
具体的には代表値導出部181bが導出する代表値yp及びyqとしては、次の1)もしくは2)のいずれかとする。 Specifically, the representative values yp and yq derived by the representative value deriving unit 181b are either 1) or 2) below.
1)ブロックP及びブロックQのそれぞれの平均値を代表値yp及びyqとする。 1) The average values of block P and block Q are set as representative values yp and yq , respectively.
yp=(ΣYp[i][j])/(Wp*Hp)
yq=(ΣYq[s][t])/(Wq*Hq)
・・・(14)
y p =(ΣYp[i][j])/(Wp*Hp)
y q =(ΣYq[s][t])/(Wq*Hq)
...(14)
2)ブロックP及びブロックQのブロック境界に位置する各ブロックの輝度画素値の平均値を代表値yp及びyqとする。 2) The average values of the luminance pixel values of each block located on the block boundary between block P and block Q are set as representative values yp and yq .
yp=(Yp[0][Wp-1]+Yp[Hp-1][Wp-1]) >>1
yq=(Yq[0][0]+Yq[Hq-1][0]) >>1
・・・(15)
y p =(Yp[0][Wp-1]+Yp[Hp-1][Wp-1]) >>1
y q =(Yq[0][0]+Yq[Hq-1][0]) >>1
...(15)
オフセット算出部181cは前記yp及びyqを用いてブロックP及びブロックQそれぞれに適用するオフセット値QppOffset及びQpqOffsetを下記の式により算出する。 The offset calculation unit 181c calculates offset values QppOffset and QpqOffset to be applied to the block P and the block Q, respectively, using the yp and yq according to the following equations.
QppOffset=log2(lmcsCW[yp>>6]/64)×6
QpqOffset=log2(lmcsCW[yq>>6]/64)×6
・・・(16)
QppOffset=log2(lmcs CW [y p >>6]/64)×6
QpqOffset=log2(lmcs CW [y q >>6]/64)×6
...(16)
閾値導出部181dは、ブロックPに対する量子化処理及び逆量子化処理で用いた量子化パラメータQpPと、ブロックQに対する量子化処理及び逆量子化処理で用いた量子化パラメータQpQと、オフセット算出部181cが算出したオフセット値QppOffset及びQpqOffsetとに基づいて、デブロッキングフィルタ180のフィルタ強度を制御するための閾値β及びtCを導出し、導出した閾値β及びtCをフィルタ強度制御部181eに出力する。 The threshold derivation unit 181d derives thresholds β and tC for controlling the filter strength of the deblocking filter 180 based on the quantization parameters QpP used in the quantization processing and inverse quantization processing for the block P, the quantization parameters QpQ used in the quantization processing and inverse quantization processing for the block Q, and the offset values QppOffset and QpqOffset calculated by the offset calculation unit 181c, and outputs the derived thresholds β and tC to the filter strength control unit 181e.
閾値導出部181dは、例えば次の式(17)により変数qPを算出する。 The threshold derivation unit 181d calculates the variable qP, for example, using the following equation (17):
qP=(QpQ+QpP +QppOffset +QpqOffset +1)>>1
・・・(17)
qP=(Qp Q +Qp P +QppOffset +QpqOffset +1)>>1
...(17)
上述のように算出した変数qPを用いて式(12)及び式(13)を用いて閾値βを導出するためのQを算出し、算出したQ及び表2により閾値β及びtCを導出する。 Using the variable qP calculated as described above, Q for deriving the threshold value β is calculated using equations (12) and (13), and the threshold value β and tC are derived using the calculated Q and Table 2.
フィルタ強度制御部181eは、境界強度Bsの値が1又は2の場合には、次の式(18)を満たす場合にのみ、フィルタ処理を行うようデブロッキングフィルタ180を制御してもよい(図6参照)。 When the value of boundary strength Bs is 1 or 2, the filter strength control unit 181e may control the deblocking filter 180 to perform filtering only when the following equation (18) is satisfied (see Figure 6).
また、フィルタ強度制御部181eは、フィルタ処理を行う場合、以下の条件式(19)乃至(24)を全て満たす場合に強いフィルタを適用し、それ以外の場合に弱いフィルタを適用してもよい(図6参照)。 Furthermore, when performing filter processing, the filter strength control unit 181e may apply a strong filter if all of the following conditional expressions (19) to (24) are satisfied, and a weak filter in other cases (see Figure 6).
このように、本実施形態に係るフィルタ制御部181は、ブロック単位で設定される一意のパラメータである量子化パラメータだけではなく、転換テーブルも考慮してデブロッキングフィルタ180のフィルタ強度を制御する。これにより、転換処理及び逆転換処理に起因するブロックノイズの発生に対してデブロッキングフィルタ180のフィルタ強度を制御可能になり、デブロッキングフィルタ180によるブロック歪みの低減効果を向上させることができる。 In this way, the filter control unit 181 according to this embodiment controls the filter strength of the deblocking filter 180 taking into consideration not only the quantization parameter, which is a unique parameter set for each block, but also the conversion table. This makes it possible to control the filter strength of the deblocking filter 180 in response to the occurrence of block noise caused by the conversion process and the inverse conversion process, thereby improving the effectiveness of the deblocking filter 180 in reducing block distortion.
例えば、フィルタ制御部181は、転換テーブル中の複数のバンドの中から、符号化対象ブロック及び隣接ブロックに対応するバンドを特定し、特定したバンドに対して割り当てられた転換後の画素値の数を示す値が小さいほど、デブロッキングフィルタ180のフィルタ強度が強くなるようにデブロッキングフィルタ180を制御する。 For example, the filter control unit 181 identifies the bands corresponding to the block to be coded and the adjacent blocks from among the multiple bands in the conversion table, and controls the deblocking filter 180 so that the filter strength of the deblocking filter 180 increases as the value indicating the number of converted pixel values assigned to the identified band decreases.
これにより、画像に対して同一の量子化パラメータを適用する場合にも、転換テーブルの値が小さい領域については量子化誤差が大きくなり、逆に転換テーブルの値が大きい領域については量子化誤差が小さくなるという性質に着目し、転換テーブルの値が小さい領域におけるブロック境界に対して強いフィルタを適用しやすくなる。 This makes it easier to apply a strong filter to block boundaries in areas with small conversion table values, taking into account the fact that even when the same quantization parameters are applied to an image, the quantization error will be large in areas with small conversion table values, and conversely, the quantization error will be small in areas with large conversion table values.
<復号装置の構成>
次に、本実施形態に係る復号装置の構成について、上述した符号化装置の構成との相違点を主として説明する。
<Configuration of Decoding Device>
Next, the configuration of the decoding device according to this embodiment will be described, focusing mainly on the differences from the configuration of the encoding device described above.
図8は、本実施形態に係る復号装置2の構成を示す図である。復号装置2は、符号化ストリームから復号対象ブロックを復号する装置である。 Figure 8 shows 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.
図8に示すように、復号装置2は、エントロピー復号部200と、逆量子化・逆変換部210と、合成部220と、逆転換部230と、デブロッキングフィルタ240と、フィルタ制御部241と、メモリ250と、予測部260とを有する。 As shown in FIG. 8, the decoding device 2 has an entropy decoding unit 200, an inverse quantization and inverse transform unit 210, a synthesis unit 220, an inverse transformation unit 230, a deblocking filter 240, a filter control unit 241, a memory 250, and a prediction unit 260.
エントロピー復号部200は、符号化装置1により生成された符号化ストリームを復号し、各種のシグナリング情報を復号する。具体的には、エントロピー復号部200は、復号対象ブロックに適用された量子化処理に関する情報を取得し、取得した情報を逆量子化部211及びフィルタ制御部241に出力する。また、エントロピー復号部200は、復号対象ブロックに適用された予測に関する情報(例えば、予測種別情報、動きベクトル情報)を取得し、取得した情報を予測部260及びフィルタ制御部241に出力する。転換テーブルが符号化装置1から伝送される場合、エントロピー復号部200は、転換テーブルの情報を逆転換部230及びフィルタ制御部241に出力する。 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 obtains information related to the quantization process applied to the block to be decoded and outputs the obtained information to the inverse quantization unit 211 and the filter control unit 241. The entropy decoding unit 200 also obtains information related to the prediction applied to the block to be decoded (e.g., prediction type information, motion vector information) and outputs the obtained information to the prediction unit 260 and the filter control unit 241. When a conversion table is transmitted from the encoding device 1, the entropy decoding unit 200 outputs the conversion table information to the inverse conversion unit 230 and the filter control unit 241.
また、エントロピー復号部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 includes an inverse quantization unit 211 and an inverse transform unit 212.
逆量子化部211は、符号化装置1の量子化部132が行う量子化処理に対応する逆量子化処理を行う。逆量子化部211は、エントロピー復号部200から出力される量子化変換係数を、量子化パラメータ及び量子化行列を用いて逆量子化することにより、復号対象ブロックの変換係数を復元し、復元した変換係数を逆変換部212に出力する。 The inverse quantization unit 211 performs inverse quantization processing corresponding to the quantization processing performed by the quantization unit 132 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の変換部131が行う変換処理に対応する逆変換処理を行う。逆変換部212は、逆量子化部211から出力される変換係数に対して逆変換処理を行って予測残差を復元し、復元した予測残差(復元予測残差)を合成部220に出力する。 The inverse transform unit 212 performs inverse transform processing corresponding to the transform processing performed by the transform unit 131 of the encoding device 1. The inverse transform unit 212 performs inverse transform processing 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から出力される予測残差と、予測部260から出力される予測ブロックとを画素単位で合成することにより合成ブロックを生成し、生成した合成ブロックを逆転換部230に出力する。 The synthesis unit 220 generates a synthesis block by synthesizing the prediction residual output from the inverse transform unit 212 and the prediction block output from the prediction unit 260 on a pixel-by-pixel basis, and outputs the generated synthesis block to the inverse transform unit 230.
逆転換部230は、符号化装置1の逆転換部170と同様な動作を行う。具体的には、逆転換部230は、合成部220から出力される合成ブロックに対して転換テーブルに基づいて逆転換処理を施すことにより、復号対象ブロックを復元(復号)し、復元ブロックをデブロッキングフィルタ240に出力する。 The inverse transformation unit 230 performs operations similar to those of the inverse transformation unit 170 of the encoding device 1. Specifically, the inverse transformation unit 230 performs inverse transformation processing on the composite block output from the synthesis unit 220 based on a transformation table, thereby restoring (decoding) the block to be decoded, and outputs the reconstructed block to the deblocking filter 240.
図9は、本実施形態に係る逆転換部230の構成を示す図である。図9に示すように、逆転換部230は、逆マッピング部231と、逆スケーリング部232とを有する。 Figure 9 is a diagram showing the configuration of the inverse transformation unit 230 according to this embodiment. As shown in Figure 9, the inverse transformation unit 230 includes a demapping unit 231 and an inverse scaling unit 232.
逆マッピング部231は、合成部220から出力される合成ブロックの輝度信号に対して、マッピングスケールテーブル及びマッピングオフセットテーブルを用いて逆マッピング処理を行い、復号対象ブロックの輝度信号を復元し、復元した復号対象ブロックの輝度信号をデブロッキングフィルタ180に出力する。例えば、逆マッピング部231は、上記の式(5)により、逆マッピング処理後の復元した復号対象ブロック内の輝度信号を算出する。 The inverse mapping unit 231 performs an inverse mapping process on the luminance signal of the composite block output from the synthesis unit 220 using the mapping scale table and mapping offset table to restore the luminance signal of the block to be decoded, and outputs the restored luminance signal of the block to be decoded to the deblocking filter 180. For example, the inverse mapping unit 231 calculates the restored luminance signal of the block to be decoded after the inverse mapping process using the above equation (5).
逆スケーリング部232は、合成部220から出力される合成ブロックの色差信号に対して、スケーリング係数テーブルを用いて逆スケーリング処理を行い、復号対象ブロックの色差信号を復元し、復元した復号対象ブロックの色差信号をデブロッキングフィルタ180に出力する。例えば、逆スケーリング部232は、式(6)により、逆スケーリング処理後の復元された復号対象ブロックの色差信号を算出する。 The inverse scaling unit 232 performs inverse scaling processing on the chrominance signal of the composite block output from the composition unit 220 using a scaling coefficient table to restore the chrominance signal of the block to be decoded, and outputs the restored chrominance signal of the block to be decoded to the deblocking filter 180. For example, the inverse scaling unit 232 calculates the restored chrominance signal of the block to be decoded after the inverse scaling processing using equation (6).
デブロッキングフィルタ240は、符号化装置1のデブロッキングフィルタ180と同様な動作を行う。デブロッキングフィルタ240は、逆転換部230から出力される復元ブロックと当該復元ブロックに隣接するブロックとからなるブロック対(ブロックP及びQ)の境界に対するフィルタ処理を行い、フィルタ処理後の復元ブロックをメモリ250に出力する。 The deblocking filter 240 operates in the same manner as the deblocking filter 180 of the encoding device 1. The deblocking filter 240 performs filtering on the boundary of a block pair (blocks P and Q) consisting of a reconstructed block output from the inverse transformation unit 230 and a block adjacent to the reconstructed block, and outputs the reconstructed block after filtering to the memory 250.
フィルタ制御部241は、エントロピー復号部200から出力される情報に基づいて、符号化装置1のフィルタ制御部181と同様な動作を行う。フィルタ制御部241は、例えば、表1に示した方法で境界強度Bsを選択し、式(7)乃至式(28)のような方法によりデブロッキングフィルタ180のフィルタ強度を制御する。 The filter control unit 241 performs operations similar to those of the filter control unit 181 of the encoding device 1, based on information output from the entropy decoding unit 200. The filter control unit 241 selects the boundary strength Bs using, for example, the method shown in Table 1, and controls the filter strength of the deblocking filter 180 using methods such as those shown in equations (7) to (28).
メモリ250は、デブロッキングフィルタ240から出力される復元ブロックをフレーム単位で復号画像として記憶する。メモリ250は、フレーム単位の復号画像を復号装置2の外部に出力する。 The memory 250 stores the reconstructed blocks output from the deblocking filter 240 as decoded images on a frame-by-frame basis. The memory 250 outputs the decoded images on a frame-by-frame basis to an external device outside the decoding device 2.
予測部260は、ブロック単位で予測を行う。予測部260は、インター予測部261と、予測転換部262と、イントラ予測部264と、切替部265とを有する。 The prediction unit 260 performs prediction on a block-by-block basis. The prediction unit 260 includes an inter prediction unit 261, a prediction conversion unit 262, an intra prediction unit 264, and a switching unit 265.
インター予測部261は、メモリ250に記憶された復号画像を参照画像として用いて、復号対象ブロックをインター予測により予測する。インター予測部261は、エントロピー復号部200から出力される動きベクトル情報を用いてインター予測を行うことによりインター予測ブロックを生成し、生成したインター予測ブロックを予測転換部262に出力する。 The inter prediction unit 261 predicts the current block to be decoded by inter prediction, using the decoded image stored in the memory 250 as a reference image. The inter prediction unit 261 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 prediction conversion unit 262.
予測転換部262は符号化装置1の予測転換部192と同様な動作を行う。予測転換部262は、インター予測部261から出力されるインター予測ブロックに対して転換テーブルに基づいて転換処理を行うことにより新たなインター予測ブロックを生成し、生成した新たなインター予測ブロックを切替部265に出力する。 The prediction conversion unit 262 operates in the same manner as the prediction conversion unit 192 of the encoding device 1. The prediction conversion unit 262 generates a new inter prediction block by performing a conversion process on the inter prediction block output from the inter prediction unit 261 based on a conversion table, and outputs the generated new inter prediction block to the switching unit 265.
イントラ予測部264は、エントロピー復号部200から出力される情報に基づいて、合成部220から出力される合成ブロックのうち符号化対象ブロックに隣接する合成ブロックの画素値を参照してイントラ予測ブロックを生成し、生成したイントラ予測ブロックを切替部265に出力する。 Based on the information output from the entropy decoding unit 200, the intra prediction unit 264 generates an intra prediction block by referencing the pixel values of the synthesis block output from the synthesis unit 220 that is adjacent to the block to be coded, and outputs the generated intra prediction block to the switching unit 265.
切替部265は、予測転換部262(又はインター予測部261)から出力されるインター予測ブロックとイントラ予測部264から出力されるイントラ予測ブロックとを切り替えて、いずれかの予測ブロックを合成部220に出力する。 The switching unit 265 switches between the inter-predicted block output from the prediction conversion unit 262 (or the inter-prediction unit 261) and the intra-predicted block output from the intra-prediction unit 264, and outputs one of the predicted blocks to the synthesis unit 220.
このように、本実施形態に係る復号装置2は、符号化ストリームを復号することで、復号対象ブロックに対応する変換係数を出力するエントロピー復号部200と、エントロピー復号部200が出力する変換係数に対して逆量子化処理及び逆変換処理を行って予測残差を復元する逆量子化・逆変換部210と、復元した予測残差と復号対象ブロックを予測した予測ブロックとを合成して合成ブロックを生成する合成部220と、生成した合成ブロックに対して転換テーブルに基づいて逆転換処理を行うことにより復号対象ブロックを復元する逆転換部230と、復元した復号対象ブロックと当該復号対象ブロックに隣接する隣接ブロックとの境界に対するフィルタ処理を行うデブロッキングフィルタ240と、逆量子化処理で用いた量子化パラメータと逆転換処理で用いた転換テーブルとに基づいてデブロッキングフィルタ240のフィルタ強度を制御するフィルタ制御部241とを有する。 As such, the decoding device 2 according to this embodiment includes an entropy decoding unit 200 that decodes the coded stream and outputs transform coefficients corresponding to the block to be decoded; an inverse quantization and 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 prediction residuals; a synthesis unit 220 that generates a composite block by synthesizing the restored prediction residuals with a prediction block that predicts the block to be decoded; an inverse transformation unit 230 that restores the block to be decoded by performing inverse transformation processing on the generated composite block based on a transformation table; a deblocking filter 240 that performs filtering on the boundaries between the restored block to be decoded and adjacent blocks adjacent to the block to be decoded; and a filter control unit 241 that controls the filter strength of the deblocking filter 240 based on the quantization parameter used in the inverse quantization processing and the transformation table used in the inverse transformation processing.
次に、本実施形態に係るフィルタ制御部241の構成について説明する。図10は、本実施形態に係るフィルタ制御部241の構成を示す図である。図10に示すように、本実施形態に係るフィルタ制御部241は、境界強度決定部241aと、代表値導出部241bと、オフセット算出部241cと、閾値導出部241dと、フィルタ強度制御部241eとを有する。 Next, the configuration of the filter control unit 241 according to this embodiment will be described. Figure 10 is a diagram showing the configuration of the filter control unit 241 according to this embodiment. As shown in Figure 10, the filter control unit 241 according to this embodiment has a boundary strength determination unit 241a, a representative value derivation unit 241b, an offset calculation unit 241c, a threshold derivation unit 241d, and a filter strength control unit 241e.
境界強度決定部241a、代表値導出部241b、オフセット算出部241c、閾値導出部241d、及びフィルタ強度制御部241eは、符号化装置1の境界強度決定部181a、代表値導出部181b、オフセット算出部181c、閾値導出部181d、及びフィルタ強度制御部181eとそれぞれ同様な動作を行う。 The boundary strength determination unit 241a, representative value derivation unit 241b, offset calculation unit 241c, threshold derivation unit 241d, and filter strength control unit 241e perform operations similar to those of the boundary strength determination unit 181a, representative value derivation unit 181b, offset calculation unit 181c, threshold derivation unit 181d, and filter strength control unit 181e of the encoding device 1, respectively.
<フィルタ制御部の動作例>
次に、本実施形態に係るフィルタ制御部181及びフィルタ制御部241の動作例について説明する。フィルタ制御部181及びフィルタ制御部241は同じ動作を行うため、ここではフィルタ制御部241を例に挙げて説明する。図11は、本実施形態に係るフィルタ制御部241の動作フロー例を示す図である。
<Example of operation of the filter control unit>
Next, an example of the operation of the filter control unit 181 and the filter control unit 241 according to this embodiment will be described. Since the filter control unit 181 and the filter control unit 241 perform the same operation, the filter control unit 241 will be used as an example for the description. Fig. 11 is a diagram showing an example of the operation flow of the filter control unit 241 according to this embodiment.
図11に示すように、ステップS1において、境界強度決定部241aは、表1に示した方法により境界強度Bsを決定し、決定した境界強度Bsの値を閾値導出部241d及びフィルタ強度制御部241eに出力する。決定された境界強度Bsの値が0である場合、ステップS2以降の処理を行わずに、ブロックP及びQの境界に対するフィルタ処理を行わない。 As shown in FIG. 11, in step S1, the boundary strength determination unit 241a 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 241d and the filter strength control unit 241e. If the determined value of boundary strength Bs is 0, the processing from step S2 onwards is not performed, and filtering is not performed on the boundaries of blocks P and Q.
ステップS2において、代表値導出部241bは、ブロックP及びブロックQのそれぞれの輝度信号の代表値ypqを導出し、導出した代表値ypqをオフセット算出部241cに出力する。代表値ypqを導出する方法とては、上述した1)の方法(式(7))、又は上述した2)の方法(式(8)及び式(9))を用いる。 In step S2, the representative value derivation unit 241b derives a representative value ypq of the luminance signals of each of the blocks P and Q, and outputs the derived representative value ypq to the offset calculation unit 241c. The representative value ypq is derived using the above-mentioned method 1) (equation (7)) or the above-mentioned method 2) (equations (8) and (9)).
ステップS3において、オフセット算出部241cは、代表値導出部241bが導出した代表値ypqに基づいて、ブロックPとブロックQとの境界に対するデブロッキングフィルタ処理を制御するパラメータであるオフセット値を算出する。具体的には、オフセット算出部241cは、代表値ypqと、ブロックP及びブロックQに適用した逆転換処理に用いた転換テーブルとを用いて、上記の式(10)によりオフセット値QpOffsetを算出し、算出したオフセット値QpOffsetを閾値導出部241dに出力する。 In step S3, based on the representative value y pq derived by the representative value derivation unit 241b, the offset calculation unit 241c calculates an offset value which is a parameter that controls deblocking filter processing for the boundary between block P and block Q. Specifically, the offset calculation unit 241c calculates the offset value QpOffset according to the above equation (10) using the representative value y pq and the conversion table used in the inverse conversion processing applied to block P and block Q, and outputs the calculated offset value QpOffset to the threshold derivation unit 241d.
ステップS4において、閾値導出部241dは、ブロックPに対する逆量子化処理で用いた量子化パラメータQpPと、ブロックQに対する逆量子化処理で用いた量子化パラメータQpQと、オフセット算出部241cが算出したオフセット値QpOffsetとに基づいて、上記の式(11)により変数qPを算出する。 In step S4, the threshold derivation unit 241d calculates the variable qP using the above equation (11) 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 value QpOffset calculated by the offset calculation unit 241c.
ステップS5において、閾値導出部241dは、変数qPに基づいて、上記の式(12)及び式(13)により変数Qを算出し、算出した変数Qから表2により閾値β及びtCを導出する。 In step S5, the threshold derivation unit 241d calculates the variable Q using the above equations (12) and (13) based on the variable qP, and derives the thresholds β and tC from the calculated variable Q using Table 2.
ステップS6において、フィルタ強度制御部241eは、境界強度決定部241aが出力する境界強度Bsの値と、閾値導出部241dが出力する閾値β及びtCとに基づいて、デブロッキングフィルタ240のフィルタ強度を制御する。 In step S6, the filter strength control unit 241e controls the filter strength of the deblocking filter 240 based on the value of the boundary strength Bs output by the boundary strength determination unit 241a and the threshold β and tC output by the threshold derivation unit 241d.
このように、本実施形態に係るフィルタ制御部241は、ブロック単位で設定される一意のパラメータである量子化パラメータだけではなく、逆転換処理に用いる転換テーブルも考慮してデブロッキングフィルタ240のフィルタ強度を制御する。これにより、転換処理及び逆転換処理に起因するブロックノイズの発生に対してデブロッキングフィルタ240のフィルタ強度を制御可能になり、デブロッキングフィルタ240によるブロック歪みの低減効果を向上させることができる。 In this way, the filter control unit 241 according to this embodiment controls the filter strength of the deblocking filter 240 taking into consideration not only the quantization parameter, which is a unique parameter set on a block-by-block basis, but also the conversion table used in the inverse conversion process. This makes it possible to control the filter strength of the deblocking filter 240 in response to the occurrence of block noise caused by the conversion process and the inverse conversion process, thereby improving the effectiveness of the deblocking filter 240 in reducing block distortion.
例えば、フィルタ制御部241は、転換テーブル中の複数のバンドの中から、復号対象ブロック及び隣接ブロックに対応するバンドを特定し、特定したバンドに対して割り当てられた転換後の画素値の数を示す値が小さいほど、デブロッキングフィルタ180のフィルタ強度が強くなるようにデブロッキングフィルタ240を制御する。 For example, the filter control unit 241 identifies a band corresponding to the block to be decoded and an adjacent block from among multiple bands in the conversion table, and controls the deblocking filter 240 so that the filter strength of the deblocking filter 180 increases as the value indicating the number of converted pixel values assigned to the identified band decreases.
これにより、画像に対して同一の量子化パラメータを適用する場合にも、転換テーブルの値が小さい領域については量子化誤差が大きくなり、逆に転換テーブルの値が大きい領域については量子化誤差が小さくなるという性質に着目し、転換テーブルの値が小さい領域におけるブロック境界に対して強いフィルタを適用しやすくなる。 This makes it easier to apply a strong filter to block boundaries in areas with small conversion table values, taking into account the fact that even when the same quantization parameters are applied to an image, the quantization error will be large in areas with small conversion table values, and conversely, the quantization error will be small in areas with large conversion table values.
<その他の実施形態>
上述した実施形態において、代表値導出部181b及び241bが、ブロックP及びブロックQのそれぞれの輝度信号に基づいて代表値ypqを導出する一例について説明した。しかしながら、代表値導出部181b及び241bは、ブロックPの輝度信号の代表値ypq(P)と、ブロックQの輝度信号の代表値ypq(Q)とを導出してもよい。
<Other embodiments>
In the above-described embodiment, an example has been described in which the representative value derivation units 181b and 241b derive the representative value y pq based on the luminance signals of the blocks P and Q. However, the representative value derivation units 181b and 241b may derive a representative value y pq(P) of the luminance signal of the block P and a representative value y pq(Q) of the luminance signal of the block Q.
この場合、オフセット算出部181c及び241cは、例えば次の式(25)により、代表値ypq(P)を用いてブロックPのオフセット値QpOffsetPを算出し、代表値ypq(Q)を用いてブロックQのオフセット値QpOffsetQを算出する。 In this case, the offset calculation units 181c and 241c calculate the offset value QpOffsetP of block P using the representative value ypq(P) , and calculate the offset value QpOffsetQ of block Q using the representative value ypq(Q) , for example, according to the following equation (25 ) .
QpOffsetP=log2(lmcsCW[ypq(P)>>6]/64)×6
QpOffsetQ=log2(lmcsCW[ypq(Q)>>6]/64)×6
・・・(25)
QpOffset P =log2(lmcs CW [y pq(P) >>6]/64)×6
QpOffset Q =log2(lmcs CW [y pq(Q) >>6]/64)×6
...(25)
そして、閾値導出部181d及び214dは、例えば次の式(26)により変数qPを算出する。その後の動作については、上述した実施形態と同様である。 The threshold derivation units 181d and 214d then calculate the variable qP using, for example, the following equation (26). Subsequent operations are the same as in the above-described embodiment.
qP=((QpQ+ QpOffsetQ+ QpOffsetP+QpP+1)>>1)
・・・(26)
qP=((Qp Q + QpOffset Q + QpOffset P +Qp P +1)>>1)
...(26)
符号化装置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 a computer-readable medium makes it possible to install the program on a computer. Here, the computer-readable medium on which the program is recorded may be a non-transitory recording medium. The non-transitory recording medium is not particularly limited, but may be, for example, a CD-ROM, DVD-ROM, or other recording medium.
符号化装置1が行う各処理を実行する回路を集積化し、符号化装置1を半導体集積回路(チップセット、SoC)により構成してもよい。復号装置2が行う各処理を実行する回路を集積化し、復号装置2を半導体集積回路(チップセット、SoC)により構成してもよい。 The circuits that perform each process 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 perform each process 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.
1 :符号化装置
2 :復号装置
100 :ブロック分割部
110 :転換部
111 :パラメータ導出部
112 :マッピング部
113 :スケーリング部
120 :減算部
130 :変換・量子化部
131 :変換部
132 :量子化部
140 :エントロピー符号化部
150 :逆量子化・逆変換部
151 :逆量子化部
152 :逆変換部
160 :合成部
162 :予測転換部
170 :逆転換部
171 :逆マッピング部
172 :逆スケーリング部
180 :デブロッキングフィルタ
181 :フィルタ制御部
181a :境界強度決定部
181b :代表値導出部
181c :オフセット算出部
181d :閾値導出部
181e :フィルタ強度制御部
185 :メモリ
190 :予測部
191 :インター予測部
192 :予測転換部
193 :イントラ予測部
194 :切替部
200 :エントロピー復号部
210 :逆変換部
211 :逆量子化部
212 :逆変換部
220 :合成部
230 :逆転換部
231 :逆マッピング部
232 :逆スケーリング部
240 :デブロッキングフィルタ
241 :フィルタ制御部
241a :境界強度決定部
241b :代表値導出部
241c :オフセット算出部
241d :閾値導出部
241e :フィルタ強度制御部
250 :メモリ
260 :予測部
261 :インター予測部
262 :予測転換部
264 :イントラ予測部
265 :切替部
1: Encoding device 2: Decoding device 100: Block division unit 110: Conversion unit 111: Parameter derivation unit 112: Mapping unit 113: Scaling unit 120: Subtraction unit 130: Transform/quantization unit 131: Conversion unit 132: Quantization unit 140: Entropy coding unit 150: Inverse quantization/inverse transform unit 151: Inverse quantization unit 152: Inverse transform unit 160: Synthesis unit 162: Prediction conversion unit 170: Inverse transform unit 171: Inverse mapping unit 172: Inverse scaling unit 180: Deblocking filter 181: Filter control unit 181a: Boundary strength determination unit 181b: Representative value derivation unit 181c: Offset calculation unit 181d: Threshold derivation unit 181e: Filter strength control unit 185: Memory 190: Prediction unit 191 : Inter prediction unit 192 : Prediction conversion unit 193 : Intra prediction unit 194 : Switching unit 200 : Entropy decoding unit 210 : Inverse transform unit 211 : Inverse quantization unit 212 : Inverse transform unit 220 : Synthesis unit 230 : Inverse transform unit 231 : Inverse mapping unit 232 : Inverse scaling unit 240 : Deblocking filter 241 : Filter control unit 241 a : Boundary strength determination unit 241 b : Representative value derivation unit 241 c : Offset calculation unit 241 d : Threshold derivation unit 241 e : Filter strength control unit 250 : Memory 260 : Prediction unit 261 : Inter prediction unit 262 : Prediction conversion unit 264 : Intra prediction unit 265 : Switching unit
Claims (2)
前記符号化ストリームを復号することで、復号対象ブロックに対応する変換係数を出力するエントロピー復号部と、
前記エントロピー復号部が出力する変換係数に対して逆量子化処理及び逆変換処理を行って予測残差を復元する逆量子化・逆変換部と、
前記復元した予測残差と前記復号対象ブロックを予測して生成した予測ブロックとを合成して合成ブロックを生成する合成部と、
前記生成した合成ブロック内の各画素値に対して転換テーブルに基づいて前記画素値に対するマッピング処理を行うマッピング部と、
復元した前記復号対象ブロックと当該復号対象ブロックに隣接する隣接ブロックとの境界に対するフィルタ処理を行うデブロッキングフィルタと、
前記逆量子化処理で用いた量子化パラメータと前記マッピング処理後の画素値に関する値とに基づいて、前記デブロッキングフィルタのフィルタ強度を制御するフィルタ制御部
と、を備え、
前記転換テーブルは、転換対象の画素値を異なる画素値に転換するためのテーブルである
復号装置。 A decoding device that decodes an encoded stream in units of blocks generated by dividing an image,
an entropy decoding unit that decodes the coded stream to output transform coefficients corresponding to a block to be decoded;
an inverse quantization and inverse transform unit that performs inverse quantization and inverse transform on the transform coefficients output by the entropy decoding unit to restore prediction residuals;
a synthesis unit that synthesizes the reconstructed prediction residual and a prediction block generated by predicting the current block to be decoded to generate a synthesis block;
a mapping unit that performs a mapping process on each pixel value in the generated composite block based on a conversion table;
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 used in the inverse quantization process and a value related to a pixel value after the mapping process,
The conversion table is a table for converting a pixel value to be converted into a different pixel value.
前記符号化ストリームを復号することで、復号対象ブロックに対応する変換係数を出力するステップと、
前記出力した変換係数に対して逆量子化処理及び逆変換処理を行って予測残差を復元するステップと、
前記復元した予測残差と前記復号対象ブロックを予測して生成した予測ブロックとを合成して合成ブロックを生成するステップと、
前記生成した合成ブロック内の各画素値に対して転換テーブルに基づいて前記画素値に対するマッピング処理を行うステップと、
復元した前記復号対象ブロックと当該復号対象ブロックに隣接する隣接ブロックとの境界に対するフィルタ処理を行うステップと、
前記逆量子化処理で用いた量子化パラメータと前記マッピング処理後の画素値に関する値とに基づいて、前記フィルタ処理に用いるデブロッキングフィルタのフィルタ強度を制
御するステップと、を備え、
前記転換テーブルは、転換対象の画素値を異なる画素値に転換するためのテーブルである
復号方法。 A decoding method for decoding an encoded stream in units of blocks generated by dividing an image, comprising:
decoding the coded stream to output transform coefficients corresponding to a block to be decoded;
performing inverse quantization and inverse transform processing on the output transform coefficients to restore a prediction residual;
generating a composite block by combining the reconstructed prediction residual with a prediction block generated by predicting the current block;
performing a mapping process on each pixel value in the generated composite block based on a conversion table;
a step of performing a filtering process on a boundary between the restored decoding target block and an adjacent block adjacent to the decoding target block;
controlling a filter strength of a deblocking filter used in the filtering process based on a quantization parameter used in the inverse quantization process and a value related to a pixel value after the mapping process;
The conversion table is a table for converting a pixel value to be converted into a different pixel value.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2024096244A JP7796810B2 (en) | 2019-09-20 | 2024-06-13 | Decoding device and decoding method |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2019172328A JP7505869B2 (en) | 2019-09-20 | 2019-09-20 | Encoding device, decoding device, and program |
| JP2024096244A JP7796810B2 (en) | 2019-09-20 | 2024-06-13 | Decoding device and decoding method |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2019172328A Division JP7505869B2 (en) | 2019-09-20 | 2019-09-20 | Encoding device, decoding device, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2024107426A JP2024107426A (en) | 2024-08-08 |
| JP7796810B2 true JP7796810B2 (en) | 2026-01-09 |
Family
ID=75156506
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2019172328A Active JP7505869B2 (en) | 2019-09-20 | 2019-09-20 | Encoding device, decoding device, and program |
| JP2024096244A Active JP7796810B2 (en) | 2019-09-20 | 2024-06-13 | Decoding device and decoding method |
Family Applications Before (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2019172328A Active JP7505869B2 (en) | 2019-09-20 | 2019-09-20 | Encoding device, decoding device, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (2) | JP7505869B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7505869B2 (en) * | 2019-09-20 | 2024-06-25 | 日本放送協会 | Encoding device, decoding device, and program |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2019521555A (en) | 2016-05-13 | 2019-07-25 | インターデジタル ヴイシー ホールディングス, インコーポレイテッド | Method and apparatus for decoding a block of intra-predicted pictures and corresponding coding method and apparatus |
| JP2022533074A (en) | 2019-05-11 | 2022-07-21 | 北京字節跳動網絡技術有限公司 | Deblocking filter for video coding |
| JP2022538668A (en) | 2019-06-28 | 2022-09-05 | バイトダンス インコーポレイテッド | Quantization Parameter Modification Technique in Transform Skip Mode |
| JP7505869B2 (en) | 2019-09-20 | 2024-06-25 | 日本放送協会 | Encoding device, decoding device, and program |
-
2019
- 2019-09-20 JP JP2019172328A patent/JP7505869B2/en active Active
-
2024
- 2024-06-13 JP JP2024096244A patent/JP7796810B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2019521555A (en) | 2016-05-13 | 2019-07-25 | インターデジタル ヴイシー ホールディングス, インコーポレイテッド | Method and apparatus for decoding a block of intra-predicted pictures and corresponding coding method and apparatus |
| JP2022533074A (en) | 2019-05-11 | 2022-07-21 | 北京字節跳動網絡技術有限公司 | Deblocking filter for video coding |
| JP2022538668A (en) | 2019-06-28 | 2022-09-05 | バイトダンス インコーポレイテッド | Quantization Parameter Modification Technique in Transform Skip Mode |
| JP7505869B2 (en) | 2019-09-20 | 2024-06-25 | 日本放送協会 | Encoding device, decoding device, and program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2024107426A (en) | 2024-08-08 |
| JP2021052249A (en) | 2021-04-01 |
| JP7505869B2 (en) | 2024-06-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12137254B2 (en) | Encoding device, decoding device and program | |
| KR20240161067A (en) | Filtering method and apparatus | |
| JP7796810B2 (en) | Decoding device and decoding method | |
| US20230122782A1 (en) | Image encoding apparatus, image encoding method, image decoding apparatus, image decoding method, and non-transitory computer-readable storage medium | |
| US20250097419A1 (en) | Encoding device, decoding device and program | |
| JP2025124883A (en) | Deblocking filter device, decoding device, and program | |
| US11991356B2 (en) | Deblocking filter control device and program | |
| JP7544722B2 (en) | Encoding 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: 20240613 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20250708 |
|
| A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20250908 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20251031 |
|
| 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: 20251125 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20251223 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7796810 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |