Skip to content

Commit

Permalink
added tests for more coverage on av1
Browse files Browse the repository at this point in the history
  • Loading branch information
philipch07 committed Jan 11, 2025
1 parent 83e0d1d commit 29a1175
Show file tree
Hide file tree
Showing 2 changed files with 1,027 additions and 80 deletions.
27 changes: 27 additions & 0 deletions crates/av1/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,33 @@ mod tests {
"#);
}

#[test]
fn test_config_demux_with_initial_presentation_delay() {
let data = b"\x81\r\x0c\x3f\n\x0f\0\0\0j\xef\xbf\xe1\xbc\x02\x19\x90\x10\x10\x10@".to_vec();

let config = AV1CodecConfigurationRecord::demux(&mut io::Cursor::new(data.into())).unwrap();

insta::assert_debug_snapshot!(config, @r#"
AV1CodecConfigurationRecord {
marker: true,
version: 1,
seq_profile: 0,
seq_level_idx_0: 13,
seq_tier_0: false,
high_bitdepth: false,
twelve_bit: false,
monochrome: false,
chroma_subsampling_x: true,
chroma_subsampling_y: true,
chroma_sample_position: 0,
initial_presentation_delay_minus_one: Some(
15,
),
config_obu: b"\n\x0f\0\0\0j\xef\xbf\xe1\xbc\x02\x19\x90\x10\x10\x10@",
}
"#);
}

#[test]
fn test_config_mux() {
let config = AV1CodecConfigurationRecord {
Expand Down
Loading

0 comments on commit 29a1175

Please sign in to comment.