mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
libavutil/softfloat: Fix av_normalize1_sf bias.
av_normalize1_sf doesn't properly address border case when mantis is exactly -0x40000000. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a213e57cef
commit
7131aba916
@ -60,7 +60,7 @@ static av_const SoftFloat av_normalize_sf(SoftFloat a){
|
|||||||
|
|
||||||
static inline av_const SoftFloat av_normalize1_sf(SoftFloat a){
|
static inline av_const SoftFloat av_normalize1_sf(SoftFloat a){
|
||||||
#if 1
|
#if 1
|
||||||
if((int32_t)(a.mant + 0x40000000U) < 0){
|
if((int32_t)(a.mant + 0x40000000U) <= 0){
|
||||||
a.exp++;
|
a.exp++;
|
||||||
a.mant>>=1;
|
a.mant>>=1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user