forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on e6bf93689cf89d64ead6d5939e6a42ad88755d7e

2026-09-08

feat(av1): reduced_tx_set=0 -- the wider tx_type alphabets, off by defaultAhmet Kaan Gümüş · e6bf936
feat(av1): reduced_tx_set=0 -- the wider tx_type alphabets, off by default

The writer reads the frame's own header bit in ONE place (Cdfs::txb widens
every luma set through TxbSet::wide, transcribed from the decoder's map), the
search names the widened set so its pricer costs the same alphabet, and the
candidate lists gain the seven-type intra set and the shared seven of the
twelve/sixteen-type inter ones. speed::WIDE_TX_SET is false at every preset
(EC_AV1_TXSET_WIDE overrides), and EC_AV1_TXSET=all lifts the intra search's
screen gate for the unconditional arm the gate measures.
Merge branch 'lane-txrd' (48fcabf8): an inter block's chroma transform type is derived from the luma type; the encoder now re-codes chroma at the inherited typeAhmet Kaan Gümüş · c29f173
Merge branch 'lane-txrd' (48fcabf8): an inter block's chroma transform type is derived from the luma type; the encoder now re-codes chroma at the inherited type

The 20-point bars collapse under an unconditional tx_type search was
chroma quantised under DCT while the decoder inverted at the inherited
type (V 52.5 -> 45.5 dB); the gate ranks on Y+U+V so it read as luma.
Classes: metric blind to a plane; table and reader move together. The
unconditional inter search is still 0.4-1.0 short on bars, so it stays
screen-gated; screen +20.1/-30.4 -> +19.8/-30.5.
measure(av1): OBMC on the real film rows and at the long GOP, and the interp-filter censusAhmet Kaan Gümüş · 6a9a0fc
measure(av1): OBMC on the real film rows and at the long GOP, and the interp-filter census

OBMC had only ever been judged on the colour-bars fixtures. On the real rows it
reads +21.7/-4.3 (film A) and +27.2/-0.3 (film B) at min side 8 against the
control's +21.7/-4.4 and +26.9/-0.6, min side 16 trades 0.2 on film A for 0.7
on film B, and at the long GOP it is +89.6/+9.0 against +89.8/+9.1 for +7.7%
wall. Nothing meets the keep rule; the tool stays off.

The interp filter: a libaom cpu-used 6 stream of the same long-GOP film B
window codes switchable_interp 0/0 in every frame, so no per-block filter bits
are at stake and the switchable search is not built.

2026-09-07

fix(av1): an inter block's chroma inherits its luma transform typeAhmet Kaan Gümüş · 25e26f3
fix(av1): an inter block's chroma inherits its luma transform type

The decoder derives an inter block's chroma tx_type from the luma type at
the block's chroma-reference position (spec 5.11.40, libaom
av1_get_tx_type / reduce_inherited_chroma_tx_type); the encoder quantised
chroma under a DCT_DCT basis whatever the luma type search chose, so every
non-DCT luma winner had its chroma levels inverse-transformed on a basis
they were never produced for.

Instrumented on the bars 1080p gate row at q=60, unconditional inter type
search: luma 53.66 -> 53.70 dB (the search's own win, real), U 51.97 ->
49.15, V 52.52 -> 45.53. Pre-filter frame luma sse is lower on every frame
in the arm, so neither the RDOQ distortion model, the type rate term
(EC_AV1_TXRD_LAMBDA=0 reproduces the collapse) nor the typed forward gain
(measured 0.98-1.03 of unity for every type and size) was the cause.

Adds EC_AV1_TXRD_LAMBDA / EC_AV1_TXRD_CENSUS and the per-frame /
per-plane / pre- and post-filter gate instruments the diagnosis needed.
feat(av1): per-superblock delta_q on at presets 5 and 6, gated off screen contentAhmet Kaan Gümüş · e6bd6d8
feat(av1): per-superblock delta_q on at presets 5 and 6, gated off screen content

lane-deltaq measured the whole mapping sweep flat because the tpl lookahead
was one picture; with the window back the map is real. 12-frame
bd_rate_screen_native, BD vs libaom / vs rav1e, off -> on:

  preset 6: film A +27.2/-0.2 -> +26.6/-0.4, film B +35.2/+6.6 -> +34.7/+6.4
  preset 5: film A +26.6/-0.7 -> +25.8/-1.1, film B +33.3/+4.9 -> +32.8/+4.6
  preset 4: film B +29.9/+2.0 -> +30.2/+2.6 -- rejected

The desktop capture was the only row delta_q cost, so the map is gated on
!allow_screen_content_tools, the content gate b64_residual/b64_compound take:
its four q points code the identical byte counts on and off.
feat(av1): the inter transform-type search ships SCREEN-GATED at presets 0-6Ahmet Kaan Gümüş · 63f401a
feat(av1): the inter transform-type search ships SCREEN-GATED at presets 0-6

Unconditional it loses twenty BD points on both synthetic bars rows of the
12-frame gate (and 0.3 on film B) while winning 0.7/0.3 on the capture; the
le16 restriction does not soften the bars loss. Behind the screen content gate
every non-screen frame is byte-identical to the encoder before the lane, pins
included, and the capture keeps its 0.7/0.3.
test(av1): the typed round trip covers 32x32 (IDTX); an le16 arm for the inter searchAhmet Kaan Gümüş · 5c1d094
test(av1): the typed round trip covers 32x32 (IDTX); an le16 arm for the inter search

The unconditional inter arm loses 20+ BD points on both synthetic bars rows of
the 12-frame gate while film A gains 0.2; libaom's own census never codes IDTX
at 32x32, so EC_AV1_TXSET_INTER=le16 offers the two-type set at 16x16 and
below only.
feat(av1): the inter luma transform-type search (IDTX vs DCT_DCT), off by defaultAhmet Kaan Gümüş · 044aeb2
feat(av1): the inter luma transform-type search (IDTX vs DCT_DCT), off by default

The writer has coded a two-symbol tx_type for every inter luma transform
unit at 32x32 and below since the inter coefficient tables landed, and always
named DCT_DCT. commit_inter_luma now prices both members of TX_SET_INTER_3
for the whole-block residual and for each var-tx split unit, by the same
sse + lambda * bits rule the intra search uses, and the winners reach the
writer through BlockCoeffs::luma_tx_types.

Off at every preset (speed::TX_TYPE_SEARCH_INTER) until the gate says
otherwise; EC_AV1_TXSET_INTER turns it on.
Merge branch 'lane-txset' (cdb209a0): the luma transform-type search (intra 5-type reduced set), screen-gated; forward kernels for all 16 types; the writer had coded one type everywhereAhmet Kaan Gümüş · 5b25319
Merge branch 'lane-txset' (cdb209a0): the luma transform-type search (intra 5-type reduced set), screen-gated; forward kernels for all 16 types; the writer had coded one type everywhere

Screen capture +27.8/-26.0 -> +20.8/-30.1; the film rows lose
unconditionally (local RD on references), so the search is gated on
screen content and the film rows stay byte-identical. Pins unchanged.
perf(av1): the tpl lookahead window comes back at the fast presets -- 8 at 0..2, 4 at 3..6, 1 aboveAhmet Kaan Gümüş · d247015
perf(av1): the tpl lookahead window comes back at the fast presets -- 8 at 0..2, 4 at 3..6, 1 above

Measured per preset on the 12-frame native gate (lane-tplwin, tables in the
TPL_DEPTH doc). Depth 4 is the best arm on every real-content row at preset 3
and buys film B 0.7 BD points at preset 6, for a wall that stays under this
box's noise where depth 8 costs a visible 3-8%. Preset 0 keeps 8: shortening
it there costs film B 0.7 on both columns, so the byte pins do not move.
The delta_q witness' fire count is now gated on the WINDOW rather than on
preset 0, since presets 1..6 have a map again.
test(av1): the five-type fire count is preset 0's; every preset with the lever must still reach a non-DCT typeAhmet Kaan Gümüş · 878e910
test(av1): the five-type fire count is preset 0's; every preset with the lever must still reach a non-DCT type
fix(av1): the decoder's FrameCtx no longer reads the encoder's SB128 globalAhmet Kaan Gümüş · d1b410e
fix(av1): the decoder's FrameCtx no longer reads the encoder's SB128 global

lane-sb128 seeded FrameCtx::new()'s sb128_flag / reach_sb_px from
crate::encode::sb128_on(), so any test forcing the encoder knob (the
128-superblock encoder witness) made every concurrently decoding thread
start its context at 128: the three real-aomenc sb128 decode gates failed
in parallel and no_per_frame_state_is_thread_local_any_more flagged
"encode.rs: SB128" as per-frame state outside FrameCtx.

FrameCtx::new() is a DECODER context again (false / 64, overwritten by
set_sb128 from the parsed sequence header). The encoder's own contexts
come from the new FrameCtx::for_encoder(), used at every FrameCtx
construction in encode.rs and encoder.rs, so the mode search's Reach and
the filter search's internal decodes still agree with the tile writer.
The static is renamed ENC_SB128 -- an encoder knob like speed::SPEED,
which is what the state test's name pin intends.
feat(av1): search an intra luma transform unit's own tx_typeAhmet Kaan Gümüş · 2fd2ac4
feat(av1): search an intra luma transform unit's own tx_type

The writer coded DCT_DCT for every luma transform unit ever written --
the symbol was a constant -- while the five-type reduced-set alphabet
(TX_SET_INTRA_2: IDTX, DCT_DCT, ADST_ADST, ADST_DCT, DCT_ADST) was
already the CDF it wrote into. The search now offers that set per intra
luma unit, priced through the same RDOQ'd trial path (the tx_type symbol
included, coeff_bits_typed), and the writer names the chosen type through
the decoder's own symbol map (decode::tx_type_symbol, keyed by the CDF's
alphabet width, so the two cannot drift).

The forward transform gains the FLIPADST family as well: a flipped axis
is the plain ADST basis over the mirrored residual, which is what the
decoder's ud_flip/lr_flip undoes. All sixteen types now round trip.
Merge branch 'lane-sb128' (f3298510): the tile writers can walk 128x128 superblocks (EC_AV1_SB128), off by defaultAhmet Kaan Gümüş · ad81365
Merge branch 'lane-sb128' (f3298510): the tile writers can walk 128x128 superblocks (EC_AV1_SB128), off by default

Structurally +7 B of partition symbols per 60 roots, but the spec forces
the loop-restoration unit to 128 under a 128 superblock and the 12-frame
gate loses 0.3 dB on film A for it (+21.7/-4.4 -> +38.8/+9.1). The
writer's no-neighbour partition sentinel moved from 64 to the decoder's
128 (table and reader move together). Under the flag a ref-slot refusal
still fires intermittently (open).
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.
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
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.