Commits
Commits on
cdccbc2f662cc4e4dda0e2d99d7faf0ca5577064Filtered to crates/ec-ac3/src/decode.rsClear filterToday
ec-ac3 E-AC-3 SPX noise: match ffmpeg eac3dec.c. Root cause: noise came from a separate LFG (decode.rs spx_noise) and was the integer dither mantissa scaled by sqrt(3); ffmpeg draws the raw word from the shared dith_state as (int32)w * nblend*rms*coord/INT32_MIN with nblend=sqrt(3*nratio) (ac3dec.c spx_coordinates, eac3dec.c apply_spectral_extension). Fix: nblend=sqrt(3*nratio), noise from core.dither.next_word(). Evidence: csi_miami_5.1_256_spx_small.eac3 was ch0 rms 6.2e-5, ch2 1.6e-3, ch3 corr 0.9978; unrun, orchestrator to verifyAhmet Kaan Gümüş · 5555e53Browse files
ec-ac3: coupling in ffmpeg's integer path (coord = (m+16)<<21>>shift, out = cpl*coord>>23 floor, phase negated after); float coupling left ~1 LSB of 2^-22 error per coupled bin, the 1e-6 floor on quiet channels (unrun: orchestrator verifies monsters ch0-2,4)Ahmet Kaan Gümüş · 325b192Browse files
ec-ac3: mantissas as 2^23 integers, floor-shifted by exponent like ffmpegAhmet Kaan Gümüş · 275e634
ec-ac3: mantissas as 2^23 integers, floor-shifted by exponent like ffmpeg ffmpeg n8.0 ac3dec.c ac3_decode_transform_coeffs_ch stores each mantissa (dither included, ac3dec.c:412, 466) as an int at 2^23 full scale and computes coeffs[freq] = mantissa >> exps[freq] before the float conversion (1/4194304 gain, ac3dec.c:1290). We multiplied floats by 2^-exp, so zero-bit dither and small mantissas on quiet bins kept bits ffmpeg drops (up to 2^-23 per bin, ~20% of a quiet bin). The LFG generator was already identical (av_lfg_init(0), never reseeded, ac3dec.c:124/156, default cons_noisegen=false); the mismatch was the rounding, not the noise. Symmetric levels and the dither now use ffmpeg's integer values (SYMMETRIC_DEQUANT, ac3dec_data.c:57). AHT and E-AC-3 spx/cpl paths are unchanged and still float.
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.2026-08-14
feat(ac3): AC-3 decoder — coupling, rematrixing, DRC and the public surfaceAhmet Kaan Gümüş · 5bc2be2
feat(ac3): AC-3 decoder — coupling, rematrixing, DRC and the public surface One packet is one syncframe; frames come out as interleaved f32 in the family's channel order, with an optional section 7.8 Lo/Ro downmix for callers that want stereo. Dynamic range compression is applied by default because section 7.7.1 says a decoder shall, with drc_scale to turn it down; dialnorm is surfaced and never applied. Every fixture decodes to a per-channel correlation of 1.000000 against ffmpeg (mono, stereo and 5.1 at 32/44.1/48 kHz).