Commits
Commits on
76c8a7751336d7967f2567f17dda6a6316cf1cc12026-09-14
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.
ec-vp8 perf: idct_add_into -- fused strided reconstruct + AVX2 kernelAhmet Kaan Gümüş · abc2cab
ec-vp8 perf: idct_add_into -- fused strided reconstruct + AVX2 kernel idct_add_into (28% of the post-MC-decode profile) now runs through transform::idct_add_strided: the prediction gather, the transform, the clamp-add and the strided stores in one function, with an explicit std::arch::x86_64 AVX2 kernel dispatched off a shared LazyLock probe and the scalar path kept as the libvpx transcription and lane-for-lane oracle. The kernel preserves the module's precision contract in full: the butterflies are the scalar i32 arithmetic lane-parallel (products exact, |i16 * 35468| < 2^31), and the only narrowing points are the oracle's short stores -- pass one's tmp and pass two's residual -- implemented as low-16-bit truncations via shuffle_epi8, never saturation. Coefficients transpose to column groups (rows woven by unpack_epi16), pass one's store-pattern transpose hands row groups to pass two, and the final clamp is explicit max 0 / min 255 in i32 before a saturating pack that never fires beyond the clamp. The equivalence test pushes coefficients to the i16 rails precisely because the network is exact for every input. Witness suite: 58 lib (new: simd-vs-scalar equivalence over rails + random, four stride shapes) + 4 header_parse + 4 keyframe_exact + 3 stream_exact, byte-exact, debug and release. Zero warnings.
chore: Cargo.lock — rustfft optional dependency for the fft-rustfft featureAhmet Kaan Gümüş · e7bf696Browse files
lanes: opus-perf-r1 round 2 — server-3 clean-machine table: decode 0.93/0.93 of ruopus-FFT (target met), encode 0.74/1.01 of opus-rs (stop rule applied); rustfft default backend + fast_atan2f + bits2pulses windowAhmet Kaan Gümüş · c81da76Browse files
perf(ec-opus): optional rustfft FFT backend becomes the default (fft-rustfft feature; pure Rust, no C; scratch preallocated so the steady-state encode stays zero-alloc) and stereo_itheta matches the reference float build's fast_atan2f instead of libm's f64 atan2 — 5.1 film decode 0.82 -> 0.95 of ruopus-FFT, stereo 0.87 -> 0.97, stereo encode 0.65 -> 0.69 of opus-rs (510k at parity 1.00); bits2pulses bisects a fixed row window; dependency-free build stays green under --no-default-featuresAhmet Kaan Gümüş · 68cf7a6
perf(ec-opus): optional rustfft FFT backend becomes the default (fft-rustfft feature; pure Rust, no C; scratch preallocated so the steady-state encode stays zero-alloc) and stereo_itheta matches the reference float build's fast_atan2f instead of libm's f64 atan2 — 5.1 film decode 0.82 -> 0.95 of ruopus-FFT, stereo 0.87 -> 0.97, stereo encode 0.65 -> 0.69 of opus-rs (510k at parity 1.00); bits2pulses bisects a fixed row window; dependency-free build stays green under --no-default-features
perf(h264): bulk-read CABAC renorm and zero-fill bit supplyAhmet Kaan Gümüş · f3d387e
perf(h264): bulk-read CABAC renorm and zero-fill bit supply RenormD doubles codIRange by leading_zeros-23 positions in one shift and supplies the matching bits with one bulk read, replacing the per-bit loop; BitCursor::bits_zero_fill is the engine's supply contract made explicit (zero-filled past the RBSP, position accounting unchanged), so bit() drops its Result plumbing. The coeff_abs_level prefix loop hoists the inc0/inc1 context spelling out of the per-bin branch. Byte-exact A/B vs d27a904d on the five fixture classes: all display-order frame hashes identical. ec-h264 lib suite green.
perf(h264): fuse the bi-predicted combining pass into motion compensationAhmet Kaan Gümüş · 57ad7eb
perf(h264): fuse the bi-predicted combining pass into motion compensation Default-weighted bi-prediction (8.4.2.3.1) is the rounded average of the two lists' clipped byte predictions, so list 0 now interpolates straight into the picture and list 1 averages on top of it (Put::Avg) instead of both landing in 256/64-byte temporaries, going through combine(), and being copied back per row. Weighted slices keep the temporary path. SliceCtx::no_weights() hoists the per-component weights_for lookup for streams that signal no weighted prediction at all. Byte-exact A/B vs d27a904d on five fixture classes (720p High CABAC+B, 720p CAVLC baseline, 1440p High no-B, 1080p Main, 4K Main): all display- order frame hashes identical. ec-h264 suite green (79 lib + 23 conformance + 12 encode + 1 decode-first).
lanes: opus-perf-r1.report.md — PVQ U-table lands (5.1 decode 0.70 -> 0.82 of ruopus-FFT, stereo 0.66 -> 0.88, encode 0.59 -> 0.65 of opus-rs), profiles show the FFT is ~10% and the PVQ walk dominates, two search experiments measured and reverted, server-3 cross-check queuedAhmet Kaan Gümüş · 67663b9Browse files
ec-vp8 perf: MC kernels -- AVX2 six-tap + bilinear passesAhmet Kaan Gümüş · c4fe596
ec-vp8 perf: MC kernels -- AVX2 six-tap + bilinear passes sixtap_block and bilinear_block (18% of a decode: the sub-pel MC passes for luma and chroma) now run on explicit std::arch::x86_64 AVX2 kernels following the ec-av1 mc::simd pattern: the scalar functions stay as the libvpx transcription and the reference oracle, feature-gated at the block level via a LazyLock capability probe. Both passes share one clamped u8 intermediate at a fixed 16-lane stride (the first pass is clamped to 0..=255 by filter.c's clamp_pixel, so u8 storage is representation-only; lanes bw..16 hold discarded values). The six-tap kernels pair adjacent samples into _mm*_madd_epi16 with packed tap pairs -- exact in i32 (|byte*tap| <= 255*128, six-product sums < 2^23) -- and the two-stage packs/packus narrowing reproduces the per-pass clamp exactly: packs' i16 saturation provably never fires (range [-76, 319]) and packus' u8 saturation IS clamp_pixel. Bilinear taps are non-negative and sum to 128, so its i16 accumulator is exact. Also repairs a debug-build regression from 2e4c5f96's chunked loop- filter loads: the hoisted row address 'anchor - (4 - k) * stride' underflows usize for k past the upper taps at frame-top edges (the add-first form anchor + k*stride - 4*stride is what the per-pixel code evaluated). The three h-edge kernels get the add-first form plus the bounds contract as debug_asserts; the three driver tests that had been panicking in debug builds are green again (57 lib tests now). Witness suite: 57 lib + 4 header_parse + 4 keyframe_exact + 3 stream_exact, byte-exact, debug and release.
perf(ec-opus): PVQ unranking walks the reference 1272-entry U table instead of stepping rows at runtime — decode_pulses/encode_pulses drop from O(N*K) row arithmetic to O(N) lookups (5.1 film decode 0.70 -> 0.82 of ruopus-FFT, stereo 0.66 -> 0.87, stereo encode 0.59 -> 0.65 of opus-rs); the const table is the same recurrence in wrapping arithmetic and the lib test cross-checks every stored entry against a fresh runtime buildAhmet Kaan Gümüş · e06f8b9
perf(ec-opus): PVQ unranking walks the reference 1272-entry U table instead of stepping rows at runtime — decode_pulses/encode_pulses drop from O(N*K) row arithmetic to O(N) lookups (5.1 film decode 0.70 -> 0.82 of ruopus-FFT, stereo 0.66 -> 0.87, stereo encode 0.59 -> 0.65 of opus-rs); the const table is the same recurrence in wrapping arithmetic and the lib test cross-checks every stored entry against a fresh runtime build
ec-vp8 perf: loop-filter kernels — chunked loads, conditional storesAhmet Kaan Gümüş · 289ae2c
ec-vp8 perf: loop-filter kernels — chunked loads, conditional stores The six edge kernels did 8-14 individually bounds-checked accesses per pixel/column. Horizontal edges (contiguous columns, strided taps) now pull each tap row in with one slice load and keep per-column stores (most pixels fail the threshold, so bulk write-back was a net loss — measured 175->89 MP/s on big-obs before switching to conditional stores). Vertical edges read the contiguous tap window as one slice. Under sibling-lane load (loadavg ~20, numbers noisy): gop-160x96 82->108 MP/s, altref 55->66, gop-1280x720 211->221, big-obs-2560x1320 ~175->~180 (48-55 fps observed vs 45-fps seat target). Witnesses byte-exact green.