| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 * a packet | 87 * a packet |
| 88 * - speechIn : Input speech vector | 88 * - speechIn : Input speech vector |
| 89 * - len : Samples in speechIn | 89 * - len : Samples in speechIn |
| 90 * | 90 * |
| 91 * Output: | 91 * Output: |
| 92 * - encoded : The encoded data vector | 92 * - encoded : The encoded data vector |
| 93 * | 93 * |
| 94 * Return value : Length (in bytes) of coded data | 94 * Return value : Length (in bytes) of coded data |
| 95 */ | 95 */ |
| 96 | 96 |
| 97 int16_t WebRtcG722_Encode(G722EncInst* G722enc_inst, | 97 size_t WebRtcG722_Encode(G722EncInst* G722enc_inst, |
| 98 const int16_t* speechIn, | 98 const int16_t* speechIn, |
| 99 int16_t len, | 99 size_t len, |
| 100 uint8_t* encoded); | 100 uint8_t* encoded); |
| 101 | 101 |
| 102 | 102 |
| 103 /**************************************************************************** | 103 /**************************************************************************** |
| 104 * WebRtcG722_CreateDecoder(...) | 104 * WebRtcG722_CreateDecoder(...) |
| 105 * | 105 * |
| 106 * Create memory used for G722 encoder | 106 * Create memory used for G722 encoder |
| 107 * | 107 * |
| 108 * Input: | 108 * Input: |
| 109 * - G722dec_inst : G722 instance for decoder | 109 * - G722dec_inst : G722 instance for decoder |
| 110 * | 110 * |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 * - G722dec_inst : G722 instance, i.e. the user that should decode | 155 * - G722dec_inst : G722 instance, i.e. the user that should decode |
| 156 * a packet | 156 * a packet |
| 157 * - encoded : Encoded G722 frame(s) | 157 * - encoded : Encoded G722 frame(s) |
| 158 * - len : Bytes in encoded vector | 158 * - len : Bytes in encoded vector |
| 159 * | 159 * |
| 160 * Output: | 160 * Output: |
| 161 * - decoded : The decoded vector | 161 * - decoded : The decoded vector |
| 162 * - speechType : 1 normal, 2 CNG (Since G722 does not have its own | 162 * - speechType : 1 normal, 2 CNG (Since G722 does not have its own |
| 163 * DTX/CNG scheme it should always return 1) | 163 * DTX/CNG scheme it should always return 1) |
| 164 * | 164 * |
| 165 * Return value : >0 - Samples in decoded vector | 165 * Return value : Samples in decoded vector |
| 166 * -1 - Error | |
| 167 */ | 166 */ |
| 168 | 167 |
| 169 int16_t WebRtcG722_Decode(G722DecInst *G722dec_inst, | 168 size_t WebRtcG722_Decode(G722DecInst *G722dec_inst, |
| 170 const uint8_t* encoded, | 169 const uint8_t* encoded, |
| 171 int16_t len, | 170 size_t len, |
| 172 int16_t *decoded, | 171 int16_t *decoded, |
| 173 int16_t *speechType); | 172 int16_t *speechType); |
| 174 | 173 |
| 175 /**************************************************************************** | 174 /**************************************************************************** |
| 176 * WebRtcG722_Version(...) | 175 * WebRtcG722_Version(...) |
| 177 * | 176 * |
| 178 * Get a string with the current version of the codec | 177 * Get a string with the current version of the codec |
| 179 */ | 178 */ |
| 180 | 179 |
| 181 int16_t WebRtcG722_Version(char *versionStr, short len); | 180 int16_t WebRtcG722_Version(char *versionStr, short len); |
| 182 | 181 |
| 183 | 182 |
| 184 #ifdef __cplusplus | 183 #ifdef __cplusplus |
| 185 } | 184 } |
| 186 #endif | 185 #endif |
| 187 | 186 |
| 188 | 187 |
| 189 #endif /* MODULES_AUDIO_CODING_CODECS_G722_MAIN_INTERFACE_G722_INTERFACE_H_ */ | 188 #endif /* MODULES_AUDIO_CODING_CODECS_G722_MAIN_INTERFACE_G722_INTERFACE_H_ */ |
| OLD | NEW |