From f1a3aa4036000db7702bb237806165a6b26bdcc9 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Mon, 16 Feb 2026 15:12:31 +0100 Subject: [PATCH] frontends/va: fix undefined ref error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When building with "-Dvideo-codecs=h264dec,h265dec,av1dec" va/encode.c won't be built but it's still required because it's used from picture.c Fixes: c4f05bdf607 ("frontends/va: include picture_*.c based on selected codec") Reviewed-by: Marek Olšák (cherry picked from commit 82a51ba9b33260101c002c5ac893e32506d861b3) Part-of: --- .pick_status.json | 2 +- src/gallium/frontends/va/va_private.h | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index a6f46cd0d15..586b6d18b4a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4494,7 +4494,7 @@ "description": "frontends/va: fix undefined ref error", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "c4f05bdf607b276cd18e7c86d2459e3dc8faffc1", "notes": null diff --git a/src/gallium/frontends/va/va_private.h b/src/gallium/frontends/va/va_private.h index f38dc8a66d7..79437a296e2 100644 --- a/src/gallium/frontends/va/va_private.h +++ b/src/gallium/frontends/va/va_private.h @@ -664,10 +664,8 @@ PROC void vlVaHandleSliceParameterBufferAV1(vlVaContext *context, vlVaBuffer *bu #undef TAIL #undef TAIL_S -VAStatus vlVaHandleEncBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf); -void vlVaHandleVAEncMiscParameterTypeQualityLevel(struct pipe_enc_quality_modes *p, vlVaQualityBits *in); - #if VIDEO_CODEC_H264ENC +#define HAS_ENCODE #define PROC #define TAIL #else @@ -688,6 +686,7 @@ PROC VAStatus vlVaHandleVAEncMiscParameterTypeHRDH264(vlVaContext *context, VAEn #undef TAIL #if VIDEO_CODEC_H265ENC +#define HAS_ENCODE #define PROC #define TAIL #else @@ -709,6 +708,7 @@ PROC VAStatus vlVaHandleVAEncMiscParameterTypeTemporalLayerHEVC(vlVaContext *con #if VA_CHECK_VERSION(1, 16, 0) #if VIDEO_CODEC_AV1ENC +#define HAS_ENCODE #define PROC #define TAIL #else @@ -727,4 +727,18 @@ PROC VAStatus vlVaHandleVAEncSliceParameterBufferTypeAV1(vlVaDriver *drv, vlVaCo #undef PROC #undef TAIL #endif + +#ifdef HAS_ENCODE +#define PROC +#define TAIL +#else +#define PROC static inline +#define TAIL {return VA_STATUS_ERROR_UNIMPLEMENTED;} +#endif +PROC VAStatus vlVaHandleEncBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf) TAIL; +#undef PROC +#undef TAIL + +void vlVaHandleVAEncMiscParameterTypeQualityLevel(struct pipe_enc_quality_modes *p, vlVaQualityBits *in); + #endif //VA_PRIVATE_H