g_module_symbol (mod, "ci_adv_focus_pos_to_distance", (gpointer) &mfldadvci->FocusPosToDisctance);
g_module_symbol (mod, "ci_adv_ae_set_backlight_correction", (gpointer) &mfldadvci->AeSetBacklightCorrection);
+ g_module_symbol (mod, "ia_redeye_correct", (gpointer) &mfldadvci->DoRedeyeRemoval);
mfldadvci->initialized = 0;
// TODO
mfldadvci->init = wrapper_default_init;
mfldadvci->mode_spec_init = wrapper_default_int_void;
- mfldadvci->do_redeye_removal = wrapper_default_do_redeye_removal;
mfldadvci->load_gdc_table = wrapper_default_void;
mfldadvci->AeGetIso = wrapper_default_AeGetManualIso;
mfldadvci->RerVersion = wrapper_default_RerVersion;
mfldadvci->af_start = wrapper_default_af_start;
mfldadvci->af_stop = wrapper_default_af_stop;
- mfldadvci->do_redeye_removal = wrapper_default_do_redeye_removal;
+ mfldadvci->DoRedeyeRemoval = wrapper_default_do_redeye_removal;
mfldadvci->load_gdc_table = wrapper_default_void;
mfldadvci->AeSetBias = wrapper_default_int_int;
} advci_af_mode;
typedef enum {
- advci_ae_mode_auto, /* Automatic */
- advci_ae_mode_manual, /* Manual */
- advci_ae_mode_shutter_priority, /* Shutter priority */
- advci_ae_mode_aperture_priority /* Aperture priority */
+ advci_ae_mode_auto, /* Automatic */
+ advci_ae_mode_manual, /* Manual */
+ advci_ae_mode_shutter_priority, /* Shutter priority */
+ advci_ae_mode_aperture_priority /* Aperture priority */
} advci_ae_mode;
-
typedef enum {
advci_af_status_error, /* Cannot focus */
advci_af_status_success, /* Successfully focussed */
} advci_af_status;
typedef enum {
- advci_flash_stage_none,
- advci_flash_stage_pre,
- advci_flash_stage_main
+ advci_flash_stage_none,
+ advci_flash_stage_pre,
+ advci_flash_stage_main
} advci_flash_stage;
+typedef enum {
+ advci_frame_format_nv12, /* 12 bit YUV 420, Y, UV plane */
+ advci_frame_format_yuv420, /* 12 bit YUV 420, Y, U, V plane */
+ advci_frame_format_yuv444, /* 24 bit YUV 444, Y, U, V plane */
+ advci_frame_format_raw, /* RAW, 1 plane */
+} advci_frame_format;
+
+
typedef struct _GstV4l2MFLDAdvCI GstV4l2MFLDAdvCI;
/**
* GstV4l2MFLDAdvCI
void (*af_stop)(void);
void (*af_assist_light_needed)(gboolean *needed);
- void (*do_redeye_removal) (advci_frame_t *user_buf);
+ void (*DoRedeyeRemoval) (advci_frame_t *user_buf);
void (*load_gdc_table)(void);
static void
cam_do_redeye_removal (struct v4l2_buffer *buf)
{
+ advci_frame_t user_buf;
+ cam_driver_dbg ("%s\n", __func__);
- advci_frame_t user_buf;
user_buf.length = buf->length;
if (mfld_driver.mmap)
user_buf.addr = mmap (NULL, buf->length, PROT_READ | PROT_WRITE, MAP_SHARED,
user_buf.addr = (void *) buf->m.userptr;
user_buf.width = mfld_driver.width;
user_buf.height = mfld_driver.height;
- mfldadvci->do_redeye_removal (&user_buf);
+ switch (mfld_driver.fourcc) {
+ case V4L2_PIX_FMT_NV12:
+ user_buf.format = advci_frame_format_nv12;
+ break;
+ case V4L2_PIX_FMT_YUV420:
+ user_buf.format = advci_frame_format_yuv420;
+ break;
+ default:
+ cam_driver_dbg("%s unsupported frame format: %d", __func__,
+ mfld_driver.fourcc);
+ goto release;
+ }
+ mfldadvci->DoRedeyeRemoval(&user_buf);
+
+release:
if (mfld_driver.mmap)
munmap (user_buf.addr, user_buf.length);
}
int frame_dis = 1, frame_cnt;
cam_err_t ret = 0;
gboolean flash_en = FALSE;
+ int cur_flash_mode = CAM_LIGHT_FLASH_MODE_OFF;
+
cam_capture_init (fd, buffer, capture_settings);
if (mfld_driver.enable_torch == FALSE)
cam_driver_set_flash_mode(fd,ATOMISP_FLASH_MODE_OFF);
}
+ get_flash_mode(&cur_flash_mode);
+
+ if (mfld_driver.rer_enabled || (cur_flash_mode == CAM_LIGHT_FLASH_MODE_RED_EYE))
+ cam_do_redeye_removal (buffer);
} else {
ret = run_normal_sequence(fd, buffer);
}
if (ret)
return ret;
-
- if (mfld_driver.rer_enabled && (mfld_driver.fourcc == V4L2_PIX_FMT_YUV420))
- cam_do_redeye_removal (buffer);
-
if (capture_settings->dump_raw)
dump_raw_image (fd, capture_settings);
+* Thu May 23 2013 Marko Ollonen <marko.ollonen@ixonos.com> accepted/tizen_2.0/20130307.195130@d46c8f4
+- support for redeye removal functionality added.
+
* Wed May 22 2013 Marko Ollonen <marko.ollonen@ixonos.com> accepted/tizen_2.0/20130307.195130@d028212
- backlight correction added to scene modes.