forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 6e9b2d84d6d687b6a0e2b68275fbf578e5855cd3

2026-09-07

test(av1): a 128x128-superblock witness, and the root counter behind itAhmet Kaan Gümüş · 6e9b2d8
test(av1): a 128x128-superblock witness, and the root counter behind it

Eight 128 roots on a 3-frame static clip, byte-exact through ffmpeg and
decode_stream. `force_sb128` moves a process-global (the superblock size is
a sequence field), so the gate is `#[ignore]`d and runs alone.
feat(av1): the tile writers walk 128x128 superblocks under EC_AV1_SB128Ahmet Kaan Gümüş · d2e10de
feat(av1): the tile writers walk 128x128 superblocks under EC_AV1_SB128

The sequence bit, a 128 partition root whose only arm is SPLIT into the four
64x64 superblocks the encoder already codes, loop restoration read once over
the 128 span (and its unit size forced to 128, the smallest a 128 superblock
can signal), and libaom's TL/TR/BL/BR visit order.

The writer's no-neighbour partition sentinel moves 64 -> 128 to match the
decoder's: at 64 it is byte-neutral, at the 128 root it put the symbol on CDF
row 3 instead of row 0.
Merge branch 'lane-i64' (be1936a8): the key frame's partition search offers a 64x64 intra root, on at every presetAhmet Kaan Gümüş · f82ceec
Merge branch 'lane-i64' (be1936a8): the key frame's partition search offers a 64x64 intra root, on at every preset

12-frame (lane base) film A +34.8/+5.0 -> +33.2/+3.7, film B +47.0/+16.5
-> +42.4/+12.2, screen +32.8/-24.2; long-GOP film A -0.6, film B +21.6
vs rav1e. Offered only on superblock-aligned frames: a doubly-cut corner
superblock desyncs chroma three ways (open). Pins re-taken on the merged
tree.
Merge branch 'lane-rdoq' (d4c07b51): rate-distortion optimised quantisation inside the trial loop, on at presets 0..6Ahmet Kaan Gümüş · 224ef48
Merge branch 'lane-rdoq' (d4c07b51): rate-distortion optimised quantisation inside the trial loop, on at presets 0..6

Reverse-scan level lowering priced through the writer's own coefficient
coder; bounded to levels <= 2 and 24 prices per block. 12-frame film A
+37.1/+7.3 -> +24.4/-1.8, film B +52.5/+22.3 -> +35.5/+7.6, screen
+28.1/-25.7; long-GOP film A +29.4/-3.9, film B +100.2/+16.6 (lane
base). Wall 1.7-2.1x at preset 0. Pins re-taken on the merged tree.
fix(av1): the key 64x64 intra root only on a superblock-aligned frameAhmet Kaan Gümüş · ce92789
fix(av1): the key 64x64 intra root only on a superblock-aligned frame

A 248x152 frame -- bottom-right superblock cut on both axes -- desyncs that
corner's CHROMA three ways once the frame carries whole 64 roots elsewhere
(luma stays exact). Named corner-cut with the trace as its upgrade path.

The filter-intra decode fixture carries a step edge now: its smooth field was
coded as four whole 64x64 roots, which are too big for filter intra, so the
gate went blind to the feature it pins. The witness asserts the per-FRAME mode
count instead of the process-global counter.
feat(av1): RDOQ on to preset 6; re-pin the encoder's own streamsAhmet Kaan Gümüş · 4e24be3
feat(av1): RDOQ on to preset 6; re-pin the encoder's own streams

Preset-6 gate says it dominates the ladder (preset 6 with RDOQ beats preset 0
without it on every row and both columns, at less wall), so the lever is on to
6 and withheld from the unmeasured real-time rungs. Pins 9853 -> 8618 at q=150
and 35866 -> 33339 at q=60; EC_AV1_RDOQ=0 restores both.
test(av1): re-take the sequence byte pins for the key 64x64 intra rootAhmet Kaan Gümüş · ef8dbd1
test(av1): re-take the sequence byte pins for the key 64x64 intra root

9808 -> 9843 (q=150) and 35791 -> 35834 (q=60); EC_AV1_I64=0 restores both,
verified on this build before the re-take. Gate logs for the 12-frame,
speed-6 and long-GOP arms.
feat(av1): ship the RDOQ rate weight at 2.2x the search's own, sweptAhmet Kaan Gümüş · eeae32a
feat(av1): ship the RDOQ rate weight at 2.2x the search's own, swept

12-frame native gate, BD vs libaom: film A +27.6/+26.3/+25.6/+24.6/+24.4/+24.7
and film B +39.5/+37.5/+37.0/+35.9/+35.5/+36.1 at 0.7/1.0/1.3/1.6/2.2/3.2, so
the bowl is at 2.2 on every row. The gate can re-sweep the deadzone now
(EC_AV1_DEADZONE); it bowls at the shipped 0.5 (film A +48.1 at 0.42, +26.3 at
0.5, +49.3 at 0.6, with RDOQ on).
feat(av1): a key frame's partition search offers a 64x64 intra rootAhmet Kaan Gümüş · f5d8b45
feat(av1): a key frame's partition search offers a 64x64 intra root

The writer has always been able to code a whole superblock as one intra
block (`Superblock::Whole`); nothing produced one, so every key-frame
superblock was split into four 32x32 while libaom and rav1e leave 45-54%
of theirs whole on film.

`code_square` reaches side 64 (`TxbSet::Luma64` + two `TxbSet::Chroma32`,
the coded 32x32 corner as its level grid), the intra edge/prediction
scratch is sized for a 64-wide block, chroma at 32 points is DCT-only
(`EXT_TX_SET_DCTONLY`), and the root is compared against its four
quadrants at one lambda with the inter root's clamped early-out.
`EC_AV1_I64=0` restores the split-only search.
docs(lane-sse): suite totalsAhmet Kaan Gümüş · 4831201Browse files
perf(av1): bound the RDOQ pass to small levels and a per-block price budgetAhmet Kaan Gümüş · eb7b07c
perf(av1): bound the RDOQ pass to small levels and a per-block price budget

Unbounded it re-coded the block once per candidate level and a fine-quantizer
32x32 carries hundreds, which took the 12-frame native gate from minutes to
not finishing a row in 35. Levels above 2 are never candidates and a block
spends at most 24 prices, taken from the tail backwards; the q=150 pin moves
9853 -> 9059 B against the unbounded pass's 8959, at +26% wall instead of
+256%.
feat(av1): rate-distortion optimised quantisation behind a preset leverAhmet Kaan Gümüş · 4cc1d86
feat(av1): rate-distortion optimised quantisation behind a preset lever

The deadzone quantiser rounded every coefficient blind to what its level
costs; every reference has the pass that decides that against the entropy
coder (libaom av1_optimize_txb, rav1e optimize_txb). tile::rdoq walks the
scan in reverse and lowers each level one step at a time while the bits it
gives back outweigh the squared error it adds, pricing every candidate
through the same coeff_bits/write_coeffs the search and the writer use, so
no second cost model can drift from the writer.

Applied inside the trial loop (trial_typed, code_from_prediction), so the
reconstruction, the price and the written levels are all the pass's grid.
EC_AV1_RDOQ=0 restores the plain quantiser and the byte pins.
fix(av1): every distortion score is over the inside of the frame onlyAhmet Kaan Gümüş · 62921b6
fix(av1): every distortion score is over the inside of the frame only

The search's SSE scored the PADDING for every block the true frame edge
cuts through -- samples the decoder reconstructs and the display crop
throws away. lane-b64b fixed the 64x64 root alone; this moves the clip
into Plane::block_sse itself, so every mode, transform, CfL alpha and
partition trial is ranked the way libaom's av1_dist_block measures
(over max_blocks_wide/high). intrabc's own distortion clips too.

Both gate films are superblock-aligned so nothing default moves; the
user's export sizes all straddle. EC_AV1_EDGESSE=0 restores the old
score for the before/after arms, EC_AV1_EDGE_CENSUS=1 counts the
straddling blocks and their padding share, EC_AV1_NATIVE_CROP=WxH puts
the native gate on a non-superblock-aligned window.
Merge branch 'lane-b64b' (6f53db9b): the 64x64 root prices compound references and depth-1 var-tx, and edge superblocks score only the insideAhmet Kaan Gümüş · e08e2e6
Merge branch 'lane-b64b' (6f53db9b): the 64x64 root prices compound references and depth-1 var-tx, and edge superblocks score only the inside

12-frame film A +37.5/+7.6 -> +35.4/+5.4, film B +54.1/+23.9 ->
+47.6/+17.0 (compound off on screen); long-GOP at the lane's base film A
+39.2/+1.3, film B +118.5/+25.1. Pins re-taken on the merged tree.
Merge branch 'lane-arfcen' (f550d2e1): the temporal lambda map runs on the pyramid path; a top ARF names the ARF two groups back as its second referenceAhmet Kaan Gümüş · e7e40c6
Merge branch 'lane-arfcen' (f550d2e1): the temporal lambda map runs on the pyramid path; a top ARF names the ARF two groups back as its second reference

The pyramid path passed an empty lookahead, so the shipped tpl map was
inert on every default stream; the top ARF named the key twice. Long-GOP
film A +43.1/+4.6 -> +40.9/+3.1, film B +129.0/+34.3 -> +125.6/+32.0;
12-frame film A +37.1/+7.3, film B +52.5/+22.3. Pins 9853 / 35866.
Refuted: anchor density, hidden-only lambda, distance-scaled search.
feat(av1): a 64x64 root may be taken at a superblock the frame edge cutsAhmet Kaan Gümüş · cb5978f
feat(av1): a 64x64 root may be taken at a superblock the frame edge cuts

sb64_legal asked for the whole superblock to be inside the true frame; AV1
asks only for its half (has_cols/has_rows), which is what the writer already
codes. The trial is now ranked over the inside part alone (inside_sse), so
the root is not chosen for predicting padding the source does not have.
Both gate films are superblock-aligned, so only the user's own arbitrary
export sizes reach this: a 232x168 synthetic decodes sample-exact through
both decoders with 9 edge roots. EC_AV1_B64EDGE=0 restores the old rule.
feat(av1): a group's top ARF names the ARF two groups back as its second anchorAhmet Kaan Gümüş · 6aa3e57
feat(av1): a group's top ARF names the ARF two groups back as its second anchor

The ARF-vs-ARF census found our first top ARF naming the SAME picture as LAST
and GOLDEN (refs LAST@-8 GOLDEN@-8), where rav1e's ARFs read two distinct
anchors of their own chain. The slot the ARF is about to refresh still holds
the anchor from two groups back while this frame is coded, so naming it as
ALTREF costs no DPB slot and no extra encode.

Long-GOP gate on top of the pyramid tpl window: film A +42.8/+4.5 ->
+40.9/+3.1, film B +127.3/+32.9 -> +125.6/+32.0 -- both films down on both
columns. Pins re-taken: 9853 at q=150, 35866 at q=60; EC_AV1_ARF_ALTREF=0
restores 9859 / 35904.
feat(av1): a 64x64 root may split its luma into four TX_32X32 unitsAhmet Kaan Gümüş · 3f6896d
feat(av1): a 64x64 root may split its luma into four TX_32X32 units

commit_inter_luma reaches side 64 now (its halved transform is TX_32X32),
so the root's residual takes the same var-tx decision every other inter
block does, and the writer's Whole64 arm codes txfm_split=1 with the four
units write_luma_tus slices out of the block's 64x64 levels. The pricer
learns the new variant in the same diff. EC_AV1_B64VARTX=0 restores the
single TX_64X64.
feat(av1): the compound 64x64 root is gated off on screen content; pins re-takenAhmet Kaan Gümüş · 0070986
feat(av1): the compound 64x64 root is gated off on screen content; pins re-taken

The 12-frame native arm, two arms of one build: both film rows improve on
both columns (film A +37.5/+7.6 -> +35.5/+5.6, film B +54.1/+23.9 ->
+47.8/+17.1) and screen capture loses +33.4/-23.8 -> +33.7/-23.6, at the
keep rule's screen bound. So the root's compound arm takes the same
content gate the residual arm does. Pins 9835 -> 9793 / 35798 -> 35911.
test(av1): re-take the encoder's stream pins for the pyramid tpl window, and wire a second past anchor for the top ARF behind EC_AV1_ARF_ALTREFAhmet Kaan Gümüş · 51ec13e
test(av1): re-take the encoder's stream pins for the pyramid tpl window, and wire a second past anchor for the top ARF behind EC_AV1_ARF_ALTREF

The pins move by construction: every superblock of the four pinned pictures
is priced at its own temporal lambda now (9835 -> 9859 at q=150, 35798 ->
35904 at q=60, EC_AV1_TPL_PYRAMID=0 restores the pair). The long-GOP gate
keeps the change on both films and both columns (film A +43.1/+4.6 ->
+42.8/+4.5, film B +129.0/+34.3 -> +127.3/+32.9) and so does the 12-frame
gate on its two real film rows.

EC_AV1_ARF_ALTREF (default off) names the ARF from two groups back as the top
ARF's ALTREF instead of the key it already reads as GOLDEN -- the census
found our first ARF naming the SAME picture as LAST and GOLDEN where rav1e's
ARFs read two distinct anchors. The slot the ARF is about to refresh still
holds that older anchor, so it costs no DPB slot; its gate arm is running.
feat(av1): the rate loop prices a run by its measured level modelAhmet Kaan Gümüş · 0a23745
feat(av1): the rate loop prices a run by its measured level model

The mini-GOP byte split assumed ONE hidden frame per group and priced it
at a flat two leaves; the group has coded two hidden frames since the mid
level landed, and the census reads the top ARF at 24x a leaf, not 2x.
The two errors cancelled, so neither could be fixed alone (lane-pyr6).

Both are replaced by one measured model: a level's bytes/frame is
log-linear in its own q offset at d(ln bytes)/d(q_idx) = -0.0557, fitted
over films A and B at three quantizers each, and the key is priced
through the same function (KEY_WEIGHT = 1.08 on top of it). gop_shape
enumerates the frames a run really codes, so the plan spends the run's
budget exactly, and the loop re-plans the rest of the run from what it
has actually spent -- the key frame is never steered, and a level whose
q hits the floor cannot spend its share.

48-frame bitrate gate, pyramid arm: 384k +3.0%, 768k -0.0%, 1536k +0.2%,
2M -4.4% (was -0.4% / -6.3% at the two rates it covered), tolerance cut
from +-10% to +-5% with two new bitrate arms.
docs(lane-b64b): step 1 reportAhmet Kaan Gümüş · ec59f4cBrowse files
feat(av1): compound references at the 64x64 rootAhmet Kaan Gümüş · 52db304
feat(av1): compound references at the 64x64 root

The 64 root offered only single-reference LAST. It now also prices the
LAST + GOLDEN/ALTREF pairs at NEAREST_NEARESTMV, GLOBAL_GLOBALMV and
NEW_NEARESTMV (the NEW half is the vector the root's own search already
found -- the two remaining modes need the second reference's own NEWMV
vector, i.e. a second 64x64 search, which is the wall this root exists
to save), and the writer's Whole64 arm codes one through
write_compound_block at SB_MI 16 with no motion_mode symbol.

EC_AV1_B64COMP=0 restores the single-reference root.
feat(av1): the temporal lambda map runs on the pyramid path, which is every default streamAhmet Kaan Gümüş · ccbcc73
feat(av1): the temporal lambda map runs on the pyramid path, which is every default stream

encode_pyramid_inter passed an empty lookahead window, so the propagating
per-superblock lambda map lane-av1tpl2/3 shipped has been inert on every
stream the encoder writes by default since the pyramid became the default --
it only ever ran on the flat A/B arm. The window is the group's own buffered
sources: display-order successors for a frame inside the leaf run, and the
group's leaves in reverse display order for its top ARF, whose successors are
not buffered yet and which those leaves predict backward from.

Measured through enc_probe on film B against the control's own rate/quality
slope: 1.9% fewer bytes at the q=150 point's PSNR and 0.2% at q=90, wall
unchanged. EC_AV1_TPL_PYRAMID=0 restores the old behaviour.

Also from the census lane: EC_AV1_LAMBDA_HIDDEN, a rate weight for hidden
frames alone (default 1.0 = unchanged), which is the knob the pyramid's q
offsets cannot express; the sweep says 1.0 is already the optimum.
Merge branch 'lane-lossless3' (99ff3441): a skipped 8x8 leaf restored the previous block's luma band on lossless frames; rect sub-8x8 leaves split to 4x4 under losslessAhmet Kaan Gümüş · eabe538
Merge branch 'lane-lossless3' (99ff3441): a skipped 8x8 leaf restored the previous block's luma band on lossless frames; rect sub-8x8 leaves split to 4x4 under lossless

Class: override slot on one arm. The deciding 12-frame gate ends green
on every reference point, the screen row's libaom crf 5 lossless stream
included.
test(av1): tests that read a process-global hit counter take the exclusive knob lock; a reader-locked sibling zeroed the reference counter under the parallel suiteAhmet Kaan Gümüş · 2871886
test(av1): tests that read a process-global hit counter take the exclusive knob lock; a reader-locked sibling zeroed the reference counter under the parallel suite
fix(av1): two lossless INTER defects on screen content -- a skip 8x8 leaf restored the previous block's luma band, and a rect sub-8x8 intra leaf read one TX_4X8Ahmet Kaan Gümüş · 025c254
fix(av1): two lossless INTER defects on screen content -- a skip 8x8 leaf restored the previous block's luma band, and a rect sub-8x8 intra leaf read one TX_4X8

- decode_leaf8/decode_inter_block8: `saved_luma_ctx` is only valid on the arm that
  actually published per-TU luma state. A SKIP block publishes none, and on a lossless
  frame `read_block_tx_size` hands back 4x4 leaves for a skip block too, so the restore
  put the previous block's levels back over the zeros `record_mi` had written
  (libaom `av1_reset_entropy_context`). Class [[override-slot-on-one-arm]].
- decode_intra_sub8_leaf / decode_leaf_rect8 / the 16x4 rect4 reader: their
  `tx_depth != 0` split guards never fire on a lossless frame (no depth symbol is
  coded), so a 4x8/8x4 intra leaf read ONE rect transform where libaom codes two
  TX_4X4 -- the same widening the five other rect sites already carry.

Gate: a_lossless_libaom_inter_frame_decodes_sample_exact grows a 640x384
tune-content=screen -g 3 six-frame row (inter frames of screen content).
census(av1): per-coded-frame syntax census with order hints, and the ARF-vs-ARF table it printsAhmet Kaan Gümüş · 671d201
census(av1): per-coded-frame syntax census with order hints, and the ARF-vs-ARF table it prints

The census now carries each coded frame's order_hint and its references'
order hints, so EC_CENSUS_PERFRAME=1 prints one full report per coded frame
with the display-order PSNR joined to it and every reference named by display
distance -- which is what an ARF-vs-ARF comparison against another encoder's
stream needs. EC_AV1_MV_DIST_SCALE is readable outside a test build (like the
encoder's other search margins) and its ceiling is a named constant with its
own knob, because the ceiling was written when the deepest reference in the
GOP sat at distance 4.