diff --git a/CMakeLists.txt b/CMakeLists.txt index cbd2c954..be3d45a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,13 +42,6 @@ set(ALGOWRAPPER_DIR ${MODULES_DIR}/algowrapper) set(SANDBOXING_DIR ${MODULES_DIR}/sandboxing) set(IMAGE_PROCESS_DIR ${SRC_ROOT_DIR}/image_process) -#AAL directories -if (CAL_BUILD) - set(AAL_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/aal) - set(JPEG_DIR ${SRC_ROOT_DIR}/jpeg) - set(MEMORY_DIR ${MODULES_DIR}/memory) -endif() #CAL_BUILD - if (SUPPORT_LIVE_TUNING) #LiveTuning directories set(LIVE_TUNING_DIR ${MODULES_DIR}/livetune) @@ -192,69 +185,16 @@ if(ENABLE_SANDBOXING) 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) - else () - include_directories(src/jpeg/chrome) - endif() - - if (SW_POST_PROCESSING) - include_directories(src/image_process/sw) - else () - include_directories(src/image_process/chrome) - endif() - - add_subdirectory(aal) - - 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}/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} - ) - link_directories(${CMAKE_PREFIX_PATH} ${LIBCAMERA_CLIENT_LIBS} ${LIBCAMERA_METADATA_LIBS} - ${LIBCAMERA_COMMON_LIBS} ${LIBSYNC_LIBS} - ${LIBCBM_LIBS} - ) - - 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 (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}) - link_directories(${LIBDRM_LIBRARY_DIRS}) - set(LIBCAMHAL_LINK_LIBS ${LIBCAMHAL_LINK_LIBS} ${LIBDRM_LIBRARIES}) - add_definitions(-DLIBDRM_SUPPORT_MMAP_OFFSET) - endif() +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}) + link_directories(${LIBDRM_LIBRARY_DIRS}) + set(LIBCAMHAL_LINK_LIBS ${LIBCAMHAL_LINK_LIBS} ${LIBDRM_LIBRARIES}) + add_definitions(-DLIBDRM_SUPPORT_MMAP_OFFSET) endif() set(LIBCAMHAL_SRCS @@ -324,9 +264,7 @@ if (IPU_VER MATCHES "ipu6") endif() endif() -if (NOT CAL_BUILD) - set(TARGET_DEFINITIONS ${TARGET_DEFINITIONS} "-DCAMERA_DEFAULT_CFG_PATH=\"${CMAKE_INSTALL_FULL_SYSCONFDIR}/camera/${IPU_VER}/\"") -endif() +set(TARGET_DEFINITIONS ${TARGET_DEFINITIONS} "-DCAMERA_DEFAULT_CFG_PATH=\"${CMAKE_INSTALL_FULL_SYSCONFDIR}/camera/${IPU_VER}/\"") # Link libraries, the building will be interrupted if libs/includes not found # Link ia_imaging @@ -393,41 +331,36 @@ endif() #--------------------------- Install settings --------------------------- -if (NOT CAL_BUILD) - 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 - 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() - set(CAMHAL_DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - if (${CMAKE_VERSION} VERSION_LESS 3.11) - install(TARGETS ${CAMHAL_TARGETS} - LIBRARY DESTINATION ${CAMHAL_DESTINATION} - ARCHIVE DESTINATION ${CAMHAL_DESTINATION}) - else() - install(TARGETS ${CAMHAL_TARGETS} DESTINATION ${CAMHAL_DESTINATION}) - endif() - 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() - -endif() #NOT CAL_BUILD +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 +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() + set(CAMHAL_DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() +if (${CMAKE_VERSION} VERSION_LESS 3.11) + install(TARGETS ${CAMHAL_TARGETS} + LIBRARY DESTINATION ${CAMHAL_DESTINATION} + ARCHIVE DESTINATION ${CAMHAL_DESTINATION}) +else() + install(TARGETS ${CAMHAL_TARGETS} DESTINATION ${CAMHAL_DESTINATION}) +endif() +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() endforeach() #IPU_VERSIONS diff --git a/config/linux/ipu6/gcss/graph_settings_imx390.xml b/config/linux/ipu6/gcss/graph_settings_imx390.xml index 321e4884..f5d1e51d 100644 --- a/config/linux/ipu6/gcss/graph_settings_imx390.xml +++ b/config/linux/ipu6/gcss/graph_settings_imx390.xml @@ -1,6 +1,5 @@ - - - + @@ -21,18 +20,18 @@ See the License for the specific language governing permissions and - + - - + + - - + + - - + + @@ -40,269 +39,439 @@ See the License for the specific language governing permissions and - + - + - + + + - - + + + + + + + - + - - - - + + + + - + - - + + - +
- - - - - - + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - - - - + + + + - - + + + + + + + + + + - - - - - + - - - - - + + + + + - - + +
- - - - + + + + - + - - - - - - + + + + - + - - + + - + + + + + + + + + + + + + + + + + +
- - - - - - + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - - - - + + + + - - + + + + + + + + + + - - - - - + - - - - - + + + + + - - + +
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + - + - - - - - - + + + + + + + + - + - - + + - +
- - - - - - - - - - + + + + + + + + + + + + + - - + + - - - - - - - - - - + + - - - - - - - - - - - - - + - - - - - + + + + + - - -
+ + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/config/linux/ipu6/sensors/imx390.xml b/config/linux/ipu6/sensors/imx390.xml index 2afed977..4c9122a4 100644 --- a/config/linux/ipu6/sensors/imx390.xml +++ b/config/linux/ipu6/sensors/imx390.xml @@ -16,14 +16,14 @@ - - - - - - - - + + + + + + + + @@ -87,7 +87,7 @@ - + @@ -111,14 +111,14 @@ - - - - - - - - + + + + + + + + @@ -182,7 +182,7 @@ - + @@ -206,14 +206,14 @@ - - - - - - - - + + + + + + + + @@ -277,7 +277,7 @@ - + @@ -301,14 +301,14 @@ - - - - - - - - + + + + + + + + @@ -372,7 +372,7 @@ - + @@ -396,14 +396,14 @@ - - - - - - - - + + + + + + + + @@ -467,7 +467,7 @@ - + @@ -491,14 +491,14 @@ - - - - - - - - + + + + + + + + @@ -562,7 +562,7 @@ - + @@ -586,14 +586,14 @@ - - - - - - - - + + + + + + + + @@ -657,7 +657,7 @@ - + @@ -681,14 +681,14 @@ - - - - - - - - + + + + + + + + @@ -752,7 +752,7 @@ - + @@ -776,15 +776,15 @@ - + - - - - - - - + + + + + + + @@ -849,7 +849,7 @@ - + @@ -873,15 +873,15 @@ - + - - - - - - - + + + + + + + @@ -946,7 +946,7 @@ - + @@ -970,15 +970,15 @@ - + - - - - - - - + + + + + + + @@ -1043,7 +1043,7 @@ - + @@ -1067,15 +1067,15 @@ - + - - - - - - - + + + + + + + @@ -1140,7 +1140,7 @@ - + @@ -1164,15 +1164,15 @@ - + - - - - - - - + + + + + + + @@ -1237,7 +1237,7 @@ - + @@ -1261,15 +1261,15 @@ - + - - - - - - - + + + + + + + @@ -1334,7 +1334,7 @@ - + @@ -1358,15 +1358,15 @@ - + - - - - - - - + + + + + + + @@ -1431,7 +1431,7 @@ - + @@ -1455,15 +1455,15 @@ - + - - - - - - - + + + + + + + @@ -1528,7 +1528,7 @@ - + @@ -1552,10 +1552,10 @@ - - - - + + + + @@ -1592,7 +1592,7 @@ - + @@ -1614,10 +1614,10 @@ - - - - + + + + @@ -1654,7 +1654,7 @@ - + diff --git a/config/linux/ipu6ep/IMX390_HDR_ADL.aiqb b/config/linux/ipu6ep/IMX390_HDR_ADL.aiqb index ced28cf3..6df807b6 100644 Binary files a/config/linux/ipu6ep/IMX390_HDR_ADL.aiqb and b/config/linux/ipu6ep/IMX390_HDR_ADL.aiqb differ diff --git a/config/linux/ipu6ep/gcss/graph_settings_imx390.xml b/config/linux/ipu6ep/gcss/graph_settings_imx390.xml index 321e4884..f5d1e51d 100644 --- a/config/linux/ipu6ep/gcss/graph_settings_imx390.xml +++ b/config/linux/ipu6ep/gcss/graph_settings_imx390.xml @@ -1,6 +1,5 @@ - - - + @@ -21,18 +20,18 @@ See the License for the specific language governing permissions and - + - - + + - - + + - - + + @@ -40,269 +39,439 @@ See the License for the specific language governing permissions and - + - + - + + + - - + + + + + + + - + - - - - + + + + - + - - + + - +
- - - - - - + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - - - - + + + + - - + + + + + + + + + + - - - - - + - - - - - + + + + + - - + +
- - - - + + + + - + - - - - - - + + + + - + - - + + - + + + + + + + + + + + + + + + + + +
- - - - - - + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - - - - + + + + - - + + + + + + + + + + - - - - - + - - - - - + + + + + - - + +
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + - + - - - - - - + + + + + + + + - + - - + + - +
- - - - - - - - - - + + + + + + + + + + + + + - - + + - - - - - - - - - - + + - - - - - - - - - - - - - + - - - - - + + + + + - - -
+ + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/config/linux/ipu6ep/libcamhal_profile.xml b/config/linux/ipu6ep/libcamhal_profile.xml index 64be41d1..6cc193cc 100644 --- a/config/linux/ipu6ep/libcamhal_profile.xml +++ b/config/linux/ipu6ep/libcamhal_profile.xml @@ -22,6 +22,6 @@ + lt6911uxc-1-1,lt6911uxc-2-2,lt6911uxe-1-1,lt6911uxe-2-2"/> diff --git a/config/linux/ipu6ep/sensors/ar0234-1.xml b/config/linux/ipu6ep/sensors/ar0234-1.xml index 3db0a20a..ecd67dd9 100644 --- a/config/linux/ipu6ep/sensors/ar0234-1.xml +++ b/config/linux/ipu6ep/sensors/ar0234-1.xml @@ -32,6 +32,22 @@ + + + + + + + + + + + + + + + + @@ -46,10 +62,25 @@ + + + + + + + + + + + + + + - + - + diff --git a/config/linux/ipu6ep/sensors/ar0234-2.xml b/config/linux/ipu6ep/sensors/ar0234-2.xml index 9e897641..e158a063 100644 --- a/config/linux/ipu6ep/sensors/ar0234-2.xml +++ b/config/linux/ipu6ep/sensors/ar0234-2.xml @@ -16,8 +16,8 @@ - - + + @@ -32,6 +32,22 @@ + + + + + + + + + + + + + + + + @@ -46,10 +62,25 @@ + + + + + + + + + + + + + + - + - + diff --git a/config/linux/ipu6ep/sensors/imx390.xml b/config/linux/ipu6ep/sensors/imx390.xml index 6544680f..3d7028c7 100644 --- a/config/linux/ipu6ep/sensors/imx390.xml +++ b/config/linux/ipu6ep/sensors/imx390.xml @@ -16,14 +16,14 @@ - - - - - - - - + + + + + + + + @@ -78,7 +78,7 @@ - + @@ -104,14 +104,14 @@ - - - - - - - - + + + + + + + + @@ -166,7 +166,7 @@ - + @@ -192,14 +192,14 @@ - - - - - - - - + + + + + + + + @@ -254,7 +254,7 @@ - + @@ -280,14 +280,14 @@ - - - - - - - - + + + + + + + + @@ -342,7 +342,7 @@ - + @@ -368,14 +368,14 @@ - - - - - - - - + + + + + + + + @@ -430,7 +430,7 @@ - + @@ -456,14 +456,14 @@ - - - - - - - - + + + + + + + + @@ -518,7 +518,7 @@ - + @@ -544,14 +544,14 @@ - - - - - - - - + + + + + + + + @@ -606,7 +606,7 @@ - + @@ -632,14 +632,14 @@ - - - - - - - - + + + + + + + + @@ -694,7 +694,7 @@ - + @@ -720,15 +720,15 @@ - + - - - - - - - + + + + + + + @@ -784,7 +784,7 @@ - + @@ -810,15 +810,15 @@ - + - - - - - - - + + + + + + + @@ -874,7 +874,7 @@ - + @@ -900,15 +900,15 @@ - + - - - - - - - + + + + + + + @@ -964,7 +964,7 @@ - + @@ -990,15 +990,15 @@ - + - - - - - - - + + + + + + + @@ -1054,7 +1054,7 @@ - + @@ -1080,15 +1080,15 @@ - + - - - - - - - + + + + + + + @@ -1144,7 +1144,7 @@ - + @@ -1170,15 +1170,15 @@ - + - - - - - - - + + + + + + + @@ -1234,7 +1234,7 @@ - + @@ -1260,15 +1260,15 @@ - + - - - - - - - + + + + + + + @@ -1324,7 +1324,7 @@ - + @@ -1350,15 +1350,15 @@ - + - - - - - - - + + + + + + + @@ -1414,7 +1414,7 @@ - + diff --git a/config/linux/ipu6ep/sensors/lt6911uxc-1.xml b/config/linux/ipu6ep/sensors/lt6911uxc-1.xml index bca847d3..a4121e51 100644 --- a/config/linux/ipu6ep/sensors/lt6911uxc-1.xml +++ b/config/linux/ipu6ep/sensors/lt6911uxc-1.xml @@ -140,4 +140,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6ep/sensors/lt6911uxc-2.xml b/config/linux/ipu6ep/sensors/lt6911uxc-2.xml index cfb24160..534ab67a 100644 --- a/config/linux/ipu6ep/sensors/lt6911uxc-2.xml +++ b/config/linux/ipu6ep/sensors/lt6911uxc-2.xml @@ -140,4 +140,28 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/config/linux/ipu6epmtl/gcss/graph_settings_imx390.xml b/config/linux/ipu6epmtl/gcss/graph_settings_imx390.xml index 321e4884..f5d1e51d 100644 --- a/config/linux/ipu6epmtl/gcss/graph_settings_imx390.xml +++ b/config/linux/ipu6epmtl/gcss/graph_settings_imx390.xml @@ -1,6 +1,5 @@ - - - + @@ -21,18 +20,18 @@ See the License for the specific language governing permissions and - + - - + + - - + + - - + + @@ -40,269 +39,439 @@ See the License for the specific language governing permissions and - + - + - + + + - - + + + + + + + - + - - - - + + + + - + - - + + - +
- - - - - - + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - - - - + + + + - - + + + + + + + + + + - - - - - + - - - - - + + + + + - - + +
- - - - + + + + - + - - - - - - + + + + - + - - + + - + + + + + + + + + + + + + + + + + +
- - - - - - + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - - - - + + + + - - + + + + + + + + + + - - - - - + - - - - - + + + + + - - + +
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + - + - - - - - - + + + + + + + + - + - - + + - +
- - - - - - - - - - + + + + + + + + + + + + + - - + + - - - - - - - - - - + + - - - - - - - - - - - - - + - - - - - + + + + + - - -
+ + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/config/linux/ipu6epmtl/sensors/ar0234-1.xml b/config/linux/ipu6epmtl/sensors/ar0234-1.xml index 3f5e377b..c6e6c57c 100644 --- a/config/linux/ipu6epmtl/sensors/ar0234-1.xml +++ b/config/linux/ipu6epmtl/sensors/ar0234-1.xml @@ -32,6 +32,22 @@ + + + + + + + + + + + + + + + + @@ -40,16 +56,32 @@ - - + + + + + + + + + + + + + + + + - + + - + - + diff --git a/config/linux/ipu6epmtl/sensors/ar0234-2.xml b/config/linux/ipu6epmtl/sensors/ar0234-2.xml index 2e329251..fb7ed4fc 100644 --- a/config/linux/ipu6epmtl/sensors/ar0234-2.xml +++ b/config/linux/ipu6epmtl/sensors/ar0234-2.xml @@ -32,6 +32,22 @@ + + + + + + + + + + + + + + + + @@ -40,17 +56,32 @@ - - + + - + + + + + + + + + + + + + + + + - - + - + diff --git a/config/linux/ipu6epmtl/sensors/imx390-1.xml b/config/linux/ipu6epmtl/sensors/imx390-1.xml index 09edef51..0e845305 100644 --- a/config/linux/ipu6epmtl/sensors/imx390-1.xml +++ b/config/linux/ipu6epmtl/sensors/imx390-1.xml @@ -16,14 +16,14 @@ - - - - - - - - + + + + + + + + @@ -35,12 +35,12 @@ - - - - - - + + + + + + @@ -79,7 +79,7 @@ - + @@ -105,7 +105,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -219,7 +219,7 @@ - + @@ -250,7 +250,7 @@ - + diff --git a/config/linux/ipu6epmtl/sensors/imx390-2.xml b/config/linux/ipu6epmtl/sensors/imx390-2.xml index efff0306..be6e2e53 100644 --- a/config/linux/ipu6epmtl/sensors/imx390-2.xml +++ b/config/linux/ipu6epmtl/sensors/imx390-2.xml @@ -16,14 +16,14 @@ - - - - - - - - + + + + + + + + @@ -35,12 +35,12 @@ - - - - - - + + + + + + @@ -79,7 +79,7 @@ - + @@ -105,17 +105,17 @@ - - - - - - - - - - - + + + + + + + + + + + @@ -158,7 +158,7 @@ - + @@ -184,7 +184,7 @@ - + @@ -215,7 +215,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -272,7 +272,7 @@ - + diff --git a/config/linux/ipu6epmtl/sensors/imx390-3.xml b/config/linux/ipu6epmtl/sensors/imx390-3.xml index fc6e7b2a..933d4f3d 100644 --- a/config/linux/ipu6epmtl/sensors/imx390-3.xml +++ b/config/linux/ipu6epmtl/sensors/imx390-3.xml @@ -16,14 +16,14 @@ - - - - - - - - + + + + + + + + @@ -35,12 +35,12 @@ - - - - - - + + + + + + @@ -79,7 +79,7 @@ - + @@ -105,7 +105,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -193,7 +193,7 @@ - + diff --git a/config/linux/ipu6epmtl/sensors/imx390-4.xml b/config/linux/ipu6epmtl/sensors/imx390-4.xml index 3d88cc84..3adba6ca 100644 --- a/config/linux/ipu6epmtl/sensors/imx390-4.xml +++ b/config/linux/ipu6epmtl/sensors/imx390-4.xml @@ -16,14 +16,14 @@ - - - - - - - - + + + + + + + + @@ -35,12 +35,12 @@ - - - - - - + + + + + + @@ -79,7 +79,7 @@ - + @@ -105,27 +105,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -176,7 +176,7 @@ - + @@ -202,7 +202,7 @@ - + @@ -233,7 +233,7 @@ - + diff --git a/config/linux/ipu6epmtl/sensors/imx390-5.xml b/config/linux/ipu6epmtl/sensors/imx390-5.xml index f144c1fd..72cbb5a0 100644 --- a/config/linux/ipu6epmtl/sensors/imx390-5.xml +++ b/config/linux/ipu6epmtl/sensors/imx390-5.xml @@ -16,14 +16,14 @@ - - - - - - - - + + + + + + + + @@ -35,12 +35,12 @@ - - - - - - + + + + + + @@ -79,7 +79,7 @@ - + @@ -105,7 +105,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -193,7 +193,7 @@ - + diff --git a/config/linux/ipu6epmtl/sensors/imx390-6.xml b/config/linux/ipu6epmtl/sensors/imx390-6.xml index cecc7b02..d12af74b 100644 --- a/config/linux/ipu6epmtl/sensors/imx390-6.xml +++ b/config/linux/ipu6epmtl/sensors/imx390-6.xml @@ -16,14 +16,14 @@ - - - - - - - - + + + + + + + + @@ -35,12 +35,12 @@ - - - - - - + + + + + + @@ -79,7 +79,7 @@ - + @@ -105,37 +105,37 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -195,7 +195,7 @@ - + @@ -221,27 +221,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -293,7 +293,7 @@ - + diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 597937f0..99c212c2 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -14,10 +14,6 @@ # limitations under the License. # -if (CAL_BUILD) - add_subdirectory(memory) -endif() #CAL_BUILD - if (ENABLE_SANDBOXING) add_subdirectory(sandboxing) else() diff --git a/modules/algowrapper/IntelTNR7US.h b/modules/algowrapper/IntelTNR7US.h index dcb59895..8a1f6c3b 100644 --- a/modules/algowrapper/IntelTNR7US.h +++ b/modules/algowrapper/IntelTNR7US.h @@ -31,7 +31,6 @@ extern "C" { #ifdef TNR7_CM #define HANDLE cancel_fw_pre_define -#ifndef HAVE_ANDROID_OS /* 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 */ @@ -41,9 +40,6 @@ extern "C" { // HANDLE is redefined in cm_rt.h, avoid the redefinition build error #include "cm_rt.h" #pragma clang diagnostic pop -#else -#include "cm_rt.h" -#endif extern int run_tnr7us_frame(int width, int height, int stride, CmSurface2DUP*& inputSurface, CmSurface2DUP*& outputSurface, tnr_scale_1_0_t* dsPtr, diff --git a/modules/algowrapper/graph/GraphConfigPipe.cpp b/modules/algowrapper/graph/GraphConfigPipe.cpp index 2f0e466a..ce92b5de 100644 --- a/modules/algowrapper/graph/GraphConfigPipe.cpp +++ b/modules/algowrapper/graph/GraphConfigPipe.cpp @@ -23,7 +23,7 @@ #include #include -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include #else #include diff --git a/modules/memory/chrome/Camera3Buffer.cpp b/modules/memory/chrome/Camera3Buffer.cpp index 3e2fd2b2..a221ab4d 100644 --- a/modules/memory/chrome/Camera3Buffer.cpp +++ b/modules/memory/chrome/Camera3Buffer.cpp @@ -151,7 +151,11 @@ Camera3Buffer::~Camera3Buffer() { */ icamera::status_t Camera3Buffer::init(const camera3_stream_buffer* aBuffer, int cameraId) { mType = BUF_TYPE_HANDLE; +#ifdef HAVE_CHROME_OS mGbmBufferManager = cros::CameraBufferManager::GetInstance(); +#else + mGbmBufferManager = crosIpu6::CameraBufferManager::GetInstance(); +#endif mHandle = *aBuffer->buffer; mHandlePtr = aBuffer->buffer; mHalBuffer.s.width = aBuffer->stream->width; @@ -197,7 +201,11 @@ icamera::status_t Camera3Buffer::init(const camera3_stream_t* stream, buffer_han CheckAndLogError(!handle, UNKNOWN_ERROR, "%s, handle is nullptr", __func__); mType = BUF_TYPE_HANDLE; +#ifdef HAVE_CHROME_OS mGbmBufferManager = cros::CameraBufferManager::GetInstance(); +#else + mGbmBufferManager = crosIpu6::CameraBufferManager::GetInstance(); +#endif mHandle = handle; mHandlePtr = &mHandle; mHalBuffer.s.width = stream->width; @@ -471,7 +479,11 @@ std::shared_ptr allocateHeapBuffer(int w, int h, int stride, int std::shared_ptr allocateHandleBuffer(int w, int h, int gfxFmt, int usage, int cameraId) { HAL_TRACE_CALL(CAMERA_DEBUG_LOG_LEVEL1); +#ifdef HAVE_CHROME_OS cros::CameraBufferManager* bufManager = cros::CameraBufferManager::GetInstance(); +#else + crosIpu6::CameraBufferManager* bufManager = crosIpu6::CameraBufferManager::GetInstance(); +#endif buffer_handle_t handle; uint32_t stride = 0; diff --git a/modules/memory/chrome/Camera3Buffer.h b/modules/memory/chrome/Camera3Buffer.h index 8338bfa5..8047f222 100644 --- a/modules/memory/chrome/Camera3Buffer.h +++ b/modules/memory/chrome/Camera3Buffer.h @@ -16,7 +16,11 @@ #pragma once +#ifdef HAVE_CHROME_OS #include +#else +#include "camera_buffer_manager.h" +#endif #include #include @@ -142,7 +146,11 @@ class Camera3Buffer { private: bool mRegistered; /*!< Use to track the buffer register status */ +#ifdef HAVE_CHROME_OS cros::CameraBufferManager* mGbmBufferManager; +#else + crosIpu6::CameraBufferManager* mGbmBufferManager; +#endif }; namespace MemoryUtils { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7545192f..9f8e0156 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -23,9 +23,6 @@ add_subdirectory(metadata) add_subdirectory(platformdata) add_subdirectory(v4l2) add_subdirectory(image_process) -if (CAL_BUILD) - add_subdirectory(jpeg) -endif() #CAL_BUILD if(FACE_DETECTION) add_subdirectory(fd) endif() #FACE_DETECTION diff --git a/src/core/CameraBuffer.h b/src/core/CameraBuffer.h index e5fc4443..e476f1ab 100644 --- a/src/core/CameraBuffer.h +++ b/src/core/CameraBuffer.h @@ -22,7 +22,7 @@ #include #include -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include #else #include diff --git a/src/core/CameraDevice.cpp b/src/core/CameraDevice.cpp index ebda1371..4303a5b8 100644 --- a/src/core/CameraDevice.cpp +++ b/src/core/CameraDevice.cpp @@ -955,7 +955,7 @@ int CameraDevice::getParameters(Parameters& param, int64_t sequence) { LOG2("@%s", mCameraId, sequence, __func__); AutoMutex m(mDeviceLock); -#ifdef CAL_BUILD +#if defined(HAVE_CHROME_OS) || defined(HAVE_ANDROID_OS) if (sequence >= 0 && mState != DEVICE_STOP) { // fetch target parameter and results return mParamGenerator->getParameters(sequence, ¶m); diff --git a/src/core/CaptureUnit.cpp b/src/core/CaptureUnit.cpp index 5240977d..621f55ef 100644 --- a/src/core/CaptureUnit.cpp +++ b/src/core/CaptureUnit.cpp @@ -415,7 +415,7 @@ int CaptureUnit::poll() { } CheckAndLogError(ret < 0, UNKNOWN_ERROR, "%s: Poll error, ret:%d", __func__, ret); if (ret == 0) { -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS LOGI("%s, timeout happens, buffer in device: %d. wait recovery", mCameraId, __func__, mDevices.front()->getBufferNumInDevice()); #else diff --git a/src/core/CsiMetaDevice.cpp b/src/core/CsiMetaDevice.cpp index 25fb9f64..32127bde 100644 --- a/src/core/CsiMetaDevice.cpp +++ b/src/core/CsiMetaDevice.cpp @@ -377,7 +377,7 @@ int CsiMetaDevice::setFormat() { struct v4l2_format v4l2fmt; CLEAR(v4l2fmt); -#ifdef CAL_BUILD +#if defined(HAVE_CHROME_OS) || defined(HAVE_ANDROID_OS) v4l2fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; #else int dev_caps = mCsiMetaDevice->GetDeviceCaps(); diff --git a/src/core/CsiMetaDevice.h b/src/core/CsiMetaDevice.h index dfaafb89..0fbee7c1 100644 --- a/src/core/CsiMetaDevice.h +++ b/src/core/CsiMetaDevice.h @@ -16,7 +16,7 @@ #pragma once -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include #else #include diff --git a/src/core/DeviceBase.cpp b/src/core/DeviceBase.cpp index 1e61fcd0..28695959 100644 --- a/src/core/DeviceBase.cpp +++ b/src/core/DeviceBase.cpp @@ -164,8 +164,10 @@ int DeviceBase::queueBuffer(int64_t sequence) { if (ret >= 0) { AutoMutex l(mBufferLock); - mPendingBuffers.pop_front(); - mBuffersInDevice.push_back(buffer); + if (!mPendingBuffers.empty()) { + mPendingBuffers.pop_front(); + mBuffersInDevice.push_back(buffer); + } } else { LOGE("%s, index:%u size:%u, memory:%u, used:%u", __func__, buffer->getIndex(), buffer->getBufferSize(), buffer->getMemory(), buffer->getBytesused()); diff --git a/src/core/DeviceBase.h b/src/core/DeviceBase.h index 549c6875..4c8da4ae 100644 --- a/src/core/DeviceBase.h +++ b/src/core/DeviceBase.h @@ -16,7 +16,7 @@ #pragma once -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include #else #include @@ -138,7 +138,7 @@ class DeviceBase : public EventSource { /** * Each device has below two structures to manager its buffers. * And please note that: - * 1. Buffer to be queued into drive comes from mPendingBuffers. + * 1. Buffer to be queued into driver 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. diff --git a/src/core/IspParamAdaptor.h b/src/core/IspParamAdaptor.h index bc4bc920..0ef28655 100644 --- a/src/core/IspParamAdaptor.h +++ b/src/core/IspParamAdaptor.h @@ -16,7 +16,7 @@ #pragma once -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include #else #include @@ -35,7 +35,7 @@ #include "NodeInfo.h" extern "C" { -#ifndef CAL_BUILD +#if !defined(HAVE_CHROME_OS) && !defined(HAVE_ANDROID_OS) #include "ia_camera/ipu_process_group_wrapper.h" #endif } diff --git a/src/core/LensHw.h b/src/core/LensHw.h index b289b253..98e432a5 100644 --- a/src/core/LensHw.h +++ b/src/core/LensHw.h @@ -16,7 +16,7 @@ #pragma once -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include #else #include @@ -26,7 +26,11 @@ namespace icamera { +#ifdef HAVE_ANDROID_OS +typedef ::crosIpu6::V4L2Subdevice V4L2Subdevice; +#else typedef ::cros::V4L2Subdevice V4L2Subdevice; +#endif /** * \class LensHw diff --git a/src/core/SensorHwCtrl.h b/src/core/SensorHwCtrl.h index a4ef8122..07c81b97 100644 --- a/src/core/SensorHwCtrl.h +++ b/src/core/SensorHwCtrl.h @@ -16,7 +16,7 @@ #pragma once -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include #else #include diff --git a/src/core/SofSource.cpp b/src/core/SofSource.cpp index 83d358a2..1d7a78b8 100644 --- a/src/core/SofSource.cpp +++ b/src/core/SofSource.cpp @@ -102,7 +102,7 @@ int SofSource::initDev() { mIsysReceiverSubDev = V4l2DeviceFactory::getSubDev(mCameraId, subDeviceNodeName); -#ifdef CAL_BUILD +#if defined(HAVE_CHROME_OS) || defined(HAVE_ANDROID_OS) int status = mIsysReceiverSubDev->SubscribeEvent(V4L2_EVENT_FRAME_SYNC); CheckAndLogError(status != OK, status, "Failed to subscribe sync event 0"); LOG1("%s: Using SOF event id 0 for sync", __func__); @@ -136,7 +136,7 @@ int SofSource::deinitDev() { if (mIsysReceiverSubDev == nullptr) return OK; int status = 0; -#ifdef CAL_BUILD +#if defined(HAVE_CHROME_OS) || defined(HAVE_ANDROID_OS) status = mIsysReceiverSubDev->UnsubscribeEvent(V4L2_EVENT_FRAME_SYNC); if (status == OK) { LOG1("%s: Unsubscribe SOF event id 0 done", __func__); diff --git a/src/core/SofSource.h b/src/core/SofSource.h index d67e3675..9a27aff6 100644 --- a/src/core/SofSource.h +++ b/src/core/SofSource.h @@ -16,7 +16,7 @@ #pragma once -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include #else #include diff --git a/src/core/psysprocessor/GPUExecutor.cpp b/src/core/psysprocessor/GPUExecutor.cpp index 67ebdd92..a47a6d37 100644 --- a/src/core/psysprocessor/GPUExecutor.cpp +++ b/src/core/psysprocessor/GPUExecutor.cpp @@ -555,8 +555,8 @@ int GPUExecutor::runTnrFrame(const std::shared_ptr& inBuf, 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, "executor name:%s, sequence: %u update param time %lu us", - mName.c_str(), inBuf->getSequence(), timeUsedUs); + LOG2("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"); } @@ -621,8 +621,16 @@ int GPUExecutor::runTnrFrame(const std::shared_ptr& inBuf, int dstSize = bufferSize; int dstFd = fd; std::map::iterator tnrOutBuf; +#ifdef HAVE_CHROME_OS // use internal tnr buffer for ZSL and none APP buffer request usage bool useInternalBuffer = mUseInternalTnrBuffer || memoryType != V4L2_MEMORY_DMABUF; +#else + /* + ** WA, Android App buffer can't be wrapped as CMSurface, use internal buffer + ** do tnr processing, and copy to App buffer + */ + bool useInternalBuffer = true; +#endif if (useInternalBuffer) { std::unique_lock lock(mTnrOutBufMapLock); tnrOutBuf = mTnrOutBufMap.begin(); @@ -650,8 +658,8 @@ int GPUExecutor::runTnrFrame(const std::shared_ptr& inBuf, 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 run tnr time %lu us", __func__, - mName.c_str(), inBuf->getSequence(), timeUsedUs); + LOG2("%s executor name:%s, sequence: %u run tnr time %lu us", __func__, mName.c_str(), + inBuf->getSequence(), timeUsedUs); } if (icamera::PlatformData::isStillTnrPrior()) { mGPULock.unlock(); diff --git a/src/fd/CMakeLists.txt b/src/fd/CMakeLists.txt index 4f9c49a6..99acdaa3 100644 --- a/src/fd/CMakeLists.txt +++ b/src/fd/CMakeLists.txt @@ -36,9 +36,4 @@ else () ) endif() -if (CAL_BUILD) - find_package(LIBCAMERA_V4L2_DEVICE) - include_directories(${LIBCAMERA_V42L_DEVICE_INCLUDE_DIRS}) -else() - include_directories(${MODULES_DIR}/v4l2) -endif() +include_directories(${MODULES_DIR}/v4l2) \ No newline at end of file diff --git a/src/fd/FaceDetection.h b/src/fd/FaceDetection.h index 4a26b778..d0b59558 100644 --- a/src/fd/FaceDetection.h +++ b/src/fd/FaceDetection.h @@ -27,7 +27,7 @@ #include #include -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include "Camera3Buffer.h" #endif #include "FaceType.h" @@ -129,7 +129,7 @@ class FaceDetection { return nullptr; } static void destoryInstance(int cameraId) {} -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS void runFaceDetection(const std::shared_ptr ccBuf) {} #endif bool faceRunningByCondition() { return false; } diff --git a/src/image_process/CMakeLists.txt b/src/image_process/CMakeLists.txt index 26473711..5c2b6541 100644 --- a/src/image_process/CMakeLists.txt +++ b/src/image_process/CMakeLists.txt @@ -19,23 +19,3 @@ set(IMAGE_PROCESS_SRCS CACHE INTERNAL "image_process sources" ) -if (CAL_BUILD) -set(IMAGE_PROCESS_SRCS - ${IMAGE_PROCESS_DIR}/PostProcessorBase.cpp - ${IMAGE_PROCESS_DIR}/PostProcessorCore.cpp - CACHE INTERNAL "image_process sources" - ) -if (SW_POST_PROCESSING) - set(IMAGE_PROCESS_SRCS - ${IMAGE_PROCESS_SRCS} - ${IMAGE_PROCESS_DIR}/sw/SWPostProcessor.cpp - CACHE INTERNAL "image_process sources" - ) -else() - set(IMAGE_PROCESS_SRCS - ${IMAGE_PROCESS_SRCS} - ${IMAGE_PROCESS_DIR}/chrome/ImageProcessorCore.cpp - CACHE INTERNAL "image_process sources" - ) -endif() #SW_POST_PROCESSING -endif() #CAL_BUILD diff --git a/src/iutils/CameraLog.cpp b/src/iutils/CameraLog.cpp index bd3100e7..5dd14a09 100644 --- a/src/iutils/CameraLog.cpp +++ b/src/iutils/CameraLog.cpp @@ -165,7 +165,7 @@ namespace Log { #define SYSLOG_SINK "SYSLOG" static void initLogSinks() { -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS const char* sinkName = ::getenv("logSink"); if (!sinkName) { @@ -259,7 +259,7 @@ void setDebugLevel(void) { char* perfLevel = getenv(PROP_CAMERA_HAL_PERF); if (perfLevel) { #ifndef GPU_ALGO_SERVER -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS initPerfettoTrace(); #else gPerfLevel = strtoul(perfLevel, nullptr, 0); diff --git a/src/iutils/CameraLog.h b/src/iutils/CameraLog.h index 4e8fe66d..1683ada6 100644 --- a/src/iutils/CameraLog.h +++ b/src/iutils/CameraLog.h @@ -23,7 +23,7 @@ #endif #ifndef GPU_ALGO_SERVER -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include "src/iutils/PerfettoTrace.h" #else #include "utils/ScopedAtrace.h" diff --git a/src/iutils/LogSink.cpp b/src/iutils/LogSink.cpp index 3311307b..9d7d9f48 100644 --- a/src/iutils/LogSink.cpp +++ b/src/iutils/LogSink.cpp @@ -21,7 +21,7 @@ #include #include -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include #endif @@ -39,7 +39,7 @@ extern const char* cameraDebugLogToString(int level); #define CAMERA_DEBUG_LOG_ERR (1 << 5) #define CAMERA_DEBUG_LOG_WARNING (1 << 3) -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS const char* GLogSink::getName() const { return "Google gLOG"; } diff --git a/src/iutils/LogSink.h b/src/iutils/LogSink.h index 67319c91..d02f4070 100644 --- a/src/iutils/LogSink.h +++ b/src/iutils/LogSink.h @@ -35,7 +35,7 @@ class LogOutputSink { static void setLogTime(char* timeBuf); }; -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS class GLogSink : public LogOutputSink { public: const char* getName() const override; diff --git a/src/iutils/Utils.h b/src/iutils/Utils.h index 388d017b..d47cbe3d 100644 --- a/src/iutils/Utils.h +++ b/src/iutils/Utils.h @@ -17,7 +17,7 @@ #pragma once #include -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include #else #include @@ -34,12 +34,21 @@ namespace icamera { typedef int64_t nsecs_t; +#ifdef HAVE_ANDROID_OS +typedef ::crosIpu6::V4L2DevicePoller V4L2DevicePoller; +typedef ::crosIpu6::V4L2Device V4L2Device; +typedef ::crosIpu6::V4L2VideoNode V4L2VideoNode; +typedef ::crosIpu6::V4L2Subdevice V4L2Subdevice; +typedef ::crosIpu6::V4L2Buffer V4L2Buffer; +typedef ::crosIpu6::V4L2Format V4L2Format; +#else typedef ::cros::V4L2DevicePoller V4L2DevicePoller; typedef ::cros::V4L2Device V4L2Device; typedef ::cros::V4L2VideoNode V4L2VideoNode; typedef ::cros::V4L2Subdevice V4L2Subdevice; typedef ::cros::V4L2Buffer V4L2Buffer; typedef ::cros::V4L2Format V4L2Format; +#endif #define ALIGN(val, alignment) (((val) + (alignment)-1) & ~((alignment)-1)) #define ALIGN_64(val) ALIGN(val, 64) @@ -58,13 +67,11 @@ typedef ::cros::V4L2Format V4L2Format; #define UNUSED(param) (void)(param) #endif -#ifdef CAL_BUILD +#if defined(HAVE_CHROME_OS) || defined(HAVE_ANDROID_OS) #ifndef V4L2_PIX_FMT_P010 #define V4L2_PIX_FMT_P010 v4l2_fourcc('P', '0', '1', '0') #endif -#endif -#ifdef CAL_BUILD #define V4L2_PIX_FMT_YUYV420_V32 v4l2_fourcc('y', '0', '3', '2') #define V4L2_PIX_FMT_SGRBG12V32 v4l2_fourcc('b', 'V', '0', 'K') #define V4L2_PIX_FMT_SGRBG10V32 v4l2_fourcc('b', 'V', '0', 'G') diff --git a/src/metadata/ParameterGenerator.cpp b/src/metadata/ParameterGenerator.cpp index 3b9dc87a..654fcbd3 100644 --- a/src/metadata/ParameterGenerator.cpp +++ b/src/metadata/ParameterGenerator.cpp @@ -542,7 +542,7 @@ int ParameterGenerator::updateCommonMetadata(Parameters* params, const AiqResult 3); } - LOG2(ST_STATS, "RGB stat %dx%d, sequence %lld, y_mean %d", + LOG2("RGB stat %dx%d, sequence %lld, y_mean %d", outStats->rgbs_grid[0].grid_width, outStats->rgbs_grid[0].grid_height, aiqResult->mSequence, size > 0 ? sumLuma / size : 0); } diff --git a/src/platformdata/PlatformData.h b/src/platformdata/PlatformData.h index 59699f6d..d5429b1c 100644 --- a/src/platformdata/PlatformData.h +++ b/src/platformdata/PlatformData.h @@ -18,7 +18,7 @@ #include -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include #else #include @@ -69,7 +69,7 @@ namespace icamera { */ #define MAX_SETTING_COUNT 40 -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #define MAX_CAMERA_NUMBER 2 #define CAMERA_CACHE_DIR "/var/cache/camera/" #define CAMERA_DEFAULT_CFG_PATH "/etc/camera/" @@ -77,12 +77,12 @@ namespace icamera { #define CAMERA_GRAPH_SETTINGS_DIR "gcss/" #endif -#ifdef __ANDROID__ +#ifdef HAVE_ANDROID_OS #define MAX_CAMERA_NUMBER 2 -#define CAMERA_CACHE_DIR "./" -#define CAMERA_DEFAULT_CFG_PATH "/vendor/etc/" -#define CAMERA_GRAPH_DESCRIPTOR_FILE "graph_descriptor.xml" -#define CAMERA_GRAPH_SETTINGS_DIR "" +#define CAMERA_CACHE_DIR "/var/cache/camera/" +#define CAMERA_DEFAULT_CFG_PATH "/vendor/etc/camera/" +#define CAMERA_GRAPH_DESCRIPTOR_FILE "gcss/graph_descriptor.xml" +#define CAMERA_GRAPH_SETTINGS_DIR "gcss/" #endif #ifdef LINUX_BUILD diff --git a/src/v4l2/CMakeLists.txt b/src/v4l2/CMakeLists.txt index fe07ba64..b710cf02 100644 --- a/src/v4l2/CMakeLists.txt +++ b/src/v4l2/CMakeLists.txt @@ -22,12 +22,11 @@ set (V4L2_SRCS CACHE INTERNAL "v4l2 sources" ) -if (NOT CAL_BUILD) - set(V4L2_SRCS - ${V4L2_SRCS} - ${MODULES_DIR}/v4l2/v4l2_device.cc - ${MODULES_DIR}/v4l2/v4l2_subdevice.cc - ${MODULES_DIR}/v4l2/v4l2_video_node.cc - CACHE INTERNAL "v4l2 sources" - ) -endif() +set(V4L2_SRCS + ${V4L2_SRCS} + ${MODULES_DIR}/v4l2/v4l2_device.cc + ${MODULES_DIR}/v4l2/v4l2_subdevice.cc + ${MODULES_DIR}/v4l2/v4l2_video_node.cc + CACHE INTERNAL "v4l2 sources" + ) + diff --git a/src/v4l2/MediaControl.h b/src/v4l2/MediaControl.h index 4ba0251f..10547c92 100644 --- a/src/v4l2/MediaControl.h +++ b/src/v4l2/MediaControl.h @@ -32,7 +32,7 @@ #include #include -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include #else #include diff --git a/src/v4l2/V4l2DeviceFactory.h b/src/v4l2/V4l2DeviceFactory.h index 70571c81..954eb295 100644 --- a/src/v4l2/V4l2DeviceFactory.h +++ b/src/v4l2/V4l2DeviceFactory.h @@ -16,7 +16,7 @@ #pragma once -#ifdef CAL_BUILD +#ifdef HAVE_CHROME_OS #include #else #include