quant-a.S 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. /****************************************************************************
  2. * quant.S: arm quantization and level-run
  3. *****************************************************************************
  4. * Copyright (C) 2009-2018 x264 project
  5. *
  6. * Authors: David Conrad <lessen42@gmail.com>
  7. * Janne Grunau <janne-x264@jannau.net>
  8. * Martin Storsjo <martin@martin.st>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
  23. *
  24. * This program is also available under a commercial proprietary license.
  25. * For more information, contact us at licensing@x264.com.
  26. *****************************************************************************/
  27. #include "asm.S"
  28. .macro QUANT_TWO bias0 bias1 mf0_1 mf2_3 mask
  29. add v18.8h, v18.8h, \bias0
  30. add v19.8h, v19.8h, \bias1
  31. umull v20.4s, v18.4h, \mf0_1\().4h
  32. umull2 v21.4s, v18.8h, \mf0_1\().8h
  33. umull v22.4s, v19.4h, \mf2_3\().4h
  34. umull2 v23.4s, v19.8h, \mf2_3\().8h
  35. sshr v16.8h, v16.8h, #15
  36. sshr v17.8h, v17.8h, #15
  37. shrn v18.4h, v20.4s, #16
  38. shrn2 v18.8h, v21.4s, #16
  39. shrn v19.4h, v22.4s, #16
  40. shrn2 v19.8h, v23.4s, #16
  41. eor v18.16b, v18.16b, v16.16b
  42. eor v19.16b, v19.16b, v17.16b
  43. sub v18.8h, v18.8h, v16.8h
  44. sub v19.8h, v19.8h, v17.8h
  45. orr \mask, v18.16b, v19.16b
  46. st1 {v18.8h,v19.8h}, [x0], #32
  47. .endm
  48. .macro QUANT_END d
  49. fmov x2, \d
  50. mov w0, #0
  51. tst x2, x2
  52. cinc w0, w0, ne
  53. ret
  54. .endm
  55. // quant_2x2_dc( int16_t dct[4], int mf, int bias )
  56. function quant_2x2_dc_neon, export=1
  57. ld1 {v0.4h}, [x0]
  58. dup v2.4h, w2
  59. dup v1.4h, w1
  60. abs v3.4h, v0.4h
  61. add v3.4h, v3.4h, v2.4h
  62. umull v3.4s, v3.4h, v1.4h
  63. sshr v0.4h, v0.4h, #15
  64. shrn v3.4h, v3.4s, #16
  65. eor v3.8b, v3.8b, v0.8b
  66. sub v3.4h, v3.4h, v0.4h
  67. st1 {v3.4h}, [x0]
  68. QUANT_END d3
  69. endfunc
  70. // quant_4x4_dc( int16_t dct[16], int mf, int bias )
  71. function quant_4x4_dc_neon, export=1
  72. ld1 {v16.8h,v17.8h}, [x0]
  73. abs v18.8h, v16.8h
  74. abs v19.8h, v17.8h
  75. dup v0.8h, w2
  76. dup v2.8h, w1
  77. QUANT_TWO v0.8h, v0.8h, v2, v2, v0.16b
  78. uqxtn v0.8b, v0.8h
  79. QUANT_END d0
  80. endfunc
  81. // quant_4x4( int16_t dct[16], uint16_t mf[16], uint16_t bias[16] )
  82. function quant_4x4_neon, export=1
  83. ld1 {v16.8h,v17.8h}, [x0]
  84. abs v18.8h, v16.8h
  85. abs v19.8h, v17.8h
  86. ld1 {v0.8h,v1.8h}, [x2]
  87. ld1 {v2.8h,v3.8h}, [x1]
  88. QUANT_TWO v0.8h, v1.8h, v2, v3, v0.16b
  89. uqxtn v0.8b, v0.8h
  90. QUANT_END d0
  91. endfunc
  92. // quant_4x4x4( int16_t dct[4][16], uint16_t mf[16], uint16_t bias[16] )
  93. function quant_4x4x4_neon, export=1
  94. ld1 {v16.8h,v17.8h}, [x0]
  95. abs v18.8h, v16.8h
  96. abs v19.8h, v17.8h
  97. ld1 {v0.8h,v1.8h}, [x2]
  98. ld1 {v2.8h,v3.8h}, [x1]
  99. QUANT_TWO v0.8h, v1.8h, v2, v3, v4.16b
  100. ld1 {v16.8h,v17.8h}, [x0]
  101. abs v18.8h, v16.8h
  102. abs v19.8h, v17.8h
  103. QUANT_TWO v0.8h, v1.8h, v2, v3, v5.16b
  104. ld1 {v16.8h,v17.8h}, [x0]
  105. abs v18.8h, v16.8h
  106. abs v19.8h, v17.8h
  107. QUANT_TWO v0.8h, v1.8h, v2, v3, v6.16b
  108. ld1 {v16.8h,v17.8h}, [x0]
  109. abs v18.8h, v16.8h
  110. abs v19.8h, v17.8h
  111. QUANT_TWO v0.8h, v1.8h, v2, v3, v7.16b
  112. uqxtn v4.8b, v4.8h
  113. uqxtn v7.8b, v7.8h
  114. uqxtn v6.8b, v6.8h
  115. uqxtn v5.8b, v5.8h
  116. fmov x7, d7
  117. fmov x6, d6
  118. fmov x5, d5
  119. fmov x4, d4
  120. mov w0, #0
  121. tst x7, x7
  122. cinc w0, w0, ne
  123. lsl w0, w0, #1
  124. tst x6, x6
  125. cinc w0, w0, ne
  126. lsl w0, w0, #1
  127. tst x5, x5
  128. cinc w0, w0, ne
  129. lsl w0, w0, #1
  130. tst x4, x4
  131. cinc w0, w0, ne
  132. ret
  133. endfunc
  134. // quant_8x8( int16_t dct[64], uint16_t mf[64], uint16_t bias[64] )
  135. function quant_8x8_neon, export=1
  136. ld1 {v16.8h,v17.8h}, [x0]
  137. abs v18.8h, v16.8h
  138. abs v19.8h, v17.8h
  139. ld1 {v0.8h,v1.8h}, [x2], #32
  140. ld1 {v2.8h,v3.8h}, [x1], #32
  141. QUANT_TWO v0.8h, v1.8h, v2, v3, v4.16b
  142. .rept 3
  143. ld1 {v16.8h,v17.8h}, [x0]
  144. abs v18.8h, v16.8h
  145. abs v19.8h, v17.8h
  146. ld1 {v0.8h,v1.8h}, [x2], #32
  147. ld1 {v2.8h,v3.8h}, [x1], #32
  148. QUANT_TWO v0.8h, v1.8h, v2, v3, v5.16b
  149. orr v4.16b, v4.16b, v5.16b
  150. .endr
  151. uqxtn v0.8b, v4.8h
  152. QUANT_END d0
  153. endfunc
  154. .macro DEQUANT_START mf_size offset dc=no
  155. mov w3, #0x2b
  156. mul w3, w3, w2
  157. lsr w3, w3, #8 // i_qbits = i_qp / 6
  158. add w5, w3, w3, lsl #1
  159. sub w2, w2, w5, lsl #1 // i_mf = i_qp % 6
  160. lsl w2, w2, #\mf_size
  161. .ifc \dc,no
  162. add x1, x1, w2, sxtw // dequant_mf[i_mf]
  163. .else
  164. ldr x1, [x1, w2, sxtw] // dequant_mf[i_mf][0][0]
  165. .endif
  166. subs w3, w3, #\offset // 6 for 8x8
  167. .endm
  168. // dequant_4x4( int16_t dct[16], int dequant_mf[6][16], int i_qp )
  169. .macro DEQUANT size bits
  170. function dequant_\size\()_neon, export=1
  171. DEQUANT_START \bits+2, \bits
  172. .ifc \size, 8x8
  173. mov w2, #4
  174. .endif
  175. b.lt dequant_\size\()_rshift
  176. dup v31.8h, w3
  177. dequant_\size\()_lshift_loop:
  178. .ifc \size, 8x8
  179. subs w2, w2, #1
  180. .endif
  181. ld1 {v16.4s}, [x1], #16
  182. ld1 {v17.4s}, [x1], #16
  183. sqxtn v2.4h, v16.4s
  184. ld1 {v18.4s}, [x1], #16
  185. sqxtn2 v2.8h, v17.4s
  186. ld1 {v19.4s}, [x1], #16
  187. sqxtn v3.4h, v18.4s
  188. ld1 {v0.8h,v1.8h}, [x0]
  189. sqxtn2 v3.8h, v19.4s
  190. mul v0.8h, v0.8h, v2.8h
  191. mul v1.8h, v1.8h, v3.8h
  192. sshl v0.8h, v0.8h, v31.8h
  193. sshl v1.8h, v1.8h, v31.8h
  194. st1 {v0.8h,v1.8h}, [x0], #32
  195. .ifc \size, 8x8
  196. b.gt dequant_\size\()_lshift_loop
  197. .endif
  198. ret
  199. dequant_\size\()_rshift:
  200. dup v31.4s, w3
  201. neg w3, w3
  202. mov w5, #1
  203. sub w3, w3, #1
  204. lsl w5, w5, w3
  205. .ifc \size, 8x8
  206. dequant_\size\()_rshift_loop:
  207. subs w2, w2, #1
  208. .endif
  209. ld1 {v16.4s}, [x1], #16
  210. ld1 {v17.4s}, [x1], #16
  211. sqxtn v2.4h, v16.4s
  212. ld1 {v18.4s}, [x1], #16
  213. dup v16.4s, w5
  214. sqxtn2 v2.8h, v17.4s
  215. ld1 {v19.4s}, [x1], #16
  216. dup v17.4s, w5
  217. sqxtn v3.4h, v18.4s
  218. ld1 {v0.8h,v1.8h}, [x0]
  219. dup v18.4s, w5
  220. sqxtn2 v3.8h, v19.4s
  221. dup v19.4s, w5
  222. smlal v16.4s, v0.4h, v2.4h
  223. smlal2 v17.4s, v0.8h, v2.8h
  224. smlal v18.4s, v1.4h, v3.4h
  225. smlal2 v19.4s, v1.8h, v3.8h
  226. sshl v16.4s, v16.4s, v31.4s
  227. sshl v17.4s, v17.4s, v31.4s
  228. sshl v18.4s, v18.4s, v31.4s
  229. sshl v19.4s, v19.4s, v31.4s
  230. sqxtn v0.4h, v16.4s
  231. sqxtn2 v0.8h, v17.4s
  232. sqxtn v1.4h, v18.4s
  233. sqxtn2 v1.8h, v19.4s
  234. st1 {v0.8h,v1.8h}, [x0], #32
  235. .ifc \size, 8x8
  236. b.gt dequant_\size\()_rshift_loop
  237. .endif
  238. ret
  239. endfunc
  240. .endm
  241. DEQUANT 4x4, 4
  242. DEQUANT 8x8, 6
  243. // dequant_4x4_dc( int16_t dct[16], int dequant_mf[6][16], int i_qp )
  244. function dequant_4x4_dc_neon, export=1
  245. DEQUANT_START 6, 6, yes
  246. b.lt dequant_4x4_dc_rshift
  247. lsl w1, w1, w3
  248. dup v2.8h, w1
  249. ld1 {v0.8h,v1.8h}, [x0]
  250. mul v0.8h, v0.8h, v2.8h
  251. mul v1.8h, v1.8h, v2.8h
  252. st1 {v0.8h,v1.8h}, [x0]
  253. ret
  254. dequant_4x4_dc_rshift:
  255. dup v4.8h, w1
  256. dup v3.4s, w3
  257. neg w3, w3
  258. mov w5, #1
  259. sub w3, w3, #1
  260. lsl w5, w5, w3
  261. dup v16.4s, w5
  262. dup v17.4s, w5
  263. ld1 {v0.8h,v1.8h}, [x0]
  264. dup v18.4s, w5
  265. dup v19.4s, w5
  266. smlal v16.4s, v0.4h, v4.4h
  267. smlal2 v17.4s, v0.8h, v4.8h
  268. smlal v18.4s, v1.4h, v4.4h
  269. smlal2 v19.4s, v1.8h, v4.8h
  270. sshl v16.4s, v16.4s, v3.4s
  271. sshl v17.4s, v17.4s, v3.4s
  272. sshl v18.4s, v18.4s, v3.4s
  273. sshl v19.4s, v19.4s, v3.4s
  274. sqxtn v0.4h, v16.4s
  275. sqxtn2 v0.8h, v17.4s
  276. sqxtn v1.4h, v18.4s
  277. sqxtn2 v1.8h, v19.4s
  278. st1 {v0.8h,v1.8h}, [x0]
  279. ret
  280. endfunc
  281. .macro decimate_score_1x size
  282. function decimate_score\size\()_neon, export=1
  283. ld1 {v0.8h,v1.8h}, [x0]
  284. movrel x5, X264(decimate_table4)
  285. movi v3.16b, #0x01
  286. sqxtn v0.8b, v0.8h
  287. sqxtn2 v0.16b, v1.8h
  288. abs v2.16b, v0.16b
  289. cmeq v1.16b, v0.16b, #0
  290. cmhi v2.16b, v2.16b, v3.16b
  291. shrn v1.8b, v1.8h, #4
  292. shrn v2.8b, v2.8h, #4
  293. fmov x2, d2
  294. fmov x1, d1
  295. cbnz x2, 9f
  296. mvn x1, x1
  297. mov w0, #0
  298. cbz x1, 0f
  299. .ifc \size, 15
  300. lsr x1, x1, #1
  301. .endif
  302. rbit x1, x1
  303. 1:
  304. clz x3, x1
  305. lsr x6, x3, #2
  306. lsl x1, x1, x3
  307. ldrb w7, [x5, x6]
  308. lsl x1, x1, #4
  309. add w0, w0, w7
  310. cbnz x1, 1b
  311. ret
  312. 9:
  313. mov w0, #9
  314. 0:
  315. ret
  316. endfunc
  317. .endm
  318. decimate_score_1x 15
  319. decimate_score_1x 16
  320. const mask64, align=6
  321. .byte 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01
  322. .byte 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01
  323. endconst
  324. function decimate_score64_neon, export=1
  325. ld1 {v0.8h,v1.8h}, [x0], #32
  326. ld1 {v2.8h,v3.8h}, [x0], #32
  327. ld1 {v4.8h,v5.8h}, [x0], #32
  328. ld1 {v6.8h,v7.8h}, [x0]
  329. movrel x6, mask64
  330. movi v31.16b, #0x01
  331. sqxtn v16.8b, v1.8h
  332. sqxtn2 v16.16b, v0.8h
  333. sqxtn v17.8b, v3.8h
  334. sqxtn2 v17.16b, v2.8h
  335. sqxtn v18.8b, v5.8h
  336. sqxtn2 v18.16b, v4.8h
  337. sqxtn v19.8b, v7.8h
  338. sqxtn2 v19.16b, v6.8h
  339. abs v4.16b, v16.16b
  340. abs v5.16b, v17.16b
  341. abs v6.16b, v18.16b
  342. abs v7.16b, v19.16b
  343. ld1 {v30.16b}, [x6]
  344. cmeq v0.16b, v16.16b, #0
  345. cmeq v1.16b, v17.16b, #0
  346. cmeq v2.16b, v18.16b, #0
  347. cmeq v3.16b, v19.16b, #0
  348. umax v4.16b, v4.16b, v5.16b
  349. umax v6.16b, v6.16b, v7.16b
  350. and v0.16b, v0.16b, v30.16b
  351. and v1.16b, v1.16b, v30.16b
  352. and v2.16b, v2.16b, v30.16b
  353. and v3.16b, v3.16b, v30.16b
  354. umax v4.16b, v4.16b, v6.16b
  355. addp v0.16b, v1.16b, v0.16b
  356. addp v2.16b, v3.16b, v2.16b
  357. cmhi v4.16b, v4.16b, v31.16b
  358. addp v0.16b, v2.16b, v0.16b
  359. shrn v4.8b, v4.8h, #4
  360. addp v0.16b, v0.16b, v0.16b
  361. fmov x2, d4
  362. fmov x1, d0
  363. cbnz x2, 9f
  364. mvn x1, x1
  365. mov w0, #0
  366. cbz x1, 0f
  367. movrel x5, X264(decimate_table8)
  368. 1:
  369. clz x3, x1
  370. lsl x1, x1, x3
  371. ldrb w7, [x5, x3]
  372. lsl x1, x1, #1
  373. add w0, w0, w7
  374. cbnz x1, 1b
  375. ret
  376. 9:
  377. mov w0, #9
  378. 0:
  379. ret
  380. endfunc
  381. // int coeff_last( int16_t *l )
  382. function coeff_last4_aarch64, export=1
  383. ldr x2, [x0]
  384. mov w4, #3
  385. clz x0, x2
  386. sub w0, w4, w0, lsr #4
  387. ret
  388. endfunc
  389. function coeff_last8_aarch64, export=1
  390. ldr x3, [x0, #8]
  391. mov w4, #7
  392. clz x2, x3
  393. cmp w2, #64
  394. b.ne 1f
  395. ldr x3, [x0]
  396. sub w4, w4, #4
  397. clz x2, x3
  398. 1:
  399. sub w0, w4, w2, lsr #4
  400. ret
  401. endfunc
  402. .macro COEFF_LAST_1x size
  403. function coeff_last\size\()_neon, export=1
  404. .if \size == 15
  405. sub x0, x0, #2
  406. .endif
  407. ld1 {v0.8h,v1.8h}, [x0]
  408. uqxtn v0.8b, v0.8h
  409. uqxtn2 v0.16b, v1.8h
  410. cmtst v0.16b, v0.16b, v0.16b
  411. shrn v0.8b, v0.8h, #4
  412. fmov x1, d0
  413. mov w3, #\size - 1
  414. clz x2, x1
  415. sub w0, w3, w2, lsr #2
  416. ret
  417. endfunc
  418. .endm
  419. COEFF_LAST_1x 15
  420. COEFF_LAST_1x 16
  421. function coeff_last64_neon, export=1
  422. ld1 {v0.8h,v1.8h,v2.8h,v3.8h}, [x0], 64
  423. movi v31.8h, #8
  424. movi v30.8h, #1
  425. uqxtn v0.8b, v0.8h
  426. uqxtn2 v0.16b, v1.8h
  427. ld1 {v4.8h,v5.8h,v6.8h,v7.8h}, [x0], 64
  428. uqxtn v1.8b, v2.8h
  429. uqxtn2 v1.16b, v3.8h
  430. uqxtn v2.8b, v4.8h
  431. uqxtn2 v2.16b, v5.8h
  432. uqxtn v3.8b, v6.8h
  433. uqxtn2 v3.16b, v7.8h
  434. cmtst v0.16b, v0.16b, v0.16b
  435. cmtst v1.16b, v1.16b, v1.16b
  436. cmtst v2.16b, v2.16b, v2.16b
  437. cmtst v3.16b, v3.16b, v3.16b
  438. shrn v0.8b, v0.8h, #4
  439. shrn2 v0.16b, v1.8h, #4
  440. shrn v1.8b, v2.8h, #4
  441. shrn2 v1.16b, v3.8h, #4
  442. clz v0.4s, v0.4s
  443. clz v1.4s, v1.4s
  444. shrn v0.4h, v0.4s, #2
  445. shrn2 v0.8h, v1.4s, #2
  446. sub v0.8h, v31.8h, v0.8h
  447. sshl v0.8h, v30.8h, v0.8h
  448. shrn v0.8b, v0.8h, #1
  449. fmov x2, d0
  450. mov w3, #63
  451. clz x2, x2
  452. sub w0, w3, w2
  453. ret
  454. endfunc
  455. .macro coeff_level_run_start size
  456. add x6, x1, #23 // runlevel->mask
  457. mov w7, #0
  458. mov w8, #0
  459. mov w9, #1
  460. and x6, x6, #~15
  461. mov w4, #\size - 1
  462. .endm
  463. .macro coeff_level_run shift
  464. clz x3, x2
  465. subs w4, w4, w3, lsr #\shift
  466. str w4, [x1], #4
  467. 1:
  468. ldrh w5, [x0, x4, lsl #1]
  469. strh w5, [x6], #2
  470. add w7, w7, #1
  471. lsl w10, w9, w4
  472. orr w8, w8, w10
  473. b.le 2f
  474. add w3, w3, #1 << \shift
  475. sub w4, w4, #1
  476. and x3, x3, #~((1 << \shift) - 1)
  477. lsl x2, x2, x3
  478. clz x3, x2
  479. subs w4, w4, w3, lsr #\shift
  480. b.ge 1b
  481. 2:
  482. str w8, [x1]
  483. mov w0, w7
  484. .endm
  485. function coeff_level_run4_aarch64, export=1
  486. ldr x2, [x0]
  487. coeff_level_run_start 4
  488. coeff_level_run 4
  489. ret
  490. endfunc
  491. .macro X264_COEFF_LEVEL_RUN size
  492. function coeff_level_run\size\()_neon, export=1
  493. .if \size == 15
  494. sub x0, x0, #2
  495. .endif
  496. .if \size < 15
  497. ld1 {v0.8h}, [x0]
  498. uqxtn v0.8b, v0.8h
  499. cmtst v0.8b, v0.8b, v0.8b
  500. .else
  501. ld1 {v0.8h,v1.8h}, [x0]
  502. uqxtn v0.8b, v0.8h
  503. uqxtn2 v0.16b, v1.8h
  504. cmtst v0.16b, v0.16b, v0.16b
  505. shrn v0.8b, v0.8h, #4
  506. .endif
  507. fmov x2, d0
  508. .if \size == 15
  509. add x0, x0, #2
  510. .endif
  511. coeff_level_run_start \size
  512. coeff_level_run (4 - (\size + 1) / 8)
  513. ret
  514. endfunc
  515. .endm
  516. X264_COEFF_LEVEL_RUN 8
  517. X264_COEFF_LEVEL_RUN 15
  518. X264_COEFF_LEVEL_RUN 16
  519. function denoise_dct_neon, export=1
  520. 1: subs w3, w3, #16
  521. ld1 {v0.8h,v1.8h}, [x0]
  522. ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x1]
  523. abs v16.8h, v0.8h
  524. abs v17.8h, v1.8h
  525. ld1 {v2.8h,v3.8h}, [x2], #32
  526. cmlt v18.8h, v0.8h, #0
  527. cmlt v19.8h, v1.8h, #0
  528. uaddw v4.4s, v4.4s, v16.4h
  529. uaddw2 v5.4s, v5.4s, v16.8h
  530. uqsub v20.8h, v16.8h, v2.8h
  531. uqsub v21.8h, v17.8h, v3.8h
  532. uaddw v6.4s, v6.4s, v17.4h
  533. uaddw2 v7.4s, v7.4s, v17.8h
  534. neg v22.8h, v20.8h
  535. neg v23.8h, v21.8h
  536. bsl v18.16b, v22.16b, v20.16b
  537. bsl v19.16b, v23.16b, v21.16b
  538. st1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x1], #64
  539. st1 {v18.8h,v19.8h}, [x0], #32
  540. b.gt 1b
  541. ret
  542. endfunc