test(probe): add HDR fixture coverage (#72)
This commit was merged in pull request #72.
This commit is contained in:
BIN
Binary file not shown.
Binary file not shown.
@@ -86,6 +86,28 @@ async fn hdr10_comes_from_the_transfer_function() {
|
|||||||
assert_eq!(file.media.hdr, HdrFormat::Hdr10);
|
assert_eq!(file.media.hdr, HdrFormat::Hdr10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tokio::test]
|
||||||
|
async fn hlg_comes_from_the_transfer_function() {
|
||||||
|
let file = Prober::new()
|
||||||
|
.probe(fixture("hlg-720p.mkv"))
|
||||||
|
.await
|
||||||
|
.expect("the fixture is readable");
|
||||||
|
|
||||||
|
assert_eq!(file.video_codec, "hevc");
|
||||||
|
assert_eq!(file.media.hdr, HdrFormat::Hlg);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[tokio::test]
|
||||||
|
async fn ten_bit_hevc_without_hdr_transfer_is_sdr() {
|
||||||
|
let file = Prober::new()
|
||||||
|
.probe(fixture("sdr-10bit-hevc-720p.mkv"))
|
||||||
|
.await
|
||||||
|
.expect("the fixture is readable");
|
||||||
|
|
||||||
|
assert_eq!(file.video_codec, "hevc");
|
||||||
|
assert_eq!(file.media.hdr, HdrFormat::Sdr);
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn dolby_vision_profile_5_is_reported_as_a_number() {
|
async fn dolby_vision_profile_5_is_reported_as_a_number() {
|
||||||
let file = Prober::new()
|
let file = Prober::new()
|
||||||
|
|||||||
@@ -55,6 +55,20 @@ ffmpeg -hide_banner -loglevel error -y \
|
|||||||
-c:v libx265 -preset ultrafast -crf 51 \
|
-c:v libx265 -preset ultrafast -crf 51 \
|
||||||
"$out/hdr10-2160p.mkv"
|
"$out/hdr10-2160p.mkv"
|
||||||
|
|
||||||
|
# HLG and SDR both use HEVC here so transfer function, rather than codec bit
|
||||||
|
# depth, is what distinguishes their probe results.
|
||||||
|
ffmpeg -hide_banner -loglevel error -y \
|
||||||
|
-f lavfi -i "color=c=black:s=1280x720:r=24:d=1" -an \
|
||||||
|
-vf "format=yuv420p10le,setparams=color_primaries=bt2020:color_trc=arib-std-b67:colorspace=bt2020nc" \
|
||||||
|
-c:v libx265 -preset ultrafast -crf 51 \
|
||||||
|
"$out/hlg-720p.mkv"
|
||||||
|
|
||||||
|
ffmpeg -hide_banner -loglevel error -y \
|
||||||
|
-f lavfi -i "color=c=black:s=1280x720:r=24:d=1" -an \
|
||||||
|
-vf "format=yuv420p10le" \
|
||||||
|
-c:v libx265 -preset ultrafast -crf 51 \
|
||||||
|
"$out/sdr-10bit-hevc-720p.mkv"
|
||||||
|
|
||||||
# HEVC base layer for the two Dolby Vision clips.
|
# HEVC base layer for the two Dolby Vision clips.
|
||||||
ffmpeg -hide_banner -loglevel error -y \
|
ffmpeg -hide_banner -loglevel error -y \
|
||||||
-f lavfi -i "color=c=black:s=1280x720:r=24:d=1" -an \
|
-f lavfi -i "color=c=black:s=1280x720:r=24:d=1" -an \
|
||||||
|
|||||||
Reference in New Issue
Block a user