ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_gfx_dither_mask_internal.h File Reference

Void-and-cluster blue-noise threshold mask for the e-ink dither (#477). More...

#include <stdint.h>
Include dependency graph for ra8_gfx_dither_mask_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Variables

static const uint8_t s_ra8_gfx_dither_mask []
 64x64 row-major blue-noise threshold texture (4096 bytes).

Detailed Description

Void-and-cluster blue-noise threshold mask for the e-ink dither (#477).

@generated by scripts/gen/gen_bluenoise_mask.py (just tools::bluenoise_update); do not hand-edit. Bakes the 64x64 blue-noise threshold texture ra8_gfx_dither.c thresholds gray8 samples against to quantise them to the panel's 16 gray levels without banding.

Each byte is a threshold in [0, 255], blue-noise distributed so that the level set {mask < t} is a high-frequency (void-and-cluster) dot pattern for every t – the property that gives smooth, grain-only dithering with no Bayer cross-hatch. The table is indexed toroidally by (y & 63) * 64 + (x & 63) at absolute panel coordinates, so abutting tiles share one continuous mask phase and never seam. Included by exactly one translation unit (ra8_gfx_dither.c); static keeps it a single private definition.

Since
0.1.0

Definition in file ra8_gfx_dither_mask_internal.h.

Variable Documentation

◆ s_ra8_gfx_dither_mask

const uint8_t s_ra8_gfx_dither_mask[]
static

64x64 row-major blue-noise threshold texture (4096 bytes).

Generated; read-only. Entry [(y & 63) * 64 + (x & 63)] is the [0, 255] dither threshold for panel pixel (x, y). Do not modify – regenerate via the script above.

Note
Generated, build-only data; not hand-authored.
Since
0.1.0

Definition at line 37 of file ra8_gfx_dither_mask_internal.h.

Referenced by internal_pack_tile(), ra8_gfx_blit_gray8_dither(), and ra8_gfx_dither_gray4_level().