forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on b6d1cd3f1730677ecb1b68c51fe03e797c457d42

2026-08-23

opus: VBR target shaping with activity cut and credit banking (celt)Ahmet Kaan Gümüş · b6d1cd3
opus: VBR target shaping with activity cut and credit banking (celt)

The reelm@64k dropout second was reservoir arithmetic: quiet frames
spent the flat rate at reservoir 0, the following transient run went
into debt, and the two loudest frames starved at 135 B vs libopus 252 B.
Port libopus compute_vbr shaping: activity cut below .4 (peak band
level proxy, no tonality analysis), tot_boost and tf terms, floor-depth
and 2x caps; release reservoir debt at most 8 B/frame and floor the
reservoir at -8x rate so quiet runs bank credit for attacks.

14-row library gate: 0 dropout rows, rate -1.1%..0%, 12/14 corr >= ref,
worst change her@64 -0.0002.
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.
vorbis: report r3 — headroom tilt, 14-row sweep 11/14 at equal sizeAhmet Kaan Gümüş · fbafcda
vorbis: report r3 — headroom tilt, 14-row sweep 11/14 at equal size

Full equal-size sweep on the winner: mean corr gap .0153 -> .0031,
11/14 rows pass (baseline 2/14). reelm@96/128 and hein@96 remain
(rate overshoot at 79 kbps reference, HF droop files).
test(vorbis): per-second dropout gate in the library sweepAhmet Kaan Gümüş · 4174c4b
test(vorbis): per-second dropout gate in the library sweep

A post-transient silence is invisible in whole-file corr and bimodal per second,
so the sweep now traces corr per second and fails any row with a second under
0.9 where libvorbis is not. Proven both ways on reelm.wav: main 0 dropout
seconds (min-second .911/.934 vs ref .927/.950); reservoir disabled 357/295
seconds, min-second .117.
docs(vorbis): floor geometry refuted as the equal-size lever (lane-vorbis-floor r1)Ahmet Kaan Gümüş · 6937294
docs(vorbis): floor geometry refuted as the equal-size lever (lane-vorbis-floor r1)

Mean gap on 8 rows: 12 posts .01525, 16 .01786, 24 .02171, 32 .02594, Bark@12 .02163.
Bits per non-zero and non-zero count do not move with the post grid; the step is set
by the peak-hold floor, not the grid. Baseline band/bit tables kept for the next round.
Merge branch 'lane-vorbis-psy': band-error and bit-split oracles locate the libvorbis gapAhmet Kaan Gümüş · f21c50b
Merge branch 'lane-vorbis-psy': band-error and bit-split oracles locate the libvorbis gap

Instruments only; encoder output byte-identical to 4b007cd (reelm 120 s 128k, cmp).
Per-Bark-band NSR vs libvorbis at equal size on 7 library sources x {96,128}k:
the gap sits at 300-1080 Hz (dNSR +9..+15 dB) where we code 45-57% as many
non-zero residues at 1.5-2.1x the bits each; HF droop (15.5-24 kHz, -5..-19 dB)
on nik/reelm/hein is a second, source-dependent contributor. Package-merge
Huffman (01cfce6) changes main's book lengths and is not carried.
ec-vorbis: band-error + bit-split oracle vs libvorbis, 7 sources x {96,128}kAhmet Kaan Gümüş · 2f04c6e
ec-vorbis: band-error + bit-split oracle vs libvorbis, 7 sources x {96,128}k

Instrument test (ignored) folding the bit-split oracle into one pass:
band NSR/E vs source through our decoder, ours vs ffmpeg libvorbis at
matched rate. All 14 rows: bits/nonzero 1.48-2.12x ref on ~half the
nonzeros, dNSR concentrated 300-1080 Hz (+9..+15 dB), HF droop on
nik/reelm/hein only. Lanes files + report + round-3 handoff.

2026-08-22

Revert "perf(vorbis): length-limited Huffman via package-merge (cherry-pick 01cfce6)"Ahmet Kaan Gümüş · 427c236
Revert "perf(vorbis): length-limited Huffman via package-merge (cherry-pick 01cfce6)"

This reverts commit 8cdffcd2326bb25f2f830a3cbb1a484845341e07.
perf(vorbis): length-limited Huffman via package-merge (cherry-pick 01cfce6)Ahmet Kaan Gümüş · c52d51c
perf(vorbis): length-limited Huffman via package-merge (cherry-pick 01cfce6)

Base byte-identical to main's codebook.rs, applies trivially. Package-merge is
optimal under the 24-bit cap and Kraft-complete; identical bit counts claimed.
Byte-identity proof in this lane confirms encoder output unchanged.
test(vorbis): bit split oracle — floor vs residue bits per coded value (cherry-pick 107b096)Ahmet Kaan Gümüş · a4a1e96
test(vorbis): bit split oracle — floor vs residue bits per coded value (cherry-pick 107b096)

Decoder captures (floor bits, residue bits, packet bits) per block; histogram
report prints residue bits per non-zero for ours vs ref. Output stays
lanes/vorbis-psy-r1.histogram.txt.
test(vorbis): histogram shape metrics + -vn audio-only ref encode (cherry-pick 4db6f24)Ahmet Kaan Gümüş · 647bc2d
test(vorbis): histogram shape metrics + -vn audio-only ref encode (cherry-pick 4db6f24)

Rename output paths to lanes/vorbis-psy-r1.{histogram,sweep}.txt.
test(vorbis): decoder-side residue reference — valid histogram oracle (cherry-pick 5ede0ed)Ahmet Kaan Gümüş · 454cb75
test(vorbis): decoder-side residue reference — valid histogram oracle (cherry-pick 5ede0ed)

Resolve add/add conflicts in oracle.rs: keep both residue_histogram_vs_reference
(theirs) and real_library_sweep_vs_reference (ours); git auto-merged identical
ffmpeg_decode_limited/shellexpand bodies. Adapt capture hook to main's BlockConfig
(main has no residue_end field — codes full half*channels region, so coded=half).
fix(vorbis): bit reservoir stops the rate loop winding up on short-block runsAhmet Kaan Gümüş · fc5a0f8
fix(vorbis): bit reservoir stops the rate loop winding up on short-block runs

Blocks next to a short window are quantised with a forced minimum
precision the loop cannot lower, yet their overspend stepped the headroom
-2 dB each; a 16-32 block run drove it to the -24 dB floor, the floor sat
above the signal, and ~10 silent long blocks followed every transient:
200 ms dropouts at -20 dBFS on reelm.wav, per-second corr 0.27-0.70 where
libvorbis holds 0.99. Forced blocks now bank their excess as reservoir
debt that steady blocks repay at <=25% of a block's share, so the rate
still lands on target over about a second. reelm 128k: all 30 seconds
>= 0.9935; quiet_content_reaches_the_target_or_is_transparent, failing
since 5314f5a for the same reason, passes.

The library sweep joins the oracle binary (ignored, SWEEP_ONLY=name,...).
ffmpeg's libvorbis under -b:a is unmanaged VBR and lands 10-30% under
nominal on real music, so ours is encoded at the size libvorbis produced
and compared there (rate within 3%, correlation gap <= .005):

source  kbps  ours   ref    rate%  corr_ours corr_ref gap
nik     96    84.0   84.5   -0.61  0.9690    0.9903   0.0213
nik     128   115.5  115.8  -0.24  0.9838    0.9951   0.0113
reelo    96    81.5   81.8   -0.30  0.9739    0.9922   0.0183
reelo    128   109.1  108.6  +0.45  0.9868    0.9955   0.0087
her     96    89.9   89.9   +0.04  0.9668    0.9867   0.0199
her     128   123.5  124.9  -1.13  0.9810    0.9927   0.0117
reell     96    85.4   85.5   -0.12  0.9792    0.9923   0.0131
reell     128   121.3  120.9  +0.39  0.9914    0.9968   0.0054
reelm   96    80.5   79.3   +1.52  0.9796    0.9865   0.0069
reelm   128   93.5   91.0   +2.70  0.9890    0.9906   0.0017  PASS
dl8a    96    86.9   86.9   -0.01  0.9655    0.9916   0.0261
dl8a    128   118.7  117.8  +0.80  0.9826    0.9957   0.0132
hein    96    80.3   79.1   +1.53  0.9789    0.9869   0.0080
hein    128   92.8   90.7   +2.31  0.9883    0.9906   0.0023  PASS

Rate tracks on every row; the remaining gap is the psychoacoustic model,
not dropouts.
test(ec-hw): slice headers count frames for stateful decodersAhmet Kaan Gümüş · 645d130
test(ec-hw): slice headers count frames for stateful decoders

Phone-class HW decoders order output from frame_num / POC; a stream whose
every slice says 0/0 judders there while desktop decoders play it cleanly
(seen on edith main's cros-codecs exports, where radeonsi writes the slice
header). ec-hw packs its own slice headers, so prove it: 64-frame P-runs
through the GPU, ffmpeg trace_headers read back — H.264 frame_num steps
+1 mod MaxFrameNum under POC type 2 with level_idc from dims+fps, HEVC
slice_pic_order_cnt_lsb steps +1. Also proves packed slice headers do not
hang the VCN ring on radeonsi for either codec.
Merge branch 'lane-names': prose names the replaced crates by roleAhmet Kaan Gümüş · 272e46f
Merge branch 'lane-names': prose names the replaced crates by role

Eight comment and doc lines across six crates named the incumbent decoders, encoders and readers this workspace replaced; they now describe the role (the incumbent AAC encoder, the incumbent MP3 encoder shim, the incumbent DEFLATE backend, the incumbent reader) with every version and measurement kept. Identifiers, dependency lines, shim package names and their own surface docs, and the ffmpeg oracle's encoder ids are unchanged by design.

2026-08-21

Merge branch 'lane-h264rd': transform-8x8 RD priced by full syntax bit delta and standard lambda, QP clamp removed, rd-ablation instrumentationAhmet Kaan Gümüş · 5aa2305
Merge branch 'lane-h264rd': transform-8x8 RD priced by full syntax bit delta and standard lambda, QP clamp removed, rd-ablation instrumentation

Default output is byte-identical to main (16/16 SHA pairs across two sources, four QPs, CABAC and CAVLC). The opt-in transform_8x8 path now prices 4x4-vs-8x8 and intra mode choices with the cloned entropy writer's whole-macroblock bit delta and the reconstruction SSD at a standard lambda, and the qp>=30 clamp that hid the QP-30 over-purchase is gone. The non-default rd-ablation feature adds env-driven lambda/eligibility/row-parity knobs and a pre/post-deblock SSD trace; without the feature the knob code is compiled out. Measured and documented: under CABAC the opt-in 8x8 path still trails flag-off on real content at matched rate (-0.10 dB natural-720p, -0.02 obs-1440p), the loss is super-linear in 8x8 adoption, and intra 4x4 on screen text is deblock-under-costed — the named follow-up slice.
test(h264): roweven ablation modeAhmet Kaan Gümüş · 817a995Browse files
Merge branch 'lane-aviseek': indexed AVI audio seek — idx1-driven, bounded reads, landing within one chunk of the target; real-file and synthetic seek oraclesAhmet Kaan Gümüş · 90d597a
Merge branch 'lane-aviseek': indexed AVI audio seek — idx1-driven, bounded reads, landing within one chunk of the target; real-file and synthetic seek oracles

Seeks on AVI audio now walk the idx1 table instead of the stream start (1.8 GB film: 1.3-2.7 KB read, <4 ms per seek), the compressed-codec one-second pre-roll subtraction that landed every seek ~24 chunks early is gone, SyncAfter rounds its unit conversion upward, and the index size is asserted bounded. Oracle tests compare post-seek PCM against the reference decoder at 10/50/90% on the user's AC-3 AVIs and a generated MP3 AVI (corr >= 0.999, lag 0).
fix(h264): unify 8x8 RD lambdaAhmet Kaan Gümüş · 67fd459Browse files
test(probe): avi seek oracleAhmet Kaan Gümüş · 24272c3Browse files
fix: bound avi audio seekingAhmet Kaan Gümüş · 63bf445Browse files