This invention controls the code generation quantity adaptively with
respect to the pattern of images and changes in the images, etc., so as
to alleviate degradation in image quality, and to effectively reduce the
spatial redundancy in order to provide a margin in the code quantity and
to improve the overall image quality. An adaptive filter has a
coefficient table memory that holds N coefficient tables, filter
coefficients F.sub.1, F.sub.2 . . . F.sub.N that provide different
filtering characteristics, a filter coefficient selecting 46 for
selecting one filter coefficient F.sub.k from filter coefficient tables
and filter calculating unit performing prescribed calculations on the DCT
coefficients using the selected filter coefficient F.sub.K.