[gst-devel] GstController interpolation modes

Sebastian Dröge slomo at circular-chaos.org
Mon May 14 21:28:32 CEST 2007


Hi,
currently the GstController provides a few interpolation modes which are
not implemented. These are quadratic and cubic interpolation.

What exactly are people expecting from those? I would expect some kinds
of splines from them, the former using quadratic polynomials, the latter
cubic polynomials.

For the cubic interpolation there exist many good possibilities to
provide good and smooth-looking interpolation.
First of all we want all data points to be hit and then the combined
spline graph to be twice differentiable everywhere. Additionally we need
two other conditions and this could either be a slope of zero at the
first and last data point or the second derivate being zero there.
Would anybody want something different for this?

For the quadratic interpolation things are a bit harder unfortunately.
As everybody probably remembers from school a 2nd degree polynomial has
3 unknown variables, thus we need 3 conditions for each of them. One
polynomial will connect two data points, i.e. there are n quadratic
polynomials for a spline connecting n+1 data points, yielding to 3n
conditions. 2n are fixed by the n+1 data points as we want the combined
graph to connect them all. Another n-1 conditions can be defined by
having the combined graph differentiable at all data points. Now a
single condition is missing while for cubic splines there were 2 missing
which would naturally map to some conditions on both borders. One
possibility would be to set the slope to zero for the first data point
or the last one but this would (in most cases) create an edge there
which we don't want.
Does anybody have an idea for the quadratic interpolation that would
make sense and give good results? IMHO the quadratic interpolation
should be dropped or to stay ABI/API compatible mapped to cubic
interpolation as there seems to be no good quadratic solution.

Additionally I would propose a trigonometric interpolation mode which
would interpolate the data points with a sum of sines. This would,
although being very computing intensive, offer the advantage that it
would give a periodic function. It would be sufficient to set a few data
points and have an always repeating sequence of parameter settings.

Bye
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070514/7ff655d5/attachment.pgp>


More information about the gstreamer-devel mailing list