Image data encoding/decoding method and apparatus
Disclosed are methods and apparatuses for decoding an image. A method includes receiving a bitstream obtained by encoding the image; dividing a first coding block into a plurality of second coding blocks; generating a prediction block of a second coding block based on syntax information obtained from the bitstream; and reconstructing the second coding block based on the prediction block and a residual block of the second coding block, the residual block being obtained by performing a dequantization and an inverse-transform on quantized transform coefficients from the bitstream. The first coding block has a recursive division structure. The first coding block is divided based on at least one of a quad tree division, a binary tree division or a triple tree division.
1. A method of decoding an image with a decoding apparatus, comprising:
receiving a bitstream obtained by encoding the image;
dividing, based on division information, a first block into a plurality of second blocks;
generating a prediction block of a second block based on syntax information obtained from the bitstream; and
reconstructing the second block based on the prediction block and a residual block of the second block, the residual block being obtained by performing a dequantization and an inverse-transform on quantized transform coefficients from the bitstream,
wherein the first block is divided into the plurality of second blocks based on tree-based partitioning and type-based partitioning,
wherein the tree-based partitioning is performed recursively to divide a target block based on at least one of a quad tree division, a binary tree division or a triple tree division,
wherein the quad tree division refers to a division type of dividing the target block into four subblocks, the binary tree division refers to a division type of dividing the target block into two subblocks, and the triple tree division refers to a division type of dividing the target block into three subblocks,
wherein the type-based partitioning comprises
determining whether to perform the type-based partitioning on the target block based on a size of the target block;
obtaining, in case the type-based partitioning is determined to be performed, an index indicating a partitioning type for the target block among a plurality of candidate partitioning types, the candidate partitioning types for the target block are set differently based on the size of the target block, each of the candidate partitioning types defines a partitioning shape in case the target block is partitioned into smaller blocks than the target block; and
partitioning the target block based on the obtained index,
wherein the plurality of candidate partitioning types of the type-based partitioning comprises a partitioning type where the target block is divided into four second blocks by three horizontal divisional lines, and
wherein the generating the prediction block of the second block is performed by a unit of the second block.
2. The method of claim 1 , wherein when the target block is divided based on the triple tree division, the target block is divided into three subblocks,
wherein one of the three subblocks has a size greater than a size of the other two of the three subblocks, and
wherein the other two of the three subblocks have the same size.
3. The method of claim 2 , wherein the size of the one of the three subblocks is twice the size of the other two of the three subblocks.
4. The method of claim 2 , wherein the one of the three subblocks is located between the other two of the three subblocks.
5. The method of claim 1 , wherein the inverse-transform is performed based on a transform type of the second block,
wherein the transform type of the second block includes a vertical transform type and a horizontal transform type, and
wherein each of the vertical transform type and the horizontal transform type is set equal to one of DCT-2, DST-8 or DCT-7.
6. The method of claim 5 , wherein the vertical transform type and the horizontal transform type are determined based on a size of the second block, respectively.
7. A method of encoding an image with an encoding apparatus, comprising:
determining division information by dividing a first block into a plurality of second blocks;
generating a prediction block of a second block;
obtaining a residual block of the second block based on an original block and the prediction block;
obtaining quantized transform coefficients by performing a transform and a quantization on the residual block; and
generating a bitstream by encoding the division information and the quantized transform coefficients,
wherein the first block is divided into the plurality of second blocks based on tree-based partitioning and type-based partitioning,
wherein the tree-based partitioning is performed recursively to divide a target block based on at least one of a quad tree division, a binary tree division or a triple tree division,
wherein the quad tree division refers to a division type of dividing the target block into four subblocks, the binary tree division refers to a division type of dividing the target block into two subblocks, and the triple tree division refers to a division type of dividing the target block into three subblocks,
wherein the type-based partitioning comprises
determining whether to perform the type-based partitioning on the target block based on a size of the target block;
obtaining, in case the type-based partitioning is determined to be performed, an index indicating a partitioning type for the target block among a plurality of candidate partitioning types, the candidate partitioning types for the target block are set differently based on the size of the target block, each of the candidate partitioning types defines a partitioning shape in case the target block is partitioned into smaller blocks than the target block; and
partitioning the target block based on the obtained index,
wherein the plurality of candidate partitioning types of the type-based partitioning comprises a partitioning type where the target block is divided into four second blocks by three horizontal divisional lines, and
wherein the generating the prediction block of the second block is performed by a unit of the second block.
8. A non-transitory computer-readable medium for storing data associated with a video signal, comprising:
a bitstream encoded by an encoding method and stored in the non-transitory computer-readable,
wherein the encoding method comprises:
determining division information by dividing a first block into a plurality of second blocks;
generating a prediction block of a second block;
obtaining a residual block of the second block based on an original block and the prediction block;
obtaining quantized transform coefficients by performing a transform and a quantization on the residual block; and
generating a bitstream by encoding the division information and the quantized transform coefficients,
wherein the first block is divided into the plurality of second blocks based on tree-based partitioning and type-based partitioning,
wherein the tree-based partitioning is performed recursively to divide a target block based on at least one of a quad tree division, a binary tree division or a triple tree division,
wherein the quad tree division refers to a division type of dividing the target block into four subblocks, the binary tree division refers to a division type of dividing the target block into two subblocks, and the triple tree division refers to a division type of dividing the target block into three subblocks,
wherein the type-based partitioning comprises
determining whether to perform the type-based partitioning on the target block based on a size of the target block;
obtaining, in case the type-based partitioning is determined to be performed, an index indicating a partitioning type for the target block among a plurality of candidate partitioning types, the candidate partitioning types for the target block are set differently based on the size of the target block, each of the candidate partitioning types defines a partitioning shape in case the target block is partitioned into smaller blocks than the target block; and
partitioning the target block based on the obtained index,
wherein the plurality of candidate partitioning types of the type-based partitioning comprises a partitioning type where the target block is divided into four second blocks by three horizontal divisional lines, and
wherein the generating the prediction block of the second block is performed by a unit of the second block.