Commit 51f37f4f authored by fotopoulou's avatar fotopoulou
Browse files

[fix] move TCX5 grouping under proper conditions. Under FIX_I13_TCX_TNS_ISSUE....

[fix] move TCX5 grouping under proper conditions. Under FIX_I13_TCX_TNS_ISSUE. Differences with fix before are negligible
parent 2f19f341
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1531,11 +1531,12 @@ void decoder_tcx_tns(
            isTCX5 = 1;

            tcx5SpectrumDeinterleaving( L >> 1, x );

#ifndef FIX_I13_TCX_TNS_ISSUE
            if ( hTcxCfg->fIsTNSAllowed && fUseTns != 0 && bfi != 1 && tnsData->tnsOnWhitenedSpectra == whitenedDomain )
            {
                tcx5TnsGrouping( L >> 1, hTcxCfg->tnsConfig[0][0].iFilterBorders[0] >> 1, x );
            }
#endif
        }
    }

@@ -1553,6 +1554,13 @@ void decoder_tcx_tns(
        /* Apply TNS to get the reconstructed signal */
        SetTnsConfig( hTcxCfg, L_frame_glob == st->L_frame, ( st->last_core == ACELP_CORE ) && ( frame_cnt == 0 ) );

#ifdef FIX_I13_TCX_TNS_ISSUE
        if ( ( L_frame == st->L_frame >> 1 ) && st->tcxonly && isTCX5 )
        {
            tcx5TnsGrouping( L >> 1, hTcxCfg->tnsConfig[0][0].iFilterBorders[0] >> 1, x );
        }
#endif

        ApplyTnsFilter( hTcxCfg->pCurrentTnsConfig, tnsData, x, 0 );
#ifdef DEBUG_PLOT
        sendDebout( "tnsSpec2", L_frameTCX, 1, "aftTNS", MTV_FLOAT, x );