• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2021 The libgav1 Authors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef LIBGAV1_SRC_DSP_X86_INTRAPRED_SMOOTH_SSE4_H_
18 #define LIBGAV1_SRC_DSP_X86_INTRAPRED_SMOOTH_SSE4_H_
19 
20 #include "src/dsp/dsp.h"
21 #include "src/utils/cpu.h"
22 
23 namespace libgav1 {
24 namespace dsp {
25 
26 // Initializes Dsp::intra_predictors[][kIntraPredictorSmooth.*].
27 // This function is not thread-safe.
28 void IntraPredSmoothInit_SSE4_1();
29 
30 }  // namespace dsp
31 }  // namespace libgav1
32 
33 // If sse4 is enabled and the baseline isn't set due to a higher level of
34 // optimization being enabled, signal the sse4 implementation should be used.
35 #if LIBGAV1_TARGETING_SSE4_1
36 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x4_IntraPredictorSmooth
37 #define LIBGAV1_Dsp8bpp_TransformSize4x4_IntraPredictorSmooth LIBGAV1_CPU_SSE4_1
38 #endif
39 
40 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x8_IntraPredictorSmooth
41 #define LIBGAV1_Dsp8bpp_TransformSize4x8_IntraPredictorSmooth LIBGAV1_CPU_SSE4_1
42 #endif
43 
44 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x16_IntraPredictorSmooth
45 #define LIBGAV1_Dsp8bpp_TransformSize4x16_IntraPredictorSmooth \
46   LIBGAV1_CPU_SSE4_1
47 #endif
48 
49 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x4_IntraPredictorSmooth
50 #define LIBGAV1_Dsp8bpp_TransformSize8x4_IntraPredictorSmooth LIBGAV1_CPU_SSE4_1
51 #endif
52 
53 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x8_IntraPredictorSmooth
54 #define LIBGAV1_Dsp8bpp_TransformSize8x8_IntraPredictorSmooth LIBGAV1_CPU_SSE4_1
55 #endif
56 
57 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x16_IntraPredictorSmooth
58 #define LIBGAV1_Dsp8bpp_TransformSize8x16_IntraPredictorSmooth \
59   LIBGAV1_CPU_SSE4_1
60 #endif
61 
62 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x32_IntraPredictorSmooth
63 #define LIBGAV1_Dsp8bpp_TransformSize8x32_IntraPredictorSmooth \
64   LIBGAV1_CPU_SSE4_1
65 #endif
66 
67 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x4_IntraPredictorSmooth
68 #define LIBGAV1_Dsp8bpp_TransformSize16x4_IntraPredictorSmooth \
69   LIBGAV1_CPU_SSE4_1
70 #endif
71 
72 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x8_IntraPredictorSmooth
73 #define LIBGAV1_Dsp8bpp_TransformSize16x8_IntraPredictorSmooth \
74   LIBGAV1_CPU_SSE4_1
75 #endif
76 
77 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x16_IntraPredictorSmooth
78 #define LIBGAV1_Dsp8bpp_TransformSize16x16_IntraPredictorSmooth \
79   LIBGAV1_CPU_SSE4_1
80 #endif
81 
82 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x32_IntraPredictorSmooth
83 #define LIBGAV1_Dsp8bpp_TransformSize16x32_IntraPredictorSmooth \
84   LIBGAV1_CPU_SSE4_1
85 #endif
86 
87 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x64_IntraPredictorSmooth
88 #define LIBGAV1_Dsp8bpp_TransformSize16x64_IntraPredictorSmooth \
89   LIBGAV1_CPU_SSE4_1
90 #endif
91 
92 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x8_IntraPredictorSmooth
93 #define LIBGAV1_Dsp8bpp_TransformSize32x8_IntraPredictorSmooth \
94   LIBGAV1_CPU_SSE4_1
95 #endif
96 
97 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x16_IntraPredictorSmooth
98 #define LIBGAV1_Dsp8bpp_TransformSize32x16_IntraPredictorSmooth \
99   LIBGAV1_CPU_SSE4_1
100 #endif
101 
102 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x32_IntraPredictorSmooth
103 #define LIBGAV1_Dsp8bpp_TransformSize32x32_IntraPredictorSmooth \
104   LIBGAV1_CPU_SSE4_1
105 #endif
106 
107 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x64_IntraPredictorSmooth
108 #define LIBGAV1_Dsp8bpp_TransformSize32x64_IntraPredictorSmooth \
109   LIBGAV1_CPU_SSE4_1
110 #endif
111 
112 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x16_IntraPredictorSmooth
113 #define LIBGAV1_Dsp8bpp_TransformSize64x16_IntraPredictorSmooth \
114   LIBGAV1_CPU_SSE4_1
115 #endif
116 
117 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x32_IntraPredictorSmooth
118 #define LIBGAV1_Dsp8bpp_TransformSize64x32_IntraPredictorSmooth \
119   LIBGAV1_CPU_SSE4_1
120 #endif
121 
122 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x64_IntraPredictorSmooth
123 #define LIBGAV1_Dsp8bpp_TransformSize64x64_IntraPredictorSmooth \
124   LIBGAV1_CPU_SSE4_1
125 #endif
126 
127 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x4_IntraPredictorSmoothVertical
128 #define LIBGAV1_Dsp8bpp_TransformSize4x4_IntraPredictorSmoothVertical \
129   LIBGAV1_CPU_SSE4_1
130 #endif
131 
132 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x8_IntraPredictorSmoothVertical
133 #define LIBGAV1_Dsp8bpp_TransformSize4x8_IntraPredictorSmoothVertical \
134   LIBGAV1_CPU_SSE4_1
135 #endif
136 
137 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x16_IntraPredictorSmoothVertical
138 #define LIBGAV1_Dsp8bpp_TransformSize4x16_IntraPredictorSmoothVertical \
139   LIBGAV1_CPU_SSE4_1
140 #endif
141 
142 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x4_IntraPredictorSmoothVertical
143 #define LIBGAV1_Dsp8bpp_TransformSize8x4_IntraPredictorSmoothVertical \
144   LIBGAV1_CPU_SSE4_1
145 #endif
146 
147 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x8_IntraPredictorSmoothVertical
148 #define LIBGAV1_Dsp8bpp_TransformSize8x8_IntraPredictorSmoothVertical \
149   LIBGAV1_CPU_SSE4_1
150 #endif
151 
152 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x16_IntraPredictorSmoothVertical
153 #define LIBGAV1_Dsp8bpp_TransformSize8x16_IntraPredictorSmoothVertical \
154   LIBGAV1_CPU_SSE4_1
155 #endif
156 
157 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x32_IntraPredictorSmoothVertical
158 #define LIBGAV1_Dsp8bpp_TransformSize8x32_IntraPredictorSmoothVertical \
159   LIBGAV1_CPU_SSE4_1
160 #endif
161 
162 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x4_IntraPredictorSmoothVertical
163 #define LIBGAV1_Dsp8bpp_TransformSize16x4_IntraPredictorSmoothVertical \
164   LIBGAV1_CPU_SSE4_1
165 #endif
166 
167 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x8_IntraPredictorSmoothVertical
168 #define LIBGAV1_Dsp8bpp_TransformSize16x8_IntraPredictorSmoothVertical \
169   LIBGAV1_CPU_SSE4_1
170 #endif
171 
172 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x16_IntraPredictorSmoothVertical
173 #define LIBGAV1_Dsp8bpp_TransformSize16x16_IntraPredictorSmoothVertical \
174   LIBGAV1_CPU_SSE4_1
175 #endif
176 
177 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x32_IntraPredictorSmoothVertical
178 #define LIBGAV1_Dsp8bpp_TransformSize16x32_IntraPredictorSmoothVertical \
179   LIBGAV1_CPU_SSE4_1
180 #endif
181 
182 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x64_IntraPredictorSmoothVertical
183 #define LIBGAV1_Dsp8bpp_TransformSize16x64_IntraPredictorSmoothVertical \
184   LIBGAV1_CPU_SSE4_1
185 #endif
186 
187 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x8_IntraPredictorSmoothVertical
188 #define LIBGAV1_Dsp8bpp_TransformSize32x8_IntraPredictorSmoothVertical \
189   LIBGAV1_CPU_SSE4_1
190 #endif
191 
192 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x16_IntraPredictorSmoothVertical
193 #define LIBGAV1_Dsp8bpp_TransformSize32x16_IntraPredictorSmoothVertical \
194   LIBGAV1_CPU_SSE4_1
195 #endif
196 
197 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x32_IntraPredictorSmoothVertical
198 #define LIBGAV1_Dsp8bpp_TransformSize32x32_IntraPredictorSmoothVertical \
199   LIBGAV1_CPU_SSE4_1
200 #endif
201 
202 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x64_IntraPredictorSmoothVertical
203 #define LIBGAV1_Dsp8bpp_TransformSize32x64_IntraPredictorSmoothVertical \
204   LIBGAV1_CPU_SSE4_1
205 #endif
206 
207 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x16_IntraPredictorSmoothVertical
208 #define LIBGAV1_Dsp8bpp_TransformSize64x16_IntraPredictorSmoothVertical \
209   LIBGAV1_CPU_SSE4_1
210 #endif
211 
212 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x32_IntraPredictorSmoothVertical
213 #define LIBGAV1_Dsp8bpp_TransformSize64x32_IntraPredictorSmoothVertical \
214   LIBGAV1_CPU_SSE4_1
215 #endif
216 
217 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x64_IntraPredictorSmoothVertical
218 #define LIBGAV1_Dsp8bpp_TransformSize64x64_IntraPredictorSmoothVertical \
219   LIBGAV1_CPU_SSE4_1
220 #endif
221 
222 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x4_IntraPredictorSmoothHorizontal
223 #define LIBGAV1_Dsp8bpp_TransformSize4x4_IntraPredictorSmoothHorizontal \
224   LIBGAV1_CPU_SSE4_1
225 #endif
226 
227 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x8_IntraPredictorSmoothHorizontal
228 #define LIBGAV1_Dsp8bpp_TransformSize4x8_IntraPredictorSmoothHorizontal \
229   LIBGAV1_CPU_SSE4_1
230 #endif
231 
232 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x16_IntraPredictorSmoothHorizontal
233 #define LIBGAV1_Dsp8bpp_TransformSize4x16_IntraPredictorSmoothHorizontal \
234   LIBGAV1_CPU_SSE4_1
235 #endif
236 
237 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x4_IntraPredictorSmoothHorizontal
238 #define LIBGAV1_Dsp8bpp_TransformSize8x4_IntraPredictorSmoothHorizontal \
239   LIBGAV1_CPU_SSE4_1
240 #endif
241 
242 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x8_IntraPredictorSmoothHorizontal
243 #define LIBGAV1_Dsp8bpp_TransformSize8x8_IntraPredictorSmoothHorizontal \
244   LIBGAV1_CPU_SSE4_1
245 #endif
246 
247 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x16_IntraPredictorSmoothHorizontal
248 #define LIBGAV1_Dsp8bpp_TransformSize8x16_IntraPredictorSmoothHorizontal \
249   LIBGAV1_CPU_SSE4_1
250 #endif
251 
252 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x32_IntraPredictorSmoothHorizontal
253 #define LIBGAV1_Dsp8bpp_TransformSize8x32_IntraPredictorSmoothHorizontal \
254   LIBGAV1_CPU_SSE4_1
255 #endif
256 
257 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x4_IntraPredictorSmoothHorizontal
258 #define LIBGAV1_Dsp8bpp_TransformSize16x4_IntraPredictorSmoothHorizontal \
259   LIBGAV1_CPU_SSE4_1
260 #endif
261 
262 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x8_IntraPredictorSmoothHorizontal
263 #define LIBGAV1_Dsp8bpp_TransformSize16x8_IntraPredictorSmoothHorizontal \
264   LIBGAV1_CPU_SSE4_1
265 #endif
266 
267 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x16_IntraPredictorSmoothHorizontal
268 #define LIBGAV1_Dsp8bpp_TransformSize16x16_IntraPredictorSmoothHorizontal \
269   LIBGAV1_CPU_SSE4_1
270 #endif
271 
272 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x32_IntraPredictorSmoothHorizontal
273 #define LIBGAV1_Dsp8bpp_TransformSize16x32_IntraPredictorSmoothHorizontal \
274   LIBGAV1_CPU_SSE4_1
275 #endif
276 
277 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x64_IntraPredictorSmoothHorizontal
278 #define LIBGAV1_Dsp8bpp_TransformSize16x64_IntraPredictorSmoothHorizontal \
279   LIBGAV1_CPU_SSE4_1
280 #endif
281 
282 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x8_IntraPredictorSmoothHorizontal
283 #define LIBGAV1_Dsp8bpp_TransformSize32x8_IntraPredictorSmoothHorizontal \
284   LIBGAV1_CPU_SSE4_1
285 #endif
286 
287 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x16_IntraPredictorSmoothHorizontal
288 #define LIBGAV1_Dsp8bpp_TransformSize32x16_IntraPredictorSmoothHorizontal \
289   LIBGAV1_CPU_SSE4_1
290 #endif
291 
292 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x32_IntraPredictorSmoothHorizontal
293 #define LIBGAV1_Dsp8bpp_TransformSize32x32_IntraPredictorSmoothHorizontal \
294   LIBGAV1_CPU_SSE4_1
295 #endif
296 
297 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x64_IntraPredictorSmoothHorizontal
298 #define LIBGAV1_Dsp8bpp_TransformSize32x64_IntraPredictorSmoothHorizontal \
299   LIBGAV1_CPU_SSE4_1
300 #endif
301 
302 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x16_IntraPredictorSmoothHorizontal
303 #define LIBGAV1_Dsp8bpp_TransformSize64x16_IntraPredictorSmoothHorizontal \
304   LIBGAV1_CPU_SSE4_1
305 #endif
306 
307 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x32_IntraPredictorSmoothHorizontal
308 #define LIBGAV1_Dsp8bpp_TransformSize64x32_IntraPredictorSmoothHorizontal \
309   LIBGAV1_CPU_SSE4_1
310 #endif
311 
312 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x64_IntraPredictorSmoothHorizontal
313 #define LIBGAV1_Dsp8bpp_TransformSize64x64_IntraPredictorSmoothHorizontal \
314   LIBGAV1_CPU_SSE4_1
315 #endif
316 #endif  // LIBGAV1_TARGETING_SSE4_1
317 
318 #endif  // LIBGAV1_SRC_DSP_X86_INTRAPRED_SMOOTH_SSE4_H_
319