1 /******************************************************************************
2 *
3 * Copyright (C) 2018 The Android Open Source Project
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *****************************************************************************
18 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19 */
20
21 /**
22 *******************************************************************************
23 * @file
24 * ihevc_resi_trans_neon_32x32.c
25 *
26 * @brief
27 * Contains definitions of functions for computing residue and fwd transform
28 *
29 * @author
30 * Ittiam
31 *
32 * @par List of Functions:
33 * - ihevc_resi_trans_32x32_neon()
34 *
35 * @remarks
36 * None
37 *
38 *******************************************************************************
39 */
40
41 /*****************************************************************************/
42 /* File Includes */
43 /*****************************************************************************/
44 /* System include files */
45 #include <stdio.h>
46 #include <string.h>
47
48 /* System user files */
49 #include "ihevc_typedefs.h"
50 #include "ihevc_macros.h"
51 #include "ihevc_defs.h"
52 #include "ihevc_cmn_utils_neon.h"
53
54 #include "ihevc_trans_tables.h"
55 #include "ihevc_resi_trans.h"
56
57 /*****************************************************************************/
58 /* Function Definitions */
59 /*****************************************************************************/
60 /**
61 *******************************************************************************
62 *
63 * @brief
64 * This function performs residue calculation and forward transform on
65 * input pixels
66 *
67 * @par Description:
68 * Performs residue calculation by subtracting source and prediction and
69 * followed by forward transform
70 *
71 * @param[in] pu1_src
72 * Input 32x32 pixels
73 *
74 * @param[in] pu1_pred
75 * Prediction data
76 *
77 * @param[in] pi2_tmp
78 * Temporary buffer of size 32x32
79 *
80 * @param[out] pi2_dst
81 * Output 32x32 coefficients
82 *
83 * @param[in] src_strd
84 * Input stride
85 *
86 * @param[in] pred_strd
87 * Prediction Stride
88 *
89 * @param[in] dst_strd_chr_flag
90 * Output Stride and Chroma Flag packed in the MS and LS 16-bit
91 *
92 * @returns Void
93 *
94 * @remarks
95 * None
96 *
97 *******************************************************************************
98 */
ihevc_resi_trans_32x32_neon(UWORD8 * pu1_src,UWORD8 * pu1_pred,WORD32 * pi4_temp,WORD16 * pi2_dst,WORD32 src_strd,WORD32 pred_strd,WORD32 dst_strd_chr_flag)99 UWORD32 ihevc_resi_trans_32x32_neon(UWORD8 *pu1_src, UWORD8 *pu1_pred,
100 WORD32 *pi4_temp, WORD16 *pi2_dst, WORD32 src_strd, WORD32 pred_strd,
101 WORD32 dst_strd_chr_flag)
102 {
103 int16x8_t diff_16[4][2];
104 WORD32 i;
105 int32x2_t sad;
106 int64x2_t tmp_a;
107 UWORD32 u4_blk_sad = 0;
108 WORD32 dst_strd = dst_strd_chr_flag >> 16;
109 WORD32 *pi4_temp_orig = pi4_temp;
110 int16x8_t abs = vdupq_n_s16(0);
111 int32x4_t sum_val = vdupq_n_s32(0);
112
113
114 // Stage 1
115 for(i = 0; i < 16; i++)
116 {
117
118 uint8x16_t src_buff, pred_buff;
119 abs = vdupq_n_s16(0);
120
121 src_buff = vld1q_u8(pu1_src);
122 pred_buff = vld1q_u8(pu1_pred);
123 diff_16[0][0] = vreinterpretq_s16_u16(
124 vsubl_u8(vget_low_u8(src_buff), vget_low_u8(pred_buff)));
125 diff_16[1][0] = vreinterpretq_s16_u16(
126 vsubl_u8(vget_high_u8(src_buff), vget_high_u8(pred_buff)));
127 abs = vaddq_s16(abs, vabsq_s16(diff_16[0][0]));
128 abs = vaddq_s16(abs, vabsq_s16(diff_16[1][0]));
129
130 src_buff = vld1q_u8(pu1_src + 16);
131 pred_buff = vld1q_u8(pu1_pred + 16);
132 diff_16[2][0] = vrev64q_s16(vreinterpretq_s16_u16(
133 vsubl_u8(vget_low_u8(src_buff), vget_low_u8(pred_buff))));
134 diff_16[2][0] = vcombine_s16(
135 vget_high_s16(diff_16[2][0]), vget_low_s16(diff_16[2][0]));
136 diff_16[3][0] = vrev64q_s16(vreinterpretq_s16_u16(
137 vsubl_u8(vget_high_u8(src_buff), vget_high_u8(pred_buff))));
138 diff_16[3][0] = vcombine_s16(
139 vget_high_s16(diff_16[3][0]), vget_low_s16(diff_16[3][0]));
140 abs = vaddq_s16(abs, vabsq_s16(diff_16[2][0]));
141 abs = vaddq_s16(abs, vabsq_s16(diff_16[3][0]));
142
143 pu1_src += src_strd;
144 pu1_pred += pred_strd;
145
146 src_buff = vld1q_u8(pu1_src);
147 pred_buff = vld1q_u8(pu1_pred);
148 diff_16[0][1] = vreinterpretq_s16_u16(
149 vsubl_u8(vget_low_u8(src_buff), vget_low_u8(pred_buff)));
150 diff_16[1][1] = vreinterpretq_s16_u16(
151 vsubl_u8(vget_high_u8(src_buff), vget_high_u8(pred_buff)));
152 abs = vaddq_s16(abs, vabsq_s16(diff_16[0][1]));
153 abs = vaddq_s16(abs, vabsq_s16(diff_16[1][1]));
154
155 src_buff = vld1q_u8(pu1_src + 16);
156 pred_buff = vld1q_u8(pu1_pred + 16);
157 diff_16[2][1] = vrev64q_s16(vreinterpretq_s16_u16(
158 vsubl_u8(vget_low_u8(src_buff), vget_low_u8(pred_buff))));
159 diff_16[2][1] = vcombine_s16(
160 vget_high_s16(diff_16[2][1]), vget_low_s16(diff_16[2][1]));
161 diff_16[3][1] = vrev64q_s16(vreinterpretq_s16_u16(
162 vsubl_u8(vget_high_u8(src_buff), vget_high_u8(pred_buff))));
163 diff_16[3][1] = vcombine_s16(
164 vget_high_s16(diff_16[3][1]), vget_low_s16(diff_16[3][1]));
165
166 abs = vaddq_s16(abs, vabsq_s16(diff_16[2][1]));
167 abs = vaddq_s16(abs, vabsq_s16(diff_16[3][1]));
168
169 sum_val = vaddq_s32(sum_val,vpaddlq_s16(abs));
170
171 pu1_src += src_strd;
172 pu1_pred += pred_strd;
173 {
174 static const int16x8_t g_ai2_ihevc_trans_32_01_8 = { 64, 83, 64, 36, 64, 36, -64, -83 };
175
176 static const int16x4_t g_ai2_ihevc_trans_32_4_04 = { 89, 75, 50, 18 };
177 static const int16x4_t g_ai2_ihevc_trans_32_12_04 = { 75, -18, -89, -50 };
178 static const int16x4_t g_ai2_ihevc_trans_32_20_04 = { 50, -89, 18, 75 };
179 static const int16x4_t g_ai2_ihevc_trans_32_28_04 = { 18, -50, 75, -89 };
180
181 static const int16x8_t g_ai2_ihevc_trans_32_2_07 = { 90, 87, 80, 70, 57, 43, 25, 9 };
182 static const int16x8_t g_ai2_ihevc_trans_32_6_07 = { 87, 57, 9, -43, -80, -90, -70, -25 };
183 static const int16x8_t g_ai2_ihevc_trans_32_10_07 = { 80, 9, -70, -87, -25, 57, 90, 43 };
184 static const int16x8_t g_ai2_ihevc_trans_32_14_07 = { 70, -43, -87, 9, 90, 25, -80, -57 };
185 static const int16x8_t g_ai2_ihevc_trans_32_18_07 = { 57, -80, -25, 90, -9, -87, 43, 70 };
186 static const int16x8_t g_ai2_ihevc_trans_32_22_07 = { 43, -90, 57, 25, -87, 70, 9, -80 };
187 static const int16x8_t g_ai2_ihevc_trans_32_26_07 = { 25, -70, 90, -80, 43, 9, -57, 87 };
188 static const int16x8_t g_ai2_ihevc_trans_32_30_07 = { 9, -25, 43, -57, 70, -80, 87, -90 };
189
190 static const int16x8_t g_ai2_ihevc_trans_32_1_07 = { 90, 90, 88, 85, 82, 78, 73, 67 };
191 static const int16x8_t g_ai2_ihevc_trans_32_1_815 = { 61, 54, 46, 38, 31, 22, 13, 4 };
192 static const int16x8_t g_ai2_ihevc_trans_32_3_07 = { 90, 82, 67, 46, 22, -4, -31, -54 };
193 static const int16x8_t g_ai2_ihevc_trans_32_3_815 = { -73, -85, -90, -88, -78, -61, -38, -13 };
194 static const int16x8_t g_ai2_ihevc_trans_32_5_07 = { 88, 67, 31, -13, -54, -82, -90, -78 };
195 static const int16x8_t g_ai2_ihevc_trans_32_5_815 = { -46, -4, 38, 73, 90, 85, 61, 22 };
196 static const int16x8_t g_ai2_ihevc_trans_32_7_07 = { 85, 46, -13, -67, -90, -73, -22, 38 };
197 static const int16x8_t g_ai2_ihevc_trans_32_7_815 = { 82, 88, 54, -4, -61, -90, -78, -31 };
198 static const int16x8_t g_ai2_ihevc_trans_32_9_07 = { 82, 22, -54, -90, -61, 13, 78, 85 };
199 static const int16x8_t g_ai2_ihevc_trans_32_9_815 = { 31, -46, -90, -67, 4, 73, 88, 38 };
200 static const int16x8_t g_ai2_ihevc_trans_32_11_07 = { 78, -4, -82, -73, 13, 85, 67, -22 };
201 static const int16x8_t g_ai2_ihevc_trans_32_11_815 = { -88, -61, 31, 90, 54, -38, -90, -46 };
202 static const int16x8_t g_ai2_ihevc_trans_32_13_07 = { 73, -31, -90, -22, 78, 67, -38, -90 };
203 static const int16x8_t g_ai2_ihevc_trans_32_13_815 = { -13, 82, 61, -46, -88, -4, 85, 54 };
204 static const int16x8_t g_ai2_ihevc_trans_32_15_07 = { 67, -54, -78, 38, 85, -22, -90, 4 };
205 static const int16x8_t g_ai2_ihevc_trans_32_15_815 = { 90, 13, -88, -31, 82, 46, -73, -61 };
206 static const int16x8_t g_ai2_ihevc_trans_32_17_07 = { 61, -73, -46, 82, 31, -88, -13, 90 };
207 static const int16x8_t g_ai2_ihevc_trans_32_17_815 = { -4, -90, 22, 85, -38, -78, 54, 67 };
208 static const int16x8_t g_ai2_ihevc_trans_32_19_07 = { 54, -85, -4, 88, -46, -61, 82, 13 };
209 static const int16x8_t g_ai2_ihevc_trans_32_19_815 = { -90, 38, 67, -78, -22, 90, -31, -73 };
210 static const int16x8_t g_ai2_ihevc_trans_32_21_07 = { 46, -90, 38, 54, -90, 31, 61, -88 };
211 static const int16x8_t g_ai2_ihevc_trans_32_21_815 = { 22, 67, -85, 13, 73, -82, 4, 78 };
212 static const int16x8_t g_ai2_ihevc_trans_32_23_07 = { 38, -88, 73, -4, -67, 90, -46, -31 };
213 static const int16x8_t g_ai2_ihevc_trans_32_23_815 = { 85, -78, 13, 61, -90, 54, 22, -82 };
214 static const int16x8_t g_ai2_ihevc_trans_32_25_07 = { 31, -78, 90, -61, 4, 54, -88, 82 };
215 static const int16x8_t g_ai2_ihevc_trans_32_25_815 = { -38, -22, 73, -90, 67, -13, -46, 85 };
216 static const int16x8_t g_ai2_ihevc_trans_32_27_07 = { 22, -61, 85, -90, 73, -38, -4, 46 };
217 static const int16x8_t g_ai2_ihevc_trans_32_27_815 = { -78, 90, -82, 54, -13, -31, 67, -88 };
218 static const int16x8_t g_ai2_ihevc_trans_32_29_07 = { 13, -38, 61, -78, 88, -90, 85, -73 };
219 static const int16x8_t g_ai2_ihevc_trans_32_29_815 = { 54, -31, 4, 22, -46, 67, -82, 90 };
220 static const int16x8_t g_ai2_ihevc_trans_32_31_07 = { 4, -13, 22, -31, 38, -46, 54, -61 };
221 static const int16x8_t g_ai2_ihevc_trans_32_31_815 = { 67, -73, 78, -82, 85, -88, 90, -90 };
222
223 int32x4x2_t a[32];
224
225 const int16x8_t o1_1 = vsubq_s16(
226 diff_16[1][1], diff_16[2][1]); /*R2(9-16) - R2(24-17)*/
227 const int16x8_t o1_0 = vsubq_s16(
228 diff_16[0][1], diff_16[3][1]); /*R2(1- 8) - R2(32-25)*/
229 const int16x8_t o0_1 = vsubq_s16(
230 diff_16[1][0], diff_16[2][0]); /*R1(9-16) - R1(24-17)*/
231 const int16x8_t o0_0 = vsubq_s16(
232 diff_16[0][0], diff_16[3][0]); /*R1(1- 8) - R1(32-25)*/
233 const int16x8_t e0_0 = vaddq_s16(
234 diff_16[0][0], diff_16[3][0]); /*R1(1- 8) + R1(32-25)*/
235 int16x8_t e0_1 = vrev64q_s16(vaddq_s16(
236 diff_16[1][0], diff_16[2][0])); /*R1(9-16) + R1(24-17)*/
237 e0_1 = vcombine_s16(vget_high_s16(e0_1), vget_low_s16(e0_1));
238 const int16x8_t e1_0 = vaddq_s16(
239 diff_16[0][1], diff_16[3][1]); /*R2(1- 8) + R2(32-25)*/
240 int16x8_t e1_1 = vrev64q_s16(vaddq_s16(
241 diff_16[1][1], diff_16[2][1])); /*R2(9-16) + R2(24-17)*/
242 e1_1 = vcombine_s16(vget_high_s16(e1_1), vget_low_s16(e1_1));
243
244 const int16x8_t ee0 = vaddq_s16(e0_0, e0_1); /*E1(1- 8) + E1(16-9)*/
245 const int16x8_t ee1 = vaddq_s16(e1_0, e1_1); /*E2(1- 8) + E2(16-9)*/
246 const int16x8_t eo1 = vsubq_s16(e1_0, e1_1); /*E2(1- 8) - E2(16-9)*/
247 const int16x8_t eo0 = vsubq_s16(e0_0, e0_1); /*E1(1- 8) - E1(16-9)*/
248
249 /*EE0(1-4) & EE1(1-4)*/
250 const int16x8_t ee_a =
251 vcombine_s16(vget_low_s16(ee0), vget_low_s16(ee1));
252 /*EE0(8-5) & EE1(8-5)*/
253 const int16x8_t ee_b = vcombine_s16(
254 vrev64_s16(vget_high_s16(ee0)), vrev64_s16(vget_high_s16(ee1)));
255
256 /*EE(1-4) - EE(8-5)*/
257 const int16x8_t eeo = vsubq_s16(ee_a, ee_b); //Q0
258 /*EE(1-4) + EE(8-5)*/
259 const int16x8_t eee = vaddq_s16(ee_a, ee_b); //Q13
260
261 /*EEEE Calculations*/
262 const int32x2x2_t ee =
263 vtrn_s32(vreinterpret_s32_s16(vget_low_s16(eee)),
264 vreinterpret_s32_s16(vget_high_s16(eee)));
265 const int16x8_t eeee_a =
266 vreinterpretq_s16_s32(vcombine_s32(ee.val[0], ee.val[0]));
267 const int16x8_t eeee_b =
268 vcombine_s16(vrev32_s16(vreinterpret_s16_s32(ee.val[1])),
269 vneg_s16(vrev32_s16(vreinterpret_s16_s32(ee.val[1]))));
270 const int16x8_t eeee = vaddq_s16(eeee_a, eeee_b); //q2
271 const int16x4x2_t trans_eeee =
272 vtrn_s16(vget_low_s16(eeee), vget_high_s16(eeee));
273 const int16x4_t eeee_00 = vreinterpret_s16_s32(vdup_lane_s32(
274 vreinterpret_s32_s16(trans_eeee.val[0]), 0)); //d8
275 const int16x4_t eeee_10 = vreinterpret_s16_s32(vdup_lane_s32(
276 vreinterpret_s32_s16(trans_eeee.val[0]), 1)); //d9
277 const int16x4_t eeee_01 = vreinterpret_s16_s32(vdup_lane_s32(
278 vreinterpret_s32_s16(trans_eeee.val[1]), 0)); //d10
279 const int16x4_t eeee_11 = vreinterpret_s16_s32(vdup_lane_s32(
280 vreinterpret_s32_s16(trans_eeee.val[1]), 1)); //d11
281
282 /*Calculation of values 0 8 16 24*/
283 a[0].val[0] =
284 vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_01_8), eeee_00);
285 a[0].val[0] = vmlal_s16(
286 a[0].val[0], vget_high_s16(g_ai2_ihevc_trans_32_01_8), eeee_01);
287 a[0].val[1] =
288 vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_01_8), eeee_10);
289 a[0].val[1] = vmlal_s16(
290 a[0].val[1], vget_high_s16(g_ai2_ihevc_trans_32_01_8), eeee_11);
291
292 int32x4x2_t val_8 = vzipq_s32(a[0].val[0], a[0].val[1]);
293
294 /*Store*/
295 vst1_s32(pi4_temp, vget_low_s32(val_8.val[0])); /*Value 0*/
296 vst1_s32(pi4_temp + 256, vget_high_s32(val_8.val[0])); /*Value 8*/
297 vst1_s32(pi4_temp + 512, vget_low_s32(val_8.val[1])); /*Value 16*/
298 vst1_s32(pi4_temp + 768, vget_high_s32(val_8.val[1])); /*Value 24*/
299
300 /*Calculation of values 4 12 20 28*/
301 /*Multiplications*/
302 a[4].val[0] =
303 vmull_s16(g_ai2_ihevc_trans_32_4_04, vget_low_s16(eeo));
304 a[12].val[0] =
305 vmull_s16(g_ai2_ihevc_trans_32_12_04, vget_low_s16(eeo));
306 a[20].val[0] =
307 vmull_s16(g_ai2_ihevc_trans_32_20_04, vget_low_s16(eeo));
308 a[28].val[0] =
309 vmull_s16(g_ai2_ihevc_trans_32_28_04, vget_low_s16(eeo));
310
311 a[4].val[1] =
312 vmull_s16(g_ai2_ihevc_trans_32_4_04, vget_high_s16(eeo));
313 a[12].val[1] =
314 vmull_s16(g_ai2_ihevc_trans_32_12_04, vget_high_s16(eeo));
315 a[20].val[1] =
316 vmull_s16(g_ai2_ihevc_trans_32_20_04, vget_high_s16(eeo));
317 a[28].val[1] =
318 vmull_s16(g_ai2_ihevc_trans_32_28_04, vget_high_s16(eeo));
319
320 /*Transposes*/
321 int32x4x2_t val_4_0 =
322 vtrnq_s32(a[4].val[0], a[12].val[0]); //q15 q5
323 int32x4x2_t val_4_1 =
324 vtrnq_s32(a[4].val[1], a[12].val[1]); //q4 q12
325 int32x4x2_t val_20_0 =
326 vtrnq_s32(a[20].val[0], a[28].val[0]); //q8 q2
327 int32x4x2_t val_20_1 =
328 vtrnq_s32(a[20].val[1], a[28].val[1]); //q9 q13
329
330 /*Swap*/
331 a[4].val[0] = vcombine_s32(vget_low_s32(val_4_0.val[0]),
332 vget_low_s32(val_20_0.val[0])); //q12
333 a[4].val[1] = vcombine_s32(vget_high_s32(val_4_0.val[0]),
334 vget_high_s32(val_20_0.val[0])); //q2
335
336 a[12].val[0] = vcombine_s32(vget_low_s32(val_4_0.val[1]),
337 vget_low_s32(val_20_0.val[1])); //q4
338 a[12].val[1] = vcombine_s32(vget_high_s32(val_4_0.val[1]),
339 vget_high_s32(val_20_0.val[1])); //q8
340
341 /*Additions*/
342 a[12].val[0] = vaddq_s32(a[12].val[0], a[4].val[0]); //q4
343 a[12].val[1] = vaddq_s32(a[12].val[1], a[4].val[1]); //q8
344 a[12].val[1] = vaddq_s32(a[12].val[1], a[12].val[0]); //q8
345
346 a[20].val[0] = vcombine_s32(vget_low_s32(val_4_1.val[0]),
347 vget_low_s32(val_20_1.val[0])); //q5
348 a[20].val[1] = vcombine_s32(vget_high_s32(val_4_1.val[0]),
349 vget_high_s32(val_20_1.val[0])); //q13
350
351 a[28].val[0] = vcombine_s32(vget_low_s32(val_4_1.val[1]),
352 vget_low_s32(val_20_1.val[1])); //q15
353 a[28].val[1] = vcombine_s32(vget_high_s32(val_4_1.val[1]),
354 vget_high_s32(val_20_1.val[1])); //q9
355
356 a[28].val[0] = vaddq_s32(a[28].val[0], a[20].val[0]); //q15
357 a[28].val[1] = vaddq_s32(a[28].val[1], a[20].val[1]); //q5
358 a[28].val[1] = vaddq_s32(a[28].val[1], a[28].val[0]); //q15
359
360 int32x4x2_t val_4 = vzipq_s32(a[12].val[1], a[28].val[1]);
361
362 /*Store*/
363 vst1_s32(pi4_temp + 128, vget_low_s32(val_4.val[0])); /*Value 4*/
364 vst1_s32(pi4_temp + 384, vget_high_s32(val_4.val[0])); /*Value 12*/
365 vst1_s32(pi4_temp + 640, vget_low_s32(val_4.val[1])); /*Value 20*/
366 vst1_s32(pi4_temp + 896, vget_high_s32(val_4.val[1])); /*Value 28*/
367
368 /*Calculation of value 2 6 10 14 18 22 26 30*/
369 /*Multiplications*/
370 a[2].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_2_07),
371 vget_low_s16(eo0)); //q2
372 a[6].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_6_07),
373 vget_low_s16(eo0)); //q5
374 a[10].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_10_07),
375 vget_low_s16(eo0)); //q9
376 a[14].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_14_07),
377 vget_low_s16(eo0)); //q8
378
379 a[14].val[0] = vmlal_s16(a[14].val[0],
380 vget_high_s16(g_ai2_ihevc_trans_32_14_07), vget_high_s16(eo0));
381 a[10].val[0] = vmlal_s16(a[10].val[0],
382 vget_high_s16(g_ai2_ihevc_trans_32_10_07), vget_high_s16(eo0));
383 a[6].val[0] = vmlal_s16(a[6].val[0],
384 vget_high_s16(g_ai2_ihevc_trans_32_6_07), vget_high_s16(eo0));
385 a[2].val[0] = vmlal_s16(a[2].val[0],
386 vget_high_s16(g_ai2_ihevc_trans_32_2_07), vget_high_s16(eo0));
387
388 a[2].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_2_07),
389 vget_low_s16(eo1)); //q4
390 a[6].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_6_07),
391 vget_low_s16(eo1)); //q13
392 a[10].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_10_07),
393 vget_low_s16(eo1)); //q12
394 a[14].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_14_07),
395 vget_low_s16(eo1)); //q15
396
397 a[14].val[1] = vmlal_s16(a[14].val[1],
398 vget_high_s16(g_ai2_ihevc_trans_32_14_07), vget_high_s16(eo1));
399 a[10].val[1] = vmlal_s16(a[10].val[1],
400 vget_high_s16(g_ai2_ihevc_trans_32_10_07), vget_high_s16(eo1));
401 a[6].val[1] = vmlal_s16(a[6].val[1],
402 vget_high_s16(g_ai2_ihevc_trans_32_6_07), vget_high_s16(eo1));
403 a[2].val[1] = vmlal_s16(a[2].val[1],
404 vget_high_s16(g_ai2_ihevc_trans_32_2_07), vget_high_s16(eo1));
405
406 /*Transposes*/
407 int32x4x2_t val_26_0 = vtrnq_s32(a[2].val[0], a[6].val[0]); //q2 q5
408 int32x4x2_t val_1014_0 =
409 vtrnq_s32(a[10].val[0], a[14].val[0]); //q9 q8
410 int32x4x2_t val_26_1 =
411 vtrnq_s32(a[2].val[1], a[6].val[1]); //q4 q13
412 int32x4x2_t val_1014_1 =
413 vtrnq_s32(a[10].val[1], a[14].val[1]); //q12 q15
414
415 /*Swap*/
416 a[2].val[0] = vcombine_s32(vget_low_s32(val_26_0.val[0]),
417 vget_low_s32(val_1014_0.val[0])); //q2
418 a[2].val[1] = vcombine_s32(vget_high_s32(val_26_0.val[0]),
419 vget_high_s32(val_1014_0.val[0])); //q9
420
421 a[6].val[0] = vcombine_s32(vget_low_s32(val_26_0.val[1]),
422 vget_low_s32(val_1014_0.val[1])); //q5
423 a[6].val[1] = vcombine_s32(vget_high_s32(val_26_0.val[1]),
424 vget_high_s32(val_1014_0.val[1])); //q8
425
426 a[10].val[0] = vcombine_s32(vget_low_s32(val_26_1.val[0]),
427 vget_low_s32(val_1014_1.val[0])); //q4
428 a[10].val[1] = vcombine_s32(vget_high_s32(val_26_1.val[0]),
429 vget_high_s32(val_1014_1.val[0])); //q12
430
431 a[14].val[0] = vcombine_s32(vget_low_s32(val_26_1.val[1]),
432 vget_low_s32(val_1014_1.val[1])); //q13
433 a[14].val[1] = vcombine_s32(vget_high_s32(val_26_1.val[1]),
434 vget_high_s32(val_1014_1.val[1])); //q15
435
436 /*Additions*/
437 a[2].val[0] = vaddq_s32(a[2].val[0], a[6].val[0]); //q2
438 a[2].val[1] = vaddq_s32(a[2].val[1], a[6].val[1]); //q9
439 a[2].val[1] = vaddq_s32(a[2].val[1], a[2].val[0]); //q9
440
441 a[10].val[0] = vaddq_s32(a[10].val[0], a[14].val[0]); //q4
442 a[10].val[1] = vaddq_s32(a[10].val[1], a[14].val[1]); //q12
443 a[10].val[1] = vaddq_s32(a[10].val[1], a[10].val[0]); //q12
444
445 int32x4x2_t val_2 = vzipq_s32(a[2].val[1], a[10].val[1]); //q9 q12
446
447 /*Store*/
448 vst1_s32(pi4_temp + 64, vget_low_s32(val_2.val[0])); /*Value 2*/
449 vst1_s32(pi4_temp + 192, vget_high_s32(val_2.val[0])); /*Value 6*/
450 vst1_s32(pi4_temp + 320, vget_low_s32(val_2.val[1])); /*Value 10*/
451 vst1_s32(pi4_temp + 448, vget_high_s32(val_2.val[1])); /*Value 14*/
452
453 a[18].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_18_07),
454 vget_low_s16(eo0)); //q0
455 a[22].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_22_07),
456 vget_low_s16(eo0)); //q5
457 a[26].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_26_07),
458 vget_low_s16(eo0)); //q9
459 a[30].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_30_07),
460 vget_low_s16(eo0)); //q15
461
462 a[30].val[0] = vmlal_s16(a[30].val[0],
463 vget_high_s16(g_ai2_ihevc_trans_32_30_07), vget_high_s16(eo0));
464 a[26].val[0] = vmlal_s16(a[26].val[0],
465 vget_high_s16(g_ai2_ihevc_trans_32_26_07), vget_high_s16(eo0));
466 a[22].val[0] = vmlal_s16(a[22].val[0],
467 vget_high_s16(g_ai2_ihevc_trans_32_22_07), vget_high_s16(eo0));
468 a[18].val[0] = vmlal_s16(a[18].val[0],
469 vget_high_s16(g_ai2_ihevc_trans_32_18_07), vget_high_s16(eo0));
470
471 a[18].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_18_07),
472 vget_low_s16(eo1)); //q4
473 a[22].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_22_07),
474 vget_low_s16(eo1)); //q8
475 a[26].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_26_07),
476 vget_low_s16(eo1)); //q12
477 a[30].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_30_07),
478 vget_low_s16(eo1)); //q18
479
480 a[30].val[1] = vmlal_s16(a[30].val[1],
481 vget_high_s16(g_ai2_ihevc_trans_32_30_07), vget_high_s16(eo1));
482 a[26].val[1] = vmlal_s16(a[26].val[1],
483 vget_high_s16(g_ai2_ihevc_trans_32_26_07), vget_high_s16(eo1));
484 a[22].val[1] = vmlal_s16(a[22].val[1],
485 vget_high_s16(g_ai2_ihevc_trans_32_22_07), vget_high_s16(eo1));
486 a[18].val[1] = vmlal_s16(a[18].val[1],
487 vget_high_s16(g_ai2_ihevc_trans_32_18_07), vget_high_s16(eo1));
488
489 /*Transposes*/
490 int32x4x2_t val_1822_0 =
491 vtrnq_s32(a[18].val[0], a[22].val[0]); //q2 q5
492 int32x4x2_t val_2630_0 =
493 vtrnq_s32(a[26].val[0], a[30].val[0]); //q9 q8
494 int32x4x2_t val_1822_1 =
495 vtrnq_s32(a[18].val[1], a[22].val[1]); //q4 q13
496 int32x4x2_t val_2630_1 =
497 vtrnq_s32(a[26].val[1], a[30].val[1]); //q12 q15
498
499 /*Swap*/
500 a[18].val[0] = vcombine_s32(vget_low_s32(val_1822_0.val[0]),
501 vget_low_s32(val_2630_0.val[0])); //q2
502 a[18].val[1] = vcombine_s32(vget_high_s32(val_1822_0.val[0]),
503 vget_high_s32(val_2630_0.val[0])); //q9
504
505 a[22].val[0] = vcombine_s32(vget_low_s32(val_1822_0.val[1]),
506 vget_low_s32(val_2630_0.val[1])); //q5
507 a[22].val[1] = vcombine_s32(vget_high_s32(val_1822_0.val[1]),
508 vget_high_s32(val_2630_0.val[1])); //q8
509
510 a[26].val[0] = vcombine_s32(vget_low_s32(val_1822_1.val[0]),
511 vget_low_s32(val_2630_1.val[0])); //q4
512 a[26].val[1] = vcombine_s32(vget_high_s32(val_1822_1.val[0]),
513 vget_high_s32(val_2630_1.val[0])); //q12
514
515 a[30].val[0] = vcombine_s32(vget_low_s32(val_1822_1.val[1]),
516 vget_low_s32(val_2630_1.val[1])); //q13
517 a[30].val[1] = vcombine_s32(vget_high_s32(val_1822_1.val[1]),
518 vget_high_s32(val_2630_1.val[1])); //q15
519
520 /*Additions*/
521 a[18].val[0] = vaddq_s32(a[18].val[0], a[22].val[0]); //q2
522 a[18].val[1] = vaddq_s32(a[18].val[1], a[22].val[1]); //q9
523 a[18].val[1] = vaddq_s32(a[18].val[1], a[18].val[0]); //q9
524
525 a[26].val[0] = vaddq_s32(a[26].val[0], a[30].val[0]); //q4
526 a[26].val[1] = vaddq_s32(a[26].val[1], a[30].val[1]); //q12
527 a[26].val[1] = vaddq_s32(a[26].val[1], a[26].val[0]); //q12
528
529 int32x4x2_t val_18 =
530 vzipq_s32(a[18].val[1], a[26].val[1]); //q9 q12
531
532 /*Store*/
533 vst1_s32(pi4_temp + 576, vget_low_s32(val_18.val[0])); /*Value 18*/
534 vst1_s32(pi4_temp + 704, vget_high_s32(val_18.val[0])); /*Value 22*/
535 vst1_s32(pi4_temp + 832, vget_low_s32(val_18.val[1])); /*Value 26*/
536 vst1_s32(pi4_temp + 960, vget_high_s32(val_18.val[1])); /*Value 30*/
537
538 /*Calculations for odd indexes*/
539 a[1].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_1_07),
540 vget_low_s16(o0_0)); //q1
541 a[3].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_3_07),
542 vget_low_s16(o0_0)); //q5
543 a[5].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_5_07),
544 vget_low_s16(o0_0)); //q8
545 a[7].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_7_07),
546 vget_low_s16(o0_0)); //q12
547
548 a[7].val[0] = vmlal_s16(a[7].val[0],
549 vget_high_s16(g_ai2_ihevc_trans_32_7_07), vget_high_s16(o0_0));
550 a[5].val[0] = vmlal_s16(a[5].val[0],
551 vget_high_s16(g_ai2_ihevc_trans_32_5_07), vget_high_s16(o0_0));
552 a[3].val[0] = vmlal_s16(a[3].val[0],
553 vget_high_s16(g_ai2_ihevc_trans_32_3_07), vget_high_s16(o0_0));
554 a[1].val[0] = vmlal_s16(a[1].val[0],
555 vget_high_s16(g_ai2_ihevc_trans_32_1_07), vget_high_s16(o0_0));
556
557 a[1].val[0] = vmlal_s16(a[1].val[0],
558 vget_low_s16(g_ai2_ihevc_trans_32_1_815), vget_low_s16(o0_1));
559 a[3].val[0] = vmlal_s16(a[3].val[0],
560 vget_low_s16(g_ai2_ihevc_trans_32_3_815), vget_low_s16(o0_1));
561 a[5].val[0] = vmlal_s16(a[5].val[0],
562 vget_low_s16(g_ai2_ihevc_trans_32_5_815), vget_low_s16(o0_1));
563 a[7].val[0] = vmlal_s16(a[7].val[0],
564 vget_low_s16(g_ai2_ihevc_trans_32_7_815), vget_low_s16(o0_1));
565
566 a[7].val[0] = vmlal_s16(a[7].val[0],
567 vget_high_s16(g_ai2_ihevc_trans_32_7_815), vget_high_s16(o0_1));
568 a[5].val[0] = vmlal_s16(a[5].val[0],
569 vget_high_s16(g_ai2_ihevc_trans_32_5_815), vget_high_s16(o0_1));
570 a[3].val[0] = vmlal_s16(a[3].val[0],
571 vget_high_s16(g_ai2_ihevc_trans_32_3_815), vget_high_s16(o0_1));
572 a[1].val[0] = vmlal_s16(a[1].val[0],
573 vget_high_s16(g_ai2_ihevc_trans_32_1_815), vget_high_s16(o0_1));
574
575 a[1].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_1_07),
576 vget_low_s16(o1_0)); //q0
577 a[3].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_3_07),
578 vget_low_s16(o1_0)); //q4
579 a[5].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_5_07),
580 vget_low_s16(o1_0)); //q9
581 a[7].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_7_07),
582 vget_low_s16(o1_0)); //q13
583
584 a[7].val[1] = vmlal_s16(a[7].val[1],
585 vget_high_s16(g_ai2_ihevc_trans_32_7_07), vget_high_s16(o1_0));
586 a[5].val[1] = vmlal_s16(a[5].val[1],
587 vget_high_s16(g_ai2_ihevc_trans_32_5_07), vget_high_s16(o1_0));
588 a[3].val[1] = vmlal_s16(a[3].val[1],
589 vget_high_s16(g_ai2_ihevc_trans_32_3_07), vget_high_s16(o1_0));
590 a[1].val[1] = vmlal_s16(a[1].val[1],
591 vget_high_s16(g_ai2_ihevc_trans_32_1_07), vget_high_s16(o1_0));
592
593 a[1].val[1] = vmlal_s16(a[1].val[1],
594 vget_low_s16(g_ai2_ihevc_trans_32_1_815), vget_low_s16(o1_1));
595 a[3].val[1] = vmlal_s16(a[3].val[1],
596 vget_low_s16(g_ai2_ihevc_trans_32_3_815), vget_low_s16(o1_1));
597 a[5].val[1] = vmlal_s16(a[5].val[1],
598 vget_low_s16(g_ai2_ihevc_trans_32_5_815), vget_low_s16(o1_1));
599 a[7].val[1] = vmlal_s16(a[7].val[1],
600 vget_low_s16(g_ai2_ihevc_trans_32_7_815), vget_low_s16(o1_1));
601
602 a[7].val[1] = vmlal_s16(a[7].val[1],
603 vget_high_s16(g_ai2_ihevc_trans_32_7_815), vget_high_s16(o1_1));
604 a[5].val[1] = vmlal_s16(a[5].val[1],
605 vget_high_s16(g_ai2_ihevc_trans_32_5_815), vget_high_s16(o1_1));
606 a[3].val[1] = vmlal_s16(a[3].val[1],
607 vget_high_s16(g_ai2_ihevc_trans_32_3_815), vget_high_s16(o1_1));
608 a[1].val[1] = vmlal_s16(a[1].val[1],
609 vget_high_s16(g_ai2_ihevc_trans_32_1_815), vget_high_s16(o1_1));
610
611 /*Transposes*/
612 int32x4x2_t val_13_0 = vtrnq_s32(a[1].val[0], a[3].val[0]); //q0 q4
613 int32x4x2_t val_13_1 = vtrnq_s32(a[1].val[1], a[3].val[1]); //q1 q5
614 int32x4x2_t val_57_0 =
615 vtrnq_s32(a[5].val[0], a[7].val[0]); //q8 q12
616 int32x4x2_t val_57_1 =
617 vtrnq_s32(a[5].val[1], a[7].val[1]); //q9 q13
618
619 /*Swap*/
620 a[1].val[0] = vcombine_s32(vget_low_s32(val_13_0.val[0]),
621 vget_low_s32(val_57_0.val[0])); //q0
622 a[1].val[1] = vcombine_s32(vget_high_s32(val_13_0.val[0]),
623 vget_high_s32(val_57_0.val[0])); //q8
624
625 a[3].val[0] = vcombine_s32(vget_low_s32(val_13_0.val[1]),
626 vget_low_s32(val_57_0.val[1])); //q1
627 a[3].val[1] = vcombine_s32(vget_high_s32(val_13_0.val[1]),
628 vget_high_s32(val_57_0.val[1])); //q9
629
630 a[5].val[0] = vcombine_s32(vget_low_s32(val_13_1.val[0]),
631 vget_low_s32(val_57_1.val[0])); //q4
632 a[5].val[1] = vcombine_s32(vget_high_s32(val_13_1.val[0]),
633 vget_high_s32(val_57_1.val[0])); //q12
634
635 a[7].val[0] = vcombine_s32(vget_low_s32(val_13_1.val[1]),
636 vget_low_s32(val_57_1.val[1])); //q5
637 a[7].val[1] = vcombine_s32(vget_high_s32(val_13_1.val[1]),
638 vget_high_s32(val_57_1.val[1])); //q13
639
640 /*Additions*/
641 a[1].val[0] = vaddq_s32(a[1].val[0], a[3].val[0]); //q0
642 a[1].val[1] = vaddq_s32(a[1].val[1], a[3].val[1]); //q8
643 a[1].val[1] = vaddq_s32(a[1].val[1], a[1].val[0]); //q8
644
645 a[5].val[0] = vaddq_s32(a[5].val[0], a[7].val[0]); //q1
646 a[5].val[1] = vaddq_s32(a[5].val[1], a[7].val[1]); //q9
647 a[5].val[1] = vaddq_s32(a[5].val[1], a[5].val[0]); //q9
648
649 int32x4x2_t val_1 = vzipq_s32(a[1].val[1], a[5].val[1]); //q8 q9
650
651 /*Store*/
652 vst1_s32(pi4_temp + 32, vget_low_s32(val_1.val[0])); /*Value 1*/
653 vst1_s32(pi4_temp + 96, vget_high_s32(val_1.val[0])); /*Value 3*/
654 vst1_s32(pi4_temp + 160, vget_low_s32(val_1.val[1])); /*Value 5*/
655 vst1_s32(pi4_temp + 224, vget_high_s32(val_1.val[1])); /*Value 7*/
656
657 a[9].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_9_07),
658 vget_low_s16(o0_0)); //q2
659 a[11].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_11_07),
660 vget_low_s16(o0_0)); //q2
661 a[13].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_13_07),
662 vget_low_s16(o0_0)); //q2
663 a[15].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_15_07),
664 vget_low_s16(o0_0)); //q2
665
666 a[15].val[0] = vmlal_s16(a[15].val[0],
667 vget_high_s16(g_ai2_ihevc_trans_32_15_07), vget_high_s16(o0_0));
668 a[13].val[0] = vmlal_s16(a[13].val[0],
669 vget_high_s16(g_ai2_ihevc_trans_32_13_07), vget_high_s16(o0_0));
670 a[11].val[0] = vmlal_s16(a[11].val[0],
671 vget_high_s16(g_ai2_ihevc_trans_32_11_07), vget_high_s16(o0_0));
672 a[9].val[0] = vmlal_s16(a[9].val[0],
673 vget_high_s16(g_ai2_ihevc_trans_32_9_07), vget_high_s16(o0_0));
674
675 a[9].val[0] = vmlal_s16(a[9].val[0],
676 vget_low_s16(g_ai2_ihevc_trans_32_9_815), vget_low_s16(o0_1));
677 a[11].val[0] = vmlal_s16(a[11].val[0],
678 vget_low_s16(g_ai2_ihevc_trans_32_11_815), vget_low_s16(o0_1));
679 a[13].val[0] = vmlal_s16(a[13].val[0],
680 vget_low_s16(g_ai2_ihevc_trans_32_13_815), vget_low_s16(o0_1));
681 a[15].val[0] = vmlal_s16(a[15].val[0],
682 vget_low_s16(g_ai2_ihevc_trans_32_15_815), vget_low_s16(o0_1));
683
684 a[15].val[0] = vmlal_s16(a[15].val[0],
685 vget_high_s16(g_ai2_ihevc_trans_32_15_815),
686 vget_high_s16(o0_1));
687 a[13].val[0] = vmlal_s16(a[13].val[0],
688 vget_high_s16(g_ai2_ihevc_trans_32_13_815),
689 vget_high_s16(o0_1));
690 a[11].val[0] = vmlal_s16(a[11].val[0],
691 vget_high_s16(g_ai2_ihevc_trans_32_11_815),
692 vget_high_s16(o0_1));
693 a[9].val[0] = vmlal_s16(a[9].val[0],
694 vget_high_s16(g_ai2_ihevc_trans_32_9_815), vget_high_s16(o0_1));
695
696 a[9].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_9_07),
697 vget_low_s16(o1_0)); //q2
698 a[11].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_11_07),
699 vget_low_s16(o1_0)); //q2
700 a[13].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_13_07),
701 vget_low_s16(o1_0)); //q2
702 a[15].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_15_07),
703 vget_low_s16(o1_0)); //q2
704
705 a[15].val[1] = vmlal_s16(a[15].val[1],
706 vget_high_s16(g_ai2_ihevc_trans_32_15_07), vget_high_s16(o1_0));
707 a[13].val[1] = vmlal_s16(a[13].val[1],
708 vget_high_s16(g_ai2_ihevc_trans_32_13_07), vget_high_s16(o1_0));
709 a[11].val[1] = vmlal_s16(a[11].val[1],
710 vget_high_s16(g_ai2_ihevc_trans_32_11_07), vget_high_s16(o1_0));
711 a[9].val[1] = vmlal_s16(a[9].val[1],
712 vget_high_s16(g_ai2_ihevc_trans_32_9_07), vget_high_s16(o1_0));
713
714 a[9].val[1] = vmlal_s16(a[9].val[1],
715 vget_low_s16(g_ai2_ihevc_trans_32_9_815), vget_low_s16(o1_1));
716 a[11].val[1] = vmlal_s16(a[11].val[1],
717 vget_low_s16(g_ai2_ihevc_trans_32_11_815), vget_low_s16(o1_1));
718 a[13].val[1] = vmlal_s16(a[13].val[1],
719 vget_low_s16(g_ai2_ihevc_trans_32_13_815), vget_low_s16(o1_1));
720 a[15].val[1] = vmlal_s16(a[15].val[1],
721 vget_low_s16(g_ai2_ihevc_trans_32_15_815), vget_low_s16(o1_1));
722
723 a[15].val[1] = vmlal_s16(a[15].val[1],
724 vget_high_s16(g_ai2_ihevc_trans_32_15_815),
725 vget_high_s16(o1_1));
726 a[13].val[1] = vmlal_s16(a[13].val[1],
727 vget_high_s16(g_ai2_ihevc_trans_32_13_815),
728 vget_high_s16(o1_1));
729 a[11].val[1] = vmlal_s16(a[11].val[1],
730 vget_high_s16(g_ai2_ihevc_trans_32_11_815),
731 vget_high_s16(o1_1));
732 a[9].val[1] = vmlal_s16(a[9].val[1],
733 vget_high_s16(g_ai2_ihevc_trans_32_9_815), vget_high_s16(o1_1));
734
735 int32x4x2_t val_911_0 =
736 vtrnq_s32(a[9].val[0], a[11].val[0]); //q0 q4
737 int32x4x2_t val_911_1 =
738 vtrnq_s32(a[9].val[1], a[11].val[1]); //q1 q5
739 int32x4x2_t val_1315_0 =
740 vtrnq_s32(a[13].val[0], a[15].val[0]); //q8 q12
741 int32x4x2_t val_1315_1 =
742 vtrnq_s32(a[13].val[1], a[15].val[1]); //q9 q13
743
744 a[9].val[0] = vcombine_s32(vget_low_s32(val_911_0.val[0]),
745 vget_low_s32(val_1315_0.val[0])); //q0
746 a[9].val[1] = vcombine_s32(vget_high_s32(val_911_0.val[0]),
747 vget_high_s32(val_1315_0.val[0])); //q8
748
749 a[11].val[0] = vcombine_s32(vget_low_s32(val_911_0.val[1]),
750 vget_low_s32(val_1315_0.val[1])); //q1
751 a[11].val[1] = vcombine_s32(vget_high_s32(val_911_0.val[1]),
752 vget_high_s32(val_1315_0.val[1])); //q9
753
754 a[13].val[0] = vcombine_s32(vget_low_s32(val_911_1.val[0]),
755 vget_low_s32(val_1315_1.val[0])); //q4
756 a[13].val[1] = vcombine_s32(vget_high_s32(val_911_1.val[0]),
757 vget_high_s32(val_1315_1.val[0])); //q12
758
759 a[15].val[0] = vcombine_s32(vget_low_s32(val_911_1.val[1]),
760 vget_low_s32(val_1315_1.val[1])); //q5
761 a[15].val[1] = vcombine_s32(vget_high_s32(val_911_1.val[1]),
762 vget_high_s32(val_1315_1.val[1])); //q13
763
764 a[9].val[0] = vaddq_s32(a[9].val[0], a[11].val[0]); //q0
765 a[9].val[1] = vaddq_s32(a[9].val[1], a[11].val[1]); //q8
766 a[9].val[1] = vaddq_s32(a[9].val[1], a[9].val[0]); //q8
767
768 a[13].val[0] = vaddq_s32(a[13].val[0], a[15].val[0]); //q1
769 a[13].val[1] = vaddq_s32(a[13].val[1], a[15].val[1]); //q9
770 a[13].val[1] = vaddq_s32(a[13].val[1], a[13].val[0]); //q9
771
772 int32x4x2_t val_9 = vzipq_s32(a[9].val[1], a[13].val[1]); //q8 q9
773
774 vst1_s32(pi4_temp + 288, vget_low_s32(val_9.val[0])); /*Value 9*/
775 vst1_s32(pi4_temp + 352, vget_high_s32(val_9.val[0])); /*Value 11*/
776 vst1_s32(pi4_temp + 416, vget_low_s32(val_9.val[1])); /*Value 13*/
777 vst1_s32(pi4_temp + 480, vget_high_s32(val_9.val[1])); /*Value 15*/
778
779 a[17].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_17_07),
780 vget_low_s16(o0_0)); //q2
781 a[19].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_19_07),
782 vget_low_s16(o0_0)); //q2
783 a[21].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_21_07),
784 vget_low_s16(o0_0)); //q2
785 a[23].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_23_07),
786 vget_low_s16(o0_0)); //q2
787
788 a[23].val[0] = vmlal_s16(a[23].val[0],
789 vget_high_s16(g_ai2_ihevc_trans_32_23_07), vget_high_s16(o0_0));
790 a[21].val[0] = vmlal_s16(a[21].val[0],
791 vget_high_s16(g_ai2_ihevc_trans_32_21_07), vget_high_s16(o0_0));
792 a[19].val[0] = vmlal_s16(a[19].val[0],
793 vget_high_s16(g_ai2_ihevc_trans_32_19_07), vget_high_s16(o0_0));
794 a[17].val[0] = vmlal_s16(a[17].val[0],
795 vget_high_s16(g_ai2_ihevc_trans_32_17_07), vget_high_s16(o0_0));
796
797 a[17].val[0] = vmlal_s16(a[17].val[0],
798 vget_low_s16(g_ai2_ihevc_trans_32_17_815), vget_low_s16(o0_1));
799 a[19].val[0] = vmlal_s16(a[19].val[0],
800 vget_low_s16(g_ai2_ihevc_trans_32_19_815), vget_low_s16(o0_1));
801 a[21].val[0] = vmlal_s16(a[21].val[0],
802 vget_low_s16(g_ai2_ihevc_trans_32_21_815), vget_low_s16(o0_1));
803 a[23].val[0] = vmlal_s16(a[23].val[0],
804 vget_low_s16(g_ai2_ihevc_trans_32_23_815), vget_low_s16(o0_1));
805
806 a[23].val[0] = vmlal_s16(a[23].val[0],
807 vget_high_s16(g_ai2_ihevc_trans_32_23_815),
808 vget_high_s16(o0_1));
809 a[21].val[0] = vmlal_s16(a[21].val[0],
810 vget_high_s16(g_ai2_ihevc_trans_32_21_815),
811 vget_high_s16(o0_1));
812 a[19].val[0] = vmlal_s16(a[19].val[0],
813 vget_high_s16(g_ai2_ihevc_trans_32_19_815),
814 vget_high_s16(o0_1));
815 a[17].val[0] = vmlal_s16(a[17].val[0],
816 vget_high_s16(g_ai2_ihevc_trans_32_17_815),
817 vget_high_s16(o0_1));
818
819 a[17].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_17_07),
820 vget_low_s16(o1_0)); //q2
821 a[19].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_19_07),
822 vget_low_s16(o1_0)); //q2
823 a[21].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_21_07),
824 vget_low_s16(o1_0)); //q2
825 a[23].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_23_07),
826 vget_low_s16(o1_0)); //q2
827
828 a[23].val[1] = vmlal_s16(a[23].val[1],
829 vget_high_s16(g_ai2_ihevc_trans_32_23_07), vget_high_s16(o1_0));
830 a[21].val[1] = vmlal_s16(a[21].val[1],
831 vget_high_s16(g_ai2_ihevc_trans_32_21_07), vget_high_s16(o1_0));
832 a[19].val[1] = vmlal_s16(a[19].val[1],
833 vget_high_s16(g_ai2_ihevc_trans_32_19_07), vget_high_s16(o1_0));
834 a[17].val[1] = vmlal_s16(a[17].val[1],
835 vget_high_s16(g_ai2_ihevc_trans_32_17_07), vget_high_s16(o1_0));
836
837 a[17].val[1] = vmlal_s16(a[17].val[1],
838 vget_low_s16(g_ai2_ihevc_trans_32_17_815), vget_low_s16(o1_1));
839 a[19].val[1] = vmlal_s16(a[19].val[1],
840 vget_low_s16(g_ai2_ihevc_trans_32_19_815), vget_low_s16(o1_1));
841 a[21].val[1] = vmlal_s16(a[21].val[1],
842 vget_low_s16(g_ai2_ihevc_trans_32_21_815), vget_low_s16(o1_1));
843 a[23].val[1] = vmlal_s16(a[23].val[1],
844 vget_low_s16(g_ai2_ihevc_trans_32_23_815), vget_low_s16(o1_1));
845
846 a[23].val[1] = vmlal_s16(a[23].val[1],
847 vget_high_s16(g_ai2_ihevc_trans_32_23_815),
848 vget_high_s16(o1_1));
849 a[21].val[1] = vmlal_s16(a[21].val[1],
850 vget_high_s16(g_ai2_ihevc_trans_32_21_815),
851 vget_high_s16(o1_1));
852 a[19].val[1] = vmlal_s16(a[19].val[1],
853 vget_high_s16(g_ai2_ihevc_trans_32_19_815),
854 vget_high_s16(o1_1));
855 a[17].val[1] = vmlal_s16(a[17].val[1],
856 vget_high_s16(g_ai2_ihevc_trans_32_17_815),
857 vget_high_s16(o1_1));
858
859 int32x4x2_t val_1719_0 =
860 vtrnq_s32(a[17].val[0], a[19].val[0]); //q0 q4
861 int32x4x2_t val_1719_1 =
862 vtrnq_s32(a[17].val[1], a[19].val[1]); //q1 q5
863 int32x4x2_t val_2123_0 =
864 vtrnq_s32(a[21].val[0], a[23].val[0]); //q8 q12
865 int32x4x2_t val_2123_1 =
866 vtrnq_s32(a[21].val[1], a[23].val[1]); //q9 q13
867
868 a[17].val[0] = vcombine_s32(vget_low_s32(val_1719_0.val[0]),
869 vget_low_s32(val_2123_0.val[0])); //q0
870 a[17].val[1] = vcombine_s32(vget_high_s32(val_1719_0.val[0]),
871 vget_high_s32(val_2123_0.val[0])); //q8
872
873 a[19].val[0] = vcombine_s32(vget_low_s32(val_1719_0.val[1]),
874 vget_low_s32(val_2123_0.val[1])); //q1
875 a[19].val[1] = vcombine_s32(vget_high_s32(val_1719_0.val[1]),
876 vget_high_s32(val_2123_0.val[1])); //q9
877
878 a[21].val[0] = vcombine_s32(vget_low_s32(val_1719_1.val[0]),
879 vget_low_s32(val_2123_1.val[0])); //q4
880 a[21].val[1] = vcombine_s32(vget_high_s32(val_1719_1.val[0]),
881 vget_high_s32(val_2123_1.val[0])); //q12
882
883 a[23].val[0] = vcombine_s32(vget_low_s32(val_1719_1.val[1]),
884 vget_low_s32(val_2123_1.val[1])); //q5
885 a[23].val[1] = vcombine_s32(vget_high_s32(val_1719_1.val[1]),
886 vget_high_s32(val_2123_1.val[1])); //q13
887
888 a[17].val[0] = vaddq_s32(a[17].val[0], a[19].val[0]); //q0
889 a[17].val[1] = vaddq_s32(a[17].val[1], a[19].val[1]); //q8
890 a[17].val[1] = vaddq_s32(a[17].val[1], a[17].val[0]); //q8
891
892 a[21].val[0] = vaddq_s32(a[21].val[0], a[23].val[0]); //q1
893 a[21].val[1] = vaddq_s32(a[21].val[1], a[23].val[1]); //q9
894 a[21].val[1] = vaddq_s32(a[21].val[1], a[21].val[0]); //q9
895
896 int32x4x2_t val_17 = vzipq_s32(a[17].val[1], a[21].val[1]); //q8 q9
897
898 vst1_s32(pi4_temp + 544, vget_low_s32(val_17.val[0])); /*Value 17*/
899 vst1_s32(pi4_temp + 608, vget_high_s32(val_17.val[0])); /*Value 19*/
900 vst1_s32(pi4_temp + 672, vget_low_s32(val_17.val[1])); /*Value 21*/
901 vst1_s32(pi4_temp + 736, vget_high_s32(val_17.val[1])); /*Value 23*/
902
903 a[25].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_25_07),
904 vget_low_s16(o0_0)); //q2
905 a[27].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_27_07),
906 vget_low_s16(o0_0)); //q2
907 a[29].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_29_07),
908 vget_low_s16(o0_0)); //q2
909 a[31].val[0] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_31_07),
910 vget_low_s16(o0_0)); //q2
911
912 a[31].val[0] = vmlal_s16(a[31].val[0],
913 vget_high_s16(g_ai2_ihevc_trans_32_31_07), vget_high_s16(o0_0));
914 a[29].val[0] = vmlal_s16(a[29].val[0],
915 vget_high_s16(g_ai2_ihevc_trans_32_29_07), vget_high_s16(o0_0));
916 a[27].val[0] = vmlal_s16(a[27].val[0],
917 vget_high_s16(g_ai2_ihevc_trans_32_27_07), vget_high_s16(o0_0));
918 a[25].val[0] = vmlal_s16(a[25].val[0],
919 vget_high_s16(g_ai2_ihevc_trans_32_25_07), vget_high_s16(o0_0));
920
921 a[25].val[0] = vmlal_s16(a[25].val[0],
922 vget_low_s16(g_ai2_ihevc_trans_32_25_815), vget_low_s16(o0_1));
923 a[27].val[0] = vmlal_s16(a[27].val[0],
924 vget_low_s16(g_ai2_ihevc_trans_32_27_815), vget_low_s16(o0_1));
925 a[29].val[0] = vmlal_s16(a[29].val[0],
926 vget_low_s16(g_ai2_ihevc_trans_32_29_815), vget_low_s16(o0_1));
927 a[31].val[0] = vmlal_s16(a[31].val[0],
928 vget_low_s16(g_ai2_ihevc_trans_32_31_815), vget_low_s16(o0_1));
929
930 a[31].val[0] = vmlal_s16(a[31].val[0],
931 vget_high_s16(g_ai2_ihevc_trans_32_31_815),
932 vget_high_s16(o0_1));
933 a[29].val[0] = vmlal_s16(a[29].val[0],
934 vget_high_s16(g_ai2_ihevc_trans_32_29_815),
935 vget_high_s16(o0_1));
936 a[27].val[0] = vmlal_s16(a[27].val[0],
937 vget_high_s16(g_ai2_ihevc_trans_32_27_815),
938 vget_high_s16(o0_1));
939 a[25].val[0] = vmlal_s16(a[25].val[0],
940 vget_high_s16(g_ai2_ihevc_trans_32_25_815),
941 vget_high_s16(o0_1));
942
943 a[25].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_25_07),
944 vget_low_s16(o1_0)); //q2
945 a[27].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_27_07),
946 vget_low_s16(o1_0)); //q2
947 a[29].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_29_07),
948 vget_low_s16(o1_0)); //q2
949 a[31].val[1] = vmull_s16(vget_low_s16(g_ai2_ihevc_trans_32_31_07),
950 vget_low_s16(o1_0)); //q2
951
952 a[31].val[1] = vmlal_s16(a[31].val[1],
953 vget_high_s16(g_ai2_ihevc_trans_32_31_07), vget_high_s16(o1_0));
954 a[29].val[1] = vmlal_s16(a[29].val[1],
955 vget_high_s16(g_ai2_ihevc_trans_32_29_07), vget_high_s16(o1_0));
956 a[27].val[1] = vmlal_s16(a[27].val[1],
957 vget_high_s16(g_ai2_ihevc_trans_32_27_07), vget_high_s16(o1_0));
958 a[25].val[1] = vmlal_s16(a[25].val[1],
959 vget_high_s16(g_ai2_ihevc_trans_32_25_07), vget_high_s16(o1_0));
960
961 a[25].val[1] = vmlal_s16(a[25].val[1],
962 vget_low_s16(g_ai2_ihevc_trans_32_25_815), vget_low_s16(o1_1));
963 a[27].val[1] = vmlal_s16(a[27].val[1],
964 vget_low_s16(g_ai2_ihevc_trans_32_27_815), vget_low_s16(o1_1));
965 a[29].val[1] = vmlal_s16(a[29].val[1],
966 vget_low_s16(g_ai2_ihevc_trans_32_29_815), vget_low_s16(o1_1));
967 a[31].val[1] = vmlal_s16(a[31].val[1],
968 vget_low_s16(g_ai2_ihevc_trans_32_31_815), vget_low_s16(o1_1));
969
970 a[31].val[1] = vmlal_s16(a[31].val[1],
971 vget_high_s16(g_ai2_ihevc_trans_32_31_815),
972 vget_high_s16(o1_1));
973 a[29].val[1] = vmlal_s16(a[29].val[1],
974 vget_high_s16(g_ai2_ihevc_trans_32_29_815),
975 vget_high_s16(o1_1));
976 a[27].val[1] = vmlal_s16(a[27].val[1],
977 vget_high_s16(g_ai2_ihevc_trans_32_27_815),
978 vget_high_s16(o1_1));
979 a[25].val[1] = vmlal_s16(a[25].val[1],
980 vget_high_s16(g_ai2_ihevc_trans_32_25_815),
981 vget_high_s16(o1_1));
982
983 int32x4x2_t val_2527_0 =
984 vtrnq_s32(a[25].val[0], a[27].val[0]); //q0 q4
985 int32x4x2_t val_2527_1 =
986 vtrnq_s32(a[25].val[1], a[27].val[1]); //q1 q5
987 int32x4x2_t val_2931_0 =
988 vtrnq_s32(a[29].val[0], a[31].val[0]); //q8 q12
989 int32x4x2_t val_2931_1 =
990 vtrnq_s32(a[29].val[1], a[31].val[1]); //q9 q13
991
992 a[25].val[0] = vcombine_s32(vget_low_s32(val_2527_0.val[0]),
993 vget_low_s32(val_2931_0.val[0])); //q0
994 a[25].val[1] = vcombine_s32(vget_high_s32(val_2527_0.val[0]),
995 vget_high_s32(val_2931_0.val[0])); //q8
996
997 a[27].val[0] = vcombine_s32(vget_low_s32(val_2527_0.val[1]),
998 vget_low_s32(val_2931_0.val[1])); //q1
999 a[27].val[1] = vcombine_s32(vget_high_s32(val_2527_0.val[1]),
1000 vget_high_s32(val_2931_0.val[1])); //q9
1001
1002 a[29].val[0] = vcombine_s32(vget_low_s32(val_2527_1.val[0]),
1003 vget_low_s32(val_2931_1.val[0])); //q4
1004 a[29].val[1] = vcombine_s32(vget_high_s32(val_2527_1.val[0]),
1005 vget_high_s32(val_2931_1.val[0])); //q12
1006
1007 a[31].val[0] = vcombine_s32(vget_low_s32(val_2527_1.val[1]),
1008 vget_low_s32(val_2931_1.val[1])); //q5
1009 a[31].val[1] = vcombine_s32(vget_high_s32(val_2527_1.val[1]),
1010 vget_high_s32(val_2931_1.val[1])); //q13
1011
1012 a[25].val[0] = vaddq_s32(a[25].val[0], a[27].val[0]); //q0
1013 a[25].val[1] = vaddq_s32(a[25].val[1], a[27].val[1]); //q8
1014 a[25].val[1] = vaddq_s32(a[25].val[1], a[25].val[0]); //q8
1015
1016 a[29].val[0] = vaddq_s32(a[29].val[0], a[31].val[0]); //q1
1017 a[29].val[1] = vaddq_s32(a[29].val[1], a[31].val[1]); //q9
1018 a[29].val[1] = vaddq_s32(a[29].val[1], a[29].val[0]); //q9
1019
1020 int32x4x2_t val_25 = vzipq_s32(a[25].val[1], a[29].val[1]); //q8 q9
1021
1022 vst1_s32(pi4_temp + 800, vget_low_s32(val_25.val[0])); /*Value 25*/
1023 vst1_s32(pi4_temp + 864, vget_high_s32(val_25.val[0])); /*Value 27*/
1024 vst1_s32(pi4_temp + 928, vget_low_s32(val_25.val[1])); /*Value 29*/
1025 vst1_s32(pi4_temp + 992, vget_high_s32(val_25.val[1])); /*Value 31*/
1026
1027 pi4_temp += 2;
1028 }
1029 }
1030
1031 /*sad of the block*/
1032 tmp_a = vpaddlq_s32(sum_val);
1033 sad = vadd_s32(vreinterpret_s32_s64(vget_low_s64(tmp_a)),
1034 vreinterpret_s32_s64(vget_high_s64(tmp_a)));
1035 u4_blk_sad = vget_lane_s32(sad, 0);
1036
1037 //Stage 2
1038 {
1039 static const int32x4_t g_ai4_ihevc_trans_32_0_8 = { 64, -64, 83, -83 };
1040 static const int32x4_t g_ai4_ihevc_trans_32_1_8 = { 64, 64, 36, 36 };
1041
1042 static const int32x4_t g_ai4_ihevc_trans_32_4_04 = { 89, 75, 50, 18 };
1043 static const int32x4_t g_ai4_ihevc_trans_32_12_04 = { 75, -18, -89, -50 };
1044 static const int32x4_t g_ai4_ihevc_trans_32_20_04 = { 50, -89, 18, 75 };
1045 static const int32x4_t g_ai4_ihevc_trans_32_28_04 = { 18, -50, 75, -89 };
1046
1047 static const int32x4_t g_ai4_ihevc_trans_32_2_03 = { 90, 87, 80, 70 };
1048 static const int32x4_t g_ai4_ihevc_trans_32_2_47 = { 57, 43, 25, 9 };
1049 static const int32x4_t g_ai4_ihevc_trans_32_6_03 = { 87, 57, 9, -43 };
1050 static const int32x4_t g_ai4_ihevc_trans_32_6_47 = { -80, -90, -70,
1051 -25 };
1052 static const int32x4_t g_ai4_ihevc_trans_32_10_03 = { 80, 9, -70, -87 };
1053 static const int32x4_t g_ai4_ihevc_trans_32_10_47 = { -25, 57, 90, 43 };
1054 static const int32x4_t g_ai4_ihevc_trans_32_14_03 = { 70, -43, -87, 9 };
1055 static const int32x4_t g_ai4_ihevc_trans_32_14_47 = { 90, 25, -80, -57 };
1056 static const int32x4_t g_ai4_ihevc_trans_32_18_03 = { 57, -80, -25, 90 };
1057 static const int32x4_t g_ai4_ihevc_trans_32_18_47 = { -9, -87, 43, 70 };
1058 static const int32x4_t g_ai4_ihevc_trans_32_22_03 = { 43, -90, 57, 25 };
1059 static const int32x4_t g_ai4_ihevc_trans_32_22_47 = { -87, 70, 9, -80 };
1060 static const int32x4_t g_ai4_ihevc_trans_32_26_03 = { 25, -70, 90, -80 };
1061 static const int32x4_t g_ai4_ihevc_trans_32_26_47 = { 43, 9, -57, 87 };
1062 static const int32x4_t g_ai4_ihevc_trans_32_30_03 = { 9, -25, 43, -57 };
1063 static const int32x4_t g_ai4_ihevc_trans_32_30_47 = { 70, -80, 87, -90 };
1064
1065 static const int32x4_t g_ai4_ihevc_trans_32_1_03 = { 90, 90, 88, 85 };
1066 static const int32x4_t g_ai4_ihevc_trans_32_1_47 = { 82, 78, 73, 67 };
1067 static const int32x4_t g_ai4_ihevc_trans_32_1_811 = { 61, 54, 46, 38 };
1068 static const int32x4_t g_ai4_ihevc_trans_32_1_1215 = { 31, 22, 13, 4 };
1069 static const int32x4_t g_ai4_ihevc_trans_32_3_03 = { 90, 82, 67, 46 };
1070 static const int32x4_t g_ai4_ihevc_trans_32_3_47 = { 22, -4, -31, -54 };
1071 static const int32x4_t g_ai4_ihevc_trans_32_3_811 = { -73, -85, -90, -88 };
1072 static const int32x4_t g_ai4_ihevc_trans_32_3_1215 = { -78, -61, -38, -13 };
1073 static const int32x4_t g_ai4_ihevc_trans_32_5_03 = { 88, 67, 31, -13 };
1074 static const int32x4_t g_ai4_ihevc_trans_32_5_47 = { -54, -82, -90, -78 };
1075 static const int32x4_t g_ai4_ihevc_trans_32_5_811 = { -46, -4, 38, 73 };
1076 static const int32x4_t g_ai4_ihevc_trans_32_5_1215 = { 90, 85, 61, 22 };
1077 static const int32x4_t g_ai4_ihevc_trans_32_7_03 = { 85, 46, -13, -67 };
1078 static const int32x4_t g_ai4_ihevc_trans_32_7_47 = { -90, -73, -22, 38 };
1079 static const int32x4_t g_ai4_ihevc_trans_32_7_811 = { 82, 88, 54, -4 };
1080 static const int32x4_t g_ai4_ihevc_trans_32_7_1215 = { -61, -90, -78, -31 };
1081 static const int32x4_t g_ai4_ihevc_trans_32_9_03 = { 82, 22, -54, -90 };
1082 static const int32x4_t g_ai4_ihevc_trans_32_9_47 = { -61, 13, 78, 85 };
1083 static const int32x4_t g_ai4_ihevc_trans_32_9_811 = { 31, -46, -90, -67 };
1084 static const int32x4_t g_ai4_ihevc_trans_32_9_1215 = { 4, 73, 88, 38 };
1085 static const int32x4_t g_ai4_ihevc_trans_32_11_03 = { 78, -4, -82, -73 };
1086 static const int32x4_t g_ai4_ihevc_trans_32_11_47 = { 13, 85, 67, -22 };
1087 static const int32x4_t g_ai4_ihevc_trans_32_11_811 = { -88, -61, 31, 90 };
1088 static const int32x4_t g_ai4_ihevc_trans_32_11_1215 = { 54, -38, -90, -46 };
1089 static const int32x4_t g_ai4_ihevc_trans_32_13_03 = { 73, -31, -90, -22 };
1090 static const int32x4_t g_ai4_ihevc_trans_32_13_47 = { 78, 67, -38, -90 };
1091 static const int32x4_t g_ai4_ihevc_trans_32_13_811 = { -13, 82, 61, -46 };
1092 static const int32x4_t g_ai4_ihevc_trans_32_13_1215 = { -88, -4, 85, 54 };
1093 static const int32x4_t g_ai4_ihevc_trans_32_15_03 = { 67, -54, -78, 38 };
1094 static const int32x4_t g_ai4_ihevc_trans_32_15_47 = { 85, -22, -90, 4 };
1095 static const int32x4_t g_ai4_ihevc_trans_32_15_811 = { 90, 13, -88, -31 };
1096 static const int32x4_t g_ai4_ihevc_trans_32_15_1215 = { 82, 46, -73, -61 };
1097 static const int32x4_t g_ai4_ihevc_trans_32_17_03 = { 61, -73, -46, 82 };
1098 static const int32x4_t g_ai4_ihevc_trans_32_17_47 = { 31, -88, -13, 90 };
1099 static const int32x4_t g_ai4_ihevc_trans_32_17_811 = { -4, -90, 22, 85 };
1100 static const int32x4_t g_ai4_ihevc_trans_32_17_1215 = { -38, -78, 54, 67 };
1101 static const int32x4_t g_ai4_ihevc_trans_32_19_03 = { 54, -85, -4, 88 };
1102 static const int32x4_t g_ai4_ihevc_trans_32_19_47 = { -46, -61, 82, 13 };
1103 static const int32x4_t g_ai4_ihevc_trans_32_19_811 = { -90, 38, 67, -78 };
1104 static const int32x4_t g_ai4_ihevc_trans_32_19_1215 = { -22, 90, -31, -73 };
1105 static const int32x4_t g_ai4_ihevc_trans_32_21_03 = { 46, -90, 38, 54 };
1106 static const int32x4_t g_ai4_ihevc_trans_32_21_47 = { -90, 31, 61, -88 };
1107 static const int32x4_t g_ai4_ihevc_trans_32_21_811 = { 22, 67, -85, 13 };
1108 static const int32x4_t g_ai4_ihevc_trans_32_21_1215 = { 73, -82, 4, 78 };
1109 static const int32x4_t g_ai4_ihevc_trans_32_23_03 = { 38, -88, 73, -4 };
1110 static const int32x4_t g_ai4_ihevc_trans_32_23_47 = { -67, 90, -46, -31 };
1111 static const int32x4_t g_ai4_ihevc_trans_32_23_811 = { 85, -78, 13, 61 };
1112 static const int32x4_t g_ai4_ihevc_trans_32_23_1215 = { -90, 54, 22, -82 };
1113 static const int32x4_t g_ai4_ihevc_trans_32_25_03 = { 31, -78, 90, -61 };
1114 static const int32x4_t g_ai4_ihevc_trans_32_25_47 = { 4, 54, -88, 82 };
1115 static const int32x4_t g_ai4_ihevc_trans_32_25_811 = { -38, -22, 73, -90 };
1116 static const int32x4_t g_ai4_ihevc_trans_32_25_1215 = { 67, -13, -46, 85 };
1117 static const int32x4_t g_ai4_ihevc_trans_32_27_03 = { 22, -61, 85, -90 };
1118 static const int32x4_t g_ai4_ihevc_trans_32_27_47 = { 73, -38, -4, 46 };
1119 static const int32x4_t g_ai4_ihevc_trans_32_27_811 = { -78, 90, -82, 54 };
1120 static const int32x4_t g_ai4_ihevc_trans_32_27_1215 = { -13, -31, 67, -88 };
1121 static const int32x4_t g_ai4_ihevc_trans_32_29_03 = { 13, -38, 61, -78 };
1122 static const int32x4_t g_ai4_ihevc_trans_32_29_47 = { 88, -90, 85, -73 };
1123 static const int32x4_t g_ai4_ihevc_trans_32_29_811 = { 54, -31, 4, 22 };
1124 static const int32x4_t g_ai4_ihevc_trans_32_29_1215 = { -46, 67, -82, 90 };
1125 static const int32x4_t g_ai4_ihevc_trans_32_31_03 = { 4, -13, 22, -31 };
1126 static const int32x4_t g_ai4_ihevc_trans_32_31_47 = { 38, -46, 54, -61 };
1127 static const int32x4_t g_ai4_ihevc_trans_32_31_811 = { 67, -73, 78, -82 };
1128 static const int32x4_t g_ai4_ihevc_trans_32_31_1215 = { 85, -88, 90, -90 };
1129
1130 int32x4_t a[32];
1131
1132 pi4_temp = pi4_temp_orig;
1133 for(i = 0; i < 32; i++)
1134 {
1135 int32x4_t temp_data[8];
1136
1137 temp_data[0] = vld1q_s32(pi4_temp);
1138 temp_data[1] = vld1q_s32(pi4_temp + 4);
1139 temp_data[2] = vld1q_s32(pi4_temp + 8);
1140 temp_data[3] = vld1q_s32(pi4_temp + 12);
1141
1142 temp_data[4] = vrev64q_s32(vld1q_s32(pi4_temp + 16));
1143 temp_data[4] = vcombine_s32(
1144 vget_high_s32(temp_data[4]), vget_low_s32(temp_data[4]));
1145
1146 temp_data[5] = vrev64q_s32(vld1q_s32(pi4_temp + 20));
1147 temp_data[5] = vcombine_s32(
1148 vget_high_s32(temp_data[5]), vget_low_s32(temp_data[5]));
1149
1150 temp_data[6] = vrev64q_s32(vld1q_s32(pi4_temp + 24));
1151 temp_data[6] = vcombine_s32(
1152 vget_high_s32(temp_data[6]), vget_low_s32(temp_data[6]));
1153
1154 temp_data[7] = vrev64q_s32(vld1q_s32(pi4_temp + 28));
1155 temp_data[7] = vcombine_s32(
1156 vget_high_s32(temp_data[7]), vget_low_s32(temp_data[7]));
1157
1158 pi4_temp += 32;
1159
1160 const int32x4_t o0 =
1161 vsubq_s32(temp_data[0], temp_data[7]); /*R2(9-16) - R2(24-17)*/
1162 const int32x4_t o1 =
1163 vsubq_s32(temp_data[1], temp_data[6]); /*R2(1- 8) - R2(32-25)*/
1164 const int32x4_t o2 =
1165 vsubq_s32(temp_data[2], temp_data[5]); /*R1(9-16) - R1(24-17)*/
1166 const int32x4_t o3 =
1167 vsubq_s32(temp_data[3], temp_data[4]); /*R1(1- 8) - R1(32-25)*/
1168
1169 int32x4_t e3 = vrev64q_s32(
1170 vaddq_s32(temp_data[3], temp_data[4])); /*R1(1- 8) + R1(32-25)*/
1171 e3 = vcombine_s32(vget_high_s32(e3), vget_low_s32(e3));
1172 int32x4_t e2 = vrev64q_s32(
1173 vaddq_s32(temp_data[2], temp_data[5])); /*R1(9-16) + R1(24-17)*/
1174 e2 = vcombine_s32(vget_high_s32(e2), vget_low_s32(e2));
1175
1176 const int32x4_t e1 =
1177 vaddq_s32(temp_data[1], temp_data[6]); /*R2(1- 8) + R2(32-25)*/
1178 const int32x4_t e0 =
1179 vaddq_s32(temp_data[0], temp_data[7]); /*R2(9-16) + R2(24-17)*/
1180
1181 const int32x4_t ee0 = vaddq_s32(e0, e3); /*E1(1- 8) + E1(16-9)*/
1182 int32x4_t ee1 =
1183 vrev64q_s32(vaddq_s32(e1, e2)); /*E2(1- 8) + E2(16-9)*/
1184 ee1 = vcombine_s32(vget_high_s32(ee1), vget_low_s32(ee1));
1185 const int32x4_t eo1 = vsubq_s32(e1, e2); /*E2(1- 8) - E2(16-9)*/
1186 const int32x4_t eo0 = vsubq_s32(e0, e3); /*E1(1- 8) - E1(16-9)*/
1187
1188 /*EE(1-4) - EE(8-5)*/
1189 const int32x4_t eeo = vsubq_s32(ee0, ee1); //Q5
1190 /*EE(1-4) + EE(8-5)*/
1191 const int32x4_t eee = vaddq_s32(ee0, ee1); //Q4
1192
1193 /*EEEE Calculations*/
1194 const int32x4_t eeee = vcombine_s32(
1195 vadd_s32(vget_low_s32(eee), vrev64_s32(vget_high_s32(eee))),
1196 vsub_s32(
1197 vget_low_s32(eee), vrev64_s32(vget_high_s32(eee)))); //q6
1198
1199 /*Calculation of values 0 8 16 24*/
1200 /*Multiplications*/
1201 a[0] = vmulq_s32(g_ai4_ihevc_trans_32_0_8, eeee);
1202 a[0] = vmlaq_s32(a[0], g_ai4_ihevc_trans_32_1_8, vrev64q_s32(eeee));
1203 /*Shift*/
1204 int16x4_t val_0 = vrshrn_n_s32(a[0], 15);
1205 /*Store*/
1206 vst1_lane_s16(pi2_dst, val_0, 0); /*Value 0*/
1207 vst1_lane_s16(pi2_dst + 8 * dst_strd, val_0, 2); /*Value 8*/
1208 vst1_lane_s16(pi2_dst + 16 * dst_strd, val_0, 1); /*Value 16*/
1209 vst1_lane_s16(pi2_dst + 24 * dst_strd, val_0, 3); /*Value 24*/
1210
1211 /*Calculation of values 4 12 20 28*/
1212 /*Multiplications*/
1213 a[4] = vmulq_s32(g_ai4_ihevc_trans_32_4_04, eeo);
1214 a[12] = vmulq_s32(g_ai4_ihevc_trans_32_12_04, eeo);
1215 a[20] = vmulq_s32(g_ai4_ihevc_trans_32_20_04, eeo);
1216 a[28] = vmulq_s32(g_ai4_ihevc_trans_32_28_04, eeo);
1217 /*Transposes*/
1218 int32x4x2_t val_412 = vtrnq_s32(a[4], a[12]); //q0 q9
1219 int32x4x2_t val_2028 = vtrnq_s32(a[20], a[28]); //q10 q11
1220 /*Swap*/
1221 a[4] = vcombine_s32(vget_low_s32(val_412.val[0]),
1222 vget_low_s32(val_2028.val[0])); //q0
1223 a[12] = vcombine_s32(vget_low_s32(val_412.val[1]),
1224 vget_low_s32(val_2028.val[1])); //q9
1225 a[20] = vcombine_s32(vget_high_s32(val_412.val[0]),
1226 vget_high_s32(val_2028.val[0])); //q10
1227 a[28] = vcombine_s32(vget_high_s32(val_412.val[1]),
1228 vget_high_s32(val_2028.val[1])); //q11
1229 /*Additions*/
1230 a[4] = vaddq_s32(a[4], a[12]); //q0
1231 a[20] = vaddq_s32(a[20], a[28]); //q10
1232 a[4] = vaddq_s32(a[4], a[20]); //q0
1233 /*Shift*/
1234 int16x4_t val_4 = vrshrn_n_s32(a[4], 15);
1235 /*Store*/
1236 vst1_lane_s16(pi2_dst + 4 * dst_strd, val_4, 0); /*Value 4*/
1237 vst1_lane_s16(pi2_dst + 12 * dst_strd, val_4, 1); /*Value 12*/
1238 vst1_lane_s16(pi2_dst + 20 * dst_strd, val_4, 2); /*Value 20*/
1239 vst1_lane_s16(pi2_dst + 28 * dst_strd, val_4, 3); /*Value 28*/
1240
1241 /*Calculation of value 2 6 10 14 18 22 26 30*/
1242 /*Multiplications*/
1243 a[2] = vmulq_s32(g_ai4_ihevc_trans_32_2_03, eo0); //q8
1244 a[6] = vmulq_s32(g_ai4_ihevc_trans_32_6_03, eo0); //q2
1245 a[10] = vmulq_s32(g_ai4_ihevc_trans_32_10_03, eo0); //q2
1246 a[14] = vmulq_s32(g_ai4_ihevc_trans_32_14_03, eo0); //q2
1247
1248 a[14] = vmlaq_s32(a[14], g_ai4_ihevc_trans_32_14_47, eo1);
1249 a[10] = vmlaq_s32(a[10], g_ai4_ihevc_trans_32_10_47, eo1);
1250 a[6] = vmlaq_s32(a[6], g_ai4_ihevc_trans_32_6_47, eo1);
1251 a[2] = vmlaq_s32(a[2], g_ai4_ihevc_trans_32_2_47, eo1);
1252
1253 int32x2_t val_2 = vadd_s32(vget_low_s32(a[2]), vget_high_s32(a[2]));
1254 int32x2_t val_6 = vadd_s32(vget_low_s32(a[6]), vget_high_s32(a[6]));
1255 val_2 = vpadd_s32(val_2, val_6);
1256
1257 int32x2_t val_10 =
1258 vadd_s32(vget_low_s32(a[10]), vget_high_s32(a[10]));
1259 int32x2_t val_14 =
1260 vadd_s32(vget_low_s32(a[14]), vget_high_s32(a[14]));
1261 val_10 = vpadd_s32(val_10, val_14);
1262
1263 /*Shift*/
1264 int16x4_t val__2 =
1265 vrshrn_n_s32(vcombine_s32(val_2, val_10), 15); //q9 q12
1266
1267 /*Store*/
1268 vst1_lane_s16(pi2_dst + 2 * dst_strd, val__2, 0); /*Value 2*/
1269 vst1_lane_s16(pi2_dst + 6 * dst_strd, val__2, 1); /*Value 6*/
1270 vst1_lane_s16(pi2_dst + 10 * dst_strd, val__2, 2); /*Value 10*/
1271 vst1_lane_s16(pi2_dst + 14 * dst_strd, val__2, 3); /*Value 14*/
1272
1273 a[18] = vmulq_s32(g_ai4_ihevc_trans_32_18_03, eo0); //q2
1274 a[22] = vmulq_s32(g_ai4_ihevc_trans_32_22_03, eo0); //q2
1275 a[26] = vmulq_s32(g_ai4_ihevc_trans_32_26_03, eo0); //q2
1276 a[30] = vmulq_s32(g_ai4_ihevc_trans_32_30_03, eo0); //q2
1277
1278 a[30] = vmlaq_s32(a[30], g_ai4_ihevc_trans_32_30_47, eo1);
1279 a[26] = vmlaq_s32(a[26], g_ai4_ihevc_trans_32_26_47, eo1);
1280 a[22] = vmlaq_s32(a[22], g_ai4_ihevc_trans_32_22_47, eo1);
1281 a[18] = vmlaq_s32(a[18], g_ai4_ihevc_trans_32_18_47, eo1);
1282
1283 int32x2_t val_18 =
1284 vadd_s32(vget_low_s32(a[18]), vget_high_s32(a[18]));
1285 int32x2_t val_22 =
1286 vadd_s32(vget_low_s32(a[22]), vget_high_s32(a[22]));
1287 val_18 = vpadd_s32(val_18, val_22);
1288 int32x2_t val_26 =
1289 vadd_s32(vget_low_s32(a[26]), vget_high_s32(a[26]));
1290 int32x2_t val_30 =
1291 vadd_s32(vget_low_s32(a[30]), vget_high_s32(a[30]));
1292 val_26 = vpadd_s32(val_26, val_30);
1293
1294 int16x4_t val__18 =
1295 vrshrn_n_s32(vcombine_s32(val_18, val_26), 15); //q9 q12
1296
1297 vst1_lane_s16(pi2_dst + 18 * dst_strd, val__18, 0); /*Value 18*/
1298 vst1_lane_s16(pi2_dst + 22 * dst_strd, val__18, 1); /*Value 22*/
1299 vst1_lane_s16(pi2_dst + 26 * dst_strd, val__18, 2); /*Value 26*/
1300 vst1_lane_s16(pi2_dst + 30 * dst_strd, val__18, 3); /*Value 30*/
1301
1302 /*Calculations for odd indexes*/
1303 a[7] = vmulq_s32(g_ai4_ihevc_trans_32_7_03, o0); //q1
1304 a[5] = vmulq_s32(g_ai4_ihevc_trans_32_5_03, o0); //q1
1305 a[3] = vmulq_s32(g_ai4_ihevc_trans_32_3_03, o0); //q1
1306 a[1] = vmulq_s32(g_ai4_ihevc_trans_32_1_03, o0); //q1
1307
1308 a[1] = vmlaq_s32(a[1], g_ai4_ihevc_trans_32_1_47, o1);
1309 a[3] = vmlaq_s32(a[3], g_ai4_ihevc_trans_32_3_47, o1);
1310 a[5] = vmlaq_s32(a[5], g_ai4_ihevc_trans_32_5_47, o1);
1311 a[7] = vmlaq_s32(a[7], g_ai4_ihevc_trans_32_7_47, o1);
1312
1313 a[7] = vmlaq_s32(a[7], g_ai4_ihevc_trans_32_7_811, o2);
1314 a[5] = vmlaq_s32(a[5], g_ai4_ihevc_trans_32_5_811, o2);
1315 a[3] = vmlaq_s32(a[3], g_ai4_ihevc_trans_32_3_811, o2);
1316 a[1] = vmlaq_s32(a[1], g_ai4_ihevc_trans_32_1_811, o2);
1317
1318 a[1] = vmlaq_s32(a[1], g_ai4_ihevc_trans_32_1_1215, o3);
1319 int32x2_t val_1 = vadd_s32(vget_low_s32(a[1]), vget_high_s32(a[1]));
1320 a[3] = vmlaq_s32(a[3], g_ai4_ihevc_trans_32_3_1215, o3);
1321 int32x2_t val_3 = vadd_s32(vget_low_s32(a[3]), vget_high_s32(a[3]));
1322 val_1 = vpadd_s32(val_1, val_3);
1323 a[5] = vmlaq_s32(a[5], g_ai4_ihevc_trans_32_5_1215, o3);
1324 int32x2_t val_5 = vadd_s32(vget_low_s32(a[5]), vget_high_s32(a[5]));
1325 a[7] = vmlaq_s32(a[7], g_ai4_ihevc_trans_32_7_1215, o3);
1326 int32x2_t val_7 = vadd_s32(vget_low_s32(a[7]), vget_high_s32(a[7]));
1327 val_5 = vpadd_s32(val_5, val_7);
1328
1329 /*Shift*/
1330 int16x4_t val__1 =
1331 vrshrn_n_s32(vcombine_s32(val_1, val_5), 15); //q9 q12
1332
1333 /*Store*/
1334 vst1_lane_s16(pi2_dst + 1 * dst_strd, val__1, 0); /*Value 1*/
1335 vst1_lane_s16(pi2_dst + 3 * dst_strd, val__1, 1); /*Value 3*/
1336 vst1_lane_s16(pi2_dst + 5 * dst_strd, val__1, 2); /*Value 5*/
1337 vst1_lane_s16(pi2_dst + 7 * dst_strd, val__1, 3); /*Value 7*/
1338
1339 a[15] = vmulq_s32(g_ai4_ihevc_trans_32_15_03, o0); //q1
1340 a[13] = vmulq_s32(g_ai4_ihevc_trans_32_13_03, o0); //q1
1341 a[11] = vmulq_s32(g_ai4_ihevc_trans_32_11_03, o0); //q1
1342 a[9] = vmulq_s32(g_ai4_ihevc_trans_32_9_03, o0); //q1
1343
1344 a[9] = vmlaq_s32(a[9], g_ai4_ihevc_trans_32_9_47, o1);
1345 a[11] = vmlaq_s32(a[11], g_ai4_ihevc_trans_32_11_47, o1);
1346 a[13] = vmlaq_s32(a[13], g_ai4_ihevc_trans_32_13_47, o1);
1347 a[15] = vmlaq_s32(a[15], g_ai4_ihevc_trans_32_15_47, o1);
1348
1349 a[15] = vmlaq_s32(a[15], g_ai4_ihevc_trans_32_15_811, o2);
1350 a[13] = vmlaq_s32(a[13], g_ai4_ihevc_trans_32_13_811, o2);
1351 a[11] = vmlaq_s32(a[11], g_ai4_ihevc_trans_32_11_811, o2);
1352 a[9] = vmlaq_s32(a[9], g_ai4_ihevc_trans_32_9_811, o2);
1353
1354 a[9] = vmlaq_s32(a[9], g_ai4_ihevc_trans_32_9_1215, o3);
1355 int32x2_t val_9 = vadd_s32(vget_low_s32(a[9]), vget_high_s32(a[9]));
1356 a[11] = vmlaq_s32(a[11], g_ai4_ihevc_trans_32_11_1215, o3);
1357 int32x2_t val_11 =
1358 vadd_s32(vget_low_s32(a[11]), vget_high_s32(a[11]));
1359 val_9 = vpadd_s32(val_9, val_11);
1360 a[13] = vmlaq_s32(a[13], g_ai4_ihevc_trans_32_13_1215, o3);
1361 int32x2_t val_13 =
1362 vadd_s32(vget_low_s32(a[13]), vget_high_s32(a[13]));
1363 a[15] = vmlaq_s32(a[15], g_ai4_ihevc_trans_32_15_1215, o3);
1364 int32x2_t val_15 =
1365 vadd_s32(vget_low_s32(a[15]), vget_high_s32(a[15]));
1366 val_13 = vpadd_s32(val_13, val_15);
1367
1368 int16x4_t val__9 =
1369 vrshrn_n_s32(vcombine_s32(val_9, val_13), 15); //q9 q12
1370
1371 vst1_lane_s16(pi2_dst + 9 * dst_strd, val__9, 0); /*Value 9*/
1372 vst1_lane_s16(pi2_dst + 11 * dst_strd, val__9, 1); /*Value 11*/
1373 vst1_lane_s16(pi2_dst + 13 * dst_strd, val__9, 2); /*Value 13*/
1374 vst1_lane_s16(pi2_dst + 15 * dst_strd, val__9, 3); /*Value 15*/
1375
1376 a[23] = vmulq_s32(g_ai4_ihevc_trans_32_23_03, o0); //q1
1377 a[21] = vmulq_s32(g_ai4_ihevc_trans_32_21_03, o0); //q1
1378 a[19] = vmulq_s32(g_ai4_ihevc_trans_32_19_03, o0); //q1
1379 a[17] = vmulq_s32(g_ai4_ihevc_trans_32_17_03, o0); //q1
1380
1381 a[17] = vmlaq_s32(a[17], g_ai4_ihevc_trans_32_17_47, o1);
1382 a[19] = vmlaq_s32(a[19], g_ai4_ihevc_trans_32_19_47, o1);
1383 a[21] = vmlaq_s32(a[21], g_ai4_ihevc_trans_32_21_47, o1);
1384 a[23] = vmlaq_s32(a[23], g_ai4_ihevc_trans_32_23_47, o1);
1385
1386 a[23] = vmlaq_s32(a[23], g_ai4_ihevc_trans_32_23_811, o2);
1387 a[21] = vmlaq_s32(a[21], g_ai4_ihevc_trans_32_21_811, o2);
1388 a[19] = vmlaq_s32(a[19], g_ai4_ihevc_trans_32_19_811, o2);
1389 a[17] = vmlaq_s32(a[17], g_ai4_ihevc_trans_32_17_811, o2);
1390
1391 a[17] = vmlaq_s32(a[17], g_ai4_ihevc_trans_32_17_1215, o3);
1392 int32x2_t val_17 =
1393 vadd_s32(vget_low_s32(a[17]), vget_high_s32(a[17]));
1394 a[19] = vmlaq_s32(a[19], g_ai4_ihevc_trans_32_19_1215, o3);
1395 int32x2_t val_19 =
1396 vadd_s32(vget_low_s32(a[19]), vget_high_s32(a[19]));
1397 val_17 = vpadd_s32(val_17, val_19);
1398 a[21] = vmlaq_s32(a[21], g_ai4_ihevc_trans_32_21_1215, o3);
1399 int32x2_t val_21 =
1400 vadd_s32(vget_low_s32(a[21]), vget_high_s32(a[21]));
1401 a[23] = vmlaq_s32(a[23], g_ai4_ihevc_trans_32_23_1215, o3);
1402 int32x2_t val_23 =
1403 vadd_s32(vget_low_s32(a[23]), vget_high_s32(a[23]));
1404 val_21 = vpadd_s32(val_21, val_23);
1405
1406 int16x4_t val__17 =
1407 vrshrn_n_s32(vcombine_s32(val_17, val_21), 15); //q9 q12
1408
1409 vst1_lane_s16(pi2_dst + 17 * dst_strd, val__17, 0); /*Value 17*/
1410 vst1_lane_s16(pi2_dst + 19 * dst_strd, val__17, 1); /*Value 19*/
1411 vst1_lane_s16(pi2_dst + 21 * dst_strd, val__17, 2); /*Value 21*/
1412 vst1_lane_s16(pi2_dst + 23 * dst_strd, val__17, 3); /*Value 23*/
1413
1414 a[31] = vmulq_s32(g_ai4_ihevc_trans_32_31_03, o0); //q10
1415 a[29] = vmulq_s32(g_ai4_ihevc_trans_32_29_03, o0); //q1
1416 a[27] = vmulq_s32(g_ai4_ihevc_trans_32_27_03, o0); //q1
1417 a[25] = vmulq_s32(g_ai4_ihevc_trans_32_25_03, o0); //q1
1418
1419 a[25] = vmlaq_s32(a[25], g_ai4_ihevc_trans_32_25_47, o1);
1420 a[27] = vmlaq_s32(a[27], g_ai4_ihevc_trans_32_27_47, o1);
1421 a[29] = vmlaq_s32(a[29], g_ai4_ihevc_trans_32_29_47, o1);
1422 a[31] = vmlaq_s32(a[31], g_ai4_ihevc_trans_32_31_47, o1);
1423
1424 a[31] = vmlaq_s32(a[31], g_ai4_ihevc_trans_32_31_811, o2);
1425 a[29] = vmlaq_s32(a[29], g_ai4_ihevc_trans_32_29_811, o2);
1426 a[27] = vmlaq_s32(a[27], g_ai4_ihevc_trans_32_27_811, o2);
1427 a[25] = vmlaq_s32(a[25], g_ai4_ihevc_trans_32_25_811, o2);
1428
1429 a[25] = vmlaq_s32(a[25], g_ai4_ihevc_trans_32_25_1215, o3);
1430 int32x2_t val_25 =
1431 vadd_s32(vget_low_s32(a[25]), vget_high_s32(a[25]));
1432 a[27] = vmlaq_s32(a[27], g_ai4_ihevc_trans_32_27_1215, o3);
1433 int32x2_t val_27 =
1434 vadd_s32(vget_low_s32(a[27]), vget_high_s32(a[27]));
1435 val_25 = vpadd_s32(val_25, val_27);
1436 a[29] = vmlaq_s32(a[29], g_ai4_ihevc_trans_32_29_1215, o3);
1437 int32x2_t val_29 =
1438 vadd_s32(vget_low_s32(a[29]), vget_high_s32(a[29]));
1439 a[31] = vmlaq_s32(a[31], g_ai4_ihevc_trans_32_31_1215, o3);
1440 int32x2_t val_31 =
1441 vadd_s32(vget_low_s32(a[31]), vget_high_s32(a[31]));
1442 val_29 = vpadd_s32(val_29, val_31);
1443
1444 int16x4_t val__25 =
1445 vrshrn_n_s32(vcombine_s32(val_25, val_29), 15); //q9 q12
1446
1447 vst1_lane_s16(pi2_dst + 25 * dst_strd, val__25, 0); /*Value 25*/
1448 vst1_lane_s16(pi2_dst + 27 * dst_strd, val__25, 1); /*Value 27*/
1449 vst1_lane_s16(pi2_dst + 29 * dst_strd, val__25, 2); /*Value 29*/
1450 vst1_lane_s16(pi2_dst + 31 * dst_strd, val__25, 3); /*Value 31*/
1451
1452 pi2_dst++;
1453 }
1454 }
1455 return u4_blk_sad;
1456 }
1457