From f020a4ca58eeddcf764c9c59961cb64da4802763 Mon Sep 17 00:00:00 2001 From: Marko Ollonen Date: Wed, 22 May 2013 17:01:22 +0300 Subject: [PATCH] backlight correction added to scene modes. Change-Id: Ic34251bb6df5b066eaf41c05431a333d9098b6ed --- gst-libs/atomisphal/gstv4l2mfldadvci.c | 4 ++++ gst-libs/atomisphal/gstv4l2mfldadvci.h | 2 ++ gst-libs/atomisphal/mfld_cam.c | 9 ++++++++- gst-libs/atomisphal/mfld_cam.h | 1 + gst/mfldv4l2cam/v4l2camsrc_calls.c | 1 + packaging/gst-plugins-atomisp.changes | 3 +++ 6 files changed, 19 insertions(+), 1 deletion(-) diff --git a/gst-libs/atomisphal/gstv4l2mfldadvci.c b/gst-libs/atomisphal/gstv4l2mfldadvci.c index f1c8c96..9886d19 100644 --- a/gst-libs/atomisphal/gstv4l2mfldadvci.c +++ b/gst-libs/atomisphal/gstv4l2mfldadvci.c @@ -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; + } diff --git a/gst-libs/atomisphal/gstv4l2mfldadvci.h b/gst-libs/atomisphal/gstv4l2mfldadvci.h index 72b1de8..e0c5101 100644 --- a/gst-libs/atomisphal/gstv4l2mfldadvci.h +++ b/gst-libs/atomisphal/gstv4l2mfldadvci.h @@ -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); diff --git a/gst-libs/atomisphal/mfld_cam.c b/gst-libs/atomisphal/mfld_cam.c index 1a4ccc2..8a3c295 100644 --- a/gst-libs/atomisphal/mfld_cam.c +++ b/gst-libs/atomisphal/mfld_cam.c @@ -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{ diff --git a/gst-libs/atomisphal/mfld_cam.h b/gst-libs/atomisphal/mfld_cam.h index 02857f6..0af327c 100644 --- a/gst-libs/atomisphal/mfld_cam.h +++ b/gst-libs/atomisphal/mfld_cam.h @@ -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 */ diff --git a/gst/mfldv4l2cam/v4l2camsrc_calls.c b/gst/mfldv4l2cam/v4l2camsrc_calls.c index da79a5d..440d341 100644 --- a/gst/mfldv4l2cam/v4l2camsrc_calls.c +++ b/gst/mfldv4l2cam/v4l2camsrc_calls.c @@ -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 }; diff --git a/packaging/gst-plugins-atomisp.changes b/packaging/gst-plugins-atomisp.changes index 0658c4d..e504099 100644 --- a/packaging/gst-plugins-atomisp.changes +++ b/packaging/gst-plugins-atomisp.changes @@ -1,3 +1,6 @@ +* Wed May 22 2013 Marko Ollonen accepted/tizen_2.0/20130307.195130@d028212 +- backlight correction added to scene modes. + * Mon May 13 2013 Marko Ollonen accepted/tizen_2.0/20130307.195130@b43a6e2 - unref still image buffer in signal based capture, TZSP-6410. -- 2.7.4