<div dir="ltr">Hi,<div><br></div><div style>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.</div><div style><br></div><div style>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).</div>
<div style><br></div><div style>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.</div>
<div style><br></div><div style>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.</div>
<div style><br></div><div style>What's the best way to do this?</div><div style><br></div><div style>Thanks,</div><div style><br></div><div style><br></div><div style>Reuben Scratton</div>























</div>