15c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#ifndef VP8_RTCD_H_
293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#define VP8_RTCD_H_
35c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
45c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#ifdef RTCD_C
55c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#define RTCD_EXTERN
65c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#else
75c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#define RTCD_EXTERN extern
85c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#endif
95c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
105c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)/*
115c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * VP8
125c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) */
135c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
145c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)struct blockd;
155c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)struct macroblockd;
165c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)struct loop_filter_info;
175c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
185c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)/* Encoder forward decls */
195c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)struct block;
205c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)struct macroblock;
215c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)struct variance_vtable;
225c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)union int_mv;
235c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)struct yv12_buffer_config;
245c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
255c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#ifdef __cplusplus
265c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)extern "C" {
275c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#endif
285c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
295c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
305c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)void vp8_bilinear_predict16x16_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
311e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)void vp8_bilinear_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
321e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)void vp8_bilinear_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
335c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
341e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)
355c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
365c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)void vp8_bilinear_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
375c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_mmx
3809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
3909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
4009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_bilinear_predict8x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
4109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_mmx
4209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
4309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
4409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_bilinear_predict8x8_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
4509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_bilinear_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
4609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_bilinear_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
4709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
4809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
4909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride);
5009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_blend_b vp8_blend_b_c
5109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
5209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride);
5309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_blend_mb_inner vp8_blend_mb_inner_c
5409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
5509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride);
5609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_blend_mb_outer vp8_blend_mb_outer_c
5709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
5809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)int vp8_block_error_c(short *coeff, short *dqcoeff);
5909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)int vp8_block_error_mmx(short *coeff, short *dqcoeff);
6009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)int vp8_block_error_xmm(short *coeff, short *dqcoeff);
6109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_block_error vp8_block_error_xmm
6209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
6309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_build_intra_predictors_mbuv_s_c(struct macroblockd *x, unsigned char * uabove_row, unsigned char * vabove_row,  unsigned char *uleft, unsigned char *vleft, int left_stride, unsigned char * upred_ptr, unsigned char * vpred_ptr, int pred_stride);
641e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)void vp8_build_intra_predictors_mbuv_s_sse2(struct macroblockd *x, unsigned char * uabove_row, unsigned char * vabove_row,  unsigned char *uleft, unsigned char *vleft, int left_stride, unsigned char * upred_ptr, unsigned char * vpred_ptr, int pred_stride);
651e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)void vp8_build_intra_predictors_mbuv_s_ssse3(struct macroblockd *x, unsigned char * uabove_row, unsigned char * vabove_row,  unsigned char *uleft, unsigned char *vleft, int left_stride, unsigned char * upred_ptr, unsigned char * vpred_ptr, int pred_stride);
661e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)RTCD_EXTERN void (*vp8_build_intra_predictors_mbuv_s)(struct macroblockd *x, unsigned char * uabove_row, unsigned char * vabove_row,  unsigned char *uleft, unsigned char *vleft, int left_stride, unsigned char * upred_ptr, unsigned char * vpred_ptr, int pred_stride);
671e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)
6893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)void vp8_build_intra_predictors_mby_s_c(struct macroblockd *x, unsigned char * yabove_row, unsigned char * yleft, int left_stride, unsigned char * ypred_ptr, int y_stride);
691e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)void vp8_build_intra_predictors_mby_s_sse2(struct macroblockd *x, unsigned char * yabove_row, unsigned char * yleft, int left_stride, unsigned char * ypred_ptr, int y_stride);
701e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)void vp8_build_intra_predictors_mby_s_ssse3(struct macroblockd *x, unsigned char * yabove_row, unsigned char * yleft, int left_stride, unsigned char * ypred_ptr, int y_stride);
711e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)RTCD_EXTERN void (*vp8_build_intra_predictors_mby_s)(struct macroblockd *x, unsigned char * yabove_row, unsigned char * yleft, int left_stride, unsigned char * ypred_ptr, int y_stride);
7293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
7309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_clear_system_state_c();
7409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vpx_reset_mmx_state();
7509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_clear_system_state vpx_reset_mmx_state
7609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
7709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_copy32xn_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, int n);
7809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_copy32xn_sse2(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, int n);
7909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_copy32xn_sse3(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, int n);
8009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, int n);
8109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
8209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
8309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_copy_mem16x16_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
8409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_copy_mem16x16_sse2(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
8509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_copy_mem16x16 vp8_copy_mem16x16_sse2
8609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
8709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
8809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_copy_mem8x4_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
8909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_copy_mem8x4 vp8_copy_mem8x4_mmx
9009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
9109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
9209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_copy_mem8x8_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
9309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_copy_mem8x8 vp8_copy_mem8x8_mmx
9409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
9509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride);
9609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_dc_only_idct_add_mmx(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride);
9709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_dc_only_idct_add vp8_dc_only_idct_add_mmx
9809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
9909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising);
10009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)int vp8_denoiser_filter_sse2(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising);
10109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_denoiser_filter vp8_denoiser_filter_sse2
10209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
10309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising);
10409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)int vp8_denoiser_filter_uv_sse2(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising);
10509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_sse2
10609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
10709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride);
10810f88d5669dbd969c059d61ba09fa37dd72ac559Ben Murdochvoid vp8_dequant_idct_add_mmx(short *input, short *dq, unsigned char *output, int stride);
10910f88d5669dbd969c059d61ba09fa37dd72ac559Ben Murdoch#define vp8_dequant_idct_add vp8_dequant_idct_add_mmx
11010f88d5669dbd969c059d61ba09fa37dd72ac559Ben Murdoch
11110f88d5669dbd969c059d61ba09fa37dd72ac559Ben Murdochvoid vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs);
11210f88d5669dbd969c059d61ba09fa37dd72ac559Ben Murdochvoid vp8_dequant_idct_add_uv_block_mmx(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs);
11310f88d5669dbd969c059d61ba09fa37dd72ac559Ben Murdochvoid vp8_dequant_idct_add_uv_block_sse2(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs);
11410f88d5669dbd969c059d61ba09fa37dd72ac559Ben Murdoch#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_sse2
11510f88d5669dbd969c059d61ba09fa37dd72ac559Ben Murdoch
11610f88d5669dbd969c059d61ba09fa37dd72ac559Ben Murdochvoid vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs);
11709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_dequant_idct_add_y_block_mmx(short *q, short *dq, unsigned char *dst, int stride, char *eobs);
11809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_dequant_idct_add_y_block_sse2(short *q, short *dq, unsigned char *dst, int stride, char *eobs);
11909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2
12009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
12109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_dequantize_b_c(struct blockd*, short *dqc);
12209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_dequantize_b_mmx(struct blockd*, short *dqc);
12309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_dequantize_b vp8_dequantize_b_mmx
12409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
12509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)int vp8_diamond_search_sad_c(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 variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv);
12609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)int vp8_diamond_search_sadx4(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 variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv);
12709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)RTCD_EXTERN int (*vp8_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 variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv);
12809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
12909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_fast_quantize_b_c(struct block *, struct blockd *);
13009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_fast_quantize_b_sse2(struct block *, struct blockd *);
13109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_fast_quantize_b_ssse3(struct block *, struct blockd *);
13209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)RTCD_EXTERN void (*vp8_fast_quantize_b)(struct block *, struct blockd *);
13309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
13409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_fast_quantize_b_pair_c(struct block *b1, struct block *b2, struct blockd *d1, struct blockd *d2);
13509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_fast_quantize_b_pair vp8_fast_quantize_b_pair_c
13609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
13709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
13809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_filter_by_weight16x16_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
13909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_sse2
14009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
14109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
14209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c
14309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
14409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
14509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_filter_by_weight8x8_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
14609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_sse2
14709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
14809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv);
14909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)int vp8_full_search_sadx3(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv);
15009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)int vp8_full_search_sadx8(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv);
15109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)RTCD_EXTERN int (*vp8_full_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv);
15209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
15309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)unsigned int vp8_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride);
1546f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdochunsigned int vp8_get4x4sse_cs_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride);
1556f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdoch#define vp8_get4x4sse_cs vp8_get4x4sse_cs_mmx
1566f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdoch
1576f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdochunsigned int vp8_get_mb_ss_c(const short *);
1586f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdochunsigned int vp8_get_mb_ss_mmx(const short *);
1596f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdochunsigned int vp8_get_mb_ss_sse2(const short *);
1606f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdoch#define vp8_get_mb_ss vp8_get_mb_ss_sse2
1616f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdoch
16209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_intra4x4_predict_c(unsigned char *Above, unsigned char *yleft, int left_stride, int b_mode, unsigned char *dst, int dst_stride, unsigned char top_left);
16309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#define vp8_intra4x4_predict vp8_intra4x4_predict_c
1641e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)
1651e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
16609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)void vp8_loop_filter_bh_mmx(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
1671e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)void vp8_loop_filter_bh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
1681e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)#define vp8_loop_filter_bh vp8_loop_filter_bh_sse2
1695c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
1706f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdochvoid vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
1716f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdochvoid vp8_loop_filter_bv_mmx(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
1726f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdochvoid vp8_loop_filter_bv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
1736f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdoch#define vp8_loop_filter_bv vp8_loop_filter_bv_sse2
1746f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdoch
1756f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdochvoid vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
1766f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdochvoid vp8_loop_filter_mbh_mmx(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
1776f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdochvoid vp8_loop_filter_mbh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
1786f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdoch#define vp8_loop_filter_mbh vp8_loop_filter_mbh_sse2
1791e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)
180void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
181void vp8_loop_filter_mbv_mmx(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
182void vp8_loop_filter_mbv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
183#define vp8_loop_filter_mbv vp8_loop_filter_mbv_sse2
184
185void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit);
186void vp8_loop_filter_bhs_mmx(unsigned char *y, int ystride, const unsigned char *blimit);
187void vp8_loop_filter_bhs_sse2(unsigned char *y, int ystride, const unsigned char *blimit);
188#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_sse2
189
190void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit);
191void vp8_loop_filter_bvs_mmx(unsigned char *y, int ystride, const unsigned char *blimit);
192void vp8_loop_filter_bvs_sse2(unsigned char *y, int ystride, const unsigned char *blimit);
193#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_sse2
194
195void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit);
196void vp8_loop_filter_simple_horizontal_edge_mmx(unsigned char *y, int ystride, const unsigned char *blimit);
197void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit);
198#define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_sse2
199
200void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit);
201void vp8_loop_filter_simple_vertical_edge_mmx(unsigned char *y, int ystride, const unsigned char *blimit);
202void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit);
203#define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_sse2
204
205int vp8_mbblock_error_c(struct macroblock *mb, int dc);
206int vp8_mbblock_error_mmx(struct macroblock *mb, int dc);
207int vp8_mbblock_error_xmm(struct macroblock *mb, int dc);
208#define vp8_mbblock_error vp8_mbblock_error_xmm
209
210void vp8_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit);
211void vp8_mbpost_proc_across_ip_xmm(unsigned char *dst, int pitch, int rows, int cols,int flimit);
212#define vp8_mbpost_proc_across_ip vp8_mbpost_proc_across_ip_xmm
213
214void vp8_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit);
215void vp8_mbpost_proc_down_mmx(unsigned char *dst, int pitch, int rows, int cols,int flimit);
216void vp8_mbpost_proc_down_xmm(unsigned char *dst, int pitch, int rows, int cols,int flimit);
217#define vp8_mbpost_proc_down vp8_mbpost_proc_down_xmm
218
219int vp8_mbuverror_c(struct macroblock *mb);
220int vp8_mbuverror_mmx(struct macroblock *mb);
221int vp8_mbuverror_xmm(struct macroblock *mb);
222#define vp8_mbuverror vp8_mbuverror_xmm
223
224unsigned int vp8_mse16x16_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
225unsigned int vp8_mse16x16_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
226unsigned int vp8_mse16x16_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
227#define vp8_mse16x16 vp8_mse16x16_wmt
228
229void vp8_plane_add_noise_c(unsigned char *s, char *noise, char blackclamp[16], char whiteclamp[16], char bothclamp[16], unsigned int w, unsigned int h, int pitch);
230void vp8_plane_add_noise_mmx(unsigned char *s, char *noise, char blackclamp[16], char whiteclamp[16], char bothclamp[16], unsigned int w, unsigned int h, int pitch);
231void vp8_plane_add_noise_wmt(unsigned char *s, char *noise, char blackclamp[16], char whiteclamp[16], char bothclamp[16], unsigned int w, unsigned int h, int pitch);
232#define vp8_plane_add_noise vp8_plane_add_noise_wmt
233
234void vp8_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size);
235void vp8_post_proc_down_and_across_mb_row_sse2(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size);
236#define vp8_post_proc_down_and_across_mb_row vp8_post_proc_down_and_across_mb_row_sse2
237
238void vp8_quantize_mb_c(struct macroblock *);
239#define vp8_quantize_mb vp8_quantize_mb_c
240
241void vp8_quantize_mbuv_c(struct macroblock *);
242#define vp8_quantize_mbuv vp8_quantize_mbuv_c
243
244void vp8_quantize_mby_c(struct macroblock *);
245#define vp8_quantize_mby vp8_quantize_mby_c
246
247int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv);
248int vp8_refining_search_sadx4(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv);
249RTCD_EXTERN int (*vp8_refining_search_sad)(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv);
250
251void vp8_regular_quantize_b_c(struct block *, struct blockd *);
252void vp8_regular_quantize_b_sse2(struct block *, struct blockd *);
253void vp8_regular_quantize_b_sse4_1(struct block *, struct blockd *);
254RTCD_EXTERN void (*vp8_regular_quantize_b)(struct block *, struct blockd *);
255
256void vp8_regular_quantize_b_pair_c(struct block *b1, struct block *b2, struct blockd *d1, struct blockd *d2);
257#define vp8_regular_quantize_b_pair vp8_regular_quantize_b_pair_c
258
259unsigned int vp8_sad16x16_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
260unsigned int vp8_sad16x16_mmx(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
261unsigned int vp8_sad16x16_wmt(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
262unsigned int vp8_sad16x16_sse3(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
263RTCD_EXTERN unsigned int (*vp8_sad16x16)(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
264
265void vp8_sad16x16x3_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
266void vp8_sad16x16x3_sse3(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
267void vp8_sad16x16x3_ssse3(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
268RTCD_EXTERN void (*vp8_sad16x16x3)(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
269
270void vp8_sad16x16x4d_c(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
271void vp8_sad16x16x4d_sse3(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
272RTCD_EXTERN void (*vp8_sad16x16x4d)(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
273
274void vp8_sad16x16x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
275void vp8_sad16x16x8_sse4(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
276RTCD_EXTERN void (*vp8_sad16x16x8)(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
277
278unsigned int vp8_sad16x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
279unsigned int vp8_sad16x8_mmx(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
280unsigned int vp8_sad16x8_wmt(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
281#define vp8_sad16x8 vp8_sad16x8_wmt
282
283void vp8_sad16x8x3_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
284void vp8_sad16x8x3_sse3(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
285void vp8_sad16x8x3_ssse3(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
286RTCD_EXTERN void (*vp8_sad16x8x3)(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
287
288void vp8_sad16x8x4d_c(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
289void vp8_sad16x8x4d_sse3(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
290RTCD_EXTERN void (*vp8_sad16x8x4d)(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
291
292void vp8_sad16x8x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
293void vp8_sad16x8x8_sse4(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
294RTCD_EXTERN void (*vp8_sad16x8x8)(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
295
296unsigned int vp8_sad4x4_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
297unsigned int vp8_sad4x4_mmx(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
298unsigned int vp8_sad4x4_wmt(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
299#define vp8_sad4x4 vp8_sad4x4_wmt
300
301void vp8_sad4x4x3_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
302void vp8_sad4x4x3_sse3(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
303RTCD_EXTERN void (*vp8_sad4x4x3)(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
304
305void vp8_sad4x4x4d_c(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
306void vp8_sad4x4x4d_sse3(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
307RTCD_EXTERN void (*vp8_sad4x4x4d)(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
308
309void vp8_sad4x4x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
310void vp8_sad4x4x8_sse4(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
311RTCD_EXTERN void (*vp8_sad4x4x8)(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
312
313unsigned int vp8_sad8x16_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
314unsigned int vp8_sad8x16_mmx(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
315unsigned int vp8_sad8x16_wmt(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
316#define vp8_sad8x16 vp8_sad8x16_wmt
317
318void vp8_sad8x16x3_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
319void vp8_sad8x16x3_sse3(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
320RTCD_EXTERN void (*vp8_sad8x16x3)(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
321
322void vp8_sad8x16x4d_c(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
323void vp8_sad8x16x4d_sse3(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
324RTCD_EXTERN void (*vp8_sad8x16x4d)(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
325
326void vp8_sad8x16x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
327void vp8_sad8x16x8_sse4(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
328RTCD_EXTERN void (*vp8_sad8x16x8)(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
329
330unsigned int vp8_sad8x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
331unsigned int vp8_sad8x8_mmx(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
332unsigned int vp8_sad8x8_wmt(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
333#define vp8_sad8x8 vp8_sad8x8_wmt
334
335void vp8_sad8x8x3_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
336void vp8_sad8x8x3_sse3(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
337RTCD_EXTERN void (*vp8_sad8x8x3)(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
338
339void vp8_sad8x8x4d_c(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
340void vp8_sad8x8x4d_sse3(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
341RTCD_EXTERN void (*vp8_sad8x8x4d)(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
342
343void vp8_sad8x8x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
344void vp8_sad8x8x8_sse4(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
345RTCD_EXTERN void (*vp8_sad8x8x8)(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
346
347void vp8_short_fdct4x4_c(short *input, short *output, int pitch);
348void vp8_short_fdct4x4_mmx(short *input, short *output, int pitch);
349void vp8_short_fdct4x4_sse2(short *input, short *output, int pitch);
350#define vp8_short_fdct4x4 vp8_short_fdct4x4_sse2
351
352void vp8_short_fdct8x4_c(short *input, short *output, int pitch);
353void vp8_short_fdct8x4_mmx(short *input, short *output, int pitch);
354void vp8_short_fdct8x4_sse2(short *input, short *output, int pitch);
355#define vp8_short_fdct8x4 vp8_short_fdct8x4_sse2
356
357void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride);
358void vp8_short_idct4x4llm_mmx(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride);
359#define vp8_short_idct4x4llm vp8_short_idct4x4llm_mmx
360
361void vp8_short_inv_walsh4x4_c(short *input, short *output);
362void vp8_short_inv_walsh4x4_mmx(short *input, short *output);
363void vp8_short_inv_walsh4x4_sse2(short *input, short *output);
364#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_sse2
365
366void vp8_short_inv_walsh4x4_1_c(short *input, short *output);
367#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
368
369void vp8_short_walsh4x4_c(short *input, short *output, int pitch);
370void vp8_short_walsh4x4_sse2(short *input, short *output, int pitch);
371#define vp8_short_walsh4x4 vp8_short_walsh4x4_sse2
372
373void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
374void vp8_sixtap_predict16x16_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
375void vp8_sixtap_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
376void vp8_sixtap_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
377RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
378
379void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
380void vp8_sixtap_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
381void vp8_sixtap_predict4x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
382RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
383
384void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
385void vp8_sixtap_predict8x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
386void vp8_sixtap_predict8x4_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
387void vp8_sixtap_predict8x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
388RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
389
390void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
391void vp8_sixtap_predict8x8_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
392void vp8_sixtap_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
393void vp8_sixtap_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
394RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
395
396unsigned int vp8_sub_pixel_mse16x16_c(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
397unsigned int vp8_sub_pixel_mse16x16_mmx(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
398unsigned int vp8_sub_pixel_mse16x16_wmt(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
399#define vp8_sub_pixel_mse16x16 vp8_sub_pixel_mse16x16_wmt
400
401unsigned int vp8_sub_pixel_variance16x16_c(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
402unsigned int vp8_sub_pixel_variance16x16_mmx(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
403unsigned int vp8_sub_pixel_variance16x16_wmt(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
404unsigned int vp8_sub_pixel_variance16x16_ssse3(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
405RTCD_EXTERN unsigned int (*vp8_sub_pixel_variance16x16)(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
406
407unsigned int vp8_sub_pixel_variance16x8_c(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
408unsigned int vp8_sub_pixel_variance16x8_mmx(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
409unsigned int vp8_sub_pixel_variance16x8_wmt(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
410unsigned int vp8_sub_pixel_variance16x8_ssse3(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
411RTCD_EXTERN unsigned int (*vp8_sub_pixel_variance16x8)(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
412
413unsigned int vp8_sub_pixel_variance4x4_c(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
414unsigned int vp8_sub_pixel_variance4x4_mmx(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
415unsigned int vp8_sub_pixel_variance4x4_wmt(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
416#define vp8_sub_pixel_variance4x4 vp8_sub_pixel_variance4x4_wmt
417
418unsigned int vp8_sub_pixel_variance8x16_c(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
419unsigned int vp8_sub_pixel_variance8x16_mmx(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
420unsigned int vp8_sub_pixel_variance8x16_wmt(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
421#define vp8_sub_pixel_variance8x16 vp8_sub_pixel_variance8x16_wmt
422
423unsigned int vp8_sub_pixel_variance8x8_c(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
424unsigned int vp8_sub_pixel_variance8x8_mmx(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
425unsigned int vp8_sub_pixel_variance8x8_wmt(const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
426#define vp8_sub_pixel_variance8x8 vp8_sub_pixel_variance8x8_wmt
427
428void vp8_subtract_b_c(struct block *be, struct blockd *bd, int pitch);
429void vp8_subtract_b_mmx(struct block *be, struct blockd *bd, int pitch);
430void vp8_subtract_b_sse2(struct block *be, struct blockd *bd, int pitch);
431#define vp8_subtract_b vp8_subtract_b_sse2
432
433void vp8_subtract_mbuv_c(short *diff, unsigned char *usrc, unsigned char *vsrc, int src_stride, unsigned char *upred, unsigned char *vpred, int pred_stride);
434void vp8_subtract_mbuv_mmx(short *diff, unsigned char *usrc, unsigned char *vsrc, int src_stride, unsigned char *upred, unsigned char *vpred, int pred_stride);
435void vp8_subtract_mbuv_sse2(short *diff, unsigned char *usrc, unsigned char *vsrc, int src_stride, unsigned char *upred, unsigned char *vpred, int pred_stride);
436#define vp8_subtract_mbuv vp8_subtract_mbuv_sse2
437
438void vp8_subtract_mby_c(short *diff, unsigned char *src, int src_stride, unsigned char *pred, int pred_stride);
439void vp8_subtract_mby_mmx(short *diff, unsigned char *src, int src_stride, unsigned char *pred, int pred_stride);
440void vp8_subtract_mby_sse2(short *diff, unsigned char *src, int src_stride, unsigned char *pred, int pred_stride);
441#define vp8_subtract_mby vp8_subtract_mby_sse2
442
443unsigned int vp8_variance16x16_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
444unsigned int vp8_variance16x16_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
445unsigned int vp8_variance16x16_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
446#define vp8_variance16x16 vp8_variance16x16_wmt
447
448unsigned int vp8_variance16x8_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
449unsigned int vp8_variance16x8_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
450unsigned int vp8_variance16x8_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
451#define vp8_variance16x8 vp8_variance16x8_wmt
452
453unsigned int vp8_variance4x4_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
454unsigned int vp8_variance4x4_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
455unsigned int vp8_variance4x4_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
456#define vp8_variance4x4 vp8_variance4x4_wmt
457
458unsigned int vp8_variance8x16_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
459unsigned int vp8_variance8x16_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
460unsigned int vp8_variance8x16_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
461#define vp8_variance8x16 vp8_variance8x16_wmt
462
463unsigned int vp8_variance8x8_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
464unsigned int vp8_variance8x8_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
465unsigned int vp8_variance8x8_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
466#define vp8_variance8x8 vp8_variance8x8_wmt
467
468unsigned int vp8_variance_halfpixvar16x16_h_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
469unsigned int vp8_variance_halfpixvar16x16_h_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
470unsigned int vp8_variance_halfpixvar16x16_h_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
471#define vp8_variance_halfpixvar16x16_h vp8_variance_halfpixvar16x16_h_wmt
472
473unsigned int vp8_variance_halfpixvar16x16_hv_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
474unsigned int vp8_variance_halfpixvar16x16_hv_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
475unsigned int vp8_variance_halfpixvar16x16_hv_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
476#define vp8_variance_halfpixvar16x16_hv vp8_variance_halfpixvar16x16_hv_wmt
477
478unsigned int vp8_variance_halfpixvar16x16_v_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
479unsigned int vp8_variance_halfpixvar16x16_v_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
480unsigned int vp8_variance_halfpixvar16x16_v_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
481#define vp8_variance_halfpixvar16x16_v vp8_variance_halfpixvar16x16_v_wmt
482
483void vp8_rtcd(void);
484
485#ifdef RTCD_C
486#include "vpx_ports/x86.h"
487static void setup_rtcd_internal(void)
488{
489    int flags = x86_simd_caps();
490
491    (void)flags;
492
493    vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_sse2;
494    if (flags & HAS_SSSE3) vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_ssse3;
495    vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_sse2;
496    if (flags & HAS_SSSE3) vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_ssse3;
497    vp8_build_intra_predictors_mbuv_s = vp8_build_intra_predictors_mbuv_s_sse2;
498    if (flags & HAS_SSSE3) vp8_build_intra_predictors_mbuv_s = vp8_build_intra_predictors_mbuv_s_ssse3;
499    vp8_build_intra_predictors_mby_s = vp8_build_intra_predictors_mby_s_sse2;
500    if (flags & HAS_SSSE3) vp8_build_intra_predictors_mby_s = vp8_build_intra_predictors_mby_s_ssse3;
501    vp8_copy32xn = vp8_copy32xn_sse2;
502    if (flags & HAS_SSE3) vp8_copy32xn = vp8_copy32xn_sse3;
503    vp8_diamond_search_sad = vp8_diamond_search_sad_c;
504    if (flags & HAS_SSE3) vp8_diamond_search_sad = vp8_diamond_search_sadx4;
505    vp8_fast_quantize_b = vp8_fast_quantize_b_sse2;
506    if (flags & HAS_SSSE3) vp8_fast_quantize_b = vp8_fast_quantize_b_ssse3;
507    vp8_full_search_sad = vp8_full_search_sad_c;
508    if (flags & HAS_SSE3) vp8_full_search_sad = vp8_full_search_sadx3;
509    if (flags & HAS_SSE4_1) vp8_full_search_sad = vp8_full_search_sadx8;
510    vp8_refining_search_sad = vp8_refining_search_sad_c;
511    if (flags & HAS_SSE3) vp8_refining_search_sad = vp8_refining_search_sadx4;
512    vp8_regular_quantize_b = vp8_regular_quantize_b_sse2;
513    if (flags & HAS_SSE4_1) vp8_regular_quantize_b = vp8_regular_quantize_b_sse4_1;
514    vp8_sad16x16 = vp8_sad16x16_wmt;
515    if (flags & HAS_SSE3) vp8_sad16x16 = vp8_sad16x16_sse3;
516    vp8_sad16x16x3 = vp8_sad16x16x3_c;
517    if (flags & HAS_SSE3) vp8_sad16x16x3 = vp8_sad16x16x3_sse3;
518    if (flags & HAS_SSSE3) vp8_sad16x16x3 = vp8_sad16x16x3_ssse3;
519    vp8_sad16x16x4d = vp8_sad16x16x4d_c;
520    if (flags & HAS_SSE3) vp8_sad16x16x4d = vp8_sad16x16x4d_sse3;
521    vp8_sad16x16x8 = vp8_sad16x16x8_c;
522    if (flags & HAS_SSE4_1) vp8_sad16x16x8 = vp8_sad16x16x8_sse4;
523    vp8_sad16x8x3 = vp8_sad16x8x3_c;
524    if (flags & HAS_SSE3) vp8_sad16x8x3 = vp8_sad16x8x3_sse3;
525    if (flags & HAS_SSSE3) vp8_sad16x8x3 = vp8_sad16x8x3_ssse3;
526    vp8_sad16x8x4d = vp8_sad16x8x4d_c;
527    if (flags & HAS_SSE3) vp8_sad16x8x4d = vp8_sad16x8x4d_sse3;
528    vp8_sad16x8x8 = vp8_sad16x8x8_c;
529    if (flags & HAS_SSE4_1) vp8_sad16x8x8 = vp8_sad16x8x8_sse4;
530    vp8_sad4x4x3 = vp8_sad4x4x3_c;
531    if (flags & HAS_SSE3) vp8_sad4x4x3 = vp8_sad4x4x3_sse3;
532    vp8_sad4x4x4d = vp8_sad4x4x4d_c;
533    if (flags & HAS_SSE3) vp8_sad4x4x4d = vp8_sad4x4x4d_sse3;
534    vp8_sad4x4x8 = vp8_sad4x4x8_c;
535    if (flags & HAS_SSE4_1) vp8_sad4x4x8 = vp8_sad4x4x8_sse4;
536    vp8_sad8x16x3 = vp8_sad8x16x3_c;
537    if (flags & HAS_SSE3) vp8_sad8x16x3 = vp8_sad8x16x3_sse3;
538    vp8_sad8x16x4d = vp8_sad8x16x4d_c;
539    if (flags & HAS_SSE3) vp8_sad8x16x4d = vp8_sad8x16x4d_sse3;
540    vp8_sad8x16x8 = vp8_sad8x16x8_c;
541    if (flags & HAS_SSE4_1) vp8_sad8x16x8 = vp8_sad8x16x8_sse4;
542    vp8_sad8x8x3 = vp8_sad8x8x3_c;
543    if (flags & HAS_SSE3) vp8_sad8x8x3 = vp8_sad8x8x3_sse3;
544    vp8_sad8x8x4d = vp8_sad8x8x4d_c;
545    if (flags & HAS_SSE3) vp8_sad8x8x4d = vp8_sad8x8x4d_sse3;
546    vp8_sad8x8x8 = vp8_sad8x8x8_c;
547    if (flags & HAS_SSE4_1) vp8_sad8x8x8 = vp8_sad8x8x8_sse4;
548    vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_sse2;
549    if (flags & HAS_SSSE3) vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_ssse3;
550    vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_mmx;
551    if (flags & HAS_SSSE3) vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_ssse3;
552    vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_sse2;
553    if (flags & HAS_SSSE3) vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_ssse3;
554    vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_sse2;
555    if (flags & HAS_SSSE3) vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_ssse3;
556    vp8_sub_pixel_variance16x16 = vp8_sub_pixel_variance16x16_wmt;
557    if (flags & HAS_SSSE3) vp8_sub_pixel_variance16x16 = vp8_sub_pixel_variance16x16_ssse3;
558    vp8_sub_pixel_variance16x8 = vp8_sub_pixel_variance16x8_wmt;
559    if (flags & HAS_SSSE3) vp8_sub_pixel_variance16x8 = vp8_sub_pixel_variance16x8_ssse3;
560}
561#endif
562
563#ifdef __cplusplus
564}  // extern "C"
565#endif
566
567#endif
568