Lines Matching refs:ratio

261 static unsigned int get_compensation(int ratio)  in get_compensation()  argument
266 if (ratio == 1 && in get_compensation()
267 cal_data[ratio].confidence >= CONFIDENCE_OK && in get_compensation()
268 cal_data[ratio + 1].confidence >= CONFIDENCE_OK && in get_compensation()
269 cal_data[ratio + 2].confidence >= CONFIDENCE_OK) { in get_compensation()
270 comp = (cal_data[ratio].steady_comp + in get_compensation()
271 cal_data[ratio + 1].steady_comp + in get_compensation()
272 cal_data[ratio + 2].steady_comp) / 3; in get_compensation()
273 } else if (ratio == MAX_TARGET_RATIO - 1 && in get_compensation()
274 cal_data[ratio].confidence >= CONFIDENCE_OK && in get_compensation()
275 cal_data[ratio - 1].confidence >= CONFIDENCE_OK && in get_compensation()
276 cal_data[ratio - 2].confidence >= CONFIDENCE_OK) { in get_compensation()
277 comp = (cal_data[ratio].steady_comp + in get_compensation()
278 cal_data[ratio - 1].steady_comp + in get_compensation()
279 cal_data[ratio - 2].steady_comp) / 3; in get_compensation()
280 } else if (cal_data[ratio].confidence >= CONFIDENCE_OK && in get_compensation()
281 cal_data[ratio - 1].confidence >= CONFIDENCE_OK && in get_compensation()
282 cal_data[ratio + 1].confidence >= CONFIDENCE_OK) { in get_compensation()
283 comp = (cal_data[ratio].steady_comp + in get_compensation()
284 cal_data[ratio - 1].steady_comp + in get_compensation()
285 cal_data[ratio + 1].steady_comp) / 3; in get_compensation()
290 comp = ratio; in get_compensation()
292 if (comp + ratio >= MAX_TARGET_RATIO) in get_compensation()
293 comp = MAX_TARGET_RATIO - ratio - 1; in get_compensation()