From patchwork Wed Jul 20 08:39:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 34770 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2254890pzb; Wed, 20 Jul 2022 01:40:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vzwvoyWqJvdWvtKlnrIZXqoJDL9Uzoggztns0u5EC/XIpfBEJ+dHgARk3n+JUE7jB3oeSC X-Received: by 2002:a05:6402:500b:b0:431:78d0:bf9d with SMTP id p11-20020a056402500b00b0043178d0bf9dmr48636587eda.184.1658306436202; Wed, 20 Jul 2022 01:40:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658306436; cv=none; d=google.com; s=arc-20160816; b=lQro8T1Syp3c/zH6Ss6Hb6jV5D0Exm+d99qWAdyQCKPdHG0x9+8vGAA0kdDRt07uya 3U/Ln45rWK6JzK2z934gGvpp2lN6Qxes0QQdzshtVO0Ja1fzRgjuRIiHY4n0Qyo9hu3c OO5V8gYZRDc44tlpMs/c11OIfusNmKPxumFH/NOtFmWydVnqwVX1eyahfYsC60mzbhx3 noAoBNEl5pv057MOww4ijYTqu9iq+doVoYgusB4o2Op9QlMzCN19uHdGj1wBsF34Xj+s BZoy2fnJjSRN93+lKPaqJXiLL6axk7C4MO/eqdzFQQWHA3svMdiUNxDtQJbUTjR9TdJB gQWA== 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:message-id:date:to:from:dkim-signature :delivered-to; bh=kPnvHwhK9Xu7RsB3CRasCE9yyXY71JtuEpzSaAw77k4=; b=xtLnyIY+Iex5/5EbavtfqE3fMPoAw7GWZOjlKzOUQG5aJUMRDPUvcfwqRsf6cE5QC/ Tofjfgv5uW2Qz5E41euiakmdV3u+vpWoVP+00Yk4UBY6y+hrNamMXd/ZOBePagxtkxir DNeyZDkrtCCIvC056XEvwpZfFCgbm4aQwOVByHPaw2lS4w2OuU0j7PgQ64lF5CiKSUAw va3E7/BkC4HtFjWKEzqkTx95B8BaJ0iBx7sINvGkTB11NPgZhhOO2XPpCTjkG4N1Uk1w LvvA5rWUn6owq9Ys/R2VY/OLfE0PWHKhnjkgK3oe9CXdlvrorOI8m5Dm81CjWIBQXZna w3LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=X3mMfqFh; 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 d11-20020a17090694cb00b0072af12dbfafsi2162569ejy.941.2022.07.20.01.40.35; Wed, 20 Jul 2022 01:40:36 -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=X3mMfqFh; 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 2E0EA68B5FF; Wed, 20 Jul 2022 11:40:32 +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 A55CF68B444 for ; Wed, 20 Jul 2022 11:40:24 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658306429; x=1689842429; h=from:to:cc:subject:date:message-id; bh=aHK5p69EjCUFcwtPxczZfCKJXKnkku5pUxUwR6pUaCA=; b=X3mMfqFhHd9Xvt9MtMMMCqrYa0spg3a5SvA68Q8FXDaIYzOcxDc/wt2j Z/R3+NktikDdVm540IwBKLI/YRiyfC8Un9qmko+Jh3KIOy3lh9FMqEbP/ UP/Wu7+pkzKy9cmov7zlUFdQiZ7pRw986YJS4YUVZ837jReuVaukaJs6V Ifke1pDvboRnVEgllQEa6tqvyHWwgW1RChpuNn0ukg3sad9J+ClvxEIpQ md5g9WE4cYvDapTj8K/2KqixgIxFaIhlbiAG/Kw/oQtqmufAPwrobCpmW ZzRJYKb9Mq63dVBHS2U605DZkM8DMQt3CbvCumGnD0bBT+49e3U6WeKTJ Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10413"; a="348412477" X-IronPort-AV: E=Sophos;i="5.92,286,1650956400"; d="scan'208";a="348412477" 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:22 -0700 X-IronPort-AV: E=Sophos;i="5.92,286,1650956400"; d="scan'208";a="625574630" 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:20 -0700 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Wed, 20 Jul 2022 16:39:53 +0800 Message-Id: <20220720084006.5033-1-haihao.xiang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH v11 00/13] make QSV works with the Intel's 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 Cc: Haihao Xiang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: /LfbYXCWU6Iu From: Haihao Xiang The oneAPI Video Processing Library (oneVPL) is a single interface for encode, decode and video processing[1][2]. oneVPL is a successor to Intel(R) Media SDK, but removed obsolete features. Intel(R) Media SDK lifetime comes to an end now, new features for new Intel Gen platforms will be supported in oneVPL only[3]. It is recommended to use oneVPL for new work, even for currently available hardwares[4]. Hence, this patchset added a new option --enable-onevpl to bring the support for oneVPL in QSV, new features for oneVPL will be implemented in other patchset, for example, we are implementing av1_qsv encoder (https://github.com/intel-media-ci/ffmpeg/pull/515). option --enble-libmfx still works with Intel(R) Media SDK. Note user can't enable onevpl and libmfx together. oneVPL dispatcher: https://github.com/oneapi-src/oneVPL oneVPL GPU runtime for new Intel Gen platforms: https://github.com/oneapi-src/oneVPL-intel-gpu v11: - make sure the loaded oneVPL implementation can supported the requested device in VAAPI path. [1] https://spec.oneapi.io/versions/latest/elements/oneVPL/source/index.html [2] https://www.intel.com/content/www/us/en/developer/tools/oneapi/onevpl.html [3] https://github.com/Intel-Media-SDK/MediaSDK/#media-sdk-support-matrix [4] https://www.intel.com/content/www/us/en/develop/documentation/upgrading-from-msdk-to-onevpl/top.html Haihao Xiang (13): configure: ensure --enable-libmfx uses libmfx 1.x configure: fix the check for MFX_CODEC_VP9 qsv: remove mfx/ prefix from mfx headers qsv: load user plugin for MFX_VERSION < 2.0 qsv: build audio related code when MFX_VERSION < 2.0 qsvenc: support multi-frame encode when MFX_VERSION < 2.0 qsvenc: support MFX_RATECONTROL_LA_EXT when MFX_VERSION < 2.0 qsv: support OPAQUE memory when MFX_VERSION < 2.0 lavu/hwcontext_qsv: add loader field to AVQSVDeviceContext lavu/hwcontext_qsv: make qsv hwdevice works with oneVPL lavc/qsv: create mfx session using oneVPL for decoding/encoding lavfi/qsv: create mfx session using oneVPL for qsv filters configure: add --enable-libvpl option configure | 32 +- doc/APIchanges | 3 + libavcodec/qsv.c | 249 +++++++++++-- libavcodec/qsv.h | 4 +- libavcodec/qsv_internal.h | 6 +- libavcodec/qsvdec.c | 22 +- libavcodec/qsvenc.c | 25 +- libavcodec/qsvenc.h | 9 +- libavcodec/qsvenc_h264.c | 3 +- libavcodec/qsvenc_hevc.c | 3 +- libavcodec/qsvenc_jpeg.c | 3 +- libavcodec/qsvenc_mpeg2.c | 3 +- libavcodec/qsvenc_vp9.c | 3 +- libavfilter/qsvvpp.c | 141 +++++++- libavfilter/qsvvpp.h | 12 +- libavfilter/vf_deinterlace_qsv.c | 72 ++-- libavfilter/vf_scale_qsv.c | 87 ++--- libavutil/hwcontext_opencl.c | 2 +- libavutil/hwcontext_qsv.c | 589 ++++++++++++++++++++++++++++--- libavutil/hwcontext_qsv.h | 13 +- libavutil/version.h | 2 +- 21 files changed, 1098 insertions(+), 185 deletions(-)