Commits
Commits on
552edc4cede0dfd9bebbc4e344242802802d15ccFiltered to crates/ec-opus/src/silk.rsClear filter2026-08-23
2026-08-20
feat(opus-silk): SILK payload writer, mono 20 ms NB/WB, decoder-mirrored stateAhmet Kaan Gümüş · 12e4d27
feat(opus-silk): SILK payload writer, mono 20 ms NB/WB, decoder-mirrored state Writes every symbol in silk::decode()'s order (VAD/LBRR flags, frame type, gains, NLSF stage 1/2 + interp, pitch lag/contour + LTP codebook + scale, seed, rate level, shell-coded pulses with LSB escape, signs) and quantises the excitation open-loop against the decoder's own reconstruction, with the encoder replaying each packet through a SilkDecoder so its LTP history is the real one. Unit test round-trips NB/WB through the decoder including the LSB escape, range state equal.
feat(opus-silk): SILK encoder analysis front endAhmet Kaan Gümüş · 79db13a
feat(opus-silk): SILK encoder analysis front end Adds silk_enc.rs: 48k->8/12/16k FIR decimator, simplified VAD, LPC analysis with unit-circle P/Q NLSF conversion, NLSF VQ search against the decoder codebooks, pitch estimation and gain quantisation. Decoder helpers made pub(crate) for reuse; no decoder logic changes.
2026-08-14
feat(opus): multistream decoding, 5.1 and 7.1Ahmet Kaan Gümüş · 8bd3b2b
feat(opus): multistream decoding, 5.1 and 7.1 MultistreamDecoder splits a packet into its elementary streams by the self-delimiting framing of Appendix B and routes each stream's channels through the mapping table, silent channels included. Constructor takes the layout the container header carries (rate, streams, coupled, mapping), which is the shape the product already calls. The CELT N/4 FFT's 15-point stage is now radix-3 then radix-5 rather than a direct 15x15 evaluation, which is where a third of multichannel decode time was going: a real 7.1 film track went from 102x to 124x realtime. Checks (all in tests/conformance.rs): the mono, stereo and 5.1 Ogg-Opus fixtures decode to correlation 1.00000 per channel against libopus through ffmpeg; the 5.1 fixture's per-channel tones land in the RFC 7845 family 1 (Vorbis) order the reference produces, each channel carrying its own tone; decode speed is 430x realtime stereo (fixture and testvector01 music alike) and 236x realtime 5.1, against floors of 135x and 104x. The twelve RFC vectors are unchanged. An env-driven sweep (EC_OPUS_FILES, #[ignore]) runs the same comparison over real files.
feat(opus): SILK layer, hybrid frames and packet redundancyAhmet Kaan Gümüş · ece2a35
feat(opus): SILK layer, hybrid frames and packet redundancy Full RFC 6716 Section 4.2 decode in exact integer arithmetic: header and LBRR flags, gains, NLSF stage-1/stage-2 dequantisation with Laroia weighting, stabilisation and interpolation, LSF-to-LPC conversion with prediction-gain limiting, pitch lags and LTP filters, shell-coded excitation with LSBs and signs, LTP and LPC synthesis, stereo unmixing, and the output resampler for 8/12/16 kHz internal rates. The Opus layer now joins the two layers: SILK-only, hybrid (SILK below 8 kHz plus CELT above), and the redundancy frames that carry a mode switch across a packet boundary. Check: all twelve RFC 6716 vectors, decoded at 48 kHz stereo, match the reference range coder state on every one of 18075 packets, and score 96.96 to 100.00 % on the opus_compare metric (0 is the passing threshold). The three SILK-only vectors are sample-for-sample identical to the reference output. Unit checks cover the fixed-point helpers, gain dequantisation monotonicity and LSF stabilisation.