forge
Explore
Log in

Don't you dare go Hollow

Rectangular INTER residual coding for strips with a 64-px axis (64x32/32x64/64x16/16x64)

Browse files at this commit

bb654223bc0396cc5ae23ea94c5d2aaa6d674c6bAhmet Kaan GümüşParent: 072c1e3
  • feat
    • rectangular INTER residual coding for strips with a 64-px axis (64x32/32x64/64x16/16x64)
Show full message
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.
crates/ec-av1/src/decode.rsmodified+101 -12
@@ -916,6 +916,10 @@ thread_local! {
916 // their rect max transform into square sub-transforms.916 // their rect max transform into square sub-transforms.
917 static RECT_INTER_TU_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };917 static RECT_INTER_TU_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
918 static RECT_INTER_TXSPLIT_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };918 static RECT_INTER_TXSPLIT_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
919+ // lane-r14 r2: luma transform units of an inter strip with a 64-px axis
920+ // (64x32/32x64/64x16/16x64), whose coefficients are coded as the
921+ // truncated low-32 corner.
922+ static RECT64_INTER_TU_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
919 // lane-inter4 r3: 16x16-level PARTITION_HORZ / PARTITION_VERT on an inter923 // lane-inter4 r3: 16x16-level PARTITION_HORZ / PARTITION_VERT on an inter
920 // frame -- 16x8 and 8x16 inter leaves.924 // frame -- 16x8 and 8x16 inter leaves.
921 static INTER_LEAF16_HORZ_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };925 static INTER_LEAF16_HORZ_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
@@ -963,6 +967,11 @@ pub(crate) fn rect_inter_txsplit_hits() -> usize {
963 RECT_INTER_TXSPLIT_HITS.with(|c| c.get())967 RECT_INTER_TXSPLIT_HITS.with(|c| c.get())
964 }968 }
965 969
970+/// Current value of [`RECT64_INTER_TU_HITS`] (lane-r14 r2).
971+pub(crate) fn rect64_inter_tu_hits() -> usize {
972+ RECT64_INTER_TU_HITS.with(|c| c.get())
973+}
974+
966 /// Sets the current thread's [`TX_SELECT_INTER`]/[`REDUCED_TX_SET_INTER`]/975 /// Sets the current thread's [`TX_SELECT_INTER`]/[`REDUCED_TX_SET_INTER`]/
967 /// [`ENABLE_FILTER_INTRA_INTER`].976 /// [`ENABLE_FILTER_INTRA_INTER`].
968 pub(crate) fn set_inter_tx_mode(977 pub(crate) fn set_inter_tx_mode(
@@ -10889,7 +10898,19 @@ fn read_block_tx_size(
10889 /// `DTT9_IDTX_1DDCT` row at `tx_size_sqr == TX_8X8`, only reachable through a10898 /// `DTT9_IDTX_1DDCT` row at `tx_size_sqr == TX_8X8`, only reachable through a
10890 /// rect transform), neither of which exists yet -- both stay refused by name.10899 /// rect transform), neither of which exists yet -- both stay refused by name.
10891 fn rect_inter_residual_supported(w: usize, h: usize) -> bool {10900 fn rect_inter_residual_supported(w: usize, h: usize) -> bool {
10892- matches!((w, h), (32, 16) | (16, 32) | (16, 8) | (8, 16))10901+ matches!(
10902+ (w, h),
10903+ // 2:1 strips whose transform is coded in full (lane-inter4).
10904+ (32, 16) | (16, 32) | (16, 8) | (8, 16)
10905+ // lane-r14 r2: strips with a 64-px axis. `av1_get_max_eob` codes
10906+ // only the low 32 coefficients of a 64-length axis, so these read
10907+ // exactly the truncated corner the INTRA superblock-strip path
10908+ // already reads (`read_intra_mode_rect`), through
10909+ // `av1_get_adjusted_tx_size`'s CDF set. Their `tx_size_sqr_up` is
10910+ // `TX_64X64`, so `av1_get_ext_tx_set_type` is `DCT_ONLY` and no
10911+ // `tx_type` symbol is coded at all.
10912+ | (64, 32) | (32, 64) | (64, 16) | (16, 64)
10913+ )
10893 }10914 }
10894 10915
10895 /// The luma coefficient/`tx_type` table set of a whole-block rectangular10916 /// The luma coefficient/`tx_type` table set of a whole-block rectangular
@@ -10910,6 +10931,13 @@ fn rect_inter_luma_set(w: usize, h: usize) -> TxbSet {
10910 TxbSet::LumaRect16x8InterSet110931 TxbSet::LumaRect16x8InterSet1
10911 }10932 }
10912 }10933 }
10934+ // lane-r14 r2: `av1_get_adjusted_tx_size` maps TX_64X32/TX_32X64 to
10935+ // TX_32X32 and TX_64X16/TX_16X64 to TX_32X16/TX_16X32, and
10936+ // `get_txsize_entropy_ctx`/`txsize_log2_minus4` agree with the
10937+ // adjusted size, so the existing sets are bit-exact. Neither carries a
10938+ // `tx_type` table (DCT_ONLY above), so the intra/inter split is moot.
10939+ (64, 32) | (32, 64) => TxbSet::Luma64,
10940+ (64, 16) | (16, 64) => TxbSet::LumaRect32x16,
10913 _ => unreachable!("rect_inter_residual_supported gates every shape that reaches here"),10941 _ => unreachable!("rect_inter_residual_supported gates every shape that reaches here"),
10914 }10942 }
10915 }10943 }
@@ -10922,6 +10950,13 @@ fn rect_inter_chroma_set(w: usize, h: usize) -> TxbSet {
10922 match (w, h) {10950 match (w, h) {
10923 (16, 8) | (8, 16) => TxbSet::ChromaRect16x8,10951 (16, 8) | (8, 16) => TxbSet::ChromaRect16x8,
10924 (8, 4) | (4, 8) => TxbSet::ChromaRect8x4,10952 (8, 4) | (4, 8) => TxbSet::ChromaRect8x4,
10953+ // lane-r14 r2: chroma of a 64-axis strip -- 32x16/16x32 under a
10954+ // 64x32/32x64 one, 32x8/8x32 under a 64x16/16x64 one. Neither chroma
10955+ // unit has a 64-px axis, so both are coded in full; `Chroma16` is the
10956+ // exact set for TX_32X8/TX_8X32 (`get_txsize_entropy_ctx` = TX_16X16,
10957+ // `txsize_log2_minus4` = 4), same as the intra strip path uses.
10958+ (32, 16) | (16, 32) => TxbSet::ChromaRect32x16,
10959+ (32, 8) | (8, 32) => TxbSet::Chroma16,
10925 _ => unreachable!("rect_inter_residual_supported gates every shape that reaches here"),10960 _ => unreachable!("rect_inter_residual_supported gates every shape that reaches here"),
10926 }10961 }
10927 }10962 }
@@ -10967,6 +11002,8 @@ fn rect_scan(w: usize, h: usize) -> &'static [u16] {
10967 (8, 16) => &SCAN_8X16,11002 (8, 16) => &SCAN_8X16,
10968 (8, 4) => &SCAN_8X4,11003 (8, 4) => &SCAN_8X4,
10969 (4, 8) => &SCAN_4X8,11004 (4, 8) => &SCAN_4X8,
11005+ (32, 8) => &SCAN_32X8,
11006+ (8, 32) => &SCAN_8X32,
10970 _ => unreachable!("rect_inter_residual_supported gates every shape that reaches here"),11007 _ => unreachable!("rect_inter_residual_supported gates every shape that reaches here"),
10971 }11008 }
10972 }11009 }
@@ -11033,6 +11070,16 @@ fn read_block_tx_size_rect(
11033 }11070 }
11034 TXFM_SPLIT_HITS.with(|c| c.set(c.get() + 1));11071 TXFM_SPLIT_HITS.with(|c| c.set(c.get() + 1));
11035 RECT_INTER_TXSPLIT_HITS.with(|c| c.set(c.get() + 1));11072 RECT_INTER_TXSPLIT_HITS.with(|c| c.set(c.get() + 1));
11073+ // lane-r14 r2: `sub_tx_size_map` is square for every shape this decoder
11074+ // splits (TX_32X16 -> TX_16X16, TX_64X32 -> TX_32X32) EXCEPT the 1:4
11075+ // strips with a 64-px axis, where it stays rectangular
11076+ // (TX_64X16 -> TX_32X16, TX_16X64 -> TX_16X32) and the square recursion
11077+ // below would code the wrong tree.
11078+ if tx_w.max(tx_h) == 64 && tx_w.min(tx_h) == 16 {
11079+ return Err(unsupported(
11080+ "a split transform on a 1:4 inter strip with a 64-px axis",
11081+ ));
11082+ }
11036 let sub = tx_w.min(tx_h);11083 let sub = tx_w.min(tx_h);
11037 let max_w_mi = (bw / MI).min(mi_cols.saturating_sub(at_mi.1));11084 let max_w_mi = (bw / MI).min(mi_cols.saturating_sub(at_mi.1));
11038 let max_h_mi = (bh / MI).min(mi_rows.saturating_sub(at_mi.0));11085 let max_h_mi = (bh / MI).min(mi_rows.saturating_sub(at_mi.0));
@@ -11096,16 +11143,50 @@ fn read_inter_plane_rect(
11096 Some(t) if w.max(h) < 32 => t,11143 Some(t) if w.max(h) < 32 => t,
11097 _ => TxType::DctDct,11144 _ => TxType::DctDct,
11098 };11145 };
11099- let (grid, tx_type) = read_coeffs_rect(11146+ // lane-r14 r2: a 64-length axis codes only its low 32 coefficients
11100- dec,11147+ // (`av1_get_max_eob`), so the coded unit is the `min(w,32) x min(h,32)`
11101- &mut coding,11148+ // corner, zero-extended into the true `w x h` grid before the inverse
11102- rect_scan(w, h),11149+ // transform -- exactly what the intra superblock-strip path does. A
11103- w,11150+ // corner that comes out square (32x32, under a 64x32/32x64 strip) reads
11104- h,11151+ // through the SQUARE coefficient reader with `rect_shape = Some((w, h))`,
11105- skip_ctx,11152+ // because `av1_nz_map_ctx_offset` is indexed by the real, un-adjusted
11106- dc_sign_ctx(around.2),11153+ // rectangular shape (lane-sbpart r8).
11107- default_tx_type,11154+ let (cw, ch) = (w.min(32), h.min(32));
11108- )?;11155+ if plane_idx == 0 && w.max(h) == 64 {
11156+ RECT64_INTER_TU_HITS.with(|c| c.set(c.get() + 1));
11157+ }
11158+ let (corner, tx_type) = if (cw, ch) == (32, 32) {
11159+ let scan32 = default_scan(TX32);
11160+ read_coeffs(
11161+ dec,
11162+ &mut coding,
11163+ &scan32,
11164+ skip_ctx,
11165+ dc_sign_ctx(around.2),
11166+ default_tx_type,
11167+ Some((w, h)),
11168+ )?
11169+ } else {
11170+ read_coeffs_rect(
11171+ dec,
11172+ &mut coding,
11173+ rect_scan(cw, ch),
11174+ cw,
11175+ ch,
11176+ skip_ctx,
11177+ dc_sign_ctx(around.2),
11178+ default_tx_type,
11179+ )?
11180+ };
11181+ let grid = if (cw, ch) == (w, h) {
11182+ corner
11183+ } else {
11184+ let mut full = vec![0i32; w * h];
11185+ for row in 0..ch {
11186+ full[row * w..][..cw].copy_from_slice(&corner[row * cw..][..cw]);
11187+ }
11188+ full
11189+ };
11109 let (dc_delta, ac_delta) = plane_q_delta(plane_idx);11190 let (dc_delta, ac_delta) = plane_q_delta(plane_idx);
11110 let residual = dequant_and_inverse_typed_wh(11191 let residual = dequant_and_inverse_typed_wh(
11111 &grid,11192 &grid,
@@ -21883,8 +21964,16 @@ mod tests {
21883 // non-skip, so the named refusal is the rectangular-inter-residual21964 // non-skip, so the named refusal is the rectangular-inter-residual
21884 // one. Either string proves what the pin was written for: a non-SPLIT21965 // one. Either string proves what the pin was written for: a non-SPLIT
21885 // superblock never silently decodes as SPLIT.21966 // superblock never silently decodes as SPLIT.
21967+ // lane-r14 r2: the rectangular-residual refusal is gone (a 64x32 strip
21968+ // now codes its truncated low-32 coefficient corner), so this
21969+ // hand-written fixture walks further still and stops on the limit of
21970+ // the FIXTURE rather than of the decoder: it names no reference
21971+ // pictures. All three strings prove the one thing this pin exists for
21972+ // -- a non-SPLIT superblock never silently decodes as SPLIT.
21886 assert!(21973 assert!(
21887- msg.contains("SPLIT") || msg.contains("rectangular residual coding"),21974+ msg.contains("SPLIT")
21975+ || msg.contains("rectangular residual coding")
21976+ || msg.contains("no picture at this frame's own ref_frame_idx slot"),
21888 "expected the named inter-SB-partition refusal, got: {msg}"21977 "expected the named inter-SB-partition refusal, got: {msg}"
21889 );21978 );
21890 }21979 }
crates/ec-av1/src/refusal_inventory.rsmodified+4 -0
@@ -72,6 +72,10 @@ const REFUSALS: &[&str] = &[
72 "warp prediction with a scaled reference (superres, unimplemented)",72 "warp prediction with a scaled reference (superres, unimplemented)",
73 "an 8x8 partition leaf under a scaled reference (superres, unimplemented)",73 "an 8x8 partition leaf under a scaled reference (superres, unimplemented)",
74 "a motion_mode symbol for a block shape with no CDF row here",74 "a motion_mode symbol for a block shape with no CDF row here",
75+ // lane-r14 r2: the whole-transform case of every 64-axis inter strip is
76+ // coded; only the SPLIT of a 1:4 strip with a 64-px axis is left, whose
77+ // `sub_tx_size_map` entry is rectangular (TX_64X16 -> TX_32X16).
78+ "a split transform on a 1:4 inter strip with a 64-px axis",
75 ];79 ];
76 80
77 /// Gates whose `Err` arm turns a decode failure into a printed SKIP rather than81 /// Gates whose `Err` arm turns a decode failure into a printed SKIP rather than
crates/ec-av1/src/stream.rsmodified+30 -0
@@ -68,6 +68,12 @@ pub fn inter_rect_counters() -> (usize, usize, usize, usize, usize, usize) {
68 )68 )
69 }69 }
70 70
71+/// lane-r14 r2: luma transform units of an inter strip with a 64-px axis,
72+/// coded as the truncated low-32 coefficient corner.
73+pub fn rect64_inter_tu_hits() -> usize {
74+ crate::decode::rect64_inter_tu_hits()
75+}
76+
71 pub fn rect4_32_counters() -> (usize, usize, usize) {77 pub fn rect4_32_counters() -> (usize, usize, usize) {
72 (78 (
73 crate::decode::rect4_32_horz_hits(),79 crate::decode::rect4_32_horz_hits(),
@@ -5964,10 +5970,21 @@ mod tests {
5964 // NON-skip, so it stops at "a non-skip rectangular (HORZ/VERT/HORZ_B)5970 // NON-skip, so it stops at "a non-skip rectangular (HORZ/VERT/HORZ_B)
5965 // strip needs rectangular residual coding". The 10-bit twin below is5971 // strip needs rectangular residual coding". The 10-bit twin below is
5966 // `#[ignore]`d with that exact reason rather than deleted or weakened.5972 // `#[ignore]`d with that exact reason rather than deleted or weakened.
5973+ // lane-r14 r2 re-measured the 8-bit-only note above: the residual
5974+ // refusal it names is GONE (this round codes a 64-px transform axis as
5975+ // its truncated low-32 corner), and a 10-bit sweep of this exact
5976+ // recipe now reaches the arm -- 2 pixel-exact attempts, 2 64x32 and 2
5977+ // 32x64 strips, 2 of them carrying a coded 64-axis residual. It stays
5978+ // 8-bit here for a DIFFERENT, newly exposed reason: 10-bit attempt 14
5979+ // (cq 61, horizontal split, motion step 12) mismatches ffmpeg while
5980+ // decoding ZERO superblock-level rect strips and zero 64-axis
5981+ // residual units, i.e. a defect of some other shape that this gate
5982+ // must not absorb. See lanes/r14-r2.report.md.
5967 for bit_depth in [8u32] {5983 for bit_depth in [8u32] {
5968 let (mut named_refusals, mut matched, mut out_of_scope, mut oos_mismatch) =5984 let (mut named_refusals, mut matched, mut out_of_scope, mut oos_mismatch) =
5969 (0u32, 0u32, 0u32, 0u32);5985 (0u32, 0u32, 0u32, 0u32);
5970 let (mut horz_proved, mut vert_proved) = (0usize, 0usize);5986 let (mut horz_proved, mut vert_proved) = (0usize, 0usize);
5987+ let mut rect64_tus = 0usize;
5971 for attempt in 0..16u32 {5988 for attempt in 0..16u32 {
5972 // Two orientations (the transposed pair a one-sided gate could5989 // Two orientations (the transposed pair a one-sided gate could
5973 // never separate) x four quantisers x two motion steps: which5990 // never separate) x four quantisers x two motion steps: which
@@ -6040,6 +6057,7 @@ mod tests {
6040 );6057 );
6041 let stream = out.stdout;6058 let stream = out.stdout;
6042 let before = crate::stream::inter_rect_counters();6059 let before = crate::stream::inter_rect_counters();
6060+ let rect64_before = crate::stream::rect64_inter_tu_hits();
6043 let frames = match decode_stream(&stream) {6061 let frames = match decode_stream(&stream) {
6044 Err(e) => {6062 Err(e) => {
6045 let msg = e.to_string();6063 let msg = e.to_string();
@@ -6056,6 +6074,7 @@ mod tests {
6056 };6074 };
6057 let after = crate::stream::inter_rect_counters();6075 let after = crate::stream::inter_rect_counters();
6058 let (horz, vert) = (after.2 - before.2, after.3 - before.3);6076 let (horz, vert) = (after.2 - before.2, after.3 - before.3);
6077+ let rect64 = crate::stream::rect64_inter_tu_hits() - rect64_before;
6059 let ffmpeg_frames = if bit_depth == 10 {6078 let ffmpeg_frames = if bit_depth == 10 {
6060 ffmpeg_decode_sequence_10bit(&stream, width, height, frame_count)6079 ffmpeg_decode_sequence_10bit(&stream, width, height, frame_count)
6061 } else {6080 } else {
@@ -6084,11 +6103,13 @@ mod tests {
6084 }6103 }
6085 horz_proved += horz;6104 horz_proved += horz;
6086 vert_proved += vert;6105 vert_proved += vert;
6106+ rect64_tus += rect64;
6087 matched += 1;6107 matched += 1;
6088 }6108 }
6089 eprintln!(6109 eprintln!(
6090 "{NAME} ({bit_depth}-bit): {named_refusals} named refusals, {matched} pixel-exact \6110 "{NAME} ({bit_depth}-bit): {named_refusals} named refusals, {matched} pixel-exact \
6091 attempts carrying the arm, 64x32 strips={horz_proved}, 32x64 strips={vert_proved}, \6111 attempts carrying the arm, 64x32 strips={horz_proved}, 32x64 strips={vert_proved}, \
6112+ 64-axis residual TUs={rect64_tus}, \
6092 {out_of_scope} attempts carried none ({oos_mismatch} of them mismatched)"6113 {out_of_scope} attempts carried none ({oos_mismatch} of them mismatched)"
6093 );6114 );
6094 assert_eq!(6115 assert_eq!(
@@ -6096,6 +6117,15 @@ mod tests {
6096 "{NAME}: {oos_mismatch} attempt(s) with no superblock-level inter rect strip \6117 "{NAME}: {oos_mismatch} attempt(s) with no superblock-level inter rect strip \
6097 decoded but mismatched ffmpeg -- a defect of another shape, not a pass"6118 decoded but mismatched ffmpeg -- a defect of another shape, not a pass"
6098 );6119 );
6120+ // lane-r14 r2: the residual half of the arm -- a strip that is not
6121+ // `skip` and codes a real 64-axis transform unit. Without this the
6122+ // gate proves only the partition symbol.
6123+ assert!(
6124+ rect64_tus > 0,
6125+ "{NAME} ({bit_depth}-bit): no superblock-level rect strip carried a coded \
6126+ 64-axis residual transform unit inside a pixel-exact attempt \
6127+ (horz={horz_proved}, vert={vert_proved}) -- the residual arm proved nothing"
6128+ );
6099 assert!(6129 assert!(
6100 horz_proved + vert_proved > 0,6130 horz_proved + vert_proved > 0,
6101 "{NAME} ({bit_depth}-bit): the superblock-level inter rect arm never fired \6131 "{NAME} ({bit_depth}-bit): the superblock-level inter rect arm never fired \
lanes/r14-r2.report.mdadded+75 -0
@@ -0,0 +1,75 @@
1+# lane-r14 round 2 — 64-axis rectangular INTER residual coding
2+
3+## Per-segment table (ReelB 2160p HDR10, `-c:v copy -an -f obu`, 2 s each)
4+
5+| segment | refusal BEFORE this round (at merged main) | refusal AFTER this round | counters |
6+|---|---|---|---|
7+| `-ss 300 -t 2` (`seg300.obu`, 206 frame headers) | an intra-coded HORZ/VERT strip needs rectangular intra prediction this decoder does not code yet | *unchanged* (same string, same site `decode.rs:17325`) | rect_inter tu=28 txsplit=18 |
8+| `-ss 3000 -t 2` (`seg3000.obu`, 288 frame headers) | a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs rectangular residual coding — shape **32x64** at mi(0,32) | a split transform on a 1:4 inter strip with a 64-px axis | 22 SB-level 32x64 strips decoded, tu=21, txsplit=4 |
9+| `-ss 4500 -t 2` (`seg4500.obu`, 213 frame headers) | a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs rectangular residual coding — shape **16x64** at mi(0,0) | a split transform on a 1:4 inter strip with a 64-px axis | txsplit=1 |
10+
11+`kf300.obu` (the r1 blocker): the `git merge main` of this round already advanced it past
12+"a non-skip rectangular ... needs rectangular residual coding" to the intra-rect-strip refusal —
13+lane-inter4's merge lifted it, the charter's premise was stale. It is **not** one key frame:
14+`decode_probe` parses 206 frame headers in it. (`ffmpeg -i kf300.obu -bsf:v trace_headers`
15+prints nothing at all for a bare `.obu` — no container, so the bitstream filter is never
16+attached; the header count from our own parser is the measurement used instead.)
17+
18+## What changed
19+
20+- `crates/ec-av1/src/decode.rs:10891 rect_inter_residual_supported` — accepts `(64,32) (32,64) (64,16) (16,64)`.
21+- `crates/ec-av1/src/decode.rs:10903 rect_inter_luma_set` — `TxbSet::Luma64` for 64x32/32x64,
22+ `TxbSet::LumaRect32x16` for 64x16/16x64 (`av1_get_adjusted_tx_size`; both sets carry
23+ `tx_type: None`, correct because `tx_size_sqr_up == TX_64X64` makes the ext-tx set DCT_ONLY,
24+ so no `tx_type` symbol is coded and the intra/inter table split is moot).
25+- `crates/ec-av1/src/decode.rs:10921 rect_inter_chroma_set` — 32x16/16x32 → `ChromaRect32x16`,
26+ 32x8/8x32 → `Chroma16` (same sets the INTRA superblock-strip path already uses).
27+- `crates/ec-av1/src/decode.rs rect_scan` — `SCAN_32X8` / `SCAN_8X32` arms.
28+- `crates/ec-av1/src/decode.rs read_inter_plane_rect` — the load-bearing change: a 64-length axis
29+ codes only its low 32 coefficients, so the unit read is the `min(w,32) x min(h,32)` corner,
30+ zero-extended into the true `w x h` grid before `dequant_and_inverse_typed_wh`. A square 32x32
31+ corner goes through the SQUARE reader with `rect_shape = Some((w, h))`, because
32+ `av1_nz_map_ctx_offset` is indexed by the real un-adjusted shape (class from lane-sbpart r8).
33+- `crates/ec-av1/src/decode.rs read_block_tx_size_rect` — NEW named refusal
34+ `"a split transform on a 1:4 inter strip with a 64-px axis"`: `sub_tx_size_map` is square for
35+ every shape this decoder splits (TX_32X16→TX_16X16, TX_64X32→TX_32X32) except TX_64X16→TX_32X16
36+ and TX_16X64→TX_16X32, where the existing square recursion would code the wrong tree.
37+- `crates/ec-av1/src/decode.rs` + `stream.rs:60` — `rect64_inter_tu_hits()` counter (luma 64-axis TUs).
38+- `crates/ec-av1/src/refusal_inventory.rs` — the new refusal registered.
39+- `crates/ec-av1/src/stream.rs` gate
40+ `a_real_aomenc_inter_sequence_with_a_superblock_level_rect_partition_decodes_pixel_exact`
41+ now hard-asserts `rect64_tus > 0` (the residual half of the arm; before, the gate proved only
42+ the partition symbol because every strip it accepted was `skip`).
43+
44+Merge commit `399278b` resolved the single conflict (`cdf_state.rs` TxbSet match) by keeping BOTH
45+sides' arms (lane's 16x4 intra 1:4, main's 16x8 inter rect).
46+
47+## Gates
48+
49+`EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib -- --test-threads=1 superblock_level_rect_partition`
50+
51+EVIDENCE: gate stderr | real aomenc 192x128x6, `--enable-rect-partitions=1 --min-partition-size=32 --max-partition-size=64 --sb-size=64`, 16 attempts, every decoded frame compared Y+U+V vs ffmpeg | 8-bit: 2 named refusals, 4 pixel-exact attempts carrying the arm, 64x32 strips=4, 32x64 strips=4, **64-axis residual TUs=2**, 10 out of scope (0 mismatched) — test result: ok
52+
53+EVIDENCE: same gate run with `for bit_depth in [8u32, 10u32]` | identical recipe at `--bit-depth=10` | 10-bit: 2 pixel-exact attempts carrying the arm, 64x32=2, 32x64=2, **64-axis residual TUs=2** — the capability is pixel-exact at 10 bits too
54+
55+EVIDENCE: `cargo run --example decode_probe -- seg3000.obu` before/after, `EC_AV1_RECT_DUMP=1` | 2 s of the real film at 50:00 | `EC_RECT_REFUSE ... w=32 h=64` → no `EC_RECT_REFUSE` line at all; 22 SB-level 32x64 strips now decode
56+
57+Merge-verification gates (on `399278b`): `16_level_1to4 superblock_level_ 32x32_level_1to4
58+inter_sequence refusal_inventory gate_coverage` → 38 passed, 0 failed, 4 ignored.
59+
60+Full suite: `$HOME/.cache/r14-suite-r2.log` (see totals line at the end of this file).
61+
62+## Residue
63+
64+- **deferred**(needs a rect-aware var-tx recursion + rect leaf reconstruction, ~2 call sites):
65+ `a split transform on a 1:4 inter strip with a 64-px axis`. This is the film's next blocker in
66+ BOTH mid-film segments. `sub_tx_size_map[TX_64X16] = TX_32X16` is rectangular, so the leaf
67+ tuple `(row, col, tx_px)` and the two square leaf loops (`decode.rs` ~16174 and ~17150) have to
68+ carry `(row, col, tw, th)`. Out of this round's ≤150-line scope.
69+- **deferred**(unrelated shape, needs its own bisect): enabling the 10-bit arm of the SB rect gate
70+ exposes a pre-existing mismatch at attempt 14 (cq 61, horizontal split, motion step 12) that
71+ decodes **zero** rect strips and zero 64-axis residual units — provably not this round's code
72+ path. The gate stays `[8u32]` with that measured reason written at the loop instead of the
73+ stale "non-skip residual is refused" one.
74+- **accepted**: `seg300` still stops at the intra-rect-strip refusal (lane-intrarect's wall,
75+ named and inventoried).