[FFmpeg-devel] [PATCH] DCA floating point output
Måns Rullgård
mans
Mon Apr 26 04:07:38 CEST 2010
"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
>
> #define CONFIG_AUDIO_NONSHORT 1
>
> 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.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list