From: "Xiang, Haihao" <haihao.xiang-at-intel.com@ffmpeg.org> To: ffmpeg-devel@ffmpeg.org Cc: Haihao Xiang <haihao.xiang@intel.com> Subject: [FFmpeg-devel] [PATCH v12 05/13] qsv: restrict audio related code to MFX_VERSION < 2.0 Date: Mon, 25 Jul 2022 12:11:43 +0800 Message-ID: <20220725041151.7710-6-haihao.xiang@intel.com> (raw) In-Reply-To: <20220725041151.7710-1-haihao.xiang@intel.com> From: Haihao Xiang <haihao.xiang@intel.com> 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 --- libavcodec/qsv.c | 5 +++++ libavfilter/qsvvpp.c | 6 ++++++ libavfilter/qsvvpp.h | 2 ++ 3 files changed, 13 insertions(+) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 74fc8ff18e..cc4b6cfd5d 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -37,6 +37,7 @@ #define MFX_IMPL_VIA_MASK(impl) (0x0f00 & (impl)) #define QSV_HAVE_USER_PLUGIN !QSV_ONEVPL +#define QSV_HAVE_AUDIO !QSV_ONEVPL #include "mfxvp8.h" @@ -129,8 +130,10 @@ 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" }, +#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_WRN_IN_EXECUTION, 0, "operation in execution" }, { MFX_WRN_DEVICE_BUSY, 0, "device busy" }, @@ -140,7 +143,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 }; /** diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index 954f882637..3647891d13 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,8 +102,10 @@ 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" }, +#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_WRN_IN_EXECUTION, 0, "operation in execution" }, { MFX_WRN_DEVICE_BUSY, 0, "device busy" }, @@ -111,7 +115,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 }; static int qsv_map_error(mfxStatus mfx_err, const char **desc) diff --git a/libavfilter/qsvvpp.h b/libavfilter/qsvvpp.h index 543c58a967..802abd987d 100644 --- a/libavfilter/qsvvpp.h +++ b/libavfilter/qsvvpp.h @@ -40,6 +40,8 @@ ((MFX_VERSION.Major > (MAJOR)) || \ (MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR))) +#define QSV_ONEVPL QSV_VERSION_ATLEAST(2, 0) + typedef struct QSVFrame { AVFrame *frame; mfxFrameSurface1 surface; -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-07-25 4:13 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-25 4:11 [FFmpeg-devel] [PATCH v12 00/13] make QSV works with the Intel's oneVPL Xiang, Haihao 2022-07-25 4:11 ` [FFmpeg-devel] [PATCH v12 01/13] configure: ensure --enable-libmfx uses libmfx 1.x Xiang, Haihao 2022-07-25 4:11 ` [FFmpeg-devel] [PATCH v12 02/13] configure: fix the check for MFX_CODEC_VP9 Xiang, Haihao 2022-07-25 4:11 ` [FFmpeg-devel] [PATCH v12 03/13] qsv: remove mfx/ prefix from mfx headers Xiang, Haihao 2022-07-25 4:11 ` [FFmpeg-devel] [PATCH v12 04/13] qsv: restrict user plugin to MFX_VERSION < 2.0 Xiang, Haihao 2022-07-25 4:11 ` Xiang, Haihao [this message] 2022-07-25 4:11 ` [FFmpeg-devel] [PATCH v12 06/13] qsvenc: restrict multi-frame encode " Xiang, Haihao 2022-07-25 4:11 ` [FFmpeg-devel] [PATCH v12 07/13] qsvenc: restrict MFX_RATECONTROL_LA_EXT " Xiang, Haihao 2022-07-25 4:11 ` [FFmpeg-devel] [PATCH v12 08/13] qsv: restrict OPAQUE memory " Xiang, Haihao 2022-07-25 4:11 ` [FFmpeg-devel] [PATCH v12 09/13] lavu/hwcontext_qsv: add loader field to AVQSVDeviceContext Xiang, Haihao 2022-07-25 4:11 ` [FFmpeg-devel] [PATCH v12 10/13] lavu/hwcontext_qsv: make qsv hwdevice works with oneVPL Xiang, Haihao 2022-07-25 4:11 ` [FFmpeg-devel] [PATCH v12 11/13] lavc/qsv: create mfx session using oneVPL for decoding/encoding Xiang, Haihao 2022-08-01 13:33 ` Anton Khirnov 2022-08-02 8:20 ` Xiang, Haihao 2022-08-02 11:20 ` Anton Khirnov 2022-07-25 4:11 ` [FFmpeg-devel] [PATCH v12 12/13] lavfi/qsv: create mfx session using oneVPL for qsv filters Xiang, Haihao 2022-07-25 4:11 ` [FFmpeg-devel] [PATCH v12 13/13] configure: add --enable-libvpl option Xiang, Haihao 2022-08-01 13:27 ` Anton Khirnov 2022-08-11 3:10 ` Xiang, Haihao 2022-08-03 4:55 ` [FFmpeg-devel] [PATCH v12 00/13] make QSV works with the Intel's oneVPL Xiang, Haihao 2022-08-09 1:23 ` Xiang, Haihao 2022-08-12 3:02 ` Xiang, Haihao
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220725041151.7710-6-haihao.xiang@intel.com \ --to=haihao.xiang-at-intel.com@ffmpeg.org \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=haihao.xiang@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git