Loading...
Searching...
No Matches
nv_dvp_bridge.cpp File Reference

Implementation of nv_dvp_bridge.h. Wraps NVIDIA's "GPUDirect for Video" (DVP) SDK so score's AJA GPU-direct output path can DMA encoder output from GPU memory to AJA-DMA-locked sysmem on Windows. More...

Detailed Description

Implementation of nv_dvp_bridge.h. Wraps NVIDIA's "GPUDirect for Video" (DVP) SDK so score's AJA GPU-direct output path can DMA encoder output from GPU memory to AJA-DMA-locked sysmem on Windows.

Reference implementation: AJA's ntv2glTextureTransferNV.cpp in 3rdparty/libajantv2/demos/NVIDIA/common/. This bridge collapses the demo's chunked-async transfer into one synchronous call per frame; the AJA strategies in score-plugin-gfx provide pipelining via their slot ring + the AJAConsumerThread instead of via DVP-side chunking.

Classes

struct  NvDvpContext_t
 

Macros

#define DVP_CHECK(call, ctx, retval)
 

Functions

bool nv_dvp_available (void)
 
const char * nv_dvp_get_error_string (NvDvpContextHandle ctx)
 
NvDvpError nv_dvp_init_d3d11 (NvDvpContextHandle *out_ctx, void *d3d11_device)
 
NvDvpError nv_dvp_init_gl (NvDvpContextHandle *out_ctx)
 
NvDvpError nv_dvp_init_cuda (NvDvpContextHandle *out_ctx)
 
void nv_dvp_shutdown (NvDvpContextHandle ctx)
 
NvDvpError nv_dvp_thread_begin (NvDvpContextHandle ctx)
 
NvDvpError nv_dvp_thread_end (NvDvpContextHandle ctx)
 
NvDvpError nv_dvp_register_d3d11_texture (NvDvpContextHandle ctx, void *d3d11_texture, NvDvpFormat, uint32_t width, uint32_t height, NvDvpResourceHandle *out_handle)
 
NvDvpError nv_dvp_register_gl_texture (NvDvpContextHandle ctx, uint32_t gl_texture_id, NvDvpFormat, uint32_t width, uint32_t height, NvDvpResourceHandle *out_handle)
 
NvDvpError nv_dvp_register_cuda_device_ptr (NvDvpContextHandle ctx, uint64_t cuda_device_ptr, NvDvpFormat, uint32_t width, uint32_t height, NvDvpResourceHandle *out_handle)
 
NvDvpError nv_dvp_register_cuda_array (NvDvpContextHandle ctx, void *cuda_array, NvDvpFormat, uint32_t width, uint32_t height, NvDvpResourceHandle *out_handle)
 
NvDvpError nv_dvp_register_sysmem_buffer (NvDvpContextHandle ctx, void *sysmem_ptr, NvDvpFormat format, uint32_t width, uint32_t height, uint32_t stride_bytes, NvDvpResourceHandle *out_handle)
 
void nv_dvp_unregister (NvDvpContextHandle ctx, NvDvpResourceHandle handle)
 
NvDvpError nv_dvp_acquire_texture (NvDvpContextHandle ctx, NvDvpResourceHandle texture)
 
NvDvpError nv_dvp_release_texture (NvDvpContextHandle ctx, NvDvpResourceHandle texture)
 
NvDvpError nv_dvp_copy_texture_to_buffer (NvDvpContextHandle ctx, NvDvpResourceHandle src_texture, NvDvpResourceHandle dst_buffer)
 
NvDvpError nv_dvp_copy_buffer_to_texture (NvDvpContextHandle ctx, NvDvpResourceHandle src_buffer, NvDvpResourceHandle dst_texture)
 
NvDvpError nv_dvp_copy_buffer_to_cuda (NvDvpContextHandle ctx, NvDvpResourceHandle src_buffer, NvDvpResourceHandle dst_cuda, void *cuda_stream)
 
NvDvpError nv_dvp_copy_cuda_to_buffer (NvDvpContextHandle ctx, NvDvpResourceHandle src_cuda, NvDvpResourceHandle dst_buffer, void *cuda_stream)
 
void * nv_dvp_aligned_alloc (uint64_t bytes)
 
void nv_dvp_aligned_free (void *ptr)
 

Macro Definition Documentation

◆ DVP_CHECK

#define DVP_CHECK (   call,
  ctx,
  retval 
)
Value:
do \
{ \
DVPStatus _st = (call); \
if(_st != DVP_STATUS_OK) \
{ \
setError((ctx), #call, _st); \
return (retval); \
} \
} while(0)