1 mpeg2encode / mpeg2decode
2 =========================
3 MPEG-2 Encoder / Decoder, Version 1.2, July 19, 1996
6 MPEG Software Simulation Group
8 E-mail: mssg@mpeg.org (author contact)
9 Web: http://www.mpeg.org/MSSG/
10 FTP: ftp://ftp.mpeg.org/pub/mpeg/mssg/
16 3. Contacting the MPEG Software Simulation Group
20 7. History of the technical report
26 This directory contains our implementation of an ISO/IEC DIS 13818-2
27 codec. It converts uncompressed video frames into MPEG-1 and MPEG-2
28 video coded bitstream sequences, and vice versa.
30 The files mpeg2enc.doc and mpeg2dec.doc in the doc/ directory contain
31 further information about the codec. The directory verify/ contains
32 a small set of verification pictures, a small bitstream, and Unix
33 shell script to automatically test the output of the encoder and decoder.
35 A precompiled version of the programs for Win32s (Windows NT/95) will
36 be made available later date, although it is trivial to make a console
37 application from the encoder and decoder with most Win32s compilers
38 (such as Microsoft Visual C++).
40 Subdirectories src/mpeg2enc and src/mpeg2dec contain the source code
41 for the encoder and decoder, subdirectory par/ contains a couple of
42 example encoder parameter files for 25 and 30 frames/sec MPEG-2 and
45 Summary of changes since July 4, 1994 release:
47 This is only the second official release of our MPEG-2 video software.
48 Only minor bug corrections have been added to the encoder. We still do
49 not implement scalable encoding, as this is mostly useful only for
52 The decoder has been updated to meet the final MPEG specification,
53 although the old decoder will still reconstruct Main Profile and MPEG-1
54 bitstreams just fine. The current decoder implements the most
55 important case of Spatial scalability, as well as SNR and Data
56 Partitioning. Temporal scalability is not implemented.
61 MPEG-2 Video is a generic method for compressed representation of video
62 sequences using a common coding syntax defined in the document ISO/IEC
63 13818 Part 2 by the International Organization for Standardization
64 (ISO) and the International Electrotechnical Commission (IEC), in
65 collaboration with the International Telecommunications Union (ITU) as
66 Recommendation H.262. The MPEG-2 concept is similar to MPEG-1, but
67 includes extensions to cover a wider range of applications.
69 The primary application targeted during the MPEG-2 definition process
70 was the all-digital transmission of interlaced broadcast TV quality
71 video at coded bitrates between 4 and 9 Mbit/sec. However, the MPEG-2
72 syntax has been found to be efficient for other applications such as
73 those at higher bit rates and sample rates (e.g. HDTV).
75 The most significant enhancement over MPEG-1 is the addition of syntax
76 for efficient coding of interlaced video (e.g. 16x8 block sizes for
77 motion compensation, field dct organization, Dual Prime prediction, et
78 al). Several other more subtle enhancements (e.g. 10-bit DCT DC
79 precision, non-linear macroblock scale quantizer, intra VLC tables,
80 improved IDCT mismatch control) were adopted which have a moderate
81 improvement in coding efficiency.... even for progressive video sequences.
83 Other key features of MPEG-2 are the scalable extensions which permit
84 the division of a continuous video signal into two or more coded bitstreams
85 representing the video at different resolutions (spatial scalability),
86 picture quality (SNR scalability and data partioning), or frame
87 rates (temporal scalability).
89 The MPEG Software Simulation Group is currently developing MPEG
90 software with the purpose of providing aid in understanding the various
91 algorithms which comprise an encoder and decoder, and giving a sample
92 implementation based on advanced encoding models. The MPEG-2 software
93 project is an on-going development. Since the current version of the
94 encoder already employs a reasonable (and the most popular) subset of
95 the MPEG-2 signal coding toolkit (MPEG-1 and MPEG-2 Main Profile), and
96 there appears to be sufficient public interest, we have decided to make
97 a public release of the code.
99 The encoder can also be used for generating good quality constant
100 bitrate MPEG-1 sequences and is (to our knowledge) the first publicly
101 available encoder based on the relatively sophisticated TM5 coding model.
104 3. Contacting the MPEG Software Simulation Group
105 ================================================
107 We welcome any project-specific questions, comments, suggestions, bug
108 reports etc. They should be sent to the Internet E-mail address:
112 which automatically forwards to the software authors.
117 The most recent version of the codec source code is available by anonymous
120 ftp://ftp.mpeg.org/pub/mpeg/mssg/
122 The directory contains the following files:
124 mpeg2vidcodec_v12.tar.gz codec source code and documentation
125 mpeg2v12.zip source code and Win32s executables
127 You need gunzip (GNU zip/unzip) to uncompress the .gz and .zip archives.
132 mpeg2decode and mpeg2encode have been compiled and tested on the following
135 - SUN SPARCstation 10, SunOS 4.1.3, (gcc compiler)
136 - '386-PC, MSDOS 5.0, djgpp v1.11, gcc v2.5.7 and MS Visual C++ 4.0
138 The source code should compile without major modifications on other 32
139 bit systems with ANSI C compliant compilers. Systems with 16 bit 'int'
140 variables or segmented memory models are not supported.
142 Please report any modifications you had to apply in order to install the
143 programs on your system to the address mssg@mpeg.org
145 The encoder and decoder are kept in separate sub-directories,
146 src/mpeg2dec contains the decoder, while src/mpeg2enc contains the
147 encoder sources. The following installation procedure applies to both
148 the encoder and the decoder:
151 Step 1: edit Makefile
152 ---------------------
154 You may have to set CC to your C compiler and CFLAGS to the flags required
155 by the compiler. It is sufficient to set these variables in the top directory
156 Makefile. They are propagated to the individual Makefiles of the encoder
157 and decoder. Any other changes have to be applied to the individual Makefiles,
160 You can compile the decoder with or without X11 output. Please follow the
161 instructions in the top-level Makefile to activate X Window System support.
163 Step 2: edit src/mpeg2dec/config.h
164 ----------------------------------
166 In most cases, no modification should be required. If your C library
167 doesn't accept "rb" / "wb" parameters in fopen() (required to disable
168 LF <-> CR/LF conversion on MSDOS systems), change the #defines RB and WB
175 Type 'make' from the top directory (mpeg2). On a PC with DJGPP installed you
176 have to enter 'make pc' in the individual source directories to produce
183 In the mpeg/verify directory, you can verify correct compilation of the
184 codec by typing 'make test'. No differences should be reported. The
185 only comparison which is allowed to fail is between test.m2v and
186 new.m2v, caused by floating point accuracy dependencies in the forward
192 Authors of the current release are:
194 Stefan Eckart <stefan@chromatic.com>
195 Chad Fogg <cfogg@chromatic.com>
197 420to422, 422to444 scaling filters:
198 Cheung Auyeung <auyeung@mot.com>
201 Sorin Papuc <sop@compcore.com>
203 Special thanks are due to
205 - J. Steurer, M. Oepen, IRT (Institut fuer Rundfunktechnik, Muenchen):
206 for contributing motion estimation speed improvements (distance
207 computation short-circuit in conjunction with spiral search, cf.
208 dist1(), fullsearch())
210 - Tristan Savatier <tristan@mpeg.org> for his help on numerous
211 improvements, suggestions, and features.
214 for providing bug reports and Makefiles
216 7. History of Technical Report Project
217 ======================================
219 The Technical Report, a document which primarily consists of
220 a C source code program, was initiated by the MPEG committee to:
222 - Provide an example of MPEG video syntax being intelligently employed
223 to generate good quality video bitstreams.
224 - A reference tool for implementors
225 - Aid in understanding the MPEG specification
226 - decoder which employs full arithmetic accuracy.