Provided are a filtering method and apparatus for removing blocking
artifacts and/or ringing noise. The filtering apparatus includes (a)
performing one-dimensional discrete cosine transform (1D DCT) on video
data on a block-by-block basis in a horizontal or vertical direction; (b)
performing 1D DCT in the other direction of (a) and quantization on at
least one of 1D DCT coefficients for a pixel obtained by performing
1D-DCT on the video data, the pixel being selected according to pixel
position; and (c) generating filtering information based on the quantized
pixel coefficient obtained from (b). According to the filtering method
and apparatus, it is possible to reduce the amount of calculation when
obtaining filtering information to remove the blocking artifacts and/or
ringing noise.