Loading .gitlab-ci.yml +22 −7 Original line number Diff line number Diff line Loading @@ -82,9 +82,6 @@ stages: - mv IVAS_cod_test IVAS_cod - mv IVAS_dec_test IVAS_dec ### re-checkout the commit from the source branch to have up-to-date self_test.py and scripts/testv (and actually everything) - git checkout $source_branch_commit_sha .merge-request-comparison-check: &merge-request-comparison-check - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "Non-bitexact cases without non-BE tag encountered!"; exit $EXIT_CODE_FAIL; fi Loading Loading @@ -334,6 +331,10 @@ ivas-pytest-on-merge-request: # some helper variables - "|| true" to prevent failures from grep not finding anything - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[non[ -]*be\]") || true - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi ### prepare pytest # create short test vectors Loading @@ -342,6 +343,9 @@ ivas-pytest-on-merge-request: - python3 -m pytest tests -v --update_ref 1 -m create_ref - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 ### Run test using branch scripts and input - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi ### run pytest - exit_code=0 - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? Loading Loading @@ -375,11 +379,18 @@ evs-pytest-on-merge-request: # some helper variables - "|| true" to prevent failures from grep not finding anything - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[evs[ -]*non[ -]*be\]") || true - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi ### prepare pytest # create references - python3 -m pytest tests/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm ### Run test using branch scripts and input - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi ### run pytest for EVS cases - exit_code=0 - python3 -m pytest tests/test_param_file.py -v --param_file scripts/config/self_test_evs.prm --junit-xml=report-junit-evs.xml || exit_code=$? Loading Loading @@ -472,11 +483,12 @@ codec-comparison-on-main-push: - mv IVAS_dec ../IVAS_dec_ref - cd .. ### re-checkout the latest commit in the main branch - git checkout $latest_commit # helper variable - "|| true" to prevent failures from grep not finding anything - non_be_flag=$(echo $CI_COMMIT_MESSAGE | grep -c --ignore-case "\[non[ -]*be\]") || true - ref_using_main=$(echo $CI_COMMIT_MESSAGE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true ### re-checkout the latest commit in the main branch, if ref_using_main is not set - if [ $ref_using_main == 0 ]; then git checkout $latest_commit;fi ### prepare pytest # create short test vectors Loading @@ -488,6 +500,9 @@ codec-comparison-on-main-push: - python3 -m pytest tests -v --update_ref 1 -m create_ref - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 ### re-checkout the latest commit here, if ref_using_main is set - if [ $ref_using_main -eq 1 ]; then git checkout $latest_commit;fi ### run pytest - exit_code=0 - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? Loading apps/encoder.c +28 −6 Original line number Diff line number Diff line Loading @@ -120,11 +120,13 @@ typedef struct const char *ca_config_file; bool mimeOutput; #ifdef DEBUG_AGC_ENCODER_CMD_OPTION #ifdef AGC_ENABLE_FOR_LBR IVAS_ENC_AGC agc; #else bool agc; #endif #endif /* AGC_ENABLE_FOR_LBR */ #endif /* DEBUG_AGC_ENCODER_CMD_OPTION */ bool pca; #ifdef DEBUG_FOA_AGC FILE *agcBitstream; /* temporary */ Loading Loading @@ -444,11 +446,25 @@ int main( } break; case IVAS_ENC_INPUT_SBA: if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, #ifdef DEBUG_AGC_ENCODER_CMD_OPTION arg.agc, #endif arg.pca #ifdef DEBUG_SBA_AUDIO_DUMP if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, arg.agc, arg.pca, &numTransportChannels ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, arg.agc, arg.pca ) ) != IVAS_ERR_OK ) , &numTransportChannels #endif ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_ENC_ConfigureForAmbisonics failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -874,11 +890,13 @@ static void initArgStruct( EncArguments *arg ) arg->ca_config_file = NULL; arg->mimeOutput = false; #ifdef DEBUG_AGC_ENCODER_CMD_OPTION #ifdef AGC_ENABLE_FOR_LBR arg->agc = IVAS_ENC_AGC_UNDEFINED; #else arg->agc = IVAS_DEFAULT_AGC; #endif #endif /* AGC_ENABLE_FOR_LBR */ #endif /* DEBUG_AGC_ENCODER_CMD_OPTION */ arg->pca = false; #ifdef DEBUG_FOA_AGC arg->agcBitstream = NULL; Loading Loading @@ -1384,6 +1402,7 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.stereoToMonoDownmix = true; i++; } #ifdef DEBUG_AGC_ENCODER_CMD_OPTION else if ( strcmp( argv_to_upper, "-AGC" ) == 0 ) { i++; Loading @@ -1409,6 +1428,7 @@ static bool parseCmdlIVAS_enc( return false; } } #endif else if ( strcmp( argv_to_upper, "-BYPASS" ) == 0 ) // VE: should be renamed to "-pca" { i++; Loading Loading @@ -1648,13 +1668,15 @@ static void usage_enc( void ) #ifdef DEBUG_SBA fprintf( stdout, "-tag : Tag name for intermediate debug files\n" ); #endif #ifdef DEBUG_AGC_ENCODER_CMD_OPTION #ifdef AGC_ENABLE_FOR_LBR fprintf( stdout, "-agc op : SBA Adaptive gain control, op = (0, 1). \n" ); fprintf( stdout, " By default op is 1 (activated) for bitrates between 24400 and 32000,\n" ); fprintf( stdout, " otherwise it is 0 (deactivated) for all other bitrates\n" ); #else fprintf( stdout, "-agc op : SBA Adaptive gain control, op = (0, 1), by default op is 0 or deactivated\n" ); #endif #endif /* AGC_ENABLE_FOR_LBR */ #endif /* DEBUG_AGC_ENCODER_CMD_OPTION */ fprintf( stdout, "-bypass mode : SBA PCA by-pass, mode = (1, 2), 1 = PCA off, 2 = signal adaptive, default is 1\n" ); #ifdef DEBUGGING Loading lib_com/cnst.h +3 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,9 @@ enum{ #define MAX_V_MULT_MAT 100 /* maximum array length for the function v_mult_mat() */ #define SBA_AGC_FORCE_ENABLE 1 #define SBA_AGC_FORCE_DISABLE 0 #define SBA_AGC_DEFAULT -1 /*----------------------------------------------------------------------------------* * Layers Loading lib_com/ivas_error.h +3 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,9 @@ typedef enum IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH, IVAS_ERR_ISM_FILE_READER_INVALID_METADATA_FORMAT, IVAS_ERR_INVALID_MASA_FORMAT_METADATA_FILE, #ifdef DEBUG_AGC_ENCODER_CMD_OPTION IVAS_ERR_INVALID_AGC, #endif /*----------------------------------------* * input data errors * Loading lib_com/ivas_prot.h +6 −6 Original line number Diff line number Diff line Loading @@ -44,9 +44,6 @@ #include "ivas_stat_dec.h" #include "ivas_stat_com.h" #include "ivas_error_utils.h" #ifdef AGC_ENABLE_FOR_LBR #include "lib_enc.h" #endif /* clang-format off */ Loading Loading @@ -3757,8 +3754,11 @@ void ivas_sba_prototype_renderer( /* AGC */ #ifdef AGC_ENABLE_FOR_LBR int16_t ivas_agc_enc_get_enablement_flag( IVAS_ENC_AGC agc_configuration, /* i : configuration used when encoder was initialised from cmd line */ /*! r: AGC enable flag */ int16_t ivas_agc_enc_get_flag( #ifdef DEBUG_AGC_ENCODER_CMD_OPTION int16_t agc_configuration, /* i : AGC configuration from command-line */ #endif int16_t nchan_transport /* i : number of transport channels */ ); #endif Loading Loading
.gitlab-ci.yml +22 −7 Original line number Diff line number Diff line Loading @@ -82,9 +82,6 @@ stages: - mv IVAS_cod_test IVAS_cod - mv IVAS_dec_test IVAS_dec ### re-checkout the commit from the source branch to have up-to-date self_test.py and scripts/testv (and actually everything) - git checkout $source_branch_commit_sha .merge-request-comparison-check: &merge-request-comparison-check - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "Non-bitexact cases without non-BE tag encountered!"; exit $EXIT_CODE_FAIL; fi Loading Loading @@ -334,6 +331,10 @@ ivas-pytest-on-merge-request: # some helper variables - "|| true" to prevent failures from grep not finding anything - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[non[ -]*be\]") || true - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi ### prepare pytest # create short test vectors Loading @@ -342,6 +343,9 @@ ivas-pytest-on-merge-request: - python3 -m pytest tests -v --update_ref 1 -m create_ref - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 ### Run test using branch scripts and input - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi ### run pytest - exit_code=0 - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? Loading Loading @@ -375,11 +379,18 @@ evs-pytest-on-merge-request: # some helper variables - "|| true" to prevent failures from grep not finding anything - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[evs[ -]*non[ -]*be\]") || true - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi ### prepare pytest # create references - python3 -m pytest tests/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm ### Run test using branch scripts and input - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi ### run pytest for EVS cases - exit_code=0 - python3 -m pytest tests/test_param_file.py -v --param_file scripts/config/self_test_evs.prm --junit-xml=report-junit-evs.xml || exit_code=$? Loading Loading @@ -472,11 +483,12 @@ codec-comparison-on-main-push: - mv IVAS_dec ../IVAS_dec_ref - cd .. ### re-checkout the latest commit in the main branch - git checkout $latest_commit # helper variable - "|| true" to prevent failures from grep not finding anything - non_be_flag=$(echo $CI_COMMIT_MESSAGE | grep -c --ignore-case "\[non[ -]*be\]") || true - ref_using_main=$(echo $CI_COMMIT_MESSAGE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true ### re-checkout the latest commit in the main branch, if ref_using_main is not set - if [ $ref_using_main == 0 ]; then git checkout $latest_commit;fi ### prepare pytest # create short test vectors Loading @@ -488,6 +500,9 @@ codec-comparison-on-main-push: - python3 -m pytest tests -v --update_ref 1 -m create_ref - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 ### re-checkout the latest commit here, if ref_using_main is set - if [ $ref_using_main -eq 1 ]; then git checkout $latest_commit;fi ### run pytest - exit_code=0 - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? Loading
apps/encoder.c +28 −6 Original line number Diff line number Diff line Loading @@ -120,11 +120,13 @@ typedef struct const char *ca_config_file; bool mimeOutput; #ifdef DEBUG_AGC_ENCODER_CMD_OPTION #ifdef AGC_ENABLE_FOR_LBR IVAS_ENC_AGC agc; #else bool agc; #endif #endif /* AGC_ENABLE_FOR_LBR */ #endif /* DEBUG_AGC_ENCODER_CMD_OPTION */ bool pca; #ifdef DEBUG_FOA_AGC FILE *agcBitstream; /* temporary */ Loading Loading @@ -444,11 +446,25 @@ int main( } break; case IVAS_ENC_INPUT_SBA: if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, #ifdef DEBUG_AGC_ENCODER_CMD_OPTION arg.agc, #endif arg.pca #ifdef DEBUG_SBA_AUDIO_DUMP if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, arg.agc, arg.pca, &numTransportChannels ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, arg.agc, arg.pca ) ) != IVAS_ERR_OK ) , &numTransportChannels #endif ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_ENC_ConfigureForAmbisonics failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -874,11 +890,13 @@ static void initArgStruct( EncArguments *arg ) arg->ca_config_file = NULL; arg->mimeOutput = false; #ifdef DEBUG_AGC_ENCODER_CMD_OPTION #ifdef AGC_ENABLE_FOR_LBR arg->agc = IVAS_ENC_AGC_UNDEFINED; #else arg->agc = IVAS_DEFAULT_AGC; #endif #endif /* AGC_ENABLE_FOR_LBR */ #endif /* DEBUG_AGC_ENCODER_CMD_OPTION */ arg->pca = false; #ifdef DEBUG_FOA_AGC arg->agcBitstream = NULL; Loading Loading @@ -1384,6 +1402,7 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.stereoToMonoDownmix = true; i++; } #ifdef DEBUG_AGC_ENCODER_CMD_OPTION else if ( strcmp( argv_to_upper, "-AGC" ) == 0 ) { i++; Loading @@ -1409,6 +1428,7 @@ static bool parseCmdlIVAS_enc( return false; } } #endif else if ( strcmp( argv_to_upper, "-BYPASS" ) == 0 ) // VE: should be renamed to "-pca" { i++; Loading Loading @@ -1648,13 +1668,15 @@ static void usage_enc( void ) #ifdef DEBUG_SBA fprintf( stdout, "-tag : Tag name for intermediate debug files\n" ); #endif #ifdef DEBUG_AGC_ENCODER_CMD_OPTION #ifdef AGC_ENABLE_FOR_LBR fprintf( stdout, "-agc op : SBA Adaptive gain control, op = (0, 1). \n" ); fprintf( stdout, " By default op is 1 (activated) for bitrates between 24400 and 32000,\n" ); fprintf( stdout, " otherwise it is 0 (deactivated) for all other bitrates\n" ); #else fprintf( stdout, "-agc op : SBA Adaptive gain control, op = (0, 1), by default op is 0 or deactivated\n" ); #endif #endif /* AGC_ENABLE_FOR_LBR */ #endif /* DEBUG_AGC_ENCODER_CMD_OPTION */ fprintf( stdout, "-bypass mode : SBA PCA by-pass, mode = (1, 2), 1 = PCA off, 2 = signal adaptive, default is 1\n" ); #ifdef DEBUGGING Loading
lib_com/cnst.h +3 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,9 @@ enum{ #define MAX_V_MULT_MAT 100 /* maximum array length for the function v_mult_mat() */ #define SBA_AGC_FORCE_ENABLE 1 #define SBA_AGC_FORCE_DISABLE 0 #define SBA_AGC_DEFAULT -1 /*----------------------------------------------------------------------------------* * Layers Loading
lib_com/ivas_error.h +3 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,9 @@ typedef enum IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH, IVAS_ERR_ISM_FILE_READER_INVALID_METADATA_FORMAT, IVAS_ERR_INVALID_MASA_FORMAT_METADATA_FILE, #ifdef DEBUG_AGC_ENCODER_CMD_OPTION IVAS_ERR_INVALID_AGC, #endif /*----------------------------------------* * input data errors * Loading
lib_com/ivas_prot.h +6 −6 Original line number Diff line number Diff line Loading @@ -44,9 +44,6 @@ #include "ivas_stat_dec.h" #include "ivas_stat_com.h" #include "ivas_error_utils.h" #ifdef AGC_ENABLE_FOR_LBR #include "lib_enc.h" #endif /* clang-format off */ Loading Loading @@ -3757,8 +3754,11 @@ void ivas_sba_prototype_renderer( /* AGC */ #ifdef AGC_ENABLE_FOR_LBR int16_t ivas_agc_enc_get_enablement_flag( IVAS_ENC_AGC agc_configuration, /* i : configuration used when encoder was initialised from cmd line */ /*! r: AGC enable flag */ int16_t ivas_agc_enc_get_flag( #ifdef DEBUG_AGC_ENCODER_CMD_OPTION int16_t agc_configuration, /* i : AGC configuration from command-line */ #endif int16_t nchan_transport /* i : number of transport channels */ ); #endif Loading