stream: pin the restoration sweep and edge32_gate, whose spec is a parameter
Browse files at this commitae84402d7b36747c4cd21b47ce3b63f0b0eec43eParent: f9d88f71 changed file +20 -0
- crates/ec-av1/src/stream.rs +20 -0
crates/ec-av1/src/stream.rsmodified+20 -0
| @@ -30759,6 +30759,12 @@ pub(crate) mod tests { | |||
| 30759 | // r4: the pixel filters are wired -- every `uses_lr` | 30759 | // r4: the pixel filters are wired -- every `uses_lr` |
| 30760 | // frame must now decode Ok AND match an independent | 30760 | // frame must now decode Ok AND match an independent |
| 30761 | // decoder pixel-exact, not just refuse cleanly. | 30761 | // decoder pixel-exact, not just refuse cleanly. |
| 30762 | + // The ENCODE's frame count: every `EC_FISTRIP_SRC` branch | ||
| 30763 | + // and the `gradients_source` default (30568-30573) render at | ||
| 30764 | + // `rate=25` with a 1-frame `duration=0.04`, and aomenc runs | ||
| 30765 | + // with no `--limit` (30590) -- so each attempt's stream codes | ||
| 30766 | + // exactly 1 frame. Asserted ABOVE the oracle call. | ||
| 30767 | + assert_eq!(pics.len(), 1, "{NAME}: seed {seed} key frame"); | ||
| 30762 | let reference = ffmpeg_decode_sequence(&stream, width, height, pics.len()); | 30768 | let reference = ffmpeg_decode_sequence(&stream, width, height, pics.len()); |
| 30763 | let mismatched = pics | 30769 | let mismatched = pics |
| 30764 | .iter() | 30770 | .iter() |
| @@ -38337,6 +38343,20 @@ pub(crate) mod tests { | |||
| 38337 | }; | 38343 | }; |
| 38338 | let after = crate::decode::edge32_hits(); | 38344 | let after = crate::decode::edge32_hits(); |
| 38339 | let delta: Vec<usize> = (0..8).map(|i| after[i] - before[i]).collect(); | 38345 | let delta: Vec<usize> = (0..8).map(|i| after[i] - before[i]).collect(); |
| 38346 | + // The ENCODE's frame count, and it is PER ARM: the arm tuple's | ||
| 38347 | + // `frame_count` field is what the y4m is built from | ||
| 38348 | + // (`duration = frame_count / 25.0`, 38085, rendered with | ||
| 38349 | + // `-t {duration}` at 38131) and this gate's aomenc carries no | ||
| 38350 | + // `--limit` and no `--lag-in-frames`, so the stream codes exactly | ||
| 38351 | + // `frame_count` frames (1 for the intra arms, 5 for the | ||
| 38352 | + // inter/straddling ones). Asserted ABOVE the oracle call, so a | ||
| 38353 | + // decode that dropped one reds naming the encode. | ||
| 38354 | + assert_eq!( | ||
| 38355 | + decoded.len(), | ||
| 38356 | + frame_count, | ||
| 38357 | + "{name}: {tag}: the encode codes {frame_count} frame(s), the decode showed {}", | ||
| 38358 | + decoded.len() | ||
| 38359 | + ); | ||
| 38340 | let reference = if ten_bit { | 38360 | let reference = if ten_bit { |
| 38341 | ffmpeg_decode_sequence_10bit(&stream, width, height, decoded.len()) | 38361 | ffmpeg_decode_sequence_10bit(&stream, width, height, decoded.len()) |
| 38342 | } else { | 38362 | } else { |