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 585828 - audioamplify should support more formats
audioamplify should support more formats
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal enhancement
: 0.10.16
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-06-15 09:02 UTC by Kipp
Modified: 2009-06-22 16:11 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Adds support for double precision floats (4.39 KB, patch)
2009-06-15 09:07 UTC, Kipp
needs-work Details | Review
adds support for more formats and clipping methods (22.49 KB, patch)
2009-06-19 09:53 UTC, Kipp
committed Details | Review
don't declare a loop index static (1.20 KB, patch)
2009-06-20 21:33 UTC, Kipp
committed Details | Review

Description Kipp 2009-06-15 09:02:35 UTC
The audioamplify element should support more formats.
Comment 1 Kipp 2009-06-15 09:07:18 UTC
Created attachment 136613 [details] [review]
Adds support for double precision floats

This patch adds support for double precision floats, but this is maybe going down the wrong path.  The adder has what might be considered a cleaner approach to constructing lots of functions for supporting different formats.  It uses a preprocessor macro to generate variations of the required functions.
Comment 2 Sebastian Dröge (slomo) 2009-06-15 09:13:42 UTC
Yes, at least the float/double processing functions could be handled by a simple preprocessor macro. Do you want to prepare a patch?
Comment 3 Kipp 2009-06-16 09:57:20 UTC
Sure.  I'll re-work it to use macros.
Comment 4 Kipp 2009-06-19 09:53:30 UTC
Created attachment 136985 [details] [review]
adds support for more formats and clipping methods

This patch adds support for double precision floats, 8- and 32-bit signed integers and also adds a "no clipping" clipping mode (e.g., for use with float samples).  A macro system is used, inspired by adder's.
Comment 5 Sebastian Dröge (slomo) 2009-06-19 20:39:34 UTC
commit afccf53acee778b057f4f4bae19a41397fe8ff36
Author: Kipp Cannon <kcannon@ligo.caltech.edu>
Date:   Fri Jun 19 22:20:45 2009 +0200

    audioamplify: Add noclip method and support for more formats
    
    Fixes bug #585828 and #585831.
Comment 6 Kipp 2009-06-20 21:33:38 UTC
Created attachment 137092 [details] [review]
don't declare a loop index static

The previous patch to add support for additional sample formats possibly introduced a reentrancy bug:  a variable used for a loop index was declared static.  This patch fixes that, and also adds a "/* *INDENT-ON* */" annotation following the macro block.  (I don't know what the annotation is for, but the adder, where I copied this from, has it).
Comment 7 Sebastian Dröge (slomo) 2009-06-21 07:51:35 UTC
ommit f80b62c3db332992e110589e8b5dfe732ff5ed46
Author: Kipp Cannon <kcannon@ligo.caltech.edu>
Date:   Sun Jun 21 09:50:54 2009 +0200

    audioamplify: Don't declare a loop index static
    
    The previous patch to add support for additional sample formats possibly
    introduced a reentrancy bug:  a variable used for a loop index was declared
    static.  This patch fixes that, and also adds a "/* *INDENT-ON* */" annotation
    following the macro block.  (I don't know what the annotation is for, but the
    adder, where I copied this from, has it).
Comment 8 Jan Schmidt 2009-06-22 16:11:47 UTC
The INDENT-ON directive does nothing without a preceding INDENT-OFF directive somewhere. Without that, it's just unnecessary noise.

It's an instruction to GNU indent not to mess with the formatting of the section between the two directives.