pub struct RcOutput {
pub qp: u8,
pub qp_f: f32,
pub target_bits: u64,
pub min_bits: u64,
pub max_bits: u64,
pub drop_frame: bool,
pub force_keyframe: bool,
pub qp_offsets: Option<Vec<f32>>,
pub lambda: f64,
pub lambda_me: f64,
}Expand description
Rate control output for a single frame.
Fields§
§qp: u8Quantization parameter to use.
qp_f: f32QP as floating point (before rounding).
target_bits: u64Target bits for this frame.
min_bits: u64Minimum bits (for underflow prevention).
max_bits: u64Maximum bits (for overflow prevention).
drop_frame: boolWhether to drop this frame.
force_keyframe: boolWhether to force a keyframe.
qp_offsets: Option<Vec<f32>>Block-level QP offsets for AQ.
lambda: f64Lambda for RDO (rate-distortion optimization).
lambda_me: f64Lambda for motion estimation.
Implementations§
Source§impl RcOutput
impl RcOutput
Sourcepub fn qp_to_lambda(qp: f32) -> f64
pub fn qp_to_lambda(qp: f32) -> f64
Calculate lambda from QP using standard formula. Lambda = 0.85 * 2^((QP-12)/3)
Sourcepub fn lambda_to_lambda_me(lambda: f64) -> f64
pub fn lambda_to_lambda_me(lambda: f64) -> f64
Calculate motion estimation lambda from lambda.
Sourcepub fn compute_lambda(&mut self)
pub fn compute_lambda(&mut self)
Set lambda values based on QP.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RcOutput
impl RefUnwindSafe for RcOutput
impl Send for RcOutput
impl Sync for RcOutput
impl Unpin for RcOutput
impl UnsafeUnpin for RcOutput
impl UnwindSafe for RcOutput
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