Loading lib_com/ivas_prot.h +7 −0 Original line number Diff line number Diff line Loading @@ -2920,6 +2920,13 @@ int16_t check_bounds_s( const int16_t high /* i : High limit */ ); #ifdef FIX_CRASH_LONG_BRIR void set_zero_l( float *vec, /* o : input vector */ const uint32_t lvec /* i : length of the vector */ ); #endif ivas_error stereo_memory_enc( CPE_ENC_HANDLE hCPE, /* i : CPE encoder structure */ const int32_t input_Fs, /* i : input sampling rate */ Loading lib_com/ivas_tools.c +22 −0 Original line number Diff line number Diff line Loading @@ -579,6 +579,28 @@ int16_t check_bounds_s( return value_adj; } #ifdef FIX_CRASH_LONG_BRIR /*---------------------------------------------------------------------* * set_zero_l() * * Set a vector vec[] of dimension lvec to zero *---------------------------------------------------------------------*/ void set_zero_l( float *vec, /* i/o: input/output vector */ const uint32_t lvec /* i : length of the vector */ ) { uint32_t i; for ( i = 0; i < lvec; i++ ) { *vec++ = 0.0f; } return; } #endif /****************************************************************************/ /* matrix functions */ Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,7 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ /*#define SPLIT_REND_WITH_HEAD_ROT */ /* Dlb,FhG: Split Rendering contributions 21 and 35 */ #define FIX_CRASH_LONG_BRIR /* Orange : Fix crash when long BRIR is set */ #define FIX_SPLITREND_WARNINGS /* FhG: fix warnings related to split rendering observed in build jobs */ #define FIX_923_EXTERNAL_REND_COMMAND_LINE /* VA: issue 923: enable external renderer command-line options in UPPER case letters */ #define FIX_921_OMASA_DELAY_PRINTOUT /* VA: issue 921: correct OMASA decoder delay printout */ Loading lib_rend/ivas_crend.c +33 −1 Original line number Diff line number Diff line Loading @@ -1248,7 +1248,11 @@ ivas_error ivas_rend_openCrend( ) { int16_t i, subframe_length; #ifdef FIX_CRASH_LONG_BRIR int32_t max_total_ir_len; #else int16_t max_total_ir_len; #endif HRTFS_HANDLE hHrtf; CREND_HANDLE hCrend; ivas_error error; Loading Loading @@ -1298,13 +1302,21 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->freq_buffer_re[i], max_total_ir_len ); #else set_zero( hCrend->freq_buffer_re[i], max_total_ir_len ); #endif if ( ( hCrend->freq_buffer_im[i] = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->freq_buffer_im[i], max_total_ir_len ); #else set_zero( hCrend->freq_buffer_im[i], max_total_ir_len ); #endif } for ( i = 0; i < BINAURAL_CHANNELS; i++ ) Loading @@ -1313,7 +1325,11 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->prev_out_buffer[i], subframe_length ); #else set_zero( hCrend->prev_out_buffer[i], subframe_length ); #endif } max_total_ir_len = hHrtf->num_iterations_diffuse[0] * subframe_length; Loading @@ -1324,13 +1340,21 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->freq_buffer_re_diffuse, max_total_ir_len ); #else set_zero( hCrend->freq_buffer_re_diffuse, max_total_ir_len ); #endif if ( ( hCrend->freq_buffer_im_diffuse = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->freq_buffer_im_diffuse, max_total_ir_len ); #else set_zero( hCrend->freq_buffer_im_diffuse, max_total_ir_len ); #endif } else { Loading @@ -1345,7 +1369,11 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->lfe_delay_line, max_total_ir_len ); #else set_zero( hCrend->lfe_delay_line, max_total_ir_len ); #endif } else { Loading Loading @@ -1541,7 +1569,7 @@ void ivas_rend_closeCrend( #ifdef SPLIT_REND_WITH_HEAD_ROT /*------------------------------------------------------------------------- * ivas_rend_openCldfbRend() * ivas_rend_closeCldfbRend() * * Close CLDFB based fastconv binaural renderer memories *------------------------------------------------------------------------*/ Loading Loading @@ -1588,7 +1616,11 @@ static ivas_error ivas_rend_crendConvolver( int16_t i, j, k, m; int16_t subframe_length, idx_in; int16_t lfe_idx_in; #ifdef FIX_CRASH_LONG_BRIR int32_t offset, offset_in, offset_diffuse; #else int16_t offset, offset_in, offset_diffuse; #endif int16_t nchan_in, nchan_out; const float *pIn; float *pFreq_buf_re, *pFreq_buf_im; Loading lib_rend/lib_rend.c +0 −1 Original line number Diff line number Diff line Loading @@ -4747,7 +4747,6 @@ ivas_error IVAS_REND_DisableHeadRotation( { if ( ( error = initMcBinauralRendering( &hIvasRend->inputsMc[i], hIvasRend->inputsMc[i].base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig, TRUE ) ) != IVAS_ERR_OK ) { return error; } } Loading Loading
lib_com/ivas_prot.h +7 −0 Original line number Diff line number Diff line Loading @@ -2920,6 +2920,13 @@ int16_t check_bounds_s( const int16_t high /* i : High limit */ ); #ifdef FIX_CRASH_LONG_BRIR void set_zero_l( float *vec, /* o : input vector */ const uint32_t lvec /* i : length of the vector */ ); #endif ivas_error stereo_memory_enc( CPE_ENC_HANDLE hCPE, /* i : CPE encoder structure */ const int32_t input_Fs, /* i : input sampling rate */ Loading
lib_com/ivas_tools.c +22 −0 Original line number Diff line number Diff line Loading @@ -579,6 +579,28 @@ int16_t check_bounds_s( return value_adj; } #ifdef FIX_CRASH_LONG_BRIR /*---------------------------------------------------------------------* * set_zero_l() * * Set a vector vec[] of dimension lvec to zero *---------------------------------------------------------------------*/ void set_zero_l( float *vec, /* i/o: input/output vector */ const uint32_t lvec /* i : length of the vector */ ) { uint32_t i; for ( i = 0; i < lvec; i++ ) { *vec++ = 0.0f; } return; } #endif /****************************************************************************/ /* matrix functions */ Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,7 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ /*#define SPLIT_REND_WITH_HEAD_ROT */ /* Dlb,FhG: Split Rendering contributions 21 and 35 */ #define FIX_CRASH_LONG_BRIR /* Orange : Fix crash when long BRIR is set */ #define FIX_SPLITREND_WARNINGS /* FhG: fix warnings related to split rendering observed in build jobs */ #define FIX_923_EXTERNAL_REND_COMMAND_LINE /* VA: issue 923: enable external renderer command-line options in UPPER case letters */ #define FIX_921_OMASA_DELAY_PRINTOUT /* VA: issue 921: correct OMASA decoder delay printout */ Loading
lib_rend/ivas_crend.c +33 −1 Original line number Diff line number Diff line Loading @@ -1248,7 +1248,11 @@ ivas_error ivas_rend_openCrend( ) { int16_t i, subframe_length; #ifdef FIX_CRASH_LONG_BRIR int32_t max_total_ir_len; #else int16_t max_total_ir_len; #endif HRTFS_HANDLE hHrtf; CREND_HANDLE hCrend; ivas_error error; Loading Loading @@ -1298,13 +1302,21 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->freq_buffer_re[i], max_total_ir_len ); #else set_zero( hCrend->freq_buffer_re[i], max_total_ir_len ); #endif if ( ( hCrend->freq_buffer_im[i] = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->freq_buffer_im[i], max_total_ir_len ); #else set_zero( hCrend->freq_buffer_im[i], max_total_ir_len ); #endif } for ( i = 0; i < BINAURAL_CHANNELS; i++ ) Loading @@ -1313,7 +1325,11 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->prev_out_buffer[i], subframe_length ); #else set_zero( hCrend->prev_out_buffer[i], subframe_length ); #endif } max_total_ir_len = hHrtf->num_iterations_diffuse[0] * subframe_length; Loading @@ -1324,13 +1340,21 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->freq_buffer_re_diffuse, max_total_ir_len ); #else set_zero( hCrend->freq_buffer_re_diffuse, max_total_ir_len ); #endif if ( ( hCrend->freq_buffer_im_diffuse = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->freq_buffer_im_diffuse, max_total_ir_len ); #else set_zero( hCrend->freq_buffer_im_diffuse, max_total_ir_len ); #endif } else { Loading @@ -1345,7 +1369,11 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->lfe_delay_line, max_total_ir_len ); #else set_zero( hCrend->lfe_delay_line, max_total_ir_len ); #endif } else { Loading Loading @@ -1541,7 +1569,7 @@ void ivas_rend_closeCrend( #ifdef SPLIT_REND_WITH_HEAD_ROT /*------------------------------------------------------------------------- * ivas_rend_openCldfbRend() * ivas_rend_closeCldfbRend() * * Close CLDFB based fastconv binaural renderer memories *------------------------------------------------------------------------*/ Loading Loading @@ -1588,7 +1616,11 @@ static ivas_error ivas_rend_crendConvolver( int16_t i, j, k, m; int16_t subframe_length, idx_in; int16_t lfe_idx_in; #ifdef FIX_CRASH_LONG_BRIR int32_t offset, offset_in, offset_diffuse; #else int16_t offset, offset_in, offset_diffuse; #endif int16_t nchan_in, nchan_out; const float *pIn; float *pFreq_buf_re, *pFreq_buf_im; Loading
lib_rend/lib_rend.c +0 −1 Original line number Diff line number Diff line Loading @@ -4747,7 +4747,6 @@ ivas_error IVAS_REND_DisableHeadRotation( { if ( ( error = initMcBinauralRendering( &hIvasRend->inputsMc[i], hIvasRend->inputsMc[i].base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig, TRUE ) ) != IVAS_ERR_OK ) { return error; } } Loading