[FFmpeg-devel] cuda-gl

Daniel Oberhoff danieloberhoff at googlemail.com
Mon Apr 30 16:52:48 EEST 2018

Hello All,

I am fighting since a few days to get the frames from the cuvid decoder using the cuda pixel format transfered to opengl.

What i have done is create textures on gl using glGenTextures and glTexStorage2D. The actual format is NV12 in my case, and i properly allocate two planes with the first one being full size, 1bpp, and the second size halve size (in both dimensions) and 2bpp. The transfer is done with cuGraphicsMapResources, cuGraphicsSubResourceGetMappedArray, cuMemcpy2DAsync, cuGraphicsUnmapResources, running on an allocated stream, followed by cuStreamSynchronize. But when i draw this (i have a yuv aware shader) i am missing all the red information, as if the v channel where 0 everywhere.

Has anyone succeeded in this before? It seems like someone at least has interest in this, given that the needed functions appeared in nv_codec_headers recently.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180430/4b452e24/attachment.sig>

More information about the ffmpeg-devel mailing list