4 ms·
IIRC the way you encode grayscale in WebP is a SUBTRACT_GREEN transform that makes the red and blue channel 0 everywhere, and then use a 1-element prefix code f
by edflsafoiewq 3y ago
IIRC the way you encode grayscale in WebP is a SUBTRACT_GREEN transform that makes the red and blue channel 0 everywhere, and then use a 1-element prefix code for R and B, so the R and B for each pixel take zero bits. Same idea with A for opaque images. Do you know why that's not good enough?
- JyrkiAlakuijala 3y agoI made a mistake there with subtract green. If I had just added 128 to the residuals, all remaining prediction arithmetic would have worked better and it would have given 1 % more density. This is because most related arithmetic for predicting pixels is done in unsigned 8 bit arithmetic. Subtract green moves such predictions to often cross the 0 -> 255 boundary, and then averaging, deltas etc make little sense and add to the entropy.
- edflsafoiewq 3y agoCan you explain why?
- JyrkiAlakuijala 3y agoI edited the answer into the previous message for better flow.
- a-french-anon 3y agoThankfully the following comment explains more than I know, I was speaking purely from empiric experience.
- edflsafoiewq 3y agoThen you can't know that any difference you see is because of how WebP encodes grayscale.