CCSDS 123.0-B Lossless Multispectral and Hyperspectral Image Compression
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Upgrade to ocamlformat 0.29.0; fix csvt/sexpt streaming; reformat

- Update .ocamlformat to 0.29.0 across all 591 files
- csvt: reuse single Buffer.t for field reads (no alloc per field)
- sexpt: Obj members decoded from stream into Dict, typed Variant GADT
- Reformat all source files for 0.29.0

+3 -3
+3 -3
lib/hcomp.ml
··· 146 146 ~bits_per_sample = 147 147 ignore _height; 148 148 let mid = 1 lsl (bits_per_sample - 1) in 149 - if band = 0 then begin 149 + if band = 0 then 150 150 (* First band: spatial-only prediction *) 151 - if x = 0 && y = 0 then mid 151 + begin if x = 0 && y = 0 then mid 152 152 else if y = 0 then get_sample data ~bands ~width ~band ~x:(x - 1) ~y 153 153 else if x = 0 then get_sample data ~bands ~width ~band ~x ~y:(y - 1) 154 154 else begin ··· 160 160 let max_val = (1 lsl bits_per_sample) - 1 in 161 161 max 0 (min max_val p) 162 162 end 163 - end 163 + end 164 164 else begin 165 165 (* Subsequent bands: blend spatial prediction with spectral neighbor *) 166 166 let spectral = get_sample data ~bands ~width ~band:(band - 1) ~x ~y in