nvcodec: Add CUDA specific memory and bufferpool
authorSeungha Yang <seungha.yang@navercorp.com>
Mon, 19 Aug 2019 09:02:56 +0000 (18:02 +0900)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 16 Oct 2020 15:56:49 +0000 (15:56 +0000)
commitcf5ef5635fb204cebd277db5d8de741827289f52
treedf2f2381f391c65e0e26902afd5bd5fb4c9914c0
parent11353b3f6e2f047cc37483d21e6a37ae558896bc
nvcodec: Add CUDA specific memory and bufferpool

Introducing CUDA buffer pool with generic CUDA memory support.
Likewise GL memory, any elements which are able to access CUDA device
memory directly can map this CUDA memory without upload/download
overhead via the "GST_MAP_CUDA" map flag.
Also usual GstMemory map/unmap is also possible with internal staging memory.

For staging, CUDA Host allocated memory is used (see CuMemAllocHost API).
The memory is allowing system access but has lower overhead
during GPU upload/download than normal system memory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1633>
sys/nvcodec/gstcudabufferpool.c [new file with mode: 0644]
sys/nvcodec/gstcudabufferpool.h [new file with mode: 0644]
sys/nvcodec/gstcudaloader.c
sys/nvcodec/gstcudaloader.h
sys/nvcodec/gstcudamemory.c [new file with mode: 0644]
sys/nvcodec/gstcudamemory.h [new file with mode: 0644]
sys/nvcodec/meson.build
sys/nvcodec/stub/cuda.h