Text OSD with 31+ characters has issues

Hi,

For rts_osd2_type_text when the string buffer has more than 31 characters, the trailing characters are not printing sometimes and total text ignored if more than 36+ characters are available.

The OSD demo provided ameba-rtos-pro2/component/video/osd2/isp_osd_example.c at main · Ameba-AIoT/ameba-rtos-pro2 · GitHub has string buffer of length 64, but it is not printing properly if we keep more than 31 characters.

Please provide an update with fix for this issue and also OSD text with black color showing black rectangles instead of characters - #8 by yugandhar

Thanks

Yugandhar

Hi @yugandhar ,

May we know how many characters are you planning to print?

Thank you.

Hi @KevinKL ,

The length of text may vary based on user input, but we can allow upto 100 characters for Text OSD.

Thanks,

Yugandhar

Hi @yugandhar ,

As the changes of maximum char limit might involve the update of library, would you mind to print the characters in multiple separate blocks, where each block prints up to 31 char?

Thank you.

Hi @KevinKL ,

I didn’t see any maximum char limit supported by Text OSD in SDK code or Realtek AmebaPro2 application note — AmebaPro2's Documentation v0.1 documentation , the only example you provided has char array of 64 bytes, so anynone can assume like it may support upto 63 characters, but in reality it is not printing if more than 31 characters found in the text OSD buffer.

The answers I am expecting from you are below.

  1. What is the Text OSD max supported characters length?
  2. Is it posible to increase this length in next release?

Thanks,

Yugandhar

Hi @yugandhar ,

To answer your questions,

  1. The maximum supported characters length is OSD_TEXT_STR_MAX - 1, i.e. 31 according to the current macro definition in ameba-rtos-pro2/component/soc/8735b/fwlib/rtl8735b/lib/source/ram/video/hal_osd_util.h at main · Ameba-AIoT/ameba-rtos-pro2 · GitHub
  2. Yes, we will try to increase the value of OSD_TEXT_STR_MAX in the future release.

Thank you.

Hi @yugandhar ,

While we are working on the library update, you may apply this patch for the immediate fix. The value of OSD_TEXT_STR_MAX is set to 128, so technically you can print up to 127 characters per block as long as they can fit into the display by adjusting the width and height.

Thank you.

osd_patch.zip (380.0 KB)

Hi @KevinKL ,

Is this patch covers OSD text with black color showing black rectangles instead of characters - #10 by yugandhar issue also, recently I got an OSD patch from Pammy.

Thank you.

Hi @yugandhar,

Yes, this patch includes my fix. We will update the SDK together on GitHub. Thank you.