MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / quantize

Function quantize

lib/GfxRenderer/BitmapHelpers.cpp:87–93  ·  view source on GitHub ↗

Main quantization function - selects between methods based on config

Source from the content-addressed store, hash-verified

85
86// Main quantization function - selects between methods based on config
87uint8_t quantize(int gray, int x, int y) {
88 if (USE_NOISE_DITHERING) {
89 return quantizeNoise(gray, x, y);
90 } else {
91 return quantizeSimple(gray);
92 }
93}
94
95// 1-bit noise dithering for fast home screen rendering
96// Uses hash-based noise for consistent dithering that works well at small sizes

Callers 4

writeOutputRowFunction · 0.85
flushScaledRowFunction · 0.85
readNextRowMethod · 0.85

Calls 2

quantizeNoiseFunction · 0.85
quantizeSimpleFunction · 0.85

Tested by

no test coverage detected