[FFmpeg-devel] [PATCH v2] nv-codec-headers: add cuMemcpy
leozhang
nowerzt at gmail.com
Mon Nov 16 06:15:55 EET 2020
Signed-off-by: leozhang <nowerzt at gmail.com>
---
include/ffnvcodec/dynlink_cuda.h | 2 ++
include/ffnvcodec/dynlink_loader.h | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/include/ffnvcodec/dynlink_cuda.h b/include/ffnvcodec/dynlink_cuda.h
index 117fdc5..baafa49 100644
--- a/include/ffnvcodec/dynlink_cuda.h
+++ b/include/ffnvcodec/dynlink_cuda.h
@@ -365,6 +365,8 @@ typedef CUresult CUDAAPI tcuMemAlloc_v2(CUdeviceptr *dptr, size_t bytesize);
typedef CUresult CUDAAPI tcuMemAllocPitch_v2(CUdeviceptr *dptr, size_t *pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes);
typedef CUresult CUDAAPI tcuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream);
typedef CUresult CUDAAPI tcuMemFree_v2(CUdeviceptr dptr);
+typedef CUresult CUDAAPI tcuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t bytesize);
+typedef CUresult CUDAAPI tcuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t bytesize, CUstream hStream);
typedef CUresult CUDAAPI tcuMemcpy2D_v2(const CUDA_MEMCPY2D *pcopy);
typedef CUresult CUDAAPI tcuMemcpy2DAsync_v2(const CUDA_MEMCPY2D *pcopy, CUstream hStream);
typedef CUresult CUDAAPI tcuGetErrorName(CUresult error, const char** pstr);
diff --git a/include/ffnvcodec/dynlink_loader.h b/include/ffnvcodec/dynlink_loader.h
index b9995c3..85aebf4 100644
--- a/include/ffnvcodec/dynlink_loader.h
+++ b/include/ffnvcodec/dynlink_loader.h
@@ -152,6 +152,8 @@ typedef struct CudaFunctions {
tcuMemAllocPitch_v2 *cuMemAllocPitch;
tcuMemsetD8Async *cuMemsetD8Async;
tcuMemFree_v2 *cuMemFree;
+ tcuMemcpy *cuMemcpy;
+ tcuMemcpyAsync *cuMemcpyAsync;
tcuMemcpy2D_v2 *cuMemcpy2D;
tcuMemcpy2DAsync_v2 *cuMemcpy2DAsync;
tcuGetErrorName *cuGetErrorName;
@@ -290,6 +292,8 @@ static inline int cuda_load_functions(CudaFunctions **functions, void *logctx)
LOAD_SYMBOL(cuMemAllocPitch, tcuMemAllocPitch_v2, "cuMemAllocPitch_v2");
LOAD_SYMBOL(cuMemsetD8Async, tcuMemsetD8Async, "cuMemsetD8Async");
LOAD_SYMBOL(cuMemFree, tcuMemFree_v2, "cuMemFree_v2");
+ LOAD_SYMBOL(cuMemcpy, tcuMemcpy, "cuMemcpy");
+ LOAD_SYMBOL(cuMemcpyAsync, tcuMemcpyAsync, "cuMemcpyAsync");
LOAD_SYMBOL(cuMemcpy2D, tcuMemcpy2D_v2, "cuMemcpy2D_v2");
LOAD_SYMBOL(cuMemcpy2DAsync, tcuMemcpy2DAsync_v2, "cuMemcpy2DAsync_v2");
LOAD_SYMBOL(cuGetErrorName, tcuGetErrorName, "cuGetErrorName");
--
2.11.0
More information about the ffmpeg-devel
mailing list