Commit 6c9382ad authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'masa_ltv_fixes_omasa_msan_fix_masa_ext_dirac_rend_conv' into 'main'

MASA LTV crash issue fixes, OMASA+ISM msan fixes, MASA ext dirac render conv.

See merge request !324
parents b743414f 82816a28
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -114,6 +114,10 @@ ivas_error core_switching_pre_dec_ivas_fx(

        IF( st->hBWE_TD != NULL && NE_16( st->last_core, ACELP_CORE ) )
        {
#ifdef MSAN_FIX
            st->hBWE_TD->prev_hb_synth_fx_exp = 31;
            move16();
#endif // MSAN_FIX
            /* reset BWE memories */
            set16_fx( st->hBWE_TD->old_bwe_exc_fx, 0, PIT16k_MAX * 2 );
            st->hBWE_TD->bwe_non_lin_prev_scale_fx = 0;
+1 −2
Original line number Diff line number Diff line
@@ -294,10 +294,9 @@ static void gain_dec_gacelp_uv_fx(
     /* gain_inov = 1.0f / sqrt((dot_product(code, code, L_SUBFR) + 0.01) / L_SUBFR) */
    L_tmp = calc_gain_inov(code, lcode, NULL, NULL);
    *gain_inov = round_fx(L_shl(L_tmp, 15 - 3));  /* gain_inov in Q12 */

    /* gcode = pred_nrg_frame * (*gain_inov); */
    L_tmp = Mpy_32_16_1(pred_nrg_frame, *gain_inov); /* 18Q13 */
    i = norm_l(L_tmp);
    i = sub(norm_l(L_tmp),1); //gaurd-bits
    g_code = round_fx(L_shl(L_tmp, i));
    exp_gcode = sub(18, i);

+9 −0
Original line number Diff line number Diff line
@@ -529,6 +529,9 @@ ivas_error init_decoder_fx(
#endif
              st_fx->output_Fs);

#ifdef MSAN_FIX
        st_fx->hBWE_TD->prev_hb_synth_fx_exp = 31;
#endif
    }
    ELSE
    {
@@ -1279,6 +1282,9 @@ ivas_error init_decoder_ivas_fx(
		 }

     hf_synth_init_fx(st_fx->hBWE_zero);
#ifdef MSAN_FIX
            set16_fx( st_fx->hBWE_zero->mem_hp400_fx, 0, 6 );
#endif
	 }
	 ELSE
	 {
@@ -1424,6 +1430,9 @@ ivas_error init_decoder_ivas_fx(
		 }

         td_bwe_dec_init_ivas_fx(st_fx, st_fx->hBWE_TD, st_fx->output_Fs);
#ifdef MSAN_FIX
		 st_fx->hBWE_TD->prev_hb_synth_fx_exp = 31;
#endif
	 }
	 ELSE
	 {
+5 −5
Original line number Diff line number Diff line
@@ -5523,13 +5523,13 @@ void ivas_dirac_dec_render_sf_fx(
                    st_ivas->cldfbSynDec[idx_in]->Q_cldfb_state = Q6 - 1;
                    move16();

                    // Scaling the output to Q10
                    scale_sig32(output_buf_fx[ch], samplesToProcess + index_slot * hSpatParamRendCom->num_freq_bands, Q10 - Q11 );
                    // Scaling the output to Q8
                    scale_sig32(output_buf_fx[ch], samplesToProcess + index_slot * hSpatParamRendCom->num_freq_bands, Q8 - Q11 );

                    cldfbSynthesis_ivas_fx( RealBuffer_fx, ImagBuffer_fx, p_out, samplesToProcess, st_ivas->cldfbSynDec[idx_in] );

                    // Scaling output from Q6-1 to Q10
                    scale_sig32(p_out, out_len, (Q10 - (Q6 - 1)));
                    // Scaling output from Q6-1 to Q8
                    scale_sig32(p_out, out_len, (Q8 - (Q6 - 1)));

#if 1 /* TODO: remove fixed to float */
                    fixedToFloat_arrL(st_ivas->cldfbSynDec[idx_in]->cldfb_state_fx, st_ivas->cldfbSynDec[idx_in]->cldfb_state, st_ivas->cldfbSynDec[idx_in]->Q_cldfb_state, st_ivas->cldfbSynDec[idx_in]->p_filter_length);
@@ -5846,7 +5846,7 @@ void ivas_dirac_dec_render_sf_fx(
                ELSE
                {
                    // Fixed to float
                    fixedToFloat_arrL(output_buf_fx[ch], output_f[ch], Q10, hSpatParamRendCom->num_freq_bands * hSpatParamRendCom->subframe_nbslots[subframe_idx] + index_slot * hSpatParamRendCom->num_freq_bands);
                    fixedToFloat_arrL(output_buf_fx[ch], output_f[ch], Q8, hSpatParamRendCom->num_freq_bands * hSpatParamRendCom->subframe_nbslots[subframe_idx] + index_slot * hSpatParamRendCom->num_freq_bands);
                }
            }
        }
+5 −0
Original line number Diff line number Diff line
@@ -715,6 +715,9 @@ static ivas_error ivas_param_ism_rendering_init(
    {
        set32_fx( hParamIsmRendering->mixing_matrix_lin_old_fx[bin_idx], 0, PARAM_ISM_MAX_CHAN * PARAM_ISM_MAX_DMX );
    }
#ifdef MSAN_FIX
    hParamIsmRendering->exp_mixing_matrix_lin_old_fx = 0;
#endif

    /* memory allocation for proto matrix and interpolator */
    if ( ( hParamIsmRendering->proto_matrix = (float *) malloc( hOutSetup.nchan_out_woLFE * nchan_transport * sizeof( float ) ) ) == NULL )
@@ -2044,6 +2047,7 @@ void ivas_param_ism_dec_digest_tc(
    {
#ifdef IVAS_FLOAT_FIXED
        ivas_param_ism_dec_dequant_DOA_fx( hParamIsmDec, st_ivas->nchan_ism );
#ifndef MSAN_FIX
        for ( i = 0; i < 11; i++ )
        {
            for ( int j = 0; j < 1; j++ )
@@ -2054,6 +2058,7 @@ void ivas_param_ism_dec_digest_tc(
                }
            }
        }
#endif
        ivas_param_ism_dec_dequant_powrat_fx( hParamIsmDec );
        for ( i = 0; i < 11; i++ )
        {
Loading