aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp9.c
diff options
context:
space:
mode:
authorManojGuptaBonda <mbonda@nvidia.com>2019-10-25 11:00:13 +0530
committerPhilip Langdale <philipl@overt.org>2019-10-26 09:57:01 -0700
commit1054752c563cbe978f16010ed57dfa23a41ee490 (patch)
treea6d9b9657c10680766f47161deb23094687b4fcb /libavcodec/vp9.c
parente1d993d829a6386d1b0514ea38f723d2b31b38fe (diff)
downloadffmpeg-1054752c563cbe978f16010ed57dfa23a41ee490.tar.gz
Add support for VP9 VDPAU hwaccel decode
Support for VDPAU accelerated VP9 decoding was added with libvdpau-1.3. Support for the same in ffmpeg is added with this patch. Profiles related to VDPAU VP9 can be found in latest vdpau.h present in libvdpau-1.3. DRC clips are not supported yet due to http://trac.ffmpeg.org/ticket/8068 Add VP9 VDPAU to list of hwaccels and supported formats Added file vdpau_vp9.c and Modified configure to add VDPAU VP9 support. Mapped VP9 profiles to VDPAU VP9 profiles. Populated the codec specific params that need to be passed to VDPAU. Signed-off-by: Philip Langdale <philipl@overt.org>
Diffstat (limited to 'libavcodec/vp9.c')
-rw-r--r--libavcodec/vp9.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index f16462b1e9..0fd15efed3 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -173,7 +173,8 @@ static int update_size(AVCodecContext *avctx, int w, int h)
#define HWACCEL_MAX (CONFIG_VP9_DXVA2_HWACCEL + \
CONFIG_VP9_D3D11VA_HWACCEL * 2 + \
CONFIG_VP9_NVDEC_HWACCEL + \
- CONFIG_VP9_VAAPI_HWACCEL)
+ CONFIG_VP9_VAAPI_HWACCEL + \
+ CONFIG_VP9_VDPAU_HWACCEL)
enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmtp = pix_fmts;
VP9Context *s = avctx->priv_data;
uint8_t *p;
@@ -188,6 +189,9 @@ static int update_size(AVCodecContext *avctx, int w, int h)
switch (s->pix_fmt) {
case AV_PIX_FMT_YUV420P:
+#if CONFIG_VP9_VDPAU_HWACCEL
+ *fmtp++ = AV_PIX_FMT_VDPAU;
+#endif
case AV_PIX_FMT_YUV420P10:
#if CONFIG_VP9_DXVA2_HWACCEL
*fmtp++ = AV_PIX_FMT_DXVA2_VLD;
@@ -1817,6 +1821,9 @@ AVCodec ff_vp9_decoder = {
#if CONFIG_VP9_VAAPI_HWACCEL
HWACCEL_VAAPI(vp9),
#endif
+#if CONFIG_VP9_VDPAU_HWACCEL
+ HWACCEL_VDPAU(vp9),
+#endif
NULL
},
};