Commit 6d8d514d authored by Jan Kiene's avatar Jan Kiene
Browse files

fix for clicks in MDCT-Stereo DTX to mono

parent 084e3e7f
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@
#define NONBE_FIX_849_OMASA_BFI_CRASH                         /* VA: issue 849: fix OMASA 2TC and FEC crashes */

#define NONBE_UNIFIED_DECODING_PATHS                          /* FhG: unify decoding paths   */
#define NONBE_FIX_MDCT_STEREO_DTX_MONO_OUT                    /* FhG: fix clicks in DTX -> active transition frames in MDCT-Stereo with mono output */

/* ##################### End NON-BE switches ########################### */

+7 −0
Original line number Diff line number Diff line
@@ -1302,6 +1302,13 @@ void synchro_synthesis(
            }
        }

#ifdef NONBE_FIX_MDCT_STEREO_DTX_MONO_OUT
        if ( hCPE->element_mode == IVAS_CPE_MDCT && hCPE->nchan_out == 1 && !is_DTXrate( hCPE->element_brate ) && is_DTXrate( hCPE->last_element_brate ) )
        {
            mvr2r( sts[0]->prev_synth_buffer, sts[1]->prev_synth_buffer, delay_comp_DFT + delay_diff );
        }
#endif

        nChannels = ( hCPE->element_mode == IVAS_CPE_MDCT ) ? 2 : hCPE->nchan_out;
        for ( n = 0; n < nChannels; n++ )
        {