MPEG stands for Moving Picture Experts Group, which develops standards for coded media and associated systems.
MPEG Standards
| Standard | Scope and Examples |
|---|---|
| MPEG-1 | VCD audio and video, with a target around 1.5 Mbps at 352 × 240 for the lecture’s example. |
| MPEG-2 | DVD and digital television, including interlaced video and different profiles and levels. |
| MPEG-3 | HDTV proposal discontinued when MPEG-2 was considered sufficient. |
| MPEG-4 | Audio-visual objects, 3D content, low-bit-rate coding, and rights-management support. |
| MPEG-4 Part 10 | H.264, also called Advanced Video Coding (AVC). |
The lecture’s technical-specification breakdown refers to MPEG-2.
| MPEG-2 Part | Purpose |
|---|---|
| 1 | Systems, synchronisation, and multiplexing. |
| 2 | Video coding. |
| 3 | Audio coding. |
| 4 | Conformance testing. |
| 5 | Software simulation. |
| 6 | Digital Storage Media Command and Control (DSM-CC). |
| 7 | Advanced Audio Coding (AAC). |
| 8 | Discontinued part. |
| 9 | Real-time interfaces. |
| 10 | DSM-CC conformance extensions. |
MPEG Video Coding
Spatial Processing
Classic MPEG spatial processing follows a JPEG-like approach.
- Convert RGB into luminance and chrominance components.
- Divide the image data into 8 × 8 blocks.
- Apply a 2-dimensional DCT to each block.
- Quantise the DCT coefficients.
- Order the coefficients for run-length and entropy coding.
Temporal Processing
Classic MPEG motion prediction uses macroblocks with a 16 × 16 luminance region and associated chrominance data.
- Search reference pictures for a similar region.
- Encode motion vectors and residual differences.
- Use intra-coded blocks when prediction is unsuitable.
- Scene changes can trigger a new intra-coded reference picture.
Frame Types
| Frame | Coding Method | Typical Relative Size in the Lecture |
|---|---|---|
| I-frame | Intra-coded without another frame as a reference. | Largest. |
| P-frame | Predicted from a preceding I- or P-frame. | Approximately 1/3 of an I-frame. |
| B-frame | Can use preceding and following I- or P-frames. | Approximately 1/6 of an I-frame. |
Relative sizes depend on content and encoder settings.
Group of Pictures
A group of pictures (GOP) is a sequence of coded pictures organised around reference pictures.
- The lecture uses typical lengths of 12 or 15 frames.
- I-frames provide entry points for random access.
- Transmission and decoding order can differ from display order.
- Long prediction chains can propagate reference errors and complicate recovery.
- Bidirectional prediction introduces reordering delay.
A closed GOP requires no reference pictures outside the group.
Bit-Rate Allocation
| Mode | Allocation | Implication |
|---|---|---|
| CBR | Constrains output to a target rate. | Simplifies delivery over a fixed-capacity channel. |
| VBR | Allocates more bits to complex scenes. | Improves allocation across content with changing complexity. |
Stored media can use 2-pass VBR encoding to analyse scene complexity before allocating bits.
MPEG Audio Coding
| Standard | Properties |
|---|---|
| MPEG-1 audio | Defines Layers I, II, and III with different coding complexity. |
| MPEG-1 Layer III | MP3, with sampling rates of 32, 44.1, or 48 kHz and bit rates from 32 to 320 kbps. |
| MPEG-2 audio | Extends support to multichannel audio and lower sampling frequencies. |
| AAC | Supports sampling frequencies from 8 to 96 kHz and improved coding efficiency. |
MPEG audio can use CBR or VBR.
MPEG Systems
Container Formats
| Container | Intended Environment |
|---|---|
| Program Stream (PS) | Relatively reliable media such as disks. |
| Transport Stream (TS) | Error-prone delivery such as broadcast or network links. |
Audio-Video Synchronisation
Presentation timestamps (PTS) specify when decoded media should be presented.
- PTS uses a 90 kHz clock scale.
- Program Clock Reference (PCR) values let a transport-stream receiver recover sender timing.
- A phase-locked loop (PLL) can synchronise the receiver clock.
Worked Example
Frame Dependencies and Random Access
Adapted from December 2022 and November 2023, Question 4. The sequence below is an illustrative closed GOP.
Display order:
I0 B1 B2 P3 B4 B5 P6
Assume each P-frame references the preceding I- or P-frame. Each B-frame uses both surrounding reference frames.
| Frame | Required Reference Frames |
|---|---|
I0 | None. |
B1, B2 | I0 and P3. |
P3 | I0. |
B4, B5 | P3 and P6. |
P6 | P3. |
A valid decoding order is:
I0 P3 B1 B2 P6 B4 B5
To seek directly to B4 with an empty decoder:
- Locate the preceding random-access I-frame,
I0. - Decode
I0. - Decode
P3usingI0. - Decode
P6usingP3. - Decode
B4usingP3andP6. - Begin display at
B4.
B1 and B2 are unnecessary for this seek because no later frame references them in this example.
- Losing
P3affectsP6and every B-frame that depends on either reference. - Losing
B4does not invalidate the other frames in this example. - Longer GOPs can reduce I-frame overhead but increase the reference chain needed for seeking and recovery.
- Only a closed GOP avoids references to pictures outside the group.