Fix AppRTCDemo crash under iOS armv7 devices

Fix AppRTCDemo crash under iOS due to the unaligned access in vld1
instruction in iSACFix codec, which is not allowed in iOS build.

BUG=4717
R=andrew@webrtc.org, jridges@masque.com
TEST=Run the AppRTCDemo

Change-Id: Ie5fbc9b8ae88cd00b243a8e65cab95b00362a9da

Review URL: https://codereview.webrtc.org/1182493006.

Cr-Commit-Position: refs/heads/master@{#9432}
This commit is contained in:
Zhongwei Yao
2015-06-15 14:56:48 +08:00
parent 782671f798
commit 01bbe3eb8c

View File

@ -29,12 +29,13 @@ void WebRtcIsacfix_AllpassFilter2FixDec16Neon(
int16x4_t factorv; int16x4_t factorv;
int16x4_t datav; int16x4_t datav;
int32x4_t statev; int32x4_t statev;
int32x2_t tmp;
// Load factor_ch1 and factor_ch2. // Load factor_ch1 and factor_ch2.
tmp = vld1_dup_s32((int32_t*)factor_ch1); factorv = vld1_dup_s16(factor_ch1);
tmp = vld1_lane_s32((int32_t*)factor_ch2, tmp, 1); factorv = vld1_lane_s16(factor_ch1 + 1, factorv, 1);
factorv = vreinterpret_s16_s32(tmp); factorv = vld1_lane_s16(factor_ch2, factorv, 2);
factorv = vld1_lane_s16(factor_ch2 + 1, factorv, 3);
// Load filter_state_ch1[0] and filter_state_ch2[0]. // Load filter_state_ch1[0] and filter_state_ch2[0].
statev = vld1q_dup_s32(filter_state_ch1); statev = vld1q_dup_s32(filter_state_ch1);
statev = vld1q_lane_s32(filter_state_ch2, statev, 2); statev = vld1q_lane_s32(filter_state_ch2, statev, 2);