27 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8,
29 0, 1, 1, 2, 2, 3, 3, 4, 16, 17, 17, 18, 18, 19, 19, 20,
31 8, 9, 9, 10, 10, 11, 11, 12, 24, 25, 25, 26, 26, 27, 27, 28
52 #define FILT_8TAP_DPADD_S_H(vec0, vec1, vec2, vec3, \
53 filt0, filt1, filt2, filt3) \
57 tmp0 = __msa_dotp_s_h((v16i8) vec0, (v16i8) filt0); \
58 tmp0 = __msa_dpadd_s_h(tmp0, (v16i8) vec1, (v16i8) filt1); \
59 tmp1 = __msa_dotp_s_h((v16i8) vec2, (v16i8) filt2); \
60 tmp1 = __msa_dpadd_s_h(tmp1, (v16i8) vec3, (v16i8) filt3); \
61 tmp0 = __msa_adds_s_h(tmp0, tmp1); \
66 #define HORIZ_8TAP_FILT(src0, src1, mask0, mask1, mask2, mask3, \
67 filt_h0, filt_h1, filt_h2, filt_h3) \
69 v16i8 vec0_m, vec1_m, vec2_m, vec3_m; \
72 VSHF_B4_SB(src0, src1, mask0, mask1, mask2, mask3, \
73 vec0_m, vec1_m, vec2_m, vec3_m); \
74 hz_out_m = FILT_8TAP_DPADD_S_H(vec0_m, vec1_m, vec2_m, vec3_m, \
75 filt_h0, filt_h1, filt_h2, filt_h3); \
77 hz_out_m = __msa_srari_h(hz_out_m, 7); \
78 hz_out_m = __msa_sat_s_h(hz_out_m, 7); \
83 #define HORIZ_8TAP_4WID_4VECS_FILT(src0, src1, src2, src3, \
84 mask0, mask1, mask2, mask3, \
85 filt0, filt1, filt2, filt3, \
88 v16i8 vec0_m, vec1_m, vec2_m, vec3_m, vec4_m, vec5_m, vec6_m, vec7_m; \
89 v8i16 res0_m, res1_m, res2_m, res3_m; \
91 VSHF_B2_SB(src0, src1, src2, src3, mask0, mask0, vec0_m, vec1_m); \
92 DOTP_SB2_SH(vec0_m, vec1_m, filt0, filt0, res0_m, res1_m); \
93 VSHF_B2_SB(src0, src1, src2, src3, mask1, mask1, vec2_m, vec3_m); \
94 DPADD_SB2_SH(vec2_m, vec3_m, filt1, filt1, res0_m, res1_m); \
95 VSHF_B2_SB(src0, src1, src2, src3, mask2, mask2, vec4_m, vec5_m); \
96 DOTP_SB2_SH(vec4_m, vec5_m, filt2, filt2, res2_m, res3_m); \
97 VSHF_B2_SB(src0, src1, src2, src3, mask3, mask3, vec6_m, vec7_m); \
98 DPADD_SB2_SH(vec6_m, vec7_m, filt3, filt3, res2_m, res3_m); \
99 ADDS_SH2_SH(res0_m, res2_m, res1_m, res3_m, out0, out1); \
102 #define HORIZ_8TAP_8WID_4VECS_FILT(src0, src1, src2, src3, \
103 mask0, mask1, mask2, mask3, \
104 filt0, filt1, filt2, filt3, \
105 out0, out1, out2, out3) \
107 v16i8 vec0_m, vec1_m, vec2_m, vec3_m, vec4_m, vec5_m, vec6_m, vec7_m; \
108 v8i16 res0_m, res1_m, res2_m, res3_m, res4_m, res5_m, res6_m, res7_m; \
110 VSHF_B2_SB(src0, src0, src1, src1, mask0, mask0, vec0_m, vec1_m); \
111 VSHF_B2_SB(src2, src2, src3, src3, mask0, mask0, vec2_m, vec3_m); \
112 DOTP_SB4_SH(vec0_m, vec1_m, vec2_m, vec3_m, filt0, filt0, filt0, filt0, \
113 res0_m, res1_m, res2_m, res3_m); \
114 VSHF_B2_SB(src0, src0, src1, src1, mask2, mask2, vec0_m, vec1_m); \
115 VSHF_B2_SB(src2, src2, src3, src3, mask2, mask2, vec2_m, vec3_m); \
116 DOTP_SB4_SH(vec0_m, vec1_m, vec2_m, vec3_m, filt2, filt2, filt2, filt2, \
117 res4_m, res5_m, res6_m, res7_m); \
118 VSHF_B2_SB(src0, src0, src1, src1, mask1, mask1, vec4_m, vec5_m); \
119 VSHF_B2_SB(src2, src2, src3, src3, mask1, mask1, vec6_m, vec7_m); \
120 DPADD_SB4_SH(vec4_m, vec5_m, vec6_m, vec7_m, filt1, filt1, filt1, filt1, \
121 res0_m, res1_m, res2_m, res3_m); \
122 VSHF_B2_SB(src0, src0, src1, src1, mask3, mask3, vec4_m, vec5_m); \
123 VSHF_B2_SB(src2, src2, src3, src3, mask3, mask3, vec6_m, vec7_m); \
124 DPADD_SB4_SH(vec4_m, vec5_m, vec6_m, vec7_m, filt3, filt3, filt3, filt3, \
125 res4_m, res5_m, res6_m, res7_m); \
126 ADDS_SH4_SH(res0_m, res4_m, res1_m, res5_m, res2_m, res6_m, res3_m, \
127 res7_m, out0, out1, out2, out3); \
130 #define PCKEV_XORI128_AVG_ST_UB(in0, in1, dst, pdst) \
134 tmp_m = PCKEV_XORI128_UB(in1, in0); \
135 tmp_m = __msa_aver_u_b(tmp_m, (v16u8) dst); \
136 ST_UB(tmp_m, (pdst)); \
139 #define PCKEV_AVG_ST_UB(in0, in1, dst, pdst) \
143 tmp_m = (v16u8) __msa_pckev_b((v16i8) in0, (v16i8) in1); \
144 tmp_m = __msa_aver_u_b(tmp_m, (v16u8) dst); \
145 ST_UB(tmp_m, (pdst)); \
148 #define PCKEV_AVG_ST8x4_UB(in0, in1, in2, in3, dst0, dst1, \
151 v16u8 tmp0_m, tmp1_m; \
152 uint8_t *pdst_m = (uint8_t *) (pdst); \
154 PCKEV_B2_UB(in1, in0, in3, in2, tmp0_m, tmp1_m); \
155 AVER_UB2_UB(tmp0_m, dst0, tmp1_m, dst1, tmp0_m, tmp1_m); \
156 ST8x4_UB(tmp0_m, tmp1_m, pdst_m, stride); \
163 v16u8 mask0, mask1, mask2, mask3,
out;
164 v16i8
src0,
src1, src2, src3, filt0, filt1, filt2, filt3;
165 v8i16
filt, out0, out1;
171 filt =
LD_SH(filter);
172 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
178 LD_SB4(src, src_stride, src0, src1, src2, src3);
181 mask3, filt0, filt1, filt2, filt3, out0, out1);
185 ST4x4_UB(out, out, 0, 1, 2, 3, dst, dst_stride);
192 v16i8 filt0, filt1, filt2, filt3;
194 v16u8 mask0, mask1, mask2, mask3,
out;
195 v8i16
filt, out0, out1, out2, out3;
201 filt =
LD_SH(filter);
202 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
208 LD_SB4(src, src_stride, src0, src1, src2, src3);
210 src += (4 * src_stride);
212 mask3, filt0, filt1, filt2, filt3, out0, out1);
213 LD_SB4(src, src_stride, src0, src1, src2, src3);
216 mask3, filt0, filt1, filt2, filt3, out2, out3);
220 ST4x4_UB(out, out, 0, 1, 2, 3, dst, dst_stride);
221 dst += (4 * dst_stride);
223 ST4x4_UB(out, out, 0, 1, 2, 3, dst, dst_stride);
232 }
else if (8 == height) {
241 v16i8
src0,
src1, src2, src3, filt0, filt1, filt2, filt3;
242 v16u8 mask0, mask1, mask2, mask3, tmp0, tmp1;
243 v8i16
filt, out0, out1, out2, out3;
249 filt =
LD_SH(filter);
250 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
256 LD_SB4(src, src_stride, src0, src1, src2, src3);
259 mask3, filt0, filt1, filt2, filt3, out0, out1,
265 ST8x4_UB(tmp0, tmp1, dst, dst_stride);
273 v16i8
src0,
src1, src2, src3, filt0, filt1, filt2, filt3;
274 v16u8 mask0, mask1, mask2, mask3, tmp0, tmp1;
275 v8i16
filt, out0, out1, out2, out3;
281 filt =
LD_SH(filter);
282 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
288 for (loop_cnt = (height >> 2); loop_cnt--;) {
289 LD_SB4(src, src_stride, src0, src1, src2, src3);
291 src += (4 * src_stride);
293 mask3, filt0, filt1, filt2, filt3, out0,
299 ST8x4_UB(tmp0, tmp1, dst, dst_stride);
300 dst += (4 * dst_stride);
321 v16i8
src0,
src1, src2, src3, filt0, filt1, filt2, filt3;
322 v16u8 mask0, mask1, mask2, mask3,
out;
323 v8i16
filt, out0, out1, out2, out3;
329 filt =
LD_SH(filter);
330 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
336 for (loop_cnt = (height >> 1); loop_cnt--;) {
337 LD_SB2(src, src_stride, src0, src2);
338 LD_SB2(src + 8, src_stride, src1, src3);
340 src += (2 * src_stride);
342 mask3, filt0, filt1, filt2, filt3, out0,
360 v16i8
src0,
src1, src2, src3, filt0, filt1, filt2, filt3;
361 v16u8 mask0, mask1, mask2, mask3,
out;
362 v8i16
filt, out0, out1, out2, out3;
368 filt =
LD_SH(filter);
369 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
375 for (loop_cnt = (height >> 1); loop_cnt--;) {
377 src2 =
LD_SB(src + 16);
378 src3 =
LD_SB(src + 24);
379 src1 = __msa_sldi_b(src2, src0, 8);
383 mask3, filt0, filt1, filt2, filt3, out0,
389 src2 =
LD_SB(src + 16);
390 src3 =
LD_SB(src + 24);
391 src1 = __msa_sldi_b(src2, src0, 8);
397 ST_UB(out, dst + 16);
402 mask3, filt0, filt1, filt2, filt3, out0,
409 ST_UB(out, dst + 16);
419 v16i8
src0,
src1, src2, src3, filt0, filt1, filt2, filt3;
420 v16u8 mask0, mask1, mask2, mask3,
out;
421 v8i16
filt, out0, out1, out2, out3;
427 filt =
LD_SH(filter);
428 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
434 for (loop_cnt = height; loop_cnt--;) {
436 src2 =
LD_SB(src + 16);
437 src3 =
LD_SB(src + 24);
438 src1 = __msa_sldi_b(src2, src0, 8);
442 mask2, mask3, filt0, filt1, filt2, filt3,
443 out0, out1, out2, out3);
449 ST_UB(out, dst + 16);
451 src0 =
LD_SB(src + 32);
452 src2 =
LD_SB(src + 48);
453 src3 =
LD_SB(src + 56);
454 src1 = __msa_sldi_b(src2, src0, 8);
459 mask2, mask3, filt0, filt1, filt2, filt3,
460 out0, out1, out2, out3);
464 ST_UB(out, dst + 32);
466 ST_UB(out, dst + 48);
476 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9, src10;
477 v16i8 src10_r, src32_r, src54_r, src76_r, src98_r, src21_r, src43_r;
478 v16i8 src65_r, src87_r, src109_r, src2110, src4332, src6554, src8776;
479 v16i8 src10998, filt0, filt1, filt2, filt3;
481 v8i16
filt, out10, out32;
483 src -= (3 * src_stride);
485 filt =
LD_SH(filter);
486 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
488 LD_SB7(src, src_stride, src0, src1, src2, src3, src4, src5, src6);
489 src += (7 * src_stride);
491 ILVR_B4_SB(src1, src0, src3, src2, src5, src4, src2, src1, src10_r, src32_r,
493 ILVR_B2_SB(src4, src3, src6, src5, src43_r, src65_r);
494 ILVR_D3_SB(src21_r, src10_r, src43_r, src32_r, src65_r, src54_r, src2110,
498 for (loop_cnt = (height >> 2); loop_cnt--;) {
499 LD_SB4(src, src_stride, src7, src8, src9, src10);
500 src += (4 * src_stride);
502 ILVR_B4_SB(src7, src6, src8, src7, src9, src8, src10, src9, src76_r,
503 src87_r, src98_r, src109_r);
504 ILVR_D2_SB(src87_r, src76_r, src109_r, src98_r, src8776, src10998);
507 filt1, filt2, filt3);
509 filt1, filt2, filt3);
513 ST4x4_UB(out, out, 0, 1, 2, 3, dst, dst_stride);
514 dst += (4 * dst_stride);
528 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9, src10;
529 v16i8 src10_r, src32_r, src54_r, src76_r, src98_r, src21_r, src43_r;
530 v16i8 src65_r, src87_r, src109_r, filt0, filt1, filt2, filt3;
532 v8i16
filt, out0_r, out1_r, out2_r, out3_r;
534 src -= (3 * src_stride);
536 filt =
LD_SH(filter);
537 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
539 LD_SB7(src, src_stride, src0, src1, src2, src3, src4, src5, src6);
541 src += (7 * src_stride);
542 ILVR_B4_SB(src1, src0, src3, src2, src5, src4, src2, src1, src10_r, src32_r,
544 ILVR_B2_SB(src4, src3, src6, src5, src43_r, src65_r);
546 for (loop_cnt = (height >> 2); loop_cnt--;) {
547 LD_SB4(src, src_stride, src7, src8, src9, src10);
549 src += (4 * src_stride);
551 ILVR_B4_SB(src7, src6, src8, src7, src9, src8, src10, src9, src76_r,
552 src87_r, src98_r, src109_r);
554 filt1, filt2, filt3);
556 filt1, filt2, filt3);
558 filt1, filt2, filt3);
560 filt1, filt2, filt3);
562 SAT_SH4_SH(out0_r, out1_r, out2_r, out3_r, 7);
565 ST8x4_UB(tmp0, tmp1, dst, dst_stride);
566 dst += (4 * dst_stride);
583 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9, src10;
584 v16i8 filt0, filt1, filt2, filt3;
585 v16i8 src10_r, src32_r, src54_r, src76_r, src98_r, src21_r, src43_r;
586 v16i8 src65_r, src87_r, src109_r, src10_l, src32_l, src54_l, src76_l;
587 v16i8 src98_l, src21_l, src43_l, src65_l, src87_l, src109_l;
588 v16u8 tmp0, tmp1, tmp2, tmp3;
589 v8i16
filt, out0_r, out1_r, out2_r, out3_r, out0_l, out1_l, out2_l, out3_l;
591 src -= (3 * src_stride);
593 filt =
LD_SH(filter);
594 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
596 LD_SB7(src, src_stride, src0, src1, src2, src3, src4, src5, src6);
598 src += (7 * src_stride);
599 ILVR_B4_SB(src1, src0, src3, src2, src5, src4, src2, src1, src10_r, src32_r,
601 ILVR_B2_SB(src4, src3, src6, src5, src43_r, src65_r);
602 ILVL_B4_SB(src1, src0, src3, src2, src5, src4, src2, src1, src10_l, src32_l,
604 ILVL_B2_SB(src4, src3, src6, src5, src43_l, src65_l);
606 for (loop_cnt = (height >> 2); loop_cnt--;) {
607 LD_SB4(src, src_stride, src7, src8, src9, src10);
609 src += (4 * src_stride);
611 ILVR_B4_SB(src7, src6, src8, src7, src9, src8, src10, src9, src76_r,
612 src87_r, src98_r, src109_r);
613 ILVL_B4_SB(src7, src6, src8, src7, src9, src8, src10, src9, src76_l,
614 src87_l, src98_l, src109_l);
616 filt1, filt2, filt3);
618 filt1, filt2, filt3);
620 filt1, filt2, filt3);
622 filt1, filt2, filt3);
624 filt1, filt2, filt3);
626 filt1, filt2, filt3);
628 filt1, filt2, filt3);
630 filt1, filt2, filt3);
633 SAT_SH4_SH(out0_r, out1_r, out2_r, out3_r, 7);
634 SAT_SH4_SH(out0_l, out1_l, out2_l, out3_l, 7);
635 PCKEV_B4_UB(out0_l, out0_r, out1_l, out1_r, out2_l, out2_r, out3_l,
636 out3_r, tmp0, tmp1, tmp2, tmp3);
638 ST_UB4(tmp0, tmp1, tmp2, tmp3, dst, dst_stride);
639 dst += (4 * dst_stride);
664 uint32_t loop_cnt, cnt;
665 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9, src10;
666 v16i8 filt0, filt1, filt2, filt3;
667 v16i8 src10_r, src32_r, src54_r, src76_r, src98_r, src21_r, src43_r;
668 v16i8 src65_r, src87_r, src109_r, src10_l, src32_l, src54_l, src76_l;
669 v16i8 src98_l, src21_l, src43_l, src65_l, src87_l, src109_l;
670 v16u8 tmp0, tmp1, tmp2, tmp3;
671 v8i16
filt, out0_r, out1_r, out2_r, out3_r, out0_l, out1_l, out2_l, out3_l;
673 src -= (3 * src_stride);
675 filt =
LD_SH(filter);
676 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
678 for (cnt = (width >> 4); cnt--;) {
682 LD_SB7(src_tmp, src_stride, src0, src1, src2, src3, src4, src5, src6);
684 src_tmp += (7 * src_stride);
685 ILVR_B4_SB(src1, src0, src3, src2, src5, src4, src2, src1, src10_r,
686 src32_r, src54_r, src21_r);
687 ILVR_B2_SB(src4, src3, src6, src5, src43_r, src65_r);
688 ILVL_B4_SB(src1, src0, src3, src2, src5, src4, src2, src1, src10_l,
689 src32_l, src54_l, src21_l);
690 ILVL_B2_SB(src4, src3, src6, src5, src43_l, src65_l);
692 for (loop_cnt = (height >> 2); loop_cnt--;) {
693 LD_SB4(src_tmp, src_stride, src7, src8, src9, src10);
695 src_tmp += (4 * src_stride);
696 ILVR_B4_SB(src7, src6, src8, src7, src9, src8, src10, src9, src76_r,
697 src87_r, src98_r, src109_r);
698 ILVL_B4_SB(src7, src6, src8, src7, src9, src8, src10, src9, src76_l,
699 src87_l, src98_l, src109_l);
701 filt0, filt1, filt2, filt3);
703 filt0, filt1, filt2, filt3);
705 filt0, filt1, filt2, filt3);
707 filt0, filt1, filt2, filt3);
709 filt0, filt1, filt2, filt3);
711 filt0, filt1, filt2, filt3);
713 filt0, filt1, filt2, filt3);
715 filt0, filt1, filt2, filt3);
718 SAT_SH4_SH(out0_r, out1_r, out2_r, out3_r, 7);
719 SAT_SH4_SH(out0_l, out1_l, out2_l, out3_l, 7);
720 PCKEV_B4_UB(out0_l, out0_r, out1_l, out1_r, out2_l, out2_r, out3_l,
721 out3_r, tmp0, tmp1, tmp2, tmp3);
723 ST_UB4(tmp0, tmp1, tmp2, tmp3, dst_tmp, dst_stride);
724 dst_tmp += (4 * dst_stride);
764 const int8_t *filter_horiz,
765 const int8_t *filter_vert,
769 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9, src10;
770 v16i8 filt_hz0, filt_hz1, filt_hz2, filt_hz3;
771 v16u8 mask0, mask1, mask2, mask3,
out;
772 v8i16 hz_out0, hz_out1, hz_out2, hz_out3, hz_out4, hz_out5, hz_out6;
773 v8i16 hz_out7, hz_out8, hz_out9, tmp0, tmp1, out0, out1, out2, out3, out4;
774 v8i16
filt, filt_vt0, filt_vt1, filt_vt2, filt_vt3;
777 src -= (3 + 3 * src_stride);
780 filt =
LD_SH(filter_horiz);
781 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt_hz0, filt_hz1, filt_hz2, filt_hz3);
787 LD_SB7(src, src_stride, src0, src1, src2, src3, src4, src5, src6);
789 src += (7 * src_stride);
791 hz_out0 =
HORIZ_8TAP_FILT(src0, src1, mask0, mask1, mask2, mask3, filt_hz0,
792 filt_hz1, filt_hz2, filt_hz3);
793 hz_out2 =
HORIZ_8TAP_FILT(src2, src3, mask0, mask1, mask2, mask3, filt_hz0,
794 filt_hz1, filt_hz2, filt_hz3);
795 hz_out4 =
HORIZ_8TAP_FILT(src4, src5, mask0, mask1, mask2, mask3, filt_hz0,
796 filt_hz1, filt_hz2, filt_hz3);
797 hz_out5 =
HORIZ_8TAP_FILT(src5, src6, mask0, mask1, mask2, mask3, filt_hz0,
798 filt_hz1, filt_hz2, filt_hz3);
799 SLDI_B2_SH(hz_out2, hz_out4, hz_out0, hz_out2, hz_out1, hz_out3, 8);
801 filt =
LD_SH(filter_vert);
802 SPLATI_H4_SH(filt, 0, 1, 2, 3, filt_vt0, filt_vt1, filt_vt2, filt_vt3);
804 ILVEV_B2_SH(hz_out0, hz_out1, hz_out2, hz_out3, out0, out1);
805 out2 = (v8i16) __msa_ilvev_b((v16i8) hz_out5, (v16i8) hz_out4);
807 for (loop_cnt = (height >> 2); loop_cnt--;) {
808 LD_SB4(src, src_stride, src7, src8, src9, src10);
810 src += (4 * src_stride);
813 filt_hz0, filt_hz1, filt_hz2, filt_hz3);
814 hz_out6 = (v8i16) __msa_sldi_b((v16i8) hz_out7, (v16i8) hz_out5, 8);
815 out3 = (v8i16) __msa_ilvev_b((v16i8) hz_out7, (v16i8) hz_out6);
820 filt_hz0, filt_hz1, filt_hz2, filt_hz3);
821 hz_out8 = (v8i16) __msa_sldi_b((v16i8) hz_out9, (v16i8) hz_out7, 8);
822 out4 = (v8i16) __msa_ilvev_b((v16i8) hz_out9, (v16i8) hz_out8);
828 ST4x4_UB(out, out, 0, 1, 2, 3, dst, dst_stride);
829 dst += (4 * dst_stride);
840 const int8_t *filter_horiz,
841 const int8_t *filter_vert,
845 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9, src10;
846 v16i8 filt_hz0, filt_hz1, filt_hz2, filt_hz3;
847 v16u8 mask0, mask1, mask2, mask3, vec0, vec1;
848 v8i16
filt, filt_vt0, filt_vt1, filt_vt2, filt_vt3;
849 v8i16 hz_out0, hz_out1, hz_out2, hz_out3, hz_out4, hz_out5, hz_out6;
850 v8i16 hz_out7, hz_out8, hz_out9, hz_out10, tmp0, tmp1, tmp2, tmp3;
851 v8i16 out0, out1, out2, out3, out4, out5, out6, out7, out8, out9;
854 src -= (3 + 3 * src_stride);
857 filt =
LD_SH(filter_horiz);
858 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt_hz0, filt_hz1, filt_hz2, filt_hz3);
864 LD_SB7(src, src_stride, src0, src1, src2, src3, src4, src5, src6);
865 src += (7 * src_stride);
868 hz_out0 =
HORIZ_8TAP_FILT(src0, src0, mask0, mask1, mask2, mask3, filt_hz0,
869 filt_hz1, filt_hz2, filt_hz3);
870 hz_out1 =
HORIZ_8TAP_FILT(src1, src1, mask0, mask1, mask2, mask3, filt_hz0,
871 filt_hz1, filt_hz2, filt_hz3);
872 hz_out2 =
HORIZ_8TAP_FILT(src2, src2, mask0, mask1, mask2, mask3, filt_hz0,
873 filt_hz1, filt_hz2, filt_hz3);
874 hz_out3 =
HORIZ_8TAP_FILT(src3, src3, mask0, mask1, mask2, mask3, filt_hz0,
875 filt_hz1, filt_hz2, filt_hz3);
876 hz_out4 =
HORIZ_8TAP_FILT(src4, src4, mask0, mask1, mask2, mask3, filt_hz0,
877 filt_hz1, filt_hz2, filt_hz3);
878 hz_out5 =
HORIZ_8TAP_FILT(src5, src5, mask0, mask1, mask2, mask3, filt_hz0,
879 filt_hz1, filt_hz2, filt_hz3);
880 hz_out6 =
HORIZ_8TAP_FILT(src6, src6, mask0, mask1, mask2, mask3, filt_hz0,
881 filt_hz1, filt_hz2, filt_hz3);
883 filt =
LD_SH(filter_vert);
884 SPLATI_H4_SH(filt, 0, 1, 2, 3, filt_vt0, filt_vt1, filt_vt2, filt_vt3);
886 ILVEV_B2_SH(hz_out0, hz_out1, hz_out2, hz_out3, out0, out1);
887 ILVEV_B2_SH(hz_out4, hz_out5, hz_out1, hz_out2, out2, out4);
888 ILVEV_B2_SH(hz_out3, hz_out4, hz_out5, hz_out6, out5, out6);
890 for (loop_cnt = (height >> 2); loop_cnt--;) {
891 LD_SB4(src, src_stride, src7, src8, src9, src10);
892 src += (4 * src_stride);
897 filt_hz0, filt_hz1, filt_hz2, filt_hz3);
898 out3 = (v8i16) __msa_ilvev_b((v16i8) hz_out7, (v16i8) hz_out6);
903 filt_hz0, filt_hz1, filt_hz2, filt_hz3);
904 out7 = (v8i16) __msa_ilvev_b((v16i8) hz_out8, (v16i8) hz_out7);
909 filt_hz0, filt_hz1, filt_hz2, filt_hz3);
910 out8 = (v8i16) __msa_ilvev_b((v16i8) hz_out9, (v16i8) hz_out8);
912 filt_vt1, filt_vt2, filt_vt3);
915 filt_hz0, filt_hz1, filt_hz2, filt_hz3);
916 out9 = (v8i16) __msa_ilvev_b((v16i8) hz_out10, (v16i8) hz_out9);
923 ST8x4_UB(vec0, vec1, dst, dst_stride);
924 dst += (4 * dst_stride);
938 const int8_t *filter_horiz,
939 const int8_t *filter_vert,
944 for (multiple8_cnt = 2; multiple8_cnt--;) {
946 filter_vert, height);
955 const int8_t *filter_horiz,
956 const int8_t *filter_vert,
961 for (multiple8_cnt = 4; multiple8_cnt--;) {
963 filter_vert, height);
972 const int8_t *filter_horiz,
973 const int8_t *filter_vert,
978 for (multiple8_cnt = 8; multiple8_cnt--;) {
980 filter_vert, height);
992 uint32_t tp0, tp1, tp2, tp3;
993 v16i8
src0,
src1, src2, src3, filt0, filt1, filt2, filt3;
995 v16u8 mask0, mask1, mask2, mask3;
996 v8i16
filt, res0, res1;
1002 filt =
LD_SH(filter);
1003 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
1009 LD_SB4(src, src_stride, src0, src1, src2, src3);
1012 mask3, filt0, filt1, filt2, filt3, res0, res1);
1013 LW4(dst, dst_stride, tp0, tp1, tp2, tp3);
1018 res = (v16u8) __msa_aver_u_b(res, dst0);
1019 ST4x4_UB(res, res, 0, 1, 2, 3, dst, dst_stride);
1027 uint32_t tp0, tp1, tp2, tp3;
1028 v16i8
src0,
src1, src2, src3, filt0, filt1, filt2, filt3;
1029 v16u8 mask0, mask1, mask2, mask3, res0, res1, res2, res3;
1031 v8i16
filt, vec0, vec1, vec2, vec3;
1037 filt =
LD_SH(filter);
1038 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
1044 LD_SB4(src, src_stride, src0, src1, src2, src3);
1046 src += (4 * src_stride);
1047 LW4(dst, dst_stride, tp0, tp1, tp2, tp3);
1049 LW4(dst + 4 * dst_stride, dst_stride, tp0, tp1, tp2, tp3);
1052 mask3, filt0, filt1, filt2, filt3, vec0, vec1);
1053 LD_SB4(src, src_stride, src0, src1, src2, src3);
1056 mask3, filt0, filt1, filt2, filt3, vec2, vec3);
1059 PCKEV_B4_UB(vec0, vec0, vec1, vec1, vec2, vec2, vec3, vec3,
1060 res0, res1, res2, res3);
1061 ILVR_D2_UB(res1, res0, res3, res2, res0, res2);
1064 ST4x8_UB(res0, res2, dst, dst_stride);
1076 }
else if (8 == height) {
1089 int64_t tp0, tp1, tp2, tp3;
1090 v16i8
src0,
src1, src2, src3, filt0, filt1, filt2, filt3;
1091 v16u8 mask0, mask1, mask2, mask3, dst0, dst1;
1092 v8i16
filt, out0, out1, out2, out3;
1098 filt =
LD_SH(filter);
1099 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
1105 for (loop_cnt = (height >> 2); loop_cnt--;) {
1106 LD_SB4(src, src_stride, src0, src1, src2, src3);
1108 src += (4 * src_stride);
1110 mask3, filt0, filt1, filt2, filt3, out0,
1112 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
1119 dst += (4 * dst_stride);
1130 v16i8
src0,
src1, src2, src3, filt0, filt1, filt2, filt3;
1131 v16u8 mask0, mask1, mask2, mask3, dst0, dst1;
1132 v8i16
filt, out0, out1, out2, out3;
1133 v8i16 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7;
1134 v8i16 vec8, vec9, vec10, vec11, vec12, vec13, vec14, vec15;
1140 filt =
LD_SH(filter);
1141 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
1147 for (loop_cnt = height >> 1; loop_cnt--;) {
1148 LD_SB2(src, src_stride, src0, src2);
1149 LD_SB2(src + 8, src_stride, src1, src3);
1150 src += (2 * src_stride);
1153 VSHF_B4_SH(src0, src0, mask0, mask1, mask2, mask3, vec0, vec4, vec8,
1155 VSHF_B4_SH(src1, src1, mask0, mask1, mask2, mask3, vec1, vec5, vec9,
1157 VSHF_B4_SH(src2, src2, mask0, mask1, mask2, mask3, vec2, vec6, vec10,
1159 VSHF_B4_SH(src3, src3, mask0, mask1, mask2, mask3, vec3, vec7, vec11,
1161 DOTP_SB4_SH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0, vec0,
1163 DOTP_SB4_SH(vec8, vec9, vec10, vec11, filt2, filt2, filt2, filt2, vec8,
1164 vec9, vec10, vec11);
1165 DPADD_SB4_SH(vec4, vec5, vec6, vec7, filt1, filt1, filt1, filt1, vec0,
1167 DPADD_SB4_SH(vec12, vec13, vec14, vec15, filt3, filt3, filt3, filt3,
1168 vec8, vec9, vec10, vec11);
1169 ADDS_SH4_SH(vec0, vec8, vec1, vec9, vec2, vec10, vec3, vec11, out0,
1171 LD_UB2(dst, dst_stride, dst0, dst1);
1188 v16i8
src0,
src1, src2, src3, filt0, filt1, filt2, filt3;
1189 v16u8 dst1, dst2, mask0, mask1, mask2, mask3;
1190 v8i16
filt, out0, out1, out2, out3;
1191 v8i16 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7;
1192 v8i16 vec8, vec9, vec10, vec11, vec12, vec13, vec14, vec15;
1198 filt =
LD_SH(filter);
1199 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
1205 for (loop_cnt = height; loop_cnt--;) {
1207 src2 =
LD_SB(src + 16);
1208 src3 =
LD_SB(src + 24);
1209 src1 = __msa_sldi_b(src2, src0, 8);
1213 VSHF_B4_SH(src0, src0, mask0, mask1, mask2, mask3, vec0, vec4, vec8,
1215 VSHF_B4_SH(src1, src1, mask0, mask1, mask2, mask3, vec1, vec5, vec9,
1217 VSHF_B4_SH(src2, src2, mask0, mask1, mask2, mask3, vec2, vec6, vec10,
1219 VSHF_B4_SH(src3, src3, mask0, mask1, mask2, mask3, vec3, vec7, vec11,
1221 DOTP_SB4_SH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0, vec0,
1223 DOTP_SB4_SH(vec8, vec9, vec10, vec11, filt2, filt2, filt2, filt2, vec8,
1224 vec9, vec10, vec11);
1225 DPADD_SB4_SH(vec4, vec5, vec6, vec7, filt1, filt1, filt1, filt1, vec0,
1227 DPADD_SB4_SH(vec12, vec13, vec14, vec15, filt3, filt3, filt3, filt3,
1228 vec8, vec9, vec10, vec11);
1229 ADDS_SH4_SH(vec0, vec8, vec1, vec9, vec2, vec10, vec3, vec11, out0,
1233 LD_UB2(dst, 16, dst1, dst2);
1246 uint32_t loop_cnt, cnt;
1247 v16i8
src0,
src1, src2, src3, filt0, filt1, filt2, filt3;
1248 v16u8 dst1, dst2, mask0, mask1, mask2, mask3;
1249 v8i16
filt, out0, out1, out2, out3;
1250 v8i16 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7;
1251 v8i16 vec8, vec9, vec10, vec11, vec12, vec13, vec14, vec15;
1257 filt =
LD_SH(filter);
1258 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
1264 for (loop_cnt = height; loop_cnt--;) {
1265 for (cnt = 0; cnt < 2; ++cnt) {
1266 src0 =
LD_SB(&src[cnt << 5]);
1267 src2 =
LD_SB(&src[16 + (cnt << 5)]);
1268 src3 =
LD_SB(&src[24 + (cnt << 5)]);
1269 src1 = __msa_sldi_b(src2, src0, 8);
1272 VSHF_B4_SH(src0, src0, mask0, mask1, mask2, mask3, vec0, vec4, vec8,
1274 VSHF_B4_SH(src1, src1, mask0, mask1, mask2, mask3, vec1, vec5, vec9,
1276 VSHF_B4_SH(src2, src2, mask0, mask1, mask2, mask3, vec2, vec6,
1278 VSHF_B4_SH(src3, src3, mask0, mask1, mask2, mask3, vec3, vec7,
1280 DOTP_SB4_SH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
1281 vec0, vec1, vec2, vec3);
1282 DOTP_SB4_SH(vec8, vec9, vec10, vec11, filt2, filt2, filt2, filt2,
1283 vec8, vec9, vec10, vec11);
1284 DPADD_SB4_SH(vec4, vec5, vec6, vec7, filt1, filt1, filt1, filt1,
1285 vec0, vec1, vec2, vec3);
1286 DPADD_SB4_SH(vec12, vec13, vec14, vec15, filt3, filt3, filt3, filt3,
1287 vec8, vec9, vec10, vec11);
1288 ADDS_SH4_SH(vec0, vec8, vec1, vec9, vec2, vec10, vec3, vec11, out0,
1292 LD_UB2(&dst[cnt << 5], 16, dst1, dst2);
1309 uint32_t tp0, tp1, tp2, tp3;
1310 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9, src10;
1312 v16i8 src10_r, src32_r, src54_r, src76_r, src98_r, src21_r, src43_r;
1313 v16i8 src65_r, src87_r, src109_r, src2110, src4332, src6554, src8776;
1314 v16i8 src10998, filt0, filt1, filt2, filt3;
1315 v8i16
filt, out10, out32;
1317 src -= (3 * src_stride);
1319 filt =
LD_SH(filter);
1320 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
1322 LD_SB7(src, src_stride, src0, src1, src2, src3, src4, src5, src6);
1323 src += (7 * src_stride);
1325 ILVR_B4_SB(src1, src0, src3, src2, src5, src4, src2, src1, src10_r, src32_r,
1327 ILVR_B2_SB(src4, src3, src6, src5, src43_r, src65_r);
1328 ILVR_D3_SB(src21_r, src10_r, src43_r, src32_r, src65_r, src54_r, src2110,
1332 for (loop_cnt = (height >> 2); loop_cnt--;) {
1333 LD_SB4(src, src_stride, src7, src8, src9, src10);
1334 src += (4 * src_stride);
1336 LW4(dst, dst_stride, tp0, tp1, tp2, tp3);
1338 ILVR_B4_SB(src7, src6, src8, src7, src9, src8, src10, src9, src76_r,
1339 src87_r, src98_r, src109_r);
1340 ILVR_D2_SB(src87_r, src76_r, src109_r, src98_r, src8776, src10998);
1343 filt1, filt2, filt3);
1345 filt1, filt2, filt3);
1349 out = __msa_aver_u_b(out, dst0);
1351 ST4x4_UB(out, out, 0, 1, 2, 3, dst, dst_stride);
1352 dst += (4 * dst_stride);
1368 uint64_t tp0, tp1, tp2, tp3;
1369 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9, src10;
1371 v16i8 src10_r, src32_r, src54_r, src76_r, src98_r, src21_r, src43_r;
1372 v16i8 src65_r, src87_r, src109_r, filt0, filt1, filt2, filt3;
1373 v8i16
filt, out0, out1, out2, out3;
1375 src -= (3 * src_stride);
1377 filt =
LD_SH(filter);
1378 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
1380 LD_SB7(src, src_stride, src0, src1, src2, src3, src4, src5, src6);
1381 src += (7 * src_stride);
1384 ILVR_B4_SB(src1, src0, src3, src2, src5, src4, src2, src1, src10_r, src32_r,
1386 ILVR_B2_SB(src4, src3, src6, src5, src43_r, src65_r);
1388 for (loop_cnt = (height >> 2); loop_cnt--;) {
1389 LD_SB4(src, src_stride, src7, src8, src9, src10);
1390 src += (4 * src_stride);
1392 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
1396 ILVR_B4_SB(src7, src6, src8, src7, src9, src8, src10, src9, src76_r,
1397 src87_r, src98_r, src109_r);
1399 filt1, filt2, filt3);
1401 filt1, filt2, filt3);
1403 filt1, filt2, filt3);
1405 filt1, filt2, filt3);
1410 dst += (4 * dst_stride);
1432 uint32_t loop_cnt, cnt;
1433 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9, src10;
1434 v16i8 src10_r, src32_r, src54_r, src76_r, src98_r, src21_r, src43_r;
1435 v16i8 src65_r, src87_r, src109_r, src10_l, src32_l, src54_l, src76_l;
1436 v16i8 src98_l, src21_l, src43_l, src65_l, src87_l, src109_l;
1437 v16i8 filt0, filt1, filt2, filt3;
1438 v16u8 dst0, dst1, dst2, dst3, tmp0, tmp1, tmp2, tmp3;
1439 v8i16 out0_r, out1_r, out2_r, out3_r, out0_l, out1_l, out2_l, out3_l,
filt;
1441 src -= (3 * src_stride);
1443 filt =
LD_SH(filter);
1444 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt0, filt1, filt2, filt3);
1446 for (cnt = (width >> 4); cnt--;) {
1450 LD_SB7(src_tmp, src_stride, src0, src1, src2, src3, src4, src5, src6);
1452 src_tmp += (7 * src_stride);
1454 ILVR_B4_SB(src1, src0, src3, src2, src5, src4, src2, src1, src10_r,
1455 src32_r, src54_r, src21_r);
1456 ILVR_B2_SB(src4, src3, src6, src5, src43_r, src65_r);
1457 ILVL_B4_SB(src1, src0, src3, src2, src5, src4, src2, src1, src10_l,
1458 src32_l, src54_l, src21_l);
1459 ILVL_B2_SB(src4, src3, src6, src5, src43_l, src65_l);
1461 for (loop_cnt = (height >> 2); loop_cnt--;) {
1462 LD_SB4(src_tmp, src_stride, src7, src8, src9, src10);
1463 src_tmp += (4 * src_stride);
1465 LD_UB4(dst_tmp, dst_stride, dst0, dst1, dst2, dst3);
1467 ILVR_B4_SB(src7, src6, src8, src7, src9, src8, src10, src9, src76_r,
1468 src87_r, src98_r, src109_r);
1469 ILVL_B4_SB(src7, src6, src8, src7, src9, src8, src10, src9, src76_l,
1470 src87_l, src98_l, src109_l);
1472 filt0, filt1, filt2, filt3);
1474 filt0, filt1, filt2, filt3);
1476 filt0, filt1, filt2, filt3);
1478 filt0, filt1, filt2, filt3);
1480 filt0, filt1, filt2, filt3);
1482 filt0, filt1, filt2, filt3);
1484 filt0, filt1, filt2, filt3);
1486 filt0, filt1, filt2, filt3);
1489 SAT_SH4_SH(out0_r, out1_r, out2_r, out3_r, 7);
1490 SAT_SH4_SH(out0_l, out1_l, out2_l, out3_l, 7);
1491 PCKEV_B4_UB(out0_l, out0_r, out1_l, out1_r, out2_l, out2_r, out3_l,
1492 out3_r, tmp0, tmp1, tmp2, tmp3);
1494 AVER_UB4_UB(tmp0, dst0, tmp1, dst1, tmp2, dst2, tmp3, dst3,
1495 dst0, dst1, dst2, dst3);
1496 ST_UB4(dst0, dst1, dst2, dst3, dst_tmp, dst_stride);
1497 dst_tmp += (4 * dst_stride);
1526 filter, height, 16);
1536 filter, height, 32);
1546 filter, height, 64);
1553 const int8_t *filter_horiz,
1554 const int8_t *filter_vert,
1558 uint32_t tp0, tp1, tp2, tp3;
1559 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9, src10;
1560 v16u8 dst0, res, mask0, mask1, mask2, mask3;
1561 v16i8 filt_hz0, filt_hz1, filt_hz2, filt_hz3;
1562 v8i16 hz_out0, hz_out1, hz_out2, hz_out3, hz_out4, hz_out5, hz_out6;
1563 v8i16 hz_out7, hz_out8, hz_out9, res0, res1, vec0, vec1, vec2, vec3, vec4;
1564 v8i16
filt, filt_vt0, filt_vt1, filt_vt2, filt_vt3;
1567 src -= (3 + 3 * src_stride);
1570 filt =
LD_SH(filter_horiz);
1571 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt_hz0, filt_hz1, filt_hz2, filt_hz3);
1577 LD_SB7(src, src_stride, src0, src1, src2, src3, src4, src5, src6);
1579 src += (7 * src_stride);
1581 hz_out0 =
HORIZ_8TAP_FILT(src0, src1, mask0, mask1, mask2, mask3, filt_hz0,
1582 filt_hz1, filt_hz2, filt_hz3);
1583 hz_out2 =
HORIZ_8TAP_FILT(src2, src3, mask0, mask1, mask2, mask3, filt_hz0,
1584 filt_hz1, filt_hz2, filt_hz3);
1585 hz_out4 =
HORIZ_8TAP_FILT(src4, src5, mask0, mask1, mask2, mask3, filt_hz0,
1586 filt_hz1, filt_hz2, filt_hz3);
1587 hz_out5 =
HORIZ_8TAP_FILT(src5, src6, mask0, mask1, mask2, mask3, filt_hz0,
1588 filt_hz1, filt_hz2, filt_hz3);
1589 SLDI_B2_SH(hz_out2, hz_out4, hz_out0, hz_out2, hz_out1, hz_out3, 8);
1591 filt =
LD_SH(filter_vert);
1592 SPLATI_H4_SH(filt, 0, 1, 2, 3, filt_vt0, filt_vt1, filt_vt2, filt_vt3);
1594 ILVEV_B2_SH(hz_out0, hz_out1, hz_out2, hz_out3, vec0, vec1);
1595 vec2 = (v8i16) __msa_ilvev_b((v16i8) hz_out5, (v16i8) hz_out4);
1597 for (loop_cnt = (height >> 2); loop_cnt--;) {
1598 LD_SB4(src, src_stride, src7, src8, src9, src10);
1600 src += (4 * src_stride);
1602 LW4(dst, dst_stride, tp0, tp1, tp2, tp3);
1605 filt_hz0, filt_hz1, filt_hz2, filt_hz3);
1606 hz_out6 = (v8i16) __msa_sldi_b((v16i8) hz_out7, (v16i8) hz_out5, 8);
1607 vec3 = (v8i16) __msa_ilvev_b((v16i8) hz_out7, (v16i8) hz_out6);
1609 filt_vt2, filt_vt3);
1612 filt_hz0, filt_hz1, filt_hz2, filt_hz3);
1613 hz_out8 = (v8i16) __msa_sldi_b((v16i8) hz_out9, (v16i8) hz_out7, 8);
1614 vec4 = (v8i16) __msa_ilvev_b((v16i8) hz_out9, (v16i8) hz_out8);
1616 filt_vt2, filt_vt3);
1621 res = (v16u8) __msa_aver_u_b(res, dst0);
1622 ST4x4_UB(res, res, 0, 1, 2, 3, dst, dst_stride);
1623 dst += (4 * dst_stride);
1636 const int8_t *filter_horiz,
1637 const int8_t *filter_vert,
1641 uint64_t tp0, tp1, tp2, tp3;
1642 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9, src10;
1643 v16i8 filt_hz0, filt_hz1, filt_hz2, filt_hz3;
1644 v8i16
filt, filt_vt0, filt_vt1, filt_vt2, filt_vt3;
1645 v16u8 dst0, dst1, mask0, mask1, mask2, mask3;
1646 v8i16 hz_out0, hz_out1, hz_out2, hz_out3, hz_out4, hz_out5, hz_out6;
1647 v8i16 hz_out7, hz_out8, hz_out9, hz_out10, tmp0, tmp1, tmp2, tmp3;
1648 v8i16 out0, out1, out2, out3, out4, out5, out6, out7, out8, out9;
1651 src -= (3 + 3 * src_stride);
1654 filt =
LD_SH(filter_horiz);
1655 SPLATI_H4_SB(filt, 0, 1, 2, 3, filt_hz0, filt_hz1, filt_hz2, filt_hz3);
1661 LD_SB7(src, src_stride, src0, src1, src2, src3, src4, src5, src6);
1662 src += (7 * src_stride);
1665 hz_out0 =
HORIZ_8TAP_FILT(src0, src0, mask0, mask1, mask2, mask3, filt_hz0,
1666 filt_hz1, filt_hz2, filt_hz3);
1667 hz_out1 =
HORIZ_8TAP_FILT(src1, src1, mask0, mask1, mask2, mask3, filt_hz0,
1668 filt_hz1, filt_hz2, filt_hz3);
1669 hz_out2 =
HORIZ_8TAP_FILT(src2, src2, mask0, mask1, mask2, mask3, filt_hz0,
1670 filt_hz1, filt_hz2, filt_hz3);
1671 hz_out3 =
HORIZ_8TAP_FILT(src3, src3, mask0, mask1, mask2, mask3, filt_hz0,
1672 filt_hz1, filt_hz2, filt_hz3);
1673 hz_out4 =
HORIZ_8TAP_FILT(src4, src4, mask0, mask1, mask2, mask3, filt_hz0,
1674 filt_hz1, filt_hz2, filt_hz3);
1675 hz_out5 =
HORIZ_8TAP_FILT(src5, src5, mask0, mask1, mask2, mask3, filt_hz0,
1676 filt_hz1, filt_hz2, filt_hz3);
1677 hz_out6 =
HORIZ_8TAP_FILT(src6, src6, mask0, mask1, mask2, mask3, filt_hz0,
1678 filt_hz1, filt_hz2, filt_hz3);
1680 filt =
LD_SH(filter_vert);
1681 SPLATI_H4_SH(filt, 0, 1, 2, 3, filt_vt0, filt_vt1, filt_vt2, filt_vt3);
1683 ILVEV_B2_SH(hz_out0, hz_out1, hz_out2, hz_out3, out0, out1);
1684 ILVEV_B2_SH(hz_out4, hz_out5, hz_out1, hz_out2, out2, out4);
1685 ILVEV_B2_SH(hz_out3, hz_out4, hz_out5, hz_out6, out5, out6);
1687 for (loop_cnt = (height >> 2); loop_cnt--;) {
1688 LD_SB4(src, src_stride, src7, src8, src9, src10);
1690 src += (4 * src_stride);
1692 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
1697 filt_hz0, filt_hz1, filt_hz2, filt_hz3);
1698 out3 = (v8i16) __msa_ilvev_b((v16i8) hz_out7, (v16i8) hz_out6);
1700 filt_vt2, filt_vt3);
1703 filt_hz0, filt_hz1, filt_hz2, filt_hz3);
1704 out7 = (v8i16) __msa_ilvev_b((v16i8) hz_out8, (v16i8) hz_out7);
1706 filt_vt2, filt_vt3);
1709 filt_hz0, filt_hz1, filt_hz2, filt_hz3);
1710 out8 = (v8i16) __msa_ilvev_b((v16i8) hz_out9, (v16i8) hz_out8);
1712 filt_vt2, filt_vt3);
1715 filt_hz0, filt_hz1, filt_hz2, filt_hz3);
1716 out9 = (v8i16) __msa_ilvev_b((v16i8) hz_out10, (v16i8) hz_out9);
1718 filt_vt2, filt_vt3);
1724 dst += (4 * dst_stride);
1740 const int8_t *filter_horiz,
1741 const int8_t *filter_vert,
1746 for (multiple8_cnt = 2; multiple8_cnt--;) {
1748 filter_horiz, filter_vert,
1760 const int8_t *filter_horiz,
1761 const int8_t *filter_vert,
1766 for (multiple8_cnt = 4; multiple8_cnt--;) {
1768 filter_horiz, filter_vert,
1780 const int8_t *filter_horiz,
1781 const int8_t *filter_vert,
1786 for (multiple8_cnt = 8; multiple8_cnt--;) {
1788 filter_horiz, filter_vert,
1801 v16u8 filt0, vec0, vec1, res0, res1;
1802 v8u16 vec2, vec3,
filt;
1807 filt =
LD_UH(filter);
1808 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
1810 LD_SB4(src, src_stride, src0, src1, src2, src3);
1811 VSHF_B2_UB(src0, src1, src2, src3, mask, mask, vec0, vec1);
1812 DOTP_UB2_UH(vec0, vec1, filt0, filt0, vec2, vec3);
1815 ST4x4_UB(res0, res1, 0, 1, 0, 1, dst, dst_stride);
1822 v16u8 vec0, vec1, vec2, vec3, filt0;
1823 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7,
mask;
1824 v16i8 res0, res1, res2, res3;
1825 v8u16 vec4, vec5, vec6, vec7,
filt;
1830 filt =
LD_UH(filter);
1831 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
1833 LD_SB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
1834 VSHF_B2_UB(src0, src1, src2, src3, mask, mask, vec0, vec1);
1835 VSHF_B2_UB(src4, src5, src6, src7, mask, mask, vec2, vec3);
1836 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
1837 vec4, vec5, vec6, vec7);
1839 PCKEV_B4_SB(vec4, vec4, vec5, vec5, vec6, vec6, vec7, vec7,
1840 res0, res1, res2, res3);
1841 ST4x4_UB(res0, res1, 0, 1, 0, 1, dst, dst_stride);
1842 dst += (4 * dst_stride);
1843 ST4x4_UB(res2, res3, 0, 1, 0, 1, dst, dst_stride);
1848 int height,
int mx,
int my)
1854 }
else if (8 == height) {
1865 v8u16 vec0, vec1, vec2, vec3,
filt;
1870 filt =
LD_UH(filter);
1871 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
1873 LD_SB4(src, src_stride, src0, src1, src2, src3);
1874 VSHF_B2_UH(src0, src0, src1, src1, mask, mask, vec0, vec1);
1875 VSHF_B2_UH(src2, src2, src3, src3, mask, mask, vec2, vec3);
1876 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
1877 vec0, vec1, vec2, vec3);
1880 ST8x4_UB(src0, src1, dst, dst_stride);
1889 v8u16 vec0, vec1, vec2, vec3,
filt;
1894 filt =
LD_UH(filter);
1895 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
1897 LD_SB4(src, src_stride, src0, src1, src2, src3);
1898 src += (4 * src_stride);
1900 VSHF_B2_UH(src0, src0, src1, src1, mask, mask, vec0, vec1);
1901 VSHF_B2_UH(src2, src2, src3, src3, mask, mask, vec2, vec3);
1902 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
1903 vec0, vec1, vec2, vec3);
1905 LD_SB4(src, src_stride, src0, src1, src2, src3);
1906 src += (4 * src_stride);
1909 ST8x4_UB(out0, out1, dst, dst_stride);
1910 dst += (4 * dst_stride);
1912 VSHF_B2_UH(src0, src0, src1, src1, mask, mask, vec0, vec1);
1913 VSHF_B2_UH(src2, src2, src3, src3, mask, mask, vec2, vec3);
1914 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
1915 vec0, vec1, vec2, vec3);
1918 ST8x4_UB(out0, out1, dst, dst_stride);
1919 dst += (4 * dst_stride);
1922 LD_SB4(src, src_stride, src0, src1, src2, src3);
1923 src += (4 * src_stride);
1925 VSHF_B2_UH(src0, src0, src1, src1, mask, mask, vec0, vec1);
1926 VSHF_B2_UH(src2, src2, src3, src3, mask, mask, vec2, vec3);
1927 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
1928 vec0, vec1, vec2, vec3);
1930 LD_SB4(src, src_stride, src0, src1, src2, src3);
1931 src += (4 * src_stride);
1934 ST8x4_UB(out0, out1, dst, dst_stride);
1936 VSHF_B2_UH(src0, src0, src1, src1, mask, mask, vec0, vec1);
1937 VSHF_B2_UH(src2, src2, src3, src3, mask, mask, vec2, vec3);
1938 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
1939 vec0, vec1, vec2, vec3);
1942 ST8x4_UB(out0, out1, dst + 4 * dst_stride, dst_stride);
1948 int height,
int mx,
int my)
1962 int height,
int mx,
int my)
1966 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7,
mask;
1967 v16u8 filt0, vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7;
1968 v8u16 out0, out1, out2, out3, out4, out5, out6, out7,
filt;
1972 loop_cnt = (height >> 2) - 1;
1975 filt =
LD_UH(filter);
1976 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
1978 LD_SB4(src, src_stride, src0, src2, src4, src6);
1979 LD_SB4(src + 8, src_stride, src1, src3, src5, src7);
1980 src += (4 * src_stride);
1982 VSHF_B2_UB(src0, src0, src1, src1, mask, mask, vec0, vec1);
1983 VSHF_B2_UB(src2, src2, src3, src3, mask, mask, vec2, vec3);
1984 VSHF_B2_UB(src4, src4, src5, src5, mask, mask, vec4, vec5);
1985 VSHF_B2_UB(src6, src6, src7, src7, mask, mask, vec6, vec7);
1986 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
1987 out0, out1, out2, out3);
1988 DOTP_UB4_UH(vec4, vec5, vec6, vec7, filt0, filt0, filt0, filt0,
1989 out4, out5, out6, out7);
2001 for (; loop_cnt--;) {
2002 LD_SB4(src, src_stride, src0, src2, src4, src6);
2003 LD_SB4(src + 8, src_stride, src1, src3, src5, src7);
2004 src += (4 * src_stride);
2006 VSHF_B2_UB(src0, src0, src1, src1, mask, mask, vec0, vec1);
2007 VSHF_B2_UB(src2, src2, src3, src3, mask, mask, vec2, vec3);
2008 VSHF_B2_UB(src4, src4, src5, src5, mask, mask, vec4, vec5);
2009 VSHF_B2_UB(src6, src6, src7, src7, mask, mask, vec6, vec7);
2010 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
2011 out0, out1, out2, out3);
2012 DOTP_UB4_UH(vec4, vec5, vec6, vec7, filt0, filt0, filt0, filt0,
2013 out4, out5, out6, out7);
2029 int height,
int mx,
int my)
2033 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7,
mask;
2034 v16u8 filt0, vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7;
2035 v8u16 out0, out1, out2, out3, out4, out5, out6, out7,
filt;
2040 filt =
LD_UH(filter);
2041 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
2043 for (loop_cnt = height >> 1; loop_cnt--;) {
2045 src2 =
LD_SB(src + 16);
2046 src3 =
LD_SB(src + 24);
2047 src1 = __msa_sldi_b(src2, src0, 8);
2050 src6 =
LD_SB(src + 16);
2051 src7 =
LD_SB(src + 24);
2052 src5 = __msa_sldi_b(src6, src4, 8);
2055 VSHF_B2_UB(src0, src0, src1, src1, mask, mask, vec0, vec1);
2056 VSHF_B2_UB(src2, src2, src3, src3, mask, mask, vec2, vec3);
2057 VSHF_B2_UB(src4, src4, src5, src5, mask, mask, vec4, vec5);
2058 VSHF_B2_UB(src6, src6, src7, src7, mask, mask, vec6, vec7);
2059 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
2060 out0, out1, out2, out3);
2061 DOTP_UB4_UH(vec4, vec5, vec6, vec7, filt0, filt0, filt0, filt0,
2062 out4, out5, out6, out7);
2076 int height,
int mx,
int my)
2080 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7,
mask;
2081 v16u8 filt0, vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7;
2082 v8u16 out0, out1, out2, out3, out4, out5, out6, out7,
filt;
2087 filt =
LD_UH(filter);
2088 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
2090 for (loop_cnt = height; loop_cnt--;) {
2092 src2 =
LD_SB(src + 16);
2093 src4 =
LD_SB(src + 32);
2094 src6 =
LD_SB(src + 48);
2095 src7 =
LD_SB(src + 56);
2096 SLDI_B3_SB(src2, src4, src6, src0, src2, src4, src1, src3, src5, 8);
2099 VSHF_B2_UB(src0, src0, src1, src1, mask, mask, vec0, vec1);
2100 VSHF_B2_UB(src2, src2, src3, src3, mask, mask, vec2, vec3);
2101 VSHF_B2_UB(src4, src4, src5, src5, mask, mask, vec4, vec5);
2102 VSHF_B2_UB(src6, src6, src7, src7, mask, mask, vec6, vec7);
2103 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
2104 out0, out1, out2, out3);
2105 DOTP_UB4_UH(vec4, vec5, vec6, vec7, filt0, filt0, filt0, filt0,
2106 out4, out5, out6, out7);
2121 v16i8
src0,
src1, src2, src3, src4;
2122 v16i8 src10_r, src32_r, src21_r, src43_r, src2110, src4332;
2127 filt =
LD_SH(filter);
2128 filt0 = (v16u8) __msa_splati_h(filt, 0);
2130 LD_SB5(src, src_stride, src0, src1, src2, src3, src4);
2131 src += (5 * src_stride);
2133 ILVR_B4_SB(src1, src0, src2, src1, src3, src2, src4, src3,
2134 src10_r, src21_r, src32_r, src43_r);
2135 ILVR_D2_SB(src21_r, src10_r, src43_r, src32_r, src2110, src4332);
2136 DOTP_UB2_UH(src2110, src4332, filt0, filt0, tmp0, tmp1);
2139 src2110 = __msa_pckev_b((v16i8) tmp1, (v16i8) tmp0);
2140 ST4x4_UB(src2110, src2110, 0, 1, 2, 3, dst, dst_stride);
2147 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8;
2148 v16i8 src10_r, src32_r, src54_r, src76_r, src21_r, src43_r;
2149 v16i8 src65_r, src87_r, src2110, src4332, src6554, src8776;
2150 v8u16 tmp0, tmp1, tmp2, tmp3;
2154 filt =
LD_SH(filter);
2155 filt0 = (v16u8) __msa_splati_h(filt, 0);
2157 LD_SB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
2158 src += (8 * src_stride);
2163 ILVR_B4_SB(src1, src0, src2, src1, src3, src2, src4, src3, src10_r, src21_r,
2165 ILVR_B4_SB(src5, src4, src6, src5, src7, src6, src8, src7, src54_r, src65_r,
2167 ILVR_D4_SB(src21_r, src10_r, src43_r, src32_r, src65_r, src54_r,
2168 src87_r, src76_r, src2110, src4332, src6554, src8776);
2169 DOTP_UB4_UH(src2110, src4332, src6554, src8776, filt0, filt0, filt0, filt0,
2170 tmp0, tmp1, tmp2, tmp3);
2173 PCKEV_B2_SB(tmp1, tmp0, tmp3, tmp2, src2110, src4332);
2174 ST4x4_UB(src2110, src2110, 0, 1, 2, 3, dst, dst_stride);
2175 ST4x4_UB(src4332, src4332, 0, 1, 2, 3, dst + 4 * dst_stride, dst_stride);
2180 int height,
int mx,
int my)
2186 }
else if (8 == height) {
2195 v16u8
src0,
src1, src2, src3, src4, vec0, vec1, vec2, vec3, filt0;
2197 v8u16 tmp0, tmp1, tmp2, tmp3;
2201 filt =
LD_SH(filter);
2202 filt0 = (v16u8) __msa_splati_h(filt, 0);
2204 LD_UB5(src, src_stride, src0, src1, src2, src3, src4);
2205 ILVR_B2_UB(src1, src0, src2, src1, vec0, vec1);
2206 ILVR_B2_UB(src3, src2, src4, src3, vec2, vec3);
2207 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
2208 tmp0, tmp1, tmp2, tmp3);
2212 ST8x4_UB(out0, out1, dst, dst_stride);
2220 v16u8
src0,
src1, src2, src3, src4, src5, src6, src7, src8;
2221 v16u8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7, filt0;
2223 v8u16 tmp0, tmp1, tmp2, tmp3;
2227 filt =
LD_SH(filter);
2228 filt0 = (v16u8) __msa_splati_h(filt, 0);
2233 for (loop_cnt = (height >> 3); loop_cnt--;) {
2234 LD_UB8(src, src_stride, src1, src2, src3, src4, src5, src6, src7, src8);
2235 src += (8 * src_stride);
2237 ILVR_B4_UB(src1, src0, src2, src1, src3, src2, src4, src3,
2238 vec0, vec1, vec2, vec3);
2239 ILVR_B4_UB(src5, src4, src6, src5, src7, src6, src8, src7,
2240 vec4, vec5, vec6, vec7);
2241 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
2242 tmp0, tmp1, tmp2, tmp3);
2246 ST8x4_UB(out0, out1, dst, dst_stride);
2247 dst += (4 * dst_stride);
2249 DOTP_UB4_UH(vec4, vec5, vec6, vec7, filt0, filt0, filt0, filt0,
2250 tmp0, tmp1, tmp2, tmp3);
2254 ST8x4_UB(out0, out1, dst, dst_stride);
2255 dst += (4 * dst_stride);
2263 int height,
int mx,
int my)
2277 int height,
int mx,
int my)
2281 v16u8
src0,
src1, src2, src3, src4;
2282 v16u8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7, filt0;
2283 v8u16 tmp0, tmp1, tmp2, tmp3;
2287 filt =
LD_SH(filter);
2288 filt0 = (v16u8) __msa_splati_h(filt, 0);
2293 for (loop_cnt = (height >> 2); loop_cnt--;) {
2294 LD_UB4(src, src_stride, src1, src2, src3, src4);
2295 src += (4 * src_stride);
2297 ILVR_B2_UB(src1, src0, src2, src1, vec0, vec2);
2298 ILVL_B2_UB(src1, src0, src2, src1, vec1, vec3);
2299 DOTP_UB2_UH(vec0, vec1, filt0, filt0, tmp0, tmp1);
2305 ILVR_B2_UB(src3, src2, src4, src3, vec4, vec6);
2306 ILVL_B2_UB(src3, src2, src4, src3, vec5, vec7);
2307 DOTP_UB2_UH(vec2, vec3, filt0, filt0, tmp2, tmp3);
2313 DOTP_UB2_UH(vec4, vec5, filt0, filt0, tmp0, tmp1);
2319 DOTP_UB2_UH(vec6, vec7, filt0, filt0, tmp2, tmp3);
2331 int height,
int mx,
int my)
2335 v16u8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9;
2336 v16u8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7, filt0;
2337 v8u16 tmp0, tmp1, tmp2, tmp3;
2341 filt =
LD_SH(filter);
2342 filt0 = (v16u8) __msa_splati_h(filt, 0);
2345 src5 =
LD_UB(src + 16);
2348 for (loop_cnt = (height >> 2); loop_cnt--;) {
2349 LD_UB4(src, src_stride, src1, src2, src3, src4);
2350 ILVR_B2_UB(src1, src0, src2, src1, vec0, vec2);
2351 ILVL_B2_UB(src1, src0, src2, src1, vec1, vec3);
2353 LD_UB4(src + 16, src_stride, src6, src7, src8, src9);
2354 src += (4 * src_stride);
2356 DOTP_UB2_UH(vec0, vec1, filt0, filt0, tmp0, tmp1);
2360 DOTP_UB2_UH(vec2, vec3, filt0, filt0, tmp2, tmp3);
2365 ILVR_B2_UB(src3, src2, src4, src3, vec4, vec6);
2366 ILVL_B2_UB(src3, src2, src4, src3, vec5, vec7);
2367 DOTP_UB2_UH(vec4, vec5, filt0, filt0, tmp0, tmp1);
2372 DOTP_UB2_UH(vec6, vec7, filt0, filt0, tmp2, tmp3);
2377 ILVR_B2_UB(src6, src5, src7, src6, vec0, vec2);
2378 ILVL_B2_UB(src6, src5, src7, src6, vec1, vec3);
2379 DOTP_UB2_UH(vec0, vec1, filt0, filt0, tmp0, tmp1);
2384 DOTP_UB2_UH(vec2, vec3, filt0, filt0, tmp2, tmp3);
2389 ILVR_B2_UB(src8, src7, src9, src8, vec4, vec6);
2390 ILVL_B2_UB(src8, src7, src9, src8, vec5, vec7);
2391 DOTP_UB2_UH(vec4, vec5, filt0, filt0, tmp0, tmp1);
2394 PCKEV_ST_SB(tmp0, tmp1, dst + 16 + 2 * dst_stride);
2396 DOTP_UB2_UH(vec6, vec7, filt0, filt0, tmp2, tmp3);
2399 PCKEV_ST_SB(tmp2, tmp3, dst + 16 + 3 * dst_stride);
2400 dst += (4 * dst_stride);
2409 int height,
int mx,
int my)
2413 v16u8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9, src10;
2414 v16u8 src11, vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7, filt0;
2415 v8u16 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
2419 filt =
LD_SH(filter);
2420 filt0 = (v16u8) __msa_splati_h(filt, 0);
2422 LD_UB4(src, 16, src0, src3, src6, src9);
2425 for (loop_cnt = (height >> 1); loop_cnt--;) {
2426 LD_UB2(src, src_stride, src1, src2);
2427 LD_UB2(src + 16, src_stride, src4, src5);
2428 LD_UB2(src + 32, src_stride, src7, src8);
2429 LD_UB2(src + 48, src_stride, src10, src11);
2430 src += (2 * src_stride);
2432 ILVR_B2_UB(src1, src0, src2, src1, vec0, vec2);
2433 ILVL_B2_UB(src1, src0, src2, src1, vec1, vec3);
2434 DOTP_UB2_UH(vec0, vec1, filt0, filt0, tmp0, tmp1);
2439 DOTP_UB2_UH(vec2, vec3, filt0, filt0, tmp2, tmp3);
2444 ILVR_B2_UB(src4, src3, src5, src4, vec4, vec6);
2445 ILVL_B2_UB(src4, src3, src5, src4, vec5, vec7);
2446 DOTP_UB2_UH(vec4, vec5, filt0, filt0, tmp4, tmp5);
2451 DOTP_UB2_UH(vec6, vec7, filt0, filt0, tmp6, tmp7);
2456 ILVR_B2_UB(src7, src6, src8, src7, vec0, vec2);
2457 ILVL_B2_UB(src7, src6, src8, src7, vec1, vec3);
2458 DOTP_UB2_UH(vec0, vec1, filt0, filt0, tmp0, tmp1);
2463 DOTP_UB2_UH(vec2, vec3, filt0, filt0, tmp2, tmp3);
2468 ILVR_B2_UB(src10, src9, src11, src10, vec4, vec6);
2469 ILVL_B2_UB(src10, src9, src11, src10, vec5, vec7);
2470 DOTP_UB2_UH(vec4, vec5, filt0, filt0, tmp4, tmp5);
2475 DOTP_UB2_UH(vec6, vec7, filt0, filt0, tmp6, tmp7);
2479 dst += (2 * dst_stride);
2490 const int8_t *filter_horiz,
const int8_t *filter_vert)
2493 v16u8 filt_vt, filt_hz, vec0, vec1, res0, res1;
2494 v8u16 hz_out0, hz_out1, hz_out2, hz_out3, hz_out4,
filt, tmp0, tmp1;
2499 filt =
LD_UH(filter_horiz);
2500 filt_hz = (v16u8) __msa_splati_h((v8i16)
filt, 0);
2502 filt =
LD_UH(filter_vert);
2503 filt_vt = (v16u8) __msa_splati_h((v8i16)
filt, 0);
2505 LD_SB5(src, src_stride, src0, src1, src2, src3, src4);
2509 hz_out1 = (v8u16) __msa_sldi_b((v16i8) hz_out2, (v16i8) hz_out0, 8);
2510 hz_out3 = (v8u16) __msa_pckod_d((v2i64) hz_out4, (v2i64) hz_out2);
2512 ILVEV_B2_UB(hz_out0, hz_out1, hz_out2, hz_out3, vec0, vec1);
2513 DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp0, tmp1);
2517 ST4x4_UB(res0, res1, 0, 1, 0, 1, dst, dst_stride);
2522 const int8_t *filter_horiz,
const int8_t *filter_vert)
2524 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8,
mask;
2525 v16i8 res0, res1, res2, res3;
2526 v16u8 filt_hz, filt_vt, vec0, vec1, vec2, vec3;
2527 v8u16 hz_out0, hz_out1, hz_out2, hz_out3, hz_out4, hz_out5, hz_out6;
2528 v8u16 hz_out7, hz_out8, vec4, vec5, vec6, vec7,
filt;
2533 filt =
LD_UH(filter_horiz);
2534 filt_hz = (v16u8) __msa_splati_h((v8i16)
filt, 0);
2536 filt =
LD_UH(filter_vert);
2537 filt_vt = (v16u8) __msa_splati_h((v8i16)
filt, 0);
2539 LD_SB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
2540 src += (8 * src_stride);
2548 SLDI_B3_UH(hz_out2, hz_out4, hz_out6, hz_out0, hz_out2, hz_out4, hz_out1,
2549 hz_out3, hz_out5, 8);
2550 hz_out7 = (v8u16) __msa_pckod_d((v2i64) hz_out8, (v2i64) hz_out6);
2552 ILVEV_B2_UB(hz_out0, hz_out1, hz_out2, hz_out3, vec0, vec1);
2553 ILVEV_B2_UB(hz_out4, hz_out5, hz_out6, hz_out7, vec2, vec3);
2554 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt_vt, filt_vt, filt_vt, filt_vt,
2555 vec4, vec5, vec6, vec7);
2558 PCKEV_B4_SB(vec4, vec4, vec5, vec5, vec6, vec6, vec7, vec7,
2559 res0, res1, res2, res3);
2560 ST4x4_UB(res0, res1, 0, 1, 0, 1, dst, dst_stride);
2561 dst += (4 * dst_stride);
2562 ST4x4_UB(res2, res3, 0, 1, 0, 1, dst, dst_stride);
2567 int height,
int mx,
int my)
2574 filter_horiz, filter_vert);
2575 }
else if (8 == height) {
2577 filter_horiz, filter_vert);
2583 const int8_t *filter_horiz,
const int8_t *filter_vert)
2586 v16u8 filt_hz, filt_vt, vec0, vec1, vec2, vec3;
2587 v8u16 hz_out0, hz_out1, tmp0, tmp1, tmp2, tmp3;
2593 filt =
LD_SH(filter_horiz);
2594 filt_hz = (v16u8) __msa_splati_h(filt, 0);
2596 filt =
LD_SH(filter_vert);
2597 filt_vt = (v16u8) __msa_splati_h(filt, 0);
2599 LD_SB5(src, src_stride, src0, src1, src2, src3, src4);
2603 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out1, (v16i8) hz_out0);
2604 tmp0 = __msa_dotp_u_h(vec0, filt_vt);
2607 vec1 = (v16u8) __msa_ilvev_b((v16i8) hz_out0, (v16i8) hz_out1);
2608 tmp1 = __msa_dotp_u_h(vec1, filt_vt);
2611 vec2 = (v16u8) __msa_ilvev_b((v16i8) hz_out1, (v16i8) hz_out0);
2612 tmp2 = __msa_dotp_u_h(vec2, filt_vt);
2615 vec3 = (v16u8) __msa_ilvev_b((v16i8) hz_out0, (v16i8) hz_out1);
2616 tmp3 = __msa_dotp_u_h(vec3, filt_vt);
2621 ST8x4_UB(out0, out1, dst, dst_stride);
2626 const int8_t *filter_horiz,
const int8_t *filter_vert,
2631 v16u8 filt_hz, filt_vt, vec0;
2632 v8u16 hz_out0, hz_out1, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8;
2638 filt =
LD_SH(filter_horiz);
2639 filt_hz = (v16u8) __msa_splati_h(filt, 0);
2641 filt =
LD_SH(filter_vert);
2642 filt_vt = (v16u8) __msa_splati_h(filt, 0);
2649 for (loop_cnt = (height >> 3); loop_cnt--;) {
2650 LD_SB4(src, src_stride, src1, src2, src3, src4);
2651 src += (4 * src_stride);
2654 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out1, (v16i8) hz_out0);
2655 tmp1 = __msa_dotp_u_h(vec0, filt_vt);
2658 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out0, (v16i8) hz_out1);
2659 tmp2 = __msa_dotp_u_h(vec0, filt_vt);
2665 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out1, (v16i8) hz_out0);
2666 tmp3 = __msa_dotp_u_h(vec0, filt_vt);
2669 LD_SB4(src, src_stride, src1, src2, src3, src4);
2670 src += (4 * src_stride);
2671 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out0, (v16i8) hz_out1);
2672 tmp4 = __msa_dotp_u_h(vec0, filt_vt);
2677 ST8x4_UB(out0, out1, dst, dst_stride);
2678 dst += (4 * dst_stride);
2681 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out1, (v16i8) hz_out0);
2682 tmp5 = __msa_dotp_u_h(vec0, filt_vt);
2685 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out0, (v16i8) hz_out1);
2686 tmp6 = __msa_dotp_u_h(vec0, filt_vt);
2689 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out1, (v16i8) hz_out0);
2690 tmp7 = __msa_dotp_u_h(vec0, filt_vt);
2693 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out0, (v16i8) hz_out1);
2694 tmp8 = __msa_dotp_u_h(vec0, filt_vt);
2699 ST8x4_UB(out0, out1, dst, dst_stride);
2700 dst += (4 * dst_stride);
2706 int height,
int mx,
int my)
2713 filter_horiz, filter_vert);
2716 filter_horiz, filter_vert, height);
2722 int height,
int mx,
int my)
2727 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7,
mask;
2728 v16u8 filt_hz, filt_vt, vec0, vec1;
2729 v8u16 tmp1, tmp2, hz_out0, hz_out1, hz_out2, hz_out3;
2735 filt =
LD_SH(filter_horiz);
2736 filt_hz = (v16u8) __msa_splati_h(filt, 0);
2738 filt =
LD_SH(filter_vert);
2739 filt_vt = (v16u8) __msa_splati_h(filt, 0);
2741 LD_SB2(src, 8, src0, src1);
2748 for (loop_cnt = (height >> 2); loop_cnt--;) {
2749 LD_SB4(src, src_stride, src0, src2, src4, src6);
2750 LD_SB4(src + 8, src_stride, src1, src3, src5, src7);
2751 src += (4 * src_stride);
2755 ILVEV_B2_UB(hz_out0, hz_out1, hz_out2, hz_out3, vec0, vec1);
2756 DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp1, tmp2);
2764 ILVEV_B2_UB(hz_out1, hz_out0, hz_out3, hz_out2, vec0, vec1);
2765 DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp1, tmp2);
2773 ILVEV_B2_UB(hz_out0, hz_out1, hz_out2, hz_out3, vec0, vec1);
2774 DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp1, tmp2);
2782 ILVEV_B2_UB(hz_out1, hz_out0, hz_out3, hz_out2, vec0, vec1);
2783 DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp1, tmp2);
2793 int height,
int mx,
int my)
2797 for (multiple8_cnt = 2; multiple8_cnt--;) {
2807 int height,
int mx,
int my)
2811 for (multiple8_cnt = 4; multiple8_cnt--;) {
2824 uint32_t tp0, tp1, tp2, tp3;
2826 v16u8 filt0, dst0, vec0, vec1, res;
2827 v8u16 vec2, vec3,
filt;
2832 filt =
LD_UH(filter);
2833 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
2835 LD_SB4(src, src_stride, src0, src1, src2, src3);
2836 LW4(dst, dst_stride, tp0, tp1, tp2, tp3);
2838 VSHF_B2_UB(src0, src1, src2, src3, mask, mask, vec0, vec1);
2839 DOTP_UB2_UH(vec0, vec1, filt0, filt0, vec2, vec3);
2842 res = (v16u8) __msa_pckev_b((v16i8) vec3, (v16i8) vec2);
2843 res = (v16u8) __msa_aver_u_b(res, dst0);
2845 ST4x4_UB(res, res, 0, 1, 2, 3, dst, dst_stride);
2853 uint32_t tp0, tp1, tp2, tp3;
2854 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7,
mask;
2855 v16u8 filt0, vec0, vec1, vec2, vec3, res0, res1, res2, res3;
2857 v8u16 vec4, vec5, vec6, vec7,
filt;
2862 filt =
LD_UH(filter);
2863 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
2865 LD_SB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
2866 LW4(dst, dst_stride, tp0, tp1, tp2, tp3);
2868 LW4(dst + 4 * dst_stride, dst_stride, tp0, tp1, tp2, tp3);
2870 VSHF_B2_UB(src0, src1, src2, src3, mask, mask, vec0, vec1);
2871 VSHF_B2_UB(src4, src5, src6, src7, mask, mask, vec2, vec3);
2872 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0, vec4, vec5,
2875 PCKEV_B4_UB(vec4, vec4, vec5, vec5, vec6, vec6, vec7, vec7, res0, res1,
2877 ILVR_D2_UB(res1, res0, res3, res2, res0, res2);
2879 ST4x8_UB(res0, res2, dst, dst_stride);
2884 int height,
int mx,
int my)
2891 }
else if (8 == height) {
2902 int64_t tp0, tp1, tp2, tp3;
2904 v16u8 filt0, dst0, dst1;
2905 v8u16 vec0, vec1, vec2, vec3,
filt;
2910 filt =
LD_UH(filter);
2911 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
2913 LD_SB4(src, src_stride, src0, src1, src2, src3);
2914 VSHF_B2_UH(src0, src0, src1, src1, mask, mask, vec0, vec1);
2915 VSHF_B2_UH(src2, src2, src3, src3, mask, mask, vec2, vec3);
2916 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
2917 vec0, vec1, vec2, vec3);
2919 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
2932 int64_t tp0, tp1, tp2, tp3;
2934 v16u8 filt0, dst0, dst1;
2935 v8u16 vec0, vec1, vec2, vec3,
filt;
2940 filt =
LD_UH(filter);
2941 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
2943 LD_SB4(src, src_stride, src0, src1, src2, src3);
2944 src += (4 * src_stride);
2945 VSHF_B2_UH(src0, src0, src1, src1, mask, mask, vec0, vec1);
2946 VSHF_B2_UH(src2, src2, src3, src3, mask, mask, vec2, vec3);
2947 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0, vec0, vec1,
2950 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
2953 LD_SB4(src, src_stride, src0, src1, src2, src3);
2954 src += (4 * src_stride);
2956 dst += (4 * dst_stride);
2958 VSHF_B2_UH(src0, src0, src1, src1, mask, mask, vec0, vec1);
2959 VSHF_B2_UH(src2, src2, src3, src3, mask, mask, vec2, vec3);
2960 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0, vec0, vec1,
2963 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
2967 dst += (4 * dst_stride);
2970 LD_SB4(src, src_stride, src0, src1, src2, src3);
2971 src += (4 * src_stride);
2973 VSHF_B2_UH(src0, src0, src1, src1, mask, mask, vec0, vec1);
2974 VSHF_B2_UH(src2, src2, src3, src3, mask, mask, vec2, vec3);
2975 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0, vec0,
2978 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
2981 LD_SB4(src, src_stride, src0, src1, src2, src3);
2983 dst += (4 * dst_stride);
2985 VSHF_B2_UH(src0, src0, src1, src1, mask, mask, vec0, vec1);
2986 VSHF_B2_UH(src2, src2, src3, src3, mask, mask, vec2, vec3);
2987 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0, vec0,
2990 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
2999 int height,
int mx,
int my)
3014 int height,
int mx,
int my)
3018 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7,
mask;
3019 v16u8 filt0, dst0, dst1, dst2, dst3;
3020 v16u8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7;
3021 v8u16 res0, res1, res2, res3, res4, res5, res6, res7,
filt;
3026 filt =
LD_UH(filter);
3027 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
3029 LD_SB4(src, src_stride, src0, src2, src4, src6);
3030 LD_SB4(src + 8, src_stride, src1, src3, src5, src7);
3031 src += (4 * src_stride);
3033 VSHF_B2_UB(src0, src0, src1, src1, mask, mask, vec0, vec1);
3034 VSHF_B2_UB(src2, src2, src3, src3, mask, mask, vec2, vec3);
3035 VSHF_B2_UB(src4, src4, src5, src5, mask, mask, vec4, vec5);
3036 VSHF_B2_UB(src6, src6, src7, src7, mask, mask, vec6, vec7);
3037 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0, res0, res1,
3039 DOTP_UB4_UH(vec4, vec5, vec6, vec7, filt0, filt0, filt0, filt0, res4, res5,
3043 LD_UB4(dst, dst_stride, dst0, dst1, dst2, dst3);
3053 for (loop_cnt = (height >> 2) - 1; loop_cnt--;) {
3054 LD_SB4(src, src_stride, src0, src2, src4, src6);
3055 LD_SB4(src + 8, src_stride, src1, src3, src5, src7);
3056 src += (4 * src_stride);
3058 VSHF_B2_UB(src0, src0, src1, src1, mask, mask, vec0, vec1);
3059 VSHF_B2_UB(src2, src2, src3, src3, mask, mask, vec2, vec3);
3060 VSHF_B2_UB(src4, src4, src5, src5, mask, mask, vec4, vec5);
3061 VSHF_B2_UB(src6, src6, src7, src7, mask, mask, vec6, vec7);
3062 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0, res0,
3064 DOTP_UB4_UH(vec4, vec5, vec6, vec7, filt0, filt0, filt0, filt0, res4,
3068 LD_UB4(dst, dst_stride, dst0, dst1, dst2, dst3);
3082 int height,
int mx,
int my)
3086 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7,
mask;
3087 v16u8 filt0, dst0, dst1, dst2, dst3;
3088 v16u8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7;
3089 v8u16 res0, res1, res2, res3, res4, res5, res6, res7,
filt;
3094 filt =
LD_UH(filter);
3095 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
3097 for (loop_cnt = (height >> 1); loop_cnt--;) {
3099 src2 =
LD_SB(src + 16);
3100 src3 =
LD_SB(src + 24);
3101 src1 = __msa_sldi_b(src2, src0, 8);
3104 src6 =
LD_SB(src + 16);
3105 src7 =
LD_SB(src + 24);
3106 src5 = __msa_sldi_b(src6, src4, 8);
3109 VSHF_B2_UB(src0, src0, src1, src1, mask, mask, vec0, vec1);
3110 VSHF_B2_UB(src2, src2, src3, src3, mask, mask, vec2, vec3);
3111 VSHF_B2_UB(src4, src4, src5, src5, mask, mask, vec4, vec5);
3112 VSHF_B2_UB(src6, src6, src7, src7, mask, mask, vec6, vec7);
3113 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
3114 res0, res1, res2, res3);
3115 DOTP_UB4_UH(vec4, vec5, vec6, vec7, filt0, filt0, filt0, filt0,
3116 res4, res5, res6, res7);
3119 LD_UB2(dst, 16, dst0, dst1);
3123 LD_UB2(dst, 16, dst2, dst3);
3132 int height,
int mx,
int my)
3136 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7,
mask;
3137 v16u8 filt0, dst0, dst1, dst2, dst3;
3138 v16u8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7;
3139 v8u16 out0, out1, out2, out3, out4, out5, out6, out7,
filt;
3144 filt =
LD_UH(filter);
3145 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
3147 for (loop_cnt = height; loop_cnt--;) {
3148 LD_SB4(src, 16, src0, src2, src4, src6);
3149 src7 =
LD_SB(src + 56);
3150 SLDI_B3_SB(src2, src4, src6, src0, src2, src4, src1, src3, src5, 8);
3153 VSHF_B2_UB(src0, src0, src1, src1, mask, mask, vec0, vec1);
3154 VSHF_B2_UB(src2, src2, src3, src3, mask, mask, vec2, vec3);
3155 VSHF_B2_UB(src4, src4, src5, src5, mask, mask, vec4, vec5);
3156 VSHF_B2_UB(src6, src6, src7, src7, mask, mask, vec6, vec7);
3157 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
3158 out0, out1, out2, out3);
3159 DOTP_UB4_UH(vec4, vec5, vec6, vec7, filt0, filt0, filt0, filt0,
3160 out4, out5, out6, out7);
3163 LD_UB4(dst, 16, dst0, dst1, dst2, dst3);
3177 uint32_t tp0, tp1, tp2, tp3;
3178 v16i8
src0,
src1, src2, src3, src4;
3179 v16u8 dst0,
out, filt0, src2110, src4332;
3180 v16i8 src10_r, src32_r, src21_r, src43_r;
3184 filt =
LD_SH(filter);
3185 filt0 = (v16u8) __msa_splati_h(filt, 0);
3187 LD_SB4(src, src_stride, src0, src1, src2, src3);
3188 src += (4 * src_stride);
3193 LW4(dst, dst_stride, tp0, tp1, tp2, tp3);
3195 ILVR_B4_SB(src1, src0, src2, src1, src3, src2, src4, src3,
3196 src10_r, src21_r, src32_r, src43_r);
3197 ILVR_D2_UB(src21_r, src10_r, src43_r, src32_r, src2110, src4332);
3198 DOTP_UB2_UH(src2110, src4332, filt0, filt0, tmp0, tmp1);
3202 out = (v16u8) __msa_pckev_b((v16i8) tmp1, (v16i8) tmp0);
3203 out = __msa_aver_u_b(out, dst0);
3205 ST4x4_UB(out, out, 0, 1, 2, 3, dst, dst_stride);
3213 uint32_t tp0, tp1, tp2, tp3;
3215 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src87_r;
3216 v16i8 src10_r, src32_r, src54_r, src76_r, src21_r, src43_r, src65_r;
3217 v16u8 src2110, src4332, src6554, src8776, filt0;
3218 v8u16 tmp0, tmp1, tmp2, tmp3;
3221 filt =
LD_SH(filter);
3222 filt0 = (v16u8) __msa_splati_h(filt, 0);
3224 LD_SB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
3225 src += (8 * src_stride);
3228 LW4(dst, dst_stride, tp0, tp1, tp2, tp3);
3230 LW4(dst + 4 * dst_stride, dst_stride, tp0, tp1, tp2, tp3);
3232 ILVR_B4_SB(src1, src0, src2, src1, src3, src2, src4, src3, src10_r, src21_r,
3234 ILVR_B4_SB(src5, src4, src6, src5, src7, src6, src8, src7, src54_r, src65_r,
3236 ILVR_D4_UB(src21_r, src10_r, src43_r, src32_r, src65_r, src54_r,
3237 src87_r, src76_r, src2110, src4332, src6554, src8776);
3238 DOTP_UB4_UH(src2110, src4332, src6554, src8776, filt0, filt0, filt0, filt0,
3239 tmp0, tmp1, tmp2, tmp3);
3242 PCKEV_B2_UB(tmp1, tmp0, tmp3, tmp2, src2110, src4332);
3243 AVER_UB2_UB(src2110, dst0, src4332, dst1, src2110, src4332);
3244 ST4x8_UB(src2110, src4332, dst, dst_stride);
3249 int height,
int mx,
int my)
3256 }
else if (8 == height) {
3268 int64_t tp0, tp1, tp2, tp3;
3269 v16u8
src0,
src1, src2, src3, src4;
3270 v16u8 dst0, dst1, vec0, vec1, vec2, vec3, filt0;
3271 v8u16 tmp0, tmp1, tmp2, tmp3;
3275 filt =
LD_SH(filter);
3276 filt0 = (v16u8) __msa_splati_h(filt, 0);
3278 LD_UB5(src, src_stride, src0, src1, src2, src3, src4);
3279 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
3282 ILVR_B2_UB(src1, src0, src2, src1, vec0, vec1);
3283 ILVR_B2_UB(src3, src2, src4, src3, vec2, vec3);
3284 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
3285 tmp0, tmp1, tmp2, tmp3);
3299 int64_t tp0, tp1, tp2, tp3;
3300 v16u8
src0,
src1, src2, src3, src4, src5, src6, src7, src8;
3301 v16u8 dst0, dst1, dst2, dst3;
3302 v16u8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7, filt0;
3303 v8u16 tmp0, tmp1, tmp2, tmp3;
3307 filt =
LD_SH(filter);
3308 filt0 = (v16u8) __msa_splati_h(filt, 0);
3313 for (loop_cnt = (height >> 3); loop_cnt--;) {
3314 LD_UB8(src, src_stride, src1, src2, src3, src4, src5, src6, src7, src8);
3315 src += (8 * src_stride);
3317 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
3320 LD4(dst + 4 * dst_stride, dst_stride, tp0, tp1, tp2, tp3);
3324 ILVR_B4_UB(src1, src0, src2, src1, src3, src2, src4, src3,
3325 vec0, vec1, vec2, vec3);
3326 ILVR_B4_UB(src5, src4, src6, src5, src7, src6, src8, src7,
3327 vec4, vec5, vec6, vec7);
3328 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt0, filt0, filt0, filt0,
3329 tmp0, tmp1, tmp2, tmp3);
3333 dst += (4 * dst_stride);
3335 DOTP_UB4_UH(vec4, vec5, vec6, vec7, filt0, filt0, filt0, filt0,
3336 tmp0, tmp1, tmp2, tmp3);
3340 dst += (4 * dst_stride);
3348 int height,
int mx,
int my)
3363 int height,
int mx,
int my)
3367 v16u8
src0,
src1, src2, src3, src4, dst0, dst1, dst2, dst3, filt0;
3368 v16u8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7;
3369 v8u16 tmp0, tmp1, tmp2, tmp3,
filt;
3372 filt =
LD_UH(filter);
3373 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
3378 for (loop_cnt = (height >> 2); loop_cnt--;) {
3379 LD_UB4(src, src_stride, src1, src2, src3, src4);
3380 src += (4 * src_stride);
3382 LD_UB4(dst, dst_stride, dst0, dst1, dst2, dst3);
3383 ILVR_B2_UB(src1, src0, src2, src1, vec0, vec2);
3384 ILVL_B2_UB(src1, src0, src2, src1, vec1, vec3);
3385 DOTP_UB2_UH(vec0, vec1, filt0, filt0, tmp0, tmp1);
3391 ILVR_B2_UB(src3, src2, src4, src3, vec4, vec6);
3392 ILVL_B2_UB(src3, src2, src4, src3, vec5, vec7);
3393 DOTP_UB2_UH(vec2, vec3, filt0, filt0, tmp2, tmp3);
3399 DOTP_UB2_UH(vec4, vec5, filt0, filt0, tmp0, tmp1);
3405 DOTP_UB2_UH(vec6, vec7, filt0, filt0, tmp2, tmp3);
3417 int height,
int mx,
int my)
3421 v16u8
src0,
src1, src2, src3, src4, src5, src6, src7, src8, src9;
3422 v16u8 dst0, dst1, dst2, dst3, dst4, dst5, dst6, dst7;
3423 v16u8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7, filt0;
3424 v8u16 tmp0, tmp1, tmp2, tmp3,
filt;
3427 filt =
LD_UH(filter);
3428 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
3430 LD_UB2(src, 16, src0, src5);
3433 for (loop_cnt = (height >> 2); loop_cnt--;) {
3434 LD_UB4(src, src_stride, src1, src2, src3, src4);
3435 LD_UB4(dst, dst_stride, dst0, dst1, dst2, dst3);
3436 ILVR_B2_UB(src1, src0, src2, src1, vec0, vec2);
3437 ILVL_B2_UB(src1, src0, src2, src1, vec1, vec3);
3439 LD_UB4(src + 16, src_stride, src6, src7, src8, src9);
3440 LD_UB4(dst + 16, dst_stride, dst4, dst5, dst6, dst7);
3441 src += (4 * src_stride);
3443 DOTP_UB2_UH(vec0, vec1, filt0, filt0, tmp0, tmp1);
3448 DOTP_UB2_UH(vec2, vec3, filt0, filt0, tmp2, tmp3);
3453 ILVR_B2_UB(src3, src2, src4, src3, vec4, vec6);
3454 ILVL_B2_UB(src3, src2, src4, src3, vec5, vec7);
3455 DOTP_UB2_UH(vec4, vec5, filt0, filt0, tmp0, tmp1);
3460 DOTP_UB2_UH(vec6, vec7, filt0, filt0, tmp2, tmp3);
3465 ILVR_B2_UB(src6, src5, src7, src6, vec0, vec2);
3466 ILVL_B2_UB(src6, src5, src7, src6, vec1, vec3);
3467 DOTP_UB2_UH(vec0, vec1, filt0, filt0, tmp0, tmp1);
3472 DOTP_UB2_UH(vec2, vec3, filt0, filt0, tmp2, tmp3);
3477 ILVR_B2_UB(src8, src7, src9, src8, vec4, vec6);
3478 ILVL_B2_UB(src8, src7, src9, src8, vec5, vec7);
3479 DOTP_UB2_UH(vec4, vec5, filt0, filt0, tmp0, tmp1);
3484 DOTP_UB2_UH(vec6, vec7, filt0, filt0, tmp2, tmp3);
3488 dst += (4 * dst_stride);
3497 int height,
int mx,
int my)
3501 v16u8
src0,
src1, src2, src3, src4, src5;
3502 v16u8 src6, src7, src8, src9, src10, src11, filt0;
3503 v16u8 dst0, dst1, dst2, dst3, dst4, dst5, dst6, dst7;
3504 v16u8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7;
3505 v8u16 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
3509 filt =
LD_UH(filter);
3510 filt0 = (v16u8) __msa_splati_h((v8i16)
filt, 0);
3512 LD_UB4(src, 16, src0, src3, src6, src9);
3515 for (loop_cnt = (height >> 1); loop_cnt--;) {
3516 LD_UB2(src, src_stride, src1, src2);
3517 LD_UB2(dst, dst_stride, dst0, dst1);
3518 LD_UB2(src + 16, src_stride, src4, src5);
3519 LD_UB2(dst + 16, dst_stride, dst2, dst3);
3520 LD_UB2(src + 32, src_stride, src7, src8);
3521 LD_UB2(dst + 32, dst_stride, dst4, dst5);
3522 LD_UB2(src + 48, src_stride, src10, src11);
3523 LD_UB2(dst + 48, dst_stride, dst6, dst7);
3524 src += (2 * src_stride);
3526 ILVR_B2_UB(src1, src0, src2, src1, vec0, vec2);
3527 ILVL_B2_UB(src1, src0, src2, src1, vec1, vec3);
3528 DOTP_UB2_UH(vec0, vec1, filt0, filt0, tmp0, tmp1);
3533 DOTP_UB2_UH(vec2, vec3, filt0, filt0, tmp2, tmp3);
3538 ILVR_B2_UB(src4, src3, src5, src4, vec4, vec6);
3539 ILVL_B2_UB(src4, src3, src5, src4, vec5, vec7);
3540 DOTP_UB2_UH(vec4, vec5, filt0, filt0, tmp4, tmp5);
3545 DOTP_UB2_UH(vec6, vec7, filt0, filt0, tmp6, tmp7);
3550 ILVR_B2_UB(src7, src6, src8, src7, vec0, vec2);
3551 ILVL_B2_UB(src7, src6, src8, src7, vec1, vec3);
3552 DOTP_UB2_UH(vec0, vec1, filt0, filt0, tmp0, tmp1);
3557 DOTP_UB2_UH(vec2, vec3, filt0, filt0, tmp2, tmp3);
3562 ILVR_B2_UB(src10, src9, src11, src10, vec4, vec6);
3563 ILVL_B2_UB(src10, src9, src11, src10, vec5, vec7);
3564 DOTP_UB2_UH(vec4, vec5, filt0, filt0, tmp4, tmp5);
3569 DOTP_UB2_UH(vec6, vec7, filt0, filt0, tmp6, tmp7);
3573 dst += (2 * dst_stride);
3586 const int8_t *filter_horiz,
3587 const int8_t *filter_vert)
3589 uint32_t tp0, tp1, tp2, tp3;
3591 v16u8 filt_hz, filt_vt, vec0, vec1;
3593 v8u16 hz_out0, hz_out1, hz_out2, hz_out3, hz_out4, tmp0, tmp1,
filt;
3598 filt =
LD_UH(filter_horiz);
3599 filt_hz = (v16u8) __msa_splati_h((v8i16)
filt, 0);
3601 filt =
LD_UH(filter_vert);
3602 filt_vt = (v16u8) __msa_splati_h((v8i16)
filt, 0);
3604 LD_SB5(src, src_stride, src0, src1, src2, src3, src4);
3609 hz_out1 = (v8u16) __msa_sldi_b((v16i8) hz_out2, (v16i8) hz_out0, 8);
3610 hz_out3 = (v8u16) __msa_pckod_d((v2i64) hz_out4, (v2i64) hz_out2);
3611 ILVEV_B2_UB(hz_out0, hz_out1, hz_out2, hz_out3, vec0, vec1);
3613 LW4(dst, dst_stride, tp0, tp1, tp2, tp3);
3616 DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp0, tmp1);
3620 out = (v16u8) __msa_pckev_b((v16i8) tmp1, (v16i8) tmp0);
3621 out = __msa_aver_u_b(out, dst0);
3623 ST4x4_UB(out, out, 0, 1, 2, 3, dst, dst_stride);
3630 const int8_t *filter_horiz,
3631 const int8_t *filter_vert)
3633 uint32_t tp0, tp1, tp2, tp3;
3634 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7, src8,
mask;
3635 v16u8 filt_hz, filt_vt, vec0, vec1, vec2, vec3, res0, res1;
3637 v8u16 hz_out0, hz_out1, hz_out2, hz_out3, hz_out4, hz_out5, hz_out6;
3638 v8u16 hz_out7, hz_out8, tmp0, tmp1, tmp2, tmp3;
3644 filt =
LD_SH(filter_horiz);
3645 filt_hz = (v16u8) __msa_splati_h(filt, 0);
3647 filt =
LD_SH(filter_vert);
3648 filt_vt = (v16u8) __msa_splati_h(filt, 0);
3650 LD_SB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
3651 src += (8 * src_stride);
3659 SLDI_B3_UH(hz_out2, hz_out4, hz_out6, hz_out0, hz_out2, hz_out4, hz_out1,
3660 hz_out3, hz_out5, 8);
3661 hz_out7 = (v8u16) __msa_pckod_d((v2i64) hz_out8, (v2i64) hz_out6);
3663 LW4(dst, dst_stride, tp0, tp1, tp2, tp3);
3665 LW4(dst + 4 * dst_stride, dst_stride, tp0, tp1, tp2, tp3);
3667 ILVEV_B2_UB(hz_out0, hz_out1, hz_out2, hz_out3, vec0, vec1);
3668 ILVEV_B2_UB(hz_out4, hz_out5, hz_out6, hz_out7, vec2, vec3);
3669 DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt_vt, filt_vt, filt_vt, filt_vt,
3670 tmp0, tmp1, tmp2, tmp3);
3675 ST4x8_UB(res0, res1, dst, dst_stride);
3680 int height,
int mx,
int my)
3687 filter_horiz, filter_vert);
3688 }
else if (8 == height) {
3690 filter_horiz, filter_vert);
3698 const int8_t *filter_horiz,
3699 const int8_t *filter_vert)
3701 uint64_t tp0, tp1, tp2, tp3;
3703 v16u8 filt_hz, filt_vt, dst0, dst1, vec0, vec1, vec2, vec3;
3704 v8u16 hz_out0, hz_out1, tmp0, tmp1, tmp2, tmp3;
3710 filt =
LD_SH(filter_horiz);
3711 filt_hz = (v16u8) __msa_splati_h(filt, 0);
3713 filt =
LD_SH(filter_vert);
3714 filt_vt = (v16u8) __msa_splati_h(filt, 0);
3716 LD_SB5(src, src_stride, src0, src1, src2, src3, src4);
3717 src += (5 * src_stride);
3719 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
3724 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out1, (v16i8) hz_out0);
3725 tmp0 = __msa_dotp_u_h(vec0, filt_vt);
3728 vec1 = (v16u8) __msa_ilvev_b((v16i8) hz_out0, (v16i8) hz_out1);
3729 tmp1 = __msa_dotp_u_h(vec1, filt_vt);
3732 vec2 = (v16u8) __msa_ilvev_b((v16i8) hz_out1, (v16i8) hz_out0);
3733 tmp2 = __msa_dotp_u_h(vec2, filt_vt);
3736 vec3 = (v16u8) __msa_ilvev_b((v16i8) hz_out0, (v16i8) hz_out1);
3737 tmp3 = __msa_dotp_u_h(vec3, filt_vt);
3748 const int8_t *filter_horiz,
3749 const int8_t *filter_vert,
3753 uint64_t tp0, tp1, tp2, tp3;
3755 v16u8 filt_hz, filt_vt, vec0, dst0, dst1;
3756 v8u16 hz_out0, hz_out1, tmp0, tmp1, tmp2, tmp3;
3762 filt =
LD_SH(filter_horiz);
3763 filt_hz = (v16u8) __msa_splati_h(filt, 0);
3765 filt =
LD_SH(filter_vert);
3766 filt_vt = (v16u8) __msa_splati_h(filt, 0);
3773 for (loop_cnt = (height >> 2); loop_cnt--;) {
3774 LD_SB4(src, src_stride, src1, src2, src3, src4);
3775 src += (4 * src_stride);
3778 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out1, (v16i8) hz_out0);
3779 tmp0 = __msa_dotp_u_h(vec0, filt_vt);
3782 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out0, (v16i8) hz_out1);
3783 tmp1 = __msa_dotp_u_h(vec0, filt_vt);
3789 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out1, (v16i8) hz_out0);
3790 tmp2 = __msa_dotp_u_h(vec0, filt_vt);
3793 vec0 = (v16u8) __msa_ilvev_b((v16i8) hz_out0, (v16i8) hz_out1);
3794 tmp3 = __msa_dotp_u_h(vec0, filt_vt);
3798 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
3802 dst += (4 * dst_stride);
3808 int height,
int mx,
int my)
3815 filter_horiz, filter_vert);
3819 filter_horiz, filter_vert,
3826 int height,
int mx,
int my)
3831 v16i8
src0,
src1, src2, src3, src4, src5, src6, src7,
mask;
3832 v16u8 filt_hz, filt_vt, vec0, vec1, dst0, dst1, dst2, dst3;
3833 v8u16 hz_out0, hz_out1, hz_out2, hz_out3, tmp0, tmp1;
3839 filt =
LD_SH(filter_horiz);
3840 filt_hz = (v16u8) __msa_splati_h(filt, 0);
3842 filt =
LD_SH(filter_vert);
3843 filt_vt = (v16u8) __msa_splati_h(filt, 0);
3845 LD_SB2(src, 8, src0, src1);
3851 for (loop_cnt = (height >> 2); loop_cnt--;) {
3852 LD_SB4(src, src_stride, src0, src2, src4, src6);
3853 LD_SB4(src + 8, src_stride, src1, src3, src5, src7);
3854 src += (4 * src_stride);
3855 LD_UB4(dst, dst_stride, dst0, dst1, dst2, dst3);
3859 ILVEV_B2_UB(hz_out0, hz_out1, hz_out2, hz_out3, vec0, vec1);
3860 DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp0, tmp1);
3868 ILVEV_B2_UB(hz_out1, hz_out0, hz_out3, hz_out2, vec0, vec1);
3869 DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp0, tmp1);
3877 ILVEV_B2_UB(hz_out0, hz_out1, hz_out2, hz_out3, vec0, vec1);
3878 DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp0, tmp1);
3886 ILVEV_B2_UB(hz_out1, hz_out0, hz_out3, hz_out2, vec0, vec1);
3887 DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp0, tmp1);
3897 int height,
int mx,
int my)
3901 for (multiple8_cnt = 2; multiple8_cnt--;) {
3911 int height,
int mx,
int my)
3915 for (multiple8_cnt = 4; multiple8_cnt--;) {
3928 uint64_t out0, out1, out2, out3, out4, out5, out6, out7;
3930 if (0 == height % 8) {
3931 for (cnt = height >> 3; cnt--;) {
3932 LD4(src, src_stride, out0, out1, out2, out3);
3933 src += (4 * src_stride);
3934 LD4(src, src_stride, out4, out5, out6, out7);
3935 src += (4 * src_stride);
3937 SD4(out0, out1, out2, out3, dst, dst_stride);
3938 dst += (4 * dst_stride);
3939 SD4(out4, out5, out6, out7, dst, dst_stride);
3940 dst += (4 * dst_stride);
3942 }
else if (0 == height % 4) {
3943 for (cnt = (height / 4); cnt--;) {
3944 LD4(src, src_stride, out0, out1, out2, out3);
3945 src += (4 * src_stride);
3947 SD4(out0, out1, out2, out3, dst, dst_stride);
3948 dst += (4 * dst_stride);
3958 v16u8
src0,
src1, src2, src3, src4, src5, src6, src7;
3961 LD_UB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
3962 ST_UB8(src0, src1, src2, src3, src4, src5, src6, src7, dst, dst_stride);
3963 }
else if (16 == height) {
3964 LD_UB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
3965 src += (8 * src_stride);
3966 ST_UB8(src0, src1, src2, src3, src4, src5, src6, src7, dst, dst_stride);
3967 dst += (8 * dst_stride);
3968 LD_UB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
3969 src += (8 * src_stride);
3970 ST_UB8(src0, src1, src2, src3, src4, src5, src6, src7, dst, dst_stride);
3971 dst += (8 * dst_stride);
3972 }
else if (32 == height) {
3973 LD_UB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
3974 src += (8 * src_stride);
3975 ST_UB8(src0, src1, src2, src3, src4, src5, src6, src7, dst, dst_stride);
3976 dst += (8 * dst_stride);
3977 LD_UB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
3978 src += (8 * src_stride);
3979 ST_UB8(src0, src1, src2, src3, src4, src5, src6, src7, dst, dst_stride);
3980 dst += (8 * dst_stride);
3981 LD_UB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
3982 src += (8 * src_stride);
3983 ST_UB8(src0, src1, src2, src3, src4, src5, src6, src7, dst, dst_stride);
3984 dst += (8 * dst_stride);
3985 LD_UB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
3986 ST_UB8(src0, src1, src2, src3, src4, src5, src6, src7, dst, dst_stride);
3987 }
else if (0 == height % 4) {
3988 for (cnt = (height >> 2); cnt--;) {
3989 LD_UB4(src, src_stride, src0, src1, src2, src3);
3990 src += (4 * src_stride);
3991 ST_UB4(src0, src1, src2, src3, dst, dst_stride);
3992 dst += (4 * dst_stride);
4002 v16u8
src0,
src1, src2, src3, src4, src5, src6, src7;
4004 if (0 == height % 8) {
4005 for (cnt = (height >> 3); cnt--;) {
4006 LD_UB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
4007 ST_UB8(src0, src1, src2, src3, src4, src5, src6, src7, dst, dst_stride);
4008 LD_UB8(src + 16, src_stride, src0, src1, src2, src3, src4, src5, src6,
4010 src += (8 * src_stride);
4011 ST_UB8(src0, src1, src2, src3, src4, src5, src6, src7, dst + 16,
4013 dst += (8 * dst_stride);
4015 }
else if (0 == height % 4) {
4016 for (cnt = (height >> 2); cnt--;) {
4017 LD_UB4(src, src_stride, src0, src1, src2, src3);
4018 LD_UB4(src + 16, src_stride, src4, src5, src6, src7);
4019 src += (4 * src_stride);
4020 ST_UB4(src0, src1, src2, src3, dst, dst_stride);
4021 ST_UB4(src4, src5, src6, src7, dst + 16, dst_stride);
4022 dst += (4 * dst_stride);
4032 v16u8
src0,
src1, src2, src3, src4, src5, src6, src7;
4033 v16u8 src8, src9, src10, src11, src12, src13, src14, src15;
4035 for (cnt = (height >> 2); cnt--;) {
4036 LD_UB4(src, 16, src0, src1, src2, src3);
4038 LD_UB4(src, 16, src4, src5, src6, src7);
4040 LD_UB4(src, 16, src8, src9, src10, src11);
4042 LD_UB4(src, 16, src12, src13, src14, src15);
4045 ST_UB4(src0, src1, src2, src3, dst, 16);
4047 ST_UB4(src4, src5, src6, src7, dst, 16);
4049 ST_UB4(src8, src9, src10, src11, dst, 16);
4051 ST_UB4(src12, src13, src14, src15, dst, 16);
4060 uint32_t tp0, tp1, tp2, tp3;
4061 v16u8
src0 = { 0 },
src1 = { 0 }, dst0 = { 0 }, dst1 = { 0 };
4064 LW4(src, src_stride, tp0, tp1, tp2, tp3);
4065 src += 4 * src_stride;
4067 LW4(src, src_stride, tp0, tp1, tp2, tp3);
4069 LW4(dst, dst_stride, tp0, tp1, tp2, tp3);
4071 LW4(dst + 4 * dst_stride, dst_stride, tp0, tp1, tp2, tp3);
4074 ST4x8_UB(dst0, dst1, dst, dst_stride);
4075 }
else if (4 == height) {
4076 LW4(src, src_stride, tp0, tp1, tp2, tp3);
4078 LW4(dst, dst_stride, tp0, tp1, tp2, tp3);
4080 dst0 = __msa_aver_u_b(src0, dst0);
4081 ST4x4_UB(dst0, dst0, 0, 1, 2, 3, dst, dst_stride);
4090 uint64_t tp0, tp1, tp2, tp3, tp4, tp5, tp6, tp7;
4092 v16u8 dst0, dst1, dst2, dst3;
4094 if (0 == (height % 8)) {
4095 for (cnt = (height >> 3); cnt--;) {
4096 LD4(src, src_stride, tp0, tp1, tp2, tp3);
4097 src += 4 * src_stride;
4098 LD4(src, src_stride, tp4, tp5, tp6, tp7);
4099 src += 4 * src_stride;
4104 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
4105 LD4(dst + 4 * dst_stride, dst_stride, tp4, tp5, tp6, tp7);
4110 AVER_UB4_UB(src0, dst0, src1, dst1, src2, dst2, src3, dst3, dst0,
4112 ST8x8_UB(dst0, dst1, dst2, dst3, dst, dst_stride);
4113 dst += 8 * dst_stride;
4115 }
else if (4 == height) {
4116 LD4(src, src_stride, tp0, tp1, tp2, tp3);
4119 LD4(dst, dst_stride, tp0, tp1, tp2, tp3);
4123 ST8x4_UB(dst0, dst1, dst, dst_stride);
4132 v16u8
src0,
src1, src2, src3, src4, src5, src6, src7;
4133 v16u8 dst0, dst1, dst2, dst3, dst4, dst5, dst6, dst7;
4135 if (0 == (height % 8)) {
4136 for (cnt = (height / 8); cnt--;) {
4137 LD_UB8(src, src_stride, src0, src1, src2, src3, src4, src5, src6, src7);
4138 src += (8 * src_stride);
4139 LD_UB8(dst, dst_stride, dst0, dst1, dst2, dst3, dst4, dst5, dst6, dst7);
4141 AVER_UB4_UB(src0, dst0, src1, dst1, src2, dst2, src3, dst3,
4142 dst0, dst1, dst2, dst3);
4143 AVER_UB4_UB(src4, dst4, src5, dst5, src6, dst6, src7, dst7,
4144 dst4, dst5, dst6, dst7);
4145 ST_UB8(dst0, dst1, dst2, dst3, dst4, dst5, dst6, dst7, dst, dst_stride);
4146 dst += (8 * dst_stride);
4148 }
else if (0 == (height % 4)) {
4149 for (cnt = (height / 4); cnt--;) {
4150 LD_UB4(src, src_stride, src0, src1, src2, src3);
4151 src += (4 * src_stride);
4152 LD_UB4(dst, dst_stride, dst0, dst1, dst2, dst3);
4154 AVER_UB4_UB(src0, dst0, src1, dst1, src2, dst2, src3, dst3,
4155 dst0, dst1, dst2, dst3);
4156 ST_UB4(dst0, dst1, dst2, dst3, dst, dst_stride);
4157 dst += (4 * dst_stride);
4168 v16u8
src0,
src1, src2, src3, src4, src5, src6, src7;
4169 v16u8 src8, src9, src10, src11, src12, src13, src14, src15;
4170 v16u8 dst0, dst1, dst2, dst3, dst4, dst5, dst6, dst7;
4171 v16u8 dst8, dst9, dst10, dst11, dst12, dst13, dst14, dst15;
4173 if (0 == (height % 8)) {
4174 for (cnt = (height / 8); cnt--;) {
4175 LD_UB4(src, src_stride, src0, src2, src4, src6);
4176 LD_UB4(src + 16, src_stride, src1, src3, src5, src7);
4177 src += (4 * src_stride);
4178 LD_UB4(dst_dup, dst_stride, dst0, dst2, dst4, dst6);
4179 LD_UB4(dst_dup + 16, dst_stride, dst1, dst3, dst5, dst7);
4180 dst_dup += (4 * dst_stride);
4181 LD_UB4(src, src_stride, src8, src10, src12, src14);
4182 LD_UB4(src + 16, src_stride, src9, src11, src13, src15);
4183 src += (4 * src_stride);
4184 LD_UB4(dst_dup, dst_stride, dst8, dst10, dst12, dst14);
4185 LD_UB4(dst_dup + 16, dst_stride, dst9, dst11, dst13, dst15);
4186 dst_dup += (4 * dst_stride);
4188 AVER_UB4_UB(src0, dst0, src1, dst1, src2, dst2, src3, dst3,
4189 dst0, dst1, dst2, dst3);
4190 AVER_UB4_UB(src4, dst4, src5, dst5, src6, dst6, src7, dst7,
4191 dst4, dst5, dst6, dst7);
4192 AVER_UB4_UB(src8, dst8, src9, dst9, src10, dst10, src11, dst11,
4193 dst8, dst9, dst10, dst11);
4194 AVER_UB4_UB(src12, dst12, src13, dst13, src14, dst14, src15, dst15,
4195 dst12, dst13, dst14, dst15);
4197 ST_UB4(dst0, dst2, dst4, dst6, dst, dst_stride);
4198 ST_UB4(dst1, dst3, dst5, dst7, dst + 16, dst_stride);
4199 dst += (4 * dst_stride);
4200 ST_UB4(dst8, dst10, dst12, dst14, dst, dst_stride);
4201 ST_UB4(dst9, dst11, dst13, dst15, dst + 16, dst_stride);
4202 dst += (4 * dst_stride);
4204 }
else if (0 == (height % 4)) {
4205 for (cnt = (height / 4); cnt--;) {
4206 LD_UB4(src, src_stride, src0, src2, src4, src6);
4207 LD_UB4(src + 16, src_stride, src1, src3, src5, src7);
4208 src += (4 * src_stride);
4209 LD_UB4(dst_dup, dst_stride, dst0, dst2, dst4, dst6);
4210 LD_UB4(dst_dup + 16, dst_stride, dst1, dst3, dst5, dst7);
4211 dst_dup += (4 * dst_stride);
4213 AVER_UB4_UB(src0, dst0, src1, dst1, src2, dst2, src3, dst3,
4214 dst0, dst1, dst2, dst3);
4215 AVER_UB4_UB(src4, dst4, src5, dst5, src6, dst6, src7, dst7,
4216 dst4, dst5, dst6, dst7);
4218 ST_UB4(dst0, dst2, dst4, dst6, dst, dst_stride);
4219 ST_UB4(dst1, dst3, dst5, dst7, dst + 16, dst_stride);
4220 dst += (4 * dst_stride);
4231 v16u8
src0,
src1, src2, src3, src4, src5, src6, src7;
4232 v16u8 src8, src9, src10, src11, src12, src13, src14, src15;
4233 v16u8 dst0, dst1, dst2, dst3, dst4, dst5, dst6, dst7;
4234 v16u8 dst8, dst9, dst10, dst11, dst12, dst13, dst14, dst15;
4236 for (cnt = (height / 4); cnt--;) {
4237 LD_UB4(src, 16, src0, src1, src2, src3);
4239 LD_UB4(src, 16, src4, src5, src6, src7);
4241 LD_UB4(src, 16, src8, src9, src10, src11);
4243 LD_UB4(src, 16, src12, src13, src14, src15);
4246 LD_UB4(dst_dup, 16, dst0, dst1, dst2, dst3);
4247 dst_dup += dst_stride;
4248 LD_UB4(dst_dup, 16, dst4, dst5, dst6, dst7);
4249 dst_dup += dst_stride;
4250 LD_UB4(dst_dup, 16, dst8, dst9, dst10, dst11);
4251 dst_dup += dst_stride;
4252 LD_UB4(dst_dup, 16, dst12, dst13, dst14, dst15);
4253 dst_dup += dst_stride;
4255 AVER_UB4_UB(src0, dst0, src1, dst1, src2, dst2, src3, dst3,
4256 dst0, dst1, dst2, dst3);
4257 AVER_UB4_UB(src4, dst4, src5, dst5, src6, dst6, src7, dst7,
4258 dst4, dst5, dst6, dst7);
4259 AVER_UB4_UB(src8, dst8, src9, dst9, src10, dst10, src11, dst11,
4260 dst8, dst9, dst10, dst11);
4261 AVER_UB4_UB(src12, dst12, src13, dst13, src14, dst14, src15, dst15,
4262 dst12, dst13, dst14, dst15);
4264 ST_UB4(dst0, dst1, dst2, dst3, dst, 16);
4266 ST_UB4(dst4, dst5, dst6, dst7, dst, 16);
4268 ST_UB4(dst8, dst9, dst10, dst11, dst, 16);
4270 ST_UB4(dst12, dst13, dst14, dst15, dst, 16);
4277 {0, 1, -5, 126, 8, -3, 1, 0},
4278 {-1, 3, -10, 122, 18, -6, 2, 0},
4279 {-1, 4, -13, 118, 27, -9, 3, -1},
4280 {-1, 4, -16, 112, 37, -11, 4, -1},
4281 {-1, 5, -18, 105, 48, -14, 4, -1},
4282 {-1, 5, -19, 97, 58, -16, 5, -1},
4283 {-1, 6, -19, 88, 68, -18, 5, -1},
4284 {-1, 6, -19, 78, 78, -19, 6, -1},
4285 {-1, 5, -18, 68, 88, -19, 6, -1},
4286 {-1, 5, -16, 58, 97, -19, 5, -1},
4287 {-1, 4, -14, 48, 105, -18, 5, -1},
4288 {-1, 4, -11, 37, 112, -16, 4, -1},
4289 {-1, 3, -9, 27, 118, -13, 4, -1},
4290 {0, 2, -6, 18, 122, -10, 3, -1},
4291 {0, 1, -3, 8, 126, -5, 1, 0},
4293 {-1, 3, -7, 127, 8, -3, 1, 0},
4294 {-2, 5, -13, 125, 17, -6, 3, -1},
4295 {-3, 7, -17, 121, 27, -10, 5, -2},
4296 {-4, 9, -20, 115, 37, -13, 6, -2},
4297 {-4, 10, -23, 108, 48, -16, 8, -3},
4298 {-4, 10, -24, 100, 59, -19, 9, -3},
4299 {-4, 11, -24, 90, 70, -21, 10, -4},
4300 {-4, 11, -23, 80, 80, -23, 11, -4},
4301 {-4, 10, -21, 70, 90, -24, 11, -4},
4302 {-3, 9, -19, 59, 100, -24, 10, -4},
4303 {-3, 8, -16, 48, 108, -23, 10, -4},
4304 {-2, 6, -13, 37, 115, -20, 9, -4},
4305 {-2, 5, -10, 27, 121, -17, 7, -3},
4306 {-1, 3, -6, 17, 125, -13, 5, -2},
4307 {0, 1, -3, 8, 127, -7, 3, -1},
4309 {-3, -1, 32, 64, 38, 1, -3, 0},
4310 {-2, -2, 29, 63, 41, 2, -3, 0},
4311 {-2, -2, 26, 63, 43, 4, -4, 0},
4312 {-2, -3, 24, 62, 46, 5, -4, 0},
4313 {-2, -3, 21, 60, 49, 7, -4, 0},
4314 {-1, -4, 18, 59, 51, 9, -4, 0},
4315 {-1, -4, 16, 57, 53, 12, -4, -1},
4316 {-1, -4, 14, 55, 55, 14, -4, -1},
4317 {-1, -4, 12, 53, 57, 16, -4, -1},
4318 {0, -4, 9, 51, 59, 18, -4, -1},
4319 {0, -4, 7, 49, 60, 21, -3, -2},
4320 {0, -4, 5, 46, 62, 24, -3, -2},
4321 {0, -4, 4, 43, 63, 26, -2, -2},
4322 {0, -3, 2, 41, 63, 29, -2, -2},
4323 {0, -3, 1, 38, 64, 32, -1, -3},
4327 #define VP9_8TAP_MIPS_MSA_FUNC(SIZE, type, type_idx) \
4328 void ff_put_8tap_##type##_##SIZE##h_msa(uint8_t *dst, ptrdiff_t dststride, \
4329 const uint8_t *src, \
4330 ptrdiff_t srcstride, \
4331 int h, int mx, int my) \
4333 const int8_t *filter = vp9_subpel_filters_msa[type_idx][mx-1]; \
4335 common_hz_8t_##SIZE##w_msa(src, srcstride, dst, dststride, filter, h); \
4338 void ff_put_8tap_##type##_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride, \
4339 const uint8_t *src, \
4340 ptrdiff_t srcstride, \
4341 int h, int mx, int my) \
4343 const int8_t *filter = vp9_subpel_filters_msa[type_idx][my-1]; \
4345 common_vt_8t_##SIZE##w_msa(src, srcstride, dst, dststride, filter, h); \
4348 void ff_put_8tap_##type##_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride, \
4349 const uint8_t *src, \
4350 ptrdiff_t srcstride, \
4351 int h, int mx, int my) \
4353 const int8_t *hfilter = vp9_subpel_filters_msa[type_idx][mx-1]; \
4354 const int8_t *vfilter = vp9_subpel_filters_msa[type_idx][my-1]; \
4356 common_hv_8ht_8vt_##SIZE##w_msa(src, srcstride, dst, dststride, hfilter, \
4360 void ff_avg_8tap_##type##_##SIZE##h_msa(uint8_t *dst, ptrdiff_t dststride, \
4361 const uint8_t *src, \
4362 ptrdiff_t srcstride, \
4363 int h, int mx, int my) \
4365 const int8_t *filter = vp9_subpel_filters_msa[type_idx][mx-1]; \
4367 common_hz_8t_and_aver_dst_##SIZE##w_msa(src, srcstride, dst, \
4368 dststride, filter, h); \
4371 void ff_avg_8tap_##type##_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride, \
4372 const uint8_t *src, \
4373 ptrdiff_t srcstride, \
4374 int h, int mx, int my) \
4376 const int8_t *filter = vp9_subpel_filters_msa[type_idx][my-1]; \
4378 common_vt_8t_and_aver_dst_##SIZE##w_msa(src, srcstride, dst, dststride, \
4382 void ff_avg_8tap_##type##_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride, \
4383 const uint8_t *src, \
4384 ptrdiff_t srcstride, \
4385 int h, int mx, int my) \
4387 const int8_t *hfilter = vp9_subpel_filters_msa[type_idx][mx-1]; \
4388 const int8_t *vfilter = vp9_subpel_filters_msa[type_idx][my-1]; \
4390 common_hv_8ht_8vt_and_aver_dst_##SIZE##w_msa(src, srcstride, dst, \
4391 dststride, hfilter, \
4395 #define VP9_COPY_AVG_MIPS_MSA_FUNC(SIZE) \
4396 void ff_copy##SIZE##_msa(uint8_t *dst, ptrdiff_t dststride, \
4397 const uint8_t *src, ptrdiff_t srcstride, \
4398 int h, int mx, int my) \
4401 copy_width##SIZE##_msa(src, srcstride, dst, dststride, h); \
4404 void ff_avg##SIZE##_msa(uint8_t *dst, ptrdiff_t dststride, \
4405 const uint8_t *src, ptrdiff_t srcstride, \
4406 int h, int mx, int my) \
4409 avg_width##SIZE##_msa(src, srcstride, dst, dststride, h); \
4412 #define VP9_AVG_MIPS_MSA_FUNC(SIZE) \
4413 void ff_avg##SIZE##_msa(uint8_t *dst, ptrdiff_t dststride, \
4414 const uint8_t *src, ptrdiff_t srcstride, \
4415 int h, int mx, int my) \
4418 avg_width##SIZE##_msa(src, srcstride, dst, dststride, h); \
4445 #undef VP9_8TAP_MIPS_MSA_FUNC
4446 #undef VP9_COPY_AVG_MIPS_MSA_FUNC
4447 #undef VP9_AVG_MIPS_MSA_FUNC
void ff_put_bilin_8v_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
void ff_avg_bilin_64h_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_hv_8ht_8vt_and_aver_dst_64w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, int32_t height)
static void common_hz_8t_and_aver_dst_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
void ff_avg_bilin_4hv_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_vt_8t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
#define VP9_COPY_AVG_MIPS_MSA_FUNC(SIZE)
static void common_hv_2ht_2vt_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, int32_t height)
void ff_avg_bilin_8hv_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_vt_8t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
#define XORI_B2_128_SB(...)
static void common_hz_8t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
static void copy_width8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height)
#define PCKEV_XORI128_UB(in0, in1)
static void common_hv_2ht_2vt_and_aver_dst_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert)
static void common_hz_2t_and_aver_dst_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
#define XORI_B3_128_SB(...)
#define VP9_8TAP_MIPS_MSA_FUNC(SIZE, type, type_idx)
void ff_put_bilin_4hv_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
void ff_put_bilin_32h_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
void ff_avg_bilin_16v_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
#define DPADD_SB4_SH(...)
static void copy_width64_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height)
static void common_vt_2t_and_aver_dst_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
static void common_hv_8ht_8vt_and_aver_dst_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, int32_t height)
static void common_hv_8ht_8vt_and_aver_dst_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, int32_t height)
#define ST4x4_UB(in0, in1, idx0, idx1, idx2, idx3, pdst, stride)
static void common_hz_8t_and_aver_dst_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static const int8_t vp9_subpel_filters_msa[3][15][8]
#define XORI_B4_128_UB(...)
static void filter(int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, int16_t *high, ptrdiff_t high_stride, int len, int clip)
static void common_hz_2t_and_aver_dst_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
#define PCKEV_ST_SB(in0, in1, pdst)
#define HORIZ_8TAP_8WID_4VECS_FILT(src0, src1, src2, src3,mask0, mask1, mask2, mask3,filt0, filt1, filt2, filt3,out0, out1, out2, out3)
static void common_hz_2t_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
static void common_hv_2ht_2vt_and_aver_dst_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, int32_t height)
#define LD4(psrc, stride, out0, out1, out2, out3)
#define PCKEV_AVG_ST8x4_UB(in0, in1, in2, in3,dst0, dst1,pdst, stride)
#define XORI_B2_128_UB(...)
void ff_put_bilin_64hv_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
#define SPLATI_H4_SH(...)
static void common_vt_2t_and_aver_dst_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
static void common_vt_2t_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
static void common_vt_8t_64w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static void common_hz_8t_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
#define PCKEV_AVG_ST_UB(in0, in1, dst, pdst)
void ff_put_bilin_8hv_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
void ff_put_bilin_16v_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_vt_8t_16w_mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height, int32_t width)
static void common_vt_8t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
void ff_put_bilin_16hv_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_hv_8ht_8vt_64w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, int32_t height)
void ff_put_bilin_64v_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_hz_2t_and_aver_dst_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
static const uint16_t mask[17]
static void common_hv_8ht_8vt_and_aver_dst_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, int32_t height)
static void common_hz_2t_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
#define HORIZ_8TAP_FILT(src0, src1, mask0, mask1, mask2, mask3,filt_h0, filt_h1, filt_h2, filt_h3)
static void common_hv_8ht_8vt_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, int32_t height)
static void common_vt_8t_and_aver_dst_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
#define XORI_B7_128_SB(...)
void ff_avg_bilin_32hv_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
#define XORI_B4_128_SB(...)
static void common_hz_8t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static void common_hv_8ht_8vt_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, int32_t height)
static void common_hz_8t_and_aver_dst_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static void common_vt_8t_and_aver_dst_16w_mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height, int32_t width)
static void common_hz_8t_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
static void common_hz_8t_64w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
#define CONVERT_UB_AVG_ST8x4_UB(in0, in1, in2, in3,dst0, dst1, pdst, stride)
static void common_hv_2ht_2vt_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert)
void ff_avg_bilin_32h_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_hv_8ht_8vt_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, int32_t height)
static void common_vt_2t_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
#define HORIZ_2TAP_FILT_UH(in0, in1, mask, coeff, shift)
void ff_put_bilin_4v_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
void ff_avg_bilin_8h_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
void ff_avg_bilin_32v_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_hv_2ht_2vt_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert)
static void avg_width16_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height)
static void common_hz_8t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static void common_hv_8ht_8vt_and_aver_dst_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, int32_t height)
static void common_vt_8t_and_aver_dst_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
#define SPLATI_H4_SB(...)
#define INSERT_W4_UB(...)
static void common_hv_2ht_2vt_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert)
void ff_put_bilin_64h_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
void ff_put_bilin_8h_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_hz_8t_and_aver_dst_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static void common_vt_8t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static void common_hz_8t_and_aver_dst_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
void ff_put_bilin_32v_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_vt_2t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
static void copy_width16_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height)
static void common_hz_8t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static const int8_t vp9_bilinear_filters_msa[15][2]
static void avg_width8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height)
static void avg_width64_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height)
void ff_put_bilin_4h_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void avg_width32_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height)
#define FILT_8TAP_DPADD_S_H(vec0, vec1, vec2, vec3,filt0, filt1, filt2, filt3)
void ff_put_bilin_16h_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void copy_width32_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height)
#define PCKEV_XORI128_AVG_ST_UB(in0, in1, dst, pdst)
static void common_vt_2t_and_aver_dst_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static void common_hv_8ht_8vt_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, int32_t height)
#define SD4(in0, in1, in2, in3, pdst, stride)
void ff_avg_bilin_16h_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_vt_2t_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static void common_vt_2t_and_aver_dst_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
static const int8_t filt[NUMTAPS]
static void common_hz_8t_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
static void common_vt_8t_and_aver_dst_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
#define ST4x8_UB(in0, in1, pdst, stride)
void ff_avg_bilin_4v_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_hz_8t_and_aver_dst_64w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static void common_hv_2ht_2vt_and_aver_dst_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert)
#define INSERT_D2_UB(...)
#define LW4(psrc, stride, out0, out1, out2, out3)
#define ST8x4_UB(in0, in1, pdst, stride)
void ff_avg_bilin_4h_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
void ff_avg_bilin_8v_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
#define ST8x8_UB(in0, in1, in2, in3, pdst, stride)
void ff_avg_bilin_64v_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
#define HORIZ_8TAP_4WID_4VECS_FILT(src0, src1, src2, src3,mask0, mask1, mask2, mask3,filt0, filt1, filt2, filt3,out0, out1)
static void common_hz_8t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static void common_hz_8t_and_aver_dst_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
void ff_avg_bilin_64hv_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_hz_2t_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static void common_vt_8t_and_aver_dst_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)
static void common_hv_2ht_2vt_and_aver_dst_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert)
void ff_avg_bilin_16hv_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void common_hz_2t_and_aver_dst_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
static const uint8_t mc_filt_mask_arr[16 *3]
static void common_hz_2t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter)
#define VP9_AVG_MIPS_MSA_FUNC(SIZE)
void ff_put_bilin_32hv_msa(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
static void avg_width4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height)
static void common_vt_8t_and_aver_dst_64w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height)