| CPC H04N 19/122 (2014.11) [H04N 19/103 (2014.11); H04N 19/107 (2014.11); H04N 19/132 (2014.11); H04N 19/176 (2014.11); H04N 19/186 (2014.11); H04N 19/61 (2014.11); H04N 19/625 (2014.11); H04N 19/70 (2014.11); H04N 19/90 (2014.11)] | 11 Claims |

|
1. A method for decoding a video, the method comprising:
obtaining, from a bitstream, a coded block flag indicating whether a non-zero transform coefficient exists for a current block;
obtaining transform coefficients from the bitstream based on the coded block flag to thereby generate a coefficient block for the current block;
obtaining transform mode information of the current block from the bitstream;
determining a transform type of the current block based on the transform mode information; and
inverse-transforming the coefficient block according to the transform type of the current block,
wherein the transform mode information is index information for indicating a transform type of the current block among predefined transform types,
wherein the transform mode information is obtained only when the coded block flag indicates the non-zero transform coefficient exists for the current block,
wherein the transform mode information is obtained from the bitstream only when a larger value among a width and a height of the current block is less than or equal to a predetermined size, and
wherein the transform mode information is not obtained from the bitstream when only one non-zero transform coefficient exists in the coefficient block and is located at a top left corner in the coefficient block.
|