Compound 8x8 leaf published transform width 8 to the deblock grid even when its var-tx split it into 4x4 units
Browse files at this commit315f5f2c944e8262290ad8e2f2dcaec248cd107dParent: 885adf5- fix
- compound 8x8 leaf published transform width 8 to the deblock grid even when its var-tx split it into 4x4 units
1 changed file +12 -1
- crates/ec-av1/src/decode.rs +12 -1
crates/ec-av1/src/decode.rsmodified+12 -1
| @@ -5010,6 +5010,9 @@ impl Neighbours { | ||
| 5010 | 5010 | tx_h_px: u8, |
| 5011 | 5011 | ) { |
| 5012 | 5012 | let (mi_r, mi_c) = at_mi; |
| 5013 | + if std::env::var_os("EC_TXGRID_TRACE").is_some() { | |
| 5014 | + eprintln!("EC_LFLEAF mi_row={mi_r} mi_col={mi_c} w_mi={w_mi} h_mi={h_mi} tx_px={tx_px} tx_h_px={tx_h_px}"); | |
| 5015 | + } | |
| 5013 | 5016 | for rr in 0..h_mi { |
| 5014 | 5017 | for cc in 0..w_mi { |
| 5015 | 5018 | let idx = (mi_r + rr) * self.skip_grid_cols_mi + (mi_c + cc); |
| @@ -24980,10 +24983,18 @@ fn decode_inter_block8( | ||
| 24980 | 24983 | // dlist excludes it (3 luma samples on a 192x128 inter frame). |
| 24981 | 24984 | INTER8_SKIP_BAND_HITS.with(|c| c.set(c.get() + 1)); |
| 24982 | 24985 | neighbours.fill_skip_grid(leaf_mi, 2, skip); |
| 24986 | + // lane-sub8x4 r2: `split8` is this leaf's OWN var-tx split, so | |
| 24987 | + // the deblock grid must publish the TX_4X4 leaves' width the | |
| 24988 | + // same way the fall-through arm below does (libaom | |
| 24989 | + // `get_transform_size`, av1_loopfilter.c:207, reads the per-TU | |
| 24990 | + // `inter_tx_size` for a non-skip inter luma block). Hardcoding | |
| 24991 | + // 8 here left a compound var-tx 8x8 leaf's interior vertical | |
| 24992 | + // edge at x % 8 == 4 unfiltered -- class early-return-skips-tail, | |
| 24993 | + // third instance in this same arm. | |
| 24983 | 24994 | neighbours.fill_lf_grid( |
| 24984 | 24995 | leaf_mi, |
| 24985 | 24996 | 2, |
| 24986 | - 8, | |
| 24997 | + if split8 { 4 } else { 8 }, | |
| 24987 | 24998 | if is_inter { leaf_refs.0.max(LAST_FRAME) } else { 0 }, |
| 24988 | 24999 | ); |
| 24989 | 25000 | return Ok(( |