[Flac-dev] FLAC support for Android?

Brian Willoughby brianw at sounds.wa.com
Wed Feb 25 05:23:32 PST 2009


Thanks for the info, Dave.  Speed is a very important feature, but  
there might be some risk choosing the FFmpeg decoder.  They've had  
trouble with their encoder in the past, which tells me it's possible  
your users might one day run into a valid FLAC that the FFmpeg  
decoder won't handle correctly.

A better suggestion might be to start with libFLAC, optimize as  
needed, and then submit the optimizations back to the FLAC project  
where they will be more widely useful.

But that's just my opinion.

Brian Willoughby
Sound Consulting


On Feb 25, 2009, at 03:10, Dave Chapman wrote:

I'm a developer with the Rockbox project - http://www.rockbox.org -
which is a written-from-scratch operating system and application suite
designed for portable audio players.

We of course support FLAC, and have a small, well-optimised (for
embedded targets, including ARM) decoder which I think would be perfect
for the devices Android runs on.  It is based on the decoder from
ffmpeg, and hence is licensed under the LGPL, with Rockbox specific code
licensed under the GPL.

I don't know if the GPL will be a problem with this part of Android.  If
the LGPL is compatible, then I'm sure the relevant Rockbox developers
(including myself) would be happy to donate their code under that  
license.

We initially implemented FLAC playback in Rockbox using libFLAC, but
achieved significant speed gains (and reduced code size) when switching
to the smaller ffmpeg decoder.  I'm afraid I don't have exact figures to
hand, but can try and dig them out if people are interested.

Our current decoder can decode a typical FLAC file using about 13MHz of
an arm7tdmi core.  On portable (battery-powered) devices, performance is
very important.

The Rockbox source code can be browsed here:

http://svn.rockbox.org/viewvc.cgi/trunk/

See apps/codecs/ for our codecs.

If I was going to attempt to implement this, I would definitely go for
the ffmpeg decoder, rather than libFLAC, assuming the license is OK.

Regards,

Dave.



More information about the Flac-dev mailing list