MPEG-1
Motion Estimation and Subsampling:
In MPEG, Motion estimation is done BEFORE subsampling and separation of the Y U and V bands. This means that there is only one motion vector for a macroblock rather than one for each of the 3 bands (Y, U, and V). The results of motion estimation will then be processed similar to JPEG in the following manner:
This sequence is done for all types of frames. Although it may at first seem counterintuitive, the error matrices from motion vectors are also passed through DCT and the remaining steps of JPEG. The reason for this is that you expect little or no change in the macroblock as it moves from frame to frame. Any change that the macroblock does go through will likely be a change that will affect the entire region or low frequency gradual change from one side of the region to another. As an example, consider a macroblock that is forward predicted into a region that is covered by a shadow. The Y component of each pixel may reduce by a constant factor, and the U and V values will not change. Therefore, if you think of it in this manner, DCT will encode change that affects an entire region as the DC coefficient, and the remaining AC coefficients in this case would be near zero. This enables us to save a great deal of space.
Error Handling:
MPEG-1 is a format designed for computer use only, it is not intended for broadcast purposes. In MPEG-1, if you lose an I frame then the entire GOP is lost. If you lose a P frame, you can lose all frames until the next reference frame.
MPEG-2
Enhancements over MPEG-1
MPEG-2 has several enhancements over MPEG-1, and it is designed for broadcast use as well as computer use. Some of the enhancements include:
Remember, TV signals are interlaced. That means that the TV first reads and displays all the odd scan lines before reading and displaying the even scan lines for a frame. MPEG-2 understands this and encodes a frame in two fields, top (odd) and bottom (even).
Each field can be of type I, P, or B, with the following restrictions:
In MPEG-2, you can identify a slice, a part of a field that is guaranteed
to be intracoded. Therefore, if you know that a certain region of all frames
is intracoded and that no prediction is required to decode it, you can
use this slice to display frames while fast-forwarding and also for reverse-playback.
Next time, we will cover the MPEG system layer. Also note that the first paper, "Continuity and Synchronization in MPEG" is available outside AP&M 5337.