UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Reply

OSD text not displayed but boxes works fine !!! please help !!!

Highlighted
Visitor
Posts: 3
Registered: ‎03-08-2018

OSD text not displayed but boxes works fine !!! please help !!!

[ Edited ]

hi all,
    why does my osd instance only work fine with box ?

    i felt i've done all that i can, but texts can't get displayed ~

 

   i generated the instruction list, with 2 text-strings and 3 boxes according to PG10

   after loading the instruction list of ( 2 + 3  = 5) graphics elements,

   the 2 text strings didn't appear, but the 3 boxes were well displayed.

 

   my OSD configuration:

  Version = 6.0

   Screen Size= 1280 x 1024

   2 layers : 0 - video AXI4S, 1 - GPU

   Screen Size = 1280 x 1024

  Video Layer Size = GPU Layer SIze = 1024 x 768

 Color LUT = 16 color

  Text String RAM = 32 x 32 ( 32 strings of maximal 32 chars)

  Instruction RAM = 128 instructions ( each instruction is composed of 4 x 32-bit word )

  Font RAM (Char Set RAM) = 96

  ASCII offset = 32

  AXI clock = 100MHz, (AXI-Lite 100MHz clock)

  AXI4S clock = 200MHz (both video in and video out operates with the same 200MHz clock)

  Color Model = RGB, 8bit component ( i.e., 3 x 8 = 24 bit in total )

 

  particularly, i get a little confused about how to define a font array,

  what is the relationship between:

     i. Font RAM (Char Set RAM) size (in our case :96)

     ii. ASCII offset (in our case : 32)

     iii. ASCII table

 

 besides, is it possible to load a non-ASCII char set to the FONT ram ?

 

  how to load the font RAM into the OSD core ?

 

  Finally, does OSD_V6_0 still support text overlay ( or it only supports box overlay and no longer supports text overlay) ?

 

 

  below is my code concerning the loading of resources, anything wrong with it ??

/////////////////////////////////////////////////////////////////////////////////
/*
 * Color table definition
 * (16 32-bit-color LUT from OSD test example of Vivado 2014.3)
 */
Xuint32 OSD_COLOR_LUT[16]
=
{
    0x00000000, 0xa0a25f58, 0xa08080ff, 0xa0808010,
    0xa0ef5a51, 0x00000000, 0xa0465289, 0x00000000,
    0xa065ba6b, 0x00000000, 0xa09017c5, 0xa0a9c860,
    0xa0bc3198, 0xa010a5a9, 0xa0808080, 0xa0ada1ab
};

/*
 * Text table definition
 * (32 text LUT)
 */
char __attribute__ ((aligned (4))) OSD_TEXT_LUT[32][32]
=
{
    /*
     * digits
     */
    "0"    ,    /**< 00 >**/
    "1"    ,    /**< 01 >**/
    "2"    ,    /**< 02 >**/
    "3"    ,    /**< 03 >**/
    "4"    ,    /**< 04 >**/
    "5"    ,    /**< 05 >**/
    "6"    ,    /**< 06 >**/
    "7"    ,    /**< 07 >**/
    "8"    ,    /**< 08 >**/
    "9"    ,    /**< 09 >**/
    /*
     * signs
     */
    "+" ,       /**< 10 >**/
    "-" ,       /**< 11 >**/
    " " ,       /**< 12 >**/
    /*
     * algorithm type
     */
    "CEN"  ,    /**< 13 >**/
    "COR"  ,    /**< 14 >**/
    "FEA"  ,    /**< 15 >**/
    /*
     * background mode
     */
    "A"    ,    /**< 16 >**/
    "B"    ,    /**< 17 >**/
    /*
     * operating mode
     */
    "SRC"  ,    /**< 18 >**/
    "TRC"  ,    /**< 19 >**/
    /*
     * focal length
     */
    "f"    ,    /**< 20 >**/
    "mm"   ,    /**< 21 >**/
    /*
     * target position
     */
    "X="  ,     /**< 22 >**/
    "Y="  ,     /**< 23 >**/
    /*
     * reserved strings
     */
    "RSVD" ,    /**< 24 >**/
    "RSVD" ,    /**< 25 >**/
    "RSVD" ,    /**< 26 >**/
    "RSVD" ,    /**< 27 >**/
    "RSVD" ,    /**< 28 >**/
    "RSVD" ,    /**< 29 >**/
    "RSVD" ,    /**< 30 >**/
    "RSVD" ,    /**< 31 >**/
};

/*
 * Font definition (ASCII code table)
 * (96 8-1-8 font LUT from OSD test example of Vivado 2014.3)
 * starting from ' ' in the ASCII table
 */
unsigned char __attribute__ ((aligned (4))) OSD_FONT_LUT[96][8]
=
{
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // Space
    {0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x00},
    {0x00, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00},
    {0x00, 0x66, 0xFF, 0x66, 0x66, 0xFF, 0x66, 0x00},
    {0x18, 0x3E, 0x60, 0x3C, 0x06, 0x7C, 0x18, 0x00},
    {0x00, 0x66, 0x6C, 0x18, 0x30, 0x66, 0x46, 0x00},
    {0x1C, 0x36, 0x1C, 0x38, 0x6F, 0x66, 0x3B, 0x00},
    {0x00, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00},
    {0x00, 0x0E, 0x1C, 0x18, 0x18, 0x1C, 0x0E, 0x00},
    {0x00, 0x70, 0x38, 0x18, 0x18, 0x38, 0x70, 0x00},
    {0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00},
    {0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30},
    {0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00},
    {0x00, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x40, 0x00},
    {0x00, 0x3C, 0x66, 0x6E, 0x76, 0x66, 0x3C, 0x00},
    {0x00, 0x18, 0x38, 0x18, 0x18, 0x18, 0x7E, 0x00},
    {0x00, 0x3C, 0x66, 0x0C, 0x18, 0x30, 0x7E, 0x00},
    {0x00, 0x7E, 0x0C, 0x18, 0x0C, 0x66, 0x3C, 0x00},
    {0x00, 0x0C, 0x1C, 0x3C, 0x6C, 0x7E, 0x0C, 0x00},
    {0x00, 0x7E, 0x60, 0x7C, 0x06, 0x66, 0x3C, 0x00},
    {0x00, 0x3C, 0x60, 0x7C, 0x66, 0x66, 0x3C, 0x00},
    {0x00, 0x7E, 0x06, 0x0C, 0x18, 0x30, 0x30, 0x00},
    {0x00, 0x3C, 0x66, 0x3C, 0x66, 0x66, 0x3C, 0x00},
    {0x00, 0x3C, 0x66, 0x3E, 0x06, 0x0C, 0x38, 0x00},
    {0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00},
    {0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x30},
    {0x06, 0x0C, 0x18, 0x30, 0x18, 0x0C, 0x06, 0x00},
    {0x00, 0x00, 0x7E, 0x00, 0x00, 0x7E, 0x00, 0x00},
    {0x60, 0x30, 0x18, 0x0C, 0x18, 0x30, 0x60, 0x00},
    {0x00, 0x3C, 0x66, 0x0C, 0x18, 0x00, 0x18, 0x00},

    {0x00, 0x3C, 0x66, 0x6E, 0x6E, 0x60, 0x3E, 0x00}, // @
    {0x00, 0x18, 0x3C, 0x66, 0x66, 0x7E, 0x66, 0x00}, // A
    {0x00, 0x7C, 0x66, 0x7C, 0x66, 0x66, 0x7C, 0x00},
    {0x00, 0x3C, 0x66, 0x60, 0x60, 0x66, 0x3C, 0x00},
    {0x00, 0x78, 0x6C, 0x66, 0x66, 0x6C, 0x78, 0x00},
    {0x00, 0x7E, 0x60, 0x7C, 0x60, 0x60, 0x7E, 0x00},
    {0x00, 0x7E, 0x60, 0x7C, 0x60, 0x60, 0x60, 0x00},
    {0x00, 0x3E, 0x60, 0x60, 0x6E, 0x66, 0x3E, 0x00},
    {0x00, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00},
    {0x00, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x00},
    {0x00, 0x06, 0x06, 0x06, 0x06, 0x66, 0x3C, 0x00},
    {0x00, 0x66, 0x6C, 0x78, 0x78, 0x6C, 0x66, 0x00},
    {0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7E, 0x00},
    {0x00, 0x63, 0x77, 0x7F, 0x6B, 0x63, 0x63, 0x00},
    {0x00, 0x66, 0x76, 0x7E, 0x7E, 0x6E, 0x66, 0x00},
    {0x00, 0x3C, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00},
    {0x00, 0x7C, 0x66, 0x66, 0x7C, 0x60, 0x60, 0x00},
    {0x00, 0x3C, 0x66, 0x66, 0x66, 0x6C, 0x36, 0x00},
    {0x00, 0x7C, 0x66, 0x66, 0x7C, 0x6C, 0x66, 0x00},
    {0x00, 0x3C, 0x60, 0x3C, 0x06, 0x06, 0x3C, 0x00},
    {0x00, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00},
    {0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7E, 0x00},
    {0x00, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00},
    {0x00, 0x63, 0x63, 0x6B, 0x7F, 0x77, 0x63, 0x00},
    {0x00, 0x66, 0x66, 0x3C, 0x3C, 0x66, 0x66, 0x00},
    {0x00, 0x66, 0x66, 0x3C, 0x18, 0x18, 0x18, 0x00},
    {0x00, 0x7E, 0x0C, 0x18, 0x30, 0x60, 0x7E, 0x00},
    {0x00, 0x1E, 0x18, 0x18, 0x18, 0x18, 0x1E, 0x00},
    {0x00, 0x40, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x00},
    {0x00, 0x78, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00},
    {0x00, 0x08, 0x1C, 0x36, 0x63, 0x00, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00},

    {0x40, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, // `
    {0x00, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00}, // a
    {0x00, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x7C, 0x00},
    {0x00, 0x00, 0x3C, 0x60, 0x60, 0x60, 0x3C, 0x00},
    {0x00, 0x06, 0x06, 0x3E, 0x66, 0x66, 0x3E, 0x00},
    {0x00, 0x00, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00},
    {0x00, 0x0E, 0x18, 0x3E, 0x18, 0x18, 0x18, 0x00},
    {0x00, 0x00, 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x7C},
    {0x00, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x66, 0x00},
    {0x00, 0x18, 0x00, 0x38, 0x18, 0x18, 0x3C, 0x00},
    {0x00, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x3C},
    {0x00, 0x60, 0x60, 0x6C, 0x78, 0x6C, 0x66, 0x00},
    {0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00},
    {0x00, 0x00, 0x66, 0x7F, 0x7F, 0x6B, 0x63, 0x00},
    {0x00, 0x00, 0x7C, 0x66, 0x66, 0x66, 0x66, 0x00},
    {0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00},
    {0x00, 0x00, 0x7C, 0x66, 0x66, 0x7C, 0x60, 0x60},
    {0x00, 0x00, 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x06},
    {0x00, 0x00, 0x7C, 0x66, 0x60, 0x60, 0x60, 0x00},
    {0x00, 0x00, 0x3E, 0x60, 0x3C, 0x06, 0x7C, 0x00},
    {0x00, 0x18, 0x7E, 0x18, 0x18, 0x18, 0x0E, 0x00},
    {0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3E, 0x00},
    {0x00, 0x00, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00},
    {0x00, 0x00, 0x63, 0x6B, 0x7F, 0x3E, 0x36, 0x00},
    {0x00, 0x00, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x00},
    {0x00, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x0C, 0x78},
    {0x00, 0x00, 0x7E, 0x0C, 0x18, 0x30, 0x7E, 0x00},

    {0x14, 0x10, 0x10, 0x40, 0x10, 0x10, 0x14, 0x00}, // {
    {0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18},
    {0x50, 0x10, 0x10, 0x04, 0x10, 0x10, 0x50, 0x00}, // }
    {0x11, 0x11, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00}, // ~
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // 127 DEL
};

          /**< load color LUT >**/
        XOSD_LoadColorLUTBank (
            &osd.inst,
            OSD_GPU_LAYER_ID,
            OSD_BANK_0,
            OSD_COLOR_LUT
            );

        /**< load font LUT >**/
        XOSD_LoadCharacterSetBank (
            &osd.inst,
            OSD_GPU_LAYER_ID,
            OSD_BANK_0,
            (u32 *)OSD_FONT_LUT
            );

        /**< load text LUT >**/
        XOSD_LoadTextBank (
            &osd.inst,
            OSD_GPU_LAYER_ID,
            OSD_BANK_0,
            (u32 *)OSD_TEXT_LUT
            );

Moderator
Posts: 2,894
Registered: ‎11-09-2015

Re: OSD text not displayed but boxes works fine !!! please help !!!

Hi @phoenix-lee,

 

I guess you have solved this issue as per:

https://forums.xilinx.com/t5/Video/bug-commit-for-OSD-v6-0-INDEX-of-text-string-can-not-exceed-16/td-p/837795

 

If this is the case please close the topic by marking a reply as accepted solution (do a quick reply and mark it as solution).

 

Again, as per other topic, the OSD is deprecated and we are recommending users to use the video mixer instead.

 

Best Regards,

Florent
Product Application Engineer - Xilinx Technical Support EMEA
------------------------------------------------------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
Moderator
Posts: 2,894
Registered: ‎11-09-2015

Re: OSD text not displayed but boxes works fine !!! please help !!!

Hi @phoenix-lee,

 

If everything is clear for you, please close the topic by marking a reply as accepted solution.

Thanks and Regards,

Florent
Product Application Engineer - Xilinx Technical Support EMEA
------------------------------------------------------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.