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 __INC_IDCT_H 13 #define __INC_IDCT_H 14 15 #define prototype_second_order(sym) \ 16 void sym(short *input, short *output) 17 18 #define prototype_idct(sym) \ 19 void sym(short *input, short *output, int pitch) 20 21 #define prototype_idct_scalar_add(sym) \ 22 void sym(short input, \ 23 unsigned char *pred, unsigned char *output, \ 24 int pitch, int stride) 25 26 #if ARCH_X86 || ARCH_X86_64 27 #include "x86/idct_x86.h" 28 #endif 29 30 #if ARCH_ARM 31 #include "arm/idct_arm.h" 32 #endif 33 34 #if ARCH_MIPS 35 #if defined(MIPS_DSP_REV) && MIPS_DSP_REV>=1 36 #include "mips/idct_mips.h" 37 #endif 38 #endif 39 40 #ifndef vp8_idct_idct1 41 #define vp8_idct_idct1 vp8_short_idct4x4llm_1_c 42 #endif 43 extern prototype_idct(vp8_idct_idct1); 44 45 #ifndef vp8_idct_idct16 46 #define vp8_idct_idct16 vp8_short_idct4x4llm_c 47 #endif 48 extern prototype_idct(vp8_idct_idct16); 49 50 #ifndef vp8_idct_idct1_scalar_add 51 #define vp8_idct_idct1_scalar_add vp8_dc_only_idct_add_c 52 #endif 53 extern prototype_idct_scalar_add(vp8_idct_idct1_scalar_add); 54 55 56 #ifndef vp8_idct_iwalsh1 57 #define vp8_idct_iwalsh1 vp8_short_inv_walsh4x4_1_c 58 #endif 59 extern prototype_second_order(vp8_idct_iwalsh1); 60 61 #ifndef vp8_idct_iwalsh16 62 #define vp8_idct_iwalsh16 vp8_short_inv_walsh4x4_c 63 #endif 64 extern prototype_second_order(vp8_idct_iwalsh16); 65 66 typedef prototype_idct((*vp8_idct_fn_t)); 67 typedef prototype_idct_scalar_add((*vp8_idct_scalar_add_fn_t)); 68 typedef prototype_second_order((*vp8_second_order_fn_t)); 69 70 typedef struct 71 { 72 vp8_idct_fn_t idct1; 73 vp8_idct_fn_t idct16; 74 vp8_idct_scalar_add_fn_t idct1_scalar_add; 75 76 vp8_second_order_fn_t iwalsh1; 77 vp8_second_order_fn_t iwalsh16; 78 } vp8_idct_rtcd_vtable_t; 79 80 #if CONFIG_RUNTIME_CPU_DETECT 81 #define IDCT_INVOKE(ctx,fn) (ctx)->fn 82 #else 83 #define IDCT_INVOKE(ctx,fn) vp8_idct_##fn 84 #endif 85 86 #endif 87