Initial WebM release
[libvpx.git] / vp8 / common / recon.h
blobf65a90f7e090e2c7562549061ee451a11b95fde3
1 /*
2 * Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license and patent
5 * grant that can be found in the LICENSE file in the root of the source
6 * tree. All contributing project authors may be found in the AUTHORS
7 * file in the root of the source tree.
8 */
11 #ifndef __INC_RECON_H
12 #define __INC_RECON_H
14 #define prototype_copy_block(sym) \
15 void sym(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch)
17 #define prototype_recon_block(sym) \
18 void sym(unsigned char *pred, short *diff, unsigned char *dst, int pitch);
20 #if ARCH_X86 || ARCH_X86_64
21 #include "x86/recon_x86.h"
22 #endif
24 #if ARCH_ARM
25 #include "arm/recon_arm.h"
26 #endif
28 #ifndef vp8_recon_copy16x16
29 #define vp8_recon_copy16x16 vp8_copy_mem16x16_c
30 #endif
31 extern prototype_copy_block(vp8_recon_copy16x16);
33 #ifndef vp8_recon_copy8x8
34 #define vp8_recon_copy8x8 vp8_copy_mem8x8_c
35 #endif
36 extern prototype_copy_block(vp8_recon_copy8x8);
38 #ifndef vp8_recon_copy8x4
39 #define vp8_recon_copy8x4 vp8_copy_mem8x4_c
40 #endif
41 extern prototype_copy_block(vp8_recon_copy8x4);
43 #ifndef vp8_recon_recon
44 #define vp8_recon_recon vp8_recon_b_c
45 #endif
46 extern prototype_recon_block(vp8_recon_recon);
48 #ifndef vp8_recon_recon2
49 #define vp8_recon_recon2 vp8_recon2b_c
50 #endif
51 extern prototype_recon_block(vp8_recon_recon2);
53 #ifndef vp8_recon_recon4
54 #define vp8_recon_recon4 vp8_recon4b_c
55 #endif
56 extern prototype_recon_block(vp8_recon_recon4);
58 typedef prototype_copy_block((*vp8_copy_block_fn_t));
59 typedef prototype_recon_block((*vp8_recon_fn_t));
60 typedef struct
62 vp8_copy_block_fn_t copy16x16;
63 vp8_copy_block_fn_t copy8x8;
64 vp8_copy_block_fn_t copy8x4;
65 vp8_recon_fn_t recon;
66 vp8_recon_fn_t recon2;
67 vp8_recon_fn_t recon4;
68 } vp8_recon_rtcd_vtable_t;
70 #if CONFIG_RUNTIME_CPU_DETECT
71 #define RECON_INVOKE(ctx,fn) (ctx)->fn
72 #else
73 #define RECON_INVOKE(ctx,fn) vp8_recon_##fn
74 #endif
76 #include "blockd.h"
77 void vp8_recon16x16mby(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
78 void vp8_recon16x16mb(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
79 void vp8_recon_intra4x4mb(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
80 void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
81 #endif