forge
Explore
Log in

Don't you dare go Hollow

stream: pin the band and chroma-rect sweep family to one frame each

Browse files at this commit

a2f865b2c603ae819734909d727697c14dc6586cAhmet Kaan GümüşParent: ae84402
Four gates, eight sites: the 4:1/sub8 rect-chroma gate, the excluded-seed-46
chroma-rect gate, the seed-46 band stream gate, and the frame-edge-partition-bit
gate. The first three encode through rectchroma_stream or its byte-identical
inline twin -- 'duration=0.04:rate=25' rendered with '-t 0.04', one frame, no
'--limit' -- and the fourth renders with '-t 1' AND '-vframes 1'. One assert
per gate sits above the depth branch, so it covers both the 8-bit and the
10-bit site.

count-vacuity sweep: 13 unpinned -> 5.
crates/ec-av1/src/stream.rsmodified+33 -0
@@ -42085,6 +42085,15 @@ pub(crate) mod tests {
4208542085 }
4208642086 let rect4_now = (crate::decode::sb_rect4_horz_hits() - rect4_before.0)
4208742087 + (crate::decode::sb_rect4_vert_hits() - rect4_before.1);
42088+ // The ENCODE's frame count: `rectchroma_stream` (42059) renders
42089+ // `duration=0.04:rate=25` (42082) with `-t 0.04` (42094) -- one
42090+ // frame -- and its aomenc runs with no `--limit`, so every
42091+ // attempt's stream codes exactly 1 frame at both depths.
42092+ assert_eq!(
42093+ frames.len(),
42094+ 1,
42095+ "{NAME}: {bit_depth}-bit cq {cq} seed {seed} key frame"
42096+ );
4208842097 let reference = if bit_depth == 10 {
4208942098 ffmpeg_decode_sequence_10bit(&stream, width, height, frames.len())
4209042099 } else {
@@ -42322,6 +42331,11 @@ pub(crate) mod tests {
4232242331 let stream = rectchroma_stream(bit_depth, 32, 4, width, height);
4232342332 let frames = decode_stream(&stream)
4232442333 .unwrap_or_else(|e| panic!("{NAME}: {bit_depth}-bit seed 46 refused: {e}"));
42334+ // The ENCODE's frame count: `rectchroma_stream` (42059) renders
42335+ // `duration=0.04:rate=25` (42082) with `-t 0.04` (42094) -- one frame
42336+ // -- and its aomenc runs with no `--limit`, so the stream codes
42337+ // exactly 1 frame at both depths. Asserted ABOVE the oracle call.
42338+ assert_eq!(frames.len(), 1, "{NAME}: {bit_depth}-bit seed 46 key frame");
4232542339 let reference = if bit_depth == 10 {
4232642340 ffmpeg_decode_sequence_10bit(&stream, width, height, frames.len())
4232742341 } else {
@@ -42491,6 +42505,15 @@ pub(crate) mod tests {
4249142505 }
4249242506 Ok(frames) => frames,
4249342507 };
42508+ // The ENCODE's frame count: `duration=0.04:rate=25` (42263) is
42509+ // one frame and `-t 0.04` (42277) caps the y4m there, and aomenc
42510+ // runs with no `--limit` -- so every arm (both depths, all 10
42511+ // seeds) codes exactly 1 frame. Asserted ABOVE the oracle call.
42512+ assert_eq!(
42513+ frames.len(),
42514+ 1,
42515+ "{NAME}: {bit_depth}-bit seed {seed} key frame"
42516+ );
4249442517 let reference = if bit_depth == 10 {
4249542518 ffmpeg_decode_sequence_10bit(&stream, width, height, frames.len())
4249642519 } else {
@@ -42700,6 +42723,16 @@ pub(crate) mod tests {
4270042723 };
4270142724 let hits = crate::decode::edge_part_hits();
4270242725 let skip_split_tx = crate::decode::skip_split_tx_hits();
42726+ // The ENCODE's frame count: `-t 1` AND `-vframes 1` (42490)
42727+ // cap the y4m at one frame and aomenc is given that one frame
42728+ // with no `--limit`, so every arm's stream holds exactly 1
42729+ // coded frame. Asserted ABOVE the oracle call so a decode that
42730+ // dropped it reds naming the encode.
42731+ assert_eq!(
42732+ frames.len(),
42733+ 1,
42734+ "{NAME}: {width}x{height} depth={depth} key frame"
42735+ );
4270342736 let ffmpeg_frames = if depth == 10 {
4270442737 ffmpeg_decode_sequence_10bit(&stream, width, height, frames.len())
4270542738 } else {