Underflow observed in the quantize_pars_fx() function in the MC param upmix
Bug Description
When running the MC param upmix in the BASOP encoder, an underflow occurs on line 504 in ivas_mc_paramupmix_enc_fx.c
inside the function quantize_pars_fx()
:
Word16 exp_var2 = 0;
move16();
Word32 var2 = BASOP_Util_Add_Mant32Exp(v_fx[iv], exp_v, L_negate(data_fx[iq1]), 31 - Q28, &exp_var2);
var2 = L_abs(var2);
In frame 77 (and others), the value of var2
reaches the minimum 32-bit integer value (-2147483648
). Passing it to the L_abs()
function results in 2147483647
due to integer underflow.
- Fixed point:
- Encoder (fixed): 012d3489
Ways to reproduce
./IVAS_cod -mc 7_1_4 160000 48 tv/stv714MC48c.wav bit
This issue has been first observed and reported in !1229 (merged)