From 903992afd72efae97d1518d9394109ae4113bfb9 Mon Sep 17 00:00:00 2001 From: Focus Luo Date: Fri, 23 Aug 2024 09:48:44 -0700 Subject: [PATCH] [strapi]ffmpeg-qsv hevc using consolidated strapi generators Signed-off-by: Focus Luo --- test/ffmpeg-qsv/encode/hevc.py | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/test/ffmpeg-qsv/encode/hevc.py b/test/ffmpeg-qsv/encode/hevc.py index c87fa4e8..90861ec1 100755 --- a/test/ffmpeg-qsv/encode/hevc.py +++ b/test/ffmpeg-qsv/encode/hevc.py @@ -7,6 +7,7 @@ from ....lib import * from ....lib.ffmpeg.qsv.util import * from ....lib.ffmpeg.qsv.encoder import HEVC8EncoderTest, HEVC8EncoderLPTest +from ....lib.ffmpeg.qsv.encoder import StringAPIEncoder spec = load_test_spec("hevc", "encode", "8bit") spec_r2r = load_test_spec("hevc", "encode", "8bit", "r2r") @@ -36,6 +37,13 @@ def test_r2r(self, case, gop, slices, bframes, qp, quality, profile): vars(self).setdefault("r2r", 5) self.encode() + @slash.requires(*have_ffmpeg_encoder_options("hevc_qsv", "qsv_params")) + @slash.parametrize(*gen_hevc_cqp_parameters(spec, ['main'], strapi=True)) + def test_strapi(self, case, gop, slices, bframes, qp, quality, profile): + self.EncoderClass = StringAPIEncoder + self.init(spec, case, gop, slices, bframes, qp, quality, profile) + self.encode() + class cqp_lp(HEVC8EncoderLPTest): def init(self, tspec, case, gop, slices, qp, quality, profile): vars(self).update(tspec[case].copy()) @@ -60,6 +68,13 @@ def test_r2r(self, case, gop, slices, qp, quality, profile): vars(self).setdefault("r2r", 5) self.encode() + @slash.requires(*have_ffmpeg_encoder_options("hevc_qsv", "qsv_params")) + @slash.parametrize(*gen_hevc_cqp_lp_parameters(spec, ['main'], strapi=True)) + def test_strapi(self, case, gop, slices, qp, quality, profile): + self.EncoderClass = StringAPIEncoder + self.init(spec, case, gop, slices, qp, quality, profile) + self.encode() + class cbr(HEVC8EncoderTest): def init(self, tspec, case, gop, slices, bframes, bitrate, fps, profile): vars(self).update(tspec[case].copy()) @@ -87,6 +102,13 @@ def test_r2r(self, case, gop, slices, bframes, bitrate, fps, profile): vars(self).setdefault("r2r", 5) self.encode() + @slash.requires(*have_ffmpeg_encoder_options("hevc_qsv", "qsv_params")) + @slash.parametrize(*gen_hevc_cbr_parameters(spec, ['main'], strapi=True)) + def test_strapi(self, case, gop, slices, bframes, bitrate, fps, profile): + self.EncoderClass = StringAPIEncoder + self.init(spec, case, gop, slices, bframes, bitrate, fps, profile) + self.encode() + class cbr_lp(HEVC8EncoderLPTest): def init(self, tspec, case, gop, slices, bitrate, fps, profile): vars(self).update(tspec[case].copy()) @@ -113,6 +135,13 @@ def test_r2r(self, case, gop, slices, bitrate, fps, profile): vars(self).setdefault("r2r", 5) self.encode() + @slash.requires(*have_ffmpeg_encoder_options("hevc_qsv", "qsv_params")) + @slash.parametrize(*gen_hevc_cbr_lp_parameters(spec, ['main'], strapi=True)) + def test_strapi(self, case, gop, slices, bitrate, fps, profile): + self.EncoderClass = StringAPIEncoder + self.init(spec, case, gop, slices, bitrate, fps, profile) + self.encode() + class vbr(HEVC8EncoderTest): def init(self, tspec, case, gop, slices, bframes, bitrate, fps, quality, refs, profile): vars(self).update(tspec[case].copy()) @@ -142,6 +171,13 @@ def test_r2r(self, case, gop, slices, bframes, bitrate, fps, quality, refs, prof vars(self).setdefault("r2r", 5) self.encode() + @slash.requires(*have_ffmpeg_encoder_options("hevc_qsv", "qsv_params")) + @slash.parametrize(*gen_hevc_vbr_parameters(spec, ['main'], strapi=True)) + def test_strapi(self, case, gop, slices, bframes, bitrate, fps, quality, refs, profile): + self.EncoderClass = StringAPIEncoder + self.init(spec, case, gop, slices, bframes, bitrate, fps, quality, refs, profile) + self.encode() + class vbr_lp(HEVC8EncoderLPTest): def before(self): super().before() @@ -173,6 +209,13 @@ def test_r2r(self, case, gop, slices, bitrate, fps, quality, refs, profile): vars(self).setdefault("r2r", 5) self.encode() + @slash.requires(*have_ffmpeg_encoder_options("hevc_qsv", "qsv_params")) + @slash.parametrize(*gen_hevc_vbr_lp_parameters(spec, ['main'], strapi=True)) + def test_strapi(self, case, gop, slices, bitrate, fps, quality, refs, profile): + self.EncoderClass = StringAPIEncoder + self.init(spec, case, gop, slices, bitrate, fps, quality, refs, profile) + self.encode() + # TCBRC is VBR LP + LDB + Strict(-1) @slash.parametrize(*gen_hevc_tcbrc_parameters(spec, ['main'])) def test_tcbrc(self, case, bitrate, fps, profile):