Gst-nvvideoconvert

This plugin performs video color format conversion. It accepts NVMM memory as well as RAW (memory allocated using calloc() or malloc() ), and provides NVMM or RAW memory at the output.

Gst-nvvideoconvert

Inputs and Outputs

  • Inputs

    • Gst Buffer batched buffer

    • NvDsBatchMeta

    • Format: NV12, I420, P010_10LE, BGRx, RGBA (NVMM/RAW)

  • Control parameters

    • gpu-id (dGPU only)

    • nvbuf-memory-type

    • src-crop

    • dst-crop

    • interpolation-method

    • compute-hw

  • Output

    • Gst Buffer

    • NvDsBatchMeta

    • Format: NV12, I420, P010_10LE, BGRx, RGBA (NVMM/RAW)

Features

This plugin supports scaling and conversion for NVMM to NVMM, RAW to NVMM, and NVMM to RAW and RAW to RAW buffer type conversion. The plugin supports cropping of the input and output frames.

Gst Properties

The following table describes the Gst properties of the Gst-nvvideoconvert plugin.

Gst-nvvideoconvert gst properties

Property

Meaning

Type and Range

Example Notes

nvbuf-memory-type

Type of memory to be allocated. For dGPU:

0 (nvbuf-mem-default): Default memory, cuda-device

1 (nvbuf-mem-cuda-pinned): Pinned/Host CUDA memory

2 (nvbuf-mem-cuda-device) Device CUDA memory

3 (nvbuf-mem-cuda-unified): Unified CUDA memory

For Jetson:

0 (nvbuf-mem-default): Default memory, surface array

4 (nvbuf-mem-surface-array): Surface array memory

enum GstNvVidConvBufMemoryType

src-crop

Pixel location: left:top:width:height of the input image which will be cropped and transformed into the output buffer. If the crop location is out of bound the values will be clamped to image boundaries of the input image. This property will be applied to all the input images in the batch

String

src-crop=”20:40:150:100”

dest-crop

Pixel location: left:top:width:height is the location in the output image where the input image will be transformed to. If the crop location is out of bound the values will be clamped to image boundaries of the output image. This property will be applied to all the output images in the batch

String

dest-crop=”20:40:150:100”

interpolation-method

Interpolation method.
0: Nearest
1: Bilinear
2: Algo-1 (GPU—Cubic, VIC—5 Tap)
3: Algo-2 (GPU—Super, VIC—10 Tap)
4: Algo-3 (GPU—LanzoS, VIC—Smart)
5: Algo-4 (GPU—Ignored, VIC—Nicest)
6: Default (GPU—Nearest, VIC—Nearest)

enum GstInterpolationMethod

interpolation-method=1 Default value is 6.

compute-hw

Type of computing hardware
0: Default (GPU for gDPU, VIC for Jetson)
1: GPU
2: VIC

enum GstComputeHW

compute-hw=0 Default value is 0.

gpu-id

Device ID of GPU to use for format conversion

Integer, 0 to 4,294,967,295

gpu-id=0

output-buffers

Number of Output Buffers for the buffer pool

Unsigned integer, 1 to 4,294,967,295

output-buffers=4