diff options
author | James Almer <jamrial@gmail.com> | 2015-07-22 22:10:50 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2015-07-22 23:12:21 -0300 |
commit | a176bbc873b13430c683625744cb15bd659fcd58 (patch) | |
tree | ad49529d802998d94dbf4389495644ce143276e6 /libavutil/softfloat.c | |
parent | 1acb19d12bcd259c3b2be39fb3149ced5916b56e (diff) |
avutil/softfloat: move av_sincos_sf() back to header
Fixes compilation of host tool aacps_fixed_tablegen
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/softfloat.c')
-rw-r--r-- | libavutil/softfloat.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/libavutil/softfloat.c b/libavutil/softfloat.c index 28bea583e1..afce358813 100644 --- a/libavutil/softfloat.c +++ b/libavutil/softfloat.c @@ -23,55 +23,6 @@ #include "common.h" #include "log.h" -void av_sincos_sf(int a, int *s, int *c) -{ - int idx, sign; - int sv, cv; - int st, ct; - - idx = a >> 26; - sign = (idx << 27) >> 31; - cv = av_costbl_1_sf[idx & 0xf]; - cv = (cv ^ sign) - sign; - - idx -= 8; - sign = (idx << 27) >> 31; - sv = av_costbl_1_sf[idx & 0xf]; - sv = (sv ^ sign) - sign; - - idx = a >> 21; - ct = av_costbl_2_sf[idx & 0x1f]; - st = av_sintbl_2_sf[idx & 0x1f]; - - idx = (int)(((int64_t)cv * ct - (int64_t)sv * st + 0x20000000) >> 30); - - sv = (int)(((int64_t)cv * st + (int64_t)sv * ct + 0x20000000) >> 30); - - cv = idx; - - idx = a >> 16; - ct = av_costbl_3_sf[idx & 0x1f]; - st = av_sintbl_3_sf[idx & 0x1f]; - - idx = (int)(((int64_t)cv * ct - (int64_t)sv * st + 0x20000000) >> 30); - - sv = (int)(((int64_t)cv * st + (int64_t)sv * ct + 0x20000000) >> 30); - cv = idx; - - idx = a >> 11; - - ct = (int)(((int64_t)av_costbl_4_sf[idx & 0x1f] * (0x800 - (a & 0x7ff)) + - (int64_t)av_costbl_4_sf[(idx & 0x1f)+1]*(a & 0x7ff) + - 0x400) >> 11); - st = (int)(((int64_t)av_sintbl_4_sf[idx & 0x1f] * (0x800 - (a & 0x7ff)) + - (int64_t)av_sintbl_4_sf[(idx & 0x1f) + 1] * (a & 0x7ff) + - 0x400) >> 11); - - *c = (int)(((int64_t)cv * ct + (int64_t)sv * st + 0x20000000) >> 30); - - *s = (int)(((int64_t)cv * st + (int64_t)sv * ct + 0x20000000) >> 30); -} - #ifdef TEST #include <stdio.h> |