Saturation in SBA 3OA bitrate switching
One of the error/asserts from the LTV test relate to SBA rate switching decoding. To reproduce, follow the setup in the first two steps of https://forge.3gpp.org/rep/sa4/audio/ivas-basop/-/wikis/CI-Environment#how-to-replicate-a-test-from-a-report and put the file ltv32_HOA3.wav from https://forge.3gpp.org/rep/ivas-codec-pc/ivas-pc-testfiles/-/blob/longer-testv-on-runners/ltv32_HOA3.wav in scripts/testv. ``` python3 -m pytest "tests/test_param_file_ltv.py::test_param_file_tests[SBA 3OA bitrate switching from 13.2 kbps to 128 kbps, 32kHz in, 32kHz out, DTX on, HOA3 out]" --update_ref 1 -m create_ref python3 -m pytest "tests/test_param_file_ltv.py::test_param_file_tests[SBA 3OA bitrate switching from 13.2 kbps to 128 kbps, 32kHz in, 32kHz out, DTX on, HOA3 out]" ``` As a shortcut for debugging, the attached cut bitstream may be used. After checking that the assert happens in 4863, one may try to trigger the issue with a cut bitstream: ``` scripts/cut_bs.py --frame 4800 --length 200 tests/dut/param_file/enc/ltv32_HOA3.wav_SBA_3OA_bitrate_switching_from_13_2_kbps_to_128_kbps_32kHz_in_32kHz_out_DTX_on_HOA3_out.192 bitstream_cut.192 ``` The error may be triggered using this command line: ``` IVAS_dec HOA3 32 bitstream_cut.192 out.wav ``` [bitstream_cut.192](/uploads/07b002e1c41cffcfd45ba8af8f4fbcf7/bitstream_cut.192)
issue