pub struct SegmentationParams {
pub enabled: bool,
pub update_map: bool,
pub temporal_update: bool,
pub update_data: bool,
pub feature_enabled: [[bool; 8]; 8],
pub feature_data: [[i16; 8]; 8],
pub last_active_seg_id: u8,
}Expand description
Segmentation parameters.
Fields§
§enabled: boolSegmentation enabled.
update_map: boolUpdate the segmentation map.
temporal_update: boolTemporal update for segmentation.
update_data: boolUpdate segment data.
feature_enabled: [[bool; 8]; 8]Segment feature enabled flags.
feature_data: [[i16; 8]; 8]Segment feature data values.
last_active_seg_id: u8Last active segment ID.
Implementations§
Source§impl SegmentationParams
impl SegmentationParams
Sourcepub const SEG_LVL_ALT_Q: usize = 0
pub const SEG_LVL_ALT_Q: usize = 0
Segment feature index for ALT_Q (quantizer delta).
Sourcepub const SEG_LVL_ALT_LF_Y_V: usize = 1
pub const SEG_LVL_ALT_LF_Y_V: usize = 1
Segment feature index for ALT_LF_Y_V (loop filter delta Y vertical).
Sourcepub const SEG_LVL_ALT_LF_Y_H: usize = 2
pub const SEG_LVL_ALT_LF_Y_H: usize = 2
Segment feature index for ALT_LF_Y_H (loop filter delta Y horizontal).
Sourcepub const SEG_LVL_ALT_LF_U: usize = 3
pub const SEG_LVL_ALT_LF_U: usize = 3
Segment feature index for ALT_LF_U (loop filter delta U).
Sourcepub const SEG_LVL_ALT_LF_V: usize = 4
pub const SEG_LVL_ALT_LF_V: usize = 4
Segment feature index for ALT_LF_V (loop filter delta V).
Sourcepub const SEG_LVL_REF_FRAME: usize = 5
pub const SEG_LVL_REF_FRAME: usize = 5
Segment feature index for REF_FRAME (reference frame).
Sourcepub const SEG_LVL_SKIP: usize = 6
pub const SEG_LVL_SKIP: usize = 6
Segment feature index for SKIP (skip mode).
Sourcepub const SEG_LVL_GLOBALMV: usize = 7
pub const SEG_LVL_GLOBALMV: usize = 7
Segment feature index for GLOBALMV (global motion).
Sourcepub const SEG_FEATURE_DATA_MAX: [i16; 8]
pub const SEG_FEATURE_DATA_MAX: [i16; 8]
Maximum values for each segment feature.
Sourcepub const SEG_FEATURE_DATA_SIGNED: [bool; 8]
pub const SEG_FEATURE_DATA_SIGNED: [bool; 8]
Whether each segment feature is signed.
Sourcepub const SEG_FEATURE_BITS: [u8; 8]
pub const SEG_FEATURE_BITS: [u8; 8]
Number of bits for each segment feature.
Sourcepub fn get_feature(&self, segment_id: usize, feature: usize) -> i16
pub fn get_feature(&self, segment_id: usize, feature: usize) -> i16
Get a segment feature value.
Sourcepub fn is_feature_enabled(&self, segment_id: usize, feature: usize) -> bool
pub fn is_feature_enabled(&self, segment_id: usize, feature: usize) -> bool
Check if a segment feature is enabled.
Trait Implementations§
Source§impl Clone for SegmentationParams
impl Clone for SegmentationParams
Source§fn clone(&self) -> SegmentationParams
fn clone(&self) -> SegmentationParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SegmentationParams
impl Debug for SegmentationParams
Source§impl Default for SegmentationParams
impl Default for SegmentationParams
Source§fn default() -> SegmentationParams
fn default() -> SegmentationParams
Auto Trait Implementations§
impl Freeze for SegmentationParams
impl RefUnwindSafe for SegmentationParams
impl Send for SegmentationParams
impl Sync for SegmentationParams
impl Unpin for SegmentationParams
impl UnsafeUnpin for SegmentationParams
impl UnwindSafe for SegmentationParams
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