diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f6648a5274afd72340ddcfafef1cf829c41926c6..595e3ed01070deb49de9800c28db120db24e42fa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -529,6 +529,8 @@ codec-smoke-test: codec-msan: extends: - .sanitizer-selftest-on-mr + tags: + - ivas-linux-fast before_script: - CLANG_NUM=1 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS @@ -1539,6 +1541,8 @@ ltv-usan: paths: - ep_015.g192 - dly_profile.dat + - head_rot_traj.csv + - exof_traj.csv - ./LOGS_PLC - ./LOGS_noPLC diff --git a/ci/create_trajectories.py b/ci/create_trajectories.py new file mode 100644 index 0000000000000000000000000000000000000000..6b957df0926bdb2f08a43727571d160ea164894a --- /dev/null +++ b/ci/create_trajectories.py @@ -0,0 +1,25 @@ +import numpy as np + + +FRAMES_PER_SEC = 50 + + +def random_trajectory(duration_sec): + n_frames = int(FRAMES_PER_SEC * duration_sec) + trj = np.random.random((n_frames, 4)) + trj[:, 0] = -3 + trj[:, 1] *= 180 + trj[:, 2] *= 90 + trj[:, 3] *= 180 + return trj + + +def constant_trajectory(duration_sec, yaw=0, pitch=0, roll=0): + n_frames = int(FRAMES_PER_SEC * duration_sec) + trj = np.empty((n_frames, 4)) + trj[:, 0] = -3 + trj[:, 1] = yaw + trj[:, 2] = pitch + trj[:, 3] = roll + return trj + diff --git a/ci/remove_unsupported_testcases.py b/ci/remove_unsupported_testcases.py index 2d23be791024309ab10469d79ef5a5e74e81fe5b..5d01fe77915b948f86717b838897edc105d9c8b0 100644 --- a/ci/remove_unsupported_testcases.py +++ b/ci/remove_unsupported_testcases.py @@ -42,9 +42,9 @@ TESTCASES = [ "OSBA FOA 2ISM at 64 kbps, 48kHz in, 48kHz out, HOA3 out, bandwidth switching", "OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, EXT out", "OSBA planar FOA 2ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL out", - "4 ISM with extended metadata at 128 kbps, 48 kHz in, 48 kHz out, BINAURAL_ROOM_REVERB out, combined render config, directivity configuration with identifiers", "OSBA planar FOA 1ISM at 256 kbps, 48 kHz in, 48 kHz out, BINAURAL out", "SBA 3OA at 128 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB combined renderer configuration with selected acoustic environment", + "OSBA FOA 4ISM at bitrate switching 13.2 to 512 kbps, 48kHz in, 16kHz out, BINAURAL out (Model from file), FER at 5%, bandwidth switching", ] diff --git a/ci/run_scheduled_sanitizer_test.py b/ci/run_scheduled_sanitizer_test.py index d8986233fb64c8129dd576eb691fa8a999870d68..65c88ee0c0c7f374919c5c5f79de914ee3422f13 100755 --- a/ci/run_scheduled_sanitizer_test.py +++ b/ci/run_scheduled_sanitizer_test.py @@ -33,6 +33,8 @@ import argparse import pathlib import subprocess import sys +import numpy as np +import json CI_SCRIPT_DIR = "./ci" sys.path.append(CI_SCRIPT_DIR) @@ -41,6 +43,8 @@ from collect_artifacts import ( find_failed_files_for_sanitizer_test, ) from combine_genpatt_and_jbm_profile import combine_error_profiles +from create_trajectories import random_trajectory + SCRIPT_DIR = pathlib.Path("./scripts").resolve() DURATION = "120" @@ -54,12 +58,23 @@ N_FRAMES_DLY_PROFILE = 7500 GENPATT_CMD = f"gen-patt -tailstat -fer -g192 -gamma 0 -rate 0.15 -tol 0.001 -reset -n {N_FRAMES_DLY_PROFILE} {EP_FILE}" MC_MODES = ["5_1", "5_1_2", "5_1_4", "7_1", "7_1_4"] AMBISONICS_MODES = ["HOA3", "HOA2", "FOA", "PlanarHOA3", "PlanarHOA2", "PlanarFOA"] -TIMEOUT = ( - 60 * 20 -) # timeout of 15 minutes per en/decoding to safeguard against endless loops +# timeout of 15 minutes per en/decoding to safeguard against endless loops +TIMEOUT = 60 * 20 +HEAD_TRAJ_FILE = str(pathlib.Path("./head_rot_traj.csv").resolve()) +EXOF_TRAJ_FILE = str(pathlib.Path("./exof_traj.csv").resolve()) CONSOLE_OUT_FILE = "output_san.txt" +HEAD_ROT_ARGS = ["-t", HEAD_TRAJ_FILE] +EXOF_ARGS = ["-exof", EXOF_TRAJ_FILE] +OTR_ARGS = ["-otr", "avg"] +BINAURAL_OUT_ARGS = HEAD_ROT_ARGS + EXOF_ARGS + OTR_ARGS +ARGS_FOR_OC = { + "BINAURAL": BINAURAL_OUT_ARGS, + "BINAURAL_ROOM_IR": BINAURAL_OUT_ARGS, + "BINAURAL_ROOM_REVERB": BINAURAL_OUT_ARGS, +} + def main(args): in_format = args.in_format @@ -112,6 +127,12 @@ def get_modes(in_format: str) -> list: return mode_list +def assemble_oc_dict(out_formats: list): + oc_dict = {of: ARGS_FOR_OC.get(of, list()) for of in out_formats} + + return json.dumps(oc_dict) + + def get_md_file_command(in_format: str) -> list: cmd = list() @@ -127,11 +148,19 @@ def get_md_file_command(in_format: str) -> list: def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = True): modes = get_modes(in_format) - md_file_command = get_md_file_command(in_format) - if len(modes) == 0: return 0 + md_file_command = get_md_file_command(in_format) + oc_str = assemble_oc_dict(out_formats) + + # create random trajectory files + if "BINAURAL" in oc_str: + trajectory_files = [HEAD_TRAJ_FILE, EXOF_TRAJ_FILE] + for tf in trajectory_files: + traj = random_trajectory(int(DURATION)) + np.savetxt(tf, traj, fmt="%.2f", delimiter=",") + ### always run encoder and decoder with no frameloss cmd_no_fec = [ str(SCRIPT_DIR.joinpath("IvasBuildAndRunChecks.py")), @@ -146,7 +175,7 @@ def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = Tr "-m", *modes, "--oc", - *out_formats, + oc_str, *md_file_command, "--usan_supp_file", USAN_SUPP_FILE, @@ -154,6 +183,12 @@ def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = Tr str(TIMEOUT), ] + # to test non-diegetic panning with mono decoding: + # resue decoder part of StereDmxEVS mode (it is basically a duplicate of "normal" mono run) + if in_format == "StereoDmxEVS": + panning = np.random.randint(-90, 91) + cmd_no_fec += [f'-D=-non_diegetic_pan {panning}'] + print( "======== Script command line WITHOUT plc: ========\n{}".format( " ".join(cmd_no_fec) diff --git a/ci/smoke_test.sh b/ci/smoke_test.sh index d08620679e805e9ec6c59c882d2b53e37bf51c01..57e3e1b154d7a9d57cacda8956ed84af04e05a3b 100755 --- a/ci/smoke_test.sh +++ b/ci/smoke_test.sh @@ -82,8 +82,8 @@ echo "\n======================= 0. preparing combined format test inputs ======= # run all modes vanilla-fashion # treat ISM modes separately because passing the metadata files to MASA modes causes crashes -ism_modes=$(./scripts/runIvasCodec.py -l | grep ^ISM) -non_ism_modes=$(./scripts/runIvasCodec.py -l | grep -v ^ISM) +ism_modes=$(./scripts/runIvasCodec.py -l | grep ISM) +non_ism_modes=$(./scripts/runIvasCodec.py -l | grep -v ISM) echo "\n======================= 1. non-ism modes no FEC =======================\n\n" ./scripts/runIvasCodec.py $verbosity_cmd -m $non_ism_modes -p $cfg $duration_arg $timeout_cmd | tee smoke_test_output.txt echo "\n======================= 2. ism modes no FEC =======================\n\n" @@ -93,29 +93,28 @@ echo "\n======================= 3. all modes with FEC =======================\n\ ./scripts/runIvasCodec.py $verbosity_cmd -p $cfg $duration_arg -f="$ep_file" --decoder_only $timeout_cmd | tee smoke_test_output_plc.txt # run JBM modes - EXT is excluded as not supported yet -# OMASA disabled for now -modes_with_no_ext_out=$(./scripts/runIvasCodec.py -l | grep -v ^MASA | grep -v ^ISM | grep -v OMASA) -modes_with_ext_out=$(./scripts/runIvasCodec.py -l | grep 'MASA\|ISM' | grep -v ^ISM+ | grep -v OMASA) +formats_with_no_ext_out=$(./scripts/runIvasCodec.py -L | grep -v MASA | grep -v ISM | grep -v OSBA) +formats_with_ext_out=$(./scripts/runIvasCodec.py -L | grep 'MASA\|ISM\|OSBA') echo "\n======================= 4. JBM, modes with no EXT =======================\n\n" -./scripts/runIvasCodec.py $verbosity_cmd -m $modes_with_no_ext_out -p $cfg $duration_arg --decoder_only --jbm_file $dly_profile $timeout_cmd | tee smoke_test_output_jbm_noEXT.txt +./scripts/runIvasCodec.py $verbosity_cmd -C $formats_with_no_ext_out -p $cfg $duration_arg --decoder_only --jbm_file $dly_profile $timeout_cmd | tee smoke_test_output_jbm_noEXT.txt echo "\n======================= 5. JBM, modes with EXT =======================\n\n" -./scripts/runIvasCodec.py $verbosity_cmd -m $modes_with_ext_out -p $cfg $duration_arg --decoder_only --jbm_file $dly_profile --oc BINAURAL BINAURAL_ROOM_IR mono stereo FOA HOA3 5_1 7_1_4 $timeout_cmd | tee -a smoke_test_output_jbm_noEXT.txt +./scripts/runIvasCodec.py $verbosity_cmd -C $formats_with_ext_out -p $cfg $duration_arg --decoder_only --jbm_file $dly_profile --oc BINAURAL BINAURAL_ROOM_IR mono stereo FOA HOA3 5_1 7_1_4 $timeout_cmd | tee -a smoke_test_output_jbm_noEXT.txt # run all modes with binaural output using external files -modes_with_bin_out="FOA HOA2 HOA3 PlanarFOA PlanarHOA2 PlanarHOA3 MASA MC ISM1 ISM2 ISM3 ISM4" +formats_with_bin_out=$(./scripts/runIvasCodec.py -L | grep -v "mono\|tereo") bin_out_modes="BINAURAL BINAURAL_ROOM_IR" echo "\n======================= 6. binaural out with HRTF files - WB =======================\n\n" -wb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _wb_) +wb_modes=$(./scripts/runIvasCodec.py -l -C $formats_with_bin_out | grep _wb_) hrtf_wb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin" ./scripts/runIvasCodec.py $verbosity_cmd -p $cfg -m $wb_modes $duration_arg -D="-hrtf ${hrtf_wb}" --decoder_only --oc $bin_out_modes $timeout_cmd | tee -a smoke_test_output_hrtf.txt echo "\n======================= 7. binaural out with HRTF files - SWB =======================\n\n" -swb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _swb_) +swb_modes=$(./scripts/runIvasCodec.py -l -C $formats_with_bin_out | grep _swb_) hrtf_swb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin" ./scripts/runIvasCodec.py $verbosity_cmd -p $cfg -m $swb_modes $duration_arg -D="-hrtf ${hrtf_swb}" --decoder_only --oc $bin_out_modes $timeout_cmd | tee -a smoke_test_output_hrtf.txt echo "\n======================= 8. binaural out with HRTF files - FB =======================\n\n" -fb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _fb_) +fb_modes=$(./scripts/runIvasCodec.py -l -C $formats_with_bin_out | grep _fb_) hrtf_fb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin" ./scripts/runIvasCodec.py $verbosity_cmd -p $cfg -m $fb_modes $duration_arg -D="-hrtf ${hrtf_fb}" --decoder_only --oc $bin_out_modes $timeout_cmd | tee -a smoke_test_output_hrtf.txt diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index b9e6c2cfda3dab838fccde7956e0ef7733c2e533..cd7a38580b4d2b26fa162c32e171844a86df262a 100755 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -1195,11 +1195,7 @@ enum #define MASA_COHERENCE_TOLERANCE 0.1f #define MASA_COHERENCE_THRESHOLD 0.1f #define MASA_RATIO_TOLERANCE 0.1f -#ifdef NONBE_FIX_1034_DRY_MASA_RATIOS #define MASA_RATIO_THRESHOLD 0.015f -#else -#define MASA_RATIO_THRESHOLD 0.1f -#endif #define MASA_ANGLE_TOLERANCE 0.5f #define MASA_LIMIT_NO_BANDS_SUR_COH 8 #define MINIMUM_BIT_BUDGET_NORMAL_META 100 diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index a191d1bf3967a79ca83e585388ea631f4cec20cd..757db691e977c89e2a7d1041ca468fe585879ec5 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -1095,13 +1095,6 @@ void ivas_param_ism_dec_close( const AUDIO_CONFIG output_config /* i : output audio configuration */ ); -#ifndef FIX_1022_REMOVE_PARAMISM_DEC -void ivas_param_ism_dec( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ -); - -#endif void ivas_ism_dec_digest_tc( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); @@ -3869,13 +3862,6 @@ void ivas_param_mc_dec_render( float *output_f[] /* o : rendered time signal */ ); -#ifndef FIX_1023_REMOVE_PARAMMC_DEC -void ivas_param_mc_dec( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ -); - -#endif /*! r: number of cldfb synthesis instances */ int16_t param_mc_get_num_cldfb_syntheses( Decoder_Struct *st_ivas /* i : IVAS decoder structure */ @@ -5218,9 +5204,7 @@ void ivas_ism_renderer_close( void ivas_ism_render_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ -#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH const RENDERER_TYPE renderer_type, /* i : active renderer type */ -#endif float *output_f[], /* i/o: core-coder transport channels/object output */ const int16_t n_samples_to_render /* i : output frame length per channel */ ); diff --git a/lib_com/options.h b/lib_com/options.h index fda3eb0d4df7e69f5225e6084a9f972b11c68153..baac6516076c16fa9fe61d9e1b1be0987de1209d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -156,19 +156,14 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ /*#define SPLIT_REND_WITH_HEAD_ROT */ /* Dlb,FhG: Split Rendering contributions 21 and 35 */ -#define FIX_1024_REMOVE_PARAMMC_MIXING_MAT /* VA: issue 1024: remove unused function ivas_param_mc_get_mono_stereo_mixing_matrices() */ -#define FIX_1023_REMOVE_PARAMMC_DEC /* VA: issue 1023: remove unused function ivas_param_mc_dec() */ -#define FIX_1022_REMOVE_PARAMISM_DEC /* VA: issue 1022: remove unused function ivas_param_ism_dec() */ +#define FIX_1033_MEMORY_LEAK_OMASA /* Nokia / Orange: issue #1033: Memory leak in OMASA to BINAURAL with HRTF with bitrate switching */ -#define FIX_1035_HT_OSBA /* Dlb: issue 1035: Issue with headtracking in OSBA*/ /* #################### End BE switches ################################## */ /* #################### Start NON-BE switches ############################ */ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ -#define NONBE_FIX_1021_ISM_BRIR_RS_FLUSH /* FhG: issue #1021: fix ISM with JBM and RS renderer flushing*/ -#define NONBE_FIX_1034_DRY_MASA_RATIOS /* Nokia: Fix issue 1034, use of wrong numDir state. */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index a624e81eee801c958a88e09dc399c3f566eb509b..21db31e81aa57a31f13c45c24532fed594afe046 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -1122,11 +1122,7 @@ ivas_error ivas_binRenderer_open( /* Define of head rotation has to be done in binRendeder in CLDFB*/ hBinRenderer->rotInCldfb = 0; -#ifdef FIX_1035_HT_OSBA if ( st_ivas->ivas_format == MC_FORMAT || st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT ) -#else - if ( st_ivas->ivas_format == MC_FORMAT || st_ivas->ivas_format == SBA_FORMAT ) -#endif { hBinRenderer->rotInCldfb = 1; } diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 9337ccb08a0a1313e7a5fbb9474ad1226874d0c6..2e3720c9493acc638d2a74fa3dddd735eaf2e003 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -324,44 +324,6 @@ static void ivas_param_ism_render_slot( return; } -#ifndef FIX_1022_REMOVE_PARAMISM_DEC -static void ivas_param_ism_rendering( - PARAM_ISM_DEC_HANDLE hParamIsmDec, - SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, - float Cldfb_RealBuffer_in[PARAM_ISM_MAX_DMX][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float Cldfb_ImagBuffer_in[PARAM_ISM_MAX_DMX][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float Cldfb_RealBuffer[PARAM_ISM_MAX_CHAN][4][CLDFB_NO_CHANNELS_MAX], - float Cldfb_ImagBuffer[PARAM_ISM_MAX_CHAN][4][CLDFB_NO_CHANNELS_MAX], - float mixing_matrix[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_CHAN * PARAM_ISM_MAX_DMX], - const int16_t out_slot_idx, - const int16_t slot_idx, - const int16_t num_ch_LS, - const int16_t nchan_transport ) -{ - int16_t outchIdx, inchIdx, bin_idx; - float tmp_1, mixing_matrix_smooth; - - tmp_1 = hParamIsmDec->hParamIsmRendering->interpolator[slot_idx]; - - for ( bin_idx = 0; bin_idx < hSpatParamRendCom->num_freq_bands; bin_idx++ ) - { - /* smooth the mixing matrix */ - for ( outchIdx = 0; outchIdx < num_ch_LS; outchIdx++ ) - { - for ( inchIdx = 0; inchIdx < nchan_transport; inchIdx++ ) - { - mixing_matrix_smooth = tmp_1 * mixing_matrix[bin_idx][outchIdx + inchIdx * num_ch_LS] + - ( 1 - tmp_1 ) * hParamIsmDec->hParamIsmRendering->mixing_matrix_lin_old[bin_idx][outchIdx + inchIdx * num_ch_LS]; - - Cldfb_RealBuffer[outchIdx][out_slot_idx][bin_idx] += mixing_matrix_smooth * Cldfb_RealBuffer_in[inchIdx][slot_idx][bin_idx]; - Cldfb_ImagBuffer[outchIdx][out_slot_idx][bin_idx] += mixing_matrix_smooth * Cldfb_ImagBuffer_in[inchIdx][slot_idx][bin_idx]; - } - } - } - - return; -} -#endif static ivas_error ivas_param_ism_rendering_init( PARAM_ISM_RENDERING_HANDLE hParamIsmRendering, @@ -729,251 +691,6 @@ void ivas_param_ism_dec_close( return; } -#ifndef FIX_1022_REMOVE_PARAMISM_DEC -/*-------------------------------------------------------------------------* - * ivas_param_ism_dec() - * - * Param ISM decoder - *-------------------------------------------------------------------------*/ - -void ivas_param_ism_dec( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output*/ -) -{ - int16_t ch, nchan_transport, nchan_out, nchan_out_woLFE, i; - int16_t subframe_idx, slot_idx, index_slot, bin_idx; - int32_t ivas_total_brate; - int16_t output_frame; - float *p_tc[PARAM_ISM_MAX_DMX]; - float ref_power[CLDFB_NO_CHANNELS_MAX]; - float cx_diag[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_DMX]; - /* CLDFB Input Buffers */ - float Cldfb_RealBuffer_in[PARAM_ISM_MAX_DMX][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - float Cldfb_ImagBuffer_in[PARAM_ISM_MAX_DMX][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - - /* CLDFB Output Buffers */ - float Cldfb_RealBuffer[PARAM_ISM_MAX_CHAN][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; - float Cldfb_ImagBuffer[PARAM_ISM_MAX_CHAN][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; - - /* Direct Response/EFAP Gains */ - float direct_response[MAX_NUM_OBJECTS][PARAM_ISM_MAX_CHAN]; - - /* Covariance Rendering */ - float mixing_matrix[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_CHAN * PARAM_ISM_MAX_DMX]; - - PARAM_ISM_DEC_HANDLE hParamIsmDec; - SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; - - IVAS_OUTPUT_SETUP hSetup; - - /* Initialization */ - hParamIsmDec = st_ivas->hParamIsmDec; - assert( hParamIsmDec ); - hSpatParamRendCom = st_ivas->hSpatParamRendCom; - assert( hSpatParamRendCom ); - for ( i = 0; i < PARAM_ISM_MAX_DMX; i++ ) - { - p_tc[i] = output_f[i]; - } - output_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); - - nchan_transport = st_ivas->nchan_transport; - if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) - { - nchan_out = st_ivas->nchan_ism; - nchan_out_woLFE = nchan_out; - st_ivas->hDecoderConfig->nchan_out = nchan_out; - } - else - { - nchan_out = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; - nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; - } - - ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; - - hSetup = st_ivas->hIntSetup; - - push_wmops( "ivas_param_ism_dec" ); - - /* set buffers to zero */ - for ( bin_idx = 0; bin_idx < CLDFB_NO_CHANNELS_MAX; bin_idx++ ) - { - set_zero( cx_diag[bin_idx], PARAM_ISM_MAX_DMX ); - } - set_zero( ref_power, CLDFB_NO_CHANNELS_MAX ); - - /* Frame-level Processing */ - /* De-quantization */ - if ( !( ivas_total_brate == IVAS_SID_5k2 || ivas_total_brate == FRAME_NO_DATA ) ) - { - ivas_param_ism_dec_dequant_DOA( hParamIsmDec, st_ivas->nchan_ism ); - ivas_param_ism_dec_dequant_powrat( hParamIsmDec ); - st_ivas->hISMDTX.dtx_flag = 0; - } - else - { - st_ivas->hISMDTX.dtx_flag = 1; - } - - /* obtain the direct response using EFAP */ - if ( !( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) ) - { - for ( i = 0; i < st_ivas->nchan_ism; i++ ) - { - efap_determine_gains( st_ivas->hEFAPdata, direct_response[i], hParamIsmDec->azimuth_values[i], hParamIsmDec->elevation_values[i], EFAP_MODE_EFAP ); - } - } - else - { - int16_t j; - - for ( i = 0; i < st_ivas->nchan_ism; i++ ) - { - for ( j = 0; j < nchan_out_woLFE; j++ ) - { - if ( i == j ) - { - direct_response[i][j] = 1.0f; - } - else - { - direct_response[i][j] = 0.0f; - } - } - } - - for ( j = 0; j < nchan_out_woLFE; j++ ) - { - if ( hParamIsmDec->azimuth_values[j] > 0.0f ) - { - hParamIsmDec->hParamIsmRendering->proto_matrix[j] = 1.0f; - hParamIsmDec->hParamIsmRendering->proto_matrix[nchan_out_woLFE + j] = 0.0f; - } - else - { - if ( hParamIsmDec->azimuth_values[j] < 0.0f ) - { - hParamIsmDec->hParamIsmRendering->proto_matrix[j] = 0.0f; - hParamIsmDec->hParamIsmRendering->proto_matrix[nchan_out_woLFE + j] = 1.0f; - } - else /* == 0.0f */ - { - hParamIsmDec->hParamIsmRendering->proto_matrix[j] = 0.5f; - hParamIsmDec->hParamIsmRendering->proto_matrix[nchan_out_woLFE + j] = 0.5f; - } - } - } - } - - ivas_ism_param_dec_tc_gain_ajust( st_ivas, output_frame, output_frame / 2, p_tc ); - - for ( ch = 0; ch < nchan_transport; ch++ ) - { - /* CLDFB Analysis */ - for ( slot_idx = 0; slot_idx < CLDFB_NO_COL_MAX; slot_idx++ ) - { - cldfbAnalysis_ts( &( output_f[ch][hSpatParamRendCom->num_freq_bands * slot_idx] ), Cldfb_RealBuffer_in[ch][slot_idx], Cldfb_ImagBuffer_in[ch][slot_idx], hSpatParamRendCom->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); - - ivas_param_ism_collect_slot( hParamIsmDec, Cldfb_RealBuffer_in[ch][slot_idx], Cldfb_ImagBuffer_in[ch][slot_idx], ch, ref_power, cx_diag ); - } - } - - /* Obtain Mixing Matrix on a frame-level */ - for ( bin_idx = 0; bin_idx < hSpatParamRendCom->num_freq_bands; bin_idx++ ) - { - set_f( mixing_matrix[bin_idx], 0.0f, nchan_transport * nchan_out_woLFE ); - } - - /* Compute mixing matrix */ - ivas_param_ism_compute_mixing_matrix( st_ivas->nchan_ism, hParamIsmDec, st_ivas->hISMDTX, direct_response, nchan_transport, nchan_out_woLFE, cx_diag, ref_power, mixing_matrix ); - - /* subframe loop for synthesis*/ - for ( subframe_idx = 0; subframe_idx < hSpatParamRendCom->nb_subframes; subframe_idx++ ) - { - uint16_t slot_idx_start = subframe_idx * hSpatParamRendCom->subframe_nbslots[subframe_idx]; - uint16_t idx_in; - uint16_t idx_lfe; - - /* Set some memories to zero */ - for ( ch = 0; ch < nchan_out_woLFE; ch++ ) - { - for ( slot_idx = 0; slot_idx < hSpatParamRendCom->subframe_nbslots[subframe_idx]; slot_idx++ ) - { - set_f( Cldfb_RealBuffer[ch][slot_idx], 0.0f, hSpatParamRendCom->num_freq_bands ); - set_f( Cldfb_ImagBuffer[ch][slot_idx], 0.0f, hSpatParamRendCom->num_freq_bands ); - } - } - - for ( slot_idx = 0; slot_idx < hSpatParamRendCom->subframe_nbslots[subframe_idx]; slot_idx++ ) - { - index_slot = slot_idx_start + slot_idx; - - /* Compute bandwise rendering to target LS using covariance rendering */ - ivas_param_ism_rendering( hParamIsmDec, hSpatParamRendCom, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, - Cldfb_RealBuffer, Cldfb_ImagBuffer, mixing_matrix, slot_idx, index_slot, - nchan_out_woLFE, nchan_transport ); - } - - /* CLDFB Synthesis */ - idx_in = 0; - idx_lfe = 0; - - for ( ch = 0; ch < nchan_out; ch++ ) - { - if ( ( hSetup.num_lfe > 0 ) && ( hSetup.index_lfe[idx_lfe] == ch ) ) - { - set_zero( &( output_f[ch][slot_idx_start * hSpatParamRendCom->num_freq_bands] ), hSpatParamRendCom->subframe_nbslots[subframe_idx] * hSpatParamRendCom->num_freq_bands ); - if ( idx_lfe < ( hSetup.num_lfe - 1 ) ) - { - idx_lfe++; - } - } - else - { - float *RealBuffer[16]; - float *ImagBuffer[16]; - - /* open CLDFB buffer up to CLDFB_NO_CHANNELS_MAX bands for 48kHz */ - for ( i = 0; i < hSpatParamRendCom->subframe_nbslots[subframe_idx]; i++ ) - { - RealBuffer[i] = Cldfb_RealBuffer[idx_in][i]; - ImagBuffer[i] = Cldfb_ImagBuffer[idx_in][i]; - } - - cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][slot_idx_start * hSpatParamRendCom->num_freq_bands] ), - hSpatParamRendCom->num_freq_bands * hSpatParamRendCom->subframe_nbslots[subframe_idx], st_ivas->cldfbSynDec[ch] ); - - idx_in++; - } - } - } - - /* copy the memories */ - /* store mixing matrix for next subframe */ - ivas_param_ism_update_mixing_matrix( hParamIsmDec, mixing_matrix, nchan_transport, nchan_out_woLFE ); - - /* store MetaData parameters */ - for ( ch = 0; ch < st_ivas->nchan_ism; ch++ ) - { - if ( st_ivas->hParamIsmDec->azimuth_values[ch] > 180.0f ) - { - st_ivas->hIsmMetaData[ch]->azimuth = st_ivas->hParamIsmDec->azimuth_values[ch] - 360.0f; - } - else - { - st_ivas->hIsmMetaData[ch]->azimuth = st_ivas->hParamIsmDec->azimuth_values[ch]; - } - - st_ivas->hIsmMetaData[ch]->elevation = st_ivas->hParamIsmDec->elevation_values[ch]; - } - - pop_wmops(); - - return; -} -#endif /*-------------------------------------------------------------------------* * ivas_ism_dec_digest_tc() @@ -1533,94 +1250,69 @@ void ivas_param_ism_params_to_masa_param_mapping( st_ivas->hISMDTX.dtx_flag = 1; } -#ifndef FIX_1022_REMOVE_PARAMISM_DEC - if ( st_ivas->nchan_ism > 1 ) + if ( st_ivas->hISMDTX.dtx_flag ) { -#endif - if ( st_ivas->hISMDTX.dtx_flag ) - { - float energy_ratio; - energy_ratio = powf( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence, 2.0f ); + float energy_ratio; + energy_ratio = powf( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence, 2.0f ); - hSpatParamRendCom->numSimultaneousDirections = 1; - azimuth[0] = (int16_t) roundf( hParamIsmDec->azimuth_values[0] ); - elevation[0] = (int16_t) roundf( hParamIsmDec->elevation_values[0] ); + hSpatParamRendCom->numSimultaneousDirections = 1; + azimuth[0] = (int16_t) roundf( hParamIsmDec->azimuth_values[0] ); + elevation[0] = (int16_t) roundf( hParamIsmDec->elevation_values[0] ); - for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) + for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) + { + for ( bin_idx = 0; bin_idx < nBins; bin_idx++ ) { - for ( bin_idx = 0; bin_idx < nBins; bin_idx++ ) - { - hSpatParamRendCom->azimuth[sf_idx][bin_idx] = azimuth[0]; - hSpatParamRendCom->elevation[sf_idx][bin_idx] = elevation[0]; + hSpatParamRendCom->azimuth[sf_idx][bin_idx] = azimuth[0]; + hSpatParamRendCom->elevation[sf_idx][bin_idx] = elevation[0]; - hSpatParamRendCom->energy_ratio1[sf_idx][bin_idx] = energy_ratio; + hSpatParamRendCom->energy_ratio1[sf_idx][bin_idx] = energy_ratio; - hSpatParamRendCom->spreadCoherence[sf_idx][bin_idx] = 0.0f; - hSpatParamRendCom->surroundingCoherence[sf_idx][bin_idx] = 0.0; - } + hSpatParamRendCom->spreadCoherence[sf_idx][bin_idx] = 0.0f; + hSpatParamRendCom->surroundingCoherence[sf_idx][bin_idx] = 0.0; } } - else + } + else + { + hSpatParamRendCom->numSimultaneousDirections = 2; + for ( band_idx = 0; band_idx < hParamIsmDec->hParamIsm->nbands; band_idx++ ) { - hSpatParamRendCom->numSimultaneousDirections = 2; - for ( band_idx = 0; band_idx < hParamIsmDec->hParamIsm->nbands; band_idx++ ) - { - brange[0] = hParamIsmDec->hParamIsm->band_grouping[band_idx]; - brange[1] = hParamIsmDec->hParamIsm->band_grouping[band_idx + 1]; - - azimuth[0] = (int16_t) roundf( hParamIsmDec->azimuth_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][0]] ); - elevation[0] = (int16_t) roundf( hParamIsmDec->elevation_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][0]] ); - power_ratio[0] = hParamIsmDec->power_ratios[band_idx][0][0]; + brange[0] = hParamIsmDec->hParamIsm->band_grouping[band_idx]; + brange[1] = hParamIsmDec->hParamIsm->band_grouping[band_idx + 1]; - azimuth[1] = (int16_t) roundf( hParamIsmDec->azimuth_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][1]] ); - elevation[1] = (int16_t) roundf( hParamIsmDec->elevation_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][1]] ); - power_ratio[1] = hParamIsmDec->power_ratios[band_idx][0][1]; + azimuth[0] = (int16_t) roundf( hParamIsmDec->azimuth_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][0]] ); + elevation[0] = (int16_t) roundf( hParamIsmDec->elevation_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][0]] ); + power_ratio[0] = hParamIsmDec->power_ratios[band_idx][0][0]; - for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) - { - for ( bin_idx = brange[0]; bin_idx < brange[1]; bin_idx++ ) - { - hSpatParamRendCom->azimuth[sf_idx][bin_idx] = azimuth[0]; - hSpatParamRendCom->elevation[sf_idx][bin_idx] = elevation[0]; - hSpatParamRendCom->energy_ratio1[sf_idx][bin_idx] = power_ratio[0]; - hSpatParamRendCom->azimuth2[sf_idx][bin_idx] = azimuth[1]; - hSpatParamRendCom->elevation2[sf_idx][bin_idx] = elevation[1]; - hSpatParamRendCom->energy_ratio2[sf_idx][bin_idx] = power_ratio[1]; - } - } - } + azimuth[1] = (int16_t) roundf( hParamIsmDec->azimuth_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][1]] ); + elevation[1] = (int16_t) roundf( hParamIsmDec->elevation_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][1]] ); + power_ratio[1] = hParamIsmDec->power_ratios[band_idx][0][1]; for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { - for ( bin_idx = 0; bin_idx < nBins; bin_idx++ ) + for ( bin_idx = brange[0]; bin_idx < brange[1]; bin_idx++ ) { - hSpatParamRendCom->spreadCoherence[sf_idx][bin_idx] = 0.0f; - hSpatParamRendCom->spreadCoherence2[sf_idx][bin_idx] = 0.0f; - hSpatParamRendCom->surroundingCoherence[sf_idx][bin_idx] = 0.0; + hSpatParamRendCom->azimuth[sf_idx][bin_idx] = azimuth[0]; + hSpatParamRendCom->elevation[sf_idx][bin_idx] = elevation[0]; + hSpatParamRendCom->energy_ratio1[sf_idx][bin_idx] = power_ratio[0]; + hSpatParamRendCom->azimuth2[sf_idx][bin_idx] = azimuth[1]; + hSpatParamRendCom->elevation2[sf_idx][bin_idx] = elevation[1]; + hSpatParamRendCom->energy_ratio2[sf_idx][bin_idx] = power_ratio[1]; } } } -#ifndef FIX_1022_REMOVE_PARAMISM_DEC - } - else - { - hSpatParamRendCom->numSimultaneousDirections = 1; - azimuth[0] = (int16_t) roundf( hParamIsmDec->azimuth_values[0] ); - elevation[0] = (int16_t) roundf( hParamIsmDec->elevation_values[0] ); for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { for ( bin_idx = 0; bin_idx < nBins; bin_idx++ ) { - hSpatParamRendCom->azimuth[sf_idx][bin_idx] = azimuth[0]; - hSpatParamRendCom->elevation[sf_idx][bin_idx] = elevation[0]; - hSpatParamRendCom->energy_ratio1[sf_idx][bin_idx] = 1.0f; hSpatParamRendCom->spreadCoherence[sf_idx][bin_idx] = 0.0f; + hSpatParamRendCom->spreadCoherence2[sf_idx][bin_idx] = 0.0f; hSpatParamRendCom->surroundingCoherence[sf_idx][bin_idx] = 0.0; } } } -#endif return; } diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 33e05a0e6a99c67be570a43642640a1e520fa0af..b890dd98e5c64f778d5a9a2e0b3f7b146210b313 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -140,12 +140,10 @@ void ivas_ism_renderer_close( *-------------------------------------------------------------------------*/ void ivas_ism_render_sf( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ -#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const RENDERER_TYPE renderer_type, /* i : active renderer type */ -#endif - float *output_f[], /* i/o: core-coder transport channels/object output */ - const int16_t n_samples_to_render /* i : output frame length per channel */ + float *output_f[], /* i/o: core-coder transport channels/object output */ + const int16_t n_samples_to_render /* i : output frame length per channel */ ) { int16_t i, j, k, j2; @@ -175,15 +173,7 @@ void ivas_ism_render_sf( assert( slots_to_render == 0 ); assert( last_sf <= st_ivas->hTcBuffer->nb_subframes ); #endif -#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH num_objects = st_ivas->nchan_ism; -#else - num_objects = st_ivas->nchan_transport; - if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) - { - num_objects = st_ivas->nchan_ism; - } -#endif nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; @@ -288,11 +278,7 @@ void ivas_ism_render_sf( n_samples_rendered_loop += n_samples_in_subframe; /* update rendered subframe and slots info for all cases apart from a following crend call, the update will then happen in the crend call*/ -#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH if ( renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) -#else - if ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) -#endif { st_ivas->hTcBuffer->subframes_rendered += 1; st_ivas->hTcBuffer->slots_rendered += st_ivas->hTcBuffer->subframe_nbslots[subframe_idx]; diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 1c550fa68f77e49e5bbbdaad70db6bcdfdbe2d80..e022c35212e5038879dd5778103497da82ce5103 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1093,11 +1093,7 @@ ivas_error ivas_jbm_dec_render( if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ -#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH ivas_ism_render_sf( st_ivas, st_ivas->renderer_type, p_output, *nSamplesRendered ); -#else - ivas_ism_render_sf( st_ivas, p_output, *nSamplesRendered ); -#endif } else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { @@ -1235,11 +1231,7 @@ ivas_error ivas_jbm_dec_render( } /* render objects */ -#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH ivas_ism_render_sf( st_ivas, st_ivas->renderer_type, p_output, *nSamplesRendered ); -#else - ivas_ism_render_sf( st_ivas, p_output, *nSamplesRendered ); -#endif /* add already rendered SBA part */ for ( n = 0; n < nchan_out; n++ ) @@ -1636,11 +1628,7 @@ ivas_error ivas_jbm_dec_flush_renderer( /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ set_f( st_ivas->hIsmRendererData->interpolator, 1.0f, hTcBuffer->n_samples_granularity ); -#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH ivas_ism_render_sf( st_ivas, renderer_type_old, p_output, hTcBuffer->n_samples_granularity ); -#else - ivas_ism_render_sf( st_ivas, p_output, hTcBuffer->n_samples_granularity ); -#endif #if defined SPLIT_REND_WITH_HEAD_ROT if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, IVAS_AUDIO_CONFIG_7_1_4, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR, st_ivas->hDecoderConfig, NULL, diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 21bdcfb85685db3d9740dc9444db27b046d734e2..4e709162129b182f9db51afe4e8aa26758016e30 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -88,10 +88,6 @@ static void ivas_param_mc_dequantize_cov( PARAM_MC_DEC_HANDLE hDirAC, float *ild static void ivas_param_mc_get_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, IVAS_OUTPUT_SETUP *hSynthesisOutputSetup, float Cx_in[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], float *mixing_matrix[], float *mixing_matrix_res[], const int16_t nY_int, const PARAM_MC_SYNTHESIS_CONF synth_conf, const int16_t nX, const int16_t nY ); -#ifndef FIX_1024_REMOVE_PARAMMC_MIXING_MAT -static void ivas_param_mc_get_mono_stereo_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, float Cx_in[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], float *mixing_matrix[], float *mixing_matrix_res[], const int16_t nY_intern, const int16_t nX, const int16_t nY_cov ); - -#endif static void param_mc_update_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, float *mixing_matrix[], float *mixing_matrix_res[], const uint16_t nX, const uint16_t nY ); static void ivas_param_mc_dec_compute_interpolator( const uint16_t bAttackPresent, const uint16_t attackPos, const uint16_t interp_length, float *interpolator ); @@ -1456,19 +1452,8 @@ void ivas_param_mc_dec_digest_tc( } -#ifndef FIX_1024_REMOVE_PARAMMC_MIXING_MAT - if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) - { - ivas_param_mc_get_mono_stereo_mixing_matrices( hParamMC, cx, hParamMC->h_output_synthesis_cov_state.mixing_matrix, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res, nchan_out_transport, nchan_transport, nchan_out_cov ); - } - else - { -#endif - /* generate mixing matrices */ - ivas_param_mc_get_mixing_matrices( hParamMC, hSynthesisOutputSetup, cx, hParamMC->h_output_synthesis_cov_state.mixing_matrix, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res, nchan_out_transport, hParamMC->synthesis_conf, nchan_transport, nchan_out_cov ); -#ifndef FIX_1024_REMOVE_PARAMMC_MIXING_MAT - } -#endif + /* generate mixing matrices */ + ivas_param_mc_get_mixing_matrices( hParamMC, hSynthesisOutputSetup, cx, hParamMC->h_output_synthesis_cov_state.mixing_matrix, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res, nchan_out_transport, hParamMC->synthesis_conf, nchan_transport, nchan_out_cov ); pop_wmops(); @@ -1816,48 +1801,6 @@ void ivas_param_mc_dec_render( } -#ifndef FIX_1023_REMOVE_PARAMMC_DEC -/*------------------------------------------------------------------------- - * ivas_param_mc_dec() - * - * Parametric MC decoding process - *------------------------------------------------------------------------*/ - -void ivas_param_mc_dec( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ -) -{ - PARAM_MC_DEC_HANDLE hParamMC; - float Cldfb_RealBuffer_in[PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_NSLOTS * CLDFB_NO_CHANNELS_MAX]; - float Cldfb_ImagBuffer_in[PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_NSLOTS * CLDFB_NO_CHANNELS_MAX]; - uint16_t nSamplesAsked, nSamplesAvailableNext, nSamplesRendered; - - hParamMC = st_ivas->hParamMC; - assert( hParamMC ); - push_wmops( "param_mc_dec" ); - - /* set some handle pointers to the stack buffers */ - hParamMC->Cldfb_RealBuffer_tc = Cldfb_RealBuffer_in; - hParamMC->Cldfb_ImagBuffer_tc = Cldfb_ImagBuffer_in; - - nSamplesAsked = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); - ivas_param_mc_dec_digest_tc( st_ivas, DEFAULT_JBM_CLDFB_TIMESLOTS, output_f ); - ivas_param_mc_dec_render( st_ivas, nSamplesAsked, &nSamplesRendered, &nSamplesAvailableNext, output_f ); -#ifdef DEBUGGING - assert( nSamplesRendered == nSamplesAsked ); - assert( nSamplesAvailableNext == 0 ); -#endif - - /* set handle pointers back to NULL */ - hParamMC->Cldfb_RealBuffer_tc = NULL; - hParamMC->Cldfb_ImagBuffer_tc = NULL; - - pop_wmops(); - return; -} -#endif - /*------------------------------------------------------------------------- * param_mc_dec_init() * @@ -2454,128 +2397,6 @@ static void ivas_param_mc_get_mixing_matrices( return; } -#ifndef FIX_1024_REMOVE_PARAMMC_MIXING_MAT -/*------------------------------------------------------------------------- - * ivas_param_mc_get_mono_stereo_mixing_matrices() - * - * calculate the direct and residual mixing matrices - * for mono and stereo output - *------------------------------------------------------------------------*/ - -static void ivas_param_mc_get_mono_stereo_mixing_matrices( - PARAM_MC_DEC_HANDLE hParamMC, /* i : Parametric MC handle */ - float Cx_in[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], /* i : transport channel covariance for all parameter bands */ - float *mixing_matrix[], /* o : direct mixing matrices for all parameter bands */ - float *mixing_matrix_res[], /* o : residual mixing matrices for all parameter bands */ - const int16_t nY_intern, /* i : number of channels of the transport format */ - const int16_t nX, /* i : number of transport channels */ - const int16_t nY_cov ) /* i : number of output channels */ -{ - int16_t param_band_idx; - float Cx[PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS]; - float Cy_diag[MAX_CICP_CHANNELS]; - float Cproto_diag[MAX_CICP_CHANNELS]; - float Cproto[MAX_CICP_CHANNELS * MAX_CICP_CHANNELS]; - float mat_mult_buffer1[MAX_CICP_CHANNELS * MAX_CICP_CHANNELS]; - float *Cx_state; - float *Cx_old_state; - float Cy_state[MAX_CICP_CHANNELS * MAX_CICP_CHANNELS]; - float *Cy_old_state; - int16_t nY_band; - float proto_matrix[PARAM_MC_MAX_TRANSPORT_CHANS * MAX_CICP_CHANNELS]; - uint16_t i; - - set_zero( Cproto, MAX_CICP_CHANNELS * MAX_CICP_CHANNELS ); - set_zero( mat_mult_buffer1, MAX_CICP_CHANNELS * MAX_CICP_CHANNELS ); - set_zero( proto_matrix, PARAM_MC_MAX_TRANSPORT_CHANS * MAX_CICP_CHANNELS ); - - mvr2r( hParamMC->h_output_synthesis_params.proto_matrix, proto_matrix, nY_cov * nX ); - nY_band = nY_cov; - - for ( param_band_idx = 0; param_band_idx < hParamMC->num_param_bands_synth; param_band_idx++ ) - { - float Cy_full[MAX_CICP_CHANNELS * MAX_CICP_CHANNELS]; - float mixing_matrix_woLFE[MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS]; - float Nrqq[MAX_OUTPUT_CHANNELS]; - float target_ch_ener[MAX_OUTPUT_CHANNELS]; - int16_t k, l; - float *ild_q; - - Cx_state = Cx_in[param_band_idx]; - Cx_old_state = hParamMC->h_output_synthesis_cov_state.cx_old[param_band_idx]; - Cy_old_state = hParamMC->h_output_synthesis_cov_state.cy_old[param_band_idx]; - set_zero( Nrqq, MAX_OUTPUT_CHANNELS ); - set_zero( target_ch_ener, MAX_OUTPUT_CHANNELS ); - set_zero( Cy_full, MAX_CICP_CHANNELS * MAX_CICP_CHANNELS ); - set_zero( Cy_state, MAX_CICP_CHANNELS * MAX_CICP_CHANNELS ); - set_zero( Cproto_diag, MAX_CICP_CHANNELS ); - ild_q = hParamMC->icld_q + param_band_idx * hParamMC->hMetadataPMC->ild_mapping_conf->ild_map_size_lfe; - - /*get back Nrg*/ - for ( k = 0; k < nY_intern; k++ ) - { - float ref_ener = 0.0f; - int16_t ref_channel_cnt; - int16_t ref_channel_idx; - - for ( ref_channel_cnt = 0; ref_channel_cnt < hParamMC->hMetadataPMC->ild_mapping_conf->num_ref_channels[k]; ref_channel_cnt++ ) - { - ref_channel_idx = hParamMC->hMetadataPMC->ild_mapping_conf->ref_channel_idx[k][ref_channel_cnt]; - ref_ener += Cx_state[ref_channel_idx + ref_channel_idx * nX]; - } - Nrqq[hParamMC->hMetadataPMC->ild_mapping_conf->ild_index[k]] = powf( 10.0f, ild_q[k] / 10.0f ) * hParamMC->hMetadataPMC->ild_factors[k] * ref_ener; - } - for ( k = 0; k < nY_cov; k++ ) - { - for ( l = 0; l < nY_intern; l++ ) - { - target_ch_ener[k] += hParamMC->ls_conv_dmx_matrix[k + l * nY_cov] * Nrqq[l]; - } - Cy_state[k + nY_cov * k] = target_ch_ener[k]; - } - - /* Smoothing: Sum over two buffers */ - if ( hParamMC->hMetadataPMC->bAttackPresent ) - { - /* no smoothing on attacks */ - mvr2r( Cx_state, Cx, nX * nX ); - mvr2r( Cy_state, Cy_full, nY_cov * nY_cov ); - } - else - { - /* smoothing gains are now identical to one, simply add up */ - v_add( Cx_state, Cx_old_state, Cx, nX * nX ); - v_add( Cy_state, Cy_old_state, Cy_full, nY_cov * nY_cov ); - } - - /* cov buffer update */ - mvr2r( Cx_state, Cx_old_state, nX * nX ); - mvr2r( Cy_state, Cy_old_state, nY_cov * nY_cov ); - - - matrix_product( proto_matrix, nY_band, nX, 0, Cx, nX, nX, 0, mat_mult_buffer1 ); - - matrix_product_diag( mat_mult_buffer1, nY_band, nX, 0, proto_matrix, nY_band, nX, 1, Cproto_diag ); - - /* Computing the mixing matrices */ - for ( i = 0; i < nY_band; i++ ) - { - Cy_diag[i] = Cy_full[i + nY_band * i]; - Cy_diag[i] = sqrtf( Cy_diag[i] / ( Cproto_diag[i] + EPSILON ) ); - } - - diag_matrix_product( Cy_diag, nY_band, proto_matrix, nY_band, nX, 0, mixing_matrix_woLFE ); - - mvr2r( mixing_matrix_woLFE, mixing_matrix[param_band_idx], nY_cov * nX ); - if ( hParamMC->band_grouping[param_band_idx] < hParamMC->h_output_synthesis_params.max_band_decorr ) - { - set_zero( mixing_matrix_res[param_band_idx], nY_cov * nY_cov ); - } - } - - return; -} -#endif /*------------------------------------------------------------------------- * param_mc_update_mixing_matrices() diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 1df83b0ce57feeca4685e83bbccb1472a060b9dc..e0ef92ecfc602e444bf47164fe023fe9f8b22962 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1210,8 +1210,15 @@ static ivas_error ivas_mc_dec_reconfig( if ( st_ivas->hBinRendererTd != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD ) ) { - ivas_td_binaural_close( &st_ivas->hBinRendererTd ); - st_ivas->hHrtfTD = NULL; +#ifdef FIX_1033_MEMORY_LEAK_OMASA + if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE ) + { +#endif + ivas_td_binaural_close( &st_ivas->hBinRendererTd ); + st_ivas->hHrtfTD = NULL; +#ifdef FIX_1033_MEMORY_LEAK_OMASA + } +#endif } #ifdef SPLIT_REND_WITH_HEAD_ROT diff --git a/lib_dec/ivas_omasa_dec.c b/lib_dec/ivas_omasa_dec.c index 763c37a709d4613370a1c4a0b6fd01dd9bcbaf08..b1a0a0e9eece6c22656bbbe2729b3f5d0fe79dc7 100644 --- a/lib_dec/ivas_omasa_dec.c +++ b/lib_dec/ivas_omasa_dec.c @@ -378,11 +378,17 @@ ivas_error ivas_omasa_dec_config( if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC ) { /* Allocate TD renderer for the objects in DISC mode */ - if ( ( error = ivas_td_binaural_open( st_ivas ) ) != IVAS_ERR_OK ) +#ifdef FIX_1033_MEMORY_LEAK_OMASA + if ( st_ivas->hBinRendererTd == NULL ) { - return error; +#endif + if ( ( error = ivas_td_binaural_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } +#ifdef FIX_1033_MEMORY_LEAK_OMASA } - +#endif /* Allocate 'hIsmRendererData' handle and memory for delay buffer within 'hMasaIsmData' */ if ( ( error = ivas_omasa_separate_object_renderer_open( st_ivas ) ) != IVAS_ERR_OK ) { @@ -391,10 +397,16 @@ ivas_error ivas_omasa_dec_config( } else { - /* TD renderer handle */ - ivas_td_binaural_close( &st_ivas->hBinRendererTd ); - st_ivas->hHrtfTD = NULL; - +#ifdef FIX_1033_MEMORY_LEAK_OMASA + if ( st_ivas->hBinRendererTd != NULL && st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE ) + { +#endif + /* TD renderer handle */ + ivas_td_binaural_close( &st_ivas->hBinRendererTd ); + st_ivas->hHrtfTD = NULL; +#ifdef FIX_1033_MEMORY_LEAK_OMASA + } +#endif /* ISM renderer handle + ISM data handle */ ivas_omasa_separate_object_renderer_close( st_ivas ); } diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 65e05f78be7ca22ed2063d4196bba570bddb9241..7473cbaa75b21657e10829c9737edc16e54236b7 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -284,11 +284,7 @@ ivas_error ivas_osba_render_sf( if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) { -#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH ivas_ism_render_sf( st_ivas, st_ivas->renderer_type, p_output_ism, *nSamplesRendered ); -#else - ivas_ism_render_sf( st_ivas, p_output_ism, *nSamplesRendered ); -#endif } for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ ) diff --git a/lib_dec/ivas_out_setup_conversion.c b/lib_dec/ivas_out_setup_conversion.c index b66e02e1eeb4b6a09c8eb2d0679a623507c36f80..c6d2585eec53a4555293dab0a96b7b2e3c810da5 100644 --- a/lib_dec/ivas_out_setup_conversion.c +++ b/lib_dec/ivas_out_setup_conversion.c @@ -973,11 +973,7 @@ void ivas_ls_setup_conversion_process_mdct_param_mc( set_zero( Nrqq, MAX_OUTPUT_CHANNELS ); set_zero( target_ch_ener, MAX_OUTPUT_CHANNELS ); -#ifdef FIX_1024_REMOVE_PARAMMC_MIXING_MAT /* Step 1.2, get target channel energies for the transported format, Nrqq calculation */ -#else - /* Step 1.2, get target channel energies for the transported format as in ivas_param_mc_get_mono_stereo_mixing_matrices(), Nrqq calculation */ -#endif ild_q = hParamMC->icld_q + bandIdx * hParamMC->hMetadataPMC->ild_mapping_conf->ild_map_size_lfe; for ( chInIdx = 0; chInIdx < nchan_transport_format; chInIdx++ ) @@ -995,11 +991,7 @@ void ivas_ls_setup_conversion_process_mdct_param_mc( Nrqq[hParamMC->hMetadataPMC->ild_mapping_conf->ild_index[chInIdx]] = powf( 10.0f, ild_q[chInIdx] / 10.0f ) * hParamMC->hMetadataPMC->ild_factors[chInIdx] * ref_ener; } -#ifdef FIX_1024_REMOVE_PARAMMC_MIXING_MAT /* Step 1.3 get target Cy (with dmx matrix from CICPX to MONO/STEREO saved in hParamMC) */ -#else - /* Step 1.3 get target Cy like in ivas_param_mc_get_mono_stereo_mixing_matrices() (with dmx matrix from CICPX to MONO/STEREO saved in hParamMC) */ -#endif for ( chOutIdx = 0; chOutIdx < nchan_out; chOutIdx++ ) { for ( i = 0; i < nchan_transport_format; i++ ) diff --git a/lib_enc/ivas_masa_enc.c b/lib_enc/ivas_masa_enc.c index 466287a0fd0e0a915c3daf32de5d7da399bcea8f..e4b536dbee95fdf5c3c1f8e9064d86b5312e184e 100644 --- a/lib_enc/ivas_masa_enc.c +++ b/lib_enc/ivas_masa_enc.c @@ -1260,9 +1260,7 @@ void ivas_masa_combine_directions( ambience2dir = 1.0f - ratioSum; hMeta->directional_meta[0].energy_ratio[j][i] = sumVecLen[j][i] / ( hMeta->directional_meta[0].energy_ratio[j][i] + hMeta->directional_meta[1].energy_ratio[j][i] + ambience2dir / 2.0f ); hMeta->directional_meta[1].energy_ratio[j][i] = 0.0f; -#ifdef NONBE_FIX_1034_DRY_MASA_RATIOS hMeta->common_meta.diffuse_to_total_ratio[j][i] = 1.0f - hMeta->directional_meta[0].energy_ratio[j][i]; -#endif if ( computeCoherence ) { ambience1dir = 1.0f - hMeta->directional_meta[0].energy_ratio[j][i]; @@ -1451,9 +1449,7 @@ static void detect_metadata_composition( { for ( band = 0; band < MASA_FREQUENCY_BANDS; band++ ) { -#ifdef NONBE_FIX_1034_DRY_MASA_RATIOS hMeta->directional_meta[0].spherical_index[sf][band] = hMeta->directional_meta[1].spherical_index[sf][band]; -#endif hMeta->directional_meta[0].azimuth[sf][band] = hMeta->directional_meta[1].azimuth[sf][band]; hMeta->directional_meta[0].elevation[sf][band] = hMeta->directional_meta[1].elevation[sf][band]; hMeta->directional_meta[0].energy_ratio[sf][band] = hMeta->directional_meta[1].energy_ratio[sf][band]; @@ -1530,11 +1526,7 @@ static void compensate_energy_ratios( uint8_t numDirs; hMeta = &( hMasa->masaMetadata ); -#ifdef NONBE_FIX_1034_DRY_MASA_RATIOS numDirs = hMasa->config.numberOfDirections; -#else - numDirs = hMeta->descriptive_meta.numberOfDirections + 1; -#endif for ( sf = 0; sf < MAX_PARAM_SPATIAL_SUBFRAMES; sf++ ) { @@ -2150,19 +2142,15 @@ static void copy_masa_metadata_subframe( ) { uint8_t dir; -#ifdef NONBE_FIX_1034_DRY_MASA_RATIOS uint8_t band; -#endif /* directional metadata */ for ( dir = 0; dir < MASA_MAXIMUM_DIRECTIONS; dir++ ) { -#ifdef NONBE_FIX_1034_DRY_MASA_RATIOS for ( band = 0; band < MASA_FREQUENCY_BANDS; band++ ) { hMetaTo->directional_meta[dir].spherical_index[sfTo][band] = hMetaFrom->directional_meta[dir].spherical_index[sfFrom][band]; } -#endif mvr2r( hMetaFrom->directional_meta[dir].azimuth[sfFrom], hMetaTo->directional_meta[dir].azimuth[sfTo], MASA_FREQUENCY_BANDS ); mvr2r( hMetaFrom->directional_meta[dir].elevation[sfFrom], hMetaTo->directional_meta[dir].elevation[sfTo], MASA_FREQUENCY_BANDS ); mvr2r( hMetaFrom->directional_meta[dir].energy_ratio[sfFrom], hMetaTo->directional_meta[dir].energy_ratio[sfTo], MASA_FREQUENCY_BANDS ); diff --git a/scripts/config/ivas_modes.json b/scripts/config/ivas_modes.json index 86994010aa826f9d7402b2a012f7bdcfde724bf0..42b4d2b6a4afa7a244e42ff385987ca0302f00d3 100644 --- a/scripts/config/ivas_modes.json +++ b/scripts/config/ivas_modes.json @@ -4958,7 +4958,16 @@ ], "dec": { "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], "HOA3": [], + "HOA2": [], + "FOA": [], "mono": [], "stereo": [], "EXT": [] @@ -5033,7 +5042,16 @@ ], "dec": { "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], "HOA3": [], + "HOA2": [], + "FOA": [], "mono": [], "stereo": [], "EXT": [] @@ -5072,7 +5090,16 @@ ], "dec": { "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], "HOA3": [], + "HOA2": [], + "FOA": [], "mono": [], "stereo": [], "EXT": [] @@ -5089,26 +5116,100 @@ "mono": false, "bitrates": { "wb": [ + 13200, 16400, + 24400, + 32000, 48000, + 64000, + 80000, 96000, - 256000 + 128000, + 192000, + 256000, + 384000, + 512000 ], "swb": [ + 13200, + 16400, 24400, + 32000, + 48000, 64000, + 80000, + 96000, 128000, - 384000 + 192000, + 256000, + 384000, + 512000 ], "fb": [ 13200, + 16400, + 24400, 32000, + 48000, + 64000, 80000, + 96000, + 128000, 192000, + 256000, + 384000, 512000 ] } }, + "OMASA_ISM1_1TC_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_masa", + "1", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM1_1TC", + "table_name": "OMASA ISM1 1TC @{table_bitrate} RS {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM{mdi}.csv", + "{item}.met" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, "OMASA_ISM2_2TC_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ "-ism_masa", @@ -5121,9 +5222,19 @@ ], "dec": { "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], "HOA3": [], + "HOA2": [], + "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, "in_config": "OMASA_ISM2_2TC", "table_name": "OMASA ISM2 2TC @{table_bitrate} kbps {bandwidth}", @@ -5195,9 +5306,19 @@ ], "dec": { "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], "HOA3": [], + "HOA2": [], + "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, "in_config": "OMASA_ISM2_2TC", "table_name": "OMASA ISM2 2TC @{table_bitrate} RS {bandwidth}", @@ -5233,9 +5354,19 @@ ], "dec": { "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], "HOA3": [], + "HOA2": [], + "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, "in_config": "OMASA_ISM2_1TC", "table_name": "OMASA ISM2 1TC @{table_bitrate} kbps {bandwidth}", @@ -5249,27 +5380,100 @@ "mono": false, "bitrates": { "wb": [ + 13200, 16400, + 24400, + 32000, 48000, + 64000, + 80000, 96000, - 160000, - 256000 + 128000, + 192000, + 256000, + 384000, + 512000 ], "swb": [ + 13200, + 16400, 24400, + 32000, + 48000, 64000, + 80000, + 96000, 128000, - 384000 + 192000, + 256000, + 384000, + 512000 ], "fb": [ 13200, + 16400, + 24400, 32000, + 48000, + 64000, 80000, + 96000, + 128000, 192000, + 256000, + 384000, 512000 ] } }, + "OMASA_ISM2_1TC_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_masa", + "2", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM2_1TC", + "table_name": "OMASA ISM2 1TC @{table_bitrate} RS {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM{mdi}.csv", + "{item}.met" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, "OMASA_ISM3_2TC_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ "-ism_masa", @@ -5282,9 +5486,19 @@ ], "dec": { "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], "HOA3": [], + "HOA2": [], + "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, "in_config": "OMASA_ISM3_2TC", "table_name": "OMASA ISM3 2TC @{table_bitrate} kbps {bandwidth}", @@ -5356,9 +5570,19 @@ ], "dec": { "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], "HOA3": [], + "HOA2": [], + "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, "in_config": "OMASA_ISM3_2TC", "table_name": "OMASA ISM3 2TC @{table_bitrate} RS {bandwidth}", @@ -5372,13 +5596,13 @@ "mono": false, "bitrates": { "wb": { - "all": "{sw_files_path}/sw_13k2_512k_2fr_start_24k4_omasatechs_3ism.bin" + "all": "{sw_files_path}/sw_13k2_512k.bin" }, "swb": { - "all": "{sw_files_path}/sw_13k2_512k_2fr_start_48k_omasatechs_3ism.bin" + "all": "{sw_files_path}/sw_13k2_512k.bin" }, "fb": { - "all": "{sw_files_path}/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin" + "all": "{sw_files_path}/sw_13k2_512k.bin" } } }, @@ -5394,9 +5618,19 @@ ], "dec": { "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], "HOA3": [], + "HOA2": [], + "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, "in_config": "OMASA_ISM3_1TC", "table_name": "OMASA ISM3 1TC @{table_bitrate} kbps {bandwidth}", @@ -5410,27 +5644,100 @@ "mono": false, "bitrates": { "wb": [ + 13200, 16400, + 24400, + 32000, 48000, + 64000, + 80000, 96000, - 160000, - 256000 + 128000, + 192000, + 256000, + 384000, + 512000 ], "swb": [ + 13200, + 16400, 24400, + 32000, + 48000, 64000, + 80000, + 96000, 128000, - 384000 + 192000, + 256000, + 384000, + 512000 ], "fb": [ 13200, + 16400, + 24400, 32000, + 48000, + 64000, 80000, + 96000, + 128000, 192000, + 256000, + 384000, 512000 ] } }, + "OMASA_ISM3_1TC_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_masa", + "3", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM3_1TC", + "table_name": "OMASA ISM3 1TC @{table_bitrate} RS {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM{mdi}.csv", + "{item}.met" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, "OMASA_ISM4_2TC_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ "-ism_masa", @@ -5443,9 +5750,19 @@ ], "dec": { "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], "HOA3": [], + "HOA2": [], + "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, "in_config": "OMASA_ISM4_2TC", "table_name": "OMASA ISM4 2TC @{table_bitrate} kbps {bandwidth}", @@ -5517,9 +5834,19 @@ ], "dec": { "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], "HOA3": [], + "HOA2": [], + "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, "in_config": "OMASA_ISM4_2TC", "table_name": "OMASA ISM4 2TC @{table_bitrate} RS {bandwidth}", @@ -5533,10 +5860,10 @@ "mono": false, "bitrates": { "wb": { - "all": "{sw_files_path}/sw_13k2_512k_2fr_start_32k_omasatechs_4ism.bin" + "all": "{sw_files_path}/sw_13k2_512k.bin" }, "swb": { - "all": "{sw_files_path}/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin" + "all": "{sw_files_path}/sw_13k2_512k.bin" }, "fb": { "all": "{sw_files_path}/sw_13k2_512k.bin" @@ -5555,9 +5882,19 @@ ], "dec": { "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], "HOA3": [], + "HOA2": [], + "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, "in_config": "OMASA_ISM4_1TC", "table_name": "OMASA ISM4 1TC @{table_bitrate} kbps {bandwidth}", @@ -5571,25 +5908,99 @@ "mono": false, "bitrates": { "wb": [ + 13200, 16400, + 24400, + 32000, 48000, + 64000, + 80000, 96000, - 256000 + 128000, + 192000, + 256000, + 384000, + 512000 ], "swb": [ + 13200, + 16400, 24400, + 32000, + 48000, 64000, + 80000, + 96000, 128000, - 384000 + 192000, + 256000, + 384000, + 512000 ], "fb": [ 13200, + 16400, + 24400, 32000, + 48000, + 64000, 80000, + 96000, + 128000, 192000, + 256000, + 384000, 512000 ] } + }, + "OMASA_ISM4_1TC_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_masa", + "4", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "7_1": [], + "5_1_4": [], + "5_1_2": [], + "5_1": [], + "BINAURAL": [], + "BINAURAL_ROOM_IR": [], + "BINAURAL_ROOM_REVERB": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM4_1TC", + "table_name": "OMASA ISM4 1TC @{table_bitrate} RS {bandwidth}", + "nummetadata": 5, + "metadatafilenames": [ + "{item}_ISM{mdi}.csv", + "{item}.met" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } } }, "OSBA": { diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 6a5243e44cbe0c31041a84e1e8d07707216e4968..a075ba2e4bebfd5650fb6868536cfbfee47f5827 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -517,10 +517,14 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv ../scripts/switchPaths/sw_24k4_256k.bin 48 testv/stv4ISM48s.wav bit ../IVAS_dec EXT 48 bit testv/stv4ISM48s.wav_brate_sw_48-48_EXT.tst -// 4 ISm with and without metadata bitrate switching from 24.4 kbps to 256 kbps, 48 kHz in, 48 kHz out, DTX on, HOA3 out +// 4 ISM with and without metadata bitrate switching from 24.4 kbps to 256 kbps, 48 kHz in, 48 kHz out, DTX on, HOA3 out ../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 and without metadata bitrate switching from 24.4 kbps to 256 kbps, 48 kHz in, 48 kHz out, DTX on, BINAURAL_ROOM_IR out (Model from file) +../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 -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL_ROOM_IR 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, HR, 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 @@ -822,9 +826,9 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -sba 3 ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv3OA48c.wav bit ../IVAS_dec STEREO 48 bit testv/stv3OA48c.wav_sw_48-48_STEREO.tst -// SBA 3OA bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out +// SBA 3OA bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file) ../IVAS_cod -sba 3 ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv3OA48c.wav bit -../IVAS_dec BINAURAL 48 bit testv/stv3OA48c.wav_sw_48-48_BINAURAL.tst +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL 48 bit testv/stv3OA48c.wav_sw_48-48_BINAURAL.tst // SBA 3OA bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, FOA out ../IVAS_cod -sba 3 ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv3OA48c.wav bit @@ -1067,9 +1071,9 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit ../IVAS_dec FOA 48 bit testv/stv1MASA1TC48n.wav_sw_48-48_FOA.tst -// MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out +// MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file) ../IVAS_cod -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit -../IVAS_dec BINAURAL 48 bit testv/stv1MASA2TC48n.wav_sw_48-48_BINAURAL.tst +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL 48 bit testv/stv1MASA2TC48n.wav_sw_48-48_BINAURAL.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, MONO out ../IVAS_cod -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit @@ -1317,6 +1321,10 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_10pct.g ../IVAS_cod -mc 5_1_2 ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv512MC48c.wav bit ../IVAS_dec BINAURAL_ROOM_IR 16 bit testv/stv512MC48c.wav_sw_48-16_Binaural_room.tst +// Multi-channel 7_1 bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out (model from file), head rotation +../IVAS_cod -mc 7_1 ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv71MC48c.wav bit +../IVAS_dec -t testv/headrot.csv -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL 48 bit testv/stv71C48c.wav_sw_48-48_Binaural_model_file_headrot.tst + // Multi-channel 7_1_4 bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, HOA3 out ../IVAS_cod -mc 7_1_4 ../scripts/switchPaths/sw_mctech_5fr.bin 48 testv/stv714MC48c.wav bit ../IVAS_dec HOA3 48 bit testv/stv51MC48c.wav_sw_48-48_HOA3.tst @@ -1326,9 +1334,9 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_10pct.g eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error ../IVAS_dec STEREO 32 bit_error testv/stv714MC48c.wav_sw_48-32_stereo_FER5.tst -// Multi-channel 7_1_4 bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out +// Multi-channel 7_1_4 bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file) ../IVAS_cod -mc 7_1_4 ../scripts/switchPaths/sw_mctech_5fr.bin 48 testv/stv714MC48c.wav bit -../IVAS_dec BINAURAL 48 bit testv/stv51MC48c.wav_sw_48-48_BINAURAL.tst +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin 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 @@ -1592,6 +1600,10 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_384k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit ../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_BINAURAL_ROOM_REVERB_sw_48-48.tst +// OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 384 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file) +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_384k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin BINAURAL 16 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_BINAURAL_sw_48-16.tst + // OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, EXT out ../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv NULL testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit ../IVAS_dec EXT 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_EXT_sw_48-48.tst @@ -1690,10 +1702,10 @@ 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 32 testv/stvOSBA_4ISM_3OA32c.wav bit ../IVAS_dec EXT 48 bit testv/stvOSBA_4ISM_3OA32c.wav_EXT_sw_13k2_512k_32-48.tst -// OSBA FOA 4ISM at bitrate switching 13.2 to 512 kbps, 48kHz in, 48kHz out, BINAURAL out, FER at 5%, bandwidth switching +// OSBA FOA 4ISM at bitrate switching 13.2 to 512 kbps, 48kHz in, 16kHz out, BINAURAL out (Model from file), FER at 5%, bandwidth switching ../IVAS_cod -max_band testv/ivas_bws_20fr_start_FB.txt -ism_sba 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stvOSBA_4ISM_FOA48c.wav bit 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 +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin BINAURAL 16 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 diff --git a/scripts/config/self_test_ltv.prm b/scripts/config/self_test_ltv.prm index 8bd327fd8b021caa046b50d26116d95099628e38..87badcc812b80a742c404053695ad9c7d6c06a9f 100644 --- a/scripts/config/self_test_ltv.prm +++ b/scripts/config/self_test_ltv.prm @@ -517,10 +517,14 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -ism 4 testv/ltvISM1.csv testv/ltvISM2.csv testv/ltvISM3.csv testv/ltvISM4.csv ../scripts/switchPaths/sw_24k4_256k.bin 48 testv/ltv48_4ISM.wav bit ../IVAS_dec EXT 48 bit testv/ltv48_4ISM.wav_brate_sw_48-48_EXT.tst -// 4 ISm with and without metadata bitrate switching from 24.4 kbps to 256 kbps, 48 kHz in, 48 kHz out, DTX on, HOA3 out +// 4 ISM with and without metadata bitrate switching from 24.4 kbps to 256 kbps, 48 kHz in, 48 kHz out, DTX on, HOA3 out ../IVAS_cod -dtx -ism 4 testv/ltvISM1.csv NULL NULL testv/ltvISM4.csv ../scripts/switchPaths/sw_24k4_256k.bin 48 testv/ltv48_4ISM.wav bit ../IVAS_dec HOA3 48 bit testv/ltv48_4ISM.wav_brate_sw_48-48_DTX_hoa3.tst +// 4 ISM with and without metadata bitrate switching from 24.4 kbps to 256 kbps, 48 kHz in, 48 kHz out, DTX on, BINAURAL_ROOM_IR out (Model from file) +../IVAS_cod -dtx -ism 4 testv/ltvISM1.csv NULL NULL testv/ltvISM4.csv ../scripts/switchPaths/sw_24k4_256k.bin 48 testv/ltv48_4ISM.wav bit +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL_ROOM_IR 48 bit testv/ltv48_4ISM.wav_brate_sw_48-48_DTX_hoa3.tst + // 4 ISM with extended metadata at 256 kbps, 48 kHz in, 48 kHz out, BINAURAL out, HR, directivity configuration, random FER at 5% ../IVAS_cod -ism +4 testv/ltvISM1.csv testv/ltvISM2.csv testv/ltvISM3.csv testv/ltvISM4.csv 256000 48 testv/ltv48_4ISM.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error @@ -822,9 +826,9 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -sba 3 ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/ltv48_HOA3.wav bit ../IVAS_dec STEREO 48 bit testv/ltv48_HOA3.wav_sw_48-48_STEREO.tst -// SBA 3OA bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out +// SBA 3OA bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file) ../IVAS_cod -sba 3 ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/ltv48_HOA3.wav bit -../IVAS_dec BINAURAL 48 bit testv/ltv48_HOA3.wav_sw_48-48_BINAURAL.tst +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL 48 bit testv/ltv48_HOA3.wav_sw_48-48_BINAURAL.tst // SBA 3OA bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, FOA out ../IVAS_cod -sba 3 ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/ltv48_HOA3.wav bit @@ -1067,9 +1071,9 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -masa 1 testv/ltv48_MASA1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/ltv48_MASA1TC.wav bit ../IVAS_dec FOA 48 bit testv/ltv48_MASA1TC.wav_sw_48-48_FOA.tst -// MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out +// MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file) ../IVAS_cod -masa 2 testv/ltv48_MASA2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/ltv48_MASA2TC.wav bit -../IVAS_dec BINAURAL 48 bit testv/ltv48_MASA2TC.wav_sw_48-48_BINAURAL.tst +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL 48 bit testv/ltv48_MASA2TC.wav_sw_48-48_BINAURAL.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, MONO out ../IVAS_cod -masa 2 testv/ltv48_MASA2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/ltv48_MASA2TC.wav bit @@ -1317,6 +1321,10 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_10pct.g ../IVAS_cod -mc 5_1_2 ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/ltv48_MC512.wav bit ../IVAS_dec BINAURAL_ROOM_IR 16 bit testv/ltv48_MC512.wav_sw_48-16_Binaural_room.tst +// Multi-channel 7_1 bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out (model from file), head rotation +../IVAS_cod -mc 7_1 ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/ltv48_MC71.wav bit +../IVAS_dec -t testv/headrot.csv -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL 48 bit testv/stv71C48c.wav_sw_48-48_Binaural_model_file_headrot.tst + // Multi-channel 7_1_4 bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, HOA3 out ../IVAS_cod -mc 7_1_4 ../scripts/switchPaths/sw_mctech_5fr.bin 48 testv/ltv48_MC714.wav bit ../IVAS_dec HOA3 48 bit testv/ltv48_MC51.wav_sw_48-48_HOA3.tst @@ -1326,9 +1334,9 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_10pct.g eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error ../IVAS_dec STEREO 32 bit_error testv/ltv48_MC714.wav_sw_48-32_stereo_FER5.tst -// Multi-channel 7_1_4 bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out +// Multi-channel 7_1_4 bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file) ../IVAS_cod -mc 7_1_4 ../scripts/switchPaths/sw_mctech_5fr.bin 48 testv/ltv48_MC714.wav bit -../IVAS_dec BINAURAL 48 bit testv/ltv48_MC51.wav_sw_48-48_BINAURAL.tst +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL 48 bit testv/ltv48_MC51.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/ltv48_MC514.wav bit @@ -1592,6 +1600,10 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -ism_masa 4 2 testv/ltv48_OMASA_4ISM_2TC_ISM1.csv testv/ltv48_OMASA_4ISM_2TC_ISM2.csv testv/ltv48_OMASA_4ISM_2TC_ISM3.csv testv/ltv48_OMASA_4ISM_2TC_ISM4.csv testv/ltv48_OMASA_4ISM_2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_384k_omasatechs_4ism.bin 48 testv/ltv48_OMASA_4ISM_2TC.wav bit ../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/ltv48_OMASA_4ISM_2TC.wav_BINAURAL_ROOM_REVERB_sw_48-48.tst +// OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 384 kbps, 48kHz in, 16kHz out, BINAURAL out (Model from file) +../IVAS_cod -ism_masa 4 2 testv/ltv48_OMASA_4ISM_2TC_ISM1.csv testv/ltv48_OMASA_4ISM_2TC_ISM2.csv testv/ltv48_OMASA_4ISM_2TC_ISM3.csv testv/ltv48_OMASA_4ISM_2TC_ISM4.csv testv/ltv48_OMASA_4ISM_2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_384k_omasatechs_4ism.bin 48 testv/ltv48_OMASA_4ISM_2TC.wav bit +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin BINAURAL 16 bit testv/ltv48_OMASA_4ISM_2TC.wav_BINAURAL_sw_48-16.tst + // OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, EXT out ../IVAS_cod -ism_masa 4 2 testv/ltv48_OMASA_4ISM_2TC_ISM1.csv NULL testv/ltv48_OMASA_4ISM_2TC_ISM3.csv testv/ltv48_OMASA_4ISM_2TC_ISM4.csv testv/ltv48_OMASA_4ISM_2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/ltv48_OMASA_4ISM_2TC.wav bit ../IVAS_dec EXT 48 bit testv/ltvOMASA_4ISM_2MASA2TC48c.wav_EXT_sw_48-48.tst @@ -1690,10 +1702,10 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -ism_sba 4 3 testv/ltvISM1.csv testv/ltvISM2.csv testv/ltvISM3.csv testv/ltvISM4.csv ../scripts/switchPaths/sw_13k2_512k.bin 32 testv/ltv32_OSBA_4ISM_HOA3.wav bit ../IVAS_dec EXT 48 bit testv/ltv32_OSBA_4ISM_HOA3.wav_EXT_sw_13k2_512k_32-32.tst -// OSBA FOA 4ISM at bitrate switching 13.2 to 512 kbps, 48kHz in, 48kHz out, BINAURAL out, FER at 5%, bandwidth switching +// OSBA FOA 4ISM at bitrate switching 13.2 to 512 kbps, 48kHz in, 16kHz out, BINAURAL out (Model from file), FER at 5%, bandwidth switching ../IVAS_cod -max_band testv/ivas_bws_20fr_start_WB.txt -ism_sba 4 1 testv/ltvISM1.csv testv/ltvISM2.csv testv/ltvISM3.csv testv/ltvISM4.csv ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/ltv48_OSBA_4ISM_FOA.wav bit 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/ltv48_OSBA_4ISM_FOA.wav_BINAURAL_sw_48-48_FER5.tst +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin BINAURAL 16 bit_error testv/ltv48_OSBA_4ISM_FOA.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/ltvISM1.csv testv/ltvISM2.csv testv/ltvISM3.csv ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/ltv48_OSBA_3ISM_2OA.wav bit diff --git a/tests/test_26444.py b/tests/test_26444.py index dd517b916fd4bb7155bd39a91ec7dbccb5c6797f..d23c01e8a83d389eb1e6b07d2273236391334039 100644 --- a/tests/test_26444.py +++ b/tests/test_26444.py @@ -70,22 +70,27 @@ for s in scripts: dec_opts = "" diff_opts = "" - @pytest.mark.parametrize("test_tag", list(test_dict.keys())) -def test_evs_26444(test_tag): +def test_evs_26444(runner_frontend, test_tag): enc_opts, dec_opts, diff_opts = test_dict[test_tag] - + + result = None if enc_opts: enc_opts = enc_opts.replace("./", TEST_DIR + "/") enc_opts = enc_opts.replace("-rf rf_config.cfg", "-rf " + TEST_DIR + "/rf_config.cfg") # Special handling of this arguments since the path is missing cmd = ["./IVAS_cod", "-q"] + enc_opts.split()[1:] print(" ".join(["Encoder command: "] + cmd)) - subprocess.run(cmd) + runner_frontend.run(cmd) if dec_opts: dec_opts = dec_opts.replace("./", TEST_DIR + "/") cmd = ["./IVAS_dec", "-q"] + dec_opts.split()[1:] print(" ".join(["Decoder command: "] + cmd)) - subprocess.run(["./IVAS_dec", "-q"] + dec_opts.split()[1:]) + runner_frontend.run(cmd) + + result = runner_frontend.result + + if result != None and result.returncode: + pytest.fail("Non-zero returncode for command: " + " ".join(cmd)) diff_opts = diff_opts.replace("./", TEST_DIR + "/") if ";" in diff_opts: @@ -100,3 +105,27 @@ def test_evs_26444(test_tag): result2 = True if not (result1 and result2): pytest.fail("Output differs") + + +class Runner: + def __init__(self) -> None: + self.returncode = None + self.result = None + + def run(self, cmd: str) -> None: + result = subprocess.run(cmd, capture_output=True, check=False) + self.result = result + self.returncode = result.returncode + + def _check_run(self): + if self.returncode is not None: + if self.returncode: + pytest.fail( "Command terminated with a non-0 return code" ) + +@pytest.fixture(scope="function") +def runner_frontend() -> Runner: + runner = Runner() + yield runner + + # Fixture teardown + runner._check_run()