Part Number: PROCESSOR-SDK-DRA8X-TDA4X
Hi TI experts,
I have some questions related to AE/AWB engine of RAWFE H3A.
1. h3a_merge function in Vx_aewb_target.c
Could you help answer my questions below?
static void h3a_merge(
h3a_aewb_paxel_data_t *p_in,
int sz_h,
int sz_v,
int pix_in_pax, //Z:
int T_low,
int T_high,
h3a_aewb_paxel_data_t *p_out)
{
int th1 = pix_in_pax * T_low; //Z: what is implication and purpose to define th1 and th2?
int th2 = pix_in_pax * T_high;
int k;
for (k = 0; k < sz_v * sz_h; k++)
{
if (p_in[k].green >= th1 && p_in[k].green <= th2) //Z: what the case is? Is it to use green to conclude if too dark and bright?
{
p_out[k] = p_in[k];
}
else
{
p_out[k].red = (p_out[k].red * 7) >> 3; //Z: Why convert origin value with this formula? How do you define this formula?
p_out[k].green = (p_out[k].green * 7) >> 3;
p_out[k].blue = (p_out[k].blue * 7) >> 3;
}
}
}
2. parse_h3a_out function in Vx_aewb_target.c
There are code as below,
h3a_data[j * n_col + i].red = (sum_r + (n_pix>>1)) / n_pix;
h3a_data[j * n_col + i].blue = (sum_b + (n_pix>>1)) / n_pix;
h3a_data[j * n_col + i].green = ((sum_gr + sum_gb + n_pix + 1 )>>1) / n_pix; //bug_fix: rounding
Why add 'n_pix>>1' for either red and blue?
For green, why add 1 after 'sum_gr + sum_gb + n_pix'? Why right shift after '(sum_gr + sum_gb + n_pix + 1 )'?
3. write_h3a_image function in App_single_cam_main.c
Write_h3a_image can write h3a data to file. Which h3a data is writen to file? Original h3a data or after processed by h3a_merge?
The h3a data in this file is same as TI_AE_do function h3a data input (h3a_aewb_paxel_data_t * h3a_data)?
I attached one h3a file as example. Corresponding xml file is also attached.
Recently I'm modifying AEC algorithm to fit 3-exp WDR usage. Your feedback is very appreciated.
Thanks.
Best regards,
Zhishen