txfm_common_vsx.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * Copyright (c) 2018 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_PPC_TXFM_COMMON_VSX_H_
  11. #define VPX_VPX_DSP_PPC_TXFM_COMMON_VSX_H_
  12. #include "vpx_dsp/ppc/types_vsx.h"
  13. static const int32x4_t vec_dct_const_rounding = { 8192, 8192, 8192, 8192 };
  14. static const uint32x4_t vec_dct_const_bits = { 14, 14, 14, 14 };
  15. static const uint16x8_t vec_dct_scale_log2 = { 2, 2, 2, 2, 2, 2, 2, 2 };
  16. static const int16x8_t cospi1_v = { 16364, 16364, 16364, 16364,
  17. 16364, 16364, 16364, 16364 };
  18. static const int16x8_t cospi2_v = { 16305, 16305, 16305, 16305,
  19. 16305, 16305, 16305, 16305 };
  20. static const int16x8_t cospi3_v = { 16207, 16207, 16207, 16207,
  21. 16207, 16207, 16207, 16207 };
  22. static const int16x8_t cospi4_v = { 16069, 16069, 16069, 16069,
  23. 16069, 16069, 16069, 16069 };
  24. static const int16x8_t cospi4m_v = { -16069, -16069, -16069, -16069,
  25. -16069, -16069, -16069, -16069 };
  26. static const int16x8_t cospi5_v = { 15893, 15893, 15893, 15893,
  27. 15893, 15893, 15893, 15893 };
  28. static const int16x8_t cospi6_v = { 15679, 15679, 15679, 15679,
  29. 15679, 15679, 15679, 15679 };
  30. static const int16x8_t cospi7_v = { 15426, 15426, 15426, 15426,
  31. 15426, 15426, 15426, 15426 };
  32. static const int16x8_t cospi8_v = { 15137, 15137, 15137, 15137,
  33. 15137, 15137, 15137, 15137 };
  34. static const int16x8_t cospi8m_v = { -15137, -15137, -15137, -15137,
  35. -15137, -15137, -15137, -15137 };
  36. static const int16x8_t cospi9_v = { 14811, 14811, 14811, 14811,
  37. 14811, 14811, 14811, 14811 };
  38. static const int16x8_t cospi10_v = { 14449, 14449, 14449, 14449,
  39. 14449, 14449, 14449, 14449 };
  40. static const int16x8_t cospi11_v = { 14053, 14053, 14053, 14053,
  41. 14053, 14053, 14053, 14053 };
  42. static const int16x8_t cospi12_v = { 13623, 13623, 13623, 13623,
  43. 13623, 13623, 13623, 13623 };
  44. static const int16x8_t cospi13_v = { 13160, 13160, 13160, 13160,
  45. 13160, 13160, 13160, 13160 };
  46. static const int16x8_t cospi14_v = { 12665, 12665, 12665, 12665,
  47. 12665, 12665, 12665, 12665 };
  48. static const int16x8_t cospi15_v = { 12140, 12140, 12140, 12140,
  49. 12140, 12140, 12140, 12140 };
  50. static const int16x8_t cospi16_v = { 11585, 11585, 11585, 11585,
  51. 11585, 11585, 11585, 11585 };
  52. static const int16x8_t cospi17_v = { 11003, 11003, 11003, 11003,
  53. 11003, 11003, 11003, 11003 };
  54. static const int16x8_t cospi18_v = { 10394, 10394, 10394, 10394,
  55. 10394, 10394, 10394, 10394 };
  56. static const int16x8_t cospi19_v = { 9760, 9760, 9760, 9760,
  57. 9760, 9760, 9760, 9760 };
  58. static const int16x8_t cospi20_v = { 9102, 9102, 9102, 9102,
  59. 9102, 9102, 9102, 9102 };
  60. static const int16x8_t cospi20m_v = { -9102, -9102, -9102, -9102,
  61. -9102, -9102, -9102, -9102 };
  62. static const int16x8_t cospi21_v = { 8423, 8423, 8423, 8423,
  63. 8423, 8423, 8423, 8423 };
  64. static const int16x8_t cospi22_v = { 7723, 7723, 7723, 7723,
  65. 7723, 7723, 7723, 7723 };
  66. static const int16x8_t cospi23_v = { 7005, 7005, 7005, 7005,
  67. 7005, 7005, 7005, 7005 };
  68. static const int16x8_t cospi24_v = { 6270, 6270, 6270, 6270,
  69. 6270, 6270, 6270, 6270 };
  70. static const int16x8_t cospi25_v = { 5520, 5520, 5520, 5520,
  71. 5520, 5520, 5520, 5520 };
  72. static const int16x8_t cospi26_v = { 4756, 4756, 4756, 4756,
  73. 4756, 4756, 4756, 4756 };
  74. static const int16x8_t cospi27_v = { 3981, 3981, 3981, 3981,
  75. 3981, 3981, 3981, 3981 };
  76. static const int16x8_t cospi28_v = { 3196, 3196, 3196, 3196,
  77. 3196, 3196, 3196, 3196 };
  78. static const int16x8_t cospi29_v = { 2404, 2404, 2404, 2404,
  79. 2404, 2404, 2404, 2404 };
  80. static const int16x8_t cospi30_v = { 1606, 1606, 1606, 1606,
  81. 1606, 1606, 1606, 1606 };
  82. static const int16x8_t cospi31_v = { 804, 804, 804, 804, 804, 804, 804, 804 };
  83. #endif // VPX_VPX_DSP_PPC_TXFM_COMMON_VSX_H_