Loading apps/renderer.c +1 −1 Original line number Diff line number Diff line Loading @@ -627,7 +627,7 @@ int main( } uint32_t inFileSampleRate = 0; if ( AudioFileReader_open( &audioReader, audioFilePath, inFileSampleRate ) != IVAS_ERR_OK ) if ( AudioFileReader_open( &audioReader, audioFilePath, args.sampleRate ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening file: %s\n", audioFilePath ); exit( -1 ); Loading lib_rend/ivas_crend.c +1 −1 Original line number Diff line number Diff line Loading @@ -31,13 +31,13 @@ *******************************************************************************************************/ #include <stdint.h> #include <math.h> #include "options.h" #include "prot.h" #include "ivas_prot.h" #include "ivas_cnst.h" #include "ivas_rom_rend.h" #include "ivas_stat_dec.h" #include <math.h> #include "ivas_rom_binaural_crend_head.h" #ifdef EXT_RENDERER #include "lib_rend.h" Loading lib_rend/ivas_limiter.c +26 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,16 @@ #include "wmops.h" #include <assert.h> #ifndef EXT_RENDERER /*----------------------------------------------------------------------------------* * Local constants *----------------------------------------------------------------------------------*/ #define LIMITER_THRESHOLD 32729 /* -0.01 dBFS */ #define LIMITER_ATTACK_SECONDS 0.005f #endif /*-------------------------------------------------------------------* * detect_strong_saturations() * Loading @@ -63,11 +73,19 @@ static int16_t detect_strong_saturations( *strong_saturation_cnt = 50; apply_strong_limiting = 1; } #ifdef EXT_RENDERER else if ( max_val > 3 * IVAS_LIMITER_THRESHOLD && *strong_saturation_cnt > 0 ) #else else if ( max_val > 3 * LIMITER_THRESHOLD && *strong_saturation_cnt > 0 ) #endif { apply_strong_limiting = 1; } #ifdef EXT_RENDERER else if ( max_val > 10 * IVAS_LIMITER_THRESHOLD ) #else else if ( max_val > 10 * LIMITER_THRESHOLD ) #endif { *strong_saturation_cnt += 20; *strong_saturation_cnt = min( *strong_saturation_cnt, 50 ); Loading Loading @@ -122,7 +140,11 @@ IVAS_LIMITER_HANDLE ivas_limiter_open( hLimiter->sampling_rate = sampling_rate; hLimiter->gain = 1.f; hLimiter->release_heuristic = 0.f; #ifdef EXT_RENDERER hLimiter->attack_constant = powf( 0.01f, 1.0f / ( IVAS_LIMITER_ATTACK_SECONDS * sampling_rate ) ); #else hLimiter->attack_constant = powf( 0.01f, 1.0f / ( LIMITER_ATTACK_SECONDS * sampling_rate ) ); #endif hLimiter->strong_saturation_count = 0; #ifdef DEBUGGING hLimiter->cnt_frames_limited = 0; Loading Loading @@ -194,7 +216,11 @@ void ivas_limiter_dec( channels[c] = output[c]; } #ifdef EXT_RENDERER limiter_process( hLimiter, output_frame, IVAS_LIMITER_THRESHOLD, BER_detect, &hLimiter->strong_saturation_count ); #else limiter_process( hLimiter, output_frame, LIMITER_THRESHOLD, BER_detect, &hLimiter->strong_saturation_count ); #endif return; } Loading lib_rend/ivas_ls_custom_dec.c +5 −0 Original line number Diff line number Diff line Loading @@ -79,8 +79,13 @@ ivas_error ivas_ls_custom_open( *-------------------------------------------------------------------------*/ void ivas_ls_custom_setup( #ifdef EXT_RENDERER IVAS_OUTPUT_SETUP_HANDLE hOutSetup, /* o : IVAS output setup handle */ const LSSETUP_CUSTOM_STRUCT *hLsSetupCustom /* i : Custom loudspeaker setup handle */ #else IVAS_OUTPUT_SETUP_HANDLE hOutSetup, /* o : IVAS output setup handle */ const LSSETUP_CUSTOM_HANDLE hLsSetupCustom /* i : Custom loudspeaker setup handle */ #endif ) { hOutSetup->output_config = AUDIO_CONFIG_LS_CUSTOM; Loading lib_rend/ivas_objectRenderer.c +4 −2 Original line number Diff line number Diff line Loading @@ -31,10 +31,10 @@ *******************************************************************************************************/ #include <stdint.h> #include <math.h> #include "options.h" #include "prot.h" #include "ivas_prot.h" #include <math.h> #include "wmops.h" #include "ivas_rom_com.h" #ifdef EXT_RENDERER Loading Loading @@ -271,7 +271,9 @@ void ObjRenderIVASFrame( for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { /* Update the listener's location/orientation */ TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Quaternions[subframe_idx] : NULL ); TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Quaternions[subframe_idx] : NULL ); if ( ( st_ivas->hRenderConfig != NULL ) && ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) ) { Loading Loading
apps/renderer.c +1 −1 Original line number Diff line number Diff line Loading @@ -627,7 +627,7 @@ int main( } uint32_t inFileSampleRate = 0; if ( AudioFileReader_open( &audioReader, audioFilePath, inFileSampleRate ) != IVAS_ERR_OK ) if ( AudioFileReader_open( &audioReader, audioFilePath, args.sampleRate ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening file: %s\n", audioFilePath ); exit( -1 ); Loading
lib_rend/ivas_crend.c +1 −1 Original line number Diff line number Diff line Loading @@ -31,13 +31,13 @@ *******************************************************************************************************/ #include <stdint.h> #include <math.h> #include "options.h" #include "prot.h" #include "ivas_prot.h" #include "ivas_cnst.h" #include "ivas_rom_rend.h" #include "ivas_stat_dec.h" #include <math.h> #include "ivas_rom_binaural_crend_head.h" #ifdef EXT_RENDERER #include "lib_rend.h" Loading
lib_rend/ivas_limiter.c +26 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,16 @@ #include "wmops.h" #include <assert.h> #ifndef EXT_RENDERER /*----------------------------------------------------------------------------------* * Local constants *----------------------------------------------------------------------------------*/ #define LIMITER_THRESHOLD 32729 /* -0.01 dBFS */ #define LIMITER_ATTACK_SECONDS 0.005f #endif /*-------------------------------------------------------------------* * detect_strong_saturations() * Loading @@ -63,11 +73,19 @@ static int16_t detect_strong_saturations( *strong_saturation_cnt = 50; apply_strong_limiting = 1; } #ifdef EXT_RENDERER else if ( max_val > 3 * IVAS_LIMITER_THRESHOLD && *strong_saturation_cnt > 0 ) #else else if ( max_val > 3 * LIMITER_THRESHOLD && *strong_saturation_cnt > 0 ) #endif { apply_strong_limiting = 1; } #ifdef EXT_RENDERER else if ( max_val > 10 * IVAS_LIMITER_THRESHOLD ) #else else if ( max_val > 10 * LIMITER_THRESHOLD ) #endif { *strong_saturation_cnt += 20; *strong_saturation_cnt = min( *strong_saturation_cnt, 50 ); Loading Loading @@ -122,7 +140,11 @@ IVAS_LIMITER_HANDLE ivas_limiter_open( hLimiter->sampling_rate = sampling_rate; hLimiter->gain = 1.f; hLimiter->release_heuristic = 0.f; #ifdef EXT_RENDERER hLimiter->attack_constant = powf( 0.01f, 1.0f / ( IVAS_LIMITER_ATTACK_SECONDS * sampling_rate ) ); #else hLimiter->attack_constant = powf( 0.01f, 1.0f / ( LIMITER_ATTACK_SECONDS * sampling_rate ) ); #endif hLimiter->strong_saturation_count = 0; #ifdef DEBUGGING hLimiter->cnt_frames_limited = 0; Loading Loading @@ -194,7 +216,11 @@ void ivas_limiter_dec( channels[c] = output[c]; } #ifdef EXT_RENDERER limiter_process( hLimiter, output_frame, IVAS_LIMITER_THRESHOLD, BER_detect, &hLimiter->strong_saturation_count ); #else limiter_process( hLimiter, output_frame, LIMITER_THRESHOLD, BER_detect, &hLimiter->strong_saturation_count ); #endif return; } Loading
lib_rend/ivas_ls_custom_dec.c +5 −0 Original line number Diff line number Diff line Loading @@ -79,8 +79,13 @@ ivas_error ivas_ls_custom_open( *-------------------------------------------------------------------------*/ void ivas_ls_custom_setup( #ifdef EXT_RENDERER IVAS_OUTPUT_SETUP_HANDLE hOutSetup, /* o : IVAS output setup handle */ const LSSETUP_CUSTOM_STRUCT *hLsSetupCustom /* i : Custom loudspeaker setup handle */ #else IVAS_OUTPUT_SETUP_HANDLE hOutSetup, /* o : IVAS output setup handle */ const LSSETUP_CUSTOM_HANDLE hLsSetupCustom /* i : Custom loudspeaker setup handle */ #endif ) { hOutSetup->output_config = AUDIO_CONFIG_LS_CUSTOM; Loading
lib_rend/ivas_objectRenderer.c +4 −2 Original line number Diff line number Diff line Loading @@ -31,10 +31,10 @@ *******************************************************************************************************/ #include <stdint.h> #include <math.h> #include "options.h" #include "prot.h" #include "ivas_prot.h" #include <math.h> #include "wmops.h" #include "ivas_rom_com.h" #ifdef EXT_RENDERER Loading Loading @@ -271,7 +271,9 @@ void ObjRenderIVASFrame( for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { /* Update the listener's location/orientation */ TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Quaternions[subframe_idx] : NULL ); TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Quaternions[subframe_idx] : NULL ); if ( ( st_ivas->hRenderConfig != NULL ) && ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) ) { Loading