Tool/software:
Hi TI experts,
We are trying to bring up camera, but capture node block and dequeue noting.
We can measure the correct mipi signal on J37 expansion using an oscilloscope, and we confirm that the register configuration is normal (the same register configuration can bring up normally on the VM EVM board)
Can you please help me to check my code and figure out something abnormal?
Camera parameters:
resolution:1280*1280
fps:30fps
datatype:yuv422(uyvy)
#include "app_capture_module.h"
#include <iss_sensors.h>
#include <iss_sensor_if.h>
#define MAX_FNAME (256)
static vx_status configure_capture_params(vx_context context, CaptureObj *captureObj, SensorObj *sensorObj)
{
vx_status status = VX_SUCCESS;
//vx_uint32 num_capt_instances = 0;
vx_int32 id, lane;
// int32_t ch_mask = sensorObj->ch_mask;
int indexId = 0;
int chIdx = 0;
if(status == VX_SUCCESS)
{
captureObj->capture_format = VX_DF_IMAGE_UYVY;
tivx_capture_params_init(&captureObj->params);
// if (captureObj->enable_error_detection || captureObj->test_mode)
// {
captureObj->params.timeout = 200;
captureObj->params.timeoutInitial = 500;
// }
captureObj->params.numInst = 1;
captureObj->params.numCh = 4;
for(id = 0; id < 1; id++)
{
captureObj->params.instId[id] = id;
captureObj->params.instCfg[id].enableCsiv2p0Support = (uint32_t)vx_true_e;
captureObj->params.instCfg[id].numDataLanes = 4;
//APP_PRINTF("captureObj->params.numDataLanes = %d \n", captureObj->params.instCfg[id].numDataLanes);
captureObj->params.instCfg[id].laneBandSpeed = TIVX_CAPTURE_LANE_BAND_SPEED_1040_TO_1200_MBPS;
chIdx = 0;
for (lane = 0; lane < captureObj->params.instCfg[id].numDataLanes; lane++)
{
captureObj->params.instCfg[id].dataLanesMap[lane] = lane + 1;
printf("zzzzzzzzzzzcaptureObj->params.dataLanesMap[%d] = %d \n",
lane,
captureObj->params.instCfg[id].dataLanesMap[lane]);
}
for (indexId = 0U; indexId < NUM_CAPT_CHANNELS; indexId++)
{
captureObj->params.chVcNum[chIdx] = indexId;
captureObj->params.chInstMap[chIdx] = id;
chIdx++;
}
}
captureObj->config = vxCreateUserDataObject(context, "tivx_capture_params_t", sizeof(tivx_capture_params_t), &captureObj->params);
status = vxGetStatus((vx_reference)captureObj->config);
}
if(status != VX_SUCCESS)
{
printf("[CAPTURE_MODULE] - Unable to create capture config object! \n");
}
else
{
vxSetReferenceName((vx_reference)captureObj->config, "capture_node_config");
}
return status;
}
static vx_status create_capture_output(vx_context context, CaptureObj *captureObj, SensorObj *sensorObj, int32_t bufq_depth)
{
vx_status status = VX_SUCCESS;
// IssSensor_CreateParams *sensorParams = &sensorObj->sensorParams;
vx_int32 q;
vx_image cap_yuv_image = vxCreateImage(context, 1280, 1280, VX_DF_IMAGE_UYVY);
status = vxGetStatus((vx_reference)cap_yuv_image);
if(status == VX_SUCCESS)
{
for(q = 0; q < bufq_depth; q++)
{
captureObj->raw_image_arr[q] = vxCreateObjectArray(context, (vx_reference)cap_yuv_image, 4);
status = vxGetStatus((vx_reference)captureObj->raw_image_arr[q]);
if(status != VX_SUCCESS)
{
printf("[CAPTURE-MODULE] Unable to create YUV image object array! \n");
break;
}
else
{
vx_char name[VX_MAX_REFERENCE_NAME];
snprintf(name, VX_MAX_REFERENCE_NAME, "capture_node_raw_image_arr_%d", q);
vxSetReferenceName((vx_reference)captureObj->raw_image_arr[q], name);
}
}
vxReleaseImage(&cap_yuv_image);
}
else
{
printf("[CAPTURE-MODULE] Unable to create YUV image object! \n");
}
// }
return status;
}
vx_status app_init_capture(vx_context context, CaptureObj *captureObj, SensorObj *sensorObj, char *objName, int32_t bufq_depth)
{
vx_status status = VX_SUCCESS;
status = configure_capture_params(context, captureObj, sensorObj);
if(status == VX_SUCCESS)
{
status = create_capture_output(context, captureObj, sensorObj, bufq_depth);
}
return (status);
}
vx_status app_create_graph_capture(vx_graph graph, CaptureObj *captureObj)
{
vx_status status = VX_SUCCESS;
captureObj->node = tivxCaptureNode(graph, captureObj->config, captureObj->raw_image_arr[0]);
status = vxGetStatus((vx_reference)captureObj->node);
if(status == VX_SUCCESS)
{
vxSetReferenceName((vx_reference)captureObj->node, "capture_node");
vxSetNodeTarget(captureObj->node, VX_TARGET_STRING, TIVX_TARGET_CAPTURE1);
if(captureObj->en_out_capture_write == 1)
{
status = app_create_graph_capture_write_output(graph, captureObj);
}
}
else
{
printf("[CAPTURE-MODULE] Unable to create capture node! \n");
}
return status;
}
/*
*
* Copyright (c) 2020 Texas Instruments Incorporated
*
* All rights reserved not granted herein.
*
* Limited License.
*
* Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
* license under copyrights and patents it now or hereafter owns or controls to make,
* have made, use, import, offer to sell and sell ("Utilize") this software subject to the
* terms herein. With respect to the foregoing patent license, such license is granted
* solely to the extent that any such patent is necessary to Utilize the software alone.
* The patent license shall not apply to any combinations which include this software,
* other than combinations with devices manufactured by or for TI ("TI Devices").
* No hardware patent is licensed hereunder.
*
* Redistributions must preserve existing copyright notices and reproduce this license
* (including the above copyright notice and the disclaimer and (if applicable) source
* code license limitations below) in the documentation and/or other materials provided
* with the distribution
*
* Redistribution and use in binary form, without modification, are permitted provided
* that the following conditions are met:
*
* * No reverse engineering, decompilation, or disassembly of this software is
* permitted with respect to any software provided in binary form.
*
* * any redistribution and use are licensed by TI for use only with TI Devices.
*
* * Nothing shall obligate TI to provide you with source code for the software
* licensed and provided to you in object code.
*
* If software source code is provided to you, modification and redistribution of the
* source code are permitted provided that the following conditions are met:
*
* * any redistribution and use of the source code, including any resulting derivative
* works, are licensed by TI for use only with TI Devices.
*
* * any redistribution and use of any object code compiled from the source code
* and any resulting derivative works, are licensed by TI for use only with TI Devices.
*
* Neither the name of Texas Instruments Incorporated nor the names of its suppliers
*
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* DISCLAIMER.
*
* THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <utils/draw2d/include/draw2d.h>
#include <utils/perf_stats/include/app_perf_stats.h>
#include <utils/console_io/include/app_get.h>
#include <utils/grpx/include/app_grpx.h>
#include <utils/hwa/include/app_hwa_api.h>
#include <VX/vx_khr_pipelining.h>
#include <TI/video_io_kernels.h>
#include "app_common.h"
#include "app_sensor_module.h"
#include "app_capture_module.h"
#include "app_obj_arr_split_module.h"
#include "app_viss_module.h"
#include "app_aewb_module.h"
#include "app_ldc_module.h"
#include "app_img_mosaic_module.h"
#include "app_display_module.h"
#include "app_test.h"
#define CAPTURE_BUFFER_Q_DEPTH (4)
#define APP_BUFFER_Q_DEPTH (4)
#define APP_PIPELINE_DEPTH (4)
//#define APP_TIVX_LOG_RT_ENABLE
typedef struct {
SensorObj sensorObj;
CaptureObj captureObj;
ObjArrSplitObj objArrSplitObj;
VISSObj vissObj;
AEWBObj aewbObj;
LDCObj ldcObj;
VISSObj vissObj1;
AEWBObj aewbObj1;
LDCObj ldcObj1;
ImgMosaicObj imgMosaicObj;
DisplayObj displayObj;
vx_char output_file_path[APP_MAX_FILE_PATH];
/* OpenVX references */
vx_context context;
vx_graph graph;
vx_int32 en_out_img_write;
vx_int32 test_mode;
vx_uint32 is_interactive;
vx_uint32 num_frames_to_run;
vx_uint32 num_frames_to_write;
vx_uint32 num_frames_to_skip;
tivx_task task;
vx_uint32 stop_task;
vx_uint32 stop_task_done;
app_perf_point_t total_perf;
app_perf_point_t fileio_perf;
app_perf_point_t draw_perf;
int32_t enable_ldc;
int32_t enable_viss;
int32_t enable_split_graph;
int32_t enable_aewb;
int32_t enable_mosaic;
int32_t pipeline;
int32_t enqueueCnt;
int32_t dequeueCnt;
int32_t write_file;
vx_uint32 enable_configure_hwa_freq;
vx_uint32 hwa_freq_config;
vx_uint32 bypass_split_graph;
} AppObj;
AppObj gAppObj;
//static void app_parse_cmd_line_args(AppObj *obj, vx_int32 argc, vx_char *argv[]);
static vx_status app_init(AppObj *obj);
static void app_deinit(AppObj *obj);
static vx_status app_create_graph(AppObj *obj);
static vx_status app_verify_graph(AppObj *obj);
static vx_status app_run_graph(AppObj *obj);
static vx_status app_run_graph_interactive(AppObj *obj);
static void app_delete_graph(AppObj *obj);
//static void app_default_param_set(AppObj *obj);
//static void app_update_param_set(AppObj *obj);
static void app_pipeline_params_defaults(AppObj *obj);
static void add_graph_parameter_by_node_index(vx_graph graph, vx_node node, vx_uint32 node_parameter_index);
//static vx_int32 calc_grid_size(vx_uint32 ch);
// static void set_img_mosaic_params(ImgMosaicObj *imgMosaicObj, vx_uint32 in_width, vx_uint32 in_height, vx_int32 numCh, ObjArrSplitObj *objArrSplitObj, int32_t enable_split_graph);
//static void app_draw_graphics(Draw2D_Handle *handle, Draw2D_BufInfo *draw2dBufInfo, uint32_t update_type);
// static void app_show_usage(vx_int32 argc, vx_char* argv[])
// {
// printf("\n");
// printf(" Camera Demo - (c) Texas Instruments 2020\n");
// printf(" ========================================================\n");
// printf("\n");
// printf(" Usage,\n");
// printf(" %s --cfg <config file>\n", argv[0]);
// printf("\n");
// }
static char menu[] = {
"\n"
"\n ========================="
"\n Demo : Camera Demo"
"\n ========================="
"\n"
"\n s: Save CSIx, VISS and LDC outputs"
"\n"
"\n p: Print performance statistics"
"\n"
"\n x: Exit"
"\n"
"\n Enter Choice: "
};
// static void app_run_task(void *app_var)
// {
// AppObj *obj = (AppObj *)app_var;
// vx_status status = VX_SUCCESS;
// while((!obj->stop_task) && (status == VX_SUCCESS))
// {
// status = app_run_graph(obj);
// }
// obj->stop_task_done = 1;
// }
static void app_run_task(void *app_var)
{
AppObj *obj = (AppObj *)app_var;
tivxTaskWaitMsecs(20000);
printf("111111111111111111111111111111111111111\n");
app_delete_graph(obj);
APP_PRINTF("App Delete Graph Done! \n");
app_deinit(obj);
APP_PRINTF("App De-init Done! \n");
}
static int32_t app_run_task_create(AppObj *obj)
{
tivx_task_create_params_t params;
vx_status status;
tivxTaskSetDefaultCreateParams(¶ms);
params.task_main = app_run_task;
params.app_var = obj;
obj->stop_task_done = 0;
obj->stop_task = 0;
status = tivxTaskCreate(&obj->task, ¶ms);
return status;
}
static void app_run_task_delete(AppObj *obj)
{
while(obj->stop_task_done==0)
{
tivxTaskWaitMsecs(100);
}
tivxTaskDelete(&obj->task);
}
static vx_status app_run_graph_interactive(AppObj *obj)
{
vx_status status;
uint32_t done = 0;
char ch;
FILE *fp;
app_perf_point_t *perf_arr[1];
status = app_run_task_create(obj);
if(status == VX_FAILURE)
{
printf("app_tidl: ERROR: Unable to create task\n");
}
else
{
appPerfStatsResetAll();
while(!done)
{
printf(menu);
ch = getchar();
printf("\n");
switch(ch)
{
case 'p':
appPerfStatsPrintAll();
status = tivx_utils_graph_perf_print(obj->graph);
appPerfPointPrint(&obj->fileio_perf);
appPerfPointPrint(&obj->total_perf);
printf("\n");
appPerfPointPrintFPS(&obj->total_perf);
appPerfPointReset(&obj->total_perf);
printf("\n");
vx_reference refs[1];
refs[0] = (vx_reference)obj->captureObj.raw_image_arr[0];
if (status == VX_SUCCESS)
{
status = tivxNodeSendCommand(obj->captureObj.node, 0u,
TIVX_CAPTURE_PRINT_STATISTICS,
refs, 1u);
}
break;
case 'e':
perf_arr[0] = &obj->total_perf;
fp = appPerfStatsExportOpenFile(".", "basic_demos_app_multi_cam");
if (NULL != fp)
{
appPerfStatsExportAll(fp, perf_arr, 1);
if (status == VX_SUCCESS)
{
status = tivx_utils_graph_perf_export(fp, obj->graph);
}
appPerfStatsExportCloseFile(fp);
appPerfStatsResetAll();
}
else
{
printf("fp is null\n");
}
break;
case 's':
obj->write_file = 1;
break;
case 'x':
obj->stop_task = 1;
done = 1;
break;
}
}
app_run_task_delete(obj);
}
return status;
}
vx_int32 app_multi_cam_main(vx_int32 argc, vx_char* argv[])
{
vx_status status = VX_SUCCESS;
AppObj *obj = &gAppObj;
if (status == VX_SUCCESS)
{
status = app_init(obj);
printf("app_init done !!! \n");
}
if(status == VX_SUCCESS)
{
APP_PRINTF("App Init Done! \n");
status = app_create_graph(obj);
if(status == VX_SUCCESS)
{
APP_PRINTF("App Create Graph Done! \n");
status = app_verify_graph(obj);
if(status == VX_SUCCESS)
{
APP_PRINTF("App Verify Graph Done! \n");
if (status == VX_SUCCESS)
{
status = app_run_graph(obj);
}
}
}
APP_PRINTF("App Run Graph Done! \n");
}
app_delete_graph(obj);
APP_PRINTF("App Delete Graph Done! \n");
app_deinit(obj);
APP_PRINTF("App De-init Done! \n");
if(obj->test_mode == 1)
{
if((vx_false_e == test_result) || (status != VX_SUCCESS))
{
printf("\n\nTEST FAILED\n\n");
print_new_checksum_structs();
status = (status == VX_SUCCESS) ? VX_FAILURE : status;
}
else
{
printf("\n\nTEST PASSED\n\n");
}
}
return status;
}
static vx_status app_init(AppObj *obj)
{
vx_status status = VX_SUCCESS;
if (status == VX_SUCCESS)
{
/* Create OpenVx Context */
obj->context = vxCreateContext();
status = vxGetStatus((vx_reference)obj->context);
APP_PRINTF("Creating context done!\n");
}
if (status == VX_SUCCESS)
{
tivxHwaLoadKernels(obj->context);
tivxExtLoadKernels(obj->context);
tivxVideoIOLoadKernels(obj->context);
tivxImagingLoadKernels(obj->context);
tivxFileIOLoadKernels(obj->context);
APP_PRINTF("Kernel loading done!\n");
}
/* Initialize modules */
if (status == VX_SUCCESS)
{
//app_serdes_sensor();
// app_init_sensor(&obj->sensorObj, "sensor_obj");
}
if (status == VX_SUCCESS)
{
APP_PRINTF("Sensor init done!\n");
status = app_init_capture(obj->context, &obj->captureObj, &obj->sensorObj, "capture_obj", CAPTURE_BUFFER_Q_DEPTH);
}
return status;
}
static void app_deinit(AppObj *obj)
{
app_deinit_capture(&obj->captureObj, CAPTURE_BUFFER_Q_DEPTH);
APP_PRINTF("Capture deinit done!\n");
appGrpxDeInit();
tivxHwaUnLoadKernels(obj->context);
tivxExtUnLoadKernels(obj->context);
tivxVideoIOUnLoadKernels(obj->context);
tivxImagingUnLoadKernels(obj->context);
tivxFileIOUnLoadKernels(obj->context);
APP_PRINTF("Kernels unload done!\n");
vxReleaseContext(&obj->context);
APP_PRINTF("Release context done!\n");
}
static void app_delete_graph(AppObj *obj)
{
#ifdef APP_TIVX_LOG_RT_ENABLE
tivxLogRtTraceExportToFile("app_multicam.bin");
tivxLogRtTraceDisable(obj->graph);
#endif
app_delete_capture(&obj->captureObj);
APP_PRINTF("Capture delete done!\n");
vxReleaseGraph(&obj->graph);
APP_PRINTF("Graph delete done!\n");
}
static vx_status app_create_graph(AppObj *obj)
{
vx_status status = VX_SUCCESS;
vx_graph_parameter_queue_params_t graph_parameters_queue_params_list[2] = {0};
vx_int32 graph_parameter_index;
obj->graph = vxCreateGraph(obj->context);
status = vxGetStatus((vx_reference)obj->graph);
if (status == VX_SUCCESS)
{
status = vxSetReferenceName((vx_reference)obj->graph, "app_multi_cam_graph");
APP_PRINTF("Graph create done!\n");
}
if(status == VX_SUCCESS)
{
status = app_create_graph_capture(obj->graph, &obj->captureObj);
APP_PRINTF("Capture graph done!\n");
}
if(status == VX_SUCCESS)
{
graph_parameter_index = 0;
add_graph_parameter_by_node_index(obj->graph, obj->captureObj.node, 1);
obj->captureObj.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 = CAPTURE_BUFFER_Q_DEPTH;
graph_parameters_queue_params_list[graph_parameter_index].refs_list = (vx_reference*)&obj->captureObj.raw_image_arr[0];
graph_parameter_index++;
status = vxSetGraphScheduleConfig(obj->graph,
VX_GRAPH_SCHEDULE_MODE_QUEUE_AUTO,
graph_parameter_index,
graph_parameters_queue_params_list);
if (status == VX_SUCCESS)
{
status = tivxSetGraphPipelineDepth(obj->graph, APP_PIPELINE_DEPTH);
}
status = vxRegisterEvent((vx_reference)obj->graph, VX_EVENT_GRAPH_PARAMETER_CONSUMED, obj->captureObj.graph_parameter_index, obj->captureObj.graph_parameter_index);
}
return status;
}
static vx_status app_verify_graph(AppObj *obj)
{
vx_status status = VX_SUCCESS;
// // register events for svcamera unplug
//status = vxRegisterEvent((vx_reference)obj->captureObj.node, VX_EVENT_NODE_ERROR, 5 ,6);
status = vxVerifyGraph(obj->graph);
tivxTaskWaitMsecs(100);
//status = vxRegisterEvent((vx_reference)graph0Obj->captureObj.node, VX_EVENT_NODE_ERROR, 5 ,6);
/* Allocating black frame for HOTPLUG*/
// vx_bool is_invalid;
// vx_pixel_value_t init_val;
// init_val.YUV[0] = 0U;
// init_val.YUV[1] = 128U;
// init_val.YUV[2] = 128U;
// obj->captureObj.black_image = vxCreateUniformImage(obj->context, 1280, 1280, VX_DF_IMAGE_UYVY, &init_val);
// tivxCaptureRegisterErrorFrame(obj->captureObj.node, (vx_reference)obj->captureObj.black_image);
// vxQueryReference((vx_reference)obj->captureObj.black_image, TIVX_REFERENCE_INVALID, &is_invalid, sizeof(is_invalid));
// vxEnableEvents(obj->context);
if(status == VX_SUCCESS)
{
APP_PRINTF("Graph verify done!\n");
}
/* wait a while for prints to flush */
tivxTaskWaitMsecs(100);
return status;
}
static vx_status app_run_graph_for_one_frame_pipeline(AppObj *obj, vx_int32 frame_id)
{
vx_status status = VX_SUCCESS;
vx_image frame_cap;
vx_uint32 num_refs;
static vx_uint64 nFrameId = 0;
static vx_uint64 nLastFrameId = 0;
static vx_uint64 nTime = 0;
static vx_uint64 nLastTime = 0;
vx_event_t event;
printf("app_run_graph_for_one_frame_pipeline in pipeline is [%d]!\n", obj->pipeline);
if(obj->pipeline < 0) {
if(status == VX_SUCCESS) {
status = vxGraphParameterEnqueueReadyRef(obj->graph, obj->captureObj.graph_parameter_index, (vx_reference*)&obj->captureObj.raw_image_arr[APP_PIPELINE_DEPTH + obj->pipeline], 1);
}
obj->pipeline++;
} else if(obj->pipeline >= 0) {
printf("app_run_graph_for_one_frame_pipeline 1111111111!\n");
vxWaitEvent(obj->context, &event, vx_false_e);
if(event.app_value == obj->captureObj.graph_parameter_index) {
vxGraphParameterDequeueDoneRef(obj->graph, obj->captureObj.graph_parameter_index, (vx_reference*)&frame_cap, 1, &num_refs);
vxGraphParameterEnqueueReadyRef(obj->graph, obj->captureObj.graph_parameter_index, (vx_reference*)&frame_cap, 1);
}
printf("app_run_graph_for_one_frame_pipeline !\n");
nTime = tivxPlatformGetTimeInUsecs();
if (nTime - nLastTime >= 10000000) {
APP_PRINTF("----------capture frame rate: %.2f\n", (nFrameId - nLastFrameId)*1000000.0/(nTime - nLastTime));
nLastFrameId = nFrameId;
nLastTime = nTime;
}
nFrameId++;
}
return status;
}
static vx_status app_run_graph(AppObj *obj)
{
vx_status status = VX_SUCCESS;
SensorObj *sensorObj = &obj->sensorObj;
vx_int32 frame_id;
int32_t ch_mask = obj->sensorObj.ch_mask;
app_pipeline_params_defaults(obj);
APP_PRINTF("app_pipeline_params_defaults returned\n");
if(NULL == sensorObj->sensor_name)
{
printf("sensor name is NULL \n");
return VX_FAILURE;
}
app_serdes_sensor();
obj->num_frames_to_run = 0xffffffff;
for(frame_id = 0; frame_id < obj->num_frames_to_run; frame_id++)
{
if (status == VX_SUCCESS)
{
status = app_run_graph_for_one_frame_pipeline(obj, frame_id);
}
/* user asked to stop processing */
if(obj->stop_task)
break;
}
if (status == VX_SUCCESS)
{
status = vxWaitGraph(obj->graph);
}
obj->stop_task = 1;
if (status == VX_SUCCESS)
{
status = appStopImageSensor(obj->sensorObj.sensor_name, ch_mask);
}
return status;
}
static void app_pipeline_params_defaults(AppObj *obj)
{
obj->pipeline = -CAPTURE_BUFFER_Q_DEPTH;
obj->enqueueCnt = 0;
obj->dequeueCnt = 0;
}
/*
* Utility API used to add a graph parameter from a node, node parameter index
*/
static void add_graph_parameter_by_node_index(vx_graph graph, vx_node node, vx_uint32 node_parameter_index)
{
vx_parameter parameter = vxGetParameterByIndex(node, node_parameter_index);
vxAddParameterToGraph(graph, parameter);
vxReleaseParameter(¶meter);
}
Regards.

