CPC H04N 19/61 (2014.11) [H04N 19/126 (2014.11); H04N 19/159 (2014.11); H04N 19/176 (2014.11); H04N 19/18 (2014.11)] | 36 Claims |
1. An image coding apparatus that encodes an image into a bitstream by using a plurality of blocks including a first block of a P×Q array of pixels (P and Q are integers), the image coding apparatus comprising:
a transform unit configured to generate transform coefficients from prediction residuals by performing transform processing on the prediction residuals, the transform coefficients representing frequency components; and
a quantization unit configured to generate quantized transform coefficients by quantizing the transform coefficients by using a quantization matrix,
wherein, in a case where a target block is the first block,
(i) the transform unit is configured to derive a P×M array of intermediate values by performing multiplication of a P×Q array of prediction residuals and a matrix of a Q×M array, and to derive an N×M array of transform coefficients by performing multiplication of a matrix of an N×P array and the P×M array of intermediate values, wherein M is an integer satisfying M<Q, and N is an integer satisfying N<P, and
(ii) the quantization unit is configured to generate an N×M array of quantized transform coefficients by quantizing the N×M array of transform coefficients by using a quantization matrix of an N×M array of elements,
wherein, in a case where a target block is a second block smaller than the first block,
(i) the transform unit is configured to derive an array of transform coefficients a size of which is the same as a size of the second block by performing multiplication using at least an array of prediction residuals a size of which is the same as the size of the second block and a matrix a size of which is the same as the size of the second block, and
(ii) the quantization unit is configured to generate an array of quantized transform coefficients a size of which is the same as the size of the second block by quantizing the array of transform coefficients the size of which is the same as the size of the second block by using a quantization matrix a size of which is the same as the size of the second block.
|