pub struct MotionEstimator { /* private fields */ }Expand description
GPU-accelerated motion estimator.
Implementations§
Source§impl MotionEstimator
impl MotionEstimator
Sourcepub fn new(config: MotionEstimationConfig) -> Self
pub fn new(config: MotionEstimationConfig) -> Self
Create a new motion estimator with the given configuration.
Sourcepub fn av1_default() -> Self
pub fn av1_default() -> Self
Create a motion estimator with default AV1 settings.
Sourcepub fn vp9_default() -> Self
pub fn vp9_default() -> Self
Create a motion estimator with default VP9 settings.
Sourcepub fn estimate(
&self,
device: &GpuDevice,
reference: &[u8],
current: &[u8],
width: u32,
height: u32,
) -> Result<FrameMvResult>
pub fn estimate( &self, device: &GpuDevice, reference: &[u8], current: &[u8], width: u32, height: u32, ) -> Result<FrameMvResult>
Estimate motion vectors between a reference frame and a current frame.
Both frames must be packed luma-only (one byte per pixel) with
width × height bytes each.
§Errors
Returns an error if dimensions are mismatched or buffers are too small.
Auto Trait Implementations§
impl Freeze for MotionEstimator
impl RefUnwindSafe for MotionEstimator
impl Send for MotionEstimator
impl Sync for MotionEstimator
impl Unpin for MotionEstimator
impl UnsafeUnpin for MotionEstimator
impl UnwindSafe for MotionEstimator
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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