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 #if ARCH_MIPS 30 #if defined(MIPS_DSP_REV) && MIPS_DSP_REV>=2 31 #include "mips/subpixel_mips.h" 32 #endif 33 #endif 34 35 #ifndef vp8_subpix_sixtap16x16 36 #define vp8_subpix_sixtap16x16 vp8_sixtap_predict16x16_c 37 #endif 38 extern prototype_subpixel_predict(vp8_subpix_sixtap16x16); 39 40 #ifndef vp8_subpix_sixtap8x8 41 #define vp8_subpix_sixtap8x8 vp8_sixtap_predict8x8_c 42 #endif 43 extern prototype_subpixel_predict(vp8_subpix_sixtap8x8); 44 45 #ifndef vp8_subpix_sixtap8x4 46 #define vp8_subpix_sixtap8x4 vp8_sixtap_predict8x4_c 47 #endif 48 extern prototype_subpixel_predict(vp8_subpix_sixtap8x4); 49 50 #ifndef vp8_subpix_sixtap4x4 51 #define vp8_subpix_sixtap4x4 vp8_sixtap_predict_c 52 #endif 53 extern prototype_subpixel_predict(vp8_subpix_sixtap4x4); 54 55 #ifndef vp8_subpix_bilinear16x16 56 #define vp8_subpix_bilinear16x16 vp8_bilinear_predict16x16_c 57 #endif 58 extern prototype_subpixel_predict(vp8_subpix_bilinear16x16); 59 60 #ifndef vp8_subpix_bilinear8x8 61 #define vp8_subpix_bilinear8x8 vp8_bilinear_predict8x8_c 62 #endif 63 extern prototype_subpixel_predict(vp8_subpix_bilinear8x8); 64 65 #ifndef vp8_subpix_bilinear8x4 66 #define vp8_subpix_bilinear8x4 vp8_bilinear_predict8x4_c 67 #endif 68 extern prototype_subpixel_predict(vp8_subpix_bilinear8x4); 69 70 #ifndef vp8_subpix_bilinear4x4 71 #define vp8_subpix_bilinear4x4 vp8_bilinear_predict4x4_c 72 #endif 73 extern prototype_subpixel_predict(vp8_subpix_bilinear4x4); 74 75 typedef prototype_subpixel_predict((*vp8_subpix_fn_t)); 76 typedef struct 77 { 78 vp8_subpix_fn_t sixtap16x16; 79 vp8_subpix_fn_t sixtap8x8; 80 vp8_subpix_fn_t sixtap8x4; 81 vp8_subpix_fn_t sixtap4x4; 82 vp8_subpix_fn_t bilinear16x16; 83 vp8_subpix_fn_t bilinear8x8; 84 vp8_subpix_fn_t bilinear8x4; 85 vp8_subpix_fn_t bilinear4x4; 86 } vp8_subpix_rtcd_vtable_t; 87 88 #if CONFIG_RUNTIME_CPU_DETECT 89 #define SUBPIX_INVOKE(ctx,fn) (ctx)->fn 90 #else 91 #define SUBPIX_INVOKE(ctx,fn) vp8_subpix_##fn 92 #endif 93 94 #endif 95