A new technique for the design of finite impulse response (FIR) filters for decimation and interpolation in multirate systems is presented. With this technique, FIR pre- and post-filters that jointly minimize a frequency-weighted mean-square (m.s.) error between the original and reconstructed signals can be designed. Unlike most other FIR filter design methods, there is no need for ideal filter prototypes: the optimal pre-post filter pair is determined from the signal and noise spectra and the up- and down-sampling factors. Some examples of image and speech processing show that the m.s.-optimal filter pair leads to typical SNR improvements of 2-6 dB, in comparison with other commonly used filters.