Commit 696efd2f authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

ltv test - rebasing

parent 0224a2a8
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2617,7 +2617,7 @@ ivas_error ivas_jbm_dec_flush_renderer_fx(
        move16();
        move16();

        FOR( ch_idx = 0; ch_idx < MAX_CICP_CHANNELS; ch_idx++ )
        FOR( ch_idx = 0; ch_idx < ( MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS ); ch_idx++ )
        {
            p_output_fx[ch_idx] = output_fx[ch_idx];
        }
+2 −2
Original line number Diff line number Diff line
@@ -814,7 +814,7 @@ void enc_pit_exc_ivas_fx(
            /*-----------------------------------------------------------------*
             * Gain encoding
             *-----------------------------------------------------------------*/
            gain_enc_mless_ivas_fx( hBstr, st_fx->acelp_cfg.gains_mode, st_fx->element_mode, L_FRAME, i_subfr, -1, xn, y1, sub( shift_wsp, 1 ), y2, code, Es_pred,
            gain_enc_mless_ivas_fx( hBstr, st_fx->acelp_cfg.gains_mode, st_fx->element_mode, st_fx->L_frame, i_subfr, -1, xn, y1, sub( shift_wsp, 1 ), y2, code, Es_pred,
                                    &gain_pit, &gain_code, &gain_inov, &norm_gain_code, g_corr, clip_gain );
        }
        gp_clip_test_gain_pit_fx( st_fx->element_mode, st_fx->core_brate, gain_pit, st_fx->clip_var_fx );
@@ -823,7 +823,7 @@ void enc_pit_exc_ivas_fx(
        gcode16 = round_fx_sat( Lgcode );
        IF( use_fcb != 0 )
        {
            hLPDmem->tilt_code = est_tilt_ivas_fx( &exc[i_subfr], gain_pit, code, gain_code, &voice_fac, Q_new, L_SUBFR, 0 ); // Q15
            hLPDmem->tilt_code = est_tilt_ivas_fx( &exc[i_subfr], gain_pit, code, gain_code, &voice_fac, Q_new, L_subfr, 0 ); // Q15
            move16();
        }
        ELSE
+5 −0
Original line number Diff line number Diff line
@@ -192,6 +192,11 @@ void diffuse_meta_merge_1x1_fx(
            tmp = BASOP_Util_Divide3232_Scale( total_diff_nrg_fx, L_add( total_nrg_fx, EPSILON_FX ), &scale );
            L_tmp1 = L_deposit_h( tmp ); /* Q( 31 - ( scale + total_nrg_e - total_diff_nrg_e ) ) */
            scale = add( scale, sub( total_diff_nrg_e, total_nrg_e ) );
            if ( L_tmp1 == 0 )
            {
                scale = 30;
                move16();
            }
            L_tmp2 = L_sub( L_shl( 1, scale ), L_tmp1 );

            L_tmp1 = BASOP_Util_Add_Mant32Exp( dir_ratio_ism_fx, dir_ratio_ism_e, L_tmp2, scale, &tmp );
+25 −16
Original line number Diff line number Diff line
@@ -952,7 +952,7 @@ void ivas_mcmasa_param_est_ana_fx(
                temp2 = L_add( temp2, EPSILON_FX );
                lsEnergyRelation_fx = BASOP_Util_Divide3232_Scale( temp1, temp2, &lsEnergyRelation_e );
                lsEnergyRelation_e = add( lsEnergyRelation_e, sub( temp1_e, temp2_e ) );
                lsEnergyRelation_fx = L_shl( lsEnergyRelation_fx, add( 16, lsEnergyRelation_e ) ); // Q31
                lsEnergyRelation_fx = L_shl_sat( lsEnergyRelation_fx, add( 16, lsEnergyRelation_e ) ); // Q31
                stereoness_fx = Mult_32_32( stereoCoh_fx, lsEnergyRelation_fx );
                stereoness_e = stereoCoh_e;
                move16();
@@ -1105,12 +1105,12 @@ void ivas_mcmasa_param_est_ana_fx(
                lsEnergySum_fx = L_add_sat( lsEnergySum_fx, EPSILON_FX );
                lsEnergyRelation_fx = BASOP_Util_Divide3232_Scale( temp1, lsEnergySum_fx, &lsEnergyRelation_e );
                lsEnergyRelation_e = add( lsEnergyRelation_e, sub( temp1_e, lsEnergySum_e ) );
                lsEnergyRelation_fx = L_shl( lsEnergyRelation_fx, add( 16, lsEnergyRelation_e ) );                               // Q31
                lsEnergyRelation_fx = L_shl_sat( lsEnergyRelation_fx, add( 16, lsEnergyRelation_e ) );                           // Q31
                stereoRatio_fx = L_sub( Mult_32_32( L_shl_sat( stereoCoh_fx, stereoCoh_e ), lsEnergyRelation_fx ), surrCoh_fx ); // Q31

                temp2 = L_sub( temp2, EPSILON_FX );
                lsEnergyRelation_fx = BASOP_Util_Divide3232_Scale( temp2, lsEnergySum_fx, &lsEnergyRelation_e );
                lsEnergyRelation_e = add( lsEnergyRelation_e, sub( temp2_e, lsEnergySum_e ) );
                lsEnergyRelation_fx = L_shl( lsEnergyRelation_fx, add( 16, lsEnergyRelation_e ) );     // Q31
                lsEnergyRelation_fx = L_shl_sat( lsEnergyRelation_fx, add( 16, lsEnergyRelation_e ) ); // Q31
                cohPanRatio_fx = L_sub( Mult_32_32( cohPanCoh_fx, lsEnergyRelation_fx ), surrCoh_fx ); // Q31

                IF( GT_32( stereoRatio_fx, cohPanRatio_fx ) )
@@ -1436,6 +1436,8 @@ static void computeVerticalDiffuseness_fx(
    {
        Word16 tmp_e1, tmp_e2;
        tmp = BASOP_Util_Divide3232_Scale( intensity_slow_abs[i], L_add( energy_slow[i], EPSILON_FX_SMALL ), &tmp_e1 );
        IF( tmp != 0 )
        {
            tmp_e1 = add( tmp_e1, sub( intensity_slow_e[i], energy_slow_e[i] ) );
            tmp = BASOP_Util_Divide3232_Scale( L_sub( tmp, L_shr( VERTICAL_ENERGY_RATIO_OFFSET_FX, tmp_e1 ) ), L_sub( ONE_IN_Q15, VERTICAL_ENERGY_RATIO_OFFSET_FX ), &tmp_e2 ); /* Tuned to avoid effect due to ambience of vertically un-even setups */
            tmp_e2 = add( tmp_e2, tmp_e1 );
@@ -1454,6 +1456,13 @@ static void computeVerticalDiffuseness_fx(
            {
                tmp = L_shl( tmp, add( 16, tmp_e2 ) ); // Q31
            }
        }
        ELSE
        {
            tmp = ONE_IN_Q31; // Q31
            move32();
        }

        diffuseness[i] = tmp; // Q31
        move32();
    }