Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

TDA4VL-Q1: Graph parameter and node parameter index in single camera app

Part Number: TDA4VL-Q1

Dear Team,

In the single camera app (app_single_cam_main.c)

1) obj->num_cap_buf = NUM_BUFS; /* 4 */

 tivxSetNodeParameterNumBufByIndex(obj->node_viss, 6u, obj->num_cap_buf);

tivxSetNodeParameterNumBufByIndex(obj->node_ldc, 7u, obj->num_cap_buf);

tivxSetNodeParameterNumBufByIndex(obj->scalerNode, 1u, obj->num_cap_buf);

tivxSetNodeParameterNumBufByIndex(obj->node_aewb, 4u, NUM_BUFS);

In above snippet, How the node parameters index for node_viss (6u), node_ldc (7u), scalerNode (1u), aewb (4u) are selected on what basis?. What is the node parameter index for capture node and display node?

2)  Reference code from the single camera app is attached. Graph parameter 0 is coming rom the capture node and node index 1. Graph parameter 1 is coming from the display node and node index 0. 

    What about the other graph parameters from intermediate nodes like viss and aewb etc.

    

3)   #define MAX_NUM_BUF   8
      #define NUM_BUFS     4u

obj->num_cap_buf = NUM_BUFS; 

What is the intuition for selection of NUM_BUFS (i.e. 4)  in the single camera app?

Thanks & regards,

Sukumar

  • Hi Sukumar,

    The index is refered to the parameter index of the node.

    For capture node, there are two parameters (Refer the API implementation of node), input is 0 and output is 1

    tivxCaptureNode(vx_graph graph, vx_user_data_object input, vx_object_array output);

    Hence, index 1 for capture node

    Similarly for display node, it should be index 1 (Corrected in the latest SDK) for the display image parameter (Again from the display node API)
    index 0 is configuration and index 1 is the image.

    VX_API_ENTRY vx_node VX_API_CALL tivxDisplayNode(vx_graph graph, vx_user_data_object configuration, vx_image image);

    Similarly for other nodes.

       #define MAX_NUM_BUF   8
          #define NUM_BUFS     4u

    obj->num_cap_buf = NUM_BUFS; 

    What is the intuition for selection of NUM_BUFS (i.e. 4)  in the single camera app?

    Capture node being the source node would require minimum 3 buffer pipe up to start node execution. Hence we have given 4, you could give minimum 3, but 4 is suggested.

    Regards,

    Nikhil

  • Hi Nikhil,

    Thank you for the response. 

     tivxSetNodeParameterNumBufByIndex(obj->node_viss, 6u, obj->num_cap_buf);

    tivxSetNodeParameterNumBufByIndex(obj->node_ldc, 7u, obj->num_cap_buf);

    tivxSetNodeParameterNumBufByIndex(obj->scalerNode, 1u, obj->num_cap_buf);

    tivxSetNodeParameterNumBufByIndex ( vx_node node, vx_uint32 index, vx_uint32 num-buf) 

    Why specifically 6 for node_viss and 7 for node_ldc is getting used for storing number of buffers?

     

    Thanks & regards

    Sukumar

  • Hi Sukumar,

    For the VISS node, 6 is the output being used, hence we are giving this parameter a buffer depth similar to capture (i.e. being used in the application)

    VX_API_ENTRY vx_node VX_API_CALL tivxVpacVissNode(vx_graph graph,
                                                                       vx_user_data_object configuration,      ---->  0
                                                                       vx_user_data_object ae_awb_result,      ---->  1
                                                                       vx_user_data_object dcc_buf,      ---->  2
                                                                       tivx_raw_image raw,      ---->  3
                                                                       vx_image output0,      ---->  4
                                                                       vx_image output1,      ---->  5
                                                                       vx_image output2,      ---->  6
                                                                       vx_image output3,      ---->  7
                                                                       vx_image output4,      ---->  8
                                                                       vx_user_data_object h3a_output,      ---->  9
                                                                       vx_distribution histogram0,      ---->  10
                                                                       vx_distribution histogram1,      ---->  11
                                                                       vx_distribution raw_histogram);      ---->  12

    Similarly for LDC, 7 is the output being used.

    VX_API_ENTRY vx_node VX_API_CALL tivxVpacLdcNode (vx_graph graph,
                                                                       vx_user_data_object configuration,  ---> 0
                                                                       vx_matrix warp_matrix,  ---> 1
                                                                       vx_user_data_object region_prms,  ---> 2
                                                                       vx_user_data_object mesh_prms,  ---> 3
                                                                       vx_image mesh_img,  ---> 4
                                                                       vx_user_data_object dcc_db,  ---> 5
                                                                       vx_image in_img,  ---> 6
                                                                       vx_image out0_img,  ---> 7
                                                                       vx_image out1_img);  ---> 8

    Regards,

    Nikhil

  • Hi Nikhil,

    Thank you for the clarification about node parameter index. 

    In the single camera app, we can see the ISP output (i.e. YUV image) at pointer obj->y8_r8_c2.  It's not clear that how it will get the ISP image. When graph is executing where exactly this buffer (obj->y8_r8_c2) is getting filled.

  • Hi,

    If you refer the implementation of tivxVpacVissNode() in single cam app, you could see that we are passing obj->y8_r8_c2 into the node as a parameter.

    Hence this would be filled by the TIOVX framework once the graph execution has begun.

    Regards,

    Nikhil