Repository navigation
v0.3.4
Makes serial HCA decoding about 35% faster, adds opt-in multithreaded decoding for HCA and ACB, and removes redundant copies from USM extraction. Decoded PCM and extracted streams are byte-identical to 0.3.3, and existing functions keep their signatures and serial behaviour.
Added
- Decode HCA on several threads with
HcaDecoder::decode_to_wav_parallel(w, threads). Output is byte-identical to serial decoding; HCA v3 files with noise reconstruction andthreads <= 1use the serial path. On a 2:22 stereo HCA on an Apple M4, decoding goes from 52 to 9.8 ms with 10 threads. (#16) - Decode ACBs on several threads with
decode_acb_to_wav_to_memory_parallel,decode_acb_to_wav_parallelanddecode_acb_to_wav_from_file_parallel. Tracks are spread across workers and leftover threads decode blocks within a track, so both single-track music ACBs and many-track sound-effect banks use the whole budget. A 6-track ACB goes from 398 to 97 ms. (#16) - Pass
threadstodecode_hca,decode_hca_bytes,decode_acb_to_wavanddecode_acb_to_wav_bytesin Python:Nonedecodes serially as before,0uses all cores andNuses N threads. These four functions now release the GIL while decoding, serial mode included. (#16)
Performance
- Speed up serial HCA decoding by about 35% (72.0 to 53.5 ms on the benchmark file): dequantizer bit counts are computed instead of looked up, scale-factor deltas go through a register-resident bit accumulator, and file input is read about 1 MiB ahead instead of once per block. (#16)
- Extract USM streams in memory with one copy instead of three: 4.7 to 1.0 ms on a 28.5 MB USM. (#16)
- Write extracted USM streams through a 1 MiB buffer: 28.7 to 14.7 ms on the same file. (#16)
Upgrade notes
- Worker threads use their own 8 MiB stacks, named
hca-decodeandacb-decode, independent of the caller'sRUST_MIN_STACK. (#16)
Artifacts
- crates.io:
cridecoder0.3.4 - PyPI:
cridecoder0.3.4
Maintenance
Full Changelog: v0.3.3...v0.3.4