Commit 364b9e7a authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

Merge branch 'main' into item_generation_scripts

parents 7c0bac40 534dba3e
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -16,3 +16,7 @@ proc_input/*.wav
proc_input/*.pcm
proc_output/
*~
tests/tmp_output_*
tests/cut
tests/ref
tests/concatenation_folder
 No newline at end of file
+39 −0
Original line number Diff line number Diff line
@@ -6,7 +6,18 @@ default:
  interruptible: true


workflow:
  rules:
    # see https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines
    - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
      when: never
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
    - if: $CI_PIPELINE_SOURCE == 'push'
    - if: $CI_PIPELINE_SOURCE == 'web' # for testing


stages:
  - check
  - test
  - analyze

@@ -31,6 +42,18 @@ stages:
  - cd $dir


# ------------------------------------
# check pre-conditions are met
# ------------------------------------
check_for_binaries:
  stage: check
  tags:
    - linux
  script:
    - *print-common-info
    - python3 -m pytest tests/test_binaries_present.py


# ------------------------------------
# functionality tests
# ------------------------------------
@@ -44,9 +67,23 @@ test_audiotools_convert:
    - *print-common-info
    - python3 -m pytest -n auto tests/test_audiotools_convert.py

# run the test configs for the selection experiments
experiments:
  stage: test
  tags:
    - linux
  script:
    - *print-common-info
    - *get-codec-binaries
    - python3 -m pytest -n auto tests/test_experiments.py

# run some test configs for item creation
test_processing:
  stage: test
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
    - if: $CI_PIPELINE_SOURCE == 'push'
      when: never
  tags:
    - linux
  script:
@@ -60,6 +97,7 @@ test_processing:

lint:
  stage: analyze
  needs: []
  tags:
    - linux
  allow_failure: true
@@ -68,6 +106,7 @@ lint:

format:
  stage: analyze
  needs: []
  variables:
    ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix"
    ARTIFACT_FOLDER: "formatting-patch"
+19 −14
Original line number Diff line number Diff line
@@ -103,9 +103,9 @@ conditions_to_generate:
      bitrates:
          - 9600
      cod:
          bin: ~/git/ivas-codec/IVAS_cod
          bin: ~/git/ivas-codec/EVS_cod
      dec:
          bin: ~/git/ivas-codec/IVAS_dec
          bin: ~/git/ivas-codec/EVS_dec
postprocessing:
    fmt: "BINAURAL"
	fs: 48000
@@ -133,6 +133,8 @@ postprocessing:
# delete_tmp: true
### Master seed for random processes like bitstream error pattern generation; default = 0
# master_seed: 5
### Additional seed to specify number of preruns (used for background noise delay and FER bitstream processing); default = 0
# prerun_seed: 2

### Any relative paths will be interpreted relative to the working directory the script is called from!
### Usage of absolute paths is recommended.
@@ -193,8 +195,8 @@ input:
# preprocessing:
    ### Target format used in rendering from input format; default = null (no rendering)
    # fmt: "7_1_4"
    ### Flag for application of 50Hz high-pass filter; default = false
    # hp50: true
    ### Define mask (HP50 or 20KBP) for input signal filtering; default = null
    # mask: "HP50"
    ### Target sampling rate in Hz for resampling; default = null (no resampling)
    # fs: 16000
    ### Target loudness in LKFS; default = null (no loudness change applied)
@@ -241,8 +243,6 @@ input:
        # snr: 10
        ### REQUIRED: Path to background noise, must have same format and sampling rate as input signal(s)
        # background_noise_path: ".../noise.wav"
        ### Seed for delay offest; default = 0
        # seed_delay: 10
```

</details>
@@ -275,8 +275,6 @@ input:
    # error_pattern: "path/pattern.192"
    ### Error rate in percent
    # error_rate: 5
	### Additional seed to specify number of preruns; default = 0
    # prerun_seed: 2
```
</details>

@@ -296,7 +294,7 @@ input:
###     mnru       generate MNRU condition
###     esdru      generate ESDRU condition
###     mono_dmx   generate mono downmix condition
###     evs        generate an EVS coded condition (see below examples for additional required keys) (currently uses IVAS EVS mode)
###     evs        generate an EVS coded condition (see below examples for additional required keys)
###     ivas       generate an IVAS coded condition (see below examples for additional required keys)
conditions_to_generate:
  ### Reference and anchor conditions ##########################
@@ -386,16 +384,20 @@ conditions_to_generate:
      bitrates:
          # - 9600
          - [13200, 13200, 8000, 13200, 9600]
      ### for multi-channel configs, code LFE with 9.6 kbps NB (as mandated by IVAS-3)
      evs_lfe_9k6bps_nb: true
      cod:
          ### Path to encoder binary; default search for IVAS_cod in bin folder (primary) and PATH (secondary)
          bin: ~/git/ivas-codec/IVAS_cod
          ### Path to encoder binary; default search for EVS_cod in bin folder (primary) and PATH (secondary)
          bin: ~/git/ivas-codec/EVS_cod
          ### Encoder input sampling rate in Hz (resampling performed in case of mismatch); default = null (no resampling)
          # fs: 32000
      dec:
          ### Path to encoder binary; default search for IVAS_dec in bin folder (primary) and PATH (secondary)
          bin: ~/git/ivas-codec/IVAS_dec
          ### Path to encoder binary; default search for EVS_dec in bin folder (primary) and PATH (secondary)
          bin: ~/git/ivas-codec/EVS_dec
          ### Decoder output sampling rate; default = null (same as input)
          # fs: 48000
	  ### Option to use SBA format of lower or same order (planar also possible) for SBA input formats
      # sba_format: "PLANARFOA"
```

</details>
@@ -468,6 +470,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`.
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_format` 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`.
@@ -509,7 +513,7 @@ The following additional executables are needed for the different processing ste

| Processing step                                 | Executable            | Where to find                                                                                               |
|-------------------------------------------------|-----------------------|-------------------------------------------------------------------------------------------------------------|
| Loudness measurement and adjustment             | bs1770demo            | https://github.com/openitu/STL                                                                              |
| Loudness measurement and adjustment             | bs1770demo            | https://github.com/ErikNorvell-Ericsson/STL (Note branch)                                                                             |
| MNRU                                            | p50fbmnru             | https://github.com/openitu/STL                                                                              |
| ESDRU                                           | esdru                 | https://github.com/openitu/STL                                                                              |
| Frame error pattern application                 | eid-xor               | https://github.com/openitu/STL                                                                              |
@@ -518,6 +522,7 @@ The following additional executables are needed for the different processing ste
| Random offset/seed generation (necessary for background noise and FER bitstream processing)   | random                | https://www.3gpp.org/ftp/tsg_sa/WG4_CODEC/TSGS4_76/docs/S4-131277.zip                                       |
| JBM network simulator                           | networkSimulator_g192 | https://www.3gpp.org/ftp/tsg_sa/WG4_CODEC/TSGS4_76/docs/S4-131277.zip                                       |
| MASA rendering (also used in loudness measurement of MASA items)        | masaRenderer        | https://www.3gpp.org/ftp/TSG_SA/WG4_CODEC/TSGS4_122_Athens/Docs/S4-230221.zip         |
| EVS reference conditions        | EVS_cod, EVS_dec      | https://www.3gpp.org/ftp/Specs/archive/26_series/26.443/26443-h00.zip                                       |

The necessary binaries have to be either placed in the [ivas_processing_scripts/bin](./ivas_processing_scripts/bin) folder or the path has to be specified in 
[ivas_processing_scripts/binary_paths.yml](./ivas_processing_scripts/binary_paths.yml).
+17 −13
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@
# delete_tmp: true
### Master seed for random processes like bitstream error pattern generation; default = 0
# master_seed: 5
### Additional seed to specify number of preruns (used for background noise delay and FER bitstream processing); default = 0
# prerun_seed: 2

### Any relative paths will be interpreted relative to the working directory the script is called from!
### Usage of absolute paths is recommended.
@@ -64,8 +66,8 @@ input:
# preprocessing:
    ### Target format used in rendering from input format; default = null (no rendering)
    # fmt: "7_1_4"
    ### Flag for application of 50Hz high-pass filter; default = false
    # hp50: true
    ### Define mask (HP50 or 20KBP) for input signal filtering; default = null
    # mask: "HP50"
    ### Target sampling rate in Hz for resampling; default = null (no resampling)
    # fs: 16000
    ### Target loudness in LKFS; default = null (no loudness change applied)
@@ -108,8 +110,6 @@ input:
        # snr: 10
        ### REQUIRED: Path to background noise, must have same format and sampling rate as input signal(s)
        # background_noise_path: ".../noise.wav"
        ### Seed for delay offest; default = 0
        # seed_delay: 10

#################################################
### Bitstream processing
@@ -136,8 +136,6 @@ input:
    # error_pattern: "path/pattern.192"
    ### Error rate in percent
    # error_rate: 5
    ### Additional seed to specify number of preruns; default = 0
    # prerun_seed: 2
    
################################################
### Configuration for conditions under test
@@ -151,7 +149,7 @@ input:
###     mnru       generate MNRU condition
###     esdru      generate ESDRU condition
###     mono_dmx   generate mono downmix condition
###     evs        generate an EVS coded condition (see below examples for additional required keys) (currently uses IVAS EVS mode)
###     evs        generate an EVS coded condition (see below examples for additional required keys)
###     ivas       generate an IVAS coded condition (see below examples for additional required keys)
conditions_to_generate:
  ### Reference and anchor conditions ##########################
@@ -247,19 +245,25 @@ conditions_to_generate:
      bitrates:
          # - 9600
          - [13200, 13200, 8000, 13200, 9600]
      ### for multi-channel configs, code LFE with 9.6 kbps NB (as mandated by IVAS-3)
      # evs_lfe_9k6bps_nb: true
      ### Encoder options
      cod:
          ### Path to encoder binary; default search for IVAS_cod in bin folder (primary) and PATH (secondary)
          bin: ~/git/ivas-codec/IVAS_cod
          ### Path to encoder binary; default search for EVS_cod in bin folder (primary) and PATH (secondary)
          bin: EVS_cod
          ### Encoder input sampling rate in Hz (resampling performed in case of mismatch); default = null (no resampling)
          # fs: 32000
      ### Decoder options
      dec:
          ### Path to encoder binary; default search for IVAS_dec in bin folder (primary) and PATH (secondary)
          bin: ~/git/ivas-codec/IVAS_dec
          ### Path to encoder binary; default search for EVS_dec in bin folder (primary) and PATH (secondary)
          bin: EVS_dec
          ### Decoder output sampling rate; default = null (same as input)
          # fs: 48000
      ### 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_format: "PLANARFOA"

################################################
### Post-processing
@@ -283,7 +287,7 @@ postprocessing:
    # bin_dataset: SADIE
    ### Render LFE to binaural output with the specified gain (only valid for channel-based input); default = null
    # bin_lfe_gain: 1
    ### Flag whether output should be limited to avoid clipping (can alter target loudness); default = true
    # limit: false
    ### Flag whether output should be limited to avoid clipping (can alter target loudness); default = false
    # limit: true
    ### Head-tracking trajectory file for binaural output; default = null
    # trajectory: "path/to/file"
+96 −0
Original line number Diff line number Diff line
---
################################################
# General configuration
################################################

name: BS1534-1a
master_seed: 5
prerun_seed: 2

input_path: "experiments/selection/BS1534-1a/proc_input"
output_path: "experiments/selection/BS1534-1a/proc_output"

################################################
### Input configuration
################################################
input:
    fmt: "STEREO"
    fs: 48000

################################################
### Pre-processing on individual items
################################################
preprocessing:
    mask: "20KBP"
    loudness: -26
    window: 100

################################################
### Pre-processing on whole signal(s)
################################################
preprocessing_2:
    concatenate_input: true
    # concatenation_order: []
    preamble: 10000
    preamble_noise: true

#################################################
### Bitstream processing
#################################################

################################################
### Configuration for conditions under test
################################################
conditions_to_generate:
    ### Reference and anchor conditions ##########################
    c01:
        type: ref
    c02:
        type: lp7k

    ### EVS condition ################################
    c03:
        type: evs
        bitrates:
            - 24400
        cod:
            opts: ["-max_band", "FB"]
        dec:
    c04:
        type: evs
        bitrates:
            - 32000
        cod:
            opts: ["-max_band", "FB"]
        dec:
    c05:
        type: evs
        bitrates:
            - 48000
        cod:
            opts: ["-max_band", "FB"]
        dec:

    ### IVAS condition ###############################
    c06:
        type: ivas
        bitrates:
            - 48000
        cod:
        dec:
            fmt: "STEREO"
    c7:
        type: ivas
        bitrates:
            - 64000
        cod:
        dec:
            fmt: "STEREO"

################################################
### Post-processing
################################################
postprocessing:
    fmt: "STEREO"
    fs: 48000
    loudness: -26
Loading