Commit a1754579 authored by vaillancour's avatar vaillancour
Browse files

fixes SWB content...

parent ca3f1d78
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1484,7 +1484,9 @@ Word32 Norm32Norm(const Word32 *x, const Word16 headroom, const Word16 length, W
{
    Word32 L_tmp, L_tmp2;
    Word16 i, shift, tmp;

#ifdef BASOP_NOGLOB
    Flag Overflow = 0;
#endif
    move16();
    shift = headroom;

@@ -1496,8 +1498,13 @@ Word32 Norm32Norm(const Word32 *x, const Word16 headroom, const Word16 length, W
        if (L_tmp2 >= 0) shift = sub(shift,1);
        if (L_tmp2 >= 0) L_tmp = L_shr(L_tmp, 2);

#ifdef BASOP_NOGLOB
        tmp = round_fx_o(L_shl_o(x[i], shift, &Overflow), &Overflow);
        L_tmp = L_mac0_o(L_tmp, tmp, tmp, &Overflow); /* exponent = (1-shift*2) , Q(30+shift*2) */
#else
        tmp = round_fx(L_shl(x[i], shift));
        L_tmp = L_mac0(L_tmp, tmp, tmp); /* exponent = (1-shift*2) , Q(30+shift*2) */
#endif
    }

    move16();
+7 −1
Original line number Diff line number Diff line
@@ -30,7 +30,9 @@ void AVQ_cod_fx( /* o: comfort noise gain factor */
    Word16 ebits[NSV_MAX], e_ebits, f_ebits, e_tmp,f_tmp, tmp16, l_8;
    Word32 Lener, Ltmp, Lgain, x1[8];
    Word16 tot_est_bits, Q_in;

#ifdef BASOP_NOGLOB
    Flag Overflow = 0;
#endif
    Q_in = sub(Q_in_ref,1);
    move16();

@@ -46,7 +48,11 @@ void AVQ_cod_fx( /* o: comfort noise gain factor */
            Lener = L_shl(4,shl(Q_in,1)); /* to set ebits >= 0 */
            FOR (i=0; i<8; i++)
            {
#ifdef BASOP_NOGLOB
                Lener = L_mac_o(Lener, xri[l*8+i], xri[l*8+i], &Overflow);
#else
                Lener = L_mac(Lener, xri[l*8+i], xri[l*8+i]);
#endif
            }
            /* estimated bit consumption when gain=1 */
            /* ebits[l] = 5.0 * FAC_LOG2 * (Word16)log10(ener * 0.5) */
+8 −0
Original line number Diff line number Diff line
@@ -113,6 +113,9 @@ void swb_bwe_enc_hr_fx(
    Word32 L_t_audio_tmp_fx[N_BANDS_BWE_HR*WIDTH_NONTRANS_FREQ_COEF];
#else
    Word32 L_t_audio_tmp_fx[L_FRAME48k];
#endif
#ifdef BASOP_NOGLOB
    Flag Overflow = 0;
#endif
    FD_BWE_ENC_HANDLE hBWE_FD = st_fx->hBWE_FD;
    BSTR_ENC_HANDLE hBstr = st_fx->hBstr;
@@ -767,8 +770,13 @@ void swb_bwe_enc_hr_fx(
            FOR( i=0; i<Nsv2*WIDTH_BAND; i++ )
            {
                L_tmp = L_mult(temp, t_audio_fx[i]);
#ifdef BASOP_NOGLOB
                L_tmp = L_shr_o(L_tmp, temp2, &Overflow);
                t_audio_fx[i] = round_fx_o(L_tmp, &Overflow);
#else
                L_tmp = L_shr(L_tmp, temp2);
                t_audio_fx[i] = round_fx(L_tmp);
#endif
            }

            set16_fx( nq2, 0, Nsv );