Skip to main content

Recalculate

Struct Recalculate 

Source
pub struct Recalculate { /* private fields */ }
Expand description

Motion-vector refinement filter state.

Implementations§

Source§

impl Recalculate

Source

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.

Source

pub const fn analysis_data(&self) -> MVAnalysisData

Returns metadata for vectors produced by this recalculator.

Source

pub const fn analysis_data_divided(&self) -> Option<MVAnalysisData>

Returns metadata for the divided vector stream when division is enabled.

Source

pub const fn fields(&self) -> bool

Returns whether the recalculator is configured for field-based search.

Source

pub const fn search_type(&self) -> SearchType

Returns the configured search strategy.

Source

pub const fn search_param(&self) -> i32

Returns the validated search parameter.

Source

pub const fn lambda(&self) -> u32

Returns the motion penalty scale.

Source

pub const fn penalty_new(&self) -> u16

Returns the penalty applied to new candidate vectors.

Source

pub const fn dct_mode(&self) -> DctMode

Returns the configured block-matching metric.

Source

pub const fn divide_extra(&self) -> DivideMode

Returns the extra block-division mode.

Source

pub const fn smooth(&self) -> bool

Returns whether temporal smoothing is enabled.

Source

pub const fn meander(&self) -> bool

Returns whether meander traversal is enabled.

Source

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.

Source

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

Source§

fn clone(&self) -> Recalculate

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Recalculate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.