diff --git a/lib_com/options.h b/lib_com/options.h index 9b03463a181acdc36ccd7594187aac3a70b3d32e..47398d087edd01542924b0297b1956fa70f684bb 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -144,7 +144,7 @@ /* ################### Start FIXES switches ########################### */ #define NONBE_FIX_864_JBM_RENDER_FRAMESIZE /* FhG: issue #864: fix different behaviour of JBM TSM with different render frame sizes */ - +#define NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT /* FhG: apply correct TCX5 grouping/interleaving when input_fs != output_fs */ /* #################### End FIXES switches ############################ */ diff --git a/lib_dec/dec_tcx.c b/lib_dec/dec_tcx.c index f68ba522bb0f2bab761e3d9abb5f2cddf46e8d17..fbe24112827c066ce6d1fa1de4e7d37eb8e21940 100644 --- a/lib_dec/dec_tcx.c +++ b/lib_dec/dec_tcx.c @@ -1501,7 +1501,11 @@ void decoder_tcx_tns( hTcxCfg->tcx_last_overlap_mode = hTcxCfg->tcx_curr_overlap_mode; } +#ifdef NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT + if ( ( hTcxCfg->fIsTNSAllowed && fUseTns != 0 && bfi != 1 && whitenedDomain ) || ( L_spec > L_frameTCX ) ) +#else if ( ( hTcxCfg->fIsTNSAllowed && fUseTns != 0 && bfi != 1 ) || ( L_spec > L_frameTCX ) ) +#endif { L = L_spec; } @@ -1543,7 +1547,12 @@ void decoder_tcx_tns( if ( ( L_frame == st->L_frame >> 1 ) && st->tcxonly && isTCX5 ) { + +#ifdef NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT + if ( st->element_mode == EVS_MONO || ( L_spec < L_frameTCX && !whitenedDomain ) ) /* todo: this is temporary to maintain EVS BE, this is a bug and should be fixed also for EVS (see issue 13) */ +#else if ( st->element_mode == EVS_MONO || L_spec < L_frameTCX ) /* todo: this is temporary to maintain EVS BE, this is a bug and should be fixed also for EVS (see issue 13) */ +#endif { tcx5TnsUngrouping( L_frameTCX >> 1, hTcxCfg->tnsConfig[0][0].iFilterBorders[0] >> 1, x, DEC ); }