From 2172c22ee344b9bef0d3bb3bde99615194291d23 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 24 Aug 2015 23:00:45 +0200 Subject: [PATCH] vaapi: add HEVC profile entries libavcodec does not support HEVC via VAAPI yet, so this won't work. However, there is ongoing work to add HEVC support to VAAPI, and this change might help with testing. (Or maybe not - but there is no harm in this change.) --- video/decode/vaapi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/video/decode/vaapi.c b/video/decode/vaapi.c index 33dfb365b8..f88e44661e 100644 --- a/video/decode/vaapi.c +++ b/video/decode/vaapi.c @@ -65,6 +65,8 @@ struct priv { struct mp_image_pool *sw_pool; }; +#define HAS_HEVC VA_CHECK_VERSION(0, 38, 0) + #define PE(av_codec_id, ff_profile, vdp_profile) \ {AV_CODEC_ID_ ## av_codec_id, FF_PROFILE_ ## ff_profile, \ VAProfile ## vdp_profile} @@ -84,6 +86,10 @@ static const struct hwdec_profile_entry profiles[] = { PE(WMV3, VC1_ADVANCED, VC1Advanced), PE(WMV3, VC1_MAIN, VC1Main), PE(WMV3, VC1_SIMPLE, VC1Simple), +#if HAS_HEVC + PE(HEVC, HEVC_MAIN, HEVCMain), + PE(HEVC, HEVC_MAIN_10, HEVCMain10), +#endif {0} }; @@ -103,6 +109,10 @@ static const char *str_va_profile(VAProfile profile) PROFILE(VC1Simple); PROFILE(VC1Main); PROFILE(VC1Advanced); +#if HAS_HEVC + PROFILE(HEVCMain); + PROFILE(HEVCMain10); +#endif #undef PROFILE } return "";