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 ENCODEMB_X86_H
     13 #define ENCODEMB_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_berr(vp8_block_error_mmx);
     24 extern prototype_mberr(vp8_mbblock_error_mmx);
     25 extern prototype_mbuverr(vp8_mbuverror_mmx);
     26 extern prototype_subb(vp8_subtract_b_mmx);
     27 extern prototype_submby(vp8_subtract_mby_mmx);
     28 extern prototype_submbuv(vp8_subtract_mbuv_mmx);
     29 
     30 
     31 #if !CONFIG_RUNTIME_CPU_DETECT
     32 #undef  vp8_encodemb_berr
     33 #define vp8_encodemb_berr vp8_block_error_mmx
     34 
     35 #undef  vp8_encodemb_mberr
     36 #define vp8_encodemb_mberr vp8_mbblock_error_mmx
     37 
     38 #undef  vp8_encodemb_mbuverr
     39 #define vp8_encodemb_mbuverr vp8_mbuverror_mmx
     40 
     41 #undef  vp8_encodemb_subb
     42 #define vp8_encodemb_subb vp8_subtract_b_mmx
     43 
     44 #undef  vp8_encodemb_submby
     45 #define vp8_encodemb_submby vp8_subtract_mby_mmx
     46 
     47 #undef  vp8_encodemb_submbuv
     48 #define vp8_encodemb_submbuv vp8_subtract_mbuv_mmx
     49 
     50 #endif
     51 #endif
     52 
     53 
     54 #if HAVE_SSE2
     55 extern prototype_berr(vp8_block_error_xmm);
     56 extern prototype_mberr(vp8_mbblock_error_xmm);
     57 extern prototype_mbuverr(vp8_mbuverror_xmm);
     58 extern prototype_subb(vp8_subtract_b_sse2);
     59 extern prototype_submby(vp8_subtract_mby_sse2);
     60 extern prototype_submbuv(vp8_subtract_mbuv_sse2);
     61 
     62 #if !CONFIG_RUNTIME_CPU_DETECT
     63 #undef  vp8_encodemb_berr
     64 #define vp8_encodemb_berr vp8_block_error_xmm
     65 
     66 #undef  vp8_encodemb_mberr
     67 #define vp8_encodemb_mberr vp8_mbblock_error_xmm
     68 
     69 #undef  vp8_encodemb_mbuverr
     70 #define vp8_encodemb_mbuverr vp8_mbuverror_xmm
     71 
     72 #undef  vp8_encodemb_subb
     73 #define vp8_encodemb_subb vp8_subtract_b_sse2
     74 
     75 #undef  vp8_encodemb_submby
     76 #define vp8_encodemb_submby vp8_subtract_mby_sse2
     77 
     78 #undef  vp8_encodemb_submbuv
     79 #define vp8_encodemb_submbuv vp8_subtract_mbuv_sse2
     80 
     81 #endif
     82 #endif
     83 
     84 
     85 #endif
     86