OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
11 #include "webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h" | 11 #include "webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h" |
12 | 12 |
13 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 13 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
14 #include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h" | 14 #include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h" |
15 #include "webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h" | 15 #include "webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h" |
16 #include "webrtc/system_wrappers/interface/compile_assert_c.h" | 16 #include "webrtc/system_wrappers/include/compile_assert_c.h" |
17 | 17 |
18 // Number of segments in a pitch subframe. | 18 // Number of segments in a pitch subframe. |
19 static const int kSegments = 5; | 19 static const int kSegments = 5; |
20 | 20 |
21 // A division factor of 1/5 in Q15. | 21 // A division factor of 1/5 in Q15. |
22 static const int16_t kDivFactor = 6553; | 22 static const int16_t kDivFactor = 6553; |
23 | 23 |
24 // Interpolation coefficients; generated by design_pitch_filter.m. | 24 // Interpolation coefficients; generated by design_pitch_filter.m. |
25 // Coefficients are stored in Q14. | 25 // Coefficients are stored in Q14. |
26 static const int16_t kIntrpCoef[PITCH_FRACS][PITCH_FRACORDER] = { | 26 static const int16_t kIntrpCoef[PITCH_FRACS][PITCH_FRACORDER] = { |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 } | 232 } |
233 gainsQ12[k] = (int16_t)WEBRTC_SPL_SAT(PITCH_MAX_GAIN_Q12, tmpW32, 0); | 233 gainsQ12[k] = (int16_t)WEBRTC_SPL_SAT(PITCH_MAX_GAIN_Q12, tmpW32, 0); |
234 } | 234 } |
235 | 235 |
236 // Export buffer and states. | 236 // Export buffer and states. |
237 memcpy(pfp->ubufQQ, ubufQQ + PITCH_FRAME_LEN, sizeof(pfp->ubufQQ)); | 237 memcpy(pfp->ubufQQ, ubufQQ + PITCH_FRAME_LEN, sizeof(pfp->ubufQQ)); |
238 pfp->oldlagQ7 = lagsQ7[PITCH_SUBFRAMES - 1]; | 238 pfp->oldlagQ7 = lagsQ7[PITCH_SUBFRAMES - 1]; |
239 pfp->oldgainQ12 = gainsQ12[PITCH_SUBFRAMES - 1]; | 239 pfp->oldgainQ12 = gainsQ12[PITCH_SUBFRAMES - 1]; |
240 | 240 |
241 } | 241 } |
OLD | NEW |