Commit cedae63b authored by bayers's avatar bayers
Browse files

fix compilation with API_5MS deactivated, really fix ParamISM energy correction with TSM

parent 1182bf45
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1180,7 +1180,7 @@ void ivas_param_ism_dec_digest_tc(
    ene_sum = 0.0f;
    last_gain = st_ivas->hDirAC->hParamIsm->last_dmx_gain;
#ifdef FIX_XXX_PARAMISM_JBM_ENER_CORRECTION
    fade_len = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC );
    fade_len = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( 2 * FRAMES_PER_SEC ) );
    output_frame = nCldfbSlots * hSpatParamRendCom->num_freq_bands;
#else
    output_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC );
@@ -1293,10 +1293,11 @@ void ivas_param_ism_dec_digest_tc(
        /* Smoothing */
        gain = 0.75f * gain + 0.25f * last_gain;
        /* 10ms ramp */
        grad = ( gain - last_gain ) * 2.0f / (float) output_frame; /* slope between two consecutive gains, 480 samples length */
#ifdef FIX_XXX_PARAMISM_JBM_ENER_CORRECTION
        grad = ( gain - last_gain ) / (float) fade_len; /* slope between two consecutive gains, 480 samples length */
        for ( i = 0; i < fade_len; i++ )
#else
        grad = ( gain - last_gain ) * 2.0f / (float) output_frame; /* slope between two consecutive gains, 480 samples length */
        for ( i = 0; i < output_frame / 2; i++ )
#endif
        {
+1 −0
Original line number Diff line number Diff line
@@ -6398,6 +6398,7 @@ static ivas_error renderIsmToSplitBinaural(
    IVAS_QUATERNION originalHeadRot;
#else
    IVAS_QUATERNION originalHeadRot[MAX_PARAM_SPATIAL_SUBFRAMES];
    int16_t i;
#endif
    float tmpBinaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][L_FRAME48k];
    int16_t output_frame = ismInput->base.inputBuffer.config.numSamplesPerChannel;