summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2016-11-19 13:57:23 -0800
committerwm4 <wm4@nowhere>2016-11-22 20:19:58 +0100
commit585c5c34f1195007beb012668aa9a22cb47b1f37 (patch)
tree216b2254833461835c15638beacda26e9e3edb4a /video/decode
parent5087816a7431caf27a5a8a9e00d0004d8322cdaa (diff)
downloadmpv-585c5c34f1195007beb012668aa9a22cb47b1f37.tar.bz2
mpv-585c5c34f1195007beb012668aa9a22cb47b1f37.tar.xz
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.
Diffstat (limited to 'video/decode')
-rw-r--r--video/decode/cuda.c3
1 files changed, 2 insertions, 1 deletions
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 <libavutil/hwcontext_cuda.h>
#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;
}