git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4be288
)
avutil/softfloat: use ldexp(), fixes undefined shift
author
Michael Niedermayer
<michael@niedermayer.cc>
Tue, 2 May 2017 01:56:13 +0000
(
03:56
+0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Tue, 2 May 2017 20:55:44 +0000
(22:55 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavutil/softfloat.h
patch
|
blob
|
history
diff --git
a/libavutil/softfloat.h
b/libavutil/softfloat.h
index
fa91d1e
..
e6d30ad
100644
(file)
--- a/
libavutil/softfloat.h
+++ b/
libavutil/softfloat.h
@@
-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){