OLD | NEW |
1 /*********************************************************************** | 1 /*********************************************************************** |
2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. | 2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. |
3 Redistribution and use in source and binary forms, with or without | 3 Redistribution and use in source and binary forms, with or without |
4 modification, are permitted provided that the following conditions | 4 modification, are permitted provided that the following conditions |
5 are met: | 5 are met: |
6 - Redistributions of source code must retain the above copyright notice, | 6 - Redistributions of source code must retain the above copyright notice, |
7 this list of conditions and the following disclaimer. | 7 this list of conditions and the following disclaimer. |
8 - Redistributions in binary form must reproduce the above copyright | 8 - Redistributions in binary form must reproduce the above copyright |
9 notice, this list of conditions and the following disclaimer in the | 9 notice, this list of conditions and the following disclaimer in the |
10 documentation and/or other materials provided with the distribution. | 10 documentation and/or other materials provided with the distribution. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 silk_encoder_state_FLP *psEnc, /* I/O
Encoder state FLP */ | 64 silk_encoder_state_FLP *psEnc, /* I/O
Encoder state FLP */ |
65 opus_int32 *pnBytesOut, /* O
Number of payload bytes; */ | 65 opus_int32 *pnBytesOut, /* O
Number of payload bytes; */ |
66 ec_enc *psRangeEnc, /* I/O
compressor data structure */ | 66 ec_enc *psRangeEnc, /* I/O
compressor data structure */ |
67 opus_int condCoding, /* I
The type of conditional coding to use */ | 67 opus_int condCoding, /* I
The type of conditional coding to use */ |
68 opus_int maxBits, /* I
If > 0: maximum number of output bits */ | 68 opus_int maxBits, /* I
If > 0: maximum number of output bits */ |
69 opus_int useCBR /* I
Flag to force constant-bitrate operation */ | 69 opus_int useCBR /* I
Flag to force constant-bitrate operation */ |
70 ); | 70 ); |
71 | 71 |
72 /* Initializes the Silk encoder state */ | 72 /* Initializes the Silk encoder state */ |
73 opus_int silk_init_encoder( | 73 opus_int silk_init_encoder( |
74 silk_encoder_state_FLP *psEnc /* I/O
Encoder state FLP */ | 74 silk_encoder_state_FLP *psEnc, /* I/O
Encoder state FLP */ |
| 75 int arch /* I
Run-tim architecture */ |
75 ); | 76 ); |
76 | 77 |
77 /* Control the Silk encoder */ | 78 /* Control the Silk encoder */ |
78 opus_int silk_control_encoder( | 79 opus_int silk_control_encoder( |
79 silk_encoder_state_FLP *psEnc, /* I/O
Pointer to Silk encoder state FLP */ | 80 silk_encoder_state_FLP *psEnc, /* I/O
Pointer to Silk encoder state FLP */ |
80 silk_EncControlStruct *encControl, /* I
Control structure */ | 81 silk_EncControlStruct *encControl, /* I
Control structure */ |
81 const opus_int32 TargetRate_bps, /* I
Target max bitrate (bps) */ | 82 const opus_int32 TargetRate_bps, /* I
Target max bitrate (bps) */ |
82 const opus_int allow_bw_switch, /* I
Flag to allow switching audio bandwidth */ | 83 const opus_int allow_bw_switch, /* I
Flag to allow switching audio bandwidth */ |
83 const opus_int channelNb, /* I
Channel number */ | 84 const opus_int channelNb, /* I
Channel number */ |
84 const opus_int force_fs_kHz | 85 const opus_int force_fs_kHz |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 ); | 123 ); |
123 | 124 |
124 /**********************************************/ | 125 /**********************************************/ |
125 /* Prediction Analysis */ | 126 /* Prediction Analysis */ |
126 /**********************************************/ | 127 /**********************************************/ |
127 /* Find pitch lags */ | 128 /* Find pitch lags */ |
128 void silk_find_pitch_lags_FLP( | 129 void silk_find_pitch_lags_FLP( |
129 silk_encoder_state_FLP *psEnc, /* I/O
Encoder state FLP */ | 130 silk_encoder_state_FLP *psEnc, /* I/O
Encoder state FLP */ |
130 silk_encoder_control_FLP *psEncCtrl, /* I/O
Encoder control FLP */ | 131 silk_encoder_control_FLP *psEncCtrl, /* I/O
Encoder control FLP */ |
131 silk_float res[], /* O
Residual */ | 132 silk_float res[], /* O
Residual */ |
132 const silk_float x[] /* I
Speech signal */ | 133 const silk_float x[], /* I
Speech signal */ |
| 134 int arch /* I
Run-time architecture */ |
133 ); | 135 ); |
134 | 136 |
135 /* Find LPC and LTP coefficients */ | 137 /* Find LPC and LTP coefficients */ |
136 void silk_find_pred_coefs_FLP( | 138 void silk_find_pred_coefs_FLP( |
137 silk_encoder_state_FLP *psEnc, /* I/O
Encoder state FLP */ | 139 silk_encoder_state_FLP *psEnc, /* I/O
Encoder state FLP */ |
138 silk_encoder_control_FLP *psEncCtrl, /* I/O
Encoder control FLP */ | 140 silk_encoder_control_FLP *psEncCtrl, /* I/O
Encoder control FLP */ |
139 const silk_float res_pitch[], /* I
Residual from pitch analysis */ | 141 const silk_float res_pitch[], /* I
Residual from pitch analysis */ |
140 const silk_float x[], /* I
Speech signal */ | 142 const silk_float x[], /* I
Speech signal */ |
141 opus_int condCoding /* I
The type of conditional coding to use */ | 143 opus_int condCoding /* I
The type of conditional coding to use */ |
142 ); | 144 ); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 const silk_float s[], /* I
Input signal */ | 194 const silk_float s[], /* I
Input signal */ |
193 const opus_int length, /* I
Length of input signal */ | 195 const opus_int length, /* I
Length of input signal */ |
194 const opus_int Order /* I
LPC order */ | 196 const opus_int Order /* I
LPC order */ |
195 ); | 197 ); |
196 | 198 |
197 /* LTP tap quantizer */ | 199 /* LTP tap quantizer */ |
198 void silk_quant_LTP_gains_FLP( | 200 void silk_quant_LTP_gains_FLP( |
199 silk_float B[ MAX_NB_SUBFR * LTP_ORDER ], /* I/O
(Un-)quantized LTP gains */ | 201 silk_float B[ MAX_NB_SUBFR * LTP_ORDER ], /* I/O
(Un-)quantized LTP gains */ |
200 opus_int8 cbk_index[ MAX_NB_SUBFR ], /* O
Codebook index */ | 202 opus_int8 cbk_index[ MAX_NB_SUBFR ], /* O
Codebook index */ |
201 opus_int8 *periodicity_index, /* O
Periodicity index */ | 203 opus_int8 *periodicity_index, /* O
Periodicity index */ |
| 204 opus_int32 *sum_log_gain_Q7, /* I/O
Cumulative max prediction gain */ |
202 const silk_float W[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /
* I Error weights */ | 205 const silk_float W[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /
* I Error weights */ |
203 const opus_int mu_Q10, /* I
Mu value (R/D tradeoff) */ | 206 const opus_int mu_Q10, /* I
Mu value (R/D tradeoff) */ |
204 const opus_int lowComplexity, /* I
Flag for low complexity */ | 207 const opus_int lowComplexity, /* I
Flag for low complexity */ |
205 const opus_int nb_subfr /* I
number of subframes */ | 208 const opus_int nb_subfr /* I
number of subframes */ |
206 ); | 209 ); |
207 | 210 |
208 /* Residual energy: nrg = wxx - 2 * wXx * c + c' * wXX * c */ | 211 /* Residual energy: nrg = wxx - 2 * wXx * c + c' * wXX * c */ |
209 silk_float silk_residual_energy_covar_FLP( /* O
Weighted residual energy */ | 212 silk_float silk_residual_energy_covar_FLP( /* O
Weighted residual energy */ |
210 const silk_float *c, /* I
Filter coefficients */ | 213 const silk_float *c, /* I
Filter coefficients */ |
211 silk_float *wXX, /* I/O
Weighted correlation matrix, reg. out */ | 214 silk_float *wXX, /* I/O
Weighted correlation matrix, reg. out */ |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 silk_nsq_state *psNSQ, /* I/O
Noise Shaping Quantzation state */ | 303 silk_nsq_state *psNSQ, /* I/O
Noise Shaping Quantzation state */ |
301 opus_int8 pulses[], /* O
Quantized pulse signal */ | 304 opus_int8 pulses[], /* O
Quantized pulse signal */ |
302 const silk_float x[] /* I
Prefiltered input signal */ | 305 const silk_float x[] /* I
Prefiltered input signal */ |
303 ); | 306 ); |
304 | 307 |
305 #ifdef __cplusplus | 308 #ifdef __cplusplus |
306 } | 309 } |
307 #endif | 310 #endif |
308 | 311 |
309 #endif | 312 #endif |
OLD | NEW |