Commit c592b565 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fixes stv crash issue due to Assertion issue caused by L_shl in sub function of hq_core_dec_fx()

[x] The crash occurs due to assertion issue
caused by L_shl for values just above 0.5 in Q27
when left shifted by 5, which was not handled in
the EVS implemented hq_generic_decoding_fx().
The order of multiply and left shift was altered
with which issue was resolved. If issue occurs
again, copy of hq_bwe_fx and hq_generic_decoding_fx
for IVAS needs to be created.
parent b1674aea
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2938,7 +2938,11 @@ void hq_generic_decoding_fx(
		tmp4_fx = mult_r(tmp3_fx, 1638);
		WHILE(tmp3_fx > 1024)
		{
#ifdef EVS_FUNC_MODIFIED
			L_tmp1 = L_shl(Mult_32_16(*pit1_fx , tmp3_fx), 5);      /*15 + 5 + 10 -15 */
#else
			L_tmp1 = Mult_32_16(L_shl(*pit1_fx, 5), tmp3_fx);      /*15 + 5 + 10 -15 */
#endif
			*pit1_fx-- = L_tmp1;
			move32();
			tmp3_fx = sub(tmp3_fx, tmp4_fx);