Commit 52917e27 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

LTV test all MRs included - 24062025

parent f1458362
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1031,18 +1031,18 @@ ivas_error ivas_jbm_dec_tc_fx(
        {
            num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate );
            SPAR_DEC_HANDLE hSpar = st_ivas->hSpar;
            Word16 Q_p_output = 14;
            move16();
            Word16 nchan_transport;
            // num_bands_out = hSpar->hFbMixer->pFb->filterbank_num_bands;
            nchan_transport = hSpar->hMdDec->spar_md_cfg.nchan_transport;
            move16();
            nchan_out = nchan_transport;
            move16();
            Word16 Q_p_output = max( 3, sub( L_norm_arr( p_output_fx[sba_ch_idx], imult1616( output_frame, nchan_transport ) ), 1 ) );
            FOR( ch = 0; ch < nchan_transport; ch++ )
            {
                Scale_sig32( p_output_fx[sba_ch_idx + ch], output_frame, sub( Q_p_output, Q11 ) ); // Q_p_output
                Scale_sig32( p_output_fx[sba_ch_idx + ch], output_frame, Q_p_output ); // Q_p_output + Q11
            }
            Q_p_output = add( Q11, Q_p_output );
            hSpar->hMdDec->Q_mixer_mat = 31;
            move16();

+10 −7
Original line number Diff line number Diff line
@@ -2525,7 +2525,7 @@ void gain_enc_lbr_ivas_fx(

    /*Ecode = ( dotp( code, code, L_SUBFR ) + 0.01f ) / L_SUBFR;
     *gain_inov = 1.0f / (float)sqrt(Ecode);*/
    L_tmp = Dot_product12( code, code, L_subfr, &exp_code );
    L_tmp = Dot_product12( code, code, L_subfr, &exp_code ); /* Q9 + Q9 + 1 + (30-exp_code)*/
    L_inov = L_tmp;                                          /* sets to 'L_tmp' in 1 clock */
    move32();
    /* exp_code: -18 (code in Q9), -6 (/L_SUBFR), -31 (L_tmp Q31->Q0) */
@@ -2599,12 +2599,15 @@ void gain_enc_lbr_ivas_fx(
        /*     gcode0 = (float)pow(10, dotp(b, aux, n_pred) - 0.5f * (float)log10(Ecode));
        gcode0 = (float)pow(10, dotp(b, aux, n_pred) - 0.05f * 10 * (float)log10(Ecode));
        gcode0 = (float)pow(10, 0.05(20 * dotp(b, aux, n_pred) - 10 * (float)log10(Ecode))); */

        exp_code = sub( exp_code, 18 + 6 + 1 );
        // Ecode = (Ecode / L_subfr)
        L_tmp = L_shr( L_tmp, L_subfr_sf );                     // Q19 + (Q30-exp_code)
                                                                /* Calculation for log10(Ecode) exponent for applying log10 = Q31 - q = Q31 - Q19 - Q30 + exp_code = exp_code - Q18*/
        L_tmp = BASOP_Util_Log10( L_tmp, sub( exp_code, 18 ) ); // new q = Q25
        exp = norm_l( L_tmp );
        frac = Log2_norm_lc( L_shl( L_tmp, exp ) );
        exp = sub( exp_code, exp );
        L_tmp1 = Mpy_32_16( exp, frac, 24660 ); /* Q14 */ /* 10*log10(2) in Q13*/
        L_tmp = L_shl( L_tmp, exp ); // Q25 + exp
        // 10 in Q27 , ( 10 * log10( Ecode ) )
        L_tmp1 = Mpy_32_32( L_tmp, 1342177280 ); // Q25 + exp + 1 + Q27 - 32 = Q21 + exp
        L_tmp1 = L_shr( L_tmp1, add( 7, exp ) ); // Q21 + exp - 7 - exp = Q14

        L_tmp = Dot_product( b, aux, n_pred ); /*Q25*/
        L_tmp = Mult_32_16( L_tmp, 320 );      /*Q14, 20 in Q4*/
+12 −5
Original line number Diff line number Diff line
@@ -596,7 +596,7 @@ static void ivas_dirac_dec_binaural_internal_fx(
            move16();
        }
    }

    Word16 q_cldfb_temp = sub( q_input, 1 );
    DIRAC_DEC_BIN_HANDLE hDiracDecBin;
    SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom;
    PARAMBIN_REND_CONFIG config_data;
@@ -616,7 +616,7 @@ static void ivas_dirac_dec_binaural_internal_fx(
    nBins = hSpatParamRendCom->num_freq_bands;
    move16();
    offsetSamples = imult1616( hSpatParamRendCom->slots_rendered, nBins );

    Word32 tmp_arr[CLDFB_NO_CHANNELS_MAX];
    /* Setup internal config */
    config_data.separateCenterChannelRendering = st_ivas->hOutSetup.separateChannelEnabled;
    move16();
@@ -713,13 +713,21 @@ static void ivas_dirac_dec_binaural_internal_fx(
            test();
            IF( ch == 0 || EQ_16( nchan_transport, 2 ) )
            {
                q_cldfb[ch][slot] = q_input;
                q_cldfb[ch][slot] = q_cldfb_temp;
                move16();
                Copy_Scale_sig32( &( st_ivas->hTcBuffer->tc_fx[ch][nBins * slot + offsetSamples] ), tmp_arr, nBins, -1 );
                scale_sig32( st_ivas->cldfbAnaDec[ch]->cldfb_state_fx, sub( st_ivas->cldfbAnaDec[ch]->p_filter_length, st_ivas->cldfbAnaDec[ch]->no_channels ), sub( q_cldfb_temp, st_ivas->cldfbAnaDec[ch]->Q_cldfb_state ) );
                cldfbAnalysis_ts_fx_fixed_q(
                    &( st_ivas->hTcBuffer->tc_fx[ch][add( imult1616( nBins, slot ), offsetSamples )] ),
                    tmp_arr,
                    Cldfb_RealBuffer_in_fx[ch][slot],
                    Cldfb_ImagBuffer_in_fx[ch][slot],
                    nBins, st_ivas->cldfbAnaDec[ch], &q_cldfb[ch][slot] );
                scale_sig32( st_ivas->cldfbAnaDec[ch]->cldfb_state_fx, sub( st_ivas->cldfbAnaDec[ch]->p_filter_length, st_ivas->cldfbAnaDec[ch]->no_channels ), sub( q_input, st_ivas->cldfbAnaDec[ch]->Q_cldfb_state ) );
                st_ivas->cldfbAnaDec[ch]->Q_cldfb_state = q_input;
                scale_sig32( Cldfb_RealBuffer_in_fx[ch][slot], nBins, 1 ); // Q6
                scale_sig32( Cldfb_ImagBuffer_in_fx[ch][slot], nBins, 1 ); // Q6
                q_cldfb[ch][slot] = add( q_cldfb[ch][slot], 1 );
                move16();
            }
            ELSE IF( EQ_16( config_data.nchan_transport, 2 ) ) /* Stereo signal transmitted as mono with DFT stereo */
            {
@@ -814,7 +822,6 @@ static void ivas_dirac_dec_binaural_internal_fx(

        IF( hDiracDecBin->useTdDecorr )
        {
            Word32 tmp_arr[60];
            FOR( ch = BINAURAL_CHANNELS; ch < ( 2 * BINAURAL_CHANNELS ); ch++ )
            {
                q_cldfb[ch][slot] = sub( q_input, 1 );