On Feb 11, 09 11:28:56 -0800, Yang Zhao wrote:
static float ps_alu_consts[] = { - 1.0, 0.0, 1.13983, -1.13983/2, // r - c[0] - 1.0, -0.39465, -0.5806, (0.39465+0.5806)/2, // g - c[1] - 1.0, 2.03211, 0.0, -2.03211/2, // b - c[2] + 1.0, 0.0, 1.4020, 0, // r - c[0] + 1.0, -0.34414, -0.71414, 0, // g - c[1] + 1.0, 1.7720, 0.0, 0, // b - c[2] + /* Constants for undoing Y'CbCr scaling + * - Y' is scaled from 16:235 + * - Cb/Cr are scaled from 16:240 + * Unscaled value N' = N * N_mul + N_shift (N' in range [-0.5, 0.5]) + * Vector is [Y_mul, Y_shfit, C_mul, C_shift] + */ + 256.0/219.0, -16.0/219.0, 256.0/224.0, -128.0/224.0,
I don't understand this, Alex. You are changing *both* the color
conversion matrix *and* introducing scaling functions?!?
The scaling can be perfectly embedded in the color matrix.
Matthias
--
Matthias Hopf