09-16-2019 01:21 AM - edited 09-16-2019 01:21 AM
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?
09-16-2019 02:04 AM
what have you tried ?
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 ?
09-16-2019 02:52 AM
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
model Xilinx Video Composite Device
hw revision 0x0
driver version 4.14.0
- entity 1: vcap_csi output 0 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
<- "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
-> "vcap_csi output 0":0 [ENABLED]
09-17-2019 04:28 AM
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
However, I am not sure it this will work directly with the drivers
09-18-2019 12:35 AM
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?
09-18-2019 01:26 AM
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.
09-19-2019 08:42 PM
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.
09-20-2019 12:09 AM
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?
09-20-2019 01:34 AM
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.
09-20-2019 02:06 AM
09-20-2019 03:29 AM
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?
09-20-2019 04:02 AM
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
09-20-2019 04:08 AM
Can you share the xci for the video frame buffer write?
09-22-2019 07:38 PM
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?
09-29-2019 11:52 PM
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.