[vlc-commits] [Git][videolan/vlc][master] hw: vaapi: pass the VPP context to vaQueryVideoProcFilterCaps

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Mon Nov 16 17:02:32 UTC 2026



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
b970733b by Kang Kang at 2026-11-16T15:37:35+01:00
hw: vaapi: pass the VPP context to vaQueryVideoProcFilterCaps

vlc_vaapi_QueryVideoProcFilterCaps() takes a VAContextID, but both
OpenBasicFilter_InitFilterParams() and OpenDeinterlace_InitFilterParams()
passed filter_sys->va.buf, which is a VABufferID. Both types are
typedefs of VAGenericID, so the compiler cannot catch the mistake.

Moreover va.buf is still VA_INVALID_ID when these callbacks run: it is
only assigned by the vlc_vaapi_CreateBuffer() call in Open(), which
happens after pf_init_filter_params() has returned. The query therefore
always failed with "invalid VAContextID", and the VAAPI deinterlace,
denoise and sharpen filters were never usable: the deinterlacer fell
back to a software chroma conversion doing a VAAPI surface round-trip
through system memory.

OpenAdjust_InitFilterParams() already passes va.ctx correctly.

- - - - -


1 changed file:

- modules/hw/vaapi/filters.c


Changes:

=====================================
modules/hw/vaapi/filters.c
=====================================
@@ -646,7 +646,7 @@ OpenBasicFilter_InitFilterParams(filter_t * filter, void * p_data,
 
     if (vlc_vaapi_QueryVideoProcFilterCaps(VLC_OBJECT(filter),
                                            filter_sys->va.dpy,
-                                           filter_sys->va.buf,
+                                           filter_sys->va.ctx,
                                            p_basic_filter_data->filter_type,
                                            &caps, &num_caps)
         || !num_caps)
@@ -993,7 +993,7 @@ OpenDeinterlace_InitFilterParams(filter_t * filter, void * p_data,
 
     if (vlc_vaapi_QueryVideoProcFilterCaps(VLC_OBJECT(filter),
                                            filter_sys->va.dpy,
-                                           filter_sys->va.buf,
+                                           filter_sys->va.ctx,
                                            VAProcFilterDeinterlacing,
                                            &caps, &num_caps))
         return VLC_EGENERIC;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b970733b26b953580f820fe2edfb1b7c4bb58b2c

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b970733b26b953580f820fe2edfb1b7c4bb58b2c
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list