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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
1,345 Views
Registered: ‎05-30-2017

Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

Hello I'm developing a project using Video on screen display 6.0 as OSD. I know that is deprecated but it is free. I use VDMA+Video on screen display. On layer 0 I have graphic controller and on layer 1 I have external axis video from VDMA. Video on layer 1 pass on output but on layer 0 text or boxes not appear. Looking at status register I have not error. Thank you. 

 

This is the code I use in microblaze to program OSD to write a BOX using suggested API. To program OSD I referred to Video on screen display 5.01a UG that is very detailed.

 

u32 clut[16]={
0x00000000,
0xffffffc0,
0x0000ffc0,
0x80808080,
0x00ff00c0,
0x00000000,
0x00ffffc0,
0x00000000,
0xff0000c0,
0x00000000,
0xff00ffc0,
0xffffffa0,
0xffff00c0,
0x00000000,
0x000000c0,
0x00000000};

 

u32 Instruction[8];
XOsd_SetActiveBank(&Osd, 0, 0,0,0,0);
XOsd_SetActiveSize(&Osd, 720, /*576*/625);
XOsd_SetBackgroundColor(&Osd, 0x00FF, 0x0000, 0x0000); //ptr OSD //R //B //G
XOsd_SetLayerDimension(&Osd, 0, 0, 0, 720, 576);
XOsd_SetLayerDimension(&Osd, 1, 0, 0, 720, 576);
XOsd_SetLayerAlpha(&Osd, 0,0, 0xFF);
XOsd_SetLayerAlpha(&Osd, 1,1, 0xFF);
XOsd_SetLayerPriority(&Osd, 0, 1);
XOsd_SetLayerPriority(&Osd, 1, 0);
XOsd_EnableLayer(&Osd, 0);
XOsd_EnableLayer(&Osd, 1);
XOsd_LoadColorLUTBank(&Osd, 0, 0, &clut[0]);
XOsd_LoadCharacterSetBank(&Osd, 0, 0, &fontchar[0]);
XOsd_LoadTextBank(&Osd, 0, 0, (u32 *)TextData);

XOsd_CreateInstruction(&Osd, &Instruction[0], 0, XOSD_INS_OPCODE_BOX, 0, 0, 0, 400, 400, 0, 10);
XOsd_CreateInstruction(&Osd, &Instruction[4], 0, XOSD_INS_OPCODE_END, 0, 0, 0, 0, 0, 0, 0);
XOsd_LoadInstructionList(&Osd, 0, 0, Instruction, 2);
XOsd_SetActiveBank(&Osd, 0, 1,1,1,1);

 

Thank you.

 

 

 

  

0 Kudos
1 Solution

Accepted Solutions
Explorer
Explorer
1,388 Views
Registered: ‎05-30-2017

Re: Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

So I solved the problem and OSD IP is working properly. The video on screen display (OSD) IP 6.0 have hardware and software bugs:

1) The XOsd functions to initialize OSD work correctly and you can use this sequence to initialize OSD (in this example layer 0 GC and layer 1 axis video)

 

XOsd_RegUpdateEnable(&Osd);
XOsd_Enable(&Osd);
XOsd_SetActiveBank(&Osd, 0, 0,0,0,0);
XOsd_SetActiveSize(&Osd, 720, 625);
XOsd_SetBackgroundColor(&Osd, 0x0080, 0x0080, 0x0080); //ptr OSD //R //B //G
XOsd_SetLayerDimension(&Osd, 0, 0, 0, 720, 576);
XOsd_SetLayerDimension(&Osd, 1, 0, 0, 720, 576);
XOsd_SetLayerAlpha(&Osd, 0,0, 0x100);
XOsd_SetLayerAlpha(&Osd, 1,1, 0x100);
XOsd_SetLayerPriority(&Osd, 0, 1);
XOsd_SetLayerPriority(&Osd, 1, 0);
XOsd_EnableLayer(&Osd, 0);
XOsd_EnableLayer(&Osd, 1);

 

The others XOsd_* API to configurate GC doesn't work. Write your own functions following UG OSD IP 5.01a  

https://www.xilinx.com/support/documentation/ip_documentation/v_osd/v5_01_a/pg010_v_osd.pdf

 

Note the link of PG010 is for v5.01a, which provides a lot more details ,compared to 6.0, in Appendix D
showing the examples on how to program graphics controller (Font Ram and Text RAM). Please double check if your instruction list matches the ones shown in the examples.

 

2) There is an hardware bug on OSD IP. The OSD has distorsion on text if the upstream device deasserts the tready signal mid-line. In my case I have Video direct memory access as upstream device. My lines are 1440 bytes. And as default buffer line depth of VDMA is 512 byte. I selected 4096 byte and now work correctly. I also added two AXI4-stream data fifo one on axi streaming input of OSD IP and one on axi streaming ouput of OSD IP. As explained here in the solution https://forums.xilinx.com/t5/Video/Video-On-Screen-Display-OSD-IP-shift-text-to-left-when/td-p/849466 OSD IP need fifo to avoid distorsion.

 

 

  

12 Replies
Explorer
Explorer
1,313 Views
Registered: ‎05-30-2017

Re: Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

Adding this 2 line code now boxes appear.

 

XOsd_RegUpdateEnable(&Osd);
XOsd_Enable(&Osd);

0 Kudos
Explorer
Explorer
1,297 Views
Registered: ‎05-30-2017

Re: Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

So now boxes appear but text doesn't appear. Could anyone help me? Thanks.

0 Kudos
Moderator
Moderator
1,278 Views
Registered: ‎11-09-2015

Re: Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

Hi @pierlum,

 

Did you enable both box and text in the configuration GUI in vivado?


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Explorer
Explorer
1,273 Views
Registered: ‎05-30-2017

Re: Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

I have enabled both instruction. I correctly loaded font and text but box appear and text not. Do you know if there is an working example design that uses version 6.0 of the IP? Thanks for the help!

0 Kudos
Moderator
Moderator
1,258 Views
Registered: ‎11-09-2015

Re: Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

Hi @pierlum,

 

I think you can use xapp1205 but it is using vivado 2013.4


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Explorer
Explorer
1,251 Views
Registered: ‎05-30-2017

Re: Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

Hi @

0 Kudos
Moderator
Moderator
1,246 Views
Registered: ‎11-09-2015

Re: Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

Hi @pierlum,

 

I do not think there is a more recent example design with the OSD. Again, everything was moved to the Video Mixer and it is the recommendation


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Explorer
Explorer
1,243 Views
Registered: ‎05-30-2017

Re: Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

Thaks for the help. Video Mixer can mix up to 8 layer but has no OSD. Is there or is in developing a new OSD IP? 

0 Kudos
Moderator
Moderator
1,241 Views
Registered: ‎11-09-2015

Re: Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

HI @pierlum,

 

I think you can use the logo box in the video mixer


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Explorer
Explorer
923 Views
Registered: ‎05-30-2017

Re: Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

Thanks for the help! I have to see if video mixer support loading of the font and than I print string or if I have to manually draw characters.   

0 Kudos
Moderator
Moderator
895 Views
Registered: ‎11-09-2015

Re: Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

Hi @pierlum,

 

I think you can now display the text plus box. Could you kindly reply with your solution and mark it as accepted solution to close the topic?

 

Thanks,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Explorer
Explorer
1,389 Views
Registered: ‎05-30-2017

Re: Video On-Screen Display (OSD) no box no text appears help!

Jump to solution

So I solved the problem and OSD IP is working properly. The video on screen display (OSD) IP 6.0 have hardware and software bugs:

1) The XOsd functions to initialize OSD work correctly and you can use this sequence to initialize OSD (in this example layer 0 GC and layer 1 axis video)

 

XOsd_RegUpdateEnable(&Osd);
XOsd_Enable(&Osd);
XOsd_SetActiveBank(&Osd, 0, 0,0,0,0);
XOsd_SetActiveSize(&Osd, 720, 625);
XOsd_SetBackgroundColor(&Osd, 0x0080, 0x0080, 0x0080); //ptr OSD //R //B //G
XOsd_SetLayerDimension(&Osd, 0, 0, 0, 720, 576);
XOsd_SetLayerDimension(&Osd, 1, 0, 0, 720, 576);
XOsd_SetLayerAlpha(&Osd, 0,0, 0x100);
XOsd_SetLayerAlpha(&Osd, 1,1, 0x100);
XOsd_SetLayerPriority(&Osd, 0, 1);
XOsd_SetLayerPriority(&Osd, 1, 0);
XOsd_EnableLayer(&Osd, 0);
XOsd_EnableLayer(&Osd, 1);

 

The others XOsd_* API to configurate GC doesn't work. Write your own functions following UG OSD IP 5.01a  

https://www.xilinx.com/support/documentation/ip_documentation/v_osd/v5_01_a/pg010_v_osd.pdf

 

Note the link of PG010 is for v5.01a, which provides a lot more details ,compared to 6.0, in Appendix D
showing the examples on how to program graphics controller (Font Ram and Text RAM). Please double check if your instruction list matches the ones shown in the examples.

 

2) There is an hardware bug on OSD IP. The OSD has distorsion on text if the upstream device deasserts the tready signal mid-line. In my case I have Video direct memory access as upstream device. My lines are 1440 bytes. And as default buffer line depth of VDMA is 512 byte. I selected 4096 byte and now work correctly. I also added two AXI4-stream data fifo one on axi streaming input of OSD IP and one on axi streaming ouput of OSD IP. As explained here in the solution https://forums.xilinx.com/t5/Video/Video-On-Screen-Display-OSD-IP-shift-text-to-left-when/td-p/849466 OSD IP need fifo to avoid distorsion.