The luminance channel is perceptually closer
to logarithmic than linear, and quantization steps should be proportional
to the magnitude of the values encoded in the file. Chroma channels are
perceptually closer to linear than logarithmic; quantization steps should
be roughly the same throughout the range of encoded values.
For a perceptually lossless encoding, you may have that backwards.
Linear (gamma 1.0) data needs to be quantized with logarithmic or power law
steps.
And log encoded or gamma encoded (aroung 2.0) data need to use fixed
quantization steps.
(same as audio ;-)
Fixed quantization of linear (gamma 1.0) image data leads to artifacts in the
shadows, and 75% of the values given to highlights (wasted).
Fixed quantization of log or gamma 2.0 encoded image data leads to no visible
artifacts.
If you're trying to say that the chroma channels are perceptually encoded (log
or gamma 2.0), then you have it right but are using confusing, non-standard
terminology.
Also, the logarithmic nature of floating point shouldn't enter into the
discussion because they are still mathematically linear.
Only the encoding of the original data should matter.
Chris
-----Original Message-----
From: address@hidden on behalf of Florian Kainz
Sent: Tue 12/19/2006 2:34 PM
To: Florian Kainz
Cc: Simon Green; address@hidden
Subject: Re: [Openexr-devel] OpenEXR 1.5.0, OpenEXR-Images 1.5.0 released
P.S.: I missed a step in my description of B44. In the latest version
of OpenEXR, a new per-channel pLinear flag indicates if an image channel
is perceptually linear or logarithmic.
The B44 compressor uses this flag to reduce quantization artifacts in
luminance/chroma images. The luminance channel is perceptually closer
to logarithmic than linear, and quantization steps should be proportional
to the magnitude of the values encoded in the file. Chroma channels are
perceptually closer to linear than logarithmic; quantization steps should
be roughly the same throughout the range of encoded values.
In order to compensate for the logarithmic behavior of floating-point
numbers, the B44 compressor warps the s[i] values in input blocks for
perceptually linear channels before computing t[i]:
s[i] = min (exp (s[i] / 8), HALF_MAX)
Note that this operation limits the range original pixel values that can
be encoded to approximately [-88.7, 88.7], and that only 962 different
warped s[i] values are produced.