1
mirror of https://github.com/mpv-player/mpv synced 2024-08-28 05:46:13 +02:00

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.)
This commit is contained in:
wm4 2015-08-24 23:00:45 +02:00
parent a48a8a746e
commit 2172c22ee3

View File

@ -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 "<unknown>";