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: How can I replace the display node with the LDC node in the TIOVX pipeline of the app_single_cam?

Part Number: TDA4VM

In the original example, the LDC's OUTPUT may store several identical images so I am interested in incorporating the LDC node into the vx_graph_parameter_queue_params_t within the example of app_single_cam.
This adjustment would enable me to Enqueue and Dequeue it during usage, as I aim to ensure that the output images from LDC are returned only after any changes have been made.

Could you please advise on how I can modify the example to achieve this?

sdk version : ti-processor-sdk-rtos-j784s4-evm-09_00_00_02

  • That's possible. Please make LDC output as graph parameters and then you would be able to do enqueue and dequeue operations. Please refer to capture parameter, it has been declared as a graph parameter. 

  • Hi I modify the grapsh parameters like below But it showed  the error.
    VX_ZONE_ERROR:[vxSetGraphScheduleConfig:188] Invalid parameters

        /* input @ node index 1, becomes graph parameter 0 */
        add_graph_parameter_by_node_index(this->obj->graph, this->obj->capture_node, 1);
        
    /* set graph schedule config such that graph parameter @ index 0 is enqueuable */
    graph_parameters_queue_params_list[graph_parameter_num].graph_parameter_index = graph_parameter_num;
    graph_parameters_queue_params_list[graph_parameter_num].refs_list_size = this->obj->num_cap_buf;
    graph_parameters_queue_params_list[graph_parameter_num].refs_list = (vx_reference*)&(this->obj->cap_frames[0]);
    graph_parameter_num++;
    
    
    add_graph_parameter_by_node_index(this->obj->graph, this->obj->node_ldc, 7);
    graph_parameters_queue_params_list[graph_parameter_num].graph_parameter_index = graph_parameter_num;
    graph_parameters_queue_params_list[graph_parameter_num].refs_list_size = obj->table_width * obj->table_height;
    graph_parameters_queue_params_list[graph_parameter_num].refs_list = (vx_reference*)&(this->obj->ldc_out);
    graph_parameter_num++;

  • Hi,

    Any further questions/update on this ticket? 

    Regards,

    Brijesh

  • I modify the refs_list_size as below.

    graph_parameters_queue_params_list[graph_parameter_num].refs_list_size = this->obj->num_cap_buf;
    


    But get the same error message.
    Does it caused by they have different buffer sizes between this->obj->cap_frames and this->obj->ldc_out?

  • No, each parameter can have different number of members, that's perfectly fine. 

    Are you creating an object array of ldc_out? and providing the pointer of this object array in the parameter list? 

    Also is the parameter id correct in the call to add_graph_parameter_by_node_index API for LDC output?

    Regards,

    Brijesh


  • No, the type of ldc_out is vx_image.
    It is defined as follows from app_single_cam_common.h.


    I am also curious about the difference between the display node and the ldc node.
    The following code snippet is from
    app_single_cam. The display node can use vx_image directly.
    P.S.: I tried setting
    refs_list_size to 1 for the ldc node, but it still doesn't work.

        /* input @ node index 1, becomes graph parameter 0 */
        add_graph_parameter_by_node_index(obj->graph, obj->capture_node, 1);
    
        /* set graph schedule config such that graph parameter @ index 0 is enqueuable */
        graph_parameters_queue_params_list[graph_parameter_num].graph_parameter_index = graph_parameter_num;
        graph_parameters_queue_params_list[graph_parameter_num].refs_list_size = obj->num_cap_buf;
        graph_parameters_queue_params_list[graph_parameter_num].refs_list = (vx_reference*)&(obj->cap_frames[0]);
        graph_parameter_num++;
    
        if(obj->test_mode == 1)
        {
            add_graph_parameter_by_node_index(obj->graph, obj->displayNode, 1);
            /* set graph schedule config such that graph parameter @ index 0 is enqueuable */
            graph_parameters_queue_params_list[graph_parameter_num].graph_parameter_index = graph_parameter_num;
            graph_parameters_queue_params_list[graph_parameter_num].refs_list_size = 1;
            graph_parameters_queue_params_list[graph_parameter_num].refs_list = (vx_reference*)&(obj->display_image);
            graph_parameter_num++;
        }


    In app_single_cam_common.c, ldc_out is the 7th parameter of the ldc node.
    I believe this is correct; I also checked the
    app_multi_cam_codec example.
    They use the same index at
    main.c::1272.

    add_graph_parameter_by_node_index(obj->capture_graph, obj->ldcObj.node, 7);
                    obj->ldcObj.graph_parameter_index = capt_graph_parameter_index;
                    obj->enc_pool.graph_parameter_index = capt_graph_parameter_index;
                    capt_graph_parameters_queue_params_list[capt_graph_parameter_index].graph_parameter_index = capt_graph_parameter_index;
                    capt_graph_parameters_queue_params_list[capt_graph_parameter_index].refs_list_size = obj->enc_pool.bufq_depth;
                    capt_graph_parameters_queue_params_list[capt_graph_parameter_index].refs_list = (vx_reference*)&obj->enc_pool.arr[0];
                    capt_graph_parameter_index++;

  • Hi,

    But in case of display, this is a test_mode and it will just work with the single image. As you can see in below statement, it just enqueues a single image and never dequeues or changes the images. 

    status = vxGraphParameterEnqueueReadyRef(obj->graph, 1, (vx_reference*)&(obj->display_image), 1);

    If you want to use the output as graph parameters, so that you can get the access to the LDC output image, you need to create an array images, like the capture output, and do the enqueue and dequeue operations, to allow pipeline working.

    Regards,

    Brijesh

  • Hi,
    If I only need to obtain the output image as a stream, would modifying the app_multi_cam_codec example be simpler? This is because it already accesses the LDC output in array form.

    How would you advise us?

  • Hi,

    Sorry, i did not get it, do you want to get output image of LDC? What do you mean getting it as a stream? 

    Yes, if this example already uses LDC output as graph parameter, you can use it.

    Regards,

    Brijesh

  • Yes, I want to get the output image of LDC.
    I also need it as stream. Get the image with 60 fps.

    OK, I will try to use the multi_cam_codec example.