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

Merge branch '587-inconsistent-default-reverb-configurations' into 'main'

[non-BE] Resolve "Inconsistent default reverb configurations"

See merge request !1765
parents 3670d59d b9fe17d4
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -687,7 +687,9 @@ int main(
                fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", aeID );
                goto cleanup;
            }
#ifndef FIX_587_DEFAULT_REVERB
            renderConfig.roomAcoustics.override = true;
#endif
        }

        /* ISAR frame size is set from command line, not renderer config file.
+2 −0
Original line number Diff line number Diff line
@@ -1044,7 +1044,9 @@ int main(
                fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", aeID );
                exit( -1 );
            }
#ifndef FIX_587_DEFAULT_REVERB
            renderConfig.roomAcoustics.override = 1;
#endif
        }

        /* ISAR frame size is set from command line, not renderer config file.
+2 −0
Original line number Diff line number Diff line
@@ -312,7 +312,9 @@ typedef enum

typedef struct _IVAS_ROOM_ACOUSTICS_CONFIG
{
#ifndef FIX_587_DEFAULT_REVERB
    int16_t override;
#endif
    int16_t nBands;                                   /* Number of frequency bands for which reverb properties are provided, integer, range [2..256]        */
    float pFc_input[IVAS_CLDFB_NO_CHANNELS_MAX];      /* Center frequencies for which following values are provided:                                        */
    float pAcoustic_rt60[IVAS_CLDFB_NO_CHANNELS_MAX]; /*  - The room's T60 per center frequency                                                             */
+1 −0
Original line number Diff line number Diff line
@@ -170,6 +170,7 @@
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */

#define FIX_1158_FASTCONV_REVERB_HRTF                   /* Philips: issue 1158: Rendering with FastConv to BINAURAL_ROOM_REVERB uses BRIR convolution instead of HRTF */
#define FIX_587_DEFAULT_REVERB                          /* Philips: issue 587: inconsistent default reverb parameters across renderers */
#define FIX_VOIP_FUNCTIONS                              /* VA: fix data type mismatch in IVAS_DEC_VoIP_SetScale() + add sanity checks to API functions */

/* #################### End BE switches ################################## */
+8 −0
Original line number Diff line number Diff line
@@ -1075,6 +1075,9 @@ ivas_error ivas_binRenderer_open(
    BINAURAL_RENDERER_HANDLE hBinRenderer;
    int16_t convBand, k;
    ivas_error error;
#ifdef FIX_587_DEFAULT_REVERB
    const IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pRoomAcoustics;
#endif

    error = IVAS_ERR_OK;

@@ -1214,7 +1217,12 @@ ivas_error ivas_binRenderer_open(
    /* Allocate memories needed for reverb module */
    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV && st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) )
    {
#ifdef FIX_587_DEFAULT_REVERB
        pRoomAcoustics = ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ? &( st_ivas->hRenderConfig->roomAcoustics ) : NULL;
        if ( ( error = ivas_binaural_reverb_init( &( hBinRenderer->hReverb ), st_ivas->hHrtfStatistics, hBinRenderer->conv_band, hBinRenderer->timeSlots, pRoomAcoustics, st_ivas->hDecoderConfig->output_Fs, st_ivas->hHrtfFastConv->fastconvReverberationTimes, st_ivas->hHrtfFastConv->fastconvReverberationEneCorrections ) ) != IVAS_ERR_OK )
#else
        if ( ( error = ivas_binaural_reverb_init( &( hBinRenderer->hReverb ), st_ivas->hHrtfStatistics, hBinRenderer->conv_band, hBinRenderer->timeSlots, &( st_ivas->hRenderConfig->roomAcoustics ), st_ivas->hDecoderConfig->output_Fs, st_ivas->hHrtfFastConv->fastconvReverberationTimes, st_ivas->hHrtfFastConv->fastconvReverberationEneCorrections ) ) != IVAS_ERR_OK )
#endif
        {
            return error;
        }
Loading