A de-blocking method smoothes pixels along a row or column that crosses a
block boundary. Smoothing is performed to remove quantization or
compression artifacts that appear on block edges when pixels in adjacent
blocks are separately compressed. A maximum-allowed edge-pixel difference
is generated from the quantization parameter QP. For each edge-crossing
row or column, an edge difference is generated as half the difference
between adjacent edge pixels in two blocks. This edge difference is
compared to the maximum-allowed edge-pixel difference. When the edge
difference is larger than the maximum-allowed edge-pixel difference, then
the difference is limited to the maximum-allowed edge-pixel difference,
since the pixel difference may be a real edge in the image. The limited
or edge difference is then added or subtracted in decreasing amounts for
several pixels in the row or column near the edge, smoothing the edge
difference across several pixels, such as seven pixels.