Skip to content

Artifacts when switching from FB coding to ACELP + SWB-BWE

There are serious artifacts when switching from a FB coding frame to a SWB coding frame with ACELP core and SWB-BWE at 48kHz. This situation typically happens when switching from a high bitrate with default FB coding to a lower one where the audio bandwidth is limited to SWB.

In the selt-test, it happens e.g. for

// stereo bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, DTX on, MONO out
IVAS_cod -dtx -stereo switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stvST48n.wav bit
IVAS_dec MONO 48 bit syn

at frame 540 where:

  • frame 539: ivas_total_brate = 64 kbps, bwidth=FB, TCX frame
  • frame 540: ivas_total_brate = 13.2 kbps, bwidth=SWB, ACELP frame + SWB-BWE

The issue is related to the SWB-BWE memory buffer hBWE_FD->old_wtda_swb[] which by default holds past input signal at 32 kHz. This buffer is updated in swb_bwe_enc() in case of multiple SWB-BWE frames. On the other hand, when the previous frame is not ACELP with SWB-BWE, this memory buffer is updated in swb_pre_proc() between lines https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/blob/main/lib_enc/swb_pre_proc.c?ref_type=heads#L445 and https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/blob/main/lib_enc/swb_pre_proc.c?ref_type=heads#L487. When the previous frame is SWB, the memory buffer is resampled from 48 kHz to 32 kHz. However, when the previous frame is FB, the memory buffer is just updated with a 48kHz-sampled signal but not resampled. But it seems to me that the resampling should be performed.

It seems that the issue exists already in EVS.

Edited by vaclav