Image coding/decoding method and apparatus therefor
The present invention discloses an image coding/decoding method and an apparatus for the method. More specifically, a method for filtering an image by a decoding apparatus comprises deriving boundaries of a block divided into quad-tree plus binary-tree structure; determining an edge among boundaries of the block to which de-blocking filtering is applied; determining a type of de-blocking filtering to be applied to the edge; and performing de-blocking filtering to a picture sample restored according to the de-blocking filtering type, wherein the edge or the type of de-blocking filtering is determined by considering width or height of the block.
1. An apparatus for decoding an image, the apparatus comprising:
a memory configured to store the image; and
a processor coupled with the memory,
wherein the processor is configured to:
derive boundaries of a luma block and a chroma block in a current picture divided according to a partitioning structure;
determine an edge to apply a de-blocking filter among the boundaries of the luma block and the chroma block;
determine a type of the de-blocking filter for the determined edge of the luma block based on width or height of the luma block;
determine a type of the de-blocking filter for the determined edge of the chroma block based on the chroma block being an intra prediction block; and
apply the de-blocking filter the type of which is determined on reconstructed samples around the determined edge,
wherein, based on that the type of the edge is a vertical edge, and the width of the luma block is less than or equal to 4, the type of the de-blocking filter for the luma block is determined as a weak filter,
wherein, based on that the type of the edge is a horizontal edge, and the height of the luma block is less than or equal to 4, the type of the de-blocking filter for the luma block is determined as the weak filter, and
wherein the types of the de-blocking filter for the luma block and the chroma block are determined based on reconstructed samples of the current picture before the de-blocking filter is applied.
2. The apparatus of claim 1 , wherein, when the edge is a vertical edge, the edge is determined only among boundaries of the luma block of which the width is larger than or equal to 8.
3. The apparatus of claim 1 , wherein, when the edge is a horizontal edge, the edge is determined only among boundaries of the luma block of which the height is larger than or equal to 8.
4. The apparatus of claim 1 , wherein, when the edge is a vertical edge and the width of the luma block is smaller than or equal to 4, the type of the de-blocking filter for the luma block is determined as a strong filter, and the strong filter is applied to only two adjacent pixel columns on left and right of the edge.
5. The apparatus of claim 1 , wherein, when the edge is a horizontal edge and the height of the block is smaller than or equal to 4, the type of the de-blocking filter for the luma block is determined as a strong filter, and the strong filter is applied to only two adjacent pixel rows on the top and bottom of the edge.
6. An apparatus for encoding an image, the apparatus comprising:
a memory configured to store the image; and
a processor coupled with the memory,
wherein the processor is configured to:
derive boundaries of a luma block and a chroma block in a current picture divided according to a partitioning structure;
determine an edge to apply a de-blocking filter among the boundaries of the luma block and the chroma block;
determine a type of the de-blocking filter for the determined edge of the luma block based on width or height of the luma block;
determine a type of the de-blocking filter for the determined edge of the chroma block based on the chroma block being an intra prediction block; and
apply the de-blocking filter the type of which is determined on reconstructed samples around the determined edge,
wherein, based on that the type of the edge is a vertical edge, and the width of the luma block is less than or equal to 4, the type of the de-blocking filter for the luma block is determined as a weak filter,
wherein, based on that the type of the edge is a horizontal edge, and the height of the luma block is less than or equal to 4, the type of the de-blocking filter for the luma block is determined as the weak filter, and
wherein the types of the de-blocking filter for the luma block and the chroma block are determined based on reconstructed samples of the current picture before the de-blocking filter is applied.
7. A transmission apparatus for data comprising a bitstream including an image, the apparatus comprising:
a processor configured to obtain the bitstream for the image; and
a transmitter configured to transmit the data comprising the bitstream,
wherein the processor is configured to:
derive boundaries of a luma block and a chroma block in the image divided according to a partitioning structure;
determine an edge to apply a de-blocking filter among the boundaries of the luma block and the chroma block;
determine a type of the de-blocking filter for the determined edge of the luma block based on width or height of the luma block;
determine a type of the de-blocking filter for the determined edge of the chroma block based on the chroma block being an intra prediction block; and
apply the de-blocking filter the type of which is determined on reconstructed samples around the determined edge, and
wherein, based on that the type of the edge is a vertical edge, and the width of the luma block is less than or equal to 4, the type of the de-blocking filter for the luma block is determined as a weak filter,
wherein, based on that the type of the edge is a horizontal edge, and the height of the luma block is less than or equal to 4, the type of the de-blocking filter for the luma block is determined as the weak filter, and
wherein the types of the de-blocking filter for the luma block and the chroma block are determined based on reconstructed samples of the current picture before the de-blocking filter is applied.