FastLED 3.10.6
Loading...
Searching...
No Matches
source_xyz.h
Go to the documentation of this file.
1#pragma once
2
3// Source RGB -> XYZ in the pipeline working domain (P6, #4040).
4//
5// The matrix is derived once when a profile is bound, in float, and stored
6// quantized. The per-pixel path is three multiply-accumulates per component
7// in fixed point -- no float, no division, no allocation.
8
10#include "fl/stl/int.h"
11#include "fl/stl/noexcept.h"
12
13namespace fl {
14
21 i32 m[3][3];
22};
23
26bool buildSourceMatrixQ16(const RgbPrimaries& primaries,
28
37void linearRgbToXyzQ16(const SourceMatrixQ16& matrix, u16 r, u16 g, u16 b,
38 i32 (&out_xyz)[3]) FL_NO_EXCEPT;
39
40} // namespace fl
bool buildSourceMatrixQ16(const RgbPrimaries &primaries, SourceMatrixQ16 *out) FL_NO_EXCEPT
Quantize the source matrix for primaries.
InputGamut g FL_NO_EXCEPT
Definition rgbw.h:121
void linearRgbToXyzQ16(const SourceMatrixQ16 &matrix, u16 r, u16 g, u16 b, i32(&out_xyz)[3]) FL_NO_EXCEPT
One pixel: u16 linear RGB -> s16.16 XYZ.
InputGamut g
Definition rgbw.h:124
Base definition for an LED controller.
Definition crgb.hpp:179
Source-primaries matrix in s16.16, rows ordered X, Y, Z.
Definition source_xyz.h:20