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: 
Observer raisa.basheer
Observer
3,774 Views
Registered: ‎07-22-2014

Is it possible to implement downscaling in VIVADO HLS and then convert to HDL?

Hi,

 

We want to implement down scaling feature in our design .

We implemented this with the help of Xilinx Video Scaler IP . But, Xilinx Scaler is consuming considerable resources and 

thus power . So, Instead of using customized Xilinx Scaler ; we want to try out implementing  'downscaling' feature in VIVADO HLS using fixed scaling ratio  and then converting to HDL .

 

Our required fixed parameters are

I/P resolution : 2560 * 1440

O/P resolution : 1920 * 1080

 

Horz scaling factor = 1920 / 2560 = 0.75

Vert. scaling factor = 1080 / 1440 = 0.75

 

We have following queries.

 

1. How difficult is the implementation of  above 'downscaling' feature with fixed parameters in VIVADO HLS?

 

2. When we convert from C to HDL in Vivado HLS ; will it give optimum result compared to XIlinx Video Scaler IP core ? 

    Will it handle 'internal line buffer' mapping properly?

 

3. Is there any Video Library available in Vivado HLS to do 'downscaling'  as mentioned above?

 

2. In terms of resource consumption ,  will there be any advantage in C to HDL conversion (with fixed ratios) compared to Xilinx Video scaler with the same setting ?

 

Can anybody help with the above queries?

 

 

    

Tags (1)
0 Kudos
10 Replies
Moderator
Moderator
3,765 Views
Registered: ‎11-09-2015

Re: Is it possible to implement downscaling in VIVADO HLS and then convert to HDL?

Hi @raisa.basheer,

 

1. How difficult is the implementation of  above 'downscaling' feature with fixed parameters in VIVADO HLS?

>I would say that it depends on what scaling you do. If you already have the coefficient, I shouldn't be long

 

2. When we convert from C to HDL in Vivado HLS ; will it give optimum result compared to XIlinx Video Scaler IP core ? 

I guess you could use less resources because you will have fixed parameters. But not sure if you will have a really big impact

 

    Will it handle 'internal line buffer' mapping properly?

> Depending how it is coded, you can do it

 

3. Is there any Video Library available in Vivado HLS to do 'downscaling'  as mentioned above?

> I don't think so.

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Adventurer
Adventurer
3,743 Views
Registered: ‎01-29-2013

Re: Is it possible to implement downscaling in VIVADO HLS and then convert to HDL?

We also had an extremely difficult time trying to get the Xilinx Video Scaler IP core to work, consuming many months of our FAE's time and multiple Xilinx engineers helping with it, but ultimately we could never get it to work... at all. Our FAE from Avnet finally gave up with helping us and instead of apologizing, gave us an ultimatum "commit to buying all your Xilinx parts from us or we won't help you anymore"... parts which they never had in stock and costed more.

 

We ended up paying a 3rd party to develop a scaler for us that only implemented the exact parameters we needed and it works great.

0 Kudos
Xilinx Employee
Xilinx Employee
3,740 Views
Registered: ‎08-01-2007

Re: Is it possible to implement downscaling in VIVADO HLS and then convert to HDL?

Sorry to hear of all the problems in getting the Video Processing Subsystem to work.  It should be fairly straight forward.  XAPP1285 shows both the older Video Scaler and the Video Processing Subsystem in parallel, with the software needed to bring them up.

 

As for HLS, we don't have a standalone function for scaling in HLS.  But we do support OpenCV and there are some basic scaling functions in OpenCV that might be able to meet your needs.

Chris
Video Design Hub | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Observer raisa.basheer
Observer
3,723 Views
Registered: ‎07-22-2014

Re: Is it possible to implement downscaling in VIVADO HLS and then convert to HDL?

@chrisar Thank you for the reply.

 

Is all OpenCV video libraries or functions synthesizable while converting to HDL ?

0 Kudos
Observer jtobin
Observer
3,691 Views
Registered: ‎05-03-2015

Re: Is it possible to implement downscaling in VIVADO HLS and then convert to HDL?

@raisa.basheer Check page 569 of the HLS Reference Guide. There's an HLS ported openCV resize function that I've successfully used in streaming video applications for upscaling. It's fairly straightforward- you pass it your input and output row/column sizes and it performs bicubic or linear interpolation and resizes the image. I have noticed that it gives better results when scaling an image up by an integer multiple, but I'm not sure if that would also be an issue when downsizing, since I haven't used it for that.

 

To answer your other question, not all openCV functions are synthesizable in HLS; a lot of them are written for random access of elements of an image, which doesn't work when you're operating on a video stream. This can be worked around to an extent using the linebuffer and window structures. Everything in the reference guide is synthesizable, however, and there are some additional functions that aren't mentioned in it that are in hls_video.h or one of the other header files- I can't remember which one off the top of my head.

0 Kudos
Observer raisa.basheer
Observer
3,672 Views
Registered: ‎07-22-2014

Re: Is it possible to implement downscaling in VIVADO HLS and then convert to HDL?

@jtobin.Thank you very much . We shall try to implement our scaling feature using 'resize' function and let you know the result .

 

But , for 'upscaling' , if we use Xilinx scaler IP; Xilinx recommends external memory . In your case , are you able to do 'upscaling' without external memory?

 

- What about the resource utilization in the converted HDL compared to Xilinx Scaler?

 

- Have you tried by giving a scaling ratio which is not an integer multiple ? What was the result in this case ?

 

0 Kudos
Observer jtobin
Observer
3,661 Views
Registered: ‎05-03-2015

Re: Is it possible to implement downscaling in VIVADO HLS and then convert to HDL?

The only memory that it requires is block ram, which I assume is used for line buffering. Here's the post implementation resource estimate that I get when targeting a 7Z010:

 

resize.PNG

In my experience with upscaling using the generated core, non integer scaling ratios cause excess blurring and pixelation. That's using bicubic interpolation- linear may behave differently but I haven't tried it.

0 Kudos
Xilinx Employee
Xilinx Employee
3,646 Views
Registered: ‎08-01-2007

Re: Is it possible to implement downscaling in VIVADO HLS and then convert to HDL?

The Video Processing Subsystem should handle non-integer scaling without any problems.

Chris
Video Design Hub | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Newbie pnefos
Newbie
3,198 Views
Registered: ‎11-07-2014

Re: Is it possible to implement downscaling in VIVADO HLS and then convert to HDL?

Can you share who wrote your custom IP?

We are in similar situation. Thanks, Patrick


@bparker wrote:

 

We ended up paying a 3rd party to develop a scaler for us that only implemented the exact parameters we needed and it works great.


 

0 Kudos
Adventurer
Adventurer
2,268 Views
Registered: ‎01-29-2013

Re: Is it possible to implement downscaling in VIVADO HLS and then convert to HDL?

I can't, sorry.

0 Kudos