From 5aa2116609f9fea43cfb160831825f9cf1ef6116 Mon Sep 17 00:00:00 2001 From: Brandon Maciel Date: Wed, 14 Dec 2022 17:09:50 -0600 Subject: [PATCH] modules: ldc: viss: added support for ISP live tuning CMakeLists: added build flag for ISP live tuning added ISP live tuning initialization to LDC and VISS modules and added build option for enabling/disabling live tuning. --- CMakeLists.txt | 7 ++++++- include/tiovx_modules_common.h | 6 ++++++ src/tiovx_ldc_module.c | 15 +++++++++++++++ src/tiovx_viss_module.c | 15 +++++++++++++++ 4 files changed, 42 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62eca77..7e1b83b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,8 @@ build_lib(${PROJECT_NAME} # Named argument: library name add_subdirectory(test) -option(INSTALL_SRC "Install src under /opt" OFF) +option(INSTALL_SRC "Install src under /opt" OFF) +option(ENABLE_DCC_TOOL "Enable DCC Tuning Tool Support" OFF) if (INSTALL_SRC) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ @@ -47,3 +48,7 @@ if (INSTALL_SRC) PATTERN "*/data*" EXCLUDE PATTERN "*/.git*" EXCLUDE) endif() + +if(ENABLE_DCC_TOOL) +add_definitions(-DENABLE_DCC_TOOL) +endif() diff --git a/include/tiovx_modules_common.h b/include/tiovx_modules_common.h index ef7d49e..bda015a 100644 --- a/include/tiovx_modules_common.h +++ b/include/tiovx_modules_common.h @@ -101,6 +101,12 @@ extern "C" { #define TIOVX_MODULE_ERROR(f_, ...) printf("[ERROR] %d: %s: "f_, __LINE__, __func__, ##__VA_ARGS__) +typedef enum { + VISS = 0, + AEWB, + LDC, +} EDGEAI_NODES; + typedef struct { vx_object_array arr[TIOVX_MODULES_MAX_BUFQ_DEPTH]; tivx_raw_image image_handle[TIOVX_MODULES_MAX_BUFQ_DEPTH]; diff --git a/src/tiovx_ldc_module.c b/src/tiovx_ldc_module.c index a35afdf..1c35b5d 100644 --- a/src/tiovx_ldc_module.c +++ b/src/tiovx_ldc_module.c @@ -496,6 +496,17 @@ vx_status tiovx_ldc_module_init(vx_context context, TIOVXLDCModuleObj *obj, Sens status = tiovx_ldc_module_create_outputs(context, obj); } +#if defined(ENABLE_DCC_TOOL) + if((vx_status)VX_SUCCESS == status) + { + status = itt_register_object(context, + &(obj->node), + NULL, + NULL, + LDC); + } +#endif + return (status); } @@ -678,6 +689,10 @@ vx_status tiovx_ldc_module_create(vx_graph graph, TIOVXLDCModuleObj *obj, vx_obj status = tiovx_ldc_module_add_write_output_node(graph, obj); } +#if defined(ENABLE_DCC_TOOL) + status = itt_server_edge_ai_init(); +#endif + return status; } diff --git a/src/tiovx_viss_module.c b/src/tiovx_viss_module.c index 0ae19f6..8f6acbc 100644 --- a/src/tiovx_viss_module.c +++ b/src/tiovx_viss_module.c @@ -646,6 +646,17 @@ vx_status tiovx_viss_module_init(vx_context context, TIOVXVISSModuleObj *obj, Se status = tiovx_viss_module_create_outputs(context, obj); } +#if defined(ENABLE_DCC_TOOL) + if((vx_status)VX_SUCCESS == status) + { + status = itt_register_object(context, + &(obj->node), + &(obj->input.image_handle[0]), + &(obj->output2.image_handle[0]), + VISS); + } +#endif + return (status); } @@ -1003,6 +1014,10 @@ vx_status tiovx_viss_module_create(vx_graph graph, TIOVXVISSModuleObj *obj, vx_o status = tiovx_viss_module_add_write_output_node(graph, obj); } +#if defined(ENABLE_DCC_TOOL) + status = itt_server_edge_ai_init(); +#endif + return status; }