Opened 3 months ago

Last modified 3 months ago

#8059 new enhancement

pad filter with hw support

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

Description

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 (4)

comment:1 Changed 3 months ago by fortman

Hi,

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

Regards.

comment:2 Changed 3 months ago by fortman

Hi,

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 Changed 3 months ago by cehoyos

  • Priority changed from normal to wish

comment:4 Changed 3 months ago by ahakon

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.

Note: See TracTickets for help on using tickets.