Followup to chromium bug:
https://code.google.com/p/chromium/issues/detail?id=450189
Chrome has an unoptimized ARGBAttentuate. It uses different math than libyuv.
The question was asked,
"Does ATTENUATE() c version match the following for all f and a in [0..255] ?"
unsigned char premult(unsigned char f, unsigned char a)
{
const unsigned prod = f * a + 128;
return (prod + (prod >> 8)) >> 8;
To test the differences in math, a unittest should be written.
Original issue reported on code.google.com by fbarch...@chromium.org on 11 Aug 2015 at 12:26
Original issue reported on code.google.com by
fbarch...@chromium.org
on 11 Aug 2015 at 12:26