backlight correction added to scene modes.
authorMarko Ollonen <marko.ollonen@ixonos.com>
Wed, 22 May 2013 14:01:22 +0000 (17:01 +0300)
committerMarko Ollonen <marko.ollonen@ixonos.com>
Fri, 24 May 2013 10:39:17 +0000 (13:39 +0300)
Change-Id: Ic34251bb6df5b066eaf41c05431a333d9098b6ed

gst-libs/atomisphal/gstv4l2mfldadvci.c
gst-libs/atomisphal/gstv4l2mfldadvci.h
gst-libs/atomisphal/mfld_cam.c
gst-libs/atomisphal/mfld_cam.h
gst/mfldv4l2cam/v4l2camsrc_calls.c
packaging/gst-plugins-atomisp.changes

index f1c8c96..9886d19 100644 (file)
@@ -343,6 +343,8 @@ lib_3a_link_functions_init (GstV4l2MFLDAdvCI *mfldadvci,  GModule *mod)
 
   g_module_symbol (mod, "ci_adv_get_focus_current_pos", (gpointer) &mfldadvci->GetCurrFocusPos);
   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);
+
 
   mfldadvci->initialized = 0;
   // TODO
@@ -438,5 +440,7 @@ wrapper_default_link_functions_init (GstV4l2MFLDAdvCI *mfldadvci)
 
   mfldadvci->GetCurrFocusPos = wrapper_default_int_int;
   mfldadvci->FocusPosToDisctance = wrapper_default_int_int;
+  mfldadvci->AeSetBacklightCorrection = wrapper_default_enable;
+
 
 }
index 72b1de8..e0c5101 100644 (file)
@@ -281,6 +281,8 @@ struct _GstV4l2MFLDAdvCI
   int  (*GetCurrFocusPos)(int *pos);
   int  (*FocusPosToDisctance)(int pos);  /*!< Converts pos to focus distance in cm */
 
+  void (*AeSetBacklightCorrection)(gboolean enable);
+
 };
 
 void lib_3a_link_functions_init (GstV4l2MFLDAdvCI *mfldadvci, GModule *mod);
index 1a4ccc2..8a3c295 100644 (file)
@@ -293,6 +293,7 @@ set_scene_mode (int mode)
         scene = advci_ae_exposure_program_night;
         break;
       case CAM_GENERAL_SCENE_MODE_AUTO:
+      case CAM_GENERAL_SCENE_MODE_BACKLIGHT:
         scene = advci_ae_exposure_program_auto;
         break;
       case CAM_GENERAL_SCENE_MODE_FIREWORKS:
@@ -303,6 +304,12 @@ set_scene_mode (int mode)
         break;
     }
     mfldadvci->AeSetExposureProgram (scene);
+
+    if (mode == CAM_GENERAL_SCENE_MODE_BACKLIGHT)
+       mfldadvci->AeSetBacklightCorrection(TRUE);
+    else
+       mfldadvci->AeSetBacklightCorrection(FALSE);
+
   }
   mfld_cam_settings.scene_mode = mode;
   return CAM_ERR_NONE;
@@ -1266,7 +1273,7 @@ cam_driver_init (int fd, const char *sensor_id)
     mfldadvci->AfSetMode(advci_af_mode_auto);
     mfldadvci->AeSetFlickerMode (advci_ae_flicker_mode_50hz);
     mfldadvci->AfSetMeteringMode(advci_af_metering_mode_auto);
-
+    mfldadvci->AeSetBacklightCorrection(FALSE);
     mfldadvci->af_stop ();
   }
   else{
index 02857f6..0af327c 100644 (file)
@@ -94,6 +94,7 @@ typedef enum
   CAM_GENERAL_SCENE_MODE_NIGHT,
   CAM_GENERAL_SCENE_MODE_AUTO,
   CAM_GENERAL_SCENE_MODE_FIREWORKS,
+  CAM_GENERAL_SCENE_MODE_BACKLIGHT
 } cam_scene_mode_t;
 
 /* Focus Status */
index da79a5d..440d341 100644 (file)
@@ -3049,6 +3049,7 @@ static const gint gst_v4l2camsrc_scene_map[] = {
   CAM_GENERAL_SCENE_MODE_SPORT,
   CAM_GENERAL_SCENE_MODE_NIGHT,
   CAM_GENERAL_SCENE_MODE_AUTO,
+  CAM_GENERAL_SCENE_MODE_BACKLIGHT,
   -1
 };
 
index 0658c4d..e504099 100644 (file)
@@ -1,3 +1,6 @@
+* Wed May 22 2013 Marko Ollonen <marko.ollonen@ixonos.com> accepted/tizen_2.0/20130307.195130@d028212
+- backlight correction added to scene modes.
+
 * Mon May 13 2013 Marko Ollonen <marko.ollonen@ixonos.com> accepted/tizen_2.0/20130307.195130@b43a6e2
 - unref still image buffer in signal based capture, TZSP-6410.