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: 
194 Views
Registered: ‎10-31-2018

Issue in enabling logo layer in video mixer ip.

Hello,

We are trying to implement PIP using video mixer ip. In video mixer we have used 3 layers.
1 for video stream.
2 for memory layer.
3 for logo layer.

Board name :- Picozed-7030

Software version :- vivado 2018.2

            While testing we are able to see 1st layer i.e video stream. But now we want to configure 3 rd layer i.e logo layer. for this we are using following reference design(XAPP1291) files :

https://www.xilinx.com/support/documentation/application_notes/xapp1291-video-subsystem.pdf

In sdk when we call load logo layer function(XVMix_LoadLogo), it gets stucked in height-width loop. Because of this we couldn't able to go further and see anything over display.

snippet from file (xv_mix_l2.c):

int XVMix_LoadLogo(XV_Mix_l2 *InstancePtr,
XVidC_VideoWindow *Win,
u8 *RBuffer,
u8 *GBuffer,
u8 *BBuffer)
{
XV_mix *MixPtr;
u32 x,y;
u32 Rword, Gword, Bword;
u32 Width, Height;
u32 RBaseAddr, GBaseAddr, BBaseAddr;
int Status = XST_FAILURE;

Xil_AssertNonvoid(InstancePtr != NULL);
Xil_AssertNonvoid(RBuffer != NULL);
Xil_AssertNonvoid(GBuffer != NULL);
Xil_AssertNonvoid(BBuffer != NULL);
Xil_AssertNonvoid((Win->Width > (XVMIX_MIN_LOGO_WIDTH-1)) &&
(Win->Width <= InstancePtr->Mix.Config.MaxLogoWidth));
Xil_AssertNonvoid((Win->Height > (XVMIX_MIN_LOGO_HEIGHT-1)) &&
(Win->Height <= InstancePtr->Mix.Config.MaxLogoHeight));
Xil_AssertNonvoid((Win->StartX % InstancePtr->Mix.Config.PixPerClk) == 0);
Xil_AssertNonvoid((Win->Width % InstancePtr->Mix.Config.PixPerClk) == 0);

if(XVMix_IsLogoEnabled(InstancePtr)) {
MixPtr = &InstancePtr->Mix;
Width = Win->Width;
Height = Win->Height;

RBaseAddr = XV_MIX_CTRL_ADDR_HWREG_LOGOR_V_BASE;
GBaseAddr = XV_MIX_CTRL_ADDR_HWREG_LOGOG_V_BASE;
BBaseAddr = XV_MIX_CTRL_ADDR_HWREG_LOGOB_V_BASE;

for (y=0; y<Height; y++) {
for (x=0; x<Width; x+=4) {
Rword = (u32)RBuffer[y*Width+x] |
(((u32)RBuffer[y*Width+x+1])<<8) |
(((u32)RBuffer[y*Width+x+2])<<16) |
(((u32)RBuffer[y*Width+x+3])<<24);

Gword = (u32)GBuffer[y*Width+x] |
(((u32)GBuffer[y*Width+x+1])<<8) |
(((u32)GBuffer[y*Width+x+2])<<16) |
(((u32)GBuffer[y*Width+x+3])<<24);

Bword = (u32)BBuffer[y*Width+x] |
(((u32)BBuffer[y*Width+x+1])<<8) |
(((u32)BBuffer[y*Width+x+2])<<16) |
(((u32)BBuffer[y*Width+x+3])<<24);

XV_mix_WriteReg(MixPtr->Config.BaseAddress, (RBaseAddr+(y*Width+x)), Rword);
XV_mix_WriteReg(MixPtr->Config.BaseAddress, (GBaseAddr+(y*Width+x)), Gword);
XV_mix_WriteReg(MixPtr->Config.BaseAddress, (BBaseAddr+(y*Width+x)), Bword);
}
}
InstancePtr->Layer[XVMIX_LAYER_LOGO].RBuffer = RBuffer;
InstancePtr->Layer[XVMIX_LAYER_LOGO].GBuffer = GBuffer;
InstancePtr->Layer[XVMIX_LAYER_LOGO].BBuffer = BBuffer;

Status = XVMix_SetLayerWindow(InstancePtr, XVMIX_LAYER_LOGO, Win, 0);
}
return(Status);
}

can anybody help us with this? any information will be useful.

Thanks.

Tags (1)
0 Kudos
1 Reply
Moderator
Moderator
86 Views
Registered: ‎10-04-2017

Re: Issue in enabling logo layer in video mixer ip.

Hi shantaramjagtap1994@,

 

The XAPP was released for the 2016.2 version of the IP. Since you are using a much newer version of the IP, I suggest building the example design listed in chapter 5 of PG243.

***Before you get to the step "Open IP Example Design", make sure that you have the logo layer enabled in the IP. This will then set a parameter in xparameters.h which enables our software application example to show how to configure the IP.

 

Don't forget to reply, kudo, and accept as solution.

Xilinx Video Design Hub