Loading scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c +10 −9 Original line number Diff line number Diff line Loading @@ -1310,11 +1310,11 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c hrtf_data.inv_diffuse_weight_fx[0][i] = float2Word16( hrtf_data.inv_diffuse_weight[0][i], factorQ[1] ); hrtf_data.inv_diffuse_weight_fx[1][i] = float2Word16( hrtf_data.inv_diffuse_weight[1][i], factorQ[1] ); } offset = 0; for ( iIR = 0; iIR < hrtf_data.max_num_ir; iIR++ ) { for ( iChan = 0; iChan < BINAURAL_CHANNELS; iChan++ ) { offset = 0; for ( iIter = 0; iIter < hrtf_data.num_iterations[iIR][iChan]; iIter++ ) { // memcpy( hrtf_bin_wptr, coeff_rptr, data_size_tmp ); Loading @@ -1328,10 +1328,10 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c } } offset = 0; // pOut_to_bin_diffuse_re : The size depends on pIndex_frequency_max_diffuse for ( iChan = 0; iChan < BINAURAL_CHANNELS; iChan++ ) { offset = 0; for ( iIter = 0; iIter < hrtf_data.num_iterations_diffuse[iChan]; iIter++ ) { // memcpy( hrtf_bin_wptr, coeff_rptr, data_size_tmp ); Loading Loading @@ -2295,19 +2295,20 @@ void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherenc #ifdef IVAS_FLOAT_FIXED fprintf( fp, "\n#ifdef IVAS_FLOAT_FIXED" ); /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ fprintf( fp, "\nconst Word16 defaultHRIR_coherence_%dkHz[%s]_fx = \n", samplerate / 1000, len_str ); fprintf( fp, "\nconst Word16 defaultHRIR_coherence_%dkHz_fx[%s] = \n", samplerate / 1000, len_str ); write_array_word16_to_file( fp, pCoherence_fx, len, NUM_SAMPLES_PER_LINES_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ";\n" ); /* float *defaultHRIR_left_avg_power_[LR_IAC_LENGTH_NR_FC];*/ fprintf( fp, "\nconst Word16 defaultHRIR_left_avg_power_%dkHz[%s]_fx = \n", samplerate / 1000, len_str ); fprintf( fp, "\nconst Word16 defaultHRIR_left_avg_power_%dkHz_fx[%s] = \n", samplerate / 1000, len_str ); write_array_word16_to_file( fp, pEner_l_fx, len, NUM_SAMPLES_PER_LINES_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ";\n" ); /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ fprintf( fp, "\nconst Word16 defaultHRIR_right_avg_power_%dkHz[%s]_fx = \n", samplerate / 1000, len_str ); fprintf( fp, "\nconst Word16 defaultHRIR_right_avg_power_%dkHz_fx[%s] = \n", samplerate / 1000, len_str ); write_array_word16_to_file( fp, pEner_r_fx, len, NUM_SAMPLES_PER_LINES_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ";\n" ); fprintf( fp, "\n#endif /* IVAS_FLOAT_FIXED */" ); #endif if ( fp ) Loading Loading @@ -2662,11 +2663,11 @@ void update_h_file_with_reverb( int32_t samplerate ) #ifdef IVAS_FLOAT_FIXED fprintf( fp, "\n#ifdef IVAS_FLOAT_FIXED" ); /* UWord16 *defaultHRIR_coherence_[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ fprintf( fp, "\nextern Word16 defaultHRIR_coherence_%dkHz[%s]_fx;", samplerate / 1000, len_str ); fprintf( fp, "\nextern Word16 defaultHRIR_coherence_%dkHz_fx[%s];", samplerate / 1000, len_str ); /* UWord16 *defaultHRIR_left_avg_power[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ fprintf( fp, "\nextern Word16 defaultHRIR_left_avg_power_%dkHz[%s]_fx;", samplerate / 1000, len_str ); fprintf( fp, "\nextern Word16 defaultHRIR_right_avg_power_%dkHz[%s]_fx;", samplerate / 1000, len_str ); fprintf( fp, "\n#endif // IVAS_FLOAT_FIXED" ); fprintf( fp, "\nextern Word16 defaultHRIR_left_avg_power_%dkHz_fx[%s];", samplerate / 1000, len_str ); fprintf( fp, "\nextern Word16 defaultHRIR_right_avg_power_%dkHz_fx[%s];", samplerate / 1000, len_str ); fprintf( fp, "\n#endif /* IVAS_FLOAT_FIXED */" ); #endif if ( fp ) Loading Loading
scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c +10 −9 Original line number Diff line number Diff line Loading @@ -1310,11 +1310,11 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c hrtf_data.inv_diffuse_weight_fx[0][i] = float2Word16( hrtf_data.inv_diffuse_weight[0][i], factorQ[1] ); hrtf_data.inv_diffuse_weight_fx[1][i] = float2Word16( hrtf_data.inv_diffuse_weight[1][i], factorQ[1] ); } offset = 0; for ( iIR = 0; iIR < hrtf_data.max_num_ir; iIR++ ) { for ( iChan = 0; iChan < BINAURAL_CHANNELS; iChan++ ) { offset = 0; for ( iIter = 0; iIter < hrtf_data.num_iterations[iIR][iChan]; iIter++ ) { // memcpy( hrtf_bin_wptr, coeff_rptr, data_size_tmp ); Loading @@ -1328,10 +1328,10 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c } } offset = 0; // pOut_to_bin_diffuse_re : The size depends on pIndex_frequency_max_diffuse for ( iChan = 0; iChan < BINAURAL_CHANNELS; iChan++ ) { offset = 0; for ( iIter = 0; iIter < hrtf_data.num_iterations_diffuse[iChan]; iIter++ ) { // memcpy( hrtf_bin_wptr, coeff_rptr, data_size_tmp ); Loading Loading @@ -2295,19 +2295,20 @@ void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherenc #ifdef IVAS_FLOAT_FIXED fprintf( fp, "\n#ifdef IVAS_FLOAT_FIXED" ); /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ fprintf( fp, "\nconst Word16 defaultHRIR_coherence_%dkHz[%s]_fx = \n", samplerate / 1000, len_str ); fprintf( fp, "\nconst Word16 defaultHRIR_coherence_%dkHz_fx[%s] = \n", samplerate / 1000, len_str ); write_array_word16_to_file( fp, pCoherence_fx, len, NUM_SAMPLES_PER_LINES_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ";\n" ); /* float *defaultHRIR_left_avg_power_[LR_IAC_LENGTH_NR_FC];*/ fprintf( fp, "\nconst Word16 defaultHRIR_left_avg_power_%dkHz[%s]_fx = \n", samplerate / 1000, len_str ); fprintf( fp, "\nconst Word16 defaultHRIR_left_avg_power_%dkHz_fx[%s] = \n", samplerate / 1000, len_str ); write_array_word16_to_file( fp, pEner_l_fx, len, NUM_SAMPLES_PER_LINES_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ";\n" ); /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ fprintf( fp, "\nconst Word16 defaultHRIR_right_avg_power_%dkHz[%s]_fx = \n", samplerate / 1000, len_str ); fprintf( fp, "\nconst Word16 defaultHRIR_right_avg_power_%dkHz_fx[%s] = \n", samplerate / 1000, len_str ); write_array_word16_to_file( fp, pEner_r_fx, len, NUM_SAMPLES_PER_LINES_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ";\n" ); fprintf( fp, "\n#endif /* IVAS_FLOAT_FIXED */" ); #endif if ( fp ) Loading Loading @@ -2662,11 +2663,11 @@ void update_h_file_with_reverb( int32_t samplerate ) #ifdef IVAS_FLOAT_FIXED fprintf( fp, "\n#ifdef IVAS_FLOAT_FIXED" ); /* UWord16 *defaultHRIR_coherence_[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ fprintf( fp, "\nextern Word16 defaultHRIR_coherence_%dkHz[%s]_fx;", samplerate / 1000, len_str ); fprintf( fp, "\nextern Word16 defaultHRIR_coherence_%dkHz_fx[%s];", samplerate / 1000, len_str ); /* UWord16 *defaultHRIR_left_avg_power[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ fprintf( fp, "\nextern Word16 defaultHRIR_left_avg_power_%dkHz[%s]_fx;", samplerate / 1000, len_str ); fprintf( fp, "\nextern Word16 defaultHRIR_right_avg_power_%dkHz[%s]_fx;", samplerate / 1000, len_str ); fprintf( fp, "\n#endif // IVAS_FLOAT_FIXED" ); fprintf( fp, "\nextern Word16 defaultHRIR_left_avg_power_%dkHz_fx[%s];", samplerate / 1000, len_str ); fprintf( fp, "\nextern Word16 defaultHRIR_right_avg_power_%dkHz_fx[%s];", samplerate / 1000, len_str ); fprintf( fp, "\n#endif /* IVAS_FLOAT_FIXED */" ); #endif if ( fp ) Loading