I am using nvencode for video encoding. My capture card copies frames to pre allocated input buffers (NV_ENC_INPUT_PTR) using direct dma transfers (GpuDirect). the sequence looks like so:
nvEncodeApi->nvEncLockInputBuffer(_encoder, &lockInputBufferParams); // lock input buffer
DmaCopy(lockInputBufferParams.bufferDataPtr); // initiate dma transfer
// here I initiate the encoding process
This works fine, but in order to present the captured frame I need to copy it to a texture.
Is there a method to issue a copy from the NV_ENC_INPUT_PTR inputBuffer to a Direct3d11 texture once it is unlocked?
Note: I know I can use Direct3D texture as an input buffer to nvencode and use Map/Unmap API. But my capture card can’t seems to be able to perform DMA transfers directly to a mapped texture.