GstCUDA - Example: cudamux

From RidgeRun Developer Connection
Jump to: navigation, search


Previous: Example - cudafilter: Unified memory allocator Index Next: Example - cudamux: NVMM direct mapping


Nvidia-preferred-partner-badge-rgb-for-screen.png



This page gives an usage example of the cudamux element.

Error something wrong.jpg Problems running the pipelines shown on this page?
Please see our GStreamer Debugging guide for help.




Introduction

GstCUDA offers one basic CUDA algorithm library example, designed for the cudamux element that works just out of the box, so it is perfect for training and giving the first steps on GstCUDA. The idea is to give detailed examples on how to use the cudamux element, and also to give some examples of written code of a functional (out of the box) CUDA algorithm library for the cudamux element. The cudamux CUDA algorithm library example is automatically built, and you can find it under the following path:

  • $GstCUDA_DIR/tests/examples/cudamux_algorithms/mixer/mixer.so

The mixer.so CUDA algorithm library consists of a very basic algorithm that receives two YUV I420 images as inputs and mixed them on the GPU, this generates an output image that is the average of the two input images. All the processing of the images is done in the GPU. This basic algorithm is just for example and demonstration purposes, because it shows the capability of GstCUDA to execute an algorithm on the GPU that goes through each pixel in the incoming images, process them, and generate an output image.

Below you will find a set of test pipelines with their respective performance stats for the mixer CUDA algorithm library.

Note: To get the best performance on the Tegra platform, you must execute the jetson_clocks.sh script. This script tune-up the Tegra to high-performance mode. All the reported performance stats came from tests done after ran the jetson_clocks.sh script. Execute command: sudo ~/jetson_clocks.sh

Examples Index


Previous: Example - cudafilter: Unified memory allocator Index Next: Example - cudamux: NVMM direct mapping