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.

TDA4AEN-Q1: Does the M2M node support the TDA4AEN platform?

Part Number: TDA4AEN-Q1

Tool/software:

Hi, TI expert,

Follow this thread as below:

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1306674/faq-tda4vm-enable-csi-tx-output-instead-of-dss-output-in-the-capture-demos-of-vision_apps

I has porting the patch of enable_CSITX_output.patch to TDA4AEN.

But I found this platform doesn't have M2M node.

So, does it support the function "csitx output instead of dss output" in TDA4AEN?


Thanks,

YL

  • Hi YL,

    Do you DSS M2M node? Then no, TDA4AEN device does not support this node. 

    Regards,

    Brijesh

  • Hi, Brijesh,

    Thanks your reply.

    So, do you have any idea solution for csi rx to csi tx?

    Thanks,

    YL

  • Hi YL,

    but why do you require DSS M2M node? Was this for some color conversion? for which color conversion? 

    Regards,

    Brijesh

  • HI, Brijesh,

    According the patch of "https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1306674/faq-tda4vm-enable-csi-tx-output-instead-of-dss-output-in-the-capture-demos-of-vision_apps", we had implement the function to receive the image that format is yuv422 from csirx node.

    So, we would to use the same image format of yuv422 to csitx node continuity.

    By the way, if it not support m2m node on tda4aen platform, is only one way solution that image format of nv12 transport to csitx node directly without m2m node?

    Thanks,

    YL

  • Hi, Brijesh,

    I checked the code of csitx part.

    The csitx seems have the limitation about the image format.

    So, does image format of NV12 not support on csitx?

    Because I checked the VISS and LDC used in image format of NV12 to do process.

    Ideal path does used image format of NV12 to transport on csitx node.

    Could you help me checked on this?

    static vx_status VX_CALLBACK tivxAddKernelCsitxValidate(vx_node node,
                const vx_reference parameters[ ],
                vx_uint32 num,
                vx_meta_format metas[])
    {
        vx_status status = (vx_status)VX_SUCCESS;
    
        vx_user_data_object configuration = NULL;
        vx_object_array input = NULL;
        vx_char configuration_name[VX_MAX_REFERENCE_NAME];
        vx_size configuration_size, input_num_items;
        vx_reference obj_arr_element;
        vx_df_image img_fmt;
        vx_enum ref_type;
    
        if ( (num != TIVX_KERNEL_CSITX_MAX_PARAMS)
            || (NULL == parameters[TIVX_KERNEL_CSITX_CONFIGURATION_IDX])
            || (NULL == parameters[TIVX_KERNEL_CSITX_INPUT_IDX])
        )
        {
            status = (vx_status)VX_ERROR_INVALID_PARAMETERS;
            VX_PRINT(VX_ZONE_ERROR, "One or more REQUIRED parameters are set to NULL\n");
        }
    
        if ((vx_status)VX_SUCCESS == status)
        {
            configuration = (vx_user_data_object)parameters[TIVX_KERNEL_CSITX_CONFIGURATION_IDX];
            input = (vx_object_array)parameters[TIVX_KERNEL_CSITX_INPUT_IDX];
        }
    
    
        /* PARAMETER ATTRIBUTE FETCH */
    
        if ((vx_status)VX_SUCCESS == status)
        {
            tivxCheckStatus(&status, vxQueryUserDataObject(configuration, (vx_enum)VX_USER_DATA_OBJECT_NAME, &configuration_name, sizeof(configuration_name)));
            tivxCheckStatus(&status, vxQueryUserDataObject(configuration, (vx_enum)VX_USER_DATA_OBJECT_SIZE, &configuration_size, sizeof(configuration_size)));
    
            tivxCheckStatus(&status, vxQueryObjectArray(input, (vx_enum)VX_OBJECT_ARRAY_NUMITEMS, &input_num_items, sizeof(input_num_items)));
    
        }
    
        /* PARAMETER CHECKING */
    
        if ((vx_status)VX_SUCCESS == status)
        {
            if ((configuration_size != sizeof(tivx_csitx_params_t)) ||
                (strncmp(configuration_name, "tivx_csitx_params_t", sizeof(configuration_name)) != 0))
            {
                status = (vx_status)VX_ERROR_INVALID_PARAMETERS;
                VX_PRINT(VX_ZONE_ERROR, "'configuration' should be a user_data_object of type:\n tivx_csitx_params_t \n");
            }
    
        }
    
        if ((vx_status)VX_SUCCESS == status)
        {
            obj_arr_element = vxGetObjectArrayItem(input, 0);
    
            if (NULL != obj_arr_element)
            {
                tivxCheckStatus(&status, vxQueryReference(obj_arr_element, (vx_enum)VX_REFERENCE_TYPE, &ref_type, sizeof(ref_type)));
    
                if ((vx_status)VX_SUCCESS == status)
                {
                    if ( (TIVX_TYPE_RAW_IMAGE != ref_type) &&
                         ((vx_enum)VX_TYPE_IMAGE != ref_type) )
                    {
                        status = (vx_status)VX_ERROR_INVALID_PARAMETERS;
                        VX_PRINT(VX_ZONE_ERROR, "input object array must contain either TIVX_TYPE_RAW_IMAGE or VX_TYPE_IMAGE \n");
                    }
                    else if ((vx_enum)VX_TYPE_IMAGE == ref_type)
                    {
                        tivxCheckStatus(&status, vxQueryImage((vx_image)obj_arr_element, (vx_enum)VX_IMAGE_FORMAT, &img_fmt, sizeof(img_fmt)));
    
                        /* image limitation??? */
                        if (((vx_df_image)VX_DF_IMAGE_RGBX != img_fmt) &&
                            ((vx_df_image)VX_DF_IMAGE_U16 != img_fmt) &&
                            ((vx_df_image)VX_DF_IMAGE_UYVY != img_fmt) &&
                            ((vx_df_image)VX_DF_IMAGE_YUYV != img_fmt))
                        {
                            status = (vx_status)VX_ERROR_INVALID_PARAMETERS;
                            VX_PRINT(VX_ZONE_ERROR, "image format is invalid \n");
                        }
                    }
                    else
                    {
                        /* do nothing */
                    }
                }
                else
                {
                    VX_PRINT(VX_ZONE_ERROR, "query 'input' object array reference failed \n");
                }
                vxReleaseReference(&obj_arr_element);
            }
            else
            {
                status = (vx_status)VX_ERROR_INVALID_PARAMETERS;
                VX_PRINT(VX_ZONE_ERROR, "'input' object array elements are NULL \n");
            }
        }
    
        return status;
    }

    Thanks,

    YL

  • Hi YL,

    Yes, CSITX does not support NV12 output format. 

    but why do you require to output NV12 format? 

    Instead, can you use YUV422 format? VISS can support outputting YUV422 format. 

    Regards,

    Brijesh

  • Hi, Brijesh,

    Thanks your reply.

    Follow this command "The patch removes the display node and instead adds a Display M2M node (to convert the data_format from NV12 to YUV422) and then the YUV422 image is sent to the CSI-TX Node through the CSI-TX instance 0."

    We needs to use m2m node to do convert the data_format from NV12 to YUV422, is it right?

    If it not have m2m node, how to do convert the data_format from NV12 to YUV422?

    Thanks,

    YL

  • Hi YL,

    But which component outputs NV12 data? Can we change this component to output YUV422 data directly? 

    Regards,

    Brijesh

  • HI, Brijesh,

    Our sensor output MIPI RAW 12, and it process to VISS node and LDC node.

    We want to output LDC out to csitx.

    In single camera app design, the image format of LDC out is NV12.

    In this patch, it used the M2M node to convert YUV422 from NV12.

    But in TDA4AEN platform, it not have M2M node to do this convert image format.

    So, could you have any idea to convert the image format of NV12 to YUV422?

    Thanks,

    YL

  • Hi YL,

    But do you use LDC for distortion correction? If not, can we bypass and connect VISS output directly to CSITX? VISS can support YUV422 output format. 

    Regards,

    Brijesh

  • Hi, Brijesh,

    Thanks your reply.

    Yes, our product should be processed in LDC function, because our lens is ultra wide, it have distortion.

    So, is it a limitation on LDC part? Because it is only output NV12, can't output YUV422?

    If yes, the M2M node design for LDC, because it only output on NV12?

    Thanks,

    YL

  • Hi YL,

    Yes, LDC will output on NV12 and which means we need some other mechanism to convert this data into YUV422. Can you use A53 neon instructions to convert it into YUV422? 

    Regards,

    Brijesh

  • Hi, Brijesh,

    Thanks your support.

    Could you help to provide the test patch on this?

    A53 neon to instead of M2M node.

    In current patch, it use the tiovx library to do link pipeline of LDC -> M2M -> CSITX.

    It is so hardly to override M2M by A53 neon.

    Thanks,

    YL

  • Hi YL,

    There is no DSS M2M node available on TDA4AEN device, so i dont see any other option, other than to use A53 Neon instructions to convert this format. 

    Regards,

    Brijesh

  • Hi, Brijesh,

    In function of app_create_ldc, could we change the image format of obj->ldc_out from VX_DF_IMAGE_NV12 to VX_DF_IMAGE_UYVY?

    /* LDC Output image in NV12 format */
    obj->ldc_out = vxCreateImage(obj->context,
    obj->table_width, obj->table_height,
    VX_DF_IMAGE_NV12);

    Thanks,

    YL

  • Hi YL,

    No, LDC does not support YUV422 output format, but let me double confirm the same. 

    Regards,

    Brijesh

  • Hi YL,

    LDC can support YUV422 output format, so you can directly connect LDC output to CSITX. 

    Regards,

    Brijesh 

  • Hi, Brijesh,

    Thanks your reply.

    So, if we want to LDC to output the image format of VX_DF_IMAGE_UYVY, does the VISS should be change to set the image format of VX_DF_IMAGE_UYVY?

    If it can, the CSITX will be to work, is it right?

    Thanks,

    YL

  • Hi YL,

    Even VISS does support YUV422 format, so please change output format for both VISS and LDC and then they can be connected to CSITX. 

    Regards,

    Brijesh

  • HI, Brijesh,

    Thanks your reply.

    I have set config in image format to YUV422 and data type to VX_DF_IMAGE_UYVY both on viss and ldc node.

    But in LDC to CSITX part, I dont know which function can copy image from ldc_out_image to csitx_image_arr.

    Could you help to suggest which function can override this code?

        vx_image ldc_out_image = NULL;
    
        if (obj->ldc_enable)
        {
            APP_PRINTF("Enabling LDC\n");
            status = app_create_ldc(obj, ldc_in_image);
    
            if(status == VX_SUCCESS)
            {
                status = vxSetNodeTarget(obj->node_ldc, VX_TARGET_STRING, TIVX_TARGET_VPAC_LDC1);
            }
            else
            {
                APP_PRINTF("app_create_ldc returned error\n");
                return status;
            }
            if(status == VX_SUCCESS)
            {
                status = tivxSetNodeParameterNumBufByIndex(obj->node_ldc, 7u, obj->num_cap_buf);
            }
    
            ldc_out_image = obj->ldc_out;
        }
        else
        {
            ldc_out_image = ldc_in_image;
        }
    
        APP_PRINTF("Enabling DSS_M2M\n");
        obj->csitx_input_image = vxCreateImage(obj->context, obj->width_in, obj->height_in, VX_DF_IMAGE_UYVY);
        status = vxGetStatus((vx_reference)obj->csitx_input_image);
        if(status != VX_SUCCESS)
        {
            APP_PRINTF("fail to create obj->csitx_input_image\n");
        }
        else
        {
            APP_PRINTF("success to create obj->csitx_input_image\n");
        }
    
        obj->csitx_image_arr = vxCreateObjectArray(obj->context, (vx_reference)obj->csitx_input_image, num_capture_frames);
        status = vxGetStatus((vx_reference)obj->csitx_image_arr);
        if(status != VX_SUCCESS)
        {
            APP_PRINTF("fail to create obj->csitx_image_arr\n");
        }
        else
        {
            APP_PRINTF("success to create obj->csitx_image_arr\n");
        }
    
        obj->display_m2m_output_image = (vx_image)vxGetObjectArrayItem(obj->csitx_image_arr, 0);
        status = vxGetStatus((vx_reference)obj->display_m2m_output_image);
        if(status != VX_SUCCESS)
        {
            APP_PRINTF("fail to get obj->display_m2m_output_image\n");
        }
        else
        {
            APP_PRINTF("success to get obj->display_m2m_output_image\n");
        }
    
    #if 0
        obj->display_m2m_param_obj = vxCreateUserDataObject(obj->context, "tivx_display_m2m_params_t", sizeof(tivx_display_m2m_params_t), &obj->display_m2m_params);
        status = vxGetStatus((vx_reference)obj->display_m2m_param_obj);
        if(status != VX_SUCCESS)
        {
            APP_PRINTF("fail to create obj->display_m2m_param_obj\n");
        }
        else
        {
            APP_PRINTF("success to create obj->display_m2m_param_obj\n");
        }
    
        obj->displaym2mNode = tivxDisplayM2MNode(obj->graph, obj->display_m2m_param_obj, ldc_out_image, obj->display_m2m_output_image);
    
        /* replicate displaym2m_output so that framework created buffer for the object array, because csitx node uses object array as input */
        vx_bool replicate[] = {vx_false_e, vx_false_e, vx_true_e};
        vxReplicateNode(obj->graph, obj->displaym2mNode, replicate, 3);
    
        if(status == VX_SUCCESS)
        {
            status = vxSetNodeTarget(obj->displaym2mNode, VX_TARGET_STRING, TIVX_TARGET_DISPLAY_M2M1);
        }
    
        if(status == VX_SUCCESS)
        {
            status = tivxSetNodeParameterNumBufByIndex(obj->displaym2mNode, 2u, obj->num_cap_buf);
        }
    #endif
    
        /* CSI-TX */
        {
            obj->csitx_node = tivxCsitxNode(obj->graph, obj->csitx_config, obj->csitx_image_arr);
            vxSetNodeTarget(obj->csitx_node, VX_TARGET_STRING, TIVX_TARGET_CSITX2);
        }

    Thanks,

    YL

  • Hi, Brijesh,

    I check some information in internet, does it modify as below that can work from LDC to CSITX?

    Please help to confirm, thanks.

    YL

        vx_image ldc_out_image = NULL;
    
        if (obj->ldc_enable)
        {
            APP_PRINTF("Enabling LDC\n");
            status = app_create_ldc(obj, ldc_in_image);
    
            if(status == VX_SUCCESS)
            {
                status = vxSetNodeTarget(obj->node_ldc, VX_TARGET_STRING, TIVX_TARGET_VPAC_LDC1);
            }
            else
            {
                APP_PRINTF("app_create_ldc returned error\n");
                return status;
            }
            if(status == VX_SUCCESS)
            {
                status = tivxSetNodeParameterNumBufByIndex(obj->node_ldc, 7u, obj->num_cap_buf);
            }
    
            ldc_out_image = obj->ldc_out;
        }
        else
        {
            ldc_out_image = ldc_in_image;
        }
    
        /* please help to check */
        obj->csitx_image_arr = vxCreateObjectArray(obj->context, (vx_reference)ldc_out_image, num_capture_frames);
    
        /* CSI-TX */
        {
            obj->csitx_node = tivxCsitxNode(obj->graph, obj->csitx_config, obj->csitx_image_arr);
            vxSetNodeTarget(obj->csitx_node, VX_TARGET_STRING, TIVX_TARGET_CSITX2);
        }

  • Hi YL,

    No, most likely this will not work. You are using different images for LDC outputs and CSITX input. 

    Instead of this, 

    - can you create an object array of size 1, if LDC node is not replicated.

    - then get the image at the index1 of this object array

    - use this image to create LDC node

    - and use this object array as input to the CSITX node. 

    - You can then use tivxSetNodeParameterNumBufByIndex to increase buffer depth for LDC output. 

    Regards,

    Brijesh

  • Hi, Brijesh,

    Thanks your reply.

    Do you mean I need to implement a copy image node such as M2M node?

    And below code will to be work, is it right?

    obj->display_m2m_output_image = (vx_image)vxGetObjectArrayItem(obj->csitx_image_arr, 0);
    status = vxGetStatus((vx_reference)obj->display_m2m_output_image);
    if(status != VX_SUCCESS)
    {
        APP_PRINTF("fail to get obj->display_m2m_output_image\n");
    }
    else
    {
        APP_PRINTF("success to get obj->display_m2m_output_image\n");
    }
    
    /* implement copy image node to instead of below? */
    obj->display_m2m_param_obj = vxCreateUserDataObject(obj->context, "tivx_display_m2m_params_t", sizeof(tivx_display_m2m_params_t), &obj->display_m2m_params);
    status = vxGetStatus((vx_reference)obj->display_m2m_param_obj);
    if(status != VX_SUCCESS)
    {
        APP_PRINTF("fail to create obj->display_m2m_param_obj\n");
    }
    else
    {
        APP_PRINTF("success to create obj->display_m2m_param_obj\n");
    }
    
    
    obj->displaym2mNode = tivxDisplayM2MNode(obj->graph, obj->display_m2m_param_obj, ldc_out_image, obj->display_m2m_output_image);
    
    /* replicate displaym2m_output so that framework created buffer for the object array, because csitx node uses object array as input */
    vx_bool replicate[] = {vx_false_e, vx_false_e, vx_true_e};
    vxReplicateNode(obj->graph, obj->displaym2mNode, replicate, 3);
    
    if(status == VX_SUCCESS)
    {
        status = vxSetNodeTarget(obj->displaym2mNode, VX_TARGET_STRING, TIVX_TARGET_DISPLAY_M2M1);
    }
    
    if(status == VX_SUCCESS)
    {
        status = tivxSetNodeParameterNumBufByIndex(obj->displaym2mNode, 2u, obj->num_cap_buf);
    }

  • Hi YL,

    Yes, this is correct mechanism. 

    Regards,

    Brijesh

  • Hi, Brijesh,

    we follow your suggestion that use ldc node to create a vx_object_array of csitx_image_arr on tivxCsitxNode.

    but it not create the com.ti.csitx, error log is below.

    Creating LDC
    [appIssGetDCCSizeLDC, 583] imx728 wdr mode, size: 135088
    [appIssGetDCCBuffLDC, 667] imx728 wdr mode, num_bytes: 135088
    [app_create_ldc, 593] table_width: 3840, table_height: 2160
    [app_create_ldc, 602] success to create obj->csitx_input_image: 0xffff8cd00f90
    [app_create_ldc, 613] success to create obj->csitx_image_arr: 0xffff8cd7dc50
    [app_create_ldc, 624] success to get obj->ldc_out: 0xffff8cd01260
    [app_create_graph, 1451] obj->csitx_image_arr: 0xffff8cd7dc50
    [app_create_graph, 1463] TIVX_TARGET_CSITX
    [app_create_graph, 1508] vxSetGraphScheduleConfig done
        46.026020 s:  VX_ZONE_ERROR: [ownContextSendCmd:912] Command ack message returned failure cmd_status: -1
        46.026133 s:  VX_ZONE_ERROR: [ownNodeKernelInit:604] Target kernel, TIVX_CMD_NODE_CREATE failed for node node_117
        46.026147 s:  VX_ZONE_ERROR: [ownNodeKernelInit:605] Please be sure the target callbacks have been registered for this core
        46.026160 s:  VX_ZONE_ERROR: [ownNodeKernelInit:606] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
        46.026176 s:  VX_ZONE_ERROR: [ownGraphNodeKernelInit:690] kernel init for node 4, kernel com.ti.csitx ... failed !!!
        46.026225 s:  VX_ZONE_ERROR: [ graph_87 ] Node kernel init failed
        46.026238 s:  VX_ZONE_ERROR: [ graph_87 ] Graph verify failed
    [MCU2_0]     46.025881 s:  VX_ZONE_ERROR: [tivxCsitxCreate:861] : Csitx Create Failed!!!
    

    also, I upload the code as below, could you help us to check which logic have problem, thanks.

    vx_status app_create_ldc(AppObj *obj, vx_image ldc_in_image)
    {
        uint32_t sensor_dcc_enabled = 1;
        vx_status status = VX_SUCCESS;
        uint32_t table_width, table_height;
        vx_imagepatch_addressing_t image_addr;
        vx_rectangle_t rect;
        int32_t dcc_buff_size = 0;
        int32_t dcc_buff_size_driver = 0;
    
    #ifdef x86_64
        int32_t dcc_buff_size_fs = 0;
    #endif
    
        const vx_char dcc_ldc_user_data_object_name[] = "dcc_ldc";
        vx_map_id dcc_ldc_buf_map_id;
        uint8_t * dcc_ldc_buf;
        uint32_t sensor_wdr_enabled = 1;
    
        printf ("Creating LDC \n");
    
        obj->dcc_param_ldc = NULL;
        if (1 == sensor_dcc_enabled)
        {
            dcc_buff_size_driver = appIssGetDCCSizeLDC(obj->sensor_name, sensor_wdr_enabled);
    
            if(dcc_buff_size_driver > 0)
            {
                dcc_buff_size += dcc_buff_size_driver;
            }
            else
            {
                dcc_buff_size_driver = 0;
            }
    
    #ifdef x86_64
            dcc_buff_size_fs = obj->fs_dcc_numbytes_ldc;
            if(dcc_buff_size_fs > 0)
            {
                dcc_buff_size += dcc_buff_size_fs;
            }
    #endif
    
            if (dcc_buff_size <= 0)
            {
                printf("Invalid DCC size for LDC. Disabling DCC \n");
                obj->dcc_param_ldc = NULL;
            }
            else
            {
                obj->dcc_param_ldc = vxCreateUserDataObject(
                        obj->context,
                        (const vx_char*)&dcc_ldc_user_data_object_name,
                        dcc_buff_size,
                        NULL
                        );
    
                if(status == VX_SUCCESS)
                {
                    status = vxMapUserDataObject(
                                    obj->dcc_param_ldc,
                                    0,
                                    dcc_buff_size,
                                    &dcc_ldc_buf_map_id,
                                    (void **)&dcc_ldc_buf,
                                    VX_WRITE_ONLY,
                                    VX_MEMORY_TYPE_HOST,
                                    0
                             );
                }
                if(status == VX_SUCCESS)
                {
                    status = appIssGetDCCBuffLDC(obj->sensor_name, sensor_wdr_enabled,  dcc_ldc_buf, dcc_buff_size_driver);
                    if(status != VX_SUCCESS)
                    {
                            printf("Couldn't get LDC DCC buffer from sensor driver \n");
                    }
    
    #ifdef x86_64
                    if(dcc_buff_size_fs > 0)
                    {
                        memcpy(dcc_ldc_buf+dcc_buff_size_driver, obj->fs_dcc_buf_ldc, dcc_buff_size_fs);
                    }
    #endif
                    if(status == VX_SUCCESS)
                    {
                        vxUnmapUserDataObject(obj->dcc_param_ldc, dcc_ldc_buf_map_id);
                    }
                }
            }
        }
    
        table_width = (((obj->table_width / (1 << obj->ds_factor)) + 1u) + 15u) & (~15u);
        table_height = ((obj->table_height / (1 << obj->ds_factor)) + 1u);
        /* Mesh Image */
        obj->mesh_img = vxCreateImage(obj->context,table_width, table_height, VX_DF_IMAGE_U32);
    
        /* Copy Mesh table */
        rect.start_x = 0;
        rect.start_y = 0;
        rect.end_x = table_width;
        rect.end_y = table_height;
    
        image_addr.dim_x = table_width;
        image_addr.dim_y = table_height;
        image_addr.stride_x = 4u;
        image_addr.stride_y = table_width * 4u;
        if(status == VX_SUCCESS)
        {
            status = vxCopyImagePatch(obj->mesh_img, &rect, 0, &image_addr,
                ldc_lut, VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST);
        }
        if (VX_SUCCESS != status)
        {
            APP_PRINTF("Copy Image Failed\n");
        }
    
    #ifndef APP_USE_CSITX
        /* LDC Output image in NV12 format */
        obj->ldc_out = vxCreateImage(obj->context,
            obj->table_width, obj->table_height,
            VX_DF_IMAGE_NV12);
    #else
        if (obj->csitx_enable)
        {
            /* LDC Output image in YUV422 format */
            APP_PRINTF("table_width: %d, table_height: %d\n", obj->table_width, obj->table_height);
            obj->csitx_input_image = vxCreateImage(obj->context, obj->table_width, obj->table_height, VX_DF_IMAGE_UYVY);
            status = vxGetStatus((vx_reference)obj->csitx_input_image);
            if(status != VX_SUCCESS)
            {
                APP_PRINTF("fail to create obj->csitx_input_image: %p\n", obj->csitx_input_image);
            }
            else
            {
                APP_PRINTF("success to create obj->csitx_input_image: %p\n", obj->csitx_input_image);
            }
    
            obj->csitx_image_arr = vxCreateObjectArray(obj->context, (vx_reference)obj->csitx_input_image, 1);
            status = vxGetStatus((vx_reference)obj->csitx_image_arr);
            if(status != VX_SUCCESS)
            {
                APP_PRINTF("fail to create obj->csitx_image_arr: %p\n", obj->csitx_image_arr);
            }
            else
            {
                APP_PRINTF("success to create obj->csitx_image_arr: %p\n", obj->csitx_image_arr);
            }
    
            obj->ldc_out = (vx_image)vxGetObjectArrayItem(obj->csitx_image_arr, 0);
            status = vxGetStatus((vx_reference)obj->ldc_out);
            if(status != VX_SUCCESS)
            {
                APP_PRINTF("fail to get obj->ldc_out: %p\n", obj->ldc_out);
            }
            else
            {
                APP_PRINTF("success to get obj->ldc_out: %p\n", obj->ldc_out);
            }
        }
        else
        {
            /* LDC Output image in NV12 format */
            obj->ldc_out = vxCreateImage(obj->context, obj->table_width, obj->table_height, VX_DF_IMAGE_NV12);
        }
    #endif /* APP_USE_CSITX */
    
        /* Mesh Parameters */
        obj->mesh_params_obj = vxCreateUserDataObject(obj->context,
            "tivx_vpac_ldc_mesh_params_t", sizeof(tivx_vpac_ldc_mesh_params_t), NULL);
        memset(&obj->mesh_params, 0, sizeof(tivx_vpac_ldc_mesh_params_t));
    
        tivx_vpac_ldc_mesh_params_init(&obj->mesh_params);
        obj->mesh_params.mesh_frame_width = obj->table_width;
        obj->mesh_params.mesh_frame_height = obj->table_height;
        obj->mesh_params.subsample_factor = obj->ds_factor;
        if(status == VX_SUCCESS)
        {
            status = vxCopyUserDataObject(obj->mesh_params_obj, 0,
                            sizeof(tivx_vpac_ldc_mesh_params_t), &obj->mesh_params,
                            VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST);
        }
        /* Block Size parameters */
        obj->region_params_obj = vxCreateUserDataObject(obj->context,
            "tivx_vpac_ldc_region_params_t", sizeof(tivx_vpac_ldc_region_params_t),
            NULL);
        obj->region_params.out_block_width = LDC_BLOCK_WIDTH;
        obj->region_params.out_block_height = LDC_BLOCK_HEIGHT;
        obj->region_params.pixel_pad = LDC_PIXEL_PAD;
        if(status == VX_SUCCESS)
        {
            status = vxCopyUserDataObject(obj->region_params_obj, 0,
                        sizeof(tivx_vpac_ldc_region_params_t), &obj->region_params,
                        VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST);
        }
        /* LDC Configuration */
        tivx_vpac_ldc_params_init(&obj->ldc_params);
        obj->ldc_params.luma_interpolation_type = 1;
    
        obj->ldc_params.dcc_camera_id = obj->cam_dcc_id;
    
        obj->ldc_param_obj = vxCreateUserDataObject(obj->context,
            "tivx_vpac_ldc_params_t", sizeof(tivx_vpac_ldc_params_t), NULL);
        if(status == VX_SUCCESS)
        {
            status = vxCopyUserDataObject(obj->ldc_param_obj, 0, sizeof(tivx_vpac_ldc_params_t),
                            &obj->ldc_params, VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST);
        }
    
        if (NULL == obj->dcc_param_ldc)
        {
            obj->node_ldc = tivxVpacLdcNode(obj->graph, obj->ldc_param_obj, NULL,
                    obj->region_params_obj, obj->mesh_params_obj,
                    obj->mesh_img, NULL, ldc_in_image,
                    obj->ldc_out, NULL);
        }
        else
        {
            obj->node_ldc = tivxVpacLdcNode(obj->graph, obj->ldc_param_obj, NULL,
                    NULL, NULL,
                    NULL, obj->dcc_param_ldc, ldc_in_image,
                    obj->ldc_out, NULL);
        }
        return status;
    }

            //vx_image ldc_out_image = NULL;
    
            if (obj->ldc_enable)
            {
                APP_PRINTF("Enabling LDC\n");
                status = app_create_ldc(obj, ldc_in_image);
    
                if(status == VX_SUCCESS)
                {
                    status = vxSetNodeTarget(obj->node_ldc, VX_TARGET_STRING, TIVX_TARGET_VPAC_LDC1);
                }
                else
                {
                    APP_PRINTF("app_create_ldc returned error\n");
                    return status;
                }
                if(status == VX_SUCCESS)
                {
                    status = tivxSetNodeParameterNumBufByIndex(obj->node_ldc, 7u, obj->num_cap_buf);
                }
    
                //ldc_out_image = obj->ldc_out;
            }
            else
            {
                //ldc_out_image = ldc_in_image;
            }
    
    
            /* CSI-TX */
            {
                APP_PRINTF("obj->csitx_image_arr: %p\n", obj->csitx_image_arr);
                obj->csitx_node = tivxCsitxNode(obj->graph, obj->csitx_config, obj->csitx_image_arr);
                APP_PRINTF("obj->csitx_node: %p\n", obj->csitx_node);
    
                APP_PRINTF("TIVX_TARGET_CSITX\n");
                vxSetNodeTarget(obj->csitx_node, VX_TARGET_STRING, TIVX_TARGET_CSITX);
            }
        }
    #endif /* APP_USE_CSITX */

  • Hi, Brijesh,

    We fix this issue, please ignore before debug log.

    Thanks,

    YL

  • Thanks YL, any further questions on this thread? 

  • Hi, Brijesh,

    I think no questions at now.

    Thanks,

    YL

  • Thanks, closing this thread.