[MPlayer-dev-eng] [PATCH] vf_ass: avoid a division

Siarhei Siamashka siarhei.siamashka at gmail.com
Thu Sep 16 10:46:44 CEST 2010

On Thu, Sep 16, 2010 at 11:21 AM, Grigori Goronzy <greg at chown.ath.cx> wrote:
> Instead of "x / 255" at all it's usually faster to do "(x + 255) >> 8",
> at least in my experience. You can easily transform all divisions to
> shifts in this inner loop. Haven't done any tests, though.

I suggest checking this link for the bit-exact division-free implementation:

Best regards,
Siarhei Siamashka

More information about the MPlayer-dev-eng mailing list