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

Side by Side Diff: celt/fixed_c6x.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 | « celt/fixed_c5x.h ('k') | celt/fixed_generic.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2007-2008 CSIRO 1 /* Copyright (C) 2008 CSIRO */
2 Copyright (c) 2007-2009 Xiph.Org Foundation
3 Written by Jean-Marc Valin */
4 /** 2 /**
5 @file pitch.h 3 @file fixed_c6x.h
6 @brief Pitch analysis 4 @brief Fixed-point operations for the TI C6x DSP family
7 */ 5 */
8
9 /* 6 /*
10 Redistribution and use in source and binary forms, with or without 7 Redistribution and use in source and binary forms, with or without
11 modification, are permitted provided that the following conditions 8 modification, are permitted provided that the following conditions
12 are met: 9 are met:
13 10
14 - Redistributions of source code must retain the above copyright 11 - Redistributions of source code must retain the above copyright
15 notice, this list of conditions and the following disclaimer. 12 notice, this list of conditions and the following disclaimer.
16 13
17 - Redistributions in binary form must reproduce the above copyright 14 - Redistributions in binary form must reproduce the above copyright
18 notice, this list of conditions and the following disclaimer in the 15 notice, this list of conditions and the following disclaimer in the
19 documentation and/or other materials provided with the distribution. 16 documentation and/or other materials provided with the distribution.
20 17
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 21 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
25 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */ 29 */
33 30
34 #ifndef PITCH_H 31 #ifndef FIXED_C6X_H
35 #define PITCH_H 32 #define FIXED_C6X_H
36 33
37 #include "modes.h" 34 #undef MULT16_16SU
35 #define MULT16_16SU(a,b) _mpysu(a,b)
38 36
39 void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x _lp, 37 #undef MULT_16_16
40 int len, int C); 38 #define MULT_16_16(a,b) _mpy(a,b)
41 39
42 void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR ICT y, 40 #define celt_ilog2(x) (30 - _norm(x))
43 int len, int max_pitch, int *pitch); 41 #define OVERRIDE_CELT_ILOG2
44 42
45 opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod, 43 #undef MULT16_32_Q15
46 int N, int *T0, int prev_period, opus_val16 prev_gain); 44 #define MULT16_32_Q15(a,b) (_mpylill(a, b) >> 15)
47 45
48 #endif 46 #if 0
47 #include "dsplib.h"
48
49 #undef MAX16
50 #define MAX16(a,b) _max(a,b)
51
52 #undef MIN16
53 #define MIN16(a,b) _min(a,b)
54
55 #undef MAX32
56 #define MAX32(a,b) _lmax(a,b)
57
58 #undef MIN32
59 #define MIN32(a,b) _lmin(a,b)
60
61 #undef VSHR32
62 #define VSHR32(a, shift) _lshl(a,-(shift))
63
64 #undef MULT16_16_Q15
65 #define MULT16_16_Q15(a,b) (_smpy(a,b))
66
67 #define celt_maxabs16(x, len) MAX32(EXTEND32(maxval((DATA *)x, len)),-EXTEND32(m inval((DATA *)x, len)))
68 #define OVERRIDE_CELT_MAXABS16
69
70 #endif /* FIXED_C6X_H */
OLDNEW
« no previous file with comments | « celt/fixed_c5x.h ('k') | celt/fixed_generic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698