mirror of
https://github.com/mpv-player/mpv
synced 2024-09-12 23:45:53 +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:
parent
a48a8a746e
commit
2172c22ee3
@ -65,6 +65,8 @@ struct priv {
|
|||||||
struct mp_image_pool *sw_pool;
|
struct mp_image_pool *sw_pool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define HAS_HEVC VA_CHECK_VERSION(0, 38, 0)
|
||||||
|
|
||||||
#define PE(av_codec_id, ff_profile, vdp_profile) \
|
#define PE(av_codec_id, ff_profile, vdp_profile) \
|
||||||
{AV_CODEC_ID_ ## av_codec_id, FF_PROFILE_ ## ff_profile, \
|
{AV_CODEC_ID_ ## av_codec_id, FF_PROFILE_ ## ff_profile, \
|
||||||
VAProfile ## vdp_profile}
|
VAProfile ## vdp_profile}
|
||||||
@ -84,6 +86,10 @@ static const struct hwdec_profile_entry profiles[] = {
|
|||||||
PE(WMV3, VC1_ADVANCED, VC1Advanced),
|
PE(WMV3, VC1_ADVANCED, VC1Advanced),
|
||||||
PE(WMV3, VC1_MAIN, VC1Main),
|
PE(WMV3, VC1_MAIN, VC1Main),
|
||||||
PE(WMV3, VC1_SIMPLE, VC1Simple),
|
PE(WMV3, VC1_SIMPLE, VC1Simple),
|
||||||
|
#if HAS_HEVC
|
||||||
|
PE(HEVC, HEVC_MAIN, HEVCMain),
|
||||||
|
PE(HEVC, HEVC_MAIN_10, HEVCMain10),
|
||||||
|
#endif
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -103,6 +109,10 @@ static const char *str_va_profile(VAProfile profile)
|
|||||||
PROFILE(VC1Simple);
|
PROFILE(VC1Simple);
|
||||||
PROFILE(VC1Main);
|
PROFILE(VC1Main);
|
||||||
PROFILE(VC1Advanced);
|
PROFILE(VC1Advanced);
|
||||||
|
#if HAS_HEVC
|
||||||
|
PROFILE(HEVCMain);
|
||||||
|
PROFILE(HEVCMain10);
|
||||||
|
#endif
|
||||||
#undef PROFILE
|
#undef PROFILE
|
||||||
}
|
}
|
||||||
return "<unknown>";
|
return "<unknown>";
|
||||||
|
Loading…
Reference in New Issue
Block a user