Dear Sir,
Continuing the queries related to the existing thread
I am keeping AVP3 as a reference as the capture node is not present in my application due to the dependencies explained earlier.
I am facing the issues listed below in logs
12.945445 s: VX_ZONE_ERROR:[ownReleaseReferenceInt:307] Invalid reference
12.945469 s: VX_ZONE_ERROR:[ownReleaseReferenceInt:307] Invalid reference
12.945491 s: VX_ZONE_ERROR:[ownReleaseReferenceInt:307] Invalid reference
12.945514 s: VX_ZONE_ERROR:[ownReleaseReferenceInt:307] Invalid reference
12.945536 s: VX_ZONE_ERROR:[ownReleaseReferenceInt:307] Invalid reference
12.945560 s: VX_ZONE_ERROR:[ownReleaseReferenceInt:307] Invalid reference
12.945583 s: VX_ZONE_ERROR:[ownReleaseReferenceInt:307] Invalid reference
12.945605 s: VX_ZONE_ERROR:[ownReleaseReferenceInt:307] Invalid reference
12.946421 s: VX_ZONE_WARNING:[vxReleaseContext:1012] Found a reference 105e0988 of type 00000813 at external count 1, internal count t
12.946463 s: VX_ZONE_WARNING:[vxReleaseContext:1015] Unreleased reference name = object_array_107
12.946491 s: VX_ZONE_WARNING:[vxReleaseContext:1017] Releasing reference now as a part of garbage collection
12.946698 s: VX_ZONE_WARNING:[vxReleaseContext:1012] Found a reference 1058f598 of type 0000080f at external count 1, internal count t
12.946736 s: VX_ZONE_WARNING:[vxReleaseContext:1015] Unreleased reference name = image_108
12.946763 s: VX_ZONE_WARNING:[vxReleaseContext:1017] Releasing reference now as a part of garbage collection
12.946841 s: VX_ZONE_WARNING:[vxReleaseContext:1012] Found a reference 105e0b28 of type 00000813 at external count 1, internal count t
12.946879 s: VX_ZONE_WARNING:[vxReleaseContext:1015] Unreleased reference name = object_array_112
12.946906 s: VX_ZONE_WARNING:[vxReleaseContext:1017] Releasing reference now as a part of garbage collection
12.947109 s: VX_ZONE_WARNING:[vxReleaseContext:1012] Found a reference 10590078 of type 0000080f at external count 1, internal count t
12.947149 s: VX_ZONE_WARNING:[vxReleaseContext:10+-----------------------------+ image_113
13.081645 s: VX_ZONE_WARNING:[vxReleaseContext:10| |a part of garbage collection
13.081743 s: VX_ZONE_WARNING:[vxReleaseContext:10| Cannot open /dev/ttyUSB0! |of type 00000813 at external count 1, internal count t
13.081784 s: VX_ZONE_WARNING:[vxReleaseContext:10| | object_array_117
13.081813 s: VX_ZONE_WARNING:[vxReleaseContext:10+-----------------------------+a part of garbage collection
13.082016 s: VX_ZONE_WARNING:[vxReleaseContext:1012] Found a reference 10590b58 of type 0000080f at external count 1, internal count t
13.082055 s: VX_ZONE_WARNING:[vxReleaseContext:1015] Unreleased reference name = image_118
13.082082 s: VX_ZONE_WARNING:[vxReleaseContext:1017] Releasing reference now as a part of garbage collection
13.082157 s: VX_ZONE_WARNING:[vxReleaseContext:1012] Found a reference 105e0e68 of type 00000813 at external count 1, internal count t
13.082194 s: VX_ZONE_WARNING:[vxReleaseContext:1015] Unreleased reference name = object_array_122
13.082221 s: VX_ZONE_WARNING:[vxReleaseContext:1017] Releasing reference now as a part of garbage collection
13.082423 s: VX_ZONE_WARNING:[vxReleaseContext:1012] Found a reference 10591638 of type 0000080f at external count 1, internal count t
13.082461 s: VX_ZONE_WARNING:[vxReleaseContext:1015] Unreleased reference name = image_123
13.082488 s: VX_ZONE_WARNING:[vxReleaseContext:1017] Releasing reference now as a part of garbage collection
target from daemon mode
Application Exited 13.217309 s: VX_ZONE_INIT:[tivxHostDeInit:56] De-Initialization Done for HOST !!!
13.224824 s: VX_ZONE_INIT:[tivxDeInit:111] De-Initialization Done !!!
I am passing the input in the object array converted from the vx_image buffer[4] in a similar way as passed in the AVP3 application.
Current pipeline ( for testing purposes)
vx_object_arrray(getting from other application) - > LDC Node
below are the changes done for your reference
Buffers defined:
typedef struct {
vx_object_array myarr[HKL_APP_MAX_BUFQ_DEPTH];
vx_uint32 width;
vx_uint32 height;
} InputObj;Below defined in AppObj Structure
InputObj input;
vx_image myinput_images[HKL_APP_MAX_BUFQ_DEPTH];
Allocation
static void app_create_input_buffer(AppObj* obj, vx_uint32 w, vx_uint32 h, vx_df_image format)
{
// Create input image object
vx_image input = vxCreateImage(obj->context, w, h, format);
vx_status status = vxGetStatus((vx_reference)input);
if(status == VX_SUCCESS)
{
vx_int32 q;
for(q = 0; q < APP_BUFFER_Q_DEPTH; q++)
{
obj->input.myarr[q]= vxCreateObjectArray(obj->context, (vx_reference)input, 4); //added
status = vxGetStatus((vx_reference)obj->input.myarr[q]);
if(status == VX_FAILURE)
{
APP_PRINTF("Camera Daemon Multi-Buffer Allocation: Unable to create object array of depth=%d at idx = %d\n", 4, q);
}
obj->myinput_images[q] = (vx_image)vxGetObjectArrayItem((vx_object_array)obj->input.myarr[q], 0);
}
vxReleaseImage(&input);
}
}
For pipeline
status = add_graph_param_by_node_index(obj->graph, obj->ldcObj.node, 0);
obj->ldcObj.graph_parameter_index = graph_parameter_index;
graph_parameters_queue_params_list[graph_parameter_index].graph_parameter_index = graph_parameter_index;
graph_parameters_queue_params_list[graph_parameter_index].refs_list_size = APP_BUFFER_Q_DEPTH;
graph_parameters_queue_params_list[graph_parameter_index].refs_list = (vx_reference*)&obj->myinput_images[0];
graph_parameter_index++;
One Frame Pipeline code
static vx_status app_run_graph_for_one_frame_pipeline_cam_buffer(AppObj *obj, vx_uint32* frame_id, vx_uint32 frame_last)
{
if (obj->pipeline <= 0)
{
fill_ObjectArray(obj->cdc.last_images,obj->input.myarr,1); //function to convert vx_image buff[4] to Object Array
}
/* Enqueue inputs during pipeup dont execute */
status = vxGraphParameterEnqueueReadyRef(obj->graph, obj->ldcObj.graph_parameter_index, (vx_reference*)&obj->myinput_images[obj->enqueueCnt], 1);
obj->enqueueCnt++;
obj->enqueueCnt = (obj->enqueueCnt >= APP_BUFFER_Q_DEPTH)? 0 : obj->enqueueCnt;
obj->pipeline++;
enqueueCount++;
}
if (obj->pipeline > 0)
{
vx_image capture_input_image;
uint32_t num_refs;
vx_bool enqueueNext = vx_true_e;
/* Dequeue input */
status = vxGraphParameterDequeueDoneRef(obj->graph, obj->ldcObj.graph_parameter_index, (vx_reference*)&capture_input_image, 1, &num_refs);
app_find_object_array_indexes(obj->input.myarr, (vx_reference)capture_input_image, 4, &obj_array_idx);
if((obj_array_idx != -1) && (status == VX_SUCCESS))
{
fill_ObjectArray(obj->cdc.last_images,obj->input.myarr,1);
/* Enqueue input - start execution */
status = vxGraphParameterEnqueueReadyRef(obj->graph, obj->ldcObj.graph_parameter_index, (vx_reference*)&capture_input_image, 1);
obj->enqueueCnt++;
obj->dequeueCnt++;
obj->enqueueCnt = (obj->enqueueCnt >= APP_BUFFER_Q_DEPTH)? 0 : obj->enqueueCnt;
obj->dequeueCnt = (obj->dequeueCnt >= APP_BUFFER_Q_DEPTH)? 0 : obj->dequeueCnt;
}
}
return status;
}
Please let me know, what could be the reason for the error log.
Thanks and Regards,
Vyom Mishra