| OLD | NEW |
| 1 /* Copyright (c) 2014, Cisco Systems, INC | 1 /* Copyright (c) 2014, Cisco Systems, INC |
| 2 Written by XiangMingZhu WeiZhou MinPeng YanWang | 2 Written by XiangMingZhu WeiZhou MinPeng YanWang |
| 3 | 3 |
| 4 Redistribution and use in source and binary forms, with or without | 4 Redistribution and use in source and binary forms, with or without |
| 5 modification, are permitted provided that the following conditions | 5 modification, are permitted provided that the following conditions |
| 6 are met: | 6 are met: |
| 7 | 7 |
| 8 - Redistributions of source code must retain the above copyright | 8 - Redistributions of source code must retain the above copyright |
| 9 notice, this list of conditions and the following disclaimer. | 9 notice, this list of conditions and the following disclaimer. |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 silk_encoder_state *psEncC, | 59 silk_encoder_state *psEncC, |
| 60 const opus_int16 pIn[] | 60 const opus_int16 pIn[] |
| 61 ) = { | 61 ) = { |
| 62 silk_VAD_GetSA_Q8_c, /* non-sse */ | 62 silk_VAD_GetSA_Q8_c, /* non-sse */ |
| 63 silk_VAD_GetSA_Q8_c, | 63 silk_VAD_GetSA_Q8_c, |
| 64 silk_VAD_GetSA_Q8_c, | 64 silk_VAD_GetSA_Q8_c, |
| 65 MAY_HAVE_SSE4_1( silk_VAD_GetSA_Q8 ), /* sse4.1 */ | 65 MAY_HAVE_SSE4_1( silk_VAD_GetSA_Q8 ), /* sse4.1 */ |
| 66 MAY_HAVE_SSE4_1( silk_VAD_GetSA_Q8 ) /* avx */ | 66 MAY_HAVE_SSE4_1( silk_VAD_GetSA_Q8 ) /* avx */ |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 #if 0 /* FIXME: SSE disabled until the NSQ code gets updated. */ |
| 69 void (*const SILK_NSQ_IMPL[ OPUS_ARCHMASK + 1 ] )( | 70 void (*const SILK_NSQ_IMPL[ OPUS_ARCHMASK + 1 ] )( |
| 70 const silk_encoder_state *psEncC, /* I
/O Encoder State */ | 71 const silk_encoder_state *psEncC, /* I
Encoder State */ |
| 71 silk_nsq_state *NSQ, /* I
/O NSQ state */ | 72 silk_nsq_state *NSQ, /* I
/O NSQ state */ |
| 72 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ | 73 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ |
| 73 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ | 74 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ |
| 74 opus_int8 pulses[], /* O
Quantized pulse signal */ | 75 opus_int8 pulses[], /* O
Quantized pulse signal */ |
| 75 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ | 76 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ |
| 76 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ | 77 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ |
| 77 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ | 78 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ |
| 78 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ | 79 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ |
| 79 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ | 80 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ |
| 80 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ | 81 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ |
| 81 const opus_int32 Gains_Q16[ MAX_NB_SUBFR ], /* I
Quantization step sizes */ | 82 const opus_int32 Gains_Q16[ MAX_NB_SUBFR ], /* I
Quantization step sizes */ |
| 82 const opus_int pitchL[ MAX_NB_SUBFR ], /* I
Pitch lags */ | 83 const opus_int pitchL[ MAX_NB_SUBFR ], /* I
Pitch lags */ |
| 83 const opus_int Lambda_Q10, /* I
Rate/distortion tradeoff */ | 84 const opus_int Lambda_Q10, /* I
Rate/distortion tradeoff */ |
| 84 const opus_int LTP_scale_Q14 /* I
LTP state scaling */ | 85 const opus_int LTP_scale_Q14 /* I
LTP state scaling */ |
| 85 ) = { | 86 ) = { |
| 86 silk_NSQ_c, /* non-sse */ | 87 silk_NSQ_c, /* non-sse */ |
| 87 silk_NSQ_c, | 88 silk_NSQ_c, |
| 88 silk_NSQ_c, | 89 silk_NSQ_c, |
| 89 MAY_HAVE_SSE4_1( silk_NSQ ), /* sse4.1 */ | 90 MAY_HAVE_SSE4_1( silk_NSQ ), /* sse4.1 */ |
| 90 MAY_HAVE_SSE4_1( silk_NSQ ) /* avx */ | 91 MAY_HAVE_SSE4_1( silk_NSQ ) /* avx */ |
| 91 }; | 92 }; |
| 93 #endif |
| 92 | 94 |
| 95 #if 0 /* FIXME: SSE disabled until silk_VQ_WMat_EC_sse4_1() gets updated. */ |
| 93 void (*const SILK_VQ_WMAT_EC_IMPL[ OPUS_ARCHMASK + 1 ] )( | 96 void (*const SILK_VQ_WMAT_EC_IMPL[ OPUS_ARCHMASK + 1 ] )( |
| 94 opus_int8 *ind, /* O index of
best codebook vector */ | 97 opus_int8 *ind, /* O index of
best codebook vector */ |
| 95 opus_int32 *rate_dist_Q14, /* O best wei
ghted quant error + mu * rate */ | 98 opus_int32 *rate_dist_Q14, /* O best wei
ghted quant error + mu * rate */ |
| 96 opus_int *gain_Q7, /* O sum of a
bsolute LTP coefficients */ | 99 opus_int *gain_Q7, /* O sum of a
bsolute LTP coefficients */ |
| 97 const opus_int16 *in_Q14, /* I input ve
ctor to be quantized */ | 100 const opus_int16 *in_Q14, /* I input ve
ctor to be quantized */ |
| 98 const opus_int32 *W_Q18, /* I weightin
g matrix */ | 101 const opus_int32 *W_Q18, /* I weightin
g matrix */ |
| 99 const opus_int8 *cb_Q7, /* I codebook
*/ | 102 const opus_int8 *cb_Q7, /* I codebook
*/ |
| 100 const opus_uint8 *cb_gain_Q7, /* I codebook
effective gain */ | 103 const opus_uint8 *cb_gain_Q7, /* I codebook
effective gain */ |
| 101 const opus_uint8 *cl_Q5, /* I code len
gth for each codebook vector */ | 104 const opus_uint8 *cl_Q5, /* I code len
gth for each codebook vector */ |
| 102 const opus_int mu_Q9, /* I tradeoff
betw. weighted error and rate */ | 105 const opus_int mu_Q9, /* I tradeoff
betw. weighted error and rate */ |
| 103 const opus_int32 max_gain_Q7, /* I maximum
sum of absolute LTP coefficients */ | 106 const opus_int32 max_gain_Q7, /* I maximum
sum of absolute LTP coefficients */ |
| 104 opus_int L /* I number o
f vectors in codebook */ | 107 opus_int L /* I number o
f vectors in codebook */ |
| 105 ) = { | 108 ) = { |
| 106 silk_VQ_WMat_EC_c, /* non-sse */ | 109 silk_VQ_WMat_EC_c, /* non-sse */ |
| 107 silk_VQ_WMat_EC_c, | 110 silk_VQ_WMat_EC_c, |
| 108 silk_VQ_WMat_EC_c, | 111 silk_VQ_WMat_EC_c, |
| 109 MAY_HAVE_SSE4_1( silk_VQ_WMat_EC ), /* sse4.1 */ | 112 MAY_HAVE_SSE4_1( silk_VQ_WMat_EC ), /* sse4.1 */ |
| 110 MAY_HAVE_SSE4_1( silk_VQ_WMat_EC ) /* avx */ | 113 MAY_HAVE_SSE4_1( silk_VQ_WMat_EC ) /* avx */ |
| 111 }; | 114 }; |
| 115 #endif |
| 112 | 116 |
| 117 #if 0 /* FIXME: SSE disabled until the NSQ code gets updated. */ |
| 113 void (*const SILK_NSQ_DEL_DEC_IMPL[ OPUS_ARCHMASK + 1 ] )( | 118 void (*const SILK_NSQ_DEL_DEC_IMPL[ OPUS_ARCHMASK + 1 ] )( |
| 114 const silk_encoder_state *psEncC, /* I
/O Encoder State */ | 119 const silk_encoder_state *psEncC, /* I
Encoder State */ |
| 115 silk_nsq_state *NSQ, /* I
/O NSQ state */ | 120 silk_nsq_state *NSQ, /* I
/O NSQ state */ |
| 116 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ | 121 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ |
| 117 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ | 122 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ |
| 118 opus_int8 pulses[], /* O
Quantized pulse signal */ | 123 opus_int8 pulses[], /* O
Quantized pulse signal */ |
| 119 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ | 124 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ |
| 120 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ | 125 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ |
| 121 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ | 126 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ |
| 122 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ | 127 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ |
| 123 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ | 128 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ |
| 124 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ | 129 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ |
| 125 const opus_int32 Gains_Q16[ MAX_NB_SUBFR ], /* I
Quantization step sizes */ | 130 const opus_int32 Gains_Q16[ MAX_NB_SUBFR ], /* I
Quantization step sizes */ |
| 126 const opus_int pitchL[ MAX_NB_SUBFR ], /* I
Pitch lags */ | 131 const opus_int pitchL[ MAX_NB_SUBFR ], /* I
Pitch lags */ |
| 127 const opus_int Lambda_Q10, /* I
Rate/distortion tradeoff */ | 132 const opus_int Lambda_Q10, /* I
Rate/distortion tradeoff */ |
| 128 const opus_int LTP_scale_Q14 /* I
LTP state scaling */ | 133 const opus_int LTP_scale_Q14 /* I
LTP state scaling */ |
| 129 ) = { | 134 ) = { |
| 130 silk_NSQ_del_dec_c, /* non-sse */ | 135 silk_NSQ_del_dec_c, /* non-sse */ |
| 131 silk_NSQ_del_dec_c, | 136 silk_NSQ_del_dec_c, |
| 132 silk_NSQ_del_dec_c, | 137 silk_NSQ_del_dec_c, |
| 133 MAY_HAVE_SSE4_1( silk_NSQ_del_dec ), /* sse4.1 */ | 138 MAY_HAVE_SSE4_1( silk_NSQ_del_dec ), /* sse4.1 */ |
| 134 MAY_HAVE_SSE4_1( silk_NSQ_del_dec ) /* avx */ | 139 MAY_HAVE_SSE4_1( silk_NSQ_del_dec ) /* avx */ |
| 135 }; | 140 }; |
| 141 #endif |
| 136 | 142 |
| 137 #if defined(FIXED_POINT) | 143 #if defined(FIXED_POINT) |
| 138 | 144 |
| 139 void (*const SILK_WARPED_LPC_ANALYSIS_FILTER_FIX_IMPL[ OPUS_ARCHMASK + 1 ] )( | |
| 140 opus_int32 state[], /* I/O State [order
+ 1] */ | |
| 141 opus_int32 res_Q2[], /* O Residual sig
nal [length] */ | |
| 142 const opus_int16 coef_Q13[], /* I Coefficients
[order] */ | |
| 143 const opus_int16 input[], /* I Input signal
[length] */ | |
| 144 const opus_int16 lambda_Q16, /* I Warping fact
or */ | |
| 145 const opus_int length, /* I Length of in
put signal */ | |
| 146 const opus_int order /* I Filter order
(even) */ | |
| 147 ) = { | |
| 148 silk_warped_LPC_analysis_filter_FIX_c, /* non-sse */ | |
| 149 silk_warped_LPC_analysis_filter_FIX_c, | |
| 150 silk_warped_LPC_analysis_filter_FIX_c, | |
| 151 MAY_HAVE_SSE4_1( silk_warped_LPC_analysis_filter_FIX ), /* sse4.1 */ | |
| 152 MAY_HAVE_SSE4_1( silk_warped_LPC_analysis_filter_FIX ) /* avx */ | |
| 153 }; | |
| 154 | |
| 155 void (*const SILK_BURG_MODIFIED_IMPL[ OPUS_ARCHMASK + 1 ] )( | 145 void (*const SILK_BURG_MODIFIED_IMPL[ OPUS_ARCHMASK + 1 ] )( |
| 156 opus_int32 *res_nrg, /* O Residual energy
*/ | 146 opus_int32 *res_nrg, /* O Residual energy
*/ |
| 157 opus_int *res_nrg_Q, /* O Residual energy Q va
lue */ | 147 opus_int *res_nrg_Q, /* O Residual energy Q va
lue */ |
| 158 opus_int32 A_Q16[], /* O Prediction coefficie
nts (length order) */ | 148 opus_int32 A_Q16[], /* O Prediction coefficie
nts (length order) */ |
| 159 const opus_int16 x[], /* I Input signal, length
: nb_subfr * ( D + subfr_length ) */ | 149 const opus_int16 x[], /* I Input signal, length
: nb_subfr * ( D + subfr_length ) */ |
| 160 const opus_int32 minInvGain_Q30, /* I Inverse of max predi
ction gain */ | 150 const opus_int32 minInvGain_Q30, /* I Inverse of max predi
ction gain */ |
| 161 const opus_int subfr_length, /* I Input signal subfram
e length (incl. D preceding samples) */ | 151 const opus_int subfr_length, /* I Input signal subfram
e length (incl. D preceding samples) */ |
| 162 const opus_int nb_subfr, /* I Number of subframes
stacked in x */ | 152 const opus_int nb_subfr, /* I Number of subframes
stacked in x */ |
| 163 const opus_int D, /* I Order
*/ | 153 const opus_int D, /* I Order
*/ |
| 164 int arch /* I Run-time architectur
e */ | 154 int arch /* I Run-time architectur
e */ |
| 165 ) = { | 155 ) = { |
| 166 silk_burg_modified_c, /* non-sse */ | 156 silk_burg_modified_c, /* non-sse */ |
| 167 silk_burg_modified_c, | 157 silk_burg_modified_c, |
| 168 silk_burg_modified_c, | 158 silk_burg_modified_c, |
| 169 MAY_HAVE_SSE4_1( silk_burg_modified ), /* sse4.1 */ | 159 MAY_HAVE_SSE4_1( silk_burg_modified ), /* sse4.1 */ |
| 170 MAY_HAVE_SSE4_1( silk_burg_modified ) /* avx */ | 160 MAY_HAVE_SSE4_1( silk_burg_modified ) /* avx */ |
| 171 }; | 161 }; |
| 172 | 162 |
| 173 #endif | 163 #endif |
| 174 #endif | 164 #endif |
| OLD | NEW |