Skip to content

Commit

Permalink
[ffmpeg-qsv] add jpeg 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 committed Sep 23, 2024
1 parent fdbf05e commit 4889f39
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,8 @@ def gen_vp9_seek_lp_parameters(spec):

gen_avc_seek_parameters = gen_vp9_seek_parameters
gen_avc_seek_lp_parameters = gen_vp9_seek_lp_parameters
gen_jpeg_seek_parameters = gen_vp9_seek_parameters
gen_jpeg_seek_lp_parameters = gen_vp9_seek_lp_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/jpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,21 @@ def test_r2r(self, case, quality):
self.init(spec_r2r, case, quality)
vars(self).setdefault("r2r", 5)
self.encode()

class seek(JPEGEncoderTest):
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_jpeg_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 4889f39

Please sign in to comment.