Releases: cool-japan/oxiaudio
Releases · cool-japan/oxiaudio
OxiAudio 0.1.2 Release
[0.1.2] - 2026-06-10
Added
- SILK NB encoder (
oxiaudio-encode): RFC 6716–conformant pure-Rust SILK narrowband (8 kHz) encoder producing decodable Opus packets. - SILK WB encoder (
oxiaudio-encode): RFC 6716–conformant wideband (16 kHz) SILK layer encoder; exposes internalencode_silk_wb_silence_intofor the hybrid encoder path. - CELT conformant encoder (
oxiaudio-encode): complete RFC 6716 §4.3 CELT-only conformance slice — silence flag, postfilter flag, transient/intra flags, 21 Laplace-coded coarse energy deltas, TF/spread/dynalloc/trim headers, rate allocation, fine energy, and PVQ CWRS shapes per band. - Hybrid FB encoder (
oxiaudio-encode): RFC 6716 hybrid mode (config 15, TOC0x78, Hybrid Fullband 20 ms mono) combining SILK WB + CELT high-band (bands 17–20,start_band=17) in a shared range-coder stream. ec_laplace_encode(opus_range.rs): full encoder inverse ofec_laplace_decodefor CELT coarse energy quantization.celt_mdct_960(opus_mdct.rs): 960-sample MDCT analysis via OxiFFT.- CELT BSD-3-Clause tables (
opus_celt_tables.rs): rate-allocation constants extracted to a dedicated module. - Conformance test suites:
m_opus_celt_conformance.rs,m_opus_hybrid_conformance.rs,m_opus_silk_conformance.rs— verifying TOC bytes and decodability againstopus-decoder 0.1.1. - AAC decoder short-window
section_data(oxiaudio-decode):decode_section_datanow handlesEIGHT_SHORT_SEQUENCEwindows. - AAC decoder short-window scale-factor array (
oxiaudio-decode):decode_scale_factorsallocatesnum_window_groups * max_sfbentries for short-window frames.
Changed
encode_celt_body_intorefactored to shared inner function for CELT-only and hybrid paths.transcode_batchexample updated to usestd::env::temp_dir()for output paths.
Full Changelog: v0.1.1...v0.1.2
OxiAudio 0.1.1 Release
[0.1.1] - 2026-06-04
Added
opus_pvqmodule (oxiaudio-encode): CWRS (Combinatorial Number System / CWRS)
PVQ encoder — bit-exact inverse ofdecode_pulsesfromopus-decoder.
Public functions:encode_pulses(enc, y),ncwrs_urow,icwrs, plus u64-wide
fallback variants (ncwrs_urow_u64,icwrs_u64,enc_uint_u64) for large
bands where V(N,K) exceeds u32::MAX (e.g. CELT band 20 at high bitrates).OpusDecoder::final_range()(oxiaudio-decode): exposes the range coder's
final range value for RFC 6716 conformance testing against the encoder's
final_range().- AAC decoder
decode_ics_data(oxiaudio-decode): inner ICS decoder
extracted fromdecode_sce, now shared by both SCE and CPE element decoders. - AAC decoder
Section/decode_section_data(oxiaudio-decode): proper
section_data()bitfield parser — reads 4-bit codebook + escape-coded section
lengths; used by scale-factor and spectral-data decoders. - AAC decoder SFB offset tables (
oxiaudio-decode): canonical ISO 14496-3
Table 4.138 tables added for 24 kHz/22.05 kHz, 16 kHz, 64 kHz, 96 kHz/88.2 kHz,
and 8 kHz;sfb_offsets_longnow uses a threshold-based lookup matching the
encoder exactly. - AAC decoder CB11 canonical table (
oxiaudio-decode): the minimal 28-entry
CB11 stub replaced by the full 289-entryHCB11_LENS/HCB11_CODESarrays from
ISO 14496-3 Annex A, enabling correct high-energy spectral coefficient decoding. - Test suites:
m_aac_roundtrip.rs(249 lines),m_oxisound_pipeline.rs
(478 lines),m_vorbis_roundtrip.rs(321 lines),m_stream_pitch.rs(230 lines)
added tooxiaudio-encodeandoxiaudiocrates. oxiaudio-dspadded as dev-dependency inoxiaudio-encodefor cross-crate
pipeline integration tests.
Changed
RangeEncoderrewritten (oxiaudio-encode):opus_range.rsis now a
faithful RFC 6716 §4.1 port of libopusec_enc, bit-exact with the
EcDecdecoder inopus-decoder; the previous self-consistent-but-non-standard
encoding is replaced. Raw bits are packed from the physical end of the buffer
(LSB-first) and stitched with range bytes onfinish().opus_celtPVQ shape encoding (oxiaudio-encode):encode_pvq_shape
replaced byopus_pvq::encode_pulses— CWRS combinatorial coding instead of
magnitude+sign per-coefficient encoding.compute_global_gain(oxiaudio-encode): demoted frompubto
#[cfg(test)]-private; only used in unit tests.oxiaudio-encoderestored as dev-dependency inoxiaudio-decode(was
temporarily removed for publish; circular dev-dep now resolved).
Fixed
- AAC decoder SFB tables (
oxiaudio-decode): the 48 kHz and 32 kHz SFB
boundary arrays were wrong (only 33 entries, not matching the encoder). They
now carry the full canonical ISO 14496-3 entries (50 and 52 boundaries
respectively), eliminating spectral misalignment on common sample rates. - AAC decoder scale-factor parsing (
oxiaudio-decode):decode_scale_factors
was unconditionally reading one delta per SFB; it now skipsZERO_HCBsections
(no bits in bitstream) and correctly accumulates deltas only over live sections,
preventing bitstream misalignment. - AAC decoder spectral data (
oxiaudio-decode):decode_spectral_datawas
decoding all SFBs with CB11 regardless of the codebook; it now reads only
sections that have spectral data in the bitstream (cb != 0, 13, 14, 15),
eliminating systematic decode errors for streams with zero-coded bands. - AAC decoder TNS parsing (
oxiaudio-decode):tns_data_presentblock was
a coarse 8-bit skip that mis-aligned the bitstream; it now parses
n_filt,coef_res, per-filterlength/order/direction/coef_compress,
and reads exactly the right number of coefficient bits. - AAC decoder CPE element (
oxiaudio-decode): channel-pair elements now
correctly read the 4-bitelement_instance_tagand 1-bitcommon_windowflag
before decoding each channel's ICS data; previously these bits were silently
consumed as audio data. - AAC decoder
IcsInfo(oxiaudio-decode): unused fieldswindow_shapeand
scale_factor_groupingremoved; thepredictor_data_presentbit (always present
per ISO 14496-3) is now correctly parsed and discarded. - AAC encoder
scale_factor_grouping(oxiaudio-encode): the 7-bit
scale_factor_groupingfield is only written forEIGHT_SHORT_SEQUENCE; it
was incorrectly written forONLY_LONG_SEQUENCEframes, producing a 7-bit
bitstream offset that caused decoder misalignment on all long-window frames. - AAC encoder
compute_global_gain_and_inv_scale(oxiaudio-encode): gain
formula corrected to ISO standard (gain = 100 − (16/3)·log2(target/peak_q),
inv_scale = 2^(−3·(gain−100)/16)); the previous formula included an erroneous
+16.0offset and a redundant reciprocal, causing systematic over-quantization.
Full Changelog: v0.1.0...v0.1.1