diff mbox series

[FFmpeg-devel,02/17] fate/mxf: Add ProRes remux test

Message ID AM7PR03MB66607A0EF9D0665BAA15258B8F929@AM7PR03MB6660.eurprd03.prod.outlook.com
State New
Headers show
Series [FFmpeg-devel,01/17] avformat/mxfenc: Auto-insert h264_mp4toannexb BSF if needed | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Nov. 9, 2021, 6:01 p.m. UTC
Also covers writing mastering display metadata.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 tests/fate/mxf.mak                  | 17 ++++++--
 tests/ref/fate/mxf-remux-applehdr10 | 68 +++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100644 tests/ref/fate/mxf-remux-applehdr10

Comments

Tomas Härdin Nov. 9, 2021, 9:07 p.m. UTC | #1
tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt:
> Also covers writing mastering display metadata.

So you're merging the D-10 user comments test and ProRes remuxing? What
about remuxing D-10?

/Tomas
Andreas Rheinhardt Nov. 9, 2021, 9:11 p.m. UTC | #2
Tomas Härdin:
> tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt:
>> Also covers writing mastering display metadata.
> 
> So you're merging the D-10 user comments test and ProRes remuxing? What
> about remuxing D-10?
> 

No, I am adding a new test; the old test is still there. And both of the
mxf-d10-user-comments as well as mxf-remux-applehdr10 have a set of
common prerequisites (file and pipe protocols, mxf demuxer, framecrc
muxer), so I wanted to factor that out and did it wrong: Instead of
"FATE_MXF_FFMPEG_FFPROBE-$(call ALLYES, DVVIDEO_DECODER SCALE_FILTER" it
should be "FATE_MXF_REMUX_PROBE-$(call ALLYES, DVVIDEO_DECODER
SCALE_FILTER".

- Andreas
diff mbox series

Patch

diff --git a/tests/fate/mxf.mak b/tests/fate/mxf.mak
index 3a1096176f..f96f4a429b 100644
--- a/tests/fate/mxf.mak
+++ b/tests/fate/mxf.mak
@@ -37,6 +37,11 @@  FATE_MXF_PROBE-$(call ENCDEC2, PRORES, PCM_S24LE, MXF) += fate-mxf-probe-applehd
 fate-mxf-probe-applehdr10: SRC = $(TARGET_SAMPLES)/mxf/Meridian-Apple_ProResProxy-HDR10.mxf
 fate-mxf-probe-applehdr10: CMD = run $(PROBE_FORMAT_STREAMS_COMMAND) -i "$(SRC)" | sed -e "s/yuv422p10../yuv422p10/"
 
+# Tests remuxing ProRes as well as writing mastering display metadata.
+FATE_MXF_REMUX_PROBE-$(call ALLYES, PRORES_DECODER MXF_MUXER) \
+                                    += fate-mxf-remux-applehdr10
+fate-mxf-remux-applehdr10: CMD = transcode mxf $(TARGET_SAMPLES)/mxf/Meridian-Apple_ProResProxy-HDR10.mxf mxf "-map 0 -c copy" "-c copy -t 0.3" "" "-show_entries format_tags:stream_side_data_list:stream=index,codec_name,codec_tag:stream_tags"
+
 FATE_MXF_REEL_NAME-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += fate-mxf-reel_name
 fate-mxf-reel_name: $(SAMPLES)/mxf/Sony-00001.mxf
 fate-mxf-reel_name: CMD = md5 -y -i $(TARGET_SAMPLES)/mxf/Sony-00001.mxf  -c copy -timecode 00:00:00:00 -metadata "reel_name=test_reel" -fflags +bitexact -f mxf
@@ -45,7 +50,10 @@  FATE_MXF_USER_COMMENTS-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += fate-mxf-u
 fate-mxf-user-comments: $(SAMPLES)/mxf/Sony-00001.mxf
 fate-mxf-user-comments: CMD = md5 -y -i $(TARGET_SAMPLES)/mxf/Sony-00001.mxf -c copy -metadata "comment_test=value" -fflags +bitexact -f mxf
 
-FATE_MXF_D10_USER_COMMENTS-$(call ALLYES, FILE_PROTOCOL MXF_DEMUXER DVVIDEO_DECODER SCALE_FILTER MPEG2VIDEO_ENCODER MXF_D10_MUXER EXTRACT_EXTRADATA_BSF MPEGVIDEO_PARSER PIPE_PROTOCOL FRAMECRC_MUXER) += fate-mxf-d10-user-comments
+FATE_MXF_FFMPEG_FFPROBE-$(call ALLYES, DVVIDEO_DECODER SCALE_FILTER            \
+                                       MPEG2VIDEO_ENCODER MXF_D10_MUXER        \
+                                       EXTRACT_EXTRADATA_BSF MPEGVIDEO_PARSER) \
+                                       += fate-mxf-d10-user-comments
 fate-mxf-d10-user-comments: CMD = transcode mxf $(TARGET_SAMPLES)/mxf/Avid-00005.mxf mxf_d10 "-c:v mpeg2video -b:v 30000k -minrate:v 30000k -maxrate:v 30000k -bufsize:v 30000k -rc_init_occupancy 30000k -vf scale=w=1280:h=720 -an -metadata comment_test=value -metadata company_name=FATE-company -metadata product_name=FATE-test -metadata product_version=3.14159 -store_user_comments 1" "-c copy -frames:v 5" "" "-show_entries format_tags"
 
 FATE_MXF_OPATOM_USER_COMMENTS-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += fate-mxf-opatom-user-comments
@@ -53,10 +61,13 @@  fate-mxf-opatom-user-comments: $(SAMPLES)/mxf/Sony-00001.mxf
 fate-mxf-opatom-user-comments: CMD = md5 -y -i $(TARGET_SAMPLES)/mxf/Sony-00001.mxf -an -vcodec copy -metadata "comment_test=value" -fflags +bitexact -f mxf_opatom
 
 FATE_MXF-$(CONFIG_MXF_DEMUXER) += $(FATE_MXF)
+FATE_MXF_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL MXF_DEMUXER     \
+                                       PIPE_PROTOCOL FRAMECRC_MUXER) \
+                                       += $(FATE_MXF_REMUX_PROBE-yes)
 
 FATE_SAMPLES_AVCONV += $(FATE_MXF-yes) $(FATE_MXF_REEL_NAME-yes)
 FATE_SAMPLES_AVCONV += $(FATE_MXF_USER_COMMENTS-yes) $(FATE_MXF_OPATOM_USER_COMMENTS-yes)
-FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_MXF_D10_USER_COMMENTS-yes)
+FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_MXF_FFMPEG_FFPROBE-yes)
 FATE_SAMPLES_FFPROBE += $(FATE_MXF_PROBE-yes)
 
-fate-mxf: $(FATE_MXF-yes) $(FATE_MXF_PROBE-yes) $(FATE_MXF_REEL_NAME-yes) $(FATE_MXF_USER_COMMENTS-yes) $(FATE_MXF_D10_USER_COMMENTS-yes) $(FATE_MXF_OPATOM_USER_COMMENTS-yes)
+fate-mxf: $(FATE_MXF-yes) $(FATE_MXF_PROBE-yes) $(FATE_MXF_REEL_NAME-yes) $(FATE_MXF_USER_COMMENTS-yes) $(FATE_MXF_FFMPEG_FFPROBE-yes) $(FATE_MXF_OPATOM_USER_COMMENTS-yes)
diff --git a/tests/ref/fate/mxf-remux-applehdr10 b/tests/ref/fate/mxf-remux-applehdr10
new file mode 100644
index 0000000000..cc9ea1df6c
--- /dev/null
+++ b/tests/ref/fate/mxf-remux-applehdr10
@@ -0,0 +1,68 @@ 
+1b71f29a5c65646cdcc16f1311594113 *tests/data/fate/mxf-remux-applehdr10.mxf
+323641 tests/data/fate/mxf-remux-applehdr10.mxf
+#tb 0: 1001/60000
+#media_type 0: video
+#codec_id 0: prores
+#dimensions 0: 1280x720
+#sar 0: 1/1
+#tb 1: 1/48000
+#media_type 1: audio
+#codec_id 1: pcm_s24le
+#sample_rate 1: 48000
+#channel_layout 1: 4
+#channel_layout_name 1: mono
+0,          0,          0,        1,    57008, 0x43416399, S=1,       88
+1,          0,          0,      801,     2403, 0x00000000
+0,          1,          1,        1,    57248, 0xa06cd7b5
+1,        801,        801,      801,     2403, 0x00000000
+0,          2,          2,        1,    57200, 0x5623da10
+1,       1602,       1602,      800,     2400, 0x00000000
+1,       2402,       2402,      801,     2403, 0x00000000
+0,          3,          3,        1,    57152, 0x52d89d3f
+1,       3203,       3203,      801,     2403, 0x00000000
+0,          4,          4,        1,    56960, 0x431d5189
+[STREAM]
+index=0
+codec_name=prores
+codec_tag=0x6f637061
+TAG:file_package_umid=0x060A2B340101010501010D001300000000000000000000000000000000000001
+[SIDE_DATA]
+side_data_type=Mastering display metadata
+red_x=34000/50000
+red_y=16000/50000
+green_x=13250/50000
+green_y=34500/50000
+blue_x=7500/50000
+blue_y=3000/50000
+white_point_x=15635/50000
+white_point_y=16450/50000
+min_luminance=0/10000
+max_luminance=10000000/10000
+[/SIDE_DATA]
+[/STREAM]
+[STREAM]
+index=1
+codec_name=pcm_s24le
+codec_tag=0x0000
+TAG:file_package_umid=0x060A2B340101010501010D001300000000000000000000000000000000000001
+[/STREAM]
+[STREAM]
+index=2
+codec_name=pcm_s24le
+codec_tag=0x0000
+TAG:file_package_umid=0x060A2B340101010501010D001300000000000000000000000000000000000001
+[/STREAM]
+[FORMAT]
+TAG:operational_pattern_ul=060e2b34.04010101.0d010201.01010900
+TAG:uid=adab4424-2f25-4dc7-92ff-29bd000c0000
+TAG:generation_uid=adab4424-2f25-4dc7-92ff-29bd000c0001
+TAG:company_name=FFmpeg
+TAG:product_name=OP1a Muxer
+TAG:product_version_num=0.0.0.0.0
+TAG:product_version=0.0.0
+TAG:application_platform=Lavf
+TAG:product_uid=adab4424-2f25-4dc7-92ff-29bd000c0002
+TAG:toolkit_version_num=0.0.0.0.0
+TAG:material_package_umid=0x060A2B340101010501010D001300000000000000000000000000000000000000
+TAG:timecode=00:01:15;26
+[/FORMAT]