vanvught / rpidmx512

Orange Pi DMX512 / RDM / MIDI / OSC / Art-Net / WS28xx / L6470 / Stepper / TLC59711 / PCA9685 / Servo / PWM / TCNet / SMPTE / RDMNet / LLRP / GD32 / GigaDevice / Raspberry Pi
http://www.orangepi-dmx.org/
MIT License
391 stars 109 forks source link

Pixel: Add support for Gamma correction tables #249

Closed vanvught closed 2 years ago

vanvught commented 2 years ago

The user can enable default Gamma correction tables or set their own table. Provided table's are with Gamma value's: [2.0 - 2.5]

inline static const uint8_t *get_table_default(const pixel::Type type) {
    if (type == pixel::Type::WS2801) {
        return gamma25_0;
    }

    if ((type == pixel::Type::APA102) || (type == pixel::Type::SK9822)) {
        return gamma25_5;
    }

    if (type == pixel::Type::P9813) {
        return gamma10_0;
    }

    return gamma22_0;
}

Schermafbeelding 2022-07-22 om 20 19 11