FastLED 3.9.15
Loading...
Searching...
No Matches
rgbww.cpp.hpp File Reference

Detailed Description

Dispatch + implementations for the 5-channel RGB->RGBWW path (issue #2558, Phase 3 of #2545).

The colorimetric modes call solve_rgbcct() from fl/gfx/rgbw_colorimetric.h whenever FASTLED_RGBW_COLORIMETRIC is defined (that's the one flag that gates the underlying color math library — see PR #2552). Without it, the dispatch emits FL_WARN_ONCE and outputs five zero bytes. Suppress the warn-once with -DFASTLED_SUPPRESS_RGBWW_FALLBACK_WARNING=1.

There is intentionally no separate FASTLED_RGBWW gate: –gc-sections already drops every RGBWW symbol for sketches that never configure a channel with mWhiteCfg = Rgbww{...}, so a second compile flag would only add an extra define for users to remember without any flash savings.

Definition in file rgbww.cpp.hpp.

#include "fl/stl/stdint.h"
#include "fl/system/fastled.h"
#include "fl/gfx/rgbww.h"
#include "fl/gfx/rgbw_colorimetric.h"
#include "fl/log/log.h"
#include "fl/stl/singleton.h"
+ Include dependency graph for rgbww.cpp.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fl::anonymous_namespace{rgbww.cpp.hpp}::Rgb2RgbwwUserState
 
struct  fl::anonymous_namespace{rgbww.cpp.hpp}::RgbwwColorimetricState
 

Namespaces

namespace  fl
 Base definition for an LED controller.
 
namespace  fl::anonymous_namespace{rgbww.cpp.hpp}
 

Macros

#define FASTLED_INTERNAL
 

Functions

const colorimetric_detail::RgbcctProfilefl::get_rgbww_colorimetric_profile () FL_NOEXCEPT
 
void fl::rgb_2_rgbww_colorimetric (const Rgbww &cfg, fl::u8 r, fl::u8 g, fl::u8 b, fl::u8 r_scale, fl::u8 g_scale, fl::u8 b_scale, fl::u8 *out_r, fl::u8 *out_g, fl::u8 *out_b, fl::u8 *out_ww, fl::u8 *out_wc) FL_NOEXCEPT
 Colorimetric strict sub-gamut solver for RGBWW (gist sec 5 + sec 11-12, using solve_rgbcct from rgbw_colorimetric.h).
 
void fl::rgb_2_rgbww_colorimetric_boosted (const Rgbww &cfg, fl::u8 r, fl::u8 g, fl::u8 b, fl::u8 r_scale, fl::u8 g_scale, fl::u8 b_scale, fl::u8 *out_r, fl::u8 *out_g, fl::u8 *out_b, fl::u8 *out_ww, fl::u8 *out_wc) FL_NOEXCEPT
 Colorimetric white-overdrive solver for RGBWW (wx_lp_legacy + RGBCCT layered blend).
 
void fl::rgb_2_rgbww_user_function (const Rgbww &cfg, fl::u8 r, fl::u8 g, fl::u8 b, fl::u8 r_scale, fl::u8 g_scale, fl::u8 b_scale, fl::u8 *out_r, fl::u8 *out_g, fl::u8 *out_b, fl::u8 *out_ww, fl::u8 *out_wc) FL_NOEXCEPT
 User-installable RGB->RGBWW function.
 
void fl::rgbww_partial_reorder (EOrderWW ww_placement, fl::u8 b0, fl::u8 b1, fl::u8 b2, fl::u8 ww, fl::u8 wc, fl::u8 *out_b0, fl::u8 *out_b1, fl::u8 *out_b2, fl::u8 *out_b3, fl::u8 *out_b4) FL_NOEXCEPT
 Dispatch RGB->RGBWW for a given mode.
 
void fl::set_rgb_2_rgbww_function (rgb_2_rgbww_function func) FL_NOEXCEPT
 
void fl::set_rgbww_colorimetric_profile (const colorimetric_detail::RgbcctProfile *profile) FL_NOEXCEPT
 
void fl::anonymous_namespace{rgbww.cpp.hpp}::zero_out (u8 *r, u8 *g, u8 *b, u8 *ww, u8 *wc) FL_NOEXCEPT
 

Variables

const colorimetric_detail::RgbcctProfile fl::kRgbwwDefaultProfile
 

Class Documentation

◆ fl::anonymous_namespace{rgbww.cpp.hpp}::Rgb2RgbwwUserState

struct fl::anonymous_namespace{rgbww.cpp.hpp}::Rgb2RgbwwUserState
+ Collaboration diagram for fl::anonymous_namespace{rgbww.cpp.hpp}::Rgb2RgbwwUserState:
Class Members
rgb_2_rgbww_function fn = nullptr

◆ fl::anonymous_namespace{rgbww.cpp.hpp}::RgbwwColorimetricState

struct fl::anonymous_namespace{rgbww.cpp.hpp}::RgbwwColorimetricState
+ Collaboration diagram for fl::anonymous_namespace{rgbww.cpp.hpp}::RgbwwColorimetricState:
Class Members
bool has_profile = false
RgbcctProfile profile {}