Loading lib_dec/ivas_init_dec_fx.c +1 −0 Original line number Diff line number Diff line Loading @@ -3281,6 +3281,7 @@ void ivas_initialize_handles_dec( st_ivas->hCombinedOrientationData = NULL; #ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT st_ivas->acousticEnvironmentsCount = 0; move16(); st_ivas->pAcousticEnvironments = NULL; #endif Loading lib_dec/lib_dec_fx.c +8 −17 Original line number Diff line number Diff line Loading @@ -2986,6 +2986,8 @@ ivas_error IVAS_DEC_AddAcousticEnvironment( Decoder_Struct *st_ivas; IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pAE = NULL; test(); test(); test(); IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL || ( hIvasDec->st_ivas->acousticEnvironmentsCount > 0 && hIvasDec->st_ivas->pAcousticEnvironments == NULL ) ) { Loading @@ -2997,7 +2999,6 @@ ivas_error IVAS_DEC_AddAcousticEnvironment( /* Check if already there */ FOR( n = 0; n < st_ivas->acousticEnvironmentsCount; n++ ) { test(); IF( st_ivas->pAcousticEnvironments[n].aeID == roomAcousticsConfig.aeID ) { move32(); Loading @@ -3007,7 +3008,6 @@ ivas_error IVAS_DEC_AddAcousticEnvironment( } /* If not found */ test(); IF( pAE == NULL ) { IVAS_ROOM_ACOUSTICS_CONFIG_DATA *ppAE = realloc( st_ivas->pAcousticEnvironments, ( st_ivas->acousticEnvironmentsCount + 1 ) * sizeof( IVAS_ROOM_ACOUSTICS_CONFIG_DATA ) ); Loading Loading @@ -3041,7 +3041,6 @@ ivas_error IVAS_DEC_AddAcousticEnvironment( move32(); move16(); test(); IF( pAE->use_er == 1 ) { pAE->lowComplexity = roomAcousticsConfig.lowComplexity; Loading Loading @@ -3103,7 +3102,6 @@ ivas_error IVAS_DEC_GetAcousticEnvironment( { IVAS_ROOM_ACOUSTICS_CONFIG_DATA ae = st_ivas->pAcousticEnvironments[n]; move32(); test(); IF( aeID == ae.aeID ) { found = 1; Loading @@ -3128,7 +3126,6 @@ ivas_error IVAS_DEC_GetAcousticEnvironment( /* If ER are allocated then propagate parameters */ pAcEnv->use_er = ae.use_er; move16(); test(); IF( ae.use_er != 0 ) { pAcEnv->lowComplexity = ae.lowComplexity; Loading @@ -3153,7 +3150,6 @@ ivas_error IVAS_DEC_GetAcousticEnvironment( } } test(); return found ? IVAS_ERR_OK : IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING; } #endif Loading Loading @@ -3403,14 +3399,12 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( move32(); /* Ignore if AE ID already in use */ test(); IF( hRenderConfig->roomAcoustics.aeID == hAcoustEnvPI.aeid ) { return IVAS_ERR_OK; } /* Attempt to load the one already available */ test(); IF( ( error = IVAS_DEC_GetAcousticEnvironment( hIvasDec, hAcoustEnvPI.aeid, &hRenderConfig->roomAcoustics ) ) == IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING ) { /* Add the new compact room environment */ Loading Loading @@ -3447,7 +3441,6 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( acEnv.use_er = hAcoustEnvPI.availEarlyReflections; move16(); test(); IF( hAcoustEnvPI.availEarlyReflections ) { hRenderConfig->roomAcoustics.dimensions.x_fx = hAcoustEnvPI.roomDimensions.x_fx; Loading @@ -3460,13 +3453,11 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( mvr2r( hAcoustEnvPI.absorbCoeffs, hRenderConfig->roomAcoustics.AbsCoeff, IVAS_ROOM_ABS_COEFF ); } test(); IF( ( error = IVAS_DEC_AddAcousticEnvironment( hIvasDec, acEnv ) ) != IVAS_ERR_OK ) { return error; } test(); IF( ( error = IVAS_DEC_GetAcousticEnvironment( hIvasDec, hAcoustEnvPI.aeid, &hRenderConfig->roomAcoustics ) ) != IVAS_ERR_OK ) { return error; Loading @@ -3476,10 +3467,8 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( /* Re-initialize reverb instance if already available */ /* TD renderer Jot reverberator */ test(); IF( st_ivas->hReverb != NULL ) { test(); IF( ( error = ivas_reverb_open_fx( &st_ivas->hReverb, st_ivas->hHrtfStatistics, hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; Loading @@ -3488,9 +3477,9 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( /* CREND Jot reverberator */ test(); test(); IF( st_ivas->hCrendWrapper != NULL && st_ivas->hCrendWrapper->hCrend[0] != NULL && st_ivas->hCrendWrapper->hCrend[0]->hReverb != NULL ) { test(); IF( ( error = ivas_reverb_open_fx( &st_ivas->hCrendWrapper->hCrend[0]->hReverb, st_ivas->hHrtfStatistics, hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; Loading @@ -3498,11 +3487,11 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( } /* Parametric renderer reverberator */ test(); IF( st_ivas->hDiracDecBin[0] != NULL && st_ivas->hDiracDecBin[0]->hReverb != NULL ) { ivas_binaural_reverb_close_fx( &( st_ivas->hDiracDecBin[0]->hReverb ) ); test(); IF( ( error = ivas_binaural_reverb_init_fx( &( st_ivas->hDiracDecBin[0]->hReverb ), st_ivas->hHrtfStatistics, st_ivas->hSpatParamRendCom->num_freq_bands, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, &( hRenderConfig->roomAcoustics ), st_ivas->hDecoderConfig->output_Fs, NULL, NULL, NULL ) ) != IVAS_ERR_OK ) { Loading @@ -3516,7 +3505,6 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( { ivas_binaural_reverb_close_fx( &( st_ivas->hBinRenderer->hReverb ) ); test(); IF( ( error = ivas_binaural_reverb_init_fx( &( st_ivas->hBinRenderer->hReverb ), st_ivas->hHrtfStatistics, st_ivas->hBinRenderer->conv_band, st_ivas->hBinRenderer->timeSlots, &( hRenderConfig->roomAcoustics ), st_ivas->hDecoderConfig->output_Fs, NULL, NULL, NULL ) ) != IVAS_ERR_OK ) { Loading Loading @@ -7006,10 +6994,13 @@ ivas_error IVAS_RTP_FeedPiDataToDecoder( IVAS_DEC_HANDLE hIvasDec, PIDATA_TS *pi #ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT case IVAS_PI_ACOUSTIC_ENVIRONMENT: { UWord16 aeid = piData->data.acousticEnv.aeid; UWord16 aeid; aeid = piData->data.acousticEnv.aeid; move16(); #ifdef DEBUGGING fprintf( stdout, "PI_ACOUSTIC_ENVIRONMENT : AEID : %d\n", aeid ); #endif test(); test(); IF( piData->data.acousticEnv.availLateReverb && hIvasDec->st_ivas->hRenderConfig != NULL && aeid != hIvasDec->st_ivas->hRenderConfig->roomAcoustics.aeID ) { Loading Loading
lib_dec/ivas_init_dec_fx.c +1 −0 Original line number Diff line number Diff line Loading @@ -3281,6 +3281,7 @@ void ivas_initialize_handles_dec( st_ivas->hCombinedOrientationData = NULL; #ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT st_ivas->acousticEnvironmentsCount = 0; move16(); st_ivas->pAcousticEnvironments = NULL; #endif Loading
lib_dec/lib_dec_fx.c +8 −17 Original line number Diff line number Diff line Loading @@ -2986,6 +2986,8 @@ ivas_error IVAS_DEC_AddAcousticEnvironment( Decoder_Struct *st_ivas; IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pAE = NULL; test(); test(); test(); IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL || ( hIvasDec->st_ivas->acousticEnvironmentsCount > 0 && hIvasDec->st_ivas->pAcousticEnvironments == NULL ) ) { Loading @@ -2997,7 +2999,6 @@ ivas_error IVAS_DEC_AddAcousticEnvironment( /* Check if already there */ FOR( n = 0; n < st_ivas->acousticEnvironmentsCount; n++ ) { test(); IF( st_ivas->pAcousticEnvironments[n].aeID == roomAcousticsConfig.aeID ) { move32(); Loading @@ -3007,7 +3008,6 @@ ivas_error IVAS_DEC_AddAcousticEnvironment( } /* If not found */ test(); IF( pAE == NULL ) { IVAS_ROOM_ACOUSTICS_CONFIG_DATA *ppAE = realloc( st_ivas->pAcousticEnvironments, ( st_ivas->acousticEnvironmentsCount + 1 ) * sizeof( IVAS_ROOM_ACOUSTICS_CONFIG_DATA ) ); Loading Loading @@ -3041,7 +3041,6 @@ ivas_error IVAS_DEC_AddAcousticEnvironment( move32(); move16(); test(); IF( pAE->use_er == 1 ) { pAE->lowComplexity = roomAcousticsConfig.lowComplexity; Loading Loading @@ -3103,7 +3102,6 @@ ivas_error IVAS_DEC_GetAcousticEnvironment( { IVAS_ROOM_ACOUSTICS_CONFIG_DATA ae = st_ivas->pAcousticEnvironments[n]; move32(); test(); IF( aeID == ae.aeID ) { found = 1; Loading @@ -3128,7 +3126,6 @@ ivas_error IVAS_DEC_GetAcousticEnvironment( /* If ER are allocated then propagate parameters */ pAcEnv->use_er = ae.use_er; move16(); test(); IF( ae.use_er != 0 ) { pAcEnv->lowComplexity = ae.lowComplexity; Loading @@ -3153,7 +3150,6 @@ ivas_error IVAS_DEC_GetAcousticEnvironment( } } test(); return found ? IVAS_ERR_OK : IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING; } #endif Loading Loading @@ -3403,14 +3399,12 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( move32(); /* Ignore if AE ID already in use */ test(); IF( hRenderConfig->roomAcoustics.aeID == hAcoustEnvPI.aeid ) { return IVAS_ERR_OK; } /* Attempt to load the one already available */ test(); IF( ( error = IVAS_DEC_GetAcousticEnvironment( hIvasDec, hAcoustEnvPI.aeid, &hRenderConfig->roomAcoustics ) ) == IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING ) { /* Add the new compact room environment */ Loading Loading @@ -3447,7 +3441,6 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( acEnv.use_er = hAcoustEnvPI.availEarlyReflections; move16(); test(); IF( hAcoustEnvPI.availEarlyReflections ) { hRenderConfig->roomAcoustics.dimensions.x_fx = hAcoustEnvPI.roomDimensions.x_fx; Loading @@ -3460,13 +3453,11 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( mvr2r( hAcoustEnvPI.absorbCoeffs, hRenderConfig->roomAcoustics.AbsCoeff, IVAS_ROOM_ABS_COEFF ); } test(); IF( ( error = IVAS_DEC_AddAcousticEnvironment( hIvasDec, acEnv ) ) != IVAS_ERR_OK ) { return error; } test(); IF( ( error = IVAS_DEC_GetAcousticEnvironment( hIvasDec, hAcoustEnvPI.aeid, &hRenderConfig->roomAcoustics ) ) != IVAS_ERR_OK ) { return error; Loading @@ -3476,10 +3467,8 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( /* Re-initialize reverb instance if already available */ /* TD renderer Jot reverberator */ test(); IF( st_ivas->hReverb != NULL ) { test(); IF( ( error = ivas_reverb_open_fx( &st_ivas->hReverb, st_ivas->hHrtfStatistics, hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; Loading @@ -3488,9 +3477,9 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( /* CREND Jot reverberator */ test(); test(); IF( st_ivas->hCrendWrapper != NULL && st_ivas->hCrendWrapper->hCrend[0] != NULL && st_ivas->hCrendWrapper->hCrend[0]->hReverb != NULL ) { test(); IF( ( error = ivas_reverb_open_fx( &st_ivas->hCrendWrapper->hCrend[0]->hReverb, st_ivas->hHrtfStatistics, hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; Loading @@ -3498,11 +3487,11 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( } /* Parametric renderer reverberator */ test(); IF( st_ivas->hDiracDecBin[0] != NULL && st_ivas->hDiracDecBin[0]->hReverb != NULL ) { ivas_binaural_reverb_close_fx( &( st_ivas->hDiracDecBin[0]->hReverb ) ); test(); IF( ( error = ivas_binaural_reverb_init_fx( &( st_ivas->hDiracDecBin[0]->hReverb ), st_ivas->hHrtfStatistics, st_ivas->hSpatParamRendCom->num_freq_bands, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, &( hRenderConfig->roomAcoustics ), st_ivas->hDecoderConfig->output_Fs, NULL, NULL, NULL ) ) != IVAS_ERR_OK ) { Loading @@ -3516,7 +3505,6 @@ static ivas_error IVAS_DEC_FeedAcousticEnvPI( { ivas_binaural_reverb_close_fx( &( st_ivas->hBinRenderer->hReverb ) ); test(); IF( ( error = ivas_binaural_reverb_init_fx( &( st_ivas->hBinRenderer->hReverb ), st_ivas->hHrtfStatistics, st_ivas->hBinRenderer->conv_band, st_ivas->hBinRenderer->timeSlots, &( hRenderConfig->roomAcoustics ), st_ivas->hDecoderConfig->output_Fs, NULL, NULL, NULL ) ) != IVAS_ERR_OK ) { Loading Loading @@ -7006,10 +6994,13 @@ ivas_error IVAS_RTP_FeedPiDataToDecoder( IVAS_DEC_HANDLE hIvasDec, PIDATA_TS *pi #ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT case IVAS_PI_ACOUSTIC_ENVIRONMENT: { UWord16 aeid = piData->data.acousticEnv.aeid; UWord16 aeid; aeid = piData->data.acousticEnv.aeid; move16(); #ifdef DEBUGGING fprintf( stdout, "PI_ACOUSTIC_ENVIRONMENT : AEID : %d\n", aeid ); #endif test(); test(); IF( piData->data.acousticEnv.availLateReverb && hIvasDec->st_ivas->hRenderConfig != NULL && aeid != hIvasDec->st_ivas->hRenderConfig->roomAcoustics.aeID ) { Loading