* Onda VX747: add browse screen, pitchscreen, context menu, quickscreen, rewind...
[kugel-rb.git] / apps / codecs / libalac / README.rockbox
blob891e581cfc242117df723f7ed11b6d89ce248777
1 Library: Reverse-engineered ALAC decoder v0.1.0
2 Imported: 2005-08-14 by Dave Chapman
5 This directory contains a local version of an ALAC (Apple Lossless Audio
6 Codec) for use by Rockbox for software decoding of ALAC files.  It is 
7 based on the reverse-engineered decoder by David Hamilton.
9 LICENSING INFORMATION
12  * ALAC (Apple Lossless Audio Codec) decoder
13  * Copyright (c) 2005 David Hammerton
14  * All rights reserved.
15  *
16  * This is the actual decoder.
17  *
18  * http://crazney.net/programs/itunes/alac.html
19  * 
20  * Permission is hereby granted, free of charge, to any person
21  * obtaining a copy of this software and associated documentation
22  * files (the "Software"), to deal in the Software without
23  * restriction, including without limitation the rights to use,
24  * copy, modify, merge, publish, distribute, sublicense, and/or
25  * sell copies of the Software, and to permit persons to whom the
26  * Software is furnished to do so, subject to the following conditions:
27  *
28  * The above copyright notice and this permission notice shall be
29  * included in all copies or substantial portions of the Software.
30  *
31  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38  * OTHER DEALINGS IN THE SOFTWARE.
39  *
40  */
42 IMPORT DETAILS
44 The base version first imported into Rockbox was the first release
45 (v0.1.0) of the ALAC decoder by David Hammerton.
47 Only the files alac.[ch], demux.[ch] and stream.h were used.
49 stream.c (the original FILE* based I/O implementation) was replaced with
50 functions in the ALAC codec - to interface with the Rockbox audio playback
51 system.
53 References to <stdint.h> were replaced with <inttypes.h> and debugging
54 calls to fprintf were removed.
56 The ALAC decoder itself was modified to return samples in host-endian
57 order, instead of little-endian.
59 The run-time detection of CPU endianness was replaced with
60 compile-time tests of the ROCKBOX_LITTLE_ENDIAN define.
62 All malloc calls were removed from alac.c, but some are still present
63 in the metadata parser in demux.c - to store unbounded data such as
64 the size in bytes of each compressed block in the file.
66 The only changes to demux.c were to remove debugging calls to fprintf.
68 The most-used buffers (the temporary 32-bit output buffer) were moved
69 into IRAM (on the iRiver).  This was enough to make the decoder work
70 in real-time.
72 A point of interest - the -O3 gcc option (the setting used in the
73 original Makefile provided with the alac decoder) gives a significant
74 speedup compared to -O2.  With -O2, the Coldfire runs at a constant
75 120MHz, but with -O3, it can power-down to 40MHz for a small amount of
76 time.
78 The file alac.c contained some hints from the original author for
79 places where major optimisations can be made - specifically the
80 unrolling and optimisation of certain cases of general loops.