pub struct Optimizer { /* private fields */ }Expand description
Main optimization engine.
Integrates RDO, psychovisual analysis, motion optimization, adaptive quantization, ROI encoding, and temporal AQ into a unified pipeline.
Implementations§
Source§impl Optimizer
impl Optimizer
Sourcepub fn new(config: OptimizerConfig) -> OxiResult<Self>
pub fn new(config: OptimizerConfig) -> OxiResult<Self>
Creates a new optimizer with the given configuration.
Sourcepub fn config(&self) -> &OptimizerConfig
pub fn config(&self) -> &OptimizerConfig
Gets the optimizer configuration.
Sourcepub fn rdo_engine(&self) -> &RdoEngine
pub fn rdo_engine(&self) -> &RdoEngine
Gets the RDO engine.
Sourcepub fn psycho_analyzer(&self) -> &PsychoAnalyzer
pub fn psycho_analyzer(&self) -> &PsychoAnalyzer
Gets the psychovisual analyzer.
Sourcepub fn motion_optimizer(&self) -> &MotionOptimizer
pub fn motion_optimizer(&self) -> &MotionOptimizer
Gets the motion optimizer.
Sourcepub fn aq_engine_mut(&mut self) -> &mut AqEngine
pub fn aq_engine_mut(&mut self) -> &mut AqEngine
Gets a mutable reference to the adaptive quantization engine.
Sourcepub fn roi_encoder(&self) -> Option<&RoiEncoder>
pub fn roi_encoder(&self) -> Option<&RoiEncoder>
Gets the ROI encoder, if enabled.
Sourcepub fn roi_encoder_mut(&mut self) -> Option<&mut RoiEncoder>
pub fn roi_encoder_mut(&mut self) -> Option<&mut RoiEncoder>
Gets a mutable reference to the ROI encoder, if enabled.
Sourcepub fn temporal_aq_bridge(&self) -> Option<&TemporalAqBridge>
pub fn temporal_aq_bridge(&self) -> Option<&TemporalAqBridge>
Gets the temporal AQ bridge, if enabled.
Sourcepub fn temporal_aq_bridge_mut(&mut self) -> Option<&mut TemporalAqBridge>
pub fn temporal_aq_bridge_mut(&mut self) -> Option<&mut TemporalAqBridge>
Gets a mutable reference to the temporal AQ bridge, if enabled.
Sourcepub fn process_temporal_aq(
&mut self,
activity: TemporalActivity,
spatial_qp_offset: i8,
) -> Option<CombinedAqResult>
pub fn process_temporal_aq( &mut self, activity: TemporalActivity, spatial_qp_offset: i8, ) -> Option<CombinedAqResult>
Processes a frame’s temporal activity through the temporal AQ bridge and returns the combined AQ result for a given spatial QP offset.
This is the main integration point between temporal and spatial AQ.
Sourcepub fn generate_roi_map(&self) -> Option<RoiOptimizeResult>
pub fn generate_roi_map(&self) -> Option<RoiOptimizeResult>
Generates the ROI QP delta map for the current frame.
Returns None if ROI encoding is not enabled or no regions are set.
Sourcepub fn add_roi_region(&mut self, region: RoiRegion) -> bool
pub fn add_roi_region(&mut self, region: RoiRegion) -> bool
Adds an ROI region to the encoder (if enabled).
Returns true if the region was added, false if ROI is not enabled.
Sourcepub fn clear_roi_regions(&mut self)
pub fn clear_roi_regions(&mut self)
Clears all ROI regions (if ROI is enabled).
Auto Trait Implementations§
impl Freeze for Optimizer
impl RefUnwindSafe for Optimizer
impl Send for Optimizer
impl Sync for Optimizer
impl Unpin for Optimizer
impl UnsafeUnpin for Optimizer
impl UnwindSafe for Optimizer
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> 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