/media/libvpx/vp8/encoder/x86/encodemb_x86.h

http://github.com/zpao/v8monkey · C Header · 85 lines · 47 code · 23 blank · 15 comment · 0 complexity · dda1958e0dddabd248f52e15a28f4d6c MD5 · raw file

  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. #ifndef ENCODEMB_X86_H
  11. #define ENCODEMB_X86_H
  12. /* Note:
  13. *
  14. * This platform is commonly built for runtime CPU detection. If you modify
  15. * any of the function mappings present in this file, be sure to also update
  16. * them in the function pointer initialization code
  17. */
  18. #if HAVE_MMX
  19. extern prototype_berr(vp8_block_error_mmx);
  20. extern prototype_mberr(vp8_mbblock_error_mmx);
  21. extern prototype_mbuverr(vp8_mbuverror_mmx);
  22. extern prototype_subb(vp8_subtract_b_mmx);
  23. extern prototype_submby(vp8_subtract_mby_mmx);
  24. extern prototype_submbuv(vp8_subtract_mbuv_mmx);
  25. #if !CONFIG_RUNTIME_CPU_DETECT
  26. #undef vp8_encodemb_berr
  27. #define vp8_encodemb_berr vp8_block_error_mmx
  28. #undef vp8_encodemb_mberr
  29. #define vp8_encodemb_mberr vp8_mbblock_error_mmx
  30. #undef vp8_encodemb_mbuverr
  31. #define vp8_encodemb_mbuverr vp8_mbuverror_mmx
  32. #undef vp8_encodemb_subb
  33. #define vp8_encodemb_subb vp8_subtract_b_mmx
  34. #undef vp8_encodemb_submby
  35. #define vp8_encodemb_submby vp8_subtract_mby_mmx
  36. #undef vp8_encodemb_submbuv
  37. #define vp8_encodemb_submbuv vp8_subtract_mbuv_mmx
  38. #endif
  39. #endif
  40. #if HAVE_SSE2
  41. extern prototype_berr(vp8_block_error_xmm);
  42. extern prototype_mberr(vp8_mbblock_error_xmm);
  43. extern prototype_mbuverr(vp8_mbuverror_xmm);
  44. extern prototype_subb(vp8_subtract_b_sse2);
  45. extern prototype_submby(vp8_subtract_mby_sse2);
  46. extern prototype_submbuv(vp8_subtract_mbuv_sse2);
  47. #if !CONFIG_RUNTIME_CPU_DETECT
  48. #undef vp8_encodemb_berr
  49. #define vp8_encodemb_berr vp8_block_error_xmm
  50. #undef vp8_encodemb_mberr
  51. #define vp8_encodemb_mberr vp8_mbblock_error_xmm
  52. #undef vp8_encodemb_mbuverr
  53. #define vp8_encodemb_mbuverr vp8_mbuverror_xmm
  54. #undef vp8_encodemb_subb
  55. #define vp8_encodemb_subb vp8_subtract_b_sse2
  56. #undef vp8_encodemb_submby
  57. #define vp8_encodemb_submby vp8_subtract_mby_sse2
  58. #undef vp8_encodemb_submbuv
  59. #define vp8_encodemb_submbuv vp8_subtract_mbuv_sse2
  60. #endif
  61. #endif
  62. #endif