An apparatus and method a method for performing two-pass real time video
compression is provided. Tactical decisions such as encoding and
quantization values are determined in software, whereas functional
execution steps are performed in hardware. By appropriately apportioning
the tasks between software and hardware, the benefits of each type of
processing are exploited, while minimizing both hardware complexity and
data transfer requirements. One key concept that allows the compression
unit to operate in real time is that the architecture and pipelining both
allow for B frames to be executed out of order. By buffering B frames,
two-pass motion estimation techniques can be performed to tailor bit usage
to the requirements of the frame, and thereby provide a more appealing
output image.