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-TDA4VM: gstreamer pipline and cpu/gpu utilization

Part Number: SK-TDA4VM
Other Parts Discussed in Thread: TDA4VM

Tool/software:

Hi team

I just interested in knowing about the gst-pipeline usage in tda4vm. whether it can be run using hardware accelerators or only using a72 cores

1. Am well aware of how the actual videocodecs work form the multimedia 

and if running a gstreamer with camera interface , eg (pipeline) gst-launch-1.0 v4l2src device="/dev/video-usb-cam1" ! videoconvert ! videoscale ! video/x-raw, width=1920, height=1080 ! autovideosink

am able to see the camera streams on screen , which utilizes videoconvert and v4l2h264enc etc. which are actually part of hardware accelerator fine. which was also able to view in gst-device-monitor-1.0

My actual question is, while am running these things , my cpu utilization shoots up, and c7x core remain idle (gpu). so is that the pipelines run in cpu or can be run in gpu. if possible to run in gpu what should i do. Any help would be great full

Thanks and Regards

Gopal

  • Hi Gopal,

    The C7x isn't the GPU; the C7x is the DSP core. The PowerVR GE8430 is the GPU.

    You can check the GPU utilization by running:

    $ cat /sys/kernel/debug/pvr/status

    When I plug in a USB camera and run the following, I can see that the GPU is being utilized.

    $ gst-launch-1.0 v4l2src device="/dev/video-usb-cam0" ! videoconvert ! videoscale ! video/x-raw, width=1920, height=1080 ! autovideosink > /dev/null & watch cat /sys/kernel/debug/pvr/status

    Are you asking if you can get the pipelines to run on the C7x?

    Best,
    Jared

  • Hi Jared,

    Thanks for your response . While am running the pipeline am seeing gpu utlization was 0-1%. But my CPU utilization is around 10%

    "Are you asking if you can get the pipelines to run on the C7x?" - not sure whether this possible are not. 

    Is that there a way i which i can utilize gpu more efficiently while running the gstreamer pipeline are off load the usage from cpu, such that when am considering dual channels and running application CPU utilization /gpu utilization is effective.

    Thanks and Regards

    Bala Guga Gopal S

  • Hi Gopal,

    To leverage the GPU, you can use the ti gstreamer plugins. You can find them here: https://github.com/TexasInstruments/edgeai-gst-plugins 

    There is also some documentation and examples within the Edge-AI SDK documentation: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-sk-tda4vm/10_01_00/exports/edgeai-docs/devices/TDA4VM/linux/datasheet_optiflow.html 

    Best,
    Jared

  • Hi Jared,

    Thanks for information. I tried using videoconvert and ticolorconvert both options in my pipeline 

    $ gst-launch-1.0 v4l2src device="/dev/video-usb-cam0" ! videoconvert ! videoscale ! video/x-raw, width=1920, height=1080 ! autovideosink 

    but surprisingly , what am seeing is that , with usage mjpeg conversion too, cpu utlization is 107% and gpu is 30, 

    where as , while using vidoeconvert which runs on a72, on the same pipeline, cpu utlization is 99% and gpu is 30%. Is there anything am missing in my understanding here

    Best

    Gopal S

  • Hi Gopal,

    Sorry, I misspoke. The plugins don't necessarily leverage the GPU specifically; they do leverage hardware though. For example, tiovxmultiscalar leverages the MSC.

    Your CPU is at 99-107%? That seems way too high. My CPU usage is currently at around 24%.

    Best,
    Jared

  • gst-launch-1.0 v4l2src device="/dev/video-usb-cam0" ! image/jpeg, width=1920, height=1080,framerate=60/1 ! jpegdec ! queue ! ticolorconvert ! autovideosink

    Hi Jared,

    Thanks for information. The above pipeline is what we are using to capture and render the video .For the same thing we are getting ~107 CPU utilization. Can you please confirm is it because image/jpeg to raw format conversion using jpegdec. If it so, is there any other way that this conversion takes less CPU utilization.

    Best,

    Gopal S

  • Hi Gopal,

    My camera is 30fps, so I can't do the exact same test as you, but I ran three pipelines:

    31.9%
    gst-launch-1.0 v4l2src device="/dev/video-usb-cam0" ! videoconvert ! videoscale ! video/x-raw, width=1920, height=1080 ! kmssink sync=false driver-name=tidss
    
    63.6%
    gst-launch-1.0 v4l2src device=/dev/video-usb-cam0 ! image/jpeg, width=1920, height=1080 ! jpegdec ! tiovxdlcolorconvert ! video/x-raw, format=NV12 ! kmssink driver-name=tidss sync=true
    
    60.1%
    gst-launch-1.0 v4l2src device="/dev/video-usb-cam0" ! image/jpeg, width=1920, height=1080, framerate=30/1 ! jpegdec ! queue ! ticolorconvert ! autovideosink

    The second and third pipelines are similar to yours. This also confirms the issue is because of jpegdec. Can you run a pipeline similar to the first pipeline?

    Best,
    Jared