Loading lib_enc/detect_transient_fx.c +4 −1 Original line number Diff line number Diff line Loading @@ -216,8 +216,11 @@ Word16 detect_transient_fx( Overflow = 0; move16(); #ifdef BASOP_NOGLOB /* shift is >= 0, not overflow possible for shr */ Energy = L_add_o(L_shr(L_tmp, shift), L_shr(L_tmp2, shift), &Overflow); #else Energy = L_add(L_shr(L_tmp, shift), L_shr(L_tmp2, shift)); #endif test(); IF( EQ_16(st_fx->extl_fx,SWB_BWE)||EQ_16(st_fx->extl_fx,FB_BWE)) { Loading lib_enc/find_tar_fx.c +20 −0 Original line number Diff line number Diff line Loading @@ -102,7 +102,11 @@ void find_targets_fx( Ltmp = L_mult(Ap[i], s2); FOR (j = 1; j <= i; j++) { #ifdef BASOP_NOGLOB Ltmp = L_msu_o(Ltmp, Aqs[j], h1[i - j], &Overflow); #else Ltmp = L_msu(Ltmp, Aqs[j], h1[i-j]); #endif } #ifdef BASOP_NOGLOB h1[i] = round_fx_o(L_shl_o(Ltmp, s, &Overflow), &Overflow); Loading @@ -113,9 +117,17 @@ void find_targets_fx( Ltmp = L_mult(Ap[i], s2); FOR (j = 1; j <= M; j++) { #ifdef BASOP_NOGLOB Ltmp = L_msu_o(Ltmp, Aqs[j], h1[i-j], &Overflow); #else Ltmp = L_msu(Ltmp, Aqs[j], h1[i-j]); #endif } #ifdef BASOP_NOGLOB h1[M] = round_fx_o(L_shl_o(Ltmp, s, &Overflow), &Overflow); #else h1[M] = round_fx(L_shl(Ltmp, s)); #endif PMT("should we used extended basop here for when the L_subfr > L_SUBFR, to prevent saturation/overflow and the subsequent loop\n") FOR (i=M+1; i < L_subfr; i++) Loading @@ -123,9 +135,17 @@ PMT("should we used extended basop here for when the L_subfr > L_SUBFR, to preve Ltmp = L_msu(0, Aqs[1], h1[i-1]); FOR (j = 2; j <= M; j++) { #ifdef BASOP_NOGLOB Ltmp = L_msu_o(Ltmp, Aqs[j], h1[i-j], &Overflow); #else Ltmp = L_msu(Ltmp, Aqs[j], h1[i-j]); #endif } #ifdef BASOP_NOGLOB h1[i] = round_fx_o(L_shl_o(Ltmp, s, &Overflow), &Overflow); #else h1[i] = round_fx(L_shl(Ltmp, s)); #endif } IF(Overflow) { Loading Loading
lib_enc/detect_transient_fx.c +4 −1 Original line number Diff line number Diff line Loading @@ -216,8 +216,11 @@ Word16 detect_transient_fx( Overflow = 0; move16(); #ifdef BASOP_NOGLOB /* shift is >= 0, not overflow possible for shr */ Energy = L_add_o(L_shr(L_tmp, shift), L_shr(L_tmp2, shift), &Overflow); #else Energy = L_add(L_shr(L_tmp, shift), L_shr(L_tmp2, shift)); #endif test(); IF( EQ_16(st_fx->extl_fx,SWB_BWE)||EQ_16(st_fx->extl_fx,FB_BWE)) { Loading
lib_enc/find_tar_fx.c +20 −0 Original line number Diff line number Diff line Loading @@ -102,7 +102,11 @@ void find_targets_fx( Ltmp = L_mult(Ap[i], s2); FOR (j = 1; j <= i; j++) { #ifdef BASOP_NOGLOB Ltmp = L_msu_o(Ltmp, Aqs[j], h1[i - j], &Overflow); #else Ltmp = L_msu(Ltmp, Aqs[j], h1[i-j]); #endif } #ifdef BASOP_NOGLOB h1[i] = round_fx_o(L_shl_o(Ltmp, s, &Overflow), &Overflow); Loading @@ -113,9 +117,17 @@ void find_targets_fx( Ltmp = L_mult(Ap[i], s2); FOR (j = 1; j <= M; j++) { #ifdef BASOP_NOGLOB Ltmp = L_msu_o(Ltmp, Aqs[j], h1[i-j], &Overflow); #else Ltmp = L_msu(Ltmp, Aqs[j], h1[i-j]); #endif } #ifdef BASOP_NOGLOB h1[M] = round_fx_o(L_shl_o(Ltmp, s, &Overflow), &Overflow); #else h1[M] = round_fx(L_shl(Ltmp, s)); #endif PMT("should we used extended basop here for when the L_subfr > L_SUBFR, to prevent saturation/overflow and the subsequent loop\n") FOR (i=M+1; i < L_subfr; i++) Loading @@ -123,9 +135,17 @@ PMT("should we used extended basop here for when the L_subfr > L_SUBFR, to preve Ltmp = L_msu(0, Aqs[1], h1[i-1]); FOR (j = 2; j <= M; j++) { #ifdef BASOP_NOGLOB Ltmp = L_msu_o(Ltmp, Aqs[j], h1[i-j], &Overflow); #else Ltmp = L_msu(Ltmp, Aqs[j], h1[i-j]); #endif } #ifdef BASOP_NOGLOB h1[i] = round_fx_o(L_shl_o(Ltmp, s, &Overflow), &Overflow); #else h1[i] = round_fx(L_shl(Ltmp, s)); #endif } IF(Overflow) { Loading