diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-27 15:16:46 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-27 15:17:20 +0300 |
commit | 751731540f5bae608a3b7755267d5a65623e35ea (patch) | |
tree | 099dc70e5da67345ba973c3ed87ea554054673f8 /libavcodec/vdpau.c | |
parent | d7aaeea5402c81c83960080c5e6086560a962419 (diff) | |
parent | ebd5320afd42d4315851f3e0ca7f5d4a6300eb68 (diff) |
Merge commit 'ebd5320afd42d4315851f3e0ca7f5d4a6300eb68'
* commit 'ebd5320afd42d4315851f3e0ca7f5d4a6300eb68':
vdpau: add support for 4:2:2 and 4:4:4 chroma sampling
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vdpau.c')
-rw-r--r-- | libavcodec/vdpau.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index 8577c19b53..7578e62a86 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -155,6 +155,10 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, if (av_vdpau_get_surface_parameters(avctx, &type, &width, &height)) return AVERROR(ENOSYS); + if (!(hwctx->flags & AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH) && + type != VDP_CHROMA_TYPE_420) + return AVERROR(ENOSYS); + status = vdctx->get_proc_address(vdctx->device, VDP_FUNC_ID_VIDEO_SURFACE_QUERY_CAPABILITIES, &func); @@ -744,7 +748,7 @@ int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device, { VDPAUHWContext *hwctx; - if (flags & ~AV_HWACCEL_FLAG_IGNORE_LEVEL) + if (flags & ~(AV_HWACCEL_FLAG_IGNORE_LEVEL|AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH)) return AVERROR(EINVAL); if (av_reallocp(&avctx->hwaccel_context, sizeof(*hwctx))) |