From 585c5c34f1195007beb012668aa9a22cb47b1f37 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Sat, 19 Nov 2016 13:57:23 -0800 Subject: vo_opengl: hwdec_cuda: Support P016 output surfaces The latest 375.xx nvidia drivers add support for P016 output surfaces. In combination with an ffmpeg change to return those surfaces, we can display them. The bulk of the work is related to knowing which format you're dealing with at the right time. Once you know, it's straight forward. --- video/decode/cuda.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'video/decode') diff --git a/video/decode/cuda.c b/video/decode/cuda.c index f9dd418fd5..b606315906 100644 --- a/video/decode/cuda.c +++ b/video/decode/cuda.c @@ -21,6 +21,7 @@ #include #include "common/av_common.h" +#include "video/fmt-conversion.h" #include "video/decode/lavc.h" typedef struct CUVIDContext { @@ -114,7 +115,7 @@ static void uninit(struct lavc_ctx *ctx) static struct mp_image *process_image(struct lavc_ctx *ctx, struct mp_image *img) { if (img->imgfmt == IMGFMT_CUDA) - img->params.hw_subfmt = IMGFMT_NV12; + img->params.hw_subfmt = pixfmt2imgfmt(ctx->avctx->sw_pix_fmt); return img; } -- cgit v1.2.3