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
456 Views
Registered: ‎10-21-2018

How can vpss convert 10bit stream to 8bit?

Hello, we use zcu106 board, receive streams from fiber, then scale and encode, finally send the encoded streaming through Ethernet.

My petalinux is 2018.3.

The stream is YUV4:2:2 10bit per component, we want to use VPSS to convert it to YUV4:2:2 8-bit per compoent.

so, how can I set the formats of the VPSS pads?

Thanks.

0 Kudos
15 Replies
Scholar drjohnsmith
Scholar
443 Views
Registered: ‎07-09-2009

Re: How can vpss convert 10bit stream to 8bit?

what have you tried ?

https://www.xilinx.com/support/documentation/ip_documentation/v_proc_ss/v2_0/pg231-v-proc-ss.pdf

 

what of the video blocks in the VPSS are you looking at using ?

 

Various of the blocks have options for "number of bits "

    will that work ?

At the very easiest, you just ignore the lower 2 bits ?

 

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Contributor
Contributor
432 Views
Registered: ‎10-21-2018

Re: How can vpss convert 10bit stream to 8bit?

Thanks for respond!

Well, the input of VPSS is YUV4:2:2 10bit, and I hope the output of VPSS is YUV422 8bit, How can I set the VPSS?

The output of command "xmedia-ctl -p -d /dev/media0" is :

Media controller API version 4.14.0

Media device information
------------------------
driver xilinx-video
model Xilinx Video Composite Device
serial
bus info
hw revision 0x0
driver version 4.14.0

Device topology
- entity 1: vcap_csi output 0 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "a0080000.v_proc_ss":1 [ENABLED]

- entity 5: a0080000.v_proc_ss (2 pads, 1 link)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev3
pad0: Sink
             [fmt:UYVY8_1X16/1920x540 field:alternate]
pad1: Source
           [fmt:UYVY8_1X16/1920x540 field:alternate]
-> "vcap_csi output 0":0 [ENABLED]

0 Kudos
Moderator
Moderator
400 Views
Registered: ‎11-09-2015

Re: How can vpss convert 10bit stream to 8bit?

HI @gefei-liuqi 

You cannot directly. The VPSS does not have any data width conversion feature.

You might want ot use the AXI4-Stream subset converter with the following settings. This should take only the MSB of each component

vpss.JPG

 

However, I am not sure it this will work directly with the drivers

Regards


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Contributor
Contributor
382 Views
Registered: ‎10-21-2018

Re: How can vpss convert 10bit stream to 8bit?

Thanks @florentw 

    When I use the prebuilt of vcu_sdirx in the rdf0428-zcu106-vcu-trd-2018-3, I can use NV16 or NV16_10LE32 format in Gstreamer pipeline.  As we all know, the raw data of SDI is 10-bit, so, what changes the format from 10-bit to 8-bit?

   Our product receives SDI from fiber, then sends the SDI to VPSS ---> frame buffer write ---> vcu, and finally, we want the format is NV16 or NV12, What can we do?

0 Kudos
Moderator
Moderator
374 Views
Registered: ‎11-09-2015

Re: How can vpss convert 10bit stream to 8bit?

HI @gefei-liuqi 

You can transmit 8-bit over a 10-bit interface. When you configure the VPSS, you only mention the max bpc.

So no real conversion is done. If you move from 10bits to 8bits you can just ignore (the value will still be carried internally) the too LSB for each component.

Regards


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

Re: How can vpss convert 10bit stream to 8bit?

Hi @florentw 

The document of PG278 says that Frame Buffer Write can change 10-bit video stream to 8-bit memory video formats.

In my case, I use VPSS and frame-buffer-write IPs, then encoded in VCU. It works when I set NV16_10LE32 formats in Gstreamer pipeline, but cannot work with NV16 format.

0 Kudos
Moderator
Moderator
344 Views
Registered: ‎11-09-2015

Re: How can vpss convert 10bit stream to 8bit?

Hi @gefei-liuqi 

Could you point where in the PG278 you saw that Frame Buffer Write can change 10-bit video stream to 8-bit memory video formats?


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

Re: How can vpss convert 10bit stream to 8bit?

Hi @florentw 

Well, page 21 PG278 says: "Similarly, a 10-bit video stream can be scaled down and written to 8-bit memory video formats".

And with VCU-TRD-2018.3 vcu_sdirx prebuilt, I can set NV16 or NV16_10LE32 in Gstreamer pipeline, both works fine.

0 Kudos
Moderator
Moderator
324 Views
Registered: ‎11-09-2015

Re: How can vpss convert 10bit stream to 8bit?

Hi @gefei-liuqi 

Can you share your block design?


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

Re: How can vpss convert 10bit stream to 8bit?

Hi @florentw 

Attachment is out block design! Thanks!

147887526.jpg
0 Kudos
Moderator
Moderator
318 Views
Registered: ‎11-09-2015

Re: How can vpss convert 10bit stream to 8bit?

HI @gefei-liuqi 

I cannot see what is your configuration for the datawidth for the VPSS and Video frame buffer write.

Are you setting both the VPSS and Video frame buffer write to 10 bit?


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

Re: How can vpss convert 10bit stream to 8bit?

Hi @florentw 

  Yes, and if I set NV16_10LE32 format in Gstreamer pipeline, it works fine.

  But we want 8-bit, so we can do some work easily, but when I execute the command:

  gst-launch-1.0  v4l2src ! video/x-raw,format=NV16,width=1920,height=1080,interlace-mode=alternate ! omxh265enc ! rtph265pay ! udpsink host=192.168.3.88 port=60088

  It stopped after:

    Setting pipeline to PLAYING ...

     New clock: GstSystemClock

     Redistribute latency...

0 Kudos
Moderator
Moderator
301 Views
Registered: ‎11-09-2015

Re: How can vpss convert 10bit stream to 8bit?

Hi @gefei-liuqi 

Can you share the xci for the video frame buffer write?


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

Re: How can vpss convert 10bit stream to 8bit?

Hi @florentw 

we have solve this problem.

And we find that if we just choose Y_UV8,Y_UV8_420,Y_UV10,Y_UV10_420 formats in video frame buffer write, it cannot convert 10bit to 8bit.  But if we choose all the formats, the framebuffer write can do this convert.

I do not know why?

0 Kudos
Moderator
Moderator
174 Views
Registered: ‎04-12-2017

Re: How can vpss convert 10bit stream to 8bit?

Hello @gefei-liuqi 

We use AXI-subset converter in VCU SDI RX/TX designs for conversion from 422 10bit to 8bit.

This is the same thing  @florentw  mentioned earlier in his response.

Thank you

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------