Loading lib_rend/ivas_crend.c +17 −7 Original line number Diff line number Diff line Loading @@ -214,11 +214,11 @@ static ivas_error ivas_rend_initCrend( #ifdef FIX_BINARY_BINAURAL_READING if ( ( hSetOfHRTF == NULL ) || ( ( hSetOfHRTF->hHRTF_hrir_combined == NULL ) && ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) && ( outConfig == AUDIO_CONFIG_BINAURAL ) ) || ( ( hSetOfHRTF->hHRTF_brir_combined == NULL ) && ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) && ( outConfig == AUDIO_CONFIG_BINAURAL_ROOM_IR ) ) || ( ( hSetOfHRTF->hHRTF_hrir_foa == NULL ) && ( inConfig == AUDIO_CONFIG_FOA ) ) || ( ( hSetOfHRTF->hHRTF_hrir_hoa2 == NULL ) && ( inConfig == AUDIO_CONFIG_HOA2 ) ) || ( ( hSetOfHRTF->hHRTF_hrir_hoa3 == NULL ) && ( inConfig == AUDIO_CONFIG_HOA3 ) ) ) ( ( hSetOfHRTF->hHRTF_hrir_combined == NULL ) && ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) && ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL ) ) || ( ( hSetOfHRTF->hHRTF_brir_combined == NULL ) && ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) && ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) ) || ( ( hSetOfHRTF->hHRTF_hrir_foa == NULL ) && ( inConfig == IVAS_AUDIO_CONFIG_FOA ) ) || ( ( hSetOfHRTF->hHRTF_hrir_hoa2 == NULL ) && ( inConfig == IVAS_AUDIO_CONFIG_HOA2 ) ) || ( ( hSetOfHRTF->hHRTF_hrir_hoa3 == NULL ) && ( inConfig == IVAS_AUDIO_CONFIG_HOA3 ) ) ) #else if ( hSetOfHRTF == NULL ) #endif Loading Loading @@ -1377,13 +1377,16 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifndef FIX_CRASH_LONG_BRIR 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" ); } #ifndef FIX_CRASH_LONG_BRIR set_zero( hCrend->freq_buffer_im[i], max_total_ir_len ); #endif } for ( i = 0; i < BINAURAL_CHANNELS; i++ ) Loading @@ -1392,7 +1395,9 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifndef FIX_CRASH_LONG_BRIR set_zero( hCrend->prev_out_buffer[i], subframe_length ); #endif } max_total_ir_len = hHrtf->num_iterations_diffuse[0] * subframe_length; Loading @@ -1403,13 +1408,16 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifndef FIX_CRASH_LONG_BRIR 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" ); } #ifndef FIX_CRASH_LONG_BRIR set_zero( hCrend->freq_buffer_im_diffuse, max_total_ir_len ); #endif } else { Loading @@ -1424,7 +1432,9 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifndef FIX_CRASH_LONG_BRIR set_zero( hCrend->lfe_delay_line, max_total_ir_len ); #endif } else { Loading Loading
lib_rend/ivas_crend.c +17 −7 Original line number Diff line number Diff line Loading @@ -214,11 +214,11 @@ static ivas_error ivas_rend_initCrend( #ifdef FIX_BINARY_BINAURAL_READING if ( ( hSetOfHRTF == NULL ) || ( ( hSetOfHRTF->hHRTF_hrir_combined == NULL ) && ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) && ( outConfig == AUDIO_CONFIG_BINAURAL ) ) || ( ( hSetOfHRTF->hHRTF_brir_combined == NULL ) && ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) && ( outConfig == AUDIO_CONFIG_BINAURAL_ROOM_IR ) ) || ( ( hSetOfHRTF->hHRTF_hrir_foa == NULL ) && ( inConfig == AUDIO_CONFIG_FOA ) ) || ( ( hSetOfHRTF->hHRTF_hrir_hoa2 == NULL ) && ( inConfig == AUDIO_CONFIG_HOA2 ) ) || ( ( hSetOfHRTF->hHRTF_hrir_hoa3 == NULL ) && ( inConfig == AUDIO_CONFIG_HOA3 ) ) ) ( ( hSetOfHRTF->hHRTF_hrir_combined == NULL ) && ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) && ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL ) ) || ( ( hSetOfHRTF->hHRTF_brir_combined == NULL ) && ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) && ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) ) || ( ( hSetOfHRTF->hHRTF_hrir_foa == NULL ) && ( inConfig == IVAS_AUDIO_CONFIG_FOA ) ) || ( ( hSetOfHRTF->hHRTF_hrir_hoa2 == NULL ) && ( inConfig == IVAS_AUDIO_CONFIG_HOA2 ) ) || ( ( hSetOfHRTF->hHRTF_hrir_hoa3 == NULL ) && ( inConfig == IVAS_AUDIO_CONFIG_HOA3 ) ) ) #else if ( hSetOfHRTF == NULL ) #endif Loading Loading @@ -1377,13 +1377,16 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifndef FIX_CRASH_LONG_BRIR 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" ); } #ifndef FIX_CRASH_LONG_BRIR set_zero( hCrend->freq_buffer_im[i], max_total_ir_len ); #endif } for ( i = 0; i < BINAURAL_CHANNELS; i++ ) Loading @@ -1392,7 +1395,9 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifndef FIX_CRASH_LONG_BRIR set_zero( hCrend->prev_out_buffer[i], subframe_length ); #endif } max_total_ir_len = hHrtf->num_iterations_diffuse[0] * subframe_length; Loading @@ -1403,13 +1408,16 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifndef FIX_CRASH_LONG_BRIR 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" ); } #ifndef FIX_CRASH_LONG_BRIR set_zero( hCrend->freq_buffer_im_diffuse, max_total_ir_len ); #endif } else { Loading @@ -1424,7 +1432,9 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } #ifndef FIX_CRASH_LONG_BRIR set_zero( hCrend->lfe_delay_line, max_total_ir_len ); #endif } else { Loading