g2d api input output buffer size with alignment

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

g2d api input output buffer size with alignment

Jump to solution
571 Views
phuongnguyen1
Contributor II

Hi everyone,

    I am writing an application run on IMX8MPLUS EVK that crop and convert format frame input from v4l2 dev video device, that mean some resolution on list format support of dev video that not align to 16 such as 1920x1080.

    But to use the hardware accelerate g2d to do this task, i reference to the source code testing imx g2d hardware on g2d-samples/basic_test/g2d_basic.c that int input test witdth and height need to algin to 16 before using g2d api to process the buffer.

 phuongnguyen1_0-1762932337215.png

    So my question is it must be align a image buffer to 16 before process with g2d or not.

and if yes is input buffer not align make the hardware imx_g2d process slower? and if not do have a best way exept using cpu to clone new frame with alignment from old frame buffer?

 

Tags (1)
0 Kudos
Reply
1 Solution
534 Views
joanxie
NXP TechSupport
NXP TechSupport

for the g2d alignment, you can refer to the chapter 2.2.7 g2d_surface structure of enclosed file, the sample code is RGB as src and dst, for the RGB, RGB pixel buffer only uses planes [0], buffer address is with 16 bytes alignment on i.MX 6 (except i.MX 6Quad
Plus), 1 pixel alignment on i.MX 6Quad Plus, i.MX 7ULP and i.MX 8 family devices

View solution in original post

0 Kudos
Reply
1 Reply
535 Views
joanxie
NXP TechSupport
NXP TechSupport

for the g2d alignment, you can refer to the chapter 2.2.7 g2d_surface structure of enclosed file, the sample code is RGB as src and dst, for the RGB, RGB pixel buffer only uses planes [0], buffer address is with 16 bytes alignment on i.MX 6 (except i.MX 6Quad
Plus), 1 pixel alignment on i.MX 6Quad Plus, i.MX 7ULP and i.MX 8 family devices

0 Kudos
Reply