Skip to content

tiovxcolorconvert

Marco Herrera edited this page Feb 3, 2022 · 15 revisions

TIOVX Color Convert

tiovxcolorconvert is used to convert video frames between different video formats.

Hierarchy

GObject
 ╰──GInitiallyUnowned
     ╰──GstObject
         ╰──GstElement
             ╰──GstBaseTransform
                 ╰──GstTIOVXSiso
                     ╰──GstTIOVXColorconvert

Pad templates

sink

      video/x-raw
                 format: { (string)RGB, (string)RGBx, (string)NV12, (string)NV21, (string)UYVY, (string)YUY2, (string)I420 }
                  width: [ 1, 8192 ]
                 height: [ 1, 8192 ]
      video/x-raw(memory:batched)
                 format: { (string)RGB, (string)RGBx, (string)NV12, (string)NV21, (string)UYVY, (string)YUY2, (string)I420 }
                  width: [ 1, 8192 ]
                 height: [ 1, 8192 ]
           num-channels: [ 1, 16 ]

Availability – always

Direction – sink

Object type – GstPad

src

      video/x-raw
                 format: { (string)RGB, (string)RGBx, (string)NV12, (string)I420, (string)Y444 }
                  width: [ 1, 8192 ]
                 height: [ 1, 8192 ]
      video/x-raw(memory:batched)
                 format: { (string)RGB, (string)RGBx, (string)NV12, (string)I420, (string)Y444 }
                  width: [ 1, 8192 ]
                 height: [ 1, 8192 ]
           num-channels: [ 1, 16 ]

Availability – always

Direction – src

Object type – GstPad

Properties

in-pool-size

Number of buffers to allocate in input pool

Unsigned Integer. Range: 2 - 16 Default value : 2

name

The name of the object

String Default value : "tiovxcolorconvert0"

out-pool-size

Number of buffers to allocate in output pool

Flags : Read / Write

Unsigned Integer. Range: 2 - 16 Default value : 2

parent

The parent of the object

Flags : Read / Write

GstObject Default value : N/A

qos

Handle Quality-of-Service events Flags : Read / Write

Boolean Default value : false

target

TIOVX target to use by this element

Flags : Read / Write

Enum

Default value : DSP-1 (0) Enum "GstTIOVXColorConvertTarget

(0): DSP-1 - DSP instance 1, assigned to C66_0 core

(1): DSP-2 - DSP instance 1, assigned to C66_1 core

Pipeline examples

Single colorconvert

gst-launch-1.0                                                                 \
videotestsrc num-buffers=20 is-live=true ! "video/x-raw,format=RGB" !          \
tiovxcolorconvert in-pool-size=4 out-pool-size=4 ! "video/x-raw,format=NV12" ! \
fakesink -e

Two sequential colorconvert

gst-launch-1.0                                                                 \
videotestsrc num-buffers=20 is-live=true ! "video/x-raw,format=RGB" !          \
tiovxcolorconvert in-pool-size=4 out-pool-size=4 ! "video/x-raw,format=NV12" ! \
tiovxcolorconvert ! "video/x-raw,format=RGB" !                                 \
fakesink -e

Batched processing

gst-launch-1.0                                                                        \
videotestsrc is-live=true num-buffers=20 pattern=0 ! "video/x-raw, format=RGB" ! mux. \
videotestsrc is-live=true num-buffers=20 pattern=1 ! "video/x-raw, format=RGB" ! mux. \
tiovxmux name=mux ! "video/x-raw(memory:batched), format=RGB" !                       \
tiovxcolorconvert ! "video/x-raw(memory:batched), format=NV12" !                      \
tiovxdemux name=demux                                                                 \
demux. ! queue ! fakesink -e                                                          \
demux. ! queue ! fakesink -e