16x16 partition ctx reads stale coarse side after a leaf8 sibling
Browse files at this commit4353787102b92f59995dd95799f13bf64a74082aParent: 9a69856- fix
- 16x16 partition ctx reads stale coarse side after a leaf8 sibling
1 changed file +7 -1
crates/ec-av1/src/tile.rsmodified+7 -1
| @@ -804,8 +804,14 @@ impl Neighbours { | ||
| 804 | 804 | } |
| 805 | 805 | |
| 806 | 806 | fn partition_ctx(&self, at: (usize, usize), side: usize) -> usize { |
| 807 | + // Delegates to the mi-precise reader (same pattern as `around` / | |
| 808 | + // `around_mi`): `above_side`/`left_side` are only ever advanced in | |
| 809 | + // whole-[`SUB`] steps by [`Self::record`], so a leaf8's `record_mi` | |
| 810 | + // (lane-av1-rect) -- which only touches the finer mi arrays -- leaves | |
| 811 | + // them stale for the *next* sibling's own partition symbol, reading a | |
| 812 | + // 16x16-slot side that already split into 8x8s underneath it. | |
| 807 | 813 | let (r, c) = at; |
| 808 | - 2 * usize::from(self.left_side[r] * 2 <= side) + usize::from(self.above_side[c] * 2 <= side) | |
| 814 | + self.partition_ctx_mi((r * (SUB / MI), c * (SUB / MI)), side) | |
| 809 | 815 | } |
| 810 | 816 | |
| 811 | 817 | /// [`Self::partition_ctx`] at mi granularity, for an 8x8 leaf of a |