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.

[参考译文] AM67A:GStreamer 元素 v4l2h265dec 使用荒谬的 CPU 百分比量

Guru**** 2325560 points
Other Parts Discussed in Thread: AM67A, BEAGLEY-AI
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1521273/am67a-gstreamer-element-v4l2h265dec-uses-absurd-amount-of-cpu

器件型号:AM67A
Thread 中讨论的其他器件: BeagleY-AI

工具/软件:

您好、

我们正在使用 BeagleY-AI 板评估 AM67A SoC。

我们尝试了以下 gstreamer 流水线来评估硬件加速编码器和解码器。

gst-launch-1.0 rtspsrc name=rtspsrc1 add-reference-timestamp-meta=true location=rtsp://admin:123456@10.36.3.13:554/cam1/mpeg4 do-retransmission=true drop-on-latency=false latency=10  protocols=tcp \
! rtph265depay name=depay1 ! h265parse \
! v4l2h265dec capture-io-mode=4 output-io-mode=4 
! tiovxmemalloc ! video/x-raw,format=NV12 ! queue max-size-buffers=0 name=decoder1 
! tiovxdlcolorconvert ! video/x-raw,format=RGB 
! autovideosink 
 

在运行流水线时、我们观察到解码器正在使用大量 CPU。

这种行为是否有任何特殊原因? 这个元素看起来使用 CPU 进行解码、

此致、

Srimal

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

    嗨、Srimal、

    是否可以将 capture-io-mode 属性设置为 5?

    此致、
    Jared

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

    您好 Jared。

    感谢您的答复。 正如您提到的、我修改了流水线。

    现在我看到以下错误

    错误:来自元素/GstPipeline:pipaine0/v4l2h265dec:v4l2h265dec0:分配所需内存失败

    这里的问题可能是什么?

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

    嗨、Srimal、

    tiovx 插件和解码器之间的交互似乎存在问题。 您可以尝试此处提供的修补程序之一: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1517031/processor-sdk-j722s-purpose-of-stride-y-align-and-stride-x-align-in-gst_tiovx_get_exemplar_from_caps 

    此致、
    Jared

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

    您好 Jared、

    非常感谢您提供的信息。 这解决了我的问题。 但是、我无法同时运行 4 个流水线。 只能使用两条 H265 流水线。 否则设备会冻结。  
    您以前是否遇到过类似的情况?

    此致。

    Srimal

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

    嗨、Srimal、

    管道的分辨率和帧率是什么?

    此致、
    Jared

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

    我们以 25fps 700k 比特率运行 H265 1080p

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

    嗨、Srimal、

    没关系。 您能否 测试以下流水线:

    $ gst-launch-1.0 \
    filesrc location=test0.h265 ! h265parse ! v4l2h265dec ! fakesink \
    filesrc location=test1.h265 ! h265parse ! v4l2h265dec ! fakesink \
    filesrc location=test2.h265 ! h265parse ! v4l2h265dec ! fakesink \
    filesrc location=test3.h265 ! h265parse ! v4l2h265dec ! fakesink

    此致、
    Jared

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

    您好 Jared、

    每当第 3 个流水线启动时、器件就会冻结。 我可以安全地运行 2 个流水线。

    此致、

    Srimal

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

    您好 Jared、

    当设备冻结时、发生以下间隔恐慌

    dec 30210000.video-codec: wave5_vpu_firmware_command_queue_error_check: result not ready: 0x800
    [Jun11 11:37] Unable to handle kernel paging request at virtual address 7984798479847980
    [  +0.008284] Mem abort info:
    [  +0.003018]   ESR = 0x0000000096000004
    [  +0.000046] Unable to handle kernel paging request at virtual address 0060626465656560
    [  +0.003979]   EC = 0x25: DABT (current EL), IL = 32 bits
    [  +0.008081] Mem abort info:
    [  +0.005552]   SET = 0, FnV = 0
    [  +0.002681]   ESR = 0x0000000096000004
    [  +0.003034]   EA = 0, S1PTW = 0
    [  +0.003733]   EC = 0x25: DABT (current EL), IL = 32 bits
    [  +0.003180]   FSC = 0x04: level 0 translation fault
    [  +0.005257]   SET = 0, FnV = 0
    [  +0.000005]   EA = 0, S1PTW = 0
    [  +0.000003]   FSC = 0x04: level 0 translation fault
    [  +0.000004] Data abort info:
    [  +0.000002]   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
    [  +0.000003]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
    [  +0.000004]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
    [  +0.000005] [0060626465656560] address between user and kernel address ranges
    [  +0.000005] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
    [  +0.000006] Modules linked in: onboard_usb_hub cdns3 cdns_usb_common rpmsg_ctrl rpmsg_char
    [  +0.004959] Data abort info:
    [  +0.002962]  overlay cfg80211 crct10dif_ce pvrsrvkm(O) cc33xx_sdio e5010_jpeg_enc pci_endpoint_test at24 v4l2_jpeg cdns3_ti pwm_fan tps65219_pwrbutton rtc_ds1307 wave5 bluetooth videobuf2_dma_contig ecdh_generic ecc videobuf2_memops k3_j72xx_bandgap v4l2_mem2mem rfkill videobuf2_v4l2 videobuf2_common rti_wdt rtc_ti_k3 videodev ti_k3_r5_remoteproc mcrc64 snd_soc_hdmi_codec ti_k3_dsp_remoteproc mc sa2ul omap_mailbox cdns_dphy omap_hwspinlock
    [  +0.003233]   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
    [  +0.004840]  pwm_tiehrpwm pwm_tiecap cryptodev(O) fuse ipv6
    [  +0.000018] CPU: 0 PID: 135 Comm: systemd-journal Tainted: G           O       6.6.44-ti-01478-g541c20281af7-dirty #1
    [  +0.000009] Hardware name: BeagleBoard.org BeagleY-AI (DT)
    [  +0.000006] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [  +0.000007] pc : __d_lookup_rcu+0x4c/0xf8
    [  +0.000021] lr : lookup_fast+0x34/0x140
    [  +0.000010] sp : ffff800081b7bb00
    [  +0.000002] x29: ffff800081b7bb00 x28: ffff000822c28e40 x27: 0000000000000000
    [  +0.000011] x26: 2f2f2f2f2f2f2f2f x25: d0d0d0d0d0d0d0d0
    [  +0.002937]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
    [  +0.005399]  x24: ffff800081b7bc20
    [  +0.000005] x23: fefefefefefefeff x22: ffff00082291e025 x21: ffff00082194f540
    [  +0.000009] x20: ffff800081b7bc20 x19: ffff800081b7bc20 x18: 0000000000000000
    [  +0.000010] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
    [  +0.000010] x14: 0000000000000000 x13: ffff00082291e021 x12: ffff800081b7bc64
    [  +0.000009] x11: 0000000335125a0d x10: 0000fffffffffff8 x9 : 0000000000000003
    [  +0.000010] x8 : ffff00082194f540 x7 : a4a3a9a3ffbea5a2 x6 : 0000000000200000
    [  +0.000009] x5 : ffff8000813ec000 x4 : 000000000001a892 x3 : ffff000843400000
    [  +0.000011] x2 : 0000000000000003 x1 : 5f60626465656564 x0 : 5f60626465656564
    [  +0.000010] Call trace:
    [  +0.000003]  __d_lookup_rcu+0x4c/0xf8
    [  +0.000011]  walk_component+0x28/0x190
    [  +0.000009]  link_path_walk.part.0.constprop.0+0x25c/0x384
    [  +0.000012]  path_lookupat+0x3c/0x1a8
    [  +0.000008]  filename_lookup+0xb0/0x1ac
    [  +0.005189]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
    [  +0.005148]  user_path_at_empty+0x4c/0x74
    [  +0.000013]  do_faccessat+0x120/0x324
    [  +0.000009]  __arm64_sys_faccessat+0x24/0x30
    [  +0.000008]  invoke_syscall+0x48/0x114
    [  +0.000010]  el0_svc_common.constprop.0+0xc0/0xe0
    [  +0.000008]  do_el0_svc+0x1c/0x28
    [  +0.000007]  el0_svc+0x2c/0x84
    [  +0.007281] [7984798479847980] address between user and kernel address ranges
    [  +0.006085]  el0t_64_sync_handler+0x120/0x12c
    [  +0.000015]  el0t_64_sync+0x190/0x194
    [  +0.000012] Code: d360fd62 14000003 f9400021 b4000461 (b85fc02a) 
    [  +0.000007] ---[ end trace 0000000000000000 ]---
    [  +0.001445] Unable to handle kernel paging request at virtual address 002a2a2a292a2940
    [  +0.007002] Internal error: Oops: 0000000096000004 [#2] PREEMPT SMP
    [  +0.002788] Mem abort info:
    [  +0.000003]   ESR = 0x0000000096000004
    [  +0.009102] Unable to handle kernel paging request at virtual address 007473727372726e
    [  +0.000007] Mem abort info:
    [  +0.000002]   ESR = 0x0000000096000004
    [  +0.000003]   EC = 0x25: DABT (current EL), IL = 32 bits
    [  +0.000005]   SET = 0, FnV = 0
    [  +0.000003]   EA = 0, S1PTW = 0
    [  +0.000003]   FSC = 0x04: level 0 translation fault
    [  +0.000003] Data abort info:
    [  +0.000002]   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
    [  +0.000003]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
    [  +0.000004]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
    [  +0.000005] [007473727372726e] address between user and kernel address ranges
    [  +0.029694] Modules linked in: onboard_usb_hub cdns3 cdns_usb_common rpmsg_ctrl rpmsg_char overlay cfg80211
    [  +0.005506]   EC = 0x25: DABT (current EL), IL = 32 bits
    [  +0.005535]  crct10dif_ce pvrsrvkm(O) cc33xx_sdio e5010_jpeg_enc pci_endpoint_test at24
    [  +0.010614]   SET = 0, FnV = 0
    [  +0.005448]  v4l2_jpeg cdns3_ti pwm_fan tps65219_pwrbutton rtc_ds1307 wave5
    [  +0.006962]   EA = 0, S1PTW = 0
    [  +0.003984]  bluetooth videobuf2_dma_contig ecdh_generic ecc
    [  +0.003836]   FSC = 0x04: level 0 translation fault
    [  +0.003291]  videobuf2_memops
    [  +0.007124] Data abort info:
    [  +0.005196]  k3_j72xx_bandgap v4l2_mem2mem rfkill videobuf2_v4l2 videobuf2_common
    [  +0.005050]   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
    [  +0.003379]  rti_wdt rtc_ti_k3 videodev ti_k3_r5_remoteproc mcrc64
    [  +0.007131]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
    [  +0.007105]  snd_soc_hdmi_codec ti_k3_dsp_remoteproc mc sa2ul omap_mailbox
    [  +0.007133]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
    [  +0.007105]  cdns_dphy omap_hwspinlock pwm_tiehrpwm pwm_tiecap cryptodev(O) fuse
    [  +0.007132] [002a2a2a292a2940] address between user and kernel address ranges
    [  +0.007105]  ipv6
    [  +0.000008] CPU: 3 PID: 2193 Comm: decode:src Tainted: G      D    O       6.6.44-ti-01478-g541c20281af7-dirty #1
    [  +0.287113] Hardware name: BeagleBoard.org BeagleY-AI (DT)
    [  +0.005474] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [  +0.006950] pc : __d_lookup_rcu+0x4c/0xf8
    [  +0.004013] lr : lookup_fast+0x34/0x140
    [  +0.003830] sp : ffff800084283a80
    [  +0.003302] x29: ffff800084283a80 x28: ffff800084283c40 x27: 0000000000000000
    [  +0.007126] x26: 2f2f2f2f2f2f2f2f x25: d0d0d0d0d0d0d0d0 x24: ffff800084283c40
    [  +0.007126] x23: fefefefefefefeff x22: ffff00082362a025 x21: ffff00082194f540
    [  +0.007125] x20: ffff800084283c40 x19: ffff800084283c40 x18: 0000000000000000
    [  +0.007125] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
    [  +0.007125] x14: 0000000000000000 x13: ffff00082362a021 x12: ffff800084283c84
    [  +0.007125] x11: 000000035d51fe8a x10: 0000fffffffffff8 x9 : 0000000000000003
    [  +0.007124] x8 : ffff00082194f540 x7 : bfbdb5a2ffa6b5b4 x6 : 0000000000200000
    [  +0.007125] x5 : ffff8000813ec000 x4 : 000000000002ea8f x3 : ffff000843400000
    [  +0.007125] x2 : 0000000000000003 x1 : 7984798479847984 x0 : 7984798479847984
    [  +0.007126] Call trace:
    [  +0.002437]  __d_lookup_rcu+0x4c/0xf8
    [  +0.003655]  walk_component+0x28/0x190
    [  +0.003743]  link_path_walk.part.0.constprop.0+0x25c/0x384
    [  +0.005478]  path_openat+0xac/0xf7c
    [  +0.003483]  do_filp_open+0x9c/0x14c
    [  +0.003569]  do_sys_openat2+0xc4/0x104
    [  +0.003743]  __arm64_sys_openat+0x64/0xac
    [  +0.004000]  invoke_syscall+0x48/0x114
    [  +0.003744]  el0_svc_common.constprop.0+0xc0/0xe0
    [  +0.004694]  do_el0_svc+0x1c/0x28
    [  +0.003307]  el0_svc+0x2c/0x84
    [  +0.003050]  el0t_64_sync_handler+0x120/0x12c
    [  +0.004348]  el0t_64_sync+0x190/0x194
    [  +0.003657] Code: d360fd62 14000003 f9400021 b4000461 (b85fc02a) 
    [  +0.006078] ---[ end trace 0000000000000000 ]---

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

    嗨、Srimal、

    我在设置中没有看到问题(CAPTURE-IO-mode=4,因为受电方是假的)。

    $ gst-launch-1.0 \
    filesrc location=test0.h265 ! h265parse ! v4l2h265dec capture-io-mode=4 ! fakesink \
    filesrc location=test1.h265 ! h265parse ! v4l2h265dec capture-io-mode=4 ! fakesink \
    filesrc location=test2.h265 ! h265parse ! v4l2h265dec capture-io-mode=4 ! fakesink \
    filesrc location=test3.h265 ! h265parse ! v4l2h265dec capture-io-mode=4 ! fakesink

    您的问题似乎是由于 流水线中的其他问题造成的。 我使用的测试视频都是 1080x2160@30fps。

    此外、您能否开一个新 TT、因为这与原始问题不再相关?

    此致、
    Jared