[FFmpeg-devel] [PATCH v2] avfilter: add overlay vaapi filter

Sun, Xinpeng xinpeng.sun at intel.com
Mon Jan 6 12:15:12 EET 2020


> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Moritz
> Barsnick
> Sent: Monday, January 6, 2020 5:18 PM
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH v2] avfilter: add overlay vaapi filter
> 
> 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".

Will fix in the next version.

> 
> > +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.
> 

The "inputs" here refers to the inputs for the filter. How about changing the description to 
" Both inputs for this filter are yuv420p format "?

> > +    if (!support_flag) {
> > +      av_log(avctx, AV_LOG_ERROR, "VAAPI driver doesn't support global alpha
> blending\n");
> > +        return AVERROR(EINVAL);
> 
> Still incorrect indentation.

Sorry about this. I will double check and prevent this from happening again.

> 
> > +    output_surface = (VASurfaceID)(uintptr_t)output_frame->data[3];
> 
> Is this a double typecast? Just wondering.

Yes. IMHO, it mainly for safety to be compatible with each platform.

> 
> Cheers,
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email ffmpeg-devel-request at ffmpeg.org
> with subject "unsubscribe".


More information about the ffmpeg-devel mailing list