From e41bd7f7528efac1144965588d3d1d76679174f6 Mon Sep 17 00:00:00 2001 From: rtyag Date: Thu, 29 Sep 2022 12:52:46 +0200 Subject: [PATCH 1/4] SBA DTX code coverage improvement --- scripts/ivas_pytests/self_test_b.py | 4 +++- .../tests/system_tests/test_spar_foa_bs_enc.py | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/ivas_pytests/self_test_b.py b/scripts/ivas_pytests/self_test_b.py index 941739435e..9cca946556 100755 --- a/scripts/ivas_pytests/self_test_b.py +++ b/scripts/ivas_pytests/self_test_b.py @@ -126,7 +126,9 @@ def create_short_testvectors(): cut_gain = "16.0" cut_file = f"{TEST_VECTOR_DIR}/stvFOA{fs}c_cut_{cut_gain}.pcm" cut_samples(in_file, cut_file, num_channels, fs + "000", cut_from, cut_len, cut_gain) - + cut_gain = ".004" + cut_file = f"{TEST_VECTOR_DIR}/stvFOA{fs}c_cut_{cut_gain}.pcm" + cut_samples(in_file, cut_file, num_channels, fs + "000", cut_from, cut_len, cut_gain) def main(argv): # check for python >= 3.7 diff --git a/scripts/ivas_pytests/tests/system_tests/test_spar_foa_bs_enc.py b/scripts/ivas_pytests/tests/system_tests/test_spar_foa_bs_enc.py index df5d018ce5..78a824ea98 100644 --- a/scripts/ivas_pytests/tests/system_tests/test_spar_foa_bs_enc.py +++ b/scripts/ivas_pytests/tests/system_tests/test_spar_foa_bs_enc.py @@ -170,11 +170,12 @@ def test_spar_foa_enc_system( bypass = -1 sba_order = "+1" output_config = "FOA" - if agc == 1: + if agc == '1': cut_gain = "16.0" + elif dtx == '1': + cut_gain = ".004" else: - cut_gain = "1.0" - + cut_gain = "1.0" # enc spar_foa_enc( dut_encoder_frontend, -- GitLab From 7623bbeae9a58d41cad414dca25fd660f175a000 Mon Sep 17 00:00:00 2001 From: rtyag Date: Thu, 29 Sep 2022 14:28:36 +0200 Subject: [PATCH 2/4] fix AGC gain application to as it was before --- scripts/ivas_pytests/tests/system_tests/test_spar_foa_bs_enc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ivas_pytests/tests/system_tests/test_spar_foa_bs_enc.py b/scripts/ivas_pytests/tests/system_tests/test_spar_foa_bs_enc.py index 78a824ea98..83dc488bb2 100644 --- a/scripts/ivas_pytests/tests/system_tests/test_spar_foa_bs_enc.py +++ b/scripts/ivas_pytests/tests/system_tests/test_spar_foa_bs_enc.py @@ -170,7 +170,7 @@ def test_spar_foa_enc_system( bypass = -1 sba_order = "+1" output_config = "FOA" - if agc == '1': + if agc == 1: cut_gain = "16.0" elif dtx == '1': cut_gain = ".004" -- GitLab From ba3bb07a6f5423c0bfd71a121c93636496b78b5d Mon Sep 17 00:00:00 2001 From: rtyag Date: Tue, 4 Oct 2022 13:12:59 +0200 Subject: [PATCH 3/4] add -48 dB gain support in create_short_testvectors.py --- tests/create_short_testvectors.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/create_short_testvectors.py b/tests/create_short_testvectors.py index 13afe8a422..46e7dd85f3 100755 --- a/tests/create_short_testvectors.py +++ b/tests/create_short_testvectors.py @@ -57,6 +57,9 @@ def create_short_testvectors(): cut_gain = "16.0" cut_file = f"{TEST_VECTOR_DIR}/stvFOA{fs}c_cut_{cut_gain}.pcm" cut_samples(in_file, cut_file, NUM_CHANNELS, fs + "000", CUT_FROM, CUT_LEN, cut_gain) + cut_gain = ".004" + cut_file = f"{TEST_VECTOR_DIR}/stvFOA{fs}c_cut_{cut_gain}.pcm" + cut_samples(in_file, cut_file, num_channels, fs + "000", cut_from, cut_len, cut_gain) if __name__ == "__main__": -- GitLab From bfeeb9947ee2029c502d070b9544b291c3eca2e7 Mon Sep 17 00:00:00 2001 From: rtyag Date: Tue, 4 Oct 2022 13:15:25 +0200 Subject: [PATCH 4/4] minor correction in create_short_testvectors.py --- tests/create_short_testvectors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/create_short_testvectors.py b/tests/create_short_testvectors.py index 46e7dd85f3..56c41d49b8 100755 --- a/tests/create_short_testvectors.py +++ b/tests/create_short_testvectors.py @@ -59,7 +59,7 @@ def create_short_testvectors(): cut_samples(in_file, cut_file, NUM_CHANNELS, fs + "000", CUT_FROM, CUT_LEN, cut_gain) cut_gain = ".004" cut_file = f"{TEST_VECTOR_DIR}/stvFOA{fs}c_cut_{cut_gain}.pcm" - cut_samples(in_file, cut_file, num_channels, fs + "000", cut_from, cut_len, cut_gain) + cut_samples(in_file, cut_file, NUM_CHANNELS, fs + "000", CUT_FROM, CUT_LEN, cut_gain) if __name__ == "__main__": -- GitLab