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

◆ buildWidePipelineQ16()

bool fl::anonymous_namespace{pipeline.cpp.hpp}::buildWidePipelineQ16 ( const colorimetric_response::EmitterProfile & device,
const Chromaticity * target_white,
const EmitterSolveMatrixQ16 * effective_solve,
shared_ptr< const WidePipelineQ16 > * out )

Definition at line 76 of file pipeline.cpp.hpp.

80 {
82 if (!wide) return false;
83 wide->topology = device.topology;
84 i32 white1[3];
85 i32 white2[3] = {};
86 if (!wideWhiteColumnQ16(device.xy_white1, device.lum_white1, white1))
87 return false;
89 !wideWhiteColumnQ16(device.xy_white2, device.lum_white2, white2))
90 return false;
91 if (target_white != nullptr) {
92 AdaptationMatrixQ16 to_working;
93 if (!buildBradfordMatrixQ16(*target_white, kPipelineD65,
94 &to_working)) return false;
95 i32 adapted1[3];
96 adaptXyzQ16(to_working, white1, adapted1);
97 for (int i = 0; i < 3; ++i) white1[i] = adapted1[i];
99 i32 adapted2[3];
100 adaptXyzQ16(to_working, white2, adapted2);
101 for (int i = 0; i < 3; ++i) white2[i] = adapted2[i];
102 }
103 }
106 const bool ok = effective_solve == nullptr
107 ? buildGamutMapRgbwQ16(device, white1, allocation, &wide->rgbw)
108 : buildGamutMapRgbwFromSolveQ16(device, *effective_solve, white1,
109 allocation, &wide->rgbw);
110 if (!ok) return false;
112 const bool ok = effective_solve == nullptr
113 ? buildGamutMapRgbwwQ16(device, white1, white2, allocation,
114 &wide->rgbww)
115 : buildGamutMapRgbwwFromSolveQ16(device, *effective_solve, white1,
116 white2, allocation, &wide->rgbww);
117 if (!ok) return false;
118 } else {
119 return false;
120 }
121 if (device.response_lut_size != 0) {
122 const u16 size = device.response_lut_size;
123 if (!validResponseLut(device.response_lut_white1, size)) return false;
124 wide->white1_response.assign(device.response_lut_white1,
125 device.response_lut_white1 + size);
126 if (wide->white1_response.size() != size) return false;
128 if (!validResponseLut(device.response_lut_white2, size)) return false;
129 wide->white2_response.assign(device.response_lut_white2,
130 device.response_lut_white2 + size);
131 if (wide->white2_response.size() != size) return false;
132 }
133 }
134 *out = wide;
135 return true;
136}
Rgbw rgbw
bool validResponseLut(const u16 *values, u16 size) FL_NO_EXCEPT
bool wideWhiteColumnQ16(const float(&xy)[2], float luminance, i32(&out)[3]) FL_NO_EXCEPT
constexpr Chromaticity kPipelineD65
The working domain's rendering white.
bool buildGamutMapRgbwFromSolveQ16(const colorimetric_response::EmitterProfile &profile, const EmitterSolveMatrixQ16 &solve, const i32(&white_xyz)[3], WhiteAllocationPolicy policy, GamutMapRgbwQ16 *out) FL_NO_EXCEPT
Bind a four-emitter map from an effective RGB solve and a white column already adapted into the same ...
WhiteAllocationPolicy
Which end of the feasible white interval to take (C3).
@ WhitePreferred
As much white as the target allows.
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT
Definition shared_ptr.h:414
bool buildGamutMapRgbwwQ16(const colorimetric_response::EmitterProfile &profile, const i32(&white1_xyz)[3], const i32(&white2_xyz)[3], WhiteAllocationPolicy policy, GamutMapRgbwwQ16 *out) FL_NO_EXCEPT
Derive the mapper for a three-primary profile plus two white emitters.
void adaptXyzQ16(const AdaptationMatrixQ16 &matrix, const i32(&xyz)[3], i32(&out_xyz)[3]) FL_NO_EXCEPT
Adapt one XYZ triple.
bool buildGamutMapRgbwQ16(const colorimetric_response::EmitterProfile &profile, const i32(&white_xyz)[3], WhiteAllocationPolicy policy, GamutMapRgbwQ16 *out) FL_NO_EXCEPT
Derive the mapper for a three-primary profile plus one white emitter.
bool buildBradfordMatrixQ16(Chromaticity source_white, Chromaticity destination_white, AdaptationMatrixQ16 *out) FL_NO_EXCEPT
Build the Bradford transform from source_white to destination_white.
bool buildGamutMapRgbwwFromSolveQ16(const colorimetric_response::EmitterProfile &profile, const EmitterSolveMatrixQ16 &solve, const i32(&white1_xyz)[3], const i32(&white2_xyz)[3], WhiteAllocationPolicy policy, GamutMapRgbwwQ16 *out) FL_NO_EXCEPT
Bind a five-emitter map from one effective RGB solve and two white columns, all in the same D65 worki...
A collapsed adaptation transform in s16.16.

References fl::adaptXyzQ16(), fl::buildBradfordMatrixQ16(), fl::buildGamutMapRgbwFromSolveQ16(), fl::buildGamutMapRgbwQ16(), fl::buildGamutMapRgbwwFromSolveQ16(), fl::buildGamutMapRgbwwQ16(), buildWidePipelineQ16(), fl::FL_NO_EXCEPT, kPipelineD65, fl::make_shared(), fl::colorimetric_response::RGBW, fl::colorimetric_response::RGBWW, validResponseLut(), fl::WhitePreferred, and wideWhiteColumnQ16().

Referenced by buildWidePipelineQ16().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: