1 /* 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 * 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 */ 10 11 12 #ifndef SUBPIXEL_H 13 #define SUBPIXEL_H 14 15 #include "vpx_config.h" 16 17 #define prototype_subpixel_predict(sym) \ 18 void sym(unsigned char *src, int src_pitch, int xofst, int yofst, \ 19 unsigned char *dst, int dst_pitch) 20 21 #if ARCH_X86 || ARCH_X86_64 22 #include "x86/subpixel_x86.h" 23 #endif 24 25 #if ARCH_ARM 26 #include "arm/subpixel_arm.h" 27 #endif 28 29 #ifndef vp8_subpix_sixtap16x16 30 #define vp8_subpix_sixtap16x16 vp8_sixtap_predict16x16_c 31 #endif 32 extern prototype_subpixel_predict(vp8_subpix_sixtap16x16); 33 34 #ifndef vp8_subpix_sixtap8x8 35 #define vp8_subpix_sixtap8x8 vp8_sixtap_predict8x8_c 36 #endif 37 extern prototype_subpixel_predict(vp8_subpix_sixtap8x8); 38 39 #ifndef vp8_subpix_sixtap8x4 40 #define vp8_subpix_sixtap8x4 vp8_sixtap_predict8x4_c 41 #endif 42 extern prototype_subpixel_predict(vp8_subpix_sixtap8x4); 43 44 #ifndef vp8_subpix_sixtap4x4 45 #define vp8_subpix_sixtap4x4 vp8_sixtap_predict_c 46 #endif 47 extern prototype_subpixel_predict(vp8_subpix_sixtap4x4); 48 49 #ifndef vp8_subpix_bilinear16x16 50 #define vp8_subpix_bilinear16x16 vp8_bilinear_predict16x16_c 51 #endif 52 extern prototype_subpixel_predict(vp8_subpix_bilinear16x16); 53 54 #ifndef vp8_subpix_bilinear8x8 55 #define vp8_subpix_bilinear8x8 vp8_bilinear_predict8x8_c 56 #endif 57 extern prototype_subpixel_predict(vp8_subpix_bilinear8x8); 58 59 #ifndef vp8_subpix_bilinear8x4 60 #define vp8_subpix_bilinear8x4 vp8_bilinear_predict8x4_c 61 #endif 62 extern prototype_subpixel_predict(vp8_subpix_bilinear8x4); 63 64 #ifndef vp8_subpix_bilinear4x4 65 #define vp8_subpix_bilinear4x4 vp8_bilinear_predict4x4_c 66 #endif 67 extern prototype_subpixel_predict(vp8_subpix_bilinear4x4); 68 69 typedef prototype_subpixel_predict((*vp8_subpix_fn_t)); 70 typedef struct 71 { 72 vp8_subpix_fn_t sixtap16x16; 73 vp8_subpix_fn_t sixtap8x8; 74 vp8_subpix_fn_t sixtap8x4; 75 vp8_subpix_fn_t sixtap4x4; 76 vp8_subpix_fn_t bilinear16x16; 77 vp8_subpix_fn_t bilinear8x8; 78 vp8_subpix_fn_t bilinear8x4; 79 vp8_subpix_fn_t bilinear4x4; 80 } vp8_subpix_rtcd_vtable_t; 81 82 #if CONFIG_RUNTIME_CPU_DETECT 83 #define SUBPIX_INVOKE(ctx,fn) (ctx)->fn 84 #else 85 #define SUBPIX_INVOKE(ctx,fn) vp8_subpix_##fn 86 #endif 87 88 #endif 89