use alloc::vec::Vec;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum J2kSubBandType {
LowLow,
HighLow,
LowHigh,
HighHigh,
}
#[derive(Debug, Clone, Copy)]
#[expect(
clippy::struct_excessive_bools,
reason = "the five booleans model independent JPEG 2000 COD code-block style flags"
)]
pub struct J2kCodeBlockStyle {
pub selective_arithmetic_coding_bypass: bool,
pub reset_context_probabilities: bool,
pub termination_on_each_pass: bool,
pub vertically_causal_context: bool,
pub segmentation_symbols: bool,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct J2kCodeBlockSegment {
pub data_offset: u32,
pub data_length: u32,
pub start_coding_pass: u8,
pub end_coding_pass: u8,
pub use_arithmetic: bool,
}
#[derive(Debug)]
pub struct EncodedJ2kCodeBlock {
pub data: Vec<u8>,
pub segments: Vec<J2kCodeBlockSegment>,
pub number_of_coding_passes: u8,
pub missing_bit_planes: u8,
}
#[derive(Debug, Clone, Copy)]
pub struct J2kTier1CodeBlockEncodeJob<'a> {
pub coefficients: &'a [i32],
pub width: u32,
pub height: u32,
pub sub_band_type: J2kSubBandType,
pub total_bitplanes: u8,
pub style: J2kCodeBlockStyle,
}
crate::move_only::assert_move_only!(EncodedJ2kCodeBlock);