GNOME Bugzilla – Bug 703477
audioresample: disable NEON code path for 16-bit integer
Last modified: 2013-07-03 08:58:47 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.
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>
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..)