Expand description
Parallel AV1 tile encoding over raw frame bytes.
This module provides a low-level, frame-buffer-oriented API for
splitting a YUV420p luma plane into tile regions and encoding them in
parallel using rayon. It is the structural companion to
super::parallel_tile_decoder on the encode side.
For a higher-level API that works with crate::frame::VideoFrame
objects see super::tile_encoder::ParallelTileEncoder.
§Structural implementation note
A full AV1 tile encode requires mode decision, transform coding, quantisation, and entropy coding — all tightly coupled to codec state. This module provides the structural scaffolding: correct tile splitting, parallel dispatch via rayon, and a minimal binary encoding (tile header + QP-XOR pixel data) suitable as a drop-in stand-in for the real pipeline.
§Example
use oximedia_codec::av1::{RawTileEncoderConfig, encode_tiles_parallel};
let config = RawTileEncoderConfig {
tile_cols: 2,
tile_rows: 2,
threads: 0,
base_qp: 32,
};
let frame = vec![128u8; 1920 * 1080]; // synthetic luma
let tiles = encode_tiles_parallel(&frame, 1920, 1080, &config).expect("encode");
assert_eq!(tiles.len(), 4);Structs§
- Encoded
Tile - The result of encoding a single tile.
- Parallel
Tile Encoder - Parallel AV1 tile encoder operating on raw byte frames.
- Tile
Encoder Config - Configuration for the low-level parallel tile encoder.
- Tile
Region Info - Describes the location and dimensions of one tile within a frame.
Functions§
- encode_
tiles_ parallel - Encode a raw luma frame into parallel tile bitstreams.