There are certain situations where the available frame resolution and color format might not be suitable for the next component’s consumption. For instance, in machine learning applications, inputs can be sourced from different resolutions and color formats, but the ML models require a fixed resolution and specific color formats. Thus, it becomes necessary to resize the input image to a different resolution and convert its color space, for example, to BGR.
In some adaptive bit rate (ABR) use cases, a single video is encoded at different bit rates to allow streaming under different network bandwidth conditions without artifacts. This requires the input frame to be decoded, resized to different resolutions, and then re-encoded. To accelerate these processes, vvas_xabrscaler is a GStreamer plug-in that can take one input frame and produce multiple output frames with different resolutions and color formats. This plug-in can also perform the pre-processing operations like mean subtraction, normalization, and cropping. This plugin is HW accelerated.
For insight into the implementation details, refer to the vvas_xabrscaler source code located at: <vvas>/vvas-gst-plugins/sys/abrscaler/.
vvas_xabrscaler is based on the VVAS image processing library.
This plug-in supports:
Single input, multiple output pads
Color space conversion
Resize
Each output pad has independent resolution and color space conversion capability.
Crop of input buffer