After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 593482 - Spectrum: Multi-Channel support and Stereo to Mono compat report(cross-correlation)
Spectrum: Multi-Channel support and Stereo to Mono compat report(cross-correl...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal enhancement
: 0.10.29
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-29 13:32 UTC by Pedro Algarvio, aka, s0undt3ch
Modified: 2011-03-09 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pedro Algarvio, aka, s0undt3ch 2009-08-29 13:32:23 UTC
The idea behind this feature request is well explained under te topic "Cross-Correlation" on this paper:
  http://www.rs-met.com/documents/tutorials/StereoProcessing.pdf

In order to achieve what's explained there, one can use the spectrum plugin, but as it is, is merges all channels into a single(mono) one.

The solution right now, is to deinterleave to get both monos out of a stereo signal, pass each to the spectrum plugin and do the explained calculations using both mono sources to achieve the goal proposed on this enhancement request.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2009-08-29 13:44:53 UTC
What we need is another property like gboolean "multi-band" which default to "false". If set to true we would analyse each channel.

Not sure how we send the result.

a) Add a index to the field name: Magnitude0, Magnitude1, ...
b) Leave the demuxing to the app: Magnitude will contain values for all channels one after the other (if N bands then first N values for 1st channel, then N-values for 2nd channel)
c) Use hierarchic structures: Magnitute would contain Channel0, Channel1,.  which inturn contain the values.

I prefer b).
Comment 2 Sebastian Dröge (slomo) 2009-08-30 09:16:24 UTC
I would prefer c)... magnitude would be a GstValueArray, n-th element is the GstValueArray with the magnitude for the n-th channel.

b) would put them all into a single array which sounds a bit unclean to me ;)
Comment 3 Pedro Algarvio, aka, s0undt3ch 2010-03-20 17:19:45 UTC
What's the state of this request? Could we at least have multi-channel support? ie, analisys of each of the channels passed?
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2010-03-21 18:48:40 UTC
Noone had time to do it so far. The plan is to add a "channel-mode=merged,separate" option with "merged" as a default for backwards compatibility. In "separate" mode it would use the array like in option c.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-09 09:11:40 UTC
Working on it now.
Comment 6 Pedro Algarvio, aka, s0undt3ch 2011-03-09 11:47:41 UTC
(In reply to comment #5)
> Working on it now.

Glad to hear it! Keep up the good work!
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-09 16:11:21 UTC
commit c622477a92aaa0910d91530b2f17083c96d2b17d
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Wed Mar 9 16:57:28 2011 +0200

    spectrum:  multi-channel support

    Add a boolean multi-channel property with a default of FALSE. When set to
TRUE
    the element won't mix all input channels to mono, but instead run a FFT on
each
    channel. In that case the result message would contain a 2 dimensional
array
    of channel x data for magnitude and phase.

    API: GstSpectrum:multi-channel
    https://bugzilla.gnome.org/show_bug.cgi?id=593482