25 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7,
26 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12
32 v16u8 in0, in1, in2, in3, in4, in5, in6, in7;
33 v8i16 temp0, temp1, temp2;
34 v8i16 diff0, diff2, diff4, diff6, diff8;
35 v8i16 d0, a_d0, str_x2,
str;
42 temp0 = (v8i16) __msa_ilvr_b((v16i8) in0, (v16i8) in1);
43 a_d0 = __msa_hsub_u_h((v16u8) temp0, (v16u8) temp0);
44 temp2 = (v8i16) __msa_ilvr_b((v16i8) in2, (v16i8) in3);
45 temp2 = __msa_hsub_u_h((v16u8) temp2, (v16u8) temp2);
48 diff2 = -(-diff0 >> 3);
49 str_x2 = __msa_fill_h(-(strength << 1));
50 temp0 = (str_x2 <= diff2);
51 diff2 = (v8i16) __msa_bmz_v((v16u8) diff2, (v16u8) temp0, (v16u8) temp0);
52 temp2 = str_x2 - diff2;
53 str = __msa_fill_h(-strength);
54 temp0 = (diff2 <
str);
55 diff2 = (v8i16) __msa_bmnz_v((v16u8) diff2, (v16u8) temp2, (v16u8) temp0);
57 str_x2 = __msa_fill_h(strength << 1);
58 temp0 = (diff4 <= str_x2);
59 diff4 = (v8i16) __msa_bmz_v((v16u8) diff4, (v16u8) temp0, (v16u8) temp0);
60 temp2 = str_x2 - diff4;
61 str = __msa_fill_h(strength);
62 temp0 = (
str < diff4);
63 diff4 = (v8i16) __msa_bmnz_v((v16u8) diff4, (v16u8) temp2, (v16u8) temp0);
64 temp0 = __msa_clti_s_h(diff0, 0);
65 d0 = (v8i16) __msa_bmnz_v((v16u8) diff4, (v16u8) diff2, (v16u8) temp0);
68 diff8 = (v8i16) __msa_bmnz_v((v16u8) diff4, (v16u8) diff2, (v16u8) temp0);
72 temp0 = (diff6 < temp2);
73 diff6 = (v8i16) __msa_bmnz_v((v16u8) diff6, (v16u8) temp2, (v16u8) temp0);
75 temp0 = (diff2 <= diff8);
76 diff2 = (v8i16) __msa_bmz_v((v16u8) diff2, (v16u8) diff8, (v16u8) temp0);
77 temp0 = __msa_clti_s_h(a_d0, 0);
78 diff6 = (v8i16) __msa_bmz_v((v16u8) diff6, (v16u8) diff2, (v16u8) temp0);
80 in0 = (v16u8) ((v16i8) in0 - (v16i8) diff6);
81 in1 = (v16u8) ((v16i8) in1 + (v16i8) diff6);
82 in3 = __msa_xori_b(in3, 128);
83 in3 = (v16u8) __msa_adds_s_b((v16i8) in3, (v16i8) d0);
84 in3 = __msa_xori_b(in3, 128);
85 in2 = __msa_subsus_u_b(in2, (v16i8) d0);
87 in0 = (v16u8) __msa_ilvr_h(temp1, temp0);
88 in3 = (v16u8) __msa_ilvl_h(temp1, temp0);
89 ST_W8(in0, in3, 0, 1, 2, 3, 0, 1, 2, 3,
src,
stride);
95 uint64_t res0, res1, res2, res3;
96 v16u8 in0, in1, in2, in3;
97 v8i16 temp0, temp2, diff0, diff2, diff4, diff6, diff8;
98 v8i16 d0, a_d0, str_x2,
str;
102 temp0 = (v8i16) __msa_ilvr_b((v16i8) in0, (v16i8) in1);
103 a_d0 = __msa_hsub_u_h((v16u8) temp0, (v16u8) temp0);
104 temp2 = (v8i16) __msa_ilvr_b((v16i8) in2, (v16i8) in3);
105 temp2 = __msa_hsub_u_h((v16u8) temp2, (v16u8) temp2);
107 diff0 = a_d0 + temp2;
108 diff2 = -(-diff0 >> 3);
109 str_x2 = __msa_fill_h(-(strength << 1));
110 temp0 = (str_x2 <= diff2);
111 diff2 = (v8i16) __msa_bmz_v((v16u8) diff2, (v16u8) temp0, (v16u8) temp0);
112 temp2 = str_x2 - diff2;
113 str = __msa_fill_h(-strength);
114 temp0 = (diff2 <
str);
115 diff2 = (v8i16) __msa_bmnz_v((v16u8) diff2, (v16u8) temp2, (v16u8) temp0);
117 str_x2 = __msa_fill_h(strength << 1);
118 temp0 = (diff4 <= str_x2);
119 diff4 = (v8i16) __msa_bmz_v((v16u8) diff4, (v16u8) temp0, (v16u8) temp0);
120 temp2 = str_x2 - diff4;
121 str = __msa_fill_h(strength);
122 temp0 = (
str < diff4);
123 diff4 = (v8i16) __msa_bmnz_v((v16u8) diff4, (v16u8) temp2, (v16u8) temp0);
124 temp0 = __msa_clti_s_h(diff0, 0);
125 d0 = (v8i16) __msa_bmnz_v((v16u8) diff4, (v16u8) diff2, (v16u8) temp0);
128 diff8 = (v8i16) __msa_bmnz_v((v16u8) diff4, (v16u8) diff2, (v16u8) temp0);
129 diff6 = (-a_d0) >> 2;
132 temp0 = (diff6 < temp2);
133 diff6 = (v8i16) __msa_bmnz_v((v16u8) diff6, (v16u8) temp2, (v16u8) temp0);
135 temp0 = (diff2 <= diff8);
136 diff2 = (v8i16) __msa_bmz_v((v16u8) diff2, (v16u8) diff8, (v16u8) temp0);
137 temp0 = __msa_clti_s_h(a_d0, 0);
138 diff6 = (v8i16) __msa_bmz_v((v16u8) diff6, (v16u8) diff2, (v16u8) temp0);
140 in0 = (v16u8) ((v16i8) in0 - (v16i8) diff6);
141 in1 = (v16u8) ((v16i8) in1 + (v16i8) diff6);
142 in3 = __msa_xori_b(in3, 128);
143 in3 = (v16u8) __msa_adds_s_b((v16i8) in3, (v16i8) d0);
144 in3 = __msa_xori_b(in3, 128);
145 in2 = __msa_subsus_u_b(in2, (v16i8) d0);
146 res0 = __msa_copy_u_d((v2i64) in0, 0);
147 res1 = __msa_copy_u_d((v2i64) in3, 0);
148 res2 = __msa_copy_u_d((v2i64) in2, 0);
149 res3 = __msa_copy_u_d((v2i64) in1, 0);