From 81662536d8d08a06542eab178a2bb6de222d4709 Mon Sep 17 00:00:00 2001 From: Wang Hangjie Date: Tue, 8 Oct 2024 01:09:17 -0700 Subject: [PATCH] [ffmpeg-qsv] add mpeg2 encode playback_seek test case Signed-off-by: Wang Hangjie --- lib/parameters.py | 1 + test/ffmpeg-qsv/encode/mpeg2.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/lib/parameters.py b/lib/parameters.py index a7a9accb..ae668858 100755 --- a/lib/parameters.py +++ b/lib/parameters.py @@ -965,6 +965,7 @@ def gen_vp9_seek_lp_parameters(spec): gen_avc_seek_lp_parameters = gen_vp9_seek_lp_parameters gen_av1_seek_parameters = gen_vp9_seek_parameters gen_av1_seek_lp_parameters = gen_vp9_seek_lp_parameters +gen_mpeg2_seek_parameters = gen_vp9_seek_parameters def gen_av1_cqp_variants(spec, strapi=False): for case, params in spec.items(): diff --git a/test/ffmpeg-qsv/encode/mpeg2.py b/test/ffmpeg-qsv/encode/mpeg2.py index 764f8652..5e96f4d2 100644 --- a/test/ffmpeg-qsv/encode/mpeg2.py +++ b/test/ffmpeg-qsv/encode/mpeg2.py @@ -33,3 +33,21 @@ def test_r2r(self, case, gop, bframes, qp, quality): self.init(spec_r2r, case, gop, bframes, qp, quality) vars(self).setdefault("r2r", 5) self.encode() + +class seek(MPEG2EncoderTest): + def init(self, tspec, case, rcmode, bitrate, maxrate, fps, seek): + vars(self).update(tspec[case].copy()) + vars(self).update( + case = case, + bitrate = bitrate, + maxrate = maxrate, + minrate = bitrate, + rcmode = rcmode, + fps = fps, + seek = seek, + ) + + @slash.parametrize(*gen_mpeg2_seek_parameters(spec)) + def test(self, case, rcmode, bitrate, maxrate, fps, seek): + self.init(spec, case, rcmode, bitrate, maxrate, fps, seek) + self.encode()