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

7
#include "vpx/vpx_integer.h"
8
#include "vp9/common/vp9_enums.h"
9

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

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

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

Scott LaVarnway's avatar
Scott LaVarnway committed
25
26
27
28
#
# Dequant
#

29
30
prototype void vp9_idct_add_16x16 "int16_t *input, uint8_t *dest, int stride, int eob"
specialize vp9_idct_add_16x16
Scott LaVarnway's avatar
Scott LaVarnway committed
31

32
33
prototype void vp9_idct_add_8x8 "int16_t *input, uint8_t *dest, int stride, int eob"
specialize vp9_idct_add_8x8
34

35
36
prototype void vp9_idct_add "int16_t *input, uint8_t *dest, int stride, int eob"
specialize vp9_idct_add
Scott LaVarnway's avatar
Scott LaVarnway committed
37
38


Jim Bankoski's avatar
Jim Bankoski committed
39

40
41
prototype void vp9_idct_add_32x32 "int16_t *q, uint8_t *dst, int stride, int eob"
specialize vp9_idct_add_32x32
42

Jim Bankoski's avatar
Jim Bankoski committed
43
44
45
#
# RECON
#
46
prototype void vp9_copy_mem16x16 "const uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
Johann's avatar
Johann committed
47
specialize vp9_copy_mem16x16 mmx sse2 dspr2
48
vp9_copy_mem16x16_dspr2=vp9_copy_mem16x16_dspr2
49

50
prototype void vp9_copy_mem8x8 "const uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
Johann's avatar
Johann committed
51
specialize vp9_copy_mem8x8 mmx dspr2
52
vp9_copy_mem8x8_dspr2=vp9_copy_mem8x8_dspr2
53

54
prototype void vp9_copy_mem8x4 "const uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
55
specialize vp9_copy_mem8x4 mmx
56

57
58
59
prototype void vp9_build_intra_predictors "uint8_t *src, int src_stride, uint8_t *pred, int y_stride, int mode, int bw, int bh, int up_available, int left_available, int right_available"
specialize void vp9_build_intra_predictors

Yunqing Wang's avatar
Yunqing Wang committed
60
if [ "$CONFIG_VP9_DECODER" = "yes" ]; then
61
prototype void vp9_add_constant_residual_8x8 "const int16_t diff, uint8_t *dest, int stride"
62
63
specialize vp9_add_constant_residual_8x8 sse2

64
prototype void vp9_add_constant_residual_16x16 "const int16_t diff, uint8_t *dest, int stride"
65
66
specialize vp9_add_constant_residual_16x16 sse2

67
prototype void vp9_add_constant_residual_32x32 "const int16_t diff, uint8_t *dest, int stride"
68
specialize vp9_add_constant_residual_32x32 sse2
Yunqing Wang's avatar
Yunqing Wang committed
69
70
fi

71
72
73
#
# Loopfilter
#
74
75
prototype void vp9_mb_lpf_vertical_edge_w "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh"
specialize vp9_mb_lpf_vertical_edge_w sse2
76
77

prototype void vp9_mbloop_filter_vertical_edge "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"
78
specialize vp9_mbloop_filter_vertical_edge sse2
79
80

prototype void vp9_loop_filter_vertical_edge "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"
81
specialize vp9_loop_filter_vertical_edge mmx
82

83
84
prototype void vp9_mb_lpf_horizontal_edge_w "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh"
specialize vp9_mb_lpf_horizontal_edge_w sse2
85
86

prototype void vp9_mbloop_filter_horizontal_edge "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"
87
specialize vp9_mbloop_filter_horizontal_edge sse2
88
89

prototype void vp9_loop_filter_horizontal_edge "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"
90
specialize vp9_loop_filter_horizontal_edge mmx
91

Jim Bankoski's avatar
Jim Bankoski committed
92
93
94
#
# post proc
#
95
if [ "$CONFIG_POSTPROC" = "yes" ]; then
96
prototype void vp9_mbpost_proc_down "uint8_t *dst, int pitch, int rows, int cols, int flimit"
Jim Bankoski's avatar
Jim Bankoski committed
97
98
99
specialize vp9_mbpost_proc_down mmx sse2
vp9_mbpost_proc_down_sse2=vp9_mbpost_proc_down_xmm

100
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
101
102
103
specialize vp9_mbpost_proc_across_ip sse2
vp9_mbpost_proc_across_ip_sse2=vp9_mbpost_proc_across_ip_xmm

104
prototype void vp9_post_proc_down_and_across "const 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
105
106
107
specialize vp9_post_proc_down_and_across mmx sse2
vp9_post_proc_down_and_across_sse2=vp9_post_proc_down_and_across_xmm

108
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
109
110
specialize vp9_plane_add_noise mmx sse2
vp9_plane_add_noise_sse2=vp9_plane_add_noise_wmt
111
fi
Jim Bankoski's avatar
Jim Bankoski committed
112

113
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
114
115
specialize vp9_blend_mb_inner

116
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
117
118
specialize vp9_blend_mb_outer

119
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
120
121
specialize vp9_blend_b

122
123
124
#
# Sub Pixel Filters
#
John Koleszar's avatar
John Koleszar committed
125
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"
126
specialize vp9_convolve8 ssse3
127

John Koleszar's avatar
John Koleszar committed
128
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"
129
specialize vp9_convolve8_horiz ssse3
130

John Koleszar's avatar
John Koleszar committed
131
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"
132
specialize vp9_convolve8_vert ssse3
133

John Koleszar's avatar
John Koleszar committed
134
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"
135
specialize vp9_convolve8_avg ssse3
136

John Koleszar's avatar
John Koleszar committed
137
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"
138
specialize vp9_convolve8_avg_horiz ssse3
139

John Koleszar's avatar
John Koleszar committed
140
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"
141
specialize vp9_convolve8_avg_vert ssse3
142

143
144
145
#
# dct
#
Scott LaVarnway's avatar
Scott LaVarnway committed
146
147
prototype void vp9_short_idct4x4_1_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct4x4_1_add
148

Scott LaVarnway's avatar
Scott LaVarnway committed
149
150
prototype void vp9_short_idct4x4_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct4x4_add sse2
151

Scott LaVarnway's avatar
Scott LaVarnway committed
152
153
prototype void vp9_short_idct8x8_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct8x8_add sse2
154

Scott LaVarnway's avatar
Scott LaVarnway committed
155
156
prototype void vp9_short_idct10_8x8_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct10_8x8_add sse2
157

Yaowu Xu's avatar
Yaowu Xu committed
158
159
160
prototype void vp9_short_idct1_8x8 "int16_t *input, int16_t *output"
specialize vp9_short_idct1_8x8

Scott LaVarnway's avatar
Scott LaVarnway committed
161
162
prototype void vp9_short_idct16x16_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct16x16_add sse2
163

Scott LaVarnway's avatar
Scott LaVarnway committed
164
165
prototype void vp9_short_idct10_16x16_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct10_16x16_add sse2
166

Yaowu Xu's avatar
Yaowu Xu committed
167
168
169
prototype void vp9_short_idct1_16x16 "int16_t *input, int16_t *output"
specialize vp9_short_idct1_16x16

Scott LaVarnway's avatar
Scott LaVarnway committed
170
171
prototype void vp9_short_idct32x32_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct32x32_add sse2
172

173
174
175
prototype void vp9_short_idct1_32x32 "int16_t *input, int16_t *output"
specialize vp9_short_idct1_32x32

Scott LaVarnway's avatar
Scott LaVarnway committed
176
177
prototype void vp9_short_idct10_32x32_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct10_32x32_add
Yunqing Wang's avatar
Yunqing Wang committed
178

Scott LaVarnway's avatar
Scott LaVarnway committed
179
180
181
prototype void vp9_short_iht4x4_add "int16_t *input, uint8_t *dest, int dest_stride, int tx_type"
specialize vp9_short_iht4x4_add

Scott LaVarnway's avatar
Scott LaVarnway committed
182
183
prototype void vp9_short_iht8x8_add "int16_t *input, uint8_t *dest, int dest_stride, int tx_type"
specialize vp9_short_iht8x8_add
184

Scott LaVarnway's avatar
Scott LaVarnway committed
185
186
prototype void vp9_short_iht16x16_add "int16_t *input, uint8_t *output, int pitch, int tx_type"
specialize vp9_short_iht16x16_add
187

Yunqing Wang's avatar
Yunqing Wang committed
188
189
prototype void vp9_idct4_1d "int16_t *input, int16_t *output"
specialize vp9_idct4_1d sse2
190
191
# dct and add

192
prototype void vp9_dc_only_idct_add "int input_dc, uint8_t *pred_ptr, uint8_t *dst_ptr, int pitch, int stride"
193
specialize vp9_dc_only_idct_add sse2
194

Scott LaVarnway's avatar
Scott LaVarnway committed
195
196
197
198
199
prototype void vp9_short_iwalsh4x4_1_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_iwalsh4x4_1_add

prototype void vp9_short_iwalsh4x4_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_iwalsh4x4_add
200

201
prototype unsigned int vp9_sad32x3 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int ref_stride, int max_sad"
202
203
specialize vp9_sad32x3

204
prototype unsigned int vp9_sad3x32 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int ref_stride, int max_sad"
205
206
specialize vp9_sad3x32

207
208
209
#
# Encoder functions below this point.
#
210
if [ "$CONFIG_VP9_ENCODER" = "yes" ]; then
211
212
213
214
215


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

216
prototype unsigned int vp9_variance32x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
Yunqing Wang's avatar
Yunqing Wang committed
217
specialize vp9_variance32x16 sse2
218
219

prototype unsigned int vp9_variance16x32 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
Yunqing Wang's avatar
Yunqing Wang committed
220
specialize vp9_variance16x32 sse2
221
222

prototype unsigned int vp9_variance64x32 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
Yunqing Wang's avatar
Yunqing Wang committed
223
specialize vp9_variance64x32 sse2
224
225

prototype unsigned int vp9_variance32x64 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
Yunqing Wang's avatar
Yunqing Wang committed
226
specialize vp9_variance32x64 sse2
227

228
prototype unsigned int vp9_variance32x32 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
Yunqing Wang's avatar
Yunqing Wang committed
229
specialize vp9_variance32x32 sse2
230

Ronald S. Bultje's avatar
Ronald S. Bultje committed
231
prototype unsigned int vp9_variance64x64 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
Yunqing Wang's avatar
Yunqing Wang committed
232
specialize vp9_variance64x64 sse2
Ronald S. Bultje's avatar
Ronald S. Bultje committed
233

234
prototype unsigned int vp9_variance16x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
235
specialize vp9_variance16x16 mmx sse2
236

237
prototype unsigned int vp9_variance16x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
238
specialize vp9_variance16x8 mmx sse2
239

240
prototype unsigned int vp9_variance8x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
241
specialize vp9_variance8x16 mmx sse2
242

243
prototype unsigned int vp9_variance8x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
244
specialize vp9_variance8x8 mmx sse2
245

Jim Bankoski's avatar
Jim Bankoski committed
246
247
248
249
prototype void vp9_get_sse_sum_8x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"
specialize vp9_get_sse_sum_8x8 sse2
vp9_get_sse_sum_8x8_sse2=vp9_get8x8var_sse2

250
prototype unsigned int vp9_variance8x4 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
Yunqing Wang's avatar
Yunqing Wang committed
251
specialize vp9_variance8x4 sse2
252
253

prototype unsigned int vp9_variance4x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
Yunqing Wang's avatar
Yunqing Wang committed
254
specialize vp9_variance4x8 sse2
255

256
prototype unsigned int vp9_variance4x4 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
257
specialize vp9_variance4x4 mmx sse2
258

Yaowu Xu's avatar
Yaowu Xu committed
259
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"
260
specialize vp9_sub_pixel_variance64x64 sse2 ssse3
Ronald S. Bultje's avatar
Ronald S. Bultje committed
261

262
prototype unsigned int vp9_sub_pixel_avg_variance64x64 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred"
263
specialize vp9_sub_pixel_avg_variance64x64 sse2 ssse3
264

265
prototype unsigned int vp9_sub_pixel_variance32x64 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
266
specialize vp9_sub_pixel_variance32x64 sse2 ssse3
267

268
prototype unsigned int vp9_sub_pixel_avg_variance32x64 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred"
269
specialize vp9_sub_pixel_avg_variance32x64 sse2 ssse3
270

271
prototype unsigned int vp9_sub_pixel_variance64x32 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
272
specialize vp9_sub_pixel_variance64x32 sse2 ssse3
273

274
prototype unsigned int vp9_sub_pixel_avg_variance64x32 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred"
275
specialize vp9_sub_pixel_avg_variance64x32 sse2 ssse3
276

277
prototype unsigned int vp9_sub_pixel_variance32x16 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
278
specialize vp9_sub_pixel_variance32x16 sse2 ssse3
279

280
prototype unsigned int vp9_sub_pixel_avg_variance32x16 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred"
281
specialize vp9_sub_pixel_avg_variance32x16 sse2 ssse3
282

283
prototype unsigned int vp9_sub_pixel_variance16x32 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
284
specialize vp9_sub_pixel_variance16x32 sse2 ssse3
285

286
prototype unsigned int vp9_sub_pixel_avg_variance16x32 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred"
287
specialize vp9_sub_pixel_avg_variance16x32 sse2 ssse3
288

Yaowu Xu's avatar
Yaowu Xu committed
289
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"
290
specialize vp9_sub_pixel_variance32x32 sse2 ssse3
291

292
prototype unsigned int vp9_sub_pixel_avg_variance32x32 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred"
293
specialize vp9_sub_pixel_avg_variance32x32 sse2 ssse3
294

Yaowu Xu's avatar
Yaowu Xu committed
295
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"
296
specialize vp9_sub_pixel_variance16x16 sse2 ssse3
297

298
prototype unsigned int vp9_sub_pixel_avg_variance16x16 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred"
299
specialize vp9_sub_pixel_avg_variance16x16 sse2 ssse3
300

Yaowu Xu's avatar
Yaowu Xu committed
301
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"
302
specialize vp9_sub_pixel_variance8x16 sse2 ssse3
303

304
prototype unsigned int vp9_sub_pixel_avg_variance8x16 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred"
305
specialize vp9_sub_pixel_avg_variance8x16 sse2 ssse3
306

Yaowu Xu's avatar
Yaowu Xu committed
307
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"
308
specialize vp9_sub_pixel_variance16x8 sse2 ssse3
309

310
prototype unsigned int vp9_sub_pixel_avg_variance16x8 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred"
311
specialize vp9_sub_pixel_avg_variance16x8 sse2 ssse3
312

Yaowu Xu's avatar
Yaowu Xu committed
313
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"
314
specialize vp9_sub_pixel_variance8x8 sse2 ssse3
315

316
prototype unsigned int vp9_sub_pixel_avg_variance8x8 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred"
317
specialize vp9_sub_pixel_avg_variance8x8 sse2 ssse3
318

319
320
# TODO(jingning): need to convert 8x4/4x8 functions into mmx/sse form
prototype unsigned int vp9_sub_pixel_variance8x4 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
321
specialize vp9_sub_pixel_variance8x4 sse2 ssse3
322
323

prototype unsigned int vp9_sub_pixel_avg_variance8x4 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred"
324
specialize vp9_sub_pixel_avg_variance8x4 sse2 ssse3
325
326

prototype unsigned int vp9_sub_pixel_variance4x8 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
327
specialize vp9_sub_pixel_variance4x8 sse ssse3
328
329

prototype unsigned int vp9_sub_pixel_avg_variance4x8 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred"
330
specialize vp9_sub_pixel_avg_variance4x8 sse ssse3
331

Yaowu Xu's avatar
Yaowu Xu committed
332
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"
333
334
specialize vp9_sub_pixel_variance4x4 sse ssse3
#vp9_sub_pixel_variance4x4_sse2=vp9_sub_pixel_variance4x4_wmt
335

336
prototype unsigned int vp9_sub_pixel_avg_variance4x4 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred"
337
specialize vp9_sub_pixel_avg_variance4x4 sse ssse3
338

Ronald S. Bultje's avatar
Ronald S. Bultje committed
339
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"
340
specialize vp9_sad64x64 sse2
Ronald S. Bultje's avatar
Ronald S. Bultje committed
341

342
prototype unsigned int vp9_sad32x64 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad"
343
specialize vp9_sad32x64 sse2
344
345

prototype unsigned int vp9_sad64x32 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad"
346
specialize vp9_sad64x32 sse2
347
348

prototype unsigned int vp9_sad32x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad"
349
specialize vp9_sad32x16 sse2
350
351

prototype unsigned int vp9_sad16x32 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad"
352
353
specialize vp9_sad16x32 sse2

354
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"
355
specialize vp9_sad32x32 sse2
356

357
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"
358
specialize vp9_sad16x16 mmx sse2
359

360
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"
361
specialize vp9_sad16x8 mmx sse2
362

363
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"
364
specialize vp9_sad8x16 mmx sse2
365

366
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"
367
specialize vp9_sad8x8 mmx sse2
368

369
370
# TODO(jingning): need to covert these functions into mmx/sse2 form
prototype unsigned int vp9_sad8x4 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad"
371
specialize vp9_sad8x4 sse2
372
373

prototype unsigned int vp9_sad4x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad"
374
specialize vp9_sad4x8 sse
375

376
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"
377
specialize vp9_sad4x4 mmx sse
378

379
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"
380
specialize vp9_variance_halfpixvar16x16_h sse2
381
vp9_variance_halfpixvar16x16_h_sse2=vp9_variance_halfpixvar16x16_h_wmt
382

383
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"
384
specialize vp9_variance_halfpixvar16x16_v sse2
385
vp9_variance_halfpixvar16x16_v_sse2=vp9_variance_halfpixvar16x16_v_wmt
386

387
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"
388
specialize vp9_variance_halfpixvar16x16_hv sse2
389
vp9_variance_halfpixvar16x16_hv_sse2=vp9_variance_halfpixvar16x16_hv_wmt
390

Ronald S. Bultje's avatar
Ronald S. Bultje committed
391
392
393
394
395
396
397
398
399
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

400
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"
401
specialize vp9_variance_halfpixvar32x32_h
402

403
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"
404
specialize vp9_variance_halfpixvar32x32_v
405

406
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"
407
specialize vp9_variance_halfpixvar32x32_hv
408

Ronald S. Bultje's avatar
Ronald S. Bultje committed
409
410
411
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

412
prototype void vp9_sad32x32x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
413
specialize vp9_sad32x32x3
414

415
prototype void vp9_sad16x16x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
416
specialize vp9_sad16x16x3 sse3 ssse3
417

418
prototype void vp9_sad16x8x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
419
specialize vp9_sad16x8x3 sse3 ssse3
420

421
prototype void vp9_sad8x16x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
422
specialize vp9_sad8x16x3 sse3
423

424
prototype void vp9_sad8x8x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
425
specialize vp9_sad8x8x3 sse3
426

427
prototype void vp9_sad4x4x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
428
specialize vp9_sad4x4x3 sse3
429

430
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
431
432
specialize vp9_sad64x64x8

433
prototype void vp9_sad32x32x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
434
specialize vp9_sad32x32x8
435

436
prototype void vp9_sad16x16x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
437
specialize vp9_sad16x16x8 sse4
438

439
prototype void vp9_sad16x8x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
440
specialize vp9_sad16x8x8 sse4
441

442
prototype void vp9_sad8x16x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
443
specialize vp9_sad8x16x8 sse4
444

445
prototype void vp9_sad8x8x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
446
specialize vp9_sad8x8x8 sse4
447

448
449
450
451
452
453
prototype void vp9_sad8x4x8 "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"
specialize vp9_sad8x4x8

prototype void vp9_sad4x8x8 "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"
specialize vp9_sad4x8x8

454
prototype void vp9_sad4x4x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
455
specialize vp9_sad4x4x8 sse4
456

457
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"
458
specialize vp9_sad64x64x4d sse2
Ronald S. Bultje's avatar
Ronald S. Bultje committed
459

460
prototype void vp9_sad32x64x4d "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
461
specialize vp9_sad32x64x4d sse2
462
463

prototype void vp9_sad64x32x4d "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
464
specialize vp9_sad64x32x4d sse2
465
466

prototype void vp9_sad32x16x4d "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
467
specialize vp9_sad32x16x4d sse2
468
469

prototype void vp9_sad16x32x4d "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
470
471
specialize vp9_sad16x32x4d sse2

472
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"
473
specialize vp9_sad32x32x4d sse2
474

475
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"
476
specialize vp9_sad16x16x4d sse2
477

478
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"
479
specialize vp9_sad16x8x4d sse2
480

481
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"
482
specialize vp9_sad8x16x4d sse2
483

484
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"
485
specialize vp9_sad8x8x4d sse2
486

487
488
# TODO(jingning): need to convert these 4x8/8x4 functions into sse2 form
prototype void vp9_sad8x4x4d "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array"
489
specialize vp9_sad8x4x4d sse2
490
491

prototype void vp9_sad4x8x4d "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array"
492
specialize vp9_sad4x8x4d sse
493

494
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"
495
specialize vp9_sad4x4x4d sse
496

497
498
#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"
#specialize vp9_sub_pixel_mse16x16 sse2 mmx
499

500
prototype unsigned int vp9_mse16x16 "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse"
501
502
specialize vp9_mse16x16 mmx sse2
vp9_mse16x16_sse2=vp9_mse16x16_wmt
503

504
505
506
507
508
509
510
511
512
prototype unsigned int vp9_mse8x16 "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse"
specialize vp9_mse8x16

prototype unsigned int vp9_mse16x8 "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse"
specialize vp9_mse16x8

prototype unsigned int vp9_mse8x8 "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse"
specialize vp9_mse8x8

Yaowu Xu's avatar
Yaowu Xu committed
513
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
514
515
specialize vp9_sub_pixel_mse64x64

Yaowu Xu's avatar
Yaowu Xu committed
516
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"
517
specialize vp9_sub_pixel_mse32x32
518

519
prototype unsigned int vp9_get_mb_ss "const int16_t *"
520
specialize vp9_get_mb_ss mmx sse2
Jim Bankoski's avatar
Jim Bankoski committed
521
522
# ENCODEMB INVOKE

Ronald S. Bultje's avatar
Ronald S. Bultje committed
523
524
prototype int64_t vp9_block_error "int16_t *coeff, int16_t *dqcoeff, intptr_t block_size"
specialize vp9_block_error sse2
Jim Bankoski's avatar
Jim Bankoski committed
525

526
527
528
prototype void vp9_subtract_block "int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride"
specialize vp9_subtract_block sse2

529
530
531
532
533
534
#
# Structured Similarity (SSIM)
#
if [ "$CONFIG_INTERNAL_STATS" = "yes" ]; then
    [ $arch = "x86_64" ] && sse2_on_x86_64=sse2

535
    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"
536
    specialize vp9_ssim_parms_8x8 $sse2_on_x86_64
537

538
    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"
539
    specialize vp9_ssim_parms_16x16 $sse2_on_x86_64
540
541
fi

Jim Bankoski's avatar
Jim Bankoski committed
542
# fdct functions
543
544
545
546
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"
547
specialize vp9_short_fht8x8 sse2
548
549
550
551

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

552
prototype void vp9_short_fdct8x8 "int16_t *InputData, int16_t *OutputData, int pitch"
Christian Duvivier's avatar
Christian Duvivier committed
553
specialize vp9_short_fdct8x8 sse2
Jim Bankoski's avatar
Jim Bankoski committed
554

555
prototype void vp9_short_fdct4x4 "int16_t *InputData, int16_t *OutputData, int pitch"
556
specialize vp9_short_fdct4x4 sse2
Jim Bankoski's avatar
Jim Bankoski committed
557

558
prototype void vp9_short_fdct8x4 "int16_t *InputData, int16_t *OutputData, int pitch"
559
specialize vp9_short_fdct8x4 sse2
Jim Bankoski's avatar
Jim Bankoski committed
560

561
prototype void vp9_short_fdct32x32 "int16_t *InputData, int16_t *OutputData, int pitch"
562
563
specialize vp9_short_fdct32x32

564
565
566
prototype void vp9_short_fdct32x32_rd "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_fdct32x32_rd

567
prototype void vp9_short_fdct16x16 "int16_t *InputData, int16_t *OutputData, int pitch"
568
specialize vp9_short_fdct16x16 sse2
Jim Bankoski's avatar
Jim Bankoski committed
569

Yaowu Xu's avatar
Yaowu Xu committed
570
571
prototype void vp9_short_walsh4x4 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_walsh4x4
Jim Bankoski's avatar
Jim Bankoski committed
572

Yaowu Xu's avatar
Yaowu Xu committed
573
574
prototype void vp9_short_walsh8x4 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_walsh8x4
Jim Bankoski's avatar
Jim Bankoski committed
575

Jim Bankoski's avatar
Jim Bankoski committed
576
577
578
#
# Motion search
#
John Koleszar's avatar
John Koleszar committed
579
prototype int vp9_full_search_sad "struct macroblock *x, union int_mv *ref_mv, int sad_per_bit, int distance, struct vp9_variance_vtable *fn_ptr, DEC_MVCOSTS, union int_mv *center_mv, int n"
Jim Bankoski's avatar
Jim Bankoski committed
580
581
582
583
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

John Koleszar's avatar
John Koleszar committed
584
prototype int vp9_refining_search_sad "struct macroblock *x, 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
585
586
587
specialize vp9_refining_search_sad sse3
vp9_refining_search_sad_sse3=vp9_refining_search_sadx4

John Koleszar's avatar
John Koleszar committed
588
prototype int vp9_diamond_search_sad "struct macroblock *x, 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
589
specialize vp9_diamond_search_sad sse3
Jim Bankoski's avatar
Jim Bankoski committed
590
591
vp9_diamond_search_sad_sse3=vp9_diamond_search_sadx4

592
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
593
594
specialize vp9_temporal_filter_apply sse2

595
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
596
specialize vp9_yv12_copy_partial_frame
597

Jim Bankoski's avatar
Jim Bankoski committed
598

599
600
fi
# end encoder functions