Commit 19365a2f authored by vaclav's avatar vaclav
Browse files

fix issue 1131: fix division-by-zero in acelp gain decoding caused by wrong...

fix issue 1131: fix division-by-zero in acelp gain decoding caused by wrong length of buffer update when switching from HQ core to ACELP core; under NONBE_1131_ACELP_OOB
parent 8704a7b9
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@
#define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT   /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/
#define REVERT_ZERO_FLUSH_TRESH                               /* FhG: issue 1069: revert threshold value introduced with !1518 due to significant complexity increase*/ 
#define NONBE_FIX_1097_SBA_DTX_BRATE_SWITCHING_ENC            /* FhG: fix out-of-bound errors when switching from SID frame to active frame*/
#define NONBE_1131_ACELP_OOB                                  /* VA: issue 1131: fix division-by-zero in acelp gain decoding caused by wrong length of buffer update when switching from HQ core to ACELP core */

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

+4 −0
Original line number Diff line number Diff line
@@ -699,7 +699,11 @@ ivas_error acelp_core_dec(
                old_exc_s = st->old_exc + L_EXC_MEM_DEC - st->L_frame;
                tmpF = *old_exc_s;
                st->mem_deemph = old_exc_s[st->L_frame - 1];
#ifdef NONBE_1131_ACELP_OOB
                preemph( old_exc_s, st->preemph_fac, st->L_frame, &tmpF );
#else
                preemph( old_exc_s, st->preemph_fac, L_FRAME16k, &tmpF );
#endif
                mvr2r( old_exc_s + st->L_frame - M, st->mem_syn2, M );
                residu( Aq, M, old_exc_s, old_exc + L_EXC_MEM_DEC - st->L_frame, st->L_frame );
            }