Skip to content

Commit

Permalink
Engineer release on 2023-02-08
Browse files Browse the repository at this point in the history
Signed-off-by: Hao Yao <hao.yao@intel.com>
  • Loading branch information
hao-yao committed Feb 8, 2023
1 parent a359c1e commit a47f23d
Show file tree
Hide file tree
Showing 76 changed files with 1,795 additions and 603 deletions.
22 changes: 21 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ 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
Expand Down Expand Up @@ -244,9 +246,14 @@ endif() #ENABLE_SANDBOXING
set(LIBCAMHAL_SRCS ${LIBCAMHAL_SRCS} ${IIO_SRCS})

# Add libcamhal using the specified sources
if (${CMAKE_VERSION} VERSION_LESS 3.11)
add_library(camhal SHARED ${LIBCAMHAL_SRCS})
else()
add_library(camhal SHARED $<TARGET_OBJECTS:camhal_static>)
endif()

add_library(camhal_static STATIC ${LIBCAMHAL_SRCS})
set_target_properties(camhal_static PROPERTIES OUTPUT_NAME "camhal")
add_library(camhal SHARED $<TARGET_OBJECTS:camhal_static>)

#---------------------------- Link settings ----------------------------
target_link_libraries(camhal ${CMAKE_DL_LIBS})
Expand Down Expand Up @@ -398,6 +405,12 @@ 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)
elseif("${PRODUCTION_NAME}" STREQUAL "mtl-iotg")
message("Install MTL iotg configure files")
install(DIRECTORY config/linux/ipu6ep/ DESTINATION share/defaults/etc/camera)
else()
message("Install MTL configure files")
install(DIRECTORY config/linux/ipu6ep/ DESTINATION share/defaults/etc/camera)
endif()
elseif("${IPU_VER}" STREQUAL "ipu6sepla")
if("${PRODUCTION_NAME}" STREQUAL "penguin_peak")
Expand All @@ -410,7 +423,14 @@ else()
endif()

# Install libraries
if (${CMAKE_VERSION} VERSION_LESS 3.11)
install(TARGETS camhal camhal_static
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
else()
install(TARGETS camhal camhal_static)
endif()

# Install package config file
configure_file(${PROJECT_SOURCE_DIR}/cmake/libcamhal.pc.cmakein
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Alder Lake platforms. There are 4 repositories that provide the complete setup:
## Build instructions:
- Dependencies: ipu6-camera-bins
- Dependencies: libexpat-dev automake libtool libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
- For cameras supporting privacy mode (ov01a1s, ov02c10, ov2740), add a dummy image for it:
```shell
cd config/linux/ipu6ep
ffmpeg -i <input_file> -pix_fmt nv12 privacy_image_<sensor_name>-uf_<width>_<height>.yuv
```
- Build and install:

1. Set IPU6 version and product name for build
Expand Down Expand Up @@ -110,5 +115,6 @@ Alder Lake platforms. There are 4 repositories that provide the complete setup:
```

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.
3 changes: 3 additions & 0 deletions cmake/FindIA_IMAGING.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ find_library(IA_LARD_LIB ia_lard)
endif() #ENABLE_SANDBOXING
find_library(IA_EXC_LIB ia_exc)
find_library(IA_MKN_LIB ia_mkn)
# SENSOR_EMD_DECODER
find_library(IA_EMD_LIB ia_emd_decoder)
find_library(IA_NVM_LIB ia_nvm)
find_library(IA_LOG_LIB ia_log)
find_library(IA_DVS_LIB ia_dvs)
Expand All @@ -59,6 +61,7 @@ set(IA_IMAGING_LIBS
${IA_CMC_PARSER_LIB}
${IA_EXC_LIB}
${IA_MKN_LIB}
${IA_EMD_LIB}
${IA_BCOMP_LIB}
${IA_NVM_LIB}
${IA_LOG_LIB}
Expand Down
8 changes: 4 additions & 4 deletions cmake/libcamhal.pc.cmakein
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/libcamhal
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include/libcamhal

Name: libcamhal
Description: Camera HAL Library
Expand Down
2 changes: 1 addition & 1 deletion config/linux/ipu6ep/libcamhal_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<!-- The value format of availableSensors is "sensor name"-wf/uf-"CSI port ID".
wf is word facing, and uf is user facing.
-->
<availableSensors value="ov13b10-wf-2,ov13b10-uf-1,ov8856-wf-2,ov8856-uf-1,ov01a10-uf-1,ov01a10-uf-2,ov02c10-uf-1,ov02c10-uf-2, ov2740-uf-1,hm2170-uf-1,hi556-uf-1,ov01a1s-uf-1"/>
<availableSensors value="ov13b10-wf-2,ov13b10-uf-1,ov8856-wf-2,ov8856-uf-1,ov01a10-uf-1,ov01a10-uf-2,ov02c10-uf-1,ov02c10-uf-2,ov2740-uf-1,hm2170-uf-1,hi556-uf-1,ov01a1s-uf-1"/>
</Common>
</CameraSettings>
2 changes: 2 additions & 0 deletions config/linux/ipu6ep/sensors/hm2170-uf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<initialSkipFrame value="0"/>
<exposureLag value="2"/>
<gainLag value="2"/>
<digitalGainLag value="3"/>
<ltmGainLag value="1"/>
<yuvColorRangeMode value="full"/> <!-- there are 2 yuv color range mode, like full, reduced. -->
<graphSettingsFile value="graph_settings_HM2170_1SG205N3_ADL.xml"/>
Expand Down Expand Up @@ -139,6 +140,7 @@
<initialSkipFrame value="0"/>
<exposureLag value="2"/>
<gainLag value="2"/>
<digitalGainLag value="3"/>
<ltmGainLag value="1"/>
<yuvColorRangeMode value="full"/> <!-- there are 2 yuv color range mode, like full, reduced. -->
<graphSettingsFile value="graph_settings_HM2170_CJFME18_ADL.xml"/>
Expand Down
3 changes: 2 additions & 1 deletion config/linux/ipu6ep/sensors/ov01a1s-uf.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- 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.
Expand Down Expand Up @@ -178,6 +178,7 @@
<pslOutputMapForRotation value="1280x720@1280x720,640x480@640x480,320x240@640x480"/>

<maxRequestsInflight value="5"/>
<supportPrivacy value="1"/> <!-- privacy mode, 0: off, 1: CVF privacy 2: AE-based privacy -->
</Sensor>
</CameraSettings>

8 changes: 4 additions & 4 deletions config/linux/ipu6ep/sensors/ov02c10-uf.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- 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.
Expand Down Expand Up @@ -80,7 +80,7 @@
<enableAiqd value = "true"/>
<useCrlModule value = "false"/>
<maxRequestsInflight value="5"/>
<supportPrivacy value="true"/>
<supportPrivacy value="1"/> <!-- privacy mode, 0: off, 1: CVF privacy 2: AE-based privacy -->
</Sensor>
<Sensor name="ov02c10-uf" description="OV02C10 sensor.">
<MediaCtlConfig id="0" ConfigMode="AUTO" outputWidth="1928" outputHeight="1092" format="V4L2_PIX_FMT_SGRBG10"><!-- RAW10 BE capture -->
Expand Down Expand Up @@ -147,7 +147,7 @@
<enableAiqd value = "true"/>
<useCrlModule value = "false"/>
<maxRequestsInflight value="5"/>
<supportPrivacy value="true"/>
<supportPrivacy value="1"/> <!-- privacy mode, 0: off, 1: CVF privacy 2: AE-based privacy -->
</Sensor>
<Sensor name="ov02c10-uf" description="OV02C10 sensor.">
<MediaCtlConfig id="0" ConfigMode="AUTO" outputWidth="1928" outputHeight="1092" format="V4L2_PIX_FMT_SGRBG10"><!-- RAW10 BE capture -->
Expand Down Expand Up @@ -214,7 +214,7 @@
<enableAiqd value = "true"/>
<useCrlModule value = "false"/>
<maxRequestsInflight value="5"/>
<supportPrivacy value="true"/>
<supportPrivacy value="1"/> <!-- privacy mode, 0: off, 1: CVF privacy 2: AE-based privacy -->
</Sensor>
</CameraSettings>

5 changes: 4 additions & 1 deletion config/linux/ipu6ep/sensors/ov2740-uf.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- 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.
Expand Down Expand Up @@ -82,5 +82,8 @@
<enableAiqd value = "true"/>
<useCrlModule value = "false"/>
<maxRequestsInflight value="6"/>
<supportPrivacy value="2"/> <!-- privacy mode, 0: off, 1: CVF privacy 2: AE-based privacy -->
<privacyModeThreshold value="10"/> <!-- AE-based privacy mode luminance threshold -->
<privacyModeFrameDelay value="5"/> <!-- AE-based privacy mode frame delay -->
</Sensor>
</CameraSettings>
22 changes: 21 additions & 1 deletion include/api/Parameters.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2013 The Android Open Source Project
* 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.
Expand Down Expand Up @@ -2871,6 +2871,26 @@ class Parameters {
*/
int getZoomRegion(camera_zoom_region_t* region) const;

// LEVEL0_ICBM_S
/**
* \brief Set ICBM FF Mode
*
* \param[in] uint8_t Mode
*
* \return 0 if set successfully, otherwise non-0 value is returned.
*/
int setICBMUFMode(uint8_t mode);

/**
* \brief Get ICBM UF Mode
*
* \param[out] uint8_t mode
*
* \return 0 if flag was set, otherwise non-0 value is returned.
*/
int getICBMUFMode(uint8_t* mode) const;
// LEVEL0_ICBM_E

private:
friend class ParameterHelper;
void* mData; // The internal data to save the all of the parameters.
Expand Down
43 changes: 22 additions & 21 deletions include/api/intel_vendor_metadata_tags.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -47,32 +47,32 @@ 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
// ENABLE_EVCP_S
INTEL_VENDOR_CAMERA_IC_CAPS, // int32 | public
// ENABLE_EVCP_E
// ENABLE_EVCP_S
// ENABLE_EVCP_E
// ENABLE_EVCP_S
INTEL_VENDOR_CAMERA_IC_PEACE_FEATURES, // int32[] | public
// ENABLE_EVCP_E
// ENABLE_EVCP_S
// ENABLE_EVCP_E
// ENABLE_EVCP_S
INTEL_VENDOR_CAMERA_IC_ECC_MODE, // enum | public
// ENABLE_EVCP_E
// ENABLE_EVCP_S
// ENABLE_EVCP_E
// ENABLE_EVCP_S
INTEL_VENDOR_CAMERA_IC_BC_MODE, // enum | public
// ENABLE_EVCP_E
// ENABLE_EVCP_S
// ENABLE_EVCP_E
// ENABLE_EVCP_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
// ENABLE_EVCP_E
// ENABLE_EVCP_S
INTEL_VENDOR_CAMERA_IC_UF_MODE, // enum | public
// ENABLE_EVCP_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
Expand Down Expand Up @@ -125,15 +125,16 @@ typedef enum vendor_metadata_enum_intel_vendor_camera_ic_bc_mode {

// 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;
// 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
// 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;

13 changes: 11 additions & 2 deletions modules/algowrapper/IntelCca.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -202,6 +202,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("<id%d>@%s, tuningMode:%d, size:%d", mCameraId, __func__, mTuningMode, size);

Expand Down Expand Up @@ -245,7 +254,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;
Expand Down
5 changes: 4 additions & 1 deletion modules/algowrapper/IntelCca.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -59,6 +59,9 @@ class IntelCca {
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* getStatsDataBuffer();
Expand Down
42 changes: 42 additions & 0 deletions modules/algowrapper/IntelICBM.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* 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.
*/

#define LOG_TAG IntelICBM

#include "modules/algowrapper/IntelICBM.h"
#include "src/icbm/ICBMFactory.h"

#include "Errors.h"
#include "iutils/CameraLog.h"

namespace icamera {

Result IntelICBM::setup(ICBMInitInfo* initParam) {
mIIntelICBM = std::unique_ptr<IIntelICBM>(createIntelICBM());

return mIIntelICBM->setup(initParam);
}

void IntelICBM::shutdown() {
mIIntelICBM->shutdown();
}

Result IntelICBM::processFrame(const ImageInfo& iii, const ImageInfo& iio,
const ICBMReqInfo& reqInfo) {
return mIIntelICBM->processFrame(iii, iio, reqInfo);
}

} // namespace icamera
Loading

0 comments on commit a47f23d

Please sign in to comment.