Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1433)

Unified Diff: webrtc/modules/audio_processing/ns/nsx_core_neon.c

Issue 1823763004: Keep reads within buffer in AnalysisUpdateNeon(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/ns/nsx_core_neon.c
diff --git a/webrtc/modules/audio_processing/ns/nsx_core_neon.c b/webrtc/modules/audio_processing/ns/nsx_core_neon.c
index 65788ae23011f1a2f1bee4a28cebbd5500c96518..516dd095ccbc4c78af6b0ed892246aed215f6566 100644
--- a/webrtc/modules/audio_processing/ns/nsx_core_neon.c
+++ b/webrtc/modules/audio_processing/ns/nsx_core_neon.c
@@ -570,8 +570,8 @@ void WebRtcNsx_AnalysisUpdateNeon(NoiseSuppressionFixedC* inst,
// Window data before FFT.
int16_t* p_start_window = (int16_t*) inst->window;
int16_t* p_start_buffer = inst->analysisBuffer;
+ int16_t* p_end_buffer = inst->analysisBuffer + inst->anaLen;
peah-webrtc 2016/04/01 05:26:32 Could you please explain why this code changed. As
Simon Hosie 2016/04/01 21:57:46 FTR; the change from testing the progress of the d
int16_t* p_start_out = out;
- const int16_t* p_end_out = out + inst->anaLen;
// Load the first element to reduce pipeline bubble.
int16x8_t window = vld1q_s16(p_start_window);
@@ -579,7 +579,7 @@ void WebRtcNsx_AnalysisUpdateNeon(NoiseSuppressionFixedC* inst,
p_start_window += 8;
p_start_buffer += 8;
Simon Hosie 2016/04/01 21:57:46 Here is where the source pointer starts to lead th
- while (p_start_out < p_end_out) {
+ while (p_start_buffer < p_end_buffer) {
// Unroll loop.
int32x4_t tmp32_low = vmull_s16(vget_low_s16(window), vget_low_s16(buffer));
int32x4_t tmp32_high = vmull_s16(vget_high_s16(window),
@@ -595,4 +595,11 @@ void WebRtcNsx_AnalysisUpdateNeon(NoiseSuppressionFixedC* inst,
p_start_window += 8;
p_start_out += 8;
}
+ int32x4_t tmp32_low = vmull_s16(vget_low_s16(window), vget_low_s16(buffer));
hlundin-webrtc 2016/03/31 07:55:09 Can you explain to me what this new code after the
Simon Hosie 2016/03/31 21:09:42 The change to the loop condition is to make it run
+ int32x4_t tmp32_high = vmull_s16(vget_high_s16(window),
+ vget_high_s16(buffer));
+
+ int16x4_t result_low = vrshrn_n_s32(tmp32_low, 14);
+ int16x4_t result_high = vrshrn_n_s32(tmp32_high, 14);
+ vst1q_s16(p_start_out, vcombine_s16(result_low, result_high));
peah-webrtc 2016/04/01 05:26:32 As far as I can see, p_start_out will be > out + i
Simon Hosie 2016/04/01 06:12:59 Changing the loop condition to work with the input
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698