Hacker News new | ask | show | jobs
by Atrix256 3026 days ago
you are totally correct. u16 is more than enough (as is u12 apparently!). F16 is also sufficient. I'll update the text to point this out.
1 comments

Note: that relies on doing proper sRGB -> linear instead of naive gamma conversion, unless I'm completely mistaken:

    In [16]: math.log2(1./colour.models.oetf_reverse_sRGB(1.0/256.0))
    Out[16]: 11.6915341649192

    In [17]: math.log2(1./((1.0/256.0)**2.2))
    Out[17]: 17.6

    In [18]: math.log2(1./((1.0/256.0)**1.8))
    Out[18]: 14.4

Although the stuff you will be losing even if you use 2.2 gamma with 12 bit depth should be fairly minimal if I'm interpreting the numbers correctly