CPC H04N 19/12 (2014.11) [H04N 19/124 (2014.11); H04N 19/176 (2014.11); H04N 19/625 (2014.11)] | 4 Claims |
1. An encoder comprising:
circuitry; and
memory,
wherein the circuitry, using the memory, performs:
generating first transform coefficients by performing a horizontal transform and a vertical transform on residuals using a horizontal transform basis and a vertical transform basis, respectively, when it is determined that the horizontal transform and the vertical transform are to be performed for the current block;
generating second transform coefficients by performing a non-separable transform on the first transform coefficients when it is determined that the non-separable transform is to be performed for the current block; and
encoding a signal which indicates whether the non-separable transform is performed or not,
wherein (i) when it is determined that a selection of a transform basis based on a size of the current block is performed for the current block, the circuitry performs, before performing the horizontal transform and the vertical transform:
selecting a first transform basis, as the horizontal transform basis, from among transform basis candidates when a horizontal size of the current block is a first horizontal size that is greater than a threshold size;
selecting a second transform basis, as the horizontal transform basis, from among the transform basis candidates when the horizontal size of the current block is a second horizontal size that is smaller than or equal to the threshold size, the second transform basis being different from the first transform basis;
selecting the first transform basis, as the vertical transform basis, from among the transform basis candidates when a vertical size of the current block is a first vertical size that is greater than the threshold size; and
selecting the second transform basis, as the vertical transform basis, from among the transform basis candidates when the vertical size of the current block is a second vertical size that is smaller than or equal to the threshold size, and
wherein (ii) when the non-separable transform is performed for the current block, a basic transform basis is selected as the vertical transform basis and the horizontal transform basis.
|