Lines Matching refs:ratio
370 static unsigned int get_compensation(int ratio) in get_compensation() argument
378 if (ratio == 1 && in get_compensation()
379 cal_data[ratio].confidence >= CONFIDENCE_OK && in get_compensation()
380 cal_data[ratio + 1].confidence >= CONFIDENCE_OK && in get_compensation()
381 cal_data[ratio + 2].confidence >= CONFIDENCE_OK) { in get_compensation()
382 comp = (cal_data[ratio].steady_comp + in get_compensation()
383 cal_data[ratio + 1].steady_comp + in get_compensation()
384 cal_data[ratio + 2].steady_comp) / 3; in get_compensation()
385 } else if (ratio == MAX_TARGET_RATIO - 1 && in get_compensation()
386 cal_data[ratio].confidence >= CONFIDENCE_OK && in get_compensation()
387 cal_data[ratio - 1].confidence >= CONFIDENCE_OK && in get_compensation()
388 cal_data[ratio - 2].confidence >= CONFIDENCE_OK) { in get_compensation()
389 comp = (cal_data[ratio].steady_comp + in get_compensation()
390 cal_data[ratio - 1].steady_comp + in get_compensation()
391 cal_data[ratio - 2].steady_comp) / 3; in get_compensation()
392 } else if (cal_data[ratio].confidence >= CONFIDENCE_OK && in get_compensation()
393 cal_data[ratio - 1].confidence >= CONFIDENCE_OK && in get_compensation()
394 cal_data[ratio + 1].confidence >= CONFIDENCE_OK) { in get_compensation()
395 comp = (cal_data[ratio].steady_comp + in get_compensation()
396 cal_data[ratio - 1].steady_comp + in get_compensation()
397 cal_data[ratio + 1].steady_comp) / 3; in get_compensation()
401 if (comp + ratio >= MAX_TARGET_RATIO) in get_compensation()
402 comp = MAX_TARGET_RATIO - ratio - 1; in get_compensation()