forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 706758b4e1836307c847fddbdd4fd7d0a1b954d5

2026-09-06

test(av1): the native BD arm covers all three gate clips in one tableAhmet Kaan Gümüş · 706758b
test(av1): the native BD arm covers all three gate clips in one table

The native-crop arm only ever measured the screen capture, with the 1080p
film behind an opt-in and the 2160p film absent, so the two content classes
whose default-gate numbers are worst were never read at a resolution the
encoder's tools can serve. It now runs all three clips by default -- both
films and the capture, each a centred, superblock-aligned 1920x1024 crop of
its own source, never scaled -- printing the default gate's own columns with
the crop size folded into the clip cell. The three per-clip selectors survive
as a subset filter (EC_AV1_NATIVE_FILM / _FILM4K / _SCREEN): setting any one
keeps only those rows, setting none keeps all. The wall column is labelled
noisy; it is not a measurement on a loaded box.

No encoder change: the default gate reads +83.0 / +99.9 / +54.5 as before.
Merge branch 'lane-av1native' (288a7963): a native-resolution BD arm (bd_rate_screen_native, 1920x1024 crop, no downscale)Ahmet Kaan Gümüş · 4a3f924
Merge branch 'lane-av1native' (288a7963): a native-resolution BD arm (bd_rate_screen_native, 1920x1024 crop, no downscale)

At native the screen capture is +59.3 vs libaom and -10.0 vs rav1e, the
1080p film crop +18.9 / +1.5: the 640x384 recipe measures content 4x
further from libaom than the real files. No default moved; intrabc loses
at native too (11499 RD wins cannot pay the key frame's filter loss).
Merge branch 'lane-av1simd' (5da4ea68): exact integer SAD/SSE, cached transposed forward basis, no per-row / per-prediction allocationsAhmet Kaan Gümüş · 107329c
Merge branch 'lane-av1simd' (5da4ea68): exact integer SAD/SSE, cached transposed forward basis, no per-row / per-prediction allocations

Byte-identical (FNV sets on the three gate clips against a clean-checkout
baseline binary); single-thread ladder -11.1% instructions; 3840x1608
4x2/8 threads 1.41 -> 1.60 fps. AVX2 forward passes not built: 67% of
forward transforms are 4x4 and the addressable share is ~1.4%.
test(av1): a native-resolution screen BD arm, crop not downscaleAhmet Kaan Gümüş · cd2c183
test(av1): a native-resolution screen BD arm, crop not downscale

The default gate downscales the OBS capture to 640x384, which destroys the
exact 16x16 repeats intrabc and part of the palette exist for. bd_rate_screen_native
crops a superblock-aligned 1920x1024 window out of the middle at native size
and runs the same 12-frame four-quantizer ladder against libaom cpu-used 6 and
rav1e speed 6, with the same three-way sample-exact assertion.
Merge branch 'lane-av1ibc' (5ddbe178): intra block copy on screen-detected key frames, oracle-proven, default OFFAhmet Kaan Gümüş · cbbd6e2
Merge branch 'lane-av1ibc' (5ddbe178): intra block copy on screen-detected key frames, oracle-proven, default OFF

Ships behind EC_AV1_INTRABC=1: at the gate's 640x384 downscale only 22 of
1200 searches find a valid DV and none win RD, so the frame pays the
in-loop-filter loss for nothing (screen +54.5 -> +59.1 with it on). Default
streams byte-identical. Measure at native capture resolution before any
constant moves (class: gate-recipe confound).
Merge main into lane-av1simdAhmet Kaan Gümüş · c8907e1Browse files
test(av1): pin the typed forward transform bit-identical to its strided formAhmet Kaan Gümüş · e70dd64
test(av1): pin the typed forward transform bit-identical to its strided form

Compares raw bit patterns, not an epsilon: the contiguous-basis rewrite is
exact only because it moved the loop over the outputs and left each output's
term order alone, so a reassociation would surface here as a last-place
difference. Covers every non-flipped non-DCT type at 4/8/16/32, with an
all-zero residual and a half-zero-rows residual so both skips are walked.
Merge branch 'lane-av1gatedec' (15c70d52): the BD gate decodes every ladder point with ffmpeg and with this crate's own decoder and asserts all three sample-exactAhmet Kaan Gümüş · c759b78
Merge branch 'lane-av1gatedec' (15c70d52): the BD gate decodes every ladder point with ffmpeg and with this crate's own decoder and asserts all three sample-exact

The ffmpeg leg always ran; the own-decoder leg was missing on the flat
ladder. Failures now name clip, q, frame, plane and sample.
perf(av1): stop allocating per row and per intra predictionAhmet Kaan Gümüş · 013dc91
perf(av1): stop allocating per row and per intra prediction

`Plane::source_block`/`snapshot` built one `Vec` per row of the square they
copied and then collected those; `rows_of` copies straight into one buffer.
`intra_predict_u8` allocated its two widened edges and its `u16`
destination on every call -- once per mode per trial -- and all three fit on
the stack at the sizes the encoder uses.

No arithmetic changed; the enc_probe FNV set on the three gate clips is
unmoved. 1080p ladder: 101.65e9 -> 98.27e9 instructions:u (-11.5% against
the b5373c65 baseline's 111.09e9, ABAB x2).
Merge branch 'lane-av1comp3' (d9be6595): compound candidates at the 16x16/8x8 leaves; straddling-leaf mi publication goes through record_miAhmet Kaan Gümüş · 8b1a733
Merge branch 'lane-av1comp3' (d9be6595): compound candidates at the 16x16/8x8 leaves; straddling-leaf mi publication goes through record_mi

BD vs libaom +94.4/+104.3/+66.8 -> +83.0/+99.9/+66.4, vs rav1e
+47.5/+63.6/+10.7 -> +39.7/+60.0/+10.2; compound share 26-34% of inter
blocks; EC_COMP_MISMATCH 0. SPLIT_RD_THRESHOLD re-swept, stays 0.125.
perf(av1): exact integer SAD/SSE and a vectorizable typed forward basisAhmet Kaan Gümüş · fae8c1b
perf(av1): exact integer SAD/SSE and a vectorizable typed forward basis

Two byte-exact rewrites on the encoder search's hottest loops, both proved
by the enc_probe FNV set on the three gate clips at four q points.

`Plane::block_sad`/`block_sse` replace four hand-rolled `f64` accumulations
that ran an integer division and remainder per sample to recover (row, col)
from a flat index. The sums they replace are whole numbers far below 2^28,
so `f64` held every partial sum exactly and neither the order of the adds
nor the accumulator type can change the result.

`forward_transform_2d_typed`'s two matmuls summed over a strided basis,
which no vectorizer can touch. `axis_basis_t` caches the transposed basis so
the pass is contiguous in the basis index and strided in nothing; each
lane's terms stay in the same order, so the levels are unchanged. The row
pass now also records which rows it filled, and the column pass walks only
those.

1080p ladder, 12 frames, 4 q points: 111.09e9 -> 101.65e9 instructions:u
(-8.5%, ABAB x2).
test(av1): the BD gate decodes every ladder point with our own decoder tooAhmet Kaan Gümüş · 8f036d9
test(av1): the BD gate decodes every ladder point with our own decoder too

`our_ladder` already decoded each of our streams with ffmpeg and asserted
that decode sample-exact against the encoder's reconstruction; what it
never did was run OUR decoder over the same stream, so every feature
only our writer/reader had seen (size-8 chroma palettes on the screen
clip, say) was gated by ffmpeg alone. Each ladder point now decodes the
stream twice and asserts all three pictures -- reconstruction, ffmpeg,
ours -- equal in Y, U and V over every shown frame in display order, and
a failure names the clip, q, frame, plane and first differing sample.
The `EC_AV1_PYRAMID` path gets the same all-plane compare (the facade
exposes no per-packet reconstruction, so it pins the two decoders).
Merge branch 'lane-av1pal2' (be1937b0): chroma palette and a 128-colour palette boundAhmet Kaan Gümüş · 691f69e
Merge branch 'lane-av1pal2' (be1937b0): chroma palette and a 128-colour palette bound

Screen BD vs libaom +66.4 -> +55.1, vs rav1e +10.3 -> +1.1; both film
clips byte-identical. The 32-colour bound was an unswept constant (-9.5
points on its own). Screen tools forced on for film measured worse on 1080p
and non-monotone, so the detector stays; the 32x32 palette arm was dead
work and is not in.
Merge branch 'lane-av1fpar' (a883afd5): the filter-search replay fires on cropping frames and the whole filter stage runs banded across the tile workersAhmet Kaan Gümüş · d4248c3
Merge branch 'lane-av1fpar' (a883afd5): the filter-search replay fires on cropping frames and the whole filter stage runs banded across the tile workers

The replay demanded frame dims == padded plane dims, which no export size
meets, so every candidate re-decoded the frame (57% of a 1080p frame wall).
1080p 4x2/8 threads 1.19 -> 3.49 fps; 3840x1608 0.69 -> 1.46 fps (1.59 at
12). Byte-identical; EC_AV1_STAGE_TIMES prints the per-stage breakdown.
test(av1): repin the encoder's own streams for the leaf compound candidatesAhmet Kaan Gümüş · 4619f22
test(av1): repin the encoder's own streams for the leaf compound candidates

Both pins shrink (7103 -> 7084 B at q=150, 26778 -> 26116 B at q=60).
feat(av1): compound candidates at the 16x16 and 8x8 inter leavesAhmet Kaan Gümüş · 9dbe40f
feat(av1): compound candidates at the 16x16 and 8x8 inter leaves

The two straddling-leaf mi publications spelled their vote out by hand
with ref_frame pinned to LAST and mv1 to (0,0) -- the encoder-grid-drift
class, correct only for as long as a leaf could never be compound. Both
now go through record_mi, byte-identically.

A leaf is then offered the compound candidates a whole 32x32 block is:
NEAREST_NEARESTMV, GLOBAL_GLOBALMV and NEW_NEARESTMV off the vector the
leaf already searched, against the compound stack built at the leaf's
own bw4/bh4. The tile writer already codes a compound block at any leaf
size, so no writer change was needed.
perf(av1): band the loop-restoration unit search by unit rowAhmet Kaan Gümüş · 63f3f62
perf(av1): band the loop-restoration unit search by unit row

`pick_restoration` priced every unit of every Wiener candidate on the frame
thread while the whole pool sat idle. A unit's cost is read off its own
samples and written to its own slot, so the walk is `chunks_mut` bands of
the same `best` -- the choice cannot depend on how many bands there are.

4 frames at 3840x1608, 4x2 tiles, 8 threads: the LR search goes 31.0 ->
13.4 ms/frame; 1080p 8.4 -> 4.5 ms/frame.
Merge branch 'lane-av1comp2' (238c65d8): NEAREST_NEW/NEW_NEAREST compound modes, distance-scaled motion search, and the encoder's mi grid votes both referencesAhmet Kaan Gümüş · fa932fb
Merge branch 'lane-av1comp2' (238c65d8): NEAREST_NEW/NEW_NEAREST compound modes, distance-scaled motion search, and the encoder's mi grid votes both references

BD vs libaom +94.4/+104.3/+66.8, vs rav1e +47.5/+63.6/+10.7 (from
+120.1/+128.5/+66.4 and +67.8/+86.0/+10.3). Root cause: record_mi published
compound blocks as single-reference, so 95 blocks per gate run were
predicted from vectors never trialled -- invisible to the ffmpeg gate;
EC_COMP_MISMATCH=1 is the detector (0 is the invariant). Pyramid still
loses on all three clips and stays off.
fix(av1): the per-tile search job arms its own order hintsAhmet Kaan Gümüş · aeaf6ba
fix(av1): the per-tile search job arms its own order hints

lane-av1tsearch moved the RD/motion search into one job per tile, and
ref_distance (the distance-scaled search step) reads tile.rs' ORDER_HINTS
thread-local: a search worker read (0, 0, [0; 7]) and scaled nothing, so the
coded bits depended on the thread count -- 2x1 tiles came out 9852 bytes at
one thread and 10034 at four. The inter search_tile closure now arms the
hints the same way the write jobs do.

encoder::tests::tile_bytes_do_not_depend_on_the_thread_count fails before this
and passes after. BD unchanged: +94.4/+104.3/+66.8 vs libaom.
perf(av1): band the encoder's frame-level filter stage across the tile workersAhmet Kaan Gümüş · 996b587
perf(av1): band the encoder's frame-level filter stage across the tile workers

The per-tile search leaves every core idle for the rest of the frame. The
filter stage now bands itself across the same workers:
`par::override_filter_threads` (thread-local, so nothing outside this span
changes) puts the deblock and CDEF replays, the capture decode's own filter
chain and the loop-restoration passes on the decoder's existing band split,
the per-64 SSE gets a unit-row band of its own (`unit_sse_rows`, partial
u64 sums), and a candidate's ~6 MB plane copies come off a recycled buffer
pool -- a fresh Vec per copy was 12.6% of a 1080p frame's wall in page
faults alone -- banded when the buffer is already the right length.

Gated by `filter_stage_bytes_do_not_depend_on_the_thread_count` (one tile,
a cropping size, 1 vs 2/4/8 threads) and by `unit_sse_matches_the_naive_sum`
at 2/4/8 bands.
perf(av1): the filter search's replay now covers cropped framesAhmet Kaan Gümüş · 8a4a771
perf(av1): the filter search's replay now covers cropped frames

The encoder scores ~30 deblock/CDEF candidates per frame by replaying the
loop filters on one captured reconstruction (`decode::FilterReplay`), but
the capture demanded `frame == plane` dimensions -- and no export size meets
that: 1080 and 1608 both pad to a superblock row. Every candidate at those
sizes fell through to a full re-decode of the frame, which the new per-stage
breakdown measures at 57% of a 1080p frame's wall.

The capture now also fires on a cropped frame and the replay finishes with
the decoder's own cropped return path (crop + wide-margin stash), so it is
still exactly the decode it stands in for.

1920x1080, 8 frames, 4x2 tiles, 8 tile threads: 6.75s -> 2.63s (1.19 ->
3.05 fps); filter search 57.2% -> 27.6% of wall.

Adds `par::timer`/`EC_AV1_STAGE_TIMES` (off by default: one relaxed atomic
load per stage per frame) and `encoder::tests::filter_stage_wall_*`, plus
`filter_replay_codes_the_same_stream_as_a_full_decode` at a cropping size.
feat(av1): chroma palette -- palette_uv_mode, the U cache/delta colours, V, and the shared index mapAhmet Kaan Gümüş · ace59f5
feat(av1): chroma palette -- palette_uv_mode, the U cache/delta colours, V, and the shared index map

The decoder read every one of these symbols already; the encoder wrote
palette_uv_mode == 0 unconditionally. Now search_chroma prices a chroma
palette arm against the best ordinary chroma mode: one 1-D k-means over U
(the same palette_candidates the luma arm uses, which is what keeps
u_colors ascending and distinct for read_palette_colors_uv's merge), V
taken as each cluster's mean, one index map shared by both planes at
(side/2).max(4) -- av1_get_plane_block_size, not a plain halving.

Mirrored from the decoder: read_palette_colors_uv (U's range starts at
256-first and its deltas are unbiased, both unlike Y), palette_uv_cache_mi
and record_palette_uv_rect (new above/left uv bands in tile.rs Neighbours,
drained through record_mi_planes so a block that takes no chroma palette
clears its column), and the plane order -- both colour lists, then both
index maps.

corner-cut: V's colours take the reader's raw form (leading bit 0, n 8-bit
literals) instead of the signed-delta form; ceiling ~n bits per block, and
the RD pricer sees it, so it can only make the encoder take fewer chroma
palettes than it should.

Screen clip: +56.9%/+2.3% -> +55.1%/+1.1% vs libaom/rav1e, 126 chroma
palette blocks, 6.1s -> 6.4s. Film clips do not set the header bit and are
byte-unchanged. The oracle test now proves size-2 and size-4 chroma
palettes AND 36 colours taken from the neighbour cache.
Merge branch 'lane-av1tsearch' (52ab4845): the RD/motion search runs one job per tileAhmet Kaan Gümüş · fe25c8d
Merge branch 'lane-av1tsearch' (52ab4845): the RD/motion search runs one job per tile

1080p 4x2 at 8 threads 11.49 -> 6.98 s (1.04 -> 1.72 fps); 3840x1608 4x2
17.12 -> 8.64 s. Inter frames byte-identical at every layout; key frames
at multi-tile layouts now price modes against tile-local bands (what the
writer reads back). 1x1 unchanged. ~43% of an inter frame is outside the
tile search (frame-level filter search): that is the next serial wall.
perf(av1): the palette colour bound ships at 128, not 32Ahmet Kaan Gümüş · 7aa0792
perf(av1): the palette colour bound ships at 128, not 32

The bound this lane inherited from the first palette lane was never swept.
On the gate's screen capture it was throwing away half the palette blocks:
32 -> 515 blocks, +66.4%/+10.3% vs libaom/rav1e; 64 -> 1264, +57.1%/+3.2%;
128 -> 1102, +56.9%/+2.3%; 256 byte-identical to 128. The film clips do not
set the header bit, so they are unchanged, and the screen clip's encode wall
is unchanged too (6.1s).
Revert "feat(av1): the 32x32 inter search's intra candidate gets a palette arm"Ahmet Kaan Gümüş · 530272b
Revert "feat(av1): the 32x32 inter search's intra candidate gets a palette arm"

Measured dead work: with the arm on, the screen clip codes the SAME 1102
palette blocks and the same bytes at every rate point as with it off
(EC_AV1_PAL_MAXCOLORS=128 both sides), for +13% encode wall on that clip
(6.9s vs 6.1s) -- the trials run, and a 32x32 intra candidate inside an
inter frame never beats NEARESTMV plus a 1024-entry colour map.

This reverts commit 28397f14.
feat(av1): the 32x32 inter search's intra candidate gets a palette armAhmet Kaan Gümüş · d247d42
feat(av1): the 32x32 inter search's intra candidate gets a palette arm

The corner-cut code_square closed for an inter frame's 16/8 intra leaves
but the hand-rolled 32x32 loop did not. tile.rs already writes
palette_mode_info from block.palette at that side, so only the candidate
was missing.
Merge branch 'lane-av1pal' (0966e6d6): screen-content detection and luma palette coding on key and inter framesAhmet Kaan Gümüş · 93f25fe
Merge branch 'lane-av1pal' (0966e6d6): screen-content detection and luma palette coding on key and inter frames

Screen BD vs libaom +73.0 -> +66.4, vs rav1e +13.7 -> +10.3; both film
clips byte-identical (detector off there; libaom's 4-colour bound separates
nothing on real material, 32 colours over a third of the frame does).
feat(av1): the motion search starts from a step scaled by the reference's order-hint distanceAhmet Kaan Gümüş · d53c852
feat(av1): the motion search starts from a step scaled by the reference's order-hint distance

A reference twice as far back holds content that has moved about twice as
far, so motion::search now takes that reference's own order-hint distance and
opens its log stage at step * (1 + 0.5 * (dist - 1)), capped at 4x the flat
step. LAST stays at the flat step; GOLDEN (the key frame, 2..12 frames back
in this GOP) and ALTREF (2) widen.

The hints had to be armed before the search: tile::arm_order_hints ran beside
the tile WRITE, so ref_distance read (0, 0, [0; 7]) and returned 1 for every
reference -- the first sweep came out byte-identical at every scale (the knob
never reached the tool). Armed in encode_inter_frame's header setup, the
traced distances are ALTREF 2 and GOLDEN 2..12.

Sweep vs libaom (1080p/2160p, screen byte-identical at every point): 0
+100.7/+115.8, 0.25 +98.5/+112.2, 0.375 +98.2/+115.6, 0.5 +94.4/+104.3, 0.625
+95.9/+106.5, 0.75 +92.8/+112.7, 1.0 +98.8/+113.0. Ships at 0.5 (-6.3/-11.5
/flat, vs rav1e +47.5/+63.6/+13.8); wall 5.7s/5.1s/5.8s, unchanged.

Byte pins move with the streams.
merge main 1c844b01 (tile layout) into the palette laneAhmet Kaan Gümüş · eeee023
merge main 1c844b01 (tile layout) into the palette lane

Hand-resolved: the palette write sits inside the per-tile closures main's
TileLayout introduced, so `arm_screen` is armed per tile job beside
`arm_sign_bias`/`arm_reference_select`; the new plural
`decode_inter_frame_tiles_lr` takes this lane's `allow_screen_content_tools`
and the single-tile wrapper forwards it.
fix(av1): the GOP round-trip tests decode the key frame under its own screen flagAhmet Kaan Gümüş · 625e01e
fix(av1): the GOP round-trip tests decode the key frame under its own screen flag

Three decode::tests GOP tests handed `decode_key_frame_tile_lr` a hard-coded
`allow_screen_content_tools = false` while decoding an encoder-written tile
whose detector had fired (stale-header class, same shape as the
`reference_select` instance): frame 0's luma came back wrong.
perf(av1): the RD/motion search runs per tile, on the tile thread poolAhmet Kaan Gümüş · 8421ce2
perf(av1): the RD/motion search runs per tile, on the tile thread pool

The frame's superblock loop was one whole-frame pass in raster order even
when the frame carried a tile grid; only the entropy write was split
(lane-av1tiles), which is why tile threads bought nothing measurable.

Both search loops now run one job per tile through `search_tiles`, the
search-side counterpart of `write_tiles`: each job owns its own
reconstruction planes, its own `MiGrid`, its own neighbour-mode bands and
its own `FrameCtx`, and copies its rectangle back into the frame's planes
at the end. Availability was already tile-relative, so a tile reads
nothing another tile wrote.

Inter frames are byte-identical to the whole-frame loop at every layout.
Key frames change at MULTI-TILE layouts only: the mode-cost bands are now
tile-local, which is what the tile writer actually reads back (a tile
resets its neighbour contexts, spec 5.11.1) -- the old frame-scoped bands
let a block at a tile's left edge cost its mode against the tile to its
west. One tile is unchanged, and the byte pins hold.
feat(av1): palette on the intra blocks of inter frames tooAhmet Kaan Gümüş · 17922e6
feat(av1): palette on the intra blocks of inter frames too

The three intra arms of the inter-frame writers (32/16/8) now code the same
spec 5.11.46 syntax the key frame's does, through one shared
`write_palette_syntax`; the neighbour bands are published from
`record_mi_planes` -- the single point EVERY block of either frame type
passes through -- so an inter block clears what an earlier palette block left
in its column instead of desyncing the next context (the hazard lane-t900 r23
hit on the decoder side).

The inter frame sets `allow_screen_content_tools` from its own detection,
gated on the sequence having offered the bit at all (the key frame's
decision); `decode_inter_frame_tile_lr` takes the flag rather than assuming
false, and `Encoded::screen` carries it to every raw-tile decode.

The leaf (16/8) intra candidates get the palette RD for free -- they route
through `code_square`. The 32x32 inter search's own intra loop does NOT yet
offer one (corner-cut: its candidates are hand-rolled beside the inter ones).

Check: a_screen_content_picture_codes_palette_blocks_ffmpeg_decodes_exactly
now codes a 4-frame GOP as well -- 3 inter frames set the bit, 56 palette
blocks, ffmpeg reconstructs all four frames exactly in all three planes.
feat(av1): NEAREST_NEWMV / NEW_NEARESTMV compound candidates on by defaultAhmet Kaan Gümüş · 757ff82
feat(av1): NEAREST_NEWMV / NEW_NEARESTMV compound candidates on by default

Each half-new mode pairs the compound stack's derived NEAREST vector on one
side with the single-reference search this block already ran on the other, so
neither costs a joint search. Both mirror decode.rs assign_compound_mv: no DRL
index, residual against compound stack entry 0.

Measured alone on the BD gate against the grid fix's base (+101.7/+116.6/+73.3
vs libaom): half-new +100.7/+115.8/+73.3 keeps (two down, screen byte-identical
-- it codes NEAREST_NEAREST only) and ships on; NEAR_NEARMV +102.2/+116.4/+73.3
does not and stays behind EC_AV1_COMP_NEARNEAR, both arms together
+100.7/+116.1/+73.3. Compound share 12.1/13.0/31.9%; NEAREST_NEW 93/33/0,
NEW_NEAREST 39/13/0 blocks per gate run. Wall 6.6s/5.1s/5.6s.

Byte pins and the coefficient-price drift bound move with the streams (the
gate's own failure output); the drift widens to +29.6% because a compound
block's second reference tree, compound mode symbol and MV residual are all
outside the coefficient sum.
Merge branch 'lane-av1tiles' (d53ac525): multi-tile frames (uniform spacing, per-tile CDF/LR/neighbour reset) with deterministic parallel tile writesAhmet Kaan Gümüş · b58ff3f
Merge branch 'lane-av1tiles' (d53ac525): multi-tile frames (uniform spacing, per-tile CDF/LR/neighbour reset) with deterministic parallel tile writes

Sample-exact through our decoder and ffmpeg at 1x1/2x1/1x2/2x2/4x2; default
1x1 byte-identical. Root cause on the way: the writer's intra_inter/tx-size
contexts asked frame-relative availability (class: new map ignores tile
edge). Tile threads buy no wall yet: the search is still whole-frame.
fix(av1): the encoder's own mi grid recorded a compound block as single-referenceAhmet Kaan Gümüş · 9b0008b
fix(av1): the encoder's own mi grid recorded a compound block as single-reference

record_mi published every 32x32 inter block with ref_frame1 = NO_REF1 and
mv1 = (0,0), so from the first compound block on the encoder searched against
a grid the tile writer -- and therefore the decoder -- never had. The damage
is silent: the reconstruction the gate measures comes from re-decoding the
written tile, so 95 blocks per gate run were predicted from a vector the
encoder had never trialled and the ffmpeg sample-exact assert still passed.

The grid now votes both references, both vectors and decode.rs' own is_new_mv
(NEWMV plus compound modes 2/3/7). EC_COMP_MISMATCH=1 arms a writer-side
report of every block whose written vectors differ from the trialled ones:
95 -> 0 over the whole BD gate.

BD vs libaom +120.1/+128.5/+73.0 -> +101.7/+116.6/+73.3, vs rav1e
+67.8/+86.0/+13.7 -> +54.0/+74.5/+13.8; compound share 8.8/8.8/13.8% ->
11.5/12.9/31.9%. Wall 6.4s/5.1s/5.6s.

Also adds writer support and env-gated encoder candidates for NEAR_NEARMV /
NEAREST_NEWMV / NEW_NEARESTMV (EC_AV1_COMP_NEARNEAR, EC_AV1_COMP_HALFNEW),
both default off pending their own measurement.
merge: lane-av1tiles with main ac6e60b4 (compound prediction)Ahmet Kaan Gümüş · e6c05e0
merge: lane-av1tiles with main ac6e60b4 (compound prediction)

The per-tile jobs arm the compound lane's new thread-locals
(arm_reference_select / arm_order_hints) on their own workers.