Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: silk/SigProc_FIX.h

Issue 28553003: Updating Opus to a pre-release of 1.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Removing failing file Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « silk/PLC.c ('k') | silk/VAD.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.
11 - Neither the name of Internet Society, IETF or IETF Trust, nor the 11 - Neither the name of Internet Society, IETF or IETF Trust, nor the
12 names of specific contributors, may be used to endorse or promote 12 names of specific contributors, may be used to endorse or promote
13 products derived from this software without specific prior written 13 products derived from this software without specific prior written
14 permission. 14 permission.
15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS 15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 POSSIBILITY OF SUCH DAMAGE. 25 POSSIBILITY OF SUCH DAMAGE.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 opus_int silk_sigm_Q15( 161 opus_int silk_sigm_Q15(
162 opus_int in_Q5 /* I */ 162 opus_int in_Q5 /* I */
163 ); 163 );
164 164
165 /* Approximation of 2^() (exact inverse of approx log2() above) */ 165 /* Approximation of 2^() (exact inverse of approx log2() above) */
166 /* Convert input to a linear scale */ 166 /* Convert input to a linear scale */
167 opus_int32 silk_log2lin( 167 opus_int32 silk_log2lin(
168 const opus_int32 inLog_Q7 /* I input on log scale */ 168 const opus_int32 inLog_Q7 /* I input on log scale */
169 ); 169 );
170 170
171 /* Function that returns the maximum absolut value of the input vector */
172 opus_int16 silk_int16_array_maxabs( /* O Maximum absolute valu e, max: 2^15-1 */
173 const opus_int16 *vec, /* I Input vector [len] */
174 const opus_int32 len /* I Length of input vecto r */
175 );
176
177 /* Compute number of bits to right shift the sum of squares of a vector */ 171 /* Compute number of bits to right shift the sum of squares of a vector */
178 /* of int16s to make it fit in an int32 */ 172 /* of int16s to make it fit in an int32 */
179 void silk_sum_sqr_shift( 173 void silk_sum_sqr_shift(
180 opus_int32 *energy, /* O Energy of x, after sh ifting to the right */ 174 opus_int32 *energy, /* O Energy of x, after sh ifting to the right */
181 opus_int *shift, /* O Number of bits right shift applied to energy */ 175 opus_int *shift, /* O Number of bits right shift applied to energy */
182 const opus_int16 *x, /* I Input vector */ 176 const opus_int16 *x, /* I Input vector */
183 opus_int len /* I Length of input vecto r */ 177 opus_int len /* I Length of input vecto r */
184 ); 178 );
185 179
186 /* Calculates the reflection coefficients from the correlation sequence */ 180 /* Calculates the reflection coefficients from the correlation sequence */
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 ); 239 );
246 240
247 opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 voiced, 1 unvoiced */ 241 opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 voiced, 1 unvoiced */
248 const opus_int16 *frame, /* I Signal of length PE_ FRAME_LENGTH_MS*Fs_kHz */ 242 const opus_int16 *frame, /* I Signal of length PE_ FRAME_LENGTH_MS*Fs_kHz */
249 opus_int *pitch_out, /* O 4 pitch lag values */ 243 opus_int *pitch_out, /* O 4 pitch lag values */
250 opus_int16 *lagIndex, /* O Lag Index */ 244 opus_int16 *lagIndex, /* O Lag Index */
251 opus_int8 *contourIndex, /* O Pitch contour Index */ 245 opus_int8 *contourIndex, /* O Pitch contour Index */
252 opus_int *LTPCorr_Q15, /* I/O Normalized correlati on; input: value from previous frame */ 246 opus_int *LTPCorr_Q15, /* I/O Normalized correlati on; input: value from previous frame */
253 opus_int prevLag, /* I Last lag of previous frame; set to zero is unvoiced */ 247 opus_int prevLag, /* I Last lag of previous frame; set to zero is unvoiced */
254 const opus_int32 search_thres1_Q16, /* I First stage threshol d for lag candidates 0 - 1 */ 248 const opus_int32 search_thres1_Q16, /* I First stage threshol d for lag candidates 0 - 1 */
255 const opus_int search_thres2_Q15, /* I Final threshold for lag candidates 0 - 1 */ 249 const opus_int search_thres2_Q13, /* I Final threshold for lag candidates 0 - 1 */
256 const opus_int Fs_kHz, /* I Sample frequency (kH z) */ 250 const opus_int Fs_kHz, /* I Sample frequency (kH z) */
257 const opus_int complexity, /* I Complexity setting, 0-2, where 2 is highest */ 251 const opus_int complexity, /* I Complexity setting, 0-2, where 2 is highest */
258 const opus_int nb_subfr /* I number of 5 ms subfr ames */ 252 const opus_int nb_subfr /* I number of 5 ms subfr ames */
259 ); 253 );
260 254
261 /* Compute Normalized Line Spectral Frequencies (NLSFs) from whitening filter co efficients */ 255 /* Compute Normalized Line Spectral Frequencies (NLSFs) from whitening filter co efficients */
262 /* If not all roots are found, the a_Q16 coefficients are bandwidth expanded unt il convergence. */ 256 /* If not all roots are found, the a_Q16 coefficients are bandwidth expanded unt il convergence. */
263 void silk_A2NLSF( 257 void silk_A2NLSF(
264 opus_int16 *NLSF, /* O Normalized Line Spec tral Frequencies in Q15 (0..2^15-1) [d] */ 258 opus_int16 *NLSF, /* O Normalized Line Spec tral Frequencies in Q15 (0..2^15-1) [d] */
265 opus_int32 *a_Q16, /* I/O Monic whitening filt er coefficients in Q16 [d] */ 259 opus_int32 *a_Q16, /* I/O Monic whitening filt er coefficients in Q16 [d] */
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 ARMv6 2 instruction cycles. 569 ARMv6 2 instruction cycles.
576 ARMv3M+ 3 instruction cycles. use SMULL and ignore LSB registers. (except xM)*/ 570 ARMv3M+ 3 instruction cycles. use SMULL and ignore LSB registers. (except xM)*/
577 /*#define silk_SMMUL(a32, b32) (opus_int32)silk_RSHIFT(silk_SMLAL (silk_SMULWB((a32), (b32)), (a32), silk_RSHIFT_ROUND((b32), 16)), 16)*/ 571 /*#define silk_SMMUL(a32, b32) (opus_int32)silk_RSHIFT(silk_SMLAL (silk_SMULWB((a32), (b32)), (a32), silk_RSHIFT_ROUND((b32), 16)), 16)*/
578 /* the following seems faster on x86 */ 572 /* the following seems faster on x86 */
579 #define silk_SMMUL(a32, b32) (opus_int32)silk_RSHIFT64(silk_SMULL ((a32), (b32)), 32) 573 #define silk_SMMUL(a32, b32) (opus_int32)silk_RSHIFT64(silk_SMULL ((a32), (b32)), 32)
580 574
581 #include "Inlines.h" 575 #include "Inlines.h"
582 #include "MacroCount.h" 576 #include "MacroCount.h"
583 #include "MacroDebug.h" 577 #include "MacroDebug.h"
584 578
579 #ifdef ARMv4_ASM
580 #include "arm/SigProc_FIX_armv4.h"
581 #endif
582
583 #ifdef ARMv5E_ASM
584 #include "arm/SigProc_FIX_armv5e.h"
585 #endif
586
585 #ifdef __cplusplus 587 #ifdef __cplusplus
586 } 588 }
587 #endif 589 #endif
588 590
589 #endif /* SILK_SIGPROC_FIX_H */ 591 #endif /* SILK_SIGPROC_FIX_H */
OLDNEW
« no previous file with comments | « silk/PLC.c ('k') | silk/VAD.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698