Commit eaa1b17e authored by Jouni Paulus's avatar Jouni Paulus
Browse files

Merge branch '585-masa-2tc-dtx-to-ext-output-has-transition-artifacts' into 'main'

[non-BE] Resolve "MASA 2TC DTX to EXT output has transition artifacts"

See merge request !798
parents 528fa2d3 fd9ae9fd
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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
);


+1 −0
Original line number Diff line number Diff line
@@ -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 ########################### */
+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 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 ) )
        {
+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 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 ) )
        {
+8 −0
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 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 )
        {