From f40bfc9267b13b54e6379dfe7539447662879d24 Mon Sep 17 00:00:00 2001 From: Sean Bartell Date: Sat, 25 Jun 2011 21:32:25 -0400 Subject: Add codecs to librbcodec. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97 Reviewed-on: http://gerrit.rockbox.org/137 Reviewed-by: Nils Wallménius Tested-by: Nils Wallménius --- lib/rbcodec/codecs/libalac/README.rockbox | 80 +++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 lib/rbcodec/codecs/libalac/README.rockbox (limited to 'lib/rbcodec/codecs/libalac/README.rockbox') 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 @@ +Library: Reverse-engineered ALAC decoder v0.1.0 +Imported: 2005-08-14 by Dave Chapman + + +This directory contains a local version of an ALAC (Apple Lossless Audio +Codec) for use by Rockbox for software decoding of ALAC files. It is +based on the reverse-engineered decoder by David Hamilton. + +LICENSING INFORMATION + +/* + * ALAC (Apple Lossless Audio Codec) decoder + * Copyright (c) 2005 David Hammerton + * All rights reserved. + * + * This is the actual decoder. + * + * http://crazney.net/programs/itunes/alac.html + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +IMPORT DETAILS + +The base version first imported into Rockbox was the first release +(v0.1.0) of the ALAC decoder by David Hammerton. + +Only the files alac.[ch], demux.[ch] and stream.h were used. + +stream.c (the original FILE* based I/O implementation) was replaced with +functions in the ALAC codec - to interface with the Rockbox audio playback +system. + +References to were replaced with and debugging +calls to fprintf were removed. + +The ALAC decoder itself was modified to return samples in host-endian +order, instead of little-endian. + +The run-time detection of CPU endianness was replaced with +compile-time tests of the ROCKBOX_LITTLE_ENDIAN define. + +All malloc calls were removed from alac.c, but some are still present +in the metadata parser in demux.c - to store unbounded data such as +the size in bytes of each compressed block in the file. + +The only changes to demux.c were to remove debugging calls to fprintf. + +The most-used buffers (the temporary 32-bit output buffer) were moved +into IRAM (on the iRiver). This was enough to make the decoder work +in real-time. + +A point of interest - the -O3 gcc option (the setting used in the +original Makefile provided with the alac decoder) gives a significant +speedup compared to -O2. With -O2, the Coldfire runs at a constant +120MHz, but with -O3, it can power-down to 40MHz for a small amount of +time. + +The file alac.c contained some hints from the original author for +places where major optimisations can be made - specifically the +unrolling and optimisation of certain cases of general loops. -- cgit v1.2.3