Daniel Browning
Well-known member
I just wish that the 10 to 1 compression option was the Mathematically Lossless option,
Mathematically Lossless doesn't mean better.
There are some types of compression that lose absolutely no information whatsoever, and no artifacts are visible even under the most extreme once-in-a-lifetime processing you can imagine. Yet they are not mathematically lossless. I'll give you an example.
Let's say you're trying to measure how long it takes for a ball from a "perfect" throwing machine to go 100 feet. It always throws the exact same way at the same speed (2.0000000 seconds), but we'll say we don't know that so we have to measure it. Your stop watch precision is down to one ten-millionth of a second. So you start recording numbers:
1.95435435
2.05223848
2.10438524
1.97448923
2.02385385
But is the data really that *accurate*? Were your eyes and muscles so finely tuned that you knew to push the button to within one 10 millionth of a second? One way to "compress" that data is to simply throw away the wasted precision:
1.95
2.05
2.10
1.97
2.02
Now there is much less data, but it's still just as "accurate". All you've done is throw away wasted precision.
Same thing with image sensor compression. Let's say you're shooting a colorchecker test chart. We know from the manufacturer the color of a certain patch to such an exact extent that on the certain 14-bit sensor we're testing it should render a green channel raw value of exactly 8192.
But when we actually measure it with the camera, we get all sorts of raw values from the pixels inside the colorchecker patch:
8282
8102
8237
8147
Why are they jumping around so much? Because light itself is random. A phenomenon called photon shot noise means that the *mean* raw value will be 8192, but the actual raw values are quite random.
The values jump around so much that 14 bits is far more precision than necessary for this tonal level (1 stop below clipping). As long as the random jumps are greater than the quantization step, you can throw away precision without having lost *any* information whatsoever. It's exactly like the stopwatch analogy above: your eyes and body are introducing so much randomness to the measurements that recording 10 millionths of a second is not really giving you any additional accuracy -- just wasted precision. In the same way, light itself adds randomness to the measurement, so wasting 14 bits on that tonal level is just wasted precision.
One of the simplest and fastest compression methods is a bit depth LUT (Look Up Table). For low tonal values, you need all 14 bits to record the entire noise floor. For high tonal values, you only need 7, 8, or 9 bits. The LUT only needs to be tuned once for each sensor design (so that the LUT curve matches the SNR curve for the photon shot noise limited part of the dynamic range). This is exactly like changing "1.99423953" to "1.99".
So just because something is not mathematically lossless doesn't mean it's any worse. Sometimes it's just dumping the wasted precision.