Skip to content
......@@ -1767,3 +1767,16 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_10pct.g
// OSBA planar 2OA 4ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL ROOM REVERB (Model from file) out
../IVAS_cod -ism_sba 4 -2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 512000 48 testv/stvOSBA_4ISM_2OA48c.wav bit
../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL_ROOM_REVERB 48 bit testv/stvOSBA_4ISM_p3OA48c.wav_BINAURAL_ROOM_REVERB_512000_48-48.tst
// SBA FOA bitrate switching from 13.2 kbps to 192 kbps, 32kHz in, 32kHz out, DTX on, EXT out
../IVAS_cod -dtx -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 32 testv/stvFOA32c.wav bit
../IVAS_dec EXT 32 bit testv/stvFOA32c.wav_sw_32-32_DTX_EXT.tst
// SBA 3OA bitrate switching from 13.2 kbps to 128 kbps, 32kHz in, 32kHz out, DTX on, EXT out
../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv3OA32c.wav bit
../IVAS_dec EXT 32 bit testv/stv3OA32c.wav_sw_32-32_DTX_EXT.tst
// SBA 2OA bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, EXT out, random FER at 5%, DTX on
../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv3OA48c.wav bit
eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error
../IVAS_dec EXT 48 bit_error testv/stv3OA48c.wav_sw_48-48_EXT_FER5.tst
......@@ -38,6 +38,36 @@ if __name__ == '__main__':
cmds_dec.extend(re.findall(r"DUT decoder command:\\n\\t(.*?)\\n", line))
cmds_rend.extend(re.findall(r"Running command\\n(.*?)\\n", line))
# If pytest-html < v4 is used, the parsing will fail and render empty lists. This is a work-around in case that happens.
if all(not x for x in [cmds_enc, cmds_dec, cmds_rend]):
for html_report in input:
with open(html_report,'r') as infile:
enc_cmd = False
dec_cmd = False
rend_cmd = False
for line in infile.readlines():
if enc_cmd:
cmds_enc.append(line)
enc_cmd = False
elif dec_cmd:
cmds_dec.append(line)
dec_cmd = False
elif rend_cmd:
cmds_rend.append(line)
rend_cmd = False
else:
if "DUT encoder command" in line:
enc_cmd = True
elif "DUT decoder command" in line:
dec_cmd = True
elif "Running command" in line:
rend_cmd = True
# Sort lists to keep deterministic order between runs
cmds_enc.sort()
cmds_dec.sort()
cmds_rend.sort()
with open(txt_file.replace('.','_enc.'),'w', newline='\n') as outfile:
with open('scripts/enc_header.txt','r') as header:
outfile.write(header.read())
......
......@@ -731,6 +731,17 @@ def get_angle_code(angle):
assert 0 <= angle <= 360
return usquant(angle, 0, 20, 19)
def get_refdist_code(dist):
assert 0 <= dist
return usquant(dist, 0.1, 0.1, 64)
def get_maxdist_code(dist):
assert 0 <= dist
return usquant(dist, 1, 1, 64)
def get_rolloff_code(rollof):
assert 0 <= rollof
return usquant(rollof, 0, 0.1, 41)
def get_outer_attenuation_code(att):
assert 0 <= att <= 1
......
......@@ -84,6 +84,7 @@ def parse_reverb_text_configuration_and_generate_binary_payload(file):
"acousticEnvironment",
"directivitySetting",
"directivityPattern",
"distanceAttenuation",
]
}
for section_name in config.sections():
......@@ -99,6 +100,7 @@ def parse_reverb_text_configuration_and_generate_binary_payload(file):
assert section_name in [
"roomAcoustics",
"directivitySetting",
"distanceAttenuation",
], f"unknown section name: {section_name}"
sections[section_name] = config[section_name]
......@@ -229,10 +231,19 @@ def parse_reverb_text_configuration_and_generate_binary_payload(file):
+ get_angle_code(dir_values[1]) # Directivity outer angle
+ get_outer_attenuation_code(dir_values[2])
) # Directivity outer attenuation
# parse distance attenuation
hasDistanceAttenuation = len(sections["distanceAttenuation"]) > 0
data += get_bool_code(hasDistanceAttenuation)
if hasDistanceAttenuation:
data += bitarray(
get_maxdist_code(eval_option(sections["distanceAttenuation"]["maxDist"])) # Distance attenuation Max Distance
+ get_refdist_code(eval_option(sections["distanceAttenuation"]["refDist"])) # Distance attenuation Ref Distance
+ get_rolloff_code(eval_option(sections["distanceAttenuation"]["rolloffFactor"])) # Distance attenuation Rolloff Factor
)
# generate binary file
data.tofile(open(file.split(".")[0] + ".dat", "wb"))
if __name__ == "__main__":
import argparse
......