diff options
author | Mohamed Tarek <mt@rockbox.org> | 2009-08-13 20:26:31 +0000 |
---|---|---|
committer | Mohamed Tarek <mt@rockbox.org> | 2009-08-13 20:26:31 +0000 |
commit | c956059ec5a2d85311914fb31a36d5127797fbc2 (patch) | |
tree | 5201a736b748abf68a8293b8968cb380dfff9256 /apps/codecs/libcook/README.rockbox | |
parent | 80362071907bf47fd0933e66b7c0585ee85964e7 (diff) | |
download | rockbox-c956059ec5a2d85311914fb31a36d5127797fbc2.tar.gz rockbox-c956059ec5a2d85311914fb31a36d5127797fbc2.zip |
Modify libcook to use rockbox's mdct library in its standalone test program.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22297 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libcook/README.rockbox')
-rw-r--r-- | apps/codecs/libcook/README.rockbox | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/apps/codecs/libcook/README.rockbox b/apps/codecs/libcook/README.rockbox index b51508f8a9..ae72f2a2f2 100644 --- a/apps/codecs/libcook/README.rockbox +++ b/apps/codecs/libcook/README.rockbox | |||
@@ -13,24 +13,6 @@ IMPORT DETAILS | |||
13 | 13 | ||
14 | The decoder is based on ffmpeg-svn r18079. | 14 | The decoder is based on ffmpeg-svn r18079. |
15 | 15 | ||
16 | The file libavcodec/cook.c was modified to remove all ffmpeg-specific | ||
17 | code and to use the current rm parser. | ||
18 | |||
19 | In initializing random_state in COOKContext, ffmpeg used a random_seed() | ||
20 | function that was weird in the way it gets the random number. So it was | ||
21 | decided to not use this function at all,and the value was initialized to 1, | ||
22 | because according to Benjamin Larsson random_seed() could just be | ||
23 | replaced by any value. | ||
24 | |||
25 | The current files contain lots of code which is either not needed by | ||
26 | the decoder or totally disabled (#if 0 .. #endif) to enable | ||
27 | compiling. This was during the isolation of the decoder from ffmpeg, | ||
28 | the intention was to take as few files as possible to be able to | ||
29 | compile cook.c and the related files outside ffmpeg. | ||
30 | |||
31 | The decoder still uses floating point and relies on dynamic allocations | ||
32 | in some parts of it. It's still not ready to be ported to rockbox. | ||
33 | |||
34 | CONVERSION TO FIXED-POINT | 16 | CONVERSION TO FIXED-POINT |
35 | 17 | ||
36 | A patch from ffmpeg's mailing list was used to convert the decoder to | 18 | A patch from ffmpeg's mailing list was used to convert the decoder to |
@@ -44,8 +26,9 @@ be done manually. The patch was also applied to cookdata.h and was | |||
44 | used to create cookdata_fixpoint.h, cook_fixpoint.h and | 26 | used to create cookdata_fixpoint.h, cook_fixpoint.h and |
45 | cook_fixp_mdct.h. | 27 | cook_fixp_mdct.h. |
46 | 28 | ||
47 | The patch used a cook_random() function for noise filling. this was | 29 | cook_fixp_mdct.h and parts from cookdata_fixpoint.h were dropped and |
48 | dropped and av_lfg_get() was used instead for consistency. | 30 | rockbox's mdct library is now used in both the test program and the |
31 | real codec. | ||
49 | 32 | ||
50 | Note : Only parts of the patch were committed to ffmpeg's repository. | 33 | Note : Only parts of the patch were committed to ffmpeg's repository. |
51 | 34 | ||
@@ -54,5 +37,11 @@ TESTING | |||
54 | The test program should compile in any Unix-like environment using the | 37 | The test program should compile in any Unix-like environment using the |
55 | command "make -f Makefile.test". | 38 | command "make -f Makefile.test". |
56 | 39 | ||
40 | For ARM targets add -DCPU_ARM to CFLAGS in Makefile.test to make use of | ||
41 | the asm ARM optimisations in rockbox's mdct library. | ||
42 | |||
43 | For Big-endian targets, change -D"ROCKBOX_LITTLE_ENDIAN=1" | ||
44 | to -D"ROCKBOX_BIG_ENDIAN=1" in Makefile.test. | ||
45 | |||
57 | Running "./cooktest file.rm" will decode the audio data to a WAV file | 46 | Running "./cooktest file.rm" will decode the audio data to a WAV file |
58 | called "output.wav" in the current directory. | 47 | called "output.wav" in the current directory. |