A method and apparatus from removing image compression artifacts includes
comparing a center pixel value with a perimeter pixel value to generate a
compare pixel value. The compare pixel value is compared with a threshold
value such that when the compare pixel value is below a threshold value,
a count value is incremented and an accumulation value is accumulated.
The method and apparatus includes repeating the comparison of perimeter
pixel values with the center pixel values. The method and apparatus
further includes if the count value has been incremented, generating an
output center pixel value based on the quotient of the accumulation value
divided by the count value as the center pixel value.