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 struct vp8_recon_rtcd_vtable; 27 28 #if ARCH_X86 || ARCH_X86_64 29 #include "x86/recon_x86.h" 30 #endif 31 32 #if ARCH_ARM 33 #include "arm/recon_arm.h" 34 #endif 35 36 #ifndef vp8_recon_copy16x16 37 #define vp8_recon_copy16x16 vp8_copy_mem16x16_c 38 #endif 39 extern prototype_copy_block(vp8_recon_copy16x16); 40 41 #ifndef vp8_recon_copy8x8 42 #define vp8_recon_copy8x8 vp8_copy_mem8x8_c 43 #endif 44 extern prototype_copy_block(vp8_recon_copy8x8); 45 46 #ifndef vp8_recon_copy8x4 47 #define vp8_recon_copy8x4 vp8_copy_mem8x4_c 48 #endif 49 extern prototype_copy_block(vp8_recon_copy8x4); 50 51 #ifndef vp8_recon_recon 52 #define vp8_recon_recon vp8_recon_b_c 53 #endif 54 extern prototype_recon_block(vp8_recon_recon); 55 56 #ifndef vp8_recon_recon2 57 #define vp8_recon_recon2 vp8_recon2b_c 58 #endif 59 extern prototype_recon_block(vp8_recon_recon2); 60 61 #ifndef vp8_recon_recon4 62 #define vp8_recon_recon4 vp8_recon4b_c 63 #endif 64 extern prototype_recon_block(vp8_recon_recon4); 65 66 #ifndef vp8_recon_recon_mb 67 #define vp8_recon_recon_mb vp8_recon_mb_c 68 #endif 69 extern prototype_recon_macroblock(vp8_recon_recon_mb); 70 71 #ifndef vp8_recon_recon_mby 72 #define vp8_recon_recon_mby vp8_recon_mby_c 73 #endif 74 extern prototype_recon_macroblock(vp8_recon_recon_mby); 75 76 typedef prototype_copy_block((*vp8_copy_block_fn_t)); 77 typedef prototype_recon_block((*vp8_recon_fn_t)); 78 typedef prototype_recon_macroblock((*vp8_recon_mb_fn_t)); 79 typedef struct vp8_recon_rtcd_vtable 80 { 81 vp8_copy_block_fn_t copy16x16; 82 vp8_copy_block_fn_t copy8x8; 83 vp8_copy_block_fn_t copy8x4; 84 vp8_recon_fn_t recon; 85 vp8_recon_fn_t recon2; 86 vp8_recon_fn_t recon4; 87 vp8_recon_mb_fn_t recon_mb; 88 vp8_recon_mb_fn_t recon_mby; 89 } vp8_recon_rtcd_vtable_t; 90 91 #if CONFIG_RUNTIME_CPU_DETECT 92 #define RECON_INVOKE(ctx,fn) (ctx)->fn 93 #else 94 #define RECON_INVOKE(ctx,fn) vp8_recon_##fn 95 #endif 96 97 void vp8_recon_intra4x4mb(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x); 98 void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x); 99 #endif 100