This paper addresses jointly rate-distortion optimal selection of coding pa
rameters in a general motion-compensated video coder. The general coder use
s variable-block-size motion estimation and multimode residual coding. This
is essentially the optimal bit-allocation problem for an individual frame
at a given rate constraint. This paper not only gives the general formulati
on and solution using the Lagrange multiplier method and dynamic programmin
g, but also demonstrates how the general theory can be adapted and applied
to both an MPEG-like coder and a motion-compensated wavelet coder. Simulati
ons demonstrate that both proposed coders outperform MPEG (TM5) by 0.7-1.3
dB at a variety of bit rates, with the gain provided by both better motion
estimation and the joint-parameter optimization. The technique is applicabl
e to MPEG-compliant coders with fixed block-size motion estimation and prov
ides a gain of 0.5-0.7 dB over TM5, The optimization approach can also be a
pplied to distortion-constrained coding, and therefore allows a fine tuning
of either the rate or distortion to follow any desired profile.