9 for (uint16_t i = 0; i < 256; i++) {
11 auto corrected = to_uint8_scale(
gamma_correct(i / 255.0f, gamma));
15 for (uint16_t i = 0; i < 256; i++)
19 for (uint16_t i = 0; i < 256; i++) {
21 auto uncorrected = to_uint8_scale(powf(i / 255.0f, 1.0f / gamma));
void calculate_gamma_table(float gamma)
float gamma_correct(float value, float gamma)
Applies gamma correction of gamma to value.
uint8_t gamma_reverse_table_[256]
uint8_t gamma_table_[256]
Implementation of SPI Controller mode.