aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorNedeljko Babic <nedeljko.babic@imgtec.com>2015-04-30 13:51:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-30 14:53:09 +0200
commit7bab2814753326f74b0f0f158efb250b7f80442c (patch)
treea1d628b02c69e5869f52c8bd6e18c74357cd2453 /libavutil
parenta1c7fe431c5077e8bcf78d696c01ef653c34db2c (diff)
downloadffmpeg-7bab2814753326f74b0f0f158efb250b7f80442c.tar.gz
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 <nedeljko.babic@imgtec.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/softfloat.h4
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;
}