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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 * | 262 * |
263 * Return value : 0 - ok | 263 * Return value : 0 - ok |
264 * -1 - Error | 264 * -1 - Error |
265 */ | 265 */ |
266 | 266 |
267 int16_t WebRtcIsac_Control( | 267 int16_t WebRtcIsac_Control( |
268 ISACStruct* ISAC_main_inst, | 268 ISACStruct* ISAC_main_inst, |
269 int32_t rate, | 269 int32_t rate, |
270 int framesize); | 270 int framesize); |
271 | 271 |
| 272 void WebRtcIsac_SetInitialBweBottleneck(ISACStruct* ISAC_main_inst, |
| 273 int bottleneck_bits_per_second); |
272 | 274 |
273 /*****************************************************************************
* | 275 /*****************************************************************************
* |
274 * WebRtcIsac_ControlBwe(...) | 276 * WebRtcIsac_ControlBwe(...) |
275 * | 277 * |
276 * This function sets the initial values of bottleneck and frame-size if | 278 * This function sets the initial values of bottleneck and frame-size if |
277 * iSAC is used in channel-adaptive mode. Therefore, this API is not | 279 * iSAC is used in channel-adaptive mode. Therefore, this API is not |
278 * applicable if the codec is created to operate in super-wideband mode. | 280 * applicable if the codec is created to operate in super-wideband mode. |
279 * | 281 * |
280 * Through this API, users can enforce a frame-size for all values of | 282 * Through this API, users can enforce a frame-size for all values of |
281 * bottleneck. Then iSAC will not automatically change the frame-size. | 283 * bottleneck. Then iSAC will not automatically change the frame-size. |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 * Return value : >0 - number of samples in decoded vector | 701 * Return value : >0 - number of samples in decoded vector |
700 * -1 - Error | 702 * -1 - Error |
701 */ | 703 */ |
702 int WebRtcIsac_DecodeRcu( | 704 int WebRtcIsac_DecodeRcu( |
703 ISACStruct* ISAC_main_inst, | 705 ISACStruct* ISAC_main_inst, |
704 const uint8_t* encoded, | 706 const uint8_t* encoded, |
705 int16_t len, | 707 int16_t len, |
706 int16_t* decoded, | 708 int16_t* decoded, |
707 int16_t* speechType); | 709 int16_t* speechType); |
708 | 710 |
709 /* Fills in an IsacBandwidthInfo struct. */ | 711 /* Fills in an IsacBandwidthInfo struct. |inst| should be a decoder. */ |
710 void WebRtcIsac_GetBandwidthInfo(ISACStruct* inst, IsacBandwidthInfo* bwinfo); | 712 void WebRtcIsac_GetBandwidthInfo(ISACStruct* inst, IsacBandwidthInfo* bwinfo); |
711 | 713 |
712 /* Uses the values from an IsacBandwidthInfo struct. */ | 714 /* Uses the values from an IsacBandwidthInfo struct. |inst| should be an |
| 715 encoder. */ |
713 void WebRtcIsac_SetBandwidthInfo(ISACStruct* inst, | 716 void WebRtcIsac_SetBandwidthInfo(ISACStruct* inst, |
714 const IsacBandwidthInfo* bwinfo); | 717 const IsacBandwidthInfo* bwinfo); |
715 | 718 |
| 719 /* If |inst| is a decoder but not an encoder: tell it what sample rate the |
| 720 encoder is using, for bandwidth estimation purposes. */ |
| 721 void WebRtcIsac_SetEncSampRateInDecoder(ISACStruct* inst, int sample_rate_hz); |
| 722 |
716 #if defined(__cplusplus) | 723 #if defined(__cplusplus) |
717 } | 724 } |
718 #endif | 725 #endif |
719 | 726 |
720 | 727 |
721 | 728 |
722 #endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INTERFACE_ISAC_H_ */ | 729 #endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INTERFACE_ISAC_H_ */ |
OLD | NEW |