Commit 8ee4df33 authored by Jan Kiene's avatar Jan Kiene
Browse files

cleanup in test_param_file.py and adjust filenames in config

parent 5ce75400
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -851,11 +851,11 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
../IVAS_dec 7_1_4 48 bit testv/stv3OA48c.wav_sw_48-48_7_1_4.tst

// SBA FOA bitrate switching from 13.2 kbps to 192 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out
../IVAS_cod -dtx -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 32 testv/stvFOA32c.wav bit
../IVAS_cod -dtx -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 32 testv/stvFOA32c_cut_.004.wav bit
../IVAS_dec BINAURAL 32 bit testv/stvFOA32c.wav_sw_32-32_DTX_BINAURAL.tst

// SBA 3OA bitrate switching from 13.2 kbps to 128 kbps, 32kHz in, 32kHz out, DTX on, HOA3 out
../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv3OA32c.wav bit
../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv3OA32c_cut_.004.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
@@ -1773,14 +1773,14 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_10pct.g
../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL_ROOM_REVERB 48 bit testv/stvOSBA_4ISM_p3OA48c.wav_BINAURAL_ROOM_REVERB_512000_48-48.tst

// SBA FOA bitrate switching from 13.2 kbps to 192 kbps, 32kHz in, 32kHz out, DTX on, EXT out
../IVAS_cod -dtx -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 32 testv/stvFOA32c.wav bit
../IVAS_cod -dtx -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 32 testv/stvFOA32c_cut_.004.wav bit
../IVAS_dec EXT 32 bit testv/stvFOA32c.wav_sw_32-32_DTX_EXT.tst

// SBA 3OA bitrate switching from 13.2 kbps to 128 kbps, 32kHz in, 32kHz out, DTX on, EXT out
../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv3OA32c.wav bit
../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv3OA32c_cut_.004.wav bit
../IVAS_dec EXT 32 bit testv/stv3OA32c.wav_sw_32-32_DTX_EXT.tst

// SBA 2OA bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, EXT out, random FER at 5%, DTX on
../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv3OA48c.wav bit
../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv3OA48c_cut_.004.wav bit
eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error
../IVAS_dec EXT 48 bit_error testv/stv3OA48c.wav_sw_48-48_EXT_FER5.tst
+0 −19
Original line number Diff line number Diff line
@@ -39,12 +39,10 @@ import re
import platform
from pathlib import Path
from subprocess import run
from tempfile import TemporaryDirectory
import pytest

from tests.cmp_pcm import cmp_pcm
from tests.conftest import DecoderFrontend, EncoderFrontend
from tests.cut_pcm import cut_samples
from tests.testconfig import PARAM_FILE
from . import MLD_PATTERN, MAX_DIFF_PATTERN

@@ -165,17 +163,6 @@ def test_param_file_tests(
    sampling_rate = int(fs)
    bitrate = enc_split.pop()

    sba_br_switching_dtx = 0
    if (
        not bitrate.isdigit()
        and "-dtx" in enc_split
        and "-sba" in enc_split
        and Path(testv_file).name.startswith("stv")
    ):
        sba_br_switching_dtx = 1
        cut_file = pre_proc_input(testv_file, fs)
        testv_file = cut_file

    # bitrate can be a filename: remove leading "../"
    if bitrate.startswith("../"):
        bitrate = bitrate[3:]
@@ -447,12 +434,6 @@ def encode(
        )


def pre_proc_input(testv_file, fs):
    cut_gain = ".004"
    cut_file = testv_file.replace(".wav", "_cut_" + cut_gain + ".wav")
    return cut_file


def simulate(
    reference_path,
    dut_base_path,
+0 −31
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ import pytest

from tests.cmp_pcm import cmp_pcm
from tests.conftest import DecoderFrontend, EncoderFrontend
from tests.cut_pcm import cut_samples
from .codec_be_on_mr_nonselection import MLD_PATTERN, MAX_DIFF_PATTERN

# from tests.testconfig import PARAM_FILE
@@ -167,17 +166,6 @@ def test_param_file_tests(
    sampling_rate = int(fs)
    bitrate = enc_split.pop()

    sba_br_switching_dtx = 0
    if (
        not bitrate.isdigit()
        and "-dtx" in enc_split
        and "-sba" in enc_split
        and testv_file.split("/")[1].startswith("stv")
    ):
        sba_br_switching_dtx = 1
        cut_file = pre_proc_input(testv_file, fs)
        testv_file = cut_file

    # bitrate can be a filename: remove leading "../"
    if bitrate.startswith("../"):
        bitrate = bitrate[3:]
@@ -203,10 +191,6 @@ def test_param_file_tests(
        enc_split,
        update_ref,
    )
    if sba_br_switching_dtx == 1 and not keep_files:
        is_exist = os.path.exists(cut_file)
        if is_exist:
            os.remove(cut_file)

    # check for networkSimulator_g192 command line
    if sim_opts != "":
@@ -435,21 +419,6 @@ def encode(
        )


def pre_proc_input(testv_file, fs):
    cut_from = "0.0"
    cut_len = "5.0"
    cut_gain = "0.004"
    if "stvFOA" in testv_file:
        num_channel = "4"
    elif "stv2OA" in testv_file:
        num_channel = "9"
    elif "stv3OA" in testv_file:
        num_channel = "16"
    cut_file = testv_file.replace(".wav", num_channel + "chn_" + cut_gain + ".wav")
    cut_samples(testv_file, cut_file, num_channel, cut_from, cut_len, cut_gain)
    return cut_file


def simulate(
    reference_path,
    dut_base_path,