summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libalac/README.rockbox
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/libalac/README.rockbox')
-rw-r--r--lib/rbcodec/codecs/libalac/README.rockbox80
1 files changed, 80 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/libalac/README.rockbox b/lib/rbcodec/codecs/libalac/README.rockbox
new file mode 100644
index 0000000000..891e581cfc
--- /dev/null
+++ b/lib/rbcodec/codecs/libalac/README.rockbox
@@ -0,0 +1,80 @@
1Library: Reverse-engineered ALAC decoder v0.1.0
2Imported: 2005-08-14 by Dave Chapman
3
4
5This directory contains a local version of an ALAC (Apple Lossless Audio
6Codec) for use by Rockbox for software decoding of ALAC files. It is
7based on the reverse-engineered decoder by David Hamilton.
8
9LICENSING INFORMATION
10
11/*
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 */
41
42IMPORT DETAILS
43
44The base version first imported into Rockbox was the first release
45(v0.1.0) of the ALAC decoder by David Hammerton.
46
47Only the files alac.[ch], demux.[ch] and stream.h were used.
48
49stream.c (the original FILE* based I/O implementation) was replaced with
50functions in the ALAC codec - to interface with the Rockbox audio playback
51system.
52
53References to <stdint.h> were replaced with <inttypes.h> and debugging
54calls to fprintf were removed.
55
56The ALAC decoder itself was modified to return samples in host-endian
57order, instead of little-endian.
58
59The run-time detection of CPU endianness was replaced with
60compile-time tests of the ROCKBOX_LITTLE_ENDIAN define.
61
62All malloc calls were removed from alac.c, but some are still present
63in the metadata parser in demux.c - to store unbounded data such as
64the size in bytes of each compressed block in the file.
65
66The only changes to demux.c were to remove debugging calls to fprintf.
67
68The most-used buffers (the temporary 32-bit output buffer) were moved
69into IRAM (on the iRiver). This was enough to make the decoder work
70in real-time.
71
72A point of interest - the -O3 gcc option (the setting used in the
73original Makefile provided with the alac decoder) gives a significant
74speedup compared to -O2. With -O2, the Coldfire runs at a constant
75120MHz, but with -O3, it can power-down to 40MHz for a small amount of
76time.
77
78The file alac.c contained some hints from the original author for
79places where major optimisations can be made - specifically the
80unrolling and optimisation of certain cases of general loops.