Blocking artifacts are a major degradation affecting blockbased video compression. In this paper an adaptively based filter is proposed, whereby the type of filtering to be applied is chosen based on local image characteristics. Having three modes of filtering, it allows for strong filtering in flat areas where the blocking effect is most noticeable, detail preserving filtering in highly complex regions, while allowing for the smoothing of intermediate areas without excessively blurring the image. Objective, and more notably subjective testing, show the effectiveness of the proposed postprocessing technique. PSNR improvements of the order of 0.3 dB are found compared to the non-postprocessed image. Computational demands (less than a million operations per QCIF frame) make the proposed method practical for real time implementation.