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
1,385 Views
Registered: ‎02-08-2018

Problem in reading output data from Video Processing Sub System

Hello folks,

               I want to achieve color space conversion and sampling of Bayer RGB 24bit  to YUV 4:2:0 using VPSS. I have done video pipeline path from image sensor to DDR3. Video in AXI4 (8bits)--->input(8bits) Video Demosaic output(24 bits) --->input (24 bits) Video Processing Sub System output (24 bits) --->input (24 bits) VDMA output S2MM to DDR3 (32 bits).

As per @florentw  suggetions https://forums.xilinx.com/t5/Video/Question-regarding-video-processing-subsystem/m-p/962038/highlight/true#

and documents .I am reading 24 bit and 32 bit data from memory as mentioned below attached document(READING_DATA.docx). The problem is we are unable to read YUV 4:2:0 image data from memory as we expected, Image looks distorted(output image files attched 32BIT.bin and 24BIT.bin). Please help me to solve this issue.

Thanks and Regard's

Nishith Kumar

0 Kudos
20 Replies
Moderator
Moderator
1,323 Views
Registered: ‎11-09-2015

Re: Problem in reading output data from Video Processing Sub System

Hi @nishith.kumar ,

How are you displaying the data? Are you sure the tool you are using is expecting the same formating as the one on the AXI4-Stream?

You need to remember that every odd lines, you will have "padding" data for the "missing" choma samples


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

Re: Problem in reading output data from Video Processing Sub System

Hello @florentw ,

        Thank you for your response.

Q.How are you displaying the data?

Answer="'Using irfanView".

Q.Are you sure the tool you are using is expecting the same formating as the one on the AXI4-Stream?

Answer=''No''. Our JPEG Compressor is not expecting the data format as AXI4-Stream. We want to read the Y,U and V data components individually. So we are trying to read data by considering format  as shown in below attached document.

 

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

Re: Problem in reading output data from Video Processing Sub System

Hi @nishith.kumar ,

I think you need to take a step back. USe a test pattern generator and send a pattern with a single color. This way it will be easier for you to understand where each componenents are mapped into the memory. I am quite sure you are making an assumption you should not.

Regards,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Moderator
Moderator
1,272 Views
Registered: ‎11-09-2015

Re: Problem in reading output data from Video Processing Sub System

HI @nishith.kumar ,

Do you have any update on this?

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 in the topic giving more information on your current status.

Thanks and Regards,


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

Re: Problem in reading output data from Video Processing Sub System

Hello @florentw,

     Thank you for your response.

I have included TPG in my design,Output of the TPG(24bit RGB data)  is driving to VPSS (converting RGB to YUV 4:2:0)  on the way to VDMA and read data from VDMA buffers but i can't find Zero padding or YUV 4:2:0 standard output format. But as per my understanding it looks like RGB data as shown in attached output_data.png document. Here from TPG  i have selected is solid Green. Please help me out to solve this issue.

output_data.png
0 Kudos
Moderator
Moderator
1,249 Views
Registered: ‎11-09-2015

Re: Problem in reading output data from Video Processing Sub System

HI @nishith.kumar ,

Sorry, I just remember something from the TPG. It always send YUV444 even if YUV422 or YUV420 is selected. The reason is because it shouldn't matter what data is used a padding according to the AXI4-Stream spec.

If you want to see zeros for the padding, you might want to use the chroma resempler IP as in my Video Beginner Series 10: YCbCr Chroma subsampling/resampling


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

Re: Problem in reading output data from Video Processing Sub System

Hello @florentw ,

                       From TPG i am giving RGB 24 bit test pattern(solid green) as input to VPSS not YUV 444. So the input to the VPSS is 24bit RGB test pattern, Output i am expecting from VPSS is YUV 4:2:0. This is how i have configured TPG and VPSS.

 

Thanks and Regard's

Nishith

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

Re: Problem in reading output data from Video Processing Sub System

HI @nishith.kumar ,

I belive this is the same for the VPSS, YCbCr420 output might be equivalent than if you had selected YCbCr444 because you do not care about the padding data. Use the chroma resampler IP if you want to see zeros fro the apdding data


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

Re: Problem in reading output data from Video Processing Sub System

Hello @florentw,

 Thank you for your great support.

Ok as you said if the output from VPSS is YUV 444 even though i have selected YUV 4:2:0 as output. Is it possible to read data from memory by considering YUV 4:2:0,If possible guide me how to read data(already i have explained above how i am reading data).Or else chroma resampler is the only option? 

Thanks and Regards

Nishith

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

Re: Problem in reading output data from Video Processing Sub System

Hi @nishith.kumar ,

You can always create some C code to reorganized the memory but there is no way it will be done autimatically by the tool


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

Re: Problem in reading output data from Video Processing Sub System

Hi @florentw ,

     Ok fine. If my understanding is correct, You are saying that VPSS will not give YUV 4:2:0 as output as i expected. It will give YUV444 format ? So i need to write code to extract YUV 4:2:0 components from YUV 444 ?

Thanks and Regards

Nishith

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

Re: Problem in reading output data from Video Processing Sub System

Hi @nishith.kumar ,

This is not exactly what I said (but nearly). I just mean that YCbCr444 and YCbCr420 might be the same at the output of the VPSS because the AXI4-Stream spec allows you to ignore some data.

So you might still have the chroma information even if you are expecting to have zeros


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

Re: Problem in reading output data from Video Processing Sub System

Hi @florentw,

Ok in order to achieve YUV 4:2:0 should i include Chroma Resampler after VPSS ?

 

Thanks and regards

Nishith

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

Re: Problem in reading output data from Video Processing Sub System

HI @nishith.kumar ,

What do you call YUV420?

Again, the VPSS is outputting YUV420. But just if you want 0s for the odd lines and subsampled chomas, yes, you would need to add the chroma resempler


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

Re: Problem in reading output data from Video Processing Sub System

Hi @florentw,

 Ok we will proceed with chroma resampler and then we will update you the results.

Thanks and Regards

Nishith

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

Re: Problem in reading output data from Video Processing Sub System

Hi @nishith.kumar ,

Do you have any update on this? Did you made some progress?


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

Re: Problem in reading output data from Video Processing Sub System

Hello @florentw,

                  Sorry for delayed response. Still we are working on it. Soon we will update you.

 

Thanks and Regards 

Nishith

0 Kudos
Contributor
Contributor
1,013 Views
Registered: ‎02-08-2018

Re: Problem in reading output data from Video Processing Sub System

Hello @florentw,

   Here attached  output of VPSS after adding chroma resampler(16 bit). Input for VPSS is TPG solid  color bars. Please let us know  what we got is correct ?.

 

Thanks and Regards

Nishith

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

Re: Problem in reading output data from Video Processing Sub System

Hi @nishith.kumar ,

I am not gonna check your bin file. I am only providing guidance to help you understand the mapping in memory.

I assume you should now have 0 for the missing chroma. You can use this information to create your image


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

Re: Problem in reading output data from Video Processing Sub System

Hi @florentw,

                    Ok we will continue this to create image.

 

Thanks and Regards

Nishith

0 Kudos