Loading tests/test_enc_passthrough.py +35 −31 Original line number Diff line number Diff line Loading @@ -39,6 +39,10 @@ from tests.codec_be_on_mr_nonselection.test_param_file import run_test from tests.conftest import DecoderFrontend, EncoderFrontend from tests.constants import TESTV_DIR NUMBER_OF_MASA_TCS = 2 NUMBER_OF_MASA_DIRS = 2 NUMBER_OF_SBA_ORDERS = 3 NUMBER_OF_OBJECTS = 4 test_dict = {} sim_opts = "" Loading @@ -65,10 +69,10 @@ out_fmt = ["FOA","HOA2","HOA3"] in_file = ["stvFOA{bw}c.wav", "stv2OA{bw}c.wav", "stv3OA{bw}c.wav"] for br in [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000, 384000, 512000]: for bw in [16, 32, 48]: for order in range(0,3): tag = f"{fmt.format(order=order+1)}-{br}-{bw}" enc_opts = f"{in_fmt.format(order=order+1)} {br} {bw} testv/{in_file[order].format(bw=bw)} bit" dec_opts = f"{out_fmt[order]} {bw} bit out.wav" for order in range(1, NUMBER_OF_SBA_ORDERS + 1): tag = f"{fmt.format(order=order)}-{br}-{bw}" enc_opts = f"{in_fmt.format(order=order)} {br} {bw} testv/{in_file[order-1].format(bw=bw)} bit" dec_opts = f"{out_fmt[order-1]} {bw} bit out.wav" test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) # MC Loading @@ -92,19 +96,19 @@ in_fmt = "-ism {obj}" out_fmt = "EXT" for br in [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000, 384000, 512000]: for bw in [48]: for obj in range(4): if obj == 0 and br > 128000: for obj in range(1, NUMBER_OF_OBJECTS + 1): if obj == 1 and br > 128000: continue if obj == 1 and (br < 16400 or br > 256000): if obj == 2 and (br < 16400 or br > 256000): continue if obj == 2 and (br < 24400 or br > 384000): if obj == 3 and (br < 24400 or br > 384000): continue if obj == 2 and br < 24400: if obj == 4 and br < 24400: continue meta = " ".join([f"testv/stvISM{o+1}.csv" for o in range(obj+1)]) infile = f"stv{obj+1}ISM{bw}s.wav" tag = f"{fmt.format(obj=obj+1)}-{br}-{bw}" enc_opts = f"{in_fmt.format(obj=obj+1)} {meta} {br} {bw} testv/{infile} bit" meta = " ".join([f"testv/stvISM{o}.csv" for o in range(1, obj + 1)]) infile = f"stv{obj}ISM{bw}s.wav" tag = f"{fmt.format(obj=obj)}-{br}-{bw}" enc_opts = f"{in_fmt.format(obj=obj)} {meta} {br} {bw} testv/{infile} bit" dec_opts = f"{out_fmt} {bw} bit out.wav" test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) Loading @@ -114,12 +118,12 @@ in_fmt = "-masa {tc}" out_fmt = "EXT" for br in [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000, 384000, 512000]: for bw in [16, 32, 48]: for tc in range(2): for dir in range(2): meta = f"testv/stv{dir+1}MASA{tc+1}TC{bw}c.met" infile = f"stv{dir+1}MASA{tc+1}TC{bw}c.wav" tag = f"{fmt.format(tc=tc+1, dir=dir+1)}-{br}-{bw}" enc_opts = f"{in_fmt.format(tc=+1)} {meta} {br} {bw} testv/{infile} bit" for tc in range(1, NUMBER_OF_MASA_TCS + 1): for dir in range(1, NUMBER_OF_MASA_DIRS + 1): meta = f"testv/stv{dir}MASA{tc}TC{bw}c.met" infile = f"stv{dir}MASA{tc}TC{bw}c.wav" tag = f"{fmt.format(tc=tc, dir=dir)}-{br}-{bw}" enc_opts = f"{in_fmt.format(tc=tc)} {meta} {br} {bw} testv/{infile} bit" dec_opts = f"{out_fmt} {bw} bit out.wav" test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) Loading @@ -130,16 +134,16 @@ in_fmt = "-ism_masa {obj} {tc}" out_fmt = "BINAURAL" for br in [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000, 384000, 512000]: for bw in [32, 48]: for tc in range(2): for dir in range(2): for obj in range(4): infile = f"stvOMASA_{obj+1}ISM_{dir+1}MASA{tc+1}TC{bw}c.wav" for tc in range(1, NUMBER_OF_MASA_TCS + 1): for dir in range(1, NUMBER_OF_MASA_DIRS + 1): for obj in range(1, NUMBER_OF_OBJECTS + 1): infile = f"stvOMASA_{obj}ISM_{dir}MASA{tc}TC{bw}c.wav" if infile not in testv_files: continue meta = " ".join([f"testv/stvISM{o+1}.csv" for o in range(obj+1)]) meta = meta + f" testv/stv{dir+1}MASA{tc+1}TC{bw}c.met" tag = f"{fmt.format(obj=obj+1, tc=tc+1, dir=dir+1)}-{br}-{bw}" enc_opts = f"{in_fmt.format(obj=obj+1, tc=+1)} {meta} {br} {bw} testv/{infile} bit" meta = " ".join([f"testv/stvISM{o}.csv" for o in range(1, obj + 1)]) meta = meta + f" testv/stv{dir}MASA{tc}TC{bw}c.met" tag = f"{fmt.format(obj=obj, tc=tc, dir=dir)}-{br}-{bw}" enc_opts = f"{in_fmt.format(obj=obj, tc=tc)} {meta} {br} {bw} testv/{infile} bit" dec_opts = f"{out_fmt} {bw} bit out.wav" test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) Loading @@ -152,10 +156,10 @@ for br in [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 16000 for bw in [16, 32, 48]: #for order in range(3): for order in [2]: # Currently only HOA3 output supported for obj in range(4): meta = " ".join([f"testv/stvISM{o+1}.csv" for o in range(obj+1)]) tag = f"{fmt.format(obj=obj+1, order=order+1)}-{br}-{bw}" enc_opts = f"{in_fmt.format(obj=obj+1,order=order+1)} {meta} {br} {bw} testv/{in_file[order].format(obj=obj+1, bw=bw)} bit" for obj in range(1, NUMBER_OF_OBJECTS + 1): meta = " ".join([f"testv/stvISM{o}.csv" for o in range(1, obj + 1)]) tag = f"{fmt.format(obj=obj, order=order)}-{br}-{bw}" enc_opts = f"{in_fmt.format(obj=obj,order=order)} {meta} {br} {bw} testv/{in_file[order].format(obj=obj, bw=bw)} bit" dec_opts = f"{out_fmt} {bw} bit out.wav" test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) Loading Loading
tests/test_enc_passthrough.py +35 −31 Original line number Diff line number Diff line Loading @@ -39,6 +39,10 @@ from tests.codec_be_on_mr_nonselection.test_param_file import run_test from tests.conftest import DecoderFrontend, EncoderFrontend from tests.constants import TESTV_DIR NUMBER_OF_MASA_TCS = 2 NUMBER_OF_MASA_DIRS = 2 NUMBER_OF_SBA_ORDERS = 3 NUMBER_OF_OBJECTS = 4 test_dict = {} sim_opts = "" Loading @@ -65,10 +69,10 @@ out_fmt = ["FOA","HOA2","HOA3"] in_file = ["stvFOA{bw}c.wav", "stv2OA{bw}c.wav", "stv3OA{bw}c.wav"] for br in [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000, 384000, 512000]: for bw in [16, 32, 48]: for order in range(0,3): tag = f"{fmt.format(order=order+1)}-{br}-{bw}" enc_opts = f"{in_fmt.format(order=order+1)} {br} {bw} testv/{in_file[order].format(bw=bw)} bit" dec_opts = f"{out_fmt[order]} {bw} bit out.wav" for order in range(1, NUMBER_OF_SBA_ORDERS + 1): tag = f"{fmt.format(order=order)}-{br}-{bw}" enc_opts = f"{in_fmt.format(order=order)} {br} {bw} testv/{in_file[order-1].format(bw=bw)} bit" dec_opts = f"{out_fmt[order-1]} {bw} bit out.wav" test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) # MC Loading @@ -92,19 +96,19 @@ in_fmt = "-ism {obj}" out_fmt = "EXT" for br in [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000, 384000, 512000]: for bw in [48]: for obj in range(4): if obj == 0 and br > 128000: for obj in range(1, NUMBER_OF_OBJECTS + 1): if obj == 1 and br > 128000: continue if obj == 1 and (br < 16400 or br > 256000): if obj == 2 and (br < 16400 or br > 256000): continue if obj == 2 and (br < 24400 or br > 384000): if obj == 3 and (br < 24400 or br > 384000): continue if obj == 2 and br < 24400: if obj == 4 and br < 24400: continue meta = " ".join([f"testv/stvISM{o+1}.csv" for o in range(obj+1)]) infile = f"stv{obj+1}ISM{bw}s.wav" tag = f"{fmt.format(obj=obj+1)}-{br}-{bw}" enc_opts = f"{in_fmt.format(obj=obj+1)} {meta} {br} {bw} testv/{infile} bit" meta = " ".join([f"testv/stvISM{o}.csv" for o in range(1, obj + 1)]) infile = f"stv{obj}ISM{bw}s.wav" tag = f"{fmt.format(obj=obj)}-{br}-{bw}" enc_opts = f"{in_fmt.format(obj=obj)} {meta} {br} {bw} testv/{infile} bit" dec_opts = f"{out_fmt} {bw} bit out.wav" test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) Loading @@ -114,12 +118,12 @@ in_fmt = "-masa {tc}" out_fmt = "EXT" for br in [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000, 384000, 512000]: for bw in [16, 32, 48]: for tc in range(2): for dir in range(2): meta = f"testv/stv{dir+1}MASA{tc+1}TC{bw}c.met" infile = f"stv{dir+1}MASA{tc+1}TC{bw}c.wav" tag = f"{fmt.format(tc=tc+1, dir=dir+1)}-{br}-{bw}" enc_opts = f"{in_fmt.format(tc=+1)} {meta} {br} {bw} testv/{infile} bit" for tc in range(1, NUMBER_OF_MASA_TCS + 1): for dir in range(1, NUMBER_OF_MASA_DIRS + 1): meta = f"testv/stv{dir}MASA{tc}TC{bw}c.met" infile = f"stv{dir}MASA{tc}TC{bw}c.wav" tag = f"{fmt.format(tc=tc, dir=dir)}-{br}-{bw}" enc_opts = f"{in_fmt.format(tc=tc)} {meta} {br} {bw} testv/{infile} bit" dec_opts = f"{out_fmt} {bw} bit out.wav" test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) Loading @@ -130,16 +134,16 @@ in_fmt = "-ism_masa {obj} {tc}" out_fmt = "BINAURAL" for br in [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000, 384000, 512000]: for bw in [32, 48]: for tc in range(2): for dir in range(2): for obj in range(4): infile = f"stvOMASA_{obj+1}ISM_{dir+1}MASA{tc+1}TC{bw}c.wav" for tc in range(1, NUMBER_OF_MASA_TCS + 1): for dir in range(1, NUMBER_OF_MASA_DIRS + 1): for obj in range(1, NUMBER_OF_OBJECTS + 1): infile = f"stvOMASA_{obj}ISM_{dir}MASA{tc}TC{bw}c.wav" if infile not in testv_files: continue meta = " ".join([f"testv/stvISM{o+1}.csv" for o in range(obj+1)]) meta = meta + f" testv/stv{dir+1}MASA{tc+1}TC{bw}c.met" tag = f"{fmt.format(obj=obj+1, tc=tc+1, dir=dir+1)}-{br}-{bw}" enc_opts = f"{in_fmt.format(obj=obj+1, tc=+1)} {meta} {br} {bw} testv/{infile} bit" meta = " ".join([f"testv/stvISM{o}.csv" for o in range(1, obj + 1)]) meta = meta + f" testv/stv{dir}MASA{tc}TC{bw}c.met" tag = f"{fmt.format(obj=obj, tc=tc, dir=dir)}-{br}-{bw}" enc_opts = f"{in_fmt.format(obj=obj, tc=tc)} {meta} {br} {bw} testv/{infile} bit" dec_opts = f"{out_fmt} {bw} bit out.wav" test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) Loading @@ -152,10 +156,10 @@ for br in [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 16000 for bw in [16, 32, 48]: #for order in range(3): for order in [2]: # Currently only HOA3 output supported for obj in range(4): meta = " ".join([f"testv/stvISM{o+1}.csv" for o in range(obj+1)]) tag = f"{fmt.format(obj=obj+1, order=order+1)}-{br}-{bw}" enc_opts = f"{in_fmt.format(obj=obj+1,order=order+1)} {meta} {br} {bw} testv/{in_file[order].format(obj=obj+1, bw=bw)} bit" for obj in range(1, NUMBER_OF_OBJECTS + 1): meta = " ".join([f"testv/stvISM{o}.csv" for o in range(1, obj + 1)]) tag = f"{fmt.format(obj=obj, order=order)}-{br}-{bw}" enc_opts = f"{in_fmt.format(obj=obj,order=order)} {meta} {br} {bw} testv/{in_file[order].format(obj=obj, bw=bw)} bit" dec_opts = f"{out_fmt} {bw} bit out.wav" test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) Loading