Generate HD108 per-channel gain header bytes.
- Parameters
-
| brightness_8bit | 8-bit brightness (0-255) - UNUSED, kept for API compatibility |
| f0_out | Output: first header byte |
| f1_out | Output: second header byte |
- Note
- HD108 uses per-channel gain encoding: 5 bits each for R/G/B
-
All gains set to maximum (31) for maximum precision
-
Brightness control via 16-bit PWM values (applied before encoding)
-
Future: Per channel gain control for higher color range
Definition at line 80 of file encoder_utils.h.
80 {
81 (void)brightness_8bit;
82
83
84
85 constexpr u8 r_gain = 31;
86 constexpr u8 g_gain = 31;
87 constexpr u8 b_gain = 31;
88
89
90
91
92 *f0_out = 0x80 | ((r_gain & 0x1F) << 2) | ((g_gain >> 3) & 0x03);
93 *f1_out = ((g_gain & 0x07) << 5) | (b_gain & 0x1F);
94}
References FL_NOEXCEPT.
Referenced by encodeHD108(), and encodeHD108_HD().