nigeltao / qoi2-bikeshed

"Quite OK Image" version 2 discussions
33 stars 0 forks source link

16-bit depth support #4

Open nigeltao opened 3 years ago

nigeltao commented 3 years ago

Context: https://github.com/phoboslab/qoi/issues/2

nigeltao commented 3 years ago

Related, noting 3 vs 4 (vs other??) channels in the header: https://github.com/phoboslab/qoi/issues/16

chocolate42 commented 2 years ago

16 bit probably isn't viable for such a simple format, the upper 8 bits could possibly be modelled like an 8 bit image but the lower 8 bits would likely be the equivalent of noise. If that assumption holds compression levels of RGB might average 60-70% of raw. Maybe that's worth it.

Wulf0x67E7 commented 2 years ago

How about splitting the odd and even bits of a 16-bit-channel pixels bits into two 8-bit-channel pixels like [0,1,2...15] -> [0,2,4...14], [1,3,5...15]? Might keep the diffs small enough to still be somewhat compressible by vanilla qoi.

p0nce commented 2 years ago

A 10 bit attempt here => https://github.com/AuburnSounds/gamut/blob/main/source/gamut/codecs/qoi10b.d