Commit 03c6c533 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

Merge branch 'float-1588-fixes-to-the-conformance-script-e-g-filter-behavior' into 'main'

Resolve "Fixes to the conformance script (e.g. --filter) behavior"

See merge request !2613
parents 388c7cf4 48a6d23f
Loading
Loading
Loading
Loading
Loading
+95 −157
Original line number Diff line number Diff line
# IVAS Conformance Scripts
# IVAS Conformance Scripts, ver 3.1

This folder contains scripts for running IVAS conformance tests.

@@ -48,12 +48,11 @@ Running the conformance tests requires around 30 gb of disk space and around 6 g

To run CUT binaries on the targeted platform, it is necessary to have the correct setup for python and dependency packages.

- Create virtual environment for Python 3.13 and install requirements
- Create virtual environment for Python 3.13 and install requirements from the root folder of the IVAS codebase

  ```shell
  python3.13 -m venv pyConformance
  source pyConformance/bin/activate
  cd ivas-codec
  python -m pip install -r scripts/ivas_conformance/requirements.txt
  ```

@@ -67,25 +66,37 @@ PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDi

<details>
<summary>Example Output of CUT execution</summary>
<pre><code>

```console
Accumulating commands from Readme_IVAS_dec.txt
Accumulating commands from Readme_IVAS_rend.txt
Accumulating commands from Readme_IVAS_enc.txt
Accumulating commands from Readme_IVAS_ISAR_post_rend.txt
Accumulating commands from Readme_IVAS_ISAR_dec.txt
Accumulating commands from Readme_IVAS_JBM_dec.txt

No of tests :
    ENC : 381
    DEC : 637
    REND : 666
    ISAR_ENC : 1032
    ISAR : 1032
Executing tests for ENC   (381 tests)
Executing tests for DEC   (637 tests)
Executing tests for REND   (666 tests)
Executing tests for ISAR_ENC   (1032 tests)
Executing tests for ISAR   (1032 tests)
</code></pre>

Executing tests for ENC  (381 tests):
---------------------------
[ENC] OK

...

Summary of results:
---------------------
[ENC] OK
[DEC] OK
[REND] OK
[ISAR_ENC] OK
[ISAR] OK
```

</details>

This should generate outputs in scripts/CUT_OUTPUTS folder which looks like below:-
@@ -106,7 +117,7 @@ If CUT test execution is done on a different platform, the scripts/CUT_OUTPUTS m

### Perform the BE comparison on the CUT outputs on reference platform

The BE comparison is performed to the CUT outputs using the command below. Encoded outputs will be decoded using the reference decoder executables as part of the process. The BE comparison is then performed between the CUT and reference decoded outputs. This includes comparison of ".wav"-files, and ".csv" and ".met" metadata files. If any non-BE results are observed, this is reported on the command-line and link to an analysis ".csv" file is given. The analysis file shows which exact files were non-BE. An example passing output is shown below. If all test sets print `PASSED BE TEST`, then CUT outputs are BE-conformant.
The BE comparison is performed to the CUT outputs using the command below. Encoded outputs are decoded using the reference decoder executables as part of the process. The BE comparison is then performed between the CUT and reference decoded outputs. This includes comparison of `.wav` files and `.csv`/`.met` metadata files. If non-BE results are observed, this is reported on the command line and in the generated analysis CSV output.
  
```shell
PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin --analyse --be-test
@@ -114,30 +125,39 @@ PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDi

<details>
<summary>Example Output of BE comparison</summary>
<pre><code>

```console
Accumulating commands from Readme_IVAS_dec.txt
Accumulating commands from Readme_IVAS_enc.txt
Accumulating commands from Readme_IVAS_rend.txt
Accumulating commands from Readme_IVAS_JBM_dec.txt
Accumulating commands from Readme_IVAS_ISAR_dec.txt
Accumulating commands from Readme_IVAS_ISAR_post_rend.txt

No of tests :
    ENC : 374
    DEC : 638
    REND : 911
    ISAR_ENC : 1032
    ISAR : 1252
Analysing tests for ENC   (374 tests)
&lt;ENC&gt; PASSED BE TEST
Analysing tests for DEC   (638 tests)
&lt;DEC&gt; PASSED BE TEST
Analysing tests for REND   (911 tests)
&lt;REND&gt; PASSED BE TEST
Analysing tests for ISAR_ENC   (1032 tests)
&lt;ISAR_ENC&gt; PASSED BE TEST
Analysing tests for ISAR   (1252 tests)
&lt;ISAR&gt; PASSED BE TEST
</code></pre>

Analysing tests for ENC  (374 tests):
---------------------------

[ENC] OK (ERRORS=0, BE=374, NON-BE=0, MLD CORRIDOR FAILURES=0)
[DEC] OK (ERRORS=0, BE=638, NON-BE=0, MLD CORRIDOR FAILURES=0)

...

Summary of results:
---------------------
[ENC] OK
[DEC] OK
[REND] OK
[ISAR_ENC] OK
[ISAR] OK
```

</details>

### Perform the MLD based non-BE analysis on the CUT outputs on reference platform (Ubuntu 24.04)
@@ -151,187 +171,105 @@ PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDi

<details>
<summary>Example Output of non-BE analysis</summary>
<pre><code>

```console
Accumulating commands from Readme_IVAS_dec.txt
Accumulating commands from Readme_IVAS_enc.txt
Accumulating commands from Readme_IVAS_rend.txt
Accumulating commands from Readme_IVAS_JBM_dec.txt
Accumulating commands from Readme_IVAS_ISAR_dec.txt
Accumulating commands from Readme_IVAS_ISAR_post_rend.txt

No of tests :
    ENC : 374
    DEC : 638
    REND : 911
    ISAR_ENC : 1032
    ISAR : 1252
Analysing tests for ENC   (374 tests)

##########################################################
&lt;ENC&gt; Total Frames: 3074220
&lt;ENC&gt; MAX MLD across all frames : 0.0
&lt;ENC&gt; Frames with MLD == 0 : 3074220 frames (100.0%)
&lt;ENC&gt; Frames with MLD <= 0.5 : 3074220 frames (100.0%)
&lt;ENC&gt; Frames with MLD <= 1 : 3074220 frames (100.0%)
&lt;ENC&gt; Frames with MLD <= 2 : 3074220 frames (100.0%)
&lt;ENC&gt; Frames with MLD <= 5 : 3074220 frames (100.0%)
&lt;ENC&gt; BE samples percentage = 100.0
&lt;ENC&gt; max absolute diff = 0.0, sample range (-32768, 32767)
##########################################################

MLD Corridor passed for ENC with max MLD diff of 0.0
Analysing tests for DEC   (638 tests)

##########################################################
&lt;DEC&gt; Total Frames: 5079252
&lt;DEC&gt; MAX MLD across all frames : 0.0
&lt;DEC&gt; Frames with MLD == 0 : 5079252 frames (100.0%)
&lt;DEC&gt; Frames with MLD <= 0.5 : 5079252 frames (100.0%)
&lt;DEC&gt; Frames with MLD <= 1 : 5079252 frames (100.0%)
&lt;DEC&gt; Frames with MLD <= 2 : 5079252 frames (100.0%)
&lt;DEC&gt; Frames with MLD <= 5 : 5079252 frames (100.0%)
&lt;DEC&gt; BE samples percentage = 100.0
&lt;DEC&gt; max absolute diff = 0.0, sample range (-32768, 32767)
##########################################################

MLD Corridor passed for DEC with max MLD diff of 0.0
Analysing tests for REND   (911 tests)
Analysing tests for ENC  (374 tests):
---------------------------

##########################################################
&lt;REND&gt; Total Frames: 5576907
&lt;REND&gt; MAX MLD across all frames : 0.0
&lt;REND&gt; Frames with MLD == 0 : 5576907 frames (100.0%)
&lt;REND&gt; Frames with MLD <= 0.5 : 5576907 frames (100.0%)
&lt;REND&gt; Frames with MLD <= 1 : 5576907 frames (100.0%)
&lt;REND&gt; Frames with MLD <= 2 : 5576907 frames (100.0%)
&lt;REND&gt; Frames with MLD <= 5 : 5576907 frames (100.0%)
&lt;REND&gt; BE samples percentage = 100.0
&lt;REND&gt; max absolute diff = 0.0, sample range (-32768, 32767)
<ENC> Total Frames: 3074220
<ENC> MAX MLD across all frames : 0.0
<ENC> Frames with MLD == 0 : 3074220 frames (100.0%)
<ENC> Frames with MLD <= 0.5 : 3074220 frames (100.0%)
<ENC> Frames with MLD <= 1 : 3074220 frames (100.0%)
<ENC> Frames with MLD <= 2 : 3074220 frames (100.0%)
<ENC> Frames with MLD <= 5 : 3074220 frames (100.0%)
<ENC> BE samples percentage = 100.0
<ENC> max absolute diff = 0.0, sample range (-32768, 32767)
##########################################################

MLD Corridor passed for REND with max MLD diff of 0.0
Analysing tests for ISAR_ENC   (1032 tests)

##########################################################
&lt;ISAR_ENC&gt; Total Frames: 2125956
&lt;ISAR_ENC&gt; MAX MLD across all frames : 0.0
&lt;ISAR_ENC&gt; Frames with MLD == 0 : 2125956 frames (100.0%)
&lt;ISAR_ENC&gt; Frames with MLD <= 0.5 : 2125956 frames (100.0%)
&lt;ISAR_ENC&gt; Frames with MLD <= 1 : 2125956 frames (100.0%)
&lt;ISAR_ENC&gt; Frames with MLD <= 2 : 2125956 frames (100.0%)
&lt;ISAR_ENC&gt; Frames with MLD <= 5 : 2125956 frames (100.0%)
&lt;ISAR_ENC&gt; BE samples percentage = 100.0
&lt;ISAR_ENC&gt; max absolute diff = 0.0, sample range (-32768, 32767)
##########################################################
[ENC] OK (ERRORS=0, BE=374, NON-BE=0, MLD CORRIDOR FAILURES=0)

MLD Corridor passed for ISAR_ENC with max MLD diff of 0.0
Analysing tests for ISAR   (1252 tests)
...

##########################################################
&lt;ISAR&gt; Total Frames: 2590956
&lt;ISAR&gt; MAX MLD across all frames : 0.0
&lt;ISAR&gt; Frames with MLD == 0 : 2590956 frames (100.0%)
&lt;ISAR&gt; Frames with MLD <= 0.5 : 2590956 frames (100.0%)
&lt;ISAR&gt; Frames with MLD <= 1 : 2590956 frames (100.0%)
&lt;ISAR&gt; Frames with MLD <= 2 : 2590956 frames (100.0%)
&lt;ISAR&gt; Frames with MLD <= 5 : 2590956 frames (100.0%)
&lt;ISAR&gt; BE samples percentage = 100.0
&lt;ISAR&gt; max absolute diff = 0.0, sample range (-32768, 32767)
##########################################################
Summary of results:
---------------------
[ENC] OK
[DEC] OK
[REND] OK
[ISAR_ENC] OK
[ISAR] OK
```

MLD Corridor passed for ISAR with max MLD diff of 0.0
</code></pre>
</details>

## Executing specific tests only

All CUT tests can be run specifically for IVAS Encoder,IVAS Decoder,IVAS Renderer, ISAR Encoder and ISAR Decoder only. The commandline allows for ```-test-mode=<PARAM>``` for this functionality, examples:
Use `--filter TOKEN` to select test groups, output formats, and apply substring matching.

- Run CUT IVAS Encoder Tests Only (on Target Platform)
- Token types:
  - `ENC`, `DEC`, `REND`, `ISAR`, `ISAR_ENC`: test groups.
  - `MONO`, `STEREO`, `EXT`, `HOA`, `SBA`, `MC`: output-format tokens.
    - `HOA` expands to `HOA2`, `HOA3`.
    - `SBA` expands to `FOA`, `HOA2`, `HOA3`.
    - `MC` expands to `5_1`, `7_1`, `5_1_4`, `5_1_2`, `7_1_4`.
  - Any other token is treated as a case-insensitive substring match.
- Token modifiers:
  - `TOKEN`: restrictive token. Multiple restrictive tokens combine with logical AND.
  - `+TOKEN`: additive token. Adds matching tests even if they would otherwise be excluded.
  - `-TOKEN`: subtractive token. Removes matching tests from the final selection.
  - `TOKEN*`: wildcard token. Matches all known tokens starting with the given prefix.
  - `+TOKEN*`, `-TOKEN*`: wildcard token with add/remove behavior.
  - **Note**: wildcards must be quoted in shell (e.g. `'ISAR*'`) to prevent the shell from expanding them as filename globs before the script receives them.

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --cut_build_path=CUT_BIN_DIR --test-mode=ENC
  ```
Examples (non-BE):

- Analyse BE conformance for CUT IVAS Encoder Outputs Only (on Reference Platform)
- Default behavior: run all test groups (ENC, DEC, REND, ISAR, ISAR_ENC)

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin --test-mode=ENC --analyse --be-test
  ```

- Analyse NON-BE conformance for CUT IVAS Encoder Outputs Only (on Reference Platform)

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin --test-mode=ENC --analyse
  ```

- Run CUT IVAS Decoder Tests Only (on Target Platform)

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --cut_build_path=CUT_BIN_DIR --test-mode=DEC
  ```

- Analyse BE conformance for CUT IVAS Decoder Outputs Only

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --test-mode=DEC --analyse --be-test
  ```

- Analyse NON-BE conformance CUT IVAS Decoder Outputs Only (on Reference Platform)

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec  --test-mode=DEC --analyse
  ```

- Run CUT IVAS Renderer Tests Only (on Target Platform)

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --cut_build_path=CUT_BIN_DIR --test-mode=REND
  ```

- Analyse BE conformance for CUT Renderer Outputs Only

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --test-mode=REND --analyse --be-test
  ```

- Analyse NON-BE conformance CUT Renderer Outputs Only

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --test-mode=REND --analyse
  ```

- Run CUT ISAR Encoder Tests Only (on Target Platform)

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --cut_build_path=CUT_BIN_DIR --test-mode=ISAR_ENC
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin --analyse
  ```

- Analyse BE conformance for CUT ISAR Encoder Outputs Only (on Reference Platform)
- Run only REND, ISAR, and ISAR_ENC test groups

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin --test-mode=ISAR_ENC --analyse --be-test
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin --analyse --filter REND ISAR ISAR_ENC
  ```

- Analyse NON-BE conformance for CUT ISAR Encoder Outputs Only (on Reference Platform)
- Run DEC tests with HOA output formats

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin --test-mode=ISAR_ENC --analyse
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin --analyse --filter DEC HOA
  ```

- Run CUT ISAR Decoder Tests Only (on Target Platform)
- Run DEC tests excluding those matching 'voip'

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --cut_build_path=CUT_BIN_DIR --test-mode=ISAR
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin --analyse --filter DEC -voip
  ```

- Analyse BE conformance for CUT ISAR Decoder Outputs Only
- Run DEC tests with any BINAURAL output format

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec  --test-mode=ISAR --analyse --be-test
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin --analyse --filter DEC 'BINAURAL*'
  ```

- Analyse NON-BE conformance CUT ISAR Decoder Outputs Only
- Run ISAR and ISAR_ENC groups, excluding 'voip' tests

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec  --test-mode=ISAR --analyse
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin --analyse --filter 'ISAR*' -voip
  ```
+1 −2
Original line number Diff line number Diff line
@@ -42,12 +42,11 @@ This folder contains scripts for running IVAS conformance tests.
  sudo apt install python3.13 python3.13-venv
  ```

- Create virtual environment for Python 3.13 and install requirements
- Create virtual environment for Python 3.13 and install requirements from the root folder of the IVAS codebase

  ```shell
  python3.13 -m venv pyConformance
  source pyConformance/bin/activate
  cd ivas-codec
  python -m pip install -r tests/requirements.txt
  ```

+329 −135

File changed.

Preview size limit exceeded, changes collapsed.