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.

TDA4VM: V4L2 video decoder test

Part Number: TDA4VM

Dear Champs,

Could you please let me know how multi-channel V4L2 H.264 video decoder can be tested?

When my customer tried to test V4L2 video decoder released in the SDK v7.3 using gstreamer, they faced segment fault and kernel panic as below.

Could you please check below error and let me know if there is other method to test V4L2 video codec?

root@j7-evm:~# gst-launch-1.0 filesrc location=./Big_Buck_Bunny_720_10s_2MB.mp4 ! qtdemux ! h264parse ! v4l2h264dec ! video/x-raw,format=NV12 ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Caught SIGSEGV
#0  0x0000ffffb418233c in poll () from /lib/libc.so.6
#1  0x0000ffffb431f7e0 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x0000ffffb431fc38 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#3  0x0000ffffb4460634 in gst_bus_poll () from /usr/lib/libgstreamer-1.0.so.0
#4  0x0000000000404988 in _start ()
Spinning.  Please run 'gdb gst-launch-1.0 1470' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

^Chandling interrupt.
Interrupt: Stopping pipeline ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...

For kernel panic, please check below log in below.

v4l2_dec_test.txt
root@j7-evm:~# gst-launch-1.0 filesrc location=./Big_Buck_Bunny_720_10s_2MB.mp4 ! qtdemux ! h264parse ! v4l2h264dec ! video/x-raw,format=NV12 ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Caught SIGSEGV
#0  0x0000ffffb418233c in poll () from /lib/libc.so.6
#1  0x0000ffffb431f7e0 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x0000ffffb431fc38 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#3  0x0000ffffb4460634 in gst_bus_poll () from /usr/lib/libgstreamer-1.0.so.0
#4  0x0000000000404988 in _start ()
Spinning.  Please run 'gdb gst-launch-1.0 1470' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

^Chandling interrupt.
Interrupt: Stopping pipeline ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...




root@j7-evm:~# [  117.518691] unclassified data detected!
[  125.406946] img_dec 4300000.video-decoder: _img_mem_destroy_ctx: found derelict buffer 75
[  125.415538] ------------[ cut here ]------------
[  125.420171] WARNING: CPU: 0 PID: 1470 at /jenkins/psdkla-dunfell/release/j7-evm/yocto/tisdk/build/arago-tmp-external-arm-glibc/work/j7_evm-linux/ti-img-encod]
[  125.443751] Modules linked in: xt_conntrack xt_MASQUERADE xt_addrtype iptable_filter iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c 6
[  125.523807] CPU: 0 PID: 1470 Comm: gst-launch-1.0 Tainted: G           O      5.4.106-g023faefa70 #1
[  125.532914] Hardware name: Texas Instruments K3 J721E SoC (DT)
[  125.538729] pstate: 80000005 (Nzcv daif -PAN -UAO)
[  125.543514] pc : rman_get_resource+0xf0/0x198 [vxd_dec]
[  125.548732] lr : core_stream_unmap_buf_sg+0x2c/0x168 [vxd_dec]
[  125.554545] sp : ffff8000130afa70
[  125.557845] x29: ffff8000130afa70 x28: ffff000820da1c00
[  125.563138] x27: 0000000000000000 x26: ffff8000110ea000
[  125.568432] x25: 00000000b0b00002 x24: 0000000000000000
[  125.573726] x23: ffff8000130afb08 x22: 0000000000000000
[  125.579021] x21: ffff800008ed3f30 x20: 0000000004000021
[  125.584314] x19: ffff000820da1c00 x18: 0000000000000010
[  125.589608] x17: 0000000000000001 x16: 0000000000000019
[  125.594901] x15: 0000000000000004 x14: 3720726566667562
[  125.600194] x13: 0000000000000000 x12: 00000000f0000000
[  125.605487] x11: 0000000000000001 x10: 00000000f0000000
[  125.610780] x9 : ffffffdffffa0000 x8 : 0000000054400000
[  125.616073] x7 : 4000000000000000 x6 : ffff000820da2128
[  125.621368] x5 : 0000000000000001 x4 : 0000000000000003
[  125.626661] x3 : 0000000000000000 x2 : ffff8000130afb08
[  125.631954] x1 : 00000000b0b00002 x0 : ffff800008ed3f48
[  125.637248] Call trace:
[  125.639694]  rman_get_resource+0xf0/0x198 [vxd_dec]
[  125.644566]  core_stream_unmap_buf_sg+0x2c/0x168 [vxd_dec]
[  125.650044]  vxd_dec_stop_streaming+0xb0/0x1a0 [vxd_dec]
[  125.655347]  __vb2_queue_cancel+0x2c/0x270
[  125.659428]  vb2_core_queue_release+0x20/0x48
[  125.663769]  vb2_queue_release+0xc/0x18
[  125.667590]  v4l2_m2m_ctx_release+0x24/0x38
[  125.671768]  vxd_dec_release+0x64/0x118 [vxd_dec]
[  125.676458]  v4l2_release+0xb4/0xe8
[  125.679933]  __fput+0x88/0x228
[  125.682973]  ____fput+0xc/0x18
[  125.686017]  task_work_run+0x80/0x130
[  125.689665]  do_exit+0x2b0/0x978
[  125.692879]  do_group_exit+0x40/0xa0
[  125.696439]  get_signal+0xd0/0x690
[  125.699828]  do_notify_resume+0x174/0x688
[  125.703821]  work_pending+0x8/0x10
[  125.707208] ---[ end trace f5a15d14f53bf454 ]---
[  125.712291] ------------[ cut here ]------------
[  125.716930] WARNING: CPU: 0 PID: 1470 at /jenkins/psdkla-dunfell/release/j7-evm/yocto/tisdk/build/arago-tmp-external-arm-glibc/work/j7_evm-linux/ti-img-encod]
[  125.741031] Modules linked in: xt_conntrack xt_MASQUERADE xt_addrtype iptable_filter iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c 6
[  125.821085] CPU: 0 PID: 1470 Comm: gst-launch-1.0 Tainted: G        W  O      5.4.106-g023faefa70 #1
[  125.830191] Hardware name: Texas Instruments K3 J721E SoC (DT)
[  125.836006] pstate: 80000005 (Nzcv daif -PAN -UAO)
[  125.840792] pc : core_stream_unmap_buf_sg+0x12c/0x168 [vxd_dec]
[  125.846703] lr : core_stream_unmap_buf_sg+0x2c/0x168 [vxd_dec]
[  125.852516] sp : ffff8000130afad0
[  125.855815] x29: ffff8000130afad0 x28: ffff000820da1c00
[  125.861108] x27: 0000000000000000 x26: ffff8000110ea000
[  125.866402] x25: ffff000820da1c00 x24: ffff000845bd3480
[  125.871695] x23: ffff00085f3bc558 x22: ffff00085f3bb000
[  125.876988] x21: ffff00085f3bb150 x20: ffff000820da1c00
[  125.882281] x19: 0000000000000009 x18: 0000000000000010
[  125.887574] x17: 0000000000000001 x16: 0000000000000019
[  125.892867] x15: 0000000000000004 x14: 3720726566667562
[  125.898160] x13: 0000000000000000 x12: 00000000f0000000
[  125.903453] x11: 0000000000000001 x10: 00000000f0000000
[  125.908747] x9 : ffffffdffffa0000 x8 : 0000000054400000
[  125.914040] x7 : 4000000000000000 x6 : ffff000820da2128
[  125.919333] x5 : 0000000000000001 x4 : 0000000000000003
[  125.924626] x3 : 0000000000000000 x2 : ffff8000130afb08
[  125.929919] x1 : 478a50bad9620800 x0 : 0000000000000009
[  125.935214] Call trace:
[  125.937659]  core_stream_unmap_buf_sg+0x12c/0x168 [vxd_dec]
[  125.943223]  vxd_dec_stop_streaming+0xb0/0x1a0 [vxd_dec]
[  125.948523]  __vb2_queue_cancel+0x2c/0x270
[  125.952604]  vb2_core_queue_release+0x20/0x48
[  125.956945]  vb2_queue_release+0xc/0x18
[  125.960765]  v4l2_m2m_ctx_release+0x24/0x38
[  125.964943]  vxd_dec_release+0x64/0x118 [vxd_dec]
[  125.969632]  v4l2_release+0xb4/0xe8
[  125.973107]  __fput+0x88/0x228
[  125.976147]  ____fput+0xc/0x18
[  125.979189]  task_work_run+0x80/0x130
[  125.982838]  do_exit+0x2b0/0x978
[  125.986051]  do_group_exit+0x40/0xa0
[  125.989612]  get_signal+0xd0/0x690
[  125.993001]  do_notify_resume+0x174/0x688
[  125.996994]  work_pending+0x8/0x10
[  126.000381] ---[ end trace f5a15d14f53bf455 ]---

Thanks and Best Regards,

SI.