libmpeg2 is a free library for decoding mpeg-2 and mpeg-1 video streams.
cd Ports/libmpeg2
./package.sh
libmpeg2 is a free library for decoding mpeg-2 and mpeg-1 video streams. It is released under the terms of the GPL license.
The main goals in libmpeg2 development are:
Conformance - libmpeg2 is able to decode all mpeg streams that conform to certain restrictions: "constrained parameters" for mpeg-1, and "main profile" for mpeg-2. In practice, this is what most people are using. For streams that follow these restrictions, we believe libmpeg2 is 100% conformant to the mpeg standards - and we have a pretty extensive test suite to check this.
Speed - there has been huge efforts there, and we believe libmpeg2 is the fastest library around for what it does. Please tell us if you find a faster one! With typical video streams as found on DVD's, and doing only decoding with no display, you should be able to get about 110 fps on a PIII/666, or 150 fps on an Athlon/950. This is less than 20 cycles per output pixel. In a real player program, the display routines will probably take as much time as the actual decoding!
Portability - most of the code is written in C, and when we use platform-specific optimizations (typically assembly routines, currently used for the motion compensation and the inverse cosine transform stages) we always have a generic C routine to fall back on. This should be portable to all architectures - at least we have heard reports from people running this code on x86, ppc, sparc, arm and sh4. Assembly-optimized implementations are available on x86 (MMX) and ppc (AltiVec) architectures. Ultrasparc (VIS) is probably the next on the list - we'll see.
Reuseability - we do not want libmpeg2 to include any project-specific code, but it should still include enough features to be used by very diverse projects. We are only starting to get there - the best way to help here is to give us some feedback!
Website: https://libmpeg2.sourceforge.io/
Port: https://github.com/SerenityOS/serenity/tree/master/Ports/libmpeg2
Dependents: scummvm