When I set rect_params->bg_color.alpha to anything other than 1.0 or 0.0 I get the following error:
NvOsd ERR----line = 430 -2
I saw in the documentation that L4T Multimedia API Reference: NvOSD Library Nv_OSD_Mode does not take alpha parameter into account when it is set to MODE_HW, can this be the issue? I also noticed a method “nvosd_draw_rectangles”, but I cannot find it anywhere in the Deepstream code.
HI
Check this header file, /opt/nvidia/deepstream/deepstream-4.0/sources/includes/nvll_osd_struct.h
from deepstream package,
typedef enum {
MODE_CPU, /< Selects CPU for OSD processing.
Works with RGBA data only */
MODE_GPU, /< Selects GPU for OSD processing.
Yet to be implemented */
MODE_HW /**< Selects NV HW engine for rectangle draw and mask.
This mode works with both YUV and RGB data.
It does not consider alpha parameter.
Not applicable for drawing text. */
} NvOSD_Mode;
so you mentioned about “Nv_OSD_Mode does not take alpha parameter into account when it is set to MODE_HW”
it’s not a issue.
about you mentioned " “nvosd_draw_rectangles”, but I cannot find it anywhere in the Deepstream code."
OSD is not open sourced.
In the next release we have support for HW blending, which should solve the issue you are facing,
In the deepstream-app config file you can change process-mode to CPU mode, blending will work,
0 is CPU and 2 is HW (VIC)
–>> seems you are using your customized code from your description, suggest you verify with deepstream-app first, and refer to the sample for how to use process-mode, the code for process-mode here,
sources/apps/apps-common/src/deepstream_config_file_parser.c: parse_osd
From the parser I find that the ‘mode’ is added to the config, but it’s not anywhere in deepstream_app.c from the example apps, I can only see a ‘create_osd_bin’ if I see what this contains ./sources/apps/apps-common/src/deepstream_osd_bin.c, it just adds the properties to the element.
Yes I did, that’s what I meant with ‘parser’. In the parse_osd function, mode is set, but not used in deepstream_app.c, only in deepstream_osd_bin.c where it’s just added to the element.
I did that, but the error remains. I’ll keep digging.