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: TDA4 create 8 capture node

Part Number: TDA4VM


We use TDA4 EVM.

We want to create 8 capture node for 8 different camera.

When we create 2 capture node , capture node can dequeue successfully and receive data from sensor.

But when we create 3 capture node, capture node can not dequeue successfully.

How can we create 8 capture node for 8 different camera?

  • Hi,

    1. May I know which SDK version are you working on?

    2. Could you share the details on how you are configuring 8 capture nodes?

    Regards,
    Nikhil

  • 1. We use SDK7.3

    2. Our 8 Capture Node config setting:

    /////////////////CAPTURE NODE 0 Config setting
    vx_image capt_image_exemplar = vxCreateImage(obj->context, 1280, 960, VX_DF_IMAGE_UYVY);

    for(buf_id=0; buf_id<num_buf; buf_id++)
    {
    capture_frames[buf_id] = vxCreateObjectArray(obj->context, (vx_reference)capt_image_exemplar, 1);
    }

    tivx_capture_params_init(&local_capture_config);
    local_capture_config.numInst = 1U;
    local_capture_config.numCh = 1;
    local_capture_config.instId[0U] = 0;
    local_capture_config.instCfg[0U].enableCsiv2p0Support = (uint32_t)vx_true_e;
    local_capture_config.instCfg[0U].numDataLanes = 4U;
    for (loopCnt = 0U ;
    loopCnt < local_capture_config.instCfg[0U].numDataLanes ;
    loopCnt++)
    {
    local_capture_config.instCfg[0U].dataLanesMap[loopCnt] = (loopCnt + 1u);
    }
    local_capture_config.instCfg[0U].laneBandSpeed = TIVX_CAPTURE_LANE_BAND_SPEED_720_TO_800_MBPS;
    for (loopCnt = 0U; loopCnt < 1U; loopCnt++)
    {
    local_capture_config.chVcNum[loopCnt] = 0U;
    local_capture_config.chInstMap[loopCnt] = 0;
    }


    /////////////////CAPTURE NODE 1 Config setting
    vx_image capt_image_exemplar = vxCreateImage(obj->context, 1280, 960, VX_DF_IMAGE_UYVY);

    for(buf_id=0; buf_id<num_buf; buf_id++)
    {
    capture_frames[buf_id] = vxCreateObjectArray(obj->context, (vx_reference)capt_image_exemplar, 1);
    }

    tivx_capture_params_init(&local_capture_config);
    local_capture_config.numInst = 1U;
    local_capture_config.numCh = 1;
    local_capture_config.instId[0U] = 0;
    local_capture_config.instCfg[0U].enableCsiv2p0Support = (uint32_t)vx_true_e;
    local_capture_config.instCfg[0U].numDataLanes = 4U;
    for (loopCnt = 0U ;
    loopCnt < local_capture_config.instCfg[0U].numDataLanes ;
    loopCnt++)
    {
    local_capture_config.instCfg[0U].dataLanesMap[loopCnt] = (loopCnt + 1u);
    }
    local_capture_config.instCfg[0U].laneBandSpeed = TIVX_CAPTURE_LANE_BAND_SPEED_720_TO_800_MBPS;
    for (loopCnt = 0U; loopCnt < 1U; loopCnt++)
    {
    local_capture_config.chVcNum[loopCnt] = 1U;
    local_capture_config.chInstMap[loopCnt] = 0;
    }

    /////////////////CAPTURE NODE 2 Config setting
    vx_image capt_image_exemplar = vxCreateImage(obj->context, 1280, 960, VX_DF_IMAGE_UYVY);

    for(buf_id=0; buf_id<num_buf; buf_id++)
    {
    capture_frames[buf_id] = vxCreateObjectArray(obj->context, (vx_reference)capt_image_exemplar, 1);
    }

    tivx_capture_params_init(&local_capture_config);
    local_capture_config.numInst = 1U;
    local_capture_config.numCh = 1;
    local_capture_config.instId[0U] = 0;
    local_capture_config.instCfg[0U].enableCsiv2p0Support = (uint32_t)vx_true_e;
    local_capture_config.instCfg[0U].numDataLanes = 4U;
    for (loopCnt = 0U ;
    loopCnt < local_capture_config.instCfg[0U].numDataLanes ;
    loopCnt++)
    {
    local_capture_config.instCfg[0U].dataLanesMap[loopCnt] = (loopCnt + 1u);
    }
    local_capture_config.instCfg[0U].laneBandSpeed = TIVX_CAPTURE_LANE_BAND_SPEED_720_TO_800_MBPS;
    for (loopCnt = 0U; loopCnt < 1U; loopCnt++)
    {
    local_capture_config.chVcNum[loopCnt] = 2U;
    local_capture_config.chInstMap[loopCnt] = 0;
    }

    /////////////////CAPTURE NODE 3 Config setting
    vx_image capt_image_exemplar = vxCreateImage(obj->context, 1280, 960, VX_DF_IMAGE_UYVY);

    for(buf_id=0; buf_id<num_buf; buf_id++)
    {
    capture_frames[buf_id] = vxCreateObjectArray(obj->context, (vx_reference)capt_image_exemplar, 1);
    }

    tivx_capture_params_init(&local_capture_config);
    local_capture_config.numInst = 1U;
    local_capture_config.numCh = 1;
    local_capture_config.instId[0U] = 0;
    local_capture_config.instCfg[0U].enableCsiv2p0Support = (uint32_t)vx_true_e;
    local_capture_config.instCfg[0U].numDataLanes = 4U;
    for (loopCnt = 0U ;
    loopCnt < local_capture_config.instCfg[0U].numDataLanes ;
    loopCnt++)
    {
    local_capture_config.instCfg[0U].dataLanesMap[loopCnt] = (loopCnt + 1u);
    }
    local_capture_config.instCfg[0U].laneBandSpeed = TIVX_CAPTURE_LANE_BAND_SPEED_720_TO_800_MBPS;
    for (loopCnt = 0U; loopCnt < 1U; loopCnt++)
    {
    local_capture_config.chVcNum[loopCnt] = 3U;
    local_capture_config.chInstMap[loopCnt] = 0;
    }


    /////////////////CAPTURE NODE 4 Config setting
    vx_image capt_image_exemplar = vxCreateImage(obj->context, 1280, 960, VX_DF_IMAGE_UYVY);

    for(buf_id=0; buf_id<num_buf; buf_id++)
    {
    capture_frames[buf_id] = vxCreateObjectArray(obj->context, (vx_reference)capt_image_exemplar, 1);
    }

    tivx_capture_params_init(&local_capture_config);
    local_capture_config.numInst = 1U;
    local_capture_config.numCh = 1;
    local_capture_config.instId[0U] = 1;
    local_capture_config.instCfg[0U].enableCsiv2p0Support = (uint32_t)vx_true_e;
    local_capture_config.instCfg[0U].numDataLanes = 4U;
    for (loopCnt = 0U ;
    loopCnt < local_capture_config.instCfg[0U].numDataLanes ;
    loopCnt++)
    {
    local_capture_config.instCfg[0U].dataLanesMap[loopCnt] = (loopCnt + 1u);
    }
    local_capture_config.instCfg[0U].laneBandSpeed = TIVX_CAPTURE_LANE_BAND_SPEED_720_TO_800_MBPS;
    for (loopCnt = 0U; loopCnt < 1U; loopCnt++)
    {
    local_capture_config.chVcNum[loopCnt] = 0U;
    local_capture_config.chInstMap[loopCnt] = 1;
    }

    /////////////////CAPTURE NODE 5 Config setting
    vx_image capt_image_exemplar = vxCreateImage(obj->context, 1280, 960, VX_DF_IMAGE_UYVY);

    for(buf_id=0; buf_id<num_buf; buf_id++)
    {
    capture_frames[buf_id] = vxCreateObjectArray(obj->context, (vx_reference)capt_image_exemplar, 1);
    }

    tivx_capture_params_init(&local_capture_config);
    local_capture_config.numInst = 1U;
    local_capture_config.numCh = 1;
    local_capture_config.instId[0U] = 1;
    local_capture_config.instCfg[0U].enableCsiv2p0Support = (uint32_t)vx_true_e;
    local_capture_config.instCfg[0U].numDataLanes = 4U;
    for (loopCnt = 0U ;
    loopCnt < local_capture_config.instCfg[0U].numDataLanes ;
    loopCnt++)
    {
    local_capture_config.instCfg[0U].dataLanesMap[loopCnt] = (loopCnt + 1u);
    }
    local_capture_config.instCfg[0U].laneBandSpeed = TIVX_CAPTURE_LANE_BAND_SPEED_720_TO_800_MBPS;
    for (loopCnt = 0U; loopCnt < 1U; loopCnt++)
    {
    local_capture_config.chVcNum[loopCnt] = 1U;
    local_capture_config.chInstMap[loopCnt] = 1;
    }

    /////////////////CAPTURE NODE 6 Config setting
    vx_image capt_image_exemplar = vxCreateImage(obj->context, 1280, 960, VX_DF_IMAGE_UYVY);

    for(buf_id=0; buf_id<num_buf; buf_id++)
    {
    capture_frames[buf_id] = vxCreateObjectArray(obj->context, (vx_reference)capt_image_exemplar, 1);
    }

    tivx_capture_params_init(&local_capture_config);
    local_capture_config.numInst = 1U;
    local_capture_config.numCh = 1;
    local_capture_config.instId[0U] = 1;
    local_capture_config.instCfg[0U].enableCsiv2p0Support = (uint32_t)vx_true_e;
    local_capture_config.instCfg[0U].numDataLanes = 4U;
    for (loopCnt = 0U ;
    loopCnt < local_capture_config.instCfg[0U].numDataLanes ;
    loopCnt++)
    {
    local_capture_config.instCfg[0U].dataLanesMap[loopCnt] = (loopCnt + 1u);
    }
    local_capture_config.instCfg[0U].laneBandSpeed = TIVX_CAPTURE_LANE_BAND_SPEED_720_TO_800_MBPS;
    for (loopCnt = 0U; loopCnt < 1U; loopCnt++)
    {
    local_capture_config.chVcNum[loopCnt] = 2U;
    local_capture_config.chInstMap[loopCnt] = 1;
    }

    /////////////////CAPTURE NODE 7 Config setting
    vx_image capt_image_exemplar = vxCreateImage(obj->context, 1280, 960, VX_DF_IMAGE_UYVY);

    for(buf_id=0; buf_id<num_buf; buf_id++)
    {
    capture_frames[buf_id] = vxCreateObjectArray(obj->context, (vx_reference)capt_image_exemplar, 1);
    }

    tivx_capture_params_init(&local_capture_config);
    local_capture_config.numInst = 1U;
    local_capture_config.numCh = 1;
    local_capture_config.instId[0U] = 1;
    local_capture_config.instCfg[0U].enableCsiv2p0Support = (uint32_t)vx_true_e;
    local_capture_config.instCfg[0U].numDataLanes = 4U;
    for (loopCnt = 0U ;
    loopCnt < local_capture_config.instCfg[0U].numDataLanes ;
    loopCnt++)
    {
    local_capture_config.instCfg[0U].dataLanesMap[loopCnt] = (loopCnt + 1u);
    }
    local_capture_config.instCfg[0U].laneBandSpeed = TIVX_CAPTURE_LANE_BAND_SPEED_720_TO_800_MBPS;
    for (loopCnt = 0U; loopCnt < 1U; loopCnt++)
    {
    local_capture_config.chVcNum[loopCnt] = 3U;
    local_capture_config.chInstMap[loopCnt] = 1;
    }

  • Hi,

    Are you using difference camera for all 8 input cameras? If not, you could just use single capture node instance and capture from all 8 cameras using single instance.. Any specific reason for creating multiple capture node instances? 

    Regards,

    Brijesh

  • Hi Brijesh,

      In our project, we may combine defferent camera types. Please help to let us know how to setup more capture node to meet this request. Thanks!

    Mike Chen 

  • Hi Mike,

    On which target are you running all of these nodes? If not tried already, can you run them on separate targets? Capture node supports some 8 targets..

    Regards,

    Brijesh

  • Hi Brijesh:

    TDA4 connect 8 sensor with YUV422 output format

    These 8 sensor resolution is all different.

    How can I set these 8 capture node?

  • Hi,

    You would be calling tivxCaptureNode() 8 times I believe.
    Please do the below to set node on the target.

    status = vxSetNodeTarget(capture_node1, VX_TARGET_STRING, TIVX_TARGET_CAPTURE1); // for the first node
    status = vxSetNodeTarget(capture_node2, VX_TARGET_STRING, TIVX_TARGET_CAPTURE2); // for the second node
    .
    .
    status = vxSetNodeTarget(capture_node8, VX_TARGET_STRING, TIVX_TARGET_CAPTURE8); // for the eighth node

    This way you could run 8 capture nodes on 8 different targets TIVX_TARGET_CAPTURE1..8.

    Regards,
    Nikhil