Multi-compatible low and high dynamic range and high bit-depth texture and video encoding system
A method of processing image data includes generating image data including luminance and chrominance data representing a selected object, separating the luminance and chrominance data, storing the separated luminance and chrominance data in corresponding separate spaces in memory, and separately compressing the stored luminance and chrominance data.
1. A method of processing high bit-depth image data comprising: generating floating point image data; clamping the floating point image data to generate low bit-depth image data; compressing the low bit-depth image data; quantizing values of a selected component of the compressed low bit-depth image data; generating a linearly interpolated value for each quantization value: calculating a first difference between a corresponding value of the selected component of the floating point data and a current quantization value; calculating a second difference between a quantization value of a next quantized value and the current quantized value; and calculating an absolute value of a ratio between the first difference and the second difference to generate a current linearly interpolated value; and compressing the linearly interpolated values.
2. The method of claim 1 , further comprising selectively inverting the current linearly interpolated value: calculating a half of the current quantization value; taking a fractional part of the half of the quantization value; and selectively inverting the current linearly interpolated value if the fractional part of the half of the quantization value is negative.
3. The method of claim 1 , wherein the selected component of the compressed image data comprises luminance data.
4. The method of claim 1 , wherein the selected component of the compressed data comprises at least one of RGB color components.
5. The method of claim 1 , further comprising decoding the compressed linearly interpolated values of the selected component comprising: quantizing values of the selected component of the compressed image data; for each quantization value, decompress a corresponding compressed linearly interpolated value; and calculating a current decoded value by adding a current quantization value with a product of an incremental quantization step value and a current linearly interpolated value.