Skip to main content

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/// Generated backend source fragments derived from codec constants.
17pub mod generated {
18    /// Metal source fragment defining JPEG 2000 DWT 9/7 constants.
19    pub const DWT97_CONSTANTS_METAL: &str = include_str!("../generated/dwt97_constants.metal");
20}
21/// Baseline JPEG constants.
22pub mod jpeg;
23/// JPEG 2000 multi-component transform constants.
24pub mod mct;