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 703477 - audioresample: disable NEON code path for 16-bit integer
audioresample: disable NEON code path for 16-bit integer
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.1.1
Other Linux
: Normal normal
: 1.1.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-02 16:36 UTC by Carlos Rafael Giani
Modified: 2013-07-03 08:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch which disables NEON for 16-bit int (826 bytes, patch)
2013-07-02 16:36 UTC, Carlos Rafael Giani
committed Details | Review

Description Carlos Rafael Giani 2013-07-02 16:36:36 UTC
Created attachment 248248 [details] [review]
patch which disables NEON for 16-bit int

I found out that the resampler's ARM NEON code paths contain a bug with 16-bit integer samples. It only occurs if all of the following criteria are met:

1) 16-bit audio sample format
2) target platform supports the ARM NEON instruction set (BeagleBone, BeagleBoard, i.MX6 etc. but NOT the RaspberryPi from what I know)
3) GStreamer was built with Orc acceleration
4) at run-time, during element initialization, the audioresample element benchmarks backend speeds and decides to use the int16 backend
5) the full sinc table is used

In the vast majority cases, (4) will not occur; it will choose the float backend instead. However, if all criteria are met, then no sound will be produced.

The following command line reproduces this:

gst-launch-1.0 audiotestsrc wave=square volume=1 ! "audio/x-raw, format=S16LE, channels=2, rate=44100" ! audioresample sinc-filter-mode=1 ! "audio/x-raw, rate=48000" ! audioconvert ! autoaudiosink

if all of the criteria are met, nothing will be heard until S16LE is replaced with S32LE.

Note that 32-bit floating point NEON support works fine.

The attached patch removes NEON support for the 16-bit integer backend. I do not understand why it doesn't work, since it has worked before. However, looking for the cause is probably not worth it, since the performance gain for 16-bit samples is small (NEON seems to pay off more for the 32-bit float samples.)

If anybody cross-compiled GStreamer 1.1.1 for a platform with ARM NEON support , please run the gst-launch line above.
Comment 1 Sebastian Dröge (slomo) 2013-07-03 06:15:12 UTC
commit 1b48d431f457c1f194f3b650e6f3b20a7718cf23
Author: Carlos Rafael Giani <dv@pseudoterminal.org>
Date:   Tue Jul 2 18:20:39 2013 +0200

    audioresample: disable 16-bit integer NEON support
    
    it seems to be broken (produces no audio), plus the performance gain
    is small
    
    Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Comment 2 Tim-Philipp Müller 2013-07-03 08:46:40 UTC
 commit ba32b2e16bdff93ea8258303d43042bf598aa31e
Author: Tim-Philipp Müller <tim@centricular.net>
Date:   Wed Jul 3 09:44:32 2013 +0100

    audioresample: make explicit that neon is disabled and why
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703477

(Otherwise when someone else posts a patch in a couple of weeks that adds the define again, we won't remember..)