Commit 00f17224 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

del all changes

parent 82e1f875
Loading
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -59,15 +59,6 @@
#define TCX_IMDCT_SCALE    15
#define TCX_IMDCT_HEADROOM 1
//#define FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_STAGE1 //deleted completely
//#define FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_STAGE2 //deleted completely
//#define FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_STAGE3 //deleted completely
//#define FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_upsampledsig // be       // 2    WMOPS - deleted completely
// Numbers ALL:     83,45
// Numbers beOnly:  86,156
// NUmbers none:    88,183
/*----------------------------------------------------------------------------------*
 * Prototypes of global macros
+4 −15
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
#define THR_ENV_ERROR_PLOSIVE        200.0f    /* threshold for envelope error used in plosive detection */
#define THR_ENV_ERROR_PLOSIVE_FX     200       /* threshold for envelope error used in plosive detection Q0 */


/*-----------------------------------------------------------------*
 * Local function prototypes
 *-----------------------------------------------------------------*/
@@ -6693,6 +6692,7 @@ void wb_tbe_extras_reset_synth_fx(
 * 18th-order elliptic bandpass filter at 14.0 to 20 kHz sampled at 48 kHz
 * Implemented as 3 fourth order sections cascaded.
 *-------------------------------------------------------------------*/

void elliptic_bpf_48k_generic_fx(
    const Word16 input_fx[], /* i  : input signal                             Q_input_fx*/
    Word16 *Q_input_fx,
@@ -6704,9 +6704,8 @@ void elliptic_bpf_48k_generic_fx(
{
    Word16 i, j;
    Word16 memory_fx0[4][4], memory_fx[4][4], Q_temp, Q_temp2;
    Word32 L_tmp[L_FRAME48k], L_tmp2[L_FRAME48k], L_tmpX, memory2_fx[4][4], L_tmpMax;
    Word32 L_tmp[L_FRAME48k], L_tmp2[L_FRAME48k], L_output[L_FRAME48k], L_tmpX, memory2_fx[4][4], L_tmpMax;
    Word32 memory2_fx_2[4], memory2_fx_3[4];
    Word32 L_output[L_FRAME48k];

    FOR( i = 0; i < 4; i++ )
    {
@@ -6722,7 +6721,6 @@ void elliptic_bpf_48k_generic_fx(
        move32();
    }


    L_tmpX = L_shr( L_mult( memory_fx[0][0], full_band_bpf_fx[0][4] ), 3 );                                 /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[0][1], full_band_bpf_fx[0][3] ), 3 ), L_tmpX );                /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[0][2], full_band_bpf_fx[0][2] ), 3 ), L_tmpX );                /*Q_input_fx + 13 + 1 - 3*/
@@ -6765,7 +6763,6 @@ void elliptic_bpf_48k_generic_fx(
    L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[0], full_band_bpf_fx[3][3] ), 2 ) );           /*Q_input_fx + 11 + 13  -15 +2*/
    L_tmp[3] = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( memory2_fx[1][3], full_band_bpf_fx[3][4] ), 2 ) ); /*Q_input_fx + 11 + 13  -15 +2*/
    move32();

    FOR( i = 4; i < L_FRAME48k; i++ )
    {
        L_tmpX = L_shr( L_mult( input_fx[i - 4], full_band_bpf_fx[0][4] ), 3 );                             /*Q_input_fx + 13 + 1 - 3*/
@@ -6833,7 +6830,6 @@ void elliptic_bpf_48k_generic_fx(
    L_tmp2[3] = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( memory2_fx[2][3], full_band_bpf_fx[4][4] ), 2 ) ); /*Q_input_fx + 6 +13 -15 +2 */ /*14 + Q_input_fx - shift_flag*/
    move32();
    L_tmpMax = L_max( L_tmpMax, L_abs( L_tmp2[3] ) );

    FOR( i = 4; i < L_FRAME48k; i++ )
    {
        L_tmpX = L_shr( Mult_32_16( L_tmp[i - 4], full_band_bpf_fx[1][4] ), 3 );                              /*Q_input_fx + 11 + 13 - 15 -3*/
@@ -6935,7 +6931,6 @@ void elliptic_bpf_48k_generic_fx(
        move32();
        L_tmpMax = L_max( L_tmpMax, L_abs( L_output[i] ) );
    }

    memory_fx2[2][0] = L_tmp2[L_FRAME48k - 4];
    memory_fx2[2][1] = L_tmp2[L_FRAME48k - 3];
    memory_fx2[2][2] = L_tmp2[L_FRAME48k - 2];
@@ -7003,13 +6998,12 @@ void synthesise_fb_high_band_fx(
{
    Word16 i, j;
    Word16 excitation_in_interp3[L_FRAME48k];
    Word16 tmp[L_FRAME48k];
    Word32 temp1;
    Word32 ratio2;
    Word32 L_tmp;
    Word16 tmp3, tmp1, tmp2, exp, exp2, exp_tmp;
    Word16 tmp[L_FRAME48k];

    push_wmops( "SYNTHESISE_FB_HIGH_BAND PART A" );
    /* Interpolate the white energy shaped gaussian excitation from 16 kHz to 48 kHz with zeros */
    j = 0;
    /* white excitation from DC to 8 kHz resampled to produce DC to 24 kHz excitation.          */
@@ -7025,7 +7019,6 @@ void synthesise_fb_high_band_fx(
    }
    exp_tmp = sub( Q_fb_exc, 2 );

    push_wmops( "SYNTHESISE_FB_HIGH_BAND PART A.1" );
    IF( EQ_16( L_frame, L_FRAME16k ) )
    {
        /* for 16kHz ACELP core */
@@ -7036,11 +7029,8 @@ void synthesise_fb_high_band_fx(
        /* for 12.8kHz ACELP core */
        elliptic_bpf_48k_generic_fx( excitation_in_interp3, &exp_tmp, tmp, bpf_memory, bpf_memory_Q, full_band_bpf_1_fx );
    }
    pop_wmops(); /*push_wmops( "SYNTHESISE_FB_HIGH_BAND PART A.1" );*/
    pop_wmops(); /*push_wmops( "SYNTHESISE_FB_HIGH_BAND PART A" )*/

    push_wmops( "SYNTHESISE_FB_HIGH_BAND PART B" );
    temp1 = sum2_fx_mod( tmp, L_FRAME48k );

    L_tmp = L_max( 1, fb_exc_energy ); /*Q(2*Q_fb_exc + 1)*/
    exp = norm_l( L_tmp );
    tmp3 = extract_h( L_shl( L_tmp, exp ) );
@@ -7095,7 +7085,6 @@ void synthesise_fb_high_band_fx(
            move16();
        }
    }
    pop_wmops(); /*push_wmops( "SYNTHESISE_FB_HIGH_BAND PART B" );*/
    return;
}

+11 −51
Original line number Diff line number Diff line
@@ -114,12 +114,12 @@ ivas_error ivas_core_dec_fx(

    error = IVAS_ERR_OK;
    move32();
    push_wmops( "ivas_core_dec (ICD)" );
    push_wmops( "ivas_core_dec" );

    /*------------------------------------------------------------------*
     * General initialization
     *-----------------------------------------------------------------*/
    push_wmops( "ICD init" );

    use_cldfb_for_dft = 0;
    move16();
    tdm_LRTD_flag = -1;
@@ -368,9 +368,7 @@ ivas_error ivas_core_dec_fx(
    {
        save_hb_synth_32_fx = NULL;
    }
    pop_wmops(); /*push_wmops( "ICD init" );*/

    push_wmops( "ICD SID, sanity" );
    /*------------------------------------------------------------------*
     * Decode SID for MDCT-Stereo DTX mode
     *-----------------------------------------------------------------*/
@@ -398,9 +396,7 @@ ivas_error ivas_core_dec_fx(
    {
        ivas_combined_format_brate_sanity_fx( element_brate, sts[0]->core, sts[0]->total_brate, &( sts[0]->core_brate ), &( sts[0]->inactive_coder_type_flag ), &tmps );
    }
    pop_wmops(); /*push_wmops( "ICD SID, sanity" );*/

    push_wmops( "ICD Coredec" );
    /*------------------------------------------------------------------*
     * Core Decoding
     *-----------------------------------------------------------------*/
@@ -485,7 +481,6 @@ ivas_error ivas_core_dec_fx(

        IF( st->core == ACELP_CORE )
        {
            push_wmops( "ICD ACELP" );
            /* ACELP core decoder */
            Word16 old_syn_12k8_16k_fx_16[L_FRAME16k];
            Word16 save_hb_synth_fx_arr[L_FRAME48k], *save_hb_synth_16_fx;
@@ -558,7 +553,6 @@ ivas_error ivas_core_dec_fx(
            }

            Copy_Scale_sig_16_32_DEPREC( old_syn_12k8_16k_fx_16, old_syn_12k8_16k_fx[n], L_FRAME16k, Q11 - ( -Q1 ) ); // Q(11 - (-1))
            pop_wmops();                                                                                              /*push_wmops( "ICD ACELP" );*/
        }

        Copy_Scale_sig_32_16( st->previoussynth_fx_32, st->previoussynth_fx, L_FRAME48k, 0 ); // Q0
@@ -567,7 +561,6 @@ ivas_error ivas_core_dec_fx(
        test();
        IF( ( EQ_16( st->core, TCX_20_CORE ) || EQ_16( st->core, TCX_10_CORE ) ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) )
        {
            push_wmops( "ICD TCX" );
            Word16 Qsyn_temp;
            IVAS_FORMAT ivas_format;

@@ -622,12 +615,10 @@ ivas_error ivas_core_dec_fx(
            }
            st->hBPF->pst_mem_deemp_err_fx = extract_l( st->mem_error );
            move16();
            pop_wmops(); /*push_wmops( "ICD TCX" );*/
        }

        IF( EQ_16( st->core, HQ_CORE ) )
        {
            push_wmops( "ICD HQ decoding" );
            /* HQ core decoder */
            Word16 Q_output;

@@ -641,7 +632,6 @@ ivas_error ivas_core_dec_fx(
            Copy_Scale_sig_16_32_DEPREC( output_16_fx[n], output_32_fx[n], L_FRAME48k, sub( Q11, Q_output ) ); // Q11
            Scale_sig( synth_16_fx[n], output_frame, negate( Q_synth ) );                                      // Q0
            Scale_sig( output_16_fx[n], L_FRAME48k, negate( Q_output ) );                                      // Q0
            pop_wmops();                                                                                       /*push_wmops( "ICD HQ decoding" );*/
        }

        /*---------------------------------------------------------------------*
@@ -659,7 +649,7 @@ ivas_error ivas_core_dec_fx(
        }

    } /* n_channels loop */
    pop_wmops(); /*push_wmops( "ICD Coredec" );*/


    /*---------------------------------------------------------------------*
     * MDCT stereo: joint TCX Core Decoding
@@ -667,7 +657,6 @@ ivas_error ivas_core_dec_fx(

    IF( EQ_16( sts[0]->element_mode, IVAS_CPE_MDCT ) )
    {
        push_wmops( "ICD jTCX Coredec" );
        /* active-frame decoding */
        IF( GT_32( sts[0]->core_brate, SID_2k40 ) )
        {
@@ -796,7 +785,6 @@ ivas_error ivas_core_dec_fx(
                }
            }
        }
        pop_wmops(); /*push_wmops( "ICD jTCX Coredec" );*/
    }

    /*---------------------------------------------------------------------*
@@ -806,7 +794,6 @@ ivas_error ivas_core_dec_fx(
    test();
    IF( EQ_16( sts[0]->element_mode, IVAS_CPE_TD ) && hStereoCng != NULL )
    {
        push_wmops( "ICD Stereo CNG Updates" );
        /* To be cleaned up once the caller function is converted // These changes are for system testing of fixed changes made */
        Word16 Q_c_PS_LT, Q_output;
        Word32 c_PS_LT_fx;
@@ -822,14 +809,12 @@ ivas_error ivas_core_dec_fx(
        stereo_cng_compute_PScorr_fx( output_32_fx[0], output_32_fx[1], &Q_output, &c_PS_LT_fx, Q_c_PS_LT, sts[0]->L_frame, sts[1]->L_frame );

        hStereoCng->c_PS_LT_fx = extract_h( c_PS_LT_fx );
        pop_wmops(); /*push_wmops( "ICD Stereo CNG Updates" );*/
    }

    /*---------------------------------------------------------------------*
     * Postprocessing, BWEs and updates
     *---------------------------------------------------------------------*/

    push_wmops( "ICD Postproc, BWE, updates (ICD PP)" );
    FOR( n = 0; n < n_channels; n++ )
    {
        st = sts[n];
@@ -840,7 +825,6 @@ ivas_error ivas_core_dec_fx(
         * TD-BWE for ACELP to TCX transitions
         *---------------------------------------------------------------------*/

        push_wmops( "ICD PP TDBWE ACELPTCX trans" );
        /*core_switching_post_dec*/
        Q_synth = sub( 15, e_sig[0] );

@@ -914,12 +898,11 @@ ivas_error ivas_core_dec_fx(
            Copy_Scale_sig_16_32_no_sat( hBWE_TD->mem_resamp_HB_fx, hBWE_TD->mem_resamp_HB_fx_32, INTERP_3_1_MEM_LEN, sub( Q11, hBWE_TD->prev_Qx ) );                            // Q11
            Copy( hBWE_TD->mem_resamp_HB_fx, hBWE_TD->state_32and48k_WB_upsample_fx, ( 2 * ALLPASSSECTIONS_STEEP ) );
        }
        pop_wmops(); /*push_wmops( "ICD PP TDBWE ACELPTCX trans" );*/

        /*---------------------------------------------------------------------*
         * Postprocessing for ACELP/MDCT core switching
         *---------------------------------------------------------------------*/
        push_wmops( "ICD PP ACELP/MDCT switch" );

        /* save synth and output in case of SBA DirAC stereo output as core switching is done outside of core decoder */
        test();
        test();
@@ -954,12 +937,11 @@ ivas_error ivas_core_dec_fx(
        {
            Copy( sts[0]->previoussynth_fx, sts[1]->previoussynth_fx, st->hTcxDec->L_frameTCX );
        }
        pop_wmops(); /*push_wmops( "ICD PP ACELP/MDCT switch" );*/

        /*---------------------------------------------------------------------*
         * Pre-processing for bandwidth switching
         *---------------------------------------------------------------------*/
        push_wmops( "ICD PP BWswitch preproc" );

        ivas_bw_switching_pre_proc_fx( st, last_element_brate, nchan_out, old_syn_12k8_16k_fx[n], old_syn_fx, q_audio );

        IF( st->hHQ_core == NULL )
@@ -1006,13 +988,12 @@ ivas_error ivas_core_dec_fx(
            hBWE_FD->prev_flag = hBWE_FD->prev_flag;
            move16();
        }
        pop_wmops(); /*push_wmops( "ICD PP BWswitch preproc" );*/

        /*---------------------------------------------------------------------*
         * WB TBE decoding
         * WB BWE decoding
         *---------------------------------------------------------------------*/
        push_wmops( "ICD PP TBE/BWE" );

        Word16 Q_input, Q_hb_synth_fx, Q_synth_fx;
        Word16 Q_syn_hb, sf;

@@ -1040,9 +1021,8 @@ ivas_error ivas_core_dec_fx(
        IF( EQ_16( st->extl, WB_TBE ) )
        {
            /* WB TBE decoder */
            push_wmops( "ICD PP TBE/BWE wb_tbe_dec" );

            ivas_wb_tbe_dec_fx( st, st->coder_type, bwe_exc_extended_fx[n], st->Q_exc, voice_factors_fx[n], hb_synth_16_fx[n], &Q_hb_synth_fx );
            pop_wmops(); /*push_wmops( "ICD PP TBE/BWE wb_tbe_dec" );*/
        }
        ELSE IF( EQ_16( st->element_mode, IVAS_CPE_TD ) && EQ_16( n, 1 ) && !tdm_LRTD_flag && NE_16( st->extl, -1 ) && st->bws_cnt == 0 && st->extl_brate == 0 )
        {
@@ -1050,10 +1030,8 @@ ivas_error ivas_core_dec_fx(
        }
        ELSE IF( EQ_16( st->extl, WB_BWE ) && st->bws_cnt == 0 )
        {
            push_wmops( "ICD PP TBE/BWE wb_bwe_dec" );
            /* WB BWE decoder */
            Q_hb_synth_fx = ivas_wb_bwe_dec_fx( st, output_16_fx[n], synth_16_fx[n], hb_synth_16_fx[n], use_cldfb_for_dft, output_frame, voice_factors_fx[n], pitch_buf_fx[n], &Q_synth_fx );
            pop_wmops(); /*push_wmops( "ICD PP TBE/BWE wb_bwe_dec" );*/
        }

        /* Memories  Re-Scaling */
@@ -1097,10 +1075,8 @@ ivas_error ivas_core_dec_fx(
        test();
        IF( EQ_16( st->extl, SWB_TBE ) || EQ_16( st->extl, FB_TBE ) || ( NE_16( st->coder_type, AUDIO ) && NE_16( st->coder_type, INACTIVE ) && GE_32( st->core_brate, SID_2k40 ) && EQ_16( st->core, ACELP_CORE ) && !st->con_tcx && GE_32( output_Fs, 32000 ) && GT_16( st->bwidth, NB ) && st->bws_cnt > 0 ) )
        {
            push_wmops( "ICD PP TBE/BWE swb_tbe_dec" );
            /* SWB TBE decoder */
            ivas_swb_tbe_dec_fx( st, hStereoICBWE, bwe_exc_extended_fx[n], st->Q_exc, voice_factors_fx[n], old_syn_12k8_16k_fx[n], tmp_buffer_fx /*fb_exc*/, hb_synth_32_fx[n], pitch_buf_fx[n], &Q_white_exc );
            pop_wmops(); /*push_wmops( "ICD PP TBE/BWE swb_tbe_dec" );*/

            Copy_Scale_sig_16_32_no_sat( hBWE_TD->syn_overlap_fx, hBWE_TD->syn_overlap_fx_32, L_SHB_LAHEAD, sub( Q11, hBWE_TD->prev_Q_bwe_syn2 ) ); // Q11
            Copy_Scale_sig_32_16( hBWE_TD->old_tbe_synth_fx_32, hBWE_TD->old_tbe_synth_fx, L_SHB_TRANSITION_LENGTH, sub( hBWE_TD->prev_Qx, Q11 ) ); // prev_Qx
@@ -1115,22 +1091,18 @@ ivas_error ivas_core_dec_fx(
            /* FB TBE decoder */
            IF( EQ_16( st->extl, FB_TBE ) )
            {
                push_wmops( "ICD PP TBE/BWE fb_tbe_dec" );
                fb_tbe_dec_ivas_fx( st, tmp_buffer_fx /*fb_exc*/, Q_white_exc, hb_synth_32_fx[n], 0, tmp_buffer_fx /*fb_synth_ref*/, Q_white_exc, output_frame );
                pop_wmops(); /*push_wmops( "ICD PP TBE/BWE fb_tbe_dec" );*/
            }
        }
        ELSE IF( EQ_16( st->extl, SWB_BWE ) || EQ_16( st->extl, FB_BWE ) || ( GE_32( output_Fs, 32000 ) && st->core == ACELP_CORE && st->bwidth > NB && st->bws_cnt > 0 && !st->ppp_mode_dec && !( EQ_16( st->nelp_mode_dec, 1 ) && EQ_16( st->bfi, 1 ) ) ) )
        {
            /* SWB BWE decoder */
            push_wmops( "ICD PP TBE/BWE swb_bwe_dec" );
            Q_syn_hb = swb_bwe_dec_fx32( st, output_32_fx[n], synth_32_fx[n], hb_synth_32_fx[n], use_cldfb_for_dft, output_frame );
            pop_wmops();                                                          /*push_wmops( "ICD PP TBE/BWE swb_bwe_dec" );*/

            Scale_sig32( hb_synth_32_fx[n], output_frame, sub( Q11, Q_syn_hb ) ); // Q11

            Copy_Scale_sig_32_16( hBWE_FD->L_old_wtda_swb_fx32, hBWE_FD->L_old_wtda_swb_fx, output_frame, sub( hBWE_FD->old_wtda_swb_fx_exp, Q11 ) ); // old_wtda_swb_fx_exp
        }
        pop_wmops(); /*push_wmops( "ICD PP TBE/BWE" );*/

        /*---------------------------------------------------------------------*
         * FEC - recovery after lost HQ core (smoothing of the BWE component)
@@ -1169,7 +1141,6 @@ ivas_error ivas_core_dec_fx(
        test();
        IF( ( GE_16( output_frame, L_FRAME32k ) && st->hTdCngDec != NULL ) || ( EQ_16( st->element_mode, IVAS_CPE_DFT ) && GE_16( st->bwidth, SWB ) && st->hTdCngDec != NULL ) )
        {
            push_wmops( "ICD PP SWB CNG" );
            /* SHB CNG decoder */
            Word16 synth_fxl[960]; /* Q-2 */
            Word16 q;
@@ -1191,7 +1162,6 @@ ivas_error ivas_core_dec_fx(

            Scale_sig( hBWE_TD->state_lpc_syn_fx, LPC_SHB_ORDER, negate( sub( Q8, hBWE_TD->prev_Q_bwe_syn ) ) ); // Q0
            Copy_Scale_sig_16_32_no_sat( hBWE_TD->genSHBsynth_state_lsyn_filt_shb_local_fx, hBWE_TD->genSHBsynth_state_lsyn_filt_shb_local_fx_32, 2 * ALLPASSSECTIONS_STEEP, negate( sub( hBWE_TD->prev_Q_bwe_syn2, Q11 ) ) );
            pop_wmops(); /*        push_wmops( "ICD PP SWB CNG" );*/
        }

        /*-------------------------------------------------------------------*
@@ -1201,7 +1171,6 @@ ivas_error ivas_core_dec_fx(
        test();
        IF( n == 0 && GE_16( st->element_mode, IVAS_CPE_DFT ) )
        {
            push_wmops( "ICD PP IC-BWE" );
            Word16 q;
            q = 11;
            move16();
@@ -1223,12 +1192,10 @@ ivas_error ivas_core_dec_fx(
                Scale_sig32( hb_synth_32_fx[0], output_frame, sub( Q11, q ) ); // Q11
                Scale_sig32( hb_synth_32_fx[1], output_frame, sub( Q11, q ) ); // Q11
            }
            pop_wmops(); /*push_wmops( "ICD PP IC-BWE" );*/
        }

        IF( EQ_16( st->element_mode, EVS_MONO ) )
        {
            push_wmops( "ICD PP BFI" );
            /*----------------------------------------------------------------*
             * BFI waveform adjustment
             *----------------------------------------------------------------*/
@@ -1256,7 +1223,6 @@ ivas_error ivas_core_dec_fx(
                st->hPlcInfo->Pitch_fx = 0;
                move16();
            }
            pop_wmops(); /*push_wmops( "ICD PP BFI" );*/
        }

        /*----------------------------------------------------------------*
@@ -1269,7 +1235,6 @@ ivas_error ivas_core_dec_fx(
        test();
        IF( ( NE_16( st->extl, -1 ) && ( NE_16( st->extl, IGF_BWE ) || st->last_core == ACELP_CORE ) ) || ( st->bws_cnt > 0 && st->core == ACELP_CORE ) )
        {
            push_wmops( "ICD PP Sync BWE" );
            /* Calculate an additional delay of extension layer components to be synchronized with ACELP synthesis */
            IF( EQ_16( st->L_frame, L_FRAME ) )
            {
@@ -1423,7 +1388,6 @@ ivas_error ivas_core_dec_fx(
                st->hTdCngDec->last_shb_ener_fx_32 = L_shl_sat( L_tmp, sub( exp, 20 ) ); /*Q11*/
                move32();
            }
            pop_wmops(); /*push_wmops( "ICD PP Sync BWE" );*/
        }

        test();
@@ -1439,7 +1403,7 @@ ivas_error ivas_core_dec_fx(
         * - core switching in DFT stereo
         * - updates for potential TD->DFT stereo switching
         *----------------------------------------------------------------*/
        push_wmops( "ICD PP TCXLTP" );

        IF( st->hHQ_core != NULL )
        {
            Copy_Scale_sig_16_32_no_sat( st->hHQ_core->old_out_LB_fx, st->hHQ_core->old_out_LB_fx32, L_FRAME32k, sub( Q11, st->hHQ_core->Q_old_wtda_LB ) ); // Q11
@@ -1496,7 +1460,6 @@ ivas_error ivas_core_dec_fx(
        }

        Copy32( synth_32_fx[n], output_32_fx[n], output_frame );
        pop_wmops(); /*push_wmops( "ICD PP TCXLTP" );*/

        /*--------------------------------------------------------*
         * Common updates
@@ -1505,7 +1468,6 @@ ivas_error ivas_core_dec_fx(
        Word16 exp_max;
        Word32 output_fx_loc[L_FRAME48k];

        push_wmops( "ICD PP commonupdates" );
        exp_max = 0;
        move16();

@@ -1560,8 +1522,6 @@ ivas_error ivas_core_dec_fx(

        Scale_sig( st->delay_buf_out_fx, NS2SA_FX2( st->output_Fs, DELAY_CLDFB_NS ), negate( exp_max ) ); // Q0

        pop_wmops(); /*push_wmops( "ICD PP commonupdates" );*/

    } /* n_channels loop */

    FOR( n = 0; n < n_channels; n++ )
@@ -1580,7 +1540,7 @@ ivas_error ivas_core_dec_fx(
            move16();
        }
    }
    pop_wmops(); /*push_wmops( "ICD Postproc, BWE, updates (ICD PP)" );*/

    pop_wmops();
    return error;
}
+3 −17
Original line number Diff line number Diff line
@@ -96,13 +96,12 @@ ivas_error ivas_jbm_dec_tc_fx(

    CPE_DEC_HANDLE hCPE;
    SCE_DEC_HANDLE hSCE;
    push_wmops( "ivas_jbm_dec_tc (JBM)" );
    push_wmops( "ivas_jbm_dec_tc" );

    /*----------------------------------------------------------------*
     * Initialization of local vars after struct has been set
     *----------------------------------------------------------------*/

    push_wmops( "JBM init" );
    output_Fs = st_ivas->hDecoderConfig->output_Fs;
    move32();
    nchan_out = st_ivas->hTcBuffer->nchan_transport_jbm;
@@ -135,7 +134,7 @@ ivas_error ivas_jbm_dec_tc_fx(
    }

    Word16 ch;
    pop_wmops(); /*push_wmops( "JBM init" );*/


    /*----------------------------------------------------------------*
     * Decoding + pre-rendering
@@ -153,7 +152,6 @@ ivas_error ivas_jbm_dec_tc_fx(
    }
    ELSE IF( EQ_32( st_ivas->ivas_format, STEREO_FORMAT ) )
    {
        push_wmops( "JBM STEREO" );
        st_ivas->hCPE[0]->element_brate = ivas_total_brate;
        move32();
        Word16 q_output = 11;
@@ -194,11 +192,9 @@ ivas_error ivas_jbm_dec_tc_fx(
                Scale_sig32( p_output_fx[i], output_frame, negate( s ) ); // Q11
            }
        }
        pop_wmops(); /*push_wmops( "JBM STEREO" );*/
    }
    ELSE IF( EQ_32( st_ivas->ivas_format, ISM_FORMAT ) )
    {
        push_wmops( "JBM ISM" );
        /* Metadata decoding and configuration */
        test();
        IF( EQ_32( ivas_total_brate, IVAS_SID_5k2 ) || EQ_32( ivas_total_brate, FRAME_NO_DATA ) )
@@ -283,11 +279,9 @@ ivas_error ivas_jbm_dec_tc_fx(
                Scale_sig32( p_output_fx[i], output_frame, 1 ); // Q-1 -> Q
            }
        }
        pop_wmops(); /*push_wmops( "JBM ISM" );*/
    }
    ELSE IF( EQ_32( st_ivas->ivas_format, SBA_FORMAT ) || EQ_32( st_ivas->ivas_format, MASA_FORMAT ) )
    {
        push_wmops( "JBM SBA/MASA" );
        set16_fx( nb_bits_metadata, 0, MAX_SCE );


@@ -694,11 +688,9 @@ ivas_error ivas_jbm_dec_tc_fx(
                Scale_sig32( p_output_fx[i], output_frame, 1 ); // Q-1 -> Q
            }
        }
        pop_wmops(); /*push_wmops( "JBM SBA/MASA" );*/
    }
    ELSE IF( EQ_32( st_ivas->ivas_format, MASA_ISM_FORMAT ) )
    {
        push_wmops( "JBM MASA_ISM" );
        Word16 nchan_ism, nchan_transport_ism;
        Word16 dirac_bs_md_write_idx;

@@ -829,11 +821,9 @@ ivas_error ivas_jbm_dec_tc_fx(
                Scale_sig32( p_output_fx[n], output_frame, sub( Q11, output_q ) ); // Q11
            }
        }
        pop_wmops(); /*push_wmops( "JBM MASA_ISM" );*/
    }
    ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
    {
        push_wmops( "JBM SBA_ISM" );
        Word16 nchan_ism, sba_ch_idx;

        set16_fx( nb_bits_metadata, 0, MAX_SCE + 1 );
@@ -1102,11 +1092,10 @@ ivas_error ivas_jbm_dec_tc_fx(
                v_add_32( p_output_fx[n], p_output_fx[n + s_max( nchan_out, nchan_ism )], p_output_fx[n], output_frame );
            }
        }
        pop_wmops(); /*push_wmops( "JBM SBA_ISM" );*/
    }
    ELSE IF( EQ_32( st_ivas->ivas_format, MC_FORMAT ) )
    {
        push_wmops( "JBM MC" );

        // st = (st_ivas->nSCE > 0) ? st_ivas->hSCE[0]->hCoreCoder[0] : st_ivas->hCPE[0]->hCoreCoder[0];
        IF( st_ivas->nSCE > 0 )
        {
@@ -1479,7 +1468,6 @@ ivas_error ivas_jbm_dec_tc_fx(
                ivas_mono_stereo_downmix_mcmasa_fx( st_ivas, p_output_fx, output_frame );
            }
        }
        pop_wmops(); /*push_wmops( "JBM MC" );*/
    }

    /*----------------------------------------------------------------*
@@ -1488,9 +1476,7 @@ ivas_error ivas_jbm_dec_tc_fx(

    IF( EQ_16( st_ivas->hDecoderConfig->Opt_tsm, 1 ) )
    {
        push_wmops( "JBM syn_out" );
        ivas_syn_output_f_fx( p_output_fx, output_frame, st_ivas->hTcBuffer->nchan_transport_jbm, data_fx );
        pop_wmops(); /*push_wmops( "JBM syn_out" );*/
    }
    ELSE
    {
+0 −2
Original line number Diff line number Diff line
@@ -4713,9 +4713,7 @@ void fb_tbe_dec_ivas_fx(
    fb_exc_energy = sum2_fx_mod( fb_exc, L_FRAME16k );

    /* FB TBE synthesis */
    push_wmops( "synthesise_fb_high_band" );
    synthesise_fb_high_band_fx( fb_exc, Q_fb_exc, fb_synth, fb_exc_energy, ratio, st->L_frame, st->bfi, &( hBWE_TD->prev_fbbwe_ratio_fx ), hBWE_TD->fbbwe_hpf_mem_fx, hBWE_TD->fbbwe_hpf_mem_fx_Q, hb_synth_exp );
    pop_wmops(); /*push_wmops( "synthesise_fb_high_band" );*/

    test();
    IF( GE_16( st->element_mode, IVAS_CPE_DFT ) && ( st->idchan == 0 ) )