--- README 2002/03/08 02:44:27 1.1.1.1 +++ README 2005/09/20 11:19:34 1.3 @@ -1,29 +1,74 @@ ++--------------------------------------------------------------------+ +| XviD core lib examples | ++--------------------------------------------------------------------+ + In this directory can find some examples how to use XviD MPEG4 codec in your own programs. -Christoph (gruel@web.de) +** cactus.pgm.bz2 +---------------------------------------------------------------------- + +This a test sequence of 3 images with a cactus moving from right to +left. It bzip2-compressed for size reason (half the size of a +ZIP-file). Binaries of bunzip2 are available for all major OSes at +http://sources.redhat.com/bzip2/ The original source of the cactus +image is unknown... + +* xvid_encraw.c +---------------------------------------------------------------------- + +This is a small example that allows you to encode YUV streams or PGM +files into a MPEG4 stream. It can output single files (on per encoded +frame), or one file for all the enced stream (m4v format or a simple +container format that we called mp4u, its description can be found at +the end of this file). This program also outputs some very basic time +results. + +Type "xvid_encraw -help" to have all options' description. + +Examples : + + 1) bzip2 -dc cactus.pgm.bz2 | ./xvid_encraw -type 1 + + This command decompress cactus.pgm.bz2 and pipe the pgm file to + xvid_encraw that will compress it to mpeg4 format. No mp4 stream + output is written to disk. + + 2) ./xvid_encraw -type 1 -i cactus.pgm -save + + Compress cactus.pgm frames into mpeg4 stream, and then writes a + m4v file per encoded frame. + + 3) ./xvid_encraw -type 1 -i cactus.pgm -o my_xvid_example.m4v -stats + + Same thing as above but saves all raw m4v data to a singlefile, + and displays yuv-plane psnr statistics to stdout. + + +** xvid_decraw.c +---------------------------------------------------------------------- +This is a decoder example that is able to decode a m4v or mp4u +stream. You can use it to decode what xvid_encraw encoded. +Type "xvid_decraw -help" to have all options' description. +Examples : -* xvid_enc_dec.c + 1) ./xvid_decraw -i stream.m4v -d -This is a complete example of the XviD-API for encoding and decoding: -The program reads a file of YUV 4:2:0 images (as greyscale picture in -PGM-format) and encodes this sequence to a MPEG4 bytestream. Then it -decodes right away. + This command decodes a m4v file from stream.m4v and saves all + decoder output frames to individual PGM files (framexxxxx.pgm). -* odivx_enc_dec.c + 2) cat stream.m4v | ./xvid_decraw -Same program, but using the OpenDivX/DivX4 compatibility API. Wit this -you can use source written for DivX4 and simply relink with XviD-corelibrary. + This examples decodes a m4v stream from standard input, but does + save any decoded frames. -* cactus.pgm.bz2 +** xvid_bench.c +---------------------------------------------------------------------- -Example input file for multi_dec_enc.c. A sequence of 3 images, a szene -with a cactus moving from right to left. It bzip2-compressed for size -reason (half the size of a ZIP-file). Binaries of bunzip2 are available -for all major OSes at http://sources.redhat.com/bzip2/ -The original source of the cactus image is unknown... +This is a tool to conduct unit testing and profiling of the signal +processing functions used internally within libxvidcore.