From cfcee4cfe70536faeb9f2aaa87257d067e902b70 Mon Sep 17 00:00:00 2001 From: Lionel CHAZALLON Date: Mon, 23 Oct 2017 08:51:49 -0700 Subject: Add DRM_PRIME Format Handling and Display for RockChip MPP decoders This commit allows to use the AV_PIX_FMT_DRM_PRIME newly introduced format in ffmpeg that allows decoders to provide an AVDRMFrameDescriptor struct. That struct holds dmabuf fds and information allowing zerocopy rendering using KMS / DRM Atomic. This has been tested on RockChip ROCK64 device. --- video/decode/vd_lavc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'video/decode') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 513eded9a4..bf610e83e4 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -151,6 +151,12 @@ static const struct vd_lavc_hwdec mp_vd_lavc_rpi_copy = { }; #endif +static const struct vd_lavc_hwdec mp_vd_lavc_rkmpp = { + .type = HWDEC_RKMPP, + .lavc_suffix = "_rkmpp", + .image_format = IMGFMT_DRMPRIME, +}; + #if HAVE_CUDA_HWACCEL static const struct vd_lavc_hwdec mp_vd_lavc_cuda = { .type = HWDEC_CUDA, @@ -270,6 +276,7 @@ static const struct vd_lavc_hwdec *const hwdec_list[] = { &mp_vd_lavc_cuda_copy, #endif &mp_vd_lavc_crystalhd, + &mp_vd_lavc_rkmpp, NULL }; -- cgit v1.2.3