Commit 4b5defdf authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Merge branch 'enable-per-condition-loudness' into 'main'

Enable per-condition input loudness

See merge request !161
parents 218f3e31 f3dd4025
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
# !yamlfmt!:ignore
---
################################################
# General configuration
@@ -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)
+14 −1
Original line number Diff line number Diff line
@@ -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(
+1 −1
Original line number Diff line number Diff line
@@ -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
                )