Loading apps/encoder.c +9 −13 Original line number Diff line number Diff line Loading @@ -1354,12 +1354,20 @@ static bool parseCmdlIVAS_enc( arg->inputFormat = IVAS_ENC_INPUT_SBA; /* SBA configuration */ if ( i < argc - 4 ) if ( i < argc - 4 #ifdef IMPROVE_CMDLINE_ROBUSTNESS && is_number( argv[i] ) && sscanf( argv[i], "%d", &tmp ) > 0 #endif ) { #ifndef IMPROVE_CMDLINE_ROBUSTNESS if ( sscanf( argv[i], "%d", &tmp ) > 0 ) { #endif i++; #ifndef IMPROVE_CMDLINE_ROBUSTNESS } #endif } else { Loading @@ -1384,19 +1392,7 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.sba.order = IVAS_ENC_SBA_HOA3; break; default: #ifdef IMPROVE_CMDLINE_ROBUSTNESS if ( is_number( argv[i - 1] ) ) { fprintf( stderr, "Error: Wrong SBA order specified!\n\n" ); } else { fprintf( stderr, "Error: SBA order specified must be a number!\n\n" ); } #else fprintf( stderr, "Error: Wrong SBA order specified!\n\n" ); #endif usage_enc(); return false; } Loading ci/collect_artifacts.py +0 −3 Original line number Diff line number Diff line Loading @@ -62,9 +62,6 @@ def collect_for_sanitizer_test(file): ) files_to_archive = find_failed_files_for_sanitizer_test(console_log, "logs") print("files_to_archive_noPLC:", files_to_archive_noPLC) print("files_to_archive:", files_to_archive) log_folder = pathlib.Path("./LOGS_PLC") log_folder.mkdir() for test in files_to_archive.keys(): Loading lib_dec/ivas_mc_param_dec.c +11 −0 Original line number Diff line number Diff line Loading @@ -1614,6 +1614,17 @@ static void ivas_param_mc_get_mixing_matrices( matrix_product_diag( mat_mult_buffer1, nY_band, nX, 0, proto_matrix_ptr, nY_band, nX, 1, Cproto_diag ); #ifdef FIX_I220_PARAMMC_CPROTO /* make sure we have no negative entries in Cproto_diag due to rounding errors */ for ( ch_idx1 = 0; ch_idx1 < nY_band; ch_idx1++ ) { if ( Cproto_diag[ch_idx1] < 0.0f ) { Cproto_diag[ch_idx1] = 0.0f; } } #endif /* Computing the mixing matrices */ /* bands with decorr */ Loading lib_util/cmdl_tools.c +43 −4 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ char *to_upper( char *str ) * Check if a string contains only digits. *---------------------------------------------------------------------*/ bool is_digits_only( char *str ) bool is_digits_only( const char *str ) { int16_t i; Loading @@ -86,19 +86,58 @@ bool is_digits_only( char *str ) * Check if a string is a number. *---------------------------------------------------------------------*/ bool is_number( char *str ) bool is_number( const char *str ) { bool decimal_separator_found; int16_t i; int16_t numeric_len; decimal_separator_found = false; i = 0; numeric_len = 0; /* Check for null string or sign character */ if ( str[i] == '\0' ) { return false; } else if ( str[i] == '+' || str[i] == '-' ) { i++; } /* Ensure rest of string is numeric and only one decimal separator is present */ while ( str[i] != 0 ) { if ( ( str[i] < '0' || str[i] > '9' ) && str[i] != '.' && str[i] != '-' && str[i] != '\n' && str[i] != '\r' ) if ( str[i] < '0' || str[i] > '9' ) { if ( str[i] == '.' ) { if ( decimal_separator_found ) { return false; } else { decimal_separator_found = true; } } else if ( str[i] != '\r' && str[i] != '\n' ) { return false; } } else { numeric_len++; } i++; } if ( numeric_len == 0 ) { return false; } return true; } lib_util/cmdl_tools.h +2 −2 Original line number Diff line number Diff line Loading @@ -36,9 +36,9 @@ #include <stdbool.h> #include <stdint.h> bool is_digits_only( char *str ); bool is_digits_only( const char *str ); bool is_number( char *str ); bool is_number( const char *str ); char *to_upper( char *str ); Loading Loading
apps/encoder.c +9 −13 Original line number Diff line number Diff line Loading @@ -1354,12 +1354,20 @@ static bool parseCmdlIVAS_enc( arg->inputFormat = IVAS_ENC_INPUT_SBA; /* SBA configuration */ if ( i < argc - 4 ) if ( i < argc - 4 #ifdef IMPROVE_CMDLINE_ROBUSTNESS && is_number( argv[i] ) && sscanf( argv[i], "%d", &tmp ) > 0 #endif ) { #ifndef IMPROVE_CMDLINE_ROBUSTNESS if ( sscanf( argv[i], "%d", &tmp ) > 0 ) { #endif i++; #ifndef IMPROVE_CMDLINE_ROBUSTNESS } #endif } else { Loading @@ -1384,19 +1392,7 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.sba.order = IVAS_ENC_SBA_HOA3; break; default: #ifdef IMPROVE_CMDLINE_ROBUSTNESS if ( is_number( argv[i - 1] ) ) { fprintf( stderr, "Error: Wrong SBA order specified!\n\n" ); } else { fprintf( stderr, "Error: SBA order specified must be a number!\n\n" ); } #else fprintf( stderr, "Error: Wrong SBA order specified!\n\n" ); #endif usage_enc(); return false; } Loading
ci/collect_artifacts.py +0 −3 Original line number Diff line number Diff line Loading @@ -62,9 +62,6 @@ def collect_for_sanitizer_test(file): ) files_to_archive = find_failed_files_for_sanitizer_test(console_log, "logs") print("files_to_archive_noPLC:", files_to_archive_noPLC) print("files_to_archive:", files_to_archive) log_folder = pathlib.Path("./LOGS_PLC") log_folder.mkdir() for test in files_to_archive.keys(): Loading
lib_dec/ivas_mc_param_dec.c +11 −0 Original line number Diff line number Diff line Loading @@ -1614,6 +1614,17 @@ static void ivas_param_mc_get_mixing_matrices( matrix_product_diag( mat_mult_buffer1, nY_band, nX, 0, proto_matrix_ptr, nY_band, nX, 1, Cproto_diag ); #ifdef FIX_I220_PARAMMC_CPROTO /* make sure we have no negative entries in Cproto_diag due to rounding errors */ for ( ch_idx1 = 0; ch_idx1 < nY_band; ch_idx1++ ) { if ( Cproto_diag[ch_idx1] < 0.0f ) { Cproto_diag[ch_idx1] = 0.0f; } } #endif /* Computing the mixing matrices */ /* bands with decorr */ Loading
lib_util/cmdl_tools.c +43 −4 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ char *to_upper( char *str ) * Check if a string contains only digits. *---------------------------------------------------------------------*/ bool is_digits_only( char *str ) bool is_digits_only( const char *str ) { int16_t i; Loading @@ -86,19 +86,58 @@ bool is_digits_only( char *str ) * Check if a string is a number. *---------------------------------------------------------------------*/ bool is_number( char *str ) bool is_number( const char *str ) { bool decimal_separator_found; int16_t i; int16_t numeric_len; decimal_separator_found = false; i = 0; numeric_len = 0; /* Check for null string or sign character */ if ( str[i] == '\0' ) { return false; } else if ( str[i] == '+' || str[i] == '-' ) { i++; } /* Ensure rest of string is numeric and only one decimal separator is present */ while ( str[i] != 0 ) { if ( ( str[i] < '0' || str[i] > '9' ) && str[i] != '.' && str[i] != '-' && str[i] != '\n' && str[i] != '\r' ) if ( str[i] < '0' || str[i] > '9' ) { if ( str[i] == '.' ) { if ( decimal_separator_found ) { return false; } else { decimal_separator_found = true; } } else if ( str[i] != '\r' && str[i] != '\n' ) { return false; } } else { numeric_len++; } i++; } if ( numeric_len == 0 ) { return false; } return true; }
lib_util/cmdl_tools.h +2 −2 Original line number Diff line number Diff line Loading @@ -36,9 +36,9 @@ #include <stdbool.h> #include <stdint.h> bool is_digits_only( char *str ); bool is_digits_only( const char *str ); bool is_number( char *str ); bool is_number( const char *str ); char *to_upper( char *str ); Loading