Commit 3471be7f authored by Ke Zhao's avatar Ke Zhao
Browse files

Add README.md for split rendering tests

parent 9f6e86f9
Loading
Loading
Loading
Loading
Loading
+104 −0
Original line number Diff line number Diff line
<!------------------------------------------------------------------------------------------------------
   (C) 2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
   Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
   Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
   Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
   contributors to this repository. All Rights Reserved.

   This software is protected by copyright law and by international treaties.
   The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
   Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
   Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
   Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
   contributors to this repository retain full ownership rights in their respective contributions in
   the software. This notice grants no license of any kind, including but not limited to patent
   license, nor is any license granted by implication, estoppel or otherwise.

   Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
   contributions.

   This software is provided "AS IS", without any express or implied warranties. The software is in the
   development stage. It is intended exclusively for experts who have experience with such software and
   solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
   and fitness for a particular purpose are hereby disclaimed and excluded.

   Any dispute, controversy or claim arising under or in relation to providing this software shall be
   submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
   accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
   the United Nations Convention on Contracts on the International Sales of Goods.
------------------------------------------------------------------------------------------------------>

# IVAS Split Rendering Tests
The IVAS split rendering tests are implemented using `pytest`.

## Overview
The split rendering tests consist of:
* Smoke tests
* BE (bit exact) comparison tests

The tests cover the following IVAS formats:
* Ambisonics
* Multi-Channel
* ISM
* MASA

The tests include both split rendering operating modes:
* Full chain: encoder, decoder, external renderer
* External: external renderer only

Note: MASA format only supports the full chain split rendering mode.

Furthermore, the tests iterate over the following parameters:
* Renderer config file which specifies DoF (degrees of freedom), split rendering bitrate, and split rendering codec
* Trajectory file
* Encoder/decoder bitrate (only for full-chain split rendering mode)

## Directory Structure

```
ivas-codec
├── tests
|   ├── split_rendering
|   |   ├── test_split_rendering.py                 -> split rendering smoke tests
|   |   ├── test_split_rendering_be_comparison.py   -> split rendering BE comparison tests
|   |   ├── constants.py                            -> split rendering constants
|   |   ├── utils.py                                -> split rendering functions
|   |   └── renderer_configs                        -> directory of render config files
|   └── renderer
|       ├── constants.py                            -> renderer constants
|       └── utils.py                                -> renderer functions
└── scripts
    └── trajectories                                -> directory of trajectory files
```

## Running Tests
### Smoke Tests
```bash
python3 -m pytest -n auto -rA tests/split_rendering/test_split_rendering.py
```

### BE Comparison Tests
```bash
python3 -m pytest -n auto -rA tests/split_rendering/test_split_rendering_be_comparison.py
```

## Useful pytest Options

* `-h`: Help options
* `-n N`: Run tests in parallel using `N` processes (requires `pytest-xdist` package)
* `-rA`: Report all test results
* `-k KEYWORD`: Only run tests which match `KEYWORD`
* `--collect-only`: Only collect tests without running them

## Example Commands for Split Rendering

Commands executed for a test can be found from the corresponding test output.

### Full Chain Split Rendering - Ambisonics HOA3
```bash
IVAS_cod -sba 3 512000 48 tests/renderer/data/spectral_test_16ch_48kHz.wav ivas.192

IVAS_dec -T scripts/trajectories/rotate_yaw_pitch_roll1_delayed.csv -render_config tests/split_rendering/renderer_configs/split_renderer_config_3dof_768k_default.txt BINAURAL_SPLIT_CODED 48 ivas.192 split.bit

IVAS_rend -fs 48 -i split.bit -if BINAURAL_SPLIT_CODED -o tests/split_rendering/cut/HOA3_512000bps_rotate_yaw_pitch_roll1_delayed_split_full_rotate_yaw_pitch_roll1__config_split_renderer_config_3dof_768k_default.wav -of BINAURAL -tf scripts/trajectories/rotate_yaw_pitch_roll1.csv
```