[FFmpeg-devel] [Patch] CUDA Thumbnail Filter

Timo Rothenpieler timo at rothenpieler.org
Mon Sep 11 12:18:40 EEST 2017


Am 11.09.2017 um 07:40 schrieb Yogender Gupta:
>>> 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
> 

I also really don't see the concern with adding CUDA versions of already 
existing filters.
They are not included in any standard build, and require both non-free 
and the cuda-sdk to be even built in the first place.

For their specific use case of a fully hardware-accelerated transcode 
and filter pipeline they clearly offer benefits. Specially when the 
final encode is to be done with nvenc and/or when operating on huge 
frames(4K or maybe even bigger) using the GPU has clear benefits and I 
doubt any SIMD will be able to compensate for it.

Another scenario where a 100% GPU pipeline becomes essential is when you 
are processing _a lot_ of streams on one machine. You can freely put 
more GPUs in and gain more VMEM and Cores to work with, without 
interfering with the others.
If there is a single CPU based filter anywhere in that chain you will 
very quickly be bottlenecked by it and the copying to and from sysmem.

Concerning the OpenCL infrastructure that was just posted to the list:
It would indeed be nice if there was a way to map CUDA frames to OpenCL, 
and the other way around. But I am not aware of any interoperability 
there and Nvidia has more than big enough of a market share on server 
and cloud GPUs(see for example AWS) to make adding CUDA based filters 
worthwhile.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3994 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170911/6c92fafd/attachment.bin>


More information about the ffmpeg-devel mailing list