The deadzone monotonicity claim moves to the quantiser's own test
Browse files at this commit1ede5107de05f3b40a5806b838da6f116e377727Parent: 8435973- test
- the deadzone monotonicity claim moves to the quantiser's own test
- the RD pass decides every zeroing now, so a coded stream no longer tracks the deadzone
1 changed file +7 -14
- crates/ec-av1/src/encode.rs +7 -14
crates/ec-av1/src/encode.rsmodified+7 -14
| @@ -12748,20 +12748,13 @@ mod tests { | |||
| 12748 | previous = Some((encoded.stream.len(), quality)); | 12748 | previous = Some((encoded.stream.len(), quality)); |
| 12749 | } | 12749 | } |
| 12750 | 12750 | ||
| 12751 | - let mut previous = None; | 12751 | + // The deadzone half of this claim lives in |
| 12752 | - for &deadzone in &[0.5f64, 0.3, 0.15] { | 12752 | + // `transform::tests::a_wider_deadzone_codes_fewer_coefficients` now: |
| 12753 | - let encoded = encode_key_frame_with_ctx(&picture, 100, deadzone, fctx).unwrap(); | 12753 | + // with the rate-distortion pass ([`crate::tile::rdoq`]) deciding |
| 12754 | - let quality = psnr(&encoded.reconstruction.y, &picture.y); | 12754 | + // every zeroing, the deadzone no longer moves a coded stream |
| 12755 | - if let Some((bytes, better)) = previous { | 12755 | + // monotonically (the i64 + rdoq merge read 318 bytes at 0.3 against |
| 12756 | - assert!( | 12756 | + // fewer at 0.5 on this 128x128 card), and that is the pass doing its |
| 12757 | - encoded.stream.len() < bytes, | 12757 | + // job, not a quantiser defect. |
| 12758 | - "deadzone {deadzone}: {} bytes", | ||
| 12759 | - encoded.stream.len() | ||
| 12760 | - ); | ||
| 12761 | - assert!(quality < better, "deadzone {deadzone}: PSNR {quality}"); | ||
| 12762 | - } | ||
| 12763 | - previous = Some((encoded.stream.len(), quality)); | ||
| 12764 | - } | ||
| 12765 | 12758 | ||
| 12766 | // Bytes must not jump up across a q-context boundary: a wrong CDF | 12759 | // Bytes must not jump up across a q-context boundary: a wrong CDF |
| 12767 | // table for the far side would show up as a rate discontinuity here, | 12760 | // table for the far side would show up as a rate discontinuity here, |