Browse Source

avutil/softfloat: use ldexp(), fixes undefined shift

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.4
Michael Niedermayer 8 years ago
parent
commit
79aa2ff199
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      libavutil/softfloat.h

+ 1
- 2
libavutil/softfloat.h View File

@@ -50,8 +50,7 @@ static const SoftFloat FLOAT_0999999 = { 0x3FFFFBCE, 0};
*/
static inline av_const double av_sf2double(SoftFloat v) {
v.exp -= ONE_BITS +1;
if(v.exp > 0) return (double)v.mant * (double)(1 << v.exp);
else return (double)v.mant / (double)(1 << (-v.exp));
return ldexp(v.mant, v.exp);
}

static av_const SoftFloat av_normalize_sf(SoftFloat a){


Loading…
Cancel
Save