From: Mark Thompson <sw@jkqxz.net> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH v11 10/13] lavu/hwcontext_qsv: make qsv hwdevice works with oneVPL Date: Thu, 21 Jul 2022 23:19:39 +0100 Message-ID: <8280f7b7-cf39-722a-c189-79af71c22c7c@jkqxz.net> (raw) In-Reply-To: <20220720084006.5033-11-haihao.xiang@intel.com> On 20/07/2022 09:40, Xiang, Haihao wrote: > From: Haihao Xiang <haihao.xiang@intel.com> > > In oneVPL, MFXLoad() and MFXCreateSession() are required to create a > workable mfx session[1] > > Add config filters for D3D9/D3D11 session (galinart) > > The default device is changed to d3d11va for oneVPL when both d3d11va > and dxva2 are enabled on Microsoft Windows > > This is in preparation for oneVPL support > > [1] https://spec.oneapi.io/versions/latest/elements/oneVPL/source/programming_guide/VPL_prg_session.html#onevpl-dispatcher > > Co-authored-by: galinart <artem.galin@intel.com> > Signed-off-by: galinart <artem.galin@intel.com> > Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> > --- > libavutil/hwcontext_qsv.c | 531 +++++++++++++++++++++++++++++++++++--- > 1 file changed, 493 insertions(+), 38 deletions(-) > > diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c > index 21a2a805f8..90b7988dec 100644 > --- a/libavutil/hwcontext_qsv.c > +++ b/libavutil/hwcontext_qsv.c > ... > + > +static int qsv_va_update_config(void *ctx, mfxHDL handle, mfxConfig cfg) > +{ > +#if CONFIG_VAAPI > +#if VA_CHECK_VERSION(1, 5, 0) > +#define LOCAL_VADISPLAYPCIID VADisplayPCIID > +#else > +#define LOCAL_VADISPLAYPCIID 21 > +#endif This seems to be handling the case where you built the driver against a newer version of libva containing the field but then downgraded it before building ffmpeg? Who are you expecting to do that? > + mfxStatus sts; > + VADisplay dpy = handle; > + VAStatus vas; > + VADisplayAttribute attr = { > + .type = LOCAL_VADISPLAYPCIID > + }; > + mfxVariant impl_value; > + > + vas = vaGetDisplayAttributes(dpy, &attr, 1); > + if (vas == VA_STATUS_SUCCESS && attr.flags != VA_DISPLAY_ATTRIB_NOT_SUPPORTED) { > + impl_value.Type = MFX_VARIANT_TYPE_U16; > + impl_value.Data.U16 = (attr.value & 0xFFFF); > + sts = MFXSetConfigFilterProperty(cfg, > + (const mfxU8 *)"mfxExtendedDeviceId.DeviceID", impl_value); > + if (sts != MFX_ERR_NONE) { > + av_log(ctx, AV_LOG_ERROR, "Error adding a MFX configuration" > + "DeviceID property: %d.\n", sts); > + goto fail; > + } > + } else { > + av_log(ctx, AV_LOG_ERROR, "Failed to get device id from the driver. Please " > + "consider to upgrade the driver to support VA-API 1.5.0. \n"); > + goto fail; > + } The use of the PCI ID doesn't make sense to me here? A PCI ID tells you the type of the device, not which device it was - given that the normal use-case for multiple devices in servers generally has lots of idential ones this does not seem helpful. > + > + return 0; > + > +fail: > +#endif > + return AVERROR_UNKNOWN; > +} > + > ... - Mark _______________________________________________ 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-21 22:20 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-20 8:39 [FFmpeg-devel] [PATCH v11 00/13] make QSV works with the Intel's oneVPL Xiang, Haihao 2022-07-20 8:39 ` [FFmpeg-devel] [PATCH v11 01/13] configure: ensure --enable-libmfx uses libmfx 1.x Xiang, Haihao 2022-07-20 8:39 ` [FFmpeg-devel] [PATCH v11 02/13] configure: fix the check for MFX_CODEC_VP9 Xiang, Haihao 2022-07-20 8:39 ` [FFmpeg-devel] [PATCH v11 03/13] qsv: remove mfx/ prefix from mfx headers Xiang, Haihao 2022-07-20 8:39 ` [FFmpeg-devel] [PATCH v11 04/13] qsv: load user plugin for MFX_VERSION < 2.0 Xiang, Haihao 2022-07-20 8:39 ` [FFmpeg-devel] [PATCH v11 05/13] qsv: build audio related code when " Xiang, Haihao 2022-07-20 8:39 ` [FFmpeg-devel] [PATCH v11 06/13] qsvenc: support multi-frame encode " Xiang, Haihao 2022-07-20 22:45 ` Andreas Rheinhardt 2022-07-21 5:20 ` Xiang, Haihao 2022-07-20 8:40 ` [FFmpeg-devel] [PATCH v11 07/13] qsvenc: support MFX_RATECONTROL_LA_EXT " Xiang, Haihao 2022-07-20 8:40 ` [FFmpeg-devel] [PATCH v11 08/13] qsv: support OPAQUE memory " Xiang, Haihao 2022-07-20 8:40 ` [FFmpeg-devel] [PATCH v11 09/13] lavu/hwcontext_qsv: add loader field to AVQSVDeviceContext Xiang, Haihao 2022-07-20 8:40 ` [FFmpeg-devel] [PATCH v11 10/13] lavu/hwcontext_qsv: make qsv hwdevice works with oneVPL Xiang, Haihao 2022-07-21 22:19 ` Mark Thompson [this message] 2022-07-22 3:10 ` Xiang, Haihao 2022-07-20 8:40 ` [FFmpeg-devel] [PATCH v11 11/13] lavc/qsv: create mfx session using oneVPL for decoding/encoding Xiang, Haihao 2022-07-20 8:40 ` [FFmpeg-devel] [PATCH v11 12/13] lavfi/qsv: create mfx session using oneVPL for qsv filters Xiang, Haihao 2022-07-20 8:40 ` [FFmpeg-devel] [PATCH v11 13/13] configure: add --enable-libvpl option 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=8280f7b7-cf39-722a-c189-79af71c22c7c@jkqxz.net \ --to=sw@jkqxz.net \ --cc=ffmpeg-devel@ffmpeg.org \ /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