Commit c81e2682 authored by BOHMRR's avatar BOHMRR
Browse files

changed test_spar_foa_plc_system decoder test to use DUT encoder generated...

changed test_spar_foa_plc_system decoder test to use DUT encoder generated bitstreams when calling the DUT decoder
parent 9e70640e
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -127,6 +127,7 @@ def spar_foa_dec_plc(

    plc_file = f"{test_vector_path}/{plc_pattern}.g192"
    ref_in_pkt = f"{reference_path}/spar_foa_bs/pkt/{tag_out}.pkt"
    ref_in_pkt_dutenc = f"{reference_path}/spar_foa_bs/pkt/{tag_out}_dutenc.pkt"

    if ref_decoder_path:
        ref_decoder = DecoderFrontend(ref_decoder_path, "REF")
@@ -148,7 +149,7 @@ def spar_foa_dec_plc(
        decoder_frontend.run(
            "FOA",
            sampling_rate,
            ref_in_pkt,
            ref_in_pkt_dutenc,
            f"{dut_out_dir}/out.raw",
            plc_file=plc_file,
        )
+18 −2
Original line number Diff line number Diff line
@@ -191,7 +191,8 @@ def test_spar_foa_enc_system(
        agc,
        sba_order,
        update_ref,
        cut_gain=cut_gain
        cut_gain=cut_gain,
        create_dutenc=True
    )

    # dec
@@ -418,7 +419,8 @@ def spar_foa_enc(
    sba_order,
    update_ref,
    in_extension = '.pcm',
    cut_gain = '1.0'
    cut_gain = '1.0',
    create_dutenc = False
):

    #########  run cmd   #####################################
@@ -446,6 +448,7 @@ def spar_foa_enc(
    long_tag_ext = f"_AGC{agc}_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 >= 0 else None
@@ -480,6 +483,19 @@ def spar_foa_enc(
            bypass_mode=bypass_mode,
            dtx_mode=dtx_mode,
        )
        if create_dutenc:
            # for PLC decoder tests, create bitstream using DUT encoder
            encoder_frontend.run(
                ivas_br,
                sampling_rate,
                input_path,
                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,
            )

    if update_ref == 0:
        # call DUT encoder