change exposure compensation value scale
authorMarko Ollonen <marko.ollonen@ixonos.com>
Thu, 4 Apr 2013 04:21:49 +0000 (07:21 +0300)
committerMarko Ollonen <marko.ollonen@ixonos.com>
Thu, 4 Apr 2013 04:22:34 +0000 (07:22 +0300)
Change-Id: I78ff5904f35ad6cb08e61a7ca665d94785cd5850

gst-libs/atomisphal/mfld_cam.c
gst-libs/gst/camera/gstmfldcameracolorbalance.h
gst-libs/gst/camera/gstmfldcamerasrc.c
packaging/gst-plugins-atomisp.changes

index fc8daa1..3aebe10 100644 (file)
@@ -49,6 +49,9 @@ static const int focus_status_map[][2] =
 
 };
 
+static const float bias_map[] = { -2.0,-1.5,1.0,-0.5,0.0,0.5,1.0,1.5,2.0};
+
+
 /* TODO */
 #define DIS_COMPOSITE_FRAMES   3
 
@@ -1049,15 +1052,13 @@ cam_feature_set (int fd, cam_photo_feature_t feature, int value)
       ret = cam_driver_set_aperture (fd, value);
       break;
     case CAM_EXPOSURE_COMPENSATION:
-      if (value > 20) value = 20;
-      if (value < -20) value = -20;
-      bias = value;
-      bias = bias / 10;
-      if (mfld_cam_settings.ev_compensation != bias &&
+      if (value > 8) value = 8;
+      if (mfld_cam_settings.ev_compensation != value &&
               mfld_driver.sensor_type == SENSOR_TYPE_RAW){
+        bias = bias_map[value];
         cam_driver_dbg ("set AEBias %f\n",bias);
         ret = mfldadvci->AeSetBias (bias);
-        mfld_cam_settings.ev_compensation = bias;
+        mfld_cam_settings.ev_compensation = value;
         }
       break;
     case CAM_EXPOSURE_ISO_VALUE:
@@ -1122,7 +1123,7 @@ cam_feature_get (int fd, cam_photo_feature_t feature, int *value)
       ret = cam_driver_get_aperture (fd, value);
       break;
     case CAM_EXPOSURE_COMPENSATION:
-      *value  = mfld_cam_settings.ev_compensation * 10;
+      *value  = mfld_cam_settings.ev_compensation;
       break;
     case CAM_EXPOSURE_ISO_VALUE:
          ret = get_iso_speed (value);
@@ -1176,7 +1177,7 @@ libmfld_cam_init (GstV4l2MFLDAdvCI * advci)
       (1 << CAM_CAPTURE_CORRECTION_BPD);
 
   mfld_cam_settings.zoom = 1.0; //Zoom i in feature set 2
-  mfld_cam_settings.ev_compensation = 0.0;
+  mfld_cam_settings.ev_compensation = 4;
   mfld_cam_settings.exposure = 0;       // Auto
   mfld_cam_settings.aperture = 0;
   mfld_cam_settings.iso_speed = 0;
index 3773a0d..ae183ee 100644 (file)
@@ -86,12 +86,10 @@ static struct v4l2_queryctrl mmfw_wb_controls[] = {
                        .id = MM_CAM_FILTER_BRIGHTNESS_SOURCE_PRIV,
                        .type = V4L2_CTRL_TYPE_INTEGER,
                        .name = "brightness",
-                       /* current scale is from 1...20, app is setting values from sleeve */
-                       /* TODO change when abobe problems are fixed */
-                       .minimum = -20,
-                       .maximum = 20,
+                       .minimum = 0,
+                       .maximum = 8,
                        .step = 0x01,
-                       .default_value = 0,
+                       .default_value = 4,
                        .flags = 0,
        }
 };
index d0e49b9..995b88a 100644 (file)
@@ -609,7 +609,7 @@ gst_camerasrc_init (GstCameraSrc * camerasrc, GstCameraSrcClass * klass)
 
   /* Photo interface */
   camerasrc->photoconf.zoom = 1.0;
-  camerasrc->photoconf.ev_compensation = 0.0;
+  camerasrc->photoconf.ev_compensation = 4.0;
   camerasrc->photoconf.exposure = 0;    /* 0 = auto */
   camerasrc->photoconf.aperture = 0;    /* 0 = auto */
   camerasrc->photoconf.iso_speed = 0;   /* 0 = auto */
index ea3618c..c8f0ec8 100644 (file)
@@ -1,3 +1,6 @@
+* Thu Apr 04 2013 Marko Ollonen <marko.ollonen@ixonos.com> accepted/tizen_2.0/20130307.195130@42c074c
+- change exposure compensation value scale
+
 * Tue Apr 02 2013 Marko Ollonen <marko.ollonen@ixonos.com> accepted/tizen_2.0/20130307.195130@2a057ef
 - Exposure compensation support.