pub struct SceneAdaptiveConfig {
pub target_bitrate: u64,
pub frame_rate: f64,
pub scene_cut_threshold: f32,
pub min_scene_frames: u32,
pub max_per_frame_ratio: f32,
pub min_per_frame_ratio: f32,
}Expand description
Configuration for the scene-adaptive allocator.
Fields§
§target_bitrate: u64Target average bitrate in bits per second.
frame_rate: f64Frame rate (frames per second).
scene_cut_threshold: f32SAD threshold for scene-cut detection (fraction of pixels that must differ; 0.0–1.0). Defaults to 0.15.
min_scene_frames: u32Minimum scene length in frames before another cut is allowed. Prevents very short “flash” scenes from dominating allocation.
max_per_frame_ratio: f32Maximum bit-allocation ratio per frame (clamp against wild swings). Default: 4.0 × average.
min_per_frame_ratio: f32Minimum bit-allocation ratio per frame. Default: 0.1 × average.
Implementations§
Source§impl SceneAdaptiveConfig
impl SceneAdaptiveConfig
Sourcepub fn avg_bits_per_frame(&self) -> f64
pub fn avg_bits_per_frame(&self) -> f64
Average bits per frame at the target bitrate and frame rate.
Trait Implementations§
Source§impl Clone for SceneAdaptiveConfig
impl Clone for SceneAdaptiveConfig
Source§fn clone(&self) -> SceneAdaptiveConfig
fn clone(&self) -> SceneAdaptiveConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SceneAdaptiveConfig
impl Debug for SceneAdaptiveConfig
Auto Trait Implementations§
impl Freeze for SceneAdaptiveConfig
impl RefUnwindSafe for SceneAdaptiveConfig
impl Send for SceneAdaptiveConfig
impl Sync for SceneAdaptiveConfig
impl Unpin for SceneAdaptiveConfig
impl UnsafeUnpin for SceneAdaptiveConfig
impl UnwindSafe for SceneAdaptiveConfig
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