Is it possible to draw TextOSD on YUV?

Hello,

Is it possible to draw TextOSD on YUV?
Referring to the following comment part of nvosd.h, it seems that both MODE_HW and MODE_GPU are impossible to draw text.
MODE_CPU seems to apply only to rgba data.

Is there any other way?

/**

  • List modes used to overlay boxes and text.

*/

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;

Thank you.

Hi,
It only supports RGBA. The internal code is based on cairo functions like this patch:
Tx2-4g r32.3.1 nvivafilter performance - #16 by DaneLLL

The supported formats are listed in:
Image Surfaces: Cairo: A Vector Graphics Library

For working with NvBuffer, we use CAIRO_FORMAT_ARGB32.

1 Like