Commits
Commits on
84fa44cfe66f76e22181d4ff8bc06ef6ea78db07Filtered to crates/ec-av1/src/encode.rsClear filter2026-09-27
Merge 1f4b8afb (422stripwrite) — suite green: 422stripwrite GREEN 625/0Ahmet Kaan Gümüş · f0a8ab2
Merge 1f4b8afb (422stripwrite) — suite green: 422stripwrite GREEN 625/0 # Conflicts: # crates/ec-av1/src/decode.rs
2026-09-26
ec-av1: lane-av1422stripwrite -- the 4:2:2 residual was not the rect-strip chroma write/anchor: a stored reference's chroma plane was SHAPED from a two-way subsampling guess (luma-sized = 4:4:4, else a quarter = 4:2:0) that folds 4:2:2 into 4:2:0, so every 4:2:2 reference claimed h/2 rows while holding h; every chroma MC sourcing a row at or past the frame's midpoint was then clamped against true_heightAhmet Kaan Gümüş · 35d5774
ec-av1: lane-av1422stripwrite -- the 4:2:2 residual was not the rect-strip chroma write/anchor: a stored reference's chroma plane was SHAPED from a two-way subsampling guess (luma-sized = 4:4:4, else a quarter = 4:2:0) that folds 4:2:2 into 4:2:0, so every 4:2:2 reference claimed h/2 rows while holding h; every chroma MC sourcing a row at or past the frame's midpoint was then clamped against true_height The parent lane's named site (frame-1 prefilt chroma first diff U/V at (88,104)) measured as two BLOCK_8X4 inter strips at luma (88,208) and (88,216) -- the top strips of the 8x8 groups at mi (11,26) and (11,27), each its own chroma TX_4x4 at chroma (88,104) / (88,108) (is_chroma_reference at ss (1,0): libaom's mi_size_wide[BLOCK_8X4] is 2 in 4x4-mi units, so the !(bw & 1) column clause holds for both). Not a strip pair: the strips below (luma rows 92..95) are intra. The write rect, the anchor, the mv, the filters, the scale and the reference CONTENTS were all already correct: our raw pre-MC reference sample dump at the unit was byte-identical to the oracle's src0 ([202 204 204 167 / 185 190 190 165 / ...]). What was wrong was the MC's output: our reference plane reported true_height 72 on a 144-tall frame, so rows >= 72 clamped and the 4x4 unit came out as 206 204 202 200 on every row. The parent read this as a write/anchor defect; the anchor was right and the declared plane shape, one layer up, was not. Fix: ref_chroma_shape() reads the chroma format off the stored plane's own sample count, which is exact and unambiguous for all three formats (w*h = 4:4:4, (w/2)*h = 4:2:2, (w/2)*(h/2) = 4:2:0). Both call sites in RefPix::planes use it, and Picture's u/v doc now states the real contract (half width, the frame's own chroma height). 4:2:0 and 4:4:4 take the SAME branch as the old two-way test, so they are value-identical. The pinned 16-frame t422 4:2:2 stream is now byte-exact: 0 diffs on every plane of every frame 0..15 at prefilt, post-deblock and post-CDEF (48 stage-frame groups) and a byte-identical final post-loop-restoration dump for all 16. Before: frame 1 Y 0 / U 2231 (first (88,104) 206 vs 202) / V 2197. The 4:2:2 header refusal stays unconditional and byte-identical; the local EC_AV1_ALLOW_422_PROBE bypass used for the probe runs is reverted. cargo check -p ec-av1 --all-targets: 0 warnings, 0 errors.
2026-09-25
ec-av1: lane-av1-422sub8rect -- the sub-8 inter 4:2:2 chroma ported to its real shapesAhmet Kaan Gümüş · 19f693e
ec-av1: lane-av1-422sub8rect -- the sub-8 inter 4:2:2 chroma ported to its real shapes decode_inter_block8's whole chroma half moves to the BLOCK_4X8 plane block: one TX_4X8 ChromaRect8x4/SCAN_4X8 unit per plane through read_inter_plane_rect (offset-7 ctx, inherited luma tx type, around_mi_422_chroma walk), with the MC build, warp, masked-compound, interintra, OBMC and skip pushes reshaped per axis; the intra-in-inter arm reads the key-frame arm's rect reader. decode_inter_sub8_split4's shared group unit is replaced by what the oracle traces actually code at ss (1,0): every non-skipped odd-column piece is its plane's own chroma reference and codes U+V TX_4X4 at the floored chroma cell (build_inter_predictors_sub8x8 halves -- left from the left piece, right from own; mixed groups whole-from-own), intra pieces route through sub8_leaf_chroma422, and the 4:2:0 group tail is gated off at 4:2:2. Shared helpers made ss-exact (4:2:0/4:4:4 identical): blend_masked_compound and interintra_blend take per-axis mask subsampling (aom blend-a64-mask's four branches), obmc_plan/obmc_run derive chroma extents by the plane ss, TxParams::strided sizes stride*h (equal to the old square for every existing caller). decode_inter_block's square-cut 4:2:2 chroma blend keeps the pre-port direct mask read (stop-note: owning parent-lane surface). Frame 0 of the pinned t422 fixture stays byte-exact at all four stages; inter frames 1..10 decode and diverge ~15% less than the parent ladder (no frame exactness claimed -- further 4:2:2 classes remain, trace: EC_RECTCHROMA_GAP 16x8/8x32). Refusal unchanged; bypass never committed. cargo check 0 warnings; 4:2:0 inter pixel-exact witness and refusal gates green.
lane-av1-llpred2: skip_chroma_above reads the frame ss pair, not a rect-over-chroma_side ratioAhmet Kaan Gümüş · 0db45d1
lane-av1-llpred2: skip_chroma_above reads the frame ss pair, not a rect-over-chroma_side ratio obmc_plan derived ss from trailing_zeros(write / chroma_side) on ONE square side: a 4:2:0 16x8 strip read ss=(1,0) and lost its above-chroma skip (libaom's av1_skip_u4x4_pred_in_obmc skips the plane block 8x4 under frame ss (1,1)), and a 4:4:4 16x8 strip divided 8/16=0 so trailing_zeros(0)=64 panicked a debug build on the shift. The decision is now the pure obmc_skip_chroma_above(write_w, write_h, ss_x, ss_y) over the frame's own pair -- the same values obmc_run's chroma windows shift by -- fed by ss_x(fctx)/ss_y(fctx) at all three callsites (decode_inter_block, decode_inter_block8, the encoder's obmc_prediction). A unit check pins the 4:2:0 16x8/8x16 skip and the 4:4:4 shapes; the 6-frame 444 fixture is cmp-exact against aomdec in a debug decode probe, and the a_lossless 4:2:0 gates stay green.
2026-09-24
Merge commit 'c5ae648c' into lane-av1-qm-mergeAhmet Kaan Gümüş · f3c3235
Merge commit 'c5ae648c' into lane-av1-qm-merge # Conflicts: # crates/ec-av1/src/decode.rs # crates/ec-av1/src/refusal_inventory.rs # crates/ec-av1/src/stream.rs
Merge 7f2c85c5 (lane-av1-444 10-bit film fix) into main: keep 12-bit compound MC and 4:4:4 chroma portAhmet Kaan Gümüş · c5a3cd1
Merge 7f2c85c5 (lane-av1-444 10-bit film fix) into main: keep 12-bit compound MC and 4:4:4 chroma port - decode.rs: unify on the lane's ss-aware mv_to_q4(pos, mv, ss) signature; main's luma=false call sites become ss_x(fctx)/ss_y(fctx) (identical math for 4:2:0), luma=true becomes 0. Intrabc chroma arm keeps main's structure with ss-aware MVs. Compound intermediate calls pass fctx and use the lane's chroma_side sizing (444-native, degenerates to 420 behavior). - encode.rs, refusal_inventory.rs, restoration.rs, stream.rs, tile.rs: auto-merged clean by git, both sides retained. - Verified: a_10bit_128sb_film_frames_with_warp_cdef_and_interintra_decode_pixel_exact and a_10bit_film_frames_with_small_side_globalmv_and_rect_warp_reach_decode_pixel_exact both PASS (not skipped) on this merge.
lane-av112bit: lift the 12-bit gate to the witnessed setAhmet Kaan Gümüş · 0531387
lane-av112bit: lift the 12-bit gate to the witnessed set
The blanket bit-depth-12 refusal (hdr report section 4.2) becomes four
named refusals, each pinned by a real aomenc --bit-depth=12 stream:
warp, compound inter blocks, film grain, and screen content tools
(palette/intrabc). Everything else 12-bit is lifted behind two
byte-exact-vs-ffmpeg witnesses: a key frame and a key+inter sequence
with sub-pixel motion, CDEF and loop restoration ON (cdef_idx and
Wiener/SGR unit counters hard-asserted; a new MC_SUBPEL_HITS counter
proves the frame's own round_0/round_1 ran).
The rounding rule is libaom convolve.h:81..86 verbatim: round_0 +=
bd - 10, non-compound round_1 -= bd - 10 (mc.rs round_pair, threaded
through scalar and SIMD passes, the identity fast paths, the scaled
walk, and the compound combines' post-rounds; the Wiener pair likewise).
Wiener's intermediate clamp keeps the corpus-proven constant structure
- the exact per-sample C transform moved the 10-bit 128-sb film gate
and is recorded as the lane's open half in lanes/av112bit.report.md.
8/10-bit regression: the three 10-bit film fixture gates, the 10-bit
key/inter/grain gates and 8-bit spot arms all green; refusal_inventory
and gate_coverage updated and green. Fixtures av112bit-{key,inter}.obu
committed with sha256 provenance in the report.2026-09-23
ec-av1: drain aomenc/ffmpeg stdin via one shared runner (148 piped spawn sites)Ahmet Kaan Gümüş · 54cadae
ec-av1: drain aomenc/ffmpeg stdin via one shared runner (148 piped spawn sites) Writing the y4m inline before wait_with_output deadlocked 138 gate sites the moment aomenc's stdout pipe filled (4 hangs today; lane-t900 r10 and lane-gaterecipe r1 measured the same class before). probe::run_with_stdin now owns every test-side spawn: stdin on a writer thread (EPIPE swallowed, the child's status/stderr carry the diagnosis), stdout+stderr drained by the parent. 9 duplicated feeder-thread helpers consolidated. Stress 20/20 on the intra-16x4-strip gate, 50-gate battery green, 0 warnings. Report: lanes/av1pipedrain.report.md
2026-09-13
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(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(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
2026-09-12
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
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
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
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
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
fix(av1): the 128 residual arm's parking comment closes its filter bug and the native gate prints the arm's residual fires -- bars 2160p re-measures three-way exact through the cdef owner map, long-GOP BD -0.1/+0.1 and 12-frame rows within 0.1 at 0.7-1.9 writer fires/frame, so EC_AV1_B128RES stays off; the pan residual witness re-vitalizes at q=60 after lane-rectdq's delta_q pricing made the forced root lose every partitionAhmet Kaan Gümüş · 2ed5165
fix(av1): the 128 residual arm's parking comment closes its filter bug and the native gate prints the arm's residual fires -- bars 2160p re-measures three-way exact through the cdef owner map, long-GOP BD -0.1/+0.1 and 12-frame rows within 0.1 at 0.7-1.9 writer fires/frame, so EC_AV1_B128RES stays off; the pan residual witness re-vitalizes at q=60 after lane-rectdq's delta_q pricing made the forced root lose every partition
2026-09-09
Merge branch 'lane-rectdq' (5b30b689): the 128 root search prices the delta_q group every non-skipped shape at a superblock origin codes; exact pricer witnessed over the whole domain; BD-neutral, ships as correctness; pins unmoved at 8291 / 33227Ahmet Kaan Gümüş · e01aa80
Merge branch 'lane-rectdq' (5b30b689): the 128 root search prices the delta_q group every non-skipped shape at a superblock origin codes; exact pricer witnessed over the whole domain; BD-neutral, ships as correctness; pins unmoved at 8291 / 33227 delta_q_bits prices write_delta_q's symbol, escape literals and sign through SymbolEncoder::pricer (a table-entry sum under-priced the escape by 0.43 bits at abs=20: the literal bits are EC_MIN_PROB-floored symbols). Charged on the rect arm's first half, on the NONE arm when not skipped, and on the four-superblock arm; only a skipped whole-128 root is free. The writer's running CurrentQIndex is unknowable in the search, so the previous 128 root's target in raster order stands in. 12-frame film A flat, film B -0.2/-0.2, screen byte-identical; long-GOP film A +0.1/+0.1, film B -0.1/-0.1 (EC_AV1_RECTDQ=0 is the control). Open: the same shape with 128 superblocks off (skipped 64 NONE root free, its quadrant arm not) is unpriced.
Merge branch 'lane-ab128': the four AB partition shapes at the 128 root are written and witnessed sample-exact through both decoders, and ship off by measurement (EC_AV1_B128AB=1); pins unmoved at 8291 / 33227Ahmet Kaan Gümüş · fd1e74a
Merge branch 'lane-ab128': the four AB partition shapes at the 128 root are written and witnessed sample-exact through both decoders, and ship off by measurement (EC_AV1_B128AB=1); pins unmoved at 8291 / 33227 ab128_pieces carries the decoder's visit order in one table read by search, writer and grid publication; search_root_128_ab runs three skip pieces through search_skip_64; Quadrant::Ab128 writes them through write_inter_block_128_rect. Long-GOP film A +22.0/-8.5 vs control +21.9/-8.6, film B +75.8/+0.8 unchanged; 12-frame film A +18.1/-6.2 vs +18.0/-6.3, film B +23.1/-3.3 vs +23.0/-3.5; wall +8.7%; census 0-2 AB roots per frame against ~1000 blocks. A piece cannot run the full 64-root search: the syntax codes it as one block with no partition symbol. A skip block writes no cdef_idx literal, so the CDEF owner map needs no rect entry until a piece carries residual. Next lever at the root: a non-skip piece.
feat(av1): the AB arm at the 128 root ships OFF -- measured flat to 0.1 worse on every gate rowAhmet Kaan Gümüş · 7c89e33Browse files
Merge branch 'lane-lookahead' (57b7c510): one mini-GOP of encoder lookahead and a symmetric +-3 ARF filter window; long-GOP film B crosses rav1e speed 6; pins hold at 8291 / 33227Ahmet Kaan Gümüş · 323c803
Merge branch 'lane-lookahead' (57b7c510): one mini-GOP of encoder lookahead and a symmetric +-3 ARF filter window; long-GOP film B crosses rav1e speed 6; pins hold at 8291 / 33227 The encoder holds one closed mini-GOP in a ready slot and codes it when the next group closes, so the top ARF sees the next group's sources as display-future; the ARF temporal filter window is 3 past + 3 future at strength 2. Long-GOP vs libaom cpu-used 6 / rav1e speed 6: film A +22.0/-8.4 to +21.2/-8.8, film B +76.5/+1.2 to +72.1/-1.2 (+-1, +-2, +-4 and strength 3 bracketed in the report). 12-frame rows flat (max move 0.1, screen byte-identical): that gate absorbs its tail into one group and cannot see a lookahead lever. Cost: one mini_gop of latency, +199 MB source buffer at 4K. EC_AV1_LOOKAHEAD=0 restores byte-identical streams. Witness: 1/7/8/9/17 pictures at GOP 32 and 8 code every picture, byte-identical to lookahead-off, exact through both decoders. Bitrate gate no longer near its bound. Open: the tpl window at the top ARF still sees display-past leaves only.
fix(av1): the 128 rect root and the four-superblock arm pay for the delta_q group they codeAhmet Kaan Gümüş · dc9d340
fix(av1): the 128 rect root and the four-superblock arm pay for the delta_q group they code lane-rectdq. write_delta_q codes its symbol group for every shape but a SKIPPED whole-superblock PARTITION_NONE root, so the 128 HORZ/VERT candidate and the four 64 superblocks under a 128 grid were both priced as if the group were free while only the NONE root really is. delta_q_bits prices the writer's own three pieces through a pricing coder (the escape literals are equiprobable symbols, not free bits), and delta_q_bits_at_root charges it once per root, at the root's own sb_q cell against the previous 128 root's target standing in for the writer's CurrentQIndex. EC_AV1_RECTDQ=0 is the control. A unit witness enumerates delta_q_abs steps -20..=20 against write_delta_q's bit account; the two agree to 1e-9.
Merge branch 'lane-b128hv' (c2cc62bc): the 128 root offers PARTITION_HORZ / PARTITION_VERT skip halves, the writer's first rectangular blocks; long-GOP both films down on both columns; pins 8291 / 33227Ahmet Kaan Gümüş · b4cfa09
Merge branch 'lane-b128hv' (c2cc62bc): the 128 root offers PARTITION_HORZ / PARTITION_VERT skip halves, the writer's first rectangular blocks; long-GOP both films down on both columns; pins 8291 / 33227 The tile writer had never coded a rectangular block at any size: every neighbour record took one side into both bands. Rect recording (record_planes_rect, record_mi_planes_rect, record_inter_rect_mi, record_compound_rect_mi, record_txfm_rect, both palette bands), write_inter_block_128_rect, search_root_128_rect with MiGrid::snapshot_rect / restore_rect, search_skip_64 over a (w,h) footprint. EC_AV1_B128HV=0 is the control. Long-GOP film A +22.0/-8.4 to +21.9/-8.6, film B +76.5/+1.2 to +75.8/+0.8 vs libaom 6 / rav1e 6; 12-frame film rows +0.1, bars 2160p +8.4/-14.0, screen unchanged; wall +10.5% / +2.9%. Witness: forced HORZ, forced VERT and unforced passes decode exact through both decoders. Open: the rect root candidate does not price its delta_q group. Deferred: rect halves' residual (shares EC_AV1_B128RES), AB shapes at the 128 root.
Merge branch 'lane-edge128' (d06c5ee6): the CDEF search prices one cdef_idx per block the syntax carries, not one per 64x64 unit; the 128 residual arm's 8-sample edge mismatch was encoder reconstruction only, pins hold at 8290 / 33227Ahmet Kaan Gümüş · 1fcce58
Merge branch 'lane-edge128' (d06c5ee6): the CDEF search prices one cdef_idx per block the syntax carries, not one per 64x64 unit; the 128 residual arm's 8-sample edge mismatch was encoder reconstruction only, pins hold at 8290 / 33227 Class `plan finer than its syntax`: read_cdef codes one literal per block and copies it over every 64x64 unit the block spans, so a whole 128 root carries one index for four units while filter_search priced four. tile::cdef_unit_owner maps each unit to the unit whose literal covers it and pick_filters scores per group. ffmpeg and decode_stream were byte-identical on the failing stream; only replay_final differed (710 samples). Same-shape sweep complete: delta_q already collapsed to the root by lane-b128m, LR unit is 128 under SB128. The residual arm stays behind EC_AV1_B128RES (film B +23.4/-3.2 vs control +23.6/-3.1). Pins unaffected: a default 128 root is always skip and CDEF never filters an all-skip unit.
feat(av1): the 128 root offers PARTITION_HORZ and PARTITION_VERTAhmet Kaan Gümüş · d106c89
feat(av1): the 128 root offers PARTITION_HORZ and PARTITION_VERT search_root_128_rect prices the root as two 128x64 / 64x128 skip blocks -- single reference or compound, the shipped NONE machinery halved. The first half is published into the mi grid before the second is searched (the writer publishes it too), and the grid is put back for the four-superblock arm; the NONE / HORZ / VERT candidates are ranked together against the split. search_skip_64 now takes a (w, h) footprint and tiles it into squares of its shorter side, which is byte-identical at w == h. Census extended with the HORZ/VERT counts. Witness green on the first draft: 2640 forced 128x64 and 2640 forced 64x128 halves sample-exact through decode_stream and ffmpeg, with 17 HORZ + 9 VERT unforced over 12 frames. Pin q=150 8290 -> 8291; the q=60 pin does not move; EC_AV1_B128HV=0 restores both.
wip(av1): lane-b128hv search-side HORZ/VERT at the 128 root, snapshot (orchestrator)Ahmet Kaan Gümüş · 4568a63Browse files
feat(av1): the writer records a rectangular block's two neighbour bands, and codes a 128-root HORZ/VERT halfAhmet Kaan Gümüş · b52bd17
feat(av1): the writer records a rectangular block's two neighbour bands, and codes a 128-root HORZ/VERT half The tile writer had no rect path at all: record/record_inter/record_planes/ record_txfm and the palette bands each took one side and stamped it into both the above and the left band. Each now has an (above = width, left = height) twin, the square call delegating to it, and write_inter_block_128_rect codes one 128x64 / 64x128 half at the root's own square CDF context, skip only. Quadrant::Rect128 carries the pair. The search side is unchanged, so the pins are byte-identical.
feat(av1): one mini-GOP of lookahead behind a knob, and a future half for the ARF filter windowAhmet Kaan Gümüş · a1a8777Browse files
Merge branch 'lane-arftf' (dbf5dad5): ARF temporal filter strength swept on the long-GOP gate and shipped at 2; mid-ARF filter and a 4-past window refuted; pins re-taken at the merge 8290 / 33227Ahmet Kaan Gümüş · fa0b48eBrowse files
test(av1): drop the b128r bisect scaffolding from the native gateAhmet Kaan Gümüş · 5e3125c
test(av1): drop the b128r bisect scaffolding from the native gate The mismatch map and the stream/reconstruction dump it grew were the instruments for one open defect; that defect is closed, so the gate goes back to its plain first-mismatch panic.
2026-09-08
fix(av1): the four 64x64 CDEF units of a 128x128 root block share one cdef_idxAhmet Kaan Gümüş · 74b705d
fix(av1): the four 64x64 CDEF units of a 128x128 root block share one cdef_idx read_cdef (spec 5.11.56) codes ONE cdef_idx literal for the block that first reaches a 64x64 unit and copies it over every unit that block SPANS, so a whole 128x128 root puts one literal in the stream for all four of its units. The encoder's CDEF search priced a preset per unit and its filter replay applied all four, while only the origin's reached the stream -- every decoder then filtered the other three with the origin's strengths. The bitstream was always right (ffmpeg and our own decoder agreed with each other); the encoder's own reconstruction, which is what the next frame predicts from, was a filter apart. tile::cdef_unit_owner maps each 64x64 unit to the unit whose literal covers it (identity for every block of one unit or less), and filter_search::pick_filters scores and chooses per GROUP: a covered unit's error is summed into its owner's and it takes its owner's index. Witnessed by encode::tests::a_128_root_residual_block_under_a_per_unit_cdef_list_decodes_exact (--ignored): 1440 residual 128 roots, 168 units taking another unit's literal, sample-exact against our decoder and ffmpeg.
feat(av1): the 128 root offers the compound pair candidatesAhmet Kaan Gümüş · 53ce20d
feat(av1): the 128 root offers the compound pair candidates search_root_128 passed an empty compound list, so a 128x128 block could only ever name one reference -- while the writer had had the path since lane-b128 (write_inter_block_128 calls write_compound_block for a block that names a second one). The root now builds the LAST+GOLDEN / LAST+ALTREF stacks at its own 32x32-mi window, exactly as the 64 root builds them per superblock, and offers the same three modes. It FIRES on real content: up to 80 compound 128x128 blocks per frame on the 4K film row (census, EC_AV1_B128_CENSUS=1), against one per eight frames on synthetic bars. 12-frame native gate, BD-rate vs libaom cpu-6 / rav1e s6, control -> arm: bars 1080p -3.4/-19.0 -> -3.4/-19.0 bars 2160p +8.6/-13.8 -> +8.6/-13.7 film A +18.1/ -6.2 -> +17.9/ -6.4 film B +23.8/ -2.8 -> +23.6/ -3.1 screen +14.4/-33.2 -> +14.4/-33.2 Both film rows down on both columns, screen and bars flat; ours-wall on the 4K film row 124.7s -> 138.2s (+10.8%). Witness: a testsrc2 clip codes 432 compound 128x128 blocks, sample exact through decode_stream and ffmpeg (--ignored, root forced). Pins re-taken: the shipped stream moves 8354 -> 8364 bytes at q=150 and 33222 -> 33257 at q=60; EC_AV1_B128COMP=0 restores both exactly.
fix(av1): one cdef_idx literal covers every 64x64 unit its block spans; the 128 residual arm ships opt-inAhmet Kaan Gümüş · f677e4c
fix(av1): one cdef_idx literal covers every 64x64 unit its block spans; the 128 residual arm ships opt-in libaom stores the cdef_idx it reads at the origin mi of the 64x64 CDEF unit, and av1_cdef_frame reads the strength back off each unit's origin mi -- so a block WIDER than one unit (the 128 root's own block, the only one there is) drives every unit it covers with its single literal. This decoder stamped the reading block's own cell alone, which no stream could reach before the 128 root carried a residual. The residual arm itself is measured INERT (0-2 blocks per frame against ~90 whole 128 roots on the native gate) and, switched on, leaves 8 luma samples of the bars 2160p row disagreeing with ffmpeg at a 128 superblock's horizontal edge -- a filter-stage interaction, not the coefficient path (the arm's own forced witness is byte-exact through ffmpeg over 420 blocks). It therefore ships behind EC_AV1_B128RES=1 until that is root-caused; the default encoder is byte-identical. The gate driver now prints the whole mismatch map (count + row/col span) before it panics, which is what made the 8-sample cluster readable.
feat(av1): the ARF temporal filter's strength swept on the deciding gate ships at 2Ahmet Kaan Gümüş · 0717f83
feat(av1): the ARF temporal filter's strength swept on the deciding gate ships at 2 Long-GOP gate (48 pictures, BD vs libaom cpu-6 / rav1e s6): strength 1 +22.6/-8.1 and +81.6/+4.8, 2 +22.2/-8.2 and +78.6/+2.7, 3 (was) +22.7/-7.9 and +79.0/+2.7, 5 +23.9/-7.4 and +83.6/+5.1. Single-peaked, bracketed, down on all four columns against the shipped 3. Guard rows (12 pictures) move at most +0.2/+0.1 and the screen row is byte-identical. Byte pins re-taken: 8218 -> 8307 at q=150, 33017 bytes with a different hash at q=60.
feat(av1): the 128 superblock root codes a real residualAhmet Kaan Gümüş · 1ee7fc6
feat(av1): the 128 superblock root codes a real residual The 128x128 PARTITION_NONE block is no longer skip-only. Its residual is the four 64x64 mu chunks libaom's decode_token_recon_block walks: per chunk one TX_64X64 luma unit (its coded 32x32 corner, DCT-only at this size) then one TX_32X32 unit per chroma plane on the offset-10 txb_skip rows, each publishing its own coefficient context before the next unit reads it, with the var-tx tree's four depth-0 txfm_partition symbols in front. The search prices that shape against the skip arm it already committed to the planes, quantized at the qindex the root itself signals. One defect found on the way: write_inter_block_128 recorded skip = true in its own neighbour band whatever the block was, so the next root's skip symbol took CDF row 1 where the reader takes row 0. Witness (--ignored, forced arm): 420 residual 128x128 blocks, sample exact through decode_stream and ffmpeg.
Merge branch 'lane-b128m' (14c23a84): 128x128 superblocks on by default; delta_q coded once per 128 root, filter context copy carries the superblock size, intrabc predictor by superblock size, encode-then-decode gates use the encoder context; pins re-taken at the merge 8354 / 33222Ahmet Kaan Gümüş · a4a0871Browse files
docs(av1): lane-b128m report -- four 128-superblock defects, the gates and the flipAhmet Kaan Gümüş · e7bbd0fBrowse files
feat(av1): two knobs for the ARF temporal filter -- window width and a mid-ARF strengthAhmet Kaan Gümüş · ea60760
feat(av1): two knobs for the ARF temporal filter -- window width and a mid-ARF strength The filter's neighbour count was a literal 2 and it ran on the top ARF only. Both are now speed-table entries with env overrides (EC_AV1_ARF_TF_WIN, EC_AV1_ARF_TF_MID), defaults unchanged (2 / off), so the sweep arms are env-only.
Merge branch 'lane-arfpred' (bad02229): the top ARF is coded from a temporally filtered source (strength 3, off below anchor qindex 16); long-GOP film B +85.3/+6.7 to +79.0/+2.7; ARF prediction census; pins re-taken 8218 / 33017Ahmet Kaan Gümüş · 7c94ff1Browse files
feat(av1): the top ARF is coded from a temporally filtered sourceAhmet Kaan Gümüş · 7b95799
feat(av1): the top ARF is coded from a temporally filtered source The 48-picture film B census names the top ARF as the overspent level (55% of the stream, 6992 B a frame against rav1e's 3872 at a FINER quantizer) and splits its per-frame gap 61% residual / 28% mode+partition / 9% mv. The new arf_pred_census instrument then separates the two candidate causes of that residual: the anchor's lag is worth 7.1% of its prediction SAD (film B 1.199 per pixel at lag 8 vs 1.114 at lag 4) while a motion-compensated average of the group's own display neighbours removes 11.7% of it -- the residual is mostly source grain, which no search at any lag can predict. speed::ARF_TF now defaults to 3.0: the top ARF's source is filtered against its two buffered display neighbours with weight exp(-mse/strength). Long-GOP gate, BD vs libaom / rav1e: film A +23.5/-8.0 -> +22.7/-7.9, film B +85.3/+6.7 -> +79.0/+2.7. Strength is sharply single-peaked (8, 15, 30 all lose); EC_AV1_ARF_TF=0 restores the old streams. Pins re-taken -- the hidden frames' pixels move by construction: 8269 -> 8218 at q=150 and 33044 -> 33017 at q=60.
feat(av1): 128x128 superblocks by defaultAhmet Kaan Gümüş · ffb600b
feat(av1): 128x128 superblocks by default SB128_DEFAULT flips on now that the eleven 128-superblock desyncs are closed. Pins re-taken: the same four pictures code 8327 B at q=150 and 33194 B at q=60 (was 8252 / 33053); EC_AV1_SB128=0 restores them. Suite at the new default: s1 342 passed, s2 201 passed, s3 42 passed, 0 failed.
fix(av1): write a cut palette block's colour-index map over its on-screen part onlyAhmet Kaan Gümüş · 254b908
fix(av1): write a cut palette block's colour-index map over its on-screen part only A palette block straddling the frame's right/bottom mi edge codes its map over spec 5.11.50's onscreenWidth x onscreenHeight corner and the decoder replicates it outward. The writer walked the full block grid, so every conformant decoder read the map short and desynced the rest of the tile; our own trial decode agreed with itself because the encoder-side FrameCtx carried no mi dims and the reader mirrored the writer there. Both frame encoders now publish the header's mi dims on that ctx, the palette search folds its searched map to the on-screen corner (so the priced, reconstructed and written map are one map), and the writer codes that corner only. The reader's mirror-the-writer branch is gone. Witness: encoder::tests::a_palette_block_cut_by_the_frame_edge_decodes_ exactly_through_ffmpeg -- our encoder at 384x152, 12 cut maps written, every plane of every frame equal to ffmpeg's decode.
instrument(av1): price the top ARF's prediction and a source temporal filterAhmet Kaan Gümüş · 56d80b6
instrument(av1): price the top ARF's prediction and a source temporal filter The 48-picture film B census says the top ARF carries 55% of the stream at 6992 B a frame against rav1e's 3872 at a FINER quantizer (118 vs 104), and 61% of that per-frame gap is residual, not syntax. `arf_pred_census` (--ignored) prices the two candidate causes without an encoder change: the anchor's lag is worth only 7% of its prediction SAD (film B 1.199 per pixel at lag 8 against 1.114 at lag 4), while a motion-compensated average of the display neighbours removes 11.7% of it (film A 5.9%) at 50.1 dB from the source it replaces. `encode::arf_temporal_filter` builds that filter and `speed::ARF_TF` (`EC_AV1_ARF_TF=<strength>`) arms it on the top ARF only; the default is 0, so no shipped stream moves. The census example also reports per-plane PSNR now.
Merge branch 'lane-arfq' (240c1c6c): the top ARF maps the tpl ratio onto its superblock quantizers at 0.375 (mid/leaf 0.25); long-GOP both films down on both columns; pins re-taken 8269 / 33044Ahmet Kaan Gümüş · 7cc8fe1Browse files
fix(av1): the writer's intrabc DV predictor and wavefront follow the superblock sizeAhmet Kaan Gümüş · 44a12af
fix(av1): the writer's intrabc DV predictor and wavefront follow the superblock size tile::intrabc_dv_pred hardcoded mib_size = 16 while decode.rs read_intrabc_dv takes sb_mi_cur, so under EC_AV1_SB128 the two derived different fallback DVs from identical symbols (writer -48 px, reader -112 px at mi=(36,4)) and the key frame reconstructed differently -- no divergent symbol at all, the whole trace matches except the MVDBG note. Ibc::dv_valid likewise counted libaom's 256-pixel intrabc delay in 64s under a 128 superblock, offering sources the 128 visit order had not reconstructed yet. Witness: a_repeated_pattern_key_frame_codes_intrabc_blocks... ok under EC_AV1_SB128=1.