Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARGBAttenuate test #482

Open
GoogleCodeExporter opened this issue Dec 31, 2015 · 0 comments
Open

ARGBAttenuate test #482

GoogleCodeExporter opened this issue Dec 31, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 11 Aug 2015 at 12:26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant