Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#8059 closed enhancement (fixed)

pad filter with hw support

Reported by: fortman Owned by:
Priority: wish Component: avfilter
Version: git-master Keywords: pad opencl
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:

The current implementation of the "pad" filter only supports a software context. And it can be very useful for windowing a scene, but then when using HW decoding and encoding it's required to hwdownload and hwupload to just "crop and pad" the frames.

So, I suggest to implement one of these two alternatives:

  1. Or to add hw frames support to the "pad" plugin.
  2. Or adding pad options to filters like "scale_cuda" and "scale_qsv".

I hope some developer wants to implement this.
Thank you!

Change History (6)

comment:1 by fortman, 5 years ago


I'm waiting for an answer from some developer.
Please consider this.


comment:2 by fortman, 5 years ago


It seems to me that no one has understood this request.
So I will try to explain why we need it:

  • You have a high definition footage sequence. Then you want to resize it, and at the same time frame it in a black border. After you need to compress it.

In this case, you can complete all tasks in a HARDWARE context... except for the framing filter. You can read, resize and compress. But the "pad" filter in SOFTWARE it's the only solution for the framing. So it's required to add a hwdownload and hwupload, plus the CPU resources.

However, all HW filters have simple functions to move/copy pixels. Then it's simple to implement the "pad" functionality inside a hw "scale_*" filter. And for this reason I make this request.

So please, consider it.
Thank you!

comment:3 by Carl Eugen Hoyos, 5 years ago

Priority: normalwish

comment:4 by Andreas Håkon, 5 years ago

Hi fortman,

I really like to see that option (add a border) inside the scale_cuda and scale_qsv filters.
Personally I think it's more simple if the maintainers of these filters will add some extended functionality to the scale hardware filters. For example: "crop" and "pad" (aka border).

I hope it helps.

comment:5 by Elon Musk, 4 years ago

Resolution: fixed
Status: newclosed

comment:6 by Carl Eugen Hoyos, 4 years ago

Keywords: opencl added; scale_cuda scale_qsv removed
Note: See TracTickets for help on using tickets.