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_RECON_H 13 #define __INC_RECON_H 14 15 #include "blockd.h" 16 17 #define prototype_copy_block(sym) \ 18 void sym(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch) 19 20 #define prototype_recon_block(sym) \ 21 void sym(unsigned char *pred, short *diff, unsigned char *dst, int pitch) 22 23 #define prototype_recon_macroblock(sym) \ 24 void sym(const struct vp8_recon_rtcd_vtable *rtcd, MACROBLOCKD *x) 25 26 #define prototype_build_intra_predictors(sym) \ 27 void sym(MACROBLOCKD *x) 28 29 struct vp8_recon_rtcd_vtable; 30 31 #if ARCH_X86 || ARCH_X86_64 32 #include "x86/recon_x86.h" 33 #endif 34 35 #if ARCH_ARM 36 #include "arm/recon_arm.h" 37 #endif 38 39 #if ARCH_MIPS 40 #if defined(MIPS_DSP_REV) && MIPS_DSP_REV>=1 41 #include "mips/recon_mips.h" 42 #endif 43 #endif 44 45 #ifndef vp8_recon_copy16x16 46 #define vp8_recon_copy16x16 vp8_copy_mem16x16_c 47 #endif 48 extern prototype_copy_block(vp8_recon_copy16x16); 49 50 #ifndef vp8_recon_copy8x8 51 #define vp8_recon_copy8x8 vp8_copy_mem8x8_c 52 #endif 53 extern prototype_copy_block(vp8_recon_copy8x8); 54 55 #ifndef vp8_recon_copy8x4 56 #define vp8_recon_copy8x4 vp8_copy_mem8x4_c 57 #endif 58 extern prototype_copy_block(vp8_recon_copy8x4); 59 60 #ifndef vp8_recon_recon 61 #define vp8_recon_recon vp8_recon_b_c 62 #endif 63 extern prototype_recon_block(vp8_recon_recon); 64 65 #ifndef vp8_recon_recon2 66 #define vp8_recon_recon2 vp8_recon2b_c 67 #endif 68 extern prototype_recon_block(vp8_recon_recon2); 69 70 #ifndef vp8_recon_recon4 71 #define vp8_recon_recon4 vp8_recon4b_c 72 #endif 73 extern prototype_recon_block(vp8_recon_recon4); 74 75 #ifndef vp8_recon_recon_mb 76 #define vp8_recon_recon_mb vp8_recon_mb_c 77 #endif 78 extern prototype_recon_macroblock(vp8_recon_recon_mb); 79 80 #ifndef vp8_recon_recon_mby 81 #define vp8_recon_recon_mby vp8_recon_mby_c 82 #endif 83 extern prototype_recon_macroblock(vp8_recon_recon_mby); 84 85 #ifndef vp8_recon_build_intra_predictors_mby 86 #define vp8_recon_build_intra_predictors_mby vp8_build_intra_predictors_mby 87 #endif 88 extern prototype_build_intra_predictors\ 89 (vp8_recon_build_intra_predictors_mby); 90 91 #ifndef vp8_recon_build_intra_predictors_mby_s 92 #define vp8_recon_build_intra_predictors_mby_s vp8_build_intra_predictors_mby_s 93 #endif 94 extern prototype_build_intra_predictors\ 95 (vp8_recon_build_intra_predictors_mby_s); 96 97 98 typedef prototype_copy_block((*vp8_copy_block_fn_t)); 99 typedef prototype_recon_block((*vp8_recon_fn_t)); 100 typedef prototype_recon_macroblock((*vp8_recon_mb_fn_t)); 101 typedef prototype_build_intra_predictors((*vp8_build_intra_pred_fn_t)); 102 typedef struct vp8_recon_rtcd_vtable 103 { 104 vp8_copy_block_fn_t copy16x16; 105 vp8_copy_block_fn_t copy8x8; 106 vp8_copy_block_fn_t copy8x4; 107 vp8_recon_fn_t recon; 108 vp8_recon_fn_t recon2; 109 vp8_recon_fn_t recon4; 110 vp8_recon_mb_fn_t recon_mb; 111 vp8_recon_mb_fn_t recon_mby; 112 vp8_build_intra_pred_fn_t build_intra_predictors_mby_s; 113 vp8_build_intra_pred_fn_t build_intra_predictors_mby; 114 } vp8_recon_rtcd_vtable_t; 115 116 #if CONFIG_RUNTIME_CPU_DETECT 117 #define RECON_INVOKE(ctx,fn) (ctx)->fn 118 #else 119 #define RECON_INVOKE(ctx,fn) vp8_recon_##fn 120 #endif 121 122 void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x); 123 #endif 124