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 11 matching lines...) Expand all Loading... |
22 /*----------------------------------------------------------------* | 22 /*----------------------------------------------------------------* |
23 * Construct an additional codebook vector by filtering the | 23 * Construct an additional codebook vector by filtering the |
24 * initial codebook buffer. This vector is then used to expand | 24 * initial codebook buffer. This vector is then used to expand |
25 * the codebook with an additional section. | 25 * the codebook with an additional section. |
26 *---------------------------------------------------------------*/ | 26 *---------------------------------------------------------------*/ |
27 | 27 |
28 void WebRtcIlbcfix_FilteredCbVecs( | 28 void WebRtcIlbcfix_FilteredCbVecs( |
29 int16_t *cbvectors, /* (o) Codebook vector for the higher section */ | 29 int16_t *cbvectors, /* (o) Codebook vector for the higher section */ |
30 int16_t *CBmem, /* (i) Codebook memory that is filtered to create a | 30 int16_t *CBmem, /* (i) Codebook memory that is filtered to create a |
31 second CB section */ | 31 second CB section */ |
32 int lMem, /* (i) Length of codebook memory */ | 32 size_t lMem, /* (i) Length of codebook memory */ |
33 int16_t samples /* (i) Number of samples to filter */ | 33 size_t samples /* (i) Number of samples to filter */ |
34 ) { | 34 ) { |
35 | 35 |
36 /* Set up the memory, start with zero state */ | 36 /* Set up the memory, start with zero state */ |
37 WebRtcSpl_MemSetW16(CBmem+lMem, 0, CB_HALFFILTERLEN); | 37 WebRtcSpl_MemSetW16(CBmem+lMem, 0, CB_HALFFILTERLEN); |
38 WebRtcSpl_MemSetW16(CBmem-CB_HALFFILTERLEN, 0, CB_HALFFILTERLEN); | 38 WebRtcSpl_MemSetW16(CBmem-CB_HALFFILTERLEN, 0, CB_HALFFILTERLEN); |
39 WebRtcSpl_MemSetW16(cbvectors, 0, lMem-samples); | 39 WebRtcSpl_MemSetW16(cbvectors, 0, lMem-samples); |
40 | 40 |
41 /* Filter to obtain the filtered CB memory */ | 41 /* Filter to obtain the filtered CB memory */ |
42 | 42 |
43 WebRtcSpl_FilterMAFastQ12( | 43 WebRtcSpl_FilterMAFastQ12( |
44 CBmem+CB_HALFFILTERLEN+lMem-samples, cbvectors+lMem-samples, | 44 CBmem+CB_HALFFILTERLEN+lMem-samples, cbvectors+lMem-samples, |
45 (int16_t*)WebRtcIlbcfix_kCbFiltersRev, CB_FILTERLEN, samples); | 45 (int16_t*)WebRtcIlbcfix_kCbFiltersRev, CB_FILTERLEN, samples); |
46 | 46 |
47 return; | 47 return; |
48 } | 48 } |
OLD | NEW |