Skip to main content

CompInfo

Struct CompInfo 

Source
pub struct CompInfo {
    pub component_id: i32,
    pub component_index: i32,
    pub h_samp_factor: i32,
    pub v_samp_factor: i32,
    pub quant_tbl_no: i32,
    pub dc_tbl_no: i32,
    pub ac_tbl_no: i32,
    pub width_in_blocks: u32,
    pub height_in_blocks: u32,
    pub quant_table: *mut JQUANT_TBL,
    /* private fields */
}

Fields§

§component_id: i32

identifier for this component (0..255)

§component_index: i32

its index in SOF or cinfo->comp_info[]

§h_samp_factor: i32

horizontal sampling factor (1..4)

§v_samp_factor: i32

vertical sampling factor (1..4)

§quant_tbl_no: i32

quantization table selector (0..3)

§dc_tbl_no: i32

DC entropy table selector (0..3)

These values may vary between scans. For compression, they must be supplied by parameter setup; for decompression, they are read from the SOS marker. The decompressor output side may not use these variables.

§ac_tbl_no: i32

AC entropy table selector (0..3)

§width_in_blocks: u32§height_in_blocks: u32§quant_table: *mut JQUANT_TBL

Trait Implementations§

Source§

impl CompInfoExt for CompInfo

Source§

fn qtable(&self) -> Option<QTable>

Source§

fn sampling(&self) -> (u8, u8)

h,v samplinig (1..4). Number of pixels per sample (may be opposite of what you expect!)
Source§

fn row_stride(&self) -> usize

Number of pixels per row, including padding to MCU
Source§

fn col_stride(&self) -> usize

Total height, including padding to MCU
Source§

fn width_in_blocks(&self) -> usize

Source§

fn height_in_blocks(&self) -> usize

Source§

impl Default for jpeg_component_info

Source§

fn default() -> jpeg_component_info

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.