Apparatus and method for deblocking filter in video coding
A method and image processing device are provided, including a deblocking filter. The deblocking filter modifies values of at most MA samples of the first image block as first filter output values, the at most MA samples being obtained from a column of the first image block that is perpendicular to and adjacent to the horizontal block edge; and modifies values of at most MB samples of the second image block as second filter output values, the at most MB samples being obtained from a column of the second image block that is perpendicular to and adjacent to the horizontal block edge. At most a number MA of sample values of the first image block adjacent to the block edge are modified and at most a number MB of sample values of the second image block adjacent to the block edge are modified, wherein MA<MB.
1. A device for deblocking block edges between chroma blocks, the block edges comprise a chroma horizontal block edge between a first chroma block and a second chroma block, the first chroma block having a block size SA along a vertical direction and the second chroma block having a block size SB along the vertical direction, the vertical direction being perpendicular to the chroma horizontal block edge, the device comprising a de-blocking filter configured to:
determine whether the chroma horizontal block edge is overlapped with a horizontal chroma coding tree block (CTB) boundary;
in response to determining that the chroma horizontal block edge is overlapped with the horizontal chroma CTB boundary;
use values of at most DA samples of the first chroma block as first filter decision values, the at most DA samples being obtained from a column of the first chroma block that is perpendicular to the chroma horizontal block edge and the at most DA samples being adjacent to the chroma horizontal block edge;
use values of at most DB samples of the second chroma block as second filter decision values, the at most DB samples being obtained from a column of the second chroma block that is perpendicular to the chroma horizontal block edge and the at most DB samples are adjacent to the chroma horizontal block edge;
modify values of at most MA samples of the first chroma block as first filter output values, the at most MA samples being obtained from the column of the first chroma block that is perpendicular to the chroma horizontal block edge and the at most MA samples being adjacent to the chroma horizontal block edge; and
modify values of at most MB samples of the second chroma block as second filter output values, the at most MB samples being obtained from the column of the second chroma block that is perpendicular to the chroma horizontal block edge and the at most MB samples being adjacent to the chroma horizontal block edge;
wherein the first chroma block is a block above the horizontal chroma CTB boundary and the second chroma block is a block below the horizontal chroma CTB boundary;
wherein SA=SB, MA<MB, DA<DB, SA>DA>MA, and SB>DB>MB;
wherein the de-blocking filter is an asymmetric filter; and
wherein SA and SB are equal to or greater than 8, MB=3 and MA=1, and DB=4 and DA=2.
2. The device of claim 1 , wherein the samples p i of the first chroma block are chroma samples, wherein i belongs to {0, 1, 2, . . . , SA−1}.
3. A deblocking method for deblocking block edges between chroma blocks, the block edges comprise a chroma horizontal block edge between a first chroma block and a second chroma block, the first chroma block having a block size SA along a vertical direction and the second chroma block having a block size SB along the vertical direction, the vertical direction being perpendicular to the chroma horizontal block edge, the method comprising:
determining whether the chroma horizontal block edge is overlapped with a horizontal chroma coding tree block (CTB) boundary;
in response to determining that the chroma horizontal block edge is overlapped with the horizontal chroma CTB boundary;
using values of at most DA samples of the first chroma block as first filter decision values, the at most DA samples being obtained from a column of the first chroma block that is perpendicular to the chroma horizontal block edge and the at most DA samples being adjacent to the chroma horizontal block edge;
using values of at most DB samples of the second chroma block as second filter decision values, the at most DB samples being obtained from a column of the second chroma block that is perpendicular to the chroma horizontal block edge and the at most DB samples being adjacent to the chroma horizontal block edge;
modifying values of at most MA samples of the first chroma block as first filter output values, the at most MA samples being obtained from the column of the first chroma block that is perpendicular to the chroma horizontal block edge and the at most MA samples being adjacent to the chroma horizontal block edge; and
modifying values of at most MB samples of the second chroma block as second filter output values, the at most MB samples being obtained from the column of the second chroma block that is perpendicular to the chroma horizontal block edge and the at most MB samples being adjacent to the chroma horizontal block edge;
wherein the first chroma block is a block above the horizontal chroma CTB boundary and the second chroma block is a block below the horizontal chroma CTB boundary;
wherein SA=SB, MA<MB, DA<DB, SA>DA>MA, and SB>DB>MB;
wherein the de-blocking filter is an asymmetric filter; and
wherein SA and SB are equal to or greater than 8, MB=3 and MA=1, and DB=4 and DA=2.
4. The method of claim 3 , wherein the samples p i of the first chroma block are chroma samples, wherein i belongs to {0, 1, 2, . . . , SA−1}.
5. A non-transitory computer-readable media storing computer instructions for deblocking block edges between chroma blocks, the block edges comprise a chroma horizontal block edge between a first chroma block and a second chroma block, the first chroma block having a block size SA along a vertical direction and the second chroma block having a block size SB along the vertical direction, the vertical direction being perpendicular to the chroma horizontal block edge, the computer instructions, when executed by one or more processors, cause the one or more processors to perform the steps:
determining whether the chroma horizontal block edge is overlapped with a horizontal chroma coding tree block (CTB) boundary;
in response to determining that the chroma horizontal block edge is overlapped with the horizontal chroma CTB boundary;
using values of at most DA samples of the first chroma block as first filter decision values, the at most DA samples being obtained from a column of the first chroma block that is perpendicular to the chroma horizontal block edge and the at most DA samples being adjacent to the chroma horizontal block edge;
using values of at most DB samples of the second chroma block as second filter decision values, the at most DB samples being obtained from a column of the second chroma block that is perpendicular to the chroma horizontal block edge and the at most DB samples being adjacent to the chroma horizontal block edge;
modifying values of at most MA samples of the first chroma block as first filter output values, the at most MA samples being obtained from the column of the first chroma block that is perpendicular to the chroma horizontal block edge and the at most MA samples being adjacent to the chroma horizontal block edge; and
modifying values of at most MB samples of the second chroma block as second filter output values, the at most MB samples being obtained from the column of the second chroma block that is perpendicular to the chroma horizontal block edge and the at most MB samples being adjacent to the chroma horizontal block edge;
wherein the first chroma block is a block above the horizontal chroma CTB boundary and the second chroma block is a block below the horizontal chroma CTB boundary;
wherein SA=SB, MA<MB, DA<DB, SA>DA>MA, and SB>DB>MB;
wherein the de-blocking filter is an asymmetric filter; and
wherein SA and SB are equal to or greater than 8, MB=3 and MA=1, and DB=4 and DA=2.