From patchwork Mon Jul 25 04:11:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 36945 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp1814677pzb; Sun, 24 Jul 2022 21:13:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u0RA+Se8iJrwwzu/+s5FKnrZ/wbW4FgKz5hP3lF+JIvDznOBs0oODWebwrRra1lH2irHEt X-Received: by 2002:aa7:df07:0:b0:43b:de50:3573 with SMTP id c7-20020aa7df07000000b0043bde503573mr10009921edy.367.1658722411249; Sun, 24 Jul 2022 21:13:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658722411; cv=none; d=google.com; s=arc-20160816; b=GjQ+8AuWgDiQC3+ZLxo3G2KqkEd8QHQ18YgLezA1gWuR/SIvb2+6hx/eI79/mx7Ovu +V03oIbhCM4gpJ390qO3XuAZLq9Kg8jyfmzFOvcE64Q23kGYiLlhiIQlGLlUwRAfgFxI SIGih9LBeAh/YHWuZ3Fz+L+PIK0fzKL5w1RKpDr5kzcEdd0FhrwgYFDvpxERKPe2ctLq zO3rqpbkvaZMxPovAaBhSuPsfW8fAUh/NCbJN9DQlWK6gos7h0QvsIbzxBvAMbwRlmaQ 24HihD9BSpDDp9TskP0uEKp9oXYZP7DAqAQueEfPd5IZsJz8ptGkD51XAB0i/GpvISVO PDJg== 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=Doq8zWunnF+tN7Ly5VUNThELOmRm9owiT9pSGw8i1sEmWD2rEkXPu7kNml1ojatCqm XSpBU9iM/GY6RlyJ2FtAB/hPu0ae8X8PcQ+IxPO412lrhcxCMrlKlbNXuiJduFtePta3 bqsXqeu57NAklWPzU6bw0XsfZ8MCQngfmSwfR27aQHRD2QS682HbQ+OAhmOETwmaBOyH RwxAgG7Rq3lC/U1Bp0a374fxGWcS3RYC7HnpeLjErMz6N1FSlgMIfn3yZr/5kBtW8c6X Fd2G4+Sc+u/aEDij9Yx7vS0HmAG37IA6Fv9cK24Ur5itu6+zd/9aO8sMsYG4tevhXwRC sCSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=BLNPc+4Q; 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 gt13-20020a1709072d8d00b007156fe1aa6asi14208856ejc.650.2022.07.24.21.13.30; Sun, 24 Jul 2022 21:13:31 -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=BLNPc+4Q; 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 9FDE468B804; Mon, 25 Jul 2022 07:12:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EC02F68B72C for ; Mon, 25 Jul 2022 07:12:18 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658722339; x=1690258339; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Ku82n9OlQ4KwO5Tu9boTbaX37MVWsRzgUq4BFZTYncU=; b=BLNPc+4Q4XHpxvaiGmcDrdbL1EHmuogrj796VyHs+Lz1Nw+V0fgosotp +5ANbFSbr3DcXvmwGLsh/B6gp5tM4L8Kwo2UYa9L2ebU5yNkIfUUgtM+1 yMyil+NdZMCnPxykwQat+PU88fg8vaO1qc2+QunOXCrNJ8izSuf99mJ2I +RAYx3XKL1X1BfNK4i/2bDl/M0ea5rax0Xw/p9Nh4F6MUlH0I3DkEqjyV dpczo1MSU0ulOkr+QzAgLEUR3dANCWd4XAk2aer92ZcFdZRKLqco1nZ/t ssaohZxWk2UETO64a3INrmE7IImOZD+1SD6d2vipZ0Z1okkjMFM/lqw3G w==; X-IronPort-AV: E=McAfee;i="6400,9594,10418"; a="274468228" X-IronPort-AV: E=Sophos;i="5.93,191,1654585200"; d="scan'208";a="274468228" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2022 21:12:12 -0700 X-IronPort-AV: E=Sophos;i="5.93,191,1654585200"; d="scan'208";a="596544034" Received: from xhh-dg164.sh.intel.com ([10.238.5.169]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2022 21:12:11 -0700 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Jul 2022 12:11:47 +0800 Message-Id: <20220725041151.7710-10-haihao.xiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220725041151.7710-1-haihao.xiang@intel.com> References: <20220725041151.7710-1-haihao.xiang@intel.com> Subject: [FFmpeg-devel] [PATCH v12 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: erk8fa+K/Rus 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, \