[MPlayer-dev-eng] [PATCH] vf_ass: avoid a division
Grigori Goronzy
greg at chown.ath.cx
Thu Sep 16 10:21:33 CEST 2010
On 09/15/2010 03:22 PM, Nicolas George wrote:
> Hi.
>
> The attached patch avoids a division in the inner loops of the alpha
> blending code of vf_ass.
>
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.
Grigori
More information about the MPlayer-dev-eng
mailing list