310 {
311 for (int i = 0; i < 5; ++i) drives[i] = 0;
312 if (!pipeline.
wide)
return;
316 i32 xyz[3];
318 const bool rgbww = pipeline.
wide->topology ==
320 if (rgbww) {
321 i32 wide_drives[5];
324 xyz, wide_drives)) {
325 i32 rgb_drives[3];
327 xyz, rgb_drives);
328 for (int i = 0; i < 3; ++i) {
329 wide_drives[i] = rgb_drives[i] < 0 ? 0 :
330 (rgb_drives[i] > 65536 ? 65536 : rgb_drives[i]);
331 }
332 wide_drives[3] = 0;
333 wide_drives[4] = 0;
336 }
337 for (int i = 0; i < 5; ++i) drives[i] = wide_drives[i];
338 } else {
339 i32 wide_drives[4];
342 xyz, wide_drives)) {
343 i32 rgb_drives[3];
345 xyz, rgb_drives);
346 for (int i = 0; i < 3; ++i) {
347 wide_drives[i] = rgb_drives[i] < 0 ? 0 :
348 (rgb_drives[i] > 65536 ? 65536 : rgb_drives[i]);
349 }
350 wide_drives[3] = 0;
353 }
354 for (int i = 0; i < 4; ++i) drives[i] = wide_drives[i];
355 }
356}
void mapAndAllocateRgbwwQ16(const GamutMapRgbwwQ16 &map, const i32(&xyz)[3], i32(&drives)[5]) FL_NO_EXCEPT
One pixel: XYZ in s16.16 to five in-gamut drives – red, green, blue, white1, white2.
bool allocateTwoWhiteDrivesQ16(const TwoWhiteAllocationQ16 &allocation, const i32(&xyz)[3], i32(&drives)[5]) FL_NO_EXCEPT
One pixel: XYZ in s16.16 to five drives – red, green, blue, white1, white2 – at whichever end of the ...
bool allocateEmitterDrivesQ16(const WhiteAllocationQ16 &allocation, const i32(&xyz)[3], i32(&drives)[4]) FL_NO_EXCEPT
One pixel: XYZ in s16.16 to four drives, in the order red, green, blue, white, at whichever end of th...
u16 decodeTransferU16(TransferFunction transfer, u8 code) FL_NO_EXCEPT
Decode one 8-bit source code to u16 linear light under transfer.
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.
void solveRgbDrivesQ16(const EmitterSolveMatrixQ16 &matrix, const i32(&xyz)[3], i32(&drives)[3]) FL_NO_EXCEPT
One pixel: XYZ in s16.16 to three emitter drives in s16.16.
void mapAndAllocateRgbwQ16(const GamutMapRgbwQ16 &map, const i32(&xyz)[3], i32(&drives)[4]) FL_NO_EXCEPT
One pixel: XYZ in s16.16 to four in-gamut drives, red, green, blue, white.
TransferFunction transfer
The source's transfer function, applied per code.
GamutPolicy gamut_policy
What to do with a target the device cannot reproduce.
shared_ptr< const WidePipelineQ16 > wide
SourceMatrixQ16 source
Source primaries to XYZ, with adaptation to D65 already folded in.