Home | History | Annotate | Download | only in common
      1 common_forward_decls() {
      2 cat <<EOF
      3 #include "vp8/common/blockd.h"
      4 
      5 struct blockd;
      6 struct macroblockd;
      7 struct loop_filter_info;
      8 
      9 /* Encoder forward decls */
     10 struct block;
     11 struct macroblock;
     12 struct variance_vtable;
     13 union int_mv;
     14 struct yv12_buffer_config;
     15 EOF
     16 }
     17 forward_decls common_forward_decls
     18 
     19 #
     20 # Dequant
     21 #
     22 prototype void vp8_dequantize_b "struct blockd*, short *dqc"
     23 specialize vp8_dequantize_b mmx media neon
     24 vp8_dequantize_b_media=vp8_dequantize_b_v6
     25 
     26 prototype void vp8_dequant_idct_add "short *input, short *dq, unsigned char *output, int stride"
     27 specialize vp8_dequant_idct_add mmx media neon dspr2
     28 vp8_dequant_idct_add_media=vp8_dequant_idct_add_v6
     29 vp8_dequant_idct_add_dspr2=vp8_dequant_idct_add_dspr2
     30 
     31 prototype void vp8_dequant_idct_add_y_block "short *q, short *dq, unsigned char *dst, int stride, char *eobs"
     32 specialize vp8_dequant_idct_add_y_block mmx sse2 media neon dspr2
     33 vp8_dequant_idct_add_y_block_media=vp8_dequant_idct_add_y_block_v6
     34 vp8_dequant_idct_add_y_block_dspr2=vp8_dequant_idct_add_y_block_dspr2
     35 
     36 prototype void vp8_dequant_idct_add_uv_block "short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs"
     37 specialize vp8_dequant_idct_add_uv_block mmx sse2 media neon dspr2
     38 vp8_dequant_idct_add_uv_block_media=vp8_dequant_idct_add_uv_block_v6
     39 vp8_dequant_idct_add_y_block_dspr2=vp8_dequant_idct_add_y_block_dspr2
     40 
     41 #
     42 # Loopfilter
     43 #
     44 prototype void vp8_loop_filter_mbv "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
     45 specialize vp8_loop_filter_mbv mmx sse2 media neon dspr2
     46 vp8_loop_filter_mbv_media=vp8_loop_filter_mbv_armv6
     47 vp8_loop_filter_mbv_dspr2=vp8_loop_filter_mbv_dspr2
     48 
     49 prototype void vp8_loop_filter_bv "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
     50 specialize vp8_loop_filter_bv mmx sse2 media neon dspr2
     51 vp8_loop_filter_bv_media=vp8_loop_filter_bv_armv6
     52 vp8_loop_filter_bv_dspr2=vp8_loop_filter_bv_dspr2
     53 
     54 prototype void vp8_loop_filter_mbh "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
     55 specialize vp8_loop_filter_mbh mmx sse2 media neon dspr2
     56 vp8_loop_filter_mbh_media=vp8_loop_filter_mbh_armv6
     57 vp8_loop_filter_mbh_dspr2=vp8_loop_filter_mbh_dspr2
     58 
     59 prototype void vp8_loop_filter_bh "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
     60 specialize vp8_loop_filter_bh mmx sse2 media neon dspr2
     61 vp8_loop_filter_bh_media=vp8_loop_filter_bh_armv6
     62 vp8_loop_filter_bh_dspr2=vp8_loop_filter_bh_dspr2
     63 
     64 
     65 prototype void vp8_loop_filter_simple_mbv "unsigned char *y, int ystride, const unsigned char *blimit"
     66 specialize vp8_loop_filter_simple_mbv mmx sse2 media neon
     67 vp8_loop_filter_simple_mbv_c=vp8_loop_filter_simple_vertical_edge_c
     68 vp8_loop_filter_simple_mbv_mmx=vp8_loop_filter_simple_vertical_edge_mmx
     69 vp8_loop_filter_simple_mbv_sse2=vp8_loop_filter_simple_vertical_edge_sse2
     70 vp8_loop_filter_simple_mbv_media=vp8_loop_filter_simple_vertical_edge_armv6
     71 vp8_loop_filter_simple_mbv_neon=vp8_loop_filter_mbvs_neon
     72 
     73 prototype void vp8_loop_filter_simple_mbh "unsigned char *y, int ystride, const unsigned char *blimit"
     74 specialize vp8_loop_filter_simple_mbh mmx sse2 media neon
     75 vp8_loop_filter_simple_mbh_c=vp8_loop_filter_simple_horizontal_edge_c
     76 vp8_loop_filter_simple_mbh_mmx=vp8_loop_filter_simple_horizontal_edge_mmx
     77 vp8_loop_filter_simple_mbh_sse2=vp8_loop_filter_simple_horizontal_edge_sse2
     78 vp8_loop_filter_simple_mbh_media=vp8_loop_filter_simple_horizontal_edge_armv6
     79 vp8_loop_filter_simple_mbh_neon=vp8_loop_filter_mbhs_neon
     80 
     81 prototype void vp8_loop_filter_simple_bv "unsigned char *y, int ystride, const unsigned char *blimit"
     82 specialize vp8_loop_filter_simple_bv mmx sse2 media neon
     83 vp8_loop_filter_simple_bv_c=vp8_loop_filter_bvs_c
     84 vp8_loop_filter_simple_bv_mmx=vp8_loop_filter_bvs_mmx
     85 vp8_loop_filter_simple_bv_sse2=vp8_loop_filter_bvs_sse2
     86 vp8_loop_filter_simple_bv_media=vp8_loop_filter_bvs_armv6
     87 vp8_loop_filter_simple_bv_neon=vp8_loop_filter_bvs_neon
     88 
     89 prototype void vp8_loop_filter_simple_bh "unsigned char *y, int ystride, const unsigned char *blimit"
     90 specialize vp8_loop_filter_simple_bh mmx sse2 media neon
     91 vp8_loop_filter_simple_bh_c=vp8_loop_filter_bhs_c
     92 vp8_loop_filter_simple_bh_mmx=vp8_loop_filter_bhs_mmx
     93 vp8_loop_filter_simple_bh_sse2=vp8_loop_filter_bhs_sse2
     94 vp8_loop_filter_simple_bh_media=vp8_loop_filter_bhs_armv6
     95 vp8_loop_filter_simple_bh_neon=vp8_loop_filter_bhs_neon
     96 
     97 #
     98 # IDCT
     99 #
    100 #idct16
    101 prototype void vp8_short_idct4x4llm "short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride"
    102 specialize vp8_short_idct4x4llm mmx media neon dspr2
    103 vp8_short_idct4x4llm_media=vp8_short_idct4x4llm_v6_dual
    104 vp8_short_idct4x4llm_dspr2=vp8_short_idct4x4llm_dspr2
    105 
    106 #iwalsh1
    107 prototype void vp8_short_inv_walsh4x4_1 "short *input, short *output"
    108 specialize vp8_short_inv_walsh4x4_1 dspr2
    109 vp8_short_inv_walsh4x4_1_dspr2=vp8_short_inv_walsh4x4_1_dspr2
    110 # no asm yet
    111 
    112 #iwalsh16
    113 prototype void vp8_short_inv_walsh4x4 "short *input, short *output"
    114 specialize vp8_short_inv_walsh4x4 mmx sse2 media neon dspr2
    115 vp8_short_inv_walsh4x4_media=vp8_short_inv_walsh4x4_v6
    116 vp8_short_inv_walsh4x4_dspr2=vp8_short_inv_walsh4x4_dspr2
    117 
    118 #idct1_scalar_add
    119 prototype void vp8_dc_only_idct_add "short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride"
    120 specialize vp8_dc_only_idct_add	mmx media neon dspr2
    121 vp8_dc_only_idct_add_media=vp8_dc_only_idct_add_v6
    122 vp8_dc_only_idct_add_dspr2=vp8_dc_only_idct_add_dspr2
    123 
    124 #
    125 # RECON
    126 #
    127 prototype void vp8_copy_mem16x16 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
    128 specialize vp8_copy_mem16x16 mmx sse2 media neon dspr2
    129 vp8_copy_mem16x16_media=vp8_copy_mem16x16_v6
    130 vp8_copy_mem16x16_dspr2=vp8_copy_mem16x16_dspr2
    131 
    132 prototype void vp8_copy_mem8x8 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
    133 specialize vp8_copy_mem8x8 mmx media neon dspr2
    134 vp8_copy_mem8x8_media=vp8_copy_mem8x8_v6
    135 vp8_copy_mem8x8_dspr2=vp8_copy_mem8x8_dspr2
    136 
    137 prototype void vp8_copy_mem8x4 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
    138 specialize vp8_copy_mem8x4 mmx media neon dspr2
    139 vp8_copy_mem8x4_media=vp8_copy_mem8x4_v6
    140 vp8_copy_mem8x4_dspr2=vp8_copy_mem8x4_dspr2
    141 
    142 prototype 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"
    143 specialize vp8_build_intra_predictors_mby_s sse2 ssse3
    144 #TODO: fix assembly for neon
    145 
    146 prototype 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"
    147 specialize vp8_build_intra_predictors_mbuv_s sse2 ssse3
    148 
    149 prototype void vp8_intra4x4_predict "unsigned char *Above, unsigned char *yleft, int left_stride, B_PREDICTION_MODE b_mode, unsigned char *dst, int dst_stride, unsigned char top_left"
    150 specialize vp8_intra4x4_predict media
    151 vp8_intra4x4_predict_media=vp8_intra4x4_predict_armv6
    152 
    153 #
    154 # Postproc
    155 #
    156 if [ "$CONFIG_POSTPROC" = "yes" ]; then
    157     prototype void vp8_mbpost_proc_down "unsigned char *dst, int pitch, int rows, int cols,int flimit"
    158     specialize vp8_mbpost_proc_down mmx sse2
    159     vp8_mbpost_proc_down_sse2=vp8_mbpost_proc_down_xmm
    160 
    161     prototype void vp8_mbpost_proc_across_ip "unsigned char *dst, int pitch, int rows, int cols,int flimit"
    162     specialize vp8_mbpost_proc_across_ip sse2
    163     vp8_mbpost_proc_across_ip_sse2=vp8_mbpost_proc_across_ip_xmm
    164 
    165     prototype void vp8_post_proc_down_and_across_mb_row "unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size"
    166     specialize vp8_post_proc_down_and_across_mb_row sse2
    167 
    168     prototype void vp8_plane_add_noise "unsigned char *s, char *noise, char blackclamp[16], char whiteclamp[16], char bothclamp[16], unsigned int w, unsigned int h, int pitch"
    169     specialize vp8_plane_add_noise mmx sse2
    170     vp8_plane_add_noise_sse2=vp8_plane_add_noise_wmt
    171 
    172     prototype void vp8_blend_mb_inner "unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride"
    173     # no asm yet
    174 
    175     prototype void vp8_blend_mb_outer "unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride"
    176     # no asm yet
    177 
    178     prototype void vp8_blend_b "unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride"
    179     # no asm yet
    180 
    181     prototype void vp8_filter_by_weight16x16 "unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight"
    182     specialize vp8_filter_by_weight16x16 sse2
    183 
    184     prototype void vp8_filter_by_weight8x8 "unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight"
    185     specialize vp8_filter_by_weight8x8 sse2
    186 
    187     prototype void vp8_filter_by_weight4x4 "unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight"
    188     # no asm yet
    189 fi
    190 
    191 #
    192 # Subpixel
    193 #
    194 prototype void vp8_sixtap_predict16x16 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
    195 specialize vp8_sixtap_predict16x16 mmx sse2 ssse3 media neon dspr2
    196 vp8_sixtap_predict16x16_media=vp8_sixtap_predict16x16_armv6
    197 vp8_sixtap_predict16x16_dspr2=vp8_sixtap_predict16x16_dspr2
    198 
    199 prototype void vp8_sixtap_predict8x8 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
    200 specialize vp8_sixtap_predict8x8 mmx sse2 ssse3 media neon dspr2
    201 vp8_sixtap_predict8x8_media=vp8_sixtap_predict8x8_armv6
    202 vp8_sixtap_predict8x8_dspr2=vp8_sixtap_predict8x8_dspr2
    203 
    204 prototype void vp8_sixtap_predict8x4 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
    205 specialize vp8_sixtap_predict8x4 mmx sse2 ssse3 media neon dspr2
    206 vp8_sixtap_predict8x4_media=vp8_sixtap_predict8x4_armv6
    207 vp8_sixtap_predict8x4_dspr2=vp8_sixtap_predict8x4_dspr2
    208 
    209 prototype void vp8_sixtap_predict4x4 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
    210 specialize vp8_sixtap_predict4x4 mmx ssse3 media neon dspr2
    211 vp8_sixtap_predict4x4_media=vp8_sixtap_predict4x4_armv6
    212 vp8_sixtap_predict4x4_dspr2=vp8_sixtap_predict4x4_dspr2
    213 
    214 prototype void vp8_bilinear_predict16x16 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
    215 specialize vp8_bilinear_predict16x16 mmx sse2 ssse3 media neon
    216 vp8_bilinear_predict16x16_media=vp8_bilinear_predict16x16_armv6
    217 
    218 prototype void vp8_bilinear_predict8x8 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
    219 specialize vp8_bilinear_predict8x8 mmx sse2 ssse3 media neon
    220 vp8_bilinear_predict8x8_media=vp8_bilinear_predict8x8_armv6
    221 
    222 prototype void vp8_bilinear_predict8x4 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
    223 specialize vp8_bilinear_predict8x4 mmx media neon
    224 vp8_bilinear_predict8x4_media=vp8_bilinear_predict8x4_armv6
    225 
    226 prototype void vp8_bilinear_predict4x4 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
    227 specialize vp8_bilinear_predict4x4 mmx media neon
    228 vp8_bilinear_predict4x4_media=vp8_bilinear_predict4x4_armv6
    229 
    230 #
    231 # Whole-pixel Variance
    232 #
    233 prototype unsigned int vp8_variance4x4 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse"
    234 specialize vp8_variance4x4 mmx sse2
    235 vp8_variance4x4_sse2=vp8_variance4x4_wmt
    236 
    237 prototype unsigned int vp8_variance8x8 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse"
    238 specialize vp8_variance8x8 mmx sse2 media neon
    239 vp8_variance8x8_sse2=vp8_variance8x8_wmt
    240 vp8_variance8x8_media=vp8_variance8x8_armv6
    241 
    242 prototype unsigned int vp8_variance8x16 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse"
    243 specialize vp8_variance8x16 mmx sse2 neon
    244 vp8_variance8x16_sse2=vp8_variance8x16_wmt
    245 
    246 prototype unsigned int vp8_variance16x8 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse"
    247 specialize vp8_variance16x8 mmx sse2 neon
    248 vp8_variance16x8_sse2=vp8_variance16x8_wmt
    249 
    250 prototype unsigned int vp8_variance16x16 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse"
    251 specialize vp8_variance16x16 mmx sse2 media neon
    252 vp8_variance16x16_sse2=vp8_variance16x16_wmt
    253 vp8_variance16x16_media=vp8_variance16x16_armv6
    254 
    255 #
    256 # Sub-pixel Variance
    257 #
    258 prototype unsigned int vp8_sub_pixel_variance4x4 "const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse"
    259 specialize vp8_sub_pixel_variance4x4 mmx sse2
    260 vp8_sub_pixel_variance4x4_sse2=vp8_sub_pixel_variance4x4_wmt
    261 
    262 prototype unsigned int vp8_sub_pixel_variance8x8 "const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse"
    263 specialize vp8_sub_pixel_variance8x8 mmx sse2 media neon
    264 vp8_sub_pixel_variance8x8_sse2=vp8_sub_pixel_variance8x8_wmt
    265 vp8_sub_pixel_variance8x8_media=vp8_sub_pixel_variance8x8_armv6
    266 
    267 prototype unsigned int vp8_sub_pixel_variance8x16 "const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse"
    268 specialize vp8_sub_pixel_variance8x16 mmx sse2
    269 vp8_sub_pixel_variance8x16_sse2=vp8_sub_pixel_variance8x16_wmt
    270 
    271 prototype 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"
    272 specialize vp8_sub_pixel_variance16x8 mmx sse2 ssse3
    273 vp8_sub_pixel_variance16x8_sse2=vp8_sub_pixel_variance16x8_wmt
    274 
    275 prototype 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"
    276 specialize vp8_sub_pixel_variance16x16 mmx sse2 ssse3 media neon
    277 vp8_sub_pixel_variance16x16_sse2=vp8_sub_pixel_variance16x16_wmt
    278 vp8_sub_pixel_variance16x16_media=vp8_sub_pixel_variance16x16_armv6
    279 
    280 prototype unsigned int vp8_variance_halfpixvar16x16_h "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse"
    281 specialize vp8_variance_halfpixvar16x16_h mmx sse2 media neon
    282 vp8_variance_halfpixvar16x16_h_sse2=vp8_variance_halfpixvar16x16_h_wmt
    283 vp8_variance_halfpixvar16x16_h_media=vp8_variance_halfpixvar16x16_h_armv6
    284 
    285 prototype unsigned int vp8_variance_halfpixvar16x16_v "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse"
    286 specialize vp8_variance_halfpixvar16x16_v mmx sse2 media neon
    287 vp8_variance_halfpixvar16x16_v_sse2=vp8_variance_halfpixvar16x16_v_wmt
    288 vp8_variance_halfpixvar16x16_v_media=vp8_variance_halfpixvar16x16_v_armv6
    289 
    290 prototype unsigned int vp8_variance_halfpixvar16x16_hv "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse"
    291 specialize vp8_variance_halfpixvar16x16_hv mmx sse2 media neon
    292 vp8_variance_halfpixvar16x16_hv_sse2=vp8_variance_halfpixvar16x16_hv_wmt
    293 vp8_variance_halfpixvar16x16_hv_media=vp8_variance_halfpixvar16x16_hv_armv6
    294 
    295 #
    296 # Single block SAD
    297 #
    298 prototype unsigned int vp8_sad4x4 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad"
    299 specialize vp8_sad4x4 mmx sse2 neon
    300 vp8_sad4x4_sse2=vp8_sad4x4_wmt
    301 
    302 prototype unsigned int vp8_sad8x8 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad"
    303 specialize vp8_sad8x8 mmx sse2 neon
    304 vp8_sad8x8_sse2=vp8_sad8x8_wmt
    305 
    306 prototype unsigned int vp8_sad8x16 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad"
    307 specialize vp8_sad8x16 mmx sse2 neon
    308 vp8_sad8x16_sse2=vp8_sad8x16_wmt
    309 
    310 prototype unsigned int vp8_sad16x8 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad"
    311 specialize vp8_sad16x8 mmx sse2 neon
    312 vp8_sad16x8_sse2=vp8_sad16x8_wmt
    313 
    314 prototype unsigned int vp8_sad16x16 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad"
    315 specialize vp8_sad16x16 mmx sse2 sse3 media neon
    316 vp8_sad16x16_sse2=vp8_sad16x16_wmt
    317 vp8_sad16x16_media=vp8_sad16x16_armv6
    318 
    319 #
    320 # Multi-block SAD, comparing a reference to N blocks 1 pixel apart horizontally
    321 #
    322 prototype void vp8_sad4x4x3 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array"
    323 specialize vp8_sad4x4x3 sse3
    324 
    325 prototype void vp8_sad8x8x3 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array"
    326 specialize vp8_sad8x8x3 sse3
    327 
    328 prototype void vp8_sad8x16x3 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array"
    329 specialize vp8_sad8x16x3 sse3
    330 
    331 prototype void vp8_sad16x8x3 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array"
    332 specialize vp8_sad16x8x3 sse3 ssse3
    333 
    334 prototype void vp8_sad16x16x3 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array"
    335 specialize vp8_sad16x16x3 sse3 ssse3
    336 
    337 # Note the only difference in the following prototypes is that they return into
    338 # an array of short
    339 prototype void vp8_sad4x4x8 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array"
    340 specialize vp8_sad4x4x8 sse4_1
    341 vp8_sad4x4x8_sse4_1=vp8_sad4x4x8_sse4
    342 
    343 prototype void vp8_sad8x8x8 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array"
    344 specialize vp8_sad8x8x8 sse4_1
    345 vp8_sad8x8x8_sse4_1=vp8_sad8x8x8_sse4
    346 
    347 prototype void vp8_sad8x16x8 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array"
    348 specialize vp8_sad8x16x8 sse4_1
    349 vp8_sad8x16x8_sse4_1=vp8_sad8x16x8_sse4
    350 
    351 prototype void vp8_sad16x8x8 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array"
    352 specialize vp8_sad16x8x8 sse4_1
    353 vp8_sad16x8x8_sse4_1=vp8_sad16x8x8_sse4
    354 
    355 prototype void vp8_sad16x16x8 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array"
    356 specialize vp8_sad16x16x8 sse4_1
    357 vp8_sad16x16x8_sse4_1=vp8_sad16x16x8_sse4
    358 
    359 #
    360 # Multi-block SAD, comparing a reference to N independent blocks
    361 #
    362 prototype void vp8_sad4x4x4d "const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array"
    363 specialize vp8_sad4x4x4d sse3
    364 
    365 prototype void vp8_sad8x8x4d "const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array"
    366 specialize vp8_sad8x8x4d sse3
    367 
    368 prototype void vp8_sad8x16x4d "const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array"
    369 specialize vp8_sad8x16x4d sse3
    370 
    371 prototype void vp8_sad16x8x4d "const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array"
    372 specialize vp8_sad16x8x4d sse3
    373 
    374 prototype void vp8_sad16x16x4d "const unsigned char *src_ptr, int src_stride, const unsigned char * const ref_ptr[], int  ref_stride, unsigned int *sad_array"
    375 specialize vp8_sad16x16x4d sse3
    376 
    377 #
    378 # Encoder functions below this point.
    379 #
    380 if [ "$CONFIG_VP8_ENCODER" = "yes" ]; then
    381 
    382 #
    383 # Sum of squares (vector)
    384 #
    385 prototype unsigned int vp8_get_mb_ss "const short *"
    386 specialize vp8_get_mb_ss mmx sse2
    387 
    388 #
    389 # SSE (Sum Squared Error)
    390 #
    391 prototype unsigned int vp8_sub_pixel_mse16x16 "const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse"
    392 specialize vp8_sub_pixel_mse16x16 mmx sse2
    393 vp8_sub_pixel_mse16x16_sse2=vp8_sub_pixel_mse16x16_wmt
    394 
    395 prototype unsigned int vp8_mse16x16 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sse"
    396 specialize vp8_mse16x16 mmx sse2 media neon
    397 vp8_mse16x16_sse2=vp8_mse16x16_wmt
    398 vp8_mse16x16_media=vp8_mse16x16_armv6
    399 
    400 prototype unsigned int vp8_get4x4sse_cs "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride"
    401 specialize vp8_get4x4sse_cs mmx neon
    402 
    403 #
    404 # Block copy
    405 #
    406 case $arch in
    407     x86*)
    408     prototype void vp8_copy32xn "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, int n"
    409     specialize vp8_copy32xn sse2 sse3
    410     ;;
    411 esac
    412 
    413 #
    414 # Structured Similarity (SSIM)
    415 #
    416 if [ "$CONFIG_INTERNAL_STATS" = "yes" ]; then
    417     [ $arch = "x86_64" ] && sse2_on_x86_64=sse2
    418 
    419     prototype void vp8_ssim_parms_8x8 "unsigned char *s, int sp, unsigned char *r, int rp, unsigned long *sum_s, unsigned long *sum_r, unsigned long *sum_sq_s, unsigned long *sum_sq_r, unsigned long *sum_sxr"
    420     specialize vp8_ssim_parms_8x8 $sse2_on_x86_64
    421 
    422     prototype void vp8_ssim_parms_16x16 "unsigned char *s, int sp, unsigned char *r, int rp, unsigned long *sum_s, unsigned long *sum_r, unsigned long *sum_sq_s, unsigned long *sum_sq_r, unsigned long *sum_sxr"
    423     specialize vp8_ssim_parms_16x16 $sse2_on_x86_64
    424 fi
    425 
    426 #
    427 # Forward DCT
    428 #
    429 prototype void vp8_short_fdct4x4 "short *input, short *output, int pitch"
    430 specialize vp8_short_fdct4x4 mmx sse2 media neon
    431 vp8_short_fdct4x4_media=vp8_short_fdct4x4_armv6
    432 
    433 prototype void vp8_short_fdct8x4 "short *input, short *output, int pitch"
    434 specialize vp8_short_fdct8x4 mmx sse2 media neon
    435 vp8_short_fdct8x4_media=vp8_short_fdct8x4_armv6
    436 
    437 prototype void vp8_short_walsh4x4 "short *input, short *output, int pitch"
    438 specialize vp8_short_walsh4x4 sse2 media neon
    439 vp8_short_walsh4x4_media=vp8_short_walsh4x4_armv6
    440 
    441 #
    442 # Quantizer
    443 #
    444 prototype void vp8_regular_quantize_b "struct block *, struct blockd *"
    445 specialize vp8_regular_quantize_b sse2 sse4_1
    446 vp8_regular_quantize_b_sse4_1=vp8_regular_quantize_b_sse4
    447 
    448 prototype void vp8_fast_quantize_b "struct block *, struct blockd *"
    449 specialize vp8_fast_quantize_b sse2 ssse3 media neon
    450 vp8_fast_quantize_b_media=vp8_fast_quantize_b_armv6
    451 
    452 prototype void vp8_regular_quantize_b_pair "struct block *b1, struct block *b2, struct blockd *d1, struct blockd *d2"
    453 # no asm yet
    454 
    455 prototype void vp8_fast_quantize_b_pair "struct block *b1, struct block *b2, struct blockd *d1, struct blockd *d2"
    456 specialize vp8_fast_quantize_b_pair neon
    457 
    458 prototype void vp8_quantize_mb "struct macroblock *"
    459 specialize vp8_quantize_mb neon
    460 
    461 prototype void vp8_quantize_mby "struct macroblock *"
    462 specialize vp8_quantize_mby neon
    463 
    464 prototype void vp8_quantize_mbuv "struct macroblock *"
    465 specialize vp8_quantize_mbuv neon
    466 
    467 #
    468 # Block subtraction
    469 #
    470 prototype int vp8_block_error "short *coeff, short *dqcoeff"
    471 specialize vp8_block_error mmx sse2
    472 vp8_block_error_sse2=vp8_block_error_xmm
    473 
    474 prototype int vp8_mbblock_error "struct macroblock *mb, int dc"
    475 specialize vp8_mbblock_error mmx sse2
    476 vp8_mbblock_error_sse2=vp8_mbblock_error_xmm
    477 
    478 prototype int vp8_mbuverror "struct macroblock *mb"
    479 specialize vp8_mbuverror mmx sse2
    480 vp8_mbuverror_sse2=vp8_mbuverror_xmm
    481 
    482 prototype void vp8_subtract_b "struct block *be, struct blockd *bd, int pitch"
    483 specialize vp8_subtract_b mmx sse2 media neon
    484 vp8_subtract_b_media=vp8_subtract_b_armv6
    485 
    486 prototype void vp8_subtract_mby "short *diff, unsigned char *src, int src_stride, unsigned char *pred, int pred_stride"
    487 specialize vp8_subtract_mby mmx sse2 media neon
    488 vp8_subtract_mby_media=vp8_subtract_mby_armv6
    489 
    490 prototype void vp8_subtract_mbuv "short *diff, unsigned char *usrc, unsigned char *vsrc, int src_stride, unsigned char *upred, unsigned char *vpred, int pred_stride"
    491 specialize vp8_subtract_mbuv mmx sse2 media neon
    492 vp8_subtract_mbuv_media=vp8_subtract_mbuv_armv6
    493 
    494 #
    495 # Motion search
    496 #
    497 prototype 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"
    498 specialize vp8_full_search_sad sse3 sse4_1
    499 vp8_full_search_sad_sse3=vp8_full_search_sadx3
    500 vp8_full_search_sad_sse4_1=vp8_full_search_sadx8
    501 
    502 prototype 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"
    503 specialize vp8_refining_search_sad sse3
    504 vp8_refining_search_sad_sse3=vp8_refining_search_sadx4
    505 
    506 prototype 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"
    507 vp8_diamond_search_sad_sse3=vp8_diamond_search_sadx4
    508 
    509 #
    510 # Alt-ref Noise Reduction (ARNR)
    511 #
    512 if [ "$CONFIG_REALTIME_ONLY" != "yes" ]; then
    513     prototype void vp8_temporal_filter_apply "unsigned char *frame1, unsigned int stride, unsigned char *frame2, unsigned int block_size, int strength, int filter_weight, unsigned int *accumulator, unsigned short *count"
    514     specialize vp8_temporal_filter_apply sse2
    515 fi
    516 
    517 #
    518 # Pick Loopfilter
    519 #
    520 prototype void vp8_yv12_copy_partial_frame "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"
    521 specialize vp8_yv12_copy_partial_frame neon
    522 
    523 #
    524 # Denoiser filter
    525 #
    526 if [ "$CONFIG_TEMPORAL_DENOISING" = "yes" ]; then
    527     prototype int vp8_denoiser_filter "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"
    528     specialize vp8_denoiser_filter sse2
    529 fi
    530 
    531 # End of encoder only functions
    532 fi
    533 
    534 # Scaler functions
    535 if [ "CONFIG_SPATIAL_RESAMPLING" != "yes" ]; then
    536     prototype void vp8_horizontal_line_4_5_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
    537     prototype void vp8_vertical_band_4_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    538     prototype void vp8_last_vertical_band_4_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    539     prototype void vp8_horizontal_line_2_3_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
    540     prototype void vp8_vertical_band_2_3_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    541     prototype void vp8_last_vertical_band_2_3_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    542     prototype void vp8_horizontal_line_3_5_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
    543     prototype void vp8_vertical_band_3_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    544     prototype void vp8_last_vertical_band_3_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    545     prototype void vp8_horizontal_line_3_4_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
    546     prototype void vp8_vertical_band_3_4_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    547     prototype void vp8_last_vertical_band_3_4_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    548     prototype void vp8_horizontal_line_1_2_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
    549     prototype void vp8_vertical_band_1_2_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    550     prototype void vp8_last_vertical_band_1_2_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    551     prototype void vp8_horizontal_line_5_4_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
    552     prototype void vp8_vertical_band_5_4_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    553     prototype void vp8_horizontal_line_5_3_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
    554     prototype void vp8_vertical_band_5_3_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    555     prototype void vp8_horizontal_line_2_1_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
    556     prototype void vp8_vertical_band_2_1_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    557     prototype void vp8_vertical_band_2_1_scale_i "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
    558 fi
    559 
    560 prototype void vp8_yv12_extend_frame_borders "struct yv12_buffer_config *ybf"
    561 specialize vp8_yv12_extend_frame_borders neon
    562 
    563 prototype void vp8_yv12_copy_frame "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"
    564 specialize vp8_yv12_copy_frame neon
    565 
    566 prototype void vp8_yv12_copy_y "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"
    567 specialize vp8_yv12_copy_y neon
    568 
    569