Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d76d9948 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "AMRWB Decoder: Fix integer overflow in speech synthesis filter" am:...

Merge "AMRWB Decoder: Fix integer overflow in speech synthesis filter" am: 4ccd2b7d am: 7c5af779 am: 6391f153 am: 629b39f8

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1450438

Change-Id: I61b47aaf7cd4e1c21079edf1416d85c4b5c54802
parents bd886153 629b39f8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -273,9 +273,10 @@ void Syn_filt_32(

        L_tmp1 >>= 11;      /* -4 : sig_lo[i] << 4 */

        L_tmp1 += (int32)exc[(i<<1)] << a0;
        int64 sig_tmp;
        sig_tmp = (int64)L_tmp1 + (int32)(exc[(i<<1)] << a0);
        L_tmp1 = (int32)(sig_tmp - (L_tmp2 << 1));

        L_tmp1 -= (L_tmp2 << 1);
        /* sig_hi = bit16 to bit31 of synthesis */
        L_tmp1 = shl_int32(L_tmp1, 3);           /* ai in Q12 */

@@ -290,9 +291,8 @@ void Syn_filt_32(
        L_tmp3 = fxp_mac_16by16(sig_lo[(i<<1)], a[1], L_tmp3);
        L_tmp3 = -L_tmp3 >> 11;

        L_tmp3 += (int32)exc[(i<<1)+1] << a0;

        L_tmp3 -= (L_tmp4 << 1);
        sig_tmp = (int64)L_tmp3 + (int32)(exc[(i<<1)+1] << a0);
        L_tmp3 = (int32)(sig_tmp - (L_tmp4 << 1));
        /* sig_hi = bit16 to bit31 of synthesis */
        L_tmp3 = shl_int32(L_tmp3, 3);           /* ai in Q12 */
        sig_hi[(i<<1)+1] = (int16)(L_tmp3 >> 16);