pub struct FrameMetrics {
pub width: usize,
pub height: usize,
pub total_bits: u64,
pub qp_values: Vec<u8>,
pub avg_qp: f64,
pub psnr: f64,
pub ssim: f64,
pub encoding_time: Duration,
}Expand description
Frame-level metrics.
Fields§
§width: usizeFrame width.
height: usizeFrame height.
total_bits: u64Total bits used.
qp_values: Vec<u8>QP values used.
avg_qp: f64Average QP.
psnr: f64PSNR.
ssim: f64SSIM.
encoding_time: DurationEncoding time.
Implementations§
Source§impl FrameMetrics
impl FrameMetrics
Sourcepub fn set_encoding_time(&mut self, duration: Duration)
pub fn set_encoding_time(&mut self, duration: Duration)
Sets encoding time.
Sourcepub fn bits_per_pixel(&self) -> f64
pub fn bits_per_pixel(&self) -> f64
Calculates bits per pixel.
Sourcepub fn encoding_fps(&self) -> f64
pub fn encoding_fps(&self) -> f64
Calculates encoding speed in FPS.
Trait Implementations§
Source§impl Clone for FrameMetrics
impl Clone for FrameMetrics
Source§fn clone(&self) -> FrameMetrics
fn clone(&self) -> FrameMetrics
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 FrameMetrics
impl Debug for FrameMetrics
Source§impl Default for FrameMetrics
impl Default for FrameMetrics
Source§fn default() -> FrameMetrics
fn default() -> FrameMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FrameMetrics
impl RefUnwindSafe for FrameMetrics
impl Send for FrameMetrics
impl Sync for FrameMetrics
impl Unpin for FrameMetrics
impl UnsafeUnpin for FrameMetrics
impl UnwindSafe for FrameMetrics
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