Commit ff365e2f authored by Vidhya V P's avatar Vidhya V P
Browse files

Added new test cases for AGC for SBA BR switching

parent d1f57ac8
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -451,6 +451,21 @@ def test_vector_path(request) -> str:

    return path
    
@pytest.fixture(scope="session")
def br_switch_file_path(request) -> str:
    """
    Return base directory of test vector files.
    """
    if request.config.option.test_vector_path:
        return request.config.option.test_vector_path

    here = Path(__file__).parent.resolve()

    path = here.joinpath("../scripts/switchPaths")

    path = str(path.resolve())

    return path

@pytest.fixture(scope="session")
def reference_path(request) -> str:
+15 −3
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ dtx_set = ['0', '1']
dict_fsample_bw = {'48': '3', '32': '2', '16': '1'}
dict_bw_idx = {'FB': '3', 'SWB': '2', 'WB': '1'}
dict_bw_tag = {'SWB': '_ForceSWB', 'WB': '_ForceWB'}
ivas_br_FOA = ['32000', '64000', '96000', '160000', '256000', '384000', '512000']
ivas_br_FOA = ['32000','64000', '96000', '160000', '256000', '384000', '512000','sw_24k4_256k.bin']
ivas_br_HOA2 = ['256000', '384000', '512000']
ivas_br_HOA3 = ['256000', '384000', '512000']

@@ -111,6 +111,7 @@ def test_bypass_enc(
        ref_encoder_path,
        reference_path,
        dut_base_path,
        None, 
        tag,
        fs,
        ivas_br,
@@ -155,6 +156,7 @@ def test_sba_enc_system(
    dut_base_path,
    ref_encoder_path,
    ref_decoder_path,
    br_switch_file_path,
    update_ref,
    keep_files,
    ivas_br,
@@ -166,6 +168,8 @@ def test_sba_enc_system(
    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:
       pytest.skip()
    
    tag = tag + fs + 'c'
    max_bw = "FB"
@@ -185,6 +189,7 @@ def test_sba_enc_system(
        ref_encoder_path,
        reference_path,
        dut_base_path,
        br_switch_file_path,
        tag,
        fs,
        ivas_br,
@@ -250,6 +255,7 @@ def test_spar_hoa2_enc_system(
        ref_encoder_path,
        reference_path,
        dut_base_path,
        None,
        tag,
        fs,
        ivas_br,
@@ -314,6 +320,7 @@ def test_spar_hoa3_enc_system(
        ref_encoder_path,
        reference_path,
        dut_base_path,
        None,
        tag,
        fs,
        ivas_br,
@@ -368,7 +375,8 @@ def test_sba_enc_BWforce_system(
    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':
        pytest.skip()
    fs = sample_rate_bw_idx[0]
    bw = sample_rate_bw_idx[1]
    tag = tag + fs + 'c'
@@ -384,6 +392,7 @@ def test_sba_enc_BWforce_system(
        ref_encoder_path,
        reference_path,
        dut_base_path,
        None,
        tag,
        fs,
        ivas_br,
@@ -422,6 +431,7 @@ def sba_enc(
    ref_encoder_path,
    reference_path,
    dut_base_path,
    br_switch_file_path,
    tag,
    sampling_rate,
    ivas_br,
@@ -450,6 +460,8 @@ def sba_enc(
        tag = tag + dict_bw_tag[ivas_max_bw]

    tag_out = f"{tag}_ivasbr{ivas_br[:-3]}k_DTX{dtx}"
    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}'