Lines Matching refs:ps_bit_allocation

181 float get_cur_peak_factor_2pass(bit_allocation_t *ps_bit_allocation)  in get_cur_peak_factor_2pass()  argument
183 return (ps_bit_allocation->f_cur_peak_factor_2pass); in get_cur_peak_factor_2pass()
185 float get_cur_min_complexity_factor_2pass(bit_allocation_t *ps_bit_allocation) in get_cur_min_complexity_factor_2pass() argument
187 return (ps_bit_allocation->f_min_complexity_cross_peak_rate); in get_cur_min_complexity_factor_2pass()
189 void set_2pass_total_gops(bit_allocation_t *ps_bit_allocation, WORD32 i4_num_gop) in set_2pass_total_gops() argument
191 ps_bit_allocation->i4_num_gop = i4_num_gop; in set_2pass_total_gops()
411 bit_allocation_t *ps_bit_allocation, in get_bits_based_on_complexity() argument
421 WORD32 i4_num_scd_in_LAP_window = ps_bit_allocation->i4_num_scd_in_lap_window; in get_bits_based_on_complexity()
422 WORD32 i4_active_pic_types = ps_bit_allocation->i4_num_active_pic_type, in get_bits_based_on_complexity()
423 i4_field_pic = ps_bit_allocation->i4_field_pic; in get_bits_based_on_complexity()
426 memmove(af_sum_weigh, ps_bit_allocation->af_sum_weigh, ((sizeof(float)) * MAX_PIC_TYPE * 3)); in get_bits_based_on_complexity()
457 if((ps_bit_allocation->i4_ba_rc_pass != 2) || (i4_call_type == 0) || in get_bits_based_on_complexity()
458 (ps_bit_allocation->i4_fp_bit_alloc_in_sp == 0)) in get_bits_based_on_complexity()
466 WORD32 i4_frame_num = (WORD32)ps_bit_allocation->i8_frm_num_in_gop, i4_offset; in get_bits_based_on_complexity()
471 (gop_level_stat_t *)ps_bit_allocation->pv_gop_stat + ps_bit_allocation->i8_cur_gop_num; in get_bits_based_on_complexity()
478 (ps_bit_allocation->i4_avg_qscale_gop_first_pass * f_offset); in get_bits_based_on_complexity()
485 convert_float_to_fix((float)ps_bit_allocation->i8_avg_bits_pictype[i], &temp); in get_bits_based_on_complexity()
494 !((i4_call_type == 1) && (ps_bit_allocation->i4_ba_rc_pass == 2))) in get_bits_based_on_complexity()
537 bit_allocation_t *ps_bit_allocation, float af_sum_weigh[MAX_PIC_TYPE][3]) in assign_complexity_coeffs() argument
542 ps_bit_allocation->af_sum_weigh[i][0] = af_sum_weigh[i][0]; in assign_complexity_coeffs()
543 ps_bit_allocation->af_sum_weigh[i][1] = af_sum_weigh[i][1]; in assign_complexity_coeffs()
544 ps_bit_allocation->af_sum_weigh[i][2] = af_sum_weigh[i][2]; in assign_complexity_coeffs()
555 bit_allocation_t *ps_bit_allocation, in ba_get_rbip_and_num_frames() argument
560 get_rbip_and_num_frames(&ps_bit_allocation->s_rbip, ps_pic_handling, 0, pi4_num_frames)); in ba_get_rbip_and_num_frames()
570 void init_prev_header_bits(bit_allocation_t *ps_bit_allocation, pic_handling_handle ps_pic_handling) in init_prev_header_bits() argument
579 i4_rem_bits_in_period = update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handling, 0); in init_prev_header_bits()
611 ai4_frms_in_period[j] = (ai4_frms_in_period[j] * ps_bit_allocation->i4_num_gops_in_period); in init_prev_header_bits()
635 ps_bit_allocation->i4_bits_per_frm, in init_prev_header_bits()
637 ps_bit_allocation->i4_pels_in_frame, in init_prev_header_bits()
663 ps_bit_allocation->af_sum_weigh[i][0] = 1.0; in init_prev_header_bits()
664 ps_bit_allocation->af_sum_weigh[i][1] = 0.0; in init_prev_header_bits()
665 ps_bit_allocation->af_sum_weigh[i][2] = 0.0; in init_prev_header_bits()
672 ps_bit_allocation, in init_prev_header_bits()
682 ps_bit_allocation->i4_prev_frm_header_bits[i] = (WORD32)( in init_prev_header_bits()
702 bit_allocation_t *ps_bit_allocation, in init_bit_allocation() argument
721 ps_bit_allocation->i4_pels_in_frame = i4_pels_in_frame; in init_bit_allocation()
722 ps_bit_allocation->i4_num_scd_in_lap_window = 0; in init_bit_allocation()
723 ps_bit_allocation->i4_num_frm_b4_scd = 0; in init_bit_allocation()
724 ps_bit_allocation->i4_num_active_pic_type = i4_num_active_pic_type; in init_bit_allocation()
725 ps_bit_allocation->i4_field_pic = i4_field_pic; in init_bit_allocation()
726 ps_bit_allocation->i4_ba_rc_pass = rc_pass; in init_bit_allocation()
727 ps_bit_allocation->i4_br_id = 0; /* 0 - peak, 1 - average*/ in init_bit_allocation()
728 ps_bit_allocation->i8_cur_gop_num = in init_bit_allocation()
730 ps_bit_allocation->i8_frm_num_in_gop = 0; in init_bit_allocation()
731 ps_bit_allocation->pv_gop_stat = in init_bit_allocation()
733 ps_bit_allocation->f_min_complexity_cross_peak_rate = in init_bit_allocation()
737 ps_bit_allocation->f_cur_peak_factor_2pass = -1.0; in init_bit_allocation()
738 ps_bit_allocation->i8_total_bits_allocated = -1; in init_bit_allocation()
739 ps_bit_allocation->i4_luma_pels = i4_luma_pels; in init_bit_allocation()
740 ps_bit_allocation->i4_num_gop = -1; in init_bit_allocation()
741 ps_bit_allocation->f_sum_complexity_segment_cross_peak = 0.0f; in init_bit_allocation()
743 ps_bit_allocation->i4_flag_no_more_set_rbip = 0; in init_bit_allocation()
744 ps_bit_allocation->f_curr_i_to_sum = 1.0f; in init_bit_allocation()
745 ps_bit_allocation->i4_fp_bit_alloc_in_sp = i4_fp_bit_alloc_in_sp; in init_bit_allocation()
754 ps_bit_allocation->i4_bits_per_frm = i4_bits_per_frm; in init_bit_allocation()
757 ps_bit_allocation->i4_max_bits_per_frm[i] = i4_max_bits_per_frm[i]; in init_bit_allocation()
759 X_PROD_Y_DIV_Z(i4_min_bitrate, 1000, i4_frm_rate, ps_bit_allocation->i4_min_bits_per_frm); in init_bit_allocation()
765 &ps_bit_allocation->s_rbip, ps_pic_handling, i4_bits_per_frm, i4_num_intra_frm_interval); in init_bit_allocation()
768 ps_bit_allocation->i4_num_gops_in_period = i4_num_intra_frm_interval; in init_bit_allocation()
769 ps_bit_allocation->i4_actual_num_gops_in_period = i4_num_intra_frm_interval; in init_bit_allocation()
772 ps_bit_allocation->i2_K[I_PIC] = (1 << K_Q); in init_bit_allocation()
773 ps_bit_allocation->i2_K[P_PIC] = I_TO_P_RATIO; in init_bit_allocation()
774 ps_bit_allocation->i2_K[P1_PIC] = I_TO_P_RATIO; in init_bit_allocation()
775 ps_bit_allocation->i2_K[B_PIC] = (P_TO_B_RATIO * I_TO_P_RATIO) >> K_Q; in init_bit_allocation()
776 ps_bit_allocation->i2_K[BB_PIC] = (P_TO_B_RATIO * I_TO_P_RATIO) >> K_Q; in init_bit_allocation()
779 ps_bit_allocation->i2_K[B1_PIC] = (B_TO_B1_RATIO * P_TO_B_RATIO * I_TO_P_RATIO) >> (K_Q + K_Q); in init_bit_allocation()
780 ps_bit_allocation->i2_K[B11_PIC] = (B_TO_B1_RATIO * P_TO_B_RATIO * I_TO_P_RATIO) >> (K_Q + K_Q); in init_bit_allocation()
781 ps_bit_allocation->i2_K[B2_PIC] = in init_bit_allocation()
783 ps_bit_allocation->i2_K[B22_PIC] = in init_bit_allocation()
787 ps_bit_allocation->i4_saved_bits = 0; in init_bit_allocation()
790 init_error_bits(ps_bit_allocation->ps_error_bits, i4_frm_rate, i4_bit_rate); in init_bit_allocation()
792 ps_bit_allocation->i4_frame_rate = i4_frm_rate; in init_bit_allocation()
793 ps_bit_allocation->i4_bit_rate = i4_bit_rate; in init_bit_allocation()
795 ps_bit_allocation->ai4_peak_bit_rate[i] = i4_peak_bit_rate[i]; in init_bit_allocation()
797 ps_bit_allocation->i4_is_hbr = i4_is_hbr; in init_bit_allocation()
799 init_prev_header_bits(ps_bit_allocation, ps_pic_handling); in init_bit_allocation()
805 ps_bit_allocation->ai4_prev_frm_tot_bits[i] = in init_bit_allocation()
807 ps_bit_allocation->ai4_prev_frm_tot_est_bits[i] = -1; in init_bit_allocation()
826 ai4_frms_in_period[j] *= ps_bit_allocation->i4_num_gops_in_period; in init_bit_allocation()
827 ai4_actual_frms_in_period[j] *= ps_bit_allocation->i4_num_gops_in_period; in init_bit_allocation()
831 ps_bit_allocation->i4_rem_frame_in_period = i4_actual_frms_in_period; /*i_only*/ in init_bit_allocation()
836 ai4_frms_in_period[j] * ps_bit_allocation->i4_prev_frm_header_bits[j]; in init_bit_allocation()
841 ps_bit_allocation->i4_bits_per_frm * i4_actual_frms_in_period - i4_tot_header_bits_est; in init_bit_allocation()
854 ps_bit_allocation->i4_max_tex_bits_for_i = get_bits_based_on_complexity( in init_bit_allocation()
855 ps_bit_allocation, in init_bit_allocation()
863 ps_bit_allocation->i4_gop_level_bit_error = 0; in init_bit_allocation()
864 ps_bit_allocation->i4_frame_level_bit_error = 0; in init_bit_allocation()
867 ps_bit_allocation->ai4_cur_frm_est_tex_bits[i] = 0; in init_bit_allocation()
868 ps_bit_allocation->ai4_cur_frm_est_hdr_bits[i] = 0; in init_bit_allocation()
870 ps_bit_allocation->i4_buffer_based_bit_error = 0; in init_bit_allocation()
871 ps_bit_allocation->i4_bits_from_buffer_in_cur_gop = 0; in init_bit_allocation()
872 ps_bit_allocation->i4_excess_bits_from_buffer = 0; in init_bit_allocation()
873 ps_bit_allocation->i4_lap_window = i4_lap_window; in init_bit_allocation()
874 ps_bit_allocation->i8_cur_gop_bit_consumption = 0; in init_bit_allocation()
876 ps_bit_allocation->f_qscale_max_clip_in_second_pass = (float)0x7FFFFFFF; in init_bit_allocation()
884 ps_bit_allocation->f_min_complexity_cross_peak_rate = ba_get_min_complexity_for_peak_br( in init_bit_allocation()
889 ps_bit_allocation->i4_total_2pass_frames = 0; in init_bit_allocation()
890 ps_bit_allocation->i8_2pass_avg_bit_rate = -1; in init_bit_allocation()
906 bit_allocation_t *ps_bit_allocation, in ba_init_stat_data() argument
916 ps_bit_allocation->pv_gop_stat = pv_gop_stat; in ba_init_stat_data()
920 ASSERT(ps_bit_allocation->i8_cur_gop_num == 0); in ba_init_stat_data()
921 ASSERT(ps_bit_allocation->i8_frm_num_in_gop == 0); in ba_init_stat_data()
935 &ps_bit_allocation->s_rbip, ps_pic_handling, i4_total_bits_in_period, i4_tot_frames_in_gop); in ba_init_stat_data()
937 ps_bit_allocation->i8_2pass_alloc_per_frm_bits = in ba_init_stat_data()
939 ps_bit_allocation->i8_bit_consumption_so_far = 0; in ba_init_stat_data()
941 ASSERT(ps_bit_allocation->i4_ba_rc_pass == 2); in ba_init_stat_data()
956 bit_allocation_t *ps_bit_allocation, in bit_alloc_get_intra_bits() argument
977 (ps_bit_allocation->s_rbip.i4_tot_frms_in_gop * in bit_alloc_get_intra_bits()
978 ps_bit_allocation->s_rbip.i4_num_intra_frm_interval); in bit_alloc_get_intra_bits()
989 ai4_frm_in_gop[i] * ps_bit_allocation->s_rbip.i4_num_intra_frm_interval; in bit_alloc_get_intra_bits()
991 ai4_frm_in_gop[i] * ps_bit_allocation->s_rbip.i4_num_intra_frm_interval; in bit_alloc_get_intra_bits()
997 i4_default_bits_in_period = update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handling, 0); in bit_alloc_get_intra_bits()
998 if((i4_default_bits_in_period + ps_bit_allocation->i4_frame_level_bit_error) < in bit_alloc_get_intra_bits()
1001 ps_bit_allocation->i4_frame_level_bit_error = 0; //-(i4_default_bits_in_period * 0.70); in bit_alloc_get_intra_bits()
1003 i4_bits_in_period = i4_default_bits_in_period + ps_bit_allocation->i4_frame_level_bit_error; in bit_alloc_get_intra_bits()
1011 (i4_intra_int - i4_inter_int + (1 << ps_bit_allocation->i4_field_pic))) && in bit_alloc_get_intra_bits()
1022 i4_bits_in_period = ret_rbip_default_preenc(&ps_bit_allocation->s_rbip, ps_pic_handling); in bit_alloc_get_intra_bits()
1024 if(ps_bit_allocation->i4_ba_rc_pass == 2) in bit_alloc_get_intra_bits()
1025 i4_default_bits_in_period = update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handling, 0); in bit_alloc_get_intra_bits()
1030 (get_cbr_buffer_size(ps_cbr_buf_handling) + (ps_bit_allocation->i4_bits_per_frm >> 1)) / in bit_alloc_get_intra_bits()
1031 ps_bit_allocation->i4_bits_per_frm; in bit_alloc_get_intra_bits()
1034 i4_num_buf_frms = i4_num_buf_frms * i4_peak_drain_rate / ps_bit_allocation->i4_bits_per_frm; in bit_alloc_get_intra_bits()
1042 i4_lap_window = ps_bit_allocation->i4_lap_window; in bit_alloc_get_intra_bits()
1045 if(ps_bit_allocation->i4_lap_window < MINIMUM_VISIBILITY_B4_STATIC_I) in bit_alloc_get_intra_bits()
1051 i4_lap_window = ps_bit_allocation->i4_lap_window; in bit_alloc_get_intra_bits()
1059 if(ps_bit_allocation->i4_ba_rc_pass != 2) in bit_alloc_get_intra_bits()
1073 for(i = 1; i < ps_bit_allocation->i4_num_active_pic_type; i++) in bit_alloc_get_intra_bits()
1079 if(ps_bit_allocation->i4_field_pic) in bit_alloc_get_intra_bits()
1085 if(ps_bit_allocation->i4_field_pic) in bit_alloc_get_intra_bits()
1091 if(!ps_bit_allocation->i4_field_pic) in bit_alloc_get_intra_bits()
1093 ai4_frms_in_baw[ps_bit_allocation->i4_num_active_pic_type - 1] += in bit_alloc_get_intra_bits()
1098 ai4_frms_in_baw[ps_bit_allocation->i4_num_active_pic_type - 1] += in bit_alloc_get_intra_bits()
1100 ai4_frms_in_baw[ps_bit_allocation->i4_num_active_pic_type - 1 + FIELD_OFFSET] += in bit_alloc_get_intra_bits()
1111 ps_bit_allocation->i4_bits_per_frm * i4_peak_drain_rate; in bit_alloc_get_intra_bits()
1124 (ps_bit_allocation->s_rbip.i4_tot_frms_in_gop + (WORD32)(i4_delay_frames * 0.8f)) - in bit_alloc_get_intra_bits()
1130 &ps_bit_allocation->s_rbip, in bit_alloc_get_intra_bits()
1141 ((((LWORD64)i4_buffer_size - i4_cur_buf_pos) / ps_bit_allocation->i4_bits_per_frm) + in bit_alloc_get_intra_bits()
1152 (ps_bit_allocation->i4_num_frames_since_last_I_frame < in bit_alloc_get_intra_bits()
1153 (ps_bit_allocation->i4_frame_rate * 2) / 1000) && in bit_alloc_get_intra_bits()
1154 (ps_bit_allocation->i4_ba_rc_pass != 2)) in bit_alloc_get_intra_bits()
1166 (ps_bit_allocation->i4_prev_frm_header_bits[i] * ai4_frms_in_baw[i]); in bit_alloc_get_intra_bits()
1168 (ps_bit_allocation->ai4_prev_frm_tot_bits[i] * ai4_frms_in_baw[i]); in bit_alloc_get_intra_bits()
1172 if((i4_call_type == 1) && (ps_bit_allocation->i4_ba_rc_pass == 2)) in bit_alloc_get_intra_bits()
1194 ps_bit_allocation, in bit_alloc_get_intra_bits()
1201 if(i4_est_bits_for_I > ((ps_bit_allocation->i4_bit_rate << 1) - in bit_alloc_get_intra_bits()
1202 ps_bit_allocation->i4_prev_frm_header_bits[I_PIC])) in bit_alloc_get_intra_bits()
1204 ((ps_bit_allocation->i4_bit_rate << 1) - in bit_alloc_get_intra_bits()
1205 ps_bit_allocation->i4_prev_frm_header_bits[I_PIC]); in bit_alloc_get_intra_bits()
1208 (i4_max_buffer_based_I_pic - ps_bit_allocation->i4_prev_frm_header_bits[I_PIC])) in bit_alloc_get_intra_bits()
1211 (i4_max_buffer_based_I_pic - ps_bit_allocation->i4_prev_frm_header_bits[I_PIC]); in bit_alloc_get_intra_bits()
1219 (ps_bit_allocation->f_curr_i_to_sum != 1.0f)) in bit_alloc_get_intra_bits()
1229 (WORD32)((float)i4_est_bits_for_I * ps_bit_allocation->f_curr_i_to_sum); in bit_alloc_get_intra_bits()
1243 ps_bit_allocation->f_curr_i_to_sum, in bit_alloc_get_intra_bits()
1248 if(i4_est_bits_for_I > (ps_bit_allocation->i4_bit_rate << 1)) in bit_alloc_get_intra_bits()
1249 i4_est_bits_for_I = (ps_bit_allocation->i4_bit_rate << 1); in bit_alloc_get_intra_bits()
1273 bit_allocation_t *ps_bit_allocation, in get_cur_frm_est_texture_bits() argument
1336 ai4_frms_in_period[j] *= ps_bit_allocation->i4_num_gops_in_period; in get_cur_frm_est_texture_bits()
1352 ai4_frms_in_period[j] * ps_bit_allocation->i4_prev_frm_header_bits[j]; in get_cur_frm_est_texture_bits()
1354 ai4_frms_in_period[j] * ps_bit_allocation->ai4_prev_frm_tot_bits[j]; in get_cur_frm_est_texture_bits()
1364 i4_max_consumable_bits = ps_bit_allocation->i4_max_bits_per_frm[0] * i4_total_frames; in get_cur_frm_est_texture_bits()
1370 if(ps_bit_allocation->i4_ba_rc_pass == 2) in get_cur_frm_est_texture_bits()
1375 WORD32 i4_rbip = update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handling, 0); in get_cur_frm_est_texture_bits()
1376 if((i4_rbip + ps_bit_allocation->i4_frame_level_bit_error) < (i4_rbip * 0.30)) in get_cur_frm_est_texture_bits()
1378 ps_bit_allocation->i4_frame_level_bit_error = 0; //-(i4_rbip * 0.70); in get_cur_frm_est_texture_bits()
1382 ps_bit_allocation->i4_frame_level_bit_error /*- i4_est_tot_head_bits_period*/ in get_cur_frm_est_texture_bits()
1388 if((WORD32)ps_bit_allocation->af_sum_weigh[j][1] > 0) in get_cur_frm_est_texture_bits()
1390 i4_tot_frm_remain += (WORD32)ps_bit_allocation->af_sum_weigh[j][1]; in get_cur_frm_est_texture_bits()
1392 ps_bit_allocation->i4_prev_frm_header_bits[j] * in get_cur_frm_est_texture_bits()
1393 ps_bit_allocation->af_sum_weigh[j][1]); in get_cur_frm_est_texture_bits()
1395 ps_bit_allocation->ai4_prev_frm_tot_bits[j] * in get_cur_frm_est_texture_bits()
1396 ps_bit_allocation->af_sum_weigh[j][1]); in get_cur_frm_est_texture_bits()
1397 if(ps_bit_allocation->ai4_prev_frm_tot_bits[j] == -1) in get_cur_frm_est_texture_bits()
1423 ps_bit_allocation->i4_frame_level_bit_error, in get_cur_frm_est_texture_bits()
1432 WORD32 i4_rbip = update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handling, 0); in get_cur_frm_est_texture_bits()
1433 if((i4_rbip + ps_bit_allocation->i4_frame_level_bit_error) < (i4_rbip * 0.30)) in get_cur_frm_est_texture_bits()
1435 ps_bit_allocation->i4_frame_level_bit_error = 0; //-(i4_rbip * 0.70); in get_cur_frm_est_texture_bits()
1437 i4_rem_texture_bits = update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handling, 0) + in get_cur_frm_est_texture_bits()
1438 ps_bit_allocation->i4_frame_level_bit_error; in get_cur_frm_est_texture_bits()
1458 ps_bit_allocation->i4_frame_level_bit_error, in get_cur_frm_est_texture_bits()
1476 if(ps_bit_allocation->af_sum_weigh[e_pic_type][0] > 1.0f) in get_cur_frm_est_texture_bits()
1477 ps_bit_allocation->af_sum_weigh[e_pic_type][0] = 1.0f; in get_cur_frm_est_texture_bits()
1481 if(ps_bit_allocation->af_sum_weigh[e_pic_type][0] > 1.5f) in get_cur_frm_est_texture_bits()
1482 ps_bit_allocation->af_sum_weigh[e_pic_type][0] = 1.5f; in get_cur_frm_est_texture_bits()
1489 ret_rbip_default_preenc(&ps_bit_allocation->s_rbip, ps_pic_handling); in get_cur_frm_est_texture_bits()
1510 SET_VAR_Q(vq_K, ps_bit_allocation->i2_K[i], K_Q); in get_cur_frm_est_texture_bits()
1543 ps_bit_allocation, in get_cur_frm_est_texture_bits()
1558 ps_bit_allocation, in get_cur_frm_est_texture_bits()
1566 ps_bit_allocation->i4_excess_bits_from_buffer = 0; in get_cur_frm_est_texture_bits()
1592 WORD32 get_cur_frm_est_header_bits(bit_allocation_t *ps_bit_allocation, picture_type_e e_pic_type) in get_cur_frm_est_header_bits() argument
1595 return (ps_bit_allocation->i4_prev_frm_header_bits[e_pic_type]); in get_cur_frm_est_header_bits()
1606 get_rem_bits_in_period(bit_allocation_t *ps_bit_allocation, pic_handling_handle ps_pic_handling) in get_rem_bits_in_period() argument
1608 return (update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handling, 0)); in get_rem_bits_in_period()
1617 WORD32 get_bits_per_frame(bit_allocation_t *ps_bit_allocation) in get_bits_per_frame() argument
1619 return ((*ps_bit_allocation).i4_bits_per_frm); in get_bits_per_frame()
1628 LWORD64 ba_get_gop_bits(bit_allocation_t *ps_bit_allocation) in ba_get_gop_bits() argument
1632 (gop_level_stat_t *)ps_bit_allocation->pv_gop_stat + ps_bit_allocation->i8_cur_gop_num; in ba_get_gop_bits()
1644 LWORD64 ba_get_gop_sad(bit_allocation_t *ps_bit_allocation) in ba_get_gop_sad() argument
1648 (gop_level_stat_t *)ps_bit_allocation->pv_gop_stat + ps_bit_allocation->i8_cur_gop_num; in ba_get_gop_sad()
1658 LWORD64 ba_get_buffer_play_bits_for_cur_gop(bit_allocation_t *ps_bit_allocation) in ba_get_buffer_play_bits_for_cur_gop() argument
1662 (gop_level_stat_t *)ps_bit_allocation->pv_gop_stat + ps_bit_allocation->i8_cur_gop_num; in ba_get_buffer_play_bits_for_cur_gop()
1682 bit_allocation_t *ps_bit_allocation, in update_cur_frm_consumed_bits() argument
1702 WORD32 i4_error_bits = get_error_bits(ps_bit_allocation->ps_error_bits); in update_cur_frm_consumed_bits()
1706 ps_bit_allocation->i4_rem_frame_in_period--; in update_cur_frm_consumed_bits()
1715 ps_bit_allocation->i4_bits_from_buffer_in_cur_gop += in update_cur_frm_consumed_bits()
1716 ps_bit_allocation->i4_excess_bits_from_buffer; in update_cur_frm_consumed_bits()
1717 ps_bit_allocation->i4_buffer_based_bit_error -= ps_bit_allocation->i4_excess_bits_from_buffer; in update_cur_frm_consumed_bits()
1718 ps_bit_allocation->i4_gop_level_bit_error += in update_cur_frm_consumed_bits()
1720 ps_bit_allocation->i4_bits_per_frm); in update_cur_frm_consumed_bits()
1721 ps_bit_allocation->i8_cur_gop_bit_consumption += (i4_total_frame_bits + i4_stuff_bits); in update_cur_frm_consumed_bits()
1725 ps_bit_allocation->i4_buffer_based_bit_error += i4_buffer_based_bit_error; in update_cur_frm_consumed_bits()
1726 ps_bit_allocation->i8_frm_num_in_gop++; in update_cur_frm_consumed_bits()
1731 ps_bit_allocation->i4_num_frames_since_last_I_frame = 1; in update_cur_frm_consumed_bits()
1733 ps_bit_allocation->i4_num_frames_since_last_I_frame++; in update_cur_frm_consumed_bits()
1739 ps_bit_allocation->ai4_prev_frm_tot_est_bits[e_pic_type] = in update_cur_frm_consumed_bits()
1740 ps_bit_allocation->ai4_cur_frm_est_hdr_bits[i4_est_text_bits_ctr_update_qp] + in update_cur_frm_consumed_bits()
1741 ps_bit_allocation->ai4_cur_frm_est_tex_bits[i4_est_text_bits_ctr_update_qp]; in update_cur_frm_consumed_bits()
1743 ps_bit_allocation->i4_frame_level_bit_error += in update_cur_frm_consumed_bits()
1744 (ps_bit_allocation->ai4_cur_frm_est_hdr_bits[i4_est_text_bits_ctr_update_qp] + in update_cur_frm_consumed_bits()
1745 ps_bit_allocation->ai4_cur_frm_est_tex_bits[i4_est_text_bits_ctr_update_qp] - in update_cur_frm_consumed_bits()
1751 ps_bit_allocation->i4_prev_frm_header_bits[e_pic_type], in update_cur_frm_consumed_bits()
1752 ps_bit_allocation->ai4_cur_frm_est_tex_bits[i4_est_text_bits_ctr_update_qp], in update_cur_frm_consumed_bits()
1758 update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handling, 0), in update_cur_frm_consumed_bits()
1759 ps_bit_allocation->i4_frame_level_bit_error, in update_cur_frm_consumed_bits()
1760 ps_bit_allocation->i4_buffer_based_bit_error, in update_cur_frm_consumed_bits()
1761 ps_bit_allocation->i4_bits_from_buffer_in_cur_gop); in update_cur_frm_consumed_bits()
1767 init_prev_header_bits(ps_bit_allocation, ps_pic_handling); in update_cur_frm_consumed_bits()
1772 ps_bit_allocation->ai4_prev_frm_tot_bits[i] = -1; in update_cur_frm_consumed_bits()
1773 ps_bit_allocation->ai4_prev_frm_tot_est_bits[i] = -1; in update_cur_frm_consumed_bits()
1778 ps_bit_allocation->i4_prev_frm_header_bits[I_PIC] = i4_model_updation_hdr_bits; in update_cur_frm_consumed_bits()
1779 ps_bit_allocation->ai4_prev_frm_tot_bits[I_PIC] = i4_total_frame_bits; in update_cur_frm_consumed_bits()
1780 ps_bit_allocation->ai4_prev_frm_tot_est_bits[I_PIC] = i4_total_frame_bits; in update_cur_frm_consumed_bits()
1785 if(ps_bit_allocation->i4_num_gops_in_period != 1 && in update_cur_frm_consumed_bits()
1786 ps_bit_allocation->i4_num_gops_in_period < MAX_NUM_GOPS_IN_PERIOD) in update_cur_frm_consumed_bits()
1790 ps_bit_allocation->i4_num_gops_in_period += 2; in update_cur_frm_consumed_bits()
1793 &ps_bit_allocation->s_rbip, in update_cur_frm_consumed_bits()
1794 ps_bit_allocation->i4_bits_per_frm, in update_cur_frm_consumed_bits()
1795 ps_bit_allocation->i4_num_gops_in_period); in update_cur_frm_consumed_bits()
1805 ps_bit_allocation->i4_prev_frm_header_bits[e_pic_type] = i4_model_updation_hdr_bits; in update_cur_frm_consumed_bits()
1806 ps_bit_allocation->ai4_prev_frm_tot_bits[e_pic_type] = i4_total_frame_bits; in update_cur_frm_consumed_bits()
1818 if(ps_bit_allocation->i4_ba_rc_pass != 2) in update_cur_frm_consumed_bits()
1823 if(ps_bit_allocation->i4_lap_window > i4_inter_frame_interval) in update_cur_frm_consumed_bits()
1828 ps_bit_allocation->f_min_complexity_cross_peak_rate) in update_cur_frm_consumed_bits()
1830 (WORD32)(ps_bit_allocation->f_min_complexity_cross_peak_rate * 128); in update_cur_frm_consumed_bits()
1835 ps_bit_allocation->f_min_complexity_cross_peak_rate, in update_cur_frm_consumed_bits()
1837 (i4_intra_frm_int * ps_bit_allocation->s_rbip.i4_num_intra_frm_interval), in update_cur_frm_consumed_bits()
1845 (i4_intra_frm_int * ps_bit_allocation->s_rbip.i4_num_intra_frm_interval)); in update_cur_frm_consumed_bits()
1882 &ps_bit_allocation->s_rbip, in update_cur_frm_consumed_bits()
1885 update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handling, 0); in update_cur_frm_consumed_bits()
1886 ASSERT(ps_bit_allocation->i4_bits_from_buffer_in_cur_gop == 0); in update_cur_frm_consumed_bits()
1890 ps_bit_allocation->i4_gop_level_bit_error = 0; in update_cur_frm_consumed_bits()
1892 if(ps_bit_allocation->i4_frame_level_bit_error > i4_max_vbv_size) in update_cur_frm_consumed_bits()
1894 ps_bit_allocation->i4_frame_level_bit_error = i4_max_vbv_size; in update_cur_frm_consumed_bits()
1897 (i4_intra_frm_int == 1 && ps_bit_allocation->i4_rem_frame_in_period == 0)) in update_cur_frm_consumed_bits()
1899 ps_bit_allocation->i8_cur_gop_bit_consumption = 0; in update_cur_frm_consumed_bits()
1900 ps_bit_allocation->i4_frame_level_bit_error = 0; in update_cur_frm_consumed_bits()
1901 ps_bit_allocation->i4_bits_from_buffer_in_cur_gop = 0; in update_cur_frm_consumed_bits()
1902 ps_bit_allocation->i4_rem_frame_in_period = in update_cur_frm_consumed_bits()
1903 ps_bit_allocation->i4_num_gops_in_period * in update_cur_frm_consumed_bits()
1905 ps_bit_allocation->i8_frm_num_in_gop = 0; in update_cur_frm_consumed_bits()
1914 if(ps_bit_allocation->i4_num_gops_in_period > in update_cur_frm_consumed_bits()
1915 ps_bit_allocation->i4_actual_num_gops_in_period) in update_cur_frm_consumed_bits()
1917 ps_bit_allocation->i4_num_gops_in_period--; in update_cur_frm_consumed_bits()
1919 &ps_bit_allocation->s_rbip, in update_cur_frm_consumed_bits()
1920 ps_bit_allocation->i4_bits_per_frm, in update_cur_frm_consumed_bits()
1921 ps_bit_allocation->i4_num_gops_in_period); in update_cur_frm_consumed_bits()
1927 update_error_bits(ps_bit_allocation->ps_error_bits); in update_cur_frm_consumed_bits()
1944 bit_allocation_t *ps_bit_allocation, in change_remaining_bits_in_period() argument
1962 ps_bit_allocation->i4_max_bits_per_frm[i] = i4_new_peak_bits_per_frm[i]; in change_remaining_bits_in_period()
1971 &ps_bit_allocation->s_rbip, in change_remaining_bits_in_period()
1973 ps_bit_allocation->i4_num_gops_in_period); in change_remaining_bits_in_period()
1976 ps_bit_allocation->i4_bits_per_frm = i4_new_avg_bits_per_frm; in change_remaining_bits_in_period()
1981 ps_bit_allocation->i4_min_bits_per_frm = in change_remaining_bits_in_period()
1985 if(i4_bit_rate != ps_bit_allocation->i4_bit_rate) in change_remaining_bits_in_period()
1988 ps_bit_allocation->i4_max_tex_bits_for_i, in change_remaining_bits_in_period()
1990 ps_bit_allocation->i4_bit_rate, in change_remaining_bits_in_period()
1991 ps_bit_allocation->i4_max_tex_bits_for_i); in change_remaining_bits_in_period()
1995 change_bitrate_in_error_bits(ps_bit_allocation->ps_error_bits, i4_bit_rate); in change_remaining_bits_in_period()
1996 change_frm_rate_in_error_bits(ps_bit_allocation->ps_error_bits, i4_frame_rate); in change_remaining_bits_in_period()
1999 ps_bit_allocation->i4_frame_rate = i4_frame_rate; in change_remaining_bits_in_period()
2000 ps_bit_allocation->i4_bit_rate = i4_bit_rate; in change_remaining_bits_in_period()
2002 ps_bit_allocation->ai4_peak_bit_rate[i] = i4_peak_bit_rate[i]; in change_remaining_bits_in_period()
2017 void change_ba_peak_bit_rate(bit_allocation_t *ps_bit_allocation, WORD32 *ai4_peak_bit_rate) in change_ba_peak_bit_rate() argument
2026 ps_bit_allocation->i4_frame_rate, in change_ba_peak_bit_rate()
2027 ps_bit_allocation->i4_max_bits_per_frm[i]); in change_ba_peak_bit_rate()
2028 ps_bit_allocation->ai4_peak_bit_rate[i] = ai4_peak_bit_rate[i]; in change_ba_peak_bit_rate()
2046 bit_allocation_t *ps_bit_allocation, in check_and_update_bit_allocation() argument
2053 WORD32 i4_rem_bits_in_period = update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handling, 0); in check_and_update_bit_allocation()
2063 i4_max_drain_bits = ps_bit_allocation->i4_num_gops_in_period * i4_num_frms_in_period * in check_and_update_bit_allocation()
2071 i4_min_bits_for_period = ps_bit_allocation->i4_num_gops_in_period * i4_num_frms_in_period * in check_and_update_bit_allocation()
2072 ps_bit_allocation->i4_min_bits_per_frm; in check_and_update_bit_allocation()
2079 update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handling, -1 * i4_extra_bits); in check_and_update_bit_allocation()
2080 overflow_avoided_summation(&ps_bit_allocation->i4_saved_bits, i4_extra_bits); in check_and_update_bit_allocation()
2085 update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handling, i4_extra_bits); in check_and_update_bit_allocation()
2086 overflow_avoided_summation(&ps_bit_allocation->i4_saved_bits, -1 * i4_extra_bits); in check_and_update_bit_allocation()
2088 else if(ps_bit_allocation->i4_saved_bits > 0) in check_and_update_bit_allocation()
2091 i4_allocated_saved_bits = MIN(i4_less_bits, ps_bit_allocation->i4_saved_bits); in check_and_update_bit_allocation()
2092 update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handling, i4_allocated_saved_bits); in check_and_update_bit_allocation()
2093 ps_bit_allocation->i4_saved_bits -= i4_allocated_saved_bits; in check_and_update_bit_allocation()
2104 WORD32 ba_get_frame_rate(bit_allocation_t *ps_bit_allocation) in ba_get_frame_rate() argument
2106 return (ps_bit_allocation->i4_frame_rate); in ba_get_frame_rate()
2115 WORD32 ba_get_bit_rate(bit_allocation_t *ps_bit_allocation) in ba_get_bit_rate() argument
2117 return (ps_bit_allocation->i4_bit_rate); in ba_get_bit_rate()
2126 LWORD64 ba_get_2pass_avg_bit_rate(bit_allocation_t *ps_bit_allocation) in ba_get_2pass_avg_bit_rate() argument
2128 return (ps_bit_allocation->i8_2pass_avg_bit_rate); in ba_get_2pass_avg_bit_rate()
2137 void ba_set_2pass_avg_bit_rate(bit_allocation_t *ps_bit_allocation, LWORD64 i8_2pass_avg_bit_rate) in ba_set_2pass_avg_bit_rate() argument
2139 ps_bit_allocation->i8_2pass_avg_bit_rate = i8_2pass_avg_bit_rate; in ba_set_2pass_avg_bit_rate()
2148 void ba_get_peak_bit_rate(bit_allocation_t *ps_bit_allocation, WORD32 *pi4_peak_bit_rate) in ba_get_peak_bit_rate() argument
2153 pi4_peak_bit_rate[i] = ps_bit_allocation->ai4_peak_bit_rate[i]; in ba_get_peak_bit_rate()
2163 void init_intra_header_bits(bit_allocation_t *ps_bit_allocation, WORD32 i4_intra_header_bits) in init_intra_header_bits() argument
2166 ps_bit_allocation->i4_prev_frm_header_bits[0] = i4_intra_header_bits; in init_intra_header_bits()
2175 WORD32 get_prev_header_bits(bit_allocation_t *ps_bit_allocation, WORD32 pic_type) in get_prev_header_bits() argument
2178 return (ps_bit_allocation->i4_prev_frm_header_bits[pic_type]); in get_prev_header_bits()
2191 void set_Kp_Kb_for_hi_motion(bit_allocation_t *ps_bit_allocation) in set_Kp_Kb_for_hi_motion() argument
2193 ps_bit_allocation->i2_K[I_PIC] = (1 << K_Q); in set_Kp_Kb_for_hi_motion()
2194 ps_bit_allocation->i2_K[P_PIC] = I_TO_P_RATIO_HI_MO; in set_Kp_Kb_for_hi_motion()
2196 if(ps_bit_allocation->i4_is_hbr) in set_Kp_Kb_for_hi_motion()
2198 ps_bit_allocation->i2_K[B_PIC] = (P_TO_B_RATIO_HI_MO * I_TO_P_RATIO_HI_MO) >> K_Q; in set_Kp_Kb_for_hi_motion()
2202 ps_bit_allocation->i2_K[B_PIC] = (P_TO_B_RATIO_HI_MO_HBR * I_TO_P_RATIO_HI_MO) >> K_Q; in set_Kp_Kb_for_hi_motion()
2219 bit_allocation_t *ps_bit_allocation, in reset_Kp_Kb() argument
2253 ps_bit_allocation->i2_K[i] = ai4_offset_qp[ai4_offsets[i]]; in reset_Kp_Kb()
2257 ps_bit_allocation->i2_K[i + 4] = ai4_offset_qp[ai4_offsets[i]]; in reset_Kp_Kb()
2389 WORD32 get_Kp_Kb(bit_allocation_t *ps_bit_allocation, picture_type_e e_pic_type) in get_Kp_Kb() argument
2391 return ps_bit_allocation->i2_K[e_pic_type]; in get_Kp_Kb()
2409 bit_allocation_t *ps_bit_allocation, in get_scene_change_tot_frm_bits() argument
2440 ai4_frms_in_period[j] *= ps_bit_allocation->i4_num_gops_in_period; in get_scene_change_tot_frm_bits()
2446 i4_total_bits_in_period = ps_bit_allocation->s_rbip.i4_bits_per_frm * in get_scene_change_tot_frm_bits()
2447 ps_bit_allocation->s_rbip.i4_tot_frms_in_gop; in get_scene_change_tot_frm_bits()
2458 i4_max_consumable_bits = ps_bit_allocation->i4_max_bits_per_frm[0] * i4_total_frames; in get_scene_change_tot_frm_bits()
2470 if(ps_bit_allocation->i4_ba_rc_pass != 2) in get_scene_change_tot_frm_bits()
2501 ps_bit_allocation, in get_scene_change_tot_frm_bits()
2511 ps_bit_allocation->i4_excess_bits_from_buffer = 0; in get_scene_change_tot_frm_bits()
2539 bit_allocation_t *ps_bit_allocation, in update_estimate_status() argument
2544 ps_bit_allocation->ai4_cur_frm_est_tex_bits[i4_est_text_bits_ctr_get_qp] = i4_est_texture_bits; in update_estimate_status()
2545 ps_bit_allocation->ai4_cur_frm_est_hdr_bits[i4_est_text_bits_ctr_get_qp] = i4_hdr_bits; in update_estimate_status()
2557 bit_allocation_t *ps_bit_allocation, in bit_allocation_set_num_scd_lap_window() argument
2561 ps_bit_allocation->i4_num_scd_in_lap_window = i4_num_scd_in_lap_window; in bit_allocation_set_num_scd_lap_window()
2562 ps_bit_allocation->i4_num_frm_b4_scd = i4_num_frames_b4_Scd; in bit_allocation_set_num_scd_lap_window()
2564 if(ps_bit_allocation->i4_num_scd_in_lap_window > 2) in bit_allocation_set_num_scd_lap_window()
2565 ps_bit_allocation->i4_num_scd_in_lap_window = 2; in bit_allocation_set_num_scd_lap_window()
2576 bit_allocation_t *ps_bit_allocation, WORD32 i4_next_sc_i_in_rc_look_ahead) in bit_allocation_set_sc_i_in_rc_look_ahead() argument
2578 ps_bit_allocation->i4_next_sc_i_in_rc_look_ahead = i4_next_sc_i_in_rc_look_ahead; in bit_allocation_set_sc_i_in_rc_look_ahead()
2589 bit_allocation_t *ps_bit_allocation, WORD32 i4_error_bits) in bit_allocation_update_gop_level_bit_error() argument
2591 ps_bit_allocation->i4_gop_level_bit_error += i4_error_bits; in bit_allocation_update_gop_level_bit_error()
2592 ps_bit_allocation->i4_frame_level_bit_error += i4_error_bits; in bit_allocation_update_gop_level_bit_error()
2594 ps_bit_allocation->i8_cur_gop_bit_consumption -= i4_error_bits; in bit_allocation_update_gop_level_bit_error()
2612 bit_allocation_t *ps_bit_allocation, in rc_update_bit_distribution_gop_level_2pass() argument
2634 i8_current_bitrate = (LWORD64)ba_get_2pass_avg_bit_rate(ps_bit_allocation); in rc_update_bit_distribution_gop_level_2pass()
2635 LWORD64 i8_actual_avg_bit_rate = ba_get_bit_rate(ps_bit_allocation); in rc_update_bit_distribution_gop_level_2pass()
2654 cur_peak_factor = ps_bit_allocation->f_cur_peak_factor_2pass; in rc_update_bit_distribution_gop_level_2pass()
2662 i8_frame_rate = ba_get_frame_rate(ps_bit_allocation); in rc_update_bit_distribution_gop_level_2pass()
2663 ba_get_peak_bit_rate(ps_bit_allocation, &ai4_peak_bitrate[0]); in rc_update_bit_distribution_gop_level_2pass()
2670 ps_bit_allocation->i8_current_bitrate_2_pass = i8_current_bitrate; in rc_update_bit_distribution_gop_level_2pass()
2681 (float)ps_bit_allocation->ai4_peak_bit_rate[0] / i8_current_bitrate; in rc_update_bit_distribution_gop_level_2pass()
2834 ps_bit_allocation->f_cur_peak_factor_2pass = cur_peak_factor; in rc_update_bit_distribution_gop_level_2pass()
2835 ps_bit_allocation->i8_total_bits_allocated = total_bits_allocated; in rc_update_bit_distribution_gop_level_2pass()
2840 ps_bit_allocation->f_min_complexity_cross_peak_rate = /*min_complexity_beyond_peak*/ in rc_update_bit_distribution_gop_level_2pass()
2841 (float)ps_bit_allocation->ai4_peak_bit_rate[0] / i8_current_bitrate; in rc_update_bit_distribution_gop_level_2pass()
2855 bit_allocation_t *ps_bit_allocation, in get_prev_frame_total_header_bits() argument
2860 *pi4_prev_frame_total_bits = ps_bit_allocation->ai4_prev_frm_tot_bits[e_pic_type]; in get_prev_frame_total_header_bits()
2861 *pi4_prev_frame_header_bits = ps_bit_allocation->i4_prev_frm_header_bits[e_pic_type]; in get_prev_frame_total_header_bits()
2872 LWORD64 bit_alloc_get_gop_num(bit_allocation_t *ps_bit_allocation) in bit_alloc_get_gop_num() argument
2874 return (ps_bit_allocation->i8_cur_gop_num); in bit_alloc_get_gop_num()
2884 WORD32 ba_get_min_bits_per_frame(bit_allocation_t *ps_bit_allocation) in ba_get_min_bits_per_frame() argument
2886 return (ps_bit_allocation->i4_min_bits_per_frm); in ba_get_min_bits_per_frame()
2897 bit_allocation_t *ps_bit_allocation, in set_bit_allocation_i_frames() argument
2909 if(((float)i4_lap_window_comp / 128) > ps_bit_allocation->f_min_complexity_cross_peak_rate) in set_bit_allocation_i_frames()
2911 (WORD32)(ps_bit_allocation->f_min_complexity_cross_peak_rate * 128); in set_bit_allocation_i_frames()
2916 ps_bit_allocation->f_min_complexity_cross_peak_rate, in set_bit_allocation_i_frames()
2924 update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handle, 0); in set_bit_allocation_i_frames()
2926 set_rbip(&ps_bit_allocation->s_rbip, (i4_gop_correction + (WORD32)vbv_buffer_based_excess)); in set_bit_allocation_i_frames()
2928 update_rbip(&ps_bit_allocation->s_rbip, ps_pic_handle, 0); in set_bit_allocation_i_frames()
2939 void bit_alloc_set_curr_i_to_sum_i(bit_allocation_t *ps_bit_allocation, float f_curr_i_to_sum) in bit_alloc_set_curr_i_to_sum_i() argument
2941 ps_bit_allocation->f_curr_i_to_sum = f_curr_i_to_sum; in bit_alloc_set_curr_i_to_sum_i()
2952 void ba_set_gop_stat_in_bit_alloc(bit_allocation_t *ps_bit_allocation, void *pv_gop_stat_summary) in ba_set_gop_stat_in_bit_alloc() argument
2954 ps_bit_allocation->pv_gop_stat = pv_gop_stat_summary; in ba_set_gop_stat_in_bit_alloc()
2964 WORD32 ba_get_luma_pels(bit_allocation_t *ps_bit_allocation) in ba_get_luma_pels() argument
2966 return (ps_bit_allocation->i4_luma_pels); in ba_get_luma_pels()
2993 float ba_get_sum_complexity_segment_cross_peak(bit_allocation_t *ps_bit_allocation) in ba_get_sum_complexity_segment_cross_peak() argument
2995 return (ps_bit_allocation->f_sum_complexity_segment_cross_peak); in ba_get_sum_complexity_segment_cross_peak()
3005 WORD32 ba_get_prev_frame_tot_est_bits(bit_allocation_t *ps_bit_allocation, WORD32 i4_pic) in ba_get_prev_frame_tot_est_bits() argument
3007 return (ps_bit_allocation->ai4_prev_frm_tot_est_bits[i4_pic]); in ba_get_prev_frame_tot_est_bits()
3017 WORD32 ba_get_prev_frame_tot_bits(bit_allocation_t *ps_bit_allocation, WORD32 i4_pic) in ba_get_prev_frame_tot_bits() argument
3019 return (ps_bit_allocation->ai4_prev_frm_tot_bits[i4_pic]); in ba_get_prev_frame_tot_bits()
3029 float ba_gop_info_average_qscale_gop_without_offset(bit_allocation_t *ps_bit_allocation) in ba_gop_info_average_qscale_gop_without_offset() argument
3032 (gop_level_stat_t *)ps_bit_allocation->pv_gop_stat + ps_bit_allocation->i8_cur_gop_num; in ba_gop_info_average_qscale_gop_without_offset()
3121 float get_f_curr_by_sum_subgop(bit_allocation_t *ps_bit_allocation) in get_f_curr_by_sum_subgop() argument
3123 return (ps_bit_allocation->f_curr_by_sum_subgop); in get_f_curr_by_sum_subgop()
3133 WORD32 ba_get_frame_number_in_gop(bit_allocation_t *ps_bit_allocation) in ba_get_frame_number_in_gop() argument
3135 return ((WORD32)(ps_bit_allocation->i8_frm_num_in_gop)); in ba_get_frame_number_in_gop()
3145 float ba_get_qscale_max_clip_in_second_pass(bit_allocation_t *ps_bit_allocation) in ba_get_qscale_max_clip_in_second_pass() argument
3147 return (ps_bit_allocation->f_qscale_max_clip_in_second_pass); in ba_get_qscale_max_clip_in_second_pass()
3158 bit_allocation_t *ps_bit_allocation, float f_average_qscale_1st_pass) in ba_set_avg_qscale_first_pass() argument
3160 ps_bit_allocation->f_average_qscale_1st_pass = f_average_qscale_1st_pass; in ba_set_avg_qscale_first_pass()
3171 bit_allocation_t *ps_bit_allocation, float f_average_qscale_1st_pass) in ba_set_max_avg_qscale_first_pass() argument
3173 ps_bit_allocation->f_max_average_qscale_1st_pass = f_average_qscale_1st_pass; in ba_set_max_avg_qscale_first_pass()
3183 float ba_get_avg_qscale_first_pass(bit_allocation_t *ps_bit_allocation) in ba_get_avg_qscale_first_pass() argument
3185 return (ps_bit_allocation->f_average_qscale_1st_pass); in ba_get_avg_qscale_first_pass()
3195 float ba_get_max_avg_qscale_first_pass(bit_allocation_t *ps_bit_allocation) in ba_get_max_avg_qscale_first_pass() argument
3197 return (ps_bit_allocation->f_max_average_qscale_1st_pass); in ba_get_max_avg_qscale_first_pass()
3208 bit_allocation_t *ps_bit_allocation, WORD32 i4_total_2pass_frames) in bit_alloc_set_2pass_total_frames() argument
3210 ps_bit_allocation->i4_total_2pass_frames = i4_total_2pass_frames; in bit_alloc_set_2pass_total_frames()
3220 WORD32 ba_get_2pass_total_frames(bit_allocation_t *ps_bit_allocation) in ba_get_2pass_total_frames() argument
3222 return (ps_bit_allocation->i4_total_2pass_frames); in ba_get_2pass_total_frames()
3232 void ba_set_enable_look_ahead(bit_allocation_t *ps_bit_allocation, WORD32 i4_fp_bit_alloc_in_sp) in ba_set_enable_look_ahead() argument
3234 ps_bit_allocation->i4_fp_bit_alloc_in_sp = i4_fp_bit_alloc_in_sp; in ba_set_enable_look_ahead()