How to resize v4l2 buffer using g2d

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to resize v4l2 buffer using g2d

2,060 Views
tt_0912
Contributor I

I’m trying to resize an image using g2d.
However, you need a physical address to do this.

I'm using V4L2 to get a frame of camera footage.
We have confirmed that the acquired frame can be drawn using mmap.

I don't know how to find the physical address from the virtual address I got with mmap.
Also, I don't even know if this method is correct.

I tried to convert a virtual address to a physical address using the following source code as a sample, but it fails.
https://stackoverflow.com/questions/2440385/how-to-find-the-physical-address-of-a-variable-from-user...

 

When I looked it up, I found the following question useful, but I couldn't find the URL for the answer.

https://community.nxp.com/t5/i-MX-Processors/Redirecting-Captured-Video-Frames-to-IPU/m-p/785976#M12...


It may be difficult to read because it is a sentence created by Google Translate.
Thank you.

0 Kudos
Reply
1 Reply

2,041 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

I have found the raw html page :

https://linux-kernel-labs.github.io/refs/heads/master/labs/memory_mapping.html

Best Regards,

Zhiming

0 Kudos
Reply