use crate::{execution::CudaExecutionStats, memory::CudaDeviceBuffer};
#[derive(Clone, Copy)]
pub(super) struct J2kStridedDeinterleaveLaunch<'a> {
pub(super) pixels: &'a CudaDeviceBuffer,
pub(super) output: &'a CudaDeviceBuffer,
pub(super) width: u32,
pub(super) height: u32,
pub(super) byte_offset: usize,
pub(super) pitch_bytes: usize,
pub(super) num_components: u8,
pub(super) bit_depth: u8,
pub(super) signed: bool,
}
#[derive(Debug)]
#[doc(hidden)]
pub struct CudaJ2kResidentComponents {
pub(crate) buffer: CudaDeviceBuffer,
pub(crate) num_pixels: usize,
pub(crate) num_components: u8,
pub(crate) execution: CudaExecutionStats,
}
#[derive(Debug)]
#[doc(hidden)]
pub struct CudaJ2kDeinterleavedComponents {
pub(crate) components: Vec<Vec<f32>>,
pub(crate) execution: CudaExecutionStats,
}
#[derive(Debug)]
#[doc(hidden)]
pub struct CudaDwt53Output {
pub(crate) transformed: Vec<f32>,
pub(crate) levels: Vec<CudaDwt53LevelShape>,
pub(crate) ll_width: u32,
pub(crate) ll_height: u32,
pub(crate) execution: CudaExecutionStats,
}
#[derive(Debug)]
#[doc(hidden)]
pub struct CudaResidentDwt53Output {
pub(crate) buffer: CudaDeviceBuffer,
pub(crate) sample_count: usize,
pub(crate) levels: Vec<CudaDwt53LevelShape>,
pub(crate) ll_width: u32,
pub(crate) ll_height: u32,
pub(crate) execution: CudaExecutionStats,
}
#[derive(Debug)]
#[doc(hidden)]
pub struct CudaDwt97Output {
pub(crate) transformed: Vec<f32>,
pub(crate) levels: Vec<CudaDwt53LevelShape>,
pub(crate) ll_width: u32,
pub(crate) ll_height: u32,
pub(crate) execution: CudaExecutionStats,
}
#[derive(Debug)]
#[doc(hidden)]
pub struct CudaResidentDwt97Output {
pub(crate) buffer: CudaDeviceBuffer,
pub(crate) sample_count: usize,
pub(crate) levels: Vec<CudaDwt53LevelShape>,
pub(crate) ll_width: u32,
pub(crate) ll_height: u32,
pub(crate) execution: CudaExecutionStats,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[doc(hidden)]
pub struct CudaJ2kQuantizeJob {
pub step_exponent: u16,
pub step_mantissa: u16,
pub range_bits: u8,
pub reversible: bool,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[doc(hidden)]
pub struct CudaJ2kQuantizeSubbandRegionJob {
pub x0: u32,
pub y0: u32,
pub width: u32,
pub height: u32,
pub stride: u32,
pub quantization: CudaJ2kQuantizeJob,
}
#[derive(Debug)]
#[doc(hidden)]
pub struct CudaJ2kQuantizedSubband {
pub(crate) coefficients: Vec<i32>,
pub(crate) execution: CudaExecutionStats,
}
#[derive(Debug)]
#[doc(hidden)]
pub struct CudaJ2kResidentQuantizedSubband {
pub(crate) coefficients: CudaDeviceBuffer,
pub(crate) coefficient_count: usize,
pub(crate) execution: CudaExecutionStats,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[doc(hidden)]
pub struct CudaDwt53LevelShape {
pub width: u32,
pub height: u32,
pub low_width: u32,
pub low_height: u32,
pub high_width: u32,
pub high_height: u32,
}
#[derive(Clone, Copy, Debug)]
pub(crate) struct CudaDwt53Pass {
pub(crate) full_width: u32,
pub(crate) current_width: u32,
pub(crate) current_height: u32,
pub(crate) low_extent: u32,
}
#[derive(Clone, Copy, Debug)]
pub(crate) struct CudaDwt53LevelPass {
pub(crate) full_width: u32,
pub(crate) current_width: u32,
pub(crate) current_height: u32,
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
#[doc(hidden)]
pub struct CudaDwt97BatchStageTimings {
pub pack_upload_us: u128,
pub idct_row_lift_us: u128,
pub column_lift_us: u128,
pub quantize_codeblock_us: u128,
pub ht_encode_us: u128,
pub ht_codeblock_dispatches: usize,
pub readback_us: u128,
}