Commit e5d31c6e authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_591_PARAMISM_JBM_ENER_CORRECTION

parent f9e0bcf8
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -160,7 +160,6 @@
#define OSBA_SPLIT_RENDERING
#endif

#define FIX_591_PARAMISM_JBM_ENER_CORRECTION            /* FhG: fix energy correction in ParamISM rendering */
#define FIX_551_HEADTRACKER_INIT                        /* FhG: move setting of orientation tracking type to earlier    */

#define FIX_LARGE_RENDERER_DELAY_COMP                   /* Fix renderer delay compensation with delays greater than 1 frame */
+0 −11
Original line number Diff line number Diff line
@@ -1120,9 +1120,7 @@ void ivas_param_ism_dec_digest_tc(
    float direct_response[MAX_NUM_OBJECTS][PARAM_ISM_MAX_CHAN];
    DIRAC_DEC_HANDLE hDirAC;
    SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom;
#ifdef FIX_591_PARAMISM_JBM_ENER_CORRECTION
    int16_t fade_len;
#endif

    /* Initialization */
    hDirAC = st_ivas->hDirAC;
@@ -1132,12 +1130,8 @@ void ivas_param_ism_dec_digest_tc(
    ene_tc = 0.0f;
    ene_sum = 0.0f;
    last_gain = st_ivas->hDirAC->hParamIsm->last_dmx_gain;
#ifdef FIX_591_PARAMISM_JBM_ENER_CORRECTION
    output_frame = nCldfbSlots * hSpatParamRendCom->num_freq_bands;
    fade_len = output_frame / 2;
#else
    output_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC );
#endif

    nchan_transport = st_ivas->nchan_transport;
    ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate;
@@ -1242,13 +1236,8 @@ void ivas_param_ism_dec_digest_tc(
    {
        /* Smoothing */
        gain = 0.75f * gain + 0.25f * last_gain;
#ifdef FIX_591_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
        {
            transport_channels_f[0][i] *= ( last_gain + i * grad );
            transport_channels_f[1][i] *= ( last_gain + i * grad );
+0 −2
Original line number Diff line number Diff line
@@ -188,13 +188,11 @@ ivas_error ivas_jbm_dec_tc(
        {
            ivas_mono_downmix_render_passive( st_ivas, output, output_frame );
        }
#ifdef FIX_591_PARAMISM_JBM_ENER_CORRECTION
        else if ( st_ivas->ism_mode == ISM_MODE_PARAM && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) )
        {
            /* loudness correction */
            ivas_dirac_dec_binaural_sba_gain( output, st_ivas->nchan_transport, output_frame );
        }
#endif
    }
    else if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT )
    {