This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62P-LP: How to reduce CPU usage and GPU usage?

Part Number: SK-AM62P-LP
Other Parts Discussed in Thread: AM62P

Tool/software:

I want to verify the encoded CPU load of 4 channels of 1920*1536@25 video stream.But right now I only have a 640*480@30 usb camera,so I started with a camera.Here are my pipe orders:

gst-launch-1.0 v4l2src device=/dev/video2 io-mode=4 ! videoconvert ! video/x-raw, format=NV12,framerate=30/1 ! v4l2h265enc extra-controls="enc,prepend_sps_and_pps_to_idr=1,video_gop_size=5" ! rtph265pay ! udpsink host=127.0.0.1 port=5000
top results are as follows:

Here is the flame digram.As you can see, videoconvert accounts for 87.12%.

Is a 640*480@30 stream that takes up 36.5% of the CPU of a single core after color conversion and coding within the normal range? Can I reduce the CPU usage?

The second question, after i added glupload and gldownload,why did the screen go black? Are there other ways to use GPU?

gst-launch-1.0 v4l2src device=/dev/video2 io-mode=4 ! glupload ! gldownload !  videoconvert ! video/x-raw, format=NV12,framerate=30/1 ! v4l2h265enc extra-controls="enc,prepend_sps_and_pps_to_idr=1,video_gop_size=5" ! rtph265pay ! udpsink host=127.0.0.1 port=5000

Thank you !

  • Hi Qinghong,

    I will try to replicate the CPU usage on my AM62P and get back. Please allow me a day or two for a response.

    Also, I have tried to use the glupload and gldownload in the below pipelines on my setup previously:

    gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw, format=1920, height=1080, format=UYVY, framerate=30/1 ! glupload ! glcolorconvert ! video/x-raw, format=1920, height=1080, format=NV12, framerate=30/1 ! gldownload ! waylandsink 
    
    gst-launch-1.0 -v v4l2src device=/dev/video2 num-buffers=200 ! video/x-raw, format=1920, height=1080, format=UYVY, framerate=30/1 ! glupload ! glcolorconvert ! gldownload ! video/x-raw, format=NV12, width=1920, height=1080 ! v4l2h264enc output-io-mode=dmabuf ! filesink location=temp-gl.264
    
    gst-launch-1.0 -v filesrc location=temp-gl.264 ! h264parse ! v4l2h264dec capture-io-mode=dmabuf ! kmssink driver-name=tidss sync=false force-modesetting=true
    

    Hope this helps.

    Best Regards,

    Suren

  • Hi Suren,

    Thank you very much, it works. I also want to known if there is a demo of how to use the GPU? In addition to glupload, gldownload and other related elements

  • Hi Qinghong,

    You can use the rgx_triangle_test or kmscube application that uses GPU and are packaged with SDK software on EVM.

    Best Regards,

    Suren

  • Hi, Suren:

    Does glcolorconvert represent color conversion done in the GPU?

  • Yes Qinghong.

    Also glcolorconvert is tied to  waylandsink display.

    Example pipeline:

    gst-launch-1.0 -v videotestsrc ! video/x-raw, format=YUY2, width=1280, height=720, framerate=10/1 ! glupload ! glcolorconvert ! gldownload ! waylandsink

    Best Regards,

    Suren

  • Hi,Suren.

    Thank you for your answer,which is very helpful for me.For the first CPU usage question, you said you would reply within 2 days. Is there any result?

  • Hi Qinghong,

    I haven't had a chance to verify 640x480@30fps on my AM62P setup. You had 4 instances of this resolution and seeing 36% CPU because you used software based videoconvert, is my understanding correct?

    Best Regards,

    Suren