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.
14 #include "vp8/common/blockd.h"
16 #define prototype_dequant_block(sym) \
19 #define prototype_dequant_idct_add(sym) \
20 void sym(short *input, short *dq, \
21 unsigned char *pred, unsigned char *output, \
22 int pitch, int stride)
24 #define prototype_dequant_dc_idct_add(sym) \
25 void sym(short *input, short *dq, \
26 unsigned char *pred, unsigned char *output, \
27 int pitch, int stride, \
30 #define prototype_dequant_dc_idct_add_y_block(sym) \
31 void sym(short *q, short *dq, \
32 unsigned char *pre, unsigned char *dst, \
33 int stride, char *eobs, short *dc)
35 #define prototype_dequant_idct_add_y_block(sym) \
36 void sym(short *q, short *dq, \
37 unsigned char *pre, unsigned char *dst, \
38 int stride, char *eobs)
40 #define prototype_dequant_idct_add_uv_block(sym) \
41 void sym(short *q, short *dq, \
42 unsigned char *pre, unsigned char *dst_u, \
43 unsigned char *dst_v, int stride, char *eobs)
45 #if ARCH_X86 || ARCH_X86_64
46 #include "x86/dequantize_x86.h"
50 #include "arm/dequantize_arm.h"
53 #ifndef vp8_dequant_block
54 #define vp8_dequant_block vp8_dequantize_b_c
56 extern prototype_dequant_block(vp8_dequant_block
);
58 #ifndef vp8_dequant_idct_add
59 #define vp8_dequant_idct_add vp8_dequant_idct_add_c
61 extern prototype_dequant_idct_add(vp8_dequant_idct_add
);
63 #ifndef vp8_dequant_dc_idct_add
64 #define vp8_dequant_dc_idct_add vp8_dequant_dc_idct_add_c
66 extern prototype_dequant_dc_idct_add(vp8_dequant_dc_idct_add
);
68 #ifndef vp8_dequant_dc_idct_add_y_block
69 #define vp8_dequant_dc_idct_add_y_block vp8_dequant_dc_idct_add_y_block_c
71 extern prototype_dequant_dc_idct_add_y_block(vp8_dequant_dc_idct_add_y_block
);
73 #ifndef vp8_dequant_idct_add_y_block
74 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c
76 extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block
);
78 #ifndef vp8_dequant_idct_add_uv_block
79 #define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_c
81 extern prototype_dequant_idct_add_uv_block(vp8_dequant_idct_add_uv_block
);
84 typedef prototype_dequant_block((*vp8_dequant_block_fn_t
));
86 typedef prototype_dequant_idct_add((*vp8_dequant_idct_add_fn_t
));
88 typedef prototype_dequant_dc_idct_add((*vp8_dequant_dc_idct_add_fn_t
));
90 typedef prototype_dequant_dc_idct_add_y_block((*vp8_dequant_dc_idct_add_y_block_fn_t
));
92 typedef prototype_dequant_idct_add_y_block((*vp8_dequant_idct_add_y_block_fn_t
));
94 typedef prototype_dequant_idct_add_uv_block((*vp8_dequant_idct_add_uv_block_fn_t
));
98 vp8_dequant_block_fn_t block
;
99 vp8_dequant_idct_add_fn_t idct_add
;
100 vp8_dequant_dc_idct_add_fn_t dc_idct_add
;
101 vp8_dequant_dc_idct_add_y_block_fn_t dc_idct_add_y_block
;
102 vp8_dequant_idct_add_y_block_fn_t idct_add_y_block
;
103 vp8_dequant_idct_add_uv_block_fn_t idct_add_uv_block
;
104 } vp8_dequant_rtcd_vtable_t
;
106 #if CONFIG_RUNTIME_CPU_DETECT
107 #define DEQUANT_INVOKE(ctx,fn) (ctx)->fn
109 #define DEQUANT_INVOKE(ctx,fn) vp8_dequant_##fn