[FFmpeg-devel] [PATCH v2] avfilter: add overlay vaapi filter
Moritz Barsnick
barsnick at gmx.net
Mon Jan 6 11:17:32 EET 2020
On Mon, Jan 06, 2020 at 15:48:21 +0800, Xinpeng Sun wrote:
> + at item x
> +Set the x coordinate of the overlaid video on the main video.
> +Default value is @code{0}.
> +
> + at item y
> +Set the x coordinate of the overlaid video on the main video.
> +Default value is @code{0}.
Copy/paste error: "y coordinate", not "x coordinate".
> +Overlay an image LOGO at the top-left corner of the INPUT video. Both inputs are yuv420p format.
> + at example
> +-i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuv420p, hwupload[b], [a][b]overlay_vaapi" OUTPUT
"Both inputs are yuv420p format" is a bit misleading. I guess you mean
the inputs to the filter, it could also be read as the two input files
to ffmpeg? You are converting LOGO to yuv420p, so it doesn't need to be
yuv420p originally.
> + if (!support_flag) {
> + av_log(avctx, AV_LOG_ERROR, "VAAPI driver doesn't support global alpha blending\n");
> + return AVERROR(EINVAL);
Still incorrect indentation.
> + output_surface = (VASurfaceID)(uintptr_t)output_frame->data[3];
Is this a double typecast? Just wondering.
Cheers,
Moritz
More information about the ffmpeg-devel
mailing list