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:慢速摄像头更新

Guru**** 2466550 points
Other Parts Discussed in Thread: AM62P

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1470345/sk-am62p-lp-slow-cameras-updates

器件型号:SK-AM62P-LP
主题中讨论的其他器件:AM62P

工具与软件:

您好!

我们已经实施了4摄像头解码器驱动程序,但当我们运行我们的管道,我们得到100%在每个核心,如下图所示



我们当前的管道如下所示

GST_DEBUG=3 gst-launch-1.0 -v \
v4l2src device=/dev/video2 ! queue max-size-buffers=8 max-size-bytes=0 max-size-time=0 ! \
video/x-raw,format=UYVY,width=1280,height=720,framerate=10/1 ! \
videoscale ! video/x-raw,format=UYVY,width=640,height=360 ! queue ! compositor.sink_0 \
v4l2src device=/dev/video3 ! queue max-size-buffers=8 max-size-bytes=0 max-size-time=0 ! \
video/x-raw,format=UYVY,width=1280,height=720,framerate=10/1 ! \
videoscale ! video/x-raw,format=UYVY,width=640,height=360 ! queue ! compositor.sink_1 \
v4l2src device=/dev/video4 ! queue max-size-buffers=8 max-size-bytes=0 max-size-time=0 ! \
video/x-raw,format=UYVY,width=1280,height=720,framerate=10/1 ! \
videoscale ! video/x-raw,format=UYVY,width=640,height=360 ! queue ! compositor.sink_2 \
v4l2src device=/dev/video5 ! queue max-size-buffers=8 max-size-bytes=0 max-size-time=0 ! \
video/x-raw,format=UYVY,width=1280,height=720,framerate=10/1 ! \
videoscale ! video/x-raw,format=UYVY,width=640,height=360 ! queue ! compositor.sink_3 \
compositor name=compositor \
sink_0::xpos=0   sink_0::ypos=0 \
sink_1::xpos=640 sink_1::ypos=0 \
sink_2::xpos=0   sink_2::ypos=360 \
sink_3::xpos=640 sink_3::ypos=360 ! \
queue ! video/x-raw,width=1280,height=720,framerate=120/1 ! queue ! kmssink

我们有什么可以改进的地方吗?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Sergio、

    首先、您是否获得了正确的摄像头数据?  

    如果是这种情况,我认为" videoscale"插件可能是最消耗 CPU 的东西。 请优化您的流水线。

    另外、请尝试如下所示的操作:

    gst-launch-1.0 \
    v4l2src device=/dev/video-ov5640-cam0 ! queue max-size-buffers=1 leaky=2 ! video/x-raw, width=1280,height=720, format=YUY2 ! ticolorconvert ! queue ! mosaic.sink_0 \
    v4l2src device=/dev/video-ov5640-cam1 ! queue max-size-buffers=1 leaky=2 ! video/x-raw, width=1280,height=720, format=YUY2 ! ticolorconvert ! queue ! mosaic.sink_1 \
    v4l2src device=/dev/video-ov5640-cam2 ! queue max-size-buffers=1 leaky=2 ! video/x-raw, width=1280,height=720, format=YUY2 ! ticolorconvert ! queue ! mosaic.sink_2 \
    v4l2src device=/dev/video-ov5640-cam3 ! queue max-size-buffers=1 leaky=2 ! video/x-raw, width=1280,height=720, format=YUY2 ! ticolorconvert ! queue ! mosaic.sink_3 \
    timosaic name=mosaic \
    sink_0::startx=300 sink_0::starty=0 sink_0::width=640 sink_0::height=480 \
    sink_1::startx=980 sink_1::starty=0 sink_1::width=640 sink_1::height=480  \
    sink_2::startx=300 sink_2::starty=500 sink_2::width=640 sink_2::height=480 \
    sink_3::startx=980 sink_3::starty=500 sink_3::width=640 sink_3::height=480 ! \
    video/x-raw, width=1920, height=1080, format=NV12 ! queue ! kmssink driver-name=tidss sync=false force-modesetting=true

    此致、

    建中

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    首先、您是否获得了正确的摄像机数据?  [报价]

    是的、但我们在图像上感应到有点延迟

    正如您提到的、我们在流水线上进行了一些更改

    gst-launch-1.0 \
    v4l2src device=/dev/video2 ! queue max-size-buffers=1 leaky=2 ! video/x-raw, width=1280,height=720,framerate=30/1, format=UYVY ! ticolorconvert ! queue ! mosaic.sink_0 \
    v4l2src device=/dev/video3 ! queue max-size-buffers=1 leaky=2 ! video/x-raw, width=1280,height=720,framerate=30/1, format=UYVY ! ticolorconvert ! queue ! mosaic.sink_1 \
    v4l2src device=/dev/video4 ! queue max-size-buffers=1 leaky=2 ! video/x-raw, width=1280,height=720,framerate=30/1 ,format=UYVY ! ticolorconvert ! queue ! mosaic.sink_2 \
    v4l2src device=/dev/video5 ! queue max-size-buffers=1 leaky=2 ! video/x-raw, width=1280,height=720,framerate=30/1 ,format=UYVY ! ticolorconvert ! queue ! mosaic.sink_3 \
    timosaic name=mosaic \
    sink_0::startx=0 sink_0::starty=0 sink_0::width=640 sink_0::height=360 \
    sink_1::startx=640 sink_1::starty=0 sink_1::width=640 sink_1::height=360  \
    sink_2::startx=0 sink_2::starty=360 sink_2::width=640 sink_2::height=360 \
    sink_3::startx=640 sink_3::starty=360 sink_3::width=640 sink_3::height=360 ! \
    video/x-raw, width=1280, height=720, framerate=60/1, format=NV12 ! queue ! kmssink driver-name=tidss sync=false force-modesetting=true


    但每个内核仍具有100%的效率

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我正在运行更多测试、得到了这些结果

    如果我只在"dev/video2"上使用此管道运行相机" gst-launch-1.0 -v v4l2src device=/dev/video3 ! video/x-raw、width=1280、height=720、format=UYVY! kmsink "我的输出已低于

    此故障未出现在单"dev/video3"和单"dev/video4"上。

    但当我运行它在马赛克模式这个错误不会出现

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Sergio、

     dev/video2是否对应于30102000.ticsi2rx 上下文0? 如果是这种情况、这是连接了多个摄像头时上下文0的已知问题。

    当您使用我之前共享的脚本设置路由时、请尝试跳过上下文0。

    此致、

    建中

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、建中


    您的  dev/video2是否对应于30102000.ticsi2rx context 0? [报价]



    我们对脚本进行了以下更改

    insmod /lib/modules/6.6.32-ti-01287-g6de6e418c80e-dirty/kernel/drivers/media/platform/ti/nvp6324/nvp6324.ko 
    
    # Set CDNS CSI Bridge
    media-ctl -R '"cdns_csi2rx.30101000.csi-bridge" [0/1 -> 1/0 [1], 0/2 -> 1/1 [1], 0/3 -> 1/2 [1], 0/4 -> 1/3 [1]]'
    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0/1 [fmt:UYVY8_1X16/1280x720 field:none]' 
    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0/2 [fmt:UYVY8_1X16/1280x720 field:none]'
    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0/3 [fmt:UYVY8_1X16/1280x720 field:none]' 
    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0/4 [fmt:UYVY8_1X16/1280x720 field:none]'
    
    # Set j721e-csi2rx routes
    media-ctl -R '"30102000.ticsi2rx" [0/1 -> 1/0 [1], 0/2 -> 2/0 [1], 0/3 -> 3/0 [1], 0/4 -> 4/0 [1]]'
    media-ctl -V '"30102000.ticsi2rx":0/1 [fmt:UYVY8_1X16/1280x720 field:none]' 
    media-ctl -V '"30102000.ticsi2rx":0/2 [fmt:UYVY8_1X16/1280x720 field:none]' 
    media-ctl -V '"30102000.ticsi2rx":0/3 [fmt:UYVY8_1X16/1280x720 field:none]'
    media-ctl -V '"30102000.ticsi2rx":0/4 [fmt:UYVY8_1X16/1280x720 field:none]'
    
    # Set video node formats
    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 1" -v width=1280,height=720,pixelformat=UYVY
    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 2" -v width=1280,height=720,pixelformat=UYVY
    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 3" -v width=1280,height=720,pixelformat=UYVY
    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 4" -v width=1280,height=720,pixelformat=UYVY
    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 5" -v width=1280,height=720,pixelformat=UYVY


    但我们的 dev/video2仍然在上下文0中

    root@am62pxx-evm:~# media-ctl -p
    Media controller API version 6.6.32
    
    Media device information
    ------------------------
    driver          j721e-csi2rx
    model           TI-CSI2RX
    serial          
    bus info        platform:30102000.ticsi2rx
    hw revision     0x1
    driver version  6.6.32
    
    Device topology
    - entity 1: 30102000.ticsi2rx (7 pads, 7 links, 4 routes)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev0
    	routes:
    		0/1 -> 1/0 [ACTIVE]
    		0/2 -> 2/0 [ACTIVE]
    		0/3 -> 3/0 [ACTIVE]
    		0/4 -> 4/0 [ACTIVE]
    	pad0: Sink
    		[stream:1 fmt:UYVY8_1X16/1280x720 field:none]
    		[stream:2 fmt:UYVY8_1X16/1280x720 field:none]
    		[stream:3 fmt:UYVY8_1X16/1280x720 field:none]
    		[stream:4 fmt:UYVY8_1X16/1280x720 field:none]
    		<- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
    	pad1: Source
    		[stream:0 fmt:UYVY8_1X16/1280x720 field:none]
    		-> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
    	pad2: Source
    		[stream:0 fmt:UYVY8_1X16/1280x720 field:none]
    		-> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
    	pad3: Source
    		[stream:0 fmt:UYVY8_1X16/1280x720 field:none]
    		-> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
    	pad4: Source
    		[stream:0 fmt:UYVY8_1X16/1280x720 field:none]
    		-> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
    	pad5: Source
    		-> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
    	pad6: Source
    		-> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]
    
    - entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 4 routes)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev1
    	routes:
    		0/1 -> 1/0 [ACTIVE]
    		0/2 -> 1/1 [ACTIVE]
    		0/3 -> 1/2 [ACTIVE]
    		0/4 -> 1/3 [ACTIVE]
    	pad0: Sink
    		[stream:1 fmt:UYVY8_1X16/1280x720 field:none]
    		[stream:2 fmt:UYVY8_1X16/1280x720 field:none]
    		[stream:3 fmt:UYVY8_1X16/1280x720 field:none]
    		[stream:4 fmt:UYVY8_1X16/1280x720 field:none]
    		<- "nvp6324_mipi 4-0033":0 [ENABLED,IMMUTABLE]
    	pad1: Source
    		[stream:0 fmt:UYVY8_1X16/1280x720 field:none]
    		[stream:1 fmt:UYVY8_1X16/1280x720 field:none]
    		[stream:2 fmt:UYVY8_1X16/1280x720 field:none]
    		[stream:3 fmt:UYVY8_1X16/1280x720 field:none]
    		-> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
    	pad2: Source
    	pad3: Source
    	pad4: Source
    
    - entity 15: nvp6324_mipi 4-0033 (1 pad, 1 link, 4 routes)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev2
    	routes:
    		0/0 -> 0/0 [ACTIVE]
    		0/0 -> 0/1 [ACTIVE]
    		0/0 -> 0/2 [ACTIVE]
    		0/0 -> 0/3 [ACTIVE]
    	pad0: Source
    		[stream:0 fmt:UYVY8_1X16/1280x720@1/30 field:none colorspace:srgb]
    		[stream:1 fmt:UYVY8_1X16/1280x720@1/30 field:none colorspace:srgb]
    		[stream:2 fmt:UYVY8_1X16/1280x720@1/30 field:none colorspace:srgb]
    		[stream:3 fmt:UYVY8_1X16/1280x720@1/30 field:none colorspace:srgb]
    		-> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
    
    - entity 21: 30102000.ticsi2rx context 0 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video2
    	pad0: Sink
    		<- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]
    
    - entity 27: 30102000.ticsi2rx context 1 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video3
    	pad0: Sink
    		<- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]
    
    - entity 33: 30102000.ticsi2rx context 2 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video4
    	pad0: Sink
    		<- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]
    
    - entity 39: 30102000.ticsi2rx context 3 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video5
    	pad0: Sink
    		<- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]
    
    - entity 45: 30102000.ticsi2rx context 4 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video6
    	pad0: Sink
    		<- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]
    
    - entity 51: 30102000.ticsi2rx context 5 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video7
    	pad0: Sink
    		<- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]

    有没有我们遗漏的东西?

    而关于问题与100%的 CPU 使用马赛克,我们发现我们的问题是由于视频扩展,有没有办法使用硬件加速与管道?

    此致、
    塞尔希奥

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我们缺少什么?

    请参考此脚本: https://github.com/TexasInstruments/edgeai-gst-apps/blob/main/scripts/setup_cameras_v3link.sh。按照 setup_imx219 ()进行操作、并根据传感器进行设置。

    关于用 mosaic 使用100% CPU 的问题,我们发现我们的问题是由于视频缩放,是否有办法使用硬件加速与管道?

    应使用 AM62P 上的 GPU 来显示图像。

    此致、

    建中

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您应使用 AM62P 上的 GPU 显示图像。

    我该怎么做?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    请参考此脚本: https://github.com/TexasInstruments/edgeai-gst-apps/blob/main/scripts/setup_cameras_v3link.sh。 按照 setup_imx219 ()进行操作,并为您的传感器进行设置。

    谢谢、这个脚本帮助我们重新路由传感器、现在我们使用此命令启动驱动程序

    #carrega o driver:
    insmod /lib/modules/6.6.32-ti-01287-g6de6e418c80e-dirty/kernel/drivers/media/platform/ti/nvp6324/nvp6324.ko 
    
    # Set CDNS CSI Bridge
    media-ctl -R '"cdns_csi2rx.30101000.csi-bridge" [0/0 -> 1/0 [1], 0/1 -> 1/1 [1], 0/2 -> 1/2 [1], 0/3 -> 1/3 [1]]'
    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0/0 [fmt:UYVY8_1X16/1280x720 field:none]' 
    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0/1 [fmt:UYVY8_1X16/1280x720 field:none]'
    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0/2 [fmt:UYVY8_1X16/1280x720 field:none]' 
    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0/3 [fmt:UYVY8_1X16/1280x720 field:none]'
    
    # Set video node formats
    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 0" -v width=1280,height=720,pixelformat=UYVY
    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 1" -v width=1280,height=720,pixelformat=UYVY
    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 2" -v width=1280,height=720,pixelformat=UYVY
    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 3" -v width=1280,height=720,pixelformat=UYVY
    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 4" -v width=1280,height=720,pixelformat=UYVY
    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 5" -v width=1280,height=720,pixelformat=UYVY
    
    #Set j721e-csi2rx routes dev/video3, dev/video4, dev/video5, dev/video6
    media-ctl -R '"30102000.ticsi2rx" [0/0 -> 2/0 [1], 0/1 -> 3/0 [1], 0/2 -> 4/0 [1], 0/3 -> 5/0 [1]]'
    media-ctl -V '"30102000.ticsi2rx":0/0 [fmt:UYVY8_1X16/1280x720 field:none]' 
    media-ctl -V '"30102000.ticsi2rx":0/1 [fmt:UYVY8_1X16/1280x720 field:none]' 
    media-ctl -V '"30102000.ticsi2rx":0/2 [fmt:UYVY8_1X16/1280x720 field:none]'
    media-ctl -V '"30102000.ticsi2rx":0/3 [fmt:UYVY8_1X16/1280x720 field:none]'


    我们正在研究 GPU 加速、我们发现在 AM62pXX 上、它消除了对 TIOVX 的依赖关系

    # Remove edgeai-tiovx-modules dependency for ARM only devices
    DEPENDS:remove:am62xx = "edgeai-tiovx-modules"
    DEPENDS:remove:am62pxx = "edgeai-tiovx-modules"
    RDEPENDS:${PN}:remove:am62xx = "edgeai-tiovx-modules"
    RDEPENDS:${PN}:remove:am62pxx = "edgeai-tiovx-modules"
    RDEPENDS:${PN}-source:remove:am62xx = "edgeai-tiovx-modules-dev"
    RDEPENDS:${PN}-source:remove:am62pxx = "edgeai-tiovx-modules-dev"
    
    COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|j722s|am62axx|am62xx|am62pxx"
    


    是否有任何理由将其删除?

    此致、

    塞尔希奥

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Sergio、

    您能否关闭此主题并打开有关如何使用 GPU 的新主题? 您的新问题将被发送至 GPU 专家。

    谢谢你。

    建中