Skip to main content

VideoEncodeFrameMetrics

Struct VideoEncodeFrameMetrics 

Source
pub struct VideoEncodeFrameMetrics<'a> {
    pub frame_idx: usize,
    pub frame_count: Option<usize>,
    pub bitstream_bytes: usize,
    pub total_bitstream_bytes: usize,
    pub encode_elapsed: Duration,
    pub psnr: Option<FramePsnr>,
    pub source: &'a [u8],
    pub reconstruction: &'a [u8],
}
Expand description

Per-frame metrics passed to source-driven encode callbacks.

Fields§

§frame_idx: usize

Zero-based frame index.

§frame_count: Option<usize>

Optional total frame count when known by the caller.

§bitstream_bytes: usize

Encoded bytes produced by this frame.

§total_bitstream_bytes: usize

Encoded bytes produced by all reported frames through this frame.

§encode_elapsed: Duration

Wall time spent encoding this frame after the source frame was read.

§psnr: Option<FramePsnr>

PSNR for this frame when reconstruction metrics were requested.

§source: &'a [u8]

Source frame bytes for metric calculations.

§reconstruction: &'a [u8]

Reconstructed frame bytes for metric calculations.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.