Merge "Skip computation of distortion in vp8_pick_inter_mode if active_map is used"
[libvpx.git] / vp8 / common / recon.h
blob7cfc779cdf7230e8f2d82c9d7aed3402a9616f88
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 #define prototype_build_intra_predictors(sym) \
27 void sym(MACROBLOCKD *x)
29 #define prototype_intra4x4_predict(sym) \
30 void sym(BLOCKD *x, int b_mode, unsigned char *predictor)
32 struct vp8_recon_rtcd_vtable;
34 #if ARCH_X86 || ARCH_X86_64
35 #include "x86/recon_x86.h"
36 #endif
38 #if ARCH_ARM
39 #include "arm/recon_arm.h"
40 #endif
42 #ifndef vp8_recon_copy16x16
43 #define vp8_recon_copy16x16 vp8_copy_mem16x16_c
44 #endif
45 extern prototype_copy_block(vp8_recon_copy16x16);
47 #ifndef vp8_recon_copy8x8
48 #define vp8_recon_copy8x8 vp8_copy_mem8x8_c
49 #endif
50 extern prototype_copy_block(vp8_recon_copy8x8);
52 #ifndef vp8_recon_copy8x4
53 #define vp8_recon_copy8x4 vp8_copy_mem8x4_c
54 #endif
55 extern prototype_copy_block(vp8_recon_copy8x4);
57 #ifndef vp8_recon_recon
58 #define vp8_recon_recon vp8_recon_b_c
59 #endif
60 extern prototype_recon_block(vp8_recon_recon);
62 #ifndef vp8_recon_recon2
63 #define vp8_recon_recon2 vp8_recon2b_c
64 #endif
65 extern prototype_recon_block(vp8_recon_recon2);
67 #ifndef vp8_recon_recon4
68 #define vp8_recon_recon4 vp8_recon4b_c
69 #endif
70 extern prototype_recon_block(vp8_recon_recon4);
72 #ifndef vp8_recon_recon_mb
73 #define vp8_recon_recon_mb vp8_recon_mb_c
74 #endif
75 extern prototype_recon_macroblock(vp8_recon_recon_mb);
77 #ifndef vp8_recon_recon_mby
78 #define vp8_recon_recon_mby vp8_recon_mby_c
79 #endif
80 extern prototype_recon_macroblock(vp8_recon_recon_mby);
82 #ifndef vp8_recon_build_intra_predictors_mby
83 #define vp8_recon_build_intra_predictors_mby vp8_build_intra_predictors_mby
84 #endif
85 extern prototype_build_intra_predictors\
86 (vp8_recon_build_intra_predictors_mby);
88 #ifndef vp8_recon_build_intra_predictors_mby_s
89 #define vp8_recon_build_intra_predictors_mby_s vp8_build_intra_predictors_mby_s
90 #endif
91 extern prototype_build_intra_predictors\
92 (vp8_recon_build_intra_predictors_mby_s);
94 #ifndef vp8_recon_build_intra_predictors_mbuv
95 #define vp8_recon_build_intra_predictors_mbuv vp8_build_intra_predictors_mbuv
96 #endif
97 extern prototype_build_intra_predictors\
98 (vp8_recon_build_intra_predictors_mbuv);
100 #ifndef vp8_recon_build_intra_predictors_mbuv_s
101 #define vp8_recon_build_intra_predictors_mbuv_s vp8_build_intra_predictors_mbuv_s
102 #endif
103 extern prototype_build_intra_predictors\
104 (vp8_recon_build_intra_predictors_mbuv_s);
106 #ifndef vp8_recon_intra4x4_predict
107 #define vp8_recon_intra4x4_predict vp8_intra4x4_predict
108 #endif
109 extern prototype_intra4x4_predict\
110 (vp8_recon_intra4x4_predict);
113 typedef prototype_copy_block((*vp8_copy_block_fn_t));
114 typedef prototype_recon_block((*vp8_recon_fn_t));
115 typedef prototype_recon_macroblock((*vp8_recon_mb_fn_t));
116 typedef prototype_build_intra_predictors((*vp8_build_intra_pred_fn_t));
117 typedef prototype_intra4x4_predict((*vp8_intra4x4_pred_fn_t));
118 typedef struct vp8_recon_rtcd_vtable
120 vp8_copy_block_fn_t copy16x16;
121 vp8_copy_block_fn_t copy8x8;
122 vp8_copy_block_fn_t copy8x4;
123 vp8_recon_fn_t recon;
124 vp8_recon_fn_t recon2;
125 vp8_recon_fn_t recon4;
126 vp8_recon_mb_fn_t recon_mb;
127 vp8_recon_mb_fn_t recon_mby;
128 vp8_build_intra_pred_fn_t build_intra_predictors_mby_s;
129 vp8_build_intra_pred_fn_t build_intra_predictors_mby;
130 vp8_build_intra_pred_fn_t build_intra_predictors_mbuv_s;
131 vp8_build_intra_pred_fn_t build_intra_predictors_mbuv;
132 vp8_intra4x4_pred_fn_t intra4x4_predict;
133 } vp8_recon_rtcd_vtable_t;
135 #if CONFIG_RUNTIME_CPU_DETECT
136 #define RECON_INVOKE(ctx,fn) (ctx)->fn
137 #else
138 #define RECON_INVOKE(ctx,fn) vp8_recon_##fn
139 #endif
141 void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
142 #endif