Image encoding/decoding method and apparatus
Disclosed herein are an image encoding/decoding method and apparatus. The image decoding method of the present disclosure may include obtaining maximum transform block size information, deriving a maximum transform block size on the basis of the maximum transform block size information, and, determining ether or not a secondary inverse transform is applied to the current block on the basis of the maximum transform block size and a horizontal size and a vertical size of a current block.
1. An image decoding method, the method comprising:
obtaining maximum transform block size information;
deriving a maximum transform block size on the basis of the maximum transform block size information; and
determining whether or not a secondary inverse transform is applied to a current block based on the maximum transform block size and a horizontal size and a vertical size of the current block,
wherein the determining of whether or not the secondary inverse transform is applied comprises determining that the secondary inverse transform is not applied to the current block when a prediction mode of the current block is an inter-prediction mode.
2. The image decoding method of claim 1 ,
wherein the determining of whether or not the secondary inverse transform is applied comprises determining whether or not the secondary inverse transform is applied to the current block on the basis of a larger value of the horizontal size and the vertical size of the current block.
3. The image decoding method of claim 1 ,
wherein the determining of whether or not the secondary inverse transform is applied comprises determining that the secondary inverse transform is not applied to the current block, when the larger value of the horizontal size and the vertical size of the current block is greater than the maximum transform block size.
4. The image decoding method of claim 1 ,
wherein the determining of whether or not the secondary inverse transform is applied comprises determining whether or not the secondary inverse transform is applied to the current block on the basis of primary inverse transform information of the current block.
5. The image decoding method of claim 4 ,
wherein the determining of whether or not the secondary inverse transform is applied comprises determining that the secondary inverse transform is not applied to the current block, when the primary inverse transform information of the current block indicates a primary inverse transform skip mode.
6. The image decoding method of claim 1 ,
wherein the determining of whether or not the secondary inverse transform is applied comprises determining whether or not the secondary inverse transform is applied to the current block further based on a transform block index of the current block which is an index indicating one of sub-transform blocks.
7. An image encoding method, the method comprising:
determining a maximum transform block size;
encoding maximum transform block size information indicating the maximum transform block size; and
determining whether or not a secondary transform is applied to a current block based on the maximum transform block size and a horizontal size and a vertical size of the current block,
wherein the determining of whether or not the secondary transform is applied comprises determining that the secondary transform is not applied to the current block when a prediction mode of the current block is an inter-prediction mode.
8. The image encoding method of claim 7 ,
wherein the determining of whether or not the secondary transform is applied comprises determining whether or not the secondary transform is applied to the current block on the basis of a larger value of the horizontal size and the vertical size of the current block.
9. The image encoding method of claim 7 ,
wherein the determining of whether or not the secondary transform is applied comprises determining that the secondary-inverse transform is not applied to the current block, when the larger value of the horizontal size and the vertical size of the current block is greater than the maximum transform block size.
10. The image encoding method of claim 7 ,
wherein the determining of whether or not the secondary transform is applied comprises determining whether or not the secondary transform is applied to the current block on the basis of primary transform information of the current block.
11. The image encoding method of claim 10 ,
wherein the determining of whether or not the secondary transform is applied comprises determining that the secondary transform is not applied to the current block, when the primary transform information of the current block indicates a primary transform skip mode.
12. The image encoding method of claim 7 ,
wherein the determining of whether or not the secondary transform is applied comprises determining whether or not the secondary transform is applied to the current block further based on a transform block index of the current block which is an index indicating one of sub-transform blocks.
13. A
method of transmitting data comprising a bitstream for an image, the method comprising:
obtaining the bitstream for the image; and
transmitting the data comprising the bitstream,
wherein the bitstream is generated by performing:
determining a maximum transform block size;
encoding maximum transform block size information indicating the maximum transform block size; and
determining whether or not a secondary transform is applied to the current block based on the maximum transform block size and a horizontal size and a vertical size of a current block, and
wherein the determining of whether or not the secondary inverse transform is applied comprises determining that the secondary inverse transform is not applied to the current block when a prediction mode of the current block is an inter-prediction mode.