diff --git a/.github/workflows/build-tests.yml b/.github/workflows/build-tests.yml deleted file mode 100644 index 7f1061a6..00000000 --- a/.github/workflows/build-tests.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Build tests - -on: - push: - branches: - - main - - pull_request: - -jobs: - build-ipu6ep: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v2 - - - name: Build for ipu6ep - run: | - sudo apt-get update -q -q - sudo apt-get install git cmake libexpat-dev automake libtool libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev --yes - git clone https://github.com/intel/ipu6-camera-bins -b main --depth 1 - sudo cp -rv ipu6-camera-bins/ipu6ep/include/* /usr/include/ - sudo cp -rv ipu6-camera-bins/ipu6ep/lib/* /usr/lib/ - rm -fr ipu6-camera-bins - mkdir -p ./build/out/install/usr && cd ./build/ - cmake -DCMAKE_BUILD_TYPE=Release \ - -DIPU_VER=ipu6ep \ - -DENABLE_VIRTUAL_IPU_PIPE=OFF \ - -DUSE_PG_LITE_PIPE=ON \ - -DUSE_STATIC_GRAPH=OFF \ - -DCMAKE_INSTALL_PREFIX=/usr .. - make - sudo make install - build-ipu6: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v2 - - - name: Build for ipu6 - run: | - sudo apt-get update -q -q - sudo apt-get install git cmake libexpat-dev automake libtool libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev --yes - git clone https://github.com/intel/ipu6-camera-bins -b main --depth 1 - sudo cp -rv ipu6-camera-bins/ipu6/include/* /usr/include/ - sudo cp -rv ipu6-camera-bins/ipu6/lib/* /usr/lib/ - rm -fr ipu6-camera-bins - mkdir -p ./build/out/install/usr && cd ./build/ - cmake -DCMAKE_BUILD_TYPE=Release \ - -DIPU_VER=ipu6 \ - -DENABLE_VIRTUAL_IPU_PIPE=OFF \ - -DUSE_PG_LITE_PIPE=ON \ - -DUSE_STATIC_GRAPH=OFF \ - -DCMAKE_INSTALL_PREFIX=/usr .. - make - sudo make install diff --git a/CMakeLists.txt b/CMakeLists.txt index a930febd..a4f50689 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2017-2022 Intel Corporation +# Copyright (C) 2017-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,8 +18,12 @@ cmake_minimum_required(VERSION 2.8) project(libcamhal) +option(BUILD_CAMHAL_PLUGIN "Build libcamhal as plugins" OFF) +option(BUILD_CAMHAL_ADAPTOR "Build hal_adaptor as libcamhal" OFF) -#---------------------------- Fold settings ---------------------------- +#------------------------- Global settings ------------------------- + +#------------------------- folder settings ------------------------- # Source directories set(SRC_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/src) @@ -29,6 +33,7 @@ set(CORE_DIR ${SRC_ROOT_DIR}/core) set(HAL_DIR ${SRC_ROOT_DIR}/hal) set(IIO_DIR ${SRC_ROOT_DIR}/iio) set(IUTILS_DIR ${SRC_ROOT_DIR}/iutils) +set(SCHEDULER_DIR ${SRC_ROOT_DIR}/scheduler) set(METADATA_DIR ${SRC_ROOT_DIR}/metadata) set(PLATFORMDATA_DIR ${SRC_ROOT_DIR}/platformdata) set(V4L2_DIR ${SRC_ROOT_DIR}/v4l2) @@ -51,8 +56,8 @@ endif() #SUPPORT_LIVE_TUNING # ia_cipr is only used by psysprocessor if (USE_PG_LITE_PIPE) -set(IA_CIPR_DIR ${MODULES_DIR}/ia_cipr) -set(MODULE_IA_CSS_DIR ${MODULES_DIR}/ia_css) + set(IA_CIPR_DIR ${MODULES_DIR}/ia_cipr) + set(MODULE_IA_CSS_DIR ${MODULES_DIR}/ia_css) endif() #USE_PG_LITE_PIPE # CMake module directory @@ -64,14 +69,25 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}" CACHE PATH "Target location for install command." FORCE) endif() -message(STATUS "install prefix: " ${CMAKE_INSTALL_PREFIX}) - -#------------------------- Compilation settings ------------------------- +#------------------------- compile and link options ------------------------- include(GNUInstallDirs) +# code coverage. +include(code-coverage) -# -fPIC in xos way -set(CMAKE_POSITION_INDEPENDENT_CODE ON) +message(STATUS "install prefix: " ${CMAKE_INSTALL_PREFIX}) + +set (CMAKE_CXX_STANDARD 11) +add_compile_options( + -Wall + -Werror + -fstack-protector + -fPIE + -fPIC + -DDCHECK_ALWAYS_ON + -Wformat + -Wformat-security +) include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG(-faligned-new COMPILER_SUPPORTS_ALIGNED_NEW) @@ -79,83 +95,106 @@ if (COMPILER_SUPPORTS_ALIGNED_NEW) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -faligned-new") endif() -set (CMAKE_CXX_STANDARD 11) -add_compile_options(-Wall -Werror - -fstack-protector - -fPIE -fPIC - -D_FORTIFY_SOURCE=2 - -DDCHECK_ALWAYS_ON - -Wformat -Wformat-security - ) -# code coverage. -include(code-coverage) - -add_definitions(-D__STDC_FORMAT_MACROS - -DHAVE_PTHREADS - -DHAVE_LINUX_OS - -DHAVE_IA_TYPES - -DHAVE_PRCTL - ) - -if (USE_PG_LITE_PIPE) - add_definitions(-DUSE_PG_LITE_PIPE) -endif() #USE_PG_LITE_PIPE +set (THREADS_PREFER_PTHREAD_FLAG ON) +find_package (Threads REQUIRED) -if (CAL_BUILD) - message("Chrome enabled ") - add_definitions(-DCAL_BUILD) - add_definitions(-DDUMP_IMAGE) +# check if _FORTIFY_SOURCE is default defined with -O +include(CheckFortifyLevel) +set(FORTIFY_SOURCE_VALUE) +check_fortify_source(FORTIFY_SOURCE_VALUE) +if(FORTIFY_SOURCE_VALUE) + message(STATUS "compiler default _FORTIFY_SOURCE=${FORTIFY_SOURCE_VALUE}") else() - add_definitions(-DSUPPORT_MULTI_PROCESS) - add_definitions(-DLINUX_BUILD) -endif() #CAL_BUILD + message(STATUS "_FORTIFY_SOURCE is not defined or could not be determined.") + add_compile_options(-D_FORTIFY_SOURCE=2) + message(STATUS "define _FORTIFY_SOURCE=2") +endif() -if (FACE_DETECTION) - add_definitions(-DFACE_DETECTION) -endif() #FACE_DETECTION +add_link_options( + -fPIE + -fPIC + -Wformat + -Wformat-security + -Wl,-z,relro + -Wl,-z,now + -Wl,--no-as-needed + -Wl,--no-undefined +) -# IPU6_FEATURE_S -if (IPU_VER MATCHES "ipu6") - add_definitions(-DIPU_SYSVER_IPU6) -endif() -# IPU6_FEATURE_E +# -fPIC in xos way +set(CMAKE_POSITION_INDEPENDENT_CODE ON) -# IPU6_SE_FEATURE_S -if ("${IPU_VER}" STREQUAL "ipu6sepla") - add_definitions(-DIPU_SYSVER_ipu6v3) -endif() -# IPU6_SE_FEATURE_E +#------------------- common definitions, includes and link -------------------- -if ("${IPU_VER}" STREQUAL "ipu6ep") - message(INFO "add definition -DIPU_SYSVER_ipu6v5 for ipu6ep") - add_definitions(-DIPU_SYSVER_ipu6v5) -endif() +add_definitions(-D__STDC_FORMAT_MACROS -DHAVE_PTHREADS -DHAVE_LINUX_OS -DHAVE_IA_TYPES -DHAVE_PRCTL) -if ("${IPU_VER}" STREQUAL "ipu6epmtl") - message(INFO "add definition -DIPU_SYSVER_ipu6v6 for ipu6ep") - add_definitions(-DIPU_SYSVER_ipu6v6) -endif() +include_directories( + include + include/api include/utils + ${CMAKE_INSTALL_PREFIX}/include/ia_camera + ${CMAKE_INSTALL_PREFIX}/include/ + ${CMAKE_CURRENT_LIST_DIR} + src + src/v4l2 src/core src/metadata + src/platformdata src/platformdata/gc + src/3a src/3a/intel3a src/3a/external + src/fd src/scheduler + src/core/psysprocessor + src/image_process +) -include_directories(include - include/api include/utils - ${CMAKE_CURRENT_LIST_DIR} - src - src/v4l2 src/core src/metadata - src/platformdata src/platformdata/gc - src/3a src/3a/intel3a src/3a/external - src/fd - src/core/psysprocessor - src/image_process - ) - -set(LIBCAMHAL_LD_FLAGS "-fPIE -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wl,-z,relro -Wl,-z,now") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LIBCAMHAL_LD_FLAGS}") +set(LIBCAMHAL_LINK_LIBS ${LIBCAMHAL_LINK_LIBS} ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT} expat rt) add_subdirectory(src) add_subdirectory(modules) -# Set source files +if (USE_PG_LITE_PIPE) + add_definitions(-DUSE_PG_LITE_PIPE) +endif() #USE_PG_LITE_PIPE + + set(LIBCAMHAL_SRCS ${LIBCAMHAL_SRCS} ${IIO_SRCS}) + +if (SUPPORT_LIVE_TUNING) + include_directories(modules/livetune) + set(LIBCAMHAL_SRCS ${LIBCAMHAL_SRCS} ${LIVE_TUNING_SRCS}) +endif() #SUPPORT_LIVE_TUNING + +if(FACE_DETECTION) + add_definitions(-DFACE_DETECTION) + set(LIBCAMHAL_SRCS ${LIBCAMHAL_SRCS} ${FACE_DETECTION_SRCS}) + set(LIBCAMHAL_LINK_LIBS + ${LIBCAMHAL_LINK_LIBS} + pvl_eye_detection + pvl_face_detection + pvl_mouth_detection + ${WORK_DIR_TMP}/src/fd/libface_detection.a + ) +endif() #FACE_DETECTION + +if(ENABLE_SANDBOXING) + find_package(LIBMOJO) + find_package(LIBCAMERA_IPC) + find_package(LIBCAB) + add_definitions(-DENABLE_SANDBOXING) + set(LIBCAMHAL_SRCS ${LIBCAMHAL_SRCS} ${SANDBOXING_CLIENT_SRCS}) + include_directories( + ${USR_INCLUDE_HEADER}/base-${BASEVER} + ${LIBMOJO_INCLUDE_DIRS} + ${LIBCAMERA_IPC_INCLUDE_DIRS} + ${LIBCAB_INCLUDE_DIRS} + ) + link_directories( + ${CMAKE_PREFIX_PATH} + ${LIBMOJO_LIBS} + ${LIBCAMERA_IPC_LIBS} + ${LIBCAB_LIBS} + ) + set(LIBCAMHAL_LINK_LIBS ${LIBCAMHAL_LINK_LIBS} ${LIBCAB_LIBS} ${LIBMOJO_LIBS} ${LIBCAMERA_IPC_LIBS} ${CMAKE_PREFIX_PATH}/librt.a) +endif() #ENABLE_SANDBOXING + if (CAL_BUILD) + message("Chrome enabled ") + add_definitions(-DCAL_BUILD -DDUMP_IMAGE) if (SW_JPEG_ENCODE) add_definitions(-DSW_JPEG_ENCODE) include_directories(src/jpeg/sw) @@ -171,40 +210,51 @@ if (CAL_BUILD) add_subdirectory(aal) - set(LIBCAMHAL_SRCS - ${LIBCAMHAL_SRCS} - ${MEMORY_SRCS} - ${AAL_SRCS} - ${JPEG_SRCS} - ) + set(LIBCAMHAL_SRCS ${LIBCAMHAL_SRCS} ${MEMORY_SRCS} ${AAL_SRCS} ${JPEG_SRCS}) include_directories(include include/api include/utils include/linux - ${USR_INCLUDE_HEADER}/android/system/core/include/ - ${USR_INCLUDE_HEADER}/ia_imaging - ${USR_INCLUDE_HEADER}/lib${IPU_VER} - ${USR_INCLUDE_HEADER}/android/hardware/libhardware/include/ - aal aal/chrome src/iutils src/jpeg - modules/memory modules/memory/chrome + ${USR_INCLUDE_HEADER}/android/system/core/include/ + ${USR_INCLUDE_HEADER}/ia_imaging + ${USR_INCLUDE_HEADER}/usr/lib${IPU_VER} + ${USR_INCLUDE_HEADER}/android/hardware/libhardware/include/ + aal aal/chrome src/iutils src/jpeg + modules/memory modules/memory/chrome + ) + find_package(LIBCAMERA_CLIENT) + find_package(LIBCAMERA_COMMON) + find_package(LIBCAMERA_METADATA) + find_package(LIBCAMERA_V4L2_DEVICE) + find_package(LIBSYNC) + find_package(LIBCBM) + + include_directories(${LIBCAMERA_CLIENT_INCLUDE_DIRS} ${LIBCAMERA_COMMON_INCLUDE_DIRS} + ${LIBCAMERA_METADATA_INCLUDE_DIRS} ${LIBCAMERA_V4L2_DEVICE_INCLUDE_DIRS} + ${LIBSYNC_INCLUDE_DIRS} + ${LIBCBM_INCLUDE_DIRS} ) -endif() #CAL_BUILD + link_directories(${CMAKE_PREFIX_PATH} ${LIBCAMERA_CLIENT_LIBS} ${LIBCAMERA_METADATA_LIBS} + ${LIBCAMERA_COMMON_LIBS} ${LIBSYNC_LIBS} + ${LIBCBM_LIBS} + ) -if (SUPPORT_LIVE_TUNING) - set(LIBCAMHAL_SRCS ${LIVE_TUNING_SRCS}) - include_directories(modules/livetune) -endif() #SUPPORT_LIVE_TUNING + set(LIBCAMHAL_LINK_LIBS ${LIBCAMHAL_LINK_LIBS} ${LIBCAMERA_CLIENT_LIBS} ${LIBCAMERA_COMMON_LIBS} + ${LIBCAMERA_METADATA_LIBS} ${LIBCAMERA_V4L2_DEVICE_LIBS} + ${LIBSYNC_LIBS} jpeg ${CMAKE_PREFIX_PATH}/libyuv.pic.a + ${LIBCBM_LIBS} camera_v4l2_device + ) +endif() #CAL_BUILD -if (USE_PG_LITE_PIPE) -add_subdirectory(${MODULE_IA_CSS_DIR}) -include_directories(${MODULE_IA_CSS_HEADER_INCLUDE_DIR}) -set(LIBCAMHAL_SRCS ${LIBCAMHAL_SRCS} ${MODULE_IA_CSS_SRC}) - -# suppress modules/ia_css .c code compiling error -include(CheckCCompilerFlag) -CHECK_C_COMPILER_FLAG("-Wno-error=unused-but-set-variable" COMPILER_SUPPORTS_NO_UNUSED_BUT_SET_VAR) -if (COMPILER_SUPPORTS_NO_UNUSED_BUT_SET_VAR) - set_source_files_properties(${MODULE_IA_CSS_SRC} PROPERTIES COMPILE_FLAGS - "-Wno-error=unused-but-set-variable ${CMAKE_C_FLAGS}") +if (NOT CAL_BUILD) + message("Linux build") + add_definitions(-DSUPPORT_MULTI_PROCESS) + add_definitions(-DLINUX_BUILD) + include_directories(${MODULES_DIR}/v4l2) + find_package(LIBDRM) + if(LIBDRM_FOUND AND ("${LIBDRM_VERSION}" VERSION_GREATER_EQUAL 2.4.114)) + include_directories(${LIBDRM_INCLUDE_DIRS}) + set(LIBCAMHAL_LINK_LIBS ${LIBCAMHAL_LINK_LIBS} ${LIBDRM_LIBS}) + add_definitions(-DLIBDRM_SUPPORT_MMAP_OFFSET) + endif() endif() -endif() #USE_PG_LITE_PIPE set(LIBCAMHAL_SRCS ${LIBCAMHAL_SRCS} @@ -215,6 +265,7 @@ set(LIBCAMHAL_SRCS ${IUTILS_SRCS} ${METADATA_SRCS} ${PLATFORMDATA_SRCS} + ${SCHEDULER_SRCS} ${V4L2_SRCS} ${ALGOWRAPPER_SRCS} ${IMAGE_PROCESS_SRCS} @@ -223,200 +274,156 @@ set(LIBCAMHAL_SRCS ${MODULES_DIR}/ia_cipr/src/Event.cpp ${MODULES_DIR}/ia_cipr/src/Command.cpp ${MODULES_DIR}/ia_cipr/src/Utils.cpp - ) +) -if(FACE_DETECTION) -set(LIBCAMHAL_SRCS - ${LIBCAMHAL_SRCS} - ${FACE_DETECTION_SRCS} - ) -endif() #FACE_DETECTION +#------------------------- Target settings ------------------------- -if(ENABLE_SANDBOXING) -set(LIBCAMHAL_SRCS - ${LIBCAMHAL_SRCS} - ${SANDBOXING_CLIENT_SRCS} - ) -endif() #ENABLE_SANDBOXING +if (NOT IPU_VERSIONS) + set(IPU_VERSIONS ${IPU_VER}) +endif() - set(LIBCAMHAL_SRCS ${LIBCAMHAL_SRCS} ${IIO_SRCS}) +if (BUILD_CAMHAL_ADAPTOR) + add_subdirectory(src/hal/hal_adaptor) + if (NOT BUILD_CAMHAL_PLUGIN) + message(NOTICE "Will not build libcamhal plugins") + set(IPU_VERSIONS "") + endif() +endif() -# Add libcamhal using the specified sources -add_library(camhal_static STATIC ${LIBCAMHAL_SRCS}) -set_target_properties(camhal_static PROPERTIES OUTPUT_NAME "camhal") -add_library(camhal SHARED $) +# Add different targets according to array IPU_VERSIONS +foreach(IPU_VER ${IPU_VERSIONS}) -#---------------------------- Link settings ---------------------------- -target_link_libraries(camhal ${CMAKE_DL_LIBS}) -target_link_libraries(camhal_static ${CMAKE_DL_LIBS}) +if (BUILD_CAMHAL_PLUGIN) + set(TARGET_SUFFIX "-${IPU_VER}") +endif() -set (THREADS_PREFER_PTHREAD_FLAG ON) -find_package (Threads REQUIRED) -target_link_libraries(camhal ${CMAKE_THREAD_LIBS_INIT}) -target_link_libraries(camhal_static ${CMAKE_THREAD_LIBS_INIT}) +set(TARGET_INCLUDE "") +set(TARGET_DEFINITIONS "") +set(TARGET_SRCS "") +set(TARGET_LINK_LIBS "") + +if (USE_PG_LITE_PIPE) + add_subdirectory(modules/ia_css modules/ia_css${TARGET_SUFFIX}) + set(TARGET_INCLUDE ${TARGET_INCLUDE} ${MODULE_IA_CSS_HEADER_INCLUDE_DIR}) + set(TARGET_SRCS ${TARGET_SRCS} ${MODULE_IA_CSS_SRC}) +endif() #USE_PG_LITE_PIPE -target_link_libraries(camhal expat rt) -target_link_libraries(camhal_static expat rt) +if (IPU_VER MATCHES "ipu6") + message(STATUS "add definition -DIPU_SYSVER_IPU6 for ${IPU_VER}") + set(TARGET_DEFINITIONS ${TARGET_DEFINITIONS} -DIPU_SYSVER_IPU6) + if (IPU_VER STREQUAL "ipu6sepla") + message(STATUS "add definition -DIPU_SYSVER_ipu6v3 for ${IPU_VER}") + set(TARGET_DEFINITIONS ${TARGET_DEFINITIONS} -DIPU_SYSVER_ipu6v3) + elseif (IPU_VER STREQUAL "ipu6ep") + message(STATUS "add definition -DIPU_SYSVER_ipu6v5 for ${IPU_VER}") + set(TARGET_DEFINITIONS ${TARGET_DEFINITIONS} -DIPU_SYSVER_ipu6v5) + elseif (IPU_VER STREQUAL "ipu6epmtl") + message(STATUS "add definition -DIPU_SYSVER_ipu6v6 for ${IPU_VER}") + set(TARGET_DEFINITIONS ${TARGET_DEFINITIONS} -DIPU_SYSVER_ipu6v6) + endif() +endif() -if (CAL_BUILD) - target_link_libraries(camhal camera_v4l2_device) - target_link_libraries(camhal_static camera_v4l2_device) +if (NOT CAL_BUILD) + set(TARGET_DEFINITIONS ${TARGET_DEFINITIONS} "-DCAMERA_DEFAULT_CFG_PATH=\"${CMAKE_INSTALL_FULL_SYSCONFDIR}/camera/${IPU_VER}/\"") endif() # Link libraries, the building will be interrupted if libs/includes not found - # Link ia_imaging find_package(IA_IMAGING) - include_directories(${IA_IMAGING_INCLUDE_DIRS}) - target_link_libraries(camhal ${IA_IMAGING_LIBS}) - target_link_libraries(camhal_static ${IA_IMAGING_LIBS}) - -if(USE_PG_LITE_PIPE) - find_package(LIBGCSS) - include_directories(${LIBGCSS_INCLUDE_DIRS}) - target_link_libraries(camhal ${LIBGCSS_LIBS}) - target_link_libraries(camhal_static ${LIBGCSS_LIBS}) -else() - # Link libiacss - find_package(LIBIACSS) - include_directories(${LIBIACSS_INCLUDE_DIRS}) - target_link_libraries(camhal ${LIBIACSS_LIBS}) - target_link_libraries(camhal_static ${LIBIACSS_LIBS}) -endif() + set(TARGET_INCLUDE ${TARGET_INCLUDE} ${IA_IMAGING${TARGET_SUFFIX}_INCLUDE_DIRS}) + set(TARGET_LINK_LIBS ${TARGET_LINK_LIBS} ${IA_IMAGING${TARGET_SUFFIX}_LIBS}) + + if(USE_PG_LITE_PIPE) + find_package(LIBGCSS) + set(TARGET_INCLUDE ${TARGET_INCLUDE} ${LIBGCSS${TARGET_SUFFIX}_INCLUDE_DIRS}) + set(TARGET_LINK_LIBS ${TARGET_LINK_LIBS} ${LIBGCSS${TARGET_SUFFIX}_LIBS}) + # Include libipu(4) headers + find_package(LIBIPU) + set(TARGET_INCLUDE ${TARGET_INCLUDE} ${LIBIPU${TARGET_SUFFIX}_INCLUDE_DIRS}) + set(TARGET_LINK_LIBS ${TARGET_LINK_LIBS} ${LIBIPU${TARGET_SUFFIX}_LIBS}) + else() + # Link libiacss + find_package(LIBIACSS) + set(TARGET_INCLUDE ${TARGET_INCLUDE} ${LIBIACSS${TARGET_SUFFIX}_INCLUDE_DIRS}) + set(TARGET_LINK_LIBS ${TARGET_LINK_LIBS} ${LIBIACSS${TARGET_SUFFIX}_LIBS}) + endif() -# Include libipu(4) headers -find_package(LIBIPU) -include_directories(${LIBIPU_INCLUDE_DIRS}) +#--------------------------- Add libcamhal target --------------------------- -if (USE_PG_LITE_PIPE) - target_link_libraries(camhal ${IPU_LIB}) - target_link_libraries(camhal_static ${IPU_LIB}) +if (BUILD_CAMHAL_PLUGIN) + set(CAMHAL_TARGET ${IPU_VER}) + set(CAMHAL_STATIC_TARGET ${IPU_VER}_static) +else() + set(CAMHAL_TARGET camhal) + set(CAMHAL_STATIC_TARGET camhal_static) endif() -if (CAL_BUILD) - find_package(LIBCAMERA_CLIENT) - find_package(LIBCAMERA_COMMON) - find_package(LIBCAMERA_METADATA) - find_package(LIBCAMERA_V4L2_DEVICE) - find_package(LIBSYNC) - find_package(LIBCBM) - - include_directories(${LIBCAMERA_CLIENT_INCLUDE_DIRS} ${LIBCAMERA_COMMON_INCLUDE_DIRS} - ${LIBCAMERA_METADATA_INCLUDE_DIRS} ${LIBCAMERA_V4L2_DEVICE_INCLUDE_DIRS} - ${LIBSYNC_INCLUDE_DIRS} - ${LIBCBM_INCLUDE_DIRS} - ) - link_directories(${CMAKE_PREFIX_PATH} ${LIBCAMERA_CLIENT_LIBS} ${LIBCAMERA_METADATA_LIBS} - ${LIBCAMERA_COMMON_LIBS} ${LIBSYNC_LIBS} - ${LIBCBM_LIBS} - ) - - target_link_libraries(camhal ${LIBCAMERA_CLIENT_LIBS} ${LIBCAMERA_COMMON_LIBS} - ${LIBCAMERA_METADATA_LIBS} ${LIBCAMERA_V4L2_DEVICE_LIBS} - ${LIBSYNC_LIBS} jpeg ${CMAKE_PREFIX_PATH}/libyuv.pic.a - ${LIBCBM_LIBS} - ) - target_link_libraries(camhal_static ${LIBCAMERA_CLIENT_LIBS} ${LIBCAMERA_COMMON_LIBS} - ${LIBCAMERA_METADATA_LIBS} ${LIBCAMERA_V4L2_DEVICE_LIBS} - ${LIBSYNC_LIBS} jpeg ${CMAKE_PREFIX_PATH}/libyuv.pic.a - ${LIBCBM_LIBS} - ) -endif() #CAL_BUILD +# Add libcamhal using the specified sources +add_library(${CAMHAL_STATIC_TARGET} STATIC ${LIBCAMHAL_SRCS} ${TARGET_SRCS}) -if (NOT CAL_BUILD) - include_directories(${MODULES_DIR}/v4l2) +if (${CMAKE_VERSION} VERSION_LESS 3.11) + add_library(${CAMHAL_TARGET} SHARED ${LIBCAMHAL_SRCS} ${TARGET_SRCS}) +else() + add_library(${CAMHAL_TARGET} SHARED $) endif() -if (FACE_DETECTION) - target_link_libraries(camhal pvl_eye_detection pvl_face_detection pvl_mouth_detection) - target_link_libraries(camhal_static pvl_eye_detection pvl_face_detection pvl_mouth_detection) - target_link_libraries(camhal ${WORK_DIR_TMP}/src/fd/libface_detection.a) - target_link_libraries(camhal_static ${WORK_DIR_TMP}/src/fd/libface_detection.a) +target_include_directories(${CAMHAL_STATIC_TARGET} PRIVATE ${TARGET_INCLUDE}) +target_include_directories(${CAMHAL_TARGET} PRIVATE ${TARGET_INCLUDE}) +target_compile_definitions(${CAMHAL_STATIC_TARGET} PRIVATE ${TARGET_DEFINITIONS}) +target_compile_definitions(${CAMHAL_TARGET} PRIVATE ${TARGET_DEFINITIONS}) +target_link_libraries(${CAMHAL_STATIC_TARGET} PRIVATE ${LIBCAMHAL_LINK_LIBS} ${TARGET_LINK_LIBS}) +target_link_libraries(${CAMHAL_TARGET} PRIVATE ${LIBCAMHAL_LINK_LIBS} ${TARGET_LINK_LIBS}) + +if (BUILD_CAMHAL_PLUGIN) + set_target_properties(${CAMHAL_STATIC_TARGET} PROPERTIES PREFIX "") + set_target_properties(${CAMHAL_TARGET} PROPERTIES PREFIX "") + set_target_properties(${CAMHAL_STATIC_TARGET} PROPERTIES OUTPUT_NAME ${IPU_VER}) + set_target_properties(${CAMHAL_TARGET} PROPERTIES OUTPUT_NAME ${IPU_VER}) +else() + set_target_properties(${CAMHAL_STATIC_TARGET} PROPERTIES OUTPUT_NAME ${CAMHAL_TARGET}) + set_target_properties(${CAMHAL_TARGET} PROPERTIES SOVERSION 0) + set_target_properties(${CAMHAL_TARGET} PROPERTIES VERSION "0.0.0") + set_target_properties(${CAMHAL_TARGET} PROPERTIES OUTPUT_NAME ${CAMHAL_TARGET}) endif() -if (ENABLE_SANDBOXING) - add_definitions(-DENABLE_SANDBOXING) - - find_package(LIBMOJO) - find_package(LIBCAMERA_IPC) - find_package(LIBCAB) - - include_directories(${USR_INCLUDE_HEADER}/base-${BASEVER}) - include_directories(${LIBMOJO_INCLUDE_DIRS}) - include_directories(${LIBCAMERA_IPC_INCLUDE_DIRS}) - include_directories(${LIBCAB_INCLUDE_DIRS}) - - link_directories(${CMAKE_PREFIX_PATH} - ${LIBMOJO_LIBS} - ${LIBCAMERA_IPC_LIBS} - ${LIBCAB_LIBS} - ) - - target_link_libraries(camhal ${LIBCAB_LIBS}) - target_link_libraries(camhal ${LIBMOJO_LIBS}) - target_link_libraries(camhal ${LIBCAMERA_IPC_LIBS}) - target_link_libraries(camhal ${CMAKE_PREFIX_PATH}/librt.a) - - target_link_libraries(camhal_static ${LIBCAB_LIBS}) - target_link_libraries(camhal_static ${LIBMOJO_LIBS}) - target_link_libraries(camhal_static ${LIBCAMERA_IPC_LIBS}) - target_link_libraries(camhal_static ${CMAKE_PREFIX_PATH}/librt.a) -endif() #ENABLE_SANDBOXING - #--------------------------- Install settings --------------------------- if (NOT CAL_BUILD) -# Install headers -install(DIRECTORY include/ DESTINATION include/libcamhal) -if (SUPPORT_LIVE_TUNING) - install(FILES modules/livetune/LiveTuning.h DESTINATION include/libcamhal/api) -endif() #SUPPORT_LIVE_TUNING + if (NOT BUILD_CAMHAL_PLUGIN) + # Install headers + install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libcamhal) + if (SUPPORT_LIVE_TUNING) + install(FILES modules/livetune/LiveTuning.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libcamhal/api) + endif() #SUPPORT_LIVE_TUNING + endif() -# Install configure files -# By default ipu4 is used -if("${IPU_VER}" STREQUAL "ipu6") - if("${PRODUCTION_NAME}" STREQUAL "Andrews") - message("Install TGL Andrews configure files") - install(DIRECTORY config/ubuntu/tgl/ DESTINATION share/defaults/etc/camera) + # Install configure files, by default ipu4 is used + message("Install camera configure files for ${IPU_VER}") + install(DIRECTORY config/linux/${IPU_VER}/ DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/camera/${IPU_VER}) + + # Install libraries + set(CAMHAL_TARGETS ${CAMHAL_TARGET} ${CAMHAL_STATIC_TARGET}) + if (BUILD_CAMHAL_PLUGIN) + set(CAMHAL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/libcamhal/plugins) else() - message("Install TGL IPU6 configure files") - install(DIRECTORY config/linux/ipu6/ DESTINATION share/defaults/etc/camera) + set(CAMHAL_DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -elseif("${IPU_VER}" STREQUAL "ipu6ep") - if("${PRODUCTION_NAME}" STREQUAL "ccg_platform") - message("Install ADL Platform configure files") - install(DIRECTORY config/ubuntu/adl/ DESTINATION share/defaults/etc/camera) - elseif("${PRODUCTION_NAME}" STREQUAL "Tributo") - message("Install ADL Tributo configure files") - install(DIRECTORY config/ubuntu/adl/ DESTINATION share/defaults/etc/camera) + if (${CMAKE_VERSION} VERSION_LESS 3.11) + install(TARGETS ${CAMHAL_TARGETS} + LIBRARY DESTINATION ${CAMHAL_DESTINATION} + ARCHIVE DESTINATION ${CAMHAL_DESTINATION}) else() - message("Install ADL IPU6EP configure files") - install(DIRECTORY config/linux/ipu6ep/ DESTINATION share/defaults/etc/camera) - endif() -elseif("${IPU_VER}" STREQUAL "ipu6epmtl") - if("${PRODUCTION_NAME}" STREQUAL "mtl-ubuntu") - message("Install MTL ubuntu configure files") - install(DIRECTORY config/ubuntu/mtl/ DESTINATION share/defaults/etc/camera) + install(TARGETS ${CAMHAL_TARGETS} DESTINATION ${CAMHAL_DESTINATION}) endif() -elseif("${IPU_VER}" STREQUAL "ipu6sepla") - if("${PRODUCTION_NAME}" STREQUAL "penguin_peak") - message("Install JSL penguin peak configure files") - install(DIRECTORY config/ubuntu/jsl/ DESTINATION share/defaults/etc/camera) + if (NOT BUILD_CAMHAL_PLUGIN) + # Install package config file + configure_file(${PROJECT_SOURCE_DIR}/cmake/libcamhal.pc.cmakein + ${PROJECT_SOURCE_DIR}/libcamhal.pc @ONLY) + install(FILES libcamhal.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) endif() -else() - message("Install APL IPU4 configure files") - install(DIRECTORY config/linux/ipu4/ DESTINATION share/defaults/etc/camera) -endif() - -# Install libraries -install(TARGETS camhal camhal_static) - -# Install package config file -configure_file(${PROJECT_SOURCE_DIR}/cmake/libcamhal.pc.cmakein - ${PROJECT_SOURCE_DIR}/libcamhal.pc @ONLY) -install(FILES libcamhal.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) endif() #NOT CAL_BUILD +endforeach() #IPU_VERSIONS + set(CPACK_GENERATOR "RPM") include(CPack) diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..53d86be8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,59 @@ +Apache License +Version 2.0, January 2004 + +http://www.apache.org/licenses/ +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + diff --git a/README.md b/README.md index b6912ed8..c302be12 100644 --- a/README.md +++ b/README.md @@ -1,114 +1,43 @@ # ipu6-camera-hal -This repository supports MIPI cameras through the IPU6 on Intel Tiger Lake and -Alder Lake platforms. There are 4 repositories that provide the complete setup: +This repository supports MIPI cameras through the IPU6 on Intel Tiger Lake, Alder Lake, Raptor Lake and Meteor Lake platforms. +There are 4 repositories that provide the complete setup: - https://github.com/intel/ipu6-drivers - kernel drivers for the IPU and sensors -- https://github.com/intel/ipu6-camera-hal - HAL for processing of images in userspace - https://github.com/intel/ipu6-camera-bins - IPU firmware and proprietary image processing libraries -- https://github.com/intel/icamerasrc (branch:icamerasrc_slim_api) - Gstreamer src plugin +- https://github.com/intel/ipu6-camera-hal - HAL for processing of images in userspace +- https://github.com/intel/icamerasrc/tree/icamerasrc_slim_api (branch:icamerasrc_slim_api) - Gstreamer src plugin ## Content of this repository: - IPU6 HAL ## Build instructions: - Dependencies: ipu6-camera-bins -- Dependencies: libexpat-dev automake libtool libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev -- Build and install: - -1. Set IPU6 version and product name for build - - For Tiger Lake, set: - ```shell - IPU6_VER=ipu6 - ``` - - - For Alder Lake, set: - ```shell - IPU6_VER=ipu6ep - ``` + Please follow https://github.com/intel/ipu6-camera-bins README to install. -2. Then continue: - ```shell - cd ipu6-camera-hal - mkdir -p ./build/out/install/usr && cd ./build/ +- Dependencies: libexpat-dev automake libtool libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libdrm-dev - cmake -DCMAKE_BUILD_TYPE=Release \ - -DIPU_VER=${IPU6_VER} \ - -DENABLE_VIRTUAL_IPU_PIPE=OFF \ - -DUSE_PG_LITE_PIPE=ON \ - -DUSE_STATIC_GRAPH=OFF \ - -DCMAKE_INSTALL_PREFIX=/usr .. - # if don't want install to /usr, use -DCMAKE_INSTALL_PREFIX=./out/install/usr, export PKG_CONFIG_PATH="$workdir/build/out/install/usr/lib/pkgconfig" - - make -j`nproc` - sudo make install +- Build and install: + Recommend to build together with icamerasrc and using `build.sh` in this repo. +1. Put ipu6-camera-hal, icameasrc and build.sh parallel as below: ``` - -3. Move user space driver for different platforms: - ```shell - mkdir /usr/lib/${IPU6_VER} - mkdir /usr/share/defaults/etc/${IPU6_VER} - - mv /usr/lib/libtbd.so.0.0.0 /usr/lib/${IPU6_VER}/libtbd.so.0.0.0 - - mv /usr/lib/libSkyCamAIC.so /usr/lib/${IPU6_VER}/libSkyCamAIC.so - mv /usr/lib/libSkyCamAICKBL.so /usr/lib/${IPU6_VER}/libSkyCamAICKBL.so - mv /usr/lib/libStatsConverter.so /usr/lib/${IPU6_VER}/libStatsConverter.so - mv /usr/lib/libbroxton_ia_pal.so /usr/lib/${IPU6_VER}/libbroxton_ia_pal.so - mv /usr/lib/libia_aec.so /usr/lib/${IPU6_VER}/libia_aec.so - mv /usr/lib/libia_aic.so /usr/lib/${IPU6_VER}/libia_aic.so - mv /usr/lib/libia_aic_engine.so /usr/lib/${IPU6_VER}/libia_aic_engine.so - mv /usr/lib/libia_aic_myriad.so /usr/lib/${IPU6_VER}/libia_aic_myriad.so - mv /usr/lib/libia_aiq.so /usr/lib/${IPU6_VER}/libia_aiq.so - mv /usr/lib/libia_aiq_file_debug.so /usr/lib/${IPU6_VER}/libia_aiq_file_debug.so - mv /usr/lib/libia_aiqb_parser.so /usr/lib/${IPU6_VER}/libia_aiqb_parser.so - mv /usr/lib/libia_bcomp.so /usr/lib/${IPU6_VER}/libia_bcomp.so - mv /usr/lib/libia_cca.so /usr/lib/${IPU6_VER}/libia_cca.so - mv /usr/lib/libia_cca_file_debug.so /usr/lib/${IPU6_VER}/libia_cca_file_debug.so - mv /usr/lib/libia_ccat.so /usr/lib/${IPU6_VER}/libia_ccat.so - mv /usr/lib/libia_cmc_parser.so /usr/lib/${IPU6_VER}/libia_cmc_parser.so - mv /usr/lib/libia_coordinate.so /usr/lib/${IPU6_VER}/libia_coordinate.so - mv /usr/lib/libia_dpc.so /usr/lib/${IPU6_VER}/libia_dpc.so - mv /usr/lib/libia_dvs.so /usr/lib/${IPU6_VER}/libia_dvs.so - mv /usr/lib/libia_dvs_file_debug.so /usr/lib/${IPU6_VER}/libia_dvs_file_debug.so - mv /usr/lib/libia_emd_decoder.so /usr/lib/${IPU6_VER}/libia_emd_decoder.so - mv /usr/lib/libia_exc.so /usr/lib/${IPU6_VER}/libia_exc.so - mv /usr/lib/libia_intrinsics.so /usr/lib/${IPU6_VER}/libia_intrinsics.so - mv /usr/lib/libia_isp_bxt.so /usr/lib/${IPU6_VER}/libia_isp_bxt.so - mv /usr/lib/libia_isp_bxt_file_debug.so /usr/lib/${IPU6_VER}/libia_isp_bxt_file_debug.so - mv /usr/lib/libia_lard.so /usr/lib/${IPU6_VER}/libia_lard.so - mv /usr/lib/libia_log.so /usr/lib/${IPU6_VER}/libia_log.so - mv /usr/lib/libia_ltm.so /usr/lib/${IPU6_VER}/libia_ltm.so - mv /usr/lib/libia_ltm_file_debug.so /usr/lib/${IPU6_VER}/libia_ltm_file_debug.so - mv /usr/lib/libia_me_corner.so /usr/lib/${IPU6_VER}/libia_me_corner.so - mv /usr/lib/libia_mkn.so /usr/lib/${IPU6_VER}/libia_mkn.so - mv /usr/lib/libia_nvm.so /usr/lib/${IPU6_VER}/libia_nvm.so - mv /usr/lib/libia_ob.so /usr/lib/${IPU6_VER}/libia_ob.so - mv /usr/lib/libia_pd.so /usr/lib/${IPU6_VER}/libia_pd.so - mv /usr/lib/libia_view.so /usr/lib/${IPU6_VER}/libia_view.so - mv /usr/lib/libpvl_blink_detection.so /usr/lib/${IPU6_VER}/libpvl_blink_detection.so - mv /usr/lib/libpvl_eye_detection.so /usr/lib/${IPU6_VER}/libpvl_eye_detection.so - mv /usr/lib/libpvl_face_detection.so /usr/lib/${IPU6_VER}/libpvl_face_detection.so - mv /usr/lib/libpvl_face_recognition.so /usr/lib/${IPU6_VER}/libpvl_face_recognition.so - mv /usr/lib/libpvl_mouth_detection.so /usr/lib/${IPU6_VER}/libpvl_mouth_detection.so - mv /usr/lib/libpvl_object_tracking.so /usr/lib/${IPU6_VER}/libpvl_object_tracking.so - mv /usr/lib/libpvl_smile_detection.so /usr/lib/${IPU6_VER}/libpvl_smile_detection.so - - mv /usr/lib/libcisu.so.0.0.0 /usr/lib/${IPU6_VER}/libcisu.so.0.0.0 - mv /usr/lib/libcisu_os_plugin.so.1.0.0 /usr/lib/${IPU6_VER}/libcisu_os_plugin.so.1.0.0 - mv /usr/lib/libgcss.so.0.0.0 /usr/lib/${IPU6_VER}/libgcss.so.0.0.0 - mv /usr/lib/libia_camera.so.0.0.0 /usr/lib/${IPU6_VER}/libia_camera.so.0.0.0 - mv /usr/lib/libia_cipf.so.0.0.0 /usr/lib/${IPU6_VER}/libia_cipf.so.0.0.0 - - mv /usr/lib/libcamhal.so /usr/lib/${IPU6_VER}/libcamhal.so - mv /usr/share/defaults/etc/camera /usr/share/defaults/etc/${IPU6_VER}/ + cp build.sh .. && cd .. + # work + # ├── build.sh + # ├── icamerasrc + # ├── ipu6-camera-hal + # └── out ``` - -4. Copy ipu6-camera-hal/config/linux/rules.d/*.rules to /lib/udev/rules.d/: - ```shell - cp ../config/linux/rules.d/*.rules /lib/udev/rules.d/ + +2. For example, in `work` folder, run `./build.sh -d --board ipu_mtl`. Output binaries will be in `out/ipu_mtl/install`. + Notice: Use `./build.sh --board ipu_mtl` to disable dma build. + The dma build depends on 'gstreamer >= 1.23' and 'libva-drm'. + +3. Install built out drivers in `out//install` to target: + ```sh + cp -r ./out//install/etc* /etc/ + cp -r ./out//install/usr/include/* /usr/include/ + cp -r ./out//install/usr/lib/* /usr/lib/ ``` -5. Reboot to make udev rules take effect. -## Tagged for removal: -The folder icamerasrc contains a gst plugin. This has been moved to https://github.com/intel/icamerasrc and will eventually be removed. +For more building details please reference the `build.sh`. diff --git a/build.sh b/build.sh new file mode 100644 index 00000000..9789c825 --- /dev/null +++ b/build.sh @@ -0,0 +1,172 @@ +#!/bin/bash + +function check_result() { + local res=$1 + local func=$2 + + if [ $res -eq 0 ] ; then + echo "###############" " $func OK " "#############" + else + echo "###############" " $func FAIL " "#############" + exit 1 + fi +} + +function parse_argument() { + export SOURCE_DIR=${PWD} + export TARGET_BUILD_INSTALL_DIR=${PWD}/out + export BOARD_LIST="ipu_tgl ipu_adl ipu_mtl" + export BUILD_RPM=OFF + export ENABLE_DMA_DRM=OFF + + while true; do + case $1 in + --no-rpm) + export BUILD_RPM=OFF + ;; + -d|--dma) + export ENABLE_DMA_DRM=ON + ;; + --board) + export BOARD_LIST=$2 + echo "$2" + ;; + -?*) + echo "WARNING: not supported option: $1" + ;; + *) + break + esac + + shift + done + + echo "=========================== Build Config ============================" + echo "SOURCE_DIR: $SOURCE_DIR" + echo "INSTALL_DIR: $TARGET_BUILD_INSTALL_DIR" + echo "BUILD_RPM: $BUILD_RPM" + echo "ENABLE_DMA_DRM: $ENABLE_DMA_DRM" + echo "BOARD_LIST: $BOARD_LIST" + echo "=====================================================================" +} + +function print_helper() { + echo + echo "========================= Command Helper ============================" + echo "==== disable dma ====" + echo "./build.sh --board target" + echo "==== enable dma ====" + echo "./build.sh -d --board target" + echo "=====================================================================" + echo +} + +function build_libcamhal() { + rm -fr build && mkdir -p build && cd build + + local target=$1 + + rm -fr $TARGET_BUILD_INSTALL_DIR/$target && mkdir -p $TARGET_BUILD_INSTALL_DIR/$target + export BUILD_INSTALL_DIR=$TARGET_BUILD_INSTALL_DIR/$target/install + + export IPU_VERSIONS= + if [ "$target" = "ipu_tgl" ]; then + IPU_VERSIONS=ipu6 + elif [ "$target" = "ipu_adl" ]; then + IPU_VERSIONS=ipu6ep + elif [ "$target" = "ipu_mtl" ]; then + IPU_VERSIONS=ipu6epmtl + else + echo "Error: doesn't support the target : $target" + exit -1 + fi + + # indicate the install folder of binary package + sed -i 's|^prefix=.*|prefix='$BUILD_INSTALL_DIR/usr/'|' $BUILD_INSTALL_DIR/usr/lib/pkgconfig/*.pc + + command cmake -DCMAKE_BUILD_TYPE=Release \ + -DIPU_VERSIONS=$IPU_VERSIONS \ + -DBUILD_CAMHAL_TESTS=ON \ + -DUSE_PG_LITE_PIPE=ON \ + -DUSE_STATIC_GRAPH=ON \ + -DUSE_STATIC_GRAPH_AUTOGEN=ON \ + -DCMAKE_C_FLAGS=-O2 \ + -DCMAKE_CXX_FLAGS=-O2 \ + -DBUILD_CAMHAL_ADAPTOR=ON \ + -DBUILD_CAMHAL_PLUGIN=ON \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + .. + + # make and install + make -j`nproc` + check_result $? "$FUNCNAME: $target" + + make DESTDIR=$BUILD_INSTALL_DIR install + check_result $? "$FUNCNAME: $target" + + cd .. +} + +function build_libcamhal_target() { + cd $SOURCE_DIR/ipu6-camera-hal + + for target in $BOARD_LIST + do + build_libcamhal $target + done +} + +function build_icamerasrc() { + cd $SOURCE_DIR/icamerasrc/ + + export DEFAULT_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" + export PKG_CONFIG_PATH=$DEFAULT_PKG_CONFIG_PATH:/usr/lib/x86_64-linux-gnu/pkgconfig:$BUILD_INSTALL_DIR/usr/lib/pkgconfig + + sed -i 's|^prefix=.*|prefix='$BUILD_INSTALL_DIR/usr/'|' $BUILD_INSTALL_DIR/usr/lib/pkgconfig/libcamhal.pc + + rm -fr config.h.in autom4te.cache/ aclocal.m4 *-libtool config.guess compile \ + config.sub configure depcomp install-sh ltmain.sh m4 + autoreconf --install + + export CAMHAL_CFLAGS="-I$BUILD_INSTALL_DIR/usr/include/libcamhal \ + -I$BUILD_INSTALL_DIR/usr/include/libcamhal/api \ + -I$BUILD_INSTALL_DIR/usr/include/libcamhal/utils \ + -I$BUILD_INSTALL_DIR/usr/include/libcamhal/linux" + + export CHROME_SLIM_CAMHAL=ON + + local ENABLE_FEATURE_ARGS= + if [ "$ENABLE_DMA_DRM" = "ON" ]; then + ENABLE_FEATURE_ARGS+="--enable-gstdrmformat=yes " + fi + + CFLAGS="-O2" CXXFLAGS="-O2" ./configure --prefix=/usr DEFAULT_CAMERA=0 ${ENABLE_FEATURE_ARGS} + check_result $? $FUNCNAME + + make clean + make -j + check_result $? $FUNCNAME + + make DESTDIR=$BUILD_INSTALL_DIR install + check_result $? $FUNCNAME + + find $BUILD_INSTALL_DIR -name "*.la" -exec rm -f "{}" \; +} + +function main () { + parse_argument $@ + if [ -z "$SOURCE_DIR" ] || [ -z "$TARGET_BUILD_INSTALL_DIR" ] || [ -z "$BOARD_LIST" ]; then + print_helper + exit 1 + fi + + rm -fr $TARGET_BUILD_INSTALL_DIR && mkdir -p $TARGET_BUILD_INSTALL_DIR + + build_libcamhal_target + build_icamerasrc + + # TODO: Generate the RPM for hal, hal_adaptor and icamerasrc together +} + +main $@ diff --git a/cmake/CheckFortifyLevel.cmake b/cmake/CheckFortifyLevel.cmake new file mode 100644 index 00000000..a27498cf --- /dev/null +++ b/cmake/CheckFortifyLevel.cmake @@ -0,0 +1,42 @@ +# CheckFortifySource.cmake +function(check_fortify_source output_variable) + # Create a simple C++ source file to check _FORTIFY_SOURCE + set(CHECK_SOURCE_CODE "#include +#ifndef _FORTIFY_SOURCE +#define _FORTIFY_SOURCE 0 +#endif +int main(){printf(\"%d\", _FORTIFY_SOURCE);return 0;}") + + # Set the full path for the source file + set(SOURCE_FILE_NAME "${CMAKE_BINARY_DIR}/check_fortify_source.c") + file(WRITE "${SOURCE_FILE_NAME}" "${CHECK_SOURCE_CODE}") + + # Try to compile the source file + try_compile(FORTIFY_SOURCE_COMPILED + "${CMAKE_BINARY_DIR}/temp" "${SOURCE_FILE_NAME}" + COMPILE_DEFINITIONS "-O2" + COPY_FILE "${CMAKE_BINARY_DIR}/check_fortify_source.out" + OUTPUT_VARIABLE COMPILE_OUTPUT + ) + + # Check if compilation was successful + if(FORTIFY_SOURCE_COMPILED) + # Run the compiled program to get the value of _FORTIFY_SOURCE + execute_process(COMMAND "${CMAKE_BINARY_DIR}/check_fortify_source.out" + RESULT_VARIABLE RUN_RESULT + OUTPUT_VARIABLE FORTIFY_SOURCE_VALUE + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(RUN_RESULT EQUAL 0) + # Set the variable outside the function + set(${output_variable} "${FORTIFY_SOURCE_VALUE}" PARENT_SCOPE) + else() + message(STATUS "Failed to run the compiled test program.") + set(${output_variable} "" PARENT_SCOPE) + endif() + else() + message(STATUS "Compilation failed; _FORTIFY_SOURCE is not defined.") + message(STATUS "Compiler output: ${COMPILE_OUTPUT}") + set(${output_variable} "" PARENT_SCOPE) + endif() +endfunction() diff --git a/cmake/FindIA_IMAGING.cmake b/cmake/FindIA_IMAGING.cmake index 21342e42..26cbce5e 100644 --- a/cmake/FindIA_IMAGING.cmake +++ b/cmake/FindIA_IMAGING.cmake @@ -23,70 +23,69 @@ endif() include(FindPackageHandleStandardArgs) find_package(PkgConfig) -pkg_check_modules(IA_IMAGING ia_imaging) -if(NOT IA_IMAGING_FOUND) - message(FATAL_ERROR "IA_IMAGING not found") +pkg_check_modules(IA_IMAGING${TARGET_SUFFIX} ia_imaging${TARGET_SUFFIX}) +if(NOT IA_IMAGING${TARGET_SUFFIX}_FOUND) + message(FATAL_ERROR "IA_IMAGING${TARGET_SUFFIX} not found") endif() -set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${IA_IMAGING_LIBRARY_DIRS}) +set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${IA_IMAGING${TARGET_SUFFIX}_LIBRARY_DIRS}) # Libraries -find_library(IA_CCA_LIB ia_cca) -find_library(IA_AIQ_LIB ia_aiq) -find_library(IA_AIQB_PARSER_LIB ia_aiqb_parser) -find_library(IA_CMC_PARSER_LIB ia_cmc_parser) -if (NOT ENABLE_SANDBOXING) -find_library(IA_LARD_LIB ia_lard) -endif() #ENABLE_SANDBOXING -find_library(IA_EXC_LIB ia_exc) -find_library(IA_MKN_LIB ia_mkn) -find_library(IA_NVM_LIB ia_nvm) -find_library(IA_LOG_LIB ia_log) -find_library(IA_DVS_LIB ia_dvs) -find_library(IA_COORDINATE_LIB ia_coordinate) -find_library(IA_LTM_LIB ia_ltm) -find_library(IA_DVS_LIB ia_dvs) -find_library(IA_ISP_BXT_LIB ia_isp_bxt) -find_library(BXT_IA_PAL_LIB broxton_ia_pal) -if (USE_PG_LITE_PIPE) -find_library(P2P_LIB_NAME ia_p2p_${IPU_VER}) -endif() +find_library(IA_CCA${TARGET_SUFFIX}_LIB ia_cca${TARGET_SUFFIX}) +find_library(IA_AIQ${TARGET_SUFFIX}_LIB ia_aiq${TARGET_SUFFIX}) +find_library(IA_AIQB_PARSER${TARGET_SUFFIX}_LIB ia_aiqb_parser${TARGET_SUFFIX}) +find_library(IA_CMC_PARSER${TARGET_SUFFIX}_LIB ia_cmc_parser${TARGET_SUFFIX}) +find_library(IA_EXC${TARGET_SUFFIX}_LIB ia_exc${TARGET_SUFFIX}) +find_library(IA_MKN${TARGET_SUFFIX}_LIB ia_mkn${TARGET_SUFFIX}) +# SENSOR_EMD_DECODER +find_library(IA_EMD${TARGET_SUFFIX}_LIB ia_emd_decoder${TARGET_SUFFIX}) +# DOL_FEATURE_S +find_library(IA_BCOMP${TARGET_SUFFIX}_LIB ia_bcomp${TARGET_SUFFIX}) +# DOL_FEATURE_E +find_library(IA_NVM${TARGET_SUFFIX}_LIB ia_nvm${TARGET_SUFFIX}) +find_library(IA_LOG${TARGET_SUFFIX}_LIB ia_log${TARGET_SUFFIX}) +find_library(IA_DVS${TARGET_SUFFIX}_LIB ia_dvs${TARGET_SUFFIX}) +find_library(IA_COORDINATE${TARGET_SUFFIX}_LIB ia_coordinate${TARGET_SUFFIX}) +find_library(IA_LTM${TARGET_SUFFIX}_LIB ia_ltm${TARGET_SUFFIX}) +find_library(IA_DVS${TARGET_SUFFIX}_LIB ia_dvs${TARGET_SUFFIX}) +find_library(IA_ISP_BXT${TARGET_SUFFIX}_LIB ia_isp_bxt${TARGET_SUFFIX}) +find_library(BXT_IA_PAL${TARGET_SUFFIX}_LIB broxton_ia_pal${TARGET_SUFFIX}) -set(IA_IMAGING_LIBS - ${IA_CCA_LIB} - ${IA_AIQ_LIB} - ${IA_AIQB_PARSER_LIB} - ${IA_CMC_PARSER_LIB} - ${IA_EXC_LIB} - ${IA_MKN_LIB} - ${IA_BCOMP_LIB} - ${IA_NVM_LIB} - ${IA_LOG_LIB} - ${IA_DVS_LIB} - ${IA_COORDINATE_LIB} - ${IA_LTM_LIB} - ${IA_DVS_LIB} - ${IA_OB_LIB} +set(IA_IMAGING${TARGET_SUFFIX}_LIBS + ${IA_CCA${TARGET_SUFFIX}_LIB} + ${IA_AIQ${TARGET_SUFFIX}_LIB} + ${IA_AIQB_PARSER${TARGET_SUFFIX}_LIB} + ${IA_CMC_PARSER${TARGET_SUFFIX}_LIB} + ${IA_EXC${TARGET_SUFFIX}_LIB} + ${IA_MKN${TARGET_SUFFIX}_LIB} + ${IA_EMD${TARGET_SUFFIX}_LIB} + ${IA_BCOMP${TARGET_SUFFIX}_LIB} + ${IA_NVM${TARGET_SUFFIX}_LIB} + ${IA_LOG${TARGET_SUFFIX}_LIB} + ${IA_DVS${TARGET_SUFFIX}_LIB} + ${IA_COORDINATE${TARGET_SUFFIX}_LIB} + ${IA_LTM${TARGET_SUFFIX}_LIB} + ${IA_DVS${TARGET_SUFFIX}_LIB} + ${IA_OB${TARGET_SUFFIX}_LIB} + ${IA_ISP_BXT${TARGET_SUFFIX}_LIB} + ${BXT_IA_PAL${TARGET_SUFFIX}_LIB} ) if (NOT ENABLE_SANDBOXING) -set(IA_IMAGING_LIBS - ${IA_IMAGING_LIBS} - ${IA_LARD_LIB} - ) + find_library(IA_LARD${TARGET_SUFFIX}_LIB ia_lard${TARGET_SUFFIX}) + set(IA_IMAGING${TARGET_SUFFIX}_LIBS ${IA_IMAGING${TARGET_SUFFIX}_LIBS} ${IA_LARD${TARGET_SUFFIX}_LIB}) endif() #ENABLE_SANDBOXING if (USE_PG_LITE_PIPE) -set(IA_IMAGING_LIBS ${IA_IMAGING_LIBS} ${P2P_LIB_NAME}) + find_library(IA_P2P${TARGET_SUFFIX}_LIB ia_p2p${TARGET_SUFFIX}) + set(IA_IMAGING${TARGET_SUFFIX}_LIBS ${IA_IMAGING${TARGET_SUFFIX}_LIBS} ${IA_P2P${TARGET_SUFFIX}_LIB}) endif() -set(IA_IMAGING_LIBS ${IA_IMAGING_LIBS} ${IA_ISP_BXT_LIB} ${BXT_IA_PAL_LIB}) - # handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if # all listed variables are TRUE -find_package_handle_standard_args(IA_IMAGING - REQUIRED_VARS IA_IMAGING_INCLUDE_DIRS IA_IMAGING_LIBS) +find_package_handle_standard_args(IA_IMAGING${TARGET_SUFFIX} + REQUIRED_VARS IA_IMAGING${TARGET_SUFFIX}_INCLUDE_DIRS IA_IMAGING${TARGET_SUFFIX}_LIBS) -if(NOT IA_IMAGING_FOUND) - message(FATAL_ERROR "IA_IMAGING not found") +if(NOT IA_IMAGING${TARGET_SUFFIX}_FOUND) + message(FATAL_ERROR "IA_IMAGING${TARGET_SUFFIX} not found") endif() diff --git a/cmake/FindLIBDRM.cmake b/cmake/FindLIBDRM.cmake new file mode 100644 index 00000000..c71b9ae0 --- /dev/null +++ b/cmake/FindLIBDRM.cmake @@ -0,0 +1,39 @@ +# +# Copyright (C) 2024 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Get include and lib paths for LIBDRM from pkgconfig +include(FindPackageHandleStandardArgs) + +find_package(PkgConfig) +pkg_check_modules(LIBDRM libdrm) +if(NOT LIBDRM_FOUND) + message(SEND_ERROR "LIBDRM not found") +endif() + +set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${LIBDRM_LIBRARY_DIRS}) + +# Libraries +find_library(DRM_LIB drm) +set(LIBDRM_LIBS ${DRM_LIB}) + +# handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if +# all listed variables are TRUE +find_package_handle_standard_args(LIBDRM REQUIRED_VARS LIBDRM_INCLUDE_DIRS LIBDRM_LIBS) + +if(NOT LIBDRM_FOUND) + message(SEND_ERROR "LIBDRM not found") +endif() + diff --git a/cmake/FindLIBGCSS.cmake b/cmake/FindLIBGCSS.cmake index fd6770b9..dd0ff799 100644 --- a/cmake/FindLIBGCSS.cmake +++ b/cmake/FindLIBGCSS.cmake @@ -18,22 +18,22 @@ include(FindPackageHandleStandardArgs) find_package(PkgConfig) -pkg_check_modules(LIBGCSS libgcss) -if(NOT LIBGCSS_FOUND) - message(FATAL_ERROR "LIBGCSS not found") +pkg_check_modules(LIBGCSS${TARGET_SUFFIX} libgcss${TARGET_SUFFIX}) +if(NOT LIBGCSS${TARGET_SUFFIX}_FOUND) + message(FATAL_ERROR "LIBGCSS${TARGET_SUFFIX} not found") endif() -set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${LIBGCSS_LIBRARY_DIRS}) +set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${LIBGCSS${TARGET_SUFFIX}_LIBRARY_DIRS}) # Libraries -find_library(GCSS_LIB gcss) -set(LIBGCSS_LIBS ${GCSS_LIB}) +find_library(GCSS${TARGET_SUFFIX}_LIB gcss${TARGET_SUFFIX}) +set(LIBGCSS${TARGET_SUFFIX}_LIBS ${GCSS${TARGET_SUFFIX}_LIB}) # handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if # all listed variables are TRUE -find_package_handle_standard_args(LIBGCSS REQUIRED_VARS LIBGCSS_INCLUDE_DIRS LIBGCSS_LIBS) +find_package_handle_standard_args(LIBGCSS${TARGET_SUFFIX} REQUIRED_VARS LIBGCSS${TARGET_SUFFIX}_INCLUDE_DIRS LIBGCSS${TARGET_SUFFIX}_LIBS) -if(NOT LIBGCSS_FOUND) - message(FATAL_ERROR "LIBGCSS not found") +if(NOT LIBGCSS${TARGET_SUFFIX}_FOUND) + message(FATAL_ERROR "LIBGCSS${TARGET_SUFFIX} not found") endif() diff --git a/cmake/FindLIBIPU.cmake b/cmake/FindLIBIPU.cmake index 44c26459..9f8d9fc6 100644 --- a/cmake/FindLIBIPU.cmake +++ b/cmake/FindLIBIPU.cmake @@ -15,8 +15,16 @@ # if (TARGET ${IPU_VER}) - message("libcamhal found lib${IPU_VER} target") - return() + if (NOT BUILD_CAMHAL_PLUGIN) + message("libcamhal found lib${IPU_VER} target") + return() + endif() +endif() + +if(NOT DEFINED IPU_VER) + set(libipu_ver libipu4) +else() + set(libipu_ver lib${IPU_VER}) endif() # Get include and lib paths for LIBIPU from pkgconfig @@ -24,28 +32,22 @@ include(FindPackageHandleStandardArgs) # Include directory find_package(PkgConfig) -if(NOT DEFINED IPU_VER) -set(libipu_ver libipu4) -else() -set(libipu_ver lib${IPU_VER}) -endif() -pkg_check_modules(LIBIPU ${libipu_ver}) -if(NOT LIBIPU_FOUND) - message(FATAL_ERROR "LIBIPU not found") +pkg_check_modules(LIBIPU${TARGET_SUFFIX} ${libipu_ver}) +if(NOT LIBIPU${TARGET_SUFFIX}_FOUND) + message(FATAL_ERROR "LIBIPU${TARGET_SUFFIX} not found") endif() -set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${LIBIPU_LIBRARY_DIRS}) +set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${LIBIPU${TARGET_SUFFIX}_LIBRARY_DIRS}) # Libraries -find_library(IPU_LIB NAMES ${libipu_ver}.a) - -set(LIBIPU_LIBS ${IPU_LIB}) +find_library(IPU${TARGET_SUFFIX}_LIB NAMES ${libipu_ver}.a) +set(LIBIPU${TARGET_SUFFIX}_LIBS ${IPU${TARGET_SUFFIX}_LIB}) # handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if # all listed variables are TRUE -find_package_handle_standard_args(LIBIPU - REQUIRED_VARS LIBIPU_INCLUDE_DIRS LIBIPU_LIBS) +find_package_handle_standard_args(LIBIPU${TARGET_SUFFIX} + REQUIRED_VARS LIBIPU${TARGET_SUFFIX}_INCLUDE_DIRS LIBIPU${TARGET_SUFFIX}_LIBS) -if(NOT LIBIPU_FOUND) - message(FATAL_ERROR "LIBIPU not found") +if(NOT LIBIPU${TARGET_SUFFIX}_FOUND) + message(FATAL_ERROR "LIBIPU${TARGET_SUFFIX} not found") endif() diff --git a/cmake/libcamhal.pc.cmakein b/cmake/libcamhal.pc.cmakein index 27ad0986..e08ab497 100644 --- a/cmake/libcamhal.pc.cmakein +++ b/cmake/libcamhal.pc.cmakein @@ -1,7 +1,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ -exec_prefix=@CMAKE_INSTALL_PREFIX@ -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/libcamhal +exec_prefix=${prefix} +libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ +includedir=${prefix}/include/libcamhal Name: libcamhal Description: Camera HAL Library diff --git a/config/linux/ipu6/gcss/graph_settings_ar0234.xml b/config/linux/ipu6/gcss/graph_settings_ar0234.xml new file mode 100644 index 00000000..d32233ec --- /dev/null +++ b/config/linux/ipu6/gcss/graph_settings_ar0234.xml @@ -0,0 +1,578 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6/gcss/graph_settings_external_source.xml b/config/linux/ipu6/gcss/graph_settings_external_source.xml new file mode 100644 index 00000000..a25b82fc --- /dev/null +++ b/config/linux/ipu6/gcss/graph_settings_external_source.xml @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + legacy + true + + + diff --git a/config/linux/ipu6/gcss/graph_settings_hm11b1.xml b/config/linux/ipu6/gcss/graph_settings_hm11b1.xml index 289e0668..97063548 100644 --- a/config/linux/ipu6/gcss/graph_settings_hm11b1.xml +++ b/config/linux/ipu6/gcss/graph_settings_hm11b1.xml @@ -262,7 +262,7 @@ limitations under the License. - + @@ -1131,7 +1131,7 @@ limitations under the License. - + diff --git a/config/linux/ipu6/gcss/graph_settings_imx390.xml b/config/linux/ipu6/gcss/graph_settings_imx390.xml new file mode 100644 index 00000000..321e4884 --- /dev/null +++ b/config/linux/ipu6/gcss/graph_settings_imx390.xml @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6/gcss/graph_settings_usb.xml b/config/linux/ipu6/gcss/graph_settings_usb.xml new file mode 100644 index 00000000..b38fa1e5 --- /dev/null +++ b/config/linux/ipu6/gcss/graph_settings_usb.xml @@ -0,0 +1,329 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + legacy + true + + + diff --git a/config/linux/ipu6/hm11b1.aiqb b/config/linux/ipu6/hm11b1.aiqb deleted file mode 100644 index bd95d6c8..00000000 Binary files a/config/linux/ipu6/hm11b1.aiqb and /dev/null differ diff --git a/config/linux/ipu6/libcamhal_profile.xml b/config/linux/ipu6/libcamhal_profile.xml index 87b2e53a..23ffd607 100644 --- a/config/linux/ipu6/libcamhal_profile.xml +++ b/config/linux/ipu6/libcamhal_profile.xml @@ -1,5 +1,5 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6/sensors/ar0234_usb.xml b/config/linux/ipu6/sensors/ar0234_usb.xml new file mode 100755 index 00000000..b41b97d4 --- /dev/null +++ b/config/linux/ipu6/sensors/ar0234_usb.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6/sensors/external_source.xml b/config/linux/ipu6/sensors/external_source.xml new file mode 100644 index 00000000..9949e22e --- /dev/null +++ b/config/linux/ipu6/sensors/external_source.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6/sensors/hm11b1-uf.xml b/config/linux/ipu6/sensors/hm11b1-uf.xml index a5a418b3..12d3038a 100644 --- a/config/linux/ipu6/sensors/hm11b1-uf.xml +++ b/config/linux/ipu6/sensors/hm11b1-uf.xml @@ -16,12 +16,12 @@ - + - - + + @@ -31,6 +31,17 @@ + + + + + + + + + + + @@ -63,7 +74,7 @@ - + diff --git a/config/linux/ipu6/sensors/imx390.xml b/config/linux/ipu6/sensors/imx390.xml new file mode 100644 index 00000000..2afed977 --- /dev/null +++ b/config/linux/ipu6/sensors/imx390.xml @@ -0,0 +1,1677 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6/sensors/lt6911uxc.xml b/config/linux/ipu6/sensors/lt6911uxc.xml new file mode 100644 index 00000000..c45cd3c2 --- /dev/null +++ b/config/linux/ipu6/sensors/lt6911uxc.xml @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6/sensors/ov01a1s-uf.xml b/config/linux/ipu6/sensors/ov01a1s-uf.xml index 77404a59..ebb22baa 100644 --- a/config/linux/ipu6/sensors/ov01a1s-uf.xml +++ b/config/linux/ipu6/sensors/ov01a1s-uf.xml @@ -33,6 +33,17 @@ + + + + + + + + + + + diff --git a/config/linux/ipu6/tunning_profiles.xml b/config/linux/ipu6/tunning_profiles.xml new file mode 100644 index 00000000..f1bc2c1f --- /dev/null +++ b/config/linux/ipu6/tunning_profiles.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/AR0234_TGL_10bits.aiqb b/config/linux/ipu6ep/AR0234_TGL_10bits.aiqb new file mode 100644 index 00000000..a469723c Binary files /dev/null and b/config/linux/ipu6ep/AR0234_TGL_10bits.aiqb differ diff --git a/config/linux/ipu6ep/HI556_1BG502T3_ADL.aiqb b/config/linux/ipu6ep/HI556_1BG502T3_ADL.aiqb new file mode 100644 index 00000000..fa457e46 Binary files /dev/null and b/config/linux/ipu6ep/HI556_1BG502T3_ADL.aiqb differ diff --git a/config/linux/ipu6ep/HI556_CJFLE25_ADL.aiqb b/config/linux/ipu6ep/HI556_CJFLE25_ADL.aiqb new file mode 100644 index 00000000..fa457e46 Binary files /dev/null and b/config/linux/ipu6ep/HI556_CJFLE25_ADL.aiqb differ diff --git a/config/linux/ipu6ep/HM2170_1SG205N3_ADL.aiqb b/config/linux/ipu6ep/HM2170_1SG205N3_ADL.aiqb new file mode 100644 index 00000000..44cbeb6b Binary files /dev/null and b/config/linux/ipu6ep/HM2170_1SG205N3_ADL.aiqb differ diff --git a/config/linux/ipu6ep/HM2170_CJFME18_ADL.aiqb b/config/linux/ipu6ep/HM2170_CJFME18_ADL.aiqb new file mode 100644 index 00000000..948dd19a Binary files /dev/null and b/config/linux/ipu6ep/HM2170_CJFME18_ADL.aiqb differ diff --git a/config/linux/ipu6ep/IMX390_HDR_ADL.aiqb b/config/linux/ipu6ep/IMX390_HDR_ADL.aiqb new file mode 100644 index 00000000..a61ef56b Binary files /dev/null and b/config/linux/ipu6ep/IMX390_HDR_ADL.aiqb differ diff --git a/config/linux/ipu6ep/OV02C10_1BG203N3_ADL.aiqb b/config/linux/ipu6ep/OV02C10_1BG203N3_ADL.aiqb index 23a22780..89e8f10b 100644 Binary files a/config/linux/ipu6ep/OV02C10_1BG203N3_ADL.aiqb and b/config/linux/ipu6ep/OV02C10_1BG203N3_ADL.aiqb differ diff --git a/config/linux/ipu6ep/OV02C10_1SG204N3_ADL.aiqb b/config/linux/ipu6ep/OV02C10_1SG204N3_ADL.aiqb new file mode 100644 index 00000000..15db32e9 Binary files /dev/null and b/config/linux/ipu6ep/OV02C10_1SG204N3_ADL.aiqb differ diff --git a/config/linux/ipu6ep/OV02C10_CIFME14_ADL.aiqb b/config/linux/ipu6ep/OV02C10_CIFME14_ADL.aiqb new file mode 100644 index 00000000..15db32e9 Binary files /dev/null and b/config/linux/ipu6ep/OV02C10_CIFME14_ADL.aiqb differ diff --git a/config/linux/ipu6ep/OV08A10_YHUT_ADL.aiqb b/config/linux/ipu6ep/OV08A10_YHUT_ADL.aiqb new file mode 100644 index 00000000..aa833866 Binary files /dev/null and b/config/linux/ipu6ep/OV08A10_YHUT_ADL.aiqb differ diff --git a/config/linux/ipu6ep/gcss/graph_descriptor.xml b/config/linux/ipu6ep/gcss/graph_descriptor.xml index 75d4a3e2..d7e9617f 100644 --- a/config/linux/ipu6ep/gcss/graph_descriptor.xml +++ b/config/linux/ipu6ep/gcss/graph_descriptor.xml @@ -12307,7 +12307,6 @@ - @@ -12330,7 +12329,6 @@ - @@ -12356,7 +12354,6 @@ - @@ -12381,7 +12378,6 @@ - @@ -12412,7 +12408,6 @@ - @@ -12433,7 +12428,6 @@ - @@ -12456,7 +12450,6 @@ - @@ -12494,7 +12487,6 @@ - @@ -12517,7 +12509,6 @@ - @@ -12551,7 +12542,6 @@ - @@ -12575,7 +12565,6 @@ - @@ -12596,7 +12585,6 @@ - @@ -12622,7 +12610,6 @@ - @@ -12644,7 +12631,6 @@ - @@ -12670,7 +12656,6 @@ - @@ -12690,7 +12675,6 @@ - @@ -12716,7 +12700,6 @@ - @@ -12739,7 +12722,6 @@ - @@ -12789,7 +12771,6 @@ - @@ -12811,7 +12792,6 @@ - @@ -12865,7 +12845,6 @@ - @@ -12887,7 +12866,6 @@ - @@ -12934,7 +12912,6 @@ - @@ -13565,7 +13542,6 @@ - @@ -14131,7 +14107,6 @@ - @@ -14161,7 +14136,6 @@ - @@ -14309,7 +14283,6 @@ - @@ -14332,7 +14305,6 @@ - @@ -14350,7 +14322,6 @@ - @@ -14370,7 +14341,6 @@ - @@ -14388,7 +14358,6 @@ - @@ -14411,7 +14380,6 @@ - @@ -14455,7 +14423,6 @@ - @@ -14477,7 +14444,6 @@ - @@ -14515,7 +14481,6 @@ - @@ -14536,7 +14501,6 @@ - @@ -14593,7 +14557,6 @@ - @@ -14614,7 +14577,6 @@ - @@ -14645,7 +14607,6 @@ - @@ -14669,7 +14630,6 @@ - @@ -14690,7 +14650,6 @@ - @@ -14713,7 +14672,6 @@ - @@ -14735,7 +14693,6 @@ - @@ -14761,7 +14718,6 @@ - @@ -14783,7 +14739,6 @@ - @@ -14826,7 +14781,6 @@ - @@ -15287,7 +15241,6 @@ - @@ -15309,7 +15262,6 @@ - @@ -15352,7 +15304,6 @@ - @@ -15432,7 +15383,6 @@ - @@ -15457,7 +15407,6 @@ - @@ -15561,7 +15510,6 @@ - @@ -15582,7 +15530,6 @@ - @@ -15600,7 +15547,6 @@ - @@ -15637,7 +15583,6 @@ - @@ -15658,7 +15603,6 @@ - @@ -15680,7 +15624,6 @@ - @@ -15702,7 +15645,6 @@ - @@ -15724,7 +15666,6 @@ - @@ -15744,7 +15685,6 @@ - @@ -15766,7 +15706,6 @@ - @@ -15789,7 +15728,6 @@ - @@ -15832,7 +15770,6 @@ - @@ -15854,7 +15791,6 @@ - @@ -15900,7 +15836,6 @@ - @@ -15922,7 +15857,6 @@ - @@ -15969,7 +15903,6 @@ - diff --git a/config/linux/ipu6ep/gcss/graph_settings_HI556_1BG502T3_ADL.xml b/config/linux/ipu6ep/gcss/graph_settings_HI556_1BG502T3_ADL.xml new file mode 100644 index 00000000..274eb7be --- /dev/null +++ b/config/linux/ipu6ep/gcss/graph_settings_HI556_1BG502T3_ADL.xml @@ -0,0 +1,12689 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/gcss/graph_settings_HI556_CJFLE25_ADL.xml b/config/linux/ipu6ep/gcss/graph_settings_HI556_CJFLE25_ADL.xml new file mode 100644 index 00000000..274eb7be --- /dev/null +++ b/config/linux/ipu6ep/gcss/graph_settings_HI556_CJFLE25_ADL.xml @@ -0,0 +1,12689 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/gcss/graph_settings_HM2170_1SG205N3_ADL.xml b/config/linux/ipu6ep/gcss/graph_settings_HM2170_1SG205N3_ADL.xml new file mode 100644 index 00000000..c24aab0b --- /dev/null +++ b/config/linux/ipu6ep/gcss/graph_settings_HM2170_1SG205N3_ADL.xml @@ -0,0 +1,2507 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/gcss/graph_settings_HM2170_CJFME18_ADL.xml b/config/linux/ipu6ep/gcss/graph_settings_HM2170_CJFME18_ADL.xml new file mode 100644 index 00000000..c24aab0b --- /dev/null +++ b/config/linux/ipu6ep/gcss/graph_settings_HM2170_CJFME18_ADL.xml @@ -0,0 +1,2507 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/gcss/graph_settings_OV02C10_1BG203N3_ADL.xml b/config/linux/ipu6ep/gcss/graph_settings_OV02C10_1BG203N3_ADL.xml index 19dd4060..ccc449c9 100644 --- a/config/linux/ipu6ep/gcss/graph_settings_OV02C10_1BG203N3_ADL.xml +++ b/config/linux/ipu6ep/gcss/graph_settings_OV02C10_1BG203N3_ADL.xml @@ -1,6 +1,5 @@ - - - - + + - + - - + + - - + + - - + + @@ -40,11 +39,11 @@ See the License for the specific language governing permissions and - + - + @@ -61,13 +60,14 @@ See the License for the specific language governing permissions and + - + @@ -76,14 +76,14 @@ See the License for the specific language governing permissions and - - + + - + - - + + @@ -100,7 +100,7 @@ See the License for the specific language governing permissions and - + @@ -159,32 +159,32 @@ See the License for the specific language governing permissions and - - - + + + - + - - + +
- + - - + + - + @@ -196,8 +196,8 @@ See the License for the specific language governing permissions and - - + + @@ -208,8 +208,8 @@ See the License for the specific language governing permissions and - - + + @@ -230,28 +230,1823 @@ See the License for the specific language governing permissions and - + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + - - + + - - + + + - - + + - + - - + + @@ -268,7 +2063,7 @@ See the License for the specific language governing permissions and - + @@ -302,7 +2097,8 @@ See the License for the specific language governing permissions and - +
+ @@ -313,6 +2109,10 @@ See the License for the specific language governing permissions and + + + + @@ -324,44 +2124,45 @@ See the License for the specific language governing permissions and - - - + + + + - - + + - + - - + + -
+
- + - - + + - + - - + + - - + + @@ -372,54 +2173,60 @@ See the License for the specific language governing permissions and - - + + - - + + - - - +
+ + + - - + + - - + + + + + + - + - - + + - + + - - + + - + - - + + @@ -436,7 +2243,7 @@ See the License for the specific language governing permissions and - + @@ -471,16 +2278,25 @@ See the License for the specific language governing permissions and
+ + + + + + + + + @@ -488,33 +2304,19 @@ See the License for the specific language governing permissions and - - - - - - - - - - - - - - - + - - + + - + - - + + @@ -531,7 +2333,7 @@ See the License for the specific language governing permissions and - + @@ -567,48 +2369,48 @@ See the License for the specific language governing permissions and - - + + - - + + - - + + - + - - + + - - + + - + - + - - + + - + - - + + @@ -625,7 +2427,7 @@ See the License for the specific language governing permissions and - + @@ -661,142 +2463,142 @@ See the License for the specific language governing permissions and - - + + - - + + - - + + - + - - + + - - + + - + - + - - - - + + + + - + - - + + -
- - +
+ + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - - + + - + - - + + @@ -813,7 +2615,7 @@ See the License for the specific language governing permissions and - + @@ -849,48 +2651,48 @@ See the License for the specific language governing permissions and - - + + - - + + - - + + - + - - + + - - + + - + - + - - + + - + - - + + @@ -907,7 +2709,7 @@ See the License for the specific language governing permissions and - + @@ -943,48 +2745,48 @@ See the License for the specific language governing permissions and - - + + - - + + - - + + - + - - + + - - + + - + - + - - + + - + - - + + @@ -1001,7 +2803,7 @@ See the License for the specific language governing permissions and - + @@ -1037,48 +2839,48 @@ See the License for the specific language governing permissions and - - + + - - + + - - + + - + - - + + - - + + - + - + - - + + - + - - + + @@ -1095,7 +2897,7 @@ See the License for the specific language governing permissions and - + @@ -1129,144 +2931,136 @@ See the License for the specific language governing permissions and - - - - +
+ + + - - + + - - + + - - + + + + + + - - + + - - - - - - - - - + - - - - + + + + - + - - + + -
- - +
+ + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - - - +
+ + + - - + + - - + + - - + + + + + + - - + + - - - - - - - - - + - - + + - + - - + + @@ -1283,7 +3077,7 @@ See the License for the specific language governing permissions and - + @@ -1317,144 +3111,136 @@ See the License for the specific language governing permissions and - - - - +
+ + + - - + + - - + + - - + + + + + + - - + + - - - - - - - - - + - - - - + + + + - + - - + + -
- - +
+ + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - - - +
+ + + - - + + - - + + + + + + - + - - - - - - - - - + - + - + - - + + - + - - + + @@ -1471,7 +3257,7 @@ See the License for the specific language governing permissions and - + @@ -1510,7 +3296,7 @@ See the License for the specific language governing permissions and - + @@ -1532,19 +3318,19 @@ See the License for the specific language governing permissions and - + - - + + - + - - + + @@ -1561,7 +3347,7 @@ See the License for the specific language governing permissions and - + @@ -1600,7 +3386,7 @@ See the License for the specific language governing permissions and - + @@ -1622,19 +3408,19 @@ See the License for the specific language governing permissions and - + - - + + - + - - + + @@ -1651,7 +3437,7 @@ See the License for the specific language governing permissions and - + @@ -1690,7 +3476,7 @@ See the License for the specific language governing permissions and - + @@ -1712,19 +3498,19 @@ See the License for the specific language governing permissions and - + - - + + - + - - + + @@ -1741,7 +3527,7 @@ See the License for the specific language governing permissions and - + @@ -1780,7 +3566,7 @@ See the License for the specific language governing permissions and - + @@ -1802,19 +3588,19 @@ See the License for the specific language governing permissions and - + - - + + - + - - + + @@ -1831,7 +3617,7 @@ See the License for the specific language governing permissions and - + @@ -1870,7 +3656,7 @@ See the License for the specific language governing permissions and - + @@ -1892,18 +3678,98 @@ See the License for the specific language governing permissions and - + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - - + + @@ -1915,7 +3781,7 @@ See the License for the specific language governing permissions and - + @@ -1972,18 +3838,18 @@ See the License for the specific language governing permissions and - + - - + + - + - - + + @@ -1995,7 +3861,7 @@ See the License for the specific language governing permissions and - + @@ -2052,18 +3918,18 @@ See the License for the specific language governing permissions and - + - - + + - + - - + + @@ -2075,7 +3941,7 @@ See the License for the specific language governing permissions and - + @@ -2132,18 +3998,18 @@ See the License for the specific language governing permissions and - + - - + + - + - - + + @@ -2155,7 +4021,7 @@ See the License for the specific language governing permissions and - + diff --git a/config/linux/ipu6ep/gcss/graph_settings_OV02C10_1SG204N3_ADL.xml b/config/linux/ipu6ep/gcss/graph_settings_OV02C10_1SG204N3_ADL.xml new file mode 100644 index 00000000..ccc449c9 --- /dev/null +++ b/config/linux/ipu6ep/gcss/graph_settings_OV02C10_1SG204N3_ADL.xml @@ -0,0 +1,4077 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/gcss/graph_settings_OV02C10_CIFME14_ADL.xml b/config/linux/ipu6ep/gcss/graph_settings_OV02C10_CIFME14_ADL.xml new file mode 100644 index 00000000..ccc449c9 --- /dev/null +++ b/config/linux/ipu6ep/gcss/graph_settings_OV02C10_CIFME14_ADL.xml @@ -0,0 +1,4077 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/gcss/graph_settings_OV08A10_YHUT_ADL.xml b/config/linux/ipu6ep/gcss/graph_settings_OV08A10_YHUT_ADL.xml new file mode 100644 index 00000000..f82bc98a --- /dev/null +++ b/config/linux/ipu6ep/gcss/graph_settings_OV08A10_YHUT_ADL.xml @@ -0,0 +1,9513 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/gcss/graph_settings_ar0234.xml b/config/linux/ipu6ep/gcss/graph_settings_ar0234.xml new file mode 100644 index 00000000..040e423a --- /dev/null +++ b/config/linux/ipu6ep/gcss/graph_settings_ar0234.xml @@ -0,0 +1,578 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/gcss/graph_settings_external_source.xml b/config/linux/ipu6ep/gcss/graph_settings_external_source.xml new file mode 100644 index 00000000..a25b82fc --- /dev/null +++ b/config/linux/ipu6ep/gcss/graph_settings_external_source.xml @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + legacy + true + + + diff --git a/config/linux/ipu6ep/gcss/graph_settings_imx390.xml b/config/linux/ipu6ep/gcss/graph_settings_imx390.xml new file mode 100644 index 00000000..321e4884 --- /dev/null +++ b/config/linux/ipu6ep/gcss/graph_settings_imx390.xml @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/gcss/graph_settings_ov01a10.xml b/config/linux/ipu6ep/gcss/graph_settings_ov01a10.xml index 69a37992..9d71bb42 100644 --- a/config/linux/ipu6ep/gcss/graph_settings_ov01a10.xml +++ b/config/linux/ipu6ep/gcss/graph_settings_ov01a10.xml @@ -128,7 +128,7 @@ See the License for the specific language governing permissions and - + @@ -212,7 +212,7 @@ See the License for the specific language governing permissions and - + @@ -296,7 +296,7 @@ See the License for the specific language governing permissions and -
+
@@ -376,7 +376,7 @@ See the License for the specific language governing permissions and - + @@ -460,7 +460,7 @@ See the License for the specific language governing permissions and - + @@ -827,7 +827,7 @@ See the License for the specific language governing permissions and - + @@ -921,8 +921,8 @@ See the License for the specific language governing permissions and -
- +
+ @@ -1102,7 +1102,7 @@ See the License for the specific language governing permissions and
- + diff --git a/config/linux/ipu6ep/gcss/graph_settings_ov01a1s.xml b/config/linux/ipu6ep/gcss/graph_settings_ov01a1s.xml new file mode 100644 index 00000000..33b890eb --- /dev/null +++ b/config/linux/ipu6ep/gcss/graph_settings_ov01a1s.xml @@ -0,0 +1,3040 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/gcss/graph_settings_ov13b10.xml b/config/linux/ipu6ep/gcss/graph_settings_ov13b10.xml new file mode 100644 index 00000000..6ac67df3 --- /dev/null +++ b/config/linux/ipu6ep/gcss/graph_settings_ov13b10.xml @@ -0,0 +1,6796 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + diff --git a/config/linux/ipu6ep/gcss/graph_settings_usb.xml b/config/linux/ipu6ep/gcss/graph_settings_usb.xml new file mode 100644 index 00000000..f244c832 --- /dev/null +++ b/config/linux/ipu6ep/gcss/graph_settings_usb.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/libcamhal_profile.xml b/config/linux/ipu6ep/libcamhal_profile.xml index c3a028bc..f167d84f 100644 --- a/config/linux/ipu6ep/libcamhal_profile.xml +++ b/config/linux/ipu6ep/libcamhal_profile.xml @@ -1,5 +1,5 @@ - - + + diff --git a/config/linux/ipu6ep/ov01a1s.aiqb b/config/linux/ipu6ep/ov01a1s.aiqb new file mode 100644 index 00000000..f175ecd9 Binary files /dev/null and b/config/linux/ipu6ep/ov01a1s.aiqb differ diff --git a/config/linux/ipu6ep/ov13b10.aiqb b/config/linux/ipu6ep/ov13b10.aiqb new file mode 100644 index 00000000..b1428c69 Binary files /dev/null and b/config/linux/ipu6ep/ov13b10.aiqb differ diff --git a/config/linux/ipu6ep/ov8856.aiqb b/config/linux/ipu6ep/ov8856.aiqb new file mode 100644 index 00000000..97d8ff72 Binary files /dev/null and b/config/linux/ipu6ep/ov8856.aiqb differ diff --git a/config/linux/ipu6ep/psys_policy_profiles.xml b/config/linux/ipu6ep/psys_policy_profiles.xml index c5daa790..eb6fb30f 100644 --- a/config/linux/ipu6ep/psys_policy_profiles.xml +++ b/config/linux/ipu6ep/psys_policy_profiles.xml @@ -1,5 +1,5 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -29,4 +51,12 @@ limitations under the License. + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/ar0234.xml b/config/linux/ipu6ep/sensors/ar0234.xml new file mode 100644 index 00000000..df0a2475 --- /dev/null +++ b/config/linux/ipu6ep/sensors/ar0234.xml @@ -0,0 +1,337 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/ar0234_usb.xml b/config/linux/ipu6ep/sensors/ar0234_usb.xml new file mode 100755 index 00000000..07a7f851 --- /dev/null +++ b/config/linux/ipu6ep/sensors/ar0234_usb.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/external_source.xml b/config/linux/ipu6ep/sensors/external_source.xml new file mode 100644 index 00000000..6c85981b --- /dev/null +++ b/config/linux/ipu6ep/sensors/external_source.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/hi556-uf.xml b/config/linux/ipu6ep/sensors/hi556-uf.xml new file mode 100644 index 00000000..338952cd --- /dev/null +++ b/config/linux/ipu6ep/sensors/hi556-uf.xml @@ -0,0 +1,511 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/hm2170-uf.xml b/config/linux/ipu6ep/sensors/hm2170-uf.xml new file mode 100644 index 00000000..4e72419d --- /dev/null +++ b/config/linux/ipu6ep/sensors/hm2170-uf.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/imx390.xml b/config/linux/ipu6ep/sensors/imx390.xml new file mode 100644 index 00000000..2e104dfb --- /dev/null +++ b/config/linux/ipu6ep/sensors/imx390.xml @@ -0,0 +1,1441 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/isx031.xml b/config/linux/ipu6ep/sensors/isx031.xml new file mode 100644 index 00000000..2dee4812 --- /dev/null +++ b/config/linux/ipu6ep/sensors/isx031.xml @@ -0,0 +1,553 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/lt6911uxc.xml b/config/linux/ipu6ep/sensors/lt6911uxc.xml new file mode 100644 index 00000000..0f2f0c1c --- /dev/null +++ b/config/linux/ipu6ep/sensors/lt6911uxc.xml @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/lt6911uxe.xml b/config/linux/ipu6ep/sensors/lt6911uxe.xml new file mode 100644 index 00000000..f9d5dd06 --- /dev/null +++ b/config/linux/ipu6ep/sensors/lt6911uxe.xml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/ov01a10-uf.xml b/config/linux/ipu6ep/sensors/ov01a10-uf.xml index 86b0f03b..9691ad6e 100644 --- a/config/linux/ipu6ep/sensors/ov01a10-uf.xml +++ b/config/linux/ipu6ep/sensors/ov01a10-uf.xml @@ -33,12 +33,23 @@ + + + + + + + + + + + - + - + diff --git a/config/linux/ipu6ep/sensors/ov01a1s-uf.xml b/config/linux/ipu6ep/sensors/ov01a1s-uf.xml new file mode 100644 index 00000000..333db94a --- /dev/null +++ b/config/linux/ipu6ep/sensors/ov01a1s-uf.xml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/ov02c10-uf.xml b/config/linux/ipu6ep/sensors/ov02c10-uf.xml index 27e716c9..200cb19b 100644 --- a/config/linux/ipu6ep/sensors/ov02c10-uf.xml +++ b/config/linux/ipu6ep/sensors/ov02c10-uf.xml @@ -1,5 +1,5 @@ - - - - + + + + @@ -29,6 +29,17 @@ + + + + + + + + + + + @@ -62,7 +73,7 @@ - + @@ -80,7 +91,163 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/ov08a10-uf.xml b/config/linux/ipu6ep/sensors/ov08a10-uf.xml new file mode 100644 index 00000000..f4a1727c --- /dev/null +++ b/config/linux/ipu6ep/sensors/ov08a10-uf.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/ov13b10-uf.xml b/config/linux/ipu6ep/sensors/ov13b10-uf.xml new file mode 100644 index 00000000..13f579b3 --- /dev/null +++ b/config/linux/ipu6ep/sensors/ov13b10-uf.xml @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/ov13b10-wf.xml b/config/linux/ipu6ep/sensors/ov13b10-wf.xml new file mode 100644 index 00000000..0f1e042d --- /dev/null +++ b/config/linux/ipu6ep/sensors/ov13b10-wf.xml @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/ov2740-uf.xml b/config/linux/ipu6ep/sensors/ov2740-uf.xml index 72964215..c29da475 100644 --- a/config/linux/ipu6ep/sensors/ov2740-uf.xml +++ b/config/linux/ipu6ep/sensors/ov2740-uf.xml @@ -1,5 +1,5 @@ - + + + + + + + + + + @@ -70,8 +81,9 @@ - - + + + @@ -81,5 +93,8 @@ + + + diff --git a/config/linux/ipu6ep/sensors/ov8856-uf.xml b/config/linux/ipu6ep/sensors/ov8856-uf.xml index c0aca646..92cc817c 100644 --- a/config/linux/ipu6ep/sensors/ov8856-uf.xml +++ b/config/linux/ipu6ep/sensors/ov8856-uf.xml @@ -31,6 +31,17 @@ + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/ov8856-wf.xml b/config/linux/ipu6ep/sensors/ov8856-wf.xml index 65cc1c0e..7c636c31 100644 --- a/config/linux/ipu6ep/sensors/ov8856-wf.xml +++ b/config/linux/ipu6ep/sensors/ov8856-wf.xml @@ -31,6 +31,17 @@ + + + + + + + + + + + diff --git a/config/linux/ipu6ep/tunning_profiles.xml b/config/linux/ipu6ep/tunning_profiles.xml new file mode 100644 index 00000000..f1bc2c1f --- /dev/null +++ b/config/linux/ipu6ep/tunning_profiles.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_descriptor.xml b/config/linux/ipu6epmtl/gcss/graph_descriptor.xml new file mode 100644 index 00000000..5108edd4 --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_descriptor.xml @@ -0,0 +1,15238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_HI556_1BG502T3_ADL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_HI556_1BG502T3_ADL.xml new file mode 100644 index 00000000..274eb7be --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_HI556_1BG502T3_ADL.xml @@ -0,0 +1,12689 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_HI556_CJFLE25_ADL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_HI556_CJFLE25_ADL.xml new file mode 100644 index 00000000..274eb7be --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_HI556_CJFLE25_ADL.xml @@ -0,0 +1,12689 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_HM2170_1SG205N3_ADL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_HM2170_1SG205N3_ADL.xml new file mode 100644 index 00000000..c24aab0b --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_HM2170_1SG205N3_ADL.xml @@ -0,0 +1,2507 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_HM2170_CJFME18_ADL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_HM2170_CJFME18_ADL.xml new file mode 100644 index 00000000..c24aab0b --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_HM2170_CJFME18_ADL.xml @@ -0,0 +1,2507 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_OV02C10_1BG203N3_ADL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_OV02C10_1BG203N3_ADL.xml new file mode 100644 index 00000000..ccc449c9 --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_OV02C10_1BG203N3_ADL.xml @@ -0,0 +1,4077 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_OV02C10_1SG204N3_ADL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_OV02C10_1SG204N3_ADL.xml new file mode 100644 index 00000000..ccc449c9 --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_OV02C10_1SG204N3_ADL.xml @@ -0,0 +1,4077 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_OV02C10_CIFME14_ADL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_OV02C10_CIFME14_ADL.xml new file mode 100644 index 00000000..ccc449c9 --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_OV02C10_CIFME14_ADL.xml @@ -0,0 +1,4077 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_OV02E10_ASG202N3_MTL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_OV02E10_ASG202N3_MTL.xml new file mode 100644 index 00000000..69c78ff6 --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_OV02E10_ASG202N3_MTL.xml @@ -0,0 +1,2629 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_OV05C10_BBG501N3_MTL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_OV05C10_BBG501N3_MTL.xml new file mode 100644 index 00000000..1a55fd7e --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_OV05C10_BBG501N3_MTL.xml @@ -0,0 +1,8406 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_OV08X40_CJFME55_MTL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_OV08X40_CJFME55_MTL.xml new file mode 100644 index 00000000..516b491f --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_OV08X40_CJFME55_MTL.xml @@ -0,0 +1,5438 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_OV13B10_09B13_DPC_T3_MTL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_OV13B10_09B13_DPC_T3_MTL.xml new file mode 100644 index 00000000..a1de3c8f --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_OV13B10_09B13_DPC_T3_MTL.xml @@ -0,0 +1,18602 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_ar0234.xml b/config/linux/ipu6epmtl/gcss/graph_settings_ar0234.xml new file mode 100644 index 00000000..040e423a --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_ar0234.xml @@ -0,0 +1,578 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_external_source.xml b/config/linux/ipu6epmtl/gcss/graph_settings_external_source.xml new file mode 100644 index 00000000..a25b82fc --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_external_source.xml @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + legacy + true + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_hm2172_ASG205N3_MTL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_hm2172_ASG205N3_MTL.xml new file mode 100644 index 00000000..e437ba90 --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_hm2172_ASG205N3_MTL.xml @@ -0,0 +1,3262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_imx390.xml b/config/linux/ipu6epmtl/gcss/graph_settings_imx390.xml new file mode 100644 index 00000000..321e4884 --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_imx390.xml @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_ov01a1s.xml b/config/linux/ipu6epmtl/gcss/graph_settings_ov01a1s.xml new file mode 100644 index 00000000..33b890eb --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_ov01a1s.xml @@ -0,0 +1,3040 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_ov01a_1BG101N3_MTL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_ov01a_1BG101N3_MTL.xml new file mode 100644 index 00000000..3bf10539 --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_ov01a_1BG101N3_MTL.xml @@ -0,0 +1,1112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_ov01a_CJFLE21_MTL.xml b/config/linux/ipu6epmtl/gcss/graph_settings_ov01a_CJFLE21_MTL.xml new file mode 100644 index 00000000..3bf10539 --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_ov01a_CJFLE21_MTL.xml @@ -0,0 +1,1112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_ov5675.xml b/config/linux/ipu6epmtl/gcss/graph_settings_ov5675.xml new file mode 100644 index 00000000..13c40bb4 --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_ov5675.xml @@ -0,0 +1,8269 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_usb.xml b/config/linux/ipu6epmtl/gcss/graph_settings_usb.xml new file mode 100644 index 00000000..f244c832 --- /dev/null +++ b/config/linux/ipu6epmtl/gcss/graph_settings_usb.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/libcamhal_profile.xml b/config/linux/ipu6epmtl/libcamhal_profile.xml new file mode 100644 index 00000000..e51ac861 --- /dev/null +++ b/config/linux/ipu6epmtl/libcamhal_profile.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/psys_policy_profiles.xml b/config/linux/ipu6epmtl/psys_policy_profiles.xml new file mode 100644 index 00000000..588f8f13 --- /dev/null +++ b/config/linux/ipu6epmtl/psys_policy_profiles.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/ar0234-1.xml b/config/linux/ipu6epmtl/sensors/ar0234-1.xml new file mode 100644 index 00000000..3f5e377b --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/ar0234-1.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/ar0234-2.xml b/config/linux/ipu6epmtl/sensors/ar0234-2.xml new file mode 100644 index 00000000..2e329251 --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/ar0234-2.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/ar0234_usb.xml b/config/linux/ipu6epmtl/sensors/ar0234_usb.xml new file mode 100755 index 00000000..07a7f851 --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/ar0234_usb.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/external_source.xml b/config/linux/ipu6epmtl/sensors/external_source.xml new file mode 100644 index 00000000..6c85981b --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/external_source.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/hi556-uf.xml b/config/linux/ipu6epmtl/sensors/hi556-uf.xml new file mode 100644 index 00000000..338952cd --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/hi556-uf.xml @@ -0,0 +1,511 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/hm2170-uf.xml b/config/linux/ipu6epmtl/sensors/hm2170-uf.xml new file mode 100644 index 00000000..4e72419d --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/hm2170-uf.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/hm2172-uf.xml b/config/linux/ipu6epmtl/sensors/hm2172-uf.xml new file mode 100644 index 00000000..fb210c3b --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/hm2172-uf.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/imx390.xml b/config/linux/ipu6epmtl/sensors/imx390.xml new file mode 100644 index 00000000..e400a2be --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/imx390.xml @@ -0,0 +1,1085 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/lt6911uxc.xml b/config/linux/ipu6epmtl/sensors/lt6911uxc.xml new file mode 100644 index 00000000..390eacdd --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/lt6911uxc.xml @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/lt6911uxe-1.xml b/config/linux/ipu6epmtl/sensors/lt6911uxe-1.xml new file mode 100644 index 00000000..7e9f28fd --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/lt6911uxe-1.xml @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/lt6911uxe-2.xml b/config/linux/ipu6epmtl/sensors/lt6911uxe-2.xml new file mode 100644 index 00000000..c8ec91b7 --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/lt6911uxe-2.xml @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/ov01a10-uf.xml b/config/linux/ipu6epmtl/sensors/ov01a10-uf.xml new file mode 100644 index 00000000..a559a8a1 --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/ov01a10-uf.xml @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/ov01a1s-uf.xml b/config/linux/ipu6epmtl/sensors/ov01a1s-uf.xml new file mode 100644 index 00000000..23d243c9 --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/ov01a1s-uf.xml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/ov02c10-uf.xml b/config/linux/ipu6epmtl/sensors/ov02c10-uf.xml new file mode 100644 index 00000000..eb456069 --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/ov02c10-uf.xml @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/ov02e10-uf.xml b/config/linux/ipu6epmtl/sensors/ov02e10-uf.xml new file mode 100644 index 00000000..6a5be509 --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/ov02e10-uf.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/ov05c10-uf.xml b/config/linux/ipu6epmtl/sensors/ov05c10-uf.xml new file mode 100644 index 00000000..9cefa580 --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/ov05c10-uf.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/ov08x40-uf.xml b/config/linux/ipu6epmtl/sensors/ov08x40-uf.xml new file mode 100644 index 00000000..51b9d320 --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/ov08x40-uf.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/ov13b10-uf.xml b/config/linux/ipu6epmtl/sensors/ov13b10-uf.xml new file mode 100644 index 00000000..8d7cbf11 --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/ov13b10-uf.xml @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/ov13b10-wf.xml b/config/linux/ipu6epmtl/sensors/ov13b10-wf.xml new file mode 100644 index 00000000..4fc52108 --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/ov13b10-wf.xml @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/sensors/ov5675-uf.xml b/config/linux/ipu6epmtl/sensors/ov5675-uf.xml new file mode 100644 index 00000000..f12183e2 --- /dev/null +++ b/config/linux/ipu6epmtl/sensors/ov5675-uf.xml @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/tunning_profiles.xml b/config/linux/ipu6epmtl/tunning_profiles.xml new file mode 100644 index 00000000..f1bc2c1f --- /dev/null +++ b/config/linux/ipu6epmtl/tunning_profiles.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + diff --git a/config/linux/ipu6sepla/gcss/graph_descriptor.xml b/config/linux/ipu6sepla/gcss/graph_descriptor.xml new file mode 100644 index 00000000..93226830 --- /dev/null +++ b/config/linux/ipu6sepla/gcss/graph_descriptor.xml @@ -0,0 +1,1965 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6sepla/gcss/graph_settings_OV13858_YHCE_JSLP.xml b/config/linux/ipu6sepla/gcss/graph_settings_OV13858_YHCE_JSLP.xml new file mode 100644 index 00000000..70285a3c --- /dev/null +++ b/config/linux/ipu6sepla/gcss/graph_settings_OV13858_YHCE_JSLP.xml @@ -0,0 +1,629 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6sepla/libcamhal_profile.xml b/config/linux/ipu6sepla/libcamhal_profile.xml new file mode 100644 index 00000000..471609b5 --- /dev/null +++ b/config/linux/ipu6sepla/libcamhal_profile.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + diff --git a/config/linux/ipu6sepla/psys_policy_profiles.xml b/config/linux/ipu6sepla/psys_policy_profiles.xml new file mode 100644 index 00000000..d5cf006a --- /dev/null +++ b/config/linux/ipu6sepla/psys_policy_profiles.xml @@ -0,0 +1,23 @@ + + + + + + + + + + diff --git a/config/linux/ipu6sepla/sensors/ov13858-uf.xml b/config/linux/ipu6sepla/sensors/ov13858-uf.xml new file mode 100644 index 00000000..b27ea2eb --- /dev/null +++ b/config/linux/ipu6sepla/sensors/ov13858-uf.xml @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/rules.d/60-intel-ipu-adlp.rules b/config/linux/rules.d/60-intel-ipu-adlp.rules deleted file mode 100644 index d6a5df1b..00000000 --- a/config/linux/rules.d/60-intel-ipu-adlp.rules +++ /dev/null @@ -1,57 +0,0 @@ -# aiqb -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libtbd.so.0.0.0 /usr/lib/libtbd.so.0.0.0" - -# libiaaiq -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libSkyCamAIC.so /usr/lib/libSkyCamAIC.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libSkyCamAICKBL.so /usr/lib/libSkyCamAICKBL.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libStatsConverter.so /usr/lib/libStatsConverter.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libbroxton_ia_pal.so /usr/lib/libbroxton_ia_pal.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_aec.so /usr/lib/libia_aec.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_aic.so /usr/lib/libia_aic.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_aic_engine.so /usr/lib/libia_aic_engine.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_aic_myriad.so /usr/lib/libia_aic_myriad.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_aiq.so /usr/lib/libia_aiq.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_aiq_file_debug.so /usr/lib/libia_aiq_file_debug.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_aiqb_parser.so /usr/lib/libia_aiqb_parser.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_bcomp.so /usr/lib/libia_bcomp.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_cca.so /usr/lib/libia_cca.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_cca_file_debug.so /usr/lib/libia_cca_file_debug.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_ccat.so /usr/lib/libia_ccat.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_cmc_parser.so /usr/lib/libia_cmc_parser.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_coordinate.so /usr/lib/libia_coordinate.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_dpc.so /usr/lib/libia_dpc.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_dvs.so /usr/lib/libia_dvs.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_dvs_file_debug.so /usr/lib/libia_dvs_file_debug.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_emd_decoder.so /usr/lib/libia_emd_decoder.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_exc.so /usr/lib/libia_exc.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_intrinsics.so /usr/lib/libia_intrinsics.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_isp_bxt.so /usr/lib/libia_isp_bxt.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_isp_bxt_file_debug.so /usr/lib/libia_isp_bxt_file_debug.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_lard.so /usr/lib/libia_lard.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_log.so /usr/lib/libia_log.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_ltm.so /usr/lib/libia_ltm.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_ltm_file_debug.so /usr/lib/libia_ltm_file_debug.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_me_corner.so /usr/lib/libia_me_corner.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_mkn.so /usr/lib/libia_mkn.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_nvm.so /usr/lib/libia_nvm.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_ob.so /usr/lib/libia_ob.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_pd.so /usr/lib/libia_pd.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_view.so /usr/lib/libia_view.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libpvl_blink_detection.so /usr/lib/libpvl_blink_detection.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libpvl_eye_detection.so /usr/lib/libpvl_eye_detection.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libpvl_face_detection.so /usr/lib/libpvl_face_detection.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libpvl_face_recognition.so /usr/lib/libpvl_face_recognition.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libpvl_mouth_detection.so /usr/lib/libpvl_mouth_detection.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libpvl_object_tracking.so /usr/lib/libpvl_object_tracking.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libpvl_smile_detection.so /usr/lib/libpvl_smile_detection.so" - -# libiacss -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libcisu.so.0.0.0 /usr/lib/libcisu.so.0.0.0" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libcisu_os_plugin.so.1.0.0 /usr/lib/libcisu_os_plugin.so.1.0.0" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libgcss.so.0.0.0 /usr/lib/libgcss.so.0.0.0" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_camera.so.0.0.0 /usr/lib/libia_camera.so.0.0.0" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libia_cipf.so.0.0.0 /usr/lib/libia_cipf.so.0.0.0" - -# libcamhal -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/lib/ipu6ep/libcamhal.so /usr/lib/libcamhal.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/bin/ln -sf /usr/share/defaults/etc/ipu6ep/camera /usr/share/defaults/etc/camera" \ No newline at end of file diff --git a/config/linux/rules.d/60-intel-ipu-tglu.rules b/config/linux/rules.d/60-intel-ipu-tglu.rules deleted file mode 100644 index b56bbf75..00000000 --- a/config/linux/rules.d/60-intel-ipu-tglu.rules +++ /dev/null @@ -1,57 +0,0 @@ -# aiqb -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libtbd.so.0.0.0 /usr/lib/libtbd.so.0.0.0" - -# libiaaiq -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libSkyCamAIC.so /usr/lib/libSkyCamAIC.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libSkyCamAICKBL.so /usr/lib/libSkyCamAICKBL.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libStatsConverter.so /usr/lib/libStatsConverter.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libbroxton_ia_pal.so /usr/lib/libbroxton_ia_pal.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_aec.so /usr/lib/libia_aec.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_aic.so /usr/lib/libia_aic.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_aic_engine.so /usr/lib/libia_aic_engine.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_aic_myriad.so /usr/lib/libia_aic_myriad.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_aiq.so /usr/lib/libia_aiq.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_aiq_file_debug.so /usr/lib/libia_aiq_file_debug.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_aiqb_parser.so /usr/lib/libia_aiqb_parser.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_bcomp.so /usr/lib/libia_bcomp.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_cca.so /usr/lib/libia_cca.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_cca_file_debug.so /usr/lib/libia_cca_file_debug.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_ccat.so /usr/lib/libia_ccat.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_cmc_parser.so /usr/lib/libia_cmc_parser.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_coordinate.so /usr/lib/libia_coordinate.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_dpc.so /usr/lib/libia_dpc.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_dvs.so /usr/lib/libia_dvs.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_dvs_file_debug.so /usr/lib/libia_dvs_file_debug.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_emd_decoder.so /usr/lib/libia_emd_decoder.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_exc.so /usr/lib/libia_exc.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_intrinsics.so /usr/lib/libia_intrinsics.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_isp_bxt.so /usr/lib/libia_isp_bxt.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_isp_bxt_file_debug.so /usr/lib/libia_isp_bxt_file_debug.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_lard.so /usr/lib/libia_lard.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_log.so /usr/lib/libia_log.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_ltm.so /usr/lib/libia_ltm.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_ltm_file_debug.so /usr/lib/libia_ltm_file_debug.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_me_corner.so /usr/lib/libia_me_corner.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_mkn.so /usr/lib/libia_mkn.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_nvm.so /usr/lib/libia_nvm.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_ob.so /usr/lib/libia_ob.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_pd.so /usr/lib/libia_pd.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_view.so /usr/lib/libia_view.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libpvl_blink_detection.so /usr/lib/libpvl_blink_detection.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libpvl_eye_detection.so /usr/lib/libpvl_eye_detection.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libpvl_face_detection.so /usr/lib/libpvl_face_detection.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libpvl_face_recognition.so /usr/lib/libpvl_face_recognition.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libpvl_mouth_detection.so /usr/lib/libpvl_mouth_detection.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libpvl_object_tracking.so /usr/lib/libpvl_object_tracking.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libpvl_smile_detection.so /usr/lib/libpvl_smile_detection.so" - -# libiacss -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libcisu.so.0.0.0 /usr/lib/libcisu.so.0.0.0" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libcisu_os_plugin.so.1.0.0 /usr/lib/libcisu_os_plugin.so.1.0.0" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libgcss.so.0.0.0 /usr/lib/libgcss.so.0.0.0" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_camera.so.0.0.0 /usr/lib/libia_camera.so.0.0.0" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libia_cipf.so.0.0.0 /usr/lib/libia_cipf.so.0.0.0" - -# libcamhal -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/lib/ipu6/libcamhal.so /usr/lib/libcamhal.so" -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/bin/ln -sf /usr/share/defaults/etc/ipu6/camera /usr/share/defaults/etc/camera" diff --git a/include/api/ICamera.h b/include/api/ICamera.h index 4bc8ca32..09e15b34 100644 --- a/include/api/ICamera.h +++ b/include/api/ICamera.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2020 Intel Corporation. + * Copyright (C) 2015-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,6 +68,11 @@ * Version 0.61 Add API camera_callback_register() to notify event to AAL ******************************************************************************* * Version 0.62 Add sequence in camera_get_parameters to fetch settings + ******************************************************************************* + * Version 0.63 Merge camera_device_open API with/without vc_num together + * ------------------------------------------------------------------------------ + ******************************************************************************* + * Version 0.64 Remove deprecated VC API * ------------------------------------------------------------------------------ * */ @@ -91,6 +96,9 @@ typedef struct { const char* name; /**< Sensor name */ const char* description; /**< Sensor description */ const Parameters* capability; /**< camera capability */ + // VIRTUAL_CHANNEL_S + vc_info_t vc; /**< Virtual Channel information */ + // VIRTUAL_CHANNEL_E } camera_info_t; /** @@ -194,6 +202,10 @@ void camera_callback_register(int camera_id, const camera_callback_ops_t* callba * * \param[in] * int camera_id: ID of the camera + // VIRTUAL_CHANNEL_S + * \param[in] + * int vc_num: the total virtual channel camera number to be opened, default value is 0 + // VIRTUAL_CHANNEL_E * * \return * 0 succeed to open camera device @@ -207,7 +219,7 @@ void camera_callback_register(int camera_id, const camera_callback_ops_t* callba * int ret = camera_device_open(camera_id); * \endcode **/ -int camera_device_open(int camera_id); +int camera_device_open(int camera_id, int vc_num = 0); /** * \brief diff --git a/include/api/Parameters.h b/include/api/Parameters.h index 72d97b52..c696d064 100644 --- a/include/api/Parameters.h +++ b/include/api/Parameters.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2013 The Android Open Source Project - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,6 +81,32 @@ namespace icamera { /***************Start of Camera Basic Data Structure ****************************/ + +// VIRTUAL_CHANNEL_S +/** + * \struct vc_info_t: Define the virtual channel information for the device + */ +typedef struct { + int total_num; /**< the total camera number of virtual channel. 0: the virtual channel is + disabled */ + int sequence; /**< the current camera's sequence in all the virtual channel cameras */ + int group; /**< the virtual channel group id */ +} vc_info_t; +// VIRTUAL_CHANNEL_E + +// IPU7_FEATURE_S +/** + * \struct device_info_t: Define each camera basic information + */ +typedef struct { + int facing; + int orientation; + int device_version; + const char* name; /**< Sensor name */ + const char* description; /**< Sensor description */ +} device_info_t; +// IPU7_FEATURE_E + /** * Basic definition will be inherited by more complicated structure. * MUST be all "int" in this structure. @@ -196,8 +222,9 @@ typedef struct { */ uint32_t max_buffers; - int usage; /** stream_array_t; @@ -232,6 +259,7 @@ typedef enum { BUFFER_FLAG_INTERNAL = 1 << 1, BUFFER_FLAG_SW_READ = 1 << 2, BUFFER_FLAG_SW_WRITE = 1 << 3, + BUFFER_FLAG_NO_FLUSH = 1 << 4, } camera_buffer_flags_t; /** @@ -250,8 +278,9 @@ typedef struct { int flags; /**< buffer flags, its type is camera_buffer_flags_t, used to specify buffer properties */ uint64_t timestamp; /**< buffer timestamp, it's a time reference measured in nanosecond */ - uint32_t requestId; /**< buffer requestId, it's a request id of buffer */ - int reserved; /**< reserved for future */ + uint32_t frameNumber; /**< buffer frameNumber, it's an id of buffer */ + uint64_t privateHandle; /**< used to pass private data */ + uint64_t reserved; /**< reserved for future */ } camera_buffer_t; /** @@ -341,6 +370,8 @@ typedef enum { * This stream is an output stream for Opaque RAW reprocess. */ CAMERA_STREAM_OPAQUE_RAW, + + CAMERA_STREAM_MAX, } camera_stream_usage_t; /** @@ -726,6 +757,8 @@ typedef enum { CAMERA_METADATA_READY, CAMERA_DEVICE_ERROR, CAMERA_IPC_ERROR, + CAMERA_FRAME_DONE, + CAMERA_METADATA_ENTRY, } camera_msg_type_t; /** @@ -745,12 +778,12 @@ typedef enum { } raw_data_output_t; /** - * \struct Sensor RAW data info for ZSL. + * \struct Sensor data info for ZSL and YUV reprocessing. */ typedef struct { int64_t sequence; uint64_t timestamp; -} sensor_raw_info_t; +} sensor_data_info_t; /** * \struct isp_buffer_ready_t: Use to send isp buffer ready event data. @@ -768,6 +801,26 @@ typedef struct { int64_t sequence; } metadata_ready_t; +/** + * \struct metadata_entry_t: Use to set metadata entry. + */ +typedef struct { + uint32_t tag; + uint32_t frameNumber; + size_t count; + union { + const uint8_t* u8; + const int32_t* i32; + const float* f; + const int64_t* i64; + const double* d; + } data; +} metadata_entry_t; + +typedef struct { + int32_t streamId; +} frame_ready_t; + /** * \struct camera_msg_data_t: Use to specify msg data. */ @@ -776,6 +829,8 @@ typedef struct { union { isp_buffer_ready_t buffer_ready; metadata_ready_t metadata_ready; + frame_ready_t frame_ready; + metadata_entry_t metadata_entry; } data; } camera_msg_data_t; @@ -1036,6 +1091,22 @@ typedef enum { LENS_SHADING_MAP_MODE_ON } camera_lens_shading_map_mode_type_t; +// IPU7_FEATURE_S +typedef enum { + CAMERA_STATISTICS_FACE_DETECT_MODE_OFF, + CAMERA_STATISTICS_FACE_DETECT_MODE_SIMPLE, + CAMERA_STATISTICS_FACE_DETECT_MODE_FULL, +} camera_statistics_face_detect_mode_t; +// IPU7_FEATURE_E + +typedef enum { + ROTATE_NONE, + ROTATE_90, + ROTATE_180, + ROTATE_270, + ROTATE_AUTO, +} camera_rotate_mode_t; + /** * \struct camera_zoom_region_t: Used to specify zoom regions. */ @@ -1044,6 +1115,8 @@ typedef struct { int32_t top; int32_t right; int32_t bottom; + float ratio; + camera_rotate_mode_t rotateMode; } camera_zoom_region_t; /** @@ -1930,6 +2003,26 @@ class Parameters { int setIrisLevel(int level); int getIrisLevel(int& level); + // HDR_FEATURE_S + /** + * \brief Set WDR mode + * + * \param[in] camera_wdr_mode_t wdrMode + * + * \return 0 if set successfully, otherwise non-0 value is returned. + */ + int setWdrMode(camera_wdr_mode_t wdrMode); + + /** + * \brief Get WDR mode currently used. + * + * \param[out] camera_wdr_mode_t& wdrMode + * + * \return 0 if awb mode was set, non-0 means no awb mode was set. + */ + int getWdrMode(camera_wdr_mode_t& wdrMode) const; + // HDR_FEATURE_E + /** * \brief Set WDR Level * @@ -2687,6 +2780,24 @@ class Parameters { */ int getRawDataOutput(raw_data_output_t& mode) const; + /** + * \brief Set HDR ratio + * + * \param[in] float + * + * \return 0 if set successfully, otherwise non-0 value is returned. + */ + int setHdrRatio(float hdrRatio); + + /** + * \brief Get HDR ratio + * + * \param[out] float + * + * \return 0 if HDR ratio was set, otherwise non-0 value is returned. + */ + int getHdrRatio(float& hdrRatio) const; + /** * \brief Set total exposure target * @@ -2777,99 +2888,60 @@ class Parameters { */ int getCallbackTmCurve(bool* enabled) const; - // ENABLE_EVCP_S /** - * \brief Set EVCP ECC status + * \brief Set scale & crop region * - * \param[in] int enabled + * \param[in] camera_zoom_region_t region * * \return 0 if set successfully, otherwise non-0 value is returned. */ - int setEvcpEccMode(uint8_t enabled); + int setZoomRegion(const camera_zoom_region_t& region); + /** - * \brief Get EVCP ECC enable status + * \brief Get scale & crop region * - * \param[out] int enabled + * \param[in] camera_zoom_region_t region * * \return 0 if flag was set, otherwise non-0 value is returned. */ - int getEvcpEccMode(uint8_t* enabled) const; + int getZoomRegion(camera_zoom_region_t* region) const; + // LEVEL0_ICBM_S /** - * \brief Set EVCP BC Mode + * \brief Set ICBM FF Mode * * \param[in] uint8_t Mode * * \return 0 if set successfully, otherwise non-0 value is returned. */ - int setEvcpBCMode(uint8_t mode); + int setICBMUFMode(uint8_t mode); /** - * \brief Get EVCP BC Mode + * \brief Get ICBM UF Mode * * \param[out] uint8_t mode * * \return 0 if flag was set, otherwise non-0 value is returned. */ - int getEvcpBCMode(uint8_t* mode) const; - - /** - * \brief Set EVCP BR Parameters - * - * \param[in] int height - * \param[in] int width - * \param[in] int fd - * - * \return 0 if set successfully, otherwise non-0 value is returned. - */ - int setEvcpBRParameters(int height, int width, int fd); + int getICBMUFMode(uint8_t* mode) const; /** - * \brief Get EVCP BR Parameters - * - * \param[out] int height - * \param[out] int width - * \param[out] int fd - * - * \return 0 if flag was set, otherwise non-0 value is returned. - */ - int getEvcpBRParameters(int* height, int* width, int* fd) const; - - /** - * \brief Set EVCP FF Mode + * \brief Set ICBM FF Mode * * \param[in] uint8_t Mode * * \return 0 if set successfully, otherwise non-0 value is returned. */ - int setEvcpFFMode(uint8_t mode); + int setICBMBBMode(uint8_t mode); /** - * \brief Get EVCP FF Mode + * \brief Get ICBM BB Mode * * \param[out] uint8_t mode * * \return 0 if flag was set, otherwise non-0 value is returned. */ - int getEvcpFFMode(uint8_t* mode) const; - // ENABLE_EVCP_E - - /** - * \brief Set scale & crop region - * - * \param[in] camera_zoom_region_t region - * - * \return 0 if set successfully, otherwise non-0 value is returned. - */ - int setZoomRegion(const camera_zoom_region_t& region); - - /** - * \brief Get scale & crop region - * - * \param[in] camera_zoom_region_t region - * - * \return 0 if flag was set, otherwise non-0 value is returned. - */ - int getZoomRegion(camera_zoom_region_t* region) const; + int getICBMBBMode(uint8_t* mode) const; + // LEVEL0_ICBM_E private: friend class ParameterHelper; diff --git a/include/api/intel_vendor_metadata_tags.h b/include/api/intel_vendor_metadata_tags.h index 7ef269e6..5e71b7d9 100644 --- a/include/api/intel_vendor_metadata_tags.h +++ b/include/api/intel_vendor_metadata_tags.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2012 The Android Open Source Project - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ typedef enum vendor_metadata_section { * Hierarchy positions in enum space. */ typedef enum vendor_metadata_section_start { - INTEL_VENDOR_CAMERA_START = uint32_t(INTEL_VENDOR_CAMERA << 16), + INTEL_VENDOR_CAMERA_START = uint32_t(INTEL_VENDOR_CAMERA << 16), } vendor_metadata_section_start_t; /** @@ -47,35 +47,44 @@ typedef enum vendor_metadata_section_start { * src/metadata/vendor_metadata_tag_info.c */ typedef enum vendor_metadata_tag { - INTEL_VENDOR_CAMERA_CALLBACK_RGBS = // enum | public - INTEL_VENDOR_CAMERA_START, + INTEL_VENDOR_CAMERA_CALLBACK_RGBS = // enum | public + INTEL_VENDOR_CAMERA_START, INTEL_VENDOR_CAMERA_RGBS_GRID_SIZE, // int32[] | public INTEL_VENDOR_CAMERA_SHADING_CORRECTION, // enum | public INTEL_VENDOR_CAMERA_RGBS_STATS_BLOCKS, // byte[] | public INTEL_VENDOR_CAMERA_CALLBACK_TM_CURVE, // enum | public INTEL_VENDOR_CAMERA_TONE_MAP_CURVE, // float[] | public INTEL_VENDOR_CAMERA_POWER_MODE, // enum | public - // ENABLE_EVCP_S +// LEVEL0_ICBM_S INTEL_VENDOR_CAMERA_IC_CAPS, // int32 | public - // ENABLE_EVCP_E - // ENABLE_EVCP_S +// LEVEL0_ICBM_E +// LEVEL0_ICBM_S INTEL_VENDOR_CAMERA_IC_PEACE_FEATURES, // int32[] | public - // ENABLE_EVCP_E - // ENABLE_EVCP_S +// LEVEL0_ICBM_E +// LEVEL0_ICBM_S INTEL_VENDOR_CAMERA_IC_ECC_MODE, // enum | public - // ENABLE_EVCP_E - // ENABLE_EVCP_S +// LEVEL0_ICBM_E +// LEVEL0_ICBM_S INTEL_VENDOR_CAMERA_IC_BC_MODE, // enum | public - // ENABLE_EVCP_E - // ENABLE_EVCP_S +// LEVEL0_ICBM_E +// LEVEL0_ICBM_S INTEL_VENDOR_CAMERA_IC_BR_PARAMETERS, // int32[] | public - // ENABLE_EVCP_E - // ENABLE_EVCP_S - INTEL_VENDOR_CAMERA_IC_FF_MODE, // enum | public - // ENABLE_EVCP_E +// LEVEL0_ICBM_E +// LEVEL0_ICBM_S + INTEL_VENDOR_CAMERA_IC_UF_MODE, // enum | public +// LEVEL0_ICBM_E INTEL_VENDOR_CAMERA_TOTAL_EXPOSURE_TARGET, // int64 | public INTEL_VENDOR_CAMERA_TOTAL_EXPOSURE_TARGET_RANGE, // int64[] | public INTEL_VENDOR_CAMERA_RAW_DATA_OUTPUT, // enum | public + INTEL_VENDOR_CAMERA_HDR_RATIO, // float | public + INTEL_VENDOR_CAMERA_MODULE_ID, // byte[] | public + INTEL_VENDOR_CAMERA_SENSOR_ID, // byte[] | public + INTEL_VENDOR_CAMERA_SENSOR_MODE, // enum | public + INTEL_VENDOR_CAMERA_ANALOG_GAIN_RANGE, // float[] | public + INTEL_VENDOR_CAMERA_DIGITAL_GAIN_RANGE, // float[] | public + INTEL_VENDOR_CAMERA_ANALOG_GAIN, // float | public + INTEL_VENDOR_CAMERA_DIGITAL_GAIN, // float | public + INTEL_VENDOR_CAMERA_SENSITIVITY_RANGE, // int32[] | public INTEL_VENDOR_CAMERA_END, } vendor_metadata_tag_t; @@ -107,15 +116,15 @@ typedef enum vendor_metadata_enum_intel_vendor_camera_power_mode { INTEL_VENDOR_CAMERA_POWER_MODE_HIGH_QUALITY, } vendor_metadata_enum_intel_vendor_camera_power_mode_t; -// ENABLE_EVCP_S +// LEVEL0_ICBM_S // INTEL_VENDOR_CAMERA_IC_ECC_MODE typedef enum vendor_metadata_enum_intel_vendor_camera_ic_ecc_mode { INTEL_VENDOR_CAMERA_IC_ECC_MODE_OFF, INTEL_VENDOR_CAMERA_IC_ECC_MODE_ON, } vendor_metadata_enum_intel_vendor_camera_ic_ecc_mode_t; -// ENABLE_EVCP_E -// ENABLE_EVCP_S +// LEVEL0_ICBM_E +// LEVEL0_ICBM_S // INTEL_VENDOR_CAMERA_IC_BC_MODE typedef enum vendor_metadata_enum_intel_vendor_camera_ic_bc_mode { INTEL_VENDOR_CAMERA_IC_BC_MODE_OFF, @@ -123,17 +132,24 @@ typedef enum vendor_metadata_enum_intel_vendor_camera_ic_bc_mode { INTEL_VENDOR_CAMERA_IC_BC_MODE_REPLACEMENT, } vendor_metadata_enum_intel_vendor_camera_ic_bc_mode_t; -// ENABLE_EVCP_E -// ENABLE_EVCP_S -// INTEL_VENDOR_CAMERA_IC_FF_MODE -typedef enum vendor_metadata_enum_intel_vendor_camera_ic_ff_mode { - INTEL_VENDOR_CAMERA_IC_FF_MODE_OFF, - INTEL_VENDOR_CAMERA_IC_FF_MODE_AUTO, -} vendor_metadata_enum_intel_vendor_camera_ic_ff_mode_t; +// LEVEL0_ICBM_E +// LEVEL0_ICBM_S +// INTEL_VENDOR_CAMERA_IC_UF_MODE +typedef enum vendor_metadata_enum_intel_vendor_camera_ic_uf_mode { + INTEL_VENDOR_CAMERA_IC_UF_MODE_OFF, + INTEL_VENDOR_CAMERA_IC_UF_MODE_AUTO, +} vendor_metadata_enum_intel_vendor_camera_ic_uf_mode_t; -// ENABLE_EVCP_E +// LEVEL0_ICBM_E // INTEL_VENDOR_CAMERA_RAW_DATA_OUTPUT typedef enum vendor_metadata_enum_intel_vendor_camera_raw_data_output { INTEL_VENDOR_CAMERA_RAW_DATA_OUTPUT_OFF, INTEL_VENDOR_CAMERA_RAW_DATA_OUTPUT_ON, } vendor_metadata_enum_intel_vendor_camera_raw_data_output_t; + +// INTEL_VENDOR_CAMERA_SENSOR_MODE +typedef enum vendor_metadata_enum_intel_vendor_camera_sensor_mode { + INTEL_VENDOR_CAMERA_SENSOR_MODE_FULL, + INTEL_VENDOR_CAMERA_SENSOR_MODE_BINNING, +} vendor_metadata_enum_intel_vendor_camera_sensor_mode_t; + diff --git a/include/linux/crlmodule.h b/include/linux/crlmodule.h new file mode 100644 index 00000000..9203b6ce --- /dev/null +++ b/include/linux/crlmodule.h @@ -0,0 +1,53 @@ +/**************************************************************************** + * Copyright (c) 2016-2017 Intel Corporation. + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef UAPI_LINUX_CRLMODULE_H +#define UAPI_LINUX_CRLMODULE_H +#define V4L2_CID_CRLMODULE_BASE (V4L2_CID_USER_BASE + 0x2050) +#define V4L2_CID_FRAME_LENGTH_LINES (V4L2_CID_CRLMODULE_BASE + 1) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define V4L2_CID_LINE_LENGTH_PIXELS (V4L2_CID_CRLMODULE_BASE + 2) +#define CRL_CID_SENSOR_THERMAL_DATA (V4L2_CID_CRLMODULE_BASE + 3) +#define CRL_CID_SENSOR_MODE (V4L2_CID_CRLMODULE_BASE + 4) +#define CRL_CID_IMX230_HDR_MODE (V4L2_CID_CRLMODULE_BASE + 5) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define CRL_CID_IMX230_HDR_ET_RATIO (V4L2_CID_CRLMODULE_BASE + 6) +#define CRL_CID_EXPOSURE_SHS1 (V4L2_CID_CRLMODULE_BASE + 8) +#define CRL_CID_EXPOSURE_SHS2 (V4L2_CID_CRLMODULE_BASE + 9) +#define CRL_CID_EXPOSURE_SHS3 (V4L2_CID_CRLMODULE_BASE + 10) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define CRL_CID_EXPOSURE_RHS1 (V4L2_CID_CRLMODULE_BASE + 11) +#define CRL_CID_EXPOSURE_RHS2 (V4L2_CID_CRLMODULE_BASE + 12) +#define CRL_CID_SENSOR_PDAF (V4L2_CID_CRLMODULE_BASE + 13) +#define CRL_CID_DIGITAL_GAIN_L (V4L2_CID_CRLMODULE_BASE + 14) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define CRL_CID_DIGITAL_GAIN_S (V4L2_CID_CRLMODULE_BASE + 15) +#define CRL_CID_DIGITAL_GAIN_VS (V4L2_CID_CRLMODULE_BASE + 16) +#define CRL_CID_SENSOR_BIT_LINEAR (V4L2_CID_CRLMODULE_BASE + 17) +#define CRL_CID_MSB_ALIGN (V4L2_CID_CRLMODULE_BASE + 18) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define CRL_CID_AUTO_EXPOSURE_DEBUG (V4L2_CID_CRLMODULE_BASE + 19) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define CRL_CID_ANALOG_GAIN_L (V4L2_CID_CRLMODULE_BASE + 20) +#define CRL_CID_ANALOG_GAIN_S (V4L2_CID_CRLMODULE_BASE + 21) +#define CRL_CID_ANALOG_GAIN_VS (V4L2_CID_CRLMODULE_BASE + 22) +#define CRL_CID_EXPOSURE_MODE (V4L2_CID_CRLMODULE_BASE + 23) +#define CRL_CID_EXPOSURE_HDR_RATIO (V4L2_CID_CRLMODULE_BASE + 24) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#endif diff --git a/include/linux/ipu-isys.h b/include/linux/ipu-isys.h index 7ecf35c4..b90f3427 100644 --- a/include/linux/ipu-isys.h +++ b/include/linux/ipu-isys.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2019 Intel Corporation. + * Copyright (C) 2019-2023 Intel Corporation. **************************************************************************** *** *** This header was automatically generated from a Linux kernel header @@ -22,8 +22,8 @@ #define V4L2_CID_IPU_BASE (V4L2_CID_USER_BASE + 0x1080) #define V4L2_CID_IPU_ISA_EN (V4L2_CID_IPU_BASE + 1) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define V4L2_CID_IPU_STORE_CSI2_HEADER (V4L2_CID_IPU_BASE + 2) #define V4L2_CID_IPU_ISYS_COMPRESSION (V4L2_CID_IPU_BASE + 3) +#define V4L2_CID_IPU_QUERY_SUB_STREAM (V4L2_CID_IPU_BASE + 4) #define V4L2_IPU_ISA_EN_BLC (1 << 0) #define V4L2_IPU_ISA_EN_LSC (1 << 1) #define V4L2_IPU_ISA_EN_DPC (1 << 2) diff --git a/modules/algowrapper/IntelCca.cpp b/modules/algowrapper/IntelCca.cpp index 5b907f9f..0ea578d6 100644 --- a/modules/algowrapper/IntelCca.cpp +++ b/modules/algowrapper/IntelCca.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,13 @@ IntelCca* IntelCca::getInstance(int cameraId, TuningMode mode) { } } +#ifndef ENABLE_SANDBOXING + if (sCcaInstance.empty()) { + ia_env env = {&Log::ccaPrintInfo, &Log::ccaPrintError, &Log::ccaPrintInfo}; + ia_log_init(&env); + } +#endif + IntelCca::CCAHandle handle = {}; handle.cameraId = cameraId; handle.ccaHandle[mode] = new IntelCca(cameraId, mode); @@ -112,7 +119,7 @@ ia_err IntelCca::setStatsParams(const cca::cca_stats_params& params) { } ia_err IntelCca::runAEC(uint64_t frameId, const cca::cca_ae_input_params& params, - cca::cca_ae_results* results) { + cca::cca_ae_results* results, bool lowPower) { CheckAndLogError(!results, ia_err_argument, "@%s, results is nullptr", __func__); ia_err ret = getIntelCCA()->runAEC(frameId, params, results); @@ -122,7 +129,7 @@ ia_err IntelCca::runAEC(uint64_t frameId, const cca::cca_ae_input_params& params } ia_err IntelCca::runAIQ(uint64_t frameId, const cca::cca_aiq_params& params, - cca::cca_aiq_results* results) { + cca::cca_aiq_results* results, camera_makernote_mode_t mode) { CheckAndLogError(!results, ia_err_argument, "@%s, results is nullptr", __func__); ia_err ret = getIntelCCA()->runAIQ(frameId, params, results); @@ -133,7 +140,15 @@ ia_err IntelCca::runAIQ(uint64_t frameId, const cca::cca_aiq_params& params, ia_err IntelCca::runLTM(uint64_t frameId, const cca::cca_ltm_input_params& params) { ia_err ret = getIntelCCA()->runLTM(frameId, params); - LOG2("@%s, frameId: %u, ret:%d", __func__, frameId, ret); + LOG2("@%s, frameId: %lu, ret:%d", __func__, frameId, ret); + + return ret; +} + +ia_err IntelCca::reconfigDvs(const cca::cca_dvs_init_param& dvsInitParam, + const cca::cca_gdc_configurations& gdcConfigs) { + ia_err ret = getIntelCCA()->reconfigDvs(dvsInitParam, gdcConfigs); + LOG2("@%s, ret:%d", __func__, ret); return ret; } @@ -157,7 +172,8 @@ ia_err IntelCca::runAIC(uint64_t frameId, const cca::cca_pal_input_params* param CheckAndLogError(!params, ia_err_argument, "@%s, params is nullptr", __func__); CheckAndLogError(!pal, ia_err_argument, "@%s, pal is nullptr", __func__); - ia_err ret = getIntelCCA()->runAIC(frameId, *params, pal); + // Currently the aicId is same as stream_id + ia_err ret = getIntelCCA()->runAIC(frameId, *params, pal, params->stream_id); // if PAL doesn't run, set output size to 0 if (ret == ia_err_not_run) pal->size = 0; @@ -167,10 +183,10 @@ ia_err IntelCca::runAIC(uint64_t frameId, const cca::cca_pal_input_params* param return ret; } -ia_err IntelCca::getCMC(cca::cca_cmc* cmc) { +ia_err IntelCca::getCMC(cca::cca_cmc* cmc, const cca::cca_cpf* cpf) { CheckAndLogError(!cmc, ia_err_argument, "@%s, cmc is nullptr", __func__); - ia_err ret = getIntelCCA()->getCMC(*cmc); + ia_err ret = getIntelCCA()->getCMC(*cmc, cpf); LOG2("@%s, ret:%d", __func__, ret); return ret; @@ -202,6 +218,15 @@ ia_err IntelCca::updateTuning(uint8_t lardTags, const ia_lard_input_params& lard return ret; } +// PRIVACY_MODE_S +ia_err IntelCca::getBrightestIndex(uint32_t* outMaxBin) { + ia_err ret = getIntelCCA()->getBrightestIndex(outMaxBin); + LOG2("@%s, Brightest Index: %u", __func__, *outMaxBin); + + return ret; +} +// PRIVACY_MODE_E + bool IntelCca::allocStatsDataMem(unsigned int size) { LOG2("@%s, tuningMode:%d, size:%d", mCameraId, __func__, mTuningMode, size); @@ -245,7 +270,7 @@ void IntelCca::decodeHwStatsDone(int64_t sequence, unsigned int byteUsed) { sequence, byteUsed); AutoMutex l(mMemStatsMLock); - if (mMemStatsInfoMap.empty()) return; + if (mMemStatsInfoMap.empty() || mMemStatsInfoMap.count(sequence) > 0) return; auto it = mMemStatsInfoMap.begin(); it->second.usedSize = byteUsed; @@ -277,12 +302,16 @@ void IntelCca::deinit() { ia_err IntelCca::decodeStats(uint64_t statsPointer, uint32_t statsSize, uint32_t bitmap, ia_isp_bxt_statistics_query_results_t* results, cca::cca_out_stats* outStats) { - CheckAndLogError(!results, ia_err_argument, "@%s, results is nullptr", __func__); + ia_isp_bxt_statistics_query_results_t resultsTmp = {}; + ia_isp_bxt_statistics_query_results_t* query = results ? results : &resultsTmp; - ia_err ret = getIntelCCA()->decodeStats(statsPointer, statsSize, bitmap, results, outStats); + ia_err ret = getIntelCCA()->decodeStats(statsPointer, statsSize, bitmap, query, outStats); LOG2("@%s, statsPointer: 0x%lu, statsSize:%d, bitmap:%x, ret: %d", __func__, statsPointer, statsSize, bitmap, ret); + LOG2("%s, query results: rgbs_grid(%d), af_grid(%d), dvs_stats(%d), paf_grid(%d)", __func__, + query->rgbs_grid, query->af_grid, query->dvs_stats, query->paf_grid); + return ret; } diff --git a/modules/algowrapper/IntelCca.h b/modules/algowrapper/IntelCca.h index 8bc56c00..4d3eaf5f 100644 --- a/modules/algowrapper/IntelCca.h +++ b/modules/algowrapper/IntelCca.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation. + * Copyright (C) 2020-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,33 +42,41 @@ class IntelCca { ia_err setStatsParams(const cca::cca_stats_params& params); ia_err runAEC(uint64_t frameId, const cca::cca_ae_input_params& params, - cca::cca_ae_results* results); + cca::cca_ae_results* results, bool lowPower); ia_err runAIQ(uint64_t frameId, const cca::cca_aiq_params& params, - cca::cca_aiq_results* results); + cca::cca_aiq_results* results, camera_makernote_mode_t mode = MAKERNOTE_MODE_OFF); ia_err runLTM(uint64_t frameId, const cca::cca_ltm_input_params& params); + ia_err reconfigDvs(const cca::cca_dvs_init_param& dvsInitParam, + const cca::cca_gdc_configurations& gdcConfigs); + ia_err updateZoom(uint32_t streamId, const cca::cca_dvs_zoom& params); ia_err runDVS(uint32_t streamId, uint64_t frameId); ia_err runAIC(uint64_t frameId, const cca::cca_pal_input_params* params, ia_binary_data* pal); - ia_err getCMC(cca::cca_cmc* cmc); + ia_err getCMC(cca::cca_cmc* cmc, const cca::cca_cpf* cpf = nullptr); ia_err getMKN(ia_mkn_trg type, cca::cca_mkn* mkn); ia_err getAiqd(cca::cca_aiqd* aiqd); ia_err updateTuning(uint8_t lardTags, const ia_lard_input_params& lardParams, const cca::cca_nvm& nvm, int32_t streamId); + // PRIVACY_MODE_S + ia_err getBrightestIndex(uint32_t *outMaxBin); + // PRIVACY_MODE_E bool allocStatsDataMem(unsigned int size); + void freeStatsDataMem(); void* getStatsDataBuffer(); void decodeHwStatsDone(int64_t sequence, unsigned int byteUsed); void* fetchHwStatsData(int64_t sequence, unsigned int* byteUsed); void deinit(); + // Do decoding if results is valid ia_err decodeStats(uint64_t statsPointer, uint32_t statsSize, uint32_t bitmap, - ia_isp_bxt_statistics_query_results_t* results, + ia_isp_bxt_statistics_query_results_t* results = nullptr, cca::cca_out_stats* outStats = nullptr); uint32_t getPalDataSize(const cca::cca_program_group& programGroup); @@ -78,7 +86,6 @@ class IntelCca { private: cca::IntelCCA* getIntelCCA(); void releaseIntelCCA(); - void freeStatsDataMem(); private: int mCameraId; diff --git a/modules/algowrapper/IntelEvcp.cpp b/modules/algowrapper/IntelEvcp.cpp deleted file mode 100644 index bcc3d5f2..00000000 --- a/modules/algowrapper/IntelEvcp.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (C) 2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelEvcp - -#include "modules/algowrapper/IntelEvcp.h" - -#include - -#include - -#include "igfxcmrt/cm_rt.h" -#include "iutils/CameraLog.h" -#include "iutils/Utils.h" - -namespace icamera { -IntelEvcp::IntelEvcp() : mWidth(0), mHeight(0) {} - -int IntelEvcp::init(int width, int height) { - mWidth = width; - mHeight = height; - mEvcpDLL = std::unique_ptr(new UltraManEvcp(width, height)); - - return mEvcpDLL->init() ? OK : UNKNOWN_ERROR; -} - -bool IntelEvcp::runEvcpFrame(void* inBufAddr, int size) { - auto flushCacheBlock = [](void* start, size_t sz) { - const int CACHE_LINE_SIZE_FOR_ADL = 64; - const int CACHE_LINE_MASK_FOR_ADL = CACHE_LINE_SIZE_FOR_ADL - 1; - - char* p = - reinterpret_cast(reinterpret_cast(start) & ~CACHE_LINE_MASK_FOR_ADL); - char* end = reinterpret_cast(start) + sz; - - asm volatile("mfence" ::: "memory"); - while (p < end) { - asm volatile("clflush (%0)" ::"r"(p)); - p += CACHE_LINE_SIZE_FOR_ADL; - } - asm volatile("mfence" ::: "memory"); - return true; - }; - - return runEvcpFrameNoncopy(inBufAddr) && flushCacheBlock(inBufAddr, size); -} - -bool IntelEvcp::runEvcpFrameNoncopy(void* inBufAddr) { - CmSurface2DUP* inSurface = createCMSurface(reinterpret_cast(inBufAddr)); - - bool r = mEvcpDLL->processFrame(inSurface); - - return destroyCMSurface(inSurface) && r; -} - -CmSurface2DUP* IntelEvcp::createCMSurface(void* bufAddr) { - CmSurface2DUP* cmSurface = nullptr; - - mEvcpDLL->createCMSurface2DUP(mWidth, mHeight, CM_SURFACE_FORMAT_NV12, bufAddr, cmSurface); - - return cmSurface; -} - -bool IntelEvcp::destroyCMSurface(CmSurface2DUP* surface) { - return mEvcpDLL->destroyCMSurface2DUP(surface); -} - -bool IntelEvcp::updateEvcpParam(const EvcpParam* evcpParam) { - return mEvcpDLL->updateEvcpInfo(evcpParam); -} - -void IntelEvcp::getEvcpParam(EvcpParam* evcpParam) const { - evcpParam->evcpEccEnabled = mEvcpDLL->isEccEnabled(); - evcpParam->evcpBdEnabled = mEvcpDLL->isDimmerEnabled(); - evcpParam->evcpEnableTurbo = mEvcpDLL->isTurboOn(); - evcpParam->evcpPowerSave = mEvcpDLL->isLowPowerMode(); - evcpParam->evcpBGConcealment = mEvcpDLL->isBGConcelment(); - evcpParam->evcpBGReplacement = mEvcpDLL->isBGReplacement(); - evcpParam->evcpFaceBea = mEvcpDLL->isFaceBeaEnable(); - evcpParam->evcpFaceFra = mEvcpDLL->isFaceFraEnable(); -} - -} // namespace icamera diff --git a/modules/algowrapper/IntelEvcp.h b/modules/algowrapper/IntelEvcp.h deleted file mode 100644 index 66d39a62..00000000 --- a/modules/algowrapper/IntelEvcp.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wbitfield-constant-conversion" -#pragma clang diagnostic ignored "-Wunused-private-field" -// HANDLE is redefined in cm_rt.h, avoid the redefinition build error -#define HANDLE cancel_fw_pre_define -#include "igfxcmrt/cm_rt.h" -#pragma clang diagnostic pop - -#include "PlatformData.h" -#include "evcp/UltraManEvcp.h" -#include "iutils/CameraLog.h" -#include "iutils/Utils.h" -#include "src/evcp/EvcpCommon.h" - -namespace icamera { - -class IntelEvcp { - public: - IntelEvcp(); - ~IntelEvcp() {} - int init(int width, int height); - - bool runEvcpFrame(void* inBufAddr, int size); - bool updateEvcpParam(const EvcpParam* evcpParam); - void getEvcpParam(EvcpParam* evcpParam) const; // caller to ensure not nullptr - - private: - bool runEvcpFrameNoncopy(void* inBufAddr); - - CmSurface2DUP* createCMSurface(void* bufAddr); - bool destroyCMSurface(CmSurface2DUP* surface); - - private: - int mWidth; - int mHeight; - - std::unique_ptr mEvcpDLL; - - DISALLOW_COPY_AND_ASSIGN(IntelEvcp); -}; - -} // namespace icamera diff --git a/modules/algowrapper/IntelICBM.cpp b/modules/algowrapper/IntelICBM.cpp new file mode 100644 index 00000000..df2b743a --- /dev/null +++ b/modules/algowrapper/IntelICBM.cpp @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2022-2023 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG IntelICBM + +#include "modules/algowrapper/IntelICBM.h" + +#include "Errors.h" +#include "iutils/CameraLog.h" +#include "iutils/Utils.h" + +namespace icamera { + +int IntelICBM::setup(ICBMInitInfo* initParam, std::shared_ptr handle) { + mIntelOPIC2 = IntelOPIC2::getInstance(); + + return mIntelOPIC2->setup(initParam, handle); +} + +int IntelICBM::shutdown(const ICBMReqInfo& request) { + CheckAndLogError(mIntelOPIC2 == nullptr, UNKNOWN_ERROR, "@%s, no active ICBM session", + __func__); + int ret = mIntelOPIC2->shutdown(request); + // ret is the active session count, only release the object when no active session + if (ret == 0) { + IntelOPIC2::releaseInstance(); + mIntelOPIC2 = nullptr; + } + return ret; +} + +int IntelICBM::processFrame(const ICBMReqInfo& reqInfo) { + CheckAndLogError(mIntelOPIC2 == nullptr, UNKNOWN_ERROR, "@%s, no active ICBM session", + __func__); + // LEVEL0_ICBM_S + if (reqInfo.reqType & + (icamera::ICBMFeatureType::USER_FRAMING | icamera::ICBMFeatureType::BC_MODE_BB)) + return mIntelOPIC2->processFrame(reqInfo); + // LEVEL0_ICBM_E + if (reqInfo.reqType & icamera::ICBMFeatureType::LEVEL0_TNR) + return mIntelOPIC2->runTnrFrame(reqInfo); + return 0; +} + +} // namespace icamera diff --git a/src/jpeg/chrome/JpegEncoderCore.h b/modules/algowrapper/IntelICBM.h similarity index 62% rename from src/jpeg/chrome/JpegEncoderCore.h rename to modules/algowrapper/IntelICBM.h index 1c391724..6d7774ea 100644 --- a/src/jpeg/chrome/JpegEncoderCore.h +++ b/modules/algowrapper/IntelICBM.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,25 +16,22 @@ #pragma once +#include #include -#include -#include "IJpegEncoder.h" -#include "cros-camera/jpeg_compressor.h" -#include "iutils/Utils.h" +#include "src/icbm/OnePunchIC2.h" +#include "src/icbm/ICBMTypes.h" namespace icamera { -class JpegEncoderCore : public IJpegEncoder { +class IntelICBM { public: - JpegEncoderCore(); - ~JpegEncoderCore(); + int setup(ICBMInitInfo* initParam, std::shared_ptr handle = nullptr); + int shutdown(const ICBMReqInfo& reqInfo); - virtual bool doJpegEncode(EncodePackage* pa); + int processFrame(const ICBMReqInfo& reqInfo); private: - DISALLOW_COPY_AND_ASSIGN(JpegEncoderCore); - - std::unique_ptr mJpegCompressor; + IntelOPIC2* mIntelOPIC2; }; } // namespace icamera diff --git a/modules/algowrapper/IntelPGParam.cpp b/modules/algowrapper/IntelPGParam.cpp index 998bc0b1..2528015c 100644 --- a/modules/algowrapper/IntelPGParam.cpp +++ b/modules/algowrapper/IntelPGParam.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation. + * Copyright (C) 2018-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ namespace icamera { -IntelPGParam::IntelPGParam(int pgId) +IntelPGParam::IntelPGParam(int pgId, int cameraId, TuningMode tuningMode) : mPgId(pgId), mTerminalCount(0), mFragmentCount(0), @@ -35,6 +35,8 @@ IntelPGParam::IntelPGParam(int pgId) mProcessGroup(nullptr), mProgramControlInitTerminalIndex(-1), mProcessGroupMemory(nullptr) { + UNUSED(cameraId); + UNUSED(tuningMode); CLEAR(mP2pCacheBuffer); } @@ -564,6 +566,10 @@ int IntelPGParam::encodeTerminal(ia_css_terminal_t* terminal, ia_binary_data pay } } else { kernelId = getKernelIdByBitmap(kernelBitmap); + if (kernelId >= PSYS_MAX_KERNELS_PER_PG) { + /* All the kernels have now been encoded. */ + break; + } } /* Sanity check sections sizes and return the size to be used */ @@ -657,9 +663,11 @@ int IntelPGParam::encodeTerminal(ia_css_terminal_t* terminal, ia_binary_data pay return ret; } -int IntelPGParam::decode(int payloadCount, ia_binary_data* payload, ia_binary_data* statistics) { +int IntelPGParam::decode(int payloadCount, ia_binary_data* payload, ia_binary_data* statistics, + int64_t sequence) { CheckAndLogError(!mProcessGroup, INVALID_OPERATION, "Can't decode due to null pg."); CheckAndLogError(!payload, INVALID_OPERATION, "nullptr payload."); + UNUSED(sequence); if (statistics && statistics->data) { ia_p2p_set_statistics_buffer(mP2pHandle, statistics->data); @@ -693,13 +701,12 @@ int IntelPGParam::decodeTerminal(ia_css_terminal_t* terminal, ia_binary_data pay /* Use specific ordering of kernels when available */ if (mPgReqs.terminals[terminalIndex].kernelOrder) { kernelId = mPgReqs.terminals[terminalIndex].kernelOrder[kernelIndex++].id; - CheckAndLogError( - kernelId >= PSYS_MAX_KERNELS_PER_PG, css_err_internal, - "%s: Kernel bitmap for terminal %d covers more kernels than in manifest", __func__, - terminalIndex); } else { kernelId = getKernelIdByBitmap(kernelBitmap); } + CheckAndLogError(kernelId >= PSYS_MAX_KERNELS_PER_PG, css_err_internal, + "%s: Kernel bitmap for terminal %d covers more kernels than in manifest", + __func__, terminalIndex); switch (mPgReqs.terminals[terminalIndex].type) { case IA_CSS_TERMINAL_TYPE_PARAM_CACHED_OUT: diff --git a/modules/algowrapper/IntelPGParam.h b/modules/algowrapper/IntelPGParam.h index 43bc9b46..551179b6 100644 --- a/modules/algowrapper/IntelPGParam.h +++ b/modules/algowrapper/IntelPGParam.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation. + * Copyright (C) 2018-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,7 @@ extern "C" { #include "iutils/Errors.h" #include "iutils/Utils.h" #include "modules/ia_cipr/include/Utils.h" +#include "CameraTypes.h" #include "src/core/psysprocessor/PGUtils.h" namespace icamera { @@ -69,7 +70,7 @@ namespace icamera { */ class IntelPGParam { public: - explicit IntelPGParam(int pgId); + explicit IntelPGParam(int pgId, int cameraId = 0, TuningMode tuningMode = TUNING_MODE_VIDEO); ~IntelPGParam(); /** @@ -107,7 +108,8 @@ class IntelPGParam { /** * Decode payload data for all related terminals. */ - int decode(int payloadCount, ia_binary_data* payload, ia_binary_data* statistics); + int decode(int payloadCount, ia_binary_data* payload, ia_binary_data* statistics, + int64_t sequence = -1); /** * Use to deinit P2P handle. diff --git a/modules/algowrapper/IntelTNR7US.cpp b/modules/algowrapper/IntelTNR7US.cpp index 404d7a8e..66404596 100644 --- a/modules/algowrapper/IntelTNR7US.cpp +++ b/modules/algowrapper/IntelTNR7US.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ #include "modules/algowrapper/IntelTNR7US.h" -#include +#include #include #include @@ -31,39 +31,39 @@ namespace icamera { -IntelTNR7US::IntelTNR7US(int cameraId) - : mCameraId(cameraId), - mWidth(0), - mHeight(0), - mTnrType(TNR_INSTANCE_MAX), - mTnrParam(nullptr) {} +IntelTNR7US* IntelTNR7US::createIntelTNR(int cameraId) { +#ifdef TNR7_CM + return new IntelC4mTNR(cameraId); +#endif +} -IntelTNR7US::~IntelTNR7US() { +Tnr7Param* IntelTNR7US::allocTnr7ParamBuf() { + LOG1("@%s, type %d", mCameraId, __func__, mTnrType); + mTnrParam = new Tnr7Param; + return mTnrParam; +} + +#ifdef TNR7_CM +IntelC4mTNR::~IntelC4mTNR() { for (auto surface : mCMSurfaceMap) { destroyCMSurface(surface.second); } mCMSurfaceMap.clear(); } -int IntelTNR7US::init(int width, int height, TnrType type) { +int IntelC4mTNR::init(int width, int height, TnrType type) { LOG1("@%s size %dx%d, type %d", mCameraId, __func__, width, height, type); mWidth = width; mHeight = height; mTnrType = type; - std::string threadName = "IntelTNR7US" + std::to_string(type + (mCameraId << 1)); + std::string threadName = "IntelC4mTNR" + std::to_string(type + (mCameraId << 1)); mThread = std::unique_ptr(new base::Thread(threadName)); mThread->Start(); return OK; } -Tnr7Param* IntelTNR7US::allocTnr7ParamBuf() { - LOG1("<%d>@%s, type %d", mCameraId, __func__, mTnrType); - mTnrParam = new Tnr7Param; - return mTnrParam; -} - -void* IntelTNR7US::allocCamBuf(uint32_t bufSize, int id) { +void* IntelC4mTNR::allocCamBuf(uint32_t bufSize, int id) { LOG1("<%d>@%s, type %d, id: %d", mCameraId, __func__, mTnrType, id); void* buffer = nullptr; int ret = posix_memalign(&buffer, getpagesize(), bufSize); @@ -78,7 +78,7 @@ void* IntelTNR7US::allocCamBuf(uint32_t bufSize, int id) { return buffer; } -void IntelTNR7US::freeAllBufs() { +void IntelC4mTNR::freeAllBufs() { LOG1("<%d>@%s, type %d", mCameraId, __func__, mTnrType); for (auto surface : mCMSurfaceMap) { ::free(surface.first); @@ -88,7 +88,7 @@ void IntelTNR7US::freeAllBufs() { } } -int IntelTNR7US::prepareSurface(void* bufAddr, int size) { +int IntelC4mTNR::prepareSurface(void* bufAddr, int size) { CheckAndLogError(size < mWidth * mHeight * 3 / 2, UNKNOWN_ERROR, "%s, invalid buffer size:%d", __func__, size); CmSurface2DUP* surface = createCMSurface(bufAddr); @@ -98,10 +98,9 @@ int IntelTNR7US::prepareSurface(void* bufAddr, int size) { return OK; } -int IntelTNR7US::runTnrFrame(const void* inBufAddr, void* outBufAddr, uint32_t inBufSize, +int IntelC4mTNR::runTnrFrame(const void* inBufAddr, void* outBufAddr, uint32_t inBufSize, uint32_t outBufSize, Tnr7Param* tnrParam, bool syncUpdate, int fd) { - PERF_CAMERA_ATRACE(); - TRACE_LOG_PROCESS("IntelTNR7US", "runTnrFrame"); + TRACE_LOG_PROCESS("IntelC4mTNR", "runTnrFrame"); LOG2("<%d>@%s type %d", mCameraId, __func__, mTnrType); CheckAndLogError(inBufAddr == nullptr || outBufAddr == nullptr || tnrParam == nullptr, UNKNOWN_ERROR, "@%s, buffer is nullptr", __func__); @@ -118,7 +117,9 @@ int IntelTNR7US::runTnrFrame(const void* inBufAddr, void* outBufAddr, uint32_t i CheckAndLogError(outSurface == nullptr, UNKNOWN_ERROR, "Failed to get CMSurface for output buffer"); struct timespec beginTime = {}; - if (Log::isLogTagEnabled(ST_GPU_TNR)) clock_gettime(CLOCK_MONOTONIC, &beginTime); + if (Log::isLogTagEnabled(ST_GPU_TNR, CAMERA_DEBUG_LOG_LEVEL2)) { + clock_gettime(CLOCK_MONOTONIC, &beginTime); + } /* call Tnr api to run tnr for the inSurface and store the result in outSurface */ int ret = run_tnr7us_frame(mWidth, mHeight, mWidth, inSurface, outSurface, &tnrParam->scale, @@ -127,7 +128,7 @@ int IntelTNR7US::runTnrFrame(const void* inBufAddr, void* outBufAddr, uint32_t i destroyCMSurface(outSurface); } CheckAndLogError(ret != OK, UNKNOWN_ERROR, "tnr7us process failed"); - if (Log::isLogTagEnabled(ST_GPU_TNR)) { + if (Log::isLogTagEnabled(ST_GPU_TNR, CAMERA_DEBUG_LOG_LEVEL2)) { struct timespec endTime = {}; clock_gettime(CLOCK_MONOTONIC, &endTime); uint64_t timeUsedUs = (endTime.tv_sec - beginTime.tv_sec) * 1000000 + @@ -137,16 +138,16 @@ int IntelTNR7US::runTnrFrame(const void* inBufAddr, void* outBufAddr, uint32_t i return OK; } -int IntelTNR7US::asyncParamUpdate(int gain, bool forceUpdate) { +int IntelC4mTNR::asyncParamUpdate(int gain, bool forceUpdate) { if (mThread->task_runner()) { mThread->task_runner()->PostTask( - FROM_HERE, - base::Bind(&IntelTNR7US::handleParamUpdate, base::Unretained(this), gain, forceUpdate)); + FROM_HERE, base::BindOnce(&IntelC4mTNR::handleParamUpdate, base::Unretained(this), gain, + forceUpdate)); } return OK; } -int32_t IntelTNR7US::getSurfaceInfo(int width, int height, uint32_t* size) { +int32_t IntelC4mTNR::getTnrBufferSize(int width, int height, uint32_t* size) { uint32_t pitch = 0; uint32_t physicalSize = 0; int ret = getSurface2DInfo(uint32_t(width), uint32_t(CM_SURFACE_ALIGN_HEIGHT(height)), @@ -157,15 +158,16 @@ int32_t IntelTNR7US::getSurfaceInfo(int width, int height, uint32_t* size) { return OK; } -void IntelTNR7US::handleParamUpdate(int gain, bool forceUpdate) { - PERF_CAMERA_ATRACE(); +void IntelC4mTNR::handleParamUpdate(int gain, bool forceUpdate) { LOG2("@%s gain: %d", __func__, gain); // gain value is from AE expore analog_gain * digital_gain struct timespec beginTime = {}; - if (Log::isLogTagEnabled(ST_GPU_TNR)) clock_gettime(CLOCK_MONOTONIC, &beginTime); + if (Log::isLogTagEnabled(ST_GPU_TNR, CAMERA_DEBUG_LOG_LEVEL2)) { + clock_gettime(CLOCK_MONOTONIC, &beginTime); + } tnr7usParamUpdate(gain, forceUpdate, mTnrType); - if (Log::isLogTagEnabled(ST_GPU_TNR)) { + if (Log::isLogTagEnabled(ST_GPU_TNR, CAMERA_DEBUG_LOG_LEVEL2)) { struct timespec endTime = {}; clock_gettime(CLOCK_MONOTONIC, &endTime); uint64_t timeUsedUs = (endTime.tv_sec - beginTime.tv_sec) * 1000000 + @@ -174,7 +176,7 @@ void IntelTNR7US::handleParamUpdate(int gain, bool forceUpdate) { } } -CmSurface2DUP* IntelTNR7US::getBufferCMSurface(void* bufAddr) { +CmSurface2DUP* IntelC4mTNR::getBufferCMSurface(void* bufAddr) { if (mCMSurfaceMap.find(bufAddr) != mCMSurfaceMap.end()) { return mCMSurfaceMap[bufAddr]; } @@ -182,16 +184,16 @@ CmSurface2DUP* IntelTNR7US::getBufferCMSurface(void* bufAddr) { return nullptr; } -CmSurface2DUP* IntelTNR7US::createCMSurface(void* bufAddr) { - PERF_CAMERA_ATRACE(); +CmSurface2DUP* IntelC4mTNR::createCMSurface(void* bufAddr) { CmSurface2DUP* cmSurface = nullptr; int32_t ret = createCmSurface2DUP(mWidth, mHeight, CM_SURFACE_FORMAT_NV12, bufAddr, cmSurface); CheckAndLogError(ret != 0, nullptr, "failed to create CmSurface2DUP object"); return cmSurface; } -int32_t IntelTNR7US::destroyCMSurface(CmSurface2DUP* surface) { +int32_t IntelC4mTNR::destroyCMSurface(CmSurface2DUP* surface) { return destroyCMSurface2DUP(surface); } +#endif } // namespace icamera diff --git a/modules/algowrapper/IntelTNR7US.h b/modules/algowrapper/IntelTNR7US.h index 57b4381e..2db4d59b 100644 --- a/modules/algowrapper/IntelTNR7US.h +++ b/modules/algowrapper/IntelTNR7US.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ extern "C" { #include "PlatformData.h" #include "TNRCommon.h" +#ifdef TNR7_CM /* the cm_rt.h has some build error with current clang build flags * use the ignored setting to ignore these errors, and use * push/pop to make the ignore only take effect on this file */ @@ -53,15 +54,14 @@ extern int32_t destroyCMSurface2DUP(CmSurface2DUP*& surface); extern int tnr7usParamUpdate(int gain, bool forceUpdate = false, int type = 0); extern int32_t getSurface2DInfo(uint32_t width, uint32_t height, CM_SURFACE_FORMAT format, uint32_t& pitch, uint32_t& physicalSize); - +#endif namespace icamera { -// IntelTNR7US object is for using Intel GPU tnr(tnr7ultraslim) feature. class IntelTNR7US { public: - explicit IntelTNR7US(int cameraId); - ~IntelTNR7US(); - int init(int width, int height, TnrType type); + static IntelTNR7US* createIntelTNR(int cameraId); + virtual ~IntelTNR7US() {} + virtual int init(int width, int height, TnrType type = TNR_INSTANCE0) = 0; /** * call tnr api to calc tnr result * @@ -70,14 +70,55 @@ class IntelTNR7US { * \param tnrParam: tnr parameters from ISP * \param fd: user output buffer file handle */ - int runTnrFrame(const void* inBufAddr, void* outBufAddr, uint32_t inBufSize, - uint32_t outBufSize, Tnr7Param* tnrParam, bool syncUpdate, int fd = -1); + virtual int runTnrFrame(const void* inBufAddr, void* outBufAddr, uint32_t inBufSize, + uint32_t outBufSize, Tnr7Param* tnrParam, bool syncUpdate, + int fd = -1) = 0; Tnr7Param* allocTnr7ParamBuf(); - void* allocCamBuf(uint32_t bufSize, int id); - void freeAllBufs(); - int prepareSurface(void* bufAddr, int size); - int asyncParamUpdate(int gain, bool forceUpdate); - int getSurfaceInfo(int width, int height, uint32_t* size); + virtual void* allocCamBuf(uint32_t bufSize, int id) = 0; + virtual void freeAllBufs() = 0; + virtual int prepareSurface(void* bufAddr, int size) { return OK; } + virtual int asyncParamUpdate(int gain, bool forceUpdate) { return OK; } + virtual int getTnrBufferSize(int width, int height, uint32_t* size) { return BAD_VALUE; } + + protected: + explicit IntelTNR7US(int cameraId) + : mCameraId(cameraId), + mWidth(0), + mHeight(0), + mTnrType(TNR_INSTANCE_MAX), + mTnrParam(nullptr){}; + + protected: + int mCameraId; + int mWidth; + int mHeight; + TnrType mTnrType; + Tnr7Param* mTnrParam; + + DISALLOW_COPY_AND_ASSIGN(IntelTNR7US); +}; + +#ifdef TNR7_CM +class IntelC4mTNR : public IntelTNR7US { + public: + explicit IntelC4mTNR(int cameraId) : IntelTNR7US(cameraId) {} + virtual ~IntelC4mTNR(); + virtual int init(int width, int height, TnrType type = TNR_INSTANCE0); + /** + * call tnr api to calc tnr result + * + * \param inBufAddr: input image buffer + * \param outBufAddr: tnr output + * \param tnrParam: tnr parameters from ISP + * \param fd: user output buffer file handle + */ + virtual int runTnrFrame(const void* inBufAddr, void* outBufAddr, uint32_t inBufSize, + uint32_t outBufSize, Tnr7Param* tnrParam, bool syncUpdate, int fd = -1); + virtual void* allocCamBuf(uint32_t bufSize, int id); + virtual void freeAllBufs(); + virtual int prepareSurface(void* bufAddr, int size); + virtual int asyncParamUpdate(int gain, bool forceUpdate); + virtual int getTnrBufferSize(int width, int height, uint32_t* size); private: /* tnr api use CmSurface2DUP object as data buffer, call this api to create @@ -88,17 +129,12 @@ class IntelTNR7US { CmSurface2DUP* getBufferCMSurface(void* bufAddr); /* call tnr7us API to update params */ void handleParamUpdate(int gain, bool forceUpdate); + DISALLOW_COPY_AND_ASSIGN(IntelC4mTNR); private: - int mCameraId; - int mWidth; - int mHeight; - TnrType mTnrType; // Tnr will create CMSurface for input buffers and cache them in the map std::unordered_map mCMSurfaceMap; - Tnr7Param* mTnrParam; std::unique_ptr mThread; - - DISALLOW_COPY_AND_ASSIGN(IntelTNR7US); }; +#endif } // namespace icamera diff --git a/modules/algowrapper/graph/GraphConfigImpl.cpp b/modules/algowrapper/graph/GraphConfigImpl.cpp index 391677cb..56f2584a 100644 --- a/modules/algowrapper/graph/GraphConfigImpl.cpp +++ b/modules/algowrapper/graph/GraphConfigImpl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation + * Copyright (C) 2015-2024 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -221,7 +221,7 @@ status_t GraphConfigImpl::createQueryRule(const vector& activeStream mQuery.clear(); mStreamToSinkIdMap.clear(); - int videoIndex = 0, stillIndex = 0; + int videoIndex = 0, stillIndex = 0, stillTnrIndex = 0; map videoQuery; map stillQuery; map videoStreamToSinkIdMap; @@ -230,7 +230,8 @@ status_t GraphConfigImpl::createQueryRule(const vector& activeStream GCSS_KEY_VIDEO2}; vector stillStreamKeys = {GCSS_KEY_STILL0, GCSS_KEY_STILL1, GCSS_KEY_STILL2}; - + vector stillTnrStreamKeys = {GCSS_KEY_STILLTNR0, GCSS_KEY_STILLTNR1, + GCSS_KEY_STILLTNR2}; // Depends on outputs numbers in GC settings int vOutputNum = (mType == DISPERSED) ? DISPERSED_MAX_OUTPUTS : videoStreamKeys.size(); int sOutputNum = (mType == DISPERSED) ? DISPERSED_MAX_OUTPUTS : stillStreamKeys.size(); @@ -261,6 +262,15 @@ status_t GraphConfigImpl::createQueryRule(const vector& activeStream query[h] = std::to_string(stream->height()); streamToSinkId[stream] = key; LOG2("Adding stream %p to map %s", stream, ItemUID::key2str(key)); + if (dummyStillSink && !isVideo) { + AndroidGraphConfigKey key = stillTnrStreamKeys[stillTnrIndex++]; + ItemUID w = {key, GCSS_KEY_WIDTH}; + ItemUID h = {key, GCSS_KEY_HEIGHT}; + + query[w] = std::to_string(stream->width()); + query[h] = std::to_string(stream->height()); + LOG2("Adding dummy stream %p to %s", stream, ItemUID::key2str(key)); + } } if (mType == COUPLED) { @@ -344,6 +354,9 @@ status_t GraphConfigImpl::getRawInputSize(GCSS::IGraphConfig* query, camera_reso "%s, Failed to create the graph", __func__); vector isysOutput = {"csi_be:output", + // DOL_FEATURE_S + "csi_be_dol:output", + // DOL_FEATURE_E "csi_be_soc:output"}; for (auto& item : isysOutput) { GCSS::IGraphConfig* isysNode = graphResult->getDescendantByString(item.c_str()); @@ -397,16 +410,42 @@ bool GraphConfigImpl::queryGraphSettings(const std::vector& activeSt return ret == OK ? true : false; } +void GraphConfigImpl::reorderQueryResults(std::map>& queryRes, + SensorMode sensorMode) { + if (sensorMode == SENSOR_MODE_UNKNOWN) return; + + for (auto& result : queryRes) { + auto& settingVector = result.second; + if (settingVector.size() < 2) continue; + + std::sort(settingVector.begin(), settingVector.end(), + [&](GCSS::IGraphConfig* a, GCSS::IGraphConfig* b) { + camera_resolution_t aRes, bRes; + if (getRawInputSize(a, &aRes) == OK && getRawInputSize(b, &bRes) == OK) { + if (aRes.width >= bRes.width && aRes.height >= bRes.height) { + if (sensorMode == SENSOR_MODE_FULL) return true; + } else { + if (sensorMode == SENSOR_MODE_BINNING) return true; + } + } + return false; + }); + } +} + /* * According to the stream list to query graph setting and create GraphConfigPipe */ status_t GraphConfigImpl::configStreams(const vector& activeStreams, - bool dummyStillSink) { + bool dummyStillSink, SensorMode sensorMode) { HAL_TRACE_CALL(CAMERA_DEBUG_LOG_LEVEL1); map> useCaseToQueryResults; status_t ret = queryAllMatchedResults(activeStreams, dummyStillSink, &useCaseToQueryResults); CheckAndLogError(ret != OK, UNKNOWN_ERROR, "%s, Faild to queryAllMatchedResults", __func__); + + reorderQueryResults(useCaseToQueryResults, sensorMode); + // Filter the results with same isys output if there are // multiple items in useCaseToQueryResults map if (useCaseToQueryResults.size() > 1) { @@ -450,7 +489,8 @@ status_t GraphConfigImpl::configStreams(const vector& activeStreams, } else { // Use the query result with smallest isys output if there is only video pipe int resultIdx = 0; - if (useCaseToQueryResults.begin()->first == USE_CASE_VIDEO) { + if (useCaseToQueryResults.begin()->first == USE_CASE_VIDEO && + sensorMode == SENSOR_MODE_UNKNOWN) { camera_resolution_t resultReso; getRawInputSize((useCaseToQueryResults.begin()->second)[0], &resultReso); for (size_t idx = 0; idx < (useCaseToQueryResults.begin()->second).size(); idx++) { @@ -627,11 +667,21 @@ status_t GraphConfigImpl::selectSetting( status_t GraphConfigImpl::getGraphConfigData(IGraphType::GraphConfigData* data) { // The graph id, csi output and sensor mode must be same if there are two graph config pipes - data->graphId = mGraphConfigPipe.begin()->second->getGraphId(); + LOG1("Query graphs, count %lu, 1st graph id %d", mGraphConfigPipe.size(), + mGraphConfigPipe.begin()->second->getGraphId()); + for (auto& item : mGraphConfigPipe) { + LOG1(" Graph usage %d, graph id %d", item.first, item.second->getGraphId()); + data->graphIds.insert(item.second->getGraphId()); + } + mGraphConfigPipe.begin()->second->getCSIOutputResolution(&(data->csiReso)); + // DOL_FEATURE_S + mGraphConfigPipe.begin()->second->getDolInfo(&(data->dolInfo.conversionGain), + &(data->dolInfo.dolMode)); + // DOL_FEATURE_E data->mcId = mMcId; - getGdcKernelSetting(&(data->gdcKernelId), &(data->gdcReso)); + getGdcKernelSetting(&data->gdcInfos); int ret = getPgNames(&(data->pgNames)); CheckAndLogError(ret != OK, UNKNOWN_ERROR, "%s, Failed to get pg names", __func__); @@ -666,27 +716,16 @@ status_t GraphConfigImpl::getGraphConfigData(IGraphType::GraphConfigData* data) return OK; } -status_t GraphConfigImpl::getGdcKernelSetting(uint32_t* kernelId, - ia_isp_bxt_resolution_info_t* resolution) { +status_t GraphConfigImpl::getGdcKernelSetting(std::vector* gdcInfos) { CheckAndLogError(mGraphConfigPipe.empty(), UNKNOWN_ERROR, "%s, the mGraphConfigPipe is empty", __func__); - CheckAndLogError(!kernelId || !resolution, UNKNOWN_ERROR, - "%s, the kernelId or resolution is nullptr", __func__); + CheckAndLogError(!gdcInfos, UNKNOWN_ERROR, "%s, the gdcInfos is nullptr", __func__); - int ret = OK; - if (mGraphConfigPipe.size() == 1) { - ret = mGraphConfigPipe.begin()->second->getGdcKernelSetting(kernelId, resolution); - } else { - // Get the information from video pipe firstly - shared_ptr& videoGraphPipe = mGraphConfigPipe.at(USE_CASE_VIDEO); - ret = videoGraphPipe->getGdcKernelSetting(kernelId, resolution); - if (ret != OK) { - shared_ptr& stillGraphPipe = - mGraphConfigPipe.at(USE_CASE_STILL_CAPTURE); - ret = stillGraphPipe->getGdcKernelSetting(kernelId, resolution); - } + for (auto pipe : mGraphConfigPipe) { + pipe.second->getGdcKernelResolutionInfo(gdcInfos); } - LOG2("%s, %s", __func__, ret != OK ? "No gdc resolution" : "Get gdc resolution successfully"); + + LOG2("%s, %s resolution", __func__, gdcInfos->empty() ? "No gdc" : "Get gdc"); return OK; } diff --git a/modules/algowrapper/graph/GraphConfigImpl.h b/modules/algowrapper/graph/GraphConfigImpl.h index 224e65f4..b63eb63c 100644 --- a/modules/algowrapper/graph/GraphConfigImpl.h +++ b/modules/algowrapper/graph/GraphConfigImpl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation + * Copyright (C) 2015-2024 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -99,7 +99,10 @@ class GraphConfigImpl { // These public methods called by GraphConfig bool queryGraphSettings(const std::vector& activeStreams); - status_t configStreams(const std::vector& activeStreams, bool dummyStillSink); + void reorderQueryResults(std::map>& queryResults, + SensorMode sensorMode); + status_t configStreams(const std::vector& activeStreams, bool dummyStillSink, + SensorMode sensorMode); status_t getGraphConfigData(IGraphType::GraphConfigData* data); status_t getPgIdForKernel(const uint32_t streamId, const int32_t kernelId, int32_t* pgId); @@ -120,7 +123,7 @@ class GraphConfigImpl { status_t queryAllMatchedResults(const std::vector& activeStreams, bool dummyStillSink, std::map>* queryResults); - status_t getGdcKernelSetting(uint32_t* kernelId, ia_isp_bxt_resolution_info_t* resolution); + status_t getGdcKernelSetting(std::vector* gdcInfos); status_t graphGetStreamIds(std::vector* streamIds); int getStreamIdByPgName(std::string pgName); int getPgIdByPgName(std::string pgName); diff --git a/modules/algowrapper/graph/GraphConfigPipe.cpp b/modules/algowrapper/graph/GraphConfigPipe.cpp index 04cf90ee..2f0e466a 100644 --- a/modules/algowrapper/graph/GraphConfigPipe.cpp +++ b/modules/algowrapper/graph/GraphConfigPipe.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -147,6 +147,9 @@ status_t GraphConfigPipe::analyzeSourceType() { status_t GraphConfigPipe::analyzeCSIOutput() { vector csiBeOutput = {"csi_be:output", + // DOL_FEATURE_S + "csi_be_dol:output", + // DOL_FEATURE_E "csi_be_soc:output"}; for (auto& item : csiBeOutput) { GCSS::IGraphConfig* csiBeNode = @@ -441,73 +444,62 @@ const ia_isp_bxt_resolution_info_t* GraphConfigPipe::getScalerKernelResolutionIn return getKernelResolutionInfo(streamIdTmp, kernelId); } -const ia_isp_bxt_resolution_info_t* GraphConfigPipe::getGdcKernelResolutionInfo( - uint32_t* kernelId) { - CheckAndLogError(!kernelId, nullptr, "%s the kernelId is nullptr", __func__); - - std::vector streamIds; - // Get all stream IDs - status_t ret = graphGetStreamIds(&streamIds); - CheckWarning((ret != OK || streamIds.empty()), nullptr, "Failed to get the PG streamIds"); - - *kernelId = ia_pal_uuid_isp_gdc3; - int32_t gdcStreamId = VIDEO_STREAM_ID; - LOG2("%s, initalize gdc video stream as default", __func__); - - // Check video stream for gdc version firstly, - // in case more than one stream contain gdc kernel. - bool hasVideoGdc = false; - for (auto streamId : streamIds) { - if (isKernelInStream(streamId, ia_pal_uuid_isp_gdc3_1)) { - LOG2("%s, found gdc3_1 from stream %d", __func__, streamId); - gdcStreamId = streamId; - *kernelId = ia_pal_uuid_isp_gdc3_1; - if (streamId == VIDEO_STREAM_ID) hasVideoGdc = true; - } else if (isKernelInStream(streamId, ia_pal_uuid_isp_gdc3)) { - LOG2("%s, found gdc3 from stream %d", __func__, streamId); - gdcStreamId = streamId; - *kernelId = ia_pal_uuid_isp_gdc3; - if (streamId == VIDEO_STREAM_ID) hasVideoGdc = true; - } else if (isKernelInStream(streamId, ia_pal_uuid_isp_gdc3_1_1)) { - LOG2("%s, found gdc3_1_1 from stream %d", __func__, streamId); - gdcStreamId = streamId; - *kernelId = ia_pal_uuid_isp_gdc3_1_1; - if (streamId == VIDEO_STREAM_ID) hasVideoGdc = true; - } else if (isKernelInStream(streamId, ia_pal_uuid_isp_gdc5)) { - LOG2("%s, found gdc5 from stream %d", __func__, streamId); - gdcStreamId = streamId; - *kernelId = ia_pal_uuid_isp_gdc5; - if (streamId == VIDEO_STREAM_ID) hasVideoGdc = true; - } - if (hasVideoGdc) break; +bool GraphConfigPipe::getGdcKernelId(uint32_t* kernelId, int32_t streamId) { + if (isKernelInStream(streamId, ia_pal_uuid_isp_gdc3_1)) { + LOG2("%s, found gdc3_1 from stream %d", __func__, streamId); + *kernelId = ia_pal_uuid_isp_gdc3_1; + return true; + } else if (isKernelInStream(streamId, ia_pal_uuid_isp_gdc3)) { + LOG2("%s, found gdc3 from stream %d", __func__, streamId); + *kernelId = ia_pal_uuid_isp_gdc3; + return true; + } else if (isKernelInStream(streamId, ia_pal_uuid_isp_gdc3_1_1)) { + LOG2("%s, found gdc3_1_1 from stream %d", __func__, streamId); + *kernelId = ia_pal_uuid_isp_gdc3_1_1; + return true; + } else if (isKernelInStream(streamId, ia_pal_uuid_isp_gdc5)) { + LOG2("%s, found gdc5 from stream %d", __func__, streamId); + *kernelId = ia_pal_uuid_isp_gdc5; + return true; } - // Get resolution as per above kernel and stream - return getKernelResolutionInfo(gdcStreamId, *kernelId); + return false; } -status_t GraphConfigPipe::getGdcKernelSetting(uint32_t* kernelId, - ia_isp_bxt_resolution_info_t* resolution) { - CheckAndLogError(!kernelId || !resolution, UNKNOWN_ERROR, - "%s, the kernelId or resolution is nullptr", __func__); - - // Get resolution as per above kernel and stream - const ia_isp_bxt_resolution_info_t* gdcResolution = getGdcKernelResolutionInfo(kernelId); - CheckWarning(!gdcResolution, NO_ENTRY, "Couldn't get the GDC resolution in current pipe: %d", - mPipeUseCase); - - *resolution = *gdcResolution; +void GraphConfigPipe::getGdcKernelResolutionInfo(std::vector* gdcInfos) { + CheckAndLogError(!gdcInfos, VOID_VALUE, "%s, the gdcInfos is nullptr", __func__); - LOG2("%s: kernel %d, inResolution %dx%d, outResolution %dx%d", __func__, *kernelId, - resolution->input_width, resolution->input_height, resolution->output_width, - resolution->output_height); + std::vector streamIds; + // Get all stream IDs + graphGetStreamIds(&streamIds); + if (streamIds.empty()) return; - LOG2("%s: kernel %d, inputCrop %d,%d,%d,%d; outputCrop %d,%d,%d,%d", __func__, *kernelId, - resolution->input_crop.left, resolution->input_crop.top, resolution->input_crop.right, - resolution->input_crop.bottom, resolution->output_crop.left, resolution->output_crop.top, - resolution->output_crop.right, resolution->output_crop.bottom); + uint32_t kernelId = ia_pal_uuid_isp_gdc3; + for (auto streamId : streamIds) { + bool hasGdcKernel = getGdcKernelId(&kernelId, streamId); + if (!hasGdcKernel) continue; + + IGraphType::GdcInfo gdcInfo; + auto info = getKernelResolutionInfo(streamId, kernelId); + if (info) { + gdcInfo.streamId = streamId; + gdcInfo.gdcKernelId = kernelId; + gdcInfo.gdcReso = *info; + // push video stream as the first one item + if (streamId == VIDEO_STREAM_ID) { + gdcInfos->insert(gdcInfos->begin(), gdcInfo); + } else { + gdcInfos->push_back(gdcInfo); + } - return OK; + LOG2("%s: kernel %d, inResolution %dx%d, outResolution %dx%d", __func__, kernelId, + info->input_width, info->input_height, info->output_width, info->output_height); + LOG2("%s: kernel %d, inCrop %d,%d,%d,%d; outCrop %d,%d,%d,%d", __func__, kernelId, + info->input_crop.left, info->input_crop.top, info->input_crop.right, + info->input_crop.bottom, info->output_crop.left, info->output_crop.top, + info->output_crop.right, info->output_crop.bottom); + } + } } const ia_isp_bxt_resolution_info_t* GraphConfigPipe::getKernelResolutionInfo(uint32_t streamId, @@ -537,7 +529,7 @@ const ia_isp_bxt_resolution_info_t* GraphConfigPipe::getKernelResolutionInfo(uin * \return false the kernel isn't in this stream. * */ -bool GraphConfigPipe::isKernelInStream(uint32_t streamId, uint32_t kernelId) { +bool GraphConfigPipe::isKernelInStream(int32_t streamId, uint32_t kernelId) { ia_isp_bxt_program_group* programGroup = getProgramGroup(streamId); if (programGroup == nullptr) { return false; @@ -996,22 +988,25 @@ status_t GraphConfigPipe::getScalerByStreamId( LOG2("%s, ppp ratio, osW:%f, osH:%f", __func__, osW, osH); } - uint32_t kernelId; float gdcScalerW = 1; float gdcScalerH = 1; - const ia_isp_bxt_resolution_info_t* gdcResolution = getGdcKernelResolutionInfo(&kernelId); - if ((gdcResolution) && ((gdcResolution->input_width != gdcResolution->output_width) || - (gdcResolution->input_height != gdcResolution->output_height))) { - const ia_rectangle* input_crop = &gdcResolution->input_crop; - const ia_rectangle* output_crop = &gdcResolution->output_crop; - if (((input_crop->left == 0) && (input_crop->top == 0) && (input_crop->right == 0) && - (input_crop->bottom == 0)) && - ((output_crop->left == 0) && (output_crop->top == 0) && (output_crop->right == 0) && - (output_crop->bottom == 0))) { - gdcScalerW = static_cast(gdcResolution->input_width) / - static_cast(gdcResolution->output_width); - gdcScalerH = static_cast(gdcResolution->input_height) / - static_cast(gdcResolution->output_height); + std::vector gdcInfos; + getGdcKernelResolutionInfo(&gdcInfos); + if (!gdcInfos.empty()) { + auto& gdcResolution = gdcInfos.begin()->gdcReso; + if ((gdcResolution.input_width != gdcResolution.output_width) || + (gdcResolution.input_height != gdcResolution.output_height)) { + const ia_rectangle* input_crop = &gdcResolution.input_crop; + const ia_rectangle* output_crop = &gdcResolution.output_crop; + if (((input_crop->left == 0) && (input_crop->top == 0) && + (input_crop->right == 0) && (input_crop->bottom == 0)) && + ((output_crop->left == 0) && (output_crop->top == 0) && + (output_crop->right == 0) && (output_crop->bottom == 0))) { + gdcScalerW = static_cast(gdcResolution.input_width) / + static_cast(gdcResolution.output_width); + gdcScalerH = static_cast(gdcResolution.input_height) / + static_cast(gdcResolution.output_height); + } } } LOG2("%s, gdc ratio, gdcScalerW:%f, gdcScalerH:%f", __func__, gdcScalerW, gdcScalerH); @@ -1327,7 +1322,7 @@ status_t GraphConfigPipe::portGetFormat(Node* port, IGraphType::PortFormatSettin status_t status = GCSS::GraphCameraUtil::portGetFourCCInfo(tmpNode, stageId, format->terminalId); - CheckAndLogError(status != OK, INVALID_OPERATION, "Could not get port uid", __func__); + CheckAndLogError(status != OK, INVALID_OPERATION, "%s, Could not get port uid", __func__); // if disabled there is no need to query the format if (format->enabled == 0) { @@ -1344,19 +1339,19 @@ status_t GraphConfigPipe::portGetFormat(Node* port, IGraphType::PortFormatSettin * it means that we need to ask the format from the peer. */ status = portGetPeer(port, &peerNode); - CheckAndLogError(status != OK, BAD_VALUE, "Could not find peer port", __func__); + CheckAndLogError(status != OK, BAD_VALUE, "%s, Could not find peer port", __func__); tmpNode = peerNode; ret = tmpNode->getValue(GCSS_KEY_WIDTH, format->width); - CheckAndLogError(ret != css_err_none, BAD_VALUE, "Could not find port width", __func__); + CheckAndLogError(ret != css_err_none, BAD_VALUE, "%s, Could not find port width", __func__); } ret = tmpNode->getValue(GCSS_KEY_HEIGHT, format->height); - CheckAndLogError(ret != css_err_none, BAD_VALUE, "Could not find port height", __func__); + CheckAndLogError(ret != css_err_none, BAD_VALUE, "%s, Could not find port height", __func__); string fourccFormat; ret = tmpNode->getValue(GCSS_KEY_FORMAT, fourccFormat); - CheckAndLogError(ret != css_err_none, BAD_VALUE, "Could not find port fourcc", __func__); + CheckAndLogError(ret != css_err_none, BAD_VALUE, "%s, Could not find port fourcc", __func__); const char* pFormat = fourccFormat.c_str(); format->fourcc = CameraUtils::string2IaFourccCode(pFormat); @@ -1498,6 +1493,15 @@ status_t GraphConfigPipe::portGetClientStream(Node* port, HalStream** stream) { return BAD_VALUE; } + /* When using the still tnr mode, both still(x) and stilltnr(x) port eventually mapped to the + * same Hal stream. stilltnr(x) is dummy port and will not appear in mStreamToSinkIdMap, so need + * use still(x) to find the corresponding Hal stream + */ + string::size_type pos = 0; + if ((pos = portName.find("tnr")) != string::npos) { + portName = portName.erase(pos, 3); + } + uid_t vPortId = GCSS::ItemUID::str2key(portName); *stream = getHalStreamByVirtualId(vPortId); @@ -1573,6 +1577,17 @@ bool GraphConfigPipe::portIsEdgePort(Node* port) { return isEdge; } +// DOL_FEATURE_S +int GraphConfigPipe::getDolInfo(float* gain, string* mode) { + CheckAndLogError(!gain || !mode, UNKNOWN_ERROR, "%s, the gain or mode is nullptr", __func__); + + css_err_t status = mGCSSAicUtil.getDolInfo(*gain, *mode); + CheckAndLogError(status != css_err_none, UNKNOWN_ERROR, "%s, Get DOL info fails", __func__); + + return OK; +} +// DOL_FEATURE_E + void GraphConfigPipe::dumpSettings() { mSettings->dumpNodeTree(mSettings, 2); } diff --git a/modules/algowrapper/graph/GraphConfigPipe.h b/modules/algowrapper/graph/GraphConfigPipe.h index c0841144..db3b129f 100644 --- a/modules/algowrapper/graph/GraphConfigPipe.h +++ b/modules/algowrapper/graph/GraphConfigPipe.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation + * Copyright (C) 2015-2022 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -86,10 +86,10 @@ class GraphConfigPipe { */ const GCSS::IGraphConfig* getInterface(Node* node) const; ia_isp_bxt_program_group* getProgramGroup(int32_t streamId); - status_t getGdcKernelSetting(uint32_t* kernelId, ia_isp_bxt_resolution_info_t* resolution); + void getGdcKernelResolutionInfo(std::vector* gdcInfos); const ia_isp_bxt_resolution_info_t* getKernelResolutionInfo(uint32_t streamId, uint32_t kernelId); - bool isKernelInStream(uint32_t streamId, uint32_t kernelId); + bool isKernelInStream(int32_t streamId, uint32_t kernelId); status_t getPgIdForKernel(const uint32_t streamId, const int32_t kernelId, int32_t* pgId); status_t getMBRData(int32_t streamId, ia_isp_bxt_gdc_limits* data); status_t prepare(Node* settings, const StreamToSinkMap& streamToSinkIdMap); @@ -144,6 +144,12 @@ class GraphConfigPipe { * -1 will be returned if cannot find the valid PG id. */ int getStreamIdByPgName(std::string pgName); + // DOL_FEATURE_S + /* + * retieve the conversion gain and the DOL mode from the settings of the sensor mode. + */ + int getDolInfo(float* gain, std::string* mode); + // DOL_FEATURE_E /* * Debugging support @@ -167,7 +173,7 @@ class GraphConfigPipe { bool isVideoRecordPort(Node* sink); status_t getProgramGroupsByName(const std::vector& pgNames, NodesPtrVector* programGroups); - const ia_isp_bxt_resolution_info_t* getGdcKernelResolutionInfo(uint32_t* kernelId); + bool getGdcKernelId(uint32_t* kernelId, int32_t streamId); const ia_isp_bxt_resolution_info_t* getScalerKernelResolutionInfo(uint32_t* kenerArray, uint32_t sizeArray); status_t getScalerKernelResolutionRatio(uint32_t* kenerArray, uint32_t sizeArray, diff --git a/modules/ia_cipr/src/Context.cpp b/modules/ia_cipr/src/Context.cpp index 1896491c..fb223a67 100644 --- a/modules/ia_cipr/src/Context.cpp +++ b/modules/ia_cipr/src/Context.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation. + * Copyright (C) 2020-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -229,8 +229,9 @@ Result Context::registerBuffer(MemoryDesc* mem) { mem->sysBuff = ioc_buffer; mem->flags |= MemoryFlag::Migrated; - LOG2("registered buffer:%p -> fd:%d len:%lu offset:%u bytes_used:%u", mem->cpuPtr, - ioc_buffer->base.fd, ioc_buffer->len, ioc_buffer->data_offset, ioc_buffer->bytes_used); + LOG2("registered buffer:%p -> fd:%d len:%lu offset:%u bytes_used:%u, flags:%x", mem->cpuPtr, + ioc_buffer->base.fd, ioc_buffer->len, ioc_buffer->data_offset, ioc_buffer->bytes_used, + ioc_buffer->flags); return res; } diff --git a/modules/ia_css/ipu6/include/assert_support.h b/modules/ia_css/ipu6/include/assert_support.h index b7d5bdc1..947fc5f0 100644 --- a/modules/ia_css/ipu6/include/assert_support.h +++ b/modules/ia_css/ipu6/include/assert_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/cpu_mem_support.h b/modules/ia_css/ipu6/include/cpu_mem_support.h index 802436de..d0f1b0f1 100644 --- a/modules/ia_css/ipu6/include/cpu_mem_support.h +++ b/modules/ia_css/ipu6/include/cpu_mem_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/error_support.h b/modules/ia_css/ipu6/include/error_support.h index a402a4be..4d43f296 100644 --- a/modules/ia_css/ipu6/include/error_support.h +++ b/modules/ia_css/ipu6/include/error_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/frame_support.h b/modules/ia_css/ipu6/include/frame_support.h index bdde4270..5243a860 100644 --- a/modules/ia_css/ipu6/include/frame_support.h +++ b/modules/ia_css/ipu6/include/frame_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_base_types.h b/modules/ia_css/ipu6/include/ia_css_base_types.h index e5ad986c..3883e8f1 100644 --- a/modules/ia_css/ipu6/include/ia_css_base_types.h +++ b/modules/ia_css/ipu6/include/ia_css_base_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_isa_parameter_defs.h b/modules/ia_css/ipu6/include/ia_css_isa_parameter_defs.h index 69c96052..689c8995 100644 --- a/modules/ia_css/ipu6/include/ia_css_isa_parameter_defs.h +++ b/modules/ia_css/ipu6/include/ia_css_isa_parameter_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_isa_parameter_defs_dep.h b/modules/ia_css/ipu6/include/ia_css_isa_parameter_defs_dep.h index 339e695f..106409e6 100644 --- a/modules/ia_css/ipu6/include/ia_css_isa_parameter_defs_dep.h +++ b/modules/ia_css/ipu6/include/ia_css_isa_parameter_defs_dep.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_kernel_bitmap.h b/modules/ia_css/ipu6/include/ia_css_kernel_bitmap.h index f0499256..4881fdd5 100644 --- a/modules/ia_css/ipu6/include/ia_css_kernel_bitmap.h +++ b/modules/ia_css/ipu6/include/ia_css_kernel_bitmap.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_kernel_bitmap_impl.h b/modules/ia_css/ipu6/include/ia_css_kernel_bitmap_impl.h index beaedc9e..5b1974b7 100644 --- a/modules/ia_css/ipu6/include/ia_css_kernel_bitmap_impl.h +++ b/modules/ia_css/ipu6/include/ia_css_kernel_bitmap_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_kernel_user_param_types.h b/modules/ia_css/ipu6/include/ia_css_kernel_user_param_types.h index cd6223b5..c4c0ef52 100644 --- a/modules/ia_css/ipu6/include/ia_css_kernel_user_param_types.h +++ b/modules/ia_css/ipu6/include/ia_css_kernel_user_param_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_program_group_data.h b/modules/ia_css/ipu6/include/ia_css_program_group_data.h index fa014dba..e3be7548 100644 --- a/modules/ia_css/ipu6/include/ia_css_program_group_data.h +++ b/modules/ia_css/ipu6/include/ia_css_program_group_data.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_program_group_data_defs.h b/modules/ia_css/ipu6/include/ia_css_program_group_data_defs.h index 39a4970a..aaad08e9 100644 --- a/modules/ia_css/ipu6/include/ia_css_program_group_data_defs.h +++ b/modules/ia_css/ipu6/include/ia_css_program_group_data_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_program_group_data_impl.h b/modules/ia_css/ipu6/include/ia_css_program_group_data_impl.h index 84f1be04..91e54f12 100644 --- a/modules/ia_css/ipu6/include/ia_css_program_group_data_impl.h +++ b/modules/ia_css/ipu6/include/ia_css_program_group_data_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_program_group_param.h b/modules/ia_css/ipu6/include/ia_css_program_group_param.h index e95e1f76..d45c769a 100644 --- a/modules/ia_css/ipu6/include/ia_css_program_group_param.h +++ b/modules/ia_css/ipu6/include/ia_css_program_group_param.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_program_group_param.sim.h b/modules/ia_css/ipu6/include/ia_css_program_group_param.sim.h index 4e0f8265..ffe3faa0 100644 --- a/modules/ia_css/ipu6/include/ia_css_program_group_param.sim.h +++ b/modules/ia_css/ipu6/include/ia_css_program_group_param.sim.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_program_group_param_private.h b/modules/ia_css/ipu6/include/ia_css_program_group_param_private.h index cfc4fa73..3e13c71c 100644 --- a/modules/ia_css/ipu6/include/ia_css_program_group_param_private.h +++ b/modules/ia_css/ipu6/include/ia_css_program_group_param_private.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_program_group_param_types.h b/modules/ia_css/ipu6/include/ia_css_program_group_param_types.h index 2e404c40..26755f44 100644 --- a/modules/ia_css/ipu6/include/ia_css_program_group_param_types.h +++ b/modules/ia_css/ipu6/include/ia_css_program_group_param_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_buffer_set.h b/modules/ia_css/ipu6/include/ia_css_psys_buffer_set.h index 40b4c341..c7b208e7 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_buffer_set.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_buffer_set.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_data_trace.h b/modules/ia_css/ipu6/include/ia_css_psys_data_trace.h index c2f35fbb..5e20f3ae 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_data_trace.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_data_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_dynamic_trace.h b/modules/ia_css/ipu6/include/ia_css_psys_dynamic_trace.h index e79c9469..c8179c51 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_dynamic_trace.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_dynamic_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_kernel_trace.h b/modules/ia_css/ipu6/include/ia_css_psys_kernel_trace.h index 9c0e6488..07ff8446 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_kernel_trace.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_kernel_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_manifest_types.h b/modules/ia_css/ipu6/include/ia_css_psys_manifest_types.h index 3c5ee11d..baebf5ec 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_manifest_types.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_manifest_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_param_trace.h b/modules/ia_css/ipu6/include/ia_css_psys_param_trace.h index 36939b1d..87110165 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_param_trace.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_param_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_private_pg_data.h b/modules/ia_css/ipu6/include/ia_css_psys_private_pg_data.h index a2d4aebd..29ceb655 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_private_pg_data.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_private_pg_data.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_process.h b/modules/ia_css/ipu6/include/ia_css_psys_process.h index 480c70f4..6e57cef6 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_process.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_process.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_process.hsys.kernel.h b/modules/ia_css/ipu6/include/ia_css_psys_process.hsys.kernel.h index 05b6f1f8..02a66ee5 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_process.hsys.kernel.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_process.hsys.kernel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_process.hsys.user.h b/modules/ia_css/ipu6/include/ia_css_psys_process.hsys.user.h index 881f6f08..ccddfd6c 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_process.hsys.user.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_process.hsys.user.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_process.psys.h b/modules/ia_css/ipu6/include/ia_css_psys_process.psys.h index 28b08140..212331bc 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_process.psys.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_process.psys.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_process_group.h b/modules/ia_css/ipu6/include/ia_css_psys_process_group.h index 17a5a008..c35bb30f 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_process_group.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_process_group.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_process_group.hsys.kernel.h b/modules/ia_css/ipu6/include/ia_css_psys_process_group.hsys.kernel.h index 73167fa2..5c300322 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_process_group.hsys.kernel.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_process_group.hsys.kernel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_process_group.hsys.user.h b/modules/ia_css/ipu6/include/ia_css_psys_process_group.hsys.user.h index 3dc6f61b..f25c0a30 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_process_group.hsys.user.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_process_group.hsys.user.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_process_group.psys.h b/modules/ia_css/ipu6/include/ia_css_psys_process_group.psys.h index e42eadf7..de2e4dd9 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_process_group.psys.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_process_group.psys.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_process_group_cmd_impl.h b/modules/ia_css/ipu6/include/ia_css_psys_process_group_cmd_impl.h index ff9a70e7..2e60e001 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_process_group_cmd_impl.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_process_group_cmd_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_process_group_impl.h b/modules/ia_css/ipu6/include/ia_css_psys_process_group_impl.h index c3d704ce..38e36c64 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_process_group_impl.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_process_group_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -535,6 +535,7 @@ int ia_css_process_group_print( ia_css_rbm_t routing_bitmap; NOT_USED(fid); + NOT_USED(routing_bitmap); IA_CSS_TRACE_0(PSYSAPI_DYNAMIC, VERBOSE, "ia_css_process_group_print(): enter:\n"); @@ -691,6 +692,7 @@ bool ia_css_can_process_group_submit( int retval = -1; uint8_t terminal_count = ia_css_process_group_get_terminal_count(process_group); + NOT_USED(retval); IA_CSS_TRACE_0(PSYSAPI_DYNAMIC, INFO, "ia_css_can_process_group_submit(): enter:\n"); @@ -701,6 +703,7 @@ bool ia_css_can_process_group_submit( ia_css_terminal_t *terminal = ia_css_process_group_get_terminal(process_group, i); vied_vaddress_t buffer; + NOT_USED(buffer); ia_css_buffer_state_t buffer_state; verifexitval(terminal != NULL, EINVAL); @@ -773,6 +776,7 @@ bool ia_css_can_enqueue_buffer_set( bool can_enqueue = false; int retval = -1; uint8_t terminal_count; + NOT_USED(retval); IA_CSS_TRACE_0(PSYSAPI_DYNAMIC, INFO, "ia_css_can_enqueue_buffer_set(): enter:\n"); @@ -796,6 +800,7 @@ bool ia_css_can_enqueue_buffer_set( ia_css_process_group_get_terminal(process_group, i); vied_vaddress_t buffer; ia_css_buffer_state_t buffer_state; + NOT_USED(buffer); verifexitval(terminal != NULL, EINVAL); @@ -855,6 +860,7 @@ bool ia_css_can_process_group_start( bool can_start = false; int retval = -1; uint8_t terminal_count; + NOT_USED(retval); IA_CSS_TRACE_0(PSYSAPI_DYNAMIC, INFO, "ia_css_can_process_group_start(): enter:\n"); diff --git a/modules/ia_css/ipu6/include/ia_css_psys_process_impl.h b/modules/ia_css/ipu6/include/ia_css_psys_process_impl.h index 0c835f7f..55c0c19f 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_process_impl.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_process_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_process_private_types.h b/modules/ia_css/ipu6/include/ia_css_psys_process_private_types.h index 85ae3ea8..d7804fe4 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_process_private_types.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_process_private_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_process_types.h b/modules/ia_css/ipu6/include/ia_css_psys_process_types.h index e83b760d..9c7a9dc8 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_process_types.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_process_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest.h b/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest.h index 88740a99..afac8563 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest.hsys.user.h b/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest.hsys.user.h index c85ccc66..093f7f0e 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest.hsys.user.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest.hsys.user.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest.sim.h b/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest.sim.h index 74511440..1ed3f796 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest.sim.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest.sim.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest_impl.h b/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest_impl.h index 0403700a..5ffec7e6 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest_impl.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_program_group_manifest_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_program_group_private.h b/modules/ia_css/ipu6/include/ia_css_psys_program_group_private.h index 61f3023f..4424050f 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_program_group_private.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_program_group_private.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.h b/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.h index 7fa8e791..99b6d9ab 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.hsys.kernel.h b/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.hsys.kernel.h index 93fb1392..6708a653 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.hsys.kernel.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.hsys.kernel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.hsys.user.h b/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.hsys.user.h index cc9b13bd..aa2bb79e 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.hsys.user.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.hsys.user.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.sim.h b/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.sim.h index 34d742dc..2843b62c 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.sim.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_program_manifest.sim.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_program_manifest_impl.h b/modules/ia_css/ipu6/include/ia_css_psys_program_manifest_impl.h index 04803a38..1e84f22a 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_program_manifest_impl.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_program_manifest_impl.h @@ -1,18 +1,26 @@ /* - * Copyright (C) 2020 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +* INTEL CONFIDENTIAL +* +* Copyright (C) 2018 - 2019 Intel Corporation. +* All Rights Reserved. +* +* The source code contained or described herein and all documents +* related to the source code ("Material") are owned by Intel Corporation +* or licensors. Title to the Material remains with Intel +* Corporation or its licensors. The Material contains trade +* secrets and proprietary and confidential information of Intel or its +* licensors. The Material is protected by worldwide copyright +* and trade secret laws and treaty provisions. No part of the Material may +* be used, copied, reproduced, modified, published, uploaded, posted, +* transmitted, distributed, or disclosed in any way without Intel's prior +* express written permission. +* +* No License under any patent, copyright, trade secret or other intellectual +* property right is granted to or conferred upon you by disclosure or +* delivery of the Materials, either expressly, by implication, inducement, +* estoppel or otherwise. Any license under such intellectual property rights +* must be express and approved by Intel in writing. +*/ #ifndef __IA_CSS_PSYS_PROGRAM_MANIFEST_IMPL_H #define __IA_CSS_PSYS_PROGRAM_MANIFEST_IMPL_H @@ -35,543 +43,543 @@ IA_CSS_PSYS_STATIC_STORAGE_CLASS_C ia_css_program_manifest_ext_t *ia_css_program_manifest_get_extension(const ia_css_program_manifest_t *program) { - DECLARE_ERRVAL - verifexitval(program != NULL, EFAULT); - if (program->program_extension_offset != 0) { - return (ia_css_program_manifest_ext_t *)((uint8_t *)program + program->program_extension_offset); - } + DECLARE_ERRVAL + verifexitval(program != NULL, EFAULT); + if (program->program_extension_offset != 0) { + return (ia_css_program_manifest_ext_t *)((uint8_t *)program + program->program_extension_offset); + } EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_extension invalid argument\n"); - } - return NULL; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_extension invalid argument\n"); + } + return NULL; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C vied_nci_resource_size_t ia_css_program_manifest_get_int_mem_size( - const ia_css_program_manifest_t *manifest, - const vied_nci_mem_type_ID_t mem_type_id) + const ia_css_program_manifest_t *manifest, + const vied_nci_mem_type_ID_t mem_type_id) { - (void)manifest; - (void)mem_type_id; - IA_CSS_TRACE_0(PSYSAPI_STATIC, INFO, - "ia_css_program_manifest_get_int_mem_size always returns 0" - "(internally memory feature not used).\n"); - return 0; + (void)manifest; + (void)mem_type_id; + IA_CSS_TRACE_0(PSYSAPI_STATIC, INFO, + "ia_css_program_manifest_get_int_mem_size always returns 0" + "(internally memory feature not used).\n"); + return 0; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C uint8_t ia_css_program_manifest_get_input_terminal_id( - ia_css_program_manifest_t *manifest, - unsigned char idx) + ia_css_program_manifest_t *manifest, + unsigned char idx) { - DECLARE_ERRVAL - ia_css_program_manifest_ext_t *manifest_ext = NULL; - - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_input_stream_id(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); - verifexitval(idx < IA_CSS_MAX_INPUT_DEC_RESOURCES, EFAULT); - manifest_ext = ia_css_program_manifest_get_extension(manifest); - if (manifest_ext == NULL) { - return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; - } + DECLARE_ERRVAL + ia_css_program_manifest_ext_t *manifest_ext = NULL; + + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_input_stream_id(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); + verifexitval(idx < IA_CSS_MAX_INPUT_DEC_RESOURCES, EFAULT); + manifest_ext = ia_css_program_manifest_get_extension(manifest); + if (manifest_ext == NULL) { + return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; + } EXIT: - if (!noerror()) { - return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; - } + if (!noerror()) { + return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; + } #if IA_CSS_MAX_INPUT_DEC_RESOURCES > 0 - return manifest_ext->dec_resources_input_terminal[idx]; + return manifest_ext->dec_resources_input_terminal[idx]; #else - (void) idx; - return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; + (void) idx; + return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; #endif } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C uint8_t ia_css_program_manifest_get_output_terminal_id( - ia_css_program_manifest_t *manifest, - unsigned char idx) + ia_css_program_manifest_t *manifest, + unsigned char idx) { - DECLARE_ERRVAL - ia_css_program_manifest_ext_t *manifest_ext = NULL; - - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_output_terminal_id(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); - verifexitval(idx < IA_CSS_MAX_OUTPUT_DEC_RESOURCES, EFAULT); - manifest_ext = ia_css_program_manifest_get_extension(manifest); - if (manifest_ext == NULL) { - return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; - } + DECLARE_ERRVAL + ia_css_program_manifest_ext_t *manifest_ext = NULL; + + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_output_terminal_id(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); + verifexitval(idx < IA_CSS_MAX_OUTPUT_DEC_RESOURCES, EFAULT); + manifest_ext = ia_css_program_manifest_get_extension(manifest); + if (manifest_ext == NULL) { + return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; + } EXIT: - if (!noerror()) { - return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; - } + if (!noerror()) { + return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; + } #if IA_CSS_MAX_OUTPUT_DEC_RESOURCES > 0 - return manifest_ext->dec_resources_output_terminal[idx]; + return manifest_ext->dec_resources_output_terminal[idx]; #else - (void) idx; - return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; + (void) idx; + return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; #endif } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C uint8_t ia_css_program_manifest_get_input_stream_id( - ia_css_program_manifest_t *manifest, - unsigned char idx) + ia_css_program_manifest_t *manifest, + unsigned char idx) { - DECLARE_ERRVAL - ia_css_program_manifest_ext_t *manifest_ext = NULL; - - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_input_stream_id(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); - verifexitval(idx < IA_CSS_MAX_INPUT_DEC_RESOURCES, EFAULT); - manifest_ext = ia_css_program_manifest_get_extension(manifest); - if (manifest_ext == NULL) { - return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; - } + DECLARE_ERRVAL + ia_css_program_manifest_ext_t *manifest_ext = NULL; + + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_input_stream_id(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); + verifexitval(idx < IA_CSS_MAX_INPUT_DEC_RESOURCES, EFAULT); + manifest_ext = ia_css_program_manifest_get_extension(manifest); + if (manifest_ext == NULL) { + return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; + } EXIT: - if (!noerror()) { - return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; - } + if (!noerror()) { + return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; + } #if IA_CSS_MAX_INPUT_DEC_RESOURCES > 0 - return manifest_ext->dec_resources_input[idx]; + return manifest_ext->dec_resources_input[idx]; #else - (void) idx; - return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; + (void) idx; + return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; #endif } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C uint8_t ia_css_program_manifest_get_output_stream_id( - ia_css_program_manifest_t *manifest, - unsigned char idx) + ia_css_program_manifest_t *manifest, + unsigned char idx) { - DECLARE_ERRVAL - ia_css_program_manifest_ext_t *manifest_ext = NULL; - - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_output_stream_id(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); - verifexitval(idx < IA_CSS_MAX_OUTPUT_DEC_RESOURCES, EFAULT); - manifest_ext = ia_css_program_manifest_get_extension(manifest); - if (manifest_ext == NULL) { - return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; - } + DECLARE_ERRVAL + ia_css_program_manifest_ext_t *manifest_ext = NULL; + + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_output_stream_id(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); + verifexitval(idx < IA_CSS_MAX_OUTPUT_DEC_RESOURCES, EFAULT); + manifest_ext = ia_css_program_manifest_get_extension(manifest); + if (manifest_ext == NULL) { + return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; + } EXIT: - if (!noerror()) { - return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; - } + if (!noerror()) { + return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; + } #if IA_CSS_MAX_OUTPUT_DEC_RESOURCES > 0 - return manifest_ext->dec_resources_output[idx]; + return manifest_ext->dec_resources_output[idx]; #else - (void) idx; - return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; + (void) idx; + return IA_CSS_PROGRAM_INVALID_DEC_CONFIG; #endif } #if HAS_DFM IA_CSS_PSYS_STATIC_STORAGE_CLASS_C uint8_t ia_css_program_manifest_get_is_dfm_relocatable( - const ia_css_program_manifest_t *manifest, - const vied_nci_dev_dfm_id_t dfm_type_id) + const ia_css_program_manifest_t *manifest, + const vied_nci_dev_dfm_id_t dfm_type_id) { - DECLARE_ERRVAL - ia_css_program_manifest_ext_t *manifest_ext = NULL; - - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_is_dfm_relocatable(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); - verifexitval(dfm_type_id < VIED_NCI_N_DEV_DFM_ID, EFAULT); - manifest_ext = ia_css_program_manifest_get_extension(manifest); - if (manifest_ext == NULL) { - return 0; - } + DECLARE_ERRVAL + ia_css_program_manifest_ext_t *manifest_ext = NULL; + + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_is_dfm_relocatable(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); + verifexitval(dfm_type_id < VIED_NCI_N_DEV_DFM_ID, EFAULT); + manifest_ext = ia_css_program_manifest_get_extension(manifest); + if (manifest_ext == NULL) { + return 0; + } EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_is_dfm_relocatable invalid argument\n"); - return 0; - } - return manifest_ext->is_dfm_relocatable[dfm_type_id]; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_is_dfm_relocatable invalid argument\n"); + return 0; + } + return manifest_ext->is_dfm_relocatable[dfm_type_id]; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C vied_nci_resource_bitmap_t ia_css_program_manifest_get_dfm_port_bitmap( - const ia_css_program_manifest_t *manifest, - const vied_nci_dev_dfm_id_t dfm_type_id) + const ia_css_program_manifest_t *manifest, + const vied_nci_dev_dfm_id_t dfm_type_id) { - DECLARE_ERRVAL - ia_css_program_manifest_ext_t *manifest_ext = NULL; - - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_dfm_port_bitmap(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); - verifexitval(dfm_type_id < VIED_NCI_N_DEV_DFM_ID, EFAULT); - manifest_ext = ia_css_program_manifest_get_extension(manifest); - if (manifest_ext == NULL) { - return 0; - } + DECLARE_ERRVAL + ia_css_program_manifest_ext_t *manifest_ext = NULL; + + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_dfm_port_bitmap(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); + verifexitval(dfm_type_id < VIED_NCI_N_DEV_DFM_ID, EFAULT); + manifest_ext = ia_css_program_manifest_get_extension(manifest); + if (manifest_ext == NULL) { + return 0; + } EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_dfm_port_bitmap invalid argument\n"); - return 0; - } - return manifest_ext->dfm_port_bitmap[dfm_type_id]; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_dfm_port_bitmap invalid argument\n"); + return 0; + } + return manifest_ext->dfm_port_bitmap[dfm_type_id]; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C vied_nci_resource_bitmap_t ia_css_program_manifest_get_dfm_active_port_bitmap( - const ia_css_program_manifest_t *manifest, - const vied_nci_dev_dfm_id_t dfm_type_id) + const ia_css_program_manifest_t *manifest, + const vied_nci_dev_dfm_id_t dfm_type_id) { - DECLARE_ERRVAL - ia_css_program_manifest_ext_t *manifest_ext = NULL; - - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_dfm_active_port_bitmap(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); - verifexitval(dfm_type_id < VIED_NCI_N_DEV_DFM_ID, EFAULT); - manifest_ext = ia_css_program_manifest_get_extension(manifest); - if (manifest_ext == NULL) { - return 0; - } + DECLARE_ERRVAL + ia_css_program_manifest_ext_t *manifest_ext = NULL; + + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_dfm_active_port_bitmap(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); + verifexitval(dfm_type_id < VIED_NCI_N_DEV_DFM_ID, EFAULT); + manifest_ext = ia_css_program_manifest_get_extension(manifest); + if (manifest_ext == NULL) { + return 0; + } EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_dfm_active_port_bitmap invalid argument\n"); - return 0; - } - return manifest_ext->dfm_active_port_bitmap[dfm_type_id]; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_dfm_active_port_bitmap invalid argument\n"); + return 0; + } + return manifest_ext->dfm_active_port_bitmap[dfm_type_id]; } #endif /* HAS_DFM */ IA_CSS_PSYS_STATIC_STORAGE_CLASS_C vied_nci_resource_size_t ia_css_program_manifest_get_ext_mem_size( - const ia_css_program_manifest_t *manifest, - const vied_nci_mem_type_ID_t mem_type_id) + const ia_css_program_manifest_t *manifest, + const vied_nci_mem_type_ID_t mem_type_id) { - DECLARE_ERRVAL - ia_css_program_manifest_ext_t *manifest_ext = NULL; - - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_ext_mem_size(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); - verifexitval(mem_type_id < VIED_NCI_N_DATA_MEM_TYPE_ID, EFAULT); - manifest_ext = ia_css_program_manifest_get_extension(manifest); - if (manifest_ext == NULL) { - return 0; - } + DECLARE_ERRVAL + ia_css_program_manifest_ext_t *manifest_ext = NULL; + + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_ext_mem_size(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); + verifexitval(mem_type_id < VIED_NCI_N_DATA_MEM_TYPE_ID, EFAULT); + manifest_ext = ia_css_program_manifest_get_extension(manifest); + if (manifest_ext == NULL) { + return 0; + } EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_ext_mem_size invalid argument\n"); - return 0; - } - return manifest_ext->ext_mem_size[mem_type_id]; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_ext_mem_size invalid argument\n"); + return 0; + } + return manifest_ext->ext_mem_size[mem_type_id]; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C vied_nci_resource_size_t ia_css_program_manifest_get_ext_mem_offset( - const ia_css_program_manifest_t *manifest, - const vied_nci_mem_type_ID_t mem_type_id) + const ia_css_program_manifest_t *manifest, + const vied_nci_mem_type_ID_t mem_type_id) { - DECLARE_ERRVAL - ia_css_program_manifest_ext_t *manifest_ext = NULL; - - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_ext_mem_offset(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); - verifexitval(mem_type_id < VIED_NCI_N_DATA_MEM_TYPE_ID, EFAULT); - manifest_ext = ia_css_program_manifest_get_extension(manifest); - if (manifest_ext == NULL) { - return 0; - } + DECLARE_ERRVAL + ia_css_program_manifest_ext_t *manifest_ext = NULL; + + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_ext_mem_offset(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); + verifexitval(mem_type_id < VIED_NCI_N_DATA_MEM_TYPE_ID, EFAULT); + manifest_ext = ia_css_program_manifest_get_extension(manifest); + if (manifest_ext == NULL) { + return 0; + } EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_ext_mem_offset invalid argument\n"); - return 0; - } - return manifest_ext->ext_mem_offset[mem_type_id]; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_ext_mem_offset invalid argument\n"); + return 0; + } + return manifest_ext->ext_mem_offset[mem_type_id]; } #if HAS_DFM IA_CSS_PSYS_STATIC_STORAGE_CLASS_C vied_nci_resource_size_t ia_css_program_manifest_get_dev_chn_size( - const ia_css_program_manifest_t *manifest, - const vied_nci_dev_chn_ID_t dev_chn_id) + const ia_css_program_manifest_t *manifest, + const vied_nci_dev_chn_ID_t dev_chn_id) { - DECLARE_ERRVAL - ia_css_program_manifest_ext_t *manifest_ext = NULL; - - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_dev_chn_size(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); - verifexitval(dev_chn_id < VIED_NCI_N_DEV_CHN_ID, EFAULT); - manifest_ext = ia_css_program_manifest_get_extension(manifest); - if (manifest_ext == NULL) { - return 0; - } + DECLARE_ERRVAL + ia_css_program_manifest_ext_t *manifest_ext = NULL; + + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_dev_chn_size(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); + verifexitval(dev_chn_id < VIED_NCI_N_DEV_CHN_ID, EFAULT); + manifest_ext = ia_css_program_manifest_get_extension(manifest); + if (manifest_ext == NULL) { + return 0; + } EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_dev_chn_size invalid argument\n"); - return 0; - } - return manifest_ext->dev_chn_size[dev_chn_id]; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_dev_chn_size invalid argument\n"); + return 0; + } + return manifest_ext->dev_chn_size[dev_chn_id]; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C vied_nci_resource_size_t ia_css_program_manifest_get_dev_chn_offset( - const ia_css_program_manifest_t *manifest, - const vied_nci_dev_chn_ID_t dev_chn_id) + const ia_css_program_manifest_t *manifest, + const vied_nci_dev_chn_ID_t dev_chn_id) { - DECLARE_ERRVAL - ia_css_program_manifest_ext_t *manifest_ext = NULL; - - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_dev_chn_offset(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); - verifexitval(dev_chn_id < VIED_NCI_N_DEV_CHN_ID, EFAULT); - manifest_ext = ia_css_program_manifest_get_extension(manifest); - if (manifest_ext == NULL) { - return 0; - } + DECLARE_ERRVAL + ia_css_program_manifest_ext_t *manifest_ext = NULL; + + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_dev_chn_offset(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); + verifexitval(dev_chn_id < VIED_NCI_N_DEV_CHN_ID, EFAULT); + manifest_ext = ia_css_program_manifest_get_extension(manifest); + if (manifest_ext == NULL) { + return 0; + } EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_dev_chn_offset invalid argument\n"); - return 0; - } - return manifest_ext->dev_chn_offset[dev_chn_id]; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_dev_chn_offset invalid argument\n"); + return 0; + } + return manifest_ext->dev_chn_offset[dev_chn_id]; } #endif /* HAS_DFM */ IA_CSS_PSYS_STATIC_STORAGE_CLASS_C size_t ia_css_program_manifest_get_size( - const ia_css_program_manifest_t *manifest) + const ia_css_program_manifest_t *manifest) { - DECLARE_ERRVAL + DECLARE_ERRVAL - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_size(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_size(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_size invalid argument\n"); - return 0; - } + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_size invalid argument\n"); + return 0; + } - return manifest->size; + return manifest->size; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C ia_css_program_ID_t ia_css_program_manifest_get_program_ID( - const ia_css_program_manifest_t *manifest) + const ia_css_program_manifest_t *manifest) { - DECLARE_ERRVAL + DECLARE_ERRVAL - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_program_ID(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_program_ID(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_program_ID invalid argument\n"); - return IA_CSS_PROGRAM_INVALID_ID; - } - return manifest->ID; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_program_ID invalid argument\n"); + return IA_CSS_PROGRAM_INVALID_ID; + } + return manifest->ID; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C ia_css_program_group_manifest_t *ia_css_program_manifest_get_parent( - const ia_css_program_manifest_t *manifest) + const ia_css_program_manifest_t *manifest) { - DECLARE_ERRVAL - char *base = NULL; + DECLARE_ERRVAL + char *base = NULL; - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_parent(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_parent(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); - base = (char *)((char *)manifest + manifest->parent_offset); + base = (char *)((char *)manifest + manifest->parent_offset); EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_parent invalid argument\n"); - return NULL; - } - return (ia_css_program_group_manifest_t *)(base); + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_parent invalid argument\n"); + return NULL; + } + return (ia_css_program_group_manifest_t *)(base); } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C vied_nci_cell_type_ID_t ia_css_program_manifest_get_cell_type_ID( - const ia_css_program_manifest_t *manifest) + const ia_css_program_manifest_t *manifest) { - DECLARE_ERRVAL + DECLARE_ERRVAL - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_cell_type_ID(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_cell_type_ID(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_cell_type_ID invalid argument\n"); - return VIED_NCI_N_CELL_TYPE_ID; - } - return manifest->cell_type_id; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_cell_type_ID invalid argument\n"); + return VIED_NCI_N_CELL_TYPE_ID; + } + return manifest->cell_type_id; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C ia_css_program_type_t ia_css_program_manifest_get_type( - const ia_css_program_manifest_t *manifest) + const ia_css_program_manifest_t *manifest) { - DECLARE_ERRVAL + DECLARE_ERRVAL - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_type(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_type(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_type invalid argument\n"); - return IA_CSS_N_PROGRAM_TYPES; - } - return manifest->program_type; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_type invalid argument\n"); + return IA_CSS_N_PROGRAM_TYPES; + } + return manifest->program_type; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C uint8_t ia_css_program_manifest_get_terminal_dependency_count( - const ia_css_program_manifest_t *manifest) + const ia_css_program_manifest_t *manifest) { - DECLARE_ERRVAL + DECLARE_ERRVAL - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_terminal_dependency_count(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_terminal_dependency_count(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_terminal_dependency_count invalid argument\n"); - return 0; - } - return manifest->terminal_dependency_count; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_terminal_dependency_count invalid argument\n"); + return 0; + } + return manifest->terminal_dependency_count; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C uint8_t ia_css_program_manifest_get_terminal_dependency( - const ia_css_program_manifest_t *manifest, - const unsigned int index) + const ia_css_program_manifest_t *manifest, + const unsigned int index) { - DECLARE_ERRVAL - uint8_t *terminal_dep_ptr = NULL; - uint8_t terminal_dependency_count; - - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_terminal_dependency(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); - terminal_dependency_count = - ia_css_program_manifest_get_terminal_dependency_count(manifest); - verifexitval(index < terminal_dependency_count, EFAULT); - - terminal_dep_ptr = (uint8_t *)((uint8_t *)manifest + - manifest->terminal_dependency_offset + index); + DECLARE_ERRVAL + uint8_t *terminal_dep_ptr = NULL; + uint8_t terminal_dependency_count; + + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_terminal_dependency(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); + terminal_dependency_count = + ia_css_program_manifest_get_terminal_dependency_count(manifest); + verifexitval(index < terminal_dependency_count, EFAULT); + + terminal_dep_ptr = (uint8_t *)((uint8_t *)manifest + + manifest->terminal_dependency_offset + index); EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_terminal_dependency invalid argument\n"); - return IA_CSS_PROGRAM_INVALID_DEPENDENCY; - } - return *terminal_dep_ptr; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_terminal_dependency invalid argument\n"); + return IA_CSS_PROGRAM_INVALID_DEPENDENCY; + } + return *terminal_dep_ptr; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C bool ia_css_is_program_manifest_singular_program_type( - const ia_css_program_manifest_t *manifest) + const ia_css_program_manifest_t *manifest) { - ia_css_program_type_t program_type; + ia_css_program_type_t program_type; - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_is_program_manifest_singular_program_type(): enter:\n"); + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_is_program_manifest_singular_program_type(): enter:\n"); - program_type = ia_css_program_manifest_get_type(manifest); + program_type = ia_css_program_manifest_get_type(manifest); /* The error return is the limit value, so no need to check on the manifest * pointer */ - return (program_type == IA_CSS_PROGRAM_TYPE_SINGULAR); + return (program_type == IA_CSS_PROGRAM_TYPE_SINGULAR); } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C uint8_t ia_css_program_manifest_get_program_dependency_count( - const ia_css_program_manifest_t *manifest) + const ia_css_program_manifest_t *manifest) { - DECLARE_ERRVAL + DECLARE_ERRVAL - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_program_dependency_count(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_program_dependency_count(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_program_dependency_count invalid argument\n"); - return 0; - } - return manifest->program_dependency_count; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_program_dependency_count invalid argument\n"); + return 0; + } + return manifest->program_dependency_count; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C uint8_t ia_css_program_manifest_get_program_dependency( - const ia_css_program_manifest_t *manifest, - const unsigned int index) + const ia_css_program_manifest_t *manifest, + const unsigned int index) { - DECLARE_ERRVAL - uint8_t *program_dep_ptr = NULL; - uint8_t program_dependency_count; + DECLARE_ERRVAL + uint8_t *program_dep_ptr = NULL; + uint8_t program_dependency_count; - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_program_dependency(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_program_dependency(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); - program_dependency_count = - ia_css_program_manifest_get_program_dependency_count(manifest); + program_dependency_count = + ia_css_program_manifest_get_program_dependency_count(manifest); - verifexitval(index < program_dependency_count, EFAULT); - program_dep_ptr = (uint8_t *)((uint8_t *)manifest + - manifest->program_dependency_offset + - index * sizeof(uint8_t)); + verifexitval(index < program_dependency_count, EFAULT); + program_dep_ptr = (uint8_t *)((uint8_t *)manifest + + manifest->program_dependency_offset + + index * sizeof(uint8_t)); EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_program_dependency invalid argument\n"); - return IA_CSS_PROGRAM_INVALID_DEPENDENCY; - } - return *program_dep_ptr; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_program_dependency invalid argument\n"); + return IA_CSS_PROGRAM_INVALID_DEPENDENCY; + } + return *program_dep_ptr; } IA_CSS_PSYS_STATIC_STORAGE_CLASS_C ia_css_kernel_bitmap_t ia_css_program_manifest_get_kernel_bitmap( - const ia_css_program_manifest_t *manifest) + const ia_css_program_manifest_t *manifest) { - DECLARE_ERRVAL + DECLARE_ERRVAL - IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_kernel_bitmap(): enter:\n"); - verifexitval(manifest != NULL, EFAULT); + IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, + "ia_css_program_manifest_get_kernel_bitmap(): enter:\n"); + verifexitval(manifest != NULL, EFAULT); EXIT: - if (!noerror()) { - IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_kernel_bitmap invalid argument\n"); - return ia_css_kernel_bitmap_clear(); - } - return manifest->kernel_bitmap; + if (!noerror()) { + IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, + "ia_css_program_manifest_get_kernel_bitmap invalid argument\n"); + return ia_css_kernel_bitmap_clear(); + } + return manifest->kernel_bitmap; } #endif /* __IA_CSS_PSYS_PROGRAM_MANIFEST_IMPL_H */ diff --git a/modules/ia_css/ipu6/include/ia_css_psys_sim_trace.h b/modules/ia_css/ipu6/include/ia_css_psys_sim_trace.h index af2a4345..75f07d5c 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_sim_trace.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_sim_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_static_trace.h b/modules/ia_css/ipu6/include/ia_css_psys_static_trace.h index 8b7a833f..5f0f5a30 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_static_trace.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_static_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_terminal.h b/modules/ia_css/ipu6/include/ia_css_psys_terminal.h index e960bb9a..1794009a 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_terminal.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_terminal.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_terminal.hsys.user.h b/modules/ia_css/ipu6/include/ia_css_psys_terminal.hsys.user.h index c18d3fea..7970906e 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_terminal.hsys.user.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_terminal.hsys.user.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_terminal_impl.h b/modules/ia_css/ipu6/include/ia_css_psys_terminal_impl.h index cd944eee..9b044fc9 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_terminal_impl.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_terminal_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest.h b/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest.h index 2bb95044..5a0ee23c 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest.hsys.user.h b/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest.hsys.user.h index 387afe1b..7bc46b3d 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest.hsys.user.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest.hsys.user.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest.sim.h b/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest.sim.h index a981a34c..a38336b2 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest.sim.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest.sim.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest_impl.h b/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest_impl.h index ee198361..e7d54ffc 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest_impl.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_terminal_manifest_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_terminal_private_types.h b/modules/ia_css/ipu6/include/ia_css_psys_terminal_private_types.h index 547d2f68..def3bdbf 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_terminal_private_types.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_terminal_private_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_transport.h b/modules/ia_css/ipu6/include/ia_css_psys_transport.h index 708486f1..cfba5b0c 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_transport.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_transport.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psys_transport_dep.h b/modules/ia_css/ipu6/include/ia_css_psys_transport_dep.h index 8d51d9fe..ffd88ead 100644 --- a/modules/ia_css/ipu6/include/ia_css_psys_transport_dep.h +++ b/modules/ia_css/ipu6/include/ia_css_psys_transport_dep.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psysapi_fw_version.h b/modules/ia_css/ipu6/include/ia_css_psysapi_fw_version.h index c59192b8..724870d8 100644 --- a/modules/ia_css/ipu6/include/ia_css_psysapi_fw_version.h +++ b/modules/ia_css/ipu6/include/ia_css_psysapi_fw_version.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_psysapi_trace.h b/modules/ia_css/ipu6/include/ia_css_psysapi_trace.h index e4d4f091..4ac6cc01 100644 --- a/modules/ia_css/ipu6/include/ia_css_psysapi_trace.h +++ b/modules/ia_css/ipu6/include/ia_css_psysapi_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_rbm.h b/modules/ia_css/ipu6/include/ia_css_rbm.h index d724acc6..915407e0 100644 --- a/modules/ia_css/ipu6/include/ia_css_rbm.h +++ b/modules/ia_css/ipu6/include/ia_css_rbm.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_rbm_impl.h b/modules/ia_css/ipu6/include/ia_css_rbm_impl.h index 673d2368..aaa095ab 100644 --- a/modules/ia_css/ipu6/include/ia_css_rbm_impl.h +++ b/modules/ia_css/ipu6/include/ia_css_rbm_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_rbm_manifest.h b/modules/ia_css/ipu6/include/ia_css_rbm_manifest.h index bde63724..76568c39 100644 --- a/modules/ia_css/ipu6/include/ia_css_rbm_manifest.h +++ b/modules/ia_css/ipu6/include/ia_css_rbm_manifest.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_rbm_manifest_types.h b/modules/ia_css/ipu6/include/ia_css_rbm_manifest_types.h index 8e1d9153..35bbf36e 100644 --- a/modules/ia_css/ipu6/include/ia_css_rbm_manifest_types.h +++ b/modules/ia_css/ipu6/include/ia_css_rbm_manifest_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_rbm_trace.h b/modules/ia_css/ipu6/include/ia_css_rbm_trace.h index 9b538305..3f45f1cd 100644 --- a/modules/ia_css/ipu6/include/ia_css_rbm_trace.h +++ b/modules/ia_css/ipu6/include/ia_css_rbm_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_terminal.h b/modules/ia_css/ipu6/include/ia_css_terminal.h index 2bbaf46d..ac53e25e 100644 --- a/modules/ia_css/ipu6/include/ia_css_terminal.h +++ b/modules/ia_css/ipu6/include/ia_css_terminal.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_terminal_base_types.h b/modules/ia_css/ipu6/include/ia_css_terminal_base_types.h index a8fe8d1b..e2d60553 100644 --- a/modules/ia_css/ipu6/include/ia_css_terminal_base_types.h +++ b/modules/ia_css/ipu6/include/ia_css_terminal_base_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_terminal_defs.h b/modules/ia_css/ipu6/include/ia_css_terminal_defs.h index 3de05b68..7e235086 100644 --- a/modules/ia_css/ipu6/include/ia_css_terminal_defs.h +++ b/modules/ia_css/ipu6/include/ia_css_terminal_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_terminal_impl.h b/modules/ia_css/ipu6/include/ia_css_terminal_impl.h index 0f040da0..b7e79b9c 100644 --- a/modules/ia_css/ipu6/include/ia_css_terminal_impl.h +++ b/modules/ia_css/ipu6/include/ia_css_terminal_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_terminal_manifest.h b/modules/ia_css/ipu6/include/ia_css_terminal_manifest.h index 15437e09..1dc90554 100644 --- a/modules/ia_css/ipu6/include/ia_css_terminal_manifest.h +++ b/modules/ia_css/ipu6/include/ia_css_terminal_manifest.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_terminal_manifest_base_types.h b/modules/ia_css/ipu6/include/ia_css_terminal_manifest_base_types.h index bac5b767..63d91c3b 100644 --- a/modules/ia_css/ipu6/include/ia_css_terminal_manifest_base_types.h +++ b/modules/ia_css/ipu6/include/ia_css_terminal_manifest_base_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_terminal_manifest_impl.h b/modules/ia_css/ipu6/include/ia_css_terminal_manifest_impl.h index 105d6c0f..a44fe0ef 100644 --- a/modules/ia_css/ipu6/include/ia_css_terminal_manifest_impl.h +++ b/modules/ia_css/ipu6/include/ia_css_terminal_manifest_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_terminal_manifest_types.h b/modules/ia_css/ipu6/include/ia_css_terminal_manifest_types.h index d9c8e1b9..c63c1752 100644 --- a/modules/ia_css/ipu6/include/ia_css_terminal_manifest_types.h +++ b/modules/ia_css/ipu6/include/ia_css_terminal_manifest_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_terminal_types.h b/modules/ia_css/ipu6/include/ia_css_terminal_types.h index b1e9618d..ad611e94 100644 --- a/modules/ia_css/ipu6/include/ia_css_terminal_types.h +++ b/modules/ia_css/ipu6/include/ia_css_terminal_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ia_css_trace.h b/modules/ia_css/ipu6/include/ia_css_trace.h index 14d79db6..bd8212a9 100644 --- a/modules/ia_css/ipu6/include/ia_css_trace.h +++ b/modules/ia_css/ipu6/include/ia_css_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ipu_device_acb_devices.h b/modules/ia_css/ipu6/include/ipu_device_acb_devices.h index c29233e4..d91dc04a 100644 --- a/modules/ia_css/ipu6/include/ipu_device_acb_devices.h +++ b/modules/ia_css/ipu6/include/ipu_device_acb_devices.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/ipu_device_gp_devices.h b/modules/ia_css/ipu6/include/ipu_device_gp_devices.h index 3e678715..631646e1 100644 --- a/modules/ia_css/ipu6/include/ipu_device_gp_devices.h +++ b/modules/ia_css/ipu6/include/ipu_device_gp_devices.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/math_support.h b/modules/ia_css/ipu6/include/math_support.h index 1fa191c7..6682d4d0 100644 --- a/modules/ia_css/ipu6/include/math_support.h +++ b/modules/ia_css/ipu6/include/math_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/misc_support.h b/modules/ia_css/ipu6/include/misc_support.h index c2b6a517..1265a37d 100644 --- a/modules/ia_css/ipu6/include/misc_support.h +++ b/modules/ia_css/ipu6/include/misc_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/pg_control_init_framework.h b/modules/ia_css/ipu6/include/pg_control_init_framework.h index 649eb2c3..8cd88b88 100644 --- a/modules/ia_css/ipu6/include/pg_control_init_framework.h +++ b/modules/ia_css/ipu6/include/pg_control_init_framework.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/platform_support.h b/modules/ia_css/ipu6/include/platform_support.h index 1dffa4ba..058e71ec 100644 --- a/modules/ia_css/ipu6/include/platform_support.h +++ b/modules/ia_css/ipu6/include/platform_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/print_support.h b/modules/ia_css/ipu6/include/print_support.h index c0ea8765..b48eecce 100644 --- a/modules/ia_css/ipu6/include/print_support.h +++ b/modules/ia_css/ipu6/include/print_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/psys_system_global_impl.h b/modules/ia_css/ipu6/include/psys_system_global_impl.h index 512b0f5d..75c62439 100644 --- a/modules/ia_css/ipu6/include/psys_system_global_impl.h +++ b/modules/ia_css/ipu6/include/psys_system_global_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/type_support.h b/modules/ia_css/ipu6/include/type_support.h index 81b00539..29539886 100644 --- a/modules/ia_css/ipu6/include/type_support.h +++ b/modules/ia_css/ipu6/include/type_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/vied_nci_acb_route_type.h b/modules/ia_css/ipu6/include/vied_nci_acb_route_type.h index 66d79fbc..edbe8984 100644 --- a/modules/ia_css/ipu6/include/vied_nci_acb_route_type.h +++ b/modules/ia_css/ipu6/include/vied_nci_acb_route_type.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/vied_nci_psys_resource_model.h b/modules/ia_css/ipu6/include/vied_nci_psys_resource_model.h index 3f0359d0..e6efb884 100644 --- a/modules/ia_css/ipu6/include/vied_nci_psys_resource_model.h +++ b/modules/ia_css/ipu6/include/vied_nci_psys_resource_model.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/vied_nci_psys_resource_model_common.h b/modules/ia_css/ipu6/include/vied_nci_psys_resource_model_common.h index bb90c2e1..40bf8964 100644 --- a/modules/ia_css/ipu6/include/vied_nci_psys_resource_model_common.h +++ b/modules/ia_css/ipu6/include/vied_nci_psys_resource_model_common.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/include/vied_nci_psys_system_global.h b/modules/ia_css/ipu6/include/vied_nci_psys_system_global.h index 2daf6b39..76b511c2 100644 --- a/modules/ia_css/ipu6/include/vied_nci_psys_system_global.h +++ b/modules/ia_css/ipu6/include/vied_nci_psys_system_global.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/src/ia_css_kernel_bitmap.c b/modules/ia_css/ipu6/src/ia_css_kernel_bitmap.c index 11dd097e..a7747032 100644 --- a/modules/ia_css/ipu6/src/ia_css_kernel_bitmap.c +++ b/modules/ia_css/ipu6/src/ia_css_kernel_bitmap.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/src/ia_css_program_group_param.c b/modules/ia_css/ipu6/src/ia_css_program_group_param.c index e6fa6e49..90883754 100644 --- a/modules/ia_css/ipu6/src/ia_css_program_group_param.c +++ b/modules/ia_css/ipu6/src/ia_css_program_group_param.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/src/ia_css_psys_process.c b/modules/ia_css/ipu6/src/ia_css_psys_process.c index 6d737760..6184ac87 100644 --- a/modules/ia_css/ipu6/src/ia_css_psys_process.c +++ b/modules/ia_css/ipu6/src/ia_css_psys_process.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/src/ia_css_psys_process_group.c b/modules/ia_css/ipu6/src/ia_css_psys_process_group.c index 036a1499..bf1bd22f 100644 --- a/modules/ia_css/ipu6/src/ia_css_psys_process_group.c +++ b/modules/ia_css/ipu6/src/ia_css_psys_process_group.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/src/ia_css_psys_process_group_cmd_impl.c b/modules/ia_css/ipu6/src/ia_css_psys_process_group_cmd_impl.c index f5850036..ad458c40 100644 --- a/modules/ia_css/ipu6/src/ia_css_psys_process_group_cmd_impl.c +++ b/modules/ia_css/ipu6/src/ia_css_psys_process_group_cmd_impl.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/src/ia_css_psys_program_group_manifest.c b/modules/ia_css/ipu6/src/ia_css_psys_program_group_manifest.c index b528fa4a..9eda49ff 100644 --- a/modules/ia_css/ipu6/src/ia_css_psys_program_group_manifest.c +++ b/modules/ia_css/ipu6/src/ia_css_psys_program_group_manifest.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/src/ia_css_psys_program_manifest.c b/modules/ia_css/ipu6/src/ia_css_psys_program_manifest.c index 73635435..d49ddad9 100644 --- a/modules/ia_css/ipu6/src/ia_css_psys_program_manifest.c +++ b/modules/ia_css/ipu6/src/ia_css_psys_program_manifest.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/src/ia_css_psys_terminal.c b/modules/ia_css/ipu6/src/ia_css_psys_terminal.c index 17f69207..2809050a 100644 --- a/modules/ia_css/ipu6/src/ia_css_psys_terminal.c +++ b/modules/ia_css/ipu6/src/ia_css_psys_terminal.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6/src/ia_css_psys_terminal_manifest.c b/modules/ia_css/ipu6/src/ia_css_psys_terminal_manifest.c index 380613be..99a1b3b9 100644 --- a/modules/ia_css/ipu6/src/ia_css_psys_terminal_manifest.c +++ b/modules/ia_css/ipu6/src/ia_css_psys_terminal_manifest.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/assert_support.h b/modules/ia_css/ipu6ep/include/assert_support.h index aa1724c7..947fc5f0 100644 --- a/modules/ia_css/ipu6ep/include/assert_support.h +++ b/modules/ia_css/ipu6ep/include/assert_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/cpu_mem_support.h b/modules/ia_css/ipu6ep/include/cpu_mem_support.h index 98fd104f..d0f1b0f1 100644 --- a/modules/ia_css/ipu6ep/include/cpu_mem_support.h +++ b/modules/ia_css/ipu6ep/include/cpu_mem_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/error_support.h b/modules/ia_css/ipu6ep/include/error_support.h index 54d3496d..4d43f296 100644 --- a/modules/ia_css/ipu6ep/include/error_support.h +++ b/modules/ia_css/ipu6ep/include/error_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/frame_support.h b/modules/ia_css/ipu6ep/include/frame_support.h index b5120abe..5243a860 100644 --- a/modules/ia_css/ipu6ep/include/frame_support.h +++ b/modules/ia_css/ipu6ep/include/frame_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_base_types.h b/modules/ia_css/ipu6ep/include/ia_css_base_types.h index 8a8af09e..3883e8f1 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_base_types.h +++ b/modules/ia_css/ipu6ep/include/ia_css_base_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_isa_parameter_defs.h b/modules/ia_css/ipu6ep/include/ia_css_isa_parameter_defs.h index 683c2f5d..689c8995 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_isa_parameter_defs.h +++ b/modules/ia_css/ipu6ep/include/ia_css_isa_parameter_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_isa_parameter_defs_dep.h b/modules/ia_css/ipu6ep/include/ia_css_isa_parameter_defs_dep.h index 4b92c7b2..8ef25173 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_isa_parameter_defs_dep.h +++ b/modules/ia_css/ipu6ep/include/ia_css_isa_parameter_defs_dep.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_kernel_bitmap.h b/modules/ia_css/ipu6ep/include/ia_css_kernel_bitmap.h index 508ca278..4881fdd5 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_kernel_bitmap.h +++ b/modules/ia_css/ipu6ep/include/ia_css_kernel_bitmap.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_kernel_bitmap_impl.h b/modules/ia_css/ipu6ep/include/ia_css_kernel_bitmap_impl.h index 45dbcda2..5b1974b7 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_kernel_bitmap_impl.h +++ b/modules/ia_css/ipu6ep/include/ia_css_kernel_bitmap_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_kernel_user_param_types.h b/modules/ia_css/ipu6ep/include/ia_css_kernel_user_param_types.h index b4619aab..c4c0ef52 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_kernel_user_param_types.h +++ b/modules/ia_css/ipu6ep/include/ia_css_kernel_user_param_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_program_group_data.h b/modules/ia_css/ipu6ep/include/ia_css_program_group_data.h index fc1cd1ce..e3be7548 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_program_group_data.h +++ b/modules/ia_css/ipu6ep/include/ia_css_program_group_data.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ * * The data objects are separate from the process group terminal, * although they are stored by value rather than by reference and - * make the process group terminal dependendent on its definition + * make the process group terminal dependent on its definition * * This frame definition overloads the current CSS frame definition * they are the same object, just a slightly different implementation @@ -155,14 +155,14 @@ struct ia_css_param_frame_s { /** * Structure defining the frame (size and access) properties for - * inbuild types only. + * inbuilt types only. * - * The inbuild types like FourCC, MIPI and CSS private types are supported + * The inbuilt types like FourCC, MIPI and CSS private types are supported * by FW all other types are custom types which interpretation must be encoded * on the buffer itself or known by the source and sink */ struct ia_css_frame_descriptor_s { - /** Indicates if this is a generic type or inbuild with + /** Indicates if this is a generic type or inbuilt with * variable size descriptor. */ ia_css_frame_format_type_t frame_format_type; @@ -203,14 +203,14 @@ struct ia_css_frame_descriptor_s { + (N_PADDING_UINT8_IN_FRAME_STRUCT * 8)) /** - * Main frame structure holding the main store and auxilary access properties + * Main frame structure holding the main store and auxiliary access properties * the "pointer_state" and "access_scope" should be encoded on the * "vied_vaddress_t" type * * @note A number of fields in this structure are either no longer * used, or their use is trivialized, in the current code base. This is * due to the Persistent Program Group (PPG) concept which separated the - * attatchment of frame buffers into a separate structure, the buffer set. + * attachment of frame buffers into a separate structure, the buffer set. * @par Set all unused fields to zero, unless otherwise noted. * @see ia_css_buffer_set_s */ diff --git a/modules/ia_css/ipu6ep/include/ia_css_program_group_data_defs.h b/modules/ia_css/ipu6ep/include/ia_css_program_group_data_defs.h index 9d1ddac9..aaad08e9 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_program_group_data_defs.h +++ b/modules/ia_css/ipu6ep/include/ia_css_program_group_data_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_program_group_data_impl.h b/modules/ia_css/ipu6ep/include/ia_css_program_group_data_impl.h index 5f1a2856..91e54f12 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_program_group_data_impl.h +++ b/modules/ia_css/ipu6ep/include/ia_css_program_group_data_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_program_group_param.h b/modules/ia_css/ipu6ep/include/ia_css_program_group_param.h index a8a15522..d45c769a 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_program_group_param.h +++ b/modules/ia_css/ipu6ep/include/ia_css_program_group_param.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_program_group_param.sim.h b/modules/ia_css/ipu6ep/include/ia_css_program_group_param.sim.h index 820ac610..ffe3faa0 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_program_group_param.sim.h +++ b/modules/ia_css/ipu6ep/include/ia_css_program_group_param.sim.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_program_group_param_private.h b/modules/ia_css/ipu6ep/include/ia_css_program_group_param_private.h index b03f27c9..3e13c71c 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_program_group_param_private.h +++ b/modules/ia_css/ipu6ep/include/ia_css_program_group_param_private.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_program_group_param_types.h b/modules/ia_css/ipu6ep/include/ia_css_program_group_param_types.h index 816882cb..26755f44 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_program_group_param_types.h +++ b/modules/ia_css/ipu6ep/include/ia_css_program_group_param_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_buffer_set.h b/modules/ia_css/ipu6ep/include/ia_css_psys_buffer_set.h index 8e5816c6..c7b208e7 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_buffer_set.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_buffer_set.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_data_trace.h b/modules/ia_css/ipu6ep/include/ia_css_psys_data_trace.h index fc2e1025..5e20f3ae 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_data_trace.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_data_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_dynamic_trace.h b/modules/ia_css/ipu6ep/include/ia_css_psys_dynamic_trace.h index 5c3323d2..c8179c51 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_dynamic_trace.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_dynamic_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_kernel_trace.h b/modules/ia_css/ipu6ep/include/ia_css_psys_kernel_trace.h index 2a90e812..07ff8446 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_kernel_trace.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_kernel_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_manifest_types.h b/modules/ia_css/ipu6ep/include/ia_css_psys_manifest_types.h index bd7bf4ee..baebf5ec 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_manifest_types.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_manifest_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ typedef uint8_t ia_css_connection_bitmap_t; #define IA_CSS_CONNECTION_TYPE_BITS 32 -/** Describes the tranfer method of data between terminals */ +/** Describes the transfer method of data between terminals */ typedef enum ia_css_connection_type { /** The data buffer must be fully written to main memory by the producer * before it can be read by the consumer */ diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_param_trace.h b/modules/ia_css/ipu6ep/include/ia_css_psys_param_trace.h index 688ccd0a..87110165 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_param_trace.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_param_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_private_pg_data.h b/modules/ia_css/ipu6ep/include/ia_css_psys_private_pg_data.h index 743de9d9..29ceb655 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_private_pg_data.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_private_pg_data.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_process.h b/modules/ia_css/ipu6ep/include/ia_css_psys_process.h index 1e2b04e6..6e57cef6 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_process.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_process.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -382,7 +382,7 @@ uint32_t ia_css_process_get_program_idx( /*! Returns the process extension (ONLY ALLOWED TO BE USED BY FIRMWARE). * @param process[in] process object - * @return process entension, NULL if there is none. + * @return process extension, NULL if there is none. */ IA_CSS_PSYS_DYNAMIC_STORAGE_CLASS_H ia_css_process_ext_t *ia_css_process_get_extension( diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_process.hsys.kernel.h b/modules/ia_css/ipu6ep/include/ia_css_psys_process.hsys.kernel.h index 2ef42d15..02a66ee5 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_process.hsys.kernel.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_process.hsys.kernel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_process.hsys.user.h b/modules/ia_css/ipu6ep/include/ia_css_psys_process.hsys.user.h index 8c45d773..ccddfd6c 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_process.hsys.user.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_process.hsys.user.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_process.psys.h b/modules/ia_css/ipu6ep/include/ia_css_psys_process.psys.h index a208fdff..212331bc 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_process.psys.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_process.psys.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,12 +30,12 @@ * Process manager */ -/*! Acquire the resources specificed in process object +/*! Acquire the resources specified in process object @param process[in] process object Postcondition: This is a try process if any of the - resources is not available, all succesfully acquired + resources is not available, all successfully acquired ones will be release and the function will return an error @@ -43,7 +43,7 @@ */ extern int ia_css_process_acquire(ia_css_process_t *process); -/*! Release the resources specificed in process object +/*! Release the resources specified in process object @param process[in] process object diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.h b/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.h index 6bcea892..c35bb30f 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.hsys.kernel.h b/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.hsys.kernel.h index 3c43d585..5c300322 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.hsys.kernel.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.hsys.kernel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ * This file, together with the user space header, ia_css_psys_process_group.hsys.user.h, * defines the functions required to manage the lifetime of a process group. * - * Sequence for settup up and queueing processing tasks with a persistent program group + * Sequence for setup up and queuing processing tasks with a persistent program group * to IPU is: * * # Get Program Group manifest by ID @@ -34,7 +34,7 @@ * # Configure process group * ## Set kernel and terminal enables * ## Set terminal attributes - * # Submit processs group + * # Submit process group * # Start process group * # Disown process group * # Frame/Fragment processing loop @@ -250,7 +250,7 @@ extern int ia_css_process_group_disown( @par For PPG's, buffer is ignored as the buffers will be sent later on with ia_css_enqueue_buffer_set(). Nonetheless, this function must be - called before ia_css_process_group_submit() as sets up some internal bookeeping. + called before ia_css_process_group_submit() as sets up some internal bookkeeping. @note The buffer can be in memory or streaming over memory diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.hsys.user.h b/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.hsys.user.h index e166c5b4..f25c0a30 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.hsys.user.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.hsys.user.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.psys.h b/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.psys.h index 49c04df5..de2e4dd9 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.psys.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_process_group.psys.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ extern int ia_css_process_group_run( Note: Stop indicates that the process group has completed execution - Postcondition: The external resoruces can now be detached + Postcondition: The external resources can now be detached @return < 0 on error */ diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_process_group_cmd_impl.h b/modules/ia_css/ipu6ep/include/ia_css_psys_process_group_cmd_impl.h index de0b78f7..2e60e001 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_process_group_cmd_impl.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_process_group_cmd_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ * * This is the root structure passed in a number of PG commands via * the syscom queuing interface to firmware from the host. A pointer - * to this structure in main memroy is passed in the following + * to this structure in main memory is passed in the following * PG commands: start, resume, suspend, stop, abort. * * A process group is created based on a program group specification @@ -53,7 +53,7 @@ * also has terminals, which connect it to the outside world. Each * terminal represents either parameters or image data flowing in or * out of the group. Terminals come in different types and may have - * addtional attributes. For example, a data termainal will have + * additional attributes. For example, a data terminal will have * a frame format attribute. * @see ia_css_process_group_create() * @see ia_css_program_group_manifest_t and related API and: @@ -64,7 +64,7 @@ * * @note Some of the fields within are used internally within the * firmware only, after the firmware copies the process group structure - * to its internel cache. The original in main memory is not updated. + * to its internal cache. The original in main memory is not updated. * All such fields should be initialized to zero, unless otherwise * noted. * See the individual field descriptions for which fields are "internal". @@ -79,14 +79,14 @@ struct ia_css_process_group_s { /** PG routing bitmap used to set connection between program group * components */ ia_css_rbm_t routing_bitmap; - /** PG kernel bitmap. Marks which program kernels (i.e. kernel==device, when impelementation is fixed) + /** PG kernel bitmap. Marks which program kernels (i.e. kernel==device, when implementation is fixed) * are enabled. This bitmap covers all kernels in the group, no matter which program they belong to. */ ia_css_kernel_bitmap_t kernel_bitmap; /** Size of this structure in bytes */ uint32_t size; /** The timestamp when PG load starts * @note Internal firmware use only. */ - /**< PSYS server init time in cycless */ + /**< PSYS server init time in cycles */ uint32_t psys_server_init_cycles; /**< The timestamp when PG load starts */ uint32_t pg_load_start_ts; @@ -100,7 +100,7 @@ struct ia_css_process_group_s { * @note Internal firmware use only. */ uint32_t pg_processing_cycles; /** Referral ID to program group FW. This identifies the "type" of the process group - * and associcates the process group with the program group defined in the manifest. */ + * and associates the process group with the program group defined in the manifest. */ /**< PG next frame init time in cycles */ uint32_t pg_next_frame_init_cycles; /**< PG complete time in cycles */ @@ -139,7 +139,7 @@ struct ia_css_process_group_s { uint16_t terminals_offset; /** Parameter dependent number of processes in this process group, determined at process * group creation taking into account the enabled kernels. That is, if all of a program's - * associcated kernels are disabled, then no process is instantiated for that program and + * associated kernels are disabled, then no process is instantiated for that program and * it must not be counted in the process count. * * @see processes_offset in this structure @@ -150,8 +150,8 @@ struct ia_css_process_group_s { /** Parameter dependent number of terminals on this process group, determined at process * group creation. Must not be greater than the terminal count as defined in the manifest, * but taking into account the enabled kernels. That is, for those terminal types that have - * kernel associations, the terminal is diabled if all of its associated kernels are disabled. - * Execptions by terminal type: + * kernel associations, the terminal is disabled if all of its associated kernels are disabled. + * Exceptions by terminal type: * - IA_CSS_TERMINAL_TYPE_PROGRAM - As described above, but parameter descriptors are examined to determine the * kernel association, as the terminal type itself does not have an associated kernel field or kernel bitmap field. * - IA_CSS_TERMINAL_TYPE_PROGRAM_CONTROL_INIT -- Always enabled @@ -202,7 +202,7 @@ extern int ia_css_process_group_on_create( const ia_css_program_group_manifest_t *program_group_manifest, const ia_css_program_group_param_t *program_group_param); -/*! Callback before process group is about to be destoyed. Any implementation +/*! Callback before process group is about to be destroyed. Any implementation * specific cleanups can be done here. @param process_group[in] process group object @@ -268,7 +268,7 @@ extern int ia_css_process_group_store( ia_css_process_group_t *process_group, bool secure); -/*! Need to get the right context for each PG for FW test app only +/*! Need to get the right context for each PG for FW test application only * * @param process_group[in] process group object * diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_process_group_impl.h b/modules/ia_css/ipu6ep/include/ia_css_psys_process_group_impl.h index 4ada788b..6a515cc4 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_process_group_impl.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_process_group_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -535,6 +535,7 @@ int ia_css_process_group_print( ia_css_rbm_t routing_bitmap; NOT_USED(fid); + NOT_USED(routing_bitmap); IA_CSS_TRACE_0(PSYSAPI_DYNAMIC, VERBOSE, "ia_css_process_group_print(): enter:\n"); @@ -689,6 +690,7 @@ bool ia_css_can_process_group_submit( int i; bool can_submit = false; int retval = -1; + NOT_USED(retval); uint8_t terminal_count = ia_css_process_group_get_terminal_count(process_group); @@ -701,6 +703,7 @@ bool ia_css_can_process_group_submit( ia_css_terminal_t *terminal = ia_css_process_group_get_terminal(process_group, i); vied_vaddress_t buffer; + NOT_USED(buffer); ia_css_buffer_state_t buffer_state; verifexitval(terminal != NULL, EINVAL); @@ -772,6 +775,7 @@ bool ia_css_can_enqueue_buffer_set( int i; bool can_enqueue = false; int retval = -1; + NOT_USED(retval); uint8_t terminal_count; IA_CSS_TRACE_0(PSYSAPI_DYNAMIC, INFO, @@ -795,6 +799,7 @@ bool ia_css_can_enqueue_buffer_set( ia_css_terminal_t *terminal = ia_css_process_group_get_terminal(process_group, i); vied_vaddress_t buffer; + NOT_USED(buffer); ia_css_buffer_state_t buffer_state; verifexitval(terminal != NULL, EINVAL); @@ -854,6 +859,7 @@ bool ia_css_can_process_group_start( int i; bool can_start = false; int retval = -1; + NOT_USED(retval); uint8_t terminal_count; IA_CSS_TRACE_0(PSYSAPI_DYNAMIC, INFO, diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_process_impl.h b/modules/ia_css/ipu6ep/include/ia_css_psys_process_impl.h index de5719c7..55c0c19f 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_process_impl.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_process_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_process_private_types.h b/modules/ia_css/ipu6ep/include/ia_css_psys_process_private_types.h index e2252295..d7804fe4 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_process_private_types.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_process_private_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,11 +29,11 @@ #endif #define SIZE_OF_PROCESS_EXTENSION \ - ((VIED_NCI_RESOURCE_BITMAP_BITS * VIED_NCI_N_DEV_DFM_ID) \ - + (VIED_NCI_RESOURCE_BITMAP_BITS * VIED_NCI_N_DEV_DFM_ID) \ - + (VIED_NCI_N_DATA_MEM_TYPE_ID * VIED_NCI_RESOURCE_SIZE_BITS) \ - + (VIED_NCI_N_DEV_CHN_ID * VIED_NCI_RESOURCE_SIZE_BITS) \ - + (VIED_NCI_N_DATA_MEM_TYPE_ID * VIED_NCI_RESOURCE_ID_BITS) \ + ((VIED_NCI_RESOURCE_BITMAP_BITS * VIED_NCI_N_DEV_DFM_ID_MAX) \ + + (VIED_NCI_RESOURCE_BITMAP_BITS * VIED_NCI_N_DEV_DFM_ID_MAX) \ + + (VIED_NCI_N_DATA_MEM_TYPE_ID_MAX * VIED_NCI_RESOURCE_SIZE_BITS) \ + + (VIED_NCI_N_DEV_CHN_ID_MAX * VIED_NCI_RESOURCE_SIZE_BITS) \ + + (VIED_NCI_N_DATA_MEM_TYPE_ID_MAX * VIED_NCI_RESOURCE_ID_BITS) \ + (N_PADDING_UINT8_IN_PROCESS_EXT_STRUCT * 8)) /** Extended process attributes describing more resource requirements @@ -41,24 +41,16 @@ * ia_css_process_s. */ struct ia_css_process_ext_s { -#if VIED_NCI_N_DEV_DFM_ID > 0 /** DFM port allocated to this process */ - vied_nci_resource_bitmap_t dfm_port_bitmap[VIED_NCI_N_DEV_DFM_ID]; + vied_nci_resource_bitmap_t dfm_port_bitmap[VIED_NCI_N_DEV_DFM_ID_MAX]; /** Active DFM ports which need a kick */ - vied_nci_resource_bitmap_t dfm_active_port_bitmap[VIED_NCI_N_DEV_DFM_ID]; -#endif -#if VIED_NCI_N_DATA_MEM_TYPE_ID > 0 + vied_nci_resource_bitmap_t dfm_active_port_bitmap[VIED_NCI_N_DEV_DFM_ID_MAX]; /** (external) Memory allocation offset given to this process */ - vied_nci_resource_size_t ext_mem_offset[VIED_NCI_N_DATA_MEM_TYPE_ID]; -#endif -#if VIED_NCI_N_DEV_CHN_ID > 0 + vied_nci_resource_size_t ext_mem_offset[VIED_NCI_N_DATA_MEM_TYPE_ID_MAX]; /** Device channel allocation offset given to this process */ - vied_nci_resource_size_t dev_chn_offset[VIED_NCI_N_DEV_CHN_ID]; -#endif -#if VIED_NCI_N_DATA_MEM_TYPE_ID > 0 + vied_nci_resource_size_t dev_chn_offset[VIED_NCI_N_DEV_CHN_ID_MAX]; /** (external) Memory ID */ - vied_nci_resource_id_t ext_mem_id[VIED_NCI_N_DATA_MEM_TYPE_ID]; -#endif + vied_nci_resource_id_t ext_mem_id[VIED_NCI_N_DATA_MEM_TYPE_ID_MAX]; #if N_PADDING_UINT8_IN_PROCESS_EXT_STRUCT > 0 /** Number of processes (mapped on cells) this process depends on */ uint8_t padding[N_PADDING_UINT8_IN_PROCESS_EXT_STRUCT]; @@ -97,11 +89,11 @@ struct ia_css_process_s { /** Offset in bytes to process extension structure, ia_css_process_ext_s * Align to 32 bit boundary. * Set to zero if extension is not used. The manifest must be queried to - * find out if the extensino is necessary. + * find out if the extension is necessary. * @see ia_css_program_manifest_process_requires_extension() */ uint8_t process_extension_offset; - /** Referal ID to a specific program. This ID is unique across PG's and - * can be used to retreive program meta data (AKA "program descriptor") + /** Referral ID to a specific program. This ID is unique across PG's and + * can be used to retrieve program meta data (AKA "program descriptor") * from the client package, including the program manifest and even * firmware program code, if the program is to be executed on a DSP. */ ia_css_program_ID_t ID; diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_process_types.h b/modules/ia_css/ipu6ep/include/ia_css_psys_process_types.h index 748db439..9c7a9dc8 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_process_types.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_process_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest.h b/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest.h index 9a06e995..afac8563 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -144,7 +144,7 @@ uint8_t ia_css_program_group_manifest_get_terminal_count( /*! Get the (pointer to) private data blob in the manifest - Private data is used by FW and is opauque to the SW stack + Private data is used by FW and is opaque to the SW stack @param manifest[in] program group manifest object @@ -288,7 +288,7 @@ ia_css_program_group_manifest_get_program_terminal_manifest( sections of the program init terminal, @param kernel_fragment_seq_count[in] Number of kernel fragment - seqence info. + sequence info. @param progctrlinit_load_section_counts[in] Number of progctrinit load sections (size of array is program_count) @param progctrlinit_connect_section_counts[in] Number of progctrinit connect diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest.hsys.user.h b/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest.hsys.user.h index dc79168a..093f7f0e 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest.hsys.user.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest.hsys.user.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest.sim.h b/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest.sim.h index 98d6a023..1ed3f796 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest.sim.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest.sim.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest_impl.h b/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest_impl.h index e86ff939..5ffec7e6 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest_impl.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_manifest_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_private.h b/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_private.h index 04c826a3..4424050f 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_private.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_program_group_private.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -77,13 +77,13 @@ struct ia_css_program_group_manifest_s { }; #define SIZE_OF_PROGRAM_MANIFEST_EXT_STRUCT_IN_BYTES \ - ((VIED_NCI_RESOURCE_BITMAP_BITS * VIED_NCI_N_DEV_DFM_ID) \ - + (VIED_NCI_RESOURCE_BITMAP_BITS * VIED_NCI_N_DEV_DFM_ID) \ - + (VIED_NCI_RESOURCE_SIZE_BITS * VIED_NCI_N_DATA_MEM_TYPE_ID * 2) \ - + (VIED_NCI_RESOURCE_SIZE_BITS * VIED_NCI_N_DEV_CHN_ID * 2) \ + ((VIED_NCI_RESOURCE_BITMAP_BITS * VIED_NCI_N_DEV_DFM_ID_MAX) \ + + (VIED_NCI_RESOURCE_BITMAP_BITS * VIED_NCI_N_DEV_DFM_ID_MAX) \ + + (VIED_NCI_RESOURCE_SIZE_BITS * VIED_NCI_N_DATA_MEM_TYPE_ID_MAX * 2) \ + + (VIED_NCI_RESOURCE_SIZE_BITS * VIED_NCI_N_DEV_CHN_ID_MAX * 2) \ + (2 * IA_CSS_UINT8_T_BITS * IA_CSS_MAX_INPUT_DEC_RESOURCES) \ + (2 * IA_CSS_UINT8_T_BITS * IA_CSS_MAX_OUTPUT_DEC_RESOURCES) \ - + (IA_CSS_UINT8_T_BITS * VIED_NCI_N_DEV_DFM_ID) + \ + + (IA_CSS_UINT8_T_BITS * VIED_NCI_N_DEV_DFM_ID_MAX) + \ + (N_PADDING_UINT8_IN_PROGRAM_MANIFEST_EXT * IA_CSS_UINT8_T_BITS)) /** "Extended" meta-data for a single program @@ -91,33 +91,25 @@ struct ia_css_program_group_manifest_s { * Mostly, if not completely, internal to FW and of no interest to the SW stack. */ struct ia_css_program_manifest_ext_s { -#if VIED_NCI_N_DEV_DFM_ID > 0 /** DFM port allocation of this program */ - vied_nci_resource_bitmap_t dfm_port_bitmap[VIED_NCI_N_DEV_DFM_ID]; + vied_nci_resource_bitmap_t dfm_port_bitmap[VIED_NCI_N_DEV_DFM_ID_MAX]; /** Active DFM ports which need a kick * If an empty port is configured to run in active mode, the empty * port and the corresponding full port(s) in the stream must be kicked. * The empty port must always be kicked after the full port. */ - vied_nci_resource_bitmap_t dfm_active_port_bitmap[VIED_NCI_N_DEV_DFM_ID]; -#endif -#if VIED_NCI_N_DATA_MEM_TYPE_ID > 0 + vied_nci_resource_bitmap_t dfm_active_port_bitmap[VIED_NCI_N_DEV_DFM_ID_MAX]; /** (external) Memory allocation size needs of this program */ - vied_nci_resource_size_t ext_mem_size[VIED_NCI_N_DATA_MEM_TYPE_ID]; - vied_nci_resource_size_t ext_mem_offset[VIED_NCI_N_DATA_MEM_TYPE_ID]; -#endif -#if VIED_NCI_N_DEV_CHN_ID > 0 + vied_nci_resource_size_t ext_mem_size[VIED_NCI_N_DATA_MEM_TYPE_ID_MAX]; + vied_nci_resource_size_t ext_mem_offset[VIED_NCI_N_DATA_MEM_TYPE_ID_MAX]; /** Device channel allocation size needs of this program */ - vied_nci_resource_size_t dev_chn_size[VIED_NCI_N_DEV_CHN_ID]; - vied_nci_resource_size_t dev_chn_offset[VIED_NCI_N_DEV_CHN_ID]; -#endif -#if VIED_NCI_N_DEV_DFM_ID > 0 + vied_nci_resource_size_t dev_chn_size[VIED_NCI_N_DEV_CHN_ID_MAX]; + vied_nci_resource_size_t dev_chn_offset[VIED_NCI_N_DEV_CHN_ID_MAX]; /** DFM ports are relocatable if value is set to 1. * The flag is per dfm port type. * This will not be supported for now. */ - uint8_t is_dfm_relocatable[VIED_NCI_N_DEV_DFM_ID]; -#endif + uint8_t is_dfm_relocatable[VIED_NCI_N_DEV_DFM_ID_MAX]; #if IA_CSS_MAX_INPUT_DEC_RESOURCES > 0 /** DEC compression flush service entry, describing which streams * require flush service handling for decompression (input). diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.h b/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.h index db426f95..99b6d9ab 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -380,7 +380,7 @@ uint8_t ia_css_program_manifest_get_is_dfm_relocatable( @return 0 when not applicable and/or invalid arguments - @deprecated Implementation is trival (returns 0) and + @deprecated Implementation is trivial (returns 0) and no known users or known intention for future use. */ IA_CSS_PSYS_STATIC_STORAGE_CLASS_H diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.hsys.kernel.h b/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.hsys.kernel.h index 30e31d22..6708a653 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.hsys.kernel.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.hsys.kernel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.hsys.user.h b/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.hsys.user.h index 12a77700..aa2bb79e 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.hsys.user.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.hsys.user.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.sim.h b/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.sim.h index 50ecd3ee..2843b62c 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.sim.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest.sim.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest_impl.h b/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest_impl.h index 04803a38..8d424c3d 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest_impl.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_program_manifest_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ ia_css_program_manifest_ext_t *ia_css_program_manifest_get_extension(const ia_cs EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_extension invalid argument\n"); + "ia_css_program_manifest_get_extension invalid argument\n"); } return NULL; } @@ -56,8 +56,8 @@ vied_nci_resource_size_t ia_css_program_manifest_get_int_mem_size( (void)manifest; (void)mem_type_id; IA_CSS_TRACE_0(PSYSAPI_STATIC, INFO, - "ia_css_program_manifest_get_int_mem_size always returns 0" - "(internally memory feature not used).\n"); + "ia_css_program_manifest_get_int_mem_size always returns 0" + "(internally memory feature not used).\n"); return 0; } @@ -70,7 +70,7 @@ uint8_t ia_css_program_manifest_get_input_terminal_id( ia_css_program_manifest_ext_t *manifest_ext = NULL; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_input_stream_id(): enter:\n"); + "ia_css_program_manifest_get_input_stream_id(): enter:\n"); verifexitval(manifest != NULL, EFAULT); verifexitval(idx < IA_CSS_MAX_INPUT_DEC_RESOURCES, EFAULT); manifest_ext = ia_css_program_manifest_get_extension(manifest); @@ -98,7 +98,7 @@ uint8_t ia_css_program_manifest_get_output_terminal_id( ia_css_program_manifest_ext_t *manifest_ext = NULL; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_output_terminal_id(): enter:\n"); + "ia_css_program_manifest_get_output_terminal_id(): enter:\n"); verifexitval(manifest != NULL, EFAULT); verifexitval(idx < IA_CSS_MAX_OUTPUT_DEC_RESOURCES, EFAULT); manifest_ext = ia_css_program_manifest_get_extension(manifest); @@ -127,7 +127,7 @@ uint8_t ia_css_program_manifest_get_input_stream_id( ia_css_program_manifest_ext_t *manifest_ext = NULL; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_input_stream_id(): enter:\n"); + "ia_css_program_manifest_get_input_stream_id(): enter:\n"); verifexitval(manifest != NULL, EFAULT); verifexitval(idx < IA_CSS_MAX_INPUT_DEC_RESOURCES, EFAULT); manifest_ext = ia_css_program_manifest_get_extension(manifest); @@ -155,7 +155,7 @@ uint8_t ia_css_program_manifest_get_output_stream_id( ia_css_program_manifest_ext_t *manifest_ext = NULL; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_output_stream_id(): enter:\n"); + "ia_css_program_manifest_get_output_stream_id(): enter:\n"); verifexitval(manifest != NULL, EFAULT); verifexitval(idx < IA_CSS_MAX_OUTPUT_DEC_RESOURCES, EFAULT); manifest_ext = ia_css_program_manifest_get_extension(manifest); @@ -184,7 +184,7 @@ uint8_t ia_css_program_manifest_get_is_dfm_relocatable( ia_css_program_manifest_ext_t *manifest_ext = NULL; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_is_dfm_relocatable(): enter:\n"); + "ia_css_program_manifest_get_is_dfm_relocatable(): enter:\n"); verifexitval(manifest != NULL, EFAULT); verifexitval(dfm_type_id < VIED_NCI_N_DEV_DFM_ID, EFAULT); manifest_ext = ia_css_program_manifest_get_extension(manifest); @@ -194,7 +194,7 @@ uint8_t ia_css_program_manifest_get_is_dfm_relocatable( EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_is_dfm_relocatable invalid argument\n"); + "ia_css_program_manifest_get_is_dfm_relocatable invalid argument\n"); return 0; } return manifest_ext->is_dfm_relocatable[dfm_type_id]; @@ -209,7 +209,7 @@ vied_nci_resource_bitmap_t ia_css_program_manifest_get_dfm_port_bitmap( ia_css_program_manifest_ext_t *manifest_ext = NULL; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_dfm_port_bitmap(): enter:\n"); + "ia_css_program_manifest_get_dfm_port_bitmap(): enter:\n"); verifexitval(manifest != NULL, EFAULT); verifexitval(dfm_type_id < VIED_NCI_N_DEV_DFM_ID, EFAULT); manifest_ext = ia_css_program_manifest_get_extension(manifest); @@ -219,7 +219,7 @@ vied_nci_resource_bitmap_t ia_css_program_manifest_get_dfm_port_bitmap( EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_dfm_port_bitmap invalid argument\n"); + "ia_css_program_manifest_get_dfm_port_bitmap invalid argument\n"); return 0; } return manifest_ext->dfm_port_bitmap[dfm_type_id]; @@ -234,7 +234,7 @@ vied_nci_resource_bitmap_t ia_css_program_manifest_get_dfm_active_port_bitmap( ia_css_program_manifest_ext_t *manifest_ext = NULL; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_dfm_active_port_bitmap(): enter:\n"); + "ia_css_program_manifest_get_dfm_active_port_bitmap(): enter:\n"); verifexitval(manifest != NULL, EFAULT); verifexitval(dfm_type_id < VIED_NCI_N_DEV_DFM_ID, EFAULT); manifest_ext = ia_css_program_manifest_get_extension(manifest); @@ -244,7 +244,7 @@ vied_nci_resource_bitmap_t ia_css_program_manifest_get_dfm_active_port_bitmap( EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_dfm_active_port_bitmap invalid argument\n"); + "ia_css_program_manifest_get_dfm_active_port_bitmap invalid argument\n"); return 0; } return manifest_ext->dfm_active_port_bitmap[dfm_type_id]; @@ -260,7 +260,7 @@ vied_nci_resource_size_t ia_css_program_manifest_get_ext_mem_size( ia_css_program_manifest_ext_t *manifest_ext = NULL; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_ext_mem_size(): enter:\n"); + "ia_css_program_manifest_get_ext_mem_size(): enter:\n"); verifexitval(manifest != NULL, EFAULT); verifexitval(mem_type_id < VIED_NCI_N_DATA_MEM_TYPE_ID, EFAULT); manifest_ext = ia_css_program_manifest_get_extension(manifest); @@ -270,7 +270,7 @@ vied_nci_resource_size_t ia_css_program_manifest_get_ext_mem_size( EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_ext_mem_size invalid argument\n"); + "ia_css_program_manifest_get_ext_mem_size invalid argument\n"); return 0; } return manifest_ext->ext_mem_size[mem_type_id]; @@ -285,7 +285,7 @@ vied_nci_resource_size_t ia_css_program_manifest_get_ext_mem_offset( ia_css_program_manifest_ext_t *manifest_ext = NULL; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_ext_mem_offset(): enter:\n"); + "ia_css_program_manifest_get_ext_mem_offset(): enter:\n"); verifexitval(manifest != NULL, EFAULT); verifexitval(mem_type_id < VIED_NCI_N_DATA_MEM_TYPE_ID, EFAULT); manifest_ext = ia_css_program_manifest_get_extension(manifest); @@ -295,7 +295,7 @@ vied_nci_resource_size_t ia_css_program_manifest_get_ext_mem_offset( EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_ext_mem_offset invalid argument\n"); + "ia_css_program_manifest_get_ext_mem_offset invalid argument\n"); return 0; } return manifest_ext->ext_mem_offset[mem_type_id]; @@ -311,7 +311,7 @@ vied_nci_resource_size_t ia_css_program_manifest_get_dev_chn_size( ia_css_program_manifest_ext_t *manifest_ext = NULL; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_dev_chn_size(): enter:\n"); + "ia_css_program_manifest_get_dev_chn_size(): enter:\n"); verifexitval(manifest != NULL, EFAULT); verifexitval(dev_chn_id < VIED_NCI_N_DEV_CHN_ID, EFAULT); manifest_ext = ia_css_program_manifest_get_extension(manifest); @@ -321,7 +321,7 @@ vied_nci_resource_size_t ia_css_program_manifest_get_dev_chn_size( EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_dev_chn_size invalid argument\n"); + "ia_css_program_manifest_get_dev_chn_size invalid argument\n"); return 0; } return manifest_ext->dev_chn_size[dev_chn_id]; @@ -336,7 +336,7 @@ vied_nci_resource_size_t ia_css_program_manifest_get_dev_chn_offset( ia_css_program_manifest_ext_t *manifest_ext = NULL; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_dev_chn_offset(): enter:\n"); + "ia_css_program_manifest_get_dev_chn_offset(): enter:\n"); verifexitval(manifest != NULL, EFAULT); verifexitval(dev_chn_id < VIED_NCI_N_DEV_CHN_ID, EFAULT); manifest_ext = ia_css_program_manifest_get_extension(manifest); @@ -346,7 +346,7 @@ vied_nci_resource_size_t ia_css_program_manifest_get_dev_chn_offset( EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_dev_chn_offset invalid argument\n"); + "ia_css_program_manifest_get_dev_chn_offset invalid argument\n"); return 0; } return manifest_ext->dev_chn_offset[dev_chn_id]; @@ -360,12 +360,12 @@ size_t ia_css_program_manifest_get_size( DECLARE_ERRVAL IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_size(): enter:\n"); + "ia_css_program_manifest_get_size(): enter:\n"); verifexitval(manifest != NULL, EFAULT); EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_size invalid argument\n"); + "ia_css_program_manifest_get_size invalid argument\n"); return 0; } @@ -379,12 +379,12 @@ ia_css_program_ID_t ia_css_program_manifest_get_program_ID( DECLARE_ERRVAL IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_program_ID(): enter:\n"); + "ia_css_program_manifest_get_program_ID(): enter:\n"); verifexitval(manifest != NULL, EFAULT); EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_program_ID invalid argument\n"); + "ia_css_program_manifest_get_program_ID invalid argument\n"); return IA_CSS_PROGRAM_INVALID_ID; } return manifest->ID; @@ -398,14 +398,14 @@ ia_css_program_group_manifest_t *ia_css_program_manifest_get_parent( char *base = NULL; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_parent(): enter:\n"); + "ia_css_program_manifest_get_parent(): enter:\n"); verifexitval(manifest != NULL, EFAULT); base = (char *)((char *)manifest + manifest->parent_offset); EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_parent invalid argument\n"); + "ia_css_program_manifest_get_parent invalid argument\n"); return NULL; } return (ia_css_program_group_manifest_t *)(base); @@ -418,12 +418,12 @@ vied_nci_cell_type_ID_t ia_css_program_manifest_get_cell_type_ID( DECLARE_ERRVAL IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_cell_type_ID(): enter:\n"); + "ia_css_program_manifest_get_cell_type_ID(): enter:\n"); verifexitval(manifest != NULL, EFAULT); EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_cell_type_ID invalid argument\n"); + "ia_css_program_manifest_get_cell_type_ID invalid argument\n"); return VIED_NCI_N_CELL_TYPE_ID; } return manifest->cell_type_id; @@ -436,12 +436,12 @@ ia_css_program_type_t ia_css_program_manifest_get_type( DECLARE_ERRVAL IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_type(): enter:\n"); + "ia_css_program_manifest_get_type(): enter:\n"); verifexitval(manifest != NULL, EFAULT); EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_type invalid argument\n"); + "ia_css_program_manifest_get_type invalid argument\n"); return IA_CSS_N_PROGRAM_TYPES; } return manifest->program_type; @@ -454,12 +454,12 @@ uint8_t ia_css_program_manifest_get_terminal_dependency_count( DECLARE_ERRVAL IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_terminal_dependency_count(): enter:\n"); + "ia_css_program_manifest_get_terminal_dependency_count(): enter:\n"); verifexitval(manifest != NULL, EFAULT); EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_terminal_dependency_count invalid argument\n"); + "ia_css_program_manifest_get_terminal_dependency_count invalid argument\n"); return 0; } return manifest->terminal_dependency_count; @@ -475,7 +475,7 @@ uint8_t ia_css_program_manifest_get_terminal_dependency( uint8_t terminal_dependency_count; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_terminal_dependency(): enter:\n"); + "ia_css_program_manifest_get_terminal_dependency(): enter:\n"); verifexitval(manifest != NULL, EFAULT); terminal_dependency_count = ia_css_program_manifest_get_terminal_dependency_count(manifest); @@ -486,7 +486,7 @@ uint8_t ia_css_program_manifest_get_terminal_dependency( EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_terminal_dependency invalid argument\n"); + "ia_css_program_manifest_get_terminal_dependency invalid argument\n"); return IA_CSS_PROGRAM_INVALID_DEPENDENCY; } return *terminal_dep_ptr; @@ -499,7 +499,7 @@ bool ia_css_is_program_manifest_singular_program_type( ia_css_program_type_t program_type; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_is_program_manifest_singular_program_type(): enter:\n"); + "ia_css_is_program_manifest_singular_program_type(): enter:\n"); program_type = ia_css_program_manifest_get_type(manifest); @@ -521,7 +521,7 @@ uint8_t ia_css_program_manifest_get_program_dependency_count( EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_program_dependency_count invalid argument\n"); + "ia_css_program_manifest_get_program_dependency_count invalid argument\n"); return 0; } return manifest->program_dependency_count; @@ -537,7 +537,7 @@ uint8_t ia_css_program_manifest_get_program_dependency( uint8_t program_dependency_count; IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_program_dependency(): enter:\n"); + "ia_css_program_manifest_get_program_dependency(): enter:\n"); verifexitval(manifest != NULL, EFAULT); program_dependency_count = @@ -550,7 +550,7 @@ uint8_t ia_css_program_manifest_get_program_dependency( EXIT: if (!noerror()) { IA_CSS_TRACE_0(PSYSAPI_STATIC, WARNING, - "ia_css_program_manifest_get_program_dependency invalid argument\n"); + "ia_css_program_manifest_get_program_dependency invalid argument\n"); return IA_CSS_PROGRAM_INVALID_DEPENDENCY; } return *program_dep_ptr; @@ -563,7 +563,7 @@ ia_css_kernel_bitmap_t ia_css_program_manifest_get_kernel_bitmap( DECLARE_ERRVAL IA_CSS_TRACE_0(PSYSAPI_STATIC, VERBOSE, - "ia_css_program_manifest_get_kernel_bitmap(): enter:\n"); + "ia_css_program_manifest_get_kernel_bitmap(): enter:\n"); verifexitval(manifest != NULL, EFAULT); EXIT: if (!noerror()) { diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_sim_trace.h b/modules/ia_css/ipu6ep/include/ia_css_psys_sim_trace.h index a5cf6f78..75f07d5c 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_sim_trace.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_sim_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_static_trace.h b/modules/ia_css/ipu6ep/include/ia_css_psys_static_trace.h index 03c355b3..5f0f5a30 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_static_trace.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_static_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal.h b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal.h index 1dcb3b3c..1794009a 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -208,7 +208,7 @@ int ia_css_data_terminal_set_link_id( /*! Set stream2gen buffer size used in stream to GEN connection * This function should be called, in case we are in streaming use-case, and * we need to configure the stream2gen_buffer_size to be less than full image's height. - * Note, that the stream2gen_buffer_size is set to a defalut value of full image's height + * Note, that the stream2gen_buffer_size is set to a default value of full image's height * during terminal_create function. * @param terminal[in] data terminal object @@ -258,7 +258,7 @@ bool ia_css_is_terminal_valid( /* ================= Program Control Init Terminal - START ================= */ /*! - * Gets the program init terminal descripor size + * Gets the program init terminal descriptor size * @param manifest[in] program control init terminal manifest * @param pg_manifest[in] program group manifest * @param kernel_bitmap[in] kernel enable bitmap @@ -278,7 +278,7 @@ ia_css_program_control_init_terminal_get_descriptor_size( * @param manifest[in] program control init terminal manifest * @param pg_manifest[in] program group manifest * @param kernel_bitmap[in] kernel enable bitmap - * @return < 0 on erro + * @return < 0 on error */ IA_CSS_PSYS_DYNAMIC_STORAGE_CLASS_H int @@ -302,7 +302,7 @@ ia_css_program_control_init_terminal_get_program_desc( ); /*! - * Pretty prints the program control init termnial + * Pretty prints the program control init terminal * @param terminal[in] program control init terminal */ IA_CSS_PSYS_DYNAMIC_STORAGE_CLASS_H diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal.hsys.user.h b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal.hsys.user.h index 5abd3211..7970906e 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal.hsys.user.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal.hsys.user.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_impl.h b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_impl.h index 5a965794..9b044fc9 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_impl.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest.h b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest.h index 3255e10f..5a0ee23c 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest.hsys.user.h b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest.hsys.user.h index 1a7b7995..7bc46b3d 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest.hsys.user.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest.hsys.user.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest.sim.h b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest.sim.h index 22c40422..a38336b2 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest.sim.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest.sim.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest_impl.h b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest_impl.h index 8c99fa5d..e7d54ffc 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest_impl.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_manifest_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -211,10 +211,10 @@ static void ia_css_terminal_manifest_set_attributes_by_type( ia_css_terminal_manifest_set_connect_buffer_type(manifest, connect_buf_type); } -/** Temporary implementation for new fields until the manfifest generator +/** Temporary implementation for new fields until the manifest generator * tool will be enhance to set values directly. * - * - Attibutes are set to meaningful values by mapping terminal type to + * - Attributes are set to meaningful values by mapping terminal type to * attributes * - connect_ID is set to the invalid terminal ID value: IA_CSS_TERMINAL_INVALID_ID * - max_payload_size is set to UINT32_MAX diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_private_types.h b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_private_types.h index ef3b7915..def3bdbf 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_private_types.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_terminal_private_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,7 +61,7 @@ struct ia_css_data_terminal_s { /** Reserved * @note No known intent for this reservation field. */ uint32_t reserved; - /** Tranfer method for send/receving data to/from this terminal. */ + /** Transfer method for send/receiving data to/from this terminal. */ ia_css_connection_type_t connection_type; /** Offset in bytes from the start of this structure to a Array[fragment_count] of * type "ia_css_fragment_descriptor_t", aligned to a 64 bit boundary. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_transport.h b/modules/ia_css/ipu6ep/include/ia_css_psys_transport.h index 23f84fd9..cfba5b0c 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_transport.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_transport.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psys_transport_dep.h b/modules/ia_css/ipu6ep/include/ia_css_psys_transport_dep.h index 5010c5b7..ffd88ead 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psys_transport_dep.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psys_transport_dep.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psysapi_fw_version.h b/modules/ia_css/ipu6ep/include/ia_css_psysapi_fw_version.h index 89c63a75..724870d8 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psysapi_fw_version.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psysapi_fw_version.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_psysapi_trace.h b/modules/ia_css/ipu6ep/include/ia_css_psysapi_trace.h index a98c47c3..4ac6cc01 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_psysapi_trace.h +++ b/modules/ia_css/ipu6ep/include/ia_css_psysapi_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_rbm.h b/modules/ia_css/ipu6ep/include/ia_css_rbm.h index fbe6222a..915407e0 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_rbm.h +++ b/modules/ia_css/ipu6ep/include/ia_css_rbm.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_rbm_impl.h b/modules/ia_css/ipu6ep/include/ia_css_rbm_impl.h index 0ed56842..aaa095ab 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_rbm_impl.h +++ b/modules/ia_css/ipu6ep/include/ia_css_rbm_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -202,7 +202,7 @@ ia_css_rbm_t ia_css_rbm_create_from_uint64( result = ia_css_rbm_clear(); for (i = 0; i < MIN(nof_elems_bits64, IA_CSS_RBM_NOF_ELEMS); i++) { - /* masking is done implictly, the MSB bits of casting will be chopped off */ + /* masking is done implicitly, the MSB bits of casting will be chopped off */ result.data[i] = (IA_CSS_RBM_ELEM_TYPE) (value >> (i * IA_CSS_RBM_ELEM_BITS)); } @@ -308,7 +308,7 @@ int ia_css_rbm_range_val( IA_CSS_TRACE_0(RBM, VERBOSE, "ia_css_rbm_range_val(): enter:\n"); assert(index < IA_CSS_RBM_BITS); - /* Extract the bit range from the data array relevane entry */ + /* Extract the bit range from the data array relevant entry */ elem_index = index / IA_CSS_RBM_ELEM_BITS; elem_index_end = (index + size - 1) / IA_CSS_RBM_ELEM_BITS; elem_bit_index = index % IA_CSS_RBM_ELEM_BITS; diff --git a/modules/ia_css/ipu6ep/include/ia_css_rbm_manifest.h b/modules/ia_css/ipu6ep/include/ia_css_rbm_manifest.h index 3145e0e1..76568c39 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_rbm_manifest.h +++ b/modules/ia_css/ipu6ep/include/ia_css_rbm_manifest.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_rbm_manifest_types.h b/modules/ia_css/ipu6ep/include/ia_css_rbm_manifest_types.h index 662b9ef3..35bbf36e 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_rbm_manifest_types.h +++ b/modules/ia_css/ipu6ep/include/ia_css_rbm_manifest_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_rbm_trace.h b/modules/ia_css/ipu6ep/include/ia_css_rbm_trace.h index 80086ca5..3f45f1cd 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_rbm_trace.h +++ b/modules/ia_css/ipu6ep/include/ia_css_rbm_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_terminal.h b/modules/ia_css/ipu6ep/include/ia_css_terminal.h index 9959c01f..ac53e25e 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_terminal.h +++ b/modules/ia_css/ipu6ep/include/ia_css_terminal.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_terminal_base_types.h b/modules/ia_css/ipu6ep/include/ia_css_terminal_base_types.h index 91dfc139..e2d60553 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_terminal_base_types.h +++ b/modules/ia_css/ipu6ep/include/ia_css_terminal_base_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,17 +35,17 @@ /** Base structure for all terminal types. * * Terminals describe an opening between a program group and the outside world. - * They come in various types (data, statisitics, parameters, etc.) which may have + * They come in various types (data, statistics, parameters, etc.) which may have * extensions specific to those types. This structure is the base for all of those and - * must be the first field in any subclassed terminal structure type. + * must be the first field in any subclasses terminal structure type. */ struct ia_css_terminal_s { /**< Base terminal */ ia_css_terminal_type_t terminal_type; /**< Type ID of the terminal. This type enum defines the purpose of the terminal and its structure. */ uint32_t payload_size; /**< Size of buffer passed in buffer set for this terminal */ int16_t parent_offset; /**< Offset to the containing process group */ - uint16_t size; /**< Size of this whole terminal layout-structure, including subclassed extensions. */ + uint16_t size; /**< Size of this whole terminal layout-structure, including subclasses extensions. */ uint16_t tm_index; /**< Index of the terminal manifest object in the program group manifest. */ - ia_css_terminal_ID_t ID; /**< Absolute referal ID for this terminal, valid ID's != 0 */ + ia_css_terminal_ID_t ID; /**< Absolute referral ID for this terminal, valid ID's != 0 */ uint8_t padding[N_PADDING_UINT8_IN_TERMINAL_STRUCT]; }; /* ==================== Base Terminal - END ==================== */ diff --git a/modules/ia_css/ipu6ep/include/ia_css_terminal_defs.h b/modules/ia_css/ipu6ep/include/ia_css_terminal_defs.h index 0766c323..7e235086 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_terminal_defs.h +++ b/modules/ia_css/ipu6ep/include/ia_css_terminal_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -93,7 +93,7 @@ typedef enum ia_css_connect_buf_type { * and ia_css_connect_buf_type_t * To stage the changes, this type will remain - for now... * - * Inital type to attribute mapping table for staging: + * Initial type to attribute mapping table for staging: * ia_css_terminal_type_t | ia_css_terminal_cat_t | ia_css_terminal_dir_t | ia_css_terminal_rou_t | ia_css_connect_buf_type_t | notes * ----------------------------------------- | --------------------- | --------------------- | --------------------- | ---------------------------- | ----- * IA_CSS_TERMINAL_TYPE_DATA_IN | CAT_CONNECT | DIR_IN | ROU_FRAG? | BUF_TYPE_DATA | Fragment handling unclear @@ -143,14 +143,14 @@ typedef enum ia_css_terminal_type { IA_CSS_TERMINAL_TYPE_STATE_OUT, /** Program parameters, may change per fragment */ IA_CSS_TERMINAL_TYPE_PROGRAM, - /** Program control parameters. Non-alogrithmic parameters for system devices. */ + /** Program control parameters. Non-algorithmic parameters for system devices. */ IA_CSS_TERMINAL_TYPE_PROGRAM_CONTROL_INIT, IA_CSS_N_TERMINAL_TYPES } ia_css_terminal_type_t; #define IA_CSS_TERMINAL_TYPE_BITS 32 -/* Temporary redirection needed to facilicate merging with the drivers +/* Temporary redirection needed to facilitate merging with the drivers in a backwards compatible manner */ #define IA_CSS_TERMINAL_TYPE_PARAM_CACHED IA_CSS_TERMINAL_TYPE_PARAM_CACHED_IN diff --git a/modules/ia_css/ipu6ep/include/ia_css_terminal_impl.h b/modules/ia_css/ipu6ep/include/ia_css_terminal_impl.h index ff6ff35c..b7e79b9c 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_terminal_impl.h +++ b/modules/ia_css/ipu6ep/include/ia_css_terminal_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest.h b/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest.h index 1868b157..1dc90554 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest.h +++ b/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest_base_types.h b/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest_base_types.h index bf4f46c8..63d91c3b 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest_base_types.h +++ b/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest_base_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest_impl.h b/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest_impl.h index 450a4b29..a44fe0ef 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest_impl.h +++ b/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest_types.h b/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest_types.h index 220ac9b3..c63c1752 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest_types.h +++ b/modules/ia_css/ipu6ep/include/ia_css_terminal_manifest_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ * section belongs to, and the target memory type (usually device registers). * * A region ID allows specifying multiple sections for a single device when a - * device's configuration registers are not all contigous. + * device's configuration registers are not all contiguous. */ struct ia_css_param_manifest_section_desc_s { /** Maximum size of the related parameter region */ @@ -170,7 +170,7 @@ struct ia_css_spatial_param_terminal_manifest_s { /** Contains limits for the frame spatial parameters */ ia_css_frame_grid_manifest_desc_t frame_grid_desc; /** - * Constains limits for the fragment spatial parameters + * Constrains limits for the fragment spatial parameters * - COMMON AMONG FRAGMENTS */ ia_css_fragment_grid_manifest_desc_t common_fragment_grid_desc; @@ -191,7 +191,7 @@ struct ia_css_spatial_param_terminal_manifest_s { uint8_t kernel_id; /** * Groups together compute units in order to achieve alignment - * requirements for transfes and to achieve canonical frame + * requirements for transfer and to achieve canonical frame * representation */ uint8_t compute_units_p_elem; @@ -247,7 +247,7 @@ struct ia_css_sliced_param_terminal_manifest_s { uint16_t sliced_param_section_count; /** * Points to array of ia_css_sliced_param_manifest_section_desc_s - * which constain info for the slicing of the parameters + * which contain info for the slicing of the parameters */ uint16_t sliced_param_section_offset; /** Kernel identifier */ diff --git a/modules/ia_css/ipu6ep/include/ia_css_terminal_types.h b/modules/ia_css/ipu6ep/include/ia_css_terminal_types.h index 7e635082..ad611e94 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_terminal_types.h +++ b/modules/ia_css/ipu6ep/include/ia_css_terminal_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -205,7 +205,7 @@ struct ia_css_spatial_param_terminal_s { uint16_t frame_grid_param_section_desc_offset; /** * Points to array of ia_css_fragment_spatial_desc_t - * which constain info for the fragments of spatial parameters + * which contain info for the fragments of spatial parameters */ uint16_t fragment_grid_desc_offset; }; @@ -217,7 +217,7 @@ struct ia_css_spatial_param_terminal_s { #define SIZE_OF_SLICE_PARAM_SECTION_DESC_STRUCT_BITS \ (N_UINT32_IN_SLICE_PARAM_SECTION_DESC_STRUCT * IA_CSS_UINT32_T_BITS) -/** A Slice of parameters ready to be trasferred from/to registers */ +/** A Slice of parameters ready to be transferred from/to registers */ struct ia_css_slice_param_section_desc_s { /** Offset of the parameter allocation in memory */ uint32_t mem_offset; @@ -235,7 +235,7 @@ struct ia_css_slice_param_section_desc_s { struct ia_css_fragment_slice_desc_s { /** * Points to array of ia_css_slice_param_section_desc_t - * which constain info for each prameter slice + * which contain info for each parameter slice */ uint16_t slice_section_desc_offset; /** Number of slices for the parameters for this fragment */ @@ -263,7 +263,7 @@ struct ia_css_sliced_param_terminal_s { uint32_t kernel_id; /** * Points to array of ia_css_fragment_slice_desc_t - * which constain info for the slicing of the parameters + * which contain info for the slicing of the parameters */ uint16_t fragment_slice_desc_offset; uint8_t padding[N_PADDING_UINT8_SLICED_PARAM_TERMINAL_STRUCT]; @@ -413,7 +413,7 @@ struct ia_css_fragment_param_section_desc_s { #define SIZE_OF_FRAG_SEQ_COMMANDS_STRUCT_BITS \ (N_UINT16_IN_FRAG_SEQ_COMMAND_STRUCT * IA_CSS_UINT16_T_BITS) -/** 4 commands packe together to save memory space */ +/** 4 commands packed together to save memory space */ struct ia_css_kernel_fragment_sequencer_command_desc_s { /** Contains the "(command_index%4) == index" command desc */ uint16_t line_count[IA_CSS_N_COMMAND_COUNT]; diff --git a/modules/ia_css/ipu6ep/include/ia_css_trace.h b/modules/ia_css/ipu6ep/include/ia_css_trace.h index 6ab5e289..bd8212a9 100644 --- a/modules/ia_css/ipu6ep/include/ia_css_trace.h +++ b/modules/ia_css/ipu6ep/include/ia_css_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -161,7 +161,7 @@ #define IA_CSS_TRACE_DYNAMIC_DECLARE(module) \ IA_CSS_TRACE_DYNAMIC_DECLARE_IMPL(module) /** -* Declares the configuration function for the dynamic api seperatly, if one +* Declares the configuration function for the dynamic api separately, if one * wants to use it. */ #define IA_CSS_TRACE_DYNAMIC_DECLARE_CONFIG_FUNC(module) \ @@ -178,7 +178,7 @@ #define IA_CSS_TRACE_DYNAMIC_DEFINE(module) \ IA_CSS_TRACE_DYNAMIC_DEFINE_IMPL(module) /** -* Defines the configuration function for the dynamic api seperatly, if one +* Defines the configuration function for the dynamic api separately, if one * wants to use it. */ #define IA_CSS_TRACE_DYNAMIC_DEFINE_CONFIG_FUNC(module) \ diff --git a/modules/ia_css/ipu6ep/include/ipu_device_acb_devices.h b/modules/ia_css/ipu6ep/include/ipu_device_acb_devices.h index 30b9f67d..cec120df 100644 --- a/modules/ia_css/ipu6ep/include/ipu_device_acb_devices.h +++ b/modules/ia_css/ipu6ep/include/ipu_device_acb_devices.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/ipu_device_gp_devices.h b/modules/ia_css/ipu6ep/include/ipu_device_gp_devices.h index 5aa3cd14..fceb72fa 100644 --- a/modules/ia_css/ipu6ep/include/ipu_device_gp_devices.h +++ b/modules/ia_css/ipu6ep/include/ipu_device_gp_devices.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/math_support.h b/modules/ia_css/ipu6ep/include/math_support.h index 05180a3b..6682d4d0 100644 --- a/modules/ia_css/ipu6ep/include/math_support.h +++ b/modules/ia_css/ipu6ep/include/math_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/misc_support.h b/modules/ia_css/ipu6ep/include/misc_support.h index c7b2debe..1265a37d 100644 --- a/modules/ia_css/ipu6ep/include/misc_support.h +++ b/modules/ia_css/ipu6ep/include/misc_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/pg_control_init_framework.h b/modules/ia_css/ipu6ep/include/pg_control_init_framework.h index 8c7a6e1b..8cd88b88 100644 --- a/modules/ia_css/ipu6ep/include/pg_control_init_framework.h +++ b/modules/ia_css/ipu6ep/include/pg_control_init_framework.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/platform_support.h b/modules/ia_css/ipu6ep/include/platform_support.h index 4f779ef5..058e71ec 100644 --- a/modules/ia_css/ipu6ep/include/platform_support.h +++ b/modules/ia_css/ipu6ep/include/platform_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/print_support.h b/modules/ia_css/ipu6ep/include/print_support.h index 9ddffb4b..b48eecce 100644 --- a/modules/ia_css/ipu6ep/include/print_support.h +++ b/modules/ia_css/ipu6ep/include/print_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/psys_system_global_impl.h b/modules/ia_css/ipu6ep/include/psys_system_global_impl.h index 72eb0cf5..75c62439 100644 --- a/modules/ia_css/ipu6ep/include/psys_system_global_impl.h +++ b/modules/ia_css/ipu6ep/include/psys_system_global_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/type_support.h b/modules/ia_css/ipu6ep/include/type_support.h index 57fea545..29539886 100644 --- a/modules/ia_css/ipu6ep/include/type_support.h +++ b/modules/ia_css/ipu6ep/include/type_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/vied_nci_acb_route_type.h b/modules/ia_css/ipu6ep/include/vied_nci_acb_route_type.h index 3ceb0c70..edbe8984 100644 --- a/modules/ia_css/ipu6ep/include/vied_nci_acb_route_type.h +++ b/modules/ia_css/ipu6ep/include/vied_nci_acb_route_type.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/include/vied_nci_psys_resource_model.h b/modules/ia_css/ipu6ep/include/vied_nci_psys_resource_model.h index 08e8bb49..cddb5542 100644 --- a/modules/ia_css/ipu6ep/include/vied_nci_psys_resource_model.h +++ b/modules/ia_css/ipu6ep/include/vied_nci_psys_resource_model.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ #include "type_support.h" #include "storage_class.h" +#include "vied_nci_psys_resource_model_common.h" #define HAS_DFM 1 #define HAS_DMA_INTERNAL 1 @@ -32,16 +33,6 @@ #define VIED_NCI_RBM_MAX_TERMINAL_DESC_COUNT 4 #define N_PADDING_UINT8_IN_RBM_MANIFEST 2 -/* The amount of padding bytes needed to make - * ia_css_process_s/ia_css_process_ext_s/ - * ia_css_program_manifest_s/ia_css_program_manifest_ext_s - * structures 32 bit aligned (source files have check on this) - */ -#define N_PADDING_UINT8_IN_PROCESS_STRUCT 0 -#define N_PADDING_UINT8_IN_PROCESS_EXT_STRUCT 0 -#define N_PADDING_UINT8_IN_PROGRAM_MANIFEST 0 -#define N_PADDING_UINT8_IN_PROGRAM_MANIFEST_EXT 2 - /* * Cell IDs */ @@ -291,10 +282,6 @@ typedef uint32_t vied_nci_resource_bitmap_t; #define IA_CSS_PROCESS_INVALID_DEPENDENCY ((vied_nci_resource_id_t)(-1)) #define IA_CSS_PROCESS_INVALID_OFFSET ((vied_nci_resource_size_t)(-1)) -#define IA_CSS_PROCESS_MAX_CELLS 1 - -#define IA_CSS_MAX_INPUT_DEC_RESOURCES 4 -#define IA_CSS_MAX_OUTPUT_DEC_RESOURCES 4 /* * Resource specifications * Note that the FAS uses the terminology local/remote memory. In the PSYS API, diff --git a/modules/ia_css/ipu6ep/include/vied_nci_psys_resource_model_common.h b/modules/ia_css/ipu6ep/include/vied_nci_psys_resource_model_common.h new file mode 100644 index 00000000..fa7478a9 --- /dev/null +++ b/modules/ia_css/ipu6ep/include/vied_nci_psys_resource_model_common.h @@ -0,0 +1,50 @@ +/* +* INTEL CONFIDENTIAL +* +* Copyright (C) 2023 Intel Corporation. +* All Rights Reserved. +* +* The source code contained or described herein and all documents +* related to the source code ("Material") are owned by Intel Corporation +* or licensors. Title to the Material remains with Intel +* Corporation or its licensors. The Material contains trade +* secrets and proprietary and confidential information of Intel or its +* licensors. The Material is protected by worldwide copyright +* and trade secret laws and treaty provisions. No part of the Material may +* be used, copied, reproduced, modified, published, uploaded, posted, +* transmitted, distributed, or disclosed in any way without Intel's prior +* express written permission. +* +* No License under any patent, copyright, trade secret or other intellectual +* property right is granted to or conferred upon you by disclosure or +* delivery of the Materials, either expressly, by implication, inducement, +* estoppel or otherwise. Any license under such intellectual property rights +* must be express and approved by Intel in writing. +*/ + +#ifndef __VIED_NCI_PSYS_RESOURCE_MODEL_COMMON_H +#define __VIED_NCI_PSYS_RESOURCE_MODEL_COMMON_H + +/*max sizes*/ +#define VIED_NCI_DEV_DFM_LB_EMPTY_PORT_ID_MAX 5 +#define VIED_NCI_N_DEV_DFM_ID_MAX (VIED_NCI_DEV_DFM_LB_EMPTY_PORT_ID_MAX+1) +#define VIED_NCI_N_DATA_MEM_TYPE_ID_MAX 6 +#define VIED_NCI_DEV_CHN_DMA_ISA_ID_MAX 4 +#define VIED_NCI_N_DEV_CHN_ID_MAX (VIED_NCI_DEV_CHN_DMA_ISA_ID_MAX+1) + +#define IA_CSS_MAX_INPUT_DEC_RESOURCES 4 +#define IA_CSS_MAX_OUTPUT_DEC_RESOURCES 4 + +#define IA_CSS_PROCESS_MAX_CELLS 1 + +/* The amount of padding bytes needed to make + * ia_css_process_s/ia_css_process_ext_s/ + * ia_css_program_manifest_s/ia_css_program_manifest_ext_s + * structures 32 bit aligned (source files have check on this) + */ +#define N_PADDING_UINT8_IN_PROCESS_EXT_STRUCT 0 +#define N_PADDING_UINT8_IN_PROCESS_STRUCT 0 +#define N_PADDING_UINT8_IN_PROGRAM_MANIFEST_EXT 2 +#define N_PADDING_UINT8_IN_PROGRAM_MANIFEST 0 + +#endif /* __VIED_NCI_PSYS_RESOURCE_MODEL_COMMON_H */ diff --git a/modules/ia_css/ipu6ep/include/vied_nci_psys_system_global.h b/modules/ia_css/ipu6ep/include/vied_nci_psys_system_global.h index 5597ab02..76b511c2 100644 --- a/modules/ia_css/ipu6ep/include/vied_nci_psys_system_global.h +++ b/modules/ia_css/ipu6ep/include/vied_nci_psys_system_global.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/src/ia_css_kernel_bitmap.c b/modules/ia_css/ipu6ep/src/ia_css_kernel_bitmap.c index 35a1dcc7..a7747032 100644 --- a/modules/ia_css/ipu6ep/src/ia_css_kernel_bitmap.c +++ b/modules/ia_css/ipu6ep/src/ia_css_kernel_bitmap.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -66,7 +66,7 @@ ia_css_kernel_bitmap_t ia_css_kernel_bitmap_create_from_uint64( #ifndef IA_CSS_KERNEL_BITMAP_DO_NOT_USE_ELEMS result = ia_css_kernel_bitmap_clear(); for (i = 0; i < MIN(nof_elems_bits64, IA_CSS_KERNEL_BITMAP_NOF_ELEMS); i++) { - /* masking is done implictly, the MSB bits of casting will bel chopped off */ + /* masking is done implicitly, the MSB bits of casting will be chopped off */ result.data[i] = (IA_CSS_KERNEL_BITMAP_ELEM_TYPE) (value >> (i * IA_CSS_KERNEL_BITMAP_ELEM_BITS)); } diff --git a/modules/ia_css/ipu6ep/src/ia_css_program_group_param.c b/modules/ia_css/ipu6ep/src/ia_css_program_group_param.c index e4ab5b90..90883754 100644 --- a/modules/ia_css/ipu6ep/src/ia_css_program_group_param.c +++ b/modules/ia_css/ipu6ep/src/ia_css_program_group_param.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/src/ia_css_psys_process.c b/modules/ia_css/ipu6ep/src/ia_css_psys_process.c index a05e1075..6184ac87 100644 --- a/modules/ia_css/ipu6ep/src/ia_css_psys_process.c +++ b/modules/ia_css/ipu6ep/src/ia_css_psys_process.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/src/ia_css_psys_process_group.c b/modules/ia_css/ipu6ep/src/ia_css_psys_process_group.c index 5b3c6502..bf1bd22f 100644 --- a/modules/ia_css/ipu6ep/src/ia_css_psys_process_group.c +++ b/modules/ia_css/ipu6ep/src/ia_css_psys_process_group.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/src/ia_css_psys_process_group_cmd_impl.c b/modules/ia_css/ipu6ep/src/ia_css_psys_process_group_cmd_impl.c index 07c42c7c..ad458c40 100644 --- a/modules/ia_css/ipu6ep/src/ia_css_psys_process_group_cmd_impl.c +++ b/modules/ia_css/ipu6ep/src/ia_css_psys_process_group_cmd_impl.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/src/ia_css_psys_program_group_manifest.c b/modules/ia_css/ipu6ep/src/ia_css_psys_program_group_manifest.c index c8f33b2b..9eda49ff 100644 --- a/modules/ia_css/ipu6ep/src/ia_css_psys_program_group_manifest.c +++ b/modules/ia_css/ipu6ep/src/ia_css_psys_program_group_manifest.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -156,7 +156,7 @@ size_t ia_css_sizeof_program_group_manifest( * does not fit the exact model as is being asserted on in * ia_css_is_program_group_manifest_valid. We therefore disable some checks. * Further investigation is needed to determine whether *_pregdc program group - * can be canged or that the model must be changed. + * can be changed or that the model must be changed. * #define USE_SIMPLIFIED_GRAPH_MODEL 1 allows multiple programs to be * connected to the same terminal, and it allows a kernel be mapped over * multiple programs. @@ -485,7 +485,7 @@ bool ia_css_is_program_group_manifest_valid( * That must be equal for * parallel subnodes, * must be unequal for - * exlusive and virtual subnodes + * exclusive and virtual subnodes */ verifexit( ((is_j_subset_i && is_i_subset_j) ^ diff --git a/modules/ia_css/ipu6ep/src/ia_css_psys_program_manifest.c b/modules/ia_css/ipu6ep/src/ia_css_psys_program_manifest.c index 185baec0..d49ddad9 100644 --- a/modules/ia_css/ipu6ep/src/ia_css_psys_program_manifest.c +++ b/modules/ia_css/ipu6ep/src/ia_css_psys_program_manifest.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/src/ia_css_psys_terminal.c b/modules/ia_css/ipu6ep/src/ia_css_psys_terminal.c index c7121954..2809050a 100644 --- a/modules/ia_css/ipu6ep/src/ia_css_psys_terminal.c +++ b/modules/ia_css/ipu6ep/src/ia_css_psys_terminal.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6ep/src/ia_css_psys_terminal_manifest.c b/modules/ia_css/ipu6ep/src/ia_css_psys_terminal_manifest.c index dcb58a91..99a1b3b9 100644 --- a/modules/ia_css/ipu6ep/src/ia_css_psys_terminal_manifest.c +++ b/modules/ia_css/ipu6ep/src/ia_css_psys_terminal_manifest.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/ia_css/ipu6epadln/readme.txt b/modules/ia_css/ipu6epadln/readme.txt new file mode 100644 index 00000000..385d38f2 --- /dev/null +++ b/modules/ia_css/ipu6epadln/readme.txt @@ -0,0 +1 @@ +create folder for libcamhal adln diff --git a/modules/ia_css/ipu6se/include/ia_css_psys_process_group_impl.h b/modules/ia_css/ipu6se/include/ia_css_psys_process_group_impl.h index 5e074b71..fa76827c 100644 --- a/modules/ia_css/ipu6se/include/ia_css_psys_process_group_impl.h +++ b/modules/ia_css/ipu6se/include/ia_css_psys_process_group_impl.h @@ -535,6 +535,7 @@ int ia_css_process_group_print( ia_css_rbm_t routing_bitmap; NOT_USED(fid); + NOT_USED(routing_bitmap); IA_CSS_TRACE_0(PSYSAPI_DYNAMIC, VERBOSE, "ia_css_process_group_print(): enter:\n"); @@ -701,6 +702,7 @@ bool ia_css_can_process_group_submit( ia_css_terminal_t *terminal = ia_css_process_group_get_terminal(process_group, i); vied_vaddress_t buffer; + NOT_USED(buffer); ia_css_buffer_state_t buffer_state; verifexitval(terminal != NULL, EINVAL); @@ -795,6 +797,7 @@ bool ia_css_can_enqueue_buffer_set( ia_css_terminal_t *terminal = ia_css_process_group_get_terminal(process_group, i); vied_vaddress_t buffer; + NOT_USED(buffer); ia_css_buffer_state_t buffer_state; verifexitval(terminal != NULL, EINVAL); diff --git a/modules/memory/Camera3BufferPool.cpp b/modules/memory/Camera3BufferPool.cpp index 1a2edc02..4947683f 100644 --- a/modules/memory/Camera3BufferPool.cpp +++ b/modules/memory/Camera3BufferPool.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -65,7 +65,7 @@ icamera::status_t Camera3BufferPool::createBufferPool(int cameraId, uint32_t num for (uint32_t i = 0; i < numBufs; i++) { std::shared_ptr buffer = MemoryUtils::allocateHandleBuffer(width, height, gfxFmt, usage, cameraId); - if (!buffer || buffer->lock() != icamera::OK) { + if (!buffer) { mBuffers.clear(); LOGE("failed to alloc %d internal buffers", i); return icamera::NO_MEMORY; @@ -88,7 +88,7 @@ void Camera3BufferPool::destroyBufferPool() { std::shared_ptr Camera3BufferPool::acquireBuffer() { std::lock_guard l(mLock); for (auto& buf : mBuffers) { - if (!buf.second) { + if (!buf.second && (buf.first->isLocked() || buf.first->lock() == icamera::OK)) { buf.second = true; LOG2("%s addr:%p", __func__, buf.first->data()); return buf.first; diff --git a/modules/memory/chrome/Camera3Buffer.cpp b/modules/memory/chrome/Camera3Buffer.cpp index b6061ef2..72f23866 100644 --- a/modules/memory/chrome/Camera3Buffer.cpp +++ b/modules/memory/chrome/Camera3Buffer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2022 Intel Corporation + * Copyright (C) 2013-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -200,7 +200,7 @@ icamera::status_t Camera3Buffer::init(const camera3_stream_t* stream, buffer_han mHalBuffer.s.width = stream->width; mHalBuffer.s.height = stream->height; mFormat = stream->format; - mHalBuffer.s.memType = V4L2_MEMORY_USERPTR; + mHalBuffer.s.memType = V4L2_MEMORY_DMABUF; mHalBuffer.s.format = mGbmBufferManager->GetV4L2PixelFormat(handle); // Use actual width from platform native handle for stride mHalBuffer.s.stride = mGbmBufferManager->GetPlaneStride(handle, 0); diff --git a/modules/sandboxing/CMakeLists.txt b/modules/sandboxing/CMakeLists.txt deleted file mode 100644 index 4a03d27b..00000000 --- a/modules/sandboxing/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (C) 2019 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -add_subdirectory(client) - -#--------------------------- build libcam_algo.so --------------------------- -add_subdirectory(server) diff --git a/modules/sandboxing/IPCCommon.cpp b/modules/sandboxing/IPCCommon.cpp deleted file mode 100644 index 185b49d8..00000000 --- a/modules/sandboxing/IPCCommon.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "modules/sandboxing/IPCCommon.h" - -#include -#include - -namespace icamera { -const char* IntelAlgoIpcCmdToString(IPC_CMD cmd) { - static const char* gIpcCmdMapping[] = { - "IPC_FD_INIT", "IPC_FD_RUN", "IPC_FD_DEINIT", "IPC_GRAPH_ADD_KEY", "IPC_GRAPH_PARSE", - "IPC_GRAPH_RELEASE_NODES", "IPC_GRAPH_QUERY_GRAPH_SETTINGS", "IPC_GRAPH_CONFIG_STREAMS", - "IPC_GRAPH_GET_CONFIG_DATA", "IPC_GRAPH_GET_CONNECTION", "IPC_GRAPH_GET_PG_ID", - "IPC_CCA_CONSTRUCT", "IPC_CCA_DESTRUCT", "IPC_CCA_INIT", "IPC_CCA_SET_STATS", - "IPC_CCA_RUN_AEC", "IPC_CCA_RUN_AIQ", "IPC_CCA_RUN_LTM", "IPC_CCA_UPDATE_ZOOM", - "IPC_CCA_RUN_DVS", "IPC_CCA_GET_CMC", "IPC_CCA_GET_MKN", "IPC_CCA_GET_AIQD", - "IPC_CCA_UPDATE_TUNING", "IPC_CCA_DEINIT", "IPC_CCA_RUN_AIC", "IPC_CCA_GET_PAL_SIZE", - "IPC_CCA_DECODE_STATS", "IPC_PG_PARAM_INIT", "IPC_PG_PARAM_PREPARE", - "IPC_PG_PARAM_ALLOCATE_PG", "IPC_PG_PARAM_GET_FRAG_DESCS", "IPC_PG_PARAM_PREPARE_PROGRAM", - "IPC_PG_PARAM_REGISTER_PAYLOADS", "IPC_PG_PARAM_ENCODE", "IPC_PG_PARAM_DECODE", - "IPC_PG_PARAM_DEINIT", "IPC_GPU_TNR_INIT", "IPC_GPU_TNR_GET_SURFACE_INFO", - "IPC_GPU_TNR_PREPARE_SURFACE", "IPC_GPU_TNR_RUN_FRAME", "IPC_GPU_TNR_PARAM_UPDATE", - "IPC_GPU_TNR_DEINIT", - // ENABLE_EVCP_S - "IPC_EVCP_INIT", "IPC_EVCP_UPDCONF", "IPC_EVCP_SETCONF", "IPC_EVCP_RUN_FRAME", - "IPC_EVCP_DEINIT" - // ENABLE_EVCP_E - "IPC_GPU_TNR_THREAD2_RUN_FRAME", - "IPC_GPU_TNR_THREAD2_PARAM_UPDATE"}; - - unsigned int num = sizeof(gIpcCmdMapping) / sizeof(gIpcCmdMapping[0]); - return cmd < num ? gIpcCmdMapping[cmd] : gIpcCmdMapping[0]; -} - -IPC_GROUP IntelAlgoIpcCmdToGroup(IPC_CMD cmd) { - IPC_GROUP group = IPC_GROUP_CPU_OTHER; - if (cmd >= IPC_CCA_CONSTRUCT && cmd <= IPC_CCA_DEINIT) { - group = IPC_GROUP_AIQ; - } else if (cmd >= IPC_CCA_RUN_AIC && cmd <= IPC_CCA_GET_PAL_SIZE) { - group = IPC_GROUP_PAL; - } else if (cmd == IPC_CCA_DECODE_STATS) { - group = IPC_GROUP_STATS; - } else if (cmd >= IPC_PG_PARAM_INIT && cmd <= IPC_PG_PARAM_DEINIT) { - group = IPC_GROUP_PSYS; - } else if (cmd >= IPC_FD_INIT && cmd <= IPC_FD_DEINIT) { - group = IPC_GROUP_FD; - } else if (cmd >= IPC_GPU_TNR_INIT && cmd <= IPC_GPU_TNR_DEINIT) { - group = IPC_GROUP_GPU; - } else if (cmd >= IPC_GPU_TNR_THREAD2_RUN_FRAME && cmd <= IPC_GPU_TNR_THREAD2_PARAM_UPDATE) { - group = IPC_GROUP_GPU_THREAD2; - // ENABLE_EVCP_S - } else if (cmd >= IPC_EVCP_INIT && cmd <= IPC_EVCP_DEINIT) { - group = IPC_GROUP_GPU_EVCP; - // ENABLE_EVCP_E - } else { - group = IPC_GROUP_CPU_OTHER; - } - - return group; -} - -const char* IntelAlgoServerThreadName(int index) { - int count = 0; -#ifndef GPU_ALGO_SERVER - static const char* gIpcCmdMapping[IPC_CPU_GROUP_NUM] = { - "AiqCPUAlgoServer", "PalCPUAlgoServer", "StatsCPUAlgoServer", - "PsysCPUAlgoServer", "FdCPUAlgoServer", "OtherCPUAlgoServer"}; - count = IPC_CPU_GROUP_NUM; -#else - static const char* gIpcCmdMapping[IPC_GPU_GROUP_NUM] = {"GPUAlgoServer", - // ENABLE_EVCP_S - "GPUEvcpServer", - // ENABLE_EVCP_E - "GPUAlgoServer2"}; - count = IPC_GPU_GROUP_NUM; -#endif - - return index < count ? gIpcCmdMapping[index] : "unknown"; -} -} /* namespace icamera */ diff --git a/modules/sandboxing/IPCCommon.h b/modules/sandboxing/IPCCommon.h deleted file mode 100644 index 30a207d3..00000000 --- a/modules/sandboxing/IPCCommon.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include -#include - -#include "iutils/Errors.h" - -namespace icamera { -#define IPC_MATCHING_KEY 0x56 // the value is randomly chosen -#define IPC_REQUEST_HEADER_USED_NUM 1 -#define SHM_NAME "shm" - -enum IPC_CMD { - // CPU IPC COMMANDS - IPC_FD_INIT, - IPC_FD_RUN, - IPC_FD_DEINIT, - IPC_GRAPH_ADD_KEY, - IPC_GRAPH_PARSE, - IPC_GRAPH_RELEASE_NODES, - IPC_GRAPH_QUERY_GRAPH_SETTINGS, - IPC_GRAPH_CONFIG_STREAMS, - IPC_GRAPH_GET_CONFIG_DATA, - IPC_GRAPH_GET_CONNECTION, - IPC_GRAPH_GET_PG_ID, - IPC_CCA_CONSTRUCT, - IPC_CCA_DESTRUCT, - IPC_CCA_INIT, - IPC_CCA_SET_STATS, - IPC_CCA_RUN_AEC, - IPC_CCA_RUN_AIQ, - IPC_CCA_RUN_LTM, - IPC_CCA_UPDATE_ZOOM, - IPC_CCA_RUN_DVS, - IPC_CCA_GET_CMC, - IPC_CCA_GET_MKN, - IPC_CCA_GET_AIQD, - IPC_CCA_UPDATE_TUNING, - IPC_CCA_DEINIT, - IPC_CCA_RUN_AIC, - IPC_CCA_GET_PAL_SIZE, - IPC_CCA_DECODE_STATS, - IPC_PG_PARAM_INIT, - IPC_PG_PARAM_PREPARE, - IPC_PG_PARAM_ALLOCATE_PG, - IPC_PG_PARAM_GET_FRAG_DESCS, - IPC_PG_PARAM_PREPARE_PROGRAM, - IPC_PG_PARAM_REGISTER_PAYLOADS, - IPC_PG_PARAM_ENCODE, - IPC_PG_PARAM_DECODE, - IPC_PG_PARAM_DEINIT, - // GPU IPC COMMANDS - IPC_GPU_TNR_INIT, - IPC_GPU_TNR_GET_SURFACE_INFO, - IPC_GPU_TNR_PREPARE_SURFACE, - IPC_GPU_TNR_RUN_FRAME, - IPC_GPU_TNR_PARAM_UPDATE, - IPC_GPU_TNR_DEINIT, - // ENABLE_EVCP_S - // GPU EVCP COMMANDS - IPC_EVCP_INIT, - IPC_EVCP_UPDCONF, - IPC_EVCP_GETCONF, - IPC_EVCP_RUN_FRAME, - IPC_EVCP_DEINIT, - // ENABLE_EVCP_E - IPC_GPU_TNR_THREAD2_RUN_FRAME, - IPC_GPU_TNR_THREAD2_PARAM_UPDATE, -}; - -#define MAX_IA_BINARY_DATA_SIZE 800000 -struct ia_binary_data_mod { - unsigned int size; - char data[MAX_IA_BINARY_DATA_SIZE]; -}; - -const char* IntelAlgoIpcCmdToString(IPC_CMD cmd); - -enum IPC_GROUP { - // IPC command group for cpu - IPC_GROUP_AIQ, - IPC_GROUP_PAL, - IPC_GROUP_STATS, - IPC_GROUP_PSYS, - IPC_GROUP_FD, - IPC_GROUP_CPU_OTHER, - // IPU command group for gpu - IPC_GROUP_GPU, - // ENABLE_EVCP_S - // IPC Command group for Evcp using GPU. - IPC_GROUP_GPU_EVCP, - // ENABLE_EVCP_E - IPC_GROUP_GPU_THREAD2, -}; -#define IPC_GROUP_NUM (IPC_GROUP_GPU_THREAD2 + 1) -#define IPC_CPU_GROUP_NUM (IPC_GROUP_CPU_OTHER + 1) -#define IPC_GPU_GROUP_NUM (IPC_GROUP_GPU_THREAD2 - IPC_GROUP_GPU + 1) - -IPC_GROUP IntelAlgoIpcCmdToGroup(IPC_CMD cmd); -const char* IntelAlgoServerThreadName(int index); -} /* namespace icamera */ diff --git a/modules/sandboxing/IPCGraphConfig.cpp b/modules/sandboxing/IPCGraphConfig.cpp deleted file mode 100644 index f2ad8816..00000000 --- a/modules/sandboxing/IPCGraphConfig.cpp +++ /dev/null @@ -1,481 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IPC_GRAPH_CONFIG - -#include "modules/sandboxing/IPCGraphConfig.h" - -#include - -#include - -#include "iutils/CameraLog.h" -#include "iutils/Errors.h" -#include "iutils/Utils.h" - -namespace icamera { - -status_t IPCGraphConfig::readDataFromXml(const char* fileName, char* dataPtr, size_t* dataSize, - int maxSize) { - CheckAndLogError(!dataSize || !fileName || !dataPtr, UNKNOWN_ERROR, - "%s, Wrong parameters, dataSize: %p, fileName: %p, dataPtr: %p", __func__, - dataSize, fileName, dataPtr); - - struct stat statBuf; - int ret = stat(fileName, &statBuf); - CheckAndLogError((ret != 0), UNKNOWN_ERROR, "Failed to query the size of file: %s!", fileName); - CheckAndLogError(statBuf.st_size > maxSize, BAD_VALUE, - "The memory size: %d less than file size: %d", maxSize, statBuf.st_size); - - *dataSize = static_cast(statBuf.st_size); - LOG1("%s, fileName: %s, size: %zu", __func__, fileName, *dataSize); - - FILE* file = fopen(fileName, "rb"); - CheckAndLogError(!file, NAME_NOT_FOUND, "%s, Failed to open file: %s", __func__, fileName); - - size_t len = fread(dataPtr, 1, *dataSize, file); - fclose(file); - - CheckAndLogError((len != *dataSize), UNKNOWN_ERROR, "%s, Failed to read data from file: %s", - __func__, fileName); - - return OK; -} - -bool IPCGraphConfig::clientFlattenParse(void* pData, uint32_t size, int cameraId, - const char* graphDescFile, const char* settingsFile) { - CheckAndLogError(!pData || !graphDescFile || !settingsFile || size < sizeof(GraphParseParams), - false, "@%s, wrong parameters, pData: %p, GD: %p, settings: %p, size: %u", - __func__, pData, graphDescFile, settingsFile, size); - - GraphParseParams* params = static_cast(pData); - CLEAR(*params); - - params->cameraId = cameraId; - int ret = - readDataFromXml(graphDescFile, params->GD, &(params->gdSize), MAX_GRAPH_DESCRIPTOR_SIZE); - CheckAndLogError(ret != OK, false, "Failed to read the graph descriptor file: %s", - graphDescFile); - - ret = readDataFromXml(settingsFile, params->GS, &(params->gsSize), MAX_GRAPH_SETTINGS_SIZE); - CheckAndLogError(ret != OK, false, "Failed to read the graph settings file: %s", settingsFile); - - return true; -} - -bool IPCGraphConfig::serverUnflattenParse(void* pData, uint32_t size, - GraphParseParams** parseParam) { - CheckAndLogError(!pData || !parseParam || size < sizeof(GraphParseParams), false, - "@%s, Wrong parameters, pData: %p, parseParam: %p, size: %u", __func__, pData, - parseParam, size); - - GraphParseParams* params = static_cast(pData); - *parseParam = params; - - return true; -} - -bool IPCGraphConfig::clientFlattenConfigStreams(void* pData, uint32_t size, GraphBaseInfo info, - GraphSettingType type, bool dummyStillSink, - const std::vector& streams) { - LOG1("@%s, pData: %p, configMode: %d, dummyStillSink: %d", info.cameraId, __func__, pData, - info.configMode, dummyStillSink); - - CheckAndLogError(!pData || size < sizeof(GraphConfigStreamParams) || streams.empty(), false, - "@%s, Wrong parameters, pData: %p, size: %u, streams count: %d", __func__, - pData, size, streams.size()); - - GraphConfigStreamParams* params = static_cast(pData); - CLEAR(*params); - - params->baseInfo = info; - params->type = type; - for (size_t i = 0; i < streams.size(); ++i) { - params->streamCfg[i] = *(streams[i]); - params->streamPriv[i] = *(static_cast(streams[i]->mPrivate)); - params->streamNum++; - } - params->dummyStillSink = dummyStillSink; - return true; -} - -bool IPCGraphConfig::serverUnflattenConfigStreams(void* pData, uint32_t size, GraphBaseInfo* info, - GraphSettingType* type, bool* dummyStillSink, - std::vector* streams) { - CheckAndLogError(!pData || size < sizeof(GraphConfigStreamParams) || !info || !type || - !streams || !dummyStillSink, - false, - "@%s, Wrong parameters, pData: %p, size: %u, info: %p, type: %p, streams: %p, " - "dummyStillSink: %p", - __func__, pData, size, info, type, streams, dummyStillSink); - - GraphConfigStreamParams* params = static_cast(pData); - - *info = params->baseInfo; - *type = params->type; - *dummyStillSink = params->dummyStillSink; - for (uint32_t i = 0; i < params->streamNum; ++i) { - params->streamCfg[i].mPrivate = static_cast(&(params->streamPriv[i])); - streams->push_back(&(params->streamCfg[i])); - } - - return true; -} - -bool IPCGraphConfig::clientFlattenGetGraphData(void* pData, uint32_t size, GraphBaseInfo info) { - CheckAndLogError(!pData || size < sizeof(GraphGetDataParams), false, - "@%s, Wrong parameters, pData: %p, size: %u", __func__, pData, size); - - GraphGetDataParams* params = static_cast(pData); - CLEAR(*params); - - params->baseInfo = info; - - return true; -} - -bool IPCGraphConfig::serverUnflattenGetGraphData(void* pData, uint32_t size, GraphBaseInfo* info) { - CheckAndLogError(!pData || !info || size < sizeof(GraphGetDataParams), false, - "@%s, Wrong parameters, pData: %p, info: %p, size: %u", __func__, pData, info, - size); - - GraphGetDataParams* params = static_cast(pData); - *info = params->baseInfo; - - return true; -} - -bool IPCGraphConfig::serverFlattenGetGraphData(void* pData, uint32_t size, - IGraphType::GraphConfigData graphData) { - CheckAndLogError(!pData || size < sizeof(GraphGetDataParams), false, - "@%s, Wrong parameters, pData: %p, size: %u", __func__, pData, size); - - GraphGetDataParams* params = static_cast(pData); - - params->mcId = graphData.mcId; - params->graphId = graphData.graphId; - params->gdcKernelId = graphData.gdcKernelId; - - params->csiReso = graphData.csiReso; - params->gdcReso = graphData.gdcReso; - - LOG1("@%s, mcId: %d, graphId: %d, gdcKernelId: %d", __func__, params->mcId, params->graphId, - params->gdcKernelId); - - params->streamIdNum = graphData.streamIds.size(); - for (size_t i = 0; i < graphData.streamIds.size(); ++i) { - params->streamIdData[i] = graphData.streamIds[i]; - } - - params->tuningModeNum = graphData.tuningModes.size(); - for (size_t i = 0; i < graphData.tuningModes.size(); ++i) { - params->tuningModes[i] = graphData.tuningModes[i]; - } - - params->pgInfoNum = graphData.pgInfo.size(); - for (size_t i = 0; i < graphData.pgInfo.size(); ++i) { - size_t len = graphData.pgInfo[i].pgName.copy(params->pgInfoData[i].pgName, MAX_NAME_LENGTH); - params->pgInfoData[i].pgName[len] = '\0'; - params->pgInfoData[i].pgId = graphData.pgInfo[i].pgId; - params->pgInfoData[i].streamId = graphData.pgInfo[i].streamId; - params->pgInfoData[i].rbmByte = graphData.pgInfo[i].rbmValue.rbm_bytes; - - if (params->pgInfoData[i].rbmByte > 0) { - MEMCPY_S(params->pgInfoData[i].rbmData, MAX_RBM_STR_SIZE, - graphData.pgInfo[i].rbmValue.rbm, graphData.pgInfo[i].rbmValue.rbm_bytes); - } - } - - params->mBrInfoNum = graphData.mbrInfo.size(); - for (size_t i = 0; i < graphData.mbrInfo.size(); ++i) { - params->mBrInfoData[i].streamId = graphData.mbrInfo[i].streamId; - params->mBrInfoData[i].mBrData = graphData.mbrInfo[i].data; - } - - params->pgNamesNum = graphData.pgNames.size(); - for (size_t i = 0; i < params->pgNamesNum; ++i) { - size_t len = graphData.pgNames[i].copy(params->pgNames[i], MAX_NAME_LENGTH); - params->pgNames[i][len] = '\0'; - } - - params->kernelArrayNum = graphData.programGroup.size(); - for (size_t i = 0; i < params->kernelArrayNum; ++i) { - params->kernelArray[i].streamId = graphData.programGroup[i].streamId; - ia_isp_bxt_program_group* pgPtr = graphData.programGroup[i].pgPtr; - params->kernelArray[i].group = *pgPtr; - - for (unsigned int j = 0; j < params->kernelArray[i].group.kernel_count; ++j) { - params->kernelArray[i].runKernels[j] = pgPtr->run_kernels[j]; - if (pgPtr->run_kernels[j].resolution_info) { - params->kernelArray[i].resoInfo[j] = *(pgPtr->run_kernels[j].resolution_info); - params->kernelArray[i].runKernels[j].resolution_info = - &(params->kernelArray[i].resoInfo[j]); - } else { - params->kernelArray[i].runKernels[j].resolution_info = nullptr; - } - - if (pgPtr->run_kernels[j].resolution_history) { - params->kernelArray[i].resoHistory[j] = *(pgPtr->run_kernels[j].resolution_history); - params->kernelArray[i].runKernels[j].resolution_history = - &(params->kernelArray[i].resoHistory[j]); - } else { - params->kernelArray[i].runKernels[j].resolution_history = nullptr; - } - } - params->kernelArray[i].group.run_kernels = params->kernelArray[i].runKernels; - - if (pgPtr->pipe) { - params->kernelArray[i].pipeInfo = *(pgPtr->pipe); - params->kernelArray[i].group.pipe = &(params->kernelArray[i].pipeInfo); - } else { - params->kernelArray[i].group.pipe = nullptr; - } - } - - return true; -} - -bool IPCGraphConfig::clientUnflattenGetGraphData(void* pData, uint32_t size, - IGraphType::GraphConfigData* graphData) { - CheckAndLogError(!pData || !graphData || size < sizeof(GraphGetDataParams), false, - "@%s, Wrong parameters, pData: %p, graphData: %p, size: %u", __func__, pData, - graphData, size); - - GraphGetDataParams* params = static_cast(pData); - - graphData->mcId = params->mcId; - graphData->graphId = params->graphId; - graphData->gdcKernelId = params->gdcKernelId; - - graphData->csiReso = params->csiReso; - graphData->gdcReso = params->gdcReso; - - LOG1("@%s, mcId: %d, graphId: %d, gdcKernelId: %d", __func__, params->mcId, params->graphId, - params->gdcKernelId); - - for (size_t i = 0; i < params->streamIdNum; ++i) { - graphData->streamIds.push_back(params->streamIdData[i]); - } - - for (size_t i = 0; i < params->tuningModeNum; ++i) { - graphData->tuningModes.push_back(params->tuningModes[i]); - } - - for (size_t i = 0; i < params->pgInfoNum; ++i) { - IGraphType::PgInfo info; - info.pgName = params->pgInfoData[i].pgName; - info.pgId = params->pgInfoData[i].pgId; - info.streamId = params->pgInfoData[i].streamId; - info.rbmValue.rbm_bytes = params->pgInfoData[i].rbmByte; - if (params->pgInfoData[i].rbmByte > 0) { - MEMCPY_S(info.rbmValue.rbm, MAX_RBM_STR_SIZE, params->pgInfoData[i].rbmData, - params->pgInfoData[i].rbmByte); - } - graphData->pgInfo.push_back(info); - } - - for (size_t i = 0; i < params->mBrInfoNum; ++i) { - IGraphType::MbrInfo info; - info.streamId = params->mBrInfoData[i].streamId; - info.data = params->mBrInfoData[i].mBrData; - graphData->mbrInfo.push_back(info); - } - - for (size_t i = 0; i < params->pgNamesNum; ++i) { - graphData->pgNames.push_back(params->pgNames[i]); - } - - for (size_t i = 0; i < params->kernelArrayNum; ++i) { - IGraphType::ProgramGroupInfo info; - - info.streamId = params->kernelArray[i].streamId; - info.pgPtr = &(params->kernelArray[i].group); - - info.pgPtr->run_kernels = params->kernelArray[i].runKernels; - for (unsigned j = 0; j < info.pgPtr->kernel_count; ++j) { - if (params->kernelArray[i].runKernels[j].resolution_info) { - info.pgPtr->run_kernels[j].resolution_info = &(params->kernelArray[i].resoInfo[j]); - } else { - info.pgPtr->run_kernels[j].resolution_info = nullptr; - } - - if (params->kernelArray[i].runKernels[j].resolution_history) { - info.pgPtr->run_kernels[j].resolution_history = - &(params->kernelArray[i].resoHistory[j]); - } else { - info.pgPtr->run_kernels[j].resolution_history = nullptr; - } - } - - if (params->kernelArray[i].group.pipe) { - info.pgPtr->pipe = &(params->kernelArray[i].pipeInfo); - } else { - info.pgPtr->pipe = nullptr; - } - - graphData->programGroup.push_back(info); - } - - return true; -} - -bool IPCGraphConfig::clientFlattenGetPgId(void* pData, uint32_t size, GraphBaseInfo info, - const int streamId, const int kernelId) { - CheckAndLogError(!pData || size < sizeof(GraphGetPgIdParams), false, - "@%s, Wrong parameters, pData: %p, size: %u", __func__, pData, size); - - GraphGetPgIdParams* params = static_cast(pData); - CLEAR(*params); - - params->baseInfo = info; - params->streamId = streamId; - params->kernelId = kernelId; - - return true; -} - -bool IPCGraphConfig::serverUnFlattenGetPgId(void* pData, uint32_t size, GraphBaseInfo* info, - uint32_t* streamId, int32_t* kernelId) { - CheckAndLogError(!pData || size < sizeof(GraphGetPgIdParams) || !info || !streamId || !kernelId, - false, - "@%s, Wrong parameters, pData: %p, size: %u, info: %p, streamId: %p, " - "kernelId: %p", - __func__, pData, size, info, streamId, kernelId); - - GraphGetPgIdParams* params = static_cast(pData); - - *info = params->baseInfo; - *streamId = params->streamId; - *kernelId = params->kernelId; - - return true; -} - -bool IPCGraphConfig::serverFlattenGetPgId(void* pData, uint32_t size, int32_t pgId) { - CheckAndLogError(!pData || size < sizeof(GraphGetPgIdParams), false, - "@%s, Wrong parameters, pData: %p, size: %u", __func__, pData, size); - - GraphGetPgIdParams* params = static_cast(pData); - params->pgId = pgId; - - return true; -} - -bool IPCGraphConfig::clientUnFlattenGetPgId(void* pData, uint32_t size, int32_t* pgId) { - CheckAndLogError(!pData || !pgId || size < sizeof(GraphGetPgIdParams), false, - "@%s, Wrong parameters, pData: %p, pgId: %p, size: %u", __func__, pData, pgId, - size); - - GraphGetPgIdParams* params = static_cast(pData); - *pgId = params->pgId; - - return true; -} - -bool IPCGraphConfig::clientFlattenGetConnection(void* pData, uint32_t size, GraphBaseInfo info, - const std::vector& pgList) { - CheckAndLogError(!pData || size < sizeof(GraphGetConnectionParams), false, - "@%s, Wrong parameters, pData: %p, size: %u", __func__, pData, size); - GraphGetConnectionParams* params = static_cast(pData); - CLEAR(*params); - - params->baseInfo = info; - params->pgListNum = pgList.size(); - for (size_t i = 0; i < pgList.size(); ++i) { - size_t len = pgList[i].copy(params->pgList[i], MAX_NAME_LENGTH); - params->pgList[i][len] = '\0'; - } - - return true; -} - -bool IPCGraphConfig::serverUnFlattenGetConnection(void* pData, uint32_t size, GraphBaseInfo* info, - std::vector* pgList) { - CheckAndLogError(!pData || size < sizeof(GraphGetConnectionParams) || !info || !pgList, false, - "@%s, Wrong parameters, pData: %p, size: %u, info: %p, pgList: %p", __func__, - pData, size, info, pgList); - - GraphGetConnectionParams* params = static_cast(pData); - - *info = params->baseInfo; - for (size_t i = 0; i < params->pgListNum; ++i) { - pgList->push_back(params->pgList[i]); - } - - return true; -} - -bool IPCGraphConfig::serverFlattenGetConnection( - void* pData, uint32_t size, const std::vector& scalerInfo, - const std::vector& confVector, - const std::vector& tnrPortFormat) { - CheckAndLogError(!pData || size < sizeof(GraphGetConnectionParams), false, - "@%s, Wrong parameters, pData: %p, size: %u", __func__, pData, size); - - GraphGetConnectionParams* params = static_cast(pData); - - params->connectionArraySize = confVector.size(); - for (size_t i = 0; i < confVector.size(); ++i) { - params->connectionArray[i].connection = confVector[i]; - if (params->connectionArray[i].connection.stream) { - params->connectionArray[i].stream = *(confVector[i].stream); - } - } - - params->scalerInfoNum = scalerInfo.size(); - for (size_t i = 0; i < scalerInfo.size(); ++i) { - params->scalerInfoArray[i] = scalerInfo[i]; - } - - params->portFormatNum = tnrPortFormat.size(); - for (size_t i = 0; i < tnrPortFormat.size(); ++i) { - params->portFormatArray[i] = tnrPortFormat[i]; - } - - return true; -} - -bool IPCGraphConfig::clientUnFlattenGetConnection( - void* pData, uint32_t size, std::vector* scalerInfo, - std::vector* confVector, - std::vector* tnrPortFormat) { - CheckAndLogError( - !pData || !scalerInfo || !confVector || size < sizeof(GraphGetConnectionParams), false, - "@%s, Wrong parameters, pData: %p, scalerInfo: %p, confVector: %p, size: %u", __func__, - pData, scalerInfo, confVector, size); - - GraphGetConnectionParams* params = static_cast(pData); - - for (size_t i = 0; i < params->connectionArraySize; ++i) { - if (params->connectionArray[i].connection.stream) { - params->connectionArray[i].connection.stream = &(params->connectionArray[i].stream); - } - confVector->push_back(params->connectionArray[i].connection); - } - - for (size_t i = 0; i < params->scalerInfoNum; ++i) { - scalerInfo->push_back(params->scalerInfoArray[i]); - } - - if (tnrPortFormat) { - for (size_t i = 0; i < params->portFormatNum; ++i) { - tnrPortFormat->push_back(params->portFormatArray[i]); - } - } - - return true; -} -} // namespace icamera diff --git a/modules/sandboxing/IPCGraphConfig.h b/modules/sandboxing/IPCGraphConfig.h deleted file mode 100644 index d55633d7..00000000 --- a/modules/sandboxing/IPCGraphConfig.h +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include "modules/sandboxing/IPCCommon.h" -#include "src/platformdata/gc/IGraphConfig.h" - -namespace icamera { - -#define MAX_STREAM (4) // Max stream number -#define MAX_GRAPH_SETTINGS_SIZE (2 * 1024 * 1024) // Max graph settings file size -#define MAX_GRAPH_DESCRIPTOR_SIZE (512 * 1024) // Max graph descriptor file size -#define MAX_PG_NUMBER (10) // Max pg number -#define MAX_NAME_LENGTH (128) // Max length for name -#define MAX_CONNECTION_COUNT (64) // Max connection count -#define MAX_STREAM_KERNEL_COUNT (128) // Max kernels info per one stream - -struct GraphBaseInfo { - int cameraId; - ConfigMode configMode; - - bool operator<(const GraphBaseInfo& b) const { - return (cameraId < b.cameraId) ? true : (configMode < b.configMode ? true : false); - } -}; - -struct GraphPgInfo { - char pgName[MAX_NAME_LENGTH]; - uint32_t pgId; - int streamId; - uint32_t rbmByte; - char rbmData[MAX_RBM_STR_SIZE]; -}; - -struct GraphMbrInfo { - int32_t streamId; - ia_isp_bxt_gdc_limits mBrData; -}; - -struct GraphKernelArray { - int32_t streamId; - ia_isp_bxt_program_group group; - ia_isp_bxt_run_kernels_t runKernels[MAX_STREAM_KERNEL_COUNT]; - ia_isp_bxt_resolution_info_t resoInfo[MAX_STREAM_KERNEL_COUNT]; - ia_isp_bxt_resolution_info_t resoHistory[MAX_STREAM_KERNEL_COUNT]; - ia_isp_bxt_pipe_t pipeInfo; -}; - -struct GraphParseParams { - int cameraId; - size_t gdSize; - char GD[MAX_GRAPH_DESCRIPTOR_SIZE]; - size_t gsSize; - char GS[MAX_GRAPH_SETTINGS_SIZE]; -}; - -struct GraphConfigStreamParams { - GraphBaseInfo baseInfo; - GraphSettingType type; - uint32_t streamNum; - HalStream streamCfg[MAX_STREAM]; - stream_t streamPriv[MAX_STREAM]; - bool dummyStillSink; -}; - -struct GraphQueryGraphParams { - GraphConfigStreamParams configParams; - bool isHasGraphSettings; -}; - -struct GraphGetDataParams { - GraphBaseInfo baseInfo; - - int mcId; - int graphId; - uint32_t gdcKernelId; - - camera_resolution_t csiReso; - ia_isp_bxt_resolution_info_t gdcReso; - - uint32_t streamIdNum; - int32_t streamIdData[MAX_STREAM]; - - uint32_t tuningModeNum; - IGraphType::TuningModeInfo tuningModes[MAX_STREAM]; - - uint32_t pgInfoNum; - GraphPgInfo pgInfoData[MAX_PG_NUMBER]; - - uint32_t mBrInfoNum; - GraphMbrInfo mBrInfoData[MAX_STREAM]; - - uint32_t pgNamesNum; - char pgNames[MAX_PG_NUMBER][MAX_NAME_LENGTH]; - - uint32_t kernelArrayNum; - GraphKernelArray kernelArray[MAX_STREAM]; -}; - -struct GraphGetPgIdParams { - GraphBaseInfo baseInfo; - uint32_t streamId; - int32_t kernelId; - int32_t pgId; -}; - -struct GraphConnection { - IGraphType::PipelineConnection connection; - HalStream stream; -}; - -struct GraphGetConnectionParams { - GraphBaseInfo baseInfo; - uint32_t pgListNum; - char pgList[MAX_PG_NUMBER][MAX_NAME_LENGTH]; - uint32_t connectionArraySize; - GraphConnection connectionArray[MAX_CONNECTION_COUNT]; - uint32_t scalerInfoNum; - IGraphType::ScalerInfo scalerInfoArray[MAX_STREAM]; - uint32_t portFormatNum; - IGraphType::PrivPortFormat portFormatArray[MAX_STREAM]; -}; - -class IPCGraphConfig { - public: - IPCGraphConfig() {} - virtual ~IPCGraphConfig() {} - - bool clientFlattenParse(void* pData, uint32_t size, int cameraId, const char* graphDescFile, - const char* settingsFile); - bool serverUnflattenParse(void* pData, uint32_t size, GraphParseParams** parseParam); - bool clientFlattenConfigStreams(void* pData, uint32_t size, GraphBaseInfo info, - GraphSettingType type, bool dummyStillSink, - const std::vector& streams); - bool serverUnflattenConfigStreams(void* pData, uint32_t size, GraphBaseInfo* info, - GraphSettingType* type, bool* dummyStillSink, - std::vector* streams); - bool clientFlattenGetGraphData(void* pData, uint32_t size, GraphBaseInfo info); - bool serverUnflattenGetGraphData(void* pData, uint32_t size, GraphBaseInfo* info); - bool serverFlattenGetGraphData(void* pData, uint32_t size, - IGraphType::GraphConfigData graphData); - bool clientUnflattenGetGraphData(void* pData, uint32_t size, - IGraphType::GraphConfigData* graphData); - bool clientFlattenGetPgId(void* pData, uint32_t size, GraphBaseInfo info, const int streamId, - const int kernelId); - bool serverUnFlattenGetPgId(void* pData, uint32_t size, GraphBaseInfo* info, uint32_t* streamId, - int32_t* kernelId); - bool serverFlattenGetPgId(void* pData, uint32_t size, int32_t pgId); - bool clientUnFlattenGetPgId(void* pData, uint32_t size, int32_t* pgId); - bool clientFlattenGetConnection(void* pData, uint32_t size, GraphBaseInfo info, - const std::vector& pgList); - bool serverUnFlattenGetConnection(void* pData, uint32_t size, GraphBaseInfo* info, - std::vector* pgList); - bool serverFlattenGetConnection(void* pData, uint32_t size, - const std::vector& scalerInfo, - const std::vector& confVector, - const std::vector& tnrPortFormat); - bool clientUnFlattenGetConnection(void* pData, uint32_t size, - std::vector* scalerInfo, - std::vector* confVector, - std::vector* tnrPortFormat); - - private: - status_t readDataFromXml(const char* fileName, char* dataPtr, size_t* dataSize, int maxSize); - - // Disable copy constructor and assignment operator - DISALLOW_COPY_AND_ASSIGN(IPCGraphConfig); -}; -} // namespace icamera diff --git a/modules/sandboxing/IPCIntelCca.h b/modules/sandboxing/IPCIntelCca.h deleted file mode 100644 index 385f915c..00000000 --- a/modules/sandboxing/IPCIntelCca.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "IntelCCA.h" - -namespace icamera { - -struct intel_cca_struct_data { - int cameraId; - TuningMode tuningMode; -}; - -struct intel_cca_init_data { - int cameraId; - TuningMode tuningMode; - - cca::cca_init_params inParams; -}; - -struct intel_cca_set_stats_data { - int cameraId; - TuningMode tuningMode; - - cca::cca_stats_params inParams; -}; - -struct intel_cca_run_aec_data { - int cameraId; - TuningMode tuningMode; - - uint64_t frameId; - cca::cca_ae_input_params inParams; - - cca::cca_ae_results results; -}; - -struct intel_cca_run_aiq_data { - int cameraId; - TuningMode tuningMode; - - uint64_t frameId; - cca::cca_aiq_params inParams; - - cca::cca_aiq_results results; -}; - -struct intel_cca_run_ltm_data { - int cameraId; - TuningMode tuningMode; - - uint64_t frameId; - cca::cca_ltm_input_params inParams; -}; - -struct intel_cca_update_zoom_data { - int cameraId; - TuningMode tuningMode; - - cca::cca_dvs_zoom inParams; - uint32_t streamId; -}; - -struct intel_cca_run_dvs_data { - int cameraId; - TuningMode tuningMode; - - uint64_t frameId; - uint32_t streamId; -}; - -struct intel_cca_run_aic_data { - int cameraId; - TuningMode tuningMode; - - uint64_t frameId; - cca::cca_pal_input_params* inParams; - int32_t inParamsHandle; - - ia_binary_data palOutData; - int32_t palDataHandle; -}; - -struct intel_cca_get_cmc_data { - int cameraId; - TuningMode tuningMode; - - cca::cca_cmc results; -}; - -struct intel_cca_get_aiqd_data { - int cameraId; - TuningMode tuningMode; - - cca::cca_aiqd results; -}; - -struct intel_cca_mkn_data { - int cameraId; - TuningMode tuningMode; - - ia_mkn_trg type; - - cca::cca_mkn* results; - int32_t resultsHandle; -}; - -struct intel_cca_update_tuning_data { - int cameraId; - TuningMode tuningMode; - - uint8_t lardTags; - ia_lard_input_params lardParams; - cca::cca_nvm nvmParams; - int32_t streamId; -}; - -struct intel_cca_deinit_data { - int cameraId; - TuningMode tuningMode; -}; - -struct intel_cca_decode_stats_data { - int cameraId; - TuningMode tuningMode; - - ia_binary_data statsBuffer; - int32_t statsHandle; - uint32_t bitmap; - cca::cca_out_stats outStats; - - ia_isp_bxt_statistics_query_results_t results; -}; - -struct intel_cca_get_pal_data_size { - int cameraId; - TuningMode tuningMode; - - cca::cca_program_group pg; - - uint32_t returnSize; -}; -} /* namespace icamera */ diff --git a/modules/sandboxing/IPCIntelFD.cpp b/modules/sandboxing/IPCIntelFD.cpp deleted file mode 100644 index c93a50f4..00000000 --- a/modules/sandboxing/IPCIntelFD.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IPC_FACE_DETECTION - -#include "modules/sandboxing/IPCIntelFD.h" - -#include "CameraLog.h" -#include "iutils/Errors.h" -#include "iutils/Utils.h" - -namespace icamera { - -bool IPCIntelFD::clientFlattenInit(unsigned int max_face_num, int cameraId, - FaceDetectionInitParams* params) { - CheckAndLogError(params == nullptr, false, "@%s, params is nullptr", __func__); - - params->max_face_num = max_face_num; - params->cameraId = cameraId; - - return true; -} - -bool IPCIntelFD::serverUnflattenRun(const FaceDetectionRunParams& inParams, void* imageData, - pvl_image* image, int* cameraId) { - CheckAndLogError(image == nullptr || cameraId == nullptr, false, - "@%s, image or cameraId is nullptr", __func__); - - image->size = inParams.size; - image->width = inParams.width; - image->height = inParams.height; - image->format = inParams.format; - image->stride = inParams.stride; - image->rotation = inParams.rotation; - *cameraId = inParams.cameraId; - - if (imageData) { - image->data = const_cast(static_cast(imageData)); - } else { - image->data = const_cast(inParams.data); - } - - return true; -} -} /* namespace icamera */ diff --git a/modules/sandboxing/IPCIntelFD.h b/modules/sandboxing/IPCIntelFD.h deleted file mode 100644 index b5722d1a..00000000 --- a/modules/sandboxing/IPCIntelFD.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2019-2020 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include -#include -#include -#include - -#include "FaceType.h" -#include "modules/sandboxing/IPCCommon.h" - -namespace icamera { -struct FaceDetectionInitParams { - unsigned int max_face_num; - int cameraId; -}; - -struct FaceDetectionDeinitParams { - int cameraId; -}; - -struct FaceDetectionPVLResult { - bool faceUpdated; - int faceNum; - pvl_face_detection_result faceResults[MAX_FACES_DETECTABLE]; - pvl_eye_detection_result eyeResults[MAX_FACES_DETECTABLE]; - pvl_mouth_detection_result mouthResults[MAX_FACES_DETECTABLE]; -}; - -struct FaceDetectionRunParams { - uint8_t data[MAX_FACE_FRAME_SIZE_ASYNC]; - int32_t bufferHandle; - uint32_t size; - int32_t width; - int32_t height; - pvl_image_format format; - int32_t stride; - int32_t rotation; - int cameraId; - - FaceDetectionPVLResult results; -}; - -class IPCIntelFD { - public: - IPCIntelFD() {} - virtual ~IPCIntelFD() {} - - bool clientFlattenInit(unsigned int max_face_num, int cameraId, - FaceDetectionInitParams* params); - bool serverUnflattenRun(const FaceDetectionRunParams& inParams, void* imageData, - pvl_image* image, int* cameraId); -}; -} /* namespace icamera */ diff --git a/modules/sandboxing/IPCIntelPGParam.cpp b/modules/sandboxing/IPCIntelPGParam.cpp deleted file mode 100644 index a9740182..00000000 --- a/modules/sandboxing/IPCIntelPGParam.cpp +++ /dev/null @@ -1,534 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IPCIntelPGParam - -#include "modules/sandboxing/IPCIntelPGParam.h" - -#include "iutils/CameraLog.h" -#include "iutils/Errors.h" -#include "iutils/Utils.h" - -namespace icamera { - -bool IPCIntelPGParam::clientFlattenInit(void* pData, int dataSize, int pgId, uintptr_t client, - ia_p2p_platform_t platform, - const PgConfiguration& pgConfig) { - CheckAndLogError(!pData || dataSize < sizeof(pg_param_init_params), false, - "@%s, Wrong parameters, pData: %p, dataSize: %d", __func__, pData, dataSize); - - pg_param_init_params* params = static_cast(pData); - CheckAndLogError(pgConfig.pgManifestSize > sizeof(params->pgManifestData), false, - "@%s, manifest buffer size: %d is big", __func__, pgConfig.pgManifestSize); - - params->pgId = pgId; - params->client = client; - params->platform = platform; - - params->pgConfig.fragmentCount = pgConfig.fragmentCount; - params->pgConfig.inputMainFrame = pgConfig.inputMainFrame; - params->pgConfig.outputMainFrame = pgConfig.outputMainFrame; - - params->pgConfig.pgManifestSize = pgConfig.pgManifestSize; - MEMCPY_S(params->pgManifestData, sizeof(params->pgManifestData), pgConfig.pgManifest, - pgConfig.pgManifestSize); - - params->disableDataTermialsCount = pgConfig.disableDataTermials.size(); - CheckAndLogError(params->disableDataTermialsCount > IPU_MAX_TERMINAL_COUNT, false, - "@%s, disableDataTermials cound: %d is big", __func__, - params->disableDataTermialsCount); - memset(params->disableDataTermialsData, -1, sizeof(params->disableDataTermialsData)); - for (int i = 0; i < params->disableDataTermialsCount; i++) { - params->disableDataTermialsData[i] = pgConfig.disableDataTermials[i]; - } - - return true; -} - -bool IPCIntelPGParam::serverUnflattenInit(void* pData, int dataSize, int* pgId, uintptr_t* client, - ia_p2p_platform_t* platform, PgConfiguration* pgConfig) { - CheckAndLogError(!pData || !pgId || !client || !platform || !pgConfig || - dataSize < sizeof(pg_param_init_params), - false, - "@%s, Wrong parameters, pData: %p, pgId: %p, client: %p, platform: %p, " - "pgConfig: %p, dataSize: %d", - __func__, pData, pgId, client, platform, pgConfig, dataSize); - - pg_param_init_params* params = static_cast(pData); - *pgId = params->pgId; - *client = params->client; - *platform = params->platform; - - pgConfig->fragmentCount = params->pgConfig.fragmentCount; - pgConfig->inputMainFrame = params->pgConfig.inputMainFrame; - pgConfig->outputMainFrame = params->pgConfig.outputMainFrame; - pgConfig->pgManifestSize = params->pgConfig.pgManifestSize; - void* dataPtr = static_cast(params->pgManifestData); - pgConfig->pgManifest = static_cast(dataPtr); - - pgConfig->disableDataTermials.clear(); - CheckAndLogError(params->disableDataTermialsCount > IPU_MAX_TERMINAL_COUNT, false, - "@%s, disableDataTermials cound: %d is big", __func__, - params->disableDataTermialsCount); - for (int i = 0; i < params->disableDataTermialsCount; i++) { - pgConfig->disableDataTermials.push_back(params->disableDataTermialsData[i]); - } - - return true; -} - -bool IPCIntelPGParam::clientFlattenPrepare(void* pData, int dataSize, uintptr_t client, - unsigned int ipuParamSize, int32_t ipuParamHandle, - const ia_css_rbm_t* rbm) { - CheckAndLogError(!pData || dataSize < sizeof(pg_param_prepare_params), false, - "@%s, Wrong parameters, pData: %p, dataSize: %d", __func__, pData, dataSize); - - pg_param_prepare_params* params = static_cast(pData); - params->client = client; - params->ipuParamSize = ipuParamSize; - params->ipuParamHandle = ipuParamHandle; - - if (rbm) { - params->rbm = ¶ms->rbmData; - MEMCPY_S(¶ms->rbmData, sizeof(params->rbmData), rbm, sizeof(*rbm)); - } else { - params->rbm = nullptr; - } - - return true; -} - -bool IPCIntelPGParam::serverUnflattenPrepare(void* pData, int dataSize, uintptr_t* client, - void* palDataAddr, ia_binary_data* ipuParameters, - ia_css_rbm_t** rbm, ia_css_kernel_bitmap_t** bitmap, - uint32_t** maxStatsSize) { - CheckAndLogError(!pData || !client || !ipuParameters || !rbm || !bitmap || !palDataAddr || - dataSize < sizeof(pg_param_prepare_params), - false, - "@%s, Wrong parameters, pData: %p, client: %p, ipuParameters: %p, rbm: %p, " - "bitmap: %p, palDataAddr: %p, dataSize: %d", - __func__, pData, client, ipuParameters, rbm, bitmap, palDataAddr, dataSize); - - pg_param_prepare_params* params = static_cast(pData); - *client = params->client; - ipuParameters->size = params->ipuParamSize; - ipuParameters->data = palDataAddr; - *rbm = params->rbm ? ¶ms->rbmData : nullptr; - *bitmap = ¶ms->bitmapData; - if (maxStatsSize) *maxStatsSize = ¶ms->maxStatsSize; - return true; -} - -bool IPCIntelPGParam::clientUnflattenPrepare(const void* pData, int dataSize, - ia_css_kernel_bitmap_t* bitmap, - uint32_t* maxStatsSize) { - CheckAndLogError(!pData || !bitmap || dataSize < sizeof(pg_param_prepare_params), false, - "@%s, Wrong parameters, pData: %p, bitmap: %p, dataSize: %d", __func__, pData, - bitmap, dataSize); - - const pg_param_prepare_params* params = static_cast(pData); - MEMCPY_S(bitmap, sizeof(*bitmap), ¶ms->bitmapData, sizeof(params->bitmapData)); - - if (maxStatsSize) *maxStatsSize = params->maxStatsSize; - return true; -} - -int IPCIntelPGParam::getTotalPGBufferSize(int pgSize) { - int size = sizeof(pg_param_allocate_pg_params); - size += PAGE_ALIGN(pgSize); - return size; -} - -bool IPCIntelPGParam::assignPGBuffer(void* pData, int dataSize, int pgSize, void** pgBuffer) { - CheckAndLogError(!pData || !pgBuffer || dataSize < pgSize, false, - "@%s, Wrong parameters, pData: %p, pgBuffer: %p, dataSize: %d, pgSize: %d", - __func__, pData, pgBuffer, dataSize, pgSize); - - uintptr_t pgAddr = reinterpret_cast(pData); - CheckAndLogError(pgAddr & ((getpagesize() - 1)), false, "@%s, pg addr is not aligned", - __func__); - *pgBuffer = pData; - return true; -} - -bool IPCIntelPGParam::clientFlattenAllocatePGBuffer(void* pData, int dataSize, uintptr_t client, - int pgSize) { - CheckAndLogError(!pData, false, "@%s, pData is nullptr", __func__); - uintptr_t paramAddr = - reinterpret_cast(pData) + dataSize - sizeof(pg_param_allocate_pg_params); - CheckAndLogError(paramAddr < reinterpret_cast(pData) + pgSize, false, - "@%s, dataSize: %d is small", __func__, dataSize); - - pg_param_allocate_pg_params* params = reinterpret_cast(paramAddr); - params->client = client; - params->pgSize = pgSize; - - return true; -} - -bool IPCIntelPGParam::serverUnflattenAllocatePGBuffer(const void* pData, int dataSize, - uintptr_t* client, int* pgSize) { - CheckAndLogError(!pData || !client || !pgSize || dataSize < sizeof(pg_param_allocate_pg_params), - false, - "@%s, Wrong parameters, pData: %p, client: %p, pgSize: %p, dataSize: %d", - __func__, pData, client, pgSize, dataSize); - uintptr_t paramAddr = - reinterpret_cast(pData) + dataSize - sizeof(pg_param_allocate_pg_params); - pg_param_allocate_pg_params* params = reinterpret_cast(paramAddr); - CheckAndLogError(paramAddr < reinterpret_cast(pData) + params->pgSize, false, - "@%s, dataSize is small", __func__); - *client = params->client; - *pgSize = params->pgSize; - - return true; -} - -bool IPCIntelPGParam::clientFlattenGetFragDescs(void* pData, int dataSize, uintptr_t client, - int descCount) { - CheckAndLogError(!pData || dataSize < sizeof(pg_param_get_fragment_desc_params), false, - "@%s, Wrong parameters, pData: %p, dataSize: %d", __func__, pData, dataSize); - - pg_param_get_fragment_desc_params* params = - static_cast(pData); - CheckAndLogError(descCount > sizeof(params->descsData), false, "@%s, descCount: %d is big", - __func__, descCount); - - params->client = client; - params->descCount = descCount; - return true; -} - -bool IPCIntelPGParam::serverUnflattenGetFragDescs(void* pData, int dataSize, uintptr_t* client, - int* descCount, ia_p2p_fragment_desc** descs) { - CheckAndLogError(!pData || !client || !descCount || !descs || - dataSize < sizeof(pg_param_get_fragment_desc_params), - false, - "@%s, Wrong parameters, pData: %p, client: %p, descCount: %p, " - "descs: %p, dataSize: %d", - __func__, pData, client, descCount, descs, dataSize); - - pg_param_get_fragment_desc_params* params = - static_cast(pData); - *client = params->client; - *descCount = params->descCount; - *descs = params->descsData; - return true; -} - -bool IPCIntelPGParam::serverFlattenGetFragDescs(void* pData, int dataSize, int count) { - CheckAndLogError(!pData || dataSize < sizeof(pg_param_get_fragment_desc_params), false, - "@%s, Wrong parameters, pData: %p, dataSize: %d", __func__, pData, dataSize); - - pg_param_get_fragment_desc_params* params = - static_cast(pData); - params->returnCount = count; - return true; -} - -bool IPCIntelPGParam::clientUnflattenGetFragDescs(const void* pData, int dataSize, int* count, - ia_p2p_fragment_desc* descs) { - CheckAndLogError( - !pData || !count || !descs || dataSize < sizeof(pg_param_get_fragment_desc_params), false, - "@%s, Wrong parameters, pData: %p, count: %p, descs: %p, dataSize: %d", __func__, pData, - count, descs, dataSize); - - const pg_param_get_fragment_desc_params* params = - static_cast(pData); - *count = params->returnCount; - MEMCPY_S(descs, sizeof(ia_p2p_fragment_desc) * params->descCount, params->descsData, - sizeof(params->descsData)); - return true; -} - -bool IPCIntelPGParam::clientFlattenPrepareProgram(void* pData, int dataSize, uintptr_t client) { - CheckAndLogError(!pData || dataSize < sizeof(pg_param_prepare_program_params), false, - "@%s, Wrong parameters, pData: %p, dataSize: %d", __func__, pData, dataSize); - - pg_param_prepare_program_params* params = static_cast(pData); - params->client = client; - return true; -} - -bool IPCIntelPGParam::serverUnflattenPrepareProgram(const void* pData, int dataSize, - uintptr_t* client) { - CheckAndLogError(!pData || !client || dataSize < sizeof(pg_param_prepare_program_params), false, - "@%s, Wrong parameters, pData: %p, client: %p, dataSize: %d", __func__, pData, - client, dataSize); - - const pg_param_prepare_program_params* params = - static_cast(pData); - *client = params->client; - return true; -} - -bool IPCIntelPGParam::serverFlattenPrepareProgram(void* pData, int dataSize, int payloadCount, - const ia_binary_data* payloads) { - CheckAndLogError(!pData || !payloads || dataSize < sizeof(pg_param_prepare_program_params) || - payloadCount > IPU_MAX_TERMINAL_COUNT, - false, - "@%s, Wrong parameters, pData: %p, payloads: %p, dataSize: %d, count: %d", - __func__, pData, payloads, dataSize, payloadCount); - - pg_param_prepare_program_params* params = static_cast(pData); - params->payloadCount = payloadCount; - MEMCPY_S(params->payloads, sizeof(ia_binary_data) * payloadCount, payloads, - sizeof(ia_binary_data) * payloadCount); - return true; -} - -bool IPCIntelPGParam::clientUnflattenPrepareProgram(const void* pData, int dataSize, - int* payloadCount, ia_binary_data* payloads) { - CheckAndLogError(!pData || !payloads || dataSize < sizeof(pg_param_prepare_program_params), - false, "@%s, Wrong parameters, pData: %p, payloads: %p, dataSize: %d", - __func__, pData, payloads, dataSize); - - const pg_param_prepare_program_params* params = - static_cast(pData); - - CheckAndLogError(*payloadCount < params->payloadCount, false, "@%s, payloadCount is small", - __func__); - *payloadCount = params->payloadCount; - for (int i = 0; i < params->payloadCount; i++) { - payloads[i].size = params->payloads[i].size; - payloads[i].data = nullptr; - } - return true; -} - -int IPCIntelPGParam::getTotalPayloadSize(int payloadCount, const ia_binary_data* payloads) { - CheckAndLogError(!payloads, 0, "@%s, payloads is nullptr", __func__); - int size = sizeof(pg_param_register_payloads_params); - for (int i = 0; i < payloadCount; i++) { - if (payloads[i].size) { - size += PAGE_ALIGN(payloads[i].size); - } - } - return size; -} - -bool IPCIntelPGParam::assignPayloads(void* pData, int dataSize, int payloadCount, - ia_binary_data* payloads) { - CheckAndLogError(!pData || !payloads, false, "@%s, pData: %p, payloads: %p is nullptr", - __func__, pData, payloads); - - uintptr_t payloadAddr = reinterpret_cast(pData); - CheckAndLogError(payloadAddr & ((getpagesize() - 1)), false, "@%s, payload addr is not aligned", - __func__); - for (int i = 0; i < payloadCount; i++) { - if (payloads[i].size > 0) { - CheckAndLogError(payloadAddr > reinterpret_cast(pData) + dataSize, false, - "@%s, buffer is small", __func__); - payloads[i].data = reinterpret_cast(payloadAddr); - payloadAddr += PAGE_ALIGN(payloads[i].size); - } - } - return true; -} - -bool IPCIntelPGParam::clientFlattenRegisterPayloads(void* pData, int dataSize, uintptr_t client, - int payloadCount, - const ia_binary_data* payloads) { - CheckAndLogError(!pData || !payloads || dataSize < sizeof(pg_param_register_payloads_params) || - payloadCount > IPU_MAX_TERMINAL_COUNT, - false, - "@%s, Wrong parameters, pData: %p, payloads: %p, dataSize: %d, count: %d", - __func__, pData, payloads, dataSize, payloadCount); - - uintptr_t paramAddr = - reinterpret_cast(pData) + dataSize - sizeof(pg_param_register_payloads_params); - pg_param_register_payloads_params* params = - reinterpret_cast(paramAddr); - params->client = client; - params->payloadCount = payloadCount; - MEMCPY_S(params->cPayloads, sizeof(params->cPayloads), payloads, - sizeof(ia_binary_data) * payloadCount); - getPayloadOffsets(pData, dataSize, payloadCount, payloads, params->payloadOffsets); - return true; -} - -bool IPCIntelPGParam::serverUnflattenRegisterPayloads(void* pData, int dataSize, uintptr_t* client, - int* payloadCount, ia_binary_data** cPayloads, - ia_binary_data** sPayloads) { - CheckAndLogError(!pData || !client || !payloadCount || !cPayloads || !sPayloads || - dataSize < sizeof(pg_param_register_payloads_params), - false, - "@%s, Wrong parameters, pData: %p, client: %p, payloadCount: %p, " - "cPayloads: %p, sPayloads: %p, dataSize: %d", - __func__, pData, client, payloadCount, cPayloads, sPayloads, dataSize); - - uintptr_t paramAddr = - reinterpret_cast(pData) + dataSize - sizeof(pg_param_register_payloads_params); - pg_param_register_payloads_params* params = - reinterpret_cast(paramAddr); - *client = params->client; - MEMCPY_S(params->sPayloads, sizeof(params->sPayloads), params->cPayloads, - sizeof(params->cPayloads)); // save size to sPayloads - *payloadCount = params->payloadCount; - getPayloadData(pData, dataSize, *payloadCount, params->payloadOffsets, params->sPayloads); - *cPayloads = params->cPayloads; - *sPayloads = params->sPayloads; - return true; -} - -bool IPCIntelPGParam::getPayloadOffsets(const void* pData, int dataSize, int payloadCount, - const ia_binary_data* payloads, int32_t* payloadOffsets) { - CheckAndLogError(!pData || !payloads || !payloadOffsets, false, - "@%s, pData: %p, payloads: %p, payloadOffsets: %p is nullptr", __func__, pData, - payloads); - - uintptr_t startAddr = reinterpret_cast(pData); - for (int i = 0; i < payloadCount; i++) { - if (payloads[i].size <= 0) continue; - - int32_t offset = reinterpret_cast(payloads[i].data) - startAddr; - CheckAndLogError((offset > (dataSize - payloads[i].size) || offset < 0), false, - "@%s, error offset %d", __func__, offset); - payloadOffsets[i] = offset; - } - return 0; -} - -bool IPCIntelPGParam::getPayloadData(void* pData, int dataSize, int payloadCount, - const int32_t* payloadOffsets, ia_binary_data* payloads) { - CheckAndLogError(!pData || !payloads || !payloadOffsets, false, - "@%s, pData: %p, payloads: %p, payloadOffsets: %p is nullptr", __func__, pData, - payloads, payloadOffsets); - - unsigned char* startAddr = reinterpret_cast(pData); - for (int i = 0; i < payloadCount; i++) { - if (payloads[i].size <= 0) continue; - - CheckAndLogError(payloadOffsets[i] > dataSize - payloads[i].size, false, - "@%s, error offset %d", __func__, payloadOffsets[i]); - payloads[i].data = startAddr + payloadOffsets[i]; - } - return true; -} - -bool IPCIntelPGParam::clientFlattenEncode(void* pData, int dataSize, uintptr_t client, - unsigned int ipuParamSize, int32_t ipuParamHandle, - int32_t payloadCount, const ia_binary_data* payloads) { - CheckAndLogError(!pData || !payloads || dataSize < sizeof(pg_param_encode_params) || - payloadCount > IPU_MAX_TERMINAL_COUNT, - false, - "@%s, Wrong parameters, pData: %p, payloads: %p, dataSize: %d, count: %d", - __func__, pData, payloads, dataSize, payloadCount); - - pg_param_encode_params* params = static_cast(pData); - params->client = client; - params->ipuParamSize = ipuParamSize; - params->ipuParamHandle = ipuParamHandle; - params->payloadCount = payloadCount; - MEMCPY_S(params->payloads, sizeof(params->payloads), payloads, - sizeof(ia_binary_data) * payloadCount); - return true; -} - -bool IPCIntelPGParam::serverUnflattenEncode(void* pData, int dataSize, uintptr_t* client, - void* palDataAddr, ia_binary_data* ipuParameters, - int32_t* payloadCount, ia_binary_data** payloads) { - CheckAndLogError(!pData || !client || !ipuParameters || !palDataAddr || !payloadCount || - !payloads || dataSize < sizeof(pg_param_encode_params), - false, - "@%s, Wrong parameters, pData: %p, client: %p, ipuParameters: %p, " - "palDataAddr: %p, payloadCount: %p, payloads: %p, dataSize: %d", - __func__, pData, client, ipuParameters, palDataAddr, payloadCount, payloads, - dataSize); - - pg_param_encode_params* params = static_cast(pData); - *client = params->client; - ipuParameters->size = params->ipuParamSize; - ipuParameters->data = palDataAddr; - *payloadCount = params->payloadCount; - *payloads = params->payloads; - return true; -} - -bool IPCIntelPGParam::clientFlattenDecode(void* pData, int dataSize, uintptr_t client, - int32_t payloadCount, const ia_binary_data* payloads, - int32_t statsHandle) { - CheckAndLogError(!pData || !payloads || dataSize < sizeof(pg_param_decode_params) || - payloadCount > IPU_MAX_TERMINAL_COUNT, - false, - "@%s, Wrong parameters, pData: %p, payloads: %p, dataSize: %d, count: %d", - __func__, pData, payloads, dataSize, payloadCount); - - pg_param_decode_params* params = static_cast(pData); - params->client = client; - params->payloadCount = payloadCount; - MEMCPY_S(params->payloads, sizeof(params->payloads), payloads, - sizeof(ia_binary_data) * payloadCount); - params->clientStatsHandle = statsHandle; - return true; -} - -bool IPCIntelPGParam::serverUnflattenDecode(void* pData, int dataSize, uintptr_t* client, - int32_t* payloadCount, ia_binary_data** payloads) { - CheckAndLogError(!pData || !client || !payloadCount || !payloads || - dataSize < sizeof(pg_param_decode_params), - false, - "@%s, Wrong parameters, pData: %p, client: %p, payloadCount: %p, " - "payloads: %p, dataSize: %d", - __func__, pData, client, payloadCount, payloads, dataSize); - - pg_param_decode_params* params = static_cast(pData); - *client = params->client; - *payloadCount = params->payloadCount; - *payloads = params->payloads; - return true; -} - -bool IPCIntelPGParam::serverFlattenDecode(void* pData, int dataSize, - const ia_binary_data& statistics) { - CheckAndLogError(!pData || dataSize < sizeof(pg_param_decode_params), false, - "@%s, Wrong parameters, pData: %p, dataSize: %d", __func__, pData, dataSize); - pg_param_decode_params* params = static_cast(pData); - params->clientStatsSize = statistics.size; - return true; -} - -bool IPCIntelPGParam::clientUnflattenDecode(void* pData, int dataSize, ia_binary_data* statistics) { - CheckAndLogError(!pData || !statistics || dataSize < sizeof(pg_param_decode_params), false, - "@%s, Wrong parameters, pData: %p, statistics: %p, dataSize: %d", __func__, - pData, statistics, dataSize); - - pg_param_decode_params* params = static_cast(pData); - statistics->size = params->clientStatsSize; - return true; -} - -bool IPCIntelPGParam::clientFlattenDeinit(void* pData, int dataSize, uintptr_t client) { - CheckAndLogError(!pData || dataSize < sizeof(pg_param_deinit_params), false, - "@%s, Wrong parameters, pData: %p, dataSize: %d", __func__, pData, dataSize); - - pg_param_deinit_params* params = static_cast(pData); - params->client = client; - - return true; -} - -bool IPCIntelPGParam::serverUnflattenDeinit(const void* pData, int dataSize, uintptr_t* client) { - CheckAndLogError(!pData || !client || dataSize < sizeof(pg_param_deinit_params), false, - "@%s, Wrong parameters, pData: %p, client: %p, dataSize: %d", __func__, pData, - client, dataSize); - - const pg_param_deinit_params* params = static_cast(pData); - *client = params->client; - - return true; -} - -} // namespace icamera diff --git a/modules/sandboxing/IPCIntelPGParam.h b/modules/sandboxing/IPCIntelPGParam.h deleted file mode 100644 index 737e92a6..00000000 --- a/modules/sandboxing/IPCIntelPGParam.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (C) 2019-2020 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#include "modules/sandboxing/IPCCommon.h" -#include "src/core/psysprocessor/PGUtils.h" - -namespace icamera { - -#define MAX_PROCESS_GROUP_SIZE 8192 -#define MAX_PAL_SIZE 0x800000 // 8M -#define MAX_STATISTICS_SIZE MAX_IA_BINARY_DATA_SIZE - -struct pg_param_init_params { - int pgId; - uintptr_t client; - ia_p2p_platform_t platform; - PgConfiguration pgConfig; - unsigned char pgManifestData[MAX_PROCESS_GROUP_SIZE]; - int disableDataTermialsData[IPU_MAX_TERMINAL_COUNT]; - int disableDataTermialsCount; -}; - -struct pg_param_prepare_params { - uintptr_t client; - uint32_t ipuParamSize; - int32_t ipuParamHandle; - ia_css_rbm_t* rbm; - ia_css_rbm_t rbmData; - - // Output - ia_css_kernel_bitmap_t bitmapData; - uint32_t maxStatsSize; -}; - -// Shared memory: pg + struct -// as pg memory addr should be page size aligned -struct pg_param_allocate_pg_params { - uintptr_t client; - int pgSize; -}; - -struct pg_param_get_fragment_desc_params { - uintptr_t client; - int descCount; - - // Output - int returnCount; - ia_p2p_fragment_desc descsData[IPU_MAX_TERMINAL_COUNT * IA_P2P_MAX_FRAGMENTS]; -}; - -struct pg_param_prepare_program_params { - uintptr_t client; - - // Output - int payloadCount; - ia_binary_data payloads[IPU_MAX_TERMINAL_COUNT]; // save size of payloads -}; - -// Shared memory: payloads + struct -// as payload memory addr should be page size aligned -struct pg_param_register_payloads_params { - uintptr_t client; - int payloadCount; - ia_binary_data cPayloads[IPU_MAX_TERMINAL_COUNT]; // save payloads of client - ia_binary_data sPayloads[IPU_MAX_TERMINAL_COUNT]; // save payloads of server - - int32_t payloadOffsets[IPU_MAX_TERMINAL_COUNT]; -}; - -struct pg_param_encode_params { - uintptr_t client; - uint32_t ipuParamSize; - int32_t ipuParamHandle; - int32_t payloadCount; - ia_binary_data payloads[IPU_MAX_TERMINAL_COUNT]; // save payloads of client -}; - -struct pg_param_decode_params { - uintptr_t client; - int32_t payloadCount; - ia_binary_data payloads[IPU_MAX_TERMINAL_COUNT]; // save payloads of client - uint32_t clientStatsSize; - int32_t clientStatsHandle; - - // Output - uint32_t statsSize; -}; - -struct pg_param_deinit_params { - uintptr_t client; -}; - -class IPCIntelPGParam { - public: - IPCIntelPGParam() {} - virtual ~IPCIntelPGParam() {} - - bool clientFlattenInit(void* pData, int dataSize, int pgId, uintptr_t client, - ia_p2p_platform_t platform, const PgConfiguration& pgConfig); - bool serverUnflattenInit(void* pData, int dataSize, int* pgId, uintptr_t* client, - ia_p2p_platform_t* platform, PgConfiguration* pgConfig); - - bool clientFlattenPrepare(void* pData, int dataSize, uintptr_t client, - unsigned int ipuParamSize, int32_t ipuParamHandle, - const ia_css_rbm_t* rbm); - bool serverUnflattenPrepare(void* pData, int dataSize, uintptr_t* client, void* palDataAddr, - ia_binary_data* ipuParameters, ia_css_rbm_t** rbm, - ia_css_kernel_bitmap_t** bitmap, uint32_t** maxStatsSize); - bool clientUnflattenPrepare(const void* pData, int dataSize, ia_css_kernel_bitmap_t* bitmap, - uint32_t* maxStatsSize = nullptr); - - int getTotalPGBufferSize(int pgSize); - bool assignPGBuffer(void* pData, int dataSize, int pgSize, void** pgBuffer); - bool clientFlattenAllocatePGBuffer(void* pData, int dataSize, uintptr_t client, int pgSize); - bool serverUnflattenAllocatePGBuffer(const void* pData, int dataSize, uintptr_t* client, - int* pgSize); - - bool clientFlattenGetFragDescs(void* pData, int dataSize, uintptr_t client, int descCount); - bool serverUnflattenGetFragDescs(void* pData, int dataSize, uintptr_t* client, int* descCount, - ia_p2p_fragment_desc** descs); - bool serverFlattenGetFragDescs(void* pData, int dataSize, int count); - bool clientUnflattenGetFragDescs(const void* pData, int dataSize, int* count, - ia_p2p_fragment_desc* descs); - - bool clientFlattenPrepareProgram(void* pData, int dataSize, uintptr_t client); - bool serverUnflattenPrepareProgram(const void* pData, int dataSize, uintptr_t* client); - bool serverFlattenPrepareProgram(void* pData, int dataSize, int payloadCount, - const ia_binary_data* payloads); - bool clientUnflattenPrepareProgram(const void* pData, int dataSize, int* payloadCount, - ia_binary_data* payloads); - - int getTotalPayloadSize(int payloadCount, const ia_binary_data* payloads); - bool assignPayloads(void* pData, int dataSize, int payloadCount, ia_binary_data* payloads); - bool clientFlattenRegisterPayloads(void* pData, int dataSize, uintptr_t client, - int payloadCount, const ia_binary_data* payloads); - bool serverUnflattenRegisterPayloads(void* pData, int dataSize, uintptr_t* client, - int* payloadCount, ia_binary_data** cPayloads, - ia_binary_data** sPayloads); - - bool clientFlattenEncode(void* pData, int dataSize, uintptr_t client, unsigned int ipuParamSize, - int32_t ipuParamHandle, int32_t payloadCount, - const ia_binary_data* payloads); - bool serverUnflattenEncode(void* pData, int dataSize, uintptr_t* client, void* palDataAddr, - ia_binary_data* ipuParameters, int32_t* payloadCount, - ia_binary_data** payloads); - - bool clientFlattenDecode(void* pData, int dataSize, uintptr_t client, int32_t payloadCount, - const ia_binary_data* payloads, int32_t statsHandle); - bool serverUnflattenDecode(void* pData, int dataSize, uintptr_t* client, int32_t* payloadCount, - ia_binary_data** payloads); - bool serverFlattenDecode(void* pData, int dataSize, const ia_binary_data& statistics); - bool clientUnflattenDecode(void* pData, int dataSize, ia_binary_data* statistics); - - bool clientFlattenDeinit(void* pData, int dataSize, uintptr_t client); - bool serverUnflattenDeinit(const void* pData, int dataSize, uintptr_t* client); - - private: - bool getPayloadOffsets(const void* pData, int dataSize, int payloadCount, - const ia_binary_data* payloads, int32_t* payloadOffsets); - bool getPayloadData(void* pData, int dataSize, int payloadCount, const int32_t* payloadOffsets, - ia_binary_data* payloads); -}; - -} // namespace icamera diff --git a/modules/sandboxing/client/CMakeLists.txt b/modules/sandboxing/client/CMakeLists.txt deleted file mode 100644 index c4c1c477..00000000 --- a/modules/sandboxing/client/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (C) 2019-2021 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set(SANDBOXING_CLIENT_SRCS - ${SANDBOXING_DIR}/client/IntelAlgoClient.cpp - ${SANDBOXING_DIR}/client/IntelAlgoCommonClient.cpp - ${SANDBOXING_DIR}/client/IntelLard.cpp - ${SANDBOXING_DIR}/client/IntelFaceDetectionClient.cpp - ${SANDBOXING_DIR}/client/GraphConfigImplClient.cpp - ${SANDBOXING_DIR}/IPCCommon.cpp - ${SANDBOXING_DIR}/IPCIntelLard.cpp - ${SANDBOXING_DIR}/IPCIntelFD.cpp - ${SANDBOXING_DIR}/IPCGraphConfig.cpp - CACHE INTERNAL "sandboxing sources" - ) diff --git a/modules/sandboxing/client/GraphConfigImplClient.cpp b/modules/sandboxing/client/GraphConfigImplClient.cpp deleted file mode 100644 index d8878d15..00000000 --- a/modules/sandboxing/client/GraphConfigImplClient.cpp +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG GraphConfigImplClient - -#include "modules/sandboxing/client/GraphConfigImplClient.h" - -#include "iutils/CameraLog.h" - -using std::map; -using std::string; -using std::vector; - -namespace icamera { - -GraphConfigImpl::GraphConfigImpl() : mCameraId(-1), mInitialized(false) { - uintptr_t personal = reinterpret_cast(this); - std::string parseName = "/graphParse" + std::to_string(personal) + "Shm"; - - mMems = {{parseName.c_str(), sizeof(GraphParseParams), &mMemParse, false}}; - - bool success = mCommon.allocateAllShmMems(&mMems); - if (!success) { - mCommon.releaseAllShmMems(mMems); - return; - } - - mInitialized = true; - LOG1(" %s Construct done", mCameraId, __func__); -} - -GraphConfigImpl::GraphConfigImpl(int32_t camId, ConfigMode mode, GraphSettingType type) - : mCameraId(camId), - mConfigMode(mode), - mType(type), - mInitialized(false) { - uintptr_t personal = reinterpret_cast(this); - std::string queryGraphSettings = "/graphQueryGraph" + std::to_string(personal) + "Shm"; - std::string configStreamsName = "/graphConfigStreams" + std::to_string(personal) + "Shm"; - std::string getGraphDataName = "/graphGetData" + std::to_string(personal) + "Shm"; - std::string getPgIdName = "/graphGetPgId" + std::to_string(personal) + "Shm"; - std::string getConnection = "/graphGetConnection" + std::to_string(personal) + "Shm"; - - mMems = { - {queryGraphSettings.c_str(), sizeof(GraphQueryGraphParams), &mMemQueryGraphSettings, false}, - {configStreamsName.c_str(), sizeof(GraphConfigStreamParams), &mMemConfig, false}, - {getGraphDataName.c_str(), sizeof(GraphGetDataParams), &mMemGetData, false}, - {getPgIdName.c_str(), sizeof(GraphGetPgIdParams), &mMemGetPgId, false}, - {getConnection.c_str(), sizeof(GraphGetConnectionParams), &mMemGetConnection, false}}; - - bool success = mCommon.allocateAllShmMems(&mMems); - if (!success) { - mCommon.releaseAllShmMems(mMems); - return; - } - - mInitialized = true; - LOG1(" %s Construct done, configMode: %d, type %d", mCameraId, __func__, mConfigMode, - mType); -} - -GraphConfigImpl::~GraphConfigImpl() { - LOG1(" %s Destroy, configMode: %d, type %d", mCameraId, __func__, mConfigMode, mType); - - mInitialized = false; - mCommon.releaseAllShmMems(mMems); - mMems.clear(); -} - -void GraphConfigImpl::addCustomKeyMap() { - LOG1(" Add Custom KeyMap", mCameraId); - CheckAndLogError(!mInitialized, VOID_VALUE, "addCustomKeyMap mInitialized is false"); - - bool ret = mCommon.requestSync(IPC_GRAPH_ADD_KEY); - CheckAndLogError(!ret, VOID_VALUE, "addCustomKeyMap requestSync fails"); -} - -status_t GraphConfigImpl::parse(int cameraId, const char* graphDescFile, const char* settingsFile) { - LOG1(" Parse GD file %s and setting file %s", cameraId, graphDescFile, settingsFile); - CheckAndLogError(!mInitialized, UNKNOWN_ERROR, "parse mInitialized is false"); - - bool ret = mIpc.clientFlattenParse(mMemParse.mAddr, mMemParse.mSize, cameraId, graphDescFile, - settingsFile); - CheckAndLogError(!ret, UNKNOWN_ERROR, "clientFlattenParse fails"); - - status_t rt = mCommon.requestSync(IPC_GRAPH_PARSE, mMemParse.mHandle); - CheckAndLogError(!rt, UNKNOWN_ERROR, "parse requestSync fails"); - - return OK; -} - -void GraphConfigImpl::releaseGraphNodes() { - CheckAndLogError(!mInitialized, VOID_VALUE, "releaseGraphNodes mInitialized is false"); - - bool ret = mCommon.requestSync(IPC_GRAPH_RELEASE_NODES); - CheckAndLogError(!ret, VOID_VALUE, "releaseGraphNodes requestSync fails"); -} - -bool GraphConfigImpl::queryGraphSettings(const vector& activeStreams) { - CheckAndLogError(!mInitialized, false, "queryGraphSettings mInitialized is false"); - - GraphBaseInfo info = {mCameraId, mConfigMode}; - memset(mMemQueryGraphSettings.mAddr, 0, sizeof(GraphQueryGraphParams)); - bool ret = mIpc.clientFlattenConfigStreams(mMemQueryGraphSettings.mAddr, mMemConfig.mSize, info, - mType, false, activeStreams); - CheckAndLogError(!ret, false, "clientFlattenConfigStreams fails"); - - ret = mCommon.requestSync(IPC_GRAPH_QUERY_GRAPH_SETTINGS, mMemQueryGraphSettings.mHandle); - CheckAndLogError(!ret, false, "queryGraphSettings requestSync fails"); - - GraphQueryGraphParams* params = - static_cast(mMemQueryGraphSettings.mAddr); - return params->isHasGraphSettings; -} - -status_t GraphConfigImpl::configStreams(const vector& activeStreams, - bool dummyStillSink) { - LOG1(" %s, dummyStillSink: %d", mCameraId, __func__, dummyStillSink); - CheckAndLogError(!mInitialized, UNKNOWN_ERROR, "configStreams mInitialized is false"); - - GraphBaseInfo info = {mCameraId, mConfigMode}; - bool ret = mIpc.clientFlattenConfigStreams(mMemConfig.mAddr, mMemConfig.mSize, info, mType, - dummyStillSink, activeStreams); - CheckAndLogError(!ret, UNKNOWN_ERROR, "clientFlattenConfigStreams fails"); - - ret = mCommon.requestSync(IPC_GRAPH_CONFIG_STREAMS, mMemConfig.mHandle); - CheckAndLogError(!ret, UNKNOWN_ERROR, "configStreams requestSync fails"); - - return OK; -} - -status_t GraphConfigImpl::getGraphConfigData(IGraphType::GraphConfigData* data) { - CheckAndLogError(!mInitialized, UNKNOWN_ERROR, "getGraphConfigData mInitialized is false"); - - GraphBaseInfo info = {mCameraId, mConfigMode}; - bool ret = mIpc.clientFlattenGetGraphData(mMemGetData.mAddr, mMemGetData.mSize, info); - CheckAndLogError(!ret, UNKNOWN_ERROR, "clientFlattenGetGraphData fails"); - - ret = mCommon.requestSync(IPC_GRAPH_GET_CONFIG_DATA, mMemGetData.mHandle); - CheckAndLogError(!ret, UNKNOWN_ERROR, "getGraphConfigData requestSync fails"); - - ret = mIpc.clientUnflattenGetGraphData(mMemGetData.mAddr, mMemGetData.mSize, data); - CheckAndLogError(!ret, UNKNOWN_ERROR, "clientUnflattenGetGraphData fails"); - - return OK; -} - -status_t GraphConfigImpl::pipelineGetConnections( - const std::vector& pgList, std::vector* scalerInfo, - std::vector* confVector, - std::vector* tnrPortFormat) { - CheckAndLogError(!mInitialized, UNKNOWN_ERROR, "GetConnections mInitialized is false"); - - GraphBaseInfo info = {mCameraId, mConfigMode}; - bool ret = mIpc.clientFlattenGetConnection(mMemGetConnection.mAddr, mMemGetConnection.mSize, - info, pgList); - CheckAndLogError(!ret, UNKNOWN_ERROR, "clientFlattenGetConnection fails"); - - ret = mCommon.requestSync(IPC_GRAPH_GET_CONNECTION, mMemGetConnection.mHandle); - CheckAndLogError(!ret, UNKNOWN_ERROR, "GetConnections requestSync fails"); - - ret = mIpc.clientUnFlattenGetConnection(mMemGetConnection.mAddr, mMemGetConnection.mSize, - scalerInfo, confVector, tnrPortFormat); - CheckAndLogError(!ret, UNKNOWN_ERROR, "clientUnFlattenGetConnection fails"); - - return OK; -} - -status_t GraphConfigImpl::getPgIdForKernel(const uint32_t streamId, const int32_t kernelId, - int32_t* pgId) { - LOG1(" getPgIdForKernel stream %d, kernel %d", mCameraId, streamId, kernelId); - CheckAndLogError(!mInitialized, UNKNOWN_ERROR, "@%s, mInitialized is false", __func__); - - GraphBaseInfo info = {mCameraId, mConfigMode}; - bool ret = - mIpc.clientFlattenGetPgId(mMemGetPgId.mAddr, mMemGetPgId.mSize, info, streamId, kernelId); - CheckAndLogError(!ret, UNKNOWN_ERROR, "clientFlattenGetPgId fails"); - - ret = mCommon.requestSync(IPC_GRAPH_GET_PG_ID, mMemGetPgId.mHandle); - CheckAndLogError(!ret, UNKNOWN_ERROR, "getPgId requestSync fails"); - - ret = mIpc.clientUnFlattenGetPgId(mMemGetPgId.mAddr, mMemGetPgId.mSize, pgId); - CheckAndLogError(!ret, UNKNOWN_ERROR, "clientUnFlattenGetPgId fails"); - - return OK; -} -} // namespace icamera diff --git a/modules/sandboxing/client/GraphConfigImplClient.h b/modules/sandboxing/client/GraphConfigImplClient.h deleted file mode 100644 index 1ae8df16..00000000 --- a/modules/sandboxing/client/GraphConfigImplClient.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include -#include -#include - -#include "IntelAlgoCommonClient.h" -#include "iutils/Errors.h" -#include "iutils/Thread.h" -#include "iutils/Utils.h" -#include "modules/sandboxing/IPCGraphConfig.h" -#include "src/platformdata/CameraTypes.h" -#include "src/platformdata/gc/HalStream.h" -#include "src/platformdata/gc/IGraphConfig.h" - -namespace icamera { - -class GraphConfigImpl { - public: - GraphConfigImpl(); - GraphConfigImpl(int32_t camId, ConfigMode mode, GraphSettingType type); - virtual ~GraphConfigImpl(); - - void addCustomKeyMap(); - status_t parse(int cameraId, const char* graphDescFile, const char* settingsFile); - void releaseGraphNodes(); - - bool queryGraphSettings(const std::vector& activeStreams); - status_t configStreams(const std::vector& activeStreams, bool dummyStillSink); - status_t getGraphConfigData(IGraphType::GraphConfigData* data); - status_t getPgIdForKernel(const uint32_t streamId, const int32_t kernelId, int32_t* pgId); - - status_t pipelineGetConnections(const std::vector& pgList, - std::vector* scalerInfo, - std::vector* confVector, - std::vector* tnrPortFormat); - - private: - IPCGraphConfig mIpc; - IntelAlgoCommon mCommon; - - ShmMemInfo mMemParse; - ShmMemInfo mMemQueryGraphSettings; - ShmMemInfo mMemConfig; - ShmMemInfo mMemGetData; - ShmMemInfo mMemGetPgId; - ShmMemInfo mMemGetConnection; - - std::vector mMems; - - int mCameraId; - ConfigMode mConfigMode; - GraphSettingType mType; - bool mInitialized; - - // Disable copy constructor and assignment operator - DISALLOW_COPY_AND_ASSIGN(GraphConfigImpl); -}; -} // namespace icamera diff --git a/modules/sandboxing/client/IntelAlgoClient.cpp b/modules/sandboxing/client/IntelAlgoClient.cpp deleted file mode 100644 index 602f70d5..00000000 --- a/modules/sandboxing/client/IntelAlgoClient.cpp +++ /dev/null @@ -1,447 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelAlgoClient - -#include "modules/sandboxing/client/IntelAlgoClient.h" - -#include -#include -#include -#include - -#include -#include -#include - -#include "Parameters.h" -#include "PlatformData.h" -#include "iutils/Errors.h" -#include "iutils/Utils.h" -#include "modules/sandboxing/client/IntelCcaClient.h" - -namespace icamera { - -IntelAlgoClient* IntelAlgoClient::sInstance = nullptr; -Mutex IntelAlgoClient::sLock; - -IntelAlgoClient* IntelAlgoClient::getInstance() { - AutoMutex lock(sLock); - - if (!sInstance) { - sInstance = new IntelAlgoClient; - } - - return sInstance; -} - -void IntelAlgoClient::releaseInstance() { - AutoMutex lock(sLock); - - icamera::IntelCca::releaseAllInstances(); - - if (sInstance) { - delete sInstance; - sInstance = nullptr; - } -} - -IntelAlgoClient::IntelAlgoClient() - : mErrCb(nullptr), - mGpuBridge(nullptr), - mIPCStatus(true), - mMojoManagerToken(nullptr), - mInitialized(false) { - LOG1("%s, Construct", __func__); -} - -IntelAlgoClient::~IntelAlgoClient() { - LOG1("%s, Destroy", __func__); -} - -int IntelAlgoClient::initialize() { - LOG1("@%s, mMojoManagerToken: %p", __func__, mMojoManagerToken); - CheckAndLogError(!mMojoManagerToken, UNKNOWN_ERROR, "@%s, mMojoManagerToken is nullptr", - __func__); - - mCallback = base::Bind(&IntelAlgoClient::callbackHandler, base::Unretained(this)); - IntelAlgoClient::return_callback = returnCallback; - - mNotifyCallback = base::Bind(&IntelAlgoClient::notifyHandler, base::Unretained(this)); - IntelAlgoClient::notify = notifyCallback; - - mBridge = cros::CameraAlgorithmBridge::CreateInstance(cros::CameraAlgorithmBackend::kVendorCpu, - mMojoManagerToken); - CheckAndLogError(!mBridge, UNKNOWN_ERROR, "@%s, mBridge is nullptr", __func__); - CheckAndLogError(mBridge->Initialize(this) != 0, UNKNOWN_ERROR, "@%s, mBridge init fails", - __func__); - - if (PlatformData::isUsingGpuAlgo()) { - LOG1("GPU algo enabled"); - mGpuBridge = cros::CameraAlgorithmBridge::CreateInstance( - cros::CameraAlgorithmBackend::kVendorGpu, mMojoManagerToken); - CheckAndLogError(!mGpuBridge, UNKNOWN_ERROR, "mGpuBridge is nullptr"); - CheckAndLogError(mGpuBridge->Initialize(this) != 0, UNKNOWN_ERROR, "mGpuBridge init fails"); - } - - for (int i = 0; i < IPC_GROUP_NUM; i++) { - if (static_cast(i) < IPC_GROUP_GPU) { - mRunner[i] = - std::unique_ptr(new Runner(static_cast(i), mBridge.get())); - } else if (mGpuBridge) { - mRunner[i] = - std::unique_ptr(new Runner(static_cast(i), mGpuBridge.get())); - } - } - - mIPCStatus = true; - mInitialized = true; - - return OK; -} - -bool IntelAlgoClient::isIPCFine() { - std::lock_guard l(mIPCStatusMutex); - - return mIPCStatus; -} - -void IntelAlgoClient::registerErrorCallback(const camera_callback_ops_t* errCb) { - LOG1("@%s, errCb:%p", __func__, errCb); - - std::lock_guard l(mIPCStatusMutex); - mErrCb = errCb; - - if (!mIPCStatus && mErrCb) { - camera_msg_data_t data = {CAMERA_IPC_ERROR, {}}; - mErrCb->notify(mErrCb, data); - } -} - -int IntelAlgoClient::allocateShmMem(const std::string& name, int size, int* fd, void** addr) { - *fd = -1; - *addr = nullptr; - int shmFd = -1; - void* shmAddr = nullptr; - - shmFd = shm_open(name.c_str(), O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); - CheckAndLogError((shmFd == -1), UNKNOWN_ERROR, "call shm_open fail"); - - do { - int ret = fcntl(shmFd, F_GETFD); - if (ret == -1) { - LOGE("call fcntl fail, error %s", strerror(errno)); - break; - } - - ret = ftruncate(shmFd, size); - if (ret == -1) { - LOGE("call ftruncate fail, error %s", strerror(errno)); - break; - } - - struct stat sb; - ret = fstat(shmFd, &sb); - if (ret == -1) { - LOGE("call fstat fail, error %s", strerror(errno)); - break; - } - - shmAddr = mmap(0, sb.st_size, PROT_WRITE, MAP_SHARED, shmFd, 0); - if (!shmAddr) { - LOGE("call mmap fail, error %s", strerror(errno)); - break; - } - - *fd = shmFd; - *addr = shmAddr; - - return OK; - } while (0); - - close(shmFd); - return UNKNOWN_ERROR; -} - -void IntelAlgoClient::releaseShmMem(const std::string& name, int size, int fd, void* addr) { - munmap(addr, size); - close(fd); - shm_unlink(name.c_str()); -} - -int IntelAlgoClient::requestSync(IPC_CMD cmd, int32_t bufferHandle) { - LOG2("requestSync cmd:%d:%s, bufferHandle:%d, mInitialized:%d", cmd, - IntelAlgoIpcCmdToString(cmd), bufferHandle, mInitialized); - CheckAndLogError(!mInitialized, UNKNOWN_ERROR, " mInitialized is false"); - CheckAndLogError(!isIPCFine(), UNKNOWN_ERROR, "IPC error happens"); - - IPC_GROUP group = IntelAlgoIpcCmdToGroup(cmd); - - return mRunner[group]->requestSync(cmd, bufferHandle); -} - -int IntelAlgoClient::requestSync(IPC_CMD cmd) { - return requestSync(cmd, -1); -} - -int32_t IntelAlgoClient::registerBuffer(int bufferFd, void* addr, ShmMemUsage usage) { - LOG2("%s bufferFd: %d, mInitialized: %d, addr: %p, usage: %d", __func__, bufferFd, mInitialized, - addr, usage); - CheckAndLogError(!mInitialized, -1, "mInitialized is false"); - CheckAndLogError(usage >= MAX_ALGO_SHM, -1, "usage: %d isn't supported", usage); - CheckAndLogError(!isIPCFine(), -1, "IPC error happens"); - - int32_t handle = -1; - if (usage == CPU_ALGO_SHM) { - handle = mBridge->RegisterBuffer(bufferFd); - } else if (mGpuBridge) { - handle = mGpuBridge->RegisterBuffer(bufferFd); - } - if (handle >= 0) { - std::lock_guard l(mShmMapMutex); - mShmMap[usage][addr] = handle; - } - - return handle; -} - -void IntelAlgoClient::deregisterBuffer(int32_t bufferHandle, ShmMemUsage usage) { - LOG2("%s, bufferHandle: %d, mInitialized: %d, usage: %d", __func__, bufferHandle, mInitialized, - usage); - CheckAndLogError(!mInitialized, VOID_VALUE, "mInitialized is false"); - CheckAndLogError(usage >= MAX_ALGO_SHM, VOID_VALUE, "usage: %d isn't supported", usage); - CheckAndLogError(!isIPCFine(), VOID_VALUE, "IPC error happens"); - - { - std::lock_guard l(mShmMapMutex); - for (auto& item : mShmMap[usage]) { - if (item.second == bufferHandle) { - mShmMap[usage].erase(item.first); - break; - } - } - } - - std::vector handles({bufferHandle}); - if (usage == CPU_ALGO_SHM) { - mBridge->DeregisterBuffers(handles); - } else if (mGpuBridge) { - mGpuBridge->DeregisterBuffers(handles); - } -} - -int32_t IntelAlgoClient::registerGbmBuffer(int bufferFd, ShmMemUsage usage) { - LOG2("%s bufferFd:%d, mInitialized:%d, usage:%d", __func__, bufferFd, mInitialized, usage); - CheckAndLogError(!mInitialized, -1, "mInitialized is false"); - CheckAndLogError(!isIPCFine(), -1, "IPC error happens"); - CheckAndLogError(usage >= MAX_ALGO_SHM, -1, "usage: %d isn't supported", usage); - - if (usage == CPU_ALGO_SHM) { - return mBridge->RegisterBuffer(bufferFd); - } else if (mGpuBridge) { - return mGpuBridge->RegisterBuffer(bufferFd); - } - return OK; -} - -void IntelAlgoClient::deregisterGbmBuffer(int32_t bufferHandle, ShmMemUsage usage) { - LOG1("%s bufferHandle:%d, mInitialized:%d, usage:%d", __func__, bufferHandle, mInitialized, - usage); - CheckAndLogError(!mInitialized, VOID_VALUE, "mInitialized is false"); - CheckAndLogError(!isIPCFine(), VOID_VALUE, "IPC error happens"); - CheckAndLogError(usage >= MAX_ALGO_SHM, VOID_VALUE, "usage: %d isn't supported", usage); - - std::vector handles({bufferHandle}); - if (usage == CPU_ALGO_SHM) { - mBridge->DeregisterBuffers(handles); - } else if (mGpuBridge) { - mGpuBridge->DeregisterBuffers(handles); - } -} - -int32_t IntelAlgoClient::getBufferHandle(void* addr, ShmMemUsage usage) { - CheckAndLogError(!mInitialized, -1, "mInitialized is false"); - CheckAndLogError(usage >= MAX_ALGO_SHM, -1, "usage: %d isn't supported", usage); - if (!addr) return -1; - - LOG2("the buffer addr: %p, usage: %d", addr, usage); - std::lock_guard l(mShmMapMutex); - CheckAndLogError(mShmMap[usage].find(addr) == mShmMap[usage].end(), -1, - "%s, Invalid client addr: %p, usage: %d", __func__, addr, usage); - - return mShmMap[usage][addr]; -} - -void IntelAlgoClient::callbackHandler(uint32_t req_id, uint32_t status, int32_t buffer_handle) { - IPC_GROUP group = IntelAlgoIpcCmdToGroup(static_cast(req_id)); - mRunner[group]->callbackHandler(status, buffer_handle); -} - -void IntelAlgoClient::notifyHandler(uint32_t msg) { - if (msg != CAMERA_ALGORITHM_MSG_IPC_ERROR) { - LOGE("receive msg:%d, not CAMERA_ALGORITHM_MSG_IPC_ERROR", msg); - return; - } - - std::lock_guard l(mIPCStatusMutex); - mIPCStatus = false; - - if (mErrCb) { - camera_msg_data_t data = {CAMERA_IPC_ERROR, {}}; - mErrCb->notify(mErrCb, data); - } else { - LOGE("mErrCb is nullptr, no device error is sent out"); - } - LOGE("receive CAMERA_ALGORITHM_MSG_IPC_ERROR"); -} - -void IntelAlgoClient::returnCallback(const camera_algorithm_callback_ops_t* callback_ops, - uint32_t req_id, uint32_t status, int32_t buffer_handle) { - CheckAndLogError(!callback_ops, VOID_VALUE, "callback_ops is nullptr"); - - auto s = const_cast(static_cast(callback_ops)); - s->callbackHandler(req_id, status, buffer_handle); -} - -void IntelAlgoClient::notifyCallback(const struct camera_algorithm_callback_ops* callback_ops, - camera_algorithm_error_msg_code_t msg) { - CheckAndLogError(!callback_ops, VOID_VALUE, "callback_ops is nullptr"); - - auto s = const_cast(static_cast(callback_ops)); - s->notifyHandler((uint32_t)msg); -} - -IntelAlgoClient::Runner::Runner(IPC_GROUP group, cros::CameraAlgorithmBridge* bridge) - : mGroup(group), - mBridge(bridge), - mIsCallbacked(false), - mCbStatus(OK), - mInitialized(false) { - LOG1("Runner Construct group:%d", mGroup); - - pthread_condattr_t attr; - int ret = pthread_condattr_init(&attr); - if (ret != 0) { - LOGE("call pthread_condattr_init fails, ret:%d", ret); - pthread_condattr_destroy(&attr); - return; - } - - ret = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); - if (ret != 0) { - LOGE("call pthread_condattr_setclock fails, ret:%d", ret); - pthread_condattr_destroy(&attr); - return; - } - - ret = pthread_cond_init(&mCbCond, &attr); - if (ret != 0) { - LOGE("call pthread_cond_init fails, ret:%d", ret); - pthread_condattr_destroy(&attr); - return; - } - - pthread_condattr_destroy(&attr); - - ret = pthread_mutex_init(&mCbLock, nullptr); - CheckAndLogError(ret != 0, VOID_VALUE, "call pthread_mutex_init fails, ret:%d", ret); - - mInitialized = true; -} - -IntelAlgoClient::Runner::~Runner() { - LOG1("Runner Destroy, group:%d", mGroup); - - int ret = pthread_cond_destroy(&mCbCond); - if (ret != 0) { - LOGE("call pthread_cond_destroy fails, ret:%d", ret); - } - - ret = pthread_mutex_destroy(&mCbLock); - if (ret != 0) { - LOGE("call pthread_mutex_destroy fails, ret:%d", ret); - } -} - -int IntelAlgoClient::Runner::requestSync(IPC_CMD cmd, int32_t bufferHandle) { - CheckAndLogError(!mInitialized, UNKNOWN_ERROR, "mInitialized is false, cmd:%d:%s", cmd, - IntelAlgoIpcCmdToString(cmd)); - - std::lock_guard lck(mMutex); - - std::vector reqHeader(IPC_REQUEST_HEADER_USED_NUM); - reqHeader[0] = IPC_MATCHING_KEY; - - // cmd is for request id, no duplicate command will be issued at any given time. - mBridge->Request(cmd, reqHeader, bufferHandle); - int ret = waitCallback(); - CheckAndLogError((ret != OK), UNKNOWN_ERROR, "waitCallback fails, cmd:%d:%s", cmd, - IntelAlgoIpcCmdToString(cmd)); - - // check callback result - CheckAndLogError((mCbStatus != OK && mCbStatus != ia_err_not_run), mCbStatus, - "callback fails, cmd:%d:%s, mCbStatus:%d", cmd, IntelAlgoIpcCmdToString(cmd), - mCbStatus); - - return mCbStatus; -} - -void IntelAlgoClient::Runner::callbackHandler(uint32_t status, int32_t buffer_handle) { - if (status != 0 && status != ia_err_not_run) { - LOGE("Runner callbackHandler group:%d, status:%d, buffer_handle:%d", mGroup, status, - buffer_handle); - } - mCbStatus = status; - - pthread_mutex_lock(&mCbLock); - mIsCallbacked = true; - int ret = pthread_cond_signal(&mCbCond); - pthread_mutex_unlock(&mCbLock); - - CheckAndLogError(ret != 0, VOID_VALUE, "group:%d, call pthread_cond_signal fails, ret:%d", - mGroup, ret); -} - -int IntelAlgoClient::Runner::waitCallback() { - nsecs_t startTime = CameraUtils::systemTime(); - - pthread_mutex_lock(&mCbLock); - if (!mIsCallbacked) { - int ret = 0; - struct timespec ts = {0, 0}; - clock_gettime(CLOCK_MONOTONIC, &ts); - ts.tv_sec += 5; // 5s timeout - - while (!mIsCallbacked && !ret) { - ret = pthread_cond_timedwait(&mCbCond, &mCbLock, &ts); - } - if (ret != 0) { - LOGE("%s, group:%d, call pthread_cond_timedwait fail, ret:%d, it takes %" PRId64 " ms", - __func__, mGroup, ret, (CameraUtils::systemTime() - startTime) / 1000000); - pthread_mutex_unlock(&mCbLock); - return UNKNOWN_ERROR; - } - } - mIsCallbacked = false; - pthread_mutex_unlock(&mCbLock); - - LOG2("%s, group:%d IPC call takes %" PRId64 " ms", __func__, mGroup, - (CameraUtils::systemTime() - startTime) / 1000000); - - return OK; -} - -} /* namespace icamera */ diff --git a/modules/sandboxing/client/IntelAlgoClient.h b/modules/sandboxing/client/IntelAlgoClient.h deleted file mode 100644 index 28bcfb79..00000000 --- a/modules/sandboxing/client/IntelAlgoClient.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#include -#include -#include -#include - -#include "CameraLog.h" -#include "Parameters.h" -#include "base/bind.h" -#include "base/callback.h" -#include "cros-camera/camera_algorithm_bridge.h" -#include "iutils/Thread.h" -#include "modules/sandboxing/IPCCommon.h" - -namespace icamera { - -typedef enum { - CPU_ALGO_SHM, - GPU_ALGO_SHM, - MAX_ALGO_SHM, -} ShmMemUsage; - -class IntelAlgoClient : public camera_algorithm_callback_ops_t { - public: - static IntelAlgoClient* getInstance(); - static void releaseInstance(); - - IntelAlgoClient(); - virtual ~IntelAlgoClient(); - - void setMojoManagerToken(cros::CameraMojoChannelManagerToken* token) { - mMojoManagerToken = token; - } - - // Connect to the algo processes(cpu and gpu) - // It must be called after all preparation are ready in camera service - int initialize(); - - bool isIPCFine(); - - // when IPC error happens, device error - // will be sent out via the camera_callback_ops_t which belongs to CameraHal. - // before the CameraHal be terminated, set nullptr in the function. - void registerErrorCallback(const camera_callback_ops_t* errCb); - - int allocateShmMem(const std::string& name, int size, int* fd, void** addr); - void releaseShmMem(const std::string& name, int size, int fd, void* addr); - - int requestSync(IPC_CMD cmd, int32_t bufferHandle); - int requestSync(IPC_CMD cmd); - - int32_t registerBuffer(int bufferFd, void* addr, ShmMemUsage usage = CPU_ALGO_SHM); - void deregisterBuffer(int32_t bufferHandle, ShmMemUsage usage = CPU_ALGO_SHM); - int32_t registerGbmBuffer(int bufferFd, ShmMemUsage usage = CPU_ALGO_SHM); - void deregisterGbmBuffer(int32_t bufferHandle, ShmMemUsage usage = CPU_ALGO_SHM); - int32_t getBufferHandle(void* addr, ShmMemUsage usage = CPU_ALGO_SHM); - - private: - int waitCallback(); - - void callbackHandler(uint32_t req_id, uint32_t status, int32_t buffer_handle); - void notifyHandler(uint32_t msg); - - // when the request is done, the callback will be received. - static void returnCallback(const camera_algorithm_callback_ops_t* callback_ops, uint32_t req_id, - uint32_t status, int32_t buffer_handle); - // when IPC error happens in the bridge, notifyCallback will be called. - static void notifyCallback(const struct camera_algorithm_callback_ops* callback_ops, - camera_algorithm_error_msg_code_t msg); - - private: - /* - * Get access to the IntelAlgoClient singleton. - */ - static IntelAlgoClient* sInstance; - static Mutex sLock; // Guard for singleton creation. - - const camera_callback_ops_t* mErrCb; - - std::unique_ptr mBridge; - std::unique_ptr mGpuBridge; - - base::Callback mCallback; - base::Callback mNotifyCallback; - bool mIPCStatus; // true: no error happens, false: error happens - std::mutex mIPCStatusMutex; // the mutex for mIPCStatus - - // - std::unordered_map mShmMap[MAX_ALGO_SHM]; - std::mutex mShmMapMutex; // the mutex for mShmMap - - cros::CameraMojoChannelManagerToken* mMojoManagerToken; - bool mInitialized; - - private: - class Runner { - public: - Runner(IPC_GROUP group, cros::CameraAlgorithmBridge* bridge); - virtual ~Runner(); - int requestSync(IPC_CMD cmd, int32_t bufferHandle); - void callbackHandler(uint32_t status, int32_t buffer_handle); - - private: - int waitCallback(); - - private: - IPC_GROUP mGroup; - cros::CameraAlgorithmBridge* mBridge; - pthread_mutex_t mCbLock; - pthread_cond_t mCbCond; - bool mIsCallbacked; - int mCbStatus; - - bool mInitialized; - - std::mutex mMutex; // the mutex for the public method - }; - - std::unique_ptr mRunner[IPC_GROUP_NUM]; -}; - -} /* namespace icamera */ diff --git a/modules/sandboxing/client/IntelAlgoCommonClient.cpp b/modules/sandboxing/client/IntelAlgoCommonClient.cpp deleted file mode 100644 index a4e3a46c..00000000 --- a/modules/sandboxing/client/IntelAlgoCommonClient.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelAlgoCommonClient - -#include "modules/sandboxing/client/IntelAlgoCommonClient.h" - -#include -#include - -#include "CameraLog.h" -#include "PlatformData.h" - -namespace icamera { -IntelAlgoCommon::IntelAlgoCommon() { - mClient = IntelAlgoClient::getInstance(); - LOG1("@%s, Construct, mClient:%p", __func__, mClient); -} - -IntelAlgoCommon::~IntelAlgoCommon() { - LOG1("@%s Destroy", __func__); -} - -bool IntelAlgoCommon::allocShmMem(const std::string& name, int size, ShmMemInfo* shm, - ShmMemUsage usage) { - CheckAndLogError(mClient == nullptr, false, "@%s, mClient is nullptr", __func__); - - shm->mName = name; - shm->mSize = size; - int ret = mClient->allocateShmMem(shm->mName, shm->mSize, &shm->mFd, &shm->mAddr); - CheckAndLogError((ret != OK), false, "@%s, call allocateShmMem fail", __func__); - - shm->mHandle = mClient->registerBuffer(shm->mFd, shm->mAddr, usage); - if (shm->mHandle < 0) { - LOGE("@%s, call mBridge->RegisterBuffer fail", __func__); - mClient->releaseShmMem(shm->mName, shm->mSize, shm->mFd, shm->mAddr); - return false; - } - - return true; -} - -int32_t IntelAlgoCommon::registerGbmBuffer(int bufferFd, ShmMemUsage usage) { - CheckAndLogError(mClient == nullptr, -1, "@%s, mClient is nullptr", __func__); - - return mClient->registerGbmBuffer(bufferFd, usage); -} - -void IntelAlgoCommon::deregisterGbmBuffer(int32_t bufferHandle, ShmMemUsage usage) { - CheckAndLogError(mClient == nullptr, VOID_VALUE, "@%s, mClient is nullptr", __func__); - - mClient->deregisterGbmBuffer(bufferHandle, usage); -} - -bool IntelAlgoCommon::requestSync(IPC_CMD cmd, int32_t handle) { - CheckAndLogError(mClient == nullptr, false, "@%s, mClient is nullptr", __func__); - - return mClient->requestSync(cmd, handle) == OK ? true : false; -} - -bool IntelAlgoCommon::requestSync(IPC_CMD cmd) { - CheckAndLogError(mClient == nullptr, false, "@%s, mClient is nullptr", __func__); - - return mClient->requestSync(cmd) == OK ? true : false; -} - -ia_err IntelAlgoCommon::requestSyncCca(IPC_CMD cmd, int32_t handle) { - CheckAndLogError(mClient == nullptr, ia_err_argument, "@%s, mClient is nullptr", __func__); - - return (ia_err)(mClient->requestSync(cmd, handle)); -} - -ia_err IntelAlgoCommon::requestSyncCca(IPC_CMD cmd) { - CheckAndLogError(mClient == nullptr, ia_err_argument, "@%s, mClient is nullptr", __func__); - - return (ia_err)(mClient->requestSync(cmd)); -} - -void IntelAlgoCommon::freeShmMem(const ShmMemInfo& shm, ShmMemUsage usage) { - CheckAndLogError(mClient == nullptr, VOID_VALUE, "@%s, mClient is nullptr", __func__); - if (shm.mHandle < 0 || shm.mFd < 0) { - LOGE("@%s, mHandle:%d, mFd:%d, one of them < 0", __func__, shm.mHandle, shm.mFd); - return; - } - - mClient->deregisterBuffer(shm.mHandle, usage); - mClient->releaseShmMem(shm.mName, shm.mSize, shm.mFd, shm.mAddr); -} - -bool IntelAlgoCommon::allocateAllShmMems(std::vector* mems) { - for (auto& it : *mems) { - ShmMemInfo* mem = it.mem; - mem->mName = it.name; - mem->mSize = it.size; - bool ret = allocShmMem(mem->mName, mem->mSize, mem); - CheckAndLogError(!ret, false, "@%s, allocShmMem fails, name:%s, size:%d", __func__, - mem->mName.c_str(), mem->mSize); - it.allocated = true; - } - - return true; -} - -void IntelAlgoCommon::releaseAllShmMems(const std::vector& mems) { - for (auto& it : mems) { - if (it.allocated) { - freeShmMem(*it.mem); - } - } -} - -int32_t IntelAlgoCommon::getShmMemHandle(void* addr, ShmMemUsage usage) { - CheckAndLogError(mClient == nullptr, -1, "@%s, mClient is nullptr", __func__); - return mClient->getBufferHandle(addr, usage); -} - -} /* namespace icamera */ diff --git a/modules/sandboxing/client/IntelAlgoCommonClient.h b/modules/sandboxing/client/IntelAlgoCommonClient.h deleted file mode 100644 index a127352b..00000000 --- a/modules/sandboxing/client/IntelAlgoCommonClient.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include "IntelAlgoClient.h" - -namespace icamera { -typedef struct ShmMemInfo { - std::string mName; - int mSize; - int mFd; - void* mAddr; - int32_t mHandle; - ShmMemInfo() : mName(""), mSize(0), mFd(-1), mAddr(nullptr), mHandle(-1) {} -} ShmMemInfo; - -typedef struct ShmMem { - std::string name; - int size; - ShmMemInfo* mem; - bool allocated; -} ShmMem; - -class IntelAlgoCommon { - public: - IntelAlgoCommon(); - virtual ~IntelAlgoCommon(); - - bool allocShmMem(const std::string& name, int size, ShmMemInfo* shm, - ShmMemUsage usage = CPU_ALGO_SHM); - int32_t registerGbmBuffer(int bufferFd, ShmMemUsage usage = CPU_ALGO_SHM); - void deregisterGbmBuffer(int32_t bufferHandle, ShmMemUsage usage = CPU_ALGO_SHM); - bool requestSync(IPC_CMD cmd, int32_t handle); - bool requestSync(IPC_CMD cmd); - ia_err requestSyncCca(IPC_CMD cmd, int32_t handle); - ia_err requestSyncCca(IPC_CMD cmd); - void freeShmMem(const ShmMemInfo& shm, ShmMemUsage usage = CPU_ALGO_SHM); - - bool allocateAllShmMems(std::vector* mems); - void releaseAllShmMems(const std::vector& mems); - - int32_t getShmMemHandle(void* addr, ShmMemUsage usage = CPU_ALGO_SHM); - - private: - IntelAlgoClient* mClient; -}; - -} /* namespace icamera */ diff --git a/modules/sandboxing/client/IntelCcaClient.cpp b/modules/sandboxing/client/IntelCcaClient.cpp deleted file mode 100644 index e5e4bf83..00000000 --- a/modules/sandboxing/client/IntelCcaClient.cpp +++ /dev/null @@ -1,520 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelCcaClient - -#include "modules/sandboxing/client/IntelCcaClient.h" - -#include - -#include "iutils/CameraLog.h" -#include "iutils/Utils.h" - -namespace icamera { - -std::vector IntelCca::sCcaInstance; -Mutex IntelCca::sLock; - -IntelCca* IntelCca::getInstance(int cameraId, TuningMode mode) { - AutoMutex lock(sLock); - for (auto& it : sCcaInstance) { - if (cameraId == it.cameraId) { - if (it.ccaHandle.find(mode) == it.ccaHandle.end()) { - it.ccaHandle[mode] = new IntelCca(cameraId, mode); - } - - return it.ccaHandle[mode]; - } - } - - IntelCca::CCAHandle handle = {}; - handle.cameraId = cameraId; - handle.ccaHandle[mode] = new IntelCca(cameraId, mode); - sCcaInstance.push_back(handle); - - return handle.ccaHandle[mode]; -} - -void IntelCca::releaseInstance(int cameraId, TuningMode mode) { - AutoMutex lock(sLock); - for (auto& it : sCcaInstance) { - if (cameraId == it.cameraId && it.ccaHandle.find(mode) != it.ccaHandle.end()) { - IntelCca* cca = it.ccaHandle[mode]; - it.ccaHandle.erase(mode); - delete cca; - } - } -} - -void IntelCca::releaseAllInstances() { - AutoMutex lock(sLock); - - for (auto& it : sCcaInstance) { - for (auto& oneCcaHandle : it.ccaHandle) { - IntelCca* intelCca = oneCcaHandle.second; - delete intelCca; - } - it.ccaHandle.clear(); - } -} - -IntelCca::IntelCca(int cameraId, TuningMode mode) : mCameraId(cameraId), mTuningMode(mode) { - LOG1(" @%s, tuningMode:%d", cameraId, __func__, mode); - - std::string number = std::to_string(cameraId) + std::to_string(mode) + - std::to_string(reinterpret_cast(this)); - std::string structName = "/ccaStruct" + number + SHM_NAME; - std::string initName = "/ccaInit" + number + SHM_NAME; - std::string statsName = "/ccaStats" + number + SHM_NAME; - std::string aecName = "/ccaAec" + number + SHM_NAME; - std::string aiqName = "/ccaAiq" + number + SHM_NAME; - std::string ltmName = "/ccaLtm" + number + SHM_NAME; - std::string zoomName = "/ccaZoom" + number + SHM_NAME; - std::string dvsName = "/ccaDvs" + number + SHM_NAME; - std::string aicName = "/ccaAic" + number + SHM_NAME; - std::string cmcName = "/ccaCmc" + number + SHM_NAME; - std::string mknName = "/ccaMkn" + number + SHM_NAME; - std::string aiqdName = "/ccaAiqd" + number + SHM_NAME; - std::string tuningName = "/ccaTuning" + number + SHM_NAME; - std::string deinitName = "/ccaDeinit" + number + SHM_NAME; - std::string decodeStatsName = "/ccaDecodeStats" + number + SHM_NAME; - std::string palSizeName = "/ccaPalSize" + number + SHM_NAME; - - mMems = { - {structName.c_str(), sizeof(intel_cca_struct_data), &mMemStruct, false}, - {initName.c_str(), sizeof(intel_cca_init_data), &mMemInit, false}, - {statsName.c_str(), sizeof(intel_cca_set_stats_data), &mMemStats, false}, - {aecName.c_str(), sizeof(intel_cca_run_aec_data), &mMemAEC, false}, - {aiqName.c_str(), sizeof(intel_cca_run_aiq_data), &mMemAIQ, false}, - {ltmName.c_str(), sizeof(intel_cca_run_ltm_data), &mMemLTM, false}, - {zoomName.c_str(), sizeof(intel_cca_update_zoom_data), &mMemZoom, false}, - {dvsName.c_str(), sizeof(intel_cca_run_dvs_data), &mMemDVS, false}, - {aicName.c_str(), sizeof(intel_cca_run_aic_data), &mMemAIC, false}, - {cmcName.c_str(), sizeof(intel_cca_get_cmc_data), &mMemCMC, false}, - {mknName.c_str(), sizeof(intel_cca_mkn_data), &mMemMKN, false}, - {aiqdName.c_str(), sizeof(intel_cca_get_aiqd_data), &mMemAIQD, false}, - {tuningName.c_str(), sizeof(intel_cca_update_tuning_data), &mMemTuning, false}, - {deinitName.c_str(), sizeof(intel_cca_deinit_data), &mMemDeinit, false}, - {decodeStatsName.c_str(), sizeof(intel_cca_decode_stats_data), &mMemDecodeStats, false}, - {palSizeName.c_str(), sizeof(intel_cca_get_pal_data_size), &mMemPalSize, false}}; - - bool success = mCommon.allocateAllShmMems(&mMems); - if (!success) { - mCommon.releaseAllShmMems(mMems); - return; - } - - // construct the remote CCA - intel_cca_struct_data* params = static_cast(mMemStruct.mAddr); - params->cameraId = mCameraId; - params->tuningMode = mTuningMode; - mCommon.requestSyncCca(IPC_CCA_CONSTRUCT, mMemStruct.mHandle); - - LOG1("@%s, Construct done", __func__); -} - -IntelCca::~IntelCca() { - LOG1(" @%s, tuningMode:%d", mCameraId, __func__, mTuningMode); - - // destruct the remote CCA - intel_cca_struct_data* params = static_cast(mMemStruct.mAddr); - params->cameraId = mCameraId; - params->tuningMode = mTuningMode; - mCommon.requestSyncCca(IPC_CCA_DESTRUCT, mMemStruct.mHandle); - - mCommon.releaseAllShmMems(mMems); - - for (auto& it : mMemsOuter) { - mCommon.freeShmMem(it.second); - } - mMemsOuter.clear(); - - freeStatsDataMem(); -} - -ia_err IntelCca::init(const cca::cca_init_params& initParams) { - LOG1(" @%s, tuningMode:%d, bitmap:0x%x", mCameraId, __func__, mTuningMode, - initParams.bitmap); - - intel_cca_init_data* params = static_cast(mMemInit.mAddr); - params->cameraId = mCameraId; - params->tuningMode = mTuningMode; - params->inParams = initParams; - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_INIT, mMemInit.mHandle); - CheckAndLogError(ret != ia_err_none, ia_err_general, "@%s, requestSyncCca fails", __func__); - - return ret; -} - -ia_err IntelCca::setStatsParams(const cca::cca_stats_params& params) { - LOG2(" @%s, tuningMode:%d, in params size:%zu", mCameraId, __func__, mTuningMode, - sizeof(cca::cca_stats_params)); - - intel_cca_set_stats_data* statsParams = static_cast(mMemStats.mAddr); - statsParams->cameraId = mCameraId; - statsParams->tuningMode = mTuningMode; - statsParams->inParams = params; - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_SET_STATS, mMemStats.mHandle); - CheckAndLogError(ret != ia_err_none, ia_err_general, "@%s, requestSyncCca fails", __func__); - - return ret; -} - -ia_err IntelCca::runAEC(uint64_t frameId, const cca::cca_ae_input_params& params, - cca::cca_ae_results* results) { - LOG2(" @%s, tuningMode:%d, in params size:%zu, results size:%zu", mCameraId, - frameId, __func__, mTuningMode, sizeof(cca::cca_ae_input_params), - sizeof(cca::cca_ae_results)); - - CheckAndLogError(!results, ia_err_argument, "@%s, results is nullptr", __func__); - - intel_cca_run_aec_data* aecParams = static_cast(mMemAEC.mAddr); - aecParams->cameraId = mCameraId; - aecParams->tuningMode = mTuningMode; - aecParams->frameId = frameId; - aecParams->inParams = params; - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_RUN_AEC, mMemAEC.mHandle); - CheckAndLogError(ret != ia_err_none, ia_err_general, "@%s, requestSyncCca fails", __func__); - - *results = aecParams->results; - - return ret; -} - -ia_err IntelCca::runAIQ(uint64_t frameId, const cca::cca_aiq_params& params, - cca::cca_aiq_results* results) { - LOG2(" @%s, tuningMode:%d, in params size:%zu, results size:%zu", mCameraId, - frameId, __func__, mTuningMode, sizeof(cca::cca_aiq_params), sizeof(cca::cca_aiq_results)); - CheckAndLogError(!results, ia_err_argument, "@%s, results is nullptr", __func__); - - intel_cca_run_aiq_data* aiqParams = static_cast(mMemAIQ.mAddr); - aiqParams->cameraId = mCameraId; - aiqParams->tuningMode = mTuningMode; - aiqParams->frameId = frameId; - aiqParams->inParams = params; - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_RUN_AIQ, mMemAIQ.mHandle); - CheckAndLogError(ret != ia_err_none, ia_err_general, "@%s, requestSyncCca fails", __func__); - - *results = aiqParams->results; - - return ret; -} - -ia_err IntelCca::runLTM(uint64_t frameId, const cca::cca_ltm_input_params& params) { - LOG2(" @%s, tuningMode:%d, in params size:%zu", mCameraId, frameId, __func__, - mTuningMode, sizeof(cca::cca_ltm_input_params)); - intel_cca_run_ltm_data* ltmParams = static_cast(mMemLTM.mAddr); - ltmParams->cameraId = mCameraId; - ltmParams->tuningMode = mTuningMode; - ltmParams->frameId = frameId; - ltmParams->inParams = params; - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_RUN_LTM, mMemLTM.mHandle); - CheckAndLogError(ret != ia_err_none, ia_err_general, "@%s, requestSyncCca fails", __func__); - - return ret; -} - -ia_err IntelCca::updateZoom(uint32_t streamId, const cca::cca_dvs_zoom& params) { - LOG1(" @%s, tuningMode:%d, streamId: %u", mCameraId, __func__, mTuningMode, streamId); - - intel_cca_update_zoom_data* zoomParams = - static_cast(mMemZoom.mAddr); - zoomParams->cameraId = mCameraId; - zoomParams->tuningMode = mTuningMode; - zoomParams->inParams = params; - zoomParams->streamId = streamId; - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_UPDATE_ZOOM, mMemZoom.mHandle); - CheckAndLogError(ret != ia_err_none, ia_err_general, "@%s, requestSyncCca fails", __func__); - - return ret; -} - -ia_err IntelCca::runDVS(uint32_t streamId, uint64_t frameId) { - LOG2(" @%s, tuningMode:%d, streamId: %u", mCameraId, frameId, __func__, - mTuningMode, streamId); - - intel_cca_run_dvs_data* params = static_cast(mMemDVS.mAddr); - params->cameraId = mCameraId; - params->tuningMode = mTuningMode; - params->frameId = frameId; - params->streamId = streamId; - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_RUN_DVS, mMemDVS.mHandle); - CheckAndLogError(ret != ia_err_none, ia_err_general, "@%s, requestSyncCca fails", __func__); - - return ret; -} - -ia_err IntelCca::runAIC(uint64_t frameId, cca::cca_pal_input_params* params, ia_binary_data* pal) { - CheckAndLogError(!params, ia_err_argument, "@%s, params is nullptr", __func__); - CheckAndLogError(!pal, ia_err_argument, "@%s, pal is nullptr", __func__); - - intel_cca_run_aic_data* aicParams = static_cast(mMemAIC.mAddr); - aicParams->cameraId = mCameraId; - aicParams->tuningMode = mTuningMode; - aicParams->frameId = frameId; - aicParams->inParams = params; - aicParams->inParamsHandle = mCommon.getShmMemHandle(params); - aicParams->palOutData = *pal; - - int32_t palDataHandle = mCommon.getShmMemHandle(pal->data); - CheckAndLogError(!palDataHandle, ia_err_general, "%s, pal buf:%p is not in SHM", __func__, - pal->data); - aicParams->palDataHandle = palDataHandle; - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_RUN_AIC, mMemAIC.mHandle); - CheckAndLogError(ret != ia_err_none && ret != ia_err_not_run, ia_err_general, - "@%s, requestSyncCca fails", __func__); - pal->size = aicParams->palOutData.size; - LOG2(" @%s, tuningMode:%d, in params size:%zu pal size:%d", mCameraId, frameId, - __func__, mTuningMode, sizeof(cca::cca_pal_input_params), pal->size); - - return ret; -} - -ia_err IntelCca::getCMC(cca::cca_cmc* cmc) { - CheckAndLogError(!cmc, ia_err_argument, "@%s, cmc is nullptr", __func__); - - intel_cca_get_cmc_data* params = static_cast(mMemCMC.mAddr); - params->cameraId = mCameraId; - params->tuningMode = mTuningMode; - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_GET_CMC, mMemCMC.mHandle); - CheckAndLogError(ret != ia_err_none, ia_err_general, "@%s, requestSyncCca fails", __func__); - - *cmc = params->results; - - return ret; -} - -ia_err IntelCca::getMKN(ia_mkn_trg type, cca::cca_mkn* mkn) { - CheckAndLogError(!mkn, ia_err_argument, "@%s, mkn is nullptr", __func__); - - intel_cca_mkn_data* params = static_cast(mMemMKN.mAddr); - params->cameraId = mCameraId; - params->tuningMode = mTuningMode; - params->type = type; - params->results = mkn; - params->resultsHandle = mCommon.getShmMemHandle(mkn); - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_GET_MKN, mMemMKN.mHandle); - CheckAndLogError(ret != ia_err_none, ia_err_general, "@%s, requestSyncCca fails", __func__); - - return ret; -} - -ia_err IntelCca::getAiqd(cca::cca_aiqd* aiqd) { - CheckAndLogError(!aiqd, ia_err_argument, "@%s, aiqd is nullptr", __func__); - - intel_cca_get_aiqd_data* params = static_cast(mMemAIQD.mAddr); - params->cameraId = mCameraId; - params->tuningMode = mTuningMode; - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_GET_AIQD, mMemAIQD.mHandle); - CheckAndLogError(ret != ia_err_none, ia_err_general, "@%s, requestSyncCca fails", __func__); - - *aiqd = params->results; - - return ret; -} - -ia_err IntelCca::updateTuning(uint8_t lardTags, const ia_lard_input_params& lardParams, - const cca::cca_nvm& nvm, int32_t streamId) { - LOG2(" @%s, tuningMode:%d", mCameraId, __func__, mTuningMode); - - intel_cca_update_tuning_data* params = - static_cast(mMemTuning.mAddr); - params->cameraId = mCameraId; - params->tuningMode = mTuningMode; - params->lardTags = lardTags; - params->lardParams = lardParams; - params->nvmParams = nvm; - params->streamId = streamId; - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_UPDATE_TUNING, mMemTuning.mHandle); - CheckAndLogError(ret != ia_err_none, ia_err_general, "@%s, requestSyncCca fails", __func__); - - return ret; -} - -bool IntelCca::allocStatsDataMem(unsigned int size) { - LOG1(" @%s, tuningMode:%d, size:%d", mCameraId, __func__, mTuningMode, size); - - freeStatsDataMem(); - - AutoMutex l(mMemStatsMLock); - for (int i = 0; i < kMaxQueueSize; i++) { - std::string number = std::to_string(i) + std::to_string(mCameraId) + - std::to_string(mTuningMode) + - std::to_string(reinterpret_cast(this)); - std::string finalName = "statsData" + number + SHM_NAME; - StatsBufInfo info = {}; - bool ret = mCommon.allocShmMem(finalName, size, &info.shmMem); - CheckAndLogError(ret == false, false, "mCommon.allocShmMem failed for stats data"); - info.usedSize = size; - info.bufSize = size; - - LOG1("the buffer handle: %d, address: %p", info.shmMem.mHandle, info.shmMem.mAddr); - int64_t index = i * (-1) - 1; // default index list: -1, -2, -3, ... - mMemStatsInfoMap[index] = info; - } - - return true; -} - -void IntelCca::freeStatsDataMem() { - LOG1(" @%s, tuningMode:%d", mCameraId, __func__, mTuningMode); - - AutoMutex l(mMemStatsMLock); - for (auto it = mMemStatsInfoMap.begin(); it != mMemStatsInfoMap.end(); ++it) { - mCommon.freeShmMem(it->second.shmMem); - } - - mMemStatsInfoMap.clear(); -} - -void* IntelCca::getStatsDataBuffer() { - AutoMutex l(mMemStatsMLock); - if (mMemStatsInfoMap.empty()) return nullptr; - - ShmMemInfo memInfo = mMemStatsInfoMap.begin()->second.shmMem; - - return memInfo.mAddr; -} - -void IntelCca::decodeHwStatsDone(int64_t sequence, unsigned int byteUsed) { - LOG2(" @%s, tuningMode:%d, byteUsed:%d", mCameraId, sequence, __func__, - mTuningMode, byteUsed); - - AutoMutex l(mMemStatsMLock); - if (mMemStatsInfoMap.empty()) return; - - auto it = mMemStatsInfoMap.begin(); - it->second.usedSize = byteUsed; - mMemStatsInfoMap[sequence] = it->second; - - if (sequence != it->first) mMemStatsInfoMap.erase(it->first); -} - -void* IntelCca::fetchHwStatsData(int64_t sequence, unsigned int* byteUsed) { - CheckAndLogError(!byteUsed, nullptr, "byteUsed is nullptr"); - - AutoMutex l(mMemStatsMLock); - if (mMemStatsInfoMap.find(sequence) != mMemStatsInfoMap.end()) { - *byteUsed = mMemStatsInfoMap[sequence].usedSize; - ShmMemInfo memInfo = mMemStatsInfoMap[sequence].shmMem; - LOG2(" @%s, tuningMode:%d, memInfo.mAddr %p", mCameraId, sequence, __func__, - mTuningMode, memInfo.mAddr); - return memInfo.mAddr; - } - - return nullptr; -} - -void IntelCca::deinit() { - LOG1(" @%s, tuningMode:%d", mCameraId, __func__, mTuningMode); - - intel_cca_deinit_data* params = static_cast(mMemDeinit.mAddr); - params->cameraId = mCameraId; - params->tuningMode = mTuningMode; - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_DEINIT, mMemDeinit.mHandle); - CheckAndLogError(ret != ia_err_none, VOID_VALUE, "@%s, requestSyncCca fails", __func__); -} - -ia_err IntelCca::decodeStats(uint64_t statsPointer, uint32_t statsSize, uint32_t bitmap, - ia_isp_bxt_statistics_query_results_t* results, - cca::cca_out_stats* outStats) { - LOG2(" @%s, tuningMode:%d, statsPointer:0x%lx, statsSize:%d, bitmap:0x%x", mCameraId, - __func__, mTuningMode, statsPointer, statsSize, bitmap); - CheckAndLogError(!results, ia_err_argument, "@%s, results is nullptr", __func__); - - intel_cca_decode_stats_data* params = - static_cast(mMemDecodeStats.mAddr); - - params->cameraId = mCameraId; - params->tuningMode = mTuningMode; - params->statsHandle = mCommon.getShmMemHandle(reinterpret_cast(statsPointer)); - params->statsBuffer.data = nullptr; - params->statsBuffer.size = statsSize; - params->bitmap = bitmap; - params->outStats.get_rgbs_stats = false; - if (outStats) { - params->outStats.get_rgbs_stats = outStats->get_rgbs_stats; - } - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_DECODE_STATS, mMemDecodeStats.mHandle); - CheckAndLogError(ret != ia_err_none, ia_err_general, "@%s, requestSyncCca fails", __func__); - - *results = params->results; - if (outStats && params->outStats.get_rgbs_stats) { - *outStats = params->outStats; - outStats->rgbs_grid.blocks_ptr = outStats->rgbs_blocks; - } - - return ret; -} - -uint32_t IntelCca::getPalDataSize(const cca::cca_program_group& programGroup) { - intel_cca_get_pal_data_size* params = - static_cast(mMemPalSize.mAddr); - params->cameraId = mCameraId; - params->tuningMode = mTuningMode; - params->pg = programGroup; - - ia_err ret = mCommon.requestSyncCca(IPC_CCA_GET_PAL_SIZE, mMemPalSize.mHandle); - CheckAndLogError(ret != ia_err_none, 0, "@%s, requestSyncCca fails", __func__); - LOG2(" @%s, tuningMode:%d, in params size:%zu, returnSize:%d", mCameraId, __func__, - mTuningMode, sizeof(cca::cca_program_group), params->returnSize); - - return params->returnSize; -} - -void* IntelCca::allocMem(int streamId, const std::string& name, int index, int size) { - std::string number = std::to_string(streamId) + std::to_string(index) + - std::to_string(mCameraId) + std::to_string(mTuningMode) + - std::to_string(reinterpret_cast(this)); - std::string finalName = name + number + SHM_NAME; - - ShmMemInfo memInfo = {}; - bool ret = mCommon.allocShmMem(finalName, size, &memInfo); - CheckAndLogError(ret == false, nullptr, "%s, mCommon.allocShmMem fails for pal buf", __func__); - LOG1(" @%s, tuningMode:%d, name:%s, index:%d, streamId:%d, size:%d, handle: %d," - "address: %p", - mCameraId, __func__, mTuningMode, name.c_str(), index, streamId, size, memInfo.mHandle, - memInfo.mAddr); - mMemsOuter[memInfo.mAddr] = memInfo; - - return memInfo.mAddr; -} - -void IntelCca::freeMem(void* addr) { - LOG1(" @%s, tuningMode:%d, addr: %p", mCameraId, __func__, mTuningMode, addr); - - if (mMemsOuter.find(addr) != mMemsOuter.end()) { - mCommon.freeShmMem(mMemsOuter[addr]); - mMemsOuter.erase(addr); - return; - } - LOGW("@%s, there is no addr:%p, in the mMemsOuter", __func__, addr); -} -} /* namespace icamera */ diff --git a/modules/sandboxing/client/IntelCcaClient.h b/modules/sandboxing/client/IntelCcaClient.h deleted file mode 100644 index 948e0f44..00000000 --- a/modules/sandboxing/client/IntelCcaClient.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#include -#include -#include -#include -#include - -#include "CameraTypes.h" -#include "IntelAlgoCommonClient.h" -#include "iutils/Thread.h" -#include "modules/sandboxing/IPCIntelCca.h" - -namespace icamera { -class IntelCca { - public: - static IntelCca* getInstance(int cameraId, TuningMode mode); - static void releaseInstance(int cameraId, TuningMode mode); - static void releaseAllInstances(); - - ia_err init(const cca::cca_init_params& initParams); - - ia_err setStatsParams(const cca::cca_stats_params& params); - - ia_err runAEC(uint64_t frameId, const cca::cca_ae_input_params& params, - cca::cca_ae_results* results); - ia_err runAIQ(uint64_t frameId, const cca::cca_aiq_params& params, - cca::cca_aiq_results* results); - - ia_err runLTM(uint64_t frameId, const cca::cca_ltm_input_params& params); - - ia_err updateZoom(uint32_t streamId, const cca::cca_dvs_zoom& params); - - ia_err runDVS(uint32_t streamId, uint64_t frameId); - - ia_err runAIC(uint64_t frameId, cca::cca_pal_input_params* params, ia_binary_data* pal); - - ia_err getCMC(cca::cca_cmc* cmc); - ia_err getMKN(ia_mkn_trg type, cca::cca_mkn* mkn); - ia_err getAiqd(cca::cca_aiqd* aiqd); - ia_err updateTuning(uint8_t lardTags, const ia_lard_input_params& lardParams, - const cca::cca_nvm& nvm, int32_t streamId); - - bool allocStatsDataMem(unsigned int size); - void* getStatsDataBuffer(); - void decodeHwStatsDone(int64_t sequence, unsigned int byteUsed); - void* fetchHwStatsData(int64_t sequence, unsigned int* byteUsed); - - void deinit(); - - ia_err decodeStats(uint64_t statsPointer, uint32_t statsSize, uint32_t bitmap, - ia_isp_bxt_statistics_query_results_t* results, - cca::cca_out_stats* outStats = nullptr); - - uint32_t getPalDataSize(const cca::cca_program_group& programGroup); - void* allocMem(int streamId, const std::string& name, int index, int size); - void freeMem(void* addr); - - private: - IntelCca(int cameraId, TuningMode mode); - virtual ~IntelCca(); - void freeStatsDataMem(); - - private: - int mCameraId; - TuningMode mTuningMode; - - IntelAlgoCommon mCommon; - - ShmMemInfo mMemStruct; - ShmMemInfo mMemInit; - ShmMemInfo mMemStats; - ShmMemInfo mMemAEC; - ShmMemInfo mMemAIQ; - ShmMemInfo mMemLTM; - ShmMemInfo mMemZoom; - ShmMemInfo mMemDVS; - ShmMemInfo mMemAIC; - ShmMemInfo mMemCMC; - ShmMemInfo mMemMKN; - ShmMemInfo mMemAIQD; - ShmMemInfo mMemTuning; - ShmMemInfo mMemDeinit; - ShmMemInfo mMemDecodeStats; - ShmMemInfo mMemPalSize; - - std::vector mMems; - - // Only 3 buffers will be held in AiqResultStorage (kAiqResultStorageSize is 3) - // So it is safe to use other 3 buffers. - static const int kMaxQueueSize = 6; - Mutex mMemStatsMLock; // protect mMemStatsInfoMap - struct StatsBufInfo { - unsigned int bufSize; - ShmMemInfo shmMem; - unsigned int usedSize; - }; - // first: sequence id, second: stats buffer info - std::map mMemStatsInfoMap; - - std::unordered_map mMemsOuter; - - private: - struct CCAHandle { - int cameraId; - std::unordered_map ccaHandle; // TuningMode to IntelCca map - }; - static std::vector sCcaInstance; - static Mutex sLock; -}; -} /* namespace icamera */ diff --git a/modules/sandboxing/client/IntelEvcpClient.cpp b/modules/sandboxing/client/IntelEvcpClient.cpp deleted file mode 100644 index ca9da787..00000000 --- a/modules/sandboxing/client/IntelEvcpClient.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) 2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelEVCPClient - -#include "modules/sandboxing/client/IntelEvcpClient.h" - -#include - -#include "iutils/CameraLog.h" -#include "iutils/Utils.h" - -namespace icamera { - -IntelEvcp::~IntelEvcp() { - bool ret = mCommon.requestSync(IPC_EVCP_DEINIT); - if (!ret) LOGE("@%s, EVCP DEINIT Fails", __func__); - - mCommon.freeShmMem(mParamMems, GPU_ALGO_SHM); - mCommon.freeShmMem(mEvcpRunInfoMem, GPU_ALGO_SHM); -} - -int IntelEvcp::init(int width, int height, EvcpParam* param) { - bool ret = initResolution(width, height); - if (!ret) return UNKNOWN_ERROR; - - ret = initRunInfoBuffer(); - if (!ret) return UNKNOWN_ERROR; - - ret = initParamBuffer(); - if (!ret) return UNKNOWN_ERROR; - - if (param) { - ret = updateEvcpParam(param); - } else { - EvcpParam defParam = {false, false, false, false}; - ret = updateEvcpParam(&defParam); - } - - if (!ret) return UNKNOWN_ERROR; - - return OK; -} - -bool IntelEvcp::initRunInfoBuffer() { - std::string name = - "/evcpRuninfo" + std::to_string(reinterpret_cast(this)) + SHM_NAME; - mEvcpRunInfoMem.mName = name.c_str(); - mEvcpRunInfoMem.mSize = sizeof(EvcpRunInfo); - return mCommon.allocShmMem(mEvcpRunInfoMem.mName, mEvcpRunInfoMem.mSize, &mEvcpRunInfoMem, - GPU_ALGO_SHM); -} - -bool IntelEvcp::initParamBuffer() { - std::string name = "/evcpParam" + std::to_string(reinterpret_cast(this)) + SHM_NAME; - mParamMems.mName = name.c_str(); - mParamMems.mSize = sizeof(EvcpParam); - return mCommon.allocShmMem(mParamMems.mName, mParamMems.mSize, &mParamMems, GPU_ALGO_SHM); -} - -bool IntelEvcp::initResolution(int width, int height) { - ShmMemInfo resolutionMems; - resolutionMems.mName = "/evcpResolutionShm"; - resolutionMems.mSize = sizeof(EvcpResolution); - - bool ret = mCommon.allocShmMem(resolutionMems.mName, resolutionMems.mSize, &resolutionMems, - GPU_ALGO_SHM); - CheckAndLogError(!ret, false, "@%s, Alloc resolution allocShmMem fails", __func__); - - EvcpResolution* res = reinterpret_cast(resolutionMems.mAddr); - res->width = width; - res->height = height; - - ret = mCommon.requestSync(IPC_EVCP_INIT, resolutionMems.mHandle); - mCommon.freeShmMem(resolutionMems, GPU_ALGO_SHM); - - return ret; -} - -bool IntelEvcp::runEvcpFrame(int dmafd, int dataSize) { - EvcpRunInfo* runInfo = reinterpret_cast(mEvcpRunInfoMem.mAddr); - - runInfo->inHandle = mCommon.registerGbmBuffer(dmafd, GPU_ALGO_SHM); - CheckAndLogError(runInfo->inHandle < 0, false, "@%s, Cannot register GBM buffers.", __func__); - - runInfo->bufSize = dataSize; - - auto runInfoHandle = mCommon.getShmMemHandle(reinterpret_cast(runInfo), GPU_ALGO_SHM); - if (runInfoHandle < 0) { - LOGE("@%s, Cannot get shm handle.", __func__); - mCommon.deregisterGbmBuffer(runInfo->inHandle, GPU_ALGO_SHM); - return false; - } - - bool ret = mCommon.requestSync(IPC_EVCP_RUN_FRAME, runInfoHandle); - mCommon.deregisterGbmBuffer(runInfo->inHandle, GPU_ALGO_SHM); - - return ret; -} - -void IntelEvcp::getEvcpParam(EvcpParam* evcpParam) { - EvcpParam* pamem = reinterpret_cast(mParamMems.mAddr); - - mCommon.requestSync(IPC_EVCP_GETCONF, mParamMems.mHandle); - *evcpParam = *pamem; -} - -bool IntelEvcp::updateEvcpParam(EvcpParam* param) { - EvcpParam* pamem = reinterpret_cast(mParamMems.mAddr); - *pamem = *param; - - return mCommon.requestSync(IPC_EVCP_UPDCONF, mParamMems.mHandle); -} - -} // namespace icamera diff --git a/modules/sandboxing/client/IntelEvcpClient.h b/modules/sandboxing/client/IntelEvcpClient.h deleted file mode 100644 index b37f951e..00000000 --- a/modules/sandboxing/client/IntelEvcpClient.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#include "BufferQueue.h" -#include "CameraBuffer.h" -#include "Parameters.h" -#include "PlatformData.h" -#include "src/evcp/EvcpCommon.h" - -namespace icamera { - -class IntelEvcp { - public: - IntelEvcp() {} - ~IntelEvcp(); - int init(int width, int height, EvcpParam* param = nullptr); - - bool runEvcpFrame(int dmafd, int dataSize); - bool updateEvcpParam(EvcpParam* evcpParam); - void getEvcpParam(EvcpParam* evcpParam); - - private: - bool initResolution(int width, int height); - bool initParamBuffer(); - bool initRunInfoBuffer(); - - IntelAlgoCommon mCommon; - ShmMemInfo mParamMems; - ShmMemInfo mEvcpRunInfoMem; - - DISALLOW_COPY_AND_ASSIGN(IntelEvcp); -}; -} // namespace icamera diff --git a/modules/sandboxing/client/IntelFaceDetectionClient.cpp b/modules/sandboxing/client/IntelFaceDetectionClient.cpp deleted file mode 100644 index 6f2bc2ec..00000000 --- a/modules/sandboxing/client/IntelFaceDetectionClient.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelFaceDetectionClient - -#include "modules/sandboxing/client/IntelFaceDetectionClient.h" - -#include - -#include "FaceType.h" - -namespace icamera { -IntelFaceDetection::IntelFaceDetection() : mInitialized(false) { - uintptr_t personal = reinterpret_cast(this); - mMems = {{("/faceDetectionInit" + std::to_string(personal) + "Shm"), - sizeof(FaceDetectionInitParams), &mMemInit, false}, - {("/faceDetectionDeinit" + std::to_string(personal) + "Shm"), - sizeof(FaceDetectionDeinitParams), &mMemDeinit, false}}; - - for (int i = 0; i < MAX_STORE_FACE_DATA_BUF_NUM; i++) { - mMems.push_back( - {("/faceDetectionRun" + std::to_string(i) + std::to_string(personal) + "Shm"), - sizeof(FaceDetectionRunParams), &mMemRunBufs[i], false}); - } - - bool success = mCommon.allocateAllShmMems(&mMems); - if (!success) { - LOGE("@%s,Failed to call allocateAllShmMems", __func__); - mCommon.releaseAllShmMems(mMems); - return; - } - - LOG1("@%s, Construct done", __func__); - mInitialized = true; -} - -IntelFaceDetection::~IntelFaceDetection() { - LOG1("@%s, Destroy", __func__); - mCommon.releaseAllShmMems(mMems); -} - -status_t IntelFaceDetection::init(FaceDetectionInitParams* initParams, int dataSize) { - CheckAndLogError(!mInitialized, UNKNOWN_ERROR, "@%s, mInitialized is false", __func__); - - CheckAndLogError( - initParams == nullptr || dataSize < static_cast(sizeof(FaceDetectionInitParams)), - UNKNOWN_ERROR, "@%s, initParams: %p, dataSize: %d", __func__, initParams, dataSize); - - unsigned int maxFacesNum = - std::min(initParams->max_face_num, static_cast(MAX_FACES_DETECTABLE)); - LOG1(" @%s, maxFacesNum:%d", initParams->cameraId, __func__, maxFacesNum); - - FaceDetectionInitParams* params = static_cast(mMemInit.mAddr); - - bool ret = mIpc.clientFlattenInit(maxFacesNum, initParams->cameraId, params); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, clientFlattenInit fails", __func__); - - ret = mCommon.requestSync(IPC_FD_INIT, mMemInit.mHandle); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, requestSync fails", __func__); - - return OK; -} - -status_t IntelFaceDetection::deinit(FaceDetectionDeinitParams* deinitParams, int dataSize) { - LOG1("@%s", __func__); - CheckAndLogError(!mInitialized, UNKNOWN_ERROR, "@%s, mInitialized is false", __func__); - CheckAndLogError( - deinitParams == nullptr || dataSize < static_cast(sizeof(FaceDetectionDeinitParams)), - UNKNOWN_ERROR, "@%s, deinitParams: %p, dataSize: %d", __func__, deinitParams, dataSize); - - FaceDetectionDeinitParams* params = static_cast(mMemDeinit.mAddr); - params->cameraId = deinitParams->cameraId; - bool ret = mCommon.requestSync(IPC_FD_DEINIT, mMemDeinit.mHandle); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, requestSync fails", __func__); - - return OK; -} - -FaceDetectionRunParams* IntelFaceDetection::prepareRunBuffer(unsigned int index) { - CheckAndLogError(!mInitialized, nullptr, "@%s, mInitialized is false", __func__); - CheckAndLogError(index >= MAX_STORE_FACE_DATA_BUF_NUM, nullptr, "@%s, index: %d is error", - __func__, index); - LOG2("%s, index: %d", __func__, index); - - return static_cast(mMemRunBufs[index].mAddr); -} - -status_t IntelFaceDetection::run(FaceDetectionRunParams* runParams, int dataSize, int dmafd) { - CheckAndLogError(!mInitialized, UNKNOWN_ERROR, "@%s, mInitialized is false", __func__); - CheckAndLogError(!runParams || dataSize < static_cast(sizeof(FaceDetectionRunParams)), - UNKNOWN_ERROR, "@%s, runParams: %p dataSize: %d", __func__, runParams, - dataSize); - LOG2("@%s, dmafd: %d", __func__, dmafd); - - if (dmafd >= 0) { - runParams->bufferHandle = mCommon.registerGbmBuffer(dmafd); - CheckAndLogError((runParams->bufferHandle < 0), false, - "@%s, call mCommon.registerGbmBuffer", __func__); - } - - int32_t runBufHandle = mCommon.getShmMemHandle(static_cast(runParams)); - CheckAndLogError(runBufHandle < 0, UNKNOWN_ERROR, "@%s, getShmMemHandle fails", __func__); - - bool ret = mCommon.requestSync(IPC_FD_RUN, runBufHandle); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, requestSync fails", __func__); - - if (dmafd >= 0) { - mCommon.deregisterGbmBuffer(runParams->bufferHandle); - } - - return OK; -} -} /* namespace icamera */ diff --git a/modules/sandboxing/client/IntelFaceDetectionClient.h b/modules/sandboxing/client/IntelFaceDetectionClient.h deleted file mode 100644 index 0f65e32a..00000000 --- a/modules/sandboxing/client/IntelFaceDetectionClient.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#include "FaceType.h" -#include "IntelAlgoCommonClient.h" -#include "iutils/Errors.h" -#include "iutils/Utils.h" -#include "modules/sandboxing/IPCIntelFD.h" - -namespace icamera { -class IntelFaceDetection { - public: - IntelFaceDetection(); - virtual ~IntelFaceDetection(); - - status_t init(FaceDetectionInitParams* initData, int dataSize); - status_t deinit(FaceDetectionDeinitParams* deinitParams, int dataSize); - status_t run(FaceDetectionRunParams* runParams, int dataSize, int dmafd = -1); - FaceDetectionRunParams* prepareRunBuffer(unsigned int index); - - private: - IPCIntelFD mIpc; - IntelAlgoCommon mCommon; - - bool mInitialized; - - ShmMemInfo mMemInit; - ShmMemInfo mMemDeinit; - ShmMemInfo mMemRunBufs[MAX_STORE_FACE_DATA_BUF_NUM]; - std::vector mMems; -}; -} /* namespace icamera */ diff --git a/modules/sandboxing/client/IntelPGParamClient.cpp b/modules/sandboxing/client/IntelPGParamClient.cpp deleted file mode 100644 index 4fa47348..00000000 --- a/modules/sandboxing/client/IntelPGParamClient.cpp +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelPGParamClient - -#include "modules/sandboxing/client/IntelPGParamClient.h" - -#include - -#include "iutils/CameraLog.h" -#include "iutils/Utils.h" - -namespace icamera { - -IntelPGParam::IntelPGParam(int pgId) - : mInitialized(false), - mPgId(pgId), - mClient(reinterpret_cast(this)), - mPayloadCount(0), - mPGBuffer(nullptr) { - std::string initName = "/pgParamInit" + std::to_string(mClient) + SHM_NAME; - std::string prepareName = "/pgParamPrepare" + std::to_string(mClient) + SHM_NAME; - std::string getFragDescsName = "/pgParamGetFragDescs" + std::to_string(mClient) + SHM_NAME; - std::string prepareProgramName = "/pgParamPrepareProgram" + std::to_string(mClient) + SHM_NAME; - std::string encodeName = "/pgParamEncode" + std::to_string(mClient) + SHM_NAME; - std::string decodeName = "/pgParamDecode" + std::to_string(mClient) + SHM_NAME; - std::string deinitName = "/pgParamDeinit" + std::to_string(mClient) + SHM_NAME; - - mMems = { - {initName.c_str(), sizeof(pg_param_init_params), &mMemInit, false}, - {prepareName.c_str(), sizeof(pg_param_prepare_params), &mMemPrepare, false}, - {getFragDescsName.c_str(), sizeof(pg_param_get_fragment_desc_params), &mMemGetFragDescs, - false}, - {prepareProgramName.c_str(), sizeof(pg_param_prepare_program_params), &mMemPrepareProgram, - false}, - {encodeName.c_str(), sizeof(pg_param_encode_params), &mMemEncode, false}, - {decodeName.c_str(), sizeof(pg_param_decode_params), &mMemDecode, false}, - {deinitName.c_str(), sizeof(pg_param_deinit_params), &mMemDeinit, false}, - }; - - bool success = mCommon.allocateAllShmMems(&mMems); - if (!success) { - mCommon.releaseAllShmMems(mMems); - return; - } - - // Allocate when use - mMemAllocatePGBuffer.mName = "/pgParamAllocPG" + std::to_string(mClient) + SHM_NAME; - mMemAllocatePGBuffer.mSize = 0; - mMemStatistics.mName = "/pgParamStats" + std::to_string(mClient) + SHM_NAME; - mMemStatistics.mSize = 0; - mMaxStatsSize = 0; - - mInitialized = true; - LOG1("@%s, Construct done", __func__); -} - -IntelPGParam::~IntelPGParam() { - mCommon.releaseAllShmMems(mMems); - while (!mMemAllocatePayloads.empty()) { - mCommon.freeShmMem(mMemAllocatePayloads.back()); - mMemAllocatePayloads.pop_back(); - } - if (mMemAllocatePGBuffer.mSize) { - mCommon.freeShmMem(mMemAllocatePGBuffer); - } - if (mMemStatistics.mSize) { - mCommon.freeShmMem(mMemStatistics); - } - LOG1("@%s", __func__); -} - -int IntelPGParam::init(ia_p2p_platform_t platform, const PgConfiguration& pgConfig) { - CheckAndLogError(mInitialized == false, INVALID_OPERATION, "@%s, mInitialized is false", - __func__); - - bool ret = - mIpc.clientFlattenInit(mMemInit.mAddr, mMemInit.mSize, mPgId, mClient, platform, pgConfig); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, clientFlattenInit fails", __func__); - - ret = mCommon.requestSync(IPC_PG_PARAM_INIT, mMemInit.mHandle); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, requestSync fails", __func__); - - return OK; -} - -int IntelPGParam::prepare(const ia_binary_data* ipuParameters, const ia_css_rbm_t* rbm, - ia_css_kernel_bitmap_t* bitmap, uint32_t* maxStatsSize) { - CheckAndLogError(mInitialized == false, INVALID_OPERATION, "@%s, mInitialized is false", - __func__); - CheckAndLogError(!ipuParameters, INVALID_OPERATION, "@%s, ipuParams error", __func__); - - int32_t palHandle = mCommon.getShmMemHandle(ipuParameters->data); - bool ret = mIpc.clientFlattenPrepare(mMemPrepare.mAddr, mMemPrepare.mSize, mClient, - ipuParameters->size, palHandle, rbm); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, clientFlattenPrepare fails", __func__); - - ret = mCommon.requestSync(IPC_PG_PARAM_PREPARE, mMemPrepare.mHandle); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, requestSync fails", __func__); - - ret = mIpc.clientUnflattenPrepare(mMemPrepare.mAddr, mMemPrepare.mSize, bitmap, &mMaxStatsSize); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, clientUnflattenPrepare fails", __func__); - - if (mMemStatistics.mAddr && mMemStatistics.mSize <= mMaxStatsSize) { - mCommon.freeShmMem(mMemStatistics); - mMemStatistics.mSize = 0; - mMemStatistics.mAddr = nullptr; - } - if (maxStatsSize) *maxStatsSize = mMaxStatsSize; - return OK; -} - -int IntelPGParam::getFragmentDescriptors(int descCount, ia_p2p_fragment_desc* descs) { - CheckAndLogError(mInitialized == false, INVALID_OPERATION, "@%s, mInitialized is false", - __func__); - - bool ret = mIpc.clientFlattenGetFragDescs(mMemGetFragDescs.mAddr, mMemGetFragDescs.mSize, - mClient, descCount); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, clientFlattenGetFragDescs fails", __func__); - - ret = mCommon.requestSync(IPC_PG_PARAM_GET_FRAG_DESCS, mMemGetFragDescs.mHandle); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, requestSync fails", __func__); - - int count = 0; - ret = mIpc.clientUnflattenGetFragDescs(mMemGetFragDescs.mAddr, mMemGetFragDescs.mSize, &count, - descs); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, clientUnflattenGetFragDescs fails", - __func__); - return count; -} - -void* IntelPGParam::allocatePGBuffer(int pgSize) { - CheckAndLogError(mInitialized == false, nullptr, "@%s, mInitialized is false", __func__); - - mPGBuffer = nullptr; - int size = mIpc.getTotalPGBufferSize(pgSize); - if (mMemAllocatePGBuffer.mAddr && mMemAllocatePGBuffer.mSize < size) { - mCommon.freeShmMem(mMemAllocatePGBuffer); - mMemAllocatePGBuffer.mSize = 0; - mMemAllocatePGBuffer.mAddr = nullptr; - } - if (!mMemAllocatePGBuffer.mAddr) { - mMemAllocatePGBuffer.mSize = size; - bool ret = mCommon.allocShmMem(mMemAllocatePGBuffer.mName, mMemAllocatePGBuffer.mSize, - &mMemAllocatePGBuffer); - CheckAndLogError(ret == false, nullptr, "@%s, allocShmMem fails", __func__); - } - - void* pgBuffer = nullptr; - bool ret = mIpc.assignPGBuffer(mMemAllocatePGBuffer.mAddr, mMemAllocatePGBuffer.mSize, pgSize, - &pgBuffer); - CheckAndLogError(ret == false, nullptr, "@%s, assignPGBuffer fails", __func__); - - ret = mIpc.clientFlattenAllocatePGBuffer(mMemAllocatePGBuffer.mAddr, mMemAllocatePGBuffer.mSize, - mClient, pgSize); - CheckAndLogError(ret == false, nullptr, "@%s, clientFlattenAllocatePGBuffer fails", __func__); - - ret = mCommon.requestSync(IPC_PG_PARAM_ALLOCATE_PG, mMemAllocatePGBuffer.mHandle); - CheckAndLogError(ret == false, nullptr, "@%s, requestSync fails", __func__); - - mPGBuffer = reinterpret_cast(pgBuffer); - return mPGBuffer; -} - -int IntelPGParam::setPGAndPrepareProgram(ia_css_process_group_t* pg) { - CheckAndLogError(mInitialized == false, INVALID_OPERATION, "@%s, mInitialized is false", - __func__); - CheckAndLogError(mPGBuffer != pg, INVALID_OPERATION, "@%s, pg is not recognized", __func__); - - bool ret = mIpc.clientFlattenPrepareProgram(mMemPrepareProgram.mAddr, mMemPrepareProgram.mSize, - mClient); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, clientFlattenPrepareProgram fails", - __func__); - - ret = mCommon.requestSync(IPC_PG_PARAM_PREPARE_PROGRAM, mMemPrepareProgram.mHandle); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, requestSync fails", __func__); - - // Get size of payloads - mPayloadCount = ARRAY_SIZE(mPayloads); - ret = mIpc.clientUnflattenPrepareProgram(mMemPrepareProgram.mAddr, mMemPrepareProgram.mSize, - &mPayloadCount, mPayloads); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, clientUnlattenPrepareProgram fails", - __func__); - - return OK; -} - -int IntelPGParam::getPayloadSizes(int payloadCount, ia_binary_data* payloads) { - CheckAndLogError(mInitialized == false, INVALID_OPERATION, "@%s, mInitialized is false", - __func__); - CheckAndLogError(payloadCount < mPayloadCount, UNKNOWN_ERROR, - "@%s, payloadCount: %d is small than %d", __func__, payloadCount, - mPayloadCount); - CheckAndLogError(!payloads, UNKNOWN_ERROR, "@%s, payloads is nullptr", __func__); - - MEMCPY_S(payloads, sizeof(ia_binary_data) * payloadCount, mPayloads, sizeof(mPayloads)); - return mPayloadCount; -} - -int IntelPGParam::allocatePayloads(int payloadCount, ia_binary_data* payloads) { - CheckAndLogError(mInitialized == false, INVALID_OPERATION, "@%s, mInitialized is false", - __func__); - CheckAndLogError(payloadCount > IPU_MAX_TERMINAL_COUNT, UNKNOWN_ERROR, - "@%s, payloadCount: %d exceeded max count", __func__, payloadCount); - CheckAndLogError(!payloads, UNKNOWN_ERROR, "@%s, payloads is nullptr", __func__); - - // Allocate memory - int size = mIpc.getTotalPayloadSize(payloadCount, payloads); - CheckAndLogError(size <= 0, UNKNOWN_ERROR, "@%s, payloads size error", __func__); - mMemAllocatePayloads.resize(mMemAllocatePayloads.size() + 1); - - ShmMemInfo& info = mMemAllocatePayloads.back(); - info.mName = "/pgParamAllocPayloads" + std::to_string(mClient) + - std::to_string(mMemAllocatePayloads.size()) + SHM_NAME; - info.mSize = size; - info.mAddr = nullptr; - bool ret = mCommon.allocShmMem(info.mName, info.mSize, &info); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, allocShmMem fails", __func__); - - // Split memory of payloads in client side - ret = mIpc.assignPayloads(info.mAddr, info.mSize, payloadCount, payloads); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, allocatePayloads fails", __func__); - - ret = - mIpc.clientFlattenRegisterPayloads(info.mAddr, info.mSize, mClient, payloadCount, payloads); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, clientFlattenRegisterPayloads fails", - __func__); - - ret = mCommon.requestSync(IPC_PG_PARAM_REGISTER_PAYLOADS, info.mHandle); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, requestSync fails", __func__); - - return OK; -} - -int IntelPGParam::updatePALAndEncode(const ia_binary_data* ipuParameters, int payloadCount, - ia_binary_data* payloads) { - CheckAndLogError(mInitialized == false, INVALID_OPERATION, "@%s, mInitialized is false", - __func__); - CheckAndLogError(!ipuParameters, INVALID_OPERATION, "@%s, ipuParams error", __func__); - // Check shared memory of payloads - CheckAndLogError(payloadCount != mPayloadCount, BAD_VALUE, - "@%s, payloadCount :%d should equal to %d", __func__, payloadCount, - mPayloadCount); - - int32_t palHandle = mCommon.getShmMemHandle(ipuParameters->data); - bool ret = mIpc.clientFlattenEncode(mMemEncode.mAddr, mMemEncode.mSize, mClient, - ipuParameters->size, palHandle, payloadCount, payloads); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, clientFlattenEncode fails", __func__); - - ret = mCommon.requestSync(IPC_PG_PARAM_ENCODE, mMemEncode.mHandle); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, requestSync fails", __func__); - - return OK; -} - -int IntelPGParam::decode(int payloadCount, ia_binary_data* payloads, ia_binary_data* statistics) { - CheckAndLogError(mInitialized == false, INVALID_OPERATION, "@%s, mInitialized is false", - __func__); - // Check shared memory of payloads - CheckAndLogError(payloadCount != mPayloadCount, BAD_VALUE, - "@%s, payloadCount :%d should equal to %d", __func__, payloadCount, - mPayloadCount); - - // Check share memory of statistics - CheckAndLogError(!statistics, BAD_VALUE, "@%s, statistics nullptr", __func__); - CheckAndLogError(!mMaxStatsSize, BAD_VALUE, "@%s, bad max stats size", __func__); - bool ret = true; - int32_t statsHandle = -1; - if (!statistics->data) { - // Prepare shared stats memory - if (!mMemStatistics.mAddr) { - mMemStatistics.mSize = mMaxStatsSize; - ret = mCommon.allocShmMem(mMemStatistics.mName, mMemStatistics.mSize, &mMemStatistics); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, alloc statsData fails", __func__); - } - statsHandle = mCommon.getShmMemHandle(mMemStatistics.mAddr); - } else { - statsHandle = mCommon.getShmMemHandle(statistics->data); - } - - ret = mIpc.clientFlattenDecode(mMemDecode.mAddr, mMemDecode.mSize, mClient, payloadCount, - payloads, statsHandle); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, clientFlattenDecode fails", __func__); - - ret = mCommon.requestSync(IPC_PG_PARAM_DECODE, mMemDecode.mHandle); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, requestSync fails", __func__); - - ret = mIpc.clientUnflattenDecode(mMemDecode.mAddr, mMemDecode.mSize, statistics); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, clientUnflattenDecode fails", __func__); - if (!statistics->data) { - statistics->data = mMemStatistics.mAddr; - } - - return OK; -} - -void IntelPGParam::deinit() { - CheckAndLogError(mInitialized == false, VOID_VALUE, "@%s, mInitialized is false", __func__); - - bool ret = mIpc.clientFlattenDeinit(mMemDeinit.mAddr, mMemDeinit.mSize, mClient); - CheckAndLogError(ret == false, VOID_VALUE, "@%s, clientFlattenDeinit fails", __func__); - - ret = mCommon.requestSync(IPC_PG_PARAM_DEINIT, mMemDeinit.mHandle); - CheckAndLogError(ret == false, VOID_VALUE, "@%s, requestSync fails", __func__); -} - -} // namespace icamera diff --git a/modules/sandboxing/client/IntelPGParamClient.h b/modules/sandboxing/client/IntelPGParamClient.h deleted file mode 100644 index 0ff43df9..00000000 --- a/modules/sandboxing/client/IntelPGParamClient.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include "IntelAlgoCommonClient.h" -#include "modules/sandboxing/IPCIntelPGParam.h" - -namespace icamera { - -class IntelPGParam { - public: - explicit IntelPGParam(int pgId); - ~IntelPGParam(); - - int init(ia_p2p_platform_t platform, const PgConfiguration& Pgconfiguration); - int prepare(const ia_binary_data* ipuParameters, const ia_css_rbm_t* rbm, - ia_css_kernel_bitmap_t* bitmap, uint32_t* maxStatsSize = nullptr); - void* allocatePGBuffer(int pgSize); - int getFragmentDescriptors(int terminalIdx, ia_p2p_fragment_desc* desc); - int setPGAndPrepareProgram(ia_css_process_group_t* pg); - int getPayloadSizes(int payloadCount, ia_binary_data* payloads); - int allocatePayloads(int payloadCount, ia_binary_data* payloads); - int updatePALAndEncode(const ia_binary_data* ipuParams, int payloadCount, - ia_binary_data* payloads); - int decode(int payloadCount, ia_binary_data* payload, ia_binary_data* statistics); - void deinit(); - - private: - IPCIntelPGParam mIpc; - IntelAlgoCommon mCommon; - bool mInitialized; - - ShmMemInfo mMemInit; - ShmMemInfo mMemPrepare; - ShmMemInfo mMemGetFragDescs; - ShmMemInfo mMemAllocatePGBuffer; - ShmMemInfo mMemPrepareProgram; - ShmMemInfo mMemEncode; - ShmMemInfo mMemDecode; - ShmMemInfo mMemDeinit; - ShmMemInfo mMemStatistics; - std::vector mMems; - - std::vector mMemAllocatePayloads; - - int mPgId; - uintptr_t mClient; - - // Shared memory in client, to avoid memory copy - int mPayloadCount; - ia_binary_data mPayloads[IPU_MAX_TERMINAL_COUNT]; // save sizes - ia_css_process_group_t* mPGBuffer; - uint32_t mMaxStatsSize; -}; - -} // namespace icamera diff --git a/modules/sandboxing/client/IntelTNR7USClient.cpp b/modules/sandboxing/client/IntelTNR7USClient.cpp deleted file mode 100644 index d1b1692c..00000000 --- a/modules/sandboxing/client/IntelTNR7USClient.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright (C) 2020-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelTNR7USClient - -#include "modules/sandboxing/client/IntelTNR7USClient.h" - -#include - -#include "iutils/CameraLog.h" -#include "iutils/Utils.h" - -namespace icamera { - -IntelTNR7US::IntelTNR7US(int cameraId) - : mCameraId(cameraId), - mTnrType(TNR_INSTANCE_MAX), - mTnrRequestInfo(nullptr) { - LOG1(" %s, Construct", cameraId, __func__); -} - -IntelTNR7US::~IntelTNR7US() { - // the instance not initialized, don't need to free - if (mTnrType != TNR_INSTANCE_MAX) { - mTnrRequestInfo->type = mTnrType; - mTnrRequestInfo->cameraId = mCameraId; - - int32_t requestHandle = - mCommon.getShmMemHandle(static_cast(mTnrRequestInfo), GPU_ALGO_SHM); - int ret = mCommon.requestSync(IPC_GPU_TNR_DEINIT, requestHandle); - CheckAndLogError(!ret, VOID_VALUE, "@%s, requestSync fails", __func__); - mCommon.freeShmMem(mTnrRequestInfoMem, GPU_ALGO_SHM); - } - LOG1(" %s, Destroy", mCameraId, __func__); -} - -int IntelTNR7US::init(int width, int height, TnrType type) { - uintptr_t personal = reinterpret_cast(this); - std::string initName = "/TnrRun" + std::to_string(personal) + "Shm"; - mTnrRequestInfoMem.mName = initName.c_str(); - mTnrRequestInfoMem.mSize = sizeof(TnrRequestInfo); - bool ret = mCommon.allocShmMem(mTnrRequestInfoMem.mName, mTnrRequestInfoMem.mSize, - &mTnrRequestInfoMem, GPU_ALGO_SHM); - CheckAndLogError(!ret, UNKNOWN_ERROR, "@%s, allocShmMem fails", __func__); - mTnrRequestInfo = static_cast(mTnrRequestInfoMem.mAddr); - - initName = "/TnrInit" + std::to_string(personal) + "Shm"; - ShmMemInfo initInfoMems; - initInfoMems.mName = initName.c_str(); - initInfoMems.mSize = sizeof(TnrInitInfo); - ret = mCommon.allocShmMem(initInfoMems.mName, initInfoMems.mSize, &initInfoMems, GPU_ALGO_SHM); - if (!ret) { - LOGE("@%s, alloc initInfo ShmMem fails", __func__); - mCommon.freeShmMem(mTnrRequestInfoMem, GPU_ALGO_SHM); - return UNKNOWN_ERROR; - } - - TnrInitInfo* initInfo = static_cast(initInfoMems.mAddr); - *initInfo = {width, height, mCameraId, type}; - - ret = mCommon.requestSync(IPC_GPU_TNR_INIT, initInfoMems.mHandle); - if (!ret) { - LOGE("@%s, IPC %d failed", __func__, IPC_GPU_TNR_INIT); - mCommon.freeShmMem(mTnrRequestInfoMem, GPU_ALGO_SHM); - } - mCommon.freeShmMem(initInfoMems, GPU_ALGO_SHM); - mTnrType = type; - LOG1("%s, GPU TNR instance size %dx%d, type %d", __func__, width, height, mTnrType); - - return ret ? OK : UNKNOWN_ERROR; -} - -int IntelTNR7US::runTnrFrame(const void* inBufAddr, void* outBufAddr, uint32_t inBufSize, - uint32_t outBufSize, Tnr7Param* tnrParam, bool syncUpdate, int fd) { - LOG2("%s, type: %d, syncUpdate: %d, fd: %d", __func__, mTnrType, syncUpdate, fd); - CheckAndLogError(!inBufAddr || !outBufAddr || !tnrParam, UNKNOWN_ERROR, - "@%s, invalid data buffer or parameter buffer", __func__); - int32_t inHandle = mCommon.getShmMemHandle(const_cast(inBufAddr), GPU_ALGO_SHM); - CheckAndLogError(inHandle < 0, UNKNOWN_ERROR, "@%s, can't find inBuf handle", __func__); - CheckAndLogError(mParamMems.mAddr != tnrParam, UNKNOWN_ERROR, "@%s, invalid tnr parameter", - __func__); - - if (fd >= 0) { - mTnrRequestInfo->outHandle = mCommon.registerGbmBuffer(fd, GPU_ALGO_SHM); - } else { - mTnrRequestInfo->outHandle = - mCommon.getShmMemHandle(static_cast(outBufAddr), GPU_ALGO_SHM); - } - CheckAndLogError(mTnrRequestInfo->outHandle < 0, UNKNOWN_ERROR, "@%s, can't init outBuf handle", - __func__); - - mTnrRequestInfo->inHandle = inHandle; - mTnrRequestInfo->paramHandle = mParamMems.mHandle; - mTnrRequestInfo->type = mTnrType; - mTnrRequestInfo->cameraId = mCameraId; - mTnrRequestInfo->outBufFd = fd; - mTnrRequestInfo->isForceUpdate = syncUpdate; - - int32_t requestHandle = - mCommon.getShmMemHandle(static_cast(mTnrRequestInfo), GPU_ALGO_SHM); - - IPC_CMD cmd = mTnrType > 0 ? IPC_GPU_TNR_THREAD2_RUN_FRAME : IPC_GPU_TNR_RUN_FRAME; - bool ret = mCommon.requestSync(cmd, requestHandle); - - if (fd >= 0) { - mCommon.deregisterGbmBuffer(mTnrRequestInfo->outHandle, GPU_ALGO_SHM); - } - - CheckAndLogError(!ret, OK, "@%s, run tnr fails", __func__); - - return OK; -} - -void* IntelTNR7US::allocCamBuf(uint32_t bufSize, int id) { - uintptr_t personal = reinterpret_cast(this); - std::string initName = "/TnrCam" + std::to_string(personal) + std::to_string(id) + "Shm"; - ShmMemInfo shm; - shm.mName = initName.c_str(); - shm.mSize = bufSize; - bool ret = mCommon.allocShmMem(shm.mName, shm.mSize, &shm, GPU_ALGO_SHM); - CheckAndLogError(!ret, nullptr, "@%s, allocShmMem fails", __func__); - mTnrRequestInfo->surfaceHandle = shm.mHandle; - mTnrRequestInfo->type = mTnrType; - mTnrRequestInfo->cameraId = mCameraId; - - int32_t requestHandle = - mCommon.getShmMemHandle(static_cast(mTnrRequestInfo), GPU_ALGO_SHM); - ret = mCommon.requestSync(IPC_GPU_TNR_PREPARE_SURFACE, requestHandle); - if (!ret) { - mCommon.freeShmMem(shm, GPU_ALGO_SHM); - return nullptr; - } - mCamBufMems.push_back(shm); - - return shm.mAddr; -} - -void IntelTNR7US::freeAllBufs() { - if (mParamMems.mAddr) { - mCommon.freeShmMem(mParamMems, GPU_ALGO_SHM); - } - for (auto& camBuf : mCamBufMems) { - if (camBuf.mAddr) { - mCommon.freeShmMem(camBuf, GPU_ALGO_SHM); - } - } -} - -Tnr7Param* IntelTNR7US::allocTnr7ParamBuf() { - uintptr_t personal = reinterpret_cast(this); - std::string initName = "/TnrParam" + std::to_string(personal) + "Shm"; - - mParamMems.mName = initName.c_str(); - mParamMems.mSize = sizeof(Tnr7Param); - bool ret = mCommon.allocShmMem(mParamMems.mName, mParamMems.mSize, &mParamMems, GPU_ALGO_SHM); - CheckAndLogError(!ret, nullptr, "@%s, allocShmMem fails", __func__); - - return reinterpret_cast(mParamMems.mAddr); -} - -int IntelTNR7US::asyncParamUpdate(int gain, bool forceUpdate) { - LOG2("%s, type: %d, gain: %d, forceUpdate: %d", __func__, mTnrType, gain, forceUpdate); - mTnrRequestInfo->gain = gain; - mTnrRequestInfo->type = mTnrType; - mTnrRequestInfo->cameraId = mCameraId; - mTnrRequestInfo->isForceUpdate = forceUpdate; - - int32_t requestHandle = - mCommon.getShmMemHandle(static_cast(mTnrRequestInfo), GPU_ALGO_SHM); - - IPC_CMD cmd = mTnrType > 0 ? IPC_GPU_TNR_THREAD2_PARAM_UPDATE : IPC_GPU_TNR_PARAM_UPDATE; - bool ret = mCommon.requestSync(cmd, requestHandle); - - CheckAndLogError(!ret, UNKNOWN_ERROR, "@%s, IPC_GPU_TNR_PARAM_UPDATE requestSync fails", - __func__); - return OK; -} - -int IntelTNR7US::getSurfaceInfo(int width, int height, uint32_t* size) { - mTnrRequestInfo->width = width; - mTnrRequestInfo->height = height; - mTnrRequestInfo->type = mTnrType; - mTnrRequestInfo->cameraId = mCameraId; - - int32_t requestHandle = - mCommon.getShmMemHandle(static_cast(mTnrRequestInfo), GPU_ALGO_SHM); - - bool ret = mCommon.requestSync(IPC_GPU_TNR_GET_SURFACE_INFO, requestHandle); - CheckAndLogError(!ret, UNKNOWN_ERROR, "@%s, IPC_GPU_TNR_GET_SURFACE_INFO requestSync fails", - __func__); - if (size) *size = mTnrRequestInfo->surfaceSize; - return OK; -} -} // namespace icamera diff --git a/modules/sandboxing/client/IntelTNR7USClient.h b/modules/sandboxing/client/IntelTNR7USClient.h deleted file mode 100644 index bc3b89c7..00000000 --- a/modules/sandboxing/client/IntelTNR7USClient.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2020-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#include "BufferQueue.h" -#include "CameraBuffer.h" -#include "Parameters.h" -#include "PlatformData.h" -#include "TNRCommon.h" - -namespace icamera { - -class IntelTNR7US { - public: - explicit IntelTNR7US(int cameraId); - ~IntelTNR7US(); - int init(int width, int height, TnrType type); - int runTnrFrame(const void* inBufAddr, void* outBufAddr, uint32_t inBufSize, - uint32_t outBufSize, Tnr7Param* tnrParam, bool syncUpdate, int fd = -1); - Tnr7Param* allocTnr7ParamBuf(); - void* allocCamBuf(uint32_t bufSize, int id); - void freeAllBufs(); - int asyncParamUpdate(int gain, bool forceUpdate); - int getSurfaceInfo(int width, int height, uint32_t* size); - - private: - int mCameraId; - TnrType mTnrType; - IntelAlgoCommon mCommon; - TnrRequestInfo* mTnrRequestInfo; - std::vector mCamBufMems; - ShmMemInfo mParamMems; - ShmMemInfo mTnrRequestInfoMem; - DISALLOW_COPY_AND_ASSIGN(IntelTNR7US); -}; -} // namespace icamera diff --git a/modules/sandboxing/server/CMakeLists.txt b/modules/sandboxing/server/CMakeLists.txt deleted file mode 100644 index 8aa73668..00000000 --- a/modules/sandboxing/server/CMakeLists.txt +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright (C) 2019-2021 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -cmake_minimum_required(VERSION 2.8) - -project(libcam_algo) - -include_directories(${USR_INCLUDE_HEADER}/ia_imaging) -include_directories(${IUTILS_DIR}) - -set(LIBCAM_ALGO_SRCS - ${IUTILS_DIR}/Utils.cpp - ${IUTILS_DIR}/Trace.cpp - ${IUTILS_DIR}/ScopedAtrace.cpp - ${IUTILS_DIR}/Thread.cpp - ${IUTILS_DIR}/CameraLog.cpp - ${PLATFORMDATA_DIR}/gc/GraphUtils.cpp - ${SANDBOXING_DIR}/IPCCommon.cpp - ${SANDBOXING_DIR}/IPCIntelLard.cpp - ${SANDBOXING_DIR}/IPCIntelFD.cpp - ${SANDBOXING_DIR}/server/IntelFDServer.cpp - ${SANDBOXING_DIR}/IPCGraphConfig.cpp - ${SANDBOXING_DIR}/server/IntelAlgoServer.cpp - ${SANDBOXING_DIR}/server/IntelLardServer.cpp - ${SANDBOXING_DIR}/server/GraphConfigServer.cpp - ${MODULES_DIR}/algowrapper/IntelLard.cpp - ${MODULES_DIR}/algowrapper/IntelFaceDetection.cpp - ${MODULES_DIR}/algowrapper/graph/GraphConfigImpl.cpp - ${MODULES_DIR}/algowrapper/graph/GraphConfigPipe.cpp - CACHE INTERNAL "libcam_algo sources" - ) - -add_library(libcam_algo SHARED ${LIBCAM_ALGO_SRCS}) - -find_package(LIBCAB) -find_package(LIBMOJO) -find_package(IA_IMAGING) -find_package(LIBIACSS) - -include_directories(${IA_IMAGING_INCLUDE_DIRS}) -include_directories(${LIBCAB_INCLUDE_DIRS}) -include_directories(${LIBMOJO_INCLUDE_DIRS}) -include_directories(${SRC_ROOT_DIR}/fd/FaceBase.h) -include_directories(${LIBIACSS_INCLUDE_DIRS}) - -link_directories(${CMAKE_PREFIX_PATH} - ${LIBMOJO_LIBS} - ${LIBCAB_LIBS} - ) - -target_link_libraries(libcam_algo ${LIBCAB_LIBS}) -target_link_libraries(libcam_algo ${LIBMOJO_LIBS}) -target_link_libraries(libcam_algo ${CMAKE_PREFIX_PATH}/libia_lard.so) -target_link_libraries(libcam_algo ${IA_IMAGING_LIBS}) -target_link_libraries(libcam_algo ${LIBIACSS_LIBS}) - -if (FACE_DETECTION) - target_link_libraries(libcam_algo pvl_eye_detection pvl_face_detection pvl_mouth_detection) -endif() - -install(TARGETS libcam_algo LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -set_target_properties(libcam_algo PROPERTIES OUTPUT_NAME "cam_algo") diff --git a/modules/sandboxing/server/GraphConfigServer.cpp b/modules/sandboxing/server/GraphConfigServer.cpp deleted file mode 100644 index 99c55840..00000000 --- a/modules/sandboxing/server/GraphConfigServer.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG GraphConfigServer - -#include "modules/sandboxing/server/GraphConfigServer.h" - -#include -#include - -#include "CameraLog.h" -#include "iutils/Utils.h" - -namespace icamera { -GraphConfigServer::GraphConfigServer() { - LOG1("@%s", __func__); -} - -GraphConfigServer::~GraphConfigServer() { - LOG1("@%s", __func__); -} - -void GraphConfigServer::addCustomKeyMap() { - std::shared_ptr graphConfigImpl = std::make_shared(); - graphConfigImpl->addCustomKeyMap(); -} - -status_t GraphConfigServer::parse(void* pData, size_t dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - - GraphParseParams* parseParam = nullptr; - bool ret = mIpc.serverUnflattenParse(pData, dataSize, &parseParam); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverUnflattenParse fails", __func__); - - std::shared_ptr graphConfigImpl = std::make_shared(); - status_t rt = graphConfigImpl->parse(parseParam->cameraId, parseParam->GD, parseParam->gdSize, - parseParam->GS, parseParam->gsSize); - CheckAndLogError(rt != OK, UNKNOWN_ERROR, "@%s, Failed to parse the graph xml data", __func__); - - return OK; -} - -void GraphConfigServer::releaseGraphNodes() { - if (mGraphConfigMap.empty()) return; - mGraphConfigMap.begin()->second->releaseGraphNodes(); -} - -status_t GraphConfigServer::queryGraphSettings(void* pData, size_t dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - - GraphBaseInfo info; - GraphSettingType type; - std::vector streams; - bool dummyStillSink; - bool ret = - mIpc.serverUnflattenConfigStreams(pData, dataSize, &info, &type, &dummyStillSink, &streams); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, clientFlattenConfigStreams fails", - __func__); - - GraphQueryGraphParams* params = static_cast(pData); - std::shared_ptr graphConfigImpl = - std::make_shared(info.cameraId, info.configMode, type); - params->isHasGraphSettings = graphConfigImpl->queryGraphSettings(streams); - - return OK; -} - -status_t GraphConfigServer::configStreams(void* pData, size_t dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - - GraphBaseInfo info; - GraphSettingType type; - std::vector streams; - bool dummyStillSink; - bool ret = - mIpc.serverUnflattenConfigStreams(pData, dataSize, &info, &type, &dummyStillSink, &streams); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverUnflattenConfigStreams fails", - __func__); - - // release the old item - auto it = mGraphConfigMap.find(info); - if (it != mGraphConfigMap.end()) { - mGraphConfigMap.erase(it); - } - LOG1(" @%s configMode: %d, settingType: %d, dummyStillSink: %d", info.cameraId, __func__, - info.configMode, type, dummyStillSink); - std::shared_ptr graphConfigImpl = - std::make_shared(info.cameraId, info.configMode, type); - status_t rt = graphConfigImpl->configStreams(streams, dummyStillSink); - CheckAndLogError(rt != OK, ret, " @%s, Failed to configStreams, configMode: %d", - info.cameraId, __func__, info.configMode); - - mGraphConfigMap[info] = graphConfigImpl; - - return OK; -} - -status_t GraphConfigServer::getGraphConfigData(void* pData, size_t dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - - GraphBaseInfo info; - bool ret = mIpc.serverUnflattenGetGraphData(pData, dataSize, &info); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverUnflattenGetGraphData fails", - __func__); - - auto it = mGraphConfigMap.find(info); - CheckAndLogError(it == mGraphConfigMap.end(), UNKNOWN_ERROR, - " @%s, Failed to find the graph config", info.cameraId, __func__); - - IGraphType::GraphConfigData graphData; - status_t rt = it->second->getGraphConfigData(&graphData); - CheckAndLogError(rt != OK, UNKNOWN_ERROR, " @%s, Failed to getGraphConfigData", - info.cameraId, __func__); - - ret = mIpc.serverFlattenGetGraphData(pData, dataSize, graphData); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverFlattenGetGraphData fails", __func__); - - return OK; -} - -status_t GraphConfigServer::getPgIdForKernel(void* pData, size_t dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - - uint32_t streamId = -1; - int32_t kernelId = 0; - GraphBaseInfo info; - bool ret = mIpc.serverUnFlattenGetPgId(pData, dataSize, &info, &streamId, &kernelId); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverUnFlattenGetPgId fails", __func__); - - auto it = mGraphConfigMap.find(info); - CheckAndLogError(it == mGraphConfigMap.end(), UNKNOWN_ERROR, - " @%s, Failed to find the graph config", info.cameraId, __func__); - - int32_t pgId = -1; - it->second->getPgIdForKernel(streamId, kernelId, &pgId); - - ret = mIpc.serverFlattenGetPgId(pData, dataSize, pgId); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverFlattenGetPgId fails", __func__); - - return OK; -} - -status_t GraphConfigServer::pipelineGetConnections(void* pData, size_t dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - - GraphBaseInfo info; - std::vector pgList; - bool ret = mIpc.serverUnFlattenGetConnection(pData, dataSize, &info, &pgList); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverUnFlattenGetPgId fails", __func__); - - auto it = mGraphConfigMap.find(info); - CheckAndLogError(it == mGraphConfigMap.end(), UNKNOWN_ERROR, - " @%s, Failed to find the graph config", info.cameraId, __func__); - - std::vector confVector; - std::vector scalerInfo; - std::vector tnrPortFormat; - status_t rt = - it->second->pipelineGetConnections(pgList, &scalerInfo, &confVector, &tnrPortFormat); - CheckAndLogError(rt != OK, UNKNOWN_ERROR, " @%s, Failed to getConnection", info.cameraId, - __func__); - - ret = mIpc.serverFlattenGetConnection(pData, dataSize, scalerInfo, confVector, tnrPortFormat); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverFlattenGetPgId fails", __func__); - - return OK; -} -} // namespace icamera diff --git a/modules/sandboxing/server/GraphConfigServer.h b/modules/sandboxing/server/GraphConfigServer.h deleted file mode 100644 index 309fac08..00000000 --- a/modules/sandboxing/server/GraphConfigServer.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2019-2020 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include "iutils/Errors.h" -#include "modules/algowrapper/graph/GraphConfigImpl.h" -#include "modules/sandboxing/IPCGraphConfig.h" - -namespace icamera { -class GraphConfigServer { - public: - GraphConfigServer(); - virtual ~GraphConfigServer(); - - void addCustomKeyMap(); - status_t parse(void* pData, size_t dataSize); - void releaseGraphNodes(); - status_t queryGraphSettings(void* pData, size_t dataSize); - status_t configStreams(void* pData, size_t dataSize); - status_t getGraphConfigData(void* pData, size_t dataSize); - status_t getPgIdForKernel(void* pData, size_t dataSize); - status_t pipelineGetConnections(void* pData, size_t dataSize); - - private: - std::map > mGraphConfigMap; - IPCGraphConfig mIpc; -}; -} /* namespace icamera */ diff --git a/modules/sandboxing/server/IntelAlgoServer.cpp b/modules/sandboxing/server/IntelAlgoServer.cpp deleted file mode 100644 index b91235d1..00000000 --- a/modules/sandboxing/server/IntelAlgoServer.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelAlgoServer - -#include "modules/sandboxing/server/IntelAlgoServer.h" - -#include -#include -#include -#include - -#include -#include - -#include "iutils/Utils.h" -#ifndef GPU_ALGO_SERVER -#include "modules/sandboxing/server/IntelCPUAlgoServer.h" -#else -#include "modules/sandboxing/server/IntelGPUAlgoServer.h" -#endif - -namespace icamera { - -IntelAlgoServer* IntelAlgoServer::mInstance = nullptr; - -void IntelAlgoServer::init() { - if (mInstance == nullptr) { - mInstance = new IntelAlgoServer; - } -} - -void IntelAlgoServer::deInit() { - delete mInstance; - mInstance = nullptr; -} - -IntelAlgoServer::IntelAlgoServer() : mCallback(nullptr) { - ia_env env = {&Log::ccaPrintInfo, &Log::ccaPrintError, &Log::ccaPrintInfo}; - ia_log_init(&env); - - for (int i = 0; i < kThreadNum; i++) { - std::string name = IntelAlgoServerThreadName(i); - mThreads[i] = std::unique_ptr(new base::Thread(name)); - mThreads[i]->Start(); - } -#ifndef GPU_ALGO_SERVER - mRequestHandler = std::unique_ptr(new IntelCPUAlgoServer(this)); -#else - mRequestHandler = std::unique_ptr(new IntelGPUAlgoServer(this)); -#endif - - for (int32_t i = 1; i <= HANDLE_INDEX_MAX_VALUE; i++) { - mHandlesQueue.push(i); - } - - LOG1("@%s Construct done, %d threads started", __func__, kThreadNum); -} - -IntelAlgoServer::~IntelAlgoServer() { - LOG1("@%s Destroy", __func__); - ia_log_deinit(); -} - -int32_t IntelAlgoServer::initialize(const camera_algorithm_callback_ops_t* callback_ops) { - CheckAndLogError((!callback_ops), -EINVAL, "@%s, the callback_ops is nullptr", __func__); - LOG1("@%s, callback_ops:%p", __func__, callback_ops); - - mCallback = callback_ops; - - return 0; -} - -int32_t IntelAlgoServer::registerBuffer(int buffer_fd) { - std::lock_guard l(mRegisterBufMutex); - CheckAndLogError((mHandles.find(buffer_fd) != mHandles.end()), -EINVAL, - "@%s, Buffer already registered", __func__); - CheckAndLogError(mHandlesQueue.empty(), -EBADFD, "@%s, Failed to get buffer handle index", - __func__); - - struct stat sb; - int ret = fstat(buffer_fd, &sb); - CheckAndLogError((ret == -1), -EBADFD, "@%s, Failed to get buffer status", __func__); - - void* addr = mmap(0, sb.st_size, PROT_WRITE, MAP_SHARED, buffer_fd, 0); - CheckAndLogError((!addr), -EBADFD, "@%s, Failed to map buffer", __func__); - - int32_t handle = mHandlesQueue.front(); - mHandlesQueue.pop(); - mHandles[buffer_fd] = handle; - - mShmInfoMap[handle].fd = buffer_fd; - mShmInfoMap[handle].addr = addr; - mShmInfoMap[handle].size = sb.st_size; - - return handle; -} - -int IntelAlgoServer::parseReqHeader(const uint8_t req_header[], uint32_t size) { - CheckAndLogError(size < IPC_REQUEST_HEADER_USED_NUM || req_header[0] != IPC_MATCHING_KEY, -1, - "@%s, fails, req_header[0]:%d, size:%d", __func__, req_header[0], size); - - return 0; -} - -void IntelAlgoServer::returnCallback(uint32_t req_id, status_t status, int32_t buffer_handle) { - (*mCallback->return_callback)(mCallback, req_id, status, buffer_handle); -} - -status_t IntelAlgoServer::getShmInfo(const int32_t buffer_handle, ShmInfo* memInfo) { - CheckAndLogError(!memInfo, UNKNOWN_ERROR, "%s, memInfo is nullptr", __func__); - if (buffer_handle == -1) return OK; - - CheckAndLogError(mShmInfoMap.find(buffer_handle) == mShmInfoMap.end(), UNKNOWN_ERROR, - "%s, Invalid buffer handle", __func__); - *memInfo = mShmInfoMap[buffer_handle]; - - return OK; -} - -void IntelAlgoServer::handleRequest(const MsgReq& msg) { - CheckAndLogError(!mRequestHandler, VOID_VALUE, "@%s, handler is null", __func__); - mRequestHandler->handleRequest(msg); -} - -void IntelAlgoServer::request(uint32_t req_id, const uint8_t req_header[], uint32_t size, - int32_t buffer_handle) { - IPC_GROUP group = IntelAlgoIpcCmdToGroup(static_cast(req_id)); - - int ret = parseReqHeader(req_header, size); - if (ret != 0) { - returnCallback(req_id, UNKNOWN_ERROR, buffer_handle); - return; - } - - MsgReq msg = {req_id, buffer_handle}; - -#ifndef GPU_ALGO_SERVER - int threadId = group; -#else - // GPU server thread id start from IPC_GROUP_GPU - int threadId = group - IPC_GROUP_GPU; -#endif - if (threadId >= 0 && threadId < kThreadNum) { - if (mThreads[threadId] && mThreads[threadId]->task_runner()) { - mThreads[threadId]->task_runner()->PostTask( - FROM_HERE, - base::Bind(&IntelAlgoServer::handleRequest, base::Unretained(this), msg)); - } - } -} - -void IntelAlgoServer::deregisterBuffers(const int32_t buffer_handles[], uint32_t size) { - std::lock_guard l(mRegisterBufMutex); - for (uint32_t i = 0; i < size; i++) { - int32_t handle = buffer_handles[i]; - if (mShmInfoMap.find(handle) == mShmInfoMap.end()) { - continue; - } - - mHandles.erase(mShmInfoMap[handle].fd); - - munmap(mShmInfoMap[handle].addr, mShmInfoMap[handle].size); - close(mShmInfoMap[handle].fd); - mShmInfoMap.erase(handle); - mHandlesQueue.push(handle); - } -} - -static int32_t initialize(const camera_algorithm_callback_ops_t* callback_ops) { - return IntelAlgoServer::getInstance()->initialize(callback_ops); -} - -static int32_t registerBuffer(int32_t buffer_fd) { - return IntelAlgoServer::getInstance()->registerBuffer(buffer_fd); -} - -static void request(uint32_t req_id, const uint8_t req_header[], uint32_t size, - int32_t buffer_handle) { - IntelAlgoServer::getInstance()->request(req_id, req_header, size, buffer_handle); -} - -static void deregisterBuffers(const int32_t buffer_handles[], uint32_t size) { - return IntelAlgoServer::getInstance()->deregisterBuffers(buffer_handles, size); -} - -extern "C" { -camera_algorithm_ops_t CAMERA_ALGORITHM_MODULE_INFO_SYM - __attribute__((__visibility__("default"))) = {.initialize = initialize, - .register_buffer = registerBuffer, - .request = request, - .deregister_buffers = deregisterBuffers}; -} - -__attribute__((constructor)) void initIntelAlgoServer() { - icamera::Log::setDebugLevel(); - IntelAlgoServer::init(); -} - -__attribute__((destructor)) void deinitIntelAlgoServer() { - IntelAlgoServer::deInit(); -} - -} /* namespace icamera */ diff --git a/modules/sandboxing/server/IntelAlgoServer.h b/modules/sandboxing/server/IntelAlgoServer.h deleted file mode 100644 index d7b7cf61..00000000 --- a/modules/sandboxing/server/IntelAlgoServer.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2019-2020 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include -#include -#include -#include - -#include "CameraLog.h" -#include "cros-camera/camera_algorithm.h" -#include "iutils/Errors.h" -#include "iutils/Thread.h" -#include "iutils/Utils.h" -#include "modules/sandboxing/IPCCommon.h" - -namespace icamera { - -#define HANDLE_INDEX_MAX_VALUE 1024 -struct MsgReq { - uint32_t req_id; - int32_t buffer_handle; -}; - -typedef struct { - int32_t fd; - void* addr; - size_t size; -} ShmInfo; - -class IntelAlgoServer; -class RequestHandler { - public: - explicit RequestHandler(IntelAlgoServer* server) { mIntelAlgoServer = server; } - virtual ~RequestHandler() {} - virtual void handleRequest(const MsgReq& msg) = 0; - IntelAlgoServer* getIntelAlgoServer() { return mIntelAlgoServer; } - - private: - IntelAlgoServer* mIntelAlgoServer; -}; - -class IntelAlgoServer { - public: - static void init(); - static void deInit(); - - static IntelAlgoServer* getInstance() { return mInstance; } - - int32_t initialize(const camera_algorithm_callback_ops_t* callback_ops); - int32_t registerBuffer(int buffer_fd); - void request(uint32_t req_id, const uint8_t req_header[], uint32_t size, int32_t buffer_handle); - void deregisterBuffers(const int32_t buffer_handles[], uint32_t size); - - void handleRequest(const MsgReq& msg); - status_t getShmInfo(const int32_t buffer_handle, ShmInfo* memInfo); - void returnCallback(uint32_t req_id, status_t status, int32_t buffer_handle); - - private: - IntelAlgoServer(); - ~IntelAlgoServer(); - int parseReqHeader(const uint8_t req_header[], uint32_t size); - - private: - static IntelAlgoServer* mInstance; -#ifndef GPU_ALGO_SERVER - static const int kThreadNum = IPC_CPU_GROUP_NUM; -#else - static const int kThreadNum = IPC_GPU_GROUP_NUM; -#endif - std::unique_ptr mThreads[kThreadNum]; - std::unique_ptr mRequestHandler; - - const camera_algorithm_callback_ops_t* mCallback; - - // key: shared memory fd from client - // value: handle that returns from RegisterBuffer() - std::unordered_map mHandles; - - // key: handle that returns from RegisterBuffer() - // value: shared memory fd and mapped address - std::unordered_map mShmInfoMap; - std::queue mHandlesQueue; - std::mutex mRegisterBufMutex; - - DISALLOW_COPY_AND_ASSIGN(IntelAlgoServer); -}; -} /* namespace icamera */ diff --git a/modules/sandboxing/server/IntelCPUAlgoServer.cpp b/modules/sandboxing/server/IntelCPUAlgoServer.cpp deleted file mode 100644 index 437917f6..00000000 --- a/modules/sandboxing/server/IntelCPUAlgoServer.cpp +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Copyright (C) 2020-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelCPUAlgoServer - -#include "modules/sandboxing/server/IntelCPUAlgoServer.h" - -#include -#include -#include -#include - -#include -#include - -#include "iutils/Utils.h" - -namespace icamera { - -// Common check before the function call -#define FUNCTION_PREPARED_RETURN \ - uint16_t key = getKey(p->cameraId, p->tuningMode); \ - if (mCcas.find(key) == mCcas.end()) { \ - LOGE("@%s, req_id:%d, it doesn't find the cca", __func__, req_id); \ - status = UNKNOWN_ERROR; \ - break; \ - } - -IntelCPUAlgoServer::~IntelCPUAlgoServer() { - for (auto& it : mCcas) { - delete it.second; - } -} - -void IntelCPUAlgoServer::handleRequest(const MsgReq& msg) { - uint32_t req_id = msg.req_id; - int32_t buffer_handle = msg.buffer_handle; - - ShmInfo info = {}; - status_t status = getIntelAlgoServer()->getShmInfo(buffer_handle, &info); - if (status != OK) { - LOGE("@%s, Invalid buffer handle", __func__); - getIntelAlgoServer()->returnCallback(req_id, UNKNOWN_ERROR, buffer_handle); - return; - } - - size_t requestSize = info.size; - void* addr = info.addr; - - switch (req_id) { - case IPC_FD_INIT: - status = mFaceDetection.init(addr, requestSize); - break; - case IPC_FD_RUN: { - FaceDetectionRunParams* palParams = static_cast(addr); - void* addrImage = nullptr; - if (palParams->bufferHandle >= 0) { - ShmInfo imageDataInfo; - status = getIntelAlgoServer()->getShmInfo(palParams->bufferHandle, &imageDataInfo); - if (status != OK) { - LOGE("%s, the buffer handle for image data is invalid", __func__); - break; - } - addrImage = imageDataInfo.addr; - } - status = mFaceDetection.run(addr, requestSize, addrImage); - break; - } - case IPC_FD_DEINIT: - status = mFaceDetection.deinit(addr, requestSize); - break; - case IPC_GRAPH_ADD_KEY: - mGraph.addCustomKeyMap(); - break; - case IPC_GRAPH_PARSE: - mGraph.parse(addr, requestSize); - break; - case IPC_GRAPH_RELEASE_NODES: - mGraph.releaseGraphNodes(); - break; - case IPC_GRAPH_QUERY_GRAPH_SETTINGS: - status = mGraph.queryGraphSettings(addr, requestSize); - break; - case IPC_GRAPH_CONFIG_STREAMS: - mGraph.configStreams(addr, requestSize); - break; - case IPC_GRAPH_GET_CONFIG_DATA: - mGraph.getGraphConfigData(addr, requestSize); - break; - case IPC_GRAPH_GET_CONNECTION: - mGraph.pipelineGetConnections(addr, requestSize); - break; - case IPC_GRAPH_GET_PG_ID: - mGraph.getPgIdForKernel(addr, requestSize); - break; - case IPC_CCA_CONSTRUCT: { - intel_cca_struct_data* p = static_cast(addr); - uint16_t key = getKey(p->cameraId, p->tuningMode); - if (mCcas.find(key) != mCcas.end()) { - delete mCcas[key]; - mCcas.erase(key); - } - - mCcas[key] = new IntelCcaServer(p->cameraId, p->tuningMode); - - break; - } - case IPC_CCA_DESTRUCT: { - intel_cca_struct_data* p = static_cast(addr); - uint16_t key = getKey(p->cameraId, p->tuningMode); - if (mCcas.find(key) == mCcas.end()) { - LOGE("@%s, req_id:%d, it doesn't find the cca", __func__, req_id); - status = UNKNOWN_ERROR; - break; - } - - delete mCcas[key]; - mCcas.erase(key); - - break; - } - case IPC_CCA_INIT: { - intel_cca_init_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - status = mCcas[key]->init(addr, requestSize); - break; - } - case IPC_CCA_SET_STATS: { - intel_cca_set_stats_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - status = mCcas[key]->setStats(addr, requestSize); - break; - } - case IPC_CCA_RUN_AEC: { - intel_cca_run_aec_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - status = mCcas[key]->runAEC(addr, requestSize); - break; - } - case IPC_CCA_RUN_AIQ: { - intel_cca_run_aiq_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - status = mCcas[key]->runAIQ(addr, requestSize); - break; - } - case IPC_CCA_RUN_LTM: { - intel_cca_run_ltm_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - status = mCcas[key]->runLTM(addr, requestSize); - break; - } - case IPC_CCA_UPDATE_ZOOM: { - intel_cca_update_zoom_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - status = mCcas[key]->updateZoom(addr, requestSize); - break; - } - case IPC_CCA_RUN_DVS: { - intel_cca_run_dvs_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - status = mCcas[key]->runDVS(addr, requestSize); - break; - } - case IPC_CCA_RUN_AIC: { - status = UNKNOWN_ERROR; - intel_cca_run_aic_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - if (p->palDataHandle >= 0) { - ShmInfo inParamsInfo = {}; - status = getIntelAlgoServer()->getShmInfo(p->inParamsHandle, &inParamsInfo); - if (status != OK) { - LOGE("%s, the buffer handle for inParamsHandle is invalid", __func__); - break; - } - p->inParams = static_cast(inParamsInfo.addr); - - ShmInfo palDataInfo = {}; - status = getIntelAlgoServer()->getShmInfo(p->palDataHandle, &palDataInfo); - if (status != OK) { - LOGE("%s, the buffer handle for palDataHandle is invalid", __func__); - break; - } - p->palOutData.data = palDataInfo.addr; - - status = mCcas[key]->runAIC(addr, requestSize); - } - break; - } - case IPC_CCA_GET_CMC: { - intel_cca_get_cmc_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - status = mCcas[key]->getCMC(addr, requestSize); - break; - } - case IPC_CCA_GET_MKN: { - intel_cca_mkn_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - if (p->resultsHandle >= 0) { - ShmInfo paramsInfo = {}; - status = getIntelAlgoServer()->getShmInfo(p->resultsHandle, ¶msInfo); - if (status != OK) { - LOGE("%s, the buffer handle for resultsHandle is invalid", __func__); - break; - } - p->results = static_cast(paramsInfo.addr); - } - status = mCcas[key]->getMKN(addr, requestSize); - break; - } - case IPC_CCA_GET_AIQD: { - intel_cca_get_aiqd_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - status = mCcas[key]->getAiqd(addr, requestSize); - break; - } - case IPC_CCA_UPDATE_TUNING: { - intel_cca_update_tuning_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - mCcas[key]->updateTuning(addr, requestSize); - break; - } - case IPC_CCA_DEINIT: { - intel_cca_deinit_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - status = mCcas[key]->deinit(addr, requestSize); - break; - } - case IPC_CCA_DECODE_STATS: { - intel_cca_decode_stats_data* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - ShmInfo info = {}; - status = getIntelAlgoServer()->getShmInfo(p->statsHandle, &info); - if (status != OK) { - LOGE("%s, the buffer handle for stats data is invalid", __func__); - break; - } - status = mCcas[key]->decodeStats(addr, requestSize, info.addr); - break; - } - case IPC_CCA_GET_PAL_SIZE: { - intel_cca_get_pal_data_size* p = static_cast(addr); - FUNCTION_PREPARED_RETURN - - status = mCcas[key]->getPalDataSize(addr, requestSize); - break; - } - case IPC_PG_PARAM_INIT: - status = mPGParam.init(addr, requestSize); - break; - case IPC_PG_PARAM_PREPARE: { - pg_param_prepare_params* prepareParams = static_cast(addr); - ShmInfo palDataInfo = {}; - status = getIntelAlgoServer()->getShmInfo(prepareParams->ipuParamHandle, &palDataInfo); - if (status != OK) { - LOGE("%s, the buffer handle for pal data is invalid", __func__); - break; - } - status = mPGParam.prepare(addr, requestSize, palDataInfo.addr); - break; - } - case IPC_PG_PARAM_ALLOCATE_PG: - status = mPGParam.allocatePGBuffer(addr, requestSize); - break; - case IPC_PG_PARAM_GET_FRAG_DESCS: - status = mPGParam.getFragmentDescriptors(addr, requestSize); - break; - case IPC_PG_PARAM_PREPARE_PROGRAM: - status = mPGParam.setPGAndPrepareProgram(addr, requestSize); - break; - case IPC_PG_PARAM_REGISTER_PAYLOADS: - status = mPGParam.registerPayloads(addr, requestSize); - break; - case IPC_PG_PARAM_ENCODE: { - pg_param_encode_params* encodeParams = static_cast(addr); - ShmInfo palDataInfo = {}; - status = getIntelAlgoServer()->getShmInfo(encodeParams->ipuParamHandle, &palDataInfo); - if (status != OK) { - LOGE("%s, the buffer handle for pal data is invalid", __func__); - break; - } - status = mPGParam.updatePALAndEncode(addr, requestSize, palDataInfo.addr); - break; - } - case IPC_PG_PARAM_DECODE: { - pg_param_decode_params* decodeParams = static_cast(addr); - ShmInfo decodeInfo = {}; - status = getIntelAlgoServer()->getShmInfo(decodeParams->clientStatsHandle, &decodeInfo); - if (status == OK) { - status = mPGParam.decode(addr, requestSize, decodeInfo.addr); - } else { - LOGE("%s, the buffer handle for stats data is invalid", __func__); - } - break; - } - case IPC_PG_PARAM_DEINIT: - mPGParam.deinit(addr, requestSize); - break; - default: - LOGE("@%s, req_id:%d is not defined", __func__, req_id); - status = UNKNOWN_ERROR; - break; - } - - LOG2("@%s, req_id:%d:%s, status:%d", __func__, req_id, - IntelAlgoIpcCmdToString(static_cast(req_id)), status); - getIntelAlgoServer()->returnCallback(req_id, status, buffer_handle); -} - -uint16_t IntelCPUAlgoServer::getKey(int cameraId, TuningMode mode) { - return ((cameraId & 0xFF) << 8) + (mode & 0xFF); -} -} // namespace icamera diff --git a/modules/sandboxing/server/IntelCPUAlgoServer.h b/modules/sandboxing/server/IntelCPUAlgoServer.h deleted file mode 100644 index 5384dcd4..00000000 --- a/modules/sandboxing/server/IntelCPUAlgoServer.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2020 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include -#include -#include - -#include "CameraLog.h" -#include "GraphConfigServer.h" -#include "IntelAlgoServer.h" -#include "IntelCcaServer.h" -#include "IntelFDServer.h" -#include "IntelPGParamServer.h" -#include "cros-camera/camera_algorithm.h" -#include "iutils/Errors.h" -#include "iutils/Thread.h" -#include "modules/sandboxing/IPCCommon.h" - -namespace icamera { - -class IntelCPUAlgoServer : public RequestHandler { - public: - explicit IntelCPUAlgoServer(IntelAlgoServer* server) : RequestHandler(server) {} - virtual ~IntelCPUAlgoServer(); - void handleRequest(const MsgReq& msg); - - private: - uint16_t getKey(int cameraId, TuningMode mode); - - private: - IntelFDServer mFaceDetection; - GraphConfigServer mGraph; - IntelPGParamServer mPGParam; - std::unordered_map mCcas; -}; -} // namespace icamera diff --git a/modules/sandboxing/server/IntelCcaServer.cpp b/modules/sandboxing/server/IntelCcaServer.cpp deleted file mode 100644 index 0032dde9..00000000 --- a/modules/sandboxing/server/IntelCcaServer.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelCcaServer - -#include "modules/sandboxing/server/IntelCcaServer.h" - -#include -#include -#include - -#include "CameraLog.h" -#include "iutils/Utils.h" -#include "modules/sandboxing/IPCGraphConfig.h" - -namespace icamera { -IntelCcaServer::IntelCcaServer(int cameraId, TuningMode mode) - : mCameraId(cameraId), - mTuningMode(mode), - mCca(nullptr) { - LOG1("@%s, mode:%d", cameraId, __func__, mode); - - mCca = IntelCca::getInstance(cameraId, mode); - CheckAndLogError(!mCca, VOID_VALUE, "%s, IntelCca::getInstance fails, cameraId(%d), mode(%d)", - __func__, mCameraId, mTuningMode); -} - -IntelCcaServer::~IntelCcaServer() { - LOG1("@%s", __func__); - - IntelCca::releaseInstance(mCameraId, mTuningMode); -} - -status_t IntelCcaServer::init(void* pData, int dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_init_data* params = static_cast(pData); - LOG1("@%s, params->bitmap:0x%x", __func__, params->inParams.bitmap); - - ia_err ret = mCca->init(params->inParams); - CheckAndLogError(ret != ia_err_none, UNKNOWN_ERROR, "@%s, fails: %d", __func__, ret); - - return OK; -} - -status_t IntelCcaServer::setStats(void* pData, int dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_set_stats_data* params = static_cast(pData); - - ia_err ret = mCca->setStatsParams(params->inParams); - CheckAndLogError(ret != ia_err_none, UNKNOWN_ERROR, "@%s, fails: %d", __func__, ret); - - return OK; -} - -status_t IntelCcaServer::runAEC(void* pData, int dataSize) { - PERF_CAMERA_ATRACE(); - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_run_aec_data* params = static_cast(pData); - - ia_err ret = mCca->runAEC(params->frameId, params->inParams, ¶ms->results); - CheckAndLogError(ret != ia_err_none, UNKNOWN_ERROR, "@%s, fails: %d", __func__, ret); - - return OK; -} - -status_t IntelCcaServer::runAIQ(void* pData, int dataSize) { - PERF_CAMERA_ATRACE(); - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_run_aiq_data* params = static_cast(pData); - - ia_err ret = mCca->runAIQ(params->frameId, params->inParams, ¶ms->results); - CheckAndLogError(ret != ia_err_none, UNKNOWN_ERROR, "@%s, fails: %d", __func__, ret); - - return OK; -} - -status_t IntelCcaServer::runLTM(void* pData, int dataSize) { - PERF_CAMERA_ATRACE(); - - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_run_ltm_data* params = static_cast(pData); - - ia_err ret = mCca->runLTM(params->frameId, params->inParams); - CheckAndLogError(ret != ia_err_none, UNKNOWN_ERROR, "@%s, fails: %d", __func__, ret); - - return OK; -} - -status_t IntelCcaServer::updateZoom(void* pData, int dataSize) { - PERF_CAMERA_ATRACE(); - - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_update_zoom_data* params = static_cast(pData); - - ia_err ret = mCca->updateZoom(params->streamId, params->inParams); - CheckAndLogError(ret != ia_err_none, UNKNOWN_ERROR, "@%s, fails: %d", __func__, ret); - - return OK; -} - -status_t IntelCcaServer::runDVS(void* pData, int dataSize) { - PERF_CAMERA_ATRACE(); - - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_run_dvs_data* params = static_cast(pData); - - ia_err ret = mCca->runDVS(params->streamId, params->frameId); - CheckAndLogError(ret != ia_err_none, UNKNOWN_ERROR, "@%s, fails: %d", __func__, ret); - - return OK; -} - -status_t IntelCcaServer::runAIC(void* pData, int dataSize) { - PERF_CAMERA_ATRACE(); - - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_run_aic_data* params = static_cast(pData); - - bool retVal = unflattenProgramGroup(¶ms->inParams->program_group); - CheckAndLogError(retVal != true, UNKNOWN_ERROR, "@%s, unflattenProgramGroup fails", __func__); - - ia_err ret = mCca->runAIC(params->frameId, params->inParams, ¶ms->palOutData); - CheckAndLogError(ret != ia_err_none && ret != ia_err_not_run, ret, "@%s, fails: %d", __func__, - ret); - - return ret; -} - -status_t IntelCcaServer::getCMC(void* pData, int dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_get_cmc_data* params = static_cast(pData); - - ia_err ret = mCca->getCMC(¶ms->results); - CheckAndLogError(ret != ia_err_none, UNKNOWN_ERROR, "@%s, fails: %d", __func__, ret); - - return OK; -} - -status_t IntelCcaServer::getMKN(void* pData, int dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_mkn_data* params = static_cast(pData); - - ia_err ret = mCca->getMKN(params->type, params->results); - CheckAndLogError(ret != ia_err_none, UNKNOWN_ERROR, "@%s, fails: %d", __func__, ret); - - return OK; -} - -status_t IntelCcaServer::getAiqd(void* pData, int dataSize) { - PERF_CAMERA_ATRACE(); - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_get_aiqd_data* params = static_cast(pData); - - ia_err ret = mCca->getAiqd(¶ms->results); - CheckAndLogError(ret != ia_err_none, UNKNOWN_ERROR, "@%s, fails: %d", __func__, ret); - - return OK; -} - -status_t IntelCcaServer::updateTuning(void* pData, int dataSize) { - PERF_CAMERA_ATRACE(); - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_update_tuning_data* params = static_cast(pData); - - ia_err ret = mCca->updateTuning(params->lardTags, params->lardParams, params->nvmParams, - params->streamId); - CheckAndLogError(ret != ia_err_none, UNKNOWN_ERROR, "@%s, fails: %d", __func__, ret); - - return OK; -} - -status_t IntelCcaServer::deinit(void* pData, int dataSize) { - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - mCca->deinit(); - LOG1("@%s", __func__); - - return OK; -} - -status_t IntelCcaServer::decodeStats(void* pData, int dataSize, void* statsAddr) { - PERF_CAMERA_ATRACE(); - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(statsAddr == nullptr, UNKNOWN_ERROR, "@%s, statsAddr is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_decode_stats_data* params = static_cast(pData); - - if (params->statsBuffer.size > 0) { - params->statsBuffer.data = statsAddr; - } - - ia_err ret = mCca->decodeStats(reinterpret_cast(params->statsBuffer.data), - params->statsBuffer.size, params->bitmap, ¶ms->results, - ¶ms->outStats); - CheckAndLogError(ret != ia_err_none, UNKNOWN_ERROR, "@%s, fails: %d", __func__, ret); - - return OK; -} - -bool IntelCcaServer::unflattenProgramGroup(cca::cca_program_group* result) { - CheckAndLogError(!result, false, "@%s, result is nullptr", __func__); - CheckAndLogError(result->base.kernel_count > MAX_STREAM_KERNEL_COUNT, false, - "%s, the buffer of kernel array is too small", __func__); - - result->base.run_kernels = result->run_kernels; - for (unsigned j = 0; j < result->base.kernel_count; ++j) { - if (result->run_kernels[j].resolution_info) { - result->run_kernels[j].resolution_info = &result->resolution_info[j]; - } - - if (result->run_kernels[j].resolution_history) { - result->run_kernels[j].resolution_history = &result->resolution_history[j]; - } - } - if (result->base.pipe) { - result->base.pipe = result->pipe; - } - - return true; -} - -status_t IntelCcaServer::getPalDataSize(void* pData, int dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(mCca == nullptr, UNKNOWN_ERROR, "@%s, mCca is nullptr", __func__); - - intel_cca_get_pal_data_size* params = static_cast(pData); - bool ret = unflattenProgramGroup(¶ms->pg); - CheckAndLogError(ret != true, UNKNOWN_ERROR, "@%s, unflattenProgramGroup fails", __func__); - - uint32_t size = mCca->getPalDataSize(params->pg); - CheckAndLogError(size == 0, UNKNOWN_ERROR, "@%s, fails: %d", __func__, ret); - - params->returnSize = size; - - return OK; -} -} /* namespace icamera */ diff --git a/modules/sandboxing/server/IntelCcaServer.h b/modules/sandboxing/server/IntelCcaServer.h deleted file mode 100644 index 2b98cdb2..00000000 --- a/modules/sandboxing/server/IntelCcaServer.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2020 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "memory" -#include - -#include "iutils/Errors.h" -#include "modules/algowrapper/IntelCca.h" -#include "modules/sandboxing/IPCIntelCca.h" - -namespace icamera { -class IntelCcaServer { - public: - IntelCcaServer(int cameraId, TuningMode mode); - virtual ~IntelCcaServer(); - - status_t init(void* pData, int dataSize); - status_t setStats(void* pData, int dataSize); - status_t runAEC(void* pData, int dataSize); - status_t runAIQ(void* pData, int dataSize); - status_t runLTM(void* pData, int dataSize); - status_t updateZoom(void* pData, int dataSize); - status_t runDVS(void* pData, int dataSize); - status_t runAIC(void* pData, int dataSize); - status_t getCMC(void* pData, int dataSize); - status_t getMKN(void* pData, int dataSize); - status_t getAiqd(void* pData, int dataSize); - status_t updateTuning(void* pData, int dataSize); - status_t deinit(void* pData, int dataSize); - status_t decodeStats(void* pData, int dataSize, void* statsAddr); - status_t getPalDataSize(void* pData, int dataSize); - - private: - bool unflattenProgramGroup(cca::cca_program_group* result); - - private: - int mCameraId; - TuningMode mTuningMode; - - IntelCca* mCca; -}; -} /* namespace icamera */ diff --git a/modules/sandboxing/server/IntelEvcpServer.cpp b/modules/sandboxing/server/IntelEvcpServer.cpp deleted file mode 100644 index 602c1edc..00000000 --- a/modules/sandboxing/server/IntelEvcpServer.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelEVCPServer - -#include "modules/sandboxing/server/IntelEvcpServer.h" - -#include "CameraLog.h" -#include "iutils/Utils.h" - -namespace icamera { -int IntelEvcpServer::init(void* pData, int dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "%s, pData is nullptr", __func__); - CheckAndLogError(dataSize < static_cast(sizeof(EvcpResolution)), UNKNOWN_ERROR, - "%s, Buffer mismatch", __func__); - - EvcpResolution* res = reinterpret_cast(pData); - mIntelEvcp = std::unique_ptr(new IntelEvcp()); - - return mIntelEvcp->init(res->width, res->height); -} - -int IntelEvcpServer::deInit() { - mIntelEvcp = nullptr; - - return OK; -} - -int IntelEvcpServer::runEvcpFrame(void* bufferAddr, int size) { - CheckAndLogError(bufferAddr == nullptr, UNKNOWN_ERROR, "%s, Buffer is nullptr", __func__); - - return mIntelEvcp->runEvcpFrame(bufferAddr, size) ? OK : UNKNOWN_ERROR; -} - -int IntelEvcpServer::updateEvcpParam(EvcpParam* param) { - CheckAndLogError(param == nullptr, UNKNOWN_ERROR, "%s, new param is nullptr", __func__); - - return mIntelEvcp->updateEvcpParam(param) ? OK : UNKNOWN_ERROR; -} - -int IntelEvcpServer::getEvcpParam(EvcpParam* param) const { - CheckAndLogError(param == nullptr, UNKNOWN_ERROR, "%s, param is nullptr", __func__); - - mIntelEvcp->getEvcpParam(param); - - return OK; -} - -} // namespace icamera diff --git a/modules/sandboxing/server/IntelFDServer.cpp b/modules/sandboxing/server/IntelFDServer.cpp deleted file mode 100644 index 94640d5d..00000000 --- a/modules/sandboxing/server/IntelFDServer.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelFDServer - -#include "modules/sandboxing/server/IntelFDServer.h" - -#include - -#include "CameraLog.h" -#include "iutils/Utils.h" - -namespace icamera { -IntelFDServer::IntelFDServer() { - LOG1("@%s Construct", __func__); -} - -IntelFDServer::~IntelFDServer() { - LOG1("@%s Destroy", __func__); -} - -status_t IntelFDServer::init(void* pData, int dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(dataSize < static_cast(sizeof(FaceDetectionInitParams)), UNKNOWN_ERROR, - "@%s, buffer size: %d is small", __func__, dataSize); - - FaceDetectionInitParams* inParams = static_cast(pData); - if (mFaceDetection.find(inParams->cameraId) == mFaceDetection.end()) { - mFaceDetection[inParams->cameraId] = - std::unique_ptr(new IntelFaceDetection()); - } - - return mFaceDetection[inParams->cameraId]->init(inParams, dataSize); -} - -status_t IntelFDServer::run(void* pData, int dataSize, void* imageData) { - PERF_CAMERA_ATRACE(); - TRACE_LOG_PROCESS("IntelFDServer", "runFaceDetection"); - - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(dataSize < static_cast(sizeof(FaceDetectionRunParams)), UNKNOWN_ERROR, - "@%s, buffer size: %d is small", __func__, dataSize); - pvl_image image; - int cameraId; - FaceDetectionRunParams* pFdRunParams = static_cast(pData); - mIpcFD.serverUnflattenRun(*pFdRunParams, imageData, &image, &cameraId); - CheckAndLogError((mFaceDetection.find(cameraId) == mFaceDetection.end()), UNKNOWN_ERROR, - " @%s, mFaceDetection is nullptr", cameraId, __func__); - - return mFaceDetection[cameraId]->run(&image, &pFdRunParams->results); -} - -status_t IntelFDServer::deinit(void* pData, int dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(dataSize < static_cast(sizeof(FaceDetectionDeinitParams)), UNKNOWN_ERROR, - "@%s, buffer size: %d is small", __func__, dataSize); - - FaceDetectionDeinitParams* deinitParams = static_cast(pData); - CheckAndLogError((mFaceDetection.find(deinitParams->cameraId) == mFaceDetection.end()), - UNKNOWN_ERROR, " @%s, mFaceDetection is nullptr", deinitParams->cameraId, - __func__); - - return mFaceDetection[deinitParams->cameraId]->deinit(deinitParams, dataSize); -} -} /* namespace icamera */ diff --git a/modules/sandboxing/server/IntelGPUAlgoServer.cpp b/modules/sandboxing/server/IntelGPUAlgoServer.cpp deleted file mode 100644 index 9ceede73..00000000 --- a/modules/sandboxing/server/IntelGPUAlgoServer.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (C) 2020-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelGPUAlgoServer - -#include "modules/sandboxing/server/IntelGPUAlgoServer.h" - -#include -#include -#include -#include - -#include -#include - -#include "iutils/Utils.h" - -namespace icamera { - -void IntelGPUAlgoServer::handleRequest(const MsgReq& msg) { - uint32_t req_id = msg.req_id; - int32_t buffer_handle = msg.buffer_handle; - - ShmInfo info = {}; - status_t status = getIntelAlgoServer()->getShmInfo(buffer_handle, &info); - if (status != OK) { - LOGE("@%s, Invalid buffer handle", __func__); - getIntelAlgoServer()->returnCallback(req_id, UNKNOWN_ERROR, buffer_handle); - return; - } - - size_t requestSize = info.size; - void* addr = info.addr; - - switch (req_id) { -#ifdef TNR7_CM - case IPC_GPU_TNR_INIT: - status = mTNR.init(addr, requestSize); - break; - case IPC_GPU_TNR_GET_SURFACE_INFO: { - TnrRequestInfo* requestInfo = static_cast(addr); - status = mTNR.getSurfaceInfo(requestInfo); - break; - } - case IPC_GPU_TNR_PREPARE_SURFACE: { - TnrRequestInfo* requestInfo = static_cast(addr); - ShmInfo surfaceBuffer = {}; - if (requestInfo->surfaceHandle >= 0) { - status = - getIntelAlgoServer()->getShmInfo(requestInfo->surfaceHandle, &surfaceBuffer); - if (status != OK) { - LOGE("%s, the buffer handle for surfaceBuffer data is invalid", __func__); - break; - } - } - status = mTNR.prepareSurface(surfaceBuffer.addr, surfaceBuffer.size, requestInfo); - break; - } - case IPC_GPU_TNR_RUN_FRAME: - case IPC_GPU_TNR_THREAD2_RUN_FRAME: { - TnrRequestInfo* requestInfo = static_cast(addr); - ShmInfo inBuffer = {}; - ShmInfo outBuffer = {}; - ShmInfo paramBuffer = {}; - if (requestInfo->inHandle >= 0) { - status = getIntelAlgoServer()->getShmInfo(requestInfo->inHandle, &inBuffer); - if (status != OK) { - LOGE("%s, the buffer handle for inBuffer data is invalid", __func__); - break; - } - } - if (requestInfo->outHandle >= 0) { - status = getIntelAlgoServer()->getShmInfo(requestInfo->outHandle, &outBuffer); - if (status != OK) { - LOGE("%s, the buffer handle for outBuffer data is invalid", __func__); - break; - } - } - if (requestInfo->paramHandle >= 0) { - status = getIntelAlgoServer()->getShmInfo(requestInfo->paramHandle, ¶mBuffer); - if (status != OK) { - LOGE("%s, the buffer handle for parameter is invalid", __func__); - break; - } - } - - status = mTNR.runTnrFrame(inBuffer.addr, outBuffer.addr, inBuffer.size, outBuffer.size, - paramBuffer.addr, requestInfo); - break; - } - case IPC_GPU_TNR_PARAM_UPDATE: - case IPC_GPU_TNR_THREAD2_PARAM_UPDATE: { - TnrRequestInfo* requestInfo = static_cast(addr); - status = mTNR.asyncParamUpdate(requestInfo); - break; - } - case IPC_GPU_TNR_DEINIT: { - TnrRequestInfo* requestInfo = static_cast(addr); - status = mTNR.deInit(requestInfo); - break; - } -#endif - // ENABLE_EVCP_S - case IPC_EVCP_INIT: - status = mEvcp.init(addr, requestSize); - break; - case IPC_EVCP_UPDCONF: - status = mEvcp.updateEvcpParam(reinterpret_cast(addr)); - break; - case IPC_EVCP_GETCONF: - mEvcp.getEvcpParam(reinterpret_cast(addr)); - status = OK; - break; - case IPC_EVCP_RUN_FRAME: { - status = UNKNOWN_ERROR; - EvcpRunInfo* runInfo = static_cast(addr); - ShmInfo inBuffer = {}; - if (runInfo->inHandle < 0) break; - - status = getIntelAlgoServer()->getShmInfo(runInfo->inHandle, &inBuffer); - if (status != OK) { - LOGE("%s, the buffer handle for EVCP inBuffer data is invalid", __func__); - break; - } - - status = mEvcp.runEvcpFrame(inBuffer.addr, inBuffer.size); - break; - } - case IPC_EVCP_DEINIT: - status = mEvcp.deInit(); - break; - // ENABLE_EVCP_E - default: - LOGE("@%s, req_id:%d is not defined", __func__, req_id); - status = UNKNOWN_ERROR; - break; - } - LOG1("@%s, req_id:%d:%s, status", __func__, req_id, - IntelAlgoIpcCmdToString(static_cast(req_id)), status); - - getIntelAlgoServer()->returnCallback(req_id, status, buffer_handle); -} -} /* namespace icamera */ diff --git a/modules/sandboxing/server/IntelGPUAlgoServer.h b/modules/sandboxing/server/IntelGPUAlgoServer.h deleted file mode 100644 index e4ba8c3e..00000000 --- a/modules/sandboxing/server/IntelGPUAlgoServer.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2020-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include -#include -#include - -#include "CameraLog.h" -#include "IntelAlgoServer.h" -#include "cros-camera/camera_algorithm.h" -#include "iutils/Errors.h" -#include "iutils/Thread.h" -#include "modules/sandboxing/IPCCommon.h" -#ifdef TNR7_CM -#include "modules/sandboxing/server/IntelTNRServer.h" -#endif - -// ENABLE_EVCP_S -#include "modules/sandboxing/server/IntelEvcpServer.h" -// ENABLE_EVCP_E - -namespace icamera { - -class IntelGPUAlgoServer : public RequestHandler { - public: - explicit IntelGPUAlgoServer(IntelAlgoServer* server) : RequestHandler(server) {} - virtual ~IntelGPUAlgoServer() {} - void handleRequest(const MsgReq& msg); - -#ifdef TNR7_CM - private: - IntelTNRServer mTNR; -#endif - - // ENABLE_EVCP_S - private: - IntelEvcpServer mEvcp; - // ENABLE_EVCP_E -}; - -} // namespace icamera diff --git a/modules/sandboxing/server/IntelPGParamServer.cpp b/modules/sandboxing/server/IntelPGParamServer.cpp deleted file mode 100644 index 9962e98c..00000000 --- a/modules/sandboxing/server/IntelPGParamServer.cpp +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelPGParamS - -#include "modules/sandboxing/server/IntelPGParamServer.h" - -#include "iutils/CameraLog.h" -#include "iutils/Errors.h" -#include "iutils/Utils.h" - -namespace icamera { - -IntelPGParamServer::IntelPGParamServer() {} - -IntelPGParamServer::~IntelPGParamServer() {} - -int IntelPGParamServer::init(void* pData, int dataSize) { - int pgId = 0; - uintptr_t client = 0; - ia_p2p_platform_t platform = IA_P2P_PLATFORM_IPU6; - PgConfiguration pgConfig; - - bool ret = mIpc.serverUnflattenInit(pData, dataSize, &pgId, &client, &platform, &pgConfig); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverUnflattenInit fails", __func__); - - PGParamPackage package; - package.pgId = pgId; - package.mPayloadCount = 0; - CLEAR(package.mPayloads); - package.mPGBuffer = nullptr; - mPGParamPackages[client] = package; - mPGParamPackages[client].mPGParamAdapt = std::shared_ptr(new IntelPGParam(pgId)); - int result = mPGParamPackages[client].mPGParamAdapt->init(platform, pgConfig); - CheckAndLogError(result != OK, result, "@%s, init fails", __func__); - - return OK; -} - -int IntelPGParamServer::prepare(void* pData, int dataSize, void* palDataAddr) { - uintptr_t client = 0; - ia_binary_data ipuParameters = {nullptr, 0}; - ia_css_rbm_t* rbm = nullptr; - ia_css_kernel_bitmap_t* bitmap = nullptr; - uint32_t* maxStatsSize = nullptr; - bool ret = mIpc.serverUnflattenPrepare(pData, dataSize, &client, palDataAddr, &ipuParameters, - &rbm, &bitmap, &maxStatsSize); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverUnflattenPrepare fails", __func__); - - CheckAndLogError((mPGParamPackages.find(client) == mPGParamPackages.end()), UNKNOWN_ERROR, - "%s, the pg doesn't exist in the table", __func__); - - int result = - mPGParamPackages[client].mPGParamAdapt->prepare(&ipuParameters, rbm, bitmap, maxStatsSize); - CheckAndLogError(result != OK, result, "@%s, prepare fails", __func__); - - return OK; -} - -int IntelPGParamServer::allocatePGBuffer(void* pData, int dataSize) { - uintptr_t client = 0; - int pgSize = 0; - bool ret = mIpc.serverUnflattenAllocatePGBuffer(pData, dataSize, &client, &pgSize); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverUnflattenAllocatePGBuffer fails", - __func__); - - CheckAndLogError((mPGParamPackages.find(client) == mPGParamPackages.end()), UNKNOWN_ERROR, - "%s, the pg doesn't exist in the table", __func__); - - // Get server data pointer of PGBuffer - void* pgBuffer = nullptr; - ret = mIpc.assignPGBuffer(pData, dataSize, pgSize, &pgBuffer); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, assignPGBuffer fails", __func__); - - mPGParamPackages[client].mPGBuffer = reinterpret_cast(pgBuffer); - return OK; -} - -int IntelPGParamServer::getFragmentDescriptors(void* pData, int dataSize) { - uintptr_t client = 0; - int descCount = 0; - ia_p2p_fragment_desc* descs = nullptr; - bool ret = mIpc.serverUnflattenGetFragDescs(pData, dataSize, &client, &descCount, &descs); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverUnflattenGetFragDescs fails", - __func__); - - CheckAndLogError((mPGParamPackages.find(client) == mPGParamPackages.end()), UNKNOWN_ERROR, - "%s, the pg doesn't exist in the table", __func__); - - int count = mPGParamPackages[client].mPGParamAdapt->getFragmentDescriptors(descCount, descs); - CheckAndLogError(count <= 0, count, "@%s, getFragmentDescriptors fails", __func__); - - ret = mIpc.serverFlattenGetFragDescs(pData, dataSize, count); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverFlattenGetFragDescs fails", __func__); - - return OK; -} - -int IntelPGParamServer::setPGAndPrepareProgram(void* pData, int dataSize) { - uintptr_t client = 0; - bool ret = mIpc.serverUnflattenPrepareProgram(pData, dataSize, &client); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverUnflattenPrepareProgram fails", - __func__); - - CheckAndLogError((mPGParamPackages.find(client) == mPGParamPackages.end()), UNKNOWN_ERROR, - "%s, the pg doesn't exist in the table", __func__); - PGParamPackage& package = mPGParamPackages[client]; - - int result = package.mPGParamAdapt->setPGAndPrepareProgram(package.mPGBuffer); - CheckAndLogError(result != OK, result, "@%s, setPGAndPrepareProgram fails", __func__); - - // Get payload size here - package.mPayloadCount = - package.mPGParamAdapt->getPayloadSizes(ARRAY_SIZE(package.mPayloads), package.mPayloads); - CheckAndLogError(!package.mPayloadCount, UNKNOWN_ERROR, "@%s, getPayloadSizes fails", __func__); - - ret = - mIpc.serverFlattenPrepareProgram(pData, dataSize, package.mPayloadCount, package.mPayloads); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverFlattenPrepareProgram fails", - __func__); - - return OK; -} - -int IntelPGParamServer::registerPayloads(void* pData, int dataSize) { - uintptr_t client = 0; - int payloadCount = 0; - ia_binary_data* cPayloads = nullptr; - ia_binary_data* sPayloads = nullptr; - bool ret = mIpc.serverUnflattenRegisterPayloads(pData, dataSize, &client, &payloadCount, - &cPayloads, &sPayloads); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverUnflattenRegisterPayloads fails", - __func__); - - CheckAndLogError((mPGParamPackages.find(client) == mPGParamPackages.end()), UNKNOWN_ERROR, - "%s, the pg doesn't exist in the table", __func__); - PGParamPackage& package = mPGParamPackages[client]; - - // Save - for (int i = 0; i < payloadCount; i++) { - if (cPayloads[i].size > 0) { - package.mAllocatedPayloads[cPayloads[i].data] = sPayloads[i]; - } - } - - return OK; -} - -int IntelPGParamServer::updatePALAndEncode(void* pData, int dataSize, void* palDataAddr) { - PERF_CAMERA_ATRACE(); - TRACE_LOG_PROCESS("IntelPGParamServer", "updatePALAndEncode"); - uintptr_t client = 0; - ia_binary_data ipuParameters = {nullptr, 0}; - ia_binary_data* payloads = nullptr; - int32_t payloadCount = 0; - - bool ret = mIpc.serverUnflattenEncode(pData, dataSize, &client, palDataAddr, &ipuParameters, - &payloadCount, &payloads); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverUnflattenEncode fails", __func__); - - CheckAndLogError((mPGParamPackages.find(client) == mPGParamPackages.end()), UNKNOWN_ERROR, - "%s, the pg doesn't exist in the table", __func__); - PGParamPackage& package = mPGParamPackages[client]; - CheckAndLogError(payloadCount != package.mPayloadCount, UNKNOWN_ERROR, - "@%s, wrong payloadCount", __func__); - - int result = findPayloads(package.mPayloadCount, payloads, &package.mAllocatedPayloads, - package.mPayloads); - CheckAndLogError(result != OK, result, "@%s, findPayloads fails", __func__); - - result = package.mPGParamAdapt->updatePALAndEncode(&ipuParameters, package.mPayloadCount, - package.mPayloads); - CheckAndLogError(result != OK, result, "@%s, updatePALAndEncode fails", __func__); - - return OK; -} - -int IntelPGParamServer::decode(void* pData, int dataSize, void* statsAddr) { - PERF_CAMERA_ATRACE(); - TRACE_LOG_PROCESS("IntelPGParamServer", "decode"); - uintptr_t client = 0; - ia_binary_data statistics = {statsAddr, 0}; - ia_binary_data* payloads = nullptr; - int32_t payloadCount = 0; - - bool ret = mIpc.serverUnflattenDecode(pData, dataSize, &client, &payloadCount, &payloads); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverUnflattenDecode fails", __func__); - - CheckAndLogError((mPGParamPackages.find(client) == mPGParamPackages.end()), UNKNOWN_ERROR, - "%s, the pg doesn't exist in the table", __func__); - PGParamPackage& package = mPGParamPackages[client]; - CheckAndLogError(payloadCount != package.mPayloadCount, UNKNOWN_ERROR, - "@%s, wrong payloadCount", __func__); - - int result = findPayloads(package.mPayloadCount, payloads, &package.mAllocatedPayloads, - package.mPayloads); - CheckAndLogError(result != OK, result, "@%s, findPayloads fails", __func__); - - result = package.mPGParamAdapt->decode(package.mPayloadCount, package.mPayloads, &statistics); - CheckAndLogError(result != OK, result, "@%s, decode fails", __func__); - - ret = mIpc.serverFlattenDecode(pData, dataSize, statistics); - CheckAndLogError(ret == false, UNKNOWN_ERROR, "@%s, serverFlattenDecode fails", __func__); - - return OK; -} - -void IntelPGParamServer::deinit(void* pData, int dataSize) { - uintptr_t client = 0; - - bool ret = mIpc.serverUnflattenDeinit(pData, dataSize, &client); - CheckAndLogError(ret == false, VOID_VALUE, "@%s, serverUnflattenDeinit fails", __func__); - - CheckAndLogError((mPGParamPackages.find(client) == mPGParamPackages.end()), VOID_VALUE, - "%s, the pg doesn't exist in the table", __func__); - - mPGParamPackages[client].mPGParamAdapt->deinit(); - mPGParamPackages.erase(client); -} - -int IntelPGParamServer::findPayloads(int32_t payloadCount, ia_binary_data* clientPayloads, - std::unordered_map* allocated, - ia_binary_data* serverPayloads) { - CheckAndLogError(!clientPayloads, BAD_VALUE, "@%s, payloads is nullptr", __func__); - CLEAR(*serverPayloads); - for (size_t i = 0; i < payloadCount; i++) { - if (!clientPayloads[i].size) continue; - - CheckAndLogError(allocated->find(clientPayloads[i].data) == allocated->end(), UNKNOWN_ERROR, - "%s: can't find client payload %p for term %zu", __func__, - clientPayloads[i].data, i); - ia_binary_data& alloc = allocated->at(clientPayloads[i].data); - CheckAndLogError(alloc.size != clientPayloads[i].size, UNKNOWN_ERROR, - "%s: payload size mismatch for term %zu", __func__, i); - serverPayloads[i] = alloc; - } - return OK; -} - -} // namespace icamera diff --git a/modules/sandboxing/server/IntelPGParamServer.h b/modules/sandboxing/server/IntelPGParamServer.h deleted file mode 100644 index 3b27cc1b..00000000 --- a/modules/sandboxing/server/IntelPGParamServer.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include "modules/algowrapper/IntelPGParam.h" -#include "modules/sandboxing/IPCIntelPGParam.h" - -namespace icamera { - -class IntelPGParamServer { - public: - IntelPGParamServer(); - ~IntelPGParamServer(); - - int init(void* pData, int dataSize); - int prepare(void* pData, int dataSize, void* palDataAddr); - int allocatePGBuffer(void* pData, int dataSize); - int getFragmentDescriptors(void* pData, int dataSize); - int setPGAndPrepareProgram(void* pData, int dataSize); - int registerPayloads(void* pData, int dataSize); - int updatePALAndEncode(void* pData, int dataSize, void* palDataAddr); - int decode(void* pData, int dataSize, void* statsAddr); - void deinit(void* pData, int dataSize); - - private: - struct PGParamPackage { - int pgId; - std::shared_ptr mPGParamAdapt; - ia_binary_data mPayloads[IPU_MAX_TERMINAL_COUNT]; // match terminals for encode/decode - int mPayloadCount; - ia_css_process_group_t* mPGBuffer; - - // - std::unordered_map mAllocatedPayloads; - }; - - private: - int findPayloads(int32_t payloadCount, ia_binary_data* clientPayloads, - std::unordered_map* allocated, - ia_binary_data* serverPayloads); - - IPCIntelPGParam mIpc; - std::unordered_map mPGParamPackages; -}; - -} // namespace icamera diff --git a/modules/sandboxing/server/IntelTNRServer.cpp b/modules/sandboxing/server/IntelTNRServer.cpp deleted file mode 100644 index 6e306a43..00000000 --- a/modules/sandboxing/server/IntelTNRServer.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (C) 2020-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG IntelTNRServer - -#include "modules/sandboxing/server/IntelTNRServer.h" - -#include - -#include "CameraLog.h" -#include "iutils/Utils.h" - -namespace icamera { - -IntelTNRServer::IntelTNRServer() { - LOG1("@%s Construct", __func__); -} - -IntelTNRServer::~IntelTNRServer() { - mIntelTNRMap.clear(); - mLockMap.clear(); - LOG1("@%s Destroy", __func__); -} - -int IntelTNRServer::init(void* pData, int dataSize) { - CheckAndLogError(pData == nullptr, UNKNOWN_ERROR, "@%s, pData is nullptr", __func__); - CheckAndLogError(dataSize < static_cast(sizeof(TnrInitInfo)), UNKNOWN_ERROR, - "@%s, buffer size %d is small", __func__, dataSize); - TnrInitInfo* initInfo = static_cast(pData); - CheckAndLogError(initInfo->type >= TNR_INSTANCE_MAX || initInfo->type < 0, UNKNOWN_ERROR, - "@%s, invalid tnr type: %d", __func__, static_cast(initInfo->type)); - - CheckAndLogError(mIntelTNRMap.size() == TNR_INSTANCE_MAX, UNKNOWN_ERROR, - "@%s, tnr resource is busy", __func__); - - int tnrInstance; - // choose a free tnr instance - for (tnrInstance = TNR_INSTANCE0; tnrInstance < TNR_INSTANCE_MAX; tnrInstance++) { - bool find = false; - for (auto& ins : mTnrSlotMap) { - if (ins.second == tnrInstance) { - find = true; - break; - } - } - if (!find) break; - } - CheckAndLogError(tnrInstance == TNR_INSTANCE_MAX, UNKNOWN_ERROR, - "@%s, no avaliable tnr instance", __func__); - - int key = getIndex(initInfo->cameraId, initInfo->type); - if (mIntelTNRMap.find(key) == mIntelTNRMap.end()) { - mIntelTNRMap[key] = std::unique_ptr(new IntelTNR7US(initInfo->cameraId)); - } - - mLockMap[key] = std::unique_ptr(new std::mutex); - mTnrSlotMap[key] = static_cast(tnrInstance); - std::unique_lock lock(*mLockMap[key]); - - return mIntelTNRMap[key]->init(initInfo->width, initInfo->height, - static_cast(tnrInstance)); -} - -int IntelTNRServer::deInit(TnrRequestInfo* requestInfo) { - CheckAndLogError(requestInfo == nullptr, UNKNOWN_ERROR, "@%s, requestInfo is nullptr", - __func__); - int key = getIndex(requestInfo->cameraId, requestInfo->type); - CheckAndLogError((mIntelTNRMap.find(key) == mIntelTNRMap.end()), UNKNOWN_ERROR, - " @%s, IntelTNR type: %d is invalid", requestInfo->cameraId, __func__, - requestInfo->type); - { - std::unique_lock lock(*mLockMap[key]); - mIntelTNRMap.erase(key); - mTnrSlotMap.erase(key); - } - mLockMap.erase(key); - return OK; -} - -int IntelTNRServer::prepareSurface(void* pData, int dataSize, TnrRequestInfo* requestInfo) { - CheckAndLogError(pData == nullptr || requestInfo == nullptr, UNKNOWN_ERROR, - "@%s, invalid params, pData: %p, requestInfo: %p", __func__, pData, - requestInfo); - int key = getIndex(requestInfo->cameraId, requestInfo->type); - CheckAndLogError((mIntelTNRMap.find(key) == mIntelTNRMap.end()), UNKNOWN_ERROR, - " @%s, IntelTNR type: %d is invalid", requestInfo->cameraId, __func__, - requestInfo->type); - std::unique_lock lock(*mLockMap[key]); - - return mIntelTNRMap[key]->prepareSurface(pData, dataSize); -} - -int IntelTNRServer::runTnrFrame(const void* inBufAddr, void* outBufAddr, uint32_t inBufSize, - uint32_t outBufSize, void* tnrParam, TnrRequestInfo* requestInfo) { - CheckAndLogError(requestInfo == nullptr, UNKNOWN_ERROR, "@%s, requestInfo is nullptr", - __func__); - int key = getIndex(requestInfo->cameraId, requestInfo->type); - CheckAndLogError((mIntelTNRMap.find(key) == mIntelTNRMap.end()), UNKNOWN_ERROR, - " @%s, IntelTNR type: %d is invalid", requestInfo->cameraId, __func__, - requestInfo->type); - std::unique_lock lock(*mLockMap[key]); - - return mIntelTNRMap[key]->runTnrFrame(inBufAddr, outBufAddr, inBufSize, outBufSize, - static_cast(tnrParam), - requestInfo->isForceUpdate, requestInfo->outBufFd); -} - -int IntelTNRServer::asyncParamUpdate(TnrRequestInfo* requestInfo) { - CheckAndLogError(requestInfo == nullptr, UNKNOWN_ERROR, "@%s, requestInfo is nullptr", - __func__); - int key = getIndex(requestInfo->cameraId, requestInfo->type); - CheckAndLogError((mIntelTNRMap.find(key) == mIntelTNRMap.end()), UNKNOWN_ERROR, - " @%s, IntelTNR type: %d is invalid", requestInfo->cameraId, __func__, - requestInfo->type); - std::unique_lock lock(*mLockMap[key]); - - return mIntelTNRMap[key]->asyncParamUpdate(requestInfo->gain, requestInfo->isForceUpdate); -} - -int IntelTNRServer::getSurfaceInfo(TnrRequestInfo* requestInfo) { - CheckAndLogError(requestInfo == nullptr, UNKNOWN_ERROR, "@%s, requestInfo is nullptr", - __func__); - int key = getIndex(requestInfo->cameraId, requestInfo->type); - CheckAndLogError((mIntelTNRMap.find(key) == mIntelTNRMap.end()), UNKNOWN_ERROR, - " @%s, IntelTNR type: %d is invalid", requestInfo->cameraId, __func__, - requestInfo->type); - std::unique_lock lock(*mLockMap[key]); - - return mIntelTNRMap[key]->getSurfaceInfo(requestInfo->width, requestInfo->height, - &requestInfo->surfaceSize); -} - -} // namespace icamera diff --git a/modules/sandboxing/server/IntelTNRServer.h b/modules/sandboxing/server/IntelTNRServer.h deleted file mode 100644 index c5e53169..00000000 --- a/modules/sandboxing/server/IntelTNRServer.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2020-2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include "iutils/Errors.h" -#include "modules/algowrapper/IntelTNR7US.h" - -namespace icamera { - -class IntelTNRServer { - public: - IntelTNRServer(); - virtual ~IntelTNRServer(); - - int init(void* pData, int dataSize); - int deInit(TnrRequestInfo* requestInfo); - int prepareSurface(void* pData, int dataSize, TnrRequestInfo* requestInfo); - int runTnrFrame(const void* inBufAddr, void* outBufAddr, uint32_t inBufSize, - uint32_t outBufSize, void* tnrParam, TnrRequestInfo* requestInfo); - int asyncParamUpdate(TnrRequestInfo* requestInfo); - int getSurfaceInfo(TnrRequestInfo* requestInfo); - - private: - // the tnr instance of the id - std::unordered_map mTnrSlotMap; - std::unordered_map> mIntelTNRMap; - std::unordered_map> mLockMap; - // transfer cameraId and type to index of the mTnrSlotMap and mIntelTNRMap - int getIndex(int cameraId, TnrType type) { return (cameraId << TNR_INSTANCE_MAX) + type; } -}; -} /* namespace icamera */ diff --git a/modules/v4l2/v4l2_device.cc b/modules/v4l2/v4l2_device.cc index eddd5b6f..43b9ef94 100644 --- a/modules/v4l2/v4l2_device.cc +++ b/modules/v4l2/v4l2_device.cc @@ -285,7 +285,7 @@ int V4L2Device::GetControl(struct v4l2_ext_control* ext_control) { int ret = ::ioctl(fd_, VIDIOC_G_EXT_CTRLS, &controls); if (ret != 0) { - LOGE("%s: Device node %s IOCTL VIDIOC_G_EXT_CTRLS error: %s", __func__, name_.c_str(), + LOG1("%s: Device node %s IOCTL VIDIOC_G_EXT_CTRLS error: %s", __func__, name_.c_str(), strerror(errno)); return ret; } diff --git a/modules/v4l2/v4l2_device.h b/modules/v4l2/v4l2_device.h index 87d087ef..94375cdd 100644 --- a/modules/v4l2/v4l2_device.h +++ b/modules/v4l2/v4l2_device.h @@ -351,6 +351,7 @@ class CROS_CAMERA_EXPORT V4L2VideoNode final : public V4L2Device { // V4L2 memory type. enum v4l2_memory GetMemoryType(); + int GetDeviceCaps(); // This method get the buffer type of video device. // // Returns: @@ -467,6 +468,7 @@ class CROS_CAMERA_EXPORT V4L2VideoNode final : public V4L2Device { bool is_buffer_cached_; + int device_caps; enum v4l2_buf_type buffer_type_; enum v4l2_memory memory_type_; diff --git a/modules/v4l2/v4l2_subdevice.cc b/modules/v4l2/v4l2_subdevice.cc index 1451dac6..2d93b1d4 100644 --- a/modules/v4l2/v4l2_subdevice.cc +++ b/modules/v4l2/v4l2_subdevice.cc @@ -102,7 +102,7 @@ int V4L2Subdevice::GetPadFormat(int pad_index, int* width, int* height, int* cod LOG1("@%s", __func__); if (!width || !height || !code) { - LOGE("%s: Device node %s some of parameters is nullptr: %s", __func__, name_.c_str()); + LOGE("%s: Device node %s some of parameters is nullptr", __func__, name_.c_str()); return -EINVAL; } struct v4l2_subdev_format format = {}; @@ -138,7 +138,7 @@ int V4L2Subdevice::SetRouting(v4l2_subdev_route* routes, uint32_t numRoutes) { LOG1("@%s", __func__); if (!routes) { - LOGE("%s: Device node %s routes is nullptr: %s", __func__, name_.c_str()); + LOGE("%s: Device node %s routes is nullptr", __func__, name_.c_str()); return -EINVAL; } @@ -158,7 +158,7 @@ int V4L2Subdevice::GetRouting(v4l2_subdev_route* routes, uint32_t* numRoutes) { LOG1("@%s", __func__); if (!routes || !numRoutes) { - LOGE("%s: Device node %s routes or numRoutes is nullptr: %s", __func__, name_.c_str()); + LOGE("%s: Device node %s routes or numRoutes is nullptr", __func__, name_.c_str()); return -EINVAL; } diff --git a/modules/v4l2/v4l2_video_node.cc b/modules/v4l2/v4l2_video_node.cc index a48a922e..8c9a913d 100644 --- a/modules/v4l2/v4l2_video_node.cc +++ b/modules/v4l2/v4l2_video_node.cc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2021 Intel Corporation + * Copyright (C) 2013-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -392,6 +392,7 @@ V4L2VideoNode::V4L2VideoNode(const std::string& name) buffer_type_(V4L2_BUF_TYPE_VIDEO_CAPTURE), memory_type_(V4L2_MEMORY_USERPTR) { LOG1("@%s", __func__); + device_caps = 0; } V4L2VideoNode::~V4L2VideoNode() { @@ -426,14 +427,14 @@ int V4L2VideoNode::Open(int flags) { {V4L2_CAP_VIDEO_OUTPUT_MPLANE, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE}, {V4L2_CAP_META_CAPTURE, V4L2_BUF_TYPE_META_CAPTURE}, {V4L2_CAP_META_OUTPUT, V4L2_BUF_TYPE_META_OUTPUT}}; + size_t i = 0; for (; i < ARRAY_SIZE(buffer_type_mapper); i++) { if (cap.capabilities & buffer_type_mapper[i].first) { - buffer_type_ = buffer_type_mapper[i].second; - break; + device_caps |= buffer_type_mapper[i].first; } } - if (i == ARRAY_SIZE(buffer_type_mapper)) { + if (device_caps == 0) { V4L2Device::Close(); LOGE("%s: ARRAY_SIZE error.", __func__); return -EINVAL; @@ -462,6 +463,12 @@ enum v4l2_memory V4L2VideoNode::GetMemoryType() { return memory_type_; } +int V4L2VideoNode::GetDeviceCaps() { + LOG1("@%s", __func__); + + return device_caps; +} + enum v4l2_buf_type V4L2VideoNode::GetBufferType() { LOG1("@%s", __func__); @@ -530,7 +537,7 @@ int V4L2VideoNode::SetFormat(const V4L2Format& format) { } V4L2Format fmt(format); - fmt.SetType(buffer_type_); + buffer_type_ = static_cast(fmt.Type()); if (V4L2_TYPE_IS_META(buffer_type_)) { fmt.SetSizeImage(0, 0); @@ -594,7 +601,7 @@ int V4L2VideoNode::MapMemory(unsigned int index, int prot, int flags, std::vecto for (uint32_t i = 0; i < num_planes; i++) { void* res = ::mmap(nullptr, buffer.Length(i), prot, flags, fd_, buffer.Offset(i)); if (res == MAP_FAILED) { - LOGE("%s: MMAP error. %d", __func__, strerror(errno)); + LOGE("%s: MMAP error. %s", __func__, strerror(errno)); return -EINVAL; } mapped->push_back(res); @@ -610,7 +617,7 @@ int V4L2VideoNode::GrabFrame(V4L2Buffer* buf) { return -EINVAL; } if (!buf) { - LOGE("%s: Device node %s buf is nullptr: %s", __func__, name_.c_str()); + LOGE("%s: Device node %s buf is nullptr", __func__, name_.c_str()); return -EINVAL; } @@ -641,7 +648,7 @@ int V4L2VideoNode::ExportFrame(unsigned int index, std::vector* fds) { return -EINVAL; } if (!fds) { - LOGE("%s: Device node %s fds is nullptr: %s", __func__, name_.c_str()); + LOGE("%s: Device node %s fds is nullptr", __func__, name_.c_str()); return -EINVAL; } @@ -749,10 +756,10 @@ void V4L2VideoNode::PrintBufferInfo(const std::string& func, const V4L2Buffer& b switch (memory_type_) { case V4L2_MEMORY_USERPTR: - LOG1("%s: idx: %ud, addr: %p", func.c_str(), buf.Index(), buf.Userptr(0)); + LOG1("%s: idx: %ud, addr: %lu", func.c_str(), buf.Index(), buf.Userptr(0)); break; case V4L2_MEMORY_MMAP: - LOG1("%s: idx: %ud, offset: %p", func.c_str(), buf.Index(), buf.Offset(0)); + LOG1("%s: idx: %ud, offset: %u", func.c_str(), buf.Index(), buf.Offset(0)); break; case V4L2_MEMORY_DMABUF: LOG1("%s: idx: %ud, fd: %d", func.c_str(), buf.Index(), buf.Fd(0)); @@ -805,9 +812,9 @@ int V4L2VideoNode::QueryBuffer(int index, enum v4l2_memory memory_type, V4L2Buff LOG1("Device: name: %s, index %ud, type: %ud, bytesused: %ud, flags: 0x%x", name_.c_str(), buf->Index(), buf->Type(), buf->BytesUsed(0), buf->Flags()); if (memory_type == V4L2_MEMORY_MMAP) { - LOG1("memory MMAP: offset 0x%p", buf->Offset(0)); + LOG1("memory MMAP: offset %u", buf->Offset(0)); } else if (memory_type == V4L2_MEMORY_USERPTR) { - LOG1("memory USRPTR: %p", buf->Userptr(0)); + LOG1("memory USRPTR: %lu", buf->Userptr(0)); } LOG1("length: %ud", buf->Length(0)); return 0; @@ -817,7 +824,7 @@ int V4L2VideoNode::GetFormat(V4L2Format* format) { LOG1("@%s", __func__); if (!format) { - LOGE("%s: Device node %s format is nullptr: %s", __func__, name_.c_str()); + LOGE("%s: Device node %s format is nullptr", __func__, name_.c_str()); return -EINVAL; } diff --git a/src/3a/AiqCore.cpp b/src/3a/AiqCore.cpp index 70c40fbc..01e91ab0 100644 --- a/src/3a/AiqCore.cpp +++ b/src/3a/AiqCore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,11 +44,13 @@ AiqCore::AiqCore(int cameraId) mAiqRunTime(0), mAiqState(AIQ_NOT_INIT), mHyperFocalDistance(0.0f), + mLowPowerMode(false), mTuningMode(TUNING_MODE_MAX), mShadingMode(SHADING_MODE_FAST), mLensShadingMapMode(LENS_SHADING_MAP_MODE_OFF), mLscGridRGGBLen(0), mLastEvShift(0.0f), + mAiqResults(nullptr), mAeAndAwbConverged(false), mRgbStatsBypassed(false), mAeBypassed(false), @@ -60,6 +62,8 @@ AiqCore::AiqCore(int cameraId) CLEAR(mFrameParams); CLEAR(mLastAeResult); + CLEAR(mLastAfResult); + CLEAR(mLastAwbResult); CLEAR(mGbceParams); CLEAR(mPaParams); @@ -78,7 +82,6 @@ AiqCore::AiqCore(int cameraId) std::fill(std::begin(mLscOffGrid), std::end(mLscOffGrid), 1.0f); mAiqParams = std::unique_ptr(new cca::cca_aiq_params); - mAiqResults = std::unique_ptr(new cca::cca_aiq_results); } AiqCore::~AiqCore() {} @@ -104,23 +107,27 @@ int AiqCore::initAiqPlusParams() { mGbceParams.athena_mode = PlatformData::getPLCEnable(mCameraId); LOG1("%s, gbce_on: %d, plc enable: %d", __func__, mGbceParams.gbce_on, mGbceParams.athena_mode); + // HDR_FEATURE_S + if (PlatformData::getSensorAeEnable(mCameraId)) { + LOG2("@%s, enable_gtm_desaturation for HDR sensor", __func__); + mPaParams.enable_gtm_desaturation = true; + } + // HDR_FEATURE_E + return OK; } int AiqCore::init() { initAiqPlusParams(); -#ifndef ENABLE_SANDBOXING - ia_env env = {&Log::ccaPrintInfo, &Log::ccaPrintError, &Log::ccaPrintInfo}; - ia_log_init(&env); -#endif - mAiqState = AIQ_INIT; int ret = mIntel3AParameter->init(); CheckAndLogError(ret != OK, ret, "@%s, Init 3a parameter failed ret: %d", __func__, ret); - CLEAR(mLastAeResult), mAeRunTime = 0; + CLEAR(mLastAeResult); + + mAeRunTime = 0; mAwbRunTime = 0; mAiqRunTime = 0; @@ -128,16 +135,38 @@ int AiqCore::init() { } int AiqCore::deinit() { -#ifndef ENABLE_SANDBOXING - ia_log_deinit(); -#endif - mAiqState = AIQ_NOT_INIT; + freeAiqResultMem(); + return OK; } +int AiqCore::allocAiqResultMem() { + IntelCca* intelCca = IntelCca::getInstance(mCameraId, mTuningMode); + CheckAndLogError(!intelCca, UNKNOWN_ERROR, "Failed to get intelCca instance"); + + mAiqResults = + static_cast(intelCca->allocMem(0, "aiqResults", 0, + sizeof(cca::cca_aiq_results))); + CheckAndLogError(!mAiqResults, NO_MEMORY, "allocMem failed"); + + return OK; +} + +void AiqCore::freeAiqResultMem() { + if (mTuningMode == TUNING_MODE_MAX || !mAiqResults) return; + + IntelCca* intelCca = IntelCca::getInstance(mCameraId, mTuningMode); + CheckAndLogError(!intelCca, VOID_VALUE, "Failed to get intelCca instance"); + + intelCca->freeMem(mAiqResults); + mAiqResults = nullptr; +} + int AiqCore::configure() { + freeAiqResultMem(); + if (mAiqState == AIQ_CONFIGURED) { return OK; } @@ -221,11 +250,17 @@ int AiqCore::updateParameter(const aiq_parameter_t& param) { mHyperFocalDistance = AiqUtils::calculateHyperfocalDistance(mIntel3AParameter->mCMC); mTuningMode = param.tuningMode; + + // Tuning Mode changed, reset AE/AWB run count + mAeRunTime = 0; + mAwbRunTime = 0; } mShadingMode = param.shadingMode; mLensShadingMapMode = param.lensShadingMapMode; mLensShadingMapSize = param.lensShadingMapSize; + mLowPowerMode = param.powerMode == CAMERA_LOW_POWER ? true : false; + mGbceParams.ev_shift = param.evShift; // In still frame use force update by setting convergence time to 0. @@ -248,6 +283,11 @@ int AiqCore::updateParameter(const aiq_parameter_t& param) { mRgbStatsBypassed = true; } + if (!mAiqResults) { + int ret = allocAiqResultMem(); + CheckAndLogError(ret != OK, NO_MEMORY, "alloc aiq result failed"); + } + return OK; } @@ -276,13 +316,10 @@ int AiqCore::setStatsParams(const cca::cca_stats_params& statsParams, AiqStatist unsigned int byteUsed = 0; void* pStatsData = intelCca->fetchHwStatsData(aiqStats->mSequence, &byteUsed); CheckAndLogError(!pStatsData, UNKNOWN_ERROR, "%s, pStatsData is nullptr", __func__); - ia_isp_bxt_statistics_query_results_t queryResults = {}; ia_err iaErr = intelCca->decodeStats(reinterpret_cast(pStatsData), byteUsed, - bitmap, &queryResults); + bitmap); CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, "%s, Faield convert statistics", __func__); - LOG2("%s, query results: rgbs_grid(%d), af_grid(%d), dvs_stats(%d)", __func__, - queryResults.rgbs_grid, queryResults.af_grid, queryResults.dvs_stats); } { @@ -340,7 +377,7 @@ int AiqCore::runAiq(long requestId, AiqResult* aiqResult) { if (aaaRunType & IMAGING_ALGO_GBCE) { // run gbce with bypass level if AE lock if (mAeForceLock || mIntel3AParameter->mTestPatternMode != TEST_PATTERN_OFF || - mRgbStatsBypassed) { + mRgbStatsBypassed || mAeBypassed) { mGbceParams.is_bypass = true; } else { mGbceParams.is_bypass = false; @@ -370,7 +407,8 @@ int AiqCore::runAiq(long requestId, AiqResult* aiqResult) { { PERF_CAMERA_ATRACE_PARAM1_IMAGING("intelAiq->runAIQ", 1); - ia_err iaErr = intelCca->runAIQ(requestId, *mAiqParams.get(), mAiqResults.get()); + ia_err iaErr = intelCca->runAIQ(requestId, *mAiqParams.get(), mAiqResults, + aiqResult->mAiqParam.makernoteMode); mAiqRunTime++; ret = AiqUtils::convertError(iaErr); CheckAndLogError(ret != OK, ret, "@%s, runAIQ, ret: %d", __func__, ret); @@ -378,6 +416,7 @@ int AiqCore::runAiq(long requestId, AiqResult* aiqResult) { // handle awb result if (aaaRunType & IMAGING_ALGO_AWB) { + mLastAwbResult = mAiqResults->awb_output; cca::cca_awb_results* newAwbResults = &mAiqResults->awb_output; if (!PlatformData::isIsysEnabled(mCameraId)) { @@ -394,6 +433,7 @@ int AiqCore::runAiq(long requestId, AiqResult* aiqResult) { // handle af result if (aaaRunType & IMAGING_ALGO_AF) { + mLastAfResult = mAiqResults->af_output; focusDistanceResult(&mAiqResults->af_output, &aiqResult->mAfDistanceDiopters, &aiqResult->mFocusRange); aiqResult->mAfResults = mAiqResults->af_output; @@ -411,8 +451,19 @@ int AiqCore::runAiq(long requestId, AiqResult* aiqResult) { // handle pa result if (aaaRunType & IMAGING_ALGO_PA) { - mIntel3AParameter->updatePaResult(&mAiqResults->pa_output); + mIntel3AParameter->updatePaResult(&mAiqResults->pa_output, mAwbForceLock, + mLockedColorGain, mLockedColorTransform); aiqResult->mPaResults = mAiqResults->pa_output; + if (!mAwbForceLock) { + mLockedColorGain.color_gains_rggb[0] = aiqResult->mPaResults.color_gains.r; + mLockedColorGain.color_gains_rggb[1] = aiqResult->mPaResults.color_gains.gr; + mLockedColorGain.color_gains_rggb[2] = aiqResult->mPaResults.color_gains.gb; + mLockedColorGain.color_gains_rggb[3] = aiqResult->mPaResults.color_gains.b; + MEMCPY_S(&mLockedColorTransform.color_transform, + sizeof(mLockedColorTransform.color_transform), + aiqResult->mPaResults.color_conversion_matrix, + sizeof(aiqResult->mPaResults.color_conversion_matrix)); + } AiqUtils::dumpPaResults(aiqResult->mPaResults); } @@ -420,6 +471,7 @@ int AiqCore::runAiq(long requestId, AiqResult* aiqResult) { if (aaaRunType & IMAGING_ALGO_SA) { AiqUtils::dumpSaResults(mAiqResults->sa_output); ret |= processSAResults(&mAiqResults->sa_output, aiqResult->mLensShadingMap); + aiqResult->mLscUpdate = mAiqResults->sa_output.lsc_update; } CheckAndLogError(ret != OK, ret, "run3A failed, ret: %d", ret); @@ -431,10 +483,14 @@ int AiqCore::runAiq(long requestId, AiqResult* aiqResult) { mLastEvShift = mIntel3AParameter->mAeParams.ev_shift; aiqResult->mTimestamp = mTimestamp; + aiqResult->mAnalogGainRange[0] = mIntel3AParameter->mCMC.min_ag; + aiqResult->mAnalogGainRange[1] = mIntel3AParameter->mCMC.max_ag; + aiqResult->mDigitalGainRange[0] = mIntel3AParameter->mCMC.min_dg; + aiqResult->mDigitalGainRange[1] = mIntel3AParameter->mCMC.max_dg; if (PlatformData::isStatsRunningRateSupport(mCameraId)) { bool bothConverged = (mLastAeResult.exposures[0].converged && - mAiqResults->awb_output.distance_from_convergence < EPSILON); + mLastAwbResult.distance_from_convergence < EPSILON); if (!mAeAndAwbConverged && bothConverged) { mAeRunRateInfo.reset(); mAwbRunRateInfo.reset(); @@ -465,7 +521,8 @@ int AiqCore::runAEC(long requestId, cca::cca_ae_results* aeResults) { CheckAndLogError(!intelCca, UNKNOWN_ERROR, "%s, intelCca is null, m:%d", __func__, mTuningMode); { PERF_CAMERA_ATRACE_PARAM1_IMAGING("intelCca->runAEC", 1); - ia_err iaErr = intelCca->runAEC(requestId, mIntel3AParameter->mAeParams, newAeResults); + ia_err iaErr = intelCca->runAEC(requestId, mIntel3AParameter->mAeParams, newAeResults, + mLowPowerMode); ret = AiqUtils::convertError(iaErr); CheckAndLogError(ret != OK, ret, "Error running AE, ret: %d", ret); } @@ -681,6 +738,21 @@ int AiqCore::processSAResults(cca::cca_sa_results* saResults, float* lensShading return OK; } +// PRIVACY_MODE_S +int AiqCore::getBrightestIndex(uint32_t& param) { + int ret = OK; + uint32_t outMaxBin = 0; + IntelCca* intelCca = getIntelCca(mTuningMode); + CheckAndLogError(!intelCca, UNKNOWN_ERROR, "%s, intelCca is null, m:%d", __func__, mTuningMode); + ia_err iaErr = intelCca->getBrightestIndex(&outMaxBin); + ret = AiqUtils::convertError(iaErr); + CheckAndLogError(ret != OK, ret, "Error getting BrightestIndex, ret: %d", ret); + param = outMaxBin; + + return ret; +} +// PRIVACY_MODE_E + bool AiqCore::bypassAe(const aiq_parameter_t& param) { if (mAeRunTime == 0 || (mIntel3AParameter->mAeParams.ev_shift != mLastEvShift)) return false; if (mAeForceLock || mAeRunTime % mIntel3AParameter->mAePerTicks != 0) return true; @@ -700,8 +772,8 @@ bool AiqCore::bypassAf(const aiq_parameter_t& param) { if (param.afMode == AF_MODE_OFF || param.powerMode != CAMERA_LOW_POWER) return false; - bool converged = mAiqResults->af_output.status == ia_aiq_af_status_success && - mAiqResults->af_output.final_lens_position_reached; + bool converged = mLastAfResult.status == ia_aiq_af_status_success && + mLastAfResult.final_lens_position_reached; return skipAlgoRunning(&mAfRunRateInfo, IMAGING_ALGO_AF, converged); } @@ -713,7 +785,7 @@ bool AiqCore::bypassAwb(const aiq_parameter_t& param) { if (param.awbMode != AWB_MODE_AUTO || param.powerMode != CAMERA_LOW_POWER) return false; - bool converged = mAiqResults->awb_output.distance_from_convergence < EPSILON; + bool converged = mLastAwbResult.distance_from_convergence < EPSILON; return skipAlgoRunning(&mAwbRunRateInfo, IMAGING_ALGO_AWB, converged); } diff --git a/src/3a/AiqCore.h b/src/3a/AiqCore.h index 86c66779..c1d0784e 100644 --- a/src/3a/AiqCore.h +++ b/src/3a/AiqCore.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -103,6 +103,17 @@ class AiqCore { */ int runAiq(long requestId, AiqResult* aiqResult); + // PRIVACY_MODE_S + /** + * \brief Get the brightest index in histogram + * + * \param param: brightest index + * + * \return OK if succeed, other value indicates failed + */ + int getBrightestIndex(uint32_t& param); + // PRIVACY_MODE_E + private: // LSC data typedef struct ColorOrder { uint8_t r[2]; @@ -158,6 +169,9 @@ class AiqCore { IntelCca* getIntelCca(TuningMode tuningMode); + int allocAiqResultMem(); + void freeAiqResultMem(); + private: int mCameraId; unsigned long long mTimestamp; // Latest statistics timestamp @@ -186,6 +200,7 @@ class AiqCore { float mHyperFocalDistance; // in millimeters + bool mLowPowerMode; TuningMode mTuningMode; camera_shading_mode_t mShadingMode; camera_lens_shading_map_mode_type_t mLensShadingMapMode; @@ -200,9 +215,11 @@ class AiqCore { float mLastEvShift; cca::cca_ae_results mLastAeResult; + cca::cca_af_results mLastAfResult; + cca::cca_awb_results mLastAwbResult; std::unique_ptr mAiqParams; - std::unique_ptr mAiqResults; + cca::cca_aiq_results* mAiqResults; bool mAeAndAwbConverged; bool mRgbStatsBypassed; @@ -217,6 +234,9 @@ class AiqCore { uint32_t mLockedExposureTimeUs; uint16_t mLockedIso; + camera_color_transform_t mLockedColorTransform; + camera_color_gains_t mLockedColorGain; + private: DISALLOW_COPY_AND_ASSIGN(AiqCore); }; diff --git a/src/3a/AiqEngine.cpp b/src/3a/AiqEngine.cpp index 510b6997..70e72df7 100644 --- a/src/3a/AiqEngine.cpp +++ b/src/3a/AiqEngine.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -190,6 +190,20 @@ int AiqEngine::prepareStatsParams(cca::cca_stats_params* statsParams, AiqStatist int ret = OK; do { + // HDR_FEATURE_S + // Run 3A without statistics when switching pipe. + if (aiqResult->mAiqParam.tuningMode == TUNING_MODE_VIDEO_ULL && + aiqStatistics->mTuningMode == TUNING_MODE_VIDEO_HDR) { + LOG2("Switching from HDR to ULL pipe"); + ret = INVALID_OPERATION; + break; + } else if (aiqResult->mAiqParam.tuningMode == TUNING_MODE_VIDEO_HDR && + aiqStatistics->mTuningMode == TUNING_MODE_VIDEO_ULL) { + LOG2("Switching from ULL to HDR pipe"); + ret = INVALID_OPERATION; + break; + } + // HDR_FEATURE_E // The statistics timestamp is incorrect. If possible, use SOF timestamp instead. unsigned long long timestamp = mSensorManager->getSofTimestamp(aiqStatistics->mSequence); @@ -210,8 +224,8 @@ int AiqEngine::prepareStatsParams(cca::cca_stats_params* statsParams, AiqStatist CheckAndLogError(!gc, UNKNOWN_ERROR, "%s, Failed to get graph config", __func__); ia_isp_bxt_resolution_info_t resolution; - uint32_t gdcKernelId; - int status = gc->getGdcKernelSetting(&gdcKernelId, &resolution); + uint32_t kernelId; + int status = gc->getGdcKernelSetting(&kernelId, &resolution, aiqStatistics->mStreamId); CheckWarning(status != OK, UNKNOWN_ERROR, "Failed to get GDC kernel setting"); statsParams->dvs_stats_height = resolution.output_height; @@ -232,6 +246,19 @@ void AiqEngine::setAiqResult(AiqResult* aiqResult, bool skip) { LOG2("%s, skipping the frame", aiqResult->mSequence, __func__); } + // HDR_FEATURE_S + int64_t sequence = aiqResult->mSequence - PlatformData::getExposureLag(mCameraId); + mSensorManager->setWdrMode(aiqResult->mTuningMode, sequence); + + if (PlatformData::getSensorAwbEnable(mCameraId)) { + LOG2("%s, Set sensor awb %f %f", __func__, aiqResult->mAwbResults.accurate_r_per_g, + aiqResult->mAwbResults.accurate_b_per_g); + + mSensorManager->setAWB(aiqResult->mAwbResults.accurate_r_per_g, + aiqResult->mAwbResults.accurate_b_per_g); + } + // HDR_FEATURE_E + mLensManager->setLensResult(aiqResult->mAfResults, aiqResult->mSequence, aiqResult->mAiqParam); } @@ -244,9 +271,6 @@ int AiqEngine::getSkippingNum(AiqResult* aiqResult) { // Skip 3 frames when pipe switching skipNum = 3; } - } else if (mAiqRunningForPerframe) { - // The 1st result takes effect @ frame (initialSkip) (applied before stream on) - skipNum = PlatformData::getInitialSkipFrame(mCameraId); } return skipNum; @@ -293,6 +317,9 @@ AiqEngine::AiqState AiqEngine::prepareInputParam(AiqStatistics* aiqStats, AiqRes // Update sensor info for the first-run of AIQ if (mFirstAiqRunning) { + // CRL_MODULE_S + mSensorManager->setFrameRate(aiqResult->mAiqParam.fps); + // CRL_MODULE_E // set sensor info if needed ia_aiq_exposure_sensor_descriptor sensorDescriptor = {}; ia_aiq_frame_params frameParams = {}; @@ -304,7 +331,8 @@ AiqEngine::AiqState AiqEngine::prepareInputParam(AiqStatistics* aiqStats, AiqRes // update lens related parameters mLensManager->getLensInfo(aiqResult->mAiqParam); - mAiqCore->updateParameter(aiqResult->mAiqParam); + ret = mAiqCore->updateParameter(aiqResult->mAiqParam); + if (ret != OK) return AIQ_STATE_ERROR; if (aiqStats == nullptr) { LOG2("%s: run aiq without stats data", __func__); @@ -337,6 +365,23 @@ AiqEngine::AiqState AiqEngine::runAiq(long requestId, int64_t applyingSeq, AiqRe return AIQ_STATE_ERROR; } + // PRIVACY_MODE_S + if (PlatformData::getSupportPrivacy(mCameraId) == AE_BASED_PRIVACY_MODE) { + uint32_t outMaxBin = 0; + ret = mAiqCore->getBrightestIndex(outMaxBin); + if (ret == OK) { + EventData3AReady data; + data.sequence = requestId; + data.maxBin = outMaxBin; + EventData eventData; + eventData.type = EVENT_3A_READY; + eventData.buffer = nullptr; + eventData.data.run3AReady = data; + notifyListeners(eventData); + } + } + // PRIVACY_MODE_E + setSensorExposure(aiqResult, applyingSeq); ret = mAiqCore->runAiq(requestId, aiqResult); @@ -367,6 +412,13 @@ void AiqEngine::setSensorExposure(AiqResult* aiqResult, int64_t applyingSeq) { AiqEngine::AiqState AiqEngine::handleAiqResult(AiqResult* aiqResult) { LOG2("%s: aiqResult->mTuningMode = %d", __func__, aiqResult->mTuningMode); + // HDR_FEATURE_S + aec_scene_t aecScene = (aiqResult->mAeResults.multiframe == ia_aiq_bracket_mode_ull) ? + AEC_SCENE_ULL : + AEC_SCENE_HDR; + mAiqSetting->updateTuningMode(aecScene); + // HDR_FEATURE_E + aiqResult->mSceneMode = SCENE_MODE_AUTO; /* Use direct AE result to update sceneMode to reflect the actual mode AE want to have, * Besides needed by full pipe auto-switch, this is also necessary when user want to diff --git a/src/3a/AiqEngine.h b/src/3a/AiqEngine.h index a03af213..3b17fdb3 100644 --- a/src/3a/AiqEngine.h +++ b/src/3a/AiqEngine.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ namespace icamera { * and set result to HW layer. * This is sub thread class. */ -class AiqEngine : public EventListener { +class AiqEngine : public EventListener, public EventSource { public: AiqEngine(int cameraId, SensorHwCtrl* sensorHw, LensHw* lensHw, AiqSetting* setting); ~AiqEngine(); diff --git a/src/3a/AiqResult.cpp b/src/3a/AiqResult.cpp index 48a56bbe..1c3f7744 100644 --- a/src/3a/AiqResult.cpp +++ b/src/3a/AiqResult.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,8 +33,11 @@ AiqResult::AiqResult(int cameraId) mSkip(false), mLensPosition(0), mSceneMode(SCENE_MODE_AUTO), + mLscUpdate(false), mFrameDuration(0), mRollingShutter(0) { + CLEAR(mAnalogGainRange); + CLEAR(mDigitalGainRange); CLEAR(mCustomControls); CLEAR(mCustomControlsParams); CLEAR(mAwbResults); @@ -57,7 +60,7 @@ int AiqResult::init() { CLEAR(mAwbResults); CLEAR(mPaResults); CLEAR(mOutStats); - mOutStats.rgbs_grid.blocks_ptr = mOutStats.rgbs_blocks; + mOutStats.rgbs_grid[0].blocks_ptr = mOutStats.rgbs_blocks[0]; mAiqParam.reset(); @@ -74,37 +77,4 @@ int AiqResult::deinit() { return OK; } -AiqResult& AiqResult::operator=(const AiqResult& other) { - mCameraId = other.mCameraId; - mSequence = other.mSequence; - mFrameId = other.mFrameId; - mTimestamp = other.mTimestamp; - mTuningMode = other.mTuningMode; - mAfDistanceDiopters = other.mAfDistanceDiopters; - mSkip = other.mSkip; - mLensPosition = other.mLensPosition; - mSceneMode = other.mSceneMode; - mFocusRange = other.mFocusRange; - - mAeResults = other.mAeResults; - mAwbResults = other.mAwbResults; - mAfResults = other.mAfResults; - mGbceResults = other.mGbceResults; - mPaResults = other.mPaResults; - mOutStats = other.mOutStats; - mOutStats.rgbs_grid.blocks_ptr = mOutStats.rgbs_blocks; - - mCustomControls.count = other.mCustomControls.count; - for (int i = 0; i < mCustomControls.count; i++) { - mCustomControlsParams[i] = other.mCustomControlsParams[i]; - } - MEMCPY_S(mLensShadingMap, sizeof(mLensShadingMap), other.mLensShadingMap, - sizeof(other.mLensShadingMap)); - - mAiqParam = other.mAiqParam; - mFrameDuration = other.mFrameDuration; - mRollingShutter = other.mRollingShutter; - - return *this; -} } /* namespace icamera */ diff --git a/src/3a/AiqResult.h b/src/3a/AiqResult.h index 3fb75d9f..4b501b2c 100644 --- a/src/3a/AiqResult.h +++ b/src/3a/AiqResult.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,14 +41,14 @@ class AiqResult { int init(); int deinit(); - AiqResult& operator=(const AiqResult& other); - public: int mCameraId; unsigned long long mTimestamp; int64_t mSequence; int64_t mFrameId; // CCA frame id TuningMode mTuningMode; + float mAnalogGainRange[2]; + float mDigitalGainRange[2]; float mAfDistanceDiopters; bool mSkip; camera_range_t mFocusRange; @@ -61,6 +61,7 @@ class AiqResult { cca::cca_gbce_params mGbceResults; cca::cca_pa_params mPaResults; cca::cca_out_stats mOutStats; + bool mLscUpdate; ia_isp_custom_controls mCustomControls; diff --git a/src/3a/AiqResultStorage.cpp b/src/3a/AiqResultStorage.cpp index 6e55a96e..c82ed037 100644 --- a/src/3a/AiqResultStorage.cpp +++ b/src/3a/AiqResultStorage.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2022 Intel Corporation. + * Copyright (C) 2016-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -136,6 +136,32 @@ const AiqResult* AiqResultStorage::getAiqResult(int64_t sequence) { return nullptr; } +void AiqResultStorage::updateDvsRunMap(int64_t sequence) { + AutoWMutex wlock(mDataLock); + + mDvsRunMap[sequence] = true; + + if (mDvsRunMap.size() > kDvsRunMapSize) { + mDvsRunMap.erase(mDvsRunMap.begin()); + } +} + +void AiqResultStorage::clearDvsRunMap() { + AutoWMutex wlock(mDataLock); + + mDvsRunMap.clear(); +} + +bool AiqResultStorage::isDvsRun(int64_t sequence) { + AutoWMutex rlock(mDataLock); + + if (mDvsRunMap.find(sequence) != mDvsRunMap.end()) { + return true; + } + + return false; +} + /** * Private function with no lock in it, must be called with lock protection */ diff --git a/src/3a/AiqResultStorage.h b/src/3a/AiqResultStorage.h index 70c0af4c..a227270f 100644 --- a/src/3a/AiqResultStorage.h +++ b/src/3a/AiqResultStorage.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2022 Intel Corporation. + * Copyright (C) 2016-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -126,6 +126,10 @@ class AiqResultStorage { */ void resetAiqStatistics(); + void updateDvsRunMap(int64_t sequence); + void clearDvsRunMap(); + bool isDvsRun(int64_t sequence); + private: AiqResultStorage(int cameraId); ~AiqResultStorage(); @@ -147,6 +151,10 @@ class AiqResultStorage { static const int kAiqStatsStorageSize = 3; // Always use the latest, but may hold for long time int mCurrentAiqStatsIndex = -1; AiqStatistics mAiqStatistics[kAiqStatsStorageSize]; + + static const int kDvsRunMapSize = 15; + // first: sequence id, second: true + std::map mDvsRunMap; }; } // namespace icamera diff --git a/src/3a/AiqSetting.cpp b/src/3a/AiqSetting.cpp index e7523141..0b6d1bef 100644 --- a/src/3a/AiqSetting.cpp +++ b/src/3a/AiqSetting.cpp @@ -268,6 +268,38 @@ int AiqSetting::getAiqParameter(aiq_parameter_t& param) { return OK; } +// HDR_FEATURE_S +/* When multi-TuningModes supported in AUTO ConfigMode, TuningMode may be changed + based on AE result. Current it only has HDR and ULL mode switching case, + this maybe changed if more cases are supported. */ +void AiqSetting::updateTuningMode(aec_scene_t aecScene) { + if (!PlatformData::isEnableHDR(mCameraId) || mTuningModes.size() <= 1 || + mAiqParam.aeMode != AE_MODE_AUTO) { + return; + } + + TuningMode tuningMode = mAiqParam.tuningMode; + if (aecScene == AEC_SCENE_HDR) { + tuningMode = TUNING_MODE_VIDEO_HDR; + } else if (aecScene == AEC_SCENE_ULL) { + tuningMode = TUNING_MODE_VIDEO_ULL; + } + + bool found = false; + for (auto& tMode : mTuningModes) { + // Check tuningMode if support or not + if (tMode == tuningMode) { + found = true; + break; + } + } + if (!found) { + LOG1("%s, new tuningMode %d isn't supported", __func__, tuningMode); + return; + } +} +// HDR_FEATURE_E + void aiq_parameter_t::reset() { frameUsage = FRAME_USAGE_VIDEO; aeMode = AE_MODE_AUTO; diff --git a/src/3a/AiqSetting.h b/src/3a/AiqSetting.h index 21e1d945..015f0791 100644 --- a/src/3a/AiqSetting.h +++ b/src/3a/AiqSetting.h @@ -27,6 +27,10 @@ namespace icamera { #define DEFAULT_LSC_GRID_SIZE (64 * 64) #define DEFAULT_TONEMAP_CURVE_POINT_NUM 2048 +// HDR_FEATURE_S +typedef enum { AEC_SCENE_NONE, AEC_SCENE_HDR, AEC_SCENE_ULL } aec_scene_t; +// HDR_FEATURE_E + typedef struct { char data[MAX_CUSTOM_CONTROLS_PARAM_SIZE]; unsigned int length; @@ -133,6 +137,10 @@ class AiqSetting { int getAiqParameter(aiq_parameter_t& param); + // HDR_FEATURE_S + void updateTuningMode(aec_scene_t aecScene); + // HDR_FEATURE_E + private: void updateFrameUsage(const stream_config_t* streamList); diff --git a/src/3a/AiqStatistics.h b/src/3a/AiqStatistics.h index 6518e0aa..bf4893d3 100644 --- a/src/3a/AiqStatistics.h +++ b/src/3a/AiqStatistics.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation. + * Copyright (C) 2018-2022 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,12 +26,14 @@ struct AiqStatistics { TuningMode mTuningMode; bool mInUse; bool mPendingDecode; + int32_t mStreamId; AiqStatistics() : mSequence(-1), mTimestamp(0), mTuningMode(TUNING_MODE_MAX), mInUse(false), - mPendingDecode(false) {} + mPendingDecode(false), + mStreamId(-1) {} }; } /* namespace icamera */ diff --git a/src/3a/AiqUnit.cpp b/src/3a/AiqUnit.cpp index 2ea52929..c5306073 100644 --- a/src/3a/AiqUnit.cpp +++ b/src/3a/AiqUnit.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -134,30 +134,25 @@ int AiqUnit::configure(const stream_config_t* streamList) { return BAD_VALUE; } - std::vector configModes; - PlatformData::getConfigModesByOperationMode(mCameraId, streamList->operation_mode, configModes); - int ret = initIntelCcaHandle(configModes); - CheckAndLogError(ret < 0, BAD_VALUE, "@%s failed to create intel cca handle", __func__); - - ret = mAiqSetting->configure(streamList); + int ret = mAiqSetting->configure(streamList); CheckAndLogError(ret != OK, ret, "configure AIQ settings error: %d", ret); ret = mAiqEngine->configure(); CheckAndLogError(ret != OK, ret, "configure AIQ engine error: %d", ret); - // LOCAL_TONEMAP_S - if (mLtm) { - ret = mLtm->configure(configModes); - CheckAndLogError(ret != OK, ret, "configure LTM engine error: %d", ret); - } - // LOCAL_TONEMAP_E + std::vector configModes; + PlatformData::getConfigModesByOperationMode(mCameraId, streamList->operation_mode, configModes); + ret = initIntelCcaHandle(configModes); + CheckAndLogError(ret < 0, BAD_VALUE, "@%s failed to create intel cca handle", __func__); mAiqUnitState = AIQ_UNIT_CONFIGURED; return OK; } -int AiqUnit::initIntelCcaHandle(const std::vector& configModes) { - if (PlatformData::supportUpdateTuning() && !configModes.empty()) { +void AiqUnit::resetIntelCcaHandle(const std::vector& configModes) { + bool reinit = false; + if ((PlatformData::supportUpdateTuning(mCameraId) || PlatformData::isDvsSupported(mCameraId)) && + !configModes.empty()) { std::shared_ptr graphConfig = IGraphConfigManager::getInstance(mCameraId)->getGraphConfig(configModes[0]); if (graphConfig != nullptr) { @@ -165,15 +160,75 @@ int AiqUnit::initIntelCcaHandle(const std::vector& configModes) { graphConfig->graphGetStreamIds(streamIds); if (streamIds.size() != mActiveStreamCount) { - LOG2("%s, the pipe count(%zu) changed, need to re-init CCA", __func__, + LOG1("%s, the pipe count(%zu) changed, need to re-init CCA", __func__, streamIds.size()); - deinitIntelCcaHandle(); mActiveStreamCount = streamIds.size(); + reinit = true; } } } - if (mCcaInitialized) return OK; + if (!mTuningModes.empty()) { + for (const auto& cfg : configModes) { + TuningMode tuningMode; + int ret = PlatformData::getTuningModeByConfigMode(mCameraId, cfg, tuningMode); + if (ret == OK) { + bool match = false; + for (auto mode : mTuningModes) { + if (tuningMode == mode) { + match = true; + break; + } + } + if (!match) { + LOG1("%s, tuning mode changed from %d to %d", __func__, mTuningModes[0], + tuningMode); + reinit = true; + break; + } + } + } + } + + if (reinit) deinitIntelCcaHandle(); +} + +int AiqUnit::initIntelCcaHandle(const std::vector& configModes) { + resetIntelCcaHandle(configModes); + + if (mCcaInitialized) { + // INTEL_DVS_S + if (mDvs) { + for (auto& cfg : configModes) { + std::vector streamIds; + std::shared_ptr graphConfig = + IGraphConfigManager::getInstance(mCameraId)->getGraphConfig(cfg); + if (graphConfig != nullptr) { + graphConfig->graphGetStreamIds(streamIds); + } + DvsConfig dvsConfig; + dvsConfig.gdcConfigs.count = streamIds.size(); + for (size_t i = 0; i < streamIds.size(); ++i) { + dvsConfig.gdcConfigs.ids[i] = streamIds[i]; + } + int ret = mDvs->configure(cfg, &dvsConfig); + CheckAndLogError(ret != OK, UNKNOWN_ERROR, "%s, configure DVS error", __func__); + + TuningMode tuningMode; + ret = PlatformData::getTuningModeByConfigMode(mCameraId, cfg, tuningMode); + CheckAndLogError(ret != OK, ret, "Failed to get tuningMode, cfg: %d", cfg); + IntelCca* intelCca = IntelCca::getInstance(mCameraId, tuningMode); + CheckAndLogError(!intelCca, UNKNOWN_ERROR, "Failed to get cca. mode:%d cameraId:%d", + tuningMode, mCameraId); + cca::cca_dvs_init_param dvsInitParam = {dvsConfig.zoomRatio, dvsConfig.outputType}; + ia_err iaErr = intelCca->reconfigDvs(dvsInitParam, dvsConfig.gdcConfigs); + CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, "Failed to reconfig DVS %d", + iaErr); + } + } + // INTEL_DVS_E + return OK; + } LOG1("@%s", mCameraId, __func__); mTuningModes.clear(); @@ -233,33 +288,80 @@ int AiqUnit::initIntelCcaHandle(const std::vector& configModes) { params.bitmap |= cca::CCA_MODULE_AF; } + std::shared_ptr graphConfig = + IGraphConfigManager::getInstance(mCameraId)->getGraphConfig(cfg); + // LOCAL_TONEMAP_S bool hasLtm = PlatformData::isLtmEnabled(mCameraId); + // HDR_FEATURE_S + if (PlatformData::isEnableHDR(mCameraId) && + !PlatformData::isMultiExposureCase(mCameraId, tuningMode)) { + hasLtm = false; + } + // HDR_FEATURE_E - if (hasLtm) { + // DOL_FEATURE_S + hasLtm |= (PlatformData::isDolShortEnabled(mCameraId) || + PlatformData::isDolMediumEnabled(mCameraId)); + // DOL_FEATURE_E + if (hasLtm && mLtm) { params.bitmap |= cca::CCA_MODULE_LTM; + ret = mLtm->configure(configModes, graphConfig, VIDEO_STREAM_ID); + CheckAndLogError(ret != OK, ret, "configure LTM engine error: %d", ret); } // LOCAL_TONEMAP_E // INTEL_DVS_S if (mDvs) { - std::shared_ptr graphConfig = - IGraphConfigManager::getInstance(mCameraId)->getGraphConfig(cfg); std::vector streamIds; - graphConfig->graphGetStreamIds(streamIds); - params.dvs_ids.count = streamIds.size(); + DvsConfig dvsConfig; + if (graphConfig != nullptr) { + graphConfig->graphGetStreamIds(streamIds); + } + dvsConfig.gdcConfigs.count = streamIds.size(); for (size_t i = 0; i < streamIds.size(); ++i) { - params.dvs_ids.ids[i] = streamIds[i]; + dvsConfig.gdcConfigs.ids[i] = streamIds[i]; } - ret = mDvs->configure(cfg, ¶ms); + ret = mDvs->configure(cfg, &dvsConfig); CheckAndLogError(ret != OK, UNKNOWN_ERROR, "%s, configure DVS error", __func__); params.bitmap |= cca::CCA_MODULE_DVS; + params.dvsOutputType = dvsConfig.outputType; + params.dvsZoomRatio = dvsConfig.zoomRatio; + params.enableVideoStablization = dvsConfig.enableDvs; + params.gdcConfigs = dvsConfig.gdcConfigs; } // INTEL_DVS_E - if (PlatformData::supportUpdateTuning()) { - std::shared_ptr graphConfig = - IGraphConfigManager::getInstance(mCameraId)->getGraphConfig(cfg); + // DOL_FEATURE_S + // Initialize Bcomp params + if (PlatformData::isDolShortEnabled(mCameraId) || + PlatformData::isDolMediumEnabled(mCameraId)) { + // Parse the DOL mode and CG ratio from sensor mode config + if (graphConfig != nullptr) { + std::string dol_mode_name; + graphConfig->getDolInfo(params.conversionGainRatio, dol_mode_name); + std::map dolModeNameMap; + dolModeNameMap["DOL_MODE_2_3_FRAME"] = ia_bcomp_dol_two_or_three_frame; + dolModeNameMap["DOL_MODE_DCG"] = ia_bcomp_dol_dcg; + dolModeNameMap["DOL_MODE_COMBINED_VERY_SHORT"] = ia_bcomp_dol_combined_very_short; + dolModeNameMap["DOL_MODE_DCG_VERY_SHORT"] = ia_bcomp_dol_dcg_very_short; + if (dolModeNameMap.count(dol_mode_name)) { + params.dolMode = dolModeNameMap[dol_mode_name]; + } + } + LOG2("conversionGainRatio: %f, dolMode: %d", params.conversionGainRatio, + params.dolMode); + params.bitmap = params.bitmap | cca::CCA_MODULE_BCOM; + } else if (PlatformData::getSensorAeEnable(mCameraId)) { + params.conversionGainRatio = 1; + params.dolMode = ia_bcomp_linear_hdr_mode; + LOG2("WA: conversionGainRatio: %f, dolMode: %d", params.conversionGainRatio, + params.dolMode); + params.bitmap = params.bitmap | cca::CCA_MODULE_BCOM; + } + // DOL_FEATURE_E + + if (PlatformData::supportUpdateTuning(mCameraId)) { if (graphConfig != nullptr) { std::vector streamIds; graphConfig->graphGetStreamIds(streamIds); @@ -408,11 +510,16 @@ std::vector AiqUnit::getDVSEventListener() { } // INTEL_DVS_E +// PRIVACY_MODE_S +EventSource* AiqUnit::get3AReadyEventSource() { + AutoMutex l(mAiqUnitLock); + return PlatformData::getSupportPrivacy(mCameraId) == AE_BASED_PRIVACY_MODE ? mAiqEngine : + nullptr; +} +// PRIVACY_MODE_E + int AiqUnit::setParameters(const Parameters& params) { AutoMutex l(mAiqUnitLock); - if (mDvs) { - mDvs->setParameter(params); - } return mAiqSetting->setParameters(params); } diff --git a/src/3a/AiqUnit.h b/src/3a/AiqUnit.h index 13c45d07..c4d74d12 100644 --- a/src/3a/AiqUnit.h +++ b/src/3a/AiqUnit.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -70,6 +70,10 @@ class AiqUnitBase { } // INTEL_DVS_E + // PRIVACY_MODE_S + virtual EventSource* get3AReadyEventSource() { return nullptr; } + // PRIVACY_MODE_E + virtual int setParameters(const Parameters& /*params*/) { return OK; } private: @@ -136,6 +140,13 @@ class AiqUnit : public AiqUnitBase { std::vector getDVSEventListener(); // INTEL_DVS_E + // PRIVACY_MODE_S + /** + * \brief Get EVENT_3A_READY EventSource + */ + EventSource* get3AReadyEventSource(); + // PRIVACY_MODE_E + /** * \brief Set 3A Parameters * @@ -147,6 +158,7 @@ class AiqUnit : public AiqUnitBase { DISALLOW_COPY_AND_ASSIGN(AiqUnit); private: + void resetIntelCcaHandle(const std::vector& configModes); int initIntelCcaHandle(const std::vector& configModes); void deinitIntelCcaHandle(); void dumpCcaInitParam(const cca::cca_init_params params); diff --git a/src/3a/AiqUtils.cpp b/src/3a/AiqUtils.cpp index 573d009d..19dda84c 100644 --- a/src/3a/AiqUtils.cpp +++ b/src/3a/AiqUtils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,6 +58,12 @@ void AiqUtils::dumpAeResults(const cca::cca_ae_results& aeResult) { LOG3("AE bracket mode = %d %s", aeResult.multiframe, aeResult.multiframe == ia_aiq_bracket_mode_ull ? "ULL" : "none-ULL"); + if (aeResult.flicker_reduction_mode == ia_aiq_ae_flicker_reduction_50hz) { + LOG3("AE antiflicker freq 50hz"); + } else if (aeResult.flicker_reduction_mode == ia_aiq_ae_flicker_reduction_60hz) { + LOG3("AE antiflicker freq 60hz"); + } + const cca::cca_hist_weight_grid& wg = aeResult.weight_grid; if (wg.width != 0 && wg.height != 0) { LOG3("AE weight grid [%dx%d]", wg.width, wg.height); @@ -103,6 +109,7 @@ void AiqUtils::dumpAwbResults(const cca::cca_awb_results& awbResult) { LOG3("AWB result: accurate_r/g %f, accurate_b/g %f, distance_from_convergence %f", awbResult.accurate_r_per_g, awbResult.accurate_b_per_g, awbResult.distance_from_convergence); + LOG3("AWB result: cct_estimate %d", awbResult.cct_estimate); } void AiqUtils::dumpGbceResults(const cca::cca_gbce_params& gbceResult) { @@ -263,6 +270,29 @@ float AiqUtils::convertSpeedModeToTime(camera_converge_speed_t mode) { return convergenceTime; } +// HDR_FEATURE_S +float AiqUtils::convertSpeedModeToTimeForHDR(camera_converge_speed_t mode) { + float convergenceTime = -1; + /* + * The unit of manual_convergence_time is second, and 1.0 means 1 second. + * The default value can be changed based on customer requirement. + */ + switch (mode) { + case CONVERGE_MID: + convergenceTime = 0.6; + break; + case CONVERGE_LOW: + convergenceTime = 1.0; + break; + case CONVERGE_NORMAL: + default: + convergenceTime = -1; + break; + } + return convergenceTime; +} +// HDR_FEATURE_E + /* * Get ia_aiq_frame_use * diff --git a/src/3a/AiqUtils.h b/src/3a/AiqUtils.h index b7710a09..44810048 100644 --- a/src/3a/AiqUtils.h +++ b/src/3a/AiqUtils.h @@ -89,6 +89,9 @@ camera_window_t convertToIaWindow(const camera_coordinate_system_t& srcSystem, float normalizeAwbGain(int gain); int convertToUserAwbGain(float normalizedGain); float convertSpeedModeToTime(camera_converge_speed_t mode); +// HDR_FEATURE_S +float convertSpeedModeToTimeForHDR(camera_converge_speed_t mode); +// HDR_FEATURE_E ia_aiq_frame_use convertFrameUsageToIaFrameUsage(int frameUsage); diff --git a/src/3a/Dvs.cpp b/src/3a/Dvs.cpp index 1ac14ecb..79f3a4e6 100644 --- a/src/3a/Dvs.cpp +++ b/src/3a/Dvs.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2022 Intel Corporation. + * Copyright (C) 2017-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,18 +39,22 @@ const int DVS_OXDIM_UV = 64; const int DVS_OYDIM_UV = 16; const int DVS_MIN_ENVELOPE = 12; -Dvs::Dvs(int cameraId) : mCameraId(cameraId), mTuningMode(TUNING_MODE_VIDEO) { - CLEAR(mPtzRegion); - CLEAR(mGDCRegion); -} +Dvs::Dvs(int cameraId) : + mCameraId(cameraId), mTuningMode(TUNING_MODE_VIDEO), mZoomRegion({ -1, -1, -1, -1 }) {} Dvs::~Dvs() {} -int Dvs::configure(const ConfigMode configMode, cca::cca_init_params* params) { +int Dvs::configure(const ConfigMode configMode, DvsConfig* cfg) { + CheckAndLogError(!cfg, BAD_VALUE, "cfg is nullptr"); LOG2("@%s", __func__); - int ret = configCcaDvsData(configMode, params); - CheckAndLogError(ret != OK, UNKNOWN_ERROR, "%s, configure DVS data error", __func__); + mZoomRegion = { -1, -1, -1, -1 }; + AiqResultStorage::getInstance(mCameraId)->clearDvsRunMap(); + + for (uint8_t i = 0; i < cfg->gdcConfigs.count; i++) { + auto ret = configCcaDvsData(cfg->gdcConfigs.ids[i], configMode, cfg); + CheckAndLogError(ret != OK, UNKNOWN_ERROR, "%s, configure DVS data error", __func__); + } TuningMode tuningMode; if (PlatformData::getTuningModeByConfigMode(mCameraId, configMode, tuningMode) != OK) { @@ -58,10 +62,11 @@ int Dvs::configure(const ConfigMode configMode, cca::cca_init_params* params) { } mTuningMode = tuningMode; + dumpDvsConfiguration(*cfg); return OK; } -int Dvs::configCcaDvsData(const ConfigMode configMode, cca::cca_init_params* params) { +int Dvs::configCcaDvsData(int32_t streamId, const ConfigMode configMode, DvsConfig* cfg) { // update GC std::shared_ptr gc = nullptr; if (PlatformData::getGraphConfigNodes(mCameraId)) { @@ -74,14 +79,23 @@ int Dvs::configCcaDvsData(const ConfigMode configMode, cca::cca_init_params* par ia_isp_bxt_resolution_info_t resolution; uint32_t gdcKernelId; - int status = gc->getGdcKernelSetting(&gdcKernelId, &resolution); + int status = gc->getGdcKernelSetting(&gdcKernelId, &resolution, streamId); CheckWarning(status != OK, UNKNOWN_ERROR, "Failed to get GDC kernel setting, DVS disabled"); LOG2("%s, GDC kernel setting: id: %u, resolution:src: %dx%d, dst: %dx%d", __func__, gdcKernelId, resolution.input_width, resolution.input_height, resolution.output_width, resolution.output_height); - cca::cca_gdc_configuration* gdcConfig = ¶ms->gdcConfig; + cca::cca_gdc_configuration* gdcConfig = nullptr; + for (size_t i = 0; i < cfg->gdcConfigs.count; ++i) { + if (cfg->gdcConfigs.ids[i] == static_cast(streamId)) { + gdcConfig = &cfg->gdcConfigs.configs[i]; + } + } + + CheckAndLogError(gdcConfig == nullptr, UNKNOWN_ERROR, + "%s, Cannot find correspond DVS GDC Config!", __func__); + CLEAR(*gdcConfig); gdcConfig->gdc_filter_width = DVS_MIN_ENVELOPE / 2; gdcConfig->gdc_filter_height = DVS_MIN_ENVELOPE / 2; @@ -127,125 +141,160 @@ int Dvs::configCcaDvsData(const ConfigMode configMode, cca::cca_init_params* par float zoomHRatio = resolution.input_width / (resolution.input_width - envelope_bq.width * 2); float zoomVRatio = resolution.input_height / (resolution.input_height - envelope_bq.height * 2); - params->dvsZoomRatio = (zoomHRatio > zoomVRatio) ? zoomHRatio : zoomVRatio; - params->enableVideoStablization = VIDEO_STABILIZATION_MODE_OFF; + cfg->zoomRatio = (zoomHRatio > zoomVRatio) ? zoomHRatio : zoomVRatio; + cfg->enableDvs = VIDEO_STABILIZATION_MODE_OFF; int dvsType = PlatformData::getDVSType(mCameraId); if (dvsType == IMG_TRANS) { - params->dvsOutputType = cca::CCA_DVS_IMAGE_TRANSFORM; + cfg->outputType = cca::CCA_DVS_IMAGE_TRANSFORM; } else { - params->dvsOutputType = cca::CCA_DVS_MORPH_TABLE; + cfg->outputType = cca::CCA_DVS_MORPH_TABLE; } gdcConfig->gdc_resolution_history = gdcConfig->gdc_resolution_info; - mGDCRegion.left = 0; - mGDCRegion.top = 0; - mGDCRegion.right = resolution.input_width / 2; - mGDCRegion.bottom = resolution.input_height / 2; + ZoomParam zoomParam; + CLEAR(zoomParam); + zoomParam.gdcRegion.left = 0; + zoomParam.gdcRegion.top = 0; + zoomParam.gdcRegion.right = resolution.input_width / 2; + zoomParam.gdcRegion.bottom = resolution.input_height / 2; + + { + std::lock_guard l(mLock); + mZoomParamMap[streamId] = zoomParam; + } - dumpDvsConfiguration(*params); return OK; } -void Dvs::setParameter(const Parameters& p) { - p.getZoomRegion(&mPtzRegion); +void Dvs::setParameter(const camera_zoom_region_t& region) { + // Convert active pixel array system to GDC system. + camera_coordinate_system_t srcSystem = PlatformData::getActivePixelArray(mCameraId); + std::lock_guard l(mLock); + for (auto& it : mZoomParamMap) { + auto& gdcRegion = it.second.gdcRegion; + auto& ptzRegion = it.second.ptzRegion; + + camera_coordinate_system_t dstSystem = {gdcRegion.left, gdcRegion.top, gdcRegion.right, + gdcRegion.bottom}; + LOG2("%s, dstSystem [%d, %d, %d, %d]", __func__, gdcRegion.left, gdcRegion.top, + gdcRegion.right, gdcRegion.bottom); + + camera_coordinate_t srcCoordinate = {region.left, region.top}; + camera_coordinate_t dstCoordinate + = AiqUtils::convertCoordinateSystem(srcSystem, dstSystem, srcCoordinate); + ptzRegion.left = dstCoordinate.x; + ptzRegion.top = dstCoordinate.y; + srcCoordinate = {region.right, region.bottom}; + dstCoordinate = AiqUtils::convertCoordinateSystem(srcSystem, dstSystem, srcCoordinate); + ptzRegion.right = dstCoordinate.x; + ptzRegion.bottom = dstCoordinate.y; + LOG2("%s, Ptz [%d, %d, %d, %d]", __func__, ptzRegion.left, ptzRegion.top, + ptzRegion.right, ptzRegion.bottom); + } } void Dvs::handleEvent(EventData eventData) { LOG2("@%s: eventData.type:%d", __func__, eventData.type); if (eventData.type != EVENT_DVS_READY) return; + if ((eventData.data.dvsRunReady.streamId == VIDEO_STREAM_ID) && + (eventData.data.dvsRunReady.region.left == mZoomRegion.left) && + (eventData.data.dvsRunReady.region.top == mZoomRegion.top) && + (eventData.data.dvsRunReady.region.right == mZoomRegion.right) && + (eventData.data.dvsRunReady.region.bottom == mZoomRegion.bottom)) return; + + int64_t sequence = eventData.data.dvsRunReady.sequence; + AiqResult* aiqResults = const_cast( + AiqResultStorage::getInstance(mCameraId)->getAiqResult(sequence)); + if (aiqResults == nullptr) return; + + setParameter(eventData.data.dvsRunReady.region); + int streamId = eventData.data.dvsRunReady.streamId; IntelCca* intelCcaHandle = IntelCca::getInstance(mCameraId, mTuningMode); CheckAndLogError(!intelCcaHandle, VOID_VALUE, "@%s, Failed to get IntelCca instance", __func__); + camera_zoom_region_t gdcRegion; + camera_zoom_region_t ptzRegion; + { + std::lock_guard l(mLock); + if (mZoomParamMap.find(streamId) == mZoomParamMap.end()) return; + + gdcRegion = mZoomParamMap[streamId].gdcRegion; + ptzRegion = mZoomParamMap[streamId].ptzRegion; + } + // Run DVS - LOG2("%s: Ready to run DVS", __func__); + LOG2("%s: Ready to run DVS, sequence %ld", __func__, sequence); cca::cca_dvs_zoom zp; memset(&zp, 0, sizeof(zp)); zp.digital_zoom_ratio = 1.0f; zp.digital_zoom_factor = 1.0f; zp.zoom_mode = ia_dvs_zoom_mode_region; - if (!mPtzRegion.left && !mPtzRegion.top && !mPtzRegion.right && !mPtzRegion.bottom) { - zp.zoom_region = {mGDCRegion.left, mGDCRegion.top, mGDCRegion.right, mGDCRegion.bottom}; + if (!ptzRegion.left && !ptzRegion.top && !ptzRegion.right && !ptzRegion.bottom) { + zp.zoom_region = {gdcRegion.left, gdcRegion.top, gdcRegion.right, gdcRegion.bottom}; } else { - /* - SCALER_CROP_REGION can adjust to a small crop region if the aspect of active - pixel array is not same as the crop region aspect. Crop can only on either - horizontally or veritacl but never both. - If active pixel array's aspect ratio is wider than the crop region, the region - should be further cropped vertically. - */ - auto coord = PlatformData::getActivePixelArray(mCameraId); - int wpa = coord.right - coord.left; - int hpa = coord.bottom - coord.top; - - int width = mPtzRegion.right - mPtzRegion.left; - int height = mPtzRegion.bottom - mPtzRegion.top; - - float aspect0 = static_cast(wpa) / hpa; - float aspect1 = static_cast(width) / height; - - if (std::fabs(aspect0 - aspect1) < 0.00001) { - zp.zoom_region = {mPtzRegion.left, mPtzRegion.top, mPtzRegion.right, mPtzRegion.bottom}; - } else if (aspect0 > aspect1) { - auto croppedHeight = width / aspect0; - int diff = std::abs(height - croppedHeight) / 2; - zp.zoom_region = {mPtzRegion.left, mPtzRegion.top + diff, mPtzRegion.right, - mPtzRegion.bottom - diff}; - } else { - auto croppedWidth = height * aspect0; - int diff = std::abs(width - croppedWidth) / 2; - zp.zoom_region = {mPtzRegion.left + diff, mPtzRegion.top, mPtzRegion.right - diff, - mPtzRegion.bottom}; - } + zp.zoom_region = {ptzRegion.left, ptzRegion.top, ptzRegion.right, ptzRegion.bottom}; } intelCcaHandle->updateZoom(streamId, zp); - ia_err iaErr = intelCcaHandle->runDVS(streamId, eventData.data.statsReady.sequence); + ia_err iaErr = intelCcaHandle->runDVS(streamId, aiqResults->mFrameId); int ret = AiqUtils::convertError(iaErr); CheckAndLogError(ret != OK, VOID_VALUE, "Error running DVS: %d", ret); + + if (eventData.data.dvsRunReady.streamId == VIDEO_STREAM_ID) { + mZoomRegion = eventData.data.dvsRunReady.region; + AiqResultStorage::getInstance(mCameraId)->updateDvsRunMap(sequence); + } + return; } -void Dvs::dumpDvsConfiguration(const cca::cca_init_params& config) { +void Dvs::dumpDvsConfiguration(const DvsConfig& config) { if (!Log::isLogTagEnabled(GET_FILE_SHIFT(Dvs), CAMERA_DEBUG_LOG_LEVEL3)) return; - LOG3("config.dvsOutputType %d", config.dvsOutputType); - LOG3("config.enableVideoStablization %d", config.enableVideoStablization); - LOG3("config.dvsZoomRatio %f", config.dvsZoomRatio); - LOG3("config.gdcConfig.pre_gdc_top_padding %d", config.gdcConfig.pre_gdc_top_padding); - LOG3("config.gdcConfig.pre_gdc_bottom_padding %d", config.gdcConfig.pre_gdc_bottom_padding); - LOG3("config.gdcConfig.gdc_filter_width %d", config.gdcConfig.gdc_filter_width); - LOG3("config.gdcConfig.gdc_filter_height %d", config.gdcConfig.gdc_filter_height); - LOG3("config.gdcConfig.splitMetadata[0](oydim_uv) %d", config.gdcConfig.splitMetadata[0]); - LOG3("config.gdcConfig.splitMetadata[1](oxdim_uv) %d", config.gdcConfig.splitMetadata[1]); - LOG3("config.gdcConfig.splitMetadata[2](oydim_y) %d", config.gdcConfig.splitMetadata[2]); - LOG3("config.gdcConfig.splitMetadata[3](oxdim_y) %d", config.gdcConfig.splitMetadata[3]); - LOG3("config.gdcConfig.gdc_resolution_info.input_width %d, input_height %d", - config.gdcConfig.gdc_resolution_info.input_width, - config.gdcConfig.gdc_resolution_info.input_height); - LOG3("config.gdcConfig.gdc_resolution_info.output_width %d, output_height %d", - config.gdcConfig.gdc_resolution_info.output_width, - config.gdcConfig.gdc_resolution_info.output_height); - LOG3("config.gdcConfig.gdc_resolution_info.input_crop.left %d, top %d, right %d, bottom %d", - config.gdcConfig.gdc_resolution_info.input_crop.left, - config.gdcConfig.gdc_resolution_info.input_crop.top, - config.gdcConfig.gdc_resolution_info.input_crop.right, - config.gdcConfig.gdc_resolution_info.input_crop.bottom); - LOG3("config.gdcConfig.gdc_resolution_history.input_width %d, input_height %d", - config.gdcConfig.gdc_resolution_history.input_width, - config.gdcConfig.gdc_resolution_history.input_height); - LOG3("config.gdcConfig.gdc_resolution_history.output_width %d, output_height %d", - config.gdcConfig.gdc_resolution_history.output_width, - config.gdcConfig.gdc_resolution_history.output_height); - LOG3("config.gdcConfig.gdc_resolution_history.input_crop.left %d, top %d, right %d, bottom %d", - config.gdcConfig.gdc_resolution_history.input_crop.left, - config.gdcConfig.gdc_resolution_history.input_crop.top, - config.gdcConfig.gdc_resolution_history.input_crop.right, - config.gdcConfig.gdc_resolution_history.input_crop.bottom); + LOG3("config: dvsOutputType %d", config.outputType); + LOG3("config: enableVideoStablization %d", config.enableDvs); + LOG3("config: dvsZoomRatio %f", config.zoomRatio); + + for (size_t i = 0; i < config.gdcConfigs.count; ++i) { + LOG3("GDC Config for steeam: %d", config.gdcConfigs.ids[i]); + + auto gdcConfig = config.gdcConfigs.configs[i]; + LOG3("gdcConfig.pre_gdc_top_padding %d", gdcConfig.pre_gdc_top_padding); + LOG3("gdcConfig.pre_gdc_bottom_padding %d", gdcConfig.pre_gdc_bottom_padding); + LOG3("gdcConfig.gdc_filter_width %d", gdcConfig.gdc_filter_width); + LOG3("gdcConfig.gdc_filter_height %d", gdcConfig.gdc_filter_height); + LOG3("gdcConfig.splitMetadata[0](oydim_uv) %d", gdcConfig.splitMetadata[0]); + LOG3("gdcConfig.splitMetadata[1](oxdim_uv) %d", gdcConfig.splitMetadata[1]); + LOG3("gdcConfig.splitMetadata[2](oydim_y) %d", gdcConfig.splitMetadata[2]); + LOG3("gdcConfig.splitMetadata[3](oxdim_y) %d", gdcConfig.splitMetadata[3]); + LOG3("gdcConfig.gdc_resolution_info.input_width %d, input_height %d", + gdcConfig.gdc_resolution_info.input_width, + gdcConfig.gdc_resolution_info.input_height); + LOG3("gdcConfig.gdc_resolution_info.output_width %d, output_height %d", + gdcConfig.gdc_resolution_info.output_width, + gdcConfig.gdc_resolution_info.output_height); + LOG3("gdcConfig.gdc_resolution_info.input_crop.left %d, top %d, right %d, bottom %d", + gdcConfig.gdc_resolution_info.input_crop.left, + gdcConfig.gdc_resolution_info.input_crop.top, + gdcConfig.gdc_resolution_info.input_crop.right, + gdcConfig.gdc_resolution_info.input_crop.bottom); + LOG3("gdcConfig.gdc_resolution_history.input_width %d, input_height %d", + gdcConfig.gdc_resolution_history.input_width, + gdcConfig.gdc_resolution_history.input_height); + LOG3("gdcConfig.gdc_resolution_history.output_width %d, output_height %d", + gdcConfig.gdc_resolution_history.output_width, + gdcConfig.gdc_resolution_history.output_height); + LOG3("gdcConfig.gdc_resolution_history.input_crop.left %d, top %d, right %d, bottom %d", + gdcConfig.gdc_resolution_history.input_crop.left, + gdcConfig.gdc_resolution_history.input_crop.top, + gdcConfig.gdc_resolution_history.input_crop.right, + gdcConfig.gdc_resolution_history.input_crop.bottom); + } } } // namespace icamera diff --git a/src/3a/Dvs.h b/src/3a/Dvs.h index a509e50c..a668a312 100644 --- a/src/3a/Dvs.h +++ b/src/3a/Dvs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2021 Intel Corporation + * Copyright (C) 2017-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ #include #include +#include #include "AiqSetting.h" #include "CameraEvent.h" @@ -36,24 +37,38 @@ #include "Parameters.h" namespace icamera { + +typedef struct DvsConfig { + cca::cca_gdc_configurations gdcConfigs; + float zoomRatio; + cca::CCADVSOutputType outputType; + bool enableDvs; +} DvsConfig; + class Dvs : public EventListener { public: explicit Dvs(int cameraId); ~Dvs(); - int configure(const ConfigMode configMode, cca::cca_init_params* params); + int configure(const ConfigMode configMode, DvsConfig* cfg); void handleEvent(EventData eventData); - void setParameter(const Parameters& p); private: - int configCcaDvsData(const ConfigMode configMode, cca::cca_init_params* params); - void dumpDvsConfiguration(const cca::cca_init_params& config); + int configCcaDvsData(int32_t streamId, const ConfigMode configMode, DvsConfig* cfg); + void dumpDvsConfiguration(const DvsConfig& config); + void setParameter(const camera_zoom_region_t& region); private: int mCameraId; TuningMode mTuningMode; - camera_zoom_region_t mPtzRegion; - camera_zoom_region_t mGDCRegion; + camera_zoom_region_t mZoomRegion; + struct ZoomParam { + camera_zoom_region_t ptzRegion; + camera_zoom_region_t gdcRegion; + }; + // first: stream id, second: ZoomParam + std::unordered_map mZoomParamMap; + std::mutex mLock; // prevent copy constructor and assignment operator DISALLOW_COPY_AND_ASSIGN(Dvs); diff --git a/src/3a/Ltm.cpp b/src/3a/Ltm.cpp index 496cacc7..ad1c61fb 100644 --- a/src/3a/Ltm.cpp +++ b/src/3a/Ltm.cpp @@ -29,6 +29,9 @@ #include "iutils/Errors.h" #include "iutils/Utils.h" +#include "ia_pal_types_isp_ids_autogen.h" +#include "ia_pal_types_isp.h" + namespace icamera { Ltm::Ltm(int cameraId) @@ -38,6 +41,7 @@ Ltm::Ltm(int cameraId) mThreadRunning(false), mInputParamIndex(-1) { CLEAR(mLtmParams); + CLEAR(mFrameResolution); if (PlatformData::isEnableLtmThread(mCameraId)) { mLtmThread = new LtmThread(this); @@ -81,16 +85,53 @@ int Ltm::deinit() { return OK; } -int Ltm::configure(const std::vector& configModes) { +int Ltm::getPixelCropperResolution(std::shared_ptr graphConfig, int32_t streamId, + camera_resolution_t* resolution) { + ia_isp_bxt_program_group* pgPtr = graphConfig->getProgramGroup(streamId); + for (unsigned int i = 0; i < pgPtr->kernel_count; i++) { + // The kernel value is for cca_ltm_input_params::frame_width and frame_height. + if (pgPtr->run_kernels[i].kernel_uuid == ia_pal_uuid_isp_pxl_crop_yuv_a) { + if (pgPtr->run_kernels[i].resolution_info) { + resolution->width = pgPtr->run_kernels[i].resolution_info->output_width; + resolution->height = pgPtr->run_kernels[i].resolution_info->output_height; + return OK; + } else { + resolution->width = pgPtr->run_kernels[i].resolution_history->output_width; + resolution->height = pgPtr->run_kernels[i].resolution_history->output_height; + } + } + } + + return UNKNOWN_ERROR; +} + +int Ltm::configure(const std::vector& configModes, + std::shared_ptr graphConfig, int32_t streamId) { TuningMode tMode = TUNING_MODE_MAX; for (auto cfg : configModes) { // Only support the 1st tuning mode if multiple config mode is configured. if (cfg == CAMERA_STREAM_CONFIGURATION_MODE_NORMAL) { tMode = TUNING_MODE_VIDEO; break; + // HDR_FEATURE_S + } else if (cfg == CAMERA_STREAM_CONFIGURATION_MODE_HLC) { + tMode = TUNING_MODE_VIDEO_HLC; + break; + } else if (cfg == CAMERA_STREAM_CONFIGURATION_MODE_HDR) { + tMode = TUNING_MODE_VIDEO_HDR; + break; + } else if (cfg == CAMERA_STREAM_CONFIGURATION_MODE_HDR2) { + tMode = TUNING_MODE_VIDEO_HDR2; + break; + // HDR_FEATURE_E } } + if (graphConfig) { + int ret = getPixelCropperResolution(graphConfig, streamId, &mFrameResolution); + CheckAndLogError(ret != OK, ret, "failed to get sis output resolution"); + } + if (tMode == TUNING_MODE_MAX) { return OK; } @@ -133,8 +174,8 @@ void Ltm::stop() { } void Ltm::handleEvent(EventData eventData) { - if ((eventData.type != EVENT_PSYS_STATS_SIS_BUF_READY) && - (eventData.pipeType != STILL_STREAM_ID)) + if ((eventData.type != EVENT_PSYS_STATS_SIS_BUF_READY) || + (eventData.pipeType != VIDEO_STREAM_ID)) return; LOG2("%s: handle EVENT_PSYS_STATS_SIS_BUF_READY", __func__); @@ -177,8 +218,8 @@ int Ltm::handleSisLtm(const std::shared_ptr& cameraBuffer) { AiqResult* feedback = getAiqResult(sequence); mLtmParams[mInputParamIndex]->ltmParams.ev_shift = feedback->mAiqParam.evShift; mLtmParams[mInputParamIndex]->ltmParams.ltm_strength_manual = feedback->mAiqParam.ltmStrength; - mLtmParams[mInputParamIndex]->ltmParams.frame_width = feedback->mAiqParam.resolution.width; - mLtmParams[mInputParamIndex]->ltmParams.frame_height = feedback->mAiqParam.resolution.height; + mLtmParams[mInputParamIndex]->ltmParams.frame_width = mFrameResolution.width; + mLtmParams[mInputParamIndex]->ltmParams.frame_height = mFrameResolution.height; ia_image_full_info* imageInfo = &mLtmParams[mInputParamIndex]->ltmParams.sis.image_info; CLEAR(*imageInfo); @@ -196,6 +237,14 @@ int Ltm::handleSisLtm(const std::shared_ptr& cameraBuffer) { cca::cca_ltm_statistics* sis = &mLtmParams[mInputParamIndex]->ltmParams.sis; MEMCPY_S(sis->data, sizeof(sis->data), data, size); sis->size = sizeof(sis->data) > size ? size : sizeof(sis->data); + LOG3( + "LTM data_format %d, bayer_order %d, data_format_bpp %d, data_bpp %d, frame_width and " + "height(%d, %d), SIS_image_width & height and right padder(%d, %d, %d), image data size %d", + imageInfo->raw_image.data_format, imageInfo->raw_image.bayer_order, + imageInfo->raw_image.data_format_bpp, imageInfo->raw_image.data_bpp, + mLtmParams[mInputParamIndex]->ltmParams.frame_width, + mLtmParams[mInputParamIndex]->ltmParams.frame_height, imageInfo->raw_image.width_cols, + imageInfo->raw_image.height_lines, imageInfo->extra_cols_right, sis->size); if ((!PlatformData::isEnableLtmThread(mCameraId)) || sequence == 0) { runLtm(*mLtmParams[mInputParamIndex]); diff --git a/src/3a/Ltm.h b/src/3a/Ltm.h index b123a2e7..55f584b8 100644 --- a/src/3a/Ltm.h +++ b/src/3a/Ltm.h @@ -57,7 +57,8 @@ class Ltm : public EventListener { int start(); void stop(); - int configure(const std::vector& configModes); + int configure(const std::vector& configModes, + std::shared_ptr graphConfig, int32_t streamId); /** * \brief handle statistics event @@ -68,6 +69,9 @@ class Ltm : public EventListener { private: DISALLOW_COPY_AND_ASSIGN(Ltm); + int getPixelCropperResolution(std::shared_ptr graphConfig, int32_t streamId, + camera_resolution_t* resolution); + int runLtmAsync(); int runLtm(const LtmInputParams& ltmInputParams); @@ -105,6 +109,8 @@ class Ltm : public EventListener { int mInputParamIndex; LtmInputParams* mLtmParams[kMaxLtmParamsNum]; std::queue mLtmParamsQ; + + camera_resolution_t mFrameResolution; }; } /* namespace icamera */ diff --git a/src/3a/MakerNote.cpp b/src/3a/MakerNote.cpp index 0547efe0..6c3bf745 100644 --- a/src/3a/MakerNote.cpp +++ b/src/3a/MakerNote.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation. + * Copyright (C) 2018-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -117,6 +117,18 @@ int MakerNote::saveMakernoteData(int cameraId, camera_makernote_mode_t makernote return OK; } +void* MakerNote::getMakernoteBuf(camera_makernote_mode_t makernoteMode, bool& dump) { + LOG2("@%s", __func__); + dump = CameraDump::isDumpTypeEnable(DUMP_MAKER_NOTE); + if ((makernoteMode == MAKERNOTE_MODE_OFF) && !dump) return nullptr; + + AutoMutex lock(mMknLock); + CheckAndLogError(mMknState != INIT, nullptr, "@%s, mkn isn't initialized", __func__); + + MakernoteData data = mMakernoteDataList.front(); + return data.mknData; +} + void MakerNote::updateTimestamp(int64_t sequence, uint64_t timestamp) { LOG2("@%s, mMknState:%d", __func__, mMknState); AutoMutex lock(mMknLock); diff --git a/src/3a/MakerNote.h b/src/3a/MakerNote.h index 6b3361c3..7001d941 100644 --- a/src/3a/MakerNote.h +++ b/src/3a/MakerNote.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation. + * Copyright (C) 2018-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -95,6 +95,16 @@ class MakerNote { int saveMakernoteData(int cameraId, camera_makernote_mode_t makernoteMode, int64_t sequence, TuningMode tuningMode); + /** + * \brief Get makernote buffer + * + * param[in] camera_makernote_mode_t: makernote mode + * param[out] bool: return if in dump case + * + * return pointer of makernote buffer, otherwise return nullptr. + */ + void* getMakernoteBuf(camera_makernote_mode_t makernoteMode, bool& dump); + /** * \brief Update timestamp of frame. * @@ -115,7 +125,7 @@ class MakerNote { private: // Should > max request number in processing - static const int MAX_MAKER_NOTE_LIST_SIZE = 32; + static const int MAX_MAKER_NOTE_LIST_SIZE = 48; enum MknState { UNINIT, INIT } mMknState; diff --git a/src/3a/SensorManager.cpp b/src/3a/SensorManager.cpp index b795fbf2..2eb27a56 100644 --- a/src/3a/SensorManager.cpp +++ b/src/3a/SensorManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,9 +30,15 @@ namespace icamera { SensorManager::SensorManager(int cameraId, SensorHwCtrl* sensorHw) : mCameraId(cameraId), mSensorHwCtrl(sensorHw), + // HDR_FEATURE_S + mModeSwitched(false), + // HDR_FEATURE_E mLastSofSequence(-1), mAnalogGainDelay(0), mDigitalGainDelay(0) { + // HDR_FEATURE_S + CLEAR(mWdrModeSetting); + // HDR_FEATURE_E if (PlatformData::getAnalogGainLag(mCameraId) > 0) { mAnalogGainDelay = @@ -57,6 +63,12 @@ void SensorManager::reset() { mAnalogGainMap.clear(); mDigitalGainMap.clear(); + // HDR_FEATURE_S + mModeSwitched = false; + CLEAR(mWdrModeSetting); + mWdrModeSetting.tuningMode = TUNING_MODE_MAX; + // HDR_FEATURE_E + mSofEventInfo.clear(); } @@ -68,6 +80,10 @@ void SensorManager::handleSofEvent(EventData eventData) { mLastSofSequence = eventData.data.sync.sequence; handleSensorExposure(); + // HDR_FEATURE_S + handleSensorModeSwitch(eventData.data.sync.sequence); + // HDR_FEATURE_E + SofEventInfo info; info.sequence = eventData.data.sync.sequence; info.timestamp = ((long)eventData.data.sync.timestamp.tv_sec) * 1000000 + @@ -90,6 +106,66 @@ uint64_t SensorManager::getSofTimestamp(int64_t sequence) { return 0; } +// HDR_FEATURE_S +int SensorManager::convertTuningModeToWdrMode(TuningMode tuningMode) { + return ((tuningMode == TUNING_MODE_VIDEO_HDR) || (tuningMode == TUNING_MODE_VIDEO_HDR2)) ? 1 : + 0; +} + +void SensorManager::handleSensorModeSwitch(int64_t sequence) { + if (!PlatformData::isEnableHDR(mCameraId) || !mModeSwitched) { + return; + } + + if (mWdrModeSetting.sequence <= sequence) { + int wdrMode = convertTuningModeToWdrMode(mWdrModeSetting.tuningMode); + LOG2("@%s, tunning mode %d, set wdrMode %d sequence %u", sequence, __func__, + mWdrModeSetting.tuningMode, wdrMode, mWdrModeSetting.sequence); + + if (mSensorHwCtrl->setWdrMode(wdrMode) == OK) { + mModeSwitched = false; + } + } +} + +int SensorManager::setWdrMode(TuningMode tuningMode, int64_t sequence) { + if (!PlatformData::isEnableHDR(mCameraId)) { + return OK; + } + + AutoMutex l(mLock); + LOG2("@%s, tuningMode %d, sequence %ld", __func__, tuningMode, sequence); + int ret = OK; + + // Set Wdr Mode after running AIQ first time. + if (mWdrModeSetting.tuningMode == TUNING_MODE_MAX) { + int wdrMode = convertTuningModeToWdrMode(tuningMode); + ret = mSensorHwCtrl->setWdrMode(wdrMode); + mWdrModeSetting.tuningMode = tuningMode; + return ret; + } + + if (mWdrModeSetting.tuningMode != tuningMode) { + // Save WDR mode and update this mode to driver in SOF event handler. + // So we know which frame is corrupted and we can skip the corrupted frames. + LOG2("@%s, tuningMode %d", sequence, __func__, tuningMode); + mWdrModeSetting.tuningMode = tuningMode; + mWdrModeSetting.sequence = sequence; + mModeSwitched = true; + } + + return ret; +} + +int SensorManager::setAWB(float r_per_g, float b_per_g) { + AutoMutex l(mLock); + LOG2("@%s, r_per_g %f, b_per_g %f", __func__, r_per_g, b_per_g); + + int ret = mSensorHwCtrl->setAWB(r_per_g, b_per_g); + return ret; +} +// HDR_FEATURE_E + void SensorManager::handleSensorExposure() { if (mExposureDataMap.find(mLastSofSequence) != mExposureDataMap.end()) { const ExposureData& exposureData = mExposureDataMap[mLastSofSequence]; @@ -119,8 +195,8 @@ int SensorManager::getCurrentExposureAppliedDelay() { uint32_t SensorManager::updateSensorExposure(SensorExpGroup sensorExposures, int64_t applyingSeq) { AutoMutex l(mLock); - int64_t effectSeq = - mLastSofSequence < 0 ? 0 : mLastSofSequence + PlatformData::getExposureLag(mCameraId); + int64_t effectSeq = mLastSofSequence < 0 ? 0 + : mLastSofSequence + PlatformData::getExposureLag(mCameraId); if (sensorExposures.empty()) { LOGW("%s: No exposure parameter", __func__); @@ -174,10 +250,19 @@ uint32_t SensorManager::updateSensorExposure(SensorExpGroup sensorExposures, int mSensorHwCtrl->setDigitalGains(digitalGains); } + if (effectSeq == 0) { + effectSeq = PlatformData::getInitialSkipFrame(mCameraId); + } + LOG2("@%s: effectSeq %ld, applyingSeq %ld", mLastSofSequence, __func__, effectSeq, applyingSeq); return ((uint32_t)effectSeq); } +// CRL_MODULE_S +int SensorManager::setFrameRate(float fps) { + return mSensorHwCtrl->setFrameRate(fps); +} +// CRL_MODULE_E int SensorManager::getSensorInfo(ia_aiq_frame_params& frameParams, ia_aiq_exposure_sensor_descriptor& sensorDescriptor) { diff --git a/src/3a/SensorManager.h b/src/3a/SensorManager.h index ea49097f..8f9d55b2 100644 --- a/src/3a/SensorManager.h +++ b/src/3a/SensorManager.h @@ -65,6 +65,14 @@ class SensorManager { int getSensorInfo(ia_aiq_frame_params& frameParams, ia_aiq_exposure_sensor_descriptor& sensorDescriptor); + // HDR_FEATURE_S + int setWdrMode(TuningMode tuningMode, int64_t sequence); + + int setAWB(float r_per_g, float b_per_g); + // HDR_FEATURE_E + // CRL_MODULE_S + int setFrameRate(float fps); + // CRL_MODULE_E int getCurrentExposureAppliedDelay(); uint64_t getSofTimestamp(int64_t sequence); @@ -72,6 +80,10 @@ class SensorManager { DISALLOW_COPY_AND_ASSIGN(SensorManager); void handleSensorExposure(); + // HDR_FEATURE_S + void handleSensorModeSwitch(int64_t sequence); + int convertTuningModeToWdrMode(TuningMode tuningMode); + // HDR_FEATURE_E int getSensorModeData(ia_aiq_exposure_sensor_descriptor& sensorData); private: @@ -81,6 +93,11 @@ class SensorManager { int mCameraId; SensorHwCtrl* mSensorHwCtrl; + // HDR_FEATURE_S + bool mModeSwitched; // Whether the TuningMode get updated + WdrModeSetting mWdrModeSetting; + // HDR_FEATURE_E + int64_t mLastSofSequence; // Guard for SensorManager public API. diff --git a/src/3a/intel3a/Intel3AParameter.cpp b/src/3a/intel3a/Intel3AParameter.cpp index 6f967141..4803d156 100644 --- a/src/3a/intel3a/Intel3AParameter.cpp +++ b/src/3a/intel3a/Intel3AParameter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -192,6 +192,14 @@ float Intel3AParameter::convertdBGainToISO(float sensitivityGain, int baseIso) { } void Intel3AParameter::setAeManualLimits(const aiq_parameter_t& param) { + // HDR_FEATURE_S + if (PlatformData::getSensorAeEnable(mCameraId)) { + LOG2("@%s, fix 2 auto exposure time to 11ms", __func__); + mAeParams.manual_exposure_time_us[0] = 11000; + mAeParams.manual_exposure_time_us[1] = 11000; + return; + } + // HDR_FEATURE_E ia_aiq_ae_manual_limits* limit = &mAeParams.manual_limits[0]; @@ -239,7 +247,10 @@ void Intel3AParameter::setAeManualLimits(const aiq_parameter_t& param) { if (gainRange.min >= 0 && gainRange.max >= gainRange.min) { float isoMin = convertdBGainToISO(gainRange.min, mCMC.base_iso); float isoMax = convertdBGainToISO(gainRange.max, mCMC.base_iso); - if (isoMin <= INT_MAX && isoMax <= INT_MAX) { + // Cast these to doubles for this comparison, as float(INT_MAX) produces + // the value 2147483648, which is INT_MAX+1. Clang warns about this. + if (static_cast(isoMin) <= INT_MAX && + static_cast(isoMax) <= INT_MAX) { limit->manual_iso_min = static_cast(isoMin); limit->manual_iso_max = static_cast(isoMax); } @@ -286,6 +297,16 @@ void Intel3AParameter::setManualIso(const aiq_parameter_t& param) { return; } + SensitivityRange range; + if (PlatformData::getSensitivityRangeByTuningMode(mCameraId, param.tuningMode, range) == OK) { + float ratio = + (manualIso - mSensitivityRange.min) / (mSensitivityRange.max - mSensitivityRange.min); + manualIso = range.min + ratio * (range.max - range.min); + manualIso = CLIP(manualIso, range.max, range.min); + + LOG2("%s, param.manualIso %d, manualIso %d", __func__, param.manualIso, manualIso); + } + // Will overwrite manual_analog_gain for (unsigned int i = 0; i < mAeParams.num_exposures; i++) { mAeParams.manual_iso[i] = manualIso; @@ -296,7 +317,7 @@ void Intel3AParameter::updateAeParameter(const aiq_parameter_t& param) { mAeMode = param.aeMode; mAeParams.frame_use = AiqUtils::convertFrameUsageToIaFrameUsage(param.frameUsage); mAeParams.num_exposures = PlatformData::getExposureNum( - mCameraId, CameraUtils::isMultiExposureCase(mCameraId, param.tuningMode)); + mCameraId, PlatformData::isMultiExposureCase(mCameraId, param.tuningMode)); setAeManualLimits(param); @@ -349,6 +370,12 @@ void Intel3AParameter::updateAeParameter(const aiq_parameter_t& param) { mAePerTicks = 1; mAeParams.manual_convergence_time = AiqUtils::convertSpeedModeToTime(param.aeConvergeSpeed); + // HDR_FEATURE_S + if (PlatformData::isMultiExposureCase(mCameraId, param.tuningMode)) { + mAeParams.manual_convergence_time = + AiqUtils::convertSpeedModeToTimeForHDR(param.aeConvergeSpeed); + } + // HDR_FEATURE_E } else { mAeParams.manual_convergence_time = -1; @@ -409,25 +436,37 @@ void Intel3AParameter::updateAeParameter(const aiq_parameter_t& param) { } } -void Intel3AParameter::updatePaResult(cca::cca_pa_params* paResult) { +void Intel3AParameter::updatePaResult(cca::cca_pa_params* paResult, bool awbLocked, + const camera_color_gains_t& colorGains, + const camera_color_transform_t& colorMatrix) { CheckAndLogError((paResult == nullptr), VOID_VALUE, "No Pa result provided."); paResult->enable_manual_settings = false; - if (!mUseManualColorMatrix) return; + if (mUseManualColorMatrix) { + if (VALID_COLOR_GAINS(mColorGains.color_gains_rggb)) { + paResult->color_gains.r = mColorGains.color_gains_rggb[0]; + paResult->color_gains.gr = mColorGains.color_gains_rggb[1]; + paResult->color_gains.gb = mColorGains.color_gains_rggb[2]; + paResult->color_gains.b = mColorGains.color_gains_rggb[3]; + } - if (VALID_COLOR_GAINS(mColorGains.color_gains_rggb)) { - paResult->color_gains.r = mColorGains.color_gains_rggb[0]; - paResult->color_gains.gr = mColorGains.color_gains_rggb[1]; - paResult->color_gains.gb = mColorGains.color_gains_rggb[2]; - paResult->color_gains.b = mColorGains.color_gains_rggb[3]; - } + // Override color_conversion_matrix and color_gains + // when application requires manual color transform. + MEMCPY_S(&paResult->color_conversion_matrix, sizeof(paResult->color_conversion_matrix), + &mColorMatrix.color_transform, sizeof(mColorMatrix.color_transform)); + + paResult->enable_manual_settings = true; + } else if (awbLocked) { + paResult->color_gains.r = colorGains.color_gains_rggb[0]; + paResult->color_gains.gr = colorGains.color_gains_rggb[1]; + paResult->color_gains.gb = colorGains.color_gains_rggb[2]; + paResult->color_gains.b = colorGains.color_gains_rggb[3]; - // Override color_conversion_matrix and color_gains - // when application requires manual color transform. - MEMCPY_S(&paResult->color_conversion_matrix, sizeof(paResult->color_conversion_matrix), - &mColorMatrix.color_transform, sizeof(mColorMatrix.color_transform)); + MEMCPY_S(&paResult->color_conversion_matrix, sizeof(paResult->color_conversion_matrix), + &colorMatrix.color_transform, sizeof(colorMatrix.color_transform)); - paResult->enable_manual_settings = true; + paResult->enable_manual_settings = true; + } } /** @@ -606,11 +645,14 @@ void Intel3AParameter::updateAfParameter(const aiq_parameter_t& param) { // Current only one AF metering window is supported, so use the latest one camera_window_t window = param.afRegions.back(); if (window.right > window.left && window.bottom > window.top) { - camera_coordinate_system_t frameCoord = {0, 0, param.resolution.width, - param.resolution.height}; - window = AiqUtils::convertToIaWindow(frameCoord, window); - mAfParams.focus_metering_mode = ia_aiq_af_metering_mode_touch; - mAfParams.focus_rect = {window.left, window.top, window.right, window.bottom}; + if ((window.right - window.left) != param.resolution.width && + (window.bottom - window.top) != param.resolution.height) { + camera_coordinate_system_t frameCoord = {0, 0, param.resolution.width, + param.resolution.height}; + window = AiqUtils::convertToIaWindow(frameCoord, window); + mAfParams.focus_metering_mode = ia_aiq_af_metering_mode_touch; + mAfParams.focus_rect = {window.left, window.top, window.right, window.bottom}; + } } } diff --git a/src/3a/intel3a/Intel3AParameter.h b/src/3a/intel3a/Intel3AParameter.h index 08523f5d..859e2b2c 100644 --- a/src/3a/intel3a/Intel3AParameter.h +++ b/src/3a/intel3a/Intel3AParameter.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,7 +38,9 @@ class Intel3AParameter { int updateParameter(aiq_parameter_t param); void updateAeResult(cca::cca_ae_results* aeResult); void updateAwbResult(cca::cca_awb_results* awbResult); - void updatePaResult(cca::cca_pa_params* paResult); + void updatePaResult(cca::cca_pa_params* paResult, bool awbLocked, + const camera_color_gains_t& colorGains, + const camera_color_transform_t& colorMatrix); void fillAfTriggerResult(cca::cca_af_results* afResults); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index decaa046..7545192f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -18,6 +18,7 @@ add_subdirectory(3a) add_subdirectory(core) add_subdirectory(hal) add_subdirectory(iutils) +add_subdirectory(scheduler) add_subdirectory(metadata) add_subdirectory(platformdata) add_subdirectory(v4l2) diff --git a/src/core/BufferQueue.cpp b/src/core/BufferQueue.cpp index 0951ded1..5d514df3 100644 --- a/src/core/BufferQueue.cpp +++ b/src/core/BufferQueue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2022 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -151,6 +151,24 @@ void BufferQueue::getFrameInfo(std::map& inputInfo, outputInfo = mOutputFrameInfo; } +bool BufferQueue::waitBufferQueue(ConditionLock& lock, std::map& queue, + int64_t timeout) { + LOG2("@%s waiting buffers", __func__); + for (auto& bufQ : queue) { + if (bufQ.second.empty() && timeout > 0) { + // Thread was stopped during wait + if (!mThreadRunning) { + LOG1("@%s: inactive while waiting for buffers", __func__); + return false; + } + mFrameAvailableSignal.waitRelative(lock, timeout * SLOWLY_MULTIPLIER); + } + if (bufQ.second.empty()) return false; + } + + return true; +} + int BufferQueue::waitFreeBuffersInQueue(ConditionLock& lock, std::map >& cInBuffer, std::map >& cOutBuffer, diff --git a/src/core/BufferQueue.h b/src/core/BufferQueue.h index 4d499138..0a3829fa 100644 --- a/src/core/BufferQueue.h +++ b/src/core/BufferQueue.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2022 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -128,6 +128,11 @@ class BufferQueue : public BufferConsumer, public BufferProducer, public EventLi return OK; } + /** + * \brief Set stoping status + */ + virtual void stopProcessing() {} + /** * \brief Common Interface */ @@ -144,6 +149,12 @@ class BufferQueue : public BufferConsumer, public BufferProducer, public EventLi * \brief Clear and initialize input and output buffer queues. */ void clearBufferQueues(); + /** + * \brief Wait and check if queue is not empty until time out. + * + * No waiting if timeout value is zero + */ + bool waitBufferQueue(ConditionLock& lock, std::map& queue, int64_t timeout); /** * \brief Wait for available input and output buffers. * diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index b15048bf..13584ace 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2017-2019 Intel Corporation +# Copyright (C) 2017-2023 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,11 +39,34 @@ set(CORE_SRCS ) # FRAME_SYNC_E +# CSI_META_S + set(CORE_SRCS + ${CORE_SRCS} + ${CORE_DIR}/CsiMetaDevice.cpp + CACHE INTERNAL "core sources" + ) +# CSI_META_E + +# FILE_SOURCE_S + set(CORE_SRCS + ${CORE_SRCS} + ${CORE_DIR}/FileSource.cpp + CACHE INTERNAL "core sources" + ) +# FILE_SOURCE_E + set(CORE_SRCS ${CORE_SRCS} ${CORE_DIR}/psysprocessor/PolicyManager.cpp CACHE INTERNAL "core sources" ) +# PRIVACY_MODE_S + set(CORE_SRCS + ${CORE_SRCS} + ${CORE_DIR}/CvfPrivacyChecker.cpp + CACHE INTERNAL "core sources" + ) +# PRIVACY_MODE_E # IPU_PROCESSING_S set(CORE_SRCS diff --git a/src/core/CameraBuffer.cpp b/src/core/CameraBuffer.cpp index ec9f1b15..ef446628 100644 --- a/src/core/CameraBuffer.cpp +++ b/src/core/CameraBuffer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,11 @@ #include "CameraBuffer.h" +#ifdef LIBDRM_SUPPORT_MMAP_OFFSET +#include +#include +#endif + #include #include #include @@ -32,13 +37,12 @@ namespace icamera { CameraBuffer::CameraBuffer(int cameraId, int usage, int memory, uint32_t size, int index, - int format) + int format, v4l2_buf_type v4l2BufType) : mNumPlanes(1), mAllocatedMemory(false), mU(nullptr), mBufferUsage(usage), mSettingSequence(-1) { - v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; int num_plane = 1; LOG2("%s: construct buffer with usage:%d, memory:%d, size:%d, format:%d, index:%d", @@ -50,35 +54,18 @@ CameraBuffer::CameraBuffer(int cameraId, int usage, int memory, uint32_t size, i mU->flags = BUFFER_FLAG_INTERNAL; mU->sequence = -1; - switch (usage) { - case BUFFER_USAGE_PSYS_INPUT: - // follow through - case BUFFER_USAGE_PSYS_INTERNAL: - case BUFFER_USAGE_GENERAL: - if (PlatformData::isIsysEnabled(cameraId) && - PlatformData::isCSIFrontEndCapture(cameraId)) { - type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; - num_plane = CameraUtils::getNumOfPlanes(format); - } else { - type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; - } - break; - case BUFFER_USAGE_PSYS_STATS: - type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; - break; - case BUFFER_USAGE_MIPI_CAPTURE: - case BUFFER_USAGE_METADATA: - type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; - num_plane = CameraUtils::getNumOfPlanes(format); - break; - default: - LOGE("Not supported Usage"); - } - CLEAR(mMmapAddrs); CLEAR(mDmaFd); - initBuffer(memory, type, size, index, num_plane); + if ((usage == BUFFER_USAGE_PSYS_INPUT || usage == BUFFER_USAGE_PSYS_INTERNAL || + usage == BUFFER_USAGE_GENERAL) && + (PlatformData::isIsysEnabled(cameraId) && PlatformData::isCSIFrontEndCapture(cameraId))) { + num_plane = CameraUtils::getNumOfPlanes(format); + } else if (usage == BUFFER_USAGE_MIPI_CAPTURE || usage == BUFFER_USAGE_METADATA) { + num_plane = CameraUtils::getNumOfPlanes(format); + } + + initBuffer(memory, v4l2BufType, size, index, num_plane); } CameraBuffer::~CameraBuffer() { @@ -99,7 +86,6 @@ void CameraBuffer::initBuffer(int memType, v4l2_buf_type bufType, uint32_t size, if (!V4L2_TYPE_IS_MULTIPLANAR(bufType)) { mV.SetOffset(0, 0); mV.SetLength(size, 0); - LOGE("SINGLE PLANE!"); } else { mV.SetLength(num_plane, 0); mNumPlanes = num_plane; @@ -159,6 +145,8 @@ void CameraBuffer::setUserBufferInfo(camera_buffer_t* ubuffer) { break; case V4L2_MEMORY_DMABUF: setFd(ubuffer->dmafd, 0); + // set usr pointer in case it has been mapped + setAddr(ubuffer->addr, 0); break; case V4L2_MEMORY_MMAP: /* do nothing */ @@ -272,6 +260,7 @@ void* CameraBuffer::getAddr(int plane) { switch (mV.Memory()) { case V4L2_MEMORY_MMAP: + case V4L2_MEMORY_DMABUF: return mMmapAddrs[plane]; case V4L2_MEMORY_USERPTR: return reinterpret_cast(mV.Userptr(plane)); @@ -286,6 +275,7 @@ void CameraBuffer::setAddr(void* addr, int plane) { switch (mV.Memory()) { case V4L2_MEMORY_MMAP: + case V4L2_MEMORY_DMABUF: mMmapAddrs[plane] = addr; return; case V4L2_MEMORY_USERPTR: @@ -313,15 +303,68 @@ void CameraBuffer::freeMmap() { } } +#ifdef LIBDRM_SUPPORT_MMAP_OFFSET +CameraBuffer::DeviceRender::DeviceRender() : m_handle(-1) { + m_handle = open("/dev/dri/renderD128", O_RDWR); +} + +CameraBuffer::DeviceRender::DeviceRender(const char* path_file) : m_handle(-1) { + m_handle = open(path_file, O_RDWR); +} + +CameraBuffer::DeviceRender::~DeviceRender() { + close(m_handle); +} + +CameraBuffer::DeviceRender CameraBuffer::mDeviceRender("/dev/dri/renderD128"); + +void* CameraBuffer::DeviceRender::mapDmaBufferAddr(int fd, unsigned int bufferSize) { + if (m_handle == -1) { + LOGE("open device /dev/dri/renderD128 failed!\n"); + return MAP_FAILED; + } + + int ret = 0; + struct drm_prime_handle prime_handle; + memset(&prime_handle, 0, sizeof(prime_handle)); + prime_handle.fd = fd; + ret = drmIoctl(m_handle, DRM_IOCTL_PRIME_FD_TO_HANDLE, &prime_handle); + if (ret != 0) { + LOGE("DRM_IOCTL_PRIME_FD_TO_HANDLE failed (fd=%u)\n", prime_handle.fd); + return MAP_FAILED; + } + + struct drm_i915_gem_mmap_offset gem_map = {0}; + gem_map.handle = prime_handle.handle; + gem_map.flags = I915_MMAP_OFFSET_WB; + /* Get the fake offset back */ + ret = drmIoctl(m_handle, DRM_IOCTL_I915_GEM_MMAP_OFFSET, &gem_map); + void* addr = MAP_FAILED; + if (ret != 0) + LOGE("DRM_IOCTL_I915_GEM_MMAP_OFFSET failed!"); + else + addr = ::mmap(nullptr, bufferSize, PROT_READ | PROT_WRITE, MAP_SHARED, m_handle, + gem_map.offset); + + return addr; +} +#endif + void* CameraBuffer::mapDmaBufferAddr(int fd, unsigned int bufferSize) { CheckAndLogError(fd < 0 || !bufferSize, nullptr, "%s, fd:0x%x, bufferSize:%u", __func__, fd, bufferSize); + +#ifdef LIBDRM_SUPPORT_MMAP_OFFSET + return mDeviceRender.mapDmaBufferAddr(fd, bufferSize); +#else return ::mmap(nullptr, bufferSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +#endif } void CameraBuffer::unmapDmaBufferAddr(void* addr, unsigned int bufferSize) { CheckAndLogError(addr == nullptr || !bufferSize, VOID_VALUE, "%s, addr:%p, bufferSize:%u", __func__, addr, bufferSize); + munmap(addr, bufferSize); } @@ -381,4 +424,27 @@ int CameraBuffer::getFd(int plane) { return mV.Fd(plane); } +ScopeMapping::ScopeMapping(const std::shared_ptr& cameraBuf) + : mCameraBuf(cameraBuf), + mUserPtr(nullptr) { +} + +ScopeMapping::~ScopeMapping() { + if (mUserPtr && (mCameraBuf->getMemory() == V4L2_MEMORY_DMABUF)) { + CameraBuffer::unmapDmaBufferAddr(mUserPtr, mCameraBuf->getBufferSize()); + } +} + +void* ScopeMapping::getUserPtr() { + if (mCameraBuf->getBufferAddr() || mCameraBuf->getMemory() != V4L2_MEMORY_DMABUF) { + return mCameraBuf->getBufferAddr(); + } + + if (!mUserPtr) { + mUserPtr = CameraBuffer::mapDmaBufferAddr(mCameraBuf->getFd(), mCameraBuf->getBufferSize()); + } + + return mUserPtr; +} + } // namespace icamera diff --git a/src/core/CameraBuffer.h b/src/core/CameraBuffer.h index 29d741c0..e5fc4443 100644 --- a/src/core/CameraBuffer.h +++ b/src/core/CameraBuffer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,7 +54,8 @@ class CameraBuffer { int srcWidth = -1, int srcHeight = -1); public: - CameraBuffer(int cameraId, int usage, int memory, uint32_t size, int index, int format = -1); + CameraBuffer(int cameraId, int usage, int memory, uint32_t size, int index, int format = -1, + v4l2_buf_type v4l2BufType = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); virtual ~CameraBuffer(); public: @@ -172,9 +173,36 @@ class CameraBuffer { void* mMmapAddrs[VIDEO_MAX_PLANES]; int mDmaFd[VIDEO_MAX_PLANES]; + +#ifdef LIBDRM_SUPPORT_MMAP_OFFSET + class DeviceRender { + public: + DeviceRender(); + explicit DeviceRender(const char* path_file); + ~DeviceRender(); + void* mapDmaBufferAddr(int fd, unsigned int bufferSize); + + private: + int m_handle; + }; + + static DeviceRender mDeviceRender; +#endif }; typedef std::vector > CameraBufVector; typedef std::queue > CameraBufQ; +class ScopeMapping { + public: + explicit ScopeMapping(const std::shared_ptr& cameraBuf); + ~ScopeMapping(); + + void* getUserPtr(); + + private: + std::shared_ptr mCameraBuf; + void* mUserPtr; +}; + } // namespace icamera diff --git a/src/core/CameraDevice.cpp b/src/core/CameraDevice.cpp index d78d21a3..ebda1371 100644 --- a/src/core/CameraDevice.cpp +++ b/src/core/CameraDevice.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,9 @@ #include "ICamera.h" #include "PlatformData.h" #include "V4l2DeviceFactory.h" +// FILE_SOURCE_S +#include "FileSource.h" +// FILE_SOURCE_E #include "CaptureUnit.h" using std::vector; @@ -50,6 +53,10 @@ CameraDevice::CameraDevice(int cameraId) CLEAR(mInputConfig); mInputConfig.format = -1; + // CSI_META_S + mCsiMetaDevice = new CsiMetaDevice(mCameraId); + // CSI_META_E + mProducer = createBufferProducer(); mSofSource = new SofSource(mCameraId); @@ -72,9 +79,11 @@ CameraDevice::CameraDevice(int cameraId) } else { mGCM = nullptr; } - if (PlatformData::getSupportPrivacy(mCameraId)) { + // PRIVACY_MODE_S + if (PlatformData::getSupportPrivacy(mCameraId) != NO_PRIVACY_MODE) { mCvfPrivacyChecker = new CvfPrivacyChecker(mCameraId, mStreams); } + // PRIVACY_MODE_E } CameraDevice::~CameraDevice() { @@ -82,9 +91,11 @@ CameraDevice::~CameraDevice() { LOG1("@%s", mCameraId, __func__); AutoMutex m(mDeviceLock); - if (PlatformData::getSupportPrivacy(mCameraId)) { + // PRIVACY_MODE_S + if (PlatformData::getSupportPrivacy(mCameraId) != NO_PRIVACY_MODE) { delete mCvfPrivacyChecker; } + // PRIVACY_MODE_E // Clear the media control when close the device. MediaControl* mc = MediaControl::getInstance(); MediaCtlConf* mediaCtl = PlatformData::getMediaCtlConf(mCameraId); @@ -104,6 +115,9 @@ CameraDevice::~CameraDevice() { delete mParamGenerator; delete mSofSource; delete mProducer; + // CSI_META_S + delete mCsiMetaDevice; + // CSI_META_E delete mRequestThread; V4l2DeviceFactory::releaseDeviceFactory(mCameraId); @@ -118,6 +132,11 @@ int CameraDevice::init() { int ret = mProducer->init(); CheckAndLogError(ret < 0, ret, "%s: Init capture unit failed", __func__); + // CSI_META_S + ret = mCsiMetaDevice->init(); + CheckAndLogError(ret != OK, ret, "@%s: init csi meta device failed", __func__); + // CSI_META_E + ret = mSofSource->init(); CheckAndLogError(ret != OK, ret, "@%s: init sync manager failed", __func__); @@ -126,14 +145,15 @@ int CameraDevice::init() { ret = m3AControl->init(); CheckAndLogError((ret != OK), ret, "%s: Init 3A Unit falied", __func__); - ret = mLensCtrl->init(); - CheckAndLogError((ret != OK), ret, "%s: Init Lens falied", __func__); - - if (PlatformData::getSupportPrivacy(mCameraId)) { - ret = mCvfPrivacyChecker->init(); - CheckAndLogError((ret != OK), ret, "%s: Init privacy checker falied", __func__); - mCvfPrivacyChecker->run("CvfPrivacyChecker", PRIORITY_NORMAL); + // PRIVACY_MODE_S + if (PlatformData::getSupportPrivacy(mCameraId) == CVF_BASED_PRIVACY_MODE) { + if (OK == mCvfPrivacyChecker->init()) { + mCvfPrivacyChecker->run("CvfPrivacyChecker", PRIORITY_NORMAL); + } else { + LOGW("%s: Init privacy checker not initialized", __func__); + } } + // PRIVACY_MODE_E mRequestThread->run("RequestThread", PRIORITY_NORMAL); @@ -159,10 +179,12 @@ void CameraDevice::deinit() { stopLocked(); } - if (PlatformData::getSupportPrivacy(mCameraId)) { + // PRIVACY_MODE_S + if (PlatformData::getSupportPrivacy(mCameraId) == CVF_BASED_PRIVACY_MODE) { mCvfPrivacyChecker->requestExit(); mCvfPrivacyChecker->join(); } + // PRIVACY_MODE_E // stop request thread mRequestThread->requestExit(); mRequestThread->join(); @@ -175,6 +197,10 @@ void CameraDevice::deinit() { mSofSource->deinit(); + // CSI_META_S + mCsiMetaDevice->deinit(); + // CSI_META_E + mProducer->deinit(); mState = DEVICE_UNINIT; @@ -182,9 +208,21 @@ void CameraDevice::deinit() { void CameraDevice::callbackRegister(const camera_callback_ops_t* callback) { mCallback = const_cast(callback); + mParamGenerator->callbackRegister(mCallback); } StreamSource* CameraDevice::createBufferProducer() { + // FILE_SOURCE_S + if (PlatformData::isFileSourceEnabled()) { + return new FileSource(mCameraId); + } + // FILE_SOURCE_E + + // DUMMY_SOURCE_S + if (!PlatformData::isIsysEnabled(mCameraId)) { + return new DummySource; + } + // DUMMY_SOURCE_E return new CaptureUnit(mCameraId); } @@ -206,11 +244,32 @@ void CameraDevice::bindListeners() { vector sofListenerList = m3AControl->getSofEventListener(); for (auto sofListener : sofListenerList) { mSofSource->registerListener(EVENT_ISYS_SOF, sofListener); + // FILE_SOURCE_S + if (PlatformData::isFileSourceEnabled()) { + // File source needs to produce SOF event as well when it's enabled. + mProducer->registerListener(EVENT_ISYS_SOF, sofListener); + } + // FILE_SOURCE_E } - if (PlatformData::psysAlignWithSof(mCameraId)) { + // CSI_META_S + // Listen to meta data when enabled + if (mCsiMetaDevice->isEnabled()) { + for (auto& item : mProcessors) { + mCsiMetaDevice->registerListener(EVENT_META, item); + } + } + // CSI_META_E + + if (PlatformData::psysAlignWithSof(mCameraId) || PlatformData::isSchedulerEnabled(mCameraId)) { for (auto& item : mProcessors) { mSofSource->registerListener(EVENT_ISYS_SOF, item); + // FILE_SOURCE_S + if (PlatformData::isFileSourceEnabled()) { + // File source needs to produce SOF event as well when it's enabled. + mProducer->registerListener(EVENT_ISYS_SOF, item); + } + // FILE_SOURCE_E } } @@ -227,12 +286,31 @@ void CameraDevice::bindListeners() { } mSofSource->registerListener(EVENT_ISYS_SOF, mRequestThread); + // FILE_SOURCE_S + if (PlatformData::isFileSourceEnabled()) { + // File source needs to produce SOF event as well when it's enabled. + mProducer->registerListener(EVENT_ISYS_SOF, mRequestThread); + } + // FILE_SOURCE_E // INTEL_DVS_S auto dvsListener = m3AControl->getDVSEventListener(); for (auto lis : dvsListener) for (auto& item : mProcessors) item->registerListener(EVENT_DVS_READY, lis); // INTEL_DVS_E + + // PRIVACY_MODE_S + if (PlatformData::getSupportPrivacy(mCameraId) == AE_BASED_PRIVACY_MODE) { + EventSource* readySource = m3AControl->get3AReadyEventSource(); + CheckWarningNoReturn(!readySource, "No 3A_READY event source"); + if (readySource) { + readySource->registerListener(EVENT_3A_READY, mCvfPrivacyChecker); + } + for (int i = 0; i < mStreamNum; i++) { + mStreams[i]->registerListener(EVENT_FRAME_AVAILABLE, mCvfPrivacyChecker); + } + } + // PRIVACY_MODE_E } void CameraDevice::unbindListeners() { @@ -250,11 +328,29 @@ void CameraDevice::unbindListeners() { vector sofListenerList = m3AControl->getSofEventListener(); for (auto sofListener : sofListenerList) { mSofSource->removeListener(EVENT_ISYS_SOF, sofListener); + // FILE_SOURCE_S + if (PlatformData::isFileSourceEnabled()) { + mProducer->removeListener(EVENT_ISYS_SOF, sofListener); + } + // FILE_SOURCE_E } - if (PlatformData::psysAlignWithSof(mCameraId)) { + // CSI_META_S + if (mCsiMetaDevice->isEnabled()) { + for (auto& item : mProcessors) { + mCsiMetaDevice->removeListener(EVENT_META, item); + } + } + // CSI_META_E + + if (PlatformData::psysAlignWithSof(mCameraId) || PlatformData::isSchedulerEnabled(mCameraId)) { for (auto& item : mProcessors) { mSofSource->removeListener(EVENT_ISYS_SOF, item); + // FILE_SOURCE_S + if (PlatformData::isFileSourceEnabled()) { + mProducer->removeListener(EVENT_ISYS_SOF, item); + } + // FILE_SOURCE_E } } @@ -271,12 +367,31 @@ void CameraDevice::unbindListeners() { } mSofSource->removeListener(EVENT_ISYS_SOF, mRequestThread); + // FILE_SOURCE_S + if (PlatformData::isFileSourceEnabled()) { + // File source needs to produce SOF event as well when it's enabled. + mProducer->removeListener(EVENT_ISYS_SOF, mRequestThread); + } + // FILE_SOURCE_E // INTEL_DVS_S auto dvsListener = m3AControl->getDVSEventListener(); for (auto lis : dvsListener) for (auto& item : mProcessors) item->removeListener(EVENT_DVS_READY, lis); // INTEL_DVS_E + + // PRIVACY_MODE_S + if (PlatformData::getSupportPrivacy(mCameraId) == AE_BASED_PRIVACY_MODE) { + EventSource* readySource = m3AControl->get3AReadyEventSource(); + CheckWarningNoReturn(!readySource, "No 3A_READY event source"); + if (readySource) { + readySource->removeListener(EVENT_3A_READY, mCvfPrivacyChecker); + } + for (int i = 0; i < mStreamNum; i++) { + mStreams[i]->removeListener(EVENT_FRAME_AVAILABLE, mCvfPrivacyChecker); + } + } + // PRIVACY_MODE_E } int CameraDevice::configureInput(const stream_t* inputConfig) { @@ -337,9 +452,23 @@ int CameraDevice::configure(stream_config_t* streamList) { vector configModes; PlatformData::getConfigModesByOperationMode(mCameraId, streamList->operation_mode, configModes); + for (auto cfg : configModes) { + PlatformData::reorderSupportedTuningConfig(mCameraId, cfg); + } + ret = mProducer->configure(producerConfigs, configModes); CheckAndLogError(ret < 0, BAD_VALUE, "@%s Device Configure failed", __func__); + // CSI_META_S + ret = mCsiMetaDevice->configure(); + CheckAndLogError(ret != OK, ret, "@%s failed to configure CSI meta device", __func__); + // CSI_META_E + + // CRL_MODULE_S + ret = mSensorCtrl->configure(); + CheckAndLogError(ret != OK, ret, "@%s failed to configure sensor HW", __func__); + // CRL_MODULE_E + ret = mSofSource->configure(); CheckAndLogError(ret != OK, ret, "@%s failed to configure SOF source device", __func__); @@ -451,6 +580,13 @@ std::map CameraDevice::selectProducerConfig(const stream_config_ mainConfig.width = producerRes.width; mainConfig.height = CameraUtils::getInterlaceHeight(mainConfig.field, producerRes.height); + // DOL_FEATURE_S + // In DOL case isys scale must be disabled, and 2 ports have same + if (PlatformData::isDolShortEnabled(mCameraId)) producerConfigs[SECOND_PORT] = mainConfig; + + if (PlatformData::isDolMediumEnabled(mCameraId)) producerConfigs[THIRD_PORT] = mainConfig; + // DOL_FEATURE_E + // configuration with main port producerConfigs[MAIN_PORT] = mainConfig; @@ -587,6 +723,12 @@ int CameraDevice::analyzeStream(stream_config_t* streamList) { } bool checkInput = !PlatformData::isIsysEnabled(mCameraId); + // FILE_SOURCE_S + if (PlatformData::isFileSourceEnabled()) { + // In file source case, PSYS can work without ISYS, so don't check raw input. + checkInput = false; + } + // FILE_SOURCE_E if (checkInput) { CheckAndLogError(inputStreamId < 0, BAD_VALUE, "Input stream was missing"); } @@ -663,6 +805,7 @@ int CameraDevice::stop() { mRequestThread->clearRequests(); m3AControl->stop(); + mLensCtrl->stop(); if (mState == DEVICE_START) stopLocked(); @@ -696,6 +839,13 @@ int CameraDevice::dqbuf(int streamId, camera_buffer_t** ubuffer, Parameters* set LOG2("@%s, stream id:%d", mCameraId, __func__, streamId); int ret = mRequestThread->waitFrame(streamId, ubuffer); + + if ((ret == TIMED_OUT) && (PlatformData::getReqWaitTimeout(mCameraId) > 0)) { + LOG1("@%s, reqWaitTimeoutNs (%lld).", mCameraId, __func__, + PlatformData::getReqWaitTimeout(mCameraId)); + return ret; + } + while (ret == TIMED_OUT) ret = mRequestThread->waitFrame(streamId, ubuffer); if (ret == NO_INIT) return ret; @@ -783,7 +933,10 @@ int CameraDevice::qbuf(camera_buffer_t** ubuffer, int bufferNum, const Parameter AutoMutex m(mDeviceLock); if (mState == DEVICE_CONFIGURE || mState == DEVICE_STOP) { // Start 3A here then the HAL can run 3A for request - int ret = m3AControl->start(); + int ret = mLensCtrl->start(); + CheckAndLogError((ret != OK), ret, "%s: Start Lens falied", __func__); + + ret = m3AControl->start(); CheckAndLogError((ret != OK), BAD_VALUE, "Start 3a unit failed with ret:%d.", ret); mState = DEVICE_BUFFER_READY; @@ -891,6 +1044,11 @@ int CameraDevice::startLocked() { ret = mProducer->start(); CheckAndLogError((ret < 0), BAD_VALUE, "Start capture unit failed with ret:%d.", ret); + // CSI_META_S + ret = mCsiMetaDevice->start(); + CheckAndLogError((ret != OK), BAD_VALUE, "Start CSI meta failed with ret:%d.", ret); + // CSI_META_E + ret = mSofSource->start(); CheckAndLogError((ret != OK), BAD_VALUE, "Start SOF event source failed with ret:%d.", ret); @@ -902,8 +1060,16 @@ int CameraDevice::stopLocked() { PERF_CAMERA_ATRACE(); LOG2("%s", mCameraId, __func__); + for (auto& item : mProcessors) { + item->stopProcessing(); + } + mSofSource->stop(); + // CSI_META_S + mCsiMetaDevice->stop(); + // CSI_META_E + // Stop the CaptureUnit for streamon mProducer->stop(); @@ -923,17 +1089,12 @@ void CameraDevice::handleEvent(EventData eventData) { switch (eventData.type) { case EVENT_PROCESS_REQUEST: { const EventRequestData& request = eventData.data.request; - if (request.param) { - // Set test pattern mode - camera_test_pattern_mode_t testPatternMode = TEST_PATTERN_OFF; - if (PlatformData::isTestPatternSupported(mCameraId) && - request.param->getTestPatternMode(testPatternMode) == OK) { - int32_t sensorTestPattern = - PlatformData::getSensorTestPattern(mCameraId, testPatternMode); - if (sensorTestPattern >= 0) { - if (mSensorCtrl->setTestPatternMode(sensorTestPattern) < 0) { - LOGE("%s, set testPatternMode failed", __func__); - } + if (PlatformData::isTestPatternSupported(mCameraId)) { + int32_t sensorTestPattern = + PlatformData::getSensorTestPattern(mCameraId, request.testPatternMode); + if (sensorTestPattern >= 0) { + if (mSensorCtrl->setTestPatternMode(sensorTestPattern) < 0) { + LOGE("%s, set testPatternMode failed", __func__); } } } @@ -966,6 +1127,7 @@ void CameraDevice::handleEvent(EventData eventData) { } break; } + case EVENT_ISYS_ERROR: { if (mCallback) { camera_msg_data_t data = {CAMERA_DEVICE_ERROR, {}}; diff --git a/src/core/CameraDevice.h b/src/core/CameraDevice.h index 09c1172c..83565c9a 100644 --- a/src/core/CameraDevice.h +++ b/src/core/CameraDevice.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2022 Intel Corporation. + * Copyright (C) 2016-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,12 @@ #include "SensorHwCtrl.h" #include "SofSource.h" #include "StreamSource.h" +// CSI_META_S +#include "CsiMetaDevice.h" +// CSI_META_E +// PRIVACY_MODE_S #include "CvfPrivacyChecker.h" +// PRIVACY_MODE_E #include "ProcessorManager.h" #include "gc/IGraphConfigManager.h" @@ -75,6 +80,9 @@ class CameraDevice : public EventListener { * \brief Camera device class init * * 1.Related classes init: StreamSource, SofSource, 3AControl, lensCtrl + // CSI_META_S + * CsiMeta + // CSI_META_E * 2.Register listener if enable AIQ * 3.Set the defualt parameters * @@ -245,6 +253,9 @@ class CameraDevice : public EventListener { SensorHwCtrl* mSensorCtrl; SofSource* mSofSource; AiqUnitBase* m3AControl; + // CSI_META_S + CsiMetaDevice* mCsiMetaDevice; + // CSI_META_E // Internal used variable int mCameraId; @@ -258,7 +269,9 @@ class CameraDevice : public EventListener { camera_callback_ops_t* mCallback; private: + // PRIVACY_MODE_S CvfPrivacyChecker* mCvfPrivacyChecker; + // PRIVACY_MODE_E DISALLOW_COPY_AND_ASSIGN(CameraDevice); }; diff --git a/src/core/CameraEventType.h b/src/core/CameraEventType.h index 2ea1715e..def348d6 100644 --- a/src/core/CameraEventType.h +++ b/src/core/CameraEventType.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,9 @@ enum EventType { EVENT_PSYS_STATS_SIS_BUF_READY, EVENT_ISYS_FRAME, EVENT_PSYS_FRAME, + // CSI_META_S + EVENT_META, + // CSI_META_E EVENT_PROCESS_REQUEST, EVENT_FRAME_AVAILABLE, EVENT_PSYS_REQUEST_BUF_READY, @@ -39,6 +42,9 @@ enum EventType { EVENT_DVS_READY, // INTEL_DVS_E EVENT_ISYS_ERROR, + // PRIVACY_MODE_S + EVENT_3A_READY, + // PRIVACY_MODE_E }; struct EventDataStatsReady { @@ -59,12 +65,15 @@ struct EventDataFrame { struct EventDataMeta { timeval timestamp; int64_t sequence; + // DOL_FEATURE_S + short vbp; + // DOL_FEATURE_E }; struct EventRequestData { int bufferNum; camera_buffer_t** buffer; - Parameters* param; + camera_test_pattern_mode_t testPatternMode; int64_t settingSeq; }; @@ -86,9 +95,18 @@ struct EventRequestReady { // INTEL_DVS_S struct EventDVSRunReady { int streamId; + int64_t sequence; + camera_zoom_region_t region; }; // INTEL_DVS_E +// PRIVACY_MODE_S +struct EventData3AReady { + int64_t sequence; + uint32_t maxBin; +}; +// PRIVACY_MODE_E + struct EventData { EventData() : type(EVENT_ISYS_SOF), pipeType(-1) { CLEAR(data); } @@ -108,6 +126,9 @@ struct EventData { // INTEL_DVS_S EventDVSRunReady dvsRunReady; // INTEL_DVS_E + // PRIVACY_MODE_S + EventData3AReady run3AReady; + // PRIVACY_MODE_E } data; }; diff --git a/src/core/CameraStream.cpp b/src/core/CameraStream.cpp index e8e91b36..e98e8aff 100644 --- a/src/core/CameraStream.cpp +++ b/src/core/CameraStream.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,10 +98,12 @@ shared_ptr CameraStream::userBufferToCameraBuffer(camera_buffer_t* } if (!camBuffer) { // Not found in the pool, so create a new CameraBuffer for it. + v4l2_buf_type v4l2BufType = PlatformData::getV4L2BufType(mCameraId); ubuffer->index = mUserBuffersPool.size(); camBuffer = std::make_shared(mCameraId, BUFFER_USAGE_GENERAL, ubuffer->s.memType, - ubuffer->s.size, ubuffer->index, ubuffer->s.format); + ubuffer->s.size, ubuffer->index, ubuffer->s.format, + v4l2BufType); CheckAndLogError(!camBuffer, nullptr, "@%s: fail to alloc CameraBuffer", __func__); mUserBuffersPool.push_back(camBuffer); } @@ -140,6 +142,7 @@ void CameraStream::setBufferProducer(BufferProducer* producer) { if (producer != nullptr) producer->addFrameAvailableListener(this); } +// PRIVACY_MODE_S shared_ptr CameraStream::getPrivacyBuffer() { AutoMutex l(mBufferPoolLock); shared_ptr buf = nullptr; @@ -149,31 +152,31 @@ shared_ptr CameraStream::getPrivacyBuffer() { } return buf; } +// PRIVACY_MODE_E int CameraStream::onFrameAvailable(Port port, const shared_ptr& camBuffer) { + // Ignore if the buffer is not for this stream. if (mPort != port) return OK; if (camBuffer->getStreamId() != mStreamId) return OK; - std::shared_ptr buf; - { + + LOG2("@%s: mStreamId:%d, CameraBuffer:%p for port:%d", mCameraId, __func__, mStreamId, + camBuffer.get(), port); + + std::shared_ptr buf = camBuffer; + // PRIVACY_MODE_S + if (PlatformData::getSupportPrivacy(mCameraId) != NO_PRIVACY_MODE) { AutoMutex l(mBufferPoolLock); mPrivacyBuffer.push(camBuffer); - if (mPrivacyBuffer.size() <= 1) { - return OK; - } + if (mPrivacyBuffer.size() <= 1) return OK; + buf = mPrivacyBuffer.front(); mPrivacyBuffer.pop(); } + // PRIVACY_MODE_E return doFrameAvailable(port, buf); } int CameraStream::doFrameAvailable(Port port, const shared_ptr& camBuffer) { - // Ignore if the buffer is not for this stream. - if (mPort != port) return OK; - if (camBuffer->getStreamId() != mStreamId) return OK; - - LOG2("@%s: mStreamId:%d, CameraBuffer:%p for port:%d", mCameraId, __func__, mStreamId, - camBuffer.get(), port); - // Update the user buffer info before return back camBuffer->updateUserBuffer(); @@ -201,5 +204,4 @@ int CameraStream::doFrameAvailable(Port port, const shared_ptr& ca return OK; } - } // namespace icamera diff --git a/src/core/CameraStream.h b/src/core/CameraStream.h index eb102caa..730dd6bb 100644 --- a/src/core/CameraStream.h +++ b/src/core/CameraStream.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -80,19 +80,21 @@ class CameraStream : public BufferConsumer, public EventSource { virtual void setBufferProducer(BufferProducer* producer); /** - * \brief The notify when polled or processed one frame buffer + * \brief receive one frame buffer as consumer */ virtual int onFrameAvailable(Port port, const std::shared_ptr& camBuffer); /** - * \brief Return a privacy buffer + * \brief notify EVENT_FRAME_AVAILABLE event to its listener */ - virtual std::shared_ptr getPrivacyBuffer(); + virtual int doFrameAvailable(Port port, const std::shared_ptr& camBuffer); + // PRIVACY_MODE_S /** - * \brief Special function to send last frame after privacy on + * \brief Return a privacy buffer */ - virtual int doFrameAvailable(Port port, const std::shared_ptr& camBuffer); + virtual std::shared_ptr getPrivacyBuffer(); + // PRIVACY_MODE_E private: int mCameraId; @@ -105,8 +107,10 @@ class CameraStream : public BufferConsumer, public EventSource { CameraBufVector mUserBuffersPool; // How many user buffers are currently processing underhood. int mBufferInProcessing; + // PRIVACY_MODE_S // An extra queue at the end of pipeline, to store 1 buffer at least when privacy on. CameraBufQ mPrivacyBuffer; + // PRIVACY_MODE_E }; } // namespace icamera diff --git a/src/core/CaptureUnit.cpp b/src/core/CaptureUnit.cpp index 2bc96b23..5240977d 100644 --- a/src/core/CaptureUnit.cpp +++ b/src/core/CaptureUnit.cpp @@ -111,6 +111,18 @@ int CaptureUnit::createDevices() { vector targetPorts; targetPorts.push_back(portOfMainDevice); + // DOL_FEATURE_S + if (PlatformData::isDolShortEnabled(mCameraId)) { + mDevices.push_back(new DolCaptureDevice(mCameraId, VIDEO_GENERIC_SHORT_EXPO)); + targetPorts.push_back(SECOND_PORT); + } + + if (PlatformData::isDolMediumEnabled(mCameraId)) { + mDevices.push_back(new DolCaptureDevice(mCameraId, VIDEO_GENERIC_MEDIUM_EXPO)); + targetPorts.push_back(THIRD_PORT); + } + // DOL_FEATURE_E + // Open and configure the devices. The stream and port that are used by the device is // decided by whether consumer has provided such info, use the default one if not. for (uint8_t i = 0; i < mDevices.size(); i++) { diff --git a/src/core/CsiMetaDevice.cpp b/src/core/CsiMetaDevice.cpp new file mode 100644 index 00000000..25fb9f64 --- /dev/null +++ b/src/core/CsiMetaDevice.cpp @@ -0,0 +1,451 @@ +/* + * Copyright (C) 2016-2023 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG CsiMetaDevice + +#include "CsiMetaDevice.h" + +#include + +#include "PlatformData.h" +#include "iutils/CameraDump.h" +#include "iutils/CameraLog.h" +#include "iutils/Utils.h" +#include "linux/ipu-isys.h" + +using std::map; +using std::shared_ptr; +using std::vector; + +namespace icamera { + +CsiMetaDevice::CsiMetaDevice(int cameraId) + : mCameraId(cameraId), + mCsiMetaDevice(nullptr), + mIsCsiMetaEnabled(false), + mCsiMetaBufferDQIndex(0), + mBuffersInCsiMetaDevice(0), + mState(CSI_META_DEVICE_UNINIT), + mExitPending(false) { + mPollThread = new PollThread(this); + CLEAR(mEmbeddedMetaData); +} + +CsiMetaDevice::~CsiMetaDevice() { + delete mPollThread; +} + +int CsiMetaDevice::init() { + return OK; +} + +void CsiMetaDevice::deinit() { + AutoMutex l(mCsiMetaDeviceLock); + if (!mIsCsiMetaEnabled) { + return; + } + deinitLocked(); +} + +void CsiMetaDevice::deinitLocked() { + LOG1("@%s", __func__); + + mCsiMetaCameraBuffers.clear(); + deinitDev(); + mPollThread->join(); + mState = CSI_META_DEVICE_UNINIT; +} + +int CsiMetaDevice::resetState() { + LOG1("@%s", __func__); + + mExitPending = false; + mCsiMetaBufferDQIndex = 0; + mBuffersInCsiMetaDevice = 0; + mCsiMetaCameraBuffers.reserve(CSI_META_BUFFER_NUM); + mState = CSI_META_DEVICE_INIT; + + return OK; +} + +int CsiMetaDevice::initDev() { + // close the previous device if any + deinitDev(); + + std::string devName; + int ret = PlatformData::getDevNameByType(mCameraId, VIDEO_CSI_META, devName); + CheckAndLogError(ret != OK, BAD_VALUE, "failed to init device node"); + + mCsiMetaDevice = new V4L2VideoNode(devName); + ret = mCsiMetaDevice->Open(O_RDWR); + if (ret != OK) { + delete mCsiMetaDevice; + mCsiMetaDevice = nullptr; + + LOGE("open csi meta dev failed. ret %d", ret); + return BAD_VALUE; + } + + mConfiguredDevices.push_back(mCsiMetaDevice); + + return OK; +} + +void CsiMetaDevice::deinitDev() { + mConfiguredDevices.clear(); + if (mCsiMetaDevice) { + // Release V4L2 buffers + mCsiMetaDevice->Stop(true); + mCsiMetaDevice->Close(); + delete mCsiMetaDevice; + mCsiMetaDevice = nullptr; + } +} + +int CsiMetaDevice::initEmdMetaData() { + // initialize mEmbeddedMetaData + std::string videoNodeName; + int ret = PlatformData::getVideoNodeNameByType(mCameraId, VIDEO_ISYS_RECEIVER, videoNodeName); + CheckAndLogError(ret != OK, ret, "failed to get device node name"); + + McFormat format; + + ret = PlatformData::getFormatByDevName(mCameraId, videoNodeName, format); + CheckAndLogError(ret != OK, ret, "failed to get format, sub Dev name = %s", + videoNodeName.c_str()); + + int bpp = CameraUtils::getBpp(format.pixelCode); + CheckAndLogError(bpp < 0, BAD_VALUE, "failed to get bpp (%d)", bpp); + + int bpl = format.width * bpp / 8; + + mEmbeddedMetaData.csiMetaFormat = V4L2_FMT_IPU_ISYS_META; + // for embedded meta data, width is equal with bytes per line + mEmbeddedMetaData.width = bpl; + // for compatible, set 1 as default, if the *.xml have configed it, use the config value repalce + mEmbeddedMetaData.height = 1; + ret = PlatformData::getVideoNodeNameByType(mCameraId, VIDEO_CSI_META, videoNodeName); + if (ret == OK) { + ret = PlatformData::getFormatByDevName(mCameraId, videoNodeName, format); + if (ret == OK) mEmbeddedMetaData.height = format.height; + } + + mEmbeddedMetaData.bpl = bpl; + mEmbeddedMetaData.planesNum = CameraUtils::getNumOfPlanes(V4L2_FMT_IPU_ISYS_META); + + return OK; +} + +int CsiMetaDevice::configure() { + LOG1("@%s", __func__); + AutoMutex l(mCsiMetaDeviceLock); + + CheckAndLogError(mState == CSI_META_DEVICE_START, BAD_VALUE, "@%s: Configure in wrong state %d", + __func__, mState); + + deinitLocked(); + if (PlatformData::isCsiMetaEnabled(mCameraId)) mIsCsiMetaEnabled = true; + + int ret = resetState(); + CheckAndLogError(ret != OK, ret, "@%s: init csi meta device failed", __func__); + + if (!mIsCsiMetaEnabled) { + return OK; + } + + ret = initDev(); + CheckAndLogError(ret != 0, BAD_VALUE, "init CSI meta device failed. ret %d", ret); + + ret = initEmdMetaData(); + CheckAndLogError(ret != 0, BAD_VALUE, "init embedded metadata failed. ret %d", ret); + + ret = setFormat(); + CheckAndLogError(ret != 0, BAD_VALUE, "set format failed, ret = %d", ret); + + ret = allocCsiMetaBuffers(); + CheckAndLogError(ret != 0, BAD_VALUE, "failed to alloc CSI buffer, ret = %d", ret); + + mState = CSI_META_DEVICE_CONFIGURED; + + return OK; +} + +int CsiMetaDevice::start() { + LOG1("@%s", __func__); + AutoMutex l(mCsiMetaDeviceLock); + if (!mIsCsiMetaEnabled) { + return OK; + } + + CheckWarning(mState != CSI_META_DEVICE_CONFIGURED && mState != CSI_META_DEVICE_STOP, OK, + "%s: start in wrong state: %d", __func__, mState); + + int ret = mCsiMetaDevice->Start(); + CheckAndLogError(ret < 0, ret, "failed to stream on csi meta device, ret = %d", ret); + + mExitPending = false; + mPollThread->run("CsiMetaDevice", PRIORITY_URGENT_AUDIO); + mState = CSI_META_DEVICE_START; + + return OK; +} + +int CsiMetaDevice::stop() { + LOG1("@%s", __func__); + AutoMutex l(mCsiMetaDeviceLock); + if (!mIsCsiMetaEnabled) { + return OK; + } + + CheckWarning(mState != CSI_META_DEVICE_START, OK, "%s: device not started", __func__); + + mExitPending = true; + mPollThread->requestExit(); + + int ret = mCsiMetaDevice->Stop(false); + + CheckAndLogError(ret < 0, ret, "failed to stream off csi meta device, ret = %d", ret); + + mPollThread->requestExitAndWait(); + + mState = CSI_META_DEVICE_STOP; + return OK; +} + +int CsiMetaDevice::poll() { + const int poll_timeout_count = 10; + const int poll_timeout = 1000; + + std::vector pollDevs; + + int ret = 0; + int timeOutCount = poll_timeout_count; + + LOG2("@%s before poll number buffer in devices: %d", __func__, mBuffersInCsiMetaDevice.load()); + + if (!hasBufferIndevice()) { + LOG2("@%s there is no buffers in device, skip this poll", __func__); + return OK; + } + + for (const auto& device : mConfiguredDevices) { + pollDevs.push_back(device); + } + + std::vector readyDevices; + while (timeOutCount-- && ret == 0) { + V4L2DevicePoller poller{pollDevs, -1}; + ret = poller.Poll(poll_timeout, POLLPRI | POLLIN | POLLOUT | POLLERR, &readyDevices); + + LOG2("@%s ing poll number buffer in devices: %d", __func__, mBuffersInCsiMetaDevice.load()); + if (mExitPending) { + return NO_INIT; + } + } + + if (mExitPending) { + // Exiting, no error + return NO_INIT; + } + + // handle the poll error + CheckAndLogError(ret < 0, ret, "%s: Poll error", __func__); + + if (ret > 0) { + handleCsiMetaBuffer(); + } + + LOG2("@%s after poll number buffer in devices: %d", __func__, mBuffersInCsiMetaDevice.load()); + return OK; +} + +int CsiMetaDevice::hasBufferIndevice() { + return mBuffersInCsiMetaDevice.load(); +} + +int CsiMetaDevice::queueCsiMetaBuffer(const shared_ptr& camBuffer) { + int ret = mCsiMetaDevice->PutFrame(&camBuffer->getV4L2Buffer()); + CheckAndLogError(ret < 0, BAD_VALUE, "%s: Failed to queue CSI meta buffer, ret=%d", __func__, + ret); + + LOG2("%s: queue CSI meta buffer, camBuffer index: %d", __func__, camBuffer->getIndex()); + + mBuffersInCsiMetaDevice++; + + return OK; +} + +void CsiMetaDevice::handleCsiMetaBuffer() { + AutoMutex l(mCsiMetaBuffersLock); + + shared_ptr camBuffer = mCsiMetaCameraBuffers[mCsiMetaBufferDQIndex]; + CheckAndLogError(!camBuffer, VOID_VALUE, "Csi meta camera buffer %d is null", + mCsiMetaBufferDQIndex); + + V4L2Buffer& vbuf = camBuffer->getV4L2Buffer(); + int index = mCsiMetaDevice->GrabFrame(&vbuf); + + if (mExitPending) return; + CheckAndLogError(index < 0, VOID_VALUE, "grab frame failed. index %d", index); + + LOG2("%s: grab meta data buffer sequence %d timestamp %ld", __func__, camBuffer->getSequence(), + TIMEVAL2USECS(camBuffer->getTimestamp())); + PERF_CAMERA_ATRACE_PARAM3("grabFrame SeqID", camBuffer->getSequence(), "csi2_port", + camBuffer->getCsi2Port(), "virtual_channel", + camBuffer->getVirtualChannel()); + + mBuffersInCsiMetaDevice--; + mCsiMetaBufferDQIndex = (mCsiMetaBufferDQIndex + 1) % mCsiMetaCameraBuffers.size(); + + if (CameraDump::isDumpTypeEnable(DUMP_EMBEDDED_METADATA)) { + BinParam_t bParam; + bParam.bType = BIN_TYPE_SENSOR_METADATA; + bParam.mType = M_ISYS; + bParam.sequence = camBuffer->getSequence(); + bParam.mParam.width = mEmbeddedMetaData.width; + bParam.mParam.height = mEmbeddedMetaData.height; + bParam.mParam.metaFormat = mEmbeddedMetaData.csiMetaFormat; + for (int i = 0; i < mEmbeddedMetaData.planesNum; i++) { + bParam.mParam.planeIdx = i; + LOG2("@%s, dump sensor meta data, addr = %p, w:%d, h:%d, len:%d", __func__, + camBuffer->getBufferAddr(i), mEmbeddedMetaData.width, mEmbeddedMetaData.height, + camBuffer->getBufferSize(i)); + CameraDump::dumpBinary(mCameraId, camBuffer->getBufferAddr(i), + camBuffer->getBufferSize(i), &bParam); + } + } + + EventData eventData; + EventDataMeta metaData; + CLEAR(metaData); + metaData.timestamp = camBuffer->getTimestamp(); + metaData.sequence = camBuffer->getSequence(); + + // DOL_FEATURE_S + int status = decodeMetaData(metaData, camBuffer); + if (status == OK) { + eventData.type = EVENT_META; + eventData.buffer = nullptr; + eventData.data.meta = metaData; + + notifyListeners(eventData); + } + // DOL_FEATURE_E + + queueCsiMetaBuffer(camBuffer); +} + +// DOL_FEATURE_S +int CsiMetaDevice::decodeMetaData(EventDataMeta& metaData, + const shared_ptr& camBuffer) { + vector vbpOffset; + PlatformData::getDolVbpOffset(mCameraId, vbpOffset); + + if (vbpOffset.size() == 0) { + LOG2("%s: skip vbp meta data decode, no vbpOffset set.", __func__); + return INVALID_OPERATION; + } else if (vbpOffset.size() != 2) { + LOGE("Invalid vbpOffset value size %lu, skip vpb meta data decode.", vbpOffset.size()); + return BAD_VALUE; + } + + if (mEmbeddedMetaData.planesNum > 0) { + char* metaPtr = reinterpret_cast(camBuffer->getBufferAddr(0)); + metaData.vbp = metaPtr[vbpOffset[0]] | (metaPtr[vbpOffset[1]] << 8); + LOG2("%s: offset %d/%d, value is %d", metaData.sequence, __func__, vbpOffset[0], + vbpOffset[1], metaData.vbp); + } + + return OK; +} +// DOL_FEATURE_E + +int CsiMetaDevice::setFormat() { + struct v4l2_format v4l2fmt; + CLEAR(v4l2fmt); + +#ifdef CAL_BUILD + v4l2fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; +#else + int dev_caps = mCsiMetaDevice->GetDeviceCaps(); + if (dev_caps & V4L2_CAP_META_CAPTURE) { + v4l2fmt.type = V4L2_BUF_TYPE_META_CAPTURE; + } else { + v4l2fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; + } +#endif + v4l2fmt.fmt.pix_mp.width = mEmbeddedMetaData.width; + v4l2fmt.fmt.pix_mp.height = mEmbeddedMetaData.height; + v4l2fmt.fmt.pix_mp.num_planes = mEmbeddedMetaData.planesNum; + v4l2fmt.fmt.pix_mp.pixelformat = mEmbeddedMetaData.csiMetaFormat; + for (int i = 0; i < v4l2fmt.fmt.pix_mp.num_planes; i++) { + v4l2fmt.fmt.pix_mp.plane_fmt[i].bytesperline = mEmbeddedMetaData.bpl; + v4l2fmt.fmt.pix_mp.plane_fmt[i].sizeimage = 0; + } + v4l2fmt.fmt.pix_mp.field = V4L2_FIELD_NONE; + + V4L2Format tmpbuf{v4l2fmt}; + int ret = mCsiMetaDevice->SetFormat(tmpbuf); + v4l2fmt = *tmpbuf.Get(); + + CheckAndLogError(ret != OK, ret, "set v4l2 format failed ret=%d", ret); + + for (int i = 0; i < v4l2fmt.fmt.pix_mp.num_planes; i++) { + mEmbeddedMetaData.size[i] = v4l2fmt.fmt.pix_mp.plane_fmt[i].sizeimage; + } + + LOG2("VIDIOC_S_FMT type %d : width: %d, height: %d, bpl: %d, fourcc: %d, field: %d", + v4l2fmt.type, v4l2fmt.fmt.pix.width, v4l2fmt.fmt.pix.height, v4l2fmt.fmt.pix.bytesperline, + v4l2fmt.fmt.pix.pixelformat, v4l2fmt.fmt.pix.field); + + return OK; +} + +int CsiMetaDevice::allocCsiMetaBuffers() { + AutoMutex l(mCsiMetaBuffersLock); + + mCsiMetaCameraBuffers.clear(); + + std::vector bufs; + int bufNum = mCsiMetaDevice->SetupBuffers(MAX_BUFFER_COUNT, false, V4L2_MEMORY_MMAP, &bufs); + + CheckAndLogError(bufNum < 0, bufNum, "request CSI meta buffers failed return=%d", bufNum); + + for (int i = 0; i < bufNum; i++) { + shared_ptr camBuffer = std::make_shared( + mCameraId, BUFFER_USAGE_METADATA, V4L2_MEMORY_MMAP, 0, i, V4L2_FMT_IPU_ISYS_META); + CheckAndLogError(!camBuffer, NO_MEMORY, "@%s: fail to alloc CameraBuffer", __func__); + + for (int j = 0; j < mEmbeddedMetaData.planesNum; j++) { + LOG2("@%s, buffer size [%d] = %d", __func__, j, mEmbeddedMetaData.size[j]); + camBuffer->setBufferSize(mEmbeddedMetaData.size[j], j); + } + + // MMap user space buffer + camBuffer->allocateMemory(mCsiMetaDevice); + mCsiMetaCameraBuffers.push_back(camBuffer); + + // Enqueue CSI meta buffer to ISP + queueCsiMetaBuffer(camBuffer); + + LOG2("%s: store csi meta, index: %d, vbuff index: %d camBuffer->getBufferAddr() = %p", + __func__, i, camBuffer->getIndex(), camBuffer->getBufferAddr()); + } + + return OK; +} + +} /* namespace icamera */ diff --git a/src/core/CsiMetaDevice.h b/src/core/CsiMetaDevice.h new file mode 100644 index 00000000..dfaafb89 --- /dev/null +++ b/src/core/CsiMetaDevice.h @@ -0,0 +1,131 @@ +/* + * Copyright (C) 2016-2021 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#ifdef CAL_BUILD +#include +#else +#include +#endif + +#include +#include + +#include "CameraBuffer.h" +#include "CameraEvent.h" +#include "iutils/Errors.h" +#include "iutils/Thread.h" + +namespace icamera { + +/** + * \struct EmbeddedMetaData: sensor and csi meta device info + * + * EmbeddedMetaData is used to carray embedded meta data info. + */ +struct EmbeddedMetaData { + int csiMetaFormat; + int width; + int height; + int bpl; + int planesNum; + int size[VIDEO_MAX_PLANES]; +}; + +/** + * \class CsiMetaDevice + * + * \brief + * Manage CSI meta device, and provide sensor metadata for other class. + * + * This class is used to control CSI meta device, and grabs embedded sensor + * metadata and supplies sensor metadata for other class. + * + */ +class CsiMetaDevice : public EventSource { + public: + explicit CsiMetaDevice(int cameraId); + ~CsiMetaDevice(); + + int init(); + void deinit(); + int configure(); + int start(); + int stop(); + bool isEnabled() { return mIsCsiMetaEnabled; } + + void deinitLocked(); + int resetState(); + int initDev(); + void deinitDev(); + int initEmdMetaData(); + int poll(); + int hasBufferIndevice(); + void handleCsiMetaBuffer(); + int setFormat(); + int allocCsiMetaBuffers(); + int queueCsiMetaBuffer(const std::shared_ptr& camBuffer); + // DOL_FEATURE_S + int decodeMetaData(EventDataMeta& metaData, const std::shared_ptr& camBuffer); + // DOL_FEATURE_E + + private: + static const int CSI_META_BUFFER_NUM = 10; + + class PollThread : public Thread { + CsiMetaDevice* mCsiMetaDevice; + + public: + explicit PollThread(CsiMetaDevice* csiMetaDevice) : mCsiMetaDevice(csiMetaDevice) {} + virtual ~PollThread() {} + virtual bool threadLoop() { + int ret = mCsiMetaDevice->poll(); + return ret == OK; + } + }; + + PollThread* mPollThread; + int mCameraId; + V4L2VideoNode* mCsiMetaDevice; + std::vector mConfiguredDevices; + EmbeddedMetaData mEmbeddedMetaData; + + // Guard for CsiMetaDevice public API + Mutex mCsiMetaDeviceLock; + + bool mIsCsiMetaEnabled; + + Mutex mCsiMetaBuffersLock; + int mCsiMetaBufferDQIndex; + CameraBufVector mCsiMetaCameraBuffers; + std::atomic mBuffersInCsiMetaDevice; + + enum { + CSI_META_DEVICE_UNINIT, + CSI_META_DEVICE_INIT, + CSI_META_DEVICE_CONFIGURED, + CSI_META_DEVICE_START, + CSI_META_DEVICE_STOP, + } mState; + + bool mExitPending; + + private: + DISALLOW_COPY_AND_ASSIGN(CsiMetaDevice); +}; + +} /* namespace icamera */ diff --git a/src/core/CvfPrivacyChecker.cpp b/src/core/CvfPrivacyChecker.cpp new file mode 100644 index 00000000..a9a5d4a5 --- /dev/null +++ b/src/core/CvfPrivacyChecker.cpp @@ -0,0 +1,200 @@ +/* + * Copyright (C) 2023 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG CvfPrivacyChecker + +#include "CvfPrivacyChecker.h" + +#include +#include +#include +#include + +#include "CameraBuffer.h" +#include "CameraStream.h" +#include "iutils/CameraLog.h" +#include "iutils/Errors.h" +#include "iutils/Thread.h" +#include "MediaControl.h" +#include "PlatformData.h" +#include "V4l2DeviceFactory.h" + +namespace icamera { +CvfPrivacyChecker::CvfPrivacyChecker(int _id, CameraStream** _streams, uint32_t _interval) + : mCameraId(_id), + mInterval(_interval), + mPrivacyOn(false), + mCameraStreams(_streams), + mPixelArraySubdev(nullptr), + mThreshold(10U), + mFrameDelay(5U), + mFrameCount(0U), + mPrivacyImageBuf(nullptr) { + if (PlatformData::getSupportPrivacy(_id) == AE_BASED_PRIVACY_MODE) { + mThreshold = PlatformData::getPrivacyModeThreshold(_id); + mFrameDelay = PlatformData::getPrivacyModeFrameDelay(_id); + } +} + +CvfPrivacyChecker::~CvfPrivacyChecker() { + if (mPrivacyImageBuf) { + free(mPrivacyImageBuf); + } +} + +int CvfPrivacyChecker::init() { + MediaControl* mc = MediaControl::getInstance(); + std::string subDevName; + int privacy = -1; + int ret = mc->getPrivacyDeviceName(&subDevName); + + if (ret != OK) { + // Try to get sensor as privacy device + ret = PlatformData::getDevNameByType(mCameraId, VIDEO_PIXEL_ARRAY, subDevName); + CheckAndLogError(ret != OK, ret, "%s: Can't get privacy subdev (%d)", mCameraId, + __func__, ret); + } + mPixelArraySubdev = V4l2DeviceFactory::getSubDev(mCameraId, subDevName); + + ret = mPixelArraySubdev->GetControl(V4L2_CID_PRIVACY, &privacy); + CheckAndLogError(ret != OK, ret, "%s: get %s V4L2_CID_PRIVACY failed (%d)", mCameraId, + __func__, subDevName.c_str(), ret); + LOG1("%s: privacy subdev: %s status %d", mCameraId, __func__, + mPixelArraySubdev->Name().c_str(), privacy); + + return OK; +} + +void CvfPrivacyChecker::handleEvent(EventData eventData) { + LOG2("privacy event: %d", eventData.type); + switch (eventData.type) { + case EVENT_3A_READY: + if (mPrivacyOn) { + if (eventData.data.run3AReady.maxBin >= mThreshold) { + if (mFrameCount > mFrameDelay) { + setPrivacy(false); + mFrameCount = 0U; + } else { + mFrameCount++; + } + } else { + mFrameCount = 0U; + } + } else { + if (eventData.data.run3AReady.maxBin < mThreshold) { + if (mFrameCount > mFrameDelay) { + setPrivacy(true); + mFrameCount = 0U; + } else { + mFrameCount++; + } + } else { + mFrameCount = 0U; + } + } + break; + case EVENT_FRAME_AVAILABLE: + if (mPrivacyOn) { + setPrivacyImage(eventData.buffer); + } + default: + break; + } +} + +bool CvfPrivacyChecker::threadLoop() { + usleep(mInterval); + bool privacy = checkPrivacyStatus(); + LOG2("%s: privacy is %d", __func__, privacy); + + if (privacy && !mPrivacyOn) { + for (int i = 0; i < MAX_STREAM_NUMBER; ++i) { + LOG2("%s: mCameraStreams[%d] == %p", __func__, i, mCameraStreams[i]); + if (mCameraStreams[i]) { + auto buf = mCameraStreams[i]->getPrivacyBuffer(); + auto port = mCameraStreams[i]->getPort(); + if (buf == nullptr) { + LOG2("%s: getPrivacyBuffer returned nullptr", __func__); + return true; + } + setPrivacyImage(buf); + mCameraStreams[i]->doFrameAvailable(port, buf); + setPrivacy(true); + } + } + } else if (!privacy && mPrivacyOn) { + setPrivacy(false); + } + return true; +} + +bool CvfPrivacyChecker::checkPrivacyStatus() { + if (!mPixelArraySubdev) { + return false; + } + int privacy = -1; + int status = mPixelArraySubdev->GetControl(V4L2_CID_PRIVACY, &privacy); + CheckWarningNoReturn(status != OK, "Couldn't get V4L2_CID_PRIVACY, status:%d", status); + return (privacy == 1); +} + +void CvfPrivacyChecker::setPrivacy(const bool p) { + mPrivacyOn = p; + LOG1("%s: change privacy status to %d", __func__, mPrivacyOn); +} + +void CvfPrivacyChecker::setPrivacyImage(std::shared_ptr& buf) { + uint32_t width = buf->getWidth(); + uint32_t height = buf->getHeight(); + uint32_t bufferSize = buf->getBufferSize(); + + if (!mPrivacyImageBuf) { + // if we didn't load privacy image, allocate memory + mPrivacyImageBuf = malloc(bufferSize); + if (mPrivacyImageBuf) { + // if we allocated memory, load image file + char fileName[256]; + snprintf(fileName, sizeof(fileName), "%s/privacy_image_%s_%u_%u.yuv", + PlatformData::getCameraCfgPath().c_str(), + PlatformData::getSensorName(mCameraId), width, height); + + std::ifstream file(fileName, std::ios::in | std::ios::binary | std::ios::ate); + CheckWarningNoReturn(!file.is_open(), "Cannot open privacy image file: %s", fileName); + if (file.is_open()) { + uint32_t fileSize = file.tellg(); + file.seekg(0, std::ios::beg); + file.read(reinterpret_cast(mPrivacyImageBuf), + std::min(fileSize, bufferSize)); + } else { + // if can't load img, set privacy image as black + // TODO: handle YUY2 buffer. This can only set NV12 buffer to black. + uint32_t offset = width * height; + memset(reinterpret_cast(mPrivacyImageBuf), 0, offset); + memset(reinterpret_cast(mPrivacyImageBuf) + offset, 128, offset / 2); + } + } else { + uint32_t offset = width * height; + memset(reinterpret_cast(buf->getBufferAddr()), 0, offset); + memset(reinterpret_cast(buf->getBufferAddr()) + offset, 128, offset / 2); + return; + } + } + + MEMCPY_S(reinterpret_cast(buf->getBufferAddr()), bufferSize, mPrivacyImageBuf, + bufferSize); +} + +} // namespace icamera diff --git a/src/core/CvfPrivacyChecker.h b/src/core/CvfPrivacyChecker.h index 23a0080c..5ebe8232 100644 --- a/src/core/CvfPrivacyChecker.h +++ b/src/core/CvfPrivacyChecker.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Intel Corporation. + * Copyright (C) 2022-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,110 +16,52 @@ #pragma once -#include -#include - -#include "iutils/Errors.h" -#include "iutils/CameraLog.h" -#include "iutils/Thread.h" - -#include "CameraStream.h" #include "CameraBuffer.h" -#include "PlatformData.h" +#include "CameraStream.h" +#include "iutils/Thread.h" #include "V4l2DeviceFactory.h" namespace icamera { -class CvfPrivacyChecker : public Thread { +class CvfPrivacyChecker : public Thread, public EventListener { + private: const int mCameraId; const uint32_t mInterval; // us - int mPrivacy; + bool mPrivacyOn; CameraStream** mCameraStreams; V4L2Subdevice* mPixelArraySubdev; + uint32_t mThreshold; // Threshold for camera enter AE based privacy mode + uint32_t mFrameDelay; // Frame delay count before camera enter AE based privacy mode + uint32_t mFrameCount; + void* mPrivacyImageBuf; public: - CvfPrivacyChecker(int _id, CameraStream** _streams, uint32_t _interval = 67000) - : mCameraId(_id), - mInterval(_interval), - mPrivacy(-1), - mCameraStreams(_streams), - mPixelArraySubdev(nullptr) {} + CvfPrivacyChecker(int _id, CameraStream** _streams, uint32_t _interval = 67000); + virtual ~CvfPrivacyChecker(); - int init() { - std::string subDevName; - int ret = PlatformData::getDevNameByType(mCameraId, VIDEO_PIXEL_ARRAY, subDevName); - if (ret == OK) { - LOG1("%s: ArraySubdev camera id:%d dev name:%s", __PRETTY_FUNCTION__, mCameraId, - subDevName.c_str()); - mPixelArraySubdev = V4l2DeviceFactory::getSubDev(mCameraId, subDevName); - } else { - LOG1("%s: Can't get pixel array subdevice. camera id:%d, return: %d", - __PRETTY_FUNCTION__, mCameraId, ret); - } - return ret; - } + /** + * \brief Init the mPixelArraySubdev + */ + int init(); + void handleEvent(EventData eventData) override; /** * \brief Check CVF privacy status and process */ - bool threadLoop() { - usleep(mInterval); - int privacy = checkPrivacyStatus(); - LOG2("%s: privacy is %d", __PRETTY_FUNCTION__, privacy); - - if (privacy == 1 && mPrivacy < 1) { - for (int i = 0; i < MAX_STREAM_NUMBER; ++i) { - LOGI("%s: mCameraStreams[%d] == %p", __PRETTY_FUNCTION__, i, mCameraStreams[i]); - if (mCameraStreams[i]) { - auto buf = mCameraStreams[i]->getPrivacyBuffer(); - auto port = mCameraStreams[i]->getPort(); - if (buf == nullptr) { - LOGI("%s: getPrivacyBuffer returned nullptr", __PRETTY_FUNCTION__); - return true; - } - setPrivacyImage(buf); - mCameraStreams[i]->doFrameAvailable(port, buf); - setPrivacy(1); - } - } - } else if (privacy == 0 && mPrivacy != 0) { - setPrivacy(0); - } - return true; - } + bool threadLoop() override; private: - int checkPrivacyStatus() { - if (!mPixelArraySubdev) { - return -1; - } - int privacy = -1; - int status = mPixelArraySubdev->GetControl(V4L2_CID_PRIVACY, &privacy); - CheckAndLogError(status != OK, status, "Couldn't get V4L2_CID_PRIVACY, status:%d", status); - return privacy; - } + bool checkPrivacyStatus(); /** - * \brief Update mPrivacy status + * \brief Update mPrivacyOn status */ - void setPrivacy(const int p) { - mPrivacy = p; - LOG1("%s: change privacy status to %d", __func__, mPrivacy); - } + void setPrivacy(const bool p); /** * \brief Set the CameraBuffer to privacy image */ - void setPrivacyImage(std::shared_ptr& buf) { - // TODO: handle YUY2 buffer. This can only set NV12 buffer to black. - uint32_t width = buf->getWidth(); - uint32_t height = buf->getHeight(); - uint32_t offset = width * height; - - memset(buf->getBufferAddr(), 0, offset); - memset(reinterpret_cast(buf->getBufferAddr()) + offset, 128, offset / 2); - LOG1("%s: set %p size %u to black", __func__, buf->getBufferAddr(), buf->getBufferSize()); - } + void setPrivacyImage(std::shared_ptr& buf); DISALLOW_COPY_AND_ASSIGN(CvfPrivacyChecker); }; diff --git a/src/core/DeviceBase.cpp b/src/core/DeviceBase.cpp index 557a6306..1e61fcd0 100644 --- a/src/core/DeviceBase.cpp +++ b/src/core/DeviceBase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation. + * Copyright (C) 2018-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,7 +48,8 @@ DeviceBase::DeviceBase(int cameraId, VideoNodeType nodeType, VideoNodeDirection mNeedSkipFrame(false), mDeviceCB(deviceCB), mMaxBufferNumber(MAX_BUFFER_COUNT), - mBufferQueuing(false) { + mBufferQueuing(false), + mBufType(V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { LOG1("%s, device:%s", mCameraId, __func__, mName); mFrameSkipNum = PlatformData::getInitialSkipFrame(mCameraId); @@ -74,7 +75,23 @@ int DeviceBase::openDevice() { SyncManager::getInstance()->updateSyncCamNum(); // FRAME_SYNC_E - return mDevice->Open(O_RDWR); + int ret = mDevice->Open(O_RDWR); + if (ret) + return ret; + +#ifdef LINUX_BUILD + int dev_caps = mDevice->GetDeviceCaps(); + if (dev_caps & V4L2_CAP_VIDEO_CAPTURE) { + mBufType = V4L2_BUF_TYPE_VIDEO_CAPTURE; + } else { + mBufType = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; + } +#else + mBufType = mDevice->GetBufferType(); +#endif + PlatformData::setV4L2BufType(mCameraId, mBufType); + + return OK; } void DeviceBase::closeDevice() { @@ -86,7 +103,6 @@ void DeviceBase::closeDevice() { AutoMutex l(mBufferLock); mPendingBuffers.clear(); mBuffersInDevice.clear(); - mAllocatedBuffers.clear(); } mDevice->Close(); } @@ -140,6 +156,8 @@ int DeviceBase::queueBuffer(int64_t sequence) { mBufferQueuing = true; } + buffer->getV4L2Buffer().SetType(mBufType); + int ret = onQueueBuffer(sequence, buffer); if (ret == OK) { ret = mDevice->PutFrame(&buffer->getV4L2Buffer()); @@ -209,9 +227,6 @@ void DeviceBase::resetBuffers() { mBuffersInDevice.clear(); mPendingBuffers.clear(); - for (const auto& buffer : mAllocatedBuffers) { - mPendingBuffers.push_back(buffer); - } } bool DeviceBase::hasPendingBuffer() { @@ -305,20 +320,6 @@ int MainDevice::createBufferPool(const stream_t& config) { csiBEDeviceNodeName.c_str(), ret); } - bool setWithHeaderCtl = true; - std::string subDeviceNodeName; - - if (PlatformData::getDevNameByType(mCameraId, VIDEO_ISYS_RECEIVER, subDeviceNodeName) == OK) { - LOG1("%s: found ISYS receiver subdevice %s", __func__, subDeviceNodeName.c_str()); - if (PlatformData::isTPGReceiver(mCameraId)) { - LOG1("%s: no need to set csi header ctrl for tpg", __func__); - setWithHeaderCtl = false; - } - } else { - setWithHeaderCtl = false; - } - - int withHeader = 1; struct v4l2_format v4l2fmt; v4l2fmt.fmt.pix_mp.field = config.field; @@ -334,13 +335,6 @@ int MainDevice::createBufferPool(const stream_t& config) { v4l2fmt.fmt.pix_mp.plane_fmt[i].bytesperline = config.width; v4l2fmt.fmt.pix_mp.plane_fmt[i].sizeimage = 0; } - // The frame data is without header(MIPI STORE MODE) when - // format is YUV/RGB and frame output from CSI-Front-End entity. - if (!CameraUtils::isRaw(config.format)) { - LOG2("@%s, set frame without header for format: %s", __func__, - CameraUtils::pixelCode2String(config.format)); - withHeader = 0; - } } else { v4l2fmt.fmt.pix.width = config.width; v4l2fmt.fmt.pix.height = config.height; @@ -349,13 +343,7 @@ int MainDevice::createBufferPool(const stream_t& config) { v4l2fmt.fmt.pix.sizeimage = 0; } - if (setWithHeaderCtl) { - V4L2Subdevice* receiverSubDev = V4l2DeviceFactory::getSubDev(mCameraId, subDeviceNodeName); - int ret = receiverSubDev->SetControl(V4L2_CID_IPU_STORE_CSI2_HEADER, withHeader); - CheckAndLogError(ret != OK, ret, "set v4l2 store csi2 header failed, ret=%d", ret); - } - - v4l2fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + v4l2fmt.type = mBufType; V4L2Format tmpbuf{v4l2fmt}; int ret = mDevice->SetFormat(tmpbuf); CheckAndLogError(ret != OK, ret, "set v4l2 format failed ret=%d", ret); @@ -389,8 +377,9 @@ int MainDevice::onDequeueBuffer(shared_ptr buffer) { if (mNeedSkipFrame) return OK; - LOG2("@%s, field:%d, timestamp: sec=%ld, usec=%ld", buffer->getSequence(), __func__, - buffer->getField(), buffer->getTimestamp().tv_sec, buffer->getTimestamp().tv_usec); + LOG2("camera:%d, stream:%d, @%s, field:%d, timestamp: sec=%ld, usec=%ld", mCameraId, + buffer->getStreamId(), buffer->getSequence(), __func__, buffer->getField(), + buffer->getTimestamp().tv_sec, buffer->getTimestamp().tv_usec); for (auto& consumer : mConsumers) { consumer->onFrameAvailable(mPort, buffer); @@ -427,7 +416,7 @@ bool MainDevice::needQueueBack(shared_ptr buffer) { sharedCamBufInfo.sof_ts = buffer->getTimestamp(); SyncManager::getInstance()->updateCameraBufInfo(mCameraId, &sharedCamBufInfo); if (skipFrameAfterSyncCheck(buffer->getSequence())) { - LOG1("@%s: dropped due to frame not sync", mCameraId, + LOG1("@%s: dropped due to frame not sync", mCameraId, buffer->getSequence(), __func__); needSkipFrame = true; } @@ -436,4 +425,73 @@ bool MainDevice::needQueueBack(shared_ptr buffer) { return needSkipFrame; } +// DOL_FEATURE_S +DolCaptureDevice::DolCaptureDevice(int cameraId, VideoNodeType nodeType) + : DeviceBase(cameraId, nodeType, INPUT_VIDEO_NODE) { + LOG1("%s, device:%s", mCameraId, __func__, mName); +} + +DolCaptureDevice::~DolCaptureDevice() {} + +int DolCaptureDevice::createBufferPool(const stream_t& config) { + LOG1("%s, fmt:%s(%dx%d) field:%d", mCameraId, __func__, + CameraUtils::pixelCode2String(config.format), config.width, config.height, config.field); + + CheckAndLogError(mPort == INVALID_PORT, NO_MEMORY, "@%s: consumer does not provide DOL buffers", + __func__); + + struct v4l2_format v4l2fmt; + v4l2fmt.fmt.pix.width = config.width; + v4l2fmt.fmt.pix.height = config.height; + v4l2fmt.fmt.pix.pixelformat = config.format; + v4l2fmt.fmt.pix.bytesperline = config.width; + v4l2fmt.fmt.pix.sizeimage = 0; + v4l2fmt.fmt.pix_mp.field = 0; + + v4l2fmt.type = mBufType; + V4L2Format tmpbuf{v4l2fmt}; + int ret = mDevice->SetFormat(tmpbuf); + CheckAndLogError(ret != OK, ret, "set DOL v4l2 format failed ret=%d", ret); + v4l2fmt = *tmpbuf.Get(); + + std::vector bufs; + int bufNum = mDevice->SetupBuffers(mMaxBufferNumber, false, + static_cast(config.memType), &bufs); + CheckAndLogError(bufNum < 0, bufNum, "request DOL buffers failed return=%d", bufNum); + + return OK; +} + +int DolCaptureDevice::onDequeueBuffer(shared_ptr buffer) { + if (mNeedSkipFrame) { + return OK; // Do nothing if the buffer needs to be skipped. + } + + for (auto& consumer : mConsumers) { + consumer->onFrameAvailable(mPort, buffer); + } + + dumpFrame(buffer); + return OK; +} + +bool DolCaptureDevice::needQueueBack(shared_ptr buffer) { + /** + * needNotifyBufferDone is used to check if the buffer needs to be returned to its consumer. + * It is only true when: 1. ISA raw buffers are queued from its consumer; + * 2. there is no frame needs to be skipped; + * 3. there is no STR2MMIOErr happened. + * needNotifyBufferDone is false means the buffer needs to be queued back immediately. + */ + bool needNotifyBufferDone = (mPort != INVALID_PORT); + if ((buffer->getV4L2Buffer().Flags() & V4L2_BUF_FLAG_ERROR) && + PlatformData::isSkipFrameOnSTR2MMIOErr(mCameraId)) { + needNotifyBufferDone = false; + } else if (mFrameSkipNum > 0) { + needNotifyBufferDone = false; + } + + return !needNotifyBufferDone; +} +// DOL_FEATURE_E } // namespace icamera diff --git a/src/core/DeviceBase.h b/src/core/DeviceBase.h index 7e4afc7c..549c6875 100644 --- a/src/core/DeviceBase.h +++ b/src/core/DeviceBase.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation. + * Copyright (C) 2018-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -136,16 +136,14 @@ class DeviceBase : public EventSource { std::set mConsumers; /** - * Each device has below three structures to manager its buffers. + * Each device has below two structures to manager its buffers. * And please note that: - * 1. If the buffer is not allocated inside CaptureUnit, mAllocatedBuffers will be empty. - * 2. Buffer to be queued into drive comes from mPendingBuffers. - * 3. Buffer to be dequeued from driver comes from mBuffersInDevice. - * 4. To make code clean, no null CameraBuffer is allowed to be put into these structures. - * 5. The buffer cannot be in both mPendingBuffers and mBuffersInDevice. + * 1. Buffer to be queued into drive comes from mPendingBuffers. + * 2. Buffer to be dequeued from driver comes from mBuffersInDevice. + * 3. To make code clean, no null CameraBuffer is allowed to be put into these structures. + * 4. The buffer cannot be in both mPendingBuffers and mBuffersInDevice. * We must make the data consistent. */ - std::vector> mAllocatedBuffers; // Save all buffers allocated internally. std::list> mPendingBuffers; // The buffers that are going to be queued. @@ -154,6 +152,7 @@ class DeviceBase : public EventSource { uint32_t mMaxBufferNumber; bool mBufferQueuing; + v4l2_buf_type mBufType; private: DISALLOW_COPY_AND_ASSIGN(DeviceBase); @@ -174,4 +173,19 @@ class MainDevice : public DeviceBase { bool needQueueBack(std::shared_ptr buffer); }; +// DOL_FEATURE_S +/** + * DolCaptureDevice is used for producing DOL HDR frames. + */ +class DolCaptureDevice : public DeviceBase { + public: + DolCaptureDevice(int cameraId, VideoNodeType nodeType); + ~DolCaptureDevice(); + + private: + int createBufferPool(const stream_t& config); + int onDequeueBuffer(std::shared_ptr buffer); + bool needQueueBack(std::shared_ptr buffer); +}; +// DOL_FEATURE_E } // namespace icamera diff --git a/src/core/FileSource.cpp b/src/core/FileSource.cpp new file mode 100644 index 00000000..003faa3e --- /dev/null +++ b/src/core/FileSource.cpp @@ -0,0 +1,645 @@ +/* + * Copyright (C) 2017-2022 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG FileSource + +#include "FileSource.h" + +#include +#include +#include +#include + +#include +#include +#include + +#include "PlatformData.h" +#include "iutils/CameraLog.h" +#include "iutils/Utils.h" + +using std::map; +using std::shared_ptr; +using std::string; +using std::vector; + +namespace icamera { + +FileSource::FileSource(int cameraId) + : StreamSource(V4L2_MEMORY_USERPTR), + mCameraId(cameraId), + mExitPending(false), + mFps(30.0), + mSequence(-1), + mOutputPort(INVALID_PORT) { + LOG1("%s: FileSource is created for debugging.", __func__); + + const char* injectedFile = PlatformData::getInjectedFile(); + + // Pnp test mode, the inject file may invalid + if (injectedFile) { + // Check if a xml config file is used or use frame file directly or use injection path. + struct stat statBuf; + if (injectedFile && stat(injectedFile, &statBuf) == 0) { + mInjectedFile = std::string(injectedFile); + } + LOG1("@%s, Injected file path: %s", __func__, mInjectedFile.c_str()); + + string suffix = ".xml"; + size_t fullSize = mInjectedFile.size(); + size_t suffixSize = suffix.size(); + + // If mInjectedFile is ended with ".xml", it means we're using config file mode. + // If mInjectedFile is a directory, it means we're using injection path. + // If mInjectedFile is a frame file name, it means we're using frame file. + if ((fullSize > suffixSize) && + (mInjectedFile.compare(fullSize - suffixSize, suffixSize, suffix) == 0)) { + mInjectionWay = USING_CONFIG_FILE; + } else if (S_ISDIR(statBuf.st_mode)) { + mInjectionWay = USING_INJECTION_PATH; + } else { + mInjectionWay = USING_FRAME_FILE; + } + } + + CLEAR(mStreamConfig); + + mProduceThread = new ProduceThread(this); +} + +FileSource::~FileSource() { + delete mProduceThread; +} + +int FileSource::init() { + return OK; +} + +void FileSource::deinit() {} + +int FileSource::configure(const map& outputFrames, + const vector& configModes) { + CheckAndLogError(outputFrames.size() != 1, BAD_VALUE, "Support one port of input only."); + + mOutputPort = outputFrames.begin()->first; + mStreamConfig = outputFrames.begin()->second; + LOG1("%s, w:%d, h:%d, f:%s", mCameraId, __func__, mStreamConfig.width, + mStreamConfig.height, CameraUtils::format2string(mStreamConfig.format).c_str()); + return OK; +} + +int FileSource::allocateSourceBuffer() { + int fmt = mStreamConfig.format; + int width = mStreamConfig.width; + int height = mStreamConfig.height; + // Get frame size with aligned height taking in count for internal buffers. + uint32_t size = CameraUtils::getFrameSize(fmt, width, height, true); + map frameFileName; + if (mInjectionWay == USING_CONFIG_FILE) { + FileSourceProfile profile(mInjectedFile); + int ret = profile.getFrameFiles(mCameraId, frameFileName); + CheckAndLogError(ret != OK, BAD_VALUE, "Cannot find the frame files"); + for (const auto& item : frameFileName) + frameFileName[item.first] = profile.getFrameFile(mCameraId, item.first); + } else if (mInjectionWay == USING_INJECTION_PATH) { + int ret = access(mInjectedFile.c_str(), 0); + CheckAndLogError(ret != OK, BAD_VALUE, "Cannot access: %s", mInjectedFile.c_str()); + FileSourceFromDir fSource(mInjectedFile); + ret = fSource.getInjectionFileInfo(&frameFileName); + CheckAndLogError(ret != OK, BAD_VALUE, "Cannot find the frame files"); + } else if (mInjectionWay == USING_FRAME_FILE) { + frameFileName[0] = mInjectedFile; + } else { + CheckAndLogError( + (mInjectionWay < USING_FRAME_FILE || mInjectionWay >= UNKNOWN_INJECTED_WAY), BAD_VALUE, + "Invalid Injected Way"); + } + + for (const auto& item : frameFileName) { + string fileName = item.second; + // Prepare the buffers to read the files for frame + shared_ptr buf = CameraBuffer::create( + mCameraId, BUFFER_USAGE_GENERAL, V4L2_MEMORY_USERPTR, size, 0, fmt, width, height); + CheckAndLogError(!buf, BAD_VALUE, "@%s: Allocate producer buffer failed", __func__); + fillFrameBuffer(fileName, buf); + mFrameFileBuffers[fileName] = buf; + } + return OK; +} + +int FileSource::start() { + LOG1("%s", __func__); + + AutoMutex l(mLock); + + allocateSourceBuffer(); + mSequence = -1; + mExitPending = false; + mProduceThread->run("FileSource", PRIORITY_URGENT_AUDIO); + + return OK; +} + +int FileSource::stop() { + LOG1("%s", __func__); + + { + AutoMutex l(mLock); + mExitPending = true; + mProduceThread->requestExit(); + mBufferSignal.signal(); + } + + mProduceThread->requestExitAndWait(); + mFrameFileBuffers.clear(); + + while (mBufferQueue.size() > 0) { + mBufferQueue.pop(); + } + + return OK; +} + +int FileSource::qbuf(Port port, const shared_ptr& camBuffer) { + CheckAndLogError(!camBuffer, BAD_VALUE, "Camera buffer is null"); + + AutoMutex l(mLock); + + bool needSignal = mBufferQueue.empty(); + mBufferQueue.push(camBuffer); + if (needSignal) { + mBufferSignal.signal(); + } + + return OK; +} + +/** + * The thread loop function that's used to produce frame buffers regularly. + */ +bool FileSource::produce() { + LOG2("%s", __func__); + + mSequence++; + struct timespec start, end; + clock_gettime(CLOCK_MONOTONIC, &start); + + static const nsecs_t kWaitDuration = 40000000000; // 40s + shared_ptr qBuffer; + + { + // Find a buffer which needs to be filled. + ConditionLock lock(mLock); + while (mBufferQueue.empty()) { + if (mExitPending) { + return false; + } + int ret = mBufferSignal.waitRelative(lock, kWaitDuration); + if (mExitPending || ret == TIMED_OUT) { + return false; + } + } + + qBuffer = mBufferQueue.front(); + mBufferQueue.pop(); + } + + notifySofEvent(); + + fillFrameBuffer(qBuffer); + + clock_gettime(CLOCK_MONOTONIC, &end); + long seconds = end.tv_sec - start.tv_sec; + long nSeconds = end.tv_nsec - start.tv_nsec; + // Check how long to sleep to meet the specified FPS requirement. + long sleepTime = static_cast(1000000.0 / mFps) - (seconds * 1000000 + nSeconds / 1000); + LOG2("Need to sleep: %ld us", sleepTime); + // No need sleep if it takes too long to prepare the buffer. + if (sleepTime > 0) { + usleep(sleepTime); + } + + struct timespec stampTime; + clock_gettime(CLOCK_MONOTONIC, &stampTime); + + timeval stamp; + stamp.tv_sec = stampTime.tv_sec; + stamp.tv_usec = stampTime.tv_nsec / 1000; + + qBuffer->setSequence(mSequence); + qBuffer->setTimestamp(stamp); + + notifyFrame(qBuffer); + + return !mExitPending; +} + +void FileSource::fillFrameBuffer(string fileName, shared_ptr& buffer) { + CheckAndLogError(fileName.empty(), VOID_VALUE, "Invalid frame file."); + LOG2("Read frame from frame file:%s", fileName.c_str()); + + std::ifstream file(fileName.c_str(), std::ios::in | std::ios::binary | std::ios::ate); + CheckAndLogError(!file.is_open(), VOID_VALUE, "Cannot open frame file:%s", fileName.c_str()); + + size_t fileSize = file.tellg(); + file.seekg(0, std::ios::beg); + + CheckWarningNoReturn(fileSize < buffer->getBufferSize(), + "The size of file:%s is less than buffer's requirement.", + fileName.c_str()); + file.read(reinterpret_cast(buffer->getBufferAddr()), + std::min(fileSize, (size_t)buffer->getBufferSize())); +} + +void FileSource::fillFrameBuffer(shared_ptr& buffer) { + string fileName; + + if (mInjectionWay == USING_CONFIG_FILE) { + FileSourceProfile profile(mInjectedFile); + fileName = profile.getFrameFile(mCameraId, mSequence); + mFps = profile.getFps(mCameraId); + } else if (mInjectionWay == USING_INJECTION_PATH) { + if (access(mInjectedFile.c_str(), 0) != 0) { + LOGE("Cannot access: %s for fillFrameBuffer", mInjectedFile.c_str()); + } + map frameFileName; + FileSourceFromDir fSource(mInjectedFile); + int ret = fSource.getInjectionFileInfo(&frameFileName); + if (ret != OK) { + LOGE("Cannot find the frame files for fillFrameBuffer"); + } + fileName = fSource.getFrameFile(frameFileName, mSequence); + } else if (mInjectionWay == USING_FRAME_FILE) { + fileName = mInjectedFile; + } else { + LOGE("Invalid Injected Way for fillFrameBuffer"); + } + + CheckAndLogError(fileName.empty(), VOID_VALUE, "Invalid frame file."); + LOG2("Frame uses frame file:%s, buffer %p", mSequence, fileName.c_str(), + buffer->getBufferAddr()); + + for (auto& item : mFrameFileBuffers) { + if (fileName.compare(item.first) == 0) { + MEMCPY_S((buffer->getBufferAddr()), buffer->getBufferSize(), + (item.second->getBufferAddr()), item.second->getBufferSize()); + return; + } + } + LOGE("Not find the framefile: %s", fileName.c_str()); +} + +void FileSource::notifyFrame(const shared_ptr& buffer) { + EventData frameData; + frameData.type = EVENT_ISYS_FRAME; + frameData.buffer = nullptr; + frameData.data.frame.sequence = mSequence; + frameData.data.frame.timestamp = buffer->getV4L2Buffer().Get()->timestamp; + notifyListeners(frameData); + + for (auto& consumer : mBufferConsumerList) { + consumer->onFrameAvailable(mOutputPort, buffer); + } +} + +void FileSource::notifySofEvent() { + timeval timestamp; + gettimeofday(×tamp, nullptr); + + EventDataSync syncData; + syncData.sequence = mSequence; + syncData.timestamp = timestamp; + EventData eventData; + eventData.type = EVENT_ISYS_SOF; + eventData.buffer = nullptr; + eventData.data.sync = syncData; + notifyListeners(eventData); +} + +void FileSource::addFrameAvailableListener(BufferConsumer* listener) { + AutoMutex l(mLock); + mBufferConsumerList.push_back(listener); +} + +void FileSource::removeFrameAvailableListener(BufferConsumer* listener) { + AutoMutex l(mLock); + for (auto it = mBufferConsumerList.begin(); it != mBufferConsumerList.end(); ++it) { + if ((*it) == listener) { + mBufferConsumerList.erase(it); + return; + } + } +} + +void FileSource::removeAllFrameAvailableListener() { + AutoMutex l(mLock); + mBufferConsumerList.clear(); +} + +void FileSource::registerListener(EventType eventType, EventListener* eventListener) { + EventSource::registerListener(eventType, eventListener); +} + +void FileSource::removeListener(EventType eventType, EventListener* eventListener) { + EventSource::removeListener(eventType, eventListener); +} + +FileSourceProfile::FileSourceProfile(string configFile) : mCurrentDataField(FIELD_INVALID) { + parseXmlFile(configFile); + mergeCommonConfig(); + + for (auto& item : mConfigs) { + // The first frame, that is the frame for sequence 0 MUST be provided. + if (item.second.mFrameFiles.find(0) == item.second.mFrameFiles.end()) { + LOGE("Sensor:%s, frame file for sequence 0 MUST be provided", item.first.c_str()); + } + } +} + +float FileSourceProfile::getFps(int cameraId) { + const char* sensorName = PlatformData::getSensorName(cameraId); + if (mConfigs.find(sensorName) != mConfigs.end()) { + return mConfigs[sensorName].mFps; + } + + return mCommon.mFps; +} + +int FileSourceProfile::getFrameFiles(int cameraId, map& framefiles) { + const char* sensorName = PlatformData::getSensorName(cameraId); + CheckAndLogError(mConfigs.find(sensorName) == mConfigs.end(), BAD_VALUE, + "Failed to find the sensor: %s.", sensorName); + + FileSourceConfig& config = mConfigs[sensorName]; + framefiles = config.mFrameFiles; + return OK; +} + +string FileSourceProfile::getFrameFile(int cameraId, int64_t sequence) { + const char* sensorName = PlatformData::getSensorName(cameraId); + CheckAndLogError(mConfigs.find(sensorName) == mConfigs.end(), "", + "Failed to find the sensor: %s.", sensorName); + + // Find the frame file which is the equal or most closest to the given sequence. + FileSourceConfig& config = mConfigs[sensorName]; + int64_t targetSequence = -1; + for (const auto& item : config.mFrameFiles) { + if (item.first == sequence) { + targetSequence = sequence; + break; + } + + if (item.first < sequence && item.first > targetSequence) { + targetSequence = item.first; + } + } + CheckAndLogError(targetSequence == -1, "", "Cannot find the frame file for sequence:%ld", + sequence); + + string fullName = config.mFrameDir + "/" + config.mFrameFiles[targetSequence]; + return fullName; +} + +/** + * Merge the common config into sensor specific configs. + */ +void FileSourceProfile::mergeCommonConfig() { + LOG2("Common fps:%f, frame dir:%s", mCommon.mFps, mCommon.mFrameDir.c_str()); + + for (auto& item : mConfigs) { + // If one item isn't set in a particular sensor, then we just fill it with common settings. + if (item.second.mFps == 0) { + item.second.mFps = mCommon.mFps; + } + if (item.second.mFrameDir.empty()) { + item.second.mFrameDir = mCommon.mFrameDir; + } + LOG2("Sensor:%s, fps:%f frame dir:%s", item.first.c_str(), item.second.mFps, + item.second.mFrameDir.c_str()); + + for (const auto& sequenceFile : item.second.mFrameFiles) { + LOG2("Sequence:%d -> frame file:%s", sequenceFile.first, sequenceFile.second.c_str()); + } + } +} + +/** + * This function will check which field that the parser parses to. + * + * The field is set to 3 types. + * FIELD_INVALID FIELD_COMMON FIELD_SENSOR + * + * \param name: The element's name. + * \param atts: The element's attribute. + */ +void FileSourceProfile::checkField(const char* name, const char** atts) { + LOG2("@%s, name:%s", __func__, name); + + if (strcmp(name, "FileSource") == 0) { + mCurrentDataField = FIELD_INVALID; + } else if (strcmp(name, "Sensor") == 0) { + mCurrentSensor = atts[1]; + mConfigs[mCurrentSensor] = FileSourceConfig(); + mCurrentDataField = FIELD_SENSOR; + } else if (strcmp(name, "Common") == 0) { + mCurrentDataField = FIELD_COMMON; + } else { + LOGE("@%s, name:%s, atts[0]:%s, xml format wrong", __func__, name, atts[0]); + } +} + +/** + * the callback function of the libexpat for handling of one element start + * + * When it comes to the start of one element. This function will be called. + * + * \param userData: the pointer we set by the function XML_SetUserData. + * \param name: the element's name. + */ +void FileSourceProfile::startElement(void* userData, const char* name, const char** atts) { + LOG2("@%s %s", __func__, name); + + FileSourceProfile* profile = reinterpret_cast(userData); + + switch (profile->mCurrentDataField) { + case FIELD_INVALID: + profile->checkField(name, atts); + break; + case FIELD_COMMON: + if (strcmp(name, "fps") == 0) { + profile->mCommon.mFps = std::stof(atts[1]); + } else if (strcmp(name, "frameDir") == 0) { + profile->mCommon.mFrameDir = atts[1]; + } + break; + case FIELD_SENSOR: { + FileSourceConfig& config = profile->mConfigs[profile->mCurrentSensor]; + if (strcmp(name, "fps") == 0) { + config.mFps = std::stof(atts[1]); + } else if (strcmp(name, "frameDir") == 0) { + config.mFrameDir = atts[1]; + } else if (strcmp(name, "frameFile") == 0) { + config.mFrameFiles[std::stoi(atts[1])] = atts[3]; + } + break; + } + default: + LOGE("Invalid field to handle"); + break; + } +} + +/** + * the callback function of the libexpat for handling of one element end + * + * When it comes to the end of one element. This function will be called. + * + * \param userData: the pointer we set by the function XML_SetUserData. + * \param name: the element's name. + */ +void FileSourceProfile::endElement(void* userData, const char* name) { + LOG2("@%s %s", __func__, name); + + FileSourceProfile* profile = reinterpret_cast(userData); + + if (strcmp(name, "Sensor") == 0) { + profile->mCurrentSensor = ""; + profile->mCurrentDataField = FIELD_INVALID; + } else if (strcmp(name, "Common") == 0) { + profile->mCurrentDataField = FIELD_INVALID; + } +} + +void FileSourceProfile::parseXmlFile(const string& xmlFile) { + LOG2("@%s, parsing profile: %s", __func__, xmlFile.c_str()); + + if (xmlFile.empty()) return; + + FILE* fp = fopen(xmlFile.c_str(), "r"); + CheckAndLogError(!fp, VOID_VALUE, "Can not open profile file %s", xmlFile.c_str()); + + XML_Parser parser = XML_ParserCreate(nullptr); + if (parser == nullptr) { + LOGE("Create XML parser failed."); + fclose(fp); + return; + } + + XML_SetUserData(parser, this); + XML_SetElementHandler(parser, startElement, endElement); + + static const int kBufSize = 1024; + char pTmpBuf[kBufSize]; + bool done = false; + + while (!done) { + int len = fread(pTmpBuf, 1, kBufSize, fp); + if (!len && ferror(fp)) { + clearerr(fp); + break; + } + done = len < kBufSize; + if (XML_Parse(parser, pTmpBuf, len, done) == XML_STATUS_ERROR) { + LOGE("@%s, XML_Parse error", __func__); + break; + } + } + + XML_ParserFree(parser); + fclose(fp); +} + +FileSourceFromDir::FileSourceFromDir(const string& injectionPath) : mInjectionPath(injectionPath) { + LOG1("%s: InjectionPath of FileSourceFromDir is %s.", __func__, mInjectionPath.c_str()); + struct dirent* fileDirent = nullptr; + struct stat statBuf; + + DIR* dirInfo = opendir(mInjectionPath.c_str()); + CheckAndLogError(!dirInfo, VOID_VALUE, "Invalid injection path: %s.", mInjectionPath.c_str()); + + while ((fileDirent = readdir(dirInfo))) { + if (strcmp(fileDirent->d_name, ".") == 0 || strcmp(fileDirent->d_name, "..") == 0) { + continue; + } + + if (stat(fileDirent->d_name, &statBuf) == 0 && S_ISDIR(statBuf.st_mode)) { + continue; + } + + mInjectionFiles.push_back(fileDirent->d_name); + } + + closedir(dirInfo); + + CheckAndLogError(!mInjectionFiles.size(), VOID_VALUE, "No Injection files"); + sort(mInjectionFiles.begin(), mInjectionFiles.end()); +} + +FileSourceFromDir::~FileSourceFromDir() {} + +int FileSourceFromDir::getInjectionFileInfo(map* frameFilesInfo) { + for (unsigned int seqId = 0; seqId < mInjectionFiles.size(); seqId++) { + if (mInjectionPath.back() == '/') { + string fullPath = mInjectionPath + mInjectionFiles[seqId]; + frameFilesInfo->insert(std::pair(seqId, fullPath)); + } else { + string fullPath = mInjectionPath + "/" + mInjectionFiles[seqId]; + frameFilesInfo->insert(std::pair(seqId, fullPath)); + } + } + + return OK; +} + +string FileSourceFromDir::getFrameFile(const map& frameFilesInfo, int64_t sequence) { + int64_t targetSequence = -1; + + for (const auto& item : frameFilesInfo) { + if (item.first == sequence) { + targetSequence = sequence; + break; + } + + if (item.first < sequence && item.first > targetSequence) { + targetSequence = item.first; + } + } + + CheckAndLogError(targetSequence == -1, "", "Cannot find the frame file for sequence:%ld", + sequence); + + return frameFilesInfo.at(targetSequence); +} + +void FileSourceFromDir::fillFrameBuffer(void* addr, size_t bufferSize, uint32_t sequence) { + if (mInjectionFiles.size() == 0 || !addr) return; + + uint32_t index = sequence % mInjectionFiles.size(); + string fileName; + if (mInjectionPath.back() == '/') { + fileName = mInjectionPath + mInjectionFiles[index]; + } else { + fileName = mInjectionPath + "/" + mInjectionFiles[index]; + } + std::ifstream file(fileName.c_str(), std::ios::in | std::ios::binary | std::ios::ate); + CheckAndLogError(!file.is_open(), VOID_VALUE, "Cannot open frame file:%s", fileName.c_str()); + + size_t fileSize = file.tellg(); + file.seekg(0, std::ios::beg); + file.read(reinterpret_cast(addr), std::min(fileSize, bufferSize)); +} + +} // end of namespace icamera diff --git a/src/core/FileSource.h b/src/core/FileSource.h new file mode 100644 index 00000000..e708cdaa --- /dev/null +++ b/src/core/FileSource.h @@ -0,0 +1,178 @@ +/* + * Copyright (C) 2017-2021 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "StreamSource.h" +#include "iutils/Thread.h" + +namespace icamera { + +/** + * \class FileSource + * + * It's a buffer producer that's used to produce frame buffer via provided files + * instead of from real sensor. + * + * There are three working mode: + * 1. The first mode which only provides one same frame for all sequences. + * How to enable: export cameraInjectFile="FrameFileName" + * 2. The second mode which can configure which file is used for any sequence or FPS. + * How to enable: export cameraInjectFile="ConfigFileName.xml" + * The value of cameraInjectFile MUST be ended with ".xml". + * 3. The third mode which can inject files in sequence by specifying injection folder path. + * How to enable: export cameraInjectFile="Injection Folder" + * ("Injection Folder" is the specifyed injection folder path you want to run file injection) + */ +class FileSource : public StreamSource { + public: + explicit FileSource(int cameraId); + ~FileSource(); + + int init(); + void deinit(); + int configure(const std::map& outputFrames, + const std::vector& configModes); + int start(); + int stop(); + + virtual int qbuf(Port port, const std::shared_ptr& camBuffer); + + virtual void addFrameAvailableListener(BufferConsumer* listener); + virtual void removeFrameAvailableListener(BufferConsumer* listener); + void removeAllFrameAvailableListener(); + int allocateMemory(Port port, const std::shared_ptr& camBuffer) { return OK; } + + // Overwrite EventSource APIs to avoid calling its parent's implementation. + void registerListener(EventType eventType, EventListener* eventListener); + void removeListener(EventType eventType, EventListener* eventListener); + + private: + bool produce(); + int allocateSourceBuffer(); + void fillFrameBuffer(std::shared_ptr& buffer); + void fillFrameBuffer(std::string fileName, std::shared_ptr& buffer); + void notifyFrame(const std::shared_ptr& buffer); + void notifySofEvent(); + + private: + class ProduceThread : public Thread { + FileSource* mFileSrc; + + public: + explicit ProduceThread(FileSource* fileSource) : mFileSrc(fileSource) {} + + virtual bool threadLoop() { return mFileSrc->produce(); } + }; + + ProduceThread* mProduceThread; + int mCameraId; + bool mExitPending; + + float mFps; + int64_t mSequence; + std::string mInjectedFile; // The injected file can be a actual frame or a XML config file. + enum { + USING_FRAME_FILE = + 0, // If mInjectedFile is a frame file name, it means we're using frame file. + USING_CONFIG_FILE, // If mInjectedFile ends with ".xml", it means we're using config file. + USING_INJECTION_PATH, // If mInjectedFile is a directory, it means we're using injection + // path. + UNKNOWN_INJECTED_WAY // Error way + } mInjectionWay; + + stream_t mStreamConfig; + Port mOutputPort; + + std::vector mBufferConsumerList; + std::map> mFrameFileBuffers; + CameraBufQ mBufferQueue; + Condition mBufferSignal; + // Guard for FileSource Public API + Mutex mLock; +}; + +/** + * \class FileSourceProfile + * + * It's used to parse file source config file, and provide such fps and frame file name etc + * information for FileSource to use. + */ +class FileSourceProfile { + public: + explicit FileSourceProfile(std::string configFile); + ~FileSourceProfile() {} + + float getFps(int cameraId); + std::string getFrameFile(int cameraId, int64_t sequence); + int getFrameFiles(int cameraId, std::map& framefiles); + + static void startElement(void* userData, const char* name, const char** atts); + static void endElement(void* userData, const char* name); + + void checkField(const char* name, const char** atts); + void parseXmlFile(const std::string& xmlFile); + void mergeCommonConfig(); + + private: + struct CommonConfig { + CommonConfig() : mFps(30.0), mFrameDir(".") {} + float mFps; + std::string mFrameDir; + }; + + struct FileSourceConfig { + FileSourceConfig() : mFps(0) {} + float mFps; + std::string mFrameDir; + std::map mFrameFiles; + }; + + enum { + FIELD_INVALID = 0, + FIELD_SENSOR, + FIELD_COMMON, + } mCurrentDataField; + + std::string mCurrentSensor; + CommonConfig mCommon; + std::map mConfigs; + + private: + DISALLOW_COPY_AND_ASSIGN(FileSourceProfile); +}; + +/** + * \class FileSourceFromDir + * + * It's used to parse file source from injection file directory, and provide such frame file name + * etc information for FileSource to use. + */ +class FileSourceFromDir { + public: + explicit FileSourceFromDir(const std::string& injectionPath); + ~FileSourceFromDir(); + + int getInjectionFileInfo(std::map* frameFilesInfo); + std::string getFrameFile(const std::map& frameFilesInfo, int64_t sequence); + void fillFrameBuffer(void* addr, size_t bufferSize, uint32_t sequence); + + private: + std::string mInjectionPath; + std::vector mInjectionFiles; +}; + +} // namespace icamera diff --git a/src/core/IspParamAdaptor.cpp b/src/core/IspParamAdaptor.cpp index b87de175..d4bbe0aa 100644 --- a/src/core/IspParamAdaptor.cpp +++ b/src/core/IspParamAdaptor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,8 @@ IspParamAdaptor::IspParamAdaptor(int cameraId) mCameraId(cameraId), mTuningMode(TUNING_MODE_VIDEO), mIpuOutputFormat(V4L2_PIX_FMT_NV12), + mLastLscSequece(-1), + mLastGdcSequence(-1), mGraphConfig(nullptr), mIntelCca(nullptr), mGammaTmOffset(-1) { @@ -50,7 +52,8 @@ IspParamAdaptor::IspParamAdaptor(int cameraId) PalRecord palRecordArray[] = {{ia_pal_uuid_isp_call_info, -1}, {ia_pal_uuid_isp_bnlm_3_2, -1}, - {ia_pal_uuid_isp_lsc_1_1, -1}}; + {ia_pal_uuid_isp_lsc_1_1, -1}, + {ia_pal_uuid_isp_gdc5, -1}}; for (uint32_t i = 0; i < sizeof(palRecordArray) / sizeof(PalRecord); i++) { mPalRecords.push_back(palRecordArray[i]); } @@ -208,6 +211,8 @@ int IspParamAdaptor::configure(const stream_t& stream, ConfigMode configMode, Tu LOG2("%s, configMode: %x, PSys output format 0x%x", __func__, configMode, mIpuOutputFormat); mTuningMode = tuningMode; CLEAR(mLastPalDataForVideoPipe); + mLastLscSequece = -1; + mLastGdcSequence = -1; for (uint32_t i = 0; i < mPalRecords.size(); i++) { mPalRecords[i].offset = -1; } @@ -239,14 +244,18 @@ int IspParamAdaptor::configure(const stream_t& stream, ConfigMode configMode, Tu CheckAndLogError(ret != OK, ret, "%s, Failed to allocate isp parameter buffers", __func__); } - if (PlatformData::supportUpdateTuning()) { + if (PlatformData::supportUpdateTuning(mCameraId)) { for (auto& ispParamIt : mStreamIdToIspParameterMap) { int ispTuningIndex = mGraphConfig->getTuningModeByStreamId(ispParamIt.first); // Use the tuning mode in graph to update the isp tuning data if (ispTuningIndex != -1) { uint8_t lardTag = cca::CCA_LARD_ISP; - ia_lard_input_params lardParam = {}; - lardParam.isp_mode_index = ispTuningIndex; + ia_lard_input_params lardParam = { + IA_MKN_CHTOUL('D', 'F', 'L', 'T'), + IA_MKN_CHTOUL('D', 'F', 'L', 'T'), + static_cast(ispTuningIndex), + IA_MKN_CHTOUL('D', 'F', 'L', 'T') + }; cca::cca_nvm tmpNvm = {}; ia_err iaErr = @@ -269,6 +278,7 @@ int IspParamAdaptor::configure(const stream_t& stream, ConfigMode configMode, Tu inputParams->seq_id = -1; initInputParams(inputParams); inputParams->stream_id = ispParamIt.first; + inputParams->dvs_id = inputParams->stream_id; ia_isp_bxt_program_group* pgPtr = mGraphConfig->getProgramGroup(ispParamIt.first); CheckAndLogError(!pgPtr, UNKNOWN_ERROR, @@ -305,7 +315,7 @@ int IspParamAdaptor::configure(const stream_t& stream, ConfigMode configMode, Tu int IspParamAdaptor::decodeStatsData(TuningMode tuningMode, std::shared_ptr statsBuffer, - std::shared_ptr graphConfig) { + int32_t streamId) { CheckAndLogError(mIspAdaptorState != ISP_ADAPTOR_CONFIGURED, INVALID_OPERATION, "%s, wrong state %d", __func__, mIspAdaptorState); CheckAndLogError(!mIntelCca, UNKNOWN_ERROR, "%s, mIntelCca is nullptr", __func__); @@ -328,6 +338,7 @@ int IspParamAdaptor::decodeStatsData(TuningMode tuningMode, aiqStatistics->mTimestamp = TIMEVAL2USECS(statsBuffer->getTimestamp()); aiqStatistics->mTuningMode = tuningMode; aiqStatistics->mPendingDecode = false; + aiqStatistics->mStreamId = streamId; if (PlatformData::isStatsRunningRateSupport(mCameraId) && !outStats->get_rgbs_stats) { aiqStatistics->mPendingDecode = true; } @@ -343,6 +354,7 @@ int IspParamAdaptor::decodeStatsData(TuningMode tuningMode, bParam.mType = M_PSYS; bParam.sequence = statsBuffer->getSequence(); bParam.gParam.appendix = "p2p_decoded_stats"; + bParam.sUsage = (streamId == VIDEO_STREAM_ID) ? 0 : 2; CameraDump::dumpBinary(mCameraId, hwStatsData->data, hwStatsData->size, &bParam); } @@ -354,9 +366,6 @@ int IspParamAdaptor::decodeStatsData(TuningMode tuningMode, hwStatsData->size, bitmap, &queryResults, outStats); CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, "%s, Faield convert statistics", __func__); - LOG2("%s, query results: rgbs_grid(%d), af_grid(%d), dvs_stats(%d), paf_grid(%d)", __func__, - queryResults.rgbs_grid, queryResults.af_grid, queryResults.dvs_stats, - queryResults.paf_grid); return OK; } @@ -400,8 +409,12 @@ void IspParamAdaptor::updateKernelToggles(cca::cca_program_group* programGroup) * but currently a ring buffer is used in HAL, which caused logic mismatching issue. * So temporarily copy latest PAL data into PAL output buffer. */ -void IspParamAdaptor::updatePalDataForVideoPipe(ia_binary_data dest) { - if (mLastPalDataForVideoPipe.data == nullptr || mLastPalDataForVideoPipe.size == 0) return; +void IspParamAdaptor::updatePalDataForVideoPipe(ia_binary_data dest, int64_t bufSeq, + int64_t settingSeq) { + if (mLastPalDataForVideoPipe.data == nullptr || mLastPalDataForVideoPipe.size == 0) { + mLastGdcSequence = settingSeq; + return; + } if (mPalRecords.empty()) return; @@ -436,6 +449,26 @@ void IspParamAdaptor::updatePalDataForVideoPipe(ia_binary_data dest) { headerSrc = header; } + if (ia_pal_uuid_isp_lsc_1_1 == header->uuid) { + if (isLscCopy(bufSeq, settingSeq)) { + LOG2("settingSeq %ld, copy LSC for buf %ld", settingSeq, bufSeq); + updateLscSeqMap(bufSeq); + } else { + LOG2("settingSeq %ld, not copy LSC for buf %ld", settingSeq, bufSeq); + continue; + } + } + + if (ia_pal_uuid_isp_gdc5 == header->uuid) { + if (isGdcCopy(bufSeq, settingSeq)) { + LOG2("settingSeq %ld, copy GDC for buf %ld", settingSeq, bufSeq); + updateGdcSeqMap(bufSeq); + } else { + LOG2("settingSeq %ld, not copy GDC for buf %ld", settingSeq, bufSeq); + continue; + } + } + if (!headerSrc) { LOGW("Failed to find PAL recorder header %d", mPalRecords[i].uuid); continue; @@ -464,6 +497,60 @@ void IspParamAdaptor::updateIspParameterMap(IspParameter* ispParam, int64_t data ispParam->mSequenceToDataId[settingSeq] = dataSeq; } +bool IspParamAdaptor::isLscCopy(int64_t bufSeq, int64_t settingSeq) { + AiqResult* aiqResults = const_cast( + AiqResultStorage::getInstance(mCameraId)->getAiqResult(settingSeq)); + if (aiqResults == nullptr) return true; + + if (aiqResults->mLscUpdate) { + mLastLscSequece = settingSeq; + LOG2("%s, LSC update %ld", __func__, settingSeq); + return false; + } else { + if (mSeqIdToLscSeqIdMap.find(bufSeq) != mSeqIdToLscSeqIdMap.end()) { + if (mLastLscSequece >= 0 && mSeqIdToLscSeqIdMap[bufSeq] == mLastLscSequece) { + return false; + } + } + } + + return true; +} + +void IspParamAdaptor::updateLscSeqMap(int64_t settingSeq) { + mSeqIdToLscSeqIdMap[settingSeq] = mLastLscSequece; + + if (mSeqIdToLscSeqIdMap.size() > ISP_PARAM_QUEUE_SIZE) { + mSeqIdToLscSeqIdMap.erase(mSeqIdToLscSeqIdMap.begin()); + } +} + +bool IspParamAdaptor::isGdcCopy(int64_t bufSeq, int64_t settingSeq) { + if (!PlatformData::isDvsSupported(mCameraId)) return false; + + if (AiqResultStorage::getInstance(mCameraId)->isDvsRun(settingSeq)) { + mLastGdcSequence = settingSeq; + LOG2("%s, GDC update %ld", __func__, settingSeq); + return false; + } else { + if (mSeqIdToGdcSeqIdMap.find(bufSeq) != mSeqIdToGdcSeqIdMap.end()) { + if (mLastGdcSequence >= 0 && mSeqIdToGdcSeqIdMap[bufSeq] == mLastGdcSequence) { + return false; + } + } + } + + return true; +} + +void IspParamAdaptor::updateGdcSeqMap(int64_t settingSeq) { + mSeqIdToGdcSeqIdMap[settingSeq] = mLastGdcSequence; + + if (mSeqIdToGdcSeqIdMap.size() > ISP_PARAM_QUEUE_SIZE) { + mSeqIdToGdcSeqIdMap.erase(mSeqIdToGdcSeqIdMap.begin()); + } +} + /** * runIspAdapt * Convert the results of the 3A algorithms and parse with P2P. @@ -509,7 +596,7 @@ int IspParamAdaptor::runIspAdapt(const IspSettings* ispSettings, int64_t setting // Update some PAL data to latest PAL result if (it.first == VIDEO_STREAM_ID) { - updatePalDataForVideoPipe(binaryData); + updatePalDataForVideoPipe(binaryData, dataIt->first, settingSequence); } ia_isp_bxt_program_group* pgPtr = mGraphConfig->getProgramGroup(it.first); @@ -536,6 +623,8 @@ int IspParamAdaptor::runIspAdapt(const IspSettings* ispSettings, int64_t setting if (it.first == VIDEO_STREAM_ID) { mLastPalDataForVideoPipe = binaryData; updateResultFromAlgo(&binaryData, settingSequence); + updateLscSeqMap(settingSequence); + updateGdcSeqMap(settingSequence); } } } @@ -642,7 +731,6 @@ void IspParamAdaptor::applyMediaFormat(const AiqResult* aiqResult, ia_media_form bool* useLinearGamma) { CheckAndLogError(!mediaFormat || !aiqResult, VOID_VALUE, "mediaFormat or aiqResult is nullptr"); - *mediaFormat = media_format_legacy; if (aiqResult->mAiqParam.tonemapMode == TONEMAP_MODE_GAMMA_VALUE) { if (aiqResult->mAiqParam.tonemapGamma == 1.0) { *useLinearGamma = true; @@ -712,6 +800,7 @@ int IspParamAdaptor::runIspAdaptL(ia_isp_bxt_program_group* pgPtr, ia_isp_bxt_gd inputParams->seq_id = settingSequence; bool useLinearGamma = false; + inputParams->media_format = PlatformData::getMediaFormat(mCameraId); applyMediaFormat(aiqResults, &inputParams->media_format, &useLinearGamma); LOG2("%s, media format: 0x%x, gamma lut size: %d", __func__, inputParams->media_format, aiqResults->mGbceResults.gamma_lut_size); @@ -769,6 +858,7 @@ int IspParamAdaptor::runIspAdaptL(ia_isp_bxt_program_group* pgPtr, ia_isp_bxt_gd break; case ia_pal_uuid_isp_bxt_blc: case ia_pal_uuid_isp_b2i_sie_1_1: + case ia_pal_uuid_isp_gammatm_v3: if (aiqResults->mAiqParam.testPatternMode != TEST_PATTERN_OFF) { LOG2("%s: disable kernel(%d) in test pattern mode", __func__, inputParams->program_group.base.run_kernels[i].kernel_uuid); @@ -790,19 +880,24 @@ int IspParamAdaptor::runIspAdaptL(ia_isp_bxt_program_group* pgPtr, ia_isp_bxt_gd inputParams->stream_id = inputParams->program_group.base.run_kernels[0].stream_id; if (ispSettings) { - inputParams->nr_setting = ispSettings->nrSetting; - inputParams->ee_setting = ispSettings->eeSetting; + if (VIDEO_STREAM_ID == inputParams->stream_id) { + inputParams->nr_setting = ispSettings->nrSetting; + inputParams->ee_setting = ispSettings->eeSetting; + } else { + inputParams->nr_setting = ispSettings->nrStillSetting; + inputParams->ee_setting = ispSettings->eeStillSetting; + } LOG2("%s: ISP NR setting, level: %d, strength: %d", __func__, - static_cast(ispSettings->nrSetting.feature_level), - static_cast(ispSettings->nrSetting.strength)); + static_cast(inputParams->nr_setting.feature_level), + static_cast(inputParams->nr_setting.strength)); + LOG2("%s: ISP EE setting, level: %d, strength: %d", __func__, + inputParams->ee_setting.feature_level, inputParams->ee_setting.strength); inputParams->effects = ispSettings->effects; inputParams->manual_brightness = ispSettings->manualSettings.manualBrightness; inputParams->manual_contrast = ispSettings->manualSettings.manualContrast; inputParams->manual_hue = ispSettings->manualSettings.manualHue; inputParams->manual_saturation = ispSettings->manualSettings.manualSaturation; - LOG2("%s: ISP EE setting, level: %d, strength: %d", __func__, - ispSettings->eeSetting.feature_level, ispSettings->eeSetting.strength); if (ispSettings->palOverride) { CheckAndLogError(ispSettings->palOverride->size > cca::MAX_PAL_TUNING_SIZE, NO_MEMORY, @@ -848,7 +943,7 @@ int IspParamAdaptor::runIspAdaptL(ia_isp_bxt_program_group* pgPtr, ia_isp_bxt_gd } LOG2("%s: set digital gain for ULL pipe: %f", __func__, inputParams->manual_digital_gain); - } else if (CameraUtils::isMultiExposureCase(mCameraId, mTuningMode) && + } else if (PlatformData::isMultiExposureCase(mCameraId, mTuningMode) && PlatformData::getSensorGainType(mCameraId) == ISP_DG_AND_SENSOR_DIRECT_AG) { inputParams->manual_digital_gain = aiqResults->mAeResults.exposures[0].exposure[0].digital_gain; @@ -857,10 +952,17 @@ int IspParamAdaptor::runIspAdaptL(ia_isp_bxt_program_group* pgPtr, ia_isp_bxt_gd aiqResults->mAeResults.exposures[0].exposure[0].digital_gain); } + inputParams->dvs_id = streamId; ia_err iaErr = ia_err_none; { PERF_CAMERA_ATRACE_PARAM1_IMAGING("ia_isp_bxt_run", 1); + // HDR_FEATURE_S + if (PlatformData::getSensorAeEnable(mCameraId)) { + inputParams->gain_id_gaic = 1; + } + // HDR_FEATURE_E + iaErr = mIntelCca->runAIC(aiqResults->mFrameId, inputParams, binaryData); } CheckAndLogError(iaErr != ia_err_none && iaErr != ia_err_not_run, UNKNOWN_ERROR, @@ -917,7 +1019,7 @@ void IspParamAdaptor::updateResultFromAlgo(ia_binary_data* binaryData, int64_t s CheckAndLogError(tmSize < aiqResults->mGbceResults.tone_map_lut_size, VOID_VALUE, "memory is mismatch to store tone map from algo"); - LOG2("%s, Tonemap Curve. enable: %d, prog_shift: %d, table size: %zu", __func__, TM->enable, + LOG2("%s, Tonemap Curve. enable: %d, prog_shift: %d, table size: %u", __func__, TM->enable, TM->prog_shift, tmSize); const int shiftBase = 1 << TM->prog_shift; @@ -936,6 +1038,7 @@ void IspParamAdaptor::dumpIspParameter(int streamId, int64_t sequence, ia_binary bParam.mType = M_PSYS; bParam.sequence = sequence; bParam.gParam.appendix = ("pal_" + std::to_string(streamId)).c_str(); + bParam.sUsage = (streamId == VIDEO_STREAM_ID) ? 0 : 2; CameraDump::dumpBinary(mCameraId, binaryData.data, binaryData.size, &bParam); } diff --git a/src/core/IspParamAdaptor.h b/src/core/IspParamAdaptor.h index 6171f778..bc4bc920 100644 --- a/src/core/IspParamAdaptor.h +++ b/src/core/IspParamAdaptor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,6 +51,9 @@ extern "C" { #include "ia_isp_bxt_types.h" #include "ia_isp_bxt_statistics_types.h" #include "ia_isp_bxt.h" +// DOL_FEATURE_S +#include "ia_bcomp.h" +// DOL_FEATURE_E #include "ia_bcomp_types.h" #include "gc/IGraphConfigManager.h" #include "IspSettings.h" @@ -72,7 +75,7 @@ class IspParamAdaptor { int ipuOutputFormat = -1); int decodeStatsData(TuningMode tuningMode, std::shared_ptr statsBuffer, - std::shared_ptr graphConfig = nullptr); + int32_t streamId); int runIspAdapt(const IspSettings* ispSettings, int64_t settingSequence = -1, int32_t streamId = -1); @@ -89,7 +92,7 @@ class IspParamAdaptor { int initProgramGroupForAllStreams(ConfigMode configMode); void initInputParams(cca::cca_pal_input_params* params); - void updatePalDataForVideoPipe(ia_binary_data dest); + void updatePalDataForVideoPipe(ia_binary_data dest, int64_t bufSeq, int64_t settingSeq); struct IspParameter { /* @@ -124,6 +127,12 @@ class IspParamAdaptor { void updateResultFromAlgo(ia_binary_data* binaryData, int64_t sequence); uint32_t getRequestedStats(); + bool isLscCopy(int64_t bufSeq, int64_t settingSeq); + void updateLscSeqMap(int64_t settingSeq); + + bool isGdcCopy(int64_t bufSeq, int64_t settingSeq); + void updateGdcSeqMap(int64_t settingSeq); + private: enum IspAdaptorState { ISP_ADAPTOR_NOT_INIT, @@ -142,6 +151,13 @@ class IspParamAdaptor { static const int ISP_PARAM_QUEUE_SIZE = MAX_SETTING_COUNT; std::map mStreamIdToIspParameterMap; // map from stream id to IspParameter ia_binary_data mLastPalDataForVideoPipe; + + int64_t mLastLscSequece; + std::map mSeqIdToLscSeqIdMap; + + int64_t mLastGdcSequence; + std::map mSeqIdToGdcSeqIdMap; + // Guard lock for ipu parameter Mutex mIpuParamLock; std::unordered_map mStreamIdToPalInputParamsMap; diff --git a/src/core/IspSettings.h b/src/core/IspSettings.h index 98e42f5c..8a3f5880 100644 --- a/src/core/IspSettings.h +++ b/src/core/IspSettings.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2019 Intel Corporation. + * Copyright (C) 2018-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,10 +33,15 @@ struct IspImageEnhancement { struct IspSettings { ia_isp_feature_setting nrSetting; ia_isp_feature_setting eeSetting; + ia_isp_feature_setting nrStillSetting; + ia_isp_feature_setting eeStillSetting; ia_isp_effect effects; bool videoStabilization; IspImageEnhancement manualSettings; ia_binary_data* palOverride; + // DOL_FEATURE_S + short vbp; // Used for DOL camera + // DOL_FEATURE_E float zoom; camera_mount_type_t sensorMountType; IspSettings() { diff --git a/src/core/LensHw.cpp b/src/core/LensHw.cpp index 7d21bedc..8943f96b 100644 --- a/src/core/LensHw.cpp +++ b/src/core/LensHw.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2021 Intel Corporation + * Copyright (C) 2016-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,10 @@ #define LOG_TAG LensHw -#include "LensHw.h" +#include "src/core/LensHw.h" + +#include + #include "iutils/CameraLog.h" #include "V4l2DeviceFactory.h" #include "PlatformData.h" @@ -31,7 +34,7 @@ LensHw::LensHw(int cameraId) LensHw::~LensHw() {} -int LensHw::init() { +int LensHw::start() { std::string lensName = PlatformData::getLensName(mCameraId); if (lensName.empty()) { LOG1("@%s No HW Lens", mCameraId, __func__); @@ -51,6 +54,18 @@ int LensHw::init() { return OK; } +void LensHw::stop() { + if (!mLensSubdev) return; + + // close the lens sub device + std::string subDevName; + CameraUtils::getSubDeviceName(mLensName.c_str(), subDevName); + if (!subDevName.empty()) { + V4l2DeviceFactory::releaseSubDev(mCameraId, subDevName); + mLensSubdev = nullptr; + } +} + /** * focus with absolute value */ diff --git a/src/core/LensHw.h b/src/core/LensHw.h index eab0c166..b289b253 100644 --- a/src/core/LensHw.h +++ b/src/core/LensHw.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2021 Intel Corporation + * Copyright (C) 2016-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,8 @@ class LensHw { LensHw(int cameraId); ~LensHw(); - int init(); + int start(); + void stop(); const char* getLensName(void); diff --git a/src/core/PSysProcessor.cpp b/src/core/PSysProcessor.cpp index 9986d7f2..db616fd7 100644 --- a/src/core/PSysProcessor.cpp +++ b/src/core/PSysProcessor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2022 Intel Corporation. + * Copyright (C) 2017-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,8 +35,8 @@ * it's based on sensor vblank, psys iterating time * and thread scheduling */ -#define SOF_EVENT_MARGIN (5000000) // 5ms -#define SOF_EVENT_MAX_MARGIN (60000000) // 60ms +#define TRIGGER_MARGIN (5000000) // 5ms +#define TRIGGER_MAX_MARGIN (60000000) // 60ms #define EXTREME_STRENGTH_LEVEL4 (-120) #define EXTREME_STRENGTH_LEVEL3 (-60) @@ -50,6 +50,8 @@ namespace icamera { PSysProcessor::PSysProcessor(int cameraId, ParameterGenerator* pGenerator) : mCameraId(cameraId), mParameterGenerator(pGenerator), + mScheduler(nullptr), + mRunAicAfterQTask(false), mCurConfigMode(CAMERA_STREAM_CONFIGURATION_MODE_NORMAL), mTuningMode(TUNING_MODE_MAX), mRawPort(INVALID_PORT), @@ -60,11 +62,24 @@ PSysProcessor::PSysProcessor(int cameraId, ParameterGenerator* pGenerator) mStatus(PIPELINE_UNCREATED) { mProcessThread = new ProcessThread(this); CLEAR(mSofTimestamp); + + if (PlatformData::isSchedulerEnabled(mCameraId)) mScheduler = new CameraScheduler(); } PSysProcessor::~PSysProcessor() { mProcessThread->join(); delete mProcessThread; + + /* PipeExecutor is shared between Scheduler and PSysDAG, so need to delete Scheduler + * before delete PipeExecutor in PSysDAG. + */ + if (mScheduler) { + if (mPSysDAGs.find(mCurConfigMode) != mPSysDAGs.end()) { + mPSysDAGs[mCurConfigMode]->unregisterNode(); + } + delete mScheduler; + } + mPSysDAGs.clear(); } int PSysProcessor::configure(const std::vector& configModes) { @@ -78,6 +93,7 @@ int PSysProcessor::configure(const std::vector& configModes) { mHoldRawBuffers = false; mOpaqueRawPort = INVALID_PORT; mRawPort = INVALID_PORT; + mRunAicAfterQTask = false; std::map outputFrameInfo; stream_t stillStream = {}, videoStream = {}; @@ -98,11 +114,17 @@ int PSysProcessor::configure(const std::vector& configModes) { } // Hold raw for SDV case with GPU TNR enabled - if (PlatformData::isGpuTnrEnabled() && videoStream.width > 0 && stillStream.width > 0) { + if (PlatformData::isGpuTnrEnabled(mCameraId) && videoStream.width > 0 && + stillStream.width > 0) { // hold raw buffer for running TNR in still pipe mHoldRawBuffers = true; } + // Only enable psys bundle with aic when has video pipe only + if (stillStream.width <= 0 && PlatformData::psysBundleWithAic(mCameraId)) { + mRunAicAfterQTask = true; + } + int ret = OK; // Create PSysDAG according to real configure mode for (auto& cfg : mConfigModes) { @@ -115,7 +137,7 @@ int PSysProcessor::configure(const std::vector& configModes) { CheckAndLogError(ret != OK, ret, "%s: can't get config for mode %d", __func__, cfg); LOG1("%s, Create PSysDAG for ConfigMode %d", __func__, cfg); - unique_ptr pSysDAG = unique_ptr(new PSysDAG(mCameraId, this)); + unique_ptr pSysDAG = unique_ptr(new PSysDAG(mCameraId, mScheduler, this)); pSysDAG->setFrameInfo(mInputFrameInfo, outputFrameInfo); bool useTnrOutBuffer = mOpaqueRawPort != INVALID_PORT; @@ -144,6 +166,13 @@ int PSysProcessor::registerUserOutputBufs(Port port, const shared_ptrstopProcessing(); + } +} + int PSysProcessor::start() { PERF_CAMERA_ATRACE(); AutoMutex l(mBufferQueueLock); @@ -155,11 +184,20 @@ int PSysProcessor::start() { */ bool needProducerBuffer = PlatformData::isIsysEnabled(mCameraId); + // FILE_SOURCE_S + needProducerBuffer = needProducerBuffer || PlatformData::isFileSourceEnabled(); + // FILE_SOURCE_E + if (needProducerBuffer) { int ret = allocProducerBuffers(mCameraId, rawBufferNum); CheckAndLogError(ret != OK, NO_MEMORY, "Allocating producer buffer failed:%d", ret); } + { + AutoMutex lock(mBufferMapLock); + mRawBufferMap.clear(); + } + mThreadRunning = true; CLEAR(mSofTimestamp); mProcessThread->run("PsysProcessor", PRIORITY_NORMAL); @@ -282,6 +320,9 @@ int PSysProcessor::setParameters(const Parameters& param) { static_cast(mIspSettings.nrSetting.feature_level), static_cast(mIspSettings.nrSetting.strength)); + mIspSettings.nrStillSetting = mIspSettings.nrSetting; + mIspSettings.eeStillSetting = mIspSettings.eeSetting; + camera_video_stabilization_mode_t stabilizationMode; ret = param.getVideoStabilizationMode(stabilizationMode); if (ret == OK) { @@ -401,14 +442,28 @@ bool PSysProcessor::needSwitchPipe(int64_t sequence) { void PSysProcessor::handleEvent(EventData eventData) { // Process registered events switch (eventData.type) { + // CSI_META_S + case EVENT_META: + // DOL_FEATURE_S + if (PlatformData::needHandleVbpInMetaData(mCameraId, mCurConfigMode)) { + AutoMutex l(mMetaQueueLock); + mMetaQueue.push(eventData.data.meta); + LOG2("%s: received meta data, current queue size %lu", __func__, mMetaQueue.size()); + mMetaAvailableSignal.signal(); + } + // DOL_FEATURE_E + break; + // CSI_META_E case EVENT_ISYS_SOF: { AutoMutex l(mSofLock); mSofSequence = eventData.data.sync.sequence; - gettimeofday(&mSofTimestamp, nullptr); - LOG2("%s, received SOF event sequence: %ld, timestamp: %ld", __func__, - eventData.data.sync.sequence, TIMEVAL2USECS(mSofTimestamp)); - mSofCondition.signal(); + if (PlatformData::psysAlignWithSof(mCameraId)) { + gettimeofday(&mSofTimestamp, nullptr); + LOG2("%s, received SOF event sequence: %ld, timestamp: %ld", __func__, + eventData.data.sync.sequence, TIMEVAL2USECS(mSofTimestamp)); + mSofCondition.signal(); + } break; } default: @@ -417,14 +472,96 @@ void PSysProcessor::handleEvent(EventData eventData) { } } +// DOL_FEATURE_S +int PSysProcessor::setVbpToIspParam(int64_t sequence, timeval timestamp) { + // Check fixed VBP firstly. + int fixedVbp = PlatformData::getFixedVbp(mCameraId); + if (fixedVbp >= 0) { + AutoWMutex wl(mIspSettingsLock); + LOG2("%s: set fixed vbp %d", __func__, fixedVbp); + mIspSettings.vbp = fixedVbp; + return OK; + } + + // Check dynamic VBP. + ConditionLock lock(mMetaQueueLock); + + // Remove all older meta data + while (!mMetaQueue.empty() && mMetaQueue.front().sequence < sequence) { + LOG2("%s: remove older meta data for sequence %ld", __func__, mMetaQueue.front().sequence); + mMetaQueue.pop(); + } + + while (mMetaQueue.empty()) { + int ret = mMetaAvailableSignal.waitRelative(lock, kWaitDuration * SLOWLY_MULTIPLIER); + + if (!mThreadRunning) { + LOG2("@%s: Processor is not active while waiting for meta data.", __func__); + return UNKNOWN_ERROR; + } + + CheckAndLogError(ret == TIMED_OUT, ret, "@%s: dqbuf MetaQueue timed out", __func__); + } + + if (mMetaQueue.front().sequence == sequence) { + AutoWMutex l(mIspSettingsLock); + mIspSettings.vbp = mMetaQueue.front().vbp; + mMetaQueue.pop(); + LOG2("%s: found vbp %d for frame sequence %ld", __func__, mIspSettings.vbp, sequence); + return OK; + } + + LOGW("Missing meta data for seq %ld, timestamp %ld, Cur meta seq %ld, timestamp %ld", sequence, + TIMEVAL2USECS(timestamp), mMetaQueue.front().sequence, + TIMEVAL2USECS(mMetaQueue.front().timestamp)); + return UNKNOWN_ERROR; +} +// DOL_FEATURE_E + // PSysProcessor ThreadLoop int PSysProcessor::processNewFrame() { LOG2("@%s", mCameraId, __func__); CheckAndLogError(!mBufferProducer, INVALID_OPERATION, "No available producer"); int ret = OK; + int64_t inputSequence = -1; CameraBufferPortMap srcBuffers, dstBuffers; - if (!PlatformData::psysAlignWithSof(mCameraId)) { + if (mScheduler) { + { + ConditionLock lock(mBufferQueueLock); + // Wait input buffer, use TRIGGER_MAX_MARGIN to ensure Scheduler is triggered in time. + // Reduce wait time for the first 10 frames for better performance. + int64_t delay = mSofSequence < 10 ? TRIGGER_MARGIN : TRIGGER_MAX_MARGIN; + bool bufReady = waitBufferQueue(lock, mInputQueue, delay); + // Already stopped + if (!mThreadRunning) return -1; + + if (bufReady) { + waitFreeBuffersInQueue(lock, srcBuffers, dstBuffers, TRIGGER_MARGIN); + } + } + + if (!srcBuffers.empty() && !dstBuffers.empty()) { + inputSequence = srcBuffers.begin()->second->getSequence(); + ret = prepareTask(&srcBuffers, &dstBuffers); + CheckAndLogError(ret != OK, UNKNOWN_ERROR, "%s, Failed to process frame", __func__); + } else { + LOG2("@%s, No available buffers, in %lu, out %lu", mCameraId, __func__, + srcBuffers.size(), dstBuffers.size()); + } + + // Trigger when there are tasks (new or existing) + bool trigger = false; + { + AutoMutex l(mBufferQueueLock); + trigger = !mSequencesInflight.empty(); + } + if (trigger) { + std::string source; + mScheduler->executeNode(source, inputSequence); + } + prepareIpuForNextFrame(inputSequence); + } else if (!PlatformData::psysAlignWithSof(mCameraId)) { { ConditionLock lock(mBufferQueueLock); ret = waitFreeBuffersInQueue(lock, srcBuffers, dstBuffers); @@ -440,6 +577,8 @@ int PSysProcessor::processNewFrame() { ret = prepareTask(&srcBuffers, &dstBuffers); CheckAndLogError(ret != OK, UNKNOWN_ERROR, "%s, Failed to process frame", __func__); + inputSequence = srcBuffers.begin()->second->getSequence(); + prepareIpuForNextFrame(inputSequence); } else { timeval curTime; int64_t sofInterval = 0; @@ -449,9 +588,9 @@ int PSysProcessor::processNewFrame() { gettimeofday(&curTime, nullptr); sofInterval = TIMEVAL2NSECS(curTime) - TIMEVAL2NSECS(mSofTimestamp); // Wait next sof event when missing last one for a long time - if (sofInterval > SOF_EVENT_MARGIN && sofInterval < SOF_EVENT_MAX_MARGIN) { + if (sofInterval > TRIGGER_MARGIN && sofInterval < TRIGGER_MAX_MARGIN) { LOG2("%s, need to wait next sof event. sofInterval: %ld", __func__, sofInterval); - ret = mSofCondition.waitRelative(lock, SOF_EVENT_MAX_MARGIN * SLOWLY_MULTIPLIER); + ret = mSofCondition.waitRelative(lock, TRIGGER_MAX_MARGIN * SLOWLY_MULTIPLIER); // Already stopped if (!mThreadRunning) return -1; @@ -465,9 +604,9 @@ int PSysProcessor::processNewFrame() { } // push all the pending buffers to task - int64_t waitTime = SOF_EVENT_MARGIN; + int64_t waitTime = TRIGGER_MARGIN; // Don't need to catch sof for 1st frame or sof time out - if (TIMEVAL2NSECS(mSofTimestamp) == 0 || sofInterval >= SOF_EVENT_MAX_MARGIN) waitTime = 0; + if (TIMEVAL2NSECS(mSofTimestamp) == 0 || sofInterval >= TRIGGER_MAX_MARGIN) waitTime = 0; while (true) { { ConditionLock lock(mBufferQueueLock); @@ -482,12 +621,13 @@ int PSysProcessor::processNewFrame() { { AutoMutex l(mSofLock); - if (srcBuffers.begin()->second->getSequence() >= mSofSequence) { + inputSequence = srcBuffers.begin()->second->getSequence(); + if (inputSequence >= mSofSequence) { gettimeofday(&curTime, nullptr); sofInterval = TIMEVAL2NSECS(curTime) - TIMEVAL2NSECS(mSofTimestamp); // Handle the frame of sof(N) on sof(N + 1) when the sof event is continuously - if (sofInterval < SOF_EVENT_MAX_MARGIN) { + if (sofInterval < TRIGGER_MAX_MARGIN) { return OK; } LOG1("%s, sof event lost for long time, skip wating. sofInterval: %ld", @@ -497,12 +637,32 @@ int PSysProcessor::processNewFrame() { ret = prepareTask(&srcBuffers, &dstBuffers); CheckAndLogError(ret != OK, UNKNOWN_ERROR, "%s, Failed to process frame", __func__); + prepareIpuForNextFrame(inputSequence); } } return OK; } +void PSysProcessor::prepareIpuForNextFrame(int64_t sequence) { + { + AutoMutex l(mBufferQueueLock); + if (sequence < 0 || !mRunAicAfterQTask || + mSequencesInflight.find(sequence) == mSequencesInflight.end()) return; + } + + // HDR_FEATURE_S + if (mTuningMode == TUNING_MODE_VIDEO_HDR || mTuningMode == TUNING_MODE_VIDEO_HDR2) return; + // HDR_FEATURE_E + + int32_t userRequestId = -1; + // Check if next sequence is used or not + if (mParameterGenerator && + mParameterGenerator->getUserRequestId(sequence + 1, userRequestId) == OK) { + mPSysDAGs[mCurConfigMode]->prepareIpuParams((sequence + 1), false, nullptr, true); + } +} + void PSysProcessor::handleRawReprocessing(CameraBufferPortMap* srcBuffers, CameraBufferPortMap* dstBuffers, bool* allBufDone, bool* hasRawOutput, bool* hasRawInput) { @@ -537,12 +697,9 @@ void PSysProcessor::handleRawReprocessing(CameraBufferPortMap* srcBuffers, return; } - Parameters params; + raw_data_output_t rawDataOutput = CAMERA_RAW_DATA_OUTPUT_OFF; if (mParameterGenerator && - mParameterGenerator->getParameters(inputSequence, ¶ms, true, false) == OK) { - raw_data_output_t rawDataOutput = CAMERA_RAW_DATA_OUTPUT_OFF; - params.getRawDataOutput(rawDataOutput); - + mParameterGenerator->getRawOutputMode(inputSequence, rawDataOutput) == OK) { if (rawDataOutput == CAMERA_RAW_DATA_OUTPUT_ON) { uint32_t srcBufferSize = mainBuf->getBufferSize(); @@ -582,7 +739,7 @@ void PSysProcessor::handleRawReprocessing(CameraBufferPortMap* srcBuffers, sendPsysRequestEvent(dstBuffers, settingSequence, timestamp, EVENT_PSYS_REQUEST_BUF_READY); // only one video buffer is supported - if (PlatformData::isGpuTnrEnabled() && videoBuf.size() == 1) { + if (PlatformData::isGpuTnrEnabled(mCameraId) && videoBuf.size() == 1) { shared_ptr buf = videoBuf.begin()->second; bool handled = mPSysDAGs[mCurConfigMode]->fetchTnrOutBuffer(settingSequence, buf); if (handled) { @@ -711,6 +868,25 @@ status_t PSysProcessor::prepareTask(CameraBufferPortMap* srcBuffers, uint64_t timestamp = TIMEVAL2NSECS(mainBuf->getTimestamp()); LOG2("%s: input buffer sequence %ld timestamp %ld", __func__, inputSequence, timestamp); + // DOL_FEATURE_S + if (PlatformData::needSetVbp(mCameraId, mCurConfigMode)) { + int vbpStatus = setVbpToIspParam(inputSequence, mainBuf->getTimestamp()); + + // Skip input frame and return buffer if no matching vbp set to ISP params + if (vbpStatus != OK) { + AutoMutex l(mBufferQueueLock); + for (auto& input : mInputQueue) { + input.second.pop(); + } + + for (const auto& item : *srcBuffers) { + mBufferProducer->qbuf(item.first, item.second); + } + return OK; + } + } + // DOL_FEATURE_E + // Output raw image if (mRawPort != INVALID_PORT) { shared_ptr dstBuf = nullptr; @@ -758,7 +934,7 @@ status_t PSysProcessor::prepareTask(CameraBufferPortMap* srcBuffers, sendPsysRequestEvent(dstBuffers, settingSequence, timestamp, EVENT_PSYS_REQUEST_BUF_READY); } - if (PlatformData::isGpuTnrEnabled()) { + if (PlatformData::isGpuTnrEnabled(mCameraId)) { handleStillPipeForTnr(inputSequence, dstBuffers); } @@ -781,7 +957,6 @@ status_t PSysProcessor::prepareTask(CameraBufferPortMap* srcBuffers, mBufferProducer->qbuf(src.first, src.second); } } - return OK; } @@ -876,27 +1051,61 @@ void PSysProcessor::dispatchTask(CameraBufferPortMap& inBuf, CameraBufferPortMap taskParam.mOutputBuffers = outBuf; taskParam.mFakeTask = fakeTask; taskParam.mCallbackRgbs = callbackRgbs; - taskParam.mNextSeqUsed = false; int64_t settingSequence = getSettingSequence(outBuf); // Handle per-frame settings if output buffer requires if (settingSequence > -1 && mParameterGenerator) { Parameters params; - if (mParameterGenerator->getParameters(currentSequence, ¶ms, true, false) == OK) { + if (mParameterGenerator->getIspParameters(currentSequence, ¶ms) == OK) { setParameters(params); - // Dump raw image if makernote mode is MAKERNOTE_MODE_JPEG or fake task for IQ tune - camera_makernote_mode_t makernoteMode = MAKERNOTE_MODE_OFF; - int ret = params.getMakernoteMode(makernoteMode); - if (((ret == OK && makernoteMode == MAKERNOTE_MODE_JPEG) || fakeTask) && - CameraDump::isDumpTypeEnable(DUMP_JPEG_BUFFER)) { - CameraDump::dumpImage(mCameraId, inBuf[MAIN_PORT], M_PSYS, MAIN_PORT); + // Apply HAL tuning parameters + float hdrRatio = 0; + EdgeNrSetting edgeNrSetting; + CLEAR(edgeNrSetting); + + int ret = params.getHdrRatio(hdrRatio); + if (ret == OK) { + auto* res = AiqResultStorage::getInstance(mCameraId)->getAiqResult(currentSequence); + if (res != nullptr) { + auto exposure = res->mAeResults.exposures[0].exposure[0]; + float totalGain = exposure.analog_gain * exposure.digital_gain; + PlatformData::getEdgeNrSetting(mCameraId, totalGain, hdrRatio, mTuningMode, + edgeNrSetting); + mIspSettings.eeSetting.strength += edgeNrSetting.edgeStrength; + mIspSettings.nrSetting.strength += edgeNrSetting.nrStrength; + LOG2("edgeStrength %d, nrStrength %d", edgeNrSetting.edgeStrength, + edgeNrSetting.nrStrength); + + TuningMode stillMode = (mTuningMode == TUNING_MODE_VIDEO) ? + TUNING_MODE_STILL_CAPTURE : TUNING_MODE_VIDEO_ULL; + PlatformData::getEdgeNrSetting(mCameraId, totalGain, hdrRatio, stillMode, + edgeNrSetting); + mIspSettings.eeStillSetting.strength += edgeNrSetting.edgeStrength; + mIspSettings.nrStillSetting.strength += edgeNrSetting.nrStrength; + LOG2("Still edgeStrength %d, nrStrength %d", edgeNrSetting.edgeStrength, + edgeNrSetting.nrStrength); + } } - } - // Check if next sequence is used or not - if (mParameterGenerator->getUserRequestId(currentSequence + 1, userRequestId) == OK) { - taskParam.mNextSeqUsed = true; + bool hasStill = false; + for (const auto& item : outBuf) { + if (item.second && item.second->getStreamUsage() == CAMERA_STREAM_STILL_CAPTURE) { + hasStill = true; + break; + } + } + // Dump raw image if has STILL or fake task for IQ tune + if ((hasStill || fakeTask) && CameraDump::isDumpTypeEnable(DUMP_JPEG_BUFFER)) { + if (userRequestId >= 0) { + char desc[MAX_NAME_LEN]; + int len = snprintf(desc, (MAX_NAME_LEN - 1), "_req#%d", userRequestId); + desc[len] = '\0'; + CameraDump::dumpImage(mCameraId, inBuf[MAIN_PORT], M_PSYS, MAIN_PORT, desc); + } else { + CameraDump::dumpImage(mCameraId, inBuf[MAIN_PORT], M_PSYS, MAIN_PORT); + } + } } } { @@ -914,9 +1123,6 @@ void PSysProcessor::registerListener(EventType eventType, EventListener* eventLi // Only delegate stats event registration to deeper layer DAG and PipeExecutor if ((eventType != EVENT_PSYS_STATS_BUF_READY) && (eventType != EVENT_PSYS_STATS_SIS_BUF_READY) - // INTEL_DVS_S - && eventType != EVENT_DVS_READY - // INTEL_DVS_E ) { BufferQueue::registerListener(eventType, eventListener); return; @@ -994,7 +1200,7 @@ void PSysProcessor::sendPsysRequestEvent(const CameraBufferPortMap* dstBuffers, event.data.requestReady.timestamp = timestamp > 0 ? timestamp : output.second->getUserBuffer()->timestamp; event.data.requestReady.sequence = sequence; - event.data.requestReady.requestId = output.second->getUserBuffer()->requestId; + event.data.requestReady.requestId = output.second->getUserBuffer()->frameNumber; notifyListeners(event); break; @@ -1054,6 +1260,22 @@ void PSysProcessor::onStatsDone(int64_t sequence, const CameraBufferPortMap& out sendPsysRequestEvent(&outBuf, sequence, 0, EVENT_REQUEST_METADATA_READY); } +// INTEL_DVS_S +void PSysProcessor::onDvsPrepare(int64_t sequence, int32_t streamId) { + LOG2("%s stream Id %d", __func__, streamId); + + camera_zoom_region_t region; + if (mParameterGenerator && mParameterGenerator->getZoomRegion(sequence, region) == OK) { + EventData eventData; + eventData.type = EVENT_DVS_READY; + eventData.data.dvsRunReady.streamId = streamId; + eventData.data.dvsRunReady.sequence = sequence; + eventData.data.dvsRunReady.region = region; + notifyListeners(eventData); + } +} +// INTEL_DVS_E + void PSysProcessor::outputRawImage(shared_ptr& srcBuf, shared_ptr& dstBuf) { if ((srcBuf == nullptr) || (dstBuf == nullptr)) { @@ -1062,26 +1284,15 @@ void PSysProcessor::outputRawImage(shared_ptr& srcBuf, // Copy from source buffer int srcBufferSize = srcBuf->getBufferSize(); - int srcMemoryType = srcBuf->getMemory(); - void* pSrcBuf = (srcMemoryType == V4L2_MEMORY_DMABUF) ? - CameraBuffer::mapDmaBufferAddr(srcBuf->getFd(), srcBufferSize) : - srcBuf->getBufferAddr(); + ScopeMapping mapperSrc(srcBuf); + void* pSrcBuf = mapperSrc.getUserPtr(); int dstBufferSize = dstBuf->getBufferSize(); - int dstMemoryType = dstBuf->getMemory(); - void* pDstBuf = (dstMemoryType == V4L2_MEMORY_DMABUF) ? - CameraBuffer::mapDmaBufferAddr(dstBuf->getFd(), dstBufferSize) : - dstBuf->getBufferAddr(); + ScopeMapping mapperDst(dstBuf); + void* pDstBuf = mapperDst.getUserPtr(); MEMCPY_S(pDstBuf, dstBufferSize, pSrcBuf, srcBufferSize); - if (srcMemoryType == V4L2_MEMORY_DMABUF) { - CameraBuffer::unmapDmaBufferAddr(pSrcBuf, srcBufferSize); - } - if (dstMemoryType == V4L2_MEMORY_DMABUF) { - CameraBuffer::unmapDmaBufferAddr(pDstBuf, dstBufferSize); - } - // Send output buffer to its consumer for (auto& it : mBufferConsumerList) { it->onFrameAvailable(mRawPort, dstBuf); diff --git a/src/core/PSysProcessor.h b/src/core/PSysProcessor.h index 57def4e8..595485b8 100644 --- a/src/core/PSysProcessor.h +++ b/src/core/PSysProcessor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation. + * Copyright (C) 2017-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ #include "IspSettings.h" #include "psysprocessor/PSysDAG.h" +#include "CameraScheduler.h" namespace icamera { @@ -46,6 +47,7 @@ class PSysProcessor : public BufferQueue, public PSysDagCallback { virtual int getParameters(Parameters& param); virtual int registerUserOutputBufs(Port port, const std::shared_ptr& camBuffer); + virtual void stopProcessing(); // Overwrite event source API to delegate related functions void registerListener(EventType eventType, EventListener* eventListener); @@ -58,6 +60,9 @@ class PSysProcessor : public BufferQueue, public PSysDagCallback { void onFrameDone(const PSysTaskData& result); void onBufferDone(int64_t sequence, Port port, const std::shared_ptr& camBuffer); void onStatsDone(int64_t sequence, const CameraBufferPortMap& outBuf); +// INTEL_DVS_S + void onDvsPrepare(int64_t sequence, int32_t streamId); +// INTEL_DVS_E private: DISALLOW_COPY_AND_ASSIGN(PSysProcessor); @@ -66,11 +71,15 @@ class PSysProcessor : public BufferQueue, public PSysDagCallback { int processNewFrame(); std::shared_ptr allocStatsBuffer(int index); + void prepareIpuForNextFrame(int64_t sequence); status_t prepareTask(CameraBufferPortMap* srcBuffers, CameraBufferPortMap* dstBuffers); void dispatchTask(CameraBufferPortMap& inBuf, CameraBufferPortMap& outBuf, bool fakeTask = false, bool callbackRgbs = false); void handleEvent(EventData eventData); + // DOL_FEATURE_S + int setVbpToIspParam(int64_t sequence, timeval timestamp); + // DOL_FEATURE_E int64_t getSettingSequence(const CameraBufferPortMap& outBuf); bool needSkipOutputFrame(int64_t sequence); @@ -95,6 +104,8 @@ class PSysProcessor : public BufferQueue, public PSysDagCallback { int mCameraId; static const nsecs_t kWaitDuration = 1000000000; // 1000ms ParameterGenerator* mParameterGenerator; + CameraScheduler* mScheduler; + bool mRunAicAfterQTask; IspSettings mIspSettings; RWLock mIspSettingsLock; diff --git a/src/core/RequestThread.cpp b/src/core/RequestThread.cpp index 2c12859d..0719195d 100644 --- a/src/core/RequestThread.cpp +++ b/src/core/RequestThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,19 +41,21 @@ RequestThread::RequestThread(int cameraId, AiqUnitBase* a3AControl, ParameterGen mLastAppliedSeq(-1), mLastSofSeq(-1), mBlockRequest(true), - mSofEnabled(false) { + mSofEnabled(false), + mWaitFrameDurationOverride(0) { CLEAR(mFakeReqBuf); mPerframeControlSupport = PlatformData::isFeatureSupported(mCameraId, PER_FRAME_CONTROL); mSofEnabled = PlatformData::isIsysEnabled(cameraId); + // FILE_SOURCE_S + mSofEnabled = mSofEnabled || PlatformData::isFileSourceEnabled(); + // FILE_SOURCE_E + mWaitFrameDurationOverride = PlatformData::getReqWaitTimeout(cameraId); + LOG1("%s: Set mWaitFrameDurationOverride: %lld", __func__, mWaitFrameDurationOverride); } -RequestThread::~RequestThread() { - while (!mReqParamsPool.empty()) { - mReqParamsPool.pop(); - } -} +RequestThread::~RequestThread() {} void RequestThread::requestExit() { clearRequests(); @@ -142,7 +144,8 @@ bool RequestThread::blockRequest() { * 2. Too many requests in flight; * 3. if no trigger event is available. */ - return ((mBlockRequest && (mLastRequestId >= 0)) || + return ((mBlockRequest && + (mLastRequestId >= PlatformData::getInitialPendingFrame(mCameraId))) || (mRequestsInProcessing >= PlatformData::getMaxRequestsInflight(mCameraId)) || (mPerframeControlSupport && (mRequestTriggerEvent == NONE_EVENT))); } @@ -167,31 +170,27 @@ int RequestThread::processRequest(int bufferNum, camera_buffer_t** ubuffer, mBlockRequest = false; } - request.mParams = copyRequestParams(params); + request.mRequestParam = copyRequestParams(params); mPendingRequests.push_back(request); if (!mActive) { mActive = true; } - mRequestTriggerEvent |= NEW_REQUEST; - mRequestSignal.signal(); + if (mRequestsInProcessing == 0 || !mPerframeControlSupport) { + mRequestTriggerEvent |= NEW_REQUEST; + mRequestSignal.signal(); + } return OK; } -shared_ptr RequestThread::copyRequestParams(const Parameters* srcParams) { +shared_ptr RequestThread::copyRequestParams(const Parameters* srcParams) { if (srcParams == nullptr) return nullptr; - if (mReqParamsPool.empty()) { - shared_ptr sParams = std::make_shared(); - CheckAndLogError(!sParams, nullptr, "%s: no memory!", __func__); - mReqParamsPool.push(sParams); - } + std::shared_ptr requestParam = mParamGenerator->getRequestParamBuf(); - shared_ptr sParams = mReqParamsPool.front(); - mReqParamsPool.pop(); - *sParams = *srcParams; - return sParams; + requestParam->param = *srcParams; + return requestParam; } int RequestThread::waitFrame(int streamId, camera_buffer_t** ubuffer) { @@ -201,7 +200,8 @@ int RequestThread::waitFrame(int streamId, camera_buffer_t** ubuffer) { if (!mActive) return NO_INIT; while (frameQueue.mFrameQueue.empty()) { int ret = frameQueue.mFrameAvailableSignal.waitRelative( - lock, kWaitFrameDuration * SLOWLY_MULTIPLIER); + lock, (mWaitFrameDurationOverride > 0) ? mWaitFrameDurationOverride : + (kWaitFrameDuration * SLOWLY_MULTIPLIER)); if (!mActive) return NO_INIT; CheckWarning(ret == TIMED_OUT, ret, "@%s, time out happens, wait recovery", mCameraId, @@ -247,7 +247,7 @@ void RequestThread::handleEvent(EventData eventData) { mRequestsInProcessing--; } // Just in case too many requests are pending in mPendingRequests. - if (!mPendingRequests.empty()) { + if (!mPendingRequests.empty() && (mRequestsInProcessing == 0)) { mRequestTriggerEvent |= NEW_FRAME; mRequestSignal.signal(); } @@ -264,8 +264,10 @@ void RequestThread::handleEvent(EventData eventData) { case EVENT_ISYS_SOF: { AutoMutex l(mPendingReqLock); mLastSofSeq = eventData.data.sync.sequence; - mRequestTriggerEvent |= NEW_SOF; - mRequestSignal.signal(); + if (mLastSofSeq > mLastAppliedSeq) { + mRequestTriggerEvent |= NEW_SOF; + mRequestSignal.signal(); + } } break; case EVENT_FRAME_AVAILABLE: { if (eventData.buffer->getUserBuffer() != &mFakeReqBuf) { @@ -285,7 +287,7 @@ void RequestThread::handleEvent(EventData eventData) { AutoMutex l(mPendingReqLock); // Insert fake request if no any request in the HAL to keep 3A running if (mGet3AStatWithFakeRequest && eventData.buffer->getSequence() >= mLastEffectSeq && - mPendingRequests.empty()) { + mPendingRequests.empty() && (mRequestsInProcessing == 0)) { LOGW("No request, insert fake req after req %ld to keep 3A stats update", mLastRequestId); CameraRequest fakeRequest; @@ -327,9 +329,11 @@ bool RequestThread::threadLoop() { if (blockRequest()) { int ret = mRequestSignal.waitRelative(lock, kWaitDuration * SLOWLY_MULTIPLIER); - CheckWarning(ret == TIMED_OUT, true, - "wait event time out, %d requests processing, %zu requests in HAL", - mRequestsInProcessing, mPendingRequests.size()); + if (ret == TIMED_OUT) { + LOG2("wait event time out, %d requests processing, %zu requests in HAL", + mRequestsInProcessing, mPendingRequests.size()); + return true; + } if (blockRequest()) { LOG2("Pending request processing, mBlockRequest %d, Req in processing %d", @@ -389,8 +393,8 @@ void RequestThread::handleRequest(CameraRequest& request, int64_t applyingSeq) { // Raw reprocessing case, don't run 3A. if (request.mBuffer[0]->sequence >= 0 && request.mBuffer[0]->timestamp > 0) { effectSeq = request.mBuffer[0]->sequence; - if (request.mParams.get()) { - mParamGenerator->updateParameters(effectSeq, request.mParams.get()); + if (request.mRequestParam) { + mParamGenerator->updateParameters(effectSeq, &request.mRequestParam->param); } LOG2("%s: Reprocess request: seq %ld, out buffer %d", __func__, effectSeq, request.mBufferNum); @@ -400,8 +404,8 @@ void RequestThread::handleRequest(CameraRequest& request, int64_t applyingSeq) { AutoMutex l(mPendingReqLock); if (mActive) { requestId = ++mLastRequestId; - if (request.mParams.get()) { - m3AControl->setParameters(*request.mParams); + if (request.mRequestParam) { + m3AControl->setParameters(request.mRequestParam->param); } } } @@ -412,24 +416,18 @@ void RequestThread::handleRequest(CameraRequest& request, int64_t applyingSeq) { { AutoMutex l(mPendingReqLock); - if (!mActive) { - // Recycle params buffer for re-using - if (request.mParams) { - mReqParamsPool.push(request.mParams); - } - return; - } + if (!mActive) return; // Check the final prediction value from 3A if (effectSeq <= mLastEffectSeq) { LOG2("predict effectSeq %ld, last effect %ld", effectSeq, mLastEffectSeq); } - mParamGenerator->saveParameters(effectSeq, mLastRequestId, request.mParams.get()); + mParamGenerator->saveParameters(effectSeq, mLastRequestId, request.mRequestParam); mLastEffectSeq = effectSeq; LOG2("%s: Process request: %ld:%ld, out buffer %d, param? %s", __func__, mLastRequestId, - effectSeq, request.mBufferNum, request.mParams.get() ? "true" : "false"); + effectSeq, request.mBufferNum, request.mRequestParam.get() ? "true" : "false"); } } @@ -437,19 +435,17 @@ void RequestThread::handleRequest(CameraRequest& request, int64_t applyingSeq) { EventRequestData requestData; requestData.bufferNum = request.mBufferNum; requestData.buffer = request.mBuffer; - requestData.param = request.mParams.get(); + camera_test_pattern_mode_t testPatternMode = TEST_PATTERN_OFF; + if (request.mRequestParam) { + request.mRequestParam->param.getTestPatternMode(testPatternMode); + } + requestData.testPatternMode = testPatternMode; requestData.settingSeq = effectSeq; EventData eventData; eventData.type = EVENT_PROCESS_REQUEST; eventData.data.request = requestData; notifyListeners(eventData); - // Recycle params buffer for re-using - if (request.mParams) { - AutoMutex l(mPendingReqLock); - mReqParamsPool.push(request.mParams); - } - { AutoMutex l(mFirstRequestLock); if (mFirstRequest) { diff --git a/src/core/RequestThread.h b/src/core/RequestThread.h index ca27780a..466415a4 100644 --- a/src/core/RequestThread.h +++ b/src/core/RequestThread.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020 Intel Corporation. + * Copyright (C) 2016-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -77,14 +77,14 @@ class RequestThread : public Thread, public EventSource, public EventListener { std::shared_ptr mFakeBuffer; struct CameraRequest { - CameraRequest() : mBufferNum(0), mParams(nullptr) { CLEAR(mBuffer); } + CameraRequest() : mBufferNum(0), mRequestParam(nullptr) { CLEAR(mBuffer); } int mBufferNum; camera_buffer_t* mBuffer[MAX_STREAM_NUMBER]; - std::shared_ptr mParams; + std::shared_ptr mRequestParam; }; - std::shared_ptr copyRequestParams(const Parameters* params); + std::shared_ptr copyRequestParams(const Parameters* params); /** * \Fetch one request from pending request Q for processing. @@ -104,7 +104,6 @@ class RequestThread : public Thread, public EventSource, public EventListener { Mutex mPendingReqLock; Condition mRequestSignal; std::deque mPendingRequests; - std::queue > mReqParamsPool; int mRequestsInProcessing; // Guard for the first request. @@ -136,6 +135,7 @@ class RequestThread : public Thread, public EventSource, public EventListener { bool mBlockRequest; // Process the 2nd or 3th request after the 1st 3A event // to avoid unstable AWB at the beginning of stream on bool mSofEnabled; + int64_t mWaitFrameDurationOverride; }; } // namespace icamera diff --git a/src/core/SensorHwCtrl.cpp b/src/core/SensorHwCtrl.cpp index 3e4e35a1..b6d8ab28 100644 --- a/src/core/SensorHwCtrl.cpp +++ b/src/core/SensorHwCtrl.cpp @@ -19,6 +19,9 @@ #include #include #include +// CRL_MODULE_S +#include +// CRL_MODULE_E #include "PlatformData.h" #include "SensorHwCtrl.h" @@ -32,14 +35,35 @@ namespace icamera { SensorHwCtrl::SensorHwCtrl(int cameraId, V4L2Subdevice* pixelArraySubdev, V4L2Subdevice* sensorOutputSubdev) : mPixelArraySubdev(pixelArraySubdev), + // CRL_MODULE_S + mSensorOutputSubdev(sensorOutputSubdev), + // CRL_MODULE_E mCameraId(cameraId), mHorzBlank(0), mVertBlank(0), mCropWidth(0), mCropHeight(0), + // HDR_FEATURE_S + mWdrMode(0), + // HDR_FEATURE_E mCurFll(0), mCalculatingFrameDuration(true) { LOG1(" @%s", mCameraId, __func__); + // CRL_MODULE_S + /** + * Try to call V4L2_CID_LINE_LENGTH_PIXELS, if failed, it means llp can't + * be read directly from sensor. Then calculate it with HBlank. + * fll will be in the same case. + */ + if (mPixelArraySubdev) { + int llp = 0; + int status = mPixelArraySubdev->GetControl(V4L2_CID_LINE_LENGTH_PIXELS, &llp); + if (status == OK) { + LOG1("%s, some sensors can get llp directly, don't calculate it", __func__); + mCalculatingFrameDuration = false; + } + } + // CRL_MODULE_E } SensorHwCtrl* SensorHwCtrl::createSensorCtrl(int cameraId) { @@ -82,6 +106,20 @@ SensorHwCtrl* SensorHwCtrl::createSensorCtrl(int cameraId) { return sensorCtrl; } +// CRL_MODULE_S +int SensorHwCtrl::configure() { + // DOL_FEATURE_S + int rhs1 = PlatformData::getFixedVbp(mCameraId); // VBP is rhs1 register value + if (rhs1 >= 0) { // Fixed VBP enabled + LOG1("%s: set fixed VBP %d", __func__, rhs1); + int status = mPixelArraySubdev->SetControl(CRL_CID_EXPOSURE_RHS1, rhs1); + CheckAndLogError(status != OK, status, "%s failed to o set exposure RHS1.", __func__); + } + // DOL_FEATURE_E + return OK; +} +// CRL_MODULE_E + int SensorHwCtrl::getActivePixelArraySize(int& width, int& height, int& pixelCode) { HAL_TRACE_CALL(CAMERA_DEBUG_LOG_LEVEL2); CheckAndLogError(!mPixelArraySubdev, NO_INIT, "pixel array sub device is not set"); @@ -120,16 +158,198 @@ int SensorHwCtrl::setExposure(const vector& coarseExposures, CheckAndLogError((coarseExposures.empty() || fineExposures.empty()), BAD_VALUE, "No exposure data!"); + // CRL_MODULE_S + if (coarseExposures.size() > 1) { + // DOL_FEATURE_S + if (PlatformData::getSensorExposureType(mCameraId) == SENSOR_RELATIVE_MULTI_EXPOSURES) { + return setShutterAndReadoutTiming(coarseExposures, fineExposures); + } + // DOL_FEATURE_E + if (PlatformData::getSensorExposureType(mCameraId) == SENSOR_MULTI_EXPOSURES) { + return setMultiExposures(coarseExposures, fineExposures); + } else if (PlatformData::getSensorExposureType(mCameraId) == + SENSOR_DUAL_EXPOSURES_DCG_AND_VS) { + return setDualExposuresDCGAndVS(coarseExposures, fineExposures); + } + } + // CRL_MODULE_E + LOG2("%s coarseExposure=%d fineExposure=%d", __func__, coarseExposures[0], fineExposures[0]); LOG2("SENSORCTRLINFO: exposure_value=%d", coarseExposures[0]); return mPixelArraySubdev->SetControl(V4L2_CID_EXPOSURE, coarseExposures[0]); } +// CRL_MODULE_S +int SensorHwCtrl::setMultiExposures(const vector& coarseExposures, + const vector& fineExposures) { + int status = BAD_VALUE; + int shortExp = coarseExposures[0]; + int longExp = coarseExposures[1]; + + if (coarseExposures.size() > 2) { + LOG2("coarseExposure[0]=%d fineExposure[0]=%d", coarseExposures[0], fineExposures[0]); + // The first exposure is very short exposure if larger than 2 exposures. + status = mPixelArraySubdev->SetControl(CRL_CID_EXPOSURE_SHS2, coarseExposures[0]); + CheckAndLogError(status != OK, status, "failed to set exposure SHS2 %d.", + coarseExposures[0]); + + shortExp = coarseExposures[1]; + longExp = coarseExposures[2]; + + LOG2("SENSORCTRLINFO: exposure_long=%d", coarseExposures[2]); // long + LOG2("SENSORCTRLINFO: exposure_med=%d", coarseExposures[1]); // short + LOG2("SENSORCTRLINFO: exposure_short=%d", coarseExposures[0]); // very short + } + + LOG2("shortExp=%d longExp=%d", shortExp, longExp); + status = mPixelArraySubdev->SetControl(CRL_CID_EXPOSURE_SHS1, shortExp); + CheckAndLogError(status != OK, status, "failed to set exposure SHS1 %d.", shortExp); + + status = mPixelArraySubdev->SetControl(V4L2_CID_EXPOSURE, longExp); + CheckAndLogError(status != OK, status, "failed to set long exposure %d.", longExp); + LOG2("SENSORCTRLINFO: exposure_value=%d", longExp); + + return status; +} + +int SensorHwCtrl::setDualExposuresDCGAndVS(const vector& coarseExposures, + const vector& fineExposures) { + int status = BAD_VALUE; + int longExp = coarseExposures[1]; + + if (coarseExposures.size() > 2) { + LOG2("coarseExposure[0]=%d fineExposure[0]=%d", coarseExposures[0], fineExposures[0]); + // The first exposure is very short exposure for DCG + VS case. + status = mPixelArraySubdev->SetControl(CRL_CID_EXPOSURE_SHS1, coarseExposures[0]); + CheckAndLogError(status != OK, status, "failed to set exposure SHS1 %d.", + coarseExposures[0]); + + longExp = coarseExposures[2]; + LOG2("SENSORCTRLINFO: exposure_long=%d", coarseExposures[2]); // long + } + + status = mPixelArraySubdev->SetControl(V4L2_CID_EXPOSURE, longExp); + CheckAndLogError(status != OK, status, "failed to set long exposure %d.", longExp); + LOG2("SENSORCTRLINFO: exposure_value=%d", longExp); + + return status; +} + +// DOL_FEATURE_S +int SensorHwCtrl::setShutterAndReadoutTiming(const vector& coarseExposures, + const vector& fineExposures) { + // DOL sensor exposure setting + CheckAndLogError(!mSensorOutputSubdev, NO_INIT, "sensor output sub device is not set"); + + int width, height = 0; + int pixelCode = 0; + int status = mSensorOutputSubdev->GetPadFormat(SENSOR_OUTPUT_PAD, &width, &height, &pixelCode); + CheckAndLogError(status != OK, status, "%s failed to get sensor output resolution.", __func__); + LOG2("%s Sensor output width=%d height=%d", __func__, width, height); + + vector ExpRanges = PlatformData::getMultiExpRanges(mCameraId); + for (auto range : ExpRanges) { + if (range.Resolution.width == width && range.Resolution.height == height) { + int shs1, rhs1, shs2 = 0; + + if (coarseExposures.size() > 2) { + // LEF(coarseExposures[2]) = SHS3.max + SHS3.upperBound - SHS3 - OFFSET + int shs3 = range.SHS3.max + range.SHS3.upperBound - coarseExposures[2] - 1; + // SHS3 range [RHS2 + RHS2.upperBound ~ SHS3.max] + CheckWarning((shs3 < range.SHS3.min || shs3 > range.SHS3.max), NO_INIT, + "%s : SHS3 not match %d [%d ~ %d]", __func__, shs3, range.SHS3.min, + range.SHS3.max); + status = mPixelArraySubdev->SetControl(CRL_CID_EXPOSURE_SHS3, shs3); + CheckAndLogError(status != OK, status, "%s failed to set exposure SHS3.", __func__); + + // RHS2 range [SHS2 + upperBound ~ SHS3 - lowerBound] and should = min + n * step + int rhs2 = shs3 - range.RHS2.upperBound - + ((shs3 - range.RHS2.upperBound) % range.RHS2.step); + CheckWarning((rhs2 < range.RHS2.min || rhs2 > range.RHS2.max), NO_INIT, + "%s : RHS2 not match %d [%d ~ %d]", __func__, rhs2, range.RHS2.min, + range.RHS2.max); + status = mPixelArraySubdev->SetControl(CRL_CID_EXPOSURE_RHS2, rhs2); + CheckAndLogError(status != OK, status, "%s failed to set exposure RHS2.", __func__); + + // SEF2(coarseExposures[1]) = RHS2 - SHS2 - OFFSET + shs2 = rhs2 - coarseExposures[1] - 1; + } else { + // LEF(coarseExposures[2]) = FLL + SHS2.upperBound - SHS2 - OFFSET + shs2 = mCurFll + range.SHS2.upperBound - coarseExposures[1] - 1; + } + + // SHS2 range [RHS1 + RHS1.upperBound ~ SHS2.max] + CheckWarningNoReturn(shs2 < range.SHS2.min || shs2 > std::max(range.SHS2.max, mCurFll), + "%s : SHS2 not match %d [%d ~ %d]", __func__, shs2, range.SHS2.min, + std::max(range.SHS2.max, mCurFll)); + shs2 = CLIP(shs2, std::max(range.SHS2.max, mCurFll), range.SHS2.min); + status = mPixelArraySubdev->SetControl(CRL_CID_EXPOSURE_SHS2, shs2); + CheckAndLogError(status != OK, status, "%s failed to set exposure SHS2.", __func__); + + // RHS1 range [SHS1 + upperBound ~ SHS2 - lowerBound] and should = min + n * step + rhs1 = + shs2 - range.RHS1.upperBound - ((shs2 - range.RHS1.upperBound) % range.RHS1.step); + + // Set RHS1(VBP) when fixed VBP is not enabled + int fixedVbp = PlatformData::getFixedVbp(mCameraId); + if (fixedVbp < 0) { + CheckWarningNoReturn((rhs1 < range.RHS1.min || rhs1 > range.RHS1.max), + "%s : RHS1 not match %d [%d ~ %d]", __func__, rhs1, + range.RHS1.min, range.RHS1.max); + rhs1 = CLIP(rhs1, range.RHS1.max, range.RHS1.min); + // Set RHS1 if not using fixed VBP + LOG2("%s: set dynamic VBP %d", __func__, rhs1); + status = mPixelArraySubdev->SetControl(CRL_CID_EXPOSURE_RHS1, rhs1); + CheckAndLogError(status != OK, status, "%s failed to set exposure RHS1.", __func__); + } else { + // Use fixed VBP for RHS1 value + LOG2("%s: calculated RHS1 vs. fixed VBP [%d vs. %d], use fixed VBP for RHS1 value", + __func__, rhs1, fixedVbp); + rhs1 = fixedVbp; + CheckWarning((rhs1 < range.RHS1.min || rhs1 > range.RHS1.max), NO_INIT, + "%s : RHS1 not match %d [%d ~ %d]", __func__, rhs1, range.RHS1.min, + range.RHS1.max); + CheckWarning(((shs2 - range.RHS1.upperBound) % range.RHS1.step != 0), NO_INIT, + "%s: fixed VBP(RHS1) do not devided by RHS1 step", __func__); + } + + // SEF1(coarseExposures[0]) = RHS1 - SHS1 - OFFSET + shs1 = rhs1 - coarseExposures[0] - 1; + // SHS1 range [min ~ max] + CheckWarningNoReturn((shs1 < range.SHS1.min || shs1 > range.SHS1.max), + "%s : SHS1 not match %d [%d ~ %d]", __func__, shs1, range.SHS1.min, + range.SHS1.max); + shs1 = CLIP(shs1, range.SHS1.max, range.SHS1.min); + status = mPixelArraySubdev->SetControl(CRL_CID_EXPOSURE_SHS1, shs1); + CheckAndLogError(status != OK, status, "%s failed to set exposure SHS1.", __func__); + + LOG2("%s: set exposures done.", __func__); + return status; + } + } + + LOGE("%s No matching resolution for exposure range", __func__); + return NO_INIT; +} +// DOL_FEATURE_E +// CRL_MODULE_E + int SensorHwCtrl::setAnalogGains(const vector& analogGains) { HAL_TRACE_CALL(CAMERA_DEBUG_LOG_LEVEL2); CheckAndLogError(!mPixelArraySubdev, NO_INIT, "pixel array sub device is not set"); CheckAndLogError(analogGains.empty(), BAD_VALUE, "No analog gain data!"); + // CRL_MODULE_S + if (analogGains.size() > 1) { + if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_CONVERTION_AG) { + return setConversionGain(analogGains); + } else if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_DIRECT_AG) { + LOG2("sensor multi conversion gain"); + return setMultiAnalogGain(analogGains); + } + } + // CRL_MODULE_E + LOG2("%s analogGain=%d", __func__, analogGains[0]); int status = mPixelArraySubdev->SetControl(V4L2_CID_ANALOGUE_GAIN, analogGains[0]); CheckAndLogError(status != OK, status, "failed to set analog gain %d.", analogGains[0]); @@ -149,10 +369,101 @@ int SensorHwCtrl::setDigitalGains(const vector& digitalGains) { CheckAndLogError(!mPixelArraySubdev, NO_INIT, "pixel array sub device is not set"); CheckAndLogError(digitalGains.empty(), BAD_VALUE, "No digital gain data!"); + // CRL_MODULE_S + if (digitalGains.size() > 1) { + if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_CONVERTION_AG) { + return setMultiDigitalGain(digitalGains); + } else if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_DIRECT_AG) { + LOG2("sensor multi conversion gain"); + return setMultiDigitalGain(digitalGains); + } + } + + if (mWdrMode && PlatformData::getSensorGainType(mCameraId) == ISP_DG_AND_SENSOR_DIRECT_AG) { + LOG2("%s: WDR mode, skip sensor DG, all digital gain is passed to ISP", __func__); + } else if (PlatformData::isUsingSensorDigitalGain(mCameraId)) { + if (mPixelArraySubdev->SetControl(V4L2_CID_GAIN, digitalGains[0]) != OK) { + LOGW("set digital gain failed"); + } + } + // CRL_MODULE_E + LOG2("%s digitalGain=%d", __func__, digitalGains[0]); return mPixelArraySubdev->SetControl(V4L2_CID_DIGITAL_GAIN, digitalGains[0]); } +// CRL_MODULE_S +int SensorHwCtrl::setMultiDigitalGain(const vector& digitalGains) { + int status = BAD_VALUE; + int shortDg = digitalGains[0]; + int longDg = digitalGains[1]; + + if (digitalGains.size() > 2) { + LOG2("digitalGains[0]=%d", digitalGains[0]); + status = mPixelArraySubdev->SetControl(CRL_CID_DIGITAL_GAIN_VS, digitalGains[0]); + CheckAndLogError(status != OK, status, "failed to set very short DG %d.", digitalGains[0]); + + shortDg = digitalGains[1]; + longDg = digitalGains[2]; + } + + LOG2("shortDg=%d longDg=%d", shortDg, longDg); + status = mPixelArraySubdev->SetControl(CRL_CID_DIGITAL_GAIN_S, shortDg); + CheckAndLogError(status != OK, status, "failed to set short DG %d.", shortDg); + + status = mPixelArraySubdev->SetControl(V4L2_CID_GAIN, longDg); + CheckAndLogError(status != OK, status, "failed to set long DG %d.", longDg); + + return status; +} + +int SensorHwCtrl::setMultiAnalogGain(const vector& analogGains) { + int status = BAD_VALUE; + int shortAg = analogGains[0]; + int longAg = analogGains[1]; + + if (analogGains.size() > 2) { + LOG2("VS AG %d", analogGains[0]); + int status = mPixelArraySubdev->SetControl(CRL_CID_ANALOG_GAIN_VS, analogGains[0]); + CheckAndLogError(status != OK, status, "failed to set VS AG %d", analogGains[0]); + + shortAg = analogGains[1]; + longAg = analogGains[2]; + + LOG2("SENSORCTRLINFO: gain_long=%d", analogGains[2]); // long + LOG2("SENSORCTRLINFO: gain_med=%d", analogGains[1]); // short + LOG2("SENSORCTRLINFO: gain_short=%d", analogGains[0]); // very short + } + + LOG2("shortAg=%d longAg=%d", shortAg, longAg); + status = mPixelArraySubdev->SetControl(CRL_CID_ANALOG_GAIN_S, shortAg); + CheckAndLogError(status != OK, status, "failed to set short AG %d.", shortAg); + + status = mPixelArraySubdev->SetControl(V4L2_CID_ANALOGUE_GAIN, longAg); + CheckAndLogError(status != OK, status, "failed to set long AG %d.", longAg); + + return status; +} + +int SensorHwCtrl::setConversionGain(const vector& analogGains) { + CheckAndLogError(analogGains.size() < 2, BAD_VALUE, "Gain data error!"); + + /* [0, 1] bits are long AG, [2, 3] bits are short AG, [4, 5] bits are very short AG. + [6] bit is long conversion gain, [7] bit is very short conversion gain. + Long AG: 0x0X0000XX + Short AG: 0x0000XX00 + Very Short AG: 0xX0XX0000 */ + int value = analogGains[0] | analogGains[1] | analogGains[2]; + LOG2("very short AG %d, short AG %d, long AG %d, conversion value %d", analogGains[0], + analogGains[1], analogGains[2], value); + + int status = mPixelArraySubdev->SetControl(V4L2_CID_ANALOGUE_GAIN, value); + CheckAndLogError(status != OK, status, "failed to set AG %d", value); + + return OK; +} +// CRL_MODULE_E + int SensorHwCtrl::setLineLengthPixels(int llp) { int status = OK; LOG2("@%s, llp:%d", __func__, llp); @@ -162,6 +473,10 @@ int SensorHwCtrl::setLineLengthPixels(int llp) { if (mHorzBlank != horzBlank) { status = mPixelArraySubdev->SetControl(V4L2_CID_HBLANK, horzBlank); } + // CRL_MODULE_S + } else { + status = mPixelArraySubdev->SetControl(V4L2_CID_LINE_LENGTH_PIXELS, llp); + // CRL_MODULE_E } CheckAndLogError(status != OK, status, "failed to set llp."); @@ -179,6 +494,10 @@ int SensorHwCtrl::setFrameLengthLines(int fll) { if (mVertBlank != vertBlank) { status = mPixelArraySubdev->SetControl(V4L2_CID_VBLANK, vertBlank); } + // CRL_MODULE_S + } else { + status = mPixelArraySubdev->SetControl(V4L2_CID_FRAME_LENGTH_LINES, fll); + // CRL_MODULE_E } mCurFll = fll; @@ -218,6 +537,13 @@ int SensorHwCtrl::getLineLengthPixels(int& llp) { mHorzBlank = horzBlank; llp = horzBlank + mCropWidth; } + // CRL_MODULE_S + } else { + status = mPixelArraySubdev->GetControl(V4L2_CID_LINE_LENGTH_PIXELS, &llp); + if (status == OK) { + mHorzBlank = llp - mCropWidth; + } + // CRL_MODULE_E } LOG2("@%s, llp:%d", __func__, llp); @@ -236,6 +562,13 @@ int SensorHwCtrl::getFrameLengthLines(int& fll) { mVertBlank = vertBlank; fll = vertBlank + mCropHeight; } + // CRL_MODULE_S + } else { + status = mPixelArraySubdev->GetControl(V4L2_CID_FRAME_LENGTH_LINES, &fll); + if (status == OK) { + mVertBlank = fll - mCropHeight; + } + // CRL_MODULE_E } LOG2("@%s, fll:%d", __func__, fll); @@ -292,4 +625,70 @@ int SensorHwCtrl::getExposureRange(int& exposureMin, int& exposureMax, int& expo return status; } +// HDR_FEATURE_S +int SensorHwCtrl::setWdrMode(int mode) { + HAL_TRACE_CALL(CAMERA_DEBUG_LOG_LEVEL2); + CheckAndLogError(!mSensorOutputSubdev, NO_INIT, "sensor output sub device is not set"); + + LOG2("%s WDR Mode=%d", __func__, mode); + int ret = OK; + + mWdrMode = mode; + + if (PlatformData::getSensorExposureType(mCameraId) != SENSOR_RELATIVE_MULTI_EXPOSURES && + PlatformData::getSensorExposureType(mCameraId) != SENSOR_DUAL_EXPOSURES_DCG_AND_VS) { + LOG2("%s: set WDR mode", __func__); + ret = mSensorOutputSubdev->SetControl(V4L2_CID_WDR_MODE, mode); + } + + return ret; +} + +int SensorHwCtrl::setAWB(float r_per_g, float b_per_g) { + HAL_TRACE_CALL(CAMERA_DEBUG_LOG_LEVEL2); + CheckAndLogError(!mPixelArraySubdev, NO_INIT, "pixel array sub device is not set"); + + LOG2("%s set AWB r_per_g=%f, b_per_g=%f", __func__, r_per_g, b_per_g); + + int ret = mPixelArraySubdev->SetControl(V4L2_CID_RED_BALANCE, static_cast(r_per_g * 256)); + ret |= mPixelArraySubdev->SetControl(V4L2_CID_BLUE_BALANCE, static_cast(b_per_g * 256)); + + return ret; +} +// HDR_FEATURE_E + +// CRL_MODULE_S +int SensorHwCtrl::setFrameRate(float fps) { + HAL_TRACE_CALL(CAMERA_DEBUG_LOG_LEVEL2); + CheckAndLog1(!mSensorOutputSubdev, NO_INIT, "sensor output sub device is not set"); + + struct v4l2_queryctrl query; + CLEAR(query); + query.id = V4L2_CID_LINK_FREQ; + int status = mSensorOutputSubdev->QueryControl(&query); + CheckAndLogError(status != OK, status, "Couldn't get V4L2_CID_LINK_FREQ, status:%d", status); + + LOG2("@%s, query V4L2_CID_LINK_FREQ:, default_value:%d, maximum:%d, minimum:%d, step:%d", + __func__, query.default_value, query.maximum, query.minimum, query.step); + + int mode = 0; + if (query.maximum == query.minimum) { + mode = query.default_value; + } else { + /*********************************************************************************** + * WA: This heavily depends on sensor driver implementation, need to find a graceful + * solution. + * imx185: + * When fps larger than 30, should switch to high speed mode, currently only + * 0, 1, 2 are available. 0 means 720p 30fps, 1 means 2M 30fps, and 2 means 2M 60fps. + * imx290: + * 0 and 1 available, for 30 and higher FPS. + ***********************************************************************************/ + mode = (fps > 30) ? query.maximum : (query.maximum - 1); + } + LOG2("@%s, set V4L2_CID_LINK_FREQ to %d, fps %f", __func__, mode, fps); + return mSensorOutputSubdev->SetControl(V4L2_CID_LINK_FREQ, mode); +} +// CRL_MODULE_E + } // namespace icamera diff --git a/src/core/SensorHwCtrl.h b/src/core/SensorHwCtrl.h index 6b85e4a4..a4ef8122 100644 --- a/src/core/SensorHwCtrl.h +++ b/src/core/SensorHwCtrl.h @@ -38,6 +38,9 @@ class SensorHwCtrl { SensorHwCtrl(int cameraId, V4L2Subdevice* pixelArraySubdev, V4L2Subdevice* sensorOutputSubdev); virtual ~SensorHwCtrl() {} + // CRL_MODULE_S + virtual int configure(); + // CRL_MODULE_E virtual int setTestPatternMode(int32_t testPatternMode); virtual int getPixelRate(int& pixelRate); virtual int setExposure(const std::vector& coarseExposures, @@ -50,19 +53,70 @@ class SensorHwCtrl { virtual int getActivePixelArraySize(int& width, int& height, int& pixelCode); virtual int getExposureRange(int& exposureMin, int& exposureMax, int& exposureStep); + // HDR_FEATURE_S + /** + * Set WDR mode to sensor which is used to select WDR sensor settings or none-WDR settings. + * If 1 is set, WDR sensor settings will be used, + * while if 0 is set, none-WDR sensor settings will be used. + * + * \param[IN] mode: WDR mode + * + *\return OK if successfully. + */ + virtual int setWdrMode(int mode); + + /** + * Set awb result to sensor for bypass awb kernel. + * + * \param[IN] awb result: float r_per_g, float b_per_g + * + *\return OK if successfully. + */ + virtual int setAWB(float r_per_g, float b_per_g); + // HDR_FEATURE_E + + // CRL_MODULE_S + virtual int setFrameRate(float fps); + // CRL_MODULE_E private: int setLineLengthPixels(int llp); int getLineLengthPixels(int& llp); int setFrameLengthLines(int fll); int getFrameLengthLines(int& fll); + // CRL_MODULE_S + int setMultiExposures(const std::vector& coarseExposures, + const std::vector& fineExposures); + int setDualExposuresDCGAndVS(const std::vector& coarseExposures, + const std::vector& fineExposures); + // DOL_FEATURE_S + int setShutterAndReadoutTiming(const std::vector& coarseExposures, + const std::vector& fineExposures); + // DOL_FEATURE_E + int setConversionGain(const std::vector& analogGains); + int setMultiDigitalGain(const std::vector& digitalGains); + int setMultiAnalogGain(const std::vector& analogGains); + // CRL_MODULE_E + + // DOL_FEATURE_S + // DOL sensor sink pad + static const int SENSOR_OUTPUT_PAD = 1; + // DOL_FEATURE_E + V4L2Subdevice* mPixelArraySubdev; + // CRL_MODULE_S + V4L2Subdevice* mSensorOutputSubdev; + // CRL_MODULE_E int mCameraId; int mHorzBlank; int mVertBlank; int mCropWidth; int mCropHeight; + // HDR_FEATURE_S + int mWdrMode; + // HDR_FEATURE_E + // Current frame length lines int mCurFll; @@ -95,6 +149,12 @@ class DummySensor : public SensorHwCtrl { int getVBlank(int& vblank) { return OK; } int getActivePixelArraySize(int& width, int& height, int& code) { return OK; } int getExposureRange(int& exposureMin, int& exposureMax, int& exposureStep) { return OK; } + // HDR_FEATURE_S + int setWdrMode(int mode) { return OK; } + // HDR_FEATURE_E + // CRL_MODULE_S + int setFrameRate(float fps) { return OK; } + // CRL_MODULE_E }; } // namespace icamera diff --git a/src/core/SofSource.cpp b/src/core/SofSource.cpp index 61d48b16..73518167 100644 --- a/src/core/SofSource.cpp +++ b/src/core/SofSource.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,12 @@ #include "SofSource.h" +#include #include +// VIRTUAL_CHANNEL_S +#include "linux/ipu-isys.h" +// VIRTUAL_CHANNEL_E #include "PlatformData.h" #include "V4l2DeviceFactory.h" #include "iutils/CameraLog.h" @@ -29,11 +33,18 @@ namespace icamera { SofSource::SofSource(int cameraId) : mPollThread(nullptr), mCameraId(cameraId), + // VIRTUAL_CHANNEL_S + mAggregatorSubDev(nullptr), + mFrameSyncId(-1), + // VIRTUAL_CHANNEL_E mIsysReceiverSubDev(nullptr), mExitPending(false) { LOG1("%s: SofSource is constructed", __func__); mSofDisabled = !PlatformData::isIsysEnabled(cameraId); + // FILE_SOURCE_S + mSofDisabled = mSofDisabled || PlatformData::isFileSourceEnabled(); + // FILE_SOURCE_E } SofSource::~SofSource() { @@ -79,6 +90,34 @@ int SofSource::initDev() { LOG1("%s: Using SOF event id 0 for sync", __func__); #else int id = 0; + // VIRTUAL_CHANNEL_S + /* The value of virtual channel sequence is 1, 2, 3, ... if virtual channel supported. + The value of SOF event id is 0, 1, 2, ... (sequence -1) when virtual channel supported. */ + int sequence = PlatformData::getVirtualChannelSequence(mCameraId); + if (sequence > 0) { + mFrameSyncId = sequence - 1; + } + + struct VcAggregator aggregator; + if (PlatformData::getVcAggregator(mCameraId, aggregator) == OK) { + std::string devName; + CameraUtils::getDeviceName(aggregator.mName.c_str(), devName, true); + if (!devName.empty()) { + LOG1("%s, found aggregator subdevice %s", __func__, devName.c_str()); + mAggregatorSubDev = V4l2DeviceFactory::getSubDev(mCameraId, devName); + + struct v4l2_querymenu qm = {.id = V4L2_CID_IPU_QUERY_SUB_STREAM, }; + qm.index = aggregator.mIndex; + int ret = mAggregatorSubDev->QueryMenu(&qm); + if (ret == 0) { + #define SUB_STREAM_VC_ID(value) ((value) >> 56 & 0xFF) + mFrameSyncId = SUB_STREAM_VC_ID(qm.value); + } + } + } + if (mFrameSyncId >= 0) id = mFrameSyncId; + // VIRTUAL_CHANNEL_E + int status = mIsysReceiverSubDev->SubscribeEvent(V4L2_EVENT_FRAME_SYNC, id); CheckAndLogError(status != OK, status, "Failed to subscribe sync event %d", id); LOG1("%s: Using SOF event id %d for sync", __func__, id); @@ -100,6 +139,9 @@ int SofSource::deinitDev() { } #else int id = 0; + // VIRTUAL_CHANNEL_S + if (mFrameSyncId >= 0) id = mFrameSyncId; + // VIRTUAL_CHANNEL_E status = mIsysReceiverSubDev->UnsubscribeEvent(V4L2_EVENT_FRAME_SYNC, id); if (status == OK) { LOG1("%s: Unsubscribe SOF event id %d done", __func__, id); @@ -143,8 +185,8 @@ int SofSource::stop() { int SofSource::poll() { int ret = 0; - const int pollTimeoutCount = 10; - const int pollTimeout = 1000; + const int pollTimeoutCount = 100; + const int pollTimeout = 100; std::vector pollDevs; pollDevs.push_back(mIsysReceiverSubDev); @@ -186,7 +228,8 @@ int SofSource::poll() { syncData.sequence = event.u.frame_sync.frame_sequence; syncData.timestamp.tv_sec = event.timestamp.tv_sec; syncData.timestamp.tv_usec = (event.timestamp.tv_nsec / 1000); - LOG2(" %s:sof event, event.id %u", syncData.sequence, __func__, event.id); + LOG2("camera:%d, %s, timestamp:%ld, sof event, event.id %u", mCameraId, + syncData.sequence, __func__, TIMEVAL2USECS(syncData.timestamp), event.id); TRACE_LOG_POINT("SofSource", "receive sof event", MAKE_COLOR(syncData.sequence), syncData.sequence); EventData eventData; diff --git a/src/core/SofSource.h b/src/core/SofSource.h index 262166a6..737b2905 100644 --- a/src/core/SofSource.h +++ b/src/core/SofSource.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,6 +57,11 @@ class SofSource : public EventSource { }; PollThread* mPollThread; int mCameraId; + // VIRTUAL_CHANNEL_S + V4L2Subdevice* mAggregatorSubDev; + int mFrameSyncId; + // VIRTUAL_CHANNEL_E + V4L2Subdevice* mIsysReceiverSubDev; bool mExitPending; bool mSofDisabled; diff --git a/src/core/StreamSource.h b/src/core/StreamSource.h index 3996b9e8..1c771099 100644 --- a/src/core/StreamSource.h +++ b/src/core/StreamSource.h @@ -45,4 +45,26 @@ class StreamSource : public BufferProducer { virtual void removeAllFrameAvailableListener() = 0; }; +// DUMMY_SOURCE_S +class DummySource : public StreamSource { + public: + DummySource() : StreamSource(V4L2_MEMORY_USERPTR) {} + + int init() { return OK; } + void deinit() {} + int configure(const std::map& outputFrames, + const std::vector& configModes) { + return OK; + } + int start() { return OK; } + int stop() { return OK; } + void removeAllFrameAvailableListener() {} + + int qbuf(Port port, const std::shared_ptr& camBuffer) { return OK; } + int allocateMemory(Port port, const std::shared_ptr& camBuffer) { return OK; } + + void addFrameAvailableListener(BufferConsumer* listener) {} + void removeFrameAvailableListener(BufferConsumer* listener) {} +}; +// DUMMY_SOURCE_E } // namespace icamera diff --git a/src/core/TNRCommon.h b/src/core/TNRCommon.h index 13339727..747c8e47 100644 --- a/src/core/TNRCommon.h +++ b/src/core/TNRCommon.h @@ -17,16 +17,52 @@ #pragma once #include "ia_pal_types_isp_parameters_autogen.h" +#ifdef TNR7_CM #include "tnr7us_parameters_definition.h" +#endif namespace icamera { -typedef struct Tnr7Param { - tnr_scale_1_0_t scale; - tnr7_ims_1_0_t ims; - tnr7_bc_1_0_t bc; - tnr7_blend_1_0_t blend; -} Tnr7Param; +#ifdef TNR7_CM +typedef tnr_scale_1_0_t tnrScaleParam; +typedef tnr7_ims_1_0_t tnrImsParam; +typedef tnr7_bc_1_0_t tnrBCParam; +typedef tnr7_blend_1_0_t tnrBlendParam; +#else +typedef struct { + double is_first_frame; + double do_update; + double coeffs[3]; + double tune_sensitivity; + double global_protection; + double global_protection_sensitivity_lut_values[3]; + double global_protection_sensitivity_lut_slopes[2]; + double global_protection_inv_num_pixels; +} subway_tnr7_bc_1_1_t; + +typedef struct { + double max_recursive_similarity; +} subway_tnr7_blend_1_0_t; + +typedef struct { + double update_limit; + double update_coeff; + double d_ml[16]; + double d_slopes[16]; + double d_top[16]; + double outofbounds[16]; + double radial_start; + double radial_coeff; + double frame_center_y; + double frame_center_x; + double r_coeff; +} subway_tnr7_ims_1_1_t; + +typedef int32_t tnrScaleParam; +typedef subway_tnr7_ims_1_1_t tnrImsParam; +typedef subway_tnr7_bc_1_1_t tnrBCParam; +typedef subway_tnr7_blend_1_0_t tnrBlendParam; +#endif typedef enum TnrType { TNR_INSTANCE0 = 0, @@ -55,4 +91,11 @@ typedef struct TnrRequestInfo { int outBufFd; bool isForceUpdate; } TnrRequestInfo; + +typedef struct Tnr7Param { + tnrScaleParam scale; + tnrImsParam ims; + tnrBCParam bc; + tnrBlendParam blend; +} Tnr7Param; } // namespace icamera diff --git a/src/core/psysprocessor/GPUExecutor.cpp b/src/core/psysprocessor/GPUExecutor.cpp index f3ecb042..67ebdd92 100644 --- a/src/core/psysprocessor/GPUExecutor.cpp +++ b/src/core/psysprocessor/GPUExecutor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -122,13 +122,15 @@ int GPUExecutor::start() { "Can't find TerminalDescriptor"); const FrameInfo& frameInfo = mTerminalsDesc[term].frameDesc; - mIntelTNR = std::unique_ptr(new IntelTNR7US(mCameraId)); + mIntelTNR = std::unique_ptr(IntelTNR7US::createIntelTNR(mCameraId)); TnrType type = mStreamId == VIDEO_STREAM_ID ? TNR_INSTANCE0 : TNR_INSTANCE1; - ret = mIntelTNR->init(frameInfo.mWidth, frameInfo.mHeight, type); - if (ret) { - mIntelTNR = nullptr; - // when failed to init tnr, executor will run without tnr effect - LOGW("Executor:%s init tnr failed", mName.c_str()); + if (mIntelTNR) { + ret = mIntelTNR->init(frameInfo.mWidth, frameInfo.mHeight, type); + if (ret) { + mIntelTNR = nullptr; + // when failed to init tnr, executor will run without tnr effect + LOGW("Executor:%s init tnr failed", mName.c_str()); + } } } AutoMutex l(mBufferQueueLock); @@ -169,11 +171,11 @@ int GPUExecutor::allocBuffers() { int srcWidth = mTerminalsDesc[term].frameDesc.mWidth; int srcHeight = mTerminalsDesc[term].frameDesc.mHeight; uint32_t size = 0; + int ret = NO_MEMORY; + + if (mIntelTNR) ret = mIntelTNR->getTnrBufferSize(srcWidth, srcHeight, &size); + if (ret) size = PGCommon::getFrameSize(srcFmt, srcWidth, srcHeight, true); - if (mIntelTNR) { - int ret = mIntelTNR->getSurfaceInfo(srcWidth, srcHeight, &size); - if (ret) size = PGCommon::getFrameSize(srcFmt, srcWidth, srcHeight, true); - } LOG1("@%s, Required GPU TNR buffer size %u", __func__, size); for (int i = 0; i < MAX_BUFFER_COUNT; i++) { @@ -223,15 +225,11 @@ bool GPUExecutor::fetchTnrOutBuffer(int64_t seq, std::shared_ptr b std::unique_lock lock(mTnrOutBufMapLock); if (mTnrOutBufMap.find(seq) != mTnrOutBufMap.end()) { - void* pSrcBuf = (buf->getMemory() == V4L2_MEMORY_DMABUF) ? - CameraBuffer::mapDmaBufferAddr(buf->getFd(), buf->getBufferSize()) : - buf->getBufferAddr(); + ScopeMapping mapper(buf); + void* pSrcBuf = mapper.getUserPtr(); CheckAndLogError(!pSrcBuf, false, "pSrcBuf is nullptr"); LOG2("Sequence %ld is used for output", seq); MEMCPY_S(pSrcBuf, buf->getBufferSize(), mTnrOutBufMap[seq], mOutBufferSize); - if (buf->getMemory() == V4L2_MEMORY_DMABUF) { - CameraBuffer::unmapDmaBufferAddr(pSrcBuf, buf->getBufferSize()); - } return true; } @@ -244,10 +242,15 @@ int GPUExecutor::getStillTnrTriggerInfo(TuningMode mode) { CheckAndLogError(!intelCca, UNKNOWN_ERROR, "cca is nullptr, mode:%d", mode); cca::cca_cmc cmc; ia_err ret = intelCca->getCMC(&cmc); - CheckAndLogError(ret != OK, BAD_VALUE, "Get cmc data failed"); + CheckAndLogError(ret != ia_err_none, BAD_VALUE, "Get cmc data failed"); mStillTnrTriggerInfo = cmc.tnr7us_trigger_info; LOG1("%s still tnr trigger gain num: %d threshold: %f", mName.c_str(), mStillTnrTriggerInfo.num_gains, mStillTnrTriggerInfo.tnr7us_threshold_gain); + for (int i = 0; i < mStillTnrTriggerInfo.num_gains; i++) { + LOG1("%s threshold: %f, tnr frame count: %d", mName.c_str(), + mStillTnrTriggerInfo.trigger_infos[i].gain, + mStillTnrTriggerInfo.trigger_infos[i].frame_count); + } return OK; } @@ -271,10 +274,13 @@ int GPUExecutor::getTotalGain(int64_t seq, float* totalGain) { bool GPUExecutor::isBypassStillTnr(int64_t seq) { if (mStreamId != STILL_TNR_STREAM_ID) return true; +#ifdef IPU_SYSVER_ipu6v3 float totalGain = 0.0f; int ret = getTotalGain(seq, &totalGain); CheckAndLogError(ret, true, "Failed to get total gain"); if (totalGain <= mStillTnrTriggerInfo.tnr7us_threshold_gain) return true; +#endif + return false; } @@ -285,6 +291,7 @@ int GPUExecutor::getTnrExtraFrameCount(int64_t seq) { CheckAndLogError(ret, 0, "Failed to get total gain"); if (!mStillTnrTriggerInfo.num_gains) return PlatformData::getTnrExtraFrameCount(mCameraId); + if (totalGain <= mStillTnrTriggerInfo.tnr7us_threshold_gain) return 0; int index = 0; for (int i = 1; i < mStillTnrTriggerInfo.num_gains; i++) { @@ -293,6 +300,8 @@ int GPUExecutor::getTnrExtraFrameCount(int64_t seq) { index = i; } /* the frame_count is total tnr7 frame count, already run 1 frame */ + LOG2("%s total gain %f with tnr frame count %d", __func__, totalGain, + mStillTnrTriggerInfo.trigger_infos[index].frame_count); return mStillTnrTriggerInfo.trigger_infos[index].frame_count - 1; } @@ -440,15 +449,14 @@ int GPUExecutor::updateTnrISPConfig(Tnr7Param* pbuffer, uint32_t sequence) { ret |= PalOutput.getKernelPublicOutput(ia_pal_uuid_isp_tnr7_ims_1_1, (void*&)pIms); CheckAndLogError(ret != ia_err_none, UNKNOWN_ERROR, "Can't read isp tnr7 parameters"); - tnr7_bc_1_0_t* tnr7_bc = &(pbuffer->bc); - tnr7_blend_1_0_t* tnr7_blend = &(pbuffer->blend); - tnr7_ims_1_0_t* tnr7_ims = &(pbuffer->ims); + tnrBCParam* tnr7_bc = &(pbuffer->bc); + tnrBlendParam* tnr7_blend = &(pbuffer->blend); + tnrImsParam* tnr7_ims = &(pbuffer->ims); + // common params for both c4m tnr and level0 tnr // tnr7 ims params - tnr7_ims->enable = pIms->enable; tnr7_ims->update_limit = pIms->update_limit; tnr7_ims->update_coeff = pIms->update_coeff; - tnr7_ims->gpu_mode = pIms->gpu_mode; for (int i = 0; i < sizeof(pIms->d_ml) / sizeof(int32_t); i++) { tnr7_ims->d_ml[i] = pIms->d_ml[i]; tnr7_ims->d_slopes[i] = pIms->d_slopes[i]; @@ -462,21 +470,17 @@ int GPUExecutor::updateTnrISPConfig(Tnr7Param* pbuffer, uint32_t sequence) { tnr7_ims->r_coeff = pIms->r_coeff; // tnr7 bc params - tnr7_bc->enable = pBc->enable; tnr7_bc->is_first_frame = pBc->is_first_frame; tnr7_bc->do_update = pBc->do_update; - tnr7_bc->gpu_mode = pBc->gpu_mode; tnr7_bc->tune_sensitivity = pBc->tune_sensitivity; for (int i = 0; i < sizeof(pBc->coeffs) / sizeof(int32_t); i++) { tnr7_bc->coeffs[i] = pBc->coeffs[i]; } - if (!icamera::PlatformData::useTnrGlobalProtection()) { tnr7_bc->global_protection = 0; } else { tnr7_bc->global_protection = pBc->global_protection; tnr7_bc->global_protection_inv_num_pixels = pBc->global_protection_inv_num_pixels; - tnr7_bc->global_protection_motion_level = pBc->global_protection_motion_level; } for (int i = 0; i < sizeof(pBc->global_protection_sensitivity_lut_values) / sizeof(int32_t); i++) { @@ -488,14 +492,24 @@ int GPUExecutor::updateTnrISPConfig(Tnr7Param* pbuffer, uint32_t sequence) { tnr7_bc->global_protection_sensitivity_lut_slopes[i] = pBc->global_protection_sensitivity_lut_slopes[i]; } + tnr7_blend->max_recursive_similarity = pBlend->max_recursive_similarity; + +#ifdef TNR7_CM + tnr7_ims->enable = pIms->enable; + tnr7_ims->gpu_mode = pIms->gpu_mode; + + tnr7_bc->enable = pBc->enable; + tnr7_bc->gpu_mode = pBc->gpu_mode; - // tnr7 blend params + if (icamera::PlatformData::useTnrGlobalProtection()) { + tnr7_bc->global_protection_motion_level = pBc->global_protection_motion_level; + } + // c4m tnr7 blend params tnr7_blend->enable = pBlend->enable; tnr7_blend->enable_main_output = pBlend->enable_main_output; tnr7_blend->enable_vision_output = pBlend->enable_vision_output; tnr7_blend->single_output_mode = pBlend->single_output_mode; tnr7_blend->spatial_weight_coeff = pBlend->spatial_weight_coeff; - tnr7_blend->max_recursive_similarity = pBlend->max_recursive_similarity; tnr7_blend->spatial_alpha = pBlend->spatial_alpha; tnr7_blend->max_recursive_similarity_vsn = pBlend->max_recursive_similarity_vsn; for (int i = 0; i < sizeof(pBlend->w_out_prev_LUT) / sizeof(int32_t); i++) { @@ -513,6 +527,7 @@ int GPUExecutor::updateTnrISPConfig(Tnr7Param* pbuffer, uint32_t sequence) { for (int i = 0; i < sizeof(pBlend->output_cu_x) / sizeof(int32_t); i++) { tnr7_blend->output_cu_x[i] = pBlend->output_cu_x[i]; } +#endif } return ret; @@ -530,15 +545,17 @@ int GPUExecutor::runTnrFrame(const std::shared_ptr& inBuf, struct timespec beginTime = {}; if (mIntelTNR) { - if (Log::isLogTagEnabled(ST_GPU_TNR)) clock_gettime(CLOCK_MONOTONIC, &beginTime); + if (Log::isLogTagEnabled(ST_GPU_TNR, CAMERA_DEBUG_LOG_LEVEL2)) { + clock_gettime(CLOCK_MONOTONIC, &beginTime); + } ret = updateTnrISPConfig(mTnr7usParam, sequence); - if (Log::isLogTagEnabled(ST_GPU_TNR)) { + if (Log::isLogTagEnabled(ST_GPU_TNR, CAMERA_DEBUG_LOG_LEVEL2)) { struct timespec endTime = {}; clock_gettime(CLOCK_MONOTONIC, &endTime); uint64_t timeUsedUs = (endTime.tv_sec - beginTime.tv_sec) * 1000000 + (endTime.tv_nsec - beginTime.tv_nsec) / 1000; - LOG2(ST_GPU_TNR, "%s executor name:%s, sequence: %u update param time %lu us", __func__, + LOG2(ST_GPU_TNR, "executor name:%s, sequence: %u update param time %lu us", mName.c_str(), inBuf->getSequence(), timeUsedUs); } CheckAndLogError(ret != OK, UNKNOWN_ERROR, "Failed to update TNR parameters"); @@ -552,6 +569,11 @@ int GPUExecutor::runTnrFrame(const std::shared_ptr& inBuf, bool paramSyncUpdate = (mStreamId == VIDEO_STREAM_ID) ? false : true; +#ifdef TNR7_LEVEL0 + // no async param update in level0 tnr + paramSyncUpdate = true; +#endif + if (!paramSyncUpdate && mIntelTNR) { // request update tnr parameters before wait float totalGain = 0.0f; @@ -566,17 +588,14 @@ int GPUExecutor::runTnrFrame(const std::shared_ptr& inBuf, int fd = outBuf->getFd(); int memoryType = outBuf->getMemory(); int bufferSize = outBuf->getBufferSize(); - void* outPtr = (memoryType == V4L2_MEMORY_DMABUF) ? - CameraBuffer::mapDmaBufferAddr(fd, bufferSize) : - outBuf->getBufferAddr(); + + ScopeMapping mapper(outBuf); + void* outPtr = mapper.getUserPtr(); if (!outPtr) return UNKNOWN_ERROR; outBuf->setSequence(sequence); if (!mIntelTNR) { MEMCPY_S(outPtr, bufferSize, inBuf->getBufferAddr(), inBuf->getBufferSize()); - if (memoryType == V4L2_MEMORY_DMABUF) { - CameraBuffer::unmapDmaBufferAddr(outPtr, bufferSize); - } return OK; } @@ -584,9 +603,6 @@ int GPUExecutor::runTnrFrame(const std::shared_ptr& inBuf, // when running still stream tnr, should skip video tnr to decrease still capture duration. if (mStreamId == VIDEO_STREAM_ID && !mGPULock.try_lock()) { MEMCPY_S(outPtr, bufferSize, inBuf->getBufferAddr(), inBuf->getBufferSize()); - if (memoryType == V4L2_MEMORY_DMABUF) { - CameraBuffer::unmapDmaBufferAddr(outPtr, bufferSize); - } mLastSequence = UINT32_MAX; LOG2("Executor name:%s, skip frame sequence: %ld", mName.c_str(), inBuf->getSequence()); return OK; @@ -616,7 +632,9 @@ int GPUExecutor::runTnrFrame(const std::shared_ptr& inBuf, dstFd = -1; } - if (Log::isLogTagEnabled(ST_GPU_TNR)) clock_gettime(CLOCK_MONOTONIC, &beginTime); + if (Log::isLogTagEnabled(ST_GPU_TNR, CAMERA_DEBUG_LOG_LEVEL2)) { + clock_gettime(CLOCK_MONOTONIC, &beginTime); + } ret = mIntelTNR->runTnrFrame(inBuf->getBufferAddr(), dstBuf, inBuf->getBufferSize(), dstSize, mTnr7usParam, paramSyncUpdate, dstFd); if (ret == OK) { @@ -627,7 +645,7 @@ int GPUExecutor::runTnrFrame(const std::shared_ptr& inBuf, LOG2("Just copy source buffer if run TNR failed"); MEMCPY_S(outPtr, bufferSize, inBuf->getBufferAddr(), inBuf->getBufferSize()); } - if (Log::isLogTagEnabled(ST_GPU_TNR)) { + if (Log::isLogTagEnabled(ST_GPU_TNR, CAMERA_DEBUG_LOG_LEVEL2)) { struct timespec endTime; clock_gettime(CLOCK_MONOTONIC, &endTime); uint64_t timeUsedUs = (endTime.tv_sec - beginTime.tv_sec) * 1000000 + @@ -646,9 +664,6 @@ int GPUExecutor::runTnrFrame(const std::shared_ptr& inBuf, LOG2("outBuf->first %ld, outBuf->second %p", tnrOutBuf->first, tnrOutBuf->second); } - if (memoryType == V4L2_MEMORY_DMABUF) { - CameraBuffer::unmapDmaBufferAddr(outPtr, bufferSize); - } CheckAndLogError(ret != OK, UNKNOWN_ERROR, "tnr7us run frame failed"); mLastSequence = sequence; @@ -662,9 +677,9 @@ int GPUExecutor::dumpTnrParameters(uint32_t sequence) { std::string("/home/tnr7-") + std::to_string(sequence) + std::string(".txt"); LOG1("Save tnr7 parameters to file %s", dumpFileName.c_str()); - tnr7_bc_1_0_t* tnr7_bc = &(mTnr7usParam->bc); - tnr7_blend_1_0_t* tnr7_blend = &(mTnr7usParam->blend); - tnr7_ims_1_0_t* tnr7_ims = &(mTnr7usParam->ims); + tnrBCParam* tnr7_bc = &(mTnr7usParam->bc); + tnrBlendParam* tnr7_blend = &(mTnr7usParam->blend); + tnrImsParam* tnr7_ims = &(mTnr7usParam->ims); char* dumpData = reinterpret_cast(malloc(DUMP_FILE_SIZE)); CheckAndLogError(dumpData == nullptr, NO_MEMORY, "failed to allocate memory for dump tnr7"); @@ -673,21 +688,21 @@ int GPUExecutor::dumpTnrParameters(uint32_t sequence) { int shift = 0; size_t length = snprintf(dumpData + shift, DUMP_FILE_SIZE - shift, "%s\n", "tnr7_bc"); shift += length; - for (int i = 0; i < sizeof(tnr7_bc_1_0_t) / sizeof(int32_t); i++) { + for (int i = 0; i < sizeof(tnrBCParam) / sizeof(int32_t); i++) { length = snprintf(dumpData + shift, DUMP_FILE_SIZE - shift, "%u\n", *(reinterpret_cast(tnr7_bc) + i)); shift += length; } length = snprintf(dumpData + shift, DUMP_FILE_SIZE - shift, "%s\n", "tnr7_blend"); shift += length; - for (int i = 0; i < sizeof(tnr7_blend_1_0_t) / sizeof(int32_t); i++) { + for (int i = 0; i < sizeof(tnrBlendParam) / sizeof(int32_t); i++) { length = snprintf(dumpData + shift, DUMP_FILE_SIZE - shift, "%u\n", *(reinterpret_cast(tnr7_blend) + i)); shift += length; } length = snprintf(dumpData + shift, DUMP_FILE_SIZE - shift, "%s\n", "tnr7_ims"); shift += length; - for (int i = 0; i < sizeof(tnr7_ims_1_0_t) / sizeof(int32_t); i++) { + for (int i = 0; i < sizeof(tnrImsParam) / sizeof(int32_t); i++) { length = snprintf(dumpData + shift, DUMP_FILE_SIZE - shift, "%u\n", *(reinterpret_cast(tnr7_ims) + i)); shift += length; @@ -701,4 +716,5 @@ int GPUExecutor::dumpTnrParameters(uint32_t sequence) { free(dumpData); return OK; } + } // namespace icamera diff --git a/src/core/psysprocessor/GPUExecutor.h b/src/core/psysprocessor/GPUExecutor.h index 7b693879..211e0f6d 100644 --- a/src/core/psysprocessor/GPUExecutor.h +++ b/src/core/psysprocessor/GPUExecutor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/psysprocessor/PGCommon.cpp b/src/core/psysprocessor/PGCommon.cpp index 1523e6fd..30a48e29 100644 --- a/src/core/psysprocessor/PGCommon.cpp +++ b/src/core/psysprocessor/PGCommon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation. + * Copyright (C) 2019-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ #include "iutils/CameraDump.h" #include "iutils/CameraLog.h" #include "iutils/Utils.h" +#include "AiqResultStorage.h" namespace icamera { @@ -39,10 +40,7 @@ int PGCommon::getFrameSize(int format, int width, int height, bool needAlignedHe int stride = PGUtils::getCssStride(format, width); switch (cssFormat) { case IA_CSS_DATA_FORMAT_BAYER_LINE_INTERLEAVED: // CSL6 - if (needAlignedHeight) { - height = ALIGN_64(height); - } - size = stride * height * 3 / 2; + size = stride * height; break; default: break; @@ -87,6 +85,7 @@ PGCommon::PGCommon(int cameraId, int pgId, const std::string& pgName, TuningMode mInputMainTerminal(-1), mOutputMainTerminal(-1), mShareReferPool(nullptr), + mIpuParameters(nullptr), mIntelCca(nullptr) { mTnrTerminalPair.inId = -1; mTnrTerminalPair.outId = -1; @@ -98,7 +97,7 @@ PGCommon::~PGCommon() {} int PGCommon::init() { mDisableDataTermials.clear(); - mPGParamAdapt = std::unique_ptr(new IntelPGParam(mPGId)); + mPGParamAdapt = std::unique_ptr(new IntelPGParam(mPGId, mCameraId, mTuningMode)); mCtx = new CIPR::Context(); CheckAndLogError(!(mCtx->isInitialized()), UNKNOWN_ERROR, "Failed to initialize Context"); @@ -171,6 +170,10 @@ void PGCommon::deInit() { mPGParamAdapt->deinit(); mRoutingBitmap.reset(); + + if (mIntelCca) { + mIntelCca->freeStatsDataMem(); + } } void PGCommon::setInputInfo(const TerminalFrameInfoMap& inputInfos, FrameInfo tnrFrameInfo) { @@ -765,6 +768,7 @@ int PGCommon::configureFrameDesc() { int cssBpp = PGUtils::getCssBpp(v4l2Fmt, true); int cssBpe = PGUtils::getCssBpe(v4l2Fmt, true); + int alignedBpl = PGUtils::getCssStride(v4l2Fmt, width, true); switch (dstFrameDesc->frame_format_type) { case IA_CSS_DATA_FORMAT_BAYER_GRBG: case IA_CSS_DATA_FORMAT_BAYER_RGGB: @@ -772,8 +776,6 @@ int PGCommon::configureFrameDesc() { case IA_CSS_DATA_FORMAT_BAYER_GBRG: { if (!PlatformData::getISYSCompression(mCameraId)) break; - int alignedBpl = width * 2; - alignedBpl = ALIGN(alignedBpl, ISYS_COMPRESSION_STRIDE_ALIGNMENT_BYTES); int alignedHeight = ALIGN(height, ISYS_COMPRESSION_HEIGHT_ALIGNMENT); int imageBufferSize = ALIGN(alignedBpl * alignedHeight, ISYS_COMPRESSION_PAGE_SIZE); @@ -789,8 +791,7 @@ int PGCommon::configureFrameDesc() { } case IA_CSS_DATA_FORMAT_YUV420: { if (!PlatformData::getPSACompression(mCameraId)) break; - // now the bpl of YUV420 format is width * 2 - int alignedBpl = ALIGN(width * 2, PSYS_COMPRESSION_PSA_Y_STRIDE_ALIGNMENT); + int alignedHeight = ALIGN(height, PSYS_COMPRESSION_PSA_HEIGHT_ALIGNMENT); int alignWidthUV = alignedBpl / 2; int alignHeightUV = alignedHeight / 2; @@ -832,20 +833,17 @@ int PGCommon::configureFrameDesc() { case IA_CSS_DATA_FORMAT_P010: { if (!PlatformData::getPSACompression(mCameraId)) break; - unsigned int bpl = 0, heightAlignment = 0, tsBit = 0, tileSize = 0; + unsigned int heightAlignment = 0, tsBit = 0, tileSize = 0; if (dstFrameDesc->frame_format_type == IA_CSS_DATA_FORMAT_NV12) { - bpl = width; heightAlignment = PSYS_COMPRESSION_TNR_LINEAR_HEIGHT_ALIGNMENT; tsBit = TILE_STATUS_BITS_TNR_NV12_TILE_Y; tileSize = TILE_SIZE_TNR_NV12_Y; } else { - bpl = width * 2; heightAlignment = PSYS_COMPRESSION_OFS_TILE_HEIGHT_ALIGNMENT; tsBit = TILE_STATUS_BITS_OFS_P010_TILE_Y; tileSize = TILE_SIZE_OFS10_12_TILEY; } - int alignedBpl = ALIGN(bpl, PSYS_COMPRESSION_TNR_STRIDE_ALIGNMENT); int alignedHeight = ALIGN(height, heightAlignment); int alignedHeightUV = ALIGN(height / UV_HEIGHT_DIVIDER, heightAlignment); int imageBufferSize = ALIGN(alignedBpl * (alignedHeight + alignedHeightUV), @@ -881,12 +879,12 @@ int PGCommon::configureFrameDesc() { int PGCommon::iterate(CameraBufferMap& inBufs, CameraBufferMap& outBufs, ia_binary_data* statistics, const ia_binary_data* ipuParameters) { PERF_CAMERA_ATRACE(); - LOG2("%s:%s ++", getName(), __func__); int64_t sequence = 0; if (!inBufs.empty()) { sequence = inBufs.begin()->second->getSequence(); } + LOG2("%s:%s ++", sequence, getName(), __func__); int ret = prepareTerminalBuffers(ipuParameters, inBufs, outBufs, sequence); CheckAndLogError((ret != OK), ret, "%s, prepareTerminalBuffers fail with %d", getName(), ret); @@ -926,7 +924,7 @@ int PGCommon::iterate(CameraBufferMap& inBufs, CameraBufferMap& outBufs, ia_bina statistics->data = mIntelCca->getStatsDataBuffer(); if (statistics->data) useCcaBuf = true; } - ret = mPGParamAdapt->decode(mTerminalCount, mParamPayload, statistics); + ret = mPGParamAdapt->decode(mTerminalCount, mParamPayload, statistics, sequence); CheckAndLogError((ret != OK), ret, "%s, decode fail", getName()); if (mIntelCca && useCcaBuf) { mIntelCca->decodeHwStatsDone(sequence, statistics->size); @@ -934,7 +932,7 @@ int PGCommon::iterate(CameraBufferMap& inBufs, CameraBufferMap& outBufs, ia_bina } postTerminalBuffersDone(sequence); - LOG2("%s:%s -- ", getName(), __func__); + LOG2("%s:%s -- ", sequence, getName(), __func__); return ret; } @@ -1093,11 +1091,19 @@ int PGCommon::prepareTerminalBuffers(const ia_binary_data* ipuParameters, if (buffer) { bool flush = buffer->getUsage() == BUFFER_USAGE_GENERAL ? true : false; - if (PlatformData::removeCacheFlushOutputBuffer(mCameraId) && - buffer->getMemory() == V4L2_MEMORY_DMABUF && - !buffer->isFlagsSet(BUFFER_FLAG_SW_READ)) { + if (buffer->getMemory() == V4L2_MEMORY_DMABUF && + ((PlatformData::removeCacheFlushOutputBuffer(mCameraId) && + !buffer->isFlagsSet(BUFFER_FLAG_SW_READ)) || + buffer->isFlagsSet(BUFFER_FLAG_NO_FLUSH))) { flush = false; } +#ifdef LINUX_BUILD + // FILE_SOURCE_S + if (PlatformData::isFileSourceEnabled() && buffer->getMemory() == V4L2_MEMORY_USERPTR) { + flush = true; + } + // FILE_SOURCE_E +#endif ciprBuf = (buffer->getMemory() == V4L2_MEMORY_DMABUF) ? registerUserBuffer(buffer->getBufferSize(), buffer->getFd(), flush) : @@ -1137,6 +1143,16 @@ int PGCommon::prepareTerminalBuffers(const ia_binary_data* ipuParameters, mTerminalBuffers[pair.outId]->getMemoryCpuPtr(&mParamPayload[pair.outId].data); } + const AiqResult* aiqResult = AiqResultStorage::getInstance(mCameraId)->getAiqResult(sequence); + if (aiqResult && aiqResult->mAiqParam.powerMode == CAMERA_LOW_POWER) { + if (ipuParameters != mIpuParameters) { + mIpuParameters = ipuParameters; + } else if (sequence > MAX_SETTING_COUNT) { + LOG2("don't run P2P if no PAL update, seq %ld", sequence); + return OK; + } + } + return mPGParamAdapt->updatePALAndEncode(ipuParameters, mTerminalCount, mParamPayload); } diff --git a/src/core/psysprocessor/PGCommon.h b/src/core/psysprocessor/PGCommon.h index 36bd4572..80e7a585 100644 --- a/src/core/psysprocessor/PGCommon.h +++ b/src/core/psysprocessor/PGCommon.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation. + * Copyright (C) 2019-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -258,6 +258,7 @@ class PGCommon { std::vector mDvsTerminalPairs; std::vector mTnrSimTerminalPairs; + const ia_binary_data* mIpuParameters; IntelCca* mIntelCca; }; diff --git a/src/core/psysprocessor/PGUtils.cpp b/src/core/psysprocessor/PGUtils.cpp index 890b853c..4e721f90 100644 --- a/src/core/psysprocessor/PGUtils.cpp +++ b/src/core/psysprocessor/PGUtils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation. + * Copyright (C) 2019-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,7 +81,7 @@ static const FormatMap sFormatMapping[] = { {GET_FOURCC_FMT('V', '4', '2', '0'), IA_CSS_DATA_FORMAT_YUV420, 24, 16}, {GET_FOURCC_FMT('b', 'V', '0', 'K'), IA_CSS_DATA_FORMAT_BAYER_VECTORIZED, 16, 16}, {GET_FOURCC_FMT('b', 'V', '0', 'G'), IA_CSS_DATA_FORMAT_BAYER_VECTORIZED, 16, 16}, - {GET_FOURCC_FMT('C', 'S', 'L', '6'), IA_CSS_DATA_FORMAT_BAYER_LINE_INTERLEAVED, 12, 10}, + {GET_FOURCC_FMT('C', 'S', 'L', '6'), IA_CSS_DATA_FORMAT_BAYER_LINE_INTERLEAVED, 16, 16}, {GET_FOURCC_FMT('C', 'S', '4', '2'), IA_CSS_DATA_FORMAT_YUV420, 18, 12}, {GET_FOURCC_FMT('G', 'R', '1', '0'), IA_CSS_DATA_FORMAT_BAYER_GRBG, 16, 16}, {GET_FOURCC_FMT('R', 'G', '1', '0'), IA_CSS_DATA_FORMAT_BAYER_RGGB, 16, 16}, @@ -108,7 +108,7 @@ ia_css_frame_format_type getCssFmt(int v4l2Fmt) { return IA_CSS_N_FRAME_FORMAT_TYPES; } -int getCssStride(int v4l2Fmt, int width) { +int getCssStride(int v4l2Fmt, int width, bool compression) { int stride = width; ia_css_frame_format_type cssFmt = getCssFmt(v4l2Fmt); switch (v4l2Fmt) { @@ -122,6 +122,33 @@ int getCssStride(int v4l2Fmt, int width) { stride = getStride(cssFmt, width); break; } + + if (compression) { + switch (cssFmt) { + case IA_CSS_DATA_FORMAT_BAYER_GRBG: + case IA_CSS_DATA_FORMAT_BAYER_RGGB: + case IA_CSS_DATA_FORMAT_BAYER_BGGR: + case IA_CSS_DATA_FORMAT_BAYER_GBRG: + stride = ALIGN(width * 2, ISYS_COMPRESSION_STRIDE_ALIGNMENT_BYTES); + break; + case IA_CSS_DATA_FORMAT_YUV420: + if (v4l2Fmt == GET_FOURCC_FMT('I', 'Y', 'U', 'V')) + stride = ALIGN(width, PSYS_COMPRESSION_PSA_Y_STRIDE_ALIGNMENT); + else + stride = ALIGN(width * 2, PSYS_COMPRESSION_PSA_Y_STRIDE_ALIGNMENT); + break; + case IA_CSS_DATA_FORMAT_NV12: + stride = ALIGN(width, PSYS_COMPRESSION_TNR_STRIDE_ALIGNMENT); + break; + case IA_CSS_DATA_FORMAT_P010: + stride = ALIGN(width * 2, PSYS_COMPRESSION_TNR_STRIDE_ALIGNMENT); + break; + default: + LOG1("%s format %d compress not supported", __func__, v4l2Fmt); + break; + } + } + return stride; } @@ -151,7 +178,7 @@ int getCssBpp(int v4l2Fmt, bool compression) { bpp = 24; break; default: - LOGW("%s format %d compress not supported", __func__, v4l2Fmt); + LOG1("%s format %d compress not supported", __func__, v4l2Fmt); break; } } @@ -189,7 +216,7 @@ int getCssBpe(int v4l2Fmt, bool compression) { bpe = 16; break; default: - LOGW("%s format %d compress not supported", __func__, v4l2Fmt); + LOG1("%s format %d compress not supported", __func__, v4l2Fmt); break; } } diff --git a/src/core/psysprocessor/PGUtils.h b/src/core/psysprocessor/PGUtils.h index 2cda1f1a..efff94b0 100644 --- a/src/core/psysprocessor/PGUtils.h +++ b/src/core/psysprocessor/PGUtils.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation. + * Copyright (C) 2019-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,7 +71,7 @@ namespace PGUtils { ia_css_frame_format_type getCssFmt(int v4l2Fmt); int getCssBpp(int v4l2Fmt, bool compression = false); int getCssBpe(int v4l2Fmt, bool compression = false); -int getCssStride(int v4l2Fmt, int width); +int getCssStride(int v4l2Fmt, int width, bool compression = false); bool isCompressionTerminal(int terminalId); /* ************************************************************ diff --git a/src/core/psysprocessor/PSysDAG.cpp b/src/core/psysprocessor/PSysDAG.cpp index 66ce9c7f..dae6f7ce 100644 --- a/src/core/psysprocessor/PSysDAG.cpp +++ b/src/core/psysprocessor/PSysDAG.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2022 Intel Corporation. + * Copyright (C) 2017-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,13 +22,15 @@ #include "iutils/CameraLog.h" #include "iutils/Utils.h" -#ifdef TNR7_CM +#if defined(TNR7_CM) || defined(TNR7_LEVEL0) #include "GPUExecutor.h" #endif +#include "CameraScheduler.h" namespace icamera { -PSysDAG::PSysDAG(int cameraId, PSysDagCallback* psysDagCB) +PSysDAG::PSysDAG(int cameraId, CameraScheduler* scheduler, PSysDagCallback* psysDagCB) : mCameraId(cameraId), + mScheduler(scheduler), mPSysDagCB(psysDagCB), mConfigMode(CAMERA_STREAM_CONFIGURATION_MODE_AUTO), mTuningMode(TUNING_MODE_MAX), @@ -38,8 +40,7 @@ PSysDAG::PSysDAG(int cameraId, PSysDagCallback* psysDagCB) mDefaultMainInputPort(MAIN_PORT), mVideoTnrExecutor(nullptr), mStillTnrExecutor(nullptr), - mStillExecutor(nullptr), - mRunAicAfterQbuf(false) { + mStillExecutor(nullptr) { LOG1("@%s", mCameraId, __func__); mPolicyManager = new PolicyManager(mCameraId); @@ -71,6 +72,13 @@ void PSysDAG::setFrameInfo(const std::map& inputInfo, } } } +void PSysDAG::unregisterNode() { + if (!mScheduler) return; + + for (auto& executor : mExecutorsPool) { + mScheduler->unregisterNode(executor); + } +} void PSysDAG::releasePipeExecutors() { for (auto& executor : mExecutorsPool) { @@ -97,12 +105,14 @@ int PSysDAG::createPipeExecutors(bool useTnrOutBuffer) { std::shared_ptr gc = GCM->getGraphConfig(mConfigMode); CheckAndLogError(!gc, UNKNOWN_ERROR, "Failed to get GraphConfig in PSysDAG!"); - int graphId = gc->getGraphId(); - PolicyConfig* cfg = PlatformData::getExecutorPolicyConfig(graphId); + std::set graphIds; + gc->getGraphIds(graphIds); + PolicyConfig* cfg = PlatformData::getExecutorPolicyConfig(graphIds); CheckAndLogError(!cfg, UNKNOWN_ERROR, "Failed to get PolicyConfig in PSysDAG!"); + if (mScheduler) mScheduler->configurate(graphIds); #ifdef USE_PG_LITE_PIPE - configShareReferPool(gc); + configShareReferPool(gc, cfg); #endif std::vector pgNames; @@ -134,7 +144,7 @@ int PSysDAG::createPipeExecutors(bool useTnrOutBuffer) { if (!hasVideoPipe) hasVideoPipe = (streamId == VIDEO_STREAM_ID); if (!hasStillPipe) hasStillPipe = (streamId == STILL_STREAM_ID || streamId == STILL_TNR_STREAM_ID); -#ifdef TNR7_CM +#if defined(TNR7_CM) || defined(TNR7_LEVEL0) PipeExecutor* executor; if (strstr(item.exeName.c_str(), "gputnr") != nullptr) { executor = @@ -147,12 +157,18 @@ int PSysDAG::createPipeExecutors(bool useTnrOutBuffer) { executor = new PipeExecutor(mCameraId, item, cfg->exclusivePgs, this, gc); if (streamId == STILL_STREAM_ID) mStillExecutor = executor; } + executor->setPolicyManager(mPolicyManager); #else PipeExecutor* executor = new PipeExecutor(mCameraId, item, cfg->exclusivePgs, this, gc); + if (mScheduler) { + mScheduler->registerNode(executor); + } else { + // Use PolicyManager to sync iteration if no scheduler + executor->setPolicyManager(mPolicyManager); + } #endif executor->setIspParamAdaptor(mIspParamAdaptor); executor->setStreamId(streamId); - executor->setPolicyManager(mPolicyManager); executor->setNotifyPolicy(item.notifyPolicy); #ifdef USE_PG_LITE_PIPE executor->setShareReferPool(mShareReferPool); @@ -170,11 +186,6 @@ int PSysDAG::createPipeExecutors(bool useTnrOutBuffer) { LOG2("%s, hasVideoPipe: %d, hasStillPipe: %d, enableBundleInSdv: %d", __func__, hasVideoPipe, hasStillPipe, cfg->enableBundleInSdv); - // Only enable psys bundle with aic when has video pipe only - if (!hasStillPipe && PlatformData::psysBundleWithAic(mCameraId)) { - mRunAicAfterQbuf = true; - } - if (hasStillPipe && hasVideoPipe && !cfg->enableBundleInSdv) return OK; for (auto& bundle : cfg->bundledExecutorDepths) { @@ -402,6 +413,10 @@ int PSysDAG::registerUserOutputBufs(Port port, const std::shared_ptrsetActive(false); +} + int PSysDAG::registerInternalBufs(std::map& internalBufs) { for (auto& portToBuffers : internalBufs) { for (auto& inputMap : mInputMaps) { @@ -417,17 +432,46 @@ int PSysDAG::registerInternalBufs(std::map& internalBufs) return OK; } +int PSysDAG::getActiveStreamIds(const PSysTaskData& taskData, + std::vector* activeStreamIds) { + // According to the output port to filter the valid executor stream Ids, and then run AIC + for (auto& outputFrame : taskData.mOutputBuffers) { + if (outputFrame.second.get() == nullptr) continue; + + std::map >::iterator it = + mOutputPortToStreamIds.find(outputFrame.first); + CheckAndLogError(it == mOutputPortToStreamIds.end(), UNKNOWN_ERROR, + "%s, failed to find streamIds for output port: %d", __func__, + outputFrame.first); + + for (auto& streamId : it->second) { + if (isInactiveStillStream(streamId, &taskData, outputFrame.first)) continue; + if (std::find(activeStreamIds->begin(), activeStreamIds->end(), streamId) == + activeStreamIds->end()) { + activeStreamIds->push_back(streamId); + } + } + } + LOG2("%s, The active streamId size for current task: %zu", __func__, activeStreamIds->size()); + + return OK; +} + /** * Queue the buffers in PSysTaskData to the cooresponding executors. */ int PSysDAG::queueBuffers(const PSysTaskData& task) { LOG2("@%s", mCameraId, __func__); + + std::vector activeStreamIds; + getActiveStreamIds(task, &activeStreamIds); + // Provide the input buffers for the input edge executor. for (auto& inputFrame : task.mInputBuffers) { for (auto& inputMap : mInputMaps) { if (inputMap.mDagPort == inputFrame.first) { - if (isInactiveStillStream(mExecutorStreamId[inputMap.mExecutor], &task, - inputFrame.first)) + if (std::find(activeStreamIds.begin(), activeStreamIds.end(), + mExecutorStreamId[inputMap.mExecutor]) == activeStreamIds.end()) continue; inputMap.mExecutor->onFrameAvailable(inputMap.mExecutorPort, inputFrame.second); LOG2("%s, queue input buffer: dagPort: %d, executorPort: %d, name: %s", __func__, @@ -440,8 +484,8 @@ int PSysDAG::queueBuffers(const PSysTaskData& task) { for (auto& outputFrame : task.mOutputBuffers) { for (auto& outputMap : mOutputMaps) { if (outputMap.mDagPort == outputFrame.first) { - if (isInactiveStillStream(mExecutorStreamId[outputMap.mExecutor], &task, - outputFrame.first)) + if (std::find(activeStreamIds.begin(), activeStreamIds.end(), + mExecutorStreamId[outputMap.mExecutor]) == activeStreamIds.end()) continue; outputMap.mExecutor->qbuf(outputMap.mExecutorPort, outputFrame.second); LOG2("%s, queue output buffer, dagPort: %d, executorPort: %d, name: %s", __func__, @@ -459,8 +503,7 @@ int PSysDAG::queueBuffers(const PSysTaskData& task) { } #ifdef USE_PG_LITE_PIPE -void PSysDAG::configShareReferPool(std::shared_ptr gc) { - PolicyConfig* cfg = PlatformData::getExecutorPolicyConfig(gc->getGraphId()); +void PSysDAG::configShareReferPool(std::shared_ptr gc, PolicyConfig* cfg) { if (!cfg || cfg->shareReferPairList.empty()) { return; } @@ -493,7 +536,6 @@ int PSysDAG::configure(ConfigMode configMode, TuningMode tuningMode, bool useTnr mConfigMode = configMode; mTuningMode = tuningMode; - mRunAicAfterQbuf = false; // Configure IspParamAdaptor int ret = mIspParamAdaptor->init(); @@ -531,8 +573,6 @@ int PSysDAG::start() { int PSysDAG::stop() { LOG1("@%s", mCameraId, __func__); - mPolicyManager->setActive(false); - for (auto& executors : mExecutorsPool) { executors->notifyStop(); } @@ -585,6 +625,11 @@ void PSysDAG::addTask(PSysTaskData taskParam) { // It's too early to runIspAdapt here, and the ipu parameters // may be incorrect when runPipe. bool runIspAdaptor = true; + // HDR_FEATURE_S + if (mTuningMode == TUNING_MODE_VIDEO_HDR || mTuningMode == TUNING_MODE_VIDEO_HDR2) { + runIspAdaptor = false; + } + // HDR_FEATURE_E int64_t sequence = taskParam.mInputBuffers.at(mDefaultMainInputPort)->getSequence(); if (runIspAdaptor) { @@ -593,12 +638,6 @@ void PSysDAG::addTask(PSysTaskData taskParam) { } queueBuffers(taskParam); - - if (runIspAdaptor && mRunAicAfterQbuf && taskParam.mNextSeqUsed) { - LOG2("%s, run AIC bundle with execute psys", __func__, sequence + 1); - // if running psys bundle with aic, current aic result is for next sequence - prepareIpuParams((sequence + 1), false, &task); - } } TuningMode PSysDAG::getTuningMode(int64_t sequence) { @@ -708,10 +747,15 @@ void PSysDAG::onStatsDone(int64_t sequence) { } } -int PSysDAG::prepareIpuParams(int64_t sequence, bool forceUpdate, TaskInfo* task) { +int PSysDAG::prepareIpuParams(int64_t sequence, bool forceUpdate, TaskInfo* task, bool runNext) { TRACE_LOG_PROCESS("PSysDAG", __func__, MAKE_COLOR(sequence), sequence); + + { + AutoMutex taskLock(mTaskLock); + CheckAndLogError(mOngoingTasks.empty(), UNKNOWN_ERROR, "no ongoing task!"); + if (runNext) task = &mOngoingTasks[mOngoingTasks.size() - 1]; + if (task == nullptr) { - AutoMutex taskLock(mTaskLock); for (size_t i = 0; i < mOngoingTasks.size(); i++) { if (sequence == mOngoingTasks[i].mTaskData.mInputBuffers.at(mDefaultMainInputPort)->getSequence()) { @@ -720,32 +764,13 @@ int PSysDAG::prepareIpuParams(int64_t sequence, bool forceUpdate, TaskInfo* task } } } + } + CheckAndLogError(!task, UNKNOWN_ERROR, "%s, Failed to find the task", __func__, sequence); - // According to the output port to filter the valid executor stream Ids, and then run AIC std::vector activeStreamIds; - for (auto& outputFrame : task->mTaskData.mOutputBuffers) { - if (outputFrame.second.get() == nullptr) continue; - - std::map >::iterator it = - mOutputPortToStreamIds.find(outputFrame.first); - CheckAndLogError(it == mOutputPortToStreamIds.end(), UNKNOWN_ERROR, - "%s, failed to find streamIds for output port: %d", __func__, - outputFrame.first); - - for (auto& streamId : it->second) { - if (isInactiveStillStream(streamId, &(task->mTaskData), outputFrame.first)) continue; - if (std::find(activeStreamIds.begin(), activeStreamIds.end(), streamId) == - activeStreamIds.end()) { - activeStreamIds.push_back(streamId); - } - } - } - LOG2("%s, the active streamId size for aic is %zu", __func__, sequence, - activeStreamIds.size()); - - int ret = OK; + getActiveStreamIds(task->mTaskData, &activeStreamIds); for (auto& id : activeStreamIds) { // Make sure the AIC is executed once. if (!forceUpdate) { @@ -760,7 +785,11 @@ int PSysDAG::prepareIpuParams(int64_t sequence, bool forceUpdate, TaskInfo* task } } - ret = mIspParamAdaptor->runIspAdapt(&task->mTaskData.mIspSettings, sequence, id); +// INTEL_DVS_S + mPSysDagCB->onDvsPrepare(sequence, id); +// INTEL_DVS_E + + int ret = mIspParamAdaptor->runIspAdapt(&task->mTaskData.mIspSettings, sequence, id); CheckAndLogError(ret != OK, UNKNOWN_ERROR, "%s, Failed to run AIC: streamId: %d", __func__, sequence, id); @@ -816,7 +845,7 @@ void PSysDAG::tuningReconfig(TuningMode newTuningMode) { } void PSysDAG::dumpExternalPortMap() { - if (!Log::isLogTagEnabled(GET_FILE_SHIFT(PSysDAG))) return; + if (!Log::isLogTagEnabled(GET_FILE_SHIFT(PSysDAG), CAMERA_DEBUG_LOG_LEVEL2)) return; for (auto& inputMap : mInputMaps) { if (inputMap.mExecutor) { diff --git a/src/core/psysprocessor/PSysDAG.h b/src/core/psysprocessor/PSysDAG.h index c680c7e2..75385655 100644 --- a/src/core/psysprocessor/PSysDAG.h +++ b/src/core/psysprocessor/PSysDAG.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2021 Intel Corporation + * Copyright (C) 2017-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ #include #include "CameraBuffer.h" +#include "CameraScheduler.h" #include "IspParamAdaptor.h" #include "Parameters.h" #include "PlatformData.h" @@ -41,7 +42,6 @@ struct PSysTaskData { TuningMode mTuningMode; bool mFakeTask; bool mCallbackRgbs; - bool mNextSeqUsed; CameraBufferPortMap mInputBuffers; CameraBufferPortMap mOutputBuffers; @@ -49,7 +49,6 @@ struct PSysTaskData { mTuningMode = TUNING_MODE_MAX; mFakeTask = false; mCallbackRgbs = false; - mNextSeqUsed = false; } }; @@ -69,11 +68,14 @@ class PSysDagCallback { virtual void onBufferDone(int64_t sequence, Port port, const std::shared_ptr& camBuffer) {} virtual void onStatsDone(int64_t sequence, const CameraBufferPortMap& outBuf) {} +// INTEL_DVS_S + virtual void onDvsPrepare(int64_t sequence, int32_t streamId) {} +// INTEL_DVS_E }; class PSysDAG { public: - PSysDAG(int cameraId, PSysDagCallback* psysDagCB); + PSysDAG(int cameraId, CameraScheduler* scheduler, PSysDagCallback* psysDagCB); virtual ~PSysDAG(); void setFrameInfo(const std::map& inputInfo, const std::map& outputInfo); @@ -84,8 +86,11 @@ class PSysDAG { int resume(); int pause(); + void unregisterNode(); + int registerInternalBufs(std::map& internalBufs); int registerUserOutputBufs(Port port, const std::shared_ptr& camBuffer); + void stopProcessing(); void addTask(PSysTaskData taskParam); @@ -93,7 +98,8 @@ class PSysDAG { void removeListener(EventType eventType, EventListener* eventListener); TuningMode getTuningMode(int64_t sequence); - int prepareIpuParams(int64_t sequence, bool forceUpdate = false, TaskInfo* task = nullptr); + int prepareIpuParams(int64_t sequence, bool forceUpdate = false, TaskInfo* task = nullptr, + bool runNext = false); bool fetchTnrOutBuffer(int64_t seq, std::shared_ptr buf); bool isBypassStillTnr(int64_t seq); @@ -115,7 +121,7 @@ class PSysDAG { int bindExternalPortsToExecutor(); void releasePipeExecutors(); #ifdef USE_PG_LITE_PIPE - void configShareReferPool(std::shared_ptr gc); + void configShareReferPool(std::shared_ptr gc, PolicyConfig* cfg); #endif PipeExecutor* findExecutorProducer(PipeExecutor* consumer); status_t searchStreamIdsForOutputPort(PipeExecutor* executor, Port port); @@ -123,11 +129,13 @@ class PSysDAG { int queueBuffers(const PSysTaskData& task); int returnBuffers(PSysTaskData& result); bool isInactiveStillStream(int streamId, const PSysTaskData* task, Port port); + int getActiveStreamIds(const PSysTaskData& taskData, std::vector* activeStreamIds); void dumpExternalPortMap(); private: int mCameraId; + CameraScheduler* mScheduler; PSysDagCallback* mPSysDagCB; // Used to callback notify frame done handling PolicyManager* mPolicyManager; ConfigMode mConfigMode; // It is actually real config mode. @@ -155,7 +163,6 @@ class PSysDAG { Mutex mOngoingPalMapLock; // first is sequence id, second is a set of stream id std::map> mOngoingPalMap; - bool mRunAicAfterQbuf; /** * The relationship mapping between DAG's port and executors port. diff --git a/src/core/psysprocessor/PipeLiteExecutor.cpp b/src/core/psysprocessor/PipeLiteExecutor.cpp index 35f98dc8..d9c16947 100644 --- a/src/core/psysprocessor/PipeLiteExecutor.cpp +++ b/src/core/psysprocessor/PipeLiteExecutor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,7 +48,8 @@ static const int32_t sSisKernels[] = {ia_pal_uuid_isp_sis_1_0_a}; PipeLiteExecutor::PipeLiteExecutor(int cameraId, const ExecutorPolicy& policy, vector exclusivePGs, PSysDAG* psysDag, shared_ptr gc) - : mCameraId(cameraId), + : ISchedulerNode(policy.exeName.c_str()), + mCameraId(cameraId), mStreamId(-1), mName(policy.exeName), mPGNames(policy.pgList), @@ -63,7 +64,9 @@ PipeLiteExecutor::PipeLiteExecutor(int cameraId, const ExecutorPolicy& policy, mLastStatsSequence(-1), mExclusivePGs(exclusivePGs), mPSysDag(psysDag), - mkernelsCountWithStats(0) { + mkernelsCountWithStats(0), + mMsOfPsysAlignWithSystem(0) { + mMsOfPsysAlignWithSystem = PlatformData::getMsOfPsysAlignWithSystem(mCameraId); } PipeLiteExecutor::~PipeLiteExecutor() { @@ -383,7 +386,8 @@ int PipeLiteExecutor::setInputTerminals(const std::map& sourceTerm int PipeLiteExecutor::start() { LOG1("%s executor:%s", __func__, mName.c_str()); - mProcessThread = new ProcessThread(this); + // Need thread when PolicyManager takes responsibility. Otherwise Scheduler will handle. + if (mPolicyManager) mProcessThread = new ProcessThread(this); AutoMutex l(mBufferQueueLock); allocBuffers(); @@ -391,8 +395,10 @@ int PipeLiteExecutor::start() { mLastStatsSequence = -1; - mThreadRunning = true; - mProcessThread->run(mName.c_str(), PRIORITY_NORMAL); + if (mProcessThread) { + mThreadRunning = true; + mProcessThread->run(mName.c_str(), PRIORITY_NORMAL); + } return OK; } @@ -400,11 +406,11 @@ int PipeLiteExecutor::start() { void PipeLiteExecutor::stop() { LOG1("%s executor:%s", __func__, mName.c_str()); - mProcessThread->requestExitAndWait(); + if (mProcessThread) mProcessThread->requestExitAndWait(); // Thread is not running. It is safe to clear the Queue clearBufferQueues(); - delete mProcessThread; + if (mProcessThread) delete mProcessThread; // Clear the buffer pool of pg Uint for (auto& unit : mPGExecutors) { @@ -415,6 +421,7 @@ void PipeLiteExecutor::stop() { void PipeLiteExecutor::notifyStop() { LOG1("%s executor:%s", __func__, mName.c_str()); + if (!mProcessThread) return; mProcessThread->requestExit(); { @@ -526,6 +533,34 @@ bool PipeLiteExecutor::hasValidBuffers(const CameraBufferPortMap& buffers) { return false; } +bool PipeLiteExecutor::fetchBuffersInQueue(map>& cInBuffer, + map>& cOutBuffer) { + for (auto& input : mInputQueue) { + Port port = input.first; + CameraBufQ& inputQueue = input.second; + if (inputQueue.empty()) { + LOG2("%s: No buffer input port %d", __func__, port); + cInBuffer.clear(); + return false; + } + cInBuffer[port] = inputQueue.front(); + } + + for (auto& output : mOutputQueue) { + Port port = output.first; + CameraBufQ& outputQueue = output.second; + if (outputQueue.empty()) { + LOG2("%s: No buffer output port %d", __func__, port); + cInBuffer.clear(); + cOutBuffer.clear(); + return false; + } + + cOutBuffer[port] = outputQueue.front(); + } + return true; +} + int PipeLiteExecutor::processNewFrame() { PERF_CAMERA_ATRACE(); @@ -534,14 +569,20 @@ int PipeLiteExecutor::processNewFrame() { // Wait frame buffers. { ConditionLock lock(mBufferQueueLock); - ret = waitFreeBuffersInQueue(lock, inBuffers, outBuffers); - // Already stopped - if (!mThreadRunning) return -1; + if (mPolicyManager) { + // Prepare frames at first, then mPolicyManager decides when to run + ret = waitFreeBuffersInQueue(lock, inBuffers, outBuffers); + // Already stopped + if (!mThreadRunning) return -1; - if (ret != OK) return OK; // Wait frame buffer error should not involve thread exit. + if (ret != OK) return OK; // Wait frame buffer error should not involve thread exit. - CheckAndLogError(inBuffers.empty() || outBuffers.empty(), UNKNOWN_ERROR, - "Failed to get input or output buffers."); + CheckAndLogError(inBuffers.empty() || outBuffers.empty(), UNKNOWN_ERROR, + "Failed to get input or output buffers."); + } else { + // Triggered by scheduler, will run if frames are ready + if (!fetchBuffersInQueue(inBuffers, outBuffers)) return OK; + } for (auto& output : mOutputQueue) { output.second.pop(); @@ -580,6 +621,33 @@ int PipeLiteExecutor::processNewFrame() { v4l2_buffer_t inV4l2Buf = *inBuf->getV4L2Buffer().Get(); TuningMode tuningMode = mPSysDag->getTuningMode(inBufSequence); + // HDR_FEATURE_S + // Prepare the ipu parameters before run pipe + // TODO remove it when 4k ull pipe run faster + if ((tuningMode == TUNING_MODE_VIDEO_HDR) || (tuningMode == TUNING_MODE_VIDEO_HDR2)) { + mPSysDag->prepareIpuParams(inBufSequence); + } + // HDR_FEATURE_E + + // Check if system scheduling +// Allow +/- 3ms delay +#define SYS_TRIGGER_DELTA (3) + if (mMsOfPsysAlignWithSystem) { + timeval curTime; + gettimeofday(&curTime, nullptr); + int64_t ms = (curTime.tv_usec / 1000) % mMsOfPsysAlignWithSystem; + int64_t waitMs = 0; + + if ((ms <= SYS_TRIGGER_DELTA) || ((mMsOfPsysAlignWithSystem - ms) <= SYS_TRIGGER_DELTA)) + waitMs = 0; + else + waitMs = mMsOfPsysAlignWithSystem - ms; + + LOG1("%s: current %ld (%ld), need wait %ld to trigger", mName.c_str(), + curTime.tv_usec / 1000, ms, waitMs); + if (waitMs) usleep(waitMs * 1000); + } + LOG2("%s:Id:%d run pipe start for buffer:%ld", mName.c_str(), mCameraId, inBufSequence); // FRAME_SYNC_S @@ -733,7 +801,7 @@ int PipeLiteExecutor::runPipe(map>& inBuffers, unit.inputBuffers.begin()->second->setSequence(sequence); // Currently PG handles one stats buffer only ret = unit.pg->iterate(unit.inputBuffers, unit.outputBuffers, - (statsCount > 0) ? pgStatsDatas[0] : nullptr, ipuParameters); + pgStatsDatas.empty() ? nullptr : pgStatsDatas[0], ipuParameters); CheckAndLogError((ret != OK), ret, "%s: pipe iteration error %d", mName.c_str(), ret); if (CameraDump::isDumpTypeEnable(DUMP_PSYS_INTERM_BUFFER)) { @@ -837,14 +905,6 @@ int PipeLiteExecutor::notifyStatsDone(TuningMode tuningMode, const v4l2_buffer_t if (!statsBuf) continue; if (mStreamId != VIDEO_STREAM_ID) { - // DVS Zoom without STAT buffer. - { - EventData eventData; - eventData.type = EVENT_DVS_READY; - eventData.data.dvsRunReady.streamId = mStreamId; - notifyListeners(eventData); - } - if (!PlatformData::isStillOnlyPipeEnabled(mCameraId)) { LOG2("%s: Drop still pipe statistics data", __func__); releaseStatsBuffer(statsBuf); @@ -869,7 +929,7 @@ int PipeLiteExecutor::notifyStatsDone(TuningMode tuningMode, const v4l2_buffer_t // Decode the statistics data if (eventType[statsIndex] == EVENT_PSYS_STATS_BUF_READY) { - mAdaptor->decodeStatsData(tuningMode, statsBuf, mGraphConfig); + mAdaptor->decodeStatsData(tuningMode, statsBuf, mStreamId); psysStatBufferCount--; } @@ -942,6 +1002,7 @@ int PipeLiteExecutor::allocBuffers() { mPGBuffers[termDesc.sourceTerminal] = buf; } + int bufCount = PlatformData::getMaxRequestsInflight(mCameraId); for (auto& unit : mPGExecutors) { // Assign internal buffers for terminals of PGs according to connection for (auto& terminal : unit.inputTerminals) { @@ -960,7 +1021,7 @@ int PipeLiteExecutor::allocBuffers() { if (!statsBufferCount) { continue; } - for (unsigned int i = 0; i < MAX_BUFFER_COUNT * statsBufferCount; i++) { + for (unsigned int i = 0; i < bufCount * statsBufferCount; i++) { shared_ptr statsBuf = CameraBuffer::create( mCameraId, BUFFER_USAGE_PSYS_STATS, V4L2_MEMORY_USERPTR, sizeof(ia_binary_data), i); CheckAndLogError(!statsBuf, NO_MEMORY, "Executor %s: Allocate stats buffer failed", @@ -992,7 +1053,7 @@ int PipeLiteExecutor::allocBuffers() { PGCommon::getFrameSize(srcFmt, srcWidth, srcHeight, false, true, true) : PGCommon::getFrameSize(srcFmt, srcWidth, srcHeight, true); - for (int i = 0; i < MAX_BUFFER_COUNT; i++) { + for (int i = 0; i < bufCount; i++) { // Prepare internal frame buffer for its producer. shared_ptr buf = CameraBuffer::create(mCameraId, BUFFER_USAGE_PSYS_INPUT, V4L2_MEMORY_USERPTR, @@ -1088,7 +1149,7 @@ void PipeLiteExecutor::getTerminalBuffersFromExternal( } void PipeLiteExecutor::dumpPGs() const { - if (!Log::isLogTagEnabled(GET_FILE_SHIFT(PipeLiteExecutor))) return; + if (!Log::isLogTagEnabled(GET_FILE_SHIFT(PipeLiteExecutor), CAMERA_DEBUG_LOG_LEVEL3)) return; LOG3("============= dump PGs for executor %s =================", getName()); if (mIsInputEdge) { diff --git a/src/core/psysprocessor/PipeLiteExecutor.h b/src/core/psysprocessor/PipeLiteExecutor.h index 4e3bdd94..4e0eab02 100644 --- a/src/core/psysprocessor/PipeLiteExecutor.h +++ b/src/core/psysprocessor/PipeLiteExecutor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ #include "Parameters.h" #include "PolicyManager.h" #include "ShareReferBufferPool.h" +#include "ISchedulerNode.h" #include "psysprocessor/PGCommon.h" namespace icamera { @@ -37,7 +38,7 @@ class PSysDAG; typedef std::map> CameraBufferPortMap; -class PipeLiteExecutor : public BufferQueue { +class PipeLiteExecutor : public BufferQueue, public ISchedulerNode { public: PipeLiteExecutor(int cameraId, const ExecutorPolicy& policy, std::vector exclusivePGs, PSysDAG* psysDag, @@ -79,7 +80,8 @@ class PipeLiteExecutor : public BufferQueue { bool isInputEdge() { return mIsInputEdge; } bool isOutputEdge() { return mIsOutputEdge; } - const char* getName() const { return mName.c_str(); } + // ISchedulerNode + virtual bool process(int64_t triggerId) { return processNewFrame() == OK; } private: DISALLOW_COPY_AND_ASSIGN(PipeLiteExecutor); @@ -137,6 +139,9 @@ class PipeLiteExecutor : public BufferQueue { void dumpPGs() const; private: + bool fetchBuffersInQueue(std::map>& cInBuffer, + std::map>& cOutBuffer); + int processNewFrame(); int runPipe(std::map>& inBuffers, std::map>& outBuffers, @@ -198,6 +203,8 @@ class PipeLiteExecutor : public BufferQueue { CameraBufferPortMap mInternalOutputBuffers; int mkernelsCountWithStats; + + int mMsOfPsysAlignWithSystem; }; typedef PipeLiteExecutor PipeExecutor; diff --git a/src/core/psysprocessor/PolicyManager.cpp b/src/core/psysprocessor/PolicyManager.cpp index 0b3f89b2..88e34427 100644 --- a/src/core/psysprocessor/PolicyManager.cpp +++ b/src/core/psysprocessor/PolicyManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2022 Intel Corporation + * Copyright (C) 2017-2024 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ #include "PolicyManager.h" +#include "AiqResultStorage.h" #include "iutils/Errors.h" #include "iutils/CameraLog.h" @@ -141,15 +142,23 @@ int PolicyManager::wait(std::string executorName, int64_t sequence) { bundle->mWaitingCount++; + int64_t waitDuration = 66000000; // 66ms + const AiqResult* aiqResult = AiqResultStorage::getInstance(mCameraId)->getAiqResult(sequence); + if (aiqResult && aiqResult->mAiqParam.aeFpsRange.min >= 30.0) { + waitDuration = 33000000; // 33ms + } + /** * If waiting count less than total executor number in the bundle, it means * we need to wait for other executors to run with them together. */ if (bundle->mWaitingCount < bundle->mExecutorNum) { LOG2("%s: need wait for other executors.", executorName.c_str()); - const int64_t kWaitDuration = 66000000; // 66ms - int ret = bundle->mCondition.waitRelative(lock, kWaitDuration * SLOWLY_MULTIPLIER); - CheckWarning(ret == TIMED_OUT, ret, "%s: wait executors timeout", executorName.c_str()); + int ret = bundle->mCondition.waitRelative(lock, waitDuration * SLOWLY_MULTIPLIER); + if (ret == TIMED_OUT) { + LOG2("%s: wait executors timeout", executorName.c_str()); + return ret; + } } else { bundle->mWaitingCount = 0; bundle->mCondition.broadcast(); diff --git a/src/evcp/EvcpCommon.h b/src/evcp/EvcpCommon.h deleted file mode 100644 index 94215a85..00000000 --- a/src/evcp/EvcpCommon.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.||g/licenses/LICENSE-2.0 - * - * Unless required by applicable law || agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES || CONDITIONS OF ANY KIND, either express || implied. - * See the License f|| the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#define FNLEN 256 - -struct EvcpParam { - bool evcpEccEnabled; - bool evcpBdEnabled; - bool evcpEnableTurbo; - bool evcpPowerSave; - - bool evcpBGConcealment; - bool evcpBGReplacement; - bool evcpFaceBea; - bool evcpFaceFra; - - uint32_t evcpBGBufferHandle; - char evcpBGFileName[FNLEN]; -}; - -static bool inline evcpParamCmp(const EvcpParam* p1, const EvcpParam* p2) { - if (p1->evcpEccEnabled != p2->evcpEccEnabled || p1->evcpBdEnabled != p2->evcpBdEnabled || - p1->evcpBGConcealment != p2->evcpBGConcealment || - p1->evcpBGReplacement != p2->evcpBGReplacement || p1->evcpFaceFra != p2->evcpFaceFra || - p1->evcpBGBufferHandle != p2->evcpBGBufferHandle) { - return false; - } - return true; -} - -typedef EvcpParam ECCParam; - -struct EvcpRunParam { - void* bufferHandle; -}; - -struct EvcpResolution { - int32_t width; - int32_t height; -}; - -struct EvcpRunInfo { - int32_t inHandle; - uint32_t bufSize; -}; - -#define MAX_STORE_EVCP_DATA_BUF_NUM 10 diff --git a/src/evcp/EvcpManager.cpp b/src/evcp/EvcpManager.cpp deleted file mode 100644 index f056f580..00000000 --- a/src/evcp/EvcpManager.cpp +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright (C) 2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG EvcpManager - -#include "src/evcp/EvcpManager.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "PlatformData.h" -#include "core/CameraBuffer.h" -#include "iutils/CameraLog.h" -#include "iutils/Utils.h" - -namespace icamera { -std::unordered_map EvcpManager::sInstances; -std::unordered_map EvcpManager::mLatestParam; -Mutex EvcpManager::sLock; -Mutex EvcpManager::sParamLock; - -EvcpManager* EvcpManager::getInstance(int cameraId) { - AutoMutex lock(sLock); - - if (sInstances.find(cameraId) == sInstances.end()) { - return nullptr; - } - - return sInstances[cameraId]; -} - -bool EvcpManager::createInstance(int cameraId, int width, int height) { - AutoMutex lock(sLock); - if (sInstances.find(cameraId) == sInstances.end()) { - EvcpManager* thr = new EvcpManager(cameraId, width, height, nullptr); - bool r = thr->init(); - if (!r) { - delete thr; - return false; - } - sInstances[cameraId] = thr; - } - - return true; -} - -void EvcpManager::destoryInstance(int cameraId) { - AutoMutex lock(sLock); - - if (sInstances.find(cameraId) != sInstances.end()) { - delete sInstances[cameraId]; - sInstances.erase(cameraId); - } -} - -EvcpManager::EvcpManager(int cameraId, int width, int height, EvcpParam* evcpParam) - : mCameraId(cameraId), - mWidth(width), - mHeight(height) {} - -bool EvcpManager::init() { - mEvcp = std::unique_ptr(new IntelEvcp()); - int ret = mEvcp->init(mWidth, mHeight); - CheckAndLogError(ret != OK, false, "$%s: mEvcp init fails, ret %d", __func__, ret); - - return mEvcp->updateEvcpParam(&mLatestParam[mCameraId]); -} - -bool EvcpManager::checkingStatus() { - AutoMutex lock(sParamLock); - - if (!mLatestParam[mCameraId].evcpEccEnabled && !mLatestParam[mCameraId].evcpBGConcealment && - !mLatestParam[mCameraId].evcpFaceBea && !mLatestParam[mCameraId].evcpFaceFra) { - return false; - } - - return true; -} - -bool EvcpManager::saveNV12Img(int fd, int width, int height, char* filename) { - std::string fn; - - struct stat sb; - if (::fstat(fd, &sb)) return false; - - int filesize = sb.st_size; - - void* p = ::mmap(nullptr, filesize, PROT_READ, MAP_SHARED, fd, 0); - - if (p == MAP_FAILED) return false; - - fn = "/run/camera/Babun_"; - fn += std::to_string(width); - fn += "x"; - fn += std::to_string(height); - fn += ".NV12"; - - std::fstream ofs; - ofs.open(fn, std::ios::out | std::ios::binary | std::ios::trunc); - if (!ofs.is_open()) { - ::munmap(p, filesize); - return false; - } - - ofs.write(reinterpret_cast(p), filesize); - - ::munmap(p, filesize); - ::strncpy(filename, fn.c_str(), FNLEN); - - return true; -} - -EvcpParam EvcpManager::getParamFromExp(const icamera::Parameters* param) { - EvcpParam earam = {}; - - uint8_t eccEnable, bcMode, ffMode; - int w, h, bgFD; - - param->getEvcpEccMode(&eccEnable); - param->getEvcpBCMode(&bcMode); - param->getEvcpBRParameters(&w, &h, &bgFD); - param->getEvcpFFMode(&ffMode); - - earam.evcpEccEnabled = eccEnable; - if (bcMode == INTEL_VENDOR_CAMERA_IC_BC_MODE_BLUR) { - earam.evcpBGConcealment = true; - } else if (bcMode == INTEL_VENDOR_CAMERA_IC_BC_MODE_REPLACEMENT) { - earam.evcpBGConcealment = true; - earam.evcpBGReplacement = true; - - if (bgFD > 0) { - earam.evcpBGBufferHandle = bgFD; - if (saveNV12Img(bgFD, w, h, earam.evcpBGFileName) == false) { - earam.evcpBGConcealment = false; - earam.evcpBGReplacement = false; - earam.evcpBGBufferHandle = -1; - earam.evcpBGFileName[0] = '\0'; - } - } - } - earam.evcpFaceFra = ffMode == INTEL_VENDOR_CAMERA_IC_FF_MODE_AUTO; - - return earam; -} - -void EvcpManager::prepare4Param(icamera::Parameters* param) { - EvcpParam curParam = getEvcpParam(); - EvcpParam expParam = getParamFromExp(param); - - if (!evcpParamCmp(&curParam, &expParam)) updateEvcpParam(expParam); -} - -void EvcpManager::runEvcp(const camera_buffer_t& buffer, icamera::Parameters* param) { - prepare4Param(param); - if (checkingStatus() == false) return; - - runEvcpL(buffer); -} - -void EvcpManager::runEvcpL(const camera_buffer_t& buffer) { - int size = buffer.s.size; - - nsecs_t startTime = CameraUtils::systemTime(); - -#ifdef ENABLE_SANDBOXING - bool ret = mEvcp->runEvcpFrame(buffer.dmafd, size); -#else - void* pBuf = (buffer.s.memType == V4L2_MEMORY_DMABUF) ? - CameraBuffer::mapDmaBufferAddr(buffer.dmafd, size) : - buffer.addr; - - bool ret = mEvcp->runEvcpFrame(pBuf, size); - - if (buffer.s.memType == V4L2_MEMORY_DMABUF) { - CameraBuffer::unmapDmaBufferAddr(pBuf, size); - } -#endif - - if (ret == false) { - LOGW("@%s Evcp run frame fails", __func__); - } - - LOG2("@%s: ret:%s, Evcp takes %ums", __func__, ret ? "true" : "false", - (unsigned)((CameraUtils::systemTime() - startTime) / 1000000)); -} - -bool EvcpManager::updateEvcpParam(EvcpParam evcpParam) { - if (mEvcp->updateEvcpParam(&evcpParam)) { - AutoMutex lock(sParamLock); - mLatestParam[mCameraId] = evcpParam; - - return true; - } - - return false; -} - -EvcpParam EvcpManager::getEvcpParam() const { - AutoMutex lock(sParamLock); - - return mLatestParam[mCameraId]; -} - -} // namespace icamera diff --git a/src/evcp/EvcpManager.h b/src/evcp/EvcpManager.h deleted file mode 100644 index 9e44027e..00000000 --- a/src/evcp/EvcpManager.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#ifdef ENABLE_SANDBOXING -#include "modules/sandboxing/client/IntelEvcpClient.h" -#else -#include "modules/algowrapper/IntelEvcp.h" -#endif - -#include -#include -#include - -#include "EvcpCommon.h" -#include "Parameters.h" -#include "iutils/Errors.h" -#include "iutils/Thread.h" -#include "iutils/Utils.h" - -namespace icamera { -class IntelECC; - -class EvcpManager { - public: - EvcpManager(int cameraId, int width, int height, EvcpParam* evcpParam); - ~EvcpManager() {} - - static bool createInstance(int cameraId, int width, int height); - static EvcpManager* getInstance(int cameraId); - static void destoryInstance(int cameraId); - - void runEvcp(const camera_buffer_t& buffer, icamera::Parameters* param); - bool updateEvcpParam(EvcpParam evcpParam); - EvcpParam getEvcpParam() const; - - private: - void runEvcpL(const camera_buffer_t& buffer); - bool init(); - bool checkingStatus(); - void prepare4Param(icamera::Parameters* param); - EvcpParam getParamFromExp(const icamera::Parameters* param); - bool saveNV12Img(int fd, int width, int height, char* filename); - - static Mutex sLock; - static std::unordered_map sInstances; - - static Mutex sParamLock; - static std::unordered_map mLatestParam; - - int mCameraId; - - std::unique_ptr mEvcp; - - int mWidth; - int mHeight; - - DISALLOW_COPY_AND_ASSIGN(EvcpManager); -}; - -} // namespace icamera diff --git a/src/evcp/UltraManEvcp.cpp b/src/evcp/UltraManEvcp.cpp deleted file mode 100644 index 35f2057d..00000000 --- a/src/evcp/UltraManEvcp.cpp +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Copyright (C) 2021 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG UltraManEvcp - -#include "src/evcp/UltraManEvcp.h" - -#include -#include - -#include - -#include "iutils/CameraLog.h" -#include "iutils/Thread.h" -#include "iutils/Utils.h" - -#define EVCP_SUCCESS 0 -#define LIBEVCP_NAME "libevcp.so" - -namespace icamera { - -UltraManEvcp::UltraManEvcp(int width, int height) - : mCurrWidth(width), - mCurrHeight(height), - mFrameCount(0), - mEccEnabled(false), - mDimmerEnabled(false), - mLowPowerMode(false), - mMdfTurbo(false), - mEvcpBGConcelment(false), - mEvcpBGReplacement(false), - mFaceBea(false), - mFaceFra(false), - mCtx(nullptr), - mInit(false), - mHandleEvcpLib(nullptr) {} - -bool UltraManEvcp::init() { - setenv("NoJitter", "1", 1); - setenv("EccTaskOverwhelm", "0 1,0 1", 1); - - memset(&mApi, 0, sizeof(mApi)); - - mDevice = getSystemCMDevice(); - CheckAndLogError(mDevice == nullptr, false, "$%s:CMDevice is nullptr", __func__); - - loadEvcpLibrary(); - CheckAndLogError(mApi.EvcpCreate == nullptr, false, "$%s:Cannot call Evcp ctor", __func__); - - mCtx = mApi.EvcpCreate(mCurrWidth, mCurrHeight, mDevice, 1); - CheckAndLogError(mCtx == nullptr, false, "$%s:Evcp context is nullptr", __func__); - - mInit = true; - return true; -} - -UltraManEvcp::~UltraManEvcp() { - if (!mInit) return; - - mInit = false; - if (mCtx && mApi.EvcpDestroy) { - LOG1("@%s EVCP Shutdown ", __func__); - mApi.EvcpDestroy(mCtx); - } - ::DestroyCmDevice(mDevice); - CameraUtils::dlcloseLibrary(mHandleEvcpLib); - mHandleEvcpLib = nullptr; -} - -bool UltraManEvcp::checkEVCPBackgroundURL(const std::string& name) const { - if (name.empty()) { - LOGW("%s, FileName empty ", __func__); - return true; - } - if (access(name.c_str(), R_OK) != 0) { - LOGE("%s, Cannot read file: [%s]", __func__, name.c_str()); - return false; - } - - std::size_t pos; - pos = name.find_last_of("_"); - if (pos == std::string::npos) { - LOGW("%s, Malform filename: %s", __func__, name.c_str()); - return true; - } - - std::size_t extPos; - extPos = name.find(".nv12"); - if (pos == std::string::npos) { - LOGW("%s, Malform filename: %s", __func__, name.c_str()); - return true; - } - - if (extPos - pos <= 3) { - LOGW("%s, Malform filename: %s", __func__, name.c_str()); - return true; - } - - std::string sizeInfo = name.substr(pos + 1, extPos - pos - 1); - - std::size_t xPos = sizeInfo.find('x'); - int width = std::atol(std::string(sizeInfo.begin(), sizeInfo.begin() + xPos).c_str()); - int height = std::atol(sizeInfo.data() + xPos + 1); - - if ((width != mCurrWidth) || (height != mCurrHeight)) { - LOGW("%s Size mismatch, width = %d, height = %, mCurrHeight = %d, mCurrHeight = %d", - __func__, width, height, mCurrWidth, mCurrHeight); - } - - return true; -} - -bool UltraManEvcp::isEvcpEnable() const { - return isEccEnabled() || isBGConcelment() || isFaceBeaEnable() || isFaceFraEnable(); -} - -bool UltraManEvcp::processFrame(CmSurface2DUP* pSample) { - if (!isEvcpEnable()) { - return true; - } - - if (!mApi.EvcpProcessFrame || !mCtx) { - LOGE("%s, Evcp function error.", __func__); - return false; - } - - bool lockStatus = mCritMutexEccObject.try_lock(); - CheckAndLogError(lockStatus == false, false, "%s return as lock is occupied by others", - __func__); - - if (mApi.EvcpProcessFrame(&mCtx, pSample, pSample) == EVCP_SUCCESS) { - mFrameCount++; - mCritMutexEccObject.unlock(); - return true; - } - - // Not a fatal error - LOGW("%s EvcpProcessFrame BAD", __func__); - mCritMutexEccObject.unlock(); - return true; -} - -bool UltraManEvcp::updateEvcpInfo(const EvcpParam* param) { - if (!param->evcpBGConcealment && param->evcpBGReplacement) { - LOGW("%s EvcpBGConcealment and EvcpBGReplacement conflict", __func__); - return false; - } - - if (strlen(param->evcpBGFileName) && - !checkEVCPBackgroundURL(std::string(param->evcpBGFileName))) { - LOGE("%s checkEVCPBackgroundURL FAILED", __func__); - return false; - } - - bool res = flushStatus(param); - if (!res) LOGE("%s flushStatus FAILED", __func__); - - LOG1("@%s ECC [%d], DIM [%d], LP [%d], TURBO [%d] CON [%d] REPL [%d], FB[%d], FF[%d]", __func__, - mEccEnabled, mDimmerEnabled, mLowPowerMode, mMdfTurbo, mEvcpBGConcelment, - mEvcpBGReplacement, mFaceBea, mFaceFra); - - return true; -} - -bool UltraManEvcp::loadEvcpLibrary() { - mHandleEvcpLib = CameraUtils::dlopenLibrary(LIBEVCP_NAME, RTLD_NOW); - CheckAndLogError(!mHandleEvcpLib, false, "mHandleEvcpLib is nullptr"); -#ifndef TIGA -#define TIGA(member, fn_name) \ - do { \ - mApi.member = \ - (EVCP_API_HANDLE::pFn##member)CameraUtils::dlsymLibrary(mHandleEvcpLib, #fn_name); \ - if (mApi.member == nullptr) { \ - LOG1("@%s: LOADING " #fn_name "failed for member", __func__); \ - } \ - LOG1("@%s: " #fn_name "= %x", __func__, mApi.member); \ - } while (0) -#endif - TIGA(EvcpCreate, evcp_create_context); - TIGA(EvcpDestroy, evcp_destroy_context); - TIGA(EvcpToggleEcc, evcp_toggle_ecc); - TIGA(EvcpSetMdfTurbo, evcp_set_mdf_turbo); - TIGA(EvcpSetVerbose, evcp_set_verbose); - TIGA(EvcpSetPowerSavingMode, evcp_set_power_saving_mode); - TIGA(EvcpProcessFrame, evcp_process_frame3); - TIGA(EvcpProcessFrame2D, evcp_process_frame2); - TIGA(EvcpSetBackGroundURL, evcp_set_background_url); - TIGA(EvcpToggleBackgroundConcelment, evcp_toggle_background_concealment); - TIGA(EvcpToggleBackgroundReplacement, evcp_toggle_background_replacement); - TIGA(EvcpSetFaceBea, evcp_toggle_face_beautify); - TIGA(EvcpSetFaceFra, evcp_toggle_face_centering); -#undef TIGA - - return true; -} - -bool UltraManEvcp::setEvcpEnable(bool v) { - bool res = false; - - if (mApi.EvcpToggleEcc) { - LOG1("%s mEccEnabled will setting to %d", __func__, (int)v); - if (mApi.EvcpToggleEcc(mCtx, static_cast(v)) == EVCP_SUCCESS) { - mEccEnabled = v; - res = true; - } - } - return res; -} - -bool UltraManEvcp::setEvcpPowerSavingMode(bool v) { - bool res = false; - - if (mApi.EvcpSetPowerSavingMode) { - LOG1("%s mEvcpSetPowerSavingMode setting to %d", __func__, (int)v); - if (mApi.EvcpSetPowerSavingMode(mCtx, static_cast(v)) == EVCP_SUCCESS) { - mLowPowerMode = v; - res = true; - } - } - return res; -} - -bool UltraManEvcp::setEvcpSetMdfTurbo(bool v) { - bool res = false; - - if (mApi.EvcpSetMdfTurbo) { - LOG1("%s mMdfTurbo setting to %d", __func__, (int)v); - if (mApi.EvcpSetMdfTurbo(mCtx, static_cast(v)) == EVCP_SUCCESS) { - mMdfTurbo = v; - res = true; - } - } - return res; -} - -bool UltraManEvcp::setEvcpFaceBea(bool v) { - bool res = false; - - if (mApi.EvcpSetFaceBea) { - LOG1("%s EvcpSetFaceBea setting to %d", __func__, (int)v); - if (mApi.EvcpSetFaceBea(mCtx, static_cast(v)) == EVCP_SUCCESS) { - mFaceBea = v; - res = true; - } - } - return res; -} - -bool UltraManEvcp::setEvcpFaceFra(bool v) { - bool res = false; - - if (mApi.EvcpSetFaceFra) { - LOG1("%s FF will setting to %d", __func__, (int)v); - if (mApi.EvcpSetFaceFra(mCtx, static_cast(v)) == EVCP_SUCCESS) { - mFaceFra = v; - res = true; - } - } - return res; -} - -bool UltraManEvcp::setEvcpConcelment(bool con, bool replace, const char* filePath) { - bool res = true; - - if (mApi.EvcpToggleBackgroundConcelment) { - if (mApi.EvcpToggleBackgroundConcelment(mCtx, static_cast(con)) == EVCP_SUCCESS) { - LOG1("%s setEvcpConcelment OK", __func__); - mEvcpBGConcelment = con; - if (!mEvcpBGConcelment) mEvcpBGReplacement = false; - } else { - LOGE("%s setEvcpConcelment FAILED", __func__); - res = false; - } - } - - if (res && mApi.EvcpToggleBackgroundReplacement) { - res = setEvcpReplacement(replace, filePath); - if (res == false) { - LOGE("%s setEvcpReplacement FAILED", __func__); - } - } - - return res; -} - -bool UltraManEvcp::setEvcpReplacement(bool replace, const char* filePath) { - bool res = true; - - if (filePath) { - if (mApi.EvcpSetBackGroundURL(mCtx, filePath) == EVCP_SUCCESS) { - LOG1("%s EvcpSetBackGroundURL OK", __func__); - mEvcpBackgroundURL = std::string(filePath); - } else { - LOGE("%s EvcpSetBackGroundURL FAILED", __func__); - res = false; - } - } else { - replace = false; - } - - if (res) { - if (mApi.EvcpToggleBackgroundReplacement(mCtx, static_cast(replace)) == EVCP_SUCCESS) { - LOG1("%s EvcpToggleBackgroundReplacement OK", __func__); - mEvcpBGReplacement = replace; - } else { - LOGE("%s EvcpToggleBackgroundReplacement FAILED", __func__); - res = false; - } - } - - return res; -} - -bool UltraManEvcp::flushStatus(const EvcpParam* param) { - AutoMutex lock(mCritMutexEccObject); - - if (mEccEnabled != param->evcpEccEnabled) { - bool res = setEvcpEnable(param->evcpEccEnabled); - CheckAndLogError(res != true, false, "%s: SetEvcpEnable fails, ret %d", __func__, - static_cast(res)); - } - - if (mLowPowerMode != param->evcpPowerSave) { - bool res = setEvcpPowerSavingMode(param->evcpPowerSave); - CheckAndLogError(res != true, false, "%s: SetEvcpPowerSavingMode fails, ret %d", __func__, - static_cast(res)); - } - - if (mMdfTurbo != param->evcpEnableTurbo) { - bool res = setEvcpSetMdfTurbo(param->evcpEnableTurbo); - CheckAndLogError(res != true, false, "%s: SetEvcpSetMdfTurbo fails, ret %d", __func__, - static_cast(res)); - } - - if (mEvcpBGConcelment != param->evcpBGConcealment || - (mEvcpBGConcelment && param->evcpBGReplacement != mEvcpBGReplacement) || - ((mEvcpBGConcelment && param->evcpBGReplacement == mEvcpBGReplacement && - mEvcpBackgroundURL != param->evcpBGFileName))) { - bool res = setEvcpConcelment(param->evcpBGConcealment, param->evcpBGReplacement, - param->evcpBGFileName); - CheckAndLogError(res != true, false, "%s: SetEvcpConcelment fails, ret %d", __func__, - static_cast(res)); - } - - if (mFaceBea != param->evcpFaceBea) { - bool res = setEvcpFaceBea(param->evcpFaceBea); - CheckAndLogError(res != true, false, "%s: SetFaceBea fails, ret %d", __func__, - static_cast(res)); - } - - if (mFaceFra != param->evcpFaceFra) { - bool res = setEvcpFaceFra(param->evcpFaceFra); - CheckAndLogError(res != true, false, "%s: SetFaceFra fails, ret %d", __func__, - static_cast(res)); - } - - return true; -} - -CmDevice* UltraManEvcp::getSystemCMDevice() { - unsigned int version = 0; - - if (CreateCmDevice(mDevice, version) != CM_SUCCESS) { - LOGE("%s CreateCmDevice Failed", __func__); - return nullptr; - } - - return mDevice; -} - -bool UltraManEvcp::createCMSurface2DUP(uint32_t width, uint32_t height, CM_SURFACE_FORMAT format, - void* sysMem, CmSurface2DUP*& surface) { - if (mDevice->CreateSurface2DUP(width, height, format, sysMem, surface) != CM_SUCCESS) { - LOGE("%s CreateSurface2DUP FAILED", __func__); - return false; - } - - return true; -} - -bool UltraManEvcp::destroyCMSurface2DUP(CmSurface2DUP*& surface) { - if (mDevice->DestroySurface2DUP(surface) != CM_SUCCESS) { - LOGE("%s destroyCMSurface2DUP FAILED", __func__); - return false; - } - - return true; -} - -} // namespace icamera diff --git a/src/evcp/UltraManEvcp.h b/src/evcp/UltraManEvcp.h deleted file mode 100644 index 49b68d7e..00000000 --- a/src/evcp/UltraManEvcp.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) 2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#include -#include - -#include "EvcpCommon.h" -#include "iutils/Utils.h" - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wbitfield-constant-conversion" -#pragma clang diagnostic ignored "-Wunused-private-field" -#pragma clang diagnostic ignored "-Werror" -// HANDLE is redefined in cm_rt.h, avoid the redefinition build error -#define HANDLE cancel_fw_pre_define -#include "igfxcmrt/cm_rt.h" - -#pragma clang diagnostic pop - -struct evcp_context; - -struct EVCP_API_HANDLE { -#define _DEF_FUNC(ret, name, ...) \ - typedef ret (*pFn##name)(__VA_ARGS__); \ - pFn##name name - - _DEF_FUNC(evcp_context*, EvcpCreate, int w, int h, void* hdl, int bit); - _DEF_FUNC(void, EvcpDestroy, evcp_context* ctx); - _DEF_FUNC(int, EvcpToggleEcc, evcp_context* ctx, int enable); - _DEF_FUNC(int, EvcpSetMdfTurbo, evcp_context* ctx, bool enable); - _DEF_FUNC(int, EvcpSetVerbose, evcp_context* ctx, int verbose); - _DEF_FUNC(int, EvcpSetPowerSavingMode, evcp_context* ctx, bool enable); - _DEF_FUNC(int, EvcpProcessFrame, evcp_context** ctx, CmSurface2DUP* src, CmSurface2DUP* dst); - _DEF_FUNC(int, EvcpProcessFrame2D, evcp_context** ctx, CmSurface2D* src, CmSurface2D* dst); - _DEF_FUNC(int, EvcpSetBackGroundURL, evcp_context* ctx, const char* path); - _DEF_FUNC(int, EvcpToggleBackgroundConcelment, evcp_context* ctx, int enable); - _DEF_FUNC(int, EvcpToggleBackgroundReplacement, evcp_context* ctx, int enable); - _DEF_FUNC(int, EvcpSetFaceBea, evcp_context* ctx, int enable); - _DEF_FUNC(int, EvcpSetFaceFra, evcp_context* ctx, int enable); -#undef _DEF_FUNC -}; - -namespace icamera { - -class UltraManEvcp { - public: - UltraManEvcp(int width, int height); - bool init(); - - virtual ~UltraManEvcp(); - bool updateEvcpInfo(const EvcpParam* param); - bool processFrame(CmSurface2DUP* pSample); - - bool isEccEnabled() const { return mEccEnabled; } - bool isDimmerEnabled() const { return mDimmerEnabled; } - bool isLowPowerMode() const { return mLowPowerMode; } - bool isTurboOn() const { return mMdfTurbo; } - bool isBGConcelment() const { return mEvcpBGConcelment; } - bool isBGReplacement() const { return mEvcpBGReplacement; } - bool isFaceBeaEnable() const { return mFaceBea; } - bool isFaceFraEnable() const { return mFaceFra; } - std::string getBGFilePath() const { return mEvcpBackgroundURL; } - - bool createCMSurface2DUP(uint32_t width, uint32_t height, CM_SURFACE_FORMAT format, - void* sysMem, CmSurface2DUP*& surface); - - bool destroyCMSurface2DUP(CmSurface2DUP*& surface); - - private: - bool flushStatus(const EvcpParam* param); - bool checkEVCPBackgroundURL(const std::string& name) const; - - CmDevice* getSystemCMDevice(); - bool loadEvcpLibrary(); - - bool setEvcpEnable(bool v); - bool setEvcpPowerSavingMode(bool v); - bool setEvcpSetMdfTurbo(bool v); - bool setEvcpConcelment(bool con, bool replace, const char* filePath); - bool setEvcpReplacement(bool replace, const char* filePath); - bool isEvcpEnable() const; - std::string mEvcpBackgroundURL; - - bool setEvcpFaceBea(bool v); - bool setEvcpFaceFra(bool v); - - uint32_t mCurrWidth; - uint32_t mCurrHeight; - uint64_t mFrameCount; - bool mEccEnabled; - bool mDimmerEnabled; - bool mLowPowerMode; - bool mMdfTurbo; - - bool mEvcpBGConcelment; - bool mEvcpBGReplacement; - - bool mFaceBea; - bool mFaceFra; - - std::mutex mCritMutexEccObject; - EVCP_API_HANDLE mApi; - - evcp_context* mCtx; - CmDevice* mDevice; - bool mInit; - void* mHandleEvcpLib; - - DISALLOW_COPY_AND_ASSIGN(UltraManEvcp); -}; -} // namespace icamera diff --git a/src/fd/FaceDetection.cpp b/src/fd/FaceDetection.cpp index a68c51b5..50e23977 100644 --- a/src/fd/FaceDetection.cpp +++ b/src/fd/FaceDetection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -95,6 +95,8 @@ FaceDetection::~FaceDetection() { } bool FaceDetection::faceRunningByCondition() { + CheckAndLogError(mInitialized == false, false, "mInitialized is false"); + /* * FD runs 1 frame every mFDRunInterval frames. * And the default value of mFDRunInterval is mFDRunDefaultInterval @@ -139,7 +141,7 @@ bool FaceDetection::faceRunningByCondition() { } void FaceDetection::printfFDRunRate() { - if (!Log::isLogTagEnabled(ST_FPS)) return; + if (!Log::isLogTagEnabled(ST_FPS, CAMERA_DEBUG_LOG_LEVEL2)) return; mRunCount++; if (mRunCount % FPS_FD_COUNT != 0) return; @@ -157,8 +159,6 @@ void FaceDetection::runFaceDetection(const std::shared_ptr& ccBuf) = 0; static int getResult(int cameraId, cca::cca_face_state* faceState); static int getResult(int cameraId, CVFaceDetectionAbstractResult* result); + bool faceRunningByCondition(); protected: void printfFDRunRate(); @@ -95,7 +96,6 @@ class FaceDetection : public Thread { private: bool isInitialized() { return mInitialized; } - bool faceRunningByCondition(); void getCurrentFrameWidthAndHight(int* frameWidth, int* frameHigth); void getHalStreamId(int32_t* halStreamId); void initRatioInfo(struct RatioInfo* ratioInfo); @@ -132,6 +132,7 @@ class FaceDetection { #ifdef CAL_BUILD void runFaceDetection(const std::shared_ptr ccBuf) {} #endif + bool faceRunningByCondition() { return false; } }; #endif diff --git a/src/fd/facessd/FaceSSD.cpp b/src/fd/facessd/FaceSSD.cpp index 5ce78657..1468d174 100644 --- a/src/fd/facessd/FaceSSD.cpp +++ b/src/fd/facessd/FaceSSD.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,12 +17,14 @@ #define LOG_TAG FaceSSD #include "src/fd/facessd/FaceSSD.h" +#include #include #include #include #include "AiqUtils.h" #include "PlatformData.h" +#include "aal/FaceDetectionResultCallbackManager.h" #include "iutils/CameraLog.h" #include "iutils/Errors.h" #include "iutils/Utils.h" @@ -33,52 +35,47 @@ FaceSSD::FaceSSD(int cameraId, unsigned int maxFaceNum, int32_t halStreamId, int int gfxFmt, int usage) : FaceDetection(cameraId, maxFaceNum, halStreamId, width, height) { CLEAR(mResult); - int ret = initFaceDetection(width, height, gfxFmt, usage); - CheckAndLogError(ret != OK, VOID_VALUE, "failed to init face detection, ret %d", ret); -} - -FaceSSD::~FaceSSD() { - LOG1(" @%s", mCameraId, __func__); - - if (!PlatformData::isFaceEngineSyncRunning(mCameraId)) { - requestExit(); - AutoMutex l(mRunBufQueueLock); - mRunCondition.notify_one(); - } - - if (mBufferPool) { - mBufferPool->destroyBufferPool(); - } -} -int FaceSSD::initFaceDetection(int width, int height, int gfxFmt, int usage) { - mBufferPool = std::unique_ptr(new camera3::Camera3BufferPool()); - // Create the buffer pool with DMA handle buffer - int ret = mBufferPool->createBufferPool(mCameraId, MAX_STORE_FACE_DATA_BUF_NUM, width, height, - gfxFmt, usage); - CheckAndLogError(ret != icamera::OK, NO_MEMORY, "[%p]@%s Failed to createBufferPool.", this, - __func__); mFaceDetector = cros::FaceDetector::Create(); - - if (!PlatformData::isFaceEngineSyncRunning(mCameraId)) { - /* start face engine pthread */ - ret = run("fdSSD" + std::to_string(mCameraId), PRIORITY_NORMAL); - CheckAndLogError(ret != OK, NO_INIT, "Camera thread failed to start, ret %d", ret); - } + CheckAndLogError(!mFaceDetector, VOID_VALUE, "mFaceDetector is nullptr"); mInitialized = true; - return OK; } -std::shared_ptr FaceSSD::acquireRunCCBuf() { - std::shared_ptr buf = mBufferPool->acquireBuffer(); - CheckAndLogError(buf == nullptr, nullptr, "@%s no available internal buffer", __func__); - - return buf; +FaceSSD::~FaceSSD() { + mFaceDetector = nullptr; } -void FaceSSD::returnRunBuf(std::shared_ptr gbmRunBuf) { - mBufferPool->returnBuffer(gbmRunBuf); +void FaceSSD::faceDetectResult(cros::FaceDetectResult ret, + std::vector faces) { + AutoMutex l(mFaceResultLock); + CLEAR(mResult); + + if (ret == cros::FaceDetectResult::kDetectOk) { + std::vector sortFaces = faces; + std::sort(sortFaces.begin(), sortFaces.end(), + [](const human_sensing::CrosFace& a, const human_sensing::CrosFace& b) { + auto area1 = (a.bounding_box.x2 - a.bounding_box.x1) * + (a.bounding_box.y2 - a.bounding_box.y1); + auto area2 = (b.bounding_box.x2 - b.bounding_box.x1) * + (b.bounding_box.y2 - b.bounding_box.y1); + return area1 > area2; + }); + + int faceCount = 0; + for (auto& face : sortFaces) { + if (faceCount >= mMaxFaceNum) break; + mResult.faceSsdResults[faceCount] = face; + faceCount++; + LOG2("face result: box: %f,%f,%f,%f", face.bounding_box.x1, face.bounding_box.y1, + face.bounding_box.x2, face.bounding_box.y2); + } + mResult.faceNum = faceCount; + mResult.faceUpdated = true; + LOG2("@%s, faceNum:%d", __func__, mResult.faceNum); + } else { + LOGE("@%s, Faile to detect face", __func__); + } } void FaceSSD::runFaceDetectionBySync(const std::shared_ptr& ccBuf) { @@ -86,63 +83,58 @@ void FaceSSD::runFaceDetectionBySync(const std::shared_ptr faces; - cros::FaceDetectResult ret = mFaceDetector->Detect(*(ccBuf->getBufferHandle()), &faces); printfFDRunRate(); - LOG2("@%s: ret:%d, it takes need %ums", __func__, ret, - (unsigned)((CameraUtils::systemTime() - startTime) / 1000000)); - - { - AutoMutex l(mFaceResultLock); - CLEAR(mResult); - if (ret == cros::FaceDetectResult::kDetectOk) { - int faceCount = 0; - for (auto& face : faces) { - if (faceCount >= mMaxFaceNum) break; - mResult.faceSsdResults[faceCount] = face; - faceCount++; - } - mResult.faceNum = faceCount; - mResult.faceUpdated = true; - LOG2("@%s, faceNum:%d", __func__, mResult.faceNum); - } else { - LOGE("@%s, Faile to detect face", __func__); + + std::optional face_detection_result = + camera3::FaceDetectionResultCallbackManager::getInstance().getFaceDetectionResult( + mCameraId); + + if (face_detection_result) { + LOG2("FrameNum:%zu, run with the cros::FaceDetector from stream manipulator.", + face_detection_result->frame_number); + + auto array = PlatformData::getActivePixelArray(mCameraId); + camera_coordinate_system_t dst = {0, 0, mWidth, mHeight}; + int vCrop = 0; + int hCrop = 0; + int gap = (mWidth * (array.bottom - array.top) / (array.right - array.left)) - mHeight; + if (gap > 0) { + vCrop = gap; + } else if (gap < 0) { + hCrop = (mHeight * (array.right - array.left) / (array.bottom - array.top)) - mWidth; + } + + for (auto& face : face_detection_result->faces) { + camera_coordinate_t leftTop = {static_cast(face.bounding_box.x1) + hCrop / 2, + static_cast(face.bounding_box.y1) + vCrop / 2}; + leftTop = AiqUtils::convertCoordinateSystem(array, dst, leftTop); + face.bounding_box.x1 = leftTop.x; + face.bounding_box.y1 = leftTop.y; + camera_coordinate_t rightBottom = {static_cast(face.bounding_box.x2) + hCrop / 2, + static_cast(face.bounding_box.y2) + vCrop / 2}; + rightBottom = AiqUtils::convertCoordinateSystem(array, dst, rightBottom); + face.bounding_box.x2 = rightBottom.x; + face.bounding_box.y2 = rightBottom.y; } + + faceDetectResult(cros::FaceDetectResult::kDetectOk, face_detection_result->faces); + return; } + + int input_stride = ccBuf->stride(); + cros::Size input_size = cros::Size(ccBuf->width(), ccBuf->height()); + const uint8_t* buffer_addr = static_cast(ccBuf->data()); + + // base::Unretained is safe since 'this' joins 'face thread' in the destructor. + mFaceDetector->DetectAsync(buffer_addr, input_stride, input_size, std::nullopt, + base::BindOnce(&FaceSSD::faceDetectResult, base::Unretained(this))); } void FaceSSD::runFaceDetectionByAsync(const std::shared_ptr& ccBuf) { LOG2("@%s", __func__); CheckAndLogError(mInitialized == false, VOID_VALUE, "@%s, mInitialized is false", __func__); - std::shared_ptr bufferTmp = acquireRunCCBuf(); - CheckAndLogError(!bufferTmp || !bufferTmp->data(), VOID_VALUE, "No avalible buffer"); - MEMCPY_S(bufferTmp->data(), bufferTmp->size(), ccBuf->data(), ccBuf->size()); - - AutoMutex l(mRunBufQueueLock); - mRunGoogleBufQueue.push(bufferTmp); - mRunCondition.notify_one(); -} - -bool FaceSSD::threadLoop() { - std::shared_ptr faceParams = nullptr; - - { - ConditionLock lock(mRunBufQueueLock); - if (mRunGoogleBufQueue.empty()) { - mRunCondition.wait_for(lock, - std::chrono::nanoseconds(kMaxDuration * SLOWLY_MULTIPLIER)); - return true; - } - faceParams = mRunGoogleBufQueue.front(); - mRunGoogleBufQueue.pop(); - } - CheckAndLogError(!faceParams, false, "@%s, faceParams buffer is nullptr", __func__); - - runFaceDetectionBySync(faceParams); - returnRunBuf(faceParams); - return true; + runFaceDetectionBySync(ccBuf); } int FaceSSD::getFaceNum() { @@ -160,6 +152,7 @@ void FaceSSD::getResultFor3A(cca::cca_face_state* faceState) { faceState->is_video_conf = true; faceState->updated = mResult.faceUpdated; faceState->num_faces = faceSsdResult->faceNum; + faceState->fd_algo = GOOGLE_FD; mResult.faceUpdated = false; for (int i = 0; i < faceSsdResult->faceNum; i++) { diff --git a/src/fd/facessd/FaceSSD.h b/src/fd/facessd/FaceSSD.h index 5a649c47..6e4d16d7 100644 --- a/src/fd/facessd/FaceSSD.h +++ b/src/fd/facessd/FaceSSD.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,10 +19,7 @@ #include #include -#include -#include -#include "Camera3BufferPool.h" #include "FaceDetection.h" #include "IntelCCATypes.h" @@ -41,7 +38,6 @@ class FaceSSD : public FaceDetection { virtual void runFaceDetectionBySync(const std::shared_ptr& ccBuf); virtual void runFaceDetectionByAsync(const std::shared_ptr& ccBuf); - virtual bool threadLoop(); protected: virtual int getFaceNum(); @@ -49,18 +45,10 @@ class FaceSSD : public FaceDetection { virtual void getResultForApp(CVFaceDetectionAbstractResult* result); private: - int initFaceDetection(int width, int height, int gfxFmt, int usage); - std::shared_ptr acquireRunCCBuf(); - void returnRunBuf(std::shared_ptr gbmRunBuf); + void faceDetectResult(cros::FaceDetectResult ret, std::vector faces); - // Guard for running buffer queue of thread - std::queue> mRunGoogleBufQueue; - - std::unique_ptr mBufferPool; std::unique_ptr mFaceDetector; - FaceSSDResult mResult; - DISALLOW_COPY_AND_ASSIGN(FaceSSD); }; diff --git a/src/fd/pvl/FaceDetectionPVL.cpp b/src/fd/pvl/FaceDetectionPVL.cpp index 1b032890..c9d8b158 100644 --- a/src/fd/pvl/FaceDetectionPVL.cpp +++ b/src/fd/pvl/FaceDetectionPVL.cpp @@ -227,6 +227,7 @@ void FaceDetectionPVL::getResultFor3A(cca::cca_face_state* faceState) { faceState->is_video_conf = true; faceState->updated = mResult.faceUpdated; faceState->num_faces = pvlResult->faceNum; + faceState->fd_algo = PVL; mResult.faceUpdated = false; for (int i = 0; i < pvlResult->faceNum; i++) { diff --git a/src/hal/CameraHal.cpp b/src/hal/CameraHal.cpp index 710d86a2..acbeb064 100644 --- a/src/hal/CameraHal.cpp +++ b/src/hal/CameraHal.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,6 +46,10 @@ CameraHal::CameraHal() : mInitTimes(0), mState(HAL_UNINIT), mCameraOpenNum(0) { LOG1("@%s", __func__); CLEAR(mCameraDevices); + // VIRTUAL_CHANNEL_S + CLEAR(mTotalVirtualChannelCamNum); + CLEAR(mConfigTimes); + // VIRTUAL_CHANNEL_E } CameraHal::~CameraHal() { @@ -65,6 +69,13 @@ int CameraHal::init() { int ret = PlatformData::init(); CheckAndLogError(ret != OK, NO_INIT, "PlatformData init failed"); + // VIRTUAL_CHANNEL_S + for (int i = 0; i < MAX_VC_GROUP_NUMBER; i++) { + mTotalVirtualChannelCamNum[i] = 0; + mConfigTimes[i] = 0; + } + // VIRTUAL_CHANNEL_E + mState = HAL_INIT; return OK; @@ -80,6 +91,13 @@ int CameraHal::deinit() { return OK; } + // VIRTUAL_CHANNEL_S + for (int i = 0; i < MAX_VC_GROUP_NUMBER; i++) { + mTotalVirtualChannelCamNum[i] = 0; + mConfigTimes[i] = 0; + } + // VIRTUAL_CHANNEL_E + // FRAME_SYNC_S // SyncManager is used to do synchronization with multi-devices. // Release it when the last device exit @@ -98,8 +116,8 @@ int CameraHal::deinit() { return OK; } -int CameraHal::deviceOpen(int cameraId) { - LOG1(" @%s", cameraId, __func__); +int CameraHal::deviceOpen(int cameraId, int vcNum) { + LOG1(" @%s SENSORCTRLINFO: vcNum %d", cameraId, __func__, vcNum); AutoMutex l(mLock); CheckAndLogError(mState == HAL_UNINIT, NO_INIT, "HAL is not initialized"); @@ -109,17 +127,36 @@ int CameraHal::deviceOpen(int cameraId) { return INVALID_OPERATION; } + if (mCameraShm.CameraDeviceOpen(cameraId) != OK) return INVALID_OPERATION; + mCameraDevices[cameraId] = new CameraDevice(cameraId); - mCameraOpenNum++; + // VIRTUAL_CHANNEL_S + camera_info_t info; + CLEAR(info); + PlatformData::getCameraInfo(cameraId, info); + int groupId = info.vc.group >= 0 ? info.vc.group : 0; + mTotalVirtualChannelCamNum[groupId] = vcNum; + // VIRTUAL_CHANNEL_E + + // The check is to handle dual camera cases + mCameraOpenNum = mCameraShm.cameraDeviceOpenNum(); + CheckAndLogError(mCameraOpenNum == 0, INVALID_OPERATION, "camera open num couldn't be 0"); if (mCameraOpenNum == 1) { MediaControl* mc = MediaControl::getInstance(); CheckAndLogError(!mc, UNKNOWN_ERROR, "MediaControl init failed"); + if (PlatformData::isResetLinkRoute(cameraId)) { int ret = mc->resetAllLinks(); CheckAndLogError(ret != OK, DEV_BUSY, "resetAllLinks failed"); } + // VIRTUAL_CHANNEL_S + if (info.vc.total_num) { + // when the sensor belongs to virtual channel, reset the routes + if (PlatformData::isResetLinkRoute(cameraId)) mc->resetAllRoutes(cameraId); + } + // VIRTUAL_CHANNEL_E } return mCameraDevices[cameraId]->init(); @@ -134,7 +171,7 @@ void CameraHal::deviceClose(int cameraId) { delete mCameraDevices[cameraId]; mCameraDevices[cameraId] = nullptr; - mCameraOpenNum--; + mCameraShm.CameraDeviceClose(cameraId); } } @@ -177,6 +214,19 @@ int CameraHal::deviceConfigStreams(int cameraId, stream_config_t* streamList) { return INVALID_OPERATION; } + // VIRTUAL_CHANNEL_S + camera_info_t info; + CLEAR(info); + PlatformData::getCameraInfo(cameraId, info); + int groupId = info.vc.group >= 0 ? info.vc.group : 0; + if (mTotalVirtualChannelCamNum[groupId] > 0) { + mConfigTimes[groupId]++; + LOG1(" @%s, mConfigTimes:%d, before signal", cameraId, __func__, + mConfigTimes[groupId]); + mVirtualChannelSignal[groupId].signal(); + } + // VIRTUAL_CHANNEL_E + return ret; } @@ -187,6 +237,27 @@ int CameraHal::deviceStart(int cameraId) { CameraDevice* device = mCameraDevices[cameraId]; checkCameraDevice(device, BAD_VALUE); + // VIRTUAL_CHANNEL_S + camera_info_t info; + CLEAR(info); + PlatformData::getCameraInfo(cameraId, info); + int groupId = info.vc.group >= 0 ? info.vc.group : 0; + LOG1(" @%s, mConfigTimes:%d, mTotalVirtualChannelCamNum:%d", cameraId, __func__, + mConfigTimes[groupId], mTotalVirtualChannelCamNum[groupId]); + + if (mTotalVirtualChannelCamNum[groupId] > 0) { + int timeoutCnt = 10; + while (mConfigTimes[groupId] < mTotalVirtualChannelCamNum[groupId]) { + mVirtualChannelSignal[groupId].waitRelative(lock, mWaitDuration * SLOWLY_MULTIPLIER); + LOG1(" @%s, mConfigTimes:%d, timeoutCnt:%d", cameraId, __func__, + mConfigTimes[groupId], timeoutCnt); + --timeoutCnt; + CheckAndLogError(!timeoutCnt, TIMED_OUT, " mConfigTimes:%d, wait time out", + cameraId, mConfigTimes[groupId]); + } + } + // VIRTUAL_CHANNEL_E + return device->start(); } diff --git a/src/hal/CameraHal.h b/src/hal/CameraHal.h index 6b3e5158..500cc04a 100644 --- a/src/hal/CameraHal.h +++ b/src/hal/CameraHal.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,8 @@ #include "CameraDevice.h" #include "Parameters.h" +#include "iutils/CameraShm.h" + namespace icamera { /** @@ -47,7 +49,7 @@ class CameraHal { virtual int deinit(); // Device API - virtual int deviceOpen(int cameraId); + virtual int deviceOpen(int cameraId, int vcNum = 0); virtual void deviceClose(int cameraId); virtual void deviceCallbackRegister(int cameraId, const camera_callback_ops_t* callback); @@ -71,9 +73,17 @@ class CameraHal { int mInitTimes; // Guard for CameraHal public API. Mutex mLock; + // VIRTUAL_CHANNEL_S + int mTotalVirtualChannelCamNum[MAX_VC_GROUP_NUMBER]; + int mConfigTimes[MAX_VC_GROUP_NUMBER]; + Condition mVirtualChannelSignal[MAX_VC_GROUP_NUMBER]; + static const nsecs_t mWaitDuration = 500000000; // 500ms + // VIRTUAL_CHANNEL_E enum { HAL_UNINIT, HAL_INIT } mState; + // Used to store variables in different process + CameraSharedMemory mCameraShm; int mCameraOpenNum; }; diff --git a/src/hal/ICamera.cpp b/src/hal/ICamera.cpp index 8f4e5b96..af599b56 100644 --- a/src/hal/ICamera.cpp +++ b/src/hal/ICamera.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -125,16 +125,17 @@ void camera_callback_register(int camera_id, const camera_callback_ops_t* callba * Open one camera device * * \param camera_id camera index + * \param vc_num total virtual channel camera number * * \return error code **/ -int camera_device_open(int camera_id) { +int camera_device_open(int camera_id, int vc_num) { HAL_TRACE_CALL(1); CheckAndLogError(!gCameraHal, INVALID_OPERATION, "camera hal is NULL."); CheckCameraId(camera_id, BAD_VALUE); - return gCameraHal->deviceOpen(camera_id); + return gCameraHal->deviceOpen(camera_id, vc_num); } /** @@ -330,6 +331,12 @@ int get_frame_size(int camera_id, int format, int width, int height, int field, __attribute__((constructor)) void initCameraHAL() { Log::setDebugLevel(); CameraDump::setDumpLevel(); + + if (CameraDump::isDumpTypeEnable(DUMP_THREAD)) { + CameraDump::setDumpThread(); + LOGI("Dynamic dump is enabled."); + } + gCameraHal = new CameraHal(); } diff --git a/src/hal/MockCameraHal.cpp b/src/hal/MockCameraHal.cpp index 8ee977a6..1f4f44f3 100644 --- a/src/hal/MockCameraHal.cpp +++ b/src/hal/MockCameraHal.cpp @@ -82,7 +82,7 @@ int MockCameraHal::deinit() { return OK; } -int MockCameraHal::deviceOpen(int cameraId) +int MockCameraHal::deviceOpen(int cameraId, int vcNum) { LOG1("@%s", cameraId, __func__); diff --git a/src/hal/MockCameraHal.h b/src/hal/MockCameraHal.h index cde53065..93772089 100644 --- a/src/hal/MockCameraHal.h +++ b/src/hal/MockCameraHal.h @@ -53,7 +53,7 @@ class MockCameraHal : public CameraHal, public Thread { // Device API public: - virtual int deviceOpen(int cameraId); + virtual int deviceOpen(int cameraId, int vcNum = 0); virtual void deviceClose(int cameraId); virtual void deviceCallbackRegister(int cameraId, const camera_callback_ops_t* callback); diff --git a/src/hal/hal_adaptor/CMakeLists.txt b/src/hal/hal_adaptor/CMakeLists.txt new file mode 100644 index 00000000..9de5e13a --- /dev/null +++ b/src/hal/hal_adaptor/CMakeLists.txt @@ -0,0 +1,91 @@ +# +# Copyright (C) 2023-2024 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Source directories +set(ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../) +set(METADATA_DIR ${ROOT_DIR}/src/metadata) +set(IUTILS_DIR ${ROOT_DIR}/src/iutils) +set(HAL_ADAPTOR_DIR ${ROOT_DIR}/src/hal/hal_adaptor) + +set(HAL_ADAPTOR_INCLUDEDIRS + ${ROOT_DIR}/include + ${ROOT_DIR}/include/api + ${ROOT_DIR}/include/utils + ${ROOT_DIR}/src/metadata + ${ROOT_DIR}/src/iutils + ${ROOT_DIR}/src/core + ${ROOT_DIR}/src/platformdata + ${ROOT_DIR}/src/isp_control + ${ROOT_DIR}/src + ${ROOT_DIR}/modules/v4l2 + ${ROOT_DIR} + ) + +set(HAL_ADAPTOR_SRCS + ${METADATA_DIR}/icamera_metadata_base.cpp + ${METADATA_DIR}/CameraMetadata.cpp + ${METADATA_DIR}/Parameters.cpp + ${METADATA_DIR}/ParameterHelper.cpp + ${IUTILS_DIR}/CameraLog.cpp + ${IUTILS_DIR}/LogSink.cpp + ${IUTILS_DIR}/ModuleTags.cpp + ${IUTILS_DIR}/Trace.cpp + ${IUTILS_DIR}/Utils.cpp + ${IUTILS_DIR}/ScopedAtrace.cpp + ${HAL_ADAPTOR_DIR}/HalAdaptor.cpp + CACHE INTERNAL "hal adaptor sources" +) + +add_library(hal_adaptor SHARED ${HAL_ADAPTOR_SRCS}) +target_include_directories(hal_adaptor PRIVATE ${HAL_ADAPTOR_INCLUDEDIRS}) +target_compile_definitions(hal_adaptor PRIVATE + -D__STDC_FORMAT_MACROS + -DHAVE_PTHREADS + -DHAVE_LINUX_OS + "-DCAMHAL_PLUGIN_DIR=\"${CMAKE_INSTALL_FULL_LIBDIR}/libcamhal/plugins/\"" + ) +set_target_properties(hal_adaptor PROPERTIES OUTPUT_NAME camhal) +set_target_properties(hal_adaptor PROPERTIES SOVERSION 0) +set_target_properties(hal_adaptor PROPERTIES VERSION "0.0.0") + +#---------------------------- Link settings ---------------------------- +set (THREADS_PREFER_PTHREAD_FLAG ON) +find_package (Threads REQUIRED) +target_link_libraries(hal_adaptor ${CMAKE_THREAD_LIBS_INIT}) +target_link_libraries(hal_adaptor ${CMAKE_DL_LIBS}) +target_link_libraries(hal_adaptor rt) + +# Install headers +install(DIRECTORY ${ROOT_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libcamhal) +if (SUPPORT_LIVE_TUNING) + install(FILES ${ROOT_DIR}/modules/livetune/LiveTuning.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libcamhal/api) +endif() + +# Install libraries +if (${CMAKE_VERSION} VERSION_LESS 3.11) + install(TARGETS hal_adaptor + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +else() + install(TARGETS hal_adaptor DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() + +# Install package config file +configure_file(${PROJECT_SOURCE_DIR}/cmake/libcamhal.pc.cmakein + ${PROJECT_SOURCE_DIR}/libcamhal.pc @ONLY) +install(FILES ${PROJECT_SOURCE_DIR}/libcamhal.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/src/hal/hal_adaptor/HalAdaptor.cpp b/src/hal/hal_adaptor/HalAdaptor.cpp new file mode 100644 index 00000000..4926798a --- /dev/null +++ b/src/hal/hal_adaptor/HalAdaptor.cpp @@ -0,0 +1,252 @@ +/* + * Copyright (C) 2023-2024 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#define LOG_TAG HalAdaptor + +#include +#include +#include + +#include "HalAdaptor.h" +#include "iutils/CameraLog.h" +#include "iutils/Utils.h" +#include "iutils/Errors.h" + +extern "C" { +namespace icamera { + +static void* gCameraHalLib = nullptr; +static HalApiHandle gCameraHalAdaptor = {}; +static char gPciId[8]; + +#define CheckFuncCall(function) \ + do { \ + if (((function) == nullptr)) { \ + LOGE("%s, function call is nullptr", __func__); \ + return -1; \ + } \ + } while (0) + +#define GET_FUNC_CALL(member, fnName) \ + do { \ + gCameraHalAdaptor.member = (HalApiHandle::pFn##member)dlsym(gCameraHalLib, #fnName); \ + if (gCameraHalAdaptor.member == nullptr) { \ + LOGE("@%s: LOADING: " #fnName "failed: %s", __func__, dlerror()); \ + return; \ + } \ + LOG2("@%s: LOADING: " #fnName "= %p", __func__, gCameraHalAdaptor.member); \ + } while (0) + +static bool get_ipu_info(const std::string& path) { + bool retval = false; + + DIR* dir = opendir(path.c_str()); + if (dir == nullptr) { + return retval; + } + + struct dirent* entry; + while ((entry = readdir(dir)) != nullptr) { + if (entry->d_type != DT_LNK || strstr(entry->d_name, "0000:") == nullptr) { + continue; + } + + std::string devicePath = path + '/' + entry->d_name + "/device"; + std::ifstream pciDevice(devicePath); + if (!pciDevice.is_open()) { + continue; + } + std::string pciId; + pciDevice >> pciId; + pciDevice.close(); + if (pciId.length() > 0) { + retval = true; + strncpy(gPciId, pciId.c_str(), sizeof(gPciId) - 1); + break; + } + } + closedir(dir); + return retval; +} + +static void load_camera_hal_library() { + const std::string ipu6Path = "/sys/bus/pci/drivers/intel-ipu6"; + const std::string ipu7Path = "/sys/bus/pci/drivers/intel-ipu7"; + bool hasIpu6Info = get_ipu_info(ipu6Path); + bool hasIpu7Info = false; + if (!hasIpu6Info) { + hasIpu7Info = get_ipu_info(ipu7Path); + } + + CheckAndLogError(!(hasIpu6Info || hasIpu7Info), VOID_VALUE, + "%s, failed to open PCI device. error: %s", __func__, dlerror()); + + std::string libName = CAMHAL_PLUGIN_DIR; + if (strstr(gPciId, "0xa75d") != nullptr /* RPL */ || + strstr(gPciId, "0x462e") != nullptr /* ADLN */ || + strstr(gPciId, "0x465d") != nullptr /* ADLP */) { + libName += "ipu6ep"; + } else if (strstr(gPciId, "0x7d19") != nullptr /* MTL */) { + libName += "ipu6epmtl"; + } else if (strstr(gPciId, "0x645d") != nullptr /* LNL */) { + libName += "ipu7x"; + } else if (strstr(gPciId, "0xb05d") != nullptr /* PTL */) { + libName += "ipu75xa"; + } else if (strstr(gPciId, "0x9a19") != nullptr /* TGL */) { + libName += "ipu6"; + } else if (strstr(gPciId, "0x4e19") != nullptr /* JSL */) { + libName += "ipu6sepla"; + } else { + LOGE("%s, Not support the PCI device %s for hal adaptor API", __func__, gPciId); + return; + } + + libName += ".so"; + LOG1("%s, the library name: %s", __func__, libName.c_str()); + + gCameraHalLib = dlopen(libName.c_str(), RTLD_NOW); + CheckAndLogError(!gCameraHalLib, VOID_VALUE, "%s, failed to open library: %s, error: %s", + __func__, libName.c_str(), dlerror()); + + GET_FUNC_CALL(getNumberOfCameras, get_number_of_cameras); + GET_FUNC_CALL(getCameraInfo, get_camera_info); + GET_FUNC_CALL(cameraHalInit, camera_hal_init); + GET_FUNC_CALL(cameraHalDeinit, camera_hal_deinit); + GET_FUNC_CALL(cameraCallbackRegister, camera_callback_register); + GET_FUNC_CALL(cameraDeviceOpen, camera_device_open); + GET_FUNC_CALL(cameraDeviceClose, camera_device_close); + GET_FUNC_CALL(cameraDeviceConfigSensorInput, camera_device_config_sensor_input); + GET_FUNC_CALL(cameraDeviceConfigStreams, camera_device_config_streams); + GET_FUNC_CALL(cameraDeviceStart, camera_device_start); + GET_FUNC_CALL(cameraDeviceStop, camera_device_stop); + GET_FUNC_CALL(cameraDeviceAllocateMemory, camera_device_allocate_memory); + GET_FUNC_CALL(cameraStreamQbuf, camera_stream_qbuf); + GET_FUNC_CALL(cameraStreamDqbuf, camera_stream_dqbuf); + GET_FUNC_CALL(cameraSetParameters, camera_set_parameters); + GET_FUNC_CALL(cameraGetParameters, camera_get_parameters); + GET_FUNC_CALL(getHalFrameSize, get_frame_size); +} + +static void close_camera_hal_library() { + if (gCameraHalLib) { + dlclose(gCameraHalLib); + gCameraHalLib = nullptr; + } +} + +int get_number_of_cameras() { + CheckFuncCall(gCameraHalAdaptor.getNumberOfCameras); + return gCameraHalAdaptor.getNumberOfCameras(); +} + +int get_camera_info(int camera_id, camera_info_t& info) { + CheckFuncCall(gCameraHalAdaptor.getCameraInfo); + return gCameraHalAdaptor.getCameraInfo(camera_id, info); +} +int camera_hal_init() { + CheckFuncCall(gCameraHalAdaptor.cameraHalInit); + return gCameraHalAdaptor.cameraHalInit(); +} + +int camera_hal_deinit() { + CheckFuncCall(gCameraHalAdaptor.cameraHalDeinit); + return gCameraHalAdaptor.cameraHalDeinit(); +} + +void camera_callback_register(int camera_id, const camera_callback_ops_t* callback) { + if (!gCameraHalAdaptor.cameraCallbackRegister) { + LOGE("%s, function call is nullptr", __func__); + return VOID_VALUE; + } + gCameraHalAdaptor.cameraCallbackRegister(camera_id, callback); +} + +int camera_device_open(int camera_id, int vc_num) { + CheckFuncCall(gCameraHalAdaptor.cameraDeviceOpen); + return gCameraHalAdaptor.cameraDeviceOpen(camera_id, vc_num); +} + +void camera_device_close(int camera_id) { + if (!gCameraHalAdaptor.cameraDeviceClose) { + LOGE("%s, function call is nullptr", __func__); + return VOID_VALUE; + } + gCameraHalAdaptor.cameraDeviceClose(camera_id); +} + +int camera_device_config_sensor_input(int camera_id, const stream_t* input_config) { + CheckFuncCall(gCameraHalAdaptor.cameraDeviceConfigSensorInput); + return gCameraHalAdaptor.cameraDeviceConfigSensorInput(camera_id, input_config); +} + +int camera_device_config_streams(int camera_id, stream_config_t* stream_list) { + CheckFuncCall(gCameraHalAdaptor.cameraDeviceConfigStreams); + return gCameraHalAdaptor.cameraDeviceConfigStreams(camera_id, stream_list); +} + +int camera_device_start(int camera_id) { + CheckFuncCall(gCameraHalAdaptor.cameraDeviceStart); + return gCameraHalAdaptor.cameraDeviceStart(camera_id); +} + +int camera_device_stop(int camera_id) { + CheckFuncCall(gCameraHalAdaptor.cameraDeviceStop); + return gCameraHalAdaptor.cameraDeviceStop(camera_id); +} + +int camera_device_allocate_memory(int camera_id, camera_buffer_t* buffer) { + CheckFuncCall(gCameraHalAdaptor.cameraDeviceAllocateMemory); + return gCameraHalAdaptor.cameraDeviceAllocateMemory(camera_id, buffer); +} + +int camera_stream_qbuf(int camera_id, camera_buffer_t** buffer, int num_buffers, + const Parameters* settings) { + CheckFuncCall(gCameraHalAdaptor.cameraStreamQbuf); + return gCameraHalAdaptor.cameraStreamQbuf(camera_id, buffer, num_buffers, settings); +} + +int camera_stream_dqbuf(int camera_id, int stream_id, camera_buffer_t** buffer, + Parameters* settings) { + CheckFuncCall(gCameraHalAdaptor.cameraStreamDqbuf); + return gCameraHalAdaptor.cameraStreamDqbuf(camera_id, stream_id, buffer, settings); +} + +int camera_set_parameters(int camera_id, const Parameters& param) { + CheckFuncCall(gCameraHalAdaptor.cameraSetParameters); + return gCameraHalAdaptor.cameraSetParameters(camera_id, param); +} + +int camera_get_parameters(int camera_id, Parameters& param, int64_t sequence) { + CheckFuncCall(gCameraHalAdaptor.cameraGetParameters); + return gCameraHalAdaptor.cameraGetParameters(camera_id, param, sequence); +} + +int get_frame_size(int camera_id, int format, int width, int height, int field, int* bpp) { + CheckFuncCall(gCameraHalAdaptor.getHalFrameSize); + return gCameraHalAdaptor.getHalFrameSize(camera_id, format, width, height, field, bpp); +} + +__attribute__((constructor)) void initHalAdaptor() { + Log::setDebugLevel(); + load_camera_hal_library(); +} + +__attribute__((destructor)) void deinitHalAdaptor() { + close_camera_hal_library(); + CLEAR(gCameraHalAdaptor); +} + +} // namespace icamera +} // extern "C" diff --git a/src/hal/hal_adaptor/HalAdaptor.h b/src/hal/hal_adaptor/HalAdaptor.h new file mode 100644 index 00000000..3c5c3275 --- /dev/null +++ b/src/hal/hal_adaptor/HalAdaptor.h @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2023-2024 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include "ICamera.h" + +extern "C" { +namespace icamera { + +struct HalApiHandle { +#define _DEF_HAL_FUNC(ret, name, ...) \ + typedef ret (*pFn##name)(__VA_ARGS__); \ + pFn##name name + + _DEF_HAL_FUNC(int, getNumberOfCameras); + _DEF_HAL_FUNC(int, getCameraInfo, int camera_id, camera_info_t& info); + _DEF_HAL_FUNC(int, cameraHalInit); + _DEF_HAL_FUNC(int, cameraHalDeinit); + _DEF_HAL_FUNC(void, cameraCallbackRegister, int camera_id, + const camera_callback_ops_t* callback); + _DEF_HAL_FUNC(int, cameraDeviceOpen, int camera_id, int vc_num); + _DEF_HAL_FUNC(void, cameraDeviceClose, int camera_id); + _DEF_HAL_FUNC(int, cameraDeviceConfigSensorInput, int camera_id, const stream_t* inputConfig); + _DEF_HAL_FUNC(int, cameraDeviceConfigStreams, int camera_id, stream_config_t* stream_list); + _DEF_HAL_FUNC(int, cameraDeviceStart, int camera_id); + _DEF_HAL_FUNC(int, cameraDeviceStop, int camera_id); + _DEF_HAL_FUNC(int, cameraDeviceAllocateMemory, int camera_id, camera_buffer_t* buffer); + _DEF_HAL_FUNC(int, cameraStreamQbuf, int camera_id, camera_buffer_t** buffer, + int num_buffers, const Parameters* settings); + _DEF_HAL_FUNC(int, cameraStreamDqbuf, int camera_id, int stream_id, camera_buffer_t** buffer, + Parameters* settings); + _DEF_HAL_FUNC(int, cameraSetParameters, int camera_id, const Parameters& param); + _DEF_HAL_FUNC(int, cameraGetParameters, int camera_id, Parameters& param, int64_t sequence); + _DEF_HAL_FUNC(int, getHalFrameSize, int camera_id, int format, int width, int height, + int field, int* bpp); +}; +} // namespace icamera +} // extern "C" + diff --git a/src/icbm/ICBMThread.cpp b/src/icbm/ICBMThread.cpp new file mode 100644 index 00000000..6d9ebb00 --- /dev/null +++ b/src/icbm/ICBMThread.cpp @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2023 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG ICBMThread + +#include "src/icbm/ICBMThread.h" + +#include + +#include "ICBMThread.h" +#include "CameraLog.h" + +namespace icamera { + +int ICBMThread::setup(ICBMInitInfo* initParams) { + LOG1("%s, Starting up...", __func__); + mIntelICBM = std::make_unique(); + + auto ret = mIntelICBM->setup(initParams); + CheckAndLogError(ret != OK, ret, "%s: Init failed", __func__); + + return OK; +} + +void ICBMThread::shutdown(const ICBMReqInfo& request) { + LOG1("%s, Shuting down...", __func__); + mIntelICBM->shutdown(request); +} + +int ICBMThread::processFrame(const camera_buffer_t& inBuffer, const camera_buffer_t& outBuffer, + ICBMReqInfo& request) { + LOG2("%s, Processing frame", __func__); + + request.inII.width = inBuffer.s.width; + request.inII.height = inBuffer.s.height; + request.inII.size = inBuffer.s.size; + request.inII.stride = inBuffer.s.stride; + + request.outII.width = outBuffer.s.width; + request.outII.height = outBuffer.s.height; + request.outII.size = outBuffer.s.size; + request.outII.stride = outBuffer.s.stride; + +#ifdef ENABLE_SANDBOXING + request.inII.gfxHandle = inBuffer.dmafd; + request.outII.gfxHandle = outBuffer.dmafd; + + auto ret = mIntelICBM->processFrame(request); +#else + void* pInBuf = (inBuffer.s.memType == V4L2_MEMORY_DMABUF) ? + CameraBuffer::mapDmaBufferAddr(inBuffer.dmafd, inBuffer.s.size) : + inBuffer.addr; + + void* pOutBuf = (outBuffer.s.memType == V4L2_MEMORY_DMABUF) ? + CameraBuffer::mapDmaBufferAddr(outBuffer.dmafd, outBuffer.s.size) : + outBuffer.addr; + + request.inII.bufAddr = pInBuf; + request.outII.bufAddr = pOutBuf; + auto ret = mIntelICBM->processFrame(request); + + if (inBuffer.s.memType == V4L2_MEMORY_DMABUF) { + CameraBuffer::unmapDmaBufferAddr(pInBuf, inBuffer.s.size); + } + + if (outBuffer.s.memType == V4L2_MEMORY_DMABUF) { + CameraBuffer::unmapDmaBufferAddr(pOutBuf, outBuffer.s.size); + } +#endif + + if (ret != OK) { + LOGE("%s Run frame fails", __func__); + return UNKNOWN_ERROR; + } + return OK; +} + +} // namespace icamera diff --git a/modules/sandboxing/server/IntelFDServer.h b/src/icbm/ICBMThread.h similarity index 50% rename from modules/sandboxing/server/IntelFDServer.h rename to src/icbm/ICBMThread.h index e7d28496..42d99632 100644 --- a/modules/sandboxing/server/IntelFDServer.h +++ b/src/icbm/ICBMThread.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 Intel Corporation. + * Copyright (C) 2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,24 +17,33 @@ #pragma once #include -#include -#include "iutils/Errors.h" -#include "modules/algowrapper/IntelFaceDetection.h" -#include "modules/sandboxing/IPCIntelFD.h" +#include "ICBMTypes.h" + +#include "core/CameraBuffer.h" +#include "iutils/Utils.h" +#include "Parameters.h" + +#ifdef ENABLE_SANDBOXING +#include "modules/sandboxing/client/IntelICBMClient.h" +#else +#include "modules/algowrapper/IntelICBM.h" +#endif namespace icamera { -class IntelFDServer { + +class ICBMThread { public: - IntelFDServer(); - virtual ~IntelFDServer(); + ICBMThread() {} + ~ICBMThread() {} + + int setup(ICBMInitInfo* initParams); + void shutdown(const ICBMReqInfo& request); - status_t init(void* pData, int dataSize); - status_t run(void* pData, int dataSize, void* imageData); - status_t deinit(void* pData, int dataSize); + int processFrame(const camera_buffer_t& inBuffer, const camera_buffer_t& outBuffer, + ICBMReqInfo& request); private: - std::unordered_map> mFaceDetection; - IPCIntelFD mIpcFD; + std::unique_ptr mIntelICBM; }; -} /* namespace icamera */ +} // namespace icamera \ No newline at end of file diff --git a/src/icbm/ICBMTypes.h b/src/icbm/ICBMTypes.h new file mode 100644 index 00000000..50608679 --- /dev/null +++ b/src/icbm/ICBMTypes.h @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include "src/iutils/Errors.h" + +#include "subway_autogen.h" +namespace icamera { + +struct ImageInfo { + int32_t gfxHandle; + void* bufAddr; + uint32_t width; + uint32_t height; + uint32_t stride; + uint32_t size; + ImageInfo() : gfxHandle(-1), bufAddr(nullptr), width(0), height(0), stride(0), size(0) {} +}; + +#define ICBM_REQUEST_MAX_SHIFT 15 +enum ICBMFeatureType { + REQUEST_NONE = 0, + LEVEL0_TNR = 1 << 1, +// LEVEL0_ICBM_S + USER_FRAMING = 1 << 2, + BC_MODE_BB = 1 << 3, +// LEVEL0_ICBM_E + REQUEST_MAX = 1 << ICBM_REQUEST_MAX_SHIFT +}; + +struct ICBMInitInfo { + int cameraId; + uint32_t sessionType; + uint32_t height; + uint32_t width; + int32_t libPathHandle; + char* libPath; +}; + +struct ICBMReqInfo { + int cameraId; + // all ICBM features supported by this ICBM session, used to identify session object + uint32_t sessionType; + // set per-frame, 1 or several features in sessionType list + uint32_t reqType; + ImageInfo inII; + ImageInfo outII; + int32_t inHandle; + int32_t outHandle; + int32_t paramHandle; + void* paramAddr; + ICBMReqInfo() + : cameraId(-1), + sessionType(REQUEST_NONE), + reqType(REQUEST_NONE), + inHandle(-1), + outHandle(-1), + paramHandle(-1), + paramAddr(nullptr) {} +}; + +struct IC2ApiHandle { +#define _DEF_IC2_FUNC(ret, name, ...) \ + typedef ret (*pFn##name)(__VA_ARGS__); \ + pFn##name name + + _DEF_IC2_FUNC(void, query_version, int* major, int* minor, int* patch); + _DEF_IC2_FUNC(void, startup); + _DEF_IC2_FUNC(void, shutdown); + _DEF_IC2_FUNC(void, query_features, char* future_d, size_t* fsize); + _DEF_IC2_FUNC(void, set_loglevel, iaic_log_level leve); + _DEF_IC2_FUNC(void, create_session, iaic_session uid, const char* feature, iaic_options opt); + _DEF_IC2_FUNC(void, close_session, iaic_session uid, const char* feature); + _DEF_IC2_FUNC(bool, execute, iaic_session uid, iaic_memory in, iaic_memory out); + _DEF_IC2_FUNC(void, set_data, iaic_session uid, iaic_memory& data); + _DEF_IC2_FUNC(void, get_data, iaic_session uid, iaic_memory& data); +}; + +} // namespace icamera diff --git a/src/icbm/MemoryChain.cpp b/src/icbm/MemoryChain.cpp new file mode 100644 index 00000000..fe980532 --- /dev/null +++ b/src/icbm/MemoryChain.cpp @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "src/icbm/MemoryChain.h" + +namespace icamera { + +MemoryChainDescription::MemoryChainDescription(const ImageInfo& iii, const ImageInfo& iio) + : mInInfo(iii), + mOutInfo(iio) {} + +void MemoryChainDescription::linkIn(const char* featureName, const char* inPortName, + const char* outPortName) { + iaic_memory inMemory = createMemoryDesc(mInInfo); + iaic_memory outMemory = createMemoryDesc(mOutInfo); + + inMemory.p = mInInfo.bufAddr; + outMemory.p = mOutInfo.bufAddr; + + inMemory.feature_name = featureName; + inMemory.port_name = inPortName; + + outMemory.feature_name = featureName; + outMemory.port_name = outPortName; + + inMemory.media_type = iaic_nv12; + outMemory.media_type = iaic_nv12; + + mInChain.push_back(inMemory); + mOutChain.push_back(outMemory); + + if (mInChain.size() > 1) mInChain[mInChain.size() - 2].next = &mInChain[mInChain.size() - 1]; + if (mOutChain.size() > 1) + mOutChain[mOutChain.size() - 2].next = &mOutChain[mOutChain.size() - 1]; +} + +MemoryIOPort MemoryChainDescription::getIOPort() { + if (mInChain.empty() || mOutChain.empty()) + return {nullptr, nullptr}; + else + return {&mInChain[0], &mOutChain[0]}; +} + +iaic_memory MemoryChainDescription::createMemoryDesc(const ImageInfo& ii) { + iaic_memory mem = {}; + + mem.has_gfx = false; + mem.size[0] = ii.size; + mem.size[1] = ii.width; + mem.size[2] = ii.height; + mem.size[3] = ii.stride; + + return mem; +} +} // namespace icamera diff --git a/src/icbm/MemoryChain.h b/src/icbm/MemoryChain.h new file mode 100644 index 00000000..27c83912 --- /dev/null +++ b/src/icbm/MemoryChain.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include "src/icbm/ICBMTypes.h" +#include "src/icbm/OPIC2Api.h" + +namespace icamera { +using MemoryChain = std::vector; +using MemoryIOPort = std::pair; + +class MemoryChainDescription { + public: + MemoryChainDescription(const ImageInfo& iii, const ImageInfo& iio); + ~MemoryChainDescription() = default; + MemoryChainDescription(MemoryChainDescription&& rhs) = default; + MemoryChainDescription& operator=(const MemoryChainDescription& rhs) = delete; + MemoryChainDescription(const MemoryChainDescription& rhs) = delete; + + void linkIn(const char* featureName, const char* inPortName, const char* outPortName); + MemoryIOPort getIOPort(); + + private: + ImageInfo mInInfo; + ImageInfo mOutInfo; + + MemoryChain mInChain; + MemoryChain mOutChain; + + iaic_memory createMemoryDesc(const ImageInfo& ii); +}; +} // namespace icamera diff --git a/src/icbm/OPIC2Api.h b/src/icbm/OPIC2Api.h new file mode 100644 index 00000000..afae0143 --- /dev/null +++ b/src/icbm/OPIC2Api.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef IC2API_FOR_CHROME_H +#define IC2API_FOR_CHROME_H + +extern "C" { + +#define KEYPOINTSCOUNT 40 +struct FaceResult { + int x; + int y; + int width; + int height; + float keypoints[KEYPOINTSCOUNT][2]; + bool valid; +}; +} + +#endif diff --git a/src/icbm/OnePunchIC2.cpp b/src/icbm/OnePunchIC2.cpp new file mode 100644 index 00000000..73f10c6f --- /dev/null +++ b/src/icbm/OnePunchIC2.cpp @@ -0,0 +1,307 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG OnePunchIC2 + +#include "src/icbm/OnePunchIC2.h" + +#include +#include +#include + +#include "iutils/CameraLog.h" +#include "Utils.h" +#include "TNRCommon.h" + +namespace icamera { + +IntelOPIC2* IntelOPIC2::sInstance = nullptr; +std::mutex IntelOPIC2::sLock; + +// LEVEL0_ICBM_S +void UserFramingBuilder::linkToMemoryChain(MemoryChainDescription& memoryChain) { + memoryChain.linkIn("user_framing", "source:source", "drain:drain"); +} + +void BackgroundBlurBuilder::linkToMemoryChain(MemoryChainDescription& memoryChain) { + memoryChain.linkIn("background_concealment", "in:source", "out:drain"); +} +// LEVEL0_ICBM_E + +static const std::unordered_map gFeatureStrMapping = { + {ICBMFeatureType::LEVEL0_TNR, "tnr7us_l0"}, + // LEVEL0_ICBM_S + {ICBMFeatureType::USER_FRAMING, "user_framing"}, + {ICBMFeatureType::BC_MODE_BB, "background_concealment"}, + // LEVEL0_ICBM_E +}; + +IntelOPIC2* IntelOPIC2::getInstance() { + std::lock_guard lock(sLock); + if (!sInstance) { + sInstance = new IntelOPIC2(); + } + + return sInstance; +} + +void IntelOPIC2::releaseInstance() { + std::lock_guard lock(sLock); + if (sInstance) delete sInstance; + sInstance = nullptr; +} + +IntelOPIC2::IntelOPIC2() { + mLockMap.clear(); + mSessionMap.clear(); + mFeatureMap.clear(); +} + +IntelOPIC2::~IntelOPIC2() { + mLockMap.clear(); + mSessionMap.clear(); + mFeatureMap.clear(); +} + +int IntelOPIC2::setup(ICBMInitInfo* initParams, std::shared_ptr handle) { + CheckAndLogError(!handle, NAME_NOT_FOUND, "%s", __func__); + mIC2Api = handle; + + int ver[3]; + mIC2Api->query_version(&ver[0], &ver[1], &ver[2]); + LOG1("@%s, IC2 Version %d.%d.%d", __func__, ver[0], ver[1], ver[2]); + + size_t featureLen; + std::string supportedFeatures; + mIC2Api->query_features(nullptr, &featureLen); + supportedFeatures.resize(featureLen); + mIC2Api->query_features(supportedFeatures.data(), &featureLen); + LOG1("@%s, IC supported features: %s", __func__, supportedFeatures.c_str()); + + LOG1("<%d>@%s type %d", initParams->cameraId, __func__, initParams->sessionType); + int key = getIndexKey(initParams->cameraId, initParams->sessionType); + + CheckWarning((mSessionMap.find(key) != mSessionMap.end()), OK, + " @%s, request type: %d is already exist", initParams->cameraId, __func__, + initParams->sessionType); + + for (int feature = LEVEL0_TNR; feature < REQUEST_MAX; feature <<= 1) { + if (!(initParams->sessionType & feature)) continue; + const char* featureStr = gFeatureStrMapping.at(static_cast(feature)); + if (strstr(supportedFeatures.c_str(), featureStr) == nullptr) { + LOG1("<%d>@%s type %d not supported", initParams->cameraId, __func__, feature); + return OK; + } + } + + mLockMap[key] = std::unique_ptr(new std::mutex); + std::unique_lock lock(*mLockMap[key]); + + mFeatureMap[key] = std::vector(); + // we use the key value as the unique session id + mSessionMap[key] = static_cast(key); + // LEVEL0_ICBM_S + if (initParams->sessionType & ICBMFeatureType::USER_FRAMING) { + iaic_options option{}; + option.profiling = false; + option.blocked_init = false; + option.external_device = nullptr; + const char* featureStr = gFeatureStrMapping.at(ICBMFeatureType::USER_FRAMING); + mIC2Api->create_session(mSessionMap[key], featureStr, option); + mFeatureMap[key].push_back(featureStr); + } + + if (initParams->sessionType & ICBMFeatureType::BC_MODE_BB) { + iaic_options option{}; + option.profiling = false; + option.blocked_init = false; + option.external_device = nullptr; + const char* featureStr = gFeatureStrMapping.at(ICBMFeatureType::BC_MODE_BB); + mIC2Api->create_session(mSessionMap[key], featureStr, option); + mFeatureMap[key].push_back(featureStr); + } + // LEVEL0_ICBM_E + if (initParams->sessionType & ICBMFeatureType::LEVEL0_TNR) { + iaic_options option{}; + option.profiling = true; + option.blocked_init = true; + option.external_device = nullptr; + const char* featureStr = gFeatureStrMapping.at(ICBMFeatureType::LEVEL0_TNR); + mIC2Api->create_session(mSessionMap[key], featureStr, option); + mFeatureMap[key].push_back(featureStr); + } + + return OK; +} + +int IntelOPIC2::shutdown(const ICBMReqInfo& reqInfo) { + LOG1("<%d>@%s type %d", reqInfo.cameraId, __func__, reqInfo.sessionType); + int key = getIndexKey(reqInfo.cameraId, reqInfo.sessionType); + + CheckAndLogError((mSessionMap.find(key) == mSessionMap.end()), NAME_NOT_FOUND, + " @%s, request type: %d is not exist", reqInfo.cameraId, __func__, + reqInfo.sessionType); + int ret = -1; + { + std::unique_lock lock(*mLockMap[key]); + for (auto& feature : mFeatureMap[key]) { + mIC2Api->close_session(mSessionMap[key], feature); + } + mSessionMap.erase(key); + ret = mSessionMap.size(); + } + mLockMap.erase(key); + return ret; +} + +int IntelOPIC2::processFrame(const ICBMReqInfo& reqInfo) { + int key = getIndexKey(reqInfo.cameraId, reqInfo.sessionType); + + CheckAndLogError((mSessionMap.find(key) == mSessionMap.end()), BAD_VALUE, + " @%s, request type: %d is not exist", reqInfo.cameraId, __func__, + reqInfo.sessionType); + auto mcd = createMemoryChain(reqInfo); + auto mem = mcd.getIOPort(); + if (mem.first == nullptr) return OK; + + std::unique_lock lock(*mLockMap[key]); + bool res = mIC2Api->execute(mSessionMap[key], *mem.first, *mem.second); + mIC2Api->get_data(mSessionMap[key], *mem.second); + CheckAndLogError(res != true, UNKNOWN_ERROR, "%s, IC2 Internal Error on processing frame", + __func__); + + return OK; +} + +int IntelOPIC2::runTnrFrame(const ICBMReqInfo& reqInfo) { + LOG2("%s, ", __func__); + int key = getIndexKey(reqInfo.cameraId, reqInfo.sessionType); + + CheckAndLogError((mSessionMap.find(key) == mSessionMap.end()), BAD_VALUE, + " @%s, request type: %d is not exist", reqInfo.cameraId, __func__, + reqInfo.sessionType); + + const char* featureName = gFeatureStrMapping.at(ICBMFeatureType::LEVEL0_TNR); + iaic_memory inMem, outMem; + + inMem.gfx = iaic_gfx_none; + inMem.size[0] = reqInfo.inII.size; + inMem.size[1] = reqInfo.inII.width; + inMem.size[2] = reqInfo.inII.height; + inMem.size[3] = reqInfo.inII.stride; + inMem.media_type = iaic_nv12; + inMem.p = reqInfo.inII.bufAddr; + inMem.feature_name = featureName; + inMem.port_name = "in:source"; + inMem.next = nullptr; + + outMem = inMem; + outMem.size[0] = reqInfo.outII.size; + outMem.size[1] = reqInfo.outII.width; + outMem.size[2] = reqInfo.outII.height; + outMem.size[3] = reqInfo.outII.stride; + outMem.port_name = "out:drain"; + outMem.p = reqInfo.outII.bufAddr; + + Tnr7Param* tnrParam = static_cast(reqInfo.paramAddr); + LOG2("%s, is first %f", __func__, tnrParam->bc.is_first_frame); + std::unique_lock lock(*mLockMap[key]); + setData(mSessionMap[key], &tnrParam->bc.is_first_frame, sizeof(tnrParam->bc.is_first_frame), + featureName, "tnr7us/pal:is_first_frame"); + setData(mSessionMap[key], &tnrParam->bc.do_update, sizeof(tnrParam->bc.do_update), featureName, + "tnr7us/pal:do_update"); + setData(mSessionMap[key], &tnrParam->bc.tune_sensitivity, sizeof(tnrParam->bc.tune_sensitivity), + featureName, "tnr7us/pal:tune_sensitivity"); + setData(mSessionMap[key], &tnrParam->bc.coeffs, sizeof(tnrParam->bc.coeffs), featureName, + "tnr7us/pal:coeffs"); + setData(mSessionMap[key], &tnrParam->bc.global_protection, + sizeof(tnrParam->bc.global_protection), featureName, "tnr7us/pal:global_protection"); + setData(mSessionMap[key], &tnrParam->bc.global_protection_inv_num_pixels, + sizeof(tnrParam->bc.global_protection_inv_num_pixels), featureName, + "tnr7us/pal:global_protection_inv_num_pixels"); + setData(mSessionMap[key], &tnrParam->bc.global_protection_sensitivity_lut_values, + sizeof(tnrParam->bc.global_protection_sensitivity_lut_values), featureName, + "tnr7us/pal:global_protection_sensitivity_lut_values"); + setData(mSessionMap[key], &tnrParam->bc.global_protection_sensitivity_lut_slopes, + sizeof(tnrParam->bc.global_protection_sensitivity_lut_slopes), featureName, + "tnr7us/pal:global_protection_sensitivity_lut_slopes"); + // tnr7 imTnrSession, ms params + setData(mSessionMap[key], &tnrParam->ims.update_limit, sizeof(tnrParam->ims.update_limit), + featureName, "tnr7us/pal:update_limit"); + setData(mSessionMap[key], &tnrParam->ims.update_coeff, sizeof(tnrParam->ims.update_coeff), + featureName, "tnr7us/pal:update_coeff"); + setData(mSessionMap[key], &tnrParam->ims.d_ml, sizeof(tnrParam->ims.d_ml), featureName, + "tnr7us/pal:d_ml"); + setData(mSessionMap[key], &tnrParam->ims.d_slopes, sizeof(tnrParam->ims.d_slopes), featureName, + "tnr7us/pal:d_slopes"); + setData(mSessionMap[key], &tnrParam->ims.d_top, sizeof(tnrParam->ims.d_top), featureName, + "tnr7us/pal:d_top"); + setData(mSessionMap[key], &tnrParam->ims.outofbounds, sizeof(tnrParam->ims.outofbounds), + featureName, "tnr7us/pal:outofbounds"); + setData(mSessionMap[key], &tnrParam->ims.radial_start, sizeof(tnrParam->ims.radial_start), + featureName, "tnr7us/pal:radial_start"); + setData(mSessionMap[key], &tnrParam->ims.radial_coeff, sizeof(tnrParam->ims.radial_coeff), + featureName, "tnr7us/pal:radial_coeff"); + setData(mSessionMap[key], &tnrParam->ims.frame_center_x, sizeof(tnrParam->ims.frame_center_x), + featureName, "tnr7us/pal:frame_center_x"); + setData(mSessionMap[key], &tnrParam->ims.frame_center_y, sizeof(tnrParam->ims.frame_center_y), + featureName, "tnr7us/pal:frame_center_y"); + setData(mSessionMap[key], &tnrParam->ims.r_coeff, sizeof(tnrParam->ims.r_coeff), featureName, + "tnr7us/pal:r_coeff"); + // tnr7 bmTnrSession, lend params + setData(mSessionMap[key], &tnrParam->blend.max_recursive_similarity, + sizeof(tnrParam->blend.max_recursive_similarity), featureName, + "tnr7us/pal:max_recursive_similarity"); + + if (mIC2Api->execute(mSessionMap[key], inMem, outMem)) { + mIC2Api->get_data(mSessionMap[key], outMem); + return OK; + } + + return UNKNOWN_ERROR; +} + +void IntelOPIC2::setData(iaic_session uid, void* p, size_t size, const char* featureName, + const char* portName) { + iaic_memory setting{}; + setting.has_gfx = false; + setting.feature_name = featureName; + + setting.port_name = portName; + setting.p = p; + setting.size[0] = size; + mIC2Api->set_data(uid, setting); +} + +MemoryChainDescription IntelOPIC2::createMemoryChain(const ICBMReqInfo& reqInfo) { + MemoryChainDescription mCD(reqInfo.inII, reqInfo.outII); + // LEVEL0_ICBM_S + if (reqInfo.reqType & ICBMFeatureType::USER_FRAMING) { + UserFramingBuilder().linkToMemoryChain(mCD); + } + + if (reqInfo.reqType & ICBMFeatureType::BC_MODE_BB) { + BackgroundBlurBuilder().linkToMemoryChain(mCD); + } + // LEVEL0_ICBM_E + if (reqInfo.reqType & ICBMFeatureType::LEVEL0_TNR) { + mCD.linkIn(gFeatureStrMapping.at(ICBMFeatureType::LEVEL0_TNR), "in:source", "out:drain"); + } + + return mCD; +} + +} // namespace icamera diff --git a/src/icbm/OnePunchIC2.h b/src/icbm/OnePunchIC2.h new file mode 100644 index 00000000..7b43a37f --- /dev/null +++ b/src/icbm/OnePunchIC2.h @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include + +#include "src/iutils/Utils.h" + +#include "src/icbm/ICBMTypes.h" +#include "src/icbm/OPIC2Api.h" +#include "src/icbm/MemoryChain.h" + +namespace icamera { + +// LEVEL0_ICBM_S +struct IOPIC2Algorithm { + virtual ~IOPIC2Algorithm() = default; + virtual void linkToMemoryChain(MemoryChainDescription& memoryChain) = 0; +}; + +class UserFramingBuilder : public IOPIC2Algorithm { + public: + UserFramingBuilder() = default; + ~UserFramingBuilder() = default; + + void linkToMemoryChain(MemoryChainDescription& memoryChain) override; +}; + +class BackgroundBlurBuilder : public IOPIC2Algorithm { + public: + BackgroundBlurBuilder() = default; + ~BackgroundBlurBuilder() = default; + + void linkToMemoryChain(MemoryChainDescription& memoryChain) override; +}; +// LEVEL0_ICBM_E + +class IntelOPIC2 { + public: + static IntelOPIC2* getInstance(); + static void releaseInstance(); + + /** + * \brief create level0 session according to the cameraID and request type + * + * \return 0 if succeed. + */ + int setup(ICBMInitInfo* initParam, std::shared_ptr handle); + + /** + * \brief shundown level0 session according to the cameraID and request type + * + * \return active session count(>=0) if succeed. <0 if failed + */ + int shutdown(const ICBMReqInfo& reqInfo); + + int processFrame(const ICBMReqInfo& reqInfo); + + /** + * \brief process tnr frame + * + * \return 0 if succeed + */ + int runTnrFrame(const ICBMReqInfo& reqInfo); + + private: + static IntelOPIC2* sInstance; + static std::mutex sLock; + std::shared_ptr mIC2Api; + + IntelOPIC2(); + ~IntelOPIC2(); + int loadIC2Library(); + // lock for each session, key is from getIndexKey() + std::unordered_map> mLockMap; + // session map, key is from getIndexKey() + std::unordered_map mSessionMap; + // feature vector of each session + std::unordered_map> mFeatureMap; + + // transfer cameraId and type to index of the mSessionMap and mLockMap + int getIndexKey(int cameraId, uint32_t type) { + return (cameraId << ICBM_REQUEST_MAX_SHIFT) + type; + } + + static MemoryChainDescription createMemoryChain(const ICBMReqInfo& reqInfo); + + // set parameters to the session before process + void setData(iaic_session uid, void* p, size_t size, const char* featureName, + const char* portName); + + DISALLOW_COPY_AND_ASSIGN(IntelOPIC2); +}; + +} // namespace icamera diff --git a/src/image_process/PostProcessorBase.cpp b/src/image_process/PostProcessorBase.cpp index e2d27a60..6955995a 100644 --- a/src/image_process/PostProcessorBase.cpp +++ b/src/image_process/PostProcessorBase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation. + * Copyright (C) 2019-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -147,7 +147,8 @@ std::shared_ptr JpegProcess::cropAndDownscaleThumbnail( int format = camera3::HalV3Utils::V4l2FormatToHALFormat(inBuf->v4l2Fmt()); int usage = inBuf->usage(); - LOG2("%s, inputbuffer format:%d, usage:%d", __func__, format, usage); + LOG2("%s, inputbuffer format:%s(%d), usage:%d", __func__, + CameraUtils::format2string(inBuf->v4l2Fmt()).c_str(), format, usage); // Do crop first if needed if (IImageProcessor::isProcessingTypeSupported(POST_PROCESS_CROP) && diff --git a/src/iutils/CMakeLists.txt b/src/iutils/CMakeLists.txt index d39e7331..5d329207 100644 --- a/src/iutils/CMakeLists.txt +++ b/src/iutils/CMakeLists.txt @@ -24,6 +24,9 @@ set(IUTILS_SRCS ${IUTILS_DIR}/Thread.cpp ${IUTILS_DIR}/Utils.cpp ${IUTILS_DIR}/SwImageConverter.cpp +# SUPPORT_MULTI_PROCESS_S + ${IUTILS_DIR}/CameraShm.cpp +# SUPPORT_MULTI_PROCESS_E CACHE INTERNAL "iutils sources" ) diff --git a/src/iutils/CameraDump.cpp b/src/iutils/CameraDump.cpp index e16d51ca..2a9282b5 100644 --- a/src/iutils/CameraDump.cpp +++ b/src/iutils/CameraDump.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include #include @@ -42,6 +44,8 @@ using std::string; namespace icamera { +Thread* gDumpThread = nullptr; + int gDumpType = 0; int gDumpFormat = 0; uint32_t gDumpSkipNum = 0; @@ -50,6 +54,12 @@ uint32_t gDumpRangeMax = 0; int gDumpFrequency = 1; char gDumpPath[50]; bool gDumpRangeEnabled = false; +int gDumpPatternEnabled = 0; +uint32_t gDumpPattern = 0xffffffff; +uint32_t gDumpPatternMask = 0xffffffff; +uint32_t gDumpPatternLineMin = 0; +uint32_t gDumpPatternLineMax = 0; +bool gDumpPatternLineEnabled = false; static const char* ModuleName[] = {"na", // not available "sensor", "isys", "psys", "de-inter", "swip-op", "gpu-tnr", "nvm", "mkn"}; // map to the ModuleType @@ -61,6 +71,17 @@ static const char* StreamUsage[] = { "app", }; // map to the StreamUsage +void CameraDump::parseRange(char* rangeStr, uint32_t* rangeMin, uint32_t* rangeMax) { + if (!rangeStr) return; + + std::string rangeArray(rangeStr); + size_t i = rangeArray.find_first_of(",~-"); + if (i != std::string::npos) { + *rangeMin = std::stoul(rangeArray.substr(0, i - 1)); + *rangeMax = std::stoul(rangeArray.substr(i + 1)); + } +} + void CameraDump::setDumpLevel(void) { const char* PROP_CAMERA_HAL_DUMP = "cameraDump"; const char* PROP_CAMERA_HAL_DUMP_FORMAT = "cameraDumpFormat"; @@ -68,6 +89,10 @@ void CameraDump::setDumpLevel(void) { const char* PROP_CAMERA_HAL_DUMP_SKIP_NUM = "cameraDumpSkipNum"; const char* PROP_CAMERA_HAL_DUMP_RANGE = "cameraDumpRange"; const char* PROP_CAMERA_HAL_DUMP_FREQUENCY = "cameraDumpFrequency"; + const char* PROP_CAMERA_HAL_DUMP_PATTERN_ENABLED = "cameraDumpPatternEnabled"; + const char* PROP_CAMERA_HAL_DUMP_PATTERN = "cameraDumpPattern"; + const char* PROP_CAMERA_HAL_DUMP_PATTERN_MASK = "cameraDumpPatternMask"; + const char* PROP_CAMERA_HAL_DUMP_PATTERN_RANGE = "cameraDumpPatternRange"; // dump, it's used to dump images or some parameters to a file. char* dumpType = getenv(PROP_CAMERA_HAL_DUMP); @@ -83,9 +108,13 @@ void CameraDump::setDumpLevel(void) { } char* cameraDumpPath = getenv(PROP_CAMERA_HAL_DUMP_PATH); - snprintf(gDumpPath, sizeof(gDumpPath), "%s", "./"); + if (cameraDumpPath) { snprintf(gDumpPath, sizeof(gDumpPath), "%s", cameraDumpPath); + LOGI("User defined dump path %s", gDumpPath); + } else { + snprintf(gDumpPath, sizeof(gDumpPath), "%s", "./"); + LOG1("Default dump path %s", gDumpPath); } char* cameraDumpSkipNum = getenv(PROP_CAMERA_HAL_DUMP_SKIP_NUM); @@ -96,18 +125,7 @@ void CameraDump::setDumpLevel(void) { char* cameraDumpRange = getenv(PROP_CAMERA_HAL_DUMP_RANGE); if (cameraDumpRange) { - int sz = strlen(cameraDumpRange); - char dumpRange[sz + 1]; - char *savePtr = nullptr, *tablePtr = nullptr; - MEMCPY_S(dumpRange, sz, cameraDumpRange, sz); - dumpRange[sz] = '\0'; - - tablePtr = strtok_r(dumpRange, ",~-", &savePtr); - if (tablePtr) gDumpRangeMin = strtoul(tablePtr, nullptr, 0); - - tablePtr = strtok_r(nullptr, ",~-", &savePtr); - if (tablePtr) gDumpRangeMax = strtoul(tablePtr, nullptr, 0); - + parseRange(cameraDumpRange, &gDumpRangeMin, &gDumpRangeMax); gDumpRangeEnabled = true; LOG1("Dump range is %d-%d", gDumpRangeMin, gDumpRangeMax); } @@ -119,6 +137,31 @@ void CameraDump::setDumpLevel(void) { LOG1("Dump frequency is %d", gDumpFrequency); } + char* cameraDumpPatternEnabled = getenv(PROP_CAMERA_HAL_DUMP_PATTERN_ENABLED); + if (cameraDumpPatternEnabled) { + gDumpPatternEnabled = strtoul(cameraDumpPatternEnabled, nullptr, 0); + LOGI("Dump pattern enabled is %d", gDumpPatternEnabled); + } + + char* cameraDumpPattern = getenv(PROP_CAMERA_HAL_DUMP_PATTERN); + if (cameraDumpPattern) { + gDumpPattern = strtoul(cameraDumpPattern, nullptr, 0); + LOGI("Dump pattern is 0x%08x", gDumpPattern); + } + + char* cameraDumpPatternMask = getenv(PROP_CAMERA_HAL_DUMP_PATTERN_MASK); + if (cameraDumpPatternMask) { + gDumpPatternMask = strtoul(cameraDumpPatternMask, nullptr, 0); + LOGI("Dump pattern mask is 0x%08x", gDumpPatternMask); + } + + char* cameraDumpPatternRange = getenv(PROP_CAMERA_HAL_DUMP_PATTERN_RANGE); + if (cameraDumpPatternRange) { + parseRange(cameraDumpPatternRange, &gDumpPatternLineMin, &gDumpPatternLineMax); + gDumpPatternLineEnabled = true; + LOG1("Dump pattern range is line %d-%d", gDumpPatternLineMin, gDumpPatternLineMax); + } + // the PG dump is implemented in libiacss if (gDumpType & DUMP_PSYS_PG) { const char* PROP_CAMERA_CSS_DEBUG = "camera_css_debug"; @@ -145,6 +188,15 @@ void CameraDump::setDumpLevel(void) { } } +void CameraDump::setDumpThread(void) { + if (!gDumpThread) { + // Default disable AIQDUMP when use dump thread + setenv("AIQDUMP", "disable", 1); + gDumpThread = new DumpThread(); + gDumpThread->run("DumpThread", PRIORITY_NORMAL); + } +} + bool CameraDump::isDumpTypeEnable(int dumpType) { return gDumpType & dumpType; } @@ -369,6 +421,26 @@ static string formatBinFileName(int cameraId, const char* prefix, BinParam_t* bi return string(fileName); } +int CameraDump::checkPattern(void* data, int bufferSize, int w, int h, int stride) { + uint32_t val; + int lineStart = h - 1; + int lineEnd = h - 1; + + if (gDumpPatternLineEnabled && gDumpPatternLineMin < (uint32_t)h) + lineStart = gDumpPatternLineMin; + + if (gDumpPatternLineEnabled && gDumpPatternLineMax < (uint32_t)h) + lineEnd = gDumpPatternLineMax; + + for (; lineStart <= lineEnd; lineStart++) + for (int col = 0; col < w; col += sizeof(uint32_t)) { + val = *reinterpret_cast((unsigned char*)data + stride * lineStart + col); + if ((val & gDumpPatternMask) ^ gDumpPattern) return 0; + } + + return 1; +} + void CameraDump::dumpImage(int cameraId, const shared_ptr& camBuffer, ModuleType_t type, Port port, const char* desc) { CheckAndLogError(camBuffer == nullptr, VOID_VALUE, "invalid param"); @@ -394,15 +466,21 @@ void CameraDump::dumpImage(int cameraId, const shared_ptr& camBuff int fd = camBuffer->getFd(); int bufferSize = camBuffer->getBufferSize(); int memoryType = camBuffer->getMemory(); - void* pBuf = (memoryType == V4L2_MEMORY_DMABUF) ? - CameraBuffer::mapDmaBufferAddr(fd, bufferSize) : - camBuffer->getBufferAddr(); + + ScopeMapping mapper(camBuffer); + void* pBuf = mapper.getUserPtr(); + + if (gDumpPatternEnabled) { + if (!checkPattern(pBuf, bufferSize, + camBuffer->getWidth(), + camBuffer->getHeight(), + camBuffer->getStride())) + return; + LOGI("@%s, dump pattern matched frame %d", __func__, camBuffer->getSequence()); + } LOG1("@%s, fd:%d, buffersize:%d, buf:%p, memoryType:%d, fileName:%s", __func__, fd, bufferSize, pBuf, memoryType, fileName.c_str()); writeData(pBuf, bufferSize, fileName.c_str()); - if (memoryType == V4L2_MEMORY_DMABUF) { - CameraBuffer::unmapDmaBufferAddr(pBuf, bufferSize); - } } void CameraDump::dumpBinary(int cameraId, const void* data, int size, BinParam_t* binParam) { @@ -423,4 +501,89 @@ void CameraDump::dumpBinary(int cameraId, const void* data, int size, BinParam_t writeData(data, size, fileName.c_str()); } +namespace CameraDump { +DumpThread::DumpThread() {} +DumpThread::~DumpThread() {} + +#define FIFO_NAME "/tmp/cameraDump" +#define BUFFER_SIZE 4096 +bool DumpThread::threadLoop() { + int pipe_fd; + int res; + int open_mode = O_RDONLY; + int bytes_read = 0; + char buffer[BUFFER_SIZE + 1]; + char* equal = nullptr; + const char* PROP_CAMERA_HAL_DUMP = "cameraDump"; + const char* PROP_CAMERA_HAL_DUMP_FORMAT = "cameraDumpFormat"; + const char* PROP_CAMERA_HAL_DUMP_PATH = "cameraDumpPath"; + const char* PROP_CAMERA_HAL_DUMP_SKIP_NUM = "cameraDumpSkipNum"; + const char* PROP_CAMERA_HAL_DUMP_RANGE = "cameraDumpRange"; + const char* PROP_CAMERA_HAL_DUMP_FREQUENCY = "cameraDumpFrequency"; + const char* PROP_AIQDUMP = "AIQDUMP"; + + char fifo_name[BUFFER_SIZE + 1]; + + LOGI("DumpThread start"); + + memset(fifo_name, '\0', sizeof(fifo_name)); + snprintf(fifo_name, BUFFER_SIZE, "%s_%d", FIFO_NAME, getpid()); + if (access(fifo_name, F_OK) == -1) { + res = mkfifo(fifo_name, 0777); + if (res != 0) { + LOGI("Could not create fifo %s", fifo_name); + } + } + + memset(buffer, '\0', sizeof(buffer)); + + pipe_fd = open(fifo_name, open_mode); + LOGI("Process %d opened fd %d", getpid(), pipe_fd); + + if (pipe_fd != -1) { + do { + res = read(pipe_fd, buffer, BUFFER_SIZE); + bytes_read += res; + } while (0); + (void)close(pipe_fd); + } else { + return false; + } + + LOGI("Process %d finished, %s", getpid(), buffer); + equal = strchr(buffer, '='); + if (equal) { + *equal = '\0'; + } else { + return true; + } + + LOGI("%s, %d, %s", __func__, __LINE__, buffer); + if (!strncmp(PROP_CAMERA_HAL_DUMP, buffer, strlen(PROP_CAMERA_HAL_DUMP)) + && strlen(PROP_CAMERA_HAL_DUMP) == strlen(buffer)) { + setenv(PROP_CAMERA_HAL_DUMP, equal + 1, 1); + } else if (!strncmp(PROP_CAMERA_HAL_DUMP_FORMAT, buffer, + strlen(PROP_CAMERA_HAL_DUMP_FORMAT))) { + setenv(PROP_CAMERA_HAL_DUMP_FORMAT, equal + 1, 1); + } else if (!strncmp(PROP_CAMERA_HAL_DUMP_PATH, buffer, + strlen(PROP_CAMERA_HAL_DUMP_PATH))) { + setenv(PROP_CAMERA_HAL_DUMP_PATH, equal + 1, 1); + } else if (!strncmp(PROP_CAMERA_HAL_DUMP_SKIP_NUM, buffer, + strlen(PROP_CAMERA_HAL_DUMP_SKIP_NUM))) { + setenv(PROP_CAMERA_HAL_DUMP_SKIP_NUM, equal + 1, 1); + } else if (!strncmp(PROP_CAMERA_HAL_DUMP_RANGE, buffer, + strlen(PROP_CAMERA_HAL_DUMP_RANGE))) { + setenv(PROP_CAMERA_HAL_DUMP_RANGE, equal + 1, 1); + } else if (!strncmp(PROP_CAMERA_HAL_DUMP_FREQUENCY, buffer, + strlen(PROP_CAMERA_HAL_DUMP_FREQUENCY))) { + setenv(PROP_CAMERA_HAL_DUMP_FREQUENCY, equal + 1, 1); + } else if (!strncmp(PROP_AIQDUMP, buffer, strlen(PROP_AIQDUMP))) { + setenv(PROP_AIQDUMP, equal + 1, 1); + } + setDumpLevel(); + + return true; +} +} // namespace CameraDump + } // namespace icamera diff --git a/src/iutils/CameraDump.h b/src/iutils/CameraDump.h index cb8f583f..08875277 100644 --- a/src/iutils/CameraDump.h +++ b/src/iutils/CameraDump.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ #include #include +#include "iutils/Thread.h" #include "CameraBuffer.h" #include "CameraTypes.h" @@ -62,6 +63,9 @@ enum { DUMP_NVM_DATA = 1 << 16, DUMP_MAKER_NOTE = 1 << 17, DUMP_EMBEDDED_METADATA = 1 << 18, + + // Enable dump thread for dynamic control, export cameraDump=0x100000 + DUMP_THREAD = 1 << 20, }; enum { @@ -142,10 +146,13 @@ namespace CameraDump { * File dump control functions. */ void setDumpLevel(void); +void setDumpThread(void); bool isDumpTypeEnable(int dumpType); bool isDumpFormatEnable(int dumpFormat); void writeData(const void* data, int size, const char* fileName); const char* getDumpPath(void); +void parseRange(char* rangeStr, uint32_t* rangeMin, uint32_t* rangeMax); +int checkPattern(void* data, int bufferSize, int w, int h, int stride); /** * Dump image according to CameraBuffer properties */ @@ -155,6 +162,15 @@ void dumpImage(int cameraId, const std::shared_ptr& camBuffer, * Dump any buffer to binary file */ void dumpBinary(int cameraId, const void* data, int size, BinParam_t* binParam); + +class DumpThread : public Thread { +public: + DumpThread(); + ~DumpThread(); + + bool threadLoop(); +}; + } // namespace CameraDump } // namespace icamera diff --git a/src/iutils/CameraLog.cpp b/src/iutils/CameraLog.cpp index 876a27b3..bd3100e7 100644 --- a/src/iutils/CameraLog.cpp +++ b/src/iutils/CameraLog.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,9 +29,7 @@ #include #endif -#ifdef CAMERA_SYS_LOG #include -#endif #include "CameraLog.h" #include "Trace.h" @@ -93,7 +91,6 @@ __attribute__((__format__(__printf__, 3, 0))) static void printLog(const char* m } #endif -#ifdef CAMERA_SYS_LOG __attribute__((__format__(__printf__, 3, 0))) static void printLog(const char* module, int level, const char* fmt, va_list ap) { const char* levelStr = nullptr; @@ -136,34 +133,6 @@ __attribute__((__format__(__printf__, 3, 0))) static void printLog(const char* m vsyslog(priority, format, ap); closelog(); } -#endif - -static void getLogTime(char* timeBuf, int bufLen) { - // The format of time is: 01-22 15:24:53.071 - struct timeval tv; - gettimeofday(&tv, nullptr); - time_t nowtime = tv.tv_sec; - struct tm* nowtm = localtime(&nowtime); - if (nowtm) { // If nowtm is nullptr, simply print nothing for time info - char tmbuf[bufLen]; - CLEAR(tmbuf); - strftime(tmbuf, bufLen, "%m-%d %H:%M:%S", nowtm); - snprintf(timeBuf, bufLen, "%s.%03ld", tmbuf, tv.tv_usec / 1000); - } -} - -__attribute__((__format__(__printf__, 3, 0))) static void printLog(const char* module, int level, - const char* fmt, va_list ap) { - // Add time into beginning of the log. - const int BUF_LEN = 64; - char timeBuf[BUF_LEN] = {'\0'}; - - getLogTime(timeBuf, BUF_LEN); - - fprintf(stdout, "%s: [%s]: CamHAL_%s:", timeBuf, cameraDebugLogToString(level), module); - vfprintf(stdout, fmt, ap); - fprintf(stdout, "\n"); -} void doLogBody(int logTag, int level, int grpPosition, const char* fmt, ...) { if (!(level & globalGroupsDescp[grpPosition].level)) return; @@ -193,6 +162,7 @@ namespace Log { #define DEFAULT_LOG_SINK "GLOG" #define FILELOG_SINK "FILELOG" +#define SYSLOG_SINK "SYSLOG" static void initLogSinks() { #ifdef CAL_BUILD @@ -211,23 +181,20 @@ static void initLogSinks() { } #endif -#ifdef CAMERA_SYS_LOG const char* sinkName = ::getenv("logSink"); if (!sinkName) { sinkName = DEFAULT_LOG_SINK; } - if (!::strcmp(sinkName, DEFAULT_LOG_SINK)) { + if (!::strcmp(sinkName, SYSLOG_SINK)) { globalLogSink = new SysLogSink(); } else if (!::strcmp(sinkName, FILELOG_SINK)) { globalLogSink = new FileLogSink; } else { globalLogSink = new StdconLogSink(); } -#endif - globalLogSink = new StdconLogSink(); } static void setLogTagLevel() { @@ -291,6 +258,10 @@ void setDebugLevel(void) { // performance char* perfLevel = getenv(PROP_CAMERA_HAL_PERF); if (perfLevel) { +#ifndef GPU_ALGO_SERVER +#ifdef CAL_BUILD + initPerfettoTrace(); +#else gPerfLevel = strtoul(perfLevel, nullptr, 0); LOGI("Performance level is 0x%x", gPerfLevel); @@ -316,6 +287,8 @@ void setDebugLevel(void) { gIsDumpMediaInfo = true; } ScopedAtrace::setTraceLevel(gPerfLevel); +#endif +#endif } } diff --git a/src/iutils/CameraLog.h b/src/iutils/CameraLog.h index 41f1f0c3..4e8fe66d 100644 --- a/src/iutils/CameraLog.h +++ b/src/iutils/CameraLog.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,11 +18,18 @@ #include -#include "utils/ScopedAtrace.h" #ifdef HAVE_ANDROID_OS #include #endif +#ifndef GPU_ALGO_SERVER +#ifdef CAL_BUILD +#include "src/iutils/PerfettoTrace.h" +#else +#include "utils/ScopedAtrace.h" +#endif +#endif + #ifdef CAMERA_TRACE #include "CameraTrace.h" #endif @@ -128,7 +135,7 @@ namespace Log { void setDebugLevel(void); void print_log(bool enable, const char* module, const int level, const char* format, ...); bool isDebugLevelEnable(int level); -bool isLogTagEnabled(int tag, int level = 0); +bool isLogTagEnabled(int tag, int level); // DUMP_ENTITY_TOPOLOGY_S bool isDumpMediaTopo(void); // DUMP_ENTITY_TOPOLOGY_E @@ -228,11 +235,11 @@ void __camera_hal_log(bool condition, int prio, const char* tag, const char* fmt class ScopedTrace { public: inline ScopedTrace(int level, const char* name) : mLevel(level), mName(name) { - if (mLevel <= gLogLevel) LOG1("ENTER-%s", name); + if (mLevel & gLogLevel) LOGI("ENTER-%s", name); } inline ~ScopedTrace() { - if (mLevel <= gLogLevel) LOG1("EXIT-%s", mName); + if (mLevel & gLogLevel) LOGI("EXIT-%s", mName); } private: diff --git a/src/iutils/CameraShm.cpp b/src/iutils/CameraShm.cpp new file mode 100644 index 00000000..b49cd20f --- /dev/null +++ b/src/iutils/CameraShm.cpp @@ -0,0 +1,282 @@ +/* + * Copyright (C) 2017-2021 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG CameraShm + +#include "CameraShm.h" + +#include +#include +#include + +#include "iutils/CameraLog.h" + +namespace icamera { + +static const int CAMERA_DEVICE_IDLE = 0; +static const int CAMERA_IPCKEY = 0x43414D; +static const int CAMERA_SHM_LOCK_TIME = 2; + +#define SEM_NAME "/camlock" +#define SEM_FD_NAME "/dev/shm/sem.camlock" + +CameraSharedMemory::CameraSharedMemory() + : mSemLock(nullptr), + mSharedMemId(-1), + mCameraSharedInfo(nullptr) { + PERF_CAMERA_ATRACE(); + + acquireSharedMemory(); +} + +CameraSharedMemory::~CameraSharedMemory() { + PERF_CAMERA_ATRACE(); + + releaseSharedMemory(); +} + +int CameraSharedMemory::CameraDeviceOpen(int cameraId) { + int ret = OK; + + CheckAndLogError(mCameraSharedInfo == nullptr, ret, "No attached camera shared memory!"); + + CheckAndLogError(lock() != OK, ret, "Fail to lock shared memory!"); + + // Check camera device status from the shared memory + pid_t pid = mCameraSharedInfo->camDevStatus[cameraId].pid; + char* name = mCameraSharedInfo->camDevStatus[cameraId].name; + if (pid != CAMERA_DEVICE_IDLE && processExist(pid, name)) { + LOG1("@%s(pid %d): device has been opened in another process(pid %d/%s)", __func__, + getpid(), pid, name); + ret = INVALID_OPERATION; + } else { + mCameraSharedInfo->camDevStatus[cameraId].pid = getpid(); + getNameByPid(getpid(), mCameraSharedInfo->camDevStatus[cameraId].name); + } + unlock(); + + return ret; +} + +void CameraSharedMemory::CameraDeviceClose(int cameraId) { + CheckAndLogError(mCameraSharedInfo == nullptr, VOID_VALUE, "No attached camera shared memory!"); + + CheckAndLogError(lock() != OK, VOID_VALUE, "Fail to lock shared memory!"); + if (mCameraSharedInfo->camDevStatus[cameraId].pid == getpid()) { + mCameraSharedInfo->camDevStatus[cameraId].pid = CAMERA_DEVICE_IDLE; + CLEAR(mCameraSharedInfo->camDevStatus[cameraId].name); + } else { + LOGW("@%s: The stored pid is not the pid of current process!", __func__); + } + unlock(); +} + +void CameraSharedMemory::acquireSharedMemory() { + openSemLock(); + + bool newCreated = false; + const size_t CAMERA_SM_SIZE = (sizeof(camera_shared_info) / getpagesize() + 1) * getpagesize(); + + CheckAndLogError(lock() != OK, VOID_VALUE, "Fail to lock shared memory!"); + // get the shared memory ID, create shared memory if not exist + mSharedMemId = shmget(CAMERA_IPCKEY, CAMERA_SM_SIZE, 0640); + if (mSharedMemId == -1) { + mSharedMemId = shmget(CAMERA_IPCKEY, CAMERA_SM_SIZE, IPC_CREAT | 0640); + if (mSharedMemId < 0) { + LOGE("Fail to allocate shared memory by shmget."); + unlock(); + return; + } + newCreated = true; + } + + // attach shared memory + mCameraSharedInfo = reinterpret_cast(shmat(mSharedMemId, nullptr, 0)); + if (mCameraSharedInfo == (void*)-1) { + LOGE("Fail to attach shared memory"); + mCameraSharedInfo = nullptr; + } else { + struct shmid_ds shmState; + int ret = shmctl(mSharedMemId, IPC_STAT, &shmState); + + // attach number is 1, current process is the only camera process + if (ret == 0 && shmState.shm_nattch == 1) { + if (newCreated) + LOG1("The shared memory is new created, init the values."); + else + LOG1("Some camera process exited abnormally. Reinit the values."); + + for (int i = 0; i < MAX_CAMERA_NUMBER; i++) { + mCameraSharedInfo->camDevStatus[i].pid = CAMERA_DEVICE_IDLE; + CLEAR(mCameraSharedInfo->camDevStatus[i].name); + } + } else { + // Check if the process stored in share memory is still running. + // Set the device status to IDLE if the stored process is not running. + for (int i = 0; i < MAX_CAMERA_NUMBER; i++) { + pid_t pid = mCameraSharedInfo->camDevStatus[i].pid; + char* name = mCameraSharedInfo->camDevStatus[i].name; + if (pid != CAMERA_DEVICE_IDLE && !processExist(pid, name)) { + LOG1("process %d(%s) opened the device but it's not running now.", pid, name); + mCameraSharedInfo->camDevStatus[i].pid = CAMERA_DEVICE_IDLE; + } + } + } + } + unlock(); +} + +void CameraSharedMemory::releaseSharedMemory() { + CheckAndLogError(mCameraSharedInfo == nullptr, VOID_VALUE, "No attached camera shared memory!"); + + // Make sure the camera device occupied info by current process is cleared + pid_t pid = getpid(); + CheckAndLogError(lock() != OK, VOID_VALUE, "Fail to lock shared memory!"); + for (int i = 0; i < MAX_CAMERA_NUMBER; i++) { + if (mCameraSharedInfo->camDevStatus[i].pid == pid) { + mCameraSharedInfo->camDevStatus[i].pid = CAMERA_DEVICE_IDLE; + LOGW("Seems camera device %d is not closed properly (pid %d).", i, pid); + } + } + + // detach shared memory + int ret = shmdt(mCameraSharedInfo); + if (ret != 0) { + LOGE("Fail to detach shared memory"); + } + + // delete shared memory if no one is attaching + struct shmid_ds shmState; + ret = shmctl(mSharedMemId, IPC_STAT, &shmState); + if (ret == 0 && shmState.shm_nattch == 0) { + LOG1("No attaches to the camera shared memory. Release it."); + shmctl(mSharedMemId, IPC_RMID, 0); + } + unlock(); + + closeSemLock(); +} + +int CameraSharedMemory::cameraDeviceOpenNum() { + CheckAndLogError(mCameraSharedInfo == nullptr, 0, "No attached camera shared memory!"); + + pid_t pid = getpid(); + int camOpenNum = 0; + + CheckAndLogError(lock() != OK, 0, "Fail to lock shared memory!"); + for (int i = 0; i < MAX_CAMERA_NUMBER; i++) { + if (mCameraSharedInfo->camDevStatus[i].pid != CAMERA_DEVICE_IDLE) { + LOG1("The camera device: %d is opened by pid: %d", i, pid); + camOpenNum++; + } + } + unlock(); + LOG1("Camera device is opened number: %d", camOpenNum); + + return camOpenNum; +} + +int CameraSharedMemory::getNameByPid(pid_t pid, char* name) { + const int BUF_SIZE = 1024; + char procPidPath[BUF_SIZE] = {'\0'}; + char buf[BUF_SIZE] = {'\0'}; + + snprintf(procPidPath, BUF_SIZE, "/proc/%d/status", static_cast(pid)); + FILE* fp = fopen(procPidPath, "r"); + CheckAndLogError(fp == nullptr, UNKNOWN_ERROR, "Fail to get the pid status!"); + + if (fgets(buf, BUF_SIZE - 1, fp) != nullptr) { + sscanf(buf, "%*s %64s", name); + } + fclose(fp); + + return OK; +} + +bool CameraSharedMemory::processExist(pid_t pid, const char* storedName) { + char name[MAX_PROCESS_NAME_LENGTH]; + return kill(pid, 0) == 0 && getNameByPid(pid, name) == OK && strcmp(storedName, name) == 0; +} + +void CameraSharedMemory::openSemLock() { + mSemLock = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0644, 1); + if (mSemLock == SEM_FAILED) { + mSemLock = sem_open(SEM_NAME, O_RDWR); + if (mSemLock == SEM_FAILED) { + LOGE("failed to open sem lock, errno: %s\n", strerror(errno)); + return; + } else { + LOG1("Open the sem lock"); + } + } else { + chmod(SEM_FD_NAME, 0666); + LOG1("Create the sem lock"); + return; + } + + // Check if the semaphore is still available + int ret = OK; + struct timespec ts; + CLEAR(ts); + + // Wait the semaphore lock for 2 seconds + clock_gettime(CLOCK_REALTIME, &ts); + ts.tv_sec += CAMERA_SHM_LOCK_TIME; + while ((ret = sem_timedwait(mSemLock, &ts)) == -1 && errno == EINTR) { + } + if (ret == 0) { + sem_post(mSemLock); + return; + } + + if (ret != 0 && errno == ETIMEDOUT) { + LOG1("Lock timed out, process holding it may have crashed. Re-create the semaphore."); + sem_close(mSemLock); + sem_unlink(SEM_NAME); + mSemLock = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0644, 1); + if (mSemLock == SEM_FAILED) { + LOGE("failed to re-create sem lock, errno: %s\n", strerror(errno)); + } else { + chmod(SEM_FD_NAME, 0666); + } + } +} + +void CameraSharedMemory::closeSemLock() { + sem_close(mSemLock); +} + +int CameraSharedMemory::lock() { + int ret = OK; + struct timespec ts; + CheckAndLogError(mSemLock == SEM_FAILED, BAD_VALUE, "invalid sem lock"); + + // Wait the semaphore lock for 2 seconds + CLEAR(ts); + clock_gettime(CLOCK_REALTIME, &ts); + ts.tv_sec += CAMERA_SHM_LOCK_TIME; + while (((ret = sem_timedwait(mSemLock, &ts)) == -1) && errno == EINTR) { + } + CheckAndLogError(ret != 0, UNKNOWN_ERROR, "Lock failed or timed out"); + + return OK; +} + +void CameraSharedMemory::unlock() { + sem_post(mSemLock); +} + +} // namespace icamera diff --git a/src/iutils/CameraShm.h b/src/iutils/CameraShm.h new file mode 100644 index 00000000..6f92872a --- /dev/null +++ b/src/iutils/CameraShm.h @@ -0,0 +1,127 @@ +/* + * Copyright (C) 2017-2021 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#ifndef HAVE_ANDROID_OS +#include + +#include "PlatformData.h" +#endif + +namespace icamera { + +/** + * CameraSharedMemory : Maintain the camera shared memory for communication + * between camera applications running in different processes. + * + * camera device status: + * On camera device open, check the camera device status in shared memory. + * --IDLE, set the camera device status to "occupied" and open normally. + * --occupied, camera device has already been opened, and should not be + * opened again. + * On camera device close, set the camera device status to "IDLE" in shared memory. + * + * More infos that need to be shared between camera applications can be stored + * in the shared memory as well. + * + * This class is created along with cameraHal class. + */ +#ifdef HAVE_ANDROID_OS +// Shared memory is not necessary for Android since only single instance of HAL +// is supported. +class CameraSharedMemory { + public: + CameraSharedMemory() { mCameraDeviceOpenNum = 0; } + ~CameraSharedMemory() {} + int CameraDeviceOpen(int cameraId) { + mCameraDeviceOpenNum++; + return OK; + } + void CameraDeviceClose(int cameraId) { mCameraDeviceOpenNum--; } + int cameraDeviceOpenNum() { return mCameraDeviceOpenNum; } + + private: + int mCameraDeviceOpenNum; +}; + +#else +class CameraSharedMemory { + public: + CameraSharedMemory(); + ~CameraSharedMemory(); + /** + * \brief Check and update the camera device status in shared memory. + * + * On deviceOpen(), call this function to check the camera device status in + * shared memory. If the camera device has already been opened in another + * process, it should not be opened again. Otherwise, set the camera device + * to "occupied" in shared memory. Then it will not be opened again in + * another process. + * + * \return OK if succeed, other value indicates failed + */ + int CameraDeviceOpen(int cameraId); + + /** + * \brief Update the camera device status to "IDLE" in shared memory. + * + * On deviceClose(), call this function to set the camera device status to + * "IDLE" in shared memory. + * + */ + void CameraDeviceClose(int cameraId); + + /** + * \brief Get camera device open number. + * + * On cameraDeviceOpenNum()a call this function to get the camera device open times + * + */ + int cameraDeviceOpenNum(); + + private: + CameraSharedMemory(const CameraSharedMemory& copyClass); + CameraSharedMemory& operator=(const CameraSharedMemory& rightClass); + + void acquireSharedMemory(); + void releaseSharedMemory(); + + int getNameByPid(pid_t pid, char* name); + bool processExist(pid_t pid, const char* storedName); + void openSemLock(); + void closeSemLock(); + int lock(); + void unlock(); + + private: + static const int MAX_PROCESS_NAME_LENGTH = 64; + struct cameraDevStatus { + pid_t pid; + char name[MAX_PROCESS_NAME_LENGTH]; + }; + struct camera_shared_info { + cameraDevStatus camDevStatus[MAX_CAMERA_NUMBER]; + // Other static variables need to be stored should be added here + }; + + sem_t* mSemLock; + int mSharedMemId; + camera_shared_info* mCameraSharedInfo; +}; +#endif + +} // namespace icamera diff --git a/src/iutils/LogSink.cpp b/src/iutils/LogSink.cpp index 19dc6e34..3311307b 100644 --- a/src/iutils/LogSink.cpp +++ b/src/iutils/LogSink.cpp @@ -30,12 +30,10 @@ #include "iutils/LogSink.h" #include "iutils/Utils.h" -#ifdef CAMERA_SYS_LOG #include #include #include #include -#endif namespace icamera { extern const char* cameraDebugLogToString(int level); #define CAMERA_DEBUG_LOG_ERR (1 << 5) @@ -130,6 +128,8 @@ const char* FileLogSink::getName() const { } void FileLogSink::sendOffLog(LogItem logItem) { + if (mFp == nullptr) return; + char timeInfo[TIME_BUF_SIZE]; setLogTime(timeInfo); fprintf(mFp, "[%s] CamHAL[%s] %s:%s\n", timeInfo, @@ -137,7 +137,10 @@ void FileLogSink::sendOffLog(LogItem logItem) { fflush(mFp); } -#ifdef CAMERA_SYS_LOG +FileLogSink::~FileLogSink() { + if (mFp) fclose(mFp); +} + SysLogSink::SysLogSink() {} SysLogSink::~SysLogSink() {} @@ -161,6 +164,5 @@ void SysLogSink::sendOffLog(LogItem logItem) { syslog(levelMap[levelStr], "%s", logMsg); closelog(); } -#endif }; // namespace icamera diff --git a/src/iutils/LogSink.h b/src/iutils/LogSink.h index edf507b4..67319c91 100644 --- a/src/iutils/LogSink.h +++ b/src/iutils/LogSink.h @@ -62,7 +62,6 @@ class StdconLogSink : public LogOutputSink { void sendOffLog(LogItem logItem) override; }; -#ifdef CAMERA_SYS_LOG class SysLogSink : public LogOutputSink { public: SysLogSink(); @@ -70,11 +69,11 @@ class SysLogSink : public LogOutputSink { const char* getName() const override; void sendOffLog(LogItem logItem) override; }; -#endif class FileLogSink : public LogOutputSink { public: FileLogSink(); + ~FileLogSink(); const char* getName() const override; void sendOffLog(LogItem logItem) override; diff --git a/src/iutils/ModuleTags.cpp b/src/iutils/ModuleTags.cpp index 49993e98..03d8e528 100644 --- a/src/iutils/ModuleTags.cpp +++ b/src/iutils/ModuleTags.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2021-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,8 @@ const char* tagNames[] = { "CsiMetaDevice", "Customized3A", "CustomizedAic", + "CvfPrivacyChecker", + "DLCClient", "DeviceBase", "Dvs", "EXIFMaker", @@ -85,6 +87,7 @@ const char* tagNames[] = { "ExifCreater", "FaceDetection", "FaceDetectionPVL", + "FaceDetectionResultCallbackManager", "FaceSSD", "FileSource", "GPUExecutor", @@ -102,11 +105,12 @@ const char* tagNames[] = { "HAL_jpeg", "HAL_multi_streams_test", "HAL_rotation_test", - "HAL_supported_streams_test", "HAL_yuv", + "HalAdaptor", "HalV3Utils", "I3AControlFactory", "IA_CIPR_UTILS", + "ICBMThread", "ICamera", "IFaceDetection", "IPCIntelPGParam", @@ -129,6 +133,9 @@ const char* tagNames[] = { "IntelFaceDetection", "IntelFaceDetectionClient", "IntelGPUAlgoServer", + "IntelICBM", + "IntelICBMClient", + "IntelICBMServer", "IntelPGParam", "IntelPGParamClient", "IntelPGParamS", @@ -151,6 +158,7 @@ const char* tagNames[] = { "MockCameraHal", "MockSysCall", "MsgHandler", + "OnePunchIC2", "OpenSourceGFX", "PGCommon", "PGUtils", @@ -170,6 +178,7 @@ const char* tagNames[] = { "PostProcessor", "PostProcessorBase", "PostProcessorCore", + "PrivacyControl", "PrivateStream", "ProcessorManager", "RequestManager", @@ -177,6 +186,8 @@ const char* tagNames[] = { "ResultProcessor", "SWJpegEncoder", "SWPostProcessor", + "SchedPolicy", + "Scheduler", "SensorHwCtrl", "SensorManager", "SensorOB", diff --git a/src/iutils/ModuleTags.h b/src/iutils/ModuleTags.h index d2c29902..d783e80d 100644 --- a/src/iutils/ModuleTags.h +++ b/src/iutils/ModuleTags.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2021-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,193 +27,204 @@ #endif enum ModuleTags { - GENERATED_TAGS_3atest = 0, - GENERATED_TAGS_AiqCore = 1, - GENERATED_TAGS_AiqEngine = 2, - GENERATED_TAGS_AiqInitData = 3, - GENERATED_TAGS_AiqResult = 4, - GENERATED_TAGS_AiqResultStorage = 5, - GENERATED_TAGS_AiqSetting = 6, - GENERATED_TAGS_AiqUnit = 7, - GENERATED_TAGS_AiqUtils = 8, - GENERATED_TAGS_BufferQueue = 9, - GENERATED_TAGS_CASE_3A_CONTROL = 10, - GENERATED_TAGS_CASE_AIQ = 11, - GENERATED_TAGS_CASE_API_MULTI_THREAD = 12, - GENERATED_TAGS_CASE_BUFFER = 13, - GENERATED_TAGS_CASE_COMMON = 14, - GENERATED_TAGS_CASE_CPF = 15, - GENERATED_TAGS_CASE_DEVICE_OPS = 16, - GENERATED_TAGS_CASE_DUAL = 17, - GENERATED_TAGS_CASE_GRAPH = 18, - GENERATED_TAGS_CASE_IQ_EFFECT = 19, - GENERATED_TAGS_CASE_PARAMETER = 20, - GENERATED_TAGS_CASE_PER_FRAME = 21, - GENERATED_TAGS_CASE_STATIC_INFO = 22, - GENERATED_TAGS_CASE_STREAM_OPS = 23, - GENERATED_TAGS_CASE_THREAD = 24, - GENERATED_TAGS_CASE_VIRTUAL_CHANNEL = 25, - GENERATED_TAGS_CIPR_BUFFER = 26, - GENERATED_TAGS_CIPR_COMMAND = 27, - GENERATED_TAGS_CIPR_CONTEXT = 28, - GENERATED_TAGS_CIPR_EVENT = 29, - GENERATED_TAGS_Camera2Module = 30, - GENERATED_TAGS_Camera3AMetadata = 31, - GENERATED_TAGS_Camera3Buffer = 32, - GENERATED_TAGS_Camera3BufferPool = 33, - GENERATED_TAGS_Camera3Channel = 34, - GENERATED_TAGS_Camera3Format = 35, - GENERATED_TAGS_Camera3HAL = 36, - GENERATED_TAGS_Camera3HALModule = 37, - GENERATED_TAGS_Camera3HWI = 38, - GENERATED_TAGS_Camera3Stream = 39, - GENERATED_TAGS_Camera3StreamHAL = 40, - GENERATED_TAGS_Camera3StreamListener = 41, - GENERATED_TAGS_CameraBuffer = 42, - GENERATED_TAGS_CameraDevice = 43, - GENERATED_TAGS_CameraDump = 44, - GENERATED_TAGS_CameraEvent = 45, - GENERATED_TAGS_CameraHal = 46, - GENERATED_TAGS_CameraHardwareSoc = 47, - GENERATED_TAGS_CameraLog = 48, - GENERATED_TAGS_CameraMetadata = 49, - GENERATED_TAGS_CameraParser = 50, - GENERATED_TAGS_CameraShm = 51, - GENERATED_TAGS_CameraStream = 52, - GENERATED_TAGS_Camera_PolicyManager = 53, - GENERATED_TAGS_CaptureUnit = 54, - GENERATED_TAGS_ColorConverter = 55, - GENERATED_TAGS_CsiMetaDevice = 56, - GENERATED_TAGS_Customized3A = 57, - GENERATED_TAGS_CustomizedAic = 58, - GENERATED_TAGS_DeviceBase = 59, - GENERATED_TAGS_Dvs = 60, - GENERATED_TAGS_EXIFMaker = 61, - GENERATED_TAGS_EXIFMetaData = 62, - GENERATED_TAGS_ExifCreater = 63, - GENERATED_TAGS_FaceDetection = 64, - GENERATED_TAGS_FaceDetectionPVL = 65, - GENERATED_TAGS_FaceSSD = 66, - GENERATED_TAGS_FileSource = 67, - GENERATED_TAGS_GPUExecutor = 68, - GENERATED_TAGS_GenGfx = 69, - GENERATED_TAGS_GfxGen = 70, - GENERATED_TAGS_GraphConfig = 71, - GENERATED_TAGS_GraphConfigImpl = 72, - GENERATED_TAGS_GraphConfigImplClient = 73, - GENERATED_TAGS_GraphConfigManager = 74, - GENERATED_TAGS_GraphConfigPipe = 75, - GENERATED_TAGS_GraphConfigServer = 76, - GENERATED_TAGS_GraphUtils = 77, - GENERATED_TAGS_HAL_FACE_DETECTION_TEST = 78, - GENERATED_TAGS_HAL_basic = 79, - GENERATED_TAGS_HAL_jpeg = 80, - GENERATED_TAGS_HAL_multi_streams_test = 81, - GENERATED_TAGS_HAL_rotation_test = 82, - GENERATED_TAGS_HAL_supported_streams_test = 83, - GENERATED_TAGS_HAL_yuv = 84, - GENERATED_TAGS_HalV3Utils = 85, - GENERATED_TAGS_I3AControlFactory = 86, - GENERATED_TAGS_IA_CIPR_UTILS = 87, - GENERATED_TAGS_ICamera = 88, - GENERATED_TAGS_IFaceDetection = 89, - GENERATED_TAGS_IPCIntelPGParam = 90, - GENERATED_TAGS_IPC_FACE_DETECTION = 91, - GENERATED_TAGS_IPC_GRAPH_CONFIG = 92, - GENERATED_TAGS_ImageProcessorCore = 93, - GENERATED_TAGS_ImageScalerCore = 94, - GENERATED_TAGS_Intel3AParameter = 95, - GENERATED_TAGS_IntelAEStateMachine = 96, - GENERATED_TAGS_IntelAFStateMachine = 97, - GENERATED_TAGS_IntelAWBStateMachine = 98, - GENERATED_TAGS_IntelAlgoClient = 99, - GENERATED_TAGS_IntelAlgoCommonClient = 100, - GENERATED_TAGS_IntelAlgoServer = 101, - GENERATED_TAGS_IntelCPUAlgoServer = 102, - GENERATED_TAGS_IntelCca = 103, - GENERATED_TAGS_IntelCcaClient = 104, - GENERATED_TAGS_IntelCcaServer = 105, - GENERATED_TAGS_IntelFDServer = 106, - GENERATED_TAGS_IntelFaceDetection = 107, - GENERATED_TAGS_IntelFaceDetectionClient = 108, - GENERATED_TAGS_IntelGPUAlgoServer = 109, - GENERATED_TAGS_IntelPGParam = 110, - GENERATED_TAGS_IntelPGParamClient = 111, - GENERATED_TAGS_IntelPGParamS = 112, - GENERATED_TAGS_IntelTNR7US = 113, - GENERATED_TAGS_IntelTNR7USClient = 114, - GENERATED_TAGS_IntelTNRServer = 115, - GENERATED_TAGS_IspControlUtils = 116, - GENERATED_TAGS_IspParamAdaptor = 117, - GENERATED_TAGS_JpegEncoderCore = 118, - GENERATED_TAGS_JpegMaker = 119, - GENERATED_TAGS_LensHw = 120, - GENERATED_TAGS_LensManager = 121, - GENERATED_TAGS_LiveTuning = 122, - GENERATED_TAGS_Ltm = 123, - GENERATED_TAGS_MANUAL_POST_PROCESSING = 124, - GENERATED_TAGS_MakerNote = 125, - GENERATED_TAGS_MediaControl = 126, - GENERATED_TAGS_MetadataConvert = 127, - GENERATED_TAGS_MockCamera3HAL = 128, - GENERATED_TAGS_MockCameraHal = 129, - GENERATED_TAGS_MockSysCall = 130, - GENERATED_TAGS_MsgHandler = 131, - GENERATED_TAGS_OpenSourceGFX = 132, - GENERATED_TAGS_PGCommon = 133, - GENERATED_TAGS_PGUtils = 134, - GENERATED_TAGS_PSysDAG = 135, - GENERATED_TAGS_PSysPipe = 136, - GENERATED_TAGS_PSysProcessor = 137, - GENERATED_TAGS_ParameterGenerator = 138, - GENERATED_TAGS_ParameterHelper = 139, - GENERATED_TAGS_ParameterResult = 140, - GENERATED_TAGS_Parameters = 141, - GENERATED_TAGS_ParserBase = 142, - GENERATED_TAGS_PipeExecutor = 143, - GENERATED_TAGS_PipeLiteExecutor = 144, - GENERATED_TAGS_PlatformData = 145, - GENERATED_TAGS_PnpDebugControl = 146, - GENERATED_TAGS_PolicyParser = 147, - GENERATED_TAGS_PostProcessor = 148, - GENERATED_TAGS_PostProcessorBase = 149, - GENERATED_TAGS_PostProcessorCore = 150, - GENERATED_TAGS_PrivateStream = 151, - GENERATED_TAGS_ProcessorManager = 152, - GENERATED_TAGS_RequestManager = 153, - GENERATED_TAGS_RequestThread = 154, - GENERATED_TAGS_ResultProcessor = 155, - GENERATED_TAGS_SWJpegEncoder = 156, - GENERATED_TAGS_SWPostProcessor = 157, - GENERATED_TAGS_SensorHwCtrl = 158, - GENERATED_TAGS_SensorManager = 159, - GENERATED_TAGS_SensorOB = 160, - GENERATED_TAGS_ShareRefer = 161, - GENERATED_TAGS_SofSource = 162, - GENERATED_TAGS_StreamBuffer = 163, - GENERATED_TAGS_SwImageConverter = 164, - GENERATED_TAGS_SwImageProcessor = 165, - GENERATED_TAGS_SyncManager = 166, - GENERATED_TAGS_SysCall = 167, - GENERATED_TAGS_TCPServer = 168, - GENERATED_TAGS_Thread = 169, - GENERATED_TAGS_Trace = 170, - GENERATED_TAGS_TunningParser = 171, - GENERATED_TAGS_Utils = 172, - GENERATED_TAGS_V4l2DeviceFactory = 173, - GENERATED_TAGS_V4l2_device_cc = 174, - GENERATED_TAGS_V4l2_subdevice_cc = 175, - GENERATED_TAGS_V4l2_video_node_cc = 176, - GENERATED_TAGS_VendorTags = 177, - GENERATED_TAGS_camera_metadata_tests = 178, - GENERATED_TAGS_icamera_metadata_base = 179, - GENERATED_TAGS_metadata_test = 180, - ST_FPS = 181, - ST_GPU_TNR = 182, - ST_STATS = 183, + GENERATED_TAGS_3atest = 0, + GENERATED_TAGS_AiqCore = 1, + GENERATED_TAGS_AiqEngine = 2, + GENERATED_TAGS_AiqInitData = 3, + GENERATED_TAGS_AiqResult = 4, + GENERATED_TAGS_AiqResultStorage = 5, + GENERATED_TAGS_AiqSetting = 6, + GENERATED_TAGS_AiqUnit = 7, + GENERATED_TAGS_AiqUtils = 8, + GENERATED_TAGS_BufferQueue = 9, + GENERATED_TAGS_CASE_3A_CONTROL = 10, + GENERATED_TAGS_CASE_AIQ = 11, + GENERATED_TAGS_CASE_API_MULTI_THREAD = 12, + GENERATED_TAGS_CASE_BUFFER = 13, + GENERATED_TAGS_CASE_COMMON = 14, + GENERATED_TAGS_CASE_CPF = 15, + GENERATED_TAGS_CASE_DEVICE_OPS = 16, + GENERATED_TAGS_CASE_DUAL = 17, + GENERATED_TAGS_CASE_GRAPH = 18, + GENERATED_TAGS_CASE_IQ_EFFECT = 19, + GENERATED_TAGS_CASE_PARAMETER = 20, + GENERATED_TAGS_CASE_PER_FRAME = 21, + GENERATED_TAGS_CASE_STATIC_INFO = 22, + GENERATED_TAGS_CASE_STREAM_OPS = 23, + GENERATED_TAGS_CASE_THREAD = 24, + GENERATED_TAGS_CASE_VIRTUAL_CHANNEL = 25, + GENERATED_TAGS_CIPR_BUFFER = 26, + GENERATED_TAGS_CIPR_COMMAND = 27, + GENERATED_TAGS_CIPR_CONTEXT = 28, + GENERATED_TAGS_CIPR_EVENT = 29, + GENERATED_TAGS_Camera2Module = 30, + GENERATED_TAGS_Camera3AMetadata = 31, + GENERATED_TAGS_Camera3Buffer = 32, + GENERATED_TAGS_Camera3BufferPool = 33, + GENERATED_TAGS_Camera3Channel = 34, + GENERATED_TAGS_Camera3Format = 35, + GENERATED_TAGS_Camera3HAL = 36, + GENERATED_TAGS_Camera3HALModule = 37, + GENERATED_TAGS_Camera3HWI = 38, + GENERATED_TAGS_Camera3Stream = 39, + GENERATED_TAGS_Camera3StreamHAL = 40, + GENERATED_TAGS_Camera3StreamListener = 41, + GENERATED_TAGS_CameraBuffer = 42, + GENERATED_TAGS_CameraDevice = 43, + GENERATED_TAGS_CameraDump = 44, + GENERATED_TAGS_CameraEvent = 45, + GENERATED_TAGS_CameraHal = 46, + GENERATED_TAGS_CameraHardwareSoc = 47, + GENERATED_TAGS_CameraLog = 48, + GENERATED_TAGS_CameraMetadata = 49, + GENERATED_TAGS_CameraParser = 50, + GENERATED_TAGS_CameraShm = 51, + GENERATED_TAGS_CameraStream = 52, + GENERATED_TAGS_Camera_PolicyManager = 53, + GENERATED_TAGS_CaptureUnit = 54, + GENERATED_TAGS_ColorConverter = 55, + GENERATED_TAGS_CsiMetaDevice = 56, + GENERATED_TAGS_Customized3A = 57, + GENERATED_TAGS_CustomizedAic = 58, + GENERATED_TAGS_CvfPrivacyChecker = 59, + GENERATED_TAGS_DLCClient = 60, + GENERATED_TAGS_DeviceBase = 61, + GENERATED_TAGS_Dvs = 62, + GENERATED_TAGS_EXIFMaker = 63, + GENERATED_TAGS_EXIFMetaData = 64, + GENERATED_TAGS_ExifCreater = 65, + GENERATED_TAGS_FaceDetection = 66, + GENERATED_TAGS_FaceDetectionPVL = 67, + GENERATED_TAGS_FaceDetectionResultCallbackManager = 68, + GENERATED_TAGS_FaceSSD = 69, + GENERATED_TAGS_FileSource = 70, + GENERATED_TAGS_GPUExecutor = 71, + GENERATED_TAGS_GenGfx = 72, + GENERATED_TAGS_GfxGen = 73, + GENERATED_TAGS_GraphConfig = 74, + GENERATED_TAGS_GraphConfigImpl = 75, + GENERATED_TAGS_GraphConfigImplClient = 76, + GENERATED_TAGS_GraphConfigManager = 77, + GENERATED_TAGS_GraphConfigPipe = 78, + GENERATED_TAGS_GraphConfigServer = 79, + GENERATED_TAGS_GraphUtils = 80, + GENERATED_TAGS_HAL_FACE_DETECTION_TEST = 81, + GENERATED_TAGS_HAL_basic = 82, + GENERATED_TAGS_HAL_jpeg = 83, + GENERATED_TAGS_HAL_multi_streams_test = 84, + GENERATED_TAGS_HAL_rotation_test = 85, + GENERATED_TAGS_HAL_yuv = 86, + GENERATED_TAGS_HalAdaptor = 87, + GENERATED_TAGS_HalV3Utils = 88, + GENERATED_TAGS_I3AControlFactory = 89, + GENERATED_TAGS_IA_CIPR_UTILS = 90, + GENERATED_TAGS_ICBMThread = 91, + GENERATED_TAGS_ICamera = 92, + GENERATED_TAGS_IFaceDetection = 93, + GENERATED_TAGS_IPCIntelPGParam = 94, + GENERATED_TAGS_IPC_FACE_DETECTION = 95, + GENERATED_TAGS_IPC_GRAPH_CONFIG = 96, + GENERATED_TAGS_ImageProcessorCore = 97, + GENERATED_TAGS_ImageScalerCore = 98, + GENERATED_TAGS_Intel3AParameter = 99, + GENERATED_TAGS_IntelAEStateMachine = 100, + GENERATED_TAGS_IntelAFStateMachine = 101, + GENERATED_TAGS_IntelAWBStateMachine = 102, + GENERATED_TAGS_IntelAlgoClient = 103, + GENERATED_TAGS_IntelAlgoCommonClient = 104, + GENERATED_TAGS_IntelAlgoServer = 105, + GENERATED_TAGS_IntelCPUAlgoServer = 106, + GENERATED_TAGS_IntelCca = 107, + GENERATED_TAGS_IntelCcaClient = 108, + GENERATED_TAGS_IntelCcaServer = 109, + GENERATED_TAGS_IntelFDServer = 110, + GENERATED_TAGS_IntelFaceDetection = 111, + GENERATED_TAGS_IntelFaceDetectionClient = 112, + GENERATED_TAGS_IntelGPUAlgoServer = 113, + GENERATED_TAGS_IntelICBM = 114, + GENERATED_TAGS_IntelICBMClient = 115, + GENERATED_TAGS_IntelICBMServer = 116, + GENERATED_TAGS_IntelPGParam = 117, + GENERATED_TAGS_IntelPGParamClient = 118, + GENERATED_TAGS_IntelPGParamS = 119, + GENERATED_TAGS_IntelTNR7US = 120, + GENERATED_TAGS_IntelTNR7USClient = 121, + GENERATED_TAGS_IntelTNRServer = 122, + GENERATED_TAGS_IspControlUtils = 123, + GENERATED_TAGS_IspParamAdaptor = 124, + GENERATED_TAGS_JpegEncoderCore = 125, + GENERATED_TAGS_JpegMaker = 126, + GENERATED_TAGS_LensHw = 127, + GENERATED_TAGS_LensManager = 128, + GENERATED_TAGS_LiveTuning = 129, + GENERATED_TAGS_Ltm = 130, + GENERATED_TAGS_MANUAL_POST_PROCESSING = 131, + GENERATED_TAGS_MakerNote = 132, + GENERATED_TAGS_MediaControl = 133, + GENERATED_TAGS_MetadataConvert = 134, + GENERATED_TAGS_MockCamera3HAL = 135, + GENERATED_TAGS_MockCameraHal = 136, + GENERATED_TAGS_MockSysCall = 137, + GENERATED_TAGS_MsgHandler = 138, + GENERATED_TAGS_OnePunchIC2 = 139, + GENERATED_TAGS_OpenSourceGFX = 140, + GENERATED_TAGS_PGCommon = 141, + GENERATED_TAGS_PGUtils = 142, + GENERATED_TAGS_PSysDAG = 143, + GENERATED_TAGS_PSysPipe = 144, + GENERATED_TAGS_PSysProcessor = 145, + GENERATED_TAGS_ParameterGenerator = 146, + GENERATED_TAGS_ParameterHelper = 147, + GENERATED_TAGS_ParameterResult = 148, + GENERATED_TAGS_Parameters = 149, + GENERATED_TAGS_ParserBase = 150, + GENERATED_TAGS_PipeExecutor = 151, + GENERATED_TAGS_PipeLiteExecutor = 152, + GENERATED_TAGS_PlatformData = 153, + GENERATED_TAGS_PnpDebugControl = 154, + GENERATED_TAGS_PolicyParser = 155, + GENERATED_TAGS_PostProcessor = 156, + GENERATED_TAGS_PostProcessorBase = 157, + GENERATED_TAGS_PostProcessorCore = 158, + GENERATED_TAGS_PrivacyControl = 159, + GENERATED_TAGS_PrivateStream = 160, + GENERATED_TAGS_ProcessorManager = 161, + GENERATED_TAGS_RequestManager = 162, + GENERATED_TAGS_RequestThread = 163, + GENERATED_TAGS_ResultProcessor = 164, + GENERATED_TAGS_SWJpegEncoder = 165, + GENERATED_TAGS_SWPostProcessor = 166, + GENERATED_TAGS_SchedPolicy = 167, + GENERATED_TAGS_Scheduler = 168, + GENERATED_TAGS_SensorHwCtrl = 169, + GENERATED_TAGS_SensorManager = 170, + GENERATED_TAGS_SensorOB = 171, + GENERATED_TAGS_ShareRefer = 172, + GENERATED_TAGS_SofSource = 173, + GENERATED_TAGS_StreamBuffer = 174, + GENERATED_TAGS_SwImageConverter = 175, + GENERATED_TAGS_SwImageProcessor = 176, + GENERATED_TAGS_SyncManager = 177, + GENERATED_TAGS_SysCall = 178, + GENERATED_TAGS_TCPServer = 179, + GENERATED_TAGS_Thread = 180, + GENERATED_TAGS_Trace = 181, + GENERATED_TAGS_TunningParser = 182, + GENERATED_TAGS_Utils = 183, + GENERATED_TAGS_V4l2DeviceFactory = 184, + GENERATED_TAGS_V4l2_device_cc = 185, + GENERATED_TAGS_V4l2_subdevice_cc = 186, + GENERATED_TAGS_V4l2_video_node_cc = 187, + GENERATED_TAGS_VendorTags = 188, + GENERATED_TAGS_camera_metadata_tests = 189, + GENERATED_TAGS_icamera_metadata_base = 190, + GENERATED_TAGS_metadata_test = 191, + ST_FPS = 192, + ST_GPU_TNR = 193, + ST_STATS = 194, }; -#define TAGS_MAX_NUM 184 +#define TAGS_MAX_NUM 195 #endif // !!! DO NOT EDIT THIS FILE !!! diff --git a/src/iutils/PerfettoTrace.cpp b/src/iutils/PerfettoTrace.cpp new file mode 100644 index 00000000..db0102ae --- /dev/null +++ b/src/iutils/PerfettoTrace.cpp @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2023 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "src/iutils/PerfettoTrace.h" + +#include +#include +#include + +namespace icamera { +bool gPerfettoEnabled = false; +} + +class PerfettoTrace : public perfetto::TrackEventSessionObserver { + public: + PerfettoTrace() { perfetto::TrackEvent::AddSessionObserver(this); } + ~PerfettoTrace() override { perfetto::TrackEvent::RemoveSessionObserver(this); } + + void OnStart(const perfetto::DataSourceBase::StartArgs&) override { + std::unique_lock lock(mutex); + cv.notify_one(); + } + + void ConnectToService() { + std::unique_lock lock(mutex); + cv.wait(lock, [] { return perfetto::TrackEvent::IsEnabled(); }); + } + + std::mutex mutex; + std::condition_variable cv; +}; + +PERFETTO_TRACK_EVENT_STATIC_STORAGE(); + +static PerfettoTrace* gPerfettoAgent = nullptr; +static std::once_flag gPerfettoOnce; + +static void uninitPerfettoTrace() { + ::perfetto::TrackEvent::Flush(); + icamera::gPerfettoEnabled = false; + delete gPerfettoAgent; +} + +void initPerfettoTrace() { + std::call_once(gPerfettoOnce, [&]() { + perfetto::TracingInitArgs args; + args.backends = perfetto::kSystemBackend; + + perfetto::Tracing::Initialize(args); + perfetto::TrackEvent::Register(); + + gPerfettoAgent = new PerfettoTrace; + gPerfettoAgent->ConnectToService(); + + icamera::gPerfettoEnabled = true; + ::atexit(::uninitPerfettoTrace); + }); +} diff --git a/src/iutils/PerfettoTrace.h b/src/iutils/PerfettoTrace.h new file mode 100644 index 00000000..80a68635 --- /dev/null +++ b/src/iutils/PerfettoTrace.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2023 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#include +#include + +#include + +namespace icamera { +extern bool gPerfettoEnabled; +} + +PERFETTO_DEFINE_CATEGORIES( + perfetto::Category("libcamhal").SetDescription("libcamhal")); + +extern void initPerfettoTrace(); + +constexpr std::string_view DECODE_TO_NEW_NAME(const char* fn) { + std::string_view sv(fn); + auto paren = sv.rfind('('); + auto space = sv.rfind(' ', paren + 1); + return sv.substr(space + 1, paren - space - 1); +} + +#define TRACE_PERFETTO_EVENT_NAME DECODE_TO_NEW_NAME(__PRETTY_FUNCTION__) + +#define PERFETTO_TRACE_EVENT(...) \ + static const std::string event_##__LINE__(TRACE_PERFETTO_EVENT_NAME); \ + do { \ + if (gPerfettoEnabled) \ + TRACE_EVENT("libcamhal", perfetto::StaticString{event_##__LINE__.c_str()}, \ + ##__VA_ARGS__); \ + } while (0) + +#define PERF_CAMERA_ATRACE(...) PERFETTO_TRACE_EVENT(__VA_ARGS__); + +#define PERF_CAMERA_ATRACE_PARAM1(...) PERFETTO_TRACE_EVENT(__VA_ARGS__); + +#define PERF_CAMERA_ATRACE_PARAM2(...) PERFETTO_TRACE_EVENT(__VA_ARGS__); + +#define PERF_CAMERA_ATRACE_PARAM3(...) PERFETTO_TRACE_EVENT(__VA_ARGS__); + +#define PERF_CAMERA_ATRACE_IMAGING(...) PERFETTO_TRACE_EVENT(__VA_ARGS__); + +#define PERF_CAMERA_ATRACE_PARAM1_IMAGING(...) PERFETTO_TRACE_EVENT(__VA_ARGS__); + +#define PERF_CAMERA_ATRACE_PARAM2_IMAGING(...) PERFETTO_TRACE_EVENT(__VA_ARGS__); + +#define PERF_CAMERA_ATRACE_PARAM3_IMAGING(...) PERFETTO_TRACE_EVENT(__VA_ARGS__); diff --git a/src/iutils/Utils.cpp b/src/iutils/Utils.cpp index 63fc3bba..8c60930c 100644 --- a/src/iutils/Utils.cpp +++ b/src/iutils/Utils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,13 +25,14 @@ #include #include #include +#include #include #include #include -#include "PlatformData.h" #include "iutils/CameraLog.h" +#include "iutils/Errors.h" #include "linux/ipu-isys.h" #include "linux/media-bus-format.h" @@ -188,11 +189,17 @@ struct TuningModeStringInfo { static const TuningModeStringInfo TuningModeStringInfoTable[] = { {TUNING_MODE_VIDEO, "VIDEO"}, {TUNING_MODE_VIDEO_ULL, "VIDEO-ULL"}, + // HDR_FEATURE_S + {TUNING_MODE_VIDEO_HDR, "VIDEO-HDR"}, + {TUNING_MODE_VIDEO_HDR2, "VIDEO-HDR2"}, + {TUNING_MODE_VIDEO_HLC, "VIDEO-HLC"}, + // HDR_FEATURE_E {TUNING_MODE_VIDEO_CUSTOM_AIC, "VIDEO-CUSTOM_AIC"}, {TUNING_MODE_VIDEO_LL, "VIDEO-LL"}, {TUNING_MODE_VIDEO_REAR_VIEW, "VIDEO-REAR-VIEW"}, {TUNING_MODE_VIDEO_HITCH_VIEW, "VIDEO-HITCH-VIEW"}, {TUNING_MODE_STILL_CAPTURE, "STILL_CAPTURE"}, + {TUNING_MODE_VIDEO_BINNING, "VIDEO-BINNING"}, }; const char* CameraUtils::tuningMode2String(TuningMode mode) { @@ -588,8 +595,12 @@ void CameraUtils::getDeviceName(const char* entityName, string& deviceNodeName, subDeviceName += dirp->d_name; subDeviceName += "/name"; int fd = open(subDeviceName.c_str(), O_RDONLY); - CheckAndLogError((fd < 0), VOID_VALUE, "@%s, open file %s failed. err: %s", __func__, - subDeviceName.c_str(), strerror(errno)); + if (fd < 0) { + LOGE("@%s, open file %s failed. err: %s", __func__, subDeviceName.c_str(), + strerror(errno)); + closedir(dp); + return; + } char buf[128] = {'\0'}; int len = read(fd, buf, sizeof(buf)); @@ -616,11 +627,6 @@ int CameraUtils::getInterlaceHeight(int field, int height) { return height; } -bool CameraUtils::isMultiExposureCase(int cameraId, TuningMode tuningMode) { - - return false; -} - bool CameraUtils::isUllPsysPipe(TuningMode tuningMode) { return (tuningMode == TUNING_MODE_VIDEO_ULL || tuningMode == TUNING_MODE_VIDEO_CUSTOM_AIC); } @@ -632,6 +638,14 @@ ConfigMode CameraUtils::getConfigModeByName(const char* ConfigName) { LOGE("%s, the ConfigName is nullptr", __func__); } else if (strcmp(ConfigName, "AUTO") == 0) { configMode = CAMERA_STREAM_CONFIGURATION_MODE_AUTO; + // HDR_FEATURE_S + } else if (strcmp(ConfigName, "HDR") == 0) { + configMode = CAMERA_STREAM_CONFIGURATION_MODE_HDR; + } else if (strcmp(ConfigName, "HDR2") == 0) { + configMode = CAMERA_STREAM_CONFIGURATION_MODE_HDR2; + } else if (strcmp(ConfigName, "HLC") == 0) { + configMode = CAMERA_STREAM_CONFIGURATION_MODE_HLC; + // HDR_FEATURE_E } else if (strcmp(ConfigName, "ULL") == 0) { configMode = CAMERA_STREAM_CONFIGURATION_MODE_ULL; } else if (strcmp(ConfigName, "NORMAL") == 0) { @@ -683,6 +697,17 @@ ConfigMode CameraUtils::getConfigModeBySceneMode(camera_scene_mode_t sceneMode) case SCENE_MODE_ULL: configMode = CAMERA_STREAM_CONFIGURATION_MODE_ULL; break; + // HDR_FEATURE_S + case SCENE_MODE_HDR: + configMode = CAMERA_STREAM_CONFIGURATION_MODE_HDR; + break; + case SCENE_MODE_HDR2: + configMode = CAMERA_STREAM_CONFIGURATION_MODE_HDR2; + break; + case SCENE_MODE_HLC: + configMode = CAMERA_STREAM_CONFIGURATION_MODE_HLC; + break; + // HDR_FEATURE_E case SCENE_MODE_CUSTOM_AIC: configMode = CAMERA_STREAM_CONFIGURATION_MODE_CUSTOM_AIC; break; @@ -702,6 +727,14 @@ camera_scene_mode_t CameraUtils::getSceneModeByName(const char* sceneName) { return SCENE_MODE_MAX; else if (strcmp(sceneName, "AUTO") == 0) return SCENE_MODE_AUTO; + // HDR_FEATURE_S + else if (strcmp(sceneName, "HDR") == 0) + return SCENE_MODE_HDR; + else if (strcmp(sceneName, "HDR2") == 0) + return SCENE_MODE_HDR2; + else if (strcmp(sceneName, "HLC") == 0) + return SCENE_MODE_HLC; + // HDR_FEATURE_E else if (strcmp(sceneName, "ULL") == 0) return SCENE_MODE_ULL; else if (strcmp(sceneName, "VIDEO_LL") == 0) @@ -782,10 +815,10 @@ void* CameraUtils::dlopenLibrary(const char* name, int flags) { const char* lError = dlerror(); if (lError) { - if (handle == nullptr) { - LOGW("%s, handle is NULL", __func__); - } LOGW("%s, dlopen Error: %s", __func__, lError); + if (handle) { + dlclose(handle); + } return nullptr; } diff --git a/src/iutils/Utils.h b/src/iutils/Utils.h index 9ba656b4..388d017b 100644 --- a/src/iutils/Utils.h +++ b/src/iutils/Utils.h @@ -127,6 +127,18 @@ typedef ::cros::V4L2Format V4L2Format; } \ } while (0) +/** + * Used to check input parameters, if unsuccessful, returns err_code and prints a log1 message, + * which applies to error checking without substance. + */ +#define CheckAndLog1(condition, err_code, err_msg, args...) \ + do { \ + if (condition) { \ + LOG1(err_msg, ##args); \ + return err_code; \ + } \ + } while (0) + // macro delete array and set it to null #define DELETE_ARRAY_AND_NULLIFY(var) \ do { \ @@ -276,8 +288,6 @@ void getSubDeviceName(const char* entityName, std::string& deviceNodeName); int getInterlaceHeight(int field, int height); -bool isMultiExposureCase(int cameraId, TuningMode tuningMode); - bool isUllPsysPipe(TuningMode tuningMode); ConfigMode getConfigModeByName(const char* ConfigName); diff --git a/src/jpeg/CMakeLists.txt b/src/jpeg/CMakeLists.txt deleted file mode 100644 index 409f472e..00000000 --- a/src/jpeg/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (C) 2019 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -if (SW_JPEG_ENCODE) - set(JPEG_SRCS - ${JPEG_DIR}/sw/SWJpegEncoder.cpp - CACHE INTERNAL "jpeg sources" - ) -else () - set(JPEG_SRCS - ${JPEG_DIR}/chrome/JpegEncoderCore.cpp - CACHE INTERNAL "jpeg sources" - ) -endif() - -set(JPEG_SRCS - ${JPEG_SRCS} - ${JPEG_DIR}/ExifCreater.cpp - ${JPEG_DIR}/EXIFMetaData.cpp - ${JPEG_DIR}/EXIFMaker.cpp - ${JPEG_DIR}/JpegMaker.cpp - CACHE INTERNAL "jpeg sources" - ) diff --git a/src/jpeg/EXIFMaker.cpp b/src/jpeg/EXIFMaker.cpp deleted file mode 100644 index 77e6fb95..00000000 --- a/src/jpeg/EXIFMaker.cpp +++ /dev/null @@ -1,617 +0,0 @@ -/* - * Copyright (C) 2016-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG EXIFMaker - -#include "EXIFMaker.h" - -#include - -#include -#include -#include - -#include "ParameterHelper.h" -#include "iutils/CameraLog.h" -#include "iutils/Utils.h" - -namespace icamera { - -#define DEFAULT_ISO_SPEED 100 - -// The property file directory -static const char* CAMERA_CACHE_DIR = "/var/cache/camera/"; -/* - * Property file defines product name and manufactory info - * Used for EXIF header of JPEG. Format: key=value in each line - */ -static const char* CAMERA_PROPERTY_FILE = "camera.prop"; - -EXIFMaker::EXIFMaker() - : mExifSize(-1), - mInitialized(false), - mProductName(""), - mManufacturerName("") { - LOG1("@%s", __func__); - - CLEAR(mExifAttributes); - mMakernoteSection = new unsigned char[MAKERNOTE_SECTION1_SIZE + MAKERNOTE_SECTION2_SIZE]; - readProperty(); -} - -EXIFMaker::~EXIFMaker() { - LOG1("@%s", __func__); - delete[] mMakernoteSection; -} - -void EXIFMaker::readProperty() { - LOG2("@%s", __func__); - std::string cameraPropertyPath = - std::string(CAMERA_CACHE_DIR) + std::string(CAMERA_PROPERTY_FILE); - std::fstream props(cameraPropertyPath.c_str(), std::ios::in); - - if (!props.is_open()) { - LOG2("There isn't camera property file."); - return; - } - - const std::string kModel = "ro.product.model"; - const std::string kManufacturer = "ro.product.manufacturer"; - const std::string kDelimiter = "="; - std::unordered_map properties; - - while (!props.eof()) { - size_t pos; - std::string line, key, value; - - std::getline(props, line); - pos = line.find(kDelimiter); - if (pos != std::string::npos) { - key = line.substr(0, pos); - value = line.substr(pos + 1); - properties[key] = value; - LOG2("%s, new key,value: %s,%s", __func__, key.c_str(), value.c_str()); - } - } - - if (properties.find(kManufacturer) != properties.end()) { - mManufacturerName = properties[kManufacturer]; - } - if (properties.find(kModel) != properties.end()) { - mProductName = properties[kModel]; - } -} - -/** - * Fills EXIF data after a picture has been taken to - * record the active sensor, 3A and ISP state to EXIF metadata. - * - * This function is intented to set EXIF tags belonging - * to the EXIF "Per Picture Camera Setting" group. - * - * @arg params active Android HAL parameters - */ -void EXIFMaker::pictureTaken(ExifMetaData* exifmetadata) { - LOG2("@%s", __func__); - - mExifAttributes.contrast = 0; - mExifAttributes.saturation = 0; - mExifAttributes.sharpness = 0; - LOG2("EXIF: contrast=%d, saturation=%d, sharpness=%d (0:normal 1:low 2:high)", - mExifAttributes.contrast, mExifAttributes.saturation, mExifAttributes.sharpness); - - // set the exposure program mode - icamera::camera_ae_mode_t aeMode = exifmetadata->aeMode; - switch (aeMode) { - case AE_MODE_MANUAL: - mExifAttributes.exposure_program = EXIF_EXPOSURE_PROGRAM_MANUAL; - mExifAttributes.exposure_mode = EXIF_EXPOSURE_MANUAL; - LOG2("EXIF: Exposure Program = Manual, Exposure Mode = Manual"); - break; - case AE_MODE_AUTO: - default: - mExifAttributes.exposure_program = EXIF_EXPOSURE_PROGRAM_NORMAL; - mExifAttributes.exposure_mode = EXIF_EXPOSURE_AUTO; - LOG2("EXIF: Exposure Program = Normal, Exposure Mode = Auto"); - break; - } - - mExifAttributes.metering_mode = EXIF_METERING_AVERAGE; - - // white balance mode. 0: auto; 1: manual - icamera::camera_awb_mode_t awbMode = exifmetadata->awbMode; - LOG2("EXIF: awbMode = %d", awbMode); - switch (awbMode) { - case AWB_MODE_AUTO: - case AWB_MODE_MAX: - mExifAttributes.white_balance = EXIF_WB_AUTO; - break; - default: - mExifAttributes.white_balance = EXIF_WB_MANUAL; - break; - } - - // light source type. Refer to EXIF V2.2 - // TBD. Now light source is only set to UNKNOWN, when WB is auto mode. - std::unordered_map awbModeLightMap = { - {AWB_MODE_AUTO, EXIF_LIGHT_SOURCE_UNKNOWN}, - {AWB_MODE_SUNSET, EXIF_LIGHT_SOURCE_TUNGSTEN}, - {AWB_MODE_DAYLIGHT, EXIF_LIGHT_SOURCE_FINE_WEATHER}, - {AWB_MODE_PARTLY_OVERCAST, EXIF_LIGHT_SOURCE_CLOUDY_WEATHER}, - {AWB_MODE_FLUORESCENT, EXIF_LIGHT_SOURCE_FLUORESCENT}, - {AWB_MODE_INCANDESCENT, EXIF_LIGHT_SOURCE_TUNGSTEN}, - {AWB_MODE_MAX, EXIF_LIGHT_SOURCE_OTHER_LIGHT_SOURCE}, - }; - if (awbModeLightMap.find(awbMode) != awbModeLightMap.end()) { - mExifAttributes.light_source = awbModeLightMap[awbMode]; - } else { - mExifAttributes.light_source = EXIF_LIGHT_SOURCE_UNKNOWN; - } - - mExifAttributes.scene_capture_type = EXIF_SCENE_STANDARD; - - int rotation = exifmetadata->mJpegSetting.orientation; - mExifAttributes.orientation = EXIF_ORIENTATION_UP; - if (0 == rotation) - mExifAttributes.orientation = EXIF_ORIENTATION_UP; - else if (90 == rotation) - mExifAttributes.orientation = EXIF_ORIENTATION_90; - else if (180 == rotation) - mExifAttributes.orientation = EXIF_ORIENTATION_180; - else if (270 == rotation) - mExifAttributes.orientation = EXIF_ORIENTATION_270; - - // Platform has no HW rotation. No swap here - // if (rotation % 180 == 90) - // swap(mExifAttributes.width, mExifAttributes.height); - - mExifAttributes.zoom_ratio.num = exifmetadata->zoomRatio; - mExifAttributes.zoom_ratio.den = 100; - // the unit of subjectDistance is meter, focus distance from 3A is mm. - mExifAttributes.subject_distance.num = - static_cast(exifmetadata->currentFocusDistance); - mExifAttributes.subject_distance.den = 1000; - mExifAttributes.custom_rendered = - exifmetadata->hdr ? EXIF_CUSTOM_RENDERED_HDR : EXIF_DEF_CUSTOM_RENDERED; - LOG2("subject_distance is %d", mExifAttributes.subject_distance.num); -} - -/** - * Called when the the camera static configuration is known. - * - * @arg width: width of the main JPEG picture. - * @arg height: height of the main JPEG picture. - */ -void EXIFMaker::initialize(int width, int height) { - /* We clear the exif attributes, so we won't be using some old values - * from a previous EXIF generation. - */ - clear(); - - // Initialize the mExifAttributes with specific values - // time information - time_t rawtime; - struct tm* timeinfo; - time(&rawtime); - timeinfo = localtime(&rawtime); - if (timeinfo) { - strftime(reinterpret_cast(mExifAttributes.date_time), - sizeof(mExifAttributes.date_time), "%Y:%m:%d %H:%M:%S", timeinfo); - // fields: tm_sec, tm_min, tm_hour, tm_mday, tm_mon, tm_year, tm_wday, tm_yday, tm_isdst, - // tm_gmtoff, tm_zone - } else { - LOGW("nullptr timeinfo from localtime(), using defaults..."); - struct tm tmpTime = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "UTC"}; - strftime(reinterpret_cast(mExifAttributes.date_time), - sizeof(mExifAttributes.date_time), "%Y:%m:%d %H:%M:%S", &tmpTime); - } - - // set default subsec time to 1000 - const char subsecTime[] = "1000"; - MEMCPY_S(reinterpret_cast(mExifAttributes.subsec_time), - sizeof(mExifAttributes.subsec_time), subsecTime, sizeof(subsecTime)); - - // conponents configuration. - // Default = 4 5 6 0(if RGB uncompressed), 1 2 3 0(other cases) - // 0 = does not exist; 1 = Y; 2 = Cb; 3 = Cr; 4 = R; 5 = G; 6 = B; other = reserved - mExifAttributes.components_configuration[0] = 1; - mExifAttributes.components_configuration[1] = 2; - mExifAttributes.components_configuration[2] = 3; - mExifAttributes.components_configuration[3] = 0; - - // set default values for fnumber and focal length - // (see EXIFMaker::setDriverData() how to override these) - mExifAttributes.fnumber.num = EXIF_DEF_FNUMBER_NUM; - mExifAttributes.fnumber.den = EXIF_DEF_FNUMBER_DEN; - mExifAttributes.focal_length.num = EXIF_DEF_FOCAL_LEN_NUM; - mExifAttributes.focal_length.den = EXIF_DEF_FOCAL_LEN_DEN; - - mExifAttributes.iso_speed_rating = DEFAULT_ISO_SPEED; - - mExifAttributes.aperture.den = EXIF_DEF_APEX_DEN; - mExifAttributes.aperture.num = EXIF_DEF_APEX_NUM; - // max aperture. the smallest F number of the lens. unit is APEX value. - mExifAttributes.max_aperture.num = mExifAttributes.aperture.num; - mExifAttributes.max_aperture.den = mExifAttributes.aperture.den; - - // subject distance, 0 means distance unknown; (~0) means infinity. - mExifAttributes.subject_distance.num = EXIF_DEF_SUBJECT_DISTANCE_UNKNOWN; - mExifAttributes.subject_distance.den = 1; - - // light source, 0 means light source unknown - mExifAttributes.light_source = 0; - - // gain control, 0 = none; - // 1 = low gain up; 2 = high gain up; 3 = low gain down; 4 = high gain down - mExifAttributes.gain_control = 0; - - // contrast, 0 = normal; 1 = soft; 2 = hard; other = reserved - mExifAttributes.contrast = EXIF_CONTRAST_NORMAL; - - // saturation, 0 = normal; 1 = Low saturation; 2 = High saturation; other = reserved - mExifAttributes.saturation = EXIF_SATURATION_NORMAL; - - // sharpness, 0 = normal; 1 = soft; 2 = hard; other = reserved - mExifAttributes.sharpness = EXIF_SHARPNESS_NORMAL; - - // the picture's width and height - mExifAttributes.width = width; - mExifAttributes.height = height; - - mExifAttributes.orientation = 1; - - mExifAttributes.custom_rendered = EXIF_DEF_CUSTOM_RENDERED; - - // metering mode, 0 = normal; 1 = soft; 2 = hard; other = reserved - mExifAttributes.metering_mode = EXIF_METERING_UNKNOWN; - mInitialized = true; -} - -void EXIFMaker::initializeLocation(ExifMetaData* metadata) { - // GIS information - bool gpsEnabled = false; - double latitude = metadata->mGpsSetting.latitude; - double longitude = metadata->mGpsSetting.longitude; - double altitude = metadata->mGpsSetting.altitude; - long timestamp = metadata->mGpsSetting.gpsTimeStamp; - char* pprocmethod = metadata->mGpsSetting.gpsProcessingMethod; - - // check whether the GIS Information is valid - if (!(latitude >= -EPSILON && latitude <= EPSILON) || - !(longitude >= -EPSILON && longitude <= EPSILON) || - !(altitude >= -EPSILON && altitude <= EPSILON) || (timestamp != 0) || - (strlen(pprocmethod) != 0)) - gpsEnabled = true; - - mExifAttributes.enableGps = 0; - LOG1("@%s,EXIF: gpsEnabled: %d", __func__, gpsEnabled); - - // the version is given as 2.2.0.0, it is mandatory when GPSInfo tag is present - if (gpsEnabled) { - const unsigned char gpsversion[4] = {0x02, 0x02, 0x00, 0x00}; - MEMCPY_S(mExifAttributes.gps_version_id, sizeof(mExifAttributes.gps_version_id), gpsversion, - sizeof(gpsversion)); - } else { - return; - } - - // latitude, for example, 39.904214 degrees, N - if (latitude > 0) - MEMCPY_S(mExifAttributes.gps_latitude_ref, sizeof(mExifAttributes.gps_latitude_ref), "N", - sizeof(mExifAttributes.gps_latitude_ref)); - else - MEMCPY_S(mExifAttributes.gps_latitude_ref, sizeof(mExifAttributes.gps_latitude_ref), "S", - sizeof(mExifAttributes.gps_latitude_ref)); - - latitude = fabs(latitude); - mExifAttributes.gps_latitude[0].num = (uint32_t)latitude; - mExifAttributes.gps_latitude[0].den = 1; - mExifAttributes.gps_latitude[1].num = - (uint32_t)((latitude - mExifAttributes.gps_latitude[0].num) * 60); - mExifAttributes.gps_latitude[1].den = 1; - mExifAttributes.gps_latitude[2].num = - (uint32_t)(((latitude - mExifAttributes.gps_latitude[0].num) * 60 - - mExifAttributes.gps_latitude[1].num) * - 60 * 100); - mExifAttributes.gps_latitude[2].den = 100; - mExifAttributes.enableGps |= EXIF_GPS_LATITUDE; - LOG1("EXIF: latitude, ref:%s, dd:%d, mm:%d, ss:%d", mExifAttributes.gps_latitude_ref, - mExifAttributes.gps_latitude[0].num, mExifAttributes.gps_latitude[1].num, - mExifAttributes.gps_latitude[2].num); - - // longitude, for example, 116.407413 degrees, E - if (longitude > 0) - MEMCPY_S(mExifAttributes.gps_longitude_ref, sizeof(mExifAttributes.gps_longitude_ref), "E", - sizeof(mExifAttributes.gps_longitude_ref)); - else - MEMCPY_S(mExifAttributes.gps_longitude_ref, sizeof(mExifAttributes.gps_longitude_ref), "W", - sizeof(mExifAttributes.gps_longitude_ref)); - longitude = fabs(longitude); - mExifAttributes.gps_longitude[0].num = (uint32_t)longitude; - mExifAttributes.gps_longitude[0].den = 1; - mExifAttributes.gps_longitude[1].num = - (uint32_t)((longitude - mExifAttributes.gps_longitude[0].num) * 60); - mExifAttributes.gps_longitude[1].den = 1; - mExifAttributes.gps_longitude[2].num = - (uint32_t)(((longitude - mExifAttributes.gps_longitude[0].num) * 60 - - mExifAttributes.gps_longitude[1].num) * - 60 * 100); - mExifAttributes.gps_longitude[2].den = 100; - mExifAttributes.enableGps |= EXIF_GPS_LONGITUDE; - LOG1("EXIF: longitude, ref:%s, dd:%d, mm:%d, ss:%d", mExifAttributes.gps_longitude_ref, - mExifAttributes.gps_longitude[0].num, mExifAttributes.gps_longitude[1].num, - mExifAttributes.gps_longitude[2].num); - - // altitude - // altitude, sea level or above sea level, set it to 0; below sea level, set it to 1 - mExifAttributes.gps_altitude_ref = ((altitude > 0) ? 0 : 1); - altitude = fabs(altitude); - mExifAttributes.gps_altitude.num = (uint32_t)altitude; - mExifAttributes.gps_altitude.den = 1; - mExifAttributes.enableGps |= EXIF_GPS_ALTITUDE; - LOG1("EXIF: altitude, ref:%d, height:%d", mExifAttributes.gps_altitude_ref, - mExifAttributes.gps_altitude.num); - - // timestamp - if (timestamp >= LONG_MAX || timestamp <= LONG_MIN) { - timestamp = 0; - LOGW("invalid timestamp was provided, defaulting to 0 (i.e. 1970)"); - } - struct tm time; - gmtime_r(×tamp, &time); - time.tm_year += 1900; - time.tm_mon += 1; - mExifAttributes.gps_timestamp[0].num = time.tm_hour; - mExifAttributes.gps_timestamp[0].den = 1; - mExifAttributes.gps_timestamp[1].num = time.tm_min; - mExifAttributes.gps_timestamp[1].den = 1; - mExifAttributes.gps_timestamp[2].num = time.tm_sec; - mExifAttributes.gps_timestamp[2].den = 1; - mExifAttributes.enableGps |= EXIF_GPS_TIMESTAMP; - - snprintf(reinterpret_cast(mExifAttributes.gps_datestamp), - sizeof(mExifAttributes.gps_datestamp), "%04d:%02d:%02d", time.tm_year, time.tm_mon, - time.tm_mday); - - LOG1("EXIF: timestamp, year:%d,mon:%d,day:%d,hour:%d,min:%d,sec:%d", time.tm_year, time.tm_mon, - time.tm_mday, time.tm_hour, time.tm_min, time.tm_sec); - - // processing method - MEMCPY_S(mExifAttributes.gps_processing_method, sizeof(mExifAttributes.gps_processing_method), - metadata->mGpsSetting.gpsProcessingMethod, - sizeof(metadata->mGpsSetting.gpsProcessingMethod)); - mExifAttributes.gps_processing_method[sizeof(mExifAttributes.gps_processing_method) - 1] = 0; - - mExifAttributes.enableGps |= EXIF_GPS_PROCMETHOD; - LOG1("EXIF: GPS processing method:%s", mExifAttributes.gps_processing_method); -} - -void EXIFMaker::setSensorAeConfig(const Parameters& params) { - LOG1("@%s", __func__); - - int64_t expTime = 0; - params.getExposureTime(expTime); - - if (expTime > 0) { - // EXIF exposure rational value is in seconds and the unit of exposure time in 3A is usecs - mExifAttributes.exposure_time.num = expTime; - mExifAttributes.exposure_time.den = 1000000; - uint32_t tv = APEX_EXPOSURE_TO_SHUTTER(static_cast(expTime) / - mExifAttributes.exposure_time.den); - mExifAttributes.shutter_speed.num = tv * 65536; - mExifAttributes.shutter_speed.den = 65536; - } else { - mExifAttributes.exposure_time.num = 0; - mExifAttributes.exposure_time.den = 1; - mExifAttributes.shutter_speed.num = 0; - mExifAttributes.shutter_speed.den = 1; - } - - float stepEv = 1 / 3.0f; - icamera::camera_rational_t aeCompensationStep; - if (params.getAeCompensationStep(aeCompensationStep) == 0) { - stepEv = static_cast(aeCompensationStep.numerator) / aeCompensationStep.denominator; - } - - int32_t ev = 0; - float evBias = 0; - if (params.getAeCompensation(ev) == 0) { - evBias = static_cast(ev) * stepEv; - } - - // exposure bias. unit is APEX value. -99.99 to 99.99 - const int evLowerBound = -100, evUpperBound = 100; - if (evBias > evLowerBound && evBias < evUpperBound) { - mExifAttributes.exposure_bias.num = static_cast(evBias) * 100; - mExifAttributes.exposure_bias.den = 100; - LOG2("EXIF: Ev = %.2f", evBias); - } else { - mExifAttributes.exposure_bias.num = 0; - mExifAttributes.exposure_bias.den = 100; - LOG2("EXIF: Invalid Ev!"); - } - - int32_t iso; - mExifAttributes.iso_speed_rating = DEFAULT_ISO_SPEED; - if (params.getSensitivityIso(iso) == 0) { - mExifAttributes.iso_speed_rating = iso; - } - - LOG2("EXIF: ISO=%d", mExifAttributes.iso_speed_rating); - LOG2("EXIF: shutter speed=%u/%u", mExifAttributes.shutter_speed.num, - mExifAttributes.shutter_speed.den); - LOG2("EXIF: exposure time=%u/%u", mExifAttributes.exposure_time.num, - mExifAttributes.exposure_time.den); - - if (mExifAttributes.fnumber.den > 0 && expTime > 0 && mExifAttributes.iso_speed_rating > 0) { - // 'dAv + dTv = dSv + dBv' based on the equation of APEX system - double dAv = APEX_FNUM_TO_APERTURE(static_cast(mExifAttributes.fnumber.num) / - mExifAttributes.fnumber.den); - double dTv = APEX_EXPOSURE_TO_SHUTTER(static_cast(expTime) / 1000000); - double dSv = APEX_ISO_TO_FILMSENSITIVITY(mExifAttributes.iso_speed_rating); - mExifAttributes.brightness.num = (dAv + dTv - dSv) * EXIF_DEF_BRIGHTNESSVALUE_DEN; - mExifAttributes.brightness.den = EXIF_DEF_BRIGHTNESSVALUE_DEN; - LOG2("EXIF: brightness = %d / %d", mExifAttributes.brightness.num, - mExifAttributes.brightness.den); - } -} - -/* - * more secure attribute copy routine. - * \param dst pointer to dst buffer - * \param dstSize dst buffer size - * \param src pointer to src character buffer - * \param srcLength src buffer length in characters, not including null byte - */ -void EXIFMaker::copyAttribute(uint8_t* dst, size_t dstSize, const char* src, size_t srcLength) { - size_t dstMaxLength = dstSize - 1; // leave space for null - MEMCPY_S(dst, dstMaxLength, src, srcLength); // copy chars (not null) - // add null termination - size_t len = std::min(dstMaxLength, srcLength); - dst[len] = '\0'; -} - -void EXIFMaker::clear() { - LOG1("@%s", __func__); - // Reset all the attributes - CLEAR(mExifAttributes); - // Initialize the common values - mExifAttributes.enableThumb = false; - copyAttribute(mExifAttributes.image_description, sizeof(mExifAttributes.image_description), - EXIF_DEF_IMAGE_DESCRIPTION, strlen(EXIF_DEF_IMAGE_DESCRIPTION)); - - copyAttribute(mExifAttributes.maker, sizeof(mExifAttributes.maker), mManufacturerName.c_str(), - strlen(mManufacturerName.c_str())); - - copyAttribute(mExifAttributes.model, sizeof(mExifAttributes.model), mProductName.c_str(), - strlen(mProductName.c_str())); - - copyAttribute(mExifAttributes.software, sizeof(mExifAttributes.software), EXIF_DEF_SOFTWARE, - strlen(EXIF_DEF_SOFTWARE)); - - copyAttribute(mExifAttributes.exif_version, sizeof(mExifAttributes.exif_version), - EXIF_DEF_EXIF_VERSION, strlen(EXIF_DEF_EXIF_VERSION)); - - copyAttribute(mExifAttributes.flashpix_version, sizeof(mExifAttributes.flashpix_version), - EXIF_DEF_FLASHPIXVERSION, strlen(EXIF_DEF_FLASHPIXVERSION)); - - // initially, set default flash - mExifAttributes.flash = EXIF_DEF_FLASH; - - // normally it is sRGB, 1 means sRGB. FFFF.H means uncalibrated - mExifAttributes.color_space = EXIF_DEF_COLOR_SPACE; - - // the number of pixels per ResolutionUnit in the w or h direction - // 72 means the image resolution is unknown - mExifAttributes.x_resolution.num = EXIF_DEF_RESOLUTION_NUM; - mExifAttributes.x_resolution.den = EXIF_DEF_RESOLUTION_DEN; - mExifAttributes.y_resolution.num = mExifAttributes.x_resolution.num; - mExifAttributes.y_resolution.den = mExifAttributes.x_resolution.den; - // resolution unit, 2 means inch - mExifAttributes.resolution_unit = EXIF_DEF_RESOLUTION_UNIT; - // when thumbnail uses JPEG compression, this tag 103H's value is set to 6 - mExifAttributes.compression_scheme = EXIF_DEF_COMPRESSION; - - // the TIFF default is 1 (centered) - mExifAttributes.ycbcr_positioning = EXIF_DEF_YCBCR_POSITIONING; - - // Clear the Intel 3A Makernote information - mExifAttributes.makerNoteData = mMakernoteSection; - mExifAttributes.makerNoteDataSize = 0; - mExifAttributes.makernoteToApp2 = ENABLE_APP2_MARKER; - - mInitialized = false; -} - -void EXIFMaker::enableFlash(bool enable, int8_t aeMode, int8_t flashMode) { - mExifAttributes.flash = EXIF_DEF_FLASH; -} - -void EXIFMaker::setThumbnail(unsigned char* data, size_t size, int width, int height) { - LOG1("@%s: data = %p, size = %zu", __func__, data, size); - mExifAttributes.enableThumb = true; - mExifAttributes.widthThumb = width; - mExifAttributes.heightThumb = height; - if (mEncoder.setThumbData(data, size) != EXIF_SUCCESS) { - LOGE("Error in setting EXIF thumbnail"); - } -} - -bool EXIFMaker::isThumbnailSet() const { - return mEncoder.isThumbDataSet(); -} - -size_t EXIFMaker::makeExif(unsigned char* data) { - LOG2("@%s", __func__); - CheckAndLogError(!data, 0, "nullptr passed for EXIF. Cannot generate EXIF!"); - - if (mEncoder.makeExif(data, &mExifAttributes, &mExifSize) == EXIF_SUCCESS) { - LOG1("Generated EXIF (@%p) of size: %zu", data, mExifSize); - return mExifSize; - } - return 0; -} - -void EXIFMaker::setMaker(const char* data) { - LOG2("@%s: data = %s", __func__, data); - - snprintf((char*)mExifAttributes.maker, sizeof(mExifAttributes.maker), "%s", data); -} - -void EXIFMaker::setModel(const char* data) { - LOG2("@%s: data = %s", __func__, data); - - snprintf((char*)mExifAttributes.model, sizeof(mExifAttributes.model), "%s", data); -} - -void EXIFMaker::setSoftware(const char* data) { - LOG2("@%s: data = %s", __func__, data); - - snprintf((char*)mExifAttributes.software, sizeof(mExifAttributes.software), "%s", data); -} - -void EXIFMaker::saveMakernote(const Parameters& params) { - unsigned int size = sizeof(unsigned char) * (MAKERNOTE_SECTION1_SIZE + MAKERNOTE_SECTION2_SIZE); - if (params.getMakernoteData(mMakernoteSection, &size) == OK) { - mExifAttributes.makerNoteDataSize = size; - } -} - -void EXIFMaker::updateSensorInfo(const Parameters& params) { - float focal = 0.0; - params.getFocalLength(focal); - - if (focal < EPSILON) { - // Focal length is not supported, set to default value - const icamera::CameraMetadata& meta = icamera::ParameterHelper::getMetadata(params); - - icamera_metadata_ro_entry entry = meta.find(CAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS); - if (entry.count >= 1) { - focal = entry.data.f[0]; - } - } - - LOG2("focal length is %f", focal); - mExifAttributes.focal_length.num = focal * mExifAttributes.focal_length.den; - float aperture = 0.0; - params.getAperture(aperture); - mExifAttributes.aperture.num = aperture * mExifAttributes.aperture.den; - - mExifAttributes.fnumber.num = aperture * mExifAttributes.aperture.den; - mExifAttributes.fnumber.den = mExifAttributes.aperture.den; -} - -} // namespace icamera diff --git a/src/jpeg/EXIFMaker.h b/src/jpeg/EXIFMaker.h deleted file mode 100644 index adad8d07..00000000 --- a/src/jpeg/EXIFMaker.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2016-2020 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#include "EXIFMetaData.h" -#include "ExifCreater.h" -#include "iutils/Utils.h" - -namespace icamera { - -/** - * \class EXIFMaker - * - */ -class EXIFMaker { - public: - EXIFMaker(); - ~EXIFMaker(); - - void readProperty(); - void initialize(int width, int height); - bool isInitialized() { return mInitialized; } - void initializeLocation(ExifMetaData* metadata); - uint32_t getMakerNoteDataSize() const; - void pictureTaken(ExifMetaData* exifmetadata); - void enableFlash(bool enable, int8_t aeMode, int8_t flashMode); - void setThumbnail(unsigned char* data, size_t size, int width, int height); - bool isThumbnailSet() const; - size_t makeExif(unsigned char* data); - void setMaker(const char* data); - void setModel(const char* data); - void setSoftware(const char* data); - void updateSensorInfo(const Parameters& params); - void saveMakernote(const Parameters& params); - void setSensorAeConfig(const Parameters& params); - - private: // member variables - ExifCreater mEncoder; - exif_attribute_t mExifAttributes; - size_t mExifSize; - bool mInitialized; - unsigned char* mMakernoteSection; - std::string mProductName; - std::string mManufacturerName; - - private: - // prevent copy constructor and assignment operator - DISALLOW_COPY_AND_ASSIGN(EXIFMaker); - - private: // Methods - void copyAttribute(uint8_t* dst, size_t dstSize, const char* src, size_t srcLength); - - void clear(); -}; - -} // namespace icamera diff --git a/src/jpeg/EXIFMetaData.cpp b/src/jpeg/EXIFMetaData.cpp deleted file mode 100644 index dc2fbd8e..00000000 --- a/src/jpeg/EXIFMetaData.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2016-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG EXIFMetaData - -#include "EXIFMetaData.h" - -#include "iutils/CameraLog.h" -#include "iutils/Utils.h" - -namespace icamera { - -#define DEFAULT_ISO_SPEED 100 - -ExifMetaData::ExifMetaData() - : effectMode(CAM_EFFECT_NONE), - software(nullptr), - hdr(false), - flashFired(false), - v3AeMode(BAD_VALUE), - flashMode(BAD_VALUE), - saveMirrored(false), - cameraOrientation(0), - currentOrientation(0), - zoomRatio(1), - aeMode(AE_MODE_AUTO), - awbMode(AWB_MODE_AUTO), - currentFocusDistance(0.0) { - LOG1("@%s", __func__); - mJpegSetting.jpegQuality = 90; - mJpegSetting.jpegThumbnailQuality = 90; - mJpegSetting.orientation = 0; - mJpegSetting.thumbWidth = 320; - mJpegSetting.thumbHeight = 240; - mGpsSetting.latitude = 0.0; - mGpsSetting.longitude = 0.0; - mGpsSetting.altitude = 0.0; - CLEAR(mGpsSetting.gpsProcessingMethod); - mGpsSetting.gpsTimeStamp = 0; -} - -ExifMetaData::~ExifMetaData() {} - -} // namespace icamera diff --git a/src/jpeg/EXIFMetaData.h b/src/jpeg/EXIFMetaData.h deleted file mode 100644 index 7cd37f31..00000000 --- a/src/jpeg/EXIFMetaData.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2016-2020 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "Parameters.h" -#include "iutils/Errors.h" -namespace icamera { - -#define MAX_NUM_GPS_PROCESSING_METHOD 64 - -/** - * \class ExifMetaData - * - */ -class ExifMetaData { - public: - ExifMetaData(); - virtual ~ExifMetaData(); - - // jpeg info - struct JpegSetting { - uint8_t jpegQuality; - uint8_t jpegThumbnailQuality; - int thumbWidth; - int thumbHeight; - int orientation; - }; - // GPS info - struct GpsSetting { - double latitude; - double longitude; - double altitude; - char gpsProcessingMethod[MAX_NUM_GPS_PROCESSING_METHOD]; - long gpsTimeStamp; - }; - // exif info - JpegSetting mJpegSetting; - GpsSetting mGpsSetting; - camera_effect_mode_t effectMode; - char* software; /*!< software string from HAL */ - bool hdr; /*!< whether hdr was used */ - bool flashFired; /*!< whether flash was fired */ - int8_t v3AeMode; /*!< v3 ae mode (e.g. for flash) */ - int8_t flashMode; /*!< flash mode (e.g. TORCH,SINGLE,OFF) */ - bool saveMirrored; /*!< whether to do mirroring */ - int cameraOrientation; /*!< camera sensor orientation */ - int currentOrientation; /*!< Current orientation of the device */ - int zoomRatio; - icamera::camera_ae_mode_t aeMode; - icamera::camera_awb_mode_t awbMode; - float currentFocusDistance; -}; - -} // namespace icamera diff --git a/src/jpeg/Exif.h b/src/jpeg/Exif.h deleted file mode 100644 index bce7b71e..00000000 --- a/src/jpeg/Exif.h +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright Samsung Electronics Co.,LTD. - * Copyright (C) 2010 The Android Open Source Project - * Copyright (C) 2016-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#define EXIF_LOG2(x) (log((double)(x)) / log(2.0)) -#define APEX_FNUM_TO_APERTURE(x) (2.0 * (EXIF_LOG2((double)(x)))) -#define APEX_EXPOSURE_TO_SHUTTER(x) (-1.0 * (EXIF_LOG2((double)(x)))) -#define APEX_ISO_TO_FILMSENSITIVITY(x) (EXIF_LOG2((x) / 3.125)) - -#define NUM_SIZE 2 -#define IFD_SIZE 12 -#define OFFSET_SIZE 4 - -#define NUM_0TH_IFD_TIFF 14 -#define NUM_0TH_IFD_EXIF 36 -#define NUM_0TH_IFD_GPS 12 -#define NUM_1TH_IFD_TIFF 9 -// For QVGA: 320 * 240 * 1.5 -#define EXIF_SIZE_LIMITATION 0x10000 -// Limite the thumbnail size to 32k, to make sure the whole exif size does -// not exceed the exif size limitation. We guess the total size of all the -// other fields is smaller than 32k. (Currently the size is about 26k.) -#define THUMBNAIL_SIZE_LIMITATION 0x8000 - -/* Type */ -#define EXIF_TYPE_BYTE 1 -#define EXIF_TYPE_ASCII 2 -#define EXIF_TYPE_SHORT 3 -#define EXIF_TYPE_LONG 4 -#define EXIF_TYPE_RATIONAL 5 -#define EXIF_TYPE_UNDEFINED 7 -#define EXIF_TYPE_SLONG 9 -#define EXIF_TYPE_SRATIONAL 10 - -#define EXIF_FILE_SIZE 28800 - -/* 0th IFD TIFF Tags */ -#define EXIF_TAG_IMAGE_WIDTH 0x0100 -#define EXIF_TAG_IMAGE_HEIGHT 0x0101 -#define EXIF_TAG_IMAGE_DESCRIPTION 0x010e -#define EXIF_TAG_MAKE 0x010f -#define EXIF_TAG_MODEL 0x0110 -#define EXIF_TAG_ORIENTATION 0x0112 -#define EXIF_TAG_X_RESOLUTION 0x011A -#define EXIF_TAG_Y_RESOLUTION 0x011B -#define EXIF_TAG_RESOLUTION_UNIT 0x0128 -#define EXIF_TAG_SOFTWARE 0x0131 -#define EXIF_TAG_DATE_TIME 0x0132 -#define EXIF_TAG_YCBCR_POSITIONING 0x0213 -#define EXIF_TAG_EXIF_IFD_POINTER 0x8769 -#define EXIF_TAG_GPS_IFD_POINTER 0x8825 - -/* 0th IFD Exif Private Tags */ -#define EXIF_TAG_EXPOSURE_TIME 0x829A -#define EXIF_TAG_FNUMBER 0x829D -#define EXIF_TAG_EXPOSURE_PROGRAM 0x8822 -#define EXIF_TAG_ISO_SPEED_RATING 0x8827 -#define EXIF_TAG_EXIF_VERSION 0x9000 -#define EXIF_TAG_DATE_TIME_ORG 0x9003 -#define EXIF_TAG_DATE_TIME_DIGITIZE 0x9004 -#define EXIF_TAG_COMPONENTS_CONFIGURATION 0x9101 -#define EXIF_TAG_SHUTTER_SPEED 0x9201 -#define EXIF_TAG_APERTURE 0x9202 -#define EXIF_TAG_BRIGHTNESS 0x9203 -#define EXIF_TAG_EXPOSURE_BIAS 0x9204 -#define EXIF_TAG_MAX_APERTURE 0x9205 -#define EXIF_TAG_SUBJECT_DISTANCE 0x9206 -#define EXIF_TAG_METERING_MODE 0x9207 -#define EXIF_TAG_LIGHT_SOURCE 0x9208 -#define EXIF_TAG_FLASH 0x9209 -#define EXIF_TAG_FOCAL_LENGTH 0x920A -#define EXIF_TAG_MAKER_NOTE 0x927C -#define EXIF_TAG_USER_COMMENT 0x9286 -#define EXIF_TAG_SUBSEC_TIME 0x9290 -#define EXIF_TAG_SUBSEC_TIME_ORIG 0x9291 -#define EXIF_TAG_SUBSEC_TIME_DIG 0x9292 -#define EXIF_TAG_FLASH_PIX_VERSION 0xA000 -#define EXIF_TAG_COLOR_SPACE 0xA001 -#define EXIF_TAG_PIXEL_X_DIMENSION 0xA002 -#define EXIF_TAG_PIXEL_Y_DIMENSION 0xA003 -#define EXIF_TAG_CUSTOM_RENDERED 0xA401 -#define EXIF_TAG_EXPOSURE_MODE 0xA402 -#define EXIF_TAG_WHITE_BALANCE 0xA403 -#define EXIF_TAG_JPEG_ZOOM_RATIO 0XA404 -#define EXIF_TAG_SCENCE_CAPTURE_TYPE 0xA406 -#define EXIF_TAG_GAIN_CONTROL 0xA407 -#define EXIF_TAG_CONTRAST 0xA408 -#define EXIF_TAG_SATURATION 0xA409 -#define EXIF_TAG_SHARPNESS 0xA40A - -/* 0th IFD GPS Info Tags */ -#define EXIF_TAG_GPS_VERSION_ID 0x0000 -#define EXIF_TAG_GPS_LATITUDE_REF 0x0001 -#define EXIF_TAG_GPS_LATITUDE 0x0002 -#define EXIF_TAG_GPS_LONGITUDE_REF 0x0003 -#define EXIF_TAG_GPS_LONGITUDE 0x0004 -#define EXIF_TAG_GPS_ALTITUDE_REF 0x0005 -#define EXIF_TAG_GPS_ALTITUDE 0x0006 -#define EXIF_TAG_GPS_TIMESTAMP 0x0007 -#define EXIF_TAG_GPS_IMG_DIRECTION_REF 0x0010 -#define EXIF_TAG_GPS_IMG_DIRECTION 0x0011 -#define EXIF_TAG_GPS_PROCESSING_METHOD 0x001B -#define EXIF_TAG_GPS_DATESTAMP 0x001D - -/* 1th IFD TIFF Tags */ -#define EXIF_TAG_COMPRESSION_SCHEME 0x0103 -/* -#define EXIF_TAG_X_RESOLUTION 0x011A -#define EXIF_TAG_Y_RESOLUTION 0x011B -#define EXIF_TAG_RESOLUTION_UNIT 0x0128 -*/ -#define EXIF_TAG_JPEG_INTERCHANGE_FORMAT 0x0201 -#define EXIF_TAG_JPEG_INTERCHANGE_FORMAT_LEN 0x0202 - -typedef enum { - EXIF_ORIENTATION_UP = 1, - EXIF_ORIENTATION_90 = 6, - EXIF_ORIENTATION_180 = 3, - EXIF_ORIENTATION_270 = 8, -} ExifOrientationType; - -typedef enum { - EXIF_SCENE_STANDARD, - EXIF_SCENE_LANDSCAPE, - EXIF_SCENE_PORTRAIT, - EXIF_SCENE_NIGHT, -} CamExifSceneCaptureType; - -typedef enum { - EXIF_METERING_UNKNOWN, - EXIF_METERING_AVERAGE, - EXIF_METERING_CENTER, - EXIF_METERING_SPOT, - EXIF_METERING_MULTISPOT, - EXIF_METERING_PATTERN, - EXIF_METERING_PARTIAL, - EXIF_METERING_OTHER = 255, -} CamExifMeteringModeType; - -typedef enum { - EXIF_EXPOSURE_AUTO, - EXIF_EXPOSURE_MANUAL, - EXIF_EXPOSURE_AUTO_BRACKET, -} CamExifExposureModeType; - -typedef enum { - EXIF_WB_AUTO, - EXIF_WB_MANUAL, -} CamExifWhiteBalanceType; - -typedef enum { - EXIF_LIGHT_SOURCE_UNKNOWN, - EXIF_LIGHT_SOURCE_DAYLIGHT, - EXIF_LIGHT_SOURCE_FLUORESCENT, - EXIF_LIGHT_SOURCE_TUNGSTEN, - EXIF_LIGHT_SOURCE_FLASH, - EXIF_LIGHT_SOURCE_FINE_WEATHER = 9, - EXIF_LIGHT_SOURCE_CLOUDY_WEATHER, - EXIF_LIGHT_SOURCE_SHADE, - EXIF_LIGHT_SOURCE_DAYLIGHT_FLUORESCENT, - EXIF_LIGHT_SOURCE_DAY_WHITE_FLUORESCENT, - EXIF_LIGHT_SOURCE_COOL_WHITE_FLUORESCENT, - EXIF_LIGHT_SOURCE_WHITE_FLUORESCENT, - EXIF_LIGHT_SOURCE_WARM_WHITE_FLUORESCENT, // value 16 is used in EXIF V2.3, not for EXIF V2.2 - EXIF_LIGHT_SOURCE_STANDARD_LIGHT_A, - EXIF_LIGHT_SOURCE_STANDARD_LIGHT_B, - EXIF_LIGHT_SOURCE_STANDARD_LIGHT_C, - EXIF_LIGHT_SOURCE_D55, - EXIF_LIGHT_SOURCE_D65, - EXIF_LIGHT_SOURCE_D75, - EXIF_LIGHT_SOURCE_D50, - EXIF_LIGHT_SOURCE_ISO_STUDIO_TUNGSTEN, - EXIF_LIGHT_SOURCE_OTHER_LIGHT_SOURCE = 255, -} CamExifLightSourceType; - -typedef enum { - EXIF_EXPOSURE_PROGRAM_MANUAL = 1, - EXIF_EXPOSURE_PROGRAM_NORMAL = 2, - EXIF_EXPOSURE_PROGRAM_APERTURE_PRIORITY = 3, - EXIF_EXPOSURE_PROGRAM_SHUTTER_PRIORITY = 4 -} CamExifExposureProgramType; - -typedef enum { - EXIF_CONTRAST_NORMAL = 0, - EXIF_CONTRAST_SOFT = 1, - EXIF_CONTRAST_HARD = 2, -} CamExifContrastType; - -typedef enum { - EXIF_SATURATION_NORMAL = 0, - EXIF_SATURATION_LOW = 1, - EXIF_SATURATION_HIGH = 2, -} CamExifSaturationType; - -typedef enum { - EXIF_SHARPNESS_NORMAL = 0, - EXIF_SHARPNESS_SOFT = 1, - EXIF_SHARPNESS_HARD = 2, -} CamExifSharpnessType; - -/* define the flag of enable gps info */ -const uint8_t EXIF_GPS_LATITUDE = 0x01; -const uint8_t EXIF_GPS_LONGITUDE = 0x02; -const uint8_t EXIF_GPS_ALTITUDE = 0x04; -const uint8_t EXIF_GPS_TIMESTAMP = 0x08; -const uint8_t EXIF_GPS_PROCMETHOD = 0x10; -const uint8_t EXIF_GPS_IMG_DIRECTION = 0x20; - -/* Values */ -#define EXIF_DEF_IMAGE_DESCRIPTION "Jpeg" -#define EXIF_DEF_SOFTWARE "Android" -#define EXIF_DEF_EXIF_VERSION "0220" -#define EXIF_DEF_USERCOMMENTS " " -#define EXIF_DEF_FLASHPIXVERSION "0100" /* Flashpix Format Version 1.0 */ - -#define EXIF_DEF_YCBCR_POSITIONING 1 /* centered */ -#define EXIF_DEF_FNUMBER_NUM 26 /* 2.6 */ -#define EXIF_DEF_FNUMBER_DEN 10 -#define EXIF_DEF_EXPOSURE_PROGRAM 3 /* aperture priority */ -#define EXIF_DEF_FOCAL_LEN_NUM 2780 /* 2.78mm */ -#define EXIF_DEF_FOCAL_LEN_DEN 1000 -#define EXIF_DEF_FLASH 0 /* O: off, 1: on*/ -#define EXIF_FLASH_FORCED_ON 1 << 3; /* mode description */ -#define EXIF_FLASH_FORCED_OFF 1 << 4; /* mode description */ -#define EXIF_FLASH_AUTO 1 << 3 | 1 << 4; /* mode description */ -#define EXIF_FLASH_ON 1 /* O: off, 1: on - fired or not*/ -#define EXIF_DEF_COLOR_SPACE 1 -#define EXIF_DEF_CUSTOM_RENDERED 0 -#define EXIF_CUSTOM_RENDERED_HDR 1 -#define EXIF_DEF_EXPOSURE_MODE EXIF_EXPOSURE_AUTO -#define EXIF_DEF_APEX_DEN 10 -#define EXIF_DEF_APEX_NUM 25 -#define EXIF_DEF_SUBJECT_DISTANCE_UNKNOWN 0 - -#define EXIF_DEF_COMPRESSION 6 -#define EXIF_DEF_RESOLUTION_NUM 72 -#define EXIF_DEF_RESOLUTION_DEN 1 -#define EXIF_DEF_RESOLUTION_UNIT 2 /* inches */ - -#define EXIF_DEF_BRIGHTNESSVALUE_DEN 100 - -typedef struct { - uint32_t num; - uint32_t den; -} rational_t; - -typedef struct { - int32_t num; - int32_t den; -} srational_t; - -typedef struct { - bool enableThumb; - - uint8_t image_description[32]; - uint8_t flashpix_version[4]; - uint8_t components_configuration[4]; - uint8_t maker[32]; - uint8_t model[32]; - uint8_t software[32]; - uint8_t exif_version[4]; - uint8_t date_time[20]; - uint8_t subsec_time[8]; - uint8_t user_comment[150]; - - uint32_t width; - uint32_t height; - uint32_t widthThumb; - uint32_t heightThumb; - - uint16_t orientation; - uint16_t ycbcr_positioning; - uint16_t exposure_program; - uint16_t iso_speed_rating; - uint16_t metering_mode; - uint16_t flash; - uint16_t color_space; - uint16_t custom_rendered; - uint16_t exposure_mode; - uint16_t white_balance; - rational_t zoom_ratio; - uint16_t scene_capture_type; - uint16_t light_source; - uint16_t gain_control; - uint16_t contrast; - uint16_t saturation; - uint16_t sharpness; - - rational_t exposure_time; - rational_t fnumber; - rational_t aperture; - rational_t max_aperture; - rational_t focal_length; - rational_t subject_distance; - - srational_t shutter_speed; - srational_t brightness; - srational_t exposure_bias; - - // bit 0~4 indicate whether Gps items latitude, longitude, altitude, timestamp, - // datastamp exist or not. - uint8_t enableGps; - uint8_t gps_latitude_ref[2]; - uint8_t gps_longitude_ref[2]; - - uint8_t gps_version_id[4]; - uint8_t gps_altitude_ref; - - rational_t gps_latitude[3]; - rational_t gps_longitude[3]; - rational_t gps_altitude; - rational_t gps_timestamp[3]; - uint8_t gps_datestamp[11]; - uint8_t gps_processing_method[100]; - - uint8_t gps_img_direction_ref[2]; - rational_t gps_img_direction; - - rational_t x_resolution; - rational_t y_resolution; - uint16_t resolution_unit; - uint16_t compression_scheme; - - uint16_t makerNoteDataSize; - unsigned char* makerNoteData; - bool makernoteToApp2; -} exif_attribute_t; diff --git a/src/jpeg/ExifCreater.cpp b/src/jpeg/ExifCreater.cpp deleted file mode 100644 index 70c01917..00000000 --- a/src/jpeg/ExifCreater.cpp +++ /dev/null @@ -1,538 +0,0 @@ -/* - * Copyright Samsung Electronics Co.,LTD. - * Copyright (C) 2010 The Android Open Source Project - * Copyright (C) 2016-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * JPEG DRIVER MODULE (ExifCreater.cpp) - * Author : ge.lee -- initial version - * Date : 03 June 2010 - * Purpose : This file implements the JPEG encoder APIs as needed by Camera HAL - */ - -#define LOG_TAG ExifCreater - -#include "ExifCreater.h" - -#include -#include - -#include "iutils/CameraLog.h" - -static const char ExifAsciiPrefix[] = {0x41, 0x53, 0x43, 0x49, 0x49, 0x0, 0x0, 0x0}; - -// the exif size without thumbnail is less than 2k -#define EXIF_SIZE_WITHOUT_THUMBNAIL 0x800 - -namespace icamera { - -ExifCreater::ExifCreater() { - m_thumbBuf = nullptr; - m_thumbSize = 0; -} - -ExifCreater::~ExifCreater() {} - -exif_status ExifCreater::setThumbData(const void* thumbBuf, unsigned int thumbSize) { - if ((thumbSize + EXIF_SIZE_WITHOUT_THUMBNAIL) >= EXIF_SIZE_LIMITATION) { - LOGE("ERROR: Too big thumb size %d (limit: %d)", thumbSize, EXIF_SIZE_LIMITATION); - m_thumbBuf = nullptr; - m_thumbSize = 0; - return EXIF_FAIL; - } - - m_thumbBuf = static_cast(const_cast(thumbBuf)); - m_thumbSize = thumbSize; - return EXIF_SUCCESS; -} - -bool ExifCreater::isThumbDataSet() const { - return m_thumbBuf != nullptr; -} - -// if exif tags size + thumbnail size is > 64K, it will disable thumbnail -exif_status ExifCreater::makeExif(void* exifOut, exif_attribute_t* exifInfo, size_t* size) { - LOG1("makeExif start"); - - unsigned char *pCur, *pApp1Start, *pIfdStart, *pGpsIfdPtr, *pNextIfdOffset; - unsigned int tmp, LongerTagOffset = 0; - pApp1Start = pCur = static_cast(exifOut); - - // 2 Exif Identifier Code & TIFF Header - pCur += 4; // Skip 4 Byte for APP1 marker and length - - unsigned char ExifIdentifierCode[6] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00}; - MEMCPY_S(pCur, sizeof(ExifIdentifierCode), ExifIdentifierCode, sizeof(ExifIdentifierCode)); - pCur += 6; - - /* Byte Order - little endian, Offset of IFD - 0x00000008.H */ - unsigned char TiffHeader[8] = {0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00}; - MEMCPY_S(pCur, sizeof(TiffHeader), TiffHeader, sizeof(TiffHeader)); - pIfdStart = pCur; - pCur += 8; - - // 2 0th IFD TIFF Tags - if (exifInfo->enableGps) - tmp = NUM_0TH_IFD_TIFF; - else - tmp = NUM_0TH_IFD_TIFF - 1; - - MEMCPY_S(pCur, NUM_SIZE, (int8_t*)&tmp, NUM_SIZE); - pCur += NUM_SIZE; - - LongerTagOffset += 8 + NUM_SIZE + tmp * IFD_SIZE + OFFSET_SIZE; - - writeExifIfd(&pCur, EXIF_TAG_IMAGE_WIDTH, EXIF_TYPE_LONG, 1, exifInfo->width); - writeExifIfd(&pCur, EXIF_TAG_IMAGE_HEIGHT, EXIF_TYPE_LONG, 1, exifInfo->height); - writeExifIfd(&pCur, EXIF_TAG_IMAGE_DESCRIPTION, EXIF_TYPE_ASCII, - strlen(reinterpret_cast(exifInfo->image_description)) + 1, - exifInfo->image_description, &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_MAKE, EXIF_TYPE_ASCII, strlen((char*)exifInfo->maker) + 1, - exifInfo->maker, &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_MODEL, EXIF_TYPE_ASCII, strlen((char*)exifInfo->model) + 1, - exifInfo->model, &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_ORIENTATION, EXIF_TYPE_SHORT, 1, exifInfo->orientation); - writeExifIfd(&pCur, EXIF_TAG_X_RESOLUTION, EXIF_TYPE_RATIONAL, 1, &exifInfo->x_resolution, - &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_Y_RESOLUTION, EXIF_TYPE_RATIONAL, 1, &exifInfo->y_resolution, - &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_RESOLUTION_UNIT, EXIF_TYPE_SHORT, 1, exifInfo->resolution_unit); - writeExifIfd(&pCur, EXIF_TAG_SOFTWARE, EXIF_TYPE_ASCII, strlen((char*)exifInfo->software) + 1, - exifInfo->software, &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_DATE_TIME, EXIF_TYPE_ASCII, 20, exifInfo->date_time, - &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_YCBCR_POSITIONING, EXIF_TYPE_SHORT, 1, - exifInfo->ycbcr_positioning); - writeExifIfd(&pCur, EXIF_TAG_EXIF_IFD_POINTER, EXIF_TYPE_LONG, 1, LongerTagOffset); - - pGpsIfdPtr = pCur; - if (exifInfo->enableGps) { - pCur += IFD_SIZE; // Skip a ifd size for gps IFD pointer - } - - pNextIfdOffset = pCur; // Skip a offset size for next IFD offset - pCur += OFFSET_SIZE; - - // 2 0th IFD Exif Private Tags - pCur = pIfdStart + LongerTagOffset; - - int drop_num = 0; - if (exifInfo->exposure_time.den == 0) drop_num++; - if (exifInfo->shutter_speed.den == 0) drop_num++; - if (exifInfo->makerNoteDataSize == 0 || exifInfo->makernoteToApp2) { - // skip the makernote IFD in APP1, when we don't have any, - // or if we want it to APP2 - drop_num++; - } - tmp = NUM_0TH_IFD_EXIF - drop_num; - MEMCPY_S(pCur, NUM_SIZE, &tmp, NUM_SIZE); - pCur += NUM_SIZE; - - LongerTagOffset += NUM_SIZE + tmp * IFD_SIZE + OFFSET_SIZE; - if (exifInfo->exposure_time.den != 0) { - writeExifIfd(&pCur, EXIF_TAG_EXPOSURE_TIME, EXIF_TYPE_RATIONAL, 1, &exifInfo->exposure_time, - &LongerTagOffset, pIfdStart); - } - writeExifIfd(&pCur, EXIF_TAG_FNUMBER, EXIF_TYPE_RATIONAL, 1, &exifInfo->fnumber, - &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_EXPOSURE_PROGRAM, EXIF_TYPE_SHORT, 1, exifInfo->exposure_program); - writeExifIfd(&pCur, EXIF_TAG_ISO_SPEED_RATING, EXIF_TYPE_SHORT, 1, exifInfo->iso_speed_rating); - writeExifIfd(&pCur, EXIF_TAG_EXIF_VERSION, EXIF_TYPE_UNDEFINED, 4, exifInfo->exif_version); - writeExifIfd(&pCur, EXIF_TAG_DATE_TIME_ORG, EXIF_TYPE_ASCII, 20, exifInfo->date_time, - &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_DATE_TIME_DIGITIZE, EXIF_TYPE_ASCII, 20, exifInfo->date_time, - &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_COMPONENTS_CONFIGURATION, EXIF_TYPE_UNDEFINED, 4, - exifInfo->components_configuration); - if (exifInfo->shutter_speed.den != 0) { - writeExifIfd(&pCur, EXIF_TAG_SHUTTER_SPEED, EXIF_TYPE_SRATIONAL, 1, - reinterpret_cast(&exifInfo->shutter_speed), &LongerTagOffset, - pIfdStart); - } - writeExifIfd(&pCur, EXIF_TAG_APERTURE, EXIF_TYPE_RATIONAL, 1, &exifInfo->aperture, - &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_BRIGHTNESS, EXIF_TYPE_SRATIONAL, 1, - reinterpret_cast(&exifInfo->brightness), &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_EXPOSURE_BIAS, EXIF_TYPE_SRATIONAL, 1, - reinterpret_cast(&exifInfo->exposure_bias), &LongerTagOffset, - pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_MAX_APERTURE, EXIF_TYPE_RATIONAL, 1, &exifInfo->max_aperture, - &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_SUBJECT_DISTANCE, EXIF_TYPE_RATIONAL, 1, - &exifInfo->subject_distance, &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_METERING_MODE, EXIF_TYPE_SHORT, 1, exifInfo->metering_mode); - writeExifIfd(&pCur, EXIF_TAG_LIGHT_SOURCE, EXIF_TYPE_SHORT, 1, exifInfo->light_source); - writeExifIfd(&pCur, EXIF_TAG_FLASH, EXIF_TYPE_SHORT, 1, exifInfo->flash); - writeExifIfd(&pCur, EXIF_TAG_FOCAL_LENGTH, EXIF_TYPE_RATIONAL, 1, &exifInfo->focal_length, - &LongerTagOffset, pIfdStart); - char code[8] = {0x41, 0x53, 0x43, 0x49, 0x49, 0x00, 0x00, 0x00}; - size_t commentsLen = strlen((char*)exifInfo->user_comment) + 1; - if (commentsLen > (sizeof(exifInfo->user_comment) - sizeof(code))) return EXIF_FAIL; - memmove(exifInfo->user_comment + sizeof(code), exifInfo->user_comment, commentsLen); - MEMCPY_S(exifInfo->user_comment, sizeof(exifInfo->user_comment), code, sizeof(code)); - writeExifIfd(&pCur, EXIF_TAG_USER_COMMENT, EXIF_TYPE_UNDEFINED, commentsLen + sizeof(code), - exifInfo->user_comment, &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_SUBSEC_TIME, EXIF_TYPE_ASCII, - strlen((char*)exifInfo->subsec_time) + 1, exifInfo->subsec_time, &LongerTagOffset, - pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_SUBSEC_TIME_ORIG, EXIF_TYPE_ASCII, - strlen((char*)exifInfo->subsec_time) + 1, exifInfo->subsec_time, &LongerTagOffset, - pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_SUBSEC_TIME_DIG, EXIF_TYPE_ASCII, - strlen((char*)exifInfo->subsec_time) + 1, exifInfo->subsec_time, &LongerTagOffset, - pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_FLASH_PIX_VERSION, EXIF_TYPE_UNDEFINED, 4, - exifInfo->flashpix_version); - writeExifIfd(&pCur, EXIF_TAG_COLOR_SPACE, EXIF_TYPE_SHORT, 1, exifInfo->color_space); - writeExifIfd(&pCur, EXIF_TAG_PIXEL_X_DIMENSION, EXIF_TYPE_LONG, 1, exifInfo->width); - writeExifIfd(&pCur, EXIF_TAG_PIXEL_Y_DIMENSION, EXIF_TYPE_LONG, 1, exifInfo->height); - writeExifIfd(&pCur, EXIF_TAG_CUSTOM_RENDERED, EXIF_TYPE_SHORT, 1, exifInfo->custom_rendered); - writeExifIfd(&pCur, EXIF_TAG_EXPOSURE_MODE, EXIF_TYPE_SHORT, 1, exifInfo->exposure_mode); - writeExifIfd(&pCur, EXIF_TAG_WHITE_BALANCE, EXIF_TYPE_SHORT, 1, exifInfo->white_balance); - writeExifIfd(&pCur, EXIF_TAG_JPEG_ZOOM_RATIO, EXIF_TYPE_RATIONAL, 1, &exifInfo->zoom_ratio, - &LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_SCENCE_CAPTURE_TYPE, EXIF_TYPE_SHORT, 1, - exifInfo->scene_capture_type); - writeExifIfd(&pCur, EXIF_TAG_GAIN_CONTROL, EXIF_TYPE_SHORT, 1, exifInfo->gain_control); - writeExifIfd(&pCur, EXIF_TAG_CONTRAST, EXIF_TYPE_SHORT, 1, exifInfo->contrast); - writeExifIfd(&pCur, EXIF_TAG_SATURATION, EXIF_TYPE_SHORT, 1, exifInfo->saturation); - writeExifIfd(&pCur, EXIF_TAG_SHARPNESS, EXIF_TYPE_SHORT, 1, exifInfo->sharpness); - - // Save MakerNote data to APP1, unless we want it APP2 - if (exifInfo->makerNoteDataSize > 0 && !exifInfo->makernoteToApp2) { - writeExifIfd(&pCur, EXIF_TAG_MAKER_NOTE, EXIF_TYPE_UNDEFINED, exifInfo->makerNoteDataSize, - (unsigned char*)exifInfo->makerNoteData, &LongerTagOffset, pIfdStart); - } - - tmp = 0; - MEMCPY_S(pCur, OFFSET_SIZE, (int8_t*)&tmp, OFFSET_SIZE); // next IFD offset - pCur += OFFSET_SIZE; - - // 2 0th IFD GPS Info Tags - if (exifInfo->enableGps) { - writeExifIfd(&pGpsIfdPtr, EXIF_TAG_GPS_IFD_POINTER, EXIF_TYPE_LONG, 1, - LongerTagOffset); // GPS IFD pointer skipped on 0th IFD - - pCur = pIfdStart + LongerTagOffset; - - tmp = NUM_0TH_IFD_GPS; - if ((exifInfo->enableGps & EXIF_GPS_LATITUDE) == 0) tmp -= 2; - if ((exifInfo->enableGps & EXIF_GPS_LONGITUDE) == 0) tmp -= 2; - if ((exifInfo->enableGps & EXIF_GPS_ALTITUDE) == 0) tmp -= 2; - if ((exifInfo->enableGps & EXIF_GPS_TIMESTAMP) == 0) tmp -= 1; - if ((exifInfo->enableGps & EXIF_GPS_PROCMETHOD) == 0) tmp -= 1; - if ((exifInfo->enableGps & EXIF_GPS_IMG_DIRECTION) == 0) tmp -= 2; - - MEMCPY_S(pCur, NUM_SIZE, (int8_t*)&tmp, NUM_SIZE); - pCur += NUM_SIZE; - - LongerTagOffset += NUM_SIZE + tmp * IFD_SIZE + OFFSET_SIZE; - - writeExifIfd(&pCur, EXIF_TAG_GPS_VERSION_ID, EXIF_TYPE_BYTE, 4, exifInfo->gps_version_id); - if (exifInfo->enableGps & EXIF_GPS_LATITUDE) { - writeExifIfd(&pCur, EXIF_TAG_GPS_LATITUDE_REF, EXIF_TYPE_ASCII, 2, - exifInfo->gps_latitude_ref); - writeExifIfd(&pCur, EXIF_TAG_GPS_LATITUDE, EXIF_TYPE_RATIONAL, 3, - exifInfo->gps_latitude, &LongerTagOffset, pIfdStart); - } - - if (exifInfo->enableGps & EXIF_GPS_LONGITUDE) { - writeExifIfd(&pCur, EXIF_TAG_GPS_LONGITUDE_REF, EXIF_TYPE_ASCII, 2, - exifInfo->gps_longitude_ref); - writeExifIfd(&pCur, EXIF_TAG_GPS_LONGITUDE, EXIF_TYPE_RATIONAL, 3, - exifInfo->gps_longitude, &LongerTagOffset, pIfdStart); - } - - if (exifInfo->enableGps & EXIF_GPS_ALTITUDE) { - writeExifIfd(&pCur, EXIF_TAG_GPS_ALTITUDE_REF, EXIF_TYPE_BYTE, 1, - exifInfo->gps_altitude_ref); - writeExifIfd(&pCur, EXIF_TAG_GPS_ALTITUDE, EXIF_TYPE_RATIONAL, 1, - &exifInfo->gps_altitude, &LongerTagOffset, pIfdStart); - } - - if (exifInfo->enableGps & EXIF_GPS_TIMESTAMP) { - writeExifIfd(&pCur, EXIF_TAG_GPS_TIMESTAMP, EXIF_TYPE_RATIONAL, 3, - exifInfo->gps_timestamp, &LongerTagOffset, pIfdStart); - } - - if (exifInfo->enableGps & EXIF_GPS_IMG_DIRECTION) { - writeExifIfd(&pCur, EXIF_TAG_GPS_IMG_DIRECTION_REF, EXIF_TYPE_ASCII, 2, - exifInfo->gps_img_direction_ref); - writeExifIfd(&pCur, EXIF_TAG_GPS_IMG_DIRECTION, EXIF_TYPE_RATIONAL, 1, - &exifInfo->gps_img_direction, &LongerTagOffset, pIfdStart); - } - - if (exifInfo->enableGps & EXIF_GPS_PROCMETHOD) { - tmp = strlen((char*)exifInfo->gps_processing_method); - if (tmp > 0) { - if (tmp > 100) { - tmp = 100; - } - unsigned char tmp_buf[100 + sizeof(ExifAsciiPrefix)]; - MEMCPY_S(tmp_buf, sizeof(tmp_buf), ExifAsciiPrefix, sizeof(ExifAsciiPrefix)); - MEMCPY_S(&tmp_buf[sizeof(ExifAsciiPrefix)], 100, exifInfo->gps_processing_method, - tmp); - writeExifIfd(&pCur, EXIF_TAG_GPS_PROCESSING_METHOD, EXIF_TYPE_UNDEFINED, - tmp + sizeof(ExifAsciiPrefix), tmp_buf, &LongerTagOffset, pIfdStart); - } - } - writeExifIfd(&pCur, EXIF_TAG_GPS_DATESTAMP, EXIF_TYPE_ASCII, 11, exifInfo->gps_datestamp, - &LongerTagOffset, pIfdStart); - tmp = 0; - MEMCPY_S(pCur, OFFSET_SIZE, (int8_t*)&tmp, OFFSET_SIZE); // next IFD offset - pCur += OFFSET_SIZE; - } - - CheckAndLogError(LongerTagOffset >= EXIF_SIZE_LIMITATION, EXIF_FAIL, - "%s, the size exceeds 64K, line:%d", __func__, __LINE__); - - // 2 1th IFD TIFF Tags - if (exifInfo->enableThumb && (m_thumbBuf != nullptr) && (m_thumbSize > 0)) { - writeThumbData(pIfdStart, pNextIfdOffset, &LongerTagOffset, exifInfo); - } else { - tmp = 0; - MEMCPY_S(pNextIfdOffset, OFFSET_SIZE, (int8_t*)&tmp, - OFFSET_SIZE); // NEXT IFD offset skipped on 0th IFD - } - - // fill APP1 maker - unsigned char App1Marker[2] = {0xff, 0xe1}; - MEMCPY_S(pApp1Start, 2, App1Marker, 2); - pApp1Start += 2; - - // calc and fill the APP1 segment total size, 2 is length; 6 is ExifIdentifierCode - *size = 2 + 6 + LongerTagOffset; - - writeMarkerSizeToBuf(pApp1Start, *size); - - unsigned app2StartOffset = *size; - *size += 2; // APP1 marker size - - exif_status status = EXIF_SUCCESS; - - if (exifInfo->makernoteToApp2) { - LOG1("Makernote goes to APP2 segment."); - status = makeApp2((pApp1Start + app2StartOffset), *size, exifInfo); - } - - if (status != EXIF_SUCCESS) LOGW("Failed to create EXIF APP2 section"); - - LOG1("makeExif End"); - - return status; -} - -void ExifCreater::writeMarkerSizeToBuf(unsigned char* ptrTo, unsigned int size) { - unsigned char size_mm[2] = {static_cast((size >> 8) & 0xFF), - static_cast(size & 0xFF)}; - - MEMCPY_S(ptrTo, 2, size_mm, 2); -} - -/** - * makeApp2 - * - * Write the makernote to APP2 segment. Use multiple APP2 segments if makernote - * size is more than one segment (64 kb) - * - * \param pStartApp2 [IN] APP2 start address - * \param exifInfo [IN] Data to be written - * \param writeId [IN] Whether to write the Intel Makernote ID string. - * \param size [OUT] Total size after APP2 is written - */ -exif_status ExifCreater::makeApp2(void* pStartApp2, size_t& size, exif_attribute_t* exifInfo, - bool writeId) { - // APP2 marker will be written starting from the pos pointed to by - // pStartApp2 - - if (exifInfo->makerNoteDataSize <= 0) return EXIF_SUCCESS; - - int bytesLeftForSegment = EXIF_SIZE_LIMITATION; - int bytesToWrite = exifInfo->makerNoteDataSize; - - unsigned char *pCur = nullptr, *pApp2Start = nullptr; - unsigned char App2Marker[SIZEOF_APP2_MARKER] = {0xff, 0xe2}; - int writeCount = 0; - unsigned char* toWrite = exifInfo->makerNoteData; - - pCur = static_cast(pStartApp2); - - // Write Makernote up to ~64kB, then split to a new - // APP2 segment, if needed - while (bytesToWrite > 0) { - pApp2Start = pCur; - pCur += 4; // Skip 4 bytes for APP2 marker and length - - if (writeId) { - MEMCPY_S(pCur, sizeof(MAKERNOTE_ID), MAKERNOTE_ID, sizeof(MAKERNOTE_ID)); - pCur += sizeof(MAKERNOTE_ID); - size += sizeof(MAKERNOTE_ID); - // ID overhead for one APP2 segment - bytesLeftForSegment -= sizeof(MAKERNOTE_ID); - } - - // Overhead for one APP2 segment: - bytesLeftForSegment -= (sizeof(App2Marker) + SIZEOF_LENGTH_FIELD); - - if (bytesToWrite > bytesLeftForSegment) { - // More data to write than what fits to one APP2 marker - writeCount = bytesLeftForSegment; - } else { - // All data fits to one APP2 segment - writeCount = bytesToWrite; - } - - bytesToWrite -= writeCount; - - MEMCPY_S(pCur, writeCount, toWrite, writeCount); - pCur += writeCount; - toWrite += writeCount; - size += writeCount; - - // Last, put the APP2 marker to the beginning of the segment - MEMCPY_S(pApp2Start, sizeof(App2Marker), App2Marker, sizeof(App2Marker)); - pApp2Start += sizeof(App2Marker); - - // Length field goes after the APP2 marker - int app2SegmentSize = writeCount + SIZEOF_LENGTH_FIELD; // Raw data written + overhead - if (writeId) app2SegmentSize += sizeof(MAKERNOTE_ID); - - writeMarkerSizeToBuf(pApp2Start, app2SegmentSize); - - // add the 2 bytes for both length field and APP2 marker, the caller has to know the total - // size - size += sizeof(App2Marker) + SIZEOF_LENGTH_FIELD; - - // Reset byte counts for another APP2 segment, if needed - bytesLeftForSegment = EXIF_SIZE_LIMITATION; - } - - return EXIF_SUCCESS; -} - -void ExifCreater::writeThumbData(unsigned char* pIfdStart, unsigned char* pNextIfdOffset, - unsigned int* LongerTagOffset, exif_attribute_t* exifInfo) { - unsigned char* pCur; - unsigned int tmp; - - // firstly calc the exif total size, if it's > 64K, we'll disable the thumbnail - tmp = 4 + 6 + *LongerTagOffset; // 4 is APP1 marker and length; 6 is ExifIdentifierCode - tmp += NUM_SIZE + NUM_1TH_IFD_TIFF * IFD_SIZE + OFFSET_SIZE; - tmp += sizeof(exifInfo->x_resolution) + sizeof(exifInfo->y_resolution); - tmp += m_thumbSize; - - if (tmp > EXIF_SIZE_LIMITATION) { - LOG1("line:%d, in makeExif, exif total size(%d) > 64K, we'll disable thumbnail.", __LINE__, - tmp); - m_thumbSize = 0; - m_thumbBuf = nullptr; - tmp = 0; - MEMCPY_S(pNextIfdOffset, OFFSET_SIZE, (int8_t*)&tmp, - OFFSET_SIZE); // NEXT IFD offset skipped on 0th IFD - } else { - tmp = *LongerTagOffset; - MEMCPY_S(pNextIfdOffset, OFFSET_SIZE, (int8_t*)&tmp, - OFFSET_SIZE); // NEXT IFD offset skipped on 0th IFD - - pCur = pIfdStart + *LongerTagOffset; - - tmp = NUM_1TH_IFD_TIFF; - MEMCPY_S(pCur, NUM_SIZE, (int8_t*)&tmp, NUM_SIZE); - pCur += NUM_SIZE; - - *LongerTagOffset += NUM_SIZE + NUM_1TH_IFD_TIFF * IFD_SIZE + OFFSET_SIZE; - - writeExifIfd(&pCur, EXIF_TAG_IMAGE_WIDTH, EXIF_TYPE_LONG, 1, exifInfo->widthThumb); - writeExifIfd(&pCur, EXIF_TAG_IMAGE_HEIGHT, EXIF_TYPE_LONG, 1, exifInfo->heightThumb); - writeExifIfd(&pCur, EXIF_TAG_COMPRESSION_SCHEME, EXIF_TYPE_SHORT, 1, - exifInfo->compression_scheme); - writeExifIfd(&pCur, EXIF_TAG_ORIENTATION, EXIF_TYPE_SHORT, 1, exifInfo->orientation); - writeExifIfd(&pCur, EXIF_TAG_X_RESOLUTION, EXIF_TYPE_RATIONAL, 1, &exifInfo->x_resolution, - LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_Y_RESOLUTION, EXIF_TYPE_RATIONAL, 1, &exifInfo->y_resolution, - LongerTagOffset, pIfdStart); - writeExifIfd(&pCur, EXIF_TAG_RESOLUTION_UNIT, EXIF_TYPE_SHORT, 1, - exifInfo->resolution_unit); - writeExifIfd(&pCur, EXIF_TAG_JPEG_INTERCHANGE_FORMAT, EXIF_TYPE_LONG, 1, *LongerTagOffset); - writeExifIfd(&pCur, EXIF_TAG_JPEG_INTERCHANGE_FORMAT_LEN, EXIF_TYPE_LONG, 1, m_thumbSize); - - tmp = 0; - MEMCPY_S(pCur, OFFSET_SIZE, (int8_t*)&tmp, OFFSET_SIZE); // next IFD offset - // pCur += OFFSET_SIZE; - - MEMCPY_S(pIfdStart + *LongerTagOffset, m_thumbSize, m_thumbBuf, m_thumbSize); - *LongerTagOffset += m_thumbSize; - } -} - -void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, - unsigned int count, uint32_t value) { - MEMCPY_S(*pCur, 2, (int8_t*)&tag, 2); - *pCur += 2; - MEMCPY_S(*pCur, 2, (int8_t*)&type, 2); - *pCur += 2; - MEMCPY_S(*pCur, 4, (int8_t*)&count, 4); - *pCur += 4; - MEMCPY_S(*pCur, 4, (int8_t*)&value, 4); - *pCur += 4; -} - -void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, - unsigned int count, unsigned char* pValue) { - char buf[4] = { - 0, - }; - - MEMCPY_S(buf, count, pValue, count); - MEMCPY_S(*pCur, 2, (int8_t*)&tag, 2); - *pCur += 2; - MEMCPY_S(*pCur, 2, (int8_t*)&type, 2); - *pCur += 2; - MEMCPY_S(*pCur, 4, (int8_t*)&count, 4); - *pCur += 4; - MEMCPY_S(*pCur, 4, (int8_t*)buf, 4); - *pCur += 4; -} - -void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, - unsigned int count, unsigned char* pValue, unsigned int* offset, - unsigned char* start) { - MEMCPY_S(*pCur, 2, (int8_t*)&tag, 2); - *pCur += 2; - MEMCPY_S(*pCur, 2, (int8_t*)&type, 2); - *pCur += 2; - MEMCPY_S(*pCur, 4, (int8_t*)&count, 4); - *pCur += 4; - MEMCPY_S(*pCur, 4, (int8_t*)offset, 4); - *pCur += 4; - MEMCPY_S(start + *offset, count, pValue, count); - *offset += count; -} - -void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, - unsigned int count, rational_t* pValue, unsigned int* offset, - unsigned char* start) { - MEMCPY_S(*pCur, 2, (int8_t*)&tag, 2); - *pCur += 2; - MEMCPY_S(*pCur, 2, (int8_t*)&type, 2); - *pCur += 2; - MEMCPY_S(*pCur, 4, (int8_t*)&count, 4); - *pCur += 4; - MEMCPY_S(*pCur, 4, (int8_t*)offset, 4); - *pCur += 4; - MEMCPY_S(start + *offset, 8 * count, (int8_t*)pValue, 8 * count); - *offset += 8 * count; -} - -} // namespace icamera diff --git a/src/jpeg/ExifCreater.h b/src/jpeg/ExifCreater.h deleted file mode 100644 index bf90e260..00000000 --- a/src/jpeg/ExifCreater.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright Samsung Electronics Co.,LTD. - * Copyright (C) 2010 The Android Open Source Project - * Copyright (C) 2016-2020 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * JPEG DRIVER MODULE (JpegEncoder.h) - * Author : ge.lee -- initial version - * Date : 03 June 2010 - * Purpose : This file implements the JPEG encoder APIs as needed by Camera HAL - */ - -#pragma once - -#include -#include - -#include "Exif.h" -#include "iutils/Utils.h" - -namespace icamera { - -#define MAX_JPG_WIDTH 4352 -#define MAX_JPG_HEIGHT 3264 -#define MAX_JPG_RESOLUTION (MAX_JPG_WIDTH * MAX_JPG_HEIGHT) - -#define MAX_JPG_THUMBNAIL_WIDTH 640 -#define MAX_JPG_THUMBNAIL_HEIGHT 480 -#define MAX_JPG_THUMBNAIL_RESOLUTION (MAX_JPG_THUMBNAIL_WIDTH * MAX_JPG_THUMBNAIL_HEIGHT) - -#define MAX_RGB_WIDTH 800 -#define MAX_RGB_HEIGHT 480 -#define MAX_RGB_RESOLUTION (MAX_RGB_WIDTH * MAX_RGB_HEIGHT) - -/*******************************************************************************/ -/* define JPG & image memory */ -/* memory area is 4k(PAGE_SIZE) aligned because of VirtualCopyEx() */ -#define JPG_STREAM_BUF_SIZE ((MAX_JPG_RESOLUTION / PAGE_SIZE + 1) * PAGE_SIZE) -#define JPG_STREAM_THUMB_BUF_SIZE ((MAX_JPG_THUMBNAIL_RESOLUTION / PAGE_SIZE + 1) * PAGE_SIZE) -#define JPG_FRAME_BUF_SIZE (((MAX_JPG_RESOLUTION * 3) / PAGE_SIZE + 1) * PAGE_SIZE) -#define JPG_FRAME_THUMB_BUF_SIZE (((MAX_JPG_THUMBNAIL_RESOLUTION * 3) / PAGE_SIZE + 1) * PAGE_SIZE) -#define JPG_RGB_BUF_SIZE (((MAX_RGB_RESOLUTION * 4) / PAGE_SIZE + 1) * PAGE_SIZE) - -#define JPG_TOTAL_BUF_SIZE \ - (JPG_STREAM_BUF_SIZE + JPG_STREAM_THUMB_BUF_SIZE + JPG_FRAME_BUF_SIZE + \ - JPG_FRAME_THUMB_BUF_SIZE + JPG_RGB_BUF_SIZE) - -#define JPG_MAIN_START 0x00 -#define JPG_THUMB_START JPG_STREAM_BUF_SIZE -#define IMG_MAIN_START (JPG_STREAM_BUF_SIZE + JPG_STREAM_THUMB_BUF_SIZE) -#define IMG_THUMB_START (IMG_MAIN_START + JPG_FRAME_BUF_SIZE) -/*******************************************************************************/ - -const char MAKERNOTE_ID[] = {0x49, 0x6e, 0x74, 0x65, 0x6c, 0x4d, - 0x6b, 0x6e, 0x6f, 0x74, 0x65, 0x0 /* "IntelMknote\0" */}; - -const unsigned SIZEOF_LENGTH_FIELD = 2; -const unsigned SIZEOF_APP2_MARKER = 2; -const unsigned SIZEOF_APP2_OVERHEAD = - sizeof(MAKERNOTE_ID) + SIZEOF_APP2_MARKER + SIZEOF_LENGTH_FIELD; -const bool ENABLE_APP2_MARKER = true; -typedef enum { EXIF_FAIL = -1, EXIF_SUCCESS = 0 } exif_status; - -class ExifCreater { - public: - ExifCreater(); - virtual ~ExifCreater(); - - exif_status setThumbData(const void* thumbBuf, unsigned int thumbSize); - - bool isThumbDataSet() const; - - exif_status makeExif(void* exifOut, exif_attribute_t* exifInfo, size_t* size); - - private: - exif_status makeApp2(void* pStartApp2, size_t& size, exif_attribute_t* exifInfo, - bool writeId = true); - void writeMarkerSizeToBuf(unsigned char* ptrTo, unsigned int size); - /* - Every IFD has 12Bytes. - Tag ID, 2B; Type, 2B; Count, 4B; Value/Offset, 4B; - If it is Value, please use the first two functions. - If it is Offset, please use the last two functions - and store the data in the rear. - */ - void writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, - unsigned int count, uint32_t value); - void writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, - unsigned int count, unsigned char* pValue); - void writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, - unsigned int count, rational_t* pValue, unsigned int* offset, - unsigned char* start); - void writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, - unsigned int count, unsigned char* pValue, unsigned int* offset, - unsigned char* start); - void writeThumbData(unsigned char* pIfdStart, unsigned char* pNextIfdOffset, - unsigned int* LongerTagOffset, exif_attribute_t* exifInfo); - - unsigned char* m_thumbBuf; // MAP: Added to set thumbnail from external data - unsigned int m_thumbSize; // MAP: Added to set thumbnail from external data -}; - -} // namespace icamera diff --git a/src/jpeg/IJpegEncoder.h b/src/jpeg/IJpegEncoder.h deleted file mode 100644 index 9e810b07..00000000 --- a/src/jpeg/IJpegEncoder.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C) 2019-2020 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "iutils/Utils.h" - -namespace icamera { - -#define DEFAULT_JPEG_QUALITY 95 -static const unsigned char mJpegMarkerSOI[2] = {0xFF, 0xD8}; - -struct EncodePackage { - EncodePackage() - : inputWidth(0), - inputHeight(0), - inputStride(0), - inputFormat(0), - inputSize(0), - inputBufferHandle(nullptr), - inputData(nullptr), - outputWidth(0), - outputHeight(0), - outputSize(0), - outputBufferHandle(nullptr), - outputData(nullptr), - quality(0), - encodedDataSize(0), - exifData(nullptr), - exifDataSize(0) {} - - /* input buffer info */ - int inputWidth; - int inputHeight; - int inputStride; - int inputFormat; - unsigned int inputSize; - void* inputBufferHandle; - void* inputData; - - /* output buffer info */ - int outputWidth; - int outputHeight; - unsigned int outputSize; - void* outputBufferHandle; - void* outputData; - - int quality; - uint32_t encodedDataSize; - uint8_t* exifData; - uint32_t exifDataSize; -}; - -class IJpegEncoder { - public: - IJpegEncoder(){}; - virtual ~IJpegEncoder(){}; - - static std::unique_ptr createJpegEncoder(); - virtual bool doJpegEncode(EncodePackage* package) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(IJpegEncoder); -}; -} // namespace icamera diff --git a/src/jpeg/JpegMaker.cpp b/src/jpeg/JpegMaker.cpp deleted file mode 100644 index 4e38bbf0..00000000 --- a/src/jpeg/JpegMaker.cpp +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (C) 2016-2021 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG JpegMaker - -#include "JpegMaker.h" - -#include "iutils/CameraLog.h" -#include "iutils/Utils.h" - -namespace icamera { - -JpegMaker::JpegMaker() { - LOG2("@%s", __func__); - mExifMaker = std::unique_ptr(new EXIFMaker()); -} - -JpegMaker::~JpegMaker() { - LOG2("@%s", __func__); -} - -status_t JpegMaker::setupExifWithMetaData(int bufWidth, int bufHeight, const Parameters& parameter, - ExifMetaData* metaData) { - LOG2("@%s", __func__); - - status_t status = OK; - - status = processJpegSettings(parameter, metaData); - CheckAndLogError(status != OK, status, "@%s: Process settngs for JPEG failed!", __func__); - - mExifMaker->initialize(bufWidth, bufHeight); - mExifMaker->pictureTaken(metaData); - - mExifMaker->enableFlash(metaData->flashFired, metaData->v3AeMode, metaData->flashMode); - mExifMaker->updateSensorInfo(parameter); - mExifMaker->saveMakernote(parameter); - - status = processExifSettings(parameter, metaData); - if (status != OK) { - LOGE("@%s: Process settngs for Exif! %d", __func__, status); - return status; - } - - mExifMaker->initializeLocation(metaData); - mExifMaker->setSensorAeConfig(parameter); - - if (metaData->software) mExifMaker->setSoftware(metaData->software); - - return status; -} - -status_t JpegMaker::getExif(const EncodePackage& thumbnailPackage, uint8_t* exifPtr, - uint32_t* exifSize) { - if (thumbnailPackage.encodedDataSize > 0 && thumbnailPackage.quality > 0) { - mExifMaker->setThumbnail(static_cast(thumbnailPackage.outputData), - thumbnailPackage.encodedDataSize, thumbnailPackage.outputWidth, - thumbnailPackage.outputHeight); - } - *exifSize = mExifMaker->makeExif(exifPtr); - return *exifSize > 0 ? OK : UNKNOWN_ERROR; -} - -status_t JpegMaker::processExifSettings(const Parameters& params, ExifMetaData* metaData) { - LOG2("@%s:", __func__); - status_t status = OK; - - status = processGpsSettings(params, metaData); - status |= processColoreffectSettings(params, metaData); - status |= processScalerCropSettings(params, metaData); - - return status; -} - -/* copy exif data into output buffer */ -void JpegMaker::writeExifData(EncodePackage* package) { - CheckAndLogError(package == nullptr, VOID_VALUE, "@%s, package is nullptr", __func__); - - if (package->exifDataSize == 0) return; - - CheckAndLogError(!package->outputData, VOID_VALUE, "@%s, outputData is nullptr", __func__); - CheckAndLogError(!package->exifData, VOID_VALUE, "@%s, exifData is nullptr", __func__); - - unsigned int jSOISize = sizeof(mJpegMarkerSOI); - unsigned char* jpegOut = reinterpret_cast(package->outputData); - MEMCPY_S(jpegOut, jSOISize, mJpegMarkerSOI, jSOISize); - jpegOut += jSOISize; - - MEMCPY_S(jpegOut, package->exifDataSize, reinterpret_cast(package->exifData), - package->exifDataSize); -} - -/** - * processJpegSettings - * - * Store JPEG settings to the exif metadata - * - * \param [IN] jpeg parameters - * \ metaData [out] metadata of the request - * - */ -status_t JpegMaker::processJpegSettings(const Parameters& params, ExifMetaData* metaData) { - LOG2("@%s:", __func__); - status_t status = OK; - - CheckAndLogError(!metaData, UNKNOWN_ERROR, "MetaData struct not intialized"); - - // make jpeg with thumbnail or not - camera_resolution_t thumbSize = {0}; - params.getJpegThumbnailSize(thumbSize); - LOG2("%s request thumbname size %dx%d", __func__, thumbSize.width, thumbSize.height); - - uint8_t new_jpeg_quality = DEFAULT_JPEG_QUALITY; - int ret = params.getJpegQuality(&new_jpeg_quality); - if (ret != icamera::OK) { - LOGW("cannot find jpeg quality, use default"); - } - metaData->mJpegSetting.jpegQuality = new_jpeg_quality; - - uint8_t new_jpeg_thumb_quality = DEFAULT_JPEG_QUALITY; - params.getJpegThumbnailQuality(&new_jpeg_thumb_quality); - metaData->mJpegSetting.jpegThumbnailQuality = new_jpeg_thumb_quality; - metaData->mJpegSetting.thumbWidth = thumbSize.width; - metaData->mJpegSetting.thumbHeight = thumbSize.height; - - int new_rotation = 0; - params.getJpegRotation(new_rotation); - metaData->mJpegSetting.orientation = new_rotation; - - LOG1("jpegQuality=%d,thumbQuality=%d,thumbW=%d,thumbH=%d,orientation=%d", - metaData->mJpegSetting.jpegQuality, metaData->mJpegSetting.jpegThumbnailQuality, - metaData->mJpegSetting.thumbWidth, metaData->mJpegSetting.thumbHeight, - metaData->mJpegSetting.orientation); - - params.getAeMode(metaData->aeMode); - params.getAwbMode(metaData->awbMode); - - metaData->currentFocusDistance = 0.0; - float focusDistance = 0.0; - params.getFocusDistance(focusDistance); - if (focusDistance != 0) { - metaData->currentFocusDistance = ceil(1000.0 / focusDistance); - } - LOG2("aeMode=%d, awbMode=%d, currentFocusDistance=%f", metaData->aeMode, metaData->awbMode, - metaData->currentFocusDistance); - - return status; -} - -/** - * This function will get GPS metadata from request setting - * - * \param[in] settings The Anroid metadata to process GPS settings from - * \param[out] metadata The EXIF data where the GPS setting are written to - */ -status_t JpegMaker::processGpsSettings(const Parameters& param, ExifMetaData* metadata) { - LOG2("@%s:", __func__); - status_t status = OK; - - // gps latitude - double new_gps_latitude = 0.0; - param.getJpegGpsLatitude(new_gps_latitude); - metadata->mGpsSetting.latitude = new_gps_latitude; - - double new_gps_longitude = 0.0; - param.getJpegGpsLongitude(new_gps_longitude); - metadata->mGpsSetting.longitude = new_gps_longitude; - - double new_gps_altitude = 0.0; - param.getJpegGpsAltitude(new_gps_altitude); - metadata->mGpsSetting.altitude = new_gps_altitude; - - // gps timestamp - int64_t new_gps_timestamp = 0; - param.getJpegGpsTimeStamp(new_gps_timestamp); - metadata->mGpsSetting.gpsTimeStamp = new_gps_timestamp; - - // gps processing method - char new_gps_processing_method[MAX_NUM_GPS_PROCESSING_METHOD + 1]; - CLEAR(new_gps_processing_method); - param.getJpegGpsProcessingMethod(MAX_NUM_GPS_PROCESSING_METHOD, new_gps_processing_method); - if (strlen(new_gps_processing_method) != 0) { - snprintf(metadata->mGpsSetting.gpsProcessingMethod, - sizeof(metadata->mGpsSetting.gpsProcessingMethod), "%s", - new_gps_processing_method); - } - - return status; -} - -status_t JpegMaker::processColoreffectSettings(const Parameters& param, ExifMetaData* metaData) { - LOG2("@%s:", __func__); - status_t status = OK; - - camera_effect_mode_t new_image_effect = CAM_EFFECT_NONE; - param.getImageEffect(new_image_effect); - metaData->effectMode = new_image_effect; - LOG2("effect mode=%d", metaData->effectMode); - - return status; -} - -status_t JpegMaker::processScalerCropSettings(const Parameters& param, ExifMetaData* metaData) { - LOG2("@%s:", __func__); - status_t status = OK; - - return status; -} - -} // namespace icamera diff --git a/src/jpeg/JpegMaker.h b/src/jpeg/JpegMaker.h deleted file mode 100644 index 8f503621..00000000 --- a/src/jpeg/JpegMaker.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2016-2020 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#include "EXIFMaker.h" -#include "EXIFMetaData.h" -#include "IJpegEncoder.h" -#include "iutils/Errors.h" -#include "iutils/Utils.h" - -namespace icamera { - -/** - * \class JpegMaker - * Does the EXIF header creation and appending to the provided jpeg buffer - * - */ -class JpegMaker { - public: /* Methods */ - explicit JpegMaker(); - virtual ~JpegMaker(); - status_t setupExifWithMetaData(int bufWidth, int bufHeight, const Parameters& parameter, - ExifMetaData* metaData); - status_t getExif(const EncodePackage& thumbnailPackage, uint8_t* exifPtr, uint32_t* exifSize); - void writeExifData(EncodePackage* package); - - private: /* Methods */ - // prevent copy constructor and assignment operator - DISALLOW_COPY_AND_ASSIGN(JpegMaker); - - status_t processExifSettings(const Parameters& params, ExifMetaData* metaData); - status_t processJpegSettings(const Parameters& params, ExifMetaData* metaData); - status_t processGpsSettings(const Parameters& params, ExifMetaData* metadata); - status_t processColoreffectSettings(const Parameters& params, ExifMetaData* metaData); - status_t processScalerCropSettings(const Parameters& params, ExifMetaData* metaData); - - private: /* Members */ - std::unique_ptr mExifMaker; -}; -} // namespace icamera diff --git a/src/jpeg/chrome/JpegEncoderCore.cpp b/src/jpeg/chrome/JpegEncoderCore.cpp deleted file mode 100644 index 1e4d4d63..00000000 --- a/src/jpeg/chrome/JpegEncoderCore.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG JpegEncoderCore - -#include "JpegEncoderCore.h" - -#include -#include - -#include "iutils/CameraLog.h" -#include "iutils/Errors.h" -#include "iutils/Utils.h" -#include "PlatformData.h" - -namespace icamera { - -JpegEncoderCore::JpegEncoderCore() : mJpegCompressor(cros::JpegCompressor::GetInstance()) {} - -JpegEncoderCore::~JpegEncoderCore() {} - -std::unique_ptr IJpegEncoder::createJpegEncoder() { - return std::unique_ptr(new JpegEncoderCore()); -} - -/** - * doJpegEncode - * - * Do HW / SW JPEG encoding for the main buffer - * Do SW JPEG encoding for the thumbnail buffer - * - * \param pa [IN/OUT] Information that should be encoded - */ -bool JpegEncoderCore::doJpegEncode(EncodePackage* pa) { - HAL_TRACE_CALL(CAMERA_DEBUG_LOG_LEVEL1); - CheckAndLogError(pa == nullptr, false, "@%s, pa is nullptr", __func__); - - CheckAndLogError(pa->inputWidth != pa->outputWidth || pa->inputHeight != pa->outputHeight, - false, "@%s, input size != output size", __func__); - CheckAndLogError(pa->inputWidth <= 0 || pa->outputWidth <= 0, false, - "@%s, inputWidth:%d, outputWidth:%d", __func__, pa->inputWidth, - pa->outputWidth); - CheckAndLogError(pa->inputHeight <= 0 || pa->outputHeight <= 0, false, - "@%s, inputHeight:%d, outputHeight:%d", __func__, pa->inputHeight, - pa->outputHeight); - - LOG1("@%s: Using Google encoding...", __func__); - - nsecs_t startTime = CameraUtils::systemTime(); - - bool ret = false; - if (pa->inputBufferHandle && pa->outputBufferHandle && PlatformData::supportHwJpegEncode()) { - LOG1("%s, use buffer handle to do jpeg encode input: %p, output: %p", __func__, - pa->inputBufferHandle, pa->outputBufferHandle); - ret = mJpegCompressor->CompressImageFromHandle( - *reinterpret_cast(pa->inputBufferHandle), - *reinterpret_cast(pa->outputBufferHandle), pa->inputWidth, - pa->inputHeight, pa->quality, pa->exifData, pa->exifDataSize, &pa->encodedDataSize); - } else if (pa->inputData && pa->outputData) { - LOG1("%s, use buffer address to do jpeg encode input: %p, output: %p", __func__, - pa->inputData, pa->outputData); - ret = mJpegCompressor->CompressImageFromMemory( - pa->inputData, V4L2_PIX_FMT_NV12, pa->outputData, pa->outputSize, pa->inputWidth, - pa->inputHeight, pa->quality, pa->exifData, pa->exifDataSize, &pa->encodedDataSize); - } else { - LOGE("%s: Google encode input type and output type does not match", __func__); - } - - LOG1("@%s: Google encoding ret:%d, %dx%d need %ld ms, jpeg size %u, quality %d)", __func__, ret, - pa->outputWidth, pa->outputHeight, (CameraUtils::systemTime() - startTime) / 1000000, - pa->encodedDataSize, pa->quality); - return ret && pa->encodedDataSize > 0; -} -} // namespace icamera diff --git a/src/jpeg/sw/SWJpegEncoder.cpp b/src/jpeg/sw/SWJpegEncoder.cpp deleted file mode 100644 index c8d42254..00000000 --- a/src/jpeg/sw/SWJpegEncoder.cpp +++ /dev/null @@ -1,740 +0,0 @@ -/* - * Copyright (C) 2011 The Android Open Source Project - * Copyright (C) 2016-2021 Intel Corporation. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#define LOG_TAG SWJpegEncoder - -#include "SWJpegEncoder.h" - -#include - -#include "ImageConverter.h" -#include "iutils/CameraLog.h" -#include "iutils/Utils.h" - -#define RESOLUTION_1_3MP_WIDTH 1280 -#define RESOLUTION_1_3MP_HEIGHT 960 - -namespace icamera { - -SWJpegEncoder::SWJpegEncoder() - : mJpegSize(-1), - mTotalWidth(0), - mTotalHeight(0), - mDstBuf(nullptr), - mCPUCoresNum(1) { - LOG2("@%s, line:%d", __func__, __LINE__); -} - -SWJpegEncoder::~SWJpegEncoder() { - LOG2("@%s, line:%d", __func__, __LINE__); -} - -std::unique_ptr IJpegEncoder::createJpegEncoder() { - return std::unique_ptr(new SWJpegEncoder()); -} - -/** - * \param package: encode package for either thumbnail or main image - * \return true if encoding succeeds - * \return false if encoding fails - */ -bool SWJpegEncoder::doJpegEncode(EncodePackage* package) { - CheckAndLogError(package == nullptr, false, "@%s, package is nullptr", __func__); - - int status = 0; - nsecs_t startTime = CameraUtils::systemTime(); - - LOG2("@%s: IN = {buf:%p, w:%u, h:%u, sz:%u, stride:%d, fmt:%s}", __func__, package->inputData, - package->inputWidth, package->inputHeight, package->inputSize, package->inputStride, - icamera::CameraUtils::format2string(package->inputFormat).c_str()); - - LOG2("@%s: OUT = {buf:%p, w:%u, h:%u, sz:%u, q:%d}", __func__, package->outputData, - package->outputWidth, package->outputHeight, package->outputSize, package->quality); - - if (package->inputWidth == 0 || package->inputHeight == 0 || package->inputFormat == 0) { - ALOGE("Invalid input received!"); - mJpegSize = -1; - goto exit; - } - - mTotalWidth = package->inputWidth; - mTotalHeight = package->inputHeight; - - /* - * For encoding main buffer, need to skip the exif data and SOI header. - * Because the SOI(jpeg maker) is written in the beginning of jpeg data when - * do encode, so only skip the exif data size here, and the SOI will be moved - * to the head of output buffer - */ - mDstBuf = reinterpret_cast(package->outputData) + package->exifDataSize; - - if (useMultiThreadEncoding(package->inputWidth, package->inputHeight)) - status = swEncodeMultiThread(*package); - else - status = swEncode(*package); - - if (status < 0) goto exit; - - package->encodedDataSize = mJpegSize; - - LOG2("@%s encode, total consume:%ums, encoded jpeg size: %d", __func__, - (unsigned)((CameraUtils::systemTime() - startTime) / 1000000), mJpegSize); - - return mJpegSize > 0 ? true : false; -exit: - return false; -} - -/** - * This function will decide if we need to enable the multi thread jpeg encoding. - * currently, we have two conditions to use the old single jpeg encoding. - * one is that the resolution is smaller than the 1.3M - * the other is that the CPU number is 1 - * - * \param width: the Jpeg width - * \param height: the Jpeg height - * - * \return false if we don't need multi thread Jpeg encoding - * \return true if we need multi thread Jpeg encoding - */ -bool SWJpegEncoder::useMultiThreadEncoding(int width, int height) { - LOG2("@%s, line:%d, width:%d, height:%d", __func__, __LINE__, width, height); - bool ret = false; - - /* more conditions could be added to here by according to the request */ - if ((width < RESOLUTION_1_3MP_WIDTH && height < RESOLUTION_1_3MP_HEIGHT)) - ret = false; - else if (width & 0xf) - ret = false; - else - ret = true; - - LOG2("@%s, line:%d, ret:%d", __func__, __LINE__, ret); - return ret; -} - -/** - * encode jpeg by calling the SWJpegEncoder which is the libjpeg wrapper - * single thread. - * - * \param package: jpeg encode package - * \return 0 if encoding was successful - * \return -1 if encoding failed - */ -int SWJpegEncoder::swEncode(const EncodePackage& package) { - LOG2("@%s, line:%d, use the libjpeg to do sw jpeg encoding", __func__, __LINE__); - int status = 0; - Codec encoder; - - encoder.init(); - encoder.setJpegQuality(package.quality); - status = encoder.configEncoding(package.inputWidth, package.inputHeight, package.inputStride, - static_cast(mDstBuf), - (package.outputSize - package.exifDataSize)); - const void* uv_buf = - static_cast(package.inputData) + package.inputStride * package.inputHeight; - - if (status) goto exit; - - status = encoder.doJpegEncoding(package.inputData, uv_buf, package.inputFormat); - if (status) goto exit; - -exit: - if (status) - mJpegSize = -1; - else - encoder.getJpegSize(&mJpegSize); - - encoder.deInit(); - - return (status ? -1 : 0); -} - -/** - * encode jpeg by calling the SWJpegEncoder which is the libjpeg wrapper - * multi thread. - * the thread number depends on the CPU number. - * - * \param package: jpeg encode package - * \return 0 if encoding was successful - * \return -1 if encoding failed - */ -int SWJpegEncoder::swEncodeMultiThread(const EncodePackage& package) { - LOG2("@%s, line:%d, use the libjpeg to do sw jpeg encoding", __func__, __LINE__); - int status = 0; - - init(mCPUCoresNum); - config(package); - - status = doJpegEncodingMultiThread(); - if (status) goto exit; - -exit: - mJpegSize = status ? -1 : mergeJpeg(); - deInit(); - - return (status ? -1 : 0); -} - -/** - * Initialize for the multi thread jpeg encoding - * - * it will create n CodecWorkerThread by according to the thread number. - */ -void SWJpegEncoder::init(unsigned int threadNum) { - unsigned int num = CLIP(threadNum, MAX_THREAD_NUM, MIN_THREAD_NUM); - LOG2("@%s, line:%d, thread number, pass:%d, real:%d", __func__, __LINE__, threadNum, num); - - for (unsigned int i = 0; i < num; i++) { - std::shared_ptr codecWorkerThread(new CodecWorkerThread); - mSwJpegEncoder.push_back(codecWorkerThread); - } -} - -/** - * deInit for the multi thread jpeg encoding - * - * it will release all n CodecWorkerThread - */ -void SWJpegEncoder::deInit(void) { - LOG2("@%s, line:%d", __func__, __LINE__); - for (auto& encoder : mSwJpegEncoder) { - encoder.reset(); - } - - mSwJpegEncoder.clear(); -} - -/** - * configue every thread for multi thread jpeg - * - * \param package: jpeg encode package - */ -void SWJpegEncoder::config(const EncodePackage& package) { - LOG2("@%s, line:%d", __func__, __LINE__); - std::shared_ptr encThread; - CodecWorkerThread::CodecConfig cfg; - - for (unsigned int i = 0; i < mSwJpegEncoder.size(); i++) { - cfg.width = package.inputWidth; - /* - for example, there are 4 threads. - the first 3 threads must align to 16 which is NV12_MCU_SIZE - but for the last thread, it doesn't have this request. - */ - cfg.height = ALIGN_16(package.inputHeight / mSwJpegEncoder.size()); - cfg.stride = package.inputStride; - /* - * For NV12 format, Y and UV data are independent, total size is width*height*1.5; - * For YUYV format, Y and UV data are crossing, total size is width*height*2; - * So the inBufY and inBufUV should be distinguished base on format. - */ - cfg.fourcc = package.inputFormat; - cfg.inBufY = - (cfg.fourcc == V4L2_PIX_FMT_YUYV) ? - static_cast(package.inputData) + cfg.stride * cfg.height * 2 * i : - static_cast(package.inputData) + cfg.stride * cfg.height * i; - cfg.inBufUV = - (cfg.fourcc == V4L2_PIX_FMT_NV12 || cfg.fourcc == V4L2_PIX_FMT_NV21) ? - (static_cast(package.inputData) + - package.inputStride * package.inputHeight + cfg.stride * cfg.height * i / 2) : - nullptr; - cfg.quality = package.quality; - cfg.outBufSize = (package.outputSize - package.exifDataSize - DEST_BUF_OFFSET) / - package.inputHeight * cfg.height; - cfg.outBuf = static_cast(mDstBuf) + DEST_BUF_OFFSET + cfg.outBufSize * i; - /* update the last thread's height */ - if (i == mSwJpegEncoder.size() - 1) { - cfg.height = package.inputHeight - cfg.height * (mSwJpegEncoder.size() - 1); - cfg.outBufSize = package.outputSize - package.exifDataSize - DEST_BUF_OFFSET - - cfg.outBufSize * (mSwJpegEncoder.size() - 1); - } - - encThread = mSwJpegEncoder[i]; - encThread->setConfig(cfg); - LOG2("@%s, line:%d, the %d picture thread cfg", __func__, __LINE__, i); - LOG2("@%s, line:%d, cfg.width:%d, cfg.height:%d", __func__, __LINE__, cfg.width, - cfg.height); - LOG2("@%s, line:%d, cfg.fourcc:%d, cfg.quality:%d", __func__, __LINE__, cfg.fourcc, - cfg.quality); - LOG2("@%s, line:%d, cfg.inBufY:%p, cfg.inBufUV:%p", __func__, __LINE__, cfg.inBufY, - cfg.inBufUV); - LOG2("@%s, line:%d, cfg.outBuf:%p, cfg.outBufSize:%d", __func__, __LINE__, cfg.outBuf, - cfg.outBufSize); - } -} - -/** - * the function will trigger the multi jpeg encoding - * - * \return 0 if encoding was successful - * \return -1 if encoding failed - */ -int SWJpegEncoder::doJpegEncodingMultiThread(void) { - LOG2("@%s, line:%d", __func__, __LINE__); - std::shared_ptr encThread; - status_t status = OK; - std::string threadName("CamHAL_SWEncodeMultiThread"); - - /* run all threads */ - for (unsigned int i = 0; i < mSwJpegEncoder.size(); i++) { - threadName = threadName + ":" + std::to_string(i); - LOG2("@%s, new sw jpeg thread name:%s", __func__, threadName.c_str()); - encThread = mSwJpegEncoder[i]; - status = encThread->runThread(threadName.c_str()); - if (status != OK) { - ALOGE("@%s, line:%d, start jpeg thread fail, thread name:%s", __func__, __LINE__, - threadName.c_str()); - return status; - } - } - - /* wait all threads to finish */ - for (unsigned int i = 0; i < mSwJpegEncoder.size(); i++) { - LOG2("@%s, the %d sw jpeg encoder thread before join!", __func__, i); - encThread = mSwJpegEncoder[i]; - encThread->waitThreadFinish(); - if (encThread->getJpegDataSize() == -1) status = UNKNOWN_ERROR; - } - - return status; -} - -/** - * the function will merge all jpeg pictures which are generated in multi threads - * to one jpeg picture - * - * \return int the merged jpeg size - */ -int SWJpegEncoder::mergeJpeg(void) { -#define HEADER_TOTAL_LEN 623 -#define HEADER_SOS_LEN 14 -#define HEADER_EOI_LEN 2 -#define HEADER_HEIGHT_POS 163 -#define HEADER_WIDTH_POS 165 -#define NV12_MCU_SIZE 16 - LOG2("@%s, line:%d", __func__, __LINE__); - int size = HEADER_TOTAL_LEN - HEADER_SOS_LEN; - CodecWorkerThread::CodecConfig cfg; - nsecs_t startTime; - std::shared_ptr encThread = mSwJpegEncoder.at(0); - if (encThread == nullptr) { - ALOGE("encThread is nullptr"); - return -1; - } - encThread->getConfig(&cfg); - - /* Write the JPEG header */ - MEMCPY_S(mDstBuf, size, cfg.outBuf, size); - - /* Update the width and height info */ - mDstBuf[HEADER_HEIGHT_POS] = (mTotalHeight >> 8) & 0xFF; - mDstBuf[HEADER_HEIGHT_POS + 1] = mTotalHeight & 0xFF; - mDstBuf[HEADER_WIDTH_POS] = (mTotalWidth >> 8) & 0xFF; - mDstBuf[HEADER_WIDTH_POS + 1] = mTotalWidth & 0xFF; - - /* Write the restarting interval */ - if (mSwJpegEncoder.size() > 1) { - unsigned int MCUs = (cfg.height / NV12_MCU_SIZE) * (cfg.width / NV12_MCU_SIZE); - mDstBuf[size++] = 0xFF; - mDstBuf[size++] = 0xDD; - mDstBuf[size++] = 0; - mDstBuf[size++] = 4; - mDstBuf[size++] = (MCUs >> 8) & 0xFF; - mDstBuf[size++] = MCUs & 0xFF; - } - - /* Write the SOS */ - MEMCPY_S(reinterpret_cast((unsigned long)mDstBuf + size), HEADER_SOS_LEN, - reinterpret_cast((unsigned long)cfg.outBuf + HEADER_TOTAL_LEN - HEADER_SOS_LEN), - HEADER_SOS_LEN); - size += HEADER_SOS_LEN; - - /* Write coded segments */ - for (unsigned int i = 0; i < mSwJpegEncoder.size(); i++) { - encThread = mSwJpegEncoder[i]; - startTime = CameraUtils::systemTime(); - encThread->getConfig(&cfg); - memmove(reinterpret_cast((unsigned long)mDstBuf + size), - reinterpret_cast((unsigned long)cfg.outBuf + HEADER_TOTAL_LEN), - (encThread->getJpegDataSize() - HEADER_TOTAL_LEN - HEADER_EOI_LEN)); - LOG2("@%s, wr %d segments, size:%d, consume:%ums", __func__, i, - (encThread->getJpegDataSize() - HEADER_TOTAL_LEN - HEADER_EOI_LEN), - (unsigned)((CameraUtils::systemTime() - startTime) / 1000000)); - size += (encThread->getJpegDataSize() - HEADER_TOTAL_LEN - HEADER_EOI_LEN); - - if (i != (mSwJpegEncoder.size() - 1)) { - mDstBuf[size++] = 0xFF; - mDstBuf[size++] = (i & 0x7) | 0xD0; - } - } - - /* Write EOI */ - mDstBuf[size++] = 0xFF; - mDstBuf[size++] = 0xD9; - - return size; -} - -SWJpegEncoder::CodecWorkerThread::CodecWorkerThread() : mDataSize(-1) { - LOG2("@%s, line:%d", __func__, __LINE__); - CLEAR(mCfg); -} - -SWJpegEncoder::CodecWorkerThread::~CodecWorkerThread() { - LOG2("@%s, line:%d", __func__, __LINE__); -} - -/** - * run one thread for multi thread jpeg encoding - * - * \param name: the thread name - */ -status_t SWJpegEncoder::CodecWorkerThread::runThread(const char* name) { - LOG2("@%s, line:%d", __func__, __LINE__); - return this->run(name); -} - -/** - * wait one thread until it has finished - * - */ -void SWJpegEncoder::CodecWorkerThread::waitThreadFinish(void) { - LOG2("@%s, line:%d", __func__, __LINE__); - this->join(); - this->requestExitAndWait(); -} - -/** - * get jpeg size which is done in one thread - * - * \return int the coded jpeg size - */ -int SWJpegEncoder::CodecWorkerThread::getJpegDataSize(void) { - LOG2("@%s, line:%d", __func__, __LINE__); - return mDataSize; -} - -/** - * the thread exe function for one jpeg thread - * when the encoding has been done, it will return false to terminate the thread - * - * \return false - */ -bool SWJpegEncoder::CodecWorkerThread::threadLoop() { - LOG2("@%s, line:%d, in CodecWorkerThread", __func__, __LINE__); - nsecs_t startTime = CameraUtils::systemTime(); - int ret = swEncode(); - LOG2("@%s one swEncode done!, consume:%ums, ret:%d", __func__, - (unsigned)((CameraUtils::systemTime() - startTime) / 1000000), ret); - - return false; -} - -/** - * this function will call the SWJpegEncoder to encode one jpeg. - * it's the main function of the threadLoop - * - * \return 0 if encoding was successful - * \return -1 if encoding failed - */ -int SWJpegEncoder::CodecWorkerThread::swEncode(void) { - LOG2("@%s, line:%d, in CodecWorkerThread", __func__, __LINE__); - int status = 0; - Codec encoder; - - encoder.init(); - encoder.setJpegQuality(mCfg.quality); - status = encoder.configEncoding(mCfg.width, mCfg.height, mCfg.stride, - static_cast(mCfg.outBuf), mCfg.outBufSize); - if (status) goto exit; - - status = encoder.doJpegEncoding(mCfg.inBufY, mCfg.inBufUV, mCfg.fourcc); - if (status) goto exit; - -exit: - if (status) - mDataSize = -1; - else - encoder.getJpegSize(&mDataSize); - - encoder.deInit(); - - return (status ? -1 : 0); -} - -SWJpegEncoder::Codec::Codec() : mStride(-1), mJpegQuality(DEFAULT_JPEG_QUALITY) { - LOG2("@%s", __func__); - CLEAR(mCInfo); - CLEAR(mJErr); -} - -SWJpegEncoder::Codec::~Codec() { - LOG2("@%s", __func__); -} - -/** - * Init the SW jpeg encoder - * - * It will init the libjpeg library - */ -void SWJpegEncoder::Codec::init(void) { - LOG2("@%s", __func__); - CLEAR(mCInfo); - mCInfo.err = jpeg_std_error(&mJErr); - jpeg_create_compress(&mCInfo); -} - -/** - * deInit the SW jpeg encoder - * - * It will deinit the libjpeg library - */ -void SWJpegEncoder::Codec::deInit(void) { - LOG2("@%s", __func__); - jpeg_destroy_compress(&mCInfo); -} - -/** - * Set the jpeg quality - * - * \param quality: one value from 0 to 100 - * - */ -void SWJpegEncoder::Codec::setJpegQuality(int quality) { - LOG2("@%s, quality:%d", __func__, quality); - mJpegQuality = CLIP(quality, 100, 1); -} - -/** - * Config the SW jpeg encoder. - * - * mainly, it will set the destination buffer manager, color space, quality. - * - * \param width: the width of the jpeg dimentions. - * \param height: the height of the jpeg dimentions. - * \param jpegBuf: the dest buffer to store the jpeg data - * \param jpegBufSize: the size of jpegBuf buffer - * - * \return 0 if the configuration is right. - * \return -1 if the configuration fails. - */ -int SWJpegEncoder::Codec::configEncoding(int width, int height, int stride, void* jpegBuf, - int jpegBufSize) { - LOG2("@%s", __func__); - - mStride = stride; - mCInfo.input_components = 3; - mCInfo.in_color_space = (J_COLOR_SPACE)SUPPORTED_FORMAT; - mCInfo.image_width = width; - mCInfo.image_height = height; - - if (setupJpegDestMgr(&mCInfo, static_cast(jpegBuf), jpegBufSize) < 0) { - ALOGE("@%s, line:%d, setupJpegDestMgr fail", __func__, __LINE__); - return -1; - } - - jpeg_set_defaults(&mCInfo); - jpeg_set_colorspace(&mCInfo, (J_COLOR_SPACE)SUPPORTED_FORMAT); - jpeg_set_quality(&mCInfo, mJpegQuality, TRUE); - mCInfo.raw_data_in = TRUE; - mCInfo.dct_method = JDCT_ISLOW; - mCInfo.comp_info[0].h_samp_factor = 2; - mCInfo.comp_info[0].v_samp_factor = 2; - mCInfo.comp_info[1].h_samp_factor = 1; - mCInfo.comp_info[1].v_samp_factor = 1; - mCInfo.comp_info[2].h_samp_factor = 1; - mCInfo.comp_info[2].v_samp_factor = 1; - jpeg_start_compress(&mCInfo, TRUE); - - return 0; -} - -/** - * Do the SW jpeg encoding. - * - * it will convert the YUV data to P411 and then do jpeg encoding. - * - * \param y_buf: the source buffer for Y data - * \param uv_buf: the source buffer for UV data, - * \it could be nullptr if fourcc is V4L2_PIX_FMT_YUYV - * \return 0 if the encoding is successful. - * \return -1 if the encoding fails. - */ -int SWJpegEncoder::Codec::doJpegEncoding(const void* y_buf, const void* uv_buf, int fourcc) { - LOG2("@%s", __func__); - - unsigned char* srcY = nullptr; - unsigned char* srcUV = nullptr; - unsigned char* p411 = nullptr; - JSAMPROW y[16], u[16], v[16]; - JSAMPARRAY data[3]; - int i, j, width, height; - - width = mCInfo.image_width; - height = mCInfo.image_height; - srcY = (unsigned char*)y_buf; - srcUV = (unsigned char*)uv_buf; - p411 = new unsigned char[width * height * 3 / 2]; - - switch (fourcc) { - case V4L2_PIX_FMT_YUYV: - ImageConverter::YUY2ToP411(width, height, mStride, srcY, p411); - break; - case V4L2_PIX_FMT_NV12: - ImageConverter::NV12ToP411Separate(width, height, mStride, srcY, srcUV, p411); - break; - case V4L2_PIX_FMT_NV21: - ImageConverter::NV21ToP411Separate(width, height, mStride, srcY, srcUV, p411); - break; - default: - ALOGE("%s Unsupported fourcc %d", __func__, fourcc); - delete[] p411; - return -1; - } - - data[0] = y; - data[1] = u; - data[2] = v; - for (i = 0; i < height; i += 16) { - for (j = 0; j < 16 && (i + j) < height; j++) { - y[j] = p411 + width * (j + i); - if (j % 2 == 0) { - u[j / 2] = p411 + width * height + width / 2 * ((j + i) / 2); - v[j / 2] = p411 + width * height + width * height / 4 + width / 2 * ((j + i) / 2); - } - } - jpeg_write_raw_data(&mCInfo, data, 16); - } - - jpeg_finish_compress(&mCInfo); - - delete[] p411; - p411 = nullptr; - - return 0; -} - -/** - * Get the jpeg size. - * - * \param jpegSize: get the real jpeg size, it will be -1, if encoding fails - */ -void SWJpegEncoder::Codec::getJpegSize(int* jpegSize) { - LOG2("@%s", __func__); - - JpegDestMgrPtr dest = (JpegDestMgrPtr)mCInfo.dest; - - *jpegSize = (false == dest->encodeSuccess) ? -1 : dest->codedSize; -} - -/** - * Setup the jpeg destination buffer manager - * - * it will convert the YUV data to P411 and then do jpeg encoding. - * - * \param cInfo: the compress pointer - * \param jpegBuf: the buffer pointer for jpeg data - * \param jpegBufSize: the jpegBuf buffer's size - * \return 0 if it's successful. - * \return -1 if it fails. - */ -int SWJpegEncoder::Codec::setupJpegDestMgr(j_compress_ptr cInfo, JSAMPLE* jpegBuf, - int jpegBufSize) { - LOG2("@%s", __func__); - JpegDestMgrPtr dest; - - if (nullptr == jpegBuf || jpegBufSize <= 0) { - ALOGE("@%s, line:%d, jpegBuf:%p, jpegBufSize:%d", __func__, __LINE__, jpegBuf, jpegBufSize); - return -1; - } - - if (cInfo->dest == nullptr) { - cInfo->dest = (struct jpeg_destination_mgr*)(*cInfo->mem->alloc_small)( - (j_common_ptr)cInfo, JPOOL_PERMANENT, sizeof(JpegDestMgr)); - CLEAR(*cInfo->dest); - } - dest = (JpegDestMgrPtr)cInfo->dest; - - dest->pub.init_destination = initDestination; - dest->pub.empty_output_buffer = emptyOutputBuffer; - dest->pub.term_destination = termDestination; - dest->outJpegBuf = jpegBuf; - dest->outJpegBufSize = jpegBufSize; - - return 0; -} - -/** - * Init the destination - * - * It's the first function which be called - * among initDestination, emptyOutputBuffer and termDestination - * - * \param cInfo: the compress pointer - */ -void SWJpegEncoder::Codec::initDestination(j_compress_ptr cInfo) { - LOG2("@%s", __func__); - JpegDestMgrPtr dest = (JpegDestMgrPtr)cInfo->dest; - - dest->pub.next_output_byte = dest->outJpegBuf; - dest->pub.free_in_buffer = dest->outJpegBufSize; - dest->encodeSuccess = true; -} - -/** - * Empty the output buffer - * - * The function should not be called, - * because we should allocate enough memory for the jpeg destination buffer - * If we return FALSE, the libjpeg will terminate, so return TRUE always. - * But when the function is called, the encoding failing will be recorded. - * - * \param cInfo: the compress pointer - * \return TRUE if it is successful. - * \return FALSE if something is wrong - */ -boolean SWJpegEncoder::Codec::emptyOutputBuffer(j_compress_ptr cInfo) { - LOG2("@%s", __func__); - ALOGE("@%s, line:%d, buffer overflow!", __func__, __LINE__); - JpegDestMgrPtr dest = (JpegDestMgrPtr)cInfo->dest; - - /* re-cfg the buffer info */ - dest->pub.next_output_byte = dest->outJpegBuf; - dest->pub.free_in_buffer = dest->outJpegBufSize; - dest->encodeSuccess = false; - - return TRUE; /* if return FALSE, the total taking picture will fail */ -} - -/** - * Terminate the destination - * - * The function will be called as the last function, - * among initDestination, emptyOutputBuffer and termDestination. - * We can get the encoded jpeg size from it. - * - * \param cInfo: the compress pointer - */ -void SWJpegEncoder::Codec::termDestination(j_compress_ptr cInfo) { - LOG2("@%s", __func__); - JpegDestMgrPtr dest = (JpegDestMgrPtr)cInfo->dest; - - dest->codedSize = dest->outJpegBufSize - dest->pub.free_in_buffer; - LOG2("@%s, line:%d, codedSize:%d", __func__, __LINE__, dest->codedSize); -} - -} // namespace icamera diff --git a/src/jpeg/sw/SWJpegEncoder.h b/src/jpeg/sw/SWJpegEncoder.h deleted file mode 100644 index 170dfdbb..00000000 --- a/src/jpeg/sw/SWJpegEncoder.h +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * Copyright (C) 2016-2020 Intel Corporation. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - *\file SWJpegEncoder.h - * - * Abstracts the SW jpeg encoder - * - * This class calls the libjpeg ditectly. And libskia's performance is poor. - * The SW jpeg encoder is used for the thumbnail encoding mainly. - * But When the HW jpeg encoding fails, it will use the SW jpeg encoder also. - * - */ - -#pragma once - -#include -#include - -#include - -#include "IJpegEncoder.h" -#include "iutils/Errors.h" -#include "iutils/Thread.h" -#include "iutils/Utils.h" - -#ifdef __cplusplus -extern "C" { -#endif -#include "jpeglib.h" -#ifdef __cplusplus -} -#endif - -namespace icamera { - -/** - * \class SWJpegEncoder - * - * This class is used for sw jpeg encoder. - * It will use single or multi thread to do the sw jpeg encoding - * It just support NV12 input currently. - */ -class SWJpegEncoder : public IJpegEncoder { - public: - SWJpegEncoder(); - ~SWJpegEncoder(); - - virtual bool doJpegEncode(EncodePackage* package); - - private: - // prevent copy constructor and assignment operator - DISALLOW_COPY_AND_ASSIGN(SWJpegEncoder); - - private: - bool useMultiThreadEncoding(int width, int height); - int swEncode(const EncodePackage& package); - int swEncodeMultiThread(const EncodePackage& package); - - int mJpegSize; /*!< it's used to store jpeg size */ - int mTotalWidth; /*!< the final jpeg width */ - int mTotalHeight; /*!< the final jpeg height */ - unsigned char* mDstBuf; /*!< the dest buffer to store the final jpeg */ - unsigned int mCPUCoresNum; /*!< use to remember the CPU Cores number */ - - private: - /** - * \class CodecWorkerThread - * - * This class will create one thread to do one sw jpeg encoder. - * It will call the SWJpegEncoderWrapper directly. - */ - class CodecWorkerThread : public Thread { - public: - struct CodecConfig { - // input buffer configuration - int width; - int height; - int stride; - int fourcc; - void* inBufY; - void* inBufUV; - // output buffer configuration - int quality; - void* outBuf; - int outBufSize; - }; - - CodecWorkerThread(); - ~CodecWorkerThread(); - - void setConfig(const CodecConfig& cfg) { mCfg = cfg; } - void getConfig(CodecConfig* cfg) const { *cfg = mCfg; } - status_t runThread(const char* name); - void waitThreadFinish(void); - int getJpegDataSize(void); - - private: - int mDataSize; /*!< the jpeg data size in one thread */ - CodecConfig mCfg; /*!< the cfg in one thread */ - private: - virtual bool threadLoop(); - int swEncode(void); - }; - - private: - void init(unsigned int threadNum = 1); - void deInit(void); - void config(const EncodePackage& package); - int doJpegEncodingMultiThread(void); - int mergeJpeg(void); - - std::vector > mSwJpegEncoder; - static const unsigned int MAX_THREAD_NUM = 8; /*!< the same as max jpeg restart time */ - static const unsigned int MIN_THREAD_NUM = 1; - - /*!< it's used to use one buffer to merge the multi jpeg data to one jpeg data */ - static const unsigned int DEST_BUF_OFFSET = 1024; - - private: - /** - * \class Codec - * - * This class is used for sw jpeg encoder. - * It will call the libjpeg directly. - * It just support NV12 input currently. - */ - class Codec { - public: - Codec(); - ~Codec(); - - void init(void); - void deInit(void); - void setJpegQuality(int quality); - int configEncoding(int width, int height, int stride, void* jpegBuf, int jpegBufSize); - /* - if fourcc is V4L2_PIX_FMT_NV12, y_buf and uv_buf must be passed - if fourcc is V4L2_PIX_FMT_YUYV, y_buf must be passed, uv_buf could be nullptr - */ - int doJpegEncoding(const void* y_buf, const void* uv_buf = nullptr, - int fourcc = V4L2_PIX_FMT_NV12); - void getJpegSize(int* jpegSize); - - private: - // prevent copy constructor and assignment operator - DISALLOW_COPY_AND_ASSIGN(Codec); - - private: - typedef struct { - struct jpeg_destination_mgr pub; - JSAMPLE* outJpegBuf; /*!< jpeg output buffer */ - int outJpegBufSize; /*!< jpeg output buffer size */ - int codedSize; /*!< the final encoded out jpeg size */ - bool encodeSuccess; /*!< if buffer overflow, it will be set to false */ - } JpegDestMgr, *JpegDestMgrPtr; - - int mStride; - struct jpeg_compress_struct mCInfo; - struct jpeg_error_mgr mJErr; - int mJpegQuality; - static const unsigned int SUPPORTED_FORMAT = JCS_YCbCr; - - int setupJpegDestMgr(j_compress_ptr cInfo, JSAMPLE* jpegBuf, int jpegBufSize); - // the below three functions are for the dest buffer manager. - static void initDestination(j_compress_ptr cInfo); - static boolean emptyOutputBuffer(j_compress_ptr cInfo); - static void termDestination(j_compress_ptr cInfo); - }; -}; - -} // namespace icamera diff --git a/src/metadata/ParameterGenerator.cpp b/src/metadata/ParameterGenerator.cpp index 146471f3..3b9dc87a 100644 --- a/src/metadata/ParameterGenerator.cpp +++ b/src/metadata/ParameterGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ #include +#include #include #include @@ -39,6 +40,7 @@ namespace icamera { ParameterGenerator::ParameterGenerator(int cameraId) : mCameraId(cameraId), + mCallback(nullptr), mTonemapMaxCurvePoints(0) { reset(); @@ -66,6 +68,8 @@ ParameterGenerator::ParameterGenerator(int cameraId) mTonemapCurveGreen[i * 2 + 1] = index / (mTonemapMaxCurvePoints - 1); } } + CLEAR(mSensitivityRange); + info.capability->getSupportedSensorSensitivityRange(mSensitivityRange); } ParameterGenerator::~ParameterGenerator() {} @@ -79,34 +83,44 @@ int ParameterGenerator::reset() { return OK; } -int ParameterGenerator::saveParameters(int64_t sequence, long requestId, const Parameters* param) { +std::shared_ptr ParameterGenerator::getRequestParamBuf() { + AutoMutex l(mParamsLock); + + if (mRequestParamMap.size() < kStorageSize) { + return std::make_shared(); + } + + auto it = mRequestParamMap.begin(); + std::shared_ptr requestParam = it->second; + mRequestParamMap.erase(it->first); + + return requestParam; +} + +int ParameterGenerator::saveParameters(int64_t sequence, long requestId, + std::shared_ptr requestParam) { CHECK_REQUEST_ID(requestId); CHECK_SEQUENCE(sequence); AutoMutex l(mParamsLock); - if (param) mLastParam = *param; + if (!requestParam && mRequestParamMap.empty()) return BAD_VALUE; - LOG2("%s", requestId, sequence, __func__); - std::shared_ptr requestParam = nullptr; - if (mRequestParamMap.size() < kStorageSize) { + if (!requestParam) { requestParam = std::make_shared(); - } else { - auto it = mRequestParamMap.begin(); - requestParam = it->second; - mRequestParamMap.erase(it->first); + requestParam->param = mRequestParamMap.rbegin()->second->param; } - requestParam->requestId = requestId; - requestParam->param = mLastParam; - mRequestParamMap[sequence] = requestParam; + + LOG2("%s", requestParam->requestId, sequence, __func__); + return OK; } void ParameterGenerator::updateParameters(int64_t sequence, const Parameters* param) { CheckAndLogError(!param, VOID_VALUE, "The param is nullptr!"); - LOG2("%s, sequence %ld", sequence, __func__); + LOG2("%s", sequence, __func__); AutoMutex l(mParamsLock); std::shared_ptr requestParam = nullptr; @@ -180,16 +194,18 @@ int ParameterGenerator::getParameters(int64_t sequence, Parameters* param, bool if (setting) { AutoMutex l(mParamsLock); - if (sequence < 0) { - *param = mLastParam; - } else { - // Find nearest parameter - // The sequence of parameter should <= sequence - auto it = mRequestParamMap.upper_bound(sequence); - if (it == mRequestParamMap.begin()) { - LOGE("Can't find settings for seq %ld", sequence); + if (!mRequestParamMap.empty()) { + if (sequence < 0) { + *param = mRequestParamMap.rbegin()->second->param; } else { - *param = (--it)->second->param; + // Find nearest parameter + // The sequence of parameter should <= sequence + auto it = mRequestParamMap.upper_bound(sequence); + if (it == mRequestParamMap.begin()) { + LOGE("Can't find settings for seq %ld", sequence); + } else { + *param = (--it)->second->param; + } } } } @@ -200,6 +216,71 @@ int ParameterGenerator::getParameters(int64_t sequence, Parameters* param, bool return OK; } +int ParameterGenerator::getIspParameters(int64_t sequence, Parameters* param) { + CheckAndLogError((param == nullptr), UNKNOWN_ERROR, "nullptr to get param!"); + CHECK_SEQUENCE(sequence); + + AutoMutex l(mParamsLock); + if (mRequestParamMap.find(sequence) != mRequestParamMap.end()) { + camera_image_enhancement_t enhancement; + int ret = mRequestParamMap[sequence]->param.getImageEnhancement(enhancement); + if (ret == OK) { + param->setImageEnhancement(enhancement); + } + camera_edge_mode_t edgeMode; + ret = mRequestParamMap[sequence]->param.getEdgeMode(edgeMode); + if (ret == OK) { + param->setEdgeMode(edgeMode); + } + camera_nr_mode_t nrMode; + ret = mRequestParamMap[sequence]->param.getNrMode(nrMode); + if (ret == OK) { + param->setNrMode(nrMode); + } + camera_nr_level_t nrLevel; + ret = mRequestParamMap[sequence]->param.getNrLevel(nrLevel); + if (ret == OK) { + param->setNrLevel(nrLevel); + } + camera_video_stabilization_mode_t stabilizationMode; + ret = mRequestParamMap[sequence]->param.getVideoStabilizationMode(stabilizationMode); + if (ret == OK) { + param->setVideoStabilizationMode(stabilizationMode); + } + float hdrRatio; + ret = mRequestParamMap[sequence]->param.getHdrRatio(hdrRatio); + if (ret == OK) { + param->setHdrRatio(hdrRatio); + } + + return OK; + } + + return UNKNOWN_ERROR; +} + +int ParameterGenerator::getZoomRegion(int64_t sequence, camera_zoom_region_t& region) { + CHECK_SEQUENCE(sequence); + + AutoMutex l(mParamsLock); + if (mRequestParamMap.find(sequence) != mRequestParamMap.end()) { + return mRequestParamMap[sequence]->param.getZoomRegion(®ion); + } + + return UNKNOWN_ERROR; +} + +int ParameterGenerator::getRawOutputMode(int64_t sequence, raw_data_output_t& rawOutputMode) { + CHECK_SEQUENCE(sequence); + + AutoMutex l(mParamsLock); + if (mRequestParamMap.find(sequence) != mRequestParamMap.end()) { + return mRequestParamMap[sequence]->param.getRawDataOutput(rawOutputMode); + } + + return UNKNOWN_ERROR; +} + int ParameterGenerator::getUserRequestId(int64_t sequence, int32_t& userRequestId) { CHECK_SEQUENCE(sequence); @@ -226,7 +307,6 @@ int ParameterGenerator::getRequestId(int64_t sequence, long& requestId) { int ParameterGenerator::generateParametersL(int64_t sequence, Parameters* params) { if (PlatformData::isEnableAIQ(mCameraId)) { updateWithAiqResultsL(sequence, params); - updateTonemapCurve(sequence, params); } return OK; } @@ -241,13 +321,25 @@ int ParameterGenerator::updateWithAiqResultsL(int64_t sequence, Parameters* para aiqResult->mAeResults.exposures[0].converged ? AE_STATE_CONVERGED : AE_STATE_NOT_CONVERGED; params->setAeState(aeState); - if (CameraUtils::isMultiExposureCase(mCameraId, aiqResult->mTuningMode) && + if (PlatformData::isMultiExposureCase(mCameraId, aiqResult->mTuningMode) && aiqResult->mAeResults.num_exposures > 1) { params->setExposureTime(aiqResult->mAeResults.exposures[1].exposure[0].exposure_time_us); } else { params->setExposureTime(aiqResult->mAeResults.exposures[0].exposure[0].exposure_time_us); } - params->setSensitivityIso(aiqResult->mAeResults.exposures[0].exposure[0].iso); + + int iso = aiqResult->mAeResults.exposures[0].exposure[0].iso; + SensitivityRange range; + if (PlatformData::getSensitivityRangeByTuningMode(mCameraId, aiqResult->mTuningMode, + range) == OK) { + float ratio = static_cast(iso - range.min) / (range.max - range.min); + iso = mSensitivityRange.min + ratio * (mSensitivityRange.max - mSensitivityRange.min); + iso = CLIP(iso, mSensitivityRange.max, mSensitivityRange.min); + LOG2("%s, exposure[0].iso %d, iso %d", __func__, + aiqResult->mAeResults.exposures[0].exposure[0].iso, iso); + } + params->setSensitivityIso(iso); + float fps = 1000000.0 / aiqResult->mFrameDuration; params->setFrameRate(fps); @@ -371,32 +463,6 @@ int ParameterGenerator::updateCcmL(Parameters* params, const AiqResult* aiqResul return OK; } -int ParameterGenerator::updateTonemapCurve(int64_t sequence, Parameters* params) { - if (!mTonemapMaxCurvePoints) return OK; - - const AiqResult* aiqResult = AiqResultStorage::getInstance(mCameraId)->getAiqResult(sequence); - CheckAndLogError((aiqResult == nullptr), UNKNOWN_ERROR, - "%s Aiq result of sequence %ld does not exist", __func__, sequence); - const cca::cca_gbce_params& gbceResults = aiqResult->mGbceResults; - - int multiplier = gbceResults.gamma_lut_size / mTonemapMaxCurvePoints; - for (int32_t i = 0; i < mTonemapMaxCurvePoints; i++) { - mTonemapCurveRed[i * 2 + 1] = gbceResults.r_gamma_lut[i * multiplier]; - mTonemapCurveBlue[i * 2 + 1] = gbceResults.g_gamma_lut[i * multiplier]; - mTonemapCurveGreen[i * 2 + 1] = gbceResults.b_gamma_lut[i * multiplier]; - } - - int count = mTonemapMaxCurvePoints * 2; - camera_tonemap_curves_t curves = {count, - count, - count, - mTonemapCurveRed.get(), - mTonemapCurveBlue.get(), - mTonemapCurveGreen.get()}; - params->setTonemapCurves(curves); - return OK; -} - int ParameterGenerator::updateCommonMetadata(Parameters* params, const AiqResult* aiqResult) { icamera_metadata_ro_entry entry; CLEAR(entry); @@ -414,12 +480,42 @@ int ParameterGenerator::updateCommonMetadata(Parameters* params, const AiqResult entry.data.i64 = &frameDuration; ParameterHelper::mergeTag(entry, params); + uint8_t sensorMode = (aiqResult->mTuningMode == TUNING_MODE_VIDEO_BINNING) ? + INTEL_VENDOR_CAMERA_SENSOR_MODE_BINNING : INTEL_VENDOR_CAMERA_SENSOR_MODE_FULL; + entry.tag = INTEL_VENDOR_CAMERA_SENSOR_MODE; + entry.type = ICAMERA_TYPE_BYTE; + entry.count = 1; + entry.data.u8 = &sensorMode; + ParameterHelper::mergeTag(entry, params); + + int32_t isoRange[2]; + SensitivityRange range; + if (PlatformData::getSensitivityRangeByTuningMode(mCameraId, aiqResult->mTuningMode, + range) == OK) { + isoRange[0] = range.min; + isoRange[1] = range.max; + } else { + isoRange[0] = static_cast(mSensitivityRange.min); + isoRange[1] = static_cast(mSensitivityRange.max); + } + LOG2("%s, sensitivity range [%d-%d]", __func__, isoRange[0], isoRange[1]); + entry.tag = INTEL_VENDOR_CAMERA_SENSITIVITY_RANGE; + entry.type = ICAMERA_TYPE_INT32; + entry.count = 2; + entry.data.i32 = isoRange; + ParameterHelper::mergeTag(entry, params); + + int32_t userRequestId = 0; + params->getUserRequestId(userRequestId); + camera_msg_data_t data = {CAMERA_METADATA_ENTRY, {}}; + data.data.metadata_entry.frameNumber = userRequestId; + bool callbackRgbs = false; params->getCallbackRgbs(&callbackRgbs); if (callbackRgbs) { - int32_t width = aiqResult->mOutStats.rgbs_grid.grid_width; - int32_t height = aiqResult->mOutStats.rgbs_grid.grid_height; + int32_t width = aiqResult->mOutStats.rgbs_grid[0].grid_width; + int32_t height = aiqResult->mOutStats.rgbs_grid[0].grid_height; int32_t gridSize[] = {width, height}; entry.tag = INTEL_VENDOR_CAMERA_RGBS_GRID_SIZE; entry.type = ICAMERA_TYPE_INT32; @@ -427,17 +523,17 @@ int ParameterGenerator::updateCommonMetadata(Parameters* params, const AiqResult entry.data.i32 = gridSize; ParameterHelper::mergeTag(entry, params); - uint8_t lscFlags = aiqResult->mOutStats.rgbs_grid.shading_correction; + uint8_t lscFlags = aiqResult->mOutStats.rgbs_grid[0].shading_correction; entry.tag = INTEL_VENDOR_CAMERA_SHADING_CORRECTION; entry.type = ICAMERA_TYPE_BYTE; entry.count = 1; entry.data.u8 = &lscFlags; ParameterHelper::mergeTag(entry, params); - if (Log::isLogTagEnabled(ST_STATS)) { + if (Log::isLogTagEnabled(ST_STATS, CAMERA_DEBUG_LOG_LEVEL2)) { const cca::cca_out_stats* outStats = &aiqResult->mOutStats; - const rgbs_grid_block* rgbsPtr = aiqResult->mOutStats.rgbs_blocks; - int size = outStats->rgbs_grid.grid_width * outStats->rgbs_grid.grid_height; + const rgbs_grid_block* rgbsPtr = aiqResult->mOutStats.rgbs_blocks[0]; + int size = outStats->rgbs_grid[0].grid_width * outStats->rgbs_grid[0].grid_height; int sumLuma = 0; for (int j = 0; j < size; j++) { @@ -447,21 +543,29 @@ int ParameterGenerator::updateCommonMetadata(Parameters* params, const AiqResult } LOG2(ST_STATS, "RGB stat %dx%d, sequence %lld, y_mean %d", - outStats->rgbs_grid.grid_width, outStats->rgbs_grid.grid_height, + outStats->rgbs_grid[0].grid_width, outStats->rgbs_grid[0].grid_height, aiqResult->mSequence, size > 0 ? sumLuma / size : 0); } - entry.tag = INTEL_VENDOR_CAMERA_RGBS_STATS_BLOCKS; - entry.type = ICAMERA_TYPE_BYTE; - entry.count = width * height * 5; - entry.data.u8 = reinterpret_cast(aiqResult->mOutStats.rgbs_blocks); - ParameterHelper::mergeTag(entry, params); + if (mCallback) { + data.data.metadata_entry.tag = INTEL_VENDOR_CAMERA_RGBS_STATS_BLOCKS; + data.data.metadata_entry.count = width * height * 5; + data.data.metadata_entry.data.u8 = + reinterpret_cast(aiqResult->mOutStats.rgbs_blocks[0]); + mCallback->notify(mCallback, data); + } else { + entry.tag = INTEL_VENDOR_CAMERA_RGBS_STATS_BLOCKS; + entry.type = ICAMERA_TYPE_BYTE; + entry.count = width * height * 5; + entry.data.u8 = reinterpret_cast(aiqResult->mOutStats.rgbs_blocks[0]); + ParameterHelper::mergeTag(entry, params); + } } if (aiqResult->mAiqParam.manualExpTimeUs <= 0 && aiqResult->mAiqParam.manualIso <= 0) { int64_t range[] = {aiqResult->mAeResults.exposures[0].exposure[0].low_limit_total_exposure, aiqResult->mAeResults.exposures[0].exposure[0].up_limit_total_exposure}; - LOG2("total et limits [%ldx%ld]", range[0], range[1]); + LOG2("total et limits [%ld-%ld]", range[0], range[1]); entry.tag = INTEL_VENDOR_CAMERA_TOTAL_EXPOSURE_TARGET_RANGE; entry.type = ICAMERA_TYPE_INT64; entry.count = 2; @@ -469,6 +573,38 @@ int ParameterGenerator::updateCommonMetadata(Parameters* params, const AiqResult ParameterHelper::mergeTag(entry, params); } + if (aiqResult->mAnalogGainRange[0] > 0.0 && aiqResult->mAnalogGainRange[1] > 0.0) { + LOG2("analog gain range is [%f-%f]", aiqResult->mAnalogGainRange[0], + aiqResult->mAnalogGainRange[1]); + entry.tag = INTEL_VENDOR_CAMERA_ANALOG_GAIN_RANGE; + entry.type = ICAMERA_TYPE_FLOAT; + entry.count = 2; + entry.data.f = aiqResult->mAnalogGainRange; + ParameterHelper::mergeTag(entry, params); + } + + if (aiqResult->mDigitalGainRange[0] > 0.0 && aiqResult->mDigitalGainRange[1] > 0.0) { + LOG2("digital gain range is [%f-%f]", aiqResult->mDigitalGainRange[0], + aiqResult->mDigitalGainRange[1]); + entry.tag = INTEL_VENDOR_CAMERA_DIGITAL_GAIN_RANGE; + entry.type = ICAMERA_TYPE_FLOAT; + entry.count = 2; + entry.data.f = aiqResult->mDigitalGainRange; + ParameterHelper::mergeTag(entry, params); + } + + entry.tag = INTEL_VENDOR_CAMERA_ANALOG_GAIN; + entry.type = ICAMERA_TYPE_FLOAT; + entry.count = 1; + entry.data.f = &aiqResult->mAeResults.exposures[0].exposure[0].analog_gain; + ParameterHelper::mergeTag(entry, params); + + entry.tag = INTEL_VENDOR_CAMERA_DIGITAL_GAIN; + entry.type = ICAMERA_TYPE_FLOAT; + entry.count = 1; + entry.data.f = &aiqResult->mAeResults.exposures[0].exposure[0].digital_gain;; + ParameterHelper::mergeTag(entry, params); + bool callbackTmCurve = false; params->getCallbackTmCurve(&callbackTmCurve); @@ -481,11 +617,53 @@ int ParameterGenerator::updateCommonMetadata(Parameters* params, const AiqResult tmCurve[i * 2] = static_cast(i) / (mTonemapMaxCurvePoints - 1); tmCurve[i * 2 + 1] = gbceResults.tone_map_lut[i * multiplier]; } - entry.tag = INTEL_VENDOR_CAMERA_TONE_MAP_CURVE; - entry.type = ICAMERA_TYPE_FLOAT; - entry.count = tmCurve.size(); - entry.data.f = tmCurve.data(); - ParameterHelper::mergeTag(entry, params); + + if (mCallback) { + data.data.metadata_entry.tag = INTEL_VENDOR_CAMERA_TONE_MAP_CURVE; + data.data.metadata_entry.count = tmCurve.size(); + data.data.metadata_entry.data.f = tmCurve.data(); + mCallback->notify(mCallback, data); + } else { + entry.tag = INTEL_VENDOR_CAMERA_TONE_MAP_CURVE; + entry.type = ICAMERA_TYPE_FLOAT; + entry.count = tmCurve.size(); + entry.data.f = tmCurve.data(); + ParameterHelper::mergeTag(entry, params); + } + } + + if (mTonemapMaxCurvePoints) { + const cca::cca_gbce_params& gbceResults = aiqResult->mGbceResults; + + int multiplier = gbceResults.gamma_lut_size / mTonemapMaxCurvePoints; + for (int32_t i = 0; i < mTonemapMaxCurvePoints; i++) { + mTonemapCurveRed[i * 2 + 1] = gbceResults.r_gamma_lut[i * multiplier]; + mTonemapCurveBlue[i * 2 + 1] = gbceResults.g_gamma_lut[i * multiplier]; + mTonemapCurveGreen[i * 2 + 1] = gbceResults.b_gamma_lut[i * multiplier]; + } + + int count = mTonemapMaxCurvePoints * 2; + camera_tonemap_curves_t curves = {count, count, count, mTonemapCurveRed.get(), + mTonemapCurveBlue.get(), mTonemapCurveGreen.get()}; + + if (mCallback) { + data.data.metadata_entry.tag = CAMERA_TONEMAP_CURVE_RED; + data.data.metadata_entry.count = count; + data.data.metadata_entry.data.f = mTonemapCurveRed.get(); + mCallback->notify(mCallback, data); + + data.data.metadata_entry.tag = CAMERA_TONEMAP_CURVE_BLUE; + data.data.metadata_entry.count = count; + data.data.metadata_entry.data.f = mTonemapCurveBlue.get(); + mCallback->notify(mCallback, data); + + data.data.metadata_entry.tag = CAMERA_TONEMAP_CURVE_GREEN; + data.data.metadata_entry.count = count; + data.data.metadata_entry.data.f = mTonemapCurveGreen.get(); + mCallback->notify(mCallback, data); + } else { + params->setTonemapCurves(curves); + } } return OK; diff --git a/src/metadata/ParameterGenerator.h b/src/metadata/ParameterGenerator.h index bdb2c360..41e41a39 100644 --- a/src/metadata/ParameterGenerator.h +++ b/src/metadata/ParameterGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,20 @@ namespace icamera { +class RequestParam { + public: + RequestParam() : requestId(-1) {} + + ~RequestParam() {} + + long requestId; + Parameters param; + + private: + RequestParam(const RequestParam& other); + RequestParam& operator=(const RequestParam& other); +}; + /* * \class ParameterGenerator * This class is used to generator parameter results. It updates the parameters @@ -40,17 +54,25 @@ class ParameterGenerator { * \brief reset the parameters data. */ int reset(); + void callbackRegister(const camera_callback_ops_t* callback) { + mCallback = const_cast(callback); + } /** * \brief Save parameters with sequence id indicating the active frame. * And update the aiq result parameters as well. */ - int saveParameters(int64_t predictSequence, long requestId, const Parameters* param = nullptr); + int saveParameters(int64_t sequence, long requestId, + std::shared_ptr requestParam = nullptr); + std::shared_ptr getRequestParamBuf(); /** * \brief Update parameters per sequence id. */ void updateParameters(int64_t sequence, const Parameters* param); + int getIspParameters(int64_t sequence, Parameters* param); + int getRawOutputMode(int64_t sequence, raw_data_output_t& rawOutputMode); + int getZoomRegion(int64_t sequence, camera_zoom_region_t& region); int getUserRequestId(int64_t sequence, int32_t& userRequestId); /** @@ -67,34 +89,18 @@ class ParameterGenerator { int updateWithAiqResultsL(int64_t sequence, Parameters* params); int updateAwbGainsL(Parameters* params, const cca::cca_awb_results& result); int updateCcmL(Parameters* params, const AiqResult* aiqResult); - int updateTonemapCurve(int64_t sequence, Parameters* params); int updateCommonMetadata(Parameters* params, const AiqResult* aiqResult); - private: - class RequestParam { - public: - RequestParam() : requestId(-1) {} - - ~RequestParam() {} - - long requestId; - Parameters param; - - private: - RequestParam(const RequestParam& other); - RequestParam& operator=(const RequestParam& other); - }; - private: int mCameraId; + camera_callback_ops_t* mCallback; static const int kStorageSize = MAX_SETTING_COUNT; // Guard for ParameterGenerator public API. Mutex mParamsLock; // first: sequence id, second: RequestParam data std::map > mRequestParamMap; - Parameters mLastParam; std::unique_ptr mTonemapCurveRed; std::unique_ptr mTonemapCurveBlue; @@ -102,6 +108,7 @@ class ParameterGenerator { int32_t mTonemapMaxCurvePoints; camera_color_transform_t mPaCcm; + camera_range_t mSensitivityRange; }; } /* namespace icamera */ diff --git a/src/metadata/Parameters.cpp b/src/metadata/Parameters.cpp index bc53f01b..20c0f896 100644 --- a/src/metadata/Parameters.cpp +++ b/src/metadata/Parameters.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ #include "iutils/CameraDump.h" #include "iutils/Utils.h" -#include "PlatformData.h" #include "Parameters.h" #include "ParameterHelper.h" @@ -528,6 +527,24 @@ int Parameters::getIrisLevel(int& level) { return OK; } +// HDR_FEATURE_S +int Parameters::setWdrMode(camera_wdr_mode_t wdrMode) { + uint8_t mode = wdrMode; + ParameterHelper::AutoWLock wl(mData); + return ParameterHelper::getMetadata(mData).update(INTEL_CONTROL_WDR_MODE, &mode, 1); +} + +int Parameters::getWdrMode(camera_wdr_mode_t& wdrMode) const { + ParameterHelper::AutoRLock rl(mData); + auto entry = ParameterHelper::getMetadataEntry(mData, INTEL_CONTROL_WDR_MODE); + if (entry.count != 1) { + return NAME_NOT_FOUND; + } + wdrMode = (camera_wdr_mode_t)entry.data.u8[0]; + return OK; +} +// HDR_FEATURE_E + int Parameters::setWdrLevel(uint8_t level) { ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(INTEL_CONTROL_WDR_LEVEL, &level, 1); @@ -1596,7 +1613,6 @@ int Parameters::getSensorMountType(camera_mount_type_t& sensorMountType) const { // User can set envrionment and then call api to update the debug level. int Parameters::updateDebugLevel() { Log::setDebugLevel(); - CameraDump::setDumpLevel(); return OK; } @@ -1879,6 +1895,20 @@ int Parameters::getPowerMode(camera_power_mode_t& mode) const { return OK; } +int Parameters::setHdrRatio(float hdrRatio) { + ParameterHelper::AutoWLock wl(mData); + return ParameterHelper::getMetadata(mData).update(INTEL_VENDOR_CAMERA_HDR_RATIO, &hdrRatio, 1); +} + +int Parameters::getHdrRatio(float& hdrRatio) const { + ParameterHelper::AutoRLock rl(mData); + auto entry = ParameterHelper::getMetadataEntry(mData, INTEL_VENDOR_CAMERA_HDR_RATIO); + if (entry.count != 1) return NAME_NOT_FOUND; + + hdrRatio = entry.data.f[0]; + return OK; +} + int Parameters::setTotalExposureTarget(int64_t totalExposureTarget) { ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(INTEL_VENDOR_CAMERA_TOTAL_EXPOSURE_TARGET, @@ -1965,69 +1995,37 @@ int Parameters::getCallbackTmCurve(bool* enabled) const { return OK; } -// ENABLE_EVCP_S -int Parameters::setEvcpEccMode(uint8_t enabled) { +int Parameters::setZoomRegion(const camera_zoom_region_t& region) { ParameterHelper::AutoWLock wl(mData); - return ParameterHelper::getMetadata(mData).update(INTEL_VENDOR_CAMERA_IC_ECC_MODE, &enabled, 1); -} -int Parameters::getEvcpEccMode(uint8_t* enabled) const { - ParameterHelper::AutoRLock rl(mData); - auto entry = ParameterHelper::getMetadataEntry(mData, INTEL_VENDOR_CAMERA_IC_ECC_MODE); - - if (entry.count != 1) { - return NAME_NOT_FOUND; - } - - *enabled = entry.data.u8[0]; - return OK; + int32_t values[4] = {region.left, region.top, region.right, region.bottom}; + return ParameterHelper::getMetadata(mData).update(INTEL_CONTROL_SCALER_CROP_REGION, values, 4); } -int Parameters::setEvcpBCMode(uint8_t mode) { - ParameterHelper::AutoWLock wl(mData); - return ParameterHelper::getMetadata(mData).update(INTEL_VENDOR_CAMERA_IC_BC_MODE, &mode, 1); -} -int Parameters::getEvcpBCMode(uint8_t* mode) const { +int Parameters::getZoomRegion(camera_zoom_region_t* region) const { ParameterHelper::AutoRLock rl(mData); - auto entry = ParameterHelper::getMetadataEntry(mData, INTEL_VENDOR_CAMERA_IC_BC_MODE); + auto entry = ParameterHelper::getMetadataEntry(mData, INTEL_CONTROL_SCALER_CROP_REGION); - if (entry.count != 1) { + if (entry.count != 4) { return NAME_NOT_FOUND; } - *mode = entry.data.u8[0]; + region->left = entry.data.i32[0]; + region->top = entry.data.i32[1]; + region->right = entry.data.i32[2]; + region->bottom = entry.data.i32[3]; return OK; } -int Parameters::setEvcpBRParameters(int height, int width, int fd) { +// LEVEL0_ICBM_S +int Parameters::setICBMUFMode(uint8_t mode) { ParameterHelper::AutoWLock wl(mData); - int32_t values[3] = {width, height, fd}; - return ParameterHelper::getMetadata(mData).update(INTEL_VENDOR_CAMERA_IC_BR_PARAMETERS, values, - 3); + return ParameterHelper::getMetadata(mData).update(INTEL_VENDOR_CAMERA_IC_UF_MODE, &mode, 1); } -int Parameters::getEvcpBRParameters(int* height, int* width, int* fd) const { +int Parameters::getICBMUFMode(uint8_t* mode) const { ParameterHelper::AutoRLock rl(mData); - auto entry = ParameterHelper::getMetadataEntry(mData, INTEL_VENDOR_CAMERA_IC_BR_PARAMETERS); - - if (entry.count != 3) { - return NAME_NOT_FOUND; - } - - *height = entry.data.i32[0]; - *width = entry.data.i32[1]; - *fd = entry.data.i32[2]; - - return OK; -} - -int Parameters::setEvcpFFMode(uint8_t mode) { - ParameterHelper::AutoWLock wl(mData); - return ParameterHelper::getMetadata(mData).update(INTEL_VENDOR_CAMERA_IC_FF_MODE, &mode, 1); -} -int Parameters::getEvcpFFMode(uint8_t* mode) const { - ParameterHelper::AutoRLock rl(mData); - auto entry = ParameterHelper::getMetadataEntry(mData, INTEL_VENDOR_CAMERA_IC_FF_MODE); + auto entry = ParameterHelper::getMetadataEntry(mData, INTEL_VENDOR_CAMERA_IC_UF_MODE); if (entry.count != 1) { return NAME_NOT_FOUND; @@ -2036,28 +2034,23 @@ int Parameters::getEvcpFFMode(uint8_t* mode) const { *mode = entry.data.u8[0]; return OK; } -// ENABLE_EVCP_E -int Parameters::setZoomRegion(const camera_zoom_region_t& region) { +int Parameters::setICBMBBMode(uint8_t mode) { ParameterHelper::AutoWLock wl(mData); - int32_t values[4] = {region.left, region.top, region.right, region.bottom}; - return ParameterHelper::getMetadata(mData).update(INTEL_CONTROL_SCALER_CROP_REGION, values, 4); + return ParameterHelper::getMetadata(mData).update(INTEL_VENDOR_CAMERA_IC_BC_MODE, &mode, 1); } -int Parameters::getZoomRegion(camera_zoom_region_t* region) const { +int Parameters::getICBMBBMode(uint8_t* mode) const { ParameterHelper::AutoRLock rl(mData); - auto entry = ParameterHelper::getMetadataEntry(mData, INTEL_CONTROL_SCALER_CROP_REGION); + auto entry = ParameterHelper::getMetadataEntry(mData, INTEL_VENDOR_CAMERA_IC_BC_MODE); - if (entry.count != 4) { + if (entry.count != 1) { return NAME_NOT_FOUND; } - region->left = entry.data.i32[0]; - region->top = entry.data.i32[1]; - region->right = entry.data.i32[2]; - region->bottom = entry.data.i32[3]; - + *mode = entry.data.u8[0]; return OK; } +// LEVEL0_ICBM_E } // end of namespace icamera diff --git a/src/metadata/vendor_metadata_tag_info.c b/src/metadata/vendor_metadata_tag_info.c index e0e286ad..d134e0f9 100644 --- a/src/metadata/vendor_metadata_tag_info.c +++ b/src/metadata/vendor_metadata_tag_info.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2012 The Android Open Source Project - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,59 +21,64 @@ * Generated automatically from vendor_metadata_tag_info.mako */ -const char *vendor_metadata_section_names[INTEL_VENDOR_SECTION_COUNT] = { +const char* vendor_metadata_section_names[INTEL_VENDOR_SECTION_COUNT] = { "intel.vendorCamera", /* [INTEL_VENDOR_CAMERA] */ }; unsigned int vendor_metadata_section_bounds[INTEL_VENDOR_SECTION_COUNT][2] = { /* [INTEL_VENDOR_CAMERA] */ - { INTEL_VENDOR_CAMERA_START, INTEL_VENDOR_CAMERA_END }, + {INTEL_VENDOR_CAMERA_START, INTEL_VENDOR_CAMERA_END}, }; -static tag_info_t intel_vendor_camera[INTEL_VENDOR_CAMERA_END - - INTEL_VENDOR_CAMERA_START] = { - { "callbackRgbs", ICAMERA_TYPE_BYTE }, - { "rgbsGridSize", ICAMERA_TYPE_INT32 }, - { "shadingCorrection", ICAMERA_TYPE_BYTE }, - { "rgbsStatsBlocks", ICAMERA_TYPE_BYTE }, - { "callbackTmCurve", ICAMERA_TYPE_BYTE }, - { "toneMapCurve", ICAMERA_TYPE_FLOAT }, - { "powerMode", ICAMERA_TYPE_BYTE }, -// ENABLE_EVCP_S - { "icCaps", ICAMERA_TYPE_INT32 }, -// ENABLE_EVCP_E -// ENABLE_EVCP_S - { "icPeaceFeatures", ICAMERA_TYPE_INT32 }, -// ENABLE_EVCP_E -// ENABLE_EVCP_S - { "icEccMode", ICAMERA_TYPE_BYTE }, -// ENABLE_EVCP_E -// ENABLE_EVCP_S - { "icBcMode", ICAMERA_TYPE_BYTE }, -// ENABLE_EVCP_E -// ENABLE_EVCP_S - { "icBrParameters", ICAMERA_TYPE_INT32 }, -// ENABLE_EVCP_E -// ENABLE_EVCP_S - { "icFfMode", ICAMERA_TYPE_BYTE }, -// ENABLE_EVCP_E - { "totalExposureTarget", ICAMERA_TYPE_INT64 }, - { "totalExposureTargetRange", ICAMERA_TYPE_INT64 }, - { "rawDataOutput", ICAMERA_TYPE_BYTE }, +static tag_info_t intel_vendor_camera[INTEL_VENDOR_CAMERA_END - INTEL_VENDOR_CAMERA_START] = { + {"callbackRgbs", ICAMERA_TYPE_BYTE}, + {"rgbsGridSize", ICAMERA_TYPE_INT32}, + {"shadingCorrection", ICAMERA_TYPE_BYTE}, + {"rgbsStatsBlocks", ICAMERA_TYPE_BYTE}, + {"callbackTmCurve", ICAMERA_TYPE_BYTE}, + {"toneMapCurve", ICAMERA_TYPE_FLOAT}, + {"powerMode", ICAMERA_TYPE_BYTE}, + // LEVEL0_ICBM_S + {"icCaps", ICAMERA_TYPE_INT32}, + // LEVEL0_ICBM_E + // LEVEL0_ICBM_S + {"icPeaceFeatures", ICAMERA_TYPE_INT32}, + // LEVEL0_ICBM_E + // LEVEL0_ICBM_S + {"icEccMode", ICAMERA_TYPE_BYTE}, + // LEVEL0_ICBM_E + // LEVEL0_ICBM_S + {"icBcMode", ICAMERA_TYPE_BYTE}, + // LEVEL0_ICBM_E + // LEVEL0_ICBM_S + {"icBrParameters", ICAMERA_TYPE_INT32}, + // LEVEL0_ICBM_E + // LEVEL0_ICBM_S + {"icUfMode", ICAMERA_TYPE_BYTE}, + // LEVEL0_ICBM_E + {"totalExposureTarget", ICAMERA_TYPE_INT64}, + {"totalExposureTargetRange", ICAMERA_TYPE_INT64}, + {"rawDataOutput", ICAMERA_TYPE_BYTE}, + {"hdrRatio", ICAMERA_TYPE_FLOAT}, + {"moduleId", ICAMERA_TYPE_BYTE}, + {"sensorId", ICAMERA_TYPE_BYTE}, + {"sensorMode", ICAMERA_TYPE_BYTE}, + {"analogGainRange", ICAMERA_TYPE_FLOAT}, + {"digitalGainRange", ICAMERA_TYPE_FLOAT}, + {"analogGain", ICAMERA_TYPE_FLOAT}, + {"digitalGain", ICAMERA_TYPE_FLOAT}, + {"sensitivityRange", ICAMERA_TYPE_INT32}, }; -tag_info_t *vendor_tag_info[INTEL_VENDOR_SECTION_COUNT] = { +tag_info_t* vendor_tag_info[INTEL_VENDOR_SECTION_COUNT] = { intel_vendor_camera, }; -int vendor_metadata_enum_snprint(uint32_t tag, - int32_t value, - char *dst, - size_t size) { - const char *msg = "error: not an enum"; +int vendor_metadata_enum_snprint(uint32_t tag, int32_t value, char* dst, size_t size) { + const char* msg = "error: not an enum"; int ret = -1; - switch(tag) { + switch (tag) { case INTEL_VENDOR_CAMERA_CALLBACK_RGBS: { switch (value) { case INTEL_VENDOR_CAMERA_CALLBACK_RGBS_FALSE: @@ -143,17 +148,17 @@ int vendor_metadata_enum_snprint(uint32_t tag, } break; } -// ENABLE_EVCP_S + // LEVEL0_ICBM_S case INTEL_VENDOR_CAMERA_IC_CAPS: { break; } -// ENABLE_EVCP_E -// ENABLE_EVCP_S + // LEVEL0_ICBM_E + // LEVEL0_ICBM_S case INTEL_VENDOR_CAMERA_IC_PEACE_FEATURES: { break; } -// ENABLE_EVCP_E -// ENABLE_EVCP_S + // LEVEL0_ICBM_E + // LEVEL0_ICBM_S case INTEL_VENDOR_CAMERA_IC_ECC_MODE: { switch (value) { case INTEL_VENDOR_CAMERA_IC_ECC_MODE_OFF: @@ -169,8 +174,8 @@ int vendor_metadata_enum_snprint(uint32_t tag, } break; } -// ENABLE_EVCP_E -// ENABLE_EVCP_S + // LEVEL0_ICBM_E + // LEVEL0_ICBM_S case INTEL_VENDOR_CAMERA_IC_BC_MODE: { switch (value) { case INTEL_VENDOR_CAMERA_IC_BC_MODE_OFF: @@ -190,20 +195,20 @@ int vendor_metadata_enum_snprint(uint32_t tag, } break; } -// ENABLE_EVCP_E -// ENABLE_EVCP_S + // LEVEL0_ICBM_E + // LEVEL0_ICBM_S case INTEL_VENDOR_CAMERA_IC_BR_PARAMETERS: { break; } -// ENABLE_EVCP_E -// ENABLE_EVCP_S - case INTEL_VENDOR_CAMERA_IC_FF_MODE: { + // LEVEL0_ICBM_E + // LEVEL0_ICBM_S + case INTEL_VENDOR_CAMERA_IC_UF_MODE: { switch (value) { - case INTEL_VENDOR_CAMERA_IC_FF_MODE_OFF: + case INTEL_VENDOR_CAMERA_IC_UF_MODE_OFF: msg = "OFF"; ret = 0; break; - case INTEL_VENDOR_CAMERA_IC_FF_MODE_AUTO: + case INTEL_VENDOR_CAMERA_IC_UF_MODE_AUTO: msg = "AUTO"; ret = 0; break; @@ -212,7 +217,7 @@ int vendor_metadata_enum_snprint(uint32_t tag, } break; } -// ENABLE_EVCP_E + // LEVEL0_ICBM_E case INTEL_VENDOR_CAMERA_TOTAL_EXPOSURE_TARGET: { break; } @@ -234,7 +239,45 @@ int vendor_metadata_enum_snprint(uint32_t tag, } break; } - + case INTEL_VENDOR_CAMERA_HDR_RATIO: { + break; + } + case INTEL_VENDOR_CAMERA_MODULE_ID: { + break; + } + case INTEL_VENDOR_CAMERA_SENSOR_ID: { + break; + } + case INTEL_VENDOR_CAMERA_SENSOR_MODE: { + switch (value) { + case INTEL_VENDOR_CAMERA_SENSOR_MODE_FULL: + msg = "FULL"; + ret = 0; + break; + case INTEL_VENDOR_CAMERA_SENSOR_MODE_BINNING: + msg = "BINNING"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case INTEL_VENDOR_CAMERA_ANALOG_GAIN_RANGE: { + break; + } + case INTEL_VENDOR_CAMERA_DIGITAL_GAIN_RANGE: { + break; + } + case INTEL_VENDOR_CAMERA_ANALOG_GAIN: { + break; + } + case INTEL_VENDOR_CAMERA_DIGITAL_GAIN: { + break; + } + case INTEL_VENDOR_CAMERA_SENSITIVITY_RANGE: { + break; + } } snprintf(dst, size, "%s", msg); @@ -242,4 +285,3 @@ int vendor_metadata_enum_snprint(uint32_t tag, return ret; } - diff --git a/src/platformdata/AiqInitData.cpp b/src/platformdata/AiqInitData.cpp index cf0de8b6..1a07cfac 100644 --- a/src/platformdata/AiqInitData.cpp +++ b/src/platformdata/AiqInitData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation + * Copyright (C) 2015-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ #include #include +#include #include #include "AiqUtils.h" @@ -124,38 +125,37 @@ void AiqData::saveDataToFile(const std::string& fileName, const ia_binary_data* AiqInitData::AiqInitData(const std::string& sensorName, const std::string& camCfgDir, const std::vector& tuningCfg, const std::string& nvmDir, - int maxNvmSize, std::string* camModuleName) + int maxNvmSize, const std::string& camModuleName, int cameraId) : mSensorName(sensorName), mMaxNvmSize(maxNvmSize), mTuningCfg(tuningCfg), mNvm(nullptr) { LOG1("@%s, mMaxNvmSize:%d", __func__, mMaxNvmSize); - std::string aiqbNameFromModuleInfo; + std::set aiqbNameFromModuleInfo; if (nvmDir.length() > 0) { - mNvmPath.append(NVM_DATA_PATH); + mNvmPath = nvmDir; - mNvmPath.append(nvmDir); - if (mNvmPath.back() != '/') mNvmPath.append("/"); - - mNvmPath.append("eeprom"); - LOG2("NVM data is located in %s", mNvmPath.c_str()); - - std::string cameraModule; - int ret = getCameraModuleFromEEPROM(mNvmPath, &cameraModule); - if (ret == OK) { - if (camModuleName) *camModuleName = cameraModule; + if (camModuleName.length() > 0) { DIR* dir = opendir(camCfgDir.c_str()); if (dir) { std::string aiqbName("camera_"); std::string postfix(".aiqb"); - aiqbName.append(cameraModule); + aiqbName.append(camModuleName); struct dirent* direntPtr = nullptr; + bool boardConfig = false; + bool HDRnetUsed = PlatformData::isHDRnetTuningUsed(cameraId, boardConfig); while ((direntPtr = readdir(dir)) != nullptr) { if ((strncmp(direntPtr->d_name, aiqbName.c_str(), aiqbName.length()) == 0) && (strstr(direntPtr->d_name, postfix.c_str()) != nullptr)) { - aiqbNameFromModuleInfo.assign(direntPtr->d_name); - break; + if (boardConfig) { + if (HDRnetUsed && (strstr(direntPtr->d_name, "hdrnet") == nullptr)) + continue; + else if (!HDRnetUsed && + (strstr(direntPtr->d_name, "hdrnet") != nullptr)) + continue; + } + aiqbNameFromModuleInfo.insert(direntPtr->d_name); } } closedir(dir); @@ -168,8 +168,14 @@ AiqInitData::AiqInitData(const std::string& sensorName, const std::string& camCf aiqbName.append(".aiqb"); if (!aiqbNameFromModuleInfo.empty()) { - aiqbName.assign(aiqbNameFromModuleInfo); + for (auto name : aiqbNameFromModuleInfo) { + if (strstr(name.c_str(), cfg.aiqbName.c_str()) != nullptr) { + aiqbName.assign(name); + break; + } + } } + LOGI("aiqb file name %s", aiqbName.c_str()); if (findConfigFile(camCfgDir, &aiqbName) != OK) { @@ -197,48 +203,6 @@ AiqInitData::~AiqInitData() { delete mNvm; } -int AiqInitData::getCameraModuleFromEEPROM(const std::string& nvmPath, std::string* cameraModule) { - LOG1("@%s, nvmPath %s", __func__, nvmPath.c_str()); - - CheckAndLogError(nvmPath.empty(), NAME_NOT_FOUND, "nvmPath is empty"); - - const int moduleInfoSize = CAMERA_MODULE_INFO_SIZE; - const int moduleInfoOffset = CAMERA_MODULE_INFO_OFFSET; - struct CameraModuleInfo cameraModuleInfo; - CLEAR(cameraModuleInfo); - FILE* eepromFile = fopen(nvmPath.c_str(), "rb"); - CheckAndLogError(!eepromFile, UNKNOWN_ERROR, "Failed to open EEPROM file in %s", - nvmPath.c_str()); - - // file size should be larger than CAMERA_MODULE_INFO_OFFSET - fseek(eepromFile, 0, SEEK_END); - int nvmDataSize = static_cast(ftell(eepromFile)); - if (nvmDataSize < moduleInfoOffset) { - LOGE("EEPROM data is too small"); - fclose(eepromFile); - return NOT_ENOUGH_DATA; - } - - fseek(eepromFile, -1 * moduleInfoOffset, SEEK_END); - int ret = fread(&cameraModuleInfo, moduleInfoSize, 1, eepromFile); - fclose(eepromFile); - CheckAndLogError(!ret, UNKNOWN_ERROR, "Failed to read module info %d", ret); - - if (strncmp(cameraModuleInfo.mOsInfo, NVM_OS, strlen(NVM_OS)) != 0) { - LOG1("NVM OS string doesn't match with module info"); - return NO_ENTRY; - } - - char tmpName[CAMERA_MODULE_INFO_SIZE]; - snprintf(tmpName, CAMERA_MODULE_INFO_SIZE, "%c%c_%04x", cameraModuleInfo.mModuleVendor[0], - cameraModuleInfo.mModuleVendor[1], cameraModuleInfo.mModuleProduct); - - cameraModule->assign(tmpName); - LOG1("%s, aiqb name %s", __func__, cameraModule->c_str()); - - return OK; -} - /** * findConfigFile * @@ -369,6 +333,10 @@ int AiqInitData::saveMakernoteData(int cameraId, camera_makernote_mode_t makerno return mMkn->saveMakernoteData(cameraId, makernoteMode, sequence, tuningMode); } +void* AiqInitData::getMakernoteBuf(camera_makernote_mode_t makernoteMode, bool& dump) { + return mMkn->getMakernoteBuf(makernoteMode, dump); +} + void AiqInitData::updateMakernoteTimeStamp(int64_t sequence, uint64_t timestamp) { mMkn->updateTimestamp(sequence, timestamp); } diff --git a/src/platformdata/AiqInitData.h b/src/platformdata/AiqInitData.h index 555ac3d8..70e7aa64 100644 --- a/src/platformdata/AiqInitData.h +++ b/src/platformdata/AiqInitData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,29 +29,6 @@ namespace icamera { -#define NVM_OS "CrOS" -/** - * Camera Module Information - * - * Camera Module Information is gotten from the EEPROM, which needs to be programmed with - * an identification block located in the last 32 bytes of the EEPROM. - */ -struct CameraModuleInfo { - char mOsInfo[4]; - uint16_t mCRC; - uint8_t mVersion; - uint8_t mLengthOfFields; - uint16_t mDataFormat; - uint16_t mModuleProduct; - char mModuleVendor[2]; - char mSensorVendor[2]; - uint16_t mSensorModel; - uint8_t mI2cAddress; - uint8_t mReserved[13]; -}; -#define CAMERA_MODULE_INFO_OFFSET 32 -#define CAMERA_MODULE_INFO_SIZE 32 - class AiqData { public: explicit AiqData(const std::string& fileName, int maxSize = -1); @@ -79,7 +56,7 @@ class AiqInitData { public: AiqInitData(const std::string& sensorName, const std::string& camCfgDir, const std::vector& tuningCfg, const std::string& nvmDir, - int maxNvmSize, std::string* camModuleName); + int maxNvmSize, const std::string& camModuleName, int cameraId); ~AiqInitData(); // cpf @@ -97,10 +74,10 @@ class AiqInitData { int deinitMakernote(int cameraId, TuningMode tuningMode); int saveMakernoteData(int cameraId, camera_makernote_mode_t makernoteMode, int64_t sequence, TuningMode tuningMode); + void* getMakernoteBuf(camera_makernote_mode_t makernoteMode, bool& dump); void updateMakernoteTimeStamp(int64_t sequence, uint64_t timestamp); void acquireMakernoteData(uint64_t timestamp, Parameters* param); - int getCameraModuleFromEEPROM(const std::string& nvmPath, std::string* cameraModule); std::string getAiqdFileNameWithPath(TuningMode mode); int findConfigFile(const std::string& camCfgDir, std::string* cpfPathName); diff --git a/src/platformdata/CameraParser.cpp b/src/platformdata/CameraParser.cpp index d735b21e..6f4cabe8 100644 --- a/src/platformdata/CameraParser.cpp +++ b/src/platformdata/CameraParser.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation + * Copyright (C) 2015-2024 Intel Corporation * Copyright 2008-2017, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,6 +23,9 @@ #include #include +// CRL_MODULE_S +#include +// CRL_MODULE_E #include #include #include @@ -46,14 +49,20 @@ CameraParser::CameraParser(MediaControl* mc, PlatformData::StaticCfg* cfg) mCurrentDataField(FIELD_INVALID), mSensorNum(0), mCurrentSensor(0), + mCaptureIdLinkIndex(0), + mCaptureIdIndex(0), pCurrentCam(nullptr), mInMediaCtlCfg(false), + mSkipMediaCtlCfg(false), mInStaticMetadata(false), mMC(mc), - mMetadataCache(nullptr) { + mMetadataCache(nullptr), + mIsAvailableSensor(false) { LOG1("@%s", __func__); CheckAndLogError(cfg == nullptr, VOID_VALUE, "@%s, cfg is nullptr", __func__); + memset(mCaptureId, 0, sizeof(mCaptureId)); + // Get common data from libcamhal_profile.xml int ret = getDataFromXmlFile(LIBCAMHAL_PROFILE_NAME); CheckAndLogError(ret != OK, VOID_VALUE, "Failed to get libcamhal profile data from %s", @@ -98,6 +107,7 @@ CameraParser::CameraParser(MediaControl* mc, PlatformData::StaticCfg* cfg) {"scaler.availableStreamConfigurations", CAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS}, {"scaler.availableMinFrameDurations", CAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS}, {"scaler.availableStallDurations", CAMERA_SCALER_AVAILABLE_STALL_DURATIONS}, + {"scaler.availableMaxDigitalZoom", CAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM}, {"reprocess.maxCaptureStall", CAMERA_REPROCESS_MAX_CAPTURE_STALL}, {"jpeg.maxSize", CAMERA_JPEG_MAX_SIZE}, {"jpeg.availableThumbnailSizes", CAMERA_JPEG_AVAILABLE_THUMBNAIL_SIZES}, @@ -126,13 +136,15 @@ CameraParser::~CameraParser() { * Replacing $I2CBUS with the real mI2CBus if the value contains the string "$I2CBUS" * one example: "imx319 $I2CBUS" * Replacing $CSI_PORT with the real mCsiPort if the value contains the string "$CSI_PORT" - * one example: "Intel IPU6 CSI-2 $CSI_PORT" + * one example: "Intel IPU6 CSI-2 $CSI_PORT" or "Intel IPU6 CSI2 $CSI_PORT" + * Replacing $CAPTURE_ID with the real mCaptureId if the value contains the string "$CAPTURE_ID" * * \param profiles: the pointer of the CameraParser. * \param value: camera information. * \return: if the value contains the string, it will be replaced. */ -string CameraParser::replaceStringInXml(CameraParser* profiles, const char* value) { +string CameraParser::replaceStringInXml(CameraParser* profiles, const char* value, + const char* name) { string valueTmp; CheckAndLogError(value == nullptr, valueTmp, "value is nullptr"); @@ -142,6 +154,20 @@ string CameraParser::replaceStringInXml(CameraParser* profiles, const char* valu valueTmp.replace(found, sizeof("$I2CBUS"), profiles->mI2CBus); } else if ((found = valueTmp.find("$CSI_PORT")) != string::npos) { valueTmp.replace(found, sizeof("$CSI_PORT"), profiles->mCsiPort); + } else if ((found = valueTmp.find("$CAPTURE_ID")) != string::npos) { + if (strcmp(name, "link") == 0 && profiles->mCaptureIdLinkIndex < IPU_ISYS_CAPTURE_ID_MAX) { + int captureId = std::stoi(profiles->mCsiPort) * 8 + profiles->mCaptureIdLinkIndex; + valueTmp.replace(found, sizeof("$CAPTURE_ID"), std::to_string(captureId)); + profiles->mCaptureId[profiles->mCaptureIdLinkIndex] = captureId; + profiles->mCaptureIdLinkIndex++; + profiles->mCaptureIdIndex = 0; + } else if (strcmp(name, "videonode") == 0 && + profiles->mCaptureIdIndex < IPU_ISYS_CAPTURE_ID_MAX) { + valueTmp.replace(found, sizeof("$CAPTURE_ID"), + std::to_string(profiles->mCaptureId[profiles->mCaptureIdIndex])); + profiles->mCaptureIdIndex++; + profiles->mCaptureIdLinkIndex = 0; + } } return valueTmp; @@ -164,7 +190,7 @@ void CameraParser::getCsiPortAndI2CBus(CameraParser* profiles) { if ((availableSensorTmp.first.find(fullSensorName) != string::npos) && (sensorInfo->sensorFlag != true)) { /* parameters information format example: - sinkEntityName is "Intel IPU6 CSI-2 1" + sinkEntityName is "Intel IPU6 CSI-2 1" or "Intel IPU6 CSI2 1" profiles->pCurrentCam->sensorName is "ov8856-wf" or "ov8856" sensorName is "ov8856" */ @@ -203,6 +229,12 @@ void CameraParser::checkField(CameraParser* profiles, const char* name, const ch profiles->mCurrentDataField = FIELD_INVALID; return; } else if (strcmp(name, "Sensor") == 0) { + // If it already has a available sensor, it doesn't need to parser others + if (profiles->mIsAvailableSensor) { + profiles->mCurrentDataField = FIELD_INVALID; + return; + } + profiles->mSensorNum++; profiles->mCurrentSensor = profiles->mSensorNum - 1; LOG1("@%s, mCurrentSensor %d", __func__, profiles->mCurrentSensor); @@ -221,6 +253,17 @@ void CameraParser::checkField(CameraParser* profiles, const char* name, const ch profiles->pCurrentCam->sensorName = val; } else if (strcmp(key, "description") == 0) { profiles->pCurrentCam->sensorDescription = val; + // VIRTUAL_CHANNEL_S + } else if (strcmp(key, "virtualChannel") == 0) { + profiles->pCurrentCam->mVirtualChannel = + strcmp(val, "true") == 0 ? true : false; + } else if (strcmp(key, "vcNum") == 0) { + profiles->pCurrentCam->mVCNum = strtoul(val, nullptr, 10); + } else if (strcmp(key, "vcSeq") == 0) { + profiles->pCurrentCam->mVCSeq = strtoul(val, nullptr, 10); + } else if (strcmp(key, "vcGroupId") == 0) { + profiles->pCurrentCam->mVCGroupId = strtoul(val, nullptr, 10); + // VIRTUAL_CHANNEL_E } idx += 2; } @@ -236,6 +279,8 @@ void CameraParser::checkField(CameraParser* profiles, const char* name, const ch return; } + if (profiles->mIsAvailableSensor) return; + LOGE("@%s, name:%s, atts[0]:%s, xml format wrong", __func__, name, atts[0]); return; } @@ -262,8 +307,6 @@ void CameraParser::handleCommon(CameraParser* profiles, const char* name, const cfg->ipuName = atts[1]; } else if (strcmp(name, "availableSensors") == 0) { parseXmlConvertStrings(atts[1], cfg->availableSensors, convertCharToString); - } else if (strcmp(name, "useGpuTnr") == 0) { - cfg->isGpuTnrEnabled = strcmp(atts[1], "true") == 0; } else if (strcmp(name, "cameraNumber") == 0) { cfg->cameraNumber = atoi(atts[1]); } else if (strcmp(name, "stillTnrPrior") == 0) { @@ -281,10 +324,10 @@ void CameraParser::handleCommon(CameraParser* profiles, const char* name, const cfg->supportHwJpegEncode = strcmp(atts[1], "true") == 0; } else if (strcmp(name, "maxIsysTimeoutValue") == 0) { cfg->maxIsysTimeoutValue = atoi(atts[1]); - // ENABLE_EVCP_S - } else if (strcmp(name, "useGpuEvcp") == 0) { - cfg->isGpuEvcpEnabled = strcmp(atts[1], "true") == 0; - // ENABLE_EVCP_E + // LEVEL0_ICBM_S + } else if (strcmp(name, "useGPUICBM") == 0) { + cfg->isGPUICBMEnabled = strcmp(atts[1], "true") == 0; + // LEVEL0_ICBM_E } } @@ -311,6 +354,8 @@ void CameraParser::handleSensor(CameraParser* profiles, const char* name, const getSupportedFormat(atts[1], pCurrentCam->mSupportedISysFormat); } else if (strcmp(name, "iSysRawFormat") == 0) { pCurrentCam->mISysRawFormat = CameraUtils::string2PixelCode(atts[1]); + } else if (strcmp(name, "preferredOutput") == 0) { + parseSizesList(atts[1], pCurrentCam->mPreferOutput); } else if (strcmp(name, "configModeToStreamId") == 0) { char* srcDup = strdup(atts[1]); CheckAndLogError(!srcDup, VOID_VALUE, "Create a copy of source string failed."); @@ -329,6 +374,8 @@ void CameraParser::handleSensor(CameraParser* profiles, const char* name, const pCurrentCam->mEnableAIQ = strcmp(atts[1], "true") == 0; } else if (strcmp(name, "enableMkn") == 0) { pCurrentCam->mEnableMkn = strcmp(atts[1], "true") == 0; + } else if (strcmp(name, "ispTuningUpdate") == 0) { + pCurrentCam->mIspTuningUpdate = strcmp(atts[1], "true") == 0; } else if (strcmp(name, "AiqRunningInterval") == 0) { pCurrentCam->mAiqRunningInterval = atoi(atts[1]); } else if (strcmp(name, "AlgoRunningRate") == 0) { @@ -369,8 +416,23 @@ void CameraParser::handleSensor(CameraParser* profiles, const char* name, const // if same runnning rate of AE and AWB, stats running rate is supported pCurrentCam->mStatsRunningRate = true; } + } else if (strcmp(name, "disableHDRnetBoards") == 0) { + int size = strlen(atts[1]); + char src[size + 1]; + MEMCPY_S(src, size, atts[1], size); + src[size] = '\0'; + char* savePtr = nullptr; + char* tablePtr = strtok_r(src, ",", &savePtr); + while (tablePtr) { + pCurrentCam->mDisableHDRnetBoards.push_back(tablePtr); + tablePtr = strtok_r(nullptr, ",", &savePtr); + } } else if (strcmp(name, "useCrlModule") == 0) { pCurrentCam->mUseCrlModule = strcmp(atts[1], "true") == 0; + // DOL_FEATURE_S + } else if (strcmp(name, "dolVbpOffset") == 0) { + parseXmlConvertStrings(atts[1], pCurrentCam->mDolVbpOffset, atoi); + // DOL_FEATURE_E } else if (strcmp(name, "skipFrameV4L2Error") == 0) { pCurrentCam->mSkipFrameV4L2Error = strcmp(atts[1], "true") == 0; } else if (strcmp(name, "useSensorDigitalGain") == 0) { @@ -400,6 +462,33 @@ void CameraParser::handleSensor(CameraParser* profiles, const char* name, const LOGE("unknown Lens HW type %s, set to LENS_NONE_HW", atts[1]); pCurrentCam->mLensHwType = LENS_NONE_HW; } + } else if (strcmp(name, "tuningModeToSensitivityMap") == 0) { + int size = strlen(atts[1]); + char src[size + 1]; + MEMCPY_S(src, size, atts[1], size); + src[size] = '\0'; + + char* savePtr = nullptr; + char* tuningMode = strtok_r(src, ",", &savePtr); + while (tuningMode) { + SensitivityRange range; + char* min = strtok_r(nullptr, ",", &savePtr); + char* max = strtok_r(nullptr, ",", &savePtr); + CheckAndLogError(!tuningMode || !min || !max, VOID_VALUE, "Wrong sensitivity map"); + + TuningMode mode = CameraUtils::string2TuningMode(tuningMode); + range.min = atoi(min); + range.max = atoi(max); + pCurrentCam->mTuningModeToSensitivityMap[mode] = range; + + tuningMode = strtok_r(nullptr, ",", &savePtr); + } + } else if (strcmp(name, "sensorMode") == 0) { + if (strcmp(atts[1], "binning") == 0) { + pCurrentCam->mSensorMode = SENSOR_MODE_BINNING; + } else if (strcmp(atts[1], "full") == 0) { + pCurrentCam->mSensorMode = SENSOR_MODE_FULL; + } } else if (strcmp(name, "enablePdaf") == 0) { pCurrentCam->mEnablePdaf = strcmp(atts[1], "true") == 0; } else if (strcmp(name, "sensorAwb") == 0) { @@ -435,6 +524,40 @@ void CameraParser::handleSensor(CameraParser* profiles, const char* name, const pCurrentCam->mDigitalGainLag = atoi(atts[1]); } else if (strcmp(name, "exposureLag") == 0) { pCurrentCam->mExposureLag = atoi(atts[1]); + // HDR_FEATURE_S + } else if (strcmp(name, "hdrExposureType") == 0) { + if (strcmp(atts[1], "fix-exposure-ratio") == 0) { + pCurrentCam->mSensorExposureType = SENSOR_FIX_EXPOSURE_RATIO; + } else if (strcmp(atts[1], "relative-multi-exposures") == 0) { + pCurrentCam->mSensorExposureType = SENSOR_RELATIVE_MULTI_EXPOSURES; + } else if (strcmp(atts[1], "multi-exposures") == 0) { + pCurrentCam->mSensorExposureType = SENSOR_MULTI_EXPOSURES; + } else if (strcmp(atts[1], "dual-exposures-dcg-and-vs") == 0) { + pCurrentCam->mSensorExposureType = SENSOR_DUAL_EXPOSURES_DCG_AND_VS; + } else { + LOGE("unknown SENSOR exposure type %s, set to SENSOR_EXPOSURE_SINGLE", atts[1]); + pCurrentCam->mSensorExposureType = SENSOR_EXPOSURE_SINGLE; + } + } else if (strcmp(name, "hdrExposureNum") == 0) { + pCurrentCam->mSensorExposureNum = atoi(atts[1]); + } else if (strcmp(name, "hdrStatsInputBitDepth") == 0) { + pCurrentCam->mHdrStatsInputBitDepth = atoi(atts[1]); + } else if (strcmp(name, "hdrStatsOutputBitDepth") == 0) { + pCurrentCam->mHdrStatsOutputBitDepth = atoi(atts[1]); + } else if (strcmp(name, "useFixedHdrExposureInfo") == 0) { + pCurrentCam->mUseFixedHdrExposureInfo = strcmp(atts[1], "true") == 0; + } else if (strcmp(name, "hdrGainType") == 0) { + if (strcmp(atts[1], "multi-dg-and-convertion-ag") == 0) { + pCurrentCam->mSensorGainType = SENSOR_MULTI_DG_AND_CONVERTION_AG; + } else if (strcmp(atts[1], "isp-dg-and-sensor-direct-ag") == 0) { + pCurrentCam->mSensorGainType = ISP_DG_AND_SENSOR_DIRECT_AG; + } else if (strcmp(atts[1], "multi-dg-and-direct-ag") == 0) { + pCurrentCam->mSensorGainType = SENSOR_MULTI_DG_AND_DIRECT_AG; + } else { + LOGE("unknown sensor gain type %s, set to SENSOR_GAIN_NONE", atts[1]); + pCurrentCam->mSensorGainType = SENSOR_GAIN_NONE; + } + // HDR_FEATURE_E } else if (strcmp(name, "graphSettingsFile") == 0) { pCurrentCam->mGraphSettingsFile = atts[1]; } else if (strcmp(name, "graphSettingsType") == 0) { @@ -460,6 +583,8 @@ void CameraParser::handleSensor(CameraParser* profiles, const char* name, const } } else if (strcmp(name, "initialSkipFrame") == 0) { pCurrentCam->mInitialSkipFrame = atoi(atts[1]); + } else if (strcmp(name, "initialPendingFrame") == 0) { + pCurrentCam->mInitialPendingFrame = atoi(atts[1]); } else if (strcmp(name, "maxRawDataNum") == 0) { pCurrentCam->mMaxRawDataNum = atoi(atts[1]); } else if (strcmp(name, "topBottomReverse") == 0) { @@ -550,18 +675,36 @@ void CameraParser::handleSensor(CameraParser* profiles, const char* name, const mNvmDeviceInfo.push_back(info); + tablePtr = strtok_r(nullptr, ",", &savePtr); + } + } else if (strcmp(name, "supportModuleNames") == 0) { + int sz = strlen(atts[1]); + char src[sz + 1]; + MEMCPY_S(src, sz, atts[1], sz); + src[sz] = '\0'; + char* savePtr; + char* tablePtr = strtok_r(src, ",", &savePtr); + while (tablePtr) { + pCurrentCam->mSupportModuleNames.push_back(tablePtr); tablePtr = strtok_r(nullptr, ",", &savePtr); } } else if (strcmp(name, "isISYSCompression") == 0) { pCurrentCam->mISYSCompression = strcmp(atts[1], "true") == 0; + if (mStaticCfg->mMediaCfgId == IPU6_UPSTREAM_MEDIA_CFG) + pCurrentCam->mISYSCompression = false; } else if (strcmp(name, "isPSACompression") == 0) { pCurrentCam->mPSACompression = strcmp(atts[1], "true") == 0; } else if (strcmp(name, "isOFSCompression") == 0) { pCurrentCam->mOFSCompression = strcmp(atts[1], "true") == 0; + } else if (strcmp(name, "schedulerEnabled") == 0) { + pCurrentCam->mSchedulerEnabled = strcmp(atts[1], "true") == 0; } else if (strcmp(name, "faceAeEnabled") == 0) { pCurrentCam->mFaceAeEnabled = strcmp(atts[1], "true") == 0; } else if (strcmp(name, "psysAlignWithSof") == 0) { pCurrentCam->mPsysAlignWithSof = strcmp(atts[1], "true") == 0; + } else if (strcmp(name, "psysAlignWithSystem") == 0) { + int val = atoi(atts[1]); + pCurrentCam->mMsPsysAlignWithSystem = val > 0 ? val : 0; } else if (strcmp(name, "psysBundleWithAic") == 0) { pCurrentCam->mPsysBundleWithAic = strcmp(atts[1], "true") == 0; } else if (strcmp(name, "swProcessingAlignWithIsp") == 0) { @@ -587,17 +730,50 @@ void CameraParser::handleSensor(CameraParser* profiles, const char* name, const val > 0 ? std::min(val, MAX_FACES_DETECTABLE) : MAX_FACES_DETECTABLE; } else if (strcmp(name, "tnrExtraFrameNum") == 0) { int val = atoi(atts[1]); - pCurrentCam->mTnrExtraFrameNum = val > 0 ? val : DEFAULT_TNR_EXTRA_FRAME_NUM; + pCurrentCam->mTnrExtraFrameNum = val > 0 ? val : 0; } else if (strcmp(name, "dummyStillSink") == 0) { pCurrentCam->mDummyStillSink = strcmp(atts[1], "true") == 0; + } else if (strcmp(name, "tnrThresholdSizes") == 0) { + parseSizesList(atts[1], pCurrentCam->mTnrThresholdSizes); + for (const auto& s : pCurrentCam->mTnrThresholdSizes) + LOG2("@%s, mTnrThresholdSizes: width:%d, height:%d", __func__, s.width, s.height); + } else if (strcmp(name, "useGpuTnr") == 0) { + pCurrentCam->mGpuTnrEnabled = strcmp(atts[1], "true") == 0; } else if (!strcmp(name, "removeCacheFlushOutputBuffer")) { pCurrentCam->mRemoveCacheFlushOutputBuffer = strcmp(atts[1], "true") == 0; } else if (!strcmp(name, "isPLCEnable")) { pCurrentCam->mPLCEnable = strcmp(atts[1], "true") == 0; + // PRIVACY_MODE_S } else if (strcmp(name, "supportPrivacy") == 0) { - pCurrentCam->mSupportPrivacy = strcmp(atts[1], "true") == 0; + int val = atoi(atts[1]); + if (val > 0 && val <= 2) { + pCurrentCam->mSupportPrivacy = static_cast(val); + } + } else if (strcmp(name, "privacyModeThreshold") == 0) { + int val = atoi(atts[1]); + if (val > 0 && val < 255) { + pCurrentCam->mPrivacyModeThreshold = val; + } + } else if (strcmp(name, "privacyModeFrameDelay") == 0) { + int val = atoi(atts[1]); + if (val >= 0) { + pCurrentCam->mPrivacyModeFrameDelay = val; + } + // PRIVACY_MODE_E } else if (strcmp(name, "stillOnlyPipe") == 0) { pCurrentCam->mStillOnlyPipe = strcmp(atts[1], "true") == 0; + // VIRTUAL_CHANNEL_S + } else if (strcmp(name, "vcAggregator") == 0) { + int size = strlen(atts[1]); + char src[size + 1]; + MEMCPY_S(src, size, atts[1], size); + src[size] = '\0'; + char* savePtr = nullptr; + char* tablePtr = strtok_r(src, ",", &savePtr); + if (tablePtr) pCurrentCam->mVcAggregator.mName = tablePtr; + tablePtr = strtok_r(nullptr, ",", &savePtr); + if (tablePtr) pCurrentCam->mVcAggregator.mIndex = atoi(tablePtr); + // VIRTUAL_CHANNEL_E } else if (strcmp(name, "disableBLCByAGain") == 0) { int size = strlen(atts[1]); char src[size + 1]; @@ -611,6 +787,9 @@ void CameraParser::handleSensor(CameraParser* profiles, const char* name, const profiles->pCurrentCam->mDisableBLCByAGain = true; } else if (strcmp(name, "resetLinkRoute") == 0) { pCurrentCam->mResetLinkRoute = strcmp(atts[1], "true") == 0; + } else if (strcmp(name, "reqWaitTimeoutNs") == 0) { + int64_t val = atoi(atts[1]); + pCurrentCam->mReqWaitTimeout = (val >= 0) ? val : 0; } } @@ -682,6 +861,7 @@ int CameraParser::parseLardTags(const char* str, vector& lardTags void CameraParser::parseMediaCtlConfigElement(CameraParser* profiles, const char* name, const char** atts) { MediaCtlConf mc; + bool skipMediaCtlCfg = true; int idx = 0; while (atts[idx]) { @@ -697,10 +877,26 @@ void CameraParser::parseMediaCtlConfigElement(CameraParser* profiles, const char mc.outputHeight = strtoul(atts[idx + 1], nullptr, 10); } else if (strcmp(key, "format") == 0) { mc.format = CameraUtils::string2PixelCode(atts[idx + 1]); + // DOL_FEATURE_S + } else if (strcmp(key, "vbp") == 0) { + mc.vbp = strtoul(atts[idx + 1], nullptr, 10); + // DOL_FEATURE_E + } else if (strcmp(key, "mediaCfg") == 0) { + skipMediaCtlCfg = false; + if (strtol(atts[idx + 1], nullptr, 10) != profiles->mStaticCfg->mMediaCfgId) { + profiles->mSkipMediaCtlCfg = true; + return; + } } idx += 2; } + if (profiles->mSkipMediaCtlCfg || + (skipMediaCtlCfg && profiles->mStaticCfg->mMediaCfgId == IPU6_UPSTREAM_MEDIA_CFG)) { + profiles->mSkipMediaCtlCfg = true; + return; + } + LOG2("@%s, name:%s, atts[0]:%s, id: %d", __func__, name, atts[0], mc.mcId); // Add a new empty MediaControl Configuration profiles->pCurrentCam->mMediaCtlConfs.push_back(mc); @@ -719,7 +915,7 @@ void CameraParser::parseControlElement(CameraParser* profiles, const char* name, const char* val = atts[idx + 1]; LOG2("@%s, name:%s, atts[%d]:%s, atts[%d]:%s", __func__, name, idx, key, idx + 1, val); if (strcmp(key, "name") == 0) { - ctl.entityName = replaceStringInXml(profiles, val); + ctl.entityName = replaceStringInXml(profiles, val, name); if (profiles->mMC) { ctl.entity = profiles->mMC->getEntityIdByName(ctl.entityName.c_str()); } @@ -748,6 +944,22 @@ void CameraParser::parseControlElement(CameraParser* profiles, const char* name, } else if (!strcmp(val, "V4L2_CID_MIPI_LANES")) { ctl.ctlCmd = V4L2_CID_MIPI_LANES; #endif + // HDR_FEATURE_S + } else if (!strcmp(val, "V4L2_CID_WDR_MODE")) { + ctl.ctlCmd = V4L2_CID_WDR_MODE; + // HDR_FEATURE_E + // CRL_MODULE_S + } else if (!strcmp(val, "V4L2_CID_LINE_LENGTH_PIXELS")) { + ctl.ctlCmd = V4L2_CID_LINE_LENGTH_PIXELS; + } else if (!strcmp(val, "V4L2_CID_FRAME_LENGTH_LINES")) { + ctl.ctlCmd = V4L2_CID_FRAME_LENGTH_LINES; + } else if (!strcmp(val, "CRL_CID_SENSOR_MODE")) { + ctl.ctlCmd = CRL_CID_SENSOR_MODE; + } else if (!strcmp(val, "CRL_CID_EXPOSURE_MODE")) { + ctl.ctlCmd = CRL_CID_EXPOSURE_MODE; + } else if (!strcmp(val, "CRL_CID_EXPOSURE_HDR_RATIO")) { + ctl.ctlCmd = CRL_CID_EXPOSURE_HDR_RATIO; + // CRL_MODULE_E } else { LOGE("Unknow ioctl command %s", val); ctl.ctlCmd = -1; @@ -780,7 +992,7 @@ void CameraParser::parseSelectionElement(CameraParser* profiles, const char* nam const char* val = atts[idx + 1]; LOG2("@%s, name:%s, atts[%d]:%s, atts[%d]:%s", __func__, name, idx, key, idx + 1, val); if (strcmp(key, "name") == 0) { - sel.entityName = replaceStringInXml(profiles, val); + sel.entityName = replaceStringInXml(profiles, val, name); if (profiles->mMC) { sel.entity = profiles->mMC->getEntityIdByName(sel.entityName.c_str()); } @@ -1123,7 +1335,7 @@ void CameraParser::parseFormatElement(CameraParser* profiles, const char* name, const char* val = atts[idx + 1]; LOG2("@%s, name:%s, atts[%d]:%s, atts[%d]:%s", __func__, name, idx, key, idx + 1, val); if (strcmp(key, "name") == 0) { - fmt.entityName = replaceStringInXml(profiles, val); + fmt.entityName = replaceStringInXml(profiles, val, name); if (profiles->mMC) { fmt.entity = profiles->mMC->getEntityIdByName(fmt.entityName.c_str()); } @@ -1169,14 +1381,14 @@ void CameraParser::parseLinkElement(CameraParser* profiles, const char* name, co const char* val = atts[idx + 1]; LOG2("@%s, name:%s, atts[%d]:%s, atts[%d]:%s", __func__, name, idx, key, idx + 1, val); if (strcmp(key, "srcName") == 0) { - link.srcEntityName = replaceStringInXml(profiles, val); + link.srcEntityName = replaceStringInXml(profiles, val, name); if (profiles->mMC) { link.srcEntity = profiles->mMC->getEntityIdByName(link.srcEntityName.c_str()); } } else if (strcmp(key, "srcPad") == 0) { link.srcPad = strtoul(val, nullptr, 10); } else if (strcmp(key, "sinkName") == 0) { - link.sinkEntityName = replaceStringInXml(profiles, val); + link.sinkEntityName = replaceStringInXml(profiles, val, name); if (profiles->mMC) { link.sinkEntity = profiles->mMC->getEntityIdByName(link.sinkEntityName.c_str()); } @@ -1203,7 +1415,7 @@ void CameraParser::parseRouteElement(CameraParser* profiles, const char* name, c const char* val = atts[idx + 1]; LOG2("@%s, name:%s, atts[%d]:%s, atts[%d]:%s", __func__, name, idx, key, idx + 1, val); if (strcmp(key, "name") == 0) { - route.entityName = replaceStringInXml(profiles, val); + route.entityName = replaceStringInXml(profiles, val, name); if (profiles->mMC) { route.entity = profiles->mMC->getEntityIdByName(route.entityName.c_str()); } @@ -1224,12 +1436,12 @@ void CameraParser::parseRouteElement(CameraParser* profiles, const char* name, c mc.routes.push_back(route); } -void CameraParser::parseVideoElement(CameraParser* profiles, const char* /*name*/, +void CameraParser::parseVideoElement(CameraParser* profiles, const char* name, const char** atts) { McVideoNode videoNode; MediaCtlConf& mc = profiles->pCurrentCam->mMediaCtlConfs.back(); - videoNode.name = replaceStringInXml(profiles, atts[1]); + videoNode.name = replaceStringInXml(profiles, atts[1], name); videoNode.videoNodeType = GetNodeType(atts[3]); LOG2("@%s, name:%s, videoNodeType:%d", __func__, videoNode.name.c_str(), videoNode.videoNodeType); @@ -1540,6 +1752,10 @@ int CameraParser::getSupportedFormat(const char* str, vector& supportedForm void CameraParser::handleMediaCtlCfg(CameraParser* profiles, const char* name, const char** atts) { LOG2("@%s, name:%s, atts[0]:%s, profiles->mCurrentSensor:%d", __func__, name, atts[0], profiles->mCurrentSensor); + + if (profiles->mSkipMediaCtlCfg) + return; + if (strcmp(name, "MediaCtlConfig") == 0) { parseMediaCtlConfigElement(profiles, name, atts); } else if (strcmp(name, "link") == 0) { @@ -1917,15 +2133,37 @@ void CameraParser::endParseElement(void* userData, const char* name) { profiles->mNvmDeviceInfo.clear(); - // Merge the content of mMetadata into mCapability. - ParameterHelper::merge(profiles->mMetadata, &profiles->pCurrentCam->mCapability); - profiles->mMetadata.clear(); + bool isCameraAvailable = true; + // Check if the camera is available + if (!profiles->pCurrentCam->mSupportModuleNames.empty()) { + isCameraAvailable = false; + for (size_t i = 0; i < profiles->pCurrentCam->mSupportModuleNames.size(); i++) { + if ((strcmp(pCurrentCam->mSupportModuleNames[i].c_str(), + profiles->pCurrentCam->mCamModuleName.c_str()) == 0) || + (strcmp(pCurrentCam->mSupportModuleNames[i].c_str(), DEFAULT_MODULE_NAME) == + 0)) { + isCameraAvailable = true; + // If find an available sensor, it will not search other sensors + profiles->mIsAvailableSensor = true; + break; + } + } + } + + if (isCameraAvailable) { + // Merge the content of mMetadata into mCapability. + ParameterHelper::merge(profiles->mMetadata, &profiles->pCurrentCam->mCapability); - // For non-extended camera, it should be in order by mCurrentSensor - profiles->mStaticCfg->mCameras.insert( - profiles->mStaticCfg->mCameras.begin() + profiles->mCurrentSensor, - *(profiles->pCurrentCam)); + // For non-extended camera, it should be in order by mCurrentSensor + profiles->mStaticCfg->mCameras.insert( + profiles->mStaticCfg->mCameras.begin() + profiles->mCurrentSensor, + *(profiles->pCurrentCam)); + } else { + profiles->mSensorNum--; + if (profiles->mCurrentSensor > 0) profiles->mCurrentSensor--; + } + profiles->mMetadata.clear(); delete profiles->pCurrentCam; profiles->pCurrentCam = nullptr; } @@ -1934,6 +2172,7 @@ void CameraParser::endParseElement(void* userData, const char* name) { if (strcmp(name, "MediaCtlConfig") == 0) { LOG2("@%s %s, mInMediaCtlCfg is set to false", __func__, name); profiles->mInMediaCtlCfg = false; + profiles->mSkipMediaCtlCfg = false; } if (strcmp(name, "StaticMetadata") == 0) { @@ -1951,6 +2190,63 @@ void CameraParser::endParseElement(void* userData, const char* name) { } if (strcmp(name, "Common") == 0) profiles->mCurrentDataField = FIELD_INVALID; + + if (strcmp(name, "CameraSettings") == 0) { + profiles->mIsAvailableSensor = false; + LOG2("@%s Camera mSensorNum:%d, mCurrentSensor:%d", __func__, profiles->mSensorNum, + profiles->mCurrentSensor); + } +} + +int CameraParser::getCameraModuleNameFromEEPROM(PlatformData::StaticCfg::CameraInfo* cam) { + const int moduleInfoOffset = CAMERA_MODULE_INFO_OFFSET; + FILE* eepromFile = fopen(cam->mNvmDirectory.c_str(), "rb"); + CheckAndLogError(!eepromFile, UNKNOWN_ERROR, "Failed to open EEPROM file in %s", + cam->mNvmDirectory.c_str()); + + // file size should be larger than CAMERA_MODULE_INFO_OFFSET + fseek(eepromFile, 0, SEEK_END); + int nvmDataSize = static_cast(ftell(eepromFile)); + if (nvmDataSize < moduleInfoOffset) { + LOGE("EEPROM data is too small"); + fclose(eepromFile); + return NOT_ENOUGH_DATA; + } + + fseek(eepromFile, -1 * moduleInfoOffset, SEEK_END); + + const int moduleInfoSize = CAMERA_MODULE_INFO_SIZE; + struct CameraModuleInfo cameraModuleInfo; + CLEAR(cameraModuleInfo); + int ret = fread(&cameraModuleInfo, moduleInfoSize, 1, eepromFile); + fclose(eepromFile); + CheckAndLogError(!ret, UNKNOWN_ERROR, "Failed to read module info %d", ret); + + if (strncmp(cameraModuleInfo.mOsInfo, NVM_OS, strlen(NVM_OS)) != 0) { + LOG1("NVM OS string doesn't match with module info"); + return NO_ENTRY; + } + + char tmpName[CAMERA_MODULE_INFO_SIZE]; + snprintf(tmpName, CAMERA_MODULE_INFO_SIZE, "%c%c_%04x", cameraModuleInfo.mModuleVendor[0], + cameraModuleInfo.mModuleVendor[1], cameraModuleInfo.mModuleProduct); + + cam->mCamModuleName.assign(tmpName); + LOG1("%s, aiqb name %s", __func__, cam->mCamModuleName.c_str()); + + char moduleId[CAMERA_MODULE_INFO_SIZE]; + snprintf(moduleId, CAMERA_MODULE_INFO_SIZE, "%c%c%04x", cameraModuleInfo.mModuleVendor[0], + cameraModuleInfo.mModuleVendor[1], cameraModuleInfo.mModuleProduct); + cam->mModuleId.assign(moduleId); + + char sensorId[CAMERA_MODULE_INFO_SIZE]; + snprintf(sensorId, CAMERA_MODULE_INFO_SIZE, "%c%c%04x", cameraModuleInfo.mSensorVendor[0], + cameraModuleInfo.mSensorVendor[1], cameraModuleInfo.mSensorModel); + cam->mSensorId.assign(sensorId); + + LOG1("module id %s, sensor id %s", cam->mModuleId.c_str(), cam->mSensorId.c_str()); + + return OK; } /* the path of NVM device is in /sys/bus/i2c/devices/i2c-'adaptorId'/firmware_node/XXXX/path. */ @@ -1980,8 +2276,8 @@ void CameraParser::getNVMDirectory(CameraParser* profiles) { int size = static_cast(ftell(fp)); fseek(fp, 0, SEEK_SET); std::unique_ptr ptr(new char[size + 1]); - ptr[size] = 0; size_t readSize = fread(ptr.get(), sizeof(char), size, fp); + ptr[readSize] = 0; fclose(fp); if (readSize > 0) { @@ -2015,9 +2311,17 @@ void CameraParser::getNVMDirectory(CameraParser* profiles) { for (auto nvm : profiles->mNvmDeviceInfo) { if (!nvm.directory.empty()) { // The first one in list is prioritized and should be selected. - profiles->pCurrentCam->mNvmDirectory = nvm.directory; + std::string nvmPath; + nvmPath.append(NVM_DATA_PATH); + nvmPath.append(nvm.directory); + if (nvmPath.back() != '/') nvmPath.append("/"); + + nvmPath.append("eeprom"); + LOG2("NVM data is located in %s", nvmPath.c_str()); + profiles->pCurrentCam->mNvmDirectory = nvmPath; profiles->pCurrentCam->mMaxNvmDataSize = nvm.dataSize; - LOG2("NVM dir %s", profiles->pCurrentCam->mNvmDirectory.c_str()); + int ret = getCameraModuleNameFromEEPROM(profiles->pCurrentCam); + LOG2("NVM dir %s, ret %d", profiles->pCurrentCam->mNvmDirectory.c_str(), ret); break; } else { LOGE("Failed to find NVM directory"); @@ -2035,39 +2339,51 @@ void CameraParser::getNVMDirectory(CameraParser* profiles) { * 1. * The value is "'camera name'-wf/uf-'CSI port number'". * For example: camera name is "ov8856". Sensor's sink entity name is - * "Intel IPU6 CSI-2 2" and it is word facing. The value is ov8856-wf-2. + * "Intel IPU6 CSI-2 2" or "Intel IPU6 CSI2 2" and it is world-facing. + * The value is ov8856-wf-2. * 2. the platform value must be uppercase letter. * */ std::vector CameraParser::getAvailableSensors( - const std::string& ipuName, const std::vector& sensorsList) { + const std::string& ipuName, const std::vector& sensorsList, int mediaCfgId) { LOG2("@%s, ipuName:%s", __func__, ipuName.c_str()); - /* if the string doesn't contain -wf- or -uf-, it needn't be parsed */ - if ((sensorsList[0].find("-wf-") == string::npos) && - (sensorsList[0].find("-uf-") == string::npos)) { - return sensorsList; - } - - // sensor's sink entity name prefix:Intel IPU6 CSI-2 2 + // sensor's sink entity name prefix:"Intel IPU6 CSI-2 2" or "Intel IPU6 CSI2 2" std::string sensorSinkName = "Intel "; sensorSinkName.append(ipuName); - sensorSinkName.append(" CSI-2 "); + + if (mediaCfgId == IPU6_UPSTREAM_MEDIA_CFG) + sensorSinkName.append(" CSI2 "); + else + sensorSinkName.append(" CSI-2 "); std::vector availableSensors; for (auto& sensor : sensorsList) { - std::string srcSensor = sensor; - std::string portNum = srcSensor.substr(srcSensor.find_last_of('-') + 1); - std::string sensorSinkNameTmp = sensorSinkName; - sensorSinkNameTmp.append(portNum); - std::string sensorName = srcSensor.substr(0, srcSensor.find_first_of('-')); - - if (mMC && mMC->checkAvailableSensor(sensorName, sensorSinkNameTmp)) { - AvailableSensorInfo sensorInfo = {sensorSinkNameTmp, false}; - availableSensors.push_back(srcSensor); - mAvailableSensor[srcSensor] = sensorInfo; - LOG2("@%s, The availabel sensor name:%s, sensorSinkNameTmp:%s", __func__, - srcSensor.c_str(), sensorSinkNameTmp.c_str()); + if (sensor.find("-") == string::npos) { + // sensors without suffix port number + if (mMC && mMC->checkAvailableSensor(sensor)) { + availableSensors.push_back(sensor); + LOG2("@%s, available sensor name: %s", __func__, sensor.c_str()); +#ifdef LINUX_BUILD + } else if (sensor.find("_usb") != string::npos) { + availableSensors.push_back(sensor); + LOG2("@%s, available usb sensor name: %s", __func__, sensor.c_str()); +#endif + } + } else { + // sensors with suffix port number + std::string portNum = sensor.substr(sensor.find_last_of('-') + 1); + std::string sensorSinkNameTmp = sensorSinkName + portNum; + std::string sensorName = sensor.substr(0, sensor.find_first_of('-')); + std::string sensorOutName = sensor.substr(0, sensor.find_last_of('-')); + + if (mMC && mMC->checkAvailableSensor(sensorName, sensorSinkNameTmp)) { + AvailableSensorInfo sensorInfo = {sensorSinkNameTmp, false}; + availableSensors.push_back(sensorOutName); + mAvailableSensor[sensor] = sensorInfo; + LOG2("@%s, available sensor name: %s, sensorSinkNameTmp:%s", __func__, + sensor.c_str(), sensorSinkNameTmp.c_str()); + } } } @@ -2095,7 +2411,8 @@ void CameraParser::getSensorDataFromXmlFile(void) { // According to sensor name to get sensor data LOG1("%s, available sensors: %zu", __func__, mStaticCfg->mCommonConfig.availableSensors.size()); vector allSensors = getAvailableSensors(mStaticCfg->mCommonConfig.ipuName, - mStaticCfg->mCommonConfig.availableSensors); + mStaticCfg->mCommonConfig.availableSensors, + mStaticCfg->mMediaCfgId); if (allSensors.size() == 0) { LOGW("The style of libcamhal_profile is too old, please switch it as soon as possible !!!"); @@ -2103,13 +2420,7 @@ void CameraParser::getSensorDataFromXmlFile(void) { } for (auto sensor : allSensors) { - string sensorName = "sensors/"; - if ((sensor.find("-wf-") != string::npos) || (sensor.find("-uf-") != string::npos)) { - sensorName.append(sensor.substr(0, sensor.find_last_of('-'))); - } else { - sensorName.append(sensor); - } - sensorName.append(".xml"); + string sensorName = "sensors/" + sensor + ".xml"; LOG1("%s: parse sensor name %s", __func__, sensorName.c_str()); int ret = getDataFromXmlFile(sensorName); CheckAndLogError(ret != OK, VOID_VALUE, "Failed to get sensor profile data from %s", diff --git a/src/platformdata/CameraParser.h b/src/platformdata/CameraParser.h index fa3b39f8..025c424e 100644 --- a/src/platformdata/CameraParser.h +++ b/src/platformdata/CameraParser.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2022 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +36,45 @@ namespace icamera { +#define NVM_OS "CrOS" +/** + * Camera Module Information + * + * Camera Module Information is gotten from the EEPROM, which needs to be programmed with + * an identification block located in the last 32 bytes of the EEPROM. + * + * Support for multiple sensors lookups + * 1.Multiple sensors with the same name in XML. + * You must add supportModuleNames. If you need a default sensor info, + * you must add "default" into supportModuleNames in the last sensor. + * + * Selection Criteria: + * 1)If a module name in NVM matches one of supportModuleNames, + * it will break the loop and don't find others. + * 2)If it find "default" in supportModuleNames, it will break the loop and don't find others. + * (Note:the sensor with default module must be last one) + * + * 2.Multiple sensors with the different name in XML. + * You can't add supportModuleNames. + */ +struct CameraModuleInfo { + char mOsInfo[4]; + uint16_t mCRC; + uint8_t mVersion; + uint8_t mLengthOfFields; + uint16_t mDataFormat; + uint16_t mModuleProduct; + char mModuleVendor[2]; + char mSensorVendor[2]; + uint16_t mSensorModel; + uint8_t mI2cAddress; + uint8_t mReserved[13]; +}; + +#define CAMERA_MODULE_INFO_OFFSET 32 +#define CAMERA_MODULE_INFO_SIZE 32 +#define DEFAULT_MODULE_NAME "default" +#define IPU_ISYS_CAPTURE_ID_MAX 8 /** * \class CameraParser * @@ -58,6 +97,15 @@ class CameraParser : public ParserBase { int mCurrentSensor; std::string mI2CBus; std::string mCsiPort; + + /** + * mCaptureId is used to store Intel IPU6 ISYS Capture Id for each sensor. + * When parse Link, if it has video capture, mCaptureIdLinkIndex will add, and put value + * into mCaptureId. Otherwise, mCaptureIdIndex will add and get value from mCaptureId. + */ + int mCaptureId[IPU_ISYS_CAPTURE_ID_MAX]; + int mCaptureIdLinkIndex; + int mCaptureIdIndex; struct AvailableSensorInfo { std::string sinkEntityName; bool sensorFlag; @@ -65,6 +113,7 @@ class CameraParser : public ParserBase { std::unordered_map mAvailableSensor; PlatformData::StaticCfg::CameraInfo* pCurrentCam; bool mInMediaCtlCfg; + bool mSkipMediaCtlCfg; bool mInStaticMetadata; MediaControl* mMC; CameraMetadata mMetadata; @@ -80,6 +129,8 @@ class CameraParser : public ParserBase { int64_t* mMetadataCache; static const int mMetadataCacheSize = 4096; + bool mIsAvailableSensor; + std::unordered_map mGenericStaticMetadataToTag; void startParseElement(void* userData, const char* name, const char** atts); @@ -91,7 +142,8 @@ class CameraParser : public ParserBase { char** endptr = nullptr); std::vector getAvailableSensors(const std::string& ipuName, - const std::vector& sensorsList); + const std::vector& sensorsList, + int mediaCfgId); void getSensorDataFromXmlFile(void); void getCsiPortAndI2CBus(CameraParser* profiles); void checkField(CameraParser* profiles, const char* name, const char** atts); @@ -134,8 +186,9 @@ class CameraParser : public ParserBase { void parseOutputMap(const char* str, std::vector& outputMap); - std::string replaceStringInXml(CameraParser* profiles, const char* value); + std::string replaceStringInXml(CameraParser* profiles, const char* value, const char* name); void getNVMDirectory(CameraParser* profiles); + int getCameraModuleNameFromEEPROM(PlatformData::StaticCfg::CameraInfo* cam); private: DISALLOW_COPY_AND_ASSIGN(CameraParser); diff --git a/src/platformdata/CameraTypes.h b/src/platformdata/CameraTypes.h index 9d6f2b7a..8b146fe3 100644 --- a/src/platformdata/CameraTypes.h +++ b/src/platformdata/CameraTypes.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,6 +43,12 @@ enum { enum { LENS_VCM_HW = 0, LENS_NONE_HW }; +typedef enum { + SENSOR_MODE_UNKNOWN = 0, + SENSOR_MODE_FULL, + SENSOR_MODE_BINNING +} SensorMode; + enum { SENSOR_EXPOSURE_SINGLE = 0, /* sensor is single exposure */ SENSOR_FIX_EXPOSURE_RATIO, /* Fix exposure ratio between long and short exposure */ @@ -66,11 +72,17 @@ enum { typedef enum { TUNING_MODE_VIDEO, TUNING_MODE_VIDEO_ULL, + // HDR_FEATURE_S + TUNING_MODE_VIDEO_HDR, + TUNING_MODE_VIDEO_HDR2, + TUNING_MODE_VIDEO_HLC, + // HDR_FEATURE_E TUNING_MODE_VIDEO_CUSTOM_AIC, TUNING_MODE_VIDEO_LL, TUNING_MODE_VIDEO_REAR_VIEW, TUNING_MODE_VIDEO_HITCH_VIEW, TUNING_MODE_STILL_CAPTURE, + TUNING_MODE_VIDEO_BINNING, TUNING_MODE_MAX } TuningMode; @@ -127,6 +139,11 @@ typedef struct { uint32_t vertical_scaling_denominator; } SensorFrameParams; +typedef struct { + int8_t edgeStrength; + int8_t nrStrength; +} EdgeNrSetting; + enum ExecutorNotifyPolicy { POLICY_FRAME_FIRST = 0, POLICY_STATS_FIRST, @@ -153,7 +170,7 @@ struct ExecutorDepth { typedef std::pair ShareReferIdDesc; struct PolicyConfig { - int graphId; + std::set graphIds; std::string policyDescription; std::vector pipeExecutorVec; std::vector exclusivePgs; @@ -162,7 +179,6 @@ struct PolicyConfig { bool enableBundleInSdv; PolicyConfig() { - graphId = -1; enableBundleInSdv = true; } }; @@ -173,7 +189,6 @@ struct CommonConfig { float xmlVersion; std::string ipuName; std::vector availableSensors; - bool isGpuTnrEnabled; bool isStillTnrPrior; bool isTnrParamForceUpdate; bool useTnrGlobalProtection; @@ -182,24 +197,23 @@ struct CommonConfig { bool supportIspTuningUpdate; bool supportHwJpegEncode; int maxIsysTimeoutValue; - // ENABLE_EVCP_S - bool isGpuEvcpEnabled; - // ENABLE_EVCP_E + // LEVEL0_ICBM_S + bool isGPUICBMEnabled; + // LEVEL0_ICBM_E CommonConfig() { xmlVersion = 1.0; - isGpuTnrEnabled = false; - isStillTnrPrior = true; + isStillTnrPrior = false; isTnrParamForceUpdate = false; - useTnrGlobalProtection = false; + useTnrGlobalProtection = true; cameraNumber = -1; videoStreamNum = DEFAULT_VIDEO_STREAM_NUM; supportIspTuningUpdate = false; supportHwJpegEncode = true; maxIsysTimeoutValue = 0; - // ENABLE_EVCP_S - isGpuEvcpEnabled = false; - // ENABLE_EVCP_E + // LEVEL0_ICBM_S + isGPUICBMEnabled = false; + // LEVEL0_ICBM_E } }; @@ -231,6 +245,11 @@ struct MultiExpRange { ExpRange SHS3; }; +struct SensitivityRange { + int32_t min; + int32_t max; +}; + struct UserToPslOutputMap { camera_resolution_t User; camera_resolution_t Psl; @@ -254,4 +273,22 @@ typedef enum { DISPERSED, } GraphSettingType; +// PRIVACY_MODE_S +/** + * Indicates which privacy mode the camera supports + */ +typedef enum { + NO_PRIVACY_MODE = 0, + CVF_BASED_PRIVACY_MODE = 1, + AE_BASED_PRIVACY_MODE = 2, +} PrivacyModeType; +// PRIVACY_MODE_E + +// VIRTUAL_CHANNEL_S +struct VcAggregator { + VcAggregator() { mIndex = -1; } + int mIndex; + std::string mName; +}; +// VIRTUAL_CHANNEL_E } /* namespace icamera */ diff --git a/src/platformdata/ParserBase.cpp b/src/platformdata/ParserBase.cpp index 0b362f21..2e437c4b 100644 --- a/src/platformdata/ParserBase.cpp +++ b/src/platformdata/ParserBase.cpp @@ -144,8 +144,10 @@ int ParserBase::getDataFromXmlFile(std::string fileName) { std::string chosenXmlFile; getAvaliableXmlFile(profiles, chosenXmlFile); - CheckAndLogError(chosenXmlFile.empty(), UNKNOWN_ERROR, "%s is not found in: %s or %s", - fileName.c_str(), curFolderFileName.c_str(), sysFolderFileName.c_str()); + if (chosenXmlFile.empty()) { + LOGI("%s is not found", fileName.c_str()); + return UNKNOWN_ERROR; + } return parseXmlFile(chosenXmlFile); } diff --git a/src/platformdata/PlatformData.cpp b/src/platformdata/PlatformData.cpp index 4141685b..37db7486 100644 --- a/src/platformdata/PlatformData.cpp +++ b/src/platformdata/PlatformData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ #include #include +#include #include "CameraParser.h" #include "iutils/CameraLog.h" @@ -61,6 +62,7 @@ PlatformData::PlatformData() { MediaControl* mc = MediaControl::getInstance(); if (mc) { mc->initEntities(); + mStaticCfg.mMediaCfgId = mc->getMediaCfgId(); } CameraParser CameraParser(mc, &mStaticCfg); @@ -92,24 +94,97 @@ int PlatformData::init() { StaticCfg* staticCfg = &(getInstance()->mStaticCfg); for (size_t i = 0; i < staticCfg->mCameras.size(); i++) { - std::string camModuleName; + const std::string& camModuleName = staticCfg->mCameras[i].mCamModuleName; AiqInitData* aiqInitData = new AiqInitData( staticCfg->mCameras[i].sensorName, getCameraCfgPath(), staticCfg->mCameras[i].mSupportedTuningConfig, staticCfg->mCameras[i].mNvmDirectory, - staticCfg->mCameras[i].mMaxNvmDataSize, &camModuleName); + staticCfg->mCameras[i].mMaxNvmDataSize, camModuleName, i); getInstance()->mAiqInitData.push_back(aiqInitData); + staticCfg->getModuleInfoFromCmc(i); + + // Overwrite staticCfg with CameraModuleInfo in sensor xml if (!camModuleName.empty() && staticCfg->mCameras[i].mCameraModuleInfoMap.find(camModuleName) != staticCfg->mCameras[i].mCameraModuleInfoMap.end()) { ParameterHelper::merge(staticCfg->mCameras[i].mCameraModuleInfoMap[camModuleName], &staticCfg->mCameras[i].mCapability); } + + // HDR_FEATURE_S + if (isEnableHDR(i)) { + /* If sensor enable HDR replace media format to full range*/ + bool ret = updateMediaFormat(i, false); + if (ret) { + LOG1("%s, Using full range media format for HDR sensor %s", __func__, + getSensorName(i)); + } + } else { + bool ret = updateMediaFormat(i, true); + if (ret) { + LOG1("%s, Using narrow mode media format for sensor %s", __func__, + getSensorName(i)); + } + } + // HDR_FEATURE_E } return OK; } +void PlatformData::StaticCfg::getModuleInfoFromCmc(int cameraId) { + CameraInfo& info = mCameras[cameraId]; + + if (info.mSupportedTuningConfig.empty()) return; + + // Get default tuning mode and cpf data to update some static capabilities + TuningMode tuningMode = info.mSupportedTuningConfig[0].tuningMode; + ia_binary_data cpfData; + int ret = PlatformData::getCpf(cameraId, tuningMode, &cpfData); + CheckWarning(ret != OK || !cpfData.data || cpfData.size > cca::MAX_CPF_LEN, VOID_VALUE, + "%s, AIQB error data %p size %d (max %d), ret %d", __func__, cpfData.data, + cpfData.size, cca::MAX_CPF_LEN, ret); + + cca::cca_cmc cmc; + cca::cca_cpf* cpf = new cca::cca_cpf; + cpf->size = cpfData.size; + MEMCPY_S(cpf->buf, cca::MAX_CPF_LEN, cpfData.data, cpfData.size); + + ia_err iaRet = IntelCca::getInstance(cameraId, tuningMode)->getCMC(&cmc, cpf); + delete cpf; + IntelCca::releaseInstance(cameraId, tuningMode); + CheckWarning(iaRet != ia_err_none, VOID_VALUE, "Get cmc data failed"); + + LOG1("%s: base iso %d, dg [%4.2f, %4.2f], ag [%4.2f, %4.2f], from aiqb", __func__, cmc.base_iso, + cmc.min_dg, cmc.max_dg, cmc.min_ag, cmc.max_ag); + LOG1("%s: focal_len %d, min_fd %d, ap %d", __func__, cmc.optics.effect_focal_length, + cmc.optics.min_focus_distance, cmc.lut_apertures); + // HDR_FEATURE_S + mCameras[cameraId].mMediaFormat = static_cast(cmc.media_format); + LOG1("%s: media_format %d", __func__, cmc.media_format); + // HDR_FEATURE_E + int32_t maxAg = cmc.base_iso * cmc.max_ag; + const CameraMetadata caps = ParameterHelper::getMetadata(info.mCapability); + CameraMetadata meta; + uint32_t tag = CAMERA_SENSOR_MAX_ANALOG_SENSITIVITY; + icamera_metadata_ro_entry entry = caps.find(tag); + if (!entry.count) { + meta.update(tag, &maxAg, 1); + } + + tag = CAMERA_SENSOR_INFO_SENSITIVITY_RANGE; + entry = caps.find(tag); + if (!entry.count) { + int32_t maxDg = static_cast(cmc.max_dg); + int32_t range[] = {cmc.base_iso, maxAg * maxDg}; + meta.update(tag, range, ARRAY_SIZE(range)); + } + + if (!meta.isEmpty()) { + ParameterHelper::merge(meta, &info.mCapability); + } +} + /** * Read graph descriptor and settings from configuration files. * @@ -146,6 +221,74 @@ int PlatformData::queryGraphSettings(int cameraId, const stream_config_t* stream return OK; } +int PlatformData::getEdgeNrSetting(int cameraId, float totalGain, float hdrRatio, + TuningMode mode, EdgeNrSetting& setting) { + LOG2("%s, tuningmode %d, totalGain %f, hdrRatio %f", __func__, mode, totalGain, hdrRatio); + const StaticCfg::CameraInfo& pCam = getInstance()->mStaticCfg.mCameras[cameraId]; + + auto totalMap = pCam.mTotalGainHdrRatioToEdgeNrMap.find(mode); + if (totalMap == pCam.mTotalGainHdrRatioToEdgeNrMap.end()) return NAME_NOT_FOUND; + + std::map> l1SettingMap; + // found the l1 value + auto l1Map = totalMap->second.equal_range(totalGain); + if (l1Map.second == totalMap->second.begin()) { + l1SettingMap[l1Map.second->first] = l1Map.second->second; + } else if (l1Map.first == totalMap->second.end()) { + --l1Map.first; + l1SettingMap[l1Map.first->first] = l1Map.first->second; + } else if (l1Map.first != l1Map.second) { + l1SettingMap[l1Map.first->first] = l1Map.first->second; + } else { + --l1Map.first; + l1SettingMap[l1Map.first->first] = l1Map.first->second; + l1SettingMap[l1Map.second->first] = l1Map.second->second; + } + + auto interpolation = [](float v, float low, float up, const EdgeNrSetting& l, + const EdgeNrSetting& u) { + EdgeNrSetting result = l; + result.edgeStrength += + static_cast((u.edgeStrength - l.edgeStrength) * (v - low) / (up - low) + 0.5); + result.nrStrength += + static_cast((u.nrStrength - l.nrStrength) * (v - low) / (up - low) + 0.5); + return result; + }; + + for (auto& it : l1SettingMap) { + std::map l2SettingMap; + // found the l2 values + auto l2Map = it.second.equal_range(hdrRatio); + if (l2Map.second == it.second.begin()) { + l2SettingMap[l2Map.second->first] = l2Map.second->second; + } else if (l2Map.first == it.second.end()) { + --l2Map.first; + l2SettingMap[l2Map.first->first] = l2Map.first->second; + } else if (l2Map.first != l2Map.second) { + l2SettingMap[l2Map.first->first] = l2Map.first->second; + } else { + --l2Map.first; + l2SettingMap[l2Map.first->first] = interpolation(hdrRatio, l2Map.first->first, + l2Map.second->first, l2Map.first->second, l2Map.second->second); + } + + it.second = l2SettingMap; + } + + if (l1SettingMap.size() == 1) { + setting = l1SettingMap.begin()->second.begin()->second; + return OK; + } else if (l1SettingMap.size() == 2) { + auto it = l1SettingMap.end(); + --it; + setting = interpolation(totalGain, l1SettingMap.begin()->first, it->first, + l1SettingMap.begin()->second.begin()->second, it->second.begin()->second); + return OK; + } + + return NAME_NOT_FOUND; +} + void PlatformData::releaseGraphConfigNodes() { std::shared_ptr graphConfig = std::make_shared(); graphConfig->releaseGraphNodes(); @@ -154,10 +297,43 @@ void PlatformData::releaseGraphConfigNodes() { } } +int PlatformData::getModuleInfo(int cameraId, std::string& moduleId, std::string& sensorId) { + const StaticCfg::CameraInfo& pCam = getInstance()->mStaticCfg.mCameras[cameraId]; + + if (pCam.mModuleId.empty() || pCam.mSensorId.empty()) return NAME_NOT_FOUND; + + moduleId = pCam.mModuleId; + sensorId = pCam.mSensorId; + + return OK; +} + const char* PlatformData::getSensorName(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].sensorName.c_str(); } +void PlatformData::setBoardName(const std::string& boardName) { + getInstance()->mStaticCfg.mBoardName = boardName; +} + +bool PlatformData::isHDRnetTuningUsed(int cameraId, bool& boardConfig) { + auto& boards = getInstance()->mStaticCfg.mCameras[cameraId].mDisableHDRnetBoards; + auto& boardName = getInstance()->mStaticCfg.mBoardName; + + if (!boards.empty()) boardConfig = true; + + if (boardName.empty()) return true; + + for (auto& board : boards) { + LOG2("mBoardName %s, board %s", boardName.c_str(), board.c_str()); + if (board == boardName) { + return false; + } + } + + return true; +} + const char* PlatformData::getSensorDescription(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].sensorDescription.c_str(); } @@ -170,6 +346,38 @@ int PlatformData::getLensHwType(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mLensHwType; } +void PlatformData::setSensorMode(int cameraId, SensorMode sensorMode) { + // Only change sensor mode when binning mode supported + if (!PlatformData::isBinningModeSupport(cameraId)) return; + getInstance()->mStaticCfg.mCameras[cameraId].mSensorMode = sensorMode; +} + +SensorMode PlatformData::getSensorMode(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mSensorMode; +} + +bool PlatformData::isBinningModeSupport(int cameraId) { + auto pCam = &getInstance()->mStaticCfg.mCameras[cameraId]; + for (auto& cfg : pCam->mSupportedTuningConfig) { + if (cfg.tuningMode == TUNING_MODE_VIDEO_BINNING) { + return true; + } + } + + return false; +} + +int PlatformData::getSensitivityRangeByTuningMode(int cameraId, TuningMode mode, + SensitivityRange& range) { + auto& map = getInstance()->mStaticCfg.mCameras[cameraId].mTuningModeToSensitivityMap; + if (map.find(mode) != map.end()) { + range = map[mode]; + return OK; + } + + return NAME_NOT_FOUND; +} + bool PlatformData::isPdafEnabled(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mEnablePdaf; } @@ -247,6 +455,10 @@ bool PlatformData::isFaceDetectionSupported(int cameraId) { return false; } +bool PlatformData::isSchedulerEnabled(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mSchedulerEnabled; +} + bool PlatformData::isFaceAeEnabled(int cameraId) { return (isFaceDetectionSupported(cameraId) && getInstance()->mStaticCfg.mCameras[cameraId].mFaceAeEnabled); @@ -285,10 +497,14 @@ bool PlatformData::isDvsSupported(int cameraId) { for (auto it : videoStabilizationList) { if (it == VIDEO_STABILIZATION_MODE_ON) { supported = true; + break; } } - LOG2("@%s, dvs supported:%d", __func__, supported); + const icamera::CameraMetadata& meta = icamera::ParameterHelper::getMetadata(*param); + auto entry = meta.find(CAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM); + if (entry.count > 0 && *entry.data.f > 1) supported = true; + return supported; } @@ -296,6 +512,10 @@ bool PlatformData::psysAlignWithSof(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mPsysAlignWithSof; } +int PlatformData::getMsOfPsysAlignWithSystem(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mMsPsysAlignWithSystem; +} + bool PlatformData::psysBundleWithAic(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mPsysBundleWithAic; } @@ -332,15 +552,115 @@ int PlatformData::getExposureNum(int cameraId, bool multiExposure) { } int exposureNum = 1; + // DOL_FEATURE_S + if (PlatformData::isDolShortEnabled(cameraId)) exposureNum++; + + if (PlatformData::isDolMediumEnabled(cameraId)) exposureNum++; + // DOL_FEATURE_E return exposureNum; } bool PlatformData::isLtmEnabled(int cameraId) { + // HDR_FEATURE_S + if (isEnableHDR(cameraId)) { + return true; + } + // HDR_FEATURE_E return getInstance()->mStaticCfg.mCameras[cameraId].mLtmEnabled; } +ia_media_format PlatformData::getMediaFormat(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mMediaFormat; +} + +// HDR_FEATURE_S +bool PlatformData::updateMediaFormat(int cameraId, bool isNarrow) { + ia_media_format tuning_media_format = + getInstance()->mStaticCfg.mCameras[cameraId].mMediaFormat; + ia_media_format media_format = tuning_media_format; + switch (tuning_media_format) { + case media_format_legacy: + media_format = media_format_legacy; + break; + case media_format_srgb_jpeg: + media_format = media_format_srgb_jpeg; + break; + case media_format_linear_mono: + media_format = media_format_linear_mono; + break; + case media_format_custom: + media_format = media_format_custom; + break; + case media_format_bt601_8b: + media_format = isNarrow ? media_format_bt601_8b_narrow : media_format_bt601_8b; + break; + case media_format_bt709_8b: + media_format = isNarrow ? media_format_bt709_8b_narrow : media_format_bt709_8b; + break; + case media_format_bt709_10b: + media_format = isNarrow ? media_format_bt709_10b_narrow : media_format_bt709_10b; + break; + case media_format_bt2020_10b: + media_format = isNarrow ? media_format_bt2020_10b_narrow : media_format_bt2020_10b; + break; + case media_format_bt2100_10b: + media_format = isNarrow ? media_format_bt2100_10b_narrow : media_format_bt2100_10b; + break; + case media_format_bt2100_10b_cl: + media_format = isNarrow ? media_format_bt2100_10b_cl_narrow : media_format_bt2100_10b_cl; + break; + case media_format_bt2020_12b: + media_format = isNarrow ? media_format_bt2020_12b_narrow : media_format_bt2020_12b; + break; + case media_format_bt2100_12b: + media_format = isNarrow ? media_format_bt2100_12b_narrow : media_format_bt2100_12b; + break; + case media_format_bt2100_12b_cl: + media_format = isNarrow ? media_format_bt2100_12b_cl_narrow : media_format_bt2100_12b_cl; + break; + default: + LOG1("invalid media format, default value used."); + return false; + } + LOG1("%s, media format in tuning: %d, media format for aic %d.", __func__, tuning_media_format, + media_format); + getInstance()->mStaticCfg.mCameras[cameraId].mMediaFormat = media_format; + return true; +} + +bool PlatformData::isEnableHDR(int cameraId) { + return (getInstance()->mStaticCfg.mCameras[cameraId].mSensorExposureType != + SENSOR_EXPOSURE_SINGLE); +} + +int PlatformData::getHDRStatsInputBitDepth(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mHdrStatsInputBitDepth; +} + +int PlatformData::getHDRStatsOutputBitDepth(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mHdrStatsOutputBitDepth; +} + +int PlatformData::isUseFixedHDRExposureInfo(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mUseFixedHdrExposureInfo; +} +// HDR_FEATURE_E + +bool PlatformData::isMultiExposureCase(int cameraId, TuningMode tuningMode) { + // HDR_FEATURE_S + if (tuningMode == TUNING_MODE_VIDEO_HDR || tuningMode == TUNING_MODE_VIDEO_HDR2 || + tuningMode == TUNING_MODE_VIDEO_HLC) { + return true; + } else if (getSensorAeEnable(cameraId)) { + return true; + } + // HDR_FEATURE_E + + return false; +} + int PlatformData::getSensorExposureType(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mSensorExposureType; } @@ -357,6 +677,10 @@ unsigned int PlatformData::getInitialSkipFrame(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mInitialSkipFrame; } +unsigned int PlatformData::getInitialPendingFrame(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mInitialPendingFrame; +} + unsigned int PlatformData::getMaxRawDataNum(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mMaxRawDataNum; } @@ -397,18 +721,37 @@ int PlatformData::getAnalogGainLag(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mAnalogGainLag; } -PolicyConfig* PlatformData::getExecutorPolicyConfig(int graphId) { - size_t i = 0; +PolicyConfig* PlatformData::getExecutorPolicyConfig(const std::set& graphIds) { PlatformData::StaticCfg* cfg = &getInstance()->mStaticCfg; + size_t i = 0; + size_t graphCount = graphIds.size(); + PolicyConfig* pCfg = nullptr; for (i = 0; i < cfg->mPolicyConfig.size(); i++) { - if (graphId == cfg->mPolicyConfig[i].graphId) { - return &(cfg->mPolicyConfig[i]); + PolicyConfig& policy = cfg->mPolicyConfig[i]; + // Previous platforms only support cfg with one graph id. + // Find cfg according to the first graphId for them + if (!graphIds.empty() && (*policy.graphIds.begin() == *graphIds.begin())) pCfg = &policy; + + if (policy.graphIds.size() != graphCount) continue; + bool match = true; + for (auto it = graphIds.cbegin(); it != graphIds.cend(); ++it) { + if (policy.graphIds.find(*it) == policy.graphIds.end()) { + match = false; + break; + } + } + if (match) { + return &policy; } } - LOGW("Couldn't find the executor policy for graphId(%d), please check xml file", graphId); - return nullptr; + LOGW("Couldn't find the executor policy in xml, need %lu graphs:", graphIds.size()); + for (auto it = graphIds.begin(); it != graphIds.end(); ++it) { + LOGW(" graph id %d", *it); + } + if (pCfg) LOGW("%s: use cfg with graph id %d", __func__, *pCfg->graphIds.begin()); + return pCfg; } int PlatformData::numberOfCameras() { @@ -425,11 +768,27 @@ MediaCtlConf* PlatformData::getMediaCtlConf(int cameraId) { int PlatformData::getCameraInfo(int cameraId, camera_info_t& info) { info.device_version = 1; - info.facing = getInstance()->mStaticCfg.mCameras[cameraId].mFacing; info.orientation = getInstance()->mStaticCfg.mCameras[cameraId].mOrientation; info.name = getSensorName(cameraId); info.description = getSensorDescription(cameraId); info.capability = &getInstance()->mStaticCfg.mCameras[cameraId].mCapability; + + const CameraMetadata& meta = icamera::ParameterHelper::getMetadata(*info.capability); + auto entry = meta.find(CAMERA_LENS_FACING); + info.facing = FACING_BACK; + if (entry.count == 1) { + info.facing = entry.data.u8[0] == CAMERA_LENS_FACING_BACK ? + FACING_BACK : FACING_FRONT; + } + + // VIRTUAL_CHANNEL_S + info.vc.total_num = 0; + if (getInstance()->mStaticCfg.mCameras[cameraId].mVirtualChannel) { + info.vc.total_num = getInstance()->mStaticCfg.mCameras[cameraId].mVCNum; + info.vc.sequence = getInstance()->mStaticCfg.mCameras[cameraId].mVCSeq; + info.vc.group = getInstance()->mStaticCfg.mCameras[cameraId].mVCGroupId; + } + // VIRTUAL_CHANNEL_E return OK; } @@ -656,6 +1015,84 @@ stream_t PlatformData::getISysOutputByPort(int cameraId, Port port) { return config; } +// DOL_FEATURE_S +int PlatformData::getFixedVbp(int cameraId) { + MediaCtlConf* mc = getMediaCtlConf(cameraId); + if (!mc) { + LOGW("%s: Failed to get MC for fixed VBP, disable fixed VBP.", __func__); + return -1; + } + return mc->vbp; +} + +bool PlatformData::needHandleVbpInMetaData(int cameraId, ConfigMode configMode) { + int fixedVbp; + + if (configMode != CAMERA_STREAM_CONFIGURATION_MODE_HDR) { + return false; + } + + // Fixed VBP take higher priority when both fixed and dynamic VBP are configured + fixedVbp = getFixedVbp(cameraId); + if (fixedVbp >= 0) { + LOG2("%s: fixed VBP configure detected, no need to handle VBP in meta", __func__); + return false; + } + + vector vbpOffset; + PlatformData::getDolVbpOffset(cameraId, vbpOffset); + if (vbpOffset.size() > 0) { + return true; + } + + return false; +} + +bool PlatformData::needSetVbp(int cameraId, ConfigMode configMode) { + int fixedVbp; + + if (configMode != CAMERA_STREAM_CONFIGURATION_MODE_HDR) { + return false; + } + + fixedVbp = getFixedVbp(cameraId); + if (fixedVbp >= 0) { + LOG2("%s: Fixed VBP configure detected, value %d", __func__, fixedVbp); + return true; + } + + vector vbpOffset; + PlatformData::getDolVbpOffset(cameraId, vbpOffset); + if (vbpOffset.size() > 0) { + LOG2("%s: Dynamic VBP configure detected", __func__); + return true; + } + + return false; +} + +void PlatformData::getDolVbpOffset(int cameraId, vector& dolVbpOffset) { + dolVbpOffset = getInstance()->mStaticCfg.mCameras[cameraId].mDolVbpOffset; +} + +bool PlatformData::isDolShortEnabled(int cameraId) { + return isVideoNodeEnabled(cameraId, VIDEO_GENERIC_SHORT_EXPO); +} + +bool PlatformData::isDolMediumEnabled(int cameraId) { + return isVideoNodeEnabled(cameraId, VIDEO_GENERIC_MEDIUM_EXPO); +} +// DOL_FEATURE_E + +// CSI_META_S +bool PlatformData::isCsiMetaEnabled(int cameraId) { + // FILE_SOURCE_S + if (isFileSourceEnabled()) return false; + // FILE_SOURCE_E + return isVideoNodeEnabled(cameraId, VIDEO_CSI_META); +} +// CSI_META_E + bool PlatformData::isAiqdEnabled(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mEnableAiqd; } @@ -953,7 +1390,7 @@ int PlatformData::getConfigModesByOperationMode(int cameraId, uint32_t operation return INVALID_OPERATION; } - CheckAndLogError(getInstance()->mStaticCfg.mCameras[cameraId].mSupportedTuningConfig.empty(), + CheckAndLog1(getInstance()->mStaticCfg.mCameras[cameraId].mSupportedTuningConfig.empty(), INVALID_OPERATION, "@%s, the tuning config in xml does not exist", __func__); if (operationMode == CAMERA_STREAM_CONFIGURATION_MODE_AUTO) { @@ -982,6 +1419,54 @@ int PlatformData::getConfigModesByOperationMode(int cameraId, uint32_t operation return INVALID_OPERATION; } +/* + * This function adds for binning mode tuning support, and there are 2 tuning modes for configMode. + * The first tuning mode will be used when selecting tuning mode. + * When selecting small ISYS output, the binning mode should be moved to first, otherwise full size + * mode should be the first tuning mode. + */ +void PlatformData::reorderSupportedTuningConfig(int cameraId, ConfigMode configMode) { + auto pCam = &getInstance()->mStaticCfg.mCameras[cameraId]; + int binningIdx = -1; + int fullIdx = -1; + int idx = -1; + for (auto& cfg : pCam->mSupportedTuningConfig) { + idx++; + LOG1("%s, tuningMode %d, configMode %x, idx %d", __func__, cfg.tuningMode, cfg.configMode, + idx); + if (cfg.configMode == configMode) { + if (cfg.tuningMode == TUNING_MODE_VIDEO_BINNING) { + binningIdx = idx; + } else { + fullIdx = idx; + } + } + } + + if (binningIdx < 0 || fullIdx < 0) return; + + bool smallSize = false; + MediaCtlConf* mc = PlatformData::getMediaCtlConf(cameraId); + vector res; + // The supported resolutions are saved in res with ascending order(small -> bigger) + getSupportedISysSizes(cameraId, res); + if (!res.empty() && mc) { + for (const auto& output : mc->outputs) { + if (res.back().width > output.width || res.back().height > output.height) { + smallSize = true; + break; + } + } + } + + if ((smallSize && binningIdx > fullIdx) || (!smallSize && binningIdx < fullIdx)) { + // Switch binning mode and full mode + auto config = pCam->mSupportedTuningConfig[fullIdx]; + pCam->mSupportedTuningConfig[fullIdx] = pCam->mSupportedTuningConfig[binningIdx]; + pCam->mSupportedTuningConfig[binningIdx] = config; + } +} + int PlatformData::getTuningModeByConfigMode(int cameraId, ConfigMode configMode, TuningMode& tuningMode) { CheckAndLogError(getInstance()->mStaticCfg.mCameras[cameraId].mSupportedTuningConfig.empty(), @@ -1074,7 +1559,8 @@ bool PlatformData::isCSIBackEndCapture(int cameraId) { for (const auto& node : mc->videoNodes) { if (node.videoNodeType == VIDEO_GENERIC && (node.name.find("BE capture") != string::npos || - node.name.find("BE SOC capture") != string::npos)) { + node.name.find("BE SOC capture") != string::npos || + node.name.find("ISYS capture") != string::npos)) { isCsiBECapture = true; break; } @@ -1090,7 +1576,9 @@ bool PlatformData::isCSIFrontEndCapture(int cameraId) { for (const auto& node : mc->videoNodes) { if (node.videoNodeType == VIDEO_GENERIC && - (node.name.find("CSI-2") != string::npos || node.name.find("TPG") != string::npos)) { + (node.name.find("CSI-2") != string::npos || + node.name.find("TPG") != string::npos || + node.name.find("CSI2") != string::npos)) { isCsiFeCapture = true; break; } @@ -1158,6 +1646,35 @@ vector PlatformData::getMultiExpRanges(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mMultiExpRanges; } +// FILE_SOURCE_S +const char* PlatformData::getInjectedFile() { + const char* PROP_CAMERA_FILE_INJECTION = "cameraInjectFile"; + return getenv(PROP_CAMERA_FILE_INJECTION); +} + +bool PlatformData::isFileSourceEnabled() { + return getInjectedFile() != nullptr; +} +// FILE_SOURCE_E + +// VIRTUAL_CHANNEL_S +int PlatformData::getVirtualChannelSequence(int cameraId) { + if (getInstance()->mStaticCfg.mCameras[cameraId].mVirtualChannel) { + return getInstance()->mStaticCfg.mCameras[cameraId].mVCSeq; + } + + return -1; +} + +int PlatformData::getVcAggregator(int cameraId, struct VcAggregator& aggregator) { + if (getInstance()->mStaticCfg.mCameras[cameraId].mVcAggregator.mIndex >= 0) { + aggregator = getInstance()->mStaticCfg.mCameras[cameraId].mVcAggregator; + return OK; + } + return NO_ENTRY; +} +// VIRTUAL_CHANNEL_E + camera_resolution_t* PlatformData::getPslOutputForRotation(int width, int height, int cameraId) { CheckAndLogError(getInstance()->mStaticCfg.mCameras[cameraId].mOutputMap.empty(), nullptr, "@%s, there isn't pslOutputMapForRotation field in xml.", cameraId, @@ -1175,6 +1692,24 @@ camera_resolution_t* PlatformData::getPslOutputForRotation(int width, int height return nullptr; } +const camera_resolution_t* PlatformData::getPreferOutput(int width, int height, int cameraId) { + if (getInstance()->mStaticCfg.mCameras[cameraId].mPreferOutput.empty()) return nullptr; + + const std::vector& preferOutput = + getInstance()->mStaticCfg.mCameras[cameraId].mPreferOutput; + for (const auto& output : preferOutput) { + // get preferred output for small size + if ((width < output.width || height < output.height) + && (width * output.height == height * output.width)) { + LOG2(" the psl output: (%dx%d) for user: %dx%d", cameraId, output.width, + output.height, width, height); + return &output; + } + } + + return nullptr; +} + bool PlatformData::isTestPatternSupported(int cameraId) { return !getInstance()->mStaticCfg.mCameras[cameraId].mTestPatternMap.empty(); } @@ -1214,9 +1749,10 @@ camera_coordinate_system_t PlatformData::getActivePixelArray(int cameraId) { } string PlatformData::getCameraCfgPath() { - char* p = getenv("CAMERA_CFG_PATH"); + string cfgPath = string(CAMERA_DEFAULT_CFG_PATH); - return p ? string(p) : string(CAMERA_DEFAULT_CFG_PATH); + char* p = getenv("CAMERA_CFG_PATH"); + return p ? string(p) : cfgPath; } string PlatformData::getGraphDescFilePath() { @@ -1282,6 +1818,14 @@ int PlatformData::saveMakernoteData(int cameraId, camera_makernote_mode_t makern sequence, tuningMode); } +void* PlatformData::getMakernoteBuf(int cameraId, camera_makernote_mode_t makernoteMode, + bool& dump) { + CheckAndLogError(cameraId >= static_cast(getInstance()->mAiqInitData.size()), nullptr, + "@%s, bad cameraId:%d", __func__, cameraId); + + return getInstance()->mAiqInitData[cameraId]->getMakernoteBuf(makernoteMode, dump); +} + void PlatformData::updateMakernoteTimeStamp(int cameraId, int64_t sequence, uint64_t timestamp) { CheckAndLogError(cameraId >= static_cast(getInstance()->mAiqInitData.size()), VOID_VALUE, "@%s, bad cameraId:%d", __func__, cameraId); @@ -1334,16 +1878,16 @@ void PlatformData::setScalerInfo(int cameraId, std::vectormStaticCfg.mCommonConfig.isGpuTnrEnabled; -} - int PlatformData::getVideoStreamNum() { return getInstance()->mStaticCfg.mCommonConfig.videoStreamNum; } -bool PlatformData::supportUpdateTuning() { - return getInstance()->mStaticCfg.mCommonConfig.supportIspTuningUpdate; +bool PlatformData::supportUpdateTuning(int cameraId) { + // Check if support UpdateTuning per platform config + if (getInstance()->mStaticCfg.mCommonConfig.supportIspTuningUpdate) return true; + + // check if support UpdateTuning per sensor config + return getInstance()->mStaticCfg.mCameras[cameraId].mIspTuningUpdate; } bool PlatformData::supportHwJpegEncode() { @@ -1356,10 +1900,12 @@ int PlatformData::getMaxIsysTimeout() { bool PlatformData::isUsingGpuAlgo() { bool enabled = false; - enabled |= isGpuTnrEnabled(); - // ENABLE_EVCP_S - enabled |= isGpuEvcpEnabled(); - // ENABLE_EVCP_E + for (int cameraId = static_cast(getInstance()->mStaticCfg.mCameras.size()) - 1; + cameraId >= 0; cameraId--) + enabled |= isGpuTnrEnabled(cameraId); + // LEVEL0_ICBM_S + enabled |= isGPUICBMEnabled(); + // LEVEL0_ICBM_E return enabled; } @@ -1391,6 +1937,15 @@ bool PlatformData::isDummyStillSink(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mDummyStillSink; } +void PlatformData::getTnrThresholdSizes(int cameraId, + std::vector& resolutions) { + resolutions = getInstance()->mStaticCfg.mCameras[cameraId].mTnrThresholdSizes; +} + +bool PlatformData::isGpuTnrEnabled(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mGpuTnrEnabled; +} + bool PlatformData::removeCacheFlushOutputBuffer(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mRemoveCacheFlushOutputBuffer; } @@ -1399,15 +1954,19 @@ bool PlatformData::getPLCEnable(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mPLCEnable; } -// ENABLE_EVCP_S -bool PlatformData::isGpuEvcpEnabled() { - return getInstance()->mStaticCfg.mCommonConfig.isGpuEvcpEnabled; +// PRIVACY_MODE_S +PrivacyModeType PlatformData::getSupportPrivacy(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mSupportPrivacy; +} + +uint32_t PlatformData::getPrivacyModeThreshold(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mPrivacyModeThreshold; } -// ENABLE_EVCP_E -bool PlatformData::getSupportPrivacy(int cameraId) { - return getInstance()->mStaticCfg.mCameras[cameraId].mSupportPrivacy; +uint32_t PlatformData::getPrivacyModeFrameDelay(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mPrivacyModeFrameDelay; } +// PRIVACY_MODE_E bool PlatformData::isStillOnlyPipeEnabled(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mStillOnlyPipe; @@ -1422,4 +1981,26 @@ bool PlatformData::getDisableBLCByAGain(int cameraId, int& low, int& high) { bool PlatformData::isResetLinkRoute(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mResetLinkRoute; } + +int64_t PlatformData::getReqWaitTimeout(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mReqWaitTimeout; +} + +v4l2_buf_type PlatformData::getV4L2BufType(int cameraId) { + return getInstance()->mStaticCfg.mCameras[cameraId].mV4l2BufType; +} + +void PlatformData::setV4L2BufType(int cameraId, v4l2_buf_type v4l2BufType) { + getInstance()->mStaticCfg.mCameras[cameraId].mV4l2BufType = v4l2BufType; +} + +int PlatformData::getMediaCfgId() { + return getInstance()->mStaticCfg.mMediaCfgId; +} + +// LEVEL0_ICBM_S +bool PlatformData::isGPUICBMEnabled() { + return getInstance()->mStaticCfg.mCommonConfig.isGPUICBMEnabled; +} +// LEVEL0_ICBM_E } // namespace icamera diff --git a/src/platformdata/PlatformData.h b/src/platformdata/PlatformData.h index c64666a7..59699f6d 100644 --- a/src/platformdata/PlatformData.h +++ b/src/platformdata/PlatformData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2022 Intel Corporation. + * Copyright (C) 2015-2024 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,7 @@ #include "CameraTypes.h" #include "FaceType.h" #include "ICamera.h" +#include "ia_types.h" #include "IGraphConfig.h" #include "MediaControl.h" #include "Parameters.h" @@ -51,6 +52,9 @@ namespace icamera { #define RESOLUTION_VGA_HEIGHT 480 #define MAX_BUFFER_COUNT (10) +// VIRTUAL_CHANNEL_S +#define MAX_VC_GROUP_NUMBER 8 +// VIRTUAL_CHANNEL_E #define MAX_STREAM_NUMBER 5 #define MAX_WEIGHT_GRID_SIDE_LEN 1024 @@ -59,14 +63,11 @@ namespace icamera { #define FACE_ENGINE_INTEL_PVL 0 #define FACE_ENGINE_GOOGLE_FACESSD 1 -#define DEFAULT_TNR_EXTRA_FRAME_NUM 2 - /* Max number of the RAW buffer number is 32. * Max number size of the pipeline depth is 6. * Max setting count should be larger than raw buffer number + pipeline depth. */ #define MAX_SETTING_COUNT 40 -#define CAMERA_PORT_NAME "CSI-2" #ifdef CAL_BUILD #define MAX_CAMERA_NUMBER 2 @@ -88,11 +89,14 @@ namespace icamera { #define MAX_CAMERA_NUMBER 100 // Temporarily using current path to save aiqd file for none CAL platforms. #define CAMERA_CACHE_DIR "./" -#define CAMERA_DEFAULT_CFG_PATH "/usr/share/defaults/etc/camera/" #define CAMERA_GRAPH_DESCRIPTOR_FILE "gcss/graph_descriptor.xml" #define CAMERA_GRAPH_SETTINGS_DIR "gcss/" #endif +#ifndef CAMERA_DEFAULT_CFG_PATH +#error CAMERA_DEFAULT_CFG_PATH not defined +#endif + #define NVM_DATA_PATH "/sys/bus/i2c/devices/" #define TNR7US_RESTART_THRESHOLD 5 @@ -107,7 +111,8 @@ class PlatformData { public: class StaticCfg { public: - StaticCfg() { mCameras.clear(); } + StaticCfg() + : mMediaCfgId(IPU6_DOWNSTREAM_MEDIA_CFG) { mCameras.clear(); } ~StaticCfg() {} // not release resource by design /** @@ -119,11 +124,23 @@ class PlatformData { : sensorName(""), sensorDescription("unset"), mLensName(""), + // VIRTUAL_CHANNEL_S + mVirtualChannel(false), + mVCNum(0), + mVCSeq(0), + mVCGroupId(-1), + // VIRTUAL_CHANNEL_E mLensHwType(LENS_NONE_HW), + mSensorMode(SENSOR_MODE_UNKNOWN), mEnablePdaf(false), mSensorAwb(false), mSensorAe(false), mRunIspAlways(false), + // HDR_FEATURE_S + mHdrStatsInputBitDepth(0), + mHdrStatsOutputBitDepth(0), + mUseFixedHdrExposureInfo(true), + // HDR_FEATURE_E mLtmEnabled(false), mSensorExposureNum(2), mSensorExposureType(SENSOR_EXPOSURE_SINGLE), @@ -133,10 +150,12 @@ class PlatformData { mAiqRunningInterval(1), mStatsRunningRate(false), mEnableMkn(true), + mIspTuningUpdate(false), mSkipFrameV4L2Error(false), mCITMaxMargin(0), mYuvColorRangeMode(CAMERA_FULL_MODE_YUV_COLOR_RANGE), mInitialSkipFrame(0), + mInitialPendingFrame(0), mMaxRawDataNum(MAX_BUFFER_COUNT), mTopBottomReverse(false), mPsysContinueStats(false), @@ -153,12 +172,12 @@ class PlatformData { mISysFourcc(V4L2_PIX_FMT_SGRBG8), mISysRawFormat(V4L2_PIX_FMT_SGRBG10), mUseCrlModule(true), - mFacing(FACING_BACK), mOrientation(ORIENTATION_0), mSensorOrientation(ORIENTATION_0), mUseSensorDigitalGain(false), mUseIspDigitalGain(false), mNeedPreRegisterBuffers(false), + mMediaFormat(media_format_legacy), // FRAME_SYNC_S mFrameSyncCheckEnabled(false), // FRAME_SYNC_E @@ -169,6 +188,7 @@ class PlatformData { mISYSCompression(false), mPSACompression(false), mOFSCompression(false), + mSchedulerEnabled(false), mFaceAeEnabled(true), mFaceEngineVendor(FACE_ENGINE_INTEL_PVL), mFaceEngineRunningInterval(FACE_ENGINE_DEFAULT_RUNNING_INTERVAL), @@ -177,32 +197,53 @@ class PlatformData { mFaceEngineByIPU(false), mMaxFaceDetectionNumber(MAX_FACES_DETECTABLE), mPsysAlignWithSof(false), + mMsPsysAlignWithSystem(0), mPsysBundleWithAic(false), mSwProcessingAlignWithIsp(false), mMaxNvmDataSize(0), mNvmOverwrittenFileSize(0), - mTnrExtraFrameNum(DEFAULT_TNR_EXTRA_FRAME_NUM), + mTnrExtraFrameNum(0), mDummyStillSink(false), + mGpuTnrEnabled(false), mRemoveCacheFlushOutputBuffer(false), mPLCEnable(false), - mSupportPrivacy(false), + // PRIVACY_MODE_S + mSupportPrivacy(NO_PRIVACY_MODE), + mPrivacyModeThreshold(10), + mPrivacyModeFrameDelay(5), + // PRIVACY_MODE_E mStillOnlyPipe(false), mDisableBLCByAGain(false), mDisableBLCAGainLow(-1), mDisableBLCAGainHigh(-1), - mResetLinkRoute(true) { - } + mResetLinkRoute(true), + mReqWaitTimeout(0), + mV4l2BufType(V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {} std::vector mMediaCtlConfs; std::string sensorName; std::string sensorDescription; std::string mLensName; + // VIRTUAL_CHANNEL_S + bool mVirtualChannel; + int mVCNum; + int mVCSeq; + int mVCGroupId; + VcAggregator mVcAggregator; + // VIRTUAL_CHANNEL_E int mLensHwType; + std::map mTuningModeToSensitivityMap; + SensorMode mSensorMode; bool mEnablePdaf; bool mSensorAwb; bool mSensorAe; bool mRunIspAlways; + // HDR_FEATURE_S + int mHdrStatsInputBitDepth; + int mHdrStatsOutputBitDepth; + bool mUseFixedHdrExposureInfo; + // HDR_FEATURE_E bool mLtmEnabled; int mSensorExposureNum; int mSensorExposureType; @@ -212,12 +253,17 @@ class PlatformData { int mAiqRunningInterval; bool mStatsRunningRate; bool mEnableMkn; + bool mIspTuningUpdate; // first: one algo type in imaging_algorithm_t, second: running rate std::unordered_map mAlgoRunningRateMap; + // DOL_FEATURE_S + std::vector mDolVbpOffset; + // DOL_FEATURE_E bool mSkipFrameV4L2Error; int mCITMaxMargin; camera_yuv_color_range_mode_t mYuvColorRangeMode; unsigned int mInitialSkipFrame; + unsigned int mInitialPendingFrame; unsigned int mMaxRawDataNum; bool mTopBottomReverse; bool mPsysContinueStats; @@ -243,13 +289,14 @@ class PlatformData { std::vector mLardTagsConfig; std::vector mConfigModesForAuto; + std::vector mDisableHDRnetBoards; bool mUseCrlModule; - int mFacing; int mOrientation; int mSensorOrientation; bool mUseSensorDigitalGain; bool mUseIspDigitalGain; bool mNeedPreRegisterBuffers; + ia_media_format mMediaFormat; // FRAME_SYNC_S bool mFrameSyncCheckEnabled; // FRAME_SYNC_E @@ -258,6 +305,12 @@ class PlatformData { std::map mStreamToMcMap; Parameters mCapability; + /* key: TuningMode, + value: map (key: total gain, + value: map (key: hdr ratio, + value: edge and noise settings)) */ + std::map>> mTotalGainHdrRatioToEdgeNrMap; std::string mGraphSettingsFile; GraphSettingType mGraphSettingsType; std::vector mMultiExpRanges; @@ -266,6 +319,7 @@ class PlatformData { bool mISYSCompression; bool mPSACompression; bool mOFSCompression; + bool mSchedulerEnabled; bool mFaceAeEnabled; int mFaceEngineVendor; int mFaceEngineRunningInterval; @@ -274,6 +328,7 @@ class PlatformData { bool mFaceEngineByIPU; unsigned int mMaxFaceDetectionNumber; bool mPsysAlignWithSof; + int mMsPsysAlignWithSystem; // Aligned with system time bool mPsysBundleWithAic; bool mSwProcessingAlignWithIsp; @@ -284,29 +339,50 @@ class PlatformData { // a PG might be incorrect. To be removed after stream id mismatch issue fixed. std::map mConfigModeToStreamId; std::vector mOutputMap; + std::vector mPreferOutput; int mMaxNvmDataSize; std::string mNvmDirectory; int mNvmOverwrittenFileSize; std::string mNvmOverwrittenFile; // overwrite NVM data + std::string mCamModuleName; + std::string mModuleId; + std::string mSensorId; + std::vector mSupportModuleNames; /* key: camera module name, value: camera module info */ std::unordered_map mCameraModuleInfoMap; std::vector mScalerInfo; int mTnrExtraFrameNum; bool mDummyStillSink; + std::vector mTnrThresholdSizes; + bool mGpuTnrEnabled; bool mRemoveCacheFlushOutputBuffer; bool mPLCEnable; - bool mSupportPrivacy; + // PRIVACY_MODE_S + PrivacyModeType mSupportPrivacy; + uint32_t mPrivacyModeThreshold; + uint32_t mPrivacyModeFrameDelay; + // PRIVACY_MODE_E bool mStillOnlyPipe; bool mDisableBLCByAGain; int mDisableBLCAGainLow; int mDisableBLCAGainHigh; bool mResetLinkRoute; + /* mReqWaitTimeout is used to override dqbuf timeout (ns) */ + int64_t mReqWaitTimeout; + v4l2_buf_type mV4l2BufType; }; + /** + * Overwrite staticCfg with info from CMC + */ + void getModuleInfoFromCmc(int cameraId); + std::vector mCameras; std::vector mPolicyConfig; CommonConfig mCommonConfig; + std::string mBoardName; + int mMediaCfgId; }; private: @@ -389,6 +465,17 @@ class PlatformData { */ static int getXmlCameraNumber(); + /** + * get module info of sensor + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param moduleId: the module id of sensor + * \param sensorId: the sensor id of sensor + * + * \return int: return OK if has module info. + */ + static int getModuleInfo(int cameraId, std::string& moduleId, std::string& sensorId); + /** * get the sensor name * @@ -397,6 +484,22 @@ class PlatformData { */ static const char* getSensorName(int cameraId); + /** + * set board name + * + * \param[in] boardName + */ + static void setBoardName(const std::string& boardName); + + /** + * get status if HDRnet tuning used + * + * \param[in] cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param[out] boardConfig: set true if configured + * \return true if HDRnet tuning used, otherwise return false. + */ + static bool isHDRnetTuningUsed(int cameraId, bool& boardConfig); + /** * get the sensor description * @@ -421,6 +524,40 @@ class PlatformData { */ static int getLensHwType(int cameraId); + /** + * get sensor mode + * + * \param[in] cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return SensorMode. + */ + static SensorMode getSensorMode(int cameraId); + + /** + * set sensor mode + * + * \param[in] cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param[in] sensorMode: SensorMode + */ + static void setSensorMode(int cameraId, SensorMode sensorMode); + + /** + * check if binning mode supported + * + * \param[in] cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return true if binning mode supported, otherwise return false. + */ + static bool isBinningModeSupport(int cameraId); + + /** + * get sensitivity range by TuningMode + * + * \param[in] cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param[out] range: SensitivityRange + * \return OK if found, otherwise return NAME_NOT_FOUND. + */ + static int getSensitivityRangeByTuningMode(int cameraId, TuningMode mode, + SensitivityRange& range); + /** * check if PDAF is supported or not * @@ -593,6 +730,66 @@ class PlatformData { */ static bool isLtmEnabled(int cameraId); + /** + * Get media format + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return the value of media format. + */ + static ia_media_format getMediaFormat(int cameraId); + + // HDR_FEATURE_S + /** + * Update media format using isNarrow indicator + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param isNarrow: if the media format is narrow or not + * \return if update sucessfully or not. + */ + static bool updateMediaFormat(int cameraId, bool isNarrow); + + /** + * Check HDR is enabled or not + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return if HDR is enabled or not. + */ + static bool isEnableHDR(int cameraId); + + /** + * Get HDR stats input bit depth + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return the value of HDR stats input bit depth + */ + static int getHDRStatsInputBitDepth(int cameraId); + + /** + * Get HDR stats output bit depth + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return the value of HDR stats output bit depth + */ + static int getHDRStatsOutputBitDepth(int cameraId); + + /** + * Get if HDR exposure info is fixed or not + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return true if HDR exposure info is fixed + */ + static int isUseFixedHDRExposureInfo(int cameraId); + // HDR_FEATURE_E + + /** + * Get if multi exposure cases or not + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param[in] TuningMode: tuningMode + * \return true if multi exposure case + */ + static bool isMultiExposureCase(int cameraId, TuningMode tuningMode); + /** * Get sensor exposure type * @@ -617,6 +814,14 @@ class PlatformData { */ static unsigned int getInitialSkipFrame(int cameraId); + /** + * Get initial pending frame number + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return the value of initial pending frame number + */ + static unsigned int getInitialPendingFrame(int cameraId); + /** * Get max raw data number * @@ -665,6 +870,14 @@ class PlatformData { */ static bool isEnableLtmThread(int cameraId); + /** + * Check if H-Scheduler is enabled + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return if H-Scheduler is enabled + */ + static bool isSchedulerEnabled(int cameraId); + /** * Check face engine is enabled or not * @@ -745,6 +958,14 @@ class PlatformData { */ static bool psysAlignWithSof(int cameraId); + /** + * Get time interval to align psys processing + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return time interval. + */ + static int getMsOfPsysAlignWithSystem(int cameraId); + /** * Check running psys bundle with aic is enabled or not * @@ -800,14 +1021,28 @@ class PlatformData { */ static int getAnalogGainLag(int cameraId); + /** + * Get EdgeNrSetting based on total gain and hdr ratio + * + * \param[in] cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param[in] totalGain: total gain + * \param[in] hdrRatio: hdr ratio + * \param[in] mode: TuningMode + * \param[out] setting: EdgeNrSetting setting + * + * \return OK if setting is available, otherwise return NAME_NOT_FOUND. + */ + static int getEdgeNrSetting(int cameraId, float totalGain, float hdrRatio, + TuningMode mode, EdgeNrSetting& setting); + /** * Get the executor policy config. * - * \param[in] graphId: the graph id + * \param[in] graphIds: the graph ids * * \return PolicyConfig* object if found, otherwise return nullptr. */ - static PolicyConfig* getExecutorPolicyConfig(int graphId); + static PolicyConfig* getExecutorPolicyConfig(const std::set& graphIds); /** * According to stream info to select MC @@ -932,6 +1167,16 @@ class PlatformData { */ static stream_t getISysOutputByPort(int cameraId, Port port); + // CSI_META_S + /** + * get CSI meta enabled status + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return true if CSI meta is enabled, otherwise return false + */ + static bool isCsiMetaEnabled(int cameraId); + // CSI_META_E + /** * get the format by device name * @@ -963,6 +1208,59 @@ class PlatformData { */ static int getDevNameByType(int cameraId, VideoNodeType videoNodeType, std::string& devName); + // DOL_FEATURE_S + /** + * get fixed VBP from currently selected media configure + * VBP is used to parse sensor output frame under DOL mode + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return fixed vbp value + */ + static int getFixedVbp(int cameraId); + + /** + * whether need to handle VBP info from meta data + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param configMode: the real configure mode + * \return true if needed, else false + */ + static bool needHandleVbpInMetaData(int cameraId, ConfigMode configMode); + + /** + * whether need to pass down VBP info + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param configMode: the real configure mode + * \return true if needed, else false + */ + static bool needSetVbp(int cameraId, ConfigMode configMode); + + /** + * Check DOL VBP offset + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param dolVbpOffset: return vbp offset for low and high bytes + */ + static void getDolVbpOffset(int cameraId, std::vector& dolVbpOffset); + + /** + * get CSI BE SOC for Dol short exposure output enabled status + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return true if video node is enabled, otherwise return false + */ + static bool isDolShortEnabled(int cameraId); + + /** + * get CSI BE SOC for Dol medium exposure output enabled status + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return true if video node is enabled, otherwise return false + */ + static bool isDolMediumEnabled(int cameraId); + // DOL_FEATURE_E + /** * Check if ISYS is enabled or not * @@ -1014,6 +1312,14 @@ class PlatformData { static int getConfigModesByOperationMode(int cameraId, uint32_t operationMode, std::vector& configModes); + /** + * to reorder tuning config + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param configMode: type of ConfigMode + */ + static void reorderSupportedTuningConfig(int cameraId, ConfigMode configMode); + /** * to get the TuningMode by Config Mode * @@ -1157,6 +1463,41 @@ class PlatformData { */ static std::vector getMultiExpRanges(int cameraId); + // FILE_SOURCE_S + /** + * Get the injected file. + * + * \return the injected file or nullptr if cameraInjectFile isn't set. + */ + static const char* getInjectedFile(); + + /** + * Check if FileSource is enabled. + * + * \return true cameraInjectFile is set, otherwise return false. + */ + static bool isFileSourceEnabled(); + // FILE_SOURCE_E + + // VIRTUAL_CHANNEL_S + /** + * Get virtual channel sequence + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return sequence if Virtual channel supported, otherwise return -1. + */ + static int getVirtualChannelSequence(int cameraId); + + /** + * Get aggregator info + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param aggregator: Struct VcAggregator + * \return OK if found, otherwise return NO_ENTRY. + */ + static int getVcAggregator(int cameraId, struct VcAggregator& aggregator); + // VIRTUAL_CHANNEL_E + /** * Get the psl output resolution * @@ -1167,6 +1508,16 @@ class PlatformData { */ static camera_resolution_t* getPslOutputForRotation(int width, int height, int cameraId); + /** + * Get preferred output size + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param width: The width of user requirement + * \param height: The height of user requirement + * \return the output resolution if provides it in xml file, otherwise return nullptr. + */ + const static camera_resolution_t* getPreferOutput(int width, int height, int cameraId); + /** * Check if test pattern is supported or not * @@ -1283,6 +1634,18 @@ class PlatformData { static int saveMakernoteData(int cameraId, camera_makernote_mode_t makernoteMode, int64_t sequence, TuningMode tuningMode); + /** + * \brief Get Makernote buffer + * + * \param[in] cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param[in] makernoteMode: makernote mode + * \param[out] dump: return dump if in dump case + * + * \return the pointer of makernote buffer + */ + static void* getMakernoteBuf(int cameraId, camera_makernote_mode_t makernoteMode, + bool& dump); + /** * \brief Update Makernote timestamp. * @@ -1327,7 +1690,7 @@ class PlatformData { * * \return true if tnr is enabled. */ - static bool isGpuTnrEnabled(); + static bool isGpuTnrEnabled(int cameraId); /** * get the video stream number supported @@ -1338,8 +1701,10 @@ class PlatformData { /** * Check if support to update tuning data or not + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] */ - static bool supportUpdateTuning(); + static bool supportUpdateTuning(int cameraId); /** * Check if support hardware jpeg encode or not @@ -1402,6 +1767,12 @@ class PlatformData { */ static bool isDummyStillSink(int cameraId); + /** + * get the tnr resolution list + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + */ + static void getTnrThresholdSizes(int cameraId, std::vector& resolutions); /* * check if removing cache flush output buffer * @@ -1418,21 +1789,28 @@ class PlatformData { */ static bool getPLCEnable(int cameraId); - // ENABLE_EVCP_S + // PRIVACY_MODE_S + /** + * Check which privacy mode the camera supports + * + * \return privacy mode type. + */ + static PrivacyModeType getSupportPrivacy(int cameraId); + /** - * Check GPU EVCP is enabled or not + * Get the threshold of luminance in AE-based privacy mode. * - * \return true if EVCP is enabled. + * \return Threshold */ - static bool isGpuEvcpEnabled(); - // ENABLE_EVCP_E + static uint32_t getPrivacyModeThreshold(int cameraId); /** - * Check supports privacy or not + * Get the threshold of frame delay in AE-based privacy mode. * - * \return true if supports privacy. + * \return Threshold */ - static bool getSupportPrivacy(int cameraId); + static uint32_t getPrivacyModeFrameDelay(int cameraId); + // PRIVACY_MODE_E /** * Check support of still-only pipe is enabled or not @@ -1455,5 +1833,45 @@ class PlatformData { * \return if reset links and routes */ static bool isResetLinkRoute(int cameraId); + + /** + * Get use defined timeout val for dqbuf + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return timeout interval for dqbuf in ns (2000000000 for 2s) + */ + static int64_t getReqWaitTimeout(int cameraId); + + /** + * Get V4L2 buffer type + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \return V4L2 buffer type + */ + static v4l2_buf_type getV4L2BufType(int cameraId); + + /** + * Set V4L2 buffer type + * + * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] + * \param v4l2BufType:V4L2 buffer type + */ + static void setV4L2BufType(int cameraId, v4l2_buf_type v4l2BufType); + + /** + * Get media configuration ID + * + * \return media configuration ID + */ + static int getMediaCfgId(); + + // LEVEL0_ICBM_S + /** + * Check GPU ICBM is enabled or not + * + * \return true if ICBM is enabled. + */ + static bool isGPUICBMEnabled(); + // LEVEL0_ICBM_E }; } /* namespace icamera */ diff --git a/src/platformdata/PolicyParser.cpp b/src/platformdata/PolicyParser.cpp index 5fd8835e..97498fe5 100644 --- a/src/platformdata/PolicyParser.cpp +++ b/src/platformdata/PolicyParser.cpp @@ -59,8 +59,8 @@ void PolicyParser::checkField(PolicyParser* profiles, const char* name, const ch const char* key = atts[idx]; const char* val = atts[idx + 1]; LOG2("@%s, name:%s, atts[%d]:%s, atts[%d]:%s", __func__, name, idx, key, idx + 1, val); - if (strcmp(key, "id") == 0) { - profiles->pCurrentConf->graphId = atoi(val); + if (strcmp(key, "id") == 0 || strcmp(key, "video") == 0 || strcmp(key, "still") == 0) { + profiles->pCurrentConf->graphIds.insert(atoi(val)); } else if (strcmp(key, "description") == 0) { profiles->pCurrentConf->policyDescription = val; } @@ -272,7 +272,7 @@ void PolicyParser::endParseElement(void* userData, const char* name) { PolicyParser* profiles = reinterpret_cast(userData); if (strcmp(name, "graph") == 0) { - LOG2("@%s, add policyConf, graphId: %d", __func__, profiles->pCurrentConf->graphId); + LOG2("@%s, add policyConf", __func__); profiles->mStaticCfg->mPolicyConfig.push_back(*(profiles->pCurrentConf)); delete profiles->pCurrentConf; profiles->pCurrentConf = nullptr; diff --git a/src/platformdata/gc/GraphConfig.cpp b/src/platformdata/gc/GraphConfig.cpp index e70ba79e..266b67f6 100644 --- a/src/platformdata/gc/GraphConfig.cpp +++ b/src/platformdata/gc/GraphConfig.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2024 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,8 @@ #include "src/platformdata/gc/GraphConfig.h" +#include + #include "PlatformData.h" #include "iutils/CameraLog.h" @@ -64,8 +66,29 @@ status_t GraphConfig::queryGraphSettings(const std::vector& activeSt status_t GraphConfig::configStreams(const vector& activeStreams) { LOG1("@%s", __func__); + vector res; + PlatformData::getTnrThresholdSizes(mCameraId, res); + + // enable tnr dummy sink on resolution size larger than threshold + bool highResolution = res.size() > 0 ? false : true; + if (res.size() > 0) { + for (auto& stream : activeStreams) { + if (static_cast(stream->mHeight) * static_cast(stream->mWidth) > + res.begin()->height * res.begin()->width) { + highResolution = true; + break; + } + } + } + + SensorMode sensorMode = SENSOR_MODE_UNKNOWN; + if (PlatformData::isBinningModeSupport(mCameraId)) { + sensorMode = PlatformData::getSensorMode(mCameraId); + } + bool dummyStillSink = PlatformData::isDummyStillSink(mCameraId); - int ret = mGraphConfigImpl->configStreams(activeStreams, dummyStillSink); + int ret = mGraphConfigImpl->configStreams(activeStreams, dummyStillSink && highResolution, + sensorMode); CheckAndLogError(ret != OK, UNKNOWN_ERROR, "%s, Failed to config streams", __func__); ret = mGraphConfigImpl->getGraphConfigData(&mGraphData); @@ -76,21 +99,26 @@ status_t GraphConfig::configStreams(const vector& activeStreams) { } status_t GraphConfig::getGdcKernelSetting(uint32_t* kernelId, - ia_isp_bxt_resolution_info_t* resolution) { + ia_isp_bxt_resolution_info_t* resolution, + int32_t streamId) { CheckAndLogError(!kernelId || !resolution, UNKNOWN_ERROR, "kernelId or resolution is nullptr"); - if ((mGraphData.gdcReso.input_width == 0) || (mGraphData.gdcReso.input_height == 0) || - (mGraphData.gdcReso.output_width == 0) || (mGraphData.gdcReso.output_height == 0)) { - LOG2("%s, Failed to get gdc InReso: w: %d, h: %d; OutReso: w: %d, h: %d; ", __func__, - mGraphData.gdcReso.input_width, mGraphData.gdcReso.input_height, - mGraphData.gdcReso.output_width, mGraphData.gdcReso.output_height); - return NO_ENTRY; + for (const auto& item : mGraphData.gdcInfos) { + if (item.streamId == streamId) { + if ((item.gdcReso.input_width == 0) || (item.gdcReso.input_height == 0) || + (item.gdcReso.output_width == 0) || (item.gdcReso.output_height == 0)) { + LOG2("%s, Failed to get gdc InReso: w: %d, h: %d; OutReso: w: %d, h: %d", __func__, + item.gdcReso.input_width, item.gdcReso.input_height, + item.gdcReso.output_width, item.gdcReso.output_height); + return NO_ENTRY; + } + *kernelId = item.gdcKernelId; + *resolution = item.gdcReso; + return OK; + } } - *kernelId = mGraphData.gdcKernelId; - *resolution = mGraphData.gdcReso; - - return OK; + return INVALID_OPERATION; } status_t GraphConfig::graphGetStreamIds(vector& streamIds) { @@ -139,6 +167,15 @@ int GraphConfig::getPgIdByPgName(string pgName) { return -1; } +// DOL_FEATURE_S +int GraphConfig::getDolInfo(float& gain, string& mode) { + gain = mGraphData.dolInfo.conversionGain; + mode = mGraphData.dolInfo.dolMode; + + return OK; +} +// DOL_FEATURE_E + ia_isp_bxt_program_group* GraphConfig::getProgramGroup(int32_t streamId) { CheckAndLogError(mGraphData.programGroup.empty(), nullptr, "%s, The programGroup vector is empty", __func__); diff --git a/src/platformdata/gc/GraphConfig.h b/src/platformdata/gc/GraphConfig.h index d7728d5b..2d07176b 100644 --- a/src/platformdata/gc/GraphConfig.h +++ b/src/platformdata/gc/GraphConfig.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ #include #include #include +#include #include "HalStream.h" #include "iutils/Errors.h" @@ -56,15 +57,23 @@ class GraphConfig : public IGraphConfig { status_t queryGraphSettings(const std::vector& activeStreams); status_t configStreams(const std::vector& activeStreams); int getSelectedMcId() { return mGraphData.mcId; } - virtual int getGraphId(void) { return mGraphData.graphId; } + virtual int getGraphIds(std::set& graphIds) { + graphIds = mGraphData.graphIds; + return OK; + } + virtual void getCSIOutputResolution(camera_resolution_t& reso) { reso = mGraphData.csiReso; } virtual status_t getGdcKernelSetting(uint32_t* kernelId, - ia_isp_bxt_resolution_info_t* resolution); + ia_isp_bxt_resolution_info_t* resolution, + int32_t streamId = VIDEO_STREAM_ID); virtual status_t graphGetStreamIds(std::vector& streamIds); virtual int getStreamIdByPgName(std::string pgName); virtual int getPgIdByPgName(std::string pgName); virtual int getTuningModeByStreamId(const int32_t streamId); + // DOL_FEATURE_S + virtual int getDolInfo(float& gain, std::string& mode); + // DOL_FEATURE_E virtual ia_isp_bxt_program_group* getProgramGroup(int32_t streamId); virtual status_t getPgRbmValue(std::string pgName, IGraphType::StageAttr* stageAttr); virtual status_t getMBRData(int32_t streamId, ia_isp_bxt_gdc_limits* data); diff --git a/src/platformdata/gc/HalStream.h b/src/platformdata/gc/HalStream.h index 0393d62a..eab67208 100644 --- a/src/platformdata/gc/HalStream.h +++ b/src/platformdata/gc/HalStream.h @@ -16,6 +16,8 @@ #pragma once +#include + namespace icamera { // Temporary solution diff --git a/src/platformdata/gc/IGraphConfig.h b/src/platformdata/gc/IGraphConfig.h index 8f343035..bf490da2 100644 --- a/src/platformdata/gc/IGraphConfig.h +++ b/src/platformdata/gc/IGraphConfig.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ #pragma once #include +#include #include "HalStream.h" #include "Parameters.h" #include "iutils/CameraLog.h" @@ -40,14 +41,21 @@ typedef std::vector NodesPtrVector; namespace icamera { -#ifdef TNR7_CM // Stream id associated with video stream. +#if defined(TNR7_CM) && defined (IPU_SYSVER_ipu6v3) +// on JSL with tnr7CM static const int32_t VIDEO_STREAM_ID = 60006; #else static const int32_t VIDEO_STREAM_ID = 60001; #endif // Stream id associated with still capture with gpu tnr. +#ifdef IPU_SYSVER_ipu6v3 +// on JSL with tnr7CM static const int32_t STILL_TNR_STREAM_ID = 60009; +#else +// on ADL with tnr7CM or Level0 +static const int32_t STILL_TNR_STREAM_ID = 60013; +#endif // Stream id associated with still capture. static const int32_t STILL_STREAM_ID = 60000; @@ -135,6 +143,14 @@ struct PgInfo { StageAttr rbmValue; }; +// DOL_FEATURE_S +struct DolInfo { + DolInfo() : conversionGain(0.0) {} + float conversionGain; + std::string dolMode; +}; +// DOL_FEATURE_E + struct MbrInfo { MbrInfo() { streamId = -1; @@ -158,21 +174,31 @@ struct TuningModeInfo { int32_t tuningMode; }; +struct GdcInfo { + int32_t streamId; + uint32_t gdcKernelId; + ia_isp_bxt_resolution_info_t gdcReso; + GdcInfo() : streamId(0), gdcKernelId(-1) { + CLEAR(gdcReso); + } +}; + struct GraphConfigData { int mcId; - int graphId; - uint32_t gdcKernelId; + std::set graphIds; + // DOL_FEATURE_S + DolInfo dolInfo; + // DOL_FEATURE_E camera_resolution_t csiReso; - ia_isp_bxt_resolution_info_t gdcReso; + std::vector gdcInfos; std::vector streamIds; std::vector pgInfo; std::vector mbrInfo; std::vector pgNames; std::vector programGroup; std::vector tuningModes; - GraphConfigData() : mcId(-1), graphId(-1), gdcKernelId(-1) { + GraphConfigData() : mcId(-1) { CLEAR(csiReso); - CLEAR(gdcReso); } }; @@ -194,12 +220,16 @@ class IGraphConfig { virtual void getCSIOutputResolution(camera_resolution_t& reso) = 0; virtual status_t getGdcKernelSetting(uint32_t* kernelId, - ia_isp_bxt_resolution_info_t* resolution) = 0; + ia_isp_bxt_resolution_info_t* resolution, + int32_t streamId = VIDEO_STREAM_ID) = 0; virtual status_t graphGetStreamIds(std::vector& streamIds) = 0; - virtual int getGraphId(void) = 0; + virtual int getGraphIds(std::set& graphIds) = 0; virtual int getStreamIdByPgName(std::string pgName) = 0; virtual int getTuningModeByStreamId(const int32_t streamId) = 0; virtual int getPgIdByPgName(std::string pgName) = 0; + // DOL_FEATURE_S + virtual int getDolInfo(float& gain, std::string& mode) = 0; + // DOL_FEATURE_E virtual ia_isp_bxt_program_group* getProgramGroup(int32_t streamId) = 0; virtual status_t getMBRData(int32_t streamId, ia_isp_bxt_gdc_limits* data) = 0; virtual status_t getPgRbmValue(std::string pgName, IGraphType::StageAttr* stageAttr) { diff --git a/src/platformdata/gc/custom_gcss_keys.h b/src/platformdata/gc/custom_gcss_keys.h index deaa2377..0bab7178 100644 --- a/src/platformdata/gc/custom_gcss_keys.h +++ b/src/platformdata/gc/custom_gcss_keys.h @@ -45,6 +45,9 @@ GCSS_KEY(VIDEO2, video2) GCSS_KEY(STILL0, still0) GCSS_KEY(STILL1, still1) GCSS_KEY(STILL2, still2) +GCSS_KEY(STILLTNR0, stilltnr0) +GCSS_KEY(STILLTNR1, stilltnr1) +GCSS_KEY(STILLTNR2, stilltnr2) GCSS_KEY(RAW, raw) GCSS_KEY(OP_MODE, op_mode) GCSS_KEY(MC_ID, mc_id) diff --git a/src/scheduler/Android.mk b/src/scheduler/Android.mk new file mode 100644 index 00000000..20193b8f --- /dev/null +++ b/src/scheduler/Android.mk @@ -0,0 +1,19 @@ +# +#Copyright(C) 2022 Intel Corporation +# +#Licensed under the Apache License, Version 2.0(the "License"); +#you may not use this file except in compliance with the License. +#You may obtain a copy of the License at +# +#http: // www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, software +#distributed under the License is distributed on an "AS IS" BASIS, +#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +#See the License for the specific language governing permissions and +#limitations under the License. +# + +LOCAL_SRC_FILES += \ + src/scheduler/CameraScheduler.cpp \ + src/scheduler/CameraSchedulerPolicy.cpp diff --git a/src/scheduler/CMakeLists.txt b/src/scheduler/CMakeLists.txt new file mode 100644 index 00000000..f29d0a0a --- /dev/null +++ b/src/scheduler/CMakeLists.txt @@ -0,0 +1,20 @@ +# +#Copyright(C) 2022 Intel Corporation +# +#Licensed under the Apache License, Version 2.0(the "License"); +#you may not use this file except in compliance with the License. +#You may obtain a copy of the License at +# +#http: // www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, software +#distributed under the License is distributed on an "AS IS" BASIS, +#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +#See the License for the specific language governing permissions and +#limitations under the License. +# + +set(SCHEDULER_SRCS + ${SCHEDULER_DIR}/CameraScheduler.cpp + ${SCHEDULER_DIR}/CameraSchedulerPolicy.cpp + CACHE INTERNAL "scheduler sources") diff --git a/src/scheduler/CameraScheduler.cpp b/src/scheduler/CameraScheduler.cpp new file mode 100644 index 00000000..df543a45 --- /dev/null +++ b/src/scheduler/CameraScheduler.cpp @@ -0,0 +1,189 @@ +/* + * Copyright (C) 2022-2023 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG Scheduler + +#include "src/scheduler/CameraScheduler.h" + +#include +#include +#include + +#include "iutils/CameraLog.h" +#include "iutils/Errors.h" + +namespace icamera { + +CameraScheduler::CameraScheduler() : mTriggerCount(0) { + mPolicy = CameraSchedulerPolicy::getInstance(); +} + +CameraScheduler::~CameraScheduler() { + destoryExecutors(); +} + +int32_t CameraScheduler::configurate(const std::set& graphIds) { + int ret = mPolicy->setConfig(graphIds); + CheckAndLogError(ret != OK, ret, "configurate error"); + + mTriggerCount = 0; + destoryExecutors(); + return createExecutors(); +} + +int32_t CameraScheduler::createExecutors() { + std::map executors; + int32_t exeNumber = mPolicy->getExecutors(&executors); + CheckAndLogError(exeNumber <= 0, UNKNOWN_ERROR, "Can't get Executors' names"); + + std::lock_guard l(mLock); + for (auto& exe : executors) { + ExecutorGroup group; + group.executor = std::shared_ptr(new Executor(exe.first)); + group.triggerSource = exe.second; + if (!group.triggerSource.empty()) { + // Check if trigger source is one executor + std::shared_ptr source = findExecutor(group.triggerSource.c_str()); + if (source) source->addListener(group.executor); + } + mPolicy->getNodeList(exe.first, &group.nodeList); + + mExeGroups.push_back(group); + group.executor->run(exe.first, PRIORITY_NORMAL); + } + return OK; +} + +void CameraScheduler::destoryExecutors() { + std::lock_guard l(mLock); + mRegisteredNodes.clear(); + mExeGroups.clear(); +} + +int32_t CameraScheduler::registerNode(ISchedulerNode* node) { + std::lock_guard l(mLock); + + ExecutorGroup* group = nullptr; + for (size_t i = 0; i < mExeGroups.size(); i++) { + for (auto& nodeName : mExeGroups[i].nodeList) { + if (strcmp(nodeName.c_str(), node->getName()) == 0) { + group = &mExeGroups[i]; + break; + } + } + } + CheckWarning(!group, BAD_VALUE, "register node %s fail", node->getName()); + + group->executor->addNode(node); + mRegisteredNodes[node] = group; + return OK; +} + +void CameraScheduler::unregisterNode(ISchedulerNode* node) { + std::lock_guard l(mLock); + if (mRegisteredNodes.find(node) != mRegisteredNodes.end()) { + mRegisteredNodes[node]->executor->removeNode(node); + mRegisteredNodes.erase(node); + } +} + +int32_t CameraScheduler::executeNode(std::string triggerSource, int64_t triggerId) { + mTriggerCount++; + for (auto& group : mExeGroups) { + if (group.triggerSource == triggerSource) + group.executor->trigger(triggerId < 0 ? mTriggerCount : triggerId); + } + return OK; +} + +std::shared_ptr CameraScheduler::findExecutor(const char* exeName) { + if (!exeName) return nullptr; + + for (auto& group : mExeGroups) { + if (strcmp(group.executor->getName(), exeName) == 0) return group.executor; + } + + return nullptr; +} + +CameraScheduler::Executor::Executor(const char* name) + : mName(name ? name : "unknown"), + mActive(false), + mTriggerTick(0) {} + +CameraScheduler::Executor::~Executor() { + LOG1("%s: destory", getName()); + requestExit(); +} + +void CameraScheduler::Executor::addNode(ISchedulerNode* node) { + std::lock_guard l(mNodeLock); + mNodes.push_back(node); + LOG1("%s: %s added to %s, pos %d", __func__, node->getName(), getName(), mNodes.size()); +} + +void CameraScheduler::Executor::removeNode(ISchedulerNode* node) { + std::lock_guard l(mNodeLock); + for (size_t i = 0; i < mNodes.size(); i++) { + if (mNodes[i] == node) { + LOG1("%s: %s moved from %s", __func__, node->getName(), getName()); + mNodes.erase(mNodes.begin() + i); + break; + } + } +} + +void CameraScheduler::Executor::trigger(int64_t tick) { + PERF_CAMERA_ATRACE_PARAM1(getName(), tick); + std::lock_guard l(mNodeLock); + mActive = true; + mTriggerTick = tick; + mTriggerSignal.signal(); +} + +void CameraScheduler::Executor::requestExit() { + LOG2("%s: requestExit", getName()); + mActive = false; + icamera::Thread::requestExit(); + std::lock_guard l(mNodeLock); + mTriggerSignal.signal(); +} + +bool CameraScheduler::Executor::threadLoop() { + int64_t tick = -1; + { + ConditionLock lock(mNodeLock); + int ret = mTriggerSignal.waitRelative(lock, kWaitDuration * SLOWLY_MULTIPLIER); + CheckWarning(ret == TIMED_OUT && !mNodes.empty(), true, "%s: wait trigger time out", + getName()); + tick = mTriggerTick; + } + if (!mActive) return false; + + for (auto& node : mNodes) { + LOG2("%s process %ld", getName(), tick); + bool ret = node->process(tick); + CheckAndLogError(!ret, true, "%s: node %s process error", getName(), node->getName()); + } + + for (auto& listener : mListeners) { + LOG2("%s: trigger listener %s", getName(), listener->getName()); + listener->trigger(tick); + } + return true; +} + +} // namespace icamera diff --git a/src/scheduler/CameraScheduler.h b/src/scheduler/CameraScheduler.h new file mode 100644 index 00000000..2bc6ccce --- /dev/null +++ b/src/scheduler/CameraScheduler.h @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2022-2023 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +#include "CameraEvent.h" +#include "CameraSchedulerPolicy.h" +#include "ISchedulerNode.h" + +namespace icamera { + +/** + * \class CameraScheduler + * + * The call sequence as follows: + * 1. configure(); + * 2. registerNode(); + * 3. loop: executeNode(); + * 4. unregisterNode(); (optional) + */ +class CameraScheduler { + public: + CameraScheduler(); + ~CameraScheduler(); + + int32_t configurate(const std::set& graphIds); + + int32_t registerNode(ISchedulerNode* node); + void unregisterNode(ISchedulerNode* node); + + /** + * triggerSource: + * emptry string: no designated source, will trigger executors WITHOUT trigger sources + * in configuration file. + * triggerId: + * >= 0: will be passed to ISchedulerNode for processing sync. + * others: Provide internal trigger count. + */ + int32_t executeNode(std::string triggerSource, int64_t triggerId = -1); + + private: + class Executor : public icamera::Thread { + public: + explicit Executor(const char* name); + ~Executor(); + + virtual bool threadLoop(); + virtual void requestExit(); + + void addNode(ISchedulerNode*); + void removeNode(ISchedulerNode* node); + void addListener(std::shared_ptr executor) { mListeners.push_back(executor); } + void trigger(int64_t tick); + + const char* getName() { return mName.c_str(); } + + private: + static const nsecs_t kWaitDuration = 2000000000; // 2s + + std::string mName; + + std::mutex mNodeLock; + std::vector mNodes; + std::vector> mListeners; + Condition mTriggerSignal; + bool mActive; + int64_t mTriggerTick; + + private: + DISALLOW_COPY_AND_ASSIGN(Executor); + }; + + private: + int32_t createExecutors(); + void destoryExecutors(); + + std::shared_ptr findExecutor(const char* exeName); + + private: + struct ExecutorGroup { + std::shared_ptr executor; + std::string triggerSource; // emptry string means no designated source + std::vector nodeList; + }; + + std::mutex mLock; + std::vector mExeGroups; + // Record owner exe of nodes (after policy switch) + std::unordered_map mRegisteredNodes; + + int64_t mTriggerCount; + + private: + CameraSchedulerPolicy* mPolicy; + + private: + DISALLOW_COPY_AND_ASSIGN(CameraScheduler); +}; + +} // namespace icamera diff --git a/src/scheduler/CameraSchedulerPolicy.cpp b/src/scheduler/CameraSchedulerPolicy.cpp new file mode 100644 index 00000000..212bc307 --- /dev/null +++ b/src/scheduler/CameraSchedulerPolicy.cpp @@ -0,0 +1,204 @@ +/* + * Copyright (C) 2022-2023 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG SchedPolicy + +#include "src/scheduler/CameraSchedulerPolicy.h" + +#include +#include +#include + +#include "iutils/CameraLog.h" +#include "iutils/Errors.h" + +namespace icamera { + +#define SCHEDULER_POLICY_FILE_NAME "pipe_scheduler_profiles.xml" + +CameraSchedulerPolicy* CameraSchedulerPolicy::sInstance = nullptr; +Mutex CameraSchedulerPolicy::sLock; + +CameraSchedulerPolicy* CameraSchedulerPolicy::getInstance() { + AutoMutex lock(sLock); + if (!sInstance) { + sInstance = new CameraSchedulerPolicy(); + } + return sInstance; +} + +void CameraSchedulerPolicy::releaseInstance() { + AutoMutex lock(sLock); + if (sInstance) { + delete sInstance; + sInstance = nullptr; + } +} + +CameraSchedulerPolicy::CameraSchedulerPolicy() + : mCurrentDataField(FIELD_INVALID), + mCurrentConfig(0), + mActiveConfig(nullptr) { + LOG1("%s", __func__); + getDataFromXmlFile(SCHEDULER_POLICY_FILE_NAME); + if (!mPolicyConfigs.empty()) mActiveConfig = &mPolicyConfigs.front(); +} + +CameraSchedulerPolicy::~CameraSchedulerPolicy() { + LOG1("%s", __func__); +} + +int32_t CameraSchedulerPolicy::setConfig(const std::set& graphIds) { + size_t graphCount = graphIds.size(); + for (auto& item : mPolicyConfigs) { + if (graphCount != item.graphIds.size()) continue; + + bool match = true; + for (auto it = graphIds.cbegin(); it != graphIds.cend(); ++it) { + if (item.graphIds.find(*it) == item.graphIds.end()) { + match = false; + break; + } + } + if (match) { + mActiveConfig = &item; + return OK; + } + } + + LOGE("%s: no config for the following graphs %lu: )", __func__, graphCount); + for (auto it = graphIds.cbegin(); it != graphIds.cend(); ++it) { + LOGE(" graph id %d", *it); + } + return BAD_VALUE; +} + +int32_t CameraSchedulerPolicy::getExecutors(std::map* executors) const { + CheckAndLogError(!executors, 0, "%s: nullptr", __func__); + CheckAndLogError(!mActiveConfig, 0, "%s: No config", __func__); + + for (auto& iter : mActiveConfig->exeList) { + (*executors)[iter.exeName.c_str()] = iter.triggerName.c_str(); + } + return mActiveConfig->exeList.size(); +} + +int32_t CameraSchedulerPolicy::getNodeList(const char* exeName, + std::vector* nodeList) const { + CheckAndLogError(!nodeList, BAD_VALUE, "nullptr input"); + CheckAndLogError(!mActiveConfig, BAD_VALUE, "No config"); + + for (auto& exe : mActiveConfig->exeList) { + if (strcmp(exe.exeName.c_str(), exeName) == 0) { + *nodeList = exe.nodeList; + return OK; + } + } + return BAD_VALUE; +} + +void CameraSchedulerPolicy::checkField(CameraSchedulerPolicy* profiles, const char* name, + const char** atts) { + LOG1("@%s, name:%s", __func__, name); + if (strcmp(name, "PipeSchedulerPolicy") == 0) { + profiles->mCurrentDataField = FIELD_INVALID; + return; + } else if (strcmp(name, "scheduler") == 0 && + profiles->mCurrentConfig == profiles->mPolicyConfigs.size()) { + // Start the new one only when the last one is done + PolicyConfigDesc desc; + profiles->mPolicyConfigs.push_back(desc); + + int idx = 0; + while (atts[idx]) { + const char* key = atts[idx]; + const char* val = atts[idx + 1]; + LOG2("@%s, name:%s, atts[%d]:%s, atts[%d]:%s", __func__, name, idx, key, idx + 1, val); + if (strcmp(key, "id") == 0) { + profiles->mPolicyConfigs[profiles->mCurrentConfig].configId = atoi(val); + } else if (strcmp(key, "graphId") == 0 || + strcmp(key, "video") == 0 || strcmp(key, "still") == 0) { + profiles->mPolicyConfigs[profiles->mCurrentConfig].graphIds.insert(atoi(val)); + } + idx += 2; + } + profiles->mCurrentDataField = FIELD_SCHED; + return; + } + + LOGE("@%s, name:%s, atts[0]:%s, xml format wrong", __func__, name, atts[0]); + return; +} + +void CameraSchedulerPolicy::handleExecutor(CameraSchedulerPolicy* profiles, const char* name, + const char** atts) { + int idx = 0; + ExecutorDesc desc; + + while (atts[idx]) { + const char* key = atts[idx]; + LOG2("%s: name: %s, value: %s", __func__, atts[idx], atts[idx + 1]); + if (strcmp(key, "name") == 0) { + desc.exeName = atts[idx + 1]; + } else if (strcmp(key, "nodes") == 0) { + parseXmlConvertStrings(atts[idx + 1], desc.nodeList, convertCharToString); + } else if (strcmp(key, "trigger") == 0) { + desc.triggerName = atts[idx + 1]; + } else { + LOGW("Invalid policy attribute: %s", key); + } + idx += 2; + } + + LOG2("@%s, name:%s, atts[0]:%s", __func__, name, atts[0]); + profiles->mPolicyConfigs[profiles->mCurrentConfig].exeList.push_back(desc); +} + +void CameraSchedulerPolicy::handlePolicyConfig(CameraSchedulerPolicy* profiles, const char* name, + const char** atts) { + LOG2("@%s, name:%s, atts[0]:%s", __func__, name, atts[0]); + if (strcmp(name, "pipe_executor") == 0) { + handleExecutor(profiles, name, atts); + } +} + +void CameraSchedulerPolicy::startParseElement(void* userData, const char* name, const char** atts) { + CameraSchedulerPolicy* profiles = reinterpret_cast(userData); + + if (profiles->mCurrentDataField == FIELD_INVALID) { + profiles->checkField(profiles, name, atts); + return; + } + + switch (profiles->mCurrentDataField) { + case FIELD_SCHED: + profiles->handlePolicyConfig(profiles, name, atts); + break; + default: + LOGE("@%s, line:%d, go to default handling", __func__, __LINE__); + break; + } +} + +void CameraSchedulerPolicy::endParseElement(void* userData, const char* name) { + CameraSchedulerPolicy* profiles = reinterpret_cast(userData); + if (strcmp(name, "scheduler") == 0) { + profiles->mCurrentDataField = FIELD_INVALID; + profiles->mCurrentConfig++; + } +} + +} // namespace icamera diff --git a/src/scheduler/CameraSchedulerPolicy.h b/src/scheduler/CameraSchedulerPolicy.h new file mode 100644 index 00000000..3ff148ce --- /dev/null +++ b/src/scheduler/CameraSchedulerPolicy.h @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2022-2023 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include +#include + +#include "ParserBase.h" + +namespace icamera { + +class CameraSchedulerPolicy : public ParserBase { + public: + static CameraSchedulerPolicy* getInstance(); + static void releaseInstance(); + + private: + // Prevent to create multiple instances + CameraSchedulerPolicy(); + ~CameraSchedulerPolicy(); + + public: + int32_t setConfig(const std::set& graphIds); + // Return + int32_t getExecutors(std::map* executors) const; + int32_t getNodeList(const char* exeName, std::vector* nodeList) const; + + void startParseElement(void* userData, const char* name, const char** atts); + void endParseElement(void* userData, const char* name); + + private: + struct ExecutorDesc { + std::string exeName; + std::string triggerName; + std::vector nodeList; + }; + + struct PolicyConfigDesc { + // static data + uint32_t configId; + std::set graphIds; + std::vector exeList; + + PolicyConfigDesc() { + configId = 0; + } + }; + + private: + void checkField(CameraSchedulerPolicy* profiles, const char* name, const char** atts); + void handlePolicyConfig(CameraSchedulerPolicy* profiles, const char* name, const char** atts); + void handleExecutor(CameraSchedulerPolicy* profiles, const char* name, const char** atts); + + private: + enum DataField { + FIELD_INVALID = 0, + FIELD_SCHED, + } mCurrentDataField; + uint32_t mCurrentConfig; + + private: + static CameraSchedulerPolicy* sInstance; + static Mutex sLock; + + std::vector mPolicyConfigs; + PolicyConfigDesc* mActiveConfig; + + private: + DISALLOW_COPY_AND_ASSIGN(CameraSchedulerPolicy); +}; + +} // namespace icamera diff --git a/modules/sandboxing/server/IntelEvcpServer.h b/src/scheduler/ISchedulerNode.h similarity index 55% rename from modules/sandboxing/server/IntelEvcpServer.h rename to src/scheduler/ISchedulerNode.h index 3077bade..6115dd75 100644 --- a/modules/sandboxing/server/IntelEvcpServer.h +++ b/src/scheduler/ISchedulerNode.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation. + * Copyright (C) 2022 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,27 +16,24 @@ #pragma once -#include - -#include "evcp/EvcpCommon.h" -#include "iutils/Errors.h" -#include "modules/algowrapper/IntelEvcp.h" +#include namespace icamera { -class IntelEvcpServer { +/** + * \Interface ISchedulerNode + */ +class ISchedulerNode { public: - IntelEvcpServer() {} - ~IntelEvcpServer() {} + explicit ISchedulerNode(const char* name) : mName(name ? name : "unknown") {} + virtual ~ISchedulerNode() {} - int init(void* pData, int dataSize); - int deInit(); + virtual bool process(int64_t triggerId) = 0; - int runEvcpFrame(void* bufAddr, int size); - int updateEvcpParam(EvcpParam* param); - int getEvcpParam(EvcpParam* evcpParam) const; + const char* getName() const { return mName.c_str(); } private: - std::unique_ptr mIntelEvcp; + std::string mName; }; -} /* namespace icamera */ + +} // namespace icamera diff --git a/src/v4l2/MediaControl.cpp b/src/v4l2/MediaControl.cpp index 94bfdb8d..c50e75a8 100644 --- a/src/v4l2/MediaControl.cpp +++ b/src/v4l2/MediaControl.cpp @@ -63,6 +63,7 @@ struct MediaEntity { char devname[32]; }; +static const string ivscName = "Intel IVSC CSI"; MediaControl* MediaControl::sInstance = nullptr; Mutex MediaControl::sLock; @@ -126,7 +127,9 @@ void MediaControl::releaseInstance() { } } -MediaControl::MediaControl(const char* devName) : mDevName(devName) { +MediaControl::MediaControl(const char* devName) + : mDevName(devName), + mMediaCfgId(IPU6_DOWNSTREAM_MEDIA_CFG) { LOG1("@%s device: %s", __func__, devName); } @@ -202,6 +205,41 @@ int MediaControl::resetAllLinks() { return 0; } +// VIRTUAL_CHANNEL_S +int MediaControl::resetAllRoutes(int cameraId) { + LOG1(" %s", cameraId, __func__); + + for (MediaEntity& entity : mEntities) { + struct v4l2_subdev_route routes[entity.info.pads]; + uint32_t numRoutes = entity.info.pads; + + string subDeviceNodeName; + subDeviceNodeName.clear(); + CameraUtils::getSubDeviceName(entity.info.name, subDeviceNodeName); + if (subDeviceNodeName.find("/dev/") == std::string::npos) { + continue; + } + + V4L2Subdevice* subDev = V4l2DeviceFactory::getSubDev(cameraId, subDeviceNodeName); + int ret = subDev->GetRouting(routes, &numRoutes); + if (ret != 0) { + continue; + } + + for (uint32_t j = 0; j < numRoutes; j++) { + routes[j].flags &= ~V4L2_SUBDEV_ROUTE_FL_ACTIVE; + } + + ret = subDev->SetRouting(routes, numRoutes); + if (ret < 0) { + LOGW("@%s, setRouting ret:%d", __func__, ret); + } + } + + return OK; +} +// VIRTUAL_CHANNEL_E + int MediaControl::setupLink(MediaPad* source, MediaPad* sink, uint32_t flags) { MediaLink* link = nullptr; media_link_desc ulink; @@ -389,6 +427,7 @@ void MediaControl::dumpEntityDesc(media_entity_desc& desc, media_device_info& de } int MediaControl::enumEntities(int fd, media_device_info& devInfo) { + int mediaCfgId = IPU6_MEDIA_CFG_MAX; MediaEntity entity; uint32_t id; int ret; @@ -404,6 +443,14 @@ int MediaControl::enumEntities(int fd, media_device_info& devInfo) { break; } + if (mediaCfgId == IPU6_MEDIA_CFG_MAX) { + if (!strncmp(entity.info.name, IPU6_DOWNSTREAM_ENTITY, strlen(IPU6_DOWNSTREAM_ENTITY))) + mediaCfgId = IPU6_DOWNSTREAM_MEDIA_CFG; + else if (!strncmp(entity.info.name, IPU6_UPSTREAM_ENTITY, + strlen(IPU6_UPSTREAM_ENTITY))) + mediaCfgId = IPU6_UPSTREAM_MEDIA_CFG; + } + if (Log::isDumpMediaInfo()) dumpEntityDesc(entity.info, devInfo); /* Number of links (for outbound links) plus number of pads (for @@ -429,7 +476,21 @@ int MediaControl::enumEntities(int fd, media_device_info& devInfo) { } } - return ret; + if (ret != 0) + return ret; + + if (mediaCfgId != IPU6_MEDIA_CFG_MAX) + mMediaCfgId = mediaCfgId; + + if ((!strcmp(devInfo.model, IPU6_DOWNSTREAM_DEV_MODEL) && + mMediaCfgId != IPU6_DOWNSTREAM_MEDIA_CFG) || + (!strcmp(devInfo.model, IPU6_UPSTREAM_DEV_MODEL) && + mMediaCfgId != IPU6_UPSTREAM_MEDIA_CFG)) { + LOGE("Invalid media configuration id %d for %s", mMediaCfgId, devInfo.model); + return -EINVAL; + } + + return OK; } int MediaControl::getDevnameFromSysfs(MediaEntity* entity) { @@ -515,7 +576,9 @@ int MediaControl::enumLinks(int fd) { links.entity = entity.info.id; links.pads = new media_pad_desc[entity.info.pads]; + memset(links.pads, 0, sizeof(struct media_pad_desc) * entity.info.pads); links.links = new media_link_desc[entity.info.links]; + memset(links.links, 0, sizeof(struct media_link_desc) * entity.info.links); if (sc->ioctl(fd, MEDIA_IOC_ENUM_LINKS, &links) < 0) { ret = -errno; @@ -721,6 +784,9 @@ int MediaControl::setFormat(int cameraId, const McFormat* format, int targetWidt fmt.pad = format->pad; fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; fmt.format = mbusfmt; + // VIRTUAL_CHANNEL_S + fmt.stream = format->stream; + // VIRTUAL_CHANNEL_E ret = subDev->SetFormat(fmt); CheckAndLogError(ret < 0, BAD_VALUE, "set format %s [%d:%d] [%dx%d] %s failed.", format->entityName.c_str(), format->entity, format->pad, format->width, @@ -804,6 +870,22 @@ int MediaControl::mediaCtlSetup(int cameraId, MediaCtlConf* mc, int width, int h setMediaMcCtl(cameraId, mc->ctls); int ret = OK; + // VIRTUAL_CHANNEL_S + /* Set routing */ + for (auto& route : mc->routes) { + LOG1(" route entity:%s, sinkPad:%d, srcPad:%d, sinkStream:%d, srcStream:%d, flag:%d", + cameraId, route.entityName.c_str(), route.sinkPad, route.srcPad, route.sinkStream, + route.srcStream, route.flag); + + string subDeviceNodeName; + CameraUtils::getSubDeviceName(route.entityName.c_str(), subDeviceNodeName); + V4L2Subdevice* subDev = V4l2DeviceFactory::getSubDev(cameraId, subDeviceNodeName); + v4l2_subdev_route r = {route.sinkPad, route.sinkStream, route.srcPad, route.srcStream, + route.flag}; + ret = subDev->SetRouting(&r, 1); + CheckAndLogError(ret != 0, ret, "setRouting fail, ret:%d", ret); + } + // VIRTUAL_CHANNEL_E /* Set format & selection in format Configuration */ for (auto& fmt : mc->formats) { @@ -814,6 +896,33 @@ int MediaControl::mediaCtlSetup(int cameraId, MediaCtlConf* mc, int width, int h } } + MediaEntity* ivsc = getEntityByName(ivscName.c_str()); + if (ivsc) { + for (uint32_t i = 0; i < ivsc->numLinks; ++i) { + if (ivsc->links[i].sink->entity == ivsc) { + MediaEntity* sensor = ivsc->links[i].source->entity; + int sensor_entity_id = sensor->info.id; + LOG1("@%s, found %s -> %s", __func__, sensor->info.name, ivscName.c_str()); + for (McLink& link : mc->links) { + if (link.srcEntity == sensor_entity_id) { + LOG1("@%s, skip %s, link %s -> %s", __func__, link.srcEntityName.c_str(), + ivscName.c_str(), link.sinkEntityName.c_str()); + link.srcEntity = ivsc->info.id; + link.srcEntityName = ivscName; + for (uint32_t j = 0; j < ivsc->info.pads; ++j) { + if (ivsc->pads[j].flags & MEDIA_PAD_FL_SOURCE) { + link.srcPad = j; + break; + } + } + break; + } + } + break; + } + } + } + /* Set link in format Configuration */ ret = setMediaMcLink(mc->links); CheckAndLogError(ret != OK, ret, "set MediaCtlConf McLink failed: ret = %d", ret); @@ -843,6 +952,18 @@ int MediaControl::getVCMI2CAddr(const char* vcmName, string* vcmI2CAddr) { void MediaControl::mediaCtlClear(int cameraId, MediaCtlConf* mc) { LOG1(" %s", cameraId, __func__); + // VIRTUAL_CHANNEL_S + /* Clear routing */ + for (auto& route : mc->routes) { + string subDeviceNodeName; + CameraUtils::getSubDeviceName(route.entityName.c_str(), subDeviceNodeName); + V4L2Subdevice* subDev = V4l2DeviceFactory::getSubDev(cameraId, subDeviceNodeName); + v4l2_subdev_route r = {route.sinkPad, route.sinkStream, route.srcPad, route.srcStream, + route.flag & ~V4L2_SUBDEV_ROUTE_FL_ACTIVE}; + int ret = subDev->SetRouting(&r, 1); + CheckAndLogError(ret != 0, VOID_VALUE, "Clear routing fail, ret:%d", ret); + } + // VIRTUAL_CHANNEL_E } // This function must be called after enumEntities(). @@ -859,25 +980,63 @@ int MediaControl::getLensName(string* lensName) { return UNKNOWN_ERROR; } +// PRIVACY_MODE_S +int MediaControl::getPrivacyDeviceName(std::string* name) { + CheckAndLogError(!name, UNKNOWN_ERROR, "nullptr input"); + MediaEntity* ivsc = getEntityByName(ivscName.c_str()); + + if (!ivsc) { + return BAD_VALUE; + } + name->assign(ivsc->devname); + return OK; +} +// PRIVACY_MODE_E + +bool MediaControl::checkHasSource(const MediaEntity* sink, const std::string& source) { + for (unsigned int i = 0; i < sink->numLinks; ++i) { + if (sink->links[i].sink->entity == sink) { + // links[i] is the link to sink entity + // pre is the link's source entity + MediaEntity* pre = sink->links[i].source->entity; + if (pre->info.type == MEDIA_ENT_T_V4L2_SUBDEV_SENSOR || + pre->info.type == MEDIA_ENT_T_V4L2_SUBDEV) { + // if pre is sensor, return compare name result + if (strncmp(source.c_str(), pre->info.name, source.length()) == 0) return true; + } else { + // if pre is not sensor, search recursively + if (checkHasSource(pre, source)) return true; + } + } + } + + return false; +} + +// This function must be called after enumEntities(). +bool MediaControl::checkAvailableSensor(const std::string& sensorEntityName) { + LOG1("@%s, sensorEntityName:%s", __func__, sensorEntityName.c_str()); + for (auto& entity : mEntities) { + if (strncmp(sensorEntityName.c_str(), entity.info.name, sensorEntityName.length()) == 0) { + return true; + } + } + return false; +} + // This function must be called after enumEntities(). bool MediaControl::checkAvailableSensor(const std::string& sensorEntityName, const std::string& sinkEntityName) { LOG1("@%s, sensorEntityName:%s, sinkEntityName:%s", __func__, sensorEntityName.c_str(), sinkEntityName.c_str()); - std::string sensorEntityNameTmp = sensorEntityName; - sensorEntityNameTmp.append(" "); - size_t nameLen = sensorEntityNameTmp.length(); + // Check if any sensor starts with sensorEntityName connects to + // sinkEntityName, which is IPU CSI port + std::string sensorEntityNameTmp = sensorEntityName + " "; for (auto& entity : mEntities) { - int linksCount = entity.info.links; - MediaLink* links = entity.links; - for (int i = 0; i < linksCount; i++) { - if (strcmp(links[i].sink->entity->info.name, sinkEntityName.c_str()) == 0) { - char* entityName = entity.info.name; - if (strncmp(entityName, sensorEntityNameTmp.c_str(), nameLen) == 0) { - return true; - } - } + if (strcmp(sinkEntityName.c_str(), entity.info.name) == 0) { + // Got the correct IPU CSI port, check its source + return checkHasSource(&entity, sensorEntityNameTmp); } } @@ -899,6 +1058,9 @@ int MediaControl::getI2CBusAddress(const string& sensorEntityName, const string& for (int i = 0; i < linksCount; i++) { if (strcmp(links[i].sink->entity->info.name, sinkEntityName.c_str()) == 0) { entityName = entity.info.name; + if (strcmp(entityName, ivscName.c_str()) == 0) { + return getI2CBusAddress(sensorEntityName, ivscName, i2cBus); + } break; } } diff --git a/src/v4l2/MediaControl.h b/src/v4l2/MediaControl.h index 6a3be4d3..39174c5f 100644 --- a/src/v4l2/MediaControl.h +++ b/src/v4l2/MediaControl.h @@ -51,6 +51,16 @@ struct MediaLink; #define MEDIA_CTL_DEV_NAME "/dev/media" #define MEDIA_DRIVER_NAME "intel-ipu" #define MEDIA_DEVICE_MAX_NUM 256 +#define IPU6_DOWNSTREAM_ENTITY "Intel IPU6 CSI-2" +#define IPU6_UPSTREAM_ENTITY "Intel IPU6 CSI2" +#define IPU6_DOWNSTREAM_DEV_MODEL "ipu6-downstream" +#define IPU6_UPSTREAM_DEV_MODEL "ipu6" + +enum { + IPU6_DOWNSTREAM_MEDIA_CFG = 0, + IPU6_UPSTREAM_MEDIA_CFG = 1, + IPU6_MEDIA_CFG_MAX, +}; enum { FC_FORMAT = 0, @@ -173,6 +183,9 @@ struct MediaCtlConf { int outputHeight; std::vector configMode; int format; + // DOL_FEATURE_S + int vbp; // Vertical blanking period + // DOL_FEATURE_E /* * The outputWidth or outputHeight is 0 if there isn't this setting * in MediaCtlConf. It means the isys output size is dynamic, and @@ -183,6 +196,9 @@ struct MediaCtlConf { outputWidth = 0; outputHeight = 0; format = -1; + // DOL_FEATURE_S + vbp = -1; + // DOL_FEATURE_E } }; @@ -236,6 +252,17 @@ class MediaControl { */ int getVCMI2CAddr(const char* vcmName, std::string* vcmI2CAddr); + // PRIVACY_MODE_S + /** + * \brief Get privacy control device name + * + * \param [out]name: the device name which has privacy control + * + * \return 0 if succeed or error value if error + */ + int getPrivacyDeviceName(std::string* name); + // PRIVACY_MODE_E + /** * \brief Set up media controller pipe * @@ -254,6 +281,9 @@ class MediaControl { /** * \brief Clear media controller pipe * + // VIRTUAL_CHANNEL_S + * Currently only the virtual channels are cleared. + // VIRTUAL_CHANNEL_E * * \param cameraId: the current camera id * \param mc: the MediaCtlConf got from platform data @@ -261,8 +291,12 @@ class MediaControl { void mediaCtlClear(int cameraId, MediaCtlConf* mc); int resetAllLinks(); + // VIRTUAL_CHANNEL_S + int resetAllRoutes(int cameraId); + // VIRTUAL_CHANNEL_E int getLensName(std::string* lensName); + bool checkAvailableSensor(const std::string& sensorEntityName); bool checkAvailableSensor(const std::string& sensorEntityName, const std::string& sinkEntityName); /** @@ -276,6 +310,8 @@ class MediaControl { int getI2CBusAddress(const std::string& sensorEntityName, const std::string& sinkEntityName, std::string* i2cBus); + int getMediaCfgId() { return mMediaCfgId; } + private: MediaControl& operator=(const MediaControl&); MediaControl(const char* devName); @@ -294,6 +330,7 @@ class MediaControl { int getDevnameFromSysfs(MediaEntity* entity); MediaEntity* getEntityById(uint32_t id); MediaEntity* getEntityByName(const char* name); + bool checkHasSource(const MediaEntity* sink, const std::string& source); // set up entity link. @@ -328,6 +365,8 @@ class MediaControl { static MediaControl* sInstance; static Mutex sLock; + + int mMediaCfgId; }; } // namespace icamera diff --git a/src/v4l2/NodeInfo.cpp b/src/v4l2/NodeInfo.cpp index ae05a1fb..0fe35eb0 100644 --- a/src/v4l2/NodeInfo.cpp +++ b/src/v4l2/NodeInfo.cpp @@ -20,6 +20,9 @@ const VideoNodeInfo gVideoNodeInfos[] = { {VIDEO_GENERIC, "VIDEO_GENERIC", "Generic"}, {VIDEO_GENERIC_MEDIUM_EXPO, "VIDEO_GENERIC_MEDIUM_EXPO", "GenericMediumExpo"}, {VIDEO_GENERIC_SHORT_EXPO, "VIDEO_GENERIC_SHORT_EXPO", "GenericShortExpo"}, + // CSI_META_S + {VIDEO_CSI_META, "VIDEO_CSI_META", "CsiMeta"}, + // CSI_META_E {VIDEO_PIXEL_ARRAY, "VIDEO_PIXEL_ARRAY", "PixelArray"}, {VIDEO_PIXEL_BINNER, "VIDEO_PIXEL_BINNER", "PixelBinner"}, diff --git a/src/v4l2/NodeInfo.h b/src/v4l2/NodeInfo.h index 59dddda7..bca622ed 100644 --- a/src/v4l2/NodeInfo.h +++ b/src/v4l2/NodeInfo.h @@ -23,6 +23,9 @@ enum VideoNodeType { VIDEO_GENERIC, VIDEO_GENERIC_MEDIUM_EXPO, VIDEO_GENERIC_SHORT_EXPO, + // CSI_META_S + VIDEO_CSI_META, + // CSI_META_E // sensor subdevice VIDEO_PIXEL_ARRAY, diff --git a/src/v4l2/V4l2DeviceFactory.cpp b/src/v4l2/V4l2DeviceFactory.cpp index b07de752..4bb894f7 100644 --- a/src/v4l2/V4l2DeviceFactory.cpp +++ b/src/v4l2/V4l2DeviceFactory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Corporation. + * Copyright (C) 2015-2023 Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,8 @@ #include +#include + #include "iutils/CameraLog.h" namespace icamera { @@ -67,6 +69,7 @@ void V4l2DeviceFactory::releaseDeviceFactory(int cameraId) { * Return a not nullptr sub device pointer */ V4L2Subdevice* V4l2DeviceFactory::getSubDev(int cameraId, const std::string& devName) { + LOG2(" @%s, sub device name: %s", cameraId, __func__, devName.c_str()); AutoMutex lock(sLock); V4l2DeviceFactory* factory = getInstance(cameraId); // If an existing sub device found, then just return it. @@ -84,6 +87,27 @@ V4L2Subdevice* V4l2DeviceFactory::getSubDev(int cameraId, const std::string& dev return subdev; } +/** + * Close the sub device and release it in the device map + * + * It MUST be called after this sub device is not used anymore + */ +void V4l2DeviceFactory::releaseSubDev(int cameraId, const std::string& devName) { + LOG2(" @%s, sub device name: %s", cameraId, __func__, devName.c_str()); + AutoMutex lock(sLock); + V4l2DeviceFactory* factory = getInstance(cameraId); + + if (factory->mDevices.find(devName) != factory->mDevices.end()) { + V4L2Subdevice* subdev = factory->mDevices[devName]; + if (subdev) { + subdev->Close(); + delete subdev; + } + + factory->mDevices.erase(devName); + } +} + /** * Release all sub devices in device map * diff --git a/src/v4l2/V4l2DeviceFactory.h b/src/v4l2/V4l2DeviceFactory.h index 2b928efc..70571c81 100644 --- a/src/v4l2/V4l2DeviceFactory.h +++ b/src/v4l2/V4l2DeviceFactory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2021 Intel Corporation. + * Copyright (C) 2015-2023 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,6 +43,7 @@ class V4l2DeviceFactory { static void releaseDeviceFactory(int cameraId); static V4L2Subdevice* getSubDev(int cameraId, const std::string& devName); + static void releaseSubDev(int cameraId, const std::string& devName); private: V4l2DeviceFactory(int cameraId);