Revert to same quantization thresholds as in upstream

This commit is contained in:
jpirnay
2026-05-07 20:25:57 +02:00
parent ce9e0d83ec
commit 1ca18c4575
2 changed files with 17 additions and 20 deletions
+1 -4
View File
@@ -52,11 +52,8 @@ int adjustPixel(int gray) {
return gray;
}
// Simple quantization without dithering — evenly-spaced midpoint thresholds for factory LUT
// Simple quantization without dithering — thresholds tuned to X4 display brightness
uint8_t quantizeSimple(int gray) {
// Midpoint thresholds for 4 levels would be: 0-63=0, 64-127=1, 128-191=2, 192-255=3
// Crosspoint thresholds for 4 levels: 0-44=0, 45-69=1, 70-139=2, 140-255=3
// (slightly brighter to compensate for quantization)
if (gray < 45) {
return 0;
} else if (gray < 70) {