OSD operation causes abnormal CPU usage surge

HI ,

When receiving a frame image from VI with 4K60 input and assigning OSD text through FD file descriptor, the process of drawing OSD will cause CPU usage to increase by 30%, which occasionally causes the VI to print a timeout error message. Why does the OSD assignment process consume so much CPU even though the size of the text box is not large?

NvOSD_TextParams textParams;
textParams.display_text = text;
textParams.x_offset = x;
textParams.y_offset = y;
textParams.font_params.font_name = “Arial”;
textParams.font_params.font_size = 5;

textParams.font_params.font_color.red = 0.0;
textParams.font_params.font_color.green = 0.0;
textParams.font_params.font_color.blue = 1.0;
textParams.font_params.font_color.alpha = 1.0;
textParams.text_bg_clr.alpha = 0.0;
nvosd_put_text(nvosd_context, MODE_GPU, fd, 1, &textParams);

This is expected since we support MODE_CPU mode in the fucntion. Please check
Text flashes and then disappears when use nvosd to overlay text in a gstreamer video - #15 by DaneLLL

ok thanks、

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.