txfm_common_sse2.h 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2015 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 VPX_VPX_DSP_X86_TXFM_COMMON_SSE2_H_
  11. #define VPX_VPX_DSP_X86_TXFM_COMMON_SSE2_H_
  12. #include <emmintrin.h>
  13. #include "vpx/vpx_integer.h"
  14. #define pair_set_epi16(a, b) \
  15. _mm_set_epi16((int16_t)(b), (int16_t)(a), (int16_t)(b), (int16_t)(a), \
  16. (int16_t)(b), (int16_t)(a), (int16_t)(b), (int16_t)(a))
  17. #define pair_set_epi32(a, b) \
  18. _mm_set_epi32((int)(b), (int)(a), (int)(b), (int)(a))
  19. #define dual_set_epi16(a, b) \
  20. _mm_set_epi16((int16_t)(b), (int16_t)(b), (int16_t)(b), (int16_t)(b), \
  21. (int16_t)(a), (int16_t)(a), (int16_t)(a), (int16_t)(a))
  22. #define octa_set_epi16(a, b, c, d, e, f, g, h) \
  23. _mm_setr_epi16((int16_t)(a), (int16_t)(b), (int16_t)(c), (int16_t)(d), \
  24. (int16_t)(e), (int16_t)(f), (int16_t)(g), (int16_t)(h))
  25. #endif // VPX_VPX_DSP_X86_TXFM_COMMON_SSE2_H_