diff --git a/apps/decoder.c b/apps/decoder.c index 79c825809ea3149a19ea74e7db2f2f902c9f66a6..4b7bf91736bd128679b586c151b0284098323321 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2003,7 +2003,22 @@ static ivas_error initOnFirstGoodFrame( if ( numInitialBadFrames > 0 ) { /* Duplicate good first frame metadata to fill the beginning of stream. */ +#ifdef NONBE_FIX_1261_MASA_EXT_META_JBM + int16_t fullDelayNumSamplesLocal[3]; + int32_t delayTimeScaleLocal; + float delayMs; + IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; + hMasaExtOutMeta = NULL; + + /* fullDelayNumSamples is zeroed so need to re-fetch delay info */ + if ( ( error = IVAS_DEC_GetDelay( hIvasDec, fullDelayNumSamplesLocal, &delayTimeScaleLocal ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); + } + delayMs = (float) ( fullDelayNumSamplesLocal[0] ) / (float) ( delayTimeScaleLocal ); +#else IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta = NULL; +#endif if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { @@ -2013,7 +2028,9 @@ static ivas_error initOnFirstGoodFrame( for ( int16_t j = 0; j < numInitialBadFrames; ++j ) { +#ifndef NONBE_FIX_1261_MASA_EXT_META_JBM float delayMs = (float) ( pFullDelayNumSamples[0] ) / (float) ( *delayTimeScale ); +#endif if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) ); diff --git a/lib_com/options.h b/lib_com/options.h index f6aaeba759675fcca726323c94a1e41ea93b48da..716dc78ddb90255a300ee47aa413761c25f9c108 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -172,7 +172,9 @@ #define NONBE_1217_OBJ_EDIT_FOA /* VA/Nokia: isse 1217: fix crash in object editing to FOA output in ParamISM */ #define NONBE_1215_FIX_JBM_MAX_SCALING /* FhG: issue 1215: Fix assert hit in a specific VoIP decoder config. Caused by integer overflow in max scaling calculation. */ #define NONBE_FIX_1255_OBJ_EDIT_JBM /* VA: issue 1255: restore object editing in JBM */ - +#define NONBE_FIX_1189_GSC_IVAS_OMASA /* VA: Fix for issue 1189: Bitstream desynchornization due to reading/writing of the GSC_IVAS_mode parameter */ +#define NONBE_1214_PLC_LSF_MEMORY /* VA: issue 1224: reset ACELP PLC FEC memory in case of switching from MDCT stereo to TD/DFT stereo */ +#define NONBE_FIX_1261_MASA_EXT_META_JBM /* Nokia: issue #1261: MASA metadata EXT output delay buffer init in JBM */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index 4ac0e098bebe0dee16617f49b5a868bfdd271ce5..0bba174b7c86a50d36add26f440d896ea88ba5b3 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -483,7 +483,11 @@ ivas_error acelp_core_dec( if ( st->element_mode > EVS_MONO && st->idchan == 0 && !( st->core_brate == FRAME_NO_DATA || st->core_brate == SID_2k40 ) && !tdm_low_rate_mode ) { +#ifdef NONBE_FIX_1189_GSC_IVAS_OMASA + if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && st->inactive_coder_type_flag ) ) +#else if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && st->total_brate <= MAX_GSC_INACTIVE_BRATE ) ) +#endif { st->GSC_IVAS_mode = get_next_indice( st, 2 ); } diff --git a/lib_dec/core_switching_dec.c b/lib_dec/core_switching_dec.c index c15a165989db764a8a59e7f68ece3698c26a9bfb..686e5926db5f82aa617ebd2899cb95431335e927 100644 --- a/lib_dec/core_switching_dec.c +++ b/lib_dec/core_switching_dec.c @@ -263,8 +263,14 @@ ivas_error core_switching_pre_dec( st->uv_count = 0; } +#ifdef NONBE_1214_PLC_LSF_MEMORY + if ( ( ( st->core == ACELP_CORE || st->core == AMR_WB_CORE ) && st->last_core == HQ_CORE ) /* EVS and HQ -> ACELP */ || + ( ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD || ( st->element_mode == IVAS_CPE_MDCT && last_element_mode == IVAS_CPE_DFT ) ) && nchan_out == 2 && st->core_brate != SID_2k40 && st->core_brate != FRAME_NO_DATA && ( last_core_brate_st0 == FRAME_NO_DATA || last_core_brate_st0 == SID_2k40 ) ) || + ( st->core == ACELP_CORE && st->last_L_frame > L_FRAME16k ) /* TCX @ 25.6/32 kHz -> ACELP */ ) +#else if ( ( ( st->core == ACELP_CORE || st->core == AMR_WB_CORE ) && st->last_core == HQ_CORE ) || ( ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD || ( st->element_mode == IVAS_CPE_MDCT && last_element_mode == IVAS_CPE_DFT ) ) && nchan_out == 2 && st->core_brate != SID_2k40 && st->core_brate != FRAME_NO_DATA && ( last_core_brate_st0 == FRAME_NO_DATA || last_core_brate_st0 == SID_2k40 ) ) ) +#endif { if ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD ) { diff --git a/lib_enc/core_switching_enc.c b/lib_enc/core_switching_enc.c index acc45973e9134164c75879d3467779e6fe22d7ce..c4a8f8bd52514f2b160df3e0109c2e8ded59fe03 100644 --- a/lib_enc/core_switching_enc.c +++ b/lib_enc/core_switching_enc.c @@ -171,7 +171,13 @@ void core_switching_pre_enc( st->uv_count = 0; } +#ifdef NONBE_1214_PLC_LSF_MEMORY + if ( ( ( st->core == ACELP_CORE || st->core == AMR_WB_CORE ) && st->last_core == HQ_CORE ) /* EVS and HQ -> ACELP */ || + ( ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD || ( st->element_mode == IVAS_CPE_MDCT && last_element_mode == IVAS_CPE_DFT ) ) && active_cnt == 1 ) || + ( st->core == ACELP_CORE && st->last_L_frame > L_FRAME16k ) /* TCX @ 25.6/32 kHz -> ACELP */ ) +#else if ( ( ( st->core == ACELP_CORE || st->core == AMR_WB_CORE ) && st->last_core == HQ_CORE ) || ( ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD || ( st->element_mode == IVAS_CPE_MDCT && last_element_mode == IVAS_CPE_DFT ) ) && active_cnt == 1 ) ) +#endif { /* Reset the ACELP core in case of HQ->ACELP core switching */ diff --git a/tests/test_enc_passthrough.py b/tests/test_enc_passthrough.py index be9b7909fdbd3e148c3a695ee2bdc94ccbca6f55..17bd6cb8aa507403e3916c1d93ac267d16e6ddd8 100644 --- a/tests/test_enc_passthrough.py +++ b/tests/test_enc_passthrough.py @@ -32,92 +32,137 @@ __doc__ = """ Execute tests specified via a parameter file. """ import pytest +import glob +from pathlib import Path from tests.codec_be_on_mr_nonselection.test_param_file import run_test from tests.conftest import DecoderFrontend, EncoderFrontend -from tests.constants import SCRIPTS_DIR -import os.path - -BITRATES = [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000, 384000, 512000] -BW = [16, 32, 48] - -FORMAT = [ - ("STEREO","-stereo","stvST{bw}c.wav","STEREO"), - ("SBA1","-sba 1", "stvFOA{bw}c.wav","FOA"), - ("SBA2","-sba 2", "stv2OA{bw}c.wav","HOA2"), - ("SBA3","-sba 3", "stv3OA{bw}c.wav","HOA3"), - ("MC-5_1","-mc 5_1", "stv51MC{bw}c.wav","5_1"), - ("MC-5_1_2","-mc 5_1_2", "stv512MC{bw}c.wav","5_1_2"), - ("MC-5_1_4","-mc 5_1_4", "stv514MC{bw}c.wav","5_1_4"), - ("MC-7_1","-mc 7_1", "stv71MC{bw}c.wav","7_1"), - ("MC-7_1_4","-mc 7_1_4", "stv714MC{bw}c.wav","7_1_4"), - ("ISM1","-ism 1 testv/stvISM1.csv", "stv1ISM{bw}s.wav","EXT"), - ("ISM2","-ism 2 testv/stvISM1.csv testv/stvISM2.csv", "stv2ISM{bw}s.wav","EXT"), - ("ISM3","-ism 3 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv", "stv3ISM{bw}s.wav","EXT"), - ("ISM4","-ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv", "stv4ISM{bw}s.wav","EXT"), - ("MASA1-1Dir","-masa 1 testv/stv1MASA1TC48c.met","stv1MASA1TC{bw}c.wav","EXT"), - ("MASA1-2Dir","-masa 1 testv/stv2MASA1TC48c.met","stv2MASA1TC{bw}c.wav","EXT"), - ("MASA2-1Dir","-masa 2 testv/stv1MASA2TC48c.met","stv1MASA2TC{bw}c.wav","EXT"), - ("MASA2-2Dir","-masa 2 testv/stv2MASA2TC48c.met","stv2MASA2TC{bw}c.wav","EXT"), - ("OMASA-1-1-1Dir","-ism_masa 1 1 testv/stvISM1.csv testv/stv1MASA1TC48c.met","stvOMASA_1ISM_1MASA1TC{bw}c.wav","BINAURAL"), - ("OMASA-2-1-1Dir","-ism_masa 2 1 testv/stvISM1.csv testv/stvISM2.csv testv/stv1MASA1TC48c.met","stvOMASA_2ISM_1MASA1TC{bw}c.wav","BINAURAL"), - ("OMASA-3-1-1Dir","-ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA1TC48c.met","stvOMASA_3ISM_1MASA1TC{bw}c.wav","BINAURAL"), - ("OMASA-4-1-1Dir","-ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA1TC48c.met","stvOMASA_4ISM_1MASA1TC{bw}c.wav","BINAURAL"), - ("OMASA-1-2-1Dir","-ism_masa 1 2 testv/stvISM1.csv testv/stv1MASA2TC48c.met","stvOMASA_1ISM_1MASA2TC{bw}c.wav","BINAURAL"), - ("OMASA-2-2-1Dir","-ism_masa 2 2 testv/stvISM1.csv testv/stvISM2.csv testv/stv1MASA2TC48c.met","stvOMASA_2ISM_1MASA2TC{bw}c.wav","BINAURAL"), - ("OMASA-3-2-1Dir","-ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA2TC48c.met","stvOMASA_3ISM_1MASA2TC{bw}c.wav","BINAURAL"), - ("OMASA-4-2-1Dir","-ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA2TC48c.met","stvOMASA_4ISM_1MASA2TC{bw}c.wav","BINAURAL"), - ("OMASA-1-1-2Dir","-ism_masa 1 1 testv/stvISM1.csv testv/stv2MASA1TC48c.met","stvOMASA_1ISM_2MASA1TC{bw}c.wav","BINAURAL"), - ("OMASA-2-1-2Dir","-ism_masa 2 1 testv/stvISM1.csv testv/stvISM2.csv testv/stv2MASA1TC48c.met","stvOMASA_2ISM_2MASA1TC{bw}c.wav","BINAURAL"), - ("OMASA-3-1-2Dir","-ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA1TC48c.met","stvOMASA_3ISM_2MASA1TC{bw}c.wav","BINAURAL"), - ("OMASA-4-1-2Dir","-ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA1TC48c.met","stvOMASA_4ISM_2MASA1TC{bw}c.wav","BINAURAL"), - ("OMASA-1-2-2Dir","-ism_masa 1 2 testv/stvISM1.csv testv/stv2MASA2TC48c.met","stvOMASA_1ISM_2MASA2TC{bw}c.wav","BINAURAL"), - ("OMASA-2-2-2Dir","-ism_masa 2 2 testv/stvISM1.csv testv/stvISM2.csv testv/stv2MASA2TC48c.met","stvOMASA_2ISM_2MASA2TC{bw}c.wav","BINAURAL"), - ("OMASA-3-2-2Dir","-ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA2TC48c.met","stvOMASA_3ISM_2MASA2TC{bw}c.wav","BINAURAL"), - ("OMASA-4-2-2Dir","-ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met","stvOMASA_4ISM_2MASA2TC{bw}c.wav","BINAURAL"), - # OSBA only supported for HOA3 in ivas-float-update for now - # ("OSBA-1-1","-ism_sba 1 1 testv/stvISM1.csv","stvOSBA_1ISM_FOA{bw}c.wav", "EXT"), - # ("OSBA-2-1","-ism_sba 2 1 testv/stvISM1.csv testv/stvISM2.csv","stvOSBA_2ISM_FOA{bw}c.wav", "EXT"), - # ("OSBA-3-1","-ism_sba 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv","stvOSBA_3ISM_FOA{bw}c.wav", "EXT"), - # ("OSBA-4-1","-ism_sba 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv", "stvOSBA_4ISM_FOA{bw}c.wav", "EXT"), - # ("OSBA-1-2","-ism_sba 1 2 testv/stvISM1.csv","stvOSBA_1ISM_2OA{bw}c.wav", "EXT"), - # ("OSBA-2-2","-ism_sba 2 2 testv/stvISM1.csv testv/stvISM2.csv","stvOSBA_2ISM_2OA{bw}c.wav", "EXT"), - # ("OSBA-3-2","-ism_sba 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv","stvOSBA_3ISM_2OA{bw}c.wav", "EXT"), - # ("OSBA-4-2","-ism_sba 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv", "stvOSBA_4ISM_2OA{bw}c.wav", "EXT"), - ("OSBA-1-3","-ism_sba 1 3 testv/stvISM1.csv","stvOSBA_1ISM_3OA{bw}c.wav", "EXT"), - ("OSBA-2-3","-ism_sba 2 3 testv/stvISM1.csv testv/stvISM2.csv","stvOSBA_2ISM_3OA{bw}c.wav", "EXT"), - ("OSBA-3-3","-ism_sba 3 3 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv","stvOSBA_3ISM_3OA{bw}c.wav", "EXT"), - ("OSBA-4-3","-ism_sba 4 3 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv", "stvOSBA_4ISM_3OA{bw}c.wav", "EXT"), -] +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 = {} -for fmt, in_fmt, in_file, out_fmt in FORMAT: - for br in BITRATES: - for bw in BW: +sim_opts = "" +eid_opts = "" + +testv_files = [Path(f).name for f in glob.glob(str(TESTV_DIR.joinpath("*.wav")))] + +# Stereo +fmt = "STEREO" +in_fmt = "-stereo" +out_fmt = "STEREO" +in_file = "stvST{bw}c.wav" +for br in [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000]: + for bw in [16, 32, 48]: + tag = f"{fmt}-{br}-{bw}" + enc_opts = f"{in_fmt} {br} {bw} testv/{in_file.format(bw=bw)} bit" + dec_opts = f"{out_fmt} {bw} bit out.wav" + test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) + +# SBA +fmt = "SBA{order}" +in_fmt = "-sba {order}" +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(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) - # Filter out unsupported bitrate combinations - if fmt == "STEREO" and br > 256000: +# MC +fmt = "MC-{conf}" +in_fmt = "-mc {conf}" +out_fmt = ["5_1","5_1_2","5_1_4","7_1","7_1_4"] +in_file = ["stv51MC{bw}c.wav", "stv512MC{bw}c.wav", "stv514MC{bw}c.wav", "stv71MC{bw}c.wav", "stv714MC{bw}c.wav"] +for br in [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000, 384000, 512000]: + for bw in [32, 48]: + for c in range(len(out_fmt)): + if in_file[c].format(bw=bw) not in testv_files: continue - if fmt == "ISM1" and br > 128000: - continue - if fmt == "ISM2" and (br < 16400 or br > 256000): + tag = f"{fmt.format(conf=out_fmt[c])}-{br}-{bw}" + enc_opts = f"{in_fmt.format(conf=out_fmt[c])} {br} {bw} testv/{in_file[c].format(bw=bw)} bit" + dec_opts = f"{out_fmt[c]} {bw} bit out.wav" + test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) + +# ISM +fmt = "ISM{obj}" +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(1, NUMBER_OF_OBJECTS + 1): + if obj == 1 and br > 128000: continue - if fmt == "ISM3" and (br < 24400 or br > 384000): + if obj == 2 and (br < 16400 or br > 256000): continue - if fmt == "ISM4" and br < 24400: + if obj == 3 and (br < 24400 or br > 384000): continue - - # Filter out cases where the input file does not exist for this bandwidth - if not os.path.isfile(os.path.join(SCRIPTS_DIR, f"testv/{in_file.format(bw=bw)}")): + if obj == 4 and br < 24400: continue - - tag = f"{fmt}-{br}-{bw}" - enc_opts = f"{in_fmt} {br} {bw} testv/{in_file.format(bw=bw)} 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" - sim_opts = "" - eid_opts = "" test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) +# MASA +fmt = "MASA{tc}-{dir}Dir" +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(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) + +# OMASA +fmt = "OMASA-{obj}-{tc}-{dir}Dir" +in_fmt = "-ism_masa {obj} {tc}" +#out_fmt = "EXT" +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(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}.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) + +# OSBA +fmt = "OSBA-{obj}-{order}" +in_fmt = "-ism_sba {obj} {order}" +out_fmt = "EXT" +in_file = ["stvOSBA_{obj}ISM_FOA{bw}c.wav","stvOSBA_{obj}ISM_2OA{bw}c.wav","stvOSBA_{obj}ISM_3OA{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(1, NUMBER_OF_SBA_ORDERS + 1): + for order in [3]: # Currently only HOA3 output supported + 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-1].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) + @pytest.mark.parametrize("test_tag", list(test_dict.keys()))