From e85b554d67ad8c0c6670e09619a4fd32ff131079 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 23 Oct 2023 17:58:00 +0200 Subject: [PATCH 01/12] issue 643: rename PCA bypass command-line option; under FIX_643_PCA_OPTION --- apps/encoder.c | 11 +++++++++++ lib_com/options.h | 1 + readme.txt | 2 +- tests/conftest.py | 6 +++--- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/apps/encoder.c b/apps/encoder.c index 9229cc6414..a313353527 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -1690,6 +1690,12 @@ static bool parseCmdlIVAS_enc( i++; } +#ifdef FIX_643_PCA_OPTION + else if ( strcmp( argv_to_upper, "-PCA" ) == 0 ) + { + arg->pca = 1; + } +#else else if ( strcmp( argv_to_upper, "-BYPASS" ) == 0 ) // TODO: should be renamed to "-pca" { i++; @@ -1723,6 +1729,7 @@ static bool parseCmdlIVAS_enc( return false; } } +#endif /*-----------------------------------------------------------------* * Option not recognized @@ -1919,7 +1926,11 @@ static void usage_enc( void ) fprintf( stdout, "-mime : Mime output bitstream file format\n" ); fprintf( stdout, " The encoder produces TS26.445 Annex.2.6 Mime Storage Format, (not RFC4867 Mime Format).\n" ); fprintf( stdout, " default output bitstream file format is G.192\n" ); +#ifdef FIX_643_PCA_OPTION + fprintf( stdout, "-pca : activate PCA in SBA format FOA at 256 kbps \n" ); +#else fprintf( stdout, "-bypass mode : SBA PCA by-pass, mode = (1, 2), 1 = PCA off, 2 = signal adaptive, default is 1\n" ); +#endif fprintf( stdout, "-level level : Complexity level, level = (1, 2, 3), will be defined after characterisation. \n" ); fprintf( stdout, " Currently, all values default to level 3 (full functionality).\n" ); #ifdef DEBUGGING diff --git a/lib_com/options.h b/lib_com/options.h index 9de0874dbb..2266c18e7f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -154,6 +154,7 @@ #define FIX_814_DOUBLE_PREC_IN_REVERB /* Philips: Issue 814: Replace double precision arithmetic in reverb */ #define FIX_866_MOVE_VBAP /* Nokia: Issue 866: Move VBAP to lib_rend */ #define FIX_863_REMOVE_REDUNDANCIES_OMASA /* Nokia/VA: Issue 863: Remove redundancies in stereo_classifier for OMASA */ +#define FIX_643_PCA_OPTION /* VA: issue 643: rename PCA bypass command-line option */ /* #################### End BE switches ################################## */ diff --git a/readme.txt b/readme.txt index 58efed4bb6..f74103481f 100644 --- a/readme.txt +++ b/readme.txt @@ -224,7 +224,7 @@ EVS mono is default, for IVAS choose one of the following: -stereo, -ism, -sba, -mime : Mime output bitstream file format The encoder produces TS26.445 Annex.2.6 Mime Storage Format, (not RFC4867 Mime Format). default output bitstream file format is G.192 --bypass mode : SBA PCA by-pass, mode = (1, 2), 1 = PCA off, 2 = signal adaptive, default is 1 +-pca : activate PCA in SBA format FOA at 256 kbps -level level : Complexity level, level = (1, 2, 3), will be defined after characterisation. Currently, all values default to level 3 (full functionality). -q : Quiet mode, limit printouts to terminal, default is deactivated diff --git a/tests/conftest.py b/tests/conftest.py index 3c6d18ceb3..6f6baa007e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -223,7 +223,7 @@ class EncoderFrontend: sba_order: Optional[str] = None, dtx_mode: Optional[bool] = False, max_band: Optional[str] = None, - bypass_mode: Optional[int] = None, + pca_mode: Optional[int] = None, quiet_mode: Optional[bool] = True, add_option_list: Optional[list] = None, ) -> None: @@ -239,8 +239,8 @@ class EncoderFrontend: if max_band is not None: command.extend(["-max_band", max_band]) - if bypass_mode is not None: - command.extend(["-bypass", str(bypass_mode)]) + if pca_mode is not None: + command.extend(["-pca", str(pca_mode)]) if quiet_mode: command.extend(["-q"]) -- GitLab From b0cab6a0154bafb9c7436f5a5e685798b6c92c9c Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 23 Oct 2023 18:28:46 +0200 Subject: [PATCH 02/12] fix scripts --- tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py | 2 +- tests/conftest.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py index a02865410e..3304c76b53 100644 --- a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py +++ b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py @@ -69,7 +69,7 @@ ivas_br_HOA2 = ["256000", "384000", "512000"] ivas_br_HOA3 = ["256000", "384000", "512000"] SID_list = [0, 1] sample_rate_list = ["48", "32", "16"] -bypass_list = [1, 2] +bypass_list = [ ] gain_list = [0, 1] sample_rate_bw_idx_list = [("48", "SWB"), ("48", "WB"), ("32", "WB")] diff --git a/tests/conftest.py b/tests/conftest.py index 6f6baa007e..134ac671e0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -223,7 +223,7 @@ class EncoderFrontend: sba_order: Optional[str] = None, dtx_mode: Optional[bool] = False, max_band: Optional[str] = None, - pca_mode: Optional[int] = None, + bypass_mode: Optional[int] = None, quiet_mode: Optional[bool] = True, add_option_list: Optional[list] = None, ) -> None: @@ -239,8 +239,8 @@ class EncoderFrontend: if max_band is not None: command.extend(["-max_band", max_band]) - if pca_mode is not None: - command.extend(["-pca", str(pca_mode)]) + if bypass_mode is not None: + command.extend(["-pca", str(bypass_mode)]) if quiet_mode: command.extend(["-q"]) -- GitLab From 86bb66b4210e8f85dde02a607b6893713514982c Mon Sep 17 00:00:00 2001 From: knj Date: Tue, 24 Oct 2023 09:03:14 +0200 Subject: [PATCH 03/12] fix pca tests --- .../test_sba_bs_enc.py | 63 +++++++++---------- tests/conftest.py | 9 ++- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py index 3304c76b53..b8c6fdbff9 100644 --- a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py +++ b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py @@ -69,7 +69,7 @@ ivas_br_HOA2 = ["256000", "384000", "512000"] ivas_br_HOA3 = ["256000", "384000", "512000"] SID_list = [0, 1] sample_rate_list = ["48", "32", "16"] -bypass_list = [ ] +pca_list = [False, True] gain_list = [0, 1] sample_rate_bw_idx_list = [("48", "SWB"), ("48", "WB"), ("32", "WB")] @@ -89,8 +89,8 @@ def check_and_makedir(dir_path): @pytest.mark.create_ref @pytest.mark.parametrize("tag", tag_list) @pytest.mark.parametrize("fs", sample_rate_list) -@pytest.mark.parametrize("bypass", bypass_list) -def test_bypass_enc( +@pytest.mark.parametrize("pca", pca_list) +def test_pca_enc( dut_encoder_frontend: EncoderFrontend, dut_decoder_frontend: DecoderFrontend, test_vector_path, @@ -102,9 +102,9 @@ def test_bypass_enc( keep_files, tag, fs, - bypass, + pca, ): - if update_ref == 1 and bypass == 1: + if update_ref == 1 and not pca: pytest.skip() tag = tag + fs + "c" @@ -129,7 +129,7 @@ def test_bypass_enc( dtx, None, max_bw, - bypass, + pca, sba_order, update_ref, gain_flag, @@ -148,7 +148,7 @@ def test_bypass_enc( dtx, None, max_bw, - bypass, + pca, output_config, update_ref, gain_flag, @@ -197,7 +197,7 @@ def test_sba_enc_system( pytest.skip() tag = tag + fs + "c" max_bw = "FB" - bypass = -1 + pca = False sba_order = "+1" output_config = "FOA" if gain_flag == 1: @@ -220,7 +220,7 @@ def test_sba_enc_system( dtx, SID, max_bw, - bypass, + pca, sba_order, update_ref, gain_flag, @@ -241,7 +241,7 @@ def test_sba_enc_system( dtx, SID, max_bw, - bypass, + pca, output_config, update_ref, gain_flag, @@ -271,7 +271,7 @@ def test_spar_hoa2_enc_system( tag = tag + fs + "c" max_bw = "FB" - bypass = -1 + pca = False sba_order = "+2" output_config = "HOA2" @@ -289,7 +289,7 @@ def test_spar_hoa2_enc_system( dtx, None, max_bw, - bypass, + pca, sba_order, update_ref, gain_flag, @@ -307,7 +307,7 @@ def test_spar_hoa2_enc_system( dtx, None, max_bw, - bypass, + pca, output_config, update_ref, gain_flag, @@ -337,7 +337,7 @@ def test_spar_hoa3_enc_system( tag = tag + fs + "c" max_bw = "FB" - bypass = -1 + pca = False sba_order = "+3" output_config = "HOA3" @@ -355,7 +355,7 @@ def test_spar_hoa3_enc_system( dtx, None, max_bw, - bypass, + pca, sba_order, update_ref, gain_flag, @@ -373,7 +373,7 @@ def test_spar_hoa3_enc_system( dtx, None, max_bw, - bypass, + pca, output_config, update_ref, gain_flag, @@ -411,7 +411,7 @@ def test_sba_enc_BWforce_system( fs = sample_rate_bw_idx[0] bw = sample_rate_bw_idx[1] tag = tag + fs + "c" - bypass = -1 + pca = False gain_flag = -1 sba_order = "+1" output_config = "FOA" @@ -430,7 +430,7 @@ def test_sba_enc_BWforce_system( dtx, None, bw, - bypass, + pca, sba_order, update_ref, gain_flag, @@ -449,7 +449,7 @@ def test_sba_enc_BWforce_system( dtx, None, bw, - bypass, + pca, output_config, update_ref, gain_flag, @@ -472,7 +472,7 @@ def sba_enc( dtx, SID, ivas_max_bw, - bypass, + pca, sba_order, update_ref, gain_flag, @@ -503,14 +503,13 @@ def sba_enc( 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}" + if pca: + short_tag_ext += f"_pca" # to avoid conflicting names in case of parallel test execution, differentiate all cases if gain_flag == 1: long_tag_ext = f"_Gain{gain_flag}" else: - long_tag_ext = f"_pca{bypass}" + long_tag_ext = f"_pca" if SID == 1: long_tag_ext += f"_SID" dut_pkt_file = f"{dut_out_dir}/{tag_out}{long_tag_ext}.pkt" @@ -523,7 +522,6 @@ def sba_enc( f"{ref_out_dir}/{tag_out}{short_tag_ext}_dutenc_cut.pkt" ) input_path = f"{test_vector_path}/{tag_in}{in_extension}" - bypass_mode = bypass if bypass >= 0 else None dtx_mode = dtx == "1" if cut_testv: @@ -557,7 +555,7 @@ def sba_enc( ref_pkt_file, sba_order=sba_order, max_band=ivas_max_bw, - bypass_mode=bypass_mode, + pca=pca, dtx_mode=dtx_mode, ) if create_dutenc: @@ -569,7 +567,7 @@ def sba_enc( ref_pkt_file_dutenc, sba_order=sba_order, max_band=ivas_max_bw, - bypass_mode=bypass_mode, + pca=pca, dtx_mode=dtx_mode, ) @@ -582,7 +580,7 @@ def sba_enc( dut_pkt_file, sba_order=sba_order, max_band=ivas_max_bw, - bypass_mode=bypass_mode, + pca=pca, dtx_mode=dtx_mode, ) @@ -614,7 +612,7 @@ def sba_dec( dtx, SID, ivas_max_bw, - bypass, + pca, output_config, update_ref, gain_flag, @@ -631,16 +629,15 @@ def sba_dec( 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 pca: + short_tag_ext += f"_pca" 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: long_tag_ext = f"_Gain{gain_flag}" else: - long_tag_ext = f"_pca{bypass}" + long_tag_ext = f"_pca" if SID == 1: long_tag_ext += f"_SID_cut" dut_out_dir = f"{dut_base_path}/sba_bs/raw" diff --git a/tests/conftest.py b/tests/conftest.py index 134ac671e0..d103099843 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -223,7 +223,7 @@ class EncoderFrontend: sba_order: Optional[str] = None, dtx_mode: Optional[bool] = False, max_band: Optional[str] = None, - bypass_mode: Optional[int] = None, + pca: Optional[bool] = None, quiet_mode: Optional[bool] = True, add_option_list: Optional[list] = None, ) -> None: @@ -239,8 +239,8 @@ class EncoderFrontend: if max_band is not None: command.extend(["-max_band", max_band]) - if bypass_mode is not None: - command.extend(["-pca", str(bypass_mode)]) + if pca: + command.extend(["-pca"]) if quiet_mode: command.extend(["-q"]) @@ -259,6 +259,9 @@ class EncoderFrontend: cmd_str = textwrap.indent(" ".join(command), prefix="\t") log_dbg_msg(f"{self._type} encoder command:\n{cmd_str}") + print(command) + pytest.fail() + try: result = run(command, capture_output=True, check=True, timeout=self.timeout) except TimeoutExpired: -- GitLab From 73a139bd4c11ac77db3d4b1650419798dbd26de1 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 24 Oct 2023 10:07:16 +0200 Subject: [PATCH 04/12] argument pointer increase to fix infinite loop --- apps/encoder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/encoder.c b/apps/encoder.c index a313353527..7882a0613d 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -1694,6 +1694,7 @@ static bool parseCmdlIVAS_enc( else if ( strcmp( argv_to_upper, "-PCA" ) == 0 ) { arg->pca = 1; + i++; } #else else if ( strcmp( argv_to_upper, "-BYPASS" ) == 0 ) // TODO: should be renamed to "-pca" -- GitLab From ad46f0dd781218ea9a81cd3709aeabb90d5f4bfb Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 25 Oct 2023 09:49:47 +0200 Subject: [PATCH 05/12] remove unintentionally committed code --- tests/conftest.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index d103099843..f51021a3df 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -259,9 +259,6 @@ class EncoderFrontend: cmd_str = textwrap.indent(" ".join(command), prefix="\t") log_dbg_msg(f"{self._type} encoder command:\n{cmd_str}") - print(command) - pytest.fail() - try: result = run(command, capture_output=True, check=True, timeout=self.timeout) except TimeoutExpired: -- GitLab From e7fd170ab04b32d484d7970a62be16cc3f3e0988 Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 25 Oct 2023 12:54:14 +0200 Subject: [PATCH 06/12] fix naming in tests --- .../test_sba_bs_enc.py | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py index b8c6fdbff9..3a92083abf 100644 --- a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py +++ b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py @@ -197,7 +197,6 @@ def test_sba_enc_system( pytest.skip() tag = tag + fs + "c" max_bw = "FB" - pca = False sba_order = "+1" output_config = "FOA" if gain_flag == 1: @@ -220,7 +219,6 @@ def test_sba_enc_system( dtx, SID, max_bw, - pca, sba_order, update_ref, gain_flag, @@ -241,7 +239,6 @@ def test_sba_enc_system( dtx, SID, max_bw, - pca, output_config, update_ref, gain_flag, @@ -271,7 +268,6 @@ def test_spar_hoa2_enc_system( tag = tag + fs + "c" max_bw = "FB" - pca = False sba_order = "+2" output_config = "HOA2" @@ -289,7 +285,6 @@ def test_spar_hoa2_enc_system( dtx, None, max_bw, - pca, sba_order, update_ref, gain_flag, @@ -307,7 +302,6 @@ def test_spar_hoa2_enc_system( dtx, None, max_bw, - pca, output_config, update_ref, gain_flag, @@ -337,7 +331,6 @@ def test_spar_hoa3_enc_system( tag = tag + fs + "c" max_bw = "FB" - pca = False sba_order = "+3" output_config = "HOA3" @@ -355,7 +348,6 @@ def test_spar_hoa3_enc_system( dtx, None, max_bw, - pca, sba_order, update_ref, gain_flag, @@ -373,7 +365,6 @@ def test_spar_hoa3_enc_system( dtx, None, max_bw, - pca, output_config, update_ref, gain_flag, @@ -411,7 +402,6 @@ def test_sba_enc_BWforce_system( fs = sample_rate_bw_idx[0] bw = sample_rate_bw_idx[1] tag = tag + fs + "c" - pca = False gain_flag = -1 sba_order = "+1" output_config = "FOA" @@ -430,7 +420,6 @@ def test_sba_enc_BWforce_system( dtx, None, bw, - pca, sba_order, update_ref, gain_flag, @@ -449,7 +438,6 @@ def test_sba_enc_BWforce_system( dtx, None, bw, - pca, output_config, update_ref, gain_flag, @@ -472,13 +460,13 @@ def sba_enc( dtx, SID, ivas_max_bw, - pca, sba_order, update_ref, gain_flag, cut_gain="1.0", create_dutenc=False, cut_testv=False, + pca=None, ): # ------------ run cmd ------------ dut_out_dir = f"{dut_base_path}/sba_bs/pkt" @@ -503,7 +491,7 @@ def sba_enc( short_tag_ext += f"_Gain{gain_flag}" if SID == 1: short_tag_ext += f"_SID" - if pca: + if pca is not None: short_tag_ext += f"_pca" # to avoid conflicting names in case of parallel test execution, differentiate all cases if gain_flag == 1: @@ -612,11 +600,11 @@ def sba_dec( dtx, SID, ivas_max_bw, - pca, output_config, update_ref, gain_flag, keep_files, + pca=None, ): # -------- run cmd ------------ # sampling rate to BW mapping @@ -629,7 +617,7 @@ def sba_dec( short_tag_ext = "" if gain_flag == 1: short_tag_ext += f"_Gain{gain_flag}" - if pca: + if pca is not None: short_tag_ext += f"_pca" if SID == 1: short_tag_ext += f"_SID_cut" -- GitLab From 290762b743313609ab7ae5fd7efd9cd1aa4f2175 Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 25 Oct 2023 13:06:18 +0200 Subject: [PATCH 07/12] correct argument usage --- tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py index 3a92083abf..97edfc24d4 100644 --- a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py +++ b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py @@ -129,11 +129,11 @@ def test_pca_enc( dtx, None, max_bw, - pca, sba_order, update_ref, gain_flag, cut_testv=True, + pca=pca, ) # dec @@ -148,11 +148,11 @@ def test_pca_enc( dtx, None, max_bw, - pca, output_config, update_ref, gain_flag, keep_files, + pca=pca, ) -- GitLab From d9a5d456275f0b08eb2ddbbd52ba512545b5b7ec Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 25 Oct 2023 14:11:52 +0200 Subject: [PATCH 08/12] next attempt to fix SBA tests... --- .../test_sba_bs_enc.py | 33 ++++++++----------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py index 97edfc24d4..08bb609d5d 100644 --- a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py +++ b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py @@ -69,7 +69,6 @@ ivas_br_HOA2 = ["256000", "384000", "512000"] ivas_br_HOA3 = ["256000", "384000", "512000"] SID_list = [0, 1] sample_rate_list = ["48", "32", "16"] -pca_list = [False, True] gain_list = [0, 1] sample_rate_bw_idx_list = [("48", "SWB"), ("48", "WB"), ("32", "WB")] @@ -89,7 +88,6 @@ def check_and_makedir(dir_path): @pytest.mark.create_ref @pytest.mark.parametrize("tag", tag_list) @pytest.mark.parametrize("fs", sample_rate_list) -@pytest.mark.parametrize("pca", pca_list) def test_pca_enc( dut_encoder_frontend: EncoderFrontend, dut_decoder_frontend: DecoderFrontend, @@ -102,11 +100,8 @@ def test_pca_enc( keep_files, tag, fs, - pca, ): - if update_ref == 1 and not pca: - pytest.skip() - + pca = True tag = tag + fs + "c" ivas_br = "256000" dtx = "0" @@ -466,7 +461,7 @@ def sba_enc( cut_gain="1.0", create_dutenc=False, cut_testv=False, - pca=None, + pca=False, ): # ------------ run cmd ------------ dut_out_dir = f"{dut_base_path}/sba_bs/pkt" @@ -487,17 +482,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 gain_flag == 1: + if gain_flag != -1: short_tag_ext += f"_Gain{gain_flag}" if SID == 1: short_tag_ext += f"_SID" - if pca is not None: + if pca: short_tag_ext += f"_pca" # to avoid conflicting names in case of parallel test execution, differentiate all cases - if gain_flag == 1: - long_tag_ext = f"_Gain{gain_flag}" - else: - long_tag_ext = f"_pca" + long_tag_ext = "" + if gain_flag != -1: + long_tag_ext += f"_Gain{gain_flag}" if SID == 1: long_tag_ext += f"_SID" dut_pkt_file = f"{dut_out_dir}/{tag_out}{long_tag_ext}.pkt" @@ -604,7 +598,7 @@ def sba_dec( update_ref, gain_flag, keep_files, - pca=None, + pca=False, ): # -------- run cmd ------------ # sampling rate to BW mapping @@ -615,17 +609,16 @@ 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}" - if pca is not None: + if pca: short_tag_ext += f"_pca" 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: - long_tag_ext = f"_Gain{gain_flag}" - else: - long_tag_ext = f"_pca" + long_tag_ext = "" + if gain_flag != -1: + long_tag_ext += f"_Gain{gain_flag}" if SID == 1: long_tag_ext += f"_SID_cut" dut_out_dir = f"{dut_base_path}/sba_bs/raw" -- GitLab From ca4409c6f594da44b86433e3263060b915600d7b Mon Sep 17 00:00:00 2001 From: knj Date: Thu, 26 Oct 2023 13:32:59 +0200 Subject: [PATCH 09/12] harmonize gain_flag naming behaviour among files --- tests/codec_be_on_mr_nonselection/test_sba_bs_dec_plc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/codec_be_on_mr_nonselection/test_sba_bs_dec_plc.py b/tests/codec_be_on_mr_nonselection/test_sba_bs_dec_plc.py index c095f27558..0ea0c2e5ca 100644 --- a/tests/codec_be_on_mr_nonselection/test_sba_bs_dec_plc.py +++ b/tests/codec_be_on_mr_nonselection/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}" -- GitLab From fa308203bda631dc697475def3438329f60af6b1 Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 8 Nov 2023 11:20:27 +0100 Subject: [PATCH 10/12] add debug printout to yaml anchor --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d1f033f0c..58dbedd3c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -138,6 +138,7 @@ stages: - mv IVAS_rend_test IVAS_rend .merge-request-comparison-check: &merge-request-comparison-check + - echo "--------------- Running merge-request-comparison-check anchor ---------------" - 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 -- GitLab From 579178f91c2f7157c665078df3e994ecb1e4eb08 Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 8 Nov 2023 12:00:00 +0100 Subject: [PATCH 11/12] deactivate FIX_643_PCA_OPTION --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index c6aa559ff1..2a7beaea74 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -156,7 +156,7 @@ #define FIX_890_ARRAY_SIZE /* Nokia: issue #890: mismatch in 2D array size declaration and use */ #define BE_FIX_887_GCC_WARNING_ARRAY_SIZE /* VoiceAge: Issue 887: change array size definition to avoid warning with gcc 11.4.0 */ #define FIX_247_EXTERNAL_RENDERER_COMMAND_LINE /* VA: issue 247: harmonize command-line options names of external renderer with the decoder */ -#define FIX_643_PCA_OPTION /* VA: issue 643: rename PCA bypass command-line option */ +// #define FIX_643_PCA_OPTION /* VA: issue 643: rename PCA bypass command-line option */ /* #################### End BE switches ################################## */ -- GitLab From f187f074e5c24d293c21aeb095ce88de3fa3877c Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 8 Nov 2023 12:03:14 +0100 Subject: [PATCH 12/12] use old command line arg for pca activation in test --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index f51021a3df..e585111982 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -240,7 +240,7 @@ class EncoderFrontend: command.extend(["-max_band", max_band]) if pca: - command.extend(["-pca"]) + command.extend(["-bypass", "2"]) if quiet_mode: command.extend(["-q"]) -- GitLab