pub struct OptimizationStats {
pub frames_encoded: usize,
pub total_time: Duration,
pub frame_metrics: Vec<FrameMetrics>,
pub total_bits: u64,
pub avg_psnr: f64,
pub avg_ssim: f64,
}Expand description
Optimization statistics.
Fields§
§frames_encoded: usizeNumber of frames encoded.
total_time: DurationTotal encoding time.
frame_metrics: Vec<FrameMetrics>Per-frame metrics.
total_bits: u64Total bits used.
avg_psnr: f64Average PSNR.
avg_ssim: f64Average SSIM.
Implementations§
Source§impl OptimizationStats
impl OptimizationStats
Sourcepub fn add_frame(&mut self, metrics: FrameMetrics)
pub fn add_frame(&mut self, metrics: FrameMetrics)
Adds frame metrics.
Sourcepub fn avg_bitrate(&self, fps: f64) -> f64
pub fn avg_bitrate(&self, fps: f64) -> f64
Calculates average bitrate in bits per second.
Sourcepub fn compression_ratio(&self) -> f64
pub fn compression_ratio(&self) -> f64
Gets compression ratio.
Sourcepub fn print_summary(&self)
pub fn print_summary(&self)
Prints summary.
Trait Implementations§
Source§impl Clone for OptimizationStats
impl Clone for OptimizationStats
Source§fn clone(&self) -> OptimizationStats
fn clone(&self) -> OptimizationStats
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 moreSource§impl Debug for OptimizationStats
impl Debug for OptimizationStats
Source§impl Default for OptimizationStats
impl Default for OptimizationStats
Source§fn default() -> OptimizationStats
fn default() -> OptimizationStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OptimizationStats
impl RefUnwindSafe for OptimizationStats
impl Send for OptimizationStats
impl Sync for OptimizationStats
impl Unpin for OptimizationStats
impl UnsafeUnpin for OptimizationStats
impl UnwindSafe for OptimizationStats
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> 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