Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    QOI_DIFF16 {
        u8 tag  :  3;   // b110
        u8 dr   :  5;   // 5-bit   red channel difference: -15..16
        u8 dg   :  4;   // 4-bit green channel difference:  -7.. 8
        u8 db   :  4;   // 4-bit  blue channel difference:  -7.. 8
    }
I'd think that the extra bit ought to be given to green, since that tracks most closely with luminance. That would make this somewhat analogous to the RGB565 layout for 16-bit pixels (https://en.wikipedia.org/wiki/High_color#16-bit_high_color).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: