From patchwork Thu Apr 28 09:23:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 34692 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b9e:b0:7d:cfb5:dc7c with SMTP id b30csp3473220pzh; Thu, 28 Apr 2022 02:26:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmZ6qU701wVymzEfnpS/Mzixv/gdxWkZ6tyM6/lzoO74NHou17/RKvSZCFj9tP8bpzt40D X-Received: by 2002:a05:6402:5186:b0:426:b0:32cf with SMTP id q6-20020a056402518600b0042600b032cfmr11530310edd.249.1651138001454; Thu, 28 Apr 2022 02:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651138001; cv=none; d=google.com; s=arc-20160816; b=bIdu/PCqLj9/urAI83OwTn7EpoKSp4rxLpMo7SqhW6vw1FLOyon0mfJrwChR0rBIa4 bzEa3zkgiD0O3sEOY717F2hUVaa70DQs2wx1DSlpcoT391X66qKH+qQGsOJsDTbOGCKH lpNsDy++xO/KsoZ6Dfvl8PfAogw20M/vTXbO/EGFrrZQBos5+MDRRNdm6G5NkDt8zWUu rF27YxwH6fOLsyVzxjQ99xOuh67OQFiDfvm71DZQY2xgxbU8QagWlPgixMbp1y5JWvys iIUj6XjJPZnNA1MopYLoTxznYXhnKTbzG2aiq2PTFM7bMyCruMePLZLPYlGK+9/ux42O yNeA== 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=+QPt1m7zYfUnr4O+0PTV7jQ5So/J/Sq8XG5t0rVmtXc=; b=kN41v4qmmcGJukMGzED5z0New16u3Uh+2pGwYGEfm6LqDXQjce6gaeWUsjI20akDpb ZJu8BwXfWe0WMOQgO+MYjSDy+ypDl89l6gOwdCdiEg9j9BxVXBArKHmmVuonc7UBU9s6 lecrFoMxOJnTjx+yOXRoHcavwnQ3awh1vD5IHEvSC27cHFme/n2mflUWS3dS9u00wl7M n1Iqpvl2Gtt59oMuYxN0lLR2QpOsV4tNM5N8LlbF+hjHnfJ5cGVRRQYULDGYHyjktK0g QCsw7FDjKkaRcx28e9MhwT4Cp0403Alnjce0a4157ekweBwDuQJXZL9xbJrLisIY9YCf SRkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=RQkpKGJE; 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 s9-20020a056402520900b00425f9280431si4124704edd.604.2022.04.28.02.26.40; Thu, 28 Apr 2022 02:26: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; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=RQkpKGJE; 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 A154C68B36E; Thu, 28 Apr 2022 12:26:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CC4B368B236 for ; Thu, 28 Apr 2022 12:26:29 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651137995; x=1682673995; h=from:to:cc:subject:date:message-id; bh=vKoG5kR7oqQ3z1lvHu59+enRqygFu8RcZAaCzhKV6d0=; b=RQkpKGJEKSo0cDHpd9ezoIrveR/b783V6fZSI6hmyehpOjhVFDY55xB7 vVkZ4boMioNjBDiXGEIATVWbV01vO6nQv+JglxV4iocbE4Ko03XvDd9e8 0FVOtRPIkr59Qo0r9B1zMbnxRlDovrAdwSpaMegWW9NMk/kukY1XsX4/R x+qS/vR2Fh0QYYfyUrsl0te1n3D1XbmJJCo6nBXcztYbEhmDrSn9zbUpO NkneAzPbcM4ElYy4oU9XbmVP+l9dBuT4jopZUpSAAuLT3c35rEbipPFBR VD5ekRnsj1QdnhPcQronOGDOLAwhaR6Deh0qKiHBH5EP96lMRRneWqyqA g==; X-IronPort-AV: E=McAfee;i="6400,9594,10330"; a="266381373" X-IronPort-AV: E=Sophos;i="5.90,295,1643702400"; d="scan'208";a="266381373" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2022 02:26:26 -0700 X-IronPort-AV: E=Sophos;i="5.90,295,1643702400"; d="scan'208";a="581175957" Received: from zhao12-mobl.ccr.corp.intel.com (HELO hxiang-desk.ccr.corp.intel.com) ([10.254.214.89]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2022 02:26:24 -0700 From: Haihao Xiang To: ffmpeg-devel@ffmpeg.org Date: Thu, 28 Apr 2022 17:23:17 +0800 Message-Id: <20220428092327.16558-1-haihao.xiang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH v08 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: eFaXaU8sr9Hw 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 v8: - Fix mfx session creation for D3D11VA and DXVA2 - Rebased this patchset against the latest master [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 | 7 + libavutil/hwcontext_opencl.c | 2 +- libavutil/hwcontext_qsv.c | 573 ++++++++++++++++++++++++++++--- libavutil/hwcontext_qsv.h | 3 +- libavutil/hwcontext_vaapi.c | 13 + libavutil/hwcontext_vaapi.h | 4 + 22 files changed, 1062 insertions(+), 187 deletions(-)