Filtering method for removing blocking artifact and apparatus
AssigneeHuawei Technologies Co., Ltd.
InventorsHuanbang Chen, Sixin Lin, Haitao Yang, Shan Gao
Life of this patent
Estimating the term…
Abstract
The present invention relates to the field of video image processing, and provides a filtering method and an apparatus, to resolve a problem that subjective quality and objective quality of an image deteriorate because filtering processing cannot be performed on internal blocks of a non-translational motion prediction unit.
Claims14
A computer readable medium comprising a bitstream generated by a method for processing an image block, wherein the image block is an affine motion image block that is one of a plurality of image blocks of an image and the affine motion image block comprises two or more affine motion subunits, wherein each affine motion subunit comprises a plurality of pixels and the method comprises:
- for an affine motion subunit comprised in the affine motion image block, determining a boundary of the affine motion subunit as a filtering boundary
- for the filtering boundary, obtaining pixel values of a first affine motion subunit and pixel values of a second affine motion subunit, wherein the first affine motion subunit and the second affine motion subunit are adjacent to the filtering boundary and in the two or more affine motion subunits;
- and
- determining a boundary strength value of the filtering boundary;
- performing, based on the boundary strength value of the filtering boundary, the pixel values of the first affine motion subunit and the pixel values of the second affine motion subunit, filtering processing on pixels adjacent to the filtering boundary;
- and
- encoding prediction mode information into the bitstream, wherein the prediction mode information indicates an affine motion mode of the affine motion image block;
- wherein the determining the boundary strength value of the filtering boundary comprises:
- when the following condition (3) is a true condition, setting the boundary strength value of the filtering boundary to 1;
- (3) the first affine motion subunit has two motion vectors and reference images indicated by the two motion vectors are the same;
- the second affine motion subunit has two motion vectors and reference images indicated by the two motion vectors are the same;
- and the following two conditions a and b are true conditions:
- (a) a difference between horizontal components or vertical components of two motion vectors that indicate a forward reference candidate list list0 is greater than or equal to a motion vector difference threshold T;
- or a difference between horizontal components or vertical components of two motion vectors that indicate a backward reference candidate list list1 is greater than or equal to the motion vector difference threshold T;
- and
- (b) a difference between horizontal components or vertical components of a motion vector that indicates a forward reference candidate list list0 and that is of the first affine motion subunit and a motion vector that indicates a backward reference candidate list list1 and that is of the second affine motion subunit is greater than or equal to the motion vector difference threshold T;
- or a difference between horizontal components or vertical components of a motion vector that indicates a backward reference candidate list list1 and that is of the first affine motion subunit and a motion vector that indicates a forward reference candidate list list0 and that is of the second affine motion subunit is greater than or equal to the motion vector difference threshold T.
A method for processing an image block, wherein the image block is an affine motion image block that is one of a plurality of image blocks of an image and the affine motion image block comprises two or more affine motion subunits, wherein each affine motion subunit comprises a plurality of pixels and the method comprises:
- for an affine motion subunit comprised in the affine motion image block, determining a boundary of the affine motion subunit as a filtering boundary
- for the filtering boundary, obtaining pixel values of a first affine motion subunit and pixel values of a second affine motion subunit, wherein the first affine motion subunit and the second affine motion subunit are adjacent to the filtering boundary and in the two or more affine motion subunits;
- and
- determining a boundary strength value of the filtering boundary;
- performing, based on the boundary strength value of the filtering boundary, the pixel values of the first affine motion subunit and the pixel values of the second affine motion subunit, filtering processing on pixels adjacent to the filtering boundary;
- and
- encoding prediction mode information into a bitstream, wherein the prediction mode information indicates an affine motion mode of the affine motion image block;
- wherein the determining the boundary strength value of the filtering boundary comprises:
- when the following condition (3) is a true condition, setting the boundary strength value of the filtering boundary to 1;
- (3) the first affine motion subunit has two motion vectors and reference images indicated by the two motion vectors are the same;
- the second affine motion subunit has two motion vectors and reference images indicated by the two motion vectors are the same;
- and the following two conditions a and b are true conditions:
- (a) a difference between horizontal components or vertical components of two motion vectors that indicate a forward reference candidate list list0 is greater than or equal to a motion vector difference threshold T;
- or a difference between horizontal components or vertical components of two motion vectors that indicate a backward reference candidate list list1 is greater than or equal to the motion vector difference threshold T;
- and
- (b) a difference between horizontal components or vertical components of a motion vector that indicates a forward reference candidate list list0 and that is of the first affine motion subunit and a motion vector that indicates a backward reference candidate list list1 and that is of the second affine motion subunit is greater than or equal to the motion vector difference threshold T;
- or a difference between horizontal components or vertical components of a motion vector that indicates a backward reference candidate list list1 and that is of the first affine motion subunit and a motion vector that indicates a forward reference candidate list list0 and that is of the second affine motion subunit is greater than or equal to the motion vector difference threshold T.
An apparatus for processing an image block, wherein the image block is an affine motion image block that is one of a plurality of image blocks of an image and the affine motion image block comprises two or more affine motion subunits, wherein each affine motion subunit comprises a plurality of pixels and the apparatus comprises:
- a processor, configured to:
- determine a boundary of the affine motion subunit as a filtering boundary, for an affine motion subunit comprised in the affine motion image block,
- obtain, for the filtering boundary, pixel values of a first affine motion subunit and pixel values of a second affine motion subunit, wherein the first affine motion subunit and the second affine motion subunit are adjacent to the filtering boundary and in the two or more affine motion subunits;
- and
- determine a boundary strength value of the filtering boundary;
- perform, based on the boundary strength value of the filtering boundary, the pixel values of the first affine motion subunit and the pixel values of the second affine motion subunit, filtering processing on pixels adjacent to the filtering boundary;
- and
- encode prediction mode information into a bitstream, wherein the prediction mode information indicates an affine motion mode of the affine motion image block;
- wherein the determining the boundary strength value of the filtering boundary comprises:
- when the following condition (3) is a true condition, setting the boundary strength value of the filtering boundary to 1;
- (3) the first affine motion subunit has two motion vectors and reference images indicated by the two motion vectors are the same;
- the second affine motion subunit has two motion vectors and reference images indicated by the two motion vectors are the same;
- and the following two conditions a and b are true conditions:
- (a) a difference between horizontal components or vertical components of two motion vectors that indicate a forward reference candidate list list0 is greater than or equal to a motion vector difference threshold T;
- or a difference between horizontal components or vertical components of two motion vectors that indicate a backward reference candidate list list1 is greater than or equal to the motion vector difference threshold T;
- and
- (b) a difference between horizontal components or vertical components of a motion vector that indicates a forward reference candidate list list0 and that is of the first affine motion subunit and a motion vector that indicates a backward reference candidate list list1 and that is of the second affine motion subunit is greater than or equal to the motion vector difference threshold T;
- or a difference between horizontal components or vertical components of a motion vector that indicates a backward reference candidate list list1 and that is of the first affine motion subunit and a motion vector that indicates a forward reference candidate list list0 and that is of the second affine motion subunit is greater than or equal to the motion vector difference threshold T.
Dependencies are inferred from the claim text.