- /* Convert sRGB to XYZ; op is BGRA */
- int const x = matrix(0, 0) * op[2] + matrix(0, 1) * op[1] + matrix(0, 2) * op[0];
- int const y = matrix(1, 0) * op[2] + matrix(1, 1) * op[1] + matrix(1, 2) * op[0];
- int const z = matrix(2, 0) * op[2] + matrix(2, 1) * op[1] + matrix(2, 2) * op[0];
+ /* Convert sRGB to XYZ; op is BGRA. First, input gamma LUT */
+ double const r = lut_in[op[2]];
+ double const g = lut_in[op[1]];
+ double const b = lut_in[op[0]];