Commit d000e66c authored by Andreas Cadhalpun's avatar Andreas Cadhalpun

softfloat: handle -INT_MAX correctly

This is similar to commit 9ac61e73.
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 0edd5694)
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
parent 52d8c1e4
...@@ -175,7 +175,7 @@ static inline av_const SoftFloat av_sub_sf(SoftFloat a, SoftFloat b){ ...@@ -175,7 +175,7 @@ static inline av_const SoftFloat av_sub_sf(SoftFloat a, SoftFloat b){
*/ */
static inline av_const SoftFloat av_int2sf(int v, int frac_bits){ static inline av_const SoftFloat av_int2sf(int v, int frac_bits){
int exp_offset = 0; int exp_offset = 0;
if(v == INT_MIN){ if(v <= INT_MIN + 1){
exp_offset = 1; exp_offset = 1;
v>>=1; v>>=1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment