FastLED 3.9.15
Loading...
Searching...
No Matches
five_bit_hd_gamma.h
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "fl/stl/int.h"
7#include "fl/stl/span.h"
8#include "fl/stl/noexcept.h"
9
10namespace fl {
11
12// Packed gamma-corrected pixel: 3 bytes RGB + 1 byte 5-bit brightness.
13// 4 bytes total, cache-friendly for bulk output.
18
23
24// Applies five-bit HD gamma correction over a span of pixels.
25// colors_scale and global_brightness are uniform across all pixels.
26// Two-span output variant (separate color and brightness arrays).
28 fl::span<const CRGB> colors, CRGB colors_scale, fl::u8 global_brightness,
29 fl::span<CRGB> out_colors, fl::span<fl::u8> out_power_5bit) FL_NOEXCEPT;
30
31// Packed CRGBA5 output variant (cache-friendly single array).
33 fl::span<const CRGB> colors, CRGB colors_scale, fl::u8 global_brightness,
35
36} // namespace fl
fl::CRGB CRGB
Definition crgb.h:25
unsigned char u8
Definition stdint.h:131
FiveBitGammaCorrectionMode
FL_OPTIMIZE_FUNCTION void five_bit_hd_gamma_bitshift(fl::span< const CRGB > colors, CRGB colors_scale, u8 global_brightness, fl::span< CRGB > out_colors, fl::span< u8 > out_power_5bit)
Base definition for an LED controller.
Definition crgb.hpp:179
#define FL_NOEXCEPT
Representation of an 8-bit RGB pixel (Red, Green, Blue)
Definition crgb.h:38