diff --git a/test/ffmpeg-qsv/encode/av1.py b/test/ffmpeg-qsv/encode/av1.py index 3fd5cf15..7dfc0b6b 100644 --- a/test/ffmpeg-qsv/encode/av1.py +++ b/test/ffmpeg-qsv/encode/av1.py @@ -7,6 +7,7 @@ from ....lib import * from ....lib.ffmpeg.qsv.util import * from ....lib.ffmpeg.qsv.encoder import AV1EncoderLPTest, AV1EncoderTest +from ....lib.ffmpeg.qsv.encoder import StringAPIEncoder spec = load_test_spec("av1", "encode", "8bit") spec_r2r = load_test_spec("av1", "encode", "8bit", "r2r") @@ -37,6 +38,13 @@ def test_r2r(self, case, gop, bframes, tilecols, tilerows, qp, quality, profile) vars(self).setdefault("r2r", 5) self.encode() + @slash.requires(*have_ffmpeg_encoder_options("av1_qsv", "qsv_params")) + @slash.parametrize(*gen_av1_cqp_parameters(spec, strapi=True)) + def test_strapi(self, case, gop, bframes, tilecols, tilerows, qp, quality, profile): + self.EncoderClass = StringAPIEncoder + self.init(spec, case, gop, bframes, tilecols, tilerows, qp, quality, profile) + self.encode() + class icq(AV1EncoderTest): def init(self, tspec, case, gop, bframes, tilecols, tilerows,qp, quality, profile): vars(self).update(tspec[case].copy()) @@ -92,6 +100,13 @@ def test_r2r(self, case, gop, bframes, tilecols, tilerows, bitrate, quality, fps vars(self).setdefault("r2r", 5) self.encode() + @slash.requires(*have_ffmpeg_encoder_options("av1_qsv", "qsv_params")) + @slash.parametrize(*gen_av1_cbr_parameters(spec, strapi=True)) + def test_strapi(self, case, gop, bframes, tilecols, tilerows, bitrate, quality, fps, profile): + self.EncoderClass = StringAPIEncoder + self.init(spec, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality, profile) + self.encode() + class vbr(AV1EncoderTest): def init(self, tspec, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality, profile): vars(self).update(tspec[case].copy()) @@ -122,6 +137,13 @@ def test_r2r(self, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality vars(self).setdefault("r2r", 5) self.encode() + @slash.requires(*have_ffmpeg_encoder_options("av1_qsv", "qsv_params")) + @slash.parametrize(*gen_av1_vbr_parameters(spec, strapi=True)) + def test_strapi(self, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality, profile): + self.EncoderClass = StringAPIEncoder + self.init(spec, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality, profile) + self.encode() + class cqp_lp(AV1EncoderLPTest): def init(self, tspec, case, gop, bframes, tilecols, tilerows,qp, quality, profile): vars(self).update(tspec[case].copy()) @@ -148,6 +170,13 @@ def test_r2r(self, case, gop, bframes, tilecols, tilerows, qp, quality, profile) vars(self).setdefault("r2r", 5) self.encode() + @slash.requires(*have_ffmpeg_encoder_options("av1_qsv", "qsv_params")) + @slash.parametrize(*gen_av1_cqp_lp_parameters(spec, strapi=True)) + def test_strapi(self, case, gop, bframes, tilecols, tilerows, qp, quality, profile): + self.EncoderClass = StringAPIEncoder + self.init(spec, case, gop, bframes, tilecols, tilerows, qp, quality, profile) + self.encode() + class icq_lp(AV1EncoderLPTest): def init(self, tspec, case, gop, bframes, tilecols, tilerows,qp, quality, profile): vars(self).update(tspec[case].copy()) @@ -203,6 +232,13 @@ def test_r2r(self, case, gop, bframes, tilecols, tilerows, bitrate, quality, fps vars(self).setdefault("r2r", 5) self.encode() + @slash.requires(*have_ffmpeg_encoder_options("av1_qsv", "qsv_params")) + @slash.parametrize(*gen_av1_cbr_lp_parameters(spec, strapi=True)) + def test_strapi(self, case, gop, bframes, tilecols, tilerows, bitrate, quality, fps, profile): + self.EncoderClass = StringAPIEncoder + self.init(spec, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality, profile) + self.encode() + class vbr_lp(AV1EncoderLPTest): def init(self, tspec, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality, profile): vars(self).update(tspec[case].copy()) @@ -232,3 +268,11 @@ def test_r2r(self, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality self.init(spec_r2r, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality, profile) vars(self).setdefault("r2r", 5) self.encode() + + @slash.requires(*have_ffmpeg_encoder_options("av1_qsv", "qsv_params")) + @slash.parametrize(*gen_av1_vbr_lp_parameters(spec, strapi=True)) + def test_strapi(self, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality, profile): + self.EncoderClass = StringAPIEncoder + self.init(spec, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality, profile) + self.encode() +