[FFmpeg-devel] [PATCH v5 5/5] libavfilter: VAAPI surface scaler

Mark Thompson sw at jkqxz.net
Sun Jan 31 15:24:54 CET 2016


On 31/01/16 09:32, Paul B Mahol wrote:
> On 1/30/16, Mark Thompson <sw at jkqxz.net> wrote:
>> On 30/01/16 22:22, Paul B Mahol wrote:
>>> On 1/30/16, Mark Thompson <sw at jkqxz.net> wrote:
>>>>
>>>> ---
>>>>  configure                    |   3 +
>>>>  libavfilter/Makefile         |   1 +
>>>>  libavfilter/allfilters.c     |   1 +
>>>>  libavfilter/vf_vaapi_scale.c | 709
>>>> +++++++++++++++++++++++++++++++++++++++++++
>>>>  4 files changed, 714 insertions(+)
>>>>  create mode 100644 libavfilter/vf_vaapi_scale.c
>>>>
>>>
>>> missing documentation, how is this supposed to work?
>>
>> Documentation has not yet been written because the interface is not yet
>> finalised.  (True of the whole series.)
>>
>> Can you clarify what "this" points to in that question?  (The
>> documentation-writing, the filter itself, the submission process for this
>> patch series, the unclear hardware context setup, ... ?)
>>
> 
> The filter itself.
> 

See below.

It should probably look a bit more like vf_scale (at least with w/width and h/height and default options), I'll look at this for the next iteration.

---

@section vaapi_scale

Scale the input video in hardware using the VAAPI video processing pipeline.

The input and output frames can either be a normal image format or an opaque
VAAPI surface.  For the former case, the image data will be copied into/out of
VAAPI surfaces before/after being processed.  For the latter case, the
@code{VASurfaceID} of the surface must be placed in @code{data[3]} of the
@code{AVFrame} input, and will appear in the same place in the output.

@subsection Options

@table @option
@item hardware_context
A pointer to the VAAPI hardware context to use.  The type of this is
@code{AVVAAPIHardwareContext} (see @file{libavcodec/vaapi_support.h}), and must
be ready to use when the filter is initialised.  This option must be set.

@item size
Set the output video size.  For the syntax of this option, see the
@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}.

@item force_vaapi_out
Make the filter declare that the only output format it supports is an opaque
VAAPI surface.  This can help to push format negotiation into doing the right
thing when you are trying to avoid redundant copies from GPU memory and back.

@item force_vaapi_in
Like @var{force_vaapi_out}, for the input.
@end table



More information about the ffmpeg-devel mailing list