summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorDmitrichenko, Max <[email protected]>2020-01-04 22:49:14 +0100
committerScott <[email protected]>2020-01-09 19:18:04 +0000
commit2d6cd536a07f3416a84525777b0b907036a3d7dc (patch)
tree1713855efbf2519ce822057b516da4d039a1717c /libhb
parent1787be38b4e3722a7a3affca53d891ebc253f018 (diff)
qsv: better codec check against hw
Diffstat (limited to 'libhb')
-rw-r--r--libhb/qsv_common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libhb/qsv_common.c b/libhb/qsv_common.c
index 0af10b9fb..48a70caa2 100644
--- a/libhb/qsv_common.c
+++ b/libhb/qsv_common.c
@@ -928,7 +928,7 @@ hb_list_t* hb_qsv_load_plugins(hb_qsv_info_t *info, mfxSession session, mfxVersi
if (HB_CHECK_MFX_VERSION(version, 1, 8))
{
- if (info->codec_id == MFX_CODEC_HEVC)
+ if (info->codec_id == MFX_CODEC_HEVC && !(qsv_hardware_generation(hb_get_cpu_platform()) < QSV_G5))
{
if (HB_CHECK_MFX_VERSION(version, 1, 15) &&
qsv_implementation_is_hardware(info->implementation))
@@ -994,7 +994,9 @@ const char* hb_qsv_decode_get_codec_name(enum AVCodecID codec_id)
int hb_qsv_decode_is_enabled(hb_job_t *job)
{
return ((job != NULL && job->qsv.decode) &&
- (job->title->video_decode_support & HB_DECODE_SUPPORT_QSV));
+ (job->title->video_decode_support & HB_DECODE_SUPPORT_QSV)) &&
+ (job->vcodec == HB_VCODEC_QSV_H265 ? (qsv_hardware_generation(hb_get_cpu_platform()) >= QSV_G5) : 1) &&
+ (job->vcodec == HB_VCODEC_QSV_H265_10BIT ? (qsv_hardware_generation(hb_get_cpu_platform()) >= QSV_G6) : 1);
}
static int hb_dxva2_device_check();