aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-07-07 14:47:58 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-11 20:18:46 +0100
commitc96cea0abc5d2dfcc2cf694ad8e7fae2acbbd83a (patch)
tree14da4a2c55341b8047a35f3b15113ab4a187ae51
parent5be942f30ba1e737b2c0a5045b347b6a76616e46 (diff)
downloadffmpeg-c96cea0abc5d2dfcc2cf694ad8e7fae2acbbd83a.tar.gz
avutil/softfloat_ieee754: Fix odd bit position for exponent and sign in av_bits2sf_ieee754()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 82e389d066923412dd945543418e8cb6c63d0997) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavutil/softfloat_ieee754.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/softfloat_ieee754.h b/libavutil/softfloat_ieee754.h
index b8957fb0a9..3398aa18be 100644
--- a/libavutil/softfloat_ieee754.h
+++ b/libavutil/softfloat_ieee754.h
@@ -64,7 +64,7 @@ static inline SoftFloat_IEEE754 av_int2sf_ieee754(int64_t n, int e) {
* by the IEEE 754 spec.
*/
static inline SoftFloat_IEEE754 av_bits2sf_ieee754(uint32_t n) {
- return ((SoftFloat_IEEE754) { (n & 0x80000000UL), (n & 0x7FFFFFUL), (n & 0x7F800000UL) });
+ return ((SoftFloat_IEEE754) { (n & 0x80000000UL) >> 31, (n & 0x7FFFFFUL), (int8_t)((n & 0x7F800000UL) >> 23)});
}
/** Convert the softfloat to integer