divide by 255

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



General purpose compose operations usually include a division by 255 of
a number in the range 0 ... 65025. While fixing up Mozilla's alpha
compositor I disturbed a sleeping hacker who has provided a (tested and
working) macro which computes this operation much more quickly than
any other solution tested, including GCC -On speed-ups using similar
but different tricks.

Of course, GCC cannot use this FAST_DIVIDE_BY_255 because it is safe
only for 0 ... 65025, but I think it might be useful to Gimp, both in
the core (which I presume has several alpha compositors) and in
plug-ins, where alpha composition is also a popular operation.

So, does Gimp already have something like this in core? Or should we
consider borrowing this macro from wherever it originated and using
it throughout Gimp (after 1.2, naturally) ?

Nick.


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux