Commit 404b2d97 authored by norvell's avatar norvell
Browse files

Fix multiple diff 2

parent 6ccf7aaf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ for s in scripts:
            if line.startswith("$CUT_REND_BIN"):
                rend_opts = line                
            if line.startswith("$DIFF_BIN"):
                diff_opts = line[9:]
                diff_opts = line
                tag = s + "--" + diff_opts.split()[1].split('/')[-1]
                if tag in test_dict:
                    print("non-unique tag found - ignoring new entry")
@@ -115,7 +115,7 @@ def test_26252(test_tag, encoder_path, decoder_path, renderer_path):
    diff_opts = replace_paths(diff_opts, testv_path, ref_path, cut_path)
    result = True
    for cmd in diff_opts.split(';'):
        result = result and filecmp.cmp(cmd.split()[0], cmd.split()[1])
        result = result and filecmp.cmp(cmd.split()[1], cmd.split()[2])
    if not result:
        assert False, "Output differs" 
+0 −87
Original line number Diff line number Diff line
@@ -318,15 +318,6 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error
../IVAS_dec -t testv/headrot_case00_3000_q.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL_ROOM_IR 48 bit_error testv/stv1ISM48s.wav_64000_48-48_FER5_binaural_room_HR_EXOF.tst

// 1 ISM with metadata at 80 kbps, 48 kHz in, 16 kHz out, BINAURAL out (Model from file), head rotation, random FER at 5%
../IVAS_cod -ism 1 testv/stvISM1.csv 80000 48 testv/stv1ISM48s.wav bit
eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error
../IVAS_dec -t testv/headrot_case00_3000_q.csv -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin BINAURAL 16 bit_error testv/stv1ISM48s.wav_80000_48-16_FER5_binaural_file_TDHR.tst

// 1 ISM with metadata at 80 kbps, 48 kHz in, 16 kHz out, BINAURAL out (Model from file), head rotation, external orientation, random FER at 5%
../IVAS_cod -ism 1 testv/stvISM1.csv 80000 48 testv/stv1ISM48s.wav bit
eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error
../IVAS_dec -t testv/headrot_case00_3000_q.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin BINAURAL 16 bit_error testv/stv1ISM48s.wav_80000_48-16_FER5_binaural_file_TDHR_EXOF.tst

// 1 ISM with metadata at 96 kbps, 48 kHz in, 16 kHz out, EXT out
../IVAS_cod -ism 1 testv/stvISM1.csv 96000 48 testv/stv1ISM48s.wav bit
@@ -374,13 +365,6 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
../IVAS_cod -dtx -ism 2 testv/stvISM1.csv testv/stvISM2.csv 80000 48 testv/stvST48n.wav bit
../IVAS_dec STEREO 48 bit testv/stvST48n.wav_2ISM_80000_48-48_DTX_STEREO.tst

// 2 ISM with metadata at 128 kbps, 48 kHz in, 32 kHz out, BINAURAL out (Model from file), head rotation
../IVAS_cod -ism 2 testv/stvISM1.csv testv/stvISM2.csv 128000 48 testv/stv2ISM48s.wav bit
../IVAS_dec -t testv/headrot_case01_3000_q.csv -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin BINAURAL 32 bit testv/stv2ISM48s.wav_128000_48-32_binaural_file_TDHR.tst

// 2 ISM with metadata at 128 kbps, 48 kHz in, 32 kHz out, BINAURAL out (Model from file), head rotation, external orientation
../IVAS_cod -ism 2 testv/stvISM1.csv testv/stvISM2.csv 128000 48 testv/stv2ISM48s.wav bit
../IVAS_dec -t testv/headrot_case01_3000_q.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin BINAURAL 32 bit testv/stv2ISM48s.wav_128000_48-32_binaural_file_TDHR_EXOF.tst

// 2 ISM with metadata at 160 kbps, 48 kHz in, 32 kHz out, BINAURAL out
../IVAS_cod -ism 2 testv/stvISM1.csv testv/stvISM2.csv 160000 48 testv/stv2ISM48s.wav bit
@@ -417,9 +401,6 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error
../IVAS_dec HOA3 32 bit_error testv/stv3ISM48s.wav_128000_48-32_HOA3_FER5.tst

// 3 ISM with metadata at 192 kbps, 48 kHz in, 48 kHz out, BINAURAL out (Model from file)
../IVAS_cod -ism 3 testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 192000 48 testv/stv3ISM48s.wav bit
../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL 48 bit testv/stv3ISM48s.wav_192000_48-48_binauralfile.tst

// 3 ISM with metadata at 192 kbps, 48 kHz in, 48 kHz out, BINAURAL out, head rotation, random FER at 5%
../IVAS_cod -ism 3 testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 192000 48 testv/stv3ISM48s.wav bit
@@ -502,10 +483,6 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
../IVAS_dec -t testv/headrot_case03_3000_q.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 48 bit testv/stv4ISM48s.wav_256000_48-48_binaural_file_TDHR_EXOF.tst

// 4 ISM with metadata at 512 kbps, 48 kHz in, 48 kHz out, 5_1
../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 512000 48 testv/stv4ISM48s.wav bit
../IVAS_dec 5_1 48 bit testv/stv4ISM48s.wav_512000_48-48_5_1.tst

// 4 ISm with metadata at 256 kbps, 48 kHz in, 48 kHz out, TD BINAURAL out, head rotation, Orientation tracking
../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.wav bit
../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL 48 bit testv/stv4ISM48s.pcm_256000_48-48_TDHR_OtrAvg.tst

@@ -521,15 +498,6 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
../IVAS_cod -dtx -ism 4 testv/stvISM1.csv NULL NULL testv/stvISM4.csv ../scripts/switchPaths/sw_24k4_256k.bin 48 testv/stv4ISM48n.wav bit
../IVAS_dec HOA3 48 bit testv/stv4ISM48n.wav_brate_sw_48-48_DTX_hoa3.tst

// 4 ISM with extended metadata at 256 kbps, 48 kHz in, 48 kHz out, BINAURAL out, head rotation, directivity configuration, random FER at 5%
../IVAS_cod -ism +4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.wav bit
eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error
../IVAS_dec -render_config testv/config_directivity_txt.cfg -t testv/headrot_case04_3000_q.csv BINAURAL 48 bit_error testv/stv+4ISM48s.wav_256000_48-48_binaural_file_TDHR_DirConfig_FER5.tst

// 4 ISM with extended metadata at 256 kbps, 48 kHz in, 48 kHz out, BINAURAL out, head rotation, external orientation, directivity configuration, random FER at 5%
../IVAS_cod -ism +4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.wav bit
eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error
../IVAS_dec -render_config testv/config_directivity.cfg -t testv/headrot_case04_3000_q.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 48 bit_error testv/stv+4ISM48s.wav_256000_48-48_binaural_file_TDHR_EXOF_DirConfig_FER5.tst

// 4 ISM with and without extended metadata bitrate switching from 24.4 kbps to 256 kbps, 48 kHz in, 48 kHz out, DTX on, EXT out
../IVAS_cod -dtx -ism +4 testv/stvISM1.csv NULL testv/stvISM3.csv testv/stvISM4.csv ../scripts/switchPaths/sw_24k4_256k.bin 48 testv/stv4ISM48n.wav bit
@@ -681,9 +649,6 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
../IVAS_cod -sba 3 48000 48 testv/stv3OA48c.wav bit
../IVAS_dec 5_1_2 48 bit testv/stv3OA48c.wav_SBA_48000_48-48_5_1_2.tst

// SBA at 48 kbps, 48kHz in, 48kHz out, BINAURAL out, fr 5ms
../IVAS_cod -sba 3 48000 48 testv/stv3OA48c.wav bit
../IVAS_dec -fr 5 -t testv/headrot.csv BINAURAL 48 bit testv/stv3OA48c.wav_SBA_48000_48-48_binaural_ht_fr5.tst

// SBA at 64 kbps, 32kHz in, 32kHz out, FOA out, DTX, random FER at 5%
../IVAS_cod -dtx -sba 1 64000 32 testv/stvFOA32c.wav bit
@@ -802,9 +767,6 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
../IVAS_cod -sba 3 512000 48 testv/stv3OA48c.wav bit
../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 48 bit testv/stv3OA48c.wav_SBA_512000_48-48_Binaural_Headrot_EXOF.tst

// SBA at 512 kbps, 48kHz in, 48kHz out, BINAURAL out, fr 5ms
../IVAS_cod -sba 3 512000 48 testv/stv3OA48c.wav bit
../IVAS_dec -fr 5 -t testv/headrot.csv BINAURAL 48 bit testv/stv3OA48c.wav_SBA_512000_48-48_binaural_ht_fr5.tst

// SBA FOA bitrate switching from 13.2 kbps to 192 kbps, 48kHz in, 48kHz out, BINAURAL out
../IVAS_cod -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 48 testv/stvFOA48c.wav bit
@@ -846,9 +808,6 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv3OA32c.wav bit
../IVAS_dec HOA3 32 bit testv/stv3OA32c.wav_sw_32-32_DTX_HOA3.tst

// SBA FOA bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, FOA out
../IVAS_cod -sba 1 -max_band fb ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stvFOA48c.wav bit
../IVAS_dec FOA 48 bit testv/stvFOA48c.wav_sw_48-48_FOA.tst


// MASA 1dir 1TC at 13.2 kbps, 48kHz in, 48kHz out, BINAURAL out
@@ -1202,15 +1161,6 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1

// Multi-channel 7_1_4 at 160 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM out, fr 5ms
../IVAS_cod -mc 7_1_4 160000 48 testv/stv714MC48c.wav bit
../IVAS_dec -fr 5 BINAURAL_ROOM_IR 48 bit testv/stv714MC48c.wav_MC714_160000_48-48_MC_binaural_room_fr5.tst

// Multi-channel 7_1_4 at 512 kbps, 48kHz in, 48kHz out, with headtracking, BINAURAL out, fr 5ms
../IVAS_cod -mc 7_1_4 512000 48 testv/stv714MC48c.wav bit
../IVAS_dec -fr 5 -t testv/headrot.csv BINAURAL 48 bit testv/stv714MC48c.wav_MC714_512000_48-48_MC_binaural_ht_fr5.tst

// Multi-channel 5_1 at 512 kbps, 48kHz in, 48kHz out, BINAURAL out, fr 5ms
../IVAS_cod -mc 5_1 512000 48 testv/stv51MC48c.wav bit
../IVAS_dec -fr 5 -t testv/headrot.csv BINAURAL 48 bit testv/stv51MC48c.wav_MC51_512000_48-48_MC_binaural_ht_fr5.tst

// Multi-channel 5_1_2 at 32 kbps, 48kHz in, 48kHz out, STEREO out, random FER at 5%
../IVAS_cod -mc 5_1_2 32000 48 testv/stv512MC48c.wav bit
@@ -1304,21 +1254,6 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
../IVAS_dec BINAURAL 48 bit testv/stv51MC48c.wav_sw_48-48_BINAURAL.tst


// Multi-channel 5_1_4 at 512 kbps, 48kHz in, 16kHz out, BINAURAL_ROOM out (Model from file)
../IVAS_cod -mc 5_1_4 512000 48 testv/stv514MC48c.wav bit
../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin BINAURAL_ROOM_IR 16 bit testv/stv51MC48c.wav_MC51_512000_48-16_MC_binaural_room.tst

// Multi-channel 7_1_4 at 512 kbps, 48kHz in, 32kHz out, BINAURAL out (Model from file)
../IVAS_cod -mc 7_1_4 512000 48 testv/stv714MC48c.wav bit
../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin BINAURAL 32 bit testv/stv714MC48c.wav_MC714_512000_48-32_MC_binaural.tst

// Multi-channel 5_1_4 at 512 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file)
../IVAS_cod -mc 5_1_4 512000 48 testv/stv514MC48c.wav bit
../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL 48 bit testv/stv51MC48c.wav_MC51_512000_48-48_MC_binaural.tst

// Multi-channel 7_1_4 at 512 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM out (Model from file)
../IVAS_cod -mc 7_1_4 512000 48 testv/stv714MC48c.wav bit
../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL_ROOM_IR 48 bit testv/stv714MC48c.wav_MC714_512000_48-48_MC_binaural_room.tst



@@ -1347,10 +1282,6 @@ networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit
networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0
../IVAS_dec -Tracefile tracefile_dec -VOIP HOA3 32 netsimoutput testv/stv3OA32c.wav_SBA_80000_32-32_HOA3_JBM5.tst

// SBA at 13.2 kbps, 48kHz in, 48kHz out, BINAURAL out, JBM Prof 5
../IVAS_cod -sba 1 13200 48 testv/stvFOA48c.wav bit
networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0
../IVAS_dec -Tracefile tracefile_dec -VOIP BINAURAL 48 netsimoutput testv/stvFOA32c.wav_SBA_13200_48-48_BINAURAL_JBM5.tst

// Multi-channel 5_1 at 384 kbps, 48kHz in, 48kHz out, 7_1_4 out, JBM Prof 5
../IVAS_cod -mc 5_1 384000 48 testv/stv51MC48c.wav bit
@@ -1620,9 +1551,6 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
../IVAS_cod -ism_sba 4 3 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stvOSBA_4ISM_3OA48c.wav bit
../IVAS_dec BINAURAL 48 bit testv/stvOSBA_4ISM_3OA48c.wav_BINAURAL_sw_13k2_512k_48-48.tst

// OSBA 3OA 2ISM at 256 kbps, 32kHz in, 32kHz out, HOA3 out
../IVAS_cod -ism_sba 2 3 testv/stvISM1.csv testv/stvISM2.csv 256000 32 testv/stvOSBA_2ISM_3OA32c.wav bit
../IVAS_dec HOA3 32 bit testv/stvOSBA_2ISM_3OA32c.wav_HOA3_256000_32-32.tst

// OSBA 2OA 3ISM at 384 kbps, 16kHz in, 16kHz out, MONO out
../IVAS_cod -ism_sba 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv 384000 16 testv/stvOSBA_3ISM_2OA16c.wav bit
@@ -1641,19 +1569,4 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error
../IVAS_dec BINAURAL 48 bit_error testv/stvOSBA_4ISM_FOA48c.wav_BINAURAL_sw_48-48_FER5.tst

// OSBA 3ISM 2OA at bitrate switching 13.2 to 512 kbps, 48kHz in, 32kHz out, STEREO out, FER at 10%
../IVAS_cod -ism_sba 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stvOSBA_3ISM_2OA48c.wav bit
eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_10pct.g192 bit_error
../IVAS_dec STEREO 32 bit_error testv/stvOSBA_3ISM_2OA48c.wav_STEREO_sw_48-32_FER10.tst

// OSBA planar FOA 1ISM at 256 kbps, 48 kHz in, 48 kHz out, BINAURAL out
../IVAS_cod -ism_sba 1 -1 testv/stvISM1.csv 256000 48 testv/stvOSBA_1ISM_FOA48c.wav bit
../IVAS_dec BINAURAL 48 bit testv/stvOSBA_1ISM_pFOA48c.wav_BINAURAL_256000_48-48.tst

// OSBA planar FOA 2ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL out
../IVAS_cod -ism_sba 2 -1 testv/stvISM1.csv testv/stvISM2.csv 512000 48 testv/stvOSBA_2ISM_FOA48c.wav bit
../IVAS_dec BINAURAL 48 bit testv/stvOSBA_2ISM_pFOA48c.wav_BINAURAL_512000_48-48.tst
// OSBA planar 3OA 4ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL out
../IVAS_cod -ism_sba 4 -3 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 512000 48 testv/stvOSBA_4ISM_3OA48c.wav bit
../IVAS_dec BINAURAL 48 bit testv/stvOSBA_4ISM_p3OA48c.wav_BINAURAL_512000_48-48.tst
+2 −2
Original line number Diff line number Diff line
@@ -139,8 +139,8 @@ def test_masa_enc_dec(
    check_and_makedir(out_dir_dec_output_dut)

    # To avoid conflicting names in case of parallel test execution, differentiate all cases
    output_bitstream_ref = f"{out_dir_bs_ref}/masa{masa_channel_count}_ndirs{n_directions}_outputmode{output_mode}_ivasbr{ivas_br}k_DTX{dtx}.bts"
    output_bitstream_dut = f"{out_dir_bs_dut}/masa{masa_channel_count}_ndirs{n_directions}_outputmode{output_mode}_ivasbr{ivas_br}k_DTX{dtx}.bts"
    output_bitstream_ref = f"{out_dir_bs_ref}/masa{masa_channel_count}_ndirs{n_directions}_outputmode{output_mode}_ivasbr{ivas_br}k_DTX{dtx}.192"
    output_bitstream_dut = f"{out_dir_bs_dut}/masa{masa_channel_count}_ndirs{n_directions}_outputmode{output_mode}_ivasbr{ivas_br}k_DTX{dtx}.192"
    dec_output_ref = f"{out_dir_dec_output_ref}/masa{masa_channel_count}_ndirs{n_directions}_outputmode{output_mode}_ivasbr{ivas_br}k_DTX{dtx}.wav"
    dec_output_dut = f"{out_dir_dec_output_dut}/masa{masa_channel_count}_ndirs{n_directions}_outputmode{output_mode}_ivasbr{ivas_br}k_DTX{dtx}.wav"
    if output_mode == "EXT":
+6 −6
Original line number Diff line number Diff line
@@ -157,14 +157,14 @@ def sba_dec_plc(
    check_and_makedir(ref_out_dir)

    plc_file = f"{test_vector_path}/{plc_pattern}.g192"
    ref_in_pkt = f"{reference_path}/sba_bs/pkt/{tag_out}.pkt"
    ref_in_pkt_dutenc = f"{reference_path}/sba_bs/pkt/{tag_out}_dutenc.pkt"
    ref_in_pkt = f"{reference_path}/sba_bs/pkt/{tag_out}.192"
    ref_in_pkt_dutenc = f"{reference_path}/sba_bs/pkt/{tag_out}_dutenc.192"
    if SID == 1:
        ref_in_pkt = f"{reference_path}/sba_bs/pkt/{tag_out}_SID_cut.pkt"
        ref_in_pkt_dutenc = f"{reference_path}/sba_bs/pkt/{tag_out}_SID_dutenc_cut.pkt"
        ref_in_pkt = f"{reference_path}/sba_bs/pkt/{tag_out}_SID_cut.192"
        ref_in_pkt_dutenc = f"{reference_path}/sba_bs/pkt/{tag_out}_SID_dutenc_cut.192"

    dut_out_raw = f"{dut_out_dir}/{plc_tag_out}.raw"
    ref_out_raw = f"{ref_out_dir}/{plc_tag_out}.raw"
    dut_out_raw = f"{dut_out_dir}/{plc_tag_out}.wav"
    ref_out_raw = f"{ref_out_dir}/{plc_tag_out}.wav"

    output_config = "FOA"
    if ref_decoder_path:
+13 −83
Original line number Diff line number Diff line
@@ -85,72 +85,6 @@ def check_and_makedir(dir_path):
                raise  # raises the error again


@pytest.mark.create_ref
@pytest.mark.parametrize("tag", tag_list)
@pytest.mark.parametrize("fs", sample_rate_list)
def test_pca_enc(
    dut_encoder_frontend: EncoderFrontend,
    dut_decoder_frontend: DecoderFrontend,
    test_vector_path,
    reference_path,
    dut_base_path,
    ref_encoder_frontend,
    ref_decoder_frontend,
    update_ref,
    keep_files,
    tag,
    fs,
    get_mld,
):
    pca = True
    tag = tag + fs + "c"
    ivas_br = "256000"
    dtx = "0"
    max_bw = "FB"
    gain_flag = -1
    sba_order = "+1"
    output_config = "FOA"

    # enc
    sba_enc(
        dut_encoder_frontend,
        test_vector_path,
        ref_encoder_frontend,
        reference_path,
        dut_base_path,
        None,
        tag,
        fs,
        ivas_br,
        dtx,
        None,
        max_bw,
        sba_order,
        update_ref,
        gain_flag,
        cut_testv=True,
        pca=pca,
    )

    # dec
    sba_dec(
        dut_decoder_frontend,
        ref_decoder_frontend,
        reference_path,
        dut_base_path,
        tag,
        fs,
        ivas_br,
        dtx,
        None,
        max_bw,
        output_config,
        update_ref,
        gain_flag,
        keep_files,
        get_mld=get_mld,
        pca=pca,
    )


@pytest.mark.create_ref
@@ -504,14 +438,14 @@ def sba_enc(
        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"
    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"
    dut_pkt_file = f"{dut_out_dir}/{tag_out}{long_tag_ext}.192"
    ref_pkt_file = f"{ref_out_dir}/{tag_out}{short_tag_ext}.192"
    ref_pkt_file_dutenc = f"{ref_out_dir}/{tag_out}{short_tag_ext}_dutenc.192"
    if SID == 1:
        dut_pkt_file_cut = f"{dut_out_dir}/{tag_out}{long_tag_ext}_cut.pkt"
        ref_pkt_file_cut = f"{ref_out_dir}/{tag_out}{short_tag_ext}_cut.pkt"
        dut_pkt_file_cut = f"{dut_out_dir}/{tag_out}{long_tag_ext}_cut.192"
        ref_pkt_file_cut = f"{ref_out_dir}/{tag_out}{short_tag_ext}_cut.192"
        ref_pkt_file_dutenc_cut = (
            f"{ref_out_dir}/{tag_out}{short_tag_ext}_dutenc_cut.pkt"
            f"{ref_out_dir}/{tag_out}{short_tag_ext}_dutenc_cut.192"
        )
    input_path = f"{test_vector_path}/{tag_in}{in_extension}"
    dtx_mode = dtx == "1"
@@ -584,13 +518,13 @@ def sba_enc(
            with open(ref_pkt_file_dutenc, "rb") as fp_in:
                with open(ref_pkt_file_dutenc_cut, "wb") as fp_out:
                    fr_cnt, cut_cnt = cut_from_start(fp_in, fp_out, 0, True)
            os.remove(ref_pkt_file)
            os.remove(ref_pkt_file_dutenc)
            #os.remove(ref_pkt_file)
            #os.remove(ref_pkt_file_dutenc)
        if update_ref == 0:
            with open(dut_pkt_file, "rb") as fp_in:
                with open(dut_pkt_file_cut, "wb") as fp_out:
                    fr_cnt, cut_cnt = cut_from_start(fp_in, fp_out, 0, True)
            os.remove(dut_pkt_file)
            #os.remove(dut_pkt_file)


def sba_dec(
@@ -635,11 +569,11 @@ def sba_dec(
    dut_out_dir = f"{dut_base_path}/sba_bs/raw"
    ref_out_dir = f"{reference_path}/sba_bs/raw"

    dut_in_pkt = f"{dut_base_path}/sba_bs/pkt/{tag_out}{long_tag_ext}.pkt"
    ref_in_pkt = f"{reference_path}/sba_bs/pkt/{tag_out}{short_tag_ext}.pkt"
    dut_in_pkt = f"{dut_base_path}/sba_bs/pkt/{tag_out}{long_tag_ext}.192"
    ref_in_pkt = f"{reference_path}/sba_bs/pkt/{tag_out}{short_tag_ext}.192"

    dut_out_raw = f"{dut_out_dir}/{tag_out}{long_tag_ext}.raw"
    ref_out_raw = f"{ref_out_dir}/{tag_out}{short_tag_ext}.raw"
    dut_out_raw = f"{dut_out_dir}/{tag_out}{long_tag_ext}.wav"
    ref_out_raw = f"{ref_out_dir}/{tag_out}{short_tag_ext}.wav"

    check_and_makedir(dut_out_dir)
    check_and_makedir(ref_out_dir)
@@ -668,7 +602,3 @@ def sba_dec(
        # report compare result
        assert cmp_result == 0, reason
        # remove DUT output files when test result is OK (to save disk space)
        if not keep_files:
            os.remove(dut_in_pkt)
            os.remove(dut_out_raw)
Loading