NVIDIA VPI GStreamer Plug-in/Examples/Videoconvert: Difference between revisions
mNo edit summary |
|||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{NVIDIA VPI GStreamer Plug-in/Head|previous=Examples/Overlay|next=Examples/Videoscale| | {{NVIDIA VPI GStreamer Plug-in/Head|previous=Examples/Overlay|next=Examples/Videoscale|metakeywords=vpivideoconvert, Videoconvert}} | ||
</noinclude> | </noinclude> | ||
Line 38: | Line 38: | ||
Default: 0.0<br/> | Default: 0.0<br/> | ||
== Example == | == NVIDIA VPI GStreamer Plug-in Videoconvert Example == | ||
The following example pipe will convert a video from BGR format to RGB. You may modify the properties values according to the information above. | The following example pipe will convert a video from BGR format to RGB. You may modify the properties values according to the information above. |
Revision as of 18:07, 23 February 2023
GstVPI |
---|
GstVPI Basics |
Getting Started |
Examples |
Performance |
Contact Us |
Introduction
The vpivideoconvert element applies a format conversion between the sink and source caps.
Element properties
- backend
Backend to use to execute VPI algorithms. Available options:
- cpu: CPU backend
- cuda: CUDA backend
- pva: PVA backend (Xavier only)
- vic: VIC backend
Flags: readable, writable
Default: "cuda"
- conversion-policy
The policy used when converting between image types. Available Options:
- cast: Casts input to the output type. Overflows and underflows are handled as per C specification, including situations of undefined behavior.
- clamp: Clamps input to output's type range. Overflows and underflows are mapped to the output type's maximum and minimum representable value, respectively. When the output type is floating-point, the clamp behaves like the cast.
Flags: readable, writable
Default: "clamp"
- scale
Factor on which to scale the conversion. Useful for type conversions.
Type: Float
Range: -3.4e+38 - 3.4e+38
Flags: readable, writable
Default: 1.0
- offset
Offset to add to the conversion. Useful for type conversions. Available options:
Type: Float
Range: -3.4e+38 - 3.4e+38
Flags: readable, writable
Default: 0.0
NVIDIA VPI GStreamer Plug-in Videoconvert Example
The following example pipe will convert a video from BGR format to RGB. You may modify the properties values according to the information above.
- Unified memory
gst-launch-1.0 videotestsrc ! video/x-raw,format=BGR ! vpiupload ! vpivideoconvert conversion-policy=cast ! vpidownload ! video/x-raw,format=RGB ! fakesink
- NVMM memory
gst-launch-1.0 videotestsrc ! "video/x-raw,format=I420" ! nvvidconv bl-output=false ! "video/x-raw(memory:NVMM)" ! vpiupload ! vpivideoconvert conversion-policy=cast ! vpidownload ! video/x-raw,format=RGB ! fakesink