Commit 67a77ab8 authored by vaillancour's avatar vaillancour
Browse files

correct some spelling error

parent 02afb3ed
Loading
Loading
Loading
Loading
+16 −16
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ int16_t stereo_tdm_ener_analysis(
    Get_LR_rms( Left_in, Right_in, input_frame, &rms_L, &rms_R );

    /*----------------------------------------------------------------*
     * Compute the 1st order energy difference difference
     * Compute the 1st order energy difference
     * Compute the gain of L&R channel compared to mono
     * - estimate the long term evolution of the L to Mono gain
     * - estimate the long term evolution of the R to Mono gain
@@ -670,7 +670,7 @@ static int16_t Get_dt_lt_ener(
     * The minimum if the auto-correlation of left and right channel 
     * has some correlation but are not highly correlated ]0.85,0.92[
     * the long term energy difference between side and mono is > 2.0 or 
     * the the instantaneous energy difference between side and mono is > 2.5 
     * the instantaneous energy difference between side and mono is > 2.5 
     * and the VAD hangover of the primary channel is <= 1 
     * and the VAD hangover of the secondary channel is <= 3 
     * and the input signal is considered having some correlation (normal TD)
@@ -696,7 +696,7 @@ static int16_t Get_dt_lt_ener(
     *       or the secondary channel is larger than 64 
     *     then,
     *       the flag allowing preliminary switching to SM mode is set to 1
     *       and the hysteriesis is reset to 0
     *       and the hysteresis is reset to 0
     *     else if the hysteresis is >= 20 and the temporary SM flag 
     *       has been set to 0 above and the pitch stability of the primary 
     *       or the secondary channel is larger than 64 and the long 
@@ -704,7 +704,7 @@ static int16_t Get_dt_lt_ener(
     *       or the instantaneous energy difference between side and mono is <-10 
     *     then,
     *       the flag allowing preliminary switching to SM mode is set to 0
     *       and the hysteriesis is reset to 0
     *       and the hysteresis is reset to 0
     *----------------------------------------------------------------*/
    if ( IsSideMono == 0 )
    {
@@ -888,7 +888,7 @@ static float Comp_diff_lt_corr(
     * correlation (LRTD), and the left or the right channel has more 
     * than the double of long term energy than the other channel, 
     * then the maximum long term energy between left and right will 
     * be choosen to set up the adaption rate. 
     * be chosen to set up the adaption rate. 
     * for all the other cases, the minimum between the 2 channel 
     * long term energy will be used
     *----------------------------------------------------------------*/
@@ -924,7 +924,7 @@ static float Comp_diff_lt_corr(
        * In case of switching from a different stereo mode or 
        * if on of the channel has very low energy and the signal is 
        * considered as having a low correlation (LRTD) and the maximum 
        * long term energy betweenm the 2 channel is below 10
        * long term energy between the 2 channel is below 10
        * then speed up the adaptation rate
        *----------------------------------------------------------------*/
        if ( hCPE->last_element_mode != IVAS_CPE_TD || ( ( tdm_lt_rms_R < 1.0f || tdm_lt_rms_L < 1.0f ) && hCPE->hStereoClassif->lrtd_mode == 1 && max( tdm_lt_rms_R, tdm_lt_rms_L ) < 10.0f ) )
@@ -937,7 +937,7 @@ static float Comp_diff_lt_corr(
        * Compute the short term correlation to mono difference 
        * Then compute the instantaneous ratio between L and R channel. 
        * The instantaneous ratio is used for bit rate distribution in case of LRTD, 
        * while a more convservative ratio is found later and used for downmixing purpose
        * while a more conservative ratio is found later and used for downmixing purpose
        *----------------------------------------------------------------*/
        d_lt_corr_raw = ( adaprate_tmp * corr_LM + madaprate * *tdm_lt_corr_LM ) -
                        ( adaprate_tmp * corr_RM + madaprate * *tdm_lt_corr_RM ); /* Short term smooth correlation differences to mono */
@@ -974,7 +974,7 @@ static float Comp_diff_lt_corr(
     *    amplified by a factor of 2.5  
     *
     * else if the energy differential of both channel are going in the 
     * same direction and the variation of the correlation diffirence 
     * same direction and the variation of the correlation difference 
     * is low  and the energy of at least one channel is not too low
     * then, 
     *    the long term corr uses the values estimated above  
@@ -1074,7 +1074,7 @@ static int16_t limit_idx_Dwnmix(
static int16_t limit_idx_NoDwnmix(
    const int16_t idx_in,          /* i  : Index */
    const int16_t side_can_change, /* i  : Primary and secondary channel allowed to change ? */
    const float d_lt_corr_raw      /* i  : Raw corrrelation differences */
    const float d_lt_corr_raw      /* i  : Raw correlation differences */
)
{
    int16_t idx;
@@ -1142,7 +1142,7 @@ static int16_t stereo_tdm_ener_analysis_SM(
    Get_LR_rms( sts[0]->input, sts[1]->input, input_frame, &rms_L, &rms_R );

    /*----------------------------------------------------------------*
     * Compute the 1st order energy difference difference
     * Compute the 1st order energy difference
     * Compute the gain of L&R channel compared to mono
     * - estimate the long term evolution of the L to Mono gain
     * - estimate the long term evolution of the R to Mono gain
@@ -1293,11 +1293,11 @@ int16_t tdm_lp_comparison(
    ener_sig = log10f( sum2_f( speech, L_frame ) + 0.01f );
    predgain_SCh = 10.0f * ( ener_sig - log10f( sum2_f( res, L_frame ) + 0.01f ) );

    /* Find prediction gain when resuing the Primary Channel LP filter */
    /* Find prediction gain when reusing the Primary Channel LP filter */
    residu( A_PCh, m, speech, res, L_frame );
    pred_gain_reuse_PCh = 10.0f * ( ener_sig - log10f( sum2_f( res, L_frame ) + 0.01f ) );

    /* Find Euclidian distance between the 2 filters */
    /* Find Euclidean distance between the 2 filters */
    dist = 0;
    for ( i = 0; i < m; i++ )
    {
@@ -1306,12 +1306,12 @@ int16_t tdm_lp_comparison(
    }
    ener_sig *= 10.0f;

    /* Verification of the filters similartiies and prediction gain obtained for each channel */
    /* Verification of the filters similarities and prediction gain obtained for each channel */
    /* Threshold are more relax if alpha is close to 0.5  (Valid if ICA is used )             */
    if ( ( ( pred_gain_reuse_PCh >= RATIO_PG * predgain_SCh && dist < EUCLDST )                                                                       /* Prediction gain are close & Euclidian dist is small */
           || ( predgain_SCh < PG2ND && dist < EUCLDST2 ) )                                                                                           /* Prediction gain if the secondary channel is low  & Euclidian dist is not too large */
    if ( ( ( pred_gain_reuse_PCh >= RATIO_PG * predgain_SCh && dist < EUCLDST )                                                                       /* Prediction gain are close & Euclidean dist is small */
           || ( predgain_SCh < PG2ND && dist < EUCLDST2 ) )                                                                                           /* Prediction gain if the secondary channel is low  & Euclidean dist is not too large */
         || ( hStereoTD->tdm_last_ratio_idx >= ( LRTD_STEREO_MID_IS_PRIM - 2 ) && hStereoTD->tdm_last_ratio_idx <= ( LRTD_STEREO_MID_IS_PRIM + 2 ) && /* ratio between 0.4 and 0.6 */
              ( ( pred_gain_reuse_PCh >= RATIO_PG2 * predgain_SCh && dist < EUCLDST2 ) || predgain_SCh < PG2ND2 ) )                                   /* Prediction gain are not far  & Euclidian dist is not too large or  Prediction gain if the secondary channel is low  */
              ( ( pred_gain_reuse_PCh >= RATIO_PG2 * predgain_SCh && dist < EUCLDST2 ) || predgain_SCh < PG2ND2 ) )                                   /* Prediction gain are not far  & Euclidean dist is not too large or  Prediction gain if the secondary channel is low  */
         || ener_sig <= 30.0f                                                                                                                         /* secondary channel has low energy */
    )
    {