vp9_rtcd_x86.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef VP9_RTCD_H_
  2. #define VP9_RTCD_H_
  3. #ifdef RTCD_C
  4. #define RTCD_EXTERN
  5. #else
  6. #define RTCD_EXTERN extern
  7. #endif
  8. /*
  9. * VP9
  10. */
  11. #include "vp9/common/vp9_common.h"
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type);
  16. void vp9_iht16x16_256_add_sse2(const tran_low_t *input, uint8_t *output, int pitch, int tx_type);
  17. RTCD_EXTERN void (*vp9_iht16x16_256_add)(const tran_low_t *input, uint8_t *output, int pitch, int tx_type);
  18. void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
  19. void vp9_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
  20. RTCD_EXTERN void (*vp9_iht4x4_16_add)(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
  21. void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
  22. void vp9_iht8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
  23. RTCD_EXTERN void (*vp9_iht8x8_64_add)(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
  24. void vp9_rtcd(void);
  25. #ifdef RTCD_C
  26. #include "vpx_ports/x86.h"
  27. static void setup_rtcd_internal(void)
  28. {
  29. int flags = x86_simd_caps();
  30. vp9_iht16x16_256_add = vp9_iht16x16_256_add_c;
  31. if (flags & HAS_SSE2) vp9_iht16x16_256_add = vp9_iht16x16_256_add_sse2;
  32. vp9_iht4x4_16_add = vp9_iht4x4_16_add_c;
  33. if (flags & HAS_SSE2) vp9_iht4x4_16_add = vp9_iht4x4_16_add_sse2;
  34. vp9_iht8x8_64_add = vp9_iht8x8_64_add_c;
  35. if (flags & HAS_SSE2) vp9_iht8x8_64_add = vp9_iht8x8_64_add_sse2;
  36. }
  37. #endif
  38. #ifdef __cplusplus
  39. } // extern "C"
  40. #endif
  41. #endif