| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 silk_encoder_state_FIX *psEnc, /* I
/O Pointer to Silk FIX encoder state
*/ | 66 silk_encoder_state_FIX *psEnc, /* I
/O Pointer to Silk FIX encoder state
*/ |
| 67 opus_int32 *pnBytesOut, /* O
Pointer to number of payload bytes;
*/ | 67 opus_int32 *pnBytesOut, /* O
Pointer to number of payload bytes;
*/ |
| 68 ec_enc *psRangeEnc, /* I
/O compressor data structure
*/ | 68 ec_enc *psRangeEnc, /* I
/O compressor data structure
*/ |
| 69 opus_int condCoding, /* I
The type of conditional coding to use
*/ | 69 opus_int condCoding, /* I
The type of conditional coding to use
*/ |
| 70 opus_int maxBits, /* I
If > 0: maximum number of output bits
*/ | 70 opus_int maxBits, /* I
If > 0: maximum number of output bits
*/ |
| 71 opus_int useCBR /* I
Flag to force constant-bitrate operation
*/ | 71 opus_int useCBR /* I
Flag to force constant-bitrate operation
*/ |
| 72 ); | 72 ); |
| 73 | 73 |
| 74 /* Initializes the Silk encoder state */ | 74 /* Initializes the Silk encoder state */ |
| 75 opus_int silk_init_encoder( | 75 opus_int silk_init_encoder( |
| 76 silk_encoder_state_Fxx *psEnc /* I
/O Pointer to Silk FIX encoder state
*/ | 76 silk_encoder_state_Fxx *psEnc, /* I
/O Pointer to Silk FIX encoder state
*/ |
| 77 int arch /* I
Run-time architecture
*/ |
| 77 ); | 78 ); |
| 78 | 79 |
| 79 /* Control the Silk encoder */ | 80 /* Control the Silk encoder */ |
| 80 opus_int silk_control_encoder( | 81 opus_int silk_control_encoder( |
| 81 silk_encoder_state_Fxx *psEnc, /* I
/O Pointer to Silk encoder state
*/ | 82 silk_encoder_state_Fxx *psEnc, /* I
/O Pointer to Silk encoder state
*/ |
| 82 silk_EncControlStruct *encControl, /* I
Control structure
*/ | 83 silk_EncControlStruct *encControl, /* I
Control structure
*/ |
| 83 const opus_int32 TargetRate_bps, /* I
Target max bitrate (bps)
*/ | 84 const opus_int32 TargetRate_bps, /* I
Target max bitrate (bps)
*/ |
| 84 const opus_int allow_bw_switch, /* I
Flag to allow switching audio bandwidth
*/ | 85 const opus_int allow_bw_switch, /* I
Flag to allow switching audio bandwidth
*/ |
| 85 const opus_int channelNb, /* I
Channel number
*/ | 86 const opus_int channelNb, /* I
Channel number
*/ |
| 86 const opus_int force_fs_kHz | 87 const opus_int force_fs_kHz |
| (...skipping 10 matching lines...) Expand all Loading... |
| 97 ); | 98 ); |
| 98 | 99 |
| 99 /**************************/ | 100 /**************************/ |
| 100 /* Noise shaping analysis */ | 101 /* Noise shaping analysis */ |
| 101 /**************************/ | 102 /**************************/ |
| 102 /* Compute noise shaping coefficients and initial gain values */ | 103 /* Compute noise shaping coefficients and initial gain values */ |
| 103 void silk_noise_shape_analysis_FIX( | 104 void silk_noise_shape_analysis_FIX( |
| 104 silk_encoder_state_FIX *psEnc, /* I
/O Encoder state FIX
*/ | 105 silk_encoder_state_FIX *psEnc, /* I
/O Encoder state FIX
*/ |
| 105 silk_encoder_control_FIX *psEncCtrl, /* I
/O Encoder control FIX
*/ | 106 silk_encoder_control_FIX *psEncCtrl, /* I
/O Encoder control FIX
*/ |
| 106 const opus_int16 *pitch_res, /* I
LPC residual from pitch analysis
*/ | 107 const opus_int16 *pitch_res, /* I
LPC residual from pitch analysis
*/ |
| 107 const opus_int16 *x /* I
Input signal [ frame_length + la_shape ]
*/ | 108 const opus_int16 *x, /* I
Input signal [ frame_length + la_shape ]
*/ |
| 109 int arch /* I
Run-time architecture
*/ |
| 108 ); | 110 ); |
| 109 | 111 |
| 110 /* Autocorrelations for a warped frequency axis */ | 112 /* Autocorrelations for a warped frequency axis */ |
| 111 void silk_warped_autocorrelation_FIX( | 113 void silk_warped_autocorrelation_FIX( |
| 112 opus_int32 *corr, /* O
Result [order + 1]
*/ | 114 opus_int32 *corr, /* O
Result [order + 1]
*/ |
| 113 opus_int *scale, /* O
Scaling of the correlation vector
*/ | 115 opus_int *scale, /* O
Scaling of the correlation vector
*/ |
| 114 const opus_int16 *input, /* I
Input data to correlate
*/ | 116 const opus_int16 *input, /* I
Input data to correlate
*/ |
| 115 const opus_int warping_Q16, /* I
Warping coefficient
*/ | 117 const opus_int warping_Q16, /* I
Warping coefficient
*/ |
| 116 const opus_int length, /* I
Length of input
*/ | 118 const opus_int length, /* I
Length of input
*/ |
| 117 const opus_int order /* I
Correlation order (even)
*/ | 119 const opus_int order /* I
Correlation order (even)
*/ |
| 118 ); | 120 ); |
| 119 | 121 |
| 120 /* Calculation of LTP state scaling */ | 122 /* Calculation of LTP state scaling */ |
| 121 void silk_LTP_scale_ctrl_FIX( | 123 void silk_LTP_scale_ctrl_FIX( |
| 122 silk_encoder_state_FIX *psEnc, /* I
/O encoder state
*/ | 124 silk_encoder_state_FIX *psEnc, /* I
/O encoder state
*/ |
| 123 silk_encoder_control_FIX *psEncCtrl, /* I
/O encoder control
*/ | 125 silk_encoder_control_FIX *psEncCtrl, /* I
/O encoder control
*/ |
| 124 opus_int condCoding /* I
The type of conditional coding to use
*/ | 126 opus_int condCoding /* I
The type of conditional coding to use
*/ |
| 125 ); | 127 ); |
| 126 | 128 |
| 127 /**********************************************/ | 129 /**********************************************/ |
| 128 /* Prediction Analysis */ | 130 /* Prediction Analysis */ |
| 129 /**********************************************/ | 131 /**********************************************/ |
| 130 /* Find pitch lags */ | 132 /* Find pitch lags */ |
| 131 void silk_find_pitch_lags_FIX( | 133 void silk_find_pitch_lags_FIX( |
| 132 silk_encoder_state_FIX *psEnc, /* I
/O encoder state
*/ | 134 silk_encoder_state_FIX *psEnc, /* I
/O encoder state
*/ |
| 133 silk_encoder_control_FIX *psEncCtrl, /* I
/O encoder control
*/ | 135 silk_encoder_control_FIX *psEncCtrl, /* I
/O encoder control
*/ |
| 134 opus_int16 res[], /* O
residual
*/ | 136 opus_int16 res[], /* O
residual
*/ |
| 135 const opus_int16 x[] /* I
Speech signal
*/ | 137 const opus_int16 x[], /* I
Speech signal
*/ |
| 138 int arch /* I
Run-time architecture
*/ |
| 136 ); | 139 ); |
| 137 | 140 |
| 138 /* Find LPC and LTP coefficients */ | 141 /* Find LPC and LTP coefficients */ |
| 139 void silk_find_pred_coefs_FIX( | 142 void silk_find_pred_coefs_FIX( |
| 140 silk_encoder_state_FIX *psEnc, /* I
/O encoder state
*/ | 143 silk_encoder_state_FIX *psEnc, /* I
/O encoder state
*/ |
| 141 silk_encoder_control_FIX *psEncCtrl, /* I
/O encoder control
*/ | 144 silk_encoder_control_FIX *psEncCtrl, /* I
/O encoder control
*/ |
| 142 const opus_int16 res_pitch[], /* I
Residual from pitch analysis
*/ | 145 const opus_int16 res_pitch[], /* I
Residual from pitch analysis
*/ |
| 143 const opus_int16 x[], /* I
Speech signal
*/ | 146 const opus_int16 x[], /* I
Speech signal
*/ |
| 144 opus_int condCoding /* I
The type of conditional coding to use
*/ | 147 opus_int condCoding /* I
The type of conditional coding to use
*/ |
| 145 ); | 148 ); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 const opus_int32 *b, /* I
Pointer to b vector
*/ | 248 const opus_int32 *b, /* I
Pointer to b vector
*/ |
| 246 opus_int32 *x_Q16 /* O
Pointer to x solution vector
*/ | 249 opus_int32 *x_Q16 /* O
Pointer to x solution vector
*/ |
| 247 ); | 250 ); |
| 248 | 251 |
| 249 #ifndef FORCE_CPP_BUILD | 252 #ifndef FORCE_CPP_BUILD |
| 250 #ifdef __cplusplus | 253 #ifdef __cplusplus |
| 251 } | 254 } |
| 252 #endif /* __cplusplus */ | 255 #endif /* __cplusplus */ |
| 253 #endif /* FORCE_CPP_BUILD */ | 256 #endif /* FORCE_CPP_BUILD */ |
| 254 #endif /* SILK_MAIN_FIX_H */ | 257 #endif /* SILK_MAIN_FIX_H */ |
| OLD | NEW |