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.
15 #define prototype_second_order(sym) \
16 void sym(short *input, short *output)
18 #define prototype_idct(sym) \
19 void sym(short *input, short *output, int pitch)
21 #define prototype_idct_scalar_add(sym) \
22 void sym(short input, \
23 unsigned char *pred, unsigned char *output, \
24 int pitch, int stride)
26 #if ARCH_X86 || ARCH_X86_64
27 #include "x86/idct_x86.h"
31 #include "arm/idct_arm.h"
34 #ifndef vp8_idct_idct1
35 #define vp8_idct_idct1 vp8_short_idct4x4llm_1_c
37 extern prototype_idct(vp8_idct_idct1
);
39 #ifndef vp8_idct_idct16
40 #define vp8_idct_idct16 vp8_short_idct4x4llm_c
42 extern prototype_idct(vp8_idct_idct16
);
44 #ifndef vp8_idct_idct1_scalar_add
45 #define vp8_idct_idct1_scalar_add vp8_dc_only_idct_add_c
47 extern prototype_idct_scalar_add(vp8_idct_idct1_scalar_add
);
50 #ifndef vp8_idct_iwalsh1
51 #define vp8_idct_iwalsh1 vp8_short_inv_walsh4x4_1_c
53 extern prototype_second_order(vp8_idct_iwalsh1
);
55 #ifndef vp8_idct_iwalsh16
56 #define vp8_idct_iwalsh16 vp8_short_inv_walsh4x4_c
58 extern prototype_second_order(vp8_idct_iwalsh16
);
60 typedef prototype_idct((*vp8_idct_fn_t
));
61 typedef prototype_idct_scalar_add((*vp8_idct_scalar_add_fn_t
));
62 typedef prototype_second_order((*vp8_second_order_fn_t
));
68 vp8_idct_scalar_add_fn_t idct1_scalar_add
;
70 vp8_second_order_fn_t iwalsh1
;
71 vp8_second_order_fn_t iwalsh16
;
72 } vp8_idct_rtcd_vtable_t
;
74 #if CONFIG_RUNTIME_CPU_DETECT
75 #define IDCT_INVOKE(ctx,fn) (ctx)->fn
77 #define IDCT_INVOKE(ctx,fn) vp8_idct_##fn