| CPC H04N 19/126 (2014.11) [H04N 19/12 (2014.11); H04N 19/176 (2014.11)] | 2 Claims |

|
1. A decoder which decodes a current block to be decoded in an image, the decoder comprising:
circuitry; and
memory,
wherein using the memory, the circuitry:
decodes, from an encoded bitstream, either quantized primary coefficients of the current block or quantized secondary coefficients of the current block;
determines whether an inverse secondary transform is to be applied to the current block;
(i) in response to a determination that the inverse secondary transform is not to be applied, calculates primary coefficients in a frequency domain by performing a first inverse quantization on the quantized primary coefficients using a quantization matrix, the quantization matrix including quantization steps by which the respective quantized primary coefficients are multiplied, and performs an inverse primary transform from the primary coefficients to residuals of the current block, and (ii) in response to a determination that the inverse secondary transform is to be applied, calculates secondary coefficients in a domain different from the frequency domain by performing a second inverse quantization on the quantized secondary coefficients using a quantization step by which each of the quantized secondary coefficients are multiplied, the quantization step being common between the quantized secondary coefficients, performs the inverse secondary transform from the secondary coefficients to primary coefficients, and performs an inverse primary transform from the primary coefficients to residuals of the current block.
|