Commit e44e6d94 authored by Anika Treffehn's avatar Anika Treffehn
Browse files

Merge branch 'FER_problem_for_conditions' into 'main'

fixed bitstream procesing for individual conditions

See merge request !21
parents 71e7dd08 4b0a7410
Loading
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -203,6 +203,9 @@ conditions_to_generate:
          # fs: 48000
          ### Additional commandline options; default = null
          # opts: ["-q", "-no_delay_cmp"]
      ### Bitstream options
      # tx:
          ### For possible arguments see overall bitstream modification

  ### IVAS condition ###############################
  c07:
@@ -230,6 +233,9 @@ conditions_to_generate:
          # fs: 48000
          ### Additional commandline options; default = null
          # opts: ["-q", "-no_delay_cmp"]
      ### Bitstream options
      # tx:
          ### For possible arguments see overall bitstream modification
            
  ### EVS condition ################################
  c08:
@@ -251,6 +257,9 @@ conditions_to_generate:
          bin: ~/git/ivas-codec/IVAS_dec
          ### Decoder output sampling rate; default = null (same as input)
          # fs: 48000
      ### Bitstream options
      # tx:
          ### For possible arguments see overall bitstream modification

################################################
### Post-processing
+34 −26
Original line number Diff line number Diff line
@@ -239,23 +239,27 @@ def get_processing_chain(
        dec_cfg = cond_cfg["dec"]

        # Frame error pattern bitstream modification
        if "tx" in cond_cfg.keys() or hasattr(cfg, "tx"):
            # local specification overwrites global one
            if "tx" in cond_cfg.keys():
            tx_cfg = cond_cfg["tx"]
        elif hasattr(cfg, "tx"):
            if cfg.tx.get("type", None) == "FER":
                tx_cfg_tmp = cond_cfg["tx"]
            else:
                tx_cfg_tmp = cfg.tx

            if tx_cfg_tmp.get("type", None) == "FER":
                tx_cfg = {
                    "type": cfg.tx.get("type", None),
                    "error_pattern": cfg.tx.get("error_pattern", None),
                    "error_rate": cfg.tx.get("error_rate", None),
                    "type": tx_cfg_tmp.get("type", None),
                    "error_pattern": tx_cfg_tmp.get("error_pattern", None),
                    "error_rate": tx_cfg_tmp.get("error_rate", None),
                    "master_seed": cfg.master_seed,
                    "prerun_seed": cfg.tx.get("prerun_seed", 0),
                    "prerun_seed": tx_cfg_tmp.get("prerun_seed", 0),
                }
            elif cfg.tx.get("type", None) == "JBM":
            elif tx_cfg_tmp.get("type", None) == "JBM":
                tx_cfg = {
                    "type": cfg.tx.get("type", None),
                    "error_pattern": cfg.tx.get("error_pattern", None),
                    "error_profile": cfg.tx.get("error_profile", None),
                    "n_frames_per_packet": cfg.tx.get("n_frames_per_packet", 1),
                    "type": tx_cfg_tmp.get("type", None),
                    "error_pattern": tx_cfg_tmp.get("error_pattern", None),
                    "error_profile": tx_cfg_tmp.get("error_profile", None),
                    "n_frames_per_packet": tx_cfg_tmp.get("n_frames_per_packet", None),
                }
            else:
                raise ValueError(
@@ -294,23 +298,27 @@ def get_processing_chain(
        dec_cfg = cond_cfg["dec"]

        # Frame error pattern bitstream modification
        if "tx" in cond_cfg.keys() or hasattr(cfg, "tx"):
            # local specification overwrites global one
            if "tx" in cond_cfg.keys():
            tx_cfg = cond_cfg["tx"]
        elif hasattr(cfg, "tx"):
            if cfg.tx.get("type", None) == "FER":
                tx_cfg_tmp = cond_cfg["tx"]
            else:
                tx_cfg_tmp = cfg.tx

            if tx_cfg_tmp.get("type", None) == "FER":
                tx_cfg = {
                    "type": cfg.tx.get("type", None),
                    "error_pattern": cfg.tx.get("error_pattern", None),
                    "error_rate": cfg.tx.get("error_rate", None),
                    "type": tx_cfg_tmp.get("type", None),
                    "error_pattern": tx_cfg_tmp.get("error_pattern", None),
                    "error_rate": tx_cfg_tmp.get("error_rate", None),
                    "master_seed": cfg.master_seed,
                    "prerun_seed": cfg.tx.get("prerun_seed", 0),
                    "prerun_seed": tx_cfg_tmp.get("prerun_seed", 0),
                }
            elif cfg.tx.get("type", None) == "JBM":
            elif tx_cfg_tmp.get("type", None) == "JBM":
                tx_cfg = {
                    "type": cfg.tx.get("type", None),
                    "error_pattern": cfg.tx.get("error_pattern", None),
                    "error_profile": cfg.tx.get("error_profile", None),
                    "n_frames_per_packet": cfg.tx.get("n_frames_per_packet", None),
                    "type": tx_cfg_tmp.get("type", None),
                    "error_pattern": tx_cfg_tmp.get("error_pattern", None),
                    "error_profile": tx_cfg_tmp.get("error_profile", None),
                    "n_frames_per_packet": tx_cfg_tmp.get("n_frames_per_packet", None),
                }
            else:
                raise ValueError(