diff options
author | Nedeljko Babic <[email protected]> | 2015-04-30 13:51:36 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2015-04-30 14:53:09 +0200 |
commit | 7bab2814753326f74b0f0f158efb250b7f80442c (patch) | |
tree | a1d628b02c69e5869f52c8bd6e18c74357cd2453 | |
parent | a1c7fe431c5077e8bcf78d696c01ef653c34db2c (diff) |
libavutil/softfloat: Added av_normalize_sf in av_add_sf
This will normalize sums for which mantissa is smaller than the lower boundary
(needed for implementation of fixed point aac decoder).
Signed-off-by: Nedeljko Babic <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavutil/softfloat.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h index 5f4ac26ae1..42b3c3ef98 100644 --- a/libavutil/softfloat.h +++ b/libavutil/softfloat.h @@ -105,8 +105,8 @@ static inline av_const int av_cmp_sf(SoftFloat a, SoftFloat b){ static inline av_const SoftFloat av_add_sf(SoftFloat a, SoftFloat b){ int t= a.exp - b.exp; if (t <-31) return b; - else if (t < 0) return av_normalize1_sf((SoftFloat){b.mant + (a.mant >> (-t)), b.exp}); - else if (t < 32) return av_normalize1_sf((SoftFloat){a.mant + (b.mant >> t ), a.exp}); + else if (t < 0) return av_normalize_sf(av_normalize1_sf((SoftFloat){ b.mant + (a.mant >> (-t)), b.exp})); + else if (t < 32) return av_normalize_sf(av_normalize1_sf((SoftFloat){ a.mant + (b.mant >> t ), a.exp})); else return a; } |