Page MenuHomePhabricator

evas_common: rgba32 to Y8
Needs ReviewPublic

Authored by ali.alzyod on Sun, Aug 4, 12:40 AM.

Details

Reviewers
cedric
Summary

Made small change to expand mapping range by using celling values.
Now : rgb(255,255,255) -> y(255)
Now : rgb(1 , 1 ,1 ) -> y(1)

Old : rgb(255,255,255) -> y(254)
Old : rgb(1 , 1, 1) -> y(0)

It is important for white point convert to not loss any value

Test Plan
#include <stdio.h>

int main()
{
    unsigned char r =255, g =255,b =255;
    unsigned int gry8_old = ((r * 19595) + (g * 38469) + (b * 7471)) >> 16;
    unsigned int gry8_new = ((r * 19596) + (g * 38470) + (b * 7472)) >> 16;
    
    printf("gry_old=%i\n",gry8_old);
    printf("gry_new=%i\n",gry8_new);

    return 0;
}

Diff Detail

Repository
rEFL core/efl
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12552
Build 9051: arc lint + arc unit
ali.alzyod created this revision.Sun, Aug 4, 12:40 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

ali.alzyod requested review of this revision.Sun, Aug 4, 12:40 AM
ali.alzyod edited the summary of this revision. (Show Details)Sun, Aug 4, 12:50 AM
ali.alzyod edited the test plan for this revision. (Show Details)Sun, Aug 4, 12:53 AM