From 01bbe3eb8ca29d5d1ce3b59d02532a3d9fd35e24 Mon Sep 17 00:00:00 2001 From: Zhongwei Yao Date: Mon, 15 Jun 2015 14:56:48 +0800 Subject: [PATCH] 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} --- .../codecs/isac/fix/source/filterbanks_neon.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_neon.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_neon.c index 614e16982..20f80aefe 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_neon.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_neon.c @@ -29,12 +29,13 @@ void WebRtcIsacfix_AllpassFilter2FixDec16Neon( int16x4_t factorv; int16x4_t datav; int32x4_t statev; - int32x2_t tmp; // Load factor_ch1 and factor_ch2. - tmp = vld1_dup_s32((int32_t*)factor_ch1); - tmp = vld1_lane_s32((int32_t*)factor_ch2, tmp, 1); - factorv = vreinterpret_s16_s32(tmp); + factorv = vld1_dup_s16(factor_ch1); + factorv = vld1_lane_s16(factor_ch1 + 1, factorv, 1); + 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]. statev = vld1q_dup_s32(filter_state_ch1); statev = vld1q_lane_s32(filter_state_ch2, statev, 2);