Copy NV12 decoded frame to D3D11Texture and memory buffer

Hey,

After successfully decoding video frame, I need to copy it to D3D11Texture2D (NV12) registered as resource and mapped, and also copy it to host memory as NV12 buffer. I’m totally lost trying to figure out how this should be done and what API calls should be used in this case - cuMemcpy2d? cuMemcpy? And how to do this considering the NV12 memory layout. I had no problem doing this after RGB color conversion, but I need the original NV12. Please assist…