Loading lib_rend/ivas_crend.c +10 −10 Original line number Diff line number Diff line Loading @@ -905,7 +905,7 @@ static ivas_error destroy_HRTF( if ( *hHRTF != NULL && hHRTF != NULL ) { for ( i = 0; i < IVAS_MAX_NUM_CH; i++ ) for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) { for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { Loading Loading @@ -1710,13 +1710,13 @@ ivas_error ivas_rend_initCrend( { if ( use_brir ) { hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s_48kHz; hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s; hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_48kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_48kHz; } else { hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s_48kHz; hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s; hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_48kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_48kHz; } Loading @@ -1743,13 +1743,13 @@ ivas_error ivas_rend_initCrend( { if ( use_brir ) { hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s_32kHz; hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s; hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_32kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_32kHz; } else { hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s_32kHz; hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s; hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_32kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_32kHz; } Loading @@ -1776,13 +1776,13 @@ ivas_error ivas_rend_initCrend( { if ( use_brir ) { hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s_16kHz; hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s; hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_16kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_16kHz; } else { hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s_16kHz; hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s; hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_16kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_16kHz; } Loading Loading @@ -1934,7 +1934,7 @@ ivas_error ivas_rend_initCrend( { if ( output_Fs == 48000 ) { hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_48kHz; hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_48kHz; hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_48kHz; Loading @@ -1960,7 +1960,7 @@ ivas_error ivas_rend_initCrend( } else if ( output_Fs == 32000 ) { hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_32kHz; hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_32kHz; hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_32kHz; Loading @@ -1987,7 +1987,7 @@ ivas_error ivas_rend_initCrend( } else if ( output_Fs == 16000 ) { hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_16kHz; hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_16kHz; hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_16kHz; Loading lib_util/hrtf_file_reader.c +2 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ *******************************************************************************************************/ #include "hrtf_file_reader.h" #include "ivas_cnst.h" #include <stdio.h> #include <string.h> #include "prot.h" Loading Loading @@ -577,7 +578,7 @@ static ivas_error ivas_hrtf_init( hHRTF->max_num_iterations = 0; hHRTF->index_frequency_max_diffuse = 0; for ( i = 0; i < IVAS_MAX_NUM_CH; i++ ) for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) { hHRTF->inv_diffuse_weight[i] = 0; for ( j = 0; j < BINAURAL_CHANNELS; j++ ) Loading scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c +8 −8 Original line number Diff line number Diff line Loading @@ -994,7 +994,7 @@ void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int /* int16_t max_num_iterations; */ fprintf( fp, "\nconst int16_t %s_%s_max_num_iterations_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_iterations ); /* uint16_t num_iterations[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS];*/ /* uint16_t num_iterations[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ fprintf( fp, "\nconst uint16_t %s_%s_num_iterations_%2dkHz[%d][BINAURAL_CHANNELS]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir ); for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { Loading Loading @@ -1049,7 +1049,7 @@ void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int maxTotalNumFreqSampPerIterationsDiffuse = pTotalNumFreqSampPerIterationsDiffuse[1]; } /*uint16_t *pIndex_frequency_max[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS]; */ /*uint16_t *pIndex_frequency_max[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; */ fprintf( fp, "\nconst uint16_t %s_%s_pIndex_frequency_max_%2dkHz[%d][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir, hrtf->max_num_iterations ); for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { Loading @@ -1069,7 +1069,7 @@ void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int /* uint16_t index_frequency_max_diffuse; */ fprintf( fp, "\nconst uint16_t %s_%s_index_frequency_max_diffuse_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->index_frequency_max_diffuse ); /* float inv_diffuse_weight[IVAS_MAX_NUM_CH]; */ /* float inv_diffuse_weight[MAX_INTERN_CHANNELS]; */ fprintf( fp, "\nconst float %s_%s_inv_diffuse_weight_%2dkHz[%u]=", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir ); write_array_float_to_file( fp, hrtf->inv_diffuse_weight, hrtf->max_num_ir, hrtf->max_num_ir, FORMAT_FLOAT, 0 ); fprintf( fp, ";" ); Loading @@ -1088,7 +1088,7 @@ void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int fprintf( fp, "};" ); } /* float *pOut_to_bin[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS];*/ /* float *pOut_to_bin[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%d][BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir, maxTotalNumFreqSampPerIterations ); for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { Loading Loading @@ -1236,19 +1236,19 @@ void update_h_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int /* int16_t max_num_iterations; */ fprintf( fp, "\nextern int16_t %s_%s_max_num_iterations_%2dkHz;", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); /* uint16_t num_iterations[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS];*/ /* uint16_t num_iterations[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ fprintf( fp, "\nextern uint16_t %s_%s_num_iterations_%2dkHz[%d][BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir ); /* uint16_t num_iterations_diffuse[BINAURAL_CHANNELS];*/ fprintf( fp, "\nextern uint16_t %s_%s_num_iterations_diffuse_%2dkHz[BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); /*uint16_t *pIndex_frequency_max[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS]; */ /*uint16_t *pIndex_frequency_max[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; */ fprintf( fp, "\nextern uint16_t %s_%s_pIndex_frequency_max_%2dkHz[%d][BINAURAL_CHANNELS][%d];", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir, hrtf->max_num_iterations ); /* uint16_t index_frequency_max_diffuse; */ fprintf( fp, "\nextern uint16_t %s_%s_index_frequency_max_diffuse_%2dkHz;", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); /* float inv_diffuse_weight[IVAS_MAX_NUM_CH]; */ /* float inv_diffuse_weight[MAX_INTERN_CHANNELS]; */ fprintf( fp, "\nextern float %s_%s_inv_diffuse_weight_%2dkHz[%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir ); /* uint16_t *pIndex_frequency_max_diffuse[BINAURAL_CHANNELS];*/ Loading @@ -1261,7 +1261,7 @@ void update_h_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int fprintf( fp, "\nextern uint16_t %s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, ( hrtf->num_iterations_diffuse[0] > hrtf->num_iterations_diffuse[1] ) ? hrtf->num_iterations_diffuse[0] : hrtf->num_iterations_diffuse[1] ); } /* float *pOut_to_bin[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS];*/ /* float *pOut_to_bin[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ fprintf( fp, "\nextern float %s_%s_coeff_re_%2dkHz[%d][BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir, maxTotalNumFreqSampPerIterations ); fprintf( fp, "\nextern float %s_%s_coeff_im_%2dkHz[%d][BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir, maxTotalNumFreqSampPerIterations ); Loading scripts/binauralRenderer_interface/ivas_crend_binaural_filter_design.c +7 −7 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ ivas_error ivas_hrtf_close( return IVAS_ERR_WRONG_PARAMS; } for ( i = 0; i < IVAS_MAX_NUM_CH; i++ ) for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) { for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { Loading Loading @@ -271,14 +271,14 @@ ivas_error ivas_crend_binaural_filter_design_compute_filters_params( /* Vars for loop indices etc. */ int32_t i_ear, i_chan, i_tap; int32_t indBegin, indBeginMini, indDirect, indDirectMaxi[IVAS_MAX_NUM_CH], indDiffuse, int32_t indBegin, indBeginMini, indDirect, indDirectMaxi[MAX_INTERN_CHANNELS], indDiffuse, indDiffuseMaxi, diffuseMinLength, numDiffuseBlock, indMax[IVAS_SOFA_MAX_VAL_M]; float energy, energyL, energyR, energyMaxi, threshold, CSEinst, CSEinstInv; double valMax[IVAS_SOFA_MAX_VAL_M]; // float mdft_scale_fact = ((float)L_FRAME48k) / framelen; memset( indDirectMaxi, 0, sizeof( int32_t ) * IVAS_MAX_NUM_CH ); memset( indDirectMaxi, 0, sizeof( int32_t ) * MAX_INTERN_CHANNELS ); /* number of channels */ pParam->max_num_ir = (int16_t) pFirData->m; Loading Loading @@ -674,7 +674,7 @@ ivas_error ivas_crend_binaural_filter_design_set_hrtf_fr( /* Vars FOR loop indices etc. */ int16_t i_ear, i_chan; int32_t i_tap, i_block, lenDiffus, indStart, totSizeFreq[IVAS_MAX_NUM_CH], offset, totSizeFreqDiffuse; int32_t i_tap, i_block, lenDiffus, indStart, totSizeFreq[MAX_INTERN_CHANNELS], offset, totSizeFreqDiffuse; int16_t indFreq, indFreqMaxi; float energy, threshold, CSEinstInvFreq; Loading @@ -687,8 +687,8 @@ ivas_error ivas_crend_binaural_filter_design_set_hrtf_fr( float *pDiffuseFilter; /* diffuse filter (containing all blocks) ( pDiffuseFilter[tap] ) */ float **ppDiffuseFilterWMC; /* diffuse filters WMC (containing all blocks) ( ppDiffuseFilterWMC[ear][tap] ) */ float ppEnergyDiffuseFilter[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS] = { { 0 } }; /* diffuse filter energies ( ppEnergyDiffuseFilter[ear][channel] ) */ float ppDiffuseWeight[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS] = { { 0 } }; /* diffuse weights ( ppDiffuseWeight[ear][channel] ) */ float ppEnergyDiffuseFilter[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS] = { { 0 } }; /* diffuse filter energies ( ppEnergyDiffuseFilter[ear][channel] ) */ float ppDiffuseWeight[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS] = { { 0 } }; /* diffuse weights ( ppDiffuseWeight[ear][channel] ) */ float delayf; float mdft_scale_fact = ( (float) L_FRAME48k * 0.25f ) / frame_len; Loading Loading @@ -1377,7 +1377,7 @@ ivas_error ivas_get_hrtf_lens( } } for ( i = crend_hrtf->max_num_ir; i < IVAS_MAX_NUM_CH; i++ ) for ( i = crend_hrtf->max_num_ir; i < MAX_INTERN_CHANNELS; i++ ) { for ( j = 0; j < hrtf->R; j++ ) { Loading scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_io_parse.h +3 −3 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ #define IVAS_IN_FMT_714 "714" #define IVAS_IN_FMT_FOA "HOA1S" #define IVAS_MAX_NUM_CH 16 #define MAX_INTERN_CHANNELS 16 #define IVAS_MAX_PATH_LEN ( 2000 ) Loading Loading @@ -101,11 +101,11 @@ typedef struct ivas_crend_io_params_t ivas_in_out_fmt_t in_fmt; ivas_in_out_fmt_t out_fmt; #ifdef USE_PCM_OUT FILE *fIn[IVAS_MAX_NUM_CH]; FILE *fIn[MAX_INTERN_CHANNELS]; FILE *fOut; FILE *fRef; #else AudioFileReader *fIn[IVAS_MAX_NUM_CH]; AudioFileReader *fIn[MAX_INTERN_CHANNELS]; AudioFileWriter *fOut; AudioFileReader *fRef; #endif Loading Loading
lib_rend/ivas_crend.c +10 −10 Original line number Diff line number Diff line Loading @@ -905,7 +905,7 @@ static ivas_error destroy_HRTF( if ( *hHRTF != NULL && hHRTF != NULL ) { for ( i = 0; i < IVAS_MAX_NUM_CH; i++ ) for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) { for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { Loading Loading @@ -1710,13 +1710,13 @@ ivas_error ivas_rend_initCrend( { if ( use_brir ) { hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s_48kHz; hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s; hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_48kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_48kHz; } else { hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s_48kHz; hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s; hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_48kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_48kHz; } Loading @@ -1743,13 +1743,13 @@ ivas_error ivas_rend_initCrend( { if ( use_brir ) { hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s_32kHz; hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s; hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_32kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_32kHz; } else { hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s_32kHz; hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s; hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_32kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_32kHz; } Loading @@ -1776,13 +1776,13 @@ ivas_error ivas_rend_initCrend( { if ( use_brir ) { hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s_16kHz; hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s; hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_16kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_16kHz; } else { hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s_16kHz; hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s; hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_16kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_16kHz; } Loading Loading @@ -1934,7 +1934,7 @@ ivas_error ivas_rend_initCrend( { if ( output_Fs == 48000 ) { hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_48kHz; hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_48kHz; hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_48kHz; Loading @@ -1960,7 +1960,7 @@ ivas_error ivas_rend_initCrend( } else if ( output_Fs == 32000 ) { hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_32kHz; hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_32kHz; hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_32kHz; Loading @@ -1987,7 +1987,7 @@ ivas_error ivas_rend_initCrend( } else if ( output_Fs == 16000 ) { hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_16kHz; hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_16kHz; hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_16kHz; Loading
lib_util/hrtf_file_reader.c +2 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ *******************************************************************************************************/ #include "hrtf_file_reader.h" #include "ivas_cnst.h" #include <stdio.h> #include <string.h> #include "prot.h" Loading Loading @@ -577,7 +578,7 @@ static ivas_error ivas_hrtf_init( hHRTF->max_num_iterations = 0; hHRTF->index_frequency_max_diffuse = 0; for ( i = 0; i < IVAS_MAX_NUM_CH; i++ ) for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) { hHRTF->inv_diffuse_weight[i] = 0; for ( j = 0; j < BINAURAL_CHANNELS; j++ ) Loading
scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c +8 −8 Original line number Diff line number Diff line Loading @@ -994,7 +994,7 @@ void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int /* int16_t max_num_iterations; */ fprintf( fp, "\nconst int16_t %s_%s_max_num_iterations_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_iterations ); /* uint16_t num_iterations[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS];*/ /* uint16_t num_iterations[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ fprintf( fp, "\nconst uint16_t %s_%s_num_iterations_%2dkHz[%d][BINAURAL_CHANNELS]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir ); for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { Loading Loading @@ -1049,7 +1049,7 @@ void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int maxTotalNumFreqSampPerIterationsDiffuse = pTotalNumFreqSampPerIterationsDiffuse[1]; } /*uint16_t *pIndex_frequency_max[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS]; */ /*uint16_t *pIndex_frequency_max[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; */ fprintf( fp, "\nconst uint16_t %s_%s_pIndex_frequency_max_%2dkHz[%d][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir, hrtf->max_num_iterations ); for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { Loading @@ -1069,7 +1069,7 @@ void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int /* uint16_t index_frequency_max_diffuse; */ fprintf( fp, "\nconst uint16_t %s_%s_index_frequency_max_diffuse_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->index_frequency_max_diffuse ); /* float inv_diffuse_weight[IVAS_MAX_NUM_CH]; */ /* float inv_diffuse_weight[MAX_INTERN_CHANNELS]; */ fprintf( fp, "\nconst float %s_%s_inv_diffuse_weight_%2dkHz[%u]=", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir ); write_array_float_to_file( fp, hrtf->inv_diffuse_weight, hrtf->max_num_ir, hrtf->max_num_ir, FORMAT_FLOAT, 0 ); fprintf( fp, ";" ); Loading @@ -1088,7 +1088,7 @@ void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int fprintf( fp, "};" ); } /* float *pOut_to_bin[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS];*/ /* float *pOut_to_bin[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%d][BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir, maxTotalNumFreqSampPerIterations ); for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { Loading Loading @@ -1236,19 +1236,19 @@ void update_h_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int /* int16_t max_num_iterations; */ fprintf( fp, "\nextern int16_t %s_%s_max_num_iterations_%2dkHz;", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); /* uint16_t num_iterations[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS];*/ /* uint16_t num_iterations[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ fprintf( fp, "\nextern uint16_t %s_%s_num_iterations_%2dkHz[%d][BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir ); /* uint16_t num_iterations_diffuse[BINAURAL_CHANNELS];*/ fprintf( fp, "\nextern uint16_t %s_%s_num_iterations_diffuse_%2dkHz[BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); /*uint16_t *pIndex_frequency_max[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS]; */ /*uint16_t *pIndex_frequency_max[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; */ fprintf( fp, "\nextern uint16_t %s_%s_pIndex_frequency_max_%2dkHz[%d][BINAURAL_CHANNELS][%d];", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir, hrtf->max_num_iterations ); /* uint16_t index_frequency_max_diffuse; */ fprintf( fp, "\nextern uint16_t %s_%s_index_frequency_max_diffuse_%2dkHz;", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); /* float inv_diffuse_weight[IVAS_MAX_NUM_CH]; */ /* float inv_diffuse_weight[MAX_INTERN_CHANNELS]; */ fprintf( fp, "\nextern float %s_%s_inv_diffuse_weight_%2dkHz[%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir ); /* uint16_t *pIndex_frequency_max_diffuse[BINAURAL_CHANNELS];*/ Loading @@ -1261,7 +1261,7 @@ void update_h_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int fprintf( fp, "\nextern uint16_t %s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, ( hrtf->num_iterations_diffuse[0] > hrtf->num_iterations_diffuse[1] ) ? hrtf->num_iterations_diffuse[0] : hrtf->num_iterations_diffuse[1] ); } /* float *pOut_to_bin[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS];*/ /* float *pOut_to_bin[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ fprintf( fp, "\nextern float %s_%s_coeff_re_%2dkHz[%d][BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir, maxTotalNumFreqSampPerIterations ); fprintf( fp, "\nextern float %s_%s_coeff_im_%2dkHz[%d][BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_ir, maxTotalNumFreqSampPerIterations ); Loading
scripts/binauralRenderer_interface/ivas_crend_binaural_filter_design.c +7 −7 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ ivas_error ivas_hrtf_close( return IVAS_ERR_WRONG_PARAMS; } for ( i = 0; i < IVAS_MAX_NUM_CH; i++ ) for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) { for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { Loading Loading @@ -271,14 +271,14 @@ ivas_error ivas_crend_binaural_filter_design_compute_filters_params( /* Vars for loop indices etc. */ int32_t i_ear, i_chan, i_tap; int32_t indBegin, indBeginMini, indDirect, indDirectMaxi[IVAS_MAX_NUM_CH], indDiffuse, int32_t indBegin, indBeginMini, indDirect, indDirectMaxi[MAX_INTERN_CHANNELS], indDiffuse, indDiffuseMaxi, diffuseMinLength, numDiffuseBlock, indMax[IVAS_SOFA_MAX_VAL_M]; float energy, energyL, energyR, energyMaxi, threshold, CSEinst, CSEinstInv; double valMax[IVAS_SOFA_MAX_VAL_M]; // float mdft_scale_fact = ((float)L_FRAME48k) / framelen; memset( indDirectMaxi, 0, sizeof( int32_t ) * IVAS_MAX_NUM_CH ); memset( indDirectMaxi, 0, sizeof( int32_t ) * MAX_INTERN_CHANNELS ); /* number of channels */ pParam->max_num_ir = (int16_t) pFirData->m; Loading Loading @@ -674,7 +674,7 @@ ivas_error ivas_crend_binaural_filter_design_set_hrtf_fr( /* Vars FOR loop indices etc. */ int16_t i_ear, i_chan; int32_t i_tap, i_block, lenDiffus, indStart, totSizeFreq[IVAS_MAX_NUM_CH], offset, totSizeFreqDiffuse; int32_t i_tap, i_block, lenDiffus, indStart, totSizeFreq[MAX_INTERN_CHANNELS], offset, totSizeFreqDiffuse; int16_t indFreq, indFreqMaxi; float energy, threshold, CSEinstInvFreq; Loading @@ -687,8 +687,8 @@ ivas_error ivas_crend_binaural_filter_design_set_hrtf_fr( float *pDiffuseFilter; /* diffuse filter (containing all blocks) ( pDiffuseFilter[tap] ) */ float **ppDiffuseFilterWMC; /* diffuse filters WMC (containing all blocks) ( ppDiffuseFilterWMC[ear][tap] ) */ float ppEnergyDiffuseFilter[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS] = { { 0 } }; /* diffuse filter energies ( ppEnergyDiffuseFilter[ear][channel] ) */ float ppDiffuseWeight[IVAS_MAX_NUM_CH][BINAURAL_CHANNELS] = { { 0 } }; /* diffuse weights ( ppDiffuseWeight[ear][channel] ) */ float ppEnergyDiffuseFilter[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS] = { { 0 } }; /* diffuse filter energies ( ppEnergyDiffuseFilter[ear][channel] ) */ float ppDiffuseWeight[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS] = { { 0 } }; /* diffuse weights ( ppDiffuseWeight[ear][channel] ) */ float delayf; float mdft_scale_fact = ( (float) L_FRAME48k * 0.25f ) / frame_len; Loading Loading @@ -1377,7 +1377,7 @@ ivas_error ivas_get_hrtf_lens( } } for ( i = crend_hrtf->max_num_ir; i < IVAS_MAX_NUM_CH; i++ ) for ( i = crend_hrtf->max_num_ir; i < MAX_INTERN_CHANNELS; i++ ) { for ( j = 0; j < hrtf->R; j++ ) { Loading
scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_io_parse.h +3 −3 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ #define IVAS_IN_FMT_714 "714" #define IVAS_IN_FMT_FOA "HOA1S" #define IVAS_MAX_NUM_CH 16 #define MAX_INTERN_CHANNELS 16 #define IVAS_MAX_PATH_LEN ( 2000 ) Loading Loading @@ -101,11 +101,11 @@ typedef struct ivas_crend_io_params_t ivas_in_out_fmt_t in_fmt; ivas_in_out_fmt_t out_fmt; #ifdef USE_PCM_OUT FILE *fIn[IVAS_MAX_NUM_CH]; FILE *fIn[MAX_INTERN_CHANNELS]; FILE *fOut; FILE *fRef; #else AudioFileReader *fIn[IVAS_MAX_NUM_CH]; AudioFileReader *fIn[MAX_INTERN_CHANNELS]; AudioFileWriter *fOut; AudioFileReader *fRef; #endif Loading