Line | Count | Source |
1 | | /*********************************************************************** |
2 | | Copyright (c) 2014 Vidyo. |
3 | | Copyright (c) 2006-2011, Skype Limited. All rights reserved. |
4 | | Redistribution and use in source and binary forms, with or without |
5 | | modification, are permitted provided that the following conditions |
6 | | are met: |
7 | | - Redistributions of source code must retain the above copyright notice, |
8 | | this list of conditions and the following disclaimer. |
9 | | - Redistributions in binary form must reproduce the above copyright |
10 | | notice, this list of conditions and the following disclaimer in the |
11 | | documentation and/or other materials provided with the distribution. |
12 | | - Neither the name of Internet Society, IETF or IETF Trust, nor the |
13 | | names of specific contributors, may be used to endorse or promote |
14 | | products derived from this software without specific prior written |
15 | | permission. |
16 | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
17 | | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
18 | | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
19 | | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
20 | | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
21 | | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
22 | | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
23 | | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
24 | | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
25 | | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
26 | | POSSIBILITY OF SUCH DAMAGE. |
27 | | ***********************************************************************/ |
28 | | #ifndef SILK_NSQ_H |
29 | | #define SILK_NSQ_H |
30 | | |
31 | | #include "SigProc_FIX.h" |
32 | | |
33 | | #undef silk_short_prediction_create_arch_coef |
34 | | |
35 | | static OPUS_INLINE opus_int32 silk_noise_shape_quantizer_short_prediction_c(const opus_int32 *buf32, const opus_int16 *coef16, opus_int order) |
36 | 11.3G | { |
37 | 11.3G | opus_int32 out; |
38 | 11.3G | silk_assert( order == 10 || order == 16 ); |
39 | | |
40 | | /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ |
41 | 11.3G | out = silk_RSHIFT( order, 1 ); |
42 | 11.3G | out = silk_SMLAWB( out, buf32[ 0 ], coef16[ 0 ] ); |
43 | 11.3G | out = silk_SMLAWB( out, buf32[ -1 ], coef16[ 1 ] ); |
44 | 11.3G | out = silk_SMLAWB( out, buf32[ -2 ], coef16[ 2 ] ); |
45 | 11.3G | out = silk_SMLAWB( out, buf32[ -3 ], coef16[ 3 ] ); |
46 | 11.3G | out = silk_SMLAWB( out, buf32[ -4 ], coef16[ 4 ] ); |
47 | 11.3G | out = silk_SMLAWB( out, buf32[ -5 ], coef16[ 5 ] ); |
48 | 11.3G | out = silk_SMLAWB( out, buf32[ -6 ], coef16[ 6 ] ); |
49 | 11.3G | out = silk_SMLAWB( out, buf32[ -7 ], coef16[ 7 ] ); |
50 | 11.3G | out = silk_SMLAWB( out, buf32[ -8 ], coef16[ 8 ] ); |
51 | 11.3G | out = silk_SMLAWB( out, buf32[ -9 ], coef16[ 9 ] ); |
52 | | |
53 | 11.3G | if( order == 16 ) |
54 | 4.04G | { |
55 | 4.04G | out = silk_SMLAWB( out, buf32[ -10 ], coef16[ 10 ] ); |
56 | 4.04G | out = silk_SMLAWB( out, buf32[ -11 ], coef16[ 11 ] ); |
57 | 4.04G | out = silk_SMLAWB( out, buf32[ -12 ], coef16[ 12 ] ); |
58 | 4.04G | out = silk_SMLAWB( out, buf32[ -13 ], coef16[ 13 ] ); |
59 | 4.04G | out = silk_SMLAWB( out, buf32[ -14 ], coef16[ 14 ] ); |
60 | 4.04G | out = silk_SMLAWB( out, buf32[ -15 ], coef16[ 15 ] ); |
61 | 4.04G | } |
62 | 11.3G | return out; |
63 | 11.3G | } Unexecuted instantiation: NSQ_del_dec_avx2.c:silk_noise_shape_quantizer_short_prediction_c NSQ.c:silk_noise_shape_quantizer_short_prediction_c Line | Count | Source | 36 | 3.16G | { | 37 | 3.16G | opus_int32 out; | 38 | 3.16G | silk_assert( order == 10 || order == 16 ); | 39 | | | 40 | | /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ | 41 | 3.16G | out = silk_RSHIFT( order, 1 ); | 42 | 3.16G | out = silk_SMLAWB( out, buf32[ 0 ], coef16[ 0 ] ); | 43 | 3.16G | out = silk_SMLAWB( out, buf32[ -1 ], coef16[ 1 ] ); | 44 | 3.16G | out = silk_SMLAWB( out, buf32[ -2 ], coef16[ 2 ] ); | 45 | 3.16G | out = silk_SMLAWB( out, buf32[ -3 ], coef16[ 3 ] ); | 46 | 3.16G | out = silk_SMLAWB( out, buf32[ -4 ], coef16[ 4 ] ); | 47 | 3.16G | out = silk_SMLAWB( out, buf32[ -5 ], coef16[ 5 ] ); | 48 | 3.16G | out = silk_SMLAWB( out, buf32[ -6 ], coef16[ 6 ] ); | 49 | 3.16G | out = silk_SMLAWB( out, buf32[ -7 ], coef16[ 7 ] ); | 50 | 3.16G | out = silk_SMLAWB( out, buf32[ -8 ], coef16[ 8 ] ); | 51 | 3.16G | out = silk_SMLAWB( out, buf32[ -9 ], coef16[ 9 ] ); | 52 | | | 53 | 3.16G | if( order == 16 ) | 54 | 1.43G | { | 55 | 1.43G | out = silk_SMLAWB( out, buf32[ -10 ], coef16[ 10 ] ); | 56 | 1.43G | out = silk_SMLAWB( out, buf32[ -11 ], coef16[ 11 ] ); | 57 | 1.43G | out = silk_SMLAWB( out, buf32[ -12 ], coef16[ 12 ] ); | 58 | 1.43G | out = silk_SMLAWB( out, buf32[ -13 ], coef16[ 13 ] ); | 59 | 1.43G | out = silk_SMLAWB( out, buf32[ -14 ], coef16[ 14 ] ); | 60 | 1.43G | out = silk_SMLAWB( out, buf32[ -15 ], coef16[ 15 ] ); | 61 | 1.43G | } | 62 | 3.16G | return out; | 63 | 3.16G | } |
NSQ_del_dec.c:silk_noise_shape_quantizer_short_prediction_c Line | Count | Source | 36 | 8.23G | { | 37 | 8.23G | opus_int32 out; | 38 | 8.23G | silk_assert( order == 10 || order == 16 ); | 39 | | | 40 | | /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ | 41 | 8.23G | out = silk_RSHIFT( order, 1 ); | 42 | 8.23G | out = silk_SMLAWB( out, buf32[ 0 ], coef16[ 0 ] ); | 43 | 8.23G | out = silk_SMLAWB( out, buf32[ -1 ], coef16[ 1 ] ); | 44 | 8.23G | out = silk_SMLAWB( out, buf32[ -2 ], coef16[ 2 ] ); | 45 | 8.23G | out = silk_SMLAWB( out, buf32[ -3 ], coef16[ 3 ] ); | 46 | 8.23G | out = silk_SMLAWB( out, buf32[ -4 ], coef16[ 4 ] ); | 47 | 8.23G | out = silk_SMLAWB( out, buf32[ -5 ], coef16[ 5 ] ); | 48 | 8.23G | out = silk_SMLAWB( out, buf32[ -6 ], coef16[ 6 ] ); | 49 | 8.23G | out = silk_SMLAWB( out, buf32[ -7 ], coef16[ 7 ] ); | 50 | 8.23G | out = silk_SMLAWB( out, buf32[ -8 ], coef16[ 8 ] ); | 51 | 8.23G | out = silk_SMLAWB( out, buf32[ -9 ], coef16[ 9 ] ); | 52 | | | 53 | 8.23G | if( order == 16 ) | 54 | 2.61G | { | 55 | 2.61G | out = silk_SMLAWB( out, buf32[ -10 ], coef16[ 10 ] ); | 56 | 2.61G | out = silk_SMLAWB( out, buf32[ -11 ], coef16[ 11 ] ); | 57 | 2.61G | out = silk_SMLAWB( out, buf32[ -12 ], coef16[ 12 ] ); | 58 | 2.61G | out = silk_SMLAWB( out, buf32[ -13 ], coef16[ 13 ] ); | 59 | 2.61G | out = silk_SMLAWB( out, buf32[ -14 ], coef16[ 14 ] ); | 60 | 2.61G | out = silk_SMLAWB( out, buf32[ -15 ], coef16[ 15 ] ); | 61 | 2.61G | } | 62 | 8.23G | return out; | 63 | 8.23G | } |
|
64 | | |
65 | 11.3G | #define silk_noise_shape_quantizer_short_prediction(in, coef, coefRev, order, arch) ((void)arch,silk_noise_shape_quantizer_short_prediction_c(in, coef, order)) |
66 | | |
67 | | static OPUS_INLINE opus_int32 silk_NSQ_noise_shape_feedback_loop_c(const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, opus_int order) |
68 | 3.16G | { |
69 | 3.16G | opus_int32 out; |
70 | 3.16G | opus_int32 tmp1, tmp2; |
71 | 3.16G | opus_int j; |
72 | | |
73 | 3.16G | tmp2 = data0[0]; |
74 | 3.16G | tmp1 = data1[0]; |
75 | 3.16G | data1[0] = tmp2; |
76 | | |
77 | 3.16G | out = silk_RSHIFT(order, 1); |
78 | 3.16G | out = silk_SMLAWB(out, tmp2, coef[0]); |
79 | | |
80 | 20.0G | for (j = 2; j < order; j += 2) { |
81 | 16.9G | tmp2 = data1[j - 1]; |
82 | 16.9G | data1[j - 1] = tmp1; |
83 | 16.9G | out = silk_SMLAWB(out, tmp1, coef[j - 1]); |
84 | 16.9G | tmp1 = data1[j + 0]; |
85 | 16.9G | data1[j + 0] = tmp2; |
86 | 16.9G | out = silk_SMLAWB(out, tmp2, coef[j]); |
87 | 16.9G | } |
88 | 3.16G | data1[order - 1] = tmp1; |
89 | 3.16G | out = silk_SMLAWB(out, tmp1, coef[order - 1]); |
90 | | /* Q11 -> Q12 */ |
91 | 3.16G | out = silk_LSHIFT32( out, 1 ); |
92 | 3.16G | return out; |
93 | 3.16G | } Unexecuted instantiation: NSQ_del_dec_avx2.c:silk_NSQ_noise_shape_feedback_loop_c NSQ.c:silk_NSQ_noise_shape_feedback_loop_c Line | Count | Source | 68 | 3.16G | { | 69 | 3.16G | opus_int32 out; | 70 | 3.16G | opus_int32 tmp1, tmp2; | 71 | 3.16G | opus_int j; | 72 | | | 73 | 3.16G | tmp2 = data0[0]; | 74 | 3.16G | tmp1 = data1[0]; | 75 | 3.16G | data1[0] = tmp2; | 76 | | | 77 | 3.16G | out = silk_RSHIFT(order, 1); | 78 | 3.16G | out = silk_SMLAWB(out, tmp2, coef[0]); | 79 | | | 80 | 20.0G | for (j = 2; j < order; j += 2) { | 81 | 16.9G | tmp2 = data1[j - 1]; | 82 | 16.9G | data1[j - 1] = tmp1; | 83 | 16.9G | out = silk_SMLAWB(out, tmp1, coef[j - 1]); | 84 | 16.9G | tmp1 = data1[j + 0]; | 85 | 16.9G | data1[j + 0] = tmp2; | 86 | 16.9G | out = silk_SMLAWB(out, tmp2, coef[j]); | 87 | 16.9G | } | 88 | 3.16G | data1[order - 1] = tmp1; | 89 | 3.16G | out = silk_SMLAWB(out, tmp1, coef[order - 1]); | 90 | | /* Q11 -> Q12 */ | 91 | 3.16G | out = silk_LSHIFT32( out, 1 ); | 92 | 3.16G | return out; | 93 | 3.16G | } |
Unexecuted instantiation: NSQ_del_dec.c:silk_NSQ_noise_shape_feedback_loop_c |
94 | | |
95 | 3.16G | #define silk_NSQ_noise_shape_feedback_loop(data0, data1, coef, order, arch) ((void)arch,silk_NSQ_noise_shape_feedback_loop_c(data0, data1, coef, order)) |
96 | | |
97 | | #if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) |
98 | | #include "arm/NSQ_neon.h" |
99 | | #endif |
100 | | |
101 | | #endif /* SILK_NSQ_H */ |