Subjective Quality Issue: Complexity and FEC
We've noticed a combination of parameters that lead to an unexpected drop in subjective audio quality. This drop was confirmed by independent listeners and P.863 (POLQA) analysis.
The issue occurs under the following conditions:
- In-band FEC is enabled (OPUS_SET_INBAND_FEC)
- The target bitrate is 16kbps to 24kbs (inclusive)
- Complexity is 2 to 9 (inclusive)
- Packet loss percent set to 20 (OPUS_SET_PACKET_LOSS_PERC)
- No actual packets are dropped (all samples are present on input to the encoder, with no PLC or FEC recovery beforehand).
In this case we see a per-packet variation of the audio level that manifests as a subjective distortion: EDIT: see comments for an attached example and visualization.
This can be reproduced using opus_demo.c by modifying one line to prevent dropping any packets with the "-loss" parameter. The attached patch file shows the modification: opus_demo.patch.
With this modification applied, the following command lines will reproduce the issue:
./opus_demo voip 48000 1 21333 -loss 20 -inbandfec -complexity 0 female2.raw female2-enc-zero.raw
/opus_demo voip 48000 1 21333 -loss 20 -inbandfec -complexity 9 female2.raw female2-enc-nine.raw
female2-enc-nine.raw will have significantly lower subjective audio quality than female2-enc-zero.raw. female2-enc-nine.raw will also exhibit the per-packet level variation pictured above. This was seen with both the 1.3.1 tarball and a pull from master on July 19th 2022 (commit c9d5bea1).
The issue will not manifest if the bitrate is set lower than 16kbps, bitrate is greater than 24kbps, complexity is less than 2, or if in-band FEC is disabled.
The source file referenced above is from the P.501 Annex C test set (British English, Female 2, SWB).