cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
harish-anil
Adventurer
Adventurer
1,144 Views
Registered: ‎05-15-2018

How to feed resolution values into Video processing subsystem

Jump to solution

I am trying to work on the 2018.3 BASE TRD and play around with the Video Processing Subsystem, I am trying the scaling feature of the ReSize block.

I presume I need to feed the input video resolution and the expected output video resolution through the Register while its block is in the scaler mode.

For Example, let's consider I want to do a downsizing from 1280x720 to 840x840 (custom resolution),

1. can I just feed these resolution values into the registers at 0x010 Data signal of HwReg_HeightIn and 0x018 Data signal of HwReg_Width In? 

2. How do I write to these registers ? can I just do a mem_map to the base address and write to these values? or should I go by the device tree method to read/write to these registers? 

 

0 Kudos
1 Solution

Accepted Solutions
chrisar
Xilinx Employee
Xilinx Employee
925 Views
Registered: ‎08-01-2007

We added an example of how to downscale and change the color format using the VPSS on the V4L2 Wiki Page under the Testing Procedure section:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842427/Xilinx+V4L2+VPSS+Scaler+driver

Chris
Versal ACAP: AI Engines | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

8 Replies
chrisar
Xilinx Employee
Xilinx Employee
1,045 Views
Registered: ‎08-01-2007

Since you are using the VPSS Scaler on the capture pipeline you can use media-ctl to set the input and output resolutions.  When you do this, the driver will handle the rest of the configuration of the scaler, so you do not need to directly write to the registers.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842427/Xilinx+V4L2+VPSS+Scaler+driver

Chris
Versal ACAP: AI Engines | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
harish-anil
Adventurer
Adventurer
1,032 Views
Registered: ‎05-15-2018
I tried to find some tutorials to perform the downsize from 1280x720 to 840x840 (these are my specific values, but looking for the tutorial that could specific on how to change the resolution) , but I did not find a tutorial specifying the details of media-ctl. Could you please share details on how to use media-ctl that could control the HDMI passthrough (scale).
0 Kudos
harish-anil
Adventurer
Adventurer
1,022 Views
Registered: ‎05-15-2018
root@xilinx:~# media-ctl -d /dev/media1 -p
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_hdmi output 0 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video2
pad0: Sink
<- "b0100000.scaler":1 [ENABLED]

- entity 5: b0100000.scaler (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Sink
[fmt:RBG888_1X24/1280x720 field:none]
<- "a1000000.hdmi_rxss":0 [ENABLED]
pad1: Source
[fmt:UYVY8_1X16/1920x1080 field:none]
-> "vcap_hdmi output 0":0 [ENABLED]

- entity 8: a1000000.hdmi_rxss (1 pad, 1 link)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev2
pad0: Source
[fmt:RBG888_1X24/1280x720 field:none]
[dv.caps:BT.656/1120 min:0x0@25000000 max:4096x2160@297000000 stds:CEA-861,DMT,CVT,GTF caps:progressive,reduced-blanking,custom]
[dv.detect:BT.656/1120 1280x720p60 (1650x750) stds:CEA-861 flags:CE-video]
-> "b0100000.scaler":0 [ENABLED]

root@xilinx:~#
0 Kudos
watari
Professor
Professor
1,000 Views
Registered: ‎06-16-2013

Hi @harish-anil 

 

Do you have LCD monitor which is supported this specific resolution via HDMI ?

If yes, I suggest you to use "modetest" command for adjusting resolution on CRTC.

 

However, I guess it doesn't support it and you need to consider it...

 

Best regards,

0 Kudos
harish-anil
Adventurer
Adventurer
990 Views
Registered: ‎05-15-2018
No, I won't feed feeing the output video to a monitor, I have a custom IP block that will read the output video of 840x840 and do certain processing, so could you please help me how to just change the resolution.
0 Kudos
watari
Professor
Professor
957 Views
Registered: ‎06-16-2013

Hi @harish-anil 

 

Would you use the following command to change resolution for scaler on source and sink pad in v4l2 graph ?

 

$ media-ctl -d /dev/media0 -V "\"<suitable location>\":<suitable pad number> [fmt:<suitable color format>]"

 

Best regards,

chrisar
Xilinx Employee
Xilinx Employee
926 Views
Registered: ‎08-01-2007

We added an example of how to downscale and change the color format using the VPSS on the V4L2 Wiki Page under the Testing Procedure section:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842427/Xilinx+V4L2+VPSS+Scaler+driver

Chris
Versal ACAP: AI Engines | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

harish-anil
Adventurer
Adventurer
911 Views
Registered: ‎05-15-2018
Thanks for the quick update.
0 Kudos