From 8df2e959797a5e6c4eb216f66124a439faad7bac Mon Sep 17 00:00:00 2001 From: Shikha Shetgeri <100861@ittiam.com> Date: Fri, 12 May 2023 16:28:13 +0530 Subject: [PATCH 1/6] disabling agc --- lib_com/options.h | 2 +- tests/conftest.py | 4 ---- tests/test_sba_bs_dec_plc.py | 9 +------- tests/test_sba_bs_enc.py | 40 ++++-------------------------------- 4 files changed, 6 insertions(+), 49 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index e68aca0ef1..5784e1d333 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -125,7 +125,7 @@ #endif /*#define SPAR_HOA_DBG*/ /* SPAR HOA debug statements */ /*#define DEBUG_BINAURAL_FILTER_DESIGN*/ /* debugging of Crend binaural filter design */ -#define DEBUG_AGC_ENCODER_CMD_OPTION /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */ +//#define DEBUG_AGC_ENCODER_CMD_OPTION /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */ #endif /* #################### End DEBUGGING switches ############################ */ diff --git a/tests/conftest.py b/tests/conftest.py index ef5f46ffc9..d7a35a36e0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -196,7 +196,6 @@ class EncoderFrontend: sba_order: Optional[str] = None, dtx_mode: Optional[bool] = False, max_band: Optional[str] = None, - agc_op: Optional[int] = None, bypass_mode: Optional[int] = None, quiet_mode: Optional[bool] = True, add_option_list: Optional[list] = None, @@ -213,9 +212,6 @@ class EncoderFrontend: if max_band is not None: command.extend(["-max_band", max_band]) - if agc_op is not None: - command.extend(["-agc", str(agc_op)]) - if bypass_mode is not None: command.extend(["-bypass", str(bypass_mode)]) diff --git a/tests/test_sba_bs_dec_plc.py b/tests/test_sba_bs_dec_plc.py index 4920a9c59c..40a9965bd1 100644 --- a/tests/test_sba_bs_dec_plc.py +++ b/tests/test_sba_bs_dec_plc.py @@ -47,7 +47,6 @@ plc_patterns = ['PLperc12mblen5', 'PLperc40mblen50', 'PLperc42mblen2'] dtx_set = ['0', '1'] ivas_br_list = ['32000', '64000', '96000', '256000'] sampling_rate_list = ['48', '32', '16'] -agc_list = [-1, 0, 1] AbsTol = '0' @@ -73,7 +72,6 @@ def check_and_makedir(dir_path): @pytest.mark.parametrize("tag", tag_list) @pytest.mark.parametrize("plc_pattern", plc_patterns) @pytest.mark.parametrize("fs", sampling_rate_list) -@pytest.mark.parametrize("agc", agc_list) def test_sba_plc_system( dut_decoder_frontend: DecoderFrontend, test_vector_path, @@ -86,8 +84,7 @@ def test_sba_plc_system( dtx, tag, plc_pattern, - fs, - agc + fs ): if dtx == '1' and ivas_br not in ['32000', '64000']: # skip high bitrates for DTX until DTX issue is resolved @@ -108,7 +105,6 @@ def test_sba_plc_system( dtx, plc_pattern, update_ref, - agc, keep_files, ) @@ -127,15 +123,12 @@ def sba_dec_plc( dtx, plc_pattern, update_ref, - agc, keep_files, ): # ------------ run cmd ------------ tag_out = f"{tag}_ivasbr{ivas_br[:-3]}k_DTX{dtx}" - if agc != -1: - tag_out += f'_AGC{agc}' plc_tag_out = f"{tag_out}_{plc_pattern}" dut_out_dir = f"{dut_base_path}/sba_bs/raw" diff --git a/tests/test_sba_bs_enc.py b/tests/test_sba_bs_enc.py index 6825ee12ba..59fde6a16e 100644 --- a/tests/test_sba_bs_enc.py +++ b/tests/test_sba_bs_enc.py @@ -59,7 +59,6 @@ ivas_br_HOA3 = ['256000', '384000', '512000'] sample_rate_list = ['48', '32', '16'] bypass_list = [1, 2] -agc_list = [-1, 0, 1] sample_rate_bw_idx_list = [('48', 'SWB'), ('48', 'WB'), ('32', 'WB')] @@ -100,7 +99,6 @@ def test_bypass_enc( ivas_br = '256000' dtx = '0' max_bw = "FB" - agc = -1 sba_order = "+1" output_config = "FOA" @@ -118,7 +116,6 @@ def test_bypass_enc( dtx, max_bw, bypass, - agc, sba_order, update_ref, cut_testv=True @@ -136,7 +133,6 @@ def test_bypass_enc( dtx, max_bw, bypass, - agc, output_config, update_ref, keep_files, @@ -148,7 +144,6 @@ def test_bypass_enc( @pytest.mark.parametrize("dtx", dtx_set) @pytest.mark.parametrize("tag", tag_list) @pytest.mark.parametrize("fs", sample_rate_list) -@pytest.mark.parametrize("agc", agc_list) def test_sba_enc_system( dut_encoder_frontend: EncoderFrontend, dut_decoder_frontend: DecoderFrontend, @@ -164,12 +159,11 @@ def test_sba_enc_system( dtx, tag, fs, - agc, ): if dtx == '1' and ivas_br not in ['32000', '64000']: # skip high bitrates for DTX until DTX issue is resolved pytest.skip() - if ivas_br == 'sw_24k4_256k.bin' and agc != 1: + if ivas_br == 'sw_24k4_256k.bin': pytest.skip() tag = tag + fs + 'c' @@ -177,9 +171,7 @@ def test_sba_enc_system( bypass = -1 sba_order = "+1" output_config = "FOA" - if agc == 1: - cut_gain = "16.0" - elif dtx == '1': + if dtx == '1': cut_gain = ".004" else: cut_gain = "1.0" @@ -197,7 +189,6 @@ def test_sba_enc_system( dtx, max_bw, bypass, - agc, sba_order, update_ref, cut_gain=cut_gain, @@ -217,7 +208,6 @@ def test_sba_enc_system( dtx, max_bw, bypass, - agc, output_config, update_ref, keep_files, @@ -242,7 +232,6 @@ def test_spar_hoa2_enc_system( ): fs = '48' dtx = '0' - agc = -1 tag = tag + fs + 'c' max_bw = "FB" @@ -264,7 +253,6 @@ def test_spar_hoa2_enc_system( dtx, max_bw, bypass, - agc, sba_order, update_ref, ) @@ -281,7 +269,6 @@ def test_spar_hoa2_enc_system( dtx, max_bw, bypass, - agc, output_config, update_ref, keep_files, @@ -306,8 +293,6 @@ def test_spar_hoa3_enc_system( ): fs = '48' dtx = '0' - agc = -1 - tag = tag + fs + 'c' max_bw = "FB" bypass = -1 @@ -328,7 +313,6 @@ def test_spar_hoa3_enc_system( dtx, max_bw, bypass, - agc, sba_order, update_ref, ) @@ -345,7 +329,6 @@ def test_spar_hoa3_enc_system( dtx, max_bw, bypass, - agc, output_config, update_ref, keep_files, @@ -381,7 +364,6 @@ def test_sba_enc_BWforce_system( bw = sample_rate_bw_idx[1] tag = tag + fs + 'c' bypass = -1 - agc = -1 sba_order = "+1" output_config = "FOA" @@ -399,7 +381,6 @@ def test_sba_enc_BWforce_system( dtx, bw, bypass, - agc, sba_order, update_ref, cut_testv=True @@ -417,7 +398,6 @@ def test_sba_enc_BWforce_system( dtx, bw, bypass, - agc, output_config, update_ref, keep_files, @@ -439,7 +419,6 @@ def sba_enc( dtx, ivas_max_bw, bypass, - agc, sba_order, update_ref, cut_gain='1.0', @@ -466,20 +445,16 @@ def sba_enc( if ivas_br == 'sw_24k4_256k.bin': ivas_br = f"{br_switch_file_path}/sw_24k4_256k.bin" short_tag_ext = "" - if agc != -1: - short_tag_ext += f'_AGC{agc}' # we update only bypass = 0/2 (bypass 1 is the same as the baseline) if bypass in [0, 2]: short_tag_ext += f"_pca{bypass}" # to avoid conflicting names in case of parallel test execution, differentiate all cases - long_tag_ext = f"_AGC{agc}" if agc != -1 else "_AGC-unspecified" - long_tag_ext += f"_pca{bypass}" + long_tag_ext = f"_pca{bypass}" dut_pkt_file = f"{dut_out_dir}/{tag_out}{long_tag_ext}.pkt" ref_pkt_file = f"{ref_out_dir}/{tag_out}{short_tag_ext}.pkt" ref_pkt_file_dutenc = f"{ref_out_dir}/{tag_out}{short_tag_ext}_dutenc.pkt" input_path = f"{test_vector_path}/{tag_in}{in_extension}" - agc_op = agc if agc != -1 else None bypass_mode = bypass if bypass >= 0 else None dtx_mode = dtx == '1' @@ -507,7 +482,6 @@ def sba_enc( ref_pkt_file, sba_order=sba_order, max_band=ivas_max_bw, - agc_op=agc_op, bypass_mode=bypass_mode, dtx_mode=dtx_mode, ) @@ -520,7 +494,6 @@ def sba_enc( ref_pkt_file_dutenc, sba_order=sba_order, max_band=ivas_max_bw, - agc_op=agc_op, bypass_mode=bypass_mode, dtx_mode=dtx_mode, ) @@ -534,7 +507,6 @@ def sba_enc( dut_pkt_file, sba_order=sba_order, max_band=ivas_max_bw, - agc_op=agc_op, bypass_mode=bypass_mode, dtx_mode=dtx_mode, ) @@ -551,7 +523,6 @@ def sba_dec( dtx, ivas_max_bw, bypass, - agc, output_config, update_ref, keep_files, @@ -566,15 +537,12 @@ def sba_dec( tag_out = f"{tag}_ivasbr{ivas_br[:-3]}k_DTX{dtx}" short_tag_ext = "" - if agc != -1: - short_tag_ext += f'_AGC{agc}' # we update only bypass = 0/2 (bypass 1 is the same as the baseline) if bypass in [0, 2]: short_tag_ext += f"_pca{bypass}" # to avoid conflicting names in case of parallel test execution, differentiate all cases - long_tag_ext = f"_AGC{agc}" if agc != -1 else "_AGC-unspecified" - long_tag_ext += f"_pca{bypass}" + long_tag_ext = f"_pca{bypass}" dut_out_dir = f"{dut_base_path}/sba_bs/raw" ref_out_dir = f"{reference_path}/sba_bs/raw" -- GitLab From 31fc667ee345e97f8d39aae1681a345e7a372eb2 Mon Sep 17 00:00:00 2001 From: Shikha Shetgeri <100861@ittiam.com> Date: Wed, 17 May 2023 11:30:59 +0530 Subject: [PATCH 2/6] pipeline_fix_1 --- tests/test_sba_bs_dec_plc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_sba_bs_dec_plc.py b/tests/test_sba_bs_dec_plc.py index ae757eccf4..e969b28407 100644 --- a/tests/test_sba_bs_dec_plc.py +++ b/tests/test_sba_bs_dec_plc.py @@ -91,7 +91,7 @@ def test_sba_plc_system( # skip high bitrates for DTX until DTX issue is resolved pytest.skip() if ivas_br == '13200' or ivas_br == '16400': - if dtx == '1' and agc == 0 and fs != '16': + if dtx == '1' and fs != '16': SID = 1 else: pytest.skip() -- GitLab From d2fc2f439e7651ba3c9f42199c796d904582377c Mon Sep 17 00:00:00 2001 From: Shikha Shetgeri <100861@ittiam.com> Date: Thu, 18 May 2023 16:47:44 +0530 Subject: [PATCH 3/6] Addressing review comments --- tests/test_sba_bs_dec_plc.py | 7 +++++++ tests/test_sba_bs_enc.py | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/tests/test_sba_bs_dec_plc.py b/tests/test_sba_bs_dec_plc.py index e969b28407..f3468a6053 100644 --- a/tests/test_sba_bs_dec_plc.py +++ b/tests/test_sba_bs_dec_plc.py @@ -96,6 +96,9 @@ def test_sba_plc_system( else: pytest.skip() tag = tag + fs + 'c' + gain_flag = -1 + if ivas_br in ['13200','16400','32000']: + gain_flag = 1 # dec sba_dec_plc( @@ -111,6 +114,7 @@ def test_sba_plc_system( SID, plc_pattern, update_ref, + gain_flag, keep_files, ) @@ -130,12 +134,15 @@ def sba_dec_plc( SID, plc_pattern, update_ref, + gain_flag, keep_files, ): # ------------ run cmd ------------ tag_out = f"{tag}_ivasbr{ivas_br[:-3]}k_DTX{dtx}" + if gain_flag != -1: + tag_out += f'_Gain{gain_flag}' plc_tag_out = f"{tag_out}_{plc_pattern}" dut_out_dir = f"{dut_base_path}/sba_bs/raw" diff --git a/tests/test_sba_bs_enc.py b/tests/test_sba_bs_enc.py index 778b6c0c79..7f59dfdf71 100644 --- a/tests/test_sba_bs_enc.py +++ b/tests/test_sba_bs_enc.py @@ -100,6 +100,7 @@ def test_bypass_enc( ivas_br = '256000' dtx = '0' max_bw = "FB" + gain_flag = -1 sba_order = "+1" output_config = "FOA" @@ -120,6 +121,7 @@ def test_bypass_enc( bypass, sba_order, update_ref, + gain_flag, cut_testv=True ) @@ -138,6 +140,7 @@ def test_bypass_enc( bypass, output_config, update_ref, + gain_flag, keep_files, ) @@ -164,6 +167,9 @@ def test_sba_enc_system( fs, ): SID = 0 + gain_flag = -1 + if ivas_br in ['13200','16400','32000']: + gain_flag = 1 if dtx == '1' and ivas_br not in ['13200','16400','32000','64000']: # skip high bitrates for DTX until DTX issue is resolved pytest.skip() @@ -179,6 +185,8 @@ def test_sba_enc_system( bypass = -1 sba_order = "+1" output_config = "FOA" + if gain_flag == 1: + cut_gain = "16.0" if dtx == '1': cut_gain = ".004" else: @@ -200,6 +208,7 @@ def test_sba_enc_system( bypass, sba_order, update_ref, + gain_flag, cut_gain=cut_gain, create_dutenc=True, cut_testv=True @@ -220,6 +229,7 @@ def test_sba_enc_system( bypass, output_config, update_ref, + gain_flag, keep_files, ) @@ -242,6 +252,7 @@ def test_spar_hoa2_enc_system( ): fs = '48' dtx = '0' + gain_flag = -1 tag = tag + fs + 'c' max_bw = "FB" @@ -266,6 +277,7 @@ def test_spar_hoa2_enc_system( bypass, sba_order, update_ref, + gain_flag, ) # dec @@ -283,6 +295,7 @@ def test_spar_hoa2_enc_system( bypass, output_config, update_ref, + gain_flag, keep_files, ) @@ -305,6 +318,8 @@ def test_spar_hoa3_enc_system( ): fs = '48' dtx = '0' + gain_flag = -1 + tag = tag + fs + 'c' max_bw = "FB" bypass = -1 @@ -328,6 +343,7 @@ def test_spar_hoa3_enc_system( bypass, sba_order, update_ref, + gain_flag, ) # dec @@ -345,6 +361,7 @@ def test_spar_hoa3_enc_system( bypass, output_config, update_ref, + gain_flag, keep_files, ) @@ -380,6 +397,7 @@ def test_sba_enc_BWforce_system( bw = sample_rate_bw_idx[1] tag = tag + fs + 'c' bypass = -1 + gain_flag = -1 sba_order = "+1" output_config = "FOA" @@ -400,6 +418,7 @@ def test_sba_enc_BWforce_system( bypass, sba_order, update_ref, + gain_flag, cut_testv=True ) @@ -418,6 +437,7 @@ def test_sba_enc_BWforce_system( bypass, output_config, update_ref, + gain_flag, keep_files, ) @@ -440,6 +460,7 @@ def sba_enc( bypass, sba_order, update_ref, + gain_flag, cut_gain='1.0', create_dutenc=False, cut_testv=False @@ -464,13 +485,18 @@ def sba_enc( if ivas_br == 'sw_24k4_256k.bin': ivas_br = f"{br_switch_file_path}/sw_24k4_256k.bin" short_tag_ext = "" + if gain_flag != -1: + short_tag_ext += f'_Gain{gain_flag}' if SID == 1: short_tag_ext += f'_SID' # we update only bypass = 0/2 (bypass 1 is the same as the baseline) if bypass in [0, 2]: short_tag_ext += f"_pca{bypass}" # to avoid conflicting names in case of parallel test execution, differentiate all cases - long_tag_ext = f"_pca{bypass}" + if gain_flag != -1: + long_tag_ext = f"_Gain{gain_flag}" + else: + long_tag_ext = f"_pca{bypass}" if SID == 1: long_tag_ext += f"_SID" dut_pkt_file = f"{dut_out_dir}/{tag_out}{long_tag_ext}.pkt" @@ -566,6 +592,7 @@ def sba_dec( bypass, output_config, update_ref, + gain_flag, keep_files, ): @@ -578,13 +605,18 @@ def sba_dec( tag_out = f"{tag}_ivasbr{ivas_br[:-3]}k_DTX{dtx}" short_tag_ext = "" + if gain_flag != -1: + short_tag_ext += f'_Gain{gain_flag}' # we update only bypass = 0/2 (bypass 1 is the same as the baseline) if bypass in [0, 2]: short_tag_ext += f"_pca{bypass}" if SID == 1: short_tag_ext += f'_SID_cut' # to avoid conflicting names in case of parallel test execution, differentiate all cases - long_tag_ext = f"_pca{bypass}" + if gain_flag != -1: + long_tag_ext = f"_Gain{gain_flag}" + else: + long_tag_ext = f"_pca{bypass}" if SID == 1: long_tag_ext += f"_SID_cut" dut_out_dir = f"{dut_base_path}/sba_bs/raw" -- GitLab From fe198d7aedfb1f38ae24536addbc7a3b9311a3f1 Mon Sep 17 00:00:00 2001 From: Shikha Shetgeri <100861@ittiam.com> Date: Fri, 19 May 2023 18:52:07 +0530 Subject: [PATCH 4/6] Addressing review comments --- tests/test_sba_bs_dec_plc.py | 17 ++++++++++------- tests/test_sba_bs_enc.py | 19 +++++++++++-------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/tests/test_sba_bs_dec_plc.py b/tests/test_sba_bs_dec_plc.py index f3468a6053..9b1a927259 100644 --- a/tests/test_sba_bs_dec_plc.py +++ b/tests/test_sba_bs_dec_plc.py @@ -46,7 +46,9 @@ tag_list = ['stvFOA'] plc_patterns = ['PLperc12mblen5', 'PLperc40mblen50', 'PLperc42mblen2'] dtx_set = ['0', '1'] ivas_br_list = ['13200','16400','32000', '64000', '96000', '256000'] +ivas_br_list_1 = ['13200','16400','24400','32000', '64000', '96000', '256000'] sampling_rate_list = ['48', '32', '16'] +gain_list = [-1, 0, 1] AbsTol = '0' @@ -67,11 +69,12 @@ def check_and_makedir(dir_path): # -> the reference generation for this test (reference decoder output) needs to be done after completion of test_sba_enc_system # -> therefore the marker create_ref_part2 @pytest.mark.create_ref_part2 -@pytest.mark.parametrize("ivas_br", ivas_br_list) +@pytest.mark.parametrize("ivas_br", ivas_br_list_1) @pytest.mark.parametrize("dtx", dtx_set) @pytest.mark.parametrize("tag", tag_list) @pytest.mark.parametrize("plc_pattern", plc_patterns) @pytest.mark.parametrize("fs", sampling_rate_list) +@pytest.mark.parametrize("gain_flag", gain_list) def test_sba_plc_system( dut_decoder_frontend: DecoderFrontend, test_vector_path, @@ -84,21 +87,21 @@ def test_sba_plc_system( dtx, tag, plc_pattern, - fs + fs, + gain_flag ): SID = 0 - if dtx == '1' and ivas_br not in ['13200','16400','32000', '64000']: + if dtx == '1' and ivas_br not in ['13200','16400','24400','32000', '64000']: # skip high bitrates for DTX until DTX issue is resolved pytest.skip() if ivas_br == '13200' or ivas_br == '16400': - if dtx == '1' and fs != '16': + if dtx == '1' and gain_flag == 0 and fs != '16': SID = 1 else: pytest.skip() + if gain_flag == 1 and ivas_br not in ['13200','16400','24400','32000']: + pytest.skip() tag = tag + fs + 'c' - gain_flag = -1 - if ivas_br in ['13200','16400','32000']: - gain_flag = 1 # dec sba_dec_plc( diff --git a/tests/test_sba_bs_enc.py b/tests/test_sba_bs_enc.py index 7f59dfdf71..c6f769b8f2 100644 --- a/tests/test_sba_bs_enc.py +++ b/tests/test_sba_bs_enc.py @@ -57,9 +57,11 @@ dict_bw_tag = {'SWB': '_ForceSWB', 'WB': '_ForceWB'} ivas_br_FOA = ['13200','16400','32000','64000', '96000', '160000', '256000', '384000', '512000','sw_24k4_256k.bin'] ivas_br_HOA2 = ['256000', '384000', '512000'] ivas_br_HOA3 = ['256000', '384000', '512000'] +ivas_br_list_1 = ['13200','16400','24400','32000','64000', '96000', '160000', '256000', '384000', '512000','sw_24k4_256k.bin'] sample_rate_list = ['48', '32', '16'] bypass_list = [1, 2] +gain_list = [-1, 0, 1] sample_rate_bw_idx_list = [('48', 'SWB'), ('48', 'WB'), ('32', 'WB')] @@ -146,10 +148,11 @@ def test_bypass_enc( @pytest.mark.create_ref -@pytest.mark.parametrize("ivas_br", ivas_br_FOA) +@pytest.mark.parametrize("ivas_br", ivas_br_list_1) @pytest.mark.parametrize("dtx", dtx_set) @pytest.mark.parametrize("tag", tag_list) @pytest.mark.parametrize("fs", sample_rate_list) +@pytest.mark.parametrize("gain_flag", gain_list) def test_sba_enc_system( dut_encoder_frontend: EncoderFrontend, dut_decoder_frontend: DecoderFrontend, @@ -165,21 +168,21 @@ def test_sba_enc_system( dtx, tag, fs, + gain_flag, ): SID = 0 - gain_flag = -1 - if ivas_br in ['13200','16400','32000']: - gain_flag = 1 - if dtx == '1' and ivas_br not in ['13200','16400','32000','64000']: + if dtx == '1' and ivas_br not in ['13200','16400','24400','32000','64000']: # skip high bitrates for DTX until DTX issue is resolved pytest.skip() - if ivas_br == 'sw_24k4_256k.bin': + if ivas_br == 'sw_24k4_256k.bin' and gain_flag != 1: pytest.skip() if ivas_br == '13200' or ivas_br == '16400': - if dtx == '1' and fs != '16': + if dtx == '1' and gain_flag == 0 and fs != '16': SID = 1 else: pytest.skip() + if gain_flag == 1 and ivas_br not in ['13200','16400','24400','32000']: + pytest.skip() tag = tag + fs + 'c' max_bw = "FB" bypass = -1 @@ -187,7 +190,7 @@ def test_sba_enc_system( output_config = "FOA" if gain_flag == 1: cut_gain = "16.0" - if dtx == '1': + elif dtx == '1': cut_gain = ".004" else: cut_gain = "1.0" -- GitLab From 7401270c13ce1e9b6f19362c62dfac81d53ae5c6 Mon Sep 17 00:00:00 2001 From: rtyag Date: Mon, 22 May 2023 12:04:59 +1000 Subject: [PATCH 5/6] minor fixes in pytest --- tests/test_sba_bs_dec_plc.py | 5 ++--- tests/test_sba_bs_enc.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/test_sba_bs_dec_plc.py b/tests/test_sba_bs_dec_plc.py index 9b1a927259..0fa6f55b2d 100644 --- a/tests/test_sba_bs_dec_plc.py +++ b/tests/test_sba_bs_dec_plc.py @@ -46,9 +46,8 @@ tag_list = ['stvFOA'] plc_patterns = ['PLperc12mblen5', 'PLperc40mblen50', 'PLperc42mblen2'] dtx_set = ['0', '1'] ivas_br_list = ['13200','16400','32000', '64000', '96000', '256000'] -ivas_br_list_1 = ['13200','16400','24400','32000', '64000', '96000', '256000'] sampling_rate_list = ['48', '32', '16'] -gain_list = [-1, 0, 1] +gain_list = [0, 1] AbsTol = '0' @@ -69,7 +68,7 @@ def check_and_makedir(dir_path): # -> the reference generation for this test (reference decoder output) needs to be done after completion of test_sba_enc_system # -> therefore the marker create_ref_part2 @pytest.mark.create_ref_part2 -@pytest.mark.parametrize("ivas_br", ivas_br_list_1) +@pytest.mark.parametrize("ivas_br", ivas_br_list) @pytest.mark.parametrize("dtx", dtx_set) @pytest.mark.parametrize("tag", tag_list) @pytest.mark.parametrize("plc_pattern", plc_patterns) diff --git a/tests/test_sba_bs_enc.py b/tests/test_sba_bs_enc.py index c6f769b8f2..b5f5a51f7f 100644 --- a/tests/test_sba_bs_enc.py +++ b/tests/test_sba_bs_enc.py @@ -57,11 +57,10 @@ dict_bw_tag = {'SWB': '_ForceSWB', 'WB': '_ForceWB'} ivas_br_FOA = ['13200','16400','32000','64000', '96000', '160000', '256000', '384000', '512000','sw_24k4_256k.bin'] ivas_br_HOA2 = ['256000', '384000', '512000'] ivas_br_HOA3 = ['256000', '384000', '512000'] -ivas_br_list_1 = ['13200','16400','24400','32000','64000', '96000', '160000', '256000', '384000', '512000','sw_24k4_256k.bin'] sample_rate_list = ['48', '32', '16'] bypass_list = [1, 2] -gain_list = [-1, 0, 1] +gain_list = [0, 1] sample_rate_bw_idx_list = [('48', 'SWB'), ('48', 'WB'), ('32', 'WB')] @@ -148,7 +147,7 @@ def test_bypass_enc( @pytest.mark.create_ref -@pytest.mark.parametrize("ivas_br", ivas_br_list_1) +@pytest.mark.parametrize("ivas_br", ivas_br_FOA) @pytest.mark.parametrize("dtx", dtx_set) @pytest.mark.parametrize("tag", tag_list) @pytest.mark.parametrize("fs", sample_rate_list) -- GitLab From 0f9dcd33d148b54b87e603b9eb8a4185e565bec6 Mon Sep 17 00:00:00 2001 From: rtyag Date: Mon, 22 May 2023 12:59:07 +1000 Subject: [PATCH 6/6] ref file name fixes --- tests/test_sba_bs_dec_plc.py | 2 +- tests/test_sba_bs_enc.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_sba_bs_dec_plc.py b/tests/test_sba_bs_dec_plc.py index 0fa6f55b2d..bead7cda93 100644 --- a/tests/test_sba_bs_dec_plc.py +++ b/tests/test_sba_bs_dec_plc.py @@ -143,7 +143,7 @@ def sba_dec_plc( # ------------ run cmd ------------ tag_out = f"{tag}_ivasbr{ivas_br[:-3]}k_DTX{dtx}" - if gain_flag != -1: + if gain_flag == 1: tag_out += f'_Gain{gain_flag}' plc_tag_out = f"{tag_out}_{plc_pattern}" diff --git a/tests/test_sba_bs_enc.py b/tests/test_sba_bs_enc.py index b5f5a51f7f..09baebc9e1 100644 --- a/tests/test_sba_bs_enc.py +++ b/tests/test_sba_bs_enc.py @@ -487,7 +487,7 @@ def sba_enc( if ivas_br == 'sw_24k4_256k.bin': ivas_br = f"{br_switch_file_path}/sw_24k4_256k.bin" short_tag_ext = "" - if gain_flag != -1: + if gain_flag == 1: short_tag_ext += f'_Gain{gain_flag}' if SID == 1: short_tag_ext += f'_SID' @@ -495,7 +495,7 @@ def sba_enc( if bypass in [0, 2]: short_tag_ext += f"_pca{bypass}" # to avoid conflicting names in case of parallel test execution, differentiate all cases - if gain_flag != -1: + if gain_flag == 1: long_tag_ext = f"_Gain{gain_flag}" else: long_tag_ext = f"_pca{bypass}" @@ -607,7 +607,7 @@ def sba_dec( tag_out = f"{tag}_ivasbr{ivas_br[:-3]}k_DTX{dtx}" short_tag_ext = "" - if gain_flag != -1: + if gain_flag == 1: short_tag_ext += f'_Gain{gain_flag}' # we update only bypass = 0/2 (bypass 1 is the same as the baseline) if bypass in [0, 2]: @@ -615,7 +615,7 @@ def sba_dec( if SID == 1: short_tag_ext += f'_SID_cut' # to avoid conflicting names in case of parallel test execution, differentiate all cases - if gain_flag != -1: + if gain_flag == 1: long_tag_ext = f"_Gain{gain_flag}" else: long_tag_ext = f"_pca{bypass}" -- GitLab