OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 input = *inputP++; \ | 255 input = *inputP++; \ |
256 sum1 += input * *k1; \ | 256 sum1 += input * *k1; \ |
257 sum2 += input * *k2; \ | 257 sum2 += input * *k2; \ |
258 ++k1; \ | 258 ++k1; \ |
259 ++k2; | 259 ++k2; |
260 | 260 |
261 { | 261 { |
262 float input; | 262 float input; |
263 | 263 |
264 #if CPU(X86) || CPU(X86_64) | 264 #if CPU(X86) || CPU(X86_64) |
265 // If the sourceP address is not 16-byte aligned, the first seve
ral frames (at most three) should be processed seperately. | 265 // If the sourceP address is not 16-byte aligned, the first seve
ral frames (at most three) should be processed separately. |
266 while ((reinterpret_cast<uintptr_t>(inputP) & 0x0F) && n) { | 266 while ((reinterpret_cast<uintptr_t>(inputP) & 0x0F) && n) { |
267 CONVOLVE_ONE_SAMPLE | 267 CONVOLVE_ONE_SAMPLE |
268 n--; | 268 n--; |
269 } | 269 } |
270 | 270 |
271 // Now the inputP is aligned and start to apply SSE. | 271 // Now the inputP is aligned and start to apply SSE. |
272 float* endP = inputP + n - n % 4; | 272 float* endP = inputP + n - n % 4; |
273 __m128 mInput; | 273 __m128 mInput; |
274 __m128 mK1; | 274 __m128 mK1; |
275 __m128 mK2; | 275 __m128 mK2; |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 | 464 |
465 // Step (4) | 465 // Step (4) |
466 // Refresh the buffer with more input. | 466 // Refresh the buffer with more input. |
467 consumeSource(r5, m_blockSize); | 467 consumeSource(r5, m_blockSize); |
468 } | 468 } |
469 } | 469 } |
470 | 470 |
471 } // namespace blink | 471 } // namespace blink |
472 | 472 |
473 #endif // ENABLE(WEB_AUDIO) | 473 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |