Merge "configure: detect toolchain if not specified"
[profile/ivi/libvpx.git] / vp8 / encoder / dct.h
1 /*
2  *  Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
3  *
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  */
9
10
11 #ifndef __INC_DCT_H
12 #define __INC_DCT_H
13
14 #define prototype_fdct(sym) void (sym)(short *input, short *output, int pitch)
15
16 #if ARCH_X86 || ARCH_X86_64
17 #include "x86/dct_x86.h"
18 #endif
19
20 #if ARCH_ARM
21 #include "arm/dct_arm.h"
22 #endif
23
24 #ifndef vp8_fdct_short4x4
25 #define vp8_fdct_short4x4  vp8_short_fdct4x4_c
26 #endif
27 extern prototype_fdct(vp8_fdct_short4x4);
28
29 #ifndef vp8_fdct_short8x4
30 #define vp8_fdct_short8x4  vp8_short_fdct8x4_c
31 #endif
32 extern prototype_fdct(vp8_fdct_short8x4);
33
34 #ifndef vp8_fdct_fast4x4
35 #define vp8_fdct_fast4x4  vp8_fast_fdct4x4_c
36 #endif
37 extern prototype_fdct(vp8_fdct_fast4x4);
38
39 #ifndef vp8_fdct_fast8x4
40 #define vp8_fdct_fast8x4  vp8_fast_fdct8x4_c
41 #endif
42 extern prototype_fdct(vp8_fdct_fast8x4);
43
44 #ifndef vp8_fdct_walsh_short4x4
45 #define vp8_fdct_walsh_short4x4  vp8_short_walsh4x4_c
46 #endif
47 extern prototype_fdct(vp8_fdct_walsh_short4x4);
48
49 typedef prototype_fdct(*vp8_fdct_fn_t);
50 typedef struct
51 {
52     vp8_fdct_fn_t    short4x4;
53     vp8_fdct_fn_t    short8x4;
54     vp8_fdct_fn_t    fast4x4;
55     vp8_fdct_fn_t    fast8x4;
56     vp8_fdct_fn_t    walsh_short4x4;
57 } vp8_fdct_rtcd_vtable_t;
58
59 #if CONFIG_RUNTIME_CPU_DETECT
60 #define FDCT_INVOKE(ctx,fn) (ctx)->fn
61 #else
62 #define FDCT_INVOKE(ctx,fn) vp8_fdct_##fn
63 #endif
64
65 #endif