Skip to content

Conversation

@jwcullen
Copy link
Collaborator

Follow up of #142. Merge after #145, because while developing this script, I found some bugs in the reference files.

This PR leaves the old psnr_calc working, but it aims to be easier to use. psnr_calc was difficult to use because it required knowing all of the arguments to decode the correct {mix id, sample rate, bit-depth, layout, limiter settings} etc. to create comparison wav files.

This script actually parses the test suite, determines the command line arguments to use, runs decode, and runs the comparisons. It prints a summary, and optionally writes a CSV with test details. It also filters out certain tests that should not be compared, such as tests that exceed profile limits, decode to an extension layout, are tagged as "should-fail", etc.

This PR aims to establish a baseline of the actual verification that was performed under v1.0.0. To establish this baseline it must reuse the metric of averaging PSNR across channels. Although this has been flagged before, by establishing this baseline it will be easier to investigate other metrics.

  - Encoder bug-fixes improve this file's PSNR test performance.
  - Previously demixing matrices were applied incorrectly and led to bad scores in some channels.
  - Based on AOMediaCodec/iamf-tools@cdc930082
  - `psnr_calc`: Same usage, except use new flag for verbose per-channel logging.
  - `calc_average_channel_psnr_wav` validates the wav files are consistent, and calls the low-level function.
  - `calc_average_channel_psnr_pcm` performs low-level signal analysis.
  - Easier for other utilities to share code, when they are not bundled with the main program.
  - These are only used by tests, and not the main repo.
  - `user_metadata_parsing_utils`
    - Introduce utilities to get statistics about each test vector.
    - Introduce a function to get `iamfdec` arguments associated with a test file.
  - `run_decode_and_psnr_test`
    - Decodes a set of files, runs PSNR tests, and produces a summary of all tests.
    - By default, this runs on all test vectors.
    - Uses same comparison as `psnr_calc`, but automatically decodes and matches combos.
    - Document in `README.md`.
@kavithaig
Copy link

Thanks for this script. It works really well. I tested it on v1.0.1 with the updated 70 and 210 test files and most of the tests pass. I would like to list the few things which fail when tested against the v1.0.1 tests folder:

  • Binaural tests: Tests with _binaural in the reference names are being skipped but for test_000095 and test_000096, the layout_4 and layout_1 are binaural respectively. The test reference file name does not have _binaural in this case but the proto file says that layout is binarual. So the comparison against test_000095_rendered_id_42_sub_mix_0_layout_4.wav and test_000096_rendered_id_42_sub_mix_0_layout_1.wav fails.
  • Because in this script some "should-fail" tests are detected and excluded, I just wanted to bringup that the test_000123 and test_000132 fail for -mp 42 for both layout 0 and layout 1. Their mp 43 counterpart passes the tests. If these are tested to make sure they don't decode, then that's ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants