[FFmpeg-devel] [Patch] CUDA Thumbnail Filter

Yogender Gupta ygupta at nvidia.com
Mon Sep 11 08:40:56 EEST 2017


>> Only 3 to 4 times? This is easily doable with SIMD.

The problem is not with the thumbnail filter at all. The problem is doing the transfers from vidmem to sysmem or vice-versa. You will observe if we use a transcoder pipeline with and without hwaccel cuvid (using hw encoder/decoders in both cases), the one with hwaccel runs much faster. If we add more transfers by using a CPU based filter, it will only degrade the performance further.

The CUDA thumbnail filter can work directly on the video memory without requiring an additional vidmem to sysmem transfer.

Thanks,
Yogender



-----Original Message-----
From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of Rostislav Pehlivanov
Sent: Monday, September 11, 2017 10:56 AM
To: FFmpeg development discussions and patches
Subject: Re: [FFmpeg-devel] [Patch] CUDA Thumbnail Filter

On 11 September 2017 at 05:59, Yogender Gupta <ygupta at nvidia.com> wrote:

> I believe there were concerns on pushing the CUDA thumbnail filter and 
> that is possible to get similar performance using the normal thumbnail 
> filter. The CUDA thumbnail filter is useful for generating thumbnails 
> on the hwaccel cuvid pipeline, as it can directly operate on the video 
> memory and give significantly higher performance, owing to the fact 
> that there are no sysmem to vidmem copies as well as the fact that the 
> encoding and CUDA HW being separate, the CUDA thumbnail filter may not 
> degrade the encode performance at all.
>
> The following commands run show that using the Cuda thumbnail filter 
> on the hw pipeline could be 3x-4x faster.
>
> E:\>ffmpeg -vsync 0 -y -hwaccel cuvid -c:v h264_cuvid -i amazing.264 
> -filter_complex 
> [0:v]split=2[in0][in1];[in0]thumbnail_cuda=600,hwdownload,
> format=nv12[out0];[in1]scale_npp=1920:1080
> [out1] -map [out0] thumb%03d.jpg -map [out1] -c:v h264_nvenc out.264 
> 2> hw.txt
>
> E:\>ffmpeg -vsync 0 -y -c:v h264_cuvid -i amazing.264 -filter_complex 
> [0:v]split=2[in0][in1];[in0]thumbnail[out0];[in1]scale[out1] -map 
> [out0] thumb%03d.jpg -map [out1] -c:v h264_nvenc
> out.264 2> sw.txt
>
> Thanks,
> Yogender
>
> ------------------------------------------------------------
> -----------------------
> This email message is for the sole use of the intended recipient(s) 
> and may contain confidential information.  Any unauthorized review, 
> use, disclosure or distribution is prohibited.  If you are not the 
> intended recipient, please contact the sender by reply email and 
> destroy all copies of the original message.
> ------------------------------------------------------------
> -----------------------
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
Only 3 to 4 times? This is easily doable with SIMD.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list