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: 
Explorer
Explorer
1,185 Views
Registered: ‎10-07-2016

Change interpolation mode in Video-Processing Subsystem

Dear community members,

I'm using successfully the video processing subystem v2.0 in my design as a chroma up-sampler from YCbCr 422 to RGB. In the product guide PG231-v-proc-ss.pdf, i have read, that it should be possible to change the interpolation mode. There are three modes:

• Define a configurable filter with programmable coefficients for high-performance applications.
• Use the predefined static filter with power-of -two coefficients for low-footprint applications.
• Replicate or drop pixels for minimal footprint.

First question:

When I look to the VPSS example code, which comes along with Vivado 2017.4, there is not explicitely set any interpolation mode. So which mode is used per default?

 

Second question:

What do I have to do, when I want to change the interpolation mode, e.g. pixel replication.

 

Third question:

Is there any helpful tutorial, how to calculate the FIR-filter coefficients for high-perfromance filters?

 

By the way, below is a picture how the VPSS is configured:

VPSS.png

Thanks & Best regards

Steffen

0 Kudos
5 Replies
Moderator
Moderator
1,080 Views
Registered: ‎11-09-2015

Re: Change interpolation mode in Video-Processing Subsystem

Hi @stgateizo,

 

From the VPSS PG231, if you are in Color Space Conversion (CSC) only you have the following features related to coeffficients:

  • User programmable matrix coefficients
  • Driver API to set coefficients for converting RGB to YUV, or vice-versa
  • Driver API to set/get brightness, contrast, saturation and gain

 

For the "user programmable matrix coefficients", you might want to look at the function XVprocSs_LoadChromaResamplerCoeff().

 

For "Driver API to set coefficients for converting RGB to YUV, or vice-versa", it might be done by using XVprocSs_SetPictureColorRange()

 

And for "Driver API to set/get brightness, contrast, saturation and gain", you might want to check XVprocSs_SetPictureBrightness(), XVprocSs_SetPictureContrast(), XVprocSs_SetPictureSaturation() and XVprocSs_SetPictureGain().

 

To know what coefficients to use, you might want to use MATLAB (I guess the product fdatool/fvtool can be used)

 

Hope that helps,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Explorer
Explorer
1,077 Views
Registered: ‎10-07-2016

Re: Change interpolation mode in Video-Processing Subsystem

Hi Florent,

thank you for your help. I still have a question.

 

When I implement a full fleged vpss, than I'm able to choose one of the following interpoaltion modes:

- Drop Repeat

- Predefined

- FIR

 

GUI.jpg

 

Why is this option not available when I configure the VPSS as Color Space Converter only, with Chroma-Upsampling functionality ?

 

Anyway, if I understand you right, the only way to change the interpolation behavior for chroma upsampling is by changing/manipulating the filter coefficients for the FIR filter, right?

 

Best regards

Steffen

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

Re: Change interpolation mode in Video-Processing Subsystem

Hi @stgateizo,

 

I asked for clarification to our development team:

 

With ‘Full Fledged’ and ‘Chroma Resampling Only’ Functionality, the VPSS contains the Vertical/Horizontal Chroma Resampler subcores which offer the three different algorithms and the ability to set different filter coefficients if the FIR algorithm is chosen.

 

With ‘Color Space Conversion Only’ Functionality, the VPSS contains only the CSC subcore which offers only one algorithm for chroma resampling (which is the same as the Predefined algorithm).  That functionality is included as part of the CSC subcore.  For ease of use and so the subsystem does not get overly complicated, we only offer one algorithm in the CSC subcore, and so there is no GUI option to select a resampling algorithm.  The “Predefined” algorithm uses pre-defined filters for the resampling.  The filters are described in the Product Guide (search for “predefined filters”).  The filter coefficients will be either [0.5 0.5] or [0.25 0.5 0.25] depending on which conversion is being performed.  These coefficients are pre-defined and set in the hardware and cannot be changed by software.

 

So in fact you cannot change the coefficients for the chroma ressampling in CSC mode.

 

The best way for you to use the different algorithm, would be to use multiple VPSS:

One for chroma re-sampling and another for color conversion.

 

Regards,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Explorer
Explorer
1,023 Views
Registered: ‎10-07-2016

Re: Change interpolation mode in Video-Processing Subsystem

Hi Florent

thank you for clarifying this. Of course, I can instantiate 2 times the VPSS, one for chroma-up sampling, and another one for color-space conversion.

 

The goal is to convert either RGB or YCbCr444 or YCbCr422 to always RGB.

But what happens, when I feed the chroma-up sampler with RGB?

 

Does the chroma-up sampler bypass RGB and YCbCr444 ?

Does the color space converter bypass RGB?

 

If not, than I need to switch the AXI-Streaming bus in dependency of the input color format. So in this case I do not see any adavantage of the VPSS against single instances.

 

There is another option, which I have already tried out. I used a full-fledged design, and deactivated the deinterlacer support and YCbCr420 support. This takes more resoruces, since the scaler is in, but in general it works. There is only one big issue when using the full fledged design. The last pixel of each line,and the last line of a frame is static black, which is not acceptable for us. I'm in contact with Nagar Bharath regarding this issue (see SR#10428515).

 

Best regards

Steffen

 

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

Re: Change interpolation mode in Video-Processing Subsystem

Hi @stgateizo,

 

Yes I do not think you can bypass the chroma ressampler or the CSC when you are not in full fledged.

I am quite sure you can only bypass sub-cores when you are in full-fledged.

 

Hope you will find a solution with Bharath for your issue in full-fledged

 

Regards,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos