static int set_basic_image_params(basic_iq_params * iq_params) { if (g_mw_basic_iq.day_night_mode != iq_params->day_night_mode) { if (mw_enable_day_night_mode(iq_params->day_night_mode) < 0) { APP_ERROR("mw_enable_day_night_mode error\n"); return -1; } } #if 0 if (g_mw_basic_iq.metering_mode != iq_params->metering_mode) { if (mw_set_ae_metering_mode(iq_params->metering_mode) < 0) { APP_ERROR("mw_set_ae_metering_mode error\n"); return -1; } } #endif if (g_mw_basic_iq.back_light_comp_enable != iq_params->back_light_comp_enable) { if (mw_enable_backlight_compensation(iq_params->back_light_comp_enable) < 0) { APP_ERROR("mw_enable_backlight_compensation error\n"); return -1; } } if (g_mw_basic_iq.local_exposure_mode != iq_params->local_exposure_mode) { if (set_local_exposure_mode(iq_params->local_exposure_mode) < 0) { APP_ERROR("set_local_exposure_mode error\n"); return -1; } } if (g_mw_basic_iq.mctf_strength != iq_params->mctf_strength) { if (mw_set_mctf_strength(iq_params->mctf_strength) < 0) { APP_ERROR("mw_set_mctf_strength error\n"); return -1; } } if (g_mw_basic_iq.dc_iris_enable != iq_params->dc_iris_enable) { if (mw_enable_dc_iris_control(iq_params->dc_iris_enable) < 0) { APP_ERROR("mw_enable_dc_iris_control error\n"); return -1; } } if (g_mw_basic_iq.ae_target_ratio != iq_params->ae_target_ratio) { if (mw_set_exposure_level(iq_params->ae_target_ratio) < 0) { APP_ERROR("mw_set_exposure_level error\n"); return -1; } } return 0; }
int imagingSetBLCMode(int mode) { int retVal = 0; #ifndef NO_HARDWARE /*0-disable, 1-enable*/ retVal = mw_enable_backlight_compensation(mode); if(retVal != 0) { printf("mw_enable_backlight_compensation error:%d\n", retVal); return retVal; } blcMode = mode; #endif return IMAGING_OK; }