Commits
Commits on
a5441e893b7600aec0ba2cc81a55cad4b8837f2bFiltered to crates/ec-opus/src/silk_enc_write.rsClear filter2026-08-23
Merge branch 'lane-opus-silkq': 12k divergence diagnostics (r1/r2)Ahmet Kaan Gümüş · 3e24efaBrowse files
feat(opus-silkq/r3): libopus reservoir decay + gain-step bound in SILK rate loopAhmet Kaan Gümüş · 18042b3
feat(opus-silkq/r3): libopus reservoir decay + gain-step bound in SILK rate loop Debt-only bit reservoir decayed over 500 ms, gain search bounded to +-9 steps around an EMA-carried operating point, 5 kbps target floor, mid-heavy stereo split. Hybrid CELT min bytes 8 -> 3 (16k packets no longer expand). Speech gate: 12k .8081 -> .8526, 16k .8606 -> .8646 at +3.3% rate (was +12.9%), 24k .9036 -> .9146, 32k .9210 -> .9391. Stereo-SILK 16k synthetic floor .35 -> .33 (regression named in test).
2026-08-21
2026-08-20
feat(opus-hybrid): mono 20 ms SWB/FB hybrid packets (SILK 16 kHz + CELT from band 17)Ahmet Kaan Gümüş · a6d0278
feat(opus-hybrid): mono 20 ms SWB/FB hybrid packets (SILK 16 kHz + CELT from band 17) CeltEncoder::encode takes a start band and mirrors the decoder's start_band paths (no silence flag mid-stream, no postfilter bit, zeroed x below start, cleared energy history outside the coded span). SilkEncoder::encode_hybrid writes the chosen frame into a shared range coder and replay() advances the mirror from the finished payload. Encoder: Voip 20-40 kbps mono 20 ms -> config 13/15, reference's SILK rate share, no-redundancy flag under the decoder's exact presence rule, SILK input delayed 70 samples so both layers land at CELT's 120 (click-measured LB +121 / HB +120). Decoder gains a doc(hidden) per-layer mute for the tests.
feat(opus): SILK mode selection in EncoderAhmet Kaan Gümüş · 7f710e5
feat(opus): SILK mode selection in Encoder Encoder dispatches SILK per frame (mono, 960-sample frames, Voip application under 20 kbps) via set_mode/wants_silk/silk_choice, with a click-measured look_ahead split per bandwidth (NB 58, WB 50 samples at 48 kHz) and a zero-alloc scratch buffer for the SILK payload so the steady-state encode loop stays allocation-free.
feat(opus-silk): noise-shaping quantiser, gain-offset rate control, LTP scale by gainAhmet Kaan Gümüş · ba4dea4
feat(opus-silk): noise-shaping quantiser, gain-offset rate control, LTP scale by gain Closed-loop NSQ: output error fed back through A(z/0.96)/A(z/0.85) shaping with harmonic comb and voiced tilt, dead-zone pulse decision, quant_offset_type by signal type/energy, LTP scale index from the open-loop LTP gain. set_bitrate(bps): gain-index offset loop (<=3 trials on the range coder's own size) with a 4-frame reservoir; lands 8/12/16/24 kbps within +13%.
fix(opus-silk): LPC->NLSF polynomial sign, closed-loop LTP pick, conformance round tripAhmet Kaan Gümüş · 68c7064
fix(opus-silk): LPC->NLSF polynomial sign, closed-loop LTP pick, conformance round trip lpc_to_nlsf evaluated A(z) = 1 + sum a z^-k for a predictor-convention lpc (x ~= sum a x[n-k-1]); the decoder's nlsf2a thus got the anti-predictor and every synthesised frame rang. LTP codebook vectors are now picked per subframe against the reconstructed (quantised) history so pitch-loop feedback of quantisation noise cannot run away; the reconstruction keeps LTP prediction in sample units (g*exc + pred). silk_mono_nb_wb_roundtrip: synthetic NB 0.975 / WB 0.981, wav16-mono NB 0.9999 / WB 0.9996, range state equal every packet, ffmpeg decodes the Ogg clean.
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.