Boundary filtering on IntraBC and IntraTMP coded blocks
Aspects of the disclosure include methods and apparatuses for video coding. One of the apparatuses includes processing circuitry that receives a coded video bitstream that includes a current picture with a block. The processing circuitry determines a prediction block of the block using one of an intra block copy (IBC) mode and an intra template matching (IntraTMP) mode. If boundary filtering is to be applied to the block, the processing circuitry applies the boundary filtering to a prediction sample located at a position (x′,y′) in the prediction block by determining a parameter W of the boundary filtering based on coded information of the block; determining weights used in the boundary filtering by right shifting the parameter W according to the position (x′,y′); and generating a filtered prediction sample based on a linear combination of reference samples and the prediction sample according to the determined weights.
1 . A method of video decoding, comprising:
receiving a coded video bitstream that includes a current picture with a block coded with one of an intra block copy (IBC) mode and an intra template matching (IntraTMP) mode;
determining a prediction block of the block using the one of the IBC mode and the IntraTMP mode; and
when boundary filtering is applied to the prediction block of the block determined using the one of the IBC mode and the IntraTMP mode, applying the boundary filtering to a prediction sample pred(x′,y′) located at a position (x′,y′) in the prediction block corresponding to a sample in the block by:
determining a parameter W of the boundary filtering based on coded information of the block coded with the one of the IBC mode and the IntraTMP mode, the parameter W being selected from a plurality of different values;
determining weights used in the boundary filtering by right shifting the parameter W according to the position (x′,y′); and
generating a filtered prediction sample based on a linear combination of reference samples and the prediction sample according to the determined weights.
2 . The method of claim 1 , wherein
the weights include a weight w L associated with a left reference sample R −1,y′ , a weight w T associated with a top reference sample R x′,−1, and a weight (64−w L −w T ) associated with the prediction sample pred(x′,y′); and
the weight w L is equal to W>>((x′<<1)>>0) and the weight w T is equal to W>>((y′<<1)>>0).
3 . The method of claim 2 , wherein
the boundary filtering is performed by a position-dependent predictor combination (PDPC) filter, and
the generating the filtered prediction sample includes generating the filtered prediction sample as Clip (0, (1<<BitDepth)−1, (w L ×R −1,y′ +w T ×R x′,−1 +(64−w L −w T )×pred(x′,y′)+32)>>6), the BitDepth indicating a bit depth.
4 . The method of claim 1 , wherein the coded information of the block includes a coding block size, a coding block aspect ratio, whether the block is a luma component or a chroma component, neighboring reconstructed samples of the block, boundary prediction samples in the prediction block, a difference between neighboring reconstructed samples of the block and boundary prediction samples in the prediction block, or a color format of the block.
5 . The method of claim 1 , wherein the parameter W is determined as 8, 4, 16, or 2.
6 . The method of claim 1 , further comprising:
determining whether the boundary filtering is applied to the block from neighboring reconstructed samples.
7 . The method of claim 6 , wherein the determining whether the boundary filtering is applied comprises:
detecting a content type of the neighboring reconstructed samples;
when the content type of the neighboring reconstructed samples is a screen content, the boundary filtering is not applied to the block; and
when the content type of the neighboring reconstructed samples is not the screen content, the boundary filtering is applied to the block.
8 . The method of claim 7 , wherein the detecting the content type comprises:
checking a number of color values of the neighboring reconstructed samples; and
when the number of color values is less than a threshold of color values, detecting the content type as the screen content.
9 . The method of claim 8 , wherein the neighboring reconstructed samples are of a specific color component, and a color value includes a value of the specific color component.
10 . The method of claim 8 , wherein the neighboring reconstructed samples are associated with multiple color components, and a color value includes a combination of respective values of the multiple color components.
11 . The method of claim 1 , wherein the boundary filtering is applied only when a color component of the block is a luma component.
12 . The method of claim 1 , wherein the boundary filtering is applied for each color component associated with the block.
13 . The method of claim 1 , wherein the boundary filtering is applied only when a current slice including the block is an intra slice.
14 . A method of video encoding, comprising:
determining a prediction block of a block in a current picture using one of an intra block copy (IBC) mode and an intra template matching (IntraTMP) mode; and
when boundary filtering is applied to the prediction block of the block determined using the one of the IBC mode and the IntraTMP mode, applying the boundary filtering to a prediction sample pred(x′,y′) located at a position (x′,y′) in the prediction block corresponding to a sample in the block by:
determining a parameter W of the boundary filtering based on coding information of the block coded with the one of the IBC mode and the IntraTMP mode, the parameter W being selected from a plurality of different values;
determining weights used in the boundary filtering by right shifting the parameter W according to the position (x′,y′); and
generating a filtered prediction sample based on a linear combination of reference samples and the prediction sample according to the determined weights.
15 . The method of claim 14 , wherein
the weights include a weight w L associated with a left reference sample R −1,y′ , a weight w T associated with a top reference sample R x′,−1 , and a weight (64−w L −w T ) associated with the prediction sample pred(x′,y′); and
the weight w L is equal to W>>((x′<<1)>>0) and the weight w T is equal to W>>((y′<<1)>>0).
16 . The method of claim 15 , wherein
the boundary filtering is performed by a position-dependent predictor combination (PDPC) filter, and
the generating the filtered prediction sample includes generating the filtered prediction sample as Clip (0, (1<<BitDepth)−1, (w L ×R −1,y′ +w T ×R x′,−1 +(64−w L −w T )×pred(x′,y′)+32)>>6), the BitDepth indicating a bit depth.
17 . The method of claim 14 , wherein the coding information of the block includes a coding block size, a coding block aspect ratio, whether the block is a luma component or a chroma component, neighboring reconstructed samples of the block, boundary prediction samples in the prediction block, a difference between neighboring reconstructed samples of the block and boundary prediction samples in the prediction block, or a color format of the block.
18 . The method of claim 14 , wherein the parameter W is determined as 8, 4, 16, or 2.
19 . The method of claim 14 , further comprising:
determining whether the boundary filtering is applied to the block from neighboring reconstructed samples.
20 . A non-transitory computer-readable storage medium storing instructions which, when executed by a processor, cause the processor to perform a method of encoding a bitstream, the method comprising:
determining a prediction block of a block in a current picture using one of an intra block copy (IBC) mode and an intra template matching (IntraTMP) mode; and
when boundary filtering is applied to the prediction block of the block determined using the one of the IBC mode and the IntraTMP mode, applying the boundary filtering to a prediction sample pred(x′,y′) located at a position (x′,y′) in the prediction block corresponding to a sample in the block by:
determining a parameter W of the boundary filtering based on coding information of the block coded with the one of the IBC mode and the IntraTMP mode, the parameter W being selected from a plurality of different values;
determining weights used in the boundary filtering by right shifting the parameter W according to the position (x′,y′);
generating a filtered prediction sample based on a linear combination of reference samples and the prediction sample according to the determined weights;
encoding the bitstream based on the filtered prediction sample; and
transmitting the coded bitstream.