diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 5ef73792aa5da25651fc53a9c256c82bd5c7bf97..a84cf477f81463086eaca16592407ece81580ceb 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5142,6 +5142,10 @@ void ivas_masa_prerender( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float output[][L_FRAME48k], /* i/o: synthesized core-coder transport channels */ const int16_t output_frame /* i : output frame length per channel */ +#ifdef CR_FIX_585_MASA_2TC_DTX_EXT + , + const int16_t nchan_remapped /* i : number of transports used in core */ +#endif ); diff --git a/lib_com/options.h b/lib_com/options.h index c7204c05fad403821b5f831a45e0020853e976df..ad3554576e5dd6c8eeb803647b752321e83be9de 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -183,6 +183,7 @@ /* #################### Start NON-BE CR switches ########################## */ /* any switch which is non-be wrt operation points tested in selection */ /* all switches in this category should start with "CR_" */ +#define CR_FIX_585_MASA_2TC_DTX_EXT /* Nokia: issue 585: fixes transition artifacts in MASA 2TC DTX by applying correct condition */ /* ##################### End NON-BE CR switches ########################### */ diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 2b88822d06b199f52f56cd64acbcbbe1ac071aa5..3618658b90f29f422728c5096c39810ab6977272 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -390,7 +390,11 @@ ivas_error ivas_dec( if ( st_ivas->ivas_format == MASA_FORMAT ) { +#ifdef CR_FIX_585_MASA_2TC_DTX_EXT + ivas_masa_prerender( st_ivas, output, output_frame, nchan_remapped ); +#else ivas_masa_prerender( st_ivas, output, output_frame ); +#endif } else if ( st_ivas->ivas_format == SBA_FORMAT && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) { diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 712a88f114fd9ba2b6201f3bb72933b10fb8c17b..40f077c3c8f343355de4f743bfb74ef8c65f0cc4 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -292,7 +292,11 @@ ivas_error ivas_jbm_dec_tc( if ( st_ivas->ivas_format == MASA_FORMAT ) { +#ifdef CR_FIX_585_MASA_2TC_DTX_EXT + ivas_masa_prerender( st_ivas, output, output_frame, nchan_remapped ); +#else ivas_masa_prerender( st_ivas, output, output_frame ); +#endif } else if ( st_ivas->ivas_format == SBA_FORMAT && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) { diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index 0576fe8121f4d2ae294dca9dd52348f1ef128684..d44d81d54e438f1d2ada0b070014a73f7121b6fc 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -566,9 +566,17 @@ void ivas_masa_prerender( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float output[][L_FRAME48k], /* i/o: synthesized core-coder transport channels */ const int16_t output_frame /* i : output frame length per channel */ +#ifdef CR_FIX_585_MASA_2TC_DTX_EXT + , + const int16_t nchan_remapped /* i : number of transports used in core */ +#endif ) { +#ifdef CR_FIX_585_MASA_2TC_DTX_EXT + if ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->nchan_transport == 2 && nchan_remapped == 1 ) +#else if ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->nchan_transport == 2 && st_ivas->hDecoderConfig->ivas_total_brate < MASA_STEREO_MIN_BITRATE ) +#endif { if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) {