Lines Matching refs:arg
87 static inline struct fixed31_32 dc_fixpt_from_int(int arg) in dc_fixpt_from_int() argument
91 res.value = (long long) arg << FIXED31_32_BITS_PER_FRACTIONAL_PART; in dc_fixpt_from_int()
105 static inline struct fixed31_32 dc_fixpt_neg(struct fixed31_32 arg) in dc_fixpt_neg() argument
109 res.value = -arg.value; in dc_fixpt_neg()
118 static inline struct fixed31_32 dc_fixpt_abs(struct fixed31_32 arg) in dc_fixpt_abs() argument
120 if (arg.value < 0) in dc_fixpt_abs()
121 return dc_fixpt_neg(arg); in dc_fixpt_abs()
123 return arg; in dc_fixpt_abs()
189 struct fixed31_32 arg, in dc_fixpt_clamp() argument
193 if (dc_fixpt_le(arg, min_value)) in dc_fixpt_clamp()
195 else if (dc_fixpt_le(max_value, arg)) in dc_fixpt_clamp()
198 return arg; in dc_fixpt_clamp()
210 static inline struct fixed31_32 dc_fixpt_shl(struct fixed31_32 arg, unsigned char shift) in dc_fixpt_shl() argument
212 ASSERT(((arg.value >= 0) && (arg.value <= LLONG_MAX >> shift)) || in dc_fixpt_shl()
213 ((arg.value < 0) && (arg.value >= ~(LLONG_MAX >> shift)))); in dc_fixpt_shl()
215 arg.value = arg.value << shift; in dc_fixpt_shl()
217 return arg; in dc_fixpt_shl()
224 static inline struct fixed31_32 dc_fixpt_shr(struct fixed31_32 arg, unsigned char shift) in dc_fixpt_shr() argument
226 bool negative = arg.value < 0; in dc_fixpt_shr()
229 arg.value = -arg.value; in dc_fixpt_shr()
230 arg.value = arg.value >> shift; in dc_fixpt_shr()
232 arg.value = -arg.value; in dc_fixpt_shr()
233 return arg; in dc_fixpt_shr()
317 struct fixed31_32 dc_fixpt_sqr(struct fixed31_32 arg);
349 struct fixed31_32 dc_fixpt_recip(struct fixed31_32 arg);
364 struct fixed31_32 dc_fixpt_sinc(struct fixed31_32 arg);
374 struct fixed31_32 dc_fixpt_sin(struct fixed31_32 arg);
386 struct fixed31_32 dc_fixpt_cos(struct fixed31_32 arg);
400 struct fixed31_32 dc_fixpt_exp(struct fixed31_32 arg);
412 struct fixed31_32 dc_fixpt_log(struct fixed31_32 arg);
446 static inline int dc_fixpt_floor(struct fixed31_32 arg) in dc_fixpt_floor() argument
448 unsigned long long arg_value = arg.value > 0 ? arg.value : -arg.value; in dc_fixpt_floor()
450 if (arg.value >= 0) in dc_fixpt_floor()
460 static inline int dc_fixpt_round(struct fixed31_32 arg) in dc_fixpt_round() argument
462 unsigned long long arg_value = arg.value > 0 ? arg.value : -arg.value; in dc_fixpt_round()
470 if (arg.value >= 0) in dc_fixpt_round()
480 static inline int dc_fixpt_ceil(struct fixed31_32 arg) in dc_fixpt_ceil() argument
482 unsigned long long arg_value = arg.value > 0 ? arg.value : -arg.value; in dc_fixpt_ceil()
491 if (arg.value >= 0) in dc_fixpt_ceil()
503 unsigned int dc_fixpt_u4d19(struct fixed31_32 arg);
505 unsigned int dc_fixpt_u3d19(struct fixed31_32 arg);
507 unsigned int dc_fixpt_u2d19(struct fixed31_32 arg);
509 unsigned int dc_fixpt_u0d19(struct fixed31_32 arg);
511 unsigned int dc_fixpt_clamp_u0d14(struct fixed31_32 arg);
513 unsigned int dc_fixpt_clamp_u0d10(struct fixed31_32 arg);
515 int dc_fixpt_s4d19(struct fixed31_32 arg);
517 static inline struct fixed31_32 dc_fixpt_truncate(struct fixed31_32 arg, unsigned int frac_bits) in dc_fixpt_truncate() argument
519 bool negative = arg.value < 0; in dc_fixpt_truncate()
523 return arg; in dc_fixpt_truncate()
527 arg.value = -arg.value; in dc_fixpt_truncate()
528 arg.value &= (~0ULL) << (FIXED31_32_BITS_PER_FRACTIONAL_PART - frac_bits); in dc_fixpt_truncate()
530 arg.value = -arg.value; in dc_fixpt_truncate()
531 return arg; in dc_fixpt_truncate()