• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef vp8_recon_copy16x16
40 #define vp8_recon_copy16x16 vp8_copy_mem16x16_c
41 #endif
42 extern prototype_copy_block(vp8_recon_copy16x16);
43 
44 #ifndef vp8_recon_copy8x8
45 #define vp8_recon_copy8x8 vp8_copy_mem8x8_c
46 #endif
47 extern prototype_copy_block(vp8_recon_copy8x8);
48 
49 #ifndef vp8_recon_copy8x4
50 #define vp8_recon_copy8x4 vp8_copy_mem8x4_c
51 #endif
52 extern prototype_copy_block(vp8_recon_copy8x4);
53 
54 #ifndef vp8_recon_recon
55 #define vp8_recon_recon vp8_recon_b_c
56 #endif
57 extern prototype_recon_block(vp8_recon_recon);
58 
59 #ifndef vp8_recon_recon2
60 #define vp8_recon_recon2 vp8_recon2b_c
61 #endif
62 extern prototype_recon_block(vp8_recon_recon2);
63 
64 #ifndef vp8_recon_recon4
65 #define vp8_recon_recon4 vp8_recon4b_c
66 #endif
67 extern prototype_recon_block(vp8_recon_recon4);
68 
69 #ifndef vp8_recon_recon_mb
70 #define vp8_recon_recon_mb vp8_recon_mb_c
71 #endif
72 extern prototype_recon_macroblock(vp8_recon_recon_mb);
73 
74 #ifndef vp8_recon_recon_mby
75 #define vp8_recon_recon_mby vp8_recon_mby_c
76 #endif
77 extern prototype_recon_macroblock(vp8_recon_recon_mby);
78 
79 #ifndef vp8_recon_build_intra_predictors_mby
80 #define vp8_recon_build_intra_predictors_mby vp8_build_intra_predictors_mby
81 #endif
82 extern prototype_build_intra_predictors\
83     (vp8_recon_build_intra_predictors_mby);
84 
85 #ifndef vp8_recon_build_intra_predictors_mby_s
86 #define vp8_recon_build_intra_predictors_mby_s vp8_build_intra_predictors_mby_s
87 #endif
88 extern prototype_build_intra_predictors\
89     (vp8_recon_build_intra_predictors_mby_s);
90 
91 
92 typedef prototype_copy_block((*vp8_copy_block_fn_t));
93 typedef prototype_recon_block((*vp8_recon_fn_t));
94 typedef prototype_recon_macroblock((*vp8_recon_mb_fn_t));
95 typedef prototype_build_intra_predictors((*vp8_build_intra_pred_fn_t));
96 typedef struct vp8_recon_rtcd_vtable
97 {
98     vp8_copy_block_fn_t  copy16x16;
99     vp8_copy_block_fn_t  copy8x8;
100     vp8_copy_block_fn_t  copy8x4;
101     vp8_recon_fn_t       recon;
102     vp8_recon_fn_t       recon2;
103     vp8_recon_fn_t       recon4;
104     vp8_recon_mb_fn_t    recon_mb;
105     vp8_recon_mb_fn_t    recon_mby;
106     vp8_build_intra_pred_fn_t  build_intra_predictors_mby_s;
107     vp8_build_intra_pred_fn_t  build_intra_predictors_mby;
108 } vp8_recon_rtcd_vtable_t;
109 
110 #if CONFIG_RUNTIME_CPU_DETECT
111 #define RECON_INVOKE(ctx,fn) (ctx)->fn
112 #else
113 #define RECON_INVOKE(ctx,fn) vp8_recon_##fn
114 #endif
115 
116 void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
117 #endif
118