Loading lib_util/render_config_reader.c +1 −1 Original line number Diff line number Diff line Loading @@ -2015,7 +2015,7 @@ ivas_error RenderConfigReader_read( fgHasMethod = TRUE; } /* Read number of bands for individual frequency, start-hop-amount mode */ else if ( strcmp( item, "NBANDS" ) == 0 ) else if ( strcmp( item, "NRBANDS" ) == 0 ) { if ( fgMode != FREQ_GRID_MODE_INDIVIDUAL_FREQUENCIES && fgMode != FREQ_GRID_MODE_START_HOP_AMOUNT ) { Loading scripts/reverb/generate_acoustic_environments_metadata.py +8 −1 Original line number Diff line number Diff line Loading @@ -204,7 +204,14 @@ def get_frequency_code(frequency): return code def get_frequency_hop_code(index): def get_frequency_hop_code(value): index = -1 tolerance = 1e-5 hop_sizes = [2 ** (1/12), 2 ** (1/6), 2 ** (1/4), 2 ** (1/3), 2 ** (1/2), 2 ** (1), 2 ** (2)] for idx, hop in enumerate(hop_sizes): if math.isclose(value, hop, rel_tol = tolerance): index = idx break assert 0 <= index <= 6 return [ '0010', # 2^(1/12) Loading scripts/reverb/text_to_binary_payload.py +7 −7 Original line number Diff line number Diff line Loading @@ -108,8 +108,8 @@ def parse_reverb_text_configuration_and_generate_binary_payload(file): data += bitarray( fgdMethod.Start_Hop_Amount.value # fgdMethod + get_count_or_index_code(eval_option(fg['nrBands'])) # fgdNrBands + get_frequency_code(eval_option(fg['centerFrequency'])) # fgdCenterFreq + get_frequency_hop_code(eval_option(fg['hop']))) # frequencyHop + get_frequency_code(eval_option(fg['startFrequency'])) # fgdCenterFreq + get_frequency_hop_code(eval_option(fg['frequencyHop']))) # frequencyHop elif method == 'defaultBanding': data += bitarray( fgdMethod.Default_Banding.value # fgdMethod Loading @@ -134,11 +134,10 @@ def parse_reverb_text_configuration_and_generate_binary_payload(file): + concatenate(get_dsr_code, eval_option(ae['dsr'])) # revDSR + get_bool_code('earlyReflectionsSize' in ae)) # hasEarlyReflections if 'earlyReflectionsSize' in ae: assert len(eval_option(ae['absorptionCoefficients'])) == 6, 'wrong number of absorption coefficients' assert len(eval_option(ae['absorptionCoeffs'])) == 6, 'wrong number of absorption coefficients' data += bitarray( concatenate(lambda d : get_distance_code(d, True), eval_option(ae['earlyReflectionsSize'])) # erSize + get_count_or_index_code(eval_option(ae['earlyReflectionsfrequencyGridIndex'])) # erFreqGridIdx + concatenate(get_absorption_code, eval_option(ae['absorptionCoefficients'])) # erAbsCoeff + concatenate(get_absorption_code, eval_option(ae['absorptionCoeffs'])) # erAbsCoeff + get_bool_code('listenerOrigin' in ae)) # hasListenerOrigin if 'listenerOrigin' in ae: xyz = eval_option(ae['listenerOrigin']) Loading @@ -148,7 +147,8 @@ def parse_reverb_text_configuration_and_generate_binary_payload(file): get_bool_code(xyz[0] >= 0) # isPositiveX + get_bool_code(xyz[1] >= 0) # isPositiveY + concatenate(lambda d : get_distance_code(d, True), [abs(v) for v in xyz])) # erListenerOrigin data += bitarray(get_bool_code(bool(eval_option(ae['lowComplexity'])))) # lowComplexity lowComplexity = bool(eval_option(ae['lowComplexity'])) if 'lowComplexity' in ae else False data += bitarray(get_bool_code(lowComplexity)) # lowComplexity # parse directivity Loading Loading
lib_util/render_config_reader.c +1 −1 Original line number Diff line number Diff line Loading @@ -2015,7 +2015,7 @@ ivas_error RenderConfigReader_read( fgHasMethod = TRUE; } /* Read number of bands for individual frequency, start-hop-amount mode */ else if ( strcmp( item, "NBANDS" ) == 0 ) else if ( strcmp( item, "NRBANDS" ) == 0 ) { if ( fgMode != FREQ_GRID_MODE_INDIVIDUAL_FREQUENCIES && fgMode != FREQ_GRID_MODE_START_HOP_AMOUNT ) { Loading
scripts/reverb/generate_acoustic_environments_metadata.py +8 −1 Original line number Diff line number Diff line Loading @@ -204,7 +204,14 @@ def get_frequency_code(frequency): return code def get_frequency_hop_code(index): def get_frequency_hop_code(value): index = -1 tolerance = 1e-5 hop_sizes = [2 ** (1/12), 2 ** (1/6), 2 ** (1/4), 2 ** (1/3), 2 ** (1/2), 2 ** (1), 2 ** (2)] for idx, hop in enumerate(hop_sizes): if math.isclose(value, hop, rel_tol = tolerance): index = idx break assert 0 <= index <= 6 return [ '0010', # 2^(1/12) Loading
scripts/reverb/text_to_binary_payload.py +7 −7 Original line number Diff line number Diff line Loading @@ -108,8 +108,8 @@ def parse_reverb_text_configuration_and_generate_binary_payload(file): data += bitarray( fgdMethod.Start_Hop_Amount.value # fgdMethod + get_count_or_index_code(eval_option(fg['nrBands'])) # fgdNrBands + get_frequency_code(eval_option(fg['centerFrequency'])) # fgdCenterFreq + get_frequency_hop_code(eval_option(fg['hop']))) # frequencyHop + get_frequency_code(eval_option(fg['startFrequency'])) # fgdCenterFreq + get_frequency_hop_code(eval_option(fg['frequencyHop']))) # frequencyHop elif method == 'defaultBanding': data += bitarray( fgdMethod.Default_Banding.value # fgdMethod Loading @@ -134,11 +134,10 @@ def parse_reverb_text_configuration_and_generate_binary_payload(file): + concatenate(get_dsr_code, eval_option(ae['dsr'])) # revDSR + get_bool_code('earlyReflectionsSize' in ae)) # hasEarlyReflections if 'earlyReflectionsSize' in ae: assert len(eval_option(ae['absorptionCoefficients'])) == 6, 'wrong number of absorption coefficients' assert len(eval_option(ae['absorptionCoeffs'])) == 6, 'wrong number of absorption coefficients' data += bitarray( concatenate(lambda d : get_distance_code(d, True), eval_option(ae['earlyReflectionsSize'])) # erSize + get_count_or_index_code(eval_option(ae['earlyReflectionsfrequencyGridIndex'])) # erFreqGridIdx + concatenate(get_absorption_code, eval_option(ae['absorptionCoefficients'])) # erAbsCoeff + concatenate(get_absorption_code, eval_option(ae['absorptionCoeffs'])) # erAbsCoeff + get_bool_code('listenerOrigin' in ae)) # hasListenerOrigin if 'listenerOrigin' in ae: xyz = eval_option(ae['listenerOrigin']) Loading @@ -148,7 +147,8 @@ def parse_reverb_text_configuration_and_generate_binary_payload(file): get_bool_code(xyz[0] >= 0) # isPositiveX + get_bool_code(xyz[1] >= 0) # isPositiveY + concatenate(lambda d : get_distance_code(d, True), [abs(v) for v in xyz])) # erListenerOrigin data += bitarray(get_bool_code(bool(eval_option(ae['lowComplexity'])))) # lowComplexity lowComplexity = bool(eval_option(ae['lowComplexity'])) if 'lowComplexity' in ae else False data += bitarray(get_bool_code(lowComplexity)) # lowComplexity # parse directivity Loading