| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 l = 1; | 174 l = 1; |
| 175 k = 10 - 1; /* Constant for given kSinTable1024[]. Do not change | 175 k = 10 - 1; /* Constant for given kSinTable1024[]. Do not change |
| 176 depending on the input parameter 'stages' */ | 176 depending on the input parameter 'stages' */ |
| 177 | 177 |
| 178 while (l < n) | 178 while (l < n) |
| 179 { | 179 { |
| 180 // variable scaling, depending upon data | 180 // variable scaling, depending upon data |
| 181 shift = 0; | 181 shift = 0; |
| 182 round2 = 8192; | 182 round2 = 8192; |
| 183 | 183 |
| 184 tmp32 = (int32_t)WebRtcSpl_MaxAbsValueW16(frfi, 2 * n); | 184 tmp32 = WebRtcSpl_MaxAbsValueW16(frfi, 2 * n); |
| 185 if (tmp32 > 13573) | 185 if (tmp32 > 13573) |
| 186 { | 186 { |
| 187 shift++; | 187 shift++; |
| 188 scale++; | 188 scale++; |
| 189 round2 <<= 1; | 189 round2 <<= 1; |
| 190 } | 190 } |
| 191 if (tmp32 > 27146) | 191 if (tmp32 > 27146) |
| 192 { | 192 { |
| 193 shift++; | 193 shift++; |
| 194 scale++; | 194 scale++; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 (qi32 + ti32 + round2) >> (shift + CIFFTSFT)); | 288 (qi32 + ti32 + round2) >> (shift + CIFFTSFT)); |
| 289 } | 289 } |
| 290 } | 290 } |
| 291 | 291 |
| 292 } | 292 } |
| 293 --k; | 293 --k; |
| 294 l = istep; | 294 l = istep; |
| 295 } | 295 } |
| 296 return scale; | 296 return scale; |
| 297 } | 297 } |
| OLD | NEW |