Home | History | Annotate | Download | only in x86
      1 #ifndef VP8_RTCD_H_
      2 #define VP8_RTCD_H_
      3 
      4 #ifdef RTCD_C
      5 #define RTCD_EXTERN
      6 #else
      7 #define RTCD_EXTERN extern
      8 #endif
      9 
     10 #ifdef __cplusplus
     11 extern "C" {
     12 #endif
     13 
     14 /*
     15  * VP8
     16  */
     17 
     18 struct blockd;
     19 struct macroblockd;
     20 struct loop_filter_info;
     21 
     22 /* Encoder forward decls */
     23 struct block;
     24 struct macroblock;
     25 struct variance_vtable;
     26 union int_mv;
     27 struct yv12_buffer_config;
     28 
     29 void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
     30 void vp8_bilinear_predict16x16_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
     31 void vp8_bilinear_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
     32 #define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_sse2
     33 
     34 void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
     35 void vp8_bilinear_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
     36 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_mmx
     37 
     38 void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
     39 void vp8_bilinear_predict8x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
     40 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_mmx
     41 
     42 void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
     43 void vp8_bilinear_predict8x8_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
     44 void vp8_bilinear_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
     45 #define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_sse2
     46 
     47 void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride);
     48 #define vp8_blend_b vp8_blend_b_c
     49 
     50 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);
     51 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
     52 
     53 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);
     54 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
     55 
     56 int vp8_block_error_c(short *coeff, short *dqcoeff);
     57 int vp8_block_error_mmx(short *coeff, short *dqcoeff);
     58 int vp8_block_error_xmm(short *coeff, short *dqcoeff);
     59 #define vp8_block_error vp8_block_error_xmm
     60 
     61 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);
     62 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);
     63 #define vp8_build_intra_predictors_mbuv_s vp8_build_intra_predictors_mbuv_s_sse2
     64 
     65 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);
     66 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);
     67 #define vp8_build_intra_predictors_mby_s vp8_build_intra_predictors_mby_s_sse2
     68 
     69 void vp8_clear_system_state_c();
     70 void vpx_reset_mmx_state();
     71 #define vp8_clear_system_state vpx_reset_mmx_state
     72 
     73 void vp8_copy32xn_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, int n);
     74 void vp8_copy32xn_sse2(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, int n);
     75 #define vp8_copy32xn vp8_copy32xn_sse2
     76 
     77 void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
     78 void vp8_copy_mem16x16_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
     79 void vp8_copy_mem16x16_sse2(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
     80 #define vp8_copy_mem16x16 vp8_copy_mem16x16_sse2
     81 
     82 void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
     83 void vp8_copy_mem8x4_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
     84 #define vp8_copy_mem8x4 vp8_copy_mem8x4_mmx
     85 
     86 void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
     87 void vp8_copy_mem8x8_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
     88 #define vp8_copy_mem8x8 vp8_copy_mem8x8_mmx
     89 
     90 void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride);
     91 void vp8_dc_only_idct_add_mmx(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride);
     92 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_mmx
     93 
     94 int vp8_denoiser_filter_c(struct yv12_buffer_config* mc_running_avg, struct yv12_buffer_config* running_avg, struct macroblock* signal, unsigned int motion_magnitude2, int y_offset, int uv_offset);
     95 int vp8_denoiser_filter_sse2(struct yv12_buffer_config* mc_running_avg, struct yv12_buffer_config* running_avg, struct macroblock* signal, unsigned int motion_magnitude2, int y_offset, int uv_offset);
     96 #define vp8_denoiser_filter vp8_denoiser_filter_sse2
     97 
     98 void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride);
     99 void vp8_dequant_idct_add_mmx(short *input, short *dq, unsigned char *output, int stride);
    100 #define vp8_dequant_idct_add vp8_dequant_idct_add_mmx
    101 
    102 void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs);
    103 void vp8_dequant_idct_add_uv_block_mmx(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs);
    104 void vp8_dequant_idct_add_uv_block_sse2(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs);
    105 #define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_sse2
    106 
    107 void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs);
    108 void vp8_dequant_idct_add_y_block_mmx(short *q, short *dq, unsigned char *dst, int stride, char *eobs);
    109 void vp8_dequant_idct_add_y_block_sse2(short *q, short *dq, unsigned char *dst, int stride, char *eobs);
    110 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2
    111 
    112 void vp8_dequantize_b_c(struct blockd*, short *dqc);
    113 void vp8_dequantize_b_mmx(struct blockd*, short *dqc);
    114 #define vp8_dequantize_b vp8_dequantize_b_mmx
    115 
    116 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);
    117 #define vp8_diamond_search_sad vp8_diamond_search_sad_c
    118 
    119 void vp8_fast_quantize_b_c(struct block *, struct blockd *);
    120 void vp8_fast_quantize_b_sse2(struct block *, struct blockd *);
    121 #define vp8_fast_quantize_b vp8_fast_quantize_b_sse2
    122 
    123 void vp8_fast_quantize_b_pair_c(struct block *b1, struct block *b2, struct blockd *d1, struct blockd *d2);
    124 #define vp8_fast_quantize_b_pair vp8_fast_quantize_b_pair_c
    125 
    126 void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
    127 void vp8_filter_by_weight16x16_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
    128 #define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_sse2
    129 
    130 void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
    131 #define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c
    132 
    133 void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
    134 void vp8_filter_by_weight8x8_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
    135 #define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_sse2
    136 
    137 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);
    138 #define vp8_full_search_sad vp8_full_search_sad_c
    139 
    140 unsigned int vp8_get4x4sse_cs_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride);
    141 unsigned int vp8_get4x4sse_cs_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride);
    142 #define vp8_get4x4sse_cs vp8_get4x4sse_cs_mmx
    143 
    144 unsigned int vp8_get_mb_ss_c(const short *);
    145 unsigned int vp8_get_mb_ss_mmx(const short *);
    146 unsigned int vp8_get_mb_ss_sse2(const short *);
    147 #define vp8_get_mb_ss vp8_get_mb_ss_sse2
    148 
    149 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);
    150 #define vp8_intra4x4_predict vp8_intra4x4_predict_c
    151 
    152 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);
    153 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);
    154 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);
    155 #define vp8_loop_filter_bh vp8_loop_filter_bh_sse2
    156 
    157 void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
    158 void vp8_loop_filter_bv_mmx(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
    159 void vp8_loop_filter_bv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
    160 #define vp8_loop_filter_bv vp8_loop_filter_bv_sse2
    161 
    162 void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
    163 void vp8_loop_filter_mbh_mmx(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
    164 void vp8_loop_filter_mbh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
    165 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_sse2
    166 
    167 void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
    168 void vp8_loop_filter_mbv_mmx(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
    169 void vp8_loop_filter_mbv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
    170 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_sse2
    171 
    172 void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit);
    173 void vp8_loop_filter_bhs_mmx(unsigned char *y, int ystride, const unsigned char *blimit);
    174 void vp8_loop_filter_bhs_sse2(unsigned char *y, int ystride, const unsigned char *blimit);
    175 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_sse2
    176 
    177 void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit);
    178 void vp8_loop_filter_bvs_mmx(unsigned char *y, int ystride, const unsigned char *blimit);
    179 void vp8_loop_filter_bvs_sse2(unsigned char *y, int ystride, const unsigned char *blimit);
    180 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_sse2
    181 
    182 void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit);
    183 void vp8_loop_filter_simple_horizontal_edge_mmx(unsigned char *y, int ystride, const unsigned char *blimit);
    184 void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit);
    185 #define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_sse2
    186 
    187 void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit);
    188 void vp8_loop_filter_simple_vertical_edge_mmx(unsigned char *y, int ystride, const unsigned char *blimit);
    189 void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit);
    190 #define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_sse2
    191 
    192 int vp8_mbblock_error_c(struct macroblock *mb, int dc);
    193 int vp8_mbblock_error_mmx(struct macroblock *mb, int dc);
    194 int vp8_mbblock_error_xmm(struct macroblock *mb, int dc);
    195 #define vp8_mbblock_error vp8_mbblock_error_xmm
    196 
    197 void vp8_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit);
    198 void vp8_mbpost_proc_across_ip_xmm(unsigned char *dst, int pitch, int rows, int cols,int flimit);
    199 #define vp8_mbpost_proc_across_ip vp8_mbpost_proc_across_ip_xmm
    200 
    201 void vp8_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit);
    202 void vp8_mbpost_proc_down_mmx(unsigned char *dst, int pitch, int rows, int cols,int flimit);
    203 void vp8_mbpost_proc_down_xmm(unsigned char *dst, int pitch, int rows, int cols,int flimit);
    204 #define vp8_mbpost_proc_down vp8_mbpost_proc_down_xmm
    205 
    206 int vp8_mbuverror_c(struct macroblock *mb);
    207 int vp8_mbuverror_mmx(struct macroblock *mb);
    208 int vp8_mbuverror_xmm(struct macroblock *mb);
    209 #define vp8_mbuverror vp8_mbuverror_xmm
    210 
    211 unsigned int vp8_mse16x16_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    212 unsigned int vp8_mse16x16_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    213 unsigned int vp8_mse16x16_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    214 #define vp8_mse16x16 vp8_mse16x16_wmt
    215 
    216 void 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);
    217 void 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);
    218 void 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);
    219 #define vp8_plane_add_noise vp8_plane_add_noise_wmt
    220 
    221 void 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);
    222 void 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);
    223 #define vp8_post_proc_down_and_across_mb_row vp8_post_proc_down_and_across_mb_row_sse2
    224 
    225 void vp8_quantize_mb_c(struct macroblock *);
    226 #define vp8_quantize_mb vp8_quantize_mb_c
    227 
    228 void vp8_quantize_mbuv_c(struct macroblock *);
    229 #define vp8_quantize_mbuv vp8_quantize_mbuv_c
    230 
    231 void vp8_quantize_mby_c(struct macroblock *);
    232 #define vp8_quantize_mby vp8_quantize_mby_c
    233 
    234 int 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);
    235 #define vp8_refining_search_sad vp8_refining_search_sad_c
    236 
    237 void vp8_regular_quantize_b_c(struct block *, struct blockd *);
    238 void vp8_regular_quantize_b_sse2(struct block *, struct blockd *);
    239 #define vp8_regular_quantize_b vp8_regular_quantize_b_sse2
    240 
    241 void vp8_regular_quantize_b_pair_c(struct block *b1, struct block *b2, struct blockd *d1, struct blockd *d2);
    242 #define vp8_regular_quantize_b_pair vp8_regular_quantize_b_pair_c
    243 
    244 unsigned int vp8_sad16x16_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    245 unsigned int vp8_sad16x16_mmx(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    246 unsigned int vp8_sad16x16_wmt(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    247 #define vp8_sad16x16 vp8_sad16x16_wmt
    248 
    249 void vp8_sad16x16x3_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
    250 #define vp8_sad16x16x3 vp8_sad16x16x3_c
    251 
    252 void vp8_sad16x16x4d_c(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
    253 #define vp8_sad16x16x4d vp8_sad16x16x4d_c
    254 
    255 void vp8_sad16x16x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
    256 #define vp8_sad16x16x8 vp8_sad16x16x8_c
    257 
    258 unsigned int vp8_sad16x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    259 unsigned int vp8_sad16x8_mmx(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    260 unsigned int vp8_sad16x8_wmt(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    261 #define vp8_sad16x8 vp8_sad16x8_wmt
    262 
    263 void vp8_sad16x8x3_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
    264 #define vp8_sad16x8x3 vp8_sad16x8x3_c
    265 
    266 void vp8_sad16x8x4d_c(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
    267 #define vp8_sad16x8x4d vp8_sad16x8x4d_c
    268 
    269 void vp8_sad16x8x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
    270 #define vp8_sad16x8x8 vp8_sad16x8x8_c
    271 
    272 unsigned int vp8_sad4x4_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    273 unsigned int vp8_sad4x4_mmx(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    274 unsigned int vp8_sad4x4_wmt(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    275 #define vp8_sad4x4 vp8_sad4x4_wmt
    276 
    277 void vp8_sad4x4x3_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
    278 #define vp8_sad4x4x3 vp8_sad4x4x3_c
    279 
    280 void vp8_sad4x4x4d_c(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
    281 #define vp8_sad4x4x4d vp8_sad4x4x4d_c
    282 
    283 void vp8_sad4x4x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
    284 #define vp8_sad4x4x8 vp8_sad4x4x8_c
    285 
    286 unsigned int vp8_sad8x16_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    287 unsigned int vp8_sad8x16_mmx(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    288 unsigned int vp8_sad8x16_wmt(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    289 #define vp8_sad8x16 vp8_sad8x16_wmt
    290 
    291 void vp8_sad8x16x3_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
    292 #define vp8_sad8x16x3 vp8_sad8x16x3_c
    293 
    294 void vp8_sad8x16x4d_c(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
    295 #define vp8_sad8x16x4d vp8_sad8x16x4d_c
    296 
    297 void vp8_sad8x16x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
    298 #define vp8_sad8x16x8 vp8_sad8x16x8_c
    299 
    300 unsigned int vp8_sad8x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    301 unsigned int vp8_sad8x8_mmx(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    302 unsigned int vp8_sad8x8_wmt(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad);
    303 #define vp8_sad8x8 vp8_sad8x8_wmt
    304 
    305 void vp8_sad8x8x3_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array);
    306 #define vp8_sad8x8x3 vp8_sad8x8x3_c
    307 
    308 void vp8_sad8x8x4d_c(const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array);
    309 #define vp8_sad8x8x4d vp8_sad8x8x4d_c
    310 
    311 void vp8_sad8x8x8_c(const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array);
    312 #define vp8_sad8x8x8 vp8_sad8x8x8_c
    313 
    314 void vp8_short_fdct4x4_c(short *input, short *output, int pitch);
    315 void vp8_short_fdct4x4_mmx(short *input, short *output, int pitch);
    316 void vp8_short_fdct4x4_sse2(short *input, short *output, int pitch);
    317 #define vp8_short_fdct4x4 vp8_short_fdct4x4_sse2
    318 
    319 void vp8_short_fdct8x4_c(short *input, short *output, int pitch);
    320 void vp8_short_fdct8x4_mmx(short *input, short *output, int pitch);
    321 void vp8_short_fdct8x4_sse2(short *input, short *output, int pitch);
    322 #define vp8_short_fdct8x4 vp8_short_fdct8x4_sse2
    323 
    324 void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride);
    325 void vp8_short_idct4x4llm_mmx(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride);
    326 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_mmx
    327 
    328 void vp8_short_inv_walsh4x4_c(short *input, short *output);
    329 void vp8_short_inv_walsh4x4_mmx(short *input, short *output);
    330 void vp8_short_inv_walsh4x4_sse2(short *input, short *output);
    331 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_sse2
    332 
    333 void vp8_short_inv_walsh4x4_1_c(short *input, short *output);
    334 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
    335 
    336 void vp8_short_walsh4x4_c(short *input, short *output, int pitch);
    337 void vp8_short_walsh4x4_sse2(short *input, short *output, int pitch);
    338 #define vp8_short_walsh4x4 vp8_short_walsh4x4_sse2
    339 
    340 void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
    341 void vp8_sixtap_predict16x16_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
    342 void vp8_sixtap_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
    343 #define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_sse2
    344 
    345 void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
    346 void vp8_sixtap_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
    347 #define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_mmx
    348 
    349 void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
    350 void vp8_sixtap_predict8x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
    351 void vp8_sixtap_predict8x4_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
    352 #define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_sse2
    353 
    354 void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
    355 void vp8_sixtap_predict8x8_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
    356 void vp8_sixtap_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
    357 #define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_sse2
    358 
    359 unsigned 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);
    360 unsigned 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);
    361 unsigned 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);
    362 #define vp8_sub_pixel_mse16x16 vp8_sub_pixel_mse16x16_wmt
    363 
    364 unsigned 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);
    365 unsigned 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);
    366 unsigned 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);
    367 #define vp8_sub_pixel_variance16x16 vp8_sub_pixel_variance16x16_wmt
    368 
    369 unsigned 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);
    370 unsigned 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);
    371 unsigned 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);
    372 #define vp8_sub_pixel_variance16x8 vp8_sub_pixel_variance16x8_wmt
    373 
    374 unsigned 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);
    375 unsigned 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);
    376 unsigned 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);
    377 #define vp8_sub_pixel_variance4x4 vp8_sub_pixel_variance4x4_wmt
    378 
    379 unsigned 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);
    380 unsigned 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);
    381 unsigned 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);
    382 #define vp8_sub_pixel_variance8x16 vp8_sub_pixel_variance8x16_wmt
    383 
    384 unsigned 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);
    385 unsigned 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);
    386 unsigned 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);
    387 #define vp8_sub_pixel_variance8x8 vp8_sub_pixel_variance8x8_wmt
    388 
    389 void vp8_subtract_b_c(struct block *be, struct blockd *bd, int pitch);
    390 void vp8_subtract_b_mmx(struct block *be, struct blockd *bd, int pitch);
    391 void vp8_subtract_b_sse2(struct block *be, struct blockd *bd, int pitch);
    392 #define vp8_subtract_b vp8_subtract_b_sse2
    393 
    394 void vp8_subtract_mbuv_c(short *diff, unsigned char *usrc, unsigned char *vsrc, int src_stride, unsigned char *upred, unsigned char *vpred, int pred_stride);
    395 void vp8_subtract_mbuv_mmx(short *diff, unsigned char *usrc, unsigned char *vsrc, int src_stride, unsigned char *upred, unsigned char *vpred, int pred_stride);
    396 void vp8_subtract_mbuv_sse2(short *diff, unsigned char *usrc, unsigned char *vsrc, int src_stride, unsigned char *upred, unsigned char *vpred, int pred_stride);
    397 #define vp8_subtract_mbuv vp8_subtract_mbuv_sse2
    398 
    399 void vp8_subtract_mby_c(short *diff, unsigned char *src, int src_stride, unsigned char *pred, int pred_stride);
    400 void vp8_subtract_mby_mmx(short *diff, unsigned char *src, int src_stride, unsigned char *pred, int pred_stride);
    401 void vp8_subtract_mby_sse2(short *diff, unsigned char *src, int src_stride, unsigned char *pred, int pred_stride);
    402 #define vp8_subtract_mby vp8_subtract_mby_sse2
    403 
    404 void vp8_temporal_filter_apply_c(unsigned char *frame1, unsigned int stride, unsigned char *frame2, unsigned int block_size, int strength, int filter_weight, unsigned int *accumulator, unsigned short *count);
    405 void vp8_temporal_filter_apply_sse2(unsigned char *frame1, unsigned int stride, unsigned char *frame2, unsigned int block_size, int strength, int filter_weight, unsigned int *accumulator, unsigned short *count);
    406 #define vp8_temporal_filter_apply vp8_temporal_filter_apply_sse2
    407 
    408 unsigned int vp8_variance16x16_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    409 unsigned int vp8_variance16x16_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    410 unsigned int vp8_variance16x16_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    411 #define vp8_variance16x16 vp8_variance16x16_wmt
    412 
    413 unsigned int vp8_variance16x8_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    414 unsigned int vp8_variance16x8_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    415 unsigned int vp8_variance16x8_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    416 #define vp8_variance16x8 vp8_variance16x8_wmt
    417 
    418 unsigned int vp8_variance4x4_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    419 unsigned int vp8_variance4x4_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    420 unsigned int vp8_variance4x4_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    421 #define vp8_variance4x4 vp8_variance4x4_wmt
    422 
    423 unsigned int vp8_variance8x16_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    424 unsigned int vp8_variance8x16_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    425 unsigned int vp8_variance8x16_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    426 #define vp8_variance8x16 vp8_variance8x16_wmt
    427 
    428 unsigned int vp8_variance8x8_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    429 unsigned int vp8_variance8x8_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    430 unsigned int vp8_variance8x8_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse);
    431 #define vp8_variance8x8 vp8_variance8x8_wmt
    432 
    433 unsigned 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);
    434 unsigned 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);
    435 unsigned 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);
    436 #define vp8_variance_halfpixvar16x16_h vp8_variance_halfpixvar16x16_h_wmt
    437 
    438 unsigned 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);
    439 unsigned 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);
    440 unsigned 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);
    441 #define vp8_variance_halfpixvar16x16_hv vp8_variance_halfpixvar16x16_hv_wmt
    442 
    443 unsigned 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);
    444 unsigned 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);
    445 unsigned 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);
    446 #define vp8_variance_halfpixvar16x16_v vp8_variance_halfpixvar16x16_v_wmt
    447 
    448 void vp8_yv12_copy_partial_frame_c(struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc);
    449 #define vp8_yv12_copy_partial_frame vp8_yv12_copy_partial_frame_c
    450 
    451 void vp8_rtcd(void);
    452 
    453 #ifdef RTCD_C
    454 #include "vpx_ports/x86.h"
    455 static void setup_rtcd_internal(void)
    456 {
    457     int flags = x86_simd_caps();
    458 
    459     (void)flags;
    460 
    461 }
    462 #endif
    463 
    464 #ifdef __cplusplus
    465 }  // extern "C"
    466 #endif
    467 
    468 #endif
    469