[gstreamer-bugs] [Bug 590919] gst_util_uint64_scale_int() and friends don't round

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Tue Aug 11 04:08:54 PDT 2009


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=590919

  GStreamer | gstreamer (core) | Ver: git




------- Comment #16 from Kipp  2009-08-11 11:08 UTC -------
(In reply to comment #15)
> The 'refactored code' unoptimized the division. This code has been carefully
> tweaked. I would try to add a new rounding version (with an extra argument to
> specify the reounding type) then call the existing code if rounding down and
> try to patch up the result or input parameters with other rounding modes. 

All that is needed now that the previous division function doesn't provide is
the remainder.  The previous division code claimed to be inspired by the
function on page 152 of Hacker's Delight.  That function, in Hacker's Delight,
does compute the remainder, so I assume that somebody who understands how the
original long division function worked could figure out how to modify it to
return the remainder as well.  I never figured it out, but it sounds like
you're familiar with this code, is that something you could do?

It doesn't matter to me what long division function gets used, but I think
there should only be one long division function.  It seems silly to introduce a
second one just to get the remainder out, and I'd love it if the original one
could continue to be used.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=590919.




More information about the Gstreamer-bugs mailing list