Loading lib_dec/ivas_binRenderer_internal.c +10 −1 Original line number Diff line number Diff line Loading @@ -494,7 +494,9 @@ static ivas_error ivas_binRenderer_convModuleOpen( * * Allocate memory for HrtfFastConv structure elements *-------------------------------------------------------------------------*/ /*output_config is actually input_config. So please rename. BINAURAL_INPUT_AUDIO_CONFIG input_config can renamed as BINAURAL_INPUT_AUDIO_CONFIG bin_input_config */ ivas_error ivas_allocate_binaural_hrtf( HRTFS_FASTCONV *HrtfFastConv, /* i/o: FASTCONV HRTF structure */ AUDIO_CONFIG output_config, /* i : output audio configuration */ Loading @@ -514,6 +516,9 @@ ivas_error ivas_allocate_binaural_hrtf( } else { /*Too much code duplication. Add a function that takes in tripple pointer and 3 dimension lengths as input and just call that function for leftHRIRReal_HOA3, leftHRIRReal_HOA2, leftHRIRReal_FOA, leftHRIRReal, leftBRIRReal */ if ( ( HrtfFastConv->leftHRIRReal_HOA3 = (float ***) malloc( BINAURAL_CONVBANDS * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for leftHRIRReal_HOA3" ); Loading Loading @@ -774,6 +779,7 @@ ivas_error ivas_allocate_binaural_hrtf( } } } /*its not clear why BRIR buffer cant be allocated for HRTF_LS_CHANNELS always ?? and why we need to have all if checks for different LS configs*/ if ( allocate_init_flag == 1 ) { if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && is_loudspeaker_setup == 0 ) /*7_1_4*/ Loading Loading @@ -1248,6 +1254,9 @@ static ivas_error ivas_binaural_hrtf_open( { for ( j = 0; j < HrtfFastConv->nChannels; j++ ) { /*HrtfFastConv->leftBRIRReal[i][j] can always be allocated for 15 channels. No need to have HrtfFastConv->nChannels, simply use HRTF_LS_CHANNELS */ HrtfFastConv->leftBRIRReal[i][j] = leftBRIRReal[i][j]; HrtfFastConv->leftBRIRImag[i][j] = leftBRIRImag[i][j]; HrtfFastConv->rightBRIRReal[i][j] = rightBRIRReal[i][j]; Loading lib_util/hrtf_file_reader.c +1 −0 Original line number Diff line number Diff line Loading @@ -1436,6 +1436,7 @@ static ivas_error create_fastconv_HRTF_from_rawdata( for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) { /*here it seems to be always execting HRTF_LS_CHANNELS channels*/ for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) { memcpy( ( *hHRTF )->leftBRIRReal[i][j], hrtf_data_rptr, BINAURAL_NTAPS_MAX * sizeof( float ) ); Loading Loading
lib_dec/ivas_binRenderer_internal.c +10 −1 Original line number Diff line number Diff line Loading @@ -494,7 +494,9 @@ static ivas_error ivas_binRenderer_convModuleOpen( * * Allocate memory for HrtfFastConv structure elements *-------------------------------------------------------------------------*/ /*output_config is actually input_config. So please rename. BINAURAL_INPUT_AUDIO_CONFIG input_config can renamed as BINAURAL_INPUT_AUDIO_CONFIG bin_input_config */ ivas_error ivas_allocate_binaural_hrtf( HRTFS_FASTCONV *HrtfFastConv, /* i/o: FASTCONV HRTF structure */ AUDIO_CONFIG output_config, /* i : output audio configuration */ Loading @@ -514,6 +516,9 @@ ivas_error ivas_allocate_binaural_hrtf( } else { /*Too much code duplication. Add a function that takes in tripple pointer and 3 dimension lengths as input and just call that function for leftHRIRReal_HOA3, leftHRIRReal_HOA2, leftHRIRReal_FOA, leftHRIRReal, leftBRIRReal */ if ( ( HrtfFastConv->leftHRIRReal_HOA3 = (float ***) malloc( BINAURAL_CONVBANDS * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for leftHRIRReal_HOA3" ); Loading Loading @@ -774,6 +779,7 @@ ivas_error ivas_allocate_binaural_hrtf( } } } /*its not clear why BRIR buffer cant be allocated for HRTF_LS_CHANNELS always ?? and why we need to have all if checks for different LS configs*/ if ( allocate_init_flag == 1 ) { if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && is_loudspeaker_setup == 0 ) /*7_1_4*/ Loading Loading @@ -1248,6 +1254,9 @@ static ivas_error ivas_binaural_hrtf_open( { for ( j = 0; j < HrtfFastConv->nChannels; j++ ) { /*HrtfFastConv->leftBRIRReal[i][j] can always be allocated for 15 channels. No need to have HrtfFastConv->nChannels, simply use HRTF_LS_CHANNELS */ HrtfFastConv->leftBRIRReal[i][j] = leftBRIRReal[i][j]; HrtfFastConv->leftBRIRImag[i][j] = leftBRIRImag[i][j]; HrtfFastConv->rightBRIRReal[i][j] = rightBRIRReal[i][j]; Loading
lib_util/hrtf_file_reader.c +1 −0 Original line number Diff line number Diff line Loading @@ -1436,6 +1436,7 @@ static ivas_error create_fastconv_HRTF_from_rawdata( for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) { /*here it seems to be always execting HRTF_LS_CHANNELS channels*/ for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) { memcpy( ( *hHRTF )->leftBRIRReal[i][j], hrtf_data_rptr, BINAURAL_NTAPS_MAX * sizeof( float ) ); Loading