summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authoragalin89 <[email protected]>2020-10-22 14:02:21 +0100
committerScott <[email protected]>2020-11-12 19:36:59 +0000
commit25fd847fc82af409afc46c9b273e072bc80b7dbd (patch)
treecd66c10abd8332d77519ff5028252de7e64646e3 /libhb
parentcc7b7e6878617573b9e8251830c92488a8b4b5a5 (diff)
qsv: added AV1 HW decoding capabilities
Diffstat (limited to 'libhb')
-rw-r--r--libhb/decavcodec.c10
-rw-r--r--libhb/handbrake/ports.h1
-rw-r--r--libhb/handbrake/qsv_common.h1
-rw-r--r--libhb/ports.c6
-rw-r--r--libhb/qsv_common.c9
5 files changed, 22 insertions, 5 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index f1722a92a..091a2786d 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -2113,7 +2113,15 @@ static int decavcodecvInfo( hb_work_object_t *w, hb_work_info_t *info )
info->video_decode_support |= HB_DECODE_SUPPORT_QSV;
}
break;
-
+ case AV_CODEC_ID_AV1:
+ if ((qsv_hardware_generation(hb_get_cpu_platform()) >= QSV_G8) &&
+ (pv->context->pix_fmt == AV_PIX_FMT_YUV420P ||
+ pv->context->pix_fmt == AV_PIX_FMT_YUVJ420P ||
+ pv->context->pix_fmt == AV_PIX_FMT_YUV420P10LE))
+ {
+ info->video_decode_support |= HB_DECODE_SUPPORT_QSV;
+ }
+ break;
default:
break;
}
diff --git a/libhb/handbrake/ports.h b/libhb/handbrake/ports.h
index f602a08a4..fac8d0eee 100644
--- a/libhb/handbrake/ports.h
+++ b/libhb/handbrake/ports.h
@@ -74,6 +74,7 @@ enum hb_cpu_platform
HB_CPU_PLATFORM_INTEL_SKL,
HB_CPU_PLATFORM_INTEL_KBL,
HB_CPU_PLATFORM_INTEL_ICL,
+ HB_CPU_PLATFORM_INTEL_TGL,
};
int hb_get_cpu_count(void);
int hb_get_cpu_platform(void);
diff --git a/libhb/handbrake/qsv_common.h b/libhb/handbrake/qsv_common.h
index 563b01789..3ac8776a2 100644
--- a/libhb/handbrake/qsv_common.h
+++ b/libhb/handbrake/qsv_common.h
@@ -127,6 +127,7 @@ enum
QSV_G5, // Skylake or equivalent
QSV_G6, // Kaby Lake or equivalent
QSV_G7, // Ice Lake or equivalent
+ QSV_G8, // Tiger Lake or equivalent
QSV_FU, // always last (future processors)
};
diff --git a/libhb/ports.c b/libhb/ports.c
index 06a34080f..e16c4a272 100644
--- a/libhb/ports.c
+++ b/libhb/ports.c
@@ -285,6 +285,8 @@ const char* hb_get_cpu_platform_name()
return "Intel microarchitecture Kaby Lake";
case HB_CPU_PLATFORM_INTEL_ICL:
return "Intel microarchitecture Ice Lake";
+ case HB_CPU_PLATFORM_INTEL_TGL:
+ return "Intel microarchitecture Tiger Lake";
default:
return NULL;
}
@@ -377,6 +379,10 @@ static void init_cpu_info()
break;
case 0x7E:
hb_cpu_info.platform = HB_CPU_PLATFORM_INTEL_ICL;
+ break;
+ case 0x8C:
+ hb_cpu_info.platform = HB_CPU_PLATFORM_INTEL_TGL;
+ break;
default:
break;
}
diff --git a/libhb/qsv_common.c b/libhb/qsv_common.c
index ee3868f9d..e2e51e3fc 100644
--- a/libhb/qsv_common.c
+++ b/libhb/qsv_common.c
@@ -133,6 +133,8 @@ int qsv_hardware_generation(int cpu_platform)
return QSV_G6;
case HB_CPU_PLATFORM_INTEL_ICL:
return QSV_G7;
+ case HB_CPU_PLATFORM_INTEL_TGL:
+ return QSV_G8;
default:
return QSV_FU;
}
@@ -388,10 +390,6 @@ static int query_capabilities(mfxSession session, mfxVersion version, hb_qsv_inf
info->capabilities |= HB_QSV_CAP_LOWPOWER_ENCODE;
}
}
- else
- {
- hb_error("query_capabilities: adapters_info->NumActual=%d", adapters_info->NumActual);
- }
#endif
}
else
@@ -1031,6 +1029,9 @@ const char* hb_qsv_decode_get_codec_name(enum AVCodecID codec_id)
case AV_CODEC_ID_MPEG2VIDEO:
return "mpeg2_qsv";
+ case AV_CODEC_ID_AV1:
+ return "av1_qsv";
+
default:
return NULL;
}