my project want to use GUP to decode two h264 video,scaled one video and mixed video and then encode in GPU,
now I use video sdk and can decode h264 from video api,but from api ,I can only get CUdeviceptr,I need to get the GPU memory address for YUV scale and merge,
below is my video sdk code:
The deviceptr returned by cuvidMapVideoframe precisely points to memory location in the Video memory which contains the output. In your case pDecodedFrame is of type CUdeviceptr which is actually the pointer to GPU memory. You can use this in subsequent CUDA operations as CUdeviceptr. In case you need to access this output in sysmem/cpu you need to allocate system resource and do a cuMemcpyDtoH from dev ptr to sys ptr.