[FFmpeg-devel] [PATCH 29/29] tests/fate/matroska: add tests for side data preference

Anton Khirnov anton at khirnov.net
Mon Mar 4 15:06:44 EET 2024


Cf. #10857
---
 tests/fate/matroska.mak                       |   6 +
 tests/ref/fate/matroska-side-data-pref-codec  | 255 ++++++++++++++++++
 tests/ref/fate/matroska-side-data-pref-global | 255 ++++++++++++++++++
 3 files changed, 516 insertions(+)
 create mode 100644 tests/ref/fate/matroska-side-data-pref-codec
 create mode 100644 tests/ref/fate/matroska-side-data-pref-global

diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
index 9ab747184a..e9433ce730 100644
--- a/tests/fate/matroska.mak
+++ b/tests/fate/matroska.mak
@@ -264,6 +264,12 @@ FATE_MATROSKA_FFMPEG_FFPROBE-$(call REMUX, MATROSKA, VP9_PARSER) \
                                += fate-matroska-hdr10-plus-remux
 fate-matroska-hdr10-plus-remux: CMD = transcode webm $(TARGET_SAMPLES)/mkv/hdr10_plus_vp9_sample.webm matroska "-map 0 -c:v copy" "-map 0 -c:v copy" "-show_packets"
 
+fate-matroska-side-data-pref-codec: CMD = run ffprobe$(PROGSSUF)$(EXESUF) $(TARGET_SAMPLES)/mkv/hdr10tags-both.mkv \
+    -show_streams -show_frames -show_entries stream=stream_side_data:frame=frame_side_data_list
+fate-matroska-side-data-pref-global: CMD = run ffprobe$(PROGSSUF)$(EXESUF) $(TARGET_SAMPLES)/mkv/hdr10tags-both.mkv \
+    -show_streams -show_frames -show_entries stream=stream_side_data:frame=frame_side_data_list -side_data_prefer_global mastering_display_metadata,content_light_level
+FATE_MATROSKA_FFPROBE-$(call ALLYES MATROSKA_DEMUXER HEVC_DECODER) += fate-matroska-side-data-pref-codec fate-matroska-side-data-pref-global
+
 FATE_SAMPLES_AVCONV += $(FATE_MATROSKA-yes)
 FATE_SAMPLES_FFPROBE += $(FATE_MATROSKA_FFPROBE-yes)
 FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_MATROSKA_FFMPEG_FFPROBE-yes)
diff --git a/tests/ref/fate/matroska-side-data-pref-codec b/tests/ref/fate/matroska-side-data-pref-codec
new file mode 100644
index 0000000000..d27134d0c9
--- /dev/null
+++ b/tests/ref/fate/matroska-side-data-pref-codec
@@ -0,0 +1,255 @@
+[FRAME]
+[SIDE_DATA]
+side_data_type=H.26[45] User Data Unregistered SEI message
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=35400/50000
+red_y=14599/50000
+green_x=8500/50000
+green_y=39850/50000
+blue_x=6550/50000
+blue_y=2300/50000
+white_point_x=15634/50000
+white_point_y=16450/50000
+min_luminance=10/10000
+max_luminance=10000000/10000
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=35400/50000
+red_y=14599/50000
+green_x=8500/50000
+green_y=39850/50000
+blue_x=6550/50000
+blue_y=2300/50000
+white_point_x=15634/50000
+white_point_y=16450/50000
+min_luminance=10/10000
+max_luminance=10000000/10000
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=35400/50000
+red_y=14599/50000
+green_x=8500/50000
+green_y=39850/50000
+blue_x=6550/50000
+blue_y=2300/50000
+white_point_x=15634/50000
+white_point_y=16450/50000
+min_luminance=10/10000
+max_luminance=10000000/10000
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=35400/50000
+red_y=14599/50000
+green_x=8500/50000
+green_y=39850/50000
+blue_x=6550/50000
+blue_y=2300/50000
+white_point_x=15634/50000
+white_point_y=16450/50000
+min_luminance=10/10000
+max_luminance=10000000/10000
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=35400/50000
+red_y=14599/50000
+green_x=8500/50000
+green_y=39850/50000
+blue_x=6550/50000
+blue_y=2300/50000
+white_point_x=15634/50000
+white_point_y=16450/50000
+min_luminance=10/10000
+max_luminance=10000000/10000
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=35400/50000
+red_y=14599/50000
+green_x=8500/50000
+green_y=39850/50000
+blue_x=6550/50000
+blue_y=2300/50000
+white_point_x=15634/50000
+white_point_y=16450/50000
+min_luminance=10/10000
+max_luminance=10000000/10000
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=35400/50000
+red_y=14599/50000
+green_x=8500/50000
+green_y=39850/50000
+blue_x=6550/50000
+blue_y=2300/50000
+white_point_x=15634/50000
+white_point_y=16450/50000
+min_luminance=10/10000
+max_luminance=10000000/10000
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=35400/50000
+red_y=14599/50000
+green_x=8500/50000
+green_y=39850/50000
+blue_x=6550/50000
+blue_y=2300/50000
+white_point_x=15634/50000
+white_point_y=16450/50000
+min_luminance=10/10000
+max_luminance=10000000/10000
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=35400/50000
+red_y=14599/50000
+green_x=8500/50000
+green_y=39850/50000
+blue_x=6550/50000
+blue_y=2300/50000
+white_point_x=15634/50000
+white_point_y=16450/50000
+min_luminance=10/10000
+max_luminance=10000000/10000
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=35400/50000
+red_y=14599/50000
+green_x=8500/50000
+green_y=39850/50000
+blue_x=6550/50000
+blue_y=2300/50000
+white_point_x=15634/50000
+white_point_y=16450/50000
+min_luminance=10/10000
+max_luminance=10000000/10000
+[/SIDE_DATA]
+[/FRAME]
+[STREAM]
+DISPOSITION:default=1
+DISPOSITION:dub=0
+DISPOSITION:original=0
+DISPOSITION:comment=0
+DISPOSITION:lyrics=0
+DISPOSITION:karaoke=0
+DISPOSITION:forced=0
+DISPOSITION:hearing_impaired=0
+DISPOSITION:visual_impaired=0
+DISPOSITION:clean_effects=0
+DISPOSITION:attached_pic=0
+DISPOSITION:timed_thumbnails=0
+DISPOSITION:non_diegetic=0
+DISPOSITION:captions=0
+DISPOSITION:descriptions=0
+DISPOSITION:metadata=0
+DISPOSITION:dependent=0
+DISPOSITION:still_image=0
+TAG:BPS=216040
+TAG:BPS-eng=216040
+TAG:DURATION=00:00:00.400000000
+TAG:DURATION-eng=00:00:00.400000000
+TAG:NUMBER_OF_FRAMES=10
+TAG:NUMBER_OF_FRAMES-eng=10
+TAG:NUMBER_OF_BYTES=10802
+TAG:NUMBER_OF_BYTES-eng=10802
+TAG:_STATISTICS_WRITING_APP=mkvmerge v9.0.1 ('Mask Machine') 64bit
+TAG:_STATISTICS_WRITING_APP-eng=mkvmerge v9.0.1 ('Mask Machine') 64bit
+TAG:_STATISTICS_WRITING_DATE_UTC=2019-02-14 12:53:10
+TAG:_STATISTICS_WRITING_DATE_UTC-eng=2019-02-14 12:53:10
+TAG:_STATISTICS_TAGS=BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
+TAG:_STATISTICS_TAGS-eng=BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=11408507/16777216
+red_y=5368709/16777216
+green_x=2222981/8388608
+green_y=11576279/16777216
+blue_x=5033165/33554432
+blue_y=16106127/268435456
+white_point_x=10492471/33554432
+white_point_y=689963/2097152
+min_luminance=5368709/536870912
+max_luminance=1000/1
+[/SIDE_DATA]
+[/STREAM]
diff --git a/tests/ref/fate/matroska-side-data-pref-global b/tests/ref/fate/matroska-side-data-pref-global
new file mode 100644
index 0000000000..4ff0c2d9db
--- /dev/null
+++ b/tests/ref/fate/matroska-side-data-pref-global
@@ -0,0 +1,255 @@
+[FRAME]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=11408507/16777216
+red_y=5368709/16777216
+green_x=2222981/8388608
+green_y=11576279/16777216
+blue_x=5033165/33554432
+blue_y=16106127/268435456
+white_point_x=10492471/33554432
+white_point_y=689963/2097152
+min_luminance=5368709/536870912
+max_luminance=1000/1
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=H.26[45] User Data Unregistered SEI message
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=11408507/16777216
+red_y=5368709/16777216
+green_x=2222981/8388608
+green_y=11576279/16777216
+blue_x=5033165/33554432
+blue_y=16106127/268435456
+white_point_x=10492471/33554432
+white_point_y=689963/2097152
+min_luminance=5368709/536870912
+max_luminance=1000/1
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=11408507/16777216
+red_y=5368709/16777216
+green_x=2222981/8388608
+green_y=11576279/16777216
+blue_x=5033165/33554432
+blue_y=16106127/268435456
+white_point_x=10492471/33554432
+white_point_y=689963/2097152
+min_luminance=5368709/536870912
+max_luminance=1000/1
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=11408507/16777216
+red_y=5368709/16777216
+green_x=2222981/8388608
+green_y=11576279/16777216
+blue_x=5033165/33554432
+blue_y=16106127/268435456
+white_point_x=10492471/33554432
+white_point_y=689963/2097152
+min_luminance=5368709/536870912
+max_luminance=1000/1
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=11408507/16777216
+red_y=5368709/16777216
+green_x=2222981/8388608
+green_y=11576279/16777216
+blue_x=5033165/33554432
+blue_y=16106127/268435456
+white_point_x=10492471/33554432
+white_point_y=689963/2097152
+min_luminance=5368709/536870912
+max_luminance=1000/1
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=11408507/16777216
+red_y=5368709/16777216
+green_x=2222981/8388608
+green_y=11576279/16777216
+blue_x=5033165/33554432
+blue_y=16106127/268435456
+white_point_x=10492471/33554432
+white_point_y=689963/2097152
+min_luminance=5368709/536870912
+max_luminance=1000/1
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=11408507/16777216
+red_y=5368709/16777216
+green_x=2222981/8388608
+green_y=11576279/16777216
+blue_x=5033165/33554432
+blue_y=16106127/268435456
+white_point_x=10492471/33554432
+white_point_y=689963/2097152
+min_luminance=5368709/536870912
+max_luminance=1000/1
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=11408507/16777216
+red_y=5368709/16777216
+green_x=2222981/8388608
+green_y=11576279/16777216
+blue_x=5033165/33554432
+blue_y=16106127/268435456
+white_point_x=10492471/33554432
+white_point_y=689963/2097152
+min_luminance=5368709/536870912
+max_luminance=1000/1
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=11408507/16777216
+red_y=5368709/16777216
+green_x=2222981/8388608
+green_y=11576279/16777216
+blue_x=5033165/33554432
+blue_y=16106127/268435456
+white_point_x=10492471/33554432
+white_point_y=689963/2097152
+min_luminance=5368709/536870912
+max_luminance=1000/1
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[/FRAME]
+[FRAME]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=11408507/16777216
+red_y=5368709/16777216
+green_x=2222981/8388608
+green_y=11576279/16777216
+blue_x=5033165/33554432
+blue_y=16106127/268435456
+white_point_x=10492471/33554432
+white_point_y=689963/2097152
+min_luminance=5368709/536870912
+max_luminance=1000/1
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[/FRAME]
+[STREAM]
+DISPOSITION:default=1
+DISPOSITION:dub=0
+DISPOSITION:original=0
+DISPOSITION:comment=0
+DISPOSITION:lyrics=0
+DISPOSITION:karaoke=0
+DISPOSITION:forced=0
+DISPOSITION:hearing_impaired=0
+DISPOSITION:visual_impaired=0
+DISPOSITION:clean_effects=0
+DISPOSITION:attached_pic=0
+DISPOSITION:timed_thumbnails=0
+DISPOSITION:non_diegetic=0
+DISPOSITION:captions=0
+DISPOSITION:descriptions=0
+DISPOSITION:metadata=0
+DISPOSITION:dependent=0
+DISPOSITION:still_image=0
+TAG:BPS=216040
+TAG:BPS-eng=216040
+TAG:DURATION=00:00:00.400000000
+TAG:DURATION-eng=00:00:00.400000000
+TAG:NUMBER_OF_FRAMES=10
+TAG:NUMBER_OF_FRAMES-eng=10
+TAG:NUMBER_OF_BYTES=10802
+TAG:NUMBER_OF_BYTES-eng=10802
+TAG:_STATISTICS_WRITING_APP=mkvmerge v9.0.1 ('Mask Machine') 64bit
+TAG:_STATISTICS_WRITING_APP-eng=mkvmerge v9.0.1 ('Mask Machine') 64bit
+TAG:_STATISTICS_WRITING_DATE_UTC=2019-02-14 12:53:10
+TAG:_STATISTICS_WRITING_DATE_UTC-eng=2019-02-14 12:53:10
+TAG:_STATISTICS_TAGS=BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
+TAG:_STATISTICS_TAGS-eng=BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
+[SIDE_DATA]
+side_data_type=Content light level metadata
+max_content=1000
+max_average=300
+[/SIDE_DATA]
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=11408507/16777216
+red_y=5368709/16777216
+green_x=2222981/8388608
+green_y=11576279/16777216
+blue_x=5033165/33554432
+blue_y=16106127/268435456
+white_point_x=10492471/33554432
+white_point_y=689963/2097152
+min_luminance=5368709/536870912
+max_luminance=1000/1
+[/SIDE_DATA]
+[/STREAM]
-- 
2.43.0



More information about the ffmpeg-devel mailing list