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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 /* num in Q34 */ | 158 /* num in Q34 */ |
159 num=ENH_A0_MINUS_A0A0DIV4; | 159 num=ENH_A0_MINUS_A0A0DIV4; |
160 } | 160 } |
161 | 161 |
162 /* A sqrt( (ENH_A0-(ENH_A0^2)/4)*(w00*w00)/(w11*w00 + w10*w10) ) in Q9 */ | 162 /* A sqrt( (ENH_A0-(ENH_A0^2)/4)*(w00*w00)/(w11*w00 + w10*w10) ) in Q9 */ |
163 A = (int16_t)WebRtcSpl_SqrtFloor(WebRtcSpl_DivW32W16(num, denomW16)); | 163 A = (int16_t)WebRtcSpl_SqrtFloor(WebRtcSpl_DivW32W16(num, denomW16)); |
164 | 164 |
165 /* B_W32 is in Q30 ( B = 1 - ENH_A0/2 - A * w10/w00 ) */ | 165 /* B_W32 is in Q30 ( B = 1 - ENH_A0/2 - A * w10/w00 ) */ |
166 scale1 = 31-bitsw10; | 166 scale1 = 31-bitsw10; |
167 scale2 = 21-scale1; | 167 scale2 = 21-scale1; |
168 w10prim = w10 << scale1; | 168 w10prim = w10 * (1 << scale1); |
169 w00prim = WEBRTC_SPL_SHIFT_W32(w00, -scale2); | 169 w00prim = WEBRTC_SPL_SHIFT_W32(w00, -scale2); |
170 scale = bitsw00-scale2-15; | 170 scale = bitsw00-scale2-15; |
171 | 171 |
172 if (scale>0) { | 172 if (scale>0) { |
173 w10prim >>= scale; | 173 w10prim >>= scale; |
174 w00prim >>= scale; | 174 w00prim >>= scale; |
175 } | 175 } |
176 | 176 |
177 if ((w00prim>0)&&(w10prim>0)) { | 177 if ((w00prim>0)&&(w10prim>0)) { |
178 w11_div_w00=WebRtcSpl_DivW32W16(w10prim, (int16_t)w00prim); | 178 w11_div_w00=WebRtcSpl_DivW32W16(w10prim, (int16_t)w00prim); |
(...skipping 19 matching lines...) Expand all Loading... |
198 } | 198 } |
199 | 199 |
200 /* create smoothed sequence */ | 200 /* create smoothed sequence */ |
201 | 201 |
202 WebRtcSpl_ScaleAndAddVectors(surround, A, 9, | 202 WebRtcSpl_ScaleAndAddVectors(surround, A, 9, |
203 current, B, 14, | 203 current, B, 14, |
204 odata, ENH_BLOCKL); | 204 odata, ENH_BLOCKL); |
205 } | 205 } |
206 return; | 206 return; |
207 } | 207 } |
OLD | NEW |