Loading README.md +19 −7 Original line number Diff line number Diff line Loading @@ -222,16 +222,28 @@ input: <summary>Click to expand</summary> ```yaml ### Bistream processing (transport simulation) done after encoding and before decoding ### Bitstream processing (transport simulation) done after encoding and before decoding ### e.g. frame error insertion or transport simulation for JBM testing ### can be given globally or in individual conditions of type ivas or evs # tx: ### REQUIRED: Path to network simulation binary # bs_proc_bin: ".../ivas_python_testscripts/networkSimulator_g192.exe" ### Path to error pattern (mandatory if no information for generating the error pattern is given) ### REQUIRED: Type of bitstream processing; possible types: "jbm" or "fer" #type: "jbm" ### JBM ### REQUIRED: either error_pattern or error_profile ### delay error profile file # error_pattern: ".../dly_error_profile.dat" ### options for the binary, possible placeholders are {error_pattern} for the error pattern, ### {bitstream} for the bitstream to process and {bitstream_processed} for the processed bitstream # bs_proc_opts: [ "{error_pattern}", "{bitstream}", "{processed_bitstream}", "{processed_bitstream}_tracefile_sim", "2", "0" ] ### Index of one of the existing delay error profile files to use (1-11) # error_profile: 5 ## nFramesPerPacket parameter for the network simulator (optional); default = 1 # n_frames_per_packet: 2 ### FER ### REQUIRED: either error_pattern or error_rate ### Frame error pattern file # error_pattern: "path/pattern.192" ### Error rate in percent # error_rate: 5 ``` </details> Loading examples/TEMPLATE.yml +9 −7 Original line number Diff line number Diff line Loading @@ -92,19 +92,21 @@ input: ################################################# ### Bitstream processing ################################################# ### Bistream processing (transport simulation) done after encoding and before decoding ### Bitstream processing (transport simulation) done after encoding and before decoding ### e.g. frame error insertion or transport simulation for JBM testing ### can be given globally here or in individual conditions of type ivas or evs # tx: ### REQUIRED: Type of bitsream processing; possible types: "jbm" or "fer" ### REQUIRED: Type of bitstream processing; possible types: "jbm" or "fer" #type: "jbm" ### JBM ### Path to delay error pattern (mandatory if no information for generating the error pattern is given) ### REQUIRED: either error_pattern or error_profile ### delay error profile file # error_pattern: ".../dly_error_profile.dat" ## # error_profile: ## ; defalt = 1 # n_frames_per_paket: 2 ### Index of one of the existing delay error profile files to use (1-11) # error_profile: 5 ## nFramesPerPacket parameter for the network simulator (optional); default = 1 # n_frames_per_packet: 2 ### FER ### REQUIRED: either error_pattern or error_rate Loading ivas_processing_scripts/audiotools/wrappers/networkSimulator.py +9 −9 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ ERROR_PATTERNS_DIR = Path(__file__).parent.parent.parent.joinpath("dly_error_pro def validate_network_simulator( error_pattern: Optional[Union[Path, str]] = None, error_profile: Optional[int] = None, n_frames_per_paket: Optional[int] = None, n_frames_per_packet: Optional[int] = None, ) -> None: """ Validate settings for the network simulator Loading Loading @@ -77,7 +77,7 @@ def validate_network_simulator( raise ValueError( f"JBM profile number {error_profile} does not exist, should be between {LIST_JBM_PROFILES[0]} and {LIST_JBM_PROFILES[-1]}" ) if n_frames_per_paket is not None and n_frames_per_paket not in [1, 2]: if n_frames_per_packet is not None and n_frames_per_packet not in [1, 2]: raise ValueError( f"n_frames_per_paket is {n_frames_per_paket}. Should be 1 or 2. Please check your configuration." ) Loading @@ -89,7 +89,7 @@ def network_simulator( error_pattern: Union[str, Path], in_bitstream: Union[str, Path], out_bitstream: Union[str, Path], n_frames_per_paket: int, n_frames_per_packet: int, ) -> None: """ Wrapper for networkSimulator_g192 binary to apply error patterns for the bitstream processing Loading Loading @@ -126,7 +126,7 @@ def network_simulator( in_bitstream, out_bitstream, f"{out_bitstream}_tracefile_sim", str(n_frames_per_paket), str(n_frames_per_packet), "0" ] Loading @@ -141,7 +141,7 @@ def apply_network_simulator( out_bitstream: Union[Path, str], error_pattern: Optional[Union[Path, str]] = None, error_profile: Optional[int] = None, n_frames_per_paket: Optional[int] = None, n_frames_per_packet: Optional[int] = None, ) -> None: """ Function to apply a network simulator profile to a bitstreaam Loading Loading @@ -178,12 +178,12 @@ def apply_network_simulator( "JBM pattern and JBM profile number are specified for bitstream processing. Can't use both" ) if n_frames_per_paket is None: n_frames_per_paket = 1 if n_frames_per_packet is None: n_frames_per_packet = 1 if error_profile is not None and error_profile == 5: n_frames_per_paket = 2 n_frames_per_packet = 2 # apply error pattern network_simulator(error_pattern, in_bitstream, out_bitstream, n_frames_per_paket) network_simulator(error_pattern, in_bitstream, out_bitstream, n_frames_per_packet) return ivas_processing_scripts/processing/chains.py +1 −1 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ def get_processing_chain( "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_paket": cfg.tx.get("n_frames_per_paket", 1), "n_frames_per_packet": cfg.tx.get("n_frames_per_packet", 1), } else: raise ValueError("Type of bitstream procesing either missing or not valid") Loading ivas_processing_scripts/processing/ivas.py +2 −2 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ class IVAS(Processing): if self.tx.get("type", None) == "JBM": validate_network_simulator(self.tx["error_pattern"], self.tx["error_profile"], self.tx["n_frames_per_paket"]) self.tx["n_frames_per_packet"]) elif self.tx.get("type", None) == "FER": # TODO pass Loading Loading @@ -218,7 +218,7 @@ class IVAS(Processing): bitstream_processed, self.tx["error_pattern"], self.tx["error_profile"], self.tx["n_frames_per_paket"], self.tx["n_frames_per_packet"], ) # add -voip cmdline option to the decoder # TODO: tracefile also? Loading Loading
README.md +19 −7 Original line number Diff line number Diff line Loading @@ -222,16 +222,28 @@ input: <summary>Click to expand</summary> ```yaml ### Bistream processing (transport simulation) done after encoding and before decoding ### Bitstream processing (transport simulation) done after encoding and before decoding ### e.g. frame error insertion or transport simulation for JBM testing ### can be given globally or in individual conditions of type ivas or evs # tx: ### REQUIRED: Path to network simulation binary # bs_proc_bin: ".../ivas_python_testscripts/networkSimulator_g192.exe" ### Path to error pattern (mandatory if no information for generating the error pattern is given) ### REQUIRED: Type of bitstream processing; possible types: "jbm" or "fer" #type: "jbm" ### JBM ### REQUIRED: either error_pattern or error_profile ### delay error profile file # error_pattern: ".../dly_error_profile.dat" ### options for the binary, possible placeholders are {error_pattern} for the error pattern, ### {bitstream} for the bitstream to process and {bitstream_processed} for the processed bitstream # bs_proc_opts: [ "{error_pattern}", "{bitstream}", "{processed_bitstream}", "{processed_bitstream}_tracefile_sim", "2", "0" ] ### Index of one of the existing delay error profile files to use (1-11) # error_profile: 5 ## nFramesPerPacket parameter for the network simulator (optional); default = 1 # n_frames_per_packet: 2 ### FER ### REQUIRED: either error_pattern or error_rate ### Frame error pattern file # error_pattern: "path/pattern.192" ### Error rate in percent # error_rate: 5 ``` </details> Loading
examples/TEMPLATE.yml +9 −7 Original line number Diff line number Diff line Loading @@ -92,19 +92,21 @@ input: ################################################# ### Bitstream processing ################################################# ### Bistream processing (transport simulation) done after encoding and before decoding ### Bitstream processing (transport simulation) done after encoding and before decoding ### e.g. frame error insertion or transport simulation for JBM testing ### can be given globally here or in individual conditions of type ivas or evs # tx: ### REQUIRED: Type of bitsream processing; possible types: "jbm" or "fer" ### REQUIRED: Type of bitstream processing; possible types: "jbm" or "fer" #type: "jbm" ### JBM ### Path to delay error pattern (mandatory if no information for generating the error pattern is given) ### REQUIRED: either error_pattern or error_profile ### delay error profile file # error_pattern: ".../dly_error_profile.dat" ## # error_profile: ## ; defalt = 1 # n_frames_per_paket: 2 ### Index of one of the existing delay error profile files to use (1-11) # error_profile: 5 ## nFramesPerPacket parameter for the network simulator (optional); default = 1 # n_frames_per_packet: 2 ### FER ### REQUIRED: either error_pattern or error_rate Loading
ivas_processing_scripts/audiotools/wrappers/networkSimulator.py +9 −9 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ ERROR_PATTERNS_DIR = Path(__file__).parent.parent.parent.joinpath("dly_error_pro def validate_network_simulator( error_pattern: Optional[Union[Path, str]] = None, error_profile: Optional[int] = None, n_frames_per_paket: Optional[int] = None, n_frames_per_packet: Optional[int] = None, ) -> None: """ Validate settings for the network simulator Loading Loading @@ -77,7 +77,7 @@ def validate_network_simulator( raise ValueError( f"JBM profile number {error_profile} does not exist, should be between {LIST_JBM_PROFILES[0]} and {LIST_JBM_PROFILES[-1]}" ) if n_frames_per_paket is not None and n_frames_per_paket not in [1, 2]: if n_frames_per_packet is not None and n_frames_per_packet not in [1, 2]: raise ValueError( f"n_frames_per_paket is {n_frames_per_paket}. Should be 1 or 2. Please check your configuration." ) Loading @@ -89,7 +89,7 @@ def network_simulator( error_pattern: Union[str, Path], in_bitstream: Union[str, Path], out_bitstream: Union[str, Path], n_frames_per_paket: int, n_frames_per_packet: int, ) -> None: """ Wrapper for networkSimulator_g192 binary to apply error patterns for the bitstream processing Loading Loading @@ -126,7 +126,7 @@ def network_simulator( in_bitstream, out_bitstream, f"{out_bitstream}_tracefile_sim", str(n_frames_per_paket), str(n_frames_per_packet), "0" ] Loading @@ -141,7 +141,7 @@ def apply_network_simulator( out_bitstream: Union[Path, str], error_pattern: Optional[Union[Path, str]] = None, error_profile: Optional[int] = None, n_frames_per_paket: Optional[int] = None, n_frames_per_packet: Optional[int] = None, ) -> None: """ Function to apply a network simulator profile to a bitstreaam Loading Loading @@ -178,12 +178,12 @@ def apply_network_simulator( "JBM pattern and JBM profile number are specified for bitstream processing. Can't use both" ) if n_frames_per_paket is None: n_frames_per_paket = 1 if n_frames_per_packet is None: n_frames_per_packet = 1 if error_profile is not None and error_profile == 5: n_frames_per_paket = 2 n_frames_per_packet = 2 # apply error pattern network_simulator(error_pattern, in_bitstream, out_bitstream, n_frames_per_paket) network_simulator(error_pattern, in_bitstream, out_bitstream, n_frames_per_packet) return
ivas_processing_scripts/processing/chains.py +1 −1 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ def get_processing_chain( "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_paket": cfg.tx.get("n_frames_per_paket", 1), "n_frames_per_packet": cfg.tx.get("n_frames_per_packet", 1), } else: raise ValueError("Type of bitstream procesing either missing or not valid") Loading
ivas_processing_scripts/processing/ivas.py +2 −2 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ class IVAS(Processing): if self.tx.get("type", None) == "JBM": validate_network_simulator(self.tx["error_pattern"], self.tx["error_profile"], self.tx["n_frames_per_paket"]) self.tx["n_frames_per_packet"]) elif self.tx.get("type", None) == "FER": # TODO pass Loading Loading @@ -218,7 +218,7 @@ class IVAS(Processing): bitstream_processed, self.tx["error_pattern"], self.tx["error_profile"], self.tx["n_frames_per_paket"], self.tx["n_frames_per_packet"], ) # add -voip cmdline option to the decoder # TODO: tracefile also? Loading