lib_3a_dis_calc_still (struct atomisp_dis_vector * vector, int frame_number)
{
cam_lib_3a_dbg("%s:%d\n", __func__, __LINE__);
- void (*dis_calc_still)(vector,frame_number);
return;
}
lib_3a_do_redeye_removal (ia_frame *ia_frame)
{
cam_lib_3a_dbg("%s:%d\n", __func__, __LINE__);
- ia_redeye_correct(ia_frame);
}
static void
struct atomisp_dis_vector vectors[])
{
cam_lib_3a_dbg("%s:%d\n", __func__, __LINE__);
- ia_dis_still_compose(com_buf, bufs, frame_dis, vectors);
return;
}
case CAM_LIGHT_FLASH_MODE_ON:
case CAM_LIGHT_FLASH_MODE_FILL_IN:
case CAM_LIGHT_FLASH_MODE_RED_EYE:
- /* ret = cam_driver_set_flash_mode(fd,ATOMISP_FLASH_MODE_FLASH); */
- break;
case CAM_LIGHT_FLASH_MODE_OFF:
ret = cam_driver_set_flash_mode(fd,ATOMISP_FLASH_MODE_OFF);
break;
{
cam_err_t ret = CAM_ERR_NONE;
cam_driver_dbg ("%s\n", __func__);
- /* FIXME We need to switch the binary here ? */
mfld_driver.first_frame = 1;
- //return ret; /* Don't switch mode temppory for the MIPI issue */
if (mfld_driver.sensor_type == SENSOR_TYPE_RAW){
switch (mode) {
mfldadvci->switch_mode (ia_3a_isp_mode_preview, mfld_driver.frame_rate);
set_flash_mode(fd, mfld_cam_settings.flash_mode);
if (mfld_driver.ae_enabled)
- //ci_adv_set_3a_mode(ia_3a_isp_mode_preview, &mfld_driver.sensor_config);
mfld_driver.first_frame = 1;
cam_driver_dbg ("%s: VIEWFINDER Mode is set\n", __func__);
break;
case CAM_CAPTURE_MODE_VIDEO_RECORD:
mfldadvci->switch_mode (ia_3a_isp_mode_video, mfld_driver.frame_rate);
if (mfld_driver.ae_enabled)
- //ci_adv_set_3a_mode(ia_3a_isp_mode_video, &mfld_driver.sensor_config);
mfld_driver.first_frame = 1;
cam_driver_dbg ("%s: VIDEO Mode is set\n", __func__);
break;
case CAM_CAPTURE_MODE_STILL_CAPTURE:
mfldadvci->switch_mode (ia_3a_isp_mode_capture, mfld_driver.frame_rate);
if (mfld_driver.ae_enabled)
- //ci_adv_set_3a_mode(ia_3a_isp_mode_capture, &mfld_driver.sensor_config);
mfld_driver.first_frame = 1;
cam_driver_dbg ("%s: STILL Mode is set\n", __func__);
break;
}
}
-static int
+static bool
get_flash_status(void)
{
int cur_flash_mode = CAM_LIGHT_FLASH_MODE_OFF;
- int flash_en = 0;
+ bool flash_en = FALSE;
get_flash_mode(&cur_flash_mode);
switch (cur_flash_mode) {
case CAM_LIGHT_FLASH_MODE_ON:
- flash_en = 1;
+ flash_en = TRUE;
break;
case CAM_LIGHT_FLASH_MODE_AUTO:
- /* TODO: flash-on depends on current image illuminance */
+ case CAM_LIGHT_FLASH_MODE_RED_EYE:
+ mfldadvci->ae_is_flash_needed(&flash_en);
+
break;
default:
/* other mode, turn flash off */
;
}
-
return flash_en;
}
int index;
int frame_dis = 1, frame_cnt;
cam_err_t ret = 0;
- bool use_flash = TRUE;
- int cur_flash_mode;
- int flash_en = 0;
+ bool flash_en = FALSE;
cam_capture_init (fd, buffer, capture_settings);
if (mfld_driver.mode == CAM_CAPTURE_MODE_STILL_CAPTURE ) {
/* check flash here not in always when capturing frames */
flash_en = get_flash_status ();
- get_flash_mode(&cur_flash_mode);
- if (cur_flash_mode == CAM_LIGHT_FLASH_MODE_AUTO)
- mfldadvci->ae_is_flash_needed(&use_flash);
- if ((use_flash == TRUE) && (flash_en = 1)){
+ if (flash_en == TRUE) {
run_flash_sequence (fd, buffer);
}
else{
- /* TODO: use indication
- * cam_driver_set_flash_mode(fd,ATOMISP_FLASH_MODE_INDICATOR);
- cam_driver_set_indication_intensity(fd, INDICATOR_INTENSITY);
- * */
+ //cam_driver_set_indication_intensity(fd, INDICATOR_INTENSITY);
+ //cam_driver_set_flash_mode(fd,ATOMISP_FLASH_MODE_INDICATOR);
ret = run_normal_sequence(fd, buffer);
/* restore flash mode */
cam_driver_set_flash_mode(fd,ATOMISP_FLASH_MODE_OFF);