Commit 7bdaed63 authored by emerit's avatar emerit
Browse files

update matlab scripts

parent 4bdb9b2b
Loading
Loading
Loading
Loading
−130 B

File deleted.

+40 −14
Original line number Diff line number Diff line
@@ -269,7 +269,7 @@ int main( int argc, char *argv[] )
    }
    if ( input_fastconv_bin_file_name != NULL )
    {
        nbHRTFMax += IVAS_NB_AUDIO_CONFIG; // fastconv
        nbHRTFMax += IVAS_NB_AUDIO_CONFIG + 1; // fastconv
    }
    if ( input_param_bin_file_name != NULL )
    {
@@ -301,7 +301,6 @@ int main( int argc, char *argv[] )
        switch ( rend_types[i] )
        {
            case RENDERER_BINAURAL_FASTCONV:
            case RENDERER_BINAURAL_FASTCONV_ROOM:
                if ( ( input_fastconv_bin_path != NULL ) && ( input_fastconv_bin_file_name != NULL ) )
                {
                    for ( j = 0; j < IVAS_NB_AUDIO_CONFIG; j++ )
@@ -332,6 +331,34 @@ int main( int argc, char *argv[] )
                    }
                }
                break;
            case RENDERER_BINAURAL_FASTCONV_ROOM:
                if ( ( input_fastconv_bin_path != NULL ) && ( input_fastconv_bin_file_name != NULL ) )
                {
                    /* Only one freq. for fastconv */
                    setOfHRTF[nbHRTF] = create_hrtf_fastconv( rend_types[i], BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, &hrtf_size );
                    if ( hrtf_size == -1 )
                    {
                        fprintf( stderr, "Creation of HRTF (%d, %d, %d) failed!\n\n", rend_types[i], BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, freq_ptr[0] );
                        for ( l = 0; l < nbHRTF; l++ )
                        {
                            free( setOfHRTF[l] );
                        }
                        free( setOfHRTF );
                        rom2bin_terminat();
                        return -1;
                    }
                    else
                    {
                        if ( setOfHRTF[nbHRTF] != NULL )
                        {
                            nbHRTF++;
                            fileSize += hrtf_size;
                            if ( hrtf_size_max < hrtf_size )
                                hrtf_size_max = hrtf_size;
                        }
                    }
                }
                break;
            case RENDERER_BINAURAL_PARAMETRIC:
                /* Parametric will always have just one set regardless of input and frequency. */
                if ( ( input_param_bin_path != NULL ) && ( input_param_bin_file_name != NULL ) )
@@ -1273,8 +1300,7 @@ char *create_hrtf_fastconv( RENDERER_TYPE rend_type, BINAURAL_INPUT_AUDIO_CONFIG
    char *full_in_fastconv_path = NULL;
    FILE *input_fastconv_bin_file = NULL;

    if ( ( rend_type == RENDERER_BINAURAL_FASTCONV_ROOM ) 
    && ( ( input_cfg == BINAURAL_INPUT_AUDIO_CONFIG_HOA3 ) || (input_cfg == BINAURAL_INPUT_AUDIO_CONFIG_HOA2) || (input_cfg == BINAURAL_INPUT_AUDIO_CONFIG_FOA)) )
    if ( ( rend_type == RENDERER_BINAURAL_FASTCONV_ROOM ) && ( ( input_cfg == BINAURAL_INPUT_AUDIO_CONFIG_HOA3 ) || ( input_cfg == BINAURAL_INPUT_AUDIO_CONFIG_HOA2 ) || ( input_cfg == BINAURAL_INPUT_AUDIO_CONFIG_FOA ) ) )
    {
        /* No FOA, HOA2, HOA3 BRIRs */
        return NULL;
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
%   the United Nations Convention on Contracts on the International Sales of Goods.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear -regexp ^((?!writeRomFileOutput|writeBinaryOutput|rom_file|bin_file|hrir_file|brir_file|ivas_path|binary_path|output_bin_name|param_bin_file|fastconv_bin_file|td_binary_file|binary_name).)*$
clear -regexp ^((?!writeRomFileOutput|writeBinaryOutput|writeEachRendererBinaryOutput|rom_file|bin_file|hrir_file|brir_file|ivas_path|binary_path|output_bin_name|param_bin_file|fastconv_bin_file|td_binary_file|binary_name).)*$
close all;
clc;

+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
%
% Generate tables from given HRIRs and BRIRs for IVAS binaural renderers PARAMETRIC and FASTCONV 
%
clear -regexp ^((?!writeRomFileOutput|writeBinaryOutput|rom_file|bin_file|hrir_file|brir_file|binary_path|output_bin_name|param_bin_file|fastconv_bin_file|td_binary_file|binary_name|ivas_path).)*$
clear -regexp ^((?!writeRomFileOutput|writeBinaryOutput|writeEachRendererBinaryOutput|rom_file|bin_file|hrir_file|brir_file|binary_path|output_bin_name|param_bin_file|fastconv_bin_file|td_binary_file|binary_name|ivas_path).)*$
close all;
clc;