Loading lib_com/ivas_prot.h +7 −0 Original line number Diff line number Diff line Loading @@ -2958,6 +2958,13 @@ int16_t check_bounds_s( const int16_t high /* i : High limit */ ); #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO 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 @@ -581,6 +581,28 @@ int16_t check_bounds_s( return value_adj; } #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO /*---------------------------------------------------------------------* * 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 −1 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ #define NONBE_FIX_GSC_BSTR /* VA: issue 1264 FLP (1189 BASOP): Fix bitstream synchronization between encoder and decoder in ACELP GSC in OMASA */ #define NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD /* VA/Eri: FLP issue 1277: Fix Mismatch in DTX high-rate threshold between EVS float and BASOP */ #define NONBE_FIX_708_OSBA_BR_SWITCHING_CRASH /* FhG: issue 708: fix crash in OSBA BR switching with long test vectors */ #define FIX_1440_PORT_1202_FROM_FLT_REPO /* Orange : Fix crash when long BRIR is set */ #define NONBE_1319_M2R_PRECISION_ALIGN /* Nokia: bring updates from PC code related to OMASA masa2total ratios */ Loading lib_rend/ivas_crend.c +32 −0 Original line number Diff line number Diff line Loading @@ -1249,7 +1249,11 @@ ivas_error ivas_rend_openCrend( ) { int16_t i, subframe_length; #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO 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 @@ -1299,13 +1303,21 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO 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_1440_PORT_1202_FROM_FLT_REPO 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 @@ -1314,7 +1326,11 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO 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 @@ -1325,13 +1341,21 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO 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_1440_PORT_1202_FROM_FLT_REPO 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 @@ -1346,7 +1370,11 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO 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 @@ -1589,7 +1617,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_1440_PORT_1202_FROM_FLT_REPO 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 Loading
lib_com/ivas_prot.h +7 −0 Original line number Diff line number Diff line Loading @@ -2958,6 +2958,13 @@ int16_t check_bounds_s( const int16_t high /* i : High limit */ ); #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO 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 @@ -581,6 +581,28 @@ int16_t check_bounds_s( return value_adj; } #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO /*---------------------------------------------------------------------* * 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 −1 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ #define NONBE_FIX_GSC_BSTR /* VA: issue 1264 FLP (1189 BASOP): Fix bitstream synchronization between encoder and decoder in ACELP GSC in OMASA */ #define NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD /* VA/Eri: FLP issue 1277: Fix Mismatch in DTX high-rate threshold between EVS float and BASOP */ #define NONBE_FIX_708_OSBA_BR_SWITCHING_CRASH /* FhG: issue 708: fix crash in OSBA BR switching with long test vectors */ #define FIX_1440_PORT_1202_FROM_FLT_REPO /* Orange : Fix crash when long BRIR is set */ #define NONBE_1319_M2R_PRECISION_ALIGN /* Nokia: bring updates from PC code related to OMASA masa2total ratios */ Loading
lib_rend/ivas_crend.c +32 −0 Original line number Diff line number Diff line Loading @@ -1249,7 +1249,11 @@ ivas_error ivas_rend_openCrend( ) { int16_t i, subframe_length; #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO 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 @@ -1299,13 +1303,21 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO 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_1440_PORT_1202_FROM_FLT_REPO 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 @@ -1314,7 +1326,11 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO 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 @@ -1325,13 +1341,21 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO 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_1440_PORT_1202_FROM_FLT_REPO 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 @@ -1346,7 +1370,11 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifdef FIX_1440_PORT_1202_FROM_FLT_REPO 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 @@ -1589,7 +1617,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_1440_PORT_1202_FROM_FLT_REPO 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