vp9_rtcd_defs.sh 30.4 KB
Newer Older
1
vp9_common_forward_decls() {
2
cat <<EOF
3 4 5
/*
 * VP9
 */
6

7 8
#include "vpx/vpx_integer.h"

Jim Bankoski's avatar
Jim Bankoski committed
9 10 11
struct loop_filter_info;
struct blockd;
struct macroblockd;
12 13
struct loop_filter_info;

Jim Bankoski's avatar
Jim Bankoski committed
14 15 16
/* Encoder forward decls */
struct block;
struct macroblock;
17
struct vp9_variance_vtable;
Jim Bankoski's avatar
Jim Bankoski committed
18

Jim Bankoski's avatar
Jim Bankoski committed
19
#define DEC_MVCOSTS int *mvjcost, int *mvcost[2]
20 21
union int_mv;
struct yv12_buffer_config;
22 23
EOF
}
24
forward_decls vp9_common_forward_decls
25

Scott LaVarnway's avatar
Scott LaVarnway committed
26 27 28
#
# Dequant
#
29
prototype void vp9_dequant_idct_add_y_block_8x8 "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int stride, struct macroblockd *xd"
30
specialize vp9_dequant_idct_add_y_block_8x8
Scott LaVarnway's avatar
Scott LaVarnway committed
31

32
prototype void vp9_dequant_idct_add_uv_block_8x8 "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dstu, uint8_t *dstv, int stride, struct macroblockd *xd"
33
specialize vp9_dequant_idct_add_uv_block_8x8
Scott LaVarnway's avatar
Scott LaVarnway committed
34

35
prototype void vp9_dequant_idct_add_16x16 "int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride, int eob"
36
specialize vp9_dequant_idct_add_16x16
Scott LaVarnway's avatar
Scott LaVarnway committed
37

38
prototype void vp9_dequant_idct_add_8x8 "int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride, int eob"
39 40
specialize vp9_dequant_idct_add_8x8

41
prototype void vp9_dequant_idct_add "int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride, int eob"
42
specialize vp9_dequant_idct_add
Scott LaVarnway's avatar
Scott LaVarnway committed
43

44
prototype void vp9_dequant_idct_add_y_block "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int stride, struct macroblockd *xd"
45
specialize vp9_dequant_idct_add_y_block
Scott LaVarnway's avatar
Scott LaVarnway committed
46

47
prototype void vp9_dequant_idct_add_uv_block "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dstu, uint8_t *dstv, int stride, struct macroblockd *xd"
48
specialize vp9_dequant_idct_add_uv_block
Jim Bankoski's avatar
Jim Bankoski committed
49

50 51 52
prototype void vp9_dequant_idct_add_32x32 "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int pitch, int stride, int eob"
specialize vp9_dequant_idct_add_32x32

53
prototype void vp9_dequant_idct_add_uv_block_16x16 "int16_t *q, const int16_t *dq, uint8_t *dstu, uint8_t *dstv, int stride, struct macroblockd *xd"
54 55
specialize vp9_dequant_idct_add_uv_block_16x16

Jim Bankoski's avatar
Jim Bankoski committed
56 57 58
#
# RECON
#
59
prototype void vp9_copy_mem16x16 "const uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
Johann's avatar
Johann committed
60
specialize vp9_copy_mem16x16 mmx sse2 dspr2
61
vp9_copy_mem16x16_dspr2=vp9_copy_mem16x16_dspr2
62

63
prototype void vp9_copy_mem8x8 "const uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
Johann's avatar
Johann committed
64
specialize vp9_copy_mem8x8 mmx dspr2
65
vp9_copy_mem8x8_dspr2=vp9_copy_mem8x8_dspr2
66

67
prototype void vp9_copy_mem8x4 "const uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
68
specialize vp9_copy_mem8x4 mmx
69

70
prototype void vp9_recon_b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
71
specialize vp9_recon_b
72

73
prototype void vp9_recon_uv_b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
74
specialize vp9_recon_uv_b
75

76
prototype void vp9_recon2b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
77
specialize vp9_recon2b sse2
78

79
prototype void vp9_recon4b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
80
specialize vp9_recon4b sse2
81

82 83
prototype void vp9_recon_mb "struct macroblockd *x"
specialize vp9_recon_mb
84

85 86
prototype void vp9_recon_mby "struct macroblockd *x"
specialize vp9_recon_mby
87

88
prototype void vp9_recon_mby_s "struct macroblockd *x, uint8_t *dst"
Jim Bankoski's avatar
Jim Bankoski committed
89 90
specialize vp9_recon_mby_s

91
prototype void vp9_recon_mbuv_s "struct macroblockd *x, uint8_t *udst, uint8_t *vdst"
Jim Bankoski's avatar
Jim Bankoski committed
92 93
specialize void vp9_recon_mbuv_s

94 95 96 97 98 99
prototype void vp9_recon_sby_s "struct macroblockd *x, uint8_t *dst"
specialize vp9_recon_sby_s

prototype void vp9_recon_sbuv_s "struct macroblockd *x, uint8_t *udst, uint8_t *vdst"
specialize void vp9_recon_sbuv_s

100 101 102 103 104 105
prototype void vp9_recon_sb64y_s "struct macroblockd *x, uint8_t *dst"
specialize vp9_recon_sb64y_s

prototype void vp9_recon_sb64uv_s "struct macroblockd *x, uint8_t *udst, uint8_t *vdst"
specialize void vp9_recon_sb64uv_s

106 107
prototype void vp9_build_intra_predictors_mby_s "struct macroblockd *x"
specialize vp9_build_intra_predictors_mby_s
108

109 110
prototype void vp9_build_intra_predictors_sby_s "struct macroblockd *x"
specialize vp9_build_intra_predictors_sby_s;
111

112 113
prototype void vp9_build_intra_predictors_sbuv_s "struct macroblockd *x"
specialize vp9_build_intra_predictors_sbuv_s;
114

115 116
prototype void vp9_build_intra_predictors_mby "struct macroblockd *x"
specialize vp9_build_intra_predictors_mby;
117

118 119
prototype void vp9_build_intra_predictors_mby_s "struct macroblockd *x"
specialize vp9_build_intra_predictors_mby_s;
120

121 122
prototype void vp9_build_intra_predictors_mbuv "struct macroblockd *x"
specialize vp9_build_intra_predictors_mbuv;
123

124 125
prototype void vp9_build_intra_predictors_mbuv_s "struct macroblockd *x"
specialize vp9_build_intra_predictors_mbuv_s;
126

127 128 129 130 131 132
prototype void vp9_build_intra_predictors_sb64y_s "struct macroblockd *x"
specialize vp9_build_intra_predictors_sb64y_s;

prototype void vp9_build_intra_predictors_sb64uv_s "struct macroblockd *x"
specialize vp9_build_intra_predictors_sb64uv_s;

133
prototype void vp9_intra4x4_predict "struct macroblockd *xd, struct blockd *x, int b_mode, uint8_t *predictor"
134
specialize vp9_intra4x4_predict;
135

136
prototype void vp9_intra8x8_predict "struct macroblockd *xd, struct blockd *x, int b_mode, uint8_t *predictor"
137
specialize vp9_intra8x8_predict;
138

139
prototype void vp9_intra_uv4x4_predict "struct macroblockd *xd, struct blockd *x, int b_mode, uint8_t *predictor"
140
specialize vp9_intra_uv4x4_predict;
141

Yunqing Wang's avatar
Yunqing Wang committed
142 143 144 145 146 147 148 149 150 151 152 153
if [ "$CONFIG_VP9_DECODER" = "yes" ]; then
prototype void vp9_add_residual_4x4 "const int16_t *diff, const uint8_t *pred, int pitch, uint8_t *dest, int stride"
specialize vp9_add_residual_4x4 sse2

prototype void vp9_add_residual_8x8 "const int16_t *diff, const uint8_t *pred, int pitch, uint8_t *dest, int stride"
specialize vp9_add_residual_8x8 sse2

prototype void vp9_add_residual_16x16 "const int16_t *diff, const uint8_t *pred, int pitch, uint8_t *dest, int stride"
specialize vp9_add_residual_16x16 sse2

prototype void vp9_add_residual_32x32 "const int16_t *diff, const uint8_t *pred, int pitch, uint8_t *dest, int stride"
specialize vp9_add_residual_32x32 sse2
154 155 156 157 158 159 160 161 162

prototype void vp9_add_constant_residual_8x8 "const int16_t diff, const uint8_t *pred, int pitch, uint8_t *dest, int stride"
specialize vp9_add_constant_residual_8x8 sse2

prototype void vp9_add_constant_residual_16x16 "const int16_t diff, const uint8_t *pred, int pitch, uint8_t *dest, int stride"
specialize vp9_add_constant_residual_16x16 sse2

prototype void vp9_add_constant_residual_32x32 "const int16_t diff, const uint8_t *pred, int pitch, uint8_t *dest, int stride"
specialize vp9_add_constant_residual_32x32 sse2
Yunqing Wang's avatar
Yunqing Wang committed
163 164
fi

165 166 167
#
# Loopfilter
#
168
prototype void vp9_loop_filter_mbv "uint8_t *y, uint8_t *u, uint8_t *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
169
specialize vp9_loop_filter_mbv sse2
170

171
prototype void vp9_loop_filter_bv "uint8_t *y, uint8_t *u, uint8_t *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
172
specialize vp9_loop_filter_bv sse2
173

174
prototype void vp9_loop_filter_bv8x8 "uint8_t *y, uint8_t *u, uint8_t *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
175
specialize vp9_loop_filter_bv8x8 sse2
176

177
prototype void vp9_loop_filter_mbh "uint8_t *y, uint8_t *u, uint8_t *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
178
specialize vp9_loop_filter_mbh sse2
179

180
prototype void vp9_loop_filter_bh "uint8_t *y, uint8_t *u, uint8_t *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
181
specialize vp9_loop_filter_bh sse2
182

183
prototype void vp9_loop_filter_bh8x8 "uint8_t *y, uint8_t *u, uint8_t *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
184
specialize vp9_loop_filter_bh8x8 sse2
185

186
prototype void vp9_loop_filter_simple_mbv "uint8_t *y, int ystride, const uint8_t *blimit"
Johann's avatar
Johann committed
187
specialize vp9_loop_filter_simple_mbv mmx sse2
188 189 190 191
vp9_loop_filter_simple_mbv_c=vp9_loop_filter_simple_vertical_edge_c
vp9_loop_filter_simple_mbv_mmx=vp9_loop_filter_simple_vertical_edge_mmx
vp9_loop_filter_simple_mbv_sse2=vp9_loop_filter_simple_vertical_edge_sse2

192
prototype void vp9_loop_filter_simple_mbh "uint8_t *y, int ystride, const uint8_t *blimit"
Johann's avatar
Johann committed
193
specialize vp9_loop_filter_simple_mbh mmx sse2
194 195 196 197
vp9_loop_filter_simple_mbh_c=vp9_loop_filter_simple_horizontal_edge_c
vp9_loop_filter_simple_mbh_mmx=vp9_loop_filter_simple_horizontal_edge_mmx
vp9_loop_filter_simple_mbh_sse2=vp9_loop_filter_simple_horizontal_edge_sse2

198
prototype void vp9_loop_filter_simple_bv "uint8_t *y, int ystride, const uint8_t *blimit"
Johann's avatar
Johann committed
199
specialize vp9_loop_filter_simple_bv mmx sse2
200 201 202 203
vp9_loop_filter_simple_bv_c=vp9_loop_filter_bvs_c
vp9_loop_filter_simple_bv_mmx=vp9_loop_filter_bvs_mmx
vp9_loop_filter_simple_bv_sse2=vp9_loop_filter_bvs_sse2

204
prototype void vp9_loop_filter_simple_bh "uint8_t *y, int ystride, const uint8_t *blimit"
Johann's avatar
Johann committed
205
specialize vp9_loop_filter_simple_bh mmx sse2
206 207 208
vp9_loop_filter_simple_bh_c=vp9_loop_filter_bhs_c
vp9_loop_filter_simple_bh_mmx=vp9_loop_filter_bhs_mmx
vp9_loop_filter_simple_bh_sse2=vp9_loop_filter_bhs_sse2
209

Jim Bankoski's avatar
Jim Bankoski committed
210
prototype void vp9_lpf_mbh_w "unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr, int y_stride, int uv_stride, struct loop_filter_info *lfi"
211
specialize vp9_lpf_mbh_w sse2
Jim Bankoski's avatar
Jim Bankoski committed
212 213

prototype void vp9_lpf_mbv_w "unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr, int y_stride, int uv_stride, struct loop_filter_info *lfi"
214 215
specialize vp9_lpf_mbv_w sse2

Jim Bankoski's avatar
Jim Bankoski committed
216 217 218
#
# post proc
#
219
if [ "$CONFIG_POSTPROC" = "yes" ]; then
220
prototype void vp9_mbpost_proc_down "uint8_t *dst, int pitch, int rows, int cols, int flimit"
Jim Bankoski's avatar
Jim Bankoski committed
221 222 223
specialize vp9_mbpost_proc_down mmx sse2
vp9_mbpost_proc_down_sse2=vp9_mbpost_proc_down_xmm

224
prototype void vp9_mbpost_proc_across_ip "uint8_t *src, int pitch, int rows, int cols, int flimit"
Jim Bankoski's avatar
Jim Bankoski committed
225 226 227
specialize vp9_mbpost_proc_across_ip sse2
vp9_mbpost_proc_across_ip_sse2=vp9_mbpost_proc_across_ip_xmm

228
prototype void vp9_post_proc_down_and_across "uint8_t *src_ptr, uint8_t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit"
Jim Bankoski's avatar
Jim Bankoski committed
229 230 231
specialize vp9_post_proc_down_and_across mmx sse2
vp9_post_proc_down_and_across_sse2=vp9_post_proc_down_and_across_xmm

232
prototype void vp9_plane_add_noise "uint8_t *Start, char *noise, char blackclamp[16], char whiteclamp[16], char bothclamp[16], unsigned int Width, unsigned int Height, int Pitch"
Jim Bankoski's avatar
Jim Bankoski committed
233 234
specialize vp9_plane_add_noise mmx sse2
vp9_plane_add_noise_sse2=vp9_plane_add_noise_wmt
235
fi
Jim Bankoski's avatar
Jim Bankoski committed
236

237
prototype void vp9_blend_mb_inner "uint8_t *y, uint8_t *u, uint8_t *v, int y1, int u1, int v1, int alpha, int stride"
Jim Bankoski's avatar
Jim Bankoski committed
238 239
specialize vp9_blend_mb_inner

240
prototype void vp9_blend_mb_outer "uint8_t *y, uint8_t *u, uint8_t *v, int y1, int u1, int v1, int alpha, int stride"
Jim Bankoski's avatar
Jim Bankoski committed
241 242
specialize vp9_blend_mb_outer

243
prototype void vp9_blend_b "uint8_t *y, uint8_t *u, uint8_t *v, int y1, int u1, int v1, int alpha, int stride"
Jim Bankoski's avatar
Jim Bankoski committed
244 245
specialize vp9_blend_b

246 247 248
#
# sad 16x3, 3x16
#
249
prototype unsigned int vp9_sad16x3 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int ref_stride"
250
specialize vp9_sad16x3 sse2
251

252
prototype unsigned int vp9_sad3x16 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int ref_stride"
253
specialize vp9_sad3x16 sse2
254

Yaowu Xu's avatar
Yaowu Xu committed
255
prototype unsigned int vp9_sub_pixel_variance16x2 "const uint8_t *src_ptr, const int source_stride, const int xoffset, const int  yoffset, const uint8_t *ref_ptr, const int ref_stride, unsigned int *sse"
256 257
specialize vp9_sub_pixel_variance16x2 sse2

258 259 260
#
# Sub Pixel Filters
#
John Koleszar's avatar
John Koleszar committed
261
prototype void vp9_convolve8 "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"
262
specialize vp9_convolve8 ssse3
263

John Koleszar's avatar
John Koleszar committed
264
prototype void vp9_convolve8_horiz "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"
265
specialize vp9_convolve8_horiz ssse3
266

John Koleszar's avatar
John Koleszar committed
267
prototype void vp9_convolve8_vert "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"
268
specialize vp9_convolve8_vert ssse3
269

John Koleszar's avatar
John Koleszar committed
270
prototype void vp9_convolve8_avg "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"
271
specialize vp9_convolve8_avg ssse3
272

John Koleszar's avatar
John Koleszar committed
273
prototype void vp9_convolve8_avg_horiz "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"
274
specialize vp9_convolve8_avg_horiz ssse3
275

John Koleszar's avatar
John Koleszar committed
276
prototype void vp9_convolve8_avg_vert "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"
277
specialize vp9_convolve8_avg_vert ssse3
278

279 280 281
#
# dct
#
Yaowu Xu's avatar
Yaowu Xu committed
282 283
prototype void vp9_short_idct4x4_1 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct4x4_1
284

Yaowu Xu's avatar
Yaowu Xu committed
285 286
prototype void vp9_short_idct4x4 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct4x4 sse2
287

288
prototype void vp9_short_idct8x8 "int16_t *input, int16_t *output, int pitch"
Yunqing Wang's avatar
Yunqing Wang committed
289
specialize vp9_short_idct8x8 sse2
290

291
prototype void vp9_short_idct10_8x8 "int16_t *input, int16_t *output, int pitch"
Yunqing Wang's avatar
Yunqing Wang committed
292
specialize vp9_short_idct10_8x8 sse2
293

Yaowu Xu's avatar
Yaowu Xu committed
294 295 296
prototype void vp9_short_idct1_8x8 "int16_t *input, int16_t *output"
specialize vp9_short_idct1_8x8

297
prototype void vp9_short_idct16x16 "int16_t *input, int16_t *output, int pitch"
Yunqing Wang's avatar
Yunqing Wang committed
298
specialize vp9_short_idct16x16 sse2
299

300
prototype void vp9_short_idct10_16x16 "int16_t *input, int16_t *output, int pitch"
301 302
specialize vp9_short_idct10_16x16

Yaowu Xu's avatar
Yaowu Xu committed
303 304 305 306
prototype void vp9_short_idct1_16x16 "int16_t *input, int16_t *output"
specialize vp9_short_idct1_16x16


307
prototype void vp9_short_idct32x32 "int16_t *input, int16_t *output, int pitch"
308 309
specialize vp9_short_idct32x32

310 311 312
prototype void vp9_short_idct1_32x32 "int16_t *input, int16_t *output"
specialize vp9_short_idct1_32x32

Yunqing Wang's avatar
Yunqing Wang committed
313 314 315
prototype void vp9_short_idct10_32x32 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct10_32x32

Jingning Han's avatar
Jingning Han committed
316
prototype void vp9_short_iht8x8 "int16_t *input, int16_t *output, int pitch, int tx_type"
317 318
specialize vp9_short_iht8x8

Jingning Han's avatar
Jingning Han committed
319 320 321
prototype void vp9_short_iht4x4 "int16_t *input, int16_t *output, int pitch, int tx_type"
specialize vp9_short_iht4x4

322 323
prototype void vp9_short_iht16x16 "int16_t *input, int16_t *output, int pitch, int tx_type"
specialize vp9_short_iht16x16
324

Yunqing Wang's avatar
Yunqing Wang committed
325 326 327
prototype void vp9_idct4_1d "int16_t *input, int16_t *output"
specialize vp9_idct4_1d sse2

328 329
# dct and add

330
prototype void vp9_dc_only_idct_add "int input_dc, uint8_t *pred_ptr, uint8_t *dst_ptr, int pitch, int stride"
331
specialize vp9_dc_only_idct_add sse2
332

Yaowu Xu's avatar
Yaowu Xu committed
333 334 335 336
prototype void vp9_short_iwalsh4x4_1 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_iwalsh4x4_1
prototype void vp9_short_iwalsh4x4 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_iwalsh4x4
337
prototype void vp9_dc_only_inv_walsh_add "int input_dc, uint8_t *pred_ptr, uint8_t *dst_ptr, int pitch, int stride"
Yaowu Xu's avatar
Yaowu Xu committed
338
specialize vp9_dc_only_inv_walsh_add
339

340
prototype unsigned int vp9_sad32x3 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int ref_stride, int max_sad"
341 342
specialize vp9_sad32x3

343
prototype unsigned int vp9_sad3x32 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int ref_stride, int max_sad"
344 345
specialize vp9_sad3x32

346 347 348
#
# Encoder functions below this point.
#
349
if [ "$CONFIG_VP9_ENCODER" = "yes" ]; then
350 351 352 353 354


# variance
[ $arch = "x86_64" ] && mmx_x86_64=mmx && sse2_x86_64=sse2

355
prototype unsigned int vp9_variance32x32 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
356
specialize vp9_variance32x32
357

Ronald S. Bultje's avatar
Ronald S. Bultje committed
358 359 360
prototype unsigned int vp9_variance64x64 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance64x64

361
prototype unsigned int vp9_variance16x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
362 363 364
specialize vp9_variance16x16 mmx sse2
vp9_variance16x16_sse2=vp9_variance16x16_wmt
vp9_variance16x16_mmx=vp9_variance16x16_mmx
365

366
prototype unsigned int vp9_variance16x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
367 368 369
specialize vp9_variance16x8 mmx sse2
vp9_variance16x8_sse2=vp9_variance16x8_wmt
vp9_variance16x8_mmx=vp9_variance16x8_mmx
370

371
prototype unsigned int vp9_variance8x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
372 373 374
specialize vp9_variance8x16 mmx sse2
vp9_variance8x16_sse2=vp9_variance8x16_wmt
vp9_variance8x16_mmx=vp9_variance8x16_mmx
375

376
prototype unsigned int vp9_variance8x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
377 378 379
specialize vp9_variance8x8 mmx sse2
vp9_variance8x8_sse2=vp9_variance8x8_wmt
vp9_variance8x8_mmx=vp9_variance8x8_mmx
380

381
prototype unsigned int vp9_variance4x4 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
382 383 384
specialize vp9_variance4x4 mmx sse2
vp9_variance4x4_sse2=vp9_variance4x4_wmt
vp9_variance4x4_mmx=vp9_variance4x4_mmx
385

Yaowu Xu's avatar
Yaowu Xu committed
386
prototype unsigned int vp9_sub_pixel_variance64x64 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
387
specialize vp9_sub_pixel_variance64x64 sse2
Ronald S. Bultje's avatar
Ronald S. Bultje committed
388

Yaowu Xu's avatar
Yaowu Xu committed
389
prototype unsigned int vp9_sub_pixel_variance32x32 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
390
specialize vp9_sub_pixel_variance32x32 sse2
391

Yaowu Xu's avatar
Yaowu Xu committed
392
prototype unsigned int vp9_sub_pixel_variance16x16 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
393
specialize vp9_sub_pixel_variance16x16 sse2 mmx ssse3
394

Yaowu Xu's avatar
Yaowu Xu committed
395
prototype unsigned int vp9_sub_pixel_variance8x16 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
396 397
specialize vp9_sub_pixel_variance8x16 sse2 mmx
vp9_sub_pixel_variance8x16_sse2=vp9_sub_pixel_variance8x16_wmt
398

Yaowu Xu's avatar
Yaowu Xu committed
399
prototype unsigned int vp9_sub_pixel_variance16x8 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
400 401 402
specialize vp9_sub_pixel_variance16x8 sse2 mmx ssse3
vp9_sub_pixel_variance16x8_sse2=vp9_sub_pixel_variance16x8_ssse3;
vp9_sub_pixel_variance16x8_sse2=vp9_sub_pixel_variance16x8_wmt
403

Yaowu Xu's avatar
Yaowu Xu committed
404
prototype unsigned int vp9_sub_pixel_variance8x8 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
405 406
specialize vp9_sub_pixel_variance8x8 sse2 mmx
vp9_sub_pixel_variance8x8_sse2=vp9_sub_pixel_variance8x8_wmt
407

Yaowu Xu's avatar
Yaowu Xu committed
408
prototype unsigned int vp9_sub_pixel_variance4x4 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
409 410
specialize vp9_sub_pixel_variance4x4 sse2 mmx
vp9_sub_pixel_variance4x4_sse2=vp9_sub_pixel_variance4x4_wmt
411

Ronald S. Bultje's avatar
Ronald S. Bultje committed
412
prototype unsigned int vp9_sad64x64 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int max_sad"
413
specialize vp9_sad64x64 sse2
Ronald S. Bultje's avatar
Ronald S. Bultje committed
414

415
prototype unsigned int vp9_sad32x32 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int max_sad"
416
specialize vp9_sad32x32 sse2
417

418
prototype unsigned int vp9_sad16x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int max_sad"
419
specialize vp9_sad16x16 mmx sse2
420

421
prototype unsigned int vp9_sad16x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int max_sad"
422
specialize vp9_sad16x8 mmx sse2
423

424
prototype unsigned int vp9_sad8x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int max_sad"
425
specialize vp9_sad8x16 mmx sse2
426

427
prototype unsigned int vp9_sad8x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int max_sad"
428
specialize vp9_sad8x8 mmx sse2
429

430
prototype unsigned int vp9_sad4x4 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int max_sad"
431
specialize vp9_sad4x4 mmx sse
432

433
prototype unsigned int vp9_variance_halfpixvar16x16_h "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
434 435
specialize vp9_variance_halfpixvar16x16_h mmx sse2
vp9_variance_halfpixvar16x16_h_sse2=vp9_variance_halfpixvar16x16_h_wmt
436

437
prototype unsigned int vp9_variance_halfpixvar16x16_v "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
438 439
specialize vp9_variance_halfpixvar16x16_v mmx sse2
vp9_variance_halfpixvar16x16_v_sse2=vp9_variance_halfpixvar16x16_v_wmt
440

441
prototype unsigned int vp9_variance_halfpixvar16x16_hv "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
442 443
specialize vp9_variance_halfpixvar16x16_hv mmx sse2
vp9_variance_halfpixvar16x16_hv_sse2=vp9_variance_halfpixvar16x16_hv_wmt
444

Ronald S. Bultje's avatar
Ronald S. Bultje committed
445 446 447 448 449 450 451 452 453
prototype unsigned int vp9_variance_halfpixvar64x64_h "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance_halfpixvar64x64_h

prototype unsigned int vp9_variance_halfpixvar64x64_v "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance_halfpixvar64x64_v

prototype unsigned int vp9_variance_halfpixvar64x64_hv "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance_halfpixvar64x64_hv

454
prototype unsigned int vp9_variance_halfpixvar32x32_h "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
455
specialize vp9_variance_halfpixvar32x32_h
456

457
prototype unsigned int vp9_variance_halfpixvar32x32_v "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
458
specialize vp9_variance_halfpixvar32x32_v
459

460
prototype unsigned int vp9_variance_halfpixvar32x32_hv "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
461
specialize vp9_variance_halfpixvar32x32_hv
462

Ronald S. Bultje's avatar
Ronald S. Bultje committed
463 464 465
prototype void vp9_sad64x64x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
specialize vp9_sad64x64x3

466
prototype void vp9_sad32x32x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
467
specialize vp9_sad32x32x3
468

469
prototype void vp9_sad16x16x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
470
specialize vp9_sad16x16x3 sse3 ssse3
471

472
prototype void vp9_sad16x8x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
473
specialize vp9_sad16x8x3 sse3 ssse3
474

475
prototype void vp9_sad8x16x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
476
specialize vp9_sad8x16x3 sse3
477

478
prototype void vp9_sad8x8x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
479
specialize vp9_sad8x8x3 sse3
480

481
prototype void vp9_sad4x4x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
482
specialize vp9_sad4x4x3 sse3
483

484
prototype void vp9_sad64x64x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
Ronald S. Bultje's avatar
Ronald S. Bultje committed
485 486
specialize vp9_sad64x64x8

487
prototype void vp9_sad32x32x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
488
specialize vp9_sad32x32x8
489

490
prototype void vp9_sad16x16x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
491
specialize vp9_sad16x16x8 sse4
492

493
prototype void vp9_sad16x8x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
494
specialize vp9_sad16x8x8 sse4
495

496
prototype void vp9_sad8x16x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
497
specialize vp9_sad8x16x8 sse4
498

499
prototype void vp9_sad8x8x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
500
specialize vp9_sad8x8x8 sse4
501

502
prototype void vp9_sad4x4x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
503
specialize vp9_sad4x4x8 sse4
504

505
prototype void vp9_sad64x64x4d "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
506
specialize vp9_sad64x64x4d sse2
Ronald S. Bultje's avatar
Ronald S. Bultje committed
507

508
prototype void vp9_sad32x32x4d "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
509
specialize vp9_sad32x32x4d sse2
510

511
prototype void vp9_sad16x16x4d "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
512
specialize vp9_sad16x16x4d sse2
513

514
prototype void vp9_sad16x8x4d "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
515
specialize vp9_sad16x8x4d sse2
516

517
prototype void vp9_sad8x16x4d "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
518
specialize vp9_sad8x16x4d sse2
519

520
prototype void vp9_sad8x8x4d "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
521
specialize vp9_sad8x8x4d sse2
522

523
prototype void vp9_sad4x4x4d "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
524
specialize vp9_sad4x4x4d sse
525
prototype unsigned int vp9_sub_pixel_mse16x16 "const uint8_t *src_ptr, int  src_pixels_per_line, int  xoffset, int  yoffset, const uint8_t *dst_ptr, int dst_pixels_per_line, unsigned int *sse"
526
specialize vp9_sub_pixel_mse16x16 sse2 mmx
527

528
prototype unsigned int vp9_mse16x16 "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse"
529 530
specialize vp9_mse16x16 mmx sse2
vp9_mse16x16_sse2=vp9_mse16x16_wmt
531

Yaowu Xu's avatar
Yaowu Xu committed
532
prototype unsigned int vp9_sub_pixel_mse64x64 "const uint8_t *src_ptr, int  source_stride, int  xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
Ronald S. Bultje's avatar
Ronald S. Bultje committed
533 534
specialize vp9_sub_pixel_mse64x64

Yaowu Xu's avatar
Yaowu Xu committed
535
prototype unsigned int vp9_sub_pixel_mse32x32 "const uint8_t *src_ptr, int  source_stride, int  xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
536
specialize vp9_sub_pixel_mse32x32
537

538
prototype unsigned int vp9_get_mb_ss "const int16_t *"
539
specialize vp9_get_mb_ss mmx sse2
Jim Bankoski's avatar
Jim Bankoski committed
540
# ENCODEMB INVOKE
541
prototype int vp9_mbblock_error "struct macroblock *mb"
542 543
specialize vp9_mbblock_error mmx sse2
vp9_mbblock_error_sse2=vp9_mbblock_error_xmm
Jim Bankoski's avatar
Jim Bankoski committed
544

545
prototype int vp9_block_error "int16_t *coeff, int16_t *dqcoeff, int block_size"
546 547
specialize vp9_block_error mmx sse2
vp9_block_error_sse2=vp9_block_error_xmm
Jim Bankoski's avatar
Jim Bankoski committed
548

549 550
prototype void vp9_subtract_b "struct block *be, struct blockd *bd, int pitch"
specialize vp9_subtract_b mmx sse2
Jim Bankoski's avatar
Jim Bankoski committed
551

552 553 554
prototype int vp9_mbuverror "struct macroblock *mb"
specialize vp9_mbuverror mmx sse2
vp9_mbuverror_sse2=vp9_mbuverror_xmm
Jim Bankoski's avatar
Jim Bankoski committed
555

556 557
prototype void vp9_subtract_b "struct block *be, struct blockd *bd, int pitch"
specialize vp9_subtract_b mmx sse2
Jim Bankoski's avatar
Jim Bankoski committed
558

559
prototype void vp9_subtract_mby "int16_t *diff, uint8_t *src, uint8_t *pred, int stride"
560
specialize vp9_subtract_mby mmx sse2
Jim Bankoski's avatar
Jim Bankoski committed
561

562
prototype void vp9_subtract_mbuv "int16_t *diff, uint8_t *usrc, uint8_t *vsrc, uint8_t *pred, int stride"
563
specialize vp9_subtract_mbuv mmx sse2
564 565 566 567 568 569 570

#
# Structured Similarity (SSIM)
#
if [ "$CONFIG_INTERNAL_STATS" = "yes" ]; then
    [ $arch = "x86_64" ] && sse2_on_x86_64=sse2

571
    prototype void vp9_ssim_parms_8x8 "uint8_t *s, int sp, uint8_t *r, int rp, unsigned long *sum_s, unsigned long *sum_r, unsigned long *sum_sq_s, unsigned long *sum_sq_r, unsigned long *sum_sxr"
572
    specialize vp9_ssim_parms_8x8 $sse2_on_x86_64
573

574
    prototype void vp9_ssim_parms_16x16 "uint8_t *s, int sp, uint8_t *r, int rp, unsigned long *sum_s, unsigned long *sum_r, unsigned long *sum_sq_s, unsigned long *sum_sq_r, unsigned long *sum_sxr"
575
    specialize vp9_ssim_parms_16x16 $sse2_on_x86_64
576 577
fi

Jim Bankoski's avatar
Jim Bankoski committed
578
# fdct functions
579 580 581 582 583 584 585 586 587
prototype void vp9_short_fht4x4 "int16_t *InputData, int16_t *OutputData, int pitch, int tx_type"
specialize vp9_short_fht4x4

prototype void vp9_short_fht8x8 "int16_t *InputData, int16_t *OutputData, int pitch, int tx_type"
specialize vp9_short_fht8x8

prototype void vp9_short_fht16x16 "int16_t *InputData, int16_t *OutputData, int pitch, int tx_type"
specialize vp9_short_fht16x16

588
prototype void vp9_short_fdct8x8 "int16_t *InputData, int16_t *OutputData, int pitch"
Christian Duvivier's avatar
Christian Duvivier committed
589
specialize vp9_short_fdct8x8 sse2
Jim Bankoski's avatar
Jim Bankoski committed
590

591
prototype void vp9_short_fdct4x4 "int16_t *InputData, int16_t *OutputData, int pitch"
592
specialize vp9_short_fdct4x4
Jim Bankoski's avatar
Jim Bankoski committed
593

594
prototype void vp9_short_fdct8x4 "int16_t *InputData, int16_t *OutputData, int pitch"
595
specialize vp9_short_fdct8x4
Jim Bankoski's avatar
Jim Bankoski committed
596

597
prototype void vp9_short_fdct32x32 "int16_t *InputData, int16_t *OutputData, int pitch"
598 599
specialize vp9_short_fdct32x32

600
prototype void vp9_short_fdct16x16 "int16_t *InputData, int16_t *OutputData, int pitch"
601
specialize vp9_short_fdct16x16 sse2
Jim Bankoski's avatar
Jim Bankoski committed
602

Yaowu Xu's avatar
Yaowu Xu committed
603 604
prototype void vp9_short_walsh4x4 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_walsh4x4
Jim Bankoski's avatar
Jim Bankoski committed
605

Yaowu Xu's avatar
Yaowu Xu committed
606 607
prototype void vp9_short_walsh8x4 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_walsh8x4
Jim Bankoski's avatar
Jim Bankoski committed
608

Jim Bankoski's avatar
Jim Bankoski committed
609 610 611
#
# Motion search
#
612
prototype int vp9_full_search_sad "struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct vp9_variance_vtable *fn_ptr, DEC_MVCOSTS, union int_mv *center_mv"
Jim Bankoski's avatar
Jim Bankoski committed
613 614 615 616
specialize vp9_full_search_sad sse3 sse4_1
vp9_full_search_sad_sse3=vp9_full_search_sadx3
vp9_full_search_sad_sse4_1=vp9_full_search_sadx8

617
prototype int vp9_refining_search_sad "struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct vp9_variance_vtable *fn_ptr, DEC_MVCOSTS, union int_mv *center_mv"
Jim Bankoski's avatar
Jim Bankoski committed
618 619 620
specialize vp9_refining_search_sad sse3
vp9_refining_search_sad_sse3=vp9_refining_search_sadx4

621
prototype int vp9_diamond_search_sad "struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct vp9_variance_vtable *fn_ptr, DEC_MVCOSTS, union int_mv *center_mv"
Jim Bankoski's avatar
Jim Bankoski committed
622
specialize vp9_diamond_search_sad sse3
Jim Bankoski's avatar
Jim Bankoski committed
623 624
vp9_diamond_search_sad_sse3=vp9_diamond_search_sadx4

625
prototype void vp9_temporal_filter_apply "uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_size, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count"
Jim Bankoski's avatar
Jim Bankoski committed
626 627
specialize vp9_temporal_filter_apply sse2

628
prototype void vp9_yv12_copy_partial_frame "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc, int fraction"
Johann's avatar
Johann committed
629
specialize vp9_yv12_copy_partial_frame
630

Jim Bankoski's avatar
Jim Bankoski committed
631

632 633
fi
# end encoder functions