A method for removing blocking artifacts from moving and still pictures,
comprising classifying horizontal and vertical boundaries in each picture
as blocky or non-blocky; for each blocky boundary, defining an adaptive,
picture content-dependent, one-dimensional filtered pixels region of
interest (ROI) that crosses the boundary and is bound at each of its ends
by a bounding pixel; defining a finite filter having a length correlated
with the length of the ROI; defining a filtering pixels expansion that
uniquely determines the padding values of the finite length filtered
pixels ROI for the finite length filtering; and filtering the ROI pixels
using the finite filter and the filtering expansion.