Skip to content

Commit

Permalink
[ffmpeg-qsv] add mpeg2 encode playback_seek test case
Browse files Browse the repository at this point in the history
Signed-off-by: Wang Hangjie <[email protected]>
  • Loading branch information
Hangjie22Coder authored and uartie committed Oct 14, 2024
1 parent 65105dd commit 8166253
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@ def gen_vp9_seek_lp_parameters(spec):
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
gen_mpeg2_seek_parameters = gen_vp9_seek_parameters

def gen_av1_cqp_variants(spec, strapi=False):
for case, params in spec.items():
Expand Down
18 changes: 18 additions & 0 deletions test/ffmpeg-qsv/encode/mpeg2.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,21 @@ def test_r2r(self, case, gop, bframes, qp, quality):
self.init(spec_r2r, case, gop, bframes, qp, quality)
vars(self).setdefault("r2r", 5)
self.encode()

class seek(MPEG2EncoderTest):
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_mpeg2_seek_parameters(spec))
def test(self, case, rcmode, bitrate, maxrate, fps, seek):
self.init(spec, case, rcmode, bitrate, maxrate, fps, seek)
self.encode()

0 comments on commit 8166253

Please sign in to comment.