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
Adventurer
Adventurer
491 Views
Registered: ‎08-26-2017

Video Flicker: VDMA Different In Out Resolution

Jump to solution

Hi,

 

In my design i have a video source of 400x400@30fps. I have to send this video onto an HDMI monitor which is FHD monitor. Normally, the monitor supports any input resolution lower than FHD down upto 640x480@60fps.

 

Now that my input resolution does not fall into this category, i have used VDMA in my design to link these two resolutions. 

 

For this i use two overlapping memory buffers, the source buffer that holds the input video frames and the display buffer that holds the out video frames. The source buffer start address decides the position of my 400x400 video in output display region.

 

The source buffer start address is calculated as below

Input Video : 400x400, 16bpp (2Bpp).

Output Video : 1920x1080, 16bpp(2Bpp).

 

Stride = 1920 x 2 (Bpp) = 3840

Offset = (((1920-400) * 2(Bpp)) /2 ) + ((1080-400)/2)*3840 (stride)

 

My read buffer (display buffer) starts with base address of VDMA, set as DDR base Addr + 0x10000000) 

My write buffer resides in the above buffer at an offset as calculated above.

 

I am able to see the source video in the centre of the Full HD display. 

 

Problem 1 : I see two more instances of the source video in two other locations in the display.

(Please refer to attached jpg file.) The video in centre is desirable and the video in left and right side are not desirable

 

Problem 2 : I see a continous flicker  in the output video.

(Please refer to attached mp4 file.) This flicker is always present. It is there when read rate is slower than write and it is there when read rate is faster than write rate. I have generated 400x400 resolution from TPG and gave the same as input to VDMA in above configuration (TPGs apclk is 155M, which gives higher frame write rate) to verify this. The frame rate of actual source is less and therefore write rate is less than read rate.

 

What could be the possible cause of these two issues and what would be the workaround. Please suggest.

 

Thanks and Regards,

Ajay Kumar G.

 

 

 

 

 

 

 

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
634 Views
Registered: ‎08-26-2017

Re: Video Flicker: VDMA Different In Out Resolution

Jump to solution

Hi,

 

The issue got solved in no time after posting it here! I could figure out the cause and apply a fix for the same. 

 

Here are the details.

 

I have calculated the offset rightly. But i overlooked the base address calculation of subsequent buffers for write and read. 

 

The equation for base address of next two write frame buffers(for triple frame buffer) was using write hsize and write vsize and the equation for base address of next two read frame buffers was using read hsize and read vsize.

 

For the buffers to overlap always (and offset to be valid through out), it was required that write side base address for subsequent frames be calculated using read hsize and read vsize instead of write vsize and write hsize.

 

I have corrected the above equation and that has solved the problem for me. Now, i have a stable video in the required position.

(Background flickers though). (Video attached for reference)

 

Thanks and Regards,

Ajay Kumar G

 

1 Reply
Adventurer
Adventurer
635 Views
Registered: ‎08-26-2017

Re: Video Flicker: VDMA Different In Out Resolution

Jump to solution

Hi,

 

The issue got solved in no time after posting it here! I could figure out the cause and apply a fix for the same. 

 

Here are the details.

 

I have calculated the offset rightly. But i overlooked the base address calculation of subsequent buffers for write and read. 

 

The equation for base address of next two write frame buffers(for triple frame buffer) was using write hsize and write vsize and the equation for base address of next two read frame buffers was using read hsize and read vsize.

 

For the buffers to overlap always (and offset to be valid through out), it was required that write side base address for subsequent frames be calculated using read hsize and read vsize instead of write vsize and write hsize.

 

I have corrected the above equation and that has solved the problem for me. Now, i have a stable video in the required position.

(Background flickers though). (Video attached for reference)

 

Thanks and Regards,

Ajay Kumar G