ec-av1: lane-av1-422o -- name the (2,16) stop: libaom has no such transform; the ODD strip is the chroma reference (is_chroma_reference's column clause, bw == 1 mi) and codes the pair's (4,16) at ss(1,0) as TWO TX_4X8 units per plane (ss_size_lookup[BLOCK_4X16][1][0] = BLOCK_INVALID -> OOB max_txsize_rect_lookup byte TX_4X8; unit_width ROUND_POWER_OF_TWO(1,1) = 1, stepr = 2); the chunk's txb_skip_ctx rides num_pels_log2_lookup[255] = 255 (measured at the 0xc0db70 copy) into the offset-10 rows (+3); skip arm walks the same units; counter 100->107 over 8 units; header refusal stays (walk stops in decode_block_rect4's chroma shape set at 4x32, decode.rs:13550)
Browse files at this commit5c2785077a0ccc2c7f50899728ff8b637ba9406bParent: 09ed9142 changed files +254 -12
- crates/ec-av1/src/decode.rs +144 -12
- lanes/av1422o.report.md +110 -0
crates/ec-av1/src/decode.rsmodified+144 -12
| @@ -13818,7 +13818,17 @@ fn decode_rect4_16( | |||
| 13818 | // lane-av1-444: at 4:4:4 every strip is its own chroma reference | 13818 | // lane-av1-444: at 4:4:4 every strip is its own chroma reference |
| 13819 | // (no mi-parity test at ss 0/0, and the strip's own chroma block is | 13819 | // (no mi-parity test at ss 0/0, and the strip's own chroma block is |
| 13820 | // already >= 4x4) -- there is no 4:2:0 pair to close. | 13820 | // already >= 4x4) -- there is no 4:2:0 pair to close. |
| 13821 | - let has_chroma = i % 2 == 1 || ss_y(fctx) == 0; | 13821 | + // lane-av1-422o: the parity rule is per axis, straight out of |
| 13822 | + // `is_chroma_reference`: a HORZ 16x4 strip (1 mi tall) keeps the | ||
| 13823 | + // `ss_y == 0 -> every strip a reference` row rule, but a VERT 4x16 | ||
| 13824 | + // strip (1 mi wide) keeps the COLUMN clause `(mi_col & 1) || !(bw & | ||
| 13825 | + // 1) || !ss_x`, which with bw == 1 mi reduces to `mi_col odd` for | ||
| 13826 | + // every ss_x == 1 format -- the ODD strip closes the pair and reads | ||
| 13827 | + // the chroma, exactly like 4:2:0. (VERT_4 partitions start on an | ||
| 13828 | + // even mi_col, so `i % 2 == 1` is that clause.) | ||
| 13829 | + let has_chroma = i % 2 == 1 | ||
| 13830 | + || (horz && ss_y(fctx) == 0) | ||
| 13831 | + || (!horz && ss_x(fctx) == 0); | ||
| 13822 | let (mode, uv, _tx) = decode_rect4_16_strip( | 13832 | let (mode, uv, _tx) = decode_rect4_16_strip( |
| 13823 | dec, | 13833 | dec, |
| 13824 | cdfs, | 13834 | cdfs, |
| @@ -14720,16 +14730,18 @@ fn decode_rect4_16_strip( | |||
| 14720 | // ss 0/0, so the neighbour reads below anchor at the strip.) | 14730 | // ss 0/0, so the neighbour reads below anchor at the strip.) |
| 14721 | let (pair_mi, pw, ph) = if ss_x(fctx) == 0 && ss_y(fctx) == 0 { | 14731 | let (pair_mi, pw, ph) = if ss_x(fctx) == 0 && ss_y(fctx) == 0 { |
| 14722 | (lmi, bw, bh) | 14732 | (lmi, bw, bh) |
| 14723 | - } else if ss_y(fctx) == 0 { | 14733 | + } else if ss_y(fctx) == 0 && horz { |
| 14724 | - // lane-av1-422: chroma height is NOT subsampled, so every | 14734 | + // lane-av1-422: chroma height is NOT subsampled, so a HORZ |
| 14725 | - // strip is its own chroma reference (libaom is_chroma_reference | 14735 | + // 16x4 strip is its own chroma reference (`is_chroma_reference` |
| 14726 | - // loses its row-parity clause) and codes its own | 14736 | + // at ss(1,0): bh == 1 mi, so the row clause reduces to |
| 14727 | - // `ss_size_lookup[bsize][1][0]` chroma block -- the 8x4 of a | 14737 | + // `!ss_y`) and codes its own `ss_size_lookup[BLOCK_16X4][1][0]` |
| 14728 | - // 16x4 luma strip. The 4:2:0 pair merge below never applies, | 14738 | + // = BLOCK_8X4 chroma block -- a valid transform, no pair. |
| 14729 | - // exactly like the ss 0/0 arm above. (A VERTICAL 4x16 strip | 14739 | + // (lane-av1-422o: a VERTICAL 4x16 strip now falls through to |
| 14730 | - // cannot reach this arm at 4:2:2: its chroma block | 14740 | + // the pair merge below -- its own chroma block |
| 14731 | - // `ss_size_lookup[BLOCK_4X16][1][0]` is BLOCK_INVALID, so a | 14741 | + // `ss_size_lookup[BLOCK_4X16][1][0]` is BLOCK_INVALID, the |
| 14732 | - // conformant stream carries no such leaf.) | 14742 | + // walk proved such leaves exist, and libaom codes the pair's |
| 14743 | + // chroma from the closing strip; the chunk lives in the | ||
| 14744 | + // `chroma422_pair16` arm below.) | ||
| 14733 | (lmi, bw, bh) | 14745 | (lmi, bw, bh) |
| 14734 | } else if horz { | 14746 | } else if horz { |
| 14735 | ((lmi.0 - 1, lmi.1), 16, 8) | 14747 | ((lmi.0 - 1, lmi.1), 16, 8) |
| @@ -14739,6 +14751,19 @@ fn decode_rect4_16_strip( | |||
| 14739 | let (ppx, ppy) = (pair_mi.1 * MI, pair_mi.0 * MI); | 14751 | let (ppx, ppy) = (pair_mi.1 * MI, pair_mi.0 * MI); |
| 14740 | let (cpx, cpy) = (ppx >> ss_x(fctx), ppy >> ss_y(fctx)); | 14752 | let (cpx, cpy) = (ppx >> ss_x(fctx), ppy >> ss_y(fctx)); |
| 14741 | let (cw, ch) = (pw >> ss_x(fctx), ph >> ss_y(fctx)); | 14753 | let (cw, ch) = (pw >> ss_x(fctx), ph >> ss_y(fctx)); |
| 14754 | + // lane-av1-422o: the 4:2:2 pair's chroma of a VERT 4x16 strip | ||
| 14755 | + // pair: (4, 16) at ss(1,0). The bsize is still BLOCK_4X16, whose | ||
| 14756 | + // `ss_size_lookup[..][1][0]` is BLOCK_INVALID, so libaom's | ||
| 14757 | + // `av1_get_tx_size` reads `max_txsize_rect_lookup[255]` -- the | ||
| 14758 | + // out-of-bounds byte is TX_4X8 in the pinned Release oracle, and | ||
| 14759 | + // `av1_get_adjusted_tx_size` has no TX_4X8 case to adjust it. | ||
| 14760 | + // `decode_token_recon_block` walks unit_width = | ||
| 14761 | + // ROUND_POWER_OF_TWO(1, 1) = 1, unit_height = 4, with stepr = | ||
| 14762 | + // tx_size_high_unit[TX_4X8] = 2: TWO TX_4X8 units per plane | ||
| 14763 | + // (chroma rows 0..8 and 8..16), plane-major. Even the skip arm | ||
| 14764 | + // walks per unit: `predict_and_reconstruct_intra_block` predicts | ||
| 14765 | + // every unit regardless of `skip_txfm`. | ||
| 14766 | + let chroma422_pair16 = (cw, ch) == (4, 16) && ss_x(fctx) == 1; | ||
| 14742 | let uv_predict_mode = if uv_mode == UV_CFL_PRED { DC_PRED } else { uv_mode }; | 14767 | let uv_predict_mode = if uv_mode == UV_CFL_PRED { DC_PRED } else { uv_mode }; |
| 14743 | if (V_PRED..=D67_PRED).contains(&uv_predict_mode) { | 14768 | if (V_PRED..=D67_PRED).contains(&uv_predict_mode) { |
| 14744 | hit!(RECT4_16_CHROMA_DIR_HITS); | 14769 | hit!(RECT4_16_CHROMA_DIR_HITS); |
| @@ -14858,6 +14883,41 @@ fn decode_rect4_16_strip( | |||
| 14858 | hit!(CHROMA_SKIP_CFL_HITS); | 14883 | hit!(CHROMA_SKIP_CFL_HITS); |
| 14859 | } | 14884 | } |
| 14860 | for (_buf, plane) in [(&mut *u, 1usize), (&mut *v, 2)] { | 14885 | for (_buf, plane) in [(&mut *u, 1usize), (&mut *v, 2)] { |
| 14886 | + if chroma422_pair16 { | ||
| 14887 | + // lane-av1-422o: two TX_4X8 units, each predicted on | ||
| 14888 | + // its own edges (the lower one off the upper one's | ||
| 14889 | + // samples); no coefficients are coded, and libaom's | ||
| 14890 | + // `set_entropy_context` zeroed the block's own cells, | ||
| 14891 | + // so the pair-wide zero stamp below stays correct. | ||
| 14892 | + for unit_row in 0..2usize { | ||
| 14893 | + let unit_reach = tu_reach_rect( | ||
| 14894 | + pw, ph, 0, unit_row * 8, 8, 8, pair_reach, | ||
| 14895 | + ppx, ppy, y.width, y.height, fctx, | ||
| 14896 | + ); | ||
| 14897 | + if let Some((ub, vb)) = &palette_uv_bufs { | ||
| 14898 | + let pbuf = if plane == 1 { ub } else { vb }; | ||
| 14899 | + set_palette_pred( | ||
| 14900 | + palette_window(pbuf, cw, 0, unit_row * 8, 4, 8), | ||
| 14901 | + fctx, | ||
| 14902 | + ); | ||
| 14903 | + } | ||
| 14904 | + push_intra_rect(plane, | ||
| 14905 | + cpx, | ||
| 14906 | + cpy + unit_row * 8, | ||
| 14907 | + 4, | ||
| 14908 | + 8, | ||
| 14909 | + uv_predict_mode, | ||
| 14910 | + angle_delta_uv, | ||
| 14911 | + unit_reach, | ||
| 14912 | + &ZERO_RESIDUAL[..4 * 8], | ||
| 14913 | + alpha | ||
| 14914 | + .zip(ac) | ||
| 14915 | + .map(|((au, av), ac)| (if plane == 1 { au } else { av }, ac)), | ||
| 14916 | + None, | ||
| 14917 | + smooth_neighbor_uv, fctx, | ||
| 14918 | + ); | ||
| 14919 | + } | ||
| 14920 | + } else { | ||
| 14861 | if let Some((ub, vb)) = &palette_uv_bufs { | 14921 | if let Some((ub, vb)) = &palette_uv_bufs { |
| 14862 | set_palette_pred(if plane == 1 { ub.clone() } else { vb.clone() }, fctx); | 14922 | set_palette_pred(if plane == 1 { ub.clone() } else { vb.clone() }, fctx); |
| 14863 | } | 14923 | } |
| @@ -14876,8 +14936,69 @@ fn decode_rect4_16_strip( | |||
| 14876 | None, | 14936 | None, |
| 14877 | smooth_neighbor_uv, fctx, | 14937 | smooth_neighbor_uv, fctx, |
| 14878 | ); | 14938 | ); |
| 14939 | + } | ||
| 14879 | } | 14940 | } |
| 14880 | (zeros.clone(), zeros) | 14941 | (zeros.clone(), zeros) |
| 14942 | + } else if chroma422_pair16 { | ||
| 14943 | + // lane-av1-422o: the pair's 4x16 chroma as TWO TX_4X8 units | ||
| 14944 | + // per plane, plane-major (every U unit, then every V). Each | ||
| 14945 | + // unit: the `ChromaRect8x4` tables (`get_txsize_entropy_ctx` | ||
| 14946 | + // squares TX_4X8 up to the 8x8 class), `SCAN_4X8`, and a | ||
| 14947 | + // `txb_skip_ctx` of above+left in the OFFSET-10 rows -- the | ||
| 14948 | + // offset comes from `num_pels_log2_lookup[plane_bsize] > | ||
| 14949 | + // num_pels_log2_lookup[BLOCK_4X8]` with plane_bsize = | ||
| 14950 | + // BLOCK_INVALID (255), and the byte at that table's +255 in | ||
| 14951 | + // the pinned Release oracle is 255 (`cmpb` against the | ||
| 14952 | + // `0xc0db70` copy decodetxb.c links), i.e. the bigger-plane | ||
| 14953 | + // arm: +3 on the offset-7-first chroma tables. No tx_type | ||
| 14954 | + // symbol (only y plane's is transmitted); the unit's type is | ||
| 14955 | + // `intra_mode_to_tx_type(UV mode)` kept by the all-16 ext-tx | ||
| 14956 | + // set -- [`read_rect_chroma_unit`]'s own default. CfL params | ||
| 14957 | + // are computed ONCE per block (`are_parameters_computed`) | ||
| 14958 | + // over the pair's luma, shared by both units. Each unit is | ||
| 14959 | + // predicted and recorded immediately, so the lower unit | ||
| 14960 | + // reads the upper one's coefficient context. | ||
| 14961 | + let ac = alpha.map(|_| cfl_src_rect(ppx, ppy, pw, ph)); | ||
| 14962 | + for (plane, buf) in [(1usize, &mut *u), (2usize, &mut *v)] { | ||
| 14963 | + for unit_row in 0..2usize { | ||
| 14964 | + let unit_mi = (pair_mi.0 + unit_row * 2, pair_mi.1); | ||
| 14965 | + let unit_reach = tu_reach_rect( | ||
| 14966 | + pw, ph, 0, unit_row * 8, 8, 8, pair_reach, | ||
| 14967 | + ppx, ppy, y.width, y.height, fctx, | ||
| 14968 | + ); | ||
| 14969 | + if let Some((ub, vb)) = &palette_uv_bufs { | ||
| 14970 | + let pbuf = if plane == 1 { ub } else { vb }; | ||
| 14971 | + set_palette_pred( | ||
| 14972 | + palette_window(pbuf, cw, 0, unit_row * 8, 4, 8), | ||
| 14973 | + fctx, | ||
| 14974 | + ); | ||
| 14975 | + } | ||
| 14976 | + let chroma_around = neighbours.around_mi_422_chroma(unit_mi, 8, 8); | ||
| 14977 | + let unit_grid = read_rect_chroma_unit( | ||
| 14978 | + dec, | ||
| 14979 | + cdfs, | ||
| 14980 | + TxbSet::ChromaRect8x4, | ||
| 14981 | + &SCAN_4X8, | ||
| 14982 | + 4, | ||
| 14983 | + 8, | ||
| 14984 | + plane, | ||
| 14985 | + chroma_around[plane], | ||
| 14986 | + uv_predict_mode, | ||
| 14987 | + angle_delta_uv, | ||
| 14988 | + unit_reach, | ||
| 14989 | + buf, | ||
| 14990 | + cpx, | ||
| 14991 | + cpy + unit_row * 8, | ||
| 14992 | + base_q_idx, | ||
| 14993 | + alpha | ||
| 14994 | + .zip(ac) | ||
| 14995 | + .map(|((au, av), ac)| (if plane == 1 { au } else { av }, ac)), | ||
| 14996 | + smooth_neighbor_uv, fctx, | ||
| 14997 | + )?; | ||
| 14998 | + neighbours.record_mi_chroma(unit_mi, 8, 8, plane, &unit_grid); | ||
| 14999 | + } | ||
| 15000 | + } | ||
| 15001 | + (Grid::Zero(cw * ch), Grid::Zero(cw * ch)) | ||
| 14881 | } else { | 15002 | } else { |
| 14882 | let around = neighbours.around_mi_rect(pair_mi, pw, ph); | 15003 | let around = neighbours.around_mi_rect(pair_mi, pw, ph); |
| 14883 | // lane-av1-444: the strip's own 16x4 / 4x16 chroma at ss 0/0 | 15004 | // lane-av1-444: the strip's own 16x4 / 4x16 chroma at ss 0/0 |
| @@ -14887,6 +15008,10 @@ fn decode_rect4_16_strip( | |||
| 14887 | (8, 4) => (TxbSet::ChromaRect8x4, &SCAN_8X4[..]), | 15008 | (8, 4) => (TxbSet::ChromaRect8x4, &SCAN_8X4[..]), |
| 14888 | (4, 8) => (TxbSet::ChromaRect8x4, &SCAN_4X8[..]), | 15009 | (4, 8) => (TxbSet::ChromaRect8x4, &SCAN_4X8[..]), |
| 14889 | (16, 4) => (TxbSet::Chroma8, &SCAN_16X4[..]), | 15010 | (16, 4) => (TxbSet::Chroma8, &SCAN_16X4[..]), |
| 15011 | + // lane-av1-444: 4:4:4's own-strip vert chroma is (4,16) | ||
| 15012 | + // -- one TX_4X16. (lane-av1-422o: the 4:2:2 pair's | ||
| 15013 | + // (4,16) never reaches this row; `chroma422_pair16` | ||
| 15014 | + // intercepts it above and chunks it into TX_4X8 units.) | ||
| 14890 | (4, 16) => (TxbSet::Chroma8, &SCAN_4X16[..]), | 15015 | (4, 16) => (TxbSet::Chroma8, &SCAN_4X16[..]), |
| 14891 | // lane-av1-422: a 4:2:2 HORZ pair (16x8 luma) keeps the | 15016 | // lane-av1-422: a 4:2:2 HORZ pair (16x8 luma) keeps the |
| 14892 | // pair's height: an 8x8 SQUARE chroma block, the same | 15017 | // pair's height: an 8x8 SQUARE chroma block, the same |
| @@ -14899,6 +15024,9 @@ fn decode_rect4_16_strip( | |||
| 14899 | hit!(CHROMA422_SQUARE_HITS); | 15024 | hit!(CHROMA422_SQUARE_HITS); |
| 14900 | (TxbSet::Chroma8, default_scan(8)) | 15025 | (TxbSet::Chroma8, default_scan(8)) |
| 14901 | } | 15026 | } |
| 15027 | + // lane-av1-422o: with the `chroma422_pair16` arm above, | ||
| 15028 | + // the (2,16) own-strip shape and the 4:4:4 shapes are the | ||
| 15029 | + // only residents; anything else is a named-lane gap. | ||
| 14902 | _ => unreachable!("decode_rect4_16_strip chroma shape set is closed"), | 15030 | _ => unreachable!("decode_rect4_16_strip chroma shape set is closed"), |
| 14903 | }; | 15031 | }; |
| 14904 | let mut planes = Vec::with_capacity(2); | 15032 | let mut planes = Vec::with_capacity(2); |
| @@ -14963,7 +15091,11 @@ fn decode_rect4_16_strip( | |||
| 14963 | neighbours.record_uv_mode_mi(pair_mi.0, pair_mi.1, pw / MI, ph / MI, uv_predict_mode); | 15091 | neighbours.record_uv_mode_mi(pair_mi.0, pair_mi.1, pw / MI, ph / MI, uv_predict_mode); |
| 14964 | // A lossless pair already stamped each TX_4X4 (`record_mi_chroma`). | 15092 | // A lossless pair already stamped each TX_4X4 (`record_mi_chroma`). |
| 14965 | // The single-state rewrite below is the non-lossless TX_8X4/TX_4X8. | 15093 | // The single-state rewrite below is the non-lossless TX_8X4/TX_4X8. |
| 14966 | - if !lossless_pair { | 15094 | + // lane-av1-422o: the chunked pair's cells are stamped PER UNIT in |
| 15095 | + // the arm above (libaom's coefficient contexts are per | ||
| 15096 | + // 4x4-cell); a pair-wide state would erase the unit boundary the | ||
| 15097 | + // next block reads. | ||
| 15098 | + if !lossless_pair && !chroma422_pair16 { | ||
| 14967 | // The chroma planes' coefficient context, over the PAIR's mi span | 15099 | // The chroma planes' coefficient context, over the PAIR's mi span |
| 14968 | // (`decode_leaf_rect8`'s own rule: a subsampled plane's bound is | 15100 | // (`decode_leaf_rect8`'s own rule: a subsampled plane's bound is |
| 14969 | // the luma one rounded up to its 4x4 unit). | 15101 | // the luma one rounded up to its 4x4 unit). |
lanes/av1422o.report.mdadded+110 -0
| @@ -0,0 +1,110 @@ | |||
| 1 | +# lane-av1-422o — the (2, 16) stop is NAMED and dispositioned: libaom has no | ||
| 2 | +# such transform; the odd strip is the chroma reference and codes the PAIR's | ||
| 3 | +# (4, 16) as TWO TX_4X8 units per plane; the header refusal STAYS (the walk | ||
| 4 | +# now stops in `decode_block_rect4`'s chroma shape set at 4x32) | ||
| 5 | + | ||
| 6 | +## Outcome | ||
| 7 | + | ||
| 8 | +1. Step 1 of the charter (print before adding): with the header refusal | ||
| 9 | + temporarily bypassed (probe-only, restored byte-identical — see below), | ||
| 10 | + the refusing shape printed as `(cw,ch)=(2,16) ss=(1,0)`. The walk's own | ||
| 11 | + `(2, 16)` is the EVEN strip's own chroma — a shape libaom never codes. | ||
| 12 | + The port does not chunk it; it is UNREACHABLE after the fix. | ||
| 13 | +2. `decode_rect4_16`'s `has_chroma` is per axis now: a VERT 4x16 strip (1 mi | ||
| 14 | + wide) keeps libaom `is_chroma_reference`'s column clause | ||
| 15 | + `(mi_col & 1) || !(bw & 1) || !ss_x`, which with bw == 1 mi reduces to | ||
| 16 | + `mi_col odd` at every ss_x == 1 format. The old `i % 2 == 1 || ss_y == 0` | ||
| 17 | + marked even strips as chroma references at 4:2:2 — the source of the | ||
| 18 | + phantom (2, 16). HORZ strips keep `i % 2 == 1 || ss_y == 0` (all four | ||
| 19 | + strips are references at ss_y 0); 4:2:0 and 4:4:4 resolve to the exact | ||
| 20 | + same flags as before in all four strip/format combinations. | ||
| 21 | +3. `decode_rect4_16_strip`'s own-chroma arm is HORZ-only now; a VERT strip | ||
| 22 | + falls through to the pair merge `((lmi.0, lmi.1 - 1), 8, 16)` — the | ||
| 23 | + closing strip codes the pair's chroma at the pair's origin | ||
| 24 | + (`setup_pred_plane`'s `mi_col -= 1` snap), giving (cw, ch) = (4, 16) at | ||
| 25 | + ss(1,0). The old comment claiming "a conformant stream carries no such | ||
| 26 | + leaf" is disproven by the fixture itself and is gone. | ||
| 27 | +4. The (4, 16) at ss_x == 1 is CHUNKED the way the pinned oracle walks it | ||
| 28 | + (`chroma422_pair16` arm): `ss_size_lookup[BLOCK_4X16][1][0]` is | ||
| 29 | + BLOCK_INVALID (common_data.c row `{ { BLOCK_4X16, BLOCK_4X8 }, | ||
| 30 | + { BLOCK_INVALID, BLOCK_4X8 } }`), so `av1_get_tx_size` reads | ||
| 31 | + `max_txsize_rect_lookup[255]` — the out-of-bounds byte is TX_4X8 | ||
| 32 | + (skill-measured, 0x05) and `av1_get_adjusted_tx_size` has no TX_4X8 | ||
| 33 | + case. `decode_token_recon_block` then walks unit_width = | ||
| 34 | + ROUND_POWER_OF_TWO(1, 1) = 1, unit_height = 4, stepr = | ||
| 35 | + tx_size_high_unit[TX_4X8] = 2, stepc = 1: TWO TX_4X8 units per plane, | ||
| 36 | + plane-major, the lower one predicted off the upper one's samples. The | ||
| 37 | + skip arm walks the same two units (prediction runs per unit regardless | ||
| 38 | + of `skip_txfm`). No coefficient-table row was added: the units ride the | ||
| 39 | + existing `(4, 8) => ChromaRect8x4` entropy class via | ||
| 40 | + `read_rect_chroma_unit`. | ||
| 41 | +5. The chunk's `txb_skip_ctx` rides the same INVALID lookup: libaom | ||
| 42 | + `get_txb_ctx_general`'s chroma branch picks the offset (7 vs 10) through | ||
| 43 | + `num_pels_log2_lookup[plane_bsize] > num_pels_log2_lookup[BLOCK_4X8]` | ||
| 44 | + with plane_bsize = 255. Measured, not guessed: the pinned Release | ||
| 45 | + oracle's decodetxb.c code indexes the `num_pels_log2_lookup` copy at | ||
| 46 | + vaddr `0xc0db70` (objdump: `cmpb $0xb,0xc0db70(%r15)` et al.), and the | ||
| 47 | + byte at that offset + 255 is 255 → offset 10 → the port's | ||
| 48 | + offset-7-first tables take `+3` (above + left + 3), the same shape the | ||
| 49 | + square multi-unit walks already use. | ||
| 50 | +6. No tx_type symbol: only y plane's is transmitted (decodetxb.c "only y | ||
| 51 | + plane's tx_type is transmitted"); the intra chroma unit's type is | ||
| 52 | + `intra_mode_to_tx_type(UV mode)` kept by the all-16 ext-tx set — exactly | ||
| 53 | + `read_rect_chroma_unit`'s own default. CfL parameters are computed once | ||
| 54 | + per block over the pair's luma (`are_parameters_computed`) and shared by | ||
| 55 | + both units; the DC-pred cache is dead in this build (`use_dc_pred_cache` | ||
| 56 | + never set true), so each unit predicts its own DC. | ||
| 57 | + | ||
| 58 | +## Counter (CHROMA422_RECT_HITS, instrumented per unit, temp print removed) | ||
| 59 | + | ||
| 60 | +The walk reads EIGHT chunk units — two pairs (mi (28, 44) and (32, 52)), | ||
| 61 | +each plane-major: U unit row 0, U unit row 1, then V units — mi rows 2 | ||
| 62 | +apart (8 px) — and the counter ticks 100 → 101 → … → 107 across them | ||
| 63 | +(`chroma422_rect=107` on the last line). Delta 8 = 2 planes x 2 units x 2 | ||
| 64 | +pairs. The pre-fix walk stops with the counter parked at 100. | ||
| 65 | + | ||
| 66 | +## Frontier (NOT fixed — another shape, another function) | ||
| 67 | + | ||
| 68 | +`decode_block_rect4`'s closed chroma-shape set has no `4x32` row: | ||
| 69 | +`decode.rs:13550` panics `decode_block_rect4 chroma shape set is closed: | ||
| 70 | +4x32` on the same probe walk after the (2, 16) fix. That function is the | ||
| 71 | +VERT_4 pair reader one level up; it is NOT edited here — named for its | ||
| 72 | +owning lane. | ||
| 73 | + | ||
| 74 | +## Pixels — delete condition unmet, refusal STAYS | ||
| 75 | + | ||
| 76 | +- Frame 1: no VERT_4 4:2:2 strip occurs before the old stop point, so | ||
| 77 | + frame 1's decode is untouched by this diff; its luma stays byte-exact vs | ||
| 78 | + `aomdec` and its U/V keep the pre-existing keyframe chroma gap from | ||
| 79 | + chroma (23, 0) on (`decode_block`'s own gap, present at e24dc84b, not | ||
| 80 | + this lane's function). | ||
| 81 | +- The walk stops inside frame 2 at `decode_block_rect4`'s 4x32, so the | ||
| 82 | + 16-frame pixel-exact + counter delete condition is unmet: the header | ||
| 83 | + refusal stands untouched (verified below). | ||
| 84 | + | ||
| 85 | +## Verification | ||
| 86 | + | ||
| 87 | +- `cargo check -p ec-av1 --all-targets` (target dir | ||
| 88 | + `~/.cache/cargo-target-av1422o`): **0 warnings**. | ||
| 89 | +- 420 gate green under `EC_AV1_REQUIRE_AOMENC=1`: | ||
| 90 | + `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_tx_split_ | ||
| 91 | + decodes_pixel_exact`: 1 passed, 0 failed. | ||
| 92 | +- Probe bypass reverted: `git diff` shows ONLY `crates/ec-av1/src/decode.rs` | ||
| 93 | + (+144/−12); `stream.rs` is byte-identical and the probe without the | ||
| 94 | + bypass prints `REFUSED: unsupported: AV1 decode_stream (a chroma format | ||
| 95 | + of 4:2:2 ...)` as before. | ||
| 96 | +- Oracle reference: `$HOME/.cache/aom-oracle/build/aomdec` on the fixture | ||
| 97 | + (sha256 `d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129`) | ||
| 98 | + → 16 shown frames. | ||
| 99 | +- Untouched: `read_inter_rect_chroma` (the four TX_4X8 (4, 32) chunk | ||
| 100 | + stays), the 4:2:0 group-tail chroma SKIP arm, the k lane's | ||
| 101 | + `read_rect_chroma_unit` (called, not edited), `decode_block_rect4` (the | ||
| 102 | + new frontier), `decode_probe.rs`, the lossless arm (shape-generic | ||
| 103 | + per-TX_4X4 walk already handles a (4, 16) pair). | ||
| 104 | + | ||
| 105 | +## State | ||
| 106 | + | ||
| 107 | +- Commit on lane-av1-422o (no push): the has_chroma parity fix, the horz | ||
| 108 | + own-chroma arm, the chroma422_pair16 chunk arms, and this report. | ||
| 109 | +- Next stop named for the owning lane: `decode_block_rect4` chroma shape | ||
| 110 | + `4x32` (decode.rs:13550). | ||