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
Observer filipesalgado
Observer
1,274 Views
Registered: ‎02-23-2018

VPSS output as a Frame Buffer

Jump to solution

Hello,

 

I'm using a VPSS core for video scalling and cropping, and color-space conversion.I also have the DMA functionality enabled.

 

I'm planing to implement a core in the video stream after the VPSS. Now, my new core, must manipulate the frame data from memory, which will require to get the stream output from the VPSS, and use a VDMA to store it to memory.

 

Now here is my question, is it possible to access the VPSS output frame buffer directly? this would spare me at least one VDMA core and the associated costs. I actually want to access the output frame of the VPSS from the memory instead of the AXI-S.

 

Is it possible?

 

thanks in advance

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
1,203 Views
Registered: ‎07-18-2011

Re: VPSS output as a Frame Buffer

Jump to solution

One way around this, using only two VDMAs, is to use multiple VPSS cores, each configured for single functions.  You can use a stand-alone scaler, stand-alone colorspace converter, and stand-alone chroma resampler in front of a VDMA configured for write-side only (disable the read side).   Then add a separate VDMA, configured for read-side only, to output your processed data after you get done manipulating it, or before any custom AXI4-Stream output cores.

 

This will give you everything except crop and zoom (which are only available in the full-fledged scaler IP), but you can implement those functions on the output side VDMA after your processing, by simply adding another stand-alone scaler IP on the output, and reconfigure your VDMA and scaler on-the-fly accordingly.  You can set the VDMA addressing to read the center half of the image and change the scaler to 1:2 for a 2x zoom, or configure the VDMA to read the full image and set the scaler for 1:1 for normal mode.   Or, if you don't need freeze -then-zoom functionality, or don't need to manipulate the entire image prior to zooming, you can do the crop/zoom on the front side scaler/VDMA and eliminate the output scaler.  

 

Stand-alone scalers and CSC/CRs can take up less resources than the full-fledged scaler, so there isn't much size penalty, and the image quality is still quite good.   Note that if you need continuous scaling rather than just 1:2 or 1:4, this will not work, unless you first create a table of custom timing entries for each scaling size step as shown here: https://www.xilinx.com/support/answers/68227.html .   This is because the scaler will not work with unknown timing modes, such as a standard video mode scaled to an odd fractional size.

 

The only downside to this method is that it takes quite a bit of time for the MicroBlaze to reconfigure the stand-alone scaler and VDMA IP cores on the output side (if I recall, it is on the order of 10-20mS or so, I have no idea why it takes so long, but it is too long to buffer with onboard BRAM FIFO to coast through it), so you will experience a video unlock at your output IP when you go into and out of zoom and the AXI4-stream pipeline empties.  

 

You can get around this by making a custom AXI4-Stream IP that cuts to black during the zoom IP configuration, and cuts back once the video tuser bit is realigned to the tuser bit of your black timing source, if that is acceptable in your product and you don't need a seamless transition in and out of zoom.  If you do the zoom on the input side, the normal write/read sync of the input and output VDMAs will likely mask any unlock issues by repeating the last good frame until the reconfigured IP starts writing good frames again, but as mentioned, you can't do a zoom of a frozen image with this configuration.

 

 

 

 

5 Replies
Moderator
Moderator
1,216 Views
Registered: ‎11-09-2015

Re: VPSS output as a Frame Buffer

Jump to solution

Hi @filipesalgado,

 

I don't think this is supported by the IP.

 

I think, only 1 trip to/from memory allowed. And you are already using the VMDA read for the crop+scale operation (note that there is operation done after the VDMA read).


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Tags (3)
0 Kudos
Observer filipesalgado
Observer
1,173 Views
Registered: ‎02-23-2018

Re: VPSS output as a Frame Buffer

Jump to solution

I actually wanted to read the memory location where the output frame is. In addition to that, a way to know which is the current active output frame would also be necessary, so I guess this is too much to ask for.

 

 

Thanks for the support anyway.

regards,
Filipe

0 Kudos
Adventurer
Adventurer
1,204 Views
Registered: ‎07-18-2011

Re: VPSS output as a Frame Buffer

Jump to solution

One way around this, using only two VDMAs, is to use multiple VPSS cores, each configured for single functions.  You can use a stand-alone scaler, stand-alone colorspace converter, and stand-alone chroma resampler in front of a VDMA configured for write-side only (disable the read side).   Then add a separate VDMA, configured for read-side only, to output your processed data after you get done manipulating it, or before any custom AXI4-Stream output cores.

 

This will give you everything except crop and zoom (which are only available in the full-fledged scaler IP), but you can implement those functions on the output side VDMA after your processing, by simply adding another stand-alone scaler IP on the output, and reconfigure your VDMA and scaler on-the-fly accordingly.  You can set the VDMA addressing to read the center half of the image and change the scaler to 1:2 for a 2x zoom, or configure the VDMA to read the full image and set the scaler for 1:1 for normal mode.   Or, if you don't need freeze -then-zoom functionality, or don't need to manipulate the entire image prior to zooming, you can do the crop/zoom on the front side scaler/VDMA and eliminate the output scaler.  

 

Stand-alone scalers and CSC/CRs can take up less resources than the full-fledged scaler, so there isn't much size penalty, and the image quality is still quite good.   Note that if you need continuous scaling rather than just 1:2 or 1:4, this will not work, unless you first create a table of custom timing entries for each scaling size step as shown here: https://www.xilinx.com/support/answers/68227.html .   This is because the scaler will not work with unknown timing modes, such as a standard video mode scaled to an odd fractional size.

 

The only downside to this method is that it takes quite a bit of time for the MicroBlaze to reconfigure the stand-alone scaler and VDMA IP cores on the output side (if I recall, it is on the order of 10-20mS or so, I have no idea why it takes so long, but it is too long to buffer with onboard BRAM FIFO to coast through it), so you will experience a video unlock at your output IP when you go into and out of zoom and the AXI4-stream pipeline empties.  

 

You can get around this by making a custom AXI4-Stream IP that cuts to black during the zoom IP configuration, and cuts back once the video tuser bit is realigned to the tuser bit of your black timing source, if that is acceptable in your product and you don't need a seamless transition in and out of zoom.  If you do the zoom on the input side, the normal write/read sync of the input and output VDMAs will likely mask any unlock issues by repeating the last good frame until the reconfigured IP starts writing good frames again, but as mentioned, you can't do a zoom of a frozen image with this configuration.

 

 

 

 

Moderator
Moderator
1,462 Views
Registered: ‎11-09-2015

Re: VPSS output as a Frame Buffer

Jump to solution

Hi @reaiken,

 

Was the reply from @reaiken helpful for you? If yes you might want to give him a kudos.

 

And if this reply give you enough information, please kindly mark it as accepted solution to close the topic.

 

Thanks and Regards,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Observer filipesalgado
Observer
866 Views
Registered: ‎02-23-2018

Re: VPSS output as a Frame Buffer

Jump to solution

The problem has been solved the other way around, with custom IPs. Any way, I appreciate the support and the helpful contributions.

 

cheers,

Filipe