From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 5DA454222F for ; Wed, 29 Jun 2022 23:10:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D7D7C68B6B1; Thu, 30 Jun 2022 02:10:28 +0300 (EEST) Received: from btbn.de (btbn.de [136.243.74.85]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1294968B517 for ; Thu, 30 Jun 2022 02:10:22 +0300 (EEST) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id AD5E526DC6F for ; Thu, 30 Jun 2022 01:10:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1656544221; bh=6XoElYvIL8AU4VpdDJVUNWZPaHqd8zZcpd8lc1EZM/Q=; h=Date:Subject:To:References:From:In-Reply-To; b=VHzJscyZWwgSV0AoHxBK6NTRljcgI/T6GZ12/eXv3LFDACSCnLu4J9XWMkcQXiFjO UVluYlPu5oHCkblX/ljxhrf6lS5BswbuikYHcUsovqv/F/Acs2X3Cb1C6YRD2y8ja9 Fm0DGFUf251rzsRgDDhTPd/bup8eZ+cMrFyYoD5KYcqBXMXTnHQhlQCjCvawie1Y1g sfrB0F2iutB6YPKrFPSOywN91sNsZCPi7GezkERmGhOJO6p3y+z4IgMojtfK5kZgfM gjqBJszBzN6UONrrHtk7E9ojRBw+kmeKIQQzawaw7Gl6vZxe9mt6ibBtwo2uDr2jDe ocgdfLyu+5r/g== Message-ID: <4d767964-2ca8-a75d-98ef-a7fcfa65aaef@rothenpieler.org> Date: Thu, 30 Jun 2022 01:10:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: From: Timo Rothenpieler In-Reply-To: Subject: Re: [FFmpeg-devel] [GSoC'22] Added Chromakey CUDA filter 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 30.06.2022 00:42, mohamed Elhadidy wrote: > From: Mohamed Khaled Mohamed <56936494+MohamedElhadidy0019@users.noreply.github.com> > > GSoC'22 > Added CUDA chromakeyfilter > libavfilter/vf_chromakey_cuda.cu:the CUDA kernel for the filter > libavfilter/vf_chromakey_cuda.c: the C side that calls the kernel and gets user input > libavfilter/allfilters.c: added the filter to it > libavfilter/Makefile: added the filter to it > cuda/cuda_runtime.h: added two math CUDA functions that are used in the filter > --- > compat/cuda/cuda_runtime.h | 2 + > libavfilter/Makefile | 2 + > libavfilter/allfilters.c | 1 + > libavfilter/vf_chromakey_cuda.c | 520 +++++++++++++++++++++++++++++++ > libavfilter/vf_chromakey_cuda.cu | 248 +++++++++++++++ > 5 files changed, 773 insertions(+) > create mode 100644 libavfilter/vf_chromakey_cuda.c > create mode 100644 libavfilter/vf_chromakey_cuda.cu > > diff --git a/compat/cuda/cuda_runtime.h b/compat/cuda/cuda_runtime.h > index 30cd085e48..51eb99c2e8 100644 > --- a/compat/cuda/cuda_runtime.h > +++ b/compat/cuda/cuda_runtime.h > @@ -181,7 +181,9 @@ static inline __device__ double trunc(double a) { return __builtin_trunc(a); } > static inline __device__ float fabsf(float a) { return __builtin_fabsf(a); } > static inline __device__ float fabs(float a) { return __builtin_fabsf(a); } > static inline __device__ double fabs(double a) { return __builtin_fabs(a); } > +static inline __device__ double sqrtf(double a) { return __builtin_sqrtf(a); } > > +static inline __device__ double __saturatef(double a) { return __saturatef(a); } Don't have time for a full review right now, but this doesn't look right. That's building an infinite recursion. It should be some __nvvm_... function like the rest. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".