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

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


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

--- Comment #1 from Ilya Konstantinov <ilya.konstantinov at gmail.com> ---
According to what I see, in all integer quantizations:
dither = (1<<(scale - 1))
                or
         (1<<(scale)) 
...
[1] gst_fast_random_int32_range (bias - dither, bias + dither)
   or
[2] gst_fast_random_int32_range (bias - dither, bias + dither - 1)

Therefore, (end - start) is always either 2^n or 2^n-1 (for some 'n').
So why can't we just have two functions:

 return start + (gst_fast_random_uint32 () & (end - start - 1)); // for [1]

and

 return start + (gst_fast_random_uint32 () & (end - start)); // for [2]

?

-- 
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