Home | History | Annotate | Download | only in x86
      1 /*
      2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
      3  *
      4  *  Use of this source code is governed by a BSD-style license
      5  *  that can be found in the LICENSE file in the root of the source
      6  *  tree. An additional intellectual property rights grant can be found
      7  *  in the file PATENTS.  All contributing project authors may
      8  *  be found in the AUTHORS file in the root of the source tree.
      9  */
     10 
     11 
     12 #ifndef VARIANCE_X86_H
     13 #define VARIANCE_X86_H
     14 
     15 
     16 /* Note:
     17  *
     18  * This platform is commonly built for runtime CPU detection. If you modify
     19  * any of the function mappings present in this file, be sure to also update
     20  * them in the function pointer initialization code
     21  */
     22 #if HAVE_MMX
     23 extern prototype_sad(vp8_sad4x4_mmx);
     24 extern prototype_sad(vp8_sad8x8_mmx);
     25 extern prototype_sad(vp8_sad8x16_mmx);
     26 extern prototype_sad(vp8_sad16x8_mmx);
     27 extern prototype_sad(vp8_sad16x16_mmx);
     28 extern prototype_variance(vp8_variance4x4_mmx);
     29 extern prototype_variance(vp8_variance8x8_mmx);
     30 extern prototype_variance(vp8_variance8x16_mmx);
     31 extern prototype_variance(vp8_variance16x8_mmx);
     32 extern prototype_variance(vp8_variance16x16_mmx);
     33 extern prototype_subpixvariance(vp8_sub_pixel_variance4x4_mmx);
     34 extern prototype_subpixvariance(vp8_sub_pixel_variance8x8_mmx);
     35 extern prototype_subpixvariance(vp8_sub_pixel_variance8x16_mmx);
     36 extern prototype_subpixvariance(vp8_sub_pixel_variance16x8_mmx);
     37 extern prototype_subpixvariance(vp8_sub_pixel_variance16x16_mmx);
     38 extern prototype_subpixvariance(vp8_sub_pixel_mse16x16_mmx);
     39 extern prototype_getmbss(vp8_get_mb_ss_mmx);
     40 extern prototype_variance(vp8_mse16x16_mmx);
     41 extern prototype_sad(vp8_get16x16pred_error_mmx);
     42 extern prototype_variance2(vp8_get8x8var_mmx);
     43 extern prototype_variance2(vp8_get16x16var_mmx);
     44 extern prototype_sad(vp8_get4x4sse_cs_mmx);
     45 
     46 #if !CONFIG_RUNTIME_CPU_DETECT
     47 #undef  vp8_variance_sad4x4
     48 #define vp8_variance_sad4x4 vp8_sad4x4_mmx
     49 
     50 #undef  vp8_variance_sad8x8
     51 #define vp8_variance_sad8x8 vp8_sad8x8_mmx
     52 
     53 #undef  vp8_variance_sad8x16
     54 #define vp8_variance_sad8x16 vp8_sad8x16_mmx
     55 
     56 #undef  vp8_variance_sad16x8
     57 #define vp8_variance_sad16x8 vp8_sad16x8_mmx
     58 
     59 #undef  vp8_variance_sad16x16
     60 #define vp8_variance_sad16x16 vp8_sad16x16_mmx
     61 
     62 #undef  vp8_variance_var4x4
     63 #define vp8_variance_var4x4 vp8_variance4x4_mmx
     64 
     65 #undef  vp8_variance_var8x8
     66 #define vp8_variance_var8x8 vp8_variance8x8_mmx
     67 
     68 #undef  vp8_variance_var8x16
     69 #define vp8_variance_var8x16 vp8_variance8x16_mmx
     70 
     71 #undef  vp8_variance_var16x8
     72 #define vp8_variance_var16x8 vp8_variance16x8_mmx
     73 
     74 #undef  vp8_variance_var16x16
     75 #define vp8_variance_var16x16 vp8_variance16x16_mmx
     76 
     77 #undef  vp8_variance_subpixvar4x4
     78 #define vp8_variance_subpixvar4x4 vp8_sub_pixel_variance4x4_mmx
     79 
     80 #undef  vp8_variance_subpixvar8x8
     81 #define vp8_variance_subpixvar8x8 vp8_sub_pixel_variance8x8_mmx
     82 
     83 #undef  vp8_variance_subpixvar8x16
     84 #define vp8_variance_subpixvar8x16 vp8_sub_pixel_variance8x16_mmx
     85 
     86 #undef  vp8_variance_subpixvar16x8
     87 #define vp8_variance_subpixvar16x8 vp8_sub_pixel_variance16x8_mmx
     88 
     89 #undef  vp8_variance_subpixvar16x16
     90 #define vp8_variance_subpixvar16x16 vp8_sub_pixel_variance16x16_mmx
     91 
     92 #undef  vp8_variance_subpixmse16x16
     93 #define vp8_variance_subpixmse16x16 vp8_sub_pixel_mse16x16_mmx
     94 
     95 #undef  vp8_variance_getmbss
     96 #define vp8_variance_getmbss vp8_get_mb_ss_mmx
     97 
     98 #undef  vp8_variance_mse16x16
     99 #define vp8_variance_mse16x16 vp8_mse16x16_mmx
    100 
    101 #undef  vp8_variance_get16x16prederror
    102 #define vp8_variance_get16x16prederror vp8_get16x16pred_error_mmx
    103 
    104 #undef  vp8_variance_get8x8var
    105 #define vp8_variance_get8x8var vp8_get8x8var_mmx
    106 
    107 #undef  vp8_variance_get16x16var
    108 #define vp8_variance_get16x16var vp8_get16x16var_mmx
    109 
    110 #undef  vp8_variance_get4x4sse_cs
    111 #define vp8_variance_get4x4sse_cs vp8_get4x4sse_cs_mmx
    112 
    113 #endif
    114 #endif
    115 
    116 
    117 #if HAVE_SSE2
    118 extern prototype_sad(vp8_sad4x4_wmt);
    119 extern prototype_sad(vp8_sad8x8_wmt);
    120 extern prototype_sad(vp8_sad8x16_wmt);
    121 extern prototype_sad(vp8_sad16x8_wmt);
    122 extern prototype_sad(vp8_sad16x16_wmt);
    123 extern prototype_variance(vp8_variance4x4_wmt);
    124 extern prototype_variance(vp8_variance8x8_wmt);
    125 extern prototype_variance(vp8_variance8x16_wmt);
    126 extern prototype_variance(vp8_variance16x8_wmt);
    127 extern prototype_variance(vp8_variance16x16_wmt);
    128 extern prototype_subpixvariance(vp8_sub_pixel_variance4x4_wmt);
    129 extern prototype_subpixvariance(vp8_sub_pixel_variance8x8_wmt);
    130 extern prototype_subpixvariance(vp8_sub_pixel_variance8x16_wmt);
    131 extern prototype_subpixvariance(vp8_sub_pixel_variance16x8_wmt);
    132 extern prototype_subpixvariance(vp8_sub_pixel_variance16x16_wmt);
    133 extern prototype_subpixvariance(vp8_sub_pixel_mse16x16_wmt);
    134 extern prototype_getmbss(vp8_get_mb_ss_sse2);
    135 extern prototype_variance(vp8_mse16x16_wmt);
    136 extern prototype_sad(vp8_get16x16pred_error_sse2);
    137 extern prototype_variance2(vp8_get8x8var_sse2);
    138 extern prototype_variance2(vp8_get16x16var_sse2);
    139 
    140 #if !CONFIG_RUNTIME_CPU_DETECT
    141 #undef  vp8_variance_sad4x4
    142 #define vp8_variance_sad4x4 vp8_sad4x4_wmt
    143 
    144 #undef  vp8_variance_sad8x8
    145 #define vp8_variance_sad8x8 vp8_sad8x8_wmt
    146 
    147 #undef  vp8_variance_sad8x16
    148 #define vp8_variance_sad8x16 vp8_sad8x16_wmt
    149 
    150 #undef  vp8_variance_sad16x8
    151 #define vp8_variance_sad16x8 vp8_sad16x8_wmt
    152 
    153 #undef  vp8_variance_sad16x16
    154 #define vp8_variance_sad16x16 vp8_sad16x16_wmt
    155 
    156 #undef  vp8_variance_var4x4
    157 #define vp8_variance_var4x4 vp8_variance4x4_wmt
    158 
    159 #undef  vp8_variance_var8x8
    160 #define vp8_variance_var8x8 vp8_variance8x8_wmt
    161 
    162 #undef  vp8_variance_var8x16
    163 #define vp8_variance_var8x16 vp8_variance8x16_wmt
    164 
    165 #undef  vp8_variance_var16x8
    166 #define vp8_variance_var16x8 vp8_variance16x8_wmt
    167 
    168 #undef  vp8_variance_var16x16
    169 #define vp8_variance_var16x16 vp8_variance16x16_wmt
    170 
    171 #undef  vp8_variance_subpixvar4x4
    172 #define vp8_variance_subpixvar4x4 vp8_sub_pixel_variance4x4_wmt
    173 
    174 #undef  vp8_variance_subpixvar8x8
    175 #define vp8_variance_subpixvar8x8 vp8_sub_pixel_variance8x8_wmt
    176 
    177 #undef  vp8_variance_subpixvar8x16
    178 #define vp8_variance_subpixvar8x16 vp8_sub_pixel_variance8x16_wmt
    179 
    180 #undef  vp8_variance_subpixvar16x8
    181 #define vp8_variance_subpixvar16x8 vp8_sub_pixel_variance16x8_wmt
    182 
    183 #undef  vp8_variance_subpixvar16x16
    184 #define vp8_variance_subpixvar16x16 vp8_sub_pixel_variance16x16_wmt
    185 
    186 #undef  vp8_variance_subpixmse16x16
    187 #define vp8_variance_subpixmse16x16 vp8_sub_pixel_mse16x16_wmt
    188 
    189 #undef  vp8_variance_getmbss
    190 #define vp8_variance_getmbss vp8_get_mb_ss_sse2
    191 
    192 #undef  vp8_variance_mse16x16
    193 #define vp8_variance_mse16x16 vp8_mse16x16_wmt
    194 
    195 #undef  vp8_variance_get16x16prederror
    196 #define vp8_variance_get16x16prederror vp8_get16x16pred_error_sse2
    197 
    198 #undef  vp8_variance_get8x8var
    199 #define vp8_variance_get8x8var vp8_get8x8var_sse2
    200 
    201 #undef  vp8_variance_get16x16var
    202 #define vp8_variance_get16x16var vp8_get16x16var_sse2
    203 
    204 #endif
    205 #endif
    206 
    207 
    208 #if HAVE_SSE3
    209 extern prototype_sad(vp8_sad16x16_sse3);
    210 extern prototype_sad(vp8_sad16x8_sse3);
    211 extern prototype_sad_multi_same_address(vp8_sad16x16x3_sse3);
    212 extern prototype_sad_multi_same_address(vp8_sad16x8x3_sse3);
    213 extern prototype_sad_multi_same_address(vp8_sad8x16x3_sse3);
    214 extern prototype_sad_multi_same_address(vp8_sad8x8x3_sse3);
    215 extern prototype_sad_multi_same_address(vp8_sad4x4x3_sse3);
    216 
    217 extern prototype_sad_multi_dif_address(vp8_sad16x16x4d_sse3);
    218 extern prototype_sad_multi_dif_address(vp8_sad16x8x4d_sse3);
    219 extern prototype_sad_multi_dif_address(vp8_sad8x16x4d_sse3);
    220 extern prototype_sad_multi_dif_address(vp8_sad8x8x4d_sse3);
    221 extern prototype_sad_multi_dif_address(vp8_sad4x4x4d_sse3);
    222 
    223 #if !CONFIG_RUNTIME_CPU_DETECT
    224 
    225 #undef  vp8_variance_sad16x16
    226 #define vp8_variance_sad16x16 vp8_sad16x16_sse3
    227 
    228 #undef  vp8_variance_sad16x16x3
    229 #define vp8_variance_sad16x16x3 vp8_sad16x16x3_sse3
    230 
    231 #undef  vp8_variance_sad16x8x3
    232 #define vp8_variance_sad16x8x3 vp8_sad16x8x3_sse3
    233 
    234 #undef  vp8_variance_sad8x16x3
    235 #define vp8_variance_sad8x16x3 vp8_sad8x16x3_sse3
    236 
    237 #undef  vp8_variance_sad8x8x3
    238 #define vp8_variance_sad8x8x3 vp8_sad8x8x3_sse3
    239 
    240 #undef  vp8_variance_sad4x4x3
    241 #define vp8_variance_sad4x4x3 vp8_sad4x4x3_sse3
    242 
    243 #undef  vp8_variance_sad16x16x4d
    244 #define vp8_variance_sad16x16x4d vp8_sad16x16x4d_sse3
    245 
    246 #undef  vp8_variance_sad16x8x4d
    247 #define vp8_variance_sad16x8x4d vp8_sad16x8x4d_sse3
    248 
    249 #undef  vp8_variance_sad8x16x4d
    250 #define vp8_variance_sad8x16x4d vp8_sad8x16x4d_sse3
    251 
    252 #undef  vp8_variance_sad8x8x4d
    253 #define vp8_variance_sad8x8x4d vp8_sad8x8x4d_sse3
    254 
    255 #undef  vp8_variance_sad4x4x4d
    256 #define vp8_variance_sad4x4x4d vp8_sad4x4x4d_sse3
    257 
    258 #endif
    259 #endif
    260 
    261 
    262 #if HAVE_SSSE3
    263 extern prototype_sad_multi_same_address(vp8_sad16x16x3_ssse3);
    264 extern prototype_sad_multi_same_address(vp8_sad16x8x3_ssse3);
    265 
    266 #if !CONFIG_RUNTIME_CPU_DETECT
    267 #undef  vp8_variance_sad16x16x3
    268 #define vp8_variance_sad16x16x3 vp8_sad16x16x3_ssse3
    269 
    270 #undef  vp8_variance_sad16x8x3
    271 #define vp8_variance_sad16x8x3 vp8_sad16x8x3_ssse3
    272 
    273 #endif
    274 #endif
    275 
    276 #endif
    277