Commit d0399d3d authored by fotopoulou's avatar fotopoulou
Browse files

Merge branch 'main' into fix-basop-issue-1585-cut-bs-crash

parents 2cc4b9d1 8ed246c7
Loading
Loading
Loading
Loading
Loading
+126 −107
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

This folder contains scripts for running IVAS conformance tests.

## Setup for Reference Platform
## Setup Used for Conformance package generation Platform

Reference platform is Ubuntu 24.04

@@ -12,7 +12,7 @@ This folder contains scripts for running IVAS conformance tests.
  lsb_release -d | grep Ubuntu
  ```

  <span style="color: green;"> # It might be similar to Ubuntu 24.04.3 LTS </span>
It might be similar to Ubuntu 24.04.3 LTS

- Install Clang 18 compiler

@@ -51,49 +51,6 @@ This folder contains scripts for running IVAS conformance tests.
  python -m pip install -r tests/requirements.txt
  ```

## Reference Conformance Package Generation

<details>
<summary> <i> Expand for detailed procedure </i> </summary>

To generate reference conformance package for distribution

### Generate Reference Outputs and Readme.txt files

  ```shell
  sh scripts/ivas_conformance/ivas_be_conf_test_gen.sh
  ```

<details>
<summary> Example output of reference test generation </summary>
<pre><code>
::::::::::::::::::::::::
------------------------------------------
Generated html report: file:///home/dolby/git/ivas-codec/report_cmd.htm
------------------------------------------
=================================================
2571 passed, 538 skipped, 230 xfailed in 377.10s (0:06:17)
=================================================
Identified 5430 files from scripts
Removed 1515 files
Kept 5422 files
</code></pre>
</details>

### Generate Reference Decoded Outputs for the Reference Encoded files

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin  --regenerate-enc-refs
  ```

### Generate a conformance package zip

  ```shell
  zip -r conformance.zip testvec scripts/ivas_conformance scripts/tools
  ```

</details>

## Run CUT tests on Target platform

To run CUT binaries on the targeted platform, it is necessary to replicate the initial setup for python and dependency packages. The CUT build of the IVAS binaries should be made available in a selected folder and needed for the next step
@@ -139,91 +96,153 @@ Executing tests for ISAR (1032 tests)
  +- split_rendering/ : Folder containing all split rendering enc/dec tests
```

## Perform the MLD based analysis on the CUT outputs on reference platform (Ubuntu 24.04)
## Perform analysis on the reference platform (Ubuntu 24.04)

If CUT test execution is done on a different platform, the scripts/CUT_OUTPUTS must be copied and provided in the reference platform's scripts/CUT_OUTPUTS. Then the BE analysis or non-BE analysis procedure below should be followed. It is recommended to perform first analysis with BE comparison and then analysis with non-BE comparison if non-BE outputs were found. Note, non-BE conformance applies currently only if metadata file output is BE and there are non-BE results only in wave-file output.


   If CUT test execution is done on a different platform, the scripts/CUT_OUTPUTS must be copied and provided in the reference platform's scripts/CUT_OUTPUTS. Then the following command is used to perform MLD based analysis on the same, encoded outputs will be implicitly decoded using reference decoder executables and MLD analysis performed on the reference decoded outputs.
### 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.
  
```shell
   PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin --analyse
PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin --analyse --be-test
```

<details>
<summary>Example Output of CUT Analysis</summary>
<summary>Example Output of BE comparison</summary>
<pre><code>
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_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>
</details>


### Perform the MLD based non-BE analysis on the CUT outputs on reference platform (Ubuntu 24.04)

The MLD-based non-BE analysis is performed to the CUT outputs with the command below. Encoded outputs will be decoded using the reference decoder executables as part of the process. The MLD analysis is then performed between the CUT and reference decoded outputs (only ".wav" files are compared). Comparison to MLD corridor is also done as part of this process. An example passing output is shown below. If all test sets print `MLD Corridor passed for...` and there were no non-BE metadata comparisons in BE-test, then CUT outputs are Non-BE conformant.

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

<details>
<summary>Example Output of non-BE analysis</summary>
<pre><code>
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 : 381
    DEC : 637
    REND : 666
    ENC : 374
    DEC : 638
    REND : 911
    ISAR_ENC : 1032
    ISAR : 1032
Analysing tests for ENC   (381 tests)
    ISAR : 1252
Analysing tests for ENC   (374 tests)

##########################################################
&lt;ENC&gt; Total Frames: 2635800
&lt;ENC&gt; Total Frames: 3074220
&lt;ENC&gt; MAX MLD across all frames : 0.0
&lt;ENC&gt; Frames with MLD == 0 : 2635800 frames (100.0%)
&lt;ENC&gt; Frames with MLD <= 1 : 2635800 frames (100.0%)
&lt;ENC&gt; Frames with MLD <= 2 : 2635800 frames (100.0%)
&lt;ENC&gt; Frames with MLD <= 5 : 2635800 frames (100.0%)
&lt;ENC&gt; BE frames percentage = 100.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)
##########################################################
Analysing tests for DEC   (637 tests)

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

##########################################################
&lt;DEC&gt; Total Frames: 4342140
&lt;DEC&gt; Total Frames: 5079252
&lt;DEC&gt; MAX MLD across all frames : 0.0
&lt;DEC&gt; Frames with MLD == 0 : 4342140 frames (100.0%)
&lt;DEC&gt; Frames with MLD <= 1 : 4342140 frames (100.0%)
&lt;DEC&gt; Frames with MLD <= 2 : 4342140 frames (100.0%)
&lt;DEC&gt; Frames with MLD <= 5 : 4342140 frames (100.0%)
&lt;DEC&gt; BE frames percentage = 100.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)
##########################################################
Analysing tests for REND   (666 tests)

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

##########################################################
&lt;REND&gt; Total Frames: 4799952
&lt;REND&gt; Total Frames: 5576907
&lt;REND&gt; MAX MLD across all frames : 0.0
&lt;REND&gt; Frames with MLD == 0 : 4799952 frames (100.0%)
&lt;REND&gt; Frames with MLD <= 1 : 4799952 frames (100.0%)
&lt;REND&gt; Frames with MLD <= 2 : 4799952 frames (100.0%)
&lt;REND&gt; Frames with MLD <= 5 : 4799952 frames (100.0%)
&lt;REND&gt; BE frames percentage = 100.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)
##########################################################

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 frames percentage = 100.0
&lt;ISAR_ENC&gt; BE samples percentage = 100.0
&lt;ISAR_ENC&gt; max absolute diff = 0.0, sample range (-32768, 32767)
##########################################################
Analysing tests for ISAR   (1032 tests)

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

##########################################################
&lt;ISAR&gt; Total Frames: 2125956
&lt;ISAR&gt; Total Frames: 2590956
&lt;ISAR&gt; MAX MLD across all frames : 0.0
&lt;ISAR&gt; Frames with MLD == 0 : 2125956 frames (100.0%)
&lt;ISAR&gt; Frames with MLD <= 1 : 2125956 frames (100.0%)
&lt;ISAR&gt; Frames with MLD <= 2 : 2125956 frames (100.0%)
&lt;ISAR&gt; Frames with MLD <= 5 : 2125956 frames (100.0%)
&lt;ISAR&gt; BE frames percentage = 100.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)
##########################################################

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 : -
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:

- Run DUT IVAS Encoder Tests Only (on Target Platform)

+96 −0
Original line number Diff line number Diff line
# IVAS Conformance Scripts

This folder contains scripts for running IVAS conformance tests.

## Setup for Reference Platform

  Reference platform is Ubuntu 24.04

- Verify the Ubuntu Linux release is 24.04

  ```shell
  lsb_release -d | grep Ubuntu
  ```

  <span style="color: green;"> # It might be similar to Ubuntu 24.04.3 LTS </span>

- Install Clang 18 compiler

  ```shell
  sudo apt install clang-18
  clang-18 --version
  ```

  Example version observed on Ubuntu 24.04.3 LTS

  ```text
  Ubuntu clang version 18.1.3 (1ubuntu1)
  Target: x86_64-pc-linux-gnu
  Thread model: posix
  InstalledDir: /usr/bin
  ```

  It might be required to set Clang-18 as the default clang on the machine

  ```shell
  sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100
  ```

- Install Python3.13 on Ubuntu 24.04 LTS

  ```shell
  sudo apt install python3.13 python3.13-venv
  ```

- Create virtual environment for Python 3.13 and install requirements

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

## Reference Conformance Package Generation

<details>
<summary> <i> Expand for detailed procedure </i> </summary>

To generate reference conformance package for distribution

### Generate Reference Outputs and Readme.txt files

  ```shell
  sh scripts/ivas_conformance/ivas_be_conf_test_gen.sh
  ```

<details>
<summary> Example output of reference test generation </summary>
<pre><code>
::::::::::::::::::::::::
------------------------------------------
Generated html report: file:///home/dolby/git/ivas-codec/report_cmd.htm
------------------------------------------
=================================================
2571 passed, 538 skipped, 230 xfailed in 377.10s (0:06:17)
=================================================
Identified 5430 files from scripts
Removed 1515 files
Kept 5422 files
</code></pre>
</details>

### Generate Reference Decoded Outputs for the Reference Encoded files

  ```shell
  PYTHONPATH=scripts python scripts/ivas_conformance/runConformance.py --testvecDir $PWD/testvec --ref_build_path=testvec/bin  --regenerate-enc-refs
  ```

### Generate a conformance package zip

  ```shell
  zip -r conformance.zip testvec scripts/ivas_conformance/runConformance.py  scripts/ivas_conformance/requirements.txt scripts/ivas_conformance/README.md scripts/ivas_conformance/thirdPartyLegalNotices.txt scripts/tools/Darwin/thirdPartyLegalnotices  scripts/tools/Darwin/LICENSE_wav-diff.txt scripts/tools/Darwin/wav-diff scripts/tools/Linux/thirdPartyLegalnotices  scripts/tools/Linux/LICENSE_wav-diff.txt scripts/tools/Linux/wav-diff scripts/tools/Win32/thirdPartyLegalnotices  scripts/tools/Win32/LICENSE_wav-diff.txt scripts/tools/Win32/wav-diff.exe
  ```

</details>
+0 −1
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ cp -r tests/split_rendering/error_patterns testvec/testv/split_rendering/error_p

python3 scripts/cleanup_26252.py

cp -r tests/conformance-test testvec/
cp Readme_IVAS_dec.txt testvec
cp Readme_IVAS_enc.txt testvec
cp Readme_IVAS_rend.txt testvec
+169 −61

File changed.

Preview size limit exceeded, changes collapsed.

+1898 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading