Loading .gitlab-ci.yml +81 −60 Original line number Diff line number Diff line Loading @@ -44,6 +44,52 @@ stages: .get-previous-merge-commit-sha: &get-previous-merge-commit-sha - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) .merge_request_comparison_setup: &merge_request_comparison_setup ### build test binaries, initial clean for paranoia reasons - make clean - mkdir build - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_test - mv IVAS_dec ../IVAS_dec_test - cd .. - rm -rf build/* ### store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) ### checkout version to compare against # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true # needed when depth is lower than the number of commits in the branch - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME ### compare to last target branch commit before pipeline was created - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) - git checkout $target_commit ### build reference binaries - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_ref - mv IVAS_dec ../IVAS_dec_ref - cd .. # rename test binaries back - 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 - if [ $exit_code -eq 1 ] && [ $non_be_flag != 0 ]; then echo "Non-bitexact cases with non-BE tag encountered"; exit $EXIT_CODE_NON_BE; fi - exit 0 # --------------------------------------------------------------- # Job templates Loading Loading @@ -302,7 +348,7 @@ external-renderer-cmake-msan-pytest: - python3 -m pytest scripts/tests/test_renderer.py -q --log-level ERROR -n auto # compare bit exactness between target and source branch pytest-on-merge-request: ivas-pytest-on-merge-request: extends: - .test-job-linux - .rules-merge-request Loading @@ -311,85 +357,62 @@ pytest-on-merge-request: timeout: "10 minutes" script: - *print-common-info ### build test binaries, initial clean for paranoia reasons - make clean - mkdir build - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_test - mv IVAS_dec ../IVAS_dec_test - cd .. - rm -rf build/* ### store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) ### checkout version to compare against # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true # needed when depth is lower than the number of commits in the branch - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME ### compare to last target branch commit before pipeline was created - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) - git checkout $target_commit ### build reference binaries - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_ref - mv IVAS_dec ../IVAS_dec_ref - cd .. ### re-checkout the commit from the source branch to have up-to-date test scripts and test vectors (and actually everything) - git checkout $source_branch_commit_sha - *merge_request_comparison_setup # some helper variables - "|| true" to prevent failures from grep not finding anything - evs_non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[evs[ -]*non[ -]*be\]") || true - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[non[ -]*be\]") || true - expected_nonbe_1=0 - expected_nonbe_2=0 - fail_1=0 - fail_2=0 ### prepare pytest # create short test vectors - python3 tests/create_short_testvectors.py # rename test binaries back - mv IVAS_cod_test IVAS_cod - mv IVAS_dec_test IVAS_dec # create references - python3 -m pytest tests -v --update_ref 1 -m create_ref - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 - python3 -m pytest tests/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm ### run pytest - exit_code=0 - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - if [ $zero_errors != 1 ]; then echo "Run errors in pytest"; fail_1=1; fi - *merge-request-comparison-check allow_failure: exit_codes: - 123 artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" when: always paths: - report-junit.xml expose_as: 'pytest ivas results' reports: junit: - report-junit.xml evs-pytest-on-merge-request: extends: - .test-job-linux - .rules-merge-request stage: compare needs: [ "build-codec-linux-cmake", "codec-smoke-test" ] timeout: "10 minutes" script: - *print-common-info - *merge_request_comparison_setup - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "pytest run had failures without non-BE tag encountered"; fail_1=1; fi - if [ $exit_code -eq 1 ] && [ $non_be_flag != 0 ]; then echo "pytest run had failures with non-BE tag encountered"; expected_nonbe_1=1; fi # 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 ### 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 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=$? - zero_errors=$(cat report-junit-evs.xml | grep -c 'errors="0"') || true - if [ $zero_errors != 1 ]; then echo "Run errors in pytest for EVS"; fail_2=1; fi - if [ $exit_code -eq 1 ] && [ $evs_non_be_flag == 0 ]; then echo "Non-bitexact EVS cases without EVS-non-BE tag encountered"; fail_2=1; fi - if [ $exit_code -eq 1 ] && [ $evs_non_be_flag != 0 ]; then echo "Non-bitexact EVS cases with EVS-non-BE tag encountered"; expected_nonbe_2=1; fi # Check results from both tests - if [ $fail_1 -eq 1 ] || [ $fail_2 -eq 1 ]; then exit $EXIT_CODE_FAIL; fi - if [ $expected_nonbe_1 -eq 1 ] || [ $expected_nonbe_2 -eq 1 ]; then exit $EXIT_CODE_NON_BE; fi - exit 0 - *merge-request-comparison-check allow_failure: exit_codes: Loading @@ -398,12 +421,10 @@ pytest-on-merge-request: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" when: always paths: - report-junit.xml - report-junit-evs.xml expose_as: 'pytest results' expose_as: 'pytest evs results' reports: junit: - report-junit.xml - report-junit-evs.xml Loading lib_com/core_com_config.c +6 −6 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ int16_t get_codec_mode( int16_t getTcxonly( const int16_t element_mode, /* i : IVAS element mode */ const int32_t total_brate, /* i : total bitrate */ const int16_t is_mct /* i : MCT mode flag */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0)*/ ) { int16_t tcxonly = 0; Loading @@ -187,7 +187,7 @@ int16_t getTcxonly( } break; case IVAS_CPE_MDCT: if ( total_brate >= ( is_mct ? IVAS_32k : IVAS_48k ) ) if ( total_brate >= ( MCT_flag ? IVAS_32k : IVAS_48k ) ) { tcxonly = 1; } Loading Loading @@ -808,7 +808,7 @@ void init_tcx_cfg( const int16_t infoIGFStopFreq, const int16_t element_mode, const int16_t ini_frame, const int16_t is_mct, const int16_t MCT_flag, const MCT_CHAN_MODE mct_chan_mode /* i : MDCT channel mode */ ) { Loading Loading @@ -850,7 +850,7 @@ void init_tcx_cfg( if ( hTcxCfg->fIsTNSAllowed ) { InitTnsConfigs( bwidth, hTcxCfg->tcx_coded_lines, hTcxCfg->tnsConfig, infoIGFStopFreq, total_brate, element_mode, is_mct ); InitTnsConfigs( bwidth, hTcxCfg->tcx_coded_lines, hTcxCfg->tnsConfig, infoIGFStopFreq, total_brate, element_mode, MCT_flag ); SetAllowTnsOnWhite( hTcxCfg->tnsConfig, element_mode == IVAS_CPE_MDCT ); } Loading lib_com/fill_spectrum.c +8 −0 Original line number Diff line number Diff line Loading @@ -90,10 +90,18 @@ void fill_spectrum( const int16_t element_mode /* i : element mode */ ) { #ifdef FIX_I178_HQ_BUFFER_OVERRUN float CodeBook[L_SPEC48k_EXT]; #else float CodeBook[FREQ_LENGTH]; #endif int16_t cb_size = 0; int16_t last_sfm; #ifdef FIX_I178_HQ_BUFFER_OVERRUN float CodeBook_mod[L_SPEC48k_EXT]; #else float CodeBook_mod[FREQ_LENGTH]; #endif float norm_adj[NB_SFM]; int16_t high_sfm = 23; int16_t flag_32K_env_hangover; Loading lib_com/ivas_filters.c +7 −7 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ /*------------------------------------------------------------------------------------------* * Static functions declaration * Local functions declaration *------------------------------------------------------------------------------------------*/ static void ivas_iir_2_filter( ivas_filters_process_state_t *filter_state, float *pIn_Out, const int16_t length, const int16_t stage ); Loading @@ -55,9 +55,9 @@ static void ivas_iir_2_filter( ivas_filters_process_state_t *filter_state, float *-----------------------------------------------------------------------------------------*/ void ivas_filters_init( ivas_filters_process_state_t *filter_state, const float *filt_coeff, const int16_t order ) ivas_filters_process_state_t *filter_state, /* i/o: filter state handle */ const float *filt_coeff, /* i : filter coefficients */ const int16_t order ) /* i : filter order */ { int16_t i; filter_state->order = order; Loading Loading @@ -107,9 +107,9 @@ void ivas_filters_init( *-----------------------------------------------------------------------------------------*/ void ivas_filter_process( ivas_filters_process_state_t *filter_state, float *pIn_Out, const int16_t length ) ivas_filters_process_state_t *filter_state, /* i/o: filter state handle */ float *pIn_Out, /* i/o: signal subject to filtering */ const int16_t length ) /* i : filter order */ { switch ( filter_state->order ) Loading lib_com/ivas_prot.h +157 −137 Original line number Diff line number Diff line Loading @@ -225,7 +225,7 @@ ivas_error pre_proc_ivas( const int16_t vad_flag_dtx, /* i : HE-SAD flag with additional DTX HO */ const float enerBuffer[CLDFB_NO_CHANNELS_MAX], /* i : energy buffer */ const float fft_buff[2 * L_FFT], /* i : FFT buffer */ const int16_t is_mct, /* i : MCT mode flag */ const int16_t MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int16_t vad_hover_flag, /* i : VAD hangover flag */ const int16_t flag_16k_smc /* i : flag to indicate if the OL SMC is run at 16 kHz */ ); Loading Loading @@ -504,7 +504,7 @@ void stereo_tcx_core_dec( void stereo_tcx_init_dec( Decoder_State *st, /* i/o: decoder state structure */ const int16_t is_mct, /* i : MCT mode flag */ const int16_t MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int16_t last_element_mode /* i : element mode of previous frame */ ); Loading Loading @@ -561,7 +561,7 @@ void ivas_decision_matrix_enc( void ivas_signaling_enc( Encoder_State *st, /* i/o: encoder state structure */ const int16_t is_MCT, /* i : MCT enabled */ const int16_t MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int32_t element_brate, /* i : element bitrate */ const int16_t tdm_SM_flag, /* i : channel combination scheme flag in TD stereo */ const int16_t tdm_Pitch_reuse_flag /* i : primary channel pitch reuse flag in TD stereo*/ Loading Loading @@ -1869,7 +1869,7 @@ void EstimateStereoTCXNoiseLevel( const int16_t ignore_chan[], /* i : flag indicating whether the channel should be ignored */ float fac_ns[][NB_DIV], /* o : noise filling level */ int16_t param_core[][NB_DIV * NPRM_DIV], /* o : quantized noise filling level */ const int16_t is_mct /* i : is mct flag */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ); void TNSAnalysisStereo( Loading Loading @@ -1998,7 +1998,7 @@ void decoder_tcx_noisefilling( const int16_t *prm_sqQ, int16_t nf_seed, const int16_t bfi, /* i : Bad frame indicator */ const int16_t isMCT, const int16_t MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int16_t frame_cnt /* i : frame counter in the super frame */ ); Loading Loading @@ -2082,7 +2082,7 @@ void decoder_tcx_IGF_stereo( const int16_t left_rect, /* i : left part is rectangular */ const int16_t k, /* i : Subframe index */ const int16_t bfi, /* i : bad frame indicator */ const int16_t is_mct /* i : flag to signal MCT or SMDCT */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ); void ms_processing( Loading Loading @@ -2360,7 +2360,7 @@ ivas_error front_vad( Encoder_State *st, /* i/o: encoder state structure */ const ENCODER_CONFIG_HANDLE hEncoderConfig, /* i : configuration structure */ FRONT_VAD_ENC_HANDLE *hFrontVads, /* i/o: front-VAD handles */ const int16_t hMCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int16_t MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int16_t input_frame, /* i : frame length */ int16_t vad_flag_dtx[], /* o : HE-SAD flag with additional DTX HO */ float fr_bands[][2 * NB_BANDS], /* i : energy in frequency bands */ Loading Loading @@ -2638,7 +2638,7 @@ void ivas_mdct_quant_coder( int16_t tnsBits[CPE_CHANNELS][NB_DIV], /* i : bits needed for TNS parameters */ int16_t tnsSize[CPE_CHANNELS][NB_DIV], /* i : size of TNS */ int16_t p_param[CPE_CHANNELS][NB_DIV], /* i : pointer to parameter array */ const int16_t is_mct /* i : is mct flag */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ); void apply_MCT_enc( Loading Loading @@ -2688,7 +2688,7 @@ void ivas_mdct_dec_side_bits_frame_channel( int16_t *LFE_off, /* o : flag if LFE has content */ int16_t nTnsBitsTCX10[CPE_CHANNELS][NB_DIV], /* o : number of bits for TNS */ int16_t param[CPE_CHANNELS][DEC_NPRM_DIV * NB_DIV], /* i/o: parameters buffer */ const int16_t MCT_flag, /* i : MCT tool active(1) or deactive (0) */ const int16_t MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int16_t odd_channel_cpe /* i : flag cpe with odd nb of tc channels */ ); Loading Loading @@ -2716,7 +2716,7 @@ void ivas_mdct_core_invQ( float *x[CPE_CHANNELS][NB_DIV], /* i/o: signal buffer */ float Aq[CPE_CHANNELS][( NB_SUBFR16k + 1 ) * ( M + 1 )], /* i : LP coefficients */ int16_t ms_mask[NB_DIV][MAX_SFB], /* i : M/S mask */ const int16_t isMCT /* i : MCT flag */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ); void ivas_mdct_core_reconstruct( Loading @@ -2725,7 +2725,7 @@ void ivas_mdct_core_reconstruct( float signal_outFB[CPE_CHANNELS][L_FRAME_PLUS], /* o : synthesis @output_FS */ const int16_t LFE_off, /* i : flag if LFE content */ int16_t fUseTns[CPE_CHANNELS][NB_DIV], /* i : flage TNS enabled */ const int16_t isMCT /* i : MCT flag */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ); void ivas_mdct_core_tns_ns( Loading @@ -2735,7 +2735,7 @@ void ivas_mdct_core_tns_ns( STnsData tnsData[CPE_CHANNELS][NB_DIV], /* o : TNS parameter */ float *x[CPE_CHANNELS][NB_DIV], /* o : synthesis @internal_FS */ float Aq[CPE_CHANNELS][( NB_SUBFR16k + 1 ) * ( M + 1 )], /* o : LP coefficients */ const int16_t isMCT /* i : MCT flag */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ); void ivas_mct_core_dec( Loading Loading @@ -3028,6 +3028,10 @@ void ivas_dirac_param_est_enc( float **pp_fr_real, float **pp_fr_imag, const int16_t input_frame #ifdef SBA_HOA_HBR_IMPROV , const SBA_MODE sba_mode #endif ); /*----------------------------------------------------------------------------------* Loading Loading @@ -3087,6 +3091,14 @@ int16_t ivas_sba_get_nchan_metadata( const int16_t sba_order /* i : Ambisonic (SBA) order */ ); #ifdef SBA_HOA_HBR_IMPROV /*! r: flag indicating to code SPAR HOA MD for all bands */ int16_t ivas_sba_get_spar_hoa_md_flag( const int16_t sba_order, /* i : Ambisonic (SBA) order */ const int32_t ivas_total_brate /* i : IVAS total bitrate */ ); #endif void ivas_sba_zero_vert_comp( float sba_data[][L_FRAME48k], /* i/o: SBA data frame */ const int16_t sba_order, /* i : Ambisonic (SBA) order */ Loading Loading @@ -3168,7 +3180,7 @@ void ivas_dirac_enc( BSTR_ENC_HANDLE hMetaData, /* i/o: Metadata bitstream handle */ int16_t *nb_bits_metadata, /* o : number of metadata bits written */ const int16_t Opt_DTX_ON, /* i : flag signaling DTX on */ float data_f[][L_FRAME48k], /* i/o: input: ACN/SN3D, output: omni, stereo DMX or FOA */ float data_f[][L_FRAME48k], /* i/o: SBA channels */ const int16_t input_frame, /* i : input frame length */ const int16_t sba_planar /* i : SBA planar flag */ ); Loading Loading @@ -3984,6 +3996,10 @@ ivas_error ivas_spar_md_dec_open( ivas_spar_md_dec_state_t **hMdDec_out, /* i/o: SPAR MD decoder handle */ const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ const int16_t num_channels /* i : number of internal channels */ #ifdef SBA_HOA_HBR_IMPROV , const int16_t sba_order /* i : SBA order */ #endif ); void ivas_spar_md_dec_close( Loading Loading @@ -4841,7 +4857,7 @@ void lls_interp_n( const int16_t N, /* i : length of the input vector */ float *a, /* o : calculated slope */ float *b, /* o : calculated offset */ int16_t upd /* i : use 1 to update x[] with the interpolated output */ const int16_t upd /* i : use 1 to update x[] with the interpolated output*/ ); void computeReferencePower_enc( Loading @@ -4851,6 +4867,10 @@ void computeReferencePower_enc( float *reference_power, /* o : Estimated power */ const int16_t enc_param_start_band, /* i : first band to process */ const int16_t num_freq_bands /* i : Number of frequency bands */ #ifdef SBA_HOA_HBR_IMPROV , const SBA_MODE sba_mode /* i : SBA mode */ #endif ); Loading Loading @@ -4936,15 +4956,15 @@ void ivas_lfe_lpf_select_filt_coeff( ); void ivas_filters_init( ivas_filters_process_state_t *filter_state, const float *filt_coeff, const int16_t order ivas_filters_process_state_t *filter_state, /* i/o: filter state handle */ const float *filt_coeff, /* i : filter coefficients */ const int16_t order /* i : filter order */ ); void ivas_filter_process( ivas_filters_process_state_t *filter_state, float *pIn_Out, const int16_t length ivas_filters_process_state_t *filter_state, /* i/o: filter state handle */ float *pIn_Out, /* i : signal subject to filtering */ const int16_t length /* i : filter order */ ); Loading Loading @@ -5203,7 +5223,7 @@ void ivas_fb_mixer_pcm_ingest( void ivas_dirac_enc_spar_delay_synchro( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ const int16_t input_frame, /* i : input frame length */ float data_f[][L_FRAME48k] /* i/o: input: ACN/SN3D, output: omni, stereo DMX or FOA*/ float data_f[][L_FRAME48k] /* i/o: SBA channels (ACN / SN3D) */ ); void ivas_fb_mixer_update_prior_input( Loading Loading
.gitlab-ci.yml +81 −60 Original line number Diff line number Diff line Loading @@ -44,6 +44,52 @@ stages: .get-previous-merge-commit-sha: &get-previous-merge-commit-sha - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) .merge_request_comparison_setup: &merge_request_comparison_setup ### build test binaries, initial clean for paranoia reasons - make clean - mkdir build - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_test - mv IVAS_dec ../IVAS_dec_test - cd .. - rm -rf build/* ### store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) ### checkout version to compare against # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true # needed when depth is lower than the number of commits in the branch - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME ### compare to last target branch commit before pipeline was created - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) - git checkout $target_commit ### build reference binaries - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_ref - mv IVAS_dec ../IVAS_dec_ref - cd .. # rename test binaries back - 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 - if [ $exit_code -eq 1 ] && [ $non_be_flag != 0 ]; then echo "Non-bitexact cases with non-BE tag encountered"; exit $EXIT_CODE_NON_BE; fi - exit 0 # --------------------------------------------------------------- # Job templates Loading Loading @@ -302,7 +348,7 @@ external-renderer-cmake-msan-pytest: - python3 -m pytest scripts/tests/test_renderer.py -q --log-level ERROR -n auto # compare bit exactness between target and source branch pytest-on-merge-request: ivas-pytest-on-merge-request: extends: - .test-job-linux - .rules-merge-request Loading @@ -311,85 +357,62 @@ pytest-on-merge-request: timeout: "10 minutes" script: - *print-common-info ### build test binaries, initial clean for paranoia reasons - make clean - mkdir build - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_test - mv IVAS_dec ../IVAS_dec_test - cd .. - rm -rf build/* ### store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) ### checkout version to compare against # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true # needed when depth is lower than the number of commits in the branch - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME ### compare to last target branch commit before pipeline was created - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) - git checkout $target_commit ### build reference binaries - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_ref - mv IVAS_dec ../IVAS_dec_ref - cd .. ### re-checkout the commit from the source branch to have up-to-date test scripts and test vectors (and actually everything) - git checkout $source_branch_commit_sha - *merge_request_comparison_setup # some helper variables - "|| true" to prevent failures from grep not finding anything - evs_non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[evs[ -]*non[ -]*be\]") || true - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[non[ -]*be\]") || true - expected_nonbe_1=0 - expected_nonbe_2=0 - fail_1=0 - fail_2=0 ### prepare pytest # create short test vectors - python3 tests/create_short_testvectors.py # rename test binaries back - mv IVAS_cod_test IVAS_cod - mv IVAS_dec_test IVAS_dec # create references - python3 -m pytest tests -v --update_ref 1 -m create_ref - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 - python3 -m pytest tests/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm ### run pytest - exit_code=0 - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - if [ $zero_errors != 1 ]; then echo "Run errors in pytest"; fail_1=1; fi - *merge-request-comparison-check allow_failure: exit_codes: - 123 artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" when: always paths: - report-junit.xml expose_as: 'pytest ivas results' reports: junit: - report-junit.xml evs-pytest-on-merge-request: extends: - .test-job-linux - .rules-merge-request stage: compare needs: [ "build-codec-linux-cmake", "codec-smoke-test" ] timeout: "10 minutes" script: - *print-common-info - *merge_request_comparison_setup - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "pytest run had failures without non-BE tag encountered"; fail_1=1; fi - if [ $exit_code -eq 1 ] && [ $non_be_flag != 0 ]; then echo "pytest run had failures with non-BE tag encountered"; expected_nonbe_1=1; fi # 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 ### 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 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=$? - zero_errors=$(cat report-junit-evs.xml | grep -c 'errors="0"') || true - if [ $zero_errors != 1 ]; then echo "Run errors in pytest for EVS"; fail_2=1; fi - if [ $exit_code -eq 1 ] && [ $evs_non_be_flag == 0 ]; then echo "Non-bitexact EVS cases without EVS-non-BE tag encountered"; fail_2=1; fi - if [ $exit_code -eq 1 ] && [ $evs_non_be_flag != 0 ]; then echo "Non-bitexact EVS cases with EVS-non-BE tag encountered"; expected_nonbe_2=1; fi # Check results from both tests - if [ $fail_1 -eq 1 ] || [ $fail_2 -eq 1 ]; then exit $EXIT_CODE_FAIL; fi - if [ $expected_nonbe_1 -eq 1 ] || [ $expected_nonbe_2 -eq 1 ]; then exit $EXIT_CODE_NON_BE; fi - exit 0 - *merge-request-comparison-check allow_failure: exit_codes: Loading @@ -398,12 +421,10 @@ pytest-on-merge-request: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" when: always paths: - report-junit.xml - report-junit-evs.xml expose_as: 'pytest results' expose_as: 'pytest evs results' reports: junit: - report-junit.xml - report-junit-evs.xml Loading
lib_com/core_com_config.c +6 −6 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ int16_t get_codec_mode( int16_t getTcxonly( const int16_t element_mode, /* i : IVAS element mode */ const int32_t total_brate, /* i : total bitrate */ const int16_t is_mct /* i : MCT mode flag */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0)*/ ) { int16_t tcxonly = 0; Loading @@ -187,7 +187,7 @@ int16_t getTcxonly( } break; case IVAS_CPE_MDCT: if ( total_brate >= ( is_mct ? IVAS_32k : IVAS_48k ) ) if ( total_brate >= ( MCT_flag ? IVAS_32k : IVAS_48k ) ) { tcxonly = 1; } Loading Loading @@ -808,7 +808,7 @@ void init_tcx_cfg( const int16_t infoIGFStopFreq, const int16_t element_mode, const int16_t ini_frame, const int16_t is_mct, const int16_t MCT_flag, const MCT_CHAN_MODE mct_chan_mode /* i : MDCT channel mode */ ) { Loading Loading @@ -850,7 +850,7 @@ void init_tcx_cfg( if ( hTcxCfg->fIsTNSAllowed ) { InitTnsConfigs( bwidth, hTcxCfg->tcx_coded_lines, hTcxCfg->tnsConfig, infoIGFStopFreq, total_brate, element_mode, is_mct ); InitTnsConfigs( bwidth, hTcxCfg->tcx_coded_lines, hTcxCfg->tnsConfig, infoIGFStopFreq, total_brate, element_mode, MCT_flag ); SetAllowTnsOnWhite( hTcxCfg->tnsConfig, element_mode == IVAS_CPE_MDCT ); } Loading
lib_com/fill_spectrum.c +8 −0 Original line number Diff line number Diff line Loading @@ -90,10 +90,18 @@ void fill_spectrum( const int16_t element_mode /* i : element mode */ ) { #ifdef FIX_I178_HQ_BUFFER_OVERRUN float CodeBook[L_SPEC48k_EXT]; #else float CodeBook[FREQ_LENGTH]; #endif int16_t cb_size = 0; int16_t last_sfm; #ifdef FIX_I178_HQ_BUFFER_OVERRUN float CodeBook_mod[L_SPEC48k_EXT]; #else float CodeBook_mod[FREQ_LENGTH]; #endif float norm_adj[NB_SFM]; int16_t high_sfm = 23; int16_t flag_32K_env_hangover; Loading
lib_com/ivas_filters.c +7 −7 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ /*------------------------------------------------------------------------------------------* * Static functions declaration * Local functions declaration *------------------------------------------------------------------------------------------*/ static void ivas_iir_2_filter( ivas_filters_process_state_t *filter_state, float *pIn_Out, const int16_t length, const int16_t stage ); Loading @@ -55,9 +55,9 @@ static void ivas_iir_2_filter( ivas_filters_process_state_t *filter_state, float *-----------------------------------------------------------------------------------------*/ void ivas_filters_init( ivas_filters_process_state_t *filter_state, const float *filt_coeff, const int16_t order ) ivas_filters_process_state_t *filter_state, /* i/o: filter state handle */ const float *filt_coeff, /* i : filter coefficients */ const int16_t order ) /* i : filter order */ { int16_t i; filter_state->order = order; Loading Loading @@ -107,9 +107,9 @@ void ivas_filters_init( *-----------------------------------------------------------------------------------------*/ void ivas_filter_process( ivas_filters_process_state_t *filter_state, float *pIn_Out, const int16_t length ) ivas_filters_process_state_t *filter_state, /* i/o: filter state handle */ float *pIn_Out, /* i/o: signal subject to filtering */ const int16_t length ) /* i : filter order */ { switch ( filter_state->order ) Loading
lib_com/ivas_prot.h +157 −137 Original line number Diff line number Diff line Loading @@ -225,7 +225,7 @@ ivas_error pre_proc_ivas( const int16_t vad_flag_dtx, /* i : HE-SAD flag with additional DTX HO */ const float enerBuffer[CLDFB_NO_CHANNELS_MAX], /* i : energy buffer */ const float fft_buff[2 * L_FFT], /* i : FFT buffer */ const int16_t is_mct, /* i : MCT mode flag */ const int16_t MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int16_t vad_hover_flag, /* i : VAD hangover flag */ const int16_t flag_16k_smc /* i : flag to indicate if the OL SMC is run at 16 kHz */ ); Loading Loading @@ -504,7 +504,7 @@ void stereo_tcx_core_dec( void stereo_tcx_init_dec( Decoder_State *st, /* i/o: decoder state structure */ const int16_t is_mct, /* i : MCT mode flag */ const int16_t MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int16_t last_element_mode /* i : element mode of previous frame */ ); Loading Loading @@ -561,7 +561,7 @@ void ivas_decision_matrix_enc( void ivas_signaling_enc( Encoder_State *st, /* i/o: encoder state structure */ const int16_t is_MCT, /* i : MCT enabled */ const int16_t MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int32_t element_brate, /* i : element bitrate */ const int16_t tdm_SM_flag, /* i : channel combination scheme flag in TD stereo */ const int16_t tdm_Pitch_reuse_flag /* i : primary channel pitch reuse flag in TD stereo*/ Loading Loading @@ -1869,7 +1869,7 @@ void EstimateStereoTCXNoiseLevel( const int16_t ignore_chan[], /* i : flag indicating whether the channel should be ignored */ float fac_ns[][NB_DIV], /* o : noise filling level */ int16_t param_core[][NB_DIV * NPRM_DIV], /* o : quantized noise filling level */ const int16_t is_mct /* i : is mct flag */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ); void TNSAnalysisStereo( Loading Loading @@ -1998,7 +1998,7 @@ void decoder_tcx_noisefilling( const int16_t *prm_sqQ, int16_t nf_seed, const int16_t bfi, /* i : Bad frame indicator */ const int16_t isMCT, const int16_t MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int16_t frame_cnt /* i : frame counter in the super frame */ ); Loading Loading @@ -2082,7 +2082,7 @@ void decoder_tcx_IGF_stereo( const int16_t left_rect, /* i : left part is rectangular */ const int16_t k, /* i : Subframe index */ const int16_t bfi, /* i : bad frame indicator */ const int16_t is_mct /* i : flag to signal MCT or SMDCT */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ); void ms_processing( Loading Loading @@ -2360,7 +2360,7 @@ ivas_error front_vad( Encoder_State *st, /* i/o: encoder state structure */ const ENCODER_CONFIG_HANDLE hEncoderConfig, /* i : configuration structure */ FRONT_VAD_ENC_HANDLE *hFrontVads, /* i/o: front-VAD handles */ const int16_t hMCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int16_t MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int16_t input_frame, /* i : frame length */ int16_t vad_flag_dtx[], /* o : HE-SAD flag with additional DTX HO */ float fr_bands[][2 * NB_BANDS], /* i : energy in frequency bands */ Loading Loading @@ -2638,7 +2638,7 @@ void ivas_mdct_quant_coder( int16_t tnsBits[CPE_CHANNELS][NB_DIV], /* i : bits needed for TNS parameters */ int16_t tnsSize[CPE_CHANNELS][NB_DIV], /* i : size of TNS */ int16_t p_param[CPE_CHANNELS][NB_DIV], /* i : pointer to parameter array */ const int16_t is_mct /* i : is mct flag */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ); void apply_MCT_enc( Loading Loading @@ -2688,7 +2688,7 @@ void ivas_mdct_dec_side_bits_frame_channel( int16_t *LFE_off, /* o : flag if LFE has content */ int16_t nTnsBitsTCX10[CPE_CHANNELS][NB_DIV], /* o : number of bits for TNS */ int16_t param[CPE_CHANNELS][DEC_NPRM_DIV * NB_DIV], /* i/o: parameters buffer */ const int16_t MCT_flag, /* i : MCT tool active(1) or deactive (0) */ const int16_t MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ const int16_t odd_channel_cpe /* i : flag cpe with odd nb of tc channels */ ); Loading Loading @@ -2716,7 +2716,7 @@ void ivas_mdct_core_invQ( float *x[CPE_CHANNELS][NB_DIV], /* i/o: signal buffer */ float Aq[CPE_CHANNELS][( NB_SUBFR16k + 1 ) * ( M + 1 )], /* i : LP coefficients */ int16_t ms_mask[NB_DIV][MAX_SFB], /* i : M/S mask */ const int16_t isMCT /* i : MCT flag */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ); void ivas_mdct_core_reconstruct( Loading @@ -2725,7 +2725,7 @@ void ivas_mdct_core_reconstruct( float signal_outFB[CPE_CHANNELS][L_FRAME_PLUS], /* o : synthesis @output_FS */ const int16_t LFE_off, /* i : flag if LFE content */ int16_t fUseTns[CPE_CHANNELS][NB_DIV], /* i : flage TNS enabled */ const int16_t isMCT /* i : MCT flag */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ); void ivas_mdct_core_tns_ns( Loading @@ -2735,7 +2735,7 @@ void ivas_mdct_core_tns_ns( STnsData tnsData[CPE_CHANNELS][NB_DIV], /* o : TNS parameter */ float *x[CPE_CHANNELS][NB_DIV], /* o : synthesis @internal_FS */ float Aq[CPE_CHANNELS][( NB_SUBFR16k + 1 ) * ( M + 1 )], /* o : LP coefficients */ const int16_t isMCT /* i : MCT flag */ const int16_t MCT_flag /* i : hMCT handle allocated (1) or not (0) */ ); void ivas_mct_core_dec( Loading Loading @@ -3028,6 +3028,10 @@ void ivas_dirac_param_est_enc( float **pp_fr_real, float **pp_fr_imag, const int16_t input_frame #ifdef SBA_HOA_HBR_IMPROV , const SBA_MODE sba_mode #endif ); /*----------------------------------------------------------------------------------* Loading Loading @@ -3087,6 +3091,14 @@ int16_t ivas_sba_get_nchan_metadata( const int16_t sba_order /* i : Ambisonic (SBA) order */ ); #ifdef SBA_HOA_HBR_IMPROV /*! r: flag indicating to code SPAR HOA MD for all bands */ int16_t ivas_sba_get_spar_hoa_md_flag( const int16_t sba_order, /* i : Ambisonic (SBA) order */ const int32_t ivas_total_brate /* i : IVAS total bitrate */ ); #endif void ivas_sba_zero_vert_comp( float sba_data[][L_FRAME48k], /* i/o: SBA data frame */ const int16_t sba_order, /* i : Ambisonic (SBA) order */ Loading Loading @@ -3168,7 +3180,7 @@ void ivas_dirac_enc( BSTR_ENC_HANDLE hMetaData, /* i/o: Metadata bitstream handle */ int16_t *nb_bits_metadata, /* o : number of metadata bits written */ const int16_t Opt_DTX_ON, /* i : flag signaling DTX on */ float data_f[][L_FRAME48k], /* i/o: input: ACN/SN3D, output: omni, stereo DMX or FOA */ float data_f[][L_FRAME48k], /* i/o: SBA channels */ const int16_t input_frame, /* i : input frame length */ const int16_t sba_planar /* i : SBA planar flag */ ); Loading Loading @@ -3984,6 +3996,10 @@ ivas_error ivas_spar_md_dec_open( ivas_spar_md_dec_state_t **hMdDec_out, /* i/o: SPAR MD decoder handle */ const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ const int16_t num_channels /* i : number of internal channels */ #ifdef SBA_HOA_HBR_IMPROV , const int16_t sba_order /* i : SBA order */ #endif ); void ivas_spar_md_dec_close( Loading Loading @@ -4841,7 +4857,7 @@ void lls_interp_n( const int16_t N, /* i : length of the input vector */ float *a, /* o : calculated slope */ float *b, /* o : calculated offset */ int16_t upd /* i : use 1 to update x[] with the interpolated output */ const int16_t upd /* i : use 1 to update x[] with the interpolated output*/ ); void computeReferencePower_enc( Loading @@ -4851,6 +4867,10 @@ void computeReferencePower_enc( float *reference_power, /* o : Estimated power */ const int16_t enc_param_start_band, /* i : first band to process */ const int16_t num_freq_bands /* i : Number of frequency bands */ #ifdef SBA_HOA_HBR_IMPROV , const SBA_MODE sba_mode /* i : SBA mode */ #endif ); Loading Loading @@ -4936,15 +4956,15 @@ void ivas_lfe_lpf_select_filt_coeff( ); void ivas_filters_init( ivas_filters_process_state_t *filter_state, const float *filt_coeff, const int16_t order ivas_filters_process_state_t *filter_state, /* i/o: filter state handle */ const float *filt_coeff, /* i : filter coefficients */ const int16_t order /* i : filter order */ ); void ivas_filter_process( ivas_filters_process_state_t *filter_state, float *pIn_Out, const int16_t length ivas_filters_process_state_t *filter_state, /* i/o: filter state handle */ float *pIn_Out, /* i : signal subject to filtering */ const int16_t length /* i : filter order */ ); Loading Loading @@ -5203,7 +5223,7 @@ void ivas_fb_mixer_pcm_ingest( void ivas_dirac_enc_spar_delay_synchro( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ const int16_t input_frame, /* i : input frame length */ float data_f[][L_FRAME48k] /* i/o: input: ACN/SN3D, output: omni, stereo DMX or FOA*/ float data_f[][L_FRAME48k] /* i/o: SBA channels (ACN / SN3D) */ ); void ivas_fb_mixer_update_prior_input( Loading