95fa7f6a2e
the parser. This is strictly parser-related and main.c shouldn't have to deal with it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21043 a1c6a512-1295-4272-9138-f99709370657 |
||
---|---|---|
.. | ||
bitstream.c | ||
bitstream.h | ||
bswap.h | ||
cook.c | ||
cook.h | ||
cook_fixp_mdct.h | ||
cook_fixpoint.h | ||
cookdata.h | ||
cookdata_fixpoint.h | ||
ffmpeg_config.h | ||
main.c | ||
Makefile.test | ||
README.rockbox | ||
rm.c | ||
rm.h |
Library: libcook Imported by : Mohamed Tarek These files comprise a rm parser and a cook decoder based on the decoder from ffmpeg. LICENSING INFORMATION ffmpeg is licensed under the Lesser GNU General Public License and the file cook.c is Copyright 2003 Sascha Sommer and 2005 Benjamin Larsson. IMPORT DETAILS The decoder is based on ffmpeg-svn r18079. The file libavcodec/cook.c was modified to remove all ffmpeg-specific code and to use the current rm parser. In initializing random_state in COOKContext, ffmpeg used a random_seed() function that was weird in the way it gets the random number. So it was decided to not use this function at all,and the value was initialized to 1, because according to Benjamin Larsson random_seed() could just be replaced by any value. The current files contain lots of code which is either not needed by the decoder or totally disabled (#if 0 .. #endif) to enable compiling. This was during the isolation of the decoder from ffmpeg, the intention was to take as few files as possible to be able to compile cook.c and the related files outside ffmpeg. The decoder still uses floating point and relies on dynamic allocations in some parts of it. It's still not ready to be ported to rockbox. CONVERSION TO FIXED-POINT A patch from ffmpeg's mailing list was used to convert the decoder to use fixed-point arithmetic. The patch was done by Ian Braithwaite, and discussed here : http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/46024 The patch is a bit dated (2007) so the modifications to cook.c had to be done manually. The patch was also applied to cookdata.h and was used to create cookdata_fixpoint.h, cook_fixpoint.h and cook_fixp_mdct.h. The patch used a cook_random() function for noise filling. this was dropped and av_lfg_get() was used instead for consistency. Note : Only parts of the patch were committed to ffmpeg's repository. TESTING The test program should compile in any Unix-like environment using the command "make -f Makefile.test". Running "./cooktest file.rm" will decode the audio data to a WAV file called "output.wav" in the current directory.