vp9_rtcd_defs.sh 30.9 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
#
# Dequant
#
28 29
prototype void vp9_idct_add_y_block_8x8 "int16_t *q, uint8_t *dst, int stride, struct macroblockd *xd"
specialize vp9_idct_add_y_block_8x8
Scott LaVarnway's avatar
Scott LaVarnway committed
30

31 32
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
33

34 35
prototype void vp9_idct_add_8x8 "int16_t *input, uint8_t *dest, int stride, int eob"
specialize vp9_idct_add_8x8
36

37 38
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
39

40 41
prototype void vp9_idct_add_y_block "int16_t *q, uint8_t *dst, int stride, struct macroblockd *xd"
specialize vp9_idct_add_y_block
Scott LaVarnway's avatar
Scott LaVarnway committed
42

43 44
prototype void vp9_idct_add_uv_block "int16_t *q, uint8_t *dst, int stride, uint16_t *eobs"
specialize vp9_idct_add_uv_block
Jim Bankoski's avatar
Jim Bankoski committed
45

46 47
prototype void vp9_idct_add_32x32 "int16_t *q, uint8_t *dst, int stride, int eob"
specialize vp9_idct_add_32x32
48

Jim Bankoski's avatar
Jim Bankoski committed
49 50 51
#
# RECON
#
52
prototype void vp9_copy_mem16x16 "const uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
Johann's avatar
Johann committed
53
specialize vp9_copy_mem16x16 mmx sse2 dspr2
54
vp9_copy_mem16x16_dspr2=vp9_copy_mem16x16_dspr2
55

56
prototype void vp9_copy_mem8x8 "const uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
Johann's avatar
Johann committed
57
specialize vp9_copy_mem8x8 mmx dspr2
58
vp9_copy_mem8x8_dspr2=vp9_copy_mem8x8_dspr2
59

60
prototype void vp9_copy_mem8x4 "const uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
61
specialize vp9_copy_mem8x4 mmx
62

63
prototype void vp9_recon_b "uint8_t *pred_ptr, int16_t *diff_ptr, int diff_stride, uint8_t *dst_ptr, int stride"
64
specialize vp9_recon_b
65

66 67
prototype void vp9_recon_sb "struct macroblockd *x, enum BLOCK_SIZE_TYPE bsize"
specialize vp9_recon_sb
68

69 70 71 72 73
prototype void vp9_recon_sby "struct macroblockd *x, enum BLOCK_SIZE_TYPE bsize"
specialize vp9_recon_sby

prototype void vp9_recon_sbuv "struct macroblockd *x, enum BLOCK_SIZE_TYPE bsize"
specialize void vp9_recon_sbuv
74

75 76 77
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

78
prototype void vp9_build_intra_predictors_sby_s "struct macroblockd *x, enum BLOCK_SIZE_TYPE bsize"
79
specialize vp9_build_intra_predictors_sby_s
80

81
prototype void vp9_build_intra_predictors_sbuv_s "struct macroblockd *x, enum BLOCK_SIZE_TYPE bsize"
82
specialize vp9_build_intra_predictors_sbuv_s
83

84
prototype void vp9_intra4x4_predict "struct macroblockd *xd, int block, enum BLOCK_SIZE_TYPE bsize, int b_mode, uint8_t *predictor, int pre_stride"
85
specialize vp9_intra4x4_predict;
86

Yunqing Wang's avatar
Yunqing Wang committed
87
if [ "$CONFIG_VP9_DECODER" = "yes" ]; then
88
prototype void vp9_add_residual_4x4 "const int16_t *diff, uint8_t *dest, int stride"
Yunqing Wang's avatar
Yunqing Wang committed
89 90
specialize vp9_add_residual_4x4 sse2

91
prototype void vp9_add_residual_8x8 "const int16_t *diff, uint8_t *dest, int stride"
Yunqing Wang's avatar
Yunqing Wang committed
92 93
specialize vp9_add_residual_8x8 sse2

94
prototype void vp9_add_constant_residual_8x8 "const int16_t diff, uint8_t *dest, int stride"
95 96
specialize vp9_add_constant_residual_8x8 sse2

97
prototype void vp9_add_constant_residual_16x16 "const int16_t diff, uint8_t *dest, int stride"
98 99
specialize vp9_add_constant_residual_16x16 sse2

100
prototype void vp9_add_constant_residual_32x32 "const int16_t diff, uint8_t *dest, int stride"
101
specialize vp9_add_constant_residual_32x32 sse2
Yunqing Wang's avatar
Yunqing Wang committed
102 103
fi

104 105 106
#
# Loopfilter
#
107
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"
108
specialize vp9_loop_filter_mbv sse2
109

110
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"
111
specialize vp9_loop_filter_bv sse2
112

113
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"
114
specialize vp9_loop_filter_bv8x8 sse2
115

116
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"
117
specialize vp9_loop_filter_mbh sse2
118

119
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"
120
specialize vp9_loop_filter_bh sse2
121

122
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"
123
specialize vp9_loop_filter_bh8x8 sse2
124

Jim Bankoski's avatar
Jim Bankoski committed
125
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"
126
specialize vp9_lpf_mbh_w sse2
Jim Bankoski's avatar
Jim Bankoski committed
127 128

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"
129 130
specialize vp9_lpf_mbv_w sse2

Jim Bankoski's avatar
Jim Bankoski committed
131 132 133
#
# post proc
#
134
if [ "$CONFIG_POSTPROC" = "yes" ]; then
135
prototype void vp9_mbpost_proc_down "uint8_t *dst, int pitch, int rows, int cols, int flimit"
Jim Bankoski's avatar
Jim Bankoski committed
136 137 138
specialize vp9_mbpost_proc_down mmx sse2
vp9_mbpost_proc_down_sse2=vp9_mbpost_proc_down_xmm

139
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
140 141 142
specialize vp9_mbpost_proc_across_ip sse2
vp9_mbpost_proc_across_ip_sse2=vp9_mbpost_proc_across_ip_xmm

143
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
144 145 146
specialize vp9_post_proc_down_and_across mmx sse2
vp9_post_proc_down_and_across_sse2=vp9_post_proc_down_and_across_xmm

147
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
148 149
specialize vp9_plane_add_noise mmx sse2
vp9_plane_add_noise_sse2=vp9_plane_add_noise_wmt
150
fi
Jim Bankoski's avatar
Jim Bankoski committed
151

152
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
153 154
specialize vp9_blend_mb_inner

155
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
156 157
specialize vp9_blend_mb_outer

158
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
159 160
specialize vp9_blend_b

161 162 163
#
# Sub Pixel Filters
#
John Koleszar's avatar
John Koleszar committed
164
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"
165
specialize vp9_convolve8 ssse3
166

John Koleszar's avatar
John Koleszar committed
167
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"
168
specialize vp9_convolve8_horiz ssse3
169

John Koleszar's avatar
John Koleszar committed
170
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"
171
specialize vp9_convolve8_vert ssse3
172

John Koleszar's avatar
John Koleszar committed
173
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"
174
specialize vp9_convolve8_avg ssse3
175

John Koleszar's avatar
John Koleszar committed
176
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"
177
specialize vp9_convolve8_avg_horiz ssse3
178

John Koleszar's avatar
John Koleszar committed
179
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"
180
specialize vp9_convolve8_avg_vert ssse3
181

182 183 184
#
# dct
#
Yaowu Xu's avatar
Yaowu Xu committed
185 186
prototype void vp9_short_idct4x4_1 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct4x4_1
187

Yaowu Xu's avatar
Yaowu Xu committed
188 189
prototype void vp9_short_idct4x4 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct4x4 sse2
190

191
prototype void vp9_short_idct8x8 "int16_t *input, int16_t *output, int pitch"
Yunqing Wang's avatar
Yunqing Wang committed
192
specialize vp9_short_idct8x8 sse2
193

194
prototype void vp9_short_idct10_8x8 "int16_t *input, int16_t *output, int pitch"
Yunqing Wang's avatar
Yunqing Wang committed
195
specialize vp9_short_idct10_8x8 sse2
196

Yaowu Xu's avatar
Yaowu Xu committed
197 198 199
prototype void vp9_short_idct1_8x8 "int16_t *input, int16_t *output"
specialize vp9_short_idct1_8x8

Scott LaVarnway's avatar
Scott LaVarnway committed
200 201
prototype void vp9_short_idct16x16_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct16x16_add sse2
202

Scott LaVarnway's avatar
Scott LaVarnway committed
203 204
prototype void vp9_short_idct10_16x16_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct10_16x16_add sse2
205

Yaowu Xu's avatar
Yaowu Xu committed
206 207 208
prototype void vp9_short_idct1_16x16 "int16_t *input, int16_t *output"
specialize vp9_short_idct1_16x16

Scott LaVarnway's avatar
Scott LaVarnway committed
209 210
prototype void vp9_short_idct32x32_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct32x32_add sse2
211

212 213 214
prototype void vp9_short_idct1_32x32 "int16_t *input, int16_t *output"
specialize vp9_short_idct1_32x32

Scott LaVarnway's avatar
Scott LaVarnway committed
215 216
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
217

Jingning Han's avatar
Jingning Han committed
218
prototype void vp9_short_iht8x8 "int16_t *input, int16_t *output, int pitch, int tx_type"
219 220
specialize vp9_short_iht8x8

Jingning Han's avatar
Jingning Han committed
221 222 223
prototype void vp9_short_iht4x4 "int16_t *input, int16_t *output, int pitch, int tx_type"
specialize vp9_short_iht4x4

Scott LaVarnway's avatar
Scott LaVarnway committed
224 225
prototype void vp9_short_iht16x16_add "int16_t *input, uint8_t *output, int pitch, int tx_type"
specialize vp9_short_iht16x16_add
226

Yunqing Wang's avatar
Yunqing Wang committed
227 228 229
prototype void vp9_idct4_1d "int16_t *input, int16_t *output"
specialize vp9_idct4_1d sse2

230 231
# dct and add

232
prototype void vp9_dc_only_idct_add "int input_dc, uint8_t *pred_ptr, uint8_t *dst_ptr, int pitch, int stride"
233
specialize vp9_dc_only_idct_add sse2
234

Yaowu Xu's avatar
Yaowu Xu committed
235 236 237 238
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
239
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
240
specialize vp9_dc_only_inv_walsh_add
241

242
prototype unsigned int vp9_sad32x3 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int ref_stride, int max_sad"
243 244
specialize vp9_sad32x3

245
prototype unsigned int vp9_sad3x32 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int ref_stride, int max_sad"
246 247
specialize vp9_sad3x32

248 249 250
#
# Encoder functions below this point.
#
251
if [ "$CONFIG_VP9_ENCODER" = "yes" ]; then
252 253 254 255 256


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

257 258 259 260 261 262 263 264 265 266 267
prototype unsigned int vp9_variance32x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance32x16

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

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

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

269
prototype unsigned int vp9_variance32x32 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
270
specialize vp9_variance32x32
271

Ronald S. Bultje's avatar
Ronald S. Bultje committed
272 273 274
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

275
prototype unsigned int vp9_variance16x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
276 277 278
specialize vp9_variance16x16 mmx sse2
vp9_variance16x16_sse2=vp9_variance16x16_wmt
vp9_variance16x16_mmx=vp9_variance16x16_mmx
279

280
prototype unsigned int vp9_variance16x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
281 282 283
specialize vp9_variance16x8 mmx sse2
vp9_variance16x8_sse2=vp9_variance16x8_wmt
vp9_variance16x8_mmx=vp9_variance16x8_mmx
284

285
prototype unsigned int vp9_variance8x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
286 287 288
specialize vp9_variance8x16 mmx sse2
vp9_variance8x16_sse2=vp9_variance8x16_wmt
vp9_variance8x16_mmx=vp9_variance8x16_mmx
289

290
prototype unsigned int vp9_variance8x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
291 292 293
specialize vp9_variance8x8 mmx sse2
vp9_variance8x8_sse2=vp9_variance8x8_wmt
vp9_variance8x8_mmx=vp9_variance8x8_mmx
294

295 296 297 298 299 300
prototype unsigned int vp9_variance8x4 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance8x4

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

301
prototype unsigned int vp9_variance4x4 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
302 303 304
specialize vp9_variance4x4 mmx sse2
vp9_variance4x4_sse2=vp9_variance4x4_wmt
vp9_variance4x4_mmx=vp9_variance4x4_mmx
305

Yaowu Xu's avatar
Yaowu Xu committed
306
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"
307
specialize vp9_sub_pixel_variance64x64 sse2
Ronald S. Bultje's avatar
Ronald S. Bultje committed
308

309 310 311
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"
specialize vp9_sub_pixel_avg_variance64x64

312 313 314
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"
specialize vp9_sub_pixel_variance32x64

315 316 317
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"
specialize vp9_sub_pixel_avg_variance32x64

318 319 320
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"
specialize vp9_sub_pixel_variance64x32

321 322 323
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"
specialize vp9_sub_pixel_avg_variance64x32

324 325 326
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"
specialize vp9_sub_pixel_variance32x16

327 328 329
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"
specialize vp9_sub_pixel_avg_variance32x16

330 331
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"
specialize vp9_sub_pixel_variance16x32
332

333 334 335
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"
specialize vp9_sub_pixel_avg_variance16x32

Yaowu Xu's avatar
Yaowu Xu committed
336
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"
337
specialize vp9_sub_pixel_variance32x32 sse2
338

339 340 341
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"
specialize vp9_sub_pixel_avg_variance32x32

Yaowu Xu's avatar
Yaowu Xu committed
342
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"
343
specialize vp9_sub_pixel_variance16x16 sse2 mmx ssse3
344

345 346 347
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"
specialize vp9_sub_pixel_avg_variance16x16

Yaowu Xu's avatar
Yaowu Xu committed
348
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"
349 350
specialize vp9_sub_pixel_variance8x16 sse2 mmx
vp9_sub_pixel_variance8x16_sse2=vp9_sub_pixel_variance8x16_wmt
351

352 353 354
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"
specialize vp9_sub_pixel_avg_variance8x16

Yaowu Xu's avatar
Yaowu Xu committed
355
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"
356 357 358
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
359

360 361 362
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"
specialize vp9_sub_pixel_avg_variance16x8

Yaowu Xu's avatar
Yaowu Xu committed
363
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"
364 365
specialize vp9_sub_pixel_variance8x8 sse2 mmx
vp9_sub_pixel_variance8x8_sse2=vp9_sub_pixel_variance8x8_wmt
366

367 368 369
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"
specialize vp9_sub_pixel_avg_variance8x8

Yaowu Xu's avatar
Yaowu Xu committed
370
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"
371 372
specialize vp9_sub_pixel_variance4x4 sse2 mmx
vp9_sub_pixel_variance4x4_sse2=vp9_sub_pixel_variance4x4_wmt
373

374 375 376
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"
specialize vp9_sub_pixel_avg_variance4x4

Ronald S. Bultje's avatar
Ronald S. Bultje committed
377
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"
378
specialize vp9_sad64x64 sse2
Ronald S. Bultje's avatar
Ronald S. Bultje committed
379

380
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"
381
specialize vp9_sad32x64 sse2
382 383

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"
384
specialize vp9_sad64x32 sse2
385 386

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"
387
specialize vp9_sad32x16 sse2
388 389

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"
390 391
specialize vp9_sad16x32 sse2

392
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"
393
specialize vp9_sad32x32 sse2
394

395
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"
396
specialize vp9_sad16x16 mmx sse2
397

398
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"
399
specialize vp9_sad16x8 mmx sse2
400

401
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"
402
specialize vp9_sad8x16 mmx sse2
403

404
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"
405
specialize vp9_sad8x8 mmx sse2
406

407
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"
408
specialize vp9_sad4x4 mmx sse
409

410
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"
411 412
specialize vp9_variance_halfpixvar16x16_h mmx sse2
vp9_variance_halfpixvar16x16_h_sse2=vp9_variance_halfpixvar16x16_h_wmt
413

414
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"
415 416
specialize vp9_variance_halfpixvar16x16_v mmx sse2
vp9_variance_halfpixvar16x16_v_sse2=vp9_variance_halfpixvar16x16_v_wmt
417

418
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"
419 420
specialize vp9_variance_halfpixvar16x16_hv mmx sse2
vp9_variance_halfpixvar16x16_hv_sse2=vp9_variance_halfpixvar16x16_hv_wmt
421

Ronald S. Bultje's avatar
Ronald S. Bultje committed
422 423 424 425 426 427 428 429 430
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

431
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"
432
specialize vp9_variance_halfpixvar32x32_h
433

434
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"
435
specialize vp9_variance_halfpixvar32x32_v
436

437
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"
438
specialize vp9_variance_halfpixvar32x32_hv
439

Ronald S. Bultje's avatar
Ronald S. Bultje committed
440 441 442
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

443
prototype void vp9_sad32x32x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
444
specialize vp9_sad32x32x3
445

446
prototype void vp9_sad16x16x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
447
specialize vp9_sad16x16x3 sse3 ssse3
448

449
prototype void vp9_sad16x8x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
450
specialize vp9_sad16x8x3 sse3 ssse3
451

452
prototype void vp9_sad8x16x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
453
specialize vp9_sad8x16x3 sse3
454

455
prototype void vp9_sad8x8x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
456
specialize vp9_sad8x8x3 sse3
457

458
prototype void vp9_sad4x4x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array"
459
specialize vp9_sad4x4x3 sse3
460

461
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
462 463
specialize vp9_sad64x64x8

464
prototype void vp9_sad32x32x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
465
specialize vp9_sad32x32x8
466

467
prototype void vp9_sad16x16x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
468
specialize vp9_sad16x16x8 sse4
469

470
prototype void vp9_sad16x8x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
471
specialize vp9_sad16x8x8 sse4
472

473
prototype void vp9_sad8x16x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
474
specialize vp9_sad8x16x8 sse4
475

476
prototype void vp9_sad8x8x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
477
specialize vp9_sad8x8x8 sse4
478

479
prototype void vp9_sad4x4x8 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array"
480
specialize vp9_sad4x4x8 sse4
481

482
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"
483
specialize vp9_sad64x64x4d sse2
Ronald S. Bultje's avatar
Ronald S. Bultje committed
484

485
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"
486
specialize vp9_sad32x64x4d sse2
487 488

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"
489
specialize vp9_sad64x32x4d sse2
490 491

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"
492
specialize vp9_sad32x16x4d sse2
493 494

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"
495 496
specialize vp9_sad16x32x4d sse2

497
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"
498
specialize vp9_sad32x32x4d sse2
499

500
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"
501
specialize vp9_sad16x16x4d sse2
502

503
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"
504
specialize vp9_sad16x8x4d sse2
505

506
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"
507
specialize vp9_sad8x16x4d sse2
508

509
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"
510
specialize vp9_sad8x8x4d sse2
511

512
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"
513
specialize vp9_sad4x4x4d sse
514
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"
515
specialize vp9_sub_pixel_mse16x16 sse2 mmx
516

517
prototype unsigned int vp9_mse16x16 "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse"
518 519
specialize vp9_mse16x16 mmx sse2
vp9_mse16x16_sse2=vp9_mse16x16_wmt
520

Yaowu Xu's avatar
Yaowu Xu committed
521
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
522 523
specialize vp9_sub_pixel_mse64x64

Yaowu Xu's avatar
Yaowu Xu committed
524
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"
525
specialize vp9_sub_pixel_mse32x32
526

527
prototype unsigned int vp9_get_mb_ss "const int16_t *"
528
specialize vp9_get_mb_ss mmx sse2
Jim Bankoski's avatar
Jim Bankoski committed
529 530
# ENCODEMB INVOKE

531
prototype int vp9_block_error "int16_t *coeff, int16_t *dqcoeff, int block_size"
532 533
specialize vp9_block_error mmx sse2
vp9_block_error_sse2=vp9_block_error_xmm
Jim Bankoski's avatar
Jim Bankoski committed
534

535 536 537 538 539 540
#
# Structured Similarity (SSIM)
#
if [ "$CONFIG_INTERNAL_STATS" = "yes" ]; then
    [ $arch = "x86_64" ] && sse2_on_x86_64=sse2

541
    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"
542
    specialize vp9_ssim_parms_8x8 $sse2_on_x86_64
543

544
    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"
545
    specialize vp9_ssim_parms_16x16 $sse2_on_x86_64
546 547
fi

Jim Bankoski's avatar
Jim Bankoski committed
548
# fdct functions
549 550 551 552 553 554 555 556 557
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

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

561
prototype void vp9_short_fdct4x4 "int16_t *InputData, int16_t *OutputData, int pitch"
562
specialize vp9_short_fdct4x4 sse2
Jim Bankoski's avatar
Jim Bankoski committed
563

564
prototype void vp9_short_fdct8x4 "int16_t *InputData, int16_t *OutputData, int pitch"
565
specialize vp9_short_fdct8x4 sse2
Jim Bankoski's avatar
Jim Bankoski committed
566

567
prototype void vp9_short_fdct32x32 "int16_t *InputData, int16_t *OutputData, int pitch"
568 569
specialize vp9_short_fdct32x32

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

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

Yaowu Xu's avatar
Yaowu Xu committed
576 577
prototype void vp9_short_walsh8x4 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_walsh8x4
Jim Bankoski's avatar
Jim Bankoski committed
578

Jim Bankoski's avatar
Jim Bankoski committed
579 580 581
#
# Motion search
#
John Koleszar's avatar
John Koleszar committed
582
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
583 584 585 586
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
587
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
588 589 590
specialize vp9_refining_search_sad sse3
vp9_refining_search_sad_sse3=vp9_refining_search_sadx4

John Koleszar's avatar
John Koleszar committed
591
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
592
specialize vp9_diamond_search_sad sse3
Jim Bankoski's avatar
Jim Bankoski committed
593 594
vp9_diamond_search_sad_sse3=vp9_diamond_search_sadx4

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

598
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
599
specialize vp9_yv12_copy_partial_frame
600

Jim Bankoski's avatar
Jim Bankoski committed
601

602 603
fi
# end encoder functions