Disclosed are a filtering method and apparatus which adaptively perform deblocking filtering. According to one embodiment of the present invention, the adaptive filtering method involves: acquiring parameters which indicate the degree of proximity of values of pixels located around a block boundary to a predetermined line; determining a filtering strength at the block boundary on the basis of the acquired parameter; and performing filtering in accordance with the determined filtering strength.