Open Source ALAC Decoder |
Open Source ALAC Decoder |
Mar 5 2005, 20:28
Post
#1
|
|
|
A/V Moderator Group: Members Posts: 278 Joined: 22-February 03 Member No.: 5132 |
Hi, David Hammerton from the ffmpeg mailing list wrote a reverse engineered ALAC decoder.
QUOTE Located here is a basic decoder for Apple Lossless Audio Codec files (ALAC). ALAC is a proprietary lossless audio compression scheme. Apple never released any documents on the format. What I provide here is a C implementation of a decoder, written from reverse engineering the file format. It turns out that most of the algorithms in the codec are fairly well known. ALAC uses an adaptive FIR prediction algorithm and stores the error values using a modified rice or golumb algorithm. Further details are in alac.c. Although an encoder is not provided, by using the decoder as a sort of specification it should be fairly trivial to write an encoder. By exploiting other lossless audio encoders, such as FLAC, the task will be much easier. Although one wouldn't be able to copy the compression algorithms verbatim, as adaptive compression is used in ALAC and not in FLAC. There are, however, a bunch of academic papers on the issue. The program located here will not be able to handle all ALAC files, it can only handle mono or stereo files. ALAC allows up to 8 channels. It should be trivial to finish the implementation once I find files that I can test it with. Likewise the decoder only supports 16bit sample sizes. Again, it should be trivial to fix. The decoder is fairly self explanatory, it can read an ALAC stream from either a file or from stdin, and write it as raw PCM data or as a WAV file to either stdout or a file. In theory one should be able to stream data to the decoder. I uploaded a binary here. Not sure about the legality of this, I will remove if necessary. |
|
|
|
![]() |
Mar 5 2005, 21:26
Post
#2
|
|
|
FLAC Developer Group: Developer Posts: 1526 Joined: 27-February 02 Member No.: 1408 |
very cool. I was about half-way done reverse engineering it last year, but I stopped when it seemed unlikely that ALAC could be converted to FLAC without reencoding. but they are very close.
apple would be crazy to go after this though, as this will help adoption of the format. Josh |
|
|
|
Bonzi Open Source ALAC Decoder Mar 5 2005, 20:28
guruboolez Very nice new
I suppose that foobar2000, winamp o... Mar 5 2005, 22:34
Tec9SD QUOTE (guruboolez @ Mar 5 2005, 04:34 PM)Very... Mar 7 2005, 02:34
yong QUOTE (Tec9SD @ Mar 7 2005, 09:34 AM)QUOTE (g... Mar 7 2005, 11:42
Bonzi I should say that the binary that I uploaded is ju... Mar 5 2005, 22:50
guruboolez QUOTE (Bonzi @ Mar 5 2005, 10:50 PM)I should ... Mar 6 2005, 00:09
rjamorim Amazing shit.
/me goes to change the lossless com... Mar 6 2005, 00:27
guest0101 QUOTE (rjamorim @ Mar 5 2005, 04:27 PM)... Mar 6 2005, 00:35
krmathis QUOTE (guest0101 @ Mar 6 2005, 12:35 AM)Anybo... Mar 6 2005, 17:28
rjamorim QUOTE (solaris @ Mar 6 2005, 01:28 PM)I'v... Mar 6 2005, 17:34
krmathis QUOTE (rjamorim @ Mar 6 2005, 05:34 PM)Sweet.... Mar 6 2005, 18:08
Mike Giacomelli I think under MacOS you could just unzip it, brows... Mar 6 2005, 02:37
guest0101 QUOTE (Mike Giacomelli @ Mar 5 2005, 06:37 PM... Mar 6 2005, 03:42
Dibrom QUOTE (guest0101 @ Mar 5 2005, 06:42 PM)QUOTE... Mar 6 2005, 04:00
guest0101 QUOTE (Dibrom @ Mar 5 2005, 08:00 PM)You need... Mar 6 2005, 05:28
svkelley It would be great to also extract the tags and the... Mar 6 2005, 03:26
JEN QUOTE (rjamorim @ Mar 6 2005, 12:27 AM)... Mar 6 2005, 09:55
rjamorim QUOTE (JEN @ Mar 6 2005, 05:55 AM)When will t... Mar 6 2005, 16:09
ffooky On my 1.25 gHz/ 768MB eMac it seems significantly... Mar 6 2005, 12:56
Latexxx This hasn't been optimised in any way. So it i... Mar 6 2005, 13:01
JEN QUOTE (rjamorim @ Mar 6 2005, 04:09 PM)QUOTE ... Mar 6 2005, 16:35
jcoalson just got finished looking over the decoder source.... Mar 6 2005, 21:24
Tang QUOTE (jcoalson @ Mar 6 2005, 12:24 PM)just g... Mar 7 2005, 11:50
Busemann QUOTE (jcoalson @ Mar 6 2005, 12:24 PM)what... Mar 7 2005, 12:43
jcoalson QUOTE (Busemann @ Mar 7 2005, 06:43 AM)Well, ... Mar 7 2005, 16:45
guest0101 Uh, oh, now the news outlets just released a story... Mar 7 2005, 18:09
AtaqueEG Do you think we will see software implementation (... Mar 6 2005, 21:53
guest0101 Well it appears that news sources are quoting/meti... Mar 7 2005, 15:39
xmixahlx this wasn't not mentioned here, and i thought ... Mar 7 2005, 21:17
yong Did someone know?
Mplayer(Daily CVS version) now i... Apr 2 2005, 10:38
keytotime Could somebody please compile the latest version f... Oct 26 2006, 01:13
kurtnoise For windows I guess ?
http://kurtnoise.free.fr/in... Oct 26 2006, 09:19
john33 Updated Win32 compiles at Rarewares Lossless page ... Oct 26 2006, 09:48
keytotime Wow That was Fast. Thank You. Oct 26 2006, 12:19![]() ![]() |
|
Lo-Fi Version | Time is now: 25th May 2013 - 10:13 |