| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 // b[n] = 8*sin(pi*k/2)/(pi*k)^2 | 384 // b[n] = 8*sin(pi*k/2)/(pi*k)^2 |
| 385 // = 8/pi^2/n^2*(-1)^((n-1)/2) for n odd and 0 otherwise | 385 // = 8/pi^2/n^2*(-1)^((n-1)/2) for n odd and 0 otherwise |
| 386 // = 2*(2/(n*pi))^2 * (-1)^((n-1)/2) | 386 // = 2*(2/(n*pi))^2 * (-1)^((n-1)/2) |
| 387 if (n & 1) { | 387 if (n & 1) { |
| 388 b = 2 * (pi_factor * pi_factor) * ((((n - 1) >> 1) & 1) ? -1 : 1); | 388 b = 2 * (pi_factor * pi_factor) * ((((n - 1) >> 1) & 1) ? -1 : 1); |
| 389 } else { | 389 } else { |
| 390 b = 0; | 390 b = 0; |
| 391 } | 391 } |
| 392 break; | 392 break; |
| 393 default: | 393 default: |
| 394 ASSERT_NOT_REACHED(); | 394 NOTREACHED(); |
| 395 b = 0; | 395 b = 0; |
| 396 break; | 396 break; |
| 397 } | 397 } |
| 398 | 398 |
| 399 real_p[n] = 0; | 399 real_p[n] = 0; |
| 400 imag_p[n] = b; | 400 imag_p[n] = b; |
| 401 } | 401 } |
| 402 | 402 |
| 403 CreateBandLimitedTables(real_p, imag_p, half_size, false); | 403 CreateBandLimitedTables(real_p, imag_p, half_size, false); |
| 404 } | 404 } |
| 405 | 405 |
| 406 } // namespace blink | 406 } // namespace blink |
| OLD | NEW |