FastLED 3.10.6
Loading...
Searching...
No Matches

◆ linearRgbToXyzQ16()

void fl::linearRgbToXyzQ16 ( const SourceMatrixQ16 & matrix,
u16 r,
u16 g,
u16 b,
i32(&) out_xyz[3] )

One pixel: u16 linear RGB -> s16.16 XYZ.

Inputs are the u16 linear values decodeTransferU16 produces and are read as s16.16 raw, so full scale is 65535/65536 rather than exactly 1. That bias is uniform across all three channels and both the matrix and the white point, so it scales the result by 0.9999847 – a luminance error of 0.0015%, against a 0.5% budget – and it buys an exact shift in place of a division by 65535 in the per-pixel path.

Definition at line 114 of file source_xyz.cpp.hpp.

115 {
116 out_xyz[0] = dotRowQ16(matrix.m[0], r, g, b);
117 out_xyz[1] = dotRowQ16(matrix.m[1], r, g, b);
118 out_xyz[2] = dotRowQ16(matrix.m[2], r, g, b);
119}
InputGamut g
Definition rgbw.h:124

References FL_NO_EXCEPT, g, and fl::SourceMatrixQ16::m.

Referenced by processPixelLinearQ16(), and processPixelWideLinearQ16().

+ Here is the caller graph for this function: