Commit 89812809 authored by vaillancour's avatar vaillancour Committed by Sandesh Venkatesh
Browse files

fix for possible assert in guas_enc (1298)

parent 3a087e03
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -169,4 +169,5 @@
#define FIX_1072_SPEEDUP_COMPUTEDIFUSENESS      /* FhG: Minor WMOPS tuning, nonbe */
#define FIX_1320_LOWRATE_ACELP
#define FIX_1297_OVERFLOW                       /* VA: fixes issue with overflows in pre-processing */
#define FIX_1298                                /* VA: fix possible assert in gaus_enc */
#endif
+5 −1
Original line number Diff line number Diff line
@@ -980,9 +980,13 @@ void gauss2v_ivas_fx(
            /* eneri = round_fx(ener[i]) + round_fx(ener[j]) + 2*round_fx(dotprod) */
            /* Use ScalingShift to stay aligned with ener[] */
            eneri = L_shl( dotprod, 1 ); /* One left shift added for factor of 2 */
#ifndef FIX_1298
            eneri = L_add( ener[i], eneri );
            eneri = L_add( ener[j], eneri ); /* Q31 */

#else
            eneri = L_add_sat( ener[i], eneri );
            eneri = L_add_sat( ener[j], eneri ); /* Q31 */
#endif
            lo1 = L_Extract_lc( cor32, &hi1 );
            cor2 = Sad_32( 0, hi1, lo1 ); /* Square + Add */