> On 30. Apr 2018, at 15:52, Daniel Oberhoff <danieloberh...@googlemail.com> > wrote: > > 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.
Ok So i found i had a very stupid mistake where the code later assumed triplanar pixel format. Sorry for spamming, works like a charm :). Daniel
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel