MPEG-1 Video Software Encoder (Version 1.1; August 9, 1993) Lawrence A. Rowe, Kevin Gong, Ketan Patel, and Dan Wallach Computer Science Division-EECS, Univ. of Calif. at Berkeley This directory contains the freely distributed Berkeley MPEG-1 Video Encoder. The encoder implements the standard described in the ISO/IEC International Standard 11172-2. The code has been compiled and tested on the following platforms: HP PA-RISC (HP/UX 8.X, X11R4) (i.e., HP 9000/7XX and 9000/3XX) Sun Sparc (SunOS 4.X, X11R5) DECstation 5000 and Alpha If you decide to port the code to a new architecture, please let us know so that we can incorporate the changes into our sources. This directory contains everything required to build the encoder and run it. We have included source code, makefiles, binaries for selected platforms, documentation, and test data. Installation instructions are given in the file named src/INSTALL. A man page is given in the file doc/mpeg_encode.1. The encoder will accept any input file format as long as you provide a script to convert the images to PPM or YUV format. Input file processing is described in the file doc/INPUT.FORMAT. Options to control input file processing and compression parameters are specified in a parameter file. Very little error processing is done when reading this file. We suggest you start with the sample parameter file examples/template.param and modify it. See also examples/default.param. We have also provided a Tcl/Tk script, named encode.tcl, that can be used to set parameters interactively (see the misc/ directory). The misc/ directory contains utility you might find useful including: programs to do PPM/YUV conversion and programs to convert Parallax XVideo JPEG files into PPM or YUV frames. The motion vector search window can be specified, including half-pixel block matching, in the parameter file. We have implemented several search algorithms for P-frames including: 1) exhaustive search, 2) subsampled search, and 3) logarithmic search. We have also implemented several alternatives for B-frame block matching including: 1) interpolate best forward and best backward block, 2) find backward block for best forward or vice-versa (called CROSS2), and 3) exhaustive cross product (i.e., go out for coffee and a donut!). The search algorithms are controlled by options in the parameters file. For tips on choosing the right search technique, see doc/TIPS. We have done some tuning to produce a reasonable encoder, but there are many more optimizations that we would like to incorporate. These extensions are listed in the file EXTENSIONS. If you succeed in implementing any of them, please let us know! We have established several mailing lists for messages about the Berkeley MPEG work: mpeg-list-dist@CS.Berkeley.EDU General information on the MPEG-1 decoder and encoder for everyone interested should be sent to this list. mpeg-list-request@CS.Berkeley.EDU Requests to join or leave the list should be sent to this address. The subject line should contain the single word ADD or DELETE. mpeg-bugs@CS.Berkeley.EDU Problems, questions, or patches should be sent to this address. Our future plans include porting the encoder to run on other platforms and completing a portable parallel version of the code that will run on a network of workstations. Vendors or other organizations interested in supporting this research or discussing other aspects of this project should contact Larry Rowe at Rowe@CS.Berkeley.EDU (+1 510-642-5117). ACKNOWLEDGEMENTS: We gratefully thank Hewlett-Packard and Fujitsu who provided financial support for this work. We also want to thank the following people for their help: Jef Poskanzer who developed the pbmplus package. --------- Copyright (C) 1989, 1991 by Jef Poskanzer. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty. --------- Eiichi Kowashi of Intel and Avideh Zakhor of U.C. Berkeley who provided valuable suggestions on motion vector searching. Chad Fogg of the University of Washington who has helped us understand many issues in MPEG coding and decoding. MPEG Video Software Decoder (Version 1.2; Nov 25,1992) Lawrence A. Rowe, Ketan Patel, and Brian Smith Computer Science Division-EECS, Univ. of Calif. at Berkeley This directory contains a public domain MPEG video software decoder. The decoder is implemented as a library that will take a video stream and display it in an X window on an 8, 24 or 32 bit deep display. The main routine is supplied to demonstrate the use of the decoder library. Several dithering algorithms are supplied based on the Floyd-Steinberg, ordered dither, and half-toning algorithms that tradeoff quality and performance. Neither the library nor the main routine handle real-time synchronization or audio streams. The decoder implements the standard described in the Committee Draft ISO/IEC CD 11172 dated December 6, 1991 which is sometimes refered to as "Paris Format." The code has been compiled and tested on the following platforms: HP PA-RISC (HP/UX 8.X, X11R4) (i.e., HP 9000/7XX and 9000/3XX) Sun Sparc (SunOS 4.X, X11R5) DECstation 5000 and Alpha IBM RS6000 Silicon Graphics Indigo MIPS RISC/os 4.51 Sequent Symmetry Sony NEWS PC's/Windows (see directory Windows3.x) If you decide to port the code to a new architecture, please let us know so that we can incorporate the changes into our sources. This directory contains everything required to build and display video. We have included source code, a makefile, an Imakefile, installation instructions, and a man page. Data files can be obtained from the same ftp site this was located in. See the INSTALL file for instructions on how to compile and run the decoder. The data files were produced by XING. XING data does not take advantage of P or B frames (ie, frames with motion compensation). Performance of the player on XING data is significantly slower (half or less) than the performance when motion compensated MPEG data is decoded. We are very interested in running the software on other MPEG streams. Please contact us if you have a stream that does not decode correctly. Also, please send us new streams produced by others that do utilize P and B frames. NOTE: One particular XING data file: raiders.mpg, is not a valid MPEG stream since it does not contain a sequence header. We have established several mailing lists for messages about the decoder: mpeg-list-dist@CS.Berkeley.EDU General information on the decoder for everyone interested should be sent to this list. This should become active after 11/20/92 mpeg-list-request@CS.Berkeley.EDU Requests to join or leave the list should be sent to this address. The subject line should contain the single word ADD or DELETE. mpeg-bugs@CS.Berkeley.EDU Problems, questions, or patches should be sent to this address. Our future plans include porting the decoder to run on other platforms, integrating it into a video playback system that supports real-time synchronization and audio streams, and further experiments to improve the performance of the decoder. Vendors or other organizations interested in supporting this research or discussing other aspects of this project should contact Larry Rowe at Rowe@CS.Berkeley.EDU. We also plan on producing an MPEG encoder. The encoder will NOT be a real time digitizer, but will be intended for offline processing of video data. ACKNOWLEDGEMENTS: We gratefully thank Hewlett-Packard, Fujitsu, the Semiconductor Research Corporation for financial support. We also want to thank the following people for their help: Tom Lane of the Independent JPEG Group provided us with the basic inverse DCT code used by our player. (tom_lane@g.gp.cs.cmu.edu) Reid Judd of Sun Microsystems provided advise and assistance. Todd Brunhoff of NVR provided advise and assistance. Toshihiko Kawai of Sony provided advise and assistance. -------------------------------- SAMPLE PARAMETER FILE # parameter file with good default values # # use this as a guideline for any parameters you don't really understand # or don't care about # PATTERN IBBPBBPBBPBBPBB OUTPUT output.mpg BASE_FILE_FORMAT PPM GOP_SIZE 30 SLICES_PER_FRAME 1 PIXEL HALF RANGE 10 PSEARCH_ALG LOGARITHMIC BSEARCH_ALG CROSS2 IQSCALE 8 PQSCALE 10 BQSCALE 25 REFERENCE_FRAME ORIGINAL # # you really need to understand the following # #YUV_SIZE 352x240 INPUT_CONVERT zcat * INPUT_DIR /usr/local/bv/video/data/aero/swing INPUT swing400*.ppm.Z [001-169+2] END_INPUT matisse:[mpeg] >cat param # parameter file with good default values # # use this as a guideline for any parameters you don't really understand # or don't care about # PATTERN IBBPBBPBBPBBPBB OUTPUT output.mpg BASE_FILE_FORMAT PPM GOP_SIZE 30 SLICES_PER_FRAME 1 PIXEL HALF RANGE 10 PSEARCH_ALG LOGARITHMIC BSEARCH_ALG CROSS2 IQSCALE 8 PQSCALE 10 BQSCALE 25 REFERENCE_FRAME ORIGINAL # # you really need to understand the following # #YUV_SIZE 352x240 INPUT_CONVERT zcat * INPUT_DIR /usr/local/bv/video/data/aero/swing INPUT swing400*.ppm.Z [001-169+2] END_INPUT