Lines Matching refs:frac
685 u32 *mant, u32 *frac, u32 *rep) in sh_veu_calc_scale() argument
690 *rep = *mant = *frac = 0; in sh_veu_calc_scale()
702 *frac = (fixpoint - (*mant * 4096)) & ~0x07; in sh_veu_calc_scale()
704 switch (*frac) { in sh_veu_calc_scale()
721 *frac = fixpoint - (*mant * 4096); in sh_veu_calc_scale()
723 if (*frac & 0x07) { in sh_veu_calc_scale()
728 *frac &= ~0x07; in sh_veu_calc_scale()
730 *frac -= 8; /* round down if scaling up */ in sh_veu_calc_scale()
732 *frac += 8; /* round up if scaling down */ in sh_veu_calc_scale()
739 u32 mant, frac, value, rep; in sh_veu_scale_v() local
741 sh_veu_calc_scale(veu, size_in, size_out, crop_out, &mant, &frac, &rep); in sh_veu_scale_v()
745 (((mant << 12) | frac) << 16); in sh_veu_scale_v()
761 u32 mant, frac, value, rep; in sh_veu_scale_h() local
763 sh_veu_calc_scale(veu, size_in, size_out, crop_out, &mant, &frac, &rep); in sh_veu_scale_h()
767 (mant << 12) | frac; in sh_veu_scale_h()