Commits
Commits on
e12d32fe3eccdd43c66cf72b83a8a47fe5cb36aaFiltered to crates/ec-opus/src/stack_budget.rsClear filter2026-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 comfort noise (silk/CNG.c, bit-exact vs libopus 1.6 SILK PLC), Encoder::set_dtx (libopus DTX: TOC-only packets after 200 ms inactivity, 400 ms refresh), LBRR for stereo 10/20 ms and mono 40/60 ms, loss-driven LTP scaling (silk_LTP_scale_ctrl), MultistreamDecoder::conceal/decode_fec, MultistreamEncoder::set_inband_fec/set_packet_loss_perc; CELT noise PLC synthesizes long blocks like libopus; FEC-off output unchangedAhmet Kaan Gümüş · 237a87fBrowse 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-11-23
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-30
lane-stackbox: box the by-value fields in ec-opus, ec-ac3 and ec-vp9, and gate each crate on a measured boundAhmet Kaan Gümüş · 958901b
lane-stackbox: box the by-value fields in ec-opus, ec-ac3 and ec-vp9, and gate each crate on a measured bound
Same class as ec-av1's stack sweep (d202b8b4): a large struct returned BY VALUE from a public
constructor is a stack cost the CALLER pays. The inventory from that lane named these; this lane re-measured
each one, boxed the dominant fields, proved no output changed, and added a per-crate gate.
ec-opus::Encoder 87,024 -> 4,072 (21.4x) silk_nb/mb/wb, silk_stereo_nb/mb/wb, silk_buf
ec-opus::Decoder 7,576 -> 1,280 (5.9x) silk (it was already at 92.5% of budget)
ec-ac3::Ac3Decoder 20,024 -> 3,160 (6.3x) Core::exps/bap/coeffs/delay
ec-vp9::Decoder 10,944 -> 768 (14.3x) frame_ctxs: Box<[FrameContext; 4]>, ctx: Box<FrameContext>
API COMPATIBILITY: no public field type changed in any of the three crates -- ec-opus::Encoder/Decoder
and ec-vp9::Decoder have private fields, ec-ac3::decode::Core is pub(crate) and Core itself is
crate-private, and every public method signature (Encoder::new, Decoder::new, Ac3Decoder::new,
Ac3Decoder::with_options, vp9::Decoder::new) is untouched. The only observable change is a few extra
heap allocations AT CONSTRUCTION, not on the per-frame path.
NO OUTPUT CHANGE, per crate, before vs after: ec-opus lib 36/0 -> 42/0 (the +6 are the new gates) and
conformance 28/0/16 -> 28/0/16 unchanged (its closed-loop range-state-exact gate against the
RFC-vector-verified decoder); ec-ac3 lib 36/0 -> 43/0 and both matrices 8/0 and 6/0 unchanged; ec-vp9
lib 10/0 -> 16/0 and ALL eight bit-exactness integration families unchanged (keyframe 3, inter_pixels 3,
hbd 1, subsampling 3, odd_dimensions 2, scaledref 3, intraonly 1). Main re-ran the three crates' lib
suites on the branch: 42/0, 16/0, 43/0.
DELIBERATELY LEFT INLINE: ec-opus::Encoder::analysis (2,168) + celt (1,592) -- together already under
budget, so a Box per field buys no bound and costs a per-frame indirection on a hot path. ec-vp9::Picture's
public fields are 96 B of Vec handles, not a stack cost. A measurement, not a shrug.
Gate modules: crates/{ec-opus,ec-ac3,ec-vp9}/src/stack_budget.rs, same shape as ec-av1's (inventory
printer, bound asserted by name, a real small-thread capability arm, non-vacuity control).
PRE-EXISTING REDS CARRIED, not caused here: ec-ac3
encode_matrix::real_fixtures_round_trip_through_our_decoder_and_the_oracle and ec-vp9
keyframe_exact::lossless_64_matches_ffmpeg both fail NotFound on a missing fixture (the same
fixture-root shape the fixture-library verifier complains about); and ec-vp9 generates 5 warnings
(unused read_partition, TM_PRED, partition_probs, x_mis, y_mis) which are present on main too.