pub struct PassOneResult {
pub complexity_map: Vec<f64>,
pub avg_complexity: f64,
pub peak_complexity: f64,
pub duration_analyzed_ms: u64,
}Expand description
Results from the first pass of a two-pass encode.
Fields§
§complexity_map: Vec<f64>Per-frame complexity scores (0.0 = very simple, 1.0 = very complex).
avg_complexity: f64Mean complexity across all analyzed frames.
peak_complexity: f64Peak (maximum) complexity observed.
duration_analyzed_ms: u64How many milliseconds of content were analyzed.
Implementations§
Source§impl PassOneResult
impl PassOneResult
Sourcepub fn allocate_bits(&self, frame_idx: usize, total_bits: u64) -> u64
pub fn allocate_bits(&self, frame_idx: usize, total_bits: u64) -> u64
Allocates a bit count for the frame at frame_idx from the total bit budget.
Frames with higher complexity receive proportionally more bits. Falls back to an equal allocation if the sum of complexities is zero.
Sourcepub fn is_complex_region(&self, idx: usize) -> bool
pub fn is_complex_region(&self, idx: usize) -> bool
Returns true if the frame at frame_idx is in a complex region.
A region is considered complex if its complexity score is above the average by more than one standard deviation.
Sourcepub fn complex_region_fraction(&self) -> f64
pub fn complex_region_fraction(&self) -> f64
Returns the fraction of frames classified as complex regions.
Trait Implementations§
Source§impl Clone for PassOneResult
impl Clone for PassOneResult
Source§fn clone(&self) -> PassOneResult
fn clone(&self) -> PassOneResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PassOneResult
impl RefUnwindSafe for PassOneResult
impl Send for PassOneResult
impl Sync for PassOneResult
impl Unpin for PassOneResult
impl UnsafeUnpin for PassOneResult
impl UnwindSafe for PassOneResult
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more