[Libav-user] Efficient AAC decoding on ARM with FFmpeg 1.1.x

Reuben Scratton reuben.scratton at gmail.com
Tue Apr 9 21:43:08 CEST 2013


Hi,

I maintain a video player app on Android and recently had occasion to
upgrade it's FFmpeg from 0.8.6 to 1.1.3.

It seems that the 1.1 AAC decoder only outputs samples as
AV_SAMPLE_FMT_FLTP. I therefore need to convert these to AV_SAMPLE_FMT_S16
before they can be played (via a platform API where integer samples are
mandatory).

I have implemented a naive C converter which works but it's not terribly
efficient. I know there's optimized assembly routines in dsputils etc but
damned if I can figure out how to use them.

I've tried using FmtConvertContext but this expects input samples to be in
the range -32K to +32K, whereas the codec outputs them in the range -1 to
+1. Obviously I can scale them before using
FmtConvertContext.float_to_int16() but then that's two passes over the same
data, which isn't very cache efficient.

What's the best way to do this?

Thanks,


Reuben Scratton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130409/13afb048/attachment.html>


More information about the Libav-user mailing list