pub struct QpDeltaMap {
pub cols: usize,
pub rows: usize,
pub deltas: Vec<i8>,
}Expand description
A QP delta map for a single frame, organized by CTU blocks.
Fields§
§cols: usizeNumber of CTU columns.
rows: usizeNumber of CTU rows.
deltas: Vec<i8>QP deltas, stored row-major.
Implementations§
Source§impl QpDeltaMap
impl QpDeltaMap
Sourcepub fn average_delta(&self) -> f64
pub fn average_delta(&self) -> f64
Returns the average delta across the map.
Sourcepub fn active_ctu_count(&self) -> usize
pub fn active_ctu_count(&self) -> usize
Returns the number of CTUs with non-zero deltas.
Sourcepub fn merge_additive(&mut self, other: &Self, max_magnitude: i8)
pub fn merge_additive(&mut self, other: &Self, max_magnitude: i8)
Merges another QP delta map, adding deltas element-wise with clamping.
Trait Implementations§
Source§impl Clone for QpDeltaMap
impl Clone for QpDeltaMap
Source§fn clone(&self) -> QpDeltaMap
fn clone(&self) -> QpDeltaMap
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 QpDeltaMap
impl RefUnwindSafe for QpDeltaMap
impl Send for QpDeltaMap
impl Sync for QpDeltaMap
impl Unpin for QpDeltaMap
impl UnsafeUnpin for QpDeltaMap
impl UnwindSafe for QpDeltaMap
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