Decoder and bitstream generator
The encoding device enhances encoding efficiency by applying linear and quadratic transformations with tailored quantization matrices, addressing the need for improved HEVC technologies.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- PANASONIC INTELLECTUAL PROPERTY CORP OF AMERICA
- Filing Date
- 2025-05-28
- Publication Date
- 2026-05-29
AI Technical Summary
Existing video encoding technologies, such as HEVC, require further improvements in encoding efficiency while maintaining subjective image quality.
An encoding device that performs linear and quadratic transformations on image blocks, followed by specific quantizations using different quantization matrices based on the transformation type, to optimize encoding efficiency and subjective image quality.
Improves encoding efficiency by adapting quantization methods based on transformation type, thereby reducing the degradation of subjective image quality.
Smart Images

Figure 0007867599000003 
Figure 0007867599000004 
Figure 0007867599000005
Abstract
Description
Technical Field
[0001] The present disclosure relates to an encoding device that encodes image blocks and the like.
Background Art
[0002] A video coding standard called HEVC (High-Efficiency Video Coding) has been standardized by JCT-VC (Joint Collaborative Team on Video Coding).
Prior Art Documents
Non-Patent Documents
[0003]
Non-Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] In such encoding and decoding technologies, further improvement is required.
[0005] Therefore, an object of the present disclosure is to provide an encoding device and the like that can achieve further improvement.
Means for Solving the Problems
[0006] A decoding device according to one aspect of the present disclosure is a decoding device for decoding an image block, comprising a circuit and a memory, wherein the circuit uses the memory to obtain a first-order or second-order quantization coefficient of the image block from a bitstream, determines whether or not to apply an inverse quadratic transform to the image block, (i) if the inverse quadratic transform is not applied, calculates a first-order coefficient by performing a first-order inverse quantization on the first-order quantization coefficient, and (ii) if the inverse quadratic transform is applied, calculates a second-order coefficient by performing a second-order inverse quantization different from the first-order inverse quantization on the second-order quantization coefficient, performs an inverse quadratic transform from the second-order coefficient to the first-order coefficient, and performs an inverse linear transform from the first-order coefficient to the residual of the image block.
[0007] These general or specific embodiments may be implemented as a system, method, integrated circuit, computer program, or recording medium such as a computer-readable CD-ROM, or as any combination of a system, method, integrated circuit, computer program, and recording medium. [Effects of the Invention]
[0008] This disclosure can provide an encoding device, etc., that can achieve further improvements. [Brief explanation of the drawing]
[0009] [Figure 1] Figure 1 is a block diagram showing the functional configuration of the encoding device according to Embodiment 1. [Figure 2] Figure 2 shows an example of block division in Embodiment 1. [Figure 3] Figure 3 is a table showing the transformation basis functions corresponding to each transformation type. [Figure 4A] Figure 4A shows an example of the filter shape used in ALF. [Figure 4B] Figure 4B shows another example of the filter shape used in ALF. [Figure 4C]Figure 4C shows another example of the filter shape used in ALF. [Figure 5A] Figure 5A shows the 67 intra-prediction modes in intra-prediction. [Figure 5B] Figure 5B is a flowchart illustrating the overview of the predictive image correction process using OBMC processing. [Figure 5C] Figure 5C is a conceptual diagram illustrating the overview of the predictive image correction process using OBMC processing. [Figure 5D] Figure 5D shows an example of FRUC. [Figure 6] Figure 6 is a diagram illustrating pattern matching (bilateral matching) between two blocks along a motion trajectory. [Figure 7] Figure 7 illustrates pattern matching (template matching) between a template in the current picture and a block in the referenced picture. [Figure 8] Figure 8 is a diagram illustrating a model that assumes uniform linear motion. [Figure 9A] Figure 9A is a diagram illustrating the derivation of subblock-level motion vectors based on the motion vectors of multiple adjacent blocks. [Figure 9B] Figure 9B is a diagram illustrating the overview of the motion vector derivation process using merge mode. [Figure 9C] Figure 9C is a conceptual diagram illustrating the overview of DMVR processing. [Figure 9D] Figure 9D is a diagram illustrating the outline of a predictive image generation method using luminance correction processing by LIC processing. [Figure 10] Figure 10 is a block diagram showing the functional configuration of the decoding device according to Embodiment 1. [Figure 11] Figure 11 is a flowchart showing an example of the conversion process, quantization process, and encoding process in Embodiment 1. [Figure 12]FIG. 12 is a diagram showing an example of the position of a quantization matrix in an encoded bit stream in Embodiment 1. [Figure 13] FIG. 13 is a flowchart showing an example of decoding processing, inverse quantization processing, and inverse transformation processing in Embodiment 1. [Figure 14] FIG. 14 is a flowchart showing an example of transformation processing, quantization processing, and encoding processing in Embodiment 2. [Figure 15] FIG. 15 is a flowchart showing an example of decoding processing, inverse quantization processing, and inverse transformation processing in Embodiment 2. [Figure 16] FIG. 16 is a flowchart showing an example of the derivation processing of a second quantization matrix in a modification of Embodiment 2. [Figure 17] FIG. 17 is a flowchart showing an example of transformation processing, quantization processing, and encoding processing in Embodiment 3. [Figure 18] FIG. 18 is a flowchart showing an example of decoding processing, inverse quantization processing, and inverse transformation processing in Embodiment 3. [Figure 19] FIG. 21 is a flowchart showing an example of transformation processing, quantization processing, and encoding processing in Embodiment 4. [Figure 20] FIG. 20 is a diagram for explaining an example of secondary transformation in Embodiment 4. [Figure 21] FIG. 27 is a flowchart showing an example of decoding processing, inverse quantization processing, and inverse transformation processing in Embodiment 4. [Figure 22] FIG. 30 is a diagram for explaining an example of inverse secondary transformation in Embodiment 4. [Figure 23] FIG. 23 is a flowchart showing an example of transformation processing, quantization processing, and encoding processing in Embodiment 5. [Figure 24] FIG. 24 is a flowchart showing an example of decoding processing, inverse quantization processing, and inverse transformation processing in Embodiment 5. [Figure 25] FIG. 25 is an overall configuration diagram of a content supply system for realizing a content distribution service. [Figure 26] Figure 26 shows an example of an encoding structure during scalable encoding. [Figure 27] Figure 27 shows an example of an encoding structure during scalable encoding. [Figure 28] Figure 28 shows an example of how a web page is displayed. [Figure 29] Figure 29 shows an example of how a web page is displayed. [Figure 30] Figure 30 shows an example of a smartphone. [Figure 31] Figure 31 is a block diagram showing an example of a smartphone configuration. [Modes for carrying out the invention]
[0010] (Knowledge that forms the basis of this disclosure) In next-generation video compression standards, a quadratic transformation of coefficients obtained by linearly transforming residuals is being considered to further eliminate spatial redundancy. Even when such a quadratic transformation is performed, it is expected that encoding efficiency will be improved while suppressing the degradation of subjective image quality.
[0011] Therefore, an encoding device according to one aspect of the present disclosure is an encoding device for encoding an image target block, comprising a circuit and a memory, wherein the circuit uses the memory to perform a linear transformation from the residual of the target block to a linear coefficient, determines whether or not to apply a quadratic transformation to the target block, (i) if the quadratic transformation is not applied, calculates a quantized linear coefficient by performing a first quantization on the linear coefficient, and (ii) if the quadratic transformation is applied, performs a quadratic transformation from the linear coefficient to a quadratic coefficient, calculates a quantized quadratic coefficient by performing a second quantization different from the first quantization on the quadratic coefficient, and generates an encoded bitstream by encoding the quantized linear coefficient or the quantized quadratic coefficient.
[0012] According to this, different quantization can be performed depending on whether or not a quadratic transformation is applied to the block to be encoded. Quadratic coefficients obtained by quadratic transformation from linear coefficients represented in the first space will be represented in a quadratic space that is not the first space. Therefore, even if the quantization for linear coefficients is applied to quadratic coefficients, it is difficult to improve encoding efficiency while suppressing the degradation of subjective image quality. For example, the quantization required to reduce the loss of low-frequency components in order to suppress the degradation of subjective image quality and to increase the loss of high-frequency components in order to improve encoding efficiency will differ between the first space and the second space. Therefore, by performing different quantization depending on whether or not a quadratic transformation is applied to the block to be encoded, it is possible to improve encoding efficiency while suppressing the degradation of subjective image quality compared to the case where a common quantization is performed.
[0013] Furthermore, in an encoding device according to one aspect of this disclosure, for example, the first quantization may be weighted quantization using a first quantization matrix, and the second quantization may be weighted quantization using a second quantization matrix different from the first quantization matrix.
[0014] According to this, weighted quantization using a first quantization matrix can be performed as the first quantization. Furthermore, weighted quantization using a second quantization matrix different from the first quantization matrix can be performed as the second quantization. Therefore, the first quantization matrix corresponding to the first space can be used for quantization of the first coefficients, and the second quantization matrix corresponding to the second space can be used for quantization of the second coefficients. Thus, encoding efficiency can be improved while suppressing the deterioration of subjective image quality in both the application and non-application of the quadratic transformation.
[0015] Furthermore, in an encoding device according to one aspect of the present disclosure, for example, the circuit may further write the first quantization matrix and the second quantization matrix to the encoded bitstream.
[0016] According to this method, the first and second quantization matrices can be included in the encoded bitstream. Therefore, the first and second quantization matrices can be adaptively determined according to the original image, and furthermore, encoding efficiency can be improved while suppressing a decrease in subjective image quality.
[0017] Furthermore, in an encoding device according to one aspect of the present disclosure, for example, the linear coefficient includes one or more first linear coefficients and one or more second linear coefficients, the quadratic transformation is applied to the one or more first linear coefficients and not to the one or more second linear coefficients, the second quantization matrix includes one or more first component values corresponding to the one or more first linear coefficients and one or more second component values corresponding to the one or more second linear coefficients, each of the one or more second component values of the second quantization matrix matches the corresponding component value of the first quantization matrix, and in writing the second quantization matrix, only the one or more first component values among the one or more first component values and the one or more second component values may be written to the encoded bitstream.
[0018] According to this method, each of the one or more second component values of the second quantization matrix can be matched with the corresponding component value of the first quantization matrix. Therefore, it becomes unnecessary to write the one or more second component values of the second quantization matrix into the encoded bitstream, thereby improving encoding efficiency.
[0019] Furthermore, in an encoding device according to one aspect of the present disclosure, for example, in the quadratic transformation, a predetermined plurality of basis sets are selectively used, the encoded bitstream includes a plurality of second quantization matrices corresponding to the plurality of basis sets, and in the second quantization, a second quantization matrix corresponding to the basis set used in the quadratic transformation may be selected from among the plurality of second quantization matrices.
[0020] According to this, second quantization can be performed using a second quantization matrix corresponding to the basis used in the quadratic transformation. The characteristics of the quadratic space representing the quadratic coefficients differ depending on the basis used in the quadratic transformation. Therefore, by performing second quantization using a second quantization matrix corresponding to the basis used in the quadratic transformation, it is possible to perform second quantization using a quantization matrix that more closely corresponds to the quadratic space, thereby improving encoding efficiency while suppressing the degradation of subjective image quality.
[0021] Furthermore, in an encoding device according to one aspect of this disclosure, for example, the first quantization matrix and the second quantization matrix may be predetermined in a standard.
[0022] According to this, the first and second quantization matrices are predefined in the standard specification. Therefore, the first and second quantization matrices do not need to be included in the encoded bitstream, and the amount of code required for the first and second quantization matrices can be reduced.
[0023] Furthermore, in an encoding device according to one aspect of the present disclosure, for example, the circuit may further derive the second quantization matrix from the first quantization matrix.
[0024] According to this method, the second quantization matrix can be derived from the first quantization matrix. Therefore, it becomes unnecessary to transmit the second quantization matrix to the decoding device, thus improving encoding efficiency.
[0025] Furthermore, in an encoding device according to one aspect of the present disclosure, for example, the linear coefficient includes one or more first linear coefficients and one or more second linear coefficients, the quadratic transformation is applied to the one or more first linear coefficients and not to the one or more second linear coefficients, the second quantization matrix includes one or more first component values corresponding to the one or more first linear coefficients and one or more second component values corresponding to the one or more second linear coefficients, each of the one or more second component values of the second quantization matrix is consistent with the corresponding component value of the first quantization matrix, and in the derivation of the second quantization matrix, the one or more first component values of the second quantization matrix may be derived from the first quantization matrix.
[0026] According to this method, each of the one or more second component values in the second quantization matrix can be matched with the corresponding component value in the first quantization matrix. Therefore, it becomes unnecessary to derive the one or more second component values of the second quantization matrix from the first quantization matrix, thereby reducing the processing load.
[0027] Furthermore, in an encoding device according to one aspect of this disclosure, for example, the second quantization matrix may be derived by applying the quadratic transformation to the first quantization matrix.
[0028] According to this method, the second quantization matrix can be derived by applying a quadratic transformation to the first quantization matrix. Therefore, the first quantization matrix corresponding to the first-order space can be transformed into the second quantization matrix corresponding to the second-order space, thereby improving encoding efficiency while suppressing a decrease in subjective image quality.
[0029] Furthermore, in an encoding device according to one aspect of the present disclosure, for example, the circuit may further derive a third quantization matrix from the first quantization matrix, wherein each component value of the third quantization matrix is larger the smaller the corresponding component value of the first quantization matrix is, and a fourth quantization matrix may be derived by applying the quadratic transformation to the third quantization matrix, and a fifth quantization matrix may be derived from the fourth quantization matrix as the second quantization matrix, wherein each component value of the fifth quantization matrix is larger the smaller the corresponding component value of the fourth quantization matrix is.
[0030] According to this, the effect of rounding errors during quadratic transformation on components with relatively small values included in the first quantization matrix can be reduced. In other words, the effect of rounding errors on the values of components applied to coefficients for which we want to minimize loss in order to suppress the degradation of subjective image quality can be reduced. Therefore, the degradation of subjective image quality can be further suppressed.
[0031] Furthermore, in an encoding device according to one aspect of this disclosure, for example, each component value of the third quantization matrix may be the reciprocal of the corresponding component value of the first quantization matrix, and each component value of the fifth quantization matrix may be the reciprocal of the corresponding component value of the fourth quantization matrix.
[0032] According to this method, the reciprocals of the corresponding component values of the first and fourth quantization matrices can be used as the component values of the third and fifth quantization matrices. Therefore, the component values can be derived with simple calculations, reducing the processing load or processing time required to derive the second quantization matrix.
[0033] Furthermore, in an encoding device according to one aspect of this disclosure, for example, the first quantization may be weighted quantization using a quantization matrix, and the second quantization may be unweighted quantization that does not use a quantization matrix.
[0034] According to this, unweighted quantization without a quantization matrix can be used as the second quantization. Therefore, while preventing a decrease in subjective image quality caused by using the first quantization matrix for the first quantization for the second quantization, the code value or derivation process of the quantization matrix for the second quantization can be omitted.
[0035] Furthermore, in an encoding device according to one aspect of the present disclosure, for example, the first quantization is weighted quantization using a first quantization matrix, and in the quadratic transformation, (i) weighted linear coefficients are calculated by multiplying each of the linear coefficients by the corresponding component value of the weight matrix, and (ii) the weighted linear coefficients are converted to quadratic coefficients, and in the second quantization, each of the quadratic coefficients is divided by a quantization step common to the quadratic coefficients.
[0036] According to this method, weighted linear coefficients can be calculated by multiplying each linear coefficient by the corresponding component value of the weight matrix. The weighting related to quantization can be applied to the linear coefficients before the quadratic transformation. Therefore, when a quadratic transformation is applied, quantization equivalent to weighted quantization can be performed without preparing a new quantization matrix corresponding to the quadratic space. As a result, encoding efficiency can be improved while suppressing a decrease in subjective image quality.
[0037] Furthermore, in an encoding device according to one aspect of the present disclosure, for example, the circuit may further derive the weight matrix from the first quantization matrix.
[0038] According to this method, the weight matrix can be derived from the first quantization matrix. Therefore, the amount of code required for the weight matrix can be reduced, improving coding efficiency while suppressing a decrease in subjective image quality.
[0039] Furthermore, in an encoding device according to one aspect of the present disclosure, for example, the circuit may further derive the common quantization step from the quantization parameters for the block to be encoded.
[0040] According to this method, a common quantization step can be derived from the quantization parameters for the quadratic coefficients of the block to be encoded. Therefore, it is not necessary to include new information in the encoded stream for the common quantization step, and the amount of code required for the common quantization step can be reduced.
[0041] An encoding method according to one aspect of the present disclosure is an encoding method for encoding an image target block, comprising: performing a linear transformation from the residual of the target block to a linear coefficient; determining whether or not to apply a quadratic transformation to the target block; (i) if the quadratic transformation is not applied, calculating a quantized linear coefficient by performing a first quantization on the linear coefficient; (ii) if the quadratic transformation is applied, performing a quadratic transformation from the linear coefficient to a quadratic coefficient; calculating a quantized quadratic coefficient by performing a second quantization different from the first quantization on the quadratic coefficient; and encoding the quantized linear coefficient or the quantized quadratic coefficient to generate an encoded bitstream.
[0042] This allows for achieving the same effects as the above-mentioned encoding device.
[0043] An encoding device according to one aspect of the present disclosure is an encoding device for encoding an image to be encoded, comprising a circuit and a memory, wherein the circuit uses the memory to linearly convert the residual of the image to be encoded into a linear coefficient, determines whether or not to apply a quadratic conversion to the image to be encoded, (i) if the quadratic conversion is not applied, calculates a first quantized linear coefficient by performing first quantization on the linear coefficient, and (ii) if the quadratic conversion is applied, calculates a second quantized linear coefficient by performing second quantization on the linear coefficient, performs a quadratic conversion from the second quantized linear coefficient to a quantized quadratic coefficient, and generates an encoded bitstream by encoding the first quantized linear coefficient or the quantized quadratic coefficient.
[0044] According to this approach, quantization can be performed before the quadratic transformation, so if the quadratic transformation process is lossless, the quadratic transformation can be removed from the prediction loop. Therefore, the load on the processing pipeline can be reduced. In addition, by performing quantization before the quadratic transformation, there is no need to separate the first and second quantization matrices, which simplifies the processing.
[0045] An encoding method according to one aspect of the present disclosure is an encoding method for encoding an image target block, comprising: (i) if the quadratic transformation is not applied, calculating a first quantized primary coefficient by performing first quantization on the primary coefficient; (ii) if the quadratic transformation is applied, calculating a second quantized primary coefficient by performing second quantization on the primary coefficient; performing a quadratic transformation from the second quantized primary coefficient to a quantized secondary coefficient; and encoding the first quantized primary coefficient or the quantized secondary coefficient to generate an encoded bitstream.
[0046] This allows for achieving the same effects as the above-mentioned encoding device.
[0047] A decoding device according to one aspect of the present disclosure is a decoding device for decoding a block of an image, comprising a circuit and a memory, wherein the circuit uses the memory to decode the quantization coefficients of the block to be decoded from an encoded bitstream, determines whether or not to apply an inverse quadratic transform to the block to be decoded, calculates a linear coefficient by performing a first inverse quantization on the quantization coefficient, performs an inverse linear transform from the linear coefficient to the residual of the block to be decoded if the inverse quadratic transform is not applied, calculates a quadratic coefficient by performing a second inverse quantization different from the first inverse quantization on the quantization coefficient, performs an inverse quadratic transform from the quadratic coefficient to the linear coefficient, and performs an inverse linear transform from the linear coefficient to the residual of the block to be decoded.
[0048] According to this, different inverse quantization can be performed depending on whether or not an inverse quadratic transform is applied to the block to be decoded. Quadratic coefficients obtained by quadratic transforming from linear coefficients represented in the first space will be represented in a quadratic space that is not the first space. Therefore, even if the inverse quantization for linear coefficients is applied to quadratic coefficients, it is difficult to improve coding efficiency while suppressing the degradation of subjective image quality. For example, the quantization required to reduce the loss of low-frequency components in order to suppress the degradation of subjective image quality and to increase the loss of high-frequency components in order to improve coding efficiency will differ between the first space and the second space. Therefore, by performing different inverse quantization depending on whether or not an inverse quadratic transform is applied to the block to be decoded, it is possible to improve coding efficiency while suppressing the degradation of subjective image quality compared to the case where a common inverse quantization is performed.
[0049] Furthermore, in a decoding device according to one aspect of this disclosure, for example, the first inverse quantization may be a weighted inverse quantization using a first quantization matrix, and the second inverse quantization may be a weighted inverse quantization using a second quantization matrix different from the first quantization matrix.
[0050] According to this, a weighted inverse quantization using a first quantization matrix can be performed as the first inverse quantization. Furthermore, a weighted inverse quantization using a second quantization matrix different from the first quantization matrix can be performed as the second inverse quantization. Therefore, the first quantization matrix corresponding to the first-order space can be used for the inverse quantization of the first-order coefficients, and the second quantization matrix corresponding to the second-order space can be used for the inverse quantization of the second-order coefficients. Thus, encoding efficiency can be improved while suppressing the deterioration of subjective image quality in both the application and non-application of the inverse quadratic transform.
[0051] Furthermore, in a decoding device according to one aspect of the present disclosure, for example, the circuit may further decode the first quantization matrix and the second quantization matrix from the encoded bitstream.
[0052] According to this method, the first and second quantization matrices can be included in the encoded bitstream. Therefore, the first and second quantization matrices can be adaptively determined according to the original image, and furthermore, encoding efficiency can be improved while suppressing a decrease in subjective image quality.
[0053] Furthermore, in a decoding device according to one aspect of the present disclosure, for example, the quadratic coefficient includes one or more first quadratic coefficients and one or more second quadratic coefficients, the inverse quadratic transform is applied to the one or more first quadratic coefficients and not to the one or more second quadratic coefficients, the second quantization matrix includes one or more first component values corresponding to the one or more first quadratic coefficients and one or more second component values corresponding to the one or more second quadratic coefficients, each of the one or more second component values of the second quantization matrix matches the corresponding component value of the first quantization matrix, and in deciphering the second quantization matrix, only the one or more first component positions among the one or more first component values and the one or more second component values may be deciphered from the encoded bitstream.
[0054] According to this method, each of the one or more second component values of the second quantization matrix can be matched with the corresponding component value of the first quantization matrix. Therefore, it becomes unnecessary to read the one or more second component values of the second quantization matrix from the encoded bitstream, thereby improving encoding efficiency.
[0055] Furthermore, in a decoding device according to one aspect of the present disclosure, for example, in the inverse quadratic transform, a predetermined plurality of basis sets are selectively used, the encoded bitstream includes a plurality of second quantization matrices corresponding to the plurality of basis sets, and in the second inverse quantization, a second quantization matrix corresponding to the basis set used in the inverse quadratic transform may be selected from among the plurality of second quantization matrices.
[0056] According to this, the characteristics of the quadratic space representing the quadratic coefficients differ depending on the basis used in the inverse quadratic transform. Therefore, by performing the second inverse quantization using the second quantization matrix corresponding to the basis used in the inverse quadratic transform, it is possible to perform the second inverse quantization using a quantization matrix that better corresponds to the quadratic space, thereby improving encoding efficiency while suppressing the degradation of subjective image quality.
[0057] Furthermore, in a decoding device according to one aspect of this disclosure, for example, the first quantization matrix and the second quantization matrix may be predetermined in a standard.
[0058] According to this, the first and second quantization matrices are predefined in the standard specification. Therefore, the first and second quantization matrices do not need to be included in the encoded bitstream, and the amount of code required for the first and second quantization matrices can be reduced.
[0059] Furthermore, in a decoding device according to one aspect of the present disclosure, for example, the circuit may further derive the second quantization matrix from the first quantization matrix.
[0060] According to this method, the second quantization matrix can be derived from the first quantization matrix. Therefore, it becomes unnecessary to receive the second quantization matrix from the encoding device, thus improving encoding efficiency.
[0061] Furthermore, in a decoding device according to one aspect of the present disclosure, for example, the quadratic coefficient includes one or more first quadratic coefficients and one or more second quadratic coefficients, the inverse quadratic transform is applied to the one or more first quadratic coefficients and not to the one or more second quadratic coefficients, the second quantization matrix includes one or more first component values corresponding to the one or more first quadratic coefficients and one or more second component values corresponding to the one or more second quadratic coefficients, each of the one or more second component values of the second quantization matrix coincides with the corresponding component value of the first quantization matrix, and in the derivation of the second quantization matrix, the one or more first component positions may be derived from the first quantization matrix.
[0062] According to this method, each of the one or more second component values in the second quantization matrix can be matched with the corresponding component value in the first quantization matrix. Therefore, it becomes unnecessary to derive the one or more second component values of the second quantization matrix from the first quantization matrix, thereby reducing the processing load.
[0063] Furthermore, in a decoding device according to one aspect of this disclosure, for example, the second quantization matrix may be derived by applying a quadratic transformation to the first quantization matrix.
[0064] According to this method, the second quantization matrix can be derived by applying a quadratic transformation to the first quantization matrix. Therefore, the first quantization matrix corresponding to the first-order space can be transformed into the second quantization matrix corresponding to the second-order space, thereby improving encoding efficiency while suppressing a decrease in subjective image quality.
[0065] Furthermore, in a decoding device according to one aspect of the present disclosure, for example, the circuit may further derive a third quantization matrix from the first quantization matrix, wherein each component value of the third quantization matrix is larger as the corresponding component value of the first quantization matrix decreases, and a fourth quantization matrix is derived by applying a quadratic transformation to the third quantization matrix, and a fifth quantization matrix is derived from the fourth quantization matrix as the second quantization matrix, wherein each component value of the fifth quantization matrix is larger as the corresponding component value of the fourth quantization matrix decreases.
[0066] According to this, the effect of rounding errors during quadratic transformation on components with relatively small values included in the first quantization matrix can be reduced. In other words, the effect of rounding errors on the values of components applied to coefficients for which we want to minimize loss in order to suppress the degradation of subjective image quality can be reduced. Therefore, the degradation of subjective image quality can be further suppressed.
[0067] Furthermore, in a decoding device according to one aspect of this disclosure, for example, each component value of the third quantization matrix may be the reciprocal of the corresponding component value of the first quantization matrix, and each component value of the fifth quantization matrix may be the reciprocal of the corresponding component value of the fourth quantization matrix.
[0068] According to this method, the reciprocals of the corresponding component values of the first and fourth quantization matrices can be used as the component values of the third and fifth quantization matrices. Therefore, the component values can be derived with simple calculations, reducing the processing load or processing time required to derive the second quantization matrix.
[0069] Furthermore, in a decoding device according to one aspect of this disclosure, for example, the first inverse quantization may be a weighted inverse quantization using a quantization matrix, and the second inverse quantization may be an unweighted inverse quantization that does not use a quantization matrix.
[0070] According to this, a non-weighted inverse quantization that does not use a quantization matrix can be used as the second inverse quantization. Therefore, it is possible to avoid a decrease in subjective image quality caused by using the first quantization matrix for the first inverse quantization for the second inverse quantization, while omitting the encoding or derivation process of the quantization matrix for the second quantization.
[0071] Furthermore, in a decoding device according to one aspect of the present disclosure, for example, the first inverse quantization is a weighted inverse quantization using a first quantization matrix, the second inverse quantization calculates the quadratic coefficient by multiplying each of the quantization coefficients by a common quantization step, and the inverse quadratic transformation calculates the linear coefficient by (i) inversely transforming the quadratic coefficients into weighted linear coefficients, and (ii) dividing each of the weighted linear coefficients by the corresponding component value of the weight matrix.
[0072] According to this method, the linear coefficients can be calculated by dividing each weighted linear coefficient by the corresponding component value of the weight matrix. In other words, the weighting related to quantization can be applied to the linear coefficients before the quadratic transformation. Therefore, when an inverse quadratic transformation is applied, it is possible to perform inverse quantization equivalent to weighted inverse quantization without having to prepare a new quantization matrix corresponding to the quadratic space. As a result, encoding efficiency can be improved while suppressing the deterioration of subjective image quality.
[0073] Furthermore, in a decoding device according to one aspect of the present disclosure, for example, the circuit may further derive the weight matrix from the first quantization matrix.
[0074] According to this method, the weight matrix can be derived from the first quantization matrix. Therefore, the amount of code required for the weight matrix can be reduced, improving coding efficiency while suppressing a decrease in subjective image quality.
[0075] Furthermore, in a decoding device according to one aspect of the present disclosure, for example, the circuit may further derive the common quantization step from the quantization parameters for the block to be decoded.
[0076] According to this method, a common quantization step can be derived from the quantization parameters for the quadratic coefficients of the block to be decoded. Therefore, it is not necessary to include new information in the encoded stream for the common quantization step, and the amount of code required for the common quantization step can be reduced.
[0077] A decoding method according to one aspect of the present disclosure is a decoding method for decoding a target block of an image, comprising: decoding the quantization coefficients of the target block from an encoded bitstream; determining whether or not to apply an inverse quadratic transform to the target block; if the inverse quadratic transform is not applied, calculating a linear coefficient by performing a first inverse quantization on the quantization coefficients; performing an inverse linear transform from the linear coefficients to the residual of the target block; if the inverse quadratic transform is applied, calculating a quadratic coefficient by performing a second inverse quantization different from the first inverse quantization on the quantization coefficients; performing an inverse quadratic transform from the quadratic coefficients to the linear coefficients; and performing an inverse linear transform from the linear coefficients to the residual of the target block.
[0078] This allows for achieving the same effects as the above-mentioned decoding device.
[0079] A decoding device according to one aspect of the present disclosure is a decoding device for decoding a block of an image, comprising a circuit and a memory, wherein the circuit uses the memory to decode the quantization coefficients of the block to be decoded from an encoded bitstream, determines whether or not to apply an inverse quadratic transform to the block to be decoded, calculates a linear coefficient by performing a first inverse quantization on the quantization coefficients if the inverse quadratic transform is not applied, performs an inverse linear transform from the linear coefficients to the residual of the block to be decoded if the inverse quadratic transform is applied, performs an inverse quadratic transform from the quantization coefficients to a quantized linear coefficient, calculates a linear coefficient by performing a second inverse quantization on the quantized linear coefficient, and performs an inverse linear transform from the linear coefficients to the residual of the block to be decoded.
[0080] According to this, the encoding device can perform quantization before the quadratic transformation, so if the quadratic transformation process is lossless, the quadratic transformation can be removed from the prediction processing loop. Therefore, the load on the processing pipeline can be reduced. In addition, by performing quantization before the quadratic transformation, there is no need to separate the first and second quantization matrices, which also simplifies the processing.
[0081] A decoding method according to one aspect of the present disclosure is a decoding method for decoding a block of an image, comprising: decoding the quantization coefficients of the block to be decoded from an encoded bitstream; determining whether or not to apply an inverse quadratic transform to the block to be decoded; if the inverse quadratic transform is not applied, calculating a linear coefficient by performing a first inverse quantization on the quantization coefficients; performing an inverse linear transform from the linear coefficients to the residual of the block to be decoded; if the inverse quadratic transform is applied, performing an inverse quadratic transform from the quantization coefficients to a quantized linear coefficient; calculating a linear coefficient by performing a second inverse quantization on the quantized linear coefficients; and performing an inverse linear transform from the linear coefficients to the residual of the block to be decoded.
[0082] This allows for achieving the same effects as the above-mentioned decoding device.
[0083] These general or specific embodiments may be implemented as a system, integrated circuit, computer program, or recording medium such as a computer-readable CD-ROM, or as any combination of system, method, integrated circuit, computer program, and recording medium.
[0084] The embodiments will be described in detail below with reference to the drawings.
[0085] The embodiments described below are all comprehensive or specific examples. The numerical values, shapes, materials, components, arrangement and connection configurations of components, steps, and the order of steps shown in the following embodiments are examples only and are not intended to limit the scope of the claims. Furthermore, among the components in the following embodiments, those not described in the independent claim representing the highest-level concept will be described as optional components.
[0086] (Embodiment 1) First, an overview of Embodiment 1 will be given as an example of an encoding and decoding device to which the processes and / or configurations described in each aspect of this disclosure, described later, can be applied. However, Embodiment 1 is merely an example of an encoding and decoding device to which the processes and / or configurations described in each aspect of this disclosure can be applied, and the processes and / or configurations described in each aspect of this disclosure can also be implemented in encoding and decoding devices different from Embodiment 1.
[0087] When applying the processes and / or configurations described in each aspect of this disclosure to Embodiment 1, for example, one of the following may be performed:
[0088] (1) With respect to the encoding or decoding device of Embodiment 1, replace the component corresponding to the component described in each aspect of the disclosure with the component described in each aspect of the disclosure, among the plurality of components constituting the encoding or decoding device. (2) With respect to the encoding or decoding device of Embodiment 1, any modifications such as adding, replacing, or deleting functions or processes performed by some of the multiple components constituting the encoding or decoding device are made, and then the components corresponding to the components described in each aspect of the Disclosure are replaced with the components described in each aspect of the Disclosure. (3) Adding processing to and / or replacing, deleting, or otherwise modifying some of the processing included in the method performed by the encoding or decoding device of Embodiment 1, and then replacing the processing corresponding to the processing described in each aspect of the Disclosure with the processing described in each aspect of the Disclosure. (4) Combining some of the multiple components constituting the encoding or decoding device of Embodiment 1 with a component described in each aspect of the Disclosure, a component that has some of the functions of the component described in each aspect of the Disclosure, or a component that performs some of the processing performed by the component described in each aspect of the Disclosure. (5) A component that has some of the functions of some of the components constituting the encoding or decoding device of Embodiment 1, or a component that performs some of the processing performed by some of the components constituting the encoding or decoding device of Embodiment 1, in combination with a component described in each aspect of this disclosure, a component that has some of the functions of the components described in each aspect of this disclosure, or a component that performs some of the processing performed by the components described in each aspect of this disclosure. (6) With respect to the method performed by the encoding or decoding device of Embodiment 1, replace with the process corresponding to the process described in each aspect of the Disclosure among the multiple processes included in the method with the process described in each aspect of the Disclosure. (7) Performing some of the processes included in the method performed by the encoding or decoding device of Embodiment 1 in combination with the processes described in each aspect of the present disclosure.
[0089] The methods of implementing the processes and / or configurations described in each aspect of this disclosure are not limited to the examples above. For example, they may be implemented in a device used for a purpose other than the video / image encoding device or video / image decoding device disclosed in Embodiment 1, or the processes and / or configurations described in each embodiment may be implemented individually. Furthermore, the processes and / or configurations described in different embodiments may be implemented in combination.
[0090] [Overview of the coding device] First, an overview of the encoding device according to Embodiment 1 will be described. Figure 1 is a block diagram showing the functional configuration of the encoding device 100 according to Embodiment 1. The encoding device 100 is a video / image encoding device that encodes video / images in block units.
[0091] As shown in Figure 1, the encoding device 100 is a device that encodes an image in block units and comprises a division unit 102, a subtraction unit 104, a transformation unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse transformation unit 114, an addition unit 116, a block memory 118, a loop filter unit 120, a frame memory 122, an intra prediction unit 124, an inter prediction unit 126, and a prediction control unit 128.
[0092] The encoding device 100 can be implemented, for example, by a general-purpose processor and memory. In this case, when a software program stored in memory is executed by the processor, the processor functions as a splitting unit 102, a subtraction unit 104, a conversion unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse conversion unit 114, an addition unit 116, a loop filter unit 120, an intra prediction unit 124, an inter prediction unit 126, and a prediction control unit 128. Alternatively, the encoding device 100 may be implemented as one or more dedicated electronic circuits corresponding to the splitting unit 102, a subtraction unit 104, a conversion unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse conversion unit 114, an addition unit 116, a loop filter unit 120, an intra prediction unit 124, an inter prediction unit 126, and a prediction control unit 128.
[0093] The following describes each component included in the encoding device 100.
[0094] [Divided part] The splitting unit 102 divides each picture contained in the input video into multiple blocks and outputs each block to the subtraction unit 104. For example, the splitting unit 102 first divides the picture into blocks of a fixed size (e.g., 128x128). These fixed-size blocks are sometimes called coding tree units (CTUs). Then, based on recursive quadtree and / or binary tree block partitioning, the splitting unit 102 divides each of the fixed-size blocks into blocks of a variable size (e.g., 64x64 or less). These variable-size blocks are sometimes called coding units (CUs), prediction units (PUs), or transformation units (TUs). In this embodiment, CUs, PUs, and TUs do not need to be distinguished, and some or all of the blocks in the picture may become processing units for CUs, PUs, and TUs.
[0095] Figure 2 shows an example of block partitioning in Embodiment 1. In Figure 2, solid lines represent block boundaries due to quadtree block partitioning, and dashed lines represent block boundaries due to binary tree block partitioning.
[0096] Here, block 10 is a 128x128 pixel square block (128x128 block). This 128x128 block 10 is first divided into four 64x64 square blocks (quadtree block partitioning).
[0097] The top-left 64x64 block is further divided vertically into two rectangular 32x64 blocks, and the left 32x64 block is further divided vertically into two rectangular 16x64 blocks (binary tree block partitioning). As a result, the top-left 64x64 block is divided into two 16x64 blocks 11 and 12 and a 32x64 block 13.
[0098] The 64x64 block in the upper right is horizontally divided into two rectangular 64x32 blocks, 14 and 15 (binary tree block division).
[0099] The bottom-left 64x64 block is divided into four square 32x32 blocks (quadrutree block division). Of the four 32x32 blocks, the top-left and bottom-right blocks are further divided. The top-left 32x32 block is vertically divided into two rectangular 16x32 blocks, and the rightmost 16x32 block is further horizontally divided into two 16x16 blocks (binary tree block division). The bottom-right 32x32 block is horizontally divided into two 32x16 blocks (binary tree block division). As a result, the bottom-left 64x64 block is divided into 16x32 block 16, two 16x16 blocks 17 and 18, two 32x32 blocks 19 and 20, and two 32x16 blocks 21 and 22.
[0100] The 64x64 block 23 in the bottom right will not be divided.
[0101] As described above, in Figure 2, block 10 is divided into 13 variable-sized blocks 11-23 based on recursive quad-tree and binary tree block partitioning. Such partitioning is sometimes called QTBT (quad-tree plus binary tree) partitioning.
[0102] In Figure 2, one block was divided into four or two blocks (quadrutree or binary tree block partitioning), but the partitioning is not limited to these. For example, one block may be divided into three blocks (ternary tree block partitioning). Partitioning that includes such ternary tree block partitioning is sometimes called MBT (multi-type tree) partitioning.
[0103] [Subtraction Unit] The subtraction unit 104 subtracts the predicted signal (predicted sample) from the original signal (original sample) in block units divided by the division unit 102. In other words, the subtraction unit 104 calculates the prediction error (also called the residual) of the block to be encoded (hereinafter referred to as the current block). The subtraction unit 104 then outputs the calculated prediction error to the conversion unit 106.
[0104] The source signal is the input signal to the encoding device 100, and is a signal representing the image of each picture that makes up the moving image (for example, a luminance (luma) signal and two chroma (chroma) signals). In the following, the signal representing the image may also be called a sample.
[0105] [Conversion section] The conversion unit 106 converts the prediction error in the spatial domain into conversion coefficients in the frequency domain and outputs the conversion coefficients to the quantization unit 108. Specifically, the conversion unit 106 performs a predetermined discrete cosine transform (DCT) or discrete sine transform (DST) on the prediction error in the spatial domain, for example.
[0106] The transformation unit 106 may also adaptively select a transformation type from among several transformation types and use a transformation basis function corresponding to the selected transformation type to convert the prediction error into transformation coefficients. Such a transformation is sometimes called an EMT (explicit multiple core transform) or an AMT (adaptive multiple transform).
[0107] Multiple transformation types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. Figure 3 is a table showing the transformation basis functions corresponding to each transformation type. In Figure 3, N represents the number of input pixels. The selection of a transformation type from among these multiple transformation types may depend, for example, on the type of prediction (intra-prediction and inter-prediction) or on the intra-prediction mode.
[0108] Information indicating whether or not to apply such EMT or AMT (e.g., called an AMT flag) and information indicating the selected conversion type are signaled at the CU level. However, the signaling of this information is not limited to the CU level and may be at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).
[0109] Furthermore, the transformation unit 106 may retransform the transformation coefficients (transformation results). Such retransformation is sometimes called AST (adaptive secondary transform) or NSST (non-separable secondary transform). For example, the transformation unit 106 performs retransformation for each subblock (e.g., 4x4 subblock) contained in the block of transformation coefficients corresponding to the intra-prediction error. Information indicating whether or not to apply NSST and information regarding the transformation matrix used for NSST are signaled at the CU level. Note that the signaling of this information is not limited to the CU level, but may be at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).
[0110] Here, a separable transformation is a method in which the input is separated into directions equal to the number of dimensions and transformed multiple times, while a non-separable transformation is a method in which, when the input is multidimensional, two or more dimensions are treated as one dimension and transformed together.
[0111] For example, one example of a non-separable transformation is to treat a 4x4 block as a single array with 16 elements and then perform a transformation on that array using a 16x16 transformation matrix.
[0112] Similarly, the Hypercube Givens Transform, which treats a 4x4 input block as a single array with 16 elements and then performs multiple Givens rotations on that array, is another example of a non-separable transformation.
[0113] [Quantization section] The quantization unit 108 quantizes the conversion coefficients output from the conversion unit 106. Specifically, the quantization unit 108 scans the conversion coefficients of the current block in a predetermined scanning order and quantizes the conversion coefficients based on the quantization parameter (QP) corresponding to the scanned conversion coefficients. The quantization unit 108 then outputs the quantized conversion coefficients of the current block (hereinafter referred to as quantization coefficients) to the entropy coding unit 110 and the inverse quantization unit 112.
[0114] The predetermined order is the order for quantization / inverse quantization of the transformation coefficients. For example, the predetermined scanning order is defined as ascending frequency (from low frequency to high frequency) or descending frequency (from high frequency to low frequency).
[0115] Quantization parameters are parameters that define the quantization step (quantization width). For example, if the value of the quantization parameter increases, the quantization step also increases. In other words, if the value of the quantization parameter increases, the quantization error increases.
[0116] [Entropy coding unit] The entropy coding unit 110 generates an encoded signal (encoded bitstream) by variable-length encoding the quantization coefficients, which are input from the quantization unit 108. Specifically, the entropy coding unit 110, for example, binarizes the quantization coefficients and arithmetically encodes the binary signal.
[0117] [Dequantization section] The inverse quantization unit 112 inversely quantizes the quantization coefficients, which are input from the quantization unit 108. Specifically, the inverse quantization unit 112 inversely quantizes the quantization coefficients of the current block in a predetermined scanning order. Then, the inverse quantization unit 112 outputs the inversely quantized conversion coefficients of the current block to the inverse conversion unit 114.
[0118] [Inverse Transformation Section] The inverse transform unit 114 restores the prediction error by inversely transforming the transformation coefficients, which are input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 restores the prediction error of the current block by performing an inverse transform on the transformation coefficients that corresponds to the transformation by the transformation unit 106. The inverse transform unit 114 then outputs the restored prediction error to the summation unit 116.
[0119] Furthermore, the recovered prediction error does not match the prediction error calculated by the subtraction unit 104 because information is lost due to quantization. In other words, the recovered prediction error includes quantization errors.
[0120] [Addition section] The adder 116 reconstructs the current block by adding the prediction error, which is the input from the inverse transformer 114, and the prediction sample, which is the input from the prediction control unit 128. The adder 116 then outputs the reconstructed block to the block memory 118 and the loop filter unit 120. The reconstructed block is sometimes called the local decoded block.
[0121] [Block memory] The block memory 118 is a storage unit for storing blocks within the picture to be encoded (hereinafter referred to as the current picture) that are referenced in intra prediction. Specifically, the block memory 118 stores the reconstructed blocks output from the adder 116.
[0122] [Loop Filter Section] The loop filter unit 120 applies a loop filter to the block reconstructed by the adder unit 116 and outputs the filtered reconstructed block to the frame memory 122. A loop filter is a filter used within the encoding loop (in-loop filter), and includes, for example, a deblocking filter (DF), sample adaptive offset (SAO), and adaptive loop filter (ALF).
[0123] In ALF, a least-squares error filter is applied to remove coding distortion. For example, for each 2x2 subblock within the current block, one filter selected from several filters is applied based on the direction and activity of the local gradient.
[0124] Specifically, first, subblocks (e.g., 2x2 subblocks) are classified into multiple classes (e.g., 15 or 25 classes). The classification of subblocks is based on the direction and activity of the gradient. For example, a classification value C (e.g., C = 5D + A) is calculated using the gradient direction value D (e.g., 0-2 or 0-4) and the gradient activity value A (e.g., 0-4). Then, based on the classification value C, the subblocks are classified into multiple classes (e.g., 15 or 25 classes).
[0125] The gradient direction value D is derived, for example, by comparing gradients in multiple directions (e.g., horizontal, vertical, and two diagonal directions). The gradient activation value A is derived, for example, by adding the gradients in multiple directions and quantizing the sum.
[0126] Based on the results of this classification, a filter for the subblock is determined from among multiple filters.
[0127] For example, a circularly symmetric shape is used as the filter shape in ALF. Figures 4A to 4C show several examples of filter shapes used in ALF. Figure 4A shows a 5x5 diamond-shaped filter, Figure 4B shows a 7x7 diamond-shaped filter, and Figure 4C shows a 9x9 diamond-shaped filter. Information indicating the filter shape is signaled at the picture level. However, the signaling of information indicating the filter shape is not limited to the picture level and may be at other levels (e.g., sequence level, slice level, tile level, CTU level, or CU level).
[0128] The on / off status of ALF is determined, for example, at the picture level or CU level. For instance, the decision to apply ALF to luminance is made at the CU level, and the decision to apply ALF to color difference is made at the picture level. Information indicating whether ALF is on or off is signaled at the picture level or CU level. However, the signaling of information indicating whether ALF is on or off is not limited to the picture level or CU level, but may be at other levels (e.g., sequence level, slice level, tile level, or CTU level).
[0129] The coefficient sets of multiple selectable filters (e.g., up to 15 or 25 filters) are signaled at the picture level. However, the signaling of the coefficient sets is not limited to the picture level; it may be at other levels (e.g., sequence level, slice level, tile level, CTU level, CU level, or subblock level).
[0130] [Frame memory] The frame memory 122 is a storage unit for storing reference pictures used for interpretation, and is sometimes called a frame buffer. Specifically, the frame memory 122 stores the reconstructed blocks filtered by the loop filter unit 120.
[0131] [Intra Prediction Unit] The intra-prediction unit 124 generates a prediction signal (intra-prediction signal) by performing intra-prediction (also called in-screen prediction) of the current block by referring to the block in the current picture stored in the block memory 118. Specifically, the intra-prediction unit 124 generates an intra-prediction signal by performing intra-prediction by referring to samples (e.g., luminance values, color difference values) of blocks adjacent to the current block, and outputs the intra-prediction signal to the prediction control unit 128.
[0132] For example, the intra-prediction unit 124 performs intra-prediction using one of a predetermined set of intra-prediction modes. The set of intra-prediction modes includes one or more non-directional prediction modes and multiple directional prediction modes.
[0133] One or more non-directional prediction modes include, for example, the Planar prediction mode and DC prediction mode as defined in the H.265 / HEVC (High-Efficiency Video Coding) standard (Non-Patent Document 1).
[0134] Multiple directional prediction modes include, for example, the 33 directional prediction modes defined in the H.265 / HEVC standard. Note that multiple directional prediction modes may also include 32 additional directional prediction modes (a total of 65 directional prediction modes). Figure 5A shows 67 intra-prediction modes (2 non-directional prediction modes and 65 directional prediction modes) in intra-prediction. Solid arrows represent the 33 directions defined in the H.265 / HEVC standard, and dashed arrows represent the additional 32 directions.
[0135] Furthermore, in the intra-prediction of a color difference block, a luminance block may be referenced. That is, the color difference component of the current block may be predicted based on the luminance component of the current block. Such intra-prediction is sometimes called CCLM (cross-component linear model) prediction. Such an intra-prediction mode for a color difference block that references a luminance block (e.g., called the CCLM mode) may be added as one of the intra-prediction modes for a color difference block.
[0136] The intra-prediction unit 124 may correct the pixel values after intra-prediction based on the gradient of the horizontal / vertical reference pixels. Intra-prediction with such correction is sometimes called PDPC (position dependent intra-prediction combination). Information indicating whether or not PDPC is applied (for example, called a PDPC flag) is signaled at, for example, the CU level. Note that the signaling of this information is not limited to the CU level, but may be at other levels (for example, sequence level, picture level, slice level, tile level, or CTU level).
[0137] [International Prediction Department] The inter-prediction unit 126 generates a prediction signal (inter-prediction signal) by performing inter-prediction (also called inter-screen prediction) of the current block by referring to a reference picture stored in the frame memory 122 that is different from the current picture. Inter-prediction is performed in units of the current block or sub-blocks within the current block (e.g., 4x4 blocks). For example, the inter-prediction unit 126 performs motion estimation within the reference picture for the current block or sub-block. Then, the inter-prediction unit 126 generates an inter-prediction signal for the current block or sub-block by performing motion compensation using motion information (e.g., motion vectors) obtained from the motion estimation. Finally, the inter-prediction unit 126 outputs the generated inter-prediction signal to the prediction control unit 128.
[0138] The motion information used for motion compensation is converted into a signal. A motion vector predictor may be used to convert the motion vector into a signal. In other words, the difference between the motion vector and the predicted motion vector may be converted into a signal.
[0139] Furthermore, an inter-prediction signal may be generated using not only the motion information of the current block obtained through motion search, but also the motion information of adjacent blocks. Specifically, an inter-prediction signal may be generated for each sub-block within the current block by weighted addition of a prediction signal based on motion information obtained through motion search and a prediction signal based on the motion information of adjacent blocks. Such inter-prediction (motion compensation) is sometimes called OBMC (overlapped block motion compensation).
[0140] In this OBMC mode, information indicating the size of the subblock for OBMC (e.g., called the OBMC block size) is signaled at the sequence level. Information indicating whether or not to apply OBMC mode (e.g., called the OBMC flag) is signaled at the CU level. Note that the signaling levels for this information are not limited to the sequence and CU levels; other levels (e.g., picture level, slice level, tile level, CTU level, or subblock level) may also be used.
[0141] Let's explain the OBMC mode in more detail. Figures 5B and 5C are flowcharts and conceptual diagrams illustrating the overview of the predictive image correction process using OBMC processing.
[0142] First, a predicted image (Pred) is obtained using normal motion compensation with the motion vector (MV) assigned to the block to be encoded.
[0143] Next, the motion vector (MV_L) of the encoded left adjacent block is applied to the block to be encoded to obtain a predicted image (Pred_L), and the first correction of the predicted image is performed by superimposing the predicted image and Pred_L with weights.
[0144] Similarly, the motion vector (MV_U) of the encoded upper adjacent block is applied to the block to be encoded to obtain a predicted image (Pred_U). The predicted image is then corrected a second time by weighting the first corrected predicted image and Pred_U, and this is used as the final predicted image.
[0145] While this explanation describes a two-stage correction method using the left adjacent block and the upper adjacent block, it is also possible to use the right adjacent block and the lower adjacent block to perform corrections more than two times.
[0146] Furthermore, the area to be superimposed does not have to be the entire pixel area of the block, but rather only a portion of the area near the block boundary.
[0147] Although this explanation describes the predictive image correction process using a single reference picture, the process is similar when correcting predictive images from multiple reference pictures. After obtaining corrected predictive images from each reference picture, the resulting predictive images are superimposed to create the final predictive image.
[0148] The processing target block may be a prediction block unit, or it may be a sub-block unit obtained by further dividing the prediction block.
[0149] One method for determining whether or not to apply OBMC processing is to use an obmc_flag signal, which indicates whether or not to apply OBMC processing. Specifically, in an encoding device, it is determined whether or not the block to be encoded belongs to a region with complex motion. If it belongs to a region with complex motion, the obmc_flag is set to a value of 1 and OBMC processing is applied to perform encoding. If it does not belong to a region with complex motion, the obmc_flag is set to a value of 0 and encoding is performed without applying OBMC processing. On the other hand, in a decoding device, the obmc_flag written in the stream is decoded, and the device switches whether or not to apply OBMC processing depending on its value and performs decoding.
[0150] Furthermore, motion information may be derived by the decoder without being converted into a signal. For example, the merge mode specified in the H.265 / HEVC standard may be used. Alternatively, motion information may be derived by performing a motion search on the decoder side. In this case, the motion search is performed without using the pixel values of the current block.
[0151] Here, we will explain the mode in which motion detection is performed on the decoding device side. This mode in which motion detection is performed on the decoding device side is sometimes called PMMVD (pattern matched motion vector derivation) mode or FRUC (frame rate up-conversion) mode.
[0152] An example of FRUC processing is shown in Figure 5D. First, a list of multiple candidates (which may be the same as the merge list) is generated, each having a predicted motion vector, by referencing the motion vectors of spatially or temporally adjacent encoded blocks to the current block. Next, the best candidate MV is selected from among the multiple candidate MVs registered in the candidate list. For example, an evaluation value is calculated for each candidate included in the candidate list, and one candidate is selected based on the evaluation value.
[0153] Then, based on the motion vectors of the selected candidates, a motion vector for the current block is derived. Specifically, for example, the motion vector of the selected candidate (best candidate MV) is directly derived as the motion vector for the current block. Alternatively, for example, the motion vector for the current block may be derived by performing pattern matching in the area surrounding the position in the reference picture corresponding to the motion vector of the selected candidate. That is, a similar search is performed in the area surrounding the best candidate MV, and if an MV with a better evaluation value is found, the best candidate MV may be updated to this MV and used as the final MV for the current block. It is also possible to configure the system so that this process is not performed.
[0154] The same processing method can be used when processing at the sub-block level.
[0155] The evaluation value is calculated by determining the difference value of the reconstructed image through pattern matching between a region in the reference picture corresponding to the motion vector and a predetermined region. Alternatively, the evaluation value may be calculated using information other than the difference value.
[0156] For pattern matching, either first-order pattern matching or second-order pattern matching is used. First-order pattern matching and second-order pattern matching are sometimes called bilateral matching and template matching, respectively.
[0157] In the first pattern matching, pattern matching is performed between two blocks in two different reference pictures that are aligned with the motion trajectory of the current block. Therefore, in the first pattern matching, a region in another reference picture aligned with the motion trajectory of the current block is used as a predetermined region for calculating the evaluation value of the candidate described above.
[0158] Figure 6 illustrates an example of pattern matching (bilateral matching) between two blocks along a motion trajectory. As shown in Figure 6, in the first pattern matching, two motion vectors (MV0, MV1) are derived by searching for the best-matching pair of two blocks within two different reference pictures (Ref0, Ref1) that are along the motion trajectory of the current block. Specifically, for the current block, the difference between the reconstructed image at a specified position in the first encoded reference picture (Ref0) specified by the candidate MV and the reconstructed image at a specified position in the second encoded reference picture (Ref1) specified by the symmetric MV obtained by scaling the candidate MV by the display time interval is derived, and an evaluation value is calculated using the obtained difference value. It is preferable to select the candidate MV with the best evaluation value among multiple candidate MVs as the final MV.
[0159] Under the assumption of a continuous motion trajectory, the motion vector (MV0, MV1) pointing to two reference blocks is proportional to the temporal distance (TD0, TD1) between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1). For example, if the current picture is temporally located between the two reference pictures and the temporal distances from the current picture to the two reference pictures are equal, then the first pattern matching derives a mirror-symmetric bidirectional motion vector.
[0160] In the second pattern matching, pattern matching is performed between the template in the current picture (blocks adjacent to the current block in the current picture (e.g., blocks above and / or to the left)) and the blocks in the reference picture. Therefore, in the second pattern matching, the blocks adjacent to the current block in the current picture are used as a predetermined area for calculating the evaluation value of the candidates mentioned above.
[0161] Figure 7 illustrates an example of pattern matching (template matching) between a template in the current picture and a block in the reference picture. As shown in Figure 7, in the second pattern matching, the motion vector of the current block is derived by searching in the reference picture (Ref0) for the block that best matches the block adjacent to the current block (Cur block) in the current picture (Cur Pic). Specifically, for the current block, the difference is derived between the reconstructed image of the encoded region of both or either of the left adjacent and upper adjacent regions and the reconstructed image at the equivalent position in the encoded reference picture (Ref0) specified by the candidate MV. An evaluation value is calculated using the obtained difference value, and the candidate MV with the best evaluation value among multiple candidate MVs is selected as the best candidate MV.
[0162] Information indicating whether or not to apply such a FRUC mode (e.g., called the FRUC flag) is signaled at the CU level. Furthermore, if the FRUC mode is applied (e.g., the FRUC flag is true), information indicating the pattern matching method (first pattern matching or second pattern matching) (e.g., called the FRUC mode flag) is signaled at the CU level. Note that the signaling of this information is not limited to the CU level; it may be at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or subblock level).
[0163] Here, we will explain a mode for deriving motion vectors based on a model that assumes uniform linear motion. This mode is sometimes called the BIO (bi-directional optical flow) mode.
[0164] Figure 8 is a diagram illustrating a model assuming uniform linear motion. In Figure 8, (vx, vy) represents the velocity vector, and τ0 and τ1 represent the temporal distance between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1), respectively. (MVx0, MVy0) represents the motion vector corresponding to reference picture Ref0, and (MVx1, MVy1) represents the motion vector corresponding to reference picture Ref1.
[0165] Under the assumption of uniform linear motion of the velocity vector (vx, vy), (MVx0, MVy0) and (MVx1, MVy1) can be expressed as (vxτ0, vyτ0) and (-vxτ1, -vyτ1), respectively, and the following optical flow equality (1) holds.
[0166]
number
[0167] Here, I(k) represents the luminance value of the reference image k (k=0,1) after motion compensation. This optical flow equation shows that the sum of (i) the time derivative of the luminance value, (ii) the product of the horizontal velocity and the horizontal component of the spatial gradient of the reference image, and (iii) the product of the vertical velocity and the vertical component of the spatial gradient of the reference image is equal to zero. Based on this optical flow equation and Hermite interpolation, block-level motion vectors obtained from merge lists, etc., are corrected on a pixel-by-pixel basis.
[0168] Furthermore, motion vectors may be derived on the decoding side using a method different from that used for deriving motion vectors based on a model that assumes uniform linear motion. For example, motion vectors may be derived on a sub-block basis based on the motion vectors of multiple adjacent blocks.
[0169] Here, we will describe a mode in which motion vectors are derived at the sub-block level based on the motion vectors of multiple adjacent blocks. This mode is sometimes called the affine motion compensation prediction mode.
[0170] Figure 9A illustrates the derivation of subblock-level motion vectors based on the motion vectors of multiple adjacent blocks. In Figure 9A, the current block contains 16 4x4 subblocks. Here, the motion vector v0 of the upper left corner control point of the current block is derived based on the motion vectors of the adjacent blocks, and the motion vector v1 of the upper right corner control point of the current block is derived based on the motion vectors of the adjacent subblocks. Then, using the two motion vectors v0 and v1, the motion vector (vx, vy) of each subblock within the current block is derived by equation (2) below.
[0171]
number
[0172] Here, x and y represent the horizontal and vertical positions of the subblock, respectively, and w represents a predetermined weighting coefficient.
[0173] Such affine motion compensation prediction modes may include several modes in which the motion vectors of the upper-left and upper-right corner control points are derived. Information indicating such affine motion compensation prediction modes (e.g., called affine flags) is signaled at the CU level. Note that the signaling of this information indicating affine motion compensation prediction modes is not limited to the CU level, but may be at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or subblock level).
[0174] [Prediction Control Unit] The prediction control unit 128 selects either the intra-prediction signal or the inter-prediction signal and outputs the selected signal as the prediction signal to the subtraction unit 104 and the addition unit 116.
[0175] Here, we will explain an example of deriving the motion vector of a picture to be encoded using merge mode. Figure 9B is a diagram illustrating the overview of the motion vector derivation process using merge mode.
[0176] First, a list of predicted MVs is generated, containing registered candidates for predicted MVs. Candidates for predicted MVs include spatially adjacent predicted MVs, which are the MVs of multiple encoded blocks located spatially around the block to be encoded; temporally adjacent predicted MVs, which are the MVs of nearby blocks projected onto the location of the block to be encoded in the encoded reference picture; combined predicted MVs, which are generated by combining the MV values of spatially adjacent predicted MVs and temporally adjacent predicted MVs; and zero predicted MVs, which are MVs with a value of zero.
[0177] Next, one predicted MV is selected from the multiple predicted MVs registered in the predicted MV list to determine it as the MV for the block to be encoded.
[0178] Furthermore, the variable-length coding unit encodes the merge_idx signal, which indicates which predicted MV was selected, by writing it to a stream.
[0179] Note that the predicted MVs registered in the predicted MV list explained in Figure 9B are just an example, and the number of predicted MVs may differ from the number shown in the figure, the configuration may not include some of the types of predicted MVs shown in the figure, or it may include predicted MVs other than those shown in the figure.
[0180] Alternatively, the final MV may be determined by performing the DMVR process described later using the MV of the target block to be encoded derived by merge mode.
[0181] Here, we will explain an example of determining the MV using DMVR processing.
[0182] Figure 9C is a conceptual diagram illustrating the overview of DMVR processing.
[0183] First, the optimal MVP set for the block to be processed is used as a candidate MV. According to the candidate MV, reference pixels are obtained from the first reference picture, which is a processed picture in the L0 direction, and the second reference picture, which is a processed picture in the L1 direction, and a template is generated by taking the average of each reference pixel.
[0184] Next, using the template, the surrounding regions of candidate MVs for the first and second reference pictures are searched, and the MV with the lowest cost is determined as the final MV. The cost value is calculated using the difference between each pixel value of the template and each pixel value of the search region, as well as the MV value, etc.
[0185] Note that the general outline of the processing described here is basically the same for both the encoding and decoding devices.
[0186] Note that any process that can explore the vicinity of a candidate MV and derive the final MV may be used instead of the exact process described here.
[0187] Here, we will explain the mode for generating predictive images using LIC processing.
[0188] Figure 9D is a diagram illustrating the outline of a predictive image generation method using luminance correction processing by LIC processing.
[0189] First, we derive a Music Model (MV) to obtain the reference image corresponding to the block to be encoded from the reference picture, which is an encoded picture.
[0190] Next, for the block to be encoded, information indicating how the luminance values have changed between the reference picture and the picture to be encoded is extracted using the luminance pixel values of the left-adjacent and top-adjacent encoded surrounding reference regions, and the luminance pixel values at the equivalent positions in the reference picture specified by MV, and a luminance correction parameter is calculated.
[0191] By performing brightness correction processing on the reference image within the reference picture specified in MV using the brightness correction parameter, a predicted image for the encoding target block is generated.
[0192] Note that the shape of the surrounding reference region in Figure 9D is just one example, and other shapes may be used.
[0193] Furthermore, while this explanation describes the process of generating a predicted image from a single reference picture, the process is similar when generating predicted images from multiple reference pictures. Brightness correction processing is performed on each reference image obtained from a single reference picture in the same manner before generating the predicted image.
[0194] One method for determining whether or not to apply LIC processing is to use a signal called lic_flag, which indicates whether or not to apply LIC processing. Specifically, in an encoding device, it is determined whether or not the block to be encoded belongs to a region where brightness changes occur. If it belongs to a region where brightness changes occur, the value of lic_flag is set to 1 and LIC processing is applied and encoding is performed. If it does not belong to a region where brightness changes occur, the value of lic_flag is set to 0 and encoding is performed without applying LIC processing. On the other hand, in a decoding device, the lic_flag written in the stream is decoded, and the device switches whether or not to apply LIC processing according to its value and performs decoding.
[0195] Another way to determine whether to apply LIC processing is, for example, by checking whether LIC processing has been applied to surrounding blocks. A specific example is that if the block to be encoded is in merge mode, during the MV derivation in merge mode processing, it is determined whether the surrounding encoded blocks selected were encoded with LIC processing. Based on this result, the application of LIC processing is switched, and encoding is performed accordingly. In this example, the decoding process is exactly the same.
[0196] [Overview of the decryption device] Next, an overview of a decoding device capable of decoding the encoded signal (encoded bitstream) output from the above-mentioned encoding device 100 will be described. Figure 10 is a block diagram showing the functional configuration of the decoding device 200 according to Embodiment 1. The decoding device 200 is a video / image decoding device that decodes video / images in block units.
[0197] As shown in Figure 10, the decoding device 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transform unit 206, an adder unit 208, a block memory 210, a loop filter unit 212, a frame memory 214, an intra prediction unit 216, an inter prediction unit 218, and a prediction control unit 220.
[0198] The decoding device 200 can be implemented, for example, by a general-purpose processor and memory. In this case, when the software program stored in memory is executed by the processor, the processor functions as an entropy decoding unit 202, an inverse quantization unit 204, an inverse transformation unit 206, an addition unit 208, a loop filter unit 212, an intra prediction unit 216, an inter prediction unit 218, and a prediction control unit 220. Alternatively, the decoding device 200 may be implemented as one or more dedicated electronic circuits corresponding to the entropy decoding unit 202, the inverse quantization unit 204, the inverse transformation unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220.
[0199] The following describes each component included in the decoding device 200.
[0200] [Entropy Decoder] The entropy decoding unit 202 entropically decodes the encoded bitstream. Specifically, the entropy decoding unit 202 arithmetically decodes the encoded bitstream into a binary signal, for example. Then, the entropy decoding unit 202 debinarizes the binary signal. As a result, the entropy decoding unit 202 outputs the quantization coefficients in block units to the inverse quantization unit 204.
[0201] [Dequantization section] The inverse quantization unit 204 inversely quantizes the quantization coefficients of the decoded block (hereinafter referred to as the current block), which is the input from the entropy decoding unit 202. Specifically, for each quantization coefficient of the current block, the inverse quantization unit 204 inversely quantizes the quantization coefficient based on the quantization parameter corresponding to that quantization coefficient. The inverse quantization unit 204 then outputs the inversely quantized quantization coefficients (i.e., transformation coefficients) of the current block to the inverse transformation unit 206.
[0202] [Inverse Transformation Section] The inverse transform unit 206 restores the prediction error by inversely transforming the transformation coefficients, which are input from the inverse quantization unit 204.
[0203] For example, if the information decoded from the encoded bitstream indicates that EMT or AMT should be applied (e.g., the AMT flag is true), the inverse transform unit 206 inversely transforms the transformation coefficients of the current block based on the information indicating the decoded transformation type.
[0204] For example, if the information decoded from the encoded bitstream indicates that NSST should be applied, the inverse transform unit 206 applies inverse retransformation to the transformation coefficients.
[0205] [Addition section] The adder 208 reconstructs the current block by adding the prediction error, which is the input from the inverse transformer 206, and the prediction sample, which is the input from the prediction control unit 220. The adder 208 then outputs the reconstructed block to the block memory 210 and the loop filter unit 212.
[0206] [Block memory] The block memory 210 is a storage unit for storing blocks that are referenced in intra prediction and are located within the decoded picture (hereinafter referred to as the current picture). Specifically, the block memory 210 stores the reconstructed blocks output from the adder 208.
[0207] [Loop Filter Section] The loop filter unit 212 applies a loop filter to the block reconstructed by the adder unit 208 and outputs the filtered reconstructed block to the frame memory 214 and the display device, etc.
[0208] If the information interpreted from the encoded bitstream indicating ALF on / off indicates ALF is on, one filter is selected from among several filters based on the direction and activity of the local gradient, and the selected filter is applied to the reconstruction block.
[0209] [Frame memory] The frame memory 214 is a memory unit for storing reference pictures used for interpretation, and is sometimes called a frame buffer. Specifically, the frame memory 214 stores the reconstructed blocks filtered by the loop filter unit 212.
[0210] [Intra Prediction Unit] The intra-prediction unit 216 generates a prediction signal (intra-prediction signal) by performing intra-prediction based on the intra-prediction mode decoded from the encoded bitstream, and by referring to the blocks in the current picture stored in the block memory 210. Specifically, the intra-prediction unit 216 generates an intra-prediction signal by performing intra-prediction by referring to samples (e.g., luminance values, chrominance values) of blocks adjacent to the current block, and outputs the intra-prediction signal to the prediction control unit 220.
[0211] Furthermore, if an intra-prediction mode that references a luminance block is selected in the intra-prediction of a color difference block, the intra-prediction unit 216 may predict the color difference component of the current block based on the luminance component of the current block.
[0212] Furthermore, if the information decoded from the encoded bitstream indicates the application of PDPC, the intra-prediction unit 216 corrects the pixel value after intra-prediction based on the gradient of the reference pixels in the horizontal / vertical directions.
[0213] [International Prediction Department] The inter-prediction unit 218 predicts the current block by referring to a reference picture stored in the frame memory 214. Prediction is performed in units of the current block or sub-blocks within the current block (e.g., 4x4 blocks). For example, the inter-prediction unit 218 generates an inter-prediction signal for the current block or sub-block by performing motion compensation using motion information (e.g., motion vectors) decoded from the encoded bitstream, and outputs the inter-prediction signal to the prediction control unit 220.
[0214] Furthermore, if the information decoded from the encoded bitstream indicates that OBMC mode should be applied, the interpretation unit 218 generates an interpretation prediction signal using not only the motion information of the current block obtained by motion search, but also the motion information of adjacent blocks.
[0215] Furthermore, if the information decoded from the encoded bitstream indicates that FRUC mode should be applied, the interpretation unit 218 derives motion information by performing a motion search according to the pattern matching method (bilateral matching or template matching) decoded from the encoded stream. Then, the interpretation unit 218 performs motion compensation using the derived motion information.
[0216] Furthermore, when the BIO mode is applied, the inter-prediction unit 218 derives motion vectors based on a model that assumes uniform linear motion. Also, if the information decoded from the encoded bitstream indicates that the affine motion compensation prediction mode should be applied, the inter-prediction unit 218 derives motion vectors on a sub-block basis based on the motion vectors of multiple adjacent blocks.
[0217] [Prediction Control Unit] The prediction control unit 220 selects either the intra-prediction signal or the inter-prediction signal and outputs the selected signal as the prediction signal to the adder 208.
[0218] [Conversion, quantization, and encoding processes in encoding devices] Next, the conversion, quantization, and encoding processes performed by the conversion unit 106, quantization unit 108, and entropy encoding unit 110 of the encoding device 100 configured as described above will be explained in detail with reference to the drawings.
[0219] Figure 11 is a flowchart showing an example of the conversion process, quantization process, and encoding process in Embodiment 1. Each step shown in Figure 11 is performed by the conversion unit 106, quantization unit 108, or entropy encoding unit 110 of the encoding device 100 according to Embodiment 1.
[0220] First, the conversion unit 106 performs a linear transformation from the residual of the block to be encoded to a linear coefficient (S101). The linear transformation is, for example, a separable transformation. Specifically, the linear transformation is, for example, DCT or DST.
[0221] Next, the transformation unit 106 determines whether or not to perform a quadratic transformation on the linear coefficients (S102). In other words, the transformation unit 106 determines whether or not to apply a quadratic transformation to the blocks to be encoded. For example, the transformation unit 106 determines whether or not to perform a quadratic transformation based on the difference between the original image and the reconstructed image and / or the cost based on the code amount. Note that the determination of whether or not to perform a quadratic transformation is not limited to such a cost-based determination. For example, the determination of whether or not to perform a quadratic transformation may be based on the prediction mode, block size, picture type, or any combination thereof.
[0222] If it is determined that no quadratic transformation is to be performed (No. in S102), the quantization unit 108 calculates the quantized linear coefficients by performing first quantization on the linear coefficients (S103). First quantization is weighted quantization using the first quantization matrix. In first quantization, quantization steps weighted for each coefficient by the first quantization matrix are used. The first quantization matrix is a weight matrix for adjusting the size of the quantization step for each coefficient. The size of the first quantization matrix matches the size of the block to be encoded. In other words, the number of components in the first quantization matrix matches the number of coefficients in the block to be encoded.
[0223] On the other hand, if it is determined that a quadratic transformation should be performed (Yes in S102), the transformation unit 106 performs a quadratic transformation from linear coefficients to quadratic coefficients (S104). In a quadratic transformation, a different basis is used than the basis used in the linear transformation. For example, a quadratic transformation is a non-separable transformation. The basis used in a quadratic transformation is defined in advance by a standard, for example.
[0224] Subsequently, the quantization unit 108 calculates the quantized quadratic coefficient by performing a second quantization on the quadratic coefficient that is different from the first quantization (S105). The second quantization, which is different from the first quantization, means that the parameters or quantization method used for quantization are different between the first and second quantization. The parameters used for quantization are, for example, the quantization matrix or the quantization parameters.
[0225] In this embodiment, the second quantization uses different quantization parameters than the first quantization. Specifically, the second quantization is a weighted quantization that uses a second quantization matrix different from the first quantization matrix. In the second quantization, quantization steps weighted according to the second quantization matrix are used.
[0226] The second quantization matrix is a weight matrix used to adjust the magnitude of the quantization step for each coefficient. The second quantization matrix has different component values than the first quantization matrix. The size of the second quantization matrix matches the size of the block being coded. That is, the number of components in the second quantization matrix matches the number of coefficients in the block being coded.
[0227] The entropy coding unit 110 generates an encoded bitstream by entropy coding the first-order or second-order quantization coefficients (S106). At this time, the entropy coding unit 110 writes the first quantization matrix and the second quantization matrix to the encoded bitstream.
[0228] Furthermore, if the quadratic transformation is performed only on one or more first-order coefficients included in the linear coefficients within the block to be encoded, then only one or more first-component values of the second quantization matrix corresponding to the one or more first-order coefficients on which the quadratic transformation is performed may be written to the encoded bitstream, while each of the one or more second-component values of the second quantization matrix corresponding to the one or more second-order coefficients on which the quadratic transformation is not performed may not be written to the encoded bitstream and may be shared with the corresponding component value of the first quantization matrix. In other words, each of the one or more second-component values of the second quantization matrix may coincide with the corresponding component value of the first quantization matrix. Note that one or more first-order coefficients are, for example, coefficients in the low-frequency region, and one or more second-order coefficients are, for example, coefficients in the high-frequency region.
[0229] Furthermore, the entropy coding unit 110 may write information to the coded bitstream indicating whether or not to apply a quadratic transformation to the block to be coded.
[0230] The positions of the first and second quantization matrices within the encoded bitstream are not particularly limited. For example, the first and second quantization matrices may be written to (i) the video parameter set (VPS), (ii) the sequence parameter set (SPS), (iii) the picture parameter set (PPS), (iv) the slice header, or (v) the video system configuration parameters, as shown in Figure 12.
[0231] Thus, in this embodiment, different quantization is performed depending on whether a quadratic transformation is performed or not. In other words, the quantization unit 108 switches between the first and second quantization based on whether a quadratic transformation is applied to the block to be encoded. In particular, in this embodiment, different quantization matrices are used depending on whether a quadratic transformation is performed or not. In other words, in this embodiment, the quantization unit 108 switches between the first and second quantization matrices to perform quantization based on whether a quadratic transformation is applied to the block to be encoded or not.
[0232] [Decoding, inverse quantization, and inverse transformation processes in a decoding device] Next, the decoding process, inverse quantization process, and inverse transformation process performed by the entropy decoding unit 202, inverse quantization unit 204, and inverse transformation unit 206 of the decoding device 200 according to this embodiment will be specifically described with reference to the drawings.
[0233] Figure 13 is a flowchart showing an example of the decoding process, inverse quantization process, and inverse transformation process in Embodiment 1. Each step shown in Figure 13 is performed by the entropy decoding unit 202, the inverse quantization unit 204, or the inverse transformation unit 206.
[0234] First, the entropy decoding unit 202 entropically decodes the encoded quantization coefficients of the block to be decoded from the encoded bitstream (S201). The decoded quantization coefficients are either first-order or second-order quantization coefficients. Furthermore, the entropy decoding unit 202 reads the first quantization matrix and the second quantization matrix from the encoded bitstream. If the inverse quadratic transformation is performed only on one or more first quadratic coefficients included in the block to be decoded, the unit reads only one or more first component values of the second quantization matrix corresponding to the one or more first quadratic coefficients on which the inverse quadratic transformation is performed from the encoded bitstream, and each of the one or more second component values of the second quantization matrix corresponding to one or more second quadratic coefficients on which the inverse quadratic transformation is not performed may be the same as the corresponding component value of the first quantization matrix. In other words, each of the one or more second component values of the second quantization matrix may coincide with the corresponding component value of the first quantization matrix. Furthermore, the entropy decoding unit 202 may read information from the encoded bitstream indicating whether or not the inverse quadratic transformation is applied to the block to be decoded.
[0235] The inverse transform unit 206 determines whether or not to perform an inverse quadratic transform based on the encoded bitstream (S202). In other words, the inverse transform unit 206 determines whether or not to apply an inverse quadratic transform to the block to be decoded. For example, the inverse transform unit 206 determines whether or not to perform an inverse quadratic transform based on information indicating whether or not to apply an inverse quadratic transform read from the encoded bitstream.
[0236] If it is determined that no inverse quadratic transformation is to be performed (No. in S202), the inverse quantization unit 204 calculates the linear coefficients by performing first inverse quantization on the decoded quantization coefficients (S203). First inverse quantization is the inverse quantization of the first quantization in the encoding device 100. In this embodiment, first inverse quantization is weighted inverse quantization using the first quantization matrix.
[0237] On the other hand, if it is determined that an inverse quadratic transform should be performed (Yes in S202), the inverse quantization unit 204 calculates quadratic coefficients by performing a second inverse quantization, which is different from the first inverse quantization, on the decoded quantization coefficients (S204). The second inverse quantization is the inverse quantization of the second quantization in the encoding device 100. In this embodiment, the second inverse quantization is a weighted inverse quantization using the second quantization matrix. Subsequently, the inverse transform unit 206 performs an inverse quadratic transform from the quadratic coefficients calculated by the second inverse quantization to the linear coefficients (S205). The inverse quadratic transform is the inverse transform of the quadratic transform in the encoding device 100.
[0238] The inverse transform unit 206 performs an inverse linear transform from the linear coefficients obtained by the inverse quadratic transform or first inverse quantization to the residual of the block to be decoded (S206). The inverse linear transform is the inverse transform of the linear transform in the encoding device 100.
[0239] Thus, in this embodiment, different inverse quantization is performed depending on whether an inverse quadratic transform is performed or not. In other words, the inverse quantization unit 204 switches between the first inverse quantization and the second inverse quantization based on whether an inverse quadratic transform is applied to the block to be decoded. In particular, in this embodiment, different quantization matrices are used depending on whether an inverse quadratic transform is performed or not. In other words, in this embodiment, the inverse quantization unit 204 performs inverse quantization by switching between the first quantization matrix and the second quantization matrix based on whether an inverse quadratic transform is applied or not.
[0240] [Effects, etc.] As described above, the encoding device 100 and decoding device 200 according to this embodiment can perform different quantization / inverse quantization depending on whether or not a quadratic transformation / inverse quadratic transformation is applied to the current block. The quadratic coefficients obtained by quadratic transformation from a linear coefficient expressed in the first space will be expressed in a secondary space that is not the primary space. Therefore, even if quantization / inverse quantization for the linear coefficients is applied to the quadratic coefficients, it is difficult to improve encoding efficiency while suppressing the deterioration of subjective image quality. For example, the quantization required to reduce the loss of low-frequency components in order to suppress the deterioration of subjective image quality and to increase the loss of high-frequency components in order to improve encoding efficiency will differ between the primary space and the secondary space. Therefore, by performing different quantization / inverse quantization depending on whether or not a quadratic transformation / inverse quadratic transformation is applied to the current block, it is possible to improve encoding efficiency while suppressing the deterioration of subjective image quality compared to the case where common quantization / inverse quantization is performed.
[0241] Furthermore, according to the encoding device 100 and decoding device 200 of this embodiment, weighted quantization / inverse quantization using a first quantization matrix can be performed as first quantization / first inverse quantization. In addition, weighted quantization / inverse quantization using a second quantization matrix different from the first quantization matrix can be performed as second quantization / second inverse quantization. Therefore, a first quantization matrix corresponding to the first-order space can be used for quantization / inverse quantization for first-order coefficients, and a second quantization matrix corresponding to the second-order space can be used for quantization / inverse quantization for second-order coefficients. Thus, encoding efficiency can be improved while suppressing a decrease in subjective image quality in both the application and non-application of the second-order transform / inverse second-order transform.
[0242] Furthermore, according to the encoding device 100 and decoding device 200 of this embodiment, the first quantization matrix and the second quantization matrix can be included in the encoded bitstream. Therefore, the first quantization matrix and the second quantization matrix can be adaptively determined according to the original image, and furthermore, encoding efficiency can be improved while suppressing a decrease in subjective image quality.
[0243] In this embodiment, the first and second quantization matrices were included in the encoded bitstream, but this is not limited to this. For example, the first and second quantization matrices may be transmitted from the encoding device to the decoding device separately from the encoded bitstream. Alternatively, the first and second quantization matrices may be predefined in a standard specification. In this case, the first and second quantization matrices are sometimes called default matrices. Alternatively, the first and second quantization matrices may be selected from a plurality of default matrices based on a given profile or level, etc.
[0244] This means that the first and second quantization matrices do not need to be included in the encoded bitstream, and the amount of code required for the first and second quantization matrices can be reduced.
[0245] In this embodiment, we have described the case where one basis is fixedly used in the quadratic / inverse quadratic transform, but this is not the only case. For example, in the quadratic / inverse quadratic transform, a predetermined number of basis sets may be selectively used. In this case, for example, the encoded bitstream may contain multiple second quantization matrices corresponding to multiple basis sets. Then, in the second quantization / second inverse quantization, a second quantization matrix corresponding to the basis used in the quadratic / inverse quadratic transform may be selected from among the multiple second quantization matrices.
[0246] This allows for second quantization / second inverse quantization using a second quantization matrix corresponding to the basis used in the quadratic / inverse quadratic transform. The characteristics of the quadratic space representing the quadratic coefficients differ depending on the basis used in the quadratic / inverse quadratic transform. Therefore, by performing second quantization / second inverse quantization using a second quantization matrix corresponding to the basis used in the quadratic / inverse quadratic transform, it is possible to perform second quantization / second inverse quantization using a quantization matrix that more closely corresponds to the quadratic space, thereby improving encoding efficiency while suppressing a decrease in subjective image quality.
[0247] (Embodiment 2) Next, Embodiment 2 will be described. This embodiment differs from Embodiment 1 in that the second quantization matrix used in the second quantization is derived from the first quantization matrix used in the first quantization. Below, this embodiment will be described in detail with reference to the drawings, focusing on the differences from Embodiment 1.
[0248] [Conversion, quantization, and encoding processes in encoding devices] The conversion, quantization, and encoding processes performed by the conversion unit 106, quantization unit 108, and entropy encoding unit 110 of the encoding device 100 according to Embodiment 2 will be described in detail with reference to the drawings.
[0249] Figure 14 is a flowchart showing an example of the transformation, quantization, and encoding processes in Embodiment 2. In Figure 14, processes that are substantially the same as those in Figure 11 are denoted by the same reference numerals, and their descriptions are omitted as appropriate.
[0250] In this embodiment, after a quadratic transformation is performed (S104), the quantization unit 108 derives a second quantization matrix from the first quantization matrix (S111). For example, the quantization unit 108 derives the second quantization matrix by applying a quadratic transformation to the first quantization matrix. In other words, the quantization unit 108 transforms the first quantization matrix using the basis used in the quadratic transformation of the block to be encoded.
[0251] In addition, when the second conversion is performed only on one or more first primary coefficients included in the primary coefficients within the block to be encoded, one or more first component values of the second quantization matrix corresponding to the one or more first primary coefficients on which the second conversion is performed are derived from the first quantization matrix, and for each of one or more second component values of the second quantization matrix corresponding to one or more second primary coefficients on which the second conversion is not performed, it may be common with the corresponding component value of the first quantization matrix. That is, each of one or more second component values of the second quantization matrix may coincide with the corresponding component value of the first quantization matrix.
[0252] The quantization unit 108 calculates the quantized secondary coefficients by performing second quantization on the secondary coefficients (S105). In this second quantization, the second quantization matrix derived in step S111 is used.
[0253] The entropy encoding unit 110 generates an encoded bit stream by performing entropy encoding on the quantized primary coefficients or the quantized secondary coefficients (S112). Further, in the present embodiment, the entropy encoding unit 110 writes the first quantization matrix into the encoded bit stream. Conversely, the entropy encoding unit 110 does not write the second quantization matrix into the encoded bit stream.
[0254] As described above, the quantization unit 108 switches between the first quantization matrix and the second quantization matrix based on the application / non-application of the second conversion to the block to be encoded, and performs quantization. At this time, the quantization unit 108 derives the second quantization matrix from the first quantization matrix.
[0255] [Decoding process, inverse quantization process, and inverse conversion process in the decoding device] Next, the decoding process, inverse quantization process, and inverse conversion process performed by the entropy decoding unit 202, inverse quantization unit 204, and inverse conversion unit 206 of the decoding device 200 according to the present embodiment will be specifically described while referring to the drawings.
[0256] Figure 15 is a flowchart showing an example of the decoding process, inverse quantization process, and inverse transform process in Embodiment 2. In Figure 15, processes that are substantially the same as those in Figure 13 are denoted by the same reference numerals, and their descriptions are omitted as appropriate.
[0257] First, the entropy decoding unit 202 decodes the encoded quantization coefficients contained in the encoded bitstream (S211). At this time, the entropy decoding unit 202 reads the first quantization matrix from the encoded bitstream.
[0258] The inverse transform unit 206 determines whether or not to perform an inverse quadratic transform based on the encoded bitstream, similar to Embodiment 1 (S202). If it is determined that an inverse quadratic transform should not be performed (No in S202), the inverse quantization unit 204 performs first inverse quantization on the decoded quantization coefficients, similar to Embodiment 1 (S203).
[0259] On the other hand, if it is determined that an inverse quadratic transformation should be performed (Yes in S202), the inverse quantization unit 204 derives the second quantization matrix from the first quantization matrix (S212). Specifically, the inverse quantization unit 204 derives the second quantization matrix in the same way as the encoding device 100. For example, the inverse quantization unit 204 derives the second quantization matrix by applying a quadratic transformation to the first quantization matrix. In other words, the inverse quantization unit 204 transforms the first quantization matrix using the basis used for the quadratic transformation of the block to be decoded. If the inverse quadratic transformation is performed only on the first quadratic coefficients of 1 or more included in the quadratic coefficients of the block to be decoded, the first component values of the second quantization matrix corresponding to the first quadratic coefficients of 1 or more on which the inverse quadratic transformation is performed are derived from the first quantization matrix, and each of the first component values of the second quantization matrix corresponding to the second quadratic coefficients of 1 or more on which the inverse quadratic transformation is not performed may be the same as the corresponding component values of the first quantization matrix. In other words, each of the one or more second component values of the second quantization matrix may coincide with the corresponding component value of the first quantization matrix.
[0260] Subsequently, the processes from step S204 onward are carried out.
[0261] Thus, the inverse quantization unit 204 performs inverse quantization by switching between the first and second quantization matrices based on whether or not an inverse quadratic transform is applied to the block to be decoded. At this time, the inverse quantization unit 204 derives the second quantization matrix from the first quantization matrix. Therefore, even if the second quantization matrix is not included in the encoded bitstream, the decoding device 200 can perform the second inverse quantization.
[0262] [Effects, etc.] As described above, the encoding device 100 and decoding device 200 according to this embodiment allow the second quantization matrix to be derived from the first quantization matrix. Therefore, it becomes unnecessary to transmit the second quantization matrix to the decoding device, thus improving encoding efficiency.
[0263] Furthermore, according to the encoding device 100 and decoding device 200 of this embodiment, the second quantization matrix can be derived by applying a quadratic transformation to the first quantization matrix. Therefore, the first quantization matrix corresponding to the primary space can be transformed into the second quantization matrix corresponding to the secondary space, thereby improving encoding efficiency while suppressing a decrease in subjective image quality.
[0264] (Modified version of Embodiment 2) In this embodiment, an example of deriving the second quantization matrix by directly applying a quadratic transformation to the first quantization matrix was described, but this is not the only method. Other examples of methods for deriving the second quantization matrix will be described below with reference to Figure 16.
[0265] Figure 16 is a flowchart showing an example of the derivation process of the second quantization matrix in a modified example of Embodiment 2. This flowchart shows an example of the process in step S111 of Figure 14 and step S212 of Figure 15.
[0266] In Figure 16, the quantization unit 108 or the dequantization unit 204 derives the third quantization matrix from the first quantization matrix (S301). At this time, the value of each component of the third quantization matrix is larger the smaller the corresponding component value of the first quantization matrix is. In other words, as the component value of the first quantization matrix increases, the corresponding component value of the third quantization matrix decreases. Put another way, the component values of the first quantization matrix and the component values of the third quantization matrix have a monotonically decreasing relationship. For example, each component value of the third quantization matrix is the reciprocal of the corresponding component value of the first quantization matrix.
[0267] Next, the quantization unit 108 or the inverse quantization unit 204 derives the fourth quantization matrix by applying a quadratic transformation to the third quantization matrix (S302). In other words, the quantization unit 108 or the inverse quantization unit 204 transforms the third quantization matrix using the basis used in the quadratic transformation of the current block.
[0268] Finally, the quantization unit 108 or the inverse quantization unit 204 derives the fifth quantization matrix as the second quantization matrix from the fourth quantization matrix (S303). At this time, the value of each component of the fifth quantization matrix is larger the smaller the corresponding component value of the fourth quantization matrix is. In other words, as the component value of the fourth quantization matrix increases, the corresponding component value of the fifth quantization matrix decreases. To put it another way, the component values of the fourth quantization matrix and the component values of the fifth quantization matrix have a monotonically decreasing relationship. For example, each component value of the fifth quantization matrix is the reciprocal of the corresponding component value of the fourth quantization matrix.
[0269] As described above, by deriving the second quantization matrix, the effect of rounding errors during quadratic transformation on components with relatively small values included in the first quantization matrix can be reduced. In other words, the effect of rounding errors on the values of components applied to coefficients for which we want to minimize loss in order to suppress the deterioration of subjective image quality can be reduced. Therefore, the deterioration of subjective image quality can be further suppressed.
[0270] Also, as each component value of the third quantization matrix / fifth quantization matrix, the reciprocal of the corresponding component value of the first quantization matrix / fourth quantization matrix can be used. Therefore, the component value can be derived by simple calculation, and the processing load or processing time for deriving the second quantization matrix can be reduced.
[0271] (Embodiment 3) Next, Embodiment 3 will be described. In this embodiment, when the secondary conversion is performed, the point of quantizing the secondary coefficients without using the quantization matrix is different from Embodiment 1 above. Hereinafter, this embodiment will be specifically described with reference to the drawings, focusing on the points different from Embodiment 1 above.
[0272] [Conversion processing, quantization processing, and encoding processing in the encoding device] The conversion processing, quantization processing, and encoding processing performed by the conversion unit 106, quantization unit 108, and entropy encoding unit 110 of the encoding device 100 according to Embodiment 3 will be specifically described with reference to the drawings.
[0273] FIG. 17 is a flowchart showing an example of the conversion processing, quantization processing, and encoding processing in Embodiment 3. In FIG. 17, for the processing substantially the same as that in FIG. 11, the same reference numerals are given, and the description will be omitted as appropriate.
[0274] After the secondary conversion from the primary coefficients to the secondary coefficients is performed (S104), the quantization unit 108 calculates the quantized secondary coefficients by performing a second quantization different from the first quantization on the secondary coefficients (S121). In this embodiment, the second quantization is non-weighted quantization without using a quantization matrix. That is, the second quantization divides each secondary coefficient by a common quantization step. The common quantization step is derived from the quantization parameter for the block to be encoded. Specifically, the common quantization step is one constant fixed for all the secondary coefficients of the block to be encoded. That is, the common quantization step is a constant that does not depend on the position or order of the secondary coefficients.
[0275] Thus, in this embodiment, the quantization unit 108 switches between weighted quantization and unweighted quantization based on whether or not a quadratic transformation is applied to the block to be encoded.
[0276] [Decoding, inverse quantization, and inverse transformation processes in a decoding device] Next, the decoding process, inverse quantization process, and inverse transformation process performed by the entropy decoding unit 202, inverse quantization unit 204, and inverse transformation unit 206 of the decoding device 200 according to Embodiment 3 will be described in detail with reference to the drawings.
[0277] Figure 18 is a flowchart showing an example of the decoding process, inverse quantization process, and inverse transform process in Embodiment 3. In Figure 18, processes that are substantially the same as those in Figure 13 are denoted by the same reference numerals, and their descriptions are omitted as appropriate.
[0278] If it is determined that an inverse quadratic transformation should be performed (Yes in S202), the inverse quantization unit 204 calculates quadratic coefficients by performing a second inverse quantization, which is different from the first inverse quantization, on the decoded quantization coefficients (S221). The second inverse quantization is the inverse quantization of the second quantization in the encoding device 100. In this embodiment, the second inverse quantization is an unweighted inverse quantization that does not use a quantization matrix.
[0279] Thus, in this embodiment, the inverse quantization unit 204 switches between weighted inverse quantization and unweighted inverse quantization based on whether or not an inverse quadratic transform is applied to the block to be decoded.
[0280] [Effects, etc.] As described above, the encoding device 100 and decoding device 200 according to this embodiment can use unweighted quantization / inverse quantization as the second quantization / second inverse quantization. Therefore, it is possible to avoid a decrease in subjective image quality by not using the first quantization matrix for the first quantization / first inverse quantization for the second quantization / second inverse quantization, while omitting the encoding or derivation process of the quantization matrix for the second quantization.
[0281] (Embodiment 4) Next, Embodiment 4 will be described. This embodiment differs from Embodiment 3 in that each linear coefficient obtained by the linear transformation is multiplied by the corresponding component value of the weight matrix before the transformation is performed. Below, this embodiment will be described in detail with reference to the drawings, focusing on the differences from Embodiment 3.
[0282] [Conversion, quantization, and encoding processes in encoding devices] The conversion, quantization, and encoding processes performed by the conversion unit 106, quantization unit 108, and entropy encoding unit 110 of the encoding device 100 according to Embodiment 4 will be described in detail with reference to the drawings.
[0283] Figure 19 is a flowchart illustrating an example of the transformation, quantization, and encoding processes in Embodiment 4. Figure 20 is a diagram illustrating an example of a quadratic transformation in Embodiment 4. In Figure 19, processes that are substantially the same as those in Figure 17 are denoted by the same reference numerals, and their explanations are omitted as appropriate.
[0284] If it is determined that a quadratic transformation should be performed (Yes in S102), the transformation unit 106 performs a quadratic transformation from linear coefficients to quadratic coefficients (S130). Specifically, as shown in Figure 20, in the quadratic transformation, the transformation unit 106 calculates weighted linear coefficients by multiplying each linear coefficient by the corresponding component value of the weight matrix (S131). The weight matrix is a matrix for assigning weights to the linear coefficients. Then, the transformation unit 106 converts the weighted linear coefficients into quadratic coefficients (S132). This transformation is substantially the same as the quadratic transformation in each of the embodiments described above, for example, in which weighted linear coefficients are transformed instead of linear coefficients.
[0285] The weight matrix may be derived from the first quantization matrix. In this case, for example, the component values of the weight matrix and the component values of the first quantization matrix may have a monotonically decreasing relationship. Specifically, for example, each component value of the weight matrix may be the reciprocal of the corresponding component value of the first quantization matrix. This allows the first quantization matrix for weighting the quantization steps to be transformed into a weight matrix for weighting the coefficients.
[0286] Furthermore, the weight matrix may be included in the encoded bitstream or may be predefined in the standard. The standard may also define multiple weight matrices. In this case, the weight matrix may be selected from among several predefined weight matrices based on a given profile or level, etc.
[0287] The quantization unit 108 calculates the quantized quadratic coefficients by performing a second quantization on the quadratic coefficients that is different from the first quantization (S121). In this embodiment, the second quantization is an unweighted quantization that does not use a quantization matrix. That is, the second quantization divides each quadratic coefficient of the block to be encoded by a common quantization step. At this time, the common quantization step may be derived, for example, from the quantization parameters for the block to be encoded by the quantization unit 108.
[0288] [Decoding, inverse quantization, and inverse transformation processes in a decoding device] Next, the decoding process, inverse quantization process, and inverse transformation process performed by the entropy decoding unit 202, inverse quantization unit 204, and inverse transformation unit 206 of the decoding device 200 according to Embodiment 4 will be described in detail with reference to the drawings.
[0289] Figure 21 is a flowchart showing an example of the decoding process, inverse quantization process, and inverse transform process in Embodiment 4. Figure 22 is a diagram illustrating an example of the inverse quadratic transform in Embodiment 4. In Figure 21, processes that are substantially the same as those in Figure 18 are denoted by the same reference numerals, and their explanations are omitted as appropriate.
[0290] If it is determined that an inverse quadratic transformation should be performed (Yes in S202), the inverse quantization unit 204 calculates quadratic coefficients by performing a second inverse quantization on the decoded quantization coefficients that is different from the first inverse quantization (S221). The second inverse quantization is the inverse quantization of the second quantization in the encoding device 100. In this embodiment, the second inverse quantization is an unweighted inverse quantization that does not use a quantization matrix. That is, as shown in Figure 22, the inverse quantization unit 204 calculates quadratic coefficients by multiplying each of the quantization coefficients of the quantization coefficients of the block to be decoded by a common quantization step. In this case, the common quantization step may be derived, for example, from the quantization parameters for the block to be decoded.
[0291] Next, the inverse transform unit 206 performs an inverse quadratic transform from quadratic coefficients to linear coefficients (S230). Specifically, as shown in Figure 22, the inverse transform unit 206 performs an inverse transform from quadratic coefficients to weighted linear coefficients (S231). This inverse transform is the inverse transform of the transformation from weighted linear coefficients to quadratic coefficients in the encoding device 100 (S132).
[0292] Furthermore, the inverse transform unit 206 calculates the linear coefficients by dividing each of the weighted linear coefficients by the corresponding component value of the weight matrix (S232). This weight matrix matches the weight matrix used in the encoding device 100.
[0293] The weight matrix may be derived from the first quantization matrix by the inverse quantization unit 204. In this case, for example, the component values of the weight matrix and the component values of the first quantization matrix may have a monotonically decreasing relationship. For example, each component value of the weight matrix may be the reciprocal of the corresponding component value of the first quantization matrix.
[0294] Furthermore, the weight matrix may be included in the encoded bitstream or may be predefined in the standard. Multiple weight matrices may also be predefined in the standard. In this case, the weight matrix may be selected from among multiple predefined weight matrices based on a given profile or level, etc.
[0295] [Effects, etc.] As described above, the encoding device 100 according to this embodiment can calculate weighted linear coefficients by multiplying each linear coefficient by the corresponding component value of the weight matrix. Furthermore, the decoding device 200 according to this embodiment can calculate linear coefficients by dividing each weighted linear coefficient by the corresponding component value of the weight matrix. In other words, the encoding device 100 and decoding device 200 according to this embodiment can apply quantization weighting to the linear coefficients before the quadratic transformation. Therefore, when a quadratic transformation / inverse quadratic transformation is applied, quantization / inverse quantization equivalent to weighted quantization / inverse quantization can be performed without preparing a new quantization matrix corresponding to the quadratic space. As a result, encoding efficiency can be improved while suppressing a decrease in subjective image quality.
[0296] Furthermore, according to the encoding device 100 and decoding device 200 of this embodiment, the weight matrix can be derived from the first quantization matrix. Therefore, the amount of code required for the weight matrix can be reduced, and encoding efficiency can be improved while suppressing a decrease in subjective image quality.
[0297] Furthermore, according to the encoding device 100 and decoding device 200 of this embodiment, a common quantization step can be derived from the quantization parameters for the quadratic coefficients of the current block. Therefore, it is not necessary to include new information in the encoding stream for the common quantization step, and the amount of code for the common quantization step can be reduced.
[0298] (Embodiment 5) Next, Embodiment 5 will be described. This embodiment differs from the above embodiments in that, when a quadratic transformation is applied, quantization is performed on the linear coefficients before the quadratic transformation. Below, this embodiment will be described in detail with reference to the drawings, focusing on the differences from the above embodiments.
[0299] [Conversion, quantization, and encoding processes in encoding devices] The conversion, quantization, and encoding processes performed by the conversion unit 106, quantization unit 108, and entropy encoding unit 110 of the encoding device 100 according to Embodiment 5 will be described in detail with reference to the drawings.
[0300] Figure 23 is a flowchart showing an example of the transformation, quantization, and encoding processes in Embodiment 5. In Figure 23, processes that are substantially the same as those in Figure 11 are denoted by the same reference numerals, and their descriptions are omitted as appropriate.
[0301] If it is determined that no quadratic transformation is to be performed (No. in S102), the quantization unit 108 calculates the first quantized linear coefficient by performing first quantization on the linear coefficient (S141).
[0302] On the other hand, if it is determined that a quadratic transformation should be performed (Yes in S102), the quantization unit 108 calculates the second quantized primary coefficient by performing a second quantization on the primary coefficient (S142). In this embodiment, the first quantization and the second quantization may be different from each other or the same, as in embodiments 1 to 4 described above. In other words, in this embodiment, the same quantization matrix may be used and the same processing may be performed in both the first and second quantization. Subsequently, the transformation unit 106 performs a quadratic transformation from the second quantized primary coefficient to the quantized secondary coefficient (S143).
[0303] The entropy coding unit 110 generates an encoded bitstream by encoding the first quantization linear coefficient or the quantization quadratic coefficient (S106).
[0304] Thus, in this embodiment, when a quadratic transformation is applied to the block to be encoded, a second quantization is performed before the quadratic transformation. In other words, a second quantization is performed on the first coefficients.
[0305] [Decoding, inverse quantization, and inverse transformation processes in a decoding device] Next, the decoding process, inverse quantization process, and inverse transformation process performed by the entropy decoding unit 202, inverse quantization unit 204, and inverse transformation unit 206 of the decoding device 200 according to Embodiment 5 will be specifically described with reference to the drawings.
[0306] Figure 24 is a flowchart showing an example of the decoding process, inverse quantization process, and inverse transform process in Embodiment 5. In Figure 24, processes that are substantially the same as those in Figure 13 are denoted by the same reference numerals, and their descriptions are omitted as appropriate.
[0307] If it is determined that no inverse quadratic transformation is to be performed (No. in S202), the inverse quantization unit 204 calculates the linear coefficients by performing first inverse quantization on the decoded quantization coefficients (S241). First inverse quantization is the inverse quantization of the first quantization in the encoding device 100.
[0308] On the other hand, if it is determined that an inverse quadratic transform should be performed (Yes in S202), the inverse transform unit 206 performs an inverse quadratic transform from the decoded quantization coefficients to the quantization linear coefficients (S242). The inverse quadratic transform is the inverse of the quadratic transform in the encoding device 100. Subsequently, the inverse quantization unit 204 calculates the linear coefficients by performing a second inverse quantization on the quantization linear coefficients (S243). The second inverse quantization is the inverse quantization of the second quantization in the encoding device 100. Therefore, if the second quantization is the same as the first quantization, the second inverse quantization will be the same as the first inverse quantization.
[0309] Thus, in this embodiment, when an inverse quadratic transformation is applied to the block to be decoded, a second inverse quantization is performed after the inverse quadratic transformation. In other words, a second inverse quantization is performed on the first-order quantization coefficients.
[0310] [Effects, etc.] As described above, with the encoding device 100 and decoding device 200 according to this embodiment, quantization can be performed before the quadratic transformation. Therefore, if the quadratic transformation process is lossless, the quadratic transformation can be removed from the prediction processing loop. Consequently, the load on the processing pipeline can be reduced. Furthermore, by performing quantization before the quadratic transformation, there is no need to separate the first quantization matrix and the second quantization matrix, thus simplifying the processing.
[0311] (modified version) The above describes encoding and decoding devices according to one or more embodiments of the present disclosure based on embodiments, but the present disclosure is not limited to these embodiments. Without departing from the spirit of the present disclosure, various modifications to these embodiments that a person skilled in the art could conceive of, or configurations constructed by combining components from different embodiments, may also be included within the scope of one or more embodiments of the present disclosure.
[0312] For example, in Embodiment 2 described above, the derivation of the second quantization matrix is performed after the quadratic transformation or after the determination of the inverse quadratic transformation, but is not limited to this. The derivation of the second quantization matrix may be performed at any time after the first quantization matrix has been obtained and before the second quantization / inverse quantization. For example, the second quantization matrix may be derived at the start of encoding or decoding of the current picture including the current block. In this case, the second quantization matrix does not have to be derived for each block.
[0313] Although the above embodiments primarily described the encoding / decoding of a single target block, the transformation, quantization, and encoding processes, or the decoding, inverse quantization, and inverse transformation processes described above, can be applied to multiple blocks contained within the target picture. In this case, a first quantization matrix and a second quantization matrix corresponding to the prediction mode (e.g., intra-prediction or inter-prediction), the type of pixel value (e.g., luminance or chrominance), the block size, or any combination thereof may be used.
[0314] Furthermore, the quantization switching process based on the application / non-application of the quadratic transformation in each of the above embodiments may be turned on / off at the slice level, tile level, CTU level, or CU level. The on / off status may also be determined according to the frame type (I-frame, P-frame, B-frame) and / or the prediction mode.
[0315] Furthermore, the quantization switching process based on the application / non-application of the quadratic transformation in each of the above embodiments may be performed on either the luminance block or the chrominance block, or on both.
[0316] In the embodiments described above, the determination of whether or not to perform a secondary transformation was made after the primary transformation, but this is not limited to this. The determination of whether or not to perform a secondary transformation may be made in advance before processing the block to be encoded.
[0317] Furthermore, in the above embodiment 1, the first quantization matrix and the second quantization matrix do not necessarily have to be different.
[0318] (Embodiment 6) In each of the above embodiments, each functional block can typically be implemented by an MPU and memory, etc. Furthermore, the processing performed by each functional block is typically implemented by a program execution unit such as a processor reading and executing software (program) recorded on a recording medium such as ROM. This software may be distributed by download, etc., or it may be recorded on a recording medium such as semiconductor memory and distributed. Of course, it is also possible to implement each functional block by hardware (dedicated circuitry).
[0319] Furthermore, the processing described in each embodiment may be implemented by centralized processing using a single device (system), or by distributed processing using multiple devices. Also, the processor executing the above program may be one or multiple. In other words, centralized processing may be performed, or distributed processing may be performed.
[0320] The embodiments of this disclosure are not limited to those described above, and various modifications are possible, which are also included within the scope of the embodiments of this disclosure.
[0321] Furthermore, here we will describe application examples of the video encoding method (image encoding method) or video decoding method (image decoding method) shown in each of the above embodiments, and a system using the same. The system is characterized by having an image encoding device using the image encoding method, an image decoding device using the image decoding method, and an image encoding and decoding device that includes both. Other configurations in the system can be appropriately modified as needed.
[0322] [Usage example] Figure 25 shows the overall configuration of the content supply system ex100 that realizes the content distribution service. The communication service area is divided into desired sizes, and fixed radio stations, base stations ex106, ex107, ex108, ex109, and ex110, are installed in each cell.
[0323] In this content supply system ex100, various devices such as a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 are connected to the internet ex101 via an internet service provider ex102 or a communication network ex104, and base stations ex106~ex110. The content supply system ex100 may also connect any combination of the above elements. Each device may be directly or indirectly connected to each other via a telephone network or short-range radio, etc., without going through the base stations ex106~ex110, which are fixed radio stations. In addition, the streaming server ex103 is connected to various devices such as a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 via the internet ex101, etc. Furthermore, the streaming server ex103 is connected to terminals in a hotspot on an airplane ex117 via satellite ex116.
[0324] Note that instead of base stations ex106~ex110, wireless access points or hotspots may be used. Also, streaming server ex103 may be connected directly to the communication network ex104 without going through the internet ex101 or internet service provider ex102, or it may be connected directly to the airplane ex117 without going through satellite ex116.
[0325] Camera ex113 is a device capable of taking still images and videos, such as a digital camera. Smartphone ex115 is a smartphone, mobile phone, or PHS (Personal Handyphone System) that supports mobile communication systems generally known as 2G, 3G, 3.9G, 4G, and the upcoming 5G.
[0326] Home appliance ex118 refers to appliances such as refrigerators or equipment included in household fuel cell cogeneration systems.
[0327] In the content supply system ex100, live streaming becomes possible when a terminal with a shooting function is connected to the streaming server ex103 via a base station ex106 or the like. In live streaming, the terminal (computer ex111, game console ex112, camera ex113, home appliance ex114, smartphone ex115, and terminal inside an airplane ex117, etc.) performs the encoding process described in each of the above embodiments on still images or video content captured by the user using the terminal, multiplexes the video data obtained by encoding with sound data encoded from the sound corresponding to the video, and transmits the obtained data to the streaming server ex103. In other words, each terminal functions as an image encoding device according to one aspect of this disclosure.
[0328] Meanwhile, the streaming server ex103 streams the content data sent to the requesting client. The client is a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, a smartphone ex115, or a terminal on an airplane ex117, etc., that is capable of decoding the encoded data. Each device that receives the distributed data decodes and plays back the received data. That is, each device functions as an image decoding device according to one aspect of this disclosure.
[0329] [Distributed Processing] Furthermore, the streaming server ex103 may consist of multiple servers or computers that distribute data processing, recording, and distribution. For example, the streaming server ex103 may be implemented using a CDN (Content Delivery Network), where content delivery is achieved through a network connecting numerous edge servers distributed worldwide. In a CDN, the physically closest edge server is dynamically assigned depending on the client. Latency can be reduced by caching and delivering content to the edge server. In addition, if an error occurs or the communication state changes due to an increase in traffic, processing can be distributed among multiple edge servers, the delivery entity can be switched to another edge server, or delivery can be continued by bypassing the failed part of the network, thus enabling high-speed and stable delivery.
[0330] Furthermore, beyond the distributed processing of the distribution itself, the encoding process of the captured data can be performed on each terminal, on the server side, or shared among them. For example, encoding generally involves two processing loops. In the first loop, the complexity or code amount of the image at the frame or scene level is detected. In the second loop, processing is performed to improve encoding efficiency while maintaining image quality. For example, if the terminal performs the first encoding process and the server that receives the content performs the second encoding process, it is possible to improve the quality and efficiency of the content while reducing the processing load on each terminal. In this case, if there is a request to receive and decode near real time, the first encoded data from the terminal can be received and played back on other terminals, enabling more flexible real-time distribution.
[0331] Another example is the camera ex113, which extracts features from an image, compresses the feature data as metadata, and sends it to the server. The server performs compression according to the meaning of the image, for example, by determining the importance of an object from the features and switching the quantization precision. Feature data is particularly effective in improving the accuracy and efficiency of motion vector prediction during further compression on the server. Alternatively, a simple encoding such as VLC (Variable Length Coding) may be performed on the terminal, and a more computationally intensive encoding such as CABAC (Context-Adaptive Binary Arithmetic Coding) may be performed on the server.
[0332] Another example is a scenario in a stadium, shopping mall, or factory where multiple video data sets of nearly identical scenes may exist, captured by multiple terminals. In such cases, the encoding process is distributed among the multiple terminals that captured the footage, along with other terminals and servers as needed, by assigning encoding tasks to each unit, for example, at the Group of Picture (GOP) level, picture level, or tile level (a division of a picture). This reduces latency and enables more real-time performance.
[0333] Furthermore, since multiple video data sets depict essentially the same scene, the server may manage and / or instruct the video data captured by each terminal to reference each other. Alternatively, the server may receive the encoded data from each terminal, change the reference relationships between the multiple data sets, or correct or replace the pictures themselves and re-encode them. This allows for the creation of a stream with improved quality and efficiency for each individual data set.
[0334] Furthermore, the server may transcode the video data to change its encoding method before distributing it. For example, the server may convert an MPEG-based encoding method to a VP-based encoding method, or convert H.264 to H.265.
[0335] Thus, the encoding process can be performed by a terminal or one or more servers. Therefore, in the following, the terms "server" or "terminal" will be used to refer to the entity performing the processing, but some or all of the processing performed by the server may be performed by the terminal, and some or all of the processing performed by the terminal may be performed by the server. The same applies to the decoding process.
[0336] [3D, Multi-angle] In recent years, it has become increasingly common to integrate and utilize images or videos of different scenes, or the same scene, captured from different angles, using multiple cameras ex113 and / or smartphones ex115, which are nearly synchronized with each other. The videos captured by each device are integrated based on the relative positional relationship between the devices, or on areas where feature points contained in the videos coincide, which are acquired separately.
[0337] The server may not only encode 2D video but also encode still images automatically based on scene analysis of the video, or at a time specified by the user, and send them to the receiving terminal. Furthermore, if the server can obtain the relative positional relationship between the shooting terminals, it can generate a 3D shape of the scene based not only on 2D video but also on video of the same scene taken from different angles. The server may also separately encode 3D data generated by a point cloud, or it may select or reconstruct video to send to the receiving terminal from video taken by multiple terminals based on the results of recognizing or tracking a person or object using the 3D data.
[0338] In this way, users can enjoy scenes by arbitrarily selecting each video corresponding to each shooting terminal, or they can enjoy content in which video from an arbitrary viewpoint is extracted from 3D data reconstructed using multiple images or videos. Furthermore, just like the video, sound can also be collected from multiple different angles, and the server may multiplex and transmit sound from a specific angle or space in conjunction with the video.
[0339] In recent years, content that links the real world with a virtual world, such as Virtual Reality (VR) and Augmented Reality (AR), has also become popular. In the case of VR images, the server may create separate viewpoint images for the right and left eyes and perform encoding that allows referencing between the viewpoint images using Multi-View Coding (MVC), or it may encode them as separate streams without referencing each other. When decoding the separate streams, it is advisable to synchronize playback so that the virtual 3D space is reproduced according to the user's viewpoint.
[0340] In the case of AR images, the server superimposes virtual object information from the virtual space onto camera information from the real space, based on its three-dimensional position or the user's viewpoint movement. The decoding device may acquire or store the virtual object information and three-dimensional data, generate a two-dimensional image according to the user's viewpoint movement, and create superimposed data by smoothly stitching them together. Alternatively, the decoding device may send the user's viewpoint movement to the server in addition to requesting virtual object information, and the server may create superimposed data from the three-dimensional data held by the server according to the received viewpoint movement, encode the superimposed data, and distribute it to the decoding device. The superimposed data may have an α value indicating transparency in addition to RGB, and the server may set the α value of parts other than the object created from the three-dimensional data to 0, etc., so that those parts are transparent, and encode the data. Alternatively, the server may set a predetermined RGB value to the background, like chroma keying, and generate data in which parts other than the object are the background color.
[0341] Similarly, the decryption process of the distributed data can be performed on each client terminal, on the server side, or shared between them. For example, one terminal may send a reception request to the server, and other terminals may receive the content corresponding to that request, perform the decryption process, and then transmit the decrypted signal to a device with a display. By distributing the processing and selecting appropriate content regardless of the performance of the communication-capable terminals themselves, it is possible to play back data with good image quality. Another example is that while receiving large image data on a TV or similar device, a portion of the picture, such as tiles, may be decrypted and displayed on the viewer's personal terminal. This allows for sharing the overall picture while allowing users to check their own area of responsibility or areas they want to examine in more detail on their own device.
[0342] In the future, it is expected that content will be seamlessly received by switching appropriate data for the connected communication, using distribution system standards such as MPEG-DASH, in situations where multiple short-range, medium-range, or long-range wireless communications are available both indoors and outdoors. This will allow users to freely select and switch in real time between decoding devices or display devices, such as displays installed indoors or outdoors, as well as their own terminals. Furthermore, decoding can be performed while switching between the decoding terminal and the display terminal based on the user's location information. This will make it possible to display map information on the wall or part of the ground of an adjacent building with a displayable device embedded, while traveling to a destination. It will also be possible to switch the bitrate of the received data based on the ease of access to the encoded data on the network, such as when the encoded data is cached on a server that can be accessed quickly from the receiving terminal, or copied to an edge server in the content delivery service.
[0343] [Scalable encoding] Regarding content switching, we will explain using a scalable stream compressed and encoded using the video encoding method described in each of the embodiments above, as shown in Figure 26. The server may have multiple streams with the same content but different qualities as individual streams, but it may also be configured to switch content by taking advantage of the characteristics of a temporally / spatially scalable stream realized by encoding it in layers, as shown in the figure. In other words, the decoding side can freely switch between decoding low-resolution and high-resolution content by deciding which layer to decode according to internal factors such as performance and external factors such as the state of the communication bandwidth. For example, if you want to watch the rest of a video that you were watching on your smartphone ex115 while traveling, on a device such as an internet TV when you get home, that device only needs to decode the same stream to different layers, thus reducing the burden on the server.
[0344] Furthermore, in addition to the configuration described above, in which pictures are encoded for each layer and an enhancement layer exists above the base layer to achieve scalability, the enhancement layer may include metadata based on statistical information of the image, and the decoding side may generate high-quality content by super-resolution the picture in the base layer based on the metadata. Super-resolution may refer to either an improvement in the signal-to-noise ratio at the same resolution or an increase in resolution. The metadata may include information for identifying linear or nonlinear filter coefficients used in the super-resolution process, or information for identifying parameter values in the filtering process, machine learning, or least-squares operation used in the super-resolution process.
[0345] Alternatively, the picture may be divided into tiles or similar structures according to the meaning of objects within the image, and the decoding side may select tiles to decode, thereby decoding only a portion of the area. Furthermore, by storing the attributes of objects (people, cars, balls, etc.) and their positions within the image (coordinate positions within the same image, etc.) as metadata, the decoding side can identify the location of a desired object based on the metadata and determine the tile containing that object. For example, as shown in Figure 27, the metadata is stored using a data storage structure different from pixel data, such as the SEI message in HEVC. This metadata indicates, for example, the position, size, or color of the main object.
[0346] Furthermore, metadata may be stored in units consisting of multiple pictures, such as streams, sequences, or random access units. This allows the decryption side to obtain information such as the time when a specific person appears in the video, and by combining this with the picture-level information, it can identify the picture in which the object exists and the object's position within that picture.
[0347] [Web page optimization] Figure 28 shows an example of a web page display screen on a computer ex111, etc. Figure 29 shows an example of a web page display screen on a smartphone ex115, etc. As shown in Figures 28 and 29, a web page may contain multiple linked images, which are links to image content, and their appearance will differ depending on the viewing device. When multiple linked images are visible on the screen, the display device (decoder) will display still images or I-pictures from each content as linked images, display video such as a GIF animation using multiple still images or I-pictures, or receive only the base layer and decode and display the video, until the user explicitly selects a linked image, or until the linked image approaches the center of the screen or the entire linked image is within the screen.
[0348] When a linked image is selected by the user, the display device prioritizes decoding the base layer. If the HTML of the web page contains information indicating that the content is scalable, the display device may decode up to the enhancement layer. Furthermore, to ensure real-time performance, before selection or when bandwidth is very limited, the display device can decode and display only forward-referenced pictures (I-pictures, P-pictures, and B-pictures that only use forward references), thereby reducing the delay between the decoding time and display time of the first picture (the delay from the start of content decoding to the start of display). Alternatively, the display device may deliberately ignore the reference relationships between pictures and roughly decode all B-pictures and P-pictures using forward references, then perform normal decoding as time passes and more pictures are received.
[0349] [Autonomous driving] Furthermore, when transmitting and receiving still images or video data such as 2D or 3D map information for autonomous driving or driving assistance of a vehicle, the receiving terminal may receive metadata such as weather or construction information in addition to image data belonging to one or more layers, and decode these in association with each other. The metadata may belong to a layer, or it may simply be multiplexed with the image data.
[0350] In this case, since the vehicle, drone, or airplane containing the receiving terminal is in motion, the receiving terminal can transmit its location information when a reception request is made, enabling seamless reception and decoding while switching between base stations ex106 to ex110. Furthermore, the receiving terminal can dynamically switch how much metadata is received or how much map information is updated, depending on the user's selection, the user's situation, or the state of the communication bandwidth.
[0351] As described above, the content supply system ex100 allows the client to receive, decode, and play back encoded information transmitted by the user in real time.
[0352] [Distribution of personal content] Furthermore, the ex100 content delivery system allows for unicast or multicast distribution of not only high-definition, long-duration content from video distribution companies, but also low-definition, short-duration content from individuals. It is also expected that the amount of such individual content will continue to increase. To improve the quality of individual content, the server may perform editing before encoding. This can be achieved, for example, with the following configuration.
[0353] During shooting, or after shooting, the server performs recognition processing such as detecting shooting errors, searching for scenes, analyzing semantics, and detecting objects from the original images or encoded data in real time. Based on the recognition results, the server manually or automatically edits the images, correcting out-of-focus or shaky images, deleting less important scenes such as those with lower brightness or out of focus compared to other pictures, emphasizing object edges, and changing color tones. The server then encodes the edited data based on the editing results. It is also known that viewership decreases if the shooting time is too long, so the server may automatically clip scenes with little movement, as well as less important scenes, based on the image processing results, to ensure that the content falls within a specific time range according to the shooting time. Alternatively, the server may generate and encode a digest based on the results of the semantic analysis of the scenes.
[0354] Furthermore, personal content may contain elements that infringe on copyright, moral rights, or portrait rights, and the scope of sharing may exceed the intended scope, which can be inconvenient for the individual. Therefore, for example, the server may intentionally change the image to one that is out of focus, such as the faces of people at the edges of the screen or the interior of a house, before encoding. The server may also recognize whether the face of a person other than those previously registered is visible in the image to be encoded, and if so, it may apply a mosaic effect to the face. Alternatively, as a pre- or post-processing step before encoding, the user can specify a person or background area that they want to process from a copyright perspective, and the server can replace the specified area with a different image or blur the focus. In the case of a person, the server can track the person in a video and replace the image of their face.
[0355] Furthermore, because viewing personal content with small data volumes requires real-time processing, depending on the bandwidth, the decoder prioritizes receiving, decoding, and playing the base layer first. During this time, the decoder can receive the enhancement layer, and if playback is looped or if the content is played more than once, it may play the high-quality video including the enhancement layer. With a stream that uses this scalable encoding, it is possible to provide an experience where the video is rough when unselected or at the beginning of viewing, but gradually the stream becomes smarter and the image quality improves. In addition to scalable encoding, a similar experience can be provided even if the rough stream played the first time and the second stream encoded by referencing the first video are configured as a single stream.
[0356] [Other usage examples] Furthermore, these encoding or decoding processes are generally performed by the LSIex500 present in each terminal. The LSIex500 may be a single chip or a multi-chip configuration. Alternatively, video encoding or decoding software may be embedded in some recording medium (such as a CD-ROM, flexible disk, or hard disk) that can be read by a computer ex111, and the encoding or decoding process may be performed using that software. In addition, if the smartphone ex115 has a camera, video data acquired by that camera may be transmitted. In this case, the video data is data encoded by the LSIex500 present in the smartphone ex115.
[0357] The LSIex500 may also be configured to be activated by downloading application software. In this case, the terminal first determines whether it supports the content encoding method or whether it has the capability to perform the specific service. If the terminal does not support the content encoding method or does not have the capability to perform the specific service, the terminal downloads the codec or application software, and then acquires and plays the content.
[0358] Furthermore, not only the content supply system ex100 via the Internet ex101, but also digital broadcasting systems can incorporate at least one of the video encoding device (image encoding device) or video decoding device (image decoding device) of each of the above embodiments. While the content supply system ex100 has a configuration that is more suited to multicast than unicast, as it transmits and receives multiplexed data with video and sound multiplexed onto broadcast radio waves using satellites, etc., the encoding and decoding processes are similar and can be applied in the same way.
[0359] [Hardware configuration] Figure 30 shows the smartphone ex115. Figure 31 shows an example of the configuration of the smartphone ex115. The smartphone ex115 includes an antenna ex450 for transmitting and receiving radio waves with the base station ex110, a camera unit ex465 capable of taking video and still images, and a display unit ex458 that displays video captured by the camera unit ex465 and data decoded from video received by the antenna ex450. The smartphone ex115 further includes an operation unit ex466, such as a touch panel, an audio output unit ex457, such as a speaker for outputting voice or sound, an audio input unit ex456, such as a microphone for inputting voice, a memory unit ex467 capable of storing captured video or still images, recorded audio, received video or still images, encoded data such as emails, or decoded data, and a slot unit ex464, which is an interface unit with SIM ex468 for identifying the user and authenticating access to various data, including the network. External memory may be used instead of the memory unit ex467.
[0360] Furthermore, the main control unit ex460, which comprehensively controls the display unit ex458 and the operation unit ex466, is connected via the bus ex470 to the power supply circuit unit ex461, the operation input control unit ex462, the video signal processing unit ex455, the camera interface unit ex463, the display control unit ex459, the modulation / demodulation unit ex452, the multiplexing / decompression unit ex453, the audio signal processing unit ex454, the slot unit ex464, and the memory unit ex467.
[0361] The power supply circuit unit ex461, when the power key is turned on by the user, supplies power from the battery pack to each component, thereby starting up the smartphone ex115 and making it operational.
[0362] The smartphone ex115 performs tasks such as phone calls and data communication based on the control of the main control unit ex460, which has a CPU, ROM, RAM, etc. During a call, the audio signal picked up by the audio input unit ex456 is converted into a digital audio signal by the audio signal processing unit ex454, which is then subjected to spread spectrum processing by the modulation / demodulation unit ex452, and after digital-to-analog conversion and frequency conversion processing by the transmission / reception unit ex451, it is transmitted via the antenna ex450. Similarly, received data is amplified, subjected to frequency conversion and analog-to-digital conversion processing, despread spectrum processing by the modulation / demodulation unit ex452, converted into an analog audio signal by the audio signal processing unit ex454, and then output from the audio output unit ex457. In data communication mode, text, still images, or video data are sent to the main control unit ex460 via the operation input control unit ex462 by the operation unit ex466 of the main unit, and transmission and reception processing is performed in the same manner. When transmitting video, still images, or video and audio in data communication mode, the video signal processing unit ex455 compresses and encodes the video signal stored in the memory unit ex467 or the video signal input from the camera unit ex465 using the video encoding method shown in each of the above embodiments, and sends the encoded video data to the multiplexing / decoding unit ex453. The audio signal processing unit ex454 encodes the audio signal picked up by the audio input unit ex456 while the camera unit ex465 is capturing video or still images, and sends the encoded audio data to the multiplexing / decoding unit ex453. The multiplexing / decoding unit ex453 multiplexes the encoded video data and encoded audio data in a predetermined manner, performs modulation and conversion processing in the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the transmission / reception unit ex451, and transmits the data via the antenna ex450.
[0363] When receiving video attached to an email or chat, or video linked to a webpage, etc., the multiplexing / decomposition unit ex453 separates the multiplexed data received via antenna ex450 to decode the multiplexed data, dividing it into a video data bitstream and an audio data bitstream. It then supplies the encoded video data to the video signal processing unit ex455 and the encoded audio data to the audio signal processing unit ex454 via the synchronization bus ex470. The video signal processing unit ex455 decodes the video signal using a video decoding method corresponding to the video encoding method shown in each embodiment above, and displays the video or still image contained in the linked video file from the display unit ex458 via the display control unit ex459. The audio signal processing unit ex454 decodes the audio signal, and audio is output from the audio output unit ex457. However, since real-time streaming is widespread, there may be situations where audio playback is socially inappropriate depending on the user's circumstances. Therefore, as an initial setting, it is preferable to have a configuration that plays only video data and not audio signals. Audio may be synchronized and played only when the user performs an action, such as clicking on video data.
[0364] Furthermore, although the smartphone ex115 was used as an example here, there are three possible implementation formats for terminals: a transceiver-type terminal that has both an encoder and a decoder, a transmitting terminal that has only an encoder, and a receiving terminal that has only a decoder. In addition, although it was explained that multiplexed data, in which audio data etc. is multiplexed with video data, is received or transmitted in a digital broadcasting system, the multiplexed data may also include text data related to the video in addition to audio data, or the video data itself may be received or transmitted instead of multiplexed data.
[0365] Although it was explained that the main control unit ex460, including the CPU, controls the encoding or decoding process, terminals often also have a GPU. Therefore, a configuration that leverages the GPU's performance to process a wide area at once using memory shared by the CPU and GPU, or memory whose addresses are managed so that it can be used in common, is also possible. This can shorten the encoding time, ensure real-time performance, and achieve low latency. In particular, it is efficient to perform motion detection, deblocking filters, SAO (Sample Adaptive Offset), and transformation / quantization processes at once on the GPU, rather than on the CPU, in units such as pictures. [Industrial applicability]
[0366] This disclosure can be used, for example, in television receivers, digital video recorders, car navigation systems, mobile phones, digital cameras, or digital video cameras. [Explanation of symbols]
[0367] 100 Encoding device 102 Division 104 Subtraction Unit 106 Conversion Unit 108 Quantization section 110 Entropy coding unit 112, 204 Inverse quantization section 114, 206 Inverse Transform Section 116, 208 Addition section 118, 210 block memory 120, 212 Loop filter section 122,214 frame memory 124, 216 Intra Prediction Unit 126, 218 Interpretation Unit 128, 220 Prediction Control Unit 200 Decoders 202 Entropy Decoder
Claims
1. A decoding device for decoding image blocks, Circuits and, Equipped with memory, The circuit uses the memory, The quantization linear coefficient or quantization quadratic coefficient of the aforementioned image block is obtained from the bitstream. Determine whether or not to apply an inverse quadratic transform to the aforementioned image block. (i) When the inverse quadratic transformation is not applied, the first-order coefficient is calculated by performing a first-order inverse quantization on the quantization first-order coefficient; (ii) When the inverse quadratic transformation is applied, the second-order coefficient is calculated by performing a second-order inverse quantization different from the first-order inverse quantization on the quantization second-order coefficient; an inverse quadratic transformation is performed from the second-order coefficient to the first-order coefficient; and an inverse linear transformation is performed from the first-order coefficient to the residual of the image block. Decoding device.
2. Circuits and, The circuit comprises a memory connected to the aforementioned circuit, In operation, the aforementioned circuit Perform a linear transformation from the residuals of the image block to the linear coefficients. Determine whether or not to apply a secondary transformation to the aforementioned image block. (i) When the quadratic transformation is not applied, the quantized primary coefficient is calculated by performing a first quantization on the primary coefficient; (ii) When the quadratic transformation is applied, the quantized secondary coefficient is calculated by performing a quadratic transformation from the primary coefficient to the secondary coefficient and performing a second quantization different from the first quantization on the secondary coefficient. Information is generated to indicate whether or not the inverse quadratic transform in the inverse transform process is applied to the aforementioned image block. The bitstream includes the aforementioned information and information regarding the first-order or second-order quantization coefficients of the image block. Bitstream generator.