clarify *_offsets.asm differences
[libvpx.git] / vp8 / encoder / encodemb.h
blob08f75c3b124353c676753c01b15ab429ca68ce3a
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_ENCODEMB_H
13 #define __INC_ENCODEMB_H
15 #include "vpx_ports/config.h"
16 #include "block.h"
18 #define prototype_mberr(sym) \
19 int (sym)(MACROBLOCK *mb, int dc)
21 #define prototype_berr(sym) \
22 int (sym)(short *coeff, short *dqcoeff)
24 #define prototype_mbuverr(sym) \
25 int (sym)(MACROBLOCK *mb)
27 #define prototype_subb(sym) \
28 void (sym)(BLOCK *be,BLOCKD *bd, int pitch)
30 #define prototype_submby(sym) \
31 void (sym)(short *diff, unsigned char *src, unsigned char *pred, int stride)
33 #define prototype_submbuv(sym) \
34 void (sym)(short *diff, unsigned char *usrc, unsigned char *vsrc,\
35 unsigned char *pred, int stride)
37 #if ARCH_X86 || ARCH_X86_64
38 #include "x86/encodemb_x86.h"
39 #endif
41 #if ARCH_ARM
42 #include "arm/encodemb_arm.h"
43 #endif
45 #ifndef vp8_encodemb_berr
46 #define vp8_encodemb_berr vp8_block_error_c
47 #endif
48 extern prototype_berr(vp8_encodemb_berr);
50 #ifndef vp8_encodemb_mberr
51 #define vp8_encodemb_mberr vp8_mbblock_error_c
52 #endif
53 extern prototype_mberr(vp8_encodemb_mberr);
55 #ifndef vp8_encodemb_mbuverr
56 #define vp8_encodemb_mbuverr vp8_mbuverror_c
57 #endif
58 extern prototype_mbuverr(vp8_encodemb_mbuverr);
60 #ifndef vp8_encodemb_subb
61 #define vp8_encodemb_subb vp8_subtract_b_c
62 #endif
63 extern prototype_subb(vp8_encodemb_subb);
65 #ifndef vp8_encodemb_submby
66 #define vp8_encodemb_submby vp8_subtract_mby_c
67 #endif
68 extern prototype_submby(vp8_encodemb_submby);
70 #ifndef vp8_encodemb_submbuv
71 #define vp8_encodemb_submbuv vp8_subtract_mbuv_c
72 #endif
73 extern prototype_submbuv(vp8_encodemb_submbuv);
76 typedef struct
78 prototype_berr(*berr);
79 prototype_mberr(*mberr);
80 prototype_mbuverr(*mbuverr);
81 prototype_subb(*subb);
82 prototype_submby(*submby);
83 prototype_submbuv(*submbuv);
84 } vp8_encodemb_rtcd_vtable_t;
86 #if CONFIG_RUNTIME_CPU_DETECT
87 #define ENCODEMB_INVOKE(ctx,fn) (ctx)->fn
88 #else
89 #define ENCODEMB_INVOKE(ctx,fn) vp8_encodemb_##fn
90 #endif
94 #include "onyx_int.h"
95 struct VP8_ENCODER_RTCD;
96 void vp8_encode_inter16x16(const struct VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x);
98 extern void vp8_stuff_inter16x16(MACROBLOCK *x);
100 void vp8_build_dcblock(MACROBLOCK *b);
101 void vp8_transform_mb(MACROBLOCK *mb);
102 void vp8_transform_mbuv(MACROBLOCK *x);
103 void vp8_transform_intra_mby(MACROBLOCK *x);
104 void Encode16x16Y(MACROBLOCK *x);
105 void Encode16x16UV(MACROBLOCK *x);
106 void vp8_encode_inter16x16uv(const struct VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x);
107 void vp8_encode_inter16x16uvrd(const struct VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x);
108 void vp8_optimize_mby(MACROBLOCK *x, const struct VP8_ENCODER_RTCD *rtcd);
109 void vp8_optimize_mbuv(MACROBLOCK *x, const struct VP8_ENCODER_RTCD *rtcd);
110 void vp8_encode_inter16x16y(const struct VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x);
111 #endif