From 3f65c05853862456f766260d895a2d70aa30e1c2 Mon Sep 17 00:00:00 2001 From: Wang Hangjie Date: Sun, 22 Sep 2024 22:12:38 -0700 Subject: [PATCH] [ffmpeg-qsv] add jpeg encode playback_seek test case Signed-off-by: Wang Hangjie --- lib/parameters.py | 1 + test/ffmpeg-qsv/encode/jpeg.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/lib/parameters.py b/lib/parameters.py index 99053e67..e79d1cdb 100755 --- a/lib/parameters.py +++ b/lib/parameters.py @@ -950,6 +950,7 @@ def gen_vp9_seek_lp_parameters(spec): gen_avc_seek_parameters = gen_vp9_seek_parameters gen_avc_seek_lp_parameters = gen_vp9_seek_lp_parameters +gen_jpeg_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/jpeg.py b/test/ffmpeg-qsv/encode/jpeg.py index fae31c7c..1678daae 100644 --- a/test/ffmpeg-qsv/encode/jpeg.py +++ b/test/ffmpeg-qsv/encode/jpeg.py @@ -31,3 +31,21 @@ def test_r2r(self, case, quality): self.init(spec_r2r, case, quality) vars(self).setdefault("r2r", 5) self.encode() + +class seek(JPEGEncoderTest): + 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_jpeg_seek_parameters(spec)) + def test(self, case, rcmode, bitrate, maxrate, fps, seek): + self.init(spec, case, rcmode, bitrate, maxrate, fps, seek) + self.encode()