diff options
author | Rémi Denis-Courmont <remi@remlab.net> | 2014-12-19 19:15:10 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-12-25 20:47:49 +0100 |
commit | ebd5320afd42d4315851f3e0ca7f5d4a6300eb68 (patch) | |
tree | a2a8dc221d858cc706512f4f13b818ac2d3becdd /libavcodec/vdpau.c | |
parent | c220a60f92dde9c7c118fc4deddff5c1f617cda9 (diff) | |
download | ffmpeg-ebd5320afd42d4315851f3e0ca7f5d4a6300eb68.tar.gz |
vdpau: add support for 4:2:2 and 4:4:4 chroma sampling
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
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 ea67314f93..8606624a85 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -142,6 +142,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); @@ -371,7 +375,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))) |