Comment by edflsafoiewq
3 years 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?
I 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.
Can you explain why?
I edited the answer into the previous message for better flow.
Thankfully the following comment explains more than I know, I was speaking purely from empiric experience.
Then you can't know that any difference you see is because of how WebP encodes grayscale.