Skip to content

Commit

Permalink
[strapi]ffmpeg-qsv hevc using consolidated strapi generators
Browse files Browse the repository at this point in the history
Signed-off-by: Focus Luo <[email protected]>
  • Loading branch information
FocusLuo committed Aug 20, 2024
1 parent d704827 commit 426d0f8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
13 changes: 6 additions & 7 deletions test/ffmpeg-qsv/encode/av1.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
###

from ....lib import *
from ....lib.parameters_strapi import *
from ....lib.ffmpeg.qsv.util import *
from ....lib.ffmpeg.qsv.encoder import AV1EncoderLPTest, AV1EncoderTest
from ....lib.ffmpeg.qsv.encoder import StringAPIEncoder
Expand Down Expand Up @@ -40,7 +39,7 @@ def test_r2r(self, case, gop, bframes, tilecols, tilerows, qp, quality, profile)
self.encode()

@slash.requires(*have_ffmpeg_encoder_options("av1_qsv", "qsv_params"))
@slash.parametrize(*gen_av1_cqp_strapi_parameters(spec))
@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)
Expand Down Expand Up @@ -102,7 +101,7 @@ def test_r2r(self, case, gop, bframes, tilecols, tilerows, bitrate, quality, fps
self.encode()

@slash.requires(*have_ffmpeg_encoder_options("av1_qsv", "qsv_params"))
@slash.parametrize(*gen_av1_cbr_strapi_parameters(spec))
@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)
Expand Down Expand Up @@ -139,7 +138,7 @@ def test_r2r(self, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality
self.encode()

@slash.requires(*have_ffmpeg_encoder_options("av1_qsv", "qsv_params"))
@slash.parametrize(*gen_av1_vbr_strapi_parameters(spec))
@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)
Expand Down Expand Up @@ -172,7 +171,7 @@ def test_r2r(self, case, gop, bframes, tilecols, tilerows, qp, quality, profile)
self.encode()

@slash.requires(*have_ffmpeg_encoder_options("av1_qsv", "qsv_params"))
@slash.parametrize(*gen_av1_cqp_lp_strapi_parameters(spec))
@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)
Expand Down Expand Up @@ -234,7 +233,7 @@ def test_r2r(self, case, gop, bframes, tilecols, tilerows, bitrate, quality, fps
self.encode()

@slash.requires(*have_ffmpeg_encoder_options("av1_qsv", "qsv_params"))
@slash.parametrize(*gen_av1_cbr_lp_strapi_parameters(spec))
@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)
Expand Down Expand Up @@ -271,7 +270,7 @@ def test_r2r(self, case, gop, bframes, tilecols, tilerows, bitrate, fps, quality
self.encode()

@slash.requires(*have_ffmpeg_encoder_options("av1_qsv", "qsv_params"))
@slash.parametrize(*gen_av1_vbr_lp_strapi_parameters(spec))
@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)
Expand Down
14 changes: 6 additions & 8 deletions test/ffmpeg-qsv/encode/hevc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
###

from ....lib import *
from ....lib.parameters_strapi import *
from ....lib.ffmpeg.qsv.util import *
from ....lib.ffmpeg.qsv.encoder import HEVC8EncoderTest, HEVC8EncoderLPTest
from ....lib.ffmpeg.qsv.encoder import StringAPIEncoder
Expand Down Expand Up @@ -39,11 +38,10 @@ def test_r2r(self, case, gop, slices, bframes, qp, quality, profile):
self.encode()

@slash.requires(*have_ffmpeg_encoder_options("hevc_qsv", "qsv_params"))
@slash.parametrize(*gen_hevc_cqp_strapi_parameters(spec, ['main']))
@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.EncoderClass = StringAPIEncoder
self.encode()

class cqp_lp(HEVC8EncoderLPTest):
Expand Down Expand Up @@ -71,7 +69,7 @@ def test_r2r(self, case, gop, slices, qp, quality, profile):
self.encode()

@slash.requires(*have_ffmpeg_encoder_options("hevc_qsv", "qsv_params"))
@slash.parametrize(*gen_hevc_cqp_lp_strapi_parameters(spec, ['main']))
@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)
Expand Down Expand Up @@ -105,7 +103,7 @@ def test_r2r(self, case, gop, slices, bframes, bitrate, fps, profile):
self.encode()

@slash.requires(*have_ffmpeg_encoder_options("hevc_qsv", "qsv_params"))
@slash.parametrize(*gen_hevc_cbr_strapi_parameters(spec, ['main']))
@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)
Expand Down Expand Up @@ -138,7 +136,7 @@ def test_r2r(self, case, gop, slices, bitrate, fps, profile):
self.encode()

@slash.requires(*have_ffmpeg_encoder_options("hevc_qsv", "qsv_params"))
@slash.parametrize(*gen_hevc_cbr_lp_strapi_parameters(spec, ['main']))
@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)
Expand Down Expand Up @@ -174,7 +172,7 @@ def test_r2r(self, case, gop, slices, bframes, bitrate, fps, quality, refs, prof
self.encode()

@slash.requires(*have_ffmpeg_encoder_options("hevc_qsv", "qsv_params"))
@slash.parametrize(*gen_hevc_vbr_strapi_parameters(spec, ['main']))
@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)
Expand Down Expand Up @@ -212,7 +210,7 @@ def test_r2r(self, case, gop, slices, bitrate, fps, quality, refs, profile):
self.encode()

@slash.requires(*have_ffmpeg_encoder_options("hevc_qsv", "qsv_params"))
@slash.parametrize(*gen_hevc_vbr_lp_strapi_parameters(spec, ['main']))
@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)
Expand Down

0 comments on commit 426d0f8

Please sign in to comment.