Merge "vp8_rd_pick_best_mbsegmentation code restructure"
[libvpx.git] / vp8 / common / recon.h
blob1e6e343fcf1c20a98883f04bc57b41a25d36d879
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
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 */
12 #ifndef __INC_RECON_H
13 #define __INC_RECON_H
15 #include "blockd.h"
17 #define prototype_copy_block(sym) \
18 void sym(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch)
20 #define prototype_recon_block(sym) \
21 void sym(unsigned char *pred, short *diff, unsigned char *dst, int pitch)
23 #define prototype_recon_macroblock(sym) \
24 void sym(const struct vp8_recon_rtcd_vtable *rtcd, MACROBLOCKD *x)
26 struct vp8_recon_rtcd_vtable;
28 #if ARCH_X86 || ARCH_X86_64
29 #include "x86/recon_x86.h"
30 #endif
32 #if ARCH_ARM
33 #include "arm/recon_arm.h"
34 #endif
36 #ifndef vp8_recon_copy16x16
37 #define vp8_recon_copy16x16 vp8_copy_mem16x16_c
38 #endif
39 extern prototype_copy_block(vp8_recon_copy16x16);
41 #ifndef vp8_recon_copy8x8
42 #define vp8_recon_copy8x8 vp8_copy_mem8x8_c
43 #endif
44 extern prototype_copy_block(vp8_recon_copy8x8);
46 #ifndef vp8_recon_copy8x4
47 #define vp8_recon_copy8x4 vp8_copy_mem8x4_c
48 #endif
49 extern prototype_copy_block(vp8_recon_copy8x4);
51 #ifndef vp8_recon_recon
52 #define vp8_recon_recon vp8_recon_b_c
53 #endif
54 extern prototype_recon_block(vp8_recon_recon);
56 #ifndef vp8_recon_recon2
57 #define vp8_recon_recon2 vp8_recon2b_c
58 #endif
59 extern prototype_recon_block(vp8_recon_recon2);
61 #ifndef vp8_recon_recon4
62 #define vp8_recon_recon4 vp8_recon4b_c
63 #endif
64 extern prototype_recon_block(vp8_recon_recon4);
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);
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);
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
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;
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
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