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

FB2000 flybird2k
Mon Apr 26 04:22:12 CEST 2010


2010/4/26 M?ns Rullg?rd <mans at mansr.com>

>
> 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.
>
>
The decoder itself is using float for all the inside calculations. It just
converted samples to int16_t at output. Even if

s->dsp.float_to_int16_interleave(samples, s->samples_chanptr, 256,
channels);
samples += 256 * channels;

is indeed 5x quicker than

for (j = 0; j < 256; j++) {
    for (k = 0; k < channels; k++)
        samples[k] = s->samples[j + k * 256] / 32768.0f;
    samples += channels;
}

, I don't expect that will change the performance too much in totally.



More information about the ffmpeg-devel mailing list