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: 
Contributor
Contributor
287 Views
Registered: ‎10-11-2009

Multi Scaler corrupted output image

I have created a simple design with Microblaze, DDR3 and Video Multi Scaler, using Vivado 2018.3. I have video out subsystem working with 1 frame buffer, 1024x768@60Hz, grayscale, so it is visible on LCD monitor with a bit of hardware. If I fill the output frame buffer with 8 bit luma values it is correctly displayed as monochrome image. 

Another frame buffer is filled with test pattern, the same format - 8 bit grayscale, but lower resolution. 

The Video Multi Scaler is setup to support packed Y8 format. As far as I understand this means that in the address space of 32 bits there are 4 pixels stored sequentialy, right? This should be also the output image format, I guess. Other configs are:

 

/* Definitions for driver V_MULTI_SCALER */
#define XPAR_XV_MULTI_SCALER_NUM_INSTANCES 1

/* Definitions for peripheral VMS */
#define XPAR_VMS_DEVICE_ID 0
#define XPAR_VMS_S_AXI_CTRL_BASEADDR 0x44A20000
#define XPAR_VMS_S_AXI_CTRL_HIGHADDR 0x44A3FFFF
#define XPAR_VMS_SAMPLES_PER_CLOCK 1
#define XPAR_VMS_MAX_DATA_WIDTH 8
#define XPAR_VMS_MAX_COLS 1280
#define XPAR_VMS_MAX_ROWS 1024
#define XPAR_VMS_PHASE_SHIFT 6
#define XPAR_VMS_SCALE_MODE 2
#define XPAR_VMS_TAPS 6
#define XPAR_VMS_MAX_OUTS 1

 

 

I'm using this example as ref point, only with one case. And I have running multi scaler, accepting buffer and producing output image, after interrupt. But the image is distorted in some way - it have correct format (H/V), but the output data pixels looks like they the algorithum is miscalculating something.

For example: I have a source buffer with resolution 320x240 (8 bits per pixel ) and destination buffer 1024x768 (8 bits per pixel ),  so I'm using it to upscale the frame. 

The input buffer is filled with constant vaules (memory dump from element 0 of the source buffer):

 

0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F 0x7F .....

The result after receiving interrupt from multi scaler is:

 

 

0x75 0x55 0x2C 0x A 0x5D 0x35 0x10 0x64 0x3D 0x16 0x6A 0x45 0x1D 0x70 0x4E 0x25 0x75 0x55 0x2C 0x A 0x5D 0x35 0x10 0x64 0x3D 0x16 0x6A 0x45 0x1D 0x70 0x4E 0x25 0x75 ...

And this pattern is repeating... It looks like this:

IMG_3111.JPG

 

I do not understand.. what can be wrong? As I mentioned the output buffer, filled by my pattern function is displayed correctly - the DDR is ok, the output video system also, but the output from the video multi scaler in this format Y8 is not correct.

What can be the reason for this strange output? Is actually the core tested with this format? As far as I see there is some driver for linux and it probably works fine with gstreamer, but I'm using bare metal system so I can't test it. Some help, please?

 

 

Tags (1)
0 Kudos
7 Replies
Moderator
Moderator
206 Views
Registered: ‎11-21-2018

Re: Multi Scaler corrupted output image

Hi @head_up 

 

I was able to recreate your issue, but the discrepency between my input and output was less significant. 

When I input 0x7F as in your example, I was outputting 0x75. 

Would you be able to retry my example on your system and let me know what your result is? 

 

I tried recreating your problem in 2019.1 using the example in pg325 in chapter 6.

I changed the configuration in vivado to add Y8 support:

 

PG325_Y8_Config.PNG

Using the Multi-scalar example available in the BSP in SDK, I chaged the configuration for this to be compatible with Y8 and input 0x7F as in your example.

PG325_Y8_Config_pic2.PNG

 

PG325_Y8_Config_pic3.PNG

 

PG325_Y8_Config_pic4.PNG

Using the mrd command in the XSCT console, I checked the register values at different intervals and the output was 0x75 as expected. 

PG325_Y8_Config_pic5.PNG

 

Please let me know if you need any extra information to recreate this example.

Please also let me know your result. I can discuss this issue with development, but it would help me to have as much information as possible on the problem first. 

Regards, 

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Contributor
Contributor
200 Views
Registered: ‎10-11-2009

Re: Multi Scaler corrupted output image

@aoifem , thank you for your answer, it is nice to see someone trying to help. But as your answer is late have to find another solution. So I tested Video Processing Subsystem in Scaler only mode and it works realy fine, again with polyphase algorithm, the same conditions. This solution was accepted and for now I will have no more time to investigate what was wrong with Multi Scaler, if not returned by other reason to this task. But I should mention - this problem exists not only with Y0 format. I observed this issue with RGB also, as with Y8_UV.

If I have time in the near future I can try to test your example or eventualy try it on my own for personal tests. So  please, leave this topic open, I will return as far as I can to this problem.

Also - which solution will use less resources for the same conditions - upscaling from 640x480 to 1024x768, 8 bits per pixel/grayscale - VPSS or Multi Scaler? If there is significant difference I may try it again soon.

Moderator
Moderator
177 Views
Registered: ‎11-21-2018

Re: Multi Scaler corrupted output image

Hi @head_up 

 

Great thanks for your reply! That is very helpful to know that you found issues with other formats as well. 

Thank you for providing your solution as well. 

 

Which solution will use less resources for the same conditions - upscaling from 640x480 to 1024x768, 8 bits per pixel/grayscale - VPSS or Multi Scaler?

The resources used for the Multi scalar will vary significantly depending on your configurtion. Based on the information you have given me I think you can approximate it as follows: 

 MultiScalar_Resources.PNG

 

The resources for the VPSS are available in PG231:VPSS_Perf.PNG

 

Regards, 

 

 

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Contributor
Contributor
151 Views
Registered: ‎10-11-2009

Re: Multi Scaler corrupted output image

Thanks for the links, I already checked this statistics before trying the IPs. And as I can see my results "slightly" differ - VPSS with polyphase algorithm, 6 taps, up to 1024x768, only RGB/YUV444, no color conversion, i.e. very limited by options:

+-------------------------------------------------------------------------------------------------------------+--------------------------
Instance                         Module            | Total LUTs | Logic LUTs | LUTRAMs | SRLs |  FFs  | RAMB36 | RAMB18 | DSP48 Blocks |
+-------------------------------------------------------------------------------------------------------------+--------------------------
// Synt
VPS_Block		     VPS_Block_imp_1S4RA4A |       5655 |       5172 |     200 |  283 |  7606 |     12 |      2 |           36 |
VPS                    MicroBlaze_XC_v_proc_ss_0_0 |       2940 |       2733 |     192 |   15 |  4364 |     10 |      0 |           36 |
axi_vdma_vps   		MicroBlaze_XC_axi_vdma_0_0 |       2715 |       2439 |       8 |  268 |  3242 |      2 |      2 |            0 |

// Impl
VPS_Block                    VPS_Block_imp_1S4RA4A |       5042 |       4680 |     200 |  162 |  7071 |     12 |      2 |           36 |
VPS                    MicroBlaze_XC_v_proc_ss_0_0 |       2872 |       2669 |     192 |   11 |  4129 |     10 |      0 |           36 |
axi_vdma_vps   		MicroBlaze_XC_axi_vdma_0_0 |       2170 |       2011 |       8 |  151 |  2942 |      2 |      2 |            0 |

Excluding VDMA, which is separate element from VPS_Block, only VPSS is using less than 3k LUTs - lowest chips from 7 series FPGA. And this is far less than the resource table privided by Xilinx. What is the reason? As I mention the configuration is minimal.

I can't provide usage statistics for Multi Scaler right now, just can't access the design, but as far as I remember they were higher as values for LUTs and BRAM for the same conditions, than VPSS. That was surprising, I expected it to be optimized version of VPSS Scaler only.

0 Kudos
Moderator
Moderator
124 Views
Registered: ‎11-21-2018

Re: Multi Scaler corrupted output image

Hi @head_up 

I am going to check this internally.

It may be that the core was improved but the documentation was not.

 

Regards,

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Moderator
Moderator
75 Views
Registered: ‎11-21-2018

Re: Multi Scaler corrupted output image

Hi @head_up 

 

Underneath the VPSS table is the following note: VPSS_Utal_Note.PNG

There is a similar note on the Video DP table: VPSS_2.PNG

The exact results you get will vary depending on the design suite, device etc. that you are using. The provided information are just test cases and are not guaranteed to be reproducible in your design. 

 

Regards, 

 

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Moderator
Moderator
46 Views
Registered: ‎11-21-2018

Re: Multi Scaler corrupted output image

Hi @head_up 

 

Is everything clear for you on this topic? 

If your question is answered or your issue is solved, please kindly mark the response which helped as solution (click on "Accept as solution" button below the reply)

If this is not solved/answered, please reply to the topic giving more information on your current status.

Thanks and Regards,

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