pub struct TileInfo {Show 16 fields
pub tile_cols: u32,
pub tile_rows: u32,
pub tile_col_starts: Vec<u32>,
pub tile_row_starts: Vec<u32>,
pub context_update_tile_id: u32,
pub tile_size_bytes: u8,
pub uniform_tile_spacing: bool,
pub tile_cols_log2: u8,
pub tile_rows_log2: u8,
pub min_tile_cols_log2: u8,
pub max_tile_cols_log2: u8,
pub min_tile_rows_log2: u8,
pub max_tile_rows_log2: u8,
pub sb_cols: u32,
pub sb_rows: u32,
pub sb_size: u32,
}Expand description
Tile information from frame header.
Fields§
§tile_cols: u32Number of tile columns.
tile_rows: u32Number of tile rows.
tile_col_starts: Vec<u32>Tile column start positions (in superblocks).
tile_row_starts: Vec<u32>Tile row start positions (in superblocks).
context_update_tile_id: u32Context update tile ID.
tile_size_bytes: u8Number of bytes to read for tile size.
uniform_tile_spacing: boolUniform tile spacing flag.
tile_cols_log2: u8Tile columns log2.
tile_rows_log2: u8Tile rows log2.
min_tile_cols_log2: u8Minimum tile columns log2.
max_tile_cols_log2: u8Maximum tile columns log2.
min_tile_rows_log2: u8Minimum tile rows log2.
max_tile_rows_log2: u8Maximum tile rows log2.
sb_cols: u32Superblock columns.
sb_rows: u32Superblock rows.
sb_size: u32Superblock size (64 or 128).
Implementations§
Source§impl TileInfo
impl TileInfo
Sourcepub fn parse(
reader: &mut BitReader<'_>,
_seq: &SequenceHeader,
frame_size: &FrameSize,
) -> CodecResult<Self>
pub fn parse( reader: &mut BitReader<'_>, _seq: &SequenceHeader, frame_size: &FrameSize, ) -> CodecResult<Self>
Sourcepub const fn tile_count(&self) -> u32
pub const fn tile_count(&self) -> u32
Get total number of tiles.
Sourcepub fn tile_size_sb(&self, tile_col: u32, tile_row: u32) -> (u32, u32)
pub fn tile_size_sb(&self, tile_col: u32, tile_row: u32) -> (u32, u32)
Get tile dimensions in superblocks for a specific tile.
Sourcepub fn tile_size_pixels(&self, tile_col: u32, tile_row: u32) -> (u32, u32)
pub fn tile_size_pixels(&self, tile_col: u32, tile_row: u32) -> (u32, u32)
Get tile dimensions in pixels for a specific tile.
Sourcepub const fn tile_index(&self, tile_col: u32, tile_row: u32) -> u32
pub const fn tile_index(&self, tile_col: u32, tile_row: u32) -> u32
Get the tile index for a given (col, row) position.
Sourcepub const fn tile_position(&self, tile_idx: u32) -> (u32, u32)
pub const fn tile_position(&self, tile_idx: u32) -> (u32, u32)
Get the (col, row) position for a tile index.
Sourcepub fn tile_col_start_sb(&self, tile_col: u32) -> u32
pub fn tile_col_start_sb(&self, tile_col: u32) -> u32
Get the starting superblock column for a tile column.
Sourcepub fn tile_row_start_sb(&self, tile_row: u32) -> u32
pub fn tile_row_start_sb(&self, tile_row: u32) -> u32
Get the starting superblock row for a tile row.
Sourcepub fn tile_start_pixels(&self, tile_col: u32, tile_row: u32) -> (u32, u32)
pub fn tile_start_pixels(&self, tile_col: u32, tile_row: u32) -> (u32, u32)
Get the pixel position for the start of a tile.
Sourcepub const fn is_single_tile(&self) -> bool
pub const fn is_single_tile(&self) -> bool
Check if this is a single-tile frame.
Sourcepub const fn is_left_edge(&self, tile_col: u32) -> bool
pub const fn is_left_edge(&self, tile_col: u32) -> bool
Check if a tile is at the left edge.
Sourcepub fn is_right_edge(&self, tile_col: u32) -> bool
pub fn is_right_edge(&self, tile_col: u32) -> bool
Check if a tile is at the right edge.
Sourcepub const fn is_top_edge(&self, tile_row: u32) -> bool
pub const fn is_top_edge(&self, tile_row: u32) -> bool
Check if a tile is at the top edge.
Sourcepub fn is_bottom_edge(&self, tile_row: u32) -> bool
pub fn is_bottom_edge(&self, tile_row: u32) -> bool
Check if a tile is at the bottom edge.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TileInfo
impl RefUnwindSafe for TileInfo
impl Send for TileInfo
impl Sync for TileInfo
impl Unpin for TileInfo
impl UnsafeUnpin for TileInfo
impl UnwindSafe for TileInfo
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> 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>
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