Lines Matching defs:lookup
611 const struct stv0900_table *lookup,
622 if ((lookup == NULL) || (lookup->size <= 0))
629 imax = lookup->size - 1;
630 if (INRANGE(lookup->table[imin].regval, agc_gain,
631 lookup->table[imax].regval)) {
635 if (INRANGE(lookup->table[imin].regval,
637 lookup->table[i].regval))
643 rf_lvl = (s32)agc_gain - lookup->table[imin].regval;
644 rf_lvl *= (lookup->table[imax].realval -
645 lookup->table[imin].realval);
646 rf_lvl /= (lookup->table[imax].regval -
647 lookup->table[imin].regval);
648 rf_lvl += lookup->table[imin].realval;
649 } else if (agc_gain > lookup->table[0].regval)
651 else if (agc_gain < lookup->table[lookup->size-1].regval)
679 const struct stv0900_table *lookup)
704 if ((lookup != NULL) && lookup->size) {
717 imax = lookup->size - 1;
718 if (INRANGE(lookup->table[imin].regval,
720 lookup->table[imax].regval)) {
723 if (INRANGE(lookup->table[imin].regval,
725 lookup->table[i].regval))
731 c_n = ((regval - lookup->table[imin].regval)
732 * (lookup->table[imax].realval
733 - lookup->table[imin].realval)
734 / (lookup->table[imax].regval
735 - lookup->table[imin].regval))
736 + lookup->table[imin].realval;
737 } else if (regval < lookup->table[imin].regval)