pub struct TileConfig {
pub tile_cols: u32,
pub tile_rows: u32,
pub num_threads: usize,
pub frame_width: u32,
pub frame_height: u32,
}Expand description
Configuration for the tile grid and frame dimensions.
Use the builder-pattern methods to configure:
use oximedia_codec::tile_encoder::TileConfig;
let cfg = TileConfig::new()
.tile_cols(4)
.tile_rows(4)
.num_threads(8)
.frame_width(1920)
.frame_height(1080);
assert_eq!(cfg.tile_cols, 4);
assert_eq!(cfg.num_threads, 8);Fields§
§tile_cols: u32Number of tile columns (1–64).
tile_rows: u32Number of tile rows (1–64).
num_threads: usizeWorker threads for parallel encoding (0 = use Rayon pool size).
frame_width: u32Frame width in pixels.
frame_height: u32Frame height in pixels.
Implementations§
Source§impl TileConfig
impl TileConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a TileConfig with default values.
Defaults: 1 column, 1 row, 0 threads (auto), 0×0 frame.
Sourcepub fn num_threads(self, threads: usize) -> Self
pub fn num_threads(self, threads: usize) -> Self
Set the worker thread count (0 = Rayon auto).
Sourcepub fn frame_width(self, width: u32) -> Self
pub fn frame_width(self, width: u32) -> Self
Set the frame width in pixels.
Sourcepub fn frame_height(self, height: u32) -> Self
pub fn frame_height(self, height: u32) -> Self
Set the frame height in pixels.
Sourcepub fn thread_count(&self) -> usize
pub fn thread_count(&self) -> usize
Effective thread count (resolves 0 to the Rayon pool size).
Trait Implementations§
Source§impl Clone for TileConfig
impl Clone for TileConfig
Source§fn clone(&self) -> TileConfig
fn clone(&self) -> TileConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TileConfig
impl Debug for TileConfig
Source§impl Default for TileConfig
impl Default for TileConfig
Source§impl PartialEq for TileConfig
impl PartialEq for TileConfig
impl Eq for TileConfig
impl StructuralPartialEq for TileConfig
Auto Trait Implementations§
impl Freeze for TileConfig
impl RefUnwindSafe for TileConfig
impl Send for TileConfig
impl Sync for TileConfig
impl Unpin for TileConfig
impl UnsafeUnpin for TileConfig
impl UnwindSafe for TileConfig
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> 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>
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