Commits
2026-11-24
ec-opus: CELT encoder replaced by a port of the libopus 1.6 float encoder (celt_flp: celt_encoder.c, bands, vq, quant_bands, pitch, MDCT/FFT); every Opus packet now byte-identical to libopus 1.6 across VoIP/Audio/LowDelay, mono/stereo, CBR/VBR, FEC on/off, 8-128 kb/s, 2.5-60 ms frames (CELT-only, hybrid, SILK, mode switches, redundancy)Ahmet Kaan Gümüş · e844676
ec-opus: CELT encoder replaced by a port of the libopus 1.6 float encoder (celt_flp: celt_encoder.c, bands, vq, quant_bands, pitch, MDCT/FFT); every Opus packet now byte-identical to libopus 1.6 across VoIP/Audio/LowDelay, mono/stereo, CBR/VBR, FEC on/off, 8-128 kb/s, 2.5-60 ms frames (CELT-only, hybrid, SILK, mode switches, redundancy) - tonality analysis bit-exact: opus_fft instead of the conjugate inverse FFT, double-precision log/log10/sqrt/floor where libopus uses them, input clamp at +6 dBFS, lsb_depth silence test; always on (libopus runs it at complexity >= 7), detected bandwidth always applied - libopus low-rate TOC-only packets; self-delimited and multistream 40/60 ms framing; CBR padding is zeros - hybrid HB_gain is 1 - 2^(-celt_rate/1024) (float SHR32 is a no-op); LowDelay runs dc_reject with total_buffer 0 - silk_LPC_fit chirp constant SILK_FIX_CONST(0.999, 16) = 65470 (was 65471), shared with the decoder - prev_channels tracked every frame, so stereo->mono switches take libopus's two-frame toMono path - i16 encode() uses lsb_depth 16 like opus_encode - old celt_enc.rs encoder, Encoder::last_celt_diag and the probe tests built on it removed
ec-opus: libopus 1.6 opus_encode_native decisions and switch mechanicsAhmet Kaan Gümüş · e7e5914
ec-opus: libopus 1.6 opus_encode_native decisions and switch mechanics - decide(): stateful port of the libopus mode/bandwidth/stream-channel logic (prev_mode +-4000 hysteresis, auto_bandwidth hysteresis, first, allowBandwidthSwitch / inWBmodeWithoutVariableLP gating, voice_ratio from analysis music prob, stereo_width, decide_fec, SILK<->hybrid by bandwidth); auto-mode configs match libopus on every frame (mono speech, VoIP/Audio, CBR/VBR, FEC on/off, 8-64 kb/s) - redundancy: 5 ms CELT redundant frames CELT->SILK and SILK->CELT, silk_bw_switch, compute_redundancy_bytes, SILK budget minus redundancy, redundancy signalling, rangeFinal ^= redundant_rng; SILK prefill on CELT->SILK and bandwidth switch; CELT reset + 2.5 ms prefill on mode change - stereo: stream_channels mono downmix in CELT (CELT_SET_CHANNELS) and SILK, toMono, TOC stereo bit, stereo width + stereo_fade - hybrid VBR: unconstrained CELT at max(501, bitrate - silk rate), SILK offset to CELT, HB_gain gain_fade; hybrid VBR bytes within 0.5% of libopus (was +10%) - 40/60 ms CELT/hybrid: per-20 ms budget, repacketizer code 1/2/3 + CBR padding, per-sub-frame analysis info - delay buffer moved to the Opus layer (libopus delay_buffer) - SILK-only stays byte-identical to libopus, including bandwidth-switch packets (except the CELT redundant tail)
ec-opus: SILK encoder replaced by a port of the libopus 1.6 float encoder (silk/float, enc_API.c, resampler, NSQ/NSQ_del_dec, LBRR, stereo LR->MS); SILK packets byte-identical to libopus for NB/MB/WB, mono/stereo, 10/20/40/60 ms, VBR and CBR (opus_packet_pad padding), FEC on; libopus Opus-level glue: SILK rate rules, VoIP hp_cutoff / dc_reject input filter feeding every layer, opusCanSwitch bandwidth switching, CBR <15 kb/s hybrid->WB cap, peak energy tracked every frame; CELT input alignment (312-sample delay) on by default except LowDelay, so CELT/SILK/hybrid share one look_ahead; hybrid CELT layer no longer starts every frame with 4 ms of zeros (HF +1..+5 dB bias gone); range coder clears its tail on done like ec_enc_done; silk_log2lin clamp and silk_ADD_POS_SAT32 semantics fixed; old SilkEncoder/SilkStereoEncoder API removedAhmet Kaan Gümüş · 3d2e08fBrowse files
ec-opus: SILK packet loss concealment (port of libopus silk/PLC.c: conceal, update, glue frames, BWE after loss, voiced->unvoiced transition); Decoder::conceal, decode_fec without LBRR and DTX frames now use it for SILK/hybrid; SilkDecoder::decode takes SilkFrameMode {Normal, Lbrr, Lost}Ahmet Kaan Gümüş · 86fb0f3Browse files
ec-opus: in-band FEC (SILK LBRR): Encoder::set_inband_fec/set_packet_loss_perc (libopus decide_fec, loss-aware equiv rate, FEC forces SILK/hybrid; mono SILK/hybrid 10/20 ms), Decoder::decode_fec (LBRR decode, hybrid CELT band concealment, PLC fallback); interop with libopus 1.6 both ways; FEC-off output unchangedAhmet Kaan Gümüş · 90e21f2Browse files
2026-10-23
Restore edith_codecs after local data loss (2026-10-23)Ahmet Kaan Gümüş · b7434a2
Restore edith_codecs after local data loss (2026-10-23) On 2026-10-23 an automated agent ran `rm -rf $HOME` and deleted the local repository with all of its history. This commit restores the working tree from the newest surviving copy, the host-c server lane mirror. That mirror matches local main as of the testcut Phase 2 reports, including the tool cache, the nextest fast profile and changed-crates.sh. The history before this commit was not recovered.
2026-09-29
lane-av1ignorereasons: reason on all 15 bare #[ignore] in ec-opus conformanceAhmet Kaan Gümüş · c5351dd
lane-av1ignorereasons: reason on all 15 bare #[ignore] in ec-opus conformance Every bare #[ignore] in crates/ lives in crates/ec-opus/tests/conformance.rs. Each now names its unblock instead of being indistinguishable from a lost gate. Nothing un-ignored: the three gate-shaped bodies are blocked on the local media corpus, not on a defect. - encoder_library_gate_vs_libopus: the reelm@64k dropout that first failed it is fixed (lanes/opus-drop-r2.report.md, 0 ours-only dropouts on 14 rows), but the sweep is a ~12 min ffmpeg libopus run over a local music corpus and SKIPs missing sources, so un-ignoring would leave a 6-of-7-row gate. - silk_library_gate_vs_libopus: hard-asserts a local source wav that is no longer present on this host. - celt_click_peak_offset: ran it, +120 samples at 32/64/128k, but zero asserts. Suite: 63 passed, 16 ignored (reasons now printed). cargo check --all-targets clean.
ec-opus: a missing RFC 6716 vector FAILS under EC_REQUIRE_FIXTURESAhmet Kaan Gümüş · 168b491
ec-opus: a missing RFC 6716 vector FAILS under EC_REQUIRE_FIXTURES
`rfc6716_test_vectors` continued past every absent vector with a bare
eprintln, so on a worktree -- no gitignored root `fixtures/` -- the whole
RFC 6716 Section 6 conformance claim was decided by zero vectors, green.
The per-vector arm now names the exact missing path, `scripts/link-fixtures.sh`
and `scripts/fetch-vectors.sh`, and fails under EC_REQUIRE_FIXTURES=1. The
`if path.exists()` arms at the two robustness/perf sites are optional-input
blocks inside tests that do not assert on them, so they stay as they are.
Red: EC_REQUIRE_FIXTURES=1 with `fixtures/` unlinked fails
rfc6716_test_vectors ("RFC 6716 test vector testvector01 missing at
.../opus_testvectors/testvector01.bit -- this gate would prove nothing").
Green: 1 passed with `fixtures/` linked (179.2s).2026-09-06
test(opus): print the analysis bandwidth histogram in the diagnostics testAhmet Kaan Gümüş · 38347b4
test(opus): print the analysis bandwidth histogram in the diagnostics test The detected-bandwidth clamp needs analysis.bandwidth <= 18 to do anything; on every gate source it is 20 on every valid frame (hein 20:1500, reell 20:1498, reelo 20:1499), which is why EC_OPUS_BW_DETECT reproduces the shipped rows byte for byte.
perf(opus): run the tonality analysis once per API frame, and only when readAhmet Kaan Gümüş · 54d9580
perf(opus): run the tonality analysis once per API frame, and only when read libopus's opus_encode_native runs run_analysis() on the API frame before the SILK/CELT mode decision, so the estimator belongs to Encoder, not to the CELT layer: hoisted, its result threaded into celt.encode at both call sites, state now advancing on SILK frames too. It also cost ~25% of the encoder while every one of its bitstream consumers ships off, so it now runs only when something reads it -- any consumer switch, EC_OPUS_ANALYSIS=1, or the new Encoder::set_analysis. 5.1 384k goes 100x -> 123x realtime, mono 96k 433x -> 557x; the music_prob oracle test is unchanged against libopus (hein .161/.155/ -.0875/.568, reell .991/.362/-.1680/.701, reelo .976/.312/-.1332/.735).
test(opus): pin the ported analysis against a patched-libopus trace (music/tonality/slope/activity means)Ahmet Kaan Gümüş · 8d3a184Browse files
feat(opus): port libopus's tonality analysis (MDCT features + MLP music_prob), consumers behind switchesAhmet Kaan Gümüş · 2d08e3d
feat(opus): port libopus's tonality analysis (MDCT features + MLP music_prob), consumers behind switches The analysis runs on the undelayed API frame exactly where opus_encode does; alloc_trim's tonality_slope term and compute_vbr's tonality/activity terms are wired but default off pending their gate rows. music_prob separates the gate's speech source (hein 0.161) from its music sources (reell 0.991, reelo 0.976).
test(opus): the oracle Ogg carries the encoder's pre-skip, and the combined aligned arm's rowAhmet Kaan Gümüş · 1387bbe
test(opus): the oracle Ogg carries the encoder's pre-skip, and the combined aligned arm's row oracle_decode wrote a 120-sample pre-skip whatever the stream's delay was, so comparing it sample-for-sample against our own decode at the advertised offset was 192 samples out under the alignment (hybrid_fb_roundtrip: oracle corr 0.028). It takes the pre-skip from the caller now; the hybrid site passes the encoder's look_ahead, and all seven rewritten lag tests pass with EC_OPUS_ALIGN=1 as well as with the default. r7 (two-pass coarse energy + tf boost k=1.25 on the aligned tree) is the best combined arm and still leaves the same seven rows worse; its row is in the table at set_libopus_input_alignment.
wip(opus): aligned-spectrum re-sweep snapshot at the agent capAhmet Kaan Gümüş · d5ed044Browse files
feat(opus): the libopus input alignment ships behind a knob, off, with its gate tablesAhmet Kaan Gümüş · 02f91a2
feat(opus): the libopus input alignment ships behind a knob, off, with its gate tables
set_libopus_input_alignment(true) feeds the CELT layer the input delayed by
delay_compensation = Fs/250 and runs libopus's 3 Hz dc_reject on every frame
first; look_ahead and the hybrid SILK delay follow it (120 -> 312). The
alignment is exact: on the reell attack frame all eight low bands land within
.0006 of libopus (unaligned: .06-.21 apart).
It defaults OFF because the 12-row library gate rejects it and the constants
fitted on the misaligned spectrum do not explain the loss: delay only is 7
better / 5 worse, delay+dc_reject 5/7, and two-pass coarse energy, the
continuous 1.3 alloc_trim and tf boost k=1.25/1.5 each leave the SAME seven
rows worse (nik@64/96, her@96, dl8a@64/96, hein@64/96). Tables at the setter,
rows in lanes/opus-opusx2-r{1..5}.sweep.txt.
A conformance test drives the knob end to end: with it on the round trip
correlates at the advertised 312 and worse at 120.feat(opus): libopus dc_reject on the API input, and lag-dependent tests read look_aheadAhmet Kaan Gümüş · 0151578
feat(opus): libopus dc_reject on the API input, and lag-dependent tests read look_ahead The CELT input delay is back (revert of the revert): the analysis window now sits where libopus's does. On top of it, opus_encoder.c's dc_reject -- a 3 Hz one-pole (coef = 6.3*cutoff/Fs, y = x - m, m = coef*x + (1-coef)*m, state per channel across frames) -- runs once on the API input before both layers, the way libopus filters into pcm_buf that silk_Encode and celt_encode_with_ec both read. libopus takes hp_cutoff instead for VOIP; not ported. The seven tests that compared at a hardcoded 120-sample lag now read the encoder's advertised look_ahead for the frame size they used, so they follow the layer's real delay: delayed_corr takes it as an argument, the Ogg pre-skip and the duration expectation come from look_ahead, and the hybrid lag window is centred on it. MultistreamEncoder grew look_ahead for the 5.1 file. Sweep knobs for the re-tune on the aligned spectrum: EC_OPUS_TWO_PASS, EC_OPUS_TRIM13 (the continuous 1.3 alloc_trim form).
Revert "revert(opus): drop the Fs/250 CELT input delay, keep the EC_OPUS_X_DEBUG bisect"Ahmet Kaan Gümüş · b1e155b
Revert "revert(opus): drop the Fs/250 CELT input delay, keep the EC_OPUS_X_DEBUG bisect" This reverts commit 901c6ac3a87baf445fcdc07171b4cd49cf19ef93.
perf(opus): CVBR transient boost measured whole; both halves rejected, reell lever namedAhmet Kaan Gümüş · 31589bd
perf(opus): CVBR transient boost measured whole; both halves rejected, reell lever named The per-frame census says our transient frames underspend libopus's at the same realised rate -- reelo@64 202 vs 229 bytes, her@64 216 vs 233 -- while the steady frames match to 2%. Two documented deviations sit in that mechanism, and both were re-measured on the 12-row library gate: r2 (`lanes/opus-opustr-r2.sweep.txt`) restores libopus CVBR whole: the x2 tf boost `2*(tf_estimate-.04)*target` plus the uncapped one-frame reservoir release. reell@64 2.697 -> 1.764 and reell@96 4.499 -> 2.114, the largest move any lane has made on those rows; against that, 5 rows regress and hein@64 loses .0030 corr. That corr loss is the same one that rejected the x2 on the old 14-row gate -- the rejection was recorded against reelm, whose rows no longer exist, so hein reproducing it exactly is what keeps the finding alive. r3 (`lanes/opus-opustr-r3.sweep.txt`) isolates the reservoir release: 3 rows better, 5 worse (dl8a@96 .374->.415, hein@96 .528->.555), reell unmoved. So the whole reell win in r2 belongs to the x2 term. Both reverted; the encoder is byte-identical to its parent apart from the env-gated tf debug print. The numbers and the upgrade path -- gate the x2 on content, since it pays on music transients and starves hein's speech -- are at the decision site in celt_enc.rs.
diag(opus): per-frame ours-vs-libopus decision dump; alloc_trim port rejected a third timeAhmet Kaan Gümüş · fddb8d4
diag(opus): per-frame ours-vs-libopus decision dump; alloc_trim port rejected a third time The 64k transient gap is an alloc_trim difference, not a tf or anti-collapse one. `frame_decisions_vs_libopus` decodes both bitstreams with our own decoder and prints, per frame or aggregated over transient/steady frames, the coded decisions: bytes, silence, intra, transient, anti_collapse, alloc_trim, spread, coded_bands, tf_res, pulses, fine_quant, band energies. `EC_OPUS_TF_DEBUG=1` adds the tf Viterbi's own metric/importance/selcost. Aggregated over 2000 frames at 64k, our alloc_trim is systematically higher than libopus's on every source -- +2.0 on transient frames (reelo 4.02 vs 1.99, reell 4.59 vs 2.68, her 5.83 vs 3.88) and +1.0 on steady ones -- which is exactly the missing `trim -= 2*tf_estimate` term plus the coarse pre-1.1 tilt ladder. Mean tf_res and anti_collapse rates agree within noise, so those are not it. Porting the libopus 1.3 float `alloc_trim_analysis` whole moves the 12-row library gate 5 rows better / 4 worse on err_ratio and costs corr on every row; the KEEP rule rejects it, and this is its third rejection. Numbers are recorded at the decision site and in lanes/opus-opustr-r1.sweep.txt. The reell/her pre-attack window is an ENCODER-side hole: our decoder replays libopus's own bitstream at the source's -110 dBFS ramp level (1.5e-12, 4.0e-10 per 120-sample hop) while our encoder's stream decodes to 1e-18 there.
perf(opus): two-pass coarse energy ships off; err_ratio at 64k is an outlier-window statisticAhmet Kaan Gümüş · 48b35d9
perf(opus): two-pass coarse energy ships off; err_ratio at 64k is an outlier-window statistic The 64k err_ratio gap is not band-energy fidelity. On every source whose ratio is above 1 the per-band mean log-energy error is LOWER than libopus's in nearly every one of the 15 compare bands; the ratio is carried by a handful of 40 ms windows, which opus_compare raises to the 4th power twice. The diagnostic now recomputes both sides' err with the worst k windows dropped (same denominator): source drop-0 drop-1 drop-8 drop-1% reell@64 2.697 1.025 0.992 0.918 her@64 1.103 0.995 0.962 0.955 reelo@64 1.510 1.563 1.217 1.036 nik@64 0.708 0.843 0.959 0.939 dl8a@64 0.552 0.540 0.586 0.957 hein@64 0.853 0.634 0.491 0.864 reell and her are ONE window each (a silence -> attack transition where our decode is orders of magnitude quieter than the source's -110 dBFS ramp while libopus tracks it); reelo is the only source with a distributed gap, and its worst windows are all transient frames. The mechanism ported whole meanwhile is libopus's two-pass coarse energy (quant_coarse_energy + quant_coarse_energy_impl badness, enc_start_state rewind): it codes both the intra and the inter-predicted pass and keeps the lower-badness one. Gated on the 12-row library gate it moved 6 rows better and 4 worse (reelo@64 1.510->1.581, her@64 1.102->1.135, her@96 1.052->1.059, nik@96 .982->.990 against dl8a .551/.374->.503/.346, hein .855/.528-> .771/.419, reelo@96 .940->.872, nik@64 .708->.703), corr within +.0001 everywhere, so under the KEEP rule (err_ratio not worse on any row) it ships behind TWO_PASS_COARSE_ENERGY = false with the numbers at the decision site. - range: EncSnapshot save/restore of the coder scalars plus the front bytes, so a trial pass can be rewound exactly. - conformance: the spectral divergence diagnostic gains reelo/nik sources, a SWEEP_TAG output name and the drop-k err recomputation; the hop-energy instrument gains HOP_KBPS.
wip(opus): two-pass coarse energy ported from libopus; per-band diagnosis at 64kAhmet Kaan Gümüş · e4775f2
wip(opus): two-pass coarse energy ported from libopus; per-band diagnosis at 64k - range: EncSnapshot save/restore of the coder scalars + front bytes, so a trial coarse-energy pass can be rewound (libopus enc_start_state). - celt_enc: quant_coarse_energy_impl returns badness; quant_coarse_energy codes both intra and inter passes and keeps the lower-badness one. - conformance: spectral divergence diag gains reelo/nik sources and a SWEEP_TAG output name; hop-energy instrument gains HOP_KBPS.
2026-08-23
docs(opus): err_map header names its own source tagAhmet Kaan Gümüş · b53cc33
docs(opus): err_map header names its own source tag The map test was generalised to any gate source (EC_ERRMAP_SRC/_KBPS/_TAG) but still printed a hardcoded "her@" header, so a reell or reelo map claimed to be her's. Header now uses the tag; module doc updated to match.
test(opus-reell/r3): error map generalised to any gate sourceAhmet Kaan Gümüş · 19ef3ae
test(opus-reell/r3): error map generalised to any gate source her_err_map_96k -> err_map_vs_libopus; EC_ERRMAP_SRC / EC_ERRMAP_KBPS / EC_ERRMAP_TAG select source, rate and output file, her@96 defaults kept.
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).
wip(opus-silkq/r1): SILK decoder index oracle; ours-vs-libopus per-frame table for worst secondsAhmet Kaan Gümüş · 8eefeccBrowse files
wip(opus-silkq/r1): per-second SILK diagnostic; pitch-continuity variant (off, measured harmful)Ahmet Kaan Gümüş · 9ba7193Browse files
feat(opus-mode/r1): libopus VoIP/Audio mode and bandwidth thresholdsAhmet Kaan Gümüş · bb2f32f
feat(opus-mode/r1): libopus VoIP/Audio mode and bandwidth thresholds Mode/bandwidth selection ported from opus_encoder.c (mode_thresholds blended by voice_est, voice/music bandwidth tables, SILK>WB -> hybrid, 40/60 ms cap). Speech gate rows are now all-auto with a MODE GATE; 4/4 rows pick the same mode as ffmpeg libopus on real speech (lanes/opus-mode-r1.sweep.txt).
test(opus-silk/r2): symmetric decode, lag assert, band-limited ref, ref modeAhmet Kaan Gümüş · 2417616Browse files
test(opus-silk/r1): SILK library gate vs libopus on real speechAhmet Kaan Gümüş · 11f9cfeBrowse files
feat(opus-sb/r1): port libopus dynalloc_analysis; decoder diag exposes allocationAhmet Kaan Gümüş · 698943d
feat(opus-sb/r1): port libopus dynalloc_analysis; decoder diag exposes allocation The old second-difference spike heuristic boosted the top coded band (14.4-18.7 kHz) by ~220-260 1/8-bit per frame on reelm/hein@64k where libopus gives 3, and starved 240-3000 Hz on short-block frames. The port (follower/median masking over long-window energies, stereo cross-talk, width-scaled boost units, CVBR halving, 2/3 cap) brings the per-band boost table to within a few 1/8-bit of libopus. Gate (reelm,hein,her,reell): reelm@64 gap +.0046 -> +.0037, hein@64 +.0031 -> +.0022, no row loses more than .0003 corr, drops 0, rate within 5%. CeltDecDiag gains alloc_trim/pulses/fine_quant/intensity/dual_stereo/ coded_bands/balance/offsets; new ignored test short_block_bits_vs_libopus prints the per-band allocation ours vs libopus (lanes/opus-sb-r1.bits.txt).
Merge branch 'lane-opus-64': transient_analysis port (her@96 err_ratio 10.1→1.2)Ahmet Kaan Gümüş · 06a72f9Browse files
feat(opus-64/r5): ship transient_analysis port; reject tf_estimate consumers by measurementAhmet Kaan Gümüş · aa1dd3a
feat(opus-64/r5): ship transient_analysis port; reject tf_estimate consumers by measurement libopus VBR boost and trim terms from tf_estimate both regress reelm/hein@64 (dropouts, rate -1.8%); transient counts now match libopus within 1.5%, so the remaining 64k residue is short-block coding, not detection. Spectral test gains SWEEP_KBPS, her/reelm/hein sources and a decoder-seen transient count.
test(opus): parametrise the startup hop-energy and band-window diagnosticsAhmet Kaan Gümüş · 488aada
test(opus): parametrise the startup hop-energy and band-window diagnostics HOP_SRC/HOP_MS recentre reell_startup_hop_energies on any source and instant; WIN_CENTRE recentres spectral_divergence_vs_libopus's per-band window dump; 'her' joins its source list. Used to name the her@96 residue: a missed right-channel HF transient at 88.29 s coded as a long block.
fix(opus): code tf_res=is_transient so transient frames keep short blocksAhmet Kaan Gümüş · 5b61429
fix(opus): code tf_res=is_transient so transient frames keep short blocks Raw tf_res=0 with tf_select=0 on a transient frame maps through TF_SELECT to +LM, merging the short blocks back into one long block and smearing the attack across the whole frame. The reference's no-analysis default codes tf_res[i]=isTransient (no change). reell err_ratio 21x -> 1.6x at 64 k and 24x -> 3.3x at 96 k; 14-row library gate green, no corr regression. Decoder diag gains tf_res/spread/anti_collapse; repro tests celt_silence_then_attack_decodes_bounded, reell_startup_hop_energies and celt_click_peak_offset; hybrid layer tolerance 2->3 and SILK-vs-CELT margin .005 re-sized against the sharper transient reconstruction.
opus: validate opus_compare_err against the C opus_compare (byte-exact)Ahmet Kaan Gümüş · 87603a5
opus: validate opus_compare_err against the C opus_compare (byte-exact) Six real pairs (source vs libopus, source vs ec-opus on reelm/dl8a/reell) agree with the C tool to 1e-6 in err. Negative Q and wide err ratios are the tool's designed behaviour on source-vs-lossy input, not a scale bug. Adds opus_compare_err_pinned_against_c (synthetic signal, C-pinned err) as a regression guard, plus two ignored harness entry points.
opus: encoder library gate vs libopus (equal-size sweep, dropout assert)Ahmet Kaan Gümüş · a3a2974
opus: encoder library gate vs libopus (equal-size sweep, dropout assert)
Adds encoder_library_gate_vs_libopus (#[ignore]) to the conformance
binary: 7 real sources x {64,96} kbps, libopus reference via ffmpeg,
ours at the reference's measured kbps, both decoded by ec-opus.
Asserts rate within 5% and no ours-only dropout seconds (corr<0.9);
reports corr gap and a spectral err ratio (report-only, unvalidated).
r1 result: rate worst -0.5%; dropout fires on reelm@64k.2026-08-21
2026-08-20
fix(opus-enc): look_ahead uses the same mono/20ms predicate dispatch doesAhmet Kaan Gümüş · cbcbe53
fix(opus-enc): look_ahead uses the same mono/20ms predicate dispatch does look_ahead() consulted only wants_silk() (bitrate/application), not the frame-size-and-channel check silk_choice()/hybrid_choice() apply before encode_toc_and_payload actually picks a layer. A Voip/low-bitrate encoder fed frame sizes other than 20 ms coded CELT but reported SILK's shorter delay, throwing off the Ogg pre-skip by the difference. look_ahead now takes the frame size and runs it through silk_choice, matching dispatch exactly. Also gives zero_stuff_mono a reusable Encoder-owned scratch buffer instead of a Vec allocated per SILK/Hybrid frame — the zero-alloc steady-state claim previously only held on the CELT path.
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.