atomisp: CSS/FW release from Synergy baseline of 30May2012
authorMichie Yamauchi <michie.yamauchi@intel.com>
Thu, 31 May 2012 04:31:06 +0000 (06:31 +0200)
committerbuildbot <buildbot@intel.com>
Fri, 8 Jun 2012 14:25:32 +0000 (07:25 -0700)
BZ: 28761

This release of CSS/FW addresses the following issues:
- Making thresholds for rejected AWB blocks tunable

Change-Id: I8b382a28825f41f8af6665f189087e32c260ebb4
Signed-off-by: Michie Yamauchi <michie.yamauchi@intel.com>
Reviewed-on: http://android.intel.com:8080/51527
Reviewed-by: Kruger, Jozef <jozef.kruger@intel.com>
Reviewed-by: Van Immerzeel, Ronald <ronald.van.immerzeel@intel.com>
Reviewed-by: Koski, Anttu <anttu.koski@intel.com>
Tested-by: Koski, Anttu <anttu.koski@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/media/video/atomisp/css/sh_css_defs.h
drivers/media/video/atomisp/css/sh_css_internal.h
drivers/media/video/atomisp/css/sh_css_params.c
drivers/media/video/atomisp/css/sh_css_types.h
include/linux/atomisp.h

index 90756f0..91996ae 100644 (file)
 
 /* As an optimization we use DMEM to store the 3A statistics for fixed
  * resolution primary binaries on the ASIC system (not on FPGA). */
-#define _S3ATBL_USE_DMEM(var_res)       (ISP_VEC_NELEMS != 64 || !(var_res))
+#define _S3ATBL_USE_DMEM(var_res)       (!(var_res))
 
 /* ********************************************************
  * Statistics for Digital Image Stabilization
index 838ce41..f570255 100644 (file)
@@ -83,6 +83,11 @@ struct sh_css_isp_params {
        int ae_y_coef_g;
        int ae_y_coef_b;
 
+       /* S3A (3A Support): AWB level gate */
+       int awb_lg_high_raw;
+       int awb_lg_low;
+       int awb_lg_high;
+
        /* S3A (3A Support): af fir coefficients */
        int af_fir1[7];
        int af_fir2[7];
index 99a06ca..8d98b6d 100644 (file)
@@ -847,6 +847,9 @@ static const struct sh_css_3a_config default_3a_config = {
        .ae_y_coef_r  = 25559,
        .ae_y_coef_g  = 32768,
        .ae_y_coef_b  = 7209,
+       .awb_lg_high_raw = 65535,
+       .awb_lg_low      = 0,
+       .awb_lg_high     = 65535,
        .af_fir1_coef = {-3344, -6104, -19143, 19143, 6104, 3344, 0},
        .af_fir2_coef = {1027, 0, -9219, 16384, -9219, 1027, 0}
 };
@@ -855,6 +858,9 @@ static const struct sh_css_3a_config disabled_3a_config = {
        .ae_y_coef_r  = 25559,
        .ae_y_coef_g  = 32768,
        .ae_y_coef_b  = 7209,
+       .awb_lg_high_raw = 65535,
+       .awb_lg_low      = 0,
+       .awb_lg_high     = 65535,
        .af_fir1_coef = {-6689, -12207, -32768, 32767, 12207, 6689, 0},
        .af_fir2_coef = {2053, 0, -18437, 32767, -18437, 2053, 0}
 };
@@ -1161,7 +1167,8 @@ get_3a_stats_from_vmem(struct sh_css_3a_output *output)
 static void
 sh_css_process_3a(void)
 {
-       unsigned int i;
+       unsigned int i, raw_bit_depth = 10;
+
        /* coefficients to calculate Y */
        isp_parameters.ae_y_coef_r =
            uDIGIT_FITTING(s3a_config->ae_y_coef_r, 16, SH_CSS_AE_YCOEF_SHIFT);
@@ -1170,6 +1177,17 @@ sh_css_process_3a(void)
        isp_parameters.ae_y_coef_b =
            uDIGIT_FITTING(s3a_config->ae_y_coef_b, 16, SH_CSS_AE_YCOEF_SHIFT);
 
+       /* AWB level gate */
+       if (current_3a_binary)
+               raw_bit_depth
+               = current_3a_binary->in_frame_info.raw_bit_depth;
+       isp_parameters.awb_lg_high_raw =
+               uDIGIT_FITTING(s3a_config->awb_lg_high_raw, 16, raw_bit_depth);
+       isp_parameters.awb_lg_low =
+               uDIGIT_FITTING(s3a_config->awb_lg_low, 16, SH_CSS_BAYER_BITS);
+       isp_parameters.awb_lg_high =
+               uDIGIT_FITTING(s3a_config->awb_lg_high, 16, SH_CSS_BAYER_BITS);
+
        /* af fir coefficients */
        for (i = 0; i < 7; ++i) {
                isp_parameters.af_fir1[i] =
index a448f36..adba691 100644 (file)
@@ -672,6 +672,9 @@ struct sh_css_3a_config {
        u0_16 ae_y_coef_r;      /* [gain] Weight of R for Y */
        u0_16 ae_y_coef_g;      /* [gain] Weight of G for Y */
        u0_16 ae_y_coef_b;      /* [gain] Weight of B for Y */
+       u0_16 awb_lg_high_raw;  /* [intensity] AWB level gate high for raw */
+       u0_16 awb_lg_low;       /* [intensity] AWB level gate low */
+       u0_16 awb_lg_high;      /* [intensity] AWB level gate high */
        s0_15 af_fir1_coef[7];  /* [factor] AF FIR coefficients of fir1 */
        s0_15 af_fir2_coef[7];  /* [factor] AF FIR coefficients of fir2 */
 };
index edb0693..316bb46 100644 (file)
@@ -129,6 +129,10 @@ struct atomisp_3a_config {
        unsigned int ae_y_coef_r;       /* [gain] Weight of R for Y */
        unsigned int ae_y_coef_g;       /* [gain] Weight of G for Y */
        unsigned int ae_y_coef_b;       /* [gain] Weight of B for Y */
+       unsigned int awb_lg_high_raw;   /* [intensity]
+                                          AWB level gate high for raw */
+       unsigned int awb_lg_low;        /* [intensity] AWB level gate low */
+       unsigned int awb_lg_high;       /* [intensity] AWB level gate high */
        int af_fir1_coef[7];    /* [factor] AF FIR coefficients of fir1 */
        int af_fir2_coef[7];    /* [factor] AF FIR coefficients of fir2 */
 };