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 647510 - audiowsinclimit uses the wrong limits for the range of the kernel elements
audiowsinclimit uses the wrong limits for the range of the kernel elements
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal normal
: 0.10.29
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-12 00:15 UTC by Jordi Burguet-Castell
Modified: 2011-04-13 16:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
change len -> len-1 where appropiate in the high- and low-pass filters (1.82 KB, patch)
2011-04-12 00:15 UTC, Jordi Burguet-Castell
committed Details | Review

Description Jordi Burguet-Castell 2011-04-12 00:15:32 UTC
Created attachment 185767 [details] [review]
change len -> len-1  where appropiate in the high- and low-pass filters

Hi,

In audiowsinclimit.c the kernel elements and windows are written as if the counter went from 0 to len, included. But they should go from 0 to len-1.

The confusion comes from using the reference
http://www.dspguide.com/ch16/2.htm
where the counter goes up to M = len-1.

The attached patch corrects this issue, and also handles better the case of a filter with an even number of elements.

Jordi
Comment 1 Sebastian Dröge (slomo) 2011-04-13 16:01:36 UTC
commit de7a9765315f7d977d1b29b13caf7a0a4d39f4f3
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Wed Apr 13 18:01:01 2011 +0200

    audiowsincband: Fix range of kernel elements (lim -> lim-1)

commit 4fd5fea2b25b9a1588b54aa8c8c38236a672c5ed
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Wed Apr 13 18:00:44 2011 +0200

    audiowsinclimit: Add some more braces to make the code more readable

commit 766e437af188c82d966cd5f459577098fbdc67ec
Author: Jordi Burguet-Castell <jordi.burguet-castell@ligo.org>
Date:   Mon Apr 11 18:40:30 2011 -0500

    audiowsinclimit: Fix range of kernel elements (lim -> lim-1) in high/low-pass filters