Line | Count | Source |
1 | | /* Copyright (c) 2007-2008 CSIRO |
2 | | Copyright (c) 2007-2009 Xiph.Org Foundation |
3 | | Written by Jean-Marc Valin */ |
4 | | /** |
5 | | @file pitch.h |
6 | | @brief Pitch analysis |
7 | | */ |
8 | | |
9 | | /* |
10 | | Redistribution and use in source and binary forms, with or without |
11 | | modification, are permitted provided that the following conditions |
12 | | are met: |
13 | | |
14 | | - Redistributions of source code must retain the above copyright |
15 | | notice, this list of conditions and the following disclaimer. |
16 | | |
17 | | - Redistributions in binary form must reproduce the above copyright |
18 | | notice, this list of conditions and the following disclaimer in the |
19 | | documentation and/or other materials provided with the distribution. |
20 | | |
21 | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
22 | | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
23 | | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
24 | | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER |
25 | | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
26 | | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
27 | | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
28 | | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
29 | | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
30 | | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
31 | | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
32 | | */ |
33 | | |
34 | | #ifndef PITCH_H |
35 | | #define PITCH_H |
36 | | |
37 | | #include "modes.h" |
38 | | #include "cpu_support.h" |
39 | | |
40 | | #if (defined(OPUS_X86_MAY_HAVE_SSE) && !defined(FIXED_POINT)) \ |
41 | | || ((defined(OPUS_X86_MAY_HAVE_SSE4_1) || defined(OPUS_X86_MAY_HAVE_SSE2)) && defined(FIXED_POINT)) |
42 | | #include "x86/pitch_sse.h" |
43 | | #endif |
44 | | |
45 | | #if defined(MIPSr1_ASM) |
46 | | #include "mips/pitch_mipsr1.h" |
47 | | #endif |
48 | | |
49 | | #if (defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)) |
50 | | # include "arm/pitch_arm.h" |
51 | | #endif |
52 | | |
53 | | void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x_lp, |
54 | | int len, int C, int factor, int arch); |
55 | | |
56 | | void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTRICT y, |
57 | | int len, int max_pitch, int *pitch, int arch); |
58 | | |
59 | | opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod, |
60 | | int N, int *T0, int prev_period, opus_val16 prev_gain, int arch); |
61 | | |
62 | | |
63 | | /* OPT: This is the kernel you really want to optimize. It gets used a lot |
64 | | by the prefilter and by the PLC. */ |
65 | | static OPUS_INLINE void xcorr_kernel_c(const opus_val16 * x, const opus_val16 * y, opus_val32 sum[4], int len) |
66 | 100M | { |
67 | 100M | int j; |
68 | 100M | opus_val16 y_0, y_1, y_2, y_3; |
69 | 100M | celt_assert(len>=3); |
70 | 100M | y_3=0; /* gcc doesn't realize that y_3 can't be used uninitialized */ |
71 | 100M | y_0=*y++; |
72 | 100M | y_1=*y++; |
73 | 100M | y_2=*y++; |
74 | 1.82G | for (j=0;j<len-3;j+=4) |
75 | 1.72G | { |
76 | 1.72G | opus_val16 tmp; |
77 | 1.72G | tmp = *x++; |
78 | 1.72G | y_3=*y++; |
79 | 1.72G | sum[0] = MAC16_16(sum[0],tmp,y_0); |
80 | 1.72G | sum[1] = MAC16_16(sum[1],tmp,y_1); |
81 | 1.72G | sum[2] = MAC16_16(sum[2],tmp,y_2); |
82 | 1.72G | sum[3] = MAC16_16(sum[3],tmp,y_3); |
83 | 1.72G | tmp=*x++; |
84 | 1.72G | y_0=*y++; |
85 | 1.72G | sum[0] = MAC16_16(sum[0],tmp,y_1); |
86 | 1.72G | sum[1] = MAC16_16(sum[1],tmp,y_2); |
87 | 1.72G | sum[2] = MAC16_16(sum[2],tmp,y_3); |
88 | 1.72G | sum[3] = MAC16_16(sum[3],tmp,y_0); |
89 | 1.72G | tmp=*x++; |
90 | 1.72G | y_1=*y++; |
91 | 1.72G | sum[0] = MAC16_16(sum[0],tmp,y_2); |
92 | 1.72G | sum[1] = MAC16_16(sum[1],tmp,y_3); |
93 | 1.72G | sum[2] = MAC16_16(sum[2],tmp,y_0); |
94 | 1.72G | sum[3] = MAC16_16(sum[3],tmp,y_1); |
95 | 1.72G | tmp=*x++; |
96 | 1.72G | y_2=*y++; |
97 | 1.72G | sum[0] = MAC16_16(sum[0],tmp,y_3); |
98 | 1.72G | sum[1] = MAC16_16(sum[1],tmp,y_0); |
99 | 1.72G | sum[2] = MAC16_16(sum[2],tmp,y_1); |
100 | 1.72G | sum[3] = MAC16_16(sum[3],tmp,y_2); |
101 | 1.72G | } |
102 | 100M | if (j++<len) |
103 | 4.78M | { |
104 | 4.78M | opus_val16 tmp = *x++; |
105 | 4.78M | y_3=*y++; |
106 | 4.78M | sum[0] = MAC16_16(sum[0],tmp,y_0); |
107 | 4.78M | sum[1] = MAC16_16(sum[1],tmp,y_1); |
108 | 4.78M | sum[2] = MAC16_16(sum[2],tmp,y_2); |
109 | 4.78M | sum[3] = MAC16_16(sum[3],tmp,y_3); |
110 | 4.78M | } |
111 | 100M | if (j++<len) |
112 | 4.78M | { |
113 | 4.78M | opus_val16 tmp=*x++; |
114 | 4.78M | y_0=*y++; |
115 | 4.78M | sum[0] = MAC16_16(sum[0],tmp,y_1); |
116 | 4.78M | sum[1] = MAC16_16(sum[1],tmp,y_2); |
117 | 4.78M | sum[2] = MAC16_16(sum[2],tmp,y_3); |
118 | 4.78M | sum[3] = MAC16_16(sum[3],tmp,y_0); |
119 | 4.78M | } |
120 | 100M | if (j<len) |
121 | 0 | { |
122 | 0 | opus_val16 tmp=*x++; |
123 | 0 | y_1=*y++; |
124 | 0 | sum[0] = MAC16_16(sum[0],tmp,y_2); |
125 | 0 | sum[1] = MAC16_16(sum[1],tmp,y_3); |
126 | 0 | sum[2] = MAC16_16(sum[2],tmp,y_0); |
127 | 0 | sum[3] = MAC16_16(sum[3],tmp,y_1); |
128 | 0 | } |
129 | 100M | } Unexecuted instantiation: celt.c:xcorr_kernel_c Unexecuted instantiation: celt_decoder.c:xcorr_kernel_c Line | Count | Source | 66 | 16.2M | { | 67 | 16.2M | int j; | 68 | 16.2M | opus_val16 y_0, y_1, y_2, y_3; | 69 | 16.2M | celt_assert(len>=3); | 70 | 16.2M | y_3=0; /* gcc doesn't realize that y_3 can't be used uninitialized */ | 71 | 16.2M | y_0=*y++; | 72 | 16.2M | y_1=*y++; | 73 | 16.2M | y_2=*y++; | 74 | 674M | for (j=0;j<len-3;j+=4) | 75 | 658M | { | 76 | 658M | opus_val16 tmp; | 77 | 658M | tmp = *x++; | 78 | 658M | y_3=*y++; | 79 | 658M | sum[0] = MAC16_16(sum[0],tmp,y_0); | 80 | 658M | sum[1] = MAC16_16(sum[1],tmp,y_1); | 81 | 658M | sum[2] = MAC16_16(sum[2],tmp,y_2); | 82 | 658M | sum[3] = MAC16_16(sum[3],tmp,y_3); | 83 | 658M | tmp=*x++; | 84 | 658M | y_0=*y++; | 85 | 658M | sum[0] = MAC16_16(sum[0],tmp,y_1); | 86 | 658M | sum[1] = MAC16_16(sum[1],tmp,y_2); | 87 | 658M | sum[2] = MAC16_16(sum[2],tmp,y_3); | 88 | 658M | sum[3] = MAC16_16(sum[3],tmp,y_0); | 89 | 658M | tmp=*x++; | 90 | 658M | y_1=*y++; | 91 | 658M | sum[0] = MAC16_16(sum[0],tmp,y_2); | 92 | 658M | sum[1] = MAC16_16(sum[1],tmp,y_3); | 93 | 658M | sum[2] = MAC16_16(sum[2],tmp,y_0); | 94 | 658M | sum[3] = MAC16_16(sum[3],tmp,y_1); | 95 | 658M | tmp=*x++; | 96 | 658M | y_2=*y++; | 97 | 658M | sum[0] = MAC16_16(sum[0],tmp,y_3); | 98 | 658M | sum[1] = MAC16_16(sum[1],tmp,y_0); | 99 | 658M | sum[2] = MAC16_16(sum[2],tmp,y_1); | 100 | 658M | sum[3] = MAC16_16(sum[3],tmp,y_2); | 101 | 658M | } | 102 | 16.2M | if (j++<len) | 103 | 2.39M | { | 104 | 2.39M | opus_val16 tmp = *x++; | 105 | 2.39M | y_3=*y++; | 106 | 2.39M | sum[0] = MAC16_16(sum[0],tmp,y_0); | 107 | 2.39M | sum[1] = MAC16_16(sum[1],tmp,y_1); | 108 | 2.39M | sum[2] = MAC16_16(sum[2],tmp,y_2); | 109 | 2.39M | sum[3] = MAC16_16(sum[3],tmp,y_3); | 110 | 2.39M | } | 111 | 16.2M | if (j++<len) | 112 | 2.39M | { | 113 | 2.39M | opus_val16 tmp=*x++; | 114 | 2.39M | y_0=*y++; | 115 | 2.39M | sum[0] = MAC16_16(sum[0],tmp,y_1); | 116 | 2.39M | sum[1] = MAC16_16(sum[1],tmp,y_2); | 117 | 2.39M | sum[2] = MAC16_16(sum[2],tmp,y_3); | 118 | 2.39M | sum[3] = MAC16_16(sum[3],tmp,y_0); | 119 | 2.39M | } | 120 | 16.2M | if (j<len) | 121 | 0 | { | 122 | 0 | opus_val16 tmp=*x++; | 123 | 0 | y_1=*y++; | 124 | 0 | sum[0] = MAC16_16(sum[0],tmp,y_2); | 125 | 0 | sum[1] = MAC16_16(sum[1],tmp,y_3); | 126 | 0 | sum[2] = MAC16_16(sum[2],tmp,y_0); | 127 | 0 | sum[3] = MAC16_16(sum[3],tmp,y_1); | 128 | 0 | } | 129 | 16.2M | } |
celt_lpc.c:xcorr_kernel_c Line | Count | Source | 66 | 13.3M | { | 67 | 13.3M | int j; | 68 | 13.3M | opus_val16 y_0, y_1, y_2, y_3; | 69 | 13.3M | celt_assert(len>=3); | 70 | 13.3M | y_3=0; /* gcc doesn't realize that y_3 can't be used uninitialized */ | 71 | 13.3M | y_0=*y++; | 72 | 13.3M | y_1=*y++; | 73 | 13.3M | y_2=*y++; | 74 | 93.1M | for (j=0;j<len-3;j+=4) | 75 | 79.8M | { | 76 | 79.8M | opus_val16 tmp; | 77 | 79.8M | tmp = *x++; | 78 | 79.8M | y_3=*y++; | 79 | 79.8M | sum[0] = MAC16_16(sum[0],tmp,y_0); | 80 | 79.8M | sum[1] = MAC16_16(sum[1],tmp,y_1); | 81 | 79.8M | sum[2] = MAC16_16(sum[2],tmp,y_2); | 82 | 79.8M | sum[3] = MAC16_16(sum[3],tmp,y_3); | 83 | 79.8M | tmp=*x++; | 84 | 79.8M | y_0=*y++; | 85 | 79.8M | sum[0] = MAC16_16(sum[0],tmp,y_1); | 86 | 79.8M | sum[1] = MAC16_16(sum[1],tmp,y_2); | 87 | 79.8M | sum[2] = MAC16_16(sum[2],tmp,y_3); | 88 | 79.8M | sum[3] = MAC16_16(sum[3],tmp,y_0); | 89 | 79.8M | tmp=*x++; | 90 | 79.8M | y_1=*y++; | 91 | 79.8M | sum[0] = MAC16_16(sum[0],tmp,y_2); | 92 | 79.8M | sum[1] = MAC16_16(sum[1],tmp,y_3); | 93 | 79.8M | sum[2] = MAC16_16(sum[2],tmp,y_0); | 94 | 79.8M | sum[3] = MAC16_16(sum[3],tmp,y_1); | 95 | 79.8M | tmp=*x++; | 96 | 79.8M | y_2=*y++; | 97 | 79.8M | sum[0] = MAC16_16(sum[0],tmp,y_3); | 98 | 79.8M | sum[1] = MAC16_16(sum[1],tmp,y_0); | 99 | 79.8M | sum[2] = MAC16_16(sum[2],tmp,y_1); | 100 | 79.8M | sum[3] = MAC16_16(sum[3],tmp,y_2); | 101 | 79.8M | } | 102 | 13.3M | if (j++<len) | 103 | 0 | { | 104 | 0 | opus_val16 tmp = *x++; | 105 | 0 | y_3=*y++; | 106 | 0 | sum[0] = MAC16_16(sum[0],tmp,y_0); | 107 | 0 | sum[1] = MAC16_16(sum[1],tmp,y_1); | 108 | 0 | sum[2] = MAC16_16(sum[2],tmp,y_2); | 109 | 0 | sum[3] = MAC16_16(sum[3],tmp,y_3); | 110 | 0 | } | 111 | 13.3M | if (j++<len) | 112 | 0 | { | 113 | 0 | opus_val16 tmp=*x++; | 114 | 0 | y_0=*y++; | 115 | 0 | sum[0] = MAC16_16(sum[0],tmp,y_1); | 116 | 0 | sum[1] = MAC16_16(sum[1],tmp,y_2); | 117 | 0 | sum[2] = MAC16_16(sum[2],tmp,y_3); | 118 | 0 | sum[3] = MAC16_16(sum[3],tmp,y_0); | 119 | 0 | } | 120 | 13.3M | if (j<len) | 121 | 0 | { | 122 | 0 | opus_val16 tmp=*x++; | 123 | 0 | y_1=*y++; | 124 | 0 | sum[0] = MAC16_16(sum[0],tmp,y_2); | 125 | 0 | sum[1] = MAC16_16(sum[1],tmp,y_3); | 126 | 0 | sum[2] = MAC16_16(sum[2],tmp,y_0); | 127 | 0 | sum[3] = MAC16_16(sum[3],tmp,y_1); | 128 | 0 | } | 129 | 13.3M | } |
Unexecuted instantiation: vq.c:xcorr_kernel_c Unexecuted instantiation: x86cpu.c:xcorr_kernel_c x86_celt_map.c:xcorr_kernel_c Line | Count | Source | 66 | 2.21M | { | 67 | 2.21M | int j; | 68 | 2.21M | opus_val16 y_0, y_1, y_2, y_3; | 69 | 2.21M | celt_assert(len>=3); | 70 | 2.21M | y_3=0; /* gcc doesn't realize that y_3 can't be used uninitialized */ | 71 | 2.21M | y_0=*y++; | 72 | 2.21M | y_1=*y++; | 73 | 2.21M | y_2=*y++; | 74 | 32.0M | for (j=0;j<len-3;j+=4) | 75 | 29.8M | { | 76 | 29.8M | opus_val16 tmp; | 77 | 29.8M | tmp = *x++; | 78 | 29.8M | y_3=*y++; | 79 | 29.8M | sum[0] = MAC16_16(sum[0],tmp,y_0); | 80 | 29.8M | sum[1] = MAC16_16(sum[1],tmp,y_1); | 81 | 29.8M | sum[2] = MAC16_16(sum[2],tmp,y_2); | 82 | 29.8M | sum[3] = MAC16_16(sum[3],tmp,y_3); | 83 | 29.8M | tmp=*x++; | 84 | 29.8M | y_0=*y++; | 85 | 29.8M | sum[0] = MAC16_16(sum[0],tmp,y_1); | 86 | 29.8M | sum[1] = MAC16_16(sum[1],tmp,y_2); | 87 | 29.8M | sum[2] = MAC16_16(sum[2],tmp,y_3); | 88 | 29.8M | sum[3] = MAC16_16(sum[3],tmp,y_0); | 89 | 29.8M | tmp=*x++; | 90 | 29.8M | y_1=*y++; | 91 | 29.8M | sum[0] = MAC16_16(sum[0],tmp,y_2); | 92 | 29.8M | sum[1] = MAC16_16(sum[1],tmp,y_3); | 93 | 29.8M | sum[2] = MAC16_16(sum[2],tmp,y_0); | 94 | 29.8M | sum[3] = MAC16_16(sum[3],tmp,y_1); | 95 | 29.8M | tmp=*x++; | 96 | 29.8M | y_2=*y++; | 97 | 29.8M | sum[0] = MAC16_16(sum[0],tmp,y_3); | 98 | 29.8M | sum[1] = MAC16_16(sum[1],tmp,y_0); | 99 | 29.8M | sum[2] = MAC16_16(sum[2],tmp,y_1); | 100 | 29.8M | sum[3] = MAC16_16(sum[3],tmp,y_2); | 101 | 29.8M | } | 102 | 2.21M | if (j++<len) | 103 | 0 | { | 104 | 0 | opus_val16 tmp = *x++; | 105 | 0 | y_3=*y++; | 106 | 0 | sum[0] = MAC16_16(sum[0],tmp,y_0); | 107 | 0 | sum[1] = MAC16_16(sum[1],tmp,y_1); | 108 | 0 | sum[2] = MAC16_16(sum[2],tmp,y_2); | 109 | 0 | sum[3] = MAC16_16(sum[3],tmp,y_3); | 110 | 0 | } | 111 | 2.21M | if (j++<len) | 112 | 0 | { | 113 | 0 | opus_val16 tmp=*x++; | 114 | 0 | y_0=*y++; | 115 | 0 | sum[0] = MAC16_16(sum[0],tmp,y_1); | 116 | 0 | sum[1] = MAC16_16(sum[1],tmp,y_2); | 117 | 0 | sum[2] = MAC16_16(sum[2],tmp,y_3); | 118 | 0 | sum[3] = MAC16_16(sum[3],tmp,y_0); | 119 | 0 | } | 120 | 2.21M | if (j<len) | 121 | 0 | { | 122 | 0 | opus_val16 tmp=*x++; | 123 | 0 | y_1=*y++; | 124 | 0 | sum[0] = MAC16_16(sum[0],tmp,y_2); | 125 | 0 | sum[1] = MAC16_16(sum[1],tmp,y_3); | 126 | 0 | sum[2] = MAC16_16(sum[2],tmp,y_0); | 127 | 0 | sum[3] = MAC16_16(sum[3],tmp,y_1); | 128 | 0 | } | 129 | 2.21M | } |
Unexecuted instantiation: pitch_sse2.c:xcorr_kernel_c celt_lpc_sse4_1.c:xcorr_kernel_c Line | Count | Source | 66 | 20.9M | { | 67 | 20.9M | int j; | 68 | 20.9M | opus_val16 y_0, y_1, y_2, y_3; | 69 | 20.9M | celt_assert(len>=3); | 70 | 20.9M | y_3=0; /* gcc doesn't realize that y_3 can't be used uninitialized */ | 71 | 20.9M | y_0=*y++; | 72 | 20.9M | y_1=*y++; | 73 | 20.9M | y_2=*y++; | 74 | 146M | for (j=0;j<len-3;j+=4) | 75 | 125M | { | 76 | 125M | opus_val16 tmp; | 77 | 125M | tmp = *x++; | 78 | 125M | y_3=*y++; | 79 | 125M | sum[0] = MAC16_16(sum[0],tmp,y_0); | 80 | 125M | sum[1] = MAC16_16(sum[1],tmp,y_1); | 81 | 125M | sum[2] = MAC16_16(sum[2],tmp,y_2); | 82 | 125M | sum[3] = MAC16_16(sum[3],tmp,y_3); | 83 | 125M | tmp=*x++; | 84 | 125M | y_0=*y++; | 85 | 125M | sum[0] = MAC16_16(sum[0],tmp,y_1); | 86 | 125M | sum[1] = MAC16_16(sum[1],tmp,y_2); | 87 | 125M | sum[2] = MAC16_16(sum[2],tmp,y_3); | 88 | 125M | sum[3] = MAC16_16(sum[3],tmp,y_0); | 89 | 125M | tmp=*x++; | 90 | 125M | y_1=*y++; | 91 | 125M | sum[0] = MAC16_16(sum[0],tmp,y_2); | 92 | 125M | sum[1] = MAC16_16(sum[1],tmp,y_3); | 93 | 125M | sum[2] = MAC16_16(sum[2],tmp,y_0); | 94 | 125M | sum[3] = MAC16_16(sum[3],tmp,y_1); | 95 | 125M | tmp=*x++; | 96 | 125M | y_2=*y++; | 97 | 125M | sum[0] = MAC16_16(sum[0],tmp,y_3); | 98 | 125M | sum[1] = MAC16_16(sum[1],tmp,y_0); | 99 | 125M | sum[2] = MAC16_16(sum[2],tmp,y_1); | 100 | 125M | sum[3] = MAC16_16(sum[3],tmp,y_2); | 101 | 125M | } | 102 | 20.9M | if (j++<len) | 103 | 0 | { | 104 | 0 | opus_val16 tmp = *x++; | 105 | 0 | y_3=*y++; | 106 | 0 | sum[0] = MAC16_16(sum[0],tmp,y_0); | 107 | 0 | sum[1] = MAC16_16(sum[1],tmp,y_1); | 108 | 0 | sum[2] = MAC16_16(sum[2],tmp,y_2); | 109 | 0 | sum[3] = MAC16_16(sum[3],tmp,y_3); | 110 | 0 | } | 111 | 20.9M | if (j++<len) | 112 | 0 | { | 113 | 0 | opus_val16 tmp=*x++; | 114 | 0 | y_0=*y++; | 115 | 0 | sum[0] = MAC16_16(sum[0],tmp,y_1); | 116 | 0 | sum[1] = MAC16_16(sum[1],tmp,y_2); | 117 | 0 | sum[2] = MAC16_16(sum[2],tmp,y_3); | 118 | 0 | sum[3] = MAC16_16(sum[3],tmp,y_0); | 119 | 0 | } | 120 | 20.9M | if (j<len) | 121 | 0 | { | 122 | 0 | opus_val16 tmp=*x++; | 123 | 0 | y_1=*y++; | 124 | 0 | sum[0] = MAC16_16(sum[0],tmp,y_2); | 125 | 0 | sum[1] = MAC16_16(sum[1],tmp,y_3); | 126 | 0 | sum[2] = MAC16_16(sum[2],tmp,y_0); | 127 | 0 | sum[3] = MAC16_16(sum[3],tmp,y_1); | 128 | 0 | } | 129 | 20.9M | } |
pitch_sse4_1.c:xcorr_kernel_c Line | Count | Source | 66 | 48.2M | { | 67 | 48.2M | int j; | 68 | 48.2M | opus_val16 y_0, y_1, y_2, y_3; | 69 | 48.2M | celt_assert(len>=3); | 70 | 48.2M | y_3=0; /* gcc doesn't realize that y_3 can't be used uninitialized */ | 71 | 48.2M | y_0=*y++; | 72 | 48.2M | y_1=*y++; | 73 | 48.2M | y_2=*y++; | 74 | 882M | for (j=0;j<len-3;j+=4) | 75 | 833M | { | 76 | 833M | opus_val16 tmp; | 77 | 833M | tmp = *x++; | 78 | 833M | y_3=*y++; | 79 | 833M | sum[0] = MAC16_16(sum[0],tmp,y_0); | 80 | 833M | sum[1] = MAC16_16(sum[1],tmp,y_1); | 81 | 833M | sum[2] = MAC16_16(sum[2],tmp,y_2); | 82 | 833M | sum[3] = MAC16_16(sum[3],tmp,y_3); | 83 | 833M | tmp=*x++; | 84 | 833M | y_0=*y++; | 85 | 833M | sum[0] = MAC16_16(sum[0],tmp,y_1); | 86 | 833M | sum[1] = MAC16_16(sum[1],tmp,y_2); | 87 | 833M | sum[2] = MAC16_16(sum[2],tmp,y_3); | 88 | 833M | sum[3] = MAC16_16(sum[3],tmp,y_0); | 89 | 833M | tmp=*x++; | 90 | 833M | y_1=*y++; | 91 | 833M | sum[0] = MAC16_16(sum[0],tmp,y_2); | 92 | 833M | sum[1] = MAC16_16(sum[1],tmp,y_3); | 93 | 833M | sum[2] = MAC16_16(sum[2],tmp,y_0); | 94 | 833M | sum[3] = MAC16_16(sum[3],tmp,y_1); | 95 | 833M | tmp=*x++; | 96 | 833M | y_2=*y++; | 97 | 833M | sum[0] = MAC16_16(sum[0],tmp,y_3); | 98 | 833M | sum[1] = MAC16_16(sum[1],tmp,y_0); | 99 | 833M | sum[2] = MAC16_16(sum[2],tmp,y_1); | 100 | 833M | sum[3] = MAC16_16(sum[3],tmp,y_2); | 101 | 833M | } | 102 | 48.2M | if (j++<len) | 103 | 2.39M | { | 104 | 2.39M | opus_val16 tmp = *x++; | 105 | 2.39M | y_3=*y++; | 106 | 2.39M | sum[0] = MAC16_16(sum[0],tmp,y_0); | 107 | 2.39M | sum[1] = MAC16_16(sum[1],tmp,y_1); | 108 | 2.39M | sum[2] = MAC16_16(sum[2],tmp,y_2); | 109 | 2.39M | sum[3] = MAC16_16(sum[3],tmp,y_3); | 110 | 2.39M | } | 111 | 48.2M | if (j++<len) | 112 | 2.39M | { | 113 | 2.39M | opus_val16 tmp=*x++; | 114 | 2.39M | y_0=*y++; | 115 | 2.39M | sum[0] = MAC16_16(sum[0],tmp,y_1); | 116 | 2.39M | sum[1] = MAC16_16(sum[1],tmp,y_2); | 117 | 2.39M | sum[2] = MAC16_16(sum[2],tmp,y_3); | 118 | 2.39M | sum[3] = MAC16_16(sum[3],tmp,y_0); | 119 | 2.39M | } | 120 | 48.2M | if (j<len) | 121 | 0 | { | 122 | 0 | opus_val16 tmp=*x++; | 123 | 0 | y_1=*y++; | 124 | 0 | sum[0] = MAC16_16(sum[0],tmp,y_2); | 125 | 0 | sum[1] = MAC16_16(sum[1],tmp,y_3); | 126 | 0 | sum[2] = MAC16_16(sum[2],tmp,y_0); | 127 | 0 | sum[3] = MAC16_16(sum[3],tmp,y_1); | 128 | 0 | } | 129 | 48.2M | } |
Unexecuted instantiation: bands.c:xcorr_kernel_c Unexecuted instantiation: opus_encoder.c:xcorr_kernel_c Unexecuted instantiation: opus_multistream_encoder.c:xcorr_kernel_c Unexecuted instantiation: celt_encoder.c:xcorr_kernel_c Unexecuted instantiation: pitch_analysis_core_FIX.c:xcorr_kernel_c Unexecuted instantiation: vector_ops_FIX.c:xcorr_kernel_c Unexecuted instantiation: x86_silk_map.c:xcorr_kernel_c Unexecuted instantiation: burg_modified_FIX.c:xcorr_kernel_c Unexecuted instantiation: vector_ops_FIX_sse4_1.c:xcorr_kernel_c Unexecuted instantiation: burg_modified_FIX_sse4_1.c:xcorr_kernel_c Unexecuted instantiation: pitch_sse.c:xcorr_kernel_c Unexecuted instantiation: pitch_avx.c:xcorr_kernel_c Unexecuted instantiation: pitch_analysis_core_FLP.c:xcorr_kernel_c |
130 | | |
131 | | #ifndef OVERRIDE_XCORR_KERNEL |
132 | | #define xcorr_kernel(x, y, sum, len, arch) \ |
133 | | ((void)(arch),xcorr_kernel_c(x, y, sum, len)) |
134 | | #endif /* OVERRIDE_XCORR_KERNEL */ |
135 | | |
136 | | |
137 | | static OPUS_INLINE void dual_inner_prod_c(const opus_val16 *x, const opus_val16 *y01, const opus_val16 *y02, |
138 | | int N, opus_val32 *xy1, opus_val32 *xy2) |
139 | 752k | { |
140 | 752k | int i; |
141 | 752k | opus_val32 xy01=0; |
142 | 752k | opus_val32 xy02=0; |
143 | 222M | for (i=0;i<N;i++) |
144 | 222M | { |
145 | 222M | xy01 = MAC16_16(xy01, x[i], y01[i]); |
146 | 222M | xy02 = MAC16_16(xy02, x[i], y02[i]); |
147 | 222M | } |
148 | 752k | *xy1 = xy01; |
149 | 752k | *xy2 = xy02; |
150 | 752k | } Unexecuted instantiation: celt.c:dual_inner_prod_c Unexecuted instantiation: celt_decoder.c:dual_inner_prod_c pitch.c:dual_inner_prod_c Line | Count | Source | 139 | 752k | { | 140 | 752k | int i; | 141 | 752k | opus_val32 xy01=0; | 142 | 752k | opus_val32 xy02=0; | 143 | 222M | for (i=0;i<N;i++) | 144 | 222M | { | 145 | 222M | xy01 = MAC16_16(xy01, x[i], y01[i]); | 146 | 222M | xy02 = MAC16_16(xy02, x[i], y02[i]); | 147 | 222M | } | 148 | 752k | *xy1 = xy01; | 149 | 752k | *xy2 = xy02; | 150 | 752k | } |
Unexecuted instantiation: celt_lpc.c:dual_inner_prod_c Unexecuted instantiation: vq.c:dual_inner_prod_c Unexecuted instantiation: x86cpu.c:dual_inner_prod_c Unexecuted instantiation: x86_celt_map.c:dual_inner_prod_c Unexecuted instantiation: pitch_sse2.c:dual_inner_prod_c Unexecuted instantiation: celt_lpc_sse4_1.c:dual_inner_prod_c Unexecuted instantiation: pitch_sse4_1.c:dual_inner_prod_c Unexecuted instantiation: bands.c:dual_inner_prod_c Unexecuted instantiation: opus_encoder.c:dual_inner_prod_c Unexecuted instantiation: opus_multistream_encoder.c:dual_inner_prod_c Unexecuted instantiation: celt_encoder.c:dual_inner_prod_c Unexecuted instantiation: pitch_analysis_core_FIX.c:dual_inner_prod_c Unexecuted instantiation: vector_ops_FIX.c:dual_inner_prod_c Unexecuted instantiation: x86_silk_map.c:dual_inner_prod_c Unexecuted instantiation: burg_modified_FIX.c:dual_inner_prod_c Unexecuted instantiation: vector_ops_FIX_sse4_1.c:dual_inner_prod_c Unexecuted instantiation: burg_modified_FIX_sse4_1.c:dual_inner_prod_c Unexecuted instantiation: pitch_sse.c:dual_inner_prod_c Unexecuted instantiation: pitch_avx.c:dual_inner_prod_c Unexecuted instantiation: pitch_analysis_core_FLP.c:dual_inner_prod_c |
151 | | |
152 | | #ifndef OVERRIDE_DUAL_INNER_PROD |
153 | | # define dual_inner_prod(x, y01, y02, N, xy1, xy2, arch) \ |
154 | 1.29M | ((void)(arch),dual_inner_prod_c(x, y01, y02, N, xy1, xy2)) |
155 | | #endif |
156 | | |
157 | | /*We make sure a C version is always available for cases where the overhead of |
158 | | vectorization and passing around an arch flag aren't worth it.*/ |
159 | | static OPUS_INLINE opus_val32 celt_inner_prod_c(const opus_val16 *x, |
160 | | const opus_val16 *y, int N) |
161 | 1.56M | { |
162 | 1.56M | int i; |
163 | 1.56M | opus_val32 xy=0; |
164 | 65.7M | for (i=0;i<N;i++) |
165 | 64.1M | xy = MAC16_16(xy, x[i], y[i]); |
166 | 1.56M | return xy; |
167 | 1.56M | } Unexecuted instantiation: celt.c:celt_inner_prod_c Unexecuted instantiation: celt_decoder.c:celt_inner_prod_c Unexecuted instantiation: pitch.c:celt_inner_prod_c Unexecuted instantiation: celt_lpc.c:celt_inner_prod_c Unexecuted instantiation: vq.c:celt_inner_prod_c Unexecuted instantiation: x86cpu.c:celt_inner_prod_c x86_celt_map.c:celt_inner_prod_c Line | Count | Source | 161 | 1.56M | { | 162 | 1.56M | int i; | 163 | 1.56M | opus_val32 xy=0; | 164 | 65.7M | for (i=0;i<N;i++) | 165 | 64.1M | xy = MAC16_16(xy, x[i], y[i]); | 166 | 1.56M | return xy; | 167 | 1.56M | } |
Unexecuted instantiation: pitch_sse2.c:celt_inner_prod_c Unexecuted instantiation: celt_lpc_sse4_1.c:celt_inner_prod_c Unexecuted instantiation: pitch_sse4_1.c:celt_inner_prod_c Unexecuted instantiation: bands.c:celt_inner_prod_c Unexecuted instantiation: opus_encoder.c:celt_inner_prod_c Unexecuted instantiation: opus_multistream_encoder.c:celt_inner_prod_c Unexecuted instantiation: celt_encoder.c:celt_inner_prod_c Unexecuted instantiation: pitch_analysis_core_FIX.c:celt_inner_prod_c Unexecuted instantiation: vector_ops_FIX.c:celt_inner_prod_c Unexecuted instantiation: x86_silk_map.c:celt_inner_prod_c Unexecuted instantiation: burg_modified_FIX.c:celt_inner_prod_c Unexecuted instantiation: vector_ops_FIX_sse4_1.c:celt_inner_prod_c Unexecuted instantiation: burg_modified_FIX_sse4_1.c:celt_inner_prod_c Unexecuted instantiation: pitch_sse.c:celt_inner_prod_c Unexecuted instantiation: pitch_avx.c:celt_inner_prod_c Unexecuted instantiation: pitch_analysis_core_FLP.c:celt_inner_prod_c |
168 | | |
169 | | #if !defined(OVERRIDE_CELT_INNER_PROD) |
170 | | # define celt_inner_prod(x, y, N, arch) \ |
171 | | ((void)(arch),celt_inner_prod_c(x, y, N)) |
172 | | #endif |
173 | | |
174 | | #ifdef NON_STATIC_COMB_FILTER_CONST_C |
175 | | void comb_filter_const_c(opus_val32 *y, opus_val32 *x, int T, int N, |
176 | | opus_val16 g10, opus_val16 g11, opus_val16 g12); |
177 | | #endif |
178 | | |
179 | | |
180 | | #ifdef FIXED_POINT |
181 | | opus_val32 |
182 | | #else |
183 | | void |
184 | | #endif |
185 | | celt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y, |
186 | | opus_val32 *xcorr, int len, int max_pitch, int arch); |
187 | | |
188 | | #ifndef OVERRIDE_PITCH_XCORR |
189 | 3.63M | # define celt_pitch_xcorr celt_pitch_xcorr_c |
190 | | #endif |
191 | | |
192 | | #ifdef NON_STATIC_COMB_FILTER_CONST_C |
193 | | void comb_filter_const_c(opus_val32 *y, opus_val32 *x, int T, int N, |
194 | | opus_val16 g10, opus_val16 g11, opus_val16 g12); |
195 | | #endif |
196 | | |
197 | | #ifndef OVERRIDE_COMB_FILTER_CONST |
198 | | # define comb_filter_const(y, x, T, N, g10, g11, g12, arch) \ |
199 | 97.6k | ((void)(arch),comb_filter_const_c(y, x, T, N, g10, g11, g12)) |
200 | | #endif |
201 | | |
202 | | |
203 | | #endif |