1. A method comprising: filtering an entire picture; analyzing filter distortion of a plurality of pixels of said picture; binning said pixels based on filter distortion such that each of at least two bins is associated with a different distortion; selecting a different filter for each bin, each filter adapted to the distortion associated with a particular bin and, further, each filter selected based at least in part on the cost of the filter in terms of the number of bits used by a filter coefficient; determining the rate distortion costs of no filtering, global filtering, and histogram segmentation based filtering and selecting the one with the least rate distortion cost; evaluating the efficiency of run length, quad tree and an arithmetic coding; and selectively applying one of run length, quad tree and arithmetic coding based on said evaluation to a filtering flag.