1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! JPEG-XL (ISO/IEC 18181) codec implementation.
//!
//! This module provides encoding and decoding for JPEG-XL images with:
//!
//! ## Features
//!
//! - **Lossless mode**: Modular encoding with reversible color transform and
//! adaptive prediction (gradient + weighted average of neighbors)
//! - **8-bit and 16-bit** sample support
//! - **RGB, RGBA, and Grayscale** color types
//! - **Codestream format**: Direct JXL codestream (0xFF 0x0A signature)
//! - **Animation**: Multi-frame animated JPEG-XL (AJXL) with configurable
//! tick rates and per-frame duration
//!
//! ## Architecture
//!
//! JPEG-XL lossless encoding uses the Modular sub-codec:
//!
//! 1. Apply Reversible Color Transform (RCT) to decorrelate channels
//! 2. Predict each sample using adaptive weighted predictor
//! 3. Entropy-code the residuals using ANS (Asymmetric Numeral Systems)
//!
//! ## Examples
//!
//! ### Lossless encoding
//!
//! ```ignore
//! use oximedia_codec::jpegxl::{JxlEncoder, JxlConfig};
//!
//! let encoder = JxlEncoder::lossless();
//! let jxl_data = encoder.encode(&rgb_pixels, 1920, 1080, 3, 8)?;
//! ```
//!
//! ### Decoding
//!
//! ```ignore
//! use oximedia_codec::jpegxl::JxlDecoder;
//!
//! let decoder = JxlDecoder::new();
//! let image = decoder.decode(&jxl_data)?;
//! println!("Decoded {}x{} image", image.width, image.height);
//! ```
//!
//! ## Safety
//!
//! This implementation uses no unsafe code and is fully memory-safe.
//! 100% pure Rust with no C/Fortran dependencies.
// Re-export public API
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;