logoalt Hacker News

pornelyesterday at 10:43 PM1 replyview on HN

Although the post focuses on RGB, the same quantization issue exists for any type of signal being mapped between discrete and continuous representations.

The issue isn't in having a representation for 0 photons, but about maximizing information stored in a byte. Ideally you shouldn't be underutilizing the byte value 0, nor add bias to data that should have been assigned to the 0th bucket, regardless of what it represents (you could have a color space that goes from bright to super bright, and still want to ensure that every byte represents equal chunk of your brightness range).


Replies

PaulDavisThe1styesterday at 11:53 PM

Yep, the exact same problem arises in digital audio, mapping between integer sample formats and the floating point representation that is generally used internally.