Skip to content

Commit

Permalink
[libs]remove extra_hw_frames on ffmpeg
Browse files Browse the repository at this point in the history
ffmpeg should auto create surfaces now

Signed-off-by: Wang Wenqing <[email protected]>
  • Loading branch information
wenqingx committed Oct 29, 2024
1 parent 9b17a37 commit 54dd20e
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
3 changes: 1 addition & 2 deletions lib/ffmpeg/qsv/transcoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,5 @@ class TranscoderTest(BaseTranscoderTest):
def before(self):
super().before()
self.hwaccel = "qsv"
self.ohwframes = 64
self.ihwframes = 64
self.hwframes = 64
self.hwdevice = f'qsv,child_device={get_media().render_device}'
6 changes: 2 additions & 4 deletions lib/ffmpeg/transcoderbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ def gen_input_opts(self):
opts += " -hwaccel_output_format {hwaccel}"
if "hw" == self.mode:
opts += " -hwaccel {hwaccel}"
if vars(self).get("ihwframes", None) is not None:
opts += " -extra_hw_frames {ihwframes}"
opts += " -c:v {}".format(self.get_decoder(self.codec, self.mode))
opts += f" -i {filepath2os(self.source)}"

Expand Down Expand Up @@ -174,8 +172,8 @@ def gen_output_opts(self):
filters.extend(["hwdownload", f"format={iformat}"])
elif ("sw", "hw") == tmode: # SW to HW transcode
filters.extend([f"format={iformat}", "hwupload"])
if vars(self).get("ohwframes", None) is not None:
filters[-1] += "=extra_hw_frames={ohwframes}"
if vars(self).get("hwframes", None) is not None:
filters[-1] += "=extra_hw_frames={hwframes}"

vppscale = self.get_vpp_scale(
output.get("width", None), output.get("height", None), mode)
Expand Down
2 changes: 0 additions & 2 deletions lib/ffmpeg/vaapi/transcoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,3 @@ class TranscoderTest(BaseTranscoderTest):
def before(self):
super().before()
self.hwaccel = "vaapi"
self.ohwframes = 64
self.ihwframes = 64
2 changes: 0 additions & 2 deletions test/ffmpeg-qsv/transcode/mpeg2.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@ def test(self, case):
)
self.transcode()

def before(self):
super().before()
2 changes: 0 additions & 2 deletions test/ffmpeg-vaapi/transcode/mpeg2.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@ def test(self, case):
)
self.transcode()

def before(self):
super().before()

0 comments on commit 54dd20e

Please sign in to comment.