diff --git a/apps/decoder.c b/apps/decoder.c index 06c1072110b9495690031acc9d207ffc56d901b6..92d5332d2b25e8dc22dca8f839daeaf2b544a0f6 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -690,7 +690,7 @@ int main( if ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { - if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.acousticEnvironmentId, &renderConfig.room_acoustics ) ) == IVAS_ERR_OK ) + if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.acousticEnvironmentId, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) { if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) { @@ -707,7 +707,7 @@ int main( fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", arg.acousticEnvironmentId ); goto cleanup; } - renderConfig.room_acoustics.override = true; + renderConfig.roomAcoustics.override = true; } if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, renderConfig ) ) != IVAS_ERR_OK ) @@ -716,6 +716,7 @@ int main( goto cleanup; } } + /*------------------------------------------------------------------------------------------* * Load custom loudspeaker layout data *------------------------------------------------------------------------------------------*/ diff --git a/apps/renderer.c b/apps/renderer.c index 3b2c38c690c496386c9b8b2c8d451ef97c2207db..2881ea392145c3e1839ad9d552ca931d7e781b62 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1067,7 +1067,7 @@ int main( if ( args.outConfig.audioConfig == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { - if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, args.acousticEnvironmentId, &renderConfig.room_acoustics ) ) == IVAS_ERR_OK ) + if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, args.acousticEnvironmentId, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) { if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) { @@ -1080,7 +1080,7 @@ int main( fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", args.acousticEnvironmentId ); exit( -1 ); } - renderConfig.room_acoustics.override = 1; + renderConfig.roomAcoustics.override = 1; } if ( ( error = IVAS_REND_FeedRenderConfig( hIvasRend, renderConfig ) ) != IVAS_ERR_OK ) diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 8e4a1d0e131844dc87bd55f5835800a201f89f44..1fec3282ef352366423291181293eb3ee7fc9da5 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -273,7 +273,7 @@ typedef struct _IVAS_RENDER_CONFIG #ifdef DEBUGGING IVAS_RENDER_TYPE_OVERRIDE renderer_type_override; #endif - IVAS_ROOM_ACOUSTICS_CONFIG_DATA room_acoustics; + IVAS_ROOM_ACOUSTICS_CONFIG_DATA roomAcoustics; #ifdef SPLIT_REND_WITH_HEAD_ROT IVAS_SPLIT_REND_CONFIG_DATA split_rend_config; #endif diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index ec8674238c8310e957333d77e602bb331474b8c6..fde4bc78c4ffb3ba0f442029c4a94581b20cbc46 100755 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -121,15 +121,6 @@ typedef enum RENDERER_OSBA_LS } RENDERER_TYPE; -#ifdef DEBUGGING -typedef enum -{ - RENDER_TYPE_OVERRIDE_NONE, - RENDER_TYPE_OVERRIDE_CREND, - RENDER_TYPE_OVERRIDE_FASTCONV -} ivas_renderTypeOverride; -#endif - #if defined SPLIT_REND_WITH_HEAD_ROT typedef enum { diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index b1103bb0e690e729d5f3c1e174dd21c9bbd8528a..91f6b9d1861c4aedc6bf01c90292401e8d881dd0 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -130,7 +130,7 @@ void ivas_renderer_select( { *renderer_type = RENDERER_BINAURAL_MIXER_CONV_ROOM; #ifdef DEBUGGING - if ( st_ivas->hRenderConfig->renderer_type_override == RENDER_TYPE_OVERRIDE_FASTCONV ) + if ( st_ivas->hRenderConfig->renderer_type_override == IVAS_RENDER_TYPE_OVERRIDE_FASTCONV ) { *renderer_type = RENDERER_BINAURAL_FASTCONV_ROOM; } @@ -242,11 +242,11 @@ void ivas_renderer_select( } #if 0 // def DEBUGGING /*temp disabling this as paramMC crashes with CREND*/ - if ( st_ivas->hRenderConfig->renderer_type_override == RENDER_TYPE_OVERRIDE_CREND ) + if ( st_ivas->hRenderConfig->renderer_type_override == IVAS_RENDER_TYPE_OVERRIDE_CREND ) { *renderer_type = RENDERER_BINAURAL_MIXER_CONV; } - else if ( st_ivas->hRenderConfig->renderer_type_override == RENDER_TYPE_OVERRIDE_FASTCONV ) + else if ( st_ivas->hRenderConfig->renderer_type_override == IVAS_RENDER_TYPE_OVERRIDE_FASTCONV ) { *renderer_type = RENDERER_BINAURAL_FASTCONV; } @@ -275,11 +275,11 @@ void ivas_renderer_select( *renderer_type = RENDERER_BINAURAL_FASTCONV_ROOM; } #ifdef DEBUGGING - if ( st_ivas->hRenderConfig->renderer_type_override == RENDER_TYPE_OVERRIDE_CREND ) + if ( st_ivas->hRenderConfig->renderer_type_override == IVAS_RENDER_TYPE_OVERRIDE_CREND ) { *renderer_type = RENDERER_BINAURAL_MIXER_CONV_ROOM; } - else if ( st_ivas->hRenderConfig->renderer_type_override == RENDER_TYPE_OVERRIDE_FASTCONV ) + else if ( st_ivas->hRenderConfig->renderer_type_override == IVAS_RENDER_TYPE_OVERRIDE_FASTCONV ) { *renderer_type = RENDERER_BINAURAL_FASTCONV_ROOM; } diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 7162eb004e6ff81fed3eb076648709596c98b261..78d722de5e9443b67485eb598c21d471dc768767 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1847,10 +1847,10 @@ static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_REN #ifdef DEBUGGING switch ( hRCin->renderer_type_override ) { - case RENDER_TYPE_OVERRIDE_CREND: + case IVAS_RENDER_TYPE_OVERRIDE_CREND: hRCout->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_CREND; break; - case RENDER_TYPE_OVERRIDE_FASTCONV: + case IVAS_RENDER_TYPE_OVERRIDE_FASTCONV: hRCout->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_FASTCONV; break; default: @@ -1858,14 +1858,14 @@ static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_REN break; } #endif - hRCout->room_acoustics.override = hRCin->roomAcoustics.override; - hRCout->room_acoustics.nBands = hRCin->roomAcoustics.nBands; - hRCout->room_acoustics.acousticPreDelay = hRCin->roomAcoustics.acousticPreDelay; - hRCout->room_acoustics.inputPreDelay = hRCin->roomAcoustics.inputPreDelay; - - mvr2r( hRCin->roomAcoustics.pFc_input, hRCout->room_acoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); - mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->room_acoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); - mvr2r( hRCin->roomAcoustics.pAcoustic_dsr, hRCout->room_acoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); + hRCout->roomAcoustics.override = hRCin->roomAcoustics.override; + hRCout->roomAcoustics.nBands = hRCin->roomAcoustics.nBands; + hRCout->roomAcoustics.acousticPreDelay = hRCin->roomAcoustics.acousticPreDelay; + hRCout->roomAcoustics.inputPreDelay = hRCin->roomAcoustics.inputPreDelay; + + mvr2r( hRCin->roomAcoustics.pFc_input, hRCout->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); + mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); + mvr2r( hRCin->roomAcoustics.pAcoustic_dsr, hRCout->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); mvr2r( hRCin->directivity, hRCout->directivity, 3 * MAX_NUM_OBJECTS ); #ifdef SPLIT_REND_WITH_HEAD_ROT hRCout->split_rend_config.splitRendBitRate = SPLIT_REND_768k; @@ -1877,8 +1877,8 @@ static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_REN hRCout->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; hRCout->split_rend_config.rendererSelection = hRCin->split_rend_config.rendererSelection; #endif - hRCout->room_acoustics.use_er = hRCin->roomAcoustics.use_er; - hRCout->room_acoustics.lowComplexity = hRCin->roomAcoustics.lowComplexity; + hRCout->roomAcoustics.use_er = hRCin->roomAcoustics.use_er; + hRCout->roomAcoustics.lowComplexity = hRCin->roomAcoustics.lowComplexity; return IVAS_ERR_OK; } @@ -1944,35 +1944,35 @@ ivas_error IVAS_DEC_FeedRenderConfig( hRenderConfig = hIvasDec->st_ivas->hRenderConfig; #ifdef DEBUGGING - hRenderConfig->renderer_type_override = RENDER_TYPE_OVERRIDE_NONE; + hRenderConfig->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_NONE; if ( renderConfig.renderer_type_override == IVAS_RENDER_TYPE_OVERRIDE_FASTCONV ) { - hRenderConfig->renderer_type_override = RENDER_TYPE_OVERRIDE_FASTCONV; + hRenderConfig->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_FASTCONV; } if ( renderConfig.renderer_type_override == IVAS_RENDER_TYPE_OVERRIDE_CREND ) { - hRenderConfig->renderer_type_override = RENDER_TYPE_OVERRIDE_CREND; + hRenderConfig->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_CREND; } #endif - hRenderConfig->roomAcoustics.override = renderConfig.room_acoustics.override; - hRenderConfig->roomAcoustics.nBands = renderConfig.room_acoustics.nBands; - hRenderConfig->roomAcoustics.acousticPreDelay = renderConfig.room_acoustics.acousticPreDelay; - hRenderConfig->roomAcoustics.inputPreDelay = renderConfig.room_acoustics.inputPreDelay; + hRenderConfig->roomAcoustics.override = renderConfig.roomAcoustics.override; + hRenderConfig->roomAcoustics.nBands = renderConfig.roomAcoustics.nBands; + hRenderConfig->roomAcoustics.acousticPreDelay = renderConfig.roomAcoustics.acousticPreDelay; + hRenderConfig->roomAcoustics.inputPreDelay = renderConfig.roomAcoustics.inputPreDelay; hRenderConfig->roomAcoustics.use_er = 0; - if ( renderConfig.room_acoustics.use_er == 1 ) + if ( renderConfig.roomAcoustics.use_er == 1 ) { - hRenderConfig->roomAcoustics.use_er = renderConfig.room_acoustics.use_er; - hRenderConfig->roomAcoustics.lowComplexity = renderConfig.room_acoustics.lowComplexity; - hRenderConfig->roomAcoustics.dimensions = renderConfig.room_acoustics.dimensions; - hRenderConfig->roomAcoustics.ListenerOrigin = renderConfig.room_acoustics.ListenerOrigin; + hRenderConfig->roomAcoustics.use_er = renderConfig.roomAcoustics.use_er; + hRenderConfig->roomAcoustics.lowComplexity = renderConfig.roomAcoustics.lowComplexity; + hRenderConfig->roomAcoustics.dimensions = renderConfig.roomAcoustics.dimensions; + hRenderConfig->roomAcoustics.ListenerOrigin = renderConfig.roomAcoustics.ListenerOrigin; - mvr2r( renderConfig.room_acoustics.AbsCoeff, hRenderConfig->roomAcoustics.AbsCoeff, ER_ABS_COEFF ); + mvr2r( renderConfig.roomAcoustics.AbsCoeff, hRenderConfig->roomAcoustics.AbsCoeff, ER_ABS_COEFF ); } - mvr2r( renderConfig.room_acoustics.pFc_input, hRenderConfig->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); - mvr2r( renderConfig.room_acoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); - mvr2r( renderConfig.room_acoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); + mvr2r( renderConfig.roomAcoustics.pFc_input, hRenderConfig->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); + mvr2r( renderConfig.roomAcoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); + mvr2r( renderConfig.roomAcoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 * MAX_NUM_OBJECTS ); diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 6e81113feec0c6787fc1952152bad1f542d130b6..380b31f26fcaba9ac97591cdd974ffb4121c87c3 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -884,7 +884,7 @@ ivas_error ivas_binaural_reverb_open( REVERB_STRUCT_HANDLE *hReverbPr, /* i/o: binaural reverb handle */ const int16_t numBins, /* i : number of CLDFB bins */ const int16_t numCldfbSlotsPerFrame, /* i : number of CLDFB slots per frame */ - ivas_roomAcoustics_t *roomAcoustics, /* i/o: room acoustics parameters */ + IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics, /* i/o: room acoustics parameters */ const AUDIO_CONFIG output_config, /* i : output audio configuration */ const int32_t sampling_rate, /* i : sampling rate */ const RENDERER_TYPE renderer_type, /* i : renderer type */ @@ -1068,7 +1068,7 @@ void ivas_reverb_calc_color_levels( ); void ivas_reverb_prepare_cldfb_params( - ivas_roomAcoustics_t *pInput_params, + IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pInput_params, const HRTFS_FASTCONV_HANDLE hHrtfFastConv, const AUDIO_CONFIG input_audio_config, const int16_t use_brir, diff --git a/lib_rend/ivas_render_config.c b/lib_rend/ivas_render_config.c index 16b91df8254b1eade3964635983147a823384999..c7a1abacf315af5feec12f634cf3ae62ea0c1e0f 100644 --- a/lib_rend/ivas_render_config.c +++ b/lib_rend/ivas_render_config.c @@ -110,7 +110,7 @@ ivas_error ivas_render_config_init_from_rom( return IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "Unexpected null pointer while attempting to fill renderer configuration from ROM" ); } #ifdef DEBUGGING - ( *hRenderConfig )->renderer_type_override = RENDER_TYPE_OVERRIDE_NONE; + ( *hRenderConfig )->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_NONE; #endif ( *hRenderConfig )->roomAcoustics.override = FALSE; ( *hRenderConfig )->roomAcoustics.nBands = IVAS_REVERB_DEFAULT_N_BANDS; diff --git a/lib_rend/ivas_reverb.c b/lib_rend/ivas_reverb.c index 80dc3d5b4fbdd343241aee7d80f67653520cfa41..cbfedbc822926e0254010b6621fac58ae5c9074c 100644 --- a/lib_rend/ivas_reverb.c +++ b/lib_rend/ivas_reverb.c @@ -948,7 +948,7 @@ static void set_reverb_acoustic_data( ivas_reverb_params_t *pParams, const AUDIO_CONFIG input_audio_config, const HRTFS_HANDLE hHrtf, - ivas_roomAcoustics_t *pRoomAcoustics, + IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pRoomAcoustics, const int16_t subframe_len, const int16_t nr_fc_input, const int16_t nr_fc_fft_filter ) @@ -1796,15 +1796,15 @@ void ivas_binaural_reverb_processSubframe( *------------------------------------------------------------------------*/ ivas_error ivas_binaural_reverb_open( - REVERB_STRUCT_HANDLE *hReverbPr, /* i/o: binaural reverb handle */ - const int16_t numBins, /* i : number of CLDFB bins */ - const int16_t numCldfbSlotsPerFrame, /* i : number of CLDFB slots per frame */ - ivas_roomAcoustics_t *roomAcoustics, /* i/o: room acoustics parameters */ - const AUDIO_CONFIG output_config, /* i : output audio configuration */ - const int32_t sampling_rate, /* i : sampling rate */ - const RENDERER_TYPE renderer_type, /* i : renderer type */ - const HRTFS_FASTCONV_HANDLE hHrtfFastConv, /* i : FastConv HRTF handle */ - const HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : Parametric binauralizer HRTF handle */ + REVERB_STRUCT_HANDLE *hReverbPr, /* i/o: binaural reverb handle */ + const int16_t numBins, /* i : number of CLDFB bins */ + const int16_t numCldfbSlotsPerFrame, /* i : number of CLDFB slots per frame */ + IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics, /* i/o: room acoustics parameters */ + const AUDIO_CONFIG output_config, /* i : output audio configuration */ + const int32_t sampling_rate, /* i : sampling rate */ + const RENDERER_TYPE renderer_type, /* i : renderer type */ + const HRTFS_FASTCONV_HANDLE hHrtfFastConv, /* i : FastConv HRTF handle */ + const HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : Parametric binauralizer HRTF handle */ ) { int16_t bin, chIdx, k, len; diff --git a/lib_rend/ivas_reverb_utils.c b/lib_rend/ivas_reverb_utils.c index 58613f425745f62db3f98d37629aba5f5eb5c74f..6af660af05a514d7b86ab6c439175b4d28230636 100644 --- a/lib_rend/ivas_reverb_utils.c +++ b/lib_rend/ivas_reverb_utils.c @@ -77,7 +77,7 @@ static void ivas_reverb_get_fastconv_hrtf_set_energies( const HRTFS_FASTCONV_HAN *-----------------------------------------------------------------------------------------*/ void ivas_reverb_prepare_cldfb_params( - ivas_roomAcoustics_t *pInput_params, + IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pInput_params, const HRTFS_FASTCONV_HANDLE hHrtfFastConv, const AUDIO_CONFIG input_audio_config, const int16_t use_brir, diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index b53687587cdf34bddf4eddd776c45ddf5411b53d..d850ad382f9d645e0b45db31889640d8e22728f5 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -711,35 +711,8 @@ typedef struct ivas_combined_orientation_struct * Reverberator structure *----------------------------------------------------------------------------------*/ -typedef struct ivas_roomAcoustics_t -{ - int16_t override; - int16_t nBands; /* Number of frequency bands for which reverb properties are provided, integer, range [2..256] */ - float pFc_input[CLDFB_NO_CHANNELS_MAX]; /* Center frequencies for which following values are provided: */ - float pAcoustic_rt60[CLDFB_NO_CHANNELS_MAX]; /* - The room's T60 per center frequency */ - float pAcoustic_dsr[CLDFB_NO_CHANNELS_MAX]; /* - The room's Diffuse to Source Ratio per center frequency */ - float acousticPreDelay; /* Time elapsed between input signal and late reverberation start, float, range [0.001..10] */ - float inputPreDelay; /* Offset in seconds from where DSR is computed in the RIR (0 = at source), float, range [0.001..10] */ - int16_t use_er; /* ER activation flag */ - int32_t lowComplexity; /* Low complexity ER flag */ - IVAS_VECTOR3 dimensions; /* Room dimensions [m] */ - float AbsCoeff[ER_ABS_COEFF]; /* Absorption coeffs */ - IVAS_VECTOR3 ListenerOrigin; /* Listener origin */ - -} ivas_roomAcoustics_t; - -typedef struct ivas_render_config_t -{ -#ifdef DEBUGGING - ivas_renderTypeOverride renderer_type_override; -#endif - ivas_roomAcoustics_t roomAcoustics; - float directivity[MAX_NUM_OBJECTS * 3]; -#ifdef SPLIT_REND_WITH_HEAD_ROT - IVAS_SPLIT_REND_CONFIG_DATA split_rend_config; -#endif - -} RENDER_CONFIG_DATA, *RENDER_CONFIG_HANDLE; +typedef struct _IVAS_RENDER_CONFIG RENDER_CONFIG_DATA; +typedef struct _IVAS_RENDER_CONFIG *RENDER_CONFIG_HANDLE; typedef struct ivas_rev_delay_line_t { diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index eefc3aa495446938421b2bb6b548306dd6ccfba0..1fdecb06fb6c9ba19c1e93fa9c29689bdaf360eb 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -4986,10 +4986,10 @@ int16_t IVAS_REND_GetRenderConfig( #ifdef DEBUGGING switch ( hRCin->renderer_type_override ) { - case RENDER_TYPE_OVERRIDE_CREND: + case IVAS_RENDER_TYPE_OVERRIDE_CREND: hRCout->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_CREND; break; - case RENDER_TYPE_OVERRIDE_FASTCONV: + case IVAS_RENDER_TYPE_OVERRIDE_FASTCONV: hRCout->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_FASTCONV; break; default: @@ -4997,15 +4997,15 @@ int16_t IVAS_REND_GetRenderConfig( break; } #endif - hRCout->room_acoustics.override = hRCin->roomAcoustics.override; - hRCout->room_acoustics.nBands = hRCin->roomAcoustics.nBands; - hRCout->room_acoustics.acousticPreDelay = hRCin->roomAcoustics.acousticPreDelay; - hRCout->room_acoustics.inputPreDelay = hRCin->roomAcoustics.inputPreDelay; + hRCout->roomAcoustics.override = hRCin->roomAcoustics.override; + hRCout->roomAcoustics.nBands = hRCin->roomAcoustics.nBands; + hRCout->roomAcoustics.acousticPreDelay = hRCin->roomAcoustics.acousticPreDelay; + hRCout->roomAcoustics.inputPreDelay = hRCin->roomAcoustics.inputPreDelay; mvr2r( hRCin->directivity, hRCout->directivity, 3 * MAX_NUM_OBJECTS ); - mvr2r( hRCin->roomAcoustics.pFc_input, hRCout->room_acoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); - mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->room_acoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); - mvr2r( hRCin->roomAcoustics.pAcoustic_dsr, hRCout->room_acoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); + mvr2r( hRCin->roomAcoustics.pFc_input, hRCout->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); + mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); + mvr2r( hRCin->roomAcoustics.pAcoustic_dsr, hRCout->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); #ifdef SPLIT_REND_WITH_HEAD_ROT hRCout->split_rend_config.splitRendBitRate = SPLIT_REND_768k; @@ -5018,8 +5018,8 @@ int16_t IVAS_REND_GetRenderConfig( hRCout->split_rend_config.rendererSelection = hRCin->split_rend_config.rendererSelection; #endif - hRCout->room_acoustics.use_er = hRCin->roomAcoustics.use_er; - hRCout->room_acoustics.lowComplexity = hRCin->roomAcoustics.lowComplexity; + hRCout->roomAcoustics.use_er = hRCin->roomAcoustics.use_er; + hRCout->roomAcoustics.lowComplexity = hRCin->roomAcoustics.lowComplexity; return IVAS_ERR_OK; } @@ -5047,35 +5047,27 @@ int16_t IVAS_REND_FeedRenderConfig( } hRenderConfig = hIvasRend->hRendererConfig; #ifdef DEBUGGING - hRenderConfig->renderer_type_override = RENDER_TYPE_OVERRIDE_NONE; - if ( renderConfig.renderer_type_override == IVAS_RENDER_TYPE_OVERRIDE_FASTCONV ) - { - hRenderConfig->renderer_type_override = RENDER_TYPE_OVERRIDE_FASTCONV; - } - if ( renderConfig.renderer_type_override == IVAS_RENDER_TYPE_OVERRIDE_CREND ) - { - hRenderConfig->renderer_type_override = RENDER_TYPE_OVERRIDE_CREND; - } + hRenderConfig->renderer_type_override = renderConfig.renderer_type_override; #endif - hRenderConfig->roomAcoustics.override = renderConfig.room_acoustics.override; - hRenderConfig->roomAcoustics.nBands = renderConfig.room_acoustics.nBands; - hRenderConfig->roomAcoustics.acousticPreDelay = renderConfig.room_acoustics.acousticPreDelay; - hRenderConfig->roomAcoustics.inputPreDelay = renderConfig.room_acoustics.inputPreDelay; - mvr2r( renderConfig.room_acoustics.pFc_input, hRenderConfig->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); - mvr2r( renderConfig.room_acoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); - mvr2r( renderConfig.room_acoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); + hRenderConfig->roomAcoustics.override = renderConfig.roomAcoustics.override; + hRenderConfig->roomAcoustics.nBands = renderConfig.roomAcoustics.nBands; + hRenderConfig->roomAcoustics.acousticPreDelay = renderConfig.roomAcoustics.acousticPreDelay; + hRenderConfig->roomAcoustics.inputPreDelay = renderConfig.roomAcoustics.inputPreDelay; + mvr2r( renderConfig.roomAcoustics.pFc_input, hRenderConfig->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); + mvr2r( renderConfig.roomAcoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); + mvr2r( renderConfig.roomAcoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 * MAX_NUM_OBJECTS ); hRenderConfig->roomAcoustics.use_er = 0; - if ( renderConfig.room_acoustics.use_er == 1 ) + if ( renderConfig.roomAcoustics.use_er == 1 ) { - hRenderConfig->roomAcoustics.use_er = renderConfig.room_acoustics.use_er; - hRenderConfig->roomAcoustics.lowComplexity = renderConfig.room_acoustics.lowComplexity; - hRenderConfig->roomAcoustics.dimensions = renderConfig.room_acoustics.dimensions; - hRenderConfig->roomAcoustics.ListenerOrigin = renderConfig.room_acoustics.ListenerOrigin; + hRenderConfig->roomAcoustics.use_er = renderConfig.roomAcoustics.use_er; + hRenderConfig->roomAcoustics.lowComplexity = renderConfig.roomAcoustics.lowComplexity; + hRenderConfig->roomAcoustics.dimensions = renderConfig.roomAcoustics.dimensions; + hRenderConfig->roomAcoustics.ListenerOrigin = renderConfig.roomAcoustics.ListenerOrigin; - mvr2r( renderConfig.room_acoustics.AbsCoeff, hRenderConfig->roomAcoustics.AbsCoeff, ER_ABS_COEFF ); + mvr2r( renderConfig.roomAcoustics.AbsCoeff, hRenderConfig->roomAcoustics.AbsCoeff, ER_ABS_COEFF ); } #ifdef SPLIT_REND_WITH_HEAD_ROT diff --git a/lib_util/render_config_reader.c b/lib_util/render_config_reader.c index c831dede93dac8db37dc7207e51a0610f4e26d15..d03f163b1a2ce8c422b153b35bedb287fcd59af5 100644 --- a/lib_util/render_config_reader.c +++ b/lib_util/render_config_reader.c @@ -1120,7 +1120,7 @@ ivas_error RenderConfigReader_checkValues( { int16_t band_idx, tab_value_err_count; IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pRoom_acoustics; - pRoom_acoustics = &hRenderConfig->room_acoustics; + pRoom_acoustics = &hRenderConfig->roomAcoustics; tab_value_err_count = 0; int16_t wall_idx; @@ -2280,7 +2280,7 @@ ivas_error RenderConfigReader_read( /* Acoustic pre-delay */ else if ( strcmp( item, "ACOUSTICPREDELAY" ) == 0 ) { - if ( !sscanf( pValue, "%f", &hRenderConfig->room_acoustics.acousticPreDelay ) ) + if ( !sscanf( pValue, "%f", &hRenderConfig->roomAcoustics.acousticPreDelay ) ) { errorHandler( item, ERROR_VALUE_INVALID ); }