summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorboogie <boogiepop@gmx.com>2024-01-20 00:08:30 +0100
committerPhilip Langdale <github.philipl@overt.org>2024-01-28 13:56:58 -0800
commitd90a5ff17a88cbda2ac64cccf1cd98456f2d0ab2 (patch)
treef0f79a7d9c1d832619ab2025cf5aa0da96edd885
parentc6ccabe5854254320b175cde4106ec40d7a30946 (diff)
downloadmpv-d90a5ff17a88cbda2ac64cccf1cd98456f2d0ab2.tar.bz2
mpv-d90a5ff17a88cbda2ac64cccf1cd98456f2d0ab2.tar.xz
hwdec_drmprime: add P010 and P210 support
-rw-r--r--video/out/hwdec/dmabuf_interop_gl.c1
-rw-r--r--video/out/hwdec/hwdec_drmprime.c2
2 files changed, 3 insertions, 0 deletions
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 a5f9c664fb..d709e05c9d 100644
--- a/video/out/hwdec/hwdec_drmprime.c
+++ b/video/out/hwdec/hwdec_drmprime.c
@@ -132,6 +132,8 @@ static int init(struct ra_hwdec *hw)
MP_TARRAY_APPEND(p, p->formats, num_formats, IMGFMT_NV12);
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, IMGFMT_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]);