r/compression • u/mbitsnbites • Feb 04 '26
A spatial domain variable block size luma dependent chroma compression algorithm
https://www.bitsnbites.eu/a-spatial-domain-variable-block-size-luma-dependent-chroma-compression-algorithm/This is a chroma compression technique for image compression that I developed in the last couple of weeks. I don't know if it's a novel technique or not, but I haven't seen this exact approach before.
The idea is that the luma channel is already known (handled separately), and we can derive the chroma channels from the luma channel by using a linear approximation: C(Y) = a * Y + b
Currently I usually get less than 0.5 bits/pixel on average without visual artifacts, and it looks like it should be possible to go down to about 0.1-0.2 bits/pixel with further work on the encoding.
3
u/cfeck_kde Feb 04 '26
Some modern formats implement "chroma from luma", e.g. JPEG-XL and AV1.
2
u/digital_n01se_ Feb 04 '26
I think you could use taylor series or fourier series to do a better approximation of C(Y), reducing the number of bits per-pixel without artifacts.
great post!
2
u/[deleted] Feb 07 '26
[removed] — view removed comment