#[non_exhaustive]pub enum ConversionPrecision {
Standard,
High,
}Expand description
The swscale precision tier for the conversion stage.
The extractor runs any resize plus the pixel-format conversion as ONE
swscale pass, and this tier sets that pass’s scaler flags — so it affects
resized output too, not only the YUV → RGB step. Color interpretation —
which matrix and range are applied (ColorPolicy) — is identical in
both tiers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Standard
The FFmpeg CLI’s default swscale configuration (flags=bicubic, no
extra precision flags). This keeps swscale eligible for its fastest
converters — including the unscaled yuv420p → rgb24 special case — and
matches the bytes an ffmpeg -vf "scale=..,format=.." run with default
flags produces. This is the default.
High
Adds accurate_rnd+full_chroma_int: accurate rounding plus full
horizontal chroma interpolation. Relative to
Standard the mean difference is a
couple of steps per 8-bit channel; individual pixels on sharp chroma
edges can differ by more, because the two tiers reconstruct subsampled
chroma differently — and accurate_rnd also changes rounding on
resized output, including single-plane formats like gray. The flags
disable swscale’s unscaled fast-path converters, which multiplies the
conversion cost several-fold (at 1080p the conversion, not the decode,
becomes the bottleneck). Opt in when the last bit of rounding and
chroma reconstruction matters more than throughput — e.g. quality
metrics or golden-reference pipelines. v0.14.0 applied exactly these
flags unconditionally, so High also reproduces v0.14.0 output,
byte-identical when linked against the same libswscale build.
Trait Implementations§
Source§impl Clone for ConversionPrecision
impl Clone for ConversionPrecision
Source§fn clone(&self) -> ConversionPrecision
fn clone(&self) -> ConversionPrecision
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ConversionPrecision
Source§impl Debug for ConversionPrecision
impl Debug for ConversionPrecision
Source§impl Default for ConversionPrecision
impl Default for ConversionPrecision
Source§fn default() -> ConversionPrecision
fn default() -> ConversionPrecision
impl Eq for ConversionPrecision
Source§impl PartialEq for ConversionPrecision
impl PartialEq for ConversionPrecision
impl StructuralPartialEq for ConversionPrecision
Auto Trait Implementations§
impl Freeze for ConversionPrecision
impl RefUnwindSafe for ConversionPrecision
impl Send for ConversionPrecision
impl Sync for ConversionPrecision
impl Unpin for ConversionPrecision
impl UnsafeUnpin for ConversionPrecision
impl UnwindSafe for ConversionPrecision
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.