Video Dithering
Video dithering varies quantization decisions across positions or time so rounding error is less likely to form coherent visible bands.
Suppose an output representation has only integer codes, but a calculated picture region needs 2.25. Rounding every position to 2 creates a uniform region whose stored average is 2. A pattern containing twelve positions at 2 and four at 3 has an average of:
(12 × 2 + 4 × 3) / 16 = 2.25.
Each position still uses a valid output code. The area contains a finer distribution of rounding choices instead of all positions making the same choice. Dithering uses that idea to reduce the coherent error that can turn gentle gradients into visible bands.

The two lower strips both have only 16 permitted gray levels. Dithering changes where those levels occur. View the original image at full size to see the fine pattern.
A threshold example you can calculate
An ordered dither assigns different thresholds to positions in a small repeating grid. For the 16-position example, choose thresholds (k + 0.5)/16 for k = 0 through 15, arranged across the grid.
Compare the fractional part 0.25 with each threshold. Exactly four thresholds are below 0.25. At those positions, choose the upper code 3; at the other twelve, choose the lower code 2. The desired sample average follows directly from the number of upper choices.
The figure uses a four-by-four threshold arrangement and a deliberately coarse output grid. A slowly increasing input changes the proportion of upper choices within a neighborhood, giving it more gradual average changes than the uniform rounded plateaus.
These are averages of encoded component values. The corresponding average display light also depends on the transfer relationship and reconstruction. The illustration demonstrates the quantizer's decision, rather than promising an exact light average for every video transfer function.
Different ways to distribute error
| Approach | How it makes the decisions | Character of the result |
|---|---|---|
| Ordered thresholds | Uses a spatial threshold arrangement | Repeatable fine pattern; the arrangement determines its texture |
| Randomized dither | Perturbs thresholds or values using a noise process | Noise-like variation whose spatial and temporal design matters |
| Error diffusion | Carries a quantization error into later decisions | Local choices compensate for earlier errors |
Each approach replaces a large correlated error pattern with another distribution of error. That distribution matters: a visible repeating texture or distracting temporal shimmer can be less desirable than the bands being reduced. Dither design concerns where the error's energy appears as well as how much error is present.
FFmpeg's scaler and zscale offer documented dither choices, with different available methods. Their names describe implementation options; the arithmetic grid above is an independent illustration, not a reproduction of an Emby preset or a claim about a particular filter's default.
The rounding boundary is the useful place
Dithering is most useful when a stage still has intermediate values to decide between output codes. For example, a tone-mapping operation can calculate a high-precision gradient and then dither its conversion to an 8-bit output.
If the input is already a flat plateau, simply adding variation does not reveal its lost original gradient. Debanding and precision preservation address different parts of that problem. Likewise, promoting a dithered 8-bit output to 10 bits preserves its existing pattern rather than recovering earlier sample values.
In an Emby conversion, the relevant question is where precision is reduced relative to filtering and encoding. A lossy encoder can suppress the fine variations, or spend some of its budget preserving them. An effective result depends on the combined processing and encoding path. Inspect a decoded output gradient at its intended viewing size: the purpose is a smoother-looking transition with an acceptable texture, not a larger count of distinct codes for its own sake.