From a606c27dcc6cf73e27ec93696272596c2ca7fd17 Mon Sep 17 00:00:00 2001 From: boogie Date: Sat, 20 Jan 2024 00:09:39 +0100 Subject: [PATCH 2/2] hwdec_drmprime: add AV_PIX_FMT_P210 support --- video/out/hwdec/dmabuf_interop_gl.c | 1 + video/out/hwdec/hwdec_drmprime.c | 1 + 2 files changed, 2 insertions(+) diff --git a/video/out/hwdec/dmabuf_interop_gl.c b/video/out/hwdec/dmabuf_interop_gl.c index e7fb1031a0..a353ade9bb 100644 --- a/video/out/hwdec/dmabuf_interop_gl.c +++ b/video/out/hwdec/dmabuf_interop_gl.c @@ -186,6 +186,7 @@ static bool vaapi_gl_map(struct ra_hwdec_mapper *mapper, format[2] = DRM_FORMAT_R8; break; case DRM_FORMAT_P010: + case DRM_FORMAT_P210: #ifdef DRM_FORMAT_P030 /* Format added in a newer libdrm version than minimum */ case DRM_FORMAT_P030: #endif diff --git a/video/out/hwdec/hwdec_drmprime.c b/video/out/hwdec/hwdec_drmprime.c index 2d52ebcc4c..e245f3f75a 100644 --- a/video/out/hwdec/hwdec_drmprime.c +++ b/video/out/hwdec/hwdec_drmprime.c @@ -133,6 +133,7 @@ static int init(struct ra_hwdec *hw) MP_TARRAY_APPEND(p, p->formats, num_formats, IMGFMT_420P); MP_TARRAY_APPEND(p, p->formats, num_formats, pixfmt2imgfmt(AV_PIX_FMT_NV16)); MP_TARRAY_APPEND(p, p->formats, num_formats, pixfmt2imgfmt(AV_PIX_FMT_P010)); + MP_TARRAY_APPEND(p, p->formats, num_formats, pixfmt2imgfmt(AV_PIX_FMT_P210)); for (int i = 0; i < MP_ARRAY_SIZE(forked_pix_fmt_names); i++) { enum AVPixelFormat fmt = av_get_pix_fmt(forked_pix_fmt_names[i]); -- 2.43.0