From patchwork Tue Jul 12 06:27:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 34765 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:6da0:b0:8b:e47:9dbf with SMTP id wl32csp1811398pzb; Mon, 11 Jul 2022 23:28:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uzsLtZrAvfM/qAMY+ALDrdhduI56OOl3kJ90Rf2naOi3lvF0ByXnmubncQmD6uDO4g/DV/ X-Received: by 2002:a17:906:6a03:b0:726:c0e5:d58a with SMTP id qw3-20020a1709066a0300b00726c0e5d58amr22071939ejc.288.1657607300569; Mon, 11 Jul 2022 23:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657607300; cv=none; d=google.com; s=arc-20160816; b=OPyaVUlw3009OjPQceChvuZYo1mMK+YlwWctYAlgZBBiNjAUFsZy2cF9Vcvb8M3lrh sXHTUutVI1RZ3J61wEfOSc3CsMo+Fva50QjbJQFfom5dflsAhdOTxJYpl47zHuaNB1Yk F9i3HrsNsKikwBmYJfAFp2tmp7BdWuuxd/4u2Qpbz+5jf+G2ghPp6QNuJWiXA7Iq/Brt UFQZsOO5j8SBguyXQ4ema8xwTcquR8hFBziyFAVc2Rzyo8OjTFktF4NRjp118Dx7BzrG gSfF9mGxzQVaC3L1vrjpfAuJEo0N3MM0aHuVTu2plV+bgRdr7pxvdIiPSV46xHRv67cC Om4g== 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=OE2qLYjwhNoJavk5Dp+ujDNEuWiZ2HtrQoj04AO/eHo=; b=c78h4PFKVt3yIRsSimKuaRcD3m21Kkq6YjrVhntLFQmJwJ2po0TqhErKxqiYtjZnc3 s71kCi8/AKbForZo7AjMo/SBBG2wxEYW2AFqkpKvqfpFxdP+2ITAqq4HI1CccJuHKhkl 0h931pozizXF9sRcGFIgWthCfWXQ2vOz2gqDsfNYboiOtewg/JF8qjx68g6savepKSI3 OZxSdU+AiRibkqnnl/7+I1Hg0LSD3w6uAzrZfLa+P9CBmMM02N4y/GSg6QHq7byahbJw ViKpinpgzWg46zr46XxB/m2aTFZunSwz0n8t/t4xJzzBWFypskhb+hM2+dCqQERXM5up 7EFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=G1PLF1HZ; 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 f16-20020a170906825000b00726c8adb7efsi10809029ejx.224.2022.07.11.23.28.19; Mon, 11 Jul 2022 23:28:20 -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=G1PLF1HZ; 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 2DA0768B803; Tue, 12 Jul 2022 09:28:16 +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 B4C9F68B58F for ; Tue, 12 Jul 2022 09:28:09 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657607295; x=1689143295; h=from:to:cc:subject:date:message-id; bh=W6Z58G2GAm67YH4BqDtHp6OYo3g7ewMEG/Mizsnlo3M=; b=G1PLF1HZ3niEupgS+ltx8rYwuiBamyMhIy10TDzM6EU+uT82uFrWnFtq 0HUA7IzWFYCOpABJdTa3zQbaRWyiSyrydp9wtMbeeoAyErdHxYd8muZhL OJIYs+B6D5VZ/A9AFvHXP1X6mI8rz8JKmb0r63+sQW2DYPS7i2GTaiXkq XR1nEdTc6Rf1oxqBda4cWXExZnSQvkh1f6/zIuT0HTu8aaRFZOs1s+if8 S7pmAHjE6tMT62gjMl11X1ANVgEjuB+M2+gaoGqNKAZBPEozB0jCeqOSm EsInywYdiaKcuVn+uZJwmibUIE2tneOBvQVU3pBnVC0UpYqRqg1R5YY4w A==; X-IronPort-AV: E=McAfee;i="6400,9594,10405"; a="346534425" X-IronPort-AV: E=Sophos;i="5.92,265,1650956400"; d="scan'208";a="346534425" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 23:28:08 -0700 X-IronPort-AV: E=Sophos;i="5.92,265,1650956400"; d="scan'208";a="622381953" Received: from xhh-dg164.sh.intel.com ([10.239.159.146]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 23:28:06 -0700 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Jul 2022 14:27:22 +0800 Message-Id: <20220712062735.20339-1-haihao.xiang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH v10 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: pN+dURlMXve1 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 v10: - Split the API changes into separate patch files. - Use separate functions for mfx session creation when using oneVPL - Other fixes [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 | 245 +++++++++++-- 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 | 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 | 588 ++++++++++++++++++++++++++++--- libavutil/hwcontext_qsv.h | 13 +- libavutil/version.h | 2 +- 21 files changed, 1092 insertions(+), 185 deletions(-)