Commit 2dfb59f8 authored by multrus's avatar multrus
Browse files

address a few places w/o #ifdef ... #endif

parent c84b0e25
Loading
Loading
Loading
Loading
Loading
+17 −14
Original line number Diff line number Diff line
@@ -7066,17 +7066,20 @@ void open_decoder_LPD_ivas_fx(
#endif
    Decoder_State *st,              /* i/o: decoder state structure                     */
    const Word32 total_brate,       /* i  : total bitrate                             Q0*/
    /*EVS:0 */                      /* i  : last total bitrate                        Q0*/
    const Word32 last_total_brate,  /* i  : last total bitrate                        Q0*/
    const Word16 bwidth,            /* i  : audio bandwidth                           Q0*/
    const Word16 MCT_flag,          /* i  : hMCT handle allocated (1) or not (0)      Q0*/
    const Word16 last_element_mode, /* i  : last element mode                         Q0*/
    const Word16 is_init,           /* i  : indicate call from init_decoder() to avoid double TC initialization Q0*/
    Word16 *Q_syn_Overl_TDAC,
    Word16 *Q_fer_samples,
    Word16 *Q_syn_Overl_TDACFB,
    Word16 *Q_syn_OverlFB,
    Word16 *Q_old_out,
    Word16 *Q_old_outLB
    Word16 *Q_syn_Overl_TDAC,       /*EVS:0 */
    Word16 *Q_fer_samples,          /*EVS:0 */
#ifndef HARMONIZE_2583_open_decoder_LPD
    Word16 *Q_syn_Overl,
#endif
    Word16 *Q_syn_Overl_TDACFB, /*EVS:0 */
    Word16 *Q_syn_OverlFB,      /*EVS:0 */
    Word16 *Q_old_out,          /*EVS:0 */
    Word16 *Q_old_outLB         /*EVS:0 */
#ifndef HARMONIZE_2583_open_decoder_LPD
    ,
    Word16 *Q_old_Aq_12_8 /*EVS:0 */
@@ -7352,11 +7355,7 @@ void decoder_LPD_fx(
void mode_switch_decoder_LPD_fx(
    Decoder_State *st,      /* Q0 */
    Word16 bandwidth_in,    /* Q0 */
#ifdef HARMONIZE_2583_open_decoder_LPD
    Word32 const total_brate, /* Q0 */
#else
    Word32 bitrate,         /* Q0 */
#endif
    Word16 frame_size_index /* Q0 */
);

@@ -7364,9 +7363,13 @@ void mode_switch_decoder_LPD_ivas_fx(
    Decoder_State *st,              /* i/o: decoder state structure                   */
    const Word16 bwidth,            /* i  : audio bandwidth                         Q0*/
    const Word32 total_brate,       /* i  : total bitrate                           Q0*/
    const Word32 last_total_brate,  /* i  : last frame total bitrate                Q0*/
    const Word16 frame_size_index,  /* i  : index determining the frame size        Q0*/
    const Word16 MCT_flag,          /* i  : hMCT handle allocated (1) or not (0)    Q0*/
    const Word16 last_element_mode, /* i  : last element mode                       Q0*/
#ifndef HARMONIZE_2583_open_decoder_LPD
    Word16 *Q_syn_Overl,
#endif
    Word16 *Q_syn_Overl_TDAC,
    Word16 *Q_fer_samples,
    Word16 *Q_syn_Overl_TDACFB,
+10 −10
Original line number Diff line number Diff line
@@ -1082,12 +1082,16 @@ void open_decoder_LPD_ivas_fx(
#endif
    Decoder_State *st,              /* i/o: decoder state structure                     */
    const Word32 total_brate,       /* i  : total bitrate                             Q0*/
    const Word32 last_total_brate,  /* i  : last total bitrate                        Q0*/
    const Word16 bwidth,            /* i  : audio bandwidth                           Q0*/
    const Word16 MCT_flag,          /* i  : hMCT handle allocated (1) or not (0)      Q0*/
    const Word16 last_element_mode, /* i  : last element mode                         Q0*/
    const Word16 is_init,           /* i  : indicate call from init_decoder() to avoid double TC initialization Q0*/
    Word16 *Q_syn_Overl_TDAC,       /*EVS:0 */
    Word16 *Q_fer_samples,          /*EVS:0 */
#ifndef HARMONIZE_2583_open_decoder_LPD
    Word16 *Q_syn_Overl,
#endif
    Word16 *Q_syn_Overl_TDACFB, /*EVS:0 */
    Word16 *Q_syn_OverlFB,      /*EVS:0 */
    Word16 *Q_old_out,          /*EVS:0 */
@@ -1589,7 +1593,7 @@ void open_decoder_LPD_ivas_fx(
            Copy( st->mem_syn_r + L_SYN_MEM - M, st->mem_syn2_fx, M ); /* Qx */
        }
#ifdef HARMONIZE_2583_open_decoder_LPD
        ELSE IF( EQ_16( st->element_mode, EVS_MONO ) && ( !st->tcxonly && EQ_16( st->L_frame, L_FRAME16k ) && GT_32( st->last_total_brate, ACELP_32k ) ) )
        ELSE IF( EQ_16( st->element_mode, EVS_MONO ) && ( !st->tcxonly && EQ_16( st->L_frame, L_FRAME16k ) && GT_32( last_total_brate, ACELP_32k ) ) )
        {
            /* Float comment says: "update of lsf_old only needed in BASOP" - i assume it means "Update of lsf_old only needed in BASOP EVS" */
            lsp2lsf_fx( st->lsp_old_fx, st->lsf_old_fx, M, st->sr_core );
@@ -1761,7 +1765,7 @@ void open_decoder_LPD_ivas_fx(
        IF( hTcxDec != NULL )
        {
#ifdef HARMONIZE_2583_open_decoder_LPD
            hTcxDec->conceal_eof_gain = 32768 / 2; /*Q14*/
            hTcxDec->conceal_eof_gain = ONE_IN_Q14; /*Q14*/
            move16();
#endif
            hTcxDec->conceal_eof_gain32 = ONE_IN_Q30; /*Q30*/
@@ -2007,11 +2011,7 @@ void open_decoder_LPD_ivas_fx(
    {
        st->enablePlcWaveadjust = 1;
        move16();
#ifdef HARMONIZE_2583_open_decoder_LPD
        IF( st->hTcxDec != NULL && ( st->ini_frame == 0 || LT_32( st->last_total_brate, HQ_48k ) || EQ_16( st->last_codec_mode, MODE1 ) || st->force_lpd_reset ) )
#else
        IF( st->hTcxDec != NULL && ( st->ini_frame == 0 || LT_32( last_total_brate, HQ_48k ) || EQ_16( st->last_codec_mode, MODE1 ) || st->force_lpd_reset ) )
#endif
        {
            concealment_init_x( st->hTcxDec->L_frameTCX, st->hPlcInfo );
        }
+9 −15
Original line number Diff line number Diff line
@@ -12,11 +12,7 @@
void mode_switch_decoder_LPD_fx(
    Decoder_State *st,      /* i/o: decoder state structure           */
    Word16 bwidth,          /* i  : audio bandwidth                 Q0*/
#ifdef HARMONIZE_2583_open_decoder_LPD
    Word32 const total_brate, /* i  : total bitrate                   Q0*/
#else
    Word32 total_brate,     /* i  : total bitrate                   Q0*/
#endif
    Word16 frame_size_index /* i  : index determining the frame size  Q0*/
)
{
@@ -101,7 +97,7 @@ void mode_switch_decoder_LPD_fx(
        move16();
        move16();
        move16();
        open_decoder_LPD_fx( st, total_brate, bwidth, 0, 0, 0, &Q_syn_Overl_TDAC, &Q_fer_samples, &Q_syn_Overl_TDACFB, &Q_syn_OverlFB, &Q_old_out, &Q_old_outLB );
        open_decoder_LPD_fx( st, total_brate, st->last_total_brate, bwidth, 0, 0, 0, &Q_syn_Overl_TDAC, &Q_fer_samples, &Q_syn_Overl_TDACFB, &Q_syn_OverlFB, &Q_old_out, &Q_old_outLB );
#else
        open_decoder_LPD_fx( st, total_brate, bwidth, 0 );
#endif
@@ -254,9 +250,7 @@ void mode_switch_decoder_LPD_ivas_fx(
    Decoder_State *st,              /* i/o: decoder state structure                   */
    const Word16 bwidth,            /* i  : audio bandwidth                         Q0*/
    const Word32 total_brate,       /* i  : total bitrate                           Q0*/
#ifndef HARMONIZE_2583_open_decoder_LPD
    const Word32 last_total_brate,  /* i  : last frame total bitrate                Q0*/
#endif
    const Word16 frame_size_index,  /* i  : index determining the frame size        Q0*/
    const Word16 MCT_flag,          /* i  : hMCT handle allocated (1) or not (0)    Q0*/
    const Word16 last_element_mode, /* i  : last element mode                       Q0*/
@@ -347,7 +341,7 @@ void mode_switch_decoder_LPD_ivas_fx(
    IF( NE_16( fscale, st->fscale ) || switchWB || bSwitchFromAmrwbIO || EQ_16( st->last_codec_mode, MODE1 ) || st->force_lpd_reset )
    {
#ifdef HARMONIZE_2583_open_decoder_LPD
        open_decoder_LPD_fx( st, total_brate, bwidth, MCT_flag, last_element_mode, 0, Q_syn_Overl_TDAC, Q_fer_samples, Q_syn_Overl_TDACFB, Q_syn_OverlFB, Q_old_out, Q_old_outLB );
        open_decoder_LPD_fx( st, total_brate, last_total_brate, bwidth, MCT_flag, last_element_mode, 0, Q_syn_Overl_TDAC, Q_fer_samples, Q_syn_Overl_TDACFB, Q_syn_OverlFB, Q_old_out, Q_old_outLB );
#else
        open_decoder_LPD_ivas_fx( st, total_brate, last_total_brate, bwidth, MCT_flag, last_element_mode, 0, Q_syn_Overl_TDAC, Q_fer_samples, Q_syn_Overl, Q_syn_Overl_TDACFB, Q_syn_OverlFB, Q_old_out, Q_old_outLB, Q_old_Aq_12_8 );
#endif
+2 −2
Original line number Diff line number Diff line
@@ -889,7 +889,7 @@ ivas_error init_decoder_fx(
        move16();
        move16();
        move16();
        open_decoder_LPD_fx( st_fx, st_fx->total_brate, st_fx->bwidth, 0, 0, 1, &Q_syn_Overl_TDAC, &Q_fer_samples, &Q_syn_Overl_TDACFB, &Q_syn_OverlFB, &Q_old_out, &Q_old_outLB );
        open_decoder_LPD_fx( st_fx, st_fx->total_brate, st_fx->last_total_brate, st_fx->bwidth, 0, 0, 1, &Q_syn_Overl_TDAC, &Q_fer_samples, &Q_syn_Overl_TDACFB, &Q_syn_OverlFB, &Q_old_out, &Q_old_outLB );
#else
        open_decoder_LPD_fx( st_fx, st_fx->total_brate, st_fx->bwidth, 1 );
#endif
@@ -908,7 +908,7 @@ ivas_error init_decoder_fx(
        move16();
        move16();
#ifdef HARMONIZE_2583_open_decoder_LPD
        open_decoder_LPD_fx( st_fx, st_fx->total_brate, st_fx->bwidth, 0, st_fx->element_mode, 1, &Q_syn_Overl_TDAC, &Q_fer_samples, &Q_syn_Overl_TDACFB, &Q_syn_OverlFB, &Q_old_out, &Q_old_outLB );
        open_decoder_LPD_fx( st_fx, st_fx->total_brate, st_fx->last_total_brate, st_fx->bwidth, 0, st_fx->element_mode, 1, &Q_syn_Overl_TDAC, &Q_fer_samples, &Q_syn_Overl_TDACFB, &Q_syn_OverlFB, &Q_old_out, &Q_old_outLB );
#else
        open_decoder_LPD_ivas_fx( st_fx, st_fx->total_brate, st_fx->last_total_brate, st_fx->bwidth, 0, st_fx->element_mode, 1, &Q_syn_Overl_TDAC, &Q_fer_samples, &Q_syn_Overl, &Q_syn_Overl_TDACFB, &Q_syn_OverlFB, &Q_old_out, &Q_old_outLB, &Q_old_Aq_12_8 );
#endif
+13 −5
Original line number Diff line number Diff line
@@ -176,6 +176,9 @@ void stereo_tcx_init_dec_fx(
        stereo_tcx_dec_mode_switch_reconf_ivas_fx( st, MCT_flag, last_element_mode,
                                                   &st->hTcxDec->Q_syn_Overl_TDAC,
                                                   &st->hHQ_core->Q_fer_samples,
#ifndef HARMONIZE_2583_open_decoder_LPD
                                                   &st->hTcxDec->Q_syn_Overl,
#endif
                                                   &st->hTcxDec->Q_syn_Overl_TDACFB,
                                                   &st->hTcxDec->Q_syn_OverlFB,
                                                   &st->hHQ_core->Q_old_wtda,
@@ -908,6 +911,9 @@ static void stereo_tcx_dec_mode_switch_reconf_ivas_fx(
    const Word16 last_element_mode, /* i  : element mode of previous frame          Q0*/
    Word16 *Q_syn_Overl_TDAC,
    Word16 *Q_fer_samples,
#ifndef HARMONIZE_2583_open_decoder_LPD
    Word16 *Q_syn_Overl,
#endif
    Word16 *Q_syn_Overl_TDACFB,
    Word16 *Q_syn_OverlFB,
    Word16 *Q_old_out,
@@ -944,12 +950,11 @@ static void stereo_tcx_dec_mode_switch_reconf_ivas_fx(
    }

    /* Reconfigure Core */
    mode_switch_decoder_LPD_ivas_fx( st, st->bwidth, L_mult0( st->bits_frame_nominal, FRAMES_PER_SEC ), frame_size_index, MCT_flag, last_element_mode, Q_syn_Overl_TDAC, Q_fer_samples, Q_syn_Overl_TDACFB, Q_syn_OverlFB, Q_old_out, Q_old_outLB
#ifndef HARMONIZE_2583_open_decoder_LPD
                                     ,
                                     Q_old_Aq_12_8
#ifdef HARMONIZE_2583_open_decoder_LPD
    mode_switch_decoder_LPD_ivas_fx( st, st->bwidth, L_mult0( st->bits_frame_nominal, FRAMES_PER_SEC ), L_mult0( st->last_bits_frame_nominal, FRAMES_PER_SEC ), frame_size_index, MCT_flag, last_element_mode, Q_syn_Overl_TDAC, Q_fer_samples, Q_syn_Overl_TDACFB, Q_syn_OverlFB, Q_old_out, Q_old_outLB );
#else
    mode_switch_decoder_LPD_ivas_fx( st, st->bwidth, L_mult0( st->bits_frame_nominal, FRAMES_PER_SEC ), L_mult0( st->last_bits_frame_nominal, FRAMES_PER_SEC ), frame_size_index, MCT_flag, last_element_mode, Q_syn_Overl_TDAC, Q_fer_samples, Q_syn_Overl, Q_syn_Overl_TDACFB, Q_syn_OverlFB, Q_old_out, Q_old_outLB, Q_old_Aq_12_8 );
#endif
    );

    return;
}
@@ -1025,6 +1030,9 @@ static void dec_prm_tcx_ivas_fx(
#endif
            stereo_tcx_dec_mode_switch_reconf_ivas_fx( st, 0, last_element_mode, &st->hTcxDec->Q_syn_Overl_TDAC,
                                                       &st->hHQ_core->Q_fer_samples,
#ifndef HARMONIZE_2583_open_decoder_LPD
                                                       &st->hTcxDec->Q_syn_Overl,
#endif
                                                       &st->hTcxDec->Q_syn_Overl_TDACFB,
                                                       &st->hTcxDec->Q_syn_OverlFB,
                                                       &st->hHQ_core->Q_old_wtda,