A motion video signal encoder maximizes image quality without exceeding transmission
bandwidth available to carry the encoded motion video signal by comparing encoded
frames of the motion video signal to a desired size of frame. If the size of encoded
frames differ from the desired size, quantization is adjusted to produce encoded
frames closer in size to the desired size. In addition, a cumulative bandwidth
balance records an accumulated amount of available bandwidth. The cumulative bandwidth
balance is adjusted as time elapses to add to the available bandwidth and as each
frame is encoded to thereby consume bandwidth. If the cumulative bandwidth balance
deviates from a predetermined range, quantization is adjusted as needed to either
improve image quality to more completely consume available bandwidth or to reduce
image quality to thereby consume less bandwidth. Rapid changes in the amount of
change or motion in the motion video signal are detected by comparing the amount
of change between two consecutive frames and the amount of change between the next
two consecutive frames. Quantization is precompensated according to the measured
rapid change. Conditional replenishment is improved by dividing macroblocks into
quadrants and measuring differences between corresponding quadrants of macroblocks.
As a result, sensitivity to changes along edges and corners of macroblocks is increased.
In addition, sensitivity to changes in a particular macroblock is increased when
an adjacent macroblock contains sufficient change to be encoded and therefore not
a candidate for conditional replenishment.