Loading .gitlab-ci.yml +28 −0 Original line number Diff line number Diff line variables: TESTV_DIR: "/usr/local/testv" BUILD_OUTPUT: "build_output.txt" EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" # This sets when pipelines are created. Jobs have more specific rules to restrict them. Loading Loading @@ -331,6 +332,33 @@ self-test-on-merge-request: # Test jobs for main branch # --------------------------------------------------------------- # check bitexactness to EVS be-2-evs-linux: extends: - .test-job-linux - .rules-main-push tags: - be-2-evs-temp stage: test needs: [ "build-codec-linux-cmake" ] script: - *print-common-info - mkdir build - cd build - cmake .. - make -j - cd .. # copy over to never change the testvector dir - cp -r $EVS_BE_TEST_DIR ./evs_be_test - cp build/IVAS_cod ./evs_be_test/bin/EVS_cod - cp build/IVAS_dec ./evs_be_test/bin/EVS_dec - cd evs_be_test - python3 ../ci/run_evs_be_test.py codec-comparison-on-main-push: extends: - .test-job-linux Loading apps/encoder.c 100755 → 100644 +1 −1 Original line number Diff line number Diff line Loading @@ -1618,7 +1618,7 @@ static void usage_enc( void ) fprintf( stdout, " where 0 = adaptive, 3-100 = fixed in number of frames,\n" ); fprintf( stdout, " default is deactivated\n" ); fprintf( stdout, "-dtx : Activate DTX mode with a SID update rate of 8 frames\n" ); fprintf( stdout, " Note: DTX is currently supported in EVS, DFT/TD stereo, 1 ISm, \n" ); fprintf( stdout, " Note: DTX is currently supported in EVS, stereo, 1 ISm, \n" ); fprintf( stdout, " SBA (up to 128kbps) and MASA (up to 128kbps)\n" ); fprintf( stdout, "-rf p o : Activate channel-aware mode for WB and SWB signal at 13.2kbps, \n" ); fprintf( stdout, " where FEC indicator, p: LO or HI, and FEC offset, o: 2, 3, 5, or 7 in number of frames.\n" ); Loading ci/run_evs_be_test.py 0 → 100755 +76 −0 Original line number Diff line number Diff line #!/usr/bin/env python3 import subprocess import pathlib import sys import concurrent.futures from threading import Lock README_FILES_PARALLEL = [ "Readme_AMRWB_IO_enc.txt", "Readme_AMRWB_IO_dec.txt", "Readme_EVS_enc.txt", "Readme_EVS_dec.txt", ] README_FILES_JBM = ["Readme_JBM_dec.txt"] README_FILES = README_FILES_PARALLEL + README_FILES_JBM BINARY_PATHS = ["./bin/EVS_cod", "./bin/EVS_dec"] FOLDER_PATHS = ["testv"] BIN_PATHS = BINARY_PATHS * 2 def main(): if not environment_is_correct(): return 1 result_dict = dict() # run first part in parallel with concurrent.futures.ThreadPoolExecutor(max_workers=4) as executor: executor.map( run_file, README_FILES_PARALLEL, BIN_PATHS, [result_dict] * len(README_FILES_PARALLEL) ) # JBM test can not run concurrently with the others run_file(README_FILES_JBM[0], BINARY_PATHS[1], result_dict) return analyze_results(result_dict) def analyze_results(result_dict): ret = 0 for filename, ret_code in result_dict.items(): if ret_code != 0: print(f"========= Test for {filename} failed! See log below: ==========") with open(filename.replace("Readme", "Log")) as f: print(f.read()) ret = 1 return ret def run_file(filename: str, bin_path: str, result_dict: dict): ret_code = subprocess.call(["bash", filename, bin_path]) with Lock(): result_dict[filename] = ret_code def environment_is_correct(): """ Check that the folder with the test resources is set up correctly: - all Readme files there - EVS binaries available in bin/ - testv and switchPaths folder exist - Content is not checked, though """ ret = True for path in README_FILES + BINARY_PATHS + FOLDER_PATHS: if not pathlib.Path(path).exists(): print(f"Environment setup is incorrect - {path} not found.") ret = False return ret if __name__ == "__main__": sys.exit(main()) lib_com/bitstream.c 100755 → 100644 +5 −11 Original line number Diff line number Diff line Loading @@ -1981,15 +1981,9 @@ ivas_error preview_indices( st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 ); st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 ); #ifdef SBA_ORDER_BITSTREAM st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( total_brate, st_ivas->sba_order ); #endif #ifdef SBA_ORDER_BITSTREAM ivas_sba_config( total_brate, st_ivas->sba_analysis_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ), st_ivas->sba_mode ); #else ivas_sba_config( total_brate, st_ivas->sba_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ), st_ivas->sba_mode ); #endif } } Loading Loading @@ -2069,7 +2063,7 @@ ivas_error read_indices( } else if ( k == SIZE_IVAS_BRATE_TBL ) { /*temp change for spar DTX*/ /*temp change for SPAR DTX*/ if ( total_brate == IVAS_SID_5k ) { st_ivas->element_mode_init = -1; Loading Loading @@ -2122,7 +2116,7 @@ ivas_error read_indices( } else { sid_upd_bad = 1; /* this frame type may happen in ETSI/3GPP CS cases , a corrupt sid frames */ sid_upd_bad = 1; /* this frame type may happen in ETSI/3GPP CS cases, a corrupt SID frames */ } } Loading Loading @@ -2207,7 +2201,7 @@ ivas_error read_indices( /* total_brate= 0 */ } /* handle bad/lost speech frame(and CS bad sid frame) in the decoders CNG synthesis settings pair (total_brate, bfi) */ /* handle bad/lost speech frame(and CS bad SID frame) in the decoders CNG synthesis settings pair (total_brate, bfi) */ if ( ( ( *CNG != 0 ) && ( ( speech_bad != 0 ) || ( speech_lost != 0 ) ) ) || /* SP_BAD or SPEECH_LOST) --> stay in CNG */ ( sid_upd_bad != 0 ) ) /* SID_UPD_BAD --> start CNG */ { Loading Loading @@ -2326,7 +2320,7 @@ static Word32 read_indices_mime_handle_dtx( { if ( st->bfi ) { sid_upd_bad = 1; /* corrupt sid_first, signaled as bad sid */ sid_upd_bad = 1; /* corrupt sid_first, signaled as bad SID */ } else { Loading Loading @@ -2384,7 +2378,7 @@ static Word32 read_indices_mime_handle_dtx( } /* in CNG */ /* handle bad speech frame(and bad sid frame) in the decoders CNG synthesis settings pair (total_brate, bfi) */ /* handle bad speech frame(and bad SID frame) in the decoders CNG synthesis settings pair (total_brate, bfi) */ if ( ( *CNG != 0 && ( speech_bad || speech_lost || no_data ) ) || /* SP_BAD or SPEECH_LOST) --> stay in CNG */ sid_upd_bad ) /* SID_UPD_BAD --> start/stay CNG */ { Loading lib_com/ivas_dirac_com.c +0 −8 Original line number Diff line number Diff line Loading @@ -82,11 +82,7 @@ ivas_error ivas_dirac_config( nCPE = &( (Encoder_Struct *) st_ivas )->nCPE; element_mode = &( (Encoder_Struct *) st_ivas )->hEncoderConfig->element_mode_init; nchan_transport = &( (Encoder_Struct *) st_ivas )->nchan_transport; #ifndef SBA_ORDER_BITSTREAM sba_order = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->sba_order; #else sba_order = ( (Encoder_Struct *) st_ivas )->sba_analysis_order; #endif sba_planar = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->sba_planar; ivas_total_brate = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->ivas_total_brate; Fs = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->input_Fs; Loading @@ -111,11 +107,7 @@ ivas_error ivas_dirac_config( nCPE = &( (Decoder_Struct *) st_ivas )->nCPE; element_mode = &( (Decoder_Struct *) st_ivas )->element_mode_init; nchan_transport = &( (Decoder_Struct *) st_ivas )->nchan_transport; #ifndef SBA_ORDER_BITSTREAM sba_order = ( (Decoder_Struct *) st_ivas )->sba_order; #else sba_order = ( (Decoder_Struct *) st_ivas )->sba_analysis_order; #endif sba_planar = ( (Decoder_Struct *) st_ivas )->sba_planar; ivas_total_brate = ( (Decoder_Struct *) st_ivas )->hDecoderConfig->ivas_total_brate; Fs = ( (Decoder_Struct *) st_ivas )->hDecoderConfig->output_Fs; Loading Loading
.gitlab-ci.yml +28 −0 Original line number Diff line number Diff line variables: TESTV_DIR: "/usr/local/testv" BUILD_OUTPUT: "build_output.txt" EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" # This sets when pipelines are created. Jobs have more specific rules to restrict them. Loading Loading @@ -331,6 +332,33 @@ self-test-on-merge-request: # Test jobs for main branch # --------------------------------------------------------------- # check bitexactness to EVS be-2-evs-linux: extends: - .test-job-linux - .rules-main-push tags: - be-2-evs-temp stage: test needs: [ "build-codec-linux-cmake" ] script: - *print-common-info - mkdir build - cd build - cmake .. - make -j - cd .. # copy over to never change the testvector dir - cp -r $EVS_BE_TEST_DIR ./evs_be_test - cp build/IVAS_cod ./evs_be_test/bin/EVS_cod - cp build/IVAS_dec ./evs_be_test/bin/EVS_dec - cd evs_be_test - python3 ../ci/run_evs_be_test.py codec-comparison-on-main-push: extends: - .test-job-linux Loading
apps/encoder.c 100755 → 100644 +1 −1 Original line number Diff line number Diff line Loading @@ -1618,7 +1618,7 @@ static void usage_enc( void ) fprintf( stdout, " where 0 = adaptive, 3-100 = fixed in number of frames,\n" ); fprintf( stdout, " default is deactivated\n" ); fprintf( stdout, "-dtx : Activate DTX mode with a SID update rate of 8 frames\n" ); fprintf( stdout, " Note: DTX is currently supported in EVS, DFT/TD stereo, 1 ISm, \n" ); fprintf( stdout, " Note: DTX is currently supported in EVS, stereo, 1 ISm, \n" ); fprintf( stdout, " SBA (up to 128kbps) and MASA (up to 128kbps)\n" ); fprintf( stdout, "-rf p o : Activate channel-aware mode for WB and SWB signal at 13.2kbps, \n" ); fprintf( stdout, " where FEC indicator, p: LO or HI, and FEC offset, o: 2, 3, 5, or 7 in number of frames.\n" ); Loading
ci/run_evs_be_test.py 0 → 100755 +76 −0 Original line number Diff line number Diff line #!/usr/bin/env python3 import subprocess import pathlib import sys import concurrent.futures from threading import Lock README_FILES_PARALLEL = [ "Readme_AMRWB_IO_enc.txt", "Readme_AMRWB_IO_dec.txt", "Readme_EVS_enc.txt", "Readme_EVS_dec.txt", ] README_FILES_JBM = ["Readme_JBM_dec.txt"] README_FILES = README_FILES_PARALLEL + README_FILES_JBM BINARY_PATHS = ["./bin/EVS_cod", "./bin/EVS_dec"] FOLDER_PATHS = ["testv"] BIN_PATHS = BINARY_PATHS * 2 def main(): if not environment_is_correct(): return 1 result_dict = dict() # run first part in parallel with concurrent.futures.ThreadPoolExecutor(max_workers=4) as executor: executor.map( run_file, README_FILES_PARALLEL, BIN_PATHS, [result_dict] * len(README_FILES_PARALLEL) ) # JBM test can not run concurrently with the others run_file(README_FILES_JBM[0], BINARY_PATHS[1], result_dict) return analyze_results(result_dict) def analyze_results(result_dict): ret = 0 for filename, ret_code in result_dict.items(): if ret_code != 0: print(f"========= Test for {filename} failed! See log below: ==========") with open(filename.replace("Readme", "Log")) as f: print(f.read()) ret = 1 return ret def run_file(filename: str, bin_path: str, result_dict: dict): ret_code = subprocess.call(["bash", filename, bin_path]) with Lock(): result_dict[filename] = ret_code def environment_is_correct(): """ Check that the folder with the test resources is set up correctly: - all Readme files there - EVS binaries available in bin/ - testv and switchPaths folder exist - Content is not checked, though """ ret = True for path in README_FILES + BINARY_PATHS + FOLDER_PATHS: if not pathlib.Path(path).exists(): print(f"Environment setup is incorrect - {path} not found.") ret = False return ret if __name__ == "__main__": sys.exit(main())
lib_com/bitstream.c 100755 → 100644 +5 −11 Original line number Diff line number Diff line Loading @@ -1981,15 +1981,9 @@ ivas_error preview_indices( st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 ); st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 ); #ifdef SBA_ORDER_BITSTREAM st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( total_brate, st_ivas->sba_order ); #endif #ifdef SBA_ORDER_BITSTREAM ivas_sba_config( total_brate, st_ivas->sba_analysis_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ), st_ivas->sba_mode ); #else ivas_sba_config( total_brate, st_ivas->sba_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ), st_ivas->sba_mode ); #endif } } Loading Loading @@ -2069,7 +2063,7 @@ ivas_error read_indices( } else if ( k == SIZE_IVAS_BRATE_TBL ) { /*temp change for spar DTX*/ /*temp change for SPAR DTX*/ if ( total_brate == IVAS_SID_5k ) { st_ivas->element_mode_init = -1; Loading Loading @@ -2122,7 +2116,7 @@ ivas_error read_indices( } else { sid_upd_bad = 1; /* this frame type may happen in ETSI/3GPP CS cases , a corrupt sid frames */ sid_upd_bad = 1; /* this frame type may happen in ETSI/3GPP CS cases, a corrupt SID frames */ } } Loading Loading @@ -2207,7 +2201,7 @@ ivas_error read_indices( /* total_brate= 0 */ } /* handle bad/lost speech frame(and CS bad sid frame) in the decoders CNG synthesis settings pair (total_brate, bfi) */ /* handle bad/lost speech frame(and CS bad SID frame) in the decoders CNG synthesis settings pair (total_brate, bfi) */ if ( ( ( *CNG != 0 ) && ( ( speech_bad != 0 ) || ( speech_lost != 0 ) ) ) || /* SP_BAD or SPEECH_LOST) --> stay in CNG */ ( sid_upd_bad != 0 ) ) /* SID_UPD_BAD --> start CNG */ { Loading Loading @@ -2326,7 +2320,7 @@ static Word32 read_indices_mime_handle_dtx( { if ( st->bfi ) { sid_upd_bad = 1; /* corrupt sid_first, signaled as bad sid */ sid_upd_bad = 1; /* corrupt sid_first, signaled as bad SID */ } else { Loading Loading @@ -2384,7 +2378,7 @@ static Word32 read_indices_mime_handle_dtx( } /* in CNG */ /* handle bad speech frame(and bad sid frame) in the decoders CNG synthesis settings pair (total_brate, bfi) */ /* handle bad speech frame(and bad SID frame) in the decoders CNG synthesis settings pair (total_brate, bfi) */ if ( ( *CNG != 0 && ( speech_bad || speech_lost || no_data ) ) || /* SP_BAD or SPEECH_LOST) --> stay in CNG */ sid_upd_bad ) /* SID_UPD_BAD --> start/stay CNG */ { Loading
lib_com/ivas_dirac_com.c +0 −8 Original line number Diff line number Diff line Loading @@ -82,11 +82,7 @@ ivas_error ivas_dirac_config( nCPE = &( (Encoder_Struct *) st_ivas )->nCPE; element_mode = &( (Encoder_Struct *) st_ivas )->hEncoderConfig->element_mode_init; nchan_transport = &( (Encoder_Struct *) st_ivas )->nchan_transport; #ifndef SBA_ORDER_BITSTREAM sba_order = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->sba_order; #else sba_order = ( (Encoder_Struct *) st_ivas )->sba_analysis_order; #endif sba_planar = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->sba_planar; ivas_total_brate = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->ivas_total_brate; Fs = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->input_Fs; Loading @@ -111,11 +107,7 @@ ivas_error ivas_dirac_config( nCPE = &( (Decoder_Struct *) st_ivas )->nCPE; element_mode = &( (Decoder_Struct *) st_ivas )->element_mode_init; nchan_transport = &( (Decoder_Struct *) st_ivas )->nchan_transport; #ifndef SBA_ORDER_BITSTREAM sba_order = ( (Decoder_Struct *) st_ivas )->sba_order; #else sba_order = ( (Decoder_Struct *) st_ivas )->sba_analysis_order; #endif sba_planar = ( (Decoder_Struct *) st_ivas )->sba_planar; ivas_total_brate = ( (Decoder_Struct *) st_ivas )->hDecoderConfig->ivas_total_brate; Fs = ( (Decoder_Struct *) st_ivas )->hDecoderConfig->output_Fs; Loading