From patchwork Wed Jul 20 08:40:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 36863 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2255428pzb; Wed, 20 Jul 2022 01:41:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tkc6/IotKBqOfk8/l/QVlgLQhrnOwFDm25JKJHv+BlqTCnVuWdUYueoJ9fuZhNgL1rV4jp X-Received: by 2002:a17:906:9b14:b0:72b:97ac:c30c with SMTP id eo20-20020a1709069b1400b0072b97acc30cmr35103594ejc.588.1658306511956; Wed, 20 Jul 2022 01:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658306511; cv=none; d=google.com; s=arc-20160816; b=Jg7UVNpyfWQaBi1XzAH8ppLJ1ItsmUk6pUSDIOMVs/gFvD4T7j6pBr5S96H8JKgzF/ rCOwS4yBTRk7/+pQUUDIJFxUsATRdGdbS8sJI1htfvTHpUSmjCRzCvSJkhNmfmVQEaY8 6PmHAFSImuItVmrPj8eRJpv5DlzfR70bSufSIRxxRYMU2Nh19iEcLBIb1H6sYoPLPSRz Pjh57J4CjefaN61+9x2LDYSFarCKL0P4vh+g9xwyCatn8h5nXyHhpERDhaXLy2xYTtCj LQ1x6l6zahDvqSl45u9PBipBs5W5jnfX2Eq5z5vAtyh2O3kaZTZIvVe/Ypd9sMlpwZsk rWUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=q6CyBPUyjTbkJrX+c/mAirBpLEYGrfKgsPk+Pxls2pc=; b=Xf8GxT0zgz1Q+VAGzg/jUEdDkApAZ7nen2CSEd7IV71H6ElwWxi2sJNLFQplpulRhg JhLmuyRqyd2y+udyeGjMC0ZSULn1GZmtJGhxeA5Go+Ppr9cgP3q80F0ui6vzQOhV8JsC DIlohOt/L6F6h+5egbjf/FBKNxRMqpFlDKt2aygQfr79XN40G41DY448zEyUUlPwyCsG CLkqkToGhjrxI7bE5Vn7Nfl9jbRBm69X+A1+KReHeua6sUEinpvPRyuYnHiKYFZJckd/ bSubJJ3rQrWVhJoSuLu3JimxClYUZtuOr1dRoQOsZuEdetaKRNw6tJ6ZycUsTAtWKNnu wNlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=f9lFXNda; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n9-20020a05640205c900b0042e1708c0ebsi7678264edx.579.2022.07.20.01.41.51; Wed, 20 Jul 2022 01:41:51 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=f9lFXNda; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A77AF68B800; Wed, 20 Jul 2022 11:40:45 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D108868B671 for ; Wed, 20 Jul 2022 11:40:41 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658306442; x=1689842442; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Ku82n9OlQ4KwO5Tu9boTbaX37MVWsRzgUq4BFZTYncU=; b=f9lFXNdaVi1UJ6ljSoJDfKyVQQJxDESBC1zs2Z5odQVA/q56V3CbWVkB eSkvekchEYN0Rwn+XMJFCRGMZkBbR+39pqHs2cs2GA1A4IqgEOj7BglAM ZN/hXJaQDTBHGjgUomUBerZyT3nGWTN4Lt18MrI5USl7OSQAAmCY4BU3C Wb5tqjTL7K3QH+EJ7JMSwk/wTlBtsvg5sxVDCccNLcZjzp5Ji6r9YD22J dbQWuZTr7qO0g1k2PismAyCMu0lbJPEKNLKPuIaFdgsgQGYpWI0tiunAT PDK1EXUerx7dv2OLoEZbtMu3B26DsNmBZJv5dlMw+/lkN28bStmcc0H4v A==; X-IronPort-AV: E=McAfee;i="6400,9594,10413"; a="348412542" X-IronPort-AV: E=Sophos;i="5.92,286,1650956400"; d="scan'208";a="348412542" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2022 01:40:37 -0700 X-IronPort-AV: E=Sophos;i="5.92,286,1650956400"; d="scan'208";a="625574703" Received: from xhh-dg164.sh.intel.com ([10.238.5.169]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2022 01:40:36 -0700 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Wed, 20 Jul 2022 16:40:02 +0800 Message-Id: <20220720084006.5033-10-haihao.xiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220720084006.5033-1-haihao.xiang@intel.com> References: <20220720084006.5033-1-haihao.xiang@intel.com> Subject: [FFmpeg-devel] [PATCH v11 09/13] lavu/hwcontext_qsv: add loader field to AVQSVDeviceContext 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 Cc: Haihao Xiang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: PizP1LXLrpSF From: Haihao Xiang In oneVPL, a valid mfxLoader handle is needed when creating mfx session for decoding, encoding and processing[1], so add loader field to AVQSVDeviceContext. User should fill this field before calling av_hwdevice_ctx_init() if using oneVPL 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 --- doc/APIchanges | 3 +++ libavutil/hwcontext_qsv.h | 11 +++++++++++ libavutil/version.h | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index b3563cd528..265361c979 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,9 @@ libavutil: 2021-04-27 API changes, most recent first: +2022-07-xx - xxxxxxxxxx - lavu 57.31.100 - hwcontext_qsv.h + Add loader field to AVQSVDeviceContext + 2022-07-xx - xxxxxxxxxx - lavu 57.30.100 - frame.h Add AVFrame.duration, deprecate AVFrame.pkt_duration. diff --git a/libavutil/hwcontext_qsv.h b/libavutil/hwcontext_qsv.h index 42e34d0dda..e2dba8ad83 100644 --- a/libavutil/hwcontext_qsv.h +++ b/libavutil/hwcontext_qsv.h @@ -34,6 +34,17 @@ */ typedef struct AVQSVDeviceContext { mfxSession session; + /** + * The mfxLoader handle used for mfxSession creation + * + * This field is only available for oneVPL user. For non-oneVPL user, this + * field must be set to NULL. + * + * Filled by the user before calling av_hwdevice_ctx_init() and should be + * cast to mfxLoader handle. Deallocating the AVHWDeviceContext will always + * release this interface. + */ + void *loader; } AVQSVDeviceContext; /** diff --git a/libavutil/version.h b/libavutil/version.h index ee4c531b80..e9eefcdb2c 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 57 -#define LIBAVUTIL_VERSION_MINOR 30 +#define LIBAVUTIL_VERSION_MINOR 31 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \