mpeg2decode is our implementation of an ISO/IEC DIS 13818-2 decoder. It converts MPEG-1 and MPEG-2 video bitstreams into uncompressed video.

mpg2ppm takes one ISO/IEC DIS 13818-2 [1] MPEG-2 video bitstream and convert them to uncompressed video. Since MPEG-2 is (by definition) forward compatible with MPEG-1, mpg2ppm also decodes MPEG-1 sequences (ISO/IEC IS 11172-2 [2]).

The decoder is not optimized for speed, although some parts (e.g. variable length decoding, inverse DCT) are based on relatively fast algorithms. The emphasis was on correct implementation of the standard and simple structure of the program. Its main purpose is to demonstrate a sample implementation of an MPEG-2 decoder and to serve as an educational tool. Our hope is that this implementation makes it easier to understand the relatively complex details of the standard.

As you can deduce from the list of missing features, mpg2ppm is still under development. However, we considered the current version to be complete enough to justify a public release.

The decoder has been extensively tested on bitstreams produced by a variety of encoders from the MPEG research community to ascertain validity of the implementation. Of course we can't guarantee complete compliance with the standard.


+ decodes non-scalable, spatial scalable, SNR scalable and data partitioning MPEG-2 video bitstreams

+ supports Simple, Main, SNR Scalable and Spatially Scalable Profile streams at all defined levels

+ decodes MPEG-1 (ISO/IEC IS 11172-2) video bitstreams (except D-picture sequences)

+ optional output of detailed decoding information

+ robustness against stream syntax errors

+ fast IEEE 1180-1990 compliant integer arithmetic inverse DCT

+ optional double precision floating point inverse DCT

+ Exports to Portable PixMap Image format as defined in PBMPLUS [5], a graphics package by Jef Poskanzer. Extension is .ppm.

  Missing Features

- spatial scalability other than interlaced -> interlaced

- P/B/D-picture MPEG-1 sequences

- temporal scalability

- error concealment

- repeat_field_first and other mostly display process oriented features.

Go to The Project page for more info and downloads. Logo