Lines Matching refs:ps_rd_model
79 void irc_init_frm_rc_rd_model(rc_rd_model_t *ps_rd_model, in irc_init_frm_rc_rd_model() argument
83 ps_rd_model->u1_num_frms_in_model = 0; in irc_init_frm_rc_rd_model()
84 ps_rd_model->u1_curr_frm_counter = 0; in irc_init_frm_rc_rd_model()
85 ps_rd_model->u1_max_frms_to_model = u1_max_frames_modelled; in irc_init_frm_rc_rd_model()
87 ps_rd_model->model_coeff_a_lin_wo_int = 0; in irc_init_frm_rc_rd_model()
88 ps_rd_model->model_coeff_b_lin_wo_int = 0; in irc_init_frm_rc_rd_model()
89 ps_rd_model->model_coeff_c_lin_wo_int = 0; in irc_init_frm_rc_rd_model()
92 void irc_reset_frm_rc_rd_model(rc_rd_model_t *ps_rd_model) in irc_reset_frm_rc_rd_model() argument
94 ps_rd_model->u1_num_frms_in_model = 0; in irc_reset_frm_rc_rd_model()
95 ps_rd_model->u1_curr_frm_counter = 0; in irc_reset_frm_rc_rd_model()
97 ps_rd_model->model_coeff_a_lin_wo_int = 0; in irc_reset_frm_rc_rd_model()
98 ps_rd_model->model_coeff_b_lin_wo_int = 0; in irc_reset_frm_rc_rd_model()
99 ps_rd_model->model_coeff_c_lin_wo_int = 0; in irc_reset_frm_rc_rd_model()
112 rc_rd_model_t *ps_rd_model) in find_model_coeffs() argument
169 u1_curr_frame_index = ps_rd_model->u1_curr_frm_counter; in find_model_coeffs()
175 u1_avgqp_prvfrm = ps_rd_model->pu1_avg_qp[u1_curr_frame_index]; in find_model_coeffs()
176 u4_prevfrm_bits = ps_rd_model->pi4_res_bits[u1_curr_frame_index]; in find_model_coeffs()
177 u4_prevfrm_sad = ps_rd_model->pi4_sad[u1_curr_frame_index]; in find_model_coeffs()
196 static void irc_update_frame_rd_model(rc_rd_model_t *ps_rd_model) in irc_update_frame_rd_model() argument
214 u1_curr_frame_index = ps_rd_model->u1_curr_frm_counter; in irc_update_frame_rd_model()
216 ps_rd_model->u1_model_used = PREV_FRAME_MODEL; in irc_update_frame_rd_model()
235 u1_num_active_frames = ps_rd_model->u1_num_frms_in_model; in irc_update_frame_rd_model()
249 u1_num_skips_temp = ps_rd_model->pu1_num_skips[u1_curr_frame_index]; in irc_update_frame_rd_model()
250 u1_avg_mpeg2_qp_temp = ps_rd_model->pu1_avg_qp[u1_curr_frame_index]; in irc_update_frame_rd_model()
293 for(; i < ps_rd_model->u1_num_frms_in_model; i++) in irc_update_frame_rd_model()
295 u1_num_skips_temp = ps_rd_model->pu1_num_skips[u1_curr_frame_index]; in irc_update_frame_rd_model()
296 u1_avg_mpeg2_qp_temp = ps_rd_model->pu1_avg_qp[u1_curr_frame_index]; in irc_update_frame_rd_model()
332 ps_rd_model->u1_model_used = find_model_coeffs(ps_rd_model->pi4_res_bits, in irc_update_frame_rd_model()
333 ps_rd_model->pi4_sad, in irc_update_frame_rd_model()
334 ps_rd_model->pu1_num_skips, in irc_update_frame_rd_model()
335 ps_rd_model->pu1_avg_qp, in irc_update_frame_rd_model()
337 ps_rd_model->u1_model_used, in irc_update_frame_rd_model()
342 ps_rd_model); in irc_update_frame_rd_model()
344 ps_rd_model->model_coeff_b_lin_wo_int = model_coeff_array_lin_wo_int[0]; in irc_update_frame_rd_model()
345 ps_rd_model->model_coeff_a_lin_wo_int = model_coeff_array_lin_wo_int[1]; in irc_update_frame_rd_model()
346 ps_rd_model->model_coeff_c_lin_wo_int = model_coeff_array_lin_wo_int[2]; in irc_update_frame_rd_model()
349 UWORD32 irc_estimate_bits_for_qp(rc_rd_model_t *ps_rd_model, in irc_estimate_bits_for_qp() argument
355 fl_num_bits = ps_rd_model->model_coeff_a_lin_wo_int in irc_estimate_bits_for_qp()
361 UWORD8 irc_find_qp_for_target_bits(rc_rd_model_t *ps_rd_model, in irc_find_qp_for_target_bits() argument
370 ps_rd_model->u1_model_used = PREV_FRAME_MODEL; in irc_find_qp_for_target_bits()
374 / ps_rd_model->model_coeff_a_lin_wo_int; in irc_find_qp_for_target_bits()
396 void irc_add_frame_to_rd_model(rc_rd_model_t *ps_rd_model, in irc_add_frame_to_rd_model() argument
403 u1_curr_frame_index = ps_rd_model->u1_curr_frm_counter; in irc_add_frame_to_rd_model()
406 ps_rd_model->pi4_res_bits[u1_curr_frame_index] = i4_res_bits; in irc_add_frame_to_rd_model()
407 ps_rd_model->pi4_sad[u1_curr_frame_index] = i4_sad_h264; in irc_add_frame_to_rd_model()
408 ps_rd_model->pu1_num_skips[u1_curr_frame_index] = u1_num_skips; in irc_add_frame_to_rd_model()
409 ps_rd_model->pu1_avg_qp[u1_curr_frame_index] = u1_avg_mp2qp; in irc_add_frame_to_rd_model()
411 ps_rd_model->u1_curr_frm_counter++; in irc_add_frame_to_rd_model()
412 if(MAX_FRAMES_MODELLED == ps_rd_model->u1_curr_frm_counter) in irc_add_frame_to_rd_model()
413 ps_rd_model->u1_curr_frm_counter = 0; in irc_add_frame_to_rd_model()
415 if(ps_rd_model->u1_num_frms_in_model < ps_rd_model->u1_max_frms_to_model) in irc_add_frame_to_rd_model()
417 ps_rd_model->u1_num_frms_in_model++; in irc_add_frame_to_rd_model()
419 irc_update_frame_rd_model(ps_rd_model); in irc_add_frame_to_rd_model()
456 WORD32 irc_calc_per_frm_bits(rc_rd_model_t *ps_rd_model, in irc_calc_per_frm_bits() argument
484 irc_update_frame_rd_model(&ps_rd_model[u1_i]); in irc_calc_per_frm_bits()
514 ps_rd_model_of_pic_type = ps_rd_model + u1_i; in irc_calc_per_frm_bits()
528 ps_rd_model_of_pic_type = ps_rd_model + u1_curr_pic_type; in irc_calc_per_frm_bits()
540 ps_rd_model_of_pic_type = ps_rd_model + u1_curr_pic_type; in irc_calc_per_frm_bits()
561 model_coeff irc_get_linear_coefficient(rc_rd_model_t *ps_rd_model) in irc_get_linear_coefficient() argument
563 return (ps_rd_model->model_coeff_a_lin_wo_int); in irc_get_linear_coefficient()