Commit 2e8cf2df authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

LTV test for issue fix 1404

parent 6bb2c5bd
Loading
Loading
Loading
Loading
Loading
+22 −22
Original line number Diff line number Diff line
@@ -22050,27 +22050,8 @@ const Word32 sigma_BWE_fx[] = {//Q31
40792208 }; /* for 3 bits first stage */
const Word16 inv_modified_sigma_BWE_fx[] = {//Q1
  259,
254,
267,
266,
293,
315,
598,
622,
288,
288,
297,
297,
319,
346,
598,
622
};
const Word16 modified_sigma_BWE_fx[] =//Q(log2(2.56)
{ 323,
const Word16 inv_modified_sigma_BWE_fx[] = {//x2.56
323,
329,
313,
314,
@@ -22085,7 +22066,26 @@ const Word16 modified_sigma_BWE_fx[] =//Q(log2(2.56)
262,
242,
140,
134 };
134
};
const Word16 modified_sigma_BWE_fx[] =//Q15
{  259,
254,
267,
266,
293,
315,
598,
622,
288,
288,
297,
297,
319,
346,
598,
622 };
 
const Word16 SHB_LSF_mean_fx[10] = {//Q15
+5 −5
Original line number Diff line number Diff line
@@ -1876,7 +1876,7 @@ void CNG_enc_ivas_fx(
    {
        E_LPC_f_lsp_a_conversion( hDtxEnc->lspCNG_fx, Aq, M );
        exp = sub( Q14, norm_s( Aq[0] ) );
        Scale_sig( Aq, M, sub( Q12, exp ) ); // Q12
        Scale_sig( Aq, M + 1, sub( Q12, exp ) ); // Q12
    }

    tmp_loop = shr( st_fx->L_frame, 6 );
@@ -1986,19 +1986,19 @@ void CNG_enc_ivas_fx(
            move16();
            BREAK;
        case L_FRAME32k:
            inv_frame_len = ONE_BY_L_FRAME48k_Q31;
            inv_frame_len = ONE_BY_L_FRAME32k_Q31;
            move16();
            BREAK;
        case L_FRAME16k:
            inv_frame_len = ONE_BY_L_FRAME48k_Q31;
            inv_frame_len = ONE_BY_L_FRAME16k_Q31;
            move16();
            BREAK;
        case L_FRAME8k:
            inv_frame_len = ONE_BY_L_FRAME48k_Q31;
            inv_frame_len = ONE_BY_L_FRAME8k_Q31;
            move16();
            BREAK;
        case L_FRAME4k:
            inv_frame_len = ONE_BY_L_FRAME48k_Q31;
            inv_frame_len = ONE_BY_L_FRAME4k_Q31;
            move16();
            BREAK;
        default:
+15 −16
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ static void ivas_binaural_reverb_setReverbTimes_fx(
    Word16 tmp, tmp_exp, scale, tmpVal_exp, attenuationFactorPerSample_exp, attenuationFactorPerSampleSq_exp, energyBuildup_exp, currentEnergy_exp, intendedEnergy_exp, actualizedEnergy_exp;
    Word16 sine_inp, norm, div_exp1, div1, sine, binCenterFreq_exp;
    Word16 reverb_exp = 0;
    Word32 tmp32;
    move16();

    hReverb->binRend_RandNext = (UWord16) BIN_REND_RANDOM_SEED;
@@ -376,14 +377,13 @@ static void ivas_binaural_reverb_setReverbTimes_fx(

                UWord16 ret_binRend = binRend_rand( hReverb );

                tmp = BASOP_Util_Divide3232_Scale( ret_binRend, PCM16_TO_FLT_FAC_FX, &tmp_exp );
                L_tmp = BASOP_Util_Add_Mant32Exp( L_deposit_h( tmp ), tmp_exp, L_negate( 1073741824 ), 0, &exp );
                L_tmp = Mpy_32_32( L_tmp, 214748364 ); // exp + 0
                tmp32 = BASOP_Util_Divide3232_Scale_cadence( ret_binRend, PCM16_TO_FLT_FAC_FX, &tmp_exp );
                L_tmp = BASOP_Util_Add_Mant32Exp( tmp32, tmp_exp, L_negate( 1073741824 ), 0, &exp );
                L_tmp = Mpy_32_32( L_tmp, 214748365 ); // exp + 0
                L_tmp = BASOP_Util_Add_Mant32Exp( L_tmp, exp, currentEnergy_fx, currentEnergy_exp, &exp );
                energyBuildup_fx = BASOP_Util_Add_Mant32Exp( energyBuildup_fx, energyBuildup_exp, L_tmp, exp, &energyBuildup_exp );
                IF( energyBuildup_fx >= 0 ) /* A new filter tap is added at this condition */
                {
                    IF( ( BASOP_Util_Cmp_Mant32Exp( energyBuildup_fx, energyBuildup_exp, 1, 31 ) > 0 ) )

                IF( ( BASOP_Util_Cmp_Mant32Exp( energyBuildup_fx, energyBuildup_exp, 1, 31 ) >= 0 ) )
                {
                    /* Four efficient phase operations: n*pi/2, n=0,1,2,3 */
                    hReverb->tapPhaseShiftType[bin][ch][tap] = (Word16) ( binRend_rand( hReverb ) % 4 );
@@ -399,7 +399,6 @@ static void ivas_binaural_reverb_setReverbTimes_fx(

                    actualizedEnergy_fx = BASOP_Util_Add_Mant32Exp( actualizedEnergy_fx, actualizedEnergy_exp, 1073741824, 1, &actualizedEnergy_exp );
                }
                }

                currentEnergy_fx = BASOP_Util_Add_Mant32Exp( currentEnergy_fx, currentEnergy_exp, 0, 0, &currentEnergy_exp );
                currentEnergy_fx = Mpy_32_32( currentEnergy_fx, attenuationFactorPerSampleSq_fx );