Skip to main content

MIN_GROUND_SHARE

Constant MIN_GROUND_SHARE 

Source
pub const MIN_GROUND_SHARE: f32 = _; // 0.0625f32
Expand description

Minimum share of a frame that its modal luminance band must hold before that band is called a ground.

Derived, not tuned. A uniform luminance distribution puts exactly 1 / TONE_BANDS of the frame in each band, so a modal band holding no more than that share is the definition of no band is dominant — there is nothing to call a ground, and modal_ground returns NO_GROUND.

It is a floor on a maximum, so it is inert against real content, and that is the honest reading of it. The largest of TONE_BANDS counts is at least their mean, with equality only for a perfectly flat histogram, so this fires only on a frame whose luminance is near-exactly uniform. Measured over the shipped library at LOUD (Plan 0116 Phase 3, 2026-08-26): the smallest modal band share is Clifford’s 0.1590, two and a half times this line, and no shipped preset falls back. The rule defines the boundary case rather than reaching any content — which is what Phase 3 asked for, a behaviour defined in code rather than discovered later.