A method to remove ringing artifacts from locations near dominant edges of
an image reconstructed after compression. The image is decomposed into
blocks small enough so that each would contain only one significant edge.
A significant edge is tested as to whether it is a dominant edge of the
image. If there is no dominant edge, the block is not processed. In the
remaining blocks, the exact pixels that include the dominant edges are
output without filtering. The direction of the dominant edges is
inferred, and then the remaining pixels are filtered with a directional
de-ringing filter. The de-ringing filter has a main direction that is
perpendicular with the direction of the edge, and thus also with an
inherent direction of the ringing artifacts.