A method for adaptively filtering a video signal prior to encoding is
provided. The method initiates with calculating a local gradient
indicative of a region type. Then, a weight factor is determined based
upon the local gradient. Next, the weight factor is applied to a
difference signal according to the region type. A computer readable
media, an integrated circuit and a system for processing an image data
signal are also provided.