pub struct ParetoFront {
pub points: Vec<RDPoint>,
}Expand description
Pareto front of rate-distortion points.
Fields§
§points: Vec<RDPoint>Points on the Pareto front (non-dominated).
Implementations§
Source§impl ParetoFront
impl ParetoFront
Sourcepub fn compute(points: &[RDPoint]) -> Self
pub fn compute(points: &[RDPoint]) -> Self
Compute the Pareto front from a set of points.
Returns a new ParetoFront containing only the non-dominated points.
Sourcepub fn at_quality(&self, min_quality: f64) -> Vec<&RDPoint>
pub fn at_quality(&self, min_quality: f64) -> Vec<&RDPoint>
Get points that achieve at least the target quality.
Sourcepub fn at_bpp(&self, max_bpp: f64) -> Vec<&RDPoint>
pub fn at_bpp(&self, max_bpp: f64) -> Vec<&RDPoint>
Get points that achieve at most the target bpp.
Sourcepub fn best_at_bpp(&self, max_bpp: f64) -> Option<&RDPoint>
pub fn best_at_bpp(&self, max_bpp: f64) -> Option<&RDPoint>
Get the best point (highest quality) at or below the target bpp.
Sourcepub fn best_at_quality(&self, min_quality: f64) -> Option<&RDPoint>
pub fn best_at_quality(&self, min_quality: f64) -> Option<&RDPoint>
Get the most efficient point (lowest bpp) at or above the target quality.
Sourcepub fn filter_codec(&self, codec: &str) -> Vec<&RDPoint>
pub fn filter_codec(&self, codec: &str) -> Vec<&RDPoint>
Filter to points from a specific codec.
Trait Implementations§
Source§impl Clone for ParetoFront
impl Clone for ParetoFront
Source§fn clone(&self) -> ParetoFront
fn clone(&self) -> ParetoFront
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 moreSource§impl Debug for ParetoFront
impl Debug for ParetoFront
Source§impl Default for ParetoFront
impl Default for ParetoFront
Source§fn default() -> ParetoFront
fn default() -> ParetoFront
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ParetoFront
impl<'de> Deserialize<'de> for ParetoFront
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ParetoFront
impl RefUnwindSafe for ParetoFront
impl Send for ParetoFront
impl Sync for ParetoFront
impl Unpin for ParetoFront
impl UnwindSafe for ParetoFront
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