Struct brotli_ffi::enc::context_map_entropy::ContextMapEntropy
source · pub struct ContextMapEntropy<'a, Alloc>where
Alloc: Allocator<u16> + Allocator<u32> + Allocator<f32>,{ /* private fields */ }
Implementations
sourceimpl<'a, Alloc> ContextMapEntropy<'a, Alloc>where
Alloc: Allocator<u16> + Allocator<u32> + Allocator<f32>,
impl<'a, Alloc> ContextMapEntropy<'a, Alloc>where
Alloc: Allocator<u16> + Allocator<u32> + Allocator<f32>,
pub fn new(
m16: &mut Alloc,
input: InputPair<'a>,
stride: [u8; 8],
prediction_mode: PredictionModeContextMap<InputReferenceMut<'a>>,
cdf_detection_quality: u8
) -> ContextMapEntropy<'a, Alloc>
pub fn take_prediction_mode(
&mut self
) -> PredictionModeContextMap<InputReferenceMut<'a>>
pub fn prediction_mode_mut(
&mut self
) -> &mut PredictionModeContextMap<InputReferenceMut<'a>>
pub fn best_singleton_speeds(
&self,
cm: bool,
combined: bool
) -> ([SpeedAndMax; 2], [f32; 2])
pub fn best_speeds(&mut self, cm: bool, combined: bool) -> [SpeedAndMax; 2]
pub fn best_speeds_costs(&mut self, cm: bool, combined: bool) -> [f32; 2]
pub fn free(&mut self, alloc: &mut Alloc)
Trait Implementations
sourceimpl<'a, 'b, Alloc> CommandProcessor<'b> for ContextMapEntropy<'a, Alloc>where
Alloc: Allocator<u16> + Allocator<u32> + Allocator<f32>,
impl<'a, 'b, Alloc> CommandProcessor<'b> for ContextMapEntropy<'a, Alloc>where
Alloc: Allocator<u16> + Allocator<u32> + Allocator<f32>,
fn push(&mut self, val: Command<InputReference<'b>>)
fn push_literals(&mut self, data: &InputPair<'a>)
fn push_rand_literals(&mut self, data: &InputPair<'a>)
fn push_block_switch_literal(&mut self, block_type: u8)
sourceimpl<'a, Alloc> IRInterpreter for ContextMapEntropy<'a, Alloc>where
Alloc: Allocator<u16> + Allocator<u32> + Allocator<f32>,
impl<'a, Alloc> IRInterpreter for ContextMapEntropy<'a, Alloc>where
Alloc: Allocator<u16> + Allocator<u32> + Allocator<f32>,
fn inc_local_byte_offset(&mut self, inc: usize)
fn local_byte_offset(&self) -> usize
fn update_block_type(&mut self, new_type: u8, stride: u8)
fn block_type(&self) -> u8
fn literal_data_at_offset(&self, index: usize) -> u8
fn literal_context_map(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
fn prediction_mode(&self) -> LiteralPredictionModeNibble
fn update_cost(
&mut self,
stride_prior: [u8; 8],
stride_prior_offset: usize,
selected_bits: u8,
cm_prior: usize,
literal: u8
)
Auto Trait Implementations
impl<'a, Alloc> RefUnwindSafe for ContextMapEntropy<'a, Alloc>where
<Alloc as Allocator<u16>>::AllocatedMemory: RefUnwindSafe,
impl<'a, Alloc> Send for ContextMapEntropy<'a, Alloc>where
<Alloc as Allocator<u16>>::AllocatedMemory: Send,
impl<'a, Alloc> Sync for ContextMapEntropy<'a, Alloc>where
<Alloc as Allocator<u16>>::AllocatedMemory: Sync,
impl<'a, Alloc> Unpin for ContextMapEntropy<'a, Alloc>where
<Alloc as Allocator<u16>>::AllocatedMemory: Unpin,
impl<'a, Alloc> !UnwindSafe for ContextMapEntropy<'a, Alloc>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more