From: Timo Rothenpieler <timo@rothenpieler.org>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [GSoC'22] Added Chromakey CUDA filter
Date: Thu, 30 Jun 2022 01:10:19 +0200
Message-ID: <4d767964-2ca8-a75d-98ef-a7fcfa65aaef@rothenpieler.org> (raw)
In-Reply-To: <AM9PR04MB8940AF3802694052ECE5D13A8DBB9@AM9PR04MB8940.eurprd04.prod.outlook.com>
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".
next prev parent reply other threads:[~2022-06-29 23:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 22:42 mohamed Elhadidy
2022-06-29 23:10 ` Timo Rothenpieler [this message]
2022-06-30 0:01 mohamed Elhadidy
2022-07-03 16:07 ` Timo Rothenpieler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4d767964-2ca8-a75d-98ef-a7fcfa65aaef@rothenpieler.org \
--to=timo@rothenpieler.org \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git