Software buffer to GPU buffer

• Hardware Platform: Jetson Nano
• DeepStream Version 5.0
• JetPack Version: 4.4
• Issue Type: questions

can someone explain me how transforming from software buffer to GPU buffer works?

I have following pipeline:
appsrc → h264parse → nvv4l2decoder → nvstreammux → …

I thought, that in this case nvv4l2decoder converts automatically incoming buffers from software buffers to GPU buffers. Is it right?

However, in deepstream5.0 sample_apps there is code for deepstream-appsrc-test example with following pipeline:
appsrc → nvvideoconvert → capsfilter → …

and there is a comment in the code for nvvideoconvert :
"Use nvvideoconvert to convert from software buffer to GPU buffer"

Does it really mean that I need to use nvvideoconvert to convert buffers from software buffer to GPU buffer? I thought, that using nvidia gst elements such as nvvideoconvert, nvv4l2decoder, nvstreammux or nvinfer means using GPU buffers by default.


For this pipeline, the incoming buffer is software buffer containing compressed h264(avc) video stream data in software buffer, h264parse and nvv4l2decoder decodes these compressed data into raw YUV data in hardware buffer, so the transform is done by nvv4l2decoder.

For this pipeline, the input from appsrc is raw YUV/RGB video data, so nvvideoconvert transform the YUV/RGB software buffer to YUV/RGB hardware buffer so that nvstreammux can use the buffer.

Yes. You need this step if you want to use deepstream to do inference.

That depends on how you defining “use”. For nvstreammux and nvinfer, the input buffers and output buffers are all GPU buffers. For nvvideoconvert, the input buffer and output buffer can both be CPU buffer and GPU buffer, it depends on the scenario it is be used in the pipeline. For nvv4l2decoder, the input buffer contains compressed video data, so it is CPU buffer, the output buffer is GPU buffer.

Please refer to the document GStreamer Plugin Overview — DeepStream DeepStream Version: 5.0 documentation

Another suggestion is to learn some basic knowledge of gstreamer. GStreamer: open source multimedia framework

1 Like