summaryrefslogtreecommitdiff
path: root/libavutil/softfloat_ieee754.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-07-07 14:47:58 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-07-21 11:26:36 +0200
commit82e389d066923412dd945543418e8cb6c63d0997 (patch)
treeb7983c584f24cf6bafd18fd24ddfd005cc8aeda7 /libavutil/softfloat_ieee754.h
parentb880b3b236ddd00f85ea502b4c17a145fd26c790 (diff)
downloadffmpeg-82e389d066923412dd945543418e8cb6c63d0997.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>
Diffstat (limited to 'libavutil/softfloat_ieee754.h')
-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