From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 17991436C2 for ; Thu, 21 Jul 2022 22:20:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 12F5D68ABCF; Fri, 22 Jul 2022 01:20:16 +0300 (EEST) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AEBFD68AF3B for ; Fri, 22 Jul 2022 01:20:09 +0300 (EEST) Received: by mail-wr1-f47.google.com with SMTP id h9so4222066wrm.0 for ; Thu, 21 Jul 2022 15:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=1wReb81KJyBJNvXYGOLKtUYdj7GGzzaEvCs6V6FZHlA=; b=jXdZN/ua04QSzno7pTL9SLZ0DeDjc8xA3vDXZdFG1q0Pi7o/nuAmuUd44stoFvsUln CRU7ja/BqxAenGJgpTqRkgNyuvXhp0hfwTAdAjaQnkAsK4C/IMJW2VlYfFh8Qo/52e3D IDXsm05vdLjSSwAeISM1RJ4z7GthIA/ncVsaAz4ea+GMikKC22ahoIRZMBVjoKUlfc0I 8ScgN/MVZzMwG8qpSqGotM9FNK4uCTxkq5iIqLrk1Z8VWt8+oTkplgturxepBxJSpkmb 7HmgbWYIIPpu0OPnF9JVxhDIJNUxlMKGzq6jnij4Py05RCSmJ0tCPtezJOwrgZOQh5vL A+DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=1wReb81KJyBJNvXYGOLKtUYdj7GGzzaEvCs6V6FZHlA=; b=FGFz+r1B/xecxQao/u6qC4Xue1xsrvuTnvOH2Bemi/1DRh5XV7MBL2pY3AJqXIJjI/ /L3vPX/zrc8H5FG0X1JssTjJxkWlvQ3DtTJplOOFrDBi40jpEnwhwBjXZX1Z4TDzv3sN /+kEZfuy5S1xWUkRZKn8Ju+cYfmS4+1un4B1nY2udfBYUA22LHsSfK2+H0eRQBXPsL3A DaBbeofADnFNPiiDAoFwtUV/4VnyzdK9r805wcThp1LAaFtSah+QYNaqZDpYqCy/tAOY 2gDkBTqbuUTkHp12fTVrhZzu7gmQw6eDZAGu2qGUxpoVTSFHAqglLaWKPB35LcHoxmcp fsbQ== X-Gm-Message-State: AJIora+UsyljjqTGgT7fH4rLenueRNugZSqrMZLblYucOjKNql7Io50/ dBYmH+1ZKmAyuiq6u2Mr/jRePFHQNmFDcg== X-Google-Smtp-Source: AGRyM1uNFtgJb+nSP8GHBIRDjJv9cw/56QK7lgZs4JG041j69aoJRvxprkPcwdjN5gYLmsBN00TVqQ== X-Received: by 2002:a5d:6a4c:0:b0:21e:46d4:6eec with SMTP id t12-20020a5d6a4c000000b0021e46d46eecmr347848wrw.375.1658442009025; Thu, 21 Jul 2022 15:20:09 -0700 (PDT) Received: from [192.168.0.14] (cpc91224-cmbg18-2-0-cust209.5-4.cable.virginm.net. [81.106.228.210]) by smtp.gmail.com with ESMTPSA id j38-20020a05600c48a600b003a2f6367049sm2749381wmp.48.2022.07.21.15.20.06 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Jul 2022 15:20:06 -0700 (PDT) Message-ID: <8280f7b7-cf39-722a-c189-79af71c22c7c@jkqxz.net> Date: Thu, 21 Jul 2022 23:19:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220720084006.5033-1-haihao.xiang@intel.com> <20220720084006.5033-11-haihao.xiang@intel.com> From: Mark Thompson In-Reply-To: <20220720084006.5033-11-haihao.xiang@intel.com> Subject: Re: [FFmpeg-devel] [PATCH v11 10/13] lavu/hwcontext_qsv: make qsv hwdevice works with oneVPL X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 20/07/2022 09:40, Xiang, Haihao wrote: > From: Haihao Xiang > > 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 > Signed-off-by: galinart > Signed-off-by: Haihao Xiang > --- > 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".