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

Side by Side Diff: third_party/opus/src/celt/arm/pitch_arm.h

Issue 2962373002: [Opus] Update to v1.2.1 (Closed)
Patch Set: Pre-increment instead of post-increment Created 3 years, 5 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
OLDNEW
1 /* Copyright (c) 2010 Xiph.Org Foundation 1 /* Copyright (c) 2010 Xiph.Org Foundation
2 * Copyright (c) 2013 Parrot */ 2 * Copyright (c) 2013 Parrot */
3 /* 3 /*
4 Redistribution and use in source and binary forms, with or without 4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions 5 modification, are permitted provided that the following conditions
6 are met: 6 are met:
7 7
8 - Redistributions of source code must retain the above copyright 8 - Redistributions of source code must retain the above copyright
9 notice, this list of conditions and the following disclaimer. 9 notice, this list of conditions and the following disclaimer.
10 10
(...skipping 12 matching lines...) Expand all
23 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #if !defined(PITCH_ARM_H) 28 #if !defined(PITCH_ARM_H)
29 # define PITCH_ARM_H 29 # define PITCH_ARM_H
30 30
31 # include "armcpu.h" 31 # include "armcpu.h"
32 32
33 # if defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
34 opus_val32 celt_inner_prod_neon(const opus_val16 *x, const opus_val16 *y, int N) ;
35 void dual_inner_prod_neon(const opus_val16 *x, const opus_val16 *y01,
36 const opus_val16 *y02, int N, opus_val32 *xy1, opus_val32 *xy2);
37
38 # if !defined(OPUS_HAVE_RTCD) && defined(OPUS_ARM_PRESUME_NEON)
39 # define OVERRIDE_CELT_INNER_PROD (1)
40 # define OVERRIDE_DUAL_INNER_PROD (1)
41 # define celt_inner_prod(x, y, N, arch) ((void)(arch), PRESUME_NEON(celt_inner _prod)(x, y, N))
42 # define dual_inner_prod(x, y01, y02, N, xy1, xy2, arch) ((void)(arch), PRESUM E_NEON(dual_inner_prod)(x, y01, y02, N, xy1, xy2))
43 # endif
44 # endif
45
46 # if !defined(OVERRIDE_CELT_INNER_PROD)
47 # if defined(OPUS_HAVE_RTCD) && (defined(OPUS_ARM_MAY_HAVE_NEON_INTR) && !defin ed(OPUS_ARM_PRESUME_NEON_INTR))
48 extern opus_val32 (*const CELT_INNER_PROD_IMPL[OPUS_ARCHMASK+1])(const opus_val1 6 *x, const opus_val16 *y, int N);
49 # define OVERRIDE_CELT_INNER_PROD (1)
50 # define celt_inner_prod(x, y, N, arch) ((*CELT_INNER_PROD_IMPL[(arch)&OPUS_AR CHMASK])(x, y, N))
51 # elif defined(OPUS_ARM_PRESUME_NEON_INTR)
52 # define OVERRIDE_CELT_INNER_PROD (1)
53 # define celt_inner_prod(x, y, N, arch) ((void)(arch), celt_inner_prod_neon(x, y, N))
54 # endif
55 # endif
56
57 # if !defined(OVERRIDE_DUAL_INNER_PROD)
58 # if defined(OPUS_HAVE_RTCD) && (defined(OPUS_ARM_MAY_HAVE_NEON_INTR) && !defin ed(OPUS_ARM_PRESUME_NEON_INTR))
59 extern void (*const DUAL_INNER_PROD_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *x,
60 const opus_val16 *y01, const opus_val16 *y02, int N, opus_val32 *xy1, op us_val32 *xy2);
61 # define OVERRIDE_DUAL_INNER_PROD (1)
62 # define dual_inner_prod(x, y01, y02, N, xy1, xy2, arch) ((*DUAL_INNER_PROD_IM PL[(arch)&OPUS_ARCHMASK])(x, y01, y02, N, xy1, xy2))
63 # elif defined(OPUS_ARM_PRESUME_NEON_INTR)
64 # define OVERRIDE_DUAL_INNER_PROD (1)
65 # define dual_inner_prod(x, y01, y02, N, xy1, xy2, arch) ((void)(arch), dual_i nner_prod_neon(x, y01, y02, N, xy1, xy2))
66 # endif
67 # endif
68
33 # if defined(FIXED_POINT) 69 # if defined(FIXED_POINT)
34 70
35 # if defined(OPUS_ARM_MAY_HAVE_NEON) 71 # if defined(OPUS_ARM_MAY_HAVE_NEON)
36 opus_val32 celt_pitch_xcorr_neon(const opus_val16 *_x, const opus_val16 *_y, 72 opus_val32 celt_pitch_xcorr_neon(const opus_val16 *_x, const opus_val16 *_y,
37 opus_val32 *xcorr, int len, int max_pitch); 73 opus_val32 *xcorr, int len, int max_pitch, int arch);
38 # endif 74 # endif
39 75
40 # if defined(OPUS_ARM_MAY_HAVE_MEDIA) 76 # if defined(OPUS_ARM_MAY_HAVE_MEDIA)
41 # define celt_pitch_xcorr_media MAY_HAVE_EDSP(celt_pitch_xcorr) 77 # define celt_pitch_xcorr_media MAY_HAVE_EDSP(celt_pitch_xcorr)
42 # endif 78 # endif
43 79
44 # if defined(OPUS_ARM_MAY_HAVE_EDSP) 80 # if defined(OPUS_ARM_MAY_HAVE_EDSP)
45 opus_val32 celt_pitch_xcorr_edsp(const opus_val16 *_x, const opus_val16 *_y, 81 opus_val32 celt_pitch_xcorr_edsp(const opus_val16 *_x, const opus_val16 *_y,
46 opus_val32 *xcorr, int len, int max_pitch); 82 opus_val32 *xcorr, int len, int max_pitch, int arch);
47 # endif 83 # endif
48 84
49 # if defined(OPUS_HAVE_RTCD) && \ 85 # if defined(OPUS_HAVE_RTCD) && \
50 ((defined(OPUS_ARM_MAY_HAVE_NEON) && !defined(OPUS_ARM_PRESUME_NEON)) || \ 86 ((defined(OPUS_ARM_MAY_HAVE_NEON) && !defined(OPUS_ARM_PRESUME_NEON)) || \
51 (defined(OPUS_ARM_MAY_HAVE_MEDIA) && !defined(OPUS_ARM_PRESUME_MEDIA)) || \ 87 (defined(OPUS_ARM_MAY_HAVE_MEDIA) && !defined(OPUS_ARM_PRESUME_MEDIA)) || \
52 (defined(OPUS_ARM_MAY_HAVE_EDSP) && !defined(OPUS_ARM_PRESUME_EDSP))) 88 (defined(OPUS_ARM_MAY_HAVE_EDSP) && !defined(OPUS_ARM_PRESUME_EDSP)))
53 extern opus_val32 89 extern opus_val32
54 (*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *, 90 (*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *,
55 const opus_val16 *, opus_val32 *, int, int); 91 const opus_val16 *, opus_val32 *, int, int, int);
56 # define OVERRIDE_PITCH_XCORR (1) 92 # define OVERRIDE_PITCH_XCORR (1)
57 # define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \ 93 # define celt_pitch_xcorr (*CELT_PITCH_XCORR_IMPL[(arch)&OPUS_ARCHMASK])
58 ((*CELT_PITCH_XCORR_IMPL[(arch)&OPUS_ARCHMASK])(_x, _y, \
59 xcorr, len, max_pitch))
60 94
61 # elif defined(OPUS_ARM_PRESUME_EDSP) || \ 95 # elif defined(OPUS_ARM_PRESUME_EDSP) || \
62 defined(OPUS_ARM_PRESUME_MEDIA) || \ 96 defined(OPUS_ARM_PRESUME_MEDIA) || \
63 defined(OPUS_ARM_PRESUME_NEON) 97 defined(OPUS_ARM_PRESUME_NEON)
64 # define OVERRIDE_PITCH_XCORR (1) 98 # define OVERRIDE_PITCH_XCORR (1)
65 # define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \ 99 # define celt_pitch_xcorr (PRESUME_NEON(celt_pitch_xcorr))
66 ((void)(arch),PRESUME_NEON(celt_pitch_xcorr)(_x, _y, xcorr, len, max_pitch))
67 100
68 # endif 101 # endif
69 102
70 # if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) 103 # if defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
71 void xcorr_kernel_neon_fixed( 104 void xcorr_kernel_neon_fixed(
72 const opus_val16 *x, 105 const opus_val16 *x,
73 const opus_val16 *y, 106 const opus_val16 *y,
74 opus_val32 sum[4], 107 opus_val32 sum[4],
75 int len); 108 int len);
76 # endif 109 # endif
(...skipping 15 matching lines...) Expand all
92 # define OVERRIDE_XCORR_KERNEL (1) 125 # define OVERRIDE_XCORR_KERNEL (1)
93 # define xcorr_kernel(x, y, sum, len, arch) \ 126 # define xcorr_kernel(x, y, sum, len, arch) \
94 ((void)arch, xcorr_kernel_neon_fixed(x, y, sum, len)) 127 ((void)arch, xcorr_kernel_neon_fixed(x, y, sum, len))
95 128
96 # endif 129 # endif
97 130
98 #else /* Start !FIXED_POINT */ 131 #else /* Start !FIXED_POINT */
99 /* Float case */ 132 /* Float case */
100 #if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) 133 #if defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
101 void celt_pitch_xcorr_float_neon(const opus_val16 *_x, const opus_val16 *_y, 134 void celt_pitch_xcorr_float_neon(const opus_val16 *_x, const opus_val16 *_y,
102 opus_val32 *xcorr, int len, int max_pitch); 135 opus_val32 *xcorr, int len, int max_pitch, int arch);
103 #endif 136 #endif
104 137
105 # if defined(OPUS_HAVE_RTCD) && \ 138 # if defined(OPUS_HAVE_RTCD) && \
106 (defined(OPUS_ARM_MAY_HAVE_NEON_INTR) && !defined(OPUS_ARM_PRESUME_NEON_INTR )) 139 (defined(OPUS_ARM_MAY_HAVE_NEON_INTR) && !defined(OPUS_ARM_PRESUME_NEON_INTR ))
107 extern void 140 extern void
108 (*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *, 141 (*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *,
109 const opus_val16 *, opus_val32 *, int, int); 142 const opus_val16 *, opus_val32 *, int, int, int);
110 143
111 # define OVERRIDE_PITCH_XCORR (1) 144 # define OVERRIDE_PITCH_XCORR (1)
112 # define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \ 145 # define celt_pitch_xcorr (*CELT_PITCH_XCORR_IMPL[(arch)&OPUS_ARCHMASK])
113 ((*CELT_PITCH_XCORR_IMPL[(arch)&OPUS_ARCHMASK])(_x, _y, \
114 xcorr, len, max_pitch))
115 146
116 # elif defined(OPUS_ARM_PRESUME_NEON_INTR) 147 # elif defined(OPUS_ARM_PRESUME_NEON_INTR)
117 148
118 # define OVERRIDE_PITCH_XCORR (1) 149 # define OVERRIDE_PITCH_XCORR (1)
119 # define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \ 150 # define celt_pitch_xcorr celt_pitch_xcorr_float_neon
120 ((void)(arch),celt_pitch_xcorr_float_neon(_x, _y, xcorr, len, max_pitch))
121 151
122 # endif 152 # endif
123 153
124 #endif /* end !FIXED_POINT */ 154 #endif /* end !FIXED_POINT */
125 155
126 #endif 156 #endif
OLDNEW
« no previous file with comments | « third_party/opus/src/celt/arm/mdct_arm.h ('k') | third_party/opus/src/celt/arm/pitch_neon_intr.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698