Dave Chapman | c9d6656 | 2006-08-07 22:11:07 +0000 | [diff] [blame] | 1 | |
| 2 | |
| 3 | ABOUT LIBMPEG2 |
| 4 | |
| 5 | libmpeg2 is a free library for decoding mpeg-2 and mpeg-1 video |
| 6 | streams. It is released under the terms of the GPL license. |
| 7 | |
| 8 | The main goals in libmpeg2 development are: |
| 9 | |
| 10 | * Conformance - libmpeg2 is able to decode all mpeg streams that |
| 11 | conform to certain restrictions: "constrained parameters" for |
| 12 | mpeg-1, and "main profile" for mpeg-2. In practice, this is |
| 13 | what most people are using. For streams that follow these |
| 14 | restrictions, we believe libmpeg2 is 100% conformant to the |
| 15 | mpeg standards - and we have a pretty extensive test suite to |
| 16 | check this. |
| 17 | |
| 18 | * Speed - there has been huge efforts there, and we believe |
| 19 | libmpeg2 is the fastest library around for what it |
| 20 | does. Please tell us if you find a faster one ! With typical |
| 21 | video streams as found on DVD's, and doing only decoding with |
| 22 | no display, you should be able to get about 110 fps on a |
| 23 | PIII/666, or 150 fps on an Athlon/950. This is less than 20 |
| 24 | cycles per output pixel. In a real player program, the display |
| 25 | routines will probably take as much time as the actual |
| 26 | decoding ! |
| 27 | |
| 28 | * Portability - most of the code is written in C, and when we |
| 29 | use platform-specific optimizations (typically assembly |
| 30 | routines, currently used for the motion compensation and the |
| 31 | inverse cosine transform stages) we always have a generic C |
| 32 | routine to fall back on. This should be portable to all |
| 33 | architectures - at least we have heard reports from people |
| 34 | running this code on x86, ppc, sparc, arm and |
| 35 | sh4. Assembly-optimized implementations are available on x86 |
| 36 | (MMX) and ppc (altivec) architectures. Ultrasparc (VIS) is |
| 37 | probably the next on the list - we'll see. |
| 38 | |
| 39 | * Reuseability - we do not want libmpeg2 to include any |
| 40 | project-specific code, but it should still include enough |
| 41 | features to be used by very diverse projects. We are only |
| 42 | starting to get there - the best way to help here is to give |
| 43 | us some feedback ! |
| 44 | |
| 45 | The project homepage is at http://libmpeg2.sourceforge.net/ |
| 46 | |
| 47 | |
| 48 | MPEG2DEC |
| 49 | |
| 50 | mpeg2dec is a test program for libmpeg2. It decodes mpeg-1 and mpeg-2 |
| 51 | video streams, and also includes a demultiplexer for mpeg-1 and mpeg-2 |
| 52 | program streams. It is purposely kept simple : it does not include |
| 53 | features like reading files from a DVD, CSS, fullscreen output, |
| 54 | navigation, etc... The main purpose of mpeg2dec is to have a simple |
| 55 | test bed for libmpeg2. |
| 56 | |
| 57 | The libmpeg2 source code is always distributed in the mpeg2dec |
| 58 | package, to make it easier for people to test it. |
| 59 | |
| 60 | The basic usage is to just type "mpeg2dec file" where file is a |
| 61 | demultiplexed mpeg video file. |
| 62 | |
| 63 | The "-s" option must be used for multiplexed (audio and video) mpeg |
| 64 | files using the "program stream" format. These files are usualy found |
| 65 | on the internet or on unencrypted DVDs. |
| 66 | |
| 67 | The "-t" option must be used for multiplexed (audio and video) mpeg |
| 68 | files using the "transport stream" format. These files are usualy |
| 69 | found in digital TV applications. |
| 70 | |
| 71 | The "-o" option is used to select a given output module - for example |
| 72 | to redirect the output to a file. This is also used for performance |
| 73 | testing and conformance testing. |
| 74 | |
| 75 | The "-c" option is used to disable all optimizations. |
| 76 | |
| 77 | |
| 78 | OTHER PROJECTS USING LIBMPEG2 |
| 79 | |
| 80 | libmpeg2 is being used by various other projects, including: |
| 81 | |
| 82 | * xine (http://xine.sourceforge.net/) - started as a simple |
| 83 | mpeg-2 audio and video decoder, but it since became a |
| 84 | full-featured DVD and video media player. |
| 85 | |
| 86 | * VideoLAN (http://www.videolan.org/) - video streaming over an |
| 87 | ethernet network, can also be used as a standalone player. |
| 88 | |
| 89 | * MPlayer (http://www.MPlayerHQ.hu) - another good player, it is |
| 90 | also very robust against damaged streams. |
| 91 | |
| 92 | * movietime (http://movietime.sourceforge.net/) - still quite |
| 93 | young, but it looks very promising ! |
| 94 | |
| 95 | * mpeg2decX (http://homepage1.nifty.com/~toku/software_en.html) - |
| 96 | a graphical interface for mpeg2dec for macintosh osX. |
| 97 | |
| 98 | * TCVP (http://tcvp.sf.net) - video and music player for unix. |
| 99 | |
| 100 | * drip (http://drip.sourceforge.net/) - a DVD to DIVX transcoder. |
| 101 | |
| 102 | * PoMP |
| 103 | (http://www.dmclab.hanyang.ac.kr/research/project/PoDS/PoDS_sw.htm) - |
| 104 | a research player optimized to minimize disk power consumption. |
| 105 | |
| 106 | * OMS (http://www.linuxvideo.org/oms/) |
| 107 | |
| 108 | * XMPS (http://xmps.sourceforge.net/) |
| 109 | |
| 110 | * GStreamer (http://www.gstreamer.net/) - a framework for |
| 111 | streaming media; it has an mpeg2 decoding plugin based on |
| 112 | libmpeg2. |
| 113 | |
| 114 | * mpeglib (http://mpeglib.sourceforge.net/) - a video decoding |
| 115 | library that usess libmpeg2 when decoding mpeg streams. |
| 116 | |
| 117 | * daphne (http://daphne.rulecity.com/) - a laserdisc arcade game |
| 118 | simulator. |
| 119 | |
| 120 | * GOPchop (http://outflux.net/unix/software/GOPchop/) - a |
| 121 | GOP-accurate editor for MPEG2 streams. |
| 122 | |
| 123 | If you use libmpeg2 in another project, let us know ! |
| 124 | |
| 125 | |
| 126 | TASKS |
| 127 | |
| 128 | There are several places where we could easily use some help: |
| 129 | |
| 130 | * Documentation: libmpeg2 still has no documentation. Every |
| 131 | project using it has had to figure things out by looking at |
| 132 | the header files, at the mpeg2dec sample application, and by |
| 133 | asking questions. Writing down a nice documentation would make |
| 134 | the code more easily reuseable. |
| 135 | |
| 136 | * Testing: If you find any stream that does not decode right |
| 137 | with libmpeg2, let us know ! The best thing would be to mail |
| 138 | to the libmpeg2-devel mailing list. Also, it would be nice to |
| 139 | build a stress test so we can make sure libmpeg2 never crashes |
| 140 | on bad streams. |
| 141 | |
| 142 | * Coding: There is a small TODO list in the mpeg2dec package, |
| 143 | you can have a look there ! Most items are pretty terse |
| 144 | though. |
| 145 | |
| 146 | * Porting: If you're porting to a new architecture, you might |
| 147 | want to experiment with the compile flags defined in |
| 148 | configure.in . When you figure out whats fastest on your |
| 149 | platform, send us a patch ! |
| 150 | |
| 151 | * Assembly optimizations: We only have x86 and altivec |
| 152 | optimizations yet, it would be worthwhile writing routines for |
| 153 | other architectures, especially those that have SIMD |
| 154 | instruction set extensions ! Also the yuv2rgb x86 routines |
| 155 | could probably be optimized a lot. |
| 156 | |
| 157 | |
| 158 | CVS SNAPSHOTS |
| 159 | |
| 160 | A daily snapshot is created using "make distcheck" every night and |
| 161 | uploaded to http://libmpeg2.sourceforge.net/files/mpeg2dec-snapshot.tar.gz . |
| 162 | It is easier to use than the CVS repository, because you do not need |
| 163 | to have the right versions of automake, autoconf and libtool |
| 164 | installed. It might be convenient when working on a libmpeg2 port for |
| 165 | example. |
| 166 | |
| 167 | |
| 168 | CVS REPOSITORY |
| 169 | |
| 170 | The latest libmpeg2 and mpeg2dec source code can always be found by |
| 171 | anonymous CVS: |
| 172 | |
| 173 | # export CVSROOT=:pserver:anonymous@cvs.libmpeg2.sourceforge.net:/cvsroot/libmpeg2 |
| 174 | # cvs login (Just press Return when prompted for a password) |
| 175 | # cvs checkout mpeg2dec |
| 176 | |
| 177 | You can also browse the latest changes online at |
| 178 | http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/libmpeg2/mpeg2dec/ |
| 179 | |
| 180 | The other CVS modules are mpeg2dec-streams for the test suite, and |
| 181 | mpeg2dec-livid for the CVS history of the project while it was still |
| 182 | hosted on the linuxvideo.org servers. |
| 183 | |
| 184 | |
| 185 | MAILING LISTS |
| 186 | |
| 187 | See the subscription information at http://libmpeg2.sourceforge.net/lists.html |
| 188 | |
| 189 | libmpeg2-devel |
| 190 | |
| 191 | This is the main mailing list for technical discussion about |
| 192 | libmpeg2. Anyone wanting to work on libmpeg2, or maybe just stay |
| 193 | informed about the development process, should probably subscribe to |
| 194 | this list. |
| 195 | |
| 196 | libmpeg2-checkins |
| 197 | |
| 198 | All libmpeg2 checkins are announced there. This is a good way to keep |
| 199 | track of what goes into CVS. |
| 200 | |
| 201 | libmpeg2-announce |
| 202 | |
| 203 | This is a very low traffic mailing list, only for announcements of new |
| 204 | versions of libmpeg2. Only project administrators can post there. |