Efficient rounding for deblocking
The present disclosure relates to deblocking filtering which is applicable to smoothing the block boundaries in an image or video coding and decoding. In particular, the deblocking filtering is either strong or weak, wherein the clipping is performed differently in the strong filtering and the weak filtering.
1. A decoding device comprising:
a memory; and
circuitry coupled to the memory and configured to:
select a filter adapted to a boundary between a first block and a second block, from among candidates, the candidates including a first filter and a second filter;
in response to selecting the first filter, change values of first pixels using clipping such that change amounts of the respective values of the first pixels are within respective first clipping widths, the respective values of the first pixels being changed using the change amounts of the respective values of the first pixels; and
in response to selecting the second filter, change values of second pixels using clipping such that change amounts of the respective values of the second pixels are within respective second clip widths, the respective values of the second pixels being changed using the change amounts of the respective values of the second pixels,
wherein a total number of the second pixels being larger than a total number of the first pixels, and
wherein the first clipping widths are different from the second clipping widths.
2. An encoding device comprising:
a memory; and
circuitry coupled to the memory and configured to:
select a filter adapted to a boundary between a first block and a second block, from among candidates, the candidates including a first filter and a second filter;
in response to selecting the first filter, change values of first pixels using clipping such that change amounts of the respective values of the first pixels are within respective first clipping widths, the respective values of the first pixels being changed using the change amounts of the respective values of the first pixels; and
in response to selecting the second filter, change values of second pixels using clipping such that change amounts of the respective values of the second pixels are within respective second clip widths, the respective values of the second pixels being changed using the change amounts of the respective values of the second pixels,
wherein a total number of the second pixels being larger than a total number of the first pixels, and wherein the first clipping widths are different from the second clipping widths.