From patchwork Wed Oct 19 12:00:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Rothenpieler X-Patchwork-Id: 1071 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.133 with SMTP id o127csp176114vsd; Wed, 19 Oct 2016 05:01:38 -0700 (PDT) X-Received: by 10.194.166.232 with SMTP id zj8mr4098245wjb.225.1476878498599; Wed, 19 Oct 2016 05:01:38 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id pg2si6818359wjb.45.2016.10.19.05.01.37; Wed, 19 Oct 2016 05:01:38 -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=@rothenpieler.org; 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 5E9A1689B28; Wed, 19 Oct 2016 15:00:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from btbn.de (btbn.de [5.9.118.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 78798689A81 for ; Wed, 19 Oct 2016 15:00:50 +0300 (EEST) Received: from localhost.localdomain (ip4d173c0b.dynamic.kabel-deutschland.de [77.23.60.11]) by btbn.de (Postfix) with ESMTPSA id 2CA286FF2F; Wed, 19 Oct 2016 14:00:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rothenpieler.org; s=mail; t=1476878453; bh=kbs5vrytMFjoqlG/PLJO9ovlv8N8VOOIz7qM2uCvqIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DRrbgCGuN5AhTnV0RITi60l6LA5i/T8PPXe+TFyHRk0+iEXIwqgfSRQRTiQczLTZp R58rzDt9Oo9LsRu2grRqMYQVoqQ7050osfFhvuohnfeK3pkOAyz5vt0kkw7I4ODA8A Qw//xa6sNPOHhzNNZcRWZYe1JBABes1yPzD5KM0s= From: Timo Rothenpieler To: ffmpeg-devel@ffmpeg.org Date: Wed, 19 Oct 2016 14:00:32 +0200 Message-Id: <20161019120036.618-4-timo@rothenpieler.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161019120036.618-1-timo@rothenpieler.org> References: <20161019120036.618-1-timo@rothenpieler.org> Subject: [FFmpeg-devel] [PATCH 4/8] avfilter/vf_scale_npp: use dynamically loaded CUDA 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: Timo Rothenpieler MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavfilter/vf_scale_npp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c index 35abe39..c84282f 100644 --- a/libavfilter/vf_scale_npp.c +++ b/libavfilter/vf_scale_npp.c @@ -29,7 +29,7 @@ #include "libavutil/common.h" #include "libavutil/eval.h" #include "libavutil/hwcontext.h" -#include "libavutil/hwcontext_cuda.h" +#include "libavutil/hwcontext_cuda_internal.h" #include "libavutil/internal.h" #include "libavutil/mathematics.h" #include "libavutil/opt.h" @@ -591,7 +591,7 @@ static int nppscale_filter_frame(AVFilterLink *link, AVFrame *in) (int64_t)in->sample_aspect_ratio.den * outlink->w * link->h, INT_MAX); - err = cuCtxPushCurrent(device_hwctx->cuda_ctx); + err = device_hwctx->internal->cuda_dl->cuCtxPushCurrent(device_hwctx->cuda_ctx); if (err != CUDA_SUCCESS) { ret = AVERROR_UNKNOWN; goto fail; @@ -599,7 +599,7 @@ static int nppscale_filter_frame(AVFilterLink *link, AVFrame *in) ret = nppscale_scale(ctx, out, in); - cuCtxPopCurrent(&dummy); + device_hwctx->internal->cuda_dl->cuCtxPopCurrent(&dummy); if (ret < 0) goto fail;