Patent attributes
An encoder that encodes a current block in a picture includes circuitry and memory. Using the memory, the circuitry: determines whether to use intra prediction for the current block; and when determining to use intra prediction, (i) performs a first transform on a residual signal of the current block using a first transform basis to generate first transform coefficients; and (ii-1) performs a second transform on the first transform coefficients using a second transform basis to generate second transform coefficients and quantizes the second transform coefficients, when an intra prediction mode of the current block is a predetermined mode or when the first transform basis is same as a predetermined transform basis; and (ii-2) quantizes the first transform coefficients without performing the second transform when the intra prediction mode is different from the predetermined mode and the first transform basis is different from the predetermined transform basis.