cudaupload,cudadownload: Add support for dGPU NVMM
authorSeungha Yang <seungha@centricular.com>
Fri, 4 Mar 2022 17:30:24 +0000 (02:30 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 7 Mar 2022 19:05:29 +0000 (19:05 +0000)
commite5132a85082aa3fa01da6fcb293ad1b48533d3cc
treeb5ac58561224d2ac7c3d075a36bbe0f30da6528b
parentaf96f34fd86c7982a5828db37fb27250603e519c
cudaupload,cudadownload: Add support for dGPU NVMM

Implement NVMM <-> CUDA, GL, SYSTEM memory conversion. Jetson is
not supported yet. Note that NVMM <-> GL interop on Jetson platform
is supported by GstGL

Some example pipelines are:
- Convert NVMM to GstGL memory
  nvv4l2decoder ! "video/x-raw(memory:NVMM)" ! cudadownload ! "video/x-raw(memory:GLMemory)" ! glimagesink

- Upload system memory to NVMM and encode
  video/x-raw,format=NV12 ! cudaupload ! "video/x-raw(memory:NVMM)" ! nvv4l2h264enc

- Convert NVMM to GstCUDA memory and encode
  nvvideoconvert ! "video/x-raw(memory:NVMM)" ! cudaupload ! "video/x-raw(memory:CUDAMemory)" ! nvh264enc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1865>
subprojects/gst-plugins-bad/sys/nvcodec/gstcudaformat.h
subprojects/gst-plugins-bad/sys/nvcodec/gstcudamemorycopy.c
subprojects/gst-plugins-bad/sys/nvcodec/gstcudanvmm.c [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/nvcodec/gstcudanvmm.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/nvcodec/meson.build
subprojects/gst-plugins-bad/sys/nvcodec/plugin.c