Commits
Commits on
f06baba6207231e9e0d04a533d95fcbac0fd8c4e2026-08-30
fix(av1): inter-frame superres margin used SB-padded width, not true_widthAhmet Kaan Gümüş · f06baba
fix(av1): inter-frame superres margin used SB-padded width, not true_width decode_inter_frame_tile_with_cdfs's LAST_FRAME_WIDE_MARGIN write site cropped the real-decoded margin to the superblock-padded width/height instead of the mi-aligned true_width/true_height the key-frame branch already used -- columns past true_width were never actually coded, so the chroma upscale's right-edge replicate read one column of stale buffer content one position early. Same shorten-vs-replicate class as av1-truesize; fix matches the key-frame branch line for line. Gate: a_real_aomenc_key_and_inter_superres_sequence_decodes_pixel_exact now passes (3 frames pixel-exact, superres_hits=3). Full lib suite: 265 passed, 0 failed, 19 ignored. cargo check --workspace --all-targets clean.
Merge branch 'main' into lane-superresAhmet Kaan Gümüş · 17c9a9c
Merge branch 'main' into lane-superres Resolves the scaled-MC conflict in decode.rs in favour of the lane's structure, and widens predict_scaled to u16 for main's high-bit-depth sample type (fixture included). Lane state after the merge: 264 passed, 1 failed -- the lane's own gate a_real_aomenc_key_and_inter_superres_sequence_decodes_pixel_exact. That is the lane's deliverable, not merge fallout, so this does not go to main yet.
Merge branch 'lane-hbd': Picture carries u16 samples; the encoder stays 8-bit at its own boundaryAhmet Kaan Gümüş · 8d71aab
Merge branch 'lane-hbd': Picture carries u16 samples; the encoder stays 8-bit at its own boundary This was the blocker the previous round found: Picture.y/u/v are shared by the encoder AND by decode_stream's return value and the DPB reference slots that motion compensation reads back on frame 2+, so the bit_depth != 8 refusal could not lift honestly until this type widened. Boundaries chosen deliberately: the encoder narrows its caller's Picture to local u8 at entry and widens its reconstruction back on the way out; motion::search stays 8-bit (SAD math) with a locally narrowed reference; film_grain and superres narrow at their own edges. Each of those is a place a future 10-bit path will have to earn, and each is now visible instead of implicit. The lane checked -p ec-av1 only, so it did not see that tools/ec-bench builds a Picture from 8-bit y4m; widened those three planes at the call site. 8-bit output bit-exact: 264 passed / 0 failed. Workspace --all-targets clean. Still owed before the refusal can lift: decode::set_bit_depth is written but never called, so the BIT_DEPTH thread-local is dead code defaulting to 8.
wip(hbd): Picture u16 widen complete, --tests compiles (0 errors)Ahmet Kaan Gümüş · fe38d3dBrowse files
wip(hbd): Picture.y/u/v widened to u16, --lib compiles (0 errors)Ahmet Kaan Gümüş · 502402cBrowse files
docs(av1): lane-hbd r4 charter -- widen Picture with checkpoints, wire set_bit_depth, then the gateAhmet Kaan Gümüş · 7ae2956Browse files
docs(av1): lane-hbd r3 report -- scoping only, Picture u8/u16 blocker found, no code mergedAhmet Kaan Gümüş · 0e64463Browse files
docs(av1): lane-hbd r3 charter -- 10-bit gate, lift the refusal, then probe his own filmsAhmet Kaan Gümüş · a5e1e2cBrowse files
Merge branch 'lane-hbd': the decoder's sample type is u16; 8-bit output unchangedAhmet Kaan Gümüş · e673d71
Merge branch 'lane-hbd': the decoder's sample type is u16; 8-bit output unchanged PlaneBuf::data, the prediction scratch buffers, intra.rs, warp.rs, restoration.rs, mc.rs and the OBMC/interintra blend chains all carry u16 now, with clamp bounds derived from bit_depth instead of a literal 255. That is the whole surface the bit_depth != 8 refusal was hiding behind: both AV1 films in the user's library are yuv420p10le. The encoder is 8-bit only and keeps u8 buffers -- its four call sites into the now-shared prediction functions get a local, lossless round-trip box. That was the round's one real design decision and it is the right one: nothing in the encoder produces wider content to hold. Two earlier attempts at this reverted rather than commit a non-compiling tree, losing the work each time. This one landed because the charter allowed `wip(hbd):` checkpoints while the compile-error count was falling -- 42 to 0 -- and because the widen started at PlaneBuf::data and let the compiler enumerate the sites, with mc.rs last. 8-bit is bit-exact: 264 passed / 0 failed, every real-aomenc gate among them. Still refused: bit_depth != 8. Lifting it needs a 10-bit gate, which needs a second ffmpeg_decode_sequence helper emitting yuv420p10le with u16 LE parsing.
Merge branch 'lane-sbpart': the rect64 luma corner decodes; nz_map offsets are indexed by the RAW tx_sizeAhmet Kaan Gümüş · 4d5caf0
Merge branch 'lane-sbpart': the rect64 luma corner decodes; nz_map offsets are indexed by the RAW tx_size Root cause, after four rounds and a range ladder: libaom's get_nz_map_ctx_from_stats indexes av1_nz_map_ctx_offset by the raw, un-adjusted tx_size, and av1_nz_map_ctx_offset_32x64 / _64x32 are genuinely different tables from the square one -- offset 11 vs 1 at (row=1, col=0). We always used the square table for the superblock-strip corner read. The CDF-SET resolution the previous round suspected (get_txsize_entropy_ctx) was already correct: TX_32X64 and TX_64X32 both resolve to TX_64X64, exactly as we had it. The bug was one level below the suspect, and the ladder is what found it: entry range, eob and base_eob all matched the oracle, and the first divergence was a single `base` symbol. Gate: 15/40 pixel-exact, 25 named refusals, 0 mismatches, sb_rect_hits=36 (was 0/40 with a mismatch). I declared the lane's two new refusal strings, which it added without listing -- the filter-intra one as a capability claim, since libaom's av1_filter_intra_allowed_bsize capping at 32x32 is real evidence rather than "never seen". Suite 264 passed / 0 failed.
docs(av1): lane-hbd r2 report -- 42 -> 0 errors, 263/263 tests passAhmet Kaan Gümüş · 29a3d63Browse files
feat(av1): u16 widen compiles clean, 263/263 tests pass, 8-bit output bit-exactAhmet Kaan Gümüş · 35100f3
feat(av1): u16 widen compiles clean, 263/263 tests pass, 8-bit output bit-exact Closes the 42-error checkpoint from r1's saved diff. decode.rs/warp.rs/mc.rs call sites widened through OBMC and interintra blend chains; encode.rs and motion.rs's own buffers stay u8 (encoder is 8-bit only this round) with a local u16 round-trip box (intra_predict_u8 in encode.rs, inline conversion in mc_trial and motion::search_traced_from_step) at their 4 call sites into the now-widened intra::predict/mc::predict. bit_depth != 8 refusal untouched, no 10-bit gate added.
wip(hbd): --lib compiles clean (0 lib errors); encode.rs/motion.rs boxed to u16 locally (encoder stays 8-bit); 17 test-only errors remainAhmet Kaan Gümüş · f83f39fBrowse files
wip(hbd): 42 -> 5 errors -- mc/warp/obmc/interintra call sites widened, only encode.rs+motion.rs remainAhmet Kaan Gümüş · 04357c7Browse files
docs(av1): lane-sbpart r8 report -- root cause + fix landed, gate pixel-exactAhmet Kaan Gümüş · 98000adBrowse files
fix(av1): superblock HORZ/VERT strip's luma corner nz-map ctx table -- pixel exactAhmet Kaan Gümüş · db23f4b
fix(av1): superblock HORZ/VERT strip's luma corner nz-map ctx table -- pixel exact r7 range-laddered block2's coefficient read to a single symbol: base_ctx at (row=1, col=0) diverges (ours 3, libaom level 1) with identical entry range, eob and base_eob. Root cause per libaom source: get_txsize_entropy_ctx resolves TX_32X64/TX_64X32's CDF *set* to square TX_64X64 (confirmed correct, ruling out the charter's first suspect), but av1_nz_map_ctx_offset (the position term feeding base_ctx) is separately indexed by the raw, un-adjusted tx_size in decodetxb.c -- TX_32X64 and TX_64X32 each own a genuinely different offset table from the square one (av1_nz_map_ctx_offset_32x64/ _64x32 in txb_common.c), confirmed against libaom source and used already by lane-rectwire's base_ctx_rect for the smaller (<=32) rectangular sizes. decode_block_rect64's luma corner read went through the generic (square-only) base_ctx via read_coeffs, never picking up the rect table. Added NZ_MAP_CTX_OFFSET_32X64/_64X32 (verified against the real libaom tables), threaded an Option<(w, h)> rect_shape hint through read_coeffs/ base_ctx (None at every square call site, Some((bw, bh)) only from decode_block_rect64), and select the matching offset table. Gate: a_real_aomenc_stream_with_a_superblock_level_horz_vert_partition_decodes_pixel_exact now 15/40 pixel-exact matches (0 mismatches, 25 named refusals, sb_rect_hits=36) -- was 0/40 pixel-exact before this round.
docs(av1): lane-hbd r2 charter -- 42 errors to zero, wip checkpoints allowedAhmet Kaan Gümüş · 4ad151bBrowse files
wip(hbd): r1's u16 widen in flight at the cap (does not compile; error count is the progress metric)Ahmet Kaan Gümüş · 31976a1Browse files
docs(av1): lane-sbpart r8 charter -- check Luma64's CDF-set resolution firstAhmet Kaan Gümüş · fbce155Browse files
docs(av1): lane-hbd r1 charter -- fresh branch for the u16 widen, replay r10's saved diffAhmet Kaan Gümüş · c3da14bBrowse files
Merge branch 'lane-palette2': UV palette blocks decode pixel-exactAhmet Kaan Gümüş · 318c22b
Merge branch 'lane-palette2': UV palette blocks decode pixel-exact Both chroma planes now reconstruct from their palette and index map (read_palette_colors_uv written, PaletteUv reconstruction, record_palette_uv). The gate hard-asserts palette_uv_hits moved before comparing pixels; 2 UV palette blocks fire and match ffmpeg. The previous round's uncommitted tree needed exactly one fix -- an 8x8-leaf read_intra_mode call site still on the pre-UV signature -- so committing that tree verbatim at the cap was worth doing. The UV refusal string stays in the inventory: it is still live at two out-of-scope call sites (rect strip, inter-frame leaf). Suite 263 passed / 0 failed.
docs(av1): sbpart r7 report -- coeff-loop divergence localized to base symbol at (row=1,col=0)Ahmet Kaan Gümüş · c1e2103Browse files
diag(av1): sbpart r7 -- per-symbol coeff range ladder localizes block2's true divergenceAhmet Kaan Gümüş · 36c2f06
diag(av1): sbpart r7 -- per-symbol coeff range ladder localizes block2's true divergence Rung 3's entry/exit EC_TRACE_COEFF proved block2's luma coefficient read (TxbSet::Luma64 corner, decode.rs:3214) is where the desync actually starts: entry rng=63764 matches the oracle exactly (confirming r6's mode-info prefix finding held all the way through skip/depth), but the luma read's own exit range (46984 ours vs 46344 oracle) diverges -- overturning r6's suspicion that around_rect's neighbour gather was the culprit; the gather only feeds skip_ctx/dc_sign_ctx, and both of those read identically (all_zero=0 both sides, dc_sign both agree). Added a new oracle rung (11, scripts/instrument-aom-oracle.sh, same EC_TRACE_COEFF flag) printing per-symbol rng inside read_coeffs_txb (eob/base_eob/after_bases/sign/post_golomb), plus matching entry/exit EC_COEFF/EC_COEFF_VAL markers at all 3 of decode_block_rect64's own read_coeffs/read_coeffs_rect call sites and rng on read_eob's own TRACE eob_pt/eob_extra lines. Range-laddered block2's luma block byte-for-byte against the oracle: eob (6) and base_eob (level=1) both match. First value divergence is the "base" symbol at scan position row=1,col=0 (pos=32) -- ours decodes value=3 (triggering an extra "br" read, final level 3), the oracle's equivalent position decodes level=1 with no br read at all. This is a NEW, sharper suspect than r6's around_rect/context-gather framing: the coefficient magnitude symbol itself (base_ctx's context computation, or the CDF row it indexes) for this specific scan position inside the 32x32 corner scan. Diagnostics only, no behavior change to the live gate (still red, same as r6 left it) -- sb_rect_hits()>0 unproven this round, not attempted since the fix itself wasn't reached within budget. cargo check -p ec-av1 --tests: clean, only pre-existing missing-doc warnings. Oracle rung env-gated, applied to the shared ~/.cache/aom-oracle tree and rebuilt (ninja aomdec clean), also captured in scripts/instrument-aom-oracle.sh so it reproduces from a fresh clone.
docs(av1): lane-palette2 r2 report -- UV palette landed, verdict DONEAhmet Kaan Gümüş · a6be5cfBrowse files
fix(av1): compile the r1 UV-palette WIP + gate it against a real aomenc streamAhmet Kaan Gümüş · 03d0151
fix(av1): compile the r1 UV-palette WIP + gate it against a real aomenc stream read_intra_mode's 8x8-leaf call site was still on the pre-UV 8-arg tuple/ 13-arg signature after r1's mid-edit commit -- fixed by threading the same None-palette-uv/&[] corner-cut that call site already used for palette_y. Everything else r1 wrote (read_palette_colors_uv, PaletteUv reconstruction into both chroma planes, record_palette_uv neighbour tracking) was already correct once it compiled. Added a_real_aomenc_stream_with_palette_uv_decodes_pixel_exact: testsrc2 at the same square-only recipe as the palette-Y gate, hard-asserting palette_uv_hits moved before checking pixel-exactness against ffmpeg (2 UV palette blocks fire; both frames match luma/U/V exactly). refusal_inventory.rs needed no edit -- "a block that actually uses a palette (UV)" is still genuinely present at two other call sites (the HORZ/VERT rect-strip and inter-frame 8x8-leaf paths), which stay refused and are out of this round's scope (steps 2/3).
docs(av1): lane-sbpart r7 charter -- read the range ladder, merge already doneAhmet Kaan Gümüş · 5f16dddBrowse files
docs(av1): lane-palette2 r2 charter -- finish UV reconstruction, merge already doneAhmet Kaan Gümüş · 168c232Browse files
wip(superres): builder's in-flight edits, committed verbatim at the 75-turn cap (state unverified by me)Ahmet Kaan Gümüş · ddad1b5Browse files
wip(sbpart): builder's in-flight edits, committed verbatim at the 75-turn cap (state unverified by me)Ahmet Kaan Gümüş · 8523a28Browse files
wip(palette2): builder's in-flight edits, committed verbatim at the 75-turn cap (state unverified by me)Ahmet Kaan Gümüş · 7d58d31Browse files
fix(av1): reword a second capability claim my own probe disprovedAhmet Kaan Gümüş · 738a983
fix(av1): reword a second capability claim my own probe disproved "a partition below 8x8 (this encoder never writes one)" is false. Default aomenc at --cpu-used=0 --cq-level=20 over lavfi testsrc2, with palette and the rect/AB/1to4 partitions switched off so the earlier refusals cannot mask it, reaches that refusal directly. Three sites in decode.rs plus the inventory now describe the decoder instead. Method note for whoever probes the remaining two claims (angle delta, non-DC chroma on an 8x8 inter leaf): a claim can only be tested on a stream that gets PAST every refusal in front of it, so disable the tools whose refusals fire first rather than concluding the case is unreachable. Suite 262 passed / 0 failed.
diag(av1): sbpart r6 -- merge main, build oracle rung 10, range-ladder block2Ahmet Kaan Gümüş · 75f3f89
diag(av1): sbpart r6 -- merge main, build oracle rung 10, range-ladder block2 Merged origin/main (170a5a3) into lane-sbpart; the only real conflict was stream.rs (adjacent test insertions from lane-realworld's deltaq gate and lane-tiles' tile-group/non-uniform-spacing gates landing next to this lane's sbpart tests) -- resolved by keeping both sides' complete functions in sequence, no interleaving. cargo check -p ec-av1 --tests: clean. Oracle rung 10 (scripts/instrument-aom-oracle.sh, EC_TRACE_MODE_STEP=1): per-symbol range ladder inside decodemv.c's ec_read_intra_frame_mode_info_impl (rung 5's renamed body) -- prints rng after skip, cdef, dq, mode, angle_y, uv_mode, angle_uv. Rung 9 was already taken by lane-lr on main by the time this round started; took 10. Matching istep instrumentation added to our own read_intra_mode_rect (decode.rs, same EC_TRACE_MODE_STEP gate, same "EC_ISTEP ... name=... rng=" format) so the two sides are directly diffable. Range-ladder result on the pinned mismatch (seed 42, EC_SBPART_GATE_ATTEMPTS=1): block2 (mi_row=0 mi_col=24)'s skip/cdef/dq/ mode/angle_y/uv_mode/angle_uv reads are BYTE-EXACT against the oracle -- same decoded values, same rng after every read. This overturns r5's "desync at block2's first symbol" framing: the desync is not in the mode- info prefix at all. It narrows the bug to what read_intra_mode_rect's caller (decode_block_rect64) does AFTER angle_uv returns: tx_select/depth, then the three coefficient reads (read_coeffs w/ TxbSet::Luma64 for the 32x32 luma corner, read_coeffs_rect w/ TxbSet::ChromaRect32x16 for each chroma plane), all keyed off Neighbours::around_rect's gathered skip_ctx/ dc_sign_ctx -- around_rect (decode.rs:2094) was NOT part of r5's inspection audit (which covered record_rect, the write side, and fill_skip_grid_rect/skip_txfm_ctx) and is the sharpest remaining suspect. Not fixed this round -- budget spent on the merge + building the range- ladder proof itself. See lanes/sbpart-r6.report.md.
Merge remote-tracking branch 'origin/main' into lane-sbpartAhmet Kaan Gümüş · a3e5cc5
Merge remote-tracking branch 'origin/main' into lane-sbpart # Conflicts: # crates/ec-av1/src/stream.rs
docs(av1): lane-superres r10 charter -- gate the scaled-MC code that no stream can reach yetAhmet Kaan Gümüş · 0f2fce1Browse files
docs(av1): lane-sbpart r6 charter -- merge main, build rung 9, range-ladder block2Ahmet Kaan Gümüş · 6bdfdfdBrowse files
docs(av1): lane-palette2 r1 charter -- UV reconstruction, rect strips, split-tx paletteAhmet Kaan Gümüş · 5feaca3Browse files
docs(av1): lane-sbpart r5 report -- entropy desync confirmed, merge deferredAhmet Kaan Gümüş · 36ec3fbBrowse files
Merge branch 'lane-tiles': tile-group OBUs and non-uniform tile spacing, both proven liveAhmet Kaan Gümüş · 0bdb5a0
Merge branch 'lane-tiles': tile-group OBUs and non-uniform tile spacing, both proven live Both closed the same way r8 closed context_update_tile_id: staleness-checked first, and both turned out to already work. Several tile-group OBUs per frame decodes 20/20 pixel-exact; uniform_spacing_flag == 0 decodes pixel-exact too, reachable only through aomenc's --tile-width/--tile-height (present in the binary, absent from --help; --tile-columns/--tile-rows and --auto-tiles never set it, and --auto-tiles needs threads >= 2). Neither needed new decode code. What they needed was a gate, because an untested capability and an absent one look identical from the outside. Suite 262 passed / 0 failed.
diag(av1): sbpart r5 -- confirm entropy desync between the two rect64 VERT/HORZ callsAhmet Kaan Gümüş · cc3d46c
diag(av1): sbpart r5 -- confirm entropy desync between the two rect64 VERT/HORZ calls Pinned-stream diagnostics only: TRACE_RECT32_END trace print, and an EC_SBPART_DIAG bbox/per-SB-column breakdown on the pinned replay test. No behavior change to the live gate. See lanes/sbpart-r5.report.md for the finding.
fix(av1): reword a capability claim my own probe just disprovedAhmet Kaan Gümüş · 0653b15
fix(av1): reword a capability claim my own probe just disproved "a partition below 16x16 other than a clean split (this encoder never writes one)" is false. A plain default-settings aomenc run over lavfi mandelbrot (--cpu-used=4 --end-usage=q --cq-level=32, no --enable-* flags at all) hits that refusal on frame 0. The string now describes the decoder instead. Measured while re-taking the distance to a default-settings decode, five content classes, all at those same default settings: testsrc2 -> UV palette reconstruction mandelbrot -> this refusal (sub-16x16 non-split partition) smptebars -> HORZ/VERT intra strip in a screen-content frame rgbtestsrc -> HORZ/VERT intra strip in a screen-content frame life -> a palette block with a split luma transform Three of the five are palette-shaped. The remaining three "this encoder never writes one" claims (angle delta x2, sub-8x8 partition, non-DC chroma on an 8x8 inter leaf) are NOT cleared by this probe -- they were simply not reached. Suite 260 passed / 0 failed.
fix(av1): declare r9's three new scaled-reference refusal strings in the inventoryAhmet Kaan Gümüş · 576ce59
fix(av1): declare r9's three new scaled-reference refusal strings in the inventory refusal_inventory.rs's own self-check caught them undeclared on first run -- REFUSALS now lists all three; stream.rs:217's frame-level use_superres refusal itself is unchanged, so this declares new refusals, not a lifted one.
feat(av1): scaled-reference MC wired at the single-ref branch + scoped refusalsAhmet Kaan Gümüş · 5ff4723
feat(av1): scaled-reference MC wired at the single-ref branch + scoped refusals decode_inter_block's single-ref non-warp/non-OBMC/non-interintra path now branches on mc::scale_factor(py_ref.width, frame_width): REF_NO_SCALE keeps the existing predict_with_filters calls byte-identical, anything else uses the new mc::predict_scaled per luma+both chroma planes (luma-derived scale factor applies unchanged to chroma per r8's derivation). Three named refusals added rather than silently mis-predicting a scaled reference: compound (either tap scaled), warp/OBMC/interintra (no scaled counterpart), and decode_inter_block8's whole 8x8-leaf split (no frame_width threaded through its own MC calls this round). stream.rs's frame-level use_superres refusal is untouched -- no bypass gate built this round to prove the wiring pixel-exact, so the capability claim is not made yet.
test(av1): non-uniform tile spacing gate -- decode already generic, staleness-checkedAhmet Kaan Gümüş · 2f03ac7
test(av1): non-uniform tile spacing gate -- decode already generic, staleness-checked Charter's second item: uniform_spacing_flag == 0 (spec 5.9.15). decode.rs's tile loop already walks tile_info.mi_col_starts/mi_row_starts generically for both branches read_tile_info produces -- no refusal exists for this on the decode side (the only "non-uniform tile spacing is not written" refusal in the crate is frame.rs's OBU *writer*, an unrelated encode path). aomenc never emits uniform_spacing=0 from --tile-columns/--tile-rows (always takes the uniform_spacing=1 branch in libaom's set_tile_info), and --auto-tiles only reaches the non-uniform path when g_threads>=2, ruled out by this charter's --threads=1. Found and hand-verified the CLI surface that actually reaches it: --tile-width=<sb-list>/--tile-height=<sb-list> (present in the binary, not printed by --help) -- checked live against av1_cx_iface.c's set_tile_info before writing the gate. New gate a_real_aomenc_stream_with_non_uniform_tile_spacing_decodes_pixel_exact (stream.rs): 256x64, --tile-width=1,3 --tile-height=1 --sb-size=64, probes the parsed header's tile_info.uniform_spacing directly and hard-asserts it false. 20/20 pixel-exact vs ffmpeg, 0 named refusals. Scoped suite (tile/mvstack/refusal_inventory/gate_coverage, EC_AV1_REQUIRE_AOMENC=1) green, full stream:: module 52/0 (6 pre-existing ignored fixture tests untouched). Both charter items now closed: several tile-group OBUs (r9's WIP edit, verified working this round, no changes needed) and non-uniform tile spacing (this commit) were both already-correct decode capabilities, gated and proven live rather than built fresh.