Source:
Correction.h
Correction¶
Brightness, channel reorder and white derivation, resolved once and applied per channel.
Classes¶
| Name | Description |
|---|---|
Correction |
The transform itself, its offsets derived cold from the role array so the hot path stays an indexed store per channel. |
Enumerations¶
| Name | Description |
|---|---|
WhiteMode |
More than one algorithm is accepted, so white derivation is a mode rather than a formula. |
WhiteMode¶
More than one algorithm is accepted, so white derivation is a mode rather than a formula.
| Value | Description |
|---|---|
None |
|
Min |
|
Accurate |
Variables¶
| Return | Name | Description |
|---|---|---|
constexpr const char * |
kWhiteModeOptions constexpr |
|
constexpr uint8_t |
kWhiteModeCount constexpr |
kWhiteModeOptions¶
constexpr
kWhiteModeCount¶
constexpr
Correction¶
src/light/drivers/Correction.h:30The transform itself, its offsets derived cold from the role array so the hot path stays an indexed store per channel.
Public Attributes¶
uint8_t briLut = {}
Curve curve = Curve::Cie
: Which curve the brightness rebuild fills through; a driver's setting, not a global one.
uint8_t offRed = 1
: Output byte position of the red role.
uint8_t offGreen = 0
: Output byte position of the green role.
uint8_t offBlue = 2
: Output byte position of the blue role.
uint8_t offWhite =
uint8_t offWarmWhite =
: Output byte positions of the extra emitters beside cold white.
uint8_t offDimmer =
: Output byte position of the fixture's master dimmer.
uint8_t offPan =
: Output byte positions of the fixture's motion channels.
uint8_t offTilt =
uint8_t offZoom =
uint8_t offRotate =
: Output byte positions of the rotate and gobo channels.
uint8_t offGobo =
bool hasMotion = false
: Whether this fixture carries any motion channel.
bool motionHeld = false
: Hold the rig's aim, so motion stops reaching the wire and a fixture keeps its position.
uint8_t offYellow =
: Output byte position of the amber role.
uint8_t offUV =
: Output byte position of the UV emitter.
uint8_t outChannels = 3
WhiteMode whiteMode = WhiteMode::Min
Public Methods¶
inline void rebuildBrightness(uint8_t brightness)
: Refresh the brightness LUT alone, leaving the channel offsets untouched.
inline void rebuild(uint8_t brightness, const ChannelRole * roles, uint8_t nChannels)
: Refresh the LUT and derive every channel offset from the light's role array.
inline void apply(const uint8_t * src, uint8_t * out, uint8_t srcChannels) const
: Hot path: transform one source light into its output bytes, integer-only and allocation-free.
Public Static Attributes¶
constexpr uint8_t kAbsent = 255
: Marks a role this light does not carry.
Public Static Methods¶
static inline float cieLuminance(float control255)
: CIE 1931 lightness, inverted: a control position to a luminance fraction.
Public Types¶
enum Curve
: The perceptual curve the output LUT is filled through.
| Value | Description |
|---|---|
Cie |
|
Gamma22 |
|
Gamma28 |
|
Linear |
More info¶
A light's wire format is a ChannelRole array, resolved from the preset library into a Correction at rebuild time. The curated orders are seeded rows in that library rather than an enum here.