Merge "vp8_rd_pick_best_mbsegmentation code restructure"
[libvpx.git] / vp8 / common / subpixel.h
blobacdeec3bcbebdd11e53ba1dbb73540ae5234005d
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
12 #ifndef SUBPIXEL_H
13 #define SUBPIXEL_H
15 #define prototype_subpixel_predict(sym) \
16 void sym(unsigned char *src, int src_pitch, int xofst, int yofst, \
17 unsigned char *dst, int dst_pitch)
19 #if ARCH_X86 || ARCH_X86_64
20 #include "x86/subpixel_x86.h"
21 #endif
23 #if ARCH_ARM
24 #include "arm/subpixel_arm.h"
25 #endif
27 #ifndef vp8_subpix_sixtap16x16
28 #define vp8_subpix_sixtap16x16 vp8_sixtap_predict16x16_c
29 #endif
30 extern prototype_subpixel_predict(vp8_subpix_sixtap16x16);
32 #ifndef vp8_subpix_sixtap8x8
33 #define vp8_subpix_sixtap8x8 vp8_sixtap_predict8x8_c
34 #endif
35 extern prototype_subpixel_predict(vp8_subpix_sixtap8x8);
37 #ifndef vp8_subpix_sixtap8x4
38 #define vp8_subpix_sixtap8x4 vp8_sixtap_predict8x4_c
39 #endif
40 extern prototype_subpixel_predict(vp8_subpix_sixtap8x4);
42 #ifndef vp8_subpix_sixtap4x4
43 #define vp8_subpix_sixtap4x4 vp8_sixtap_predict_c
44 #endif
45 extern prototype_subpixel_predict(vp8_subpix_sixtap4x4);
47 #ifndef vp8_subpix_bilinear16x16
48 #define vp8_subpix_bilinear16x16 vp8_bilinear_predict16x16_c
49 #endif
50 extern prototype_subpixel_predict(vp8_subpix_bilinear16x16);
52 #ifndef vp8_subpix_bilinear8x8
53 #define vp8_subpix_bilinear8x8 vp8_bilinear_predict8x8_c
54 #endif
55 extern prototype_subpixel_predict(vp8_subpix_bilinear8x8);
57 #ifndef vp8_subpix_bilinear8x4
58 #define vp8_subpix_bilinear8x4 vp8_bilinear_predict8x4_c
59 #endif
60 extern prototype_subpixel_predict(vp8_subpix_bilinear8x4);
62 #ifndef vp8_subpix_bilinear4x4
63 #define vp8_subpix_bilinear4x4 vp8_bilinear_predict4x4_c
64 #endif
65 extern prototype_subpixel_predict(vp8_subpix_bilinear4x4);
67 typedef prototype_subpixel_predict((*vp8_subpix_fn_t));
68 typedef struct
70 vp8_subpix_fn_t sixtap16x16;
71 vp8_subpix_fn_t sixtap8x8;
72 vp8_subpix_fn_t sixtap8x4;
73 vp8_subpix_fn_t sixtap4x4;
74 vp8_subpix_fn_t bilinear16x16;
75 vp8_subpix_fn_t bilinear8x8;
76 vp8_subpix_fn_t bilinear8x4;
77 vp8_subpix_fn_t bilinear4x4;
78 } vp8_subpix_rtcd_vtable_t;
80 #if CONFIG_RUNTIME_CPU_DETECT
81 #define SUBPIX_INVOKE(ctx,fn) (ctx)->fn
82 #else
83 #define SUBPIX_INVOKE(ctx,fn) vp8_subpix_##fn
84 #endif
86 #endif