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