26 #define VP9_DCT_CONST_BITS 14 27 #define ROUND_POWER_OF_TWO(value, n) (((value) + (1 << ((n) - 1))) >> (n)) 67 #define VP9_DOTP_CONST_PAIR(reg0, reg1, cnst0, cnst1, out0, out1) \ 69 v8i16 k0_m = __msa_fill_h(cnst0); \ 70 v4i32 s0_m, s1_m, s2_m, s3_m; \ 72 s0_m = (v4i32) __msa_fill_h(cnst1); \ 73 k0_m = __msa_ilvev_h((v8i16) s0_m, k0_m); \ 75 ILVRL_H2_SW((-reg1), reg0, s1_m, s0_m); \ 76 ILVRL_H2_SW(reg0, reg1, s3_m, s2_m); \ 77 DOTP_SH2_SW(s1_m, s0_m, k0_m, k0_m, s1_m, s0_m); \ 78 SRARI_W2_SW(s1_m, s0_m, VP9_DCT_CONST_BITS); \ 79 out0 = __msa_pckev_h((v8i16) s0_m, (v8i16) s1_m); \ 81 DOTP_SH2_SW(s3_m, s2_m, k0_m, k0_m, s1_m, s0_m); \ 82 SRARI_W2_SW(s1_m, s0_m, VP9_DCT_CONST_BITS); \ 83 out1 = __msa_pckev_h((v8i16) s0_m, (v8i16) s1_m); \ 86 #define VP9_DOT_ADD_SUB_SRARI_PCK(in0, in1, in2, in3, in4, in5, in6, in7, \ 87 dst0, dst1, dst2, dst3) \ 89 v4i32 tp0_m, tp1_m, tp2_m, tp3_m, tp4_m; \ 90 v4i32 tp5_m, tp6_m, tp7_m, tp8_m, tp9_m; \ 92 DOTP_SH4_SW(in0, in1, in0, in1, in4, in4, in5, in5, \ 93 tp0_m, tp2_m, tp3_m, tp4_m); \ 94 DOTP_SH4_SW(in2, in3, in2, in3, in6, in6, in7, in7, \ 95 tp5_m, tp6_m, tp7_m, tp8_m); \ 96 BUTTERFLY_4(tp0_m, tp3_m, tp7_m, tp5_m, tp1_m, tp9_m, tp7_m, tp5_m); \ 97 BUTTERFLY_4(tp2_m, tp4_m, tp8_m, tp6_m, tp3_m, tp0_m, tp4_m, tp2_m); \ 98 SRARI_W4_SW(tp1_m, tp9_m, tp7_m, tp5_m, VP9_DCT_CONST_BITS); \ 99 SRARI_W4_SW(tp3_m, tp0_m, tp4_m, tp2_m, VP9_DCT_CONST_BITS); \ 100 PCKEV_H4_SH(tp1_m, tp3_m, tp9_m, tp0_m, tp7_m, tp4_m, tp5_m, tp2_m, \ 101 dst0, dst1, dst2, dst3); \ 104 #define VP9_DOT_SHIFT_RIGHT_PCK_H(in0, in1, in2) \ 107 v4i32 tp0_m, tp1_m; \ 109 DOTP_SH2_SW(in0, in1, in2, in2, tp1_m, tp0_m); \ 110 SRARI_W2_SW(tp1_m, tp0_m, VP9_DCT_CONST_BITS); \ 111 dst_m = __msa_pckev_h((v8i16) tp1_m, (v8i16) tp0_m); \ 116 #define VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, \ 117 out0, out1, out2, out3, out4, out5, out6, out7) \ 119 v8i16 cnst0_m, cnst1_m, cnst2_m, cnst3_m, cnst4_m; \ 120 v8i16 vec0_m, vec1_m, vec2_m, vec3_m, s0_m, s1_m; \ 121 v8i16 coeff0_m = { cospi_2_64, cospi_6_64, cospi_10_64, cospi_14_64, \ 122 cospi_18_64, cospi_22_64, cospi_26_64, cospi_30_64 }; \ 123 v8i16 coeff1_m = { cospi_8_64, -cospi_8_64, cospi_16_64, \ 124 -cospi_16_64, cospi_24_64, -cospi_24_64, 0, 0 }; \ 126 SPLATI_H2_SH(coeff0_m, 0, 7, cnst0_m, cnst1_m); \ 127 cnst2_m = -cnst0_m; \ 128 ILVEV_H2_SH(cnst0_m, cnst1_m, cnst1_m, cnst2_m, cnst0_m, cnst1_m); \ 129 SPLATI_H2_SH(coeff0_m, 4, 3, cnst2_m, cnst3_m); \ 130 cnst4_m = -cnst2_m; \ 131 ILVEV_H2_SH(cnst2_m, cnst3_m, cnst3_m, cnst4_m, cnst2_m, cnst3_m); \ 133 ILVRL_H2_SH(in0, in7, vec1_m, vec0_m); \ 134 ILVRL_H2_SH(in4, in3, vec3_m, vec2_m); \ 135 VP9_DOT_ADD_SUB_SRARI_PCK(vec0_m, vec1_m, vec2_m, vec3_m, cnst0_m, \ 136 cnst1_m, cnst2_m, cnst3_m, in7, in0, \ 139 SPLATI_H2_SH(coeff0_m, 2, 5, cnst0_m, cnst1_m); \ 140 cnst2_m = -cnst0_m; \ 141 ILVEV_H2_SH(cnst0_m, cnst1_m, cnst1_m, cnst2_m, cnst0_m, cnst1_m); \ 142 SPLATI_H2_SH(coeff0_m, 6, 1, cnst2_m, cnst3_m); \ 143 cnst4_m = -cnst2_m; \ 144 ILVEV_H2_SH(cnst2_m, cnst3_m, cnst3_m, cnst4_m, cnst2_m, cnst3_m); \ 146 ILVRL_H2_SH(in2, in5, vec1_m, vec0_m); \ 147 ILVRL_H2_SH(in6, in1, vec3_m, vec2_m); \ 149 VP9_DOT_ADD_SUB_SRARI_PCK(vec0_m, vec1_m, vec2_m, vec3_m, cnst0_m, \ 150 cnst1_m, cnst2_m, cnst3_m, in5, in2, \ 152 BUTTERFLY_4(in7, in0, in2, in5, s1_m, s0_m, in2, in5); \ 156 SPLATI_H4_SH(coeff1_m, 0, 4, 1, 5, \ 157 cnst0_m, cnst1_m, cnst2_m, cnst3_m); \ 159 ILVEV_H2_SH(cnst3_m, cnst0_m, cnst1_m, cnst2_m, cnst3_m, cnst2_m); \ 160 cnst0_m = __msa_ilvev_h(cnst1_m, cnst0_m); \ 163 ILVRL_H2_SH(in4, in3, vec1_m, vec0_m); \ 164 ILVRL_H2_SH(in6, in1, vec3_m, vec2_m); \ 165 VP9_DOT_ADD_SUB_SRARI_PCK(vec0_m, vec1_m, vec2_m, vec3_m, cnst0_m, \ 166 cnst2_m, cnst3_m, cnst1_m, out1, out6, \ 169 SPLATI_H2_SH(coeff1_m, 2, 3, cnst0_m, cnst1_m); \ 170 cnst1_m = __msa_ilvev_h(cnst1_m, cnst0_m); \ 172 ILVRL_H2_SH(in2, in5, vec1_m, vec0_m); \ 173 ILVRL_H2_SH(s0_m, s1_m, vec3_m, vec2_m); \ 174 out3 = VP9_DOT_SHIFT_RIGHT_PCK_H(vec0_m, vec1_m, cnst0_m); \ 175 out4 = VP9_DOT_SHIFT_RIGHT_PCK_H(vec0_m, vec1_m, cnst1_m); \ 176 out2 = VP9_DOT_SHIFT_RIGHT_PCK_H(vec2_m, vec3_m, cnst0_m); \ 177 out5 = VP9_DOT_SHIFT_RIGHT_PCK_H(vec2_m, vec3_m, cnst1_m); \ 184 #define VP9_MADD_SHORT(m0, m1, c0, c1, res0, res1) \ 186 v4i32 madd0_m, madd1_m, madd2_m, madd3_m; \ 187 v8i16 madd_s0_m, madd_s1_m; \ 189 ILVRL_H2_SH(m1, m0, madd_s0_m, madd_s1_m); \ 190 DOTP_SH4_SW(madd_s0_m, madd_s1_m, madd_s0_m, madd_s1_m, \ 191 c0, c0, c1, c1, madd0_m, madd1_m, madd2_m, madd3_m); \ 192 SRARI_W4_SW(madd0_m, madd1_m, madd2_m, madd3_m, VP9_DCT_CONST_BITS); \ 193 PCKEV_H2_SH(madd1_m, madd0_m, madd3_m, madd2_m, res0, res1); \ 196 #define VP9_MADD_BF(inp0, inp1, inp2, inp3, cst0, cst1, cst2, cst3, \ 197 out0, out1, out2, out3) \ 199 v8i16 madd_s0_m, madd_s1_m, madd_s2_m, madd_s3_m; \ 200 v4i32 tmp0_m, tmp1_m, tmp2_m, tmp3_m, m4_m, m5_m; \ 202 ILVRL_H2_SH(inp1, inp0, madd_s0_m, madd_s1_m); \ 203 ILVRL_H2_SH(inp3, inp2, madd_s2_m, madd_s3_m); \ 204 DOTP_SH4_SW(madd_s0_m, madd_s1_m, madd_s2_m, madd_s3_m, \ 205 cst0, cst0, cst2, cst2, tmp0_m, tmp1_m, tmp2_m, tmp3_m); \ 206 BUTTERFLY_4(tmp0_m, tmp1_m, tmp3_m, tmp2_m, \ 207 m4_m, m5_m, tmp3_m, tmp2_m); \ 208 SRARI_W4_SW(m4_m, m5_m, tmp2_m, tmp3_m, VP9_DCT_CONST_BITS); \ 209 PCKEV_H2_SH(m5_m, m4_m, tmp3_m, tmp2_m, out0, out1); \ 210 DOTP_SH4_SW(madd_s0_m, madd_s1_m, madd_s2_m, madd_s3_m, \ 211 cst1, cst1, cst3, cst3, tmp0_m, tmp1_m, tmp2_m, tmp3_m); \ 212 BUTTERFLY_4(tmp0_m, tmp1_m, tmp3_m, tmp2_m, \ 213 m4_m, m5_m, tmp3_m, tmp2_m); \ 214 SRARI_W4_SW(m4_m, m5_m, tmp2_m, tmp3_m, VP9_DCT_CONST_BITS); \ 215 PCKEV_H2_SH(m5_m, m4_m, tmp3_m, tmp2_m, out2, out3); \ 218 #define VP9_SET_COSPI_PAIR(c0_h, c1_h) \ 220 v8i16 out0_m, r0_m, r1_m; \ 222 r0_m = __msa_fill_h(c0_h); \ 223 r1_m = __msa_fill_h(c1_h); \ 224 out0_m = __msa_ilvev_h(r1_m, r0_m); \ 229 #define VP9_ADDBLK_ST8x4_UB(dst, dst_stride, in0, in1, in2, in3) \ 231 uint8_t *dst_m = (uint8_t *) (dst); \ 232 v16u8 dst0_m, dst1_m, dst2_m, dst3_m; \ 233 v16i8 tmp0_m, tmp1_m; \ 234 v16i8 zero_m = { 0 }; \ 235 v8i16 res0_m, res1_m, res2_m, res3_m; \ 237 LD_UB4(dst_m, dst_stride, dst0_m, dst1_m, dst2_m, dst3_m); \ 238 ILVR_B4_SH(zero_m, dst0_m, zero_m, dst1_m, zero_m, dst2_m, \ 239 zero_m, dst3_m, res0_m, res1_m, res2_m, res3_m); \ 240 ADD4(res0_m, in0, res1_m, in1, res2_m, in2, res3_m, in3, \ 241 res0_m, res1_m, res2_m, res3_m); \ 242 CLIP_SH4_0_255(res0_m, res1_m, res2_m, res3_m); \ 243 PCKEV_B2_SB(res1_m, res0_m, res3_m, res2_m, tmp0_m, tmp1_m); \ 244 ST_D4(tmp0_m, tmp1_m, 0, 1, 0, 1, dst_m, dst_stride); \ 247 #define VP9_IDCT4x4(in0, in1, in2, in3, out0, out1, out2, out3) \ 249 v8i16 c0_m, c1_m, c2_m, c3_m; \ 250 v8i16 step0_m, step1_m; \ 251 v4i32 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ 252 v16i8 zeros = { 0 }; \ 254 c0_m = VP9_SET_COSPI_PAIR(cospi_16_64, cospi_16_64); \ 255 c1_m = VP9_SET_COSPI_PAIR(cospi_16_64, -cospi_16_64); \ 256 step0_m = __msa_ilvr_h(in2, in0); \ 257 DOTP_SH2_SW(step0_m, step0_m, c0_m, c1_m, tmp0_m, tmp1_m); \ 259 c2_m = VP9_SET_COSPI_PAIR(cospi_24_64, -cospi_8_64); \ 260 c3_m = VP9_SET_COSPI_PAIR(cospi_8_64, cospi_24_64); \ 261 step1_m = __msa_ilvr_h(in3, in1); \ 262 DOTP_SH2_SW(step1_m, step1_m, c2_m, c3_m, tmp2_m, tmp3_m); \ 263 SRARI_W4_SW(tmp0_m, tmp1_m, tmp2_m, tmp3_m, VP9_DCT_CONST_BITS); \ 265 PCKEV_H2_SW(tmp1_m, tmp0_m, tmp3_m, tmp2_m, tmp0_m, tmp2_m); \ 266 SLDI_B2_SW(zeros, tmp0_m, zeros, tmp2_m, 8, tmp1_m, tmp3_m); \ 267 BUTTERFLY_4((v8i16) tmp0_m, (v8i16) tmp1_m, \ 268 (v8i16) tmp2_m, (v8i16) tmp3_m, \ 269 out0, out1, out2, out3); \ 272 #define VP9_IADST4x4(in0, in1, in2, in3, out0, out1, out2, out3) \ 274 v8i16 res0_m, res1_m, c0_m, c1_m; \ 275 v8i16 k1_m, k2_m, k3_m, k4_m; \ 276 v8i16 zero_m = { 0 }; \ 277 v4i32 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ 278 v4i32 int0_m, int1_m, int2_m, int3_m; \ 279 v8i16 mask_m = { sinpi_1_9, sinpi_2_9, sinpi_3_9, \ 280 sinpi_4_9, -sinpi_1_9, -sinpi_2_9, -sinpi_3_9, \ 283 SPLATI_H4_SH(mask_m, 3, 0, 1, 2, c0_m, c1_m, k1_m, k2_m); \ 284 ILVEV_H2_SH(c0_m, c1_m, k1_m, k2_m, c0_m, c1_m); \ 285 ILVR_H2_SH(in0, in2, in1, in3, res0_m, res1_m); \ 286 DOTP_SH2_SW(res0_m, res1_m, c0_m, c1_m, tmp2_m, tmp1_m); \ 287 int0_m = tmp2_m + tmp1_m; \ 289 SPLATI_H2_SH(mask_m, 4, 7, k4_m, k3_m); \ 290 ILVEV_H2_SH(k4_m, k1_m, k3_m, k2_m, c0_m, c1_m); \ 291 DOTP_SH2_SW(res0_m, res1_m, c0_m, c1_m, tmp0_m, tmp1_m); \ 292 int1_m = tmp0_m + tmp1_m; \ 294 c0_m = __msa_splati_h(mask_m, 6); \ 295 ILVL_H2_SH(k2_m, c0_m, zero_m, k2_m, c0_m, c1_m); \ 296 ILVR_H2_SH(in0, in2, in1, in3, res0_m, res1_m); \ 297 DOTP_SH2_SW(res0_m, res1_m, c0_m, c1_m, tmp0_m, tmp1_m); \ 298 int2_m = tmp0_m + tmp1_m; \ 300 c0_m = __msa_splati_h(mask_m, 6); \ 301 c0_m = __msa_ilvev_h(c0_m, k1_m); \ 303 res0_m = __msa_ilvr_h((in1), (in3)); \ 304 tmp0_m = __msa_dotp_s_w(res0_m, c0_m); \ 305 int3_m = tmp2_m + tmp0_m; \ 307 res0_m = __msa_ilvr_h((in2), (in3)); \ 308 c1_m = __msa_ilvev_h(k4_m, k3_m); \ 310 tmp2_m = __msa_dotp_s_w(res0_m, c1_m); \ 311 res1_m = __msa_ilvr_h((in0), (in2)); \ 312 c1_m = __msa_ilvev_h(k1_m, zero_m); \ 314 tmp3_m = __msa_dotp_s_w(res1_m, c1_m); \ 318 SRARI_W4_SW(int0_m, int1_m, int2_m, int3_m, VP9_DCT_CONST_BITS); \ 319 PCKEV_H2_SH(int0_m, int0_m, int1_m, int1_m, out0, out1); \ 320 PCKEV_H2_SH(int2_m, int2_m, int3_m, int3_m, out2, out3); \ 323 #define TRANSPOSE4X8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, \ 324 out0, out1, out2, out3, out4, out5, out6, out7) \ 326 v8i16 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ 327 v8i16 tmp0_n, tmp1_n, tmp2_n, tmp3_n; \ 328 v8i16 zero_m = { 0 }; \ 330 ILVR_H4_SH(in1, in0, in3, in2, in5, in4, in7, in6, \ 331 tmp0_n, tmp1_n, tmp2_n, tmp3_n); \ 332 ILVRL_W2_SH(tmp1_n, tmp0_n, tmp0_m, tmp2_m); \ 333 ILVRL_W2_SH(tmp3_n, tmp2_n, tmp1_m, tmp3_m); \ 335 out0 = (v8i16) __msa_ilvr_d((v2i64) tmp1_m, (v2i64) tmp0_m); \ 336 out1 = (v8i16) __msa_ilvl_d((v2i64) tmp1_m, (v2i64) tmp0_m); \ 337 out2 = (v8i16) __msa_ilvr_d((v2i64) tmp3_m, (v2i64) tmp2_m); \ 338 out3 = (v8i16) __msa_ilvl_d((v2i64) tmp3_m, (v2i64) tmp2_m); \ 355 vec = __msa_fill_h(out);
364 v8i16 in0, in1, in2, in3;
369 in2 =
LD_SH(input + 8);
370 in1 = (v8i16) __msa_ilvl_d((v2i64) in0, (v2i64) in0);
371 in3 = (v8i16) __msa_ilvl_d((v2i64) in2, (v2i64) in2);
372 ST_SH2(zero, zero, input, 8);
374 VP9_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
377 VP9_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
386 v8i16 in0, in1, in2, in3;
391 in2 =
LD_SH(input + 8);
392 in1 = (v8i16) __msa_ilvl_d((v2i64) in0, (v2i64) in0);
393 in3 = (v8i16) __msa_ilvl_d((v2i64) in2, (v2i64) in2);
394 ST_SH2(zero, zero, input, 8);
408 v8i16 in0, in1, in2, in3;
413 in2 =
LD_SH(input + 8);
414 in1 = (v8i16) __msa_ilvl_d((v2i64) in0, (v2i64) in0);
415 in3 = (v8i16) __msa_ilvl_d((v2i64) in2, (v2i64) in2);
416 ST_SH2(zero, zero, input, 8);
421 VP9_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
430 v8i16 in0, in1, in2, in3;
435 in2 =
LD_SH(input + 8);
436 in1 = (v8i16) __msa_ilvl_d((v2i64) in0, (v2i64) in0);
437 in3 = (v8i16) __msa_ilvl_d((v2i64) in2, (v2i64) in2);
438 ST_SH2(zero, zero, input, 8);
440 VP9_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
449 #define VP9_SET_CONST_PAIR(mask_h, idx1_h, idx2_h) \ 453 SPLATI_H2_SH(mask_h, idx1_h, idx2_h, c0_m, c1_m); \ 454 c0_m = __msa_ilvev_h(c1_m, c0_m); \ 460 #define VP9_MADD(inp0, inp1, inp2, inp3, cst0, cst1, cst2, cst3, \ 461 out0, out1, out2, out3) \ 463 v8i16 madd_s0_m, madd_s1_m, madd_s2_m, madd_s3_m; \ 464 v4i32 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ 466 ILVRL_H2_SH(inp1, inp0, madd_s1_m, madd_s0_m); \ 467 ILVRL_H2_SH(inp3, inp2, madd_s3_m, madd_s2_m); \ 468 DOTP_SH4_SW(madd_s1_m, madd_s0_m, madd_s1_m, madd_s0_m, \ 469 cst0, cst0, cst1, cst1, tmp0_m, tmp1_m, tmp2_m, tmp3_m); \ 470 SRARI_W4_SW(tmp0_m, tmp1_m, tmp2_m, tmp3_m, VP9_DCT_CONST_BITS); \ 471 PCKEV_H2_SH(tmp1_m, tmp0_m, tmp3_m, tmp2_m, out0, out1); \ 472 DOTP_SH4_SW(madd_s3_m, madd_s2_m, madd_s3_m, madd_s2_m, \ 473 cst2, cst2, cst3, cst3, tmp0_m, tmp1_m, tmp2_m, tmp3_m); \ 474 SRARI_W4_SW(tmp0_m, tmp1_m, tmp2_m, tmp3_m, VP9_DCT_CONST_BITS); \ 475 PCKEV_H2_SH(tmp1_m, tmp0_m, tmp3_m, tmp2_m, out2, out3); \ 479 #define VP9_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, \ 480 out0, out1, out2, out3, out4, out5, out6, out7) \ 482 v8i16 tp0_m, tp1_m, tp2_m, tp3_m, tp4_m, tp5_m, tp6_m, tp7_m; \ 483 v8i16 k0_m, k1_m, k2_m, k3_m, res0_m, res1_m, res2_m, res3_m; \ 484 v4i32 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ 485 v8i16 mask_m = { cospi_28_64, cospi_4_64, cospi_20_64, cospi_12_64, \ 486 cospi_16_64, -cospi_4_64, -cospi_20_64, -cospi_16_64 }; \ 488 k0_m = VP9_SET_CONST_PAIR(mask_m, 0, 5); \ 489 k1_m = VP9_SET_CONST_PAIR(mask_m, 1, 0); \ 490 k2_m = VP9_SET_CONST_PAIR(mask_m, 6, 3); \ 491 k3_m = VP9_SET_CONST_PAIR(mask_m, 3, 2); \ 492 VP9_MADD(in1, in7, in3, in5, k0_m, k1_m, k2_m, k3_m, in1, in7, in3, in5); \ 493 SUB2(in1, in3, in7, in5, res0_m, res1_m); \ 494 k0_m = VP9_SET_CONST_PAIR(mask_m, 4, 7); \ 495 k1_m = __msa_splati_h(mask_m, 4); \ 497 ILVRL_H2_SH(res0_m, res1_m, res2_m, res3_m); \ 498 DOTP_SH4_SW(res2_m, res3_m, res2_m, res3_m, k0_m, k0_m, k1_m, k1_m, \ 499 tmp0_m, tmp1_m, tmp2_m, tmp3_m); \ 500 SRARI_W4_SW(tmp0_m, tmp1_m, tmp2_m, tmp3_m, VP9_DCT_CONST_BITS); \ 502 PCKEV_H2_SH(tmp1_m, tmp0_m, tmp3_m, tmp2_m, tp5_m, tp6_m); \ 504 k2_m = VP9_SET_COSPI_PAIR(cospi_24_64, -cospi_8_64); \ 505 k3_m = VP9_SET_COSPI_PAIR(cospi_8_64, cospi_24_64); \ 506 VP9_MADD(in0, in4, in2, in6, k1_m, k0_m, k2_m, k3_m, \ 507 in0, in4, in2, in6); \ 508 BUTTERFLY_4(in0, in4, in2, in6, tp0_m, tp1_m, tp2_m, tp3_m); \ 509 BUTTERFLY_8(tp0_m, tp1_m, tp2_m, tp3_m, tp4_m, tp5_m, tp6_m, tp7_m, \ 510 out0, out1, out2, out3, out4, out5, out6, out7); \ 513 #define VP9_IADST8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, \ 514 out0, out1, out2, out3, out4, out5, out6, out7) \ 516 v4i32 r0_m, r1_m, r2_m, r3_m, r4_m, r5_m, r6_m, r7_m; \ 517 v4i32 m0_m, m1_m, m2_m, m3_m, t0_m, t1_m; \ 518 v8i16 res0_m, res1_m, res2_m, res3_m, k0_m, k1_m, in_s0, in_s1; \ 519 v8i16 mask1_m = { cospi_2_64, cospi_30_64, -cospi_2_64, \ 520 cospi_10_64, cospi_22_64, -cospi_10_64, cospi_18_64, cospi_14_64 }; \ 521 v8i16 mask2_m = { cospi_14_64, -cospi_18_64, cospi_26_64, \ 522 cospi_6_64, -cospi_26_64, cospi_8_64, cospi_24_64, -cospi_8_64 }; \ 523 v8i16 mask3_m = { -cospi_24_64, cospi_8_64, cospi_16_64, \ 524 -cospi_16_64, 0, 0, 0, 0 }; \ 526 k0_m = VP9_SET_CONST_PAIR(mask1_m, 0, 1); \ 527 k1_m = VP9_SET_CONST_PAIR(mask1_m, 1, 2); \ 528 ILVRL_H2_SH(in1, in0, in_s1, in_s0); \ 529 DOTP_SH4_SW(in_s1, in_s0, in_s1, in_s0, k0_m, k0_m, k1_m, k1_m, \ 530 r0_m, r1_m, r2_m, r3_m); \ 531 k0_m = VP9_SET_CONST_PAIR(mask1_m, 6, 7); \ 532 k1_m = VP9_SET_CONST_PAIR(mask2_m, 0, 1); \ 533 ILVRL_H2_SH(in5, in4, in_s1, in_s0); \ 534 DOTP_SH4_SW(in_s1, in_s0, in_s1, in_s0, k0_m, k0_m, k1_m, k1_m, \ 535 r4_m, r5_m, r6_m, r7_m); \ 536 ADD4(r0_m, r4_m, r1_m, r5_m, r2_m, r6_m, r3_m, r7_m, \ 537 m0_m, m1_m, m2_m, m3_m); \ 538 SRARI_W4_SW(m0_m, m1_m, m2_m, m3_m, VP9_DCT_CONST_BITS); \ 539 PCKEV_H2_SH(m1_m, m0_m, m3_m, m2_m, res0_m, res1_m); \ 540 SUB4(r0_m, r4_m, r1_m, r5_m, r2_m, r6_m, r3_m, r7_m, \ 541 m0_m, m1_m, m2_m, m3_m); \ 542 SRARI_W4_SW(m0_m, m1_m, m2_m, m3_m, VP9_DCT_CONST_BITS); \ 543 PCKEV_H2_SW(m1_m, m0_m, m3_m, m2_m, t0_m, t1_m); \ 544 k0_m = VP9_SET_CONST_PAIR(mask1_m, 3, 4); \ 545 k1_m = VP9_SET_CONST_PAIR(mask1_m, 4, 5); \ 546 ILVRL_H2_SH(in3, in2, in_s1, in_s0); \ 547 DOTP_SH4_SW(in_s1, in_s0, in_s1, in_s0, k0_m, k0_m, k1_m, k1_m, \ 548 r0_m, r1_m, r2_m, r3_m); \ 549 k0_m = VP9_SET_CONST_PAIR(mask2_m, 2, 3); \ 550 k1_m = VP9_SET_CONST_PAIR(mask2_m, 3, 4); \ 551 ILVRL_H2_SH(in7, in6, in_s1, in_s0); \ 552 DOTP_SH4_SW(in_s1, in_s0, in_s1, in_s0, k0_m, k0_m, k1_m, k1_m, \ 553 r4_m, r5_m, r6_m, r7_m); \ 554 ADD4(r0_m, r4_m, r1_m, r5_m, r2_m, r6_m, r3_m, r7_m, \ 555 m0_m, m1_m, m2_m, m3_m); \ 556 SRARI_W4_SW(m0_m, m1_m, m2_m, m3_m, VP9_DCT_CONST_BITS); \ 557 PCKEV_H2_SH(m1_m, m0_m, m3_m, m2_m, res2_m, res3_m); \ 558 SUB4(r0_m, r4_m, r1_m, r5_m, r2_m, r6_m, r3_m, r7_m, \ 559 m0_m, m1_m, m2_m, m3_m); \ 560 SRARI_W4_SW(m0_m, m1_m, m2_m, m3_m, VP9_DCT_CONST_BITS); \ 561 PCKEV_H2_SW(m1_m, m0_m, m3_m, m2_m, r2_m, r3_m); \ 562 ILVRL_H2_SW(r3_m, r2_m, m2_m, m3_m); \ 563 BUTTERFLY_4(res0_m, res1_m, res3_m, res2_m, out0, in7, in4, in3); \ 564 k0_m = VP9_SET_CONST_PAIR(mask2_m, 5, 6); \ 565 k1_m = VP9_SET_CONST_PAIR(mask2_m, 6, 7); \ 566 ILVRL_H2_SH(t1_m, t0_m, in_s1, in_s0); \ 567 DOTP_SH4_SW(in_s1, in_s0, in_s1, in_s0, k0_m, k0_m, k1_m, k1_m, \ 568 r0_m, r1_m, r2_m, r3_m); \ 569 k1_m = VP9_SET_CONST_PAIR(mask3_m, 0, 1); \ 570 DOTP_SH4_SW(m2_m, m3_m, m2_m, m3_m, k0_m, k0_m, k1_m, k1_m, \ 571 r4_m, r5_m, r6_m, r7_m); \ 572 ADD4(r0_m, r6_m, r1_m, r7_m, r2_m, r4_m, r3_m, r5_m, \ 573 m0_m, m1_m, m2_m, m3_m); \ 574 SRARI_W4_SW(m0_m, m1_m, m2_m, m3_m, VP9_DCT_CONST_BITS); \ 575 PCKEV_H2_SH(m1_m, m0_m, m3_m, m2_m, in1, out6); \ 576 SUB4(r0_m, r6_m, r1_m, r7_m, r2_m, r4_m, r3_m, r5_m, \ 577 m0_m, m1_m, m2_m, m3_m); \ 578 SRARI_W4_SW(m0_m, m1_m, m2_m, m3_m, VP9_DCT_CONST_BITS); \ 579 PCKEV_H2_SH(m1_m, m0_m, m3_m, m2_m, in2, in5); \ 580 k0_m = VP9_SET_CONST_PAIR(mask3_m, 2, 2); \ 581 k1_m = VP9_SET_CONST_PAIR(mask3_m, 2, 3); \ 582 ILVRL_H2_SH(in4, in3, in_s1, in_s0); \ 583 DOTP_SH4_SW(in_s1, in_s0, in_s1, in_s0, k0_m, k0_m, k1_m, k1_m, \ 584 m0_m, m1_m, m2_m, m3_m); \ 585 SRARI_W4_SW(m0_m, m1_m, m2_m, m3_m, VP9_DCT_CONST_BITS); \ 586 PCKEV_H2_SH(m1_m, m0_m, m3_m, m2_m, in3, out4); \ 587 ILVRL_H2_SW(in5, in2, m2_m, m3_m); \ 588 DOTP_SH4_SW(m2_m, m3_m, m2_m, m3_m, k0_m, k0_m, k1_m, k1_m, \ 589 m0_m, m1_m, m2_m, m3_m); \ 590 SRARI_W4_SW(m0_m, m1_m, m2_m, m3_m, VP9_DCT_CONST_BITS); \ 591 PCKEV_H2_SH(m1_m, m0_m, m3_m, m2_m, out2, in5); \ 609 vec = __msa_fill_h(val);
613 dst += (4 * dst_stride);
620 v8i16 in0, in1, in2, in3, in4, in5, in6, in7;
621 v8i16
s0,
s1,
s2,
s3,
s4,
s5,
s6, s7, k0, k1, k2, k3, m0, m1, m2, m3;
622 v4i32 tmp0, tmp1, tmp2, tmp3;
626 LD_SH8(input, 8, in0, in1, in2, in3, in4, in5, in6, in7);
627 ST_SH8(zero, zero, zero, zero, zero, zero, zero, zero, input, 8);
637 DOTP_SH4_SW(s0, s0, s1, s1, k0, k1, k2, k3, tmp0, tmp1, tmp2, tmp3);
649 DOTP_SH4_SW(s0, s0, s1, s1, k0, k1, k2, k3, tmp0, tmp1, tmp2, tmp3);
656 s0 = __msa_ilvr_h(s6, s5);
665 in0, in1, in2, in3, in4, in5, in6, in7);
667 in0, in1, in2, in3, in4, in5, in6, in7);
669 in0, in1, in2, in3, in4, in5, in6, in7);
677 dst += (4 * dst_stride);
684 v8i16 in0, in1, in2, in3, in4, in5, in6, in7;
688 LD_SH8(input, 8, in0, in1, in2, in3, in4, in5, in6, in7);
689 ST_SH8(zero, zero, zero, zero, zero, zero, zero, zero, input, 8);
692 in0, in1, in2, in3, in4, in5, in6, in7);
695 in0, in1, in2, in3, in4, in5, in6, in7);
698 in0, in1, in2, in3, in4, in5, in6, in7);
704 dst += (4 * dst_stride);
711 v8i16 in0, in1, in2, in3, in4, in5, in6, in7;
712 v8i16 res0, res1, res2, res3, res4, res5, res6, res7;
713 v16u8 dst0, dst1, dst2, dst3, dst4, dst5, dst6, dst7;
714 v8i16 out0, out1, out2, out3, out4, out5, out6, out7;
715 v8i16 cnst0, cnst1, cnst2, cnst3, cnst4;
716 v8i16 temp0, temp1, temp2, temp3,
s0,
s1;
720 LD_SH8(input, 8, in0, in1, in2, in3, in4, in5, in6, in7);
721 ST_SH8(zero, zero, zero, zero, zero, zero, zero, zero, input, 8);
724 VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7,
725 in0, in1, in2, in3, in4, in5, in6, in7);
729 in0, in1, in2, in3, in4, in5, in6, in7);
734 ILVEV_H2_SH(cnst0, cnst1, cnst1, cnst2, cnst0, cnst1);
738 ILVEV_H2_SH(cnst2, cnst3, cnst3, cnst4, cnst2, cnst3);
743 cnst3, in7, in0, in4, in3);
748 ILVEV_H2_SH(cnst0, cnst1, cnst1, cnst2, cnst0, cnst1);
752 ILVEV_H2_SH(cnst2, cnst3, cnst3, cnst4, cnst2, cnst3);
757 cnst3, in5, in2, in6, in1);
762 dst0 =
LD_UB(dst + 0 * dst_stride);
763 dst7 =
LD_UB(dst + 7 * dst_stride);
765 res0 = (v8i16) __msa_ilvr_b((v16i8)
zero, (v16i8) dst0);
768 res0 = (v8i16) __msa_pckev_b((v16i8) res0, (v16i8) res0);
771 res7 = (v8i16) __msa_ilvr_b((v16i8)
zero, (v16i8) dst7);
774 res7 = (v8i16) __msa_pckev_b((v16i8) res7, (v16i8) res7);
775 ST_D1(res7, 0, dst + 7 * dst_stride);
782 ILVEV_H2_SH(cnst3, cnst0, cnst1, cnst2, cnst3, cnst2);
783 cnst0 = __msa_ilvev_h(cnst1, cnst0);
789 cnst1, out1, out6, s0, s1);
792 dst1 =
LD_UB(dst + 1 * dst_stride);
793 dst6 =
LD_UB(dst + 6 * dst_stride);
794 ILVR_B2_SH(zero, dst1, zero, dst6, res1, res6);
795 ADD2(res1, out1, res6, out6, res1, res6);
798 ST_D1(res1, 0, dst + dst_stride);
799 ST_D1(res6, 0, dst + 6 * dst_stride);
803 cnst1 = __msa_ilvev_h(cnst1, cnst0);
811 dst3 =
LD_UB(dst + 3 * dst_stride);
812 dst4 =
LD_UB(dst + 4 * dst_stride);
813 ILVR_B2_SH(zero, dst3, zero, dst4, res3, res4);
814 ADD2(res3, out3, res4, out4, res3, res4);
817 ST_D1(res3, 0, dst + 3 * dst_stride);
818 ST_D1(res4, 0, dst + 4 * dst_stride);
824 dst2 =
LD_UB(dst + 2 * dst_stride);
825 dst5 =
LD_UB(dst + 5 * dst_stride);
826 ILVR_B2_SH(zero, dst2, zero, dst5, res2, res5);
827 ADD2(res2, out2, res5, out5, res2, res5);
830 ST_D1(res2, 0, dst + 2 * dst_stride);
831 ST_D1(res5, 0, dst + 5 * dst_stride);
837 v8i16 in0, in1, in2, in3, in4, in5, in6, in7;
841 LD_SH8(input, 8, in1, in6, in3, in4, in5, in2, in7, in0);
842 ST_SH8(zero, zero, zero, zero, zero, zero, zero, zero, input, 8);
845 in0, in1, in2, in3, in4, in5, in6, in7);
848 in0, in1, in2, in3, in4, in5, in6, in7);
851 in0, in1, in2, in3, in4, in5, in6, in7);
857 dst += (4 * dst_stride);
864 v8i16 in0, in1, in2, in3, in4, in5, in6, in7;
868 LD_SH8(input, 8, in0, in1, in2, in3, in4, in5, in6, in7);
869 ST_SH8(zero, zero, zero, zero, zero, zero, zero, zero, input, 8);
873 in0, in1, in2, in3, in4, in5, in6, in7);
876 in1, in6, in3, in4, in5, in2, in7, in0);
879 in0, in1, in2, in3, in4, in5, in6, in7);
885 dst += (4 * dst_stride);
889 #define VP9_IADST8x16_1D(r0, r1, r2, r3, r4, r5, r6, r7, r8, \ 890 r9, r10, r11, r12, r13, r14, r15, \ 891 out0, out1, out2, out3, out4, out5, \ 892 out6, out7, out8, out9, out10, out11, \ 893 out12, out13, out14, out15) \ 895 v8i16 g0_m, g1_m, g2_m, g3_m, g4_m, g5_m, g6_m, g7_m; \ 896 v8i16 g8_m, g9_m, g10_m, g11_m, g12_m, g13_m, g14_m, g15_m; \ 897 v8i16 h0_m, h1_m, h2_m, h3_m, h4_m, h5_m, h6_m, h7_m; \ 898 v8i16 h8_m, h9_m, h10_m, h11_m; \ 899 v8i16 k0_m, k1_m, k2_m, k3_m; \ 902 k0_m = VP9_SET_COSPI_PAIR(cospi_1_64, cospi_31_64); \ 903 k1_m = VP9_SET_COSPI_PAIR(cospi_31_64, -cospi_1_64); \ 904 k2_m = VP9_SET_COSPI_PAIR(cospi_17_64, cospi_15_64); \ 905 k3_m = VP9_SET_COSPI_PAIR(cospi_15_64, -cospi_17_64); \ 906 VP9_MADD_BF(r15, r0, r7, r8, k0_m, k1_m, k2_m, k3_m, \ 907 g0_m, g1_m, g2_m, g3_m); \ 908 k0_m = VP9_SET_COSPI_PAIR(cospi_5_64, cospi_27_64); \ 909 k1_m = VP9_SET_COSPI_PAIR(cospi_27_64, -cospi_5_64); \ 910 k2_m = VP9_SET_COSPI_PAIR(cospi_21_64, cospi_11_64); \ 911 k3_m = VP9_SET_COSPI_PAIR(cospi_11_64, -cospi_21_64); \ 912 VP9_MADD_BF(r13, r2, r5, r10, k0_m, k1_m, k2_m, k3_m, \ 913 g4_m, g5_m, g6_m, g7_m); \ 914 k0_m = VP9_SET_COSPI_PAIR(cospi_9_64, cospi_23_64); \ 915 k1_m = VP9_SET_COSPI_PAIR(cospi_23_64, -cospi_9_64); \ 916 k2_m = VP9_SET_COSPI_PAIR(cospi_25_64, cospi_7_64); \ 917 k3_m = VP9_SET_COSPI_PAIR(cospi_7_64, -cospi_25_64); \ 918 VP9_MADD_BF(r11, r4, r3, r12, k0_m, k1_m, k2_m, k3_m, \ 919 g8_m, g9_m, g10_m, g11_m); \ 920 k0_m = VP9_SET_COSPI_PAIR(cospi_13_64, cospi_19_64); \ 921 k1_m = VP9_SET_COSPI_PAIR(cospi_19_64, -cospi_13_64); \ 922 k2_m = VP9_SET_COSPI_PAIR(cospi_29_64, cospi_3_64); \ 923 k3_m = VP9_SET_COSPI_PAIR(cospi_3_64, -cospi_29_64); \ 924 VP9_MADD_BF(r9, r6, r1, r14, k0_m, k1_m, k2_m, k3_m, \ 925 g12_m, g13_m, g14_m, g15_m); \ 928 k0_m = VP9_SET_COSPI_PAIR(cospi_4_64, cospi_28_64); \ 929 k1_m = VP9_SET_COSPI_PAIR(cospi_28_64, -cospi_4_64); \ 930 k2_m = VP9_SET_COSPI_PAIR(-cospi_28_64, cospi_4_64); \ 931 VP9_MADD_BF(g1_m, g3_m, g9_m, g11_m, k0_m, k1_m, k2_m, k0_m, \ 932 h0_m, h1_m, h2_m, h3_m); \ 933 k0_m = VP9_SET_COSPI_PAIR(cospi_12_64, cospi_20_64); \ 934 k1_m = VP9_SET_COSPI_PAIR(-cospi_20_64, cospi_12_64); \ 935 k2_m = VP9_SET_COSPI_PAIR(cospi_20_64, -cospi_12_64); \ 936 VP9_MADD_BF(g7_m, g5_m, g15_m, g13_m, k0_m, k1_m, k2_m, k0_m, \ 937 h4_m, h5_m, h6_m, h7_m); \ 938 BUTTERFLY_4(h0_m, h2_m, h6_m, h4_m, out8, out9, out11, out10); \ 939 BUTTERFLY_8(g0_m, g2_m, g4_m, g6_m, g14_m, g12_m, g10_m, g8_m, \ 940 h8_m, h9_m, h10_m, h11_m, h6_m, h4_m, h2_m, h0_m); \ 943 BUTTERFLY_4(h8_m, h9_m, h11_m, h10_m, out0, out1, h11_m, h10_m); \ 944 k0_m = VP9_SET_COSPI_PAIR(cospi_8_64, cospi_24_64); \ 945 k1_m = VP9_SET_COSPI_PAIR(cospi_24_64, -cospi_8_64); \ 946 k2_m = VP9_SET_COSPI_PAIR(-cospi_24_64, cospi_8_64); \ 947 VP9_MADD_BF(h0_m, h2_m, h4_m, h6_m, k0_m, k1_m, k2_m, k0_m, \ 948 out4, out6, out5, out7); \ 949 VP9_MADD_BF(h1_m, h3_m, h5_m, h7_m, k0_m, k1_m, k2_m, k0_m, \ 950 out12, out14, out13, out15); \ 953 k0_m = VP9_SET_COSPI_PAIR(cospi_16_64, cospi_16_64); \ 954 k1_m = VP9_SET_COSPI_PAIR(-cospi_16_64, -cospi_16_64); \ 955 k2_m = VP9_SET_COSPI_PAIR(cospi_16_64, -cospi_16_64); \ 956 k3_m = VP9_SET_COSPI_PAIR(-cospi_16_64, cospi_16_64); \ 957 VP9_MADD_SHORT(h10_m, h11_m, k1_m, k2_m, out2, out3); \ 958 VP9_MADD_SHORT(out6, out7, k0_m, k3_m, out6, out7); \ 959 VP9_MADD_SHORT(out10, out11, k0_m, k3_m, out10, out11); \ 960 VP9_MADD_SHORT(out14, out15, k1_m, k2_m, out14, out15); \ 966 v8i16 loc0, loc1, loc2, loc3;
967 v8i16 reg0, reg2, reg4, reg6, reg8, reg10, reg12, reg14;
968 v8i16 reg3, reg13, reg11, reg5, reg7, reg9, reg1, reg15;
969 v8i16 tmp5, tmp6, tmp7;
974 reg0, reg1, reg2, reg3, reg4, reg5, reg6, reg7,
975 reg8, reg9, reg10, reg11, reg12, reg13, reg14, reg15);
977 ST_SH8(zero, zero, zero, zero, zero, zero, zero, zero, input, 16);
979 ST_SH8(zero, zero, zero, zero, zero, zero, zero, zero, input, 16);
983 BUTTERFLY_4(reg2, reg14, reg6, reg10, loc0, loc1, reg14, reg2);
987 BUTTERFLY_4(reg8, reg0, reg4, reg12, reg2, reg6, reg10, reg14);
991 reg12 = reg14 - loc0;
992 reg14 = reg14 + loc0;
996 reg10 = reg10 + loc2;
1004 reg7 = reg15 - loc3;
1005 reg15 = reg15 + loc3;
1009 BUTTERFLY_4(loc0, loc1, reg11, reg5, reg13, reg3, reg11, reg5);
1011 loc1 = reg15 + reg3;
1012 reg3 = reg15 - reg3;
1014 reg15 = reg2 - loc1;
1016 loc1 = reg1 + reg13;
1017 reg13 = reg1 - reg13;
1033 loc0 = reg7 + reg11;
1034 reg11 = reg7 - reg11;
1040 BUTTERFLY_4(reg8, reg10, reg11, reg5, loc0, reg4, reg9, loc1);
1046 BUTTERFLY_4(reg12, reg14, reg13, reg3, reg8, reg6, reg7, reg5);
1056 dst += (4 * dst_stride);
1059 dst += (4 * dst_stride);
1062 dst += (4 * dst_stride);
1069 v8i16 loc0, loc1, loc2, loc3;
1070 v8i16 reg0, reg2, reg4, reg6, reg8, reg10, reg12, reg14;
1071 v8i16 reg3, reg13, reg11, reg5, reg7, reg9, reg1, reg15;
1072 v8i16 tmp5, tmp6, tmp7;
1077 reg0, reg1, reg2, reg3, reg4, reg5, reg6, reg7,
1078 reg8, reg9, reg10, reg11, reg12, reg13, reg14, reg15);
1080 ST_SH8(zero, zero, zero, zero, zero, zero, zero, zero, input, 16);
1082 ST_SH8(zero, zero, zero, zero, zero, zero, zero, zero, input, 16);
1086 BUTTERFLY_4(reg2, reg14, reg6, reg10, loc0, loc1, reg14, reg2);
1090 BUTTERFLY_4(reg8, reg0, reg4, reg12, reg2, reg6, reg10, reg14);
1094 reg12 = reg14 - loc0;
1095 reg14 = reg14 + loc0;
1098 reg8 = reg10 - loc2;
1099 reg10 = reg10 + loc2;
1107 reg7 = reg15 - loc3;
1108 reg15 = reg15 + loc3;
1112 BUTTERFLY_4(loc0, loc1, reg11, reg5, reg13, reg3, reg11, reg5);
1114 loc1 = reg15 + reg3;
1115 reg3 = reg15 - reg3;
1117 reg15 = reg2 - loc1;
1119 loc1 = reg1 + reg13;
1120 reg13 = reg1 - reg13;
1136 loc0 = reg7 + reg11;
1137 reg11 = reg7 - reg11;
1144 BUTTERFLY_4(reg8, reg10, reg11, reg5, loc0, reg4, reg9, loc1);
1150 BUTTERFLY_4(reg12, reg14, reg13, reg3, reg8, reg6, reg7, reg5);
1160 reg0, reg2, reg4, reg6, reg8, reg10, reg12, reg14);
1161 ST_SH4(reg0, reg2, reg4, reg6, output, 16);
1162 ST_SH4(reg8, reg10, reg12, reg14, (output + 4 * 16), 16);
1166 reg3, reg13, reg11, reg5, reg7, reg9, reg1, reg15);
1167 ST_SH4(reg3, reg13, reg11, reg5, (output + 8), 16);
1168 ST_SH4(reg7, reg9, reg1, reg15, (output + 8 + 4 * 16), 16);
1176 v8i16 vec, res0, res1, res2, res3, res4, res5, res6, res7;
1177 v16u8 dst0, dst1, dst2, dst3, tmp0, tmp1, tmp2, tmp3;
1184 vec = __msa_fill_h(out);
1187 LD_UB4(dst, dst_stride, dst0, dst1, dst2, dst3);
1192 ADD4(res0, vec, res1, vec, res2, vec, res3, vec, res0, res1, res2,
1194 ADD4(res4, vec, res5, vec, res6, vec, res7, vec, res4, res5, res6,
1197 PCKEV_B4_UB(res4, res0, res5, res1, res6, res2, res7, res3,
1198 tmp0, tmp1, tmp2, tmp3);
1199 ST_UB4(tmp0, tmp1, tmp2, tmp3, dst, dst_stride);
1200 dst += (4 * dst_stride);
1209 int16_t *
out = out_arr;
1216 for (i = 12; i--;) {
1218 "sw $zero, 0(%[out]) \n\t" 1219 "sw $zero, 4(%[out]) \n\t" 1220 "sw $zero, 8(%[out]) \n\t" 1221 "sw $zero, 12(%[out]) \n\t" 1222 "sw $zero, 16(%[out]) \n\t" 1223 "sw $zero, 20(%[out]) \n\t" 1224 "sw $zero, 24(%[out]) \n\t" 1225 "sw $zero, 28(%[out]) \n\t" 1237 for (i = 0; i < 2; i++) {
1249 int16_t *
out = out_arr;
1252 for (i = 0; i < 2; i++) {
1258 for (i = 0; i < 2; i++) {
1267 v8i16 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15;
1268 v8i16 l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15;
1273 l0, l1, l2, l3, l4, l5, l6, l7,
1274 l8, l9, l10, l11, l12, l13, l14, l15);
1276 ST_SH8(zero, zero, zero, zero, zero, zero, zero, zero, input, 16);
1278 ST_SH8(zero, zero, zero, zero, zero, zero, zero, zero, input, 16);
1282 l8, l9, l10, l11, l12, l13, l14, l15,
1283 r0, r1, r2, r3, r4, r5, r6, r7,
1284 r8, r9, r10, r11, r12, r13, r14, r15);
1292 l0, l1, l2, l3, l4, l5, l6, l7);
1293 ST_SH8(l0, l1, l2, l3, l4, l5, l6, l7, output, 16);
1295 l8, l9, l10, l11, l12, l13, l14, l15);
1296 ST_SH8(l8, l9, l10, l11, l12, l13, l14, l15, (output + 8), 16);
1302 v8i16
v0, v2, v4, v6, k0, k1, k2, k3;
1303 v8i16 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15;
1304 v8i16 out0, out1, out2, out3, out4, out5, out6, out7;
1305 v8i16 out8, out9, out10, out11, out12, out13, out14, out15;
1306 v8i16 g0, g1, g2, g3, g4, g5, g6, g7, g8, g9, g10, g11, g12, g13, g14, g15;
1307 v8i16 h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11;
1308 v8i16 res0, res1, res2, res3, res4, res5, res6, res7;
1309 v8i16 res8, res9, res10, res11, res12, res13, res14, res15;
1310 v16u8 dst0, dst1, dst2, dst3, dst4, dst5, dst6, dst7;
1311 v16u8 dst8, dst9, dst10, dst11, dst12, dst13, dst14, dst15;
1314 r0 =
LD_SH(input + 0 * 16);
1315 r3 =
LD_SH(input + 3 * 16);
1316 r4 =
LD_SH(input + 4 * 16);
1317 r7 =
LD_SH(input + 7 * 16);
1318 r8 =
LD_SH(input + 8 * 16);
1319 r11 =
LD_SH(input + 11 * 16);
1320 r12 =
LD_SH(input + 12 * 16);
1321 r15 =
LD_SH(input + 15 * 16);
1328 VP9_MADD_BF(r15, r0, r7, r8, k0, k1, k2, k3, g0, g1, g2, g3);
1333 VP9_MADD_BF(r11, r4, r3, r12, k0, k1, k2, k3, g8, g9, g10, g11);
1338 VP9_MADD_BF(g1, g3, g9, g11, k0, k1, k2, k0, h0, h1, h2, h3);
1340 r1 =
LD_SH(input + 1 * 16);
1341 r2 =
LD_SH(input + 2 * 16);
1342 r5 =
LD_SH(input + 5 * 16);
1343 r6 =
LD_SH(input + 6 * 16);
1344 r9 =
LD_SH(input + 9 * 16);
1345 r10 =
LD_SH(input + 10 * 16);
1346 r13 =
LD_SH(input + 13 * 16);
1347 r14 =
LD_SH(input + 14 * 16);
1353 VP9_MADD_BF(r13, r2, r5, r10, k0, k1, k2, k3, g4, g5, g6, g7);
1358 VP9_MADD_BF(r9, r6, r1, r14, k0, k1, k2, k3, g12, g13, g14, g15);
1360 BUTTERFLY_4(h8, h9, h11, h10, out0, out1, h11, h10);
1363 dst0 =
LD_UB(dst + 0 * dst_stride);
1364 dst1 =
LD_UB(dst + 15 * dst_stride);
1365 ILVR_B2_SH(zero, dst0, zero, dst1, res0, res1);
1366 ADD2(res0, out0, res1, out1, res0, res1);
1369 ST_D1(res0, 0, dst);
1370 ST_D1(res1, 0, dst + 15 * dst_stride);
1375 VP9_MADD_BF(g7, g5, g15, g13, k0, k1, k2, k0, h4, h5, h6, h7);
1376 BUTTERFLY_4(h0, h2, h6, h4, out8, out9, out11, out10);
1380 dst8 =
LD_UB(dst + 1 * dst_stride);
1381 dst9 =
LD_UB(dst + 14 * dst_stride);
1382 ILVR_B2_SH(zero, dst8, zero, dst9, res8, res9);
1383 ADD2(res8, out8, res9, out9, res8, res9);
1386 ST_D1(res8, 0, dst + dst_stride);
1387 ST_D1(res9, 0, dst + 14 * dst_stride);
1392 VP9_MADD_BF(v0, v2, v4, v6, k0, k1, k2, k0, out4, out6, out5, out7);
1395 dst4 =
LD_UB(dst + 3 * dst_stride);
1396 dst5 =
LD_UB(dst + 12 * dst_stride);
1397 ILVR_B2_SH(zero, dst4, zero, dst5, res4, res5);
1398 ADD2(res4, out4, res5, out5, res4, res5);
1401 ST_D1(res4, 0, dst + 3 * dst_stride);
1402 ST_D1(res5, 0, dst + 12 * dst_stride);
1404 VP9_MADD_BF(h1, h3, h5, h7, k0, k1, k2, k0, out12, out14, out13, out15);
1407 dst12 =
LD_UB(dst + 2 * dst_stride);
1408 dst13 =
LD_UB(dst + 13 * dst_stride);
1409 ILVR_B2_SH(zero, dst12, zero, dst13, res12, res13);
1410 ADD2(res12, out12, res13, out13, res12, res13);
1412 PCKEV_B2_SH(res12, res12, res13, res13, res12, res13);
1413 ST_D1(res12, 0, dst + 2 * dst_stride);
1414 ST_D1(res13, 0, dst + 13 * dst_stride);
1420 dst6 =
LD_UB(dst + 4 * dst_stride);
1421 dst7 =
LD_UB(dst + 11 * dst_stride);
1422 ILVR_B2_SH(zero, dst6, zero, dst7, res6, res7);
1423 ADD2(res6, out6, res7, out7, res6, res7);
1426 ST_D1(res6, 0, dst + 4 * dst_stride);
1427 ST_D1(res7, 0, dst + 11 * dst_stride);
1431 dst10 =
LD_UB(dst + 6 * dst_stride);
1432 dst11 =
LD_UB(dst + 9 * dst_stride);
1433 ILVR_B2_SH(zero, dst10, zero, dst11, res10, res11);
1434 ADD2(res10, out10, res11, out11, res10, res11);
1436 PCKEV_B2_SH(res10, res10, res11, res11, res10, res11);
1437 ST_D1(res10, 0, dst + 6 * dst_stride);
1438 ST_D1(res11, 0, dst + 9 * dst_stride);
1444 dst2 =
LD_UB(dst + 7 * dst_stride);
1445 dst3 =
LD_UB(dst + 8 * dst_stride);
1446 ILVR_B2_SH(zero, dst2, zero, dst3, res2, res3);
1447 ADD2(res2, out2, res3, out3, res2, res3);
1450 ST_D1(res2, 0, dst + 7 * dst_stride);
1451 ST_D1(res3, 0, dst + 8 * dst_stride);
1455 dst14 =
LD_UB(dst + 5 * dst_stride);
1456 dst15 =
LD_UB(dst + 10 * dst_stride);
1457 ILVR_B2_SH(zero, dst14, zero, dst15, res14, res15);
1458 ADD2(res14, out14, res15, out15, res14, res15);
1460 PCKEV_B2_SH(res14, res14, res15, res15, res14, res15);
1461 ST_D1(res14, 0, dst + 5 * dst_stride);
1462 ST_D1(res15, 0, dst + 10 * dst_stride);
1469 int16_t *
out = out_arr;
1473 for (i = 0; i < 2; i++) {
1479 for (i = 0; i < 2; i++) {
1490 int16_t
out[16 * 16];
1491 int16_t *out_ptr = &out[0];
1494 for (i = 0; i < 2; i++) {
1500 for (i = 0; i < 2; i++) {
1503 (dst + (i << 3)), dst_stride);
1511 int16_t
out[16 * 16];
1512 int16_t *out_ptr = &out[0];
1515 for (i = 0; i < 2; i++) {
1521 for (i = 0; i < 2; i++) {
1524 (dst + (i << 3)), dst_stride);
1529 int16_t *tmp_eve_buf,
1530 int16_t *tmp_odd_buf,
1533 v8i16 vec0, vec1, vec2, vec3, loc0, loc1, loc2, loc3;
1534 v8i16 m0, m1, m2, m3, m4, m5, m6, m7, n0, n1, n2, n3, n4, n5, n6, n7;
1537 vec0 =
LD_SH(tmp_odd_buf);
1538 vec1 =
LD_SH(tmp_odd_buf + 9 * 8);
1539 vec2 =
LD_SH(tmp_odd_buf + 14 * 8);
1540 vec3 =
LD_SH(tmp_odd_buf + 6 * 8);
1541 loc0 =
LD_SH(tmp_eve_buf);
1542 loc1 =
LD_SH(tmp_eve_buf + 8 * 8);
1543 loc2 =
LD_SH(tmp_eve_buf + 4 * 8);
1544 loc3 =
LD_SH(tmp_eve_buf + 12 * 8);
1546 ADD4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, m0, m4, m2, m6);
1548 ST_SH((loc0 - vec3), (tmp_buf + 31 * 8));
1549 ST_SH((loc1 - vec2), (tmp_buf + 23 * 8));
1550 ST_SH((loc2 - vec1), (tmp_buf + 27 * 8));
1551 ST_SH((loc3 - vec0), (tmp_buf + 19 * 8));
1554 vec0 =
LD_SH(tmp_odd_buf + 4 * 8);
1555 vec1 =
LD_SH(tmp_odd_buf + 13 * 8);
1556 vec2 =
LD_SH(tmp_odd_buf + 10 * 8);
1557 vec3 =
LD_SH(tmp_odd_buf + 3 * 8);
1558 loc0 =
LD_SH(tmp_eve_buf + 2 * 8);
1559 loc1 =
LD_SH(tmp_eve_buf + 10 * 8);
1560 loc2 =
LD_SH(tmp_eve_buf + 6 * 8);
1561 loc3 =
LD_SH(tmp_eve_buf + 14 * 8);
1563 ADD4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, m1, m5, m3, m7);
1565 ST_SH((loc0 - vec3), (tmp_buf + 29 * 8));
1566 ST_SH((loc1 - vec2), (tmp_buf + 21 * 8));
1567 ST_SH((loc2 - vec1), (tmp_buf + 25 * 8));
1568 ST_SH((loc3 - vec0), (tmp_buf + 17 * 8));
1571 vec0 =
LD_SH(tmp_odd_buf + 2 * 8);
1572 vec1 =
LD_SH(tmp_odd_buf + 11 * 8);
1573 vec2 =
LD_SH(tmp_odd_buf + 12 * 8);
1574 vec3 =
LD_SH(tmp_odd_buf + 7 * 8);
1575 loc0 =
LD_SH(tmp_eve_buf + 1 * 8);
1576 loc1 =
LD_SH(tmp_eve_buf + 9 * 8);
1577 loc2 =
LD_SH(tmp_eve_buf + 5 * 8);
1578 loc3 =
LD_SH(tmp_eve_buf + 13 * 8);
1580 ADD4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, n0, n4, n2, n6);
1582 ST_SH((loc0 - vec3), (tmp_buf + 30 * 8));
1583 ST_SH((loc1 - vec2), (tmp_buf + 22 * 8));
1584 ST_SH((loc2 - vec1), (tmp_buf + 26 * 8));
1585 ST_SH((loc3 - vec0), (tmp_buf + 18 * 8));
1588 vec0 =
LD_SH(tmp_odd_buf + 5 * 8);
1589 vec1 =
LD_SH(tmp_odd_buf + 15 * 8);
1590 vec2 =
LD_SH(tmp_odd_buf + 8 * 8);
1591 vec3 =
LD_SH(tmp_odd_buf + 1 * 8);
1592 loc0 =
LD_SH(tmp_eve_buf + 3 * 8);
1593 loc1 =
LD_SH(tmp_eve_buf + 11 * 8);
1594 loc2 =
LD_SH(tmp_eve_buf + 7 * 8);
1595 loc3 =
LD_SH(tmp_eve_buf + 15 * 8);
1597 ADD4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, n1, n5, n3, n7);
1599 ST_SH((loc0 - vec3), (tmp_buf + 28 * 8));
1600 ST_SH((loc1 - vec2), (tmp_buf + 20 * 8));
1601 ST_SH((loc2 - vec1), (tmp_buf + 24 * 8));
1602 ST_SH((loc3 - vec0), (tmp_buf + 16 * 8));
1607 m0, n0, m1, n1, m2, n2, m3, n3);
1608 ST_SH4(m0, n0, m1, n1, (dst + 0), 32);
1609 ST_SH4(m2, n2, m3, n3, (dst + 4 * 32), 32);
1612 m4, n4, m5, n5, m6, n6, m7, n7);
1613 ST_SH4(m4, n4, m5, n5, (dst + 8), 32);
1614 ST_SH4(m6, n6, m7, n7, (dst + 8 + 4 * 32), 32);
1617 LD_SH8((tmp_buf + 8 * 16), 8, m0, n0, m1, n1, m2, n2, m3, n3);
1618 LD_SH8((tmp_buf + 12 * 16), 8, m4, n4, m5, n5, m6, n6, m7, n7);
1620 m0, n0, m1, n1, m2, n2, m3, n3);
1621 ST_SH4(m0, n0, m1, n1, (dst + 16), 32);
1622 ST_SH4(m2, n2, m3, n3, (dst + 16 + 4 * 32), 32);
1625 m4, n4, m5, n5, m6, n6, m7, n7);
1626 ST_SH4(m4, n4, m5, n5, (dst + 24), 32);
1627 ST_SH4(m6, n6, m7, n7, (dst + 24 + 4 * 32), 32);
1631 int16_t *tmp_eve_buf)
1633 v8i16 vec0, vec1, vec2, vec3, loc0, loc1, loc2, loc3;
1634 v8i16 reg0, reg1, reg2, reg3, reg4, reg5, reg6, reg7;
1635 v8i16 stp0, stp1, stp2, stp3, stp4, stp5, stp6, stp7;
1639 LD_SH8(tmp_buf, (4 * 32), reg0, reg1, reg2, reg3, reg4, reg5, reg6, reg7);
1640 ST_SH8(zero, zero, zero, zero, zero, zero, zero, zero, tmp_buf, (4 * 32));
1641 tmp_buf += (2 * 32);
1645 BUTTERFLY_4(reg1, reg7, reg3, reg5, vec1, vec3, vec2, vec0);
1653 BUTTERFLY_4(reg4, reg0, reg2, reg6, vec1, vec3, vec2, vec0);
1654 BUTTERFLY_4(vec0, vec1, loc1, loc0, stp3, stp0, stp7, stp4);
1655 BUTTERFLY_4(vec2, vec3, loc3, loc2, stp2, stp1, stp6, stp5);
1659 LD_SH8(tmp_buf, (4 * 32), reg0, reg1, reg2, reg3, reg4, reg5, reg6, reg7);
1660 ST_SH8(zero, zero, zero, zero, zero, zero, zero, zero, tmp_buf, (4 * 32));
1696 BUTTERFLY_4(stp0, stp1, reg7, reg5, loc1, loc3, loc2, loc0);
1697 ST_SH2(loc1, loc3, tmp_eve_buf, 8);
1698 ST_SH2(loc2, loc0, (tmp_eve_buf + 14 * 8), 8);
1700 BUTTERFLY_4(stp2, stp3, reg4, reg1, loc1, loc3, loc2, loc0);
1701 ST_SH2(loc1, loc3, (tmp_eve_buf + 2 * 8), 8);
1702 ST_SH2(loc2, loc0, (tmp_eve_buf + 12 * 8), 8);
1705 BUTTERFLY_4(stp4, stp5, reg6, reg3, loc1, loc3, loc2, loc0);
1706 ST_SH2(loc1, loc3, (tmp_eve_buf + 4 * 8), 8);
1707 ST_SH2(loc2, loc0, (tmp_eve_buf + 10 * 8), 8);
1709 BUTTERFLY_4(stp6, stp7, reg2, reg0, loc1, loc3, loc2, loc0);
1710 ST_SH2(loc1, loc3, (tmp_eve_buf + 6 * 8), 8);
1711 ST_SH2(loc2, loc0, (tmp_eve_buf + 8 * 8), 8);
1715 int16_t *tmp_odd_buf)
1717 v8i16 vec0, vec1, vec2, vec3, loc0, loc1, loc2, loc3;
1718 v8i16 reg0, reg1, reg2, reg3, reg4, reg5, reg6, reg7;
1722 reg0 =
LD_SH(tmp_buf + 32);
1723 reg1 =
LD_SH(tmp_buf + 7 * 32);
1724 reg2 =
LD_SH(tmp_buf + 9 * 32);
1725 reg3 =
LD_SH(tmp_buf + 15 * 32);
1726 reg4 =
LD_SH(tmp_buf + 17 * 32);
1727 reg5 =
LD_SH(tmp_buf + 23 * 32);
1728 reg6 =
LD_SH(tmp_buf + 25 * 32);
1729 reg7 =
LD_SH(tmp_buf + 31 * 32);
1731 ST_SH(zero, tmp_buf + 32);
1732 ST_SH(zero, tmp_buf + 7 * 32);
1733 ST_SH(zero, tmp_buf + 9 * 32);
1734 ST_SH(zero, tmp_buf + 15 * 32);
1735 ST_SH(zero, tmp_buf + 17 * 32);
1736 ST_SH(zero, tmp_buf + 23 * 32);
1737 ST_SH(zero, tmp_buf + 25 * 32);
1738 ST_SH(zero, tmp_buf + 31 * 32);
1756 ADD2(reg5, reg4, reg3, reg2, vec0, vec1);
1757 ST_SH2(vec0, vec1, (tmp_odd_buf + 4 * 8), 8);
1758 SUB2(reg5, reg4, reg3, reg2, vec0, vec1);
1760 ST_SH2(vec0, vec1, tmp_odd_buf, 8);
1765 BUTTERFLY_4(reg0, reg7, reg6, reg1, vec0, vec1, vec2, vec3);
1766 ST_SH2(vec0, vec1, (tmp_odd_buf + 6 * 8), 8);
1768 ST_SH2(vec2, vec3, (tmp_odd_buf + 2 * 8), 8);
1772 reg0 =
LD_SH(tmp_buf + 3 * 32);
1773 reg1 =
LD_SH(tmp_buf + 5 * 32);
1774 reg2 =
LD_SH(tmp_buf + 11 * 32);
1775 reg3 =
LD_SH(tmp_buf + 13 * 32);
1776 reg4 =
LD_SH(tmp_buf + 19 * 32);
1777 reg5 =
LD_SH(tmp_buf + 21 * 32);
1778 reg6 =
LD_SH(tmp_buf + 27 * 32);
1779 reg7 =
LD_SH(tmp_buf + 29 * 32);
1781 ST_SH(zero, tmp_buf + 3 * 32);
1782 ST_SH(zero, tmp_buf + 5 * 32);
1783 ST_SH(zero, tmp_buf + 11 * 32);
1784 ST_SH(zero, tmp_buf + 13 * 32);
1785 ST_SH(zero, tmp_buf + 19 * 32);
1786 ST_SH(zero, tmp_buf + 21 * 32);
1787 ST_SH(zero, tmp_buf + 27 * 32);
1788 ST_SH(zero, tmp_buf + 29 * 32);
1796 SUB4(reg1, reg2, reg6, reg5, reg0, reg3, reg7, reg4,
1797 vec0, vec1, vec2, vec3);
1800 BUTTERFLY_4(loc2, loc3, loc1, loc0, vec0, vec1, vec3, vec2);
1801 ST_SH2(vec0, vec1, (tmp_odd_buf + 12 * 8), 3 * 8);
1803 ST_SH2(vec0, vec1, (tmp_odd_buf + 10 * 8), 8);
1806 ADD4(reg0, reg3, reg1, reg2, reg5, reg6, reg4, reg7,
1807 vec0, vec1, vec2, vec3);
1808 BUTTERFLY_4(vec0, vec3, vec2, vec1, reg0, reg1, reg3, reg2);
1809 ST_SH2(reg0, reg1, (tmp_odd_buf + 13 * 8), 8);
1811 ST_SH2(reg0, reg1, (tmp_odd_buf + 8 * 8), 8);
1815 LD_SH4(tmp_odd_buf, 8, reg0, reg1, reg2, reg3);
1816 LD_SH4((tmp_odd_buf + 8 * 8), 8, reg4, reg5, reg6, reg7);
1818 ADD4(reg0, reg4, reg1, reg5, reg2, reg6, reg3, reg7,
1819 loc0, loc1, loc2, loc3);
1820 ST_SH4(loc0, loc1, loc2, loc3, tmp_odd_buf, 8);
1822 SUB2(reg0, reg4, reg1, reg5, vec0, vec1);
1825 SUB2(reg2, reg6, reg3, reg7, vec0, vec1);
1827 ST_SH4(loc0, loc1, loc2, loc3, (tmp_odd_buf + 8 * 8), 8);
1830 LD_SH4((tmp_odd_buf + 4 * 8), 8, reg1, reg2, reg0, reg3);
1831 LD_SH4((tmp_odd_buf + 12 * 8), 8, reg4, reg5, reg6, reg7);
1833 ADD4(reg0, reg4, reg1, reg5, reg2, reg6, reg3, reg7,
1834 loc0, loc1, loc2, loc3);
1835 ST_SH4(loc0, loc1, loc2, loc3, (tmp_odd_buf + 4 * 8), 8);
1837 SUB2(reg0, reg4, reg3, reg7, vec0, vec1);
1840 SUB2(reg1, reg5, reg2, reg6, vec0, vec1);
1842 ST_SH4(loc0, loc1, loc2, loc3, (tmp_odd_buf + 12 * 8), 8);
1846 int16_t *tmp_odd_buf,
1850 v8i16 vec0, vec1, vec2, vec3, loc0, loc1, loc2, loc3;
1851 v8i16 m0, m1, m2, m3, m4, m5, m6, m7, n0, n1, n2, n3, n4, n5, n6, n7;
1854 vec0 =
LD_SH(tmp_odd_buf);
1855 vec1 =
LD_SH(tmp_odd_buf + 9 * 8);
1856 vec2 =
LD_SH(tmp_odd_buf + 14 * 8);
1857 vec3 =
LD_SH(tmp_odd_buf + 6 * 8);
1858 loc0 =
LD_SH(tmp_eve_buf);
1859 loc1 =
LD_SH(tmp_eve_buf + 8 * 8);
1860 loc2 =
LD_SH(tmp_eve_buf + 4 * 8);
1861 loc3 =
LD_SH(tmp_eve_buf + 12 * 8);
1863 ADD4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, m0, m4, m2, m6);
1867 SUB4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, m6, m2, m4, m0);
1873 vec0 =
LD_SH(tmp_odd_buf + 4 * 8);
1874 vec1 =
LD_SH(tmp_odd_buf + 13 * 8);
1875 vec2 =
LD_SH(tmp_odd_buf + 10 * 8);
1876 vec3 =
LD_SH(tmp_odd_buf + 3 * 8);
1877 loc0 =
LD_SH(tmp_eve_buf + 2 * 8);
1878 loc1 =
LD_SH(tmp_eve_buf + 10 * 8);
1879 loc2 =
LD_SH(tmp_eve_buf + 6 * 8);
1880 loc3 =
LD_SH(tmp_eve_buf + 14 * 8);
1882 ADD4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, m1, m5, m3, m7);
1887 SUB4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, m7, m3, m5, m1);
1893 vec0 =
LD_SH(tmp_odd_buf + 2 * 8);
1894 vec1 =
LD_SH(tmp_odd_buf + 11 * 8);
1895 vec2 =
LD_SH(tmp_odd_buf + 12 * 8);
1896 vec3 =
LD_SH(tmp_odd_buf + 7 * 8);
1897 loc0 =
LD_SH(tmp_eve_buf + 1 * 8);
1898 loc1 =
LD_SH(tmp_eve_buf + 9 * 8);
1899 loc2 =
LD_SH(tmp_eve_buf + 5 * 8);
1900 loc3 =
LD_SH(tmp_eve_buf + 13 * 8);
1902 ADD4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, n0, n4, n2, n6);
1907 SUB4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, n6, n2, n4, n0);
1913 vec0 =
LD_SH(tmp_odd_buf + 5 * 8);
1914 vec1 =
LD_SH(tmp_odd_buf + 15 * 8);
1915 vec2 =
LD_SH(tmp_odd_buf + 8 * 8);
1916 vec3 =
LD_SH(tmp_odd_buf + 1 * 8);
1917 loc0 =
LD_SH(tmp_eve_buf + 3 * 8);
1918 loc1 =
LD_SH(tmp_eve_buf + 11 * 8);
1919 loc2 =
LD_SH(tmp_eve_buf + 7 * 8);
1920 loc3 =
LD_SH(tmp_eve_buf + 15 * 8);
1922 ADD4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, n1, n5, n3, n7);
1927 SUB4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, n7, n3, n5, n1);
1954 &tmp_odd_buf[0], output);
1962 v16u8 dst0, dst1, dst2, dst3, tmp0, tmp1, tmp2, tmp3;
1963 v8i16 res0, res1, res2, res3, res4, res5, res6, res7, vec;
1970 vec = __msa_fill_h(out);
1972 for (i = 16; i--;) {
1973 LD_UB2(dst, 16, dst0, dst1);
1974 LD_UB2(dst + dst_stride, 16, dst2, dst3);
1980 ADD4(res0, vec, res1, vec, res2, vec, res3, vec, res0, res1, res2,
1982 ADD4(res4, vec, res5, vec, res6, vec, res7, vec, res4, res5, res6,
1985 PCKEV_B4_UB(res4, res0, res5, res1, res6, res2, res7, res3,
1986 tmp0, tmp1, tmp2, tmp3);
1988 ST_UB2(tmp0, tmp1, dst, 16);
1990 ST_UB2(tmp2, tmp3, dst, 16);
2000 int16_t *out_ptr = out_arr;
2003 for (i = 32; i--;) {
2005 "sw $zero, (%[out_ptr]) \n\t" 2006 "sw $zero, 4(%[out_ptr]) \n\t" 2007 "sw $zero, 8(%[out_ptr]) \n\t" 2008 "sw $zero, 12(%[out_ptr]) \n\t" 2009 "sw $zero, 16(%[out_ptr]) \n\t" 2010 "sw $zero, 20(%[out_ptr]) \n\t" 2011 "sw $zero, 24(%[out_ptr]) \n\t" 2012 "sw $zero, 28(%[out_ptr]) \n\t" 2013 "sw $zero, 32(%[out_ptr]) \n\t" 2014 "sw $zero, 36(%[out_ptr]) \n\t" 2015 "sw $zero, 40(%[out_ptr]) \n\t" 2016 "sw $zero, 44(%[out_ptr]) \n\t" 2017 "sw $zero, 48(%[out_ptr]) \n\t" 2018 "sw $zero, 52(%[out_ptr]) \n\t" 2019 "sw $zero, 56(%[out_ptr]) \n\t" 2020 "sw $zero, 60(%[out_ptr]) \n\t" 2023 : [out_ptr]
"r" (out_ptr)
2035 for (i = 0; i < 4; i++) {
2038 (dst + (i << 3)), dst_stride);
2047 int16_t *out_ptr = out_arr;
2051 for (i = 0; i < 4; i++) {
2058 for (i = 0; i < 4; i++) {
2061 (dst + (i << 3)), dst_stride);
2066 int16_t *
block,
int eob)
2077 int16_t *
block,
int eob)
2082 else if (eob <= 12) {
2091 int16_t *
block,
int eob)
2097 else if (eob <= 10) {
2106 int16_t *
block,
int eob)
2111 else if (eob <= 34) {
2120 int16_t *
block,
int eob)
2126 int16_t *
block,
int eob)
2132 int16_t *
block,
int eob)
2138 int16_t *
block,
int eob)
2144 int16_t *
block,
int eob)
2150 int16_t *
block,
int eob)
2156 int16_t *
block,
int eob)
2162 int16_t *
block,
int eob)
2168 int16_t *
block,
int eob)
#define VP9_DOT_SHIFT_RIGHT_PCK_H(in0, in1, in2)
void ff_idct_iadst_16x16_add_msa(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
#define ADDBLK_ST4x4_UB(in0, in1, in2, in3, pdst, stride)
void ff_idct_iadst_4x4_add_msa(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
static const int32_t cospi_17_64
static const int32_t sinpi_4_9
void ff_iadst_iadst_8x8_add_msa(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
static const int32_t cospi_2_64
static const int32_t cospi_24_64
#define VP9_SET_COSPI_PAIR(c0_h, c1_h)
static const int32_t cospi_11_64
void ff_iadst_idct_16x16_add_msa(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
#define VP9_IADST8x16_1D(r0, r1, r2, r3, r4, r5, r6, r7, r8,r9, r10, r11, r12, r13, r14, r15,out0, out1, out2, out3, out4, out5,out6, out7, out8, out9, out10, out11,out12, out13, out14, out15)
void ff_idct_idct_8x8_add_msa(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
void ff_idct_idct_4x4_add_msa(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
static void vp9_idct8x32_column_odd_process_store(int16_t *tmp_buf, int16_t *tmp_odd_buf)
static const int32_t cospi_30_64
static void vp9_idct4x4_1_add_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
static const int32_t sinpi_1_9
static const int32_t cospi_4_64
static const int32_t sinpi_2_9
void ff_iadst_iadst_16x16_add_msa(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
static const int32_t cospi_7_64
#define VP9_DCT_CONST_BITS
static const int32_t cospi_28_64
#define VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7,out0, out1, out2, out3, out4, out5, out6, out7)
static const int32_t cospi_20_64
The exact code depends on how similar the blocks are and how related they are to the block
#define UNPCK_UB_SH(in, out0, out1)
static const int32_t sinpi_3_9
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce output
#define VP9_DOT_ADD_SUB_SRARI_PCK(in0, in1, in2, in3, in4, in5, in6, in7,dst0, dst1, dst2, dst3)
#define CLIP_SH_0_255(in)
void ff_idct_iadst_8x8_add_msa(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
static void vp9_iadst4x4_colcol_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
static void vp9_idct32x32_colcol_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
#define ST_D1(in, idx, pdst)
static void vp9_idct8x8_12_colcol_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
#define CLIP_SH8_0_255(in0, in1, in2, in3,in4, in5, in6, in7)
#define ROUND_POWER_OF_TWO(value, n)
#define SUB4(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, out3)
static void vp9_idct8x32_1d_columns_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
#define CLIP_SH2_0_255(in0, in1)
#define BUTTERFLY_4(in0, in1, in2, in3, out0, out1, out2, out3)
void ff_idct_idct_32x32_add_msa(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
static const int32_t cospi_14_64
#define ADD4(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, out3)
static const int32_t cospi_18_64
static const int32_t cospi_22_64
static void vp9_idct_iadst_8x8_add_msa(int16_t *input, uint8_t *dst, int32_t dst_stride, int32_t eob)
static void vp9_idct_butterfly_transpose_store(int16_t *tmp_buf, int16_t *tmp_eve_buf, int16_t *tmp_odd_buf, int16_t *dst)
void ff_iadst_idct_4x4_add_msa(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
static const int32_t cospi_9_64
#define TRANSPOSE8x8_SH_SH(...)
static void vp9_idct32x32_34_colcol_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
static const int32_t cospi_5_64
static const int32_t cospi_27_64
#define VP9_IADST8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7,out0, out1, out2, out3, out4, out5, out6, out7)
static const int32_t cospi_13_64
static void vp9_idct16x16_colcol_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
static void vp9_idct_iadst_4x4_add_msa(int16_t *input, uint8_t *dst, int32_t dst_stride, int32_t eob)
static const int32_t cospi_26_64
static void vp9_idct8x32_column_butterfly_addblk(int16_t *tmp_eve_buf, int16_t *tmp_odd_buf, uint8_t *dst, int32_t dst_stride)
static const int32_t cospi_21_64
#define BUTTERFLY_8(in0, in1, in2, in3, in4, in5, in6, in7,out0, out1, out2, out3, out4, out5, out6, out7)
#define VP9_ADDBLK_ST8x4_UB(dst, dst_stride, in0, in1, in2, in3)
#define TRANSPOSE4X8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7,out0, out1, out2, out3, out4, out5, out6, out7)
static const int32_t cospi_6_64
#define VP9_IDCT4x4(in0, in1, in2, in3, out0, out1, out2, out3)
static const int32_t cospi_19_64
static const int32_t cospi_23_64
static const int32_t cospi_25_64
static void vp9_iadst_idct_16x16_add_msa(int16_t *input, uint8_t *dst, int32_t dst_stride, int32_t eob)
static const int32_t cospi_8_64
static void vp9_idct4x4_colcol_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
static void vp9_iadst16x16_colcol_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
static void vp9_idct8x32_column_even_process_store(int16_t *tmp_buf, int16_t *tmp_eve_buf)
static void vp9_idct16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
static void vp9_idct32x32_1_add_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
static const int32_t cospi_3_64
static void vp9_iadst_idct_8x8_add_msa(int16_t *input, uint8_t *dst, int32_t dst_stride, int32_t eob)
static void vp9_iadst16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
#define VP9_DOTP_CONST_PAIR(reg0, reg1, cnst0, cnst1, out0, out1)
static void vp9_iadst8x8_colcol_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
static const int32_t cospi_16_64
static const int32_t cospi_1_64
#define ADD2(in0, in1, in2, in3, out0, out1)
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
static const int32_t cospi_31_64
static void vp9_idct8x8_colcol_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
static const int32_t cospi_10_64
static void vp9_idct16x16_1_add_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
static void vp9_idct_iadst_16x16_add_msa(int16_t *input, uint8_t *dst, int32_t dst_stride, int32_t eob)
GLint GLenum GLboolean GLsizei stride
#define SUB2(in0, in1, in2, in3, out0, out1)
void ff_idct_idct_16x16_add_msa(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
static const int32_t cospi_15_64
#define ALLOC_ALIGNED(align)
static const int32_t cospi_29_64
__asm__(".macro parse_r var r\n\t""\\var = -1\n\t"_IFC_REG(0) _IFC_REG(1) _IFC_REG(2) _IFC_REG(3) _IFC_REG(4) _IFC_REG(5) _IFC_REG(6) _IFC_REG(7) _IFC_REG(8) _IFC_REG(9) _IFC_REG(10) _IFC_REG(11) _IFC_REG(12) _IFC_REG(13) _IFC_REG(14) _IFC_REG(15) _IFC_REG(16) _IFC_REG(17) _IFC_REG(18) _IFC_REG(19) _IFC_REG(20) _IFC_REG(21) _IFC_REG(22) _IFC_REG(23) _IFC_REG(24) _IFC_REG(25) _IFC_REG(26) _IFC_REG(27) _IFC_REG(28) _IFC_REG(29) _IFC_REG(30) _IFC_REG(31)".iflt \\var\n\t"".error \"Unable to parse register name \\r\"\n\t"".endif\n\t"".endm")
void ff_iadst_iadst_4x4_add_msa(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
static void vp9_iadst16_1d_columns_msa(int16_t *input, int16_t *output)
static void vp9_idct16_1d_columns_msa(int16_t *input, int16_t *output)
static void vp9_idct16x16_10_colcol_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
#define VP9_MADD_SHORT(m0, m1, c0, c1, res0, res1)
#define TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, out0, out1, out2, out3)
#define VP9_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7,out0, out1, out2, out3, out4, out5, out6, out7)
static void vp9_idct8x8_1_add_msa(int16_t *input, uint8_t *dst, int32_t dst_stride)
static double val(void *priv, double ch)
static const int32_t cospi_12_64
static void vp9_iadst_idct_4x4_add_msa(int16_t *input, uint8_t *dst, int32_t dst_stride, int32_t eob)
static void vp9_idct8x32_1d_columns_msa(int16_t *input, int16_t *output, int16_t *tmp_buf)
#define VP9_MADD_BF(inp0, inp1, inp2, inp3, cst0, cst1, cst2, cst3,out0, out1, out2, out3)
void ff_iadst_idct_8x8_add_msa(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
#define VP9_IADST4x4(in0, in1, in2, in3, out0, out1, out2, out3)