Skip to content

Commit

Permalink
[strapi] ffmpeg-qsv test used dedicated strapi parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Focus Luo <[email protected]>
  • Loading branch information
FocusLuo committed Jul 17, 2024
1 parent f9ad6e0 commit 2b34f7b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
13 changes: 7 additions & 6 deletions test/ffmpeg-qsv/encode/av1.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
###

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 @@ -39,7 +40,7 @@ def test_r2r(self, case, gop, bframes, tilecols, tilerows, qp, quality, profile)
self.encode()

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

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

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

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

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

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

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

@slash.requires(*have_string_api("h264_qsv"))
@slash.parametrize(*gen_avc_cqp_parameters(spec, ['high', 'main', 'baseline']))
@slash.parametrize(*gen_avc_cqp_strapi_parameters(spec, ['high', 'main', 'baseline']))
def test_strapi(self, case, gop, slices, bframes, qp, quality, profile):
self.EncoderClass = StringAPIEncoder
self.init(spec, case, gop, slices, bframes, qp, quality, profile)
Expand Down Expand Up @@ -70,7 +71,7 @@ def test_r2r(self, case, gop, slices, bframes, qp, quality, profile):
self.encode()

@slash.requires(*have_string_api("h264_qsv"))
@slash.parametrize(*gen_avc_cqp_lp_parameters(spec, ['high', 'main']))
@slash.parametrize(*gen_avc_cqp_lp_strapi_parameters(spec, ['high', 'main']))
def test_strapi(self, case, gop, slices, bframes, qp, quality, profile):
self.EncoderClass = StringAPIEncoder
self.init(spec, case, gop, slices, bframes, qp, quality, profile)
Expand Down Expand Up @@ -104,7 +105,7 @@ def test_r2r(self, case, gop, slices, bframes, bitrate, fps, profile):
self.encode()

@slash.requires(*have_string_api("h264_qsv"))
@slash.parametrize(*gen_avc_cbr_parameters(spec, ['high', 'main', 'baseline']))
@slash.parametrize(*gen_avc_cbr_strapi_parameters(spec, ['high', 'main', 'baseline']))
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 +139,7 @@ def test_r2r(self, case, gop, slices, bframes, bitrate, fps, profile):
self.encode()

@slash.requires(*have_string_api("h264_qsv"))
@slash.parametrize(*gen_avc_cbr_lp_parameters(spec, ['high', 'main']))
@slash.parametrize(*gen_avc_cbr_lp_strapi_parameters(spec, ['high', 'main']))
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 @@ -174,7 +175,7 @@ def test_r2r(self, case, gop, slices, bframes, bitrate, fps, quality, refs, prof
self.encode()

@slash.requires(*have_string_api("h264_qsv"))
@slash.parametrize(*gen_avc_vbr_parameters(spec_r2r, ['high', 'main', 'baseline']))
@slash.parametrize(*gen_avc_vbr_strapi_parameters(spec_r2r, ['high', 'main', 'baseline']))
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 @@ -228,7 +229,7 @@ def test_tcbrc(self, case, bitrate, fps, profile):
self.encode()

@slash.requires(*have_string_api("h264_qsv"))
@slash.parametrize(*gen_avc_vbr_lp_parameters(spec, ['high', 'main']))
@slash.parametrize(*gen_avc_vbr_lp_strapi_parameters(spec, ['high', 'main']))
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
13 changes: 7 additions & 6 deletions test/ffmpeg-qsv/encode/hevc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
###

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 @@ -38,7 +39,7 @@ def test_r2r(self, case, gop, slices, bframes, qp, quality, profile):
self.encode()

@slash.requires(*have_string_api("hevc_qsv"))
@slash.parametrize(*gen_hevc_cqp_parameters(spec, ['main']))
@slash.parametrize(*gen_hevc_cqp_strapi_parameters(spec, ['main']))
def test_strapi(self, case, gop, slices, bframes, qp, quality, profile):
self.EncoderClass = StringAPIEncoder
self.init(spec, case, gop, slices, bframes, qp, quality, profile)
Expand Down Expand Up @@ -70,7 +71,7 @@ def test_r2r(self, case, gop, slices, qp, quality, profile):
self.encode()

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

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

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

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

@slash.requires(*have_string_api("hevc_qsv"))
@slash.parametrize(*gen_hevc_vbr_lp_parameters(spec, ['main']))
@slash.parametrize(*gen_hevc_vbr_lp_strapi_parameters(spec, ['main']))
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 2b34f7b

Please sign in to comment.