diff --git a/README.md b/README.md index 4707e1d16c2c8769d180c70ffb7259b8c35a5ca4..b0a0912412f01c6d28a637f08d08efae908405d9 100755 --- a/README.md +++ b/README.md @@ -356,6 +356,8 @@ conditions_to_generate: # fs: 48000 ### Additional commandline options; default = null # opts: ["-q", "-no_delay_cmp"] + ### Option to use SBA format of lower or same order (planar also possible) for SBA input formats + # sba_fmt: "PLANARFOA" ### IVAS condition ############################### c07: @@ -383,6 +385,8 @@ conditions_to_generate: # fs: 48000 ### Additional commandline options; default = null # opts: ["-q", "-no_delay_cmp"] + ### Option to use SBA format of lower or same order (planar also possible) for SBA input formats + # sba_fmt: "PLANARFOA" ### EVS condition ################################ c08: @@ -480,8 +484,8 @@ This configuration has to match the channel configuration. If the provided list For the encoding stage `cod` and the decoding stage `dec`, the path to the IVAS_cod and IVAS_dec binaries can be specified under the key `bin`. Additionally some resampling can be applied by using the key `fs` followed by the desired sampling rate. The general bitstream processing configuration can be locally overwritten for each EVS and IVAS condition with the key `tx`. +For IVAS and EVS conditions the `sba_fmt` key is available to specify a SBA format of lower or same order compared to the input for SBA input formats. The additional key `evs_lfe_9k6bps_nb` is only available for EVS conditions and ensures a bitrate of 9.6kbps and narrow band processing of the LFE channel(s). -Also only available for EVS conditions is the `sba_fmt` key where a SBA format of lower order than the input can be specified for SBA input formats. #### IVAS The configuration of the IVAS condition is similar to the EVS condition. However, only one bitrate for all channels (and metadata) can be specified. In addition to that, the encoder and decoder take some additional arguments defined by the key `opts`. diff --git a/examples/TEMPLATE.yml b/examples/TEMPLATE.yml index 382825bc0482d76634fd31cceb5d96df1dc6946e..a5039d4d1f6e327579f3466182c650a113a94dea 100755 --- a/examples/TEMPLATE.yml +++ b/examples/TEMPLATE.yml @@ -211,6 +211,8 @@ conditions_to_generate: ### Bitstream options # tx: ### For possible arguments see overall bitstream modification + ### Option to use SBA format of lower or same order (planar also possible) for SBA input formats + # sba_fmt: "PLANARFOA" ### IVAS condition ############################### c07: @@ -241,6 +243,8 @@ conditions_to_generate: ### Bitstream options # tx: ### For possible arguments see overall bitstream modification + ### Option to use SBA format of lower or same order (planar also possible) for SBA input formats + # sba_fmt: "PLANARFOA" ### EVS condition ################################ c08: diff --git a/ivas_processing_scripts/audiotools/convert/scenebased.py b/ivas_processing_scripts/audiotools/convert/scenebased.py index ab22713d9fe733d0669f2e7c9371286bc538246c..fa7729fb02682ca4bff7ea7761a63143422d4361 100755 --- a/ivas_processing_scripts/audiotools/convert/scenebased.py +++ b/ivas_processing_scripts/audiotools/convert/scenebased.py @@ -174,6 +174,7 @@ def render_sba_to_sba( sba_out.audio = sba_in.audio[:, : sba_out.num_channels] if sba_out.is_planar: + sba_out.audio = sba_in.audio zero_vert_channels(sba_out) diff --git a/ivas_processing_scripts/processing/chains.py b/ivas_processing_scripts/processing/chains.py index 5c35dc3a6500e9027b67fb4f5eb678ca9037a2e1..c11be9a1bc54700ee37cb9d3e6624fefcea19935 100755 --- a/ivas_processing_scripts/processing/chains.py +++ b/ivas_processing_scripts/processing/chains.py @@ -255,7 +255,8 @@ def get_processing_chain( "multiprocessing": cfg.multiprocessing, "mnru_q": tmp_mnru_q, "esdru_alpha": tmp_esdru_alpha, - } + }, + name="mono_dmx", ) ) tmp_in_fmt = "MONO" @@ -333,6 +334,20 @@ def get_processing_chain( cod_cfg = cond_cfg["cod"] dec_cfg = cond_cfg["dec"] + if cond_cfg.get("sba_fmt"): + chain["processes"].append( + Postprocessing( + { + "in_fs": tmp_in_fs, + "in_fmt": tmp_in_fmt, + "out_fs": tmp_in_fs, + "out_fmt": cond_cfg.get("sba_fmt"), + }, + name="sba_fmt_rend", + ) + ) + tmp_in_fmt = cond_cfg.get("sba_fmt") + # 9.6 kbit/s NB for EVS LFE coding only applies to EVS conditions evs_lfe_9k6bps_nb = cond_cfg.get("evs_lfe_9k6bps_nb", None) diff --git a/ivas_processing_scripts/processing/postprocessing.py b/ivas_processing_scripts/processing/postprocessing.py index a8287f65ff05d933dc1d036125d0f95357f78e8a..1d2f224014ca62efae633a3e8e36ab4d4a6b02d6 100755 --- a/ivas_processing_scripts/processing/postprocessing.py +++ b/ivas_processing_scripts/processing/postprocessing.py @@ -38,9 +38,12 @@ from ivas_processing_scripts.processing.processing import Processing class Postprocessing(Processing): - def __init__(self, attrs: dict): + def __init__(self, attrs: dict, name=None): super().__init__(attrs) - self.name = "post" + if name: + self.name = name + else: + self.name = "post" def process(self, in_file: Path, out_file: Path, in_meta, logger: logging.Logger): logger.debug(f"Postprocessing configuration : {self.__dict__}")