aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/qsvvpp.c
diff options
context:
space:
mode:
authorHaihao Xiang <haihao.xiang@intel.com>2020-08-18 15:30:32 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2022-08-12 10:43:39 +0800
commit40684899e8fd22aff9ba59fc9941c9bab7165117 (patch)
tree451689ecd3898dceb82a863dd15afbbea648f8af /libavfilter/qsvvpp.c
parent6aea2243824e1c0bb7c259912a6d6f7e537545ee (diff)
downloadffmpeg-40684899e8fd22aff9ba59fc9941c9bab7165117.tar.gz
qsv: restrict audio related code to MFX_VERSION < 2.0
Audio isn't supported for MFX_VERSION >= 2.0[1][2]. This is in preparation for oneVPL support [1] https://spec.oneapi.io/versions/latest/elements/oneVPL/source/VPL_intel_media_sdk.html#msdk-full-name-feature-removals [2] https://github.com/oneapi-src/oneVPL
Diffstat (limited to 'libavfilter/qsvvpp.c')
-rw-r--r--libavfilter/qsvvpp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c
index 16d616382c..e849245133 100644
--- a/libavfilter/qsvvpp.c
+++ b/libavfilter/qsvvpp.c
@@ -38,6 +38,8 @@
#define IS_SYSTEM_MEMORY(mode) (mode & MFX_MEMTYPE_SYSTEM_MEMORY)
#define MFX_IMPL_VIA_MASK(impl) (0x0f00 & (impl))
+#define QSV_HAVE_AUDIO !QSV_ONEVPL
+
static const AVRational default_tb = { 1, 90000 };
typedef struct QSVAsyncFrame {
@@ -100,10 +102,12 @@ static const struct {
{ MFX_ERR_INVALID_VIDEO_PARAM, AVERROR(EINVAL), "invalid video parameters" },
{ MFX_ERR_UNDEFINED_BEHAVIOR, AVERROR_BUG, "undefined behavior" },
{ MFX_ERR_DEVICE_FAILED, AVERROR(EIO), "device failed" },
- { MFX_ERR_GPU_HANG, AVERROR(EIO), "GPU Hang" },
- { MFX_ERR_REALLOC_SURFACE, AVERROR_UNKNOWN, "need bigger surface for output" },
+#if QSV_HAVE_AUDIO
{ MFX_ERR_INCOMPATIBLE_AUDIO_PARAM, AVERROR(EINVAL), "incompatible audio parameters" },
{ MFX_ERR_INVALID_AUDIO_PARAM, AVERROR(EINVAL), "invalid audio parameters" },
+#endif
+ { MFX_ERR_GPU_HANG, AVERROR(EIO), "GPU Hang" },
+ { MFX_ERR_REALLOC_SURFACE, AVERROR_UNKNOWN, "need bigger surface for output" },
{ MFX_WRN_IN_EXECUTION, 0, "operation in execution" },
{ MFX_WRN_DEVICE_BUSY, 0, "device busy" },
@@ -113,7 +117,9 @@ static const struct {
{ MFX_WRN_VALUE_NOT_CHANGED, 0, "value is saturated" },
{ MFX_WRN_OUT_OF_RANGE, 0, "value out of range" },
{ MFX_WRN_FILTER_SKIPPED, 0, "filter skipped" },
+#if QSV_HAVE_AUDIO
{ MFX_WRN_INCOMPATIBLE_AUDIO_PARAM, 0, "incompatible audio parameters" },
+#endif
#if QSV_VERSION_ATLEAST(1, 31)
{ MFX_ERR_NONE_PARTIAL_OUTPUT, 0, "partial output" },