[FFmpeg-devel] [PATCH] DCA floating point output

Måns Rullgård mans
Mon Apr 26 05:03:04 CEST 2010

Alex Converse <alex.converse at gmail.com> writes:

> 2010/4/25 M?ns Rullg?rd <mans at mansr.com>:
>> "FB2000" <flybird2k at gmail.com> writes:
>>> I understand a patch like this one had been discussed at January
>>> 2008 but it used a compiling switch
>>> which by itself might bring some confusion.
>>> Since DCA source PCM resolution is either 16, 20 or 24 bits, and the
>>> DCA decoder uses float internally, it's clear that float is a much
>>> better output format than currently used int16_t. My point is that
>>> we should change to float directly without using any switch. By
>>> changing
>>> avctx->sample_fmt = SAMPLE_FMT_S16;
>>> to
>>> avctx->sample_fmt = SAMPLE_FMT_FLT;
>>> at dca_decode_init(), callers like ffmpeg or ffplay understand the
>>> output format correctly thus nothing need to be modified out of
>>> dca.c.
>>> I've also removed codes related to float_to_int16_interleave since
>>> it's no longer needed for the output.
>>> I hope this patch could find its way into libavcodec, so that we
>>> could finally get a better quality DCA decoder.
>> Until sensible audio format conversion code is in place, this is
>> utterly unacceptable. ?It would make the decoder at least 5x slower on
>> some systems.
> Only in the *particular case* where int16 output is required.

And that's 99.9% of all users.

> The rest of the universe shouldn't be held under the tyranny of people
> with shitty hardware who want int16 output.

So fix the damned format converter already and stop complaining.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list