pub struct BlockMaskStats {
pub mean_luma: f32,
pub luma_variance: f32,
pub motion_sad: f32,
pub edge_energy: f32,
pub block_area: u32,
}Expand description
Per-block statistics gathered during analysis (before encoding).
Fields§
§mean_luma: f32Mean luma value of the block (0–255).
luma_variance: f32Spatial variance of luma values (proxy for texture energy).
motion_sad: f32Sum of absolute differences from motion estimation (temporal activity).
edge_energy: f32Edge energy (e.g. Sobel gradient magnitude sum over the block).
block_area: u32Number of pixels in the block.
Implementations§
Source§impl BlockMaskStats
impl BlockMaskStats
Sourcepub fn from_luma_block(pixels: &[u8]) -> Self
pub fn from_luma_block(pixels: &[u8]) -> Self
Create stats from a raw luma block slice.
pixels should be a row-major luma block (e.g. 8×8 = 64 elements, 0–255).
Trait Implementations§
Source§impl Clone for BlockMaskStats
impl Clone for BlockMaskStats
Source§fn clone(&self) -> BlockMaskStats
fn clone(&self) -> BlockMaskStats
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 BlockMaskStats
impl Debug for BlockMaskStats
Source§impl Default for BlockMaskStats
impl Default for BlockMaskStats
Source§fn default() -> BlockMaskStats
fn default() -> BlockMaskStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BlockMaskStats
impl RefUnwindSafe for BlockMaskStats
impl Send for BlockMaskStats
impl Sync for BlockMaskStats
impl Unpin for BlockMaskStats
impl UnsafeUnpin for BlockMaskStats
impl UnwindSafe for BlockMaskStats
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