Loading .gitlab-ci.yml +2 −0 Original line number Diff line number Diff line Loading @@ -287,6 +287,7 @@ msan-on-merge-request-linux: needs: ["build-codec-sanitizers-linux"] script: - *print-common-info - python3 ci/disable_ram_counting.py - make clean - make -j CLANG=1 - python3 scripts/self_test.py --create | tee test_output.txt Loading @@ -308,6 +309,7 @@ asan-on-merge-request-linux: needs: ["build-codec-sanitizers-linux"] script: - *print-common-info - python3 ci/disable_ram_counting.py - make clean - make -j CLANG=2 - python3 scripts/self_test.py --create | tee test_output.txt Loading apps/decoder.c +2 −13 Original line number Diff line number Diff line Loading @@ -71,14 +71,7 @@ static int32_t frame = 0; /* Counter of frames */ #define MIN_NUM_BITS_ACTIVE_FRAME 56 #ifdef REMOVE_SID_HARM_LEFTOVERS #define NUM_BITS_SID_IVAS_5K2 104 #else #define NUM_BITS_SID_IVAS_4K4 88 #define NUM_BITS_SID_IVAS_7K8 156 #define NUM_BITS_SID_IVAS_9K3 186 #define NUM_BITS_SID_IVAS_10K2 204 #endif #define MAX_FRAME_SIZE ( 48000 / 50 ) #define MAX_NUM_OUTPUT_CHANNELS 16 #define MAX_OUTPUT_PCM_BUFFER_SIZE ( MAX_NUM_OUTPUT_CHANNELS * MAX_FRAME_SIZE ) Loading Loading @@ -353,11 +346,7 @@ int main( fprintf( stderr, "\nError: input bitstream file %s couldn't be read\n\n", arg.inputBitstreamFilename ); goto cleanup; } #ifdef REMOVE_SID_HARM_LEFTOVERS } while ( bfi || num_bits < MIN_NUM_BITS_ACTIVE_FRAME || num_bits == NUM_BITS_SID_IVAS_5K2 ); #else } while ( bfi || num_bits < MIN_NUM_BITS_ACTIVE_FRAME || num_bits == NUM_BITS_SID_IVAS_4K4 || num_bits == NUM_BITS_SID_IVAS_7K8 || num_bits == NUM_BITS_SID_IVAS_9K3 || num_bits == NUM_BITS_SID_IVAS_10K2 ); #endif BS_Reader_Rewind( hBsReader ); Loading apps/encoder.c +48 −3 Original line number Diff line number Diff line Loading @@ -1273,8 +1273,21 @@ static bool parseCmdlIVAS_enc( arg->inputFormat = IVAS_ENC_INPUT_ISM; i++; #ifdef IMPROVE_CMDLINE_ROBUSTNESS if ( i < argc - 4 ) #else if ( i < argc - 5 ) #endif { #ifdef IMPROVE_CMDLINE_ROBUSTNESS if ( !is_digits_only( argv[i] ) ) { fprintf( stderr, "Error: Number of ISM channels must be an integer number!\n\n" ); usage_enc(); return false; } #endif if ( sscanf( argv[i], "%d", &tmp ) > 0 ) { i++; Loading @@ -1286,6 +1299,14 @@ static bool parseCmdlIVAS_enc( usage_enc(); return false; } #ifdef IMPROVE_CMDLINE_ROBUSTNESS else if ( tmp > IVAS_MAX_NUM_OBJECTS ) { fprintf( stderr, "Error: Too high number of ISM channels specified!\n\n" ); usage_enc(); return false; } #endif else { arg->inputFormatConfig.ism.numObjects = (int16_t) tmp; Loading Loading @@ -1317,7 +1338,11 @@ static bool parseCmdlIVAS_enc( } else { #ifdef IMPROVE_CMDLINE_ROBUSTNESS fprintf( stderr, "Error: not enough metadata arguments specified!\n\n" ); #else fprintf( stderr, "Error: not enough arguments\n\n" ); #endif usage_enc(); return false; } Loading @@ -1329,17 +1354,25 @@ 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 { tmp = -1; /* this is to avoid a compilation warning */ fprintf( stderr, "Error: SBA order not specified!\n\n" ); fprintf( stderr, "Error: SBA order must be specified, expecting a number!\n\n" ); usage_enc(); return false; } Loading Loading @@ -1371,6 +1404,15 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { #ifdef IMPROVE_CMDLINE_ROBUSTNESS if ( !is_digits_only( argv[i] ) ) { fprintf( stderr, "Error: Number of MASA channels must be an integer number!\n\n" ); usage_enc(); return false; } #endif if ( sscanf( argv[i], "%d", &tmp ) > 0 ) { i++; Loading @@ -1385,7 +1427,11 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.masaVariant = IVAS_ENC_MASA_2CH; break; default: #ifdef IMPROVE_CMDLINE_ROBUSTNESS fprintf( stderr, "Error: MASA channels must be 1 or 2.\n\n" ); #else fprintf( stderr, "Error: MASA channels must for the moment be 1 or 2.\n\n" ); #endif usage_enc(); return false; } Loading @@ -1410,7 +1456,6 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { if ( strcmp( to_upper( argv[i] ), "5_1" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1; Loading apps/renderer.c +2 −42 Original line number Diff line number Diff line Loading @@ -62,7 +62,6 @@ #include <stdio.h> #include <string.h> #ifdef EXT_RENDERER #ifndef count_malloc #ifdef RAM_COUNTING_TOOL #define count_malloc( n1 ) MALLOC_FCT_CALL( n1 ) Loading Loading @@ -426,12 +425,8 @@ static int16_t getTotalNumInChannels( IVAS_REND_HANDLE hIvasRend, IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS], IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS], IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS] #ifdef NOKIA_MASA_EXTERNAL_RENDERER , IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] #endif ) IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS], IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] ) { int16_t totalNumInChannels = 0; int16_t i, numInputChannels; Loading Loading @@ -486,7 +481,6 @@ static int16_t getTotalNumInChannels( totalNumInChannels += numInputChannels; } #ifdef NOKIA_MASA_EXTERNAL_RENDERER for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i ) { if ( masaIds[i] == 0 ) Loading @@ -502,7 +496,6 @@ static int16_t getTotalNumInChannels( } totalNumInChannels += numInputChannels; } #endif return totalNumInChannels; } Loading Loading @@ -676,9 +669,7 @@ int main( IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS] = { 0 }; IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS] = { 0 }; IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS] = { 0 }; #ifdef NOKIA_MASA_EXTERNAL_RENDERER IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] = { 0 }; #endif if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig ) ) != IVAS_ERR_OK ) { Loading Loading @@ -787,7 +778,6 @@ int main( } } #ifdef NOKIA_MASA_EXTERNAL_RENDERER for ( i = 0; i < args.inConfig.numMasaBuses; ++i ) { if ( ( error = IVAS_REND_AddInput( hIvasRend, args.inConfig.masaBuses[i].audioConfig, &masaIds[i] ) ) != IVAS_ERR_OK ) Loading @@ -802,13 +792,8 @@ int main( exit( -1 ); } } #endif #ifdef NOKIA_MASA_EXTERNAL_RENDERER const int16_t totalNumInChannels = getTotalNumInChannels( hIvasRend, mcIds, ismIds, sbaIds, masaIds ); #else const int16_t totalNumInChannels = getTotalNumInChannels( hIvasRend, mcIds, ismIds, sbaIds ); #endif if ( AudioFileReader_getNumChannels( audioReader ) != 0 /* If input file is raw PCM, audio reader has no info about number of channels */ && totalNumInChannels != AudioFileReader_getNumChannels( audioReader ) ) Loading Loading @@ -905,18 +890,6 @@ int main( } #endif #ifndef NOKIA_MASA_EXTERNAL_RENDERER for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i ) { if ( masaReaders[i] != NULL ) { MasaFileReader_readNextFrame( masaReaders[i] ); /* TODO: Feed MASA metadata here once MASA inputs are supported. For now avoid unused var warning */ (void) hMasaMetadata; } } #endif ObjectPositionBuffer mtdBuffer; IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); Loading Loading @@ -982,7 +955,6 @@ int main( } } #ifdef NOKIA_MASA_EXTERNAL_RENDERER for ( i = 0; i < args.inConfig.numMasaBuses; ++i ) { if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, masaIds[i], &numChannels ) ) != IVAS_ERR_OK ) Loading Loading @@ -1010,7 +982,6 @@ int main( } } } #endif IVAS_REND_GetSamples( hIvasRend, outBuffer ); Loading Loading @@ -2493,14 +2464,3 @@ static void convertOutputBuffer( return; } #else int main( int argc, char **argv ) { (void) argc; (void) argv; fprintf( stderr, "Enable EXT_RENDERER in options.h to use the external renderer.\n" ); return 0; } #endif 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 Loading
.gitlab-ci.yml +2 −0 Original line number Diff line number Diff line Loading @@ -287,6 +287,7 @@ msan-on-merge-request-linux: needs: ["build-codec-sanitizers-linux"] script: - *print-common-info - python3 ci/disable_ram_counting.py - make clean - make -j CLANG=1 - python3 scripts/self_test.py --create | tee test_output.txt Loading @@ -308,6 +309,7 @@ asan-on-merge-request-linux: needs: ["build-codec-sanitizers-linux"] script: - *print-common-info - python3 ci/disable_ram_counting.py - make clean - make -j CLANG=2 - python3 scripts/self_test.py --create | tee test_output.txt Loading
apps/decoder.c +2 −13 Original line number Diff line number Diff line Loading @@ -71,14 +71,7 @@ static int32_t frame = 0; /* Counter of frames */ #define MIN_NUM_BITS_ACTIVE_FRAME 56 #ifdef REMOVE_SID_HARM_LEFTOVERS #define NUM_BITS_SID_IVAS_5K2 104 #else #define NUM_BITS_SID_IVAS_4K4 88 #define NUM_BITS_SID_IVAS_7K8 156 #define NUM_BITS_SID_IVAS_9K3 186 #define NUM_BITS_SID_IVAS_10K2 204 #endif #define MAX_FRAME_SIZE ( 48000 / 50 ) #define MAX_NUM_OUTPUT_CHANNELS 16 #define MAX_OUTPUT_PCM_BUFFER_SIZE ( MAX_NUM_OUTPUT_CHANNELS * MAX_FRAME_SIZE ) Loading Loading @@ -353,11 +346,7 @@ int main( fprintf( stderr, "\nError: input bitstream file %s couldn't be read\n\n", arg.inputBitstreamFilename ); goto cleanup; } #ifdef REMOVE_SID_HARM_LEFTOVERS } while ( bfi || num_bits < MIN_NUM_BITS_ACTIVE_FRAME || num_bits == NUM_BITS_SID_IVAS_5K2 ); #else } while ( bfi || num_bits < MIN_NUM_BITS_ACTIVE_FRAME || num_bits == NUM_BITS_SID_IVAS_4K4 || num_bits == NUM_BITS_SID_IVAS_7K8 || num_bits == NUM_BITS_SID_IVAS_9K3 || num_bits == NUM_BITS_SID_IVAS_10K2 ); #endif BS_Reader_Rewind( hBsReader ); Loading
apps/encoder.c +48 −3 Original line number Diff line number Diff line Loading @@ -1273,8 +1273,21 @@ static bool parseCmdlIVAS_enc( arg->inputFormat = IVAS_ENC_INPUT_ISM; i++; #ifdef IMPROVE_CMDLINE_ROBUSTNESS if ( i < argc - 4 ) #else if ( i < argc - 5 ) #endif { #ifdef IMPROVE_CMDLINE_ROBUSTNESS if ( !is_digits_only( argv[i] ) ) { fprintf( stderr, "Error: Number of ISM channels must be an integer number!\n\n" ); usage_enc(); return false; } #endif if ( sscanf( argv[i], "%d", &tmp ) > 0 ) { i++; Loading @@ -1286,6 +1299,14 @@ static bool parseCmdlIVAS_enc( usage_enc(); return false; } #ifdef IMPROVE_CMDLINE_ROBUSTNESS else if ( tmp > IVAS_MAX_NUM_OBJECTS ) { fprintf( stderr, "Error: Too high number of ISM channels specified!\n\n" ); usage_enc(); return false; } #endif else { arg->inputFormatConfig.ism.numObjects = (int16_t) tmp; Loading Loading @@ -1317,7 +1338,11 @@ static bool parseCmdlIVAS_enc( } else { #ifdef IMPROVE_CMDLINE_ROBUSTNESS fprintf( stderr, "Error: not enough metadata arguments specified!\n\n" ); #else fprintf( stderr, "Error: not enough arguments\n\n" ); #endif usage_enc(); return false; } Loading @@ -1329,17 +1354,25 @@ 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 { tmp = -1; /* this is to avoid a compilation warning */ fprintf( stderr, "Error: SBA order not specified!\n\n" ); fprintf( stderr, "Error: SBA order must be specified, expecting a number!\n\n" ); usage_enc(); return false; } Loading Loading @@ -1371,6 +1404,15 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { #ifdef IMPROVE_CMDLINE_ROBUSTNESS if ( !is_digits_only( argv[i] ) ) { fprintf( stderr, "Error: Number of MASA channels must be an integer number!\n\n" ); usage_enc(); return false; } #endif if ( sscanf( argv[i], "%d", &tmp ) > 0 ) { i++; Loading @@ -1385,7 +1427,11 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.masaVariant = IVAS_ENC_MASA_2CH; break; default: #ifdef IMPROVE_CMDLINE_ROBUSTNESS fprintf( stderr, "Error: MASA channels must be 1 or 2.\n\n" ); #else fprintf( stderr, "Error: MASA channels must for the moment be 1 or 2.\n\n" ); #endif usage_enc(); return false; } Loading @@ -1410,7 +1456,6 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { if ( strcmp( to_upper( argv[i] ), "5_1" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1; Loading
apps/renderer.c +2 −42 Original line number Diff line number Diff line Loading @@ -62,7 +62,6 @@ #include <stdio.h> #include <string.h> #ifdef EXT_RENDERER #ifndef count_malloc #ifdef RAM_COUNTING_TOOL #define count_malloc( n1 ) MALLOC_FCT_CALL( n1 ) Loading Loading @@ -426,12 +425,8 @@ static int16_t getTotalNumInChannels( IVAS_REND_HANDLE hIvasRend, IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS], IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS], IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS] #ifdef NOKIA_MASA_EXTERNAL_RENDERER , IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] #endif ) IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS], IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] ) { int16_t totalNumInChannels = 0; int16_t i, numInputChannels; Loading Loading @@ -486,7 +481,6 @@ static int16_t getTotalNumInChannels( totalNumInChannels += numInputChannels; } #ifdef NOKIA_MASA_EXTERNAL_RENDERER for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i ) { if ( masaIds[i] == 0 ) Loading @@ -502,7 +496,6 @@ static int16_t getTotalNumInChannels( } totalNumInChannels += numInputChannels; } #endif return totalNumInChannels; } Loading Loading @@ -676,9 +669,7 @@ int main( IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS] = { 0 }; IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS] = { 0 }; IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS] = { 0 }; #ifdef NOKIA_MASA_EXTERNAL_RENDERER IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] = { 0 }; #endif if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig ) ) != IVAS_ERR_OK ) { Loading Loading @@ -787,7 +778,6 @@ int main( } } #ifdef NOKIA_MASA_EXTERNAL_RENDERER for ( i = 0; i < args.inConfig.numMasaBuses; ++i ) { if ( ( error = IVAS_REND_AddInput( hIvasRend, args.inConfig.masaBuses[i].audioConfig, &masaIds[i] ) ) != IVAS_ERR_OK ) Loading @@ -802,13 +792,8 @@ int main( exit( -1 ); } } #endif #ifdef NOKIA_MASA_EXTERNAL_RENDERER const int16_t totalNumInChannels = getTotalNumInChannels( hIvasRend, mcIds, ismIds, sbaIds, masaIds ); #else const int16_t totalNumInChannels = getTotalNumInChannels( hIvasRend, mcIds, ismIds, sbaIds ); #endif if ( AudioFileReader_getNumChannels( audioReader ) != 0 /* If input file is raw PCM, audio reader has no info about number of channels */ && totalNumInChannels != AudioFileReader_getNumChannels( audioReader ) ) Loading Loading @@ -905,18 +890,6 @@ int main( } #endif #ifndef NOKIA_MASA_EXTERNAL_RENDERER for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i ) { if ( masaReaders[i] != NULL ) { MasaFileReader_readNextFrame( masaReaders[i] ); /* TODO: Feed MASA metadata here once MASA inputs are supported. For now avoid unused var warning */ (void) hMasaMetadata; } } #endif ObjectPositionBuffer mtdBuffer; IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); Loading Loading @@ -982,7 +955,6 @@ int main( } } #ifdef NOKIA_MASA_EXTERNAL_RENDERER for ( i = 0; i < args.inConfig.numMasaBuses; ++i ) { if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, masaIds[i], &numChannels ) ) != IVAS_ERR_OK ) Loading Loading @@ -1010,7 +982,6 @@ int main( } } } #endif IVAS_REND_GetSamples( hIvasRend, outBuffer ); Loading Loading @@ -2493,14 +2464,3 @@ static void convertOutputBuffer( return; } #else int main( int argc, char **argv ) { (void) argc; (void) argv; fprintf( stderr, "Enable EXT_RENDERER in options.h to use the external renderer.\n" ); return 0; } #endif
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