1 /*
2  * Copyright (c) 2018, Alliance for Open Media. All rights reserved
3  *
4  * This source code is subject to the terms of the BSD 2 Clause License and
5  * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6  * was not distributed with this source code in the LICENSE file, you can
7  * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8  * Media Patent License 1.0 was not distributed with this source code in the
9  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10  */
11 
12 #include "av1/encoder/x86/av1_txfm1d_sse4.h"
13 
av1_fdct32_new_sse4_1(const __m128i * input,__m128i * output,int8_t cos_bit)14 void av1_fdct32_new_sse4_1(const __m128i *input, __m128i *output,
15                            int8_t cos_bit) {
16   __m128i buf0[32];
17   __m128i buf1[32];
18   const int32_t *cospi;
19   // stage 0
20   // stage 1
21   buf1[0] = _mm_add_epi32(input[0], input[31]);
22   buf1[31] = _mm_sub_epi32(input[0], input[31]);
23   buf1[1] = _mm_add_epi32(input[1], input[30]);
24   buf1[30] = _mm_sub_epi32(input[1], input[30]);
25   buf1[2] = _mm_add_epi32(input[2], input[29]);
26   buf1[29] = _mm_sub_epi32(input[2], input[29]);
27   buf1[3] = _mm_add_epi32(input[3], input[28]);
28   buf1[28] = _mm_sub_epi32(input[3], input[28]);
29   buf1[4] = _mm_add_epi32(input[4], input[27]);
30   buf1[27] = _mm_sub_epi32(input[4], input[27]);
31   buf1[5] = _mm_add_epi32(input[5], input[26]);
32   buf1[26] = _mm_sub_epi32(input[5], input[26]);
33   buf1[6] = _mm_add_epi32(input[6], input[25]);
34   buf1[25] = _mm_sub_epi32(input[6], input[25]);
35   buf1[7] = _mm_add_epi32(input[7], input[24]);
36   buf1[24] = _mm_sub_epi32(input[7], input[24]);
37   buf1[8] = _mm_add_epi32(input[8], input[23]);
38   buf1[23] = _mm_sub_epi32(input[8], input[23]);
39   buf1[9] = _mm_add_epi32(input[9], input[22]);
40   buf1[22] = _mm_sub_epi32(input[9], input[22]);
41   buf1[10] = _mm_add_epi32(input[10], input[21]);
42   buf1[21] = _mm_sub_epi32(input[10], input[21]);
43   buf1[11] = _mm_add_epi32(input[11], input[20]);
44   buf1[20] = _mm_sub_epi32(input[11], input[20]);
45   buf1[12] = _mm_add_epi32(input[12], input[19]);
46   buf1[19] = _mm_sub_epi32(input[12], input[19]);
47   buf1[13] = _mm_add_epi32(input[13], input[18]);
48   buf1[18] = _mm_sub_epi32(input[13], input[18]);
49   buf1[14] = _mm_add_epi32(input[14], input[17]);
50   buf1[17] = _mm_sub_epi32(input[14], input[17]);
51   buf1[15] = _mm_add_epi32(input[15], input[16]);
52   buf1[16] = _mm_sub_epi32(input[15], input[16]);
53 
54   // stage 2
55   cospi = cospi_arr(cos_bit);
56   buf0[0] = _mm_add_epi32(buf1[0], buf1[15]);
57   buf0[15] = _mm_sub_epi32(buf1[0], buf1[15]);
58   buf0[1] = _mm_add_epi32(buf1[1], buf1[14]);
59   buf0[14] = _mm_sub_epi32(buf1[1], buf1[14]);
60   buf0[2] = _mm_add_epi32(buf1[2], buf1[13]);
61   buf0[13] = _mm_sub_epi32(buf1[2], buf1[13]);
62   buf0[3] = _mm_add_epi32(buf1[3], buf1[12]);
63   buf0[12] = _mm_sub_epi32(buf1[3], buf1[12]);
64   buf0[4] = _mm_add_epi32(buf1[4], buf1[11]);
65   buf0[11] = _mm_sub_epi32(buf1[4], buf1[11]);
66   buf0[5] = _mm_add_epi32(buf1[5], buf1[10]);
67   buf0[10] = _mm_sub_epi32(buf1[5], buf1[10]);
68   buf0[6] = _mm_add_epi32(buf1[6], buf1[9]);
69   buf0[9] = _mm_sub_epi32(buf1[6], buf1[9]);
70   buf0[7] = _mm_add_epi32(buf1[7], buf1[8]);
71   buf0[8] = _mm_sub_epi32(buf1[7], buf1[8]);
72   buf0[16] = buf1[16];
73   buf0[17] = buf1[17];
74   buf0[18] = buf1[18];
75   buf0[19] = buf1[19];
76   btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[20], buf1[27], buf0[20],
77                       buf0[27], cos_bit);
78   btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[21], buf1[26], buf0[21],
79                       buf0[26], cos_bit);
80   btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[22], buf1[25], buf0[22],
81                       buf0[25], cos_bit);
82   btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[23], buf1[24], buf0[23],
83                       buf0[24], cos_bit);
84   buf0[28] = buf1[28];
85   buf0[29] = buf1[29];
86   buf0[30] = buf1[30];
87   buf0[31] = buf1[31];
88 
89   // stage 3
90   cospi = cospi_arr(cos_bit);
91   buf1[0] = _mm_add_epi32(buf0[0], buf0[7]);
92   buf1[7] = _mm_sub_epi32(buf0[0], buf0[7]);
93   buf1[1] = _mm_add_epi32(buf0[1], buf0[6]);
94   buf1[6] = _mm_sub_epi32(buf0[1], buf0[6]);
95   buf1[2] = _mm_add_epi32(buf0[2], buf0[5]);
96   buf1[5] = _mm_sub_epi32(buf0[2], buf0[5]);
97   buf1[3] = _mm_add_epi32(buf0[3], buf0[4]);
98   buf1[4] = _mm_sub_epi32(buf0[3], buf0[4]);
99   buf1[8] = buf0[8];
100   buf1[9] = buf0[9];
101   btf_32_sse4_1_type0(-cospi[32], cospi[32], buf0[10], buf0[13], buf1[10],
102                       buf1[13], cos_bit);
103   btf_32_sse4_1_type0(-cospi[32], cospi[32], buf0[11], buf0[12], buf1[11],
104                       buf1[12], cos_bit);
105   buf1[14] = buf0[14];
106   buf1[15] = buf0[15];
107   buf1[16] = _mm_add_epi32(buf0[16], buf0[23]);
108   buf1[23] = _mm_sub_epi32(buf0[16], buf0[23]);
109   buf1[17] = _mm_add_epi32(buf0[17], buf0[22]);
110   buf1[22] = _mm_sub_epi32(buf0[17], buf0[22]);
111   buf1[18] = _mm_add_epi32(buf0[18], buf0[21]);
112   buf1[21] = _mm_sub_epi32(buf0[18], buf0[21]);
113   buf1[19] = _mm_add_epi32(buf0[19], buf0[20]);
114   buf1[20] = _mm_sub_epi32(buf0[19], buf0[20]);
115   buf1[24] = _mm_sub_epi32(buf0[31], buf0[24]);
116   buf1[31] = _mm_add_epi32(buf0[31], buf0[24]);
117   buf1[25] = _mm_sub_epi32(buf0[30], buf0[25]);
118   buf1[30] = _mm_add_epi32(buf0[30], buf0[25]);
119   buf1[26] = _mm_sub_epi32(buf0[29], buf0[26]);
120   buf1[29] = _mm_add_epi32(buf0[29], buf0[26]);
121   buf1[27] = _mm_sub_epi32(buf0[28], buf0[27]);
122   buf1[28] = _mm_add_epi32(buf0[28], buf0[27]);
123 
124   // stage 4
125   cospi = cospi_arr(cos_bit);
126   buf0[0] = _mm_add_epi32(buf1[0], buf1[3]);
127   buf0[3] = _mm_sub_epi32(buf1[0], buf1[3]);
128   buf0[1] = _mm_add_epi32(buf1[1], buf1[2]);
129   buf0[2] = _mm_sub_epi32(buf1[1], buf1[2]);
130   buf0[4] = buf1[4];
131   btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[5], buf1[6], buf0[5], buf0[6],
132                       cos_bit);
133   buf0[7] = buf1[7];
134   buf0[8] = _mm_add_epi32(buf1[8], buf1[11]);
135   buf0[11] = _mm_sub_epi32(buf1[8], buf1[11]);
136   buf0[9] = _mm_add_epi32(buf1[9], buf1[10]);
137   buf0[10] = _mm_sub_epi32(buf1[9], buf1[10]);
138   buf0[12] = _mm_sub_epi32(buf1[15], buf1[12]);
139   buf0[15] = _mm_add_epi32(buf1[15], buf1[12]);
140   buf0[13] = _mm_sub_epi32(buf1[14], buf1[13]);
141   buf0[14] = _mm_add_epi32(buf1[14], buf1[13]);
142   buf0[16] = buf1[16];
143   buf0[17] = buf1[17];
144   btf_32_sse4_1_type0(-cospi[16], cospi[48], buf1[18], buf1[29], buf0[18],
145                       buf0[29], cos_bit);
146   btf_32_sse4_1_type0(-cospi[16], cospi[48], buf1[19], buf1[28], buf0[19],
147                       buf0[28], cos_bit);
148   btf_32_sse4_1_type0(-cospi[48], -cospi[16], buf1[20], buf1[27], buf0[20],
149                       buf0[27], cos_bit);
150   btf_32_sse4_1_type0(-cospi[48], -cospi[16], buf1[21], buf1[26], buf0[21],
151                       buf0[26], cos_bit);
152   buf0[22] = buf1[22];
153   buf0[23] = buf1[23];
154   buf0[24] = buf1[24];
155   buf0[25] = buf1[25];
156   buf0[30] = buf1[30];
157   buf0[31] = buf1[31];
158 
159   // stage 5
160   cospi = cospi_arr(cos_bit);
161   btf_32_sse4_1_type0(cospi[32], cospi[32], buf0[0], buf0[1], buf1[0], buf1[1],
162                       cos_bit);
163   btf_32_sse4_1_type1(cospi[48], cospi[16], buf0[2], buf0[3], buf1[2], buf1[3],
164                       cos_bit);
165   buf1[4] = _mm_add_epi32(buf0[4], buf0[5]);
166   buf1[5] = _mm_sub_epi32(buf0[4], buf0[5]);
167   buf1[6] = _mm_sub_epi32(buf0[7], buf0[6]);
168   buf1[7] = _mm_add_epi32(buf0[7], buf0[6]);
169   buf1[8] = buf0[8];
170   btf_32_sse4_1_type0(-cospi[16], cospi[48], buf0[9], buf0[14], buf1[9],
171                       buf1[14], cos_bit);
172   btf_32_sse4_1_type0(-cospi[48], -cospi[16], buf0[10], buf0[13], buf1[10],
173                       buf1[13], cos_bit);
174   buf1[11] = buf0[11];
175   buf1[12] = buf0[12];
176   buf1[15] = buf0[15];
177   buf1[16] = _mm_add_epi32(buf0[16], buf0[19]);
178   buf1[19] = _mm_sub_epi32(buf0[16], buf0[19]);
179   buf1[17] = _mm_add_epi32(buf0[17], buf0[18]);
180   buf1[18] = _mm_sub_epi32(buf0[17], buf0[18]);
181   buf1[20] = _mm_sub_epi32(buf0[23], buf0[20]);
182   buf1[23] = _mm_add_epi32(buf0[23], buf0[20]);
183   buf1[21] = _mm_sub_epi32(buf0[22], buf0[21]);
184   buf1[22] = _mm_add_epi32(buf0[22], buf0[21]);
185   buf1[24] = _mm_add_epi32(buf0[24], buf0[27]);
186   buf1[27] = _mm_sub_epi32(buf0[24], buf0[27]);
187   buf1[25] = _mm_add_epi32(buf0[25], buf0[26]);
188   buf1[26] = _mm_sub_epi32(buf0[25], buf0[26]);
189   buf1[28] = _mm_sub_epi32(buf0[31], buf0[28]);
190   buf1[31] = _mm_add_epi32(buf0[31], buf0[28]);
191   buf1[29] = _mm_sub_epi32(buf0[30], buf0[29]);
192   buf1[30] = _mm_add_epi32(buf0[30], buf0[29]);
193 
194   // stage 6
195   cospi = cospi_arr(cos_bit);
196   buf0[0] = buf1[0];
197   buf0[1] = buf1[1];
198   buf0[2] = buf1[2];
199   buf0[3] = buf1[3];
200   btf_32_sse4_1_type1(cospi[56], cospi[8], buf1[4], buf1[7], buf0[4], buf0[7],
201                       cos_bit);
202   btf_32_sse4_1_type1(cospi[24], cospi[40], buf1[5], buf1[6], buf0[5], buf0[6],
203                       cos_bit);
204   buf0[8] = _mm_add_epi32(buf1[8], buf1[9]);
205   buf0[9] = _mm_sub_epi32(buf1[8], buf1[9]);
206   buf0[10] = _mm_sub_epi32(buf1[11], buf1[10]);
207   buf0[11] = _mm_add_epi32(buf1[11], buf1[10]);
208   buf0[12] = _mm_add_epi32(buf1[12], buf1[13]);
209   buf0[13] = _mm_sub_epi32(buf1[12], buf1[13]);
210   buf0[14] = _mm_sub_epi32(buf1[15], buf1[14]);
211   buf0[15] = _mm_add_epi32(buf1[15], buf1[14]);
212   buf0[16] = buf1[16];
213   btf_32_sse4_1_type0(-cospi[8], cospi[56], buf1[17], buf1[30], buf0[17],
214                       buf0[30], cos_bit);
215   btf_32_sse4_1_type0(-cospi[56], -cospi[8], buf1[18], buf1[29], buf0[18],
216                       buf0[29], cos_bit);
217   buf0[19] = buf1[19];
218   buf0[20] = buf1[20];
219   btf_32_sse4_1_type0(-cospi[40], cospi[24], buf1[21], buf1[26], buf0[21],
220                       buf0[26], cos_bit);
221   btf_32_sse4_1_type0(-cospi[24], -cospi[40], buf1[22], buf1[25], buf0[22],
222                       buf0[25], cos_bit);
223   buf0[23] = buf1[23];
224   buf0[24] = buf1[24];
225   buf0[27] = buf1[27];
226   buf0[28] = buf1[28];
227   buf0[31] = buf1[31];
228 
229   // stage 7
230   cospi = cospi_arr(cos_bit);
231   buf1[0] = buf0[0];
232   buf1[1] = buf0[1];
233   buf1[2] = buf0[2];
234   buf1[3] = buf0[3];
235   buf1[4] = buf0[4];
236   buf1[5] = buf0[5];
237   buf1[6] = buf0[6];
238   buf1[7] = buf0[7];
239   btf_32_sse4_1_type1(cospi[60], cospi[4], buf0[8], buf0[15], buf1[8], buf1[15],
240                       cos_bit);
241   btf_32_sse4_1_type1(cospi[28], cospi[36], buf0[9], buf0[14], buf1[9],
242                       buf1[14], cos_bit);
243   btf_32_sse4_1_type1(cospi[44], cospi[20], buf0[10], buf0[13], buf1[10],
244                       buf1[13], cos_bit);
245   btf_32_sse4_1_type1(cospi[12], cospi[52], buf0[11], buf0[12], buf1[11],
246                       buf1[12], cos_bit);
247   buf1[16] = _mm_add_epi32(buf0[16], buf0[17]);
248   buf1[17] = _mm_sub_epi32(buf0[16], buf0[17]);
249   buf1[18] = _mm_sub_epi32(buf0[19], buf0[18]);
250   buf1[19] = _mm_add_epi32(buf0[19], buf0[18]);
251   buf1[20] = _mm_add_epi32(buf0[20], buf0[21]);
252   buf1[21] = _mm_sub_epi32(buf0[20], buf0[21]);
253   buf1[22] = _mm_sub_epi32(buf0[23], buf0[22]);
254   buf1[23] = _mm_add_epi32(buf0[23], buf0[22]);
255   buf1[24] = _mm_add_epi32(buf0[24], buf0[25]);
256   buf1[25] = _mm_sub_epi32(buf0[24], buf0[25]);
257   buf1[26] = _mm_sub_epi32(buf0[27], buf0[26]);
258   buf1[27] = _mm_add_epi32(buf0[27], buf0[26]);
259   buf1[28] = _mm_add_epi32(buf0[28], buf0[29]);
260   buf1[29] = _mm_sub_epi32(buf0[28], buf0[29]);
261   buf1[30] = _mm_sub_epi32(buf0[31], buf0[30]);
262   buf1[31] = _mm_add_epi32(buf0[31], buf0[30]);
263 
264   // stage 8
265   cospi = cospi_arr(cos_bit);
266   buf0[0] = buf1[0];
267   buf0[1] = buf1[1];
268   buf0[2] = buf1[2];
269   buf0[3] = buf1[3];
270   buf0[4] = buf1[4];
271   buf0[5] = buf1[5];
272   buf0[6] = buf1[6];
273   buf0[7] = buf1[7];
274   buf0[8] = buf1[8];
275   buf0[9] = buf1[9];
276   buf0[10] = buf1[10];
277   buf0[11] = buf1[11];
278   buf0[12] = buf1[12];
279   buf0[13] = buf1[13];
280   buf0[14] = buf1[14];
281   buf0[15] = buf1[15];
282   btf_32_sse4_1_type1(cospi[62], cospi[2], buf1[16], buf1[31], buf0[16],
283                       buf0[31], cos_bit);
284   btf_32_sse4_1_type1(cospi[30], cospi[34], buf1[17], buf1[30], buf0[17],
285                       buf0[30], cos_bit);
286   btf_32_sse4_1_type1(cospi[46], cospi[18], buf1[18], buf1[29], buf0[18],
287                       buf0[29], cos_bit);
288   btf_32_sse4_1_type1(cospi[14], cospi[50], buf1[19], buf1[28], buf0[19],
289                       buf0[28], cos_bit);
290   btf_32_sse4_1_type1(cospi[54], cospi[10], buf1[20], buf1[27], buf0[20],
291                       buf0[27], cos_bit);
292   btf_32_sse4_1_type1(cospi[22], cospi[42], buf1[21], buf1[26], buf0[21],
293                       buf0[26], cos_bit);
294   btf_32_sse4_1_type1(cospi[38], cospi[26], buf1[22], buf1[25], buf0[22],
295                       buf0[25], cos_bit);
296   btf_32_sse4_1_type1(cospi[6], cospi[58], buf1[23], buf1[24], buf0[23],
297                       buf0[24], cos_bit);
298 
299   // stage 9
300   output[0] = buf0[0];
301   output[1] = buf0[16];
302   output[2] = buf0[8];
303   output[3] = buf0[24];
304   output[4] = buf0[4];
305   output[5] = buf0[20];
306   output[6] = buf0[12];
307   output[7] = buf0[28];
308   output[8] = buf0[2];
309   output[9] = buf0[18];
310   output[10] = buf0[10];
311   output[11] = buf0[26];
312   output[12] = buf0[6];
313   output[13] = buf0[22];
314   output[14] = buf0[14];
315   output[15] = buf0[30];
316   output[16] = buf0[1];
317   output[17] = buf0[17];
318   output[18] = buf0[9];
319   output[19] = buf0[25];
320   output[20] = buf0[5];
321   output[21] = buf0[21];
322   output[22] = buf0[13];
323   output[23] = buf0[29];
324   output[24] = buf0[3];
325   output[25] = buf0[19];
326   output[26] = buf0[11];
327   output[27] = buf0[27];
328   output[28] = buf0[7];
329   output[29] = buf0[23];
330   output[30] = buf0[15];
331   output[31] = buf0[31];
332 }
333 
av1_fadst4_new_sse4_1(const __m128i * input,__m128i * output,const int8_t cos_bit,const int8_t * stage_range)334 void av1_fadst4_new_sse4_1(const __m128i *input, __m128i *output,
335                            const int8_t cos_bit, const int8_t *stage_range) {
336   const int txfm_size = 4;
337   const int num_per_128 = 4;
338   const int32_t *cospi;
339   __m128i buf0[4];
340   __m128i buf1[4];
341   int col_num = txfm_size / num_per_128;
342   int col;
343   (void)stage_range;
344   for (col = 0; col < col_num; col++) {
345     // stage 0;
346     int32_t stage_idx = 0;
347     int j;
348     for (j = 0; j < 4; ++j) {
349       buf0[j] = input[j * col_num + col];
350     }
351 
352     // stage 1
353     stage_idx++;
354     buf1[0] = buf0[3];
355     buf1[1] = buf0[0];
356     buf1[2] = buf0[1];
357     buf1[3] = buf0[2];
358 
359     // stage 2
360     stage_idx++;
361 
362     cospi = cospi_arr(cos_bit);
363     btf_32_sse4_1_type0(cospi[8], cospi[56], buf1[0], buf1[1], buf0[0], buf0[1],
364                         cos_bit);
365     btf_32_sse4_1_type0(cospi[40], cospi[24], buf1[2], buf1[3], buf0[2],
366                         buf0[3], cos_bit);
367 
368     // stage 3
369     stage_idx++;
370     buf1[0] = _mm_add_epi32(buf0[0], buf0[2]);
371     buf1[2] = _mm_sub_epi32(buf0[0], buf0[2]);
372     buf1[1] = _mm_add_epi32(buf0[1], buf0[3]);
373     buf1[3] = _mm_sub_epi32(buf0[1], buf0[3]);
374 
375     // stage 4
376     stage_idx++;
377 
378     cospi = cospi_arr(cos_bit);
379     buf0[0] = buf1[0];
380     buf0[1] = buf1[1];
381     btf_32_sse4_1_type0(cospi[32], cospi[32], buf1[2], buf1[3], buf0[2],
382                         buf0[3], cos_bit);
383 
384     // stage 5
385     stage_idx++;
386     buf1[0] = buf0[0];
387     buf1[1] = _mm_sub_epi32(_mm_setzero_si128(), buf0[2]);
388     buf1[2] = buf0[3];
389     buf1[3] = _mm_sub_epi32(_mm_setzero_si128(), buf0[1]);
390 
391     for (j = 0; j < 4; ++j) {
392       output[j * col_num + col] = buf1[j];
393     }
394   }
395 }
396 
av1_fdct64_new_sse4_1(const __m128i * input,__m128i * output,int8_t cos_bit,const int instride,const int outstride)397 void av1_fdct64_new_sse4_1(const __m128i *input, __m128i *output,
398                            int8_t cos_bit, const int instride,
399                            const int outstride) {
400   const int32_t *cospi = cospi_arr(cos_bit);
401   const __m128i __rounding = _mm_set1_epi32(1 << (cos_bit - 1));
402 
403   __m128i cospi_m32 = _mm_set1_epi32(-cospi[32]);
404   __m128i cospi_p32 = _mm_set1_epi32(cospi[32]);
405   __m128i cospi_m16 = _mm_set1_epi32(-cospi[16]);
406   __m128i cospi_p48 = _mm_set1_epi32(cospi[48]);
407   __m128i cospi_m48 = _mm_set1_epi32(-cospi[48]);
408   __m128i cospi_p16 = _mm_set1_epi32(cospi[16]);
409   __m128i cospi_m08 = _mm_set1_epi32(-cospi[8]);
410   __m128i cospi_p56 = _mm_set1_epi32(cospi[56]);
411   __m128i cospi_m56 = _mm_set1_epi32(-cospi[56]);
412   __m128i cospi_m40 = _mm_set1_epi32(-cospi[40]);
413   __m128i cospi_p24 = _mm_set1_epi32(cospi[24]);
414   __m128i cospi_m24 = _mm_set1_epi32(-cospi[24]);
415   __m128i cospi_p08 = _mm_set1_epi32(cospi[8]);
416   __m128i cospi_p40 = _mm_set1_epi32(cospi[40]);
417   __m128i cospi_p60 = _mm_set1_epi32(cospi[60]);
418   __m128i cospi_p04 = _mm_set1_epi32(cospi[4]);
419   __m128i cospi_p28 = _mm_set1_epi32(cospi[28]);
420   __m128i cospi_p36 = _mm_set1_epi32(cospi[36]);
421   __m128i cospi_p44 = _mm_set1_epi32(cospi[44]);
422   __m128i cospi_p20 = _mm_set1_epi32(cospi[20]);
423   __m128i cospi_p12 = _mm_set1_epi32(cospi[12]);
424   __m128i cospi_p52 = _mm_set1_epi32(cospi[52]);
425   __m128i cospi_m04 = _mm_set1_epi32(-cospi[4]);
426   __m128i cospi_m60 = _mm_set1_epi32(-cospi[60]);
427   __m128i cospi_m36 = _mm_set1_epi32(-cospi[36]);
428   __m128i cospi_m28 = _mm_set1_epi32(-cospi[28]);
429   __m128i cospi_m20 = _mm_set1_epi32(-cospi[20]);
430   __m128i cospi_m44 = _mm_set1_epi32(-cospi[44]);
431   __m128i cospi_m52 = _mm_set1_epi32(-cospi[52]);
432   __m128i cospi_m12 = _mm_set1_epi32(-cospi[12]);
433   __m128i cospi_p62 = _mm_set1_epi32(cospi[62]);
434   __m128i cospi_p02 = _mm_set1_epi32(cospi[2]);
435   __m128i cospi_p30 = _mm_set1_epi32(cospi[30]);
436   __m128i cospi_p34 = _mm_set1_epi32(cospi[34]);
437   __m128i cospi_p46 = _mm_set1_epi32(cospi[46]);
438   __m128i cospi_p18 = _mm_set1_epi32(cospi[18]);
439   __m128i cospi_p14 = _mm_set1_epi32(cospi[14]);
440   __m128i cospi_p50 = _mm_set1_epi32(cospi[50]);
441   __m128i cospi_p54 = _mm_set1_epi32(cospi[54]);
442   __m128i cospi_p10 = _mm_set1_epi32(cospi[10]);
443   __m128i cospi_p22 = _mm_set1_epi32(cospi[22]);
444   __m128i cospi_p42 = _mm_set1_epi32(cospi[42]);
445   __m128i cospi_p38 = _mm_set1_epi32(cospi[38]);
446   __m128i cospi_p26 = _mm_set1_epi32(cospi[26]);
447   __m128i cospi_p06 = _mm_set1_epi32(cospi[6]);
448   __m128i cospi_p58 = _mm_set1_epi32(cospi[58]);
449   __m128i cospi_p63 = _mm_set1_epi32(cospi[63]);
450   __m128i cospi_p01 = _mm_set1_epi32(cospi[1]);
451   __m128i cospi_p31 = _mm_set1_epi32(cospi[31]);
452   __m128i cospi_p33 = _mm_set1_epi32(cospi[33]);
453   __m128i cospi_p47 = _mm_set1_epi32(cospi[47]);
454   __m128i cospi_p17 = _mm_set1_epi32(cospi[17]);
455   __m128i cospi_p15 = _mm_set1_epi32(cospi[15]);
456   __m128i cospi_p49 = _mm_set1_epi32(cospi[49]);
457   __m128i cospi_p55 = _mm_set1_epi32(cospi[55]);
458   __m128i cospi_p09 = _mm_set1_epi32(cospi[9]);
459   __m128i cospi_p23 = _mm_set1_epi32(cospi[23]);
460   __m128i cospi_p41 = _mm_set1_epi32(cospi[41]);
461   __m128i cospi_p39 = _mm_set1_epi32(cospi[39]);
462   __m128i cospi_p25 = _mm_set1_epi32(cospi[25]);
463   __m128i cospi_p07 = _mm_set1_epi32(cospi[7]);
464   __m128i cospi_p57 = _mm_set1_epi32(cospi[57]);
465   __m128i cospi_p59 = _mm_set1_epi32(cospi[59]);
466   __m128i cospi_p05 = _mm_set1_epi32(cospi[5]);
467   __m128i cospi_p27 = _mm_set1_epi32(cospi[27]);
468   __m128i cospi_p37 = _mm_set1_epi32(cospi[37]);
469   __m128i cospi_p43 = _mm_set1_epi32(cospi[43]);
470   __m128i cospi_p21 = _mm_set1_epi32(cospi[21]);
471   __m128i cospi_p11 = _mm_set1_epi32(cospi[11]);
472   __m128i cospi_p53 = _mm_set1_epi32(cospi[53]);
473   __m128i cospi_p51 = _mm_set1_epi32(cospi[51]);
474   __m128i cospi_p13 = _mm_set1_epi32(cospi[13]);
475   __m128i cospi_p19 = _mm_set1_epi32(cospi[19]);
476   __m128i cospi_p45 = _mm_set1_epi32(cospi[45]);
477   __m128i cospi_p35 = _mm_set1_epi32(cospi[35]);
478   __m128i cospi_p29 = _mm_set1_epi32(cospi[29]);
479   __m128i cospi_p03 = _mm_set1_epi32(cospi[3]);
480   __m128i cospi_p61 = _mm_set1_epi32(cospi[61]);
481 
482   // stage 1
483   __m128i x1[64];
484   x1[0] = _mm_add_epi32(input[0 * instride], input[63 * instride]);
485   x1[63] = _mm_sub_epi32(input[0 * instride], input[63 * instride]);
486   x1[1] = _mm_add_epi32(input[1 * instride], input[62 * instride]);
487   x1[62] = _mm_sub_epi32(input[1 * instride], input[62 * instride]);
488   x1[2] = _mm_add_epi32(input[2 * instride], input[61 * instride]);
489   x1[61] = _mm_sub_epi32(input[2 * instride], input[61 * instride]);
490   x1[3] = _mm_add_epi32(input[3 * instride], input[60 * instride]);
491   x1[60] = _mm_sub_epi32(input[3 * instride], input[60 * instride]);
492   x1[4] = _mm_add_epi32(input[4 * instride], input[59 * instride]);
493   x1[59] = _mm_sub_epi32(input[4 * instride], input[59 * instride]);
494   x1[5] = _mm_add_epi32(input[5 * instride], input[58 * instride]);
495   x1[58] = _mm_sub_epi32(input[5 * instride], input[58 * instride]);
496   x1[6] = _mm_add_epi32(input[6 * instride], input[57 * instride]);
497   x1[57] = _mm_sub_epi32(input[6 * instride], input[57 * instride]);
498   x1[7] = _mm_add_epi32(input[7 * instride], input[56 * instride]);
499   x1[56] = _mm_sub_epi32(input[7 * instride], input[56 * instride]);
500   x1[8] = _mm_add_epi32(input[8 * instride], input[55 * instride]);
501   x1[55] = _mm_sub_epi32(input[8 * instride], input[55 * instride]);
502   x1[9] = _mm_add_epi32(input[9 * instride], input[54 * instride]);
503   x1[54] = _mm_sub_epi32(input[9 * instride], input[54 * instride]);
504   x1[10] = _mm_add_epi32(input[10 * instride], input[53 * instride]);
505   x1[53] = _mm_sub_epi32(input[10 * instride], input[53 * instride]);
506   x1[11] = _mm_add_epi32(input[11 * instride], input[52 * instride]);
507   x1[52] = _mm_sub_epi32(input[11 * instride], input[52 * instride]);
508   x1[12] = _mm_add_epi32(input[12 * instride], input[51 * instride]);
509   x1[51] = _mm_sub_epi32(input[12 * instride], input[51 * instride]);
510   x1[13] = _mm_add_epi32(input[13 * instride], input[50 * instride]);
511   x1[50] = _mm_sub_epi32(input[13 * instride], input[50 * instride]);
512   x1[14] = _mm_add_epi32(input[14 * instride], input[49 * instride]);
513   x1[49] = _mm_sub_epi32(input[14 * instride], input[49 * instride]);
514   x1[15] = _mm_add_epi32(input[15 * instride], input[48 * instride]);
515   x1[48] = _mm_sub_epi32(input[15 * instride], input[48 * instride]);
516   x1[16] = _mm_add_epi32(input[16 * instride], input[47 * instride]);
517   x1[47] = _mm_sub_epi32(input[16 * instride], input[47 * instride]);
518   x1[17] = _mm_add_epi32(input[17 * instride], input[46 * instride]);
519   x1[46] = _mm_sub_epi32(input[17 * instride], input[46 * instride]);
520   x1[18] = _mm_add_epi32(input[18 * instride], input[45 * instride]);
521   x1[45] = _mm_sub_epi32(input[18 * instride], input[45 * instride]);
522   x1[19] = _mm_add_epi32(input[19 * instride], input[44 * instride]);
523   x1[44] = _mm_sub_epi32(input[19 * instride], input[44 * instride]);
524   x1[20] = _mm_add_epi32(input[20 * instride], input[43 * instride]);
525   x1[43] = _mm_sub_epi32(input[20 * instride], input[43 * instride]);
526   x1[21] = _mm_add_epi32(input[21 * instride], input[42 * instride]);
527   x1[42] = _mm_sub_epi32(input[21 * instride], input[42 * instride]);
528   x1[22] = _mm_add_epi32(input[22 * instride], input[41 * instride]);
529   x1[41] = _mm_sub_epi32(input[22 * instride], input[41 * instride]);
530   x1[23] = _mm_add_epi32(input[23 * instride], input[40 * instride]);
531   x1[40] = _mm_sub_epi32(input[23 * instride], input[40 * instride]);
532   x1[24] = _mm_add_epi32(input[24 * instride], input[39 * instride]);
533   x1[39] = _mm_sub_epi32(input[24 * instride], input[39 * instride]);
534   x1[25] = _mm_add_epi32(input[25 * instride], input[38 * instride]);
535   x1[38] = _mm_sub_epi32(input[25 * instride], input[38 * instride]);
536   x1[26] = _mm_add_epi32(input[26 * instride], input[37 * instride]);
537   x1[37] = _mm_sub_epi32(input[26 * instride], input[37 * instride]);
538   x1[27] = _mm_add_epi32(input[27 * instride], input[36 * instride]);
539   x1[36] = _mm_sub_epi32(input[27 * instride], input[36 * instride]);
540   x1[28] = _mm_add_epi32(input[28 * instride], input[35 * instride]);
541   x1[35] = _mm_sub_epi32(input[28 * instride], input[35 * instride]);
542   x1[29] = _mm_add_epi32(input[29 * instride], input[34 * instride]);
543   x1[34] = _mm_sub_epi32(input[29 * instride], input[34 * instride]);
544   x1[30] = _mm_add_epi32(input[30 * instride], input[33 * instride]);
545   x1[33] = _mm_sub_epi32(input[30 * instride], input[33 * instride]);
546   x1[31] = _mm_add_epi32(input[31 * instride], input[32 * instride]);
547   x1[32] = _mm_sub_epi32(input[31 * instride], input[32 * instride]);
548 
549   // stage 2
550   __m128i x2[64];
551   x2[0] = _mm_add_epi32(x1[0], x1[31]);
552   x2[31] = _mm_sub_epi32(x1[0], x1[31]);
553   x2[1] = _mm_add_epi32(x1[1], x1[30]);
554   x2[30] = _mm_sub_epi32(x1[1], x1[30]);
555   x2[2] = _mm_add_epi32(x1[2], x1[29]);
556   x2[29] = _mm_sub_epi32(x1[2], x1[29]);
557   x2[3] = _mm_add_epi32(x1[3], x1[28]);
558   x2[28] = _mm_sub_epi32(x1[3], x1[28]);
559   x2[4] = _mm_add_epi32(x1[4], x1[27]);
560   x2[27] = _mm_sub_epi32(x1[4], x1[27]);
561   x2[5] = _mm_add_epi32(x1[5], x1[26]);
562   x2[26] = _mm_sub_epi32(x1[5], x1[26]);
563   x2[6] = _mm_add_epi32(x1[6], x1[25]);
564   x2[25] = _mm_sub_epi32(x1[6], x1[25]);
565   x2[7] = _mm_add_epi32(x1[7], x1[24]);
566   x2[24] = _mm_sub_epi32(x1[7], x1[24]);
567   x2[8] = _mm_add_epi32(x1[8], x1[23]);
568   x2[23] = _mm_sub_epi32(x1[8], x1[23]);
569   x2[9] = _mm_add_epi32(x1[9], x1[22]);
570   x2[22] = _mm_sub_epi32(x1[9], x1[22]);
571   x2[10] = _mm_add_epi32(x1[10], x1[21]);
572   x2[21] = _mm_sub_epi32(x1[10], x1[21]);
573   x2[11] = _mm_add_epi32(x1[11], x1[20]);
574   x2[20] = _mm_sub_epi32(x1[11], x1[20]);
575   x2[12] = _mm_add_epi32(x1[12], x1[19]);
576   x2[19] = _mm_sub_epi32(x1[12], x1[19]);
577   x2[13] = _mm_add_epi32(x1[13], x1[18]);
578   x2[18] = _mm_sub_epi32(x1[13], x1[18]);
579   x2[14] = _mm_add_epi32(x1[14], x1[17]);
580   x2[17] = _mm_sub_epi32(x1[14], x1[17]);
581   x2[15] = _mm_add_epi32(x1[15], x1[16]);
582   x2[16] = _mm_sub_epi32(x1[15], x1[16]);
583   x2[32] = x1[32];
584   x2[33] = x1[33];
585   x2[34] = x1[34];
586   x2[35] = x1[35];
587   x2[36] = x1[36];
588   x2[37] = x1[37];
589   x2[38] = x1[38];
590   x2[39] = x1[39];
591   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x1[40], x1[55], x2[40], x2[55],
592                           __rounding, cos_bit);
593   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x1[41], x1[54], x2[41], x2[54],
594                           __rounding, cos_bit);
595   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x1[42], x1[53], x2[42], x2[53],
596                           __rounding, cos_bit);
597   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x1[43], x1[52], x2[43], x2[52],
598                           __rounding, cos_bit);
599   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x1[44], x1[51], x2[44], x2[51],
600                           __rounding, cos_bit);
601   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x1[45], x1[50], x2[45], x2[50],
602                           __rounding, cos_bit);
603   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x1[46], x1[49], x2[46], x2[49],
604                           __rounding, cos_bit);
605   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x1[47], x1[48], x2[47], x2[48],
606                           __rounding, cos_bit);
607   x2[56] = x1[56];
608   x2[57] = x1[57];
609   x2[58] = x1[58];
610   x2[59] = x1[59];
611   x2[60] = x1[60];
612   x2[61] = x1[61];
613   x2[62] = x1[62];
614   x2[63] = x1[63];
615 
616   // stage 3
617   __m128i x3[64];
618   x3[0] = _mm_add_epi32(x2[0], x2[15]);
619   x3[15] = _mm_sub_epi32(x2[0], x2[15]);
620   x3[1] = _mm_add_epi32(x2[1], x2[14]);
621   x3[14] = _mm_sub_epi32(x2[1], x2[14]);
622   x3[2] = _mm_add_epi32(x2[2], x2[13]);
623   x3[13] = _mm_sub_epi32(x2[2], x2[13]);
624   x3[3] = _mm_add_epi32(x2[3], x2[12]);
625   x3[12] = _mm_sub_epi32(x2[3], x2[12]);
626   x3[4] = _mm_add_epi32(x2[4], x2[11]);
627   x3[11] = _mm_sub_epi32(x2[4], x2[11]);
628   x3[5] = _mm_add_epi32(x2[5], x2[10]);
629   x3[10] = _mm_sub_epi32(x2[5], x2[10]);
630   x3[6] = _mm_add_epi32(x2[6], x2[9]);
631   x3[9] = _mm_sub_epi32(x2[6], x2[9]);
632   x3[7] = _mm_add_epi32(x2[7], x2[8]);
633   x3[8] = _mm_sub_epi32(x2[7], x2[8]);
634   x3[16] = x2[16];
635   x3[17] = x2[17];
636   x3[18] = x2[18];
637   x3[19] = x2[19];
638   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x2[20], x2[27], x3[20], x3[27],
639                           __rounding, cos_bit);
640   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x2[21], x2[26], x3[21], x3[26],
641                           __rounding, cos_bit);
642   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x2[22], x2[25], x3[22], x3[25],
643                           __rounding, cos_bit);
644   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x2[23], x2[24], x3[23], x3[24],
645                           __rounding, cos_bit);
646   x3[28] = x2[28];
647   x3[29] = x2[29];
648   x3[30] = x2[30];
649   x3[31] = x2[31];
650   x3[32] = _mm_add_epi32(x2[32], x2[47]);
651   x3[47] = _mm_sub_epi32(x2[32], x2[47]);
652   x3[33] = _mm_add_epi32(x2[33], x2[46]);
653   x3[46] = _mm_sub_epi32(x2[33], x2[46]);
654   x3[34] = _mm_add_epi32(x2[34], x2[45]);
655   x3[45] = _mm_sub_epi32(x2[34], x2[45]);
656   x3[35] = _mm_add_epi32(x2[35], x2[44]);
657   x3[44] = _mm_sub_epi32(x2[35], x2[44]);
658   x3[36] = _mm_add_epi32(x2[36], x2[43]);
659   x3[43] = _mm_sub_epi32(x2[36], x2[43]);
660   x3[37] = _mm_add_epi32(x2[37], x2[42]);
661   x3[42] = _mm_sub_epi32(x2[37], x2[42]);
662   x3[38] = _mm_add_epi32(x2[38], x2[41]);
663   x3[41] = _mm_sub_epi32(x2[38], x2[41]);
664   x3[39] = _mm_add_epi32(x2[39], x2[40]);
665   x3[40] = _mm_sub_epi32(x2[39], x2[40]);
666   x3[48] = _mm_sub_epi32(x2[63], x2[48]);
667   x3[63] = _mm_add_epi32(x2[63], x2[48]);
668   x3[49] = _mm_sub_epi32(x2[62], x2[49]);
669   x3[62] = _mm_add_epi32(x2[62], x2[49]);
670   x3[50] = _mm_sub_epi32(x2[61], x2[50]);
671   x3[61] = _mm_add_epi32(x2[61], x2[50]);
672   x3[51] = _mm_sub_epi32(x2[60], x2[51]);
673   x3[60] = _mm_add_epi32(x2[60], x2[51]);
674   x3[52] = _mm_sub_epi32(x2[59], x2[52]);
675   x3[59] = _mm_add_epi32(x2[59], x2[52]);
676   x3[53] = _mm_sub_epi32(x2[58], x2[53]);
677   x3[58] = _mm_add_epi32(x2[58], x2[53]);
678   x3[54] = _mm_sub_epi32(x2[57], x2[54]);
679   x3[57] = _mm_add_epi32(x2[57], x2[54]);
680   x3[55] = _mm_sub_epi32(x2[56], x2[55]);
681   x3[56] = _mm_add_epi32(x2[56], x2[55]);
682 
683   // stage 4
684   __m128i x4[64];
685   x4[0] = _mm_add_epi32(x3[0], x3[7]);
686   x4[7] = _mm_sub_epi32(x3[0], x3[7]);
687   x4[1] = _mm_add_epi32(x3[1], x3[6]);
688   x4[6] = _mm_sub_epi32(x3[1], x3[6]);
689   x4[2] = _mm_add_epi32(x3[2], x3[5]);
690   x4[5] = _mm_sub_epi32(x3[2], x3[5]);
691   x4[3] = _mm_add_epi32(x3[3], x3[4]);
692   x4[4] = _mm_sub_epi32(x3[3], x3[4]);
693   x4[8] = x3[8];
694   x4[9] = x3[9];
695   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x3[10], x3[13], x4[10], x4[13],
696                           __rounding, cos_bit);
697   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x3[11], x3[12], x4[11], x4[12],
698                           __rounding, cos_bit);
699   x4[14] = x3[14];
700   x4[15] = x3[15];
701   x4[16] = _mm_add_epi32(x3[16], x3[23]);
702   x4[23] = _mm_sub_epi32(x3[16], x3[23]);
703   x4[17] = _mm_add_epi32(x3[17], x3[22]);
704   x4[22] = _mm_sub_epi32(x3[17], x3[22]);
705   x4[18] = _mm_add_epi32(x3[18], x3[21]);
706   x4[21] = _mm_sub_epi32(x3[18], x3[21]);
707   x4[19] = _mm_add_epi32(x3[19], x3[20]);
708   x4[20] = _mm_sub_epi32(x3[19], x3[20]);
709   x4[24] = _mm_sub_epi32(x3[31], x3[24]);
710   x4[31] = _mm_add_epi32(x3[31], x3[24]);
711   x4[25] = _mm_sub_epi32(x3[30], x3[25]);
712   x4[30] = _mm_add_epi32(x3[30], x3[25]);
713   x4[26] = _mm_sub_epi32(x3[29], x3[26]);
714   x4[29] = _mm_add_epi32(x3[29], x3[26]);
715   x4[27] = _mm_sub_epi32(x3[28], x3[27]);
716   x4[28] = _mm_add_epi32(x3[28], x3[27]);
717   x4[32] = x3[32];
718   x4[33] = x3[33];
719   x4[34] = x3[34];
720   x4[35] = x3[35];
721   btf_32_type0_sse4_1_new(cospi_m16, cospi_p48, x3[36], x3[59], x4[36], x4[59],
722                           __rounding, cos_bit);
723   btf_32_type0_sse4_1_new(cospi_m16, cospi_p48, x3[37], x3[58], x4[37], x4[58],
724                           __rounding, cos_bit);
725   btf_32_type0_sse4_1_new(cospi_m16, cospi_p48, x3[38], x3[57], x4[38], x4[57],
726                           __rounding, cos_bit);
727   btf_32_type0_sse4_1_new(cospi_m16, cospi_p48, x3[39], x3[56], x4[39], x4[56],
728                           __rounding, cos_bit);
729   btf_32_type0_sse4_1_new(cospi_m48, cospi_m16, x3[40], x3[55], x4[40], x4[55],
730                           __rounding, cos_bit);
731   btf_32_type0_sse4_1_new(cospi_m48, cospi_m16, x3[41], x3[54], x4[41], x4[54],
732                           __rounding, cos_bit);
733   btf_32_type0_sse4_1_new(cospi_m48, cospi_m16, x3[42], x3[53], x4[42], x4[53],
734                           __rounding, cos_bit);
735   btf_32_type0_sse4_1_new(cospi_m48, cospi_m16, x3[43], x3[52], x4[43], x4[52],
736                           __rounding, cos_bit);
737   x4[44] = x3[44];
738   x4[45] = x3[45];
739   x4[46] = x3[46];
740   x4[47] = x3[47];
741   x4[48] = x3[48];
742   x4[49] = x3[49];
743   x4[50] = x3[50];
744   x4[51] = x3[51];
745   x4[60] = x3[60];
746   x4[61] = x3[61];
747   x4[62] = x3[62];
748   x4[63] = x3[63];
749 
750   // stage 5
751   __m128i x5[64];
752   x5[0] = _mm_add_epi32(x4[0], x4[3]);
753   x5[3] = _mm_sub_epi32(x4[0], x4[3]);
754   x5[1] = _mm_add_epi32(x4[1], x4[2]);
755   x5[2] = _mm_sub_epi32(x4[1], x4[2]);
756   x5[4] = x4[4];
757   btf_32_type0_sse4_1_new(cospi_m32, cospi_p32, x4[5], x4[6], x5[5], x5[6],
758                           __rounding, cos_bit);
759   x5[7] = x4[7];
760   x5[8] = _mm_add_epi32(x4[8], x4[11]);
761   x5[11] = _mm_sub_epi32(x4[8], x4[11]);
762   x5[9] = _mm_add_epi32(x4[9], x4[10]);
763   x5[10] = _mm_sub_epi32(x4[9], x4[10]);
764   x5[12] = _mm_sub_epi32(x4[15], x4[12]);
765   x5[15] = _mm_add_epi32(x4[15], x4[12]);
766   x5[13] = _mm_sub_epi32(x4[14], x4[13]);
767   x5[14] = _mm_add_epi32(x4[14], x4[13]);
768   x5[16] = x4[16];
769   x5[17] = x4[17];
770   btf_32_type0_sse4_1_new(cospi_m16, cospi_p48, x4[18], x4[29], x5[18], x5[29],
771                           __rounding, cos_bit);
772   btf_32_type0_sse4_1_new(cospi_m16, cospi_p48, x4[19], x4[28], x5[19], x5[28],
773                           __rounding, cos_bit);
774   btf_32_type0_sse4_1_new(cospi_m48, cospi_m16, x4[20], x4[27], x5[20], x5[27],
775                           __rounding, cos_bit);
776   btf_32_type0_sse4_1_new(cospi_m48, cospi_m16, x4[21], x4[26], x5[21], x5[26],
777                           __rounding, cos_bit);
778   x5[22] = x4[22];
779   x5[23] = x4[23];
780   x5[24] = x4[24];
781   x5[25] = x4[25];
782   x5[30] = x4[30];
783   x5[31] = x4[31];
784   x5[32] = _mm_add_epi32(x4[32], x4[39]);
785   x5[39] = _mm_sub_epi32(x4[32], x4[39]);
786   x5[33] = _mm_add_epi32(x4[33], x4[38]);
787   x5[38] = _mm_sub_epi32(x4[33], x4[38]);
788   x5[34] = _mm_add_epi32(x4[34], x4[37]);
789   x5[37] = _mm_sub_epi32(x4[34], x4[37]);
790   x5[35] = _mm_add_epi32(x4[35], x4[36]);
791   x5[36] = _mm_sub_epi32(x4[35], x4[36]);
792   x5[40] = _mm_sub_epi32(x4[47], x4[40]);
793   x5[47] = _mm_add_epi32(x4[47], x4[40]);
794   x5[41] = _mm_sub_epi32(x4[46], x4[41]);
795   x5[46] = _mm_add_epi32(x4[46], x4[41]);
796   x5[42] = _mm_sub_epi32(x4[45], x4[42]);
797   x5[45] = _mm_add_epi32(x4[45], x4[42]);
798   x5[43] = _mm_sub_epi32(x4[44], x4[43]);
799   x5[44] = _mm_add_epi32(x4[44], x4[43]);
800   x5[48] = _mm_add_epi32(x4[48], x4[55]);
801   x5[55] = _mm_sub_epi32(x4[48], x4[55]);
802   x5[49] = _mm_add_epi32(x4[49], x4[54]);
803   x5[54] = _mm_sub_epi32(x4[49], x4[54]);
804   x5[50] = _mm_add_epi32(x4[50], x4[53]);
805   x5[53] = _mm_sub_epi32(x4[50], x4[53]);
806   x5[51] = _mm_add_epi32(x4[51], x4[52]);
807   x5[52] = _mm_sub_epi32(x4[51], x4[52]);
808   x5[56] = _mm_sub_epi32(x4[63], x4[56]);
809   x5[63] = _mm_add_epi32(x4[63], x4[56]);
810   x5[57] = _mm_sub_epi32(x4[62], x4[57]);
811   x5[62] = _mm_add_epi32(x4[62], x4[57]);
812   x5[58] = _mm_sub_epi32(x4[61], x4[58]);
813   x5[61] = _mm_add_epi32(x4[61], x4[58]);
814   x5[59] = _mm_sub_epi32(x4[60], x4[59]);
815   x5[60] = _mm_add_epi32(x4[60], x4[59]);
816 
817   // stage 6
818   __m128i x6[64];
819   btf_32_type0_sse4_1_new(cospi_p32, cospi_p32, x5[0], x5[1], x6[0], x6[1],
820                           __rounding, cos_bit);
821   btf_32_type1_sse4_1_new(cospi_p48, cospi_p16, x5[2], x5[3], x6[2], x6[3],
822                           __rounding, cos_bit);
823   x6[4] = _mm_add_epi32(x5[4], x5[5]);
824   x6[5] = _mm_sub_epi32(x5[4], x5[5]);
825   x6[6] = _mm_sub_epi32(x5[7], x5[6]);
826   x6[7] = _mm_add_epi32(x5[7], x5[6]);
827   x6[8] = x5[8];
828   btf_32_type0_sse4_1_new(cospi_m16, cospi_p48, x5[9], x5[14], x6[9], x6[14],
829                           __rounding, cos_bit);
830   btf_32_type0_sse4_1_new(cospi_m48, cospi_m16, x5[10], x5[13], x6[10], x6[13],
831                           __rounding, cos_bit);
832   x6[11] = x5[11];
833   x6[12] = x5[12];
834   x6[15] = x5[15];
835   x6[16] = _mm_add_epi32(x5[16], x5[19]);
836   x6[19] = _mm_sub_epi32(x5[16], x5[19]);
837   x6[17] = _mm_add_epi32(x5[17], x5[18]);
838   x6[18] = _mm_sub_epi32(x5[17], x5[18]);
839   x6[20] = _mm_sub_epi32(x5[23], x5[20]);
840   x6[23] = _mm_add_epi32(x5[23], x5[20]);
841   x6[21] = _mm_sub_epi32(x5[22], x5[21]);
842   x6[22] = _mm_add_epi32(x5[22], x5[21]);
843   x6[24] = _mm_add_epi32(x5[24], x5[27]);
844   x6[27] = _mm_sub_epi32(x5[24], x5[27]);
845   x6[25] = _mm_add_epi32(x5[25], x5[26]);
846   x6[26] = _mm_sub_epi32(x5[25], x5[26]);
847   x6[28] = _mm_sub_epi32(x5[31], x5[28]);
848   x6[31] = _mm_add_epi32(x5[31], x5[28]);
849   x6[29] = _mm_sub_epi32(x5[30], x5[29]);
850   x6[30] = _mm_add_epi32(x5[30], x5[29]);
851   x6[32] = x5[32];
852   x6[33] = x5[33];
853   btf_32_type0_sse4_1_new(cospi_m08, cospi_p56, x5[34], x5[61], x6[34], x6[61],
854                           __rounding, cos_bit);
855   btf_32_type0_sse4_1_new(cospi_m08, cospi_p56, x5[35], x5[60], x6[35], x6[60],
856                           __rounding, cos_bit);
857   btf_32_type0_sse4_1_new(cospi_m56, cospi_m08, x5[36], x5[59], x6[36], x6[59],
858                           __rounding, cos_bit);
859   btf_32_type0_sse4_1_new(cospi_m56, cospi_m08, x5[37], x5[58], x6[37], x6[58],
860                           __rounding, cos_bit);
861   x6[38] = x5[38];
862   x6[39] = x5[39];
863   x6[40] = x5[40];
864   x6[41] = x5[41];
865   btf_32_type0_sse4_1_new(cospi_m40, cospi_p24, x5[42], x5[53], x6[42], x6[53],
866                           __rounding, cos_bit);
867   btf_32_type0_sse4_1_new(cospi_m40, cospi_p24, x5[43], x5[52], x6[43], x6[52],
868                           __rounding, cos_bit);
869   btf_32_type0_sse4_1_new(cospi_m24, cospi_m40, x5[44], x5[51], x6[44], x6[51],
870                           __rounding, cos_bit);
871   btf_32_type0_sse4_1_new(cospi_m24, cospi_m40, x5[45], x5[50], x6[45], x6[50],
872                           __rounding, cos_bit);
873   x6[46] = x5[46];
874   x6[47] = x5[47];
875   x6[48] = x5[48];
876   x6[49] = x5[49];
877   x6[54] = x5[54];
878   x6[55] = x5[55];
879   x6[56] = x5[56];
880   x6[57] = x5[57];
881   x6[62] = x5[62];
882   x6[63] = x5[63];
883 
884   // stage 7
885   __m128i x7[64];
886   x7[0] = x6[0];
887   x7[1] = x6[1];
888   x7[2] = x6[2];
889   x7[3] = x6[3];
890   btf_32_type1_sse4_1_new(cospi_p56, cospi_p08, x6[4], x6[7], x7[4], x7[7],
891                           __rounding, cos_bit);
892   btf_32_type1_sse4_1_new(cospi_p24, cospi_p40, x6[5], x6[6], x7[5], x7[6],
893                           __rounding, cos_bit);
894   x7[8] = _mm_add_epi32(x6[8], x6[9]);
895   x7[9] = _mm_sub_epi32(x6[8], x6[9]);
896   x7[10] = _mm_sub_epi32(x6[11], x6[10]);
897   x7[11] = _mm_add_epi32(x6[11], x6[10]);
898   x7[12] = _mm_add_epi32(x6[12], x6[13]);
899   x7[13] = _mm_sub_epi32(x6[12], x6[13]);
900   x7[14] = _mm_sub_epi32(x6[15], x6[14]);
901   x7[15] = _mm_add_epi32(x6[15], x6[14]);
902   x7[16] = x6[16];
903   btf_32_type0_sse4_1_new(cospi_m08, cospi_p56, x6[17], x6[30], x7[17], x7[30],
904                           __rounding, cos_bit);
905   btf_32_type0_sse4_1_new(cospi_m56, cospi_m08, x6[18], x6[29], x7[18], x7[29],
906                           __rounding, cos_bit);
907   x7[19] = x6[19];
908   x7[20] = x6[20];
909   btf_32_type0_sse4_1_new(cospi_m40, cospi_p24, x6[21], x6[26], x7[21], x7[26],
910                           __rounding, cos_bit);
911   btf_32_type0_sse4_1_new(cospi_m24, cospi_m40, x6[22], x6[25], x7[22], x7[25],
912                           __rounding, cos_bit);
913   x7[23] = x6[23];
914   x7[24] = x6[24];
915   x7[27] = x6[27];
916   x7[28] = x6[28];
917   x7[31] = x6[31];
918   x7[32] = _mm_add_epi32(x6[32], x6[35]);
919   x7[35] = _mm_sub_epi32(x6[32], x6[35]);
920   x7[33] = _mm_add_epi32(x6[33], x6[34]);
921   x7[34] = _mm_sub_epi32(x6[33], x6[34]);
922   x7[36] = _mm_sub_epi32(x6[39], x6[36]);
923   x7[39] = _mm_add_epi32(x6[39], x6[36]);
924   x7[37] = _mm_sub_epi32(x6[38], x6[37]);
925   x7[38] = _mm_add_epi32(x6[38], x6[37]);
926   x7[40] = _mm_add_epi32(x6[40], x6[43]);
927   x7[43] = _mm_sub_epi32(x6[40], x6[43]);
928   x7[41] = _mm_add_epi32(x6[41], x6[42]);
929   x7[42] = _mm_sub_epi32(x6[41], x6[42]);
930   x7[44] = _mm_sub_epi32(x6[47], x6[44]);
931   x7[47] = _mm_add_epi32(x6[47], x6[44]);
932   x7[45] = _mm_sub_epi32(x6[46], x6[45]);
933   x7[46] = _mm_add_epi32(x6[46], x6[45]);
934   x7[48] = _mm_add_epi32(x6[48], x6[51]);
935   x7[51] = _mm_sub_epi32(x6[48], x6[51]);
936   x7[49] = _mm_add_epi32(x6[49], x6[50]);
937   x7[50] = _mm_sub_epi32(x6[49], x6[50]);
938   x7[52] = _mm_sub_epi32(x6[55], x6[52]);
939   x7[55] = _mm_add_epi32(x6[55], x6[52]);
940   x7[53] = _mm_sub_epi32(x6[54], x6[53]);
941   x7[54] = _mm_add_epi32(x6[54], x6[53]);
942   x7[56] = _mm_add_epi32(x6[56], x6[59]);
943   x7[59] = _mm_sub_epi32(x6[56], x6[59]);
944   x7[57] = _mm_add_epi32(x6[57], x6[58]);
945   x7[58] = _mm_sub_epi32(x6[57], x6[58]);
946   x7[60] = _mm_sub_epi32(x6[63], x6[60]);
947   x7[63] = _mm_add_epi32(x6[63], x6[60]);
948   x7[61] = _mm_sub_epi32(x6[62], x6[61]);
949   x7[62] = _mm_add_epi32(x6[62], x6[61]);
950 
951   // stage 8
952   __m128i x8[64];
953   x8[0] = x7[0];
954   x8[1] = x7[1];
955   x8[2] = x7[2];
956   x8[3] = x7[3];
957   x8[4] = x7[4];
958   x8[5] = x7[5];
959   x8[6] = x7[6];
960   x8[7] = x7[7];
961   btf_32_type1_sse4_1_new(cospi_p60, cospi_p04, x7[8], x7[15], x8[8], x8[15],
962                           __rounding, cos_bit);
963   btf_32_type1_sse4_1_new(cospi_p28, cospi_p36, x7[9], x7[14], x8[9], x8[14],
964                           __rounding, cos_bit);
965   btf_32_type1_sse4_1_new(cospi_p44, cospi_p20, x7[10], x7[13], x8[10], x8[13],
966                           __rounding, cos_bit);
967   btf_32_type1_sse4_1_new(cospi_p12, cospi_p52, x7[11], x7[12], x8[11], x8[12],
968                           __rounding, cos_bit);
969   x8[16] = _mm_add_epi32(x7[16], x7[17]);
970   x8[17] = _mm_sub_epi32(x7[16], x7[17]);
971   x8[18] = _mm_sub_epi32(x7[19], x7[18]);
972   x8[19] = _mm_add_epi32(x7[19], x7[18]);
973   x8[20] = _mm_add_epi32(x7[20], x7[21]);
974   x8[21] = _mm_sub_epi32(x7[20], x7[21]);
975   x8[22] = _mm_sub_epi32(x7[23], x7[22]);
976   x8[23] = _mm_add_epi32(x7[23], x7[22]);
977   x8[24] = _mm_add_epi32(x7[24], x7[25]);
978   x8[25] = _mm_sub_epi32(x7[24], x7[25]);
979   x8[26] = _mm_sub_epi32(x7[27], x7[26]);
980   x8[27] = _mm_add_epi32(x7[27], x7[26]);
981   x8[28] = _mm_add_epi32(x7[28], x7[29]);
982   x8[29] = _mm_sub_epi32(x7[28], x7[29]);
983   x8[30] = _mm_sub_epi32(x7[31], x7[30]);
984   x8[31] = _mm_add_epi32(x7[31], x7[30]);
985   x8[32] = x7[32];
986   btf_32_type0_sse4_1_new(cospi_m04, cospi_p60, x7[33], x7[62], x8[33], x8[62],
987                           __rounding, cos_bit);
988   btf_32_type0_sse4_1_new(cospi_m60, cospi_m04, x7[34], x7[61], x8[34], x8[61],
989                           __rounding, cos_bit);
990   x8[35] = x7[35];
991   x8[36] = x7[36];
992   btf_32_type0_sse4_1_new(cospi_m36, cospi_p28, x7[37], x7[58], x8[37], x8[58],
993                           __rounding, cos_bit);
994   btf_32_type0_sse4_1_new(cospi_m28, cospi_m36, x7[38], x7[57], x8[38], x8[57],
995                           __rounding, cos_bit);
996   x8[39] = x7[39];
997   x8[40] = x7[40];
998   btf_32_type0_sse4_1_new(cospi_m20, cospi_p44, x7[41], x7[54], x8[41], x8[54],
999                           __rounding, cos_bit);
1000   btf_32_type0_sse4_1_new(cospi_m44, cospi_m20, x7[42], x7[53], x8[42], x8[53],
1001                           __rounding, cos_bit);
1002   x8[43] = x7[43];
1003   x8[44] = x7[44];
1004   btf_32_type0_sse4_1_new(cospi_m52, cospi_p12, x7[45], x7[50], x8[45], x8[50],
1005                           __rounding, cos_bit);
1006   btf_32_type0_sse4_1_new(cospi_m12, cospi_m52, x7[46], x7[49], x8[46], x8[49],
1007                           __rounding, cos_bit);
1008   x8[47] = x7[47];
1009   x8[48] = x7[48];
1010   x8[51] = x7[51];
1011   x8[52] = x7[52];
1012   x8[55] = x7[55];
1013   x8[56] = x7[56];
1014   x8[59] = x7[59];
1015   x8[60] = x7[60];
1016   x8[63] = x7[63];
1017 
1018   // stage 9
1019   __m128i x9[64];
1020   x9[0] = x8[0];
1021   x9[1] = x8[1];
1022   x9[2] = x8[2];
1023   x9[3] = x8[3];
1024   x9[4] = x8[4];
1025   x9[5] = x8[5];
1026   x9[6] = x8[6];
1027   x9[7] = x8[7];
1028   x9[8] = x8[8];
1029   x9[9] = x8[9];
1030   x9[10] = x8[10];
1031   x9[11] = x8[11];
1032   x9[12] = x8[12];
1033   x9[13] = x8[13];
1034   x9[14] = x8[14];
1035   x9[15] = x8[15];
1036   btf_32_type1_sse4_1_new(cospi_p62, cospi_p02, x8[16], x8[31], x9[16], x9[31],
1037                           __rounding, cos_bit);
1038   btf_32_type1_sse4_1_new(cospi_p30, cospi_p34, x8[17], x8[30], x9[17], x9[30],
1039                           __rounding, cos_bit);
1040   btf_32_type1_sse4_1_new(cospi_p46, cospi_p18, x8[18], x8[29], x9[18], x9[29],
1041                           __rounding, cos_bit);
1042   btf_32_type1_sse4_1_new(cospi_p14, cospi_p50, x8[19], x8[28], x9[19], x9[28],
1043                           __rounding, cos_bit);
1044   btf_32_type1_sse4_1_new(cospi_p54, cospi_p10, x8[20], x8[27], x9[20], x9[27],
1045                           __rounding, cos_bit);
1046   btf_32_type1_sse4_1_new(cospi_p22, cospi_p42, x8[21], x8[26], x9[21], x9[26],
1047                           __rounding, cos_bit);
1048   btf_32_type1_sse4_1_new(cospi_p38, cospi_p26, x8[22], x8[25], x9[22], x9[25],
1049                           __rounding, cos_bit);
1050   btf_32_type1_sse4_1_new(cospi_p06, cospi_p58, x8[23], x8[24], x9[23], x9[24],
1051                           __rounding, cos_bit);
1052   x9[32] = _mm_add_epi32(x8[32], x8[33]);
1053   x9[33] = _mm_sub_epi32(x8[32], x8[33]);
1054   x9[34] = _mm_sub_epi32(x8[35], x8[34]);
1055   x9[35] = _mm_add_epi32(x8[35], x8[34]);
1056   x9[36] = _mm_add_epi32(x8[36], x8[37]);
1057   x9[37] = _mm_sub_epi32(x8[36], x8[37]);
1058   x9[38] = _mm_sub_epi32(x8[39], x8[38]);
1059   x9[39] = _mm_add_epi32(x8[39], x8[38]);
1060   x9[40] = _mm_add_epi32(x8[40], x8[41]);
1061   x9[41] = _mm_sub_epi32(x8[40], x8[41]);
1062   x9[42] = _mm_sub_epi32(x8[43], x8[42]);
1063   x9[43] = _mm_add_epi32(x8[43], x8[42]);
1064   x9[44] = _mm_add_epi32(x8[44], x8[45]);
1065   x9[45] = _mm_sub_epi32(x8[44], x8[45]);
1066   x9[46] = _mm_sub_epi32(x8[47], x8[46]);
1067   x9[47] = _mm_add_epi32(x8[47], x8[46]);
1068   x9[48] = _mm_add_epi32(x8[48], x8[49]);
1069   x9[49] = _mm_sub_epi32(x8[48], x8[49]);
1070   x9[50] = _mm_sub_epi32(x8[51], x8[50]);
1071   x9[51] = _mm_add_epi32(x8[51], x8[50]);
1072   x9[52] = _mm_add_epi32(x8[52], x8[53]);
1073   x9[53] = _mm_sub_epi32(x8[52], x8[53]);
1074   x9[54] = _mm_sub_epi32(x8[55], x8[54]);
1075   x9[55] = _mm_add_epi32(x8[55], x8[54]);
1076   x9[56] = _mm_add_epi32(x8[56], x8[57]);
1077   x9[57] = _mm_sub_epi32(x8[56], x8[57]);
1078   x9[58] = _mm_sub_epi32(x8[59], x8[58]);
1079   x9[59] = _mm_add_epi32(x8[59], x8[58]);
1080   x9[60] = _mm_add_epi32(x8[60], x8[61]);
1081   x9[61] = _mm_sub_epi32(x8[60], x8[61]);
1082   x9[62] = _mm_sub_epi32(x8[63], x8[62]);
1083   x9[63] = _mm_add_epi32(x8[63], x8[62]);
1084 
1085   // stage 10
1086   __m128i x10[64];
1087   x10[0] = x9[0];
1088   x10[1] = x9[1];
1089   x10[2] = x9[2];
1090   x10[3] = x9[3];
1091   x10[4] = x9[4];
1092   x10[5] = x9[5];
1093   x10[6] = x9[6];
1094   x10[7] = x9[7];
1095   x10[8] = x9[8];
1096   x10[9] = x9[9];
1097   x10[10] = x9[10];
1098   x10[11] = x9[11];
1099   x10[12] = x9[12];
1100   x10[13] = x9[13];
1101   x10[14] = x9[14];
1102   x10[15] = x9[15];
1103   x10[16] = x9[16];
1104   x10[17] = x9[17];
1105   x10[18] = x9[18];
1106   x10[19] = x9[19];
1107   x10[20] = x9[20];
1108   x10[21] = x9[21];
1109   x10[22] = x9[22];
1110   x10[23] = x9[23];
1111   x10[24] = x9[24];
1112   x10[25] = x9[25];
1113   x10[26] = x9[26];
1114   x10[27] = x9[27];
1115   x10[28] = x9[28];
1116   x10[29] = x9[29];
1117   x10[30] = x9[30];
1118   x10[31] = x9[31];
1119   btf_32_type1_sse4_1_new(cospi_p63, cospi_p01, x9[32], x9[63], x10[32],
1120                           x10[63], __rounding, cos_bit);
1121   btf_32_type1_sse4_1_new(cospi_p31, cospi_p33, x9[33], x9[62], x10[33],
1122                           x10[62], __rounding, cos_bit);
1123   btf_32_type1_sse4_1_new(cospi_p47, cospi_p17, x9[34], x9[61], x10[34],
1124                           x10[61], __rounding, cos_bit);
1125   btf_32_type1_sse4_1_new(cospi_p15, cospi_p49, x9[35], x9[60], x10[35],
1126                           x10[60], __rounding, cos_bit);
1127   btf_32_type1_sse4_1_new(cospi_p55, cospi_p09, x9[36], x9[59], x10[36],
1128                           x10[59], __rounding, cos_bit);
1129   btf_32_type1_sse4_1_new(cospi_p23, cospi_p41, x9[37], x9[58], x10[37],
1130                           x10[58], __rounding, cos_bit);
1131   btf_32_type1_sse4_1_new(cospi_p39, cospi_p25, x9[38], x9[57], x10[38],
1132                           x10[57], __rounding, cos_bit);
1133   btf_32_type1_sse4_1_new(cospi_p07, cospi_p57, x9[39], x9[56], x10[39],
1134                           x10[56], __rounding, cos_bit);
1135   btf_32_type1_sse4_1_new(cospi_p59, cospi_p05, x9[40], x9[55], x10[40],
1136                           x10[55], __rounding, cos_bit);
1137   btf_32_type1_sse4_1_new(cospi_p27, cospi_p37, x9[41], x9[54], x10[41],
1138                           x10[54], __rounding, cos_bit);
1139   btf_32_type1_sse4_1_new(cospi_p43, cospi_p21, x9[42], x9[53], x10[42],
1140                           x10[53], __rounding, cos_bit);
1141   btf_32_type1_sse4_1_new(cospi_p11, cospi_p53, x9[43], x9[52], x10[43],
1142                           x10[52], __rounding, cos_bit);
1143   btf_32_type1_sse4_1_new(cospi_p51, cospi_p13, x9[44], x9[51], x10[44],
1144                           x10[51], __rounding, cos_bit);
1145   btf_32_type1_sse4_1_new(cospi_p19, cospi_p45, x9[45], x9[50], x10[45],
1146                           x10[50], __rounding, cos_bit);
1147   btf_32_type1_sse4_1_new(cospi_p35, cospi_p29, x9[46], x9[49], x10[46],
1148                           x10[49], __rounding, cos_bit);
1149   btf_32_type1_sse4_1_new(cospi_p03, cospi_p61, x9[47], x9[48], x10[47],
1150                           x10[48], __rounding, cos_bit);
1151 
1152   // stage 11
1153   output[0 * outstride] = x10[0];
1154   output[1 * outstride] = x10[32];
1155   output[2 * outstride] = x10[16];
1156   output[3 * outstride] = x10[48];
1157   output[4 * outstride] = x10[8];
1158   output[5 * outstride] = x10[40];
1159   output[6 * outstride] = x10[24];
1160   output[7 * outstride] = x10[56];
1161   output[8 * outstride] = x10[4];
1162   output[9 * outstride] = x10[36];
1163   output[10 * outstride] = x10[20];
1164   output[11 * outstride] = x10[52];
1165   output[12 * outstride] = x10[12];
1166   output[13 * outstride] = x10[44];
1167   output[14 * outstride] = x10[28];
1168   output[15 * outstride] = x10[60];
1169   output[16 * outstride] = x10[2];
1170   output[17 * outstride] = x10[34];
1171   output[18 * outstride] = x10[18];
1172   output[19 * outstride] = x10[50];
1173   output[20 * outstride] = x10[10];
1174   output[21 * outstride] = x10[42];
1175   output[22 * outstride] = x10[26];
1176   output[23 * outstride] = x10[58];
1177   output[24 * outstride] = x10[6];
1178   output[25 * outstride] = x10[38];
1179   output[26 * outstride] = x10[22];
1180   output[27 * outstride] = x10[54];
1181   output[28 * outstride] = x10[14];
1182   output[29 * outstride] = x10[46];
1183   output[30 * outstride] = x10[30];
1184   output[31 * outstride] = x10[62];
1185   output[32 * outstride] = x10[1];
1186   output[33 * outstride] = x10[33];
1187   output[34 * outstride] = x10[17];
1188   output[35 * outstride] = x10[49];
1189   output[36 * outstride] = x10[9];
1190   output[37 * outstride] = x10[41];
1191   output[38 * outstride] = x10[25];
1192   output[39 * outstride] = x10[57];
1193   output[40 * outstride] = x10[5];
1194   output[41 * outstride] = x10[37];
1195   output[42 * outstride] = x10[21];
1196   output[43 * outstride] = x10[53];
1197   output[44 * outstride] = x10[13];
1198   output[45 * outstride] = x10[45];
1199   output[46 * outstride] = x10[29];
1200   output[47 * outstride] = x10[61];
1201   output[48 * outstride] = x10[3];
1202   output[49 * outstride] = x10[35];
1203   output[50 * outstride] = x10[19];
1204   output[51 * outstride] = x10[51];
1205   output[52 * outstride] = x10[11];
1206   output[53 * outstride] = x10[43];
1207   output[54 * outstride] = x10[27];
1208   output[55 * outstride] = x10[59];
1209   output[56 * outstride] = x10[7];
1210   output[57 * outstride] = x10[39];
1211   output[58 * outstride] = x10[23];
1212   output[59 * outstride] = x10[55];
1213   output[60 * outstride] = x10[15];
1214   output[61 * outstride] = x10[47];
1215   output[62 * outstride] = x10[31];
1216   output[63 * outstride] = x10[63];
1217 }
1218