[Bug 746661] New: audioconvert is slow on architectures without 64-bit integer divide (e.g. armv7)

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Mar 23 11:28:46 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=746661

            Bug ID: 746661
           Summary: audioconvert is slow on architectures without 64-bit
                    integer divide (e.g. armv7)
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: ilya.konstantinov at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

audioconvert's quantization functions (e.g.
gst_audio_quantize_quantize_signed_tpdf_none) are slow on architectures that
don't have 64-bit integer divide (e.g. ARMv7).

The culprit is gst_fast_random_int32_range:

  static inline gint32
  gst_fast_random_int32_range (gint32 start, gint32 end)
  {
    gint64 tmp = gst_fast_random_uint32 ();

    tmp = (tmp * (end - start)) / G_MAXUINT32 + start;

    return (gint32) tmp;
  }

A 64-bit integer is divided by G_MAXUINT32. On armv7 iOS, this calls library
function __divdi3, which is 20 times (!) slower compared to same iOS device
running an arm64 build.

According to Sebastian Dröge, since gst_fast_random_int32_range is only used
for dither noise generation, we might replace it with whatever works better for
that specific purpose.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list