Release 0.13.1

This commit is contained in:
matze19999 committed 2026-10-12 18:11:51 +02:00
1 parent c0d891b372
commit c3040680a0
14 files changed
+58 -10

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#ifndef HYPERDRM_DARK_COLOR_H
#define HYPERDRM_DARK_COLOR_H
/* Suppress near-black histogram residuals without changing channel ratios.
* Apply only to fresh histogram colors, before continuity and interpolation. */
static inline void dark_color_filter(unsigned char color[3]) {
unsigned peak = color[0];
for (unsigned c = 1; c < 3; c++)
if (color[c] > peak)
peak = color[c];
if (peak >= 24)
return;
unsigned gain = peak > 12 ? peak - 12 : 0;
for (unsigned c = 0; c < 3; c++)
color[c] = (unsigned char)((color[c] * gain + 6) / 12);
}
#endif