Commit d4a62614 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Fixes issue 585 by correcting condition

parent ce26b0c9
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -5121,6 +5121,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 FIX_585_MASA_2TC_DTX_EXT
    ,
    const int16_t nchan_remapped                                /* i  : number of transports used in core               */
#endif
);


+1 −0
Original line number Diff line number Diff line
@@ -161,6 +161,7 @@
#define ISM_FB_16k4                                     /* VA: Issue: 579: change BW from SWB to FB in NxISM conditions to match the EVS codec */
#define FIX_580_PARAMMC_ENER_BURSTS                     /* FhG: issue 580: energy bursts due to ILD holding when energy relations change too much */

#define FIX_585_MASA_2TC_DTX_EXT                        /* Nokia: issue 585: fixes transition artifacts in MASA 2TC DTX by applying correct condition */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+4 −0
Original line number Diff line number Diff line
@@ -390,7 +390,11 @@ ivas_error ivas_dec(

        if ( st_ivas->ivas_format == MASA_FORMAT )
        {
#ifdef 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 ) )
        {
+4 −0
Original line number Diff line number Diff line
@@ -292,7 +292,11 @@ ivas_error ivas_jbm_dec_tc(

        if ( st_ivas->ivas_format == MASA_FORMAT )
        {
#ifdef 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 ) )
        {
+9 −1
Original line number Diff line number Diff line
@@ -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 FIX_585_MASA_2TC_DTX_EXT
    ,
    const int16_t nchan_remapped /* i  : number of transports used in core          */
#endif
)
{
#ifdef 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 )
        {