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.

TDA4VH-Q1: app_tidl_od

Part Number: TDA4VH-Q1

Hi Ti:

I want to make some modifications on this demo(sdk8.6, /vision_apps/apps/dl_demos/app_tidl_od).

The format of the imgMosaicObj.output_image output by imgMosaic node is VX_ DF_ IMAGE_ NV12,

I want to change the format to VX_ DF_ IMAGE_ UYVY,

What should I do?

  • Hi,

    The Mosaic node which is nothing, but the Multiscalar H/w Accelerator only supports the below output formats 

    VX_ DF_ IMAGE_ NV12, VX_ DF_ IMAGE_ U8, VX_ DF_ IMAGE_ U16.

    It does not support VX_ DF_ IMAGE_ UYVY

    Regards,

    Nikhil

  • Hi,

    OK ,Then I won't modify the Mosaic node.

    I want to convert nv12 2 UYVY, but vxColorConvertNode does not support this conversion. What can I do?

    Regards,

    Yangqi Ji

  • Hi Yangqi Ji,

    You could use the tivxDisplayM2MNode() to convert from NV12 to UYVY.

    You could refer the implementation of the node in ${PSDKRA}/hwa/test/test_display_m2m.c

    Regards,

    Nikhil

  • Hi  Nikhil,

    I used tivxDisplayM2MNode() in the app_tidl_od.

    An error was reported.

    Where is the registration of the kernel in the app_tidl_od?

    58.230666 s: VX_ZONE_ERROR:[ownContextSendCmd:799] Command ack message returned failure cmd_status: -7

    58.230693 s: VX_ZONE_ERROR:[ownContextSendCmd:835] tivxEventWait() failed.
    58.230717 s: VX_ZONE_ERROR:[ownNodeKernelInit:527] Target kernel, TIVX_CMD_NODE_CREATE failed for node node_140
    58.230724 s: VX_ZONE_ERROR:[ownNodeKernelInit:528] Please be sure the target callbacks have been registered for this core
    58.230731 s: VX_ZONE_ERROR:[ownNodeKernelInit:529] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
    58.231032 s: VX_ZONE_ERROR:[ownGraphNodeKernelInit:583] kernel init for node 6, kernel com.ti.hwa.displaym2m ... failed !!!
    58.231052 s: VX_ZONE_ERROR:[vxVerifyGraph:2055] Node kernel init failed
    58.231059 s: VX_ZONE_ERROR:[vxVerifyGraph:2109] Graph verify failed
    58.231487 s: VX_ZONE_ERROR:[ownContextSendCmd:799] Command ack message returned failure cmd_status: -1
    58.231494 s: VX_ZONE_ERROR:[ownContextSendCmd:835] tivxEventWait() failed.
    58.231501 s: VX_ZONE_ERROR:[ownNodeKernelDeinit:606] Target kernel, TIVX_CMD_NODE_DELETE failed
    58.231507 s: VX_ZONE_ERROR:[ownGraphNodeKernelDeinit:631] Node kernel de-init for node at index 0 failed
    App Verify Graph Done!
    MSC: Node send command failed!
    [MCU2_0] 58.230422 s: VX_ZONE_ERROR:[ownTargetKernelInstanceAlloc:116] kernel com.ti.hwa.displaym2m has not been registered on this CPU
    [MCU2_0] 58.230482 s: VX_ZONE_ERROR:[ownTargetKernelInstanceAlloc:117] Please register this kernel on the appropriate target core
    [MCU2_0] 58.230532 s: VX_ZONE_ERROR:[ownTargetNodeDescNodeCreate:761] target_kernel_instance is NULL
    [MCU2_0] 58.231144 s: [UDMA]
    [MCU2_0] 58.231170 s: [Error] UDMA TX teardown failed!!
    [MCU2_0] 58.231200 s: [UDMA]
    [MCU2_0] 58.231218 s: [Error] UDMA TX force disable failed!!
    [MCU2_0] 58.231260 s: src/csitx_drv.c @ Line 1499:
    [MCU2_0] 58.231285 s: [ERROR]UDMA TX channel disable FAILED!!!
    [MCU2_0] 58.231323 s: VX_ZONE_ERROR:[tivxCsitxDelete:1005] CSITX: ERROR: FVID2 Csitx not stopped !!!
    App Verify Graph Done!
    ------------------------------------------------------------app_main 2
    App Run Graph Done!
    58.334821 s: VX_ZONE_ERROR:[ownContextSendCmd:799] Command ack message returned failure cmd_status: -10
    58.334839 s: VX_ZONE_ERROR:[ownContextSendCmd:835] tivxEventWait() failed.
    58.334847 s: VX_ZONE_ERROR:[ownNodeKernelDeinit:606] Target kernel, TIVX_CMD_NODE_DELETE failed
    58.334853 s: VX_ZONE_ERROR:[ownDestructNode:42] ownNodeKernelDeinit() failed.
    58.334872 s: VX_ZONE_ERROR:[ownReleaseReferenceInt:279] destructor() returned error.
    58.334883 s: VX_ZONE_ERROR:[ownGraphRemoveNode:303] ownReleaseReferenceInt() failed.
    58.334890 s: VX_ZONE_ERROR:[vxRemoveNode:1650] ownReleaseReferenceInt() failed.
    58.334896 s: VX_ZONE_ERROR:[ownDestructGraph:104] ownReleaseReferenceInt() failed.
    58.336486 s: VX_ZONE_ERROR:[ownReleaseReferenceInt:279] destructor() returned error.

    Regards,

    Yangqi Ji

  • Hi Yangqi Ji,

    On the target side, the registration of display m2m node happens in the appRegisterOpenVXTargetKernels() in vision_apps/platform/j784s4/rtos/common/app_init.c.

    In this, please add the API tivxRegisterHwaTargetDisplayM2MKernels() after the API tivxRegisterHwaTargetDisplayKernels()

    This should resolve this issue.

    Regards,

    Nikhil

  • Hi Nikhil,

    I tried adding tivxRegisterHwaTargetDisplayM2MKonels(), make vision_ Apps reported an error:

    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/app_rtos_common_mcu2_0.lib
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/app_rtos_common_mcu2_1.lib
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/app_rtos_common_mcu3_0.lib
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/app_rtos_common_mcu3_1.lib
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/app_rtos_common_mcu4_0.lib
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/app_rtos_common_mcu4_1.lib
    Required system library ethfw.lib
    Required system library ethfw_callbacks.lib
    Required system library eth_intervlan.lib
    Required system library ethfw_board.lib
    Required system library lib_remoteswitchcfg_server.lib
    Required system library ethfw_lwip.lib
    Required system library lib_remote_device.lib
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/vx_app_rtos_linux_mcu2_0.out

    undefined first referenced
    symbol in file
    --------- ----------------
    tivxRegisterHwaTargetDisplayM2MKernels /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/app_rtos_common_mcu2_0.lib<app_init.obj>

    error: unresolved symbols remain
    error: errors encountered during linking;
    "/home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/vx_app_rt
    os_linux_mcu2_0.out" not built
    tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)
    make[1]: [concerto/finale.mak:213: /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/vx_app_rtos_linux_mcu2_0.out] Error 1 (ignored)
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/vx_app_rtos_linux_mcu2_1.out
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/vx_app_rtos_linux_mcu3_0.out
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/vx_app_rtos_linux_mcu3_1.out
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/vx_app_rtos_linux_mcu4_0.out
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/R5F/FREERTOS/release/vx_app_rtos_linux_mcu4_1.out
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/C7120/FREERTOS/release/vx_app_rtos_linux_c7x_1.out
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/C7120/FREERTOS/release/vx_app_rtos_linux_c7x_2.out
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/C7120/FREERTOS/release/vx_app_rtos_linux_c7x_3.out
    Linking /home/yqji20/dvk/rtos/vision_apps/out/J784S4/C7120/FREERTOS/release/vx_app_rtos_linux_c7x_4.out

    Regards,

    Yangqi Ji

  • Hi Nikhil,

    I am using pdk_j784s4_08_06_00_31, where can I download the M2M patch file?

    Regards,

    Yangqi Ji

  • Hi Yangqi Ji,

    The patch mentioned is for SDK 8.5.

    You would have to port the same to SDK 8.6

    I believe the only change would be the folder name from "pdk_j784s4_08_05_00_37" to  "pdk_j784s4_08_06_00_31", but the contents and file paths should still be the same.

    Regards,

    Nikhil

  • Hi Nikhil,

    I have used M2M to do NV12 2 UYVY.

    It seems that the conversion was not successful, there were some errors. VX_ZONE_ERROR:[vxUnmapImagePatch:2106] map address is null

    What could be the reason for this?

    This is the relevant part of the log

    App Create Graph Done!
    App Verify Graph Done!
    App Send MSC Command Done!
    App Verify Graph Done!
    Running frame 900
    Running frame 901
    Running frame 902
    Running frame 903
    Running frame 904
    Running frame 905
    Running frame 906
    Running frame 907
    Running frame 908
    Running frame 909
    Running frame 910
    Running frame 911
    Running frame 912
    Running frame 913
    Running frame 914
    Running frame 915
    Running frame 916
    Running frame 917
    Running frame 900
    Running frame 901
    Running frame 902
    Running frame 918
    Running frame 919
    Running frame 920
    Running frame 921
    Running frame 903
    Running frame 904
    Running frame 922
    Running frame 923
    Running frame 905
    Running frame 906
    Running frame 924
    Running frame 925
    Running frame 907
    App Reading Input Done!
    App Process Graph Done!
    app_tidl_od: Frame ID 925 of 991 ... Done.
    Running frame 926
    App Reading Input Done!
    59.237508 s: VX_ZONE_ERROR:[vxUnmapImagePatch:2106] map address is null
    App Reading Input Done!
    App Reading Input Done!
    App Process Graph Done!
    app_tidl_od: Frame ID 907 of 991 ... Done.
    Running frame 908
    App Reading Input Done!
    App Process Graph Done!
    app_tidl_od: Frame ID 926 of 991 ... Done.

    Regards

    Yangqi Ji

  • Hi Yangqi Ji 

    I shall look into this logs and get back to you by Thursday.

    Currently I'm on vacation considering festival holidays in India.

    Regards, 

    Nikhil

  • Hi Nikhil,

    Ok, thank you for your support.

    1.Does m2m support conversion between any formats?
    2.TIVX_TARGET_DISPLAY_M2M1, TIVX_TARGET_DISPLAY_M2M2, TIVX_TARGET_DISPLAY_M2M3, TIVX_TARGET_DISPLAY_M2M4, Are these four only supported for image format conversion demonstrated in ${PSDKRA}/hwa/test/test_display_m2m.c? Or is it all the same? I saw the NV12 2 YUYV of M2M4, but it's not what I wanted for NV12 2 UYVY.
    3.This is the relevant code I added. Could you please help me check if there are any issues

    app_color_convert_m2m.h
    #ifndef _APP_COLOR_CONVERT_M2M
    #define _APP_COLOR_CONVERT_M2M
    #include "app_modules.h"
    #define DSS_M2M_NUM_CH                              (2U)
    #define DSS_M2M_NUM_CH_MAX                          (4U)
    
    /* Common Configurations across channels */
    #define DSS_M2M_WB_PIPE_INST_ID                     (0U)
    #define DSS_M2M_PIPE_NUM                            (1U)
    #define DSS_M2M_PIPE_INST_ID                        (3U)
    /* Currently Only Overlay2 can be used for M2M operations,
       this can be changed through DSS initialization API available in vision_apps */
    #define DSS_M2M_OVERLAY_ID                          (3U)
    typedef struct{
        tivx_display_m2m_params_t local_m2m_config;
        vx_user_data_object m2m_config;
        vx_node m2m_node;
        char *target_name;
    }ColorConvertM2M;
    vx_status init_color_convert_m2m(ColorConvertM2M * ccm,vx_context context);
    vx_status create_color_convert_m2m(ColorConvertM2M * ccm, vx_graph graph, vx_image input, vx_image output,char * target);
    void destroy_color_convert_m2m(ColorConvertM2M * ccm);
    void deinit_color_convert_m2m(ColorConvertM2M * ccm);
    #endif
    app_color_convert_m2m.c
    #include "app_color_convert_m2m.h"
    
    
    vx_status init_color_convert_m2m(ColorConvertM2M * ccm,vx_context context)
    {
        vx_status status = VX_SUCCESS;
        tivx_display_m2m_params_init(&ccm->local_m2m_config);
        ccm->local_m2m_config.instId     = DSS_M2M_WB_PIPE_INST_ID;
        /* Only one pipeline is supported */
        ccm->local_m2m_config.numPipe    = DSS_M2M_PIPE_NUM;
        ccm->local_m2m_config.pipeId[0U] = DSS_M2M_PIPE_INST_ID;
        ccm->local_m2m_config.overlayId  = DSS_M2M_OVERLAY_ID;
        ccm->m2m_config = vxCreateUserDataObject(context,
                                            "tivx_display_m2m_params_t",
                                            sizeof(tivx_display_m2m_params_t),
                                            &ccm->local_m2m_config);
        if(ccm->m2m_config==NULL) status = VX_FAILURE;
        return status;
    }
    vx_status create_color_convert_m2m(ColorConvertM2M * ccm, vx_graph graph, vx_image input, vx_image output,char * target)
    {
        vx_status status = VX_SUCCESS;
        ccm->m2m_node = tivxDisplayM2MNode(graph, ccm->m2m_config, input, output);
        if(ccm->m2m_node==NULL) status = VX_FAILURE;
        status|=vxSetNodeTarget(ccm->m2m_node, VX_TARGET_STRING, target);
        return status;
    }
    void destroy_color_convert_m2m(ColorConvertM2M * ccm)
    {
        if( ccm->m2m_node){
            vxReleaseNode(&ccm->m2m_node);
            ccm->m2m_node = NULL;
        }
    }
    void deinit_color_convert_m2m(ColorConvertM2M * ccm)
    {
         if(ccm->m2m_config) vxReleaseUserDataObject(&ccm->m2m_config);
    }
    app_tidl_od/main.c
    ...
    status = init_color_convert_m2m(&obj->ccm,obj->context);
    ...
    obj->m2m_image = vxCreateImage(obj->context, 1920, 1080, VX_DF_IMAGE_UYVY);
    status = create_color_convert_m2m(&obj->ccm, obj->graph, obj->imgMosaicObj.output[0], obj->m2m_image, TIVX_TARGET_DISPLAY_M2M3);
    Regards,
    Yangqi Ji
  • Hi Nikhil,

    I didn't connect to an HDMI monitor,I am passing the output of m2m to the csitx node.

    So this error(59.237508 s: VX_ZONE_ERROR:[vxUnmapImagePatch:2106] map address is null) message will appear,

    The problem has been resolved.

    Regards, 

    Yangqi Ji

  • Hi Yangqi Ji,

    Thank you for the confirmation. Closing this thread if there are no further queries.

    Regards,

    Nikhil