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/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 +17 −0 Original line number Diff line number Diff line Loading @@ -2432,6 +2432,9 @@ static void convertOutputBuffer( int16_t *intBuffer ) { int16_t chnl, smpl, i; #ifdef FIX_REND_ROUNDING float temp; #endif i = 0; Loading @@ -2439,7 +2442,21 @@ static void convertOutputBuffer( { for ( chnl = 0; chnl < numChannels; ++chnl ) { #ifdef FIX_REND_ROUNDING temp = floatBuffer[chnl * numSamplesPerChannel + smpl]; temp = (float) floor( temp + 0.5f ); if ( temp > MAX16B_FLT ) { temp = MAX16B_FLT; } else if ( temp < MIN16B_FLT ) { temp = MIN16B_FLT; } intBuffer[i] = (int16_t) temp; #else intBuffer[i] = (int16_t) roundf( floatBuffer[chnl * numSamplesPerChannel + smpl] ); #endif ++i; } Loading lib_com/ivas_prot.h +9 −0 Original line number Diff line number Diff line Loading @@ -4653,6 +4653,15 @@ void ivas_ism_render( const int16_t output_frame /* i : output frame length per channel */ ); #ifdef FIX_REND_ISM_STEREO_PANNING void ivas_ism_get_stereo_gains( const float azimuth, /* i : object azimuth */ const float elevation, /* i : object elevation */ float *left_gain, /* o : left channel gain */ float *right_gain /* o : right channel gain */ ); #endif void ivas_mc2sba( IVAS_OUTPUT_SETUP hIntSetup, /* i : Format of decoder output */ float buffer_td[][L_FRAME48k], /* i/o: MC signals (on input) and the HOA3 (on output) */ Loading lib_com/options.h +8 −0 Original line number Diff line number Diff line Loading @@ -150,11 +150,19 @@ #define FIX_ITD /* Contribution 16: TD renderer ITD improvement and code cleanup */ #define BRATE_SWITCHING_RENDERING /* Bitrate switching changes related to the renderers */ #define FIX_ISM_DECODER_PRINTOUT /* Issue 229: fix ISM decoder printout */ #define FIX_REND_ISM_XFADE /* Issue 193: Crossfade inconsistencies in ISM between decoder and external renderer */ #define FIX_REND_ISM_POS_ROUNDING /* Issue 193: (Temporary solution until fix for #215) Align rounding of ISM position data in external renderer */ #define FIX_REND_ISM_STEREO_PANNING /* Issue 193: Use tangent panning for ISM to stereo in external renderer */ #define FIX_REND_ROUNDING /* Issue 195: Align float to int16 conversion in renderer with decoder */ #define FIX_REND_MONO_DMX /* Issue 195: Fix mono downmix coefficients in decoder and renderer */ #define FIX_REND_ROT_MC_BIN /* Issue 195: Fix wrong EFAP handle passed to renderer, resulting in no rotation for BINAURAL_ROOM output */ #define FIX_ITD_CNG /* Eri Contribution 11: Fix for CNG ITD */ #define FIX_VBR_COMPLEXITY /* Issue 234: fix extremely high complexity numbers for IVAS EVS mode */ #define FIX_ISM_INACTIVE_BITS /* Issue 230: fix bitbudget distribution in inactive frames in ISM format */ #define IMPROVE_CMDLINE_ROBUSTNESS /* Issue 233: Improve robustness of command-line parameters */ #define FIX_RA_PARAMS_PARAM_BIN_REND /* Issue 103: Digest room acoustics parameters for Parametric Binaural Renderer*/ #define FIX_ITD_CNG /* Eri: Fix for CNG ITD */ /* ################## End DEVELOPMENT switches ######################### */ 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/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 +17 −0 Original line number Diff line number Diff line Loading @@ -2432,6 +2432,9 @@ static void convertOutputBuffer( int16_t *intBuffer ) { int16_t chnl, smpl, i; #ifdef FIX_REND_ROUNDING float temp; #endif i = 0; Loading @@ -2439,7 +2442,21 @@ static void convertOutputBuffer( { for ( chnl = 0; chnl < numChannels; ++chnl ) { #ifdef FIX_REND_ROUNDING temp = floatBuffer[chnl * numSamplesPerChannel + smpl]; temp = (float) floor( temp + 0.5f ); if ( temp > MAX16B_FLT ) { temp = MAX16B_FLT; } else if ( temp < MIN16B_FLT ) { temp = MIN16B_FLT; } intBuffer[i] = (int16_t) temp; #else intBuffer[i] = (int16_t) roundf( floatBuffer[chnl * numSamplesPerChannel + smpl] ); #endif ++i; } Loading
lib_com/ivas_prot.h +9 −0 Original line number Diff line number Diff line Loading @@ -4653,6 +4653,15 @@ void ivas_ism_render( const int16_t output_frame /* i : output frame length per channel */ ); #ifdef FIX_REND_ISM_STEREO_PANNING void ivas_ism_get_stereo_gains( const float azimuth, /* i : object azimuth */ const float elevation, /* i : object elevation */ float *left_gain, /* o : left channel gain */ float *right_gain /* o : right channel gain */ ); #endif void ivas_mc2sba( IVAS_OUTPUT_SETUP hIntSetup, /* i : Format of decoder output */ float buffer_td[][L_FRAME48k], /* i/o: MC signals (on input) and the HOA3 (on output) */ Loading
lib_com/options.h +8 −0 Original line number Diff line number Diff line Loading @@ -150,11 +150,19 @@ #define FIX_ITD /* Contribution 16: TD renderer ITD improvement and code cleanup */ #define BRATE_SWITCHING_RENDERING /* Bitrate switching changes related to the renderers */ #define FIX_ISM_DECODER_PRINTOUT /* Issue 229: fix ISM decoder printout */ #define FIX_REND_ISM_XFADE /* Issue 193: Crossfade inconsistencies in ISM between decoder and external renderer */ #define FIX_REND_ISM_POS_ROUNDING /* Issue 193: (Temporary solution until fix for #215) Align rounding of ISM position data in external renderer */ #define FIX_REND_ISM_STEREO_PANNING /* Issue 193: Use tangent panning for ISM to stereo in external renderer */ #define FIX_REND_ROUNDING /* Issue 195: Align float to int16 conversion in renderer with decoder */ #define FIX_REND_MONO_DMX /* Issue 195: Fix mono downmix coefficients in decoder and renderer */ #define FIX_REND_ROT_MC_BIN /* Issue 195: Fix wrong EFAP handle passed to renderer, resulting in no rotation for BINAURAL_ROOM output */ #define FIX_ITD_CNG /* Eri Contribution 11: Fix for CNG ITD */ #define FIX_VBR_COMPLEXITY /* Issue 234: fix extremely high complexity numbers for IVAS EVS mode */ #define FIX_ISM_INACTIVE_BITS /* Issue 230: fix bitbudget distribution in inactive frames in ISM format */ #define IMPROVE_CMDLINE_ROBUSTNESS /* Issue 233: Improve robustness of command-line parameters */ #define FIX_RA_PARAMS_PARAM_BIN_REND /* Issue 103: Digest room acoustics parameters for Parametric Binaural Renderer*/ #define FIX_ITD_CNG /* Eri: Fix for CNG ITD */ /* ################## End DEVELOPMENT switches ######################### */ Loading