Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 563 int16x8_t frame = vld1q_s16(p_start_src); | 563 int16x8_t frame = vld1q_s16(p_start_src); |
| 564 vst1q_s16(p_start_dst, frame); | 564 vst1q_s16(p_start_dst, frame); |
| 565 | 565 |
| 566 p_start_src += 8; | 566 p_start_src += 8; |
| 567 p_start_dst += 8; | 567 p_start_dst += 8; |
| 568 } | 568 } |
| 569 | 569 |
| 570 // Window data before FFT. | 570 // Window data before FFT. |
| 571 int16_t* p_start_window = (int16_t*) inst->window; | 571 int16_t* p_start_window = (int16_t*) inst->window; |
| 572 int16_t* p_start_buffer = inst->analysisBuffer; | 572 int16_t* p_start_buffer = inst->analysisBuffer; |
| 573 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
| |
| 573 int16_t* p_start_out = out; | 574 int16_t* p_start_out = out; |
| 574 const int16_t* p_end_out = out + inst->anaLen; | |
| 575 | 575 |
| 576 // Load the first element to reduce pipeline bubble. | 576 // Load the first element to reduce pipeline bubble. |
| 577 int16x8_t window = vld1q_s16(p_start_window); | 577 int16x8_t window = vld1q_s16(p_start_window); |
| 578 int16x8_t buffer = vld1q_s16(p_start_buffer); | 578 int16x8_t buffer = vld1q_s16(p_start_buffer); |
| 579 p_start_window += 8; | 579 p_start_window += 8; |
| 580 p_start_buffer += 8; | 580 p_start_buffer += 8; |
|
Simon Hosie
2016/04/01 21:57:46
Here is where the source pointer starts to lead th
| |
| 581 | 581 |
| 582 while (p_start_out < p_end_out) { | 582 while (p_start_buffer < p_end_buffer) { |
| 583 // Unroll loop. | 583 // Unroll loop. |
| 584 int32x4_t tmp32_low = vmull_s16(vget_low_s16(window), vget_low_s16(buffer)); | 584 int32x4_t tmp32_low = vmull_s16(vget_low_s16(window), vget_low_s16(buffer)); |
| 585 int32x4_t tmp32_high = vmull_s16(vget_high_s16(window), | 585 int32x4_t tmp32_high = vmull_s16(vget_high_s16(window), |
| 586 vget_high_s16(buffer)); | 586 vget_high_s16(buffer)); |
| 587 window = vld1q_s16(p_start_window); | 587 window = vld1q_s16(p_start_window); |
| 588 buffer = vld1q_s16(p_start_buffer); | 588 buffer = vld1q_s16(p_start_buffer); |
| 589 | 589 |
| 590 int16x4_t result_low = vrshrn_n_s32(tmp32_low, 14); | 590 int16x4_t result_low = vrshrn_n_s32(tmp32_low, 14); |
| 591 int16x4_t result_high = vrshrn_n_s32(tmp32_high, 14); | 591 int16x4_t result_high = vrshrn_n_s32(tmp32_high, 14); |
| 592 vst1q_s16(p_start_out, vcombine_s16(result_low, result_high)); | 592 vst1q_s16(p_start_out, vcombine_s16(result_low, result_high)); |
| 593 | 593 |
| 594 p_start_buffer += 8; | 594 p_start_buffer += 8; |
| 595 p_start_window += 8; | 595 p_start_window += 8; |
| 596 p_start_out += 8; | 596 p_start_out += 8; |
| 597 } | 597 } |
| 598 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
| |
| 599 int32x4_t tmp32_high = vmull_s16(vget_high_s16(window), | |
| 600 vget_high_s16(buffer)); | |
| 601 | |
| 602 int16x4_t result_low = vrshrn_n_s32(tmp32_low, 14); | |
| 603 int16x4_t result_high = vrshrn_n_s32(tmp32_high, 14); | |
| 604 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
| |
| 598 } | 605 } |
| OLD | NEW |