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: edgeai-gst-plugins tiovxsde error when disparity-max != 0

Part Number: TDA4VM


Tool/software:

I'm evaluating the SDE on TDA4VM, mostly by means of the edgeai-gst-plugins (https://github.com/TexasInstruments/edgeai-gst-plugins/tree/main)

Going through the accelerator capabilities, it's stated that the Disparity search range (SR) can be of 64, 128 or 192, and a gst-inspect of tiovxsde reveals the existance of the disparity-max parameter:

  disparity-max: Maximum Disparity
                        flags: readable, writable, controllable, changeable only in NULL or READY state
                        Enum "GstTIOVXSdeMaxDisparity" Default: 0, "disparity_max_63"
                           (0): disparity_max_63 - disparity_min +63
                           (1): disparity_max_127 - disparity_min +127
                           (2): disparity_max_191 - disparity_min +191

With the following pipeline everything works fine:

gst-launch-1.0  \
filesrc location=im0.png ! decodebin ! videoconvert ! imagefreeze ! video/x-raw, format=NV12 ! queue ! sde.left_sink \
filesrc location=im1.png ! decodebin ! videoconvert ! imagefreeze ! video/x-raw, format=NV12 ! queue ! sde.right_sink \
tiovxsde name=sde disparity-max=0 ! tiovxsdeviz ! pngenc snapshot=TRUE ! filesink location=tda4vm_stereo.png 2>&1

However, when I try to change the disparity-max=0 to some other value (e.g. disparity-max=1), the pipeline fails with the following errors:

234008.651009 s: VX_ZONE_INIT:Enabled
234008.651055 s: VX_ZONE_ERROR:Enabled
234008.651096 s: VX_ZONE_WARNING:Enabled
234008.651695 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-0
234008.651918 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-1
234008.652071 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-2
234008.652224 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-3
234008.652284 s: VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
234008.653134 s: VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
234008.850413 s: VX_ZONE_ERROR:[ownContextSendCmd:875] Command ack message returned failure cmd_status: -1
234008.850441 s: VX_ZONE_ERROR:[ownNodeKernelInit:590] Target kernel, TIVX_CMD_NODE_CREATE failed for node node_126
234008.850467 s: VX_ZONE_ERROR:[ownNodeKernelInit:591] Please be sure the target callbacks have been registered for this core
234008.850486 s: VX_ZONE_ERROR:[ownNodeKernelInit:592] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
234008.850505 s: VX_ZONE_ERROR:[ownGraphNodeKernelInit:608] kernel init for node 0, kernel com.ti.hwa.dmpac_sde ... failed !!!
234008.850526 s: VX_ZONE_ERROR:[vxVerifyGraph:2159] Node kernel init failed
234008.850543 s: VX_ZONE_ERROR:[vxVerifyGraph:2213] Graph verify failed
234008.850643 s: VX_ZONE_ERROR:[ownReleaseReferenceInt:598] Invalid reference

 

Is there something i'm not understanding? With the default disparity close objecs are badly predicted:

Additional info:

  • I'm using the the PROCESSOR-SDK-LINUX-SK-TDA4VM prebuilt .wic image (version 09.02.00.05)
  • tiovx plugin version: 0.7.0

Thanks,

Loris

  • Hi Loris;

    I have escalated your question to our development team. They will provide answers to your question soon. 

    Thanks and regards

    Wen Li

  • Hello Wen;

    So, do you have any update on this topic? Did the team at least managed to reproduce the issue?

    Let me know if there is any other info you need to help identify the problem.

    Regards,
    Loris

  • Hi Loris,

    Below pipelines working at my end

    gst-launch-1.0 videotestsrc ! queue ! sde.right_sink videotestsrc ! queue ! sde.left_sink tiovxsde na
    me=sde disparity-max=2 ! fakesink
    gst-launch-1.0 videotestsrc ! queue ! sde.right_sink videotestsrc ! queue ! sde.left_sink tiovxsde na
    me=sde disparity-max=1 ! fakesink

    Can you please run and check these pipelines at your end

    Regards
    Rahul T R

  • Hi,

    I just tried them and yes your pipelines work just fine.

    However I did some more testing and it looks like the problem depends on the image size.

    This pipeline works with a negotiated resolution of 320x240 (WxH):

    gst-launch-1.0 \
    videotestsrc ! video/x-raw, format=NV12 ! queue ! sde.right_sink \
    videotestsrc ! video/x-raw, format=NV12 ! queue ! sde.left_sink \
    tiovxsde name=sde disparity-max=2 ! fakesink

    But when I force a different dimension I sometimes get the error. For example the following one gives the problem:

    gst-launch-1.0 \
    videotestsrc ! video/x-raw, format=NV12, width=1280, height=640 ! queue ! sde.right_sink \
    videotestsrc ! video/x-raw, format=NV12, width=1280, height=640 ! queue ! sde.left_sink \
    tiovxsde name=sde disparity-max=2 ! fakesink

    Haven't found a clear pattern for configurations that works vs the ones that don't.

    Hope that this can help!

    Regards,
    Loris

  • Hi Loris,

    You are correct, after further inspection
    seems like this limitation is coming from
    Shared L2 Cache among accelerators.

    This can be configured based on the use case
    indented to be run on the device

    At default settings, this is not supported

    Regards
    Rahul T R

  • Hello,

    Ok!

    So, is there an easy way I can configure this L2 cache so that I can correctly execute the GStreamer pipelines?

    Or is this configuration hard-coded in the plugin itself?

    Thanks,
    Loris