TDA4VEN-Q1: Mosaic Node failing to process two images

Part Number: TDA4VEN-Q1

Tool/software:

Hi,

I have a custom pipeline pictured below:

I'm having trouble with the Mosaic node.  I'm building these two pipelines by hand (similar to app single cam twice).  They have the same resolution and the same bit depth.  I put the output of MSC0 and MSC1 into their own unique object arrays.  I'm configuring the mosaic node as follows:

static void set_img_mosaic_params(ImgMosaicObj *imgMosaicObj, vx_uint32 in_width, vx_uint32 in_height, vx_int32 numCh)
{
    vx_int32 idx, ch;
    vx_int32 grid_size = 2;

    imgMosaicObj->out_width    = 1920;
    imgMosaicObj->out_height   = 1080;

    imgMosaicObj->num_inputs   = numCh;

    idx = 0;

    tivxImgMosaicParamsSetDefaults(&imgMosaicObj->params);

    for(ch = 0; ch < numCh; ch++)
    {
        vx_int32 winX = ch%grid_size;
        vx_int32 winY = ch/grid_size;

        imgMosaicObj->params.windows[idx].startX  = (winX * (in_width/grid_size));
        imgMosaicObj->params.windows[idx].startY  = (winY * (in_height/grid_size));
        imgMosaicObj->params.windows[idx].width   = in_width/grid_size;
        imgMosaicObj->params.windows[idx].height  = in_height/grid_size;
        imgMosaicObj->params.windows[idx].input_select   = ch;

        imgMosaicObj->params.windows[idx].channel_select = 0;

        idx++;
    }

    imgMosaicObj->params.num_windows  = idx;

    /* Number of time to clear the output buffer before it gets reused */
    imgMosaicObj->params.clear_count  = NUM_BUFS;
}

// In the main method:
{
// ...
    vx_uint16 resized_width, resized_height;
    appIssGetResizeParams(IMX728_OUT_WIDTH, IMX728_OUT_HEIGHT, 1920, 1080, &resized_width, &resized_height);

    set_img_mosaic_params(&obj->graph_obj->mosiacObj, resized_width, resized_height, 2);
    status = app_init(obj->graph_obj);
// ...
}

// Later - in create graph
    vx_uint16 resized_width, resized_height;
    appIssGetResizeParams(IMX728_OUT_WIDTH, IMX728_OUT_HEIGHT, 1920, 1080, &resized_width, &resized_height);
    vx_image output_template = vxCreateImage(obj->context, resized_width, resized_height, VX_DF_IMAGE_NV12);
    obj->mosiacObj.input_arr[0] = vxCreateObjectArray(obj->context, (vx_reference) output_template, 1);
    vxReleaseImage(&output_template);
    
    vx_image output_template2 = vxCreateImage(obj->context, resized_width, resized_height, VX_DF_IMAGE_NV12);
    obj->mosiacObj.input_arr[1] = vxCreateObjectArray(obj->context, (vx_reference) output_template2, 1);
    vxReleaseImage(&output_template2);
    
    ...
    
    app_create_graph_img_mosaic(obj->graph, &obj->mosiacObj, NULL);
    tivxSetNodeParameterNumBufByIndex(obj->mosiacObj.node, 1, NUM_BUFS);

and I get this output:

```

[MCU2_0] 86.341393 s: VX_ZONE_ERROR: [tivxMemRegionTranslate:52] Invalid memtype
[MCU2_0] 86.341436 s: VX_ZONE_ERROR: [tivxMemShared2PhysPtr:334] Invalid mem_heap_region -1662795120
[MCU2_0] 86.341556 s: VX_ZONE_ERROR: [tivxKernelImgMosaicMscDrvSubmit:1075] Failed to Submit Request: -2
[MCU2_0] 86.407941 s: VX_ZONE_ERROR: [tivxMemRegionTranslate:52] Invalid memtype
[MCU2_0] 86.407983 s: VX_ZONE_ERROR: [tivxMemShared2PhysPtr:334] Invalid mem_heap_region -1662795120
[MCU2_0] 86.408129 s: VX_ZONE_ERROR: [tivxMemRegionTranslate:52] Invalid memtype
[MCU2_0] 86.408156 s: VX_ZONE_ERROR: [tivxMemShared2PhysPtr:334] Invalid mem_heap_region -1662795120
[MCU2_0] 86.408197 s: VX_ZONE_ERROR: [tivxKernelImgMosaicMscDrvSubmit:1075] Failed to Submit Request: -2

```

Have I misunderstood how the mosaic node works?