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

Side by Side Diff: webrtc/modules/audio_processing/utility/ooura_fft.cc

Issue 2442773002: Fix compile error for non Intel platforms (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html 2 * http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html
3 * Copyright Takuya OOURA, 1996-2001 3 * Copyright Takuya OOURA, 1996-2001
4 * 4 *
5 * You may use, copy, modify and distribute this code for any purpose (include 5 * You may use, copy, modify and distribute this code for any purpose (include
6 * commercial use) and without fee. Please refer to this package when you modify 6 * commercial use) and without fee. Please refer to this package when you modify
7 * this code. 7 * this code.
8 * 8 *
9 * Changes by the WebRTC authors: 9 * Changes by the WebRTC authors:
10 * - Trivial type modifications. 10 * - Trivial type modifications.
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 rftbsub_128(a); 341 rftbsub_128(a);
342 bitrv2_128(a); 342 bitrv2_128(a);
343 cftbsub_128(a); 343 cftbsub_128(a);
344 } 344 }
345 345
346 void OouraFft::cft1st_128(float* a) const { 346 void OouraFft::cft1st_128(float* a) const {
347 #if defined(MIPS_FPU_LE) 347 #if defined(MIPS_FPU_LE)
348 cft1st_128_mips(a); 348 cft1st_128_mips(a);
349 #elif defined(WEBRTC_HAS_NEON) 349 #elif defined(WEBRTC_HAS_NEON)
350 cft1st_128_neon(a); 350 cft1st_128_neon(a);
351 #else 351 #elif defined(WEBRTC_ARCH_X86_FAMILY)
352 if (use_sse2_) { 352 if (use_sse2_) {
353 cft1st_128_SSE2(a); 353 cft1st_128_SSE2(a);
354 } else { 354 } else {
355 cft1st_128_C(a); 355 cft1st_128_C(a);
356 } 356 }
357 #else
358 cft1st_128_C(a);
357 #endif 359 #endif
358 } 360 }
359 void OouraFft::cftmdl_128(float* a) const { 361 void OouraFft::cftmdl_128(float* a) const {
360 #if defined(MIPS_FPU_LE) 362 #if defined(MIPS_FPU_LE)
361 cftmdl_128_mips(a); 363 cftmdl_128_mips(a);
362 #elif defined(WEBRTC_HAS_NEON) 364 #elif defined(WEBRTC_HAS_NEON)
363 cftmdl_128_neon(a); 365 cftmdl_128_neon(a);
364 #else 366 #elif defined(WEBRTC_ARCH_X86_FAMILY)
365 if (use_sse2_) { 367 if (use_sse2_) {
366 cftmdl_128_SSE2(a); 368 cftmdl_128_SSE2(a);
367 } else { 369 } else {
368 cftmdl_128_C(a); 370 cftmdl_128_C(a);
369 } 371 }
372 #else
373 cftmdl_128_C(a);
370 #endif 374 #endif
371 } 375 }
372 void OouraFft::rftfsub_128(float* a) const { 376 void OouraFft::rftfsub_128(float* a) const {
373 #if defined(MIPS_FPU_LE) 377 #if defined(MIPS_FPU_LE)
374 rftfsub_128_mips(a); 378 rftfsub_128_mips(a);
375 #elif defined(WEBRTC_HAS_NEON) 379 #elif defined(WEBRTC_HAS_NEON)
376 rftfsub_128_neon(a); 380 rftfsub_128_neon(a);
377 #else 381 #elif defined(WEBRTC_ARCH_X86_FAMILY)
378 if (use_sse2_) { 382 if (use_sse2_) {
379 rftfsub_128_SSE2(a); 383 rftfsub_128_SSE2(a);
380 } else { 384 } else {
381 rftfsub_128_C(a); 385 rftfsub_128_C(a);
382 } 386 }
387 #else
388 rftfsub_128_C(a);
383 #endif 389 #endif
384 } 390 }
385 391
386 void OouraFft::rftbsub_128(float* a) const { 392 void OouraFft::rftbsub_128(float* a) const {
387 #if defined(MIPS_FPU_LE) 393 #if defined(MIPS_FPU_LE)
388 rftbsub_128_mips(a); 394 rftbsub_128_mips(a);
389 #elif defined(WEBRTC_HAS_NEON) 395 #elif defined(WEBRTC_HAS_NEON)
390 rftbsub_128_neon(a); 396 rftbsub_128_neon(a);
391 #else 397 #elif defined(WEBRTC_ARCH_X86_FAMILY)
392 if (use_sse2_) { 398 if (use_sse2_) {
393 rftbsub_128_SSE2(a); 399 rftbsub_128_SSE2(a);
394 } else { 400 } else {
395 rftbsub_128_C(a); 401 rftbsub_128_C(a);
396 } 402 }
403 #else
404 rftbsub_128_C(a);
397 #endif 405 #endif
398 } 406 }
399 407
400 void OouraFft::cftbsub_128(float* a) const { 408 void OouraFft::cftbsub_128(float* a) const {
401 int j, j1, j2, j3, l; 409 int j, j1, j2, j3, l;
402 float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i; 410 float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
403 411
404 cft1st_128(a); 412 cft1st_128(a);
405 cftmdl_128(a); 413 cftmdl_128(a);
406 l = 32; 414 l = 32;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 yr = a[k1 + 0]; 534 yr = a[k1 + 0];
527 yi = a[k1 + 1]; 535 yi = a[k1 + 1];
528 a[j1 + 0] = yr; 536 a[j1 + 0] = yr;
529 a[j1 + 1] = yi; 537 a[j1 + 1] = yi;
530 a[k1 + 0] = xr; 538 a[k1 + 0] = xr;
531 a[k1 + 1] = xi; 539 a[k1 + 1] = xi;
532 } 540 }
533 } 541 }
534 542
535 } // namespace webrtc 543 } // namespace webrtc
OLDNEW
« 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