Expand description
CCSDS 122.0-B-2 Image Data Compression (wavelet-based). CCSDS 122.0-B-2 Image Data Compression.
Implements a wavelet-based image compressor using a 2D Discrete Wavelet Transform (DWT) followed by a Bit-Plane Encoder (BPE).
The image is divided into segments of S strips (each strip is 8 rows). A 3-level 2D DWT decomposes each segment, producing subbands (LL3, HL3, LH3, HH3, …, HL1, LH1, HH1). The BPE then encodes the coefficients progressively from the most significant bit-plane downward.
§Wavelet
Uses the integer (5,3) wavelet (reversible/lossless) or the (9,7) CDF float wavelet (lossy). This implementation provides the integer (5,3) wavelet for lossless operation.
§Limitations
- Integer (5,3) DWT only (lossless)
- Image width must be a multiple of 8
- Image height must be a multiple of 8
- Dynamic range 2..=16 bits per sample
- Maximum segment size 2^20 blocks
Structs§
- Config
- Compressor configuration.
Enums§
- Error
- Compression/decompression error.
Functions§
- compress
- Compress a 2D image using CCSDS 122.0-B-2 (integer DWT).
- decompress
- Decompress a CCSDS 122.0-B-2 compressed image.
- scratch_
len - Required scratch space (in i32 elements) for compress/decompress.