Loading scripts/config/self_test.prm +7 −0 Original line number Diff line number Diff line Loading @@ -649,6 +649,13 @@ ../IVAS_dec HOA3 32 bit testv/stv3OA32c.wav_sw_32-32_DTX_HOA3.tst // SBA FOA at 13.2 kbps , 32kHz in, 32kHz out, DTX on, BINAURAL out, SID as first frame ../IVAS_cod -dtx -sba 1 13200 32 testv/stvFOA32c.wav bit ../IVAS_dec BINAURAL 32 bit testv/stvFOA32c.wav_BINAURAL_13200_32-32_DTX_SID.tst // SBA FOA at 24.4 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, SID as first frame ../IVAS_cod -dtx -sba 1 24400 32 testv/stvFOA32c.wav bit ../IVAS_dec BINAURAL 32 bit testv/stvFOA32c.wav_BINAURAL_13200_32-32_DTX_SID.tst // MASA 1dir 1TC at 13.2 kbps, 48kHz in, 48kHz out, BINAURAL out ../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 13200 48 testv/stv1MASA1TC48c.wav bit Loading scripts/cut_bs.py +3 −3 Original line number Diff line number Diff line Loading @@ -35,7 +35,8 @@ import argparse import os.path import sys SID_BITS = {35, 48, 88, 100} #SID_BITS = {35, 48, 88, 100} SID_BITS = {35, 48, 104} SYNC_WORDS = {b"!k", b" k"} Loading Loading @@ -86,7 +87,6 @@ def cut_bs(fp, fp_out, start_frame=0, start_with_sid=False): fp_out.write(n_bits_bs) fp_out.write(fp.read(n_bits * 2)) fr_cnt += 1 return (fr_cnt, cut_cnt) Loading tests/test_param_file.py +33 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ from cmp_pcm import cmp_pcm from cut_pcm import cut_samples from conftest import EncoderFrontend, DecoderFrontend from testconfig import PARAM_FILE from cut_bs import cut_bs VALID_DEC_OUTPUT_CONF = [ "MONO", Loading Loading @@ -162,6 +162,17 @@ def test_param_file_tests( sba_br_switching_dtx = 1 cut_file = pre_proc_input(testv_file, fs) testv_file = cut_file #SID sba_dtx_first_SID = 0 if ( bitrate.isdigit() and "-dtx" in enc_opts.split() and "-sba" in enc_opts.split() and "SID" in tag_str.split('_') ): sba_dtx_first_SID = 1 cut_file = pre_proc_input(testv_file, fs) testv_file = cut_file # bitrate can be a filename: remove leading "../" if bitrate.startswith("../"): Loading @@ -188,7 +199,27 @@ def test_param_file_tests( enc_split, update_ref, ) if sba_br_switching_dtx == 1: # SID : Update bitstream if sba_dtx_first_SID == 1: dut_out_dir = f"{dut_base_path}\\param_file\\enc" ref_out_dir = f"{reference_path}\\param_file\\enc" ref_out_file = f"{ref_out_dir}\\{bitstream_file}" dut_out_file = f"{dut_out_dir}\\{bitstream_file}" ref_out_file_cut = ref_out_file +"_cut" dut_out_file_cut = dut_out_file +"_cut" if update_ref == 1 or update_ref == 2 and not os.path.exists(ref_out_file): with open(ref_out_file, "rb") as fp_in: with open(ref_out_file_cut, "wb") as fp_out: fr_cnt, cut_cnt = cut_bs(fp_in, fp_out, 0, True) if update_ref in [0, 2]: with open(dut_out_file, "rb") as fp_in: with open(dut_out_file_cut, "wb") as fp_out: fr_cnt, cut_cnt = cut_bs(fp_in, fp_out, 0, True) bitstream_file = bitstream_file +"_cut" if sba_br_switching_dtx == 1 or sba_dtx_first_SID == 1: is_exist = os.path.exists(cut_file) if is_exist: os.remove(cut_file) Loading Loading
scripts/config/self_test.prm +7 −0 Original line number Diff line number Diff line Loading @@ -649,6 +649,13 @@ ../IVAS_dec HOA3 32 bit testv/stv3OA32c.wav_sw_32-32_DTX_HOA3.tst // SBA FOA at 13.2 kbps , 32kHz in, 32kHz out, DTX on, BINAURAL out, SID as first frame ../IVAS_cod -dtx -sba 1 13200 32 testv/stvFOA32c.wav bit ../IVAS_dec BINAURAL 32 bit testv/stvFOA32c.wav_BINAURAL_13200_32-32_DTX_SID.tst // SBA FOA at 24.4 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, SID as first frame ../IVAS_cod -dtx -sba 1 24400 32 testv/stvFOA32c.wav bit ../IVAS_dec BINAURAL 32 bit testv/stvFOA32c.wav_BINAURAL_13200_32-32_DTX_SID.tst // MASA 1dir 1TC at 13.2 kbps, 48kHz in, 48kHz out, BINAURAL out ../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 13200 48 testv/stv1MASA1TC48c.wav bit Loading
scripts/cut_bs.py +3 −3 Original line number Diff line number Diff line Loading @@ -35,7 +35,8 @@ import argparse import os.path import sys SID_BITS = {35, 48, 88, 100} #SID_BITS = {35, 48, 88, 100} SID_BITS = {35, 48, 104} SYNC_WORDS = {b"!k", b" k"} Loading Loading @@ -86,7 +87,6 @@ def cut_bs(fp, fp_out, start_frame=0, start_with_sid=False): fp_out.write(n_bits_bs) fp_out.write(fp.read(n_bits * 2)) fr_cnt += 1 return (fr_cnt, cut_cnt) Loading
tests/test_param_file.py +33 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ from cmp_pcm import cmp_pcm from cut_pcm import cut_samples from conftest import EncoderFrontend, DecoderFrontend from testconfig import PARAM_FILE from cut_bs import cut_bs VALID_DEC_OUTPUT_CONF = [ "MONO", Loading Loading @@ -162,6 +162,17 @@ def test_param_file_tests( sba_br_switching_dtx = 1 cut_file = pre_proc_input(testv_file, fs) testv_file = cut_file #SID sba_dtx_first_SID = 0 if ( bitrate.isdigit() and "-dtx" in enc_opts.split() and "-sba" in enc_opts.split() and "SID" in tag_str.split('_') ): sba_dtx_first_SID = 1 cut_file = pre_proc_input(testv_file, fs) testv_file = cut_file # bitrate can be a filename: remove leading "../" if bitrate.startswith("../"): Loading @@ -188,7 +199,27 @@ def test_param_file_tests( enc_split, update_ref, ) if sba_br_switching_dtx == 1: # SID : Update bitstream if sba_dtx_first_SID == 1: dut_out_dir = f"{dut_base_path}\\param_file\\enc" ref_out_dir = f"{reference_path}\\param_file\\enc" ref_out_file = f"{ref_out_dir}\\{bitstream_file}" dut_out_file = f"{dut_out_dir}\\{bitstream_file}" ref_out_file_cut = ref_out_file +"_cut" dut_out_file_cut = dut_out_file +"_cut" if update_ref == 1 or update_ref == 2 and not os.path.exists(ref_out_file): with open(ref_out_file, "rb") as fp_in: with open(ref_out_file_cut, "wb") as fp_out: fr_cnt, cut_cnt = cut_bs(fp_in, fp_out, 0, True) if update_ref in [0, 2]: with open(dut_out_file, "rb") as fp_in: with open(dut_out_file_cut, "wb") as fp_out: fr_cnt, cut_cnt = cut_bs(fp_in, fp_out, 0, True) bitstream_file = bitstream_file +"_cut" if sba_br_switching_dtx == 1 or sba_dtx_first_SID == 1: is_exist = os.path.exists(cut_file) if is_exist: os.remove(cut_file) Loading