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
9
#include "
fl/gfx/color_profile.h
"
10
#include "
fl/stl/int.h
"
11
#include "
fl/stl/noexcept.h
"
12
13
namespace
fl
{
14
20
struct
SourceMatrixQ16
{
21
i32
m
[3][3];
22
};
23
26
bool
buildSourceMatrixQ16
(
const
RgbPrimaries
& primaries,
27
SourceMatrixQ16
* out)
FL_NO_EXCEPT
;
28
37
void
linearRgbToXyzQ16
(
const
SourceMatrixQ16
& matrix, u16 r, u16
g
, u16 b,
38
i32 (&out_xyz)[3])
FL_NO_EXCEPT
;
39
40
}
// namespace fl
color_profile.h
int.h
fl::buildSourceMatrixQ16
bool buildSourceMatrixQ16(const RgbPrimaries &primaries, SourceMatrixQ16 *out) FL_NO_EXCEPT
Quantize the source matrix for primaries.
Definition
source_xyz.cpp.hpp:57
fl::FL_NO_EXCEPT
InputGamut g FL_NO_EXCEPT
Definition
rgbw.h:121
fl::linearRgbToXyzQ16
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.
Definition
source_xyz.cpp.hpp:114
fl::g
InputGamut g
Definition
rgbw.h:124
fl
Base definition for an LED controller.
Definition
crgb.hpp:179
fl::SourceMatrixQ16::m
i32 m[3][3]
Definition
source_xyz.h:21
fl::SourceMatrixQ16
Source-primaries matrix in s16.16, rows ordered X, Y, Z.
Definition
source_xyz.h:20
noexcept.h
fl::RgbPrimaries
Definition
color_profile.h:16
fl
gfx
source_xyz.h
Generated on Sun Oct 4 2026 23:09:00 for FastLED by
1.13.2