phoboslab/qoi

16 bit variant?

meshula opened this issue · 4 comments

I was thinking this might be cool in OpenEXR ~ at first glance, it looks like a 16 bit variant would be straight forward?

IMO, ideally the variants would be

  • 8 bit grayscale
  • 8 bit RGB
  • 8 bit YCoCg-R https://en.wikipedia.org/wiki/YCoCg
  • 8 bit RGBA
  • 16 bit RGB
  • 16 bit YCoCg-R https://en.wikipedia.org/wiki/YCoCg
  • 16 bit RGBA
    Preferably, the color space would be part of the header (see #12). which would also allow for more efficient encoding of RGB and RGBA which currently lose efficiency due to sharing tags with each-other.

Even if you stick with the simplicity of a single color model (instead of [Y, YCoCg, RGB, RGBA] x [8 bit, 16 bit]), I am curious if RGB <-> YCoCg noticably affects codec speed and compression size.

To add to the variant list, with regards to my initial question, OpenEXR stores fp16 channels. I think the entropy for fp16 or u16 is going to be same for the same image, so I think the qoi scheme would have the same performance in either case. Here's an article about what we have right now for lossless:

https://aras-p.info/blog/2021/08/04/EXR-Lossless-Compression/

The file format for QOI will not change anymore. Ideas for a successor to QOI should be discussed here: https://github.com/nigeltao/qoi2-bikeshed/issues