pub struct Recalculate { /* private fields */ }Expand description
Motion-vector refinement filter state.
Implementations§
Source§impl Recalculate
impl Recalculate
Sourcepub fn new(
info: VideoInfo,
super_info: SuperClipInfo,
vectors_data: MVAnalysisData,
options: RecalculateOptions,
) -> Result<Self>
pub fn new( info: VideoInfo, super_info: SuperClipInfo, vectors_data: MVAnalysisData, options: RecalculateOptions, ) -> Result<Self>
Builds a recalculation filter from clip, super, and vector metadata.
§Errors
Returns an error if the clip format, super metadata, source vectors, or options are invalid.
Sourcepub const fn analysis_data(&self) -> MVAnalysisData
pub const fn analysis_data(&self) -> MVAnalysisData
Returns metadata for vectors produced by this recalculator.
Sourcepub const fn analysis_data_divided(&self) -> Option<MVAnalysisData>
pub const fn analysis_data_divided(&self) -> Option<MVAnalysisData>
Returns metadata for the divided vector stream when division is enabled.
Sourcepub const fn fields(&self) -> bool
pub const fn fields(&self) -> bool
Returns whether the recalculator is configured for field-based search.
Sourcepub const fn search_type(&self) -> SearchType
pub const fn search_type(&self) -> SearchType
Returns the configured search strategy.
Sourcepub const fn search_param(&self) -> i32
pub const fn search_param(&self) -> i32
Returns the validated search parameter.
Sourcepub const fn penalty_new(&self) -> u16
pub const fn penalty_new(&self) -> u16
Returns the penalty applied to new candidate vectors.
Sourcepub const fn divide_extra(&self) -> DivideMode
pub const fn divide_extra(&self) -> DivideMode
Returns the extra block-division mode.
Sourcepub fn reference_frame_number(&self, n: usize) -> Option<usize>
pub fn reference_frame_number(&self, n: usize) -> Option<usize>
Returns the reference frame index paired with source frame n.
Returns None when the reference would fall outside the source clip.
Sourcepub fn recalculate_frame<T: Pixel>(
&self,
src: &FrameView<'_, T>,
reference: Option<&FrameView<'_, T>>,
vectors_data: &[u8],
src_top_field: Option<bool>,
ref_top_field: Option<bool>,
) -> Result<RecalculateResult>
pub fn recalculate_frame<T: Pixel>( &self, src: &FrameView<'_, T>, reference: Option<&FrameView<'_, T>>, vectors_data: &[u8], src_top_field: Option<bool>, ref_top_field: Option<bool>, ) -> Result<RecalculateResult>
Recalculates one packed vector frame and returns the refined result.
§Errors
Returns an error if the frames, field flags, or packed vectors do not match the filter configuration.
Trait Implementations§
Source§impl Clone for Recalculate
impl Clone for Recalculate
Source§fn clone(&self) -> Recalculate
fn clone(&self) -> Recalculate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more