pub struct FrameAllocation {
pub target_bits: u64,
pub min_bits: u64,
pub max_bits: u64,
pub qp_adjustment: f64,
}Expand description
Bit allocation result for a single frame.
Fields§
§target_bits: u64Target bits for the frame.
min_bits: u64Minimum acceptable bits.
max_bits: u64Maximum allowed bits.
qp_adjustment: f64Suggested QP adjustment from base.
Implementations§
Source§impl FrameAllocation
impl FrameAllocation
Sourcepub fn clamp_bits(&self, actual_bits: u64) -> u64
pub fn clamp_bits(&self, actual_bits: u64) -> u64
Clamp actual bits to acceptable range.
Sourcepub fn is_within_range(&self, actual_bits: u64) -> bool
pub fn is_within_range(&self, actual_bits: u64) -> bool
Check if actual bits are within acceptable range.
Trait Implementations§
Source§impl Clone for FrameAllocation
impl Clone for FrameAllocation
Source§fn clone(&self) -> FrameAllocation
fn clone(&self) -> FrameAllocation
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 FrameAllocation
impl RefUnwindSafe for FrameAllocation
impl Send for FrameAllocation
impl Sync for FrameAllocation
impl Unpin for FrameAllocation
impl UnsafeUnpin for FrameAllocation
impl UnwindSafe for FrameAllocation
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