aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Blake <oak99sky@yahoo.co.uk>2020-07-15 10:31:37 +0100
committerGitHub <noreply@github.com>2020-07-15 10:31:37 +0100
commit0311ee3049cdcfdb1f1fdee3b214b6c184feda16 (patch)
tree7798a94b1eae5b355c12837c15498163650d19a0
parentf70d3dd75de0ae0f81e1cf80c36e50761e0131b5 (diff)
parent58c4698db06388f3f09e72e9ebb2e2f7fdd8077f (diff)
Merge pull request #18108 from fritsch/vdpauvp9
VDPAU: Implement support for VP9 Profile0
-rw-r--r--xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp
index 65087e5065..0d87880942 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp
@@ -51,6 +51,9 @@ CDecoder::Desc decoder_profiles[] = {
#ifdef VDP_DECODER_PROFILE_HEVC_MAIN
{"HEVC_MAIN", VDP_DECODER_PROFILE_HEVC_MAIN},
#endif
+#ifdef VDP_DECODER_PROFILE_VP9_PROFILE_0
+{"VP9_PROFILE_0", VDP_DECODER_PROFILE_VP9_PROFILE_0},
+#endif
};
static struct SInterlaceMapping
@@ -851,6 +854,12 @@ void CDecoder::ReadFormatOf( AVCodecID codec
vdp_chroma_type = VDP_CHROMA_TYPE_420;
break;
#endif
+#ifdef VDP_DECODER_PROFILE_VP9_PROFILE_0
+ case AV_CODEC_ID_VP9:
+ vdp_decoder_profile = VDP_DECODER_PROFILE_VP9_PROFILE_0;
+ vdp_chroma_type = VDP_CHROMA_TYPE_420;
+ break;
+#endif
case AV_CODEC_ID_WMV3:
vdp_decoder_profile = VDP_DECODER_PROFILE_VC1_MAIN;
vdp_chroma_type = VDP_CHROMA_TYPE_420;
@@ -903,6 +912,13 @@ bool CDecoder::ConfigVDPAU(AVCodecContext* avctx, int ref_frames)
// reference number, so we force the maximum number (source: upstream ffmpeg)
m_vdpauConfig.maxReferences = 16;
}
+ else if (avctx->codec_id == AV_CODEC_ID_VP9)
+ {
+ if (avctx->profile != FF_PROFILE_VP9_0)
+ return false;
+
+ m_vdpauConfig.maxReferences = 8;
+ }
else
m_vdpauConfig.maxReferences = 2;