[FFmpeg-devel] PATCH: Force vaapi image formats to NV12-only

Lluís Batlle i Rossell viric at viric.name
Fri Aug 9 10:43:53 EEST 2024


On Fri, Aug 09, 2024 at 11:49:54AM +0800, Zhao Zhili wrote:
> > vaapi drivers often lack proper image converesions and not all
> > situations allow vagetimage or vaputimage with the image formats
> > reported by the api. nv12 seems allowed in all circumstances.
> > 
> > with this change now one can use the hwaccel directly without
> > explicit conversions to nv12 for frame downloading to work.
> > 
> > gstreamer adopted a similar approach:
> > https://bugzilla.gnome.org/show_bug.cgi?id=752958
> 
> Isn’t it break all pixel formats with bit depth > 8?
> I think we already have hwcontext API to select sw_format, this isn’t a bug
> inside ffmpeg.

Correct... I didn't think of the need beyond NV12.

What if I redo the patch so I keep all formats, but I simply move NV12 to
the first place? That will make ffmpeg pick NV12 as default if NONE
specified.


More information about the ffmpeg-devel mailing list