diff --git a/examples/TEMPLATE.yml b/examples/TEMPLATE.yml index b09e327d455c9a74af4a976e0dbe7e301eb60397..a4a681daf587d0db3645b6db8ecfcb605956cf6b 100755 --- a/examples/TEMPLATE.yml +++ b/examples/TEMPLATE.yml @@ -1,3 +1,4 @@ +# !yamlfmt!:ignore --- ################################################ # General configuration @@ -11,7 +12,7 @@ ### Whether to use multiprocessing; default = true # multiprocessing: false -### Deletion of temporary directories containing +### Deletion of temporary directories containing ### intermediate processing files, bitstreams etc.; default = false # delete_tmp: true ### Master seed for random processes like bitstream error pattern generation; default = 0 @@ -137,7 +138,7 @@ input: # tx: ### REQUIRED: Type of bitstream processing; possible types: "JBM" or "FER" # type: "JBM" - + ### JBM ### REQUIRED: either error_pattern (and errpatt_late_loss_rate or errpatt_delay) or error_profile ### delay error profile file @@ -152,14 +153,14 @@ input: # n_frames_per_packet: 2 ### Seed for error pattern shift in JBM; default = 0 or determined by profile number # errpatt_seed: 0 - + ### FER ### REQUIRED: either error_pattern or error_rate ### Frame error pattern file # error_pattern: "path/pattern.192" ### Error rate in percent # error_rate: 5 - + ################################################ ### Configuration for conditions under test ################################################ @@ -179,6 +180,10 @@ conditions_to_generate: c01: ### REQUIRED: type of condition type: ref + ### applied BEFORE condition processing: + ### optional per-condition input loudness with bs1770demo (can be used in all conditions) + # in_loudness: -16 + ### applied AFTER condition processing: ### optional low-pass cut-off frequency in Hz; default = null # out_fc: 22500 ### optional use of IVAS_rend (can be used in all conditions) @@ -205,7 +210,7 @@ conditions_to_generate: c05: ### REQUIRED: type of condition type: mono_dmx - + ### IVAS condition ############################### c06: ### REQUIRED: type of condition @@ -273,7 +278,7 @@ conditions_to_generate: ### Bitstream options # tx: ### For possible arguments see overall bitstream modification - + ### EVS condition ################################ c08: ### REQUIRED: type of condition @@ -309,7 +314,7 @@ conditions_to_generate: ### Post-processing is required and can not be omitted postprocessing: ### REQUIRED: Target format for output, this can be a string as below, or a list, e.g. ["FOA", "BINAURAL"]. - ### Conversion will be applied in order and the last format is the final output forma. This was introduced to + ### Conversion will be applied in order and the last format is the final output forma. This was introduced to ### accomodate for the MASA tests where masaRenderer is used as binaural renderer for all conditions. fmt: "BINAURAL" ### REQUIRED: Target sampling rate in Hz for resampling diff --git a/ivas_processing_scripts/processing/chains.py b/ivas_processing_scripts/processing/chains.py index 3c0bbaf4c2a33b1a5cc5e6dfac91cc347dfd980f..60894c3f6bf782132860334c029fe4c679ea2a10 100755 --- a/ivas_processing_scripts/processing/chains.py +++ b/ivas_processing_scripts/processing/chains.py @@ -246,6 +246,19 @@ def get_processing_chain( # override / add values based on specific conditions cond_cfg = cfg.conditions_to_generate[condition] + # global input gain per condition + if cond_cfg.get("in_loudness"): + chain["processes"].append( + Preprocessing( + { + "in_fs": tmp_in_fs, + "in_fmt": tmp_in_fmt, + "in_loudness": cond_cfg.get("in_loudness"), + "multiprocessing": cfg.multiprocessing, + } + ) + ) + if cond_cfg["type"] == "ref": # allow list of output formats if (ref_fmt := cond_cfg.get("fmt", None)) is not None: @@ -497,7 +510,7 @@ def get_processing_chain( raise SystemExit(f"Unknown condition {condition}!") # add optional IVAS_rend rendering step after each condition - if cond_cfg.get("ivas_rend", -1) != -1: + if cond_cfg.get("ivas_rend"): rend_cfg = cond_cfg["ivas_rend"] chain["processes"].append( IVAS_rend( diff --git a/ivas_processing_scripts/processing/config.py b/ivas_processing_scripts/processing/config.py index 315ddae95b9b470d03f6d36eedf61b7b3253e19d..015d5248f3e5199b00c09f818904be8994bf2417 100755 --- a/ivas_processing_scripts/processing/config.py +++ b/ivas_processing_scripts/processing/config.py @@ -255,7 +255,7 @@ class TestConfig: f"The following key must be specified for ESDRU: {REQUIRED_KEYS_ESDRU}" ) - if cfg["conditions_to_generate"][cond_name].get("ivas_rend", -1) != -1: + if cfg["conditions_to_generate"][cond_name].get("ivas_rend"): merged_cfg = get_default_config_for_renderer( "IVAS", codec_bin_extension )