Commits
Commits on
da48c9165822d0971fefd43866a10f7ab65ae9602026-09-02
feat(av1): rectangular wedge masks (hgtw/hltw codebooks) -- COMPOUND_WEDGE and wedge-interintra on 8x16/16x8/16x32/32x16/8x32/32x8 inter blocksAhmet Kaan Gümüş · da48c91
feat(av1): rectangular wedge masks (hgtw/hltw codebooks) -- COMPOUND_WEDGE and wedge-interintra on 8x16/16x8/16x32/32x16/8x32/32x8 inter blocks wedge.rs carried only wedge_codebook_16_heqw and the one signflip row the three square sizes share, so every rectangular masked-compound or wedge-interintra block was refused by name. Ported the remaining two codebooks (wedge_codebook_16_hgtw for h>w, _hltw for h<w, reconinter.c 203-235) and the four distinct wedge_signflip_lookup rows (reconinter.c 160-183), keyed by the block's TRUE footprint. Masks are stored padded to a max(bw,bh)-square plane so the existing square prediction/blend buffers index them unchanged (a rect strip is predicted square and writes only write_w x write_h). Verification by ENUMERATION against a C harness LINKED AGAINST libaom (av1_init_wedge_masks + av1_get_contiguous_soft_mask): all 9 wedge-capable bsizes x 2 signs x 16 indices = 288 checksums, fixture lanes/wedge_libaom.expected.txt; its 96 square lines are byte-identical to the older independent transcription lanes/wedge_dump.expected.txt. New gate a_real_aomenc_stream_with_a_rectangular_compound_wedge_decodes_pixel_exact: 16/16 attempts (8+10 bit, cq 50/55, 4 pans) pixel-exact vs ffmpeg and vs aomdec over every decode-order frame, 298 rect wedge blocks (16x32=108 hgtw, 32x16=190 hltw), 0 zero-wedge mismatches. Both "the wedge codebook is square-only" refusals dropped from refusal_inventory. The 1:4 gate's VERT_4 / split-tx-8x4 arms now assert their MEASURED blocker (the rect-residual-coding refusal) instead of a bare 0.
docs(inter16ab): r4 report -- 8x4 inter leaf tables, side-keyed CDF row sweep, frame-aware 1:4 recipe measurement, rect wedge is the blockerAhmet Kaan Gümüş · 90877dcBrowse files
fix(av1): 8x4/4x8 INTER var-tx leaves (a split 16x4/4x16 strip) had no table set and panicked; three side-keyed CDF rows on rect blocksAhmet Kaan Gümüş · c3fc174
fix(av1): 8x4/4x8 INTER var-tx leaves (a split 16x4/4x16 strip) had no table set and panicked; three side-keyed CDF rows on rect blocks
The lane-r14 merge made read_var_tx_size general, so sub_tx_size_map[TX_16X4]
== TX_8X4 now reaches rect_inter_residual_supported(8,4) == false and
rect_inter_luma_set's unreachable!(). That panic was live: the 10-bit
directional-angle-delta gate failed the r3 suite at decode.rs:11799, not on
this lane's own gate.
- TxbSet::LumaRect8x4Inter{,1}: LumaRect4x8's shape (Luma8 coefficient
tables, true 32-position eob_pt) with the INTER tx_type table at
txsize_sqr_map[TX_8X4] = TX_4X4 -- av1_get_ext_tx_set_type (blockd.h:1097)
at tx_size_sqr_up == TX_8X8 returns DCT_IDTX reduced / ALL16 unreduced.
- rect_inter_residual_supported += (8,4)|(4,8) (split leaves only; an 8x4
inter BLOCK is still refused as "an inter partition below 8x8").
- rect_inter_luma_set / rect_inter_chroma_set / rect_scan return Result: every
remaining unreachable!() on a stream-derived shape in that path is now a
named refusal (3 new refusal_inventory entries).
- Class sweep of the r3 root cause (a CDF row taken from the enclosing square
side on a rectangular block): is_any_masked_compound_used_here now takes
(bw,bh) -- is_comp_ref_allowed is min(w,h) >= 8, so a 16x4/4x16 strip must
read NO comp_group_idx symbol; the intra-in-inter branch's palette ctx
(palette_bsize_ctx_wh) and filter-intra class (filter_intra_size_class_rect)
likewise come from write_w/write_h.
- New counter vartx_rect_leaf4_hits() [8x4, 4x8] + a 5th gate arm for it.docs(inter16ab): r3 handoff -- rect compound CDF-row root cause, gate now coverage-red, split-tx 16x4 panic risk openAhmet Kaan Gümüş · 4336284Browse files
fix(av1): the compound_type/wedge_idx CDF row of a rectangular inter block is its own BLOCK_SIZES_ALL index, not the enclosing square side'sAhmet Kaan Gümüş · 0665419
fix(av1): the compound_type/wedge_idx CDF row of a rectangular inter block is its own BLOCK_SIZES_ALL index, not the enclosing square side's
decode_inter_block carries the enclosing SQUARE `side` (the accepted strip
corner-cut), and the masked-compound read derived its CDF row from it:
`match side { 8 => 3, 16 => 6, 32 => 9 }`. A 16x8 PARTITION_HORZ strip with
`comp_group_idx == 1` therefore read `compound_type_cdf[BLOCK_16X16]` where
libaom reads `compound_type_cdf[BLOCK_16X8]` (decodemv.c read_compound_type),
desyncing the tile from that block on. Same class one path over: the
single-ref wedge-interintra row was `if side == 16 { 6 } else { 9 }`.
New helper `bsize_all_index(bw, bh)` (libaom enum BLOCK_SIZE order) plus
`wedge_used_bsize` (av1_wedge_params_lookup wedge_types > 0); the wedge MASK
codebook is still square-only, so a rectangular COMPOUND_WEDGE or wedge
interintra block is refused by name rather than blended with the wrong mask
(two new refusal_inventory entries; the 16x4 split-transform refusal is gone
with the lane-r14 merge).
Evidence: 192x128 8-bit cq34 aomenc stream (gate attempt 5), decode-order
frame 5 was 8683 luma pixels wrong from (96,59); aomdec EC_TRACE_MODE ladder
diverged at the block after mi(24,0) (ours rng=64901 vs oracle 47271) and the
oracle's EC_PART histogram shows ZERO 1:4 partitions in that stream, i.e. our
1:4 counters there were phantom reads of an already-diverged stream. After the
fix the whole 6-frame sequence is byte-identical to ffmpeg and the phantom
counters read 0.Merge branch 'lane-r14' (b86eb38) into lane-inter16ab: general (tx_w,tx_h) read_var_tx_size with the full sub_tx_size_map and rectangular inter leavesAhmet Kaan Gümüş · 0402f49
Merge branch 'lane-r14' (b86eb38) into lane-inter16ab: general (tx_w,tx_h) read_var_tx_size with the full sub_tx_size_map and rectangular inter leaves Both split-transform refusals in read_var_tx_size drop out with r14's general recursion; the probe keeps both lanes' counters.
feat(av1): 16x16-level 1:4 partitions decode in inter frames -- four 16x4/4x16 strips, chroma coded once per pair from BOTH strips' motion (gate RED on one attempt)Ahmet Kaan Gümüş · 9f8067c
feat(av1): 16x16-level 1:4 partitions decode in inter frames -- four 16x4/4x16 strips, chroma coded once per pair from BOTH strips' motion (gate RED on one attempt)
The 16-level PARTITION_HORZ_4/VERT_4 arm of the inter partition chain, with
the three things that are new at this size:
* is_chroma_reference (av1_common_int.h:1454): a 4:2:0 block one mi tall
(wide) carries chroma only on an ODD mi_row (mi_col), so strips 0 and 2
read and reconstruct no chroma at all and the odd strip codes one 8x4
(4x8) transform at the PAIR's origin.
* build_inter_predictors_sub8x8 (reconinter_template.inc:87-160): that
chroma block covers two luma blocks, so it is built in 8x2 (2x8) pieces,
each from its own strip's mv/ref/interp filters -- and only when
is_sub8x8_inter holds (both strips single-ref inter), else the whole
block falls back to this strip's mv.
* min(bw,bh) == 4 kills skip_mode, comp_mode (is_comp_ref_allowed,
blockd.h:65), motion_mode/OBMC/warp (is_motion_variation_allowed_bsize,
blockd.h:1455) and interintra: none of those symbols is read now.
Tables: TX_16X4/TX_4X16 luma through the new TxbSet::LumaRect16x4Inter{,1}
(Luma8 coefficient tables, eob_pt_64, INTER tx_type at txsize_sqr_map =
TX_4X4 -> EXT_TX_SET_ALL16 / DCT_IDTX per blockd.h:1097-1106) and
SCAN_16X4/SCAN_4X16; chroma through the existing ChromaRect8x4.
The 2160p 10-bit AV1 film this lane tracks now decodes past the 1:4 partition
and stops one refusal deeper, at a SPLIT transform on a 16x4 strip
(sub_tx_size_map[TX_16X4] is the rectangular TX_8X4, which the square vartx
leaf list cannot express).
Gate a_real_aomenc_inter_sequence_with_16x16_level_1to4_partitions_decodes_
pixel_exact is committed FAILING: attempt 5 (8-bit, cq 34) fires 8 strips /
4 chroma pairs / 4 two-mv chroma pairs and desyncs in its last frame (8683
luma px, first at (96,59)). Frames 0-4 exact. See lanes/inter16ab-r2.report.md
-- this branch does not merge until that is closed.Merge branch 'lane-reelckf' (55532c7): skipped CfL blocks still predict, and a 1:4 chroma pair reads its edge-filter type at the chroma-reference miAhmet Kaan Gümüş · cfef385
Merge branch 'lane-reelckf' (55532c7): skipped CfL blocks still predict, and a 1:4 chroma pair reads its edge-filter type at the chroma-reference mi Two chroma defects found on real 1920x792 10-bit AV1 key frames, whose luma was already bit-exact at every seek point: 1. A SKIPPED intra block whose uv_mode is UV_CFL_PRED must still PREDICT with the chroma-from-luma term. libaom predict_and_reconstruct_intra_block calls av1_predict_intra_block_facade unconditionally and guards only the residual on mbmi->skip_txfm. Three skip arms dropped the CfL term entirely (decode_rect4_16's 16x16-level 1:4 chroma pair, decode_leaf_split4 and decode_leaf_rect8's 4x4 groups); one key frame had 499 wrong chroma samples from this alone. 2. The chroma intra-edge FILTER TYPE of a 1:4 pair comes from the CHROMA REFERENCE position (libaom get_intra_edge_filter_type -> chroma_above_mbmi / chroma_left_mbmi), not from the closing strip: at the closing strip the cell above is the pair's own first strip, so the mi-exact UV map missed and the coarse fallback answered, flipping av1_use_intra_edge_upsample and moving directional chroma by +-1..3. Gates: * a_real_aomenc_sb128_stream_whose_skipped_cfl_and_1to4_chroma_pairs_decode_pixel_exact -- real aomenc --sb-size=128 --cpu-used=0 --enable-cfl-intra=1 --enable-1to4-partitions=1, both bit depths, hard-asserts the directional 1:4 chroma pair counter per compared attempt. * a_real_film_key_frame_with_a_skipped_cfl_block_decodes_pixel_exact -- new tracked fixture crates/ec-av1/fixtures/reelc_kf2700.obu, a 1920x792 10-bit key frame truncated to one temporal unit; the only stream we have with a skipped UV_CFL_PRED block (48 aomenc recipes never produced one). The skipped-CfL counter is hard-asserted BEFORE the ffmpeg compare so an absent ffmpeg cannot make the gate vacuous. gate_coverage: covers_both_depths also recognises `for depth in [8usize, 10]`, which had classified such a gate as 10-bit only and hid --enable-cfl-intra=1 from the 8-bit never-exercised list; enable-cfl-intra leaves BOTH lists. decode_probe prints the two new counters. Lane suite: 379 passed, 0 failed, 33 ignored.
docs(lanes): worktree setup rules left uncommitted in main's tree by another laneAhmet Kaan Gümüş · 95b6784
docs(lanes): worktree setup rules left uncommitted in main's tree by another lane Byte-identical to the same addition on lane-reelckf 55532c7; committed separately so the merge does not overwrite an uncommitted working-tree edit.
docs(reelckf): r2 suite is green -- 379 passed, 0 failed, 33 ignored on the merged treeAhmet Kaan Gümüş · 47a4cceBrowse files
docs(inter16ab): r1 report -- suite 371 passed / 0 failed on the lane tipAhmet Kaan Gümüş · 2a91568Browse files
docs(r14): r4 report -- main merge (no conflicts, cdf.rs identical), firing assert restored as a hard 8-bit assert, film-depth regression attributed to main; suite 372/0/32Ahmet Kaan Gümüş · 5677085
docs(r14): r4 report -- main merge (no conflicts, cdf.rs identical), firing assert restored as a hard 8-bit assert, film-depth regression attributed to main; suite 372/0/32
docs(reelckf): r2 handoff -- suite still running at the turn cap, zero FAILED so farAhmet Kaan Gümüş · 207d618Browse files
docs(reelckf): r2 report -- fixture gate for the skipped CfL block, 18 more recipes swept, ten real key frames exact on the merged treeAhmet Kaan Gümüş · 511f3f1Browse files
test(av1): pin a 1920x792 10-bit AV1 key frame as a fixture -- the only stream we have with a skipped CfL blockAhmet Kaan Gümüş · 293bc74
test(av1): pin a 1920x792 10-bit AV1 key frame as a fixture -- the only stream we have with a skipped CfL block 30 aomenc recipes (r1's 20 plus 18 more in r2, sweeping chroma-correlated geq sources at cq 40..63, cpu-used 0..2, min/max-partition 4..64, 8 and 10 bit) never made the encoder pick a CfL block with skip=1: the two conditions pull against each other, since skip needs a zero luma residual and CfL needs luma AC worth scaling. The instrumented oracle (EC_TRACE_MODE=1 aomdec) counts 5 'uv_mode=13 skip=1' blocks in this real 1920x792 10-bit key frame, so it is pinned as crates/ec-av1/fixtures/reelc_kf2700.obu (36 kB, first temporal unit only) and gated: decode + skip_cfl>0 assert run unconditionally, the three-plane compare against ffmpeg's yuv420p10le decode runs when ffmpeg is present. This closes r1's open item -- the skipped-intra-still-predicts-CfL fix (29cd53f) now fails a test if reverted.
Merge main 85887c7 (lane-mvtwin 2e2a225) into lane-reelckfAhmet Kaan Gümüş · 2bbef8b
Merge main 85887c7 (lane-mvtwin 2e2a225) into lane-reelckf Auto-merge, no conflicts: mvstack.rs + stream.rs gates only, cdf.rs untouched, no deletions.
Merge branch 'lane-mvtwin' (2e2a225): three MV-stack defects found by a phase-by-phase diff of the two twins against libaomAhmet Kaan Gümüş · 9ae16b3
Merge branch 'lane-mvtwin' (2e2a225): three MV-stack defects found by a phase-by-phase diff of the two twins against libaom A 20-phase table of find_mv_stack_with_sign_bias / find_mv_stack_compound vs mvref_common.c setup_ref_mv_list; 17 phases exact, three defects: 1. compound combine (mvref_common.c:718-719): slots past both ref lists take that side's global MV, not (0, 0). 2. insertion cap (:100/128/388/425): the 9th distinct candidate is DROPPED AT INSERTION -- we pushed unbounded and sorted+truncated, keeping a different set. The dedup weight bump still applies on a full stack. 3. reach/availability is TILE-relative (:512-533), not frame-relative; new MiGrid::tile_origin. has_top_right deliberately unchanged: porting libaom's mask without the three shape refinements (which need the partition type) would regress the 64x128 VERT-rect case; the corner-cut at mvstack.rs:588 keeps its upgrade path. New gate a_real_aomenc_compound_mv_stack_* (3 arms, comp_gm_fill_hits=7, stack_full_drops=2, tile_reach_clips=1, pixel-exact) plus one #[ignore]d multi-tile reproducer. Gates by name 48 passed / 0 failed; full lib suite 377 passed / 0 failed / 33 ignored.
docs(reelckf): r1 handoff -- per-key-frame first-difference table, stage attribution, the two blocks found, ruled-out hypothesesAhmet Kaan Gümüş · 2150655Browse files
feat(av1): 16x16-level AB partitions decode in inter frames (HORZ_A/HORZ_B/VERT_A/VERT_B)Ahmet Kaan Gümüş · b7d13e4
feat(av1): 16x16-level AB partitions decode in inter frames (HORZ_A/HORZ_B/VERT_A/VERT_B) Two 8x8 inter leaves plus one true 16x8/8x16 inter strip per libaom decode_partition's own visit order; VERT_A/VERT_B take the has_tr_vert availability swap. The old "an inter 16x16-level AB or 1:4 partition" refusal is narrowed to the 1:4 pair, which still needs the sub-8 inter chroma-pair path. Gate a_real_aomenc_inter_sequence_with_16x16_level_ab_partitions_decodes_pixel_exact: real aomenc, 8- and 10-bit, 32 attempts each, every decode-order frame compared to ffmpeg, all four arms asserted separately, out-of-scope mismatches fail.
test(av1): the 64-axis 1:4 var-tx gate now HARD-ASSERTS its arm fires -- rect var-tx leaves decoded out of two real aomenc streams (32x16=4, 16x32=1 at 8-bit)Ahmet Kaan Gümüş · adb8dd9
test(av1): the 64-axis 1:4 var-tx gate now HARD-ASSERTS its arm fires -- rect var-tx leaves decoded out of two real aomenc streams (32x16=4, 16x32=1 at 8-bit) r3 parked the firing assert because no aomenc recipe found then produced a 64-axis 1:4 strip whose transform splits. An r4 recipe hunt on the merged tree (~70 aomenc runs: testsrc2 / life / mandelbrot / banded motion, 64x64..384x256, cq 20..58, min-partition-size 16 and 32) found one: 384x256, per-16-column band motion, cq 38 -> four 32x16 leaves out of four 64x16 strips, cq 32 -> one 16x32 leaf out of four 16x64 strips. Both streams stop LATER on another lane's live refusal, so the leaves are proved DECODED, not pixel-exact; the 16 banded attempts that run to the end are still compared frame by frame vs ffmpeg (0 mismatch, 8- and 10-bit) and min-partition-size moved 32 -> 16 so they exercise the 16-level path too. 10-bit fires nothing on this sweep (measured), so the firing assert is 8-bit only. Gate renamed to state what it asserts.
test(av1): the sb128 CfL gate retires enable-cfl-intra from both coverage listsAhmet Kaan Gümüş · 52a7f38
test(av1): the sb128 CfL gate retires enable-cfl-intra from both coverage lists The gate passes --enable-cfl-intra=1 at 8 and 10 bits, so both NEVER_EXERCISED lists drop it. covers_both_depths also learns the 'for depth in [8usize, 10]' spelling: such a gate builds both streams from one recipe, but its yuv420p10le arm made is_ten_bit classify it 10-bit only.
fix(av1): a skipped intra block still predicts with CfL, and a 1:4 chroma pair reads its intra-edge filter type at the chroma referenceAhmet Kaan Gümüş · 516d68b
fix(av1): a skipped intra block still predicts with CfL, and a 1:4 chroma pair reads its intra-edge filter type at the chroma reference ReelC's key frames decoded with no refusal and luma bit-exact but wrong chroma at eight of ten seek points. Two causes, both chroma-only: 1. libaom predict_and_reconstruct_intra_block predicts every plane and guards only the residual on skip_txfm, so a skipped UV_CFL_PRED block is still DC + alpha * luma-AC. Three skip arms (the 16x16-level 1:4 chroma pair and the two sub-8x8 4x4 groups) dropped the CfL term. 2. get_intra_edge_filter_type reads chroma_above_mbmi/chroma_left_mbmi -- the neighbours of the CHROMA REFERENCE mi. decode_rect4_16 passed the closing strip's own mi, whose above cell is the pair's first strip; the mi-exact UV map missed, the coarse fallback answered, and the filter type flipped av1_use_intra_edge_upsample (blk_wh 12 <= 16 for type 0) on directional chroma. All ten decodable ReelC key frames go to 0 differing samples (ss=3600 was 119652, ss=7200 52891). New gate: real aomenc --sb-size=128 --cpu-used=0 with 1:4 partitions and CfL, 256x256, 8- and 10-bit, both pixel-exact with directional_1to4_chroma_pairs=11 per arm.
Merge branch 'lane-sb128b' (e8e64a6): the 128x128 PARTITION_NONE block decodes pixel-exactAhmet Kaan Gümüş · 9864603
Merge branch 'lane-sb128b' (e8e64a6): the 128x128 PARTITION_NONE block decodes pixel-exact
Three root causes, none where r2 pointed (the first TX_64X64 luma unit was
already identical range for range):
1. plane order -- libaom codes every plane of a 64x64 "mu" chunk before the
next chunk (Y,U,V per quadrant); we read all luma units then all chroma.
Below 128 a block is one chunk, so the new nchunk loop is byte-identical
at every size already handled.
2. chroma txb_skip_ctx offset -- get_txb_ctx adds 10, not 7, when the plane
block is LARGER than the transform; AV1's only such case is a 128 block's
64x64 uv plane with TX_32X32 units. Added TXB_SKIP_CHROMA_32_BIG{,_Q0,_Q1,_Q3}
from av1_default_txb_skip_cdfs[q][TX_32X32][10..13].
3. per-unit chroma context writes -- deferring them to end-of-block made the
second quadrant read ctx 10 where libaom reads 11.
Also reverts 13 gate recipes r2 had rewritten --min-partition-size=16 -> 32
(a gate-recipe confound that red-lined the two inherited 10-bit rect/AB gates).
Refusal "a 128x128 superblock partition other than SPLIT" replaced by the two
narrower ones that remain (128-root HORZ/VERT|AB, and a 128 NONE root on an
inter frame); gate a_real_aomenc_key_frame_with_a_128x128_none_partition_decodes_pixel_exact
un-ignored: 4/4 arms pixel-exact, part128_none_hits=31.
Gates by name 33 passed / 0 failed; full lib suite 371 passed / 0 failed / 32 ignored.Merge branch 'main' (18bf7dc) into lane-r14: intrarect + hgkf + sb128; cdf.rs byte-identical to main, no hand-resolution neededAhmet Kaan Gümüş · e79f672Browse files
docs(r14): r3 report -- rect var-tx leaves, film firing evidence, parked gate assert with its measured reason; suite 367/0/31Ahmet Kaan Gümüş · 6b70a6a
docs(r14): r3 report -- rect var-tx leaves, film firing evidence, parked gate assert with its measured reason; suite 367/0/31
docs(mvtwin): r1 report -- suite 375/0, phase table, open multi-tile residueAhmet Kaan Gümüş · 37ccf55Browse files
feat(av1): rectangular var-tx leaves -- the SPLIT transform of a 1:4 inter strip with a 64-px axisAhmet Kaan Gümüş · 00d3d4e
feat(av1): rectangular var-tx leaves -- the SPLIT transform of a 1:4 inter strip with a 64-px axis libaom `sub_tx_size_map` (common_data.c) keeps a 1:4 strip's sub-transform RECTANGULAR: [TX_64X16] == TX_32X16, [TX_16X64] == TX_16X32. r2 refused that case by name because `read_var_tx_size` was square-only and its leaves were `(row, col, tx_px)` triples. This round transcribes the whole table (with a 19-entry unit test against libaom's own order), generalises `read_var_tx_size` to `(tx_w, tx_h)` exactly as `read_tx_size_vartx` recurses -- rect ctx, `sub_tx_size_map` step, the TX_4X4 early return over `tx_h/4 x tx_w/4` cells -- and widens the leaf tuple to `(row, col, tw, th)`. Both inter var-tx leaf loops now read a rectangular leaf through `read_inter_plane_rect` with `LumaRect32x16Inter` (the 2-symbol EXT_TX_SET_DCT_IDTX inter row at `tx_size_sqr_up == TX_32X32`), its own `get_txb_ctx_general` neighbour context (a leaf is smaller than its block, so `txb_skip_ctx` is not the lone-TU 0), and rect neighbour/deblock spans. Measured on a 2160p 10-bit AV1 mkv: a 2 s mid-film segment decodes 14 rectangular 16x32 var-tx leaves and 16 16x64 strips, and both mid-film segments move off this wall onto lane-intrarect's. The chartered pixel-exact aomenc gate cannot yet hard-assert the arm: 60+ real aomenc runs show every stream that contains a superblock-level 1:4 partition also contains another lane's live refusal, which stops the decode first (measured reason written at the parked assert). The new gate still sweeps the recipe at both bit depths and hard-asserts that nothing mis-decodes silently.
docs(sb128b): r3 report -- the 128 NONE block is pixel-exact (mu-chunk plane order, offset-10 chroma txb_skip rows, per-unit chroma context), the 10-bit reds were a recipe defect, suite 371/0Ahmet Kaan Gümüş · d685b04Browse files
fix(av1): three MV-stack divergences from libaom setup_ref_mv_list, one of them a compound-vs-single twin driftAhmet Kaan Gümüş · 199abd2
fix(av1): three MV-stack divergences from libaom setup_ref_mv_list, one of them a compound-vs-single twin drift Phase-by-phase diff of both twins (find_mv_stack_with_sign_bias and find_mv_stack_compound) against libaom mvref_common.c; full 20-phase table in lanes/mvtwin-r1.report.md. 1. TWIN DRIFT (compound only): combine_compound_candidates filled a comp_list slot past both ref_id/ref_diff lists with (0, 0). libaom fills it with THAT SIDE's own gm_mv_candidates[idx] (mvref_common.c:718-719) -- the single-ref twin closed the identical gm-fallback gap on its mv_ref_list tail in r6. Wrong the moment a compound pair names a ROTZOOM/AFFINE reference and the scans leave the stack short. 2. BOTH twins: add_candidate/add_compound_candidate pushed unbounded and let a later sort+truncate pick the survivors. libaom drops the 9th distinct candidate AT INSERTION (*refmv_count < MAX_REF_MV_STACK_SIZE, mvref_common.c:100/128/388/425), keeping a different set. The dedup weight bump on a full stack is preserved. 3. BOTH twins: the row/col reach and the up/left availability gates were FRAME-relative. libaom's find_valid_row_offset/find_valid_col_offset clamp to tile->mi_row_start/mi_col_start (mvref_common.c:512-533). MiGrid::get already hid the out-of-tile cells, so the symptom was the scan weight (inc) and through it the stack order, inside every tile not starting at mi 0. Not defects, checked and recorded: the two bubble passes vs one stable sort (equivalent -- no post-boost entry can reach REF_CAT_LEVEL), the compound add_tpl_ref_mv double lookup (offset-independent, so both sides resolve together), and the has_tr grid probe (mask logic and "already decoded" coincide for square blocks, and libaom's is_last_vertical_rect refinement restores the rect case our probe already gets right). Gates: new a_real_aomenc_compound_mv_stack_gate, the first compound gate here that leaves --enable-ref-frame-mvs ON, with --auto-alt-ref=1 --lag-in-frames=25, a cq sweep and 30 seeds per arm; three arms (8-bit sb64 gm=0, 8-bit sb64 gm=1, 10-bit sb128 gm=1) decode every frame pixel-exact vs ffmpeg while hard-asserting comp_mode_hits AND tmv_hits advanced. Plus one deterministic unit test per defect. Found but NOT caused here: a 128x64 --tile-columns=1 stream mis-decodes frame 1 luma (ablation-proven pre-existing); kept as an #[ignore]d reproducer with the repro command in its doc comment.
Merge main 18bf7dc (lane-sb128 5ea5ec8) into lane-sb128bAhmet Kaan Gümüş · f00f0e1
Merge main 18bf7dc (lane-sb128 5ea5ec8) into lane-sb128b Conflicts all in stream.rs and all resolved to MAIN's side, per the batch coordinator: main's `a_real_aomenc_128x128_superblock_stream_decodes_pixel_exact` (one 128 seam gate, `--min-partition-size=16`, part128 symbol assert) replaces this lane's own conversion of the same gate, and lane-oddh's seam refusal stays deleted. cdf.rs merged clean -- the NZ_MAP and FILTER_INTRA regions are byte-identical to main's, this lane's only cdf.rs delta is the four TXB_SKIP_CHROMA_32_BIG tables.
fix(av1): a 128x128 block codes its planes per 64x64 mu chunk, and its chroma units use libaom's offset-10 txb_skip rowsAhmet Kaan Gümüş · 69826a6
fix(av1): a 128x128 block codes its planes per 64x64 mu chunk, and its chroma units use libaom's offset-10 txb_skip rows Three root causes behind lane-sb128b r2's "the first TX_64X64 luma unit reads AC libaom never wrote" residual; the entropy ladder (aomdec EC_TRACE_COEFF vs ours, 48 txb_skip symbols) is now identical range for range and all four gate arms decode pixel-exact. 1. decode.rs `decode_block`'s multi-TU arm read every luma unit and then every chroma unit. libaom's `decode_token_recon_block` loops 64x64 luma "mu" chunks (`mu_blocks_wide/high` = `mi_size_wide[BLOCK_64X64]`) and codes ALL PLANES of a chunk before the next chunk, so at 128 the order is Y,U,V per quadrant. Below 128 a block is one chunk and the order is unchanged. 2. The chroma `txb_skip_ctx` offset is 10, not 7, when the uv plane block is larger than the uv transform (`get_txb_ctx`) -- the 128 block's four TX_32X32 chroma units are AV1's only such case, and our chroma table only carried the offset-7 rows. Added `TXB_SKIP_CHROMA_32_BIG*` (token_cdfs.h `av1_default_txb_skip_cdfs[q][TX_32X32][10..13]`, all four q contexts), `txb_skip_chroma_32` is now six rows, and the caller adds 3 when `cn > 1`. 3. Each chroma unit's coefficient context was recorded only after the whole block, so the second quadrant read ctx 10 where libaom reads 11. Recorded per unit inside the loop as well (the post-`record_split_luma` replay stays: that call would otherwise clobber them whole-block). Refusal lifted with its gate: `a 128x128 PARTITION_NONE block (...)` deleted from decode.rs + refusal_inventory.rs, and `a_real_aomenc_key_frame_with_a_128x128_none_partition_decodes_pixel_exact` un-ignored -- 4/4 arms pixel-exact (384x384 seeds 42/43, 256x256 seed 44, 10-bit seed 45), part128_none_hits=31.
Merge branch 'lane-sb128' (5ea5ec8): 128x128 superblocks decode pixel-exact -- the PARTITION_W128 8-symbol root alphabet, and lane-oddh's refusal deletedAhmet Kaan Gümüş · c6f22ad
Merge branch 'lane-sb128' (5ea5ec8): 128x128 superblocks decode pixel-exact -- the PARTITION_W128 8-symbol root alphabet, and lane-oddh's refusal deleted Clean auto-merge on 6699ce6 (no conflicts). The deletion of "a sequence using 128x128 superblocks on a frame larger than 64x64" (refusal + inventory line) is the lane's intended capability landing; its gate now asserts pixel equality.
Merge branch 'lane-r14' (a2e2e29): 16x16-level 1:4 partitions decode -- FILTER_INTRA rows 12/13 (BLOCK_16X4/4X16) and the rect base-context offsetsAhmet Kaan Gümüş · 3e334d6
Merge branch 'lane-r14' (a2e2e29): 16x16-level 1:4 partitions decode -- FILTER_INTRA rows 12/13 (BLOCK_16X4/4X16) and the rect base-context offsets Clean auto-merge on 7a47fc1 (no conflicts). cdf.rs change is append-only: FILTER_INTRA grows 12 -> 14 rows, the first 12 byte-identical.
docs(sb128): r4 report -- merge seam, 128-root gathered-partition fix, suite 366/0, film probe tableAhmet Kaan Gümüş · 9e08acaBrowse files
Merge main 7a47fc1 into lane-sb128b; restore the 13 gate recipes r2 blanket-rewrote to --min-partition-size=32Ahmet Kaan Gümüş · 4bf07db
Merge main 7a47fc1 into lane-sb128b; restore the 13 gate recipes r2 blanket-rewrote to --min-partition-size=32 Conflict in decode.rs's skipped-block arm resolved by taking main's (lane-hgkf r2) per-transform-unit prediction with its true_width guard and SKIP_SPLIT_TX_HITS counter, and broadening its condition from `tx_select && logical_tx < side` to `logical_tx < side`: at BLOCK_128X128 the transform is TX_64X64 with no tx-depth syntax at all, so the lane's 128 arm needs the same per-unit path. The counter keeps its narrow meaning (a READ split depth). TASK B root cause: the two inherited 10-bit rect/AB reds were an encoder recipe defect, not a decoder one -- r2 rewrote --min-partition-size=16 to 32 in 13 gate recipes (main's value at all 13 call sites), which removes the 16-level the AB/rect gates assert. Reverted all 13; the lane's own two 128 gates keep their deliberate 32. Both gates now pass.
docs(r14): r2 report -- suite 365 passed / 0 failed on the merged tipAhmet Kaan Gümüş · a531b22Browse files
docs(sb128b): r2 report -- ReelC's key frame bit-exact, the chroma TU loop, the 128 NONE residualAhmet Kaan Gümüş · e22a833Browse files
fix(av1): refuse the 128 NONE block by its MEASURED residual, and green the 64x72 sb128 gateAhmet Kaan Gümüş · df156df
fix(av1): refuse the 128 NONE block by its MEASURED residual, and green the 64x72 sb128 gate The chroma TU loop landed but the arm is still not pixel-exact (first luma TX_64X64 unit reads AC where libaom has DC only), so the product path refuses it again by name rather than emitting wrong pixels; the gate stays the reproducer. The 64x72 cpu-used=0 --sb-size=128 stream main used to refuse now decodes PIXEL-EXACT once its unrelated 1:4 sub-16 partitions are disabled.
fix(av1): the 128 root's half-out-of-frame partition symbol was read and thrown away -- split_or_horz/split_or_vert DECIDE the partition (spec 5.11.4), they are not a forced splitAhmet Kaan Gümüş · 9b30932
fix(av1): the 128 root's half-out-of-frame partition symbol was read and thrown away -- split_or_horz/split_or_vert DECIDE the partition (spec 5.11.4), they are not a forced split `read_sb128_root` read the gathered 2-symbol partition at a superblock with only rows or only cols in frame and unconditionally returned PARTITION_SPLIT, so a 128 root that actually codes HORZ/VERT at the frame edge was silently reconstructed as a split instead of reaching the refusal that names it. The 64 root already carries the fixed form (its comment records the 4K 10-bit mkv head that the same defect desynced); this mirrors it at 128. Witness: PART128_GATHERED_SYMBOLS / part128_gathered_symbols(), and the lane-oddh 64x72 gate (mi_rows=18 > 16, so its single 128 root takes exactly this path) now asserts it fired. That gate's recipe gains --min-partition-size=16 -- without it aomenc emits PARTITION_HORZ_4 below 16x16, another lane's gap, and the gate measured that instead of the 128 root. decode_probe prints the sequence's superblock size, bit depth and max frame size, which is the first fact a film-blocker triage needs.
Merge branch 'lane-hgkf': key-frame frame-edge partition bit was parsed and discarded (forced SPLIT) at 64/32/16; the ReelB head key frame decodes bit-exact at 10-bitAhmet Kaan Gümüş · a13d4a2
Merge branch 'lane-hgkf': key-frame frame-edge partition bit was parsed and discarded (forced SPLIT) at 64/32/16; the ReelB head key frame decodes bit-exact at 10-bit Merge resolution (main e6b8bf8): - 64/32-level key-frame edge readers: the lane's arms (identical fix to the unmerged lane-golomb one already on main, plus the EDGE_PART_HITS counter). - 16-level: main's (lane-oddh) body kept -- it decodes the strip and records above_mode/left_mode -- with the lane's `bump_edge_part` added. - Remaining conflicts were comment-only; main's wording kept. Also carries the lane's r2: a skipped intra block predicts per transform unit, not per block (SKIP_SPLIT_TX_HITS).
feat(av1): code a 128x128 block's chroma as four TX_32X32 units and predict every skipped block per transform unitAhmet Kaan Gümüş · 260d4d5
feat(av1): code a 128x128 block's chroma as four TX_32X32 units and predict every skipped block per transform unit av1_get_max_uv_txsize(BLOCK_128X128) = av1_get_adjusted_tx_size(TX_64X64) = TX_32X32, so the 64x64 uv plane block is four units per plane, each with its own gathered coefficient context (around_mi over the unit's 64-luma-pixel span), its own Reach (tu_reach on the luma quadrant) and its own neighbour write (Neighbours::record_mi_chroma). cn == 1 -- every block at 64 and below -- is byte-for-byte the whole-plane read this always did. The skip arm now predicts per transform unit for the same reason (libaom predicts inside the transform-block loop). Chroma refusal deleted; counter chroma_split_tx_hits.
Merge branch 'lane-intrarect': intra rect strips inside inter frames decode through the per-TU rect path; a whole-block rect transform unit reads txb_skip ctx 0Ahmet Kaan Gümüş · 6013567
Merge branch 'lane-intrarect': intra rect strips inside inter frames decode through the per-TU rect path; a whole-block rect transform unit reads txb_skip ctx 0 Merge resolution (main b51719f): - decode.rs rect-TU arm: lane's ctx-0 rule kept, main's `fi_tx_row` helper name. - decode_inter_block: main's MI-unit addressing wins (`rmi`/`cmi`, `whole_sb` delta_q/lf); the lane's `write_w != side` arm retargeted to MI units (`record_inter_rect_mi`, mi origin = `at`), and `decode_intra_rect_in_inter` now takes MI units too. - `reject_residual` keeps the lane's post-`is_inter` position AND main's `rect_inter_residual_supported` term -- the lane's condition (written before lane-inter4) refused every 16x8/8x16 inter leaf residual. - decode_intra_rect_in_inter wires main's angle deltas (lane-angleinter) and `use_filter_intra` (lane-fiinter, `filter_intra_size_class_rect`) in read order; palette fields None (screen content refused for this shape). - New named refusal: a split (nonzero tx_depth) transform on an intra HORZ/VERT strip in an inter frame -- main's 10-bit split_transform_intra_block gate reaches this arm with depth != 0 and the split rect-TU walk mis-decodes it (merge cross-product; depth-0 strips, what the lane proved, decode).
Merge branch 'main' into lane-sb128; the 128x128-superblock refusal main added (lane-oddh 866cbb1) is deleted and its gate flipped from "refused by name" to pixel-exactAhmet Kaan Gümüş · 64b4002
Merge branch 'main' into lane-sb128; the 128x128-superblock refusal main added (lane-oddh 866cbb1) is deleted and its gate flipped from "refused by name" to pixel-exact Merge seam: main b51719f refuses every sequence with use_128x128_superblock on a frame larger than 64x64, which is precisely the capability this lane implemented. Deleted the refusal from stream.rs and refusal_inventory.rs, and rewrote lane-oddh's gate on the same 64x72 --cpu-used=0 --sb-size=128 aomenc stream to decode all frames pixel-exact via decode_all_frames_vs_oracle. cdf.rs NZ_MAP_CTX_OFFSET_* and FILTER_INTRA rows are byte-identical to main (the only cdf.rs delta is this lane's added PARTITION_W128 constant).
Merge branch 'main' into lane-r14 (b51719f); drop the unreachable 16x16-level partition refusal; verifier notes folded into the r1/r2 reportsAhmet Kaan Gümüş · 1204733Browse files
fix(av1): drop the merge-seam 128x128-superblock blanket refusal main added, and turn its gate into a pixel-exact oneAhmet Kaan Gümüş · 480317d
fix(av1): drop the merge-seam 128x128-superblock blanket refusal main added, and turn its gate into a pixel-exact one ReelC's real 1920x792 key frame now decodes BIT-EXACT (cmp of the 16-bit dump against ffmpeg yuv420p10le) -- pre-merge it carried a +1 DC band over the whole bottom partial superblock row, which lane-oddh's odd-frame-size fixes remove.
feat(av1): rectangular INTER residual coding for strips with a 64-px axis (64x32/32x64/64x16/16x64)Ahmet Kaan Gümüş · bb65422
feat(av1): rectangular INTER residual coding for strips with a 64-px axis (64x32/32x64/64x16/16x64) A 64-length transform axis codes only its low 32 coefficients, so these units read the min(w,32) x min(h,32) corner and zero-extend it before the inverse transform -- the same truncation the INTRA superblock-strip path already does. av1_get_adjusted_tx_size picks the CDF set (TX_64X32 -> Luma64, TX_64X16 -> LumaRect32x16, chroma 32x8/8x32 -> Chroma16); tx_size_sqr_up is TX_64X64 so the ext-tx set is DCT_ONLY and no tx_type symbol is coded. A 32x32 corner reads through the square coefficient reader with rect_shape = Some((w, h)) because av1_nz_map_ctx_offset is indexed by the real un-adjusted shape. The SPLIT of a 1:4 strip with a 64-px axis stays refused by name: sub_tx_size_map[TX_64X16] is rectangular (TX_32X16), which the square var-tx recursion cannot code. Gate a_real_aomenc_inter_sequence_with_a_superblock_level_rect_partition_decodes_pixel_exact now hard-asserts a coded 64-axis residual TU (8-bit: 4 pixel-exact attempts, 64x32=4, 32x64=4, 64-axis residual TUs=2). Mid-film ReelB segments at 50:00 and 75:00 pass the rectangular-residual wall.