[gst-devel] int2float and float2int
wingo at pobox.com
Thu Jun 20 07:20:04 CEST 2002
On Thu, 20 Jun 2002, Thomas Vander Stichele wrote:
> I'm sending this mail because wingo asked me to ;)
> int2float also does automatic deinterleaving, and thus has request pads,
> and thus creating pipelines with it doesn't work as I would expect it to.
> My personal opinion is that an element should be as basic as possible and
> perform only one function. int2float should just do what it says, namely
> translate a channel of int data to a channel of float data. So I set out
> to start writing interleaving and deinterleaving plug-ins.
1) The format for doing any DSP is mono float
2) A lot of data comes into a pipeline as int, interleaved
3) It is efficient to combine intfloat and deinterleaving into one
4) For a stereo stream, with the normal schedulers, separating these
plugins would waste two cothreads in an already-complex pipeline
5) Interleaved float is *pure evil* and should be avoided!
I think steveb enlightened me on this more than a year ago. Float data
is perfect -- the only caps that one woud set on a mono float stream is
rate, and the dsp code makes *sense* with float. That's why LADSPA
plugins do float. Float data is the realm of real audio processing work.
There is no need to support interleaved float, an abomination that has
no support in any other plugin.
I mean think about it, you have to deinterleave anyway to play with
LADSPA plugins, why not do the int/float right then?
In any case, I am strongly against the removal of this functionality
from the current int2float, as I use it a lot. And what's so hard to use
More information about the gstreamer-devel