Image data encoding/decoding method and apparatus
A method of decoding an image, includes obtaining at least one offset for a picture, deriving a variable for scaling for the picture based on the at least one offset, and performing inter prediction based on the variable for scaling for the picture. The at least one offset is defined with a direction of scaling.
1 . A method of decoding an image, comprising:
partitioning the image to obtain a partitioned image based on partitioning information that is included in a bitstream, the partitioning being performed using tree-based partitioning structures that include a quad-tree partitioning structure, a binary-tree partitioning structure, and a triple-tree partitioning structure; and
decoding the partitioned image by performing inter prediction,
wherein the decoding the partitioned image comprises:
obtaining, from the bitstream, an offset for the image, the offset being signaled for a chroma component, and the offset comprising at least one of a left offset, a right offset, a top offset, or a bottom offset;
deriving a size variable for resizing the image based on the offset; and
performing the inter prediction based on the size variable,
wherein the offset is defined with a direction of resizing, and
wherein, in a case where a ratio of the luma component to the chroma component is 2 to 1, the size variable for resizing for a luma component is derived (i) by multiplying a first offset by 2, the first offset being determined by a sum of the left offset and the right offset, or (ii) by multiplying a second offset by 2, the second offset being determined by a sum of the top offset and the bottom offset.
2 . The method of claim 1 , wherein the size variable for resizing the image in a horizontal direction is derived based on the left offset and the right offset.
3 . A method of encoding an image, comprising:
partitioning the image to obtain a partitioned image based on partitioning information that is encoded into a bitstream, the partitioning being performed using tree-based partitioning structures that include a quad-tree partitioning structure, a binary-tree partitioning structure, and a triple-tree partitioning structure; and
encoding the partitioned image by performing inter prediction,
wherein the encoding the partitioned image comprises:
encoding, into the bitstream, an offset for the image, the offset being encoded for a chroma component, and the offset comprising at least one of a left offset, a right offset, a top offset, or a bottom offset;
deriving a size variable for resizing the image based on the offset; and
performing the inter prediction based on the size variable,
wherein the offset is defined with a direction of resizing, and
wherein, in a case where a ratio of the luma component to the chroma component is 2 to 1, the size variable for resizing for a luma component is derived (i) by multiplying a first offset by 2, the first offset being determined by a sum of the left offset and the right offset, or (ii) by multiplying a second offset by 2, the second offset being determined by a sum of the top offset and the bottom offset.
4 . A non-transitory computer readable recording medium storing a bitstream that is generated by a method of encoding an image, the method comprising:
partitioning the image to obtain a partitioned image based on partitioning information that is encoded into the bitstream, the partitioning being performed using tree-based partitioning structures that include a quad-tree partitioning structure, a binary-tree partitioning structure, and a triple-tree partitioning structure; and
encoding the partitioned image by performing inter prediction,
wherein the encoding the partitioned image comprises:
encoding, into the bitstream, an offset for the image, the offset being encoded for a chroma component, and the offset comprising at least one of a left offset, a right offset, a top offset, or a bottom offset;
deriving a size variable for resizing the image based on the offset; and
performing the inter prediction based on the size variable,
wherein the offset is defined with a direction of resizing, and
wherein, in a case where a ratio of the luma component to the chroma component is 2 to 1, the size variable for resizing for a luma component is derived (i) by multiplying a first offset by 2, the first offset being determined by a sum of the left offset and the right offset, or (ii) by multiplying a second offset by 2, the second offset being determined by a sum of the top offset and the bottom offset.
5 . A method of transmitting a bitstream performed by an encoding apparatus, comprising:
partitioning an image to obtain a partitioned image based on partitioning information that is encoded into the bitstream, the partitioning being performed using tree-based partitioning structures that include a quad-tree partitioning structure, a binary-tree partitioning structure, and a triple-tree partitioning structure;
encoding the partitioned image by performing inter prediction to generate the bitstream; and
transmitting the bitstream to a decoding apparatus,
wherein the encoding the partitioned image comprises:
encoding, into the bitstream, an offset for the image, the offset being encoded for a chroma component, and the offset comprising at least one of a left offset, a right offset, a top offset, or a bottom offset;
deriving a size variable for resizing the image based on the offset; and
performing the inter prediction based on the size variable,
wherein the offset is defined with a direction of resizing, and
wherein, in a case where a ratio of the luma component to the chroma component is 2 to 1, the size variable for resizing for a luma component is derived (i) by multiplying a first offset by 2, the first offset being determined by a sum of the left offset and the right offset, or (ii) by multiplying a second offset by 2, the second offset being determined by a sum of the top offset and the bottom offset.