pub struct InterConfig {
reorder: bool,
pub(crate) multiref: bool,
pub(crate) pyramid_depth: u64,
pub(crate) group_input_len: u64,
group_output_len: u64,
pub(crate) switch_frame_interval: u64,
}
Expand description
The set of options that controls frame re-ordering and reference picture selection. The options stored here are invariant over the whole encode.
Fields§
§reorder: bool
Whether frame re-ordering is enabled.
multiref: bool
Whether P-frames can use multiple references.
pyramid_depth: u64
The depth of the re-ordering pyramid. The current code cannot support values larger than 2.
group_input_len: u64
Number of input frames in group.
group_output_len: u64
Number of output frames in group. This includes both hidden frames and “show existing frame” frames.
switch_frame_interval: u64
Interval between consecutive S-frames. Keyframes reset this interval. This MUST be a multiple of group_input_len.
Implementations§
Source§impl InterConfig
impl InterConfig
pub(crate) fn new(enc_config: &EncoderConfig) -> InterConfig
Sourcepub(crate) fn get_idx_in_group_output(&self, output_frameno_in_gop: u64) -> u64
pub(crate) fn get_idx_in_group_output(&self, output_frameno_in_gop: u64) -> u64
Get the index of an output frame in its re-ordering group given the output frame number of the frame in the current keyframe gop. When re-ordering is disabled, this always returns 0.
Sourcepub(crate) fn get_order_hint(
&self,
output_frameno_in_gop: u64,
idx_in_group_output: u64,
) -> u32
pub(crate) fn get_order_hint( &self, output_frameno_in_gop: u64, idx_in_group_output: u64, ) -> u32
Get the order-hint of an output frame given the output frame number of the frame in the current keyframe gop and the index of that output frame in its re-ordering gorup.
Sourcepub(crate) const fn get_level(&self, idx_in_group_output: u64) -> u64
pub(crate) const fn get_level(&self, idx_in_group_output: u64) -> u64
Get the level of the current frame in the pyramid.
pub(crate) const fn get_slot_idx(&self, level: u64, order_hint: u32) -> u32
pub(crate) const fn get_show_frame(&self, idx_in_group_output: u64) -> bool
pub(crate) const fn get_show_existing_frame( &self, idx_in_group_output: u64, ) -> bool
pub(crate) fn get_input_frameno( &self, output_frameno_in_gop: u64, gop_input_frameno_start: u64, ) -> u64
const fn max_reordering_latency(&self) -> u64
pub(crate) const fn keyframe_lookahead_distance(&self) -> u64
pub(crate) const fn allowed_ref_frames(&self) -> &[RefType]
Trait Implementations§
Source§impl Clone for InterConfig
impl Clone for InterConfig
Source§fn clone(&self) -> InterConfig
fn clone(&self) -> InterConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for InterConfig
impl Debug for InterConfig
impl Copy for InterConfig
Auto Trait Implementations§
impl Freeze for InterConfig
impl RefUnwindSafe for InterConfig
impl Send for InterConfig
impl Sync for InterConfig
impl Unpin for InterConfig
impl UnwindSafe for InterConfig
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
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>
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>
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