forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on dfeffbcebd64426ceeebbf03214c8d6fe57282d6Filtered to lanes/gopad/encoder-tests.logClear filter

2026-09-07

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.