| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 * - encoded : the encoded data vector | 137 * - encoded : the encoded data vector |
| 138 * | 138 * |
| 139 * Return value: | 139 * Return value: |
| 140 * : >0 - Length (in bytes) of coded data | 140 * : >0 - Length (in bytes) of coded data |
| 141 * : 0 - The buffer didn't reach the chosen | 141 * : 0 - The buffer didn't reach the chosen |
| 142 * frame-size so it keeps buffering speech | 142 * frame-size so it keeps buffering speech |
| 143 * samples. | 143 * samples. |
| 144 * : -1 - Error | 144 * : -1 - Error |
| 145 */ | 145 */ |
| 146 | 146 |
| 147 int WebRtcIsac_Encode( | 147 int16_t WebRtcIsac_Encode( |
| 148 ISACStruct* ISAC_main_inst, | 148 ISACStruct* ISAC_main_inst, |
| 149 const int16_t* speechIn, | 149 const int16_t* speechIn, |
| 150 uint8_t* encoded); | 150 uint8_t* encoded); |
| 151 | 151 |
| 152 | 152 |
| 153 /*****************************************************************************
* | 153 /*****************************************************************************
* |
| 154 * WebRtcIsac_DecoderInit(...) | 154 * WebRtcIsac_DecoderInit(...) |
| 155 * | 155 * |
| 156 * This function initializes an ISAC instance prior to the decoder calls. | 156 * This function initializes an ISAC instance prior to the decoder calls. |
| 157 * | 157 * |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 * - encoded : encoded ISAC frame(s). | 207 * - encoded : encoded ISAC frame(s). |
| 208 * - len : bytes in encoded vector. | 208 * - len : bytes in encoded vector. |
| 209 * | 209 * |
| 210 * Output: | 210 * Output: |
| 211 * - decoded : The decoded vector. | 211 * - decoded : The decoded vector. |
| 212 * | 212 * |
| 213 * Return value : >0 - number of samples in decoded vector. | 213 * Return value : >0 - number of samples in decoded vector. |
| 214 * -1 - Error. | 214 * -1 - Error. |
| 215 */ | 215 */ |
| 216 | 216 |
| 217 int WebRtcIsac_Decode( | 217 int16_t WebRtcIsac_Decode( |
| 218 ISACStruct* ISAC_main_inst, | 218 ISACStruct* ISAC_main_inst, |
| 219 const uint8_t* encoded, | 219 const uint8_t* encoded, |
| 220 int16_t len, | 220 int16_t len, |
| 221 int16_t* decoded, | 221 int16_t* decoded, |
| 222 int16_t* speechType); | 222 int16_t* speechType); |
| 223 | 223 |
| 224 | 224 |
| 225 /*****************************************************************************
* | 225 /*****************************************************************************
* |
| 226 * WebRtcIsac_DecodePlc(...) | 226 * WebRtcIsac_DecodePlc(...) |
| 227 * | 227 * |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 * in bits/second. | 262 * in bits/second. |
| 263 * - framesize : frame-size in millisecond. | 263 * - framesize : frame-size in millisecond. |
| 264 * | 264 * |
| 265 * Return value : 0 - ok | 265 * Return value : 0 - ok |
| 266 * -1 - Error | 266 * -1 - Error |
| 267 */ | 267 */ |
| 268 | 268 |
| 269 int16_t WebRtcIsac_Control( | 269 int16_t WebRtcIsac_Control( |
| 270 ISACStruct* ISAC_main_inst, | 270 ISACStruct* ISAC_main_inst, |
| 271 int32_t rate, | 271 int32_t rate, |
| 272 int framesize); | 272 int16_t framesize); |
| 273 | 273 |
| 274 | 274 |
| 275 /*****************************************************************************
* | 275 /*****************************************************************************
* |
| 276 * WebRtcIsac_ControlBwe(...) | 276 * WebRtcIsac_ControlBwe(...) |
| 277 * | 277 * |
| 278 * 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 |
| 279 * 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 |
| 280 * 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. |
| 281 * | 281 * |
| 282 * 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 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 293 * out the adaptation process, 0 to let iSAC | 293 * out the adaptation process, 0 to let iSAC |
| 294 * change the frame-size if required. | 294 * change the frame-size if required. |
| 295 * | 295 * |
| 296 * Return value : 0 - ok | 296 * Return value : 0 - ok |
| 297 * -1 - Error | 297 * -1 - Error |
| 298 */ | 298 */ |
| 299 | 299 |
| 300 int16_t WebRtcIsac_ControlBwe( | 300 int16_t WebRtcIsac_ControlBwe( |
| 301 ISACStruct* ISAC_main_inst, | 301 ISACStruct* ISAC_main_inst, |
| 302 int32_t rateBPS, | 302 int32_t rateBPS, |
| 303 int frameSizeMs, | 303 int16_t frameSizeMs, |
| 304 int16_t enforceFrameSize); | 304 int16_t enforceFrameSize); |
| 305 | 305 |
| 306 | 306 |
| 307 /*****************************************************************************
* | 307 /*****************************************************************************
* |
| 308 * WebRtcIsac_ReadFrameLen(...) | 308 * WebRtcIsac_ReadFrameLen(...) |
| 309 * | 309 * |
| 310 * This function returns the length of the frame represented in the packet. | 310 * This function returns the length of the frame represented in the packet. |
| 311 * | 311 * |
| 312 * Input: | 312 * Input: |
| 313 * - encoded : Encoded bit-stream | 313 * - encoded : Encoded bit-stream |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 * - ISAC_main_inst : ISAC instance. | 694 * - ISAC_main_inst : ISAC instance. |
| 695 * - encoded : encoded ISAC RCU frame(s) | 695 * - encoded : encoded ISAC RCU frame(s) |
| 696 * - len : bytes in encoded vector | 696 * - len : bytes in encoded vector |
| 697 * | 697 * |
| 698 * Output: | 698 * Output: |
| 699 * - decoded : The decoded vector | 699 * - decoded : The decoded vector |
| 700 * | 700 * |
| 701 * Return value : >0 - number of samples in decoded vector | 701 * Return value : >0 - number of samples in decoded vector |
| 702 * -1 - Error | 702 * -1 - Error |
| 703 */ | 703 */ |
| 704 int WebRtcIsac_DecodeRcu( | 704 int16_t WebRtcIsac_DecodeRcu( |
| 705 ISACStruct* ISAC_main_inst, | 705 ISACStruct* ISAC_main_inst, |
| 706 const uint8_t* encoded, | 706 const uint8_t* encoded, |
| 707 int16_t len, | 707 int16_t len, |
| 708 int16_t* decoded, | 708 int16_t* decoded, |
| 709 int16_t* speechType); | 709 int16_t* speechType); |
| 710 | 710 |
| 711 | 711 |
| 712 #if defined(__cplusplus) | 712 #if defined(__cplusplus) |
| 713 } | 713 } |
| 714 #endif | 714 #endif |
| 715 | 715 |
| 716 | 716 |
| 717 | 717 |
| 718 #endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INTERFACE_ISAC_H_ */ | 718 #endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INTERFACE_ISAC_H_ */ |
| OLD | NEW |