You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
188 lines
8.8 KiB
188 lines
8.8 KiB
/* |
|
* mw_api.h |
|
* |
|
* History: |
|
* 2013/03/12 - [Cao Rongrong] Created file |
|
* 2013/12/12 - [Jian Tang] Modified file |
|
* |
|
* Copyright (c) 2016 Ambarella, Inc. |
|
* |
|
* This file and its contents ("Software") are protected by intellectual |
|
* property rights including, without limitation, U.S. and/or foreign |
|
* copyrights. This Software is also the confidential and proprietary |
|
* information of Ambarella, Inc. and its licensors. You may not use, reproduce, |
|
* disclose, distribute, modify, or otherwise prepare derivative works of this |
|
* Software or any portion thereof except pursuant to a signed license agreement |
|
* or nondisclosure agreement with Ambarella, Inc. or its authorized affiliates. |
|
* In the absence of such an agreement, you agree to promptly notify and return |
|
* this Software to Ambarella, Inc. |
|
* |
|
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, |
|
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, |
|
* MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
* IN NO EVENT SHALL AMBARELLA, INC. OR ITS AFFILIATES BE LIABLE FOR ANY DIRECT, |
|
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
|
* LOSS OF USE, DATA, OR PROFITS; COMPUTER FAILURE OR MALFUNCTION; OR BUSINESS |
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
|
* POSSIBILITY OF SUCH DAMAGE. |
|
* |
|
*/ |
|
|
|
#ifndef __MW_API_H__ |
|
#define __MW_API_H__ |
|
|
|
#ifdef __cplusplus |
|
extern "C" { |
|
#endif |
|
|
|
#include "basetypes.h" |
|
|
|
#ifndef AMBA_API |
|
#define AMBA_API __attribute__((visibility("default"))) |
|
#endif |
|
|
|
/********************** Image global configuration **********************/ |
|
AMBA_API int mw_start_aaa(int fd_iav); |
|
AMBA_API int mw_stop_aaa(void); |
|
AMBA_API int mw_init_mctf(int fd_iav); |
|
AMBA_API int mw_get_iav_state(int fd, int *pState); |
|
/********************** Exposure Control Settings **********************/ |
|
AMBA_API int mw_enable_ae(int enable); |
|
AMBA_API int mw_get_ae_param(mw_ae_param *ae_param); |
|
AMBA_API int mw_set_ae_param(mw_ae_param *ae_param); |
|
AMBA_API int mw_get_exposure_level(int *pExposure_level); |
|
AMBA_API int mw_get_shutter_time(int fd_iav, int *pShutter_time); |
|
AMBA_API int mw_get_sensor_gain(int fd_iav, int *pGain_db); |
|
AMBA_API int mw_get_sensor_ir_normal_diff(int *pSensorDiff); |
|
AMBA_API int mw_get_sensor_agc(int *pAgc); |
|
AMBA_API int mw_get_ae_metering_mode(mw_ae_metering_mode *pMode); |
|
AMBA_API int mw_set_ae_metering_mode(mw_ae_metering_mode mode); |
|
AMBA_API int mw_get_ae_metering_table(mw_ae_metering_table *pAe_metering_table); |
|
AMBA_API int mw_set_ae_metering_table(mw_ae_metering_table *pAe_metering_table); |
|
AMBA_API int mw_is_dc_iris_supported(void); |
|
AMBA_API int mw_enable_dc_iris_control(int enable); |
|
AMBA_API int mw_set_dc_iris_pid_coef(mw_dc_iris_pid_coef *pPid_coef); |
|
AMBA_API int mw_get_dc_iris_pid_coef(mw_dc_iris_pid_coef *pPid_coef); |
|
AMBA_API int mw_is_ir_led_supported(void); |
|
AMBA_API int mw_set_ir_led_param(mw_ir_led_control_param *pParam); |
|
AMBA_API int mw_get_ir_led_param(mw_ir_led_control_param *pParam); |
|
AMBA_API int mw_set_ir_led_brightness(int brightness); |
|
AMBA_API int mw_get_ae_luma_value(mw_luma_value *pLuma); |
|
AMBA_API int mw_get_ae_lines(mw_ae_line *lines, u32 line_num); |
|
AMBA_API int mw_set_ae_lines(mw_ae_line *lines, u32 line_num); |
|
AMBA_API int mw_get_ae_points(mw_ae_point *point_arr, u32 point_num); |
|
AMBA_API int mw_set_ae_points(mw_ae_point *point_arr, u32 point_num); |
|
AMBA_API int mw_set_ae_area(int enable); |
|
AMBA_API int mw_set_sensor_gain(int fd_iav, int *pGain_db); |
|
AMBA_API int mw_set_shutter_time(int fd_iav, int *shutter_time); |
|
AMBA_API int mw_set_exposure_level(int *pExposure_level); |
|
|
|
/********************** White Balance Settings **********************/ |
|
AMBA_API int mw_enable_awb(int enable); |
|
AMBA_API int mw_get_awb_param(mw_awb_param *pAWB); |
|
AMBA_API int mw_set_awb_param(mw_awb_param *pAWB); |
|
AMBA_API int mw_get_awb_method(mw_white_balance_method *pWb_method); |
|
AMBA_API int mw_set_awb_method(mw_white_balance_method wb_method); |
|
AMBA_API int mw_set_white_balance_mode(mw_white_balance_mode wb_mode); |
|
AMBA_API int mw_get_white_balance_mode(mw_white_balance_mode *pWb_mode); |
|
AMBA_API int mw_set_awb_custom_gain(mw_wb_gain *pGain); |
|
AMBA_API int mw_get_awb_manual_gain(mw_wb_gain *pGain); |
|
|
|
/********************** Image Adjustment Settings **********************/ |
|
AMBA_API int mw_get_image_param(mw_image_param *pImage); |
|
AMBA_API int mw_set_image_param(mw_image_param *pImage); |
|
AMBA_API int mw_get_saturation(int *pSaturation); |
|
AMBA_API int mw_set_saturation(int saturation); |
|
AMBA_API int mw_get_brightness(int *pBrightness); |
|
AMBA_API int mw_set_brightness(int brightness); |
|
AMBA_API int mw_get_contrast(int *pContrast); |
|
AMBA_API int mw_set_contrast(int contrast); |
|
AMBA_API int mw_get_sharpness(int *pSharpness); |
|
AMBA_API int mw_set_sharpness(int sharpness); |
|
|
|
/********************** Image Enhancement Settings **********************/ |
|
AMBA_API int mw_get_mctf_strength(u32 *pStrength); |
|
AMBA_API int mw_set_mctf_strength(u32 strength); |
|
AMBA_API int mw_get_auto_local_exposure_mode(u32 *pMode); |
|
AMBA_API int mw_set_auto_local_exposure_mode(u32 mode); |
|
AMBA_API int mw_set_local_exposure_curve(int fd_iav, mw_local_exposure_curve *pLocal_exposure); |
|
AMBA_API int mw_enable_backlight_compensation(int enable); |
|
AMBA_API int mw_enable_day_night_mode(int enable); |
|
AMBA_API int mw_set_auto_color_contrast(u32 enable); |
|
AMBA_API int mw_get_auto_color_contrast(u32 *pEnable); |
|
AMBA_API int mw_set_auto_color_contrast_strength (u32 value); |
|
AMBA_API int mw_get_adj_status(int *pEnable); |
|
AMBA_API int mw_enable_adj(int enable); |
|
AMBA_API int mw_get_chroma_noise_strength(int *pStrength); |
|
AMBA_API int mw_set_chroma_noise_strength(int strength); |
|
AMBA_API int mw_get_auto_wdr_strength(int *pStrength); |
|
AMBA_API int mw_set_auto_wdr_strength(int strength); |
|
AMBA_API int mw_set_sharpen_filter(int sharpen); |
|
AMBA_API int mw_get_sharpen_filter(void); |
|
|
|
/********************** Image auto focus Settings **********************/ |
|
AMBA_API int mw_get_af_param(mw_af_param *pAF); |
|
AMBA_API int mw_set_af_param(mw_af_param *pAF); |
|
|
|
/********************** Calibration related APIs **********************/ |
|
AMBA_API int mw_load_calibration_file(mw_cali_file *pFile); |
|
|
|
/********************** Motion detection related APIs **********************/ |
|
AMBA_API int mw_md_get_motion_event(int *p_motion_event); |
|
AMBA_API int mw_md_callback_setup(alarm_handle_func alarm_handler); |
|
AMBA_API int mw_md_get_roi_info(int roi_idx, mw_roi_info *roi_info); |
|
AMBA_API int mw_md_set_roi_info(int roi_idx, const mw_roi_info *roi_info); |
|
AMBA_API int mw_md_clear_roi(int roi_idx); |
|
AMBA_API int mw_md_roi_region_display(void); |
|
AMBA_API int mw_md_thread_start(void); |
|
AMBA_API int mw_md_thread_stop(void); |
|
void mw_md_print_event(int flag); |
|
|
|
/**********************Others APIs **********************************/ |
|
AMBA_API int mw_get_version_info(mw_version_info *pVersion); |
|
AMBA_API int mw_get_log_level(int *pLog); |
|
AMBA_API int mw_set_log_level(mw_log_level log); |
|
AMBA_API int mw_get_lib_version(mw_aaa_lib_version *pAlgo_lib_version, |
|
mw_aaa_lib_version *pDsp_lib_version); |
|
AMBA_API int mw_display_adj_bin_version(void); |
|
AMBA_API int mw_load_aaa_param_file(char *pFile_name, int type); |
|
AMBA_API int mw_get_sys_info(mw_sys_info *pMw_sys_info); |
|
AMBA_API int mw_get_image_statistics(mw_image_stat_info *pInfo); |
|
AMBA_API int mw_load_config_file(char *filename); |
|
AMBA_API int mw_save_config_file(char *filename); |
|
AMBA_API int mw_load_adj_param(mw_adj_file_param *contents); |
|
AMBA_API int mw_save_adj_param(mw_adj_file_param *contents); |
|
AMBA_API int mw_set_lens_id(int id); |
|
AMBA_API int mw_set_auto_knee_strength (int strength); |
|
AMBA_API int mw_get_auto_knee_strength (int *pStrength); |
|
AMBA_API int mw_enable_auto_dump_cfg(int enable); |
|
AMBA_API int mw_set_hdr_blend_config(mw_hdr_blend_info *pBlend_cfg); |
|
AMBA_API int mw_get_hdr_blend_config(mw_hdr_blend_info *pBlend_cfg); |
|
AMBA_API int mw_set_wdr_luma_config(mw_wdr_luma_info *pWdr_luma_cfg); |
|
AMBA_API int mw_get_wdr_luma_config(mw_wdr_luma_info *pWdr_luma_cfg); |
|
AMBA_API int mw_set_video_freeze(int enable); |
|
|
|
AMBA_API int mw_get_dynamic_shutter_ratio(mw_dyna_shutter_ratio *dyna_ratio); |
|
AMBA_API int mw_set_dynamic_shutter_ratio(mw_dyna_shutter_ratio *dyna_ratio); |
|
AMBA_API int mw_get_pw_cfg(mw_pw_cfg *pw_cfg); |
|
AMBA_API int mw_set_pw_cfg(mw_pw_cfg *pw_cfg); |
|
|
|
AMBA_API int mw_get_vin_src_id(u8 *pvin_src_id); |
|
AMBA_API int mw_set_vin_src_id(u8 vin_src_id); |
|
AMBA_API int mw_set_img_log_level(u32 level); |
|
|
|
AMBA_API int mw_get_chan_src_id(u8 *pchan_src_id); |
|
AMBA_API int mw_set_chan_src_id(u8 chan_src_id); |
|
AMBA_API int mw_get_sys_multi_chan_info(mw_sys_multi_chan_info *pMw_info); |
|
AMBA_API int mw_enable_hdrplus(u32 enable_chan_map); |
|
AMBA_API int mw_rt_change_hdr_mask(u32 hdr_mask); |
|
|
|
#ifdef __cplusplus |
|
} |
|
#endif |
|
|
|
#endif // __MW_API_H__ |
|
|
|
|