From patchwork Fri Oct 15 13:39:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 31127 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp378433ioa; Fri, 15 Oct 2021 06:39:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeyjfuJsgUYeFsoUsXkOJHVXYxyA0yi55kKPiiJHUy5YAfhDwr8A+aL1ruyMNkRmvJJvWI X-Received: by 2002:a05:6402:2808:: with SMTP id h8mr18088640ede.394.1634305181523; Fri, 15 Oct 2021 06:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634305181; cv=none; d=google.com; s=arc-20160816; b=cCiL0DYLXSRhppyfP+DTmMuQV1oEW140E8WY4dB0DiCuryNkuGAUPy76MkYdkI+th+ uQSxqy7ArE+dLK6+otrZVlHn0ZzXOPDvC0GRPj0heYg3od4APqIuz9AwoXbCVwKOgnc+ z7sRxS6Yy3g8B2mbCm27R1kCkj92oxvOccT69g6QqOKF8M3EKZaNvEoIWicLdzOwMDPN DsAFmpt9yJgrxkUtXzmqWjw/z8Lbhgrjn1DxJ+vlTyBH7n1cH15kHWDP2F6F1TNIMAgt 8FCJ6JRRdkn1M/J4H3p0zerv8SynMzhK1dFRP5+gZJrQDlp0a5yyr+GxiOCn2zC2QnDY VO8w== 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:delivered-to; bh=MXGWFwpqZuknDD3YGL1vrssDpEZKlAtb5njrHKSO5xk=; b=qqx9KMryOVjwb5tI8svCR7MeGzzzZCXGkn90/VE9X9hQimzptmiNO3V098N63cYCzf JXzc0BvfuRQq0TrFDBoqvWAPOz2XKAgYpGpymyKkA23MuxVL57w9p4bsV7XafJVFqHB4 dKmkWfqJAM5qXme7Fq3QKTBtG/yQBFzpTaQDk3D7rR8EJvLSHlrJIrRaB2jTnUtp1wS5 YQlWlHOnu3nLumUPBrW5pjrMeKXTcF9zxLR617zETDujd8h468rJ2tHgaJgFbrWE7Psr X6qBCp6lNn9cVdiWorfuBlbPV+YfLxIqDOKgy7B2mpMR4SGVYSEvB1FC6R8bTPBz8sPh L+UQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id e14si3581852eje.649.2021.10.15.06.39.40; Fri, 15 Oct 2021 06:39:41 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 807A568A576; Fri, 15 Oct 2021 16:39:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BDA6068A733 for ; Fri, 15 Oct 2021 16:39:30 +0300 (EEST) X-IronPort-AV: E=McAfee;i="6200,9189,10137"; a="226686963" X-IronPort-AV: E=Sophos;i="5.85,375,1624345200"; d="scan'208";a="226686963" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 06:39:28 -0700 X-IronPort-AV: E=Sophos;i="5.85,375,1624345200"; d="scan'208";a="442524754" Received: from xhh-dg164.sh.intel.com ([10.239.159.167]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 06:39:26 -0700 From: Haihao Xiang To: ffmpeg-devel@ffmpeg.org Date: Fri, 15 Oct 2021 21:39:05 +0800 Message-Id: <20211015133915.13624-1-haihao.xiang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH v6 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: Bx62KwJr0E/I The oneAPI Video Processing Library (oneVPL) is a single interface for encode, decode and video processing[1]. 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[2]. It is recommended to use oneVPL for new work, even for currently available hardwares[3]. 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. --enble-libmfx option still works with Intel(R) Media SDK. Note user can't enable onevpl and libmfx together. oneVPL dispatcher source code: https://github.com/oneapi-src/oneVPL oneVPL GPU runtime for new Intel Gen platforms: https://github.com/oneapi-src/oneVPL-intel-gpu v6: - Use ${libmfx_incdir} in configure - Don't define mfx related function in an exported header - Rebased this patchset against the latest master and fixed bugs [1] https://spec.oneapi.io/versions/latest/elements/oneVPL/source/index.html [2] https://github.com/Intel-Media-SDK/MediaSDK/#media-sdk-support-matrix [3] https://software.intel.com/content/www/us/en/develop/articles/upgrading-from-msdk-to-onevpl.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 | 423 +++++++++++++++++++++++++++---- libavutil/hwcontext_qsv.h | 3 +- libavutil/hwcontext_vaapi.c | 13 + libavutil/hwcontext_vaapi.h | 4 + 25 files changed, 934 insertions(+), 188 deletions(-)