#[non_exhaustive]pub enum Downscale {
Off,
Half,
Quarter,
Eighth,
}Expand description
How much an image is reduced in each direction.
Reduction averages blocks of converted pixels inside the row loop, so a
thumbnail of a full-size frame never holds a full-size image. The image
is ceil(width / f) by ceil(height / f), where f is 2, 4 or 8; a block at
the right or bottom edge averages only the pixels it has. Averages are
taken on code values, as previews usually are, and round half up. With
alpha kept, color is weighted by alpha, so transparent pixels do not
darken edges; a block that is transparent throughout takes the plain mean.
Color channels are treated as straight (not premultiplied by alpha), as
the NDI SDK
documents for BGRA and RGBA. This is an encoder assumption for UYVA, PA16,
NB48 and NB4G; see AlphaMode::Keep.
It serves frames that arrive full size: from a FrameSync, from receivers
with ReceiverOptions::high_quality_preset, and frames being sent. A
ReceiverOptions::snapshot_preset receiver already gets the source’s
smaller preview stream.
This enum is marked #[non_exhaustive] so that factors can be added
without a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Off
Full size.
Half
Half the width and height: 2×2 blocks.
Quarter
A quarter of the width and height: 4×4 blocks.
Eighth
An eighth of the width and height: 8×8 blocks.