Image decoding device, image decoding method, and program
By introducing a quantization parameter derivation unit into the image decoding device, correcting and ensuring that the value of the quantization parameter is "0" or more, the problem that the quantization parameter may be negative in the prior art is solved, and the stability and efficiency of the decoding process are improved.
Patent Information
- Application Number
- CN202411883441.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-12-26
- Filing Date
- 2020-12-04
- Publication Date
- 2025-02-14
AI Technical Summary
The values of the decoded quantization parameters in the prior art may be negative, resulting in stability and efficiency problems during the decoding process.
By introducing a quantization parameter derivation unit in the image decoding device, the value of the quantization parameter is corrected according to whether an adaptive color transformation is applied to the target block, and it is ensured that it is always the larger of the predetermined values of "0" or more.
It ensures that the value of the quantization parameter is always above "0", avoids the problems of negative values, and improves the stability and efficiency of the decoding process.
Smart Images

Figure CN119450047A_ABST
Abstract
Description
[0001] This application is a divisional application of an application with a filing date of December 4, 2020, application number 202080058476.4, and invention name “Image decoding device, image decoding method and program”. Technical Field
[0002] The present invention relates to an image decoding device, an image decoding method and a program. Background Art
[0003] Non-Patent Document 1 discloses a method for decoding a quantization parameter used in inverse quantization.
[0004] Prior art literature
[0005] Non-patent literature
[0006] Non-patent document 1: Versatile Video Coding (Draft 7), JVET-N2001 Summary of the invention
[0007] Problems to be solved by the invention
[0008] However, the inventors of the present application have discovered the following problem in Non-Patent Document 1: the value of the decoded quantization parameter may be a negative value.
[0009] Therefore, the present invention has been made in view of the above-mentioned problems, and an object of the present invention is to provide an image decoding device, an image decoding method, and a program that can ensure that the value of the quantization parameter is always greater than "0".
[0010] Means for solving problems
[0011] The main purpose of the first feature of the present invention is an image decoding device, which has a quantization parameter derivation unit, which is configured to, after correcting the value of the decoded quantization parameter of the target block according to whether adaptive color transformation is applied to the target block, use the larger value between the value of the corrected quantization parameter and a predetermined value greater than "0" as the quantization parameter of the target block.
[0012] The main purpose of the second feature of the present invention is an image decoding method, which has the following steps: after correcting the value of the decoded quantization parameter of the target block according to whether adaptive color transformation is applied to the target block, the larger value between the value of the corrected quantization parameter and a predetermined value greater than "0" is used as the quantization parameter of the target block.
[0013] The main purpose of the third feature of the present invention is a program, which is used in an image decoding device, which causes a computer to perform the following steps: after correcting the value of the decoded quantization parameter of the target block according to whether adaptive color transformation is applied to the target block, the larger value between the value of the corrected quantization parameter and a predetermined value greater than "0" is used as the quantization parameter of the target block.
[0014] Effects of the Invention
[0015] According to the present invention, it is possible to provide an image decoding device, an image decoding method, and a program that can ensure that the value of a quantization parameter is always equal to or greater than "0". BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 FIG. 1 is a diagram showing an example of a configuration of an image processing system 10 according to an embodiment.
[0017] Figure 2 This is a diagram showing an example of functional blocks of an image decoding device 200 according to an embodiment.
[0018] Figure 3 FIG. 1 is a diagram showing an example of functional blocks of the inverse transform and inverse quantization unit 220 of the image decoding device 200 according to one embodiment.
[0019] Figure 4 This is a flowchart showing an example of a process flow of the quantization parameter derivation unit 220A of the inverse transform and inverse quantization unit 220 of the image decoding device 200 according to one embodiment.
[0020] Figure 5 FIG. 1 is a diagram showing an example of a functional block of the intra prediction unit 242 of the image decoding device 200 according to an embodiment.
[0021] Figure 6 This is a flowchart showing an example of a decoding process flow of an intra prediction mode of a chrominance signal performed by the intra prediction mode decoding unit 242B of the intra prediction unit 242 of the image decoding device 200 according to one embodiment.
[0022] Figure 7 This is a flowchart showing an example of a process flow when BDPCM is applied to a luma CU or a chroma CU, which is performed by the prediction signal generation unit 242C of the intra prediction unit 242 of the image decoding device 200 according to one embodiment.
[0023] Figure 8 FIG. 1 is a diagram showing an example of functional blocks of the in-loop filter processing unit 250 of the image decoding device 200 according to one embodiment.
[0024] Fig. 9This is a diagram showing an example of a functional block of a deblocking filter unit 250A of the in-loop filter processing unit 250 of the image decoding device 200 according to one embodiment.
[0025] Fig.10 This is a diagram for explaining an example of a method for determining the boundary strength by the boundary strength determination unit 253A / 253B of the deblocking filter unit 250A of the in-loop filter processing unit 250 of the image decoding device 200 according to one embodiment.
[0026] Fig.11 This is a diagram for explaining weight coefficients of TPM and GEO.
[0027] Fig.12 This is a flowchart showing an example of the process flow of the filter processing unit 255A / 255B of the in-loop filter processing unit 250 of the image decoding device 200 according to one embodiment.
[0028] Fig.13 1 is a diagram showing an example of functional blocks of an adaptive loop filter unit 250C of the in-loop filter processing unit 250 of the image decoding device 200 according to one embodiment.
[0029] Fig.14 1 is a diagram showing an example of filtering processing in the Cb CC-ALF unit 257A of the adaptive loop filter unit 250C of the in-loop filter processing unit 250 of the image decoding device 200 according to one embodiment and processing at a boundary portion.
[0030] Fig.15 1 is a diagram showing an example of filtering processing in the Cb CC-ALF unit 257A of the adaptive loop filter unit 250C of the in-loop filter processing unit 250 of the image decoding device 200 according to one embodiment and processing at a boundary portion.
[0031] Fig.16 FIG. 1 is a diagram showing an example of functional blocks of an image encoding device 100 according to an embodiment.
[0032] Fig.17 FIG. 1 is a diagram showing an example of a functional block of the intra prediction unit 112 of the image encoding device 100 according to an embodiment. DETAILED DESCRIPTION
[0033] Hereinafter, the embodiments of the present invention will be described with reference to the accompanying drawings. In addition, the constituent elements in the following embodiments may be appropriately replaced with existing constituent elements, etc., and various modifications including combinations with other existing constituent elements may be performed. Therefore, the description of the following embodiments is not intended to limit the content of the invention described in the claims.
[0034] (First Embodiment)
[0035] Below, refer to Figures 1 to 17 An image processing system 10 according to a first embodiment of the present invention will be described. Figure 1 1 is a diagram showing an image processing system 10 according to the present embodiment.
[0036] like Figure 1 As shown, the image processing system 10 includes an image encoding device 100 and an image decoding device 200 .
[0037] The image encoding device 100 is configured to generate encoded data by encoding an input image signal. The image decoding device 200 is configured to generate an output image signal by decoding the encoded data.
[0038] Such coded data may be transmitted from the image coding apparatus 100 to the image decoding apparatus 200 via a transmission path. Alternatively, the coded data may be stored in a storage medium and provided from the image coding apparatus 100 to the image decoding apparatus 200.
[0039] (Image Decoding Device 200)
[0040] Below, refer to Figure 2 The image decoding device 200 according to this embodiment is described. Figure 2 This is a diagram showing an example of functional blocks of the image decoding device 200 according to the present embodiment.
[0041] like Figure 2 As shown, the image decoding device 200 includes a decoding unit 210 , an inverse transform and inverse quantization unit 220 , an adder 230 , an inter prediction unit 241 , an intra prediction unit 242 , an in-loop filter processing unit 250 , and a frame buffer 260 .
[0042] The decoding unit 210 is configured to decode the encoded data generated by the image encoding device 100 and decode the coefficient level values.
[0043] Among them, for example, decoding is decoding of entropy-coded data to which codes of different lengths are assigned based on the probability of occurrence of coefficient level values.
[0044] The decoding unit 210 may also be configured to obtain control data by decoding the encoded data.
[0045] The control data may include size data such as the coding block (CU: Coding Unit) size, the prediction block (PU: Prediction Unit) size, and the transform block (TU: Transform Unit) size.
[0046] The inverse transform and inverse quantization unit 220 is configured to perform an inverse transform process on the coefficient level values output from the decoding unit 210. The inverse transform and inverse quantization unit 220 may also be configured to perform an inverse quantization process on the coefficient level values before the inverse transform process.
[0047] In addition, the inverse transform and inverse quantization unit 220 may be configured to decode a quantization parameter (QP: Quantization Parameter) for each block as described later. The quantization parameter is a parameter that defines a quantization step size used in inverse quantization.
[0048] In addition, the inverse transform and inverse quantization unit 220 may be configured not to perform inverse transform processing on a block to which a transform skip mode (Transform Skip) described later is applied.
[0049] The adder 230 is configured to add the prediction signal and the prediction residual signal output from the inverse transform and inverse quantization section 220 to generate a pre-filtering decoded signal, and output the pre-filtering decoded signal to the intra prediction section 242 and the in-loop filter processing section 250 .
[0050] Among them, the decoded signal before filtering constitutes a reference block used in the intra prediction unit 242.
[0051] The inter-frame prediction unit 241 is configured to generate a prediction signal through inter-frame prediction.
[0052] Specifically, the inter prediction section 241 is configured to generate a prediction signal for each prediction block based on a motion vector decoded from the encoded data and a reference signal included in a reference frame. The inter prediction section 241 is configured to output the prediction signal to the adder 230 .
[0053] The inter prediction unit 241 may include a plurality of modes as specific methods of inter prediction. For example, the inter prediction unit 241 may include a TPM (Triangle Partition Mode) or a GEO (Geometrical Partitioning) mode described later.
[0054] The intra prediction unit 242 is configured to generate a prediction signal by intra-frame prediction.
[0055] Specifically, the intra prediction unit 242 is configured to determine a reference block included in the target frame, and generate a prediction signal for each prediction block based on the determined reference block. The intra prediction unit 242 is configured to output the prediction signal to the adder 230 .
[0056] The in-loop filter processing unit 250 is configured to perform a filter process on the decoded signal before filtering output from the adder 230 , and output the decoded signal after filtering to the frame buffer 260 .
[0057] The in-loop filtering process may be composed of a plurality of filtering processes. For example, the filtering process is a deblocking filtering process for reducing distortion generated at the boundary portion of a block (coding block, prediction block, transform block, or sub-blocks divided therefrom), or an adaptive loop filtering process for switching filters based on filter coefficients transmitted from the image encoding device 100, filter selection information, local characteristics of an image pattern, and the like.
[0058] The frame buffer 260 is configured to accumulate reference frames used in the inter prediction section 241 .
[0059] The decoded signal after filtering constitutes a reference frame used in the inter-frame prediction unit 241 .
[0060] (Inverse Transformation and Inverse Quantization Unit 220)
[0061] Below, refer to Figure 3 The inverse transform and inverse quantization unit 220 of this embodiment will be described. Figure 3 FIG. 1 is a diagram showing an example of functional blocks of the inverse transform and inverse quantization unit 220 of the image decoding device 200 according to the present embodiment.
[0062] like Figure 3 As shown, the inverse transform and inverse quantization unit 220 includes a quantization parameter derivation unit 220A, an inverse quantization unit 220B, and an inverse transform unit 220C.
[0063] The quantization parameter derivation unit 220A is configured to receive the control data as input, decode the quantization parameter for each block, and output the decoded quantization parameter to the inverse quantization unit 220B.
[0064] Specifically, the quantization parameter derivation unit 220A is configured to, after correcting the decoded quantization parameter value of the target block according to whether adaptive color transform is applied to the target block, use the larger value between the corrected quantization parameter value and a predetermined value greater than "0" as the quantization parameter of the target block.
[0065] For example, the quantization parameter deriving unit 220A may be configured to, after correcting the decoded quantization parameter value of the target block according to whether adaptive color transform is applied to the target block, use the larger value of the corrected quantization parameter value and "0" as the quantization parameter of the target block.
[0066] Alternatively, the quantization parameter derivation unit 220A may be configured to, when a transform skip mode is not applied to the target block, after correcting the value of the decoded quantization parameter of the target block according to whether an adaptive color transform is applied to the target block, use the larger value between the corrected quantization parameter value and "0" as the quantization parameter of the target block.
[0067] Alternatively, the quantization parameter derivation unit 220A may be configured to, when a transform skip mode is applied to a target block, set the value of the quantization parameter of the target block to be greater than the minimum value of the quantization parameter when the transform skip mode is applied, regardless of whether adaptive color transform is applied to the target block.
[0068] Alternatively, the quantization parameter derivation unit 220A may be configured to, when a transform skip mode is applied to the target block, after correcting the value of the decoded quantization parameter according to whether an adaptive color transform is applied to the target block, use the larger value of the corrected quantization parameter and the minimum value of the quantization parameter when the transform skip mode is applied as the quantization parameter of the target block.
[0069] Alternatively, the quantization parameter deriving unit 220A may be configured to, when transform skip mode is applied to the target block, set the value of the quantization parameter of the target block to “4” or more regardless of whether adaptive color transform is applied to the target block.
[0070] Alternatively, the quantization parameter derivation unit 220A may be configured to, when a transform skip mode is applied to the target block, after correcting the value of the decoded quantization parameter of the target block according to whether an adaptive color transform is applied to the target block, use the larger value between the corrected quantization parameter value and "4" as the quantization parameter of the target block.
[0071] An example of the specific processing content of the quantization parameter derivation unit 220A will be described later.
[0072] The inverse quantization unit 220B is configured to perform inverse quantization processing on the quantization parameter and the coefficient level value output from the decoding unit 210 as input, and output the inverse quantized coefficient level value. The specific processing of the inverse quantization unit 220B can use a well-known method, so the description is omitted.
[0073] The inverse transform unit 220C is configured to perform inverse transform processing on the coefficient level value after inverse quantization processing output by the inverse quantization unit 220B as input, and output a residual signal. In addition, the specific processing of the inverse transform unit 220C can use a well-known method, so the description is omitted.
[0074] Furthermore, when the transform skip mode (Transform Skip) is applied to the block, the processing of the inverse transform unit 220C may not be performed, and the output of the inverse quantization unit 220B may be used as the output of the inverse transform and inverse quantization unit 220. Whether the transform skip is applied to the block can be determined by checking the value of transform_skip_flag in Non-Patent Document 1, for example.
[0075] Figure 4 2 is a flowchart showing an example of the processing flow of the quantization parameter derivation unit 220A. Figure 4 An example of the process performed by the quantization parameter derivation unit 220A according to the present embodiment will be described.
[0076] like Figure 4 As shown, in step S41, the quantization parameter derivation unit 220A derives the value of the variable QpY. QpY can be calculated by the following equation, for example, similar to Non-Patent Document 1.
[0077] QpY=((qP Y_PRED +CuQpDeltaVal+64+2×QpBdOffset)%
[0078] (64+QpBdOffset))-QpBdOffset…(Formula 1)
[0079] Among them, qP Y_PRED It is a prediction value calculated from surrounding blocks. In addition, CuQpDeltaVal is a value indicating the difference between QpY of an adjacent block and QpY of a target block, and is obtained by decoding a value transmitted from the image encoding device 100 by the decoding section 210. QpBdOffset is a positive value set according to the internal bit depth of a pixel value.
[0080] As a specific calculation method of these variables, for example, the method described in Non-Patent Document 1 can be used.
[0081] The "+64+2×QpBdOffset" portion in the above (Formula 1) is added to ensure that the portion before the operator % is greater than or equal to "0", and the minimum value of the QpY value calculated by (Formula 1) is "-QpBdOffset".
[0082] In step S42, the quantization parameter derivation unit 220A calculates Qp'Y, which is a quantization parameter value of the luminance signal. For example, the quantization parameter derivation unit 220A may calculate Qp'Y by the following (Formula 2) similarly to Non-Patent Document 1.
[0083] Qp'Y=QpY+QpBdOffset…(Formula 2)
[0084] As described above, the minimum value of QpY is "-QpBdOffset", and therefore the minimum value of Qp'Y is "0".
[0085] In step S43 , the quantization parameter derivation unit 220A calculates the quantization parameter values of the chrominance signal, namely, Qp′Cb, Qp′Cr, and Cp′CbCr.
[0086] In addition, in fact, when using the Cb signal, Cr signal, and Joint Chroma Coding functions, quantization parameters Qp'Cb, Qp'Cr, and Cp'CbCr are defined respectively, and the calculation methods are basically the same. Therefore, the following summary only describes the calculation method of parameter Qp'Cb, and omits the description of the other two parameters.
[0087] For example, the quantization parameter derivation unit 220A may calculate Qp'Cb by the following (Formula 3) similarly to Non-Patent Document 1.
[0088] Qp'Cb=Clip3(-QpBdOffset, 63, qPcb+pps_cb_qp_offset+slice_cb_qp_offset+CuQpOffsetCb)+QpBdOffset...(Formula 3)
[0089] Here, qPcb is a parameter calculated using the above-mentioned QpY. pps_cb_qp_offset is a value specified by PPS (Picture Parameter Set). slice_cb_qp_offset is a value specified by Slice Header. CuQpOffsetCb is obtained by decoding the value transmitted from the image encoding device 100 by the decoding unit 210 .
[0090] As a specific calculation method of these parameters, for example, the method described in Non-Patent Document 1 can be used.
[0091] "Clip3 (min, max, val)" in the above (Formula 3) is a function that returns the value of "min" when the value of the variable val is less than the variable min, returns the value of "max" when the value of the variable val is greater than the variable max, and directly returns the value of "val" in other cases. Therefore, the minimum value of the first term on the right side of (Formula 3) is "-QpBdOffset", and in the second term on the right side of (Formula 3), the value of the first term on the right side of (Formula 3) is added to "QpBdOffset", so the minimum value of Qp'Cb is "0".
[0092] The above-described method for deriving Qp'Y, Qp'Cb, Qp'Cr, and Cp'CbCr is merely an example, and may be derived by a method other than the above-described method as long as the minimum value of each value is "0".
[0093] In step S44 , the quantization parameter derivation unit 220A corrects the quantization parameter Qp′Y of the luminance signal and the quantization parameters Qp′Cb, Qp′Cr, and Cp′CbCr of the chrominance signal calculated as described above as follows.
[0094] First, consider the variable qP obtained by substituting Qp'Y, Qp'Cb, Qp'Cr, and Cp'CbCr respectively.
[0095] When transform skip is not applied to the color signal (Y, Cb, Cr or CbCr) of the target block (for example, when the value of transform_skip_flag is "0"), the quantization parameter derivation unit 220A performs correction as shown in the following (Formula 4) and (Formula 5).
[0096] qP=qP-(cu_act_enabled_flag? offset: 0)...(Formula 4)
[0097] qP=Max(0,qP)…(Formula 5)
[0098] Here, cup_act_enabled_flag is a flag indicating whether adaptive color transform (ACT) is applied to the target block, and offset is a positive integer. In addition, Max(a, b) is a function that returns the same value as the larger value of two variables a and b.
[0099] In addition, when Transform Skip is applied to the target block (for example, when the value of transform_skip_flag is "1"), the quantization parameter derivation unit 220A performs correction as shown in the following (Equation 6).
[0100] qP=Max(QpPrimeTsMin, qP-(cu_act_enabled_flag? offset: 0))…(Formula 6)
[0101] Among them, QpPrimeTsMin is a variable that defines the minimum value of the quantization parameter in the block to which Transform Skip is applied.
[0102] In addition, when Transform Skip is applied to the target block (for example, when the value of transform_skip_flag is "1"), the quantization parameter derivation unit 220A may perform correction as shown in the following (Equation 7) and (Equation 8).
[0103] qP=Max(QpPrimeTsMin, qP)-(cu_act_enabled_flag? offset: 0))…(Formula 7)
[0104] qP=Max(4,qP)…(Formula 8)
[0105] In addition, the quantization parameter derivation unit 220A may switch the value of the variable offset in the above-mentioned (Formula 4), (Formula 6), and (Formula 7) for each color signal.
[0106] For example, the quantization parameter derivation unit 220A can be set to "offset=5" in the case of the Y signal and the Cb signal (equivalent to the Cg signal when ACT is applied) (for example, when the value of cIdx in non-patent document 1 is "0" or "1"), and can be set to "offset=3" in the case of the Cr signal (equivalent to the Co signal when ACT is applied) (for example, when the value of cIdx in non-patent document 1 is "2").
[0107] By correcting the value of the quantization parameter as described above, it is possible to ensure that the value of the quantization parameter of all blocks is “0” or more.
[0108] In addition, when the Transform Skip mode is applied to the target block, for example, by performing correction as in the above-mentioned (Equation 6), it is possible to ensure that the value of the quantization parameter is greater than or equal to “QpPrimeTsMin”.
[0109] By adopting this structure, regardless of whether adaptive color transform is applied or not, the minimum value of the quantization parameter in the block to which TransformSkip is applied can be unified.
[0110] In addition, when Transform Skip is applied to the target block, for example, by performing correction as in (Formula 7) and (Formula 8), it is possible to ensure that the value of the quantization parameter is greater than "4". When "QP = 4" is applied in the Transform Skip mode, the quantization step size is "1", and lossless decoding can be performed, so it is possible to prevent the value of the quantization parameter from being reduced unnecessarily by adopting this structure.
[0111] The quantization parameter correction process described as step S45 can also be performed as shown in the following (Equation 9) and (Equation 10) in steps S42 and S43, respectively.
[0112] Qp'Y=Max(MinVal, QpY+QpBdOffset-(cu_act_enabled_flag? offset: 0))...(Formula 9)
[0113] Qp'Cb=Clip3(-QpBdOffset+MinVal, 63, qPcb+pps_cb_qp_offset+slice_cb_qp_offset+CuQpOffsetCb)+QpBdOffset...(Formula 10)
[0114] Among them, MinVal is "0" when Transform Skip is not applied to the target block, and is "QpPrimeTsMin" when Transform Skip is applied to the target block.
[0115] By adopting the above structure, it is possible to ensure that the value of the quantization parameter is always greater than "0" regardless of whether the adaptive color transform is applied or not. For example, in non-patent document 1, the value of the quantization parameter is used to perform remainder calculation, and the dividend is required to be greater than "0", so that the stability of the calculation can be ensured.
[0116] Furthermore, by adopting the above configuration, regardless of whether adaptive color transform is applied or not, it is possible to ensure that the quantization parameter value is equal to or greater than “QpPrimeTsMin” in the block to which Transform Skip is applied.
[0117] When "QP=4" is applied to Transform Skip, the quantization step size is "1", and lossless decoding is possible. Therefore, after defining "QpPrimeTsMin=4", if the above processing is performed, it is possible to prevent the quantization parameter from being unnecessarily reduced in the Transform Skip application block.
[0118] As described above, the quantization parameter value corresponding to each color signal can be calculated for each block.
[0119] (Intra-frame prediction unit 242)
[0120] Below, refer to Figure 5 The intra prediction unit 242 of this embodiment will be described. Figure 5 FIG. 1 is a diagram showing an example of functional blocks of the intra prediction unit 242 of the image decoding device 200 according to the present embodiment.
[0121] like Figure 5 As shown, the intra prediction unit 242 includes an intra prediction mode decoding unit 242B and a prediction signal generating unit 242C.
[0122] The intra prediction section 242 is an example of a prediction section, and is configured to generate a prediction signal by intra-frame prediction.
[0123] The intra prediction mode decoding unit 242B is configured to decode information necessary for performing intra prediction for each block.
[0124] Figure 6 1 is a flowchart showing an example of a decoding process flow of the intra-frame prediction mode of the chrominance signal by the intra-frame prediction mode decoding unit 242B. Figure 6 An example of a decoding process flow of the intra prediction mode of the chrominance signal by the intra prediction mode decoding unit 242B is described.
[0125] In step S601 , the intra prediction mode decoding unit 242B determines whether or not predetermined condition 1 is satisfied.
[0126] Such prescribed condition 1 may include the following condition: the width of the target CU is equal to or smaller than the maximum size when Transform Skip is applied (for example, MaxTsSize in Non-Patent Document 1).
[0127] In addition, such a predetermined condition 1 may also include the following condition: the height of the target CU is less than or equal to the maximum size when TransformSkip is applied (for example, MaxTsSize in Non-Patent Document 1).
[0128] The intra prediction mode decoding unit 242B may set the width and height of the CU to the actual CU size (width / height) of the chrominance signal corresponding to the sampling ratio of the chrominance signal. For example, in the case of YUV4:2:0 sampling, the CU size (width / height) of the chrominance signal is halved compared to that of the luminance signal.
[0129] In addition, such a predetermined condition 1 may include a condition that BDPCM (Block DPCM) is valid in the SPS (Sequence Parameter Set) (for example, the value of sps_bdpcm_chroma_enabled_flag is greater than "0").
[0130] When all the prescribed conditions 1 are satisfied, the present action proceeds to step S602 , and when any one of the prescribed conditions 1 is not satisfied, the present action proceeds to step S603 .
[0131] In step S602, the intra prediction mode decoding unit 242B decodes intra_bdpcm_chroma_flag. When intra_bdpcm_chroma_flag is "1", it means that BDPCM is applied to the target chroma CU, and when such intra_bdpcm_chroma_flag is "0", it means that BDPCM is not applied.
[0132] In step S603 , the intra prediction mode decoding unit 242B determines whether the value of intra_bdpcm_chroma_flag is greater than “0”.
[0133] If it is determined that the value of intra_bdpcm_chroma_flag is greater than "0", the operation proceeds to step S608, otherwise the operation proceeds to step S604. If the above-mentioned condition 1 is not satisfied and the processing of step S602 is skipped, the intra prediction mode decoding unit 242B regards the value of intra_bdpcm_chroma_flag as "0".
[0134] In step S608, the intra prediction mode decoding unit 242B decodes intra_bdpcm_chroma_dir_flag. intra_bdpcm_chroma_dir_flag indicates whether prediction is performed in the vertical direction or in the horizontal direction when BDPCM is applied to the target chroma CU. After the processing of step S608 is completed, the operation proceeds to step S610 and the processing is completed.
[0135] In step S604, the intra prediction mode decoding unit 242B determines whether or not predetermined condition 2 is satisfied.
[0136] The prescribed condition 2 may include a condition that CCLM (Chroma Linear Prediction) can be used in the target chroma CU.
[0137] If it is determined that the specified condition 2 is satisfied, the action proceeds to step S605; otherwise, the action proceeds to step S606.
[0138] In step S605, the intra prediction mode decoding unit 242B decodes ccm_mode_flag. When ccm_mode_flag is "1", it means that CCLM is applied to the target chroma CU, and when ccm_mode_flag is "0", it means that CCLM is not applied.
[0139] In step S606 , the intra prediction mode decoding unit 242B determines whether the value of ccm_mode_flag is greater than “0”.
[0140] If the value of cclm_mode_flag is greater than "0", the operation proceeds to step S609, otherwise the operation proceeds to step S607. If the predetermined condition 2 is not satisfied and the process of step S605 is skipped, the intra prediction mode decoding unit 242B regards the value of cclm_mode_flag as "0".
[0141] In step S609, the intra prediction mode decoding unit 242B decodes ccm_mode_idx. After the process of step S609 is completed, the operation proceeds to step S610 and the process is terminated.
[0142] In step S607, the intra prediction mode decoding unit 242B decodes the normal intra prediction mode (intra_chroma_pred_mode). After the processing of step S607 is completed, the operation proceeds to step S610 and the processing is terminated.
[0143] As described above, the intra-frame prediction mode decoding unit 242B is configured to decode information related to the prediction direction of BDPCM when BDPCM is applied to the chroma block, and to decode information related to CCLM or the usual intra-frame prediction mode when BDPCM is not applied to the chroma block, thereby ensuring that BDPCM, CCLM, or the usual intra-frame prediction mode can be appropriately selected for each block.
[0144] In addition, as described above, the intra-frame prediction mode decoding unit 242B is configured to use the size of the chroma CU in determining whether to apply the chroma BDPCM. Thus, even if the chroma sampling method changes between 4:2:0, 4:2:2, and 4:4:4, a determination corresponding to the actual size of the chroma CU can be made.
[0145] Figure 5 The prediction signal generation unit 242C shown is configured to generate a prediction signal based on the prediction mode of the processing target block decoded by the intra prediction mode decoding unit 242B. As a method of generating the prediction signal, a known method described in Non-Patent Document 1 can be used, for example.
[0146] Figure 7 1 is a flowchart showing an example of a process flow when the prediction signal generation unit 242C applies BDPCM to a luma CU or a chroma CU. Figure 7 An example of such a processing flow will be described.
[0147] In step S71 , the prediction signal generation unit 242C determines whether or not the predetermined condition 3 is satisfied.
[0148] The prescribed condition 3 may include the following condition: filtering of reference pixels used in prediction of BDPCM is effective.
[0149] For example, by setting a flag for controlling the validity / invalidity of reference pixel filtering in BDPCM headers such as SPS (Sequence Parameter Set), PPS (Picture Parameter Set), Picture Header, and Slice Header, it is possible to switch the validity / invalidity of the filtering.
[0150] In addition, the specified condition 3 may also include the following condition: in the slice to which the target CU belongs, coding tools such as Palette Mode and other screen content-oriented coding tools are invalid.
[0151] Whether the encoding tools for screen content such as Palette Mode are valid or invalid can also be determined by confirming the value of a flag, for example. This flag controls the validity / invalidity of Palette Mode contained in headers such as SPS, PPS, Picture Header, and Slice Header.
[0152] If it is determined that the specified condition 3 is satisfied, the operation proceeds to step S72 ; otherwise, the operation proceeds to step S73 .
[0153] In step S72 , the prediction signal generation unit 242C performs a filter process for smoothing the reference pixels used for prediction.
[0154] For example, in the case of a chrominance signal, the prediction signal generation unit 242C can determine the reference pixel position used for prediction based on the value of intra_bdpcm_chroma_dir_flag. In the case of a luma signal, the prediction signal generation unit 242C can also determine the reference pixel position used for prediction based on the same information.
[0155] The filtering process can be performed, for example, by convolving a linear filter whose coefficient weights are {1 / 4, 2 / 4, 1 / 4}. After such filtering process is completed, the operation proceeds to step S73.
[0156] In step S73 , the prediction signal generation unit 242C generates a prediction value using the reference pixels smoothed in step S72 or the reference pixels not smoothed.
[0157] As the details of the prediction value generation process, a known method can be used, so a detailed description is omitted. After the prediction value generation process is completed, the operation proceeds to step S74 and the process ends.
[0158] As described above, the intra-frame prediction unit 242 includes a prediction signal generating unit 242C, which is pre-configured to smooth the reference pixels used in the prediction value generation before the prediction value generation process based on BDPCM. Thus, even when noise such as camera noise is superimposed on the reference pixels, the effect of reducing such noise can be foreseen, and the prediction accuracy can be improved to improve the encoding efficiency.
[0159] In addition, as described above, the intra-frame prediction unit 242 includes a prediction signal generating unit 242C, which is pre-configured to control whether to perform smoothing processing on the reference pixels used in the prediction value generation according to the value of a flag that controls the validity / invalidity of the reference pixel filtering at the time of BDPCM contained in the header before the prediction value generation processing based on BDPCM. Thus, by smoothing the video captured by the camera for which smoothing is considered to be effective and not smoothing the screen content for which smoothing is considered not to be necessary, it is possible to prevent an unexpected decrease in the encoding efficiency.
[0160] In addition, as described above, the intra-frame prediction unit 242 includes a prediction signal generating unit 242C, which is pre-configured to control whether to perform smoothing processing on the reference pixels used in the prediction value generation according to whether the encoding tool for the screen content is effective or not before the prediction value generation processing based on BDPCM. Thus, by smoothing the video captured by the camera for which smoothing is effective and not smoothing the screen content that does not need to be smoothed, it is possible to prevent an unexpected decrease in the encoding efficiency.
[0161] (In-loop filter processing unit 250)
[0162] Below, refer to Figure 8 The in-loop filter processing unit 250 of this embodiment will be described. Figure 8 1 is a diagram showing an example of functional blocks of the in-loop filter processing unit 250 of the image decoding device 200 according to the present embodiment.
[0163] like Figure 8 As shown, the in-loop filter processing unit 250 includes a deblocking filter unit 250A, an SAO unit 250B, and an adaptive loop filter unit 250C.
[0164] The SAO unit 250B is configured to perform a sample adaptive offset (SAO: Simple Adaptive Offset) process. As the SAO unit 250B, a well-known process can be used, and thus the description of the specific process content is omitted.
[0165] also, Figure 8 The structure shown is only an example. The processing order of each loop filter can be changed. In addition, it is also possible to omit Figure 8 The structure of a part of the loop filtering process shown in FIG. In addition, it is also possible to add Figure 8 The loop filtering process is not shown in FIG.
[0166] Hereinafter, an example of the processing contents of the deblocking filter unit 250A and the adaptive loop filter unit 250C will be described.
[0167] like Fig. 9 As shown, the deblocking filter unit 250A includes a block boundary detection unit 251 (251A / 251B), a boundary strength determination unit 253 (253A / 253B), a filter determination unit 254 (254A / 254B) and a filter processing unit 255 (255A / 255B).
[0168] Among them, the structure with "A" added at the end is a structure related to the deblocking filtering processing of the block boundary in the vertical direction, and the structure with "B" added at the end is a structure related to the deblocking filtering processing of the block boundary in the horizontal direction.
[0169] Hereinafter, an example in which the deblocking filtering process for the block boundary in the vertical direction is performed and then the deblocking filtering process for the block boundary in the horizontal direction is performed will be described.
[0170] As described above, the deblocking filter process can be applied to a coding block, a prediction block, or a transform block. In addition, the deblocking filter process can also be applied to sub-blocks obtained by dividing the above blocks. That is, the target block and the adjacent block can be a coding block, a prediction block, a transform block, or sub-blocks obtained by dividing them.
[0171] In the case where deblocking filtering is applied to a sub-block, blocks in the following description may be appropriately replaced with sub-blocks.
[0172] Since the deblocking filtering process for the block boundary in the vertical direction and the deblocking filtering process for the block boundary in the horizontal direction are the same process, the deblocking filtering process for the block boundary in the vertical direction will be described below.
[0173] The block boundary detection unit 251A is configured to detect a boundary between two adjacent blocks (block boundary) based on control data indicating a block size.
[0174] The block is a coding block (CU), a prediction block (PU), and a transform block (TU). As a specific detection method, a known method can be applied, so a detailed description is omitted.
[0175] The boundary strength determination unit 253A is configured to determine the boundary strength of the block boundary between the target block and the adjacent block.
[0176] In addition, the boundary strength determination unit 253A may be configured to determine the boundary strength of the block boundary based on control data indicating whether the target block and the adjacent block are intra-prediction blocks.
[0177] For example, Fig.10 As shown, the boundary strength determination unit 253A may also be configured to determine that the boundary strength of the block boundary is "0" when at least one of the target block and the adjacent block is a lossless block.
[0178] The lossless block may be defined as a block to which Transform Skip is applied and the value of the quantization parameter is below a predetermined threshold (first threshold).
[0179] Alternatively, the lossless block may also be defined as a block to which Transform Skip is applied and the value of the quantization parameter is equal to the first threshold.
[0180] For example, such a first threshold value may be set to the minimum value of the quantization parameter in the transform skip mode (the above-mentioned QpPrimeTsMin). In addition, for example, such a first threshold value may be set to "4".
[0181] Alternatively, a lossless block may be defined as a block whose quantization parameter value is below a first threshold value, regardless of whether Transform Skip is applied or not. For example, such a first threshold value may be set to the minimum value of the quantization parameter in the transform skip mode (the above-mentioned QpPrimeTsMin). For example, such a threshold value may be set to "4".
[0182] For example, Fig.10 As shown, the boundary strength determination unit 253A may be configured to determine that the boundary strength of such a block boundary is "0" when the block boundary is a sub-block boundary, affine motion compensation prediction is applied to the target CU, and PROF is valid in the Picture Header.
[0183] For example, Fig.10 As shown, the boundary strength determination unit 253A may also be configured to determine that the boundary strength of such a block boundary is "2" when at least any one of the target block and the adjacent block is an intra-frame prediction block (i.e., when at least any one of the blocks on both sides of the block boundary is an intra-frame prediction block).
[0184] In addition, the boundary strength determination unit 253A can also be configured to determine the boundary strength of such a block boundary based on control data, wherein the control data indicates whether the target block and the adjacent block contain non-zero (zero) orthogonal transform coefficients, and whether the block boundary is a transform block boundary (TU boundary).
[0185] For example, Fig.10 As shown, the boundary strength determination unit 253A may also be configured to determine that the boundary strength of such a block boundary is "1" when at least any one of the target block and the adjacent block contains a non-zero orthogonal transform coefficient and the block boundary is a boundary of the transform block (i.e., when at least any one of the blocks on both sides of the block boundary contains a non-zero transform coefficient and is a TU boundary).
[0186] In addition, the boundary strength determination unit 253A may be configured to determine the boundary strength of such a block boundary based on control data indicating whether the absolute value of the difference between the motion vectors of the target block and the adjacent block is greater than a threshold value (e.g., 1 / 2 pixel).
[0187] For example, Fig.10 As shown, the boundary strength determination unit 253A may also be configured to determine that the boundary strength of such a block boundary is "1" when the absolute value of the difference between the motion vectors of the target block and the adjacent block is greater than a threshold value (e.g., 1 / 2 pixel) (i.e., when the absolute value of the difference between the motion vectors of the blocks on both sides of the block boundary is greater than a threshold value (e.g., 1 / 2 pixel)).
[0188] In addition, the boundary strength determination unit 253A may be configured to determine the boundary strength of such a block boundary based on control data indicating whether the reference blocks referred to in the prediction of the motion vectors of the target block and the adjacent block are different.
[0189] For example, Fig.10 As shown, the boundary strength determination unit 253A may also be configured to determine that the boundary strength of such a block boundary is "1" when the reference blocks referenced in the prediction of the motion vectors of the target block and the adjacent block are different (i.e., when the reference images in the blocks on both sides of the block boundary are different).
[0190] The boundary strength determination unit 253A may be configured to determine the boundary strength of such a block boundary based on control data indicating whether the number of motion vectors of the target block and the adjacent block is different.
[0191] For example, Fig.10As shown, the boundary strength determination unit 253A may also be configured to determine that the boundary strength of such a block boundary is "1" when the number of motion vectors of the target block and the adjacent block is different (i.e., when the number of motion vectors in the blocks on both sides of the block boundary is different).
[0192] The boundary strength determination unit 253A may be configured to determine the boundary strength of such a block boundary based on the types of inter-prediction modes of the target block and the adjacent blocks.
[0193] For example, Fig.10 As shown, the boundary strength determination unit 253A may be configured to determine that the boundary strength of such a block boundary is "1" when the block boundary is a CU boundary and TPM is used in at least one of the target block and the adjacent block.
[0194] Alternatively, the boundary strength determination unit 253A may be configured to determine that the boundary strength of such a block boundary is "1" when the block boundary is a CU boundary, TPM is used in at least one of the target block and the adjacent block, and the value of the weight coefficient described later satisfies specified conditions.
[0195] For example, Fig.10 As shown, the boundary strength determination unit 253A may be configured to determine that the boundary strength of such a block boundary is "1" when the block boundary is a CU boundary and GEO is used in at least one of the target block and the adjacent block.
[0196] Alternatively, the boundary strength determination unit 253A may be configured to determine that the boundary strength of such a block boundary is "1" when the boundary is a CU boundary, GEO is used in at least one of the target block and the adjacent block, and the value of the weight coefficient described later satisfies specified conditions.
[0197] For example, Fig.10 As shown, the boundary strength determination unit 253A may be configured to determine that the boundary strength of such a block boundary is "0" when none of the above conditions are satisfied.
[0198] Furthermore, there is a possibility that the larger the value of the boundary strength is, the larger the block distortion generated at the block boundary is.
[0199] The above-mentioned boundary strength determination method may use a method common to the luminance signal and the chrominance signal for determination, or may use partially different conditions for determination.
[0200] Below, refer to Fig.11 (a) to Fig.11(d) The weight coefficients of TPM and GEO are described below. TPM and GEO are modes in which a rectangular (including square) block is divided into two regions by a straight line, and a different motion vector is used in each region to perform motion compensation prediction.
[0201] TPM limits the division boundary to the diagonal line of the rectangle, while GEO can perform division with a higher degree of freedom. The details of TPM and GEO can follow the specifications described in Non-Patent Document 1, so detailed description is omitted.
[0202] In TPM and GEO, in pixels near the segmentation boundary, prediction values based on two vectors corresponding to each segmentation area are weighted and synthesized, and the weights are defined to change in a gradual manner, thereby smoothly synthesizing the prediction values.
[0203] Fig.11 (a) to Fig.11 (d) is a diagram showing an example of a weight coefficient during synthesis. Fig.11 (a) to Fig.11 In (d), the weight coefficient is set to 0 / 8 to 8 / 8, and the numerator of the weight of the prediction value (P1) based on the first motion vector is shown. In addition, the weight of the prediction value (P2) based on the second motion vector can be calculated by 1-(weight of P1).
[0204] For example, when the boundary strength is determined for every four pixels, the predetermined condition 4 of the weight coefficient when determining the boundary strength can be defined as follows.
[0205] Condition 4 can be defined as: the value obtained by adding the weight coefficient values of the pixels at the four corners of the 4×4 pixel block adjacent to the target block boundary (4 pixels) is above the second threshold and below the third threshold (or greater than the second threshold and less than the third threshold).
[0206] Alternatively, the predetermined condition 4 may be defined as: at least one of the weight coefficient values of each pixel at the target boundary (4 pixels) is a value other than 0 (=0 / 8) or 1 (=8 / 8).
[0207] The filter determination unit 254A is configured to determine the type of filtering process (for example, deblocking filtering process) to be applied to the block boundary.
[0208] For example, the filter decision unit 254A may be configured to decide whether to apply filtering to the block boundary, and which filtering to apply, weak filtering or strong filtering, based on the boundary strength of the block boundary, quantization parameters contained in the target block and the adjacent block, and the like.
[0209] The filter decision unit 254A may be configured to decide not to apply the filtering process when the boundary strength of the block boundary is “0”.
[0210] The filter processing unit 255A is configured to perform processing on the image before deblocking based on the decision of the filter decision unit 254A. The processing on the image before deblocking is non-filter processing, weak filter processing, strong filter processing, or the like.
[0211] That is, the deblocking filter unit 250A is configured to control the deblocking filter applied to the boundary between two adjacent blocks based on whether at least one of the two adjacent blocks satisfies a first condition, that is, the value of the quantization parameter is less than a predetermined threshold.
[0212] Alternatively, the deblocking filter unit 250A is configured to control the deblocking filter applied to the boundary between two adjacent blocks based on whether at least one of the two adjacent blocks satisfies a first condition, wherein the value of the quantization parameter is a predetermined threshold.
[0213] Alternatively, the deblocking filter unit 250A is configured to set the boundary strength used in the control of the deblocking filter applied to the boundary to "0" when at least one of the two adjacent blocks satisfies the first condition.
[0214] Alternatively, the deblocking filter unit 250A is configured to set the boundary strength used in the control of the deblocking filter applied to the above-mentioned boundary to "0" when at least one of the two adjacent blocks satisfies both the above-mentioned first condition and the second condition, wherein the transform skip mode is applied.
[0215] As described above, by setting the boundary strength of the boundary of the lossless block to “0”, the deblocking filter is not applied to all pixels in the target block, and losslessness can be ensured in units of blocks.
[0216] Fig.12 255A is a flowchart showing an example of the processing flow of the filter processing unit 255A. Fig.12 An example of the processing flow of the filter processing unit 255A will be described.
[0217] In step S121 , the filter processing unit 255A calculates the pixel value after filtering according to the filter processing determined by the filter determination unit 254A.
[0218] In step S122 , the filter processing unit 255A determines whether the block P satisfies the predetermined condition 5.
[0219] In addition, hereinafter, one of the two blocks adjacent to the target block boundary will be referred to as block P, and the other will be referred to as block Q.
[0220] For example, the prescribed condition 5 may include the following condition: Palette Mode is applied to the block P.
[0221] Alternatively, for example, the predetermined condition 5 may include the following condition: the block P is a lossless block. As the definition of a lossless block, for example, the same definition as that described in the boundary strength determination unit 253A may be used.
[0222] If it is determined that the predetermined condition 5 is satisfied, the operation proceeds to step S126 ; otherwise, the operation proceeds to step S123 .
[0223] In step S123 , the filter processing unit 255A reflects the pixel value after the filter application generated in step S121 on the filtered image.
[0224] On the other hand, in step S126, the filter processing unit 255A performs processing so as not to reflect the pixel value after the filter application generated in step S121 in the pixel value of the block P.
[0225] Specifically, for example, this can be achieved by setting the value of a parameter n to "0", where the parameter n means "apply the pixel value after the filter is applied to the pixel that is n pixels away from the boundary on the block P side".
[0226] Alternatively, for example, this can be achieved by replacing the pixel values after the filter is applied with the pixel values before the filter is applied. If the pixel values after the filter are applied are not reflected in the pixels in the block P as a result, a method other than the exemplified method may be used.
[0227] Next, in steps S124, S125, and S127, the same processing as in steps S122, S123, and S126 is performed on block Q, and then the operation proceeds to step S128 to terminate the processing.
[0228] That is, the deblocking filter unit 250A is configured not to apply the deblocking filter to the pixels inside the block that satisfy the first condition that the value of the quantization parameter is equal to or smaller than a predetermined threshold.
[0229] Alternatively, the deblocking filter unit 250A is configured not to apply the deblocking filter to pixels within a block that satisfies a first condition, that is, the value of the quantization parameter is a predetermined threshold value.
[0230] Alternatively, the deblocking filter unit 250A is configured to control the deblocking filter applied to the boundary based on whether the block satisfies both the first condition and the second condition, the second condition being that the transform skip mode is applied.
[0231] Alternatively, the deblocking filter unit 250A is configured not to apply the deblocking filter to pixels within a block that satisfies both the first condition and the second condition.
[0232] In addition, the threshold of the first condition may be “4”. Alternatively, the threshold of the first condition may be the minimum value of the quantization parameter when the transform skip mode is selected, that is, QpPrimeTsMin.
[0233] As described above, by not reflecting the pixel value after the filter is applied in the lossless block, losslessness can be ensured in units of blocks.
[0234] In addition, as described above, it is also possible to configure so that, at the block boundary to which TPM or GEO is applied, the boundary strength is controlled according to the value of the weight coefficient.
[0235] In addition, as described above, it can also be configured that, in a block boundary to which TPM or GEO is applied, the boundary strength is controlled based on whether the following condition is met, namely, a value obtained by adding the weight coefficient values of the pixels at the four corners of a 4×4 pixel block adjacent to the target block boundary (4 pixels) is above the second threshold and below the third threshold (or greater than the second threshold and less than the third threshold).
[0236] In addition, as described above, it can also be configured to control the boundary strength in the block boundary to which TPM or GEO is applied, depending on whether the following condition is met, namely, at least any one of the weight coefficient values of each pixel of the target boundary (4 pixels) is a value other than 0 (=0 / 8) or 1 (=8 / 8).
[0237] By adopting the above structure, even when the value or number of the motion vector (MV) between adjacent blocks does not meet the expected conditions, deblocking filtering can be appropriately applied to the block boundaries where the values of the weight coefficients are different and block distortion may actually occur on the block boundaries where TPM or GEO is applied.
[0238] In addition, as described above, it can also be configured that, when the above-mentioned block boundary is a sub-block boundary, affine motion compensation prediction is applied to the CU to which the adjacent sub-block belongs, and PROF in the Picture Header is valid, the boundary strength of such a block boundary is determined to be "0".
[0239] By adopting the above configuration, it is possible to prevent unnecessary application of deblocking filtering to the value after the PROF process for refining the predicted value in units of pixels is applied, and improvement in subjective image quality can be expected.
[0240] like Fig.13As shown, the adaptive loop filter section 250C includes a luma ALF section 256, a Cb CC-ALF section 257A, a Cr CC-ALF section 257B, a Cb ALF section 258A, and a Cr ALF section 258B.
[0241] As the processing of the luminance ALF section 256 , the Cb ALF section 258A, and the Cr ALF section 258B, for example, the processing described in Non-Patent Document 1 can be applied, and thus a detailed description thereof will be omitted.
[0242] An example of the processing contents of the Cb CC-ALF unit 257A and the Cr CC-ALF unit 257B is described below. The Cb CC-ALF unit 257A and the Cr CC-ALF unit 257B differ only in whether the target is a Cb signal or a Cr signal, and the processing contents are the same, so only the operation of the Cb CC-ALF unit 257A is described below, and the description of the Cr CC-ALF unit 257B is omitted.
[0243] like Fig.13 As shown, the Cb CC-ALF section 257A is configured to take the luminance signal before filtering by the luminance ALF section 256 as input and add the output value to the output of the Cb ALF section 258A, thereby generating a filtered signal of the Cb signal.
[0244] Fig.14 and Fig.15 : is a diagram showing an example of the filtering process in the Cb CC-ALF unit 257A and the process at the boundary portion.
[0245] Among them, for example, Fig.14 As shown in (a) to (e), consider Fig.14 In this way, a two-dimensional filter in which eight filter coefficients C0 to C7 are arranged is applied to the luminance signal, and a value added to the Cb signal is calculated.
[0246] Furthermore, the pixel position [y][x] of the luminance signal corresponding to the coefficient C2 is set to the pixel position corresponding to the pixel of the Cb signal to which the value calculated by the Cb CC-ALF unit 257A is added.
[0247] The value added to the Cb signal can be obtained by Fig.15 Here, P[y][x] refers to the pixel value of the brightness signal at the pixel position [y][x].
[0248] Fig.14(a) to (e) show the relationship between the processing boundary such as a virtual boundary and the configuration of the filter coefficients. Here, the boundary refers to a boundary line that prohibits reference to pixels located outside the boundary of parallel processing units such as strips and blocks defined according to the standard, and the virtual boundary set to achieve pipeline processing.
[0249] Consider the area where the pixel corresponding to the filter coefficient C2 exists in the two areas divided by the boundary as the inner side of the boundary, and the area where the pixel does not exist as the outer side of the boundary. In the case where there is a reference pixel position outside the boundary, it is actually impossible to refer to the pixel value at this position, so filling processing is required. Specifically, Fig.15 As shown in the table, padding processing can be realized by changing the actual reference pixel position according to the boundary and the pattern of filter coefficient arrangement.
[0250] Fig.14 (e) shows an example of a case where padding is not required. The values of offset1 to offset3 when padding is not required are as follows: Fig.15 As shown in the table.
[0251] On the other hand, for example, in the Fig.14 In the case of the arrangement (c), pixels corresponding to the filter coefficients C4 to C7 are located outside the boundary, so the values of the corresponding offset2 and offset3 are set to "0" to achieve filtering.
[0252] In addition, Fig.14 In the configuration of (c), the pixel corresponding to the filter coefficient C0 is located on the inner side of the boundary and can therefore be used for reference, but when the same filling method (mirror filling) as that performed by the luminance ALF unit 256, the Cb ALF unit 258A, and the Cr ALF unit 258B in non-patent document 1 is adopted, the filter coefficient C0 side is also filled, and therefore offset1 is also set to "0".
[0253] Mirror fill is to Fig.14 In (c), when the horizontal row where the filter coefficient C2 is located is folded and inverted at the center, the row outside the boundary is also filled.
[0254] exist Fig.14 In case (b), the row corresponding to offset1 is outside the boundary, so offset1 is set to "0", and offset2 and offset3 are also set to "0" according to the mirror filling method.
[0255] exist Fig.14In the case of (d), the row corresponding to offset3 is outside the boundary, so offset1 and offset2 are equal to Fig.14 The situation (e) is the same, except that offset3 is changed to "1".
[0256] exist Fig.14 In case (a), if the configuration of the filter coefficients is folded with the row where the filter coefficient C2 is located as the center, the row corresponding to the filter coefficient C7 will appear outside the boundary. Therefore, when performing mirror filling, offset3 is corrected to 1 to perform filling processing.
[0257] On the other hand, Fig.14 In the case of (a), the filter coefficients outside the boundary are not actually referenced, so padding is not necessarily required. Fig.14 (a) can also be performed with Fig.14 (e) The same offset value setting. In other words, it is not necessary to define Fig.14 (a) and decides to use the fill processing when fill processing is not defined. Fig.14 (e) Setting.
[0258] As described above, the CC-ALF unit that takes the luminance signal as input and adds the output to the chrominance signal is configured to set all offsets added to the reference pixel position to "0" for filling processing when the luminance signal pixel corresponding to the chrominance signal pixel to which the output value is added (the luminance signal pixel position corresponding to the above-mentioned coefficient C2) is in the next row of the boundary (the above-mentioned (b)) or in the previous row of the boundary (the above-mentioned (c)). As a result, for example, the filling processing can be performed by the same method as the filling method (mirror filling) performed by the luminance ALF unit 256, the Cb ALF unit 258A and the Cr ALF unit 258B in non-patent document 1, and the control logic can be shared.
[0259] In addition, as described above, the CC-ALF unit that takes the luminance signal as input and adds the output to the chrominance signal can also be configured not to perform padding processing when all reference pixel positions are inside the boundary, and to perform padding processing only when at least one of the reference pixel positions is outside the boundary.
[0260] That is, by not defining Fig.14 The padding processing in case (a) can improve the coding efficiency by eliminating unnecessary padding processing.
[0261] (Image Coding Device 100)
[0262] Below, refer to Fig.16The image encoding device 100 according to this embodiment will be described. Fig.16 1 is a diagram showing an example of functional blocks of the image encoding device 100 according to the present embodiment.
[0263] like Fig.16 As shown, the image encoding device 100 has an inter-frame prediction unit 111, an intra-frame prediction unit 112, a subtractor 121, an adder 122, a transform and quantization unit 131, an inverse transform and inverse quantization unit 132, an encoding unit 140, an in-loop filter processing unit 150 and a frame buffer 160.
[0264] The inter-frame prediction unit 111 is configured to generate a prediction signal by inter-frame prediction, similarly to the inter-frame prediction unit 241 .
[0265] Specifically, the inter-frame prediction unit 111 is configured to determine a reference block included in a reference frame by comparing a target frame to be encoded (hereinafter referred to as a target frame) with a reference frame stored in a frame buffer 160, and determine a motion vector for the determined reference block.
[0266] In addition, the inter-frame prediction unit 111 is configured to generate a prediction signal included in the prediction block for each prediction block based on the reference block and the motion vector. The inter-frame prediction unit 111 is configured to output the prediction signal to the subtractor 121 and the adder 122. The reference frame is a frame different from the target frame.
[0267] The intra prediction unit 112 is configured to generate a prediction signal by intra-frame prediction, similarly to the intra prediction unit 242 .
[0268] Specifically, the intra prediction unit 112 is configured to determine a reference block included in the target frame and generate a prediction signal for each prediction block based on the determined reference block. In addition, the intra prediction unit 112 is configured to output the prediction signal to the subtractor 121 and the adder 122.
[0269] The reference block is a block that is referenced for predicting a target block (hereinafter referred to as a target block). For example, the reference block is a block adjacent to the target block.
[0270] The subtractor 121 is configured to subtract the prediction signal from the input image signal and output the prediction residual signal to the transform and quantization unit 131. The subtractor 121 is configured to generate a prediction residual signal which is a difference between the prediction signal generated by intra prediction or inter prediction and the input image signal.
[0271] The adder 122 is configured to add the prediction signal and the prediction residual signal output from the inverse transform and inverse quantization section 132 to generate a pre-filtering decoded signal, and output such a pre-filtering decoded signal to the intra prediction section 112 and the in-loop filter processing section 150 .
[0272] The decoded signal before filtering constitutes a reference block used in the intra prediction unit 112 .
[0273] The transform and quantization unit 131 is configured to perform a transform process on the prediction residual signal and obtain coefficient level values. Furthermore, the transform and quantization unit 131 may also be configured to perform quantization of the coefficient level values.
[0274] The transform process is a process of transforming the prediction residual signal into a frequency component signal. In such a transform process, a basic pattern (transformation matrix) corresponding to a discrete cosine transform (DCT) or a basic pattern (transformation matrix) corresponding to a discrete sine transform (DST) can be used.
[0275] The inverse transform and inverse quantization unit 132 is configured to perform inverse transform processing on the coefficient level values output from the transform and quantization unit 131, similarly to the inverse transform and inverse quantization unit 220. The inverse transform and inverse quantization unit 132 may also be configured to perform inverse quantization on the coefficient level values before the inverse transform processing.
[0276] Among them, the inverse transform processing and inverse quantization are performed according to the reverse process of the transform processing and quantization performed by the transform and quantization unit 131.
[0277] The encoding section 140 is configured to encode the coefficient level values output from the transform and quantization section 131 and output the encoded data.
[0278] Among them, for example, the encoding is entropy encoding that assigns codes of different lengths based on the probability of occurrence of coefficient level values.
[0279] In addition, the encoding unit 140 is configured to encode control data used in the decoding process in addition to the coefficient level values.
[0280] In addition, as described above, the control data may also include size data such as the coding block size, the prediction block size, and the transform block size.
[0281] Similar to the in-loop filter processing unit 250 , the in-loop filter processing unit 150 is configured to perform filtering on the pre-filtering decoded signal output from the adder 122 and output the post-filtering decoded signal to the frame buffer 160 .
[0282] The frame buffer 160 is configured to accumulate reference frames used in the inter prediction section 111 .
[0283] The decoded signal after filtering constitutes a reference frame used in the inter-frame prediction unit 111 .
[0284] (Intra-frame prediction unit 112)
[0285] Below, refer to Fig.17 The intra prediction unit 112 according to this embodiment will be described. Fig.17 FIG. 1 is a diagram showing an example of functional blocks of the intra prediction unit 112 of the image encoding device 100 according to the present embodiment.
[0286] like Fig.17 As shown, the intra prediction unit 112 includes an intra prediction mode determination unit 112A, an intra prediction mode encoding unit 112B, and a prediction signal generation unit 112C.
[0287] The intra prediction section 112 is an example of a prediction section, and is configured to generate a prediction signal by intra-frame prediction.
[0288] The intra prediction mode determination unit 112A is configured to determine the intra prediction mode of the block, whether BDPCM is applied, and other information encoded by the subsequent intra prediction mode encoding unit 112B. A known method can be used for the determination method, and thus detailed description is omitted.
[0289] The intra-frame prediction mode encoding unit 112B is configured to encode the prediction mode of the target block. The processing content is the same as that of the intra-frame prediction mode decoding unit 242B. Specifically, for example, Figure 6 The “decoding” part in the process flow chart of the intra prediction mode decoding unit 242B shown in the figure is changed to the “encoding” process.
[0290] The prediction signal generation unit 112C is configured to generate a prediction signal for the block according to the prediction mode encoded by the intra prediction mode encoding unit 112B. The prediction signal generation method is the same as that of the prediction signal generation unit 242C.
[0291] Furthermore, the above-described image encoding apparatus 100 and image decoding apparatus 200 may be realized by a program that causes a computer to execute each function (each step).
[0292] In addition, in the above-mentioned embodiments, the application of the present invention to the image encoding device 100 and the image decoding device 200 is described as an example, but the present invention is not limited to such an example, and can also be applied to an image encoding / decoding system having the functions of the image encoding device 100 and the image decoding device 200.
[0293] According to the present invention, it is possible to provide an image decoding device 200 having a function of ensuring losslessness within a specific block within a frame, an image decoding method, and a program.
[0294] Explanation of symbols
[0295] 10…image processing system; 100…image encoding device; 111, 241…inter-frame prediction unit; 112, 242…intra-frame prediction unit; 112A…intra-frame prediction mode determination unit; 112B…intra-frame prediction mode encoding unit; 112C, 242C…prediction signal generation unit; 121…subtractor; 122, 230…adder; 131…transformation and quantization unit; 132, 220…inverse transformation and inverse quantization unit; 140…encoding unit; 150, 250…in-loop filter processing unit; 160, 260…frame buffer; 200…image decoding device ; 210…decoding unit; 220A…quantization parameter derivation unit; 220B…inverse quantization unit; 220C…inverse transformation unit; 242B…intra-frame prediction mode decoding unit; 250A…deblocking filter unit; 251, 251A, 251B…block boundary detection unit; 253, 253A, 253B…boundary strength determination unit; 254, 254A, 254B…filter determination unit; 255, 255A, 255B…filter processing unit; 250B…SAO unit; 250C…adaptive loop filter unit; 256…luminance ALF unit; 257A…Cb CC-ALF unit; 257B…Cr CC-ALF unit; 258A…Cb-ALF unit; 258B…Cr-ALF unit
Claims
1. An image decoding device, characterized in that: The image decoding device includes a quantization parameter derivation unit, and the quantization parameter derivation unit is configured as follows: In the case where a transform skip mode is applied to a target block, after correcting the value of the decoded quantization parameter of the target block according to whether an adaptive color transform is applied to the target block, the value of the quantization parameter of the target block is set to be greater than the minimum value of the quantization parameter when the transform skip mode is applied, and the minimum value of the quantization parameter when the transform skip mode is applied is set to be greater than "4".
2. An image decoding method, characterized in that: The following steps are involved: In the case where a transform skip mode is applied to a target block, after correcting the value of the decoded quantization parameter of the target block according to whether an adaptive color transform is applied to the target block, the value of the quantization parameter of the target block is set to be greater than the minimum value of the quantization parameter when the transform skip mode is applied, and the minimum value of the quantization parameter when the transform skip mode is applied is set to be greater than "4".
3. A program used in an image decoding device, characterized in that: It causes the computer to perform the following steps: In the case where a transform skip mode is applied to a target block, after correcting the value of the decoded quantization parameter of the target block according to whether an adaptive color transform is applied to the target block, the value of the quantization parameter of the target block is set to be greater than the minimum value of the quantization parameter when the transform skip mode is applied, and the minimum value of the quantization parameter when the transform skip mode is applied is set to be greater than "4".