Commit e8db1919 authored by bayers's avatar bayers
Browse files

fix asan problem with MONO/STEREO output caused by a missing update of

the SFB tables in the LS conversion at a bit rate switch within ParamMC
parent d49c0a53
Loading
Loading
Loading
Loading
Loading
+21 −15
Original line number Diff line number Diff line
@@ -686,9 +686,10 @@ ivas_error ivas_param_mc_dec_reconfig(

    /* prototype signal computation */

    if ( ( nchan_transport_old != nchan_transport ) && hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO )
    if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO )
    {
        if ( nchan_transport_old != nchan_transport )
        {

            if ( st_ivas->hLsSetUpConversion != NULL )
            {
                ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion );
@@ -706,6 +707,7 @@ ivas_error ivas_param_mc_dec_reconfig(
            {
                mvr2r( st_ivas->hLsSetUpConversion->dmxMtx[k], &hParamMC->ls_conv_dmx_matrix[k * nchan_out_cov], nchan_out_cov );
            }
        }
        /* convert ParamMC parameter bands to SFB */

        st_ivas->hLsSetUpConversion->sfbCnt = hParamMC->num_param_bands_synth;
@@ -713,6 +715,10 @@ ivas_error ivas_param_mc_dec_reconfig(
        {
            st_ivas->hLsSetUpConversion->sfbOffset[k] = PARAM_MC_BAND_TO_MDCT_BAND_RATIO * hParamMC->band_grouping[k];
        }
        for ( ; k < MAX_SFB + 2; k++ )
        {
            st_ivas->hLsSetUpConversion->sfbOffset[k] = 0;
        }
    }

    if ( nchan_transport_old != nchan_transport )