02-20-2018 01:49 AM - edited 02-20-2018 02:19 AM
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.
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?
What do I have to do, when I want to change the interpolation mode, e.g. pixel replication.
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:
Thanks & Best regards
02-26-2018 04:09 AM
From the VPSS PG231, if you are in Color Space Conversion (CSC) only you have the following features related to coeffficients:
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,
02-26-2018 04:34 AM
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
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?
03-02-2018 01:04 AM
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.
03-02-2018 01:27 AM
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).
03-02-2018 01:47 AM
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