Change-Id: I4bd635949240880ced5f581c24e981ccd0374e40
static const double cq_adjust_threshold = 0.5;
int active_cq_level = oxcf->cq_level;
if (oxcf->rc_mode == RC_MODE_CONSTRAINED_QUALITY) {
- const double x = rc->total_actual_bits / rc->total_target_bits;
+ const double x = (double)rc->total_actual_bits / rc->total_target_bits;
if (x < cq_adjust_threshold) {
- active_cq_level = active_cq_level * x / cq_adjust_threshold;
+ active_cq_level = (int)(active_cq_level * x / cq_adjust_threshold);
}
}
return active_cq_level;