This paper deals with the question of optimizing the filters in the upsampling stage of a TV/HDTV compatible pyramidal coder. From a coding gain point of view, both the decimation and upsampling filters should be optimized. In the frame of compatible coding, not only the coding efficiency influences the choice of the decimation filter but also the compatible image quality. Therefore, assuming this filter has been fixed, we analyze the question of optimizing the upsampling filter in order to obtain the highest coding gain. This question is addressed for a mean squared error (MSE) criterion. In addition, assuming the base layer (TV) signal can be quantized, the influence on the quantization noise on the optimal interpolation filter is investigated and the problem is handled for the MSE criterion. As the statistical properties of pictures are required in the optimization, a model is then developed to compute these properties when there is motion. The model takes into account the processing of progressive sources and, concerning interlaced sequences, the independent processing of fields or the processing of merged fields. Results are then derived for the three types of processing.