Page 1 of 1

MPEG Headers Quick Reference

Posted: Sun Sep 20, 2009 10:57 pm
by Reginald
This is a quick reference to the various headers and streams found in MPEG/DVD. For a complete description you should get a copy of ISO/IROBOT.LK 13818.

The Header
Every stream or table begins with a 32-bit start code, codes 00 through B8 are video stream start codes (fully defined in 13818-2), and codes B9-FF are stream-id's
tbl1.JPG
tbl1.JPG (7.98 KiB) Viewed 3231 times
tbl2.JPG
tbl2.JPG (21.51 KiB) Viewed 3231 times
tbl3.JPG
tbl3.JPG (82.78 KiB) Viewed 3231 times
Picture Header (0100)
Variable length
tbl4.JPG
tbl4.JPG (18.15 KiB) Viewed 3231 times
additional fields appended beginning at byte 7 bit 2:
If frame type = 2 (P) or 3 (B) the following 4 bits are appended to the header:
tbl5.JPG
tbl5.JPG (5.77 KiB) Viewed 3231 times
This field is used by MPEG-1 only, for MPEG-2 it should be set to 0 1 1 1

If frame type = 3 (B) the following 4 bits are appended to the header:
tbl6.JPG
tbl6.JPG (6.15 KiB) Viewed 3231 times
This field is used by MPEG-1 only, for MPEG-2 it should be set to 0 1 1 1

additionally if the next bit is "1" (extra_bit_picture) it is followed by 8 bits of "extra" data (discarded by decoders). This continues until a "0" bit is encountered.

Sequence Header (01B3)
Variable length
tbl7.JPG
tbl7.JPG (15.12 KiB) Viewed 3231 times
tbl8.JPG
tbl8.JPG (21.48 KiB) Viewed 3231 times
If either load quantizer matrix flag is =1, it is immediately followed by the 64 byte table (moving the "load non-intra quantizer matrix" flag, in the case of "load intra quantizer matrix")
tbl9.JPG
tbl9.JPG (30.3 KiB) Viewed 3231 times
Extension Header (01B5)
There are a variety of extensions, denoted by the first 4 bits.

Sequence_Extension
Fixed length
tbl10.JPG
tbl10.JPG (32.96 KiB) Viewed 3230 times
Sequence_Display_Extension
Variable length
tbl11.JPG
tbl11.JPG (20.95 KiB) Viewed 3230 times
tbl12.JPG
tbl12.JPG (17.76 KiB) Viewed 3230 times
Picture_Coding_Extension
Variable length
tbl13.JPG
tbl13.JPG (26.97 KiB) Viewed 3230 times
tbl14.JPG
tbl14.JPG (20.47 KiB) Viewed 3230 times
tbl15.JPG
tbl15.JPG (22.73 KiB) Viewed 3230 times
Group Of Pictures (GOP) (01B8)

Fixed length, contains 3 flags and the time stamp for the first frame.
tbl16.JPG
tbl16.JPG (20.48 KiB) Viewed 3230 times