struct ParallelCbgDecoder {
input: Vec<u8>,
output: Mutex<Vec<u8>>,
bpp: i32,
width: i32,
height: i32,
tree1: HuffmanTree,
tree2: HuffmanTree,
dct: [[f32; 64]; 2],
has_alpha: AtomicBool,
}
Available on crate features
bgi
and bgi-img
only.Fields§
§input: Vec<u8>
§output: Mutex<Vec<u8>>
§bpp: i32
§width: i32
§height: i32
§tree1: HuffmanTree
§tree2: HuffmanTree
§dct: [[f32; 64]; 2]
§has_alpha: AtomicBool
Implementations§
Source§impl ParallelCbgDecoder
impl ParallelCbgDecoder
fn unpack_block(&self, offset: i32, length: i32, dst: i32) -> Result<()>
fn decode_rgb(&self, data: &[i16], dst: i32) -> Result<()>
fn decode_grayscale(&self, data: &[i16], dst: i32) -> Result<()>
fn unpack_alpha(&self, offset: i32) -> Result<()>
fn decode_dct( &self, channel: usize, data: &[i16], src: usize, output: &mut [[i16; 3]; 64], ) -> Result<()>
fn float_to_short(f: f32) -> i16
fn float_to_byte(f: f32) -> u8
Auto Trait Implementations§
impl !Freeze for ParallelCbgDecoder
impl RefUnwindSafe for ParallelCbgDecoder
impl Send for ParallelCbgDecoder
impl Sync for ParallelCbgDecoder
impl Unpin for ParallelCbgDecoder
impl UnwindSafe for ParallelCbgDecoder
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> 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