Commits
Commits on
bb830d83ed5c9ac0a313d29f8d694d9706c7a8b32026-09-12
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.
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.
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.
ec-vp8 perf: per-bool env lookups were 46% of decode profileAhmet Kaan Gümüş · 1a98a0f
ec-vp8 perf: per-bool env lookups were 46% of decode profile std::env::var_os ran per bool read (bool.rs read_bool) and per MB (decode.rs reconstruct) — each call takes std's ENV lock and allocates; perf showed 46% of samples in getenv/__strlen. OnceLock::get_or_init was no better (closure re-entry still hit the env path). Now both flags resolve once per process into an AtomicU8 (relaxed load-only hot path). Before -> after (decode MP/s): gop-160x96 32->82, clip-obs 51->122, altref 16->55, gop-1280x720 137->211, big-obs-2560x1320 121->175 (35.7 -> 51.9 fps). Full witness suite byte-exact green.
Merge branch 'lane-vp8' (8a03b178): ec-vp8 -- a complete native VP8 decoder (RFC 6386): bool decoder, headers, intra, inter (modes/MV/MC/loopfilter/ref-buffer management/segment maps/entropy save-restore), public decode_stream API; byte-exact vs ffmpeg on every fixture (gop 60/60, obs 169/169, two-pass altref 96 with 6 censused hidden frames, mparts 30/30, 8 keyframe fixtures, webp still, malformed-container error paths); libvpx's seat in edith is the swap targetAhmet Kaan Gümüş · 781bd7aBrowse files
ec-vp8: review fixes — full fixture provenance + real hidden-frame coverageAhmet Kaan Gümüş · 733f426
ec-vp8: review fixes — full fixture provenance + real hidden-frame coverage P1: gen_vp8_fixtures.sh now generates ALL 12 IVF fixtures. The two ad-hoc vectors are recorded reproducible encodes (kf-16x16-black-q0: color=black 16x16 q0; clip-obs-320x192: testsrc2 320x192 q28) and altref-160x96 moved to vpxenc --auto-alt-ref=1 --passes=2 (one-pass CQ/VBR never inserts hidden altrefs for this content; two-pass vbr does). Regenerating the 9 pre-existing fixtures reproduces them byte-identical (sha256 verified). P2: the new altref-160x96 contains 6 HIDDEN frames (show_frame=0) at decode indices 1,17,33,49,65,81 of 96 total. Coverage: the interframe witness censuses the tags and refuses a shown-only stream (>=6 gate); compare() now walks every frame, requiring Ok(None) exactly on hidden frames and byte-exact planes on shown ones (ffmpeg output indexed by shown position); stream_exact's hidden_frames_update_references_and_ produce_no_picture proves decode returns None for hidden frames while the frame AFTER the first hidden altref is byte-exact vs ffmpeg — the hidden reference is live. Decoder needed NO changes: hidden frames were already handled correctly; the gap was coverage only. Suite: 55 lib + 4 header_parse + 4 keyframe_exact + 3 stream_exact, zero rustc warnings.
ec-vp8 M4: public whole-stream API (ec-av1 decode_stream shape)Ahmet Kaan Gümüş · 93dee5c
ec-vp8 M4: public whole-stream API (ec-av1 decode_stream shape) stream::decode_stream(IVF bytes) -> Result<Vec<Picture>> collects every shown picture; stream::decode_stream_with hands each picture to a sink (picture, decode_idx, IVF pts) the moment it exists. Hidden frames (show_frame == 0) update the reference state and produce no sink call. Container envelope (DKIF magic, VP80 fourcc, framing arithmetic) is validated as ec_core::Error variants, not panics. Picture gains Clone. Witness tests/stream_exact.rs: decode_stream byte-exact vs ffmpeg on ALL 12 IVF fixtures (every frame, all planes) + malformed-container errors. Suite: 55 lib + 4 header_parse + 4 keyframe_exact + 2 stream_exact, zero rustc warnings.
ec-vp8 M3: inter frames byte-exact vs ffmpeg on ALL fixturesAhmet Kaan Gümüş · 80115ee
ec-vp8 M3: inter frames byte-exact vs ffmpeg on ALL fixtures
Four bugs fixed this pass:
- inter-frame B_PRED subblock modes used the keyframe context table
(KF_BMODE_PROB[a][l]); libvpx decodemv.c:467 reads fc.bmode_prob —
the FLAT vp8_bmode_prob {120,90,79,133,87,85,80,111,151}, no context
- MC interpolation filter is per-frame from the tag version bits
(vp8_setup_version): version 0 = six-tap for BOTH planes; chroma was
hardcoded bilinear. Version 3 fullpixel_mask (~7) added to the chroma
MV derivation
- SPLITMV chroma: quadrants are 4x4 CHROMA pixels at 4-px offsets; the
old loop predicted 8x8 at 8-px offsets, so the residual add read the
top-left quadrant's prediction for all four quadrants (whole-MB modes
masked the bug; every SPLITMV MB got wrong chroma)
- key frame with refresh_entropy==0 now reverts to DEFAULTS (libvpx
inits fc before lfc=fc), not the pre-keyframe context
keyframe_exact now witnesses full streams: gop/clip-obs/altref added as
interframe_streams_match_ffmpeg; suite 55 lib + 4 header_parse + 4
keyframe_exact green, zero rustc warnings. Model fixed to match libvpx
(inter ymode/uv defaults 112/86/140/37 + 162/101/204, flat inter bmode)Merge branch 'lane-arffilt' (b49b4d84): docs-only reconciliation -- the ARF temporal filter already shipped across lanes arfpred/arftf/lookahead (strength 2, +-3 window, QMIN 16, film B long-GOP +85.3/+6.7 -> +72.1/-1.2 over the series); the charter's evidence comment was arf_pred_census's own doc; shipped state re-verified (pins 8291/33227, filter engagement witness, both-decoder exactness)Ahmet Kaan Gümüş · 5c8eff8Browse files
docs(av1): lane-arffilt report -- the ARF temporal-filter charter reconciles to merged prior art: arf_pred_census re-run at 7db5094a reproduces lane-arfpred's SAD table to the digit (film B 14.3 percent at s30 +-2, 10.2 at the shipped s2), the filter itself shipped ON in lane-arfpred/arftf/lookahead (strength 2, +-3 window, gate-measured +85.3/+6.7 -> +72.1/-1.2 on film B), so no encoder change and no EC_AV1_ARFFILT second knob; witnesses re-proven (pins 8291/33227 hold, EC_AV1_ARF_TF=0 moves the stream, both-decoder sample-exactness at every preset)Ahmet Kaan Gümüş · 09db827
docs(av1): lane-arffilt report -- the ARF temporal-filter charter reconciles to merged prior art: arf_pred_census re-run at 7db5094a reproduces lane-arfpred's SAD table to the digit (film B 14.3 percent at s30 +-2, 10.2 at the shipped s2), the filter itself shipped ON in lane-arfpred/arftf/lookahead (strength 2, +-3 window, gate-measured +85.3/+6.7 -> +72.1/-1.2 on film B), so no encoder change and no EC_AV1_ARFFILT second knob; witnesses re-proven (pins 8291/33227 hold, EC_AV1_ARF_TF=0 moves the stream, both-decoder sample-exactness at every preset)
ec-vp8 M3: long MV components read bits 9,8,7,6,5,4 (mvlong_width=10) — bit 9 was missingAhmet Kaan Gümüş · d5796e3
ec-vp8 M3: long MV components read bits 9,8,7,6,5,4 (mvlong_width=10) — bit 9 was missing RFC 6386 §17.1 and libvpx read SIX long-form bits (9 down to 4) before the sometimes-implicit bit 3; the port read only five (8..4), so every large motion vector decoded as garbage while short MVs and ZEROMV stayed correct. gop-160x96 frame 1: 51% -> 95.3% pixel match; frames 0-3 of gop and clip-obs now byte-exact vs ffmpeg. Remaining divergence from frame 4 onward is the next M3 target.
lanes: vp8.report.md — M3 state after census fix and clamp fixesAhmet Kaan Gümüş · 12884f5Browse files
ec-vp8 M3: SPLITMV corner-subblock clamp + chroma clamp MB-grid fix (reconinter.c:370-374); token-phase divergence narrowed to MB(0,8) block-16 contextAhmet Kaan Gümüş · 4538af3Browse files
ec-vp8 M3: model hasy2 clobber fixed — mode records + early token phase now agree read-for-read; divergence narrowed to MB(0,8) block-15/16 context threadingAhmet Kaan Gümüş · 9fba4f9Browse files
ec-vp8 M3: census merge fix — above-left third-candidate merge is ALIVE in libvpx, mode records now agree read-for-read for all 60 MBsAhmet Kaan Gümüş · 71acae1
ec-vp8 M3: census merge fix — above-left third-candidate merge is ALIVE in libvpx, mode records now agree read-for-read for all 60 MBs The predecessor's 'dead in libvpx too' note about the cnt[CNT_SPLITMV] merge was a misread: when the above-left pushes a THIRD distinct candidate, cntx reaches slot 3 and its count lands in cnt[CNT_SPLITMV], so decodemv.c:366's merge check sees it non-zero and absorbs the candidate into NEAREST when it equals the nearest. Rust's find_near_mvs already implemented this correctly (the ported guard is live); the model lacked the merge entirely. Model fixed (plus a closure-scope idx/ix bug it exposed) — CNT and SP streams now zero-diff across all 60 MBs of gop frame 1, and the B streams agree through the entire mode-record phase (first divergence moved into frame 1's token phase at MB(0,1)'s Y2, prob 131 vs 202 — next suspect: the frame-0 refresh_entropy revert path feeding frame 1's coef prob tables).
lanes: vp8.report.md — M3 divergence localized to the r2c7 census countAhmet Kaan Gümüş · deb802dBrowse files
ec-vp8 M3 debugging: inter census localization — model extended to inter frames, divergence pinned to MB(2,7) census countAhmet Kaan Gümüş · 1c98b09
ec-vp8 M3 debugging: inter census localization — model extended to inter frames, divergence pinned to MB(2,7) census count vp8ref_model.py now parses inter frames (refresh header, prob_intra/ last/gf, ymode/uv/MV updates, per-MB inter mode records with the census, SPLITMV, per-row tokens) with B/G/CNT/SP/IMB traces mirroring the Rust decoder's. Two model bugs fixed on the way (inter partition-0 offset is byte 3 not 10; clamp_mv2 wrote the clamped row into the column slot). Rust gained CNT (census result) and SP (SPLITMV subset) traces plus STAGE markers in the header parse. Result: model and Rust B streams agree read-for-read through frame 1's mode records up to MB(2,7), where the census diverges: model cnt=[0,2,2,3] vs rust cnt=[0,3,2,3] with IDENTICAL neighbour states (above=r1c7 NEAREST mv (-138,-100), left=r2c6 SPLITMV bmi15 (-134,-76), aboveleft=r1c6 mv (-138,-100) — rows 0-1 parse identically on both sides). The above-left +1 lands in cnt[NEAREST] (rust) vs cnt[NEAR] (model) — one of the two census implementations mishandles the above-left same-as-previous comparison; libvpx decodemv.c:307-361 is the arbiter to re-read next session. Pixel state: gop frame 1 at 51% vs ffmpeg before this divergence was understood.
ec-vp8 M3 WIP: full inter-frame pipeline decodes; walled on one mode-record divergenceAhmet Kaan Gümüş · 10ef9be
ec-vp8 M3 WIP: full inter-frame pipeline decodes; walled on one mode-record divergence Lands: inter mode/MV parse (prob_intra/last/gf, mv_ref census port of libvpx read_mb_modes_mv incl. the dead CNT_SPLITMV merge, SPLITMV with mbsplit leader/fill tables, NEAREST/NEAR clamps, NEW/SPLIT best-MV deltas), chroma MV derivation (round-half-away mv/2 whole-MB; sum/8 SPLITMV), motion compensation in new mc.rs (6-tap luma + bilinear chroma + 32px border extension; 6 unit tests plus 31,000-case differential fuzz vs verbatim libvpx filter.c/extend.c - byte-identical; chroma whole-MB path re-clamps unconditionally per reconinter.c:336), reference buffer management in libvpx swap_frame_buffers order (copy_arf, copy_gf, refresh_gf, refresh_arf, refresh_last), entropy save/restore gated on refresh_entropy (probs only, like libvpx fc/lfc), persisted segment map, inter LF levels with ref/mode deltas and skip_lf inner-edge rule, EC_VP8_TRACE B-line per-read tracing in BoolDecoder mirroring scripts/vp8ref_model.py. State: inter frames decode end-to-end with no desync error; gop frame 1 matches ffmpeg 51% (frame 0 100%), diverging from MB(0,5) rightward - one remaining mode-record/token divergence. Next: diff the B streams (python3 scripts/vp8ref_model.py vs EC_VP8_TRACE=1) to localize it; the python model still needs the inter-frame header/mode extension. Suite: 55 lib (incl. 6 mc) + 4 header_parse + webp witness green; keyframe_exact 1/3 (2 cases need the M3 fix to pass).
Merge branch 'lane-l2' (da856b88): LAST2's deciding long-GOP table filled on the current substrate -- the machinery already shipped in lane-last2; arm measures film A +20.9/-9.0 -> +20.6/-9.1 and film B +70.4/-2.2 -> +70.3/-2.1 against a to-the-digit control, LAST2 codes 0.5-1.1% of film blocks, keep rule not met (best -0.3) so EC_AV1_LAST2 stays off; the stale 'week of wall' doc premise retired; pins unmoved at 8291 / 33227Ahmet Kaan Gümüş · 03b25c7Browse files
docs(av1): lane-l2 report -- LAST2 re-judged on the current substrate and stays off: control reproduces the standing table to the digit (screen row moves exactly along intertx's documented 14.4->13.7), the deciding long-GOP gate reads -0.3 best (keep rule asks >=0.5), LAST2 codes 0.5-1.1 percent of film inter blocks and never on screen, walls +2.4-9.7 percent; the per-lag SAD census re-run reproduces refs.report section 1 exactly; witness 0-off/40-on LAST2 blocks exact through both decoders; pins unmoved 8291/33227Ahmet Kaan Gümüş · 1100a98
docs(av1): lane-l2 report -- LAST2 re-judged on the current substrate and stays off: control reproduces the standing table to the digit (screen row moves exactly along intertx's documented 14.4->13.7), the deciding long-GOP gate reads -0.3 best (keep rule asks >=0.5), LAST2 codes 0.5-1.1 percent of film inter blocks and never on screen, walls +2.4-9.7 percent; the per-lag SAD census re-run reproduces refs.report section 1 exactly; witness 0-off/40-on LAST2 blocks exact through both decoders; pins unmoved 8291/33227
ec-vp8: fix M2 token walk — ONE path missed sign/EOB; frame-0 byte-exact on all kf fixturesAhmet Kaan Gümüş · dd7b5a6
ec-vp8: fix M2 token walk — ONE path missed sign/EOB; frame-0 byte-exact on all kf fixtures get_coeffs' ONE-token path (p[2] branch) had the sign read, coefficient write, and EOB-after-nonzero check nested inside the magnitude branch only. The reference walk (libvpx detokenize.c GetCoeffs / RFC 6386 section 13.2) shares that tail between the ONE and magnitude paths. A ONE token therefore skipped the sign read and EOB check and re-entered the walk at the ZERO node — read counts stayed in lockstep (so stream positions matched) while the decoded stream diverged from the first ONE token, which is why the lossless single-MB fixture passed and busy fixtures split ~28 reads into block 0. Evidence: - EC_VP8_TRACE G-lines (n, band, ctx, prob, bit) vs scripts/vp8ref_model.py on kf-160x96-q20.ivf: 19131 decisions, 0 diffs (model also fixed: persistent per-partition decoders, G tracing with consulted prob + decoded bit). - examples/dump_frame frame 0 vs 'ffmpeg -frames:v 1': byte-exact on all 7 kf fixtures + mparts-160x96 kf0. - cargo test -p ec-vp8: unit 49 + header_parse 4 + webp green; keyframe_exact 1/3 (the 2 red cases decode every frame of each fixture and complete when M3 inter frames land).
lanes: vp8.report.md — divergence refined to MB(0,0) block 0 token walk, ~28 reads inAhmet Kaan Gümüş · dacc91cBrowse files
ec-vp8: token-decision trace tooling (G n/band/ctx/prob annotations, env-gated) for the M2 cross-MB context hunt; unit suite stays greenAhmet Kaan Gümüş · 2e92fecBrowse files
scripts: preserve the dixie-faithful decision-trace reference model used to localize the M2 blockerAhmet Kaan Gümüş · d24d4c4Browse files
lanes: vp8.report.md — M2 blocker narrowed to one cross-MB token-context bugAhmet Kaan Gümüş · a8debcfBrowse files
ec-vp8: two partition-0 desync bugs fixed (M2 debugging state)Ahmet Kaan Gümüş · d9a9866
ec-vp8: two partition-0 desync bugs fixed (M2 debugging state) BUG 1 (found by decision-trace diff vs a python dixie model): the MV probability update loop ran on KEY frames - dixie/libvpx parse it only for interframes. On key frames the 38 extra bool reads desynced the whole partition-0 parse. Moved inside the !is_keyframe branch. BUG 2: decode_keyframe created a FRESH bool decoder over partition 0 for the per-MB mode records - re-reading the partition from its start. FrameHeader::parse now returns its partition-0 decoder so the mode records CONTINUE from where the header stopped (dixie decode_frame shares one decoder). Result: single-MB 16x16 black q0 fixture now decodes BYTE-EXACT vs ffmpeg (chroma and luma). Multi-MB fixtures still diverge: decision traces (python dixie model scripts side /tmp/vp8ref.py vs EC_VP8_TRACE) match to decision 2562 and split at 2563 inside the token walk of MB(0,1) block 0 (ref consults prob 11, rust prob 4 at the same stream position) - a coefficient-context/bookkeeping difference in the multi-MB token pass that is now precisely localized for the next session. Debug tooling retained: EC_VP8_TRACE decision trace, EC_VP8_DEBUG per-MB coeff dump, examples/dbg_first.rs.
Merge branch 'lane-opusdocs' (01744b26): ec-opus's 21 missing-docs warnings (SilkDecIndices + SilkFrameDiag fields) documented with real semantics -- edith's build is warning-free again through the path depAhmet Kaan Gümüş · da2b928Browse files
docs(ec-opus): document all public SilkDecIndices/SilkFrameDiag fields, fixing 21 missing_docs warnings reaching edith's zero-warning build; also de-link private items in doc comments so cargo doc is warning-freeAhmet Kaan Gümüş · b423eae
docs(ec-opus): document all public SilkDecIndices/SilkFrameDiag fields, fixing 21 missing_docs warnings reaching edith's zero-warning build; also de-link private items in doc comments so cargo doc is warning-free
lanes: vp8.report.md (M1 verified, M2 WIP red witnesses, M3/M4 status)Ahmet Kaan Gümüş · a5b02e0Browse files
ec-vp8 M2 WIP: full key-frame decode pipeline (tokens/intra/transform/loopfilter/reconstruct) — unit tests 100% green, ffmpeg exactness witnesses RED (luma bug)Ahmet Kaan Gümüş · 5b0ae03
ec-vp8 M2 WIP: full key-frame decode pipeline (tokens/intra/transform/loopfilter/reconstruct) — unit tests 100% green, ffmpeg exactness witnesses RED (luma bug) - tokens.rs: RFC 6386 sec 13 coefficient decoding (GetCoeffs port: bands, 3-context model, EOB-skip-after-zero, dequant-on-write, Y2-first block order, dixie skip-MB context reset with Y2 preservation). - modes.rs: all mode/MV trees + tables (kf/inter ymode, bmode, uv, mv_ref, sub_mv_ref, SPLITMV partitions with RFC enum-value indexing). - decode.rs: per-row pipeline (modes -> tokens -> reconstruct), bordered planes (127/129), above-right synthesis, B_PRED interleaved predict+residual (reconstructed-pixel chaining), Y2 WHT DC override, per-MB LF level (dixie double-clamp), LF post-pass via loopfilter. - loopfilter.rs + intra.rs + transform.rs: subagent kernels, rustc-verified vs libvpx C (differential fuzz: 400k IDCT/WHT vectors, 20k intra streams, dixie-table-exact LF limits). - FIX along the way: per-MB-row token left-context reset (dixie reset_row_context) was missing. - tests/keyframe_exact.rs: ffmpeg byte-compare witnesses — FAILING: single 16x16 black q0 frame decodes chroma exact but luma ~99-130 vs 16 (B_PRED MB, coeffs plausible); suspected in luma pred/apply path, NOT yet localized. Debug: EC_VP8_DEBUG=1 dump + examples/dbg_first. - 49 lib + 4 header tests green; zero warnings in lib.
ec-vp8 M1: bool arithmetic decoder, frame tag + full first-partition header parsing, RFC-transcribed tablesAhmet Kaan Gümüş · 5233d88
ec-vp8 M1: bool arithmetic decoder, frame tag + full first-partition header parsing, RFC-transcribed tables - bool.rs: RFC 6386 section 7.3 decoder (read_bool/literal/signed_literal/ maybe_signed/prob7/tree incl. the EOB-skipping token-tree form), plus a test-only reference bool encoder; round-trip tests at probability extremes, long LCG streams, literals to 19 bits, tree paths. - frame.rs: 3-byte LE frame tag, key-frame start code + dimensions/scaling, MB geometry. - header.rs: complete partition-1 header in dixie field order — colour space/clamping, segmentation (with cross-frame state), loop filter type/level/sharpness/deltas, token partition size table, quant indices, reference refresh/copies/sign-bias, coefficient probability updates, mb_no_skip_coeff, inter prob_intra/last/gf + ymode/uv/MV probability updates. PersistedState carries entropy/segmentation/filter deltas across frames and resets at key frames. - tables.rs: GENERATED verbatim from the RFC text by scripts/extract_vp8_tables.py (element counts asserted): default + update coefficient probs, kf_bmode_prob, coeff_bands, dequant lookups, Pcat1-6 (sentinel kept), default + update MV probs. - scripts/gen_vp8_fixtures.sh: libvpx-encoded IVF witnesses (6 sizes/q, 60-frame GOP, 8-token-partition vector via local vpxenc, WebP still). - Witness: real vpxenc/ffmpeg-produced streams parse with exact tiling of partition sizes, correct dims (incl. 76x52 non-MB-aligned), 8 partitions; VP8-in-WebP still decodes its header. 12 tests green, zero warnings.
docs(av1): the last2_census doc premise refreshes to what ships -- the lever has been real since lane-last2 (EC_AV1_LAST2, leaf chain LEAF_SLOTS, 32x32 offer with its own NEWMV); the census stays the pricing arm, its SAD shares read against the gate census's fire share and last2.report's refutationAhmet Kaan Gümüş · 9bce8b7
docs(av1): the last2_census doc premise refreshes to what ships -- the lever has been real since lane-last2 (EC_AV1_LAST2, leaf chain LEAF_SLOTS, 32x32 offer with its own NEWMV); the census stays the pricing arm, its SAD shares read against the gate census's fire share and last2.report's refutation
docs(av1): lane-l2 charter -- re-judge LAST2 on the current substrate with the deciding long-GOP gate lane-last2 never ranAhmet Kaan Gümüş · b3c6361Browse files
Merge branch 'lane-rectres' (16a625c7): Rect128/Ab128 pieces can carry a real residual behind EC_AV1_RECTRES (writer + search arms + cdef_unit_owner extended past Whole128 + 3 three-way-exact witnesses); the post-fix census shows the arm ACTIVE but BD-neutral (film A long-GOP 34794/873 fires, every gate row within 0.1) so the default stays OFF; the 64x64-square luma txb_skip_ctx=0 writer fix and the census double-take fix ride along; pins unmoved at 8291 / 33227Ahmet Kaan Gümüş · 3a3d412Browse files
docs(av1): lane-rectres report -- the post-fix census flips the story from inert to active-but-BD-neutral (film A long-GOP 34794/873, film B 20098/186 real fires, every gate row within 0.1); disposition stays-off stands on the deciding column; the 8cf40077 double-take fix and both arm re-runs evidencedAhmet Kaan Gümüş · 1c33b9f
docs(av1): lane-rectres report -- the post-fix census flips the story from inert to active-but-BD-neutral (film A long-GOP 34794/873, film B 20098/186 real fires, every gate row within 0.1); disposition stays-off stands on the deciding column; the 8cf40077 double-take fix and both arm re-runs evidenced
Merge branch 'lane-intertx' (c2653e06): the inter tx-type search widens to the Set1 alphabets with the chroma inheritance made honest -- the frame sets its own reduced_tx_set_inter and the writer codes inter chroma with the inherited reduced type (a live-latent desync pre-fix, RED-proven); screen default improves +14.4 -> +13.7 vs libaom, the film arm EC_AV1_TXSET_INTER=all measures BD-neutral (best -0.1) so the lever stays Screen; the raw-tile decode test helper's hardcoded reduced_tx_set=true stale-header bug fixed with Encoded carrying the frame's own bit; pins 8291/33227, suite 592/0Ahmet Kaan Gümüş · f56f397Browse files
fix(av1): the raw-tile inter decode wrapper takes the frame's own reduced_tx_set instead of guessing true -- the widened inter search made the bit chroma-relevant (a screen GOP's inter luma takes V_DCT and the chroma inheritance reduces against this exact bit, so the GOP round-trip tests desynced and surfaced the empty-ref-slot refusal), Encoded carries the bit and the GOP and key-frame tile tests pass it; encoder output is byte-identical (witnesses re-run at 8143/8211 bytes), the three tests plus pins are green and the full three-lane suite reads 592 passed / 0 failedAhmet Kaan Gümüş · 9c0a4a2
fix(av1): the raw-tile inter decode wrapper takes the frame's own reduced_tx_set instead of guessing true -- the widened inter search made the bit chroma-relevant (a screen GOP's inter luma takes V_DCT and the chroma inheritance reduces against this exact bit, so the GOP round-trip tests desynced and surfaced the empty-ref-slot refusal), Encoded carries the bit and the GOP and key-frame tile tests pass it; encoder output is byte-identical (witnesses re-run at 8143/8211 bytes), the three tests plus pins are green and the full three-lane suite reads 592 passed / 0 failed
fix(av1): the native census drains the rectres counters right before the eprintln that reads them, so every printed fire count was a structural zero -- the drains are deleted and the format-arg takes zero once per clip exactly like the sibling 128-root counters; both arm gates re-run for the real censusAhmet Kaan Gümüş · 6ad9423
fix(av1): the native census drains the rectres counters right before the eprintln that reads them, so every printed fire count was a structural zero -- the drains are deleted and the format-arg takes zero once per clip exactly like the sibling 128-root counters; both arm gates re-run for the real census
docs(av1): lane-rectres report -- the rect/AB residual arm measures inert and exact on server-2, 0 search / 0 writer fires on every gate clip so BD is flat within 0.1 on both gates (long-GOP film A +20.9/-9.0 and film B +70.5/-2.1 against a control that reproduces the standing table to the digit, all five native rows within 0.1, wall +1-4 percent of pure trial cost), disposition stays-off with EC_AV1_RECTRES kept as the witnessed arm's gate; pins unmoved at 8291 / 33227Ahmet Kaan Gümüş · 1ae2432
docs(av1): lane-rectres report -- the rect/AB residual arm measures inert and exact on server-2, 0 search / 0 writer fires on every gate clip so BD is flat within 0.1 on both gates (long-GOP film A +20.9/-9.0 and film B +70.5/-2.1 against a control that reproduces the standing table to the digit, all five native rows within 0.1, wall +1-4 percent of pure trial cost), disposition stays-off with EC_AV1_RECTRES kept as the witnessed arm's gate; pins unmoved at 8291 / 33227
docs(av1): lane-intertx report -- the chroma inheritance desync was live and is fixed (frame sets its own reduced_tx_set_inter, writer codes inter chroma with the inherited reduced type, wider inter search reachable and honestly priced), the arm EC_AV1_TXSET_INTER=all measures inert on film at best -0.1 BD so the lever stays Screen, disposition stays-off; pins 8291/33227 standAhmet Kaan Gümüş · 333651f
docs(av1): lane-intertx report -- the chroma inheritance desync was live and is fixed (frame sets its own reduced_tx_set_inter, writer codes inter chroma with the inherited reduced type, wider inter search reachable and honestly priced), the arm EC_AV1_TXSET_INTER=all measures inert on film at best -0.1 BD so the lever stays Screen, disposition stays-off; pins 8291/33227 stand
fix(av1): the inter tx-type search widens to the Set1 alphabets on reduced_tx_set=0 frames with the chroma inheritance made honest -- the frame sets its own reduced_tx_set_inter on the shared context and the writer codes every inter chroma plane with the luma type reduced to the chroma set (lane-intertx desyncs (a)+(b)), the one-D witness codes 40 V_DCT + 521 H_DCT inter units on a non-screen clip and all three planes read sample-exact through ffmpeg and decode_stream, the RED run with the chroma half neutralized desyncs the tileAhmet Kaan Gümüş · 630cb11Browse files
docs(av1): lane-rectres report -- the rect/AB residual lane lands default OFF with all three forced witnesses sample-exact through both decoders (HORZ half 840/840 fires, HORZ_A 4620 search / 5760 writer, per-unit cdef list 62 covered units), BD tables deferred on the worktree's missing fixtures/ with the exact unblock recorded; pins unmoved at 8291 / 33227Ahmet Kaan Gümüş · ff133e7
docs(av1): lane-rectres report -- the rect/AB residual lane lands default OFF with all three forced witnesses sample-exact through both decoders (HORZ half 840/840 fires, HORZ_A 4620 search / 5760 writer, per-unit cdef list 62 covered units), BD tables deferred on the worktree's missing fixtures/ with the exact unblock recorded; pins unmoved at 8291 / 33227
docs(av1): lane-intertx charter -- inter tx-type search on filmAhmet Kaan Gümüş · 8921cb1Browse files
feat(av1): the 128 root's rect/AB pieces price a real residual behind EC_AV1_RECTRES -- write_inter_block_128_rect lifts its skip-only refusal and codes one TX_64X64 luma unit plus a TX_32X32 chroma pair per 64x64 mu chunk (halves and 64x64 squares alike), the rect/AB search arms price the non-skip outcome under the same knob, and cdef_unit_owner extends past Whole128 to the rect/AB pieces that carry a residual (skip-only pieces still write no cdef_idx and never touch the map); three forced witnesses run sample-exact through decode_stream AND ffmpeg -- a HORZ half at 840/840 fires, a forced HORZ_A shape at 4620 search / 5760 writer, and a rect half under a per-unit cdef list at 62 covered units, default OFF is today's behavior bit for bitAhmet Kaan Gümüş · dc098a5
feat(av1): the 128 root's rect/AB pieces price a real residual behind EC_AV1_RECTRES -- write_inter_block_128_rect lifts its skip-only refusal and codes one TX_64X64 luma unit plus a TX_32X32 chroma pair per 64x64 mu chunk (halves and 64x64 squares alike), the rect/AB search arms price the non-skip outcome under the same knob, and cdef_unit_owner extends past Whole128 to the rect/AB pieces that carry a residual (skip-only pieces still write no cdef_idx and never touch the map); three forced witnesses run sample-exact through decode_stream AND ffmpeg -- a HORZ half at 840/840 fires, a forced HORZ_A shape at 4620 search / 5760 writer, and a rect half under a per-unit cdef list at 62 covered units, default OFF is today's behavior bit for bit
2026-09-10
Merge branch 'lane-b128res' (86ac0f65): the 128 residual arm re-measures three-way exact after edge128's CDEF owner map; still inert at 0.4-1.9 writer fires/frame so EC_AV1_B128RES stays off; pan residual witness re-vitalizes at q=60Ahmet Kaan Gümüş · 8fbaba4Browse files
docs(av1): lane-b128res report -- the parked 128 residual arm re-measured after edge128: the bars 2160p 8-sample mismatch is gone (cdef owner map), the arm stays inert at 0.4-1.9 writer fires/frame with flat BD on both gates, disposition stays-off; pins unmoved at 8291 / 33227Ahmet Kaan Gümüş · 329dee9
docs(av1): lane-b128res report -- the parked 128 residual arm re-measured after edge128: the bars 2160p 8-sample mismatch is gone (cdef owner map), the arm stays inert at 0.4-1.9 writer fires/frame with flat BD on both gates, disposition stays-off; pins unmoved at 8291 / 33227