From 0bb37f280634b6da76a01585f55f2520b84514c7 Mon Sep 17 00:00:00 2001 From: Wang Hangjie Date: Thu, 12 Sep 2024 14:40:45 +0800 Subject: [PATCH] [ffmpeg-qsv] add av1e playback_seek test case Signed-off-by: Wang Hangjie --- lib/parameters.py | 2 ++ test/ffmpeg-qsv/encode/av1.py | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/lib/parameters.py b/lib/parameters.py index 99053e67..34fb1223 100755 --- a/lib/parameters.py +++ b/lib/parameters.py @@ -950,6 +950,8 @@ 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_av1_seek_parameters = gen_vp9_seek_parameters +gen_av1_seek_lp_parameters = gen_vp9_seek_lp_parameters def gen_av1_cqp_variants(spec, strapi=False): for case, params in spec.items(): diff --git a/test/ffmpeg-qsv/encode/av1.py b/test/ffmpeg-qsv/encode/av1.py index 7dfc0b6b..3586ebe5 100644 --- a/test/ffmpeg-qsv/encode/av1.py +++ b/test/ffmpeg-qsv/encode/av1.py @@ -144,6 +144,24 @@ def test_strapi(self, case, gop, bframes, tilecols, tilerows, bitrate, fps, qual self.init(spec, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality, profile) self.encode() +class seek(AV1EncoderTest): + 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_av1_seek_parameters(spec)) + def test(self, case, rcmode, bitrate, maxrate, fps, seek): + self.init(spec, case, rcmode, bitrate, maxrate, fps, seek) + self.encode() + class cqp_lp(AV1EncoderLPTest): def init(self, tspec, case, gop, bframes, tilecols, tilerows,qp, quality, profile): vars(self).update(tspec[case].copy()) @@ -276,3 +294,20 @@ def test_strapi(self, case, gop, bframes, tilecols, tilerows, bitrate, fps, qual self.init(spec, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality, profile) self.encode() +class seek_lp(AV1EncoderLPTest): + 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_av1_seek_lp_parameters(spec)) + def test(self, case, rcmode, bitrate, maxrate, fps, seek): + self.init(spec, case, rcmode, bitrate, maxrate, fps, seek) + self.encode()