pub struct Av1TileConfig {
pub tile_cols_log2: u8,
pub tile_rows_log2: u8,
pub threads: usize,
pub row_mt: bool,
}Expand description
Configuration for AV1 tile-based parallel encoding.
AV1 supports dividing each frame into an M × N grid of independently
encodable tiles. Encoding multiple tiles in parallel with rayon reduces
wall-clock time on multi-core systems while producing a bitstream that is
backward-compatible with single-threaded decoders.
tile_cols and tile_rows are specified as log2 values following the
AV1 specification (e.g. 2 → 4 tile columns). Use Av1TileConfig::auto
to pick sensible defaults for a given resolution.
Fields§
§tile_cols_log2: u8Log2 number of tile columns (0–6).
tile_rows_log2: u8Log2 number of tile rows (0–6).
threads: usizeNumber of rayon worker threads (0 = auto).
row_mt: boolEnable row-based multi-threading within each tile.
Implementations§
Source§impl Av1TileConfig
impl Av1TileConfig
Sourcepub fn new(
tile_cols_log2: u8,
tile_rows_log2: u8,
threads: usize,
) -> Result<Self>
pub fn new( tile_cols_log2: u8, tile_rows_log2: u8, threads: usize, ) -> Result<Self>
Creates a new AV1 tile configuration with explicit log2 tile counts.
§Errors
Returns an error when tile_cols_log2 or tile_rows_log2 exceeds 6.
Sourcepub fn auto(_width: u32, height: u32, threads: usize) -> Self
pub fn auto(_width: u32, height: u32, threads: usize) -> Self
Automatically selects tile counts appropriate for the given resolution.
| Resolution | tile_cols_log2 | tile_rows_log2 |
|---|---|---|
| ≤ 720p | 1 (2 cols) | 0 (1 row) |
| 1080p | 1 (2 cols) | 1 (2 rows) |
| 4K (2160p) | 2 (4 cols) | 2 (4 rows) |
| 8K (4320p) | 3 (8 cols) | 2 (4 rows) |
Sourcepub fn total_tiles(&self) -> u32
pub fn total_tiles(&self) -> u32
Returns the total number of tiles per frame.
Trait Implementations§
Source§impl Clone for Av1TileConfig
impl Clone for Av1TileConfig
Source§fn clone(&self) -> Av1TileConfig
fn clone(&self) -> Av1TileConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Av1TileConfig
impl Debug for Av1TileConfig
Source§impl Default for Av1TileConfig
impl Default for Av1TileConfig
Source§impl PartialEq for Av1TileConfig
impl PartialEq for Av1TileConfig
impl Eq for Av1TileConfig
impl StructuralPartialEq for Av1TileConfig
Auto Trait Implementations§
impl Freeze for Av1TileConfig
impl RefUnwindSafe for Av1TileConfig
impl Send for Av1TileConfig
impl Sync for Av1TileConfig
impl Unpin for Av1TileConfig
impl UnsafeUnpin for Av1TileConfig
impl UnwindSafe for Av1TileConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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