comparison g726.c @ 7051:4f1331b0d428 libavcodec

simplify
author michael
date Mon, 16 Jun 2008 23:31:23 +0000
parents ecb7071103af
children 80ead68858f3
comparison
equal deleted inserted replaced
7050:ecb7071103af 7051:4f1331b0d428
50 static inline int16_t mult(Float11* f1, Float11* f2) 50 static inline int16_t mult(Float11* f1, Float11* f2)
51 { 51 {
52 int res, exp; 52 int res, exp;
53 53
54 exp = f1->exp + f2->exp; 54 exp = f1->exp + f2->exp;
55 res = (((f1->mant * f2->mant) + 0x30) >> 4) << 7; 55 res = (((f1->mant * f2->mant) + 0x30) >> 4);
56 res = exp > 26 ? res << (exp - 26) : res >> (26 - exp); 56 res = exp > 19 ? res << (exp - 19) : res >> (19 - exp);
57 return (f1->sign ^ f2->sign) ? -res : res; 57 return (f1->sign ^ f2->sign) ? -res : res;
58 } 58 }
59 59
60 static inline int sgn(int value) 60 static inline int sgn(int value)
61 { 61 {