[FFmpeg-devel] [PATCH] unscaled float 2 int conversion

Benjamin Larsson banan
Sun May 18 00:12:04 CEST 2008


[...]
>> so how should we go forward from this when we work on 
>> implementing a new audio api. The codecs should output samples in their 
>> native format, that is what I think most of us agree on. But what is the 
>> native format for a codec outputting samples in float when running in 
>> simd mode and the same when running in non simd mode ?
> 
> SAMPLE_FMT_FLT
> and
> SAMPLE_FMT_FLT_BIAS_385

The reason I keep bitching about this is that SAMPLE_FMT_FLT_BIAS_385
output is cumbersome to use if you want to add a filter after you have
decoded a codec frame.

What I propose then is that we only use the bias trick when we are
outputting 16bit samples directly after the decoder. If we have a filter
of some kind we should output float. With this solution we would need to
add another float to int converter. This is the only solution I can come
up with that keeps sample format conversions to a minimum while keeping
the performance. So what do you think of this suggestion ?

MvH
Benjamin Larsson




More information about the ffmpeg-devel mailing list