diff mbox

[FFmpeg-devel,5/5] avutil/softfloat_ieee754: Fix odd bit position for exponent and sign in av_bits2sf_ieee754()

Message ID 20190707131814.24504-5-michael@niedermayer.cc
State Accepted
Commit 82e389d066923412dd945543418e8cb6c63d0997
Headers show

Commit Message

Michael Niedermayer July 7, 2019, 1:18 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavutil/softfloat_ieee754.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer July 21, 2019, 9:20 a.m. UTC | #1
On Sun, Jul 07, 2019 at 03:18:14PM +0200, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavutil/softfloat_ieee754.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]
diff mbox

Patch

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