mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
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>
This commit is contained in:
parent
f02de2f599
commit
61632a78db
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user