<div dir="ltr"><div>Hello,</div><div><br></div><div>I have been using the libav* libraries c-api here recently and it's been a blast!</div><div><br></div><div>I am currently working with the ffmpeg example hw_decode.c (targeting only cuda decoder for now) and I would like to get the hw decoded frame into my own cuda allocated memory instead of copying to the cpu and writing to disk as is done in the example: <a href="https://github.com/FFmpeg/FFmpeg/blob/ab37c7e49ff98a8c32c90e6df49dd11145bc64bb/doc/examples/hw_decode.c#L108">https://github.com/FFmpeg/FFmpeg/blob/ab37c7e49ff98a8c32c90e6df49dd11145bc64bb/doc/examples/hw_decode.c#L108</a>. Additionally, I would like this frame to be in RGB colorspace.<br><br>My questions are:<br><ol><li>How can I copy the hw (NV12 format) frame into my own cuda memory (cudaMalloc from cuda_runtime.h)?<br></li><li>How can I do the colorspace conversion? Is there a way to do this with libav* libraries prior to copying into my application memory? If not, I could probably write my own cuda kernel or something.<br></li></ol><div>Any info would be greatly appreciated!</div><br>Thank you,<br>- Cole</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><br></div></div></div></div>