Replace sqxtn+smin+smax by sqxtun+umin.
Unified · Split
| @@ -36,13 +36,13 @@ · 35 unmodified lines | |||
| 36 | .ifc \type, avg | 36 | .ifc \type, avg |
| 37 | saddl v4.4s, v0.4h, v2.4h | 37 | saddl v4.4s, v0.4h, v2.4h |
| 38 | add v4.4s, v4.4s, v16.4s | 38 | add v4.4s, v4.4s, v16.4s |
| 39 | sqshrn v4.4h, v4.4s, #(15 - \bit_depth) | 39 | sqshrun v4.4h, v4.4s, #(15 - \bit_depth) |
| 40 | .else | 40 | .else |
| 41 | mov v4.16b, v16.16b | 41 | mov v4.16b, v16.16b |
| 42 | smlal v4.4s, v0.4h, v19.4h | 42 | smlal v4.4s, v0.4h, v19.4h |
| 43 | smlal v4.4s, v2.4h, v20.4h | 43 | smlal v4.4s, v2.4h, v20.4h |
| 44 | sqshl v4.4s, v4.4s, v22.4s | 44 | sqshl v4.4s, v4.4s, v22.4s |
| 45 | sqxtn v4.4h, v4.4s | 45 | sqxtun v4.4h, v4.4s |
| 46 | .endif | 46 | .endif |
| 47 | 47 | ||
| 48 | .if \bit_depth == 8 | 48 | .if \bit_depth == 8 |
| @@ -54,8 +54,7 @@ · 5 unmodified lines | |||
| 54 | .endif | 54 | .endif |
| 55 | 55 | ||
| 56 | .else // bit_depth > 8 | 56 | .else // bit_depth > 8 |
| 57 | smin v4.4h, v4.4h, v17.4h | 57 | umin v4.4h, v4.4h, v17.4h |
| 58 | smax v4.4h, v4.4h, v18.4h | ||
| 59 | .if \tap == 2 | 58 | .if \tap == 2 |
| 60 | str s4, [dst] | 59 | str s4, [dst] |
| 61 | .else | 60 | .else |
| @@ -95,7 +94,6 @@ function ff_vvc_\type\()_\bit_depth\()_neon, export=1 · 33 unmodified lines | |||
| 95 | .if \bit_depth >= 10 | 94 | .if \bit_depth >= 10 |
| 96 | // clip pixel | 95 | // clip pixel |
| 97 | mov w6, #((1 << \bit_depth) - 1) | 96 | mov w6, #((1 << \bit_depth) - 1) |
| 98 | movi v18.8h, #0 | ||
| 99 | dup v17.8h, w6 | 97 | dup v17.8h, w6 |
| 100 | .endif | 98 | .endif |
| 101 | 99 | ||
| @@ -121,8 +119,8 @@ function ff_vvc_\type\()_\bit_depth\()_neon, export=1 · 19 unmodified lines | |||
| 121 | saddl2 v5.4s, v0.8h, v2.8h | 119 | saddl2 v5.4s, v0.8h, v2.8h |
| 122 | add v4.4s, v4.4s, v16.4s | 120 | add v4.4s, v4.4s, v16.4s |
| 123 | add v5.4s, v5.4s, v16.4s | 121 | add v5.4s, v5.4s, v16.4s |
| 124 | sqshrn v4.4h, v4.4s, #(15 - \bit_depth) | 122 | sqshrun v4.4h, v4.4s, #(15 - \bit_depth) |
| 125 | sqshrn2 v4.8h, v5.4s, #(15 - \bit_depth) | 123 | sqshrun2 v4.8h, v5.4s, #(15 - \bit_depth) |
| 126 | .else | 124 | .else |
| 127 | mov v4.16b, v16.16b | 125 | mov v4.16b, v16.16b |
| 128 | mov v5.16b, v16.16b | 126 | mov v5.16b, v16.16b |
| @@ -132,16 +130,15 @@ function ff_vvc_\type\()_\bit_depth\()_neon, export=1 · 3 unmodified lines | |||
| 132 | smlal2 v5.4s, v2.8h, v20.8h | 130 | smlal2 v5.4s, v2.8h, v20.8h |
| 133 | sqshl v4.4s, v4.4s, v22.4s | 131 | sqshl v4.4s, v4.4s, v22.4s |
| 134 | sqshl v5.4s, v5.4s, v22.4s | 132 | sqshl v5.4s, v5.4s, v22.4s |
| 135 | sqxtn v4.4h, v4.4s | 133 | sqxtun v4.4h, v4.4s |
| 136 | sqxtn2 v4.8h, v5.4s | 134 | sqxtun2 v4.8h, v5.4s |
| 137 | .endif | 135 | .endif |
| 138 | subs height, height, #1 | 136 | subs height, height, #1 |
| 139 | .if \bit_depth == 8 | 137 | .if \bit_depth == 8 |
| 140 | sqxtun v4.8b, v4.8h | 138 | sqxtun v4.8b, v4.8h |
| 141 | st1 {v4.8b}, [dst], dst_stride | 139 | st1 {v4.8b}, [dst], dst_stride |
| 142 | .else | 140 | .else |
| 143 | smin v4.8h, v4.8h, v17.8h | 141 | umin v4.8h, v4.8h, v17.8h |
| 144 | smax v4.8h, v4.8h, v18.8h | ||
| 145 | st1 {v4.8h}, [dst], dst_stride | 142 | st1 {v4.8h}, [dst], dst_stride |
| 146 | .endif | 143 | .endif |
| 147 | b.ne 8b | 144 | b.ne 8b |
| @@ -163,10 +160,10 @@ function ff_vvc_\type\()_\bit_depth\()_neon, export=1 · 15 unmodified lines | |||
| 163 | add v5.4s, v5.4s, v16.4s | 160 | add v5.4s, v5.4s, v16.4s |
| 164 | add v6.4s, v6.4s, v16.4s | 161 | add v6.4s, v6.4s, v16.4s |
| 165 | add v7.4s, v7.4s, v16.4s | 162 | add v7.4s, v7.4s, v16.4s |
| 166 | sqshrn v4.4h, v4.4s, #(15 - \bit_depth) | 163 | sqshrun v4.4h, v4.4s, #(15 - \bit_depth) |
| 167 | sqshrn2 v4.8h, v5.4s, #(15 - \bit_depth) | 164 | sqshrun2 v4.8h, v5.4s, #(15 - \bit_depth) |
| 168 | sqshrn v6.4h, v6.4s, #(15 - \bit_depth) | 165 | sqshrun v6.4h, v6.4s, #(15 - \bit_depth) |
| 169 | sqshrn2 v6.8h, v7.4s, #(15 - \bit_depth) | 166 | sqshrun2 v6.8h, v7.4s, #(15 - \bit_depth) |
| 170 | .else // avg | 167 | .else // avg |
| 171 | mov v4.16b, v16.16b | 168 | mov v4.16b, v16.16b |
| 172 | mov v5.16b, v16.16b | 169 | mov v5.16b, v16.16b |
| @@ -184,10 +181,10 @@ function ff_vvc_\type\()_\bit_depth\()_neon, export=1 · 11 unmodified lines | |||
| 184 | sqshl v5.4s, v5.4s, v22.4s | 181 | sqshl v5.4s, v5.4s, v22.4s |
| 185 | sqshl v6.4s, v6.4s, v22.4s | 182 | sqshl v6.4s, v6.4s, v22.4s |
| 186 | sqshl v7.4s, v7.4s, v22.4s | 183 | sqshl v7.4s, v7.4s, v22.4s |
| 187 | sqxtn v4.4h, v4.4s | 184 | sqxtun v4.4h, v4.4s |
| 188 | sqxtn v6.4h, v6.4s | 185 | sqxtun v6.4h, v6.4s |
| 189 | sqxtn2 v4.8h, v5.4s | 186 | sqxtun2 v4.8h, v5.4s |
| 190 | sqxtn2 v6.8h, v7.4s | 187 | sqxtun2 v6.8h, v7.4s |
| 191 | .endif // w_avg | 188 | .endif // w_avg |
| 192 | subs w6, w6, #16 | 189 | subs w6, w6, #16 |
| 193 | .if \bit_depth == 8 | 190 | .if \bit_depth == 8 |
| @@ -195,10 +192,8 @@ function ff_vvc_\type\()_\bit_depth\()_neon, export=1 · 1 unmodified line | |||
| 195 | sqxtun2 v4.16b, v6.8h | 192 | sqxtun2 v4.16b, v6.8h |
| 196 | str q4, [x9], #16 | 193 | str q4, [x9], #16 |
| 197 | .else | 194 | .else |
| 198 | smin v4.8h, v4.8h, v17.8h | 195 | umin v4.8h, v4.8h, v17.8h |
| 199 | smin v6.8h, v6.8h, v17.8h | 196 | umin v6.8h, v6.8h, v17.8h |
| 200 | smax v4.8h, v4.8h, v18.8h | ||
| 201 | smax v6.8h, v6.8h, v18.8h | ||
| 202 | stp q4, q6, [x9], #32 | 197 | stp q4, q6, [x9], #32 |
| 203 | .endif | 198 | .endif |
| 204 | b.ne 17b | 199 | b.ne 17b |