Commit c73e3650 authored by vaillancour's avatar vaillancour
Browse files

addresssing comments

parent 7e255881
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1020,7 +1020,11 @@ void highband_exc_dct_in_fx(
#endif


#ifdef FIX_1904_HARM_GSC_ENC
void highband_exc_dct_in_fx(
#else
void highband_exc_dct_in_ivas_fx(
#endif
    const Word32 core_brate,         /* i  : core bitrate                            */
    const Word16 *mfreq_bindiv,      /* i  : bin per bands tables                    */
    Word16 last_bin,                 /* i  : last bin of bit allocation              */
+2 −3
Original line number Diff line number Diff line
@@ -5047,7 +5047,6 @@ void freq_dnw_scaling_fx(
    Word16 Qx,                     /* Q format of fy_norm*/
    const Word16 L_frame           /* i  : frame length                  */
);
#ifndef FIX_1904_HARM_GSC_ENC
void highband_exc_dct_in_fx(
    const Word32 core_brate,         /* i  : core bitrate                            */
    const Word16 *mfreq_bindiv,      /* i  : bin per bands tables                    */
@@ -5079,8 +5078,7 @@ void highband_exc_dct_in_fx(
    const Word16 element_mode,   /* i  : IVAS element mode                       */
    const Word16 GSC_IVAS_mode   /* i  : GSC IVAS mode                           */
);
#endif
#ifndef FIX_1904_HARM_GSC_ENC
void highband_exc_dct_in_ivas_fx(
    const Word32 core_brate,         /* i  : core bitrate                            */
    const Word16 *mfreq_bindiv,      /* i  : bin per bands tables                    */
@@ -5112,6 +5110,7 @@ void highband_exc_dct_in_ivas_fx(
    const Word16 element_mode,   /* i  : IVAS element mode                       */
    const Word16 GSC_IVAS_mode   /* i  : GSC IVAS mode                           */
);
#endif
void lsf_dec_bfi(
    const Word16 codec_mode,      /* i: : codec mode: MODE1 | MODE2              */
+7 −2
Original line number Diff line number Diff line
@@ -860,12 +860,17 @@ void gsc_dec_fx(
    /*--------------------------------------------------------------------------------------*
     * Estimate noise level
     *--------------------------------------------------------------------------------------*/

#ifdef FIX_1904_HARM_GSC_ENC
    highband_exc_dct_in_fx( st_fx->core_brate, mfreq_bindiv_loc, *last_bin, Diff_len, hGSCDec->noise_lev, pit_band_idx, exc_diffQ,
                                 &hGSCDec->seed_tcx, Ener_per_bd_iQ, nb_subfr, exc_dct_in, st_fx->last_coder_type, bitallocation_band, lsf_new,
                                 hGSCDec->last_exc_dct_in_fx, &hGSCDec->last_ener_fx, hGSCDec->last_bitallocation_band, bitallocation_exc, st_fx->bfi, coder_type,
                                 st_fx->bwidth, exc_wo_nf, Qexc_diffQ, Q_exc, st_fx->GSC_noisy_speech, hGSCDec->lt_ener_per_band_fx, st_fx->L_frame, st_fx->element_mode, st_fx->GSC_IVAS_mode );
#else
    highband_exc_dct_in_ivas_fx( st_fx->core_brate, mfreq_bindiv_loc, *last_bin, Diff_len, hGSCDec->noise_lev, pit_band_idx, exc_diffQ,
                                 &hGSCDec->seed_tcx, Ener_per_bd_iQ, nb_subfr, exc_dct_in, st_fx->last_coder_type, bitallocation_band, lsf_new,
                                 hGSCDec->last_exc_dct_in_fx, &hGSCDec->last_ener_fx, hGSCDec->last_bitallocation_band, bitallocation_exc, st_fx->bfi, coder_type,
                                 st_fx->bwidth, exc_wo_nf, Qexc_diffQ, Q_exc, st_fx->GSC_noisy_speech, hGSCDec->lt_ener_per_band_fx, st_fx->L_frame, st_fx->element_mode, st_fx->GSC_IVAS_mode );

#endif
    exc_dct_in[0] = 0;
    move16();

+4 −4
Original line number Diff line number Diff line
@@ -385,7 +385,7 @@ void encod_audio_fx(
#ifdef FIX_1904_HARM_GSC_ENC
    IF( NE_16( st_fx->element_mode, EVS_MONO ) )
    {
        Scale_sig( exc, st_fx->L_frame, sub( Q_new, Q_exc ) ); /* TV This could probably be removed, tbc */
        Scale_sig( exc, st_fx->L_frame, sub( Q_new, Q_exc ) ); /* TV This could probably be removed, but won't be BE */
        Scale_sig( exc_wo_nf, st_fx->L_frame, sub( Q_new, Q_exc ) );
    }
#endif
@@ -993,7 +993,7 @@ void gsc_enc_fx(
        i--;
    }
#ifdef FIX_1904_HARM_GSC_ENC
    IF( NE_16( st_fx->element_mode, EVS_MONO ) ) /* This could be harmonized, but won't be mathematically BE */
    IF( NE_16( st_fx->element_mode, EVS_MONO ) ) /* This could be harmonized, but won't be BE */
    {
        mean_gain = gsc_gainQ_ivas_fx( hBstr, st_fx->element_mode, st_fx->idchan, Ener_per_bd_iQ, Ener_per_bd_iQ, brate_intermed_tbl[i], st_fx->coder_type, st_fx->bwidth, st_fx->L_frame, st_fx->tdm_LRTD_flag, st_fx->core_brate );
        *tmp_noise = mult( mean_gain, 20480 ); // 20480 => 10 in Q11
@@ -1170,7 +1170,7 @@ void gsc_enc_fx(
    }

#ifdef FIX_1904_HARM_GSC_ENC
    IF( NE_16( st_fx->element_mode, EVS_MONO ) ) /* This could be harmonized, but won't be mathematically BE */
    IF( NE_16( st_fx->element_mode, EVS_MONO ) ) /* This could be harmonized, but won't be BE */
    {
        Word16 Q_exc_new = s_min( *Q_exc, hGSCEnc->Q_last_exc_dct_in );
        IF( NE_16( Q_exc_new, hGSCEnc->Q_last_exc_dct_in ) )
@@ -1193,7 +1193,7 @@ void gsc_enc_fx(
     *--------------------------------------------------------------------------------------*/

#ifdef FIX_1904_HARM_GSC_ENC
    highband_exc_dct_in_ivas_fx( st_fx->core_brate, mfreq_bindiv_loc, last_bin, Diff_len, hGSCEnc->noise_lev, tmp_band, exc_diffQ /* Q12 */, &hGSCEnc->seed_tcx, Ener_per_bd_iQ, nb_subfr, exc_dct_in /* Q_exc */,
    highband_exc_dct_in_fx( st_fx->core_brate, mfreq_bindiv_loc, last_bin, Diff_len, hGSCEnc->noise_lev, tmp_band, exc_diffQ /* Q12 */, &hGSCEnc->seed_tcx, Ener_per_bd_iQ, nb_subfr, exc_dct_in /* Q_exc */,
                                 st_fx->last_coder_type, bitallocation_band, lsf_new /* x2.56 */, hGSCEnc->last_exc_dct_in_fx /* Q_exc */, &hGSCEnc->last_ener_fx /* Q0 */, hGSCEnc->last_bitallocation_band, bitallocation_exc, 0, st_fx->coder_type,
                                 st_fx->bwidth, exc_wo_nf, Q_concat, Q_exc, st_fx->GSC_noisy_speech, NULL, st_fx->L_frame, st_fx->element_mode, st_fx->GSC_IVAS_mode );
#else