The 128 superblock root codes a real residual
Browse files at this commit1ee7fc675f0d2ed1e31798924242976364b6f8edParent: 5fd3825- feat
- the 128 superblock root codes a real residual
2 changed files +10 -6
crates/ec-av1/src/encode.rsmodified+9 -5
| @@ -16195,11 +16195,15 @@ mod tests { | |||
| 16195 | 16195 | ||
| 16196 | /// lane-b128r: the 128 root's own RESIDUAL arm -- four TX_64X64 luma | 16196 | /// lane-b128r: the 128 root's own RESIDUAL arm -- four TX_64X64 luma |
| 16197 | /// units interleaved with a TX_32X32 chroma pair per 64x64 mu chunk. The | 16197 | /// units interleaved with a TX_32X32 chroma pair per 64x64 mu chunk. The |
| 16198 | - /// same pan the skip-only witness above uses, coded at a quantizer where | 16198 | + /// same pan the skip-only witness above uses, with the arm FORCED |
| 16199 | - /// the residual is worth its bits, so the counters below are non-zero; | 16199 | + /// ([`force_b128_residual`]): on synthetic bars the RD picks the residual |
| 16200 | - /// RED before this lane by construction (`write_inter_block_128` refused | 16200 | + /// about once per frame, which witnesses the shape but not every context |
| 16201 | - /// every non-skip 128 block, so the count was 0 and no such block | 16201 | + /// it reads, and forcing codes all 420 roots of the clip through it. RED |
| 16202 | - /// existed to decode). | 16202 | + /// before this lane by construction (`write_inter_block_128` refused |
| 16203 | + /// every non-skip 128 block, so no such block existed to decode), and RED | ||
| 16204 | + /// again on the first draft of the writer, whose neighbour band recorded | ||
| 16205 | + /// `skip = true` for a block that carries a residual -- the next root's | ||
| 16206 | + /// `skip` symbol then took CDF row 1 where the reader takes row 0. | ||
| 16203 | /// | 16207 | /// |
| 16204 | /// cargo test -p ec-av1 --release --lib -- --ignored \ | 16208 | /// cargo test -p ec-av1 --release --lib -- --ignored \ |
| 16205 | /// a_128_root_block_with_a_real_residual --nocapture | 16209 | /// a_128_root_block_with_a_real_residual --nocapture |
crates/ec-av1/src/tile.rsmodified+1 -1
| @@ -452,7 +452,7 @@ fn write_inter_block_128( | |||
| 452 | } else { | 452 | } else { |
| 453 | neighbours.record(sb_at, SIDE, 0, &zero_grids); | 453 | neighbours.record(sb_at, SIDE, 0, &zero_grids); |
| 454 | } | 454 | } |
| 455 | - neighbours.record_inter(sb_at, SIDE, true, true, block_ref(block)); | 455 | + neighbours.record_inter(sb_at, SIDE, block.skip, true, block_ref(block)); |
| 456 | record_block_compound(neighbours, (mi_r, mi_c), SIDE, block); | 456 | record_block_compound(neighbours, (mi_r, mi_c), SIDE, block); |
| 457 | SB128_NONE_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed); | 457 | SB128_NONE_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed); |
| 458 | if !block.skip { | 458 | if !block.skip { |