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

Commit a6912139 authored by Ray Essick's avatar Ray Essick Committed by Automerger Merge Worker
Browse files

Merge "AMRWB Decoder: Fix integer overflow in wb_syn_filt function" am: ba0e1e2c

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia8d3f6cd10c92a3ddb4ecfdcf5218c0433ec0d44
parents 1ba31f95 ba0e1e2c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -181,12 +181,14 @@ void wb_syn_filt(
        L_tmp4  = fxp_mac_16by16(yy[(i<<2)+3  - j], a[j], L_tmp4);

        L_tmp1 = shl_int32(L_tmp1, 4);
        L_tmp1 = L_tmp1 == INT32_MIN ? INT32_MIN + 1 : L_tmp1;

        y[(i<<2)] = yy[(i<<2)] = amr_wb_round(-L_tmp1);

        L_tmp2  = fxp_mac_16by16(yy[(i<<2)], a[1], L_tmp2);

        L_tmp2 = shl_int32(L_tmp2, 4);
        L_tmp2 = L_tmp2 == INT32_MIN ? INT32_MIN + 1 : L_tmp2;

        y[(i<<2)+1] = yy[(i<<2)+1] = amr_wb_round(-L_tmp2);

@@ -197,12 +199,14 @@ void wb_syn_filt(
        L_tmp3  = fxp_mac_16by16(yy[(i<<2) + 1], a[1], L_tmp3);

        L_tmp3 = shl_int32(L_tmp3, 4);
        L_tmp3 = L_tmp3 == INT32_MIN ? INT32_MIN + 1 : L_tmp3;

        y[(i<<2)+2] = yy[(i<<2)+2] = amr_wb_round(-L_tmp3);

        L_tmp4  = fxp_mac_16by16(yy[(i<<2)+2], a[1], L_tmp4);

        L_tmp4 = shl_int32(L_tmp4, 4);
        L_tmp4 = L_tmp4 == INT32_MIN ? INT32_MIN + 1 : L_tmp4;

        y[(i<<2)+3] = yy[(i<<2)+3] = amr_wb_round(-L_tmp4);
    }