rockbox/apps/codecs/libcook
Mohamed Tarek 0cb3ad58b3 -Took cook_random() from an old cook.c revision [6 mar 2007], which is a
simple RNG, to eliminate the need for lfg.c/h.
-Remove lfg.c/h and md5.c/h as they are no longer needed and use the 
more common form of my name in docs/COMMITTERS.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20915 a1c6a512-1295-4272-9138-f99709370657
2009-05-11 23:35:50 +00:00
..
libavutil -Took cook_random() from an old cook.c revision [6 mar 2007], which is a 2009-05-11 23:35:50 +00:00
bitstream.c Patch by Mohamed Tarek from FS#10182 - remove avcodec.h as it is no longer needed. Also remove -lm from Makefile.test for the same reason. 2009-05-11 07:59:10 +00:00
bitstream.h The first part of Mohamed Tarek's Google Summer of Code work to implement RealAudio support in Rockbox. This is a self-contained Cook decoder using the original ffmpeg (still floating point) decoder and a new RM parser started by me in 2008 and continued by MT over the past few months. This is the equivalent of libcook.patch1 from FS#10182, but with further cleaning by both MT and me to minimise the differences to the original ffmpeg files. See README.rockbox for more details. 2009-05-09 01:21:49 +00:00
bytestream.h
cook.c -Took cook_random() from an old cook.c revision [6 mar 2007], which is a 2009-05-11 23:35:50 +00:00
cook.h -Took cook_random() from an old cook.c revision [6 mar 2007], which is a 2009-05-11 23:35:50 +00:00
cook_fixp_mdct.h Patch by Mohamed Tarek from FS#10182 - convert codec to fixed-point using patches submitted to the ffmpeg mailing list in 2007 by Ian Braithwaite. 2009-05-10 22:26:02 +00:00
cook_fixpoint.h -Took cook_random() from an old cook.c revision [6 mar 2007], which is a 2009-05-11 23:35:50 +00:00
cookdata.h Patch by Mohamed Tarek from FS#10182 - convert codec to fixed-point using patches submitted to the ffmpeg mailing list in 2007 by Ian Braithwaite. 2009-05-10 22:26:02 +00:00
cookdata_fixpoint.h Patch by Mohamed Tarek from FS#10182 - convert codec to fixed-point using patches submitted to the ffmpeg mailing list in 2007 by Ian Braithwaite. 2009-05-10 22:26:02 +00:00
ffmpeg_config.h The first part of Mohamed Tarek's Google Summer of Code work to implement RealAudio support in Rockbox. This is a self-contained Cook decoder using the original ffmpeg (still floating point) decoder and a new RM parser started by me in 2008 and continued by MT over the past few months. This is the equivalent of libcook.patch1 from FS#10182, but with further cleaning by both MT and me to minimise the differences to the original ffmpeg files. See README.rockbox for more details. 2009-05-09 01:21:49 +00:00
main.c Fix the $Id$ line broken by r20907. 2009-05-11 07:47:02 +00:00
Makefile.test -Took cook_random() from an old cook.c revision [6 mar 2007], which is a 2009-05-11 23:35:50 +00:00
README.rockbox Patch by Mohamed Tarek from FS#10182 - convert codec to fixed-point using patches submitted to the ffmpeg mailing list in 2007 by Ian Braithwaite. 2009-05-10 22:26:02 +00:00
rm2wav.c The first part of Mohamed Tarek's Google Summer of Code work to implement RealAudio support in Rockbox. This is a self-contained Cook decoder using the original ffmpeg (still floating point) decoder and a new RM parser started by me in 2008 and continued by MT over the past few months. This is the equivalent of libcook.patch1 from FS#10182, but with further cleaning by both MT and me to minimise the differences to the original ffmpeg files. See README.rockbox for more details. 2009-05-09 01:21:49 +00:00
rm2wav.h Patch by Mohamed Tarek - add #define to protect against multiple inclusion 2009-05-09 23:14:55 +00:00

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.