telugu-boy / seedimg

GNU Lesser General Public License v3.0
14 stars 0 forks source link

CCONV: Implement YCbCr <-> RGB with a lookup table instead of multiplication. #39

Closed telugu-boy closed 4 years ago

tripulse commented 4 years ago

Then we've to make a 16MiB lookup table for YCbCr -> RGB and back. Total 32MiB. This for all possible pixel combinations.

telugu-boy commented 4 years ago

No

telugu-boy commented 4 years ago

Y R Y G Y B

Cr R Cr G Cr B

Cb R Cb G Cb B

So total 9 LUTs, sizeof(int) 9 255

telugu-boy commented 4 years ago

About 10kb in the binary

telugu-boy commented 4 years ago

And there'd be one back as well. So in total 20kb

tripulse commented 4 years ago

Hm, ok, that's good.

telugu-boy commented 4 years ago

ycbcr to rgb has been implemented. Next is rgb to ycbcr, and resource headers will follow the naming convention from_(input colourspace)_lut.rh.

telugu-boy commented 4 years ago

Done.