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

fixes to overflow in preprocessing

parent 6e315e53
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -168,4 +168,5 @@
#define FIX_1072_SPEEDUP_gainpanning            /* FhG: Minor WMOPS tuning, nonbe */
#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 */
#endif
+4 −0
Original line number Diff line number Diff line
@@ -1647,7 +1647,11 @@ static void edge_detect_fx(
        }
    }

#ifndef FIX_1297_OVERFLOW
    *edge_str = extract_l( L_shr( edge_min, 10 ) ); // Q15
#else
    *edge_str = extract_h( L_shl_sat( edge_min, 16 - 10 ) ); // Q15
#endif
    move16();
    *edge_type = et; // Q0
    move16();
+9 −2
Original line number Diff line number Diff line
@@ -2303,14 +2303,21 @@ Word16 ivas_smc_gmm_fx(
        *high_lpn_flag = 1;
        move32();
    }

#ifndef FIX_1297_OVERFLOW
    hSpMusClas->lpm_fx = extract_l( L_shr( lpm_fx, 11 ) ); // Q7
    move16();
    hSpMusClas->lps_fx = extract_l( L_shr( lps_fx, 11 ) ); // Q7
    move16();
    hSpMusClas->lpn_fx = extract_l( L_shr( lpn_fx, 11 ) ); // Q7
    move16();

#else
    hSpMusClas->lpm_fx = extract_h( L_shl_sat( lpm_fx, 16 - 11 ) ); // Q7
    move16();
    hSpMusClas->lps_fx = extract_h( L_shl_sat( lps_fx, 16 - 11 ) ); // Q7
    move16();
    hSpMusClas->lpn_fx = extract_h( L_shl_sat( lpn_fx, 16 - 11 ) ); // Q7
    move16();
#endif
    /* determine HQ Generic speech class */
    IF( st->hHQ_core != NULL )
    {