forge
Explore
Log in

Don't you dare go Hollow

The av1 encode row names the pyramid it coded under, hidden frames beside it

Browse files at this commit

5ad5e5cd1ed43a9779a1e6df5ae0e65578c02c31Ahmet Kaan GümüşParent: 3783121
  • feat
    • the av1 encode row names the pyramid it coded under, hidden frames beside it
Show full message
feat(bench): the av1 encode row names the pyramid it coded under, hidden frames beside it
tools/ec-bench/src/main.rsmodified+10 -1
@@ -405,6 +405,14 @@ fn bench_av1_encode(rows: &mut Vec<Row>) {
405 stream.extend_from_slice(&packet.data);405 stream.extend_from_slice(&packet.data);
406 }406 }
407 let wall = start.elapsed().as_secs_f64();407 let wall = start.elapsed().as_secs_f64();
408+ // What the content gate left this clip coding under: a screen-content
409+ // source asks for the pyramid and codes flat, and then `hidden` is 0 for
410+ // a reason the row itself names.
411+ let coded_under = match (pyramid, enc.pyramid()) {
412+ (_, Some(p)) => format!("pyramid {}:{}:{}", p.mini_gop, p.arf_q_offset, p.leaf_q_offset),
413+ (Some(_), None) => "flat (gated: screen content)".to_string(),
414+ (None, None) => "flat".to_string(),
415+ };
408 let media_s = n as f64 / 30.0;416 let media_s = n as f64 / 30.0;
409 let fps = if wall > 0.0 { f64::from(n) / wall } else { 0.0 };417 let fps = if wall > 0.0 { f64::from(n) / wall } else { 0.0 };
410 let bytes_per_frame = stream.len() as f64 / f64::from(n);418 let bytes_per_frame = stream.len() as f64 / f64::from(n);
@@ -412,7 +420,8 @@ fn bench_av1_encode(rows: &mut Vec<Row>) {
412 component: "ec-av1",420 component: "ec-av1",
413 direction: "encode",421 direction: "encode",
414 content: format!(422 content: format!(
415- "{w}x{h}, {n} frames, gop=10, {hidden} hidden, {fps:.1} fps, {bytes_per_frame:.0} B/frame"423+ "{w}x{h}, {n} frames, gop=10, {coded_under}, {hidden} hidden, {fps:.1} fps, \
424+ {bytes_per_frame:.0} B/frame"
416 ),425 ),
417 media: format!("{media_s:.1}s"),426 media: format!("{media_s:.1}s"),
418 wall_ms: wall * 1000.0,427 wall_ms: wall * 1000.0,