From ed5ee047222056c76e3a9b0671c3ab93c9b992a5 Mon Sep 17 00:00:00 2001 From: ManojGuptaBonda Date: Sat, 27 Jun 2020 19:04:22 +0530 Subject: avcodec/hevcdec: Add VDPAU to list of supported formats Added VDPAU to list of supported formats for HEVC10 and 12 bit formats also added 42010 bit to surface_parameters and new VDP chroma formats to VDPAUPixFmtMaps Add HEVC 420 10/12 Bit and 444 10/12 Bit support for VDPAU YUV444P10 is defined as the 444 surface with 10bit valid data in LSBs but H/w returns Data in MSBs Hence if we map output as YUV444p16 it is filtering out the LSB to convert to p10 format. Signed-off-by: Philip Langdale --- libavcodec/vdpau.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libavcodec/vdpau.c') diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index 167f06d7ae..fa10905c75 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -83,6 +83,8 @@ int av_vdpau_get_surface_parameters(AVCodecContext *avctx, switch (avctx->sw_pix_fmt) { case AV_PIX_FMT_YUV420P: case AV_PIX_FMT_YUVJ420P: + case AV_PIX_FMT_YUV420P10: + case AV_PIX_FMT_YUV420P12: t = VDP_CHROMA_TYPE_420; w = (w + 1) & ~1; h = (h + 3) & ~3; @@ -95,6 +97,8 @@ int av_vdpau_get_surface_parameters(AVCodecContext *avctx, break; case AV_PIX_FMT_YUV444P: case AV_PIX_FMT_YUVJ444P: + case AV_PIX_FMT_YUV444P10: + case AV_PIX_FMT_YUV444P12: t = VDP_CHROMA_TYPE_444; h = (h + 1) & ~1; break; -- cgit v1.2.3