pub fn encode_with_accelerator(
pixels: &[u8],
width: u32,
height: u32,
num_components: u8,
bit_depth: u8,
signed: bool,
options: &EncodeOptions,
accelerator: &mut impl J2kEncodeStageAccelerator,
) -> Result<Vec<u8>, &'static str>Expand description
Encode pixel data into a JPEG 2000 codestream using optional encode-stage hooks.
Stage hooks may accelerate forward RCT, forward 5/3 DWT, Tier-1 code-block encode, and packetization. Returning fallback from a hook preserves the CPU baseline for that stage.