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