From patchwork Fri Mar 11 08:16:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 34670 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:3486:0:0:0:0 with SMTP id ek6csp1484376nkb; Fri, 11 Mar 2022 00:17:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXzawcu9ZViTeE0SwTr0iE0EIT03kGq7BIFYg9E3Mx27hrXI3qBtcnYLFw11FWhMPmIsCc X-Received: by 2002:a17:906:698a:b0:6ce:b983:babf with SMTP id i10-20020a170906698a00b006ceb983babfmr7537468ejr.553.1646986622298; Fri, 11 Mar 2022 00:17:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646986622; cv=none; d=google.com; s=arc-20160816; b=D8/jJH/AUcnV+6lkFVRjwmi+maEcCcpmkpmqE1Yk2LuTknzYy14lWclICLlEL31dQV xy0DhbHqxyJSK76xJrdHDq3mnfin2em8xUaWN3e+8dv1f1L74nMXlb/OiV6tKJTJUyU1 kj38XyzniBWA4RUlWHm7RFuyVd5H57XdeEOtJSlI7WdcnptMv5dTOTHa+ZO3SIY49sbg Kv9K24qFCFeSOck2j9vq4UF3BxQPxexAW1Fa85FuehNlvey64oc361SDCOkHVNslYinl GEj/baIe/q4XK2uSGtBoRCK33wuLxrMgyHU/Swa6yoVnbdH29zSBZyMoO5LGSu/2r5pf F+Mw== 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=zbqZfakrUqUmlebmuMWNsYnC7aywR3G3AhrgeCTP/Nw=; b=zE8whuilpvXoqP1QDf8vFSuPke9+1zr42cK8W8v5FHoLGz8aphVAF494RtkoadpDJV k3wFMT+qKmD6p6msBQmDrAjL6aLQgufaRaMTwgCCiY7i70Uza29/hOKpYClzi0oFhzr7 SLdUHwtffwu0eEE9BoJk75xoVVmW0erLsEy+OrSpxy/k2cfZPZIVWndncc89Tx6Sz81E RMSboChbDj2nGtvE3hWobr31p8m6cndyzEI8KHO3KFLnKLLN9jrtrH3qhovuY9FrailE eJ6LuIgLEKuPPZM7K4mbW9trOzTBGz84c0FQ45CmAWWHclh0gtDA2zGCn5e1ocFOrdf9 XroQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=ji9kZe+k; 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 f12-20020a0564021e8c00b004167d0fa7fasi5060219edf.478.2022.03.11.00.17.01; Fri, 11 Mar 2022 00:17:02 -0800 (PST) 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=ji9kZe+k; 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 DF25768B1AD; Fri, 11 Mar 2022 10:16:57 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ABFF268A0C4 for ; Fri, 11 Mar 2022 10:16:50 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646986615; x=1678522615; h=from:to:cc:subject:date:message-id; bh=QtHvdIN0BQtaNEMAUYpgik6Yo5hTcfjkbsHnbUMiOkw=; b=ji9kZe+kzOWPwVmD0Y74SM/bTGtjIPgIqfA2N5R+n00mL+wH/FDiQaOS a7IRWgRoU+/s4+etG5Gco3tk5LwKAQBLoQbVmUgTuby4MvN+KgD91Kpqi BtqtzRKXJfxcKoZ+JArRnjSp1U1n8wSr/mf+U+/2gKWcgj7Bf2YcIsFT+ GXn13kmgQaXL7fmSHYd6cCh/Hpi59a/P7V6qQV3j9dDwBiSs+IU3j2zx+ YoPI7PToYICBzREeYi3VFnfxAEzowchOs7UWIMkHI3wg3qwd1MF+zshvq 9CLBEl8HqvUCH3iaJ7BXl9j4Gi0HUfD49sZ9kNm28ga+30eMNIPh4iGbk g==; X-IronPort-AV: E=McAfee;i="6200,9189,10282"; a="237700110" X-IronPort-AV: E=Sophos;i="5.90,173,1643702400"; d="scan'208";a="237700110" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2022 00:16:48 -0800 X-IronPort-AV: E=Sophos;i="5.90,173,1643702400"; d="scan'208";a="688997000" Received: from xhh-dg164.sh.intel.com ([10.239.159.54]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2022 00:16:47 -0800 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Fri, 11 Mar 2022 16:16:20 +0800 Message-Id: <20220311081630.21927-1-haihao.xiang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH v7 00/10] 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: x2O1YJW5TXkF 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 v7: - Changed the required minimal oneVPL version from 2.2 to 2.6 - Added support for multiple GPUs on Linux - Rebased this patchset against the latest master and fixed bugs [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 (10): 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 qsv: use a new method to create mfx session when using oneVPL configure: add --enable-libvpl option configure | 29 +- libavcodec/qsv.c | 220 +++++++++++++-- libavcodec/qsv.h | 4 +- libavcodec/qsv_internal.h | 6 +- libavcodec/qsvdec.c | 21 +- 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 | 145 +++++++++- libavfilter/qsvvpp.h | 12 +- libavfilter/vf_deinterlace_qsv.c | 73 ++--- libavfilter/vf_scale_qsv.c | 88 +++--- libavutil/hwcontext_d3d11va.c | 13 + libavutil/hwcontext_d3d11va.h | 5 + libavutil/hwcontext_dxva2.c | 8 + libavutil/hwcontext_dxva2.h | 4 + libavutil/hwcontext_opencl.c | 2 +- libavutil/hwcontext_qsv.c | 444 +++++++++++++++++++++++++++---- libavutil/hwcontext_qsv.h | 3 +- libavutil/hwcontext_vaapi.c | 13 + libavutil/hwcontext_vaapi.h | 4 + 25 files changed, 956 insertions(+), 187 deletions(-)