[Libav-user] How to use my own cuda context and sutom cuda streams with ffmpeg

Oscar Amoros Huguet oamoros at mediapro.es
Thu Apr 5 19:46:21 EEST 2018


Hi!

We are integrating ffmpeg in our product, in order to use NVIDIA hardware decoding capabilities for performance reasons. But we need the impact on the GPU (CUDA) side to be minimal, since our software intensively uses the GPU with CUDA.

When creating the hardware context (av_hwdevice_ctx_create), we would like to be able to specify that ffmpeg uses the current cuda context, and if possible, to specify a cuda stream, so all the internal calls to the cuda runtime (kernels, memory copies) are performed asynchronously, and we can synchronize either on GPU or CPU since we have access to the cuda stream where those calls where enqueued.

We have been looking into the source code (libavutil), and we don't see that possibility.

We have some ideas of how to make that possible by changing ffmpeg code, which we want to post on the ffmpeg-devel forums, but first we want to make sure we are not missing any way to do what we want to do with current ffmpeg code.

So, is it possible to tell ffmpeg to use the current CUDA context and specify a cudaStream?

Thanks!

Oscar
___

[id:image001.jpg at 01D27CB1.F5DE7C20]


Oscar Amoros Huguet
CUDA lead engineer
AUTOMATICTV


MEDIAPRO
Av. Diagonal 177, Planta 14
08018 Barcelona - Spain
T: + 34 93 476 15 51
Extension: 2337
oamoros at mediapro.es

www.automatic.tv<http://www.automatic.tv/>


DISCLAIMER: This message and its eventual attached documents are exclusively intended to their owners. If you receive this message by mistake, you must notify the sender and delete the message and its attachments, and do not make any copies.

MEDIAPRODUCCIÓN, S.L.U., informs you that according to LO 15/1999, for the protection of personal data your data will be included in a file of our responsibility in order to maintain professional relationship and sending commercial communications regarding our products and services. Your data may be communicated to other companies of Grupo Imagina (http://entidades.imagina-media.com/) for the above purposes, including those located outside the territory of the European Union. You can exercise your rights of access, rectification, cancellation, opposition by enclosing a photocopy of ID to MEDIAPRODUCCIÓN, S.L.U., Av. Diagonal 177, 12th floor, 08018 Barcelona; or by e-mail to the following address:   lopd at mediapro.es<mailto:lopd at mediapro.es>.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180405/1b4d11e1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 8320 bytes
Desc: image001.jpg
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180405/1b4d11e1/attachment.jpg>


More information about the Libav-user mailing list