# qtimlvconverter
Source: [https://docs.qualcomm.com/doc/80-70014-50/topic/qtimlvconverter.html](https://docs.qualcomm.com/doc/80-70014-50/topic/qtimlvconverter.html)
The qtimlvconverter plugin transforms the incoming video buffers into neural-network
tensors while performing necessary format conversion and resizing in the process. To achieve
these operations, the plugin leverages GPU hardware and ION/DMA allocated
buffers.
For floating point tensors, the mean and sigma properties are required in order to
properly transform the 8-bit unsigned integer images coming from the video source using
the formula: (channel - mean) x sigma, where channel is the value for either Red, Green,
Blue or Alpha channels of the color converted input.
For example, an RGB image with values R=255, G=127, B=0 and properties mean="<128.0,
156.0, 124.0, 58.0>" and sigma="<0.75, 0.34, 0.02, 0.07>" would have the following
channel transformations: R=(255 - 128.0) x 0.75, G=(127 - 156.0) x 0.34, B=(0 - 124.0) x
0.02.
Arrangement of the image pixels in the output tensor can be specified with the
subpixel-layout property.
The plugin uses Qualcomm IB2C library for all conversion operations. This library is
wrapped inside the custom GstGlesVideoConverter abstraction layer respectively with APIs
to create, configure and process the incoming and outgoing buffers.
The output buffers are allocated by a custom buffer pool class called GstMLBufferPool,
which can allocate ION buffers through IOCTL commands to the kernel.
Figure : Gstbuffer workflow with qtimlvconverter

## Inheritance chain
[GObject](https://docs.gtk.org/gobject/) → [GstObject](https://gstreamer.freedesktop.org/documentation/gstreamer/gstobject.html?gi-language=c) → [GstElement](https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html?gi-language=c) → [GstBaseTransform](https://gstreamer.freedesktop.org/documentation/base/gstbasetransform.html?gi-language=c) → GstMLVideoConverter
The following tables provide information on pad templates and element properties of
qtimlvconverter. For use cases, see [TensorFlow Lite use cases](https://docs.qualcomm.com/doc/80-70014-50/topic/tensorflow-lite-use-cases.html)
and [Qualcomm Neural Processing SDK use cases](https://docs.qualcomm.com/doc/80-70014-50/topic/qualcomm-neural-processing-sdk-use-cases.html).
## Pad configuration
| Pad Name | Capabilities | Capabilities | Capabilities |
| --- | --- | --- | --- |
| SINK template: 'sink'
*Availability:* Always
*Direction:* sink | video/x-raw | format: | { (string)RGBA, (string)BGRA, (string)ABGR, (string)ARGB,
(string)RGBx, (string)BGRx, (string)xRGB, (string)xBGR, (string)BGR,
(string)RGB, (string)GRAY8, (string)NV12, (string)NV21,
(string)YUY2, (string)UYVY } |
| SINK template: 'sink'
*Availability:* Always
*Direction:* sink | video/x-raw(memory:GBM) | format: | { (string)RGBA, (string)BGRA, (string)ABGR, (string)ARGB,
(string)RGBx, (string)BGRx, (string)xRGB, (string)xBGR, (string)BGR,
(string)RGB, (string)GRAY8, (string)NV12, (string)NV21,
(string)YUY2, (string)UYVY } |
| SRC template: 'src'
*Availability:* Always
*Direction:* source | neural-network/tensors | type: | { (string)UINT8, (string)INT32, (string)FLOAT16, (string)FLOAT32
} |
| | | | |
## Element configuration
Table : Element properties for qtimlvconverter
| Property | Description |
| --- | --- |
| name | The name of the object