[FFmpeg-devel] [PATCH] DCA floating point output
Måns Rullgård
mans
Mon Apr 26 05:04:08 CEST 2010
FB2000 <flybird2k at gmail.com> writes:
> 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
The difference is closer to 10x.
> 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.
Trust me, it will. It will spend 5x more time in the conversion than
in the decoder itself. I've seen it.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list