j2k_codec_math/lib.rs
1//! Shared codec constants, generated fragments, and helper algorithms for the
2//! `j2k` workspace.
3//!
4//! This crate is deliberately small, allocation-free, and `no_std`. Its
5//! constants and pure helper algorithms must stay equivalent across CPU,
6//! CUDA-Oxide, and Metal backends, but it does not own backend dispatch or
7//! kernel-launch policy.
8
9#![no_std]
10#![forbid(unsafe_code)]
11#![warn(missing_docs)]
12/// JPEG 2000 classic Tier-1 probability and context tables.
13pub mod classic;
14/// JPEG 2000 DWT constants.
15pub mod dwt;
16/// HTJ2K decode limits shared by host launch code and device kernels.
17pub mod htj2k;
18/// Generated backend source fragments derived from codec constants.
19pub mod generated {
20 /// Metal source fragment defining JPEG 2000 DWT 9/7 constants.
21 pub const DWT97_CONSTANTS_METAL: &str = include_str!("../generated/dwt97_constants.metal");
22}
23/// Baseline JPEG constants.
24pub mod jpeg;
25/// JPEG 2000 multi-component transform constants.
26pub mod mct;