Commits
Commits on
8ce79c170f9dcfb6b4dbc898df254a2effb82cdbFiltered to crates/ec-av1/src/encode.rsClear filter2026-09-07
Merge branch 'lane-deltaq' (d5dddb4c): per-superblock delta_qindex from the tpl map, wired and measured, off by default; the encoder's trial decode hard-coded DeltaParamsAhmet Kaan Gümüş · 8ce79c1
Merge branch 'lane-deltaq' (d5dddb4c): per-superblock delta_qindex from the tpl map, wired and measured, off by default; the encoder's trial decode hard-coded DeltaParams Best arm is within 0.3 of the control on the films and 0.7 worse on screen (the tpl lambda arm was already neutral, so the same factor through the quantiser is the same information). decode_inter_frame_tiles_lr now takes the frame's delta params (stale-header class, instance 10).
test(av1): the deadzone monotonicity claim moves to the quantiser's own test; the RD pass decides every zeroing now, so a coded stream no longer tracks the deadzoneAhmet Kaan Gümüş · 1ede510
test(av1): the deadzone monotonicity claim moves to the quantiser's own test; the RD pass decides every zeroing now, so a coded stream no longer tracks the deadzone
test(av1): silence the unused offered-count binding the i64 merge left in the key-root witnessAhmet Kaan Gümüş · 8435973Browse files
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.
perf(av1): ship the per-superblock delta_qindex OFF -- the mapping sweep does not payAhmet Kaan Gümüş · 5d826fd
perf(av1): ship the per-superblock delta_qindex OFF -- the mapping sweep does not pay 12-frame native gate against this head's own control (film A +34.8/+5.0, film B +47.0/+16.5, screen +33.4/-23.8): res 4 K 1.0 is the best arm at film A +34.7/+5.2, film B +46.7/+16.6, screen +34.1/-23.6 -- neither film column moves the keep rule's 0.5 and screen loses 0.7 against libaom. res 8 is worse everywhere; K 1.3 is K 1.0 within noise. speed::DELTAQ_RES is 4 (= off) at every preset, so every stream is byte-identical to the pre-lane one and the byte pins stand at 9808/35791. EC_AV1_DELTAQ=2 switches the syntax on; the witness forces it through a process-global override under the speed knobs' own exclusive lock.
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.
feat(av1): per-superblock delta_qindex from the tpl mapAhmet Kaan Gümüş · 1c072fa
feat(av1): per-superblock delta_qindex from the tpl map The tpl map only scaled LAMBDA per superblock, so it could move mode decisions but never the quantizer where the map says a superblock is worth more. This codes the spec's own per-superblock syntax instead: delta_q_present with delta_q_res in the frame header, a delta_qindex symbol group at the first coded block of every superblock, and the search quantizing (luma and chroma) at that superblock's own qindex. The mapping is derived, not fitted: RD lambda goes as the square of the quantizer step, so a superblock the map gives a lambda factor f wants the qindex whose ac_q is sqrt(f) times the frame's -- inverted through the ac_q table itself. EC_AV1_DELTAQ (res log2, 0 = off), _K, _CLAMP. Also: decode_inter_frame_tiles_lr hard-coded DeltaParams::default(), the stale-header class its own three parameters above it document, so the encoder's trial decode desynced at the first superblock.
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.
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).
test(av1): fire-share census + the smooth-gradient witness for the key 64x64 intra rootAhmet Kaan Gümüş · bbc059fBrowse files
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(av1): lane-rdoq report -- instrument table, design, 12-frame gateAhmet Kaan Gümüş · 0986e5bBrowse files
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.
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.
docs(lane-b64b): steps 1 and 2 tables, decisions and re-taken pinsAhmet Kaan Gümüş · e1f6d28Browse files
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): 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.
fix(av1): the probe armed a window film B does not haveAhmet Kaan Gümüş · 2ebcc2c
fix(av1): the probe armed a window film B does not have `examples/enc_probe` was handed its crop by hand, and every long-GOP census so far passed `crop=1920:1024:960:568` -- the centre of a 3840x2160 frame. Film B is coded 3840x1608, so the gate's own window is `crop=1920:1024:960:292`: the instrument measured different pixels than the gate it reported on (60466 B vs the gate's 90674 B at q=150), and the probe also had no `-ss`, so on any clip it read from frame 0 instead of the gate's pinned seek. One definition of the arming now serves both: `ec_av1::probe::source` (the loader, with the seek) and `ec_av1::probe::gate_crop` (the superblock-aligned centre window, from ffprobe), called by the probe and by `encode::tests`' `clip_frames_vf`/`native_bd_arm`. The probe takes `gate` as its width argument to ask for that window, and `EC_ENC_SS` for the seek. In gate mode the probe now codes 90674 bytes on film B at q=150 -- byte-exact with `bd_rate_film_long_gop`'s own ladder point. `lanes/census-longgop-v2.md` re-takes the per-level census on the real window; the v1 shares were off (ARF 49.3% -> 53.8%, key 25.6% -> 21.6%).
Merge branch 'lane-arfq' (04eaaeef): leaf q offset 16 -> 12 under the key at base-48; long-GOP film B +131.3/+35.0 -> +129.0/+34.3, 12-frame film B +58.2/+26.5 -> +54.1/+23.9; pins 9835 / 35798Ahmet Kaan Gümüş · 5918fdbBrowse files
feat(av1): the pyramid codes its leaves 12 quantizer steps above base, not 16Ahmet Kaan Gümüş · 96faf58Browse files
test(av1): the ladder decode assertion collects every failing reference point; the force_integer_mv fixture is sensitive againAhmet Kaan Gümüş · 5a13b43
test(av1): the ladder decode assertion collects every failing reference point; the force_integer_mv fixture is sensitive again
Merge branch 'lane-dkey' (c28d3574): key-frame sub-8x8 groups never cleared the palette bands; every reference ladder point now decodes through our decoder as a gate assertionAhmet Kaan Gümüş · f09b4e3
Merge branch 'lane-dkey' (c28d3574): key-frame sub-8x8 groups never cleared the palette bands; every reference ladder point now decodes through our decoder as a gate assertion Class: CDF row held constant. libaom film B crf 5 key frame is symbol- identical to aomdec now; its fourth inter frame still refuses. The new assertion is red on bars 1080p libaom crf 45 (a +-1 reconstruction gap in inter frame 1), which is the next decoder lane.
Merge branch 'lane-keyq' (1331ffaf): the pyramid codes its key frame 48 q-steps below base; the rate loop prices the key's shareAhmet Kaan Gümüş · a792324
Merge branch 'lane-keyq' (1331ffaf): the pyramid codes its key frame 48 q-steps below base; the rate loop prices the key's share Long-GOP film A +52.0/+11.7 -> +43.5/+4.6, film B +144.5/+44.3 -> +131.3/+35.0; 12-frame film A +43.3/+15.0 -> +38.5/+8.2, film B +66.9/+35.1 -> +58.2/+26.5 vs libaom cpu-used 6 / rav1e speed 6. Key share of the stream 10% -> 22%. Pins 9778 / 35450.
feat(av1): the pyramid codes its key frame 48 q-steps below baseAhmet Kaan Gümüş · 20d60a5
feat(av1): the pyramid codes its key frame 48 q-steps below base The long-GOP sweep (lanes/keyq.sweep.txt): every arm from -16 to -48 improves both films on both columns, -48 is the floor (film A +52.0/+11.7 -> +43.5/+4.6, film B +144.5/+44.3 -> +131.3/+35.0), -64 overshoots on film B, and a deeper ARF under the same key gives the bytes back. The 12-frame gate agrees (film A +43.3/+15.0 -> +38.5/+8.2, film B +66.9/+35.1 -> +58.2/+26.5), so the offset is not gated on GOP length. The rate loop had to learn the offset: a run holds one key frame, so the key slot never gets a second frame to steer on, and the finer key ran the 48-frame bitrate gate +10.8% over target. Its byte share is now priced through the calibration slope and the rest of the run pays for it (-0.3%). Pins re-taken: 8590 -> 9778 and 28535 -> 35450.
test(av1): the encode:: tests take the knob lock the encoder:: gates already takeAhmet Kaan Gümüş · c1c9418
test(av1): the encode:: tests take the knob lock the encoder:: gates already take Same shape as 963327d2, now for `encode::tests`: `speed::KNOBS` only protects a setter from a concurrent encode if EVERY encoding test holds the read side, and half the crate's encodes live in this module -- `force_intrabc`, `force_filter_intra`, `force_screen` (via `favourite_mode`), `set_verify_final_replay` and the census counter resets are all process-global writes that were racing the `encoder::` gates and each other under the default `--test-threads`. 11 tests that SET a global take `knob_write()`, 41 that only encode take `knob_read()`, and 7 pure table tests (the rect-reach/of_tu/vert_ab tables and the tpl factor unit test) take nothing because they never reach the encoder. tile.rs and filter_search.rs need nothing: no test there calls the search or a knob setter. Test-only, no production path touched. Gates: `cargo test -p ec-av1 --release --lib -- encode:: tile::` 80 passed, the two thread-count gates `--include-ignored` 2 passed, the crate suite 548 passed / 43 ignored, `cargo check --workspace --all-targets -j4` 0 errors and 0 ec-av1 warnings, pins 8590 / 28535 unchanged.
Merge branch 'lane-tx64' (b771ffc0): the 64x64 inter root codes a real residual; the root's early-out clamped so it ships at every presetAhmet Kaan Gümüş · 6932598
Merge branch 'lane-tx64' (b771ffc0): the 64x64 inter root codes a real residual; the root's early-out clamped so it ships at every preset The forward 64-point transform already existed; the missing ends were the 64-sided residual scratch and the writer's non-skip Whole64 arm. Film A +43.0/+15.0 -> +42.9/+14.8, film B +64.7/+34.0 -> +63.3/+31.5 on the 12-frame gate at the 16:-24:16 base; the residual arm is off on screen content. Speed 6 improves on every row. Pins re-taken on the merged tree (8:-32:16 pyramid): 8590 / 28535.
docs(av1): the film B census behind the 64x64 residual armAhmet Kaan Gümüş · 0d77e3f
docs(av1): the film B census behind the 64x64 residual arm 12 frames at q120, both streams read by our own decoder. The 64x64 share goes 36.4% -> 38.3% over all frames and 53.3% -> 56.0% over leaf frames (rav1e speed 6 is at 45.2% on this clip), skip area 80.4% -> 78.8%, stream 34,366 -> 34,295 B, encoder wall 13.4s -> 9.6s. base_luma_64 enters the leaf frames' top tables at 5.7%: the TX_64X64 coefficients are really coded. Faster because a root that wins is four quadrant searches that never run.
feat(av1): a GOP-length-aware mini-GOP layout -- a short tail group is absorbedAhmet Kaan Gümüş · 52506a7
feat(av1): a GOP-length-aware mini-GOP layout -- a short tail group is absorbed
`Av1Encoder::encode_frames` closed every mini-GOP at `Pyramid::mini_gop`
flat, so a run that is not a multiple of it left a SHORT TAIL group: 12
pictures under mini_gop 8 coded 8 + 3, and lane-pyr4 measured that tail as
the whole disagreement between the two BD gates (the 12-frame gate wanted
16:-24:16, the 48-frame gate 8:-32:16).
`group_target()` now sizes the group being collected from the pictures left
before the next key frame -- both entry points know it (`encode_sequence`
sets gop = pictures.len(), the facade has its config) -- and absorbs a tail
shorter than half a group into the group before it.
12-frame gate at 8:-32:16, film A / film B vs libaom / rav1e:
fixed 8 + 3 +51.2 / +21.4 +91.0 / +53.5
absorb -> 11 +43.9 / +15.6 +68.4 / +38.2 (bars rows improve too)
48-frame gate: 47 inter pictures are 8 x 5 + 7 under BOTH rules, and the
control arm confirms it byte for byte -- all eight ladder points identical,
+55.2 / +12.8 and +151.3 / +47.4 either way.
The balanced-split variant (equal groups <= mini_gop, 6 + 5 at gop 12) was
measured and is worse on every row; a group-length-scaled ARF offset was
dropped unbuilt, since the absorbed group at arf -32 already beats the -24
the 12-frame gate used to prefer. Table and logs: lanes/gopad.sweep.txt.
`EC_AV1_GOP_LAYOUT=fixed` restores the old rule for an A/B.feat(av1): the 64x64 root ships at every speed preset; re-pinAhmet Kaan Gümüş · 7b4f91d
feat(av1): the 64x64 root ships at every speed preset; re-pin With the early-out clamped at 0.125 the preset-6 regression lane-b64 measured is gone -- every row of the native gate is better on both columns with the root on (film A +55.1/+24.8 -> +51.0/+21.7, film B +91.5/+53.4 -> +77.9/+44.3, screen +57.7/-11.7 -> +40.3/-20.0, bars +88.9/+54.8 -> +79.5/+47.2 and +91.6/+49.8 -> +72.6/+35.1) at 28.1s vs 30.8s, 31.3s vs 28.0s, 14.3s vs 15.2s. Pins re-taken for the residual arm, ON THIS LANE'S BASE (456295e9, whose pins are 7291/27466 -- main has since moved to 8446/28548 under the 8:-32:16 pyramid, and those get re-taken at merge): 7291 -> 7355 at q=150, 27466 -> 27573 at q=60. EC_AV1_B64=0 still gives lane-b64's pre-root 8076 / 27585, verified on this base. Also drops the stale claim in B64_ROOT's doc that transform.rs has no forward TX_64X64.
Merge branch 'lane-pyr4' (e0a8b8a2): a 48-frame long-GOP film gate; the default pyramid is 8:-32:16, the long-GOP optimumAhmet Kaan Gümüş · d248e08
Merge branch 'lane-pyr4' (e0a8b8a2): a 48-frame long-GOP film gate; the default pyramid is 8:-32:16, the long-GOP optimum Long GOP (48 pictures, gop 48): film A +67.4/+21.0 -> +55.7/+13.5, film B +165.5/+57.6 -> +165.1/+56.6 vs libaom cpu-used 6 / rav1e speed 6. The 12-frame gate prefers 16:-24:16, so the optimum is GOP-length dependent; long GOP governs because that is what the editor exports. Pins re-taken on the merged tree with the 64x64 skip root: 8446 / 28548.
feat(av1): gate the 64x64 residual arm off on screen content; clamp the 64-root early-outAhmet Kaan Gümüş · af02836
feat(av1): gate the 64x64 residual arm off on screen content; clamp the 64-root early-out Native gate, two arms of one build, baseline reproduced to the tenth (film A +43.0/+15.0, film B +64.7/+34.0, screen +33.4/-23.8): | row | skip-only root | + residual arm | |---|---|---| | film A | +43.0 / +15.0 | +42.9 / +14.8 | | film B | +64.7 / +34.0 | +63.3 / +31.5 | | screen | +33.4 / -23.8 | +34.3 / -23.4 | Both film rows improve on both columns; screen loses 0.9 vs libaom, outside the keep rule's screen clause -- so the arm is gated off on a screen frame, the same content gate the coding pyramid takes. Re-run with the gate: film rows unchanged, screen row byte-identical to the skip-only arm (40155/51325/63998/80203 B), keep rule passes. Also: the 64-root early-out no longer follows crate::speed::SPLIT_RD up the preset ladder (b64_breakout_threshold clamps it at the shipped 0.125). lane-b64 measured what 0.5 does one size up: a whole superblock taken at 64x64 with its four quadrants never searched, film B +91.5/+53.4 -> +114.6/+71.5. Inert at presets 0..3, which already run 0.125.
feat(av1): the coding pyramid decided on a long GOP -- Pyramid::default 16:-24:16 -> 8:-32:16Ahmet Kaan Gümüş · 0d3b9a0
feat(av1): the coding pyramid decided on a long GOP -- Pyramid::default 16:-24:16 -> 8:-32:16 The shipped shape came off bd_rate_screen_native, which codes 12 frames with gop = 12; a mini-GOP is cut at every key frame, so any mini_gop over 12 codes the SAME stream there and the 16 was really "one hidden ARF per 12-picture GOP". On the new long-GOP arm (48 pictures, gop 48, the two real films, vs libaom cpu-used 6 and rav1e speed 6 at -g 48) a real 16- or 32-picture group is WORSE than an 8-picture one, and ARF -32 is an interior optimum (-40 turns back). 8:-32:16 takes 11.7 / 7.5 points off film A and 0.4 / 1.0 off film B against 16:-24:16 -- all four columns down. The price is stated in Pyramid::default and lanes/pyr4.sweep.txt: at a 12-frame GOP the new shape is 7.0 / 5.7 (film A) and 20.5 / 18.3 (film B) worse, because the best shape depends on GOP length and the long GOP is what the editor exports. Pins re-taken: 8076 -> 8755 at q=150, 27585 -> 28637 at q=60.
feat(av1): a 64x64 inter root can code a real residualAhmet Kaan Gümüş · 236d76c
feat(av1): a 64x64 inter root can code a real residual lane-tx64 step 1+2. The charter's premise (a) -- "transform.rs has no forward TX_64X64" -- is STALE: forward_dct_n::<_, 6> has been there since the network was written, quantize already drops everything outside the coded 32x32 corner, and a_64x64_transform_keeps_what_fits_in_its_coded_quarter round-trips a 64x64 residual through the decoder's own inverse. What was missing was the two ends around it. Encoder: code_from_prediction takes a 64-sided block (heap residual only for that one case, the 4x4..32x32 path keeps its stack array) and hands back the coded 32x32 corner as its levels, which is what both the pricer and the writer want. search_skip_64 prices the skip winner's prediction a second time with a real residual -- one TX_64X64 luma, one TX_32X32 per chroma plane -- and takes it when it costs less. Writer: Quadrant::Whole64 no longer refuses a non-skip block; it codes skip 0, the txfm_split flag at depth 0, and TxbSet::Luma64 + two Chroma32 planes, the same pair sb_coeff_key_frame_tile's Superblock::Whole already wrote. Deferred: compound refs at the 64 root, depth-1 4x32x32 var-tx, intra 64, edge superblocks -- all still refused/unsearched.
test(av1): re-pin the encoder's own streams for the 64x64 rootAhmet Kaan Gümüş · be3d4bc
test(av1): re-pin the encoder's own streams for the 64x64 root 8076 -> 7291 bytes at q=150 and 27585 -> 27466 at q=60 over the four-frame pin clip. The native gate keeps the lever: every row improves on both columns (film A +44.2/+15.7 -> +43.0/+15.0, film B +70.5/+35.2 -> +64.7/+34.0, screen +48.2/-16.4 -> +33.4/-23.8, bars 2160p +20.7/-3.8 -> +13.3/-9.9). EC_AV1_B64=0 restores the old pins byte for byte.
feat(av1): a 64x64 PARTITION_NONE skip root for the inter searchAhmet Kaan Gümüş · 5bcc6a5
feat(av1): a 64x64 PARTITION_NONE skip root for the inter search The census (lanes/census-filmB.md) found rav1e speed 6 coding 45.2% of its blocks at 64x64 -- 73.8% of its leaf blocks, 99.2% of them skip -- while every block this encoder wrote was a 32x32 quadrant or smaller, which put our mode+mv+partition+tx_size spend at 162,669 bits against rav1e's 61,988. The search now offers the whole superblock as one 64x64 block coded SKIP (NEAREST/NEAR/GLOBAL/NEW single-ref, priced through the same symbol_bits path) against the four quadrants, and takes it outright when its per-pixel cost is already under the split-RD threshold -- where the lever saves wall rather than spending it. Skip-only: a 64x64 residual needs a forward TX_64X64 the encoder does not have, and the writer refuses any other shape. EC_AV1_B64=0 switches it off; speed::B64_ROOT is the preset column.
test(av1): a long-GOP native BD arm -- 48 frames, gop 48, film rows onlyAhmet Kaan Gümüş · c58bcaa
test(av1): a long-GOP native BD arm -- 48 frames, gop 48, film rows only bd_rate_screen_native codes 12 frames with gop=12 and encode_frames cuts a mini-GOP at every key frame, so any Pyramid::mini_gop over 12 codes the SAME stream there: the shipped 16 was measured as one hidden ARF per 12-picture GOP, never as a real 16-picture group (class instrument-at-bound). bd_rate_film_long_gop reuses native_gate_clips and the three-way exact decode through a shared driver native_bd_arm(label, frames, films_only); ffmpeg gets -g 48, which both reference wrappers honour (measured: 96 frames at -g 48 code 2 key frames under librav1e and libaom-av1 alike).
Merge branch 'lane-pyr3' (fb84d37d): the frame pyramid re-swept on real film; default 16:-24:16Ahmet Kaan Gümüş · 29892fb
Merge branch 'lane-pyr3' (fb84d37d): the frame pyramid re-swept on real film; default 16:-24:16 Film A +52.8/+23.3 -> +44.2/+15.7, film B +81.0/+46.1 -> +70.5/+35.2 vs libaom cpu-used 6 / rav1e speed 6; screen byte-identical. Pins 8076 / 27585. The 12-frame gate cannot separate mini_gop 16 from 12; a longer GOP gate follows.
perf(av1): re-sweep the coding pyramid on real film -- 16:-24:16Ahmet Kaan Gümüş · 92428b3
perf(av1): re-sweep the coding pyramid on real film -- 16:-24:16 The shipped 4:-16:8 was chosen when the BD gate's "film" rows were still testsrc2 colour bars, and CfL, the luma angle deltas, filter intra, the propagating tpl map and the rate-loop step have all landed since, so the shape was unswept on real content (class `unswept decision constants`). Swept through the gate's own EC_AV1_PYRAMID knob on the two real film rows of encode::tests::bd_rate_screen_native: the mini-GOP axis at the shipped offsets, then both offset axes at the best mini-GOP, then the joint corners (21 arms, table in Pyramid::default and lanes/pyr3.sweep.txt). 16:-24:16 takes 8.6 / 7.6 BD points off film A and 10.5 / 10.9 off film B against 4:-16:8 (vs libaom / vs rav1e); the screen row is byte-identical in every arm because the content gate codes it flat. Leaf +16 was the swept range's edge and still improving on film A, so two arms past it were run: film B turns back up at +20, so +16 is where both films are minimal. Pins re-taken: encode_sequence codes the 4-picture pin clip as one truncated group now (hidden ALTREF at q-24, three leaves at q+16), 7373 -> 8076 at q=150 and 27074 -> 27585 at q=60; EC_AV1_PYRAMID=4:-16:8 restores them.
feat(av1): filter intra predicts per transform unit, depths searched on screen framesAhmet Kaan Gümüş · 235add9
feat(av1): filter intra predicts per transform unit, depths searched on screen frames The filter-intra candidate used to be priced at tx_depth 0 only: a block whose ordinary intra winner wanted a split transform was compared against a handicapped filter arm, and only 19-44% of intra blocks code depth 0. `Plane::code_tx_depth` now takes the block's `filter_intra_mode` and predicts each transform unit recursively off the units before it -- what decode.rs already does per unit -- so the arm can be priced at every depth through the same pricer, neighbour context and `fimode_to_intradir` tx row. Measured on the native BD table: searching the depths on EVERY frame moves screen -1.0/-0.4 and the bars rows -0.4/-0.7, but leaves film A flat and film B +0.1/+0.5 WORSE at +30..35% encoder wall -- the extra filter blocks are a locally cheaper reconstruction the film rows then predict from. So the depth search is armed on screen frames only: every non-screen frame keeps the depth-0-only arm and codes byte-identical streams (film A/B and both bars rows reproduce the baseline table byte for byte), while the screen row goes +49.2 -> +48.2 vs libaom and -16.0 -> -16.4 vs rav1e for +21% wall on that row.
feat(av1): filter intra is a speed lever -- on at preset 0, off above itAhmet Kaan Gümüş · a14fe08
feat(av1): filter intra is a speed lever -- on at preset 0, off above it
Rebased onto main's filter-intra candidate, then priced it the way every
other lever in speed.rs was priced. Two sequential arms on film A native
at speed 3 (lanes/fi-s3-{on,off}.log): ON +54.6/+24.3 BD at 43.1s over a
13.7s rav1e anchor, OFF +55.1/+24.7 at 39.6s over 14.2s -- 0.5 BD points
for 12.8% wall, 0.039 points per 1% wall, between the levers speed 3
already cuts (CfL + angle, 0.031) and the next one it keeps (coefficient
breakout, 0.041). A preset whose purpose is wall does not spend it there,
so FILTER_INTRA is true at index 0 only; EC_AV1_FILTER_INTRA still wins.
filter_intra_on() also loses its OnceLock cache for the LazyLock-env +
speed::at shape every other lever uses -- the preset is set at encoder
construction, so a cached value would have frozen the first speed.feat(av1): a speed preset axis (0..=10), preset 0 the search we shipAhmet Kaan Gümüş · 597c1a3
feat(av1): a speed preset axis (0..=10), preset 0 the search we ship
Every search lever this crate already has an EC_AV1_* knob for reads its
default from a per-speed table in the new `speed` module, indexed by one
process-global preset (`Av1Encoder::with_speed`, `EC_AV1_SPEED`). Index 0
of every table IS the shipped constant, so preset 0 is byte-identical by
construction; `speed::levers` names what each preset switches off, and
ec-bench codes one row per preset {0,3,6,10}.