diff mbox series

[FFmpeg-devel,2/3] fate/ffmpeg: add a second, simple sub2video test

Message ID 20200311234244.28303-2-jeebjp@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,1/3] ffmpeg: explicitly handle sub2video subpicture initialization | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Jan Ekström March 11, 2020, 11:42 p.m. UTC
---
 tests/fate/ffmpeg.mak          |  9 ++++
 tests/ref/fate/sub2video_basic | 95 ++++++++++++++++++++++++++++++++++
 2 files changed, 104 insertions(+)
 create mode 100644 tests/ref/fate/sub2video_basic

Comments

Jan Ekström March 11, 2020, 11:50 p.m. UTC | #1
On Thu, Mar 12, 2020 at 1:42 AM Jan Ekström <jeebjp@gmail.com> wrote:
>
> ---
>  tests/fate/ffmpeg.mak          |  9 ++++
>  tests/ref/fate/sub2video_basic | 95 ++++++++++++++++++++++++++++++++++
>  2 files changed, 104 insertions(+)
>  create mode 100644 tests/ref/fate/sub2video_basic
>

Before the logic affecting patch, this test could be executed and it
would output the same amount of packets, but it would force the PTS
and DTS of the first packet to be zero.

The diff would be as follows from before to after:
-0,          0,          0,        1,  1382400, 0x00000000
+0,       3312,       3312,        1,  1382400, 0x00000000

Best regards,
Jan
diff mbox series

Patch

diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak
index 967150983a..835aab3665 100644
--- a/tests/fate/ffmpeg.mak
+++ b/tests/fate/ffmpeg.mak
@@ -56,6 +56,15 @@  fate-sub2video: CMD = framecrc \
   -filter_complex "sws_flags=+accurate_rnd+bitexact\;[0:0]scale=720:480[v]\;[v][1:0]overlay[v2]" \
   -map "[v2]" -c:v rawvideo -map 1:s -c:s dvdsub
 
+# Very basic sub2video example, decode and convert to AVFrame with sub2video.
+# Attempt to not touch timestamps.
+FATE_SAMPLES_FFMPEG-$(call ALLYES, VOBSUB_DEMUXER DVDSUB_DECODER AVFILTER) += fate-sub2video_basic
+fate-sub2video_basic: CMD = framecrc \
+  -i $(TARGET_SAMPLES)/sub/vobsub.idx \
+  -vsync passthrough -copyts \
+  -filter_complex "sws_flags=+accurate_rnd+bitexact\;[0:s:0]scale" \
+  -c:v rawvideo
+
 FATE_FFMPEG-$(call ALLYES, PCM_S16LE_DEMUXER PCM_S16LE_MUXER PCM_S16LE_DECODER PCM_S16LE_ENCODER) += fate-unknown_layout-pcm
 fate-unknown_layout-pcm: $(AREF)
 fate-unknown_layout-pcm: CMD = md5 \
diff --git a/tests/ref/fate/sub2video_basic b/tests/ref/fate/sub2video_basic
new file mode 100644
index 0000000000..5f72e292c9
--- /dev/null
+++ b/tests/ref/fate/sub2video_basic
@@ -0,0 +1,95 @@ 
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 720x480
+#sar 0: 0/1
+0,       3312,       3312,        1,  1382400, 0x00000000
+0,       3312,       3312,        1,  1382400, 0x8c93c2ba
+0,       3436,       3436,        1,  1382400, 0x00000000
+0,       3684,       3684,        1,  1382400, 0xb02e32ca
+0,       3802,       3802,        1,  1382400, 0x00000000
+0,       4520,       4520,        1,  1382400, 0x83b71116
+0,       4584,       4584,        1,  1382400, 0x00000000
+0,       4586,       4586,        1,  1382400, 0x85547fd1
+0,       4645,       4645,        1,  1382400, 0x00000000
+0,       4648,       4648,        1,  1382400, 0x00000000
+0,       4648,       4648,        1,  1382400, 0xb6a8f181
+0,       4715,       4715,        1,  1382400, 0x00000000
+0,       4717,       4717,        1,  1382400, 0xb64d1a2c
+0,       4748,       4748,        1,  1382400, 0x00000000
+0,       4750,       4750,        1,  1382400, 0x7b37ecf3
+0,       4792,       4792,        1,  1382400, 0x00000000
+0,       4993,       4993,        1,  1382400, 0xdc025bd1
+0,       5027,       5027,        1,  1382400, 0x00000000
+0,       5029,       5029,        1,  1382400, 0x688b294d
+0,       5068,       5068,        1,  1382400, 0x00000000
+0,       5070,       5070,        1,  1382400, 0xa2b33d1b
+0,       5117,       5117,        1,  1382400, 0x00000000
+0,       5119,       5119,        1,  1382400, 0xb3e525e3
+0,       5168,       5168,        1,  1382400, 0x00000000
+0,       5170,       5170,        1,  1382400, 0xaa8fbdd7
+0,       5216,       5216,        1,  1382400, 0x00000000
+0,       5218,       5218,        1,  1382400, 0x7b7f26dd
+0,       5249,       5249,        1,  1382400, 0x00000000
+0,       5251,       5251,        1,  1382400, 0x15e2f836
+0,       5289,       5289,        1,  1382400, 0x00000000
+0,       5291,       5291,        1,  1382400, 0x0fee9b0c
+0,       5358,       5358,        1,  1382400, 0x00000000
+0,       5360,       5360,        1,  1382400, 0x89d62791
+0,       5429,       5429,        1,  1382400, 0x00000000
+0,       5431,       5431,        1,  1382400, 0xa6a9fd74
+0,       5490,       5490,        1,  1382400, 0x00000000
+0,       5491,       5491,        1,  1382400, 0x7896178d
+0,       5537,       5537,        1,  1382400, 0x00000000
+0,       5588,       5588,        1,  1382400, 0x01751a52
+0,       5647,       5647,        1,  1382400, 0x00000000
+0,       5688,       5688,        1,  1382400, 0xa3959c6f
+0,       5770,       5770,        1,  1382400, 0x00000000
+0,       5772,       5772,        1,  1382400, 0x3d3ea47b
+0,       5826,       5826,        1,  1382400, 0x00000000
+0,       5828,       5828,        1,  1382400, 0x593f8b24
+0,       5931,       5931,        1,  1382400, 0x00000000
+0,       5933,       5933,        1,  1382400, 0x171f05ba
+0,       6001,       6001,        1,  1382400, 0x00000000
+0,       6003,       6003,        1,  1382400, 0xb014cdf1
+0,       6054,       6054,        1,  1382400, 0x00000000
+0,       6839,       6839,        1,  1382400, 0xd918e667
+0,       6880,       6880,        1,  1382400, 0x00000000
+0,       7386,       7386,        1,  1382400, 0xc9406331
+0,       7419,       7419,        1,  1382400, 0x00000000
+0,       7501,       7501,        1,  1382400, 0xaf08b10d
+0,       7549,       7549,        1,  1382400, 0x00000000
+0,       7551,       7551,        1,  1382400, 0x00000000
+0,       7551,       7551,        1,  1382400, 0x853a9d93
+0,       7589,       7589,        1,  1382400, 0x00000000
+0,       7605,       7605,        1,  1382400, 0x7491a87d
+0,       7647,       7647,        1,  1382400, 0x00000000
+0,       7649,       7649,        1,  1382400, 0xf7383c58
+0,       7697,       7697,        1,  1382400, 0x00000000
+0,       7699,       7699,        1,  1382400, 0xe66be411
+0,       7743,       7743,        1,  1382400, 0x00000000
+0,       8032,       8032,        1,  1382400, 0xd6850362
+0,       8082,       8082,        1,  1382400, 0x00000000
+0,       8084,       8084,        1,  1382400, 0x3e1ed109
+0,       8115,       8115,        1,  1382400, 0x00000000
+0,       8116,       8116,        1,  1382400, 0x39c1b7bd
+0,       8160,       8160,        1,  1382400, 0x00000000
+0,       8180,       8180,        1,  1382400, 0x35b85f2e
+0,       8207,       8207,        1,  1382400, 0x00000000
+0,       8209,       8209,        1,  1382400, 0x00000000
+0,       8209,       8209,        1,  1382400, 0x83f103e5
+0,       8247,       8247,        1,  1382400, 0x00000000
+0,       8249,       8249,        1,  1382400, 0xbc1ca9b3
+0,       8278,       8278,        1,  1382400, 0x00000000
+0,       8281,       8281,        1,  1382400, 0x94d4a51e
+0,       8321,       8321,        1,  1382400, 0x00000000
+0,       8323,       8323,        1,  1382400, 0xf88cdfde
+0,       8367,       8367,        1,  1382400, 0x00000000
+0,       8565,       8565,        1,  1382400, 0xdd51423b
+0,       8611,       8611,        1,  1382400, 0x00000000
+0,       8669,       8669,        1,  1382400, 0x08259fa4
+0,       8708,       8708,        1,  1382400, 0x00000000
+0,       8941,       8941,        1,  1382400, 0x1663fa34
+0,       8994,       8994,        1,  1382400, 0x00000000
+0,       8996,       8996,        1,  1382400, 0xda2ceb55
+0,       9027,       9027,        1,  1382400, 0x00000000