Lines Matching refs:ps_est_sad
81 void irc_init_est_sad(est_sad_t *ps_est_sad, WORD32 i4_use_est_intra_sad) in irc_init_est_sad() argument
84 ps_est_sad->i4_use_est_intra_sad = i4_use_est_intra_sad; in irc_init_est_sad()
88 ps_est_sad->au4_prev_frm_sad[i] = 0; in irc_init_est_sad()
91 ps_est_sad->u4_n_p_frm_ifi_avg_sad = 0; in irc_init_est_sad()
92 ps_est_sad->u4_n_1_p_frm_ifi_avg_sad = 0; in irc_init_est_sad()
93 ps_est_sad->u4_n_2_p_frm_ifi_avg_sad = 0; in irc_init_est_sad()
94 ps_est_sad->i4_num_ifi_encoded = 0; in irc_init_est_sad()
95 ps_est_sad->i4_num_p_frm_in_cur_ifi = 0; in irc_init_est_sad()
98 void irc_reset_est_sad(est_sad_t *ps_est_sad) in irc_reset_est_sad() argument
100 irc_init_est_sad(ps_est_sad, ps_est_sad->i4_use_est_intra_sad); in irc_reset_est_sad()
119 UWORD32 irc_get_est_sad(est_sad_t *ps_est_sad, picture_type_e e_pic_type) in irc_get_est_sad() argument
121 if(ps_est_sad->i4_use_est_intra_sad) in irc_get_est_sad()
126 u4_estimated_sad = ps_est_sad->au4_prev_frm_sad[P_PIC]; in irc_get_est_sad()
130 u4_estimated_sad = ps_est_sad->au4_prev_frm_sad[B_PIC]; in irc_get_est_sad()
134 if(ps_est_sad->i4_num_ifi_encoded < 2) in irc_get_est_sad()
140 u4_estimated_sad = ps_est_sad->au4_prev_frm_sad[I_PIC]; in irc_get_est_sad()
156 if(ps_est_sad->i4_num_p_frm_in_cur_ifi) in irc_get_est_sad()
159 (ps_est_sad->u4_n_p_frm_ifi_avg_sad in irc_get_est_sad()
160 / ps_est_sad->i4_num_p_frm_in_cur_ifi); in irc_get_est_sad()
162 ps_est_sad->u4_n_1_p_frm_ifi_avg_sad; in irc_get_est_sad()
167 ps_est_sad->u4_n_1_p_frm_ifi_avg_sad; in irc_get_est_sad()
169 ps_est_sad->u4_n_2_p_frm_ifi_avg_sad; in irc_get_est_sad()
179 ps_est_sad->au4_prev_frm_sad[I_PIC], 0); in irc_get_est_sad()
199 u4_estimated_sad = ps_est_sad->au4_prev_frm_sad[I_PIC]; in irc_get_est_sad()
207 return ps_est_sad->au4_prev_frm_sad[e_pic_type]; in irc_get_est_sad()
211 void irc_update_actual_sad(est_sad_t *ps_est_sad, in irc_update_actual_sad() argument
215 ps_est_sad->au4_prev_frm_sad[e_pic_type] = u4_actual_sad; in irc_update_actual_sad()
217 if(ps_est_sad->i4_use_est_intra_sad) in irc_update_actual_sad()
222 if(ps_est_sad->i4_num_ifi_encoded < 2) in irc_update_actual_sad()
223 ps_est_sad->i4_num_ifi_encoded++; in irc_update_actual_sad()
226 if(ps_est_sad->i4_num_p_frm_in_cur_ifi) in irc_update_actual_sad()
228 ps_est_sad->u4_n_p_frm_ifi_avg_sad /= in irc_update_actual_sad()
229 ps_est_sad->i4_num_p_frm_in_cur_ifi; in irc_update_actual_sad()
233 ps_est_sad->u4_n_p_frm_ifi_avg_sad = 0; in irc_update_actual_sad()
236 ps_est_sad->u4_n_2_p_frm_ifi_avg_sad = in irc_update_actual_sad()
237 ps_est_sad->u4_n_1_p_frm_ifi_avg_sad; in irc_update_actual_sad()
239 ps_est_sad->u4_n_1_p_frm_ifi_avg_sad = in irc_update_actual_sad()
240 ps_est_sad->u4_n_p_frm_ifi_avg_sad; in irc_update_actual_sad()
242 ps_est_sad->u4_n_p_frm_ifi_avg_sad = 0; in irc_update_actual_sad()
243 ps_est_sad->i4_num_p_frm_in_cur_ifi = 0; in irc_update_actual_sad()
247 ps_est_sad->u4_n_p_frm_ifi_avg_sad += u4_actual_sad; in irc_update_actual_sad()
248 ps_est_sad->i4_num_p_frm_in_cur_ifi++; in irc_update_actual_sad()
253 void irc_update_actual_sad_for_intra(est_sad_t *ps_est_sad, in irc_update_actual_sad_for_intra() argument
256 if(!(ps_est_sad->i4_use_est_intra_sad)) in irc_update_actual_sad_for_intra()
258 irc_update_actual_sad(ps_est_sad, i4_intra_frm_cost, I_PIC); in irc_update_actual_sad_for_intra()