pub struct FrameState<T: Pixel> {Show 13 fields
pub sb_size_log2: usize,
pub input: Arc<Frame<T>>,
pub input_hres: Arc<Plane<T>>,
pub input_qres: Arc<Plane<T>>,
pub rec: Arc<Frame<T>>,
pub cdfs: CDFContext,
pub context_update_tile_id: usize,
pub max_tile_size_bytes: u32,
pub deblock: DeblockState,
pub segmentation: SegmentationState,
pub restoration: RestorationState,
pub frame_me_stats: Arc<RwLock<[FrameMEStats; 8]>>,
pub enc_stats: EncoderStats,
}
Fields§
§sb_size_log2: usize
§input: Arc<Frame<T>>
§input_hres: Arc<Plane<T>>
§input_qres: Arc<Plane<T>>
§rec: Arc<Frame<T>>
§cdfs: CDFContext
§context_update_tile_id: usize
§max_tile_size_bytes: u32
§deblock: DeblockState
§segmentation: SegmentationState
§restoration: RestorationState
§frame_me_stats: Arc<RwLock<[FrameMEStats; 8]>>
§enc_stats: EncoderStats
Implementations§
Source§impl<T: Pixel> FrameState<T>
impl<T: Pixel> FrameState<T>
pub fn new(fi: &FrameInvariants<T>) -> Self
Sourcepub fn new_with_frame_and_me_stats_and_rec(
fi: &FrameInvariants<T>,
frame: Arc<Frame<T>>,
me_stats: Arc<RwLock<[FrameMEStats; 8]>>,
rec: Arc<Frame<T>>,
) -> Self
pub fn new_with_frame_and_me_stats_and_rec( fi: &FrameInvariants<T>, frame: Arc<Frame<T>>, me_stats: Arc<RwLock<[FrameMEStats; 8]>>, rec: Arc<Frame<T>>, ) -> Self
Similar to FrameState::new_with_frame
, but takes an me_stats
and rec
to enable reusing the same underlying allocations to create
a FrameState
This function primarily exists for [estimate_inter_costs
], and so
it does not create hres or qres versions of frame
as downscaling is
somewhat expensive and are not needed for [estimate_inter_costs
].
pub fn new_with_frame(fi: &FrameInvariants<T>, frame: Arc<Frame<T>>) -> Self
pub fn apply_tile_state_mut<F, R>(&mut self, f: F) -> Rwhere
F: FnOnce(&mut TileStateMut<'_, T>) -> R,
Trait Implementations§
Source§impl<T: Clone + Pixel> Clone for FrameState<T>
impl<T: Clone + Pixel> Clone for FrameState<T>
Source§fn clone(&self) -> FrameState<T>
fn clone(&self) -> FrameState<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T> Freeze for FrameState<T>
impl<T> RefUnwindSafe for FrameState<T>where
T: RefUnwindSafe,
impl<T> Send for FrameState<T>
impl<T> Sync for FrameState<T>
impl<T> Unpin for FrameState<T>
impl<T> UnwindSafe for FrameState<T>where
T: RefUnwindSafe,
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
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>
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