[FFmpeg-user] AC3 decoder now decoding to AV_SAMPLE_FMT_S32P? WTF?

Thomas Worth dev at rarevision.com
Fri Jun 28 16:40:00 CEST 2013


On Fri, Jun 28, 2013 at 7:31 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Thomas Worth <dev <at> rarevision.com> writes:
>
>> Correction, that should have said the decoded AVFrame is in
>> AV_SAMPLE_FMT_FLTP, not AV_SAMPLE_FMT_S32P.
>
> Correct: In your old version, the (definitely non-free)
> conversion from float to s32 was done inside the decoder,
> now you can either directly use the floats (for higher
> performance) or use the (optimised) converter in
> libswresample (that allows you to do other conversions
> at the same time) if you need ints.

Thanks, Carl. My code takes the decoded AVFrame from
avcodec_decode_audio4 (now in float format) and passes it directly to
avcodec_encode_audio2 to transcode to PCM S16. Since my output audio
needs to be signed PCM 16 bit, do I have no choice but to resample the
audio manually using swresample?


More information about the ffmpeg-user mailing list