Commit bdf3901b authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Merge branch '571-reverb-not-activated-for-discrete-and-parametric-ism' into 'main'

Resolve "Reverb not activated for discrete and parametric ISM"

See merge request !784
parents 649241d1 0c92ad2a
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -156,6 +156,7 @@
#define FIX_565_SBA_BURST_IN_FEC                        /* VA: Issue 565: Fix noise burst during FEC, due to wrong total_brate initialization */
#define FIX_562_ISM2_64KBPS                             /* VA: issue 562: fix ISM2 at 64kbps issue */
#define FIX_559_EXTL_IGF_MISMATCH                       /* VA: issue 559: fix mismatch between st->extl and st->igf observed as crash in PlanarSBA bitrate switching */
#define FIX_571_REVERB_NOT_ACTIVATED_ISM                /* Philips: Issue 571: Reverb not activated for discrete and parametric ISM */
#define FIX_572_LFE_LPF_ENC                             /* FhG: issue 572: always apply the low pass filter to the LFE channel */
#define FIX_QMETA_SID_5k2                               /* Nokia: Issue 137: enable using full 5.2k bitrate in MASA SID */
#define FIX_578_PARAMMC_ILD_BS                          /* FhG: Issue 578: transmitt also center ILD in band 0 when LFE is active in 3TC ParamMC */
+8 −0
Original line number Diff line number Diff line
@@ -723,7 +723,11 @@ ivas_error ivas_binRenderer_open(
    }

    /* Allocate memories needed for reverb module */
#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM
    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV && st_ivas->hIntSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
#else
    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && st_ivas->hIntSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
#endif
    {
        if ( ( error = ivas_binaural_reverb_open( &( hBinRenderer->hReverb ),
                                                  hBinRenderer->conv_band,
@@ -731,7 +735,11 @@ ivas_error ivas_binRenderer_open(
                                                  &( st_ivas->hRenderConfig->roomAcoustics ),
                                                  st_ivas->hIntSetup.output_config,
                                                  st_ivas->hDecoderConfig->output_Fs,
#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM
                                                  RENDERER_BINAURAL_FASTCONV,
#else
                                                  RENDERER_BINAURAL_FASTCONV_ROOM,
#endif
                                                  st_ivas->hHrtfFastConv,
                                                  st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK )
        {
+17 −0
Original line number Diff line number Diff line
@@ -184,6 +184,15 @@ static ivas_error ivas_ism_bitrate_switching(
                {
                    return error;
                }
#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM
                if ( st_ivas->hIntSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
                {
                    if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_config, NULL, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }
                }
#endif
            }
        }
        else
@@ -258,6 +267,14 @@ static ivas_error ivas_ism_bitrate_switching(
                {
                    st_ivas->hHrtfTD = NULL;
                }

#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM
                if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
                {
                    ivas_reverb_close( &st_ivas->hReverb );
                }

#endif
            }
        }
        else
+20 −0
Original line number Diff line number Diff line
@@ -82,7 +82,11 @@ void ivas_renderer_select(
        {
            if ( st_ivas->ism_mode == ISM_MODE_PARAM )
            {
#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM
                if ( output_config == AUDIO_CONFIG_BINAURAL )
#else
                if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
#endif
                {
                    *renderer_type = RENDERER_BINAURAL_PARAMETRIC;
                }
@@ -104,11 +108,19 @@ void ivas_renderer_select(
                    else
                    {
                        *renderer_type = RENDERER_BINAURAL_OBJECTS_TD;
#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM
                        *internal_config = output_config;
#else
                        *internal_config = AUDIO_CONFIG_BINAURAL;
#endif
                    }
#else
                    *renderer_type = RENDERER_BINAURAL_OBJECTS_TD;
#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM
                    *internal_config = output_config;
#else
                    *internal_config = AUDIO_CONFIG_BINAURAL;
#endif
#endif
                }
                else
@@ -139,7 +151,11 @@ void ivas_renderer_select(
        else if ( st_ivas->ivas_format == SBA_FORMAT )
        {
            *internal_config = AUDIO_CONFIG_HOA3;
#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM
            if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
#else
            if ( output_config == AUDIO_CONFIG_BINAURAL )
#endif
            {
                *renderer_type = RENDERER_BINAURAL_FASTCONV;
            }
@@ -187,7 +203,11 @@ void ivas_renderer_select(
            else
            {
                *internal_config = transport_config;
#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM
                if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
#else
                if ( output_config == AUDIO_CONFIG_BINAURAL )
#endif
                {
#ifdef DEBUGGING
                    if ( ( ( ( st_ivas->transport_config == AUDIO_CONFIG_5_1 || st_ivas->transport_config == AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) || ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) ) && ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && !( st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) )
+8 −0
Original line number Diff line number Diff line
@@ -1813,7 +1813,11 @@ ivas_error ivas_binaural_reverb_open(
        set_f( hReverb->preDelayBufferImag[k], 0.0f, hReverb->numBins );
    }

#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM
    if ( renderer_type == RENDERER_BINAURAL_FASTCONV )
#else
    if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
#endif
    {
        if ( !roomAcoustics->override )
        {
@@ -1900,7 +1904,11 @@ ivas_error ivas_binaural_reverb_open(
    }
    else
    {
#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM
        if ( renderer_type == RENDERER_BINAURAL_FASTCONV )
#else
        if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
#endif
        {
            ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfFastConv->fastconvReverberationTimes, hHrtfFastConv->fastconvReverberationEneCorrections );
            ivas_binaural_reverb_setPreDelay( hReverb, 10 );