.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}
};
.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}
};
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);
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] =
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 */
};
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 */
};