forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on e83e29a304dec735edd5d3dfe2cdb1fb60d54ee3

2026-09-06

feat(av1): an inter LEAF searches its second reference, so NEAREST_NEW and NEW_NEW reach the leavesAhmet Kaan Gümüş · e83e29a
feat(av1): an inter LEAF searches its second reference, so NEAREST_NEW and NEW_NEW reach the leaves

A 16x16/8x8 leaf only ever ran one motion search (against LAST), so its
compound candidates could name a stack vector for the second half and nothing
else. It now runs a search against the second reference too, seeded from and
rounded to compound stack entry 0 (what assign_compound_mv predicts from at
ref_mv_idx 0), behind the same early-out shape the whole-block extra-reference
NEWMV uses, swept to 0.8.

BD vs libaom +83.0/+99.9/+54.5 -> +79.9/+94.6/+54.5, vs rav1e
+39.7/+60.0/+1.1 -> +37.3/+55.7/+1.1; extra motion searches +23% at 2160p.
doc(av1): a compound leaf keeps the flat transform -- the var-tx split is measured worseAhmet Kaan Gümüş · bbbf1cd
doc(av1): a compound leaf keeps the flat transform -- the var-tx split is measured worse

Built the compound commit_inter_luma the previous lane named as the upgrade
path (both references predicting every half-side trial) and swept its split
margin on the BD gate: no margin beats the flat commit on more than one clip,
and 1080p and screen lose at every one. Recorded at the decision site.
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.
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.
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.
test(av1): the intra-mode ablations force the palette offAhmet Kaan Gümüş · cf280e5
test(av1): the intra-mode ablations force the palette off

A two-colour synthetic picture is coded losslessly by the palette under every
arm of a mode ablation, so both ladders reach infinite PSNR and the ablation
measures nothing (three tests failed exactly that way). `force_screen` is a
per-thread override -- the suite runs in one process, so an environment
variable could not do it.
feat(av1): tune screen detection to the measured colour-count split, gate printsAhmet Kaan Gümüş · 55cb55e
feat(av1): tune screen detection to the measured colour-count split, gate prints

libaom's own bound (blocks with 2..=4 distinct colours over a tenth of the
frame) separates NOTHING on real material: `probe_screen_detect` measures the
share of 16x16 luma blocks under each bound on the gate's three clips and the
two populations only part at 32 colours -- film 20.3..21.9%, the OBS capture
51.1..51.5%. Defaults move to 32 colours over a third of the frame, both
still swept by EC_AV1_SCREEN_COLORS/EC_AV1_SCREEN_PCT.

The gate now prints, per clip, how many frames set
`allow_screen_content_tools`, how many blocks took a palette and of what size
(gate-blind-to-feature).

BD gate, 12 frames at 640x384 (vs libaom / vs rav1e), base -> now:
  1080p film   +121.2 / +71.8  -> unchanged, detector off, pins unmoved
  2160p film   +146.4 / +97.8  -> unchanged, detector off
  screen       +79.1  / +17.0  -> +74.9 / +14.2   (487 palette blocks)
wall ours 5.6 / 4.7 / 5.5 s against 5.1 / 4.7 / 5.4 s.
feat(av1): writer support for NEAR_NEAR / NEAREST_NEW / NEW_NEAREST compound modesAhmet Kaan Gümüş · d49885f
feat(av1): writer support for NEAR_NEAR / NEAREST_NEW / NEW_NEAREST compound modes

The tile writer now forms three more of the spec's INTER_COMPOUND_MODES,
mirroring decode.rs assign_compound_mv exactly: NEAR_NEARMV walks the DRL
from index 1 and reads stack entry ref_mv_idx + 1, NEAREST_NEWMV and
NEW_NEARESTMV code no DRL index at all and write their single residual
against stack entry 0. is_new_mv now reports the decoder's own modes
2/3/4/5/7.

No encoder candidate forms them yet, so every gate stream is byte-identical:
BD +120.1/+128.5/+73.0 vs libaom, +67.8/+86.0/+13.7 vs rav1e, same bytes at
all twelve ladder points.
feat(av1): palette-coded luma intra blocks on a screen-content key frameAhmet Kaan Gümüş · f2eac79
feat(av1): palette-coded luma intra blocks on a screen-content key frame

The whole spec 5.11.46 chain, mirrored symbol for symbol from this crate's
own decoder: `palette_y_mode` off the real `av1_get_palette_mode_ctx`
neighbour bands, `palette_y_size`, the colours coded against the above/left
colour cache `av1_get_palette_cache` builds (`palette_ctx_and_cache`, the
decoder's own merge and dedup), and the colour-index map on
`decode_color_map_tokens`' wavefront diagonal with
`av1_get_palette_color_index_context`'s ordering.

The candidate palettes are libaom `av1_k_means`-shaped: a block with at most
8 distinct colours takes them all (exact prediction), a busier one is
quantised to 8 and to 4 by a histogram Lloyd iteration, and each is priced
through the very writers the tile uses (`palette_bits` on a
`SymbolEncoder::pricer`) against the mode the intra search already settled.

Check: encode::tests::a_screen_content_picture_codes_palette_blocks_ffmpeg_decodes_exactly
-- 48 palette blocks (sizes 2/3/4, 16 each) on a 192x96 screen card, ffmpeg
and our own decoder both reconstruct the encoder's picture exactly, and the
film-shaped test card leaves the detector off.
Merge branch 'lane-av1comp' (1300db86): compound reference prediction (NEAREST_NEAREST / GLOBAL_GLOBAL / NEW_NEW, LAST+GOLDEN and LAST+ALTREF) on by defaultAhmet Kaan Gümüş · 583d98d
Merge branch 'lane-av1comp' (1300db86): compound reference prediction (NEAREST_NEAREST / GLOBAL_GLOBAL / NEW_NEW, LAST+GOLDEN and LAST+ALTREF) on by default

BD vs libaom +120.1/+128.5/+73.0, vs rav1e +67.8/+86.0/+13.7 (all down
from 1dbd8f15); compound takes 8-14% of inter blocks. Two defects found on
the way: write_single_ref dropped a compound neighbour's second reference
from its context votes, and comp_group_idx/compound_idx must not be written
under a sequence that clears masked/jnt compound.
feat(av1): screen-content detection sets allow_screen_content_tools on a key frameAhmet Kaan Gümüş · 3136cbe
feat(av1): screen-content detection sets allow_screen_content_tools on a key frame

libaom's `av1_set_screen_content_options` shape (distinct colours per 16x16
luma block, blocks with 2..=4 of them covering more than a tenth of the
frame), run on the source luma before any header is built. When it fires the
sequence header carries the SELECT form of
`seq_force_screen_content_tools` and the key frame sets its own
`allow_screen_content_tools`; every intra block of that tile then codes the
two `read_palette_mode_info` flags (spec 5.11.46), both at ctx 0 and both
"no palette" -- the syntax a palette block will fire inside next.

A sequence with no screen content leaves the sequence bit at 0 and writes
exactly the stream it wrote before: the byte pins do not move.

Verified with the detector forced on (EC_AV1_SCREEN=1):
ffmpeg_decodes_exactly_what_the_encoder_reconstructed and
every_frame_of_a_sequence_decodes_through_our_own_decoder both pass, so the
new symbols are the ones libaom reads.
test(av1): tile BD-cost knob for the gate and a 1080p tile/thread wall tableAhmet Kaan Gümüş · ebca9e8
test(av1): tile BD-cost knob for the gate and a 1080p tile/thread wall table

EC_AV1_TILES in a test build lets the BD gate code the same ladder under a
tile grid; the 1080p wall table shows tile threads buy nothing yet -- the
per-tile ENTROPY write is a few percent of the frame, the search is still
whole-frame and single-threaded.
feat(av1): compound reference on by default -- BD down on all three gate clipsAhmet Kaan Gümüş · e062d5b
feat(av1): compound reference on by default -- BD down on all three gate clips

Flat BD gate, same machine: vs libaom +121.2/+146.4/+79.1 -> +120.1/+128.5/+73.0
(1080p/2160p/screen), vs rav1e +71.8/+97.8/+17.0 -> +67.8/+86.0/+13.7, wall
6.5/5.6/6.2 s -> 7.5/6.4/6.4 s. Compound takes 8.1%/8.6%/13.8% of coded inter
blocks; modes NEAREST_NEAREST 1218/1439/1848, GLOBAL_GLOBAL 268/377/0, NEW_NEW
203/34/0; pairs LAST+GOLDEN 450/397/311, LAST+ALTREF 1239/1453/1537.

The three GOP round trips in decode.rs called decode_inter_frame_tile_lr with a
hard-coded reference_select = false while decoding a tile the ENCODER wrote
(stale-header class); they now pass the encoder's own bit. Byte pins updated.
Merge branch 'lane-av1fsearch' (0a6ed84e): filter search scores per unit in one chunked pass and replays CDEF candidates off cached deblocked planesAhmet Kaan Gümüş · 39035c8
Merge branch 'lane-av1fsearch' (0a6ed84e): filter search scores per unit in one chunked pass and replays CDEF candidates off cached deblocked planes

Byte-identical to 7f2ab3ea (FNV sets on the three gate clips, BD
unchanged); instructions -11.2%, ladder wall 5.34/4.91/7.06 -> 4.51/4.08/4.80 s.
The filter stage is 12.9% of the encode now (26.3% before).