forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 8a5feaaf4eec5ffa092cf5d42e7919f05c221426Filtered to crates/ec-av1/src/encode.rsClear filter

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
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
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.
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.
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.
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.
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.
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.
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.
fix(av1): the superblock size travels with a FrameCtx copy; two reach gates pin 64Ahmet Kaan Gümüş · ab4ff0c
fix(av1): the superblock size travels with a FrameCtx copy; two reach gates pin 64

filter_ctx_copy dropped sb128_flag/reach_sb_px, so a tile SEARCH worker
searched at 64 while the calling thread searched at 128: the coded bytes
depended on EC_AV1_TILE_THREADS under EC_AV1_SB128
(tile_bytes_do_not_depend_on_the_thread_count, 1x2 tiles, 9251 vs 9239).

every_tile_layout: the spec's uniform spacing derives the tile count from
the superblock grid, so a 128-superblock frame with 5 SB columns codes 3
tiles for tile_cols_log2=2; the test now expects the encoder's own grid.
The two reach gates transcribe libaom's 64-superblock tables, so they pin
a 64 context instead of following the process knob.
feat(av1): the top ARF codes its delta_q at 1.5x the preset's strengthAhmet Kaan Gümüş · 29220f1
feat(av1): the top ARF codes its delta_q at 1.5x the preset's strength

lane-arfq: `speed::DQ_LEVEL_K = [1.5, 1.0, 1.0]` -- at preset 0 the mini-GOP's
own hidden ALTREF now maps the tpl ratio onto its superblock quantizers at
0.375 where the mid level and the leaves keep 0.25.

Long-GOP gate (48 pictures, BD vs libaom / rav1e), control reproduced first:
  film A +24.0/-7.6 -> +23.5/-8.0, film B +85.8/+7.1 -> +85.3/+6.7
i.e. both films down on both columns. 12-frame gate: bars 1080p -3.1/-18.7 ->
-3.2/-18.8, bars 2160p +9.1/-13.3 -> +9.2/-13.3, film A +20.3/-5.0 ->
+20.3/-4.9, film B +24.6/-2.0 -> +24.7/-1.8, screen +14.6/-33.2 unchanged
(a screen frame codes no delta syntax at all).

0.5 buys film A twice as much (+23.0/-8.2) and turns film B back up
(+86.0/+7.3) while costing the 12-frame film B row 0.4; the strength sweep and
the per-level census are in lanes/arfq.report.md.

Byte pins re-taken with a five-line comment: 8252 -> 8269 at q=150 and
33053 -> 33044 at q=60; green at default and at EC_AV1_SPEED=6.
fix(av1): the delta_q unit is the 128 superblock under EC_AV1_SB128Ahmet Kaan Gümüş · 2dc9fc2
fix(av1): the delta_q unit is the 128 superblock under EC_AV1_SB128

The writer gated its delta_qindex group on a hardcoded 64x64 position
(tile.rs SB_MI) while decode.rs maybe_read_delta_q gates on sb_mi_cur, so
with per-superblock delta_q armed (preset 0) and 128 superblocks on the
writer coded four symbol groups per 128 root and the reader read one --
the first divergent symbol is the second 64 cell's delta_q_abs, surfacing
frames later as the arf refusing a reference slot. The 64-root whole-block
call also claimed is_whole_sb under a 128 superblock, which suppresses the
read on the wrong side. The search-side grid is flattened per 128 root so
the qindex a cell is quantized at is the one its root codes.

Witness: a_128_superblock_clip_whose_root_search_codes_128x128_blocks... ok