Commits
Commits on
07af9dfde1eeadf9a983caf33259afa4b218e98b2026-09-16
vp9kf: drop the aw/ah locals the extent change orphanedAhmet Kaan Gümüş · 07af9df
vp9kf: drop the aw/ah locals the extent change orphaned filter_frame now takes mi_cols*8/mi_rows*8, so decode_keyframe_inner's aw/ah reads were dead (two new unused-variable warnings). Warning set is back to the base commit's five. keyframe_exact 4/4.
vp9kf: real-content sweep -- SB-padded plane buffers, honest Picture strides, and the desync it foundAhmet Kaan Gümüş · 3678cfd
vp9kf: real-content sweep -- SB-padded plane buffers, honest Picture strides, and the desync it found Adds crates/ec-vp9/tests/scratch_realsweep.rs (all-intra VP9 transcode of a real video, ours vs ffmpeg, per-frame diff counts) and scratch_tiledbg.rs. The library holds no VP9 content of its own, so this is the first time the keyframe path has seen real imagery - and it is NOT byte-exact: a real 320x240 frame is exact for rows 0-127 and wrong from row 128 down (19477/15337 diffs), i.e. the entropy decoder diverges at a block in SB row 2. "Byte-exact" was fixture-exact. Two real defects fixed (fixture suite re-verified green, 17 binaries): 1. Plane buffers were 8-aligned; libvpx decodes an edge block at full size and lets the overhang land in the frame border (decodeframe.c:1216). A 32x32 block at mi_row 132 of a 1080-row frame wrote 8 rows past the buffer and panicked at intra.rs:380. Buffers are now SB-aligned, and filter_frame gets the MI-aligned visible extent (the padded size OOB'd the level grid). 2. Picture::stride/uv_stride reported the aligned aw while the crop packs rows; a consumer trusting stride misread any non-64-aligned width. Now width/2. Reported, not fixed: multi-tile frames (ffmpeg's default at 1080p) refuse with 'Corrupt: truncated tile data' - either the tile walk or the tile-data offset is wrong for >1 tile, and 'corrupt' is the wrong claim until that is known. lanes/vp9kf.report.md carries the table, the next-lane charter seed, and a note that the fixture recipes were never recorded.
vp9kf: fix the stale tile-bounds pin in ec-vp9-syntax; record the merge follow-upsAhmet Kaan Gümüş · 0f31b1d
vp9kf: fix the stale tile-bounds pin in ec-vp9-syntax; record the merge follow-ups The lane's gates were crate-scoped (cargo test -p ec-vp9), so the merge into main is what surfaced a stale in-lib test: tile_bounds_match_the_spec_formulas still pinned the pre-lane model - (0,3)/(0,4)/(0,1) for 30/60/1 superblocks. libvpx's get_max_log2_tile_cols returns max_log2 - 1 (vp9_tile_common.c:45-49), so the values are (0,2)/(0,3)/(0,0), and a single-superblock frame reads NO increment bit (setup_tile_info's `while (max_ones-- && vpx_rb_read_bit(rb))` with max_ones == 0). The code was right; the test was old. Gates on main: ec-vp9 14 binaries green; ec-vp9-syntax 13/13 + 3/3; cargo check --workspace --all-targets clean; ec-hw lib 12/12. Also records in lanes/vp9kf.report.md: the merged/branch/removed-worktree state, the fixtures/vp9 copy main needed (fixtures/ is gitignored), the next-lane candidates, and the trace-hook/scratch-harness cleanup still open.
vp9kf: scratch_synth skips when its tmpfs fixture is goneAhmet Kaan Gümüş · 2a10cb5
vp9kf: scratch_synth skips when its tmpfs fixture is gone The probe parses /tmp/synth-kf-frame.bin, a dump produced ad hoc in an earlier session with no recorded generator. With tmpfs wiped it panicked, which made a scratch harness look like a regression in every workspace run. Print a SKIP line instead; the probe still runs whenever the dump exists.
vp9kf: drop crates/ec-vp9/src/decode.rsdecode.rsAhmet Kaan Gümüş · fcfe947
vp9kf: drop crates/ec-vp9/src/decode.rsdecode.rs A stale 620-line duplicate of decode.rs committed by accident in the first lane commit (7b94a0dc); not in the module tree (lib.rs declares `mod decode`, which resolves to decode.rs), referenced by nothing, superseded by the 877-line decode.rs. Found by reading the merge's create list.
vp9kf: keyframes byte-exact vs ffmpeg -- iadst16 stage 4, mask-driven loop filterAhmet Kaan Gümüş · 03cbf64
vp9kf: keyframes byte-exact vs ffmpeg -- iadst16 stage 4, mask-driven loop filter keyframes_match_ffmpeg PASSES: FRAME=1 pre-LF Y 1310 diffs -> post-LF Y/U/V 0 (FRAME=0: Y pre 746 -> post 0). Byte dumps are the evidence channel. 1. iadst16 stage 4 + output permutation, ported from inv_txfm.c:520-554: negated sum for pairs (2,3)/(14,15), (-x_i + x_j) for the second slot of (6,7)/(10,11), output[13] = -x13. Reverting this alone fails frame 1 at Y(120,68) 209 vs 210. 2. The loop filter is now driven by vp9_setup_mask's masks for luma AND chroma: build_masks/build_y_mask (blocks <16x16: only the first 8x8 touches the UV masks), then vp9_adjust_mask (TX_32->TX_16, 4-tap border promotion, rows/columns edge masks, rows==1 and rows==5 UV demotions, mask_uv_int for internal edges). All eight mask tables re-read against vp9_loopfilter.c:39-205 constant by constant. 3. Luma's V and H passes no longer interleave per mask bit (chroma already knew this); that was the last 19 Y diffs after the mask port. Dead code: LfGrids.tx4 (write-only, drops a per-frame mi grid), tables::uv_txsize_lookup and tables::BLOCK_INVALID (only user was the old chroma tx-grid walk). Warning count back to HEAD's 5. Suites: lib 8/8, keyframe_exact 4/4, dump_probe + 8 scratch harnesses PASS. scratch_synth still fails on the tmpfs-gone /tmp/synth-kf-frame.bin (pre-existing, fixture-dependent).
2026-09-14
vp9kf: chroma 64x64 border 4-tap is 8-tap (adjust_mask)Ahmet Kaan Gümüş · e2fa4f0
vp9kf: chroma 64x64 border 4-tap is 8-tap (adjust_mask) left_border_uv 0x1111 / above_border_uv 0x000f. U 16→7, V 20→11, Y still byte-exact. keyframes_match_ffmpeg still FAIL at U(31,11). Not pushed.
vp9kf: d153 row, idct32 stage 8, flat2 q0, chroma tx-grid — Y byte-exactAhmet Kaan Gümüş · 82ca712
vp9kf: d153 row, idct32 stage 8, flat2 q0, chroma tx-grid — Y byte-exact generic d153 no longer skips row 1; idct32 runs vpx stage 8; flat_mask5 compares q4..q7 to q0 (not p0). Pre-LF Y matches libvpx; post-LF Y matches ffmpeg. Chroma still 16 U + 20 V off (HANDOFF #6). Not pushed.
vp9-kf: loopfilter per-MI masks, 4-line kernel walk, flat_mask5 semanticsAhmet Kaan Gümüş · 9769de2
vp9-kf: loopfilter per-MI masks, 4-line kernel walk, flat_mask5 semantics - luma edge masks per-MI (internal MI boundaries of wide blocks filter; left/above_64x64_txform_mask rules), luma edge set now matches the instrumented-libvpx trace 3044/3044 anchors - lpf_edge walks the 4 pixel-lines of each chunk (was filtering only every 4th row/col) - flat2 follows flat_mask5's shifted params: q7 vs q0, no |q0-p0| clause - probes: EC_VP9_SKIP_LF, LFTRACE (ours + patched oracle), scratch_lfdump Y-plane dumps; HANDOFF #5 in lanes/vp9kf.report.md keyframes_match_ffmpeg still FAIL: first diff (76,2) 47 vs 48; pre-LF decode divergence from (88,24) tracked as the next dominant bug.
vp9kf: sub8x8 mode-ctx order, D117 anchor, 4x4 specialized predictors, have_right, ctx span read, SB walk units, loop-filter rewrite; lossless 4096/4096 (HANDOFF #4)Ahmet Kaan Gümüş · 7ed859cBrowse files
vp9kf: libvpx-1.15 marker bit, lossless ONLY_4X4 header, tile-info rows/cols bounds, tx-row left-ctx fix; oracle-diff HANDOFF #3Ahmet Kaan Gümüş · 76c8a77Browse files
vp9kf: entropy round 2 — trees, kf partition probs, 8x8 partition symbol, tile-info boundsAhmet Kaan Gümüş · c445467
vp9kf: entropy round 2 — trees, kf partition probs, 8x8 partition symbol, tile-info bounds - INTRA_MODE_TREE leaf order fixed to libvpx vp9_intra_mode_tree; the invented spec-doc chain UV_MODE_TREE deleted (v1.15 decodes uv with the same tree, decodemv.c:232). SEGMENT_TREE corrected to vp9_seg_common.c:58 balanced form. - Keyframes now code partitions with vp9_kf_partition_probs (added; spec 7.2), not the inter defaults. FrameContext::new(key_frame). - The 8x8-level partition symbol is read (decodeframe.c:1188 runs before the !hbs branch); sub-8x8 shapes occupy the full 8x8 mi area (luma 2x2 4x4 TUs, chroma 4x4 once per 8x8). bsize_of_n4 mapping fixed (2->16x16, 1->8x8). Duplicate kf_uv_probs removed from modes.rs (kept in tables). - ec-vp9-syntax DEVIATION (flagged for merge review): tile_cols_log2_bounds returned max-1, skipping the terminating tile-cols increment bit; bounds are now inclusive and rows mirrors vp9_get_tile_n_bits. Test re-pinned to libvpx/spec values (1920 -> (0,3), 3840 -> (0,4), 1 -> (0,1)). - keyframes_match_ffmpeg still FAILING (ours 120 vs 72 at pixel (0,0); was 133). inter_is_named_unsupported PASSES as a named Error. Debug traces (TILE/B/C/RC, EC_VP9_FORCE_TAIL) and scratch_* harnesses kept for the next round; see lanes/vp9kf.report.md HANDOFF #2.
vp9kf: ec-vp9 first lane scaffold — full keyframe pipeline (bool, header, tiles, modes, intra, tokens, transforms, loopfilter, stream) + extracted libvpx tables; bool roundtrips 7/7, profile-1 4:4:4 refusal pinned; byte-exactness vs ffmpeg still off (uv-mode entropy divergence, see lanes/vp9kf.report.md HANDOFF)Ahmet Kaan Gümüş · aee9373Browse files
docs(av1): arfmode keep-rule close -- default stays OFFAhmet Kaan Gümüş · 83675bb
docs(av1): arfmode keep-rule close -- default stays OFF server-1 unreachable; re-ran long-GOP on server-2 (control+arm2+arm3) and server-3 (control+arm7). Both controls reprint standing table to the digit (film A +20.9/-9.0, film B +70.4/-2.2). Arms vs same-server control (libaom): arm 2 +0.9/+0.6 worse, arm 3 +2.9/-0.3, arm 7 +4.9/+1.7. Bytes dropped, PSNR dropped more. Probe sign was wrong. Native skipped (ON required it). speed::ARFMODE stays [0; 11].
2026-09-13
Merge branch 'lane-arfmode' (89109746): the top-ARF offer-set bitmask ships default OFF and bit-exact (pins 8291/33227 at default and SPEED=6, witness fires and stays sample-exact) -- EC_AV1_ARFMODE offers no-intra / no-RD-8x8 / no-compound at the top ARF only; fresh census: the top-ARF gap is +2188 B/frame on film B, mode+partition+mv now 44%/38% of it (intra fallback 15% of area, compound 24%, 8x8-heavy partitions, NEW-mv 45%); server-1 gate chain (control already the standing table to the digit) delivers the deciding logs -- keep-rule read deferred to the next sessionAhmet Kaan Gümüş · 2171011Browse files
docs(av1): lane-arfmode report -- the top-ARF syntax gap re-censused at 0d81d6c5 (film B +2188 B/frame total, mode+partition+mv 44%/38% of it: intra-fallback CDF poisoning intra_inter 138 vs rav1e's 10 B/frame, compound at 19-24% of ARF area vs rav1e's 0%, 8x8-heavy partitions at 2.4x the split rate); EC_AV1_ARFMODE (default OFF, bit-exact, pins 8291/33227 hold at default and EC_AV1_SPEED=6): 1 no intra at the ARF incl. the whole-32 loop the probe proved is where the intra area lives, 2 no RD-optional 8x8 split, 4 no leaf compound; witness green (per-arm counters 580/113/568, stream moves, sample-exact through both decoders); two-point probe all arms engage on real content (printed counts 63k-131k/point), arm 2 -2.05%/-2.49%, arm 1 -0.28%/-2.61%, arm 4 -1.58%/-0.30% bytes at control PSNR; server-1 chain launched (control film A +20.9/-9.0 = standing table to the digit), arm gates and native pair PENDING on the running chain, disposition stays default OFF pending those logsAhmet Kaan Gümüş · e135fad
docs(av1): lane-arfmode report -- the top-ARF syntax gap re-censused at 0d81d6c5 (film B +2188 B/frame total, mode+partition+mv 44%/38% of it: intra-fallback CDF poisoning intra_inter 138 vs rav1e's 10 B/frame, compound at 19-24% of ARF area vs rav1e's 0%, 8x8-heavy partitions at 2.4x the split rate); EC_AV1_ARFMODE (default OFF, bit-exact, pins 8291/33227 hold at default and EC_AV1_SPEED=6): 1 no intra at the ARF incl. the whole-32 loop the probe proved is where the intra area lives, 2 no RD-optional 8x8 split, 4 no leaf compound; witness green (per-arm counters 580/113/568, stream moves, sample-exact through both decoders); two-point probe all arms engage on real content (printed counts 63k-131k/point), arm 2 -2.05%/-2.49%, arm 1 -0.28%/-2.61%, arm 4 -1.58%/-0.30% bytes at control PSNR; server-1 chain launched (control film A +20.9/-9.0 = standing table to the digit), arm gates and native pair PENDING on the running chain, disposition stays default OFF pending those logs
Merge branch 'lane-mp3-perf' (77032b83): ec-mp3 encode is 17x faster -- 139.9x RT stereo CBR (0.881 of rusty_mp3, was 0.052), 2h film's track ~51 s of encode wall; word-buffered emission, cost-only rate loop, cosine-table MDCT, one-walk table pricing, bracketed gain search, 8-lane SIMD quantiser; quality equal to pre-change to six decimals on all fixtures (two ulp-class byte moves disclosed and correctly attributed post-audit); suite green per commit; audit corrections ride in the reportAhmet Kaan Gümüş · e9ee943Browse files
docs(mp3): audit corrections -- f51fef8f was not byte-identical (6 bytes, ulp class, quality held), the ulp-flips were mis-attributed to the zero-byte gain-search step, the 2h wall arithmetic is ~51s, the SIMD f32 curve is boundary-flip-capable by constructionAhmet Kaan Gümüş · 326e1cbBrowse files
Merge branch 'lane-aacenc-perf' (465fa1fc): ec-aac encode is 3x faster -- 102.7x RT stereo (1.30x rusty, was 0.44x) and 44.4x RT 5.1 (1.46x, was 0.42x) -- band invariants hoisted, pow lookup tables, per-(channel,band,scalefactor) noise memo, rate-loop warm-start gallop; output byte-identical to base at every commit (auditor-proven on 6 HEAD configs + all 5 commits + 2 dep resolutions, counterfactual-verified); quality edge unchanged (96k stereo 0.8857 vs rusty 0.3858); threading declined (sequential seat API, target exceeded)Ahmet Kaan Gümüş · 1451897Browse files
docs(mp3): lane-mp3-perf r1 report — encode 0.052 -> 0.881 of the incumbent, target metAhmet Kaan Gümüş · c66696aBrowse files
perf(mp3): the region walk prices zero pairs once and drops out-of-range tables upfrontAhmet Kaan Gümüş · 5081e9a
perf(mp3): the region walk prices zero pairs once and drops out-of-range tables upfront The per-pair range check never fired: the shortlist is built from the region's maximum, so a candidate that would reject any pair rejects the one carrying that maximum, and the check now happens once per candidate before the walk. Zero pairs cost every candidate the same single code length and take a dedicated path. Same accept/reject decisions in the same order; seven of eight fixtures byte-identical (music3s inherited its one-ulp difference from the gain-search step, correlation unchanged to six decimals). Suite green. encode: stereo CBR 127.9x -> 139.2x realtime (ratio 0.886), VBR 67.5x -> 74.3x, mono tone 55.5x -> 78.3x.
perf(mp3): the quantiser runs the level curve eight lanes wideAhmet Kaan Gümüş · 59ae240
perf(mp3): the quantiser runs the level curve eight lanes wide quantise_span evaluates |xr·scale|^(3/4) for a whole band through wide::f32x8 (abs, cube, two sqrt lanes, clamp, copysign, trunc) with a scalar tail, replacing the per-line f64 closure that 30% of the mono profile and a fifth of the stereo one lived in. Overflow lanes land in the same MAX_QUANT clamp the scalar path uses; every bench fixture still encodes byte-identically and the suite is green. encode: stereo CBR 109.8x -> 127.9x realtime (ratio 0.819 vs the incumbent, target 0.7 met), VBR 55.7x -> 67.5x.
test(av1): enc_probe prints the arfmode engagement counter per point -- the probe's arm rows must print a non-zero count under EC_AV1_ARFMODE itself, not rely on the in-process witness (take_arfmode_hits is pub now, was cfg(test)); the first probe sweep never exported the knob and every arm row came back byte-identical to the control, which is how that class looks from the outsideAhmet Kaan Gümüş · 54adc86
test(av1): enc_probe prints the arfmode engagement counter per point -- the probe's arm rows must print a non-zero count under EC_AV1_ARFMODE itself, not rely on the in-process witness (take_arfmode_hits is pub now, was cfg(test)); the first probe sweep never exported the knob and every arm row came back byte-identical to the control, which is how that class looks from the outside
perf(mp3): the encoder stops shuffling its own buffersAhmet Kaan Gümüş · dcaf6bb
perf(mp3): the encoder stops shuffling its own buffers Three allocation/memmove habits from the profile's tail: the packet layer drained one frame at a time, memmoving the whole remaining push per frame (quadratic on a single large push); encode_block built a fresh deinterleave Vec per channel per frame; emit_frame cloned every held granule (subbands and thresholds) to satisfy a borrow that a drain before the loop removes. Byte-identical on all eight fixtures, suite green. encode: stereo CBR 96.0x -> 109.8x realtime (ratio 0.693), VBR 52.4x -> 55.7x.
perf(mp3): the gain search brackets instead of stepping one unitAhmet Kaan Gümüş · 59a18cf
perf(mp3): the gain search brackets instead of stepping one unit Instrumentation showed the rate loop running ~31 quantise-plus-plan evaluations per granule: the gain search walked one step at a time from the start estimate to the boundary. "Fits the budget without clipping" is monotone in the gain (a higher gain shrinks every line, and a smaller spectrum costs no more to code), so the boundary is now bracketed by a doubling stride from the start estimate and bisected — about 2·log2 of the distance instead of the distance, with the walk's gain-255 cap (the low-pass loop below still trims) and gain-0 floor kept exactly. Seven of eight bench fixtures still encode byte-identically; music3s moves a few ulp-boundary lines with decoded correlation unchanged to six decimals. Suite green. encode: stereo CBR 43.7x -> 96.0x realtime (ratio 0.608 vs the incumbent), VBR 20.9x -> 52.4x.
perf(aac): the outer rate loop warm-starts at last frame's working point and gallops to the edge -- bits fall monotonically as the offset rises, so fits-the-budget is true on an upper interval and the full-range bisection and a gallop from the previous frame's answer find the same left edge; steady state costs a probe at 240, one at the warm offset and two-to-three bracket probes instead of nine (warm_offset field, AacEncoder). The requant passes skip bands the +/-60 delta chain left alone (dirty vector) -- measured neutral on its own, kept because it is the same class of work the noise memo already avoids. Byte-identical on stereo 256k and 5.1 512k vs the base build; stereo 59.1 -> 103.1x RT (1.31x rusty_aac's 78.4x single-thread, was 0.44x at the lane start), 5.1 21.8 -> 44.3x (1.44x rusty's 30.8x); ec-aac suite green 75/75; quality rows unchanged (0.8857/0.9827/0.9829 worst-channel vs the same synthetic program, ec still clearing rusty on every one)Ahmet Kaan Gümüş · 17417bc
perf(aac): the outer rate loop warm-starts at last frame's working point and gallops to the edge -- bits fall monotonically as the offset rises, so fits-the-budget is true on an upper interval and the full-range bisection and a gallop from the previous frame's answer find the same left edge; steady state costs a probe at 240, one at the warm offset and two-to-three bracket probes instead of nine (warm_offset field, AacEncoder). The requant passes skip bands the +/-60 delta chain left alone (dirty vector) -- measured neutral on its own, kept because it is the same class of work the noise memo already avoids. Byte-identical on stereo 256k and 5.1 512k vs the base build; stereo 59.1 -> 103.1x RT (1.31x rusty_aac's 78.4x single-thread, was 0.44x at the lane start), 5.1 21.8 -> 44.3x (1.44x rusty's 30.8x); ec-aac suite green 75/75; quality rows unchanged (0.8857/0.9827/0.9829 worst-channel vs the same synthetic program, ec still clearing rusty on every one)
perf(av1): the ARFMODE intra arm cuts the top ARF's whole-32 candidates too -- the probe falsified the leaf-only scope (film A arm 1 byte-identical to the control at q150 AND q90: the ARF's 15% intra area lives in search_inter_block's whole-32 intra loop, not in the leaves), so the scene-cut hatch as chartered was a hatch nothing else was using; per-block engagement counter moved to the whole-32 site, docs updated, witness and pins re-greenAhmet Kaan Gümüş · 7ea5133
perf(av1): the ARFMODE intra arm cuts the top ARF's whole-32 candidates too -- the probe falsified the leaf-only scope (film A arm 1 byte-identical to the control at q150 AND q90: the ARF's 15% intra area lives in search_inter_block's whole-32 intra loop, not in the leaves), so the scene-cut hatch as chartered was a hatch nothing else was using; per-block engagement counter moved to the whole-32 site, docs updated, witness and pins re-green
perf(mp3): one walk over the region prices every candidate tableAhmet Kaan Gümüş · 19b1017
perf(mp3): one walk over the region prices every candidate table best_table walked the region's pairs once per shortlisted table (up to nine pair_bits passes per region) and plan_spectrum walked a tenth time to price the winner; half the remaining profile lived in that loop. The region is now walked once, accumulating every candidate's cost in parallel, with a dead candidate dropped the moment a pair falls outside it — the same accept/reject decisions in the same order, so every bench fixture still encodes byte-identically and the suite is green. The orphaned pair_bits helper is folded into the new walk. encode: stereo CBR 37.3x -> 43.7x realtime, VBR 17.8x -> 20.9x.
perf(aac): the frame's noise search is memoised per (channel, band, scalefactor) -- band_noise is pure for one frame's coefficients, and the outer bisection's probes re-ask the same pairs, so each pair computes at most once per frame (stamp/cur generation, no clearing pass); fresh NoiseMemo per write_frame, capacity channels*max_sfb*256. The first cut keyed (band, sf) only and the byte-identity gate caught it instantly: stereo's two channels collided in the slots and one channel replayed the other's noise (10x deltas) -- the key now carries the channel slot. Byte-identical on stereo 256k and 5.1 512k vs base; stereo 42.1 -> 59.1x RT, 5.1 15.6 -> 21.8x (quiet-core min-of-7, both harnesses agreeing); ec-aac suite green 75/75Ahmet Kaan Gümüş · 6d09e0a
perf(aac): the frame's noise search is memoised per (channel, band, scalefactor) -- band_noise is pure for one frame's coefficients, and the outer bisection's probes re-ask the same pairs, so each pair computes at most once per frame (stamp/cur generation, no clearing pass); fresh NoiseMemo per write_frame, capacity channels*max_sfb*256. The first cut keyed (band, sf) only and the byte-identity gate caught it instantly: stereo's two channels collided in the slots and one channel replayed the other's noise (10x deltas) -- the key now carries the channel slot. Byte-identical on stereo 256k and 5.1 512k vs base; stereo 42.1 -> 59.1x RT, 5.1 15.6 -> 21.8x (quiet-core min-of-7, both harnesses agreeing); ec-aac suite green 75/75
perf(mp3): the forward MDCT reads its cosine kernel from a tableAhmet Kaan Gümüş · f4ce2b8
perf(mp3): the forward MDCT reads its cosine kernel from a table mdct_long and mdct_short recomputed cos(pi/72(2n+19)(2k+1)) (and the short-block twin) with libm for every subband of every granule — 23% of the encode profile, and roughly the whole cost of the transform. Both kernels are now LazyLock f32 tables ([k][n], one dot product per output coefficient) built from the same angles; the f64 accumulation and the f32 windowing order are kept, so every bench fixture still encodes byte-identically and the crate suite is green. encode: stereo CBR 21.1x -> 37.3x realtime, VBR 13.0x -> 17.8x.
perf(av1): the top ARF's leaf offer set behind EC_AV1_ARFMODE -- 1 no intra candidate at the 16x16/8x8 leaves (the intra trial's commit was always overwritten by the inter winner's, so the planes never change), 2 no RD-optional 8x8 split (16x16 is the leaf floor; the spec-forced 8x8s at straddling 16x16s are a different site), 4 no compound candidates at the leaves; the 32x32 whole keeps its full set as the scene-cut hatch; default 0 is bit-exact (pins 8291/33227 hold at the default and EC_AV1_SPEED=6); witness proves per-arm engagement counters, stream movement on a level-ramp fixture (middle group's ARF sits between its two anchors), coding-order stability and sample-exact decode through decode_stream AND ffmpegAhmet Kaan Gümüş · 5e19f1a
perf(av1): the top ARF's leaf offer set behind EC_AV1_ARFMODE -- 1 no intra candidate at the 16x16/8x8 leaves (the intra trial's commit was always overwritten by the inter winner's, so the planes never change), 2 no RD-optional 8x8 split (16x16 is the leaf floor; the spec-forced 8x8s at straddling 16x16s are a different site), 4 no compound candidates at the leaves; the 32x32 whole keeps its full set as the scene-cut hatch; default 0 is bit-exact (pins 8291/33227 hold at the default and EC_AV1_SPEED=6); witness proves per-arm engagement counters, stream movement on a level-ramp fixture (middle group's ARF sits between its two anchors), coding-order stability and sample-exact decode through decode_stream AND ffmpeg
perf(mp3): the 3/4-power curve as cube and two square rootsAhmet Kaan Gümüş · 2d2451a
perf(mp3): the 3/4-power curve as cube and two square roots |xr·scale|^(3/4) ran libm powf for every line of every rate-loop round — 10.8% of the encoder's profile — and the noise pass re-ran band_gain's exp2 per line. Both are now per-band or table-free arithmetic (a cube and two sqrts in f64, one band gain per band); the short-block quantiser also stops searching for each line's band. Decoded correlations are unchanged to six decimals on every bench fixture (seven of eight byte-identical; music3s flips one ulp-boundary line). Suite green. encode: stereo CBR 18.2x -> 21.1x realtime, VBR 10.6x -> 13.0x.
perf(mp3): word-buffered granule bit emission, cost-only rate loopAhmet Kaan Gümüş · d97b1ac
perf(mp3): word-buffered granule bit emission, cost-only rate loop The profile was 45% inside BitWriter's per-bit loop and most of another 22% in code_spectrum's Vec<bool> round-trip: every rate-loop round wrote the granule's bits out and re-expanded them one bool per bit for the frame writer. BitBuf buffers the same MSB-first bitstream through a u64 accumulator; the rate loop now judges candidate gains by Huffman cost alone and the kept configuration is materialised exactly once. All eight bench fixtures encode byte-identically; the crate suite is green. encode: stereo CBR 8.2x -> 18.2x realtime, VBR 4.0x -> 10.6x.
perf(aac): the rate loop's per-coefficient powf becomes two lookup tables -- pow_quarter carries 2^(v/4) for every integer v in -155..=155 (band_noise's gain, quantise_one's reciprocal) and POW_HALF carries the bisection's 2^(offset/2) mask scale in -240..=240; every entry is built by the identical powf expression it replaces, so the values -- and the bitstream -- are unchanged. The band gain is hoisted to per-band granularity in band_noise and the requant pass instead of being recomputed per coefficient. Byte-identical on stereo 256k and 5.1 512k vs base; stereo 37.9 -> 42.1x RT, 5.1 14.2 -> 15.6x; ec-aac suite green (43+1+1+14, remaining two suites landed green)Ahmet Kaan Gümüş · 0fe46e1
perf(aac): the rate loop's per-coefficient powf becomes two lookup tables -- pow_quarter carries 2^(v/4) for every integer v in -155..=155 (band_noise's gain, quantise_one's reciprocal) and POW_HALF carries the bisection's 2^(offset/2) mask scale in -240..=240; every entry is built by the identical powf expression it replaces, so the values -- and the bitstream -- are unchanged. The band gain is hoisted to per-band granularity in band_noise and the requant pass instead of being recomputed per coefficient. Byte-identical on stereo 256k and 5.1 512k vs base; stereo 37.9 -> 42.1x RT, 5.1 14.2 -> 15.6x; ec-aac suite green (43+1+1+14, remaining two suites landed green)
docs(av1): lane-arfmode charter -- the top-ARF syntax gap re-censused at 0d81d6c5 (film B +2188 B/frame, film A +3528: mode+partition+mv now 44%/38% of it), carried by the intra fallback's CDF poisoning (intra_inter 138 vs rav1e's 10 B/frame on film B), compound at the ARF (ours 19-24% of area vs rav1e's 0%), and an 8x8-heavy partition mix (2.4x rav1e's split rate on film B); the lever is EC_AV1_ARFMODE (default OFF, bit-exact): bitmask of ARF-leaf-only offer-set cuts -- 1 no intra at 16x16/8x8 leaves, 2 no RD-optional 8x8 split, 4 no compound at leaves, 32x32 whole and spec-forced 8x8s untouchedAhmet Kaan Gümüş · 20925bd
docs(av1): lane-arfmode charter -- the top-ARF syntax gap re-censused at 0d81d6c5 (film B +2188 B/frame, film A +3528: mode+partition+mv now 44%/38% of it), carried by the intra fallback's CDF poisoning (intra_inter 138 vs rav1e's 10 B/frame on film B), compound at the ARF (ours 19-24% of area vs rav1e's 0%), and an 8x8-heavy partition mix (2.4x rav1e's split rate on film B); the lever is EC_AV1_ARFMODE (default OFF, bit-exact): bitmask of ARF-leaf-only offer-set cuts -- 1 no intra at 16x16/8x8 leaves, 2 no RD-optional 8x8 split, 4 no compound at leaves, 32x32 whole and spec-forced 8x8s untouched
perf(aac): rate-loop band invariants hoisted out of the offset probes -- per-band peak, energy, count and escape floor on the post-M/S coefficients are offset-independent, so write_frame computes them once per channel (band_profile) and every bisection probe reads them back instead of rescanning 1024 lines ten-plus times per frame; the redundant final cost probe at the bisection's end is gone (coded already is the probe at lo: hi only moves to taken probes and lo converges to hi). Byte-identical output on stereo 256k and 5.1 512k synthetic program vs the base build; stereo 34.4 -> 37.9x RT, 5.1 12.9 -> 14.2x; ec-aac suite greenAhmet Kaan Gümüş · 44ea57e
perf(aac): rate-loop band invariants hoisted out of the offset probes -- per-band peak, energy, count and escape floor on the post-M/S coefficients are offset-independent, so write_frame computes them once per channel (band_profile) and every bisection probe reads them back instead of rescanning 1024 lines ten-plus times per frame; the redundant final cost probe at the bisection's end is gone (coded already is the probe at lo: hi only moves to taken probes and lo converges to hi). Byte-identical output on stereo 256k and 5.1 512k synthetic program vs the base build; stereo 34.4 -> 37.9x RT, 5.1 12.9 -> 14.2x; ec-aac suite green
perf(aac): encode-speed witness -- examples/aacenc_rt prints the crate's encode realtime factor at the seat's rates (stereo 48k 256k, 5.1 48k 512k), deterministic tonal-plus-transient 10 s program, min-of-7 alternating repetitions, one warmup; baseline on the 9600: 34.5x stereo / 12.9x 5.1, byte counts matching the scratch A/B probe's byte-identity outputs exactly (320825 / 641810 B), so witness and probe drive the identical encode pathAhmet Kaan Gümüş · b1fb10a
perf(aac): encode-speed witness -- examples/aacenc_rt prints the crate's encode realtime factor at the seat's rates (stereo 48k 256k, 5.1 48k 512k), deterministic tonal-plus-transient 10 s program, min-of-7 alternating repetitions, one warmup; baseline on the 9600: 34.5x stereo / 12.9x 5.1, byte counts matching the scratch A/B probe's byte-identity outputs exactly (320825 / 641810 B), so witness and probe drive the identical encode path
2026-09-12
Merge branch 'lane-h264perf' (f24daaff): ec-h264 decode closes the B-frame CABAC gap 0.78 -> 0.930 vs rusty (4K +17.2%, 1080p Main +18.8%, 1440p +5.7%) -- bipred combining fused into MC (default + weighted paths per 8.4.2.3.1/8.4.2.3.2), CABAC renorm bulk-read, zero-fill bit supply; reviewer-caught defect fixed before merge: explicit-weight bipred chroma combines with CHROMA weights (per-component, witness fails pre-fix); golden FNV-1a hashes identical on all five fixture classes on both machinesAhmet Kaan Gümüş · d5d7c0aBrowse files
fix(h264): combine explicit-weight bipred chroma with chroma weightsAhmet Kaan Gümüş · 1b55d6c
fix(h264): combine explicit-weight bipred chroma with chroma weights The fused weighted path built its Put::AvgW once from the luma weight lookup and reused it inside the per-component chroma loop, discarding the loop's own per-component lookup. Luma and chroma prediction weights are independent syntax (separate log2 denoms, weights and offsets; absent entries default to 1<<denom), so an explicit-weight B bipred macroblock (weighted_bipred_idc == 1) whose chroma weights differ from luma's combined chroma with luma weights: wrong output bytes. The fixtures could not catch it (x264 B weights are implicit, hence component-independent) and no JVT vector covers it. The chroma loop now shadows weighted_put with one built from its own lookup. Witness: a decoder-level unit test drives an explicit-weight bipred macroblock with luma != chroma weights through compensate and asserts per-component output — verified to fail on the pre-fix code (cb 131 vs 165 at (0,0)) and pass post-fix. RefList::push and Plane8::extend_borders become pub(crate) as the test's constructors. Byte-exact A/B: all five fixture hashes unchanged. Suite green (80 lib + 23 conformance + 12 encode + 1 decode-first).
Merge branch 'lane-ac3-tail' (574a983e): ec-ac3 rejects a syncframe in a packet's tail instead of silently truncating it -- concatenated indep+dependent blocks (Matroska 7.1 DD+) now fail in words (dependent substream / second syncframe), container padding still decodes bit-identically; the silent 5.1-core-only path is closedAhmet Kaan Gümüş · 2ef29daBrowse files
🛡️ fix(ac3): a packet tail that begins a syncframe is refused by name, never dropped in silenceAhmet Kaan Gümüş · 49e4498
🛡️ fix(ac3): a packet tail that begins a syncframe is refused by name, never dropped in silence decode_frame decoded the first substream and discarded the rest of the packet (let _ = consumed) -- the shape a Matroska block for 7.1 DD+ really carries (independent substream plus its dependent): 1536 samples out, the extension channels gone, no error. Old decoders of record walked that tail, so the silent drop was a regression hiding under the named refusals. Now reject_tail runs after every successful frame: padding that is not itself a syncframe (the container slack the spec allows) still decodes sample-for-sample like the bare frame, but a tail that begins a syncframe is Unsupported naming what it is -- an E-AC-3 dependent substream in the tail (the 7.1 extension channels) or a second syncframe altogether (one packet is one frame and its substreams; hand frames over one at a time). A 0x0B77 coincidence that parses as no header stays junk. Witnesses in decode_matrix: concatenated real fixture frames (AC-3 and E-AC-3) refuse as second syncframes; the E-AC-3 tail flipped to dependent refuses with the dependent wording; padded frames decode bit-identically to bare ones. Fixture matrix vs ffmpeg stays green.
Merge branch 'lane-tplfut-arf' (93966dfb): docs-only -- the tpl-future-map-at-the-ARF lever already shipped across tplfut/tplhalf (the arffilt reconciliation's deferred line was a stale pointer); contribution re-measured on server-3 at d27a904d: EC_AV1_TPL_FUT=0 control +21.2/-8.9,+71.4/-1.6 vs shipped default +20.9/-9.0,+70.4/-2.2 (standing table to the digit), so the lever is currently worth film B -1.0/-0.6 and stays ON; witnesses re-proven incl. the [8,3] truncation engagement probe; pins 8291/33227Ahmet Kaan Gümüş · 9fcbbdfBrowse files
docs(av1): lane-tplfut-arf report -- the tpl-future-map lever the arffilt reconciliation defers is shipped prior art (stale-deferred-pointer, see charter f606fb57); no knob, no code change; witnesses re-proven at d27a904d (pins 8291/33227 at default and EC_AV1_SPEED=6, the future-window stream-moves + both-decoder witness, lookahead drain witness, every-preset exactness) plus a gate-shape blindness probe proving the 12-frame native arm IS its control (gop=12 one group of 11; a gop-32 probe is a false RED, the [8,3] truncation genuinely engages); server-3 first proven per the managed skill -- long-GOP control EC_AV1_TPL_FUT=0 (+21.2/-8.9, +71.4/-1.6) vs shipped-default arm (+20.9/-9.0, +70.4/-2.2, the standing table to the digit): the lever's current contribution is film B -1.0/-0.6, film A -0.3/-0.1, walls -0.3/-0.7 percent -- keep rule met, disposition stays default ON; native control five rows all to the digit (screen +13.7/-33.6 = intertx's documented delta); suite 592/0 three lanes, cargo check 0 errors 0 ec-av1 warnings (two pre-existing ec-vorbis oracle warnings named)Ahmet Kaan Gümüş · b9ff510
docs(av1): lane-tplfut-arf report -- the tpl-future-map lever the arffilt reconciliation defers is shipped prior art (stale-deferred-pointer, see charter f606fb57); no knob, no code change; witnesses re-proven at d27a904d (pins 8291/33227 at default and EC_AV1_SPEED=6, the future-window stream-moves + both-decoder witness, lookahead drain witness, every-preset exactness) plus a gate-shape blindness probe proving the 12-frame native arm IS its control (gop=12 one group of 11; a gop-32 probe is a false RED, the [8,3] truncation genuinely engages); server-3 first proven per the managed skill -- long-GOP control EC_AV1_TPL_FUT=0 (+21.2/-8.9, +71.4/-1.6) vs shipped-default arm (+20.9/-9.0, +70.4/-2.2, the standing table to the digit): the lever's current contribution is film B -1.0/-0.6, film A -0.3/-0.1, walls -0.3/-0.7 percent -- keep rule met, disposition stays default ON; native control five rows all to the digit (screen +13.7/-33.6 = intertx's documented delta); suite 592/0 three lanes, cargo check 0 errors 0 ec-av1 warnings (two pre-existing ec-vorbis oracle warnings named)
perf(h264): fuse the weighted bi-prediction combining pass into motion compensationAhmet Kaan Gümüş · 928abb0
perf(h264): fuse the weighted bi-prediction combining pass into motion compensation x264's default streams carry weighted_bipred_idc=2 (implicit), so most B partitions took the weighted combining path: two temporaries, a scalar per-sample combine, and a copy back. The combining formula of 8.4.2.3.2 is per-sample, so list 0 now interpolates straight into the picture and list 1 combines on top of it (Put::AvgW) with 8.4.2.3.2's exact integers — same tree, same rounding, on the same bytes. Non-fusable weights keep the temporary path. Byte-exact A/B vs d27a904d on the five fixture classes: all display-order frame hashes identical. ec-h264 suite green (79 lib + 23 conformance + 12 encode + 1 decode-first).
Merge branch 'lane-vp8-perf' (292b7093): ec-vp8 decode is 2.5-3.5x faster -- per-bool env lookups (46% of profile) to a process-wide atomic, loop-filter chunked loads with conditional stores, AVX2 six-tap + bilinear MC passes (MC 18% -> 3%); big-obs clip class 72 fps and 720p 276 fps crate-level, clearing the seat swap's un-park lines with margin; idct AVX2 attempted and honestly reverted (exact-i32 ceiling ~1.3-1.5x kernel); byte-exact witness suite green per commit, debug AND releaseAhmet Kaan Gümüş · ff9aa0eBrowse files
Merge branch 'lane-opusperf' (360d2703): ec-opus closes most of the gap to the FFT-built comparators -- PVQ pulse walk ported to the reference 1272-entry const U-table (O(N), 0-diff vs CELT_PVQ_U_DATA), rustfft backend with preallocated scratch, fast_atan2f stereo_itheta, bits2pulses fixed-row window: decode 0.93x ruopus-FFT (was 0.70), encode 0.74x opus-rs CBR with parity at 510k (was 0.59); fidelity gates green per commit (RFC 6716 vectors, libopus correlation, both feature configs), forbid(unsafe_code) holdsAhmet Kaan Gümüş · d2a09edBrowse files
refactor(ec-opus): bits2pulses row-window bound becomes a debug_assert (reviewer P3) - statically decidable from the unchanged CACHE_BITS table; the fixed-window copy still panics if the table ever outgrew itAhmet Kaan Gümüş · 70ebc17
refactor(ec-opus): bits2pulses row-window bound becomes a debug_assert (reviewer P3) - statically decidable from the unchanged CACHE_BITS table; the fixed-window copy still panics if the table ever outgrew it
ec-vp8: restore shared avx2 probe after idct revertAhmet Kaan Gümüş · 7ffca32
ec-vp8: restore shared avx2 probe after idct revert The revert of 4d6a9f27 also dropped lib.rs's avx2_supported(), which mc.rs's six-tap/bilinear kernels import since 79e13d22.
Revert "ec-vp8 perf: idct_add_into -- fused strided reconstruct + AVX2 kernel"Ahmet Kaan Gümüş · bb830d8
Revert "ec-vp8 perf: idct_add_into -- fused strided reconstruct + AVX2 kernel" This reverts commit 4d6a9f2729070667f54554f1489603e0d29d0824.