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 16 matching lines...) Expand all Loading... |
27 | 27 |
28 #ifndef MAIN_SSE_H | 28 #ifndef MAIN_SSE_H |
29 #define MAIN_SSE_H | 29 #define MAIN_SSE_H |
30 | 30 |
31 #ifdef HAVE_CONFIG_H | 31 #ifdef HAVE_CONFIG_H |
32 #include "config.h" | 32 #include "config.h" |
33 #endif | 33 #endif |
34 | 34 |
35 # if defined(OPUS_X86_MAY_HAVE_SSE4_1) | 35 # if defined(OPUS_X86_MAY_HAVE_SSE4_1) |
36 | 36 |
| 37 #if 0 /* FIXME: SSE disabled until silk_VQ_WMat_EC_sse4_1() gets updated. */ |
37 # define OVERRIDE_silk_VQ_WMat_EC | 38 # define OVERRIDE_silk_VQ_WMat_EC |
38 | 39 |
39 void silk_VQ_WMat_EC_sse4_1( | 40 void silk_VQ_WMat_EC_sse4_1( |
40 opus_int8 *ind, /* O index of
best codebook vector */ | 41 opus_int8 *ind, /* O index of
best codebook vector */ |
41 opus_int32 *rate_dist_Q14, /* O best wei
ghted quant error + mu * rate */ | 42 opus_int32 *rate_dist_Q14, /* O best wei
ghted quant error + mu * rate */ |
42 opus_int *gain_Q7, /* O sum of a
bsolute LTP coefficients */ | 43 opus_int *gain_Q7, /* O sum of a
bsolute LTP coefficients */ |
43 const opus_int16 *in_Q14, /* I input ve
ctor to be quantized */ | 44 const opus_int16 *in_Q14, /* I input ve
ctor to be quantized */ |
44 const opus_int32 *W_Q18, /* I weightin
g matrix */ | 45 const opus_int32 *W_Q18, /* I weightin
g matrix */ |
45 const opus_int8 *cb_Q7, /* I codebook
*/ | 46 const opus_int8 *cb_Q7, /* I codebook
*/ |
46 const opus_uint8 *cb_gain_Q7, /* I codebook
effective gain */ | 47 const opus_uint8 *cb_gain_Q7, /* I codebook
effective gain */ |
(...skipping 25 matching lines...) Expand all Loading... |
72 const opus_int32 max_gain_Q7, /* I maximum
sum of absolute LTP coefficients */ | 73 const opus_int32 max_gain_Q7, /* I maximum
sum of absolute LTP coefficients */ |
73 opus_int L /* I number o
f vectors in codebook */ | 74 opus_int L /* I number o
f vectors in codebook */ |
74 ); | 75 ); |
75 | 76 |
76 # define silk_VQ_WMat_EC(ind, rate_dist_Q14, gain_Q7, in_Q14, W_Q18, cb_Q7, cb_
gain_Q7, cl_Q5, \ | 77 # define silk_VQ_WMat_EC(ind, rate_dist_Q14, gain_Q7, in_Q14, W_Q18, cb_Q7, cb_
gain_Q7, cl_Q5, \ |
77 mu_Q9, max_gain_Q7, L, arch) \ | 78 mu_Q9, max_gain_Q7, L, arch) \ |
78 ((*SILK_VQ_WMAT_EC_IMPL[(arch) & OPUS_ARCHMASK])(ind, rate_dist_Q14, gain_Q7
, in_Q14, W_Q18, cb_Q7, cb_gain_Q7, cl_Q5, \ | 79 ((*SILK_VQ_WMAT_EC_IMPL[(arch) & OPUS_ARCHMASK])(ind, rate_dist_Q14, gain_Q7
, in_Q14, W_Q18, cb_Q7, cb_gain_Q7, cl_Q5, \ |
79 mu_Q9, max_gain_Q7, L)) | 80 mu_Q9, max_gain_Q7, L)) |
80 | 81 |
81 #endif | 82 #endif |
| 83 #endif |
82 | 84 |
| 85 #if 0 /* FIXME: SSE disabled until the NSQ code gets updated. */ |
83 # define OVERRIDE_silk_NSQ | 86 # define OVERRIDE_silk_NSQ |
84 | 87 |
85 void silk_NSQ_sse4_1( | 88 void silk_NSQ_sse4_1( |
86 const silk_encoder_state *psEncC, /* I
/O Encoder State */ | 89 const silk_encoder_state *psEncC, /* I
Encoder State */ |
87 silk_nsq_state *NSQ, /* I
/O NSQ state */ | 90 silk_nsq_state *NSQ, /* I
/O NSQ state */ |
88 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ | 91 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ |
89 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ | 92 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ |
90 opus_int8 pulses[], /* O
Quantized pulse signal */ | 93 opus_int8 pulses[], /* O
Quantized pulse signal */ |
91 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ | 94 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ |
92 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ | 95 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ |
93 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ | 96 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ |
94 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ | 97 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ |
95 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ | 98 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ |
96 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ | 99 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ |
97 const opus_int32 Gains_Q16[ MAX_NB_SUBFR ], /* I
Quantization step sizes */ | 100 const opus_int32 Gains_Q16[ MAX_NB_SUBFR ], /* I
Quantization step sizes */ |
98 const opus_int pitchL[ MAX_NB_SUBFR ], /* I
Pitch lags */ | 101 const opus_int pitchL[ MAX_NB_SUBFR ], /* I
Pitch lags */ |
99 const opus_int Lambda_Q10, /* I
Rate/distortion tradeoff */ | 102 const opus_int Lambda_Q10, /* I
Rate/distortion tradeoff */ |
100 const opus_int LTP_scale_Q14 /* I
LTP state scaling */ | 103 const opus_int LTP_scale_Q14 /* I
LTP state scaling */ |
101 ); | 104 ); |
102 | 105 |
103 #if defined OPUS_X86_PRESUME_SSE4_1 | 106 #if defined OPUS_X86_PRESUME_SSE4_1 |
104 | 107 |
105 #define silk_NSQ(psEncC, NSQ, psIndices, x_Q3, pulses, PredCoef_Q12, LTPCoef_Q14
, AR2_Q13, \ | 108 #define silk_NSQ(psEncC, NSQ, psIndices, x_Q3, pulses, PredCoef_Q12, LTPCoef_Q14
, AR2_Q13, \ |
106 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, L
ambda_Q10, LTP_scale_Q14, arch) \ | 109 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, L
ambda_Q10, LTP_scale_Q14, arch) \ |
107 ((void)(arch),silk_NSQ_sse4_1(psEncC, NSQ, psIndices, x_Q3, pulses, PredCoef
_Q12, LTPCoef_Q14, AR2_Q13, \ | 110 ((void)(arch),silk_NSQ_sse4_1(psEncC, NSQ, psIndices, x_Q3, pulses, PredCoef
_Q12, LTPCoef_Q14, AR2_Q13, \ |
108 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, L
ambda_Q10, LTP_scale_Q14)) | 111 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, L
ambda_Q10, LTP_scale_Q14)) |
109 | 112 |
110 #else | 113 #else |
111 | 114 |
112 extern void (*const SILK_NSQ_IMPL[OPUS_ARCHMASK + 1])( | 115 extern void (*const SILK_NSQ_IMPL[OPUS_ARCHMASK + 1])( |
113 const silk_encoder_state *psEncC, /* I
/O Encoder State */ | 116 const silk_encoder_state *psEncC, /* I
Encoder State */ |
114 silk_nsq_state *NSQ, /* I
/O NSQ state */ | 117 silk_nsq_state *NSQ, /* I
/O NSQ state */ |
115 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ | 118 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ |
116 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ | 119 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ |
117 opus_int8 pulses[], /* O
Quantized pulse signal */ | 120 opus_int8 pulses[], /* O
Quantized pulse signal */ |
118 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ | 121 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ |
119 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ | 122 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ |
120 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ | 123 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ |
121 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ | 124 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ |
122 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ | 125 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ |
123 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ | 126 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ |
124 const opus_int32 Gains_Q16[ MAX_NB_SUBFR ], /* I
Quantization step sizes */ | 127 const opus_int32 Gains_Q16[ MAX_NB_SUBFR ], /* I
Quantization step sizes */ |
125 const opus_int pitchL[ MAX_NB_SUBFR ], /* I
Pitch lags */ | 128 const opus_int pitchL[ MAX_NB_SUBFR ], /* I
Pitch lags */ |
126 const opus_int Lambda_Q10, /* I
Rate/distortion tradeoff */ | 129 const opus_int Lambda_Q10, /* I
Rate/distortion tradeoff */ |
127 const opus_int LTP_scale_Q14 /* I
LTP state scaling */ | 130 const opus_int LTP_scale_Q14 /* I
LTP state scaling */ |
128 ); | 131 ); |
129 | 132 |
130 # define silk_NSQ(psEncC, NSQ, psIndices, x_Q3, pulses, PredCoef_Q12, LTPCoef_Q
14, AR2_Q13, \ | 133 # define silk_NSQ(psEncC, NSQ, psIndices, x_Q3, pulses, PredCoef_Q12, LTPCoef_Q
14, AR2_Q13, \ |
131 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, L
ambda_Q10, LTP_scale_Q14, arch) \ | 134 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, L
ambda_Q10, LTP_scale_Q14, arch) \ |
132 ((*SILK_NSQ_IMPL[(arch) & OPUS_ARCHMASK])(psEncC, NSQ, psIndices, x_Q3, puls
es, PredCoef_Q12, LTPCoef_Q14, AR2_Q13, \ | 135 ((*SILK_NSQ_IMPL[(arch) & OPUS_ARCHMASK])(psEncC, NSQ, psIndices, x_Q3, puls
es, PredCoef_Q12, LTPCoef_Q14, AR2_Q13, \ |
133 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, L
ambda_Q10, LTP_scale_Q14)) | 136 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, L
ambda_Q10, LTP_scale_Q14)) |
134 | 137 |
135 #endif | 138 #endif |
136 | 139 |
137 # define OVERRIDE_silk_NSQ_del_dec | 140 # define OVERRIDE_silk_NSQ_del_dec |
138 | 141 |
139 void silk_NSQ_del_dec_sse4_1( | 142 void silk_NSQ_del_dec_sse4_1( |
140 const silk_encoder_state *psEncC, /* I
/O Encoder State */ | 143 const silk_encoder_state *psEncC, /* I
Encoder State */ |
141 silk_nsq_state *NSQ, /* I
/O NSQ state */ | 144 silk_nsq_state *NSQ, /* I
/O NSQ state */ |
142 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ | 145 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ |
143 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ | 146 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ |
144 opus_int8 pulses[], /* O
Quantized pulse signal */ | 147 opus_int8 pulses[], /* O
Quantized pulse signal */ |
145 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ | 148 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ |
146 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ | 149 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ |
147 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ | 150 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ |
148 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ | 151 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ |
149 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ | 152 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ |
150 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ | 153 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ |
151 const opus_int32 Gains_Q16[ MAX_NB_SUBFR ], /* I
Quantization step sizes */ | 154 const opus_int32 Gains_Q16[ MAX_NB_SUBFR ], /* I
Quantization step sizes */ |
152 const opus_int pitchL[ MAX_NB_SUBFR ], /* I
Pitch lags */ | 155 const opus_int pitchL[ MAX_NB_SUBFR ], /* I
Pitch lags */ |
153 const opus_int Lambda_Q10, /* I
Rate/distortion tradeoff */ | 156 const opus_int Lambda_Q10, /* I
Rate/distortion tradeoff */ |
154 const opus_int LTP_scale_Q14 /* I
LTP state scaling */ | 157 const opus_int LTP_scale_Q14 /* I
LTP state scaling */ |
155 ); | 158 ); |
156 | 159 |
157 #if defined OPUS_X86_PRESUME_SSE4_1 | 160 #if defined OPUS_X86_PRESUME_SSE4_1 |
158 | 161 |
159 #define silk_NSQ_del_dec(psEncC, NSQ, psIndices, x_Q3, pulses, PredCoef_Q12, LTP
Coef_Q14, AR2_Q13, \ | 162 #define silk_NSQ_del_dec(psEncC, NSQ, psIndices, x_Q3, pulses, PredCoef_Q12, LTP
Coef_Q14, AR2_Q13, \ |
160 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, p
itchL, Lambda_Q10, LTP_scale_Q14, arch) \ | 163 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, p
itchL, Lambda_Q10, LTP_scale_Q14, arch) \ |
161 ((void)(arch),silk_NSQ_del_dec_sse4_1(psEncC, NSQ, psIndices, x_Q3, pulses,
PredCoef_Q12, LTPCoef_Q14, AR2_Q13, \ | 164 ((void)(arch),silk_NSQ_del_dec_sse4_1(psEncC, NSQ, psIndices, x_Q3, pulses,
PredCoef_Q12, LTPCoef_Q14, AR2_Q13, \ |
162 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, p
itchL, Lambda_Q10, LTP_scale_Q14)) | 165 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, p
itchL, Lambda_Q10, LTP_scale_Q14)) |
163 | 166 |
164 #else | 167 #else |
165 | 168 |
166 extern void (*const SILK_NSQ_DEL_DEC_IMPL[OPUS_ARCHMASK + 1])( | 169 extern void (*const SILK_NSQ_DEL_DEC_IMPL[OPUS_ARCHMASK + 1])( |
167 const silk_encoder_state *psEncC, /* I
/O Encoder State */ | 170 const silk_encoder_state *psEncC, /* I
Encoder State */ |
168 silk_nsq_state *NSQ, /* I
/O NSQ state */ | 171 silk_nsq_state *NSQ, /* I
/O NSQ state */ |
169 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ | 172 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ |
170 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ | 173 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ |
171 opus_int8 pulses[], /* O
Quantized pulse signal */ | 174 opus_int8 pulses[], /* O
Quantized pulse signal */ |
172 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ | 175 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ |
173 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ | 176 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ |
174 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ | 177 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ |
175 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ | 178 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ |
176 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ | 179 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ |
177 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ | 180 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ |
178 const opus_int32 Gains_Q16[ MAX_NB_SUBFR ], /* I
Quantization step sizes */ | 181 const opus_int32 Gains_Q16[ MAX_NB_SUBFR ], /* I
Quantization step sizes */ |
179 const opus_int pitchL[ MAX_NB_SUBFR ], /* I
Pitch lags */ | 182 const opus_int pitchL[ MAX_NB_SUBFR ], /* I
Pitch lags */ |
180 const opus_int Lambda_Q10, /* I
Rate/distortion tradeoff */ | 183 const opus_int Lambda_Q10, /* I
Rate/distortion tradeoff */ |
181 const opus_int LTP_scale_Q14 /* I
LTP state scaling */ | 184 const opus_int LTP_scale_Q14 /* I
LTP state scaling */ |
182 ); | 185 ); |
183 | 186 |
184 # define silk_NSQ_del_dec(psEncC, NSQ, psIndices, x_Q3, pulses, PredCoef_Q12, L
TPCoef_Q14, AR2_Q13, \ | 187 # define silk_NSQ_del_dec(psEncC, NSQ, psIndices, x_Q3, pulses, PredCoef_Q12, L
TPCoef_Q14, AR2_Q13, \ |
185 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, p
itchL, Lambda_Q10, LTP_scale_Q14, arch) \ | 188 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, p
itchL, Lambda_Q10, LTP_scale_Q14, arch) \ |
186 ((*SILK_NSQ_DEL_DEC_IMPL[(arch) & OPUS_ARCHMASK])(psEncC, NSQ, psIndices, x_
Q3, pulses, PredCoef_Q12, LTPCoef_Q14, AR2_Q13, \ | 189 ((*SILK_NSQ_DEL_DEC_IMPL[(arch) & OPUS_ARCHMASK])(psEncC, NSQ, psIndices, x_
Q3, pulses, PredCoef_Q12, LTPCoef_Q14, AR2_Q13, \ |
187 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, p
itchL, Lambda_Q10, LTP_scale_Q14)) | 190 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, p
itchL, Lambda_Q10, LTP_scale_Q14)) |
188 | 191 |
189 #endif | 192 #endif |
| 193 #endif |
190 | 194 |
191 void silk_noise_shape_quantizer( | 195 void silk_noise_shape_quantizer( |
192 silk_nsq_state *NSQ, /* I/O NSQ state
*/ | 196 silk_nsq_state *NSQ, /* I/O NSQ state
*/ |
193 opus_int signalType, /* I Signal type
*/ | 197 opus_int signalType, /* I Signal type
*/ |
194 const opus_int32 x_sc_Q10[], /* I
*/ | 198 const opus_int32 x_sc_Q10[], /* I
*/ |
195 opus_int8 pulses[], /* O
*/ | 199 opus_int8 pulses[], /* O
*/ |
196 opus_int16 xq[], /* O
*/ | 200 opus_int16 xq[], /* O
*/ |
197 opus_int32 sLTP_Q15[], /* I/O LTP state
*/ | 201 opus_int32 sLTP_Q15[], /* I/O LTP state
*/ |
198 const opus_int16 a_Q12[], /* I Short term prediction co
efs */ | 202 const opus_int16 a_Q12[], /* I Short term prediction co
efs */ |
199 const opus_int16 b_Q14[], /* I Long term prediction coe
fs */ | 203 const opus_int16 b_Q14[], /* I Long term prediction coe
fs */ |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 235 |
232 #else | 236 #else |
233 | 237 |
234 # define silk_VAD_GetSA_Q8(psEnC, pIn, arch) \ | 238 # define silk_VAD_GetSA_Q8(psEnC, pIn, arch) \ |
235 ((*SILK_VAD_GETSA_Q8_IMPL[(arch) & OPUS_ARCHMASK])(psEnC, pIn)) | 239 ((*SILK_VAD_GETSA_Q8_IMPL[(arch) & OPUS_ARCHMASK])(psEnC, pIn)) |
236 | 240 |
237 extern opus_int (*const SILK_VAD_GETSA_Q8_IMPL[OPUS_ARCHMASK + 1])( | 241 extern opus_int (*const SILK_VAD_GETSA_Q8_IMPL[OPUS_ARCHMASK + 1])( |
238 silk_encoder_state *psEnC, | 242 silk_encoder_state *psEnC, |
239 const opus_int16 pIn[]); | 243 const opus_int16 pIn[]); |
240 | 244 |
241 # define OVERRIDE_silk_warped_LPC_analysis_filter_FIX | |
242 | |
243 #endif | |
244 | |
245 void silk_warped_LPC_analysis_filter_FIX_sse4_1( | |
246 opus_int32 state[], /* I/O State [order
+ 1] */ | |
247 opus_int32 res_Q2[], /* O Residual sig
nal [length] */ | |
248 const opus_int16 coef_Q13[], /* I Coefficients
[order] */ | |
249 const opus_int16 input[], /* I Input signal
[length] */ | |
250 const opus_int16 lambda_Q16, /* I Warping fact
or */ | |
251 const opus_int length, /* I Length of in
put signal */ | |
252 const opus_int order /* I Filter order
(even) */ | |
253 ); | |
254 | |
255 #if defined(OPUS_X86_PRESUME_SSE4_1) | |
256 #define silk_warped_LPC_analysis_filter_FIX(state, res_Q2, coef_Q13, input, lamb
da_Q16, length, order, arch) \ | |
257 ((void)(arch),silk_warped_LPC_analysis_filter_FIX_c(state, res_Q2, coef_Q13,
input, lambda_Q16, length, order)) | |
258 | |
259 #else | |
260 | |
261 extern void (*const SILK_WARPED_LPC_ANALYSIS_FILTER_FIX_IMPL[OPUS_ARCHMASK + 1])
( | |
262 opus_int32 state[], /* I/O State [order
+ 1] */ | |
263 opus_int32 res_Q2[], /* O Residual sig
nal [length] */ | |
264 const opus_int16 coef_Q13[], /* I Coefficients
[order] */ | |
265 const opus_int16 input[], /* I Input signal
[length] */ | |
266 const opus_int16 lambda_Q16, /* I Warping fact
or */ | |
267 const opus_int length, /* I Length of in
put signal */ | |
268 const opus_int order /* I Filter order
(even) */ | |
269 ); | |
270 | |
271 # define silk_warped_LPC_analysis_filter_FIX(state, res_Q2, coef_Q13, input, la
mbda_Q16, length, order, arch) \ | |
272 ((*SILK_WARPED_LPC_ANALYSIS_FILTER_FIX_IMPL[(arch) & OPUS_ARCHMASK])(state,
res_Q2, coef_Q13, input, lambda_Q16, length, order)) | |
273 | |
274 #endif | 245 #endif |
275 | 246 |
276 # endif | 247 # endif |
277 #endif | 248 #endif |
OLD | NEW |