High CPU usage when using imxcompositor_g2d with i.MX8MMini

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

High CPU usage when using imxcompositor_g2d with i.MX8MMini

1,137 Views
vincentz63
Contributor IV

I'm running tests with the i.MX8MMini-EVK and have found that using the imxcompositor_g2d greatly increases CPU usage.

I am comparing the following two pipelines:

Pipeline #1

gst-launch-1.0 v4l2src ! vpuenc_h264 gop-size=60 ! rtph264pay pt=96 ! udpsink host=172.20.1.120 port=5000

Pipeline #2

gst-launch-1.0 imxcompositor_g2d name=c sink_1::xpos=160 sink_1::ypos=120 ! video/x-raw,width=1920,height=1080,format=BGRx  ! vpuenc_h264  gop-size=60  ! rtph264pay pt=96 ! udpsink host=172.20.1.120 port=5000 v4l2src ! video/x-raw,width=1920,height=1080,format=YUY2 ! c.sink_0 filesrc location=./test.jpg ! decodebin ! imagefreeze ! c.sink_1

test.jpg is a 320x240 image.

Pipeline #1 uses about 6% CPU while pipeline #2 uses about 13% CPU. Any idea why so much CPU is being used?

The " i.MX Linux® User's Guide" page 50 states that "imxcompositor_g2d uses corresponding hardware to accelerate video composition".

This topic states that on the i.MX8MQ the overlaysink is implemented using GPU. Is it the same true with the i.MX8MMini and imxcompositor_g2d?

The "i.MX 8M Mini Applications Processor Reference Manual", page 4781 states that "Preprocessing is pipelined with the encoder and it can be used only with the VPU H1 encoder." However the preprocessing listed does not include overlays, just rotation or scaling. Is this preprocessing accessed using imxvideoconvert_g2d and not imxcompositor_g2d ?

Tags (2)
0 Kudos
1 Reply

1,004 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello JP,

6% and 13% I don not think that is much CPU, you can add a profiler is you think is using the CPU instead of GPU.

Regards

0 Kudos