Commit 64367f6f authored by vaclav's avatar vaclav
Browse files

Merge branch '1979-encoder-crash-because-of-overflow-in-tcx-path' into 'main'

possible fix for 1979, addition of _sat in lsf_enc

Closes #1979

See merge request !2184
parents b2399e45 7fb76f23
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@
#define FIX_1970_SBA_CRASH                                   /* Dlb: Fix for issue 1970, SBA crash */
#define FIX_1978_SAT_MISSING_IN_GAIN_ENC                     /* VA:  Fix add saturation missing that lead to a crash in P800-10 */

#define FIX_1979_SAT_MISSING_IN_LSF_ENC                      /* VA: Proposal to fix 1979, saturation in lsf_enc, NOkia to review */
#define FIX_1946_CRASH_JBM_PROCESSING                        /* FhG: Increased guard bits of DFT_fx */
/* #################### Start BASOP porting switches ############################ */

+4 −0
Original line number Diff line number Diff line
@@ -2541,7 +2541,11 @@ static Word32 vq_lvq_lsf_enc_ivas_fx(
        L_tmp = L_mult( mult( diff[0], shl_sat( w[0], 1 ) ), diff[0] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */
        FOR( j = 1; j < M; j++ )
        {
#ifdef FIX_1979_SAT_MISSING_IN_LSF_ENC
            L_tmp = L_mac_sat( L_tmp, mult( diff[j], shl_sat( w[j], 1 ) ), diff[j] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */
#else
            L_tmp = L_mac( L_tmp, mult( diff[j], shl_sat( w[j], 1 ) ), diff[j] ); /*(2.56+Q5+ Q10 -Q15) + 2.56+ Q5 + Q1 = 2.56 + 2.56 + Q6 */
#endif
        }
        e[i] = L_tmp;
        move32();