diff --git a/lib_com/options.h b/lib_com/options.h index d8f50211dc79c446482879d3a5327bd0ecfa471a..ab884ad4ea3d3f0a92df97cfe1a949d721f820a4 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -187,6 +187,7 @@ #define FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI /* FhG: move setting of pointers for parameter decoding so they are skipped in lost frames when they are not needed */ #define NONBE_FIX_1056_ISM_RATE_SWITCH /* FhG: Fix #1056: fix TC buffer udpate on a ISM rate switch */ #define FIX_970_USAN_IN_NELP_SEED +#define NONBE_FIX_1075 /* FhG: fix segfault for bitrate switching + BINAURAL_ROOM_REVERB output in MC */ #define NONBE_FIX_984_OMASA_EXT_OUTPUT /* Nok: issue 1497 - porting OMASA EXT MR */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 88b8d3d6fecd16ea4e04572a8306d225d9c9261f..28243db860cfd56e3ffb93a49f61f2cd45ef242b 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -2007,6 +2007,15 @@ ivas_error ivas_init_decoder( { return error; } +#ifdef NONBE_FIX_1075 + if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + { + if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif /* Allocate 'hIsmRendererData' handle and memory for delay buffer within 'hMasaIsmData' */ if ( ( error = ivas_omasa_separate_object_renderer_open( st_ivas ) ) != IVAS_ERR_OK ) @@ -2077,6 +2086,16 @@ ivas_error ivas_init_decoder( { return error; } +#ifdef NONBE_FIX_1075 + if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + { + if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } + +#endif } } diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 02e2da6eb82f031fa7600dfd1d34444e1167e643..52ee37c25edf9a4ebca0bb445ba861bf4bcf29b5 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1227,6 +1227,15 @@ static ivas_error ivas_mc_dec_reconfig( { return error; } +#ifdef NONBE_FIX_1075 + if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + { + if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif if ( st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { diff --git a/lib_dec/ivas_omasa_dec.c b/lib_dec/ivas_omasa_dec.c index 38bd17bc1a465d10b779e5a4fb518ccf574e101e..b8bdcba92f543a23a6f0aeb67a81fdc28ae4e244 100644 --- a/lib_dec/ivas_omasa_dec.c +++ b/lib_dec/ivas_omasa_dec.c @@ -411,6 +411,15 @@ ivas_error ivas_omasa_dec_config( { return error; } +#ifdef NONBE_FIX_1075 + if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + { + if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif } /* Allocate 'hIsmRendererData' handle and memory for delay buffer within 'hMasaIsmData' */ diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 6f5a679997282679f20e7db36517a1898e954221..760398130831fa065d619d849cd053808bf42807 100644 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -486,6 +486,15 @@ ivas_error ivas_sba_dec_reconfigure( return error; } } +#ifdef NONBE_FIX_1075 + if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + { + if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif } /* Allocate memory for OSBA delay buffer */