CPC H04N 19/126 (2014.11) [H04N 19/159 (2014.11); H04N 19/176 (2014.11); H04N 19/61 (2014.11)] | 5 Claims |
1. An encoder that encodes an image, the encoder comprising:
circuitry; and
memory coupled to the circuitry,
wherein the circuitry:
derives a prediction residual indicating a difference between a current block and a prediction image of the current block;
performs primary transform on the prediction residual, and performs secondary transform on a result of the primary transform;
performs quantization on a result of the secondary transform; and
encodes a result of the quantization,
wherein in the performing of the secondary transform,
when a matrix weighted intra prediction included in intra prediction and having a plurality of prediction modes is used, the circuitry uses, as a transform set for the secondary transform, a common transform set shared among the plurality of prediction modes, the matrix weighted intra prediction generating the prediction image by performing matrix calculation on a pixel sequence obtained from pixel values of surrounding pixels of the current block, the transform set for the secondary transform being applied to primary transform coefficients obtained from the result of the primary transform, and
wherein the transform set includes a plurality of transform matrices.
|