diff --git a/xcore/aiq_handler.cpp b/xcore/aiq_handler.cpp
index dc3ec7a..50b8309 100644
--- a/xcore/aiq_handler.cpp
+++ b/xcore/aiq_handler.cpp
@@ -445,8 +445,8 @@
 
 bool AiqAeHandler::ensure_ae_manual ()
 {
-    _input.manual_exposure_time_us = this->_manual_exposure_time;
-    _input.manual_analog_gain = this->_manual_analog_gain;
+    _input.manual_exposure_time_us = get_manual_exposure_time_unlock ();
+    _input.manual_analog_gain = get_manual_analog_gain_unlock ();
     return true;
 }
 
@@ -582,11 +582,12 @@
 AiqAeHandler::adjust_ae_limitation (ia_aiq_exposure_sensor_parameters &cur_res)
 {
     ia_aiq_exposure_sensor_descriptor * desc = &_sensor_descriptor;
-    uint64_t exposure_min = this->_exposure_time_min;
-    uint64_t exposure_max = this->_exposure_time_max;
-    double analog_max = this->_max_analog_gain;
+    uint64_t exposure_min = 0, exposure_max = 0;
+    double analog_max = get_max_analog_gain_unlock ();
     uint32_t min_coarse_value = 0, max_coarse_value = 0;
 
+    get_exposure_time_range_unlock (exposure_min, exposure_max);
+
     if (exposure_min) {
         min_coarse_value =  _time_to_coarse_line (desc, exposure_min);
         if (min_coarse_value < desc->coarse_integration_time_min)
@@ -713,15 +714,18 @@
     case XCAM_AWB_MODE_AUTO:
         _input.scene_mode = ia_aiq_awb_operation_mode_auto;
         break;
-    case XCAM_AWB_MODE_MANUAL:
-        if (this->_cct_min && this->_cct_max) {
+    case XCAM_AWB_MODE_MANUAL: {
+        uint32_t cct_min = 0, cct_max = 0;
+        get_cct_range_unlock (cct_min, cct_max);
+        if (cct_min  && cct_max) {
             _input.scene_mode = ia_aiq_awb_operation_mode_manual_cct_range;
-            _cct_range.max_cct = this->_cct_max;
-            _cct_range.min_cct = this->_cct_min;
+            _cct_range.max_cct = cct_min;
+            _cct_range.min_cct = cct_max;
             _input.manual_cct_range = &_cct_range;
         } else
             _input.scene_mode = ia_aiq_awb_operation_mode_auto;
         break;
+    }
     case XCAM_AWB_MODE_DAYLIGHT:
         _input.scene_mode = ia_aiq_awb_operation_mode_daylight;
         break;
diff --git a/xcore/aiq_handler.h b/xcore/aiq_handler.h
index 3920daa..3ee70fc 100644
--- a/xcore/aiq_handler.h
+++ b/xcore/aiq_handler.h
@@ -202,6 +202,7 @@
 class AiqCommonHandler
     : public CommonHandler
 {
+    friend class AiqCompositor;
 public:
     explicit AiqCommonHandler (SmartPtr<AiqCompositor> &aiq_compositor);
     ~AiqCommonHandler () {}
diff --git a/xcore/handler_interface.cpp b/xcore/handler_interface.cpp
index 6fdf586..09da323 100644
--- a/xcore/handler_interface.cpp
+++ b/xcore/handler_interface.cpp
@@ -23,31 +23,40 @@
 namespace XCam {
 
 AeHandler::AeHandler()
-    : _mode (XCAM_AE_MODE_AUTO)
-    , _metering_mode ()
-    , _window ()
-    , _flicker_mode ()
-    , _speed (1.0)
-    , _exposure_time_min (UINT64_C(0))
-    , _exposure_time_max (UINT64_C(0))
-    , _max_analog_gain (0.0)
-    , _manual_exposure_time (UINT64_C (0))
-    , _manual_analog_gain (0.0)
-    , _aperture_fn (0.0)
-    , _ev_shift (0.0)
 {
-    _window.x_start = 0;
-    _window.y_start = 0;
-    _window.x_end = 0;
-    _window.y_end = 0;
-    _window.weight = 0;
+    reset_parameters ();
+}
+
+void
+AeHandler::reset_parameters ()
+{
+    // in case missing any parameters
+    xcam_mem_clear (&_params);
+
+    _params.mode = XCAM_AE_MODE_AUTO;
+    _params.metering_mode = XCAM_AE_METERING_MODE_AUTO;
+    _params.flicker_mode = XCAM_AE_FLICKER_MODE_AUTO;
+    _params.speed = 1.0;
+    _params.exposure_time_min = UINT64_C(0);
+    _params.exposure_time_max = UINT64_C(0);
+    _params.max_analog_gain = 0.0;
+    _params.manual_exposure_time = UINT64_C (0);
+    _params.manual_analog_gain = 0.0;
+    _params.aperture_fn = 0.0;
+    _params.ev_shift = 0.0;
+
+    _params.window.x_start = 0;
+    _params.window.y_start = 0;
+    _params.window.x_end = 0;
+    _params.window.y_end = 0;
+    _params.window.weight = 0;
 }
 
 bool
 AeHandler::set_mode (XCamAeMode mode)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _mode = mode;
+    _params.mode = mode;
 
     XCAM_LOG_DEBUG ("ae set mode [%d]", mode);
     return true;
@@ -57,7 +66,7 @@
 AeHandler::set_metering_mode (XCamAeMeteringMode mode)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _metering_mode = mode;
+    _params.metering_mode = mode;
 
     XCAM_LOG_DEBUG ("ae set metering mode [%d]", mode);
     return true;
@@ -67,7 +76,7 @@
 AeHandler::set_window (XCam3AWindow *window)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _window = *window;
+    _params.window = *window;
 
     XCAM_LOG_DEBUG ("ae set metering mode window [x:%d, y:%d, x_end:%d, y_end:%d, weight:%d]",
                     window->x_start,
@@ -82,7 +91,7 @@
 AeHandler::set_ev_shift (double ev_shift)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _ev_shift = ev_shift;
+    _params.ev_shift = ev_shift;
 
     XCAM_LOG_DEBUG ("ae set ev shift:%.03f", ev_shift);
     return true;
@@ -92,7 +101,7 @@
 AeHandler::set_speed (double speed)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _speed = speed;
+    _params.speed = speed;
 
     XCAM_LOG_DEBUG ("ae set speed:%.03f", speed);
     return true;
@@ -102,7 +111,7 @@
 AeHandler::set_flicker_mode (XCamFlickerMode flicker)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _flicker_mode = flicker;
+    _params.flicker_mode = flicker;
 
     XCAM_LOG_DEBUG ("ae set flicker:%d", flicker);
     return true;
@@ -112,15 +121,15 @@
 AeHandler::get_flicker_mode ()
 {
     AnalyzerHandler::HanlderLock lock(this);
-    return _flicker_mode;
+    return _params.flicker_mode;
 }
 
 int64_t
 AeHandler::get_current_exposure_time ()
 {
     AnalyzerHandler::HanlderLock lock(this);
-    if (_mode == XCAM_AE_MODE_MANUAL)
-        return _manual_exposure_time;
+    if (_params.mode == XCAM_AE_MODE_MANUAL)
+        return _params.manual_exposure_time;
     return INT64_C(-1);
 }
 
@@ -128,8 +137,8 @@
 AeHandler::get_current_analog_gain ()
 {
     AnalyzerHandler::HanlderLock lock(this);
-    if (_mode == XCAM_AE_MODE_MANUAL)
-        return _manual_analog_gain;
+    if (_params.mode == XCAM_AE_MODE_MANUAL)
+        return _params.manual_analog_gain;
     return 0.0;
 }
 
@@ -137,7 +146,7 @@
 AeHandler::set_manual_exposure_time (int64_t time_in_us)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _manual_exposure_time = time_in_us;
+    _params.manual_exposure_time = time_in_us;
 
     XCAM_LOG_DEBUG ("ae set manual exposure time: %lldus", time_in_us);
     return true;
@@ -147,7 +156,7 @@
 AeHandler::set_manual_analog_gain (double gain)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _manual_analog_gain = gain;
+    _params.manual_analog_gain = gain;
 
     XCAM_LOG_DEBUG ("ae set manual analog gain: %.03f", gain);
     return true;
@@ -157,7 +166,7 @@
 AeHandler::set_aperture (double fn)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _aperture_fn = fn;
+    _params.aperture_fn = fn;
 
     XCAM_LOG_DEBUG ("ae set aperture fn: %.03f", fn);
     return true;
@@ -167,7 +176,7 @@
 AeHandler::set_max_analog_gain (double max_gain)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _max_analog_gain = max_gain;
+    _params.max_analog_gain = max_gain;
 
     XCAM_LOG_DEBUG ("ae set max analog_gain: %.03f", max_gain);
     return true;
@@ -176,14 +185,14 @@
 double AeHandler::get_max_analog_gain ()
 {
     AnalyzerHandler::HanlderLock lock(this);
-    return _max_analog_gain;
+    return _params.max_analog_gain;
 }
 
 bool AeHandler::set_exposure_time_range (int64_t min_time_in_us, int64_t max_time_in_us)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _exposure_time_min = min_time_in_us;
-    _exposure_time_max = max_time_in_us;
+    _params.exposure_time_min = min_time_in_us;
+    _params.exposure_time_max = max_time_in_us;
 
     XCAM_LOG_DEBUG ("ae set exposrue range[%lldus, %lldus]", min_time_in_us, max_time_in_us);
     return true;
@@ -195,28 +204,42 @@
     XCAM_ASSERT (min_time_in_us && max_time_in_us);
 
     AnalyzerHandler::HanlderLock lock(this);
-    *min_time_in_us = _exposure_time_min;
-    *max_time_in_us = _exposure_time_max;
+    *min_time_in_us = _params.exposure_time_min;
+    *max_time_in_us = _params.exposure_time_max;
 
     return true;
 }
 
 AwbHandler::AwbHandler()
-    : _mode (XCAM_AWB_MODE_AUTO)
-    , _speed (1.0)
-    , _cct_min (0)
-    , _cct_max (0)
-    , _gr_gain (0.0)
-    , _r_gain (0.0)
-    , _b_gain (0.0)
-    , _gb_gain (0.0)
-{}
+{
+    reset_parameters ();
+}
+
+void
+AwbHandler::reset_parameters ()
+{
+    xcam_mem_clear (&_params);
+    _params.mode = XCAM_AWB_MODE_AUTO;
+    _params.speed = 1.0;
+    _params.cct_min = 0;
+    _params.cct_max = 0;
+    _params.gr_gain = 0.0;
+    _params.r_gain = 0.0;
+    _params.b_gain = 0.0;
+    _params.gb_gain = 0.0;
+
+    _params.window.x_start = 0;
+    _params.window.y_start = 0;
+    _params.window.x_end = 0;
+    _params.window.y_end = 0;
+    _params.window.weight = 0;
+}
 
 bool
 AwbHandler::set_mode (XCamAwbMode mode)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _mode = mode;
+    _params.mode = mode;
 
     XCAM_LOG_DEBUG ("awb set mode [%d]", mode);
     return true;
@@ -232,7 +255,7 @@
         "awb speed(%f) is out of range, suggest (0.0, 1.0]", speed);
 
     AnalyzerHandler::HanlderLock lock(this);
-    _speed = speed;
+    _params.speed = speed;
 
     XCAM_LOG_DEBUG ("awb set speed [%f]", speed);
     return true;
@@ -248,8 +271,8 @@
         "awb set wrong cct(%u, %u) parameters", cct_min, cct_max);
 
     AnalyzerHandler::HanlderLock lock(this);
-    _cct_min = cct_min;
-    _cct_max = cct_max;
+    _params.cct_min = cct_min;
+    _params.cct_max = cct_max;
 
     XCAM_LOG_DEBUG ("awb set cct range [%u, %u]", cct_min, cct_max);
     return true;
@@ -265,32 +288,41 @@
         "awb manual gain value must >= 0.0");
 
     AnalyzerHandler::HanlderLock lock(this);
-    _gr_gain = gr;
-    _r_gain = r;
-    _b_gain = b;
-    _gb_gain = gb;
+    _params.gr_gain = gr;
+    _params.r_gain = r;
+    _params.b_gain = b;
+    _params.gb_gain = gb;
     XCAM_LOG_DEBUG ("awb set manual gain value(gr:%.03f, r:%.03f, b:%.03f, gb:%.03f)", gr, r, b, gb);
     return true;
 }
 
 CommonHandler::CommonHandler()
-    : _is_manual_gamma (false)
-    , _nr_level (0.0)
-    , _tnr_level (0.0)
-    , _brightness (0.0)
-    , _contrast (0.0)
-    , _hue (0.0)
-    , _saturation (0.0)
-    , _sharpness (0.0)
-    , _enable_dvs (false)
-    , _enable_gbce (false)
-    , _enable_night_mode (false)
-{}
+{
+    reset_parameters ();
+}
+
+void
+CommonHandler::reset_parameters ()
+{
+    xcam_mem_clear (&_params);
+
+    _params.is_manual_gamma = false;
+    _params.nr_level = 0.0;
+    _params.tnr_level = 0.0;
+    _params.brightness = 0.0;
+    _params.contrast = 0.0;
+    _params.hue = 0.0;
+    _params.saturation = 0.0;
+    _params.sharpness = 0.0;
+    _params.enable_dvs = false;
+    _params.enable_gbce = false;
+    _params.enable_night_mode = false;
+}
 
 bool CommonHandler::set_dvs (bool enable)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _enable_dvs = enable;
+    _params.enable_dvs = enable;
 
     XCAM_LOG_DEBUG ("common 3A enable dvs:%s", XCAM_BOOL2STR(enable));
     return true;
@@ -300,7 +332,7 @@
 CommonHandler::set_gbce (bool enable)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _enable_gbce = enable;
+    _params.enable_gbce = enable;
 
     XCAM_LOG_DEBUG ("common 3A enable gbce:%s", XCAM_BOOL2STR(enable));
     return true;
@@ -310,7 +342,7 @@
 CommonHandler::set_night_mode (bool enable)
 {
     AnalyzerHandler::HanlderLock lock(this);
-    _enable_night_mode = enable;
+    _params.enable_night_mode = enable;
 
     XCAM_LOG_DEBUG ("common 3A enable night mode:%s", XCAM_BOOL2STR(enable));
     return true;
@@ -327,7 +359,7 @@
         "set NR levlel(%.03f) out of range[-1.0, 1.0]", level);
 
     AnalyzerHandler::HanlderLock lock(this);
-    _nr_level = level;
+    _params.nr_level = level;
 
     XCAM_LOG_DEBUG ("common 3A set NR level:%.03f", level);
     return true;
@@ -343,7 +375,7 @@
         "set TNR levlel(%.03f) out of range[-1.0, 1.0]", level);
 
     AnalyzerHandler::HanlderLock lock(this);
-    _tnr_level = level;
+    _params.tnr_level = level;
 
     XCAM_LOG_DEBUG ("common 3A set TNR level:%.03f", level);
     return true;
@@ -359,7 +391,7 @@
         "set brightness levlel(%.03f) out of range[-1.0, 1.0]", level);
 
     AnalyzerHandler::HanlderLock lock(this);
-    _brightness = level;
+    _params.brightness = level;
 
     XCAM_LOG_DEBUG ("common 3A set brightness level:%.03f", level);
     return true;
@@ -374,7 +406,7 @@
         "set contrast levlel(%.03f) out of range[-1.0, 1.0]", level);
 
     AnalyzerHandler::HanlderLock lock(this);
-    _contrast = level;
+    _params.contrast = level;
 
     XCAM_LOG_DEBUG ("common 3A set contrast level:%.03f", level);
     return true;
@@ -389,7 +421,7 @@
         "set hue levlel(%.03f) out of range[-1.0, 1.0]", level);
 
     AnalyzerHandler::HanlderLock lock(this);
-    _hue = level;
+    _params.hue = level;
 
     XCAM_LOG_DEBUG ("common 3A set hue level:%.03f", level);
     return true;
@@ -405,7 +437,7 @@
         "set saturation levlel(%.03f) out of range[-1.0, 1.0]", level);
 
     AnalyzerHandler::HanlderLock lock(this);
-    _saturation = level;
+    _params.saturation = level;
 
     XCAM_LOG_DEBUG ("common 3A set saturation level:%.03f", level);
     return true;
@@ -420,7 +452,7 @@
         "set sharpness levlel(%.03f) out of range[-1.0, 1.0]", level);
 
     AnalyzerHandler::HanlderLock lock(this);
-    _sharpness = level;
+    _params.sharpness = level;
 
     XCAM_LOG_DEBUG ("common 3A set sharpness level:%.03f", level);
     return true;
@@ -431,7 +463,7 @@
 {
     AnalyzerHandler::HanlderLock lock(this);
     if (!r_table && ! g_table && !b_table) {
-        _is_manual_gamma = false;
+        _params.is_manual_gamma = false;
         XCAM_LOG_DEBUG ("common 3A disabled gamma");
         return true;
     }
@@ -442,11 +474,11 @@
     }
 
     for (uint32_t i = 0; i < XCAM_GAMMA_TABLE_SIZE; ++i) {
-        _r_gamma [i] = r_table [i];
-        _g_gamma [i] = g_table [i];
-        _b_gamma [i] = b_table [i];
+        _params.r_gamma [i] = r_table [i];
+        _params.g_gamma [i] = g_table [i];
+        _params.b_gamma [i] = b_table [i];
     }
-    _is_manual_gamma = true;
+    _params.is_manual_gamma = true;
 
     XCAM_LOG_DEBUG ("common 3A enabled RGB gamma");
     return true;
diff --git a/xcore/handler_interface.h b/xcore/handler_interface.h
index 0f5a1cc..9756bdb 100644
--- a/xcore/handler_interface.h
+++ b/xcore/handler_interface.h
@@ -26,6 +26,7 @@
 #include "xcam_mutex.h"
 #include "x3a_result.h"
 #include "xcam_3a_types.h"
+#include "xcam_params.h"
 
 namespace XCam {
 
@@ -79,47 +80,55 @@
     virtual double get_max_analog_gain ();
 
 protected:
+    const XCamAeParam &get_params_unlock () const {
+        return _params;
+    }
+
     XCamAeMode get_mode_unlock() const {
-        return _mode;
+        return _params.mode;
     }
     XCamAeMeteringMode get_metering_mode_unlock() const {
-        return _metering_mode;
+        return _params.metering_mode;
     }
     const XCam3AWindow &get_window_unlock() const {
-        return _window;
+        return _params.window;
     }
     XCamFlickerMode get_flicker_mode_unlock() const {
-        return _flicker_mode;
+        return _params.flicker_mode;
     }
     double get_speed_unlock() const {
-        return _speed;
+        return _params.speed;
     }
     double get_ev_shift_unlock() const {
-        return _ev_shift;
+        return _params.ev_shift;
+    }
+
+    uint64_t get_manual_exposure_time_unlock () const {
+        return _params.manual_exposure_time;
+    }
+    double get_manual_analog_gain_unlock () const {
+        return _params.manual_analog_gain;
+    }
+
+    double get_aperture_fn_unlock () const {
+        return _params.aperture_fn;
+    }
+
+    void get_exposure_time_range_unlock (uint64_t &min, uint64_t &max) const {
+        min = _params.exposure_time_min;
+        max = _params.exposure_time_max;
+    }
+
+    double get_max_analog_gain_unlock () const {
+        return _params.max_analog_gain;
     }
 
 private:
+    void reset_parameters ();
     XCAM_DEAD_COPY (AeHandler);
 
 protected:
-    XCamAeMode              _mode;
-    XCamAeMeteringMode      _metering_mode;
-    XCam3AWindow            _window;
-    XCamFlickerMode         _flicker_mode;
-    double                  _speed;
-
-    /* exposure limitation */
-    uint64_t                _exposure_time_min, _exposure_time_max; // exposure time range
-    double                  _max_analog_gain;
-
-    /* exposure manual values */
-    uint64_t                _manual_exposure_time;
-    double                  _manual_analog_gain;
-
-    double                  _aperture_fn;
-
-    /*ev*/
-    double                  _ev_shift;
+    XCamAeParam   _params;
 };
 
 class AwbHandler
@@ -135,27 +144,32 @@
     bool set_manual_gain (double gr, double r, double b, double gb);
 
 protected:
+    const XCamAwbParam &get_params_unlock () const {
+        return _params;
+    }
+
     XCamAwbMode get_mode_unlock() const {
-        return _mode;
+        return _params.mode;
     }
     double get_speed_unlock () const {
-        return _speed;
+        return _params.speed;
+    }
+
+    const XCam3AWindow &get_window_unlock () const {
+        return _params.window;
+    }
+
+    void get_cct_range_unlock (uint32_t &cct_min, uint32_t &cct_max) const {
+        cct_min = _params.cct_min;
+        cct_max = _params.cct_max;
     }
 
 private:
+    void reset_parameters ();
     XCAM_DEAD_COPY (AwbHandler);
 
 protected:
-    XCamAwbMode             _mode;
-    double                  _speed;
-    uint32_t                _cct_min, _cct_max;
-    XCam3AWindow            _window;
-
-    /* manual gain */
-    double                  _gr_gain;
-    double                  _r_gain;
-    double                  _b_gain;
-    double                  _gb_gain;
+    XCamAwbParam _params;
 };
 
 class AfHandler
@@ -168,6 +182,12 @@
     XCAM_DEAD_COPY (AfHandler);
 
 protected:
+    const XCamAfParam &get_params_unlock () const {
+        return _params;
+    }
+
+protected:
+    XCamAfParam _params;
 };
 
 class CommonHandler
@@ -191,66 +211,48 @@
     bool set_manual_sharpness (double level);
     bool set_gamma_table (double *r_table, double *g_table, double *b_table);
 
-public:
+protected:
+    const XCamCommonParam &get_params_unlock () const {
+        return _params;
+    }
     bool has_gbce_unlock () const {
-        return _enable_gbce;
+        return _params.enable_gbce;
     }
     bool has_dvs_unlock () const {
-        return _enable_dvs;
+        return _params.enable_dvs;
     }
     bool has_night_mode_unlock () const {
-        return _enable_night_mode;
+        return _params.enable_night_mode;
     }
 
     double get_nr_level_unlock () const {
-        return _nr_level;
+        return _params.nr_level;
     }
     double get_tnr_level_unlock () const {
-        return _tnr_level;
+        return _params.tnr_level;
     }
     double get_brightness_unlock () const {
-        return _brightness;
+        return _params.brightness;
     }
     double get_contrast_unlock () const {
-        return _contrast;
+        return _params.contrast;
     }
     double get_hue_unlock () const {
-        return _hue;
+        return _params.hue;
     }
     double get_saturation_unlock () const {
-        return _saturation;
+        return _params.saturation;
     }
     double get_sharpness_unlock () const {
-        return _sharpness;
+        return _params.sharpness;
     }
 
 private:
+    void reset_parameters ();
     XCAM_DEAD_COPY (CommonHandler);
 
 protected:
-    /* R, G, B gamma table, size = XCAM_GAMMA_TABLE_SIZE */
-    bool                      _is_manual_gamma;
-    double                    _r_gamma [XCAM_GAMMA_TABLE_SIZE];
-    double                    _g_gamma [XCAM_GAMMA_TABLE_SIZE];
-    double                    _b_gamma [XCAM_GAMMA_TABLE_SIZE];
-
-    /*
-     * manual brightness, contrast, hue, saturation, sharpness
-     * -1.0 < value < 1.0
-     */
-    double                     _nr_level;
-    double                     _tnr_level;
-
-    double                     _brightness;
-    double                     _contrast;
-    double                     _hue;
-    double                     _saturation;
-    double                     _sharpness;
-
-    /* others */
-    bool                       _enable_dvs;
-    bool                       _enable_gbce;
-    bool                       _enable_night_mode;
+    XCamCommonParam _params;
 };
 
 };
diff --git a/xcore/xcam_params.h b/xcore/xcam_params.h
new file mode 100644
index 0000000..f572c26
--- /dev/null
+++ b/xcore/xcam_params.h
@@ -0,0 +1,97 @@
+/*
+ * xcam_params.h - 3A parameters
+ *
+ *  Copyright (c) 2015 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Author: Wind Yuan <feng.yuan@intel.com>
+ */
+
+#ifndef C_XCAM_PARAMS_H
+#define C_XCAM_PARAMS_H
+
+#include <xcam_defs.h>
+#include <xcam_common.h>
+
+XCAM_BEGIN_DECLARE
+
+typedef struct _XCamAeParam {
+    XCamAeMode              mode;
+    XCamAeMeteringMode      metering_mode;
+    XCam3AWindow            window;
+    XCamFlickerMode         flicker_mode;
+    /* speed, default 1.0 */
+    double                  speed;
+
+    /* exposure limitation */
+    uint64_t                exposure_time_min, exposure_time_max;
+    double                  max_analog_gain;
+
+    /* exposure manual values */
+    uint64_t                manual_exposure_time;
+    double                  manual_analog_gain;
+
+    double                  aperture_fn;
+
+    /*ev*/
+    double                  ev_shift;
+} XCamAeParam;
+
+typedef struct _XCamAwbParam {
+    XCamAwbMode             mode;
+    /* speed, default 1.0 */
+    double                  speed;
+    uint32_t                cct_min, cct_max;
+    XCam3AWindow            window;
+
+    /* manual gain, default 0.0 */
+    double                  gr_gain;
+    double                  r_gain;
+    double                  b_gain;
+    double                  gb_gain;
+} XCamAwbParam;
+
+typedef struct _XCamAfParam {
+
+} XCamAfParam;
+
+typedef struct _XCamCommonParam {
+    /* R, G, B gamma table, size = XCAM_GAMMA_TABLE_SIZE */
+    bool                      is_manual_gamma;
+    double                    r_gamma [XCAM_GAMMA_TABLE_SIZE];
+    double                    g_gamma [XCAM_GAMMA_TABLE_SIZE];
+    double                    b_gamma [XCAM_GAMMA_TABLE_SIZE];
+
+    /*
+     * manual brightness, contrast, hue, saturation, sharpness
+     * -1.0 < value < 1.0
+     */
+    double                     nr_level;
+    double                     tnr_level;
+
+    double                     brightness;
+    double                     contrast;
+    double                     hue;
+    double                     saturation;
+    double                     sharpness;
+
+    /* others */
+    bool                       enable_dvs;
+    bool                       enable_gbce;
+    bool                       enable_night_mode;
+} XCamCommonParam;
+
+XCAM_END_DECLARE
+
+#endif //C_XCAM_PARAMS_H
