mod output;
mod overlap;
pub use output::{OutputDispatchPlan, StorePipeline, build_output_dispatch};
pub use overlap::{OverlapSchedule, first_overlap_schedule, second_overlap_schedule};
pub type OverlapWork = [u32; 4];
pub type SamplePlaneWords = [u32; 6];
pub type SurfacePlaneWords = [u32; 6];
pub type OutputParameterWords = [u32; 28];
pub const SAMPLE_OFFSET: usize = 0;
pub const SAMPLE_ALPHA: usize = 5;
pub const SURFACE_OFFSET: usize = 0;
pub const SURFACE_WIDTH: usize = 2;
pub const SURFACE_HEIGHT: usize = 3;
pub const OUTPUT_PLANE: usize = 24;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct ReconstructionPlane {
pub arena_index: u32,
pub macroblock_offset: usize,
pub macroblock_count: usize,
pub block_columns: u8,
pub block_rows: u8,
pub macroblock_origin_x: u32,
pub macroblock_origin_y: u32,
pub macroblocks_x: u32,
pub macroblocks_y: u32,
pub sample_origin_x: u32,
pub sample_origin_y: u32,
pub sample_width: u32,
pub sample_height: u32,
pub low_offset: usize,
pub sample_offset: usize,
pub scale_after_first_transform: bool,
pub alpha: bool,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum PlanError {
InvalidPlan { reason: &'static str },
UnsupportedOutputFormat { reason: &'static str },
}
impl core::fmt::Display for PlanError {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
match self {
Self::InvalidPlan { reason } | Self::UnsupportedOutputFormat { reason } => {
f.write_str(reason)
}
}
}
}
impl core::error::Error for PlanError {}