cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gladson
Observer
Observer
460 Views
Registered: ‎01-31-2021

Unable to change the color space format from RGB to YUV 4:2:0

Jump to solution

Hi,

Our project path is as shown below

custom video IP --> VPSS CSC --> Framebuffer write --> DDR --> VCU

We have developed V4L2 subdev driver for our custom ip and we are not able to stream the video in YUV 4:2:0 format.

We are getting RBG888_1X24 format from custom ip to VPSS input. We want VYYUYY8_1X24 (YUV 4:2:0) from VPSS output.
We are not able to set format to YUV 4:2:0 and we encounter below error.
Commands that we have used to test are :-

#media-ctl -p
Media controller API version 4.19.0

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

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

- entity 5: 80040000.v_proc_ss (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
[fmt:RBG888_1X24/1920x1080 field:none]
<- "80020000.M03_AXI_0":0 [ENABLED]
pad1: Source
[fmt:UYVY8_1X16/1920x1080 field:none]
-> "vcap_arinc output 0":0 [ENABLED]

- entity 8: 80020000.M03_AXI_0 (1 pad, 1 link)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Source
[fmt:RBG888_1X24/1920x1080@1/60 field:none]
-> "80040000.v_proc_ss":0 [ENABLED]

#media-ctl -v -V '"80040000.v_proc_ss":1 [fmt:VYYUYY8_1X24/1920x1080 field:none]'
Opening media device /dev/media0
Enumerating entities
looking up device: 81:0
looking up device: 81:1
looking up device: 81:2
Found 3 entities
Enumerating pads and links
Invalid pixel code 'VYYUYY8_1X24'

"80040000.v_proc_ss":1 [fmt:VYYUYY8_1X24/1920x1080 field:none]
^
Unable to parse format
Unable to setup formats: Invalid argument (22)

Why we are able to use VPSS to convert RGB to YUV 4:2:2 but not 4:2:0?

Tags (1)
1 Solution

Accepted Solutions
gladson
Observer
Observer
263 Views
Registered: ‎01-31-2021

Hi watari,


media-ctl is not supported in 19.2 version for yuv4:2:0 format

So we have used xmedia-ctl as shown below.

#./xmedia-ctl -d /dev/media0 -V "\"80040000.v_proc_ss\":1 [fmt:VYYUYY8_1X24/1920x1080 field:none]"

./xmedia-ctl -p
Media controller API version 4.19.0

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

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

- entity 5: 80040000.v_proc_ss (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
[fmt:RBG888_1X24/1920x1080 field:none]
<- "80020000.M03_AXI_0":0 [ENABLED]
pad1: Source
[fmt:VYYUYY8_1X24/1920x1080 field:none]
-> "vcap_arinc output 0":0 [ENABLED]

- entity 8: 80020000.M03_AXI_0 (1 pad, 1 link)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Source
[fmt:RBG888_1X24/1920x1080@1/60 field:none]
-> "80040000.v_proc_ss":0 [ENABLED]

Thanks and Regards,
Gladson




 

View solution in original post

4 Replies
watari
Professor
Professor
369 Views
Registered: ‎06-16-2013

Hi @gladson 

 

Would you try the following command ?

 

$ media-ctl -d /dev/media0 -V '"80040000.v_proc_ss":1 [fmt:VYYUYY8_1X24/1920x1080 field:none]'

 

Best regards,

0 Kudos
gladson
Observer
Observer
320 Views
Registered: ‎01-31-2021

Hi watari,

I have tried the above command and getting this error.

#media-ctl -d /dev/media0 -V '"80040000.v_proc_ss":1 [fmt:VYYUYY8_1X24/1920x1080 field:none]'
Unable to setup formats: Invalid argument (22)

Thanks and Regards,
Gladson

0 Kudos
watari
Professor
Professor
294 Views
Registered: ‎06-16-2013

Hi @gladson 

 

Would you make sure capability on your media graph ? Especially, I suggest you to make sure capability on v_proc_ss.

 

Best regards,

0 Kudos
gladson
Observer
Observer
264 Views
Registered: ‎01-31-2021

Hi watari,


media-ctl is not supported in 19.2 version for yuv4:2:0 format

So we have used xmedia-ctl as shown below.

#./xmedia-ctl -d /dev/media0 -V "\"80040000.v_proc_ss\":1 [fmt:VYYUYY8_1X24/1920x1080 field:none]"

./xmedia-ctl -p
Media controller API version 4.19.0

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

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

- entity 5: 80040000.v_proc_ss (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
[fmt:RBG888_1X24/1920x1080 field:none]
<- "80020000.M03_AXI_0":0 [ENABLED]
pad1: Source
[fmt:VYYUYY8_1X24/1920x1080 field:none]
-> "vcap_arinc output 0":0 [ENABLED]

- entity 8: 80020000.M03_AXI_0 (1 pad, 1 link)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Source
[fmt:RBG888_1X24/1920x1080@1/60 field:none]
-> "80040000.v_proc_ss":0 [ENABLED]

Thanks and Regards,
Gladson




 

View solution in original post