| 176 | } |
| 177 | |
| 178 | static inline int l2_unscale_group(int steps, int mant, int scale_factor) |
| 179 | { |
| 180 | int shift, mod, val; |
| 181 | |
| 182 | shift = scale_factor_modshift[scale_factor]; |
| 183 | mod = shift & 3; |
| 184 | shift >>= 2; |
| 185 | |
| 186 | val = (mant - (steps >> 1)) * scale_factor_mult2[steps >> 2][mod]; |
| 187 | /* NOTE: at this point, 0 <= shift <= 21 */ |
| 188 | if (shift > 0) |
| 189 | val = (val + (1 << (shift - 1))) >> shift; |
| 190 | return val; |
| 191 | } |
| 192 | |
| 193 | /* compute value^(4/3) * 2^(exponent/4). It normalized to FRAC_BITS */ |
| 194 | static inline int l3_unscale(int value, int exponent) |