Lines Matching refs:ratio
260 static unsigned int get_compensation(int ratio) in get_compensation() argument
265 if (ratio == 1 && in get_compensation()
266 cal_data[ratio].confidence >= CONFIDENCE_OK && in get_compensation()
267 cal_data[ratio + 1].confidence >= CONFIDENCE_OK && in get_compensation()
268 cal_data[ratio + 2].confidence >= CONFIDENCE_OK) { in get_compensation()
269 comp = (cal_data[ratio].steady_comp + in get_compensation()
270 cal_data[ratio + 1].steady_comp + in get_compensation()
271 cal_data[ratio + 2].steady_comp) / 3; in get_compensation()
272 } else if (ratio == MAX_TARGET_RATIO - 1 && in get_compensation()
273 cal_data[ratio].confidence >= CONFIDENCE_OK && in get_compensation()
274 cal_data[ratio - 1].confidence >= CONFIDENCE_OK && in get_compensation()
275 cal_data[ratio - 2].confidence >= CONFIDENCE_OK) { in get_compensation()
276 comp = (cal_data[ratio].steady_comp + in get_compensation()
277 cal_data[ratio - 1].steady_comp + in get_compensation()
278 cal_data[ratio - 2].steady_comp) / 3; in get_compensation()
279 } else if (cal_data[ratio].confidence >= CONFIDENCE_OK && in get_compensation()
280 cal_data[ratio - 1].confidence >= CONFIDENCE_OK && in get_compensation()
281 cal_data[ratio + 1].confidence >= CONFIDENCE_OK) { in get_compensation()
282 comp = (cal_data[ratio].steady_comp + in get_compensation()
283 cal_data[ratio - 1].steady_comp + in get_compensation()
284 cal_data[ratio + 1].steady_comp) / 3; in get_compensation()
288 if (comp + ratio >= MAX_TARGET_RATIO) in get_compensation()
289 comp = MAX_TARGET_RATIO - ratio - 1; in get_compensation()