CM YUV Filter
The cmYuvFilter is used to convert the input video/x-raw data to another video/x-raw format, such as YUYV to BGR. Sometimes, when users get video/x-raw from the sensor, on one hand, the data needs to be encoded, on the other hand, it should be converted to another format for NN detection. This component can be used for it.
API Instructions
create/destroy
gpointer cm_yuv_filter_create();
void cm_yuv_filter_destroy(gpointer hd);
start/stop
void cm_yuv_filter_start(gpointer hd);
void cm_yuv_filter_stop(gpointer hd);
parameters
The support format can refer to the output of the GStreamer elements videoconvert.
/* @fmt Set output video/x-raw format if need, such as BGR, GBRA */
void cm_yuv_filter_set_convert_format(gpointer hd, gchar* fmt);
/* @return The format string after convert*/
const char* cm_yuv_filter_get_caps_str(gpointer hd);
data
The cmYuvFilter uses the GStreamer elements videoconvert to convert. Because the conversion is software-only, it can be time-consuming. If the user requires conversion speed, here is a faster method, but only some of the formats are supported.
Â