From patchwork Thu Jun 21 11:45:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 9457 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:11c:0:0:0:0:0 with SMTP id c28-v6csp1907804jad; Thu, 21 Jun 2018 04:46:06 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIeW4Yp2rX/A3NHPyBp2i1eq3HF7jqjcvlbpp6fZeLkfPFS1r5x+IIFkDzuE2BXP4zs3ovv X-Received: by 2002:a1c:800e:: with SMTP id b14-v6mr4748660wmd.83.1529581566138; Thu, 21 Jun 2018 04:46:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529581566; cv=none; d=google.com; s=arc-20160816; b=nCLxgtJnTR740Xy2zAiNFMYjbX0/qKslKX2GcJmTqXibxsbO+nwPct47TMg9gi0qiD jIonXY5PAJYmDnYERdMHmNS4PvrVAQq5XPGh9uXw1L7fJCcEHWApYvzjNjA24fn8iEEi JRMifOkHwEGt6gbYiHsnxJC6gFWrZ+1/s4+Muj8McBSwm59mfltSnCxNL3wxgaS0ES6B voSFpGy52KvwfE4Hq1dilUFTaoNMkSfpXjxkUUOaaHgA52XeQX+tIU4eVv6aAEm6apxw EWjDxjPagfx0gJ6Qn9fzLL4azB32ci9wFn3wycCe46kp5H9Cpp/UBSHGWl//WYacoWgo LQjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=uc4aezcC3HhOyM1wSoz4h/+8y0e5GYVcO3mF93f4mCE=; b=jiQBoDO3KP9LHAdFlaSbLOazkgATA+/k4VSP9wcod9TZDpEkVTSQE0Uq9oDWGMyD3s GJ8EPn24XgPUKOt3qp95Go3ISDuCchgjJftBNiiPqUraZpsfmwDsObtVTsXLVIIhtL7J ZcRbOyM7Rr7vlA0CoKAU5jG/GR0lWwY3ZeVFbzuEWpy/3Pd/9o0d/k3VUkPqlnouUmYd kv7nkeDtPR0cSh04Ym51iuDa18Zg475t9lKJ5fn5P2IQISpyVkhgrvJz0Gsh461bUs2S EK/5luXnT+2CAjlLWgB3MWAz1aGrn6MWKzpaU+/X2aVScpG0IZRUYjPR6GDDz3L8bR7X IVxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=GeNY3gL7; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 94-v6si5231758wrq.89.2018.06.21.04.46.05; Thu, 21 Jun 2018 04:46:06 -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=@gmail.com header.s=20161025 header.b=GeNY3gL7; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A5CA268A6E2; Thu, 21 Jun 2018 14:45:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl0-f43.google.com (mail-pl0-f43.google.com [209.85.160.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 916D968A6B7 for ; Thu, 21 Jun 2018 14:45:02 +0300 (EEST) Received: by mail-pl0-f43.google.com with SMTP id 30-v6so1550540pld.13 for ; Thu, 21 Jun 2018 04:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ALxAyQVbWLi1ydwG4MM2X1aoDMFnXHdkebAJIWPMFBE=; b=GeNY3gL7Fxw/iMvlv6SBczDTkMLa8FASyJjLyPy2i9F4q+bjrUTFolr9MUFozy8Gnd FKCaRd9iInYwq25KdX7TBF06GfHkQ80PayBR+ja3wDDoHfestwWr6PX09q/ihqYf9xFN +3B5LmivjEA9RqI+P32W6H2UY+u7MeSIgePCE/yEzQG1uSwfnJVy/7oxLAatq/AwXnVi YiLKxYOJBoriqhaMDhnyn/Lgi783cBv9q9gRHuE27e7IQ7IBc1b6ea0UTwwq4sa5ZpVw 68s4uIJZ+jsUIcU1MdBRRM06Dh+nCTb/8ml7SWKawvBK71dAxcNZu8hFmeUIeUqMCiId gIdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ALxAyQVbWLi1ydwG4MM2X1aoDMFnXHdkebAJIWPMFBE=; b=hJ9NAgfi7JkyLXrymosO2tElDD4DBDdzqeujgKOnHaAwlnfy/9ZToGDZLuMQJ1usab wxY4FC/4ZKXXcchdmbSjC0Pxj2QPtmsINn/RbV6P7+CQWX3vjirDXIfwzf1Rkhcf3JpZ S29dl+pUyrel/eBwjlLgunN5LqfliQA2Gf7pPTIYIDYr+/i6CLDMQuOkLis1ohluqcVL f9e7P1xnGPKH4Bydjzrns4eqaUZtzwVhy8gAKD7Nd/3Lnyy2UQeMAS+SPzqWBVx3/a6S llcYwcGtegEtBUooBWLCSoFS1YS2X4jeQwIUpz47Y4zCEKorDxe+SJ3eqtGr/CpctGRe NXIQ== X-Gm-Message-State: APt69E0Q7k50e77agEUYPxmWrrUrbKY58cBcJCQQ6YcnAjwz+bxTPqOR 2pE4bUY9uK+5Us+3KFZTQTlS3Q== X-Received: by 2002:a17:902:e85:: with SMTP id 5-v6mr28276642plx.318.1529581554440; Thu, 21 Jun 2018 04:45:54 -0700 (PDT) Received: from localhost.localdomain ([47.88.54.25]) by smtp.gmail.com with ESMTPSA id h84-v6sm14506523pfd.69.2018.06.21.04.45.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Jun 2018 04:45:53 -0700 (PDT) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Thu, 21 Jun 2018 19:45:43 +0800 Message-Id: <1529581546-5892-1-git-send-email-mypopydev@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/4] configure: fix check for opencl_vaapi_intel_media. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Jun Zhao Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" opencl_vaapi_intel_media doesn't depend on libmfx, OpenCL™ Drivers and Runtimes for Intel® Architectureis is a standalone release, more information can be found in the link: https://software.intel.com/en-us/articles/opencl-drivers. Signed-off-by: Jun Zhao --- configure | 6 ++---- libavutil/hwcontext_opencl.c | 7 ++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 6ad5ce8..717b2f1 100755 --- a/configure +++ b/configure @@ -6336,10 +6336,8 @@ fi if enabled_all opencl vaapi ; then enabled opencl_drm_beignet && enable opencl_vaapi_beignet - if enabled libmfx ; then - check_type "CL/cl.h CL/va_ext.h" "clCreateFromVA_APIMediaSurfaceINTEL_fn" && - enable opencl_vaapi_intel_media - fi + check_type "CL/cl.h CL/va_ext.h" "clCreateFromVA_APIMediaSurfaceINTEL_fn" && + enable opencl_vaapi_intel_media fi if enabled_all opencl dxva2 ; then diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c index 07458c2..f6cceef 100644 --- a/libavutil/hwcontext_opencl.c +++ b/libavutil/hwcontext_opencl.c @@ -46,7 +46,9 @@ #endif #if HAVE_OPENCL_VAAPI_INTEL_MEDIA +#if CONFIG_LIBMFX #include +#endif #include #include #include "hwcontext_vaapi.h" @@ -2249,10 +2251,13 @@ static int opencl_map_from_qsv(AVHWFramesContext *dst_fc, AVFrame *dst, cl_int cle; int err, p; +#if CONFIG_LIBMFX if (src->format == AV_PIX_FMT_QSV) { mfxFrameSurface1 *mfx_surface = (mfxFrameSurface1*)src->data[3]; va_surface = *(VASurfaceID*)mfx_surface->Data.MemId; - } else if (src->format == AV_PIX_FMT_VAAPI) { + } else +#endif + if (src->format == AV_PIX_FMT_VAAPI) { va_surface = (VASurfaceID)(uintptr_t)src->data[3]; } else { return AVERROR(ENOSYS);