Commit 2bf8f020 authored by PLAINSI's avatar PLAINSI
Browse files

Merge branch '468-msan-error-in-mc-param-upmix-encoder-for-wb' into 'main'

Resolve "Msan error in MC param upmix encoder for WB"

See merge request !663
parents 338cf486 5609254b
Loading
Loading
Loading
Loading
Loading

lib_com/options.h

100755 → 100644
+1 −0
Original line number Diff line number Diff line
@@ -162,6 +162,7 @@

#define FIX_HBR_MASAMETA                                /* Nokia: Fixes to HBR MASA metadata at 384 and 512 kbps. Addresses issues 438 and 477 as well. */
#define FIX_482_DUMMYDEC_INIT                           /* Nokia: fix issue #428: missing inits for dummyDec in IVAS_rend */
#define FIX_468_16KHZ_PUPMIX                            /* Dlb: Fix issue 468 for Param Upmix at 16kHz sampling rate */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+24 −2
Original line number Diff line number Diff line
@@ -729,6 +729,9 @@ static void ivas_mc_paramupmix_param_est_enc(

    int16_t l_ts;
    int16_t b, i, j, ts, bnd;
#ifdef FIX_468_16KHZ_PUPMIX
    int16_t maxbands;
#endif

    int16_t transient_det[MC_PARAMUPMIX_COMBINATIONS][2];
    int16_t transient_det_l[2], transient_det_r[2];
@@ -804,11 +807,18 @@ static void ivas_mc_paramupmix_param_est_enc(
        }
        ivas_enc_cov_handler_process( hMCParamUpmix->hCovEnc[b], pp_in_fr_real, pp_in_fr_imag, cov_real, cov_dtx_real, hMCParamUpmix->hFbMixer->pFb, 0, hMCParamUpmix->hFbMixer->pFb->filterbank_num_bands, MC_PARAMUPMIX_NCH, 0 /*dtx_vad*/, transient_det[b], HOA_md_ind );
    }

#ifdef FIX_468_16KHZ_PUPMIX
    maxbands = hMCParamUpmix->hFbMixer->pFb->filterbank_num_bands;
    for ( b = 0; b < MC_PARAMUPMIX_COMBINATIONS; b++ )
    {
        for ( bnd = 0; bnd < maxbands; bnd++ )
        {
#else
    for ( b = 0; b < MC_PARAMUPMIX_COMBINATIONS; b++ )
    {
        for ( bnd = 0; bnd < IVAS_MAX_NUM_BANDS; bnd++ )
        {
#endif
            rxy = hMCParamUpmix->cov_real[b][1][0][bnd];
            ryy = hMCParamUpmix->cov_real[b][1][1][bnd];
            cmat = rxy / ( ryy + EPSILON );
@@ -822,6 +832,18 @@ static void ivas_mc_paramupmix_param_est_enc(
            betas[b][bnd] = (float) 2.0 * wetaux;
        }
    }

#ifdef FIX_468_16KHZ_PUPMIX
    if ( maxbands < IVAS_MAX_NUM_BANDS )
    {
        for ( b = 0; b < MC_PARAMUPMIX_COMBINATIONS; b++ )
        {
            for ( bnd = maxbands; bnd < IVAS_MAX_NUM_BANDS; bnd++ )
            {
                alphas[b][bnd] = 0.0;
                betas[b][bnd] = 0.0;
            }
        }
    }
#endif
    return;
}