diff options
Diffstat (limited to 'lib/rbcodec/codecs/libopus/celt/pitch.c')
-rw-r--r-- | lib/rbcodec/codecs/libopus/celt/pitch.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/pitch.c b/lib/rbcodec/codecs/libopus/celt/pitch.c index 0d8be13025..c28857297a 100644 --- a/lib/rbcodec/codecs/libopus/celt/pitch.c +++ b/lib/rbcodec/codecs/libopus/celt/pitch.c | |||
@@ -145,7 +145,7 @@ static void celt_fir5(const opus_val16 *x, | |||
145 | 145 | ||
146 | 146 | ||
147 | void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x_lp, | 147 | void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x_lp, |
148 | int len, int C) | 148 | int len, int C, int arch) |
149 | { | 149 | { |
150 | int i; | 150 | int i; |
151 | opus_val32 ac[5]; | 151 | opus_val32 ac[5]; |
@@ -180,7 +180,7 @@ void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x | |||
180 | } | 180 | } |
181 | 181 | ||
182 | _celt_autocorr(x_lp, ac, NULL, 0, | 182 | _celt_autocorr(x_lp, ac, NULL, 0, |
183 | 4, len>>1); | 183 | 4, len>>1, arch); |
184 | 184 | ||
185 | /* Noise floor -40 dB */ | 185 | /* Noise floor -40 dB */ |
186 | #ifdef FIXED_POINT | 186 | #ifdef FIXED_POINT |
@@ -250,9 +250,14 @@ opus_val32 | |||
250 | #else | 250 | #else |
251 | void | 251 | void |
252 | #endif | 252 | #endif |
253 | celt_pitch_xcorr(const opus_val16 *_x, const opus_val16 *_y, opus_val32 *xcorr, int len, int max_pitch) | 253 | celt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y, opus_val32 *xcorr, int len, int max_pitch) |
254 | { | 254 | { |
255 | int i,j; | 255 | int i,j; |
256 | /*The EDSP version requires that max_pitch is at least 1, and that _x is | ||
257 | 32-bit aligned. | ||
258 | Since it's hard to put asserts in assembly, put them here.*/ | ||
259 | celt_assert(max_pitch>0); | ||
260 | celt_assert((((unsigned char *)_x-(unsigned char *)NULL)&3)==0); | ||
256 | #ifdef FIXED_POINT | 261 | #ifdef FIXED_POINT |
257 | opus_val32 maxcorr=1; | 262 | opus_val32 maxcorr=1; |
258 | #endif | 263 | #endif |
@@ -289,7 +294,7 @@ celt_pitch_xcorr(const opus_val16 *_x, const opus_val16 *_y, opus_val32 *xcorr, | |||
289 | 294 | ||
290 | #endif | 295 | #endif |
291 | void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTRICT y, | 296 | void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTRICT y, |
292 | int len, int max_pitch, int *pitch) | 297 | int len, int max_pitch, int *pitch, int arch) |
293 | { | 298 | { |
294 | int i, j; | 299 | int i, j; |
295 | int lag; | 300 | int lag; |
@@ -342,7 +347,7 @@ void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR | |||
342 | #ifdef FIXED_POINT | 347 | #ifdef FIXED_POINT |
343 | maxcorr = | 348 | maxcorr = |
344 | #endif | 349 | #endif |
345 | celt_pitch_xcorr(x_lp4, y_lp4, xcorr, len>>2, max_pitch>>2); | 350 | celt_pitch_xcorr(x_lp4, y_lp4, xcorr, len>>2, max_pitch>>2, arch); |
346 | 351 | ||
347 | find_best_pitch(xcorr, y_lp4, len>>2, max_pitch>>2, best_pitch | 352 | find_best_pitch(xcorr, y_lp4, len>>2, max_pitch>>2, best_pitch |
348 | #ifdef FIXED_POINT | 353 | #ifdef FIXED_POINT |