Commit 118a2d09 authored by vaclav's avatar vaclav
Browse files

Merge branch '1244-artifacts-when-switching-from-fb-coding-to-acelp-swb-bwe' into 'main'

[non-BE] Resolve "Artifacts when switching from FB coding to ACELP + SWB-BWE"

See merge request !1911
parents 7aa8874e 8eab3be8
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -171,6 +171,8 @@
#define NONBE_FIX_GSC_BSTR                              /* VA: issue 1264: Fix bitstream synchronization between encoder and decoder in ACELP GSC in OMASA */
#define NONBE_1273_ISM_METADATA_COUNTER                 /* VA: issue 1273: fix counter overflow in ISM metadata encoder */
#define NONBE_1279_COUNTER_OVERFLOW                     /* VA: issue 1279: Avoid possible overflow of counter st->Nb_ACELP_frames */
#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ 


/* ##################### End NON-BE switches ########################### */

+4 −0
Original line number Diff line number Diff line
@@ -442,7 +442,11 @@ void swb_pre_proc(
                if ( st->last_extl != SWB_BWE && st->last_extl != FB_BWE )
                {
                    /* resample 48 kHz to 32kHz */
#ifdef NONBE_1244_FIX_SWB_BWE_MEMORY
                    if ( ( st->last_bwidth == FB && st->element_mode == EVS_MONO ) || ( st->bwidth == FB && st->element_mode > EVS_MONO ) ) // note: once EVS i CR fixed, the condition will simplify to "if ( st->bwidth == FB )" only
#else
                    if ( st->last_bwidth == FB )
#endif
                    {
                        inner_frame = L_FRAME48k;
                        inner_Fs = 48000;