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

Side by Side Diff: source/config/linux/arm-neon-cpu-detect/vpx_dsp_rtcd.h

Issue 1162573005: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 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 #ifndef VPX_DSP_RTCD_H_ 1 #ifndef VPX_DSP_RTCD_H_
2 #define VPX_DSP_RTCD_H_ 2 #define VPX_DSP_RTCD_H_
3 3
4 #ifdef RTCD_C 4 #ifdef RTCD_C
5 #define RTCD_EXTERN 5 #define RTCD_EXTERN
6 #else 6 #else
7 #define RTCD_EXTERN extern 7 #define RTCD_EXTERN extern
8 #endif 8 #endif
9 9
10 /* 10 /*
11 * DSP 11 * DSP
12 */ 12 */
13 13
14 #include "vpx/vpx_integer.h" 14 #include "vpx/vpx_integer.h"
15 15
16 16
17 #ifdef __cplusplus 17 #ifdef __cplusplus
18 extern "C" { 18 extern "C" {
19 #endif 19 #endif
20 20
21 void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride);
22 #define vpx_comp_avg_pred vpx_comp_avg_pred_c
23
24 void vpx_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum);
25 void vpx_get16x16var_neon(const uint8_t *src_ptr, int source_stride, const uint8 _t *ref_ptr, int ref_stride, unsigned int *sse, int *sum);
26 RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum);
27
28 unsigned int vpx_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride);
29 unsigned int vpx_get4x4sse_cs_neon(const unsigned char *src_ptr, int source_stri de, const unsigned char *ref_ptr, int ref_stride);
30 RTCD_EXTERN unsigned int (*vpx_get4x4sse_cs)(const unsigned char *src_ptr, int s ource_stride, const unsigned char *ref_ptr, int ref_stride);
31
32 void vpx_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *r ef_ptr, int ref_stride, unsigned int *sse, int *sum);
33 void vpx_get8x8var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum);
34 RTCD_EXTERN void (*vpx_get8x8var)(const uint8_t *src_ptr, int source_stride, con st uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum);
35
36 unsigned int vpx_get_mb_ss_c(const int16_t *);
37 #define vpx_get_mb_ss vpx_get_mb_ss_c
38
39 unsigned int vpx_mse16x16_c(const uint8_t *src_ptr, int source_stride, const ui nt8_t *ref_ptr, int recon_stride, unsigned int *sse);
40 unsigned int vpx_mse16x16_media(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int recon_stride, unsigned int *sse);
41 unsigned int vpx_mse16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse);
42 RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t *src_ptr, int source_str ide, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse);
43
44 unsigned int vpx_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uin t8_t *ref_ptr, int recon_stride, unsigned int *sse);
45 #define vpx_mse16x8 vpx_mse16x8_c
46
47 unsigned int vpx_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uin t8_t *ref_ptr, int recon_stride, unsigned int *sse);
48 #define vpx_mse8x16 vpx_mse8x16_c
49
50 unsigned int vpx_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint 8_t *ref_ptr, int recon_stride, unsigned int *sse);
51 #define vpx_mse8x8 vpx_mse8x8_c
52
21 unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_ t *ref_ptr, int ref_stride); 53 unsigned int vpx_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_ t *ref_ptr, int ref_stride);
22 unsigned int vpx_sad16x16_media(const uint8_t *src_ptr, int src_stride, const ui nt8_t *ref_ptr, int ref_stride); 54 unsigned int vpx_sad16x16_media(const uint8_t *src_ptr, int src_stride, const ui nt8_t *ref_ptr, int ref_stride);
23 unsigned int vpx_sad16x16_neon(const uint8_t *src_ptr, int src_stride, const uin t8_t *ref_ptr, int ref_stride); 55 unsigned int vpx_sad16x16_neon(const uint8_t *src_ptr, int src_stride, const uin t8_t *ref_ptr, int ref_stride);
24 RTCD_EXTERN unsigned int (*vpx_sad16x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); 56 RTCD_EXTERN unsigned int (*vpx_sad16x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride);
25 57
26 unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const ui nt8_t *ref_ptr, int ref_stride, const uint8_t *second_pred); 58 unsigned int vpx_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const ui nt8_t *ref_ptr, int ref_stride, const uint8_t *second_pred);
27 #define vpx_sad16x16_avg vpx_sad16x16_avg_c 59 #define vpx_sad16x16_avg vpx_sad16x16_avg_c
28 60
29 void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref _ptr, int ref_stride, uint32_t *sad_array); 61 void vpx_sad16x16x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref _ptr, int ref_stride, uint32_t *sad_array);
30 #define vpx_sad16x16x3 vpx_sad16x16x3_c 62 #define vpx_sad16x16x3 vpx_sad16x16x3_c
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 219
188 void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_p tr, int ref_stride, uint32_t *sad_array); 220 void vpx_sad8x8x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_p tr, int ref_stride, uint32_t *sad_array);
189 #define vpx_sad8x8x3 vpx_sad8x8x3_c 221 #define vpx_sad8x8x3 vpx_sad8x8x3_c
190 222
191 void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * con st ref_ptr[], int ref_stride, uint32_t *sad_array); 223 void vpx_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * con st ref_ptr[], int ref_stride, uint32_t *sad_array);
192 #define vpx_sad8x8x4d vpx_sad8x8x4d_c 224 #define vpx_sad8x8x4d vpx_sad8x8x4d_c
193 225
194 void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_p tr, int ref_stride, uint32_t *sad_array); 226 void vpx_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_p tr, int ref_stride, uint32_t *sad_array);
195 #define vpx_sad8x8x8 vpx_sad8x8x8_c 227 #define vpx_sad8x8x8 vpx_sad8x8x8_c
196 228
229 unsigned int vpx_variance16x16_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
230 unsigned int vpx_variance16x16_media(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
231 unsigned int vpx_variance16x16_neon(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
232 RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t *src_ptr, int source _stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
233
234 unsigned int vpx_variance16x32_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
235 #define vpx_variance16x32 vpx_variance16x32_c
236
237 unsigned int vpx_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
238 unsigned int vpx_variance16x8_neon(const uint8_t *src_ptr, int source_stride, co nst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
239 RTCD_EXTERN unsigned int (*vpx_variance16x8)(const uint8_t *src_ptr, int source_ stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
240
241 unsigned int vpx_variance32x16_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
242 #define vpx_variance32x16 vpx_variance32x16_c
243
244 unsigned int vpx_variance32x32_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
245 unsigned int vpx_variance32x32_neon(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
246 RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t *src_ptr, int source _stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
247
248 unsigned int vpx_variance32x64_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
249 unsigned int vpx_variance32x64_neon(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
250 RTCD_EXTERN unsigned int (*vpx_variance32x64)(const uint8_t *src_ptr, int source _stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
251
252 unsigned int vpx_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
253 #define vpx_variance4x4 vpx_variance4x4_c
254
255 unsigned int vpx_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
256 #define vpx_variance4x8 vpx_variance4x8_c
257
258 unsigned int vpx_variance64x32_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
259 unsigned int vpx_variance64x32_neon(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
260 RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t *src_ptr, int source _stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
261
262 unsigned int vpx_variance64x64_c(const uint8_t *src_ptr, int source_stride, cons t uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
263 unsigned int vpx_variance64x64_neon(const uint8_t *src_ptr, int source_stride, c onst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
264 RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t *src_ptr, int source _stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
265
266 unsigned int vpx_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
267 unsigned int vpx_variance8x16_neon(const uint8_t *src_ptr, int source_stride, co nst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
268 RTCD_EXTERN unsigned int (*vpx_variance8x16)(const uint8_t *src_ptr, int source_ stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
269
270 unsigned int vpx_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
271 #define vpx_variance8x4 vpx_variance8x4_c
272
273 unsigned int vpx_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
274 unsigned int vpx_variance8x8_media(const uint8_t *src_ptr, int source_stride, co nst uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
275 unsigned int vpx_variance8x8_neon(const uint8_t *src_ptr, int source_stride, con st uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
276 RTCD_EXTERN unsigned int (*vpx_variance8x8)(const uint8_t *src_ptr, int source_s tride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
277
197 void vpx_dsp_rtcd(void); 278 void vpx_dsp_rtcd(void);
198 279
199 #include "vpx_config.h" 280 #include "vpx_config.h"
200 281
201 #ifdef RTCD_C 282 #ifdef RTCD_C
202 #include "vpx_ports/arm.h" 283 #include "vpx_ports/arm.h"
203 static void setup_rtcd_internal(void) 284 static void setup_rtcd_internal(void)
204 { 285 {
205 int flags = arm_cpu_caps(); 286 int flags = arm_cpu_caps();
206 287
207 (void)flags; 288 (void)flags;
208 289
290 vpx_get16x16var = vpx_get16x16var_c;
291 if (flags & HAS_NEON) vpx_get16x16var = vpx_get16x16var_neon;
292 vpx_get4x4sse_cs = vpx_get4x4sse_cs_c;
293 if (flags & HAS_NEON) vpx_get4x4sse_cs = vpx_get4x4sse_cs_neon;
294 vpx_get8x8var = vpx_get8x8var_c;
295 if (flags & HAS_NEON) vpx_get8x8var = vpx_get8x8var_neon;
296 vpx_mse16x16 = vpx_mse16x16_media;
297 if (flags & HAS_NEON) vpx_mse16x16 = vpx_mse16x16_neon;
209 vpx_sad16x16 = vpx_sad16x16_media; 298 vpx_sad16x16 = vpx_sad16x16_media;
210 if (flags & HAS_NEON) vpx_sad16x16 = vpx_sad16x16_neon; 299 if (flags & HAS_NEON) vpx_sad16x16 = vpx_sad16x16_neon;
211 vpx_sad16x16x4d = vpx_sad16x16x4d_c; 300 vpx_sad16x16x4d = vpx_sad16x16x4d_c;
212 if (flags & HAS_NEON) vpx_sad16x16x4d = vpx_sad16x16x4d_neon; 301 if (flags & HAS_NEON) vpx_sad16x16x4d = vpx_sad16x16x4d_neon;
213 vpx_sad16x8 = vpx_sad16x8_c; 302 vpx_sad16x8 = vpx_sad16x8_c;
214 if (flags & HAS_NEON) vpx_sad16x8 = vpx_sad16x8_neon; 303 if (flags & HAS_NEON) vpx_sad16x8 = vpx_sad16x8_neon;
215 vpx_sad32x32 = vpx_sad32x32_c; 304 vpx_sad32x32 = vpx_sad32x32_c;
216 if (flags & HAS_NEON) vpx_sad32x32 = vpx_sad32x32_neon; 305 if (flags & HAS_NEON) vpx_sad32x32 = vpx_sad32x32_neon;
217 vpx_sad32x32x4d = vpx_sad32x32x4d_c; 306 vpx_sad32x32x4d = vpx_sad32x32x4d_c;
218 if (flags & HAS_NEON) vpx_sad32x32x4d = vpx_sad32x32x4d_neon; 307 if (flags & HAS_NEON) vpx_sad32x32x4d = vpx_sad32x32x4d_neon;
219 vpx_sad4x4 = vpx_sad4x4_c; 308 vpx_sad4x4 = vpx_sad4x4_c;
220 if (flags & HAS_NEON) vpx_sad4x4 = vpx_sad4x4_neon; 309 if (flags & HAS_NEON) vpx_sad4x4 = vpx_sad4x4_neon;
221 vpx_sad64x64 = vpx_sad64x64_c; 310 vpx_sad64x64 = vpx_sad64x64_c;
222 if (flags & HAS_NEON) vpx_sad64x64 = vpx_sad64x64_neon; 311 if (flags & HAS_NEON) vpx_sad64x64 = vpx_sad64x64_neon;
223 vpx_sad64x64x4d = vpx_sad64x64x4d_c; 312 vpx_sad64x64x4d = vpx_sad64x64x4d_c;
224 if (flags & HAS_NEON) vpx_sad64x64x4d = vpx_sad64x64x4d_neon; 313 if (flags & HAS_NEON) vpx_sad64x64x4d = vpx_sad64x64x4d_neon;
225 vpx_sad8x16 = vpx_sad8x16_c; 314 vpx_sad8x16 = vpx_sad8x16_c;
226 if (flags & HAS_NEON) vpx_sad8x16 = vpx_sad8x16_neon; 315 if (flags & HAS_NEON) vpx_sad8x16 = vpx_sad8x16_neon;
227 vpx_sad8x8 = vpx_sad8x8_c; 316 vpx_sad8x8 = vpx_sad8x8_c;
228 if (flags & HAS_NEON) vpx_sad8x8 = vpx_sad8x8_neon; 317 if (flags & HAS_NEON) vpx_sad8x8 = vpx_sad8x8_neon;
318 vpx_variance16x16 = vpx_variance16x16_media;
319 if (flags & HAS_NEON) vpx_variance16x16 = vpx_variance16x16_neon;
320 vpx_variance16x8 = vpx_variance16x8_c;
321 if (flags & HAS_NEON) vpx_variance16x8 = vpx_variance16x8_neon;
322 vpx_variance32x32 = vpx_variance32x32_c;
323 if (flags & HAS_NEON) vpx_variance32x32 = vpx_variance32x32_neon;
324 vpx_variance32x64 = vpx_variance32x64_c;
325 if (flags & HAS_NEON) vpx_variance32x64 = vpx_variance32x64_neon;
326 vpx_variance64x32 = vpx_variance64x32_c;
327 if (flags & HAS_NEON) vpx_variance64x32 = vpx_variance64x32_neon;
328 vpx_variance64x64 = vpx_variance64x64_c;
329 if (flags & HAS_NEON) vpx_variance64x64 = vpx_variance64x64_neon;
330 vpx_variance8x16 = vpx_variance8x16_c;
331 if (flags & HAS_NEON) vpx_variance8x16 = vpx_variance8x16_neon;
332 vpx_variance8x8 = vpx_variance8x8_media;
333 if (flags & HAS_NEON) vpx_variance8x8 = vpx_variance8x8_neon;
229 } 334 }
230 #endif 335 #endif
231 336
232 #ifdef __cplusplus 337 #ifdef __cplusplus
233 } // extern "C" 338 } // extern "C"
234 #endif 339 #endif
235 340
236 #endif 341 #endif
OLDNEW
« no previous file with comments | « source/config/linux/arm-neon-cpu-detect/vpx_config.c ('k') | source/config/linux/arm-neon/vp8_rtcd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698