Commit 563fc58264 for ffmpeg

commit 563fc5826470586849148ff1b61dd20e70379d4f
Author: Romain Beauxis <romain.beauxis@gmail.com>
Date:   Thu Dec 3 00:29:13 2026 -0600

    tests/fate/mov: test seeks with the pre-roll on recovery points

    The key sample before the target is an H.264 recovery point from intra
    refresh or a VVC GDR picture that recovers after the target, so the
    output starts late.

diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak
index bf9c6cc193..f6face433c 100644
--- a/tests/fate/mov.mak
+++ b/tests/fate/mov.mak
@@ -263,6 +263,35 @@ fate-mov-opus-timescale1000-trim: CMD = framecrc -i $(TARGET_SAMPLES)/mov/opus-t
 fate-mov-opus-timescale32000-trim: CMD = framecrc -i $(TARGET_SAMPLES)/mov/opus-timescale32000-trim.mp4 -c copy
 fate-mov-ima-timescale1000-full: CMD = framecrc -i $(TARGET_SAMPLES)/mov/ima-timescale1000-full.mov -c copy

+# Seek with the pre-roll in H.264 with intra refresh: the key sample before
+# the target is a recovery point, the pictures decoded from it are whole 21
+# reference pictures later, after the target. A seek that lands on the
+# recovery point before it starts the output at the target.
+FATE_MOV_FFMPEG_SAMPLES-$(call REMUX, MP4 MOV, H264_DEMUXER H264_PARSER H264_DECODER EXTRACT_EXTRADATA_BSF RAWVIDEO_ENCODER) \
+                          += fate-mov-mp4-h264-intra-refresh-seek
+fate-mov-mp4-h264-intra-refresh-seek: CMD = transcode h264 $(TARGET_SAMPLES)/h264/intra_refresh.h264 mp4 "-c copy" "-frames:v 5" "" "" "-seek_flags preroll -ss 4.5"
+
+# The same seek with a recovery point SEI over 4096 bytes.
+FATE_MOV_SEI_USER_DATA := 0123456789abcdef
+$(foreach n,1 2 3 4 5 6 7 8,$(eval FATE_MOV_SEI_USER_DATA := $(FATE_MOV_SEI_USER_DATA)$(FATE_MOV_SEI_USER_DATA)))
+FATE_MOV_FFMPEG_SAMPLES-$(call REMUX, MP4 MOV, H264_DEMUXER H264_PARSER H264_DECODER EXTRACT_EXTRADATA_BSF H264_METADATA_BSF RAWVIDEO_ENCODER) \
+                          += fate-mov-mp4-h264-intra-refresh-seek-large-sei
+fate-mov-mp4-h264-intra-refresh-seek-large-sei: CMD = transcode h264 $(TARGET_SAMPLES)/h264/intra_refresh.h264 mp4 "-c copy -bsf:v h264_metadata=sei_user_data=dc45e9bde2d19e43dc45e9bde2d19e43+$(FATE_MOV_SEI_USER_DATA)" "-frames:v 2" "" "" "-seek_flags preroll -ss 4.5"
+
+# The same seek with two copies of the video track, to check that the second
+# track lands on the same key sample as the first one.
+FATE_MOV_FFMPEG_FFPROBE_SAMPLES-$(call REMUX, MP4 MOV, H264_DEMUXER H264_PARSER H264_DECODER EXTRACT_EXTRADATA_BSF RAWVIDEO_ENCODER) \
+                          += fate-mov-mp4-h264-intra-refresh-seek-two-tracks
+fate-mov-mp4-h264-intra-refresh-seek-two-tracks: CMD = transcode h264 $(TARGET_SAMPLES)/h264/intra_refresh.h264 mp4 "-map 0:v -map 0:v -c copy" "-map 0:v:1 -frames:v 2" "-seek_flags preroll -read_intervals 4.5%+\#4 -show_entries packet=stream_index,pts,flags -print_format compact" "" "-seek_flags preroll -ss 4.5"
+
+# Seek with the pre-roll in VVC with gradual decoding refresh: the GDR key
+# sample before the target recovers 51 pictures later, after the target. A
+# seek that lands on the GDR picture before it starts the output at the
+# target.
+FATE_MOV_FFMPEG_SAMPLES-$(call REMUX, MP4 MOV, VVC_DEMUXER VVC_PARSER VVC_DECODER SETTS_BSF SCALE_FILTER RAWVIDEO_ENCODER) \
+                          += fate-mov-mp4-vvc-gdr-seek
+fate-mov-mp4-vvc-gdr-seek: CMD = transcode vvc $(TARGET_SAMPLES)/vvc-conformance/GDR_B_2.bit mp4 "-c copy -bsf:v setts=ts=N/30/TB -video_track_timescale 30" "-pix_fmt yuv420p10le -vf scale -frames:v 2" "" "" "-seek_flags preroll -ss 3.3"
+
 FATE_MOV_FFMPEG_FFPROBE_SAMPLES-$(call REMUX, MP4 MOV, OGG_DEMUXER VORBIS_DECODER) \
                           += fate-mov-mp4-chapters
 fate-mov-mp4-chapters: CMD = transcode ogg $(TARGET_SAMPLES)/vorbis/vorbis_chapter_extension_demo.ogg mp4 "-c copy" "-c copy -t 0.1" "-show_chapters"
diff --git a/tests/ref/fate/mov-mp4-h264-intra-refresh-seek b/tests/ref/fate/mov-mp4-h264-intra-refresh-seek
new file mode 100644
index 0000000000..84d3f0f22f
--- /dev/null
+++ b/tests/ref/fate/mov-mp4-h264-intra-refresh-seek
@@ -0,0 +1,12 @@
+ffc8fe11d654e4b09676e7623c9ba175 *tests/data/fate/mov-mp4-h264-intra-refresh-seek.mp4
+547895 tests/data/fate/mov-mp4-h264-intra-refresh-seek.mp4
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 320x240
+#sar 0: 0/1
+0,         33,         33,        1,   115200, 0xee02e02d
+0,         36,         36,        1,   115200, 0xd2b2f951
+0,         37,         37,        1,   115200, 0x26b7fa89
+0,         38,         38,        1,   115200, 0x93fa0031
+0,         39,         39,        1,   115200, 0xde98de0d
diff --git a/tests/ref/fate/mov-mp4-h264-intra-refresh-seek-large-sei b/tests/ref/fate/mov-mp4-h264-intra-refresh-seek-large-sei
new file mode 100644
index 0000000000..35a43555f3
--- /dev/null
+++ b/tests/ref/fate/mov-mp4-h264-intra-refresh-seek-large-sei
@@ -0,0 +1,9 @@
+98b14db1ce1ed0c5e5a93a7efb47299e *tests/data/fate/mov-mp4-h264-intra-refresh-seek-large-sei.mp4
+593210 tests/data/fate/mov-mp4-h264-intra-refresh-seek-large-sei.mp4
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 320x240
+#sar 0: 0/1
+0,         33,         33,        1,   115200, 0xee02e02d
+0,         36,         36,        1,   115200, 0xd2b2f951
diff --git a/tests/ref/fate/mov-mp4-h264-intra-refresh-seek-two-tracks b/tests/ref/fate/mov-mp4-h264-intra-refresh-seek-two-tracks
new file mode 100644
index 0000000000..ec78f52b90
--- /dev/null
+++ b/tests/ref/fate/mov-mp4-h264-intra-refresh-seek-two-tracks
@@ -0,0 +1,13 @@
+80bf07df2b280516180d2a4e31d3c054 *tests/data/fate/mov-mp4-h264-intra-refresh-seek-two-tracks.mp4
+1099141 tests/data/fate/mov-mp4-h264-intra-refresh-seek-two-tracks.mp4
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 320x240
+#sar 0: 0/1
+0,         33,         33,        1,   115200, 0xee02e02d
+0,         36,         36,        1,   115200, 0xd2b2f951
+packet|stream_index=0|pts=4896000|flags=K__
+packet|stream_index=1|pts=4896000|flags=K__
+packet|stream_index=0|pts=4944000|flags=___
+packet|stream_index=1|pts=4944000|flags=___
diff --git a/tests/ref/fate/mov-mp4-vvc-gdr-seek b/tests/ref/fate/mov-mp4-vvc-gdr-seek
new file mode 100644
index 0000000000..64512cbbb3
--- /dev/null
+++ b/tests/ref/fate/mov-mp4-vvc-gdr-seek
@@ -0,0 +1,9 @@
+b97f12ce6912e0d7bf29af3e02468451 *tests/data/fate/mov-mp4-vvc-gdr-seek.mp4
+81012 tests/data/fate/mov-mp4-vvc-gdr-seek.mp4
+#tb 0: 1/30
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 416x240
+#sar 0: 0/1
+0,         12,         12,        1,   299520, 0xce45944c
+0,         13,         13,        1,   299520, 0xdb1f85fc